@opencx/widget 3.0.57 → 3.0.58

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.
@@ -46,7 +46,7 @@
46
46
  `+u[r].replace(" at new "," at ");return e.displayName&&c.includes("<anonymous>")&&(c=c.replace("<anonymous>",e.displayName)),c}while(1<=r&&0<=a);break}}}finally{Kh=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:"")?Lu(n):""}function O4(e){switch(e.tag){case 26:case 27:case 5:return Lu(e.type);case 16:return Lu("Lazy");case 13:return Lu("Suspense");case 19:return Lu("SuspenseList");case 0:case 15:return e=Qh(e.type,!1),e;case 11:return e=Qh(e.type.render,!1),e;case 1:return e=Qh(e.type,!0),e;default:return""}}function Xy(e){try{var t="";do t+=O4(e),e=e.return;while(e);return t}catch(n){return`
47
47
  Error generating stack: `+n.message+`
48
48
  `+n.stack}}function $s(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 Wy(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 Ky(e){if($s(e)!==e)throw Error(G(188))}function N4(e){var t=e.alternate;if(!t){if(t=$s(e),t===null)throw Error(G(188));return t!==e?null:e}for(var n=e,r=t;;){var a=n.return;if(a===null)break;var i=a.alternate;if(i===null){if(r=a.return,r!==null){n=r;continue}break}if(a.child===i.child){for(i=a.child;i;){if(i===n)return Ky(a),e;if(i===r)return Ky(a),t;i=i.sibling}throw Error(G(188))}if(n.return!==r.return)n=a,r=i;else{for(var s=!1,o=a.child;o;){if(o===n){s=!0,n=a,r=i;break}if(o===r){s=!0,r=a,n=i;break}o=o.sibling}if(!s){for(o=i.child;o;){if(o===n){s=!0,n=i,r=a;break}if(o===r){s=!0,r=i,n=a;break}o=o.sibling}if(!s)throw Error(G(189))}}if(n.alternate!==r)throw Error(G(190))}if(n.tag!==3)throw Error(G(188));return n.stateNode.current===n?e:t}function Qy(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=Qy(e),t!==null)return t;e=e.sibling}return null}var Iu=Array.isArray,st=S4.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Ki={pending:!1,data:null,method:null,action:null},Zh=[],Xs=-1;function Ir(e){return{current:e}}function Ht(e){0>Xs||(e.current=Zh[Xs],Zh[Xs]=null,Xs--)}function lt(e,t){Xs++,Zh[Xs]=e.current,e.current=t}var Pr=Ir(null),Pu=Ir(null),Ya=Ir(null),ld=Ir(null);function cd(e,t){switch(lt(Ya,t),lt(Pu,e),lt(Pr,null),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)&&(t=t.namespaceURI)?lT(t):0;break;default:if(e=e===8?t.parentNode:t,t=e.tagName,e=e.namespaceURI)e=lT(e),t=cT(e,t);else switch(t){case"svg":t=1;break;case"math":t=2;break;default:t=0}}Ht(Pr),lt(Pr,t)}function Ws(){Ht(Pr),Ht(Pu),Ht(Ya)}function Jh(e){e.memoizedState!==null&&lt(ld,e);var t=Pr.current,n=cT(t,e.type);t!==n&&(lt(Pu,e),lt(Pr,n))}function dd(e){Pu.current===e&&(Ht(Pr),Ht(Pu)),ld.current===e&&(Ht(ld),kl._currentValue=Ki)}var em=Object.prototype.hasOwnProperty,tm=It.unstable_scheduleCallback,nm=It.unstable_cancelCallback,D4=It.unstable_shouldYield,M4=It.unstable_requestPaint,Br=It.unstable_now,L4=It.unstable_getCurrentPriorityLevel,Zy=It.unstable_ImmediatePriority,Jy=It.unstable_UserBlockingPriority,fd=It.unstable_NormalPriority,I4=It.unstable_LowPriority,ex=It.unstable_IdlePriority,P4=It.log,B4=It.unstable_setDisableYieldValue,Bu=null,Mn=null;function U4(e){if(Mn&&typeof Mn.onCommitFiberRoot=="function")try{Mn.onCommitFiberRoot(Bu,e,void 0,(e.current.flags&128)===128)}catch{}}function qa(e){if(typeof P4=="function"&&B4(e),Mn&&typeof Mn.setStrictMode=="function")try{Mn.setStrictMode(Bu,e)}catch{}}var Ln=Math.clz32?Math.clz32:H4,F4=Math.log,j4=Math.LN2;function H4(e){return e>>>=0,e===0?32:31-(F4(e)/j4|0)|0}var pd=128,hd=4194304;function Qi(e){var t=e&42;if(t!==0)return t;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:return 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&4194176;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function md(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,a=e.suspendedLanes,i=e.pingedLanes,s=e.warmLanes;e=e.finishedLanes!==0;var o=n&134217727;return o!==0?(n=o&~a,n!==0?r=Qi(n):(i&=o,i!==0?r=Qi(i):e||(s=o&~s,s!==0&&(r=Qi(s))))):(o=n&~a,o!==0?r=Qi(o):i!==0?r=Qi(i):e||(s=n&~s,s!==0&&(r=Qi(s)))),r===0?0:t!==0&&t!==r&&!(t&a)&&(a=r&-r,s=t&-t,a>=s||a===32&&(s&4194176)!==0)?t:r}function Uu(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function z4(e,t){switch(e){case 1:case 2:case 4:case 8:return t+250;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:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function tx(){var e=pd;return pd<<=1,!(pd&4194176)&&(pd=128),e}function nx(){var e=hd;return hd<<=1,!(hd&62914560)&&(hd=4194304),e}function rm(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Fu(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function V4(e,t,n,r,a,i){var s=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var o=e.entanglements,u=e.expirationTimes,l=e.hiddenUpdates;for(n=s&~n;0<n;){var c=31-Ln(n),d=1<<c;o[c]=0,u[c]=-1;var f=l[c];if(f!==null)for(l[c]=null,c=0;c<f.length;c++){var p=f[c];p!==null&&(p.lane&=-536870913)}n&=~d}r!==0&&rx(e,r,0),i!==0&&a===0&&e.tag!==0&&(e.suspendedLanes|=i&~(s&~t))}function rx(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-Ln(t);e.entangledLanes|=t,e.entanglements[r]=e.entanglements[r]|1073741824|n&4194218}function ax(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Ln(n),a=1<<r;a&t|e[r]&t&&(e[r]|=t),n&=~a}}function ix(e){return e&=-e,2<e?8<e?e&134217727?32:268435456:8:2}function sx(){var e=st.p;return e!==0?e:(e=window.event,e===void 0?32:kT(e.type))}function Y4(e,t){var n=st.p;try{return st.p=e,t()}finally{st.p=n}}var Ga=Math.random().toString(36).slice(2),rn="__reactFiber$"+Ga,Tn="__reactProps$"+Ga,Ks="__reactContainer$"+Ga,am="__reactEvents$"+Ga,q4="__reactListeners$"+Ga,G4="__reactHandles$"+Ga,ox="__reactResources$"+Ga,ju="__reactMarker$"+Ga;function im(e){delete e[rn],delete e[Tn],delete e[am],delete e[q4],delete e[G4]}function Zi(e){var t=e[rn];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Ks]||n[rn]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=pT(e);e!==null;){if(n=e[rn])return n;e=pT(e)}return t}e=n,n=e.parentNode}return null}function Qs(e){if(e=e[rn]||e[Ks]){var t=e.tag;if(t===5||t===6||t===13||t===26||t===27||t===3)return e}return null}function Hu(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(G(33))}function Zs(e){var t=e[ox];return t||(t=e[ox]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function zt(e){e[ju]=!0}var ux=new Set,lx={};function Ji(e,t){Js(e,t),Js(e+"Capture",t)}function Js(e,t){for(lx[e]=t,e=0;e<t.length;e++)ux.add(t[e])}var ia=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),$4=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),cx={},dx={};function X4(e){return em.call(dx,e)?!0:em.call(cx,e)?!1:$4.test(e)?dx[e]=!0:(cx[e]=!0,!1)}function gd(e,t,n){if(X4(t))if(n===null)e.removeAttribute(t);else{switch(typeof n){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var r=t.toLowerCase().slice(0,5);if(r!=="data-"&&r!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+n)}}function bd(e,t,n){if(n===null)e.removeAttribute(t);else{switch(typeof n){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+n)}}function sa(e,t,n,r){if(r===null)e.removeAttribute(n);else{switch(typeof r){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(n);return}e.setAttributeNS(t,n,""+r)}}function Zn(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function fx(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function W4(e){var t=fx(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 a=n.get,i=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return a.call(this)},set:function(s){r=""+s,i.call(this,s)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(s){r=""+s},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function vd(e){e._valueTracker||(e._valueTracker=W4(e))}function px(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=fx(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function yd(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}}var K4=/[\n"\\]/g;function Jn(e){return e.replace(K4,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function sm(e,t,n,r,a,i,s,o){e.name="",s!=null&&typeof s!="function"&&typeof s!="symbol"&&typeof s!="boolean"?e.type=s:e.removeAttribute("type"),t!=null?s==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+Zn(t)):e.value!==""+Zn(t)&&(e.value=""+Zn(t)):s!=="submit"&&s!=="reset"||e.removeAttribute("value"),t!=null?om(e,s,Zn(t)):n!=null?om(e,s,Zn(n)):r!=null&&e.removeAttribute("value"),a==null&&i!=null&&(e.defaultChecked=!!i),a!=null&&(e.checked=a&&typeof a!="function"&&typeof a!="symbol"),o!=null&&typeof o!="function"&&typeof o!="symbol"&&typeof o!="boolean"?e.name=""+Zn(o):e.removeAttribute("name")}function hx(e,t,n,r,a,i,s,o){if(i!=null&&typeof i!="function"&&typeof i!="symbol"&&typeof i!="boolean"&&(e.type=i),t!=null||n!=null){if(!(i!=="submit"&&i!=="reset"||t!=null))return;n=n!=null?""+Zn(n):"",t=t!=null?""+Zn(t):n,o||t===e.value||(e.value=t),e.defaultValue=t}r=r??a,r=typeof r!="function"&&typeof r!="symbol"&&!!r,e.checked=o?e.checked:!!r,e.defaultChecked=!!r,s!=null&&typeof s!="function"&&typeof s!="symbol"&&typeof s!="boolean"&&(e.name=s)}function om(e,t,n){t==="number"&&yd(e.ownerDocument)===e||e.defaultValue===""+n||(e.defaultValue=""+n)}function eo(e,t,n,r){if(e=e.options,t){t={};for(var a=0;a<n.length;a++)t["$"+n[a]]=!0;for(n=0;n<e.length;n++)a=t.hasOwnProperty("$"+e[n].value),e[n].selected!==a&&(e[n].selected=a),a&&r&&(e[n].defaultSelected=!0)}else{for(n=""+Zn(n),t=null,a=0;a<e.length;a++){if(e[a].value===n){e[a].selected=!0,r&&(e[a].defaultSelected=!0);return}t!==null||e[a].disabled||(t=e[a])}t!==null&&(t.selected=!0)}}function mx(e,t,n){if(t!=null&&(t=""+Zn(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n!=null?""+Zn(n):""}function gx(e,t,n,r){if(t==null){if(r!=null){if(n!=null)throw Error(G(92));if(Iu(r)){if(1<r.length)throw Error(G(93));r=r[0]}n=r}n==null&&(n=""),t=n}n=Zn(t),e.defaultValue=n,r=e.textContent,r===n&&r!==""&&r!==null&&(e.value=r)}function to(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Q4=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function bx(e,t,n){var r=t.indexOf("--")===0;n==null||typeof n=="boolean"||n===""?r?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":r?e.setProperty(t,n):typeof n!="number"||n===0||Q4.has(t)?t==="float"?e.cssFloat=n:e[t]=(""+n).trim():e[t]=n+"px"}function vx(e,t,n){if(t!=null&&typeof t!="object")throw Error(G(62));if(e=e.style,n!=null){for(var r in n)!n.hasOwnProperty(r)||t!=null&&t.hasOwnProperty(r)||(r.indexOf("--")===0?e.setProperty(r,""):r==="float"?e.cssFloat="":e[r]="");for(var a in t)r=t[a],t.hasOwnProperty(a)&&n[a]!==r&&bx(e,a,r)}else for(var i in t)t.hasOwnProperty(i)&&bx(e,i,t[i])}function um(e){if(e.indexOf("-")===-1)return!1;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 Z4=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),J4=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function xd(e){return J4.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}var lm=null;function cm(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var no=null,ro=null;function yx(e){var t=Qs(e);if(t&&(e=t.stateNode)){var n=e[Tn]||null;e:switch(e=t.stateNode,t.type){case"input":if(sm(e,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll('input[name="'+Jn(""+t)+'"][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var a=r[Tn]||null;if(!a)throw Error(G(90));sm(r,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name)}}for(t=0;t<n.length;t++)r=n[t],r.form===e.form&&px(r)}break e;case"textarea":mx(e,n.value,n.defaultValue);break e;case"select":t=n.value,t!=null&&eo(e,!!n.multiple,t,!1)}}}var dm=!1;function xx(e,t,n){if(dm)return e(t,n);dm=!0;try{var r=e(t);return r}finally{if(dm=!1,(no!==null||ro!==null)&&(rf(),no&&(t=no,e=ro,ro=no=null,yx(t),e)))for(t=0;t<e.length;t++)yx(e[t])}}function zu(e,t){var n=e.stateNode;if(n===null)return null;var r=n[Tn]||null;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(G(231,t,typeof n));return n}var fm=!1;if(ia)try{var Vu={};Object.defineProperty(Vu,"passive",{get:function(){fm=!0}}),window.addEventListener("test",Vu,Vu),window.removeEventListener("test",Vu,Vu)}catch{fm=!1}var $a=null,pm=null,Ed=null;function Ex(){if(Ed)return Ed;var e,t=pm,n=t.length,r,a="value"in $a?$a.value:$a.textContent,i=a.length;for(e=0;e<n&&t[e]===a[e];e++);var s=n-e;for(r=1;r<=s&&t[n-r]===a[i-r];r++);return Ed=a.slice(e,1<r?1-r:void 0)}function wd(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 Td(){return!0}function wx(){return!1}function _n(e){function t(n,r,a,i,s){this._reactName=n,this._targetInst=a,this.type=r,this.nativeEvent=i,this.target=s,this.currentTarget=null;for(var o in e)e.hasOwnProperty(o)&&(n=e[o],this[o]=n?n(i):i[o]);return this.isDefaultPrevented=(i.defaultPrevented!=null?i.defaultPrevented:i.returnValue===!1)?Td:wx,this.isPropagationStopped=wx,this}return it(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=Td)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=Td)},persist:function(){},isPersistent:Td}),t}var es={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},_d=_n(es),Yu=it({},es,{view:0,detail:0}),eM=_n(Yu),hm,mm,qu,Sd=it({},Yu,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:bm,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!==qu&&(qu&&e.type==="mousemove"?(hm=e.screenX-qu.screenX,mm=e.screenY-qu.screenY):mm=hm=0,qu=e),hm)},movementY:function(e){return"movementY"in e?e.movementY:mm}}),Tx=_n(Sd),tM=it({},Sd,{dataTransfer:0}),nM=_n(tM),rM=it({},Yu,{relatedTarget:0}),gm=_n(rM),aM=it({},es,{animationName:0,elapsedTime:0,pseudoElement:0}),iM=_n(aM),sM=it({},es,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),oM=_n(sM),uM=it({},es,{data:0}),_x=_n(uM),lM={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},cM={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"},dM={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function fM(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=dM[e])?!!t[e]:!1}function bm(){return fM}var pM=it({},Yu,{key:function(e){if(e.key){var t=lM[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=wd(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?cM[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:bm,charCode:function(e){return e.type==="keypress"?wd(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?wd(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),hM=_n(pM),mM=it({},Sd,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Sx=_n(mM),gM=it({},Yu,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:bm}),bM=_n(gM),vM=it({},es,{propertyName:0,elapsedTime:0,pseudoElement:0}),yM=_n(vM),xM=it({},Sd,{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}),EM=_n(xM),wM=it({},es,{newState:0,oldState:0}),TM=_n(wM),_M=[9,13,27,32],vm=ia&&"CompositionEvent"in window,Gu=null;ia&&"documentMode"in document&&(Gu=document.documentMode);var SM=ia&&"TextEvent"in window&&!Gu,Ax=ia&&(!vm||Gu&&8<Gu&&11>=Gu),Cx=" ",kx=!1;function Rx(e,t){switch(e){case"keyup":return _M.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Ox(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var ao=!1;function AM(e,t){switch(e){case"compositionend":return Ox(t);case"keypress":return t.which!==32?null:(kx=!0,Cx);case"textInput":return e=t.data,e===Cx&&kx?null:e;default:return null}}function CM(e,t){if(ao)return e==="compositionend"||!vm&&Rx(e,t)?(e=Ex(),Ed=pm=$a=null,ao=!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 Ax&&t.locale!=="ko"?null:t.data;default:return null}}var kM={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 Nx(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!kM[e.type]:t==="textarea"}function Dx(e,t,n,r){no?ro?ro.push(r):ro=[r]:no=r,t=lf(t,"onChange"),0<t.length&&(n=new _d("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var $u=null,Xu=null;function RM(e){aT(e,0)}function Ad(e){var t=Hu(e);if(px(t))return e}function Mx(e,t){if(e==="change")return t}var Lx=!1;if(ia){var ym;if(ia){var xm="oninput"in document;if(!xm){var Ix=document.createElement("div");Ix.setAttribute("oninput","return;"),xm=typeof Ix.oninput=="function"}ym=xm}else ym=!1;Lx=ym&&(!document.documentMode||9<document.documentMode)}function Px(){$u&&($u.detachEvent("onpropertychange",Bx),Xu=$u=null)}function Bx(e){if(e.propertyName==="value"&&Ad(Xu)){var t=[];Dx(t,Xu,e,cm(e)),xx(RM,t)}}function OM(e,t,n){e==="focusin"?(Px(),$u=t,Xu=n,$u.attachEvent("onpropertychange",Bx)):e==="focusout"&&Px()}function NM(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Ad(Xu)}function DM(e,t){if(e==="click")return Ad(t)}function MM(e,t){if(e==="input"||e==="change")return Ad(t)}function LM(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var In=typeof Object.is=="function"?Object.is:LM;function Wu(e,t){if(In(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 a=n[r];if(!em.call(t,a)||!In(e[a],t[a]))return!1}return!0}function Ux(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Fx(e,t){var n=Ux(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=Ux(n)}}function jx(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?jx(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Hx(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=yd(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=yd(e.document)}return t}function Em(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 IM(e,t){var n=Hx(t);t=e.focusedElem;var r=e.selectionRange;if(n!==t&&t&&t.ownerDocument&&jx(t.ownerDocument.documentElement,t)){if(r!==null&&Em(t)){if(e=r.start,n=r.end,n===void 0&&(n=e),"selectionStart"in t)t.selectionStart=e,t.selectionEnd=Math.min(n,t.value.length);else if(n=(e=t.ownerDocument||document)&&e.defaultView||window,n.getSelection){n=n.getSelection();var a=t.textContent.length,i=Math.min(r.start,a);r=r.end===void 0?i:Math.min(r.end,a),!n.extend&&i>r&&(a=r,r=i,i=a),a=Fx(t,i);var s=Fx(t,r);a&&s&&(n.rangeCount!==1||n.anchorNode!==a.node||n.anchorOffset!==a.offset||n.focusNode!==s.node||n.focusOffset!==s.offset)&&(e=e.createRange(),e.setStart(a.node,a.offset),n.removeAllRanges(),i>r?(n.addRange(e),n.extend(s.node,s.offset)):(e.setEnd(s.node,s.offset),n.addRange(e)))}}for(e=[],n=t;n=n.parentNode;)n.nodeType===1&&e.push({element:n,left:n.scrollLeft,top:n.scrollTop});for(typeof t.focus=="function"&&t.focus(),t=0;t<e.length;t++)n=e[t],n.element.scrollLeft=n.left,n.element.scrollTop=n.top}}var PM=ia&&"documentMode"in document&&11>=document.documentMode,io=null,wm=null,Ku=null,Tm=!1;function zx(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Tm||io==null||io!==yd(r)||(r=io,"selectionStart"in r&&Em(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}),Ku&&Wu(Ku,r)||(Ku=r,r=lf(wm,"onSelect"),0<r.length&&(t=new _d("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=io)))}function ts(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var so={animationend:ts("Animation","AnimationEnd"),animationiteration:ts("Animation","AnimationIteration"),animationstart:ts("Animation","AnimationStart"),transitionrun:ts("Transition","TransitionRun"),transitionstart:ts("Transition","TransitionStart"),transitioncancel:ts("Transition","TransitionCancel"),transitionend:ts("Transition","TransitionEnd")},_m={},Vx={};ia&&(Vx=document.createElement("div").style,"AnimationEvent"in window||(delete so.animationend.animation,delete so.animationiteration.animation,delete so.animationstart.animation),"TransitionEvent"in window||delete so.transitionend.transition);function ns(e){if(_m[e])return _m[e];if(!so[e])return e;var t=so[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Vx)return _m[e]=t[n];return e}var Yx=ns("animationend"),qx=ns("animationiteration"),Gx=ns("animationstart"),BM=ns("transitionrun"),UM=ns("transitionstart"),FM=ns("transitioncancel"),$x=ns("transitionend"),Xx=new Map,Wx="abort auxClick beforeToggle 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 scrollEnd toggle touchMove waiting wheel".split(" ");function Er(e,t){Xx.set(e,t),Ji(t,[e])}var er=[],oo=0,Sm=0;function Cd(){for(var e=oo,t=Sm=oo=0;t<e;){var n=er[t];er[t++]=null;var r=er[t];er[t++]=null;var a=er[t];er[t++]=null;var i=er[t];if(er[t++]=null,r!==null&&a!==null){var s=r.pending;s===null?a.next=a:(a.next=s.next,s.next=a),r.pending=a}i!==0&&Kx(n,a,i)}}function kd(e,t,n,r){er[oo++]=e,er[oo++]=t,er[oo++]=n,er[oo++]=r,Sm|=r,e.lanes|=r,e=e.alternate,e!==null&&(e.lanes|=r)}function Am(e,t,n,r){return kd(e,t,n,r),Rd(e)}function Xa(e,t){return kd(e,null,null,t),Rd(e)}function Kx(e,t,n){e.lanes|=n;var r=e.alternate;r!==null&&(r.lanes|=n);for(var a=!1,i=e.return;i!==null;)i.childLanes|=n,r=i.alternate,r!==null&&(r.childLanes|=n),i.tag===22&&(e=i.stateNode,e===null||e._visibility&1||(a=!0)),e=i,i=i.return;a&&t!==null&&e.tag===3&&(i=e.stateNode,a=31-Ln(n),i=i.hiddenUpdates,e=i[a],e===null?i[a]=[t]:e.push(t),t.lane=n|536870912)}function Rd(e){if(50<El)throw El=0,Dg=null,Error(G(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var uo={},Qx=new WeakMap;function tr(e,t){if(typeof e=="object"&&e!==null){var n=Qx.get(e);return n!==void 0?n:(t={value:e,source:t,stack:Xy(t)},Qx.set(e,t),t)}return{value:e,source:t,stack:Xy(t)}}var lo=[],co=0,Od=null,Nd=0,nr=[],rr=0,rs=null,oa=1,ua="";function as(e,t){lo[co++]=Nd,lo[co++]=Od,Od=e,Nd=t}function Zx(e,t,n){nr[rr++]=oa,nr[rr++]=ua,nr[rr++]=rs,rs=e;var r=oa;e=ua;var a=32-Ln(r)-1;r&=~(1<<a),n+=1;var i=32-Ln(t)+a;if(30<i){var s=a-a%5;i=(r&(1<<s)-1).toString(32),r>>=s,a-=s,oa=1<<32-Ln(t)+a|n<<a|r,ua=i+e}else oa=1<<i|n<<a|r,ua=e}function Cm(e){e.return!==null&&(as(e,1),Zx(e,1,0))}function km(e){for(;e===Od;)Od=lo[--co],lo[co]=null,Nd=lo[--co],lo[co]=null;for(;e===rs;)rs=nr[--rr],nr[rr]=null,ua=nr[--rr],nr[rr]=null,oa=nr[--rr],nr[rr]=null}var bn=null,Kt=null,ze=!1,wr=null,Ur=!1,Rm=Error(G(519));function is(e){var t=Error(G(418,""));throw Ju(tr(t,e)),Rm}function Jx(e){var t=e.stateNode,n=e.type,r=e.memoizedProps;switch(t[rn]=e,t[Tn]=r,n){case"dialog":Pe("cancel",t),Pe("close",t);break;case"iframe":case"object":case"embed":Pe("load",t);break;case"video":case"audio":for(n=0;n<Tl.length;n++)Pe(Tl[n],t);break;case"source":Pe("error",t);break;case"img":case"image":case"link":Pe("error",t),Pe("load",t);break;case"details":Pe("toggle",t);break;case"input":Pe("invalid",t),hx(t,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0),vd(t);break;case"select":Pe("invalid",t);break;case"textarea":Pe("invalid",t),gx(t,r.value,r.defaultValue,r.children),vd(t)}n=r.children,typeof n!="string"&&typeof n!="number"&&typeof n!="bigint"||t.textContent===""+n||r.suppressHydrationWarning===!0||uT(t.textContent,n)?(r.popover!=null&&(Pe("beforetoggle",t),Pe("toggle",t)),r.onScroll!=null&&Pe("scroll",t),r.onScrollEnd!=null&&Pe("scrollend",t),r.onClick!=null&&(t.onclick=cf),t=!0):t=!1,t||is(e)}function eE(e){for(bn=e.return;bn;)switch(bn.tag){case 3:case 27:Ur=!0;return;case 5:case 13:Ur=!1;return;default:bn=bn.return}}function Qu(e){if(e!==bn)return!1;if(!ze)return eE(e),ze=!0,!1;var t=!1,n;if((n=e.tag!==3&&e.tag!==27)&&((n=e.tag===5)&&(n=e.type,n=!(n!=="form"&&n!=="button")||Wg(e.type,e.memoizedProps)),n=!n),n&&(t=!0),t&&Kt&&is(e),eE(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(G(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8)if(n=e.data,n==="/$"){if(t===0){Kt=_r(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++;e=e.nextSibling}Kt=null}}else Kt=bn?_r(e.stateNode.nextSibling):null;return!0}function Zu(){Kt=bn=null,ze=!1}function Ju(e){wr===null?wr=[e]:wr.push(e)}var el=Error(G(460)),tE=Error(G(474)),Om={then:function(){}};function nE(e){return e=e.status,e==="fulfilled"||e==="rejected"}function Dd(){}function rE(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(Dd,Dd),t=n),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,e===el?Error(G(483)):e;default:if(typeof t.status=="string")t.then(Dd,Dd);else{if(e=tt,e!==null&&100<e.shellSuspendCounter)throw Error(G(482));e=t,e.status="pending",e.then(function(r){if(t.status==="pending"){var a=t;a.status="fulfilled",a.value=r}},function(r){if(t.status==="pending"){var a=t;a.status="rejected",a.reason=r}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,e===el?Error(G(483)):e}throw tl=t,el}}var tl=null;function aE(){if(tl===null)throw Error(G(459));var e=tl;return tl=null,e}var fo=null,nl=0;function Md(e){var t=nl;return nl+=1,fo===null&&(fo=[]),rE(fo,e,t)}function rl(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function Ld(e,t){throw t.$$typeof===A4?Error(G(525)):(e=Object.prototype.toString.call(t),Error(G(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function iE(e){var t=e._init;return t(e._payload)}function sE(e){function t(m,y){if(e){var x=m.deletions;x===null?(m.deletions=[y],m.flags|=16):x.push(y)}}function n(m,y){if(!e)return null;for(;y!==null;)t(m,y),y=y.sibling;return null}function r(m){for(var y=new Map;m!==null;)m.key!==null?y.set(m.key,m):y.set(m.index,m),m=m.sibling;return y}function a(m,y){return m=si(m,y),m.index=0,m.sibling=null,m}function i(m,y,x){return m.index=x,e?(x=m.alternate,x!==null?(x=x.index,x<y?(m.flags|=33554434,y):x):(m.flags|=33554434,y)):(m.flags|=1048576,y)}function s(m){return e&&m.alternate===null&&(m.flags|=33554434),m}function o(m,y,x,T){return y===null||y.tag!==6?(y=_g(x,m.mode,T),y.return=m,y):(y=a(y,x),y.return=m,y)}function u(m,y,x,T){var _=x.type;return _===Gs?c(m,y,x.props.children,T,x.key):y!==null&&(y.elementType===_||typeof _=="object"&&_!==null&&_.$$typeof===Va&&iE(_)===y.type)?(y=a(y,x.props),rl(y,x),y.return=m,y):(y=Zd(x.type,x.key,x.props,null,m.mode,T),rl(y,x),y.return=m,y)}function l(m,y,x,T){return y===null||y.tag!==4||y.stateNode.containerInfo!==x.containerInfo||y.stateNode.implementation!==x.implementation?(y=Sg(x,m.mode,T),y.return=m,y):(y=a(y,x.children||[]),y.return=m,y)}function c(m,y,x,T,_){return y===null||y.tag!==7?(y=ms(x,m.mode,T,_),y.return=m,y):(y=a(y,x),y.return=m,y)}function d(m,y,x){if(typeof y=="string"&&y!==""||typeof y=="number"||typeof y=="bigint")return y=_g(""+y,m.mode,x),y.return=m,y;if(typeof y=="object"&&y!==null){switch(y.$$typeof){case ud:return x=Zd(y.type,y.key,y.props,null,m.mode,x),rl(x,y),x.return=m,x;case Du:return y=Sg(y,m.mode,x),y.return=m,y;case Va:var T=y._init;return y=T(y._payload),d(m,y,x)}if(Iu(y)||Mu(y))return y=ms(y,m.mode,x,null),y.return=m,y;if(typeof y.then=="function")return d(m,Md(y),x);if(y.$$typeof===aa)return d(m,Wd(m,y),x);Ld(m,y)}return null}function f(m,y,x,T){var _=y!==null?y.key:null;if(typeof x=="string"&&x!==""||typeof x=="number"||typeof x=="bigint")return _!==null?null:o(m,y,""+x,T);if(typeof x=="object"&&x!==null){switch(x.$$typeof){case ud:return x.key===_?u(m,y,x,T):null;case Du:return x.key===_?l(m,y,x,T):null;case Va:return _=x._init,x=_(x._payload),f(m,y,x,T)}if(Iu(x)||Mu(x))return _!==null?null:c(m,y,x,T,null);if(typeof x.then=="function")return f(m,y,Md(x),T);if(x.$$typeof===aa)return f(m,y,Wd(m,x),T);Ld(m,x)}return null}function p(m,y,x,T,_){if(typeof T=="string"&&T!==""||typeof T=="number"||typeof T=="bigint")return m=m.get(x)||null,o(y,m,""+T,_);if(typeof T=="object"&&T!==null){switch(T.$$typeof){case ud:return m=m.get(T.key===null?x:T.key)||null,u(y,m,T,_);case Du:return m=m.get(T.key===null?x:T.key)||null,l(y,m,T,_);case Va:var A=T._init;return T=A(T._payload),p(m,y,x,T,_)}if(Iu(T)||Mu(T))return m=m.get(x)||null,c(y,m,T,_,null);if(typeof T.then=="function")return p(m,y,x,Md(T),_);if(T.$$typeof===aa)return p(m,y,x,Wd(y,T),_);Ld(y,T)}return null}function g(m,y,x,T){for(var _=null,A=null,C=y,M=y=0,j=null;C!==null&&M<x.length;M++){C.index>M?(j=C,C=null):j=C.sibling;var N=f(m,C,x[M],T);if(N===null){C===null&&(C=j);break}e&&C&&N.alternate===null&&t(m,C),y=i(N,y,M),A===null?_=N:A.sibling=N,A=N,C=j}if(M===x.length)return n(m,C),ze&&as(m,M),_;if(C===null){for(;M<x.length;M++)C=d(m,x[M],T),C!==null&&(y=i(C,y,M),A===null?_=C:A.sibling=C,A=C);return ze&&as(m,M),_}for(C=r(C);M<x.length;M++)j=p(C,m,M,x[M],T),j!==null&&(e&&j.alternate!==null&&C.delete(j.key===null?M:j.key),y=i(j,y,M),A===null?_=j:A.sibling=j,A=j);return e&&C.forEach(function(Y){return t(m,Y)}),ze&&as(m,M),_}function v(m,y,x,T){if(x==null)throw Error(G(151));for(var _=null,A=null,C=y,M=y=0,j=null,N=x.next();C!==null&&!N.done;M++,N=x.next()){C.index>M?(j=C,C=null):j=C.sibling;var Y=f(m,C,N.value,T);if(Y===null){C===null&&(C=j);break}e&&C&&Y.alternate===null&&t(m,C),y=i(Y,y,M),A===null?_=Y:A.sibling=Y,A=Y,C=j}if(N.done)return n(m,C),ze&&as(m,M),_;if(C===null){for(;!N.done;M++,N=x.next())N=d(m,N.value,T),N!==null&&(y=i(N,y,M),A===null?_=N:A.sibling=N,A=N);return ze&&as(m,M),_}for(C=r(C);!N.done;M++,N=x.next())N=p(C,m,M,N.value,T),N!==null&&(e&&N.alternate!==null&&C.delete(N.key===null?M:N.key),y=i(N,y,M),A===null?_=N:A.sibling=N,A=N);return e&&C.forEach(function(H){return t(m,H)}),ze&&as(m,M),_}function w(m,y,x,T){if(typeof x=="object"&&x!==null&&x.type===Gs&&x.key===null&&(x=x.props.children),typeof x=="object"&&x!==null){switch(x.$$typeof){case ud:e:{for(var _=x.key;y!==null;){if(y.key===_){if(_=x.type,_===Gs){if(y.tag===7){n(m,y.sibling),T=a(y,x.props.children),T.return=m,m=T;break e}}else if(y.elementType===_||typeof _=="object"&&_!==null&&_.$$typeof===Va&&iE(_)===y.type){n(m,y.sibling),T=a(y,x.props),rl(T,x),T.return=m,m=T;break e}n(m,y);break}else t(m,y);y=y.sibling}x.type===Gs?(T=ms(x.props.children,m.mode,T,x.key),T.return=m,m=T):(T=Zd(x.type,x.key,x.props,null,m.mode,T),rl(T,x),T.return=m,m=T)}return s(m);case Du:e:{for(_=x.key;y!==null;){if(y.key===_)if(y.tag===4&&y.stateNode.containerInfo===x.containerInfo&&y.stateNode.implementation===x.implementation){n(m,y.sibling),T=a(y,x.children||[]),T.return=m,m=T;break e}else{n(m,y);break}else t(m,y);y=y.sibling}T=Sg(x,m.mode,T),T.return=m,m=T}return s(m);case Va:return _=x._init,x=_(x._payload),w(m,y,x,T)}if(Iu(x))return g(m,y,x,T);if(Mu(x)){if(_=Mu(x),typeof _!="function")throw Error(G(150));return x=_.call(x),v(m,y,x,T)}if(typeof x.then=="function")return w(m,y,Md(x),T);if(x.$$typeof===aa)return w(m,y,Wd(m,x),T);Ld(m,x)}return typeof x=="string"&&x!==""||typeof x=="number"||typeof x=="bigint"?(x=""+x,y!==null&&y.tag===6?(n(m,y.sibling),T=a(y,x),T.return=m,m=T):(n(m,y),T=_g(x,m.mode,T),T.return=m,m=T),s(m)):n(m,y)}return function(m,y,x,T){try{nl=0;var _=w(m,y,x,T);return fo=null,_}catch(C){if(C===el)throw C;var A=or(29,C,null,m.mode);return A.lanes=T,A.return=m,A}finally{}}}var ss=sE(!0),oE=sE(!1),po=Ir(null),Id=Ir(0);function uE(e,t){e=ya,lt(Id,e),lt(po,t),ya=e|t.baseLanes}function Nm(){lt(Id,ya),lt(po,po.current)}function Dm(){ya=Id.current,Ht(po),Ht(Id)}var ar=Ir(null),Fr=null;function Wa(e){var t=e.alternate;lt(Pt,Pt.current&1),lt(ar,e),Fr===null&&(t===null||po.current!==null||t.memoizedState!==null)&&(Fr=e)}function lE(e){if(e.tag===22){if(lt(Pt,Pt.current),lt(ar,e),Fr===null){var t=e.alternate;t!==null&&t.memoizedState!==null&&(Fr=e)}}else Ka()}function Ka(){lt(Pt,Pt.current),lt(ar,ar.current)}function la(e){Ht(ar),Fr===e&&(Fr=null),Ht(Pt)}var Pt=Ir(0);function Pd(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 jM=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(n,r){e.push(r)}};this.abort=function(){t.aborted=!0,e.forEach(function(n){return n()})}},HM=It.unstable_scheduleCallback,zM=It.unstable_NormalPriority,Bt={$$typeof:aa,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Mm(){return{controller:new jM,data:new Map,refCount:0}}function al(e){e.refCount--,e.refCount===0&&HM(zM,function(){e.controller.abort()})}var il=null,Lm=0,ho=0,mo=null;function VM(e,t){if(il===null){var n=il=[];Lm=0,ho=jg(),mo={status:"pending",value:void 0,then:function(r){n.push(r)}}}return Lm++,t.then(cE,cE),t}function cE(){if(--Lm===0&&il!==null){mo!==null&&(mo.status="fulfilled");var e=il;il=null,ho=0,mo=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function YM(e,t){var n=[],r={status:"pending",value:null,reason:null,then:function(a){n.push(a)}};return e.then(function(){r.status="fulfilled",r.value=t;for(var a=0;a<n.length;a++)(0,n[a])(t)},function(a){for(r.status="rejected",r.reason=a,a=0;a<n.length;a++)(0,n[a])(void 0)}),r}var dE=xe.S;xe.S=function(e,t){typeof t=="object"&&t!==null&&typeof t.then=="function"&&VM(e,t),dE!==null&&dE(e,t)};var os=Ir(null);function Im(){var e=os.current;return e!==null?e:tt.pooledCache}function Bd(e,t){t===null?lt(os,os.current):lt(os,t.pool)}function fE(){var e=Im();return e===null?null:{parent:Bt._currentValue,pool:e}}var Qa=0,Ne=null,We=null,Ot=null,Ud=!1,go=!1,us=!1,Fd=0,sl=0,bo=null,qM=0;function St(){throw Error(G(321))}function Pm(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!In(e[n],t[n]))return!1;return!0}function Bm(e,t,n,r,a,i){return Qa=i,Ne=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,xe.H=e===null||e.memoizedState===null?ls:Za,us=!1,i=n(r,a),us=!1,go&&(i=hE(t,n,r,a)),pE(e),i}function pE(e){xe.H=jr;var t=We!==null&&We.next!==null;if(Qa=0,Ot=We=Ne=null,Ud=!1,sl=0,bo=null,t)throw Error(G(300));e===null||Vt||(e=e.dependencies,e!==null&&Xd(e)&&(Vt=!0))}function hE(e,t,n,r){Ne=e;var a=0;do{if(go&&(bo=null),sl=0,go=!1,25<=a)throw Error(G(301));if(a+=1,Ot=We=null,e.updateQueue!=null){var i=e.updateQueue;i.lastEffect=null,i.events=null,i.stores=null,i.memoCache!=null&&(i.memoCache.index=0)}xe.H=cs,i=t(n,r)}while(go);return i}function GM(){var e=xe.H,t=e.useState()[0];return t=typeof t.then=="function"?ol(t):t,e=e.useState()[0],(We!==null?We.memoizedState:null)!==e&&(Ne.flags|=1024),t}function Um(){var e=Fd!==0;return Fd=0,e}function Fm(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function jm(e){if(Ud){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Ud=!1}Qa=0,Ot=We=Ne=null,go=!1,sl=Fd=0,bo=null}function Sn(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ot===null?Ne.memoizedState=Ot=e:Ot=Ot.next=e,Ot}function Nt(){if(We===null){var e=Ne.alternate;e=e!==null?e.memoizedState:null}else e=We.next;var t=Ot===null?Ne.memoizedState:Ot.next;if(t!==null)Ot=t,We=e;else{if(e===null)throw Ne.alternate===null?Error(G(467)):Error(G(310));We=e,e={memoizedState:We.memoizedState,baseState:We.baseState,baseQueue:We.baseQueue,queue:We.queue,next:null},Ot===null?Ne.memoizedState=Ot=e:Ot=Ot.next=e}return Ot}var jd;jd=function(){return{lastEffect:null,events:null,stores:null,memoCache:null}};function ol(e){var t=sl;return sl+=1,bo===null&&(bo=[]),e=rE(bo,e,t),t=Ne,(Ot===null?t.memoizedState:Ot.next)===null&&(t=t.alternate,xe.H=t===null||t.memoizedState===null?ls:Za),e}function Hd(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return ol(e);if(e.$$typeof===aa)return an(e)}throw Error(G(438,String(e)))}function Hm(e){var t=null,n=Ne.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var r=Ne.alternate;r!==null&&(r=r.updateQueue,r!==null&&(r=r.memoCache,r!=null&&(t={data:r.data.map(function(a){return a.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),n===null&&(n=jd(),Ne.updateQueue=n),n.memoCache=t,n=t.data[t.index],n===void 0)for(n=t.data[t.index]=Array(e),r=0;r<e;r++)n[r]=k4;return t.index++,n}function ca(e,t){return typeof t=="function"?t(e):t}function zd(e){var t=Nt();return zm(t,We,e)}function zm(e,t,n){var r=e.queue;if(r===null)throw Error(G(311));r.lastRenderedReducer=n;var a=e.baseQueue,i=r.pending;if(i!==null){if(a!==null){var s=a.next;a.next=i.next,i.next=s}t.baseQueue=a=i,r.pending=null}if(i=e.baseState,a===null)e.memoizedState=i;else{t=a.next;var o=s=null,u=null,l=t,c=!1;do{var d=l.lane&-536870913;if(d!==l.lane?(Ue&d)===d:(Qa&d)===d){var f=l.revertLane;if(f===0)u!==null&&(u=u.next={lane:0,revertLane:0,action:l.action,hasEagerState:l.hasEagerState,eagerState:l.eagerState,next:null}),d===ho&&(c=!0);else if((Qa&f)===f){l=l.next,f===ho&&(c=!0);continue}else d={lane:0,revertLane:l.revertLane,action:l.action,hasEagerState:l.hasEagerState,eagerState:l.eagerState,next:null},u===null?(o=u=d,s=i):u=u.next=d,Ne.lanes|=f,oi|=f;d=l.action,us&&n(i,d),i=l.hasEagerState?l.eagerState:n(i,d)}else f={lane:d,revertLane:l.revertLane,action:l.action,hasEagerState:l.hasEagerState,eagerState:l.eagerState,next:null},u===null?(o=u=f,s=i):u=u.next=f,Ne.lanes|=d,oi|=d;l=l.next}while(l!==null&&l!==t);if(u===null?s=i:u.next=o,!In(i,e.memoizedState)&&(Vt=!0,c&&(n=mo,n!==null)))throw n;e.memoizedState=i,e.baseState=s,e.baseQueue=u,r.lastRenderedState=i}return a===null&&(r.lanes=0),[e.memoizedState,r.dispatch]}function Vm(e){var t=Nt(),n=t.queue;if(n===null)throw Error(G(311));n.lastRenderedReducer=e;var r=n.dispatch,a=n.pending,i=t.memoizedState;if(a!==null){n.pending=null;var s=a=a.next;do i=e(i,s.action),s=s.next;while(s!==a);In(i,t.memoizedState)||(Vt=!0),t.memoizedState=i,t.baseQueue===null&&(t.baseState=i),n.lastRenderedState=i}return[i,r]}function mE(e,t,n){var r=Ne,a=Nt(),i=ze;if(i){if(n===void 0)throw Error(G(407));n=n()}else n=t();var s=!In((We||a).memoizedState,n);if(s&&(a.memoizedState=n,Vt=!0),a=a.queue,Gm(vE.bind(null,r,a,e),[e]),a.getSnapshot!==t||s||Ot!==null&&Ot.memoizedState.tag&1){if(r.flags|=2048,vo(9,bE.bind(null,r,a,n,t),{destroy:void 0},null),tt===null)throw Error(G(349));i||Qa&60||gE(r,t,n)}return n}function gE(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=Ne.updateQueue,t===null?(t=jd(),Ne.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function bE(e,t,n,r){t.value=n,t.getSnapshot=r,yE(t)&&xE(e)}function vE(e,t,n){return n(function(){yE(t)&&xE(e)})}function yE(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!In(e,n)}catch{return!0}}function xE(e){var t=Xa(e,2);t!==null&&vn(t,e,2)}function Ym(e){var t=Sn();if(typeof e=="function"){var n=e;if(e=n(),us){qa(!0);try{n()}finally{qa(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ca,lastRenderedState:e},t}function EE(e,t,n,r){return e.baseState=n,zm(e,We,typeof r=="function"?r:ca)}function $M(e,t,n,r,a){if(qd(e))throw Error(G(485));if(e=t.action,e!==null){var i={payload:a,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(s){i.listeners.push(s)}};xe.T!==null?n(!0):i.isTransition=!1,r(i),n=t.pending,n===null?(i.next=t.pending=i,wE(t,i)):(i.next=n.next,t.pending=n.next=i)}}function wE(e,t){var n=t.action,r=t.payload,a=e.state;if(t.isTransition){var i=xe.T,s={};xe.T=s;try{var o=n(a,r),u=xe.S;u!==null&&u(s,o),TE(e,t,o)}catch(l){qm(e,t,l)}finally{xe.T=i}}else try{i=n(a,r),TE(e,t,i)}catch(l){qm(e,t,l)}}function TE(e,t,n){n!==null&&typeof n=="object"&&typeof n.then=="function"?n.then(function(r){_E(e,t,r)},function(r){return qm(e,t,r)}):_E(e,t,n)}function _E(e,t,n){t.status="fulfilled",t.value=n,SE(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,wE(e,n)))}function qm(e,t,n){var r=e.pending;if(e.pending=null,r!==null){r=r.next;do t.status="rejected",t.reason=n,SE(t),t=t.next;while(t!==r)}e.action=null}function SE(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function AE(e,t){return t}function CE(e,t){if(ze){var n=tt.formState;if(n!==null){e:{var r=Ne;if(ze){if(Kt){t:{for(var a=Kt,i=Ur;a.nodeType!==8;){if(!i){a=null;break t}if(a=_r(a.nextSibling),a===null){a=null;break t}}i=a.data,a=i==="F!"||i==="F"?a:null}if(a){Kt=_r(a.nextSibling),r=a.data==="F!";break e}}is(r)}r=!1}r&&(t=n[0])}}return n=Sn(),n.memoizedState=n.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:AE,lastRenderedState:t},n.queue=r,n=qE.bind(null,Ne,r),r.dispatch=n,r=Ym(!1),i=Qm.bind(null,Ne,!1,r.queue),r=Sn(),a={state:t,dispatch:null,action:e,pending:null},r.queue=a,n=$M.bind(null,Ne,a,i,n),a.dispatch=n,r.memoizedState=e,[t,n,!1]}function kE(e){var t=Nt();return RE(t,We,e)}function RE(e,t,n){t=zm(e,t,AE)[0],e=zd(ca)[0],t=typeof t=="object"&&t!==null&&typeof t.then=="function"?ol(t):t;var r=Nt(),a=r.queue,i=a.dispatch;return n!==r.memoizedState&&(Ne.flags|=2048,vo(9,XM.bind(null,a,n),{destroy:void 0},null)),[t,i,e]}function XM(e,t){e.action=t}function OE(e){var t=Nt(),n=We;if(n!==null)return RE(t,n,e);Nt(),t=t.memoizedState,n=Nt();var r=n.queue.dispatch;return n.memoizedState=e,[t,r,!1]}function vo(e,t,n,r){return e={tag:e,create:t,inst:n,deps:r,next:null},t=Ne.updateQueue,t===null&&(t=jd(),Ne.updateQueue=t),n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function NE(){return Nt().memoizedState}function Vd(e,t,n,r){var a=Sn();Ne.flags|=e,a.memoizedState=vo(1|t,n,{destroy:void 0},r===void 0?null:r)}function Yd(e,t,n,r){var a=Nt();r=r===void 0?null:r;var i=a.memoizedState.inst;We!==null&&r!==null&&Pm(r,We.memoizedState.deps)?a.memoizedState=vo(t,n,i,r):(Ne.flags|=e,a.memoizedState=vo(1|t,n,i,r))}function DE(e,t){Vd(8390656,8,e,t)}function Gm(e,t){Yd(2048,8,e,t)}function ME(e,t){return Yd(4,2,e,t)}function LE(e,t){return Yd(4,4,e,t)}function IE(e,t){if(typeof t=="function"){e=e();var n=t(e);return function(){typeof n=="function"?n():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function PE(e,t,n){n=n!=null?n.concat([e]):null,Yd(4,4,IE.bind(null,t,e),n)}function $m(){}function BE(e,t){var n=Nt();t=t===void 0?null:t;var r=n.memoizedState;return t!==null&&Pm(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function UE(e,t){var n=Nt();t=t===void 0?null:t;var r=n.memoizedState;if(t!==null&&Pm(t,r[1]))return r[0];if(r=e(),us){qa(!0);try{e()}finally{qa(!1)}}return n.memoizedState=[r,t],r}function Xm(e,t,n){return n===void 0||Qa&1073741824?e.memoizedState=t:(e.memoizedState=n,e=jw(),Ne.lanes|=e,oi|=e,n)}function FE(e,t,n,r){return In(n,t)?n:po.current!==null?(e=Xm(e,n,r),In(e,t)||(Vt=!0),e):Qa&42?(e=jw(),Ne.lanes|=e,oi|=e,t):(Vt=!0,e.memoizedState=n)}function jE(e,t,n,r,a){var i=st.p;st.p=i!==0&&8>i?i:8;var s=xe.T,o={};xe.T=o,Qm(e,!1,t,n);try{var u=a(),l=xe.S;if(l!==null&&l(o,u),u!==null&&typeof u=="object"&&typeof u.then=="function"){var c=YM(u,r);ul(e,t,c,Fn(e))}else ul(e,t,r,Fn(e))}catch(d){ul(e,t,{then:function(){},status:"rejected",reason:d},Fn())}finally{st.p=i,xe.T=s}}function WM(){}function Wm(e,t,n,r){if(e.tag!==5)throw Error(G(476));var a=HE(e).queue;jE(e,a,t,Ki,n===null?WM:function(){return zE(e),n(r)})}function HE(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:Ki,baseState:Ki,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ca,lastRenderedState:Ki},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ca,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function zE(e){var t=HE(e).next.queue;ul(e,t,{},Fn())}function Km(){return an(kl)}function VE(){return Nt().memoizedState}function YE(){return Nt().memoizedState}function KM(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=Fn();e=ti(n);var r=ni(t,e,n);r!==null&&(vn(r,t,n),dl(r,t,n)),t={cache:Mm()},e.payload=t;return}t=t.return}}function QM(e,t,n){var r=Fn();n={lane:r,revertLane:0,action:n,hasEagerState:!1,eagerState:null,next:null},qd(e)?GE(t,n):(n=Am(e,t,n,r),n!==null&&(vn(n,e,r),$E(n,t,r)))}function qE(e,t,n){var r=Fn();ul(e,t,n,r)}function ul(e,t,n,r){var a={lane:r,revertLane:0,action:n,hasEagerState:!1,eagerState:null,next:null};if(qd(e))GE(t,a);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var s=t.lastRenderedState,o=i(s,n);if(a.hasEagerState=!0,a.eagerState=o,In(o,s))return kd(e,t,a,0),tt===null&&Cd(),!1}catch{}finally{}if(n=Am(e,t,a,r),n!==null)return vn(n,e,r),$E(n,t,r),!0}return!1}function Qm(e,t,n,r){if(r={lane:2,revertLane:jg(),action:r,hasEagerState:!1,eagerState:null,next:null},qd(e)){if(t)throw Error(G(479))}else t=Am(e,n,r,2),t!==null&&vn(t,e,2)}function qd(e){var t=e.alternate;return e===Ne||t!==null&&t===Ne}function GE(e,t){go=Ud=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function $E(e,t,n){if(n&4194176){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,ax(e,n)}}var jr={readContext:an,use:Hd,useCallback:St,useContext:St,useEffect:St,useImperativeHandle:St,useLayoutEffect:St,useInsertionEffect:St,useMemo:St,useReducer:St,useRef:St,useState:St,useDebugValue:St,useDeferredValue:St,useTransition:St,useSyncExternalStore:St,useId:St};jr.useCacheRefresh=St,jr.useMemoCache=St,jr.useHostTransitionStatus=St,jr.useFormState=St,jr.useActionState=St,jr.useOptimistic=St;var ls={readContext:an,use:Hd,useCallback:function(e,t){return Sn().memoizedState=[e,t===void 0?null:t],e},useContext:an,useEffect:DE,useImperativeHandle:function(e,t,n){n=n!=null?n.concat([e]):null,Vd(4194308,4,IE.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Vd(4194308,4,e,t)},useInsertionEffect:function(e,t){Vd(4,2,e,t)},useMemo:function(e,t){var n=Sn();t=t===void 0?null:t;var r=e();if(us){qa(!0);try{e()}finally{qa(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=Sn();if(n!==void 0){var a=n(t);if(us){qa(!0);try{n(t)}finally{qa(!1)}}}else a=t;return r.memoizedState=r.baseState=a,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:a},r.queue=e,e=e.dispatch=QM.bind(null,Ne,e),[r.memoizedState,e]},useRef:function(e){var t=Sn();return e={current:e},t.memoizedState=e},useState:function(e){e=Ym(e);var t=e.queue,n=qE.bind(null,Ne,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:$m,useDeferredValue:function(e,t){var n=Sn();return Xm(n,e,t)},useTransition:function(){var e=Ym(!1);return e=jE.bind(null,Ne,e.queue,!0,!1),Sn().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=Ne,a=Sn();if(ze){if(n===void 0)throw Error(G(407));n=n()}else{if(n=t(),tt===null)throw Error(G(349));Ue&60||gE(r,t,n)}a.memoizedState=n;var i={value:n,getSnapshot:t};return a.queue=i,DE(vE.bind(null,r,i,e),[e]),r.flags|=2048,vo(9,bE.bind(null,r,i,n,t),{destroy:void 0},null),n},useId:function(){var e=Sn(),t=tt.identifierPrefix;if(ze){var n=ua,r=oa;n=(r&~(1<<32-Ln(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Fd++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=qM++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},useCacheRefresh:function(){return Sn().memoizedState=KM.bind(null,Ne)}};ls.useMemoCache=Hm,ls.useHostTransitionStatus=Km,ls.useFormState=CE,ls.useActionState=CE,ls.useOptimistic=function(e){var t=Sn();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=Qm.bind(null,Ne,!0,n),n.dispatch=t,[e,t]};var Za={readContext:an,use:Hd,useCallback:BE,useContext:an,useEffect:Gm,useImperativeHandle:PE,useInsertionEffect:ME,useLayoutEffect:LE,useMemo:UE,useReducer:zd,useRef:NE,useState:function(){return zd(ca)},useDebugValue:$m,useDeferredValue:function(e,t){var n=Nt();return FE(n,We.memoizedState,e,t)},useTransition:function(){var e=zd(ca)[0],t=Nt().memoizedState;return[typeof e=="boolean"?e:ol(e),t]},useSyncExternalStore:mE,useId:VE};Za.useCacheRefresh=YE,Za.useMemoCache=Hm,Za.useHostTransitionStatus=Km,Za.useFormState=kE,Za.useActionState=kE,Za.useOptimistic=function(e,t){var n=Nt();return EE(n,We,e,t)};var cs={readContext:an,use:Hd,useCallback:BE,useContext:an,useEffect:Gm,useImperativeHandle:PE,useInsertionEffect:ME,useLayoutEffect:LE,useMemo:UE,useReducer:Vm,useRef:NE,useState:function(){return Vm(ca)},useDebugValue:$m,useDeferredValue:function(e,t){var n=Nt();return We===null?Xm(n,e,t):FE(n,We.memoizedState,e,t)},useTransition:function(){var e=Vm(ca)[0],t=Nt().memoizedState;return[typeof e=="boolean"?e:ol(e),t]},useSyncExternalStore:mE,useId:VE};cs.useCacheRefresh=YE,cs.useMemoCache=Hm,cs.useHostTransitionStatus=Km,cs.useFormState=OE,cs.useActionState=OE,cs.useOptimistic=function(e,t){var n=Nt();return We!==null?EE(n,We,e,t):(n.baseState=e,[e,n.queue.dispatch])};function Zm(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:it({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Jm={isMounted:function(e){return(e=e._reactInternals)?$s(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=Fn(),a=ti(r);a.payload=t,n!=null&&(a.callback=n),t=ni(e,a,r),t!==null&&(vn(t,e,r),dl(t,e,r))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=Fn(),a=ti(r);a.tag=1,a.payload=t,n!=null&&(a.callback=n),t=ni(e,a,r),t!==null&&(vn(t,e,r),dl(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Fn(),r=ti(n);r.tag=2,t!=null&&(r.callback=t),t=ni(e,r,n),t!==null&&(vn(t,e,n),dl(t,e,n))}};function XE(e,t,n,r,a,i,s){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,i,s):t.prototype&&t.prototype.isPureReactComponent?!Wu(n,r)||!Wu(a,i):!0}function WE(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&&Jm.enqueueReplaceState(t,t.state,null)}function ds(e,t){var n=t;if("ref"in t){n={};for(var r in t)r!=="ref"&&(n[r]=t[r])}if(e=e.defaultProps){n===t&&(n=it({},n));for(var a in e)n[a]===void 0&&(n[a]=e[a])}return n}var Gd=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)};function KE(e){Gd(e)}function QE(e){console.error(e)}function ZE(e){Gd(e)}function $d(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(r){setTimeout(function(){throw r})}}function JE(e,t,n){try{var r=e.onCaughtError;r(n.value,{componentStack:n.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(a){setTimeout(function(){throw a})}}function eg(e,t,n){return n=ti(n),n.tag=3,n.payload={element:null},n.callback=function(){$d(e,t)},n}function ew(e){return e=ti(e),e.tag=3,e}function tw(e,t,n,r){var a=n.type.getDerivedStateFromError;if(typeof a=="function"){var i=r.value;e.payload=function(){return a(i)},e.callback=function(){JE(t,n,r)}}var s=n.stateNode;s!==null&&typeof s.componentDidCatch=="function"&&(e.callback=function(){JE(t,n,r),typeof a!="function"&&(ui===null?ui=new Set([this]):ui.add(this));var o=r.stack;this.componentDidCatch(r.value,{componentStack:o!==null?o:""})})}function ZM(e,t,n,r,a){if(n.flags|=32768,r!==null&&typeof r=="object"&&typeof r.then=="function"){if(t=n.alternate,t!==null&&cl(t,n,a,!0),n=ar.current,n!==null){switch(n.tag){case 13:return Fr===null?Ig():n.alternate===null&&Et===0&&(Et=3),n.flags&=-257,n.flags|=65536,n.lanes=a,r===Om?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([r]):t.add(r),Bg(e,r,a)),!1;case 22:return n.flags|=65536,r===Om?n.flags|=16384:(t=n.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([r])},n.updateQueue=t):(n=t.retryQueue,n===null?t.retryQueue=new Set([r]):n.add(r)),Bg(e,r,a)),!1}throw Error(G(435,n.tag))}return Bg(e,r,a),Ig(),!1}if(ze)return t=ar.current,t!==null?(!(t.flags&65536)&&(t.flags|=256),t.flags|=65536,t.lanes=a,r!==Rm&&(e=Error(G(422),{cause:r}),Ju(tr(e,n)))):(r!==Rm&&(t=Error(G(423),{cause:r}),Ju(tr(t,n))),e=e.current.alternate,e.flags|=65536,a&=-a,e.lanes|=a,r=tr(r,n),a=eg(e.stateNode,r,a),mg(e,a),Et!==4&&(Et=2)),!1;var i=Error(G(520),{cause:r});if(i=tr(i,n),yl===null?yl=[i]:yl.push(i),Et!==4&&(Et=2),t===null)return!0;r=tr(r,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=a&-a,n.lanes|=e,e=eg(n.stateNode,r,e),mg(n,e),!1;case 1:if(t=n.type,i=n.stateNode,(n.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||i!==null&&typeof i.componentDidCatch=="function"&&(ui===null||!ui.has(i))))return n.flags|=65536,a&=-a,n.lanes|=a,a=ew(a),tw(a,e,n,r),mg(n,a),!1}n=n.return}while(n!==null);return!1}var nw=Error(G(461)),Vt=!1;function Qt(e,t,n,r){t.child=e===null?oE(t,null,n,r):ss(t,e.child,n,r)}function rw(e,t,n,r,a){n=n.render;var i=t.ref;if("ref"in r){var s={};for(var o in r)o!=="ref"&&(s[o]=r[o])}else s=r;return ps(t),r=Bm(e,t,n,s,i,a),o=Um(),e!==null&&!Vt?(Fm(e,t,a),da(e,t,a)):(ze&&o&&Cm(t),t.flags|=1,Qt(e,t,r,a),t.child)}function aw(e,t,n,r,a){if(e===null){var i=n.type;return typeof i=="function"&&!Tg(i)&&i.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=i,iw(e,t,i,r,a)):(e=Zd(n.type,null,r,t,t.mode,a),e.ref=t.ref,e.return=t,t.child=e)}if(i=e.child,!lg(e,a)){var s=i.memoizedProps;if(n=n.compare,n=n!==null?n:Wu,n(s,r)&&e.ref===t.ref)return da(e,t,a)}return t.flags|=1,e=si(i,r),e.ref=t.ref,e.return=t,t.child=e}function iw(e,t,n,r,a){if(e!==null){var i=e.memoizedProps;if(Wu(i,r)&&e.ref===t.ref)if(Vt=!1,t.pendingProps=r=i,lg(e,a))e.flags&131072&&(Vt=!0);else return t.lanes=e.lanes,da(e,t,a)}return tg(e,t,n,r,a)}function sw(e,t,n){var r=t.pendingProps,a=r.children,i=(t.stateNode._pendingVisibility&2)!==0,s=e!==null?e.memoizedState:null;if(ll(e,t),r.mode==="hidden"||i){if(t.flags&128){if(r=s!==null?s.baseLanes|n:n,e!==null){for(a=t.child=e.child,i=0;a!==null;)i=i|a.lanes|a.childLanes,a=a.sibling;t.childLanes=i&~r}else t.childLanes=0,t.child=null;return ow(e,t,r,n)}if(n&536870912)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Bd(t,s!==null?s.cachePool:null),s!==null?uE(t,s):Nm(),lE(t);else return t.lanes=t.childLanes=536870912,ow(e,t,s!==null?s.baseLanes|n:n,n)}else s!==null?(Bd(t,s.cachePool),uE(t,s),Ka(),t.memoizedState=null):(e!==null&&Bd(t,null),Nm(),Ka());return Qt(e,t,a,n),t.child}function ow(e,t,n,r){var a=Im();return a=a===null?null:{parent:Bt._currentValue,pool:a},t.memoizedState={baseLanes:n,cachePool:a},e!==null&&Bd(t,null),Nm(),lE(t),e!==null&&cl(e,t,r,!0),null}function ll(e,t){var n=t.ref;if(n===null)e!==null&&e.ref!==null&&(t.flags|=2097664);else{if(typeof n!="function"&&typeof n!="object")throw Error(G(284));(e===null||e.ref!==n)&&(t.flags|=2097664)}}function tg(e,t,n,r,a){return ps(t),n=Bm(e,t,n,r,void 0,a),r=Um(),e!==null&&!Vt?(Fm(e,t,a),da(e,t,a)):(ze&&r&&Cm(t),t.flags|=1,Qt(e,t,n,a),t.child)}function uw(e,t,n,r,a,i){return ps(t),t.updateQueue=null,n=hE(t,r,n,a),pE(e),r=Um(),e!==null&&!Vt?(Fm(e,t,i),da(e,t,i)):(ze&&r&&Cm(t),t.flags|=1,Qt(e,t,n,i),t.child)}function lw(e,t,n,r,a){if(ps(t),t.stateNode===null){var i=uo,s=n.contextType;typeof s=="object"&&s!==null&&(i=an(s)),i=new n(r,i),t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,i.updater=Jm,t.stateNode=i,i._reactInternals=t,i=t.stateNode,i.props=r,i.state=t.memoizedState,i.refs={},pg(t),s=n.contextType,i.context=typeof s=="object"&&s!==null?an(s):uo,i.state=t.memoizedState,s=n.getDerivedStateFromProps,typeof s=="function"&&(Zm(t,n,s,r),i.state=t.memoizedState),typeof n.getDerivedStateFromProps=="function"||typeof i.getSnapshotBeforeUpdate=="function"||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(s=i.state,typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount(),s!==i.state&&Jm.enqueueReplaceState(i,i.state,null),pl(t,r,i,a),fl(),i.state=t.memoizedState),typeof i.componentDidMount=="function"&&(t.flags|=4194308),r=!0}else if(e===null){i=t.stateNode;var o=t.memoizedProps,u=ds(n,o);i.props=u;var l=i.context,c=n.contextType;s=uo,typeof c=="object"&&c!==null&&(s=an(c));var d=n.getDerivedStateFromProps;c=typeof d=="function"||typeof i.getSnapshotBeforeUpdate=="function",o=t.pendingProps!==o,c||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(o||l!==s)&&WE(t,i,r,s),ei=!1;var f=t.memoizedState;i.state=f,pl(t,r,i,a),fl(),l=t.memoizedState,o||f!==l||ei?(typeof d=="function"&&(Zm(t,n,d,r),l=t.memoizedState),(u=ei||XE(t,n,u,r,f,l,s))?(c||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount()),typeof i.componentDidMount=="function"&&(t.flags|=4194308)):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),i.props=r,i.state=l,i.context=s,r=u):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{i=t.stateNode,hg(e,t),s=t.memoizedProps,c=ds(n,s),i.props=c,d=t.pendingProps,f=i.context,l=n.contextType,u=uo,typeof l=="object"&&l!==null&&(u=an(l)),o=n.getDerivedStateFromProps,(l=typeof o=="function"||typeof i.getSnapshotBeforeUpdate=="function")||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(s!==d||f!==u)&&WE(t,i,r,u),ei=!1,f=t.memoizedState,i.state=f,pl(t,r,i,a),fl();var p=t.memoizedState;s!==d||f!==p||ei||e!==null&&e.dependencies!==null&&Xd(e.dependencies)?(typeof o=="function"&&(Zm(t,n,o,r),p=t.memoizedState),(c=ei||XE(t,n,c,r,f,p,u)||e!==null&&e.dependencies!==null&&Xd(e.dependencies))?(l||typeof i.UNSAFE_componentWillUpdate!="function"&&typeof i.componentWillUpdate!="function"||(typeof i.componentWillUpdate=="function"&&i.componentWillUpdate(r,p,u),typeof i.UNSAFE_componentWillUpdate=="function"&&i.UNSAFE_componentWillUpdate(r,p,u)),typeof i.componentDidUpdate=="function"&&(t.flags|=4),typeof i.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof i.componentDidUpdate!="function"||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=p),i.props=r,i.state=p,i.context=u,r=c):(typeof i.componentDidUpdate!="function"||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return i=r,ll(e,t),r=(t.flags&128)!==0,i||r?(i=t.stateNode,n=r&&typeof n.getDerivedStateFromError!="function"?null:i.render(),t.flags|=1,e!==null&&r?(t.child=ss(t,e.child,null,a),t.child=ss(t,null,n,a)):Qt(e,t,n,a),t.memoizedState=i.state,e=t.child):e=da(e,t,a),e}function cw(e,t,n,r){return Zu(),t.flags|=256,Qt(e,t,n,r),t.child}var ng={dehydrated:null,treeContext:null,retryLane:0};function rg(e){return{baseLanes:e,cachePool:fE()}}function ag(e,t,n){return e=e!==null?e.childLanes&~n:0,t&&(e|=ur),e}function dw(e,t,n){var r=t.pendingProps,a=!1,i=(t.flags&128)!==0,s;if((s=i)||(s=e!==null&&e.memoizedState===null?!1:(Pt.current&2)!==0),s&&(a=!0,t.flags&=-129),s=(t.flags&32)!==0,t.flags&=-33,e===null){if(ze){if(a?Wa(t):Ka(),ze){var o=Kt,u;if(u=o){e:{for(u=o,o=Ur;u.nodeType!==8;){if(!o){o=null;break e}if(u=_r(u.nextSibling),u===null){o=null;break e}}o=u}o!==null?(t.memoizedState={dehydrated:o,treeContext:rs!==null?{id:oa,overflow:ua}:null,retryLane:536870912},u=or(18,null,null,0),u.stateNode=o,u.return=t,t.child=u,bn=t,Kt=null,u=!0):u=!1}u||is(t)}if(o=t.memoizedState,o!==null&&(o=o.dehydrated,o!==null))return o.data==="$!"?t.lanes=16:t.lanes=536870912,null;la(t)}return o=r.children,r=r.fallback,a?(Ka(),a=t.mode,o=sg({mode:"hidden",children:o},a),r=ms(r,a,n,null),o.return=t,r.return=t,o.sibling=r,t.child=o,a=t.child,a.memoizedState=rg(n),a.childLanes=ag(e,s,n),t.memoizedState=ng,r):(Wa(t),ig(t,o))}if(u=e.memoizedState,u!==null&&(o=u.dehydrated,o!==null)){if(i)t.flags&256?(Wa(t),t.flags&=-257,t=og(e,t,n)):t.memoizedState!==null?(Ka(),t.child=e.child,t.flags|=128,t=null):(Ka(),a=r.fallback,o=t.mode,r=sg({mode:"visible",children:r.children},o),a=ms(a,o,n,null),a.flags|=2,r.return=t,a.return=t,r.sibling=a,t.child=r,ss(t,e.child,null,n),r=t.child,r.memoizedState=rg(n),r.childLanes=ag(e,s,n),t.memoizedState=ng,t=a);else if(Wa(t),o.data==="$!"){if(s=o.nextSibling&&o.nextSibling.dataset,s)var l=s.dgst;s=l,r=Error(G(419)),r.stack="",r.digest=s,Ju({value:r,source:null,stack:null}),t=og(e,t,n)}else if(Vt||cl(e,t,n,!1),s=(n&e.childLanes)!==0,Vt||s){if(s=tt,s!==null){if(r=n&-n,r&42)r=1;else switch(r){case 2:r=1;break;case 8:r=4;break;case 32:r=16;break;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:r=64;break;case 268435456:r=134217728;break;default:r=0}if(r=r&(s.suspendedLanes|n)?0:r,r!==0&&r!==u.retryLane)throw u.retryLane=r,Xa(e,r),vn(s,e,r),nw}o.data==="$?"||Ig(),t=og(e,t,n)}else o.data==="$?"?(t.flags|=128,t.child=e.child,t=p5.bind(null,e),o._reactRetry=t,t=null):(e=u.treeContext,Kt=_r(o.nextSibling),bn=t,ze=!0,wr=null,Ur=!1,e!==null&&(nr[rr++]=oa,nr[rr++]=ua,nr[rr++]=rs,oa=e.id,ua=e.overflow,rs=t),t=ig(t,r.children),t.flags|=4096);return t}return a?(Ka(),a=r.fallback,o=t.mode,u=e.child,l=u.sibling,r=si(u,{mode:"hidden",children:r.children}),r.subtreeFlags=u.subtreeFlags&31457280,l!==null?a=si(l,a):(a=ms(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===null?o=rg(n):(u=o.cachePool,u!==null?(l=Bt._currentValue,u=u.parent!==l?{parent:l,pool:l}:u):u=fE(),o={baseLanes:o.baseLanes|n,cachePool:u}),a.memoizedState=o,a.childLanes=ag(e,s,n),t.memoizedState=ng,r):(Wa(t),n=e.child,e=n.sibling,n=si(n,{mode:"visible",children:r.children}),n.return=t,n.sibling=null,e!==null&&(s=t.deletions,s===null?(t.deletions=[e],t.flags|=16):s.push(e)),t.child=n,t.memoizedState=null,n)}function ig(e,t){return t=sg({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function sg(e,t){return Bw(e,t,0,null)}function og(e,t,n){return ss(t,e.child,null,n),e=ig(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function fw(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),dg(e.return,t,n)}function ug(e,t,n,r,a){var i=e.memoizedState;i===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:a}:(i.isBackwards=t,i.rendering=null,i.renderingStartTime=0,i.last=r,i.tail=n,i.tailMode=a)}function pw(e,t,n){var r=t.pendingProps,a=r.revealOrder,i=r.tail;if(Qt(e,t,r.children,n),r=Pt.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&&fw(e,n,t);else if(e.tag===19)fw(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}switch(lt(Pt,r),a){case"forwards":for(n=t.child,a=null;n!==null;)e=n.alternate,e!==null&&Pd(e)===null&&(a=n),n=n.sibling;n=a,n===null?(a=t.child,t.child=null):(a=n.sibling,n.sibling=null),ug(t,!1,a,n,i);break;case"backwards":for(n=null,a=t.child,t.child=null;a!==null;){if(e=a.alternate,e!==null&&Pd(e)===null){t.child=a;break}e=a.sibling,a.sibling=n,n=a,a=e}ug(t,!0,n,null,i);break;case"together":ug(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function da(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),oi|=t.lanes,!(n&t.childLanes))if(e!==null){if(cl(e,t,n,!1),(n&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(G(153));if(t.child!==null){for(e=t.child,n=si(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=si(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function lg(e,t){return e.lanes&t?!0:(e=e.dependencies,!!(e!==null&&Xd(e)))}function JM(e,t,n){switch(t.tag){case 3:cd(t,t.stateNode.containerInfo),Ja(t,Bt,e.memoizedState.cache),Zu();break;case 27:case 5:Jh(t);break;case 4:cd(t,t.stateNode.containerInfo);break;case 10:Ja(t,t.type,t.memoizedProps.value);break;case 13:var r=t.memoizedState;if(r!==null)return r.dehydrated!==null?(Wa(t),t.flags|=128,null):n&t.child.childLanes?dw(e,t,n):(Wa(t),e=da(e,t,n),e!==null?e.sibling:null);Wa(t);break;case 19:var a=(e.flags&128)!==0;if(r=(n&t.childLanes)!==0,r||(cl(e,t,n,!1),r=(n&t.childLanes)!==0),a){if(r)return pw(e,t,n);t.flags|=128}if(a=t.memoizedState,a!==null&&(a.rendering=null,a.tail=null,a.lastEffect=null),lt(Pt,Pt.current),r)break;return null;case 22:case 23:return t.lanes=0,sw(e,t,n);case 24:Ja(t,Bt,e.memoizedState.cache)}return da(e,t,n)}function hw(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps)Vt=!0;else{if(!lg(e,n)&&!(t.flags&128))return Vt=!1,JM(e,t,n);Vt=!!(e.flags&131072)}else Vt=!1,ze&&t.flags&1048576&&Zx(t,Nd,t.index);switch(t.lanes=0,t.tag){case 16:e:{e=t.pendingProps;var r=t.elementType,a=r._init;if(r=a(r._payload),t.type=r,typeof r=="function")Tg(r)?(e=ds(r,e),t.tag=1,t=lw(null,t,r,e,n)):(t.tag=0,t=tg(null,t,r,e,n));else{if(r!=null){if(a=r.$$typeof,a===Yh){t.tag=11,t=rw(null,t,r,e,n);break e}else if(a===$h){t.tag=14,t=aw(null,t,r,e,n);break e}}throw t=Xh(r)||r,Error(G(306,t,""))}}return t;case 0:return tg(e,t,t.type,t.pendingProps,n);case 1:return r=t.type,a=ds(r,t.pendingProps),lw(e,t,r,a,n);case 3:e:{if(cd(t,t.stateNode.containerInfo),e===null)throw Error(G(387));var i=t.pendingProps;a=t.memoizedState,r=a.element,hg(e,t),pl(t,i,null,n);var s=t.memoizedState;if(i=s.cache,Ja(t,Bt,i),i!==a.cache&&fg(t,[Bt],n,!0),fl(),i=s.element,a.isDehydrated)if(a={element:i,isDehydrated:!1,cache:s.cache},t.updateQueue.baseState=a,t.memoizedState=a,t.flags&256){t=cw(e,t,i,n);break e}else if(i!==r){r=tr(Error(G(424)),t),Ju(r),t=cw(e,t,i,n);break e}else for(Kt=_r(t.stateNode.containerInfo.firstChild),bn=t,ze=!0,wr=null,Ur=!0,n=oE(t,null,i,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Zu(),i===r){t=da(e,t,n);break e}Qt(e,t,i,n)}t=t.child}return t;case 26:return ll(e,t),e===null?(n=bT(t.type,null,t.pendingProps,null))?t.memoizedState=n:ze||(n=t.type,e=t.pendingProps,r=df(Ya.current).createElement(n),r[rn]=t,r[Tn]=e,Zt(r,n,e),zt(r),t.stateNode=r):t.memoizedState=bT(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return Jh(t),e===null&&ze&&(r=t.stateNode=hT(t.type,t.pendingProps,Ya.current),bn=t,Ur=!0,Kt=_r(r.firstChild)),r=t.pendingProps.children,e!==null||ze?Qt(e,t,r,n):t.child=ss(t,null,r,n),ll(e,t),t.child;case 5:return e===null&&ze&&((a=r=Kt)&&(r=R5(r,t.type,t.pendingProps,Ur),r!==null?(t.stateNode=r,bn=t,Kt=_r(r.firstChild),Ur=!1,a=!0):a=!1),a||is(t)),Jh(t),a=t.type,i=t.pendingProps,s=e!==null?e.memoizedProps:null,r=i.children,Wg(a,i)?r=null:s!==null&&Wg(a,s)&&(t.flags|=32),t.memoizedState!==null&&(a=Bm(e,t,GM,null,null,n),kl._currentValue=a),ll(e,t),Qt(e,t,r,n),t.child;case 6:return e===null&&ze&&((e=n=Kt)&&(n=O5(n,t.pendingProps,Ur),n!==null?(t.stateNode=n,bn=t,Kt=null,e=!0):e=!1),e||is(t)),null;case 13:return dw(e,t,n);case 4:return cd(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=ss(t,null,r,n):Qt(e,t,r,n),t.child;case 11:return rw(e,t,t.type,t.pendingProps,n);case 7:return Qt(e,t,t.pendingProps,n),t.child;case 8:return Qt(e,t,t.pendingProps.children,n),t.child;case 12:return Qt(e,t,t.pendingProps.children,n),t.child;case 10:return r=t.pendingProps,Ja(t,t.type,r.value),Qt(e,t,r.children,n),t.child;case 9:return a=t.type._context,r=t.pendingProps.children,ps(t),a=an(a),r=r(a),t.flags|=1,Qt(e,t,r,n),t.child;case 14:return aw(e,t,t.type,t.pendingProps,n);case 15:return iw(e,t,t.type,t.pendingProps,n);case 19:return pw(e,t,n);case 22:return sw(e,t,n);case 24:return ps(t),r=an(Bt),e===null?(a=Im(),a===null&&(a=tt,i=Mm(),a.pooledCache=i,i.refCount++,i!==null&&(a.pooledCacheLanes|=n),a=i),t.memoizedState={parent:r,cache:a},pg(t),Ja(t,Bt,a)):(e.lanes&n&&(hg(e,t),pl(t,null,null,n),fl()),a=e.memoizedState,i=t.memoizedState,a.parent!==r?(a={parent:r,cache:r},t.memoizedState=a,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=a),Ja(t,Bt,r)):(r=i.cache,Ja(t,Bt,r),r!==a.cache&&fg(t,[Bt],n,!0))),Qt(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(G(156,t.tag))}var cg=Ir(null),fs=null,fa=null;function Ja(e,t,n){lt(cg,t._currentValue),t._currentValue=n}function pa(e){e._currentValue=cg.current,Ht(cg)}function dg(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 fg(e,t,n,r){var a=e.child;for(a!==null&&(a.return=e);a!==null;){var i=a.dependencies;if(i!==null){var s=a.child;i=i.firstContext;e:for(;i!==null;){var o=i;i=a;for(var u=0;u<t.length;u++)if(o.context===t[u]){i.lanes|=n,o=i.alternate,o!==null&&(o.lanes|=n),dg(i.return,n,e),r||(s=null);break e}i=o.next}}else if(a.tag===18){if(s=a.return,s===null)throw Error(G(341));s.lanes|=n,i=s.alternate,i!==null&&(i.lanes|=n),dg(s,n,e),s=null}else s=a.child;if(s!==null)s.return=a;else for(s=a;s!==null;){if(s===e){s=null;break}if(a=s.sibling,a!==null){a.return=s.return,s=a;break}s=s.return}a=s}}function cl(e,t,n,r){e=null;for(var a=t,i=!1;a!==null;){if(!i){if(a.flags&524288)i=!0;else if(a.flags&262144)break}if(a.tag===10){var s=a.alternate;if(s===null)throw Error(G(387));if(s=s.memoizedProps,s!==null){var o=a.type;In(a.pendingProps.value,s.value)||(e!==null?e.push(o):e=[o])}}else if(a===ld.current){if(s=a.alternate,s===null)throw Error(G(387));s.memoizedState.memoizedState!==a.memoizedState.memoizedState&&(e!==null?e.push(kl):e=[kl])}a=a.return}e!==null&&fg(t,e,n,r),t.flags|=262144}function Xd(e){for(e=e.firstContext;e!==null;){if(!In(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function ps(e){fs=e,fa=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function an(e){return mw(fs,e)}function Wd(e,t){return fs===null&&ps(e),mw(e,t)}function mw(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},fa===null){if(e===null)throw Error(G(308));fa=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else fa=fa.next=t;return n}var ei=!1;function pg(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function hg(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function ti(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function ni(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,mt&2){var a=r.pending;return a===null?t.next=t:(t.next=a.next,a.next=t),r.pending=t,t=Rd(e),Kx(e,null,n),t}return kd(e,r,t,n),Rd(e)}function dl(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194176)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,ax(e,n)}}function mg(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var a=null,i=null;if(n=n.firstBaseUpdate,n!==null){do{var s={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};i===null?a=i=s:i=i.next=s,n=n.next}while(n!==null);i===null?a=i=t:i=i.next=t}else a=i=t;n={baseState:r.baseState,firstBaseUpdate:a,lastBaseUpdate:i,shared:r.shared,callbacks:r.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var gg=!1;function fl(){if(gg){var e=mo;if(e!==null)throw e}}function pl(e,t,n,r){gg=!1;var a=e.updateQueue;ei=!1;var i=a.firstBaseUpdate,s=a.lastBaseUpdate,o=a.shared.pending;if(o!==null){a.shared.pending=null;var u=o,l=u.next;u.next=null,s===null?i=l:s.next=l,s=u;var c=e.alternate;c!==null&&(c=c.updateQueue,o=c.lastBaseUpdate,o!==s&&(o===null?c.firstBaseUpdate=l:o.next=l,c.lastBaseUpdate=u))}if(i!==null){var d=a.baseState;s=0,c=l=u=null,o=i;do{var f=o.lane&-536870913,p=f!==o.lane;if(p?(Ue&f)===f:(r&f)===f){f!==0&&f===ho&&(gg=!0),c!==null&&(c=c.next={lane:0,tag:o.tag,payload:o.payload,callback:null,next:null});e:{var g=e,v=o;f=t;var w=n;switch(v.tag){case 1:if(g=v.payload,typeof g=="function"){d=g.call(w,d,f);break e}d=g;break e;case 3:g.flags=g.flags&-65537|128;case 0:if(g=v.payload,f=typeof g=="function"?g.call(w,d,f):g,f==null)break e;d=it({},d,f);break e;case 2:ei=!0}}f=o.callback,f!==null&&(e.flags|=64,p&&(e.flags|=8192),p=a.callbacks,p===null?a.callbacks=[f]:p.push(f))}else p={lane:f,tag:o.tag,payload:o.payload,callback:o.callback,next:null},c===null?(l=c=p,u=d):c=c.next=p,s|=f;if(o=o.next,o===null){if(o=a.shared.pending,o===null)break;p=o,o=p.next,p.next=null,a.lastBaseUpdate=p,a.shared.pending=null}}while(!0);c===null&&(u=d),a.baseState=u,a.firstBaseUpdate=l,a.lastBaseUpdate=c,i===null&&(a.shared.lanes=0),oi|=s,e.lanes=s,e.memoizedState=d}}function gw(e,t){if(typeof e!="function")throw Error(G(191,e));e.call(t)}function bw(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)gw(n[e],t)}function hl(e,t){try{var n=t.updateQueue,r=n!==null?n.lastEffect:null;if(r!==null){var a=r.next;n=a;do{if((n.tag&e)===e){r=void 0;var i=n.create,s=n.inst;r=i(),s.destroy=r}n=n.next}while(n!==a)}}catch(o){Ze(t,t.return,o)}}function ri(e,t,n){try{var r=t.updateQueue,a=r!==null?r.lastEffect:null;if(a!==null){var i=a.next;r=i;do{if((r.tag&e)===e){var s=r.inst,o=s.destroy;if(o!==void 0){s.destroy=void 0,a=t;var u=n;try{o()}catch(l){Ze(a,u,l)}}}r=r.next}while(r!==i)}}catch(l){Ze(t,t.return,l)}}function vw(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{bw(t,n)}catch(r){Ze(e,e.return,r)}}}function yw(e,t,n){n.props=ds(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(r){Ze(e,t,r)}}function hs(e,t){try{var n=e.ref;if(n!==null){var r=e.stateNode;switch(e.tag){case 26:case 27:case 5:var a=r;break;default:a=r}typeof n=="function"?e.refCleanup=n(a):n.current=a}}catch(i){Ze(e,t,i)}}function Pn(e,t){var n=e.ref,r=e.refCleanup;if(n!==null)if(typeof r=="function")try{r()}catch(a){Ze(e,t,a)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n=="function")try{n(null)}catch(a){Ze(e,t,a)}else n.current=null}function xw(e){var t=e.type,n=e.memoizedProps,r=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":n.autoFocus&&r.focus();break e;case"img":n.src?r.src=n.src:n.srcSet&&(r.srcset=n.srcSet)}}catch(a){Ze(e,e.return,a)}}function Ew(e,t,n){try{var r=e.stateNode;_5(r,e.type,n,t),r[Tn]=t}catch(a){Ze(e,e.return,a)}}function ww(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27||e.tag===4}function bg(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||ww(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==27&&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 vg(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=cf));else if(r!==4&&r!==27&&(e=e.child,e!==null))for(vg(e,t,n),e=e.sibling;e!==null;)vg(e,t,n),e=e.sibling}function Kd(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&&r!==27&&(e=e.child,e!==null))for(Kd(e,t,n),e=e.sibling;e!==null;)Kd(e,t,n),e=e.sibling}var ha=!1,xt=!1,yg=!1,Tw=typeof WeakSet=="function"?WeakSet:Set,Yt=null,_w=!1;function e5(e,t){if(e=e.containerInfo,$g=bf,e=Hx(e),Em(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 a=r.anchorOffset,i=r.focusNode;r=r.focusOffset;try{n.nodeType,i.nodeType}catch{n=null;break e}var s=0,o=-1,u=-1,l=0,c=0,d=e,f=null;t:for(;;){for(var p;d!==n||a!==0&&d.nodeType!==3||(o=s+a),d!==i||r!==0&&d.nodeType!==3||(u=s+r),d.nodeType===3&&(s+=d.nodeValue.length),(p=d.firstChild)!==null;)f=d,d=p;for(;;){if(d===e)break t;if(f===n&&++l===a&&(o=s),f===i&&++c===r&&(u=s),(p=d.nextSibling)!==null)break;d=f,f=d.parentNode}d=p}n=o===-1||u===-1?null:{start:o,end:u}}else n=null}n=n||{start:0,end:0}}else n=null;for(Xg={focusedElem:e,selectionRange:n},bf=!1,Yt=t;Yt!==null;)if(t=Yt,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Yt=e;else for(;Yt!==null;){switch(t=Yt,i=t.alternate,e=t.flags,t.tag){case 0:break;case 11:case 15:break;case 1:if(e&1024&&i!==null){e=void 0,n=t,a=i.memoizedProps,i=i.memoizedState,r=n.stateNode;try{var g=ds(n.type,a,n.elementType===n.type);e=r.getSnapshotBeforeUpdate(g,i),r.__reactInternalSnapshotBeforeUpdate=e}catch(v){Ze(n,n.return,v)}}break;case 3:if(e&1024){if(e=t.stateNode.containerInfo,n=e.nodeType,n===9)Zg(e);else if(n===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Zg(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if(e&1024)throw Error(G(163))}if(e=t.sibling,e!==null){e.return=t.return,Yt=e;break}Yt=t.return}return g=_w,_w=!1,g}function Sw(e,t,n){var r=n.flags;switch(n.tag){case 0:case 11:case 15:ga(e,n),r&4&&hl(5,n);break;case 1:if(ga(e,n),r&4)if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(o){Ze(n,n.return,o)}else{var a=ds(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(a,t,e.__reactInternalSnapshotBeforeUpdate)}catch(o){Ze(n,n.return,o)}}r&64&&vw(n),r&512&&hs(n,n.return);break;case 3:if(ga(e,n),r&64&&(r=n.updateQueue,r!==null)){if(e=null,n.child!==null)switch(n.child.tag){case 27:case 5:e=n.child.stateNode;break;case 1:e=n.child.stateNode}try{bw(r,e)}catch(o){Ze(n,n.return,o)}}break;case 26:ga(e,n),r&512&&hs(n,n.return);break;case 27:case 5:ga(e,n),t===null&&r&4&&xw(n),r&512&&hs(n,n.return);break;case 12:ga(e,n);break;case 13:ga(e,n),r&4&&kw(e,n);break;case 22:if(a=n.memoizedState!==null||ha,!a){t=t!==null&&t.memoizedState!==null||xt;var i=ha,s=xt;ha=a,(xt=t)&&!s?ai(e,n,(n.subtreeFlags&8772)!==0):ga(e,n),ha=i,xt=s}r&512&&(n.memoizedProps.mode==="manual"?hs(n,n.return):Pn(n,n.return));break;default:ga(e,n)}}function Aw(e){var t=e.alternate;t!==null&&(e.alternate=null,Aw(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&im(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var Dt=null,Bn=!1;function ma(e,t,n){for(n=n.child;n!==null;)Cw(e,t,n),n=n.sibling}function Cw(e,t,n){if(Mn&&typeof Mn.onCommitFiberUnmount=="function")try{Mn.onCommitFiberUnmount(Bu,n)}catch{}switch(n.tag){case 26:xt||Pn(n,t),ma(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:xt||Pn(n,t);var r=Dt,a=Bn;for(Dt=n.stateNode,ma(e,t,n),n=n.stateNode,t=n.attributes;t.length;)n.removeAttributeNode(t[0]);im(n),Dt=r,Bn=a;break;case 5:xt||Pn(n,t);case 6:a=Dt;var i=Bn;if(Dt=null,ma(e,t,n),Dt=a,Bn=i,Dt!==null)if(Bn)try{e=Dt,r=n.stateNode,e.nodeType===8?e.parentNode.removeChild(r):e.removeChild(r)}catch(s){Ze(n,t,s)}else try{Dt.removeChild(n.stateNode)}catch(s){Ze(n,t,s)}break;case 18:Dt!==null&&(Bn?(t=Dt,n=n.stateNode,t.nodeType===8?Qg(t.parentNode,n):t.nodeType===1&&Qg(t,n),Dl(t)):Qg(Dt,n.stateNode));break;case 4:r=Dt,a=Bn,Dt=n.stateNode.containerInfo,Bn=!0,ma(e,t,n),Dt=r,Bn=a;break;case 0:case 11:case 14:case 15:xt||ri(2,n,t),xt||ri(4,n,t),ma(e,t,n);break;case 1:xt||(Pn(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"&&yw(n,t,r)),ma(e,t,n);break;case 21:ma(e,t,n);break;case 22:xt||Pn(n,t),xt=(r=xt)||n.memoizedState!==null,ma(e,t,n),xt=r;break;default:ma(e,t,n)}}function kw(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Dl(e)}catch(n){Ze(t,t.return,n)}}function t5(e){switch(e.tag){case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new Tw),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new Tw),t;default:throw Error(G(435,e.tag))}}function xg(e,t){var n=t5(e);t.forEach(function(r){var a=h5.bind(null,e,r);n.has(r)||(n.add(r),r.then(a,a))})}function ir(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var a=n[r],i=e,s=t,o=s;e:for(;o!==null;){switch(o.tag){case 27:case 5:Dt=o.stateNode,Bn=!1;break e;case 3:Dt=o.stateNode.containerInfo,Bn=!0;break e;case 4:Dt=o.stateNode.containerInfo,Bn=!0;break e}o=o.return}if(Dt===null)throw Error(G(160));Cw(i,s,a),Dt=null,Bn=!1,i=a.alternate,i!==null&&(i.return=null),a.return=null}if(t.subtreeFlags&13878)for(t=t.child;t!==null;)Rw(t,e),t=t.sibling}var Tr=null;function Rw(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:ir(t,e),sr(e),r&4&&(ri(3,e,e.return),hl(3,e),ri(5,e,e.return));break;case 1:ir(t,e),sr(e),r&512&&(xt||n===null||Pn(n,n.return)),r&64&&ha&&(e=e.updateQueue,e!==null&&(r=e.callbacks,r!==null&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=n===null?r:n.concat(r))));break;case 26:var a=Tr;if(ir(t,e),sr(e),r&512&&(xt||n===null||Pn(n,n.return)),r&4){var i=n!==null?n.memoizedState:null;if(r=e.memoizedState,n===null)if(r===null)if(e.stateNode===null){e:{r=e.type,n=e.memoizedProps,a=a.ownerDocument||a;t:switch(r){case"title":i=a.getElementsByTagName("title")[0],(!i||i[ju]||i[rn]||i.namespaceURI==="http://www.w3.org/2000/svg"||i.hasAttribute("itemprop"))&&(i=a.createElement(r),a.head.insertBefore(i,a.querySelector("head > title"))),Zt(i,r,n),i[rn]=e,zt(i),r=i;break e;case"link":var s=xT("link","href",a).get(r+(n.href||""));if(s){for(var o=0;o<s.length;o++)if(i=s[o],i.getAttribute("href")===(n.href==null?null:n.href)&&i.getAttribute("rel")===(n.rel==null?null:n.rel)&&i.getAttribute("title")===(n.title==null?null:n.title)&&i.getAttribute("crossorigin")===(n.crossOrigin==null?null:n.crossOrigin)){s.splice(o,1);break t}}i=a.createElement(r),Zt(i,r,n),a.head.appendChild(i);break;case"meta":if(s=xT("meta","content",a).get(r+(n.content||""))){for(o=0;o<s.length;o++)if(i=s[o],i.getAttribute("content")===(n.content==null?null:""+n.content)&&i.getAttribute("name")===(n.name==null?null:n.name)&&i.getAttribute("property")===(n.property==null?null:n.property)&&i.getAttribute("http-equiv")===(n.httpEquiv==null?null:n.httpEquiv)&&i.getAttribute("charset")===(n.charSet==null?null:n.charSet)){s.splice(o,1);break t}}i=a.createElement(r),Zt(i,r,n),a.head.appendChild(i);break;default:throw Error(G(468,r))}i[rn]=e,zt(i),r=i}e.stateNode=r}else ET(a,e.type,e.stateNode);else e.stateNode=yT(a,r,e.memoizedProps);else i!==r?(i===null?n.stateNode!==null&&(n=n.stateNode,n.parentNode.removeChild(n)):i.count--,r===null?ET(a,e.type,e.stateNode):yT(a,r,e.memoizedProps)):r===null&&e.stateNode!==null&&Ew(e,e.memoizedProps,n.memoizedProps)}break;case 27:if(r&4&&e.alternate===null){a=e.stateNode,i=e.memoizedProps;try{for(var u=a.firstChild;u;){var l=u.nextSibling,c=u.nodeName;u[ju]||c==="HEAD"||c==="BODY"||c==="SCRIPT"||c==="STYLE"||c==="LINK"&&u.rel.toLowerCase()==="stylesheet"||a.removeChild(u),u=l}for(var d=e.type,f=a.attributes;f.length;)a.removeAttributeNode(f[0]);Zt(a,d,i),a[rn]=e,a[Tn]=i}catch(g){Ze(e,e.return,g)}}case 5:if(ir(t,e),sr(e),r&512&&(xt||n===null||Pn(n,n.return)),e.flags&32){a=e.stateNode;try{to(a,"")}catch(g){Ze(e,e.return,g)}}r&4&&e.stateNode!=null&&(a=e.memoizedProps,Ew(e,a,n!==null?n.memoizedProps:a)),r&1024&&(yg=!0);break;case 6:if(ir(t,e),sr(e),r&4){if(e.stateNode===null)throw Error(G(162));r=e.memoizedProps,n=e.stateNode;try{n.nodeValue=r}catch(g){Ze(e,e.return,g)}}break;case 3:if(hf=null,a=Tr,Tr=ff(t.containerInfo),ir(t,e),Tr=a,sr(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Dl(t.containerInfo)}catch(g){Ze(e,e.return,g)}yg&&(yg=!1,Ow(e));break;case 4:r=Tr,Tr=ff(e.stateNode.containerInfo),ir(t,e),sr(e),Tr=r;break;case 12:ir(t,e),sr(e);break;case 13:ir(t,e),sr(e),e.child.flags&8192&&e.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&(Rg=Br()),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,xg(e,r)));break;case 22:if(r&512&&(xt||n===null||Pn(n,n.return)),u=e.memoizedState!==null,l=n!==null&&n.memoizedState!==null,c=ha,d=xt,ha=c||u,xt=d||l,ir(t,e),xt=d,ha=c,sr(e),t=e.stateNode,t._current=e,t._visibility&=-3,t._visibility|=t._pendingVisibility&2,r&8192&&(t._visibility=u?t._visibility&-2:t._visibility|1,u&&(t=ha||xt,n===null||l||t||yo(e)),e.memoizedProps===null||e.memoizedProps.mode!=="manual"))e:for(n=null,t=e;;){if(t.tag===5||t.tag===26||t.tag===27){if(n===null){l=n=t;try{if(a=l.stateNode,u)i=a.style,typeof i.setProperty=="function"?i.setProperty("display","none","important"):i.display="none";else{s=l.stateNode,o=l.memoizedProps.style;var p=o!=null&&o.hasOwnProperty("display")?o.display:null;s.style.display=p==null||typeof p=="boolean"?"":(""+p).trim()}}catch(g){Ze(l,l.return,g)}}}else if(t.tag===6){if(n===null){l=t;try{l.stateNode.nodeValue=u?"":l.memoizedProps}catch(g){Ze(l,l.return,g)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;n===t&&(n=null),t=t.return}n===t&&(n=null),t.sibling.return=t.return,t=t.sibling}r&4&&(r=e.updateQueue,r!==null&&(n=r.retryQueue,n!==null&&(r.retryQueue=null,xg(e,n))));break;case 19:ir(t,e),sr(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,xg(e,r)));break;case 21:break;default:ir(t,e),sr(e)}}function sr(e){var t=e.flags;if(t&2){try{if(e.tag!==27){e:{for(var n=e.return;n!==null;){if(ww(n)){var r=n;break e}n=n.return}throw Error(G(160))}switch(r.tag){case 27:var a=r.stateNode,i=bg(e);Kd(e,i,a);break;case 5:var s=r.stateNode;r.flags&32&&(to(s,""),r.flags&=-33);var o=bg(e);Kd(e,o,s);break;case 3:case 4:var u=r.stateNode.containerInfo,l=bg(e);vg(e,l,u);break;default:throw Error(G(161))}}}catch(c){Ze(e,e.return,c)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Ow(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Ow(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function ga(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)Sw(e,t.alternate,t),t=t.sibling}function yo(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:ri(4,t,t.return),yo(t);break;case 1:Pn(t,t.return);var n=t.stateNode;typeof n.componentWillUnmount=="function"&&yw(t,t.return,n),yo(t);break;case 26:case 27:case 5:Pn(t,t.return),yo(t);break;case 22:Pn(t,t.return),t.memoizedState===null&&yo(t);break;default:yo(t)}e=e.sibling}}function ai(e,t,n){for(n=n&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var r=t.alternate,a=e,i=t,s=i.flags;switch(i.tag){case 0:case 11:case 15:ai(a,i,n),hl(4,i);break;case 1:if(ai(a,i,n),r=i,a=r.stateNode,typeof a.componentDidMount=="function")try{a.componentDidMount()}catch(l){Ze(r,r.return,l)}if(r=i,a=r.updateQueue,a!==null){var o=r.stateNode;try{var u=a.shared.hiddenCallbacks;if(u!==null)for(a.shared.hiddenCallbacks=null,a=0;a<u.length;a++)gw(u[a],o)}catch(l){Ze(r,r.return,l)}}n&&s&64&&vw(i),hs(i,i.return);break;case 26:case 27:case 5:ai(a,i,n),n&&r===null&&s&4&&xw(i),hs(i,i.return);break;case 12:ai(a,i,n);break;case 13:ai(a,i,n),n&&s&4&&kw(a,i);break;case 22:i.memoizedState===null&&ai(a,i,n),hs(i,i.return);break;default:ai(a,i,n)}t=t.sibling}}function Eg(e,t){var n=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==n&&(e!=null&&e.refCount++,n!=null&&al(n))}function wg(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&al(e))}function ii(e,t,n,r){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Nw(e,t,n,r),t=t.sibling}function Nw(e,t,n,r){var a=t.flags;switch(t.tag){case 0:case 11:case 15:ii(e,t,n,r),a&2048&&hl(9,t);break;case 3:ii(e,t,n,r),a&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&al(e)));break;case 12:if(a&2048){ii(e,t,n,r),e=t.stateNode;try{var i=t.memoizedProps,s=i.id,o=i.onPostCommit;typeof o=="function"&&o(s,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(u){Ze(t,t.return,u)}}else ii(e,t,n,r);break;case 23:break;case 22:i=t.stateNode,t.memoizedState!==null?i._visibility&4?ii(e,t,n,r):ml(e,t):i._visibility&4?ii(e,t,n,r):(i._visibility|=4,xo(e,t,n,r,(t.subtreeFlags&10256)!==0)),a&2048&&Eg(t.alternate,t);break;case 24:ii(e,t,n,r),a&2048&&wg(t.alternate,t);break;default:ii(e,t,n,r)}}function xo(e,t,n,r,a){for(a=a&&(t.subtreeFlags&10256)!==0,t=t.child;t!==null;){var i=e,s=t,o=n,u=r,l=s.flags;switch(s.tag){case 0:case 11:case 15:xo(i,s,o,u,a),hl(8,s);break;case 23:break;case 22:var c=s.stateNode;s.memoizedState!==null?c._visibility&4?xo(i,s,o,u,a):ml(i,s):(c._visibility|=4,xo(i,s,o,u,a)),a&&l&2048&&Eg(s.alternate,s);break;case 24:xo(i,s,o,u,a),a&&l&2048&&wg(s.alternate,s);break;default:xo(i,s,o,u,a)}t=t.sibling}}function ml(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var n=e,r=t,a=r.flags;switch(r.tag){case 22:ml(n,r),a&2048&&Eg(r.alternate,r);break;case 24:ml(n,r),a&2048&&wg(r.alternate,r);break;default:ml(n,r)}t=t.sibling}}var gl=8192;function Eo(e){if(e.subtreeFlags&gl)for(e=e.child;e!==null;)Dw(e),e=e.sibling}function Dw(e){switch(e.tag){case 26:Eo(e),e.flags&gl&&e.memoizedState!==null&&V5(Tr,e.memoizedState,e.memoizedProps);break;case 5:Eo(e);break;case 3:case 4:var t=Tr;Tr=ff(e.stateNode.containerInfo),Eo(e),Tr=t;break;case 22:e.memoizedState===null&&(t=e.alternate,t!==null&&t.memoizedState!==null?(t=gl,gl=16777216,Eo(e),gl=t):Eo(e));break;default:Eo(e)}}function Mw(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function bl(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];Yt=r,Iw(r,e)}Mw(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Lw(e),e=e.sibling}function Lw(e){switch(e.tag){case 0:case 11:case 15:bl(e),e.flags&2048&&ri(9,e,e.return);break;case 3:bl(e);break;case 12:bl(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&4&&(e.return===null||e.return.tag!==13)?(t._visibility&=-5,Qd(e)):bl(e);break;default:bl(e)}}function Qd(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];Yt=r,Iw(r,e)}Mw(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:ri(8,t,t.return),Qd(t);break;case 22:n=t.stateNode,n._visibility&4&&(n._visibility&=-5,Qd(t));break;default:Qd(t)}e=e.sibling}}function Iw(e,t){for(;Yt!==null;){var n=Yt;switch(n.tag){case 0:case 11:case 15:ri(8,n,t);break;case 23:case 22:if(n.memoizedState!==null&&n.memoizedState.cachePool!==null){var r=n.memoizedState.cachePool.pool;r!=null&&r.refCount++}break;case 24:al(n.memoizedState.cache)}if(r=n.child,r!==null)r.return=n,Yt=r;else e:for(n=e;Yt!==null;){r=Yt;var a=r.sibling,i=r.return;if(Aw(r),r===n){Yt=null;break e}if(a!==null){a.return=i,Yt=a;break e}Yt=i}}}function n5(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.refCleanup=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 or(e,t,n,r){return new n5(e,t,n,r)}function Tg(e){return e=e.prototype,!(!e||!e.isReactComponent)}function si(e,t){var n=e.alternate;return n===null?(n=or(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&31457280,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.refCleanup=e.refCleanup,n}function Pw(e,t){e.flags&=31457282;var n=e.alternate;return n===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=n.childLanes,e.lanes=n.lanes,e.child=n.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type,t=n.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function Zd(e,t,n,r,a,i){var s=0;if(r=e,typeof e=="function")Tg(e)&&(s=1);else if(typeof e=="string")s=H5(e,n,Pr.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case Gs:return ms(n.children,a,i,t);case Vy:s=8,a|=24;break;case Vh:return e=or(12,n,t,a|2),e.elementType=Vh,e.lanes=i,e;case qh:return e=or(13,n,t,a),e.elementType=qh,e.lanes=i,e;case Gh:return e=or(19,n,t,a),e.elementType=Gh,e.lanes=i,e;case qy:return Bw(n,a,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case C4:case aa:s=10;break e;case Yy:s=9;break e;case Yh:s=11;break e;case $h:s=14;break e;case Va:s=16,r=null;break e}s=29,n=Error(G(130,e===null?"null":typeof e,"")),r=null}return t=or(s,n,t,a),t.elementType=e,t.type=r,t.lanes=i,t}function ms(e,t,n,r){return e=or(7,e,r,t),e.lanes=n,e}function Bw(e,t,n,r){e=or(22,e,r,t),e.elementType=qy,e.lanes=n;var a={_visibility:1,_pendingVisibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null,_current:null,detach:function(){var i=a._current;if(i===null)throw Error(G(456));if(!(a._pendingVisibility&2)){var s=Xa(i,2);s!==null&&(a._pendingVisibility|=2,vn(s,i,2))}},attach:function(){var i=a._current;if(i===null)throw Error(G(456));if(a._pendingVisibility&2){var s=Xa(i,2);s!==null&&(a._pendingVisibility&=-3,vn(s,i,2))}}};return e.stateNode=a,e}function _g(e,t,n){return e=or(6,e,null,t),e.lanes=n,e}function Sg(e,t,n){return t=or(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function ba(e){e.flags|=4}function Uw(e,t){if(t.type!=="stylesheet"||t.state.loading&4)e.flags&=-16777217;else if(e.flags|=16777216,!wT(t)){if(t=ar.current,t!==null&&((Ue&4194176)===Ue?Fr!==null:(Ue&62914560)!==Ue&&!(Ue&536870912)||t!==Fr))throw tl=Om,tE;e.flags|=8192}}function Jd(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?nx():536870912,e.lanes|=t,To|=t)}function vl(e,t){if(!ze)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 ht(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var a=e.child;a!==null;)n|=a.lanes|a.childLanes,r|=a.subtreeFlags&31457280,r|=a.flags&31457280,a.return=e,a=a.sibling;else for(a=e.child;a!==null;)n|=a.lanes|a.childLanes,r|=a.subtreeFlags,r|=a.flags,a.return=e,a=a.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function r5(e,t,n){var r=t.pendingProps;switch(km(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return ht(t),null;case 1:return ht(t),null;case 3:return n=t.stateNode,r=null,e!==null&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),pa(Bt),Ws(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(Qu(t)?ba(t):e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,wr!==null&&(Mg(wr),wr=null))),ht(t),null;case 26:return n=t.memoizedState,e===null?(ba(t),n!==null?(ht(t),Uw(t,n)):(ht(t),t.flags&=-16777217)):n?n!==e.memoizedState?(ba(t),ht(t),Uw(t,n)):(ht(t),t.flags&=-16777217):(e.memoizedProps!==r&&ba(t),ht(t),t.flags&=-16777217),null;case 27:dd(t),n=Ya.current;var a=t.type;if(e!==null&&t.stateNode!=null)e.memoizedProps!==r&&ba(t);else{if(!r){if(t.stateNode===null)throw Error(G(166));return ht(t),null}e=Pr.current,Qu(t)?Jx(t):(e=hT(a,r,n),t.stateNode=e,ba(t))}return ht(t),null;case 5:if(dd(t),n=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&ba(t);else{if(!r){if(t.stateNode===null)throw Error(G(166));return ht(t),null}if(e=Pr.current,Qu(t))Jx(t);else{switch(a=df(Ya.current),e){case 1:e=a.createElementNS("http://www.w3.org/2000/svg",n);break;case 2:e=a.createElementNS("http://www.w3.org/1998/Math/MathML",n);break;default:switch(n){case"svg":e=a.createElementNS("http://www.w3.org/2000/svg",n);break;case"math":e=a.createElementNS("http://www.w3.org/1998/Math/MathML",n);break;case"script":e=a.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild);break;case"select":e=typeof r.is=="string"?a.createElement("select",{is:r.is}):a.createElement("select"),r.multiple?e.multiple=!0:r.size&&(e.size=r.size);break;default:e=typeof r.is=="string"?a.createElement(n,{is:r.is}):a.createElement(n)}}e[rn]=t,e[Tn]=r;e:for(a=t.child;a!==null;){if(a.tag===5||a.tag===6)e.appendChild(a.stateNode);else if(a.tag!==4&&a.tag!==27&&a.child!==null){a.child.return=a,a=a.child;continue}if(a===t)break e;for(;a.sibling===null;){if(a.return===null||a.return===t)break e;a=a.return}a.sibling.return=a.return,a=a.sibling}t.stateNode=e;e:switch(Zt(e,n,r),n){case"button":case"input":case"select":case"textarea":e=!!r.autoFocus;break e;case"img":e=!0;break e;default:e=!1}e&&ba(t)}}return ht(t),t.flags&=-16777217,null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&ba(t);else{if(typeof r!="string"&&t.stateNode===null)throw Error(G(166));if(e=Ya.current,Qu(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,a=bn,a!==null)switch(a.tag){case 27:case 5:r=a.memoizedProps}e[rn]=t,e=!!(e.nodeValue===n||r!==null&&r.suppressHydrationWarning===!0||uT(e.nodeValue,n)),e||is(t)}else e=df(e).createTextNode(r),e[rn]=t,t.stateNode=e}return ht(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(a=Qu(t),r!==null&&r.dehydrated!==null){if(e===null){if(!a)throw Error(G(318));if(a=t.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(G(317));a[rn]=t}else Zu(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;ht(t),a=!1}else wr!==null&&(Mg(wr),wr=null),a=!0;if(!a)return t.flags&256?(la(t),t):(la(t),null)}if(la(t),t.flags&128)return t.lanes=n,t;if(n=r!==null,e=e!==null&&e.memoizedState!==null,n){r=t.child,a=null,r.alternate!==null&&r.alternate.memoizedState!==null&&r.alternate.memoizedState.cachePool!==null&&(a=r.alternate.memoizedState.cachePool.pool);var i=null;r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(i=r.memoizedState.cachePool.pool),i!==a&&(r.flags|=2048)}return n!==e&&n&&(t.child.flags|=8192),Jd(t,t.updateQueue),ht(t),null;case 4:return Ws(),e===null&&Yg(t.stateNode.containerInfo),ht(t),null;case 10:return pa(t.type),ht(t),null;case 19:if(Ht(Pt),a=t.memoizedState,a===null)return ht(t),null;if(r=(t.flags&128)!==0,i=a.rendering,i===null)if(r)vl(a,!1);else{if(Et!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(i=Pd(e),i!==null){for(t.flags|=128,vl(a,!1),e=i.updateQueue,t.updateQueue=e,Jd(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)Pw(n,e),n=n.sibling;return lt(Pt,Pt.current&1|2),t.child}e=e.sibling}a.tail!==null&&Br()>ef&&(t.flags|=128,r=!0,vl(a,!1),t.lanes=4194304)}else{if(!r)if(e=Pd(i),e!==null){if(t.flags|=128,r=!0,e=e.updateQueue,t.updateQueue=e,Jd(t,e),vl(a,!0),a.tail===null&&a.tailMode==="hidden"&&!i.alternate&&!ze)return ht(t),null}else 2*Br()-a.renderingStartTime>ef&&n!==536870912&&(t.flags|=128,r=!0,vl(a,!1),t.lanes=4194304);a.isBackwards?(i.sibling=t.child,t.child=i):(e=a.last,e!==null?e.sibling=i:t.child=i,a.last=i)}return a.tail!==null?(t=a.tail,a.rendering=t,a.tail=t.sibling,a.renderingStartTime=Br(),t.sibling=null,e=Pt.current,lt(Pt,r?e&1|2:e&1),t):(ht(t),null);case 22:case 23:return la(t),Dm(),r=t.memoizedState!==null,e!==null?e.memoizedState!==null!==r&&(t.flags|=8192):r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(ht(t),t.subtreeFlags&6&&(t.flags|=8192)):ht(t),n=t.updateQueue,n!==null&&Jd(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),r=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(r=t.memoizedState.cachePool.pool),r!==n&&(t.flags|=2048),e!==null&&Ht(os),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),pa(Bt),ht(t),null;case 25:return null}throw Error(G(156,t.tag))}function a5(e,t){switch(km(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return pa(Bt),Ws(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return dd(t),null;case 13:if(la(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(G(340));Zu()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Ht(Pt),null;case 4:return Ws(),null;case 10:return pa(t.type),null;case 22:case 23:return la(t),Dm(),e!==null&&Ht(os),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return pa(Bt),null;case 25:return null;default:return null}}function Fw(e,t){switch(km(t),t.tag){case 3:pa(Bt),Ws();break;case 26:case 27:case 5:dd(t);break;case 4:Ws();break;case 13:la(t);break;case 19:Ht(Pt);break;case 10:pa(t.type);break;case 22:case 23:la(t),Dm(),e!==null&&Ht(os);break;case 24:pa(Bt)}}var i5={getCacheForType:function(e){var t=an(Bt),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n}},s5=typeof WeakMap=="function"?WeakMap:Map,mt=0,tt=null,Le=null,Ue=0,nt=0,Un=null,va=!1,wo=!1,Ag=!1,ya=0,Et=0,oi=0,gs=0,Cg=0,ur=0,To=0,yl=null,Hr=null,kg=!1,Rg=0,ef=1/0,tf=null,ui=null,nf=!1,bs=null,xl=0,Og=0,Ng=null,El=0,Dg=null;function Fn(){if(mt&2&&Ue!==0)return Ue&-Ue;if(xe.T!==null){var e=ho;return e!==0?e:jg()}return sx()}function jw(){ur===0&&(ur=!(Ue&536870912)||ze?tx():536870912);var e=ar.current;return e!==null&&(e.flags|=32),ur}function vn(e,t,n){(e===tt&&nt===2||e.cancelPendingCommit!==null)&&(_o(e,0),xa(e,Ue,ur,!1)),Fu(e,n),(!(mt&2)||e!==tt)&&(e===tt&&(!(mt&2)&&(gs|=n),Et===4&&xa(e,Ue,ur,!1)),zr(e))}function Hw(e,t,n){if(mt&6)throw Error(G(327));var r=!n&&(t&60)===0&&(t&e.expiredLanes)===0||Uu(e,t),a=r?l5(e,t):Pg(e,t,!0),i=r;do{if(a===0){wo&&!r&&xa(e,t,0,!1);break}else if(a===6)xa(e,t,0,!va);else{if(n=e.current.alternate,i&&!o5(n)){a=Pg(e,t,!1),i=!1;continue}if(a===2){if(i=t,e.errorRecoveryDisabledLanes&i)var s=0;else s=e.pendingLanes&-536870913,s=s!==0?s:s&536870912?536870912:0;if(s!==0){t=s;e:{var o=e;a=yl;var u=o.current.memoizedState.isDehydrated;if(u&&(_o(o,s).flags|=256),s=Pg(o,s,!1),s!==2){if(Ag&&!u){o.errorRecoveryDisabledLanes|=i,gs|=i,a=4;break e}i=Hr,Hr=a,i!==null&&Mg(i)}a=s}if(i=!1,a!==2)continue}}if(a===1){_o(e,0),xa(e,t,0,!0);break}e:{switch(r=e,a){case 0:case 1:throw Error(G(345));case 4:if((t&4194176)===t){xa(r,t,ur,!va);break e}break;case 2:Hr=null;break;case 3:case 5:break;default:throw Error(G(329))}if(r.finishedWork=n,r.finishedLanes=t,(t&62914560)===t&&(i=Rg+300-Br(),10<i)){if(xa(r,t,ur,!va),md(r,0)!==0)break e;r.timeoutHandle=dT(zw.bind(null,r,n,Hr,tf,kg,t,ur,gs,To,va,2,-0,0),i);break e}zw(r,n,Hr,tf,kg,t,ur,gs,To,va,0,-0,0)}}break}while(!0);zr(e)}function Mg(e){Hr===null?Hr=e:Hr.push.apply(Hr,e)}function zw(e,t,n,r,a,i,s,o,u,l,c,d,f){var p=t.subtreeFlags;if((p&8192||(p&16785408)===16785408)&&(Cl={stylesheets:null,count:0,unsuspend:z5},Dw(t),t=Y5(),t!==null)){e.cancelPendingCommit=t(Ww.bind(null,e,n,r,a,s,o,u,1,d,f)),xa(e,i,s,!l);return}Ww(e,n,r,a,s,o,u,c,d,f)}function o5(e){for(var t=e;;){var n=t.tag;if((n===0||n===11||n===15)&&t.flags&16384&&(n=t.updateQueue,n!==null&&(n=n.stores,n!==null)))for(var r=0;r<n.length;r++){var a=n[r],i=a.getSnapshot;a=a.value;try{if(!In(i(),a))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 xa(e,t,n,r){t&=~Cg,t&=~gs,e.suspendedLanes|=t,e.pingedLanes&=~t,r&&(e.warmLanes|=t),r=e.expirationTimes;for(var a=t;0<a;){var i=31-Ln(a),s=1<<i;r[i]=-1,a&=~s}n!==0&&rx(e,n,t)}function rf(){return mt&6?!0:(wl(0),!1)}function Lg(){if(Le!==null){if(nt===0)var e=Le.return;else e=Le,fa=fs=null,jm(e),fo=null,nl=0,e=Le;for(;e!==null;)Fw(e.alternate,e),e=e.return;Le=null}}function _o(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;n!==-1&&(e.timeoutHandle=-1,A5(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),Lg(),tt=e,Le=n=si(e.current,null),Ue=t,nt=0,Un=null,va=!1,wo=Uu(e,t),Ag=!1,To=ur=Cg=gs=oi=Et=0,Hr=yl=null,kg=!1,t&8&&(t|=t&32);var r=e.entangledLanes;if(r!==0)for(e=e.entanglements,r&=t;0<r;){var a=31-Ln(r),i=1<<a;t|=e[a],r&=~i}return ya=t,Cd(),n}function Vw(e,t){Ne=null,xe.H=jr,t===el?(t=aE(),nt=3):t===tE?(t=aE(),nt=4):nt=t===nw?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,Un=t,Le===null&&(Et=1,$d(e,tr(t,e.current)))}function Yw(){var e=xe.H;return xe.H=jr,e===null?jr:e}function qw(){var e=xe.A;return xe.A=i5,e}function Ig(){Et=4,va||(Ue&4194176)!==Ue&&ar.current!==null||(wo=!0),!(oi&134217727)&&!(gs&134217727)||tt===null||xa(tt,Ue,ur,!1)}function Pg(e,t,n){var r=mt;mt|=2;var a=Yw(),i=qw();(tt!==e||Ue!==t)&&(tf=null,_o(e,t)),t=!1;var s=Et;e:do try{if(nt!==0&&Le!==null){var o=Le,u=Un;switch(nt){case 8:Lg(),s=6;break e;case 3:case 2:case 6:ar.current===null&&(t=!0);var l=nt;if(nt=0,Un=null,So(e,o,u,l),n&&wo){s=0;break e}break;default:l=nt,nt=0,Un=null,So(e,o,u,l)}}u5(),s=Et;break}catch(c){Vw(e,c)}while(!0);return t&&e.shellSuspendCounter++,fa=fs=null,mt=r,xe.H=a,xe.A=i,Le===null&&(tt=null,Ue=0,Cd()),s}function u5(){for(;Le!==null;)Gw(Le)}function l5(e,t){var n=mt;mt|=2;var r=Yw(),a=qw();tt!==e||Ue!==t?(tf=null,ef=Br()+500,_o(e,t)):wo=Uu(e,t);e:do try{if(nt!==0&&Le!==null){t=Le;var i=Un;t:switch(nt){case 1:nt=0,Un=null,So(e,t,i,1);break;case 2:if(nE(i)){nt=0,Un=null,$w(t);break}t=function(){nt===2&&tt===e&&(nt=7),zr(e)},i.then(t,t);break e;case 3:nt=7;break e;case 4:nt=5;break e;case 7:nE(i)?(nt=0,Un=null,$w(t)):(nt=0,Un=null,So(e,t,i,7));break;case 5:var s=null;switch(Le.tag){case 26:s=Le.memoizedState;case 5:case 27:var o=Le;if(!s||wT(s)){nt=0,Un=null;var u=o.sibling;if(u!==null)Le=u;else{var l=o.return;l!==null?(Le=l,af(l)):Le=null}break t}}nt=0,Un=null,So(e,t,i,5);break;case 6:nt=0,Un=null,So(e,t,i,6);break;case 8:Lg(),Et=6;break e;default:throw Error(G(462))}}c5();break}catch(c){Vw(e,c)}while(!0);return fa=fs=null,xe.H=r,xe.A=a,mt=n,Le!==null?0:(tt=null,Ue=0,Cd(),Et)}function c5(){for(;Le!==null&&!D4();)Gw(Le)}function Gw(e){var t=hw(e.alternate,e,ya);e.memoizedProps=e.pendingProps,t===null?af(e):Le=t}function $w(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=uw(n,t,t.pendingProps,t.type,void 0,Ue);break;case 11:t=uw(n,t,t.pendingProps,t.type.render,t.ref,Ue);break;case 5:jm(t);default:Fw(n,t),t=Le=Pw(t,ya),t=hw(n,t,ya)}e.memoizedProps=e.pendingProps,t===null?af(e):Le=t}function So(e,t,n,r){fa=fs=null,jm(t),fo=null,nl=0;var a=t.return;try{if(ZM(e,a,t,n,Ue)){Et=1,$d(e,tr(n,e.current)),Le=null;return}}catch(i){if(a!==null)throw Le=a,i;Et=1,$d(e,tr(n,e.current)),Le=null;return}t.flags&32768?(ze||r===1?e=!0:wo||Ue&536870912?e=!1:(va=e=!0,(r===2||r===3||r===6)&&(r=ar.current,r!==null&&r.tag===13&&(r.flags|=16384))),Xw(t,e)):af(t)}function af(e){var t=e;do{if(t.flags&32768){Xw(t,va);return}e=t.return;var n=r5(t.alternate,t,ya);if(n!==null){Le=n;return}if(t=t.sibling,t!==null){Le=t;return}Le=t=e}while(t!==null);Et===0&&(Et=5)}function Xw(e,t){do{var n=a5(e.alternate,e);if(n!==null){n.flags&=32767,Le=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){Le=e;return}Le=e=n}while(e!==null);Et=6,Le=null}function Ww(e,t,n,r,a,i,s,o,u,l){var c=xe.T,d=st.p;try{st.p=2,xe.T=null,d5(e,t,n,r,d,a,i,s,o,u,l)}finally{xe.T=c,st.p=d}}function d5(e,t,n,r,a,i,s,o){do Ao();while(bs!==null);if(mt&6)throw Error(G(327));var u=e.finishedWork;if(r=e.finishedLanes,u===null)return null;if(e.finishedWork=null,e.finishedLanes=0,u===e.current)throw Error(G(177));e.callbackNode=null,e.callbackPriority=0,e.cancelPendingCommit=null;var l=u.lanes|u.childLanes;if(l|=Sm,V4(e,r,l,i,s,o),e===tt&&(Le=tt=null,Ue=0),!(u.subtreeFlags&10256)&&!(u.flags&10256)||nf||(nf=!0,Og=l,Ng=n,m5(fd,function(){return Ao(),null})),n=(u.flags&15990)!==0,u.subtreeFlags&15990||n?(n=xe.T,xe.T=null,i=st.p,st.p=2,s=mt,mt|=4,e5(e,u),Rw(u,e),IM(Xg,e.containerInfo),bf=!!$g,Xg=$g=null,e.current=u,Sw(e,u.alternate,u),M4(),mt=s,st.p=i,xe.T=n):e.current=u,nf?(nf=!1,bs=e,xl=r):Kw(e,l),l=e.pendingLanes,l===0&&(ui=null),U4(u.stateNode),zr(e),t!==null)for(a=e.onRecoverableError,u=0;u<t.length;u++)l=t[u],a(l.value,{componentStack:l.stack});return xl&3&&Ao(),l=e.pendingLanes,r&4194218&&l&42?e===Dg?El++:(El=0,Dg=e):El=0,wl(0),null}function Kw(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,al(t)))}function Ao(){if(bs!==null){var e=bs,t=Og;Og=0;var n=ix(xl),r=xe.T,a=st.p;try{if(st.p=32>n?32:n,xe.T=null,bs===null)var i=!1;else{n=Ng,Ng=null;var s=bs,o=xl;if(bs=null,xl=0,mt&6)throw Error(G(331));var u=mt;if(mt|=4,Lw(s.current),Nw(s,s.current,o,n),mt=u,wl(0,!1),Mn&&typeof Mn.onPostCommitFiberRoot=="function")try{Mn.onPostCommitFiberRoot(Bu,s)}catch{}i=!0}return i}finally{st.p=a,xe.T=r,Kw(e,t)}}return!1}function Qw(e,t,n){t=tr(n,t),t=eg(e.stateNode,t,2),e=ni(e,t,2),e!==null&&(Fu(e,2),zr(e))}function Ze(e,t,n){if(e.tag===3)Qw(e,e,n);else for(;t!==null;){if(t.tag===3){Qw(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(ui===null||!ui.has(r))){e=tr(n,e),n=ew(2),r=ni(t,n,2),r!==null&&(tw(n,r,t,e),Fu(r,2),zr(r));break}}t=t.return}}function Bg(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new s5;var a=new Set;r.set(t,a)}else a=r.get(t),a===void 0&&(a=new Set,r.set(t,a));a.has(n)||(Ag=!0,a.add(n),e=f5.bind(null,e,t,n),t.then(e,e))}function f5(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,tt===e&&(Ue&n)===n&&(Et===4||Et===3&&(Ue&62914560)===Ue&&300>Br()-Rg?!(mt&2)&&_o(e,0):Cg|=n,To===Ue&&(To=0)),zr(e)}function Zw(e,t){t===0&&(t=nx()),e=Xa(e,t),e!==null&&(Fu(e,t),zr(e))}function p5(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Zw(e,n)}function h5(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,a=e.memoizedState;a!==null&&(n=a.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(G(314))}r!==null&&r.delete(t),Zw(e,n)}function m5(e,t){return tm(e,t)}var sf=null,Co=null,Ug=!1,of=!1,Fg=!1,vs=0;function zr(e){e!==Co&&e.next===null&&(Co===null?sf=Co=e:Co=Co.next=e),of=!0,Ug||(Ug=!0,b5(g5))}function wl(e,t){if(!Fg&&of){Fg=!0;do for(var n=!1,r=sf;r!==null;){if(e!==0){var a=r.pendingLanes;if(a===0)var i=0;else{var s=r.suspendedLanes,o=r.pingedLanes;i=(1<<31-Ln(42|e)+1)-1,i&=a&~(s&~o),i=i&201326677?i&201326677|1:i?i|2:0}i!==0&&(n=!0,tT(r,i))}else i=Ue,i=md(r,r===tt?i:0),!(i&3)||Uu(r,i)||(n=!0,tT(r,i));r=r.next}while(n);Fg=!1}}function g5(){of=Ug=!1;var e=0;vs!==0&&(S5()&&(e=vs),vs=0);for(var t=Br(),n=null,r=sf;r!==null;){var a=r.next,i=Jw(r,t);i===0?(r.next=null,n===null?sf=a:n.next=a,a===null&&(Co=n)):(n=r,(e!==0||i&3)&&(of=!0)),r=a}wl(e)}function Jw(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,a=e.expirationTimes,i=e.pendingLanes&-62914561;0<i;){var s=31-Ln(i),o=1<<s,u=a[s];u===-1?(!(o&n)||o&r)&&(a[s]=z4(o,t)):u<=t&&(e.expiredLanes|=o),i&=~o}if(t=tt,n=Ue,n=md(e,e===t?n:0),r=e.callbackNode,n===0||e===t&&nt===2||e.cancelPendingCommit!==null)return r!==null&&r!==null&&nm(r),e.callbackNode=null,e.callbackPriority=0;if(!(n&3)||Uu(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(r!==null&&nm(r),ix(n)){case 2:case 8:n=Jy;break;case 32:n=fd;break;case 268435456:n=ex;break;default:n=fd}return r=eT.bind(null,e),n=tm(n,r),e.callbackPriority=t,e.callbackNode=n,t}return r!==null&&r!==null&&nm(r),e.callbackPriority=2,e.callbackNode=null,2}function eT(e,t){var n=e.callbackNode;if(Ao()&&e.callbackNode!==n)return null;var r=Ue;return r=md(e,e===tt?r:0),r===0?null:(Hw(e,r,t),Jw(e,Br()),e.callbackNode!=null&&e.callbackNode===n?eT.bind(null,e):null)}function tT(e,t){if(Ao())return null;Hw(e,t,!0)}function b5(e){C5(function(){mt&6?tm(Zy,e):e()})}function jg(){return vs===0&&(vs=tx()),vs}function nT(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:xd(""+e)}function rT(e,t){var n=t.ownerDocument.createElement("input");return n.name=t.name,n.value=t.value,e.id&&n.setAttribute("form",e.id),t.parentNode.insertBefore(n,t),e=new FormData(e),n.parentNode.removeChild(n),e}function v5(e,t,n,r,a){if(t==="submit"&&n&&n.stateNode===a){var i=nT((a[Tn]||null).action),s=r.submitter;s&&(t=(t=s[Tn]||null)?nT(t.formAction):s.getAttribute("formAction"),t!==null&&(i=t,s=null));var o=new _d("action","action",null,r,a);e.push({event:o,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(vs!==0){var u=s?rT(a,s):new FormData(a);Wm(n,{pending:!0,data:u,method:a.method,action:i},null,u)}}else typeof i=="function"&&(o.preventDefault(),u=s?rT(a,s):new FormData(a),Wm(n,{pending:!0,data:u,method:a.method,action:i},i,u))},currentTarget:a}]})}}for(var Hg=0;Hg<Wx.length;Hg++){var zg=Wx[Hg],y5=zg.toLowerCase(),x5=zg[0].toUpperCase()+zg.slice(1);Er(y5,"on"+x5)}Er(Yx,"onAnimationEnd"),Er(qx,"onAnimationIteration"),Er(Gx,"onAnimationStart"),Er("dblclick","onDoubleClick"),Er("focusin","onFocus"),Er("focusout","onBlur"),Er(BM,"onTransitionRun"),Er(UM,"onTransitionStart"),Er(FM,"onTransitionCancel"),Er($x,"onTransitionEnd"),Js("onMouseEnter",["mouseout","mouseover"]),Js("onMouseLeave",["mouseout","mouseover"]),Js("onPointerEnter",["pointerout","pointerover"]),Js("onPointerLeave",["pointerout","pointerover"]),Ji("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Ji("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Ji("onBeforeInput",["compositionend","keypress","textInput","paste"]),Ji("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Ji("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Ji("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Tl="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(" "),E5=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Tl));function aT(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var r=e[n],a=r.event;r=r.listeners;e:{var i=void 0;if(t)for(var s=r.length-1;0<=s;s--){var o=r[s],u=o.instance,l=o.currentTarget;if(o=o.listener,u!==i&&a.isPropagationStopped())break e;i=o,a.currentTarget=l;try{i(a)}catch(c){Gd(c)}a.currentTarget=null,i=u}else for(s=0;s<r.length;s++){if(o=r[s],u=o.instance,l=o.currentTarget,o=o.listener,u!==i&&a.isPropagationStopped())break e;i=o,a.currentTarget=l;try{i(a)}catch(c){Gd(c)}a.currentTarget=null,i=u}}}}function Pe(e,t){var n=t[am];n===void 0&&(n=t[am]=new Set);var r=e+"__bubble";n.has(r)||(iT(t,e,2,!1),n.add(r))}function Vg(e,t,n){var r=0;t&&(r|=4),iT(n,e,r,t)}var uf="_reactListening"+Math.random().toString(36).slice(2);function Yg(e){if(!e[uf]){e[uf]=!0,ux.forEach(function(n){n!=="selectionchange"&&(E5.has(n)||Vg(n,!1,e),Vg(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[uf]||(t[uf]=!0,Vg("selectionchange",!1,t))}}function iT(e,t,n,r){switch(kT(t)){case 2:var a=$5;break;case 8:a=X5;break;default:a=r0}n=a.bind(null,t,n,e),a=void 0,!fm||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(a=!0),r?a!==void 0?e.addEventListener(t,n,{capture:!0,passive:a}):e.addEventListener(t,n,!0):a!==void 0?e.addEventListener(t,n,{passive:a}):e.addEventListener(t,n,!1)}function qg(e,t,n,r,a){var i=r;if(!(t&1)&&!(t&2)&&r!==null)e:for(;;){if(r===null)return;var s=r.tag;if(s===3||s===4){var o=r.stateNode.containerInfo;if(o===a||o.nodeType===8&&o.parentNode===a)break;if(s===4)for(s=r.return;s!==null;){var u=s.tag;if((u===3||u===4)&&(u=s.stateNode.containerInfo,u===a||u.nodeType===8&&u.parentNode===a))return;s=s.return}for(;o!==null;){if(s=Zi(o),s===null)return;if(u=s.tag,u===5||u===6||u===26||u===27){r=i=s;continue e}o=o.parentNode}}r=r.return}xx(function(){var l=i,c=cm(n),d=[];e:{var f=Xx.get(e);if(f!==void 0){var p=_d,g=e;switch(e){case"keypress":if(wd(n)===0)break e;case"keydown":case"keyup":p=hM;break;case"focusin":g="focus",p=gm;break;case"focusout":g="blur",p=gm;break;case"beforeblur":case"afterblur":p=gm;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=Tx;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":p=nM;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":p=bM;break;case Yx:case qx:case Gx:p=iM;break;case $x:p=yM;break;case"scroll":case"scrollend":p=eM;break;case"wheel":p=EM;break;case"copy":case"cut":case"paste":p=oM;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":p=Sx;break;case"toggle":case"beforetoggle":p=TM}var v=(t&4)!==0,w=!v&&(e==="scroll"||e==="scrollend"),m=v?f!==null?f+"Capture":null:f;v=[];for(var y=l,x;y!==null;){var T=y;if(x=T.stateNode,T=T.tag,T!==5&&T!==26&&T!==27||x===null||m===null||(T=zu(y,m),T!=null&&v.push(_l(y,T,x))),w)break;y=y.return}0<v.length&&(f=new p(f,g,null,n,c),d.push({event:f,listeners:v}))}}if(!(t&7)){e:{if(f=e==="mouseover"||e==="pointerover",p=e==="mouseout"||e==="pointerout",f&&n!==lm&&(g=n.relatedTarget||n.fromElement)&&(Zi(g)||g[Ks]))break e;if((p||f)&&(f=c.window===c?c:(f=c.ownerDocument)?f.defaultView||f.parentWindow:window,p?(g=n.relatedTarget||n.toElement,p=l,g=g?Zi(g):null,g!==null&&(w=$s(g),v=g.tag,g!==w||v!==5&&v!==27&&v!==6)&&(g=null)):(p=null,g=l),p!==g)){if(v=Tx,T="onMouseLeave",m="onMouseEnter",y="mouse",(e==="pointerout"||e==="pointerover")&&(v=Sx,T="onPointerLeave",m="onPointerEnter",y="pointer"),w=p==null?f:Hu(p),x=g==null?f:Hu(g),f=new v(T,y+"leave",p,n,c),f.target=w,f.relatedTarget=x,T=null,Zi(c)===l&&(v=new v(m,y+"enter",g,n,c),v.target=x,v.relatedTarget=w,T=v),w=T,p&&g)t:{for(v=p,m=g,y=0,x=v;x;x=ko(x))y++;for(x=0,T=m;T;T=ko(T))x++;for(;0<y-x;)v=ko(v),y--;for(;0<x-y;)m=ko(m),x--;for(;y--;){if(v===m||m!==null&&v===m.alternate)break t;v=ko(v),m=ko(m)}v=null}else v=null;p!==null&&sT(d,f,p,v,!1),g!==null&&w!==null&&sT(d,w,g,v,!0)}}e:{if(f=l?Hu(l):window,p=f.nodeName&&f.nodeName.toLowerCase(),p==="select"||p==="input"&&f.type==="file")var _=Mx;else if(Nx(f))if(Lx)_=MM;else{_=NM;var A=OM}else p=f.nodeName,!p||p.toLowerCase()!=="input"||f.type!=="checkbox"&&f.type!=="radio"?l&&um(l.elementType)&&(_=Mx):_=DM;if(_&&(_=_(e,l))){Dx(d,_,n,c);break e}A&&A(e,f,l),e==="focusout"&&l&&f.type==="number"&&l.memoizedProps.value!=null&&om(f,"number",f.value)}switch(A=l?Hu(l):window,e){case"focusin":(Nx(A)||A.contentEditable==="true")&&(io=A,wm=l,Ku=null);break;case"focusout":Ku=wm=io=null;break;case"mousedown":Tm=!0;break;case"contextmenu":case"mouseup":case"dragend":Tm=!1,zx(d,n,c);break;case"selectionchange":if(PM)break;case"keydown":case"keyup":zx(d,n,c)}var C;if(vm)e:{switch(e){case"compositionstart":var M="onCompositionStart";break e;case"compositionend":M="onCompositionEnd";break e;case"compositionupdate":M="onCompositionUpdate";break e}M=void 0}else ao?Rx(e,n)&&(M="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(M="onCompositionStart");M&&(Ax&&n.locale!=="ko"&&(ao||M!=="onCompositionStart"?M==="onCompositionEnd"&&ao&&(C=Ex()):($a=c,pm="value"in $a?$a.value:$a.textContent,ao=!0)),A=lf(l,M),0<A.length&&(M=new _x(M,e,null,n,c),d.push({event:M,listeners:A}),C?M.data=C:(C=Ox(n),C!==null&&(M.data=C)))),(C=SM?AM(e,n):CM(e,n))&&(M=lf(l,"onBeforeInput"),0<M.length&&(A=new _x("onBeforeInput","beforeinput",null,n,c),d.push({event:A,listeners:M}),A.data=C)),v5(d,e,l,n,c)}aT(d,t)})}function _l(e,t,n){return{instance:e,listener:t,currentTarget:n}}function lf(e,t){for(var n=t+"Capture",r=[];e!==null;){var a=e,i=a.stateNode;a=a.tag,a!==5&&a!==26&&a!==27||i===null||(a=zu(e,n),a!=null&&r.unshift(_l(e,a,i)),a=zu(e,t),a!=null&&r.push(_l(e,a,i))),e=e.return}return r}function ko(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function sT(e,t,n,r,a){for(var i=t._reactName,s=[];n!==null&&n!==r;){var o=n,u=o.alternate,l=o.stateNode;if(o=o.tag,u!==null&&u===r)break;o!==5&&o!==26&&o!==27||l===null||(u=l,a?(l=zu(n,i),l!=null&&s.unshift(_l(n,l,u))):a||(l=zu(n,i),l!=null&&s.push(_l(n,l,u)))),n=n.return}s.length!==0&&e.push({event:t,listeners:s})}var w5=/\r\n?/g,T5=/\u0000|\uFFFD/g;function oT(e){return(typeof e=="string"?e:""+e).replace(w5,`
49
- `).replace(T5,"")}function uT(e,t){return t=oT(t),oT(e)===t}function cf(){}function Ke(e,t,n,r,a,i){switch(n){case"children":typeof r=="string"?t==="body"||t==="textarea"&&r===""||to(e,r):(typeof r=="number"||typeof r=="bigint")&&t!=="body"&&to(e,""+r);break;case"className":bd(e,"class",r);break;case"tabIndex":bd(e,"tabindex",r);break;case"dir":case"role":case"viewBox":case"width":case"height":bd(e,n,r);break;case"style":vx(e,r,i);break;case"data":if(t!=="object"){bd(e,"data",r);break}case"src":case"href":if(r===""&&(t!=="a"||n!=="href")){e.removeAttribute(n);break}if(r==null||typeof r=="function"||typeof r=="symbol"||typeof r=="boolean"){e.removeAttribute(n);break}r=xd(""+r),e.setAttribute(n,r);break;case"action":case"formAction":if(typeof r=="function"){e.setAttribute(n,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof i=="function"&&(n==="formAction"?(t!=="input"&&Ke(e,t,"name",a.name,a,null),Ke(e,t,"formEncType",a.formEncType,a,null),Ke(e,t,"formMethod",a.formMethod,a,null),Ke(e,t,"formTarget",a.formTarget,a,null)):(Ke(e,t,"encType",a.encType,a,null),Ke(e,t,"method",a.method,a,null),Ke(e,t,"target",a.target,a,null)));if(r==null||typeof r=="symbol"||typeof r=="boolean"){e.removeAttribute(n);break}r=xd(""+r),e.setAttribute(n,r);break;case"onClick":r!=null&&(e.onclick=cf);break;case"onScroll":r!=null&&Pe("scroll",e);break;case"onScrollEnd":r!=null&&Pe("scrollend",e);break;case"dangerouslySetInnerHTML":if(r!=null){if(typeof r!="object"||!("__html"in r))throw Error(G(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(G(60));e.innerHTML=n}}break;case"multiple":e.multiple=r&&typeof r!="function"&&typeof r!="symbol";break;case"muted":e.muted=r&&typeof r!="function"&&typeof r!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(r==null||typeof r=="function"||typeof r=="boolean"||typeof r=="symbol"){e.removeAttribute("xlink:href");break}n=xd(""+r),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",n);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":r!=null&&typeof r!="function"&&typeof r!="symbol"?e.setAttribute(n,""+r):e.removeAttribute(n);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":r&&typeof r!="function"&&typeof r!="symbol"?e.setAttribute(n,""):e.removeAttribute(n);break;case"capture":case"download":r===!0?e.setAttribute(n,""):r!==!1&&r!=null&&typeof r!="function"&&typeof r!="symbol"?e.setAttribute(n,r):e.removeAttribute(n);break;case"cols":case"rows":case"size":case"span":r!=null&&typeof r!="function"&&typeof r!="symbol"&&!isNaN(r)&&1<=r?e.setAttribute(n,r):e.removeAttribute(n);break;case"rowSpan":case"start":r==null||typeof r=="function"||typeof r=="symbol"||isNaN(r)?e.removeAttribute(n):e.setAttribute(n,r);break;case"popover":Pe("beforetoggle",e),Pe("toggle",e),gd(e,"popover",r);break;case"xlinkActuate":sa(e,"http://www.w3.org/1999/xlink","xlink:actuate",r);break;case"xlinkArcrole":sa(e,"http://www.w3.org/1999/xlink","xlink:arcrole",r);break;case"xlinkRole":sa(e,"http://www.w3.org/1999/xlink","xlink:role",r);break;case"xlinkShow":sa(e,"http://www.w3.org/1999/xlink","xlink:show",r);break;case"xlinkTitle":sa(e,"http://www.w3.org/1999/xlink","xlink:title",r);break;case"xlinkType":sa(e,"http://www.w3.org/1999/xlink","xlink:type",r);break;case"xmlBase":sa(e,"http://www.w3.org/XML/1998/namespace","xml:base",r);break;case"xmlLang":sa(e,"http://www.w3.org/XML/1998/namespace","xml:lang",r);break;case"xmlSpace":sa(e,"http://www.w3.org/XML/1998/namespace","xml:space",r);break;case"is":gd(e,"is",r);break;case"innerText":case"textContent":break;default:(!(2<n.length)||n[0]!=="o"&&n[0]!=="O"||n[1]!=="n"&&n[1]!=="N")&&(n=Z4.get(n)||n,gd(e,n,r))}}function Gg(e,t,n,r,a,i){switch(n){case"style":vx(e,r,i);break;case"dangerouslySetInnerHTML":if(r!=null){if(typeof r!="object"||!("__html"in r))throw Error(G(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(G(60));e.innerHTML=n}}break;case"children":typeof r=="string"?to(e,r):(typeof r=="number"||typeof r=="bigint")&&to(e,""+r);break;case"onScroll":r!=null&&Pe("scroll",e);break;case"onScrollEnd":r!=null&&Pe("scrollend",e);break;case"onClick":r!=null&&(e.onclick=cf);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!lx.hasOwnProperty(n))e:{if(n[0]==="o"&&n[1]==="n"&&(a=n.endsWith("Capture"),t=n.slice(2,a?n.length-7:void 0),i=e[Tn]||null,i=i!=null?i[n]:null,typeof i=="function"&&e.removeEventListener(t,i,a),typeof r=="function")){typeof i!="function"&&i!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(t,r,a);break e}n in e?e[n]=r:r===!0?e.setAttribute(n,""):gd(e,n,r)}}}function Zt(e,t,n){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Pe("error",e),Pe("load",e);var r=!1,a=!1,i;for(i in n)if(n.hasOwnProperty(i)){var s=n[i];if(s!=null)switch(i){case"src":r=!0;break;case"srcSet":a=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(G(137,t));default:Ke(e,t,i,s,n,null)}}a&&Ke(e,t,"srcSet",n.srcSet,n,null),r&&Ke(e,t,"src",n.src,n,null);return;case"input":Pe("invalid",e);var o=i=s=a=null,u=null,l=null;for(r in n)if(n.hasOwnProperty(r)){var c=n[r];if(c!=null)switch(r){case"name":a=c;break;case"type":s=c;break;case"checked":u=c;break;case"defaultChecked":l=c;break;case"value":i=c;break;case"defaultValue":o=c;break;case"children":case"dangerouslySetInnerHTML":if(c!=null)throw Error(G(137,t));break;default:Ke(e,t,r,c,n,null)}}hx(e,i,o,u,l,s,a,!1),vd(e);return;case"select":Pe("invalid",e),r=s=i=null;for(a in n)if(n.hasOwnProperty(a)&&(o=n[a],o!=null))switch(a){case"value":i=o;break;case"defaultValue":s=o;break;case"multiple":r=o;default:Ke(e,t,a,o,n,null)}t=i,n=s,e.multiple=!!r,t!=null?eo(e,!!r,t,!1):n!=null&&eo(e,!!r,n,!0);return;case"textarea":Pe("invalid",e),i=a=r=null;for(s in n)if(n.hasOwnProperty(s)&&(o=n[s],o!=null))switch(s){case"value":r=o;break;case"defaultValue":a=o;break;case"children":i=o;break;case"dangerouslySetInnerHTML":if(o!=null)throw Error(G(91));break;default:Ke(e,t,s,o,n,null)}gx(e,r,a,i),vd(e);return;case"option":for(u in n)if(n.hasOwnProperty(u)&&(r=n[u],r!=null))switch(u){case"selected":e.selected=r&&typeof r!="function"&&typeof r!="symbol";break;default:Ke(e,t,u,r,n,null)}return;case"dialog":Pe("cancel",e),Pe("close",e);break;case"iframe":case"object":Pe("load",e);break;case"video":case"audio":for(r=0;r<Tl.length;r++)Pe(Tl[r],e);break;case"image":Pe("error",e),Pe("load",e);break;case"details":Pe("toggle",e);break;case"embed":case"source":case"link":Pe("error",e),Pe("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(l in n)if(n.hasOwnProperty(l)&&(r=n[l],r!=null))switch(l){case"children":case"dangerouslySetInnerHTML":throw Error(G(137,t));default:Ke(e,t,l,r,n,null)}return;default:if(um(t)){for(c in n)n.hasOwnProperty(c)&&(r=n[c],r!==void 0&&Gg(e,t,c,r,n,void 0));return}}for(o in n)n.hasOwnProperty(o)&&(r=n[o],r!=null&&Ke(e,t,o,r,n,null))}function _5(e,t,n,r){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var a=null,i=null,s=null,o=null,u=null,l=null,c=null;for(p in n){var d=n[p];if(n.hasOwnProperty(p)&&d!=null)switch(p){case"checked":break;case"value":break;case"defaultValue":u=d;default:r.hasOwnProperty(p)||Ke(e,t,p,null,r,d)}}for(var f in r){var p=r[f];if(d=n[f],r.hasOwnProperty(f)&&(p!=null||d!=null))switch(f){case"type":i=p;break;case"name":a=p;break;case"checked":l=p;break;case"defaultChecked":c=p;break;case"value":s=p;break;case"defaultValue":o=p;break;case"children":case"dangerouslySetInnerHTML":if(p!=null)throw Error(G(137,t));break;default:p!==d&&Ke(e,t,f,p,r,d)}}sm(e,s,o,u,l,c,i,a);return;case"select":p=s=o=f=null;for(i in n)if(u=n[i],n.hasOwnProperty(i)&&u!=null)switch(i){case"value":break;case"multiple":p=u;default:r.hasOwnProperty(i)||Ke(e,t,i,null,r,u)}for(a in r)if(i=r[a],u=n[a],r.hasOwnProperty(a)&&(i!=null||u!=null))switch(a){case"value":f=i;break;case"defaultValue":o=i;break;case"multiple":s=i;default:i!==u&&Ke(e,t,a,i,r,u)}t=o,n=s,r=p,f!=null?eo(e,!!n,f,!1):!!r!=!!n&&(t!=null?eo(e,!!n,t,!0):eo(e,!!n,n?[]:"",!1));return;case"textarea":p=f=null;for(o in n)if(a=n[o],n.hasOwnProperty(o)&&a!=null&&!r.hasOwnProperty(o))switch(o){case"value":break;case"children":break;default:Ke(e,t,o,null,r,a)}for(s in r)if(a=r[s],i=n[s],r.hasOwnProperty(s)&&(a!=null||i!=null))switch(s){case"value":f=a;break;case"defaultValue":p=a;break;case"children":break;case"dangerouslySetInnerHTML":if(a!=null)throw Error(G(91));break;default:a!==i&&Ke(e,t,s,a,r,i)}mx(e,f,p);return;case"option":for(var g in n)if(f=n[g],n.hasOwnProperty(g)&&f!=null&&!r.hasOwnProperty(g))switch(g){case"selected":e.selected=!1;break;default:Ke(e,t,g,null,r,f)}for(u in r)if(f=r[u],p=n[u],r.hasOwnProperty(u)&&f!==p&&(f!=null||p!=null))switch(u){case"selected":e.selected=f&&typeof f!="function"&&typeof f!="symbol";break;default:Ke(e,t,u,f,r,p)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var v in n)f=n[v],n.hasOwnProperty(v)&&f!=null&&!r.hasOwnProperty(v)&&Ke(e,t,v,null,r,f);for(l in r)if(f=r[l],p=n[l],r.hasOwnProperty(l)&&f!==p&&(f!=null||p!=null))switch(l){case"children":case"dangerouslySetInnerHTML":if(f!=null)throw Error(G(137,t));break;default:Ke(e,t,l,f,r,p)}return;default:if(um(t)){for(var w in n)f=n[w],n.hasOwnProperty(w)&&f!==void 0&&!r.hasOwnProperty(w)&&Gg(e,t,w,void 0,r,f);for(c in r)f=r[c],p=n[c],!r.hasOwnProperty(c)||f===p||f===void 0&&p===void 0||Gg(e,t,c,f,r,p);return}}for(var m in n)f=n[m],n.hasOwnProperty(m)&&f!=null&&!r.hasOwnProperty(m)&&Ke(e,t,m,null,r,f);for(d in r)f=r[d],p=n[d],!r.hasOwnProperty(d)||f===p||f==null&&p==null||Ke(e,t,d,f,r,p)}var $g=null,Xg=null;function df(e){return e.nodeType===9?e:e.ownerDocument}function lT(e){switch(e){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function cT(e,t){if(e===0)switch(t){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&t==="foreignObject"?0:e}function Wg(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.children=="bigint"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Kg=null;function S5(){var e=window.event;return e&&e.type==="popstate"?e===Kg?!1:(Kg=e,!0):(Kg=null,!1)}var dT=typeof setTimeout=="function"?setTimeout:void 0,A5=typeof clearTimeout=="function"?clearTimeout:void 0,fT=typeof Promise=="function"?Promise:void 0,C5=typeof queueMicrotask=="function"?queueMicrotask:typeof fT<"u"?function(e){return fT.resolve(null).then(e).catch(k5)}:dT;function k5(e){setTimeout(function(){throw e})}function Qg(e,t){var n=t,r=0;do{var a=n.nextSibling;if(e.removeChild(n),a&&a.nodeType===8)if(n=a.data,n==="/$"){if(r===0){e.removeChild(a),Dl(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=a}while(n);Dl(t)}function Zg(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var n=t;switch(t=t.nextSibling,n.nodeName){case"HTML":case"HEAD":case"BODY":Zg(n),im(n);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(n.rel.toLowerCase()==="stylesheet")continue}e.removeChild(n)}}function R5(e,t,n,r){for(;e.nodeType===1;){var a=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!r&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(r){if(!e[ju])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(i=e.getAttribute("rel"),i==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(i!==a.rel||e.getAttribute("href")!==(a.href==null?null:a.href)||e.getAttribute("crossorigin")!==(a.crossOrigin==null?null:a.crossOrigin)||e.getAttribute("title")!==(a.title==null?null:a.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(i=e.getAttribute("src"),(i!==(a.src==null?null:a.src)||e.getAttribute("type")!==(a.type==null?null:a.type)||e.getAttribute("crossorigin")!==(a.crossOrigin==null?null:a.crossOrigin))&&i&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var i=a.name==null?null:""+a.name;if(a.type==="hidden"&&e.getAttribute("name")===i)return e}else return e;if(e=_r(e.nextSibling),e===null)break}return null}function O5(e,t,n){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!n||(e=_r(e.nextSibling),e===null))return null;return e}function _r(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==="$?"||t==="F!"||t==="F")break;if(t==="/$")return null}}return e}function pT(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}function hT(e,t,n){switch(t=df(n),e){case"html":if(e=t.documentElement,!e)throw Error(G(452));return e;case"head":if(e=t.head,!e)throw Error(G(453));return e;case"body":if(e=t.body,!e)throw Error(G(454));return e;default:throw Error(G(451))}}var lr=new Map,mT=new Set;function ff(e){return typeof e.getRootNode=="function"?e.getRootNode():e.ownerDocument}var Ea=st.d;st.d={f:N5,r:D5,D:M5,C:L5,L:I5,m:P5,X:U5,S:B5,M:F5};function N5(){var e=Ea.f(),t=rf();return e||t}function D5(e){var t=Qs(e);t!==null&&t.tag===5&&t.type==="form"?zE(t):Ea.r(e)}var Ro=typeof document>"u"?null:document;function gT(e,t,n){var r=Ro;if(r&&typeof t=="string"&&t){var a=Jn(t);a='link[rel="'+e+'"][href="'+a+'"]',typeof n=="string"&&(a+='[crossorigin="'+n+'"]'),mT.has(a)||(mT.add(a),e={rel:e,crossOrigin:n,href:t},r.querySelector(a)===null&&(t=r.createElement("link"),Zt(t,"link",e),zt(t),r.head.appendChild(t)))}}function M5(e){Ea.D(e),gT("dns-prefetch",e,null)}function L5(e,t){Ea.C(e,t),gT("preconnect",e,t)}function I5(e,t,n){Ea.L(e,t,n);var r=Ro;if(r&&e&&t){var a='link[rel="preload"][as="'+Jn(t)+'"]';t==="image"&&n&&n.imageSrcSet?(a+='[imagesrcset="'+Jn(n.imageSrcSet)+'"]',typeof n.imageSizes=="string"&&(a+='[imagesizes="'+Jn(n.imageSizes)+'"]')):a+='[href="'+Jn(e)+'"]';var i=a;switch(t){case"style":i=Oo(e);break;case"script":i=No(e)}lr.has(i)||(e=it({rel:"preload",href:t==="image"&&n&&n.imageSrcSet?void 0:e,as:t},n),lr.set(i,e),r.querySelector(a)!==null||t==="style"&&r.querySelector(Sl(i))||t==="script"&&r.querySelector(Al(i))||(t=r.createElement("link"),Zt(t,"link",e),zt(t),r.head.appendChild(t)))}}function P5(e,t){Ea.m(e,t);var n=Ro;if(n&&e){var r=t&&typeof t.as=="string"?t.as:"script",a='link[rel="modulepreload"][as="'+Jn(r)+'"][href="'+Jn(e)+'"]',i=a;switch(r){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":i=No(e)}if(!lr.has(i)&&(e=it({rel:"modulepreload",href:e},t),lr.set(i,e),n.querySelector(a)===null)){switch(r){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(n.querySelector(Al(i)))return}r=n.createElement("link"),Zt(r,"link",e),zt(r),n.head.appendChild(r)}}}function B5(e,t,n){Ea.S(e,t,n);var r=Ro;if(r&&e){var a=Zs(r).hoistableStyles,i=Oo(e);t=t||"default";var s=a.get(i);if(!s){var o={loading:0,preload:null};if(s=r.querySelector(Sl(i)))o.loading=5;else{e=it({rel:"stylesheet",href:e,"data-precedence":t},n),(n=lr.get(i))&&Jg(e,n);var u=s=r.createElement("link");zt(u),Zt(u,"link",e),u._p=new Promise(function(l,c){u.onload=l,u.onerror=c}),u.addEventListener("load",function(){o.loading|=1}),u.addEventListener("error",function(){o.loading|=2}),o.loading|=4,pf(s,t,r)}s={type:"stylesheet",instance:s,count:1,state:o},a.set(i,s)}}}function U5(e,t){Ea.X(e,t);var n=Ro;if(n&&e){var r=Zs(n).hoistableScripts,a=No(e),i=r.get(a);i||(i=n.querySelector(Al(a)),i||(e=it({src:e,async:!0},t),(t=lr.get(a))&&e0(e,t),i=n.createElement("script"),zt(i),Zt(i,"link",e),n.head.appendChild(i)),i={type:"script",instance:i,count:1,state:null},r.set(a,i))}}function F5(e,t){Ea.M(e,t);var n=Ro;if(n&&e){var r=Zs(n).hoistableScripts,a=No(e),i=r.get(a);i||(i=n.querySelector(Al(a)),i||(e=it({src:e,async:!0,type:"module"},t),(t=lr.get(a))&&e0(e,t),i=n.createElement("script"),zt(i),Zt(i,"link",e),n.head.appendChild(i)),i={type:"script",instance:i,count:1,state:null},r.set(a,i))}}function bT(e,t,n,r){var a=(a=Ya.current)?ff(a):null;if(!a)throw Error(G(446));switch(e){case"meta":case"title":return null;case"style":return typeof n.precedence=="string"&&typeof n.href=="string"?(t=Oo(n.href),n=Zs(a).hoistableStyles,r=n.get(t),r||(r={type:"style",instance:null,count:0,state:null},n.set(t,r)),r):{type:"void",instance:null,count:0,state:null};case"link":if(n.rel==="stylesheet"&&typeof n.href=="string"&&typeof n.precedence=="string"){e=Oo(n.href);var i=Zs(a).hoistableStyles,s=i.get(e);if(s||(a=a.ownerDocument||a,s={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},i.set(e,s),(i=a.querySelector(Sl(e)))&&!i._p&&(s.instance=i,s.state.loading=5),lr.has(e)||(n={rel:"preload",as:"style",href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},lr.set(e,n),i||j5(a,e,n,s.state))),t&&r===null)throw Error(G(528,""));return s}if(t&&r!==null)throw Error(G(529,""));return null;case"script":return t=n.async,n=n.src,typeof n=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=No(n),n=Zs(a).hoistableScripts,r=n.get(t),r||(r={type:"script",instance:null,count:0,state:null},n.set(t,r)),r):{type:"void",instance:null,count:0,state:null};default:throw Error(G(444,e))}}function Oo(e){return'href="'+Jn(e)+'"'}function Sl(e){return'link[rel="stylesheet"]['+e+"]"}function vT(e){return it({},e,{"data-precedence":e.precedence,precedence:null})}function j5(e,t,n,r){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?r.loading=1:(t=e.createElement("link"),r.preload=t,t.addEventListener("load",function(){return r.loading|=1}),t.addEventListener("error",function(){return r.loading|=2}),Zt(t,"link",n),zt(t),e.head.appendChild(t))}function No(e){return'[src="'+Jn(e)+'"]'}function Al(e){return"script[async]"+e}function yT(e,t,n){if(t.count++,t.instance===null)switch(t.type){case"style":var r=e.querySelector('style[data-href~="'+Jn(n.href)+'"]');if(r)return t.instance=r,zt(r),r;var a=it({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement("style"),zt(r),Zt(r,"style",a),pf(r,n.precedence,e),t.instance=r;case"stylesheet":a=Oo(n.href);var i=e.querySelector(Sl(a));if(i)return t.state.loading|=4,t.instance=i,zt(i),i;r=vT(n),(a=lr.get(a))&&Jg(r,a),i=(e.ownerDocument||e).createElement("link"),zt(i);var s=i;return s._p=new Promise(function(o,u){s.onload=o,s.onerror=u}),Zt(i,"link",r),t.state.loading|=4,pf(i,n.precedence,e),t.instance=i;case"script":return i=No(n.src),(a=e.querySelector(Al(i)))?(t.instance=a,zt(a),a):(r=n,(a=lr.get(i))&&(r=it({},n),e0(r,a)),e=e.ownerDocument||e,a=e.createElement("script"),zt(a),Zt(a,"link",r),e.head.appendChild(a),t.instance=a);case"void":return null;default:throw Error(G(443,t.type))}else t.type==="stylesheet"&&!(t.state.loading&4)&&(r=t.instance,t.state.loading|=4,pf(r,n.precedence,e));return t.instance}function pf(e,t,n){for(var r=n.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),a=r.length?r[r.length-1]:null,i=a,s=0;s<r.length;s++){var o=r[s];if(o.dataset.precedence===t)i=o;else if(i!==a)break}i?i.parentNode.insertBefore(e,i.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function Jg(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function e0(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var hf=null;function xT(e,t,n){if(hf===null){var r=new Map,a=hf=new Map;a.set(n,r)}else a=hf,r=a.get(n),r||(r=new Map,a.set(n,r));if(r.has(e))return r;for(r.set(e,null),n=n.getElementsByTagName(e),a=0;a<n.length;a++){var i=n[a];if(!(i[ju]||i[rn]||e==="link"&&i.getAttribute("rel")==="stylesheet")&&i.namespaceURI!=="http://www.w3.org/2000/svg"){var s=i.getAttribute(t)||"";s=e+s;var o=r.get(s);o?o.push(i):r.set(s,[i])}}return r}function ET(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t==="title"?e.querySelector("head > title"):null)}function H5(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;switch(t.rel){case"stylesheet":return e=t.disabled,typeof t.precedence=="string"&&e==null;default:return!0}case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function wT(e){return!(e.type==="stylesheet"&&!(e.state.loading&3))}var Cl=null;function z5(){}function V5(e,t,n){if(Cl===null)throw Error(G(475));var r=Cl;if(t.type==="stylesheet"&&(typeof n.media!="string"||matchMedia(n.media).matches!==!1)&&!(t.state.loading&4)){if(t.instance===null){var a=Oo(n.href),i=e.querySelector(Sl(a));if(i){e=i._p,e!==null&&typeof e=="object"&&typeof e.then=="function"&&(r.count++,r=mf.bind(r),e.then(r,r)),t.state.loading|=4,t.instance=i,zt(i);return}i=e.ownerDocument||e,n=vT(n),(a=lr.get(a))&&Jg(n,a),i=i.createElement("link"),zt(i);var s=i;s._p=new Promise(function(o,u){s.onload=o,s.onerror=u}),Zt(i,"link",n),t.instance=i}r.stylesheets===null&&(r.stylesheets=new Map),r.stylesheets.set(t,e),(e=t.state.preload)&&!(t.state.loading&3)&&(r.count++,t=mf.bind(r),e.addEventListener("load",t),e.addEventListener("error",t))}}function Y5(){if(Cl===null)throw Error(G(475));var e=Cl;return e.stylesheets&&e.count===0&&t0(e,e.stylesheets),0<e.count?function(t){var n=setTimeout(function(){if(e.stylesheets&&t0(e,e.stylesheets),e.unsuspend){var r=e.unsuspend;e.unsuspend=null,r()}},6e4);return e.unsuspend=t,function(){e.unsuspend=null,clearTimeout(n)}}:null}function mf(){if(this.count--,this.count===0){if(this.stylesheets)t0(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var gf=null;function t0(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,gf=new Map,t.forEach(q5,e),gf=null,mf.call(e))}function q5(e,t){if(!(t.state.loading&4)){var n=gf.get(e);if(n)var r=n.get(null);else{n=new Map,gf.set(e,n);for(var a=e.querySelectorAll("link[data-precedence],style[data-precedence]"),i=0;i<a.length;i++){var s=a[i];(s.nodeName==="LINK"||s.getAttribute("media")!=="not all")&&(n.set(s.dataset.precedence,s),r=s)}r&&n.set(null,r)}a=t.instance,s=a.getAttribute("data-precedence"),i=n.get(s)||r,i===r&&n.set(null,a),n.set(s,a),this.count++,r=mf.bind(this),a.addEventListener("load",r),a.addEventListener("error",r),i?i.parentNode.insertBefore(a,i.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(a,e.firstChild)),t.state.loading|=4}}var kl={$$typeof:aa,Provider:null,Consumer:null,_currentValue:Ki,_currentValue2:Ki,_threadCount:0};function G5(e,t,n,r,a,i,s,o){this.tag=1,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=rm(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.finishedLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=rm(0),this.hiddenUpdates=rm(null),this.identifierPrefix=r,this.onUncaughtError=a,this.onCaughtError=i,this.onRecoverableError=s,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=o,this.incompleteTransitions=new Map}function TT(e,t,n,r,a,i,s,o,u,l,c,d){return e=new G5(e,t,n,s,o,u,l,d),t=1,i===!0&&(t|=24),i=or(3,null,null,t),e.current=i,i.stateNode=e,t=Mm(),t.refCount++,e.pooledCache=t,t.refCount++,i.memoizedState={element:r,isDehydrated:n,cache:t},pg(i),e}function _T(e){return e?(e=uo,e):uo}function ST(e,t,n,r,a,i){a=_T(a),r.context===null?r.context=a:r.pendingContext=a,r=ti(t),r.payload={element:n},i=i===void 0?null:i,i!==null&&(r.callback=i),n=ni(e,r,t),n!==null&&(vn(n,e,t),dl(n,e,t))}function AT(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function n0(e,t){AT(e,t),(e=e.alternate)&&AT(e,t)}function CT(e){if(e.tag===13){var t=Xa(e,67108864);t!==null&&vn(t,e,67108864),n0(e,67108864)}}var bf=!0;function $5(e,t,n,r){var a=xe.T;xe.T=null;var i=st.p;try{st.p=2,r0(e,t,n,r)}finally{st.p=i,xe.T=a}}function X5(e,t,n,r){var a=xe.T;xe.T=null;var i=st.p;try{st.p=8,r0(e,t,n,r)}finally{st.p=i,xe.T=a}}function r0(e,t,n,r){if(bf){var a=a0(r);if(a===null)qg(e,t,r,vf,n),RT(e,r);else if(K5(a,e,t,n,r))r.stopPropagation();else if(RT(e,r),t&4&&-1<W5.indexOf(e)){for(;a!==null;){var i=Qs(a);if(i!==null)switch(i.tag){case 3:if(i=i.stateNode,i.current.memoizedState.isDehydrated){var s=Qi(i.pendingLanes);if(s!==0){var o=i;for(o.pendingLanes|=2,o.entangledLanes|=2;s;){var u=1<<31-Ln(s);o.entanglements[1]|=u,s&=~u}zr(i),!(mt&6)&&(ef=Br()+500,wl(0))}}break;case 13:o=Xa(i,2),o!==null&&vn(o,i,2),rf(),n0(i,2)}if(i=a0(r),i===null&&qg(e,t,r,vf,n),i===a)break;a=i}a!==null&&r.stopPropagation()}else qg(e,t,r,null,n)}}function a0(e){return e=cm(e),i0(e)}var vf=null;function i0(e){if(vf=null,e=Zi(e),e!==null){var t=$s(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=Wy(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 vf=e,null}function kT(e){switch(e){case"beforetoggle":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"toggle":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 2;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"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(L4()){case Zy:return 2;case Jy:return 8;case fd:case I4:return 32;case ex:return 268435456;default:return 32}default:return 32}}var s0=!1,li=null,ci=null,di=null,Rl=new Map,Ol=new Map,fi=[],W5="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".split(" ");function RT(e,t){switch(e){case"focusin":case"focusout":li=null;break;case"dragenter":case"dragleave":ci=null;break;case"mouseover":case"mouseout":di=null;break;case"pointerover":case"pointerout":Rl.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Ol.delete(t.pointerId)}}function Nl(e,t,n,r,a,i){return e===null||e.nativeEvent!==i?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:i,targetContainers:[a]},t!==null&&(t=Qs(t),t!==null&&CT(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,a!==null&&t.indexOf(a)===-1&&t.push(a),e)}function K5(e,t,n,r,a){switch(t){case"focusin":return li=Nl(li,e,t,n,r,a),!0;case"dragenter":return ci=Nl(ci,e,t,n,r,a),!0;case"mouseover":return di=Nl(di,e,t,n,r,a),!0;case"pointerover":var i=a.pointerId;return Rl.set(i,Nl(Rl.get(i)||null,e,t,n,r,a)),!0;case"gotpointercapture":return i=a.pointerId,Ol.set(i,Nl(Ol.get(i)||null,e,t,n,r,a)),!0}return!1}function OT(e){var t=Zi(e.target);if(t!==null){var n=$s(t);if(n!==null){if(t=n.tag,t===13){if(t=Wy(n),t!==null){e.blockedOn=t,Y4(e.priority,function(){if(n.tag===13){var r=Fn(),a=Xa(n,r);a!==null&&vn(a,n,r),n0(n,r)}});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function yf(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=a0(e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);lm=r,n.target.dispatchEvent(r),lm=null}else return t=Qs(n),t!==null&&CT(t),e.blockedOn=n,!1;t.shift()}return!0}function NT(e,t,n){yf(e)&&n.delete(t)}function Q5(){s0=!1,li!==null&&yf(li)&&(li=null),ci!==null&&yf(ci)&&(ci=null),di!==null&&yf(di)&&(di=null),Rl.forEach(NT),Ol.forEach(NT)}function xf(e,t){e.blockedOn===t&&(e.blockedOn=null,s0||(s0=!0,It.unstable_scheduleCallback(It.unstable_NormalPriority,Q5)))}var Ef=null;function DT(e){Ef!==e&&(Ef=e,It.unstable_scheduleCallback(It.unstable_NormalPriority,function(){Ef===e&&(Ef=null);for(var t=0;t<e.length;t+=3){var n=e[t],r=e[t+1],a=e[t+2];if(typeof r!="function"){if(i0(r||n)===null)continue;break}var i=Qs(n);i!==null&&(e.splice(t,3),t-=3,Wm(i,{pending:!0,data:a,method:n.method,action:r},r,a))}}))}function Dl(e){function t(u){return xf(u,e)}li!==null&&xf(li,e),ci!==null&&xf(ci,e),di!==null&&xf(di,e),Rl.forEach(t),Ol.forEach(t);for(var n=0;n<fi.length;n++){var r=fi[n];r.blockedOn===e&&(r.blockedOn=null)}for(;0<fi.length&&(n=fi[0],n.blockedOn===null);)OT(n),n.blockedOn===null&&fi.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(r=0;r<n.length;r+=3){var a=n[r],i=n[r+1],s=a[Tn]||null;if(typeof i=="function")s||DT(n);else if(s){var o=null;if(i&&i.hasAttribute("formAction")){if(a=i,s=i[Tn]||null)o=s.formAction;else if(i0(a)!==null)continue}else o=s.action;typeof o=="function"?n[r+1]=o:(n.splice(r,3),r-=3),DT(n)}}}function o0(e){this._internalRoot=e}wf.prototype.render=o0.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(G(409));var n=t.current,r=Fn();ST(n,r,e,t,null,null)},wf.prototype.unmount=o0.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;e.tag===0&&Ao(),ST(e.current,2,null,e,null,null),rf(),t[Ks]=null}};function wf(e){this._internalRoot=e}wf.prototype.unstable_scheduleHydration=function(e){if(e){var t=sx();e={blockedOn:null,target:e,priority:t};for(var n=0;n<fi.length&&t!==0&&t<fi[n].priority;n++);fi.splice(n,0,e),n===0&&OT(e)}};var MT=Hy.version;if(MT!=="19.0.0")throw Error(G(527,MT,"19.0.0"));st.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(G(188)):(e=Object.keys(e).join(","),Error(G(268,e)));return e=N4(t),e=e!==null?Qy(e):null,e=e===null?null:e.stateNode,e};var Z5={bundleType:0,version:"19.0.0",rendererPackageName:"react-dom",currentDispatcherRef:xe,findFiberByHostInstance:Zi,reconcilerVersion:"19.0.0"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Tf=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Tf.isDisabled&&Tf.supportsFiber)try{Bu=Tf.inject(Z5),Mn=Tf}catch{}}sd.createRoot=function(e,t){if(!zy(e))throw Error(G(299));var n=!1,r="",a=KE,i=QE,s=ZE,o=null;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onUncaughtError!==void 0&&(a=t.onUncaughtError),t.onCaughtError!==void 0&&(i=t.onCaughtError),t.onRecoverableError!==void 0&&(s=t.onRecoverableError),t.unstable_transitionCallbacks!==void 0&&(o=t.unstable_transitionCallbacks)),t=TT(e,1,!1,null,null,n,r,a,i,s,o,null),e[Ks]=t.current,Yg(e.nodeType===8?e.parentNode:e),new o0(t)},sd.hydrateRoot=function(e,t,n){if(!zy(e))throw Error(G(299));var r=!1,a="",i=KE,s=QE,o=ZE,u=null,l=null;return n!=null&&(n.unstable_strictMode===!0&&(r=!0),n.identifierPrefix!==void 0&&(a=n.identifierPrefix),n.onUncaughtError!==void 0&&(i=n.onUncaughtError),n.onCaughtError!==void 0&&(s=n.onCaughtError),n.onRecoverableError!==void 0&&(o=n.onRecoverableError),n.unstable_transitionCallbacks!==void 0&&(u=n.unstable_transitionCallbacks),n.formState!==void 0&&(l=n.formState)),t=TT(e,1,!0,t,n??null,r,a,i,s,o,u,l),t.context=_T(null),n=t.current,r=Fn(),a=ti(r),a.callback=null,ni(n,a,r),t.current.lanes=r,Fu(t,r),zr(t),e[Ks]=t.current,Yg(e),new wf(t)},sd.version="19.0.0";function LT(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(LT)}catch(e){console.error(e)}}LT(),Iy.exports=sd;var J5=Iy.exports;const IT="3.0.57";function _f(e){"@babel/helpers - typeof";return _f=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},_f(e)}var eL=/^\s+/,tL=/\s+$/;function le(e,t){if(e=e||"",t=t||{},e instanceof le)return e;if(!(this instanceof le))return new le(e,t);var n=nL(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}le.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,a,i,s,o;return n=t.r/255,r=t.g/255,a=t.b/255,n<=.03928?i=n/12.92:i=Math.pow((n+.055)/1.055,2.4),r<=.03928?s=r/12.92:s=Math.pow((r+.055)/1.055,2.4),a<=.03928?o=a/12.92:o=Math.pow((a+.055)/1.055,2.4),.2126*i+.7152*s+.0722*o},setAlpha:function(t){return this._a=HT(t),this._roundA=Math.round(100*this._a)/100,this},toHsv:function(){var t=BT(this._r,this._g,this._b);return{h:t.h*360,s:t.s,v:t.v,a:this._a}},toHsvString:function(){var t=BT(this._r,this._g,this._b),n=Math.round(t.h*360),r=Math.round(t.s*100),a=Math.round(t.v*100);return this._a==1?"hsv("+n+", "+r+"%, "+a+"%)":"hsva("+n+", "+r+"%, "+a+"%, "+this._roundA+")"},toHsl:function(){var t=PT(this._r,this._g,this._b);return{h:t.h*360,s:t.s,l:t.l,a:this._a}},toHslString:function(){var t=PT(this._r,this._g,this._b),n=Math.round(t.h*360),r=Math.round(t.s*100),a=Math.round(t.l*100);return this._a==1?"hsl("+n+", "+r+"%, "+a+"%)":"hsla("+n+", "+r+"%, "+a+"%, "+this._roundA+")"},toHex:function(t){return UT(this._r,this._g,this._b,t)},toHexString:function(t){return"#"+this.toHex(t)},toHex8:function(t){return sL(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(ct(this._r,255)*100)+"%",g:Math.round(ct(this._g,255)*100)+"%",b:Math.round(ct(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+Math.round(ct(this._r,255)*100)+"%, "+Math.round(ct(this._g,255)*100)+"%, "+Math.round(ct(this._b,255)*100)+"%)":"rgba("+Math.round(ct(this._r,255)*100)+"%, "+Math.round(ct(this._g,255)*100)+"%, "+Math.round(ct(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:vL[UT(this._r,this._g,this._b,!0)]||!1},toFilter:function(t){var n="#"+FT(this._r,this._g,this._b,this._a),r=n,a=this._gradientType?"GradientType = 1, ":"";if(t){var i=le(t);r="#"+FT(i._r,i._g,i._b,i._a)}return"progid:DXImageTransform.Microsoft.gradient("+a+"startColorstr="+n+",endColorstr="+r+")"},toString:function(t){var n=!!t;t=t||this._format;var r=!1,a=this._a<1&&this._a>=0,i=!n&&a&&(t==="hex"||t==="hex6"||t==="hex3"||t==="hex4"||t==="hex8"||t==="name");return i?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 le(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(cL,arguments)},brighten:function(){return this._applyModification(dL,arguments)},darken:function(){return this._applyModification(fL,arguments)},desaturate:function(){return this._applyModification(oL,arguments)},saturate:function(){return this._applyModification(uL,arguments)},greyscale:function(){return this._applyModification(lL,arguments)},spin:function(){return this._applyModification(pL,arguments)},_applyCombination:function(t,n){return t.apply(null,[this].concat([].slice.call(n)))},analogous:function(){return this._applyCombination(gL,arguments)},complement:function(){return this._applyCombination(hL,arguments)},monochromatic:function(){return this._applyCombination(bL,arguments)},splitcomplement:function(){return this._applyCombination(mL,arguments)},triad:function(){return this._applyCombination(jT,[3])},tetrad:function(){return this._applyCombination(jT,[4])}},le.fromRatio=function(e,t){if(_f(e)=="object"){var n={};for(var r in e)e.hasOwnProperty(r)&&(r==="a"?n[r]=e[r]:n[r]=Ml(e[r]));e=n}return le(e,t)};function nL(e){var t={r:0,g:0,b:0},n=1,r=null,a=null,i=null,s=!1,o=!1;return typeof e=="string"&&(e=wL(e)),_f(e)=="object"&&(wa(e.r)&&wa(e.g)&&wa(e.b)?(t=rL(e.r,e.g,e.b),s=!0,o=String(e.r).substr(-1)==="%"?"prgb":"rgb"):wa(e.h)&&wa(e.s)&&wa(e.v)?(r=Ml(e.s),a=Ml(e.v),t=iL(e.h,r,a),s=!0,o="hsv"):wa(e.h)&&wa(e.s)&&wa(e.l)&&(r=Ml(e.s),i=Ml(e.l),t=aL(e.h,r,i),s=!0,o="hsl"),e.hasOwnProperty("a")&&(n=e.a)),n=HT(n),{ok:s,format:e.format||o,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 rL(e,t,n){return{r:ct(e,255)*255,g:ct(t,255)*255,b:ct(n,255)*255}}function PT(e,t,n){e=ct(e,255),t=ct(t,255),n=ct(n,255);var r=Math.max(e,t,n),a=Math.min(e,t,n),i,s,o=(r+a)/2;if(r==a)i=s=0;else{var u=r-a;switch(s=o>.5?u/(2-r-a):u/(r+a),r){case e:i=(t-n)/u+(t<n?6:0);break;case t:i=(n-e)/u+2;break;case n:i=(e-t)/u+4;break}i/=6}return{h:i,s,l:o}}function aL(e,t,n){var r,a,i;e=ct(e,360),t=ct(t,100),n=ct(n,100);function s(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=a=i=n;else{var o=n<.5?n*(1+t):n+t-n*t,u=2*n-o;r=s(u,o,e+1/3),a=s(u,o,e),i=s(u,o,e-1/3)}return{r:r*255,g:a*255,b:i*255}}function BT(e,t,n){e=ct(e,255),t=ct(t,255),n=ct(n,255);var r=Math.max(e,t,n),a=Math.min(e,t,n),i,s,o=r,u=r-a;if(s=r===0?0:u/r,r==a)i=0;else{switch(r){case e:i=(t-n)/u+(t<n?6:0);break;case t:i=(n-e)/u+2;break;case n:i=(e-t)/u+4;break}i/=6}return{h:i,s,v:o}}function iL(e,t,n){e=ct(e,360)*6,t=ct(t,100),n=ct(n,100);var r=Math.floor(e),a=e-r,i=n*(1-t),s=n*(1-a*t),o=n*(1-(1-a)*t),u=r%6,l=[n,s,i,i,o,n][u],c=[o,n,n,s,i,i][u],d=[i,i,o,n,n,s][u];return{r:l*255,g:c*255,b:d*255}}function UT(e,t,n,r){var a=[Sr(Math.round(e).toString(16)),Sr(Math.round(t).toString(16)),Sr(Math.round(n).toString(16))];return r&&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[0].charAt(0)+a[1].charAt(0)+a[2].charAt(0):a.join("")}function sL(e,t,n,r,a){var i=[Sr(Math.round(e).toString(16)),Sr(Math.round(t).toString(16)),Sr(Math.round(n).toString(16)),Sr(zT(r))];return a&&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[3].charAt(0)==i[3].charAt(1)?i[0].charAt(0)+i[1].charAt(0)+i[2].charAt(0)+i[3].charAt(0):i.join("")}function FT(e,t,n,r){var a=[Sr(zT(r)),Sr(Math.round(e).toString(16)),Sr(Math.round(t).toString(16)),Sr(Math.round(n).toString(16))];return a.join("")}le.equals=function(e,t){return!e||!t?!1:le(e).toRgbString()==le(t).toRgbString()},le.random=function(){return le.fromRatio({r:Math.random(),g:Math.random(),b:Math.random()})};function oL(e,t){t=t===0?0:t||10;var n=le(e).toHsl();return n.s-=t/100,n.s=Sf(n.s),le(n)}function uL(e,t){t=t===0?0:t||10;var n=le(e).toHsl();return n.s+=t/100,n.s=Sf(n.s),le(n)}function lL(e){return le(e).desaturate(100)}function cL(e,t){t=t===0?0:t||10;var n=le(e).toHsl();return n.l+=t/100,n.l=Sf(n.l),le(n)}function dL(e,t){t=t===0?0:t||10;var n=le(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)))),le(n)}function fL(e,t){t=t===0?0:t||10;var n=le(e).toHsl();return n.l-=t/100,n.l=Sf(n.l),le(n)}function pL(e,t){var n=le(e).toHsl(),r=(n.h+t)%360;return n.h=r<0?360+r:r,le(n)}function hL(e){var t=le(e).toHsl();return t.h=(t.h+180)%360,le(t)}function jT(e,t){if(isNaN(t)||t<=0)throw new Error("Argument to polyad must be a positive number");for(var n=le(e).toHsl(),r=[le(e)],a=360/t,i=1;i<t;i++)r.push(le({h:(n.h+i*a)%360,s:n.s,l:n.l}));return r}function mL(e){var t=le(e).toHsl(),n=t.h;return[le(e),le({h:(n+72)%360,s:t.s,l:t.l}),le({h:(n+216)%360,s:t.s,l:t.l})]}function gL(e,t,n){t=t||6,n=n||30;var r=le(e).toHsl(),a=360/n,i=[le(e)];for(r.h=(r.h-(a*t>>1)+720)%360;--t;)r.h=(r.h+a)%360,i.push(le(r));return i}function bL(e,t){t=t||6;for(var n=le(e).toHsv(),r=n.h,a=n.s,i=n.v,s=[],o=1/t;t--;)s.push(le({h:r,s:a,v:i})),i=(i+o)%1;return s}le.mix=function(e,t,n){n=n===0?0:n||50;var r=le(e).toRgb(),a=le(t).toRgb(),i=n/100,s={r:(a.r-r.r)*i+r.r,g:(a.g-r.g)*i+r.g,b:(a.b-r.b)*i+r.b,a:(a.a-r.a)*i+r.a};return le(s)},le.readability=function(e,t){var n=le(e),r=le(t);return(Math.max(n.getLuminance(),r.getLuminance())+.05)/(Math.min(n.getLuminance(),r.getLuminance())+.05)},le.isReadable=function(e,t,n){var r=le.readability(e,t),a,i;switch(i=!1,a=TL(n),a.level+a.size){case"AAsmall":case"AAAlarge":i=r>=4.5;break;case"AAlarge":i=r>=3;break;case"AAAsmall":i=r>=7;break}return i},le.mostReadable=function(e,t,n){var r=null,a=0,i,s,o,u;n=n||{},s=n.includeFallbackColors,o=n.level,u=n.size;for(var l=0;l<t.length;l++)i=le.readability(e,t[l]),i>a&&(a=i,r=le(t[l]));return le.isReadable(e,r,{level:o,size:u})||!s?r:(n.includeFallbackColors=!1,le.mostReadable(e,["#fff","#000"],n))};var u0=le.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"},vL=le.hexNames=yL(u0);function yL(e){var t={};for(var n in e)e.hasOwnProperty(n)&&(t[e[n]]=n);return t}function HT(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function ct(e,t){xL(e)&&(e="100%");var n=EL(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 Sf(e){return Math.min(1,Math.max(0,e))}function jn(e){return parseInt(e,16)}function xL(e){return typeof e=="string"&&e.indexOf(".")!=-1&&parseFloat(e)===1}function EL(e){return typeof e=="string"&&e.indexOf("%")!=-1}function Sr(e){return e.length==1?"0"+e:""+e}function Ml(e){return e<=1&&(e=e*100+"%"),e}function zT(e){return Math.round(parseFloat(e)*255).toString(16)}function VT(e){return jn(e)/255}var Ar=function(){var e="[-\\+]?\\d+%?",t="[-\\+]?\\d*\\.\\d+%?",n="(?:"+t+")|(?:"+e+")",r="[\\s|\\(]+("+n+")[,|\\s]+("+n+")[,|\\s]+("+n+")\\s*\\)?",a="[\\s|\\(]+("+n+")[,|\\s]+("+n+")[,|\\s]+("+n+")[,|\\s]+("+n+")\\s*\\)?";return{CSS_UNIT:new RegExp(n),rgb:new RegExp("rgb"+r),rgba:new RegExp("rgba"+a),hsl:new RegExp("hsl"+r),hsla:new RegExp("hsla"+a),hsv:new RegExp("hsv"+r),hsva:new RegExp("hsva"+a),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 wa(e){return!!Ar.CSS_UNIT.exec(e)}function wL(e){e=e.replace(eL,"").replace(tL,"").toLowerCase();var t=!1;if(u0[e])e=u0[e],t=!0;else if(e=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var n;return(n=Ar.rgb.exec(e))?{r:n[1],g:n[2],b:n[3]}:(n=Ar.rgba.exec(e))?{r:n[1],g:n[2],b:n[3],a:n[4]}:(n=Ar.hsl.exec(e))?{h:n[1],s:n[2],l:n[3]}:(n=Ar.hsla.exec(e))?{h:n[1],s:n[2],l:n[3],a:n[4]}:(n=Ar.hsv.exec(e))?{h:n[1],s:n[2],v:n[3]}:(n=Ar.hsva.exec(e))?{h:n[1],s:n[2],v:n[3],a:n[4]}:(n=Ar.hex8.exec(e))?{r:jn(n[1]),g:jn(n[2]),b:jn(n[3]),a:VT(n[4]),format:t?"name":"hex8"}:(n=Ar.hex6.exec(e))?{r:jn(n[1]),g:jn(n[2]),b:jn(n[3]),format:t?"name":"hex"}:(n=Ar.hex4.exec(e))?{r:jn(n[1]+""+n[1]),g:jn(n[2]+""+n[2]),b:jn(n[3]+""+n[3]),a:VT(n[4]+""+n[4]),format:t?"name":"hex8"}:(n=Ar.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 TL(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 _L=350,YT=400,qT=600,l0={widgetMinHeight:"min-h-[400px]",widgetMaxHeight:"max-h-[600px]",widgetHeight:"h-[600px]"},GT=({primary:e="hsl(0, 0%, 0%)"})=>{const t=le(e).toHsl(),n=le(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 SL(e){if(typeof Proxy>"u")return e;const t=new Map,n=(...r)=>e(...r);return new Proxy(n,{get:(r,a)=>a==="create"?e:(t.has(a)||t.set(a,e(a)),t.get(a))})}function Ll(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}const c0=e=>Array.isArray(e);function $T(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 Il(e){return typeof e=="string"||Array.isArray(e)}function XT(e){const t=[{},{}];return e==null||e.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function d0(e,t,n,r){if(typeof t=="function"){const[a,i]=XT(r);t=t(n!==void 0?n:e.custom,a,i)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[a,i]=XT(r);t=t(n!==void 0?n:e.custom,a,i)}return t}function Af(e,t,n){const r=e.getProps();return d0(r,t,n!==void 0?n:r.custom,e)}const f0=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],p0=["initial",...f0],Pl=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],pi=new Set(Pl),Ta=e=>e*1e3,_a=e=>e/1e3,AL={type:"spring",stiffness:500,damping:25,restSpeed:10},CL=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),kL={type:"keyframes",duration:.8},RL={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},OL=(e,{keyframes:t})=>t.length>2?kL:pi.has(e)?e.startsWith("scale")?CL(t[1]):AL:RL;function h0(e,t){return e?e[t]||e.default||e:void 0}const NL={skipAnimations:!1,useManualTiming:!1},DL=e=>e!==null;function Cf(e,{repeat:t,repeatType:n="loop"},r){const a=e.filter(DL),i=t&&n!=="loop"&&t%2===1?0:a.length-1;return!i||r===void 0?a[i]:r}const sn=e=>e;function ML(e){let t=new Set,n=new Set,r=!1,a=!1;const i=new WeakSet;let s={delta:0,timestamp:0,isProcessing:!1};function o(l){i.has(l)&&(u.schedule(l),e()),l(s)}const u={schedule:(l,c=!1,d=!1)=>{const p=d&&r?t:n;return c&&i.add(l),p.has(l)||p.add(l),l},cancel:l=>{n.delete(l),i.delete(l)},process:l=>{if(s=l,r){a=!0;return}r=!0,[t,n]=[n,t],n.clear(),t.forEach(o),r=!1,a&&(a=!1,u.process(l))}};return u}const kf=["read","resolveKeyframes","update","preRender","render","postRender"],LL=40;function WT(e,t){let n=!1,r=!0;const a={delta:0,timestamp:0,isProcessing:!1},i=()=>n=!0,s=kf.reduce((m,y)=>(m[y]=ML(i),m),{}),{read:o,resolveKeyframes:u,update:l,preRender:c,render:d,postRender:f}=s,p=()=>{const m=performance.now();n=!1,a.delta=r?1e3/60:Math.max(Math.min(m-a.timestamp,LL),1),a.timestamp=m,a.isProcessing=!0,o.process(a),u.process(a),l.process(a),c.process(a),d.process(a),f.process(a),a.isProcessing=!1,n&&t&&(r=!1,e(p))},g=()=>{n=!0,r=!0,a.isProcessing||e(p)};return{schedule:kf.reduce((m,y)=>{const x=s[y];return m[y]=(T,_=!1,A=!1)=>(n||g(),x.schedule(T,_,A)),m},{}),cancel:m=>{for(let y=0;y<kf.length;y++)s[kf[y]].cancel(m)},state:a,steps:s}}const{schedule:Qe,cancel:hi,state:Jt,steps:m0}=WT(typeof requestAnimationFrame<"u"?requestAnimationFrame:sn,!0),KT=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,IL=1e-7,PL=12;function BL(e,t,n,r,a){let i,s,o=0;do s=t+(n-t)/2,i=KT(s,r,a)-e,i>0?n=s:t=s;while(Math.abs(i)>IL&&++o<PL);return s}function Bl(e,t,n,r){if(e===t&&n===r)return sn;const a=i=>BL(i,0,1,e,n);return i=>i===0||i===1?i:KT(a(i),t,r)}const QT=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,ZT=e=>t=>1-e(1-t),JT=Bl(.33,1.53,.69,.99),g0=ZT(JT),e2=QT(g0),t2=e=>(e*=2)<1?.5*g0(e):.5*(2-Math.pow(2,-10*(e-1))),b0=e=>1-Math.sin(Math.acos(e)),n2=ZT(b0),r2=QT(b0),a2=e=>/^0[^.\s]+$/u.test(e);function UL(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||a2(e):!0}let v0=sn;const i2=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),s2=e=>t=>typeof t=="string"&&t.startsWith(e),o2=s2("--"),FL=s2("var(--"),y0=e=>FL(e)?jL.test(e.split("/*")[0].trim()):!1,jL=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,HL=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function zL(e){const t=HL.exec(e);if(!t)return[,];const[,n,r,a]=t;return[`--${n??r}`,a]}function u2(e,t,n=1){const[r,a]=zL(e);if(!r)return;const i=window.getComputedStyle(t).getPropertyValue(r);if(i){const s=i.trim();return i2(s)?parseFloat(s):s}return y0(a)?u2(a,t,n+1):a}const mi=(e,t,n)=>n>t?t:n<e?e:n,Do={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Ul={...Do,transform:e=>mi(0,1,e)},Rf={...Do,default:1},Fl=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),gi=Fl("deg"),Vr=Fl("%"),pe=Fl("px"),VL=Fl("vh"),YL=Fl("vw"),l2={...Vr,parse:e=>Vr.parse(e)/100,transform:e=>Vr.transform(e*100)},qL=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),c2=e=>e===Do||e===pe,d2=(e,t)=>parseFloat(e.split(", ")[t]),f2=(e,t)=>(n,{transform:r})=>{if(r==="none"||!r)return 0;const a=r.match(/^matrix3d\((.+)\)$/u);if(a)return d2(a[1],t);{const i=r.match(/^matrix\((.+)\)$/u);return i?d2(i[1],e):0}},GL=new Set(["x","y","z"]),$L=Pl.filter(e=>!GL.has(e));function XL(e){const t=[];return $L.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const Mo={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:f2(4,13),y:f2(5,14)};Mo.translateX=Mo.x,Mo.translateY=Mo.y;const p2=e=>t=>t.test(e),h2=[Do,pe,Vr,gi,YL,VL,{test:e=>e==="auto",parse:e=>e}],m2=e=>h2.find(p2(e)),ys=new Set;let x0=!1,E0=!1;function g2(){if(E0){const e=Array.from(ys).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const a=XL(r);a.length&&(n.set(r,a),r.render())}),e.forEach(r=>r.measureInitialState()),t.forEach(r=>{r.render();const a=n.get(r);a&&a.forEach(([i,s])=>{var o;(o=r.getValue(i))===null||o===void 0||o.set(s)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}E0=!1,x0=!1,ys.forEach(e=>e.complete()),ys.clear()}function b2(){ys.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(E0=!0)})}function WL(){b2(),g2()}class w0{constructor(t,n,r,a,i,s=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=r,this.motionValue=a,this.element=i,this.isAsync=s}scheduleResolve(){this.isScheduled=!0,this.isAsync?(ys.add(this),x0||(x0=!0,Qe.read(b2),Qe.resolveKeyframes(g2))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:a}=this;for(let i=0;i<t.length;i++)if(t[i]===null)if(i===0){const s=a==null?void 0:a.get(),o=t[t.length-1];if(s!==void 0)t[0]=s;else if(r&&n){const u=r.readValue(n,o);u!=null&&(t[0]=u)}t[0]===void 0&&(t[0]=o),a&&s===void 0&&a.set(t[0])}else t[i]=t[i-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),ys.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,ys.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const jl=e=>Math.round(e*1e5)/1e5,T0=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function KL(e){return e==null}const QL=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,_0=(e,t)=>n=>!!(typeof n=="string"&&QL.test(n)&&n.startsWith(e)||t&&!KL(n)&&Object.prototype.hasOwnProperty.call(n,t)),v2=(e,t,n)=>r=>{if(typeof r!="string")return r;const[a,i,s,o]=r.match(T0);return{[e]:parseFloat(a),[t]:parseFloat(i),[n]:parseFloat(s),alpha:o!==void 0?parseFloat(o):1}},ZL=e=>mi(0,255,e),S0={...Do,transform:e=>Math.round(ZL(e))},xs={test:_0("rgb","red"),parse:v2("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+S0.transform(e)+", "+S0.transform(t)+", "+S0.transform(n)+", "+jl(Ul.transform(r))+")"};function JL(e){let t="",n="",r="",a="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),a=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),a=e.substring(4,5),t+=t,n+=n,r+=r,a+=a),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:a?parseInt(a,16)/255:1}}const A0={test:_0("#"),parse:JL,transform:xs.transform},Lo={test:_0("hsl","hue"),parse:v2("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+Vr.transform(jl(t))+", "+Vr.transform(jl(n))+", "+jl(Ul.transform(r))+")"},on={test:e=>xs.test(e)||A0.test(e)||Lo.test(e),parse:e=>xs.test(e)?xs.parse(e):Lo.test(e)?Lo.parse(e):A0.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?xs.transform(e):Lo.transform(e)},eI=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function tI(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(T0))===null||t===void 0?void 0:t.length)||0)+(((n=e.match(eI))===null||n===void 0?void 0:n.length)||0)>0}const y2="number",x2="color",nI="var",rI="var(",E2="${}",aI=/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 Hl(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},a=[];let i=0;const o=t.replace(aI,u=>(on.test(u)?(r.color.push(i),a.push(x2),n.push(on.parse(u))):u.startsWith(rI)?(r.var.push(i),a.push(nI),n.push(u)):(r.number.push(i),a.push(y2),n.push(parseFloat(u))),++i,E2)).split(E2);return{values:n,split:o,indexes:r,types:a}}function w2(e){return Hl(e).values}function T2(e){const{split:t,types:n}=Hl(e),r=t.length;return a=>{let i="";for(let s=0;s<r;s++)if(i+=t[s],a[s]!==void 0){const o=n[s];o===y2?i+=jl(a[s]):o===x2?i+=on.transform(a[s]):i+=a[s]}return i}}const iI=e=>typeof e=="number"?0:e;function sI(e){const t=w2(e);return T2(e)(t.map(iI))}const bi={test:tI,parse:w2,createTransformer:T2,getAnimatableNone:sI},oI=new Set(["brightness","contrast","saturate","opacity"]);function uI(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(T0)||[];if(!r)return e;const a=n.replace(r,"");let i=oI.has(t)?1:0;return r!==n&&(i*=100),t+"("+i+a+")"}const lI=/\b([a-z-]*)\(.*?\)/gu,C0={...bi,getAnimatableNone:e=>{const t=e.match(lI);return t?t.map(uI).join(" "):e}},cI={borderWidth:pe,borderTopWidth:pe,borderRightWidth:pe,borderBottomWidth:pe,borderLeftWidth:pe,borderRadius:pe,radius:pe,borderTopLeftRadius:pe,borderTopRightRadius:pe,borderBottomRightRadius:pe,borderBottomLeftRadius:pe,width:pe,maxWidth:pe,height:pe,maxHeight:pe,top:pe,right:pe,bottom:pe,left:pe,padding:pe,paddingTop:pe,paddingRight:pe,paddingBottom:pe,paddingLeft:pe,margin:pe,marginTop:pe,marginRight:pe,marginBottom:pe,marginLeft:pe,backgroundPositionX:pe,backgroundPositionY:pe},dI={rotate:gi,rotateX:gi,rotateY:gi,rotateZ:gi,scale:Rf,scaleX:Rf,scaleY:Rf,scaleZ:Rf,skew:gi,skewX:gi,skewY:gi,distance:pe,translateX:pe,translateY:pe,translateZ:pe,x:pe,y:pe,z:pe,perspective:pe,transformPerspective:pe,opacity:Ul,originX:l2,originY:l2,originZ:pe},_2={...Do,transform:Math.round},k0={...cI,...dI,zIndex:_2,size:pe,fillOpacity:Ul,strokeOpacity:Ul,numOctaves:_2},fI={...k0,color:on,backgroundColor:on,outlineColor:on,fill:on,stroke:on,borderColor:on,borderTopColor:on,borderRightColor:on,borderBottomColor:on,borderLeftColor:on,filter:C0,WebkitFilter:C0},R0=e=>fI[e];function S2(e,t){let n=R0(e);return n!==C0&&(n=bi),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const pI=new Set(["auto","none","0"]);function hI(e,t,n){let r=0,a;for(;r<e.length&&!a;){const i=e[r];typeof i=="string"&&!pI.has(i)&&Hl(i).values.length&&(a=e[r]),r++}if(a&&n)for(const i of t)e[i]=S2(n,a)}class A2 extends w0{constructor(t,n,r,a,i){super(t,n,r,a,i,!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(),y0(l))){const c=u2(l,n.current);c!==void 0&&(t[u]=c),u===t.length-1&&(this.finalKeyframe=l)}}if(this.resolveNoneKeyframes(),!qL.has(r)||t.length!==2)return;const[a,i]=t,s=m2(a),o=m2(i);if(s!==o)if(c2(s)&&c2(o))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 a=0;a<t.length;a++)UL(t[a])&&r.push(a);r.length&&hI(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=Mo[r](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const a=n[n.length-1];a!==void 0&&t.getValue(r,a).jump(a,!1)}measureEndState(){var t;const{element:n,name:r,unresolvedKeyframes:a}=this;if(!n||!n.current)return;const i=n.getValue(r);i&&i.jump(this.measuredOrigin,!1);const s=a.length-1,o=a[s];a[s]=Mo[r](n.measureViewportBox(),window.getComputedStyle(n.current)),o!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=o),!((t=this.removedTransforms)===null||t===void 0)&&t.length&&this.removedTransforms.forEach(([u,l])=>{n.getValue(u).set(l)}),this.resolveNoneKeyframes()}}function O0(e){return typeof e=="function"}let Of;function mI(){Of=void 0}const Yr={now:()=>(Of===void 0&&Yr.set(Jt.isProcessing||NL.useManualTiming?Jt.timestamp:performance.now()),Of),set:e=>{Of=e,queueMicrotask(mI)}},C2=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(bi.test(e)||e==="0")&&!e.startsWith("url("));function gI(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 bI(e,t,n,r){const a=e[0];if(a===null)return!1;if(t==="display"||t==="visibility")return!0;const i=e[e.length-1],s=C2(a,t),o=C2(i,t);return!s||!o?!1:gI(e)||(n==="spring"||O0(n))&&r}const vI=40;class k2{constructor({autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:a=0,repeatDelay:i=0,repeatType:s="loop",...o}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.createdAt=Yr.now(),this.options={autoplay:t,delay:n,type:r,repeat:a,repeatDelay:i,repeatType:s,...o},this.updateFinishedPromise()}calcStartTime(){return this.resolvedAt?this.resolvedAt-this.createdAt>vI?this.resolvedAt:this.createdAt:this.createdAt}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&WL(),this._resolved}onKeyframesResolved(t,n){this.resolvedAt=Yr.now(),this.hasAttemptedResolve=!0;const{name:r,type:a,velocity:i,delay:s,onComplete:o,onUpdate:u,isGenerator:l}=this.options;if(!l&&!bI(t,r,a,i))if(s)this.options.duration=0;else{u==null||u(Cf(t,this.options,n)),o==null||o(),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 R2(e,t){return t?e*(1e3/t):0}const yI=5;function O2(e,t,n){const r=Math.max(t-yI,0);return R2(n-e(r),t-r)}const N0=.001,xI=.01,EI=10,wI=.05,TI=1;function _I({duration:e=800,bounce:t=.25,velocity:n=0,mass:r=1}){let a,i,s=1-t;s=mi(wI,TI,s),e=mi(xI,EI,_a(e)),s<1?(a=l=>{const c=l*s,d=c*e,f=c-n,p=D0(l,s),g=Math.exp(-d);return N0-f/p*g},i=l=>{const d=l*s*e,f=d*n+n,p=Math.pow(s,2)*Math.pow(l,2)*e,g=Math.exp(-d),v=D0(Math.pow(l,2),s);return(-a(l)+N0>0?-1:1)*((f-p)*g)/v}):(a=l=>{const c=Math.exp(-l*e),d=(l-n)*e+1;return-N0+c*d},i=l=>{const c=Math.exp(-l*e),d=(n-l)*(e*e);return c*d});const o=5/e,u=AI(a,i,o);if(e=Ta(e),isNaN(u))return{stiffness:100,damping:10,duration:e};{const l=Math.pow(u,2)*r;return{stiffness:l,damping:s*2*Math.sqrt(r*l),duration:e}}}const SI=12;function AI(e,t,n){let r=n;for(let a=1;a<SI;a++)r=r-e(r)/t(r);return r}function D0(e,t){return e*Math.sqrt(1-t*t)}const CI=["duration","bounce"],kI=["stiffness","damping","mass"];function N2(e,t){return t.some(n=>e[n]!==void 0)}function RI(e){let t={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...e};if(!N2(e,kI)&&N2(e,CI)){const n=_I(e);t={...t,...n,mass:1},t.isResolvedFromDuration=!0}return t}function D2({keyframes:e,restDelta:t,restSpeed:n,...r}){const a=e[0],i=e[e.length-1],s={done:!1,value:a},{stiffness:o,damping:u,mass:l,duration:c,velocity:d,isResolvedFromDuration:f}=RI({...r,velocity:-_a(r.velocity||0)}),p=d||0,g=u/(2*Math.sqrt(o*l)),v=i-a,w=_a(Math.sqrt(o/l)),m=Math.abs(v)<5;n||(n=m?.01:2),t||(t=m?.005:.5);let y;if(g<1){const x=D0(w,g);y=T=>{const _=Math.exp(-g*w*T);return i-_*((p+g*w*v)/x*Math.sin(x*T)+v*Math.cos(x*T))}}else if(g===1)y=x=>i-Math.exp(-w*x)*(v+(p+w*v)*x);else{const x=w*Math.sqrt(g*g-1);y=T=>{const _=Math.exp(-g*w*T),A=Math.min(x*T,300);return i-_*((p+g*w*v)*Math.sinh(A)+x*v*Math.cosh(A))/x}}return{calculatedDuration:f&&c||null,next:x=>{const T=y(x);if(f)s.done=x>=c;else{let _=0;g<1&&(_=x===0?Ta(p):O2(y,x,T));const A=Math.abs(_)<=n,C=Math.abs(i-T)<=t;s.done=A&&C}return s.value=s.done?i:T,s}}}function M2({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:a=10,bounceStiffness:i=500,modifyTarget:s,min:o,max:u,restDelta:l=.5,restSpeed:c}){const d=e[0],f={done:!1,value:d},p=M=>o!==void 0&&M<o||u!==void 0&&M>u,g=M=>o===void 0?u:u===void 0||Math.abs(o-M)<Math.abs(u-M)?o:u;let v=n*t;const w=d+v,m=s===void 0?w:s(w);m!==w&&(v=m-d);const y=M=>-v*Math.exp(-M/r),x=M=>m+y(M),T=M=>{const j=y(M),N=x(M);f.done=Math.abs(j)<=l,f.value=f.done?m:N};let _,A;const C=M=>{p(f.value)&&(_=M,A=D2({keyframes:[f.value,g(f.value)],velocity:O2(x,M,f.value),damping:a,stiffness:i,restDelta:l,restSpeed:c}))};return C(0),{calculatedDuration:null,next:M=>{let j=!1;return!A&&_===void 0&&(j=!0,T(M),C(M)),_!==void 0&&M>=_?A.next(M-_):(!j&&T(M),f)}}}const OI=Bl(.42,0,1,1),NI=Bl(0,0,.58,1),L2=Bl(.42,0,.58,1),DI=e=>Array.isArray(e)&&typeof e[0]!="number",M0=e=>Array.isArray(e)&&typeof e[0]=="number",I2={linear:sn,easeIn:OI,easeInOut:L2,easeOut:NI,circIn:b0,circInOut:r2,circOut:n2,backIn:g0,backInOut:e2,backOut:JT,anticipate:t2},P2=e=>{if(M0(e)){v0(e.length===4);const[t,n,r,a]=e;return Bl(t,n,r,a)}else if(typeof e=="string")return v0(I2[e]!==void 0),I2[e];return e},MI=(e,t)=>n=>t(e(n)),Sa=(...e)=>e.reduce(MI),Io=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r},gt=(e,t,n)=>e+(t-e)*n;function L0(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 LI({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let a=0,i=0,s=0;if(!t)a=i=s=n;else{const o=n<.5?n*(1+t):n+t-n*t,u=2*n-o;a=L0(u,o,e+1/3),i=L0(u,o,e),s=L0(u,o,e-1/3)}return{red:Math.round(a*255),green:Math.round(i*255),blue:Math.round(s*255),alpha:r}}function Nf(e,t){return n=>n>0?t:e}const I0=(e,t,n)=>{const r=e*e,a=n*(t*t-r)+r;return a<0?0:Math.sqrt(a)},II=[A0,xs,Lo],PI=e=>II.find(t=>t.test(e));function B2(e){const t=PI(e);if(!t)return!1;let n=t.parse(e);return t===Lo&&(n=LI(n)),n}const U2=(e,t)=>{const n=B2(e),r=B2(t);if(!n||!r)return Nf(e,t);const a={...n};return i=>(a.red=I0(n.red,r.red,i),a.green=I0(n.green,r.green,i),a.blue=I0(n.blue,r.blue,i),a.alpha=gt(n.alpha,r.alpha,i),xs.transform(a))},P0=new Set(["none","hidden"]);function BI(e,t){return P0.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function UI(e,t){return n=>gt(e,t,n)}function B0(e){return typeof e=="number"?UI:typeof e=="string"?y0(e)?Nf:on.test(e)?U2:HI:Array.isArray(e)?F2:typeof e=="object"?on.test(e)?U2:FI:Nf}function F2(e,t){const n=[...e],r=n.length,a=e.map((i,s)=>B0(i)(i,t[s]));return i=>{for(let s=0;s<r;s++)n[s]=a[s](i);return n}}function FI(e,t){const n={...e,...t},r={};for(const a in n)e[a]!==void 0&&t[a]!==void 0&&(r[a]=B0(e[a])(e[a],t[a]));return a=>{for(const i in r)n[i]=r[i](a);return n}}function jI(e,t){var n;const r=[],a={color:0,var:0,number:0};for(let i=0;i<t.values.length;i++){const s=t.types[i],o=e.indexes[s][a[s]],u=(n=e.values[o])!==null&&n!==void 0?n:0;r[i]=u,a[s]++}return r}const HI=(e,t)=>{const n=bi.createTransformer(t),r=Hl(e),a=Hl(t);return r.indexes.var.length===a.indexes.var.length&&r.indexes.color.length===a.indexes.color.length&&r.indexes.number.length>=a.indexes.number.length?P0.has(e)&&!a.values.length||P0.has(t)&&!r.values.length?BI(e,t):Sa(F2(jI(r,a),a.values),n):Nf(e,t)};function j2(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?gt(e,t,n):B0(e)(e,t)}function zI(e,t,n){const r=[],a=n||j2,i=e.length-1;for(let s=0;s<i;s++){let o=a(e[s],e[s+1]);if(t){const u=Array.isArray(t)?t[s]||sn:t;o=Sa(u,o)}r.push(o)}return r}function VI(e,t,{clamp:n=!0,ease:r,mixer:a}={}){const i=e.length;if(v0(i===t.length),i===1)return()=>t[0];if(i===2&&e[0]===e[1])return()=>t[1];e[0]>e[i-1]&&(e=[...e].reverse(),t=[...t].reverse());const s=zI(t,r,a),o=s.length,u=l=>{let c=0;if(o>1)for(;c<e.length-2&&!(l<e[c+1]);c++);const d=Io(e[c],e[c+1],l);return s[c](d)};return n?l=>u(mi(e[0],e[i-1],l)):u}function YI(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const a=Io(0,t,r);e.push(gt(n,1,a))}}function qI(e){const t=[0];return YI(t,e.length-1),t}function GI(e,t){return e.map(n=>n*t)}function $I(e,t){return e.map(()=>t||L2).splice(0,e.length-1)}function Df({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const a=DI(r)?r.map(P2):P2(r),i={done:!1,value:t[0]},s=GI(n&&n.length===t.length?n:qI(t),e),o=VI(s,t,{ease:Array.isArray(a)?a:$I(t,a)});return{calculatedDuration:e,next:u=>(i.value=o(u),i.done=u>=e,i)}}const H2=2e4;function XI(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<H2;)t+=n,r=e.next(t);return t>=H2?1/0:t}const WI=e=>{const t=({timestamp:n})=>e(n);return{start:()=>Qe.update(t,!0),stop:()=>hi(t),now:()=>Jt.isProcessing?Jt.timestamp:Yr.now()}},KI={decay:M2,inertia:M2,tween:Df,keyframes:Df,spring:D2},QI=e=>e/100;class U0 extends k2{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:a,keyframes:i}=this.options,s=(a==null?void 0:a.KeyframeResolver)||w0,o=(u,l)=>this.onKeyframesResolved(u,l);this.resolver=new s(i,o,n,r,a),this.resolver.scheduleResolve()}initPlayback(t){const{type:n="keyframes",repeat:r=0,repeatDelay:a=0,repeatType:i,velocity:s=0}=this.options,o=O0(n)?n:KI[n]||Df;let u,l;o!==Df&&typeof t[0]!="number"&&(u=Sa(QI,j2(t[0],t[1])),t=[0,100]);const c=o({...this.options,keyframes:t});i==="mirror"&&(l=o({...this.options,keyframes:[...t].reverse(),velocity:-s})),c.calculatedDuration===null&&(c.calculatedDuration=XI(c));const{calculatedDuration:d}=c,f=d+a,p=f*(r+1)-a;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:M}=this.options;return{done:!0,value:M[M.length-1]}}const{finalKeyframe:a,generator:i,mirroredGenerator:s,mapPercentToKeyframes:o,keyframes:u,calculatedDuration:l,totalDuration:c,resolvedDuration:d}=r;if(this.startTime===null)return i.next(0);const{delay:f,repeat:p,repeatType:g,repeatDelay:v,onUpdate:w}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-c/this.speed,this.startTime)),n?this.currentTime=t:this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=Math.round(t-this.startTime)*this.speed;const m=this.currentTime-f*(this.speed>=0?1:-1),y=this.speed>=0?m<0:m>c;this.currentTime=Math.max(m,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=c);let x=this.currentTime,T=i;if(p){const M=Math.min(this.currentTime,c)/d;let j=Math.floor(M),N=M%1;!N&&M>=1&&(N=1),N===1&&j--,j=Math.min(j,p+1),!!(j%2)&&(g==="reverse"?(N=1-N,v&&(N-=v/d)):g==="mirror"&&(T=s)),x=mi(0,1,N)*d}const _=y?{done:!1,value:u[0]}:T.next(x);o&&(_.value=o(_.value));let{done:A}=_;!y&&l!==null&&(A=this.speed>=0?this.currentTime>=c:this.currentTime<=0);const C=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&A);return C&&a!==void 0&&(_.value=Cf(u,this.options,a)),w&&w(_.value),C&&this.finish(),_}get duration(){const{resolved:t}=this;return t?_a(t.calculatedDuration):0}get time(){return _a(this.currentTime)}set time(t){t=Ta(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=_a(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:t=WI,onPlay:n,startTime:r}=this.options;this.driver||(this.driver=t(i=>this.tick(i))),n&&n();const a=this.driver.now();this.holdTime!==null?this.startTime=a-this.holdTime:this.startTime?this.state==="finished"&&(this.startTime=a):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 z2=new Set(["opacity","clipPath","filter","transform"]),ZI=10,JI=(e,t)=>{let n="";const r=Math.max(Math.round(t/ZI),2);for(let a=0;a<r;a++)n+=e(Io(0,r-1,a))+", ";return`linear(${n.substring(0,n.length-2)})`};function F0(e){let t;return()=>(t===void 0&&(t=e()),t)}const eP={linearEasing:void 0};function tP(e,t){const n=F0(e);return()=>{var r;return(r=eP[t])!==null&&r!==void 0?r:n()}}const Mf=tP(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing");function V2(e){return!!(typeof e=="function"&&Mf()||!e||typeof e=="string"&&(e in j0||Mf())||M0(e)||Array.isArray(e)&&e.every(V2))}const zl=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,j0={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:zl([0,.65,.55,1]),circOut:zl([.55,0,1,.45]),backIn:zl([.31,.01,.66,-.59]),backOut:zl([.33,1.53,.69,.99])};function Y2(e,t){if(e)return typeof e=="function"&&Mf()?JI(e,t):M0(e)?zl(e):Array.isArray(e)?e.map(n=>Y2(n,t)||j0.easeOut):j0[e]}function nP(e,t,n,{delay:r=0,duration:a=300,repeat:i=0,repeatType:s="loop",ease:o,times:u}={}){const l={[t]:n};u&&(l.offset=u);const c=Y2(o,a);return Array.isArray(c)&&(l.easing=c),e.animate(l,{delay:r,duration:a,easing:Array.isArray(c)?"linear":c,fill:"both",iterations:i+1,direction:s==="reverse"?"alternate":"normal"})}function q2(e,t){e.timeline=t,e.onfinish=null}const rP=F0(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),Lf=10,aP=2e4;function iP(e){return O0(e.type)||e.type==="spring"||!V2(e.ease)}function sP(e,t){const n=new U0({...t,keyframes:e,repeat:0,delay:0,isGenerator:!0});let r={done:!1,value:e[0]};const a=[];let i=0;for(;!r.done&&i<aP;)r=n.sample(i),a.push(r.value),i+=Lf;return{times:void 0,keyframes:a,duration:i-Lf,ease:"linear"}}const G2={anticipate:t2,backInOut:e2,circInOut:r2};function oP(e){return e in G2}class $2 extends k2{constructor(t){super(t);const{name:n,motionValue:r,element:a,keyframes:i}=this.options;this.resolver=new A2(i,(s,o)=>this.onKeyframesResolved(s,o),n,r,a),this.resolver.scheduleResolve()}initPlayback(t,n){var r;let{duration:a=300,times:i,ease:s,type:o,motionValue:u,name:l,startTime:c}=this.options;if(!(!((r=u.owner)===null||r===void 0)&&r.current))return!1;if(typeof s=="string"&&Mf()&&oP(s)&&(s=G2[s]),iP(this.options)){const{onComplete:f,onUpdate:p,motionValue:g,element:v,...w}=this.options,m=sP(t,w);t=m.keyframes,t.length===1&&(t[1]=t[0]),a=m.duration,i=m.times,s=m.ease,o="keyframes"}const d=nP(u.owner.current,l,t,{...this.options,duration:a,times:i,ease:s});return d.startTime=c??this.calcStartTime(),this.pendingTimeline?(q2(d,this.pendingTimeline),this.pendingTimeline=void 0):d.onfinish=()=>{const{onComplete:f}=this.options;u.set(Cf(t,this.options,n)),f&&f(),this.cancel(),this.resolveFinishedPromise()},{animation:d,duration:a,times:i,type:o,ease:s,keyframes:t}}get duration(){const{resolved:t}=this;if(!t)return 0;const{duration:n}=t;return _a(n)}get time(){const{resolved:t}=this;if(!t)return 0;const{animation:n}=t;return _a(n.currentTime||0)}set time(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.currentTime=Ta(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 sn;const{animation:r}=n;q2(r,t)}return sn}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:a,type:i,ease:s,times:o}=t;if(n.playState==="idle"||n.playState==="finished")return;if(this.time){const{motionValue:l,onUpdate:c,onComplete:d,element:f,...p}=this.options,g=new U0({...p,keyframes:r,duration:a,type:i,ease:s,times:o,isGenerator:!0}),v=Ta(this.time);l.setWithVelocity(g.sample(v-Lf).value,g.sample(v).value,Lf)}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:a,repeatType:i,damping:s,type:o}=t;return rP()&&r&&z2.has(r)&&n&&n.owner&&n.owner.current instanceof HTMLElement&&!n.owner.getProps().onUpdate&&!a&&i!=="mirror"&&s!==0&&o!=="inertia"}}const uP=F0(()=>window.ScrollTimeline!==void 0);class lP{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(a=>uP()&&a.attachTimeline?a.attachTimeline(t):n(a));return()=>{r.forEach((a,i)=>{a&&a(),this.animations[i].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 cP({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:a,repeat:i,repeatType:s,repeatDelay:o,from:u,elapsed:l,...c}){return!!Object.keys(c).length}const H0=(e,t,n,r={},a,i)=>s=>{const o=h0(r,e)||{},u=o.delay||r.delay||0;let{elapsed:l=0}=r;l=l-Ta(u);let c={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...o,delay:-l,onUpdate:f=>{t.set(f),o.onUpdate&&o.onUpdate(f)},onComplete:()=>{s(),o.onComplete&&o.onComplete()},name:e,motionValue:t,element:i?void 0:a};cP(o)||(c={...c,...OL(e,c)}),c.duration&&(c.duration=Ta(c.duration)),c.repeatDelay&&(c.repeatDelay=Ta(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&&!i&&t.get()!==void 0){const f=Cf(c.keyframes,o);if(f!==void 0)return Qe.update(()=>{c.onUpdate(f),c.onComplete()}),new lP([])}return!i&&$2.supports(c)?new $2(c):new U0(c)},dP=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),fP=e=>c0(e)?e[e.length-1]||0:e;function z0(e,t){e.indexOf(t)===-1&&e.push(t)}function V0(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}class Y0{constructor(){this.subscriptions=[]}add(t){return z0(this.subscriptions,t),()=>V0(this.subscriptions,t)}notify(t,n,r){const a=this.subscriptions.length;if(a)if(a===1)this.subscriptions[0](t,n,r);else for(let i=0;i<a;i++){const s=this.subscriptions[i];s&&s(t,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const X2=30,pP=e=>!isNaN(parseFloat(e));class hP{constructor(t,n={}){this.version="11.11.9",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(r,a=!0)=>{const i=Yr.now();this.updatedAt!==i&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),a&&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=Yr.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=pP(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 Y0);const r=this.events[t].add(n);return t==="change"?()=>{r(),Qe.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=Yr.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>X2)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,X2);return R2(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 Vl(e,t){return new hP(e,t)}function mP(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Vl(n))}function gP(e,t){const n=Af(e,t);let{transitionEnd:r={},transition:a={},...i}=n||{};i={...i,...r};for(const s in i){const o=fP(i[s]);mP(e,s,o)}}const If=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),W2="data-"+If("framerAppearId");function K2(e){return e.props[W2]}const un=e=>!!(e&&e.getVelocity);function bP(e){return!!(un(e)&&e.add)}function q0(e,t){if(!e.applyWillChange)return;const n=e.getValue("willChange");if(bP(n))return n.add(t)}function vP({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function Q2(e,t,{delay:n=0,transitionOverride:r,type:a}={}){var i;let{transition:s=e.getDefaultTransition(),transitionEnd:o,...u}=t;r&&(s=r);const l=[],c=a&&e.animationState&&e.animationState.getState()[a];for(const d in u){const f=e.getValue(d,(i=e.latestValues[d])!==null&&i!==void 0?i:null),p=u[d];if(p===void 0||c&&vP(c,d))continue;const g={delay:n,...h0(s||{},d)};let v=!1;if(window.MotionHandoffAnimation){const m=K2(e);if(m){const y=window.MotionHandoffAnimation(m,d,Qe);y!==null&&(g.startTime=y,v=!0)}}q0(e,d),f.start(H0(d,f,p,e.shouldReduceMotion&&pi.has(d)?{type:!1}:g,e,v));const w=f.animation;w&&l.push(w)}return o&&Promise.all(l).then(()=>{Qe.update(()=>{o&&gP(e,o)})}),l}function G0(e,t,n={}){var r;const a=Af(e,t,n.type==="exit"?(r=e.presenceContext)===null||r===void 0?void 0:r.custom:void 0);let{transition:i=e.getDefaultTransition()||{}}=a||{};n.transitionOverride&&(i=n.transitionOverride);const s=a?()=>Promise.all(Q2(e,a,n)):()=>Promise.resolve(),o=e.variantChildren&&e.variantChildren.size?(l=0)=>{const{delayChildren:c=0,staggerChildren:d,staggerDirection:f}=i;return yP(e,t,c+l,d,f,n)}:()=>Promise.resolve(),{when:u}=i;if(u){const[l,c]=u==="beforeChildren"?[s,o]:[o,s];return l().then(()=>c())}else return Promise.all([s(),o(n.delay)])}function yP(e,t,n=0,r=0,a=1,i){const s=[],o=(e.variantChildren.size-1)*r,u=a===1?(l=0)=>l*r:(l=0)=>o-l*r;return Array.from(e.variantChildren).sort(xP).forEach((l,c)=>{l.notify("AnimationStart",t),s.push(G0(l,t,{...i,delay:n+u(c)}).then(()=>l.notify("AnimationComplete",t)))}),Promise.all(s)}function xP(e,t){return e.sortNodePosition(t)}function EP(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const a=t.map(i=>G0(e,i,n));r=Promise.all(a)}else if(typeof t=="string")r=G0(e,t,n);else{const a=typeof t=="function"?Af(e,t,n.custom):t;r=Promise.all(Q2(e,a,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}const wP=p0.length;function Z2(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?Z2(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<wP;n++){const r=p0[n],a=e.props[r];(Il(a)||a===!1)&&(t[r]=a)}return t}const TP=[...f0].reverse(),_P=f0.length;function SP(e){return t=>Promise.all(t.map(({animation:n,options:r})=>EP(e,n,r)))}function AP(e){let t=SP(e),n=J2(),r=!0;const a=u=>(l,c)=>{var d;const f=Af(e,c,u==="exit"?(d=e.presenceContext)===null||d===void 0?void 0:d.custom:void 0);if(f){const{transition:p,transitionEnd:g,...v}=f;l={...l,...v,...g}}return l};function i(u){t=u(e)}function s(u){const{props:l}=e,c=Z2(e.parent)||{},d=[],f=new Set;let p={},g=1/0;for(let w=0;w<_P;w++){const m=TP[w],y=n[m],x=l[m]!==void 0?l[m]:c[m],T=Il(x),_=m===u?y.isActive:null;_===!1&&(g=w);let A=x===c[m]&&x!==l[m]&&T;if(A&&r&&e.manuallyAnimateOnMount&&(A=!1),y.protectedKeys={...p},!y.isActive&&_===null||!x&&!y.prevProp||Ll(x)||typeof x=="boolean")continue;const C=CP(y.prevProp,x);let M=C||m===u&&y.isActive&&!A&&T||w>g&&T,j=!1;const N=Array.isArray(x)?x:[x];let Y=N.reduce(a(m),{});_===!1&&(Y={});const{prevResolvedValues:H={}}=y,ee={...H,...Y},$=q=>{M=!0,f.has(q)&&(j=!0,f.delete(q)),y.needsAnimating[q]=!0;const z=e.getValue(q);z&&(z.liveStyle=!1)};for(const q in ee){const z=Y[q],V=H[q];if(p.hasOwnProperty(q))continue;let R=!1;c0(z)&&c0(V)?R=!$T(z,V):R=z!==V,R?z!=null?$(q):f.add(q):z!==void 0&&f.has(q)?$(q):y.protectedKeys[q]=!0}y.prevProp=x,y.prevResolvedValues=Y,y.isActive&&(p={...p,...Y}),r&&e.blockInitialAnimation&&(M=!1),M&&(!(A&&C)||j)&&d.push(...N.map(q=>({animation:q,options:{type:m}})))}if(f.size){const w={};f.forEach(m=>{const y=e.getBaseTarget(m),x=e.getValue(m);x&&(x.liveStyle=!0),w[m]=y??null}),d.push({animation:w})}let v=!!d.length;return r&&(l.initial===!1||l.initial===l.animate)&&!e.manuallyAnimateOnMount&&(v=!1),r=!1,v?t(d):Promise.resolve()}function o(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=s(u);for(const f in n)n[f].protectedKeys={};return d}return{animateChanges:s,setActive:o,setAnimateFunction:i,getState:()=>n,reset:()=>{n=J2(),r=!0}}}function CP(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!$T(t,e):!1}function Es(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function J2(){return{animate:Es(!0),whileInView:Es(),whileHover:Es(),whileTap:Es(),whileDrag:Es(),whileFocus:Es(),exit:Es()}}class vi{constructor(t){this.isMounted=!1,this.node=t}update(){}}class kP extends vi{constructor(t){super(t),t.animationState||(t.animationState=AP(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();Ll(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 RP=0;class OP extends vi{constructor(){super(...arguments),this.id=RP++}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 a=this.node.animationState.setActive("exit",!t);n&&!t&&a.then(()=>n(this.id))}mount(){const{register:t}=this.node.presenceContext||{};t&&(this.unmount=t(this.id))}unmount(){}}const NP={animation:{Feature:kP},exit:{Feature:OP}},e_=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1;function Pf(e,t="page"){return{point:{x:e[`${t}X`],y:e[`${t}Y`]}}}const DP=e=>t=>e_(t)&&e(t,Pf(t));function Aa(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function Ca(e,t,n,r){return Aa(e,t,DP(n),r)}const t_=(e,t)=>Math.abs(e-t);function MP(e,t){const n=t_(e.x,t.x),r=t_(e.y,t.y);return Math.sqrt(n**2+r**2)}class n_{constructor(t,n,{transformPagePoint:r,contextWindow:a,dragSnapToOrigin:i=!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=X0(this.lastMoveEventInfo,this.history),f=this.startEvent!==null,p=MP(d.offset,{x:0,y:0})>=3;if(!f&&!p)return;const{point:g}=d,{timestamp:v}=Jt;this.history.push({...g,timestamp:v});const{onStart:w,onMove:m}=this.handlers;f||(w&&w(this.lastMoveEvent,d),this.startEvent=this.lastMoveEvent),m&&m(this.lastMoveEvent,d)},this.handlePointerMove=(d,f)=>{this.lastMoveEvent=d,this.lastMoveEventInfo=$0(f,this.transformPagePoint),Qe.update(this.updatePoint,!0)},this.handlePointerUp=(d,f)=>{this.end();const{onEnd:p,onSessionEnd:g,resumeAnimation:v}=this.handlers;if(this.dragSnapToOrigin&&v&&v(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const w=X0(d.type==="pointercancel"?this.lastMoveEventInfo:$0(f,this.transformPagePoint),this.history);this.startEvent&&p&&p(d,w),g&&g(d,w)},!e_(t))return;this.dragSnapToOrigin=i,this.handlers=n,this.transformPagePoint=r,this.contextWindow=a||window;const s=Pf(t),o=$0(s,this.transformPagePoint),{point:u}=o,{timestamp:l}=Jt;this.history=[{...u,timestamp:l}];const{onSessionStart:c}=n;c&&c(t,X0(o,this.history)),this.removeListeners=Sa(Ca(this.contextWindow,"pointermove",this.handlePointerMove),Ca(this.contextWindow,"pointerup",this.handlePointerUp),Ca(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),hi(this.updatePoint)}}function $0(e,t){return t?{point:t(e.point)}:e}function r_(e,t){return{x:e.x-t.x,y:e.y-t.y}}function X0({point:e},t){return{point:e,delta:r_(e,a_(t)),offset:r_(e,LP(t)),velocity:IP(t,.1)}}function LP(e){return e[0]}function a_(e){return e[e.length-1]}function IP(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const a=a_(e);for(;n>=0&&(r=e[n],!(a.timestamp-r.timestamp>Ta(t)));)n--;if(!r)return{x:0,y:0};const i=_a(a.timestamp-r.timestamp);if(i===0)return{x:0,y:0};const s={x:(a.x-r.x)/i,y:(a.y-r.y)/i};return s.x===1/0&&(s.x=0),s.y===1/0&&(s.y=0),s}function i_(e){let t=null;return()=>{const n=()=>{t=null};return t===null?(t=e,n):!1}}const s_=i_("dragHorizontal"),o_=i_("dragVertical");function u_(e){let t=!1;if(e==="y")t=o_();else if(e==="x")t=s_();else{const n=s_(),r=o_();n&&r?t=()=>{n(),r()}:(n&&n(),r&&r())}return t}function l_(){const e=u_(!0);return e?(e(),!1):!0}function Po(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}const c_=1e-4,PP=1-c_,BP=1+c_,d_=.01,UP=0-d_,FP=0+d_;function Hn(e){return e.max-e.min}function jP(e,t,n){return Math.abs(e-t)<=n}function f_(e,t,n,r=.5){e.origin=r,e.originPoint=gt(t.min,t.max,e.origin),e.scale=Hn(n)/Hn(t),e.translate=gt(n.min,n.max,e.origin)-e.originPoint,(e.scale>=PP&&e.scale<=BP||isNaN(e.scale))&&(e.scale=1),(e.translate>=UP&&e.translate<=FP||isNaN(e.translate))&&(e.translate=0)}function Yl(e,t,n,r){f_(e.x,t.x,n.x,r?r.originX:void 0),f_(e.y,t.y,n.y,r?r.originY:void 0)}function p_(e,t,n){e.min=n.min+t.min,e.max=e.min+Hn(t)}function HP(e,t,n){p_(e.x,t.x,n.x),p_(e.y,t.y,n.y)}function h_(e,t,n){e.min=t.min-n.min,e.max=e.min+Hn(t)}function ql(e,t,n){h_(e.x,t.x,n.x),h_(e.y,t.y,n.y)}function zP(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?gt(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?gt(n,e,r.max):Math.min(e,n)),e}function m_(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 VP(e,{top:t,left:n,bottom:r,right:a}){return{x:m_(e.x,n,a),y:m_(e.y,t,r)}}function g_(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 YP(e,t){return{x:g_(e.x,t.x),y:g_(e.y,t.y)}}function qP(e,t){let n=.5;const r=Hn(e),a=Hn(t);return a>r?n=Io(t.min,t.max-r,e.min):r>a&&(n=Io(e.min,e.max-a,t.min)),mi(0,1,n)}function GP(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 W0=.35;function $P(e=W0){return e===!1?e=0:e===!0&&(e=W0),{x:b_(e,"left","right"),y:b_(e,"top","bottom")}}function b_(e,t,n){return{min:v_(e,t),max:v_(e,n)}}function v_(e,t){return typeof e=="number"?e:e[t]||0}const y_=()=>({translate:0,scale:1,origin:0,originPoint:0}),Bo=()=>({x:y_(),y:y_()}),x_=()=>({min:0,max:0}),At=()=>({x:x_(),y:x_()});function cr(e){return[e("x"),e("y")]}function E_({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function XP({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function WP(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 K0(e){return e===void 0||e===1}function Q0({scale:e,scaleX:t,scaleY:n}){return!K0(e)||!K0(t)||!K0(n)}function ws(e){return Q0(e)||w_(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function w_(e){return T_(e.x)||T_(e.y)}function T_(e){return e&&e!=="0%"}function Bf(e,t,n){const r=e-n,a=t*r;return n+a}function __(e,t,n,r,a){return a!==void 0&&(e=Bf(e,a,r)),Bf(e,n,r)+t}function Z0(e,t=0,n=1,r,a){e.min=__(e.min,t,n,r,a),e.max=__(e.max,t,n,r,a)}function S_(e,{x:t,y:n}){Z0(e.x,t.translate,t.scale,t.originPoint),Z0(e.y,n.translate,n.scale,n.originPoint)}const A_=.999999999999,C_=1.0000000000001;function KP(e,t,n,r=!1){const a=n.length;if(!a)return;t.x=t.y=1;let i,s;for(let o=0;o<a;o++){i=n[o],s=i.projectionDelta;const{visualElement:u}=i.options;u&&u.props.style&&u.props.style.display==="contents"||(r&&i.options.layoutScroll&&i.scroll&&i!==i.root&&Fo(e,{x:-i.scroll.offset.x,y:-i.scroll.offset.y}),s&&(t.x*=s.x.scale,t.y*=s.y.scale,S_(e,s)),r&&ws(i.latestValues)&&Fo(e,i.latestValues))}t.x<C_&&t.x>A_&&(t.x=1),t.y<C_&&t.y>A_&&(t.y=1)}function Uo(e,t){e.min=e.min+t,e.max=e.max+t}function k_(e,t,n,r,a=.5){const i=gt(e.min,e.max,a);Z0(e,t,n,i,r)}function Fo(e,t){k_(e.x,t.x,t.scaleX,t.scale,t.originX),k_(e.y,t.y,t.scaleY,t.scale,t.originY)}function R_(e,t){return E_(WP(e.getBoundingClientRect(),t))}function QP(e,t,n){const r=R_(e,n),{scroll:a}=t;return a&&(Uo(r.x,a.offset.x),Uo(r.y,a.offset.y)),r}const O_=({current:e})=>e?e.ownerDocument.defaultView:null,ZP=new WeakMap;class JP{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=At(),this.visualElement=t}start(t,{snapToCursor:n=!1}={}){const{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;const a=c=>{const{dragSnapToOrigin:d}=this.getProps();d?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(Pf(c,"page").point)},i=(c,d)=>{const{drag:f,dragPropagation:p,onDragStart:g}=this.getProps();if(f&&!p&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=u_(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),cr(w=>{let m=this.getAxisMotionValue(w).get()||0;if(Vr.test(m)){const{projection:y}=this.visualElement;if(y&&y.layout){const x=y.layout.layoutBox[w];x&&(m=Hn(x)*(parseFloat(m)/100))}}this.originPoint[w]=m}),g&&Qe.postRender(()=>g(c,d)),q0(this.visualElement,"transform");const{animationState:v}=this.visualElement;v&&v.setActive("whileDrag",!0)},s=(c,d)=>{const{dragPropagation:f,dragDirectionLock:p,onDirectionLock:g,onDrag:v}=this.getProps();if(!f&&!this.openGlobalLock)return;const{offset:w}=d;if(p&&this.currentDirection===null){this.currentDirection=e8(w),this.currentDirection!==null&&g&&g(this.currentDirection);return}this.updateAxis("x",d.point,w),this.updateAxis("y",d.point,w),this.visualElement.render(),v&&v(c,d)},o=(c,d)=>this.stop(c,d),u=()=>cr(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 n_(t,{onSessionStart:a,onStart:i,onMove:s,onSessionEnd:o,resumeAnimation:u},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:l,contextWindow:O_(this.visualElement)})}stop(t,n){const r=this.isDragging;if(this.cancel(),!r)return;const{velocity:a}=n;this.startAnimation(a);const{onDragEnd:i}=this.getProps();i&&Qe.postRender(()=>i(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:a}=this.getProps();if(!r||!Uf(t,a,this.currentDirection))return;const i=this.getAxisMotionValue(t);let s=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(s=zP(s,this.constraints[t],this.elastic[t])),i.set(s)}resolveConstraints(){var t;const{dragConstraints:n,dragElastic:r}=this.getProps(),a=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(t=this.visualElement.projection)===null||t===void 0?void 0:t.layout,i=this.constraints;n&&Po(n)?this.constraints||(this.constraints=this.resolveRefConstraints()):n&&a?this.constraints=VP(a.layoutBox,n):this.constraints=!1,this.elastic=$P(r),i!==this.constraints&&a&&this.constraints&&!this.hasMutatedConstraints&&cr(s=>{this.constraints!==!1&&this.getAxisMotionValue(s)&&(this.constraints[s]=GP(a.layoutBox[s],this.constraints[s]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!Po(t))return!1;const r=t.current,{projection:a}=this.visualElement;if(!a||!a.layout)return!1;const i=QP(r,a.root,this.visualElement.getTransformPagePoint());let s=YP(a.layout.layoutBox,i);if(n){const o=n(XP(s));this.hasMutatedConstraints=!!o,o&&(s=E_(o))}return s}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:a,dragTransition:i,dragSnapToOrigin:s,onDragTransitionEnd:o}=this.getProps(),u=this.constraints||{},l=cr(c=>{if(!Uf(c,n,this.currentDirection))return;let d=u&&u[c]||{};s&&(d={min:0,max:0});const f=a?200:1e6,p=a?40:1e7,g={type:"inertia",velocity:r?t[c]:0,bounceStiffness:f,bounceDamping:p,timeConstant:750,restDelta:1,restSpeed:10,...i,...d};return this.startAxisValueAnimation(c,g)});return Promise.all(l).then(o)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return q0(this.visualElement,t),r.start(H0(t,r,0,n,this.visualElement,!1))}stopAnimation(){cr(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){cr(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(),a=r[n];return a||this.visualElement.getValue(t,(r.initial?r.initial[t]:void 0)||0)}snapToCursor(t){cr(n=>{const{drag:r}=this.getProps();if(!Uf(n,r,this.currentDirection))return;const{projection:a}=this.visualElement,i=this.getAxisMotionValue(n);if(a&&a.layout){const{min:s,max:o}=a.layout.layoutBox[n];i.set(t[n]-gt(s,o,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!Po(n)||!r||!this.constraints)return;this.stopAnimation();const a={x:0,y:0};cr(s=>{const o=this.getAxisMotionValue(s);if(o&&this.constraints!==!1){const u=o.get();a[s]=qP({min:u,max:u},this.constraints[s])}});const{transformTemplate:i}=this.visualElement.getProps();this.visualElement.current.style.transform=i?i({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),cr(s=>{if(!Uf(s,t,null))return;const o=this.getAxisMotionValue(s),{min:u,max:l}=this.constraints[s];o.set(gt(u,l,a[s]))})}addListeners(){if(!this.visualElement.current)return;ZP.set(this.visualElement,this);const t=this.visualElement.current,n=Ca(t,"pointerdown",u=>{const{drag:l,dragListener:c=!0}=this.getProps();l&&c&&this.start(u)}),r=()=>{const{dragConstraints:u}=this.getProps();Po(u)&&u.current&&(this.constraints=this.resolveRefConstraints())},{projection:a}=this.visualElement,i=a.addEventListener("measure",r);a&&!a.layout&&(a.root&&a.root.updateScroll(),a.updateLayout()),Qe.read(r);const s=Aa(window,"resize",()=>this.scalePositionWithinConstraints()),o=a.addEventListener("didUpdate",({delta:u,hasLayoutChanged:l})=>{this.isDragging&&l&&(cr(c=>{const d=this.getAxisMotionValue(c);d&&(this.originPoint[c]+=u[c].translate,d.set(d.get()+u[c].translate))}),this.visualElement.render())});return()=>{s(),n(),i(),o&&o()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:a=!1,dragConstraints:i=!1,dragElastic:s=W0,dragMomentum:o=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:a,dragConstraints:i,dragElastic:s,dragMomentum:o}}}function Uf(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function e8(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class t8 extends vi{constructor(t){super(t),this.removeGroupControls=sn,this.removeListeners=sn,this.controls=new JP(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||sn}unmount(){this.removeGroupControls(),this.removeListeners()}}const N_=e=>(t,n)=>{e&&Qe.postRender(()=>e(t,n))};class n8 extends vi{constructor(){super(...arguments),this.removePointerDownListener=sn}onPointerDown(t){this.session=new n_(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:O_(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:a}=this.node.getProps();return{onSessionStart:N_(t),onStart:N_(n),onMove:r,onEnd:(i,s)=>{delete this.session,a&&Qe.postRender(()=>a(i,s))}}}mount(){this.removePointerDownListener=Ca(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 Ff=b.createContext(null);function r8(){const e=b.useContext(Ff);if(e===null)return[!0,null];const{isPresent:t,onExitComplete:n,register:r}=e,a=b.useId();b.useEffect(()=>r(a),[]);const i=b.useCallback(()=>n&&n(a),[a,n]);return!t&&n?[!1,i]:[!0]}const J0=b.createContext({}),D_=b.createContext({}),jf={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function M_(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Gl={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(pe.test(e))e=parseFloat(e);else return e;const n=M_(e,t.target.x),r=M_(e,t.target.y);return`${n}% ${r}%`}},a8={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,a=bi.parse(e);if(a.length>5)return r;const i=bi.createTransformer(e),s=typeof a[0]!="number"?1:0,o=n.x.scale*t.x,u=n.y.scale*t.y;a[0+s]/=o,a[1+s]/=u;const l=gt(o,u,.5);return typeof a[2+s]=="number"&&(a[2+s]/=l),typeof a[3+s]=="number"&&(a[3+s]/=l),i(a)}},Hf={};function i8(e){Object.assign(Hf,e)}const{schedule:eb,cancel:Ere}=WT(queueMicrotask,!1);class s8 extends b.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:a}=this.props,{projection:i}=t;i8(o8),i&&(n.group&&n.group.add(i),r&&r.register&&a&&r.register(i),i.root.didUpdate(),i.addEventListener("animationComplete",()=>{this.safeToRemove()}),i.setOptions({...i.options,onExitComplete:()=>this.safeToRemove()})),jf.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:a,isPresent:i}=this.props,s=r.projection;return s&&(s.isPresent=i,a||t.layoutDependency!==n||n===void 0?s.willUpdate():this.safeToRemove(),t.isPresent!==i&&(i?s.promote():s.relegate()||Qe.postRender(()=>{const o=s.getStack();(!o||!o.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),eb.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:a}=t;a&&(a.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(a),r&&r.deregister&&r.deregister(a))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function L_(e){const[t,n]=r8(),r=b.useContext(J0);return E.jsx(s8,{...e,layoutGroup:r,switchLayoutGroup:b.useContext(D_),isPresent:t,safeToRemove:n})}const o8={borderRadius:{...Gl,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Gl,borderTopRightRadius:Gl,borderBottomLeftRadius:Gl,borderBottomRightRadius:Gl,boxShadow:a8},I_=["TopLeft","TopRight","BottomLeft","BottomRight"],u8=I_.length,P_=e=>typeof e=="string"?parseFloat(e):e,B_=e=>typeof e=="number"||pe.test(e);function l8(e,t,n,r,a,i){a?(e.opacity=gt(0,n.opacity!==void 0?n.opacity:1,c8(r)),e.opacityExit=gt(t.opacity!==void 0?t.opacity:1,0,d8(r))):i&&(e.opacity=gt(t.opacity!==void 0?t.opacity:1,n.opacity!==void 0?n.opacity:1,r));for(let s=0;s<u8;s++){const o=`border${I_[s]}Radius`;let u=U_(t,o),l=U_(n,o);if(u===void 0&&l===void 0)continue;u||(u=0),l||(l=0),u===0||l===0||B_(u)===B_(l)?(e[o]=Math.max(gt(P_(u),P_(l),r),0),(Vr.test(l)||Vr.test(u))&&(e[o]+="%")):e[o]=l}(t.rotate||n.rotate)&&(e.rotate=gt(t.rotate||0,n.rotate||0,r))}function U_(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const c8=F_(0,.5,n2),d8=F_(.5,.95,sn);function F_(e,t,n){return r=>r<e?0:r>t?1:n(Io(e,t,r))}function j_(e,t){e.min=t.min,e.max=t.max}function dr(e,t){j_(e.x,t.x),j_(e.y,t.y)}function H_(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function z_(e,t,n,r,a){return e-=t,e=Bf(e,1/n,r),a!==void 0&&(e=Bf(e,1/a,r)),e}function f8(e,t=0,n=1,r=.5,a,i=e,s=e){if(Vr.test(t)&&(t=parseFloat(t),t=gt(s.min,s.max,t/100)-s.min),typeof t!="number")return;let o=gt(i.min,i.max,r);e===i&&(o-=t),e.min=z_(e.min,t,n,o,a),e.max=z_(e.max,t,n,o,a)}function V_(e,t,[n,r,a],i,s){f8(e,t[n],t[r],t[a],t.scale,i,s)}const p8=["x","scaleX","originX"],h8=["y","scaleY","originY"];function Y_(e,t,n,r){V_(e.x,t,p8,n?n.x:void 0,r?r.x:void 0),V_(e.y,t,h8,n?n.y:void 0,r?r.y:void 0)}function q_(e){return e.translate===0&&e.scale===1}function G_(e){return q_(e.x)&&q_(e.y)}function $_(e,t){return e.min===t.min&&e.max===t.max}function m8(e,t){return $_(e.x,t.x)&&$_(e.y,t.y)}function X_(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function W_(e,t){return X_(e.x,t.x)&&X_(e.y,t.y)}function K_(e){return Hn(e.x)/Hn(e.y)}function Q_(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class g8{constructor(){this.members=[]}add(t){z0(this.members,t),t.scheduleRender()}remove(t){if(V0(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(a=>t===a);if(n===0)return!1;let r;for(let a=n;a>=0;a--){const i=this.members[a];if(i.isPresent!==!1){r=i;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:a}=t.options;a===!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 b8(e,t,n){let r="";const a=e.x.translate/t.x,i=e.y.translate/t.y,s=(n==null?void 0:n.z)||0;if((a||i||s)&&(r=`translate3d(${a}px, ${i}px, ${s}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:g}=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) `),g&&(r+=`skewY(${g}deg) `)}const o=e.x.scale*t.x,u=e.y.scale*t.y;return(o!==1||u!==1)&&(r+=`scale(${o}, ${u})`),r||"none"}const v8=(e,t)=>e.depth-t.depth;class y8{constructor(){this.children=[],this.isDirty=!1}add(t){z0(this.children,t),this.isDirty=!0}remove(t){V0(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(v8),this.isDirty=!1,this.children.forEach(t)}}function zf(e){const t=un(e)?e.get():e;return dP(t)?t.toValue():t}function x8(e,t){const n=Yr.now(),r=({timestamp:a})=>{const i=a-n;i>=t&&(hi(r),e(i-t))};return Qe.read(r,!0),()=>hi(r)}function E8(e){return e instanceof SVGElement&&e.tagName!=="svg"}function w8(e,t,n){const r=un(e)?e:Vl(e);return r.start(H0("",r,t,n)),r.animation}const Ts={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0},$l=typeof window<"u"&&window.MotionDebug!==void 0,tb=["","X","Y","Z"],T8={visibility:"hidden"},Z_=1e3;let _8=0;function nb(e,t,n,r){const{latestValues:a}=t;a[e]&&(n[e]=a[e],t.setStaticValue(e,0),r&&(r[e]=0))}function J_(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=K2(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:a,layoutId:i}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",Qe,!(a||i))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&J_(r)}function eS({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:a}){return class{constructor(s={},o=t==null?void 0:t()){this.id=_8++,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,$l&&(Ts.totalNodes=Ts.resolvedTargetDeltas=Ts.recalculatedProjection=0),this.nodes.forEach(C8),this.nodes.forEach(D8),this.nodes.forEach(M8),this.nodes.forEach(k8),$l&&window.MotionDebug.record(Ts)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=s,this.root=o?o.root||o:this,this.path=o?[...o.path,o]:[],this.parent=o,this.depth=o?o.depth+1:0;for(let u=0;u<this.path.length;u++)this.path[u].shouldResetTransform=!0;this.root===this&&(this.nodes=new y8)}addEventListener(s,o){return this.eventHandlers.has(s)||this.eventHandlers.set(s,new Y0),this.eventHandlers.get(s).add(o)}notifyListeners(s,...o){const u=this.eventHandlers.get(s);u&&u.notify(...o)}hasListeners(s){return this.eventHandlers.has(s)}mount(s,o=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=E8(s),this.instance=s;const{layoutId:u,layout:l,visualElement:c}=this.options;if(c&&!c.current&&c.mount(s),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),o&&(l||u)&&(this.isLayoutDirty=!0),e){let d;const f=()=>this.root.updateBlockedByResize=!1;e(s,()=>{this.root.updateBlockedByResize=!0,d&&d(),d=x8(f,250),jf.hasAnimatedSinceResize&&(jf.hasAnimatedSinceResize=!1,this.nodes.forEach(nS))})}u&&this.root.registerSharedNode(u,this),this.options.animate!==!1&&c&&(u||l)&&this.addEventListener("didUpdate",({delta:d,hasLayoutChanged:f,hasRelativeTargetChanged:p,layout:g})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const v=this.options.transition||c.getDefaultTransition()||U8,{onLayoutAnimationStart:w,onLayoutAnimationComplete:m}=c.getProps(),y=!this.targetLayout||!W_(this.targetLayout,g)||p,x=!f&&p;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||x||f&&(y||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(d,x);const T={...h0(v,"layout"),onPlay:w,onComplete:m};(c.shouldReduceMotion||this.options.layoutRoot)&&(T.delay=0,T.type=!1),this.startAnimation(T)}else f||nS(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=g})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const s=this.getStack();s&&s.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,hi(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(L8),this.animationId++)}getTransformTemplate(){const{visualElement:s}=this.options;return s&&s.getProps().transformTemplate}willUpdate(s=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&J_(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:o,layout:u}=this.options;if(o===void 0&&!u)return;const l=this.getTransformTemplate();this.prevTransformTemplateValue=l?l(this.latestValues,""):void 0,this.updateSnapshot(),s&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(tS);return}this.isUpdating||this.nodes.forEach(O8),this.isUpdating=!1,this.nodes.forEach(N8),this.nodes.forEach(S8),this.nodes.forEach(A8),this.clearAllSnapshots();const o=Yr.now();Jt.delta=mi(0,1e3/60,o-Jt.timestamp),Jt.timestamp=o,Jt.isProcessing=!0,m0.update.process(Jt),m0.preRender.process(Jt),m0.render.process(Jt),Jt.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,eb.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(R8),this.sharedNodes.forEach(I8)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,Qe.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){Qe.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 s=this.layout;this.layout=this.measure(!1),this.layoutCorrected=At(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:o}=this.options;o&&o.notify("LayoutMeasure",this.layout.layoutBox,s?s.layoutBox:void 0)}updateScroll(s="measure"){let o=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===s&&(o=!1),o){const u=r(this.instance);this.scroll={animationId:this.root.animationId,phase:s,isRoot:u,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:u}}}resetTransform(){if(!a)return;const s=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,o=this.projectionDelta&&!G_(this.projectionDelta),u=this.getTransformTemplate(),l=u?u(this.latestValues,""):void 0,c=l!==this.prevTransformTemplateValue;s&&(o||ws(this.latestValues)||c)&&(a(this.instance,l),this.shouldResetTransform=!1,this.scheduleRender())}measure(s=!0){const o=this.measurePageBox();let u=this.removeElementScroll(o);return s&&(u=this.removeTransform(u)),F8(u),{animationId:this.root.animationId,measuredBox:o,layoutBox:u,latestValues:{},source:this.id}}measurePageBox(){var s;const{visualElement:o}=this.options;if(!o)return At();const u=o.measureViewportBox();if(!(((s=this.scroll)===null||s===void 0?void 0:s.wasRoot)||this.path.some(j8))){const{scroll:c}=this.root;c&&(Uo(u.x,c.offset.x),Uo(u.y,c.offset.y))}return u}removeElementScroll(s){var o;const u=At();if(dr(u,s),!((o=this.scroll)===null||o===void 0)&&o.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&&dr(u,s),Uo(u.x,d.offset.x),Uo(u.y,d.offset.y))}return u}applyTransform(s,o=!1){const u=At();dr(u,s);for(let l=0;l<this.path.length;l++){const c=this.path[l];!o&&c.options.layoutScroll&&c.scroll&&c!==c.root&&Fo(u,{x:-c.scroll.offset.x,y:-c.scroll.offset.y}),ws(c.latestValues)&&Fo(u,c.latestValues)}return ws(this.latestValues)&&Fo(u,this.latestValues),u}removeTransform(s){const o=At();dr(o,s);for(let u=0;u<this.path.length;u++){const l=this.path[u];if(!l.instance||!ws(l.latestValues))continue;Q0(l.latestValues)&&l.updateSnapshot();const c=At(),d=l.measurePageBox();dr(c,d),Y_(o,l.latestValues,l.snapshot?l.snapshot.layoutBox:void 0,c)}return ws(this.latestValues)&&Y_(o,this.latestValues),o}setTargetDelta(s){this.targetDelta=s,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(s){this.options={...this.options,...s,crossfade:s.crossfade!==void 0?s.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!==Jt.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(s=!1){var o;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(!(s||l&&this.isSharedProjectionDirty||this.isProjectionDirty||!((o=this.parent)===null||o===void 0)&&o.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:d,layoutId:f}=this.options;if(!(!this.layout||!(d||f))){if(this.resolvedRelativeTargetAt=Jt.timestamp,!this.targetDelta&&!this.relativeTarget){const p=this.getClosestProjectingParent();p&&p.layout&&this.animationProgress!==1?(this.relativeParent=p,this.forceRelativeParentToResolveTarget(),this.relativeTarget=At(),this.relativeTargetOrigin=At(),ql(this.relativeTargetOrigin,this.layout.layoutBox,p.layout.layoutBox),dr(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)){if(this.target||(this.target=At(),this.targetWithTransforms=At()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),HP(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):dr(this.target,this.layout.layoutBox),S_(this.target,this.targetDelta)):dr(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=At(),this.relativeTargetOrigin=At(),ql(this.relativeTargetOrigin,this.target,p.target),dr(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}$l&&Ts.resolvedTargetDeltas++}}}getClosestProjectingParent(){if(!(!this.parent||Q0(this.parent.latestValues)||w_(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 s;const o=this.getLead(),u=!!this.resumingFrom||this!==o;let l=!0;if((this.isProjectionDirty||!((s=this.parent)===null||s===void 0)&&s.isProjectionDirty)&&(l=!1),u&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(l=!1),this.resolvedRelativeTargetAt===Jt.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;dr(this.layoutCorrected,this.layout.layoutBox);const f=this.treeScale.x,p=this.treeScale.y;KP(this.layoutCorrected,this.treeScale,this.path,u),o.layout&&!o.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(o.target=o.layout.layoutBox,o.targetWithTransforms=At());const{target:g}=o;if(!g){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(H_(this.prevProjectionDelta.x,this.projectionDelta.x),H_(this.prevProjectionDelta.y,this.projectionDelta.y)),Yl(this.projectionDelta,this.layoutCorrected,g,this.latestValues),(this.treeScale.x!==f||this.treeScale.y!==p||!Q_(this.projectionDelta.x,this.prevProjectionDelta.x)||!Q_(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",g)),$l&&Ts.recalculatedProjection++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(s=!0){var o;if((o=this.options.visualElement)===null||o===void 0||o.scheduleRender(),s){const u=this.getStack();u&&u.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=Bo(),this.projectionDelta=Bo(),this.projectionDeltaWithTransform=Bo()}setAnimationOrigin(s,o=!1){const u=this.snapshot,l=u?u.latestValues:{},c={...this.latestValues},d=Bo();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!o;const f=At(),p=u?u.source:void 0,g=this.layout?this.layout.source:void 0,v=p!==g,w=this.getStack(),m=!w||w.members.length<=1,y=!!(v&&!m&&this.options.crossfade===!0&&!this.path.some(B8));this.animationProgress=0;let x;this.mixTargetDelta=T=>{const _=T/1e3;rS(d.x,s.x,_),rS(d.y,s.y,_),this.setTargetDelta(d),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(ql(f,this.layout.layoutBox,this.relativeParent.layout.layoutBox),P8(this.relativeTarget,this.relativeTargetOrigin,f,_),x&&m8(this.relativeTarget,x)&&(this.isProjectionDirty=!1),x||(x=At()),dr(x,this.relativeTarget)),v&&(this.animationValues=c,l8(c,l,this.latestValues,_,y,m)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=_},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(s){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(hi(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Qe.update(()=>{jf.hasAnimatedSinceResize=!0,this.currentAnimation=w8(0,Z_,{...s,onUpdate:o=>{this.mixTargetDelta(o),s.onUpdate&&s.onUpdate(o)},onComplete:()=>{s.onComplete&&s.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const s=this.getStack();s&&s.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(Z_),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const s=this.getLead();let{targetWithTransforms:o,target:u,layout:l,latestValues:c}=s;if(!(!o||!u||!l)){if(this!==s&&this.layout&&l&&uS(this.options.animationType,this.layout.layoutBox,l.layoutBox)){u=this.target||At();const d=Hn(this.layout.layoutBox.x);u.x.min=s.target.x.min,u.x.max=u.x.min+d;const f=Hn(this.layout.layoutBox.y);u.y.min=s.target.y.min,u.y.max=u.y.min+f}dr(o,u),Fo(o,c),Yl(this.projectionDeltaWithTransform,this.layoutCorrected,o,c)}}registerSharedNode(s,o){this.sharedNodes.has(s)||this.sharedNodes.set(s,new g8),this.sharedNodes.get(s).add(o);const l=o.options.initialPromotionConfig;o.promote({transition:l?l.transition:void 0,preserveFollowOpacity:l&&l.shouldPreserveFollowOpacity?l.shouldPreserveFollowOpacity(o):void 0})}isLead(){const s=this.getStack();return s?s.lead===this:!0}getLead(){var s;const{layoutId:o}=this.options;return o?((s=this.getStack())===null||s===void 0?void 0:s.lead)||this:this}getPrevLead(){var s;const{layoutId:o}=this.options;return o?(s=this.getStack())===null||s===void 0?void 0:s.prevLead:void 0}getStack(){const{layoutId:s}=this.options;if(s)return this.root.sharedNodes.get(s)}promote({needsReset:s,transition:o,preserveFollowOpacity:u}={}){const l=this.getStack();l&&l.promote(this,u),s&&(this.projectionDelta=void 0,this.needsReset=!0),o&&this.setOptions({transition:o})}relegate(){const s=this.getStack();return s?s.relegate(this):!1}resetSkewAndRotation(){const{visualElement:s}=this.options;if(!s)return;let o=!1;const{latestValues:u}=s;if((u.z||u.rotate||u.rotateX||u.rotateY||u.rotateZ||u.skewX||u.skewY)&&(o=!0),!o)return;const l={};u.z&&nb("z",s,l,this.animationValues);for(let c=0;c<tb.length;c++)nb(`rotate${tb[c]}`,s,l,this.animationValues),nb(`skew${tb[c]}`,s,l,this.animationValues);s.render();for(const c in l)s.setStaticValue(c,l[c]),this.animationValues&&(this.animationValues[c]=l[c]);s.scheduleRender()}getProjectionStyles(s){var o,u;if(!this.instance||this.isSVG)return;if(!this.isVisible)return T8;const l={visibility:""},c=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,l.opacity="",l.pointerEvents=zf(s==null?void 0:s.pointerEvents)||"",l.transform=c?c(this.latestValues,""):"none",l;const d=this.getLead();if(!this.projectionDelta||!this.layout||!d.target){const v={};return this.options.layoutId&&(v.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,v.pointerEvents=zf(s==null?void 0:s.pointerEvents)||""),this.hasProjected&&!ws(this.latestValues)&&(v.transform=c?c({},""):"none",this.hasProjected=!1),v}const f=d.animationValues||d.latestValues;this.applyTransformsToTarget(),l.transform=b8(this.projectionDeltaWithTransform,this.treeScale,f),c&&(l.transform=c(f,l.transform));const{x:p,y:g}=this.projectionDelta;l.transformOrigin=`${p.origin*100}% ${g.origin*100}% 0`,d.animationValues?l.opacity=d===this?(u=(o=f.opacity)!==null&&o!==void 0?o: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 v in Hf){if(f[v]===void 0)continue;const{correct:w,applyTo:m}=Hf[v],y=l.transform==="none"?f[v]:w(f[v],d);if(m){const x=m.length;for(let T=0;T<x;T++)l[m[T]]=y}else l[v]=y}return this.options.layoutId&&(l.pointerEvents=d===this?zf(s==null?void 0:s.pointerEvents)||"":"none"),l}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(s=>{var o;return(o=s.currentAnimation)===null||o===void 0?void 0:o.stop()}),this.root.nodes.forEach(tS),this.root.sharedNodes.clear()}}}function S8(e){e.updateLayout()}function A8(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:a}=e.layout,{animationType:i}=e.options,s=n.source!==e.layout.source;i==="size"?cr(d=>{const f=s?n.measuredBox[d]:n.layoutBox[d],p=Hn(f);f.min=r[d].min,f.max=f.min+p}):uS(i,n.layoutBox,r)&&cr(d=>{const f=s?n.measuredBox[d]:n.layoutBox[d],p=Hn(r[d]);f.max=f.min+p,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[d].max=e.relativeTarget[d].min+p)});const o=Bo();Yl(o,r,n.layoutBox);const u=Bo();s?Yl(u,e.applyTransform(a,!0),n.measuredBox):Yl(u,r,n.layoutBox);const l=!G_(o);let c=!1;if(!e.resumeFrom){const d=e.getClosestProjectingParent();if(d&&!d.resumeFrom){const{snapshot:f,layout:p}=d;if(f&&p){const g=At();ql(g,n.layoutBox,f.layoutBox);const v=At();ql(v,r,p.layoutBox),W_(g,v)||(c=!0),d.options.layoutRoot&&(e.relativeTarget=v,e.relativeTargetOrigin=g,e.relativeParent=d)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:n,delta:u,layoutDelta:o,hasLayoutChanged:l,hasRelativeTargetChanged:c})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function C8(e){$l&&Ts.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 k8(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function R8(e){e.clearSnapshot()}function tS(e){e.clearMeasurements()}function O8(e){e.isLayoutDirty=!1}function N8(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function nS(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function D8(e){e.resolveTargetDelta()}function M8(e){e.calcProjection()}function L8(e){e.resetSkewAndRotation()}function I8(e){e.removeLeadSnapshot()}function rS(e,t,n){e.translate=gt(t.translate,0,n),e.scale=gt(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function aS(e,t,n,r){e.min=gt(t.min,n.min,r),e.max=gt(t.max,n.max,r)}function P8(e,t,n,r){aS(e.x,t.x,n.x,r),aS(e.y,t.y,n.y,r)}function B8(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const U8={duration:.45,ease:[.4,0,.1,1]},iS=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),sS=iS("applewebkit/")&&!iS("chrome/")?Math.round:sn;function oS(e){e.min=sS(e.min),e.max=sS(e.max)}function F8(e){oS(e.x),oS(e.y)}function uS(e,t,n){return e==="position"||e==="preserve-aspect"&&!jP(K_(t),K_(n),.2)}function j8(e){var t;return e!==e.root&&((t=e.scroll)===null||t===void 0?void 0:t.wasRoot)}const H8=eS({attachResizeListener:(e,t)=>Aa(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),rb={current:void 0},lS=eS({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!rb.current){const e=new H8({});e.mount(window),e.setOptions({layoutScroll:!0}),rb.current=e}return rb.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),z8={pan:{Feature:n8},drag:{Feature:t8,ProjectionNode:lS,MeasureLayout:L_}};function cS(e,t){const n=t?"pointerenter":"pointerleave",r=t?"onHoverStart":"onHoverEnd",a=(i,s)=>{if(i.pointerType==="touch"||l_())return;const o=e.getProps();e.animationState&&o.whileHover&&e.animationState.setActive("whileHover",t);const u=o[r];u&&Qe.postRender(()=>u(i,s))};return Ca(e.current,n,a,{passive:!e.getProps()[r]})}class V8 extends vi{mount(){this.unmount=Sa(cS(this.node,!0),cS(this.node,!1))}unmount(){}}class Y8 extends vi{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=Sa(Aa(this.node.current,"focus",()=>this.onFocus()),Aa(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}const dS=(e,t)=>t?e===t?!0:dS(e,t.parentElement):!1;function ab(e,t){if(!t)return;const n=new PointerEvent("pointer"+e);t(n,Pf(n))}class q8 extends vi{constructor(){super(...arguments),this.removeStartListeners=sn,this.removeEndListeners=sn,this.removeAccessibleListeners=sn,this.startPointerPress=(t,n)=>{if(this.isPressing)return;this.removeEndListeners();const r=this.node.getProps(),i=Ca(window,"pointerup",(o,u)=>{if(!this.checkPressEnd())return;const{onTap:l,onTapCancel:c,globalTapTarget:d}=this.node.getProps(),f=!d&&!dS(this.node.current,o.target)?c:l;f&&Qe.update(()=>f(o,u))},{passive:!(r.onTap||r.onPointerUp)}),s=Ca(window,"pointercancel",(o,u)=>this.cancelPress(o,u),{passive:!(r.onTapCancel||r.onPointerCancel)});this.removeEndListeners=Sa(i,s),this.startPress(t,n)},this.startAccessiblePress=()=>{const t=i=>{if(i.key!=="Enter"||this.isPressing)return;const s=o=>{o.key!=="Enter"||!this.checkPressEnd()||ab("up",(u,l)=>{const{onTap:c}=this.node.getProps();c&&Qe.postRender(()=>c(u,l))})};this.removeEndListeners(),this.removeEndListeners=Aa(this.node.current,"keyup",s),ab("down",(o,u)=>{this.startPress(o,u)})},n=Aa(this.node.current,"keydown",t),r=()=>{this.isPressing&&ab("cancel",(i,s)=>this.cancelPress(i,s))},a=Aa(this.node.current,"blur",r);this.removeAccessibleListeners=Sa(n,a)}}startPress(t,n){this.isPressing=!0;const{onTapStart:r,whileTap:a}=this.node.getProps();a&&this.node.animationState&&this.node.animationState.setActive("whileTap",!0),r&&Qe.postRender(()=>r(t,n))}checkPressEnd(){return this.removeEndListeners(),this.isPressing=!1,this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive("whileTap",!1),!l_()}cancelPress(t,n){if(!this.checkPressEnd())return;const{onTapCancel:r}=this.node.getProps();r&&Qe.postRender(()=>r(t,n))}mount(){const t=this.node.getProps(),n=Ca(t.globalTapTarget?window:this.node.current,"pointerdown",this.startPointerPress,{passive:!(t.onTapStart||t.onPointerStart)}),r=Aa(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=Sa(n,r)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}const ib=new WeakMap,sb=new WeakMap,G8=e=>{const t=ib.get(e.target);t&&t(e)},$8=e=>{e.forEach(G8)};function X8({root:e,...t}){const n=e||document;sb.has(n)||sb.set(n,{});const r=sb.get(n),a=JSON.stringify(t);return r[a]||(r[a]=new IntersectionObserver($8,{root:e,...t})),r[a]}function W8(e,t,n){const r=X8(t);return ib.set(e,n),r.observe(e),()=>{ib.delete(e),r.unobserve(e)}}const K8={some:0,all:1};class Q8 extends vi{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:a="some",once:i}=t,s={root:n?n.current:void 0,rootMargin:r,threshold:typeof a=="number"?a:K8[a]},o=u=>{const{isIntersecting:l}=u;if(this.isInView===l||(this.isInView=l,i&&!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 W8(this.node.current,s,o)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(Z8(t,n))&&this.startObserver()}unmount(){}}function Z8({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const J8={inView:{Feature:Q8},tap:{Feature:q8},focus:{Feature:Y8},hover:{Feature:V8}},e9={layout:{ProjectionNode:lS,MeasureLayout:L_}},ob=b.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"}),Vf=b.createContext({}),ub=typeof window<"u",fS=ub?b.useLayoutEffect:b.useEffect,pS=b.createContext({strict:!1});function t9(e,t,n,r,a){var i,s;const{visualElement:o}=b.useContext(Vf),u=b.useContext(pS),l=b.useContext(Ff),c=b.useContext(ob).reducedMotion,d=b.useRef();r=r||u.renderer,!d.current&&r&&(d.current=r(e,{visualState:t,parent:o,props:n,presenceContext:l,blockInitialAnimation:l?l.initial===!1:!1,reducedMotionConfig:c}));const f=d.current,p=b.useContext(D_);f&&!f.projection&&a&&(f.type==="html"||f.type==="svg")&&n9(d.current,n,a,p),b.useInsertionEffect(()=>{f&&f.update(n,l)});const g=n[W2],v=b.useRef(!!g&&!(!((i=window.MotionHandoffIsComplete)===null||i===void 0)&&i.call(window,g))&&((s=window.MotionHasOptimisedAnimation)===null||s===void 0?void 0:s.call(window,g)));return fS(()=>{f&&(window.MotionIsMounted=!0,f.updateFeatures(),eb.render(f.render),v.current&&f.animationState&&f.animationState.animateChanges())}),b.useEffect(()=>{f&&(!v.current&&f.animationState&&f.animationState.animateChanges(),v.current&&(queueMicrotask(()=>{var w;(w=window.MotionHandoffMarkAsComplete)===null||w===void 0||w.call(window,g)}),v.current=!1))}),f}function n9(e,t,n,r){const{layoutId:a,layout:i,drag:s,dragConstraints:o,layoutScroll:u,layoutRoot:l}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:hS(e.parent)),e.projection.setOptions({layoutId:a,layout:i,alwaysMeasureLayout:!!s||o&&Po(o),visualElement:e,animationType:typeof i=="string"?i:"both",initialPromotionConfig:r,layoutScroll:u,layoutRoot:l})}function hS(e){if(e)return e.options.allowProjection!==!1?e.projection:hS(e.parent)}function r9(e,t,n){return b.useCallback(r=>{r&&e.mount&&e.mount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):Po(n)&&(n.current=r))},[t])}function Yf(e){return Ll(e.animate)||p0.some(t=>Il(e[t]))}function mS(e){return!!(Yf(e)||e.variants)}function a9(e,t){if(Yf(e)){const{initial:n,animate:r}=e;return{initial:n===!1||Il(n)?n:void 0,animate:Il(r)?r:void 0}}return e.inherit!==!1?t:{}}function i9(e){const{initial:t,animate:n}=a9(e,b.useContext(Vf));return b.useMemo(()=>({initial:t,animate:n}),[gS(t),gS(n)])}function gS(e){return Array.isArray(e)?e.join(" "):e}const bS={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"]},jo={};for(const e in bS)jo[e]={isEnabled:t=>bS[e].some(n=>!!t[n])};function s9(e){for(const t in e)jo[t]={...jo[t],...e[t]}}const o9=Symbol.for("motionComponentSymbol");function u9({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:a}){e&&s9(e);function i(o,u){let l;const c={...b.useContext(ob),...o,layoutId:l9(o)},{isStatic:d}=c,f=i9(o),p=r(o,d);if(!d&&ub){c9();const g=d9(c);l=g.MeasureLayout,f.visualElement=t9(a,p,c,t,g.ProjectionNode)}return E.jsxs(Vf.Provider,{value:f,children:[l&&f.visualElement?E.jsx(l,{visualElement:f.visualElement,...c}):null,n(a,o,r9(p,f.visualElement,u),p,d,f.visualElement)]})}const s=b.forwardRef(i);return s[o9]=a,s}function l9({layoutId:e}){const t=b.useContext(J0).id;return t&&e!==void 0?t+"-"+e:e}function c9(e,t){b.useContext(pS).strict}function d9(e){const{drag:t,layout:n}=jo;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 f9=["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 lb(e){return typeof e!="string"||e.includes("-")?!1:!!(f9.indexOf(e)>-1||/[A-Z]/u.test(e))}function vS(e,{style:t,vars:n},r,a){Object.assign(e.style,t,a&&a.getProjectionStyles(r));for(const i in n)e.style.setProperty(i,n[i])}const yS=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 xS(e,t,n,r){vS(e,t,void 0,r);for(const a in t.attrs)e.setAttribute(yS.has(a)?a:If(a),t.attrs[a])}function ES(e,{layout:t,layoutId:n}){return pi.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!Hf[e]||e==="opacity")}function cb(e,t,n){var r;const{style:a}=e,i={};for(const s in a)(un(a[s])||t.style&&un(t.style[s])||ES(s,e)||((r=n==null?void 0:n.getValue(s))===null||r===void 0?void 0:r.liveStyle)!==void 0)&&(i[s]=a[s]);return n&&a&&typeof a.willChange=="string"&&(n.applyWillChange=!1),i}function wS(e,t,n){const r=cb(e,t,n);for(const a in e)if(un(e[a])||un(t[a])){const i=Pl.indexOf(a)!==-1?"attr"+a.charAt(0).toUpperCase()+a.substring(1):a;r[i]=e[a]}return r}function db(e){const t=b.useRef(null);return t.current===null&&(t.current=e()),t.current}function p9(e){if(pi.has(e))return"transform";if(z2.has(e))return If(e)}function h9({applyWillChange:e=!1,scrapeMotionValuesFromProps:t,createRenderState:n,onMount:r},a,i,s,o){const u={latestValues:m9(a,i,s,o?!1:e,t),renderState:n()};return r&&(u.mount=l=>r(a,l,u)),u}const TS=e=>(t,n)=>{const r=b.useContext(Vf),a=b.useContext(Ff),i=()=>h9(e,t,r,a,n);return n?i():db(i)};function _S(e,t,n){const r=Array.isArray(t)?t:[t];for(let a=0;a<r.length;a++){const i=d0(e,r[a]);if(i){const{transitionEnd:s,transition:o,...u}=i;n(u,s)}}}function m9(e,t,n,r,a){var i;const s={},o=new Set,u=r&&((i=e.style)===null||i===void 0?void 0:i.willChange)===void 0,l=a(e,{});for(const w in l)s[w]=zf(l[w]);let{initial:c,animate:d}=e;const f=Yf(e),p=mS(e);t&&p&&!f&&e.inherit!==!1&&(c===void 0&&(c=t.initial),d===void 0&&(d=t.animate));let g=n?n.initial===!1:!1;g=g||c===!1;const v=g?d:c;return v&&typeof v!="boolean"&&!Ll(v)&&_S(e,v,(w,m)=>{for(const y in w){let x=w[y];if(Array.isArray(x)){const T=g?x.length-1:0;x=x[T]}x!==null&&(s[y]=x)}for(const y in m)s[y]=m[y]}),u&&(d&&c!==!1&&!Ll(d)&&_S(e,d,w=>{for(const m in w){const y=p9(m);y&&o.add(y)}}),o.size&&(s.willChange=Array.from(o).join(","))),s}const fb=()=>({style:{},transform:{},transformOrigin:{},vars:{}}),SS=()=>({...fb(),attrs:{}}),AS=(e,t)=>t&&typeof e=="number"?t.transform(e):e,g9={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},b9=Pl.length;function v9(e,t,n){let r="",a=!0;for(let i=0;i<b9;i++){const s=Pl[i],o=e[s];if(o===void 0)continue;let u=!0;if(typeof o=="number"?u=o===(s.startsWith("scale")?1:0):u=parseFloat(o)===0,!u||n){const l=AS(o,k0[s]);if(!u){a=!1;const c=g9[s]||s;r+=`${c}(${l}) `}n&&(t[s]=l)}}return r=r.trim(),n?r=n(t,a?"":r):a&&(r="none"),r}function pb(e,t,n){const{style:r,vars:a,transformOrigin:i}=e;let s=!1,o=!1;for(const u in t){const l=t[u];if(pi.has(u)){s=!0;continue}else if(o2(u)){a[u]=l;continue}else{const c=AS(l,k0[u]);u.startsWith("origin")?(o=!0,i[u]=c):r[u]=c}}if(t.transform||(s||n?r.transform=v9(t,e.transform,n):r.transform&&(r.transform="none")),o){const{originX:u="50%",originY:l="50%",originZ:c=0}=i;r.transformOrigin=`${u} ${l} ${c}`}}function CS(e,t,n){return typeof e=="string"?e:pe.transform(t+n*e)}function y9(e,t,n){const r=CS(t,e.x,e.width),a=CS(n,e.y,e.height);return`${r} ${a}`}const x9={offset:"stroke-dashoffset",array:"stroke-dasharray"},E9={offset:"strokeDashoffset",array:"strokeDasharray"};function w9(e,t,n=1,r=0,a=!0){e.pathLength=1;const i=a?x9:E9;e[i.offset]=pe.transform(-r);const s=pe.transform(t),o=pe.transform(n);e[i.array]=`${s} ${o}`}function hb(e,{attrX:t,attrY:n,attrScale:r,originX:a,originY:i,pathLength:s,pathSpacing:o=1,pathOffset:u=0,...l},c,d){if(pb(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:g}=e;f.transform&&(g&&(p.transform=f.transform),delete f.transform),g&&(a!==void 0||i!==void 0||p.transform)&&(p.transformOrigin=y9(g,a!==void 0?a:.5,i!==void 0?i:.5)),t!==void 0&&(f.x=t),n!==void 0&&(f.y=n),r!==void 0&&(f.scale=r),s!==void 0&&w9(f,s,o,u,!1)}const mb=e=>typeof e=="string"&&e.toLowerCase()==="svg",T9={useVisualState:TS({scrapeMotionValuesFromProps:wS,createRenderState:SS,onMount:(e,t,{renderState:n,latestValues:r})=>{Qe.read(()=>{try{n.dimensions=typeof t.getBBox=="function"?t.getBBox():t.getBoundingClientRect()}catch{n.dimensions={x:0,y:0,width:0,height:0}}}),Qe.render(()=>{hb(n,r,mb(t.tagName),e.transformTemplate),xS(t,n)})}})},_9={useVisualState:TS({applyWillChange:!0,scrapeMotionValuesFromProps:cb,createRenderState:fb})};function kS(e,t,n){for(const r in t)!un(t[r])&&!ES(r,n)&&(e[r]=t[r])}function S9({transformTemplate:e},t){return b.useMemo(()=>{const n=fb();return pb(n,t,e),Object.assign({},n.vars,n.style)},[t])}function A9(e,t){const n=e.style||{},r={};return kS(r,n,e),Object.assign(r,S9(e,t)),r}function C9(e,t){const n={},r=A9(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 k9=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 qf(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||k9.has(e)}let RS=e=>!qf(e);function R9(e){e&&(RS=t=>t.startsWith("on")?!qf(t):e(t))}try{R9(require("@emotion/is-prop-valid").default)}catch{}function O9(e,t,n){const r={};for(const a in e)a==="values"&&typeof e.values=="object"||(RS(a)||n===!0&&qf(a)||!t&&!qf(a)||e.draggable&&a.startsWith("onDrag"))&&(r[a]=e[a]);return r}function N9(e,t,n,r){const a=b.useMemo(()=>{const i=SS();return hb(i,t,mb(r),e.transformTemplate),{...i.attrs,style:{...i.style}}},[t]);if(e.style){const i={};kS(i,e.style,e),a.style={...i,...a.style}}return a}function D9(e=!1){return(n,r,a,{latestValues:i},s)=>{const u=(lb(n)?N9:C9)(r,i,s,n),l=O9(r,typeof n=="string",e),c=n!==b.Fragment?{...l,...u,ref:a}:{},{children:d}=r,f=b.useMemo(()=>un(d)?d.get():d,[d]);return b.createElement(n,{...c,children:f})}}function M9(e,t){return function(r,{forwardMotionProps:a}={forwardMotionProps:!1}){const s={...lb(r)?T9:_9,preloadedFeatures:e,useRender:D9(a),createVisualElement:t,Component:r};return u9(s)}}const gb={current:null},OS={current:!1};function L9(){if(OS.current=!0,!!ub)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>gb.current=e.matches;e.addListener(t),t()}else gb.current=!1}function I9(e,t,n){for(const r in t){const a=t[r],i=n[r];if(un(a))e.addValue(r,a);else if(un(i))e.addValue(r,Vl(a,{owner:e}));else if(i!==a)if(e.hasValue(r)){const s=e.getValue(r);s.liveStyle===!0?s.jump(a):s.hasAnimated||s.set(a)}else{const s=e.getStaticValue(r);e.addValue(r,Vl(s!==void 0?s:a,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const NS=new WeakMap,P9=[...h2,on,bi],B9=e=>P9.find(p2(e)),DS=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class U9{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:a,blockInitialAnimation:i,visualState:s},o={}){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=w0,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=Yr.now();this.renderScheduledAt<f&&(this.renderScheduledAt=f,Qe.render(this.render,!1,!0))};const{latestValues:u,renderState:l}=s;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=a,this.options=o,this.blockInitialAnimation=!!i,this.isControllingVariants=Yf(n),this.isVariantNode=mS(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&&un(p)&&p.set(u[f],!1)}}mount(t){this.current=t,NS.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)),OS.current||L9(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:gb.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){NS.delete(this.current),this.projection&&this.projection.unmount(),hi(this.notifyUpdate),hi(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=pi.has(t),a=n.on("change",o=>{this.latestValues[t]=o,this.props.onUpdate&&Qe.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0)}),i=n.on("renderRequest",this.scheduleRender);let s;window.MotionCheckAppearSync&&(s=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{a(),i(),s&&s(),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 jo){const n=jo[t];if(!n)continue;const{isEnabled:r,Feature:a}=n;if(!this.features[t]&&a&&r(this.props)&&(this.features[t]=new a(this)),this.features[t]){const i=this.features[t];i.isMounted?i.update():(i.mount(),i.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):At()}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<DS.length;r++){const a=DS[r];this.propEventSubscriptions[a]&&(this.propEventSubscriptions[a](),delete this.propEventSubscriptions[a]);const i="on"+a,s=t[i];s&&(this.propEventSubscriptions[a]=this.on(a,s))}this.prevMotionValues=I9(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=Vl(n===null?void 0:n,{owner:this}),this.addValue(t,r)),r}readValue(t,n){var r;let a=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 a!=null&&(typeof a=="string"&&(i2(a)||a2(a))?a=parseFloat(a):!B9(a)&&bi.test(n)&&(a=S2(t,n)),this.setBaseTarget(t,un(a)?a.get():a)),un(a)?a.get():a}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var n;const{initial:r}=this.props;let a;if(typeof r=="string"||typeof r=="object"){const s=d0(this.props,r,(n=this.presenceContext)===null||n===void 0?void 0:n.custom);s&&(a=s[t])}if(r&&a!==void 0)return a;const i=this.getBaseTargetFromProps(this.props,t);return i!==void 0&&!un(i)?i:this.initialValues[t]!==void 0&&a===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new Y0),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}class MS extends U9{constructor(){super(...arguments),this.KeyframeResolver=A2}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 F9(e){return window.getComputedStyle(e)}class j9 extends MS{constructor(){super(...arguments),this.type="html",this.applyWillChange=!0,this.renderInstance=vS}readValueFromInstance(t,n){if(pi.has(n)){const r=R0(n);return r&&r.default||0}else{const r=F9(t),a=(o2(n)?r.getPropertyValue(n):r[n])||0;return typeof a=="string"?a.trim():a}}measureInstanceViewportBox(t,{transformPagePoint:n}){return R_(t,n)}build(t,n,r){pb(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return cb(t,n,r)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;un(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}class H9 extends MS{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=At}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(pi.has(n)){const r=R0(n);return r&&r.default||0}return n=yS.has(n)?n:If(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return wS(t,n,r)}build(t,n,r){hb(t,n,this.isSVGTag,r.transformTemplate)}renderInstance(t,n,r,a){xS(t,n,r,a)}mount(t){this.isSVGTag=mb(t.tagName),super.mount(t)}}const z9=(e,t)=>lb(e)?new H9(t):new j9(t,{allowProjection:e!==b.Fragment}),V9=M9({...NP,...J8,...z8,...e9},z9),Ho=SL(V9);class Y9 extends b.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 q9({children:e,isPresent:t}){const n=b.useId(),r=b.useRef(null),a=b.useRef({width:0,height:0,top:0,left:0}),{nonce:i}=b.useContext(ob);return b.useInsertionEffect(()=>{const{width:s,height:o,top:u,left:l}=a.current;if(t||!r.current||!s||!o)return;r.current.dataset.motionPopId=n;const c=document.createElement("style");return i&&(c.nonce=i),document.head.appendChild(c),c.sheet&&c.sheet.insertRule(`
49
+ `).replace(T5,"")}function uT(e,t){return t=oT(t),oT(e)===t}function cf(){}function Ke(e,t,n,r,a,i){switch(n){case"children":typeof r=="string"?t==="body"||t==="textarea"&&r===""||to(e,r):(typeof r=="number"||typeof r=="bigint")&&t!=="body"&&to(e,""+r);break;case"className":bd(e,"class",r);break;case"tabIndex":bd(e,"tabindex",r);break;case"dir":case"role":case"viewBox":case"width":case"height":bd(e,n,r);break;case"style":vx(e,r,i);break;case"data":if(t!=="object"){bd(e,"data",r);break}case"src":case"href":if(r===""&&(t!=="a"||n!=="href")){e.removeAttribute(n);break}if(r==null||typeof r=="function"||typeof r=="symbol"||typeof r=="boolean"){e.removeAttribute(n);break}r=xd(""+r),e.setAttribute(n,r);break;case"action":case"formAction":if(typeof r=="function"){e.setAttribute(n,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof i=="function"&&(n==="formAction"?(t!=="input"&&Ke(e,t,"name",a.name,a,null),Ke(e,t,"formEncType",a.formEncType,a,null),Ke(e,t,"formMethod",a.formMethod,a,null),Ke(e,t,"formTarget",a.formTarget,a,null)):(Ke(e,t,"encType",a.encType,a,null),Ke(e,t,"method",a.method,a,null),Ke(e,t,"target",a.target,a,null)));if(r==null||typeof r=="symbol"||typeof r=="boolean"){e.removeAttribute(n);break}r=xd(""+r),e.setAttribute(n,r);break;case"onClick":r!=null&&(e.onclick=cf);break;case"onScroll":r!=null&&Pe("scroll",e);break;case"onScrollEnd":r!=null&&Pe("scrollend",e);break;case"dangerouslySetInnerHTML":if(r!=null){if(typeof r!="object"||!("__html"in r))throw Error(G(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(G(60));e.innerHTML=n}}break;case"multiple":e.multiple=r&&typeof r!="function"&&typeof r!="symbol";break;case"muted":e.muted=r&&typeof r!="function"&&typeof r!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(r==null||typeof r=="function"||typeof r=="boolean"||typeof r=="symbol"){e.removeAttribute("xlink:href");break}n=xd(""+r),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",n);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":r!=null&&typeof r!="function"&&typeof r!="symbol"?e.setAttribute(n,""+r):e.removeAttribute(n);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":r&&typeof r!="function"&&typeof r!="symbol"?e.setAttribute(n,""):e.removeAttribute(n);break;case"capture":case"download":r===!0?e.setAttribute(n,""):r!==!1&&r!=null&&typeof r!="function"&&typeof r!="symbol"?e.setAttribute(n,r):e.removeAttribute(n);break;case"cols":case"rows":case"size":case"span":r!=null&&typeof r!="function"&&typeof r!="symbol"&&!isNaN(r)&&1<=r?e.setAttribute(n,r):e.removeAttribute(n);break;case"rowSpan":case"start":r==null||typeof r=="function"||typeof r=="symbol"||isNaN(r)?e.removeAttribute(n):e.setAttribute(n,r);break;case"popover":Pe("beforetoggle",e),Pe("toggle",e),gd(e,"popover",r);break;case"xlinkActuate":sa(e,"http://www.w3.org/1999/xlink","xlink:actuate",r);break;case"xlinkArcrole":sa(e,"http://www.w3.org/1999/xlink","xlink:arcrole",r);break;case"xlinkRole":sa(e,"http://www.w3.org/1999/xlink","xlink:role",r);break;case"xlinkShow":sa(e,"http://www.w3.org/1999/xlink","xlink:show",r);break;case"xlinkTitle":sa(e,"http://www.w3.org/1999/xlink","xlink:title",r);break;case"xlinkType":sa(e,"http://www.w3.org/1999/xlink","xlink:type",r);break;case"xmlBase":sa(e,"http://www.w3.org/XML/1998/namespace","xml:base",r);break;case"xmlLang":sa(e,"http://www.w3.org/XML/1998/namespace","xml:lang",r);break;case"xmlSpace":sa(e,"http://www.w3.org/XML/1998/namespace","xml:space",r);break;case"is":gd(e,"is",r);break;case"innerText":case"textContent":break;default:(!(2<n.length)||n[0]!=="o"&&n[0]!=="O"||n[1]!=="n"&&n[1]!=="N")&&(n=Z4.get(n)||n,gd(e,n,r))}}function Gg(e,t,n,r,a,i){switch(n){case"style":vx(e,r,i);break;case"dangerouslySetInnerHTML":if(r!=null){if(typeof r!="object"||!("__html"in r))throw Error(G(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(G(60));e.innerHTML=n}}break;case"children":typeof r=="string"?to(e,r):(typeof r=="number"||typeof r=="bigint")&&to(e,""+r);break;case"onScroll":r!=null&&Pe("scroll",e);break;case"onScrollEnd":r!=null&&Pe("scrollend",e);break;case"onClick":r!=null&&(e.onclick=cf);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!lx.hasOwnProperty(n))e:{if(n[0]==="o"&&n[1]==="n"&&(a=n.endsWith("Capture"),t=n.slice(2,a?n.length-7:void 0),i=e[Tn]||null,i=i!=null?i[n]:null,typeof i=="function"&&e.removeEventListener(t,i,a),typeof r=="function")){typeof i!="function"&&i!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(t,r,a);break e}n in e?e[n]=r:r===!0?e.setAttribute(n,""):gd(e,n,r)}}}function Zt(e,t,n){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Pe("error",e),Pe("load",e);var r=!1,a=!1,i;for(i in n)if(n.hasOwnProperty(i)){var s=n[i];if(s!=null)switch(i){case"src":r=!0;break;case"srcSet":a=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(G(137,t));default:Ke(e,t,i,s,n,null)}}a&&Ke(e,t,"srcSet",n.srcSet,n,null),r&&Ke(e,t,"src",n.src,n,null);return;case"input":Pe("invalid",e);var o=i=s=a=null,u=null,l=null;for(r in n)if(n.hasOwnProperty(r)){var c=n[r];if(c!=null)switch(r){case"name":a=c;break;case"type":s=c;break;case"checked":u=c;break;case"defaultChecked":l=c;break;case"value":i=c;break;case"defaultValue":o=c;break;case"children":case"dangerouslySetInnerHTML":if(c!=null)throw Error(G(137,t));break;default:Ke(e,t,r,c,n,null)}}hx(e,i,o,u,l,s,a,!1),vd(e);return;case"select":Pe("invalid",e),r=s=i=null;for(a in n)if(n.hasOwnProperty(a)&&(o=n[a],o!=null))switch(a){case"value":i=o;break;case"defaultValue":s=o;break;case"multiple":r=o;default:Ke(e,t,a,o,n,null)}t=i,n=s,e.multiple=!!r,t!=null?eo(e,!!r,t,!1):n!=null&&eo(e,!!r,n,!0);return;case"textarea":Pe("invalid",e),i=a=r=null;for(s in n)if(n.hasOwnProperty(s)&&(o=n[s],o!=null))switch(s){case"value":r=o;break;case"defaultValue":a=o;break;case"children":i=o;break;case"dangerouslySetInnerHTML":if(o!=null)throw Error(G(91));break;default:Ke(e,t,s,o,n,null)}gx(e,r,a,i),vd(e);return;case"option":for(u in n)if(n.hasOwnProperty(u)&&(r=n[u],r!=null))switch(u){case"selected":e.selected=r&&typeof r!="function"&&typeof r!="symbol";break;default:Ke(e,t,u,r,n,null)}return;case"dialog":Pe("cancel",e),Pe("close",e);break;case"iframe":case"object":Pe("load",e);break;case"video":case"audio":for(r=0;r<Tl.length;r++)Pe(Tl[r],e);break;case"image":Pe("error",e),Pe("load",e);break;case"details":Pe("toggle",e);break;case"embed":case"source":case"link":Pe("error",e),Pe("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(l in n)if(n.hasOwnProperty(l)&&(r=n[l],r!=null))switch(l){case"children":case"dangerouslySetInnerHTML":throw Error(G(137,t));default:Ke(e,t,l,r,n,null)}return;default:if(um(t)){for(c in n)n.hasOwnProperty(c)&&(r=n[c],r!==void 0&&Gg(e,t,c,r,n,void 0));return}}for(o in n)n.hasOwnProperty(o)&&(r=n[o],r!=null&&Ke(e,t,o,r,n,null))}function _5(e,t,n,r){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var a=null,i=null,s=null,o=null,u=null,l=null,c=null;for(p in n){var d=n[p];if(n.hasOwnProperty(p)&&d!=null)switch(p){case"checked":break;case"value":break;case"defaultValue":u=d;default:r.hasOwnProperty(p)||Ke(e,t,p,null,r,d)}}for(var f in r){var p=r[f];if(d=n[f],r.hasOwnProperty(f)&&(p!=null||d!=null))switch(f){case"type":i=p;break;case"name":a=p;break;case"checked":l=p;break;case"defaultChecked":c=p;break;case"value":s=p;break;case"defaultValue":o=p;break;case"children":case"dangerouslySetInnerHTML":if(p!=null)throw Error(G(137,t));break;default:p!==d&&Ke(e,t,f,p,r,d)}}sm(e,s,o,u,l,c,i,a);return;case"select":p=s=o=f=null;for(i in n)if(u=n[i],n.hasOwnProperty(i)&&u!=null)switch(i){case"value":break;case"multiple":p=u;default:r.hasOwnProperty(i)||Ke(e,t,i,null,r,u)}for(a in r)if(i=r[a],u=n[a],r.hasOwnProperty(a)&&(i!=null||u!=null))switch(a){case"value":f=i;break;case"defaultValue":o=i;break;case"multiple":s=i;default:i!==u&&Ke(e,t,a,i,r,u)}t=o,n=s,r=p,f!=null?eo(e,!!n,f,!1):!!r!=!!n&&(t!=null?eo(e,!!n,t,!0):eo(e,!!n,n?[]:"",!1));return;case"textarea":p=f=null;for(o in n)if(a=n[o],n.hasOwnProperty(o)&&a!=null&&!r.hasOwnProperty(o))switch(o){case"value":break;case"children":break;default:Ke(e,t,o,null,r,a)}for(s in r)if(a=r[s],i=n[s],r.hasOwnProperty(s)&&(a!=null||i!=null))switch(s){case"value":f=a;break;case"defaultValue":p=a;break;case"children":break;case"dangerouslySetInnerHTML":if(a!=null)throw Error(G(91));break;default:a!==i&&Ke(e,t,s,a,r,i)}mx(e,f,p);return;case"option":for(var g in n)if(f=n[g],n.hasOwnProperty(g)&&f!=null&&!r.hasOwnProperty(g))switch(g){case"selected":e.selected=!1;break;default:Ke(e,t,g,null,r,f)}for(u in r)if(f=r[u],p=n[u],r.hasOwnProperty(u)&&f!==p&&(f!=null||p!=null))switch(u){case"selected":e.selected=f&&typeof f!="function"&&typeof f!="symbol";break;default:Ke(e,t,u,f,r,p)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var v in n)f=n[v],n.hasOwnProperty(v)&&f!=null&&!r.hasOwnProperty(v)&&Ke(e,t,v,null,r,f);for(l in r)if(f=r[l],p=n[l],r.hasOwnProperty(l)&&f!==p&&(f!=null||p!=null))switch(l){case"children":case"dangerouslySetInnerHTML":if(f!=null)throw Error(G(137,t));break;default:Ke(e,t,l,f,r,p)}return;default:if(um(t)){for(var w in n)f=n[w],n.hasOwnProperty(w)&&f!==void 0&&!r.hasOwnProperty(w)&&Gg(e,t,w,void 0,r,f);for(c in r)f=r[c],p=n[c],!r.hasOwnProperty(c)||f===p||f===void 0&&p===void 0||Gg(e,t,c,f,r,p);return}}for(var m in n)f=n[m],n.hasOwnProperty(m)&&f!=null&&!r.hasOwnProperty(m)&&Ke(e,t,m,null,r,f);for(d in r)f=r[d],p=n[d],!r.hasOwnProperty(d)||f===p||f==null&&p==null||Ke(e,t,d,f,r,p)}var $g=null,Xg=null;function df(e){return e.nodeType===9?e:e.ownerDocument}function lT(e){switch(e){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function cT(e,t){if(e===0)switch(t){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&t==="foreignObject"?0:e}function Wg(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.children=="bigint"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Kg=null;function S5(){var e=window.event;return e&&e.type==="popstate"?e===Kg?!1:(Kg=e,!0):(Kg=null,!1)}var dT=typeof setTimeout=="function"?setTimeout:void 0,A5=typeof clearTimeout=="function"?clearTimeout:void 0,fT=typeof Promise=="function"?Promise:void 0,C5=typeof queueMicrotask=="function"?queueMicrotask:typeof fT<"u"?function(e){return fT.resolve(null).then(e).catch(k5)}:dT;function k5(e){setTimeout(function(){throw e})}function Qg(e,t){var n=t,r=0;do{var a=n.nextSibling;if(e.removeChild(n),a&&a.nodeType===8)if(n=a.data,n==="/$"){if(r===0){e.removeChild(a),Dl(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=a}while(n);Dl(t)}function Zg(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var n=t;switch(t=t.nextSibling,n.nodeName){case"HTML":case"HEAD":case"BODY":Zg(n),im(n);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(n.rel.toLowerCase()==="stylesheet")continue}e.removeChild(n)}}function R5(e,t,n,r){for(;e.nodeType===1;){var a=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!r&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(r){if(!e[ju])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(i=e.getAttribute("rel"),i==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(i!==a.rel||e.getAttribute("href")!==(a.href==null?null:a.href)||e.getAttribute("crossorigin")!==(a.crossOrigin==null?null:a.crossOrigin)||e.getAttribute("title")!==(a.title==null?null:a.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(i=e.getAttribute("src"),(i!==(a.src==null?null:a.src)||e.getAttribute("type")!==(a.type==null?null:a.type)||e.getAttribute("crossorigin")!==(a.crossOrigin==null?null:a.crossOrigin))&&i&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var i=a.name==null?null:""+a.name;if(a.type==="hidden"&&e.getAttribute("name")===i)return e}else return e;if(e=_r(e.nextSibling),e===null)break}return null}function O5(e,t,n){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!n||(e=_r(e.nextSibling),e===null))return null;return e}function _r(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==="$?"||t==="F!"||t==="F")break;if(t==="/$")return null}}return e}function pT(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}function hT(e,t,n){switch(t=df(n),e){case"html":if(e=t.documentElement,!e)throw Error(G(452));return e;case"head":if(e=t.head,!e)throw Error(G(453));return e;case"body":if(e=t.body,!e)throw Error(G(454));return e;default:throw Error(G(451))}}var lr=new Map,mT=new Set;function ff(e){return typeof e.getRootNode=="function"?e.getRootNode():e.ownerDocument}var Ea=st.d;st.d={f:N5,r:D5,D:M5,C:L5,L:I5,m:P5,X:U5,S:B5,M:F5};function N5(){var e=Ea.f(),t=rf();return e||t}function D5(e){var t=Qs(e);t!==null&&t.tag===5&&t.type==="form"?zE(t):Ea.r(e)}var Ro=typeof document>"u"?null:document;function gT(e,t,n){var r=Ro;if(r&&typeof t=="string"&&t){var a=Jn(t);a='link[rel="'+e+'"][href="'+a+'"]',typeof n=="string"&&(a+='[crossorigin="'+n+'"]'),mT.has(a)||(mT.add(a),e={rel:e,crossOrigin:n,href:t},r.querySelector(a)===null&&(t=r.createElement("link"),Zt(t,"link",e),zt(t),r.head.appendChild(t)))}}function M5(e){Ea.D(e),gT("dns-prefetch",e,null)}function L5(e,t){Ea.C(e,t),gT("preconnect",e,t)}function I5(e,t,n){Ea.L(e,t,n);var r=Ro;if(r&&e&&t){var a='link[rel="preload"][as="'+Jn(t)+'"]';t==="image"&&n&&n.imageSrcSet?(a+='[imagesrcset="'+Jn(n.imageSrcSet)+'"]',typeof n.imageSizes=="string"&&(a+='[imagesizes="'+Jn(n.imageSizes)+'"]')):a+='[href="'+Jn(e)+'"]';var i=a;switch(t){case"style":i=Oo(e);break;case"script":i=No(e)}lr.has(i)||(e=it({rel:"preload",href:t==="image"&&n&&n.imageSrcSet?void 0:e,as:t},n),lr.set(i,e),r.querySelector(a)!==null||t==="style"&&r.querySelector(Sl(i))||t==="script"&&r.querySelector(Al(i))||(t=r.createElement("link"),Zt(t,"link",e),zt(t),r.head.appendChild(t)))}}function P5(e,t){Ea.m(e,t);var n=Ro;if(n&&e){var r=t&&typeof t.as=="string"?t.as:"script",a='link[rel="modulepreload"][as="'+Jn(r)+'"][href="'+Jn(e)+'"]',i=a;switch(r){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":i=No(e)}if(!lr.has(i)&&(e=it({rel:"modulepreload",href:e},t),lr.set(i,e),n.querySelector(a)===null)){switch(r){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(n.querySelector(Al(i)))return}r=n.createElement("link"),Zt(r,"link",e),zt(r),n.head.appendChild(r)}}}function B5(e,t,n){Ea.S(e,t,n);var r=Ro;if(r&&e){var a=Zs(r).hoistableStyles,i=Oo(e);t=t||"default";var s=a.get(i);if(!s){var o={loading:0,preload:null};if(s=r.querySelector(Sl(i)))o.loading=5;else{e=it({rel:"stylesheet",href:e,"data-precedence":t},n),(n=lr.get(i))&&Jg(e,n);var u=s=r.createElement("link");zt(u),Zt(u,"link",e),u._p=new Promise(function(l,c){u.onload=l,u.onerror=c}),u.addEventListener("load",function(){o.loading|=1}),u.addEventListener("error",function(){o.loading|=2}),o.loading|=4,pf(s,t,r)}s={type:"stylesheet",instance:s,count:1,state:o},a.set(i,s)}}}function U5(e,t){Ea.X(e,t);var n=Ro;if(n&&e){var r=Zs(n).hoistableScripts,a=No(e),i=r.get(a);i||(i=n.querySelector(Al(a)),i||(e=it({src:e,async:!0},t),(t=lr.get(a))&&e0(e,t),i=n.createElement("script"),zt(i),Zt(i,"link",e),n.head.appendChild(i)),i={type:"script",instance:i,count:1,state:null},r.set(a,i))}}function F5(e,t){Ea.M(e,t);var n=Ro;if(n&&e){var r=Zs(n).hoistableScripts,a=No(e),i=r.get(a);i||(i=n.querySelector(Al(a)),i||(e=it({src:e,async:!0,type:"module"},t),(t=lr.get(a))&&e0(e,t),i=n.createElement("script"),zt(i),Zt(i,"link",e),n.head.appendChild(i)),i={type:"script",instance:i,count:1,state:null},r.set(a,i))}}function bT(e,t,n,r){var a=(a=Ya.current)?ff(a):null;if(!a)throw Error(G(446));switch(e){case"meta":case"title":return null;case"style":return typeof n.precedence=="string"&&typeof n.href=="string"?(t=Oo(n.href),n=Zs(a).hoistableStyles,r=n.get(t),r||(r={type:"style",instance:null,count:0,state:null},n.set(t,r)),r):{type:"void",instance:null,count:0,state:null};case"link":if(n.rel==="stylesheet"&&typeof n.href=="string"&&typeof n.precedence=="string"){e=Oo(n.href);var i=Zs(a).hoistableStyles,s=i.get(e);if(s||(a=a.ownerDocument||a,s={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},i.set(e,s),(i=a.querySelector(Sl(e)))&&!i._p&&(s.instance=i,s.state.loading=5),lr.has(e)||(n={rel:"preload",as:"style",href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},lr.set(e,n),i||j5(a,e,n,s.state))),t&&r===null)throw Error(G(528,""));return s}if(t&&r!==null)throw Error(G(529,""));return null;case"script":return t=n.async,n=n.src,typeof n=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=No(n),n=Zs(a).hoistableScripts,r=n.get(t),r||(r={type:"script",instance:null,count:0,state:null},n.set(t,r)),r):{type:"void",instance:null,count:0,state:null};default:throw Error(G(444,e))}}function Oo(e){return'href="'+Jn(e)+'"'}function Sl(e){return'link[rel="stylesheet"]['+e+"]"}function vT(e){return it({},e,{"data-precedence":e.precedence,precedence:null})}function j5(e,t,n,r){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?r.loading=1:(t=e.createElement("link"),r.preload=t,t.addEventListener("load",function(){return r.loading|=1}),t.addEventListener("error",function(){return r.loading|=2}),Zt(t,"link",n),zt(t),e.head.appendChild(t))}function No(e){return'[src="'+Jn(e)+'"]'}function Al(e){return"script[async]"+e}function yT(e,t,n){if(t.count++,t.instance===null)switch(t.type){case"style":var r=e.querySelector('style[data-href~="'+Jn(n.href)+'"]');if(r)return t.instance=r,zt(r),r;var a=it({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement("style"),zt(r),Zt(r,"style",a),pf(r,n.precedence,e),t.instance=r;case"stylesheet":a=Oo(n.href);var i=e.querySelector(Sl(a));if(i)return t.state.loading|=4,t.instance=i,zt(i),i;r=vT(n),(a=lr.get(a))&&Jg(r,a),i=(e.ownerDocument||e).createElement("link"),zt(i);var s=i;return s._p=new Promise(function(o,u){s.onload=o,s.onerror=u}),Zt(i,"link",r),t.state.loading|=4,pf(i,n.precedence,e),t.instance=i;case"script":return i=No(n.src),(a=e.querySelector(Al(i)))?(t.instance=a,zt(a),a):(r=n,(a=lr.get(i))&&(r=it({},n),e0(r,a)),e=e.ownerDocument||e,a=e.createElement("script"),zt(a),Zt(a,"link",r),e.head.appendChild(a),t.instance=a);case"void":return null;default:throw Error(G(443,t.type))}else t.type==="stylesheet"&&!(t.state.loading&4)&&(r=t.instance,t.state.loading|=4,pf(r,n.precedence,e));return t.instance}function pf(e,t,n){for(var r=n.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),a=r.length?r[r.length-1]:null,i=a,s=0;s<r.length;s++){var o=r[s];if(o.dataset.precedence===t)i=o;else if(i!==a)break}i?i.parentNode.insertBefore(e,i.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function Jg(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function e0(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var hf=null;function xT(e,t,n){if(hf===null){var r=new Map,a=hf=new Map;a.set(n,r)}else a=hf,r=a.get(n),r||(r=new Map,a.set(n,r));if(r.has(e))return r;for(r.set(e,null),n=n.getElementsByTagName(e),a=0;a<n.length;a++){var i=n[a];if(!(i[ju]||i[rn]||e==="link"&&i.getAttribute("rel")==="stylesheet")&&i.namespaceURI!=="http://www.w3.org/2000/svg"){var s=i.getAttribute(t)||"";s=e+s;var o=r.get(s);o?o.push(i):r.set(s,[i])}}return r}function ET(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t==="title"?e.querySelector("head > title"):null)}function H5(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;switch(t.rel){case"stylesheet":return e=t.disabled,typeof t.precedence=="string"&&e==null;default:return!0}case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function wT(e){return!(e.type==="stylesheet"&&!(e.state.loading&3))}var Cl=null;function z5(){}function V5(e,t,n){if(Cl===null)throw Error(G(475));var r=Cl;if(t.type==="stylesheet"&&(typeof n.media!="string"||matchMedia(n.media).matches!==!1)&&!(t.state.loading&4)){if(t.instance===null){var a=Oo(n.href),i=e.querySelector(Sl(a));if(i){e=i._p,e!==null&&typeof e=="object"&&typeof e.then=="function"&&(r.count++,r=mf.bind(r),e.then(r,r)),t.state.loading|=4,t.instance=i,zt(i);return}i=e.ownerDocument||e,n=vT(n),(a=lr.get(a))&&Jg(n,a),i=i.createElement("link"),zt(i);var s=i;s._p=new Promise(function(o,u){s.onload=o,s.onerror=u}),Zt(i,"link",n),t.instance=i}r.stylesheets===null&&(r.stylesheets=new Map),r.stylesheets.set(t,e),(e=t.state.preload)&&!(t.state.loading&3)&&(r.count++,t=mf.bind(r),e.addEventListener("load",t),e.addEventListener("error",t))}}function Y5(){if(Cl===null)throw Error(G(475));var e=Cl;return e.stylesheets&&e.count===0&&t0(e,e.stylesheets),0<e.count?function(t){var n=setTimeout(function(){if(e.stylesheets&&t0(e,e.stylesheets),e.unsuspend){var r=e.unsuspend;e.unsuspend=null,r()}},6e4);return e.unsuspend=t,function(){e.unsuspend=null,clearTimeout(n)}}:null}function mf(){if(this.count--,this.count===0){if(this.stylesheets)t0(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var gf=null;function t0(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,gf=new Map,t.forEach(q5,e),gf=null,mf.call(e))}function q5(e,t){if(!(t.state.loading&4)){var n=gf.get(e);if(n)var r=n.get(null);else{n=new Map,gf.set(e,n);for(var a=e.querySelectorAll("link[data-precedence],style[data-precedence]"),i=0;i<a.length;i++){var s=a[i];(s.nodeName==="LINK"||s.getAttribute("media")!=="not all")&&(n.set(s.dataset.precedence,s),r=s)}r&&n.set(null,r)}a=t.instance,s=a.getAttribute("data-precedence"),i=n.get(s)||r,i===r&&n.set(null,a),n.set(s,a),this.count++,r=mf.bind(this),a.addEventListener("load",r),a.addEventListener("error",r),i?i.parentNode.insertBefore(a,i.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(a,e.firstChild)),t.state.loading|=4}}var kl={$$typeof:aa,Provider:null,Consumer:null,_currentValue:Ki,_currentValue2:Ki,_threadCount:0};function G5(e,t,n,r,a,i,s,o){this.tag=1,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=rm(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.finishedLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=rm(0),this.hiddenUpdates=rm(null),this.identifierPrefix=r,this.onUncaughtError=a,this.onCaughtError=i,this.onRecoverableError=s,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=o,this.incompleteTransitions=new Map}function TT(e,t,n,r,a,i,s,o,u,l,c,d){return e=new G5(e,t,n,s,o,u,l,d),t=1,i===!0&&(t|=24),i=or(3,null,null,t),e.current=i,i.stateNode=e,t=Mm(),t.refCount++,e.pooledCache=t,t.refCount++,i.memoizedState={element:r,isDehydrated:n,cache:t},pg(i),e}function _T(e){return e?(e=uo,e):uo}function ST(e,t,n,r,a,i){a=_T(a),r.context===null?r.context=a:r.pendingContext=a,r=ti(t),r.payload={element:n},i=i===void 0?null:i,i!==null&&(r.callback=i),n=ni(e,r,t),n!==null&&(vn(n,e,t),dl(n,e,t))}function AT(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function n0(e,t){AT(e,t),(e=e.alternate)&&AT(e,t)}function CT(e){if(e.tag===13){var t=Xa(e,67108864);t!==null&&vn(t,e,67108864),n0(e,67108864)}}var bf=!0;function $5(e,t,n,r){var a=xe.T;xe.T=null;var i=st.p;try{st.p=2,r0(e,t,n,r)}finally{st.p=i,xe.T=a}}function X5(e,t,n,r){var a=xe.T;xe.T=null;var i=st.p;try{st.p=8,r0(e,t,n,r)}finally{st.p=i,xe.T=a}}function r0(e,t,n,r){if(bf){var a=a0(r);if(a===null)qg(e,t,r,vf,n),RT(e,r);else if(K5(a,e,t,n,r))r.stopPropagation();else if(RT(e,r),t&4&&-1<W5.indexOf(e)){for(;a!==null;){var i=Qs(a);if(i!==null)switch(i.tag){case 3:if(i=i.stateNode,i.current.memoizedState.isDehydrated){var s=Qi(i.pendingLanes);if(s!==0){var o=i;for(o.pendingLanes|=2,o.entangledLanes|=2;s;){var u=1<<31-Ln(s);o.entanglements[1]|=u,s&=~u}zr(i),!(mt&6)&&(ef=Br()+500,wl(0))}}break;case 13:o=Xa(i,2),o!==null&&vn(o,i,2),rf(),n0(i,2)}if(i=a0(r),i===null&&qg(e,t,r,vf,n),i===a)break;a=i}a!==null&&r.stopPropagation()}else qg(e,t,r,null,n)}}function a0(e){return e=cm(e),i0(e)}var vf=null;function i0(e){if(vf=null,e=Zi(e),e!==null){var t=$s(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=Wy(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 vf=e,null}function kT(e){switch(e){case"beforetoggle":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"toggle":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 2;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"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(L4()){case Zy:return 2;case Jy:return 8;case fd:case I4:return 32;case ex:return 268435456;default:return 32}default:return 32}}var s0=!1,li=null,ci=null,di=null,Rl=new Map,Ol=new Map,fi=[],W5="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".split(" ");function RT(e,t){switch(e){case"focusin":case"focusout":li=null;break;case"dragenter":case"dragleave":ci=null;break;case"mouseover":case"mouseout":di=null;break;case"pointerover":case"pointerout":Rl.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Ol.delete(t.pointerId)}}function Nl(e,t,n,r,a,i){return e===null||e.nativeEvent!==i?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:i,targetContainers:[a]},t!==null&&(t=Qs(t),t!==null&&CT(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,a!==null&&t.indexOf(a)===-1&&t.push(a),e)}function K5(e,t,n,r,a){switch(t){case"focusin":return li=Nl(li,e,t,n,r,a),!0;case"dragenter":return ci=Nl(ci,e,t,n,r,a),!0;case"mouseover":return di=Nl(di,e,t,n,r,a),!0;case"pointerover":var i=a.pointerId;return Rl.set(i,Nl(Rl.get(i)||null,e,t,n,r,a)),!0;case"gotpointercapture":return i=a.pointerId,Ol.set(i,Nl(Ol.get(i)||null,e,t,n,r,a)),!0}return!1}function OT(e){var t=Zi(e.target);if(t!==null){var n=$s(t);if(n!==null){if(t=n.tag,t===13){if(t=Wy(n),t!==null){e.blockedOn=t,Y4(e.priority,function(){if(n.tag===13){var r=Fn(),a=Xa(n,r);a!==null&&vn(a,n,r),n0(n,r)}});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function yf(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=a0(e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);lm=r,n.target.dispatchEvent(r),lm=null}else return t=Qs(n),t!==null&&CT(t),e.blockedOn=n,!1;t.shift()}return!0}function NT(e,t,n){yf(e)&&n.delete(t)}function Q5(){s0=!1,li!==null&&yf(li)&&(li=null),ci!==null&&yf(ci)&&(ci=null),di!==null&&yf(di)&&(di=null),Rl.forEach(NT),Ol.forEach(NT)}function xf(e,t){e.blockedOn===t&&(e.blockedOn=null,s0||(s0=!0,It.unstable_scheduleCallback(It.unstable_NormalPriority,Q5)))}var Ef=null;function DT(e){Ef!==e&&(Ef=e,It.unstable_scheduleCallback(It.unstable_NormalPriority,function(){Ef===e&&(Ef=null);for(var t=0;t<e.length;t+=3){var n=e[t],r=e[t+1],a=e[t+2];if(typeof r!="function"){if(i0(r||n)===null)continue;break}var i=Qs(n);i!==null&&(e.splice(t,3),t-=3,Wm(i,{pending:!0,data:a,method:n.method,action:r},r,a))}}))}function Dl(e){function t(u){return xf(u,e)}li!==null&&xf(li,e),ci!==null&&xf(ci,e),di!==null&&xf(di,e),Rl.forEach(t),Ol.forEach(t);for(var n=0;n<fi.length;n++){var r=fi[n];r.blockedOn===e&&(r.blockedOn=null)}for(;0<fi.length&&(n=fi[0],n.blockedOn===null);)OT(n),n.blockedOn===null&&fi.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(r=0;r<n.length;r+=3){var a=n[r],i=n[r+1],s=a[Tn]||null;if(typeof i=="function")s||DT(n);else if(s){var o=null;if(i&&i.hasAttribute("formAction")){if(a=i,s=i[Tn]||null)o=s.formAction;else if(i0(a)!==null)continue}else o=s.action;typeof o=="function"?n[r+1]=o:(n.splice(r,3),r-=3),DT(n)}}}function o0(e){this._internalRoot=e}wf.prototype.render=o0.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(G(409));var n=t.current,r=Fn();ST(n,r,e,t,null,null)},wf.prototype.unmount=o0.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;e.tag===0&&Ao(),ST(e.current,2,null,e,null,null),rf(),t[Ks]=null}};function wf(e){this._internalRoot=e}wf.prototype.unstable_scheduleHydration=function(e){if(e){var t=sx();e={blockedOn:null,target:e,priority:t};for(var n=0;n<fi.length&&t!==0&&t<fi[n].priority;n++);fi.splice(n,0,e),n===0&&OT(e)}};var MT=Hy.version;if(MT!=="19.0.0")throw Error(G(527,MT,"19.0.0"));st.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(G(188)):(e=Object.keys(e).join(","),Error(G(268,e)));return e=N4(t),e=e!==null?Qy(e):null,e=e===null?null:e.stateNode,e};var Z5={bundleType:0,version:"19.0.0",rendererPackageName:"react-dom",currentDispatcherRef:xe,findFiberByHostInstance:Zi,reconcilerVersion:"19.0.0"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Tf=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Tf.isDisabled&&Tf.supportsFiber)try{Bu=Tf.inject(Z5),Mn=Tf}catch{}}sd.createRoot=function(e,t){if(!zy(e))throw Error(G(299));var n=!1,r="",a=KE,i=QE,s=ZE,o=null;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onUncaughtError!==void 0&&(a=t.onUncaughtError),t.onCaughtError!==void 0&&(i=t.onCaughtError),t.onRecoverableError!==void 0&&(s=t.onRecoverableError),t.unstable_transitionCallbacks!==void 0&&(o=t.unstable_transitionCallbacks)),t=TT(e,1,!1,null,null,n,r,a,i,s,o,null),e[Ks]=t.current,Yg(e.nodeType===8?e.parentNode:e),new o0(t)},sd.hydrateRoot=function(e,t,n){if(!zy(e))throw Error(G(299));var r=!1,a="",i=KE,s=QE,o=ZE,u=null,l=null;return n!=null&&(n.unstable_strictMode===!0&&(r=!0),n.identifierPrefix!==void 0&&(a=n.identifierPrefix),n.onUncaughtError!==void 0&&(i=n.onUncaughtError),n.onCaughtError!==void 0&&(s=n.onCaughtError),n.onRecoverableError!==void 0&&(o=n.onRecoverableError),n.unstable_transitionCallbacks!==void 0&&(u=n.unstable_transitionCallbacks),n.formState!==void 0&&(l=n.formState)),t=TT(e,1,!0,t,n??null,r,a,i,s,o,u,l),t.context=_T(null),n=t.current,r=Fn(),a=ti(r),a.callback=null,ni(n,a,r),t.current.lanes=r,Fu(t,r),zr(t),e[Ks]=t.current,Yg(e),new wf(t)},sd.version="19.0.0";function LT(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(LT)}catch(e){console.error(e)}}LT(),Iy.exports=sd;var J5=Iy.exports;const IT="3.0.58";function _f(e){"@babel/helpers - typeof";return _f=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},_f(e)}var eL=/^\s+/,tL=/\s+$/;function le(e,t){if(e=e||"",t=t||{},e instanceof le)return e;if(!(this instanceof le))return new le(e,t);var n=nL(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}le.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,a,i,s,o;return n=t.r/255,r=t.g/255,a=t.b/255,n<=.03928?i=n/12.92:i=Math.pow((n+.055)/1.055,2.4),r<=.03928?s=r/12.92:s=Math.pow((r+.055)/1.055,2.4),a<=.03928?o=a/12.92:o=Math.pow((a+.055)/1.055,2.4),.2126*i+.7152*s+.0722*o},setAlpha:function(t){return this._a=HT(t),this._roundA=Math.round(100*this._a)/100,this},toHsv:function(){var t=BT(this._r,this._g,this._b);return{h:t.h*360,s:t.s,v:t.v,a:this._a}},toHsvString:function(){var t=BT(this._r,this._g,this._b),n=Math.round(t.h*360),r=Math.round(t.s*100),a=Math.round(t.v*100);return this._a==1?"hsv("+n+", "+r+"%, "+a+"%)":"hsva("+n+", "+r+"%, "+a+"%, "+this._roundA+")"},toHsl:function(){var t=PT(this._r,this._g,this._b);return{h:t.h*360,s:t.s,l:t.l,a:this._a}},toHslString:function(){var t=PT(this._r,this._g,this._b),n=Math.round(t.h*360),r=Math.round(t.s*100),a=Math.round(t.l*100);return this._a==1?"hsl("+n+", "+r+"%, "+a+"%)":"hsla("+n+", "+r+"%, "+a+"%, "+this._roundA+")"},toHex:function(t){return UT(this._r,this._g,this._b,t)},toHexString:function(t){return"#"+this.toHex(t)},toHex8:function(t){return sL(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(ct(this._r,255)*100)+"%",g:Math.round(ct(this._g,255)*100)+"%",b:Math.round(ct(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+Math.round(ct(this._r,255)*100)+"%, "+Math.round(ct(this._g,255)*100)+"%, "+Math.round(ct(this._b,255)*100)+"%)":"rgba("+Math.round(ct(this._r,255)*100)+"%, "+Math.round(ct(this._g,255)*100)+"%, "+Math.round(ct(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:vL[UT(this._r,this._g,this._b,!0)]||!1},toFilter:function(t){var n="#"+FT(this._r,this._g,this._b,this._a),r=n,a=this._gradientType?"GradientType = 1, ":"";if(t){var i=le(t);r="#"+FT(i._r,i._g,i._b,i._a)}return"progid:DXImageTransform.Microsoft.gradient("+a+"startColorstr="+n+",endColorstr="+r+")"},toString:function(t){var n=!!t;t=t||this._format;var r=!1,a=this._a<1&&this._a>=0,i=!n&&a&&(t==="hex"||t==="hex6"||t==="hex3"||t==="hex4"||t==="hex8"||t==="name");return i?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 le(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(cL,arguments)},brighten:function(){return this._applyModification(dL,arguments)},darken:function(){return this._applyModification(fL,arguments)},desaturate:function(){return this._applyModification(oL,arguments)},saturate:function(){return this._applyModification(uL,arguments)},greyscale:function(){return this._applyModification(lL,arguments)},spin:function(){return this._applyModification(pL,arguments)},_applyCombination:function(t,n){return t.apply(null,[this].concat([].slice.call(n)))},analogous:function(){return this._applyCombination(gL,arguments)},complement:function(){return this._applyCombination(hL,arguments)},monochromatic:function(){return this._applyCombination(bL,arguments)},splitcomplement:function(){return this._applyCombination(mL,arguments)},triad:function(){return this._applyCombination(jT,[3])},tetrad:function(){return this._applyCombination(jT,[4])}},le.fromRatio=function(e,t){if(_f(e)=="object"){var n={};for(var r in e)e.hasOwnProperty(r)&&(r==="a"?n[r]=e[r]:n[r]=Ml(e[r]));e=n}return le(e,t)};function nL(e){var t={r:0,g:0,b:0},n=1,r=null,a=null,i=null,s=!1,o=!1;return typeof e=="string"&&(e=wL(e)),_f(e)=="object"&&(wa(e.r)&&wa(e.g)&&wa(e.b)?(t=rL(e.r,e.g,e.b),s=!0,o=String(e.r).substr(-1)==="%"?"prgb":"rgb"):wa(e.h)&&wa(e.s)&&wa(e.v)?(r=Ml(e.s),a=Ml(e.v),t=iL(e.h,r,a),s=!0,o="hsv"):wa(e.h)&&wa(e.s)&&wa(e.l)&&(r=Ml(e.s),i=Ml(e.l),t=aL(e.h,r,i),s=!0,o="hsl"),e.hasOwnProperty("a")&&(n=e.a)),n=HT(n),{ok:s,format:e.format||o,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 rL(e,t,n){return{r:ct(e,255)*255,g:ct(t,255)*255,b:ct(n,255)*255}}function PT(e,t,n){e=ct(e,255),t=ct(t,255),n=ct(n,255);var r=Math.max(e,t,n),a=Math.min(e,t,n),i,s,o=(r+a)/2;if(r==a)i=s=0;else{var u=r-a;switch(s=o>.5?u/(2-r-a):u/(r+a),r){case e:i=(t-n)/u+(t<n?6:0);break;case t:i=(n-e)/u+2;break;case n:i=(e-t)/u+4;break}i/=6}return{h:i,s,l:o}}function aL(e,t,n){var r,a,i;e=ct(e,360),t=ct(t,100),n=ct(n,100);function s(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=a=i=n;else{var o=n<.5?n*(1+t):n+t-n*t,u=2*n-o;r=s(u,o,e+1/3),a=s(u,o,e),i=s(u,o,e-1/3)}return{r:r*255,g:a*255,b:i*255}}function BT(e,t,n){e=ct(e,255),t=ct(t,255),n=ct(n,255);var r=Math.max(e,t,n),a=Math.min(e,t,n),i,s,o=r,u=r-a;if(s=r===0?0:u/r,r==a)i=0;else{switch(r){case e:i=(t-n)/u+(t<n?6:0);break;case t:i=(n-e)/u+2;break;case n:i=(e-t)/u+4;break}i/=6}return{h:i,s,v:o}}function iL(e,t,n){e=ct(e,360)*6,t=ct(t,100),n=ct(n,100);var r=Math.floor(e),a=e-r,i=n*(1-t),s=n*(1-a*t),o=n*(1-(1-a)*t),u=r%6,l=[n,s,i,i,o,n][u],c=[o,n,n,s,i,i][u],d=[i,i,o,n,n,s][u];return{r:l*255,g:c*255,b:d*255}}function UT(e,t,n,r){var a=[Sr(Math.round(e).toString(16)),Sr(Math.round(t).toString(16)),Sr(Math.round(n).toString(16))];return r&&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[0].charAt(0)+a[1].charAt(0)+a[2].charAt(0):a.join("")}function sL(e,t,n,r,a){var i=[Sr(Math.round(e).toString(16)),Sr(Math.round(t).toString(16)),Sr(Math.round(n).toString(16)),Sr(zT(r))];return a&&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[3].charAt(0)==i[3].charAt(1)?i[0].charAt(0)+i[1].charAt(0)+i[2].charAt(0)+i[3].charAt(0):i.join("")}function FT(e,t,n,r){var a=[Sr(zT(r)),Sr(Math.round(e).toString(16)),Sr(Math.round(t).toString(16)),Sr(Math.round(n).toString(16))];return a.join("")}le.equals=function(e,t){return!e||!t?!1:le(e).toRgbString()==le(t).toRgbString()},le.random=function(){return le.fromRatio({r:Math.random(),g:Math.random(),b:Math.random()})};function oL(e,t){t=t===0?0:t||10;var n=le(e).toHsl();return n.s-=t/100,n.s=Sf(n.s),le(n)}function uL(e,t){t=t===0?0:t||10;var n=le(e).toHsl();return n.s+=t/100,n.s=Sf(n.s),le(n)}function lL(e){return le(e).desaturate(100)}function cL(e,t){t=t===0?0:t||10;var n=le(e).toHsl();return n.l+=t/100,n.l=Sf(n.l),le(n)}function dL(e,t){t=t===0?0:t||10;var n=le(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)))),le(n)}function fL(e,t){t=t===0?0:t||10;var n=le(e).toHsl();return n.l-=t/100,n.l=Sf(n.l),le(n)}function pL(e,t){var n=le(e).toHsl(),r=(n.h+t)%360;return n.h=r<0?360+r:r,le(n)}function hL(e){var t=le(e).toHsl();return t.h=(t.h+180)%360,le(t)}function jT(e,t){if(isNaN(t)||t<=0)throw new Error("Argument to polyad must be a positive number");for(var n=le(e).toHsl(),r=[le(e)],a=360/t,i=1;i<t;i++)r.push(le({h:(n.h+i*a)%360,s:n.s,l:n.l}));return r}function mL(e){var t=le(e).toHsl(),n=t.h;return[le(e),le({h:(n+72)%360,s:t.s,l:t.l}),le({h:(n+216)%360,s:t.s,l:t.l})]}function gL(e,t,n){t=t||6,n=n||30;var r=le(e).toHsl(),a=360/n,i=[le(e)];for(r.h=(r.h-(a*t>>1)+720)%360;--t;)r.h=(r.h+a)%360,i.push(le(r));return i}function bL(e,t){t=t||6;for(var n=le(e).toHsv(),r=n.h,a=n.s,i=n.v,s=[],o=1/t;t--;)s.push(le({h:r,s:a,v:i})),i=(i+o)%1;return s}le.mix=function(e,t,n){n=n===0?0:n||50;var r=le(e).toRgb(),a=le(t).toRgb(),i=n/100,s={r:(a.r-r.r)*i+r.r,g:(a.g-r.g)*i+r.g,b:(a.b-r.b)*i+r.b,a:(a.a-r.a)*i+r.a};return le(s)},le.readability=function(e,t){var n=le(e),r=le(t);return(Math.max(n.getLuminance(),r.getLuminance())+.05)/(Math.min(n.getLuminance(),r.getLuminance())+.05)},le.isReadable=function(e,t,n){var r=le.readability(e,t),a,i;switch(i=!1,a=TL(n),a.level+a.size){case"AAsmall":case"AAAlarge":i=r>=4.5;break;case"AAlarge":i=r>=3;break;case"AAAsmall":i=r>=7;break}return i},le.mostReadable=function(e,t,n){var r=null,a=0,i,s,o,u;n=n||{},s=n.includeFallbackColors,o=n.level,u=n.size;for(var l=0;l<t.length;l++)i=le.readability(e,t[l]),i>a&&(a=i,r=le(t[l]));return le.isReadable(e,r,{level:o,size:u})||!s?r:(n.includeFallbackColors=!1,le.mostReadable(e,["#fff","#000"],n))};var u0=le.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"},vL=le.hexNames=yL(u0);function yL(e){var t={};for(var n in e)e.hasOwnProperty(n)&&(t[e[n]]=n);return t}function HT(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function ct(e,t){xL(e)&&(e="100%");var n=EL(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 Sf(e){return Math.min(1,Math.max(0,e))}function jn(e){return parseInt(e,16)}function xL(e){return typeof e=="string"&&e.indexOf(".")!=-1&&parseFloat(e)===1}function EL(e){return typeof e=="string"&&e.indexOf("%")!=-1}function Sr(e){return e.length==1?"0"+e:""+e}function Ml(e){return e<=1&&(e=e*100+"%"),e}function zT(e){return Math.round(parseFloat(e)*255).toString(16)}function VT(e){return jn(e)/255}var Ar=function(){var e="[-\\+]?\\d+%?",t="[-\\+]?\\d*\\.\\d+%?",n="(?:"+t+")|(?:"+e+")",r="[\\s|\\(]+("+n+")[,|\\s]+("+n+")[,|\\s]+("+n+")\\s*\\)?",a="[\\s|\\(]+("+n+")[,|\\s]+("+n+")[,|\\s]+("+n+")[,|\\s]+("+n+")\\s*\\)?";return{CSS_UNIT:new RegExp(n),rgb:new RegExp("rgb"+r),rgba:new RegExp("rgba"+a),hsl:new RegExp("hsl"+r),hsla:new RegExp("hsla"+a),hsv:new RegExp("hsv"+r),hsva:new RegExp("hsva"+a),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 wa(e){return!!Ar.CSS_UNIT.exec(e)}function wL(e){e=e.replace(eL,"").replace(tL,"").toLowerCase();var t=!1;if(u0[e])e=u0[e],t=!0;else if(e=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var n;return(n=Ar.rgb.exec(e))?{r:n[1],g:n[2],b:n[3]}:(n=Ar.rgba.exec(e))?{r:n[1],g:n[2],b:n[3],a:n[4]}:(n=Ar.hsl.exec(e))?{h:n[1],s:n[2],l:n[3]}:(n=Ar.hsla.exec(e))?{h:n[1],s:n[2],l:n[3],a:n[4]}:(n=Ar.hsv.exec(e))?{h:n[1],s:n[2],v:n[3]}:(n=Ar.hsva.exec(e))?{h:n[1],s:n[2],v:n[3],a:n[4]}:(n=Ar.hex8.exec(e))?{r:jn(n[1]),g:jn(n[2]),b:jn(n[3]),a:VT(n[4]),format:t?"name":"hex8"}:(n=Ar.hex6.exec(e))?{r:jn(n[1]),g:jn(n[2]),b:jn(n[3]),format:t?"name":"hex"}:(n=Ar.hex4.exec(e))?{r:jn(n[1]+""+n[1]),g:jn(n[2]+""+n[2]),b:jn(n[3]+""+n[3]),a:VT(n[4]+""+n[4]),format:t?"name":"hex8"}:(n=Ar.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 TL(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 _L=350,YT=400,qT=600,l0={widgetMinHeight:"min-h-[400px]",widgetMaxHeight:"max-h-[600px]",widgetHeight:"h-[600px]"},GT=({primary:e="hsl(0, 0%, 0%)"})=>{const t=le(e).toHsl(),n=le(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 SL(e){if(typeof Proxy>"u")return e;const t=new Map,n=(...r)=>e(...r);return new Proxy(n,{get:(r,a)=>a==="create"?e:(t.has(a)||t.set(a,e(a)),t.get(a))})}function Ll(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}const c0=e=>Array.isArray(e);function $T(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 Il(e){return typeof e=="string"||Array.isArray(e)}function XT(e){const t=[{},{}];return e==null||e.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function d0(e,t,n,r){if(typeof t=="function"){const[a,i]=XT(r);t=t(n!==void 0?n:e.custom,a,i)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[a,i]=XT(r);t=t(n!==void 0?n:e.custom,a,i)}return t}function Af(e,t,n){const r=e.getProps();return d0(r,t,n!==void 0?n:r.custom,e)}const f0=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],p0=["initial",...f0],Pl=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],pi=new Set(Pl),Ta=e=>e*1e3,_a=e=>e/1e3,AL={type:"spring",stiffness:500,damping:25,restSpeed:10},CL=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),kL={type:"keyframes",duration:.8},RL={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},OL=(e,{keyframes:t})=>t.length>2?kL:pi.has(e)?e.startsWith("scale")?CL(t[1]):AL:RL;function h0(e,t){return e?e[t]||e.default||e:void 0}const NL={skipAnimations:!1,useManualTiming:!1},DL=e=>e!==null;function Cf(e,{repeat:t,repeatType:n="loop"},r){const a=e.filter(DL),i=t&&n!=="loop"&&t%2===1?0:a.length-1;return!i||r===void 0?a[i]:r}const sn=e=>e;function ML(e){let t=new Set,n=new Set,r=!1,a=!1;const i=new WeakSet;let s={delta:0,timestamp:0,isProcessing:!1};function o(l){i.has(l)&&(u.schedule(l),e()),l(s)}const u={schedule:(l,c=!1,d=!1)=>{const p=d&&r?t:n;return c&&i.add(l),p.has(l)||p.add(l),l},cancel:l=>{n.delete(l),i.delete(l)},process:l=>{if(s=l,r){a=!0;return}r=!0,[t,n]=[n,t],n.clear(),t.forEach(o),r=!1,a&&(a=!1,u.process(l))}};return u}const kf=["read","resolveKeyframes","update","preRender","render","postRender"],LL=40;function WT(e,t){let n=!1,r=!0;const a={delta:0,timestamp:0,isProcessing:!1},i=()=>n=!0,s=kf.reduce((m,y)=>(m[y]=ML(i),m),{}),{read:o,resolveKeyframes:u,update:l,preRender:c,render:d,postRender:f}=s,p=()=>{const m=performance.now();n=!1,a.delta=r?1e3/60:Math.max(Math.min(m-a.timestamp,LL),1),a.timestamp=m,a.isProcessing=!0,o.process(a),u.process(a),l.process(a),c.process(a),d.process(a),f.process(a),a.isProcessing=!1,n&&t&&(r=!1,e(p))},g=()=>{n=!0,r=!0,a.isProcessing||e(p)};return{schedule:kf.reduce((m,y)=>{const x=s[y];return m[y]=(T,_=!1,A=!1)=>(n||g(),x.schedule(T,_,A)),m},{}),cancel:m=>{for(let y=0;y<kf.length;y++)s[kf[y]].cancel(m)},state:a,steps:s}}const{schedule:Qe,cancel:hi,state:Jt,steps:m0}=WT(typeof requestAnimationFrame<"u"?requestAnimationFrame:sn,!0),KT=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,IL=1e-7,PL=12;function BL(e,t,n,r,a){let i,s,o=0;do s=t+(n-t)/2,i=KT(s,r,a)-e,i>0?n=s:t=s;while(Math.abs(i)>IL&&++o<PL);return s}function Bl(e,t,n,r){if(e===t&&n===r)return sn;const a=i=>BL(i,0,1,e,n);return i=>i===0||i===1?i:KT(a(i),t,r)}const QT=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,ZT=e=>t=>1-e(1-t),JT=Bl(.33,1.53,.69,.99),g0=ZT(JT),e2=QT(g0),t2=e=>(e*=2)<1?.5*g0(e):.5*(2-Math.pow(2,-10*(e-1))),b0=e=>1-Math.sin(Math.acos(e)),n2=ZT(b0),r2=QT(b0),a2=e=>/^0[^.\s]+$/u.test(e);function UL(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||a2(e):!0}let v0=sn;const i2=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),s2=e=>t=>typeof t=="string"&&t.startsWith(e),o2=s2("--"),FL=s2("var(--"),y0=e=>FL(e)?jL.test(e.split("/*")[0].trim()):!1,jL=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,HL=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function zL(e){const t=HL.exec(e);if(!t)return[,];const[,n,r,a]=t;return[`--${n??r}`,a]}function u2(e,t,n=1){const[r,a]=zL(e);if(!r)return;const i=window.getComputedStyle(t).getPropertyValue(r);if(i){const s=i.trim();return i2(s)?parseFloat(s):s}return y0(a)?u2(a,t,n+1):a}const mi=(e,t,n)=>n>t?t:n<e?e:n,Do={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Ul={...Do,transform:e=>mi(0,1,e)},Rf={...Do,default:1},Fl=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),gi=Fl("deg"),Vr=Fl("%"),pe=Fl("px"),VL=Fl("vh"),YL=Fl("vw"),l2={...Vr,parse:e=>Vr.parse(e)/100,transform:e=>Vr.transform(e*100)},qL=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),c2=e=>e===Do||e===pe,d2=(e,t)=>parseFloat(e.split(", ")[t]),f2=(e,t)=>(n,{transform:r})=>{if(r==="none"||!r)return 0;const a=r.match(/^matrix3d\((.+)\)$/u);if(a)return d2(a[1],t);{const i=r.match(/^matrix\((.+)\)$/u);return i?d2(i[1],e):0}},GL=new Set(["x","y","z"]),$L=Pl.filter(e=>!GL.has(e));function XL(e){const t=[];return $L.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const Mo={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:f2(4,13),y:f2(5,14)};Mo.translateX=Mo.x,Mo.translateY=Mo.y;const p2=e=>t=>t.test(e),h2=[Do,pe,Vr,gi,YL,VL,{test:e=>e==="auto",parse:e=>e}],m2=e=>h2.find(p2(e)),ys=new Set;let x0=!1,E0=!1;function g2(){if(E0){const e=Array.from(ys).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const a=XL(r);a.length&&(n.set(r,a),r.render())}),e.forEach(r=>r.measureInitialState()),t.forEach(r=>{r.render();const a=n.get(r);a&&a.forEach(([i,s])=>{var o;(o=r.getValue(i))===null||o===void 0||o.set(s)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}E0=!1,x0=!1,ys.forEach(e=>e.complete()),ys.clear()}function b2(){ys.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(E0=!0)})}function WL(){b2(),g2()}class w0{constructor(t,n,r,a,i,s=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=r,this.motionValue=a,this.element=i,this.isAsync=s}scheduleResolve(){this.isScheduled=!0,this.isAsync?(ys.add(this),x0||(x0=!0,Qe.read(b2),Qe.resolveKeyframes(g2))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:a}=this;for(let i=0;i<t.length;i++)if(t[i]===null)if(i===0){const s=a==null?void 0:a.get(),o=t[t.length-1];if(s!==void 0)t[0]=s;else if(r&&n){const u=r.readValue(n,o);u!=null&&(t[0]=u)}t[0]===void 0&&(t[0]=o),a&&s===void 0&&a.set(t[0])}else t[i]=t[i-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),ys.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,ys.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const jl=e=>Math.round(e*1e5)/1e5,T0=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function KL(e){return e==null}const QL=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,_0=(e,t)=>n=>!!(typeof n=="string"&&QL.test(n)&&n.startsWith(e)||t&&!KL(n)&&Object.prototype.hasOwnProperty.call(n,t)),v2=(e,t,n)=>r=>{if(typeof r!="string")return r;const[a,i,s,o]=r.match(T0);return{[e]:parseFloat(a),[t]:parseFloat(i),[n]:parseFloat(s),alpha:o!==void 0?parseFloat(o):1}},ZL=e=>mi(0,255,e),S0={...Do,transform:e=>Math.round(ZL(e))},xs={test:_0("rgb","red"),parse:v2("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+S0.transform(e)+", "+S0.transform(t)+", "+S0.transform(n)+", "+jl(Ul.transform(r))+")"};function JL(e){let t="",n="",r="",a="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),a=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),a=e.substring(4,5),t+=t,n+=n,r+=r,a+=a),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:a?parseInt(a,16)/255:1}}const A0={test:_0("#"),parse:JL,transform:xs.transform},Lo={test:_0("hsl","hue"),parse:v2("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+Vr.transform(jl(t))+", "+Vr.transform(jl(n))+", "+jl(Ul.transform(r))+")"},on={test:e=>xs.test(e)||A0.test(e)||Lo.test(e),parse:e=>xs.test(e)?xs.parse(e):Lo.test(e)?Lo.parse(e):A0.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?xs.transform(e):Lo.transform(e)},eI=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function tI(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(T0))===null||t===void 0?void 0:t.length)||0)+(((n=e.match(eI))===null||n===void 0?void 0:n.length)||0)>0}const y2="number",x2="color",nI="var",rI="var(",E2="${}",aI=/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 Hl(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},a=[];let i=0;const o=t.replace(aI,u=>(on.test(u)?(r.color.push(i),a.push(x2),n.push(on.parse(u))):u.startsWith(rI)?(r.var.push(i),a.push(nI),n.push(u)):(r.number.push(i),a.push(y2),n.push(parseFloat(u))),++i,E2)).split(E2);return{values:n,split:o,indexes:r,types:a}}function w2(e){return Hl(e).values}function T2(e){const{split:t,types:n}=Hl(e),r=t.length;return a=>{let i="";for(let s=0;s<r;s++)if(i+=t[s],a[s]!==void 0){const o=n[s];o===y2?i+=jl(a[s]):o===x2?i+=on.transform(a[s]):i+=a[s]}return i}}const iI=e=>typeof e=="number"?0:e;function sI(e){const t=w2(e);return T2(e)(t.map(iI))}const bi={test:tI,parse:w2,createTransformer:T2,getAnimatableNone:sI},oI=new Set(["brightness","contrast","saturate","opacity"]);function uI(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(T0)||[];if(!r)return e;const a=n.replace(r,"");let i=oI.has(t)?1:0;return r!==n&&(i*=100),t+"("+i+a+")"}const lI=/\b([a-z-]*)\(.*?\)/gu,C0={...bi,getAnimatableNone:e=>{const t=e.match(lI);return t?t.map(uI).join(" "):e}},cI={borderWidth:pe,borderTopWidth:pe,borderRightWidth:pe,borderBottomWidth:pe,borderLeftWidth:pe,borderRadius:pe,radius:pe,borderTopLeftRadius:pe,borderTopRightRadius:pe,borderBottomRightRadius:pe,borderBottomLeftRadius:pe,width:pe,maxWidth:pe,height:pe,maxHeight:pe,top:pe,right:pe,bottom:pe,left:pe,padding:pe,paddingTop:pe,paddingRight:pe,paddingBottom:pe,paddingLeft:pe,margin:pe,marginTop:pe,marginRight:pe,marginBottom:pe,marginLeft:pe,backgroundPositionX:pe,backgroundPositionY:pe},dI={rotate:gi,rotateX:gi,rotateY:gi,rotateZ:gi,scale:Rf,scaleX:Rf,scaleY:Rf,scaleZ:Rf,skew:gi,skewX:gi,skewY:gi,distance:pe,translateX:pe,translateY:pe,translateZ:pe,x:pe,y:pe,z:pe,perspective:pe,transformPerspective:pe,opacity:Ul,originX:l2,originY:l2,originZ:pe},_2={...Do,transform:Math.round},k0={...cI,...dI,zIndex:_2,size:pe,fillOpacity:Ul,strokeOpacity:Ul,numOctaves:_2},fI={...k0,color:on,backgroundColor:on,outlineColor:on,fill:on,stroke:on,borderColor:on,borderTopColor:on,borderRightColor:on,borderBottomColor:on,borderLeftColor:on,filter:C0,WebkitFilter:C0},R0=e=>fI[e];function S2(e,t){let n=R0(e);return n!==C0&&(n=bi),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const pI=new Set(["auto","none","0"]);function hI(e,t,n){let r=0,a;for(;r<e.length&&!a;){const i=e[r];typeof i=="string"&&!pI.has(i)&&Hl(i).values.length&&(a=e[r]),r++}if(a&&n)for(const i of t)e[i]=S2(n,a)}class A2 extends w0{constructor(t,n,r,a,i){super(t,n,r,a,i,!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(),y0(l))){const c=u2(l,n.current);c!==void 0&&(t[u]=c),u===t.length-1&&(this.finalKeyframe=l)}}if(this.resolveNoneKeyframes(),!qL.has(r)||t.length!==2)return;const[a,i]=t,s=m2(a),o=m2(i);if(s!==o)if(c2(s)&&c2(o))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 a=0;a<t.length;a++)UL(t[a])&&r.push(a);r.length&&hI(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=Mo[r](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const a=n[n.length-1];a!==void 0&&t.getValue(r,a).jump(a,!1)}measureEndState(){var t;const{element:n,name:r,unresolvedKeyframes:a}=this;if(!n||!n.current)return;const i=n.getValue(r);i&&i.jump(this.measuredOrigin,!1);const s=a.length-1,o=a[s];a[s]=Mo[r](n.measureViewportBox(),window.getComputedStyle(n.current)),o!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=o),!((t=this.removedTransforms)===null||t===void 0)&&t.length&&this.removedTransforms.forEach(([u,l])=>{n.getValue(u).set(l)}),this.resolveNoneKeyframes()}}function O0(e){return typeof e=="function"}let Of;function mI(){Of=void 0}const Yr={now:()=>(Of===void 0&&Yr.set(Jt.isProcessing||NL.useManualTiming?Jt.timestamp:performance.now()),Of),set:e=>{Of=e,queueMicrotask(mI)}},C2=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(bi.test(e)||e==="0")&&!e.startsWith("url("));function gI(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 bI(e,t,n,r){const a=e[0];if(a===null)return!1;if(t==="display"||t==="visibility")return!0;const i=e[e.length-1],s=C2(a,t),o=C2(i,t);return!s||!o?!1:gI(e)||(n==="spring"||O0(n))&&r}const vI=40;class k2{constructor({autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:a=0,repeatDelay:i=0,repeatType:s="loop",...o}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.createdAt=Yr.now(),this.options={autoplay:t,delay:n,type:r,repeat:a,repeatDelay:i,repeatType:s,...o},this.updateFinishedPromise()}calcStartTime(){return this.resolvedAt?this.resolvedAt-this.createdAt>vI?this.resolvedAt:this.createdAt:this.createdAt}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&WL(),this._resolved}onKeyframesResolved(t,n){this.resolvedAt=Yr.now(),this.hasAttemptedResolve=!0;const{name:r,type:a,velocity:i,delay:s,onComplete:o,onUpdate:u,isGenerator:l}=this.options;if(!l&&!bI(t,r,a,i))if(s)this.options.duration=0;else{u==null||u(Cf(t,this.options,n)),o==null||o(),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 R2(e,t){return t?e*(1e3/t):0}const yI=5;function O2(e,t,n){const r=Math.max(t-yI,0);return R2(n-e(r),t-r)}const N0=.001,xI=.01,EI=10,wI=.05,TI=1;function _I({duration:e=800,bounce:t=.25,velocity:n=0,mass:r=1}){let a,i,s=1-t;s=mi(wI,TI,s),e=mi(xI,EI,_a(e)),s<1?(a=l=>{const c=l*s,d=c*e,f=c-n,p=D0(l,s),g=Math.exp(-d);return N0-f/p*g},i=l=>{const d=l*s*e,f=d*n+n,p=Math.pow(s,2)*Math.pow(l,2)*e,g=Math.exp(-d),v=D0(Math.pow(l,2),s);return(-a(l)+N0>0?-1:1)*((f-p)*g)/v}):(a=l=>{const c=Math.exp(-l*e),d=(l-n)*e+1;return-N0+c*d},i=l=>{const c=Math.exp(-l*e),d=(n-l)*(e*e);return c*d});const o=5/e,u=AI(a,i,o);if(e=Ta(e),isNaN(u))return{stiffness:100,damping:10,duration:e};{const l=Math.pow(u,2)*r;return{stiffness:l,damping:s*2*Math.sqrt(r*l),duration:e}}}const SI=12;function AI(e,t,n){let r=n;for(let a=1;a<SI;a++)r=r-e(r)/t(r);return r}function D0(e,t){return e*Math.sqrt(1-t*t)}const CI=["duration","bounce"],kI=["stiffness","damping","mass"];function N2(e,t){return t.some(n=>e[n]!==void 0)}function RI(e){let t={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...e};if(!N2(e,kI)&&N2(e,CI)){const n=_I(e);t={...t,...n,mass:1},t.isResolvedFromDuration=!0}return t}function D2({keyframes:e,restDelta:t,restSpeed:n,...r}){const a=e[0],i=e[e.length-1],s={done:!1,value:a},{stiffness:o,damping:u,mass:l,duration:c,velocity:d,isResolvedFromDuration:f}=RI({...r,velocity:-_a(r.velocity||0)}),p=d||0,g=u/(2*Math.sqrt(o*l)),v=i-a,w=_a(Math.sqrt(o/l)),m=Math.abs(v)<5;n||(n=m?.01:2),t||(t=m?.005:.5);let y;if(g<1){const x=D0(w,g);y=T=>{const _=Math.exp(-g*w*T);return i-_*((p+g*w*v)/x*Math.sin(x*T)+v*Math.cos(x*T))}}else if(g===1)y=x=>i-Math.exp(-w*x)*(v+(p+w*v)*x);else{const x=w*Math.sqrt(g*g-1);y=T=>{const _=Math.exp(-g*w*T),A=Math.min(x*T,300);return i-_*((p+g*w*v)*Math.sinh(A)+x*v*Math.cosh(A))/x}}return{calculatedDuration:f&&c||null,next:x=>{const T=y(x);if(f)s.done=x>=c;else{let _=0;g<1&&(_=x===0?Ta(p):O2(y,x,T));const A=Math.abs(_)<=n,C=Math.abs(i-T)<=t;s.done=A&&C}return s.value=s.done?i:T,s}}}function M2({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:a=10,bounceStiffness:i=500,modifyTarget:s,min:o,max:u,restDelta:l=.5,restSpeed:c}){const d=e[0],f={done:!1,value:d},p=M=>o!==void 0&&M<o||u!==void 0&&M>u,g=M=>o===void 0?u:u===void 0||Math.abs(o-M)<Math.abs(u-M)?o:u;let v=n*t;const w=d+v,m=s===void 0?w:s(w);m!==w&&(v=m-d);const y=M=>-v*Math.exp(-M/r),x=M=>m+y(M),T=M=>{const j=y(M),N=x(M);f.done=Math.abs(j)<=l,f.value=f.done?m:N};let _,A;const C=M=>{p(f.value)&&(_=M,A=D2({keyframes:[f.value,g(f.value)],velocity:O2(x,M,f.value),damping:a,stiffness:i,restDelta:l,restSpeed:c}))};return C(0),{calculatedDuration:null,next:M=>{let j=!1;return!A&&_===void 0&&(j=!0,T(M),C(M)),_!==void 0&&M>=_?A.next(M-_):(!j&&T(M),f)}}}const OI=Bl(.42,0,1,1),NI=Bl(0,0,.58,1),L2=Bl(.42,0,.58,1),DI=e=>Array.isArray(e)&&typeof e[0]!="number",M0=e=>Array.isArray(e)&&typeof e[0]=="number",I2={linear:sn,easeIn:OI,easeInOut:L2,easeOut:NI,circIn:b0,circInOut:r2,circOut:n2,backIn:g0,backInOut:e2,backOut:JT,anticipate:t2},P2=e=>{if(M0(e)){v0(e.length===4);const[t,n,r,a]=e;return Bl(t,n,r,a)}else if(typeof e=="string")return v0(I2[e]!==void 0),I2[e];return e},MI=(e,t)=>n=>t(e(n)),Sa=(...e)=>e.reduce(MI),Io=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r},gt=(e,t,n)=>e+(t-e)*n;function L0(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 LI({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let a=0,i=0,s=0;if(!t)a=i=s=n;else{const o=n<.5?n*(1+t):n+t-n*t,u=2*n-o;a=L0(u,o,e+1/3),i=L0(u,o,e),s=L0(u,o,e-1/3)}return{red:Math.round(a*255),green:Math.round(i*255),blue:Math.round(s*255),alpha:r}}function Nf(e,t){return n=>n>0?t:e}const I0=(e,t,n)=>{const r=e*e,a=n*(t*t-r)+r;return a<0?0:Math.sqrt(a)},II=[A0,xs,Lo],PI=e=>II.find(t=>t.test(e));function B2(e){const t=PI(e);if(!t)return!1;let n=t.parse(e);return t===Lo&&(n=LI(n)),n}const U2=(e,t)=>{const n=B2(e),r=B2(t);if(!n||!r)return Nf(e,t);const a={...n};return i=>(a.red=I0(n.red,r.red,i),a.green=I0(n.green,r.green,i),a.blue=I0(n.blue,r.blue,i),a.alpha=gt(n.alpha,r.alpha,i),xs.transform(a))},P0=new Set(["none","hidden"]);function BI(e,t){return P0.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function UI(e,t){return n=>gt(e,t,n)}function B0(e){return typeof e=="number"?UI:typeof e=="string"?y0(e)?Nf:on.test(e)?U2:HI:Array.isArray(e)?F2:typeof e=="object"?on.test(e)?U2:FI:Nf}function F2(e,t){const n=[...e],r=n.length,a=e.map((i,s)=>B0(i)(i,t[s]));return i=>{for(let s=0;s<r;s++)n[s]=a[s](i);return n}}function FI(e,t){const n={...e,...t},r={};for(const a in n)e[a]!==void 0&&t[a]!==void 0&&(r[a]=B0(e[a])(e[a],t[a]));return a=>{for(const i in r)n[i]=r[i](a);return n}}function jI(e,t){var n;const r=[],a={color:0,var:0,number:0};for(let i=0;i<t.values.length;i++){const s=t.types[i],o=e.indexes[s][a[s]],u=(n=e.values[o])!==null&&n!==void 0?n:0;r[i]=u,a[s]++}return r}const HI=(e,t)=>{const n=bi.createTransformer(t),r=Hl(e),a=Hl(t);return r.indexes.var.length===a.indexes.var.length&&r.indexes.color.length===a.indexes.color.length&&r.indexes.number.length>=a.indexes.number.length?P0.has(e)&&!a.values.length||P0.has(t)&&!r.values.length?BI(e,t):Sa(F2(jI(r,a),a.values),n):Nf(e,t)};function j2(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?gt(e,t,n):B0(e)(e,t)}function zI(e,t,n){const r=[],a=n||j2,i=e.length-1;for(let s=0;s<i;s++){let o=a(e[s],e[s+1]);if(t){const u=Array.isArray(t)?t[s]||sn:t;o=Sa(u,o)}r.push(o)}return r}function VI(e,t,{clamp:n=!0,ease:r,mixer:a}={}){const i=e.length;if(v0(i===t.length),i===1)return()=>t[0];if(i===2&&e[0]===e[1])return()=>t[1];e[0]>e[i-1]&&(e=[...e].reverse(),t=[...t].reverse());const s=zI(t,r,a),o=s.length,u=l=>{let c=0;if(o>1)for(;c<e.length-2&&!(l<e[c+1]);c++);const d=Io(e[c],e[c+1],l);return s[c](d)};return n?l=>u(mi(e[0],e[i-1],l)):u}function YI(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const a=Io(0,t,r);e.push(gt(n,1,a))}}function qI(e){const t=[0];return YI(t,e.length-1),t}function GI(e,t){return e.map(n=>n*t)}function $I(e,t){return e.map(()=>t||L2).splice(0,e.length-1)}function Df({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const a=DI(r)?r.map(P2):P2(r),i={done:!1,value:t[0]},s=GI(n&&n.length===t.length?n:qI(t),e),o=VI(s,t,{ease:Array.isArray(a)?a:$I(t,a)});return{calculatedDuration:e,next:u=>(i.value=o(u),i.done=u>=e,i)}}const H2=2e4;function XI(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<H2;)t+=n,r=e.next(t);return t>=H2?1/0:t}const WI=e=>{const t=({timestamp:n})=>e(n);return{start:()=>Qe.update(t,!0),stop:()=>hi(t),now:()=>Jt.isProcessing?Jt.timestamp:Yr.now()}},KI={decay:M2,inertia:M2,tween:Df,keyframes:Df,spring:D2},QI=e=>e/100;class U0 extends k2{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:a,keyframes:i}=this.options,s=(a==null?void 0:a.KeyframeResolver)||w0,o=(u,l)=>this.onKeyframesResolved(u,l);this.resolver=new s(i,o,n,r,a),this.resolver.scheduleResolve()}initPlayback(t){const{type:n="keyframes",repeat:r=0,repeatDelay:a=0,repeatType:i,velocity:s=0}=this.options,o=O0(n)?n:KI[n]||Df;let u,l;o!==Df&&typeof t[0]!="number"&&(u=Sa(QI,j2(t[0],t[1])),t=[0,100]);const c=o({...this.options,keyframes:t});i==="mirror"&&(l=o({...this.options,keyframes:[...t].reverse(),velocity:-s})),c.calculatedDuration===null&&(c.calculatedDuration=XI(c));const{calculatedDuration:d}=c,f=d+a,p=f*(r+1)-a;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:M}=this.options;return{done:!0,value:M[M.length-1]}}const{finalKeyframe:a,generator:i,mirroredGenerator:s,mapPercentToKeyframes:o,keyframes:u,calculatedDuration:l,totalDuration:c,resolvedDuration:d}=r;if(this.startTime===null)return i.next(0);const{delay:f,repeat:p,repeatType:g,repeatDelay:v,onUpdate:w}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-c/this.speed,this.startTime)),n?this.currentTime=t:this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=Math.round(t-this.startTime)*this.speed;const m=this.currentTime-f*(this.speed>=0?1:-1),y=this.speed>=0?m<0:m>c;this.currentTime=Math.max(m,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=c);let x=this.currentTime,T=i;if(p){const M=Math.min(this.currentTime,c)/d;let j=Math.floor(M),N=M%1;!N&&M>=1&&(N=1),N===1&&j--,j=Math.min(j,p+1),!!(j%2)&&(g==="reverse"?(N=1-N,v&&(N-=v/d)):g==="mirror"&&(T=s)),x=mi(0,1,N)*d}const _=y?{done:!1,value:u[0]}:T.next(x);o&&(_.value=o(_.value));let{done:A}=_;!y&&l!==null&&(A=this.speed>=0?this.currentTime>=c:this.currentTime<=0);const C=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&A);return C&&a!==void 0&&(_.value=Cf(u,this.options,a)),w&&w(_.value),C&&this.finish(),_}get duration(){const{resolved:t}=this;return t?_a(t.calculatedDuration):0}get time(){return _a(this.currentTime)}set time(t){t=Ta(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=_a(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:t=WI,onPlay:n,startTime:r}=this.options;this.driver||(this.driver=t(i=>this.tick(i))),n&&n();const a=this.driver.now();this.holdTime!==null?this.startTime=a-this.holdTime:this.startTime?this.state==="finished"&&(this.startTime=a):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 z2=new Set(["opacity","clipPath","filter","transform"]),ZI=10,JI=(e,t)=>{let n="";const r=Math.max(Math.round(t/ZI),2);for(let a=0;a<r;a++)n+=e(Io(0,r-1,a))+", ";return`linear(${n.substring(0,n.length-2)})`};function F0(e){let t;return()=>(t===void 0&&(t=e()),t)}const eP={linearEasing:void 0};function tP(e,t){const n=F0(e);return()=>{var r;return(r=eP[t])!==null&&r!==void 0?r:n()}}const Mf=tP(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing");function V2(e){return!!(typeof e=="function"&&Mf()||!e||typeof e=="string"&&(e in j0||Mf())||M0(e)||Array.isArray(e)&&e.every(V2))}const zl=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,j0={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:zl([0,.65,.55,1]),circOut:zl([.55,0,1,.45]),backIn:zl([.31,.01,.66,-.59]),backOut:zl([.33,1.53,.69,.99])};function Y2(e,t){if(e)return typeof e=="function"&&Mf()?JI(e,t):M0(e)?zl(e):Array.isArray(e)?e.map(n=>Y2(n,t)||j0.easeOut):j0[e]}function nP(e,t,n,{delay:r=0,duration:a=300,repeat:i=0,repeatType:s="loop",ease:o,times:u}={}){const l={[t]:n};u&&(l.offset=u);const c=Y2(o,a);return Array.isArray(c)&&(l.easing=c),e.animate(l,{delay:r,duration:a,easing:Array.isArray(c)?"linear":c,fill:"both",iterations:i+1,direction:s==="reverse"?"alternate":"normal"})}function q2(e,t){e.timeline=t,e.onfinish=null}const rP=F0(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),Lf=10,aP=2e4;function iP(e){return O0(e.type)||e.type==="spring"||!V2(e.ease)}function sP(e,t){const n=new U0({...t,keyframes:e,repeat:0,delay:0,isGenerator:!0});let r={done:!1,value:e[0]};const a=[];let i=0;for(;!r.done&&i<aP;)r=n.sample(i),a.push(r.value),i+=Lf;return{times:void 0,keyframes:a,duration:i-Lf,ease:"linear"}}const G2={anticipate:t2,backInOut:e2,circInOut:r2};function oP(e){return e in G2}class $2 extends k2{constructor(t){super(t);const{name:n,motionValue:r,element:a,keyframes:i}=this.options;this.resolver=new A2(i,(s,o)=>this.onKeyframesResolved(s,o),n,r,a),this.resolver.scheduleResolve()}initPlayback(t,n){var r;let{duration:a=300,times:i,ease:s,type:o,motionValue:u,name:l,startTime:c}=this.options;if(!(!((r=u.owner)===null||r===void 0)&&r.current))return!1;if(typeof s=="string"&&Mf()&&oP(s)&&(s=G2[s]),iP(this.options)){const{onComplete:f,onUpdate:p,motionValue:g,element:v,...w}=this.options,m=sP(t,w);t=m.keyframes,t.length===1&&(t[1]=t[0]),a=m.duration,i=m.times,s=m.ease,o="keyframes"}const d=nP(u.owner.current,l,t,{...this.options,duration:a,times:i,ease:s});return d.startTime=c??this.calcStartTime(),this.pendingTimeline?(q2(d,this.pendingTimeline),this.pendingTimeline=void 0):d.onfinish=()=>{const{onComplete:f}=this.options;u.set(Cf(t,this.options,n)),f&&f(),this.cancel(),this.resolveFinishedPromise()},{animation:d,duration:a,times:i,type:o,ease:s,keyframes:t}}get duration(){const{resolved:t}=this;if(!t)return 0;const{duration:n}=t;return _a(n)}get time(){const{resolved:t}=this;if(!t)return 0;const{animation:n}=t;return _a(n.currentTime||0)}set time(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.currentTime=Ta(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 sn;const{animation:r}=n;q2(r,t)}return sn}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:a,type:i,ease:s,times:o}=t;if(n.playState==="idle"||n.playState==="finished")return;if(this.time){const{motionValue:l,onUpdate:c,onComplete:d,element:f,...p}=this.options,g=new U0({...p,keyframes:r,duration:a,type:i,ease:s,times:o,isGenerator:!0}),v=Ta(this.time);l.setWithVelocity(g.sample(v-Lf).value,g.sample(v).value,Lf)}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:a,repeatType:i,damping:s,type:o}=t;return rP()&&r&&z2.has(r)&&n&&n.owner&&n.owner.current instanceof HTMLElement&&!n.owner.getProps().onUpdate&&!a&&i!=="mirror"&&s!==0&&o!=="inertia"}}const uP=F0(()=>window.ScrollTimeline!==void 0);class lP{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(a=>uP()&&a.attachTimeline?a.attachTimeline(t):n(a));return()=>{r.forEach((a,i)=>{a&&a(),this.animations[i].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 cP({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:a,repeat:i,repeatType:s,repeatDelay:o,from:u,elapsed:l,...c}){return!!Object.keys(c).length}const H0=(e,t,n,r={},a,i)=>s=>{const o=h0(r,e)||{},u=o.delay||r.delay||0;let{elapsed:l=0}=r;l=l-Ta(u);let c={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...o,delay:-l,onUpdate:f=>{t.set(f),o.onUpdate&&o.onUpdate(f)},onComplete:()=>{s(),o.onComplete&&o.onComplete()},name:e,motionValue:t,element:i?void 0:a};cP(o)||(c={...c,...OL(e,c)}),c.duration&&(c.duration=Ta(c.duration)),c.repeatDelay&&(c.repeatDelay=Ta(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&&!i&&t.get()!==void 0){const f=Cf(c.keyframes,o);if(f!==void 0)return Qe.update(()=>{c.onUpdate(f),c.onComplete()}),new lP([])}return!i&&$2.supports(c)?new $2(c):new U0(c)},dP=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),fP=e=>c0(e)?e[e.length-1]||0:e;function z0(e,t){e.indexOf(t)===-1&&e.push(t)}function V0(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}class Y0{constructor(){this.subscriptions=[]}add(t){return z0(this.subscriptions,t),()=>V0(this.subscriptions,t)}notify(t,n,r){const a=this.subscriptions.length;if(a)if(a===1)this.subscriptions[0](t,n,r);else for(let i=0;i<a;i++){const s=this.subscriptions[i];s&&s(t,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const X2=30,pP=e=>!isNaN(parseFloat(e));class hP{constructor(t,n={}){this.version="11.11.9",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(r,a=!0)=>{const i=Yr.now();this.updatedAt!==i&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),a&&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=Yr.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=pP(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 Y0);const r=this.events[t].add(n);return t==="change"?()=>{r(),Qe.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=Yr.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>X2)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,X2);return R2(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 Vl(e,t){return new hP(e,t)}function mP(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Vl(n))}function gP(e,t){const n=Af(e,t);let{transitionEnd:r={},transition:a={},...i}=n||{};i={...i,...r};for(const s in i){const o=fP(i[s]);mP(e,s,o)}}const If=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),W2="data-"+If("framerAppearId");function K2(e){return e.props[W2]}const un=e=>!!(e&&e.getVelocity);function bP(e){return!!(un(e)&&e.add)}function q0(e,t){if(!e.applyWillChange)return;const n=e.getValue("willChange");if(bP(n))return n.add(t)}function vP({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function Q2(e,t,{delay:n=0,transitionOverride:r,type:a}={}){var i;let{transition:s=e.getDefaultTransition(),transitionEnd:o,...u}=t;r&&(s=r);const l=[],c=a&&e.animationState&&e.animationState.getState()[a];for(const d in u){const f=e.getValue(d,(i=e.latestValues[d])!==null&&i!==void 0?i:null),p=u[d];if(p===void 0||c&&vP(c,d))continue;const g={delay:n,...h0(s||{},d)};let v=!1;if(window.MotionHandoffAnimation){const m=K2(e);if(m){const y=window.MotionHandoffAnimation(m,d,Qe);y!==null&&(g.startTime=y,v=!0)}}q0(e,d),f.start(H0(d,f,p,e.shouldReduceMotion&&pi.has(d)?{type:!1}:g,e,v));const w=f.animation;w&&l.push(w)}return o&&Promise.all(l).then(()=>{Qe.update(()=>{o&&gP(e,o)})}),l}function G0(e,t,n={}){var r;const a=Af(e,t,n.type==="exit"?(r=e.presenceContext)===null||r===void 0?void 0:r.custom:void 0);let{transition:i=e.getDefaultTransition()||{}}=a||{};n.transitionOverride&&(i=n.transitionOverride);const s=a?()=>Promise.all(Q2(e,a,n)):()=>Promise.resolve(),o=e.variantChildren&&e.variantChildren.size?(l=0)=>{const{delayChildren:c=0,staggerChildren:d,staggerDirection:f}=i;return yP(e,t,c+l,d,f,n)}:()=>Promise.resolve(),{when:u}=i;if(u){const[l,c]=u==="beforeChildren"?[s,o]:[o,s];return l().then(()=>c())}else return Promise.all([s(),o(n.delay)])}function yP(e,t,n=0,r=0,a=1,i){const s=[],o=(e.variantChildren.size-1)*r,u=a===1?(l=0)=>l*r:(l=0)=>o-l*r;return Array.from(e.variantChildren).sort(xP).forEach((l,c)=>{l.notify("AnimationStart",t),s.push(G0(l,t,{...i,delay:n+u(c)}).then(()=>l.notify("AnimationComplete",t)))}),Promise.all(s)}function xP(e,t){return e.sortNodePosition(t)}function EP(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const a=t.map(i=>G0(e,i,n));r=Promise.all(a)}else if(typeof t=="string")r=G0(e,t,n);else{const a=typeof t=="function"?Af(e,t,n.custom):t;r=Promise.all(Q2(e,a,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}const wP=p0.length;function Z2(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?Z2(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<wP;n++){const r=p0[n],a=e.props[r];(Il(a)||a===!1)&&(t[r]=a)}return t}const TP=[...f0].reverse(),_P=f0.length;function SP(e){return t=>Promise.all(t.map(({animation:n,options:r})=>EP(e,n,r)))}function AP(e){let t=SP(e),n=J2(),r=!0;const a=u=>(l,c)=>{var d;const f=Af(e,c,u==="exit"?(d=e.presenceContext)===null||d===void 0?void 0:d.custom:void 0);if(f){const{transition:p,transitionEnd:g,...v}=f;l={...l,...v,...g}}return l};function i(u){t=u(e)}function s(u){const{props:l}=e,c=Z2(e.parent)||{},d=[],f=new Set;let p={},g=1/0;for(let w=0;w<_P;w++){const m=TP[w],y=n[m],x=l[m]!==void 0?l[m]:c[m],T=Il(x),_=m===u?y.isActive:null;_===!1&&(g=w);let A=x===c[m]&&x!==l[m]&&T;if(A&&r&&e.manuallyAnimateOnMount&&(A=!1),y.protectedKeys={...p},!y.isActive&&_===null||!x&&!y.prevProp||Ll(x)||typeof x=="boolean")continue;const C=CP(y.prevProp,x);let M=C||m===u&&y.isActive&&!A&&T||w>g&&T,j=!1;const N=Array.isArray(x)?x:[x];let Y=N.reduce(a(m),{});_===!1&&(Y={});const{prevResolvedValues:H={}}=y,ee={...H,...Y},$=q=>{M=!0,f.has(q)&&(j=!0,f.delete(q)),y.needsAnimating[q]=!0;const z=e.getValue(q);z&&(z.liveStyle=!1)};for(const q in ee){const z=Y[q],V=H[q];if(p.hasOwnProperty(q))continue;let R=!1;c0(z)&&c0(V)?R=!$T(z,V):R=z!==V,R?z!=null?$(q):f.add(q):z!==void 0&&f.has(q)?$(q):y.protectedKeys[q]=!0}y.prevProp=x,y.prevResolvedValues=Y,y.isActive&&(p={...p,...Y}),r&&e.blockInitialAnimation&&(M=!1),M&&(!(A&&C)||j)&&d.push(...N.map(q=>({animation:q,options:{type:m}})))}if(f.size){const w={};f.forEach(m=>{const y=e.getBaseTarget(m),x=e.getValue(m);x&&(x.liveStyle=!0),w[m]=y??null}),d.push({animation:w})}let v=!!d.length;return r&&(l.initial===!1||l.initial===l.animate)&&!e.manuallyAnimateOnMount&&(v=!1),r=!1,v?t(d):Promise.resolve()}function o(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=s(u);for(const f in n)n[f].protectedKeys={};return d}return{animateChanges:s,setActive:o,setAnimateFunction:i,getState:()=>n,reset:()=>{n=J2(),r=!0}}}function CP(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!$T(t,e):!1}function Es(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function J2(){return{animate:Es(!0),whileInView:Es(),whileHover:Es(),whileTap:Es(),whileDrag:Es(),whileFocus:Es(),exit:Es()}}class vi{constructor(t){this.isMounted=!1,this.node=t}update(){}}class kP extends vi{constructor(t){super(t),t.animationState||(t.animationState=AP(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();Ll(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 RP=0;class OP extends vi{constructor(){super(...arguments),this.id=RP++}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 a=this.node.animationState.setActive("exit",!t);n&&!t&&a.then(()=>n(this.id))}mount(){const{register:t}=this.node.presenceContext||{};t&&(this.unmount=t(this.id))}unmount(){}}const NP={animation:{Feature:kP},exit:{Feature:OP}},e_=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1;function Pf(e,t="page"){return{point:{x:e[`${t}X`],y:e[`${t}Y`]}}}const DP=e=>t=>e_(t)&&e(t,Pf(t));function Aa(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function Ca(e,t,n,r){return Aa(e,t,DP(n),r)}const t_=(e,t)=>Math.abs(e-t);function MP(e,t){const n=t_(e.x,t.x),r=t_(e.y,t.y);return Math.sqrt(n**2+r**2)}class n_{constructor(t,n,{transformPagePoint:r,contextWindow:a,dragSnapToOrigin:i=!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=X0(this.lastMoveEventInfo,this.history),f=this.startEvent!==null,p=MP(d.offset,{x:0,y:0})>=3;if(!f&&!p)return;const{point:g}=d,{timestamp:v}=Jt;this.history.push({...g,timestamp:v});const{onStart:w,onMove:m}=this.handlers;f||(w&&w(this.lastMoveEvent,d),this.startEvent=this.lastMoveEvent),m&&m(this.lastMoveEvent,d)},this.handlePointerMove=(d,f)=>{this.lastMoveEvent=d,this.lastMoveEventInfo=$0(f,this.transformPagePoint),Qe.update(this.updatePoint,!0)},this.handlePointerUp=(d,f)=>{this.end();const{onEnd:p,onSessionEnd:g,resumeAnimation:v}=this.handlers;if(this.dragSnapToOrigin&&v&&v(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const w=X0(d.type==="pointercancel"?this.lastMoveEventInfo:$0(f,this.transformPagePoint),this.history);this.startEvent&&p&&p(d,w),g&&g(d,w)},!e_(t))return;this.dragSnapToOrigin=i,this.handlers=n,this.transformPagePoint=r,this.contextWindow=a||window;const s=Pf(t),o=$0(s,this.transformPagePoint),{point:u}=o,{timestamp:l}=Jt;this.history=[{...u,timestamp:l}];const{onSessionStart:c}=n;c&&c(t,X0(o,this.history)),this.removeListeners=Sa(Ca(this.contextWindow,"pointermove",this.handlePointerMove),Ca(this.contextWindow,"pointerup",this.handlePointerUp),Ca(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),hi(this.updatePoint)}}function $0(e,t){return t?{point:t(e.point)}:e}function r_(e,t){return{x:e.x-t.x,y:e.y-t.y}}function X0({point:e},t){return{point:e,delta:r_(e,a_(t)),offset:r_(e,LP(t)),velocity:IP(t,.1)}}function LP(e){return e[0]}function a_(e){return e[e.length-1]}function IP(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const a=a_(e);for(;n>=0&&(r=e[n],!(a.timestamp-r.timestamp>Ta(t)));)n--;if(!r)return{x:0,y:0};const i=_a(a.timestamp-r.timestamp);if(i===0)return{x:0,y:0};const s={x:(a.x-r.x)/i,y:(a.y-r.y)/i};return s.x===1/0&&(s.x=0),s.y===1/0&&(s.y=0),s}function i_(e){let t=null;return()=>{const n=()=>{t=null};return t===null?(t=e,n):!1}}const s_=i_("dragHorizontal"),o_=i_("dragVertical");function u_(e){let t=!1;if(e==="y")t=o_();else if(e==="x")t=s_();else{const n=s_(),r=o_();n&&r?t=()=>{n(),r()}:(n&&n(),r&&r())}return t}function l_(){const e=u_(!0);return e?(e(),!1):!0}function Po(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}const c_=1e-4,PP=1-c_,BP=1+c_,d_=.01,UP=0-d_,FP=0+d_;function Hn(e){return e.max-e.min}function jP(e,t,n){return Math.abs(e-t)<=n}function f_(e,t,n,r=.5){e.origin=r,e.originPoint=gt(t.min,t.max,e.origin),e.scale=Hn(n)/Hn(t),e.translate=gt(n.min,n.max,e.origin)-e.originPoint,(e.scale>=PP&&e.scale<=BP||isNaN(e.scale))&&(e.scale=1),(e.translate>=UP&&e.translate<=FP||isNaN(e.translate))&&(e.translate=0)}function Yl(e,t,n,r){f_(e.x,t.x,n.x,r?r.originX:void 0),f_(e.y,t.y,n.y,r?r.originY:void 0)}function p_(e,t,n){e.min=n.min+t.min,e.max=e.min+Hn(t)}function HP(e,t,n){p_(e.x,t.x,n.x),p_(e.y,t.y,n.y)}function h_(e,t,n){e.min=t.min-n.min,e.max=e.min+Hn(t)}function ql(e,t,n){h_(e.x,t.x,n.x),h_(e.y,t.y,n.y)}function zP(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?gt(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?gt(n,e,r.max):Math.min(e,n)),e}function m_(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 VP(e,{top:t,left:n,bottom:r,right:a}){return{x:m_(e.x,n,a),y:m_(e.y,t,r)}}function g_(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 YP(e,t){return{x:g_(e.x,t.x),y:g_(e.y,t.y)}}function qP(e,t){let n=.5;const r=Hn(e),a=Hn(t);return a>r?n=Io(t.min,t.max-r,e.min):r>a&&(n=Io(e.min,e.max-a,t.min)),mi(0,1,n)}function GP(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 W0=.35;function $P(e=W0){return e===!1?e=0:e===!0&&(e=W0),{x:b_(e,"left","right"),y:b_(e,"top","bottom")}}function b_(e,t,n){return{min:v_(e,t),max:v_(e,n)}}function v_(e,t){return typeof e=="number"?e:e[t]||0}const y_=()=>({translate:0,scale:1,origin:0,originPoint:0}),Bo=()=>({x:y_(),y:y_()}),x_=()=>({min:0,max:0}),At=()=>({x:x_(),y:x_()});function cr(e){return[e("x"),e("y")]}function E_({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function XP({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function WP(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 K0(e){return e===void 0||e===1}function Q0({scale:e,scaleX:t,scaleY:n}){return!K0(e)||!K0(t)||!K0(n)}function ws(e){return Q0(e)||w_(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function w_(e){return T_(e.x)||T_(e.y)}function T_(e){return e&&e!=="0%"}function Bf(e,t,n){const r=e-n,a=t*r;return n+a}function __(e,t,n,r,a){return a!==void 0&&(e=Bf(e,a,r)),Bf(e,n,r)+t}function Z0(e,t=0,n=1,r,a){e.min=__(e.min,t,n,r,a),e.max=__(e.max,t,n,r,a)}function S_(e,{x:t,y:n}){Z0(e.x,t.translate,t.scale,t.originPoint),Z0(e.y,n.translate,n.scale,n.originPoint)}const A_=.999999999999,C_=1.0000000000001;function KP(e,t,n,r=!1){const a=n.length;if(!a)return;t.x=t.y=1;let i,s;for(let o=0;o<a;o++){i=n[o],s=i.projectionDelta;const{visualElement:u}=i.options;u&&u.props.style&&u.props.style.display==="contents"||(r&&i.options.layoutScroll&&i.scroll&&i!==i.root&&Fo(e,{x:-i.scroll.offset.x,y:-i.scroll.offset.y}),s&&(t.x*=s.x.scale,t.y*=s.y.scale,S_(e,s)),r&&ws(i.latestValues)&&Fo(e,i.latestValues))}t.x<C_&&t.x>A_&&(t.x=1),t.y<C_&&t.y>A_&&(t.y=1)}function Uo(e,t){e.min=e.min+t,e.max=e.max+t}function k_(e,t,n,r,a=.5){const i=gt(e.min,e.max,a);Z0(e,t,n,i,r)}function Fo(e,t){k_(e.x,t.x,t.scaleX,t.scale,t.originX),k_(e.y,t.y,t.scaleY,t.scale,t.originY)}function R_(e,t){return E_(WP(e.getBoundingClientRect(),t))}function QP(e,t,n){const r=R_(e,n),{scroll:a}=t;return a&&(Uo(r.x,a.offset.x),Uo(r.y,a.offset.y)),r}const O_=({current:e})=>e?e.ownerDocument.defaultView:null,ZP=new WeakMap;class JP{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=At(),this.visualElement=t}start(t,{snapToCursor:n=!1}={}){const{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;const a=c=>{const{dragSnapToOrigin:d}=this.getProps();d?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(Pf(c,"page").point)},i=(c,d)=>{const{drag:f,dragPropagation:p,onDragStart:g}=this.getProps();if(f&&!p&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=u_(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),cr(w=>{let m=this.getAxisMotionValue(w).get()||0;if(Vr.test(m)){const{projection:y}=this.visualElement;if(y&&y.layout){const x=y.layout.layoutBox[w];x&&(m=Hn(x)*(parseFloat(m)/100))}}this.originPoint[w]=m}),g&&Qe.postRender(()=>g(c,d)),q0(this.visualElement,"transform");const{animationState:v}=this.visualElement;v&&v.setActive("whileDrag",!0)},s=(c,d)=>{const{dragPropagation:f,dragDirectionLock:p,onDirectionLock:g,onDrag:v}=this.getProps();if(!f&&!this.openGlobalLock)return;const{offset:w}=d;if(p&&this.currentDirection===null){this.currentDirection=e8(w),this.currentDirection!==null&&g&&g(this.currentDirection);return}this.updateAxis("x",d.point,w),this.updateAxis("y",d.point,w),this.visualElement.render(),v&&v(c,d)},o=(c,d)=>this.stop(c,d),u=()=>cr(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 n_(t,{onSessionStart:a,onStart:i,onMove:s,onSessionEnd:o,resumeAnimation:u},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:l,contextWindow:O_(this.visualElement)})}stop(t,n){const r=this.isDragging;if(this.cancel(),!r)return;const{velocity:a}=n;this.startAnimation(a);const{onDragEnd:i}=this.getProps();i&&Qe.postRender(()=>i(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:a}=this.getProps();if(!r||!Uf(t,a,this.currentDirection))return;const i=this.getAxisMotionValue(t);let s=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(s=zP(s,this.constraints[t],this.elastic[t])),i.set(s)}resolveConstraints(){var t;const{dragConstraints:n,dragElastic:r}=this.getProps(),a=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(t=this.visualElement.projection)===null||t===void 0?void 0:t.layout,i=this.constraints;n&&Po(n)?this.constraints||(this.constraints=this.resolveRefConstraints()):n&&a?this.constraints=VP(a.layoutBox,n):this.constraints=!1,this.elastic=$P(r),i!==this.constraints&&a&&this.constraints&&!this.hasMutatedConstraints&&cr(s=>{this.constraints!==!1&&this.getAxisMotionValue(s)&&(this.constraints[s]=GP(a.layoutBox[s],this.constraints[s]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!Po(t))return!1;const r=t.current,{projection:a}=this.visualElement;if(!a||!a.layout)return!1;const i=QP(r,a.root,this.visualElement.getTransformPagePoint());let s=YP(a.layout.layoutBox,i);if(n){const o=n(XP(s));this.hasMutatedConstraints=!!o,o&&(s=E_(o))}return s}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:a,dragTransition:i,dragSnapToOrigin:s,onDragTransitionEnd:o}=this.getProps(),u=this.constraints||{},l=cr(c=>{if(!Uf(c,n,this.currentDirection))return;let d=u&&u[c]||{};s&&(d={min:0,max:0});const f=a?200:1e6,p=a?40:1e7,g={type:"inertia",velocity:r?t[c]:0,bounceStiffness:f,bounceDamping:p,timeConstant:750,restDelta:1,restSpeed:10,...i,...d};return this.startAxisValueAnimation(c,g)});return Promise.all(l).then(o)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return q0(this.visualElement,t),r.start(H0(t,r,0,n,this.visualElement,!1))}stopAnimation(){cr(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){cr(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(),a=r[n];return a||this.visualElement.getValue(t,(r.initial?r.initial[t]:void 0)||0)}snapToCursor(t){cr(n=>{const{drag:r}=this.getProps();if(!Uf(n,r,this.currentDirection))return;const{projection:a}=this.visualElement,i=this.getAxisMotionValue(n);if(a&&a.layout){const{min:s,max:o}=a.layout.layoutBox[n];i.set(t[n]-gt(s,o,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!Po(n)||!r||!this.constraints)return;this.stopAnimation();const a={x:0,y:0};cr(s=>{const o=this.getAxisMotionValue(s);if(o&&this.constraints!==!1){const u=o.get();a[s]=qP({min:u,max:u},this.constraints[s])}});const{transformTemplate:i}=this.visualElement.getProps();this.visualElement.current.style.transform=i?i({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),cr(s=>{if(!Uf(s,t,null))return;const o=this.getAxisMotionValue(s),{min:u,max:l}=this.constraints[s];o.set(gt(u,l,a[s]))})}addListeners(){if(!this.visualElement.current)return;ZP.set(this.visualElement,this);const t=this.visualElement.current,n=Ca(t,"pointerdown",u=>{const{drag:l,dragListener:c=!0}=this.getProps();l&&c&&this.start(u)}),r=()=>{const{dragConstraints:u}=this.getProps();Po(u)&&u.current&&(this.constraints=this.resolveRefConstraints())},{projection:a}=this.visualElement,i=a.addEventListener("measure",r);a&&!a.layout&&(a.root&&a.root.updateScroll(),a.updateLayout()),Qe.read(r);const s=Aa(window,"resize",()=>this.scalePositionWithinConstraints()),o=a.addEventListener("didUpdate",({delta:u,hasLayoutChanged:l})=>{this.isDragging&&l&&(cr(c=>{const d=this.getAxisMotionValue(c);d&&(this.originPoint[c]+=u[c].translate,d.set(d.get()+u[c].translate))}),this.visualElement.render())});return()=>{s(),n(),i(),o&&o()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:a=!1,dragConstraints:i=!1,dragElastic:s=W0,dragMomentum:o=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:a,dragConstraints:i,dragElastic:s,dragMomentum:o}}}function Uf(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function e8(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class t8 extends vi{constructor(t){super(t),this.removeGroupControls=sn,this.removeListeners=sn,this.controls=new JP(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||sn}unmount(){this.removeGroupControls(),this.removeListeners()}}const N_=e=>(t,n)=>{e&&Qe.postRender(()=>e(t,n))};class n8 extends vi{constructor(){super(...arguments),this.removePointerDownListener=sn}onPointerDown(t){this.session=new n_(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:O_(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:a}=this.node.getProps();return{onSessionStart:N_(t),onStart:N_(n),onMove:r,onEnd:(i,s)=>{delete this.session,a&&Qe.postRender(()=>a(i,s))}}}mount(){this.removePointerDownListener=Ca(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 Ff=b.createContext(null);function r8(){const e=b.useContext(Ff);if(e===null)return[!0,null];const{isPresent:t,onExitComplete:n,register:r}=e,a=b.useId();b.useEffect(()=>r(a),[]);const i=b.useCallback(()=>n&&n(a),[a,n]);return!t&&n?[!1,i]:[!0]}const J0=b.createContext({}),D_=b.createContext({}),jf={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function M_(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Gl={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(pe.test(e))e=parseFloat(e);else return e;const n=M_(e,t.target.x),r=M_(e,t.target.y);return`${n}% ${r}%`}},a8={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,a=bi.parse(e);if(a.length>5)return r;const i=bi.createTransformer(e),s=typeof a[0]!="number"?1:0,o=n.x.scale*t.x,u=n.y.scale*t.y;a[0+s]/=o,a[1+s]/=u;const l=gt(o,u,.5);return typeof a[2+s]=="number"&&(a[2+s]/=l),typeof a[3+s]=="number"&&(a[3+s]/=l),i(a)}},Hf={};function i8(e){Object.assign(Hf,e)}const{schedule:eb,cancel:Ere}=WT(queueMicrotask,!1);class s8 extends b.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:a}=this.props,{projection:i}=t;i8(o8),i&&(n.group&&n.group.add(i),r&&r.register&&a&&r.register(i),i.root.didUpdate(),i.addEventListener("animationComplete",()=>{this.safeToRemove()}),i.setOptions({...i.options,onExitComplete:()=>this.safeToRemove()})),jf.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:a,isPresent:i}=this.props,s=r.projection;return s&&(s.isPresent=i,a||t.layoutDependency!==n||n===void 0?s.willUpdate():this.safeToRemove(),t.isPresent!==i&&(i?s.promote():s.relegate()||Qe.postRender(()=>{const o=s.getStack();(!o||!o.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),eb.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:a}=t;a&&(a.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(a),r&&r.deregister&&r.deregister(a))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function L_(e){const[t,n]=r8(),r=b.useContext(J0);return E.jsx(s8,{...e,layoutGroup:r,switchLayoutGroup:b.useContext(D_),isPresent:t,safeToRemove:n})}const o8={borderRadius:{...Gl,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Gl,borderTopRightRadius:Gl,borderBottomLeftRadius:Gl,borderBottomRightRadius:Gl,boxShadow:a8},I_=["TopLeft","TopRight","BottomLeft","BottomRight"],u8=I_.length,P_=e=>typeof e=="string"?parseFloat(e):e,B_=e=>typeof e=="number"||pe.test(e);function l8(e,t,n,r,a,i){a?(e.opacity=gt(0,n.opacity!==void 0?n.opacity:1,c8(r)),e.opacityExit=gt(t.opacity!==void 0?t.opacity:1,0,d8(r))):i&&(e.opacity=gt(t.opacity!==void 0?t.opacity:1,n.opacity!==void 0?n.opacity:1,r));for(let s=0;s<u8;s++){const o=`border${I_[s]}Radius`;let u=U_(t,o),l=U_(n,o);if(u===void 0&&l===void 0)continue;u||(u=0),l||(l=0),u===0||l===0||B_(u)===B_(l)?(e[o]=Math.max(gt(P_(u),P_(l),r),0),(Vr.test(l)||Vr.test(u))&&(e[o]+="%")):e[o]=l}(t.rotate||n.rotate)&&(e.rotate=gt(t.rotate||0,n.rotate||0,r))}function U_(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const c8=F_(0,.5,n2),d8=F_(.5,.95,sn);function F_(e,t,n){return r=>r<e?0:r>t?1:n(Io(e,t,r))}function j_(e,t){e.min=t.min,e.max=t.max}function dr(e,t){j_(e.x,t.x),j_(e.y,t.y)}function H_(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function z_(e,t,n,r,a){return e-=t,e=Bf(e,1/n,r),a!==void 0&&(e=Bf(e,1/a,r)),e}function f8(e,t=0,n=1,r=.5,a,i=e,s=e){if(Vr.test(t)&&(t=parseFloat(t),t=gt(s.min,s.max,t/100)-s.min),typeof t!="number")return;let o=gt(i.min,i.max,r);e===i&&(o-=t),e.min=z_(e.min,t,n,o,a),e.max=z_(e.max,t,n,o,a)}function V_(e,t,[n,r,a],i,s){f8(e,t[n],t[r],t[a],t.scale,i,s)}const p8=["x","scaleX","originX"],h8=["y","scaleY","originY"];function Y_(e,t,n,r){V_(e.x,t,p8,n?n.x:void 0,r?r.x:void 0),V_(e.y,t,h8,n?n.y:void 0,r?r.y:void 0)}function q_(e){return e.translate===0&&e.scale===1}function G_(e){return q_(e.x)&&q_(e.y)}function $_(e,t){return e.min===t.min&&e.max===t.max}function m8(e,t){return $_(e.x,t.x)&&$_(e.y,t.y)}function X_(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function W_(e,t){return X_(e.x,t.x)&&X_(e.y,t.y)}function K_(e){return Hn(e.x)/Hn(e.y)}function Q_(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class g8{constructor(){this.members=[]}add(t){z0(this.members,t),t.scheduleRender()}remove(t){if(V0(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(a=>t===a);if(n===0)return!1;let r;for(let a=n;a>=0;a--){const i=this.members[a];if(i.isPresent!==!1){r=i;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:a}=t.options;a===!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 b8(e,t,n){let r="";const a=e.x.translate/t.x,i=e.y.translate/t.y,s=(n==null?void 0:n.z)||0;if((a||i||s)&&(r=`translate3d(${a}px, ${i}px, ${s}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:g}=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) `),g&&(r+=`skewY(${g}deg) `)}const o=e.x.scale*t.x,u=e.y.scale*t.y;return(o!==1||u!==1)&&(r+=`scale(${o}, ${u})`),r||"none"}const v8=(e,t)=>e.depth-t.depth;class y8{constructor(){this.children=[],this.isDirty=!1}add(t){z0(this.children,t),this.isDirty=!0}remove(t){V0(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(v8),this.isDirty=!1,this.children.forEach(t)}}function zf(e){const t=un(e)?e.get():e;return dP(t)?t.toValue():t}function x8(e,t){const n=Yr.now(),r=({timestamp:a})=>{const i=a-n;i>=t&&(hi(r),e(i-t))};return Qe.read(r,!0),()=>hi(r)}function E8(e){return e instanceof SVGElement&&e.tagName!=="svg"}function w8(e,t,n){const r=un(e)?e:Vl(e);return r.start(H0("",r,t,n)),r.animation}const Ts={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0},$l=typeof window<"u"&&window.MotionDebug!==void 0,tb=["","X","Y","Z"],T8={visibility:"hidden"},Z_=1e3;let _8=0;function nb(e,t,n,r){const{latestValues:a}=t;a[e]&&(n[e]=a[e],t.setStaticValue(e,0),r&&(r[e]=0))}function J_(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=K2(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:a,layoutId:i}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",Qe,!(a||i))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&J_(r)}function eS({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:a}){return class{constructor(s={},o=t==null?void 0:t()){this.id=_8++,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,$l&&(Ts.totalNodes=Ts.resolvedTargetDeltas=Ts.recalculatedProjection=0),this.nodes.forEach(C8),this.nodes.forEach(D8),this.nodes.forEach(M8),this.nodes.forEach(k8),$l&&window.MotionDebug.record(Ts)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=s,this.root=o?o.root||o:this,this.path=o?[...o.path,o]:[],this.parent=o,this.depth=o?o.depth+1:0;for(let u=0;u<this.path.length;u++)this.path[u].shouldResetTransform=!0;this.root===this&&(this.nodes=new y8)}addEventListener(s,o){return this.eventHandlers.has(s)||this.eventHandlers.set(s,new Y0),this.eventHandlers.get(s).add(o)}notifyListeners(s,...o){const u=this.eventHandlers.get(s);u&&u.notify(...o)}hasListeners(s){return this.eventHandlers.has(s)}mount(s,o=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=E8(s),this.instance=s;const{layoutId:u,layout:l,visualElement:c}=this.options;if(c&&!c.current&&c.mount(s),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),o&&(l||u)&&(this.isLayoutDirty=!0),e){let d;const f=()=>this.root.updateBlockedByResize=!1;e(s,()=>{this.root.updateBlockedByResize=!0,d&&d(),d=x8(f,250),jf.hasAnimatedSinceResize&&(jf.hasAnimatedSinceResize=!1,this.nodes.forEach(nS))})}u&&this.root.registerSharedNode(u,this),this.options.animate!==!1&&c&&(u||l)&&this.addEventListener("didUpdate",({delta:d,hasLayoutChanged:f,hasRelativeTargetChanged:p,layout:g})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const v=this.options.transition||c.getDefaultTransition()||U8,{onLayoutAnimationStart:w,onLayoutAnimationComplete:m}=c.getProps(),y=!this.targetLayout||!W_(this.targetLayout,g)||p,x=!f&&p;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||x||f&&(y||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(d,x);const T={...h0(v,"layout"),onPlay:w,onComplete:m};(c.shouldReduceMotion||this.options.layoutRoot)&&(T.delay=0,T.type=!1),this.startAnimation(T)}else f||nS(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=g})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const s=this.getStack();s&&s.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,hi(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(L8),this.animationId++)}getTransformTemplate(){const{visualElement:s}=this.options;return s&&s.getProps().transformTemplate}willUpdate(s=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&J_(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:o,layout:u}=this.options;if(o===void 0&&!u)return;const l=this.getTransformTemplate();this.prevTransformTemplateValue=l?l(this.latestValues,""):void 0,this.updateSnapshot(),s&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(tS);return}this.isUpdating||this.nodes.forEach(O8),this.isUpdating=!1,this.nodes.forEach(N8),this.nodes.forEach(S8),this.nodes.forEach(A8),this.clearAllSnapshots();const o=Yr.now();Jt.delta=mi(0,1e3/60,o-Jt.timestamp),Jt.timestamp=o,Jt.isProcessing=!0,m0.update.process(Jt),m0.preRender.process(Jt),m0.render.process(Jt),Jt.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,eb.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(R8),this.sharedNodes.forEach(I8)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,Qe.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){Qe.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 s=this.layout;this.layout=this.measure(!1),this.layoutCorrected=At(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:o}=this.options;o&&o.notify("LayoutMeasure",this.layout.layoutBox,s?s.layoutBox:void 0)}updateScroll(s="measure"){let o=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===s&&(o=!1),o){const u=r(this.instance);this.scroll={animationId:this.root.animationId,phase:s,isRoot:u,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:u}}}resetTransform(){if(!a)return;const s=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,o=this.projectionDelta&&!G_(this.projectionDelta),u=this.getTransformTemplate(),l=u?u(this.latestValues,""):void 0,c=l!==this.prevTransformTemplateValue;s&&(o||ws(this.latestValues)||c)&&(a(this.instance,l),this.shouldResetTransform=!1,this.scheduleRender())}measure(s=!0){const o=this.measurePageBox();let u=this.removeElementScroll(o);return s&&(u=this.removeTransform(u)),F8(u),{animationId:this.root.animationId,measuredBox:o,layoutBox:u,latestValues:{},source:this.id}}measurePageBox(){var s;const{visualElement:o}=this.options;if(!o)return At();const u=o.measureViewportBox();if(!(((s=this.scroll)===null||s===void 0?void 0:s.wasRoot)||this.path.some(j8))){const{scroll:c}=this.root;c&&(Uo(u.x,c.offset.x),Uo(u.y,c.offset.y))}return u}removeElementScroll(s){var o;const u=At();if(dr(u,s),!((o=this.scroll)===null||o===void 0)&&o.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&&dr(u,s),Uo(u.x,d.offset.x),Uo(u.y,d.offset.y))}return u}applyTransform(s,o=!1){const u=At();dr(u,s);for(let l=0;l<this.path.length;l++){const c=this.path[l];!o&&c.options.layoutScroll&&c.scroll&&c!==c.root&&Fo(u,{x:-c.scroll.offset.x,y:-c.scroll.offset.y}),ws(c.latestValues)&&Fo(u,c.latestValues)}return ws(this.latestValues)&&Fo(u,this.latestValues),u}removeTransform(s){const o=At();dr(o,s);for(let u=0;u<this.path.length;u++){const l=this.path[u];if(!l.instance||!ws(l.latestValues))continue;Q0(l.latestValues)&&l.updateSnapshot();const c=At(),d=l.measurePageBox();dr(c,d),Y_(o,l.latestValues,l.snapshot?l.snapshot.layoutBox:void 0,c)}return ws(this.latestValues)&&Y_(o,this.latestValues),o}setTargetDelta(s){this.targetDelta=s,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(s){this.options={...this.options,...s,crossfade:s.crossfade!==void 0?s.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!==Jt.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(s=!1){var o;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(!(s||l&&this.isSharedProjectionDirty||this.isProjectionDirty||!((o=this.parent)===null||o===void 0)&&o.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:d,layoutId:f}=this.options;if(!(!this.layout||!(d||f))){if(this.resolvedRelativeTargetAt=Jt.timestamp,!this.targetDelta&&!this.relativeTarget){const p=this.getClosestProjectingParent();p&&p.layout&&this.animationProgress!==1?(this.relativeParent=p,this.forceRelativeParentToResolveTarget(),this.relativeTarget=At(),this.relativeTargetOrigin=At(),ql(this.relativeTargetOrigin,this.layout.layoutBox,p.layout.layoutBox),dr(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)){if(this.target||(this.target=At(),this.targetWithTransforms=At()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),HP(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):dr(this.target,this.layout.layoutBox),S_(this.target,this.targetDelta)):dr(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=At(),this.relativeTargetOrigin=At(),ql(this.relativeTargetOrigin,this.target,p.target),dr(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}$l&&Ts.resolvedTargetDeltas++}}}getClosestProjectingParent(){if(!(!this.parent||Q0(this.parent.latestValues)||w_(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 s;const o=this.getLead(),u=!!this.resumingFrom||this!==o;let l=!0;if((this.isProjectionDirty||!((s=this.parent)===null||s===void 0)&&s.isProjectionDirty)&&(l=!1),u&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(l=!1),this.resolvedRelativeTargetAt===Jt.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;dr(this.layoutCorrected,this.layout.layoutBox);const f=this.treeScale.x,p=this.treeScale.y;KP(this.layoutCorrected,this.treeScale,this.path,u),o.layout&&!o.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(o.target=o.layout.layoutBox,o.targetWithTransforms=At());const{target:g}=o;if(!g){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(H_(this.prevProjectionDelta.x,this.projectionDelta.x),H_(this.prevProjectionDelta.y,this.projectionDelta.y)),Yl(this.projectionDelta,this.layoutCorrected,g,this.latestValues),(this.treeScale.x!==f||this.treeScale.y!==p||!Q_(this.projectionDelta.x,this.prevProjectionDelta.x)||!Q_(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",g)),$l&&Ts.recalculatedProjection++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(s=!0){var o;if((o=this.options.visualElement)===null||o===void 0||o.scheduleRender(),s){const u=this.getStack();u&&u.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=Bo(),this.projectionDelta=Bo(),this.projectionDeltaWithTransform=Bo()}setAnimationOrigin(s,o=!1){const u=this.snapshot,l=u?u.latestValues:{},c={...this.latestValues},d=Bo();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!o;const f=At(),p=u?u.source:void 0,g=this.layout?this.layout.source:void 0,v=p!==g,w=this.getStack(),m=!w||w.members.length<=1,y=!!(v&&!m&&this.options.crossfade===!0&&!this.path.some(B8));this.animationProgress=0;let x;this.mixTargetDelta=T=>{const _=T/1e3;rS(d.x,s.x,_),rS(d.y,s.y,_),this.setTargetDelta(d),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(ql(f,this.layout.layoutBox,this.relativeParent.layout.layoutBox),P8(this.relativeTarget,this.relativeTargetOrigin,f,_),x&&m8(this.relativeTarget,x)&&(this.isProjectionDirty=!1),x||(x=At()),dr(x,this.relativeTarget)),v&&(this.animationValues=c,l8(c,l,this.latestValues,_,y,m)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=_},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(s){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(hi(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Qe.update(()=>{jf.hasAnimatedSinceResize=!0,this.currentAnimation=w8(0,Z_,{...s,onUpdate:o=>{this.mixTargetDelta(o),s.onUpdate&&s.onUpdate(o)},onComplete:()=>{s.onComplete&&s.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const s=this.getStack();s&&s.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(Z_),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const s=this.getLead();let{targetWithTransforms:o,target:u,layout:l,latestValues:c}=s;if(!(!o||!u||!l)){if(this!==s&&this.layout&&l&&uS(this.options.animationType,this.layout.layoutBox,l.layoutBox)){u=this.target||At();const d=Hn(this.layout.layoutBox.x);u.x.min=s.target.x.min,u.x.max=u.x.min+d;const f=Hn(this.layout.layoutBox.y);u.y.min=s.target.y.min,u.y.max=u.y.min+f}dr(o,u),Fo(o,c),Yl(this.projectionDeltaWithTransform,this.layoutCorrected,o,c)}}registerSharedNode(s,o){this.sharedNodes.has(s)||this.sharedNodes.set(s,new g8),this.sharedNodes.get(s).add(o);const l=o.options.initialPromotionConfig;o.promote({transition:l?l.transition:void 0,preserveFollowOpacity:l&&l.shouldPreserveFollowOpacity?l.shouldPreserveFollowOpacity(o):void 0})}isLead(){const s=this.getStack();return s?s.lead===this:!0}getLead(){var s;const{layoutId:o}=this.options;return o?((s=this.getStack())===null||s===void 0?void 0:s.lead)||this:this}getPrevLead(){var s;const{layoutId:o}=this.options;return o?(s=this.getStack())===null||s===void 0?void 0:s.prevLead:void 0}getStack(){const{layoutId:s}=this.options;if(s)return this.root.sharedNodes.get(s)}promote({needsReset:s,transition:o,preserveFollowOpacity:u}={}){const l=this.getStack();l&&l.promote(this,u),s&&(this.projectionDelta=void 0,this.needsReset=!0),o&&this.setOptions({transition:o})}relegate(){const s=this.getStack();return s?s.relegate(this):!1}resetSkewAndRotation(){const{visualElement:s}=this.options;if(!s)return;let o=!1;const{latestValues:u}=s;if((u.z||u.rotate||u.rotateX||u.rotateY||u.rotateZ||u.skewX||u.skewY)&&(o=!0),!o)return;const l={};u.z&&nb("z",s,l,this.animationValues);for(let c=0;c<tb.length;c++)nb(`rotate${tb[c]}`,s,l,this.animationValues),nb(`skew${tb[c]}`,s,l,this.animationValues);s.render();for(const c in l)s.setStaticValue(c,l[c]),this.animationValues&&(this.animationValues[c]=l[c]);s.scheduleRender()}getProjectionStyles(s){var o,u;if(!this.instance||this.isSVG)return;if(!this.isVisible)return T8;const l={visibility:""},c=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,l.opacity="",l.pointerEvents=zf(s==null?void 0:s.pointerEvents)||"",l.transform=c?c(this.latestValues,""):"none",l;const d=this.getLead();if(!this.projectionDelta||!this.layout||!d.target){const v={};return this.options.layoutId&&(v.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,v.pointerEvents=zf(s==null?void 0:s.pointerEvents)||""),this.hasProjected&&!ws(this.latestValues)&&(v.transform=c?c({},""):"none",this.hasProjected=!1),v}const f=d.animationValues||d.latestValues;this.applyTransformsToTarget(),l.transform=b8(this.projectionDeltaWithTransform,this.treeScale,f),c&&(l.transform=c(f,l.transform));const{x:p,y:g}=this.projectionDelta;l.transformOrigin=`${p.origin*100}% ${g.origin*100}% 0`,d.animationValues?l.opacity=d===this?(u=(o=f.opacity)!==null&&o!==void 0?o: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 v in Hf){if(f[v]===void 0)continue;const{correct:w,applyTo:m}=Hf[v],y=l.transform==="none"?f[v]:w(f[v],d);if(m){const x=m.length;for(let T=0;T<x;T++)l[m[T]]=y}else l[v]=y}return this.options.layoutId&&(l.pointerEvents=d===this?zf(s==null?void 0:s.pointerEvents)||"":"none"),l}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(s=>{var o;return(o=s.currentAnimation)===null||o===void 0?void 0:o.stop()}),this.root.nodes.forEach(tS),this.root.sharedNodes.clear()}}}function S8(e){e.updateLayout()}function A8(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:a}=e.layout,{animationType:i}=e.options,s=n.source!==e.layout.source;i==="size"?cr(d=>{const f=s?n.measuredBox[d]:n.layoutBox[d],p=Hn(f);f.min=r[d].min,f.max=f.min+p}):uS(i,n.layoutBox,r)&&cr(d=>{const f=s?n.measuredBox[d]:n.layoutBox[d],p=Hn(r[d]);f.max=f.min+p,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[d].max=e.relativeTarget[d].min+p)});const o=Bo();Yl(o,r,n.layoutBox);const u=Bo();s?Yl(u,e.applyTransform(a,!0),n.measuredBox):Yl(u,r,n.layoutBox);const l=!G_(o);let c=!1;if(!e.resumeFrom){const d=e.getClosestProjectingParent();if(d&&!d.resumeFrom){const{snapshot:f,layout:p}=d;if(f&&p){const g=At();ql(g,n.layoutBox,f.layoutBox);const v=At();ql(v,r,p.layoutBox),W_(g,v)||(c=!0),d.options.layoutRoot&&(e.relativeTarget=v,e.relativeTargetOrigin=g,e.relativeParent=d)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:n,delta:u,layoutDelta:o,hasLayoutChanged:l,hasRelativeTargetChanged:c})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function C8(e){$l&&Ts.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 k8(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function R8(e){e.clearSnapshot()}function tS(e){e.clearMeasurements()}function O8(e){e.isLayoutDirty=!1}function N8(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function nS(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function D8(e){e.resolveTargetDelta()}function M8(e){e.calcProjection()}function L8(e){e.resetSkewAndRotation()}function I8(e){e.removeLeadSnapshot()}function rS(e,t,n){e.translate=gt(t.translate,0,n),e.scale=gt(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function aS(e,t,n,r){e.min=gt(t.min,n.min,r),e.max=gt(t.max,n.max,r)}function P8(e,t,n,r){aS(e.x,t.x,n.x,r),aS(e.y,t.y,n.y,r)}function B8(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const U8={duration:.45,ease:[.4,0,.1,1]},iS=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),sS=iS("applewebkit/")&&!iS("chrome/")?Math.round:sn;function oS(e){e.min=sS(e.min),e.max=sS(e.max)}function F8(e){oS(e.x),oS(e.y)}function uS(e,t,n){return e==="position"||e==="preserve-aspect"&&!jP(K_(t),K_(n),.2)}function j8(e){var t;return e!==e.root&&((t=e.scroll)===null||t===void 0?void 0:t.wasRoot)}const H8=eS({attachResizeListener:(e,t)=>Aa(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),rb={current:void 0},lS=eS({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!rb.current){const e=new H8({});e.mount(window),e.setOptions({layoutScroll:!0}),rb.current=e}return rb.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),z8={pan:{Feature:n8},drag:{Feature:t8,ProjectionNode:lS,MeasureLayout:L_}};function cS(e,t){const n=t?"pointerenter":"pointerleave",r=t?"onHoverStart":"onHoverEnd",a=(i,s)=>{if(i.pointerType==="touch"||l_())return;const o=e.getProps();e.animationState&&o.whileHover&&e.animationState.setActive("whileHover",t);const u=o[r];u&&Qe.postRender(()=>u(i,s))};return Ca(e.current,n,a,{passive:!e.getProps()[r]})}class V8 extends vi{mount(){this.unmount=Sa(cS(this.node,!0),cS(this.node,!1))}unmount(){}}class Y8 extends vi{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=Sa(Aa(this.node.current,"focus",()=>this.onFocus()),Aa(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}const dS=(e,t)=>t?e===t?!0:dS(e,t.parentElement):!1;function ab(e,t){if(!t)return;const n=new PointerEvent("pointer"+e);t(n,Pf(n))}class q8 extends vi{constructor(){super(...arguments),this.removeStartListeners=sn,this.removeEndListeners=sn,this.removeAccessibleListeners=sn,this.startPointerPress=(t,n)=>{if(this.isPressing)return;this.removeEndListeners();const r=this.node.getProps(),i=Ca(window,"pointerup",(o,u)=>{if(!this.checkPressEnd())return;const{onTap:l,onTapCancel:c,globalTapTarget:d}=this.node.getProps(),f=!d&&!dS(this.node.current,o.target)?c:l;f&&Qe.update(()=>f(o,u))},{passive:!(r.onTap||r.onPointerUp)}),s=Ca(window,"pointercancel",(o,u)=>this.cancelPress(o,u),{passive:!(r.onTapCancel||r.onPointerCancel)});this.removeEndListeners=Sa(i,s),this.startPress(t,n)},this.startAccessiblePress=()=>{const t=i=>{if(i.key!=="Enter"||this.isPressing)return;const s=o=>{o.key!=="Enter"||!this.checkPressEnd()||ab("up",(u,l)=>{const{onTap:c}=this.node.getProps();c&&Qe.postRender(()=>c(u,l))})};this.removeEndListeners(),this.removeEndListeners=Aa(this.node.current,"keyup",s),ab("down",(o,u)=>{this.startPress(o,u)})},n=Aa(this.node.current,"keydown",t),r=()=>{this.isPressing&&ab("cancel",(i,s)=>this.cancelPress(i,s))},a=Aa(this.node.current,"blur",r);this.removeAccessibleListeners=Sa(n,a)}}startPress(t,n){this.isPressing=!0;const{onTapStart:r,whileTap:a}=this.node.getProps();a&&this.node.animationState&&this.node.animationState.setActive("whileTap",!0),r&&Qe.postRender(()=>r(t,n))}checkPressEnd(){return this.removeEndListeners(),this.isPressing=!1,this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive("whileTap",!1),!l_()}cancelPress(t,n){if(!this.checkPressEnd())return;const{onTapCancel:r}=this.node.getProps();r&&Qe.postRender(()=>r(t,n))}mount(){const t=this.node.getProps(),n=Ca(t.globalTapTarget?window:this.node.current,"pointerdown",this.startPointerPress,{passive:!(t.onTapStart||t.onPointerStart)}),r=Aa(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=Sa(n,r)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}const ib=new WeakMap,sb=new WeakMap,G8=e=>{const t=ib.get(e.target);t&&t(e)},$8=e=>{e.forEach(G8)};function X8({root:e,...t}){const n=e||document;sb.has(n)||sb.set(n,{});const r=sb.get(n),a=JSON.stringify(t);return r[a]||(r[a]=new IntersectionObserver($8,{root:e,...t})),r[a]}function W8(e,t,n){const r=X8(t);return ib.set(e,n),r.observe(e),()=>{ib.delete(e),r.unobserve(e)}}const K8={some:0,all:1};class Q8 extends vi{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:a="some",once:i}=t,s={root:n?n.current:void 0,rootMargin:r,threshold:typeof a=="number"?a:K8[a]},o=u=>{const{isIntersecting:l}=u;if(this.isInView===l||(this.isInView=l,i&&!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 W8(this.node.current,s,o)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(Z8(t,n))&&this.startObserver()}unmount(){}}function Z8({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const J8={inView:{Feature:Q8},tap:{Feature:q8},focus:{Feature:Y8},hover:{Feature:V8}},e9={layout:{ProjectionNode:lS,MeasureLayout:L_}},ob=b.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"}),Vf=b.createContext({}),ub=typeof window<"u",fS=ub?b.useLayoutEffect:b.useEffect,pS=b.createContext({strict:!1});function t9(e,t,n,r,a){var i,s;const{visualElement:o}=b.useContext(Vf),u=b.useContext(pS),l=b.useContext(Ff),c=b.useContext(ob).reducedMotion,d=b.useRef();r=r||u.renderer,!d.current&&r&&(d.current=r(e,{visualState:t,parent:o,props:n,presenceContext:l,blockInitialAnimation:l?l.initial===!1:!1,reducedMotionConfig:c}));const f=d.current,p=b.useContext(D_);f&&!f.projection&&a&&(f.type==="html"||f.type==="svg")&&n9(d.current,n,a,p),b.useInsertionEffect(()=>{f&&f.update(n,l)});const g=n[W2],v=b.useRef(!!g&&!(!((i=window.MotionHandoffIsComplete)===null||i===void 0)&&i.call(window,g))&&((s=window.MotionHasOptimisedAnimation)===null||s===void 0?void 0:s.call(window,g)));return fS(()=>{f&&(window.MotionIsMounted=!0,f.updateFeatures(),eb.render(f.render),v.current&&f.animationState&&f.animationState.animateChanges())}),b.useEffect(()=>{f&&(!v.current&&f.animationState&&f.animationState.animateChanges(),v.current&&(queueMicrotask(()=>{var w;(w=window.MotionHandoffMarkAsComplete)===null||w===void 0||w.call(window,g)}),v.current=!1))}),f}function n9(e,t,n,r){const{layoutId:a,layout:i,drag:s,dragConstraints:o,layoutScroll:u,layoutRoot:l}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:hS(e.parent)),e.projection.setOptions({layoutId:a,layout:i,alwaysMeasureLayout:!!s||o&&Po(o),visualElement:e,animationType:typeof i=="string"?i:"both",initialPromotionConfig:r,layoutScroll:u,layoutRoot:l})}function hS(e){if(e)return e.options.allowProjection!==!1?e.projection:hS(e.parent)}function r9(e,t,n){return b.useCallback(r=>{r&&e.mount&&e.mount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):Po(n)&&(n.current=r))},[t])}function Yf(e){return Ll(e.animate)||p0.some(t=>Il(e[t]))}function mS(e){return!!(Yf(e)||e.variants)}function a9(e,t){if(Yf(e)){const{initial:n,animate:r}=e;return{initial:n===!1||Il(n)?n:void 0,animate:Il(r)?r:void 0}}return e.inherit!==!1?t:{}}function i9(e){const{initial:t,animate:n}=a9(e,b.useContext(Vf));return b.useMemo(()=>({initial:t,animate:n}),[gS(t),gS(n)])}function gS(e){return Array.isArray(e)?e.join(" "):e}const bS={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"]},jo={};for(const e in bS)jo[e]={isEnabled:t=>bS[e].some(n=>!!t[n])};function s9(e){for(const t in e)jo[t]={...jo[t],...e[t]}}const o9=Symbol.for("motionComponentSymbol");function u9({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:a}){e&&s9(e);function i(o,u){let l;const c={...b.useContext(ob),...o,layoutId:l9(o)},{isStatic:d}=c,f=i9(o),p=r(o,d);if(!d&&ub){c9();const g=d9(c);l=g.MeasureLayout,f.visualElement=t9(a,p,c,t,g.ProjectionNode)}return E.jsxs(Vf.Provider,{value:f,children:[l&&f.visualElement?E.jsx(l,{visualElement:f.visualElement,...c}):null,n(a,o,r9(p,f.visualElement,u),p,d,f.visualElement)]})}const s=b.forwardRef(i);return s[o9]=a,s}function l9({layoutId:e}){const t=b.useContext(J0).id;return t&&e!==void 0?t+"-"+e:e}function c9(e,t){b.useContext(pS).strict}function d9(e){const{drag:t,layout:n}=jo;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 f9=["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 lb(e){return typeof e!="string"||e.includes("-")?!1:!!(f9.indexOf(e)>-1||/[A-Z]/u.test(e))}function vS(e,{style:t,vars:n},r,a){Object.assign(e.style,t,a&&a.getProjectionStyles(r));for(const i in n)e.style.setProperty(i,n[i])}const yS=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 xS(e,t,n,r){vS(e,t,void 0,r);for(const a in t.attrs)e.setAttribute(yS.has(a)?a:If(a),t.attrs[a])}function ES(e,{layout:t,layoutId:n}){return pi.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!Hf[e]||e==="opacity")}function cb(e,t,n){var r;const{style:a}=e,i={};for(const s in a)(un(a[s])||t.style&&un(t.style[s])||ES(s,e)||((r=n==null?void 0:n.getValue(s))===null||r===void 0?void 0:r.liveStyle)!==void 0)&&(i[s]=a[s]);return n&&a&&typeof a.willChange=="string"&&(n.applyWillChange=!1),i}function wS(e,t,n){const r=cb(e,t,n);for(const a in e)if(un(e[a])||un(t[a])){const i=Pl.indexOf(a)!==-1?"attr"+a.charAt(0).toUpperCase()+a.substring(1):a;r[i]=e[a]}return r}function db(e){const t=b.useRef(null);return t.current===null&&(t.current=e()),t.current}function p9(e){if(pi.has(e))return"transform";if(z2.has(e))return If(e)}function h9({applyWillChange:e=!1,scrapeMotionValuesFromProps:t,createRenderState:n,onMount:r},a,i,s,o){const u={latestValues:m9(a,i,s,o?!1:e,t),renderState:n()};return r&&(u.mount=l=>r(a,l,u)),u}const TS=e=>(t,n)=>{const r=b.useContext(Vf),a=b.useContext(Ff),i=()=>h9(e,t,r,a,n);return n?i():db(i)};function _S(e,t,n){const r=Array.isArray(t)?t:[t];for(let a=0;a<r.length;a++){const i=d0(e,r[a]);if(i){const{transitionEnd:s,transition:o,...u}=i;n(u,s)}}}function m9(e,t,n,r,a){var i;const s={},o=new Set,u=r&&((i=e.style)===null||i===void 0?void 0:i.willChange)===void 0,l=a(e,{});for(const w in l)s[w]=zf(l[w]);let{initial:c,animate:d}=e;const f=Yf(e),p=mS(e);t&&p&&!f&&e.inherit!==!1&&(c===void 0&&(c=t.initial),d===void 0&&(d=t.animate));let g=n?n.initial===!1:!1;g=g||c===!1;const v=g?d:c;return v&&typeof v!="boolean"&&!Ll(v)&&_S(e,v,(w,m)=>{for(const y in w){let x=w[y];if(Array.isArray(x)){const T=g?x.length-1:0;x=x[T]}x!==null&&(s[y]=x)}for(const y in m)s[y]=m[y]}),u&&(d&&c!==!1&&!Ll(d)&&_S(e,d,w=>{for(const m in w){const y=p9(m);y&&o.add(y)}}),o.size&&(s.willChange=Array.from(o).join(","))),s}const fb=()=>({style:{},transform:{},transformOrigin:{},vars:{}}),SS=()=>({...fb(),attrs:{}}),AS=(e,t)=>t&&typeof e=="number"?t.transform(e):e,g9={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},b9=Pl.length;function v9(e,t,n){let r="",a=!0;for(let i=0;i<b9;i++){const s=Pl[i],o=e[s];if(o===void 0)continue;let u=!0;if(typeof o=="number"?u=o===(s.startsWith("scale")?1:0):u=parseFloat(o)===0,!u||n){const l=AS(o,k0[s]);if(!u){a=!1;const c=g9[s]||s;r+=`${c}(${l}) `}n&&(t[s]=l)}}return r=r.trim(),n?r=n(t,a?"":r):a&&(r="none"),r}function pb(e,t,n){const{style:r,vars:a,transformOrigin:i}=e;let s=!1,o=!1;for(const u in t){const l=t[u];if(pi.has(u)){s=!0;continue}else if(o2(u)){a[u]=l;continue}else{const c=AS(l,k0[u]);u.startsWith("origin")?(o=!0,i[u]=c):r[u]=c}}if(t.transform||(s||n?r.transform=v9(t,e.transform,n):r.transform&&(r.transform="none")),o){const{originX:u="50%",originY:l="50%",originZ:c=0}=i;r.transformOrigin=`${u} ${l} ${c}`}}function CS(e,t,n){return typeof e=="string"?e:pe.transform(t+n*e)}function y9(e,t,n){const r=CS(t,e.x,e.width),a=CS(n,e.y,e.height);return`${r} ${a}`}const x9={offset:"stroke-dashoffset",array:"stroke-dasharray"},E9={offset:"strokeDashoffset",array:"strokeDasharray"};function w9(e,t,n=1,r=0,a=!0){e.pathLength=1;const i=a?x9:E9;e[i.offset]=pe.transform(-r);const s=pe.transform(t),o=pe.transform(n);e[i.array]=`${s} ${o}`}function hb(e,{attrX:t,attrY:n,attrScale:r,originX:a,originY:i,pathLength:s,pathSpacing:o=1,pathOffset:u=0,...l},c,d){if(pb(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:g}=e;f.transform&&(g&&(p.transform=f.transform),delete f.transform),g&&(a!==void 0||i!==void 0||p.transform)&&(p.transformOrigin=y9(g,a!==void 0?a:.5,i!==void 0?i:.5)),t!==void 0&&(f.x=t),n!==void 0&&(f.y=n),r!==void 0&&(f.scale=r),s!==void 0&&w9(f,s,o,u,!1)}const mb=e=>typeof e=="string"&&e.toLowerCase()==="svg",T9={useVisualState:TS({scrapeMotionValuesFromProps:wS,createRenderState:SS,onMount:(e,t,{renderState:n,latestValues:r})=>{Qe.read(()=>{try{n.dimensions=typeof t.getBBox=="function"?t.getBBox():t.getBoundingClientRect()}catch{n.dimensions={x:0,y:0,width:0,height:0}}}),Qe.render(()=>{hb(n,r,mb(t.tagName),e.transformTemplate),xS(t,n)})}})},_9={useVisualState:TS({applyWillChange:!0,scrapeMotionValuesFromProps:cb,createRenderState:fb})};function kS(e,t,n){for(const r in t)!un(t[r])&&!ES(r,n)&&(e[r]=t[r])}function S9({transformTemplate:e},t){return b.useMemo(()=>{const n=fb();return pb(n,t,e),Object.assign({},n.vars,n.style)},[t])}function A9(e,t){const n=e.style||{},r={};return kS(r,n,e),Object.assign(r,S9(e,t)),r}function C9(e,t){const n={},r=A9(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 k9=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 qf(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||k9.has(e)}let RS=e=>!qf(e);function R9(e){e&&(RS=t=>t.startsWith("on")?!qf(t):e(t))}try{R9(require("@emotion/is-prop-valid").default)}catch{}function O9(e,t,n){const r={};for(const a in e)a==="values"&&typeof e.values=="object"||(RS(a)||n===!0&&qf(a)||!t&&!qf(a)||e.draggable&&a.startsWith("onDrag"))&&(r[a]=e[a]);return r}function N9(e,t,n,r){const a=b.useMemo(()=>{const i=SS();return hb(i,t,mb(r),e.transformTemplate),{...i.attrs,style:{...i.style}}},[t]);if(e.style){const i={};kS(i,e.style,e),a.style={...i,...a.style}}return a}function D9(e=!1){return(n,r,a,{latestValues:i},s)=>{const u=(lb(n)?N9:C9)(r,i,s,n),l=O9(r,typeof n=="string",e),c=n!==b.Fragment?{...l,...u,ref:a}:{},{children:d}=r,f=b.useMemo(()=>un(d)?d.get():d,[d]);return b.createElement(n,{...c,children:f})}}function M9(e,t){return function(r,{forwardMotionProps:a}={forwardMotionProps:!1}){const s={...lb(r)?T9:_9,preloadedFeatures:e,useRender:D9(a),createVisualElement:t,Component:r};return u9(s)}}const gb={current:null},OS={current:!1};function L9(){if(OS.current=!0,!!ub)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>gb.current=e.matches;e.addListener(t),t()}else gb.current=!1}function I9(e,t,n){for(const r in t){const a=t[r],i=n[r];if(un(a))e.addValue(r,a);else if(un(i))e.addValue(r,Vl(a,{owner:e}));else if(i!==a)if(e.hasValue(r)){const s=e.getValue(r);s.liveStyle===!0?s.jump(a):s.hasAnimated||s.set(a)}else{const s=e.getStaticValue(r);e.addValue(r,Vl(s!==void 0?s:a,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const NS=new WeakMap,P9=[...h2,on,bi],B9=e=>P9.find(p2(e)),DS=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class U9{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:a,blockInitialAnimation:i,visualState:s},o={}){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=w0,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=Yr.now();this.renderScheduledAt<f&&(this.renderScheduledAt=f,Qe.render(this.render,!1,!0))};const{latestValues:u,renderState:l}=s;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=a,this.options=o,this.blockInitialAnimation=!!i,this.isControllingVariants=Yf(n),this.isVariantNode=mS(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&&un(p)&&p.set(u[f],!1)}}mount(t){this.current=t,NS.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)),OS.current||L9(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:gb.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){NS.delete(this.current),this.projection&&this.projection.unmount(),hi(this.notifyUpdate),hi(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=pi.has(t),a=n.on("change",o=>{this.latestValues[t]=o,this.props.onUpdate&&Qe.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0)}),i=n.on("renderRequest",this.scheduleRender);let s;window.MotionCheckAppearSync&&(s=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{a(),i(),s&&s(),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 jo){const n=jo[t];if(!n)continue;const{isEnabled:r,Feature:a}=n;if(!this.features[t]&&a&&r(this.props)&&(this.features[t]=new a(this)),this.features[t]){const i=this.features[t];i.isMounted?i.update():(i.mount(),i.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):At()}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<DS.length;r++){const a=DS[r];this.propEventSubscriptions[a]&&(this.propEventSubscriptions[a](),delete this.propEventSubscriptions[a]);const i="on"+a,s=t[i];s&&(this.propEventSubscriptions[a]=this.on(a,s))}this.prevMotionValues=I9(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=Vl(n===null?void 0:n,{owner:this}),this.addValue(t,r)),r}readValue(t,n){var r;let a=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 a!=null&&(typeof a=="string"&&(i2(a)||a2(a))?a=parseFloat(a):!B9(a)&&bi.test(n)&&(a=S2(t,n)),this.setBaseTarget(t,un(a)?a.get():a)),un(a)?a.get():a}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var n;const{initial:r}=this.props;let a;if(typeof r=="string"||typeof r=="object"){const s=d0(this.props,r,(n=this.presenceContext)===null||n===void 0?void 0:n.custom);s&&(a=s[t])}if(r&&a!==void 0)return a;const i=this.getBaseTargetFromProps(this.props,t);return i!==void 0&&!un(i)?i:this.initialValues[t]!==void 0&&a===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new Y0),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}class MS extends U9{constructor(){super(...arguments),this.KeyframeResolver=A2}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 F9(e){return window.getComputedStyle(e)}class j9 extends MS{constructor(){super(...arguments),this.type="html",this.applyWillChange=!0,this.renderInstance=vS}readValueFromInstance(t,n){if(pi.has(n)){const r=R0(n);return r&&r.default||0}else{const r=F9(t),a=(o2(n)?r.getPropertyValue(n):r[n])||0;return typeof a=="string"?a.trim():a}}measureInstanceViewportBox(t,{transformPagePoint:n}){return R_(t,n)}build(t,n,r){pb(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return cb(t,n,r)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;un(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}class H9 extends MS{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=At}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(pi.has(n)){const r=R0(n);return r&&r.default||0}return n=yS.has(n)?n:If(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return wS(t,n,r)}build(t,n,r){hb(t,n,this.isSVGTag,r.transformTemplate)}renderInstance(t,n,r,a){xS(t,n,r,a)}mount(t){this.isSVGTag=mb(t.tagName),super.mount(t)}}const z9=(e,t)=>lb(e)?new H9(t):new j9(t,{allowProjection:e!==b.Fragment}),V9=M9({...NP,...J8,...z8,...e9},z9),Ho=SL(V9);class Y9 extends b.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 q9({children:e,isPresent:t}){const n=b.useId(),r=b.useRef(null),a=b.useRef({width:0,height:0,top:0,left:0}),{nonce:i}=b.useContext(ob);return b.useInsertionEffect(()=>{const{width:s,height:o,top:u,left:l}=a.current;if(t||!r.current||!s||!o)return;r.current.dataset.motionPopId=n;const c=document.createElement("style");return i&&(c.nonce=i),document.head.appendChild(c),c.sheet&&c.sheet.insertRule(`
50
50
  [data-motion-pop-id="${n}"] {
51
51
  position: absolute !important;
52
52
  width: ${s}px !important;
@@ -163,7 +163,7 @@ Error generating stack: `+n.message+`
163
163
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function dB(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function fB(e){if(Array.isArray(e))return Ab(e)}function SA(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function AA(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?SA(Object(n),!0).forEach(function(r){CA(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):SA(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function CA(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ql(e,t){return mB(e)||hB(e,t)||kA(e,t)||pB()}function pB(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
164
164
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function kA(e,t){if(e){if(typeof e=="string")return Ab(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Ab(e,t)}}function Ab(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function hB(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r=[],a=!0,i=!1,s,o;try{for(n=n.call(e);!(a=(s=n.next()).done)&&(r.push(s.value),!(t&&r.length===t));a=!0);}catch(u){i=!0,o=u}finally{try{!a&&n.return!=null&&n.return()}finally{if(i)throw o}}return r}}function mB(e){if(Array.isArray(e))return e}var gB=typeof Sb=="function"?Sb:Sb.default,bB="file-invalid-type",vB="file-too-large",yB="file-too-small",xB="too-many-files",EB=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",n=t.split(","),r=n.length>1?"one of ".concat(n.join(", ")):n[0];return{code:bB,message:"File type must be ".concat(r)}},RA=function(t){return{code:vB,message:"File is larger than ".concat(t," ").concat(t===1?"byte":"bytes")}},OA=function(t){return{code:yB,message:"File is smaller than ".concat(t," ").concat(t===1?"byte":"bytes")}},wB={code:xB,message:"Too many files"};function NA(e,t){var n=e.type==="application/x-moz-file"||gB(e,t);return[n,n?null:EB(t)]}function DA(e,t,n){if(_s(e.size))if(_s(t)&&_s(n)){if(e.size>n)return[!1,RA(n)];if(e.size<t)return[!1,OA(t)]}else{if(_s(t)&&e.size<t)return[!1,OA(t)];if(_s(n)&&e.size>n)return[!1,RA(n)]}return[!0,null]}function _s(e){return e!=null}function TB(e){var t=e.files,n=e.accept,r=e.minSize,a=e.maxSize,i=e.multiple,s=e.maxFiles,o=e.validator;return!i&&t.length>1||i&&s>=1&&t.length>s?!1:t.every(function(u){var l=NA(u,n),c=Ql(l,1),d=c[0],f=DA(u,r,a),p=Ql(f,1),g=p[0],v=o?o(u):null;return d&&g&&!v})}function Qf(e){return typeof e.isPropagationStopped=="function"?e.isPropagationStopped():typeof e.cancelBubble<"u"?e.cancelBubble:!1}function Zf(e){return e.dataTransfer?Array.prototype.some.call(e.dataTransfer.types,function(t){return t==="Files"||t==="application/x-moz-file"}):!!e.target&&!!e.target.files}function MA(e){e.preventDefault()}function _B(e){return e.indexOf("MSIE")!==-1||e.indexOf("Trident/")!==-1}function SB(e){return e.indexOf("Edge/")!==-1}function AB(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return _B(e)||SB(e)}function qr(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(r){for(var a=arguments.length,i=new Array(a>1?a-1:0),s=1;s<a;s++)i[s-1]=arguments[s];return t.some(function(o){return!Qf(r)&&o&&o.apply(void 0,[r].concat(i)),Qf(r)})}}function CB(){return"showOpenFilePicker"in window}function kB(e){if(_s(e)){var t=Object.entries(e).filter(function(n){var r=Ql(n,2),a=r[0],i=r[1],s=!0;return LA(a)||(console.warn('Skipped "'.concat(a,'" because it is not a valid MIME type. Check https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types for a list of valid MIME types.')),s=!1),(!Array.isArray(i)||!i.every(IA))&&(console.warn('Skipped "'.concat(a,'" because an invalid file extension was provided.')),s=!1),s}).reduce(function(n,r){var a=Ql(r,2),i=a[0],s=a[1];return AA(AA({},n),{},CA({},i,s))},{});return[{description:"Files",accept:t}]}return e}function RB(e){if(_s(e))return Object.entries(e).reduce(function(t,n){var r=Ql(n,2),a=r[0],i=r[1];return[].concat(_A(t),[a],_A(i))},[]).filter(function(t){return LA(t)||IA(t)}).join(",")}function OB(e){return e instanceof DOMException&&(e.name==="AbortError"||e.code===e.ABORT_ERR)}function NB(e){return e instanceof DOMException&&(e.name==="SecurityError"||e.code===e.SECURITY_ERR)}function LA(e){return e==="audio/*"||e==="video/*"||e==="image/*"||e==="text/*"||e==="application/*"||/\w+\/[-+.\w]+/g.test(e)}function IA(e){return/^.*\.[\w]+$/.test(e)}var DB=["children"],MB=["open"],LB=["refKey","role","onKeyDown","onFocus","onBlur","onClick","onDragEnter","onDragOver","onDragLeave","onDrop"],IB=["refKey","onChange","onClick"];function PB(e){return FB(e)||UB(e)||PA(e)||BB()}function BB(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
165
165
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function UB(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function FB(e){if(Array.isArray(e))return kb(e)}function Cb(e,t){return zB(e)||HB(e,t)||PA(e,t)||jB()}function jB(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
166
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function PA(e,t){if(e){if(typeof e=="string")return kb(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return kb(e,t)}}function kb(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function HB(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r=[],a=!0,i=!1,s,o;try{for(n=n.call(e);!(a=(s=n.next()).done)&&(r.push(s.value),!(t&&r.length===t));a=!0);}catch(u){i=!0,o=u}finally{try{!a&&n.return!=null&&n.return()}finally{if(i)throw o}}return r}}function zB(e){if(Array.isArray(e))return e}function BA(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function bt(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?BA(Object(n),!0).forEach(function(r){Rb(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):BA(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Rb(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Jf(e,t){if(e==null)return{};var n=VB(e,t),r,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)r=i[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function VB(e,t){if(e==null)return{};var n={},r=Object.keys(e),a,i;for(i=0;i<r.length;i++)a=r[i],!(t.indexOf(a)>=0)&&(n[a]=e[a]);return n}var Ob=b.forwardRef(function(e,t){var n=e.children,r=Jf(e,DB),a=FA(r),i=a.open,s=Jf(a,MB);return b.useImperativeHandle(t,function(){return{open:i}},[i]),hn.createElement(b.Fragment,null,n(bt(bt({},s),{},{open:i})))});Ob.displayName="Dropzone";var UA={disabled:!1,getFilesFromEvent:tB,maxSize:1/0,minSize:0,multiple:!0,maxFiles:0,preventDropOnDocument:!0,noClick:!1,noKeyboard:!1,noDrag:!1,noDragEventsBubbling:!1,validator:null,useFsAccessApi:!1,autoFocus:!1};Ob.defaultProps=UA,Ob.propTypes={children:Je.func,accept:Je.objectOf(Je.arrayOf(Je.string)),multiple:Je.bool,preventDropOnDocument:Je.bool,noClick:Je.bool,noKeyboard:Je.bool,noDrag:Je.bool,noDragEventsBubbling:Je.bool,minSize:Je.number,maxSize:Je.number,maxFiles:Je.number,disabled:Je.bool,getFilesFromEvent:Je.func,onFileDialogCancel:Je.func,onFileDialogOpen:Je.func,useFsAccessApi:Je.bool,autoFocus:Je.bool,onDragEnter:Je.func,onDragLeave:Je.func,onDragOver:Je.func,onDrop:Je.func,onDropAccepted:Je.func,onDropRejected:Je.func,onError:Je.func,validator:Je.func};var Nb={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function FA(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=bt(bt({},UA),e),n=t.accept,r=t.disabled,a=t.getFilesFromEvent,i=t.maxSize,s=t.minSize,o=t.multiple,u=t.maxFiles,l=t.onDragEnter,c=t.onDragLeave,d=t.onDragOver,f=t.onDrop,p=t.onDropAccepted,g=t.onDropRejected,v=t.onFileDialogCancel,w=t.onFileDialogOpen,m=t.useFsAccessApi,y=t.autoFocus,x=t.preventDropOnDocument,T=t.noClick,_=t.noKeyboard,A=t.noDrag,C=t.noDragEventsBubbling,M=t.onError,j=t.validator,N=b.useMemo(function(){return RB(n)},[n]),Y=b.useMemo(function(){return kB(n)},[n]),H=b.useMemo(function(){return typeof w=="function"?w:jA},[w]),ee=b.useMemo(function(){return typeof v=="function"?v:jA},[v]),$=b.useRef(null),ne=b.useRef(null),U=b.useReducer(YB,Nb),q=Cb(U,2),z=q[0],V=q[1],R=z.isFocused,ue=z.isFileDialogActive,Ae=b.useRef(typeof window<"u"&&window.isSecureContext&&m&&CB()),L=function(){!Ae.current&&ue&&setTimeout(function(){if(ne.current){var oe=ne.current.files;oe.length||(V({type:"closeDialog"}),ee())}},300)};b.useEffect(function(){return window.addEventListener("focus",L,!1),function(){window.removeEventListener("focus",L,!1)}},[ne,ue,ee,Ae]);var De=b.useRef([]),de=function(oe){$.current&&$.current.contains(oe.target)||(oe.preventDefault(),De.current=[])};b.useEffect(function(){return x&&(document.addEventListener("dragover",MA,!1),document.addEventListener("drop",de,!1)),function(){x&&(document.removeEventListener("dragover",MA),document.removeEventListener("drop",de))}},[$,x]),b.useEffect(function(){return!r&&y&&$.current&&$.current.focus(),function(){}},[$,y,r]);var Ce=b.useCallback(function(te){M?M(te):console.error(te)},[M]),at=b.useCallback(function(te){te.preventDefault(),te.persist(),jt(te),De.current=[].concat(PB(De.current),[te.target]),Zf(te)&&Promise.resolve(a(te)).then(function(oe){if(!(Qf(te)&&!C)){var B=oe.length,W=B>0&&TB({files:oe,accept:N,minSize:s,maxSize:i,multiple:o,maxFiles:u,validator:j}),se=B>0&&!W;V({isDragAccept:W,isDragReject:se,isDragActive:!0,type:"setDraggedFiles"}),l&&l(te)}}).catch(function(oe){return Ce(oe)})},[a,l,Ce,C,N,s,i,o,u,j]),Ye=b.useCallback(function(te){te.preventDefault(),te.persist(),jt(te);var oe=Zf(te);if(oe&&te.dataTransfer)try{te.dataTransfer.dropEffect="copy"}catch{}return oe&&d&&d(te),!1},[d,C]),qe=b.useCallback(function(te){te.preventDefault(),te.persist(),jt(te);var oe=De.current.filter(function(W){return $.current&&$.current.contains(W)}),B=oe.indexOf(te.target);B!==-1&&oe.splice(B,1),De.current=oe,!(oe.length>0)&&(V({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),Zf(te)&&c&&c(te))},[$,c,C]),$e=b.useCallback(function(te,oe){var B=[],W=[];te.forEach(function(se){var ye=NA(se,N),be=Cb(ye,2),Xt=be[0],Nn=be[1],En=DA(se,s,i),Wn=Cb(En,2),Dn=Wn[0],Lt=Wn[1],Kn=j?j(se):null;if(Xt&&Dn&&!Kn)B.push(se);else{var wn=[Nn,Lt];Kn&&(wn=wn.concat(Kn)),W.push({file:se,errors:wn.filter(function(Fa){return Fa})})}}),(!o&&B.length>1||o&&u>=1&&B.length>u)&&(B.forEach(function(se){W.push({file:se,errors:[wB]})}),B.splice(0)),V({acceptedFiles:B,fileRejections:W,isDragReject:W.length>0,type:"setFiles"}),f&&f(B,W,oe),W.length>0&&g&&g(W,oe),B.length>0&&p&&p(B,oe)},[V,o,N,s,i,u,f,p,g,j]),Rt=b.useCallback(function(te){te.preventDefault(),te.persist(),jt(te),De.current=[],Zf(te)&&Promise.resolve(a(te)).then(function(oe){Qf(te)&&!C||$e(oe,te)}).catch(function(oe){return Ce(oe)}),V({type:"reset"})},[a,$e,Ce,C]),ve=b.useCallback(function(){if(Ae.current){V({type:"openDialog"}),H();var te={multiple:o,types:Y};window.showOpenFilePicker(te).then(function(oe){return a(oe)}).then(function(oe){$e(oe,null),V({type:"closeDialog"})}).catch(function(oe){OB(oe)?(ee(oe),V({type:"closeDialog"})):NB(oe)?(Ae.current=!1,ne.current?(ne.current.value=null,ne.current.click()):Ce(new Error("Cannot open the file picker because the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API is not supported and no <input> was provided."))):Ce(oe)});return}ne.current&&(V({type:"openDialog"}),H(),ne.current.value=null,ne.current.click())},[V,H,ee,m,$e,Ce,Y,o]),ge=b.useCallback(function(te){!$.current||!$.current.isEqualNode(te.target)||(te.key===" "||te.key==="Enter"||te.keyCode===32||te.keyCode===13)&&(te.preventDefault(),ve())},[$,ve]),Ge=b.useCallback(function(){V({type:"focus"})},[]),He=b.useCallback(function(){V({type:"blur"})},[]),wt=b.useCallback(function(){T||(AB()?setTimeout(ve,0):ve())},[T,ve]),Tt=function(oe){return r?null:oe},Xe=function(oe){return _?null:Tt(oe)},Be=function(oe){return A?null:Tt(oe)},jt=function(oe){C&&oe.stopPropagation()},Vi=b.useMemo(function(){return function(){var te=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},oe=te.refKey,B=oe===void 0?"ref":oe,W=te.role,se=te.onKeyDown,ye=te.onFocus,be=te.onBlur,Xt=te.onClick,Nn=te.onDragEnter,En=te.onDragOver,Wn=te.onDragLeave,Dn=te.onDrop,Lt=Jf(te,LB);return bt(bt(Rb({onKeyDown:Xe(qr(se,ge)),onFocus:Xe(qr(ye,Ge)),onBlur:Xe(qr(be,He)),onClick:Tt(qr(Xt,wt)),onDragEnter:Be(qr(Nn,at)),onDragOver:Be(qr(En,Ye)),onDragLeave:Be(qr(Wn,qe)),onDrop:Be(qr(Dn,Rt)),role:typeof W=="string"&&W!==""?W:"presentation"},B,$),!r&&!_?{tabIndex:0}:{}),Lt)}},[$,ge,Ge,He,wt,at,Ye,qe,Rt,_,A,r]),Yi=b.useCallback(function(te){te.stopPropagation()},[]),qi=b.useMemo(function(){return function(){var te=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},oe=te.refKey,B=oe===void 0?"ref":oe,W=te.onChange,se=te.onClick,ye=Jf(te,IB),be=Rb({accept:N,multiple:o,type:"file",style:{border:0,clip:"rect(0, 0, 0, 0)",clipPath:"inset(50%)",height:"1px",margin:"0 -1px -1px 0",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap"},onChange:Tt(qr(W,Rt)),onClick:Tt(qr(se,Yi)),tabIndex:-1},B,ne);return bt(bt({},be),ye)}},[ne,n,o,Rt,r]);return bt(bt({},z),{},{isFocused:R&&!r,getRootProps:Vi,getInputProps:qi,rootRef:$,inputRef:ne,open:Tt(ve)})}function YB(e,t){switch(t.type){case"focus":return bt(bt({},e),{},{isFocused:!0});case"blur":return bt(bt({},e),{},{isFocused:!1});case"openDialog":return bt(bt({},Nb),{},{isFileDialogActive:!0});case"closeDialog":return bt(bt({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return bt(bt({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return bt(bt({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections,isDragReject:t.isDragReject});case"reset":return bt({},Nb);default:return e}}function jA(){}class qB{constructor(t){this.components=[];const{components:n}=t;if(n&&n.forEach(r=>this.register(r)),this.components.length===0)throw new Error("No components registered");if(!this.get("fallback"))throw new Error("No fallback component registered")}register(t){const n=this.components.findIndex(r=>r.key===t.key);return n!==-1?this.components[n]=t:this.components.push(t),this}get(t){const n=this.components.find(r=>r.key.toUpperCase()===t.toUpperCase());return n||null}getComponent(t){var n;return(n=this.get(t))==null?void 0:n.component}}function GB(e){const t=b.createContext({});return[()=>{const r=b.useContext(t);if(r===void 0)throw new Error("useSafeContext must be used within a Provider");return r},t.Provider]}const $B=/\{[^{}]+\}/g,XB=()=>{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 WB(){return Math.random().toString(36).slice(2,11)}function KB(e){let{baseUrl:t="",Request:n=globalThis.Request,fetch:r=globalThis.fetch,querySerializer:a,bodySerializer:i,headers:s,requestInitExt:o=void 0,...u}={...e};o=XB()?o:void 0,t=YA(t);const l=[];async function c(d,f){const{baseUrl:p,fetch:g=r,Request:v=n,headers:w,params:m={},parseAs:y="json",querySerializer:x,bodySerializer:T=i??ZB,body:_,...A}=f||{};p&&(t=YA(p));let C=typeof a=="function"?a:VA(a);x&&(C=typeof x=="function"?x:VA({...typeof a=="object"?a:{},...x}));const M=_===void 0?void 0:T(_),j=M===void 0||M instanceof FormData?{}:{"Content-Type":"application/json"},N={redirect:"follow",...u,...A,body:M,headers:eU(j,s,w,m.header)};let Y,H,ee=new n(JB(d,{baseUrl:t,params:m,querySerializer:C}),N);for(const U in A)U in ee||(ee[U]=A[U]);if(l.length){Y=WB(),H=Object.freeze({baseUrl:t,fetch:g,parseAs:y,querySerializer:C,bodySerializer:T});for(const U of l)if(U&&typeof U=="object"&&typeof U.onRequest=="function"){const q=await U.onRequest({request:ee,schemaPath:d,params:m,options:H,id:Y});if(q){if(!(q instanceof n))throw new Error("onRequest: must return new Request() when modifying the request");ee=q}}}let $;try{$=await g(ee,o)}catch(U){let q=U;if(l.length)for(let z=l.length-1;z>=0;z--){const V=l[z];if(V&&typeof V=="object"&&typeof V.onError=="function"){const R=await V.onError({request:ee,error:q,schemaPath:d,params:m,options:H,id:Y});if(R){if(R instanceof Response){q=void 0,$=R;break}if(R instanceof Error){q=R;continue}throw new Error("onError: must return new Response() or instance of Error")}}}if(q)throw q}if(l.length)for(let U=l.length-1;U>=0;U--){const q=l[U];if(q&&typeof q=="object"&&typeof q.onResponse=="function"){const z=await q.onResponse({request:ee,response:$,schemaPath:d,params:m,options:H,id:Y});if(z){if(!(z instanceof Response))throw new Error("onResponse: must return new Response() when modifying the response");$=z}}}if($.status===204||$.headers.get("Content-Length")==="0")return $.ok?{data:void 0,response:$}:{error:void 0,response:$};if($.ok)return y==="stream"?{data:$.body,response:$}:{data:await $[y](),response:$};let ne=await $.text();try{ne=JSON.parse(ne)}catch{}return{error:ne,response:$}}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 ep(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 HA(e,t,n){if(!t||typeof t!="object")return"";const r=[],a={simple:",",label:".",matrix:";"}[n.style]||"&";if(n.style!=="deepObject"&&n.explode===!1){for(const o in t)r.push(o,n.allowReserved===!0?t[o]:encodeURIComponent(t[o]));const s=r.join(",");switch(n.style){case"form":return`${e}=${s}`;case"label":return`.${s}`;case"matrix":return`;${e}=${s}`;default:return s}}for(const s in t){const o=n.style==="deepObject"?`${e}[${s}]`:s;r.push(ep(o,t[s],n))}const i=r.join(a);return n.style==="label"||n.style==="matrix"?`${a}${i}`:i}function zA(e,t,n){if(!Array.isArray(t))return"";if(n.explode===!1){const i={form:",",spaceDelimited:"%20",pipeDelimited:"|"}[n.style]||",",s=(n.allowReserved===!0?t:t.map(o=>encodeURIComponent(o))).join(i);switch(n.style){case"simple":return s;case"label":return`.${s}`;case"matrix":return`;${e}=${s}`;default:return`${e}=${s}`}}const r={simple:",",label:".",matrix:";"}[n.style]||"&",a=[];for(const i of t)n.style==="simple"||n.style==="label"?a.push(n.allowReserved===!0?i:encodeURIComponent(i)):a.push(ep(e,i,n));return n.style==="label"||n.style==="matrix"?`${r}${a.join(r)}`:a.join(r)}function VA(e){return function(n){const r=[];if(n&&typeof n=="object")for(const a in n){const i=n[a];if(i!=null){if(Array.isArray(i)){if(i.length===0)continue;r.push(zA(a,i,{style:"form",explode:!0,...e==null?void 0:e.array,allowReserved:(e==null?void 0:e.allowReserved)||!1}));continue}if(typeof i=="object"){r.push(HA(a,i,{style:"deepObject",explode:!0,...e==null?void 0:e.object,allowReserved:(e==null?void 0:e.allowReserved)||!1}));continue}r.push(ep(a,i,e))}}return r.join("&")}}function QB(e,t){let n=e;for(const r of e.match($B)??[]){let a=r.substring(1,r.length-1),i=!1,s="simple";if(a.endsWith("*")&&(i=!0,a=a.substring(0,a.length-1)),a.startsWith(".")?(s="label",a=a.substring(1)):a.startsWith(";")&&(s="matrix",a=a.substring(1)),!t||t[a]===void 0||t[a]===null)continue;const o=t[a];if(Array.isArray(o)){n=n.replace(r,zA(a,o,{style:s,explode:i}));continue}if(typeof o=="object"){n=n.replace(r,HA(a,o,{style:s,explode:i}));continue}if(s==="matrix"){n=n.replace(r,`;${ep(a,o)}`);continue}n=n.replace(r,s==="label"?`.${encodeURIComponent(o)}`:encodeURIComponent(o))}return n}function ZB(e){return e instanceof FormData?e:JSON.stringify(e)}function JB(e,t){var a;let n=`${t.baseUrl}${e}`;(a=t.params)!=null&&a.path&&(n=QB(n,t.params.path));let r=t.querySerializer(t.params.query??{});return r.startsWith("?")&&(r=r.substring(1)),r&&(n+=`?${r}`),n}function eU(...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[a,i]of r)if(i===null)t.delete(a);else if(Array.isArray(i))for(const s of i)t.append(a,s);else i!==void 0&&t.set(a,i)}return t}function YA(e){return e.endsWith("/")?e.substring(0,e.length-1):e}const tU=e=>{console.log(e.error)},nU=e=>{const t=KB({baseUrl:e.baseUrl}),n={onRequest:e.onRequest,onResponse:e.onResponse,onError:e.onError||tU};return t.use(n),t};class qA{constructor({config:t}){var a;this.userToken=null,this.constructClientOptions=i=>{const s=this.config.apiUrl||"https://api.open.cx",o={"X-Bot-Token":this.config.token,"Content-Type":"application/json",Accept:"application/json",Authorization:i?`Bearer ${i}`:void 0};return{baseUrl:s,headers:o}},this.createOpenAPIClient=({baseUrl:i,headers:s})=>nU({baseUrl:i,onRequest:({request:o})=>{Object.entries(s).forEach(([u,l])=>{l&&o.headers.set(u,l)})}}),this.setAuthToken=i=>{this.userToken=i;const{baseUrl:s,headers:o}=this.constructClientOptions(i);this.client=this.createOpenAPIClient({baseUrl:s,headers:o})},this.getExternalWidgetConfig=async()=>await this.client.GET("/backend/widget/v2/config",{params:{header:{"X-Bot-Token":this.config.token}}}),this.widgetPrelude=async()=>await this.client.GET("/backend/widget/v2/prelude",{params:{header:{"X-Bot-Token":this.config.token}}}),this.sendMessage=async(i,s)=>await this.client.POST("/backend/widget/v2/chat/send",{body:i,signal:s}),this.createUnverifiedContact=async i=>await this.client.POST("/backend/widget/v2/contact/create-unverified",{params:{header:{"x-bot-token":this.config.token}},body:i}),this.createSession=async i=>await this.client.POST("/backend/widget/v2/create-session",{body:i}),this.pollSessionAndHistory=async({sessionId:i,lastMessageTimestamp:s,abortSignal:o})=>{const u=s?{lastMessageTimestamp:s}:void 0;return await this.client.GET("/backend/widget/v2/poll/{sessionId}",{params:{path:{sessionId:i},query:u},signal:o})},this.getSessions=async({cursor:i,filters:s,abortSignal:o})=>await this.client.GET("/backend/widget/v2/sessions",{params:{query:{cursor:i,filters:JSON.stringify(s)}},signal:o}),this.uploadFile=async({file:i,abortSignal:s,onProgress:o})=>new Promise((u,l)=>{const c=new FormData;c.append("file",i);const d=new XMLHttpRequest;if(s&&(s.addEventListener("abort",()=>{d.abort(),l(new DOMException("Aborted","AbortError"))}),s.aborted)){l(new DOMException("Aborted","AbortError"));return}d.upload.addEventListener("progress",v=>{if(v.lengthComputable&&o){const w=Math.round(v.loaded/v.total*100);o(w)}}),d.addEventListener("load",()=>{if(d.status>=200&&d.status<300)try{const v=JSON.parse(d.responseText);u(v)}catch(v){l(new Error(`Failed to parse response: ${v}`))}else l(new Error(`Upload failed with status: ${d.status}`))}),d.addEventListener("error",()=>{l(new Error("Network error occurred"))}),d.addEventListener("timeout",()=>{l(new Error("Upload timed out"))});const{baseUrl:f}=this.constructClientOptions(this.userToken),g=`${f}/backend/widget/v2/upload`;d.open("POST",g),d.setRequestHeader("X-Bot-Token",this.config.token),this.userToken&&d.setRequestHeader("Authorization",`Bearer ${this.userToken}`),d.send(c)}),this.vote=async i=>await this.client.POST("/backend/widget/v2/chat/vote",{body:i}),this.config=t;const{baseUrl:n,headers:r}=this.constructClientOptions((a=t.user)==null?void 0:a.token);this.client=this.createOpenAPIClient({baseUrl:n,headers:r})}}var tp={exports:{}};tp.exports,function(e,t){var n=200,r="__lodash_hash_undefined__",a=1,i=2,s=9007199254740991,o="[object Arguments]",u="[object Array]",l="[object AsyncFunction]",c="[object Boolean]",d="[object Date]",f="[object Error]",p="[object Function]",g="[object GeneratorFunction]",v="[object Map]",w="[object Number]",m="[object Null]",y="[object Object]",x="[object Promise]",T="[object Proxy]",_="[object RegExp]",A="[object Set]",C="[object String]",M="[object Symbol]",j="[object Undefined]",N="[object WeakMap]",Y="[object ArrayBuffer]",H="[object DataView]",ee="[object Float32Array]",$="[object Float64Array]",ne="[object Int8Array]",U="[object Int16Array]",q="[object Int32Array]",z="[object Uint8Array]",V="[object Uint8ClampedArray]",R="[object Uint16Array]",ue="[object Uint32Array]",Ae=/[\\^$.*+?()[\]{}|]/g,L=/^\[object .+?Constructor\]$/,De=/^(?:0|[1-9]\d*)$/,de={};de[ee]=de[$]=de[ne]=de[U]=de[q]=de[z]=de[V]=de[R]=de[ue]=!0,de[o]=de[u]=de[Y]=de[c]=de[H]=de[d]=de[f]=de[p]=de[v]=de[w]=de[y]=de[_]=de[A]=de[C]=de[N]=!1;var Ce=typeof Vs=="object"&&Vs&&Vs.Object===Object&&Vs,at=typeof self=="object"&&self&&self.Object===Object&&self,Ye=Ce||at||Function("return this")(),qe=t&&!t.nodeType&&t,$e=qe&&!0&&e&&!e.nodeType&&e,Rt=$e&&$e.exports===qe,ve=Rt&&Ce.process,ge=function(){try{return ve&&ve.binding&&ve.binding("util")}catch{}}(),Ge=ge&&ge.isTypedArray;function He(k,I){for(var X=-1,ie=k==null?0:k.length,ut=0,ke=[];++X<ie;){var _t=k[X];I(_t,X,k)&&(ke[ut++]=_t)}return ke}function wt(k,I){for(var X=-1,ie=I.length,ut=k.length;++X<ie;)k[ut+X]=I[X];return k}function Tt(k,I){for(var X=-1,ie=k==null?0:k.length;++X<ie;)if(I(k[X],X,k))return!0;return!1}function Xe(k,I){for(var X=-1,ie=Array(k);++X<k;)ie[X]=I(X);return ie}function Be(k){return function(I){return k(I)}}function jt(k,I){return k.has(I)}function Vi(k,I){return k==null?void 0:k[I]}function Yi(k){var I=-1,X=Array(k.size);return k.forEach(function(ie,ut){X[++I]=[ut,ie]}),X}function qi(k,I){return function(X){return k(I(X))}}function te(k){var I=-1,X=Array(k.size);return k.forEach(function(ie){X[++I]=ie}),X}var oe=Array.prototype,B=Function.prototype,W=Object.prototype,se=Ye["__core-js_shared__"],ye=B.toString,be=W.hasOwnProperty,Xt=function(){var k=/[^.]+$/.exec(se&&se.keys&&se.keys.IE_PROTO||"");return k?"Symbol(src)_1."+k:""}(),Nn=W.toString,En=RegExp("^"+ye.call(be).replace(Ae,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Wn=Rt?Ye.Buffer:void 0,Dn=Ye.Symbol,Lt=Ye.Uint8Array,Kn=W.propertyIsEnumerable,wn=oe.splice,Fa=Dn?Dn.toStringTag:void 0,V6=Object.getOwnPropertySymbols,Tne=Wn?Wn.isBuffer:void 0,_ne=qi(Object.keys,Object),my=Ou(Ye,"DataView"),Jc=Ou(Ye,"Map"),gy=Ou(Ye,"Promise"),by=Ou(Ye,"Set"),vy=Ou(Ye,"WeakMap"),ed=Ou(Object,"create"),Sne=Hs(my),Ane=Hs(Jc),Cne=Hs(gy),kne=Hs(by),Rne=Hs(vy),Y6=Dn?Dn.prototype:void 0,yy=Y6?Y6.valueOf:void 0;function Fs(k){var I=-1,X=k==null?0:k.length;for(this.clear();++I<X;){var ie=k[I];this.set(ie[0],ie[1])}}function One(){this.__data__=ed?ed(null):{},this.size=0}function Nne(k){var I=this.has(k)&&delete this.__data__[k];return this.size-=I?1:0,I}function Dne(k){var I=this.__data__;if(ed){var X=I[k];return X===r?void 0:X}return be.call(I,k)?I[k]:void 0}function Mne(k){var I=this.__data__;return ed?I[k]!==void 0:be.call(I,k)}function Lne(k,I){var X=this.__data__;return this.size+=this.has(k)?0:1,X[k]=ed&&I===void 0?r:I,this}Fs.prototype.clear=One,Fs.prototype.delete=Nne,Fs.prototype.get=Dne,Fs.prototype.has=Mne,Fs.prototype.set=Lne;function ja(k){var I=-1,X=k==null?0:k.length;for(this.clear();++I<X;){var ie=k[I];this.set(ie[0],ie[1])}}function Ine(){this.__data__=[],this.size=0}function Pne(k){var I=this.__data__,X=Dh(I,k);if(X<0)return!1;var ie=I.length-1;return X==ie?I.pop():wn.call(I,X,1),--this.size,!0}function Bne(k){var I=this.__data__,X=Dh(I,k);return X<0?void 0:I[X][1]}function Une(k){return Dh(this.__data__,k)>-1}function Fne(k,I){var X=this.__data__,ie=Dh(X,k);return ie<0?(++this.size,X.push([k,I])):X[ie][1]=I,this}ja.prototype.clear=Ine,ja.prototype.delete=Pne,ja.prototype.get=Bne,ja.prototype.has=Une,ja.prototype.set=Fne;function js(k){var I=-1,X=k==null?0:k.length;for(this.clear();++I<X;){var ie=k[I];this.set(ie[0],ie[1])}}function jne(){this.size=0,this.__data__={hash:new Fs,map:new(Jc||ja),string:new Fs}}function Hne(k){var I=Mh(this,k).delete(k);return this.size-=I?1:0,I}function zne(k){return Mh(this,k).get(k)}function Vne(k){return Mh(this,k).has(k)}function Yne(k,I){var X=Mh(this,k),ie=X.size;return X.set(k,I),this.size+=X.size==ie?0:1,this}js.prototype.clear=jne,js.prototype.delete=Hne,js.prototype.get=zne,js.prototype.has=Vne,js.prototype.set=Yne;function Nh(k){var I=-1,X=k==null?0:k.length;for(this.__data__=new js;++I<X;)this.add(k[I])}function qne(k){return this.__data__.set(k,r),this}function Gne(k){return this.__data__.has(k)}Nh.prototype.add=Nh.prototype.push=qne,Nh.prototype.has=Gne;function Gi(k){var I=this.__data__=new ja(k);this.size=I.size}function $ne(){this.__data__=new ja,this.size=0}function Xne(k){var I=this.__data__,X=I.delete(k);return this.size=I.size,X}function Wne(k){return this.__data__.get(k)}function Kne(k){return this.__data__.has(k)}function Qne(k,I){var X=this.__data__;if(X instanceof ja){var ie=X.__data__;if(!Jc||ie.length<n-1)return ie.push([k,I]),this.size=++X.size,this;X=this.__data__=new js(ie)}return X.set(k,I),this.size=X.size,this}Gi.prototype.clear=$ne,Gi.prototype.delete=Xne,Gi.prototype.get=Wne,Gi.prototype.has=Kne,Gi.prototype.set=Qne;function Zne(k,I){var X=Lh(k),ie=!X&&pre(k),ut=!X&&!ie&&xy(k),ke=!X&&!ie&&!ut&&J6(k),_t=X||ie||ut||ke,Wt=_t?Xe(k.length,String):[],nn=Wt.length;for(var yt in k)be.call(k,yt)&&!(_t&&(yt=="length"||ut&&(yt=="offset"||yt=="parent")||ke&&(yt=="buffer"||yt=="byteLength"||yt=="byteOffset")||ure(yt,nn)))&&Wt.push(yt);return Wt}function Dh(k,I){for(var X=k.length;X--;)if(W6(k[X][0],I))return X;return-1}function Jne(k,I,X){var ie=I(k);return Lh(k)?ie:wt(ie,X(k))}function td(k){return k==null?k===void 0?j:m:Fa&&Fa in Object(k)?sre(k):fre(k)}function q6(k){return nd(k)&&td(k)==o}function G6(k,I,X,ie,ut){return k===I?!0:k==null||I==null||!nd(k)&&!nd(I)?k!==k&&I!==I:ere(k,I,X,ie,G6,ut)}function ere(k,I,X,ie,ut,ke){var _t=Lh(k),Wt=Lh(I),nn=_t?u:$i(k),yt=Wt?u:$i(I);nn=nn==o?y:nn,yt=yt==o?y:yt;var Qn=nn==y,Lr=yt==y,pn=nn==yt;if(pn&&xy(k)){if(!xy(I))return!1;_t=!0,Qn=!1}if(pn&&!Qn)return ke||(ke=new Gi),_t||J6(k)?$6(k,I,X,ie,ut,ke):are(k,I,nn,X,ie,ut,ke);if(!(X&a)){var yr=Qn&&be.call(k,"__wrapped__"),xr=Lr&&be.call(I,"__wrapped__");if(yr||xr){var Xi=yr?k.value():k,Ha=xr?I.value():I;return ke||(ke=new Gi),ut(Xi,Ha,X,ie,ke)}}return pn?(ke||(ke=new Gi),ire(k,I,X,ie,ut,ke)):!1}function tre(k){if(!Z6(k)||cre(k))return!1;var I=K6(k)?En:L;return I.test(Hs(k))}function nre(k){return nd(k)&&Q6(k.length)&&!!de[td(k)]}function rre(k){if(!dre(k))return _ne(k);var I=[];for(var X in Object(k))be.call(k,X)&&X!="constructor"&&I.push(X);return I}function $6(k,I,X,ie,ut,ke){var _t=X&a,Wt=k.length,nn=I.length;if(Wt!=nn&&!(_t&&nn>Wt))return!1;var yt=ke.get(k);if(yt&&ke.get(I))return yt==I;var Qn=-1,Lr=!0,pn=X&i?new Nh:void 0;for(ke.set(k,I),ke.set(I,k);++Qn<Wt;){var yr=k[Qn],xr=I[Qn];if(ie)var Xi=_t?ie(xr,yr,Qn,I,k,ke):ie(yr,xr,Qn,k,I,ke);if(Xi!==void 0){if(Xi)continue;Lr=!1;break}if(pn){if(!Tt(I,function(Ha,zs){if(!jt(pn,zs)&&(yr===Ha||ut(yr,Ha,X,ie,ke)))return pn.push(zs)})){Lr=!1;break}}else if(!(yr===xr||ut(yr,xr,X,ie,ke))){Lr=!1;break}}return ke.delete(k),ke.delete(I),Lr}function are(k,I,X,ie,ut,ke,_t){switch(X){case H:if(k.byteLength!=I.byteLength||k.byteOffset!=I.byteOffset)return!1;k=k.buffer,I=I.buffer;case Y:return!(k.byteLength!=I.byteLength||!ke(new Lt(k),new Lt(I)));case c:case d:case w:return W6(+k,+I);case f:return k.name==I.name&&k.message==I.message;case _:case C:return k==I+"";case v:var Wt=Yi;case A:var nn=ie&a;if(Wt||(Wt=te),k.size!=I.size&&!nn)return!1;var yt=_t.get(k);if(yt)return yt==I;ie|=i,_t.set(k,I);var Qn=$6(Wt(k),Wt(I),ie,ut,ke,_t);return _t.delete(k),Qn;case M:if(yy)return yy.call(k)==yy.call(I)}return!1}function ire(k,I,X,ie,ut,ke){var _t=X&a,Wt=X6(k),nn=Wt.length,yt=X6(I),Qn=yt.length;if(nn!=Qn&&!_t)return!1;for(var Lr=nn;Lr--;){var pn=Wt[Lr];if(!(_t?pn in I:be.call(I,pn)))return!1}var yr=ke.get(k);if(yr&&ke.get(I))return yr==I;var xr=!0;ke.set(k,I),ke.set(I,k);for(var Xi=_t;++Lr<nn;){pn=Wt[Lr];var Ha=k[pn],zs=I[pn];if(ie)var e4=_t?ie(zs,Ha,pn,I,k,ke):ie(Ha,zs,pn,k,I,ke);if(!(e4===void 0?Ha===zs||ut(Ha,zs,X,ie,ke):e4)){xr=!1;break}Xi||(Xi=pn=="constructor")}if(xr&&!Xi){var Ih=k.constructor,Ph=I.constructor;Ih!=Ph&&"constructor"in k&&"constructor"in I&&!(typeof Ih=="function"&&Ih instanceof Ih&&typeof Ph=="function"&&Ph instanceof Ph)&&(xr=!1)}return ke.delete(k),ke.delete(I),xr}function X6(k){return Jne(k,gre,ore)}function Mh(k,I){var X=k.__data__;return lre(I)?X[typeof I=="string"?"string":"hash"]:X.map}function Ou(k,I){var X=Vi(k,I);return tre(X)?X:void 0}function sre(k){var I=be.call(k,Fa),X=k[Fa];try{k[Fa]=void 0;var ie=!0}catch{}var ut=Nn.call(k);return ie&&(I?k[Fa]=X:delete k[Fa]),ut}var ore=V6?function(k){return k==null?[]:(k=Object(k),He(V6(k),function(I){return Kn.call(k,I)}))}:bre,$i=td;(my&&$i(new my(new ArrayBuffer(1)))!=H||Jc&&$i(new Jc)!=v||gy&&$i(gy.resolve())!=x||by&&$i(new by)!=A||vy&&$i(new vy)!=N)&&($i=function(k){var I=td(k),X=I==y?k.constructor:void 0,ie=X?Hs(X):"";if(ie)switch(ie){case Sne:return H;case Ane:return v;case Cne:return x;case kne:return A;case Rne:return N}return I});function ure(k,I){return I=I??s,!!I&&(typeof k=="number"||De.test(k))&&k>-1&&k%1==0&&k<I}function lre(k){var I=typeof k;return I=="string"||I=="number"||I=="symbol"||I=="boolean"?k!=="__proto__":k===null}function cre(k){return!!Xt&&Xt in k}function dre(k){var I=k&&k.constructor,X=typeof I=="function"&&I.prototype||W;return k===X}function fre(k){return Nn.call(k)}function Hs(k){if(k!=null){try{return ye.call(k)}catch{}try{return k+""}catch{}}return""}function W6(k,I){return k===I||k!==k&&I!==I}var pre=q6(function(){return arguments}())?q6:function(k){return nd(k)&&be.call(k,"callee")&&!Kn.call(k,"callee")},Lh=Array.isArray;function hre(k){return k!=null&&Q6(k.length)&&!K6(k)}var xy=Tne||vre;function mre(k,I){return G6(k,I)}function K6(k){if(!Z6(k))return!1;var I=td(k);return I==p||I==g||I==l||I==T}function Q6(k){return typeof k=="number"&&k>-1&&k%1==0&&k<=s}function Z6(k){var I=typeof k;return k!=null&&(I=="object"||I=="function")}function nd(k){return k!=null&&typeof k=="object"}var J6=Ge?Be(Ge):nre;function gre(k){return hre(k)?Zne(k):rre(k)}function bre(){return[]}function vre(){return!1}e.exports=mre}(tp,tp.exports);var rU=tp.exports;const aU=rd(rU);class Go{constructor(t){this.subscribers=new Set,this.get=()=>this.state,this.set=n=>{aU(this.state,n)||(this.state=n,this.notifySubscribers(n))},this.setPartial=n=>{if(n==null)return;const r={...this.state,...n};this.set(r)},this.reset=()=>{this.set(this.initialState)},this.notifySubscribers=n=>{Array.from(this.subscribers).forEach(a=>{try{a(n)}catch(i){console.error(i)}})},this.subscribe=n=>(this.subscribers.add(n),()=>{this.subscribers.delete(n)}),this.state=t,this.initialState=t}}class GA{constructor(){this.state=new Go({isPolling:!1,isError:!1}),this.abortController=new AbortController,this.reset=()=>{var t;this.abortController.abort("Resetting poller"),(t=this.stopPolling)==null||t.call(this),this.stopPolling=null},this.stopPolling=null,this.startPolling=(t,n)=>{if(this.stopPolling)return;const r=[],a=async()=>{this.abortController=new AbortController,this.state.setPartial({isPolling:!0});try{await t(this.abortController.signal)}catch(i){if(this.abortController.signal.aborted)return;console.error("Failed to poll:",i),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(a,n))};a(),this.stopPolling=()=>{r.forEach(clearTimeout),this.state.reset()}}}}function iU(e){try{const t=e();return t instanceof Promise?t.then(n=>({data:n})).catch(n=>({error:n})):{data:t}}catch(t){return{error:t}}}class sU{constructor({api:t,config:n,sessionCtx:r,messageCtx:a,sessionPollingIntervalSeconds:i}){this.poller=new GA,this.registerPolling=()=>{this.sessionCtx.sessionState.subscribe(({session:s})=>{s!=null&&s.id?this.poller.startPolling(async o=>{this.hackAndSlash(s.id,o)},this.sessionPollingIntervalSeconds*1e3):this.poller.reset()})},this.hackAndSlash=async(s,o)=>{var d;this.messageCtx.state.get().messages.length===0&&this.messageCtx.state.setPartial({isInitialFetchLoading:!0});const u=this.messageCtx.state.get().messages,l=u.length>0?(d=u[u.length-1])==null?void 0:d.timestamp:void 0,{data:c}=await this.api.pollSessionAndHistory({sessionId:s,abortSignal:o,lastMessageTimestamp:l});if(c!=null&&c.session&&(this.sessionCtx.sessionState.setPartial({session:c.session}),this.sessionCtx.setSessions([c.session])),c!=null&&c.history&&c.history.length>0){const f=this.messageCtx.state.get().messages,p=c.history.map(this.mapHistoryToMessage).filter(g=>!f.some(v=>v.id===g.id));this.messageCtx.state.setPartial({messages:[...f,...p]})}this.messageCtx.state.get().isInitialFetchLoading&&this.messageCtx.state.setPartial({isInitialFetchLoading:!1})},this.mapHistoryToMessage=s=>{var l,c;const o={id:s.publicId,timestamp:s.sentAt||"",attachments:s.attachments||void 0};if(s.sender.kind==="user")return{...o,type:"FROM_USER",content:s.content.text||"",deliveredAt:s.sentAt||""};if(s.sender.kind==="agent")return{...o,type:"FROM_AGENT",component:"agent_message",data:{message:s.content.text||""},agent:{name:s.sender.name||"",avatar:s.sender.avatar||"",id:null,isAi:!1}};const u=s.actionCalls&&s.actionCalls.length>0?s.actionCalls[s.actionCalls.length-1]:void 0;return{...o,type:"FROM_BOT",component:"bot_message",agent:{id:null,name:((l=this.config.bot)==null?void 0:l.name)||"",isAi:!0,avatar:((c=this.config.bot)==null?void 0:c.avatar)||""},data:{message:s.content.text||"",action:u?{name:u.actionName,data:this.extractActionResult(u)}:void 0}}},this.extractActionResult=s=>{const o=s.result;if(o===null||typeof o!="object")return o;if("responseBodyText"in o&&typeof o.responseBodyText=="string"){const u=o.responseBodyText,l=iU(()=>JSON.parse(u)).data;if(l)return l}return s.result},this.api=t,this.config=n,this.sessionCtx=r,this.messageCtx=a,this.sessionPollingIntervalSeconds=i,this.registerPolling()}}const tn=[];for(let e=0;e<256;++e)tn.push((e+256).toString(16).slice(1));function oU(e,t=0){return(tn[e[t+0]]+tn[e[t+1]]+tn[e[t+2]]+tn[e[t+3]]+"-"+tn[e[t+4]]+tn[e[t+5]]+"-"+tn[e[t+6]]+tn[e[t+7]]+"-"+tn[e[t+8]]+tn[e[t+9]]+"-"+tn[e[t+10]]+tn[e[t+11]]+tn[e[t+12]]+tn[e[t+13]]+tn[e[t+14]]+tn[e[t+15]]).toLowerCase()}let Db;const uU=new Uint8Array(16);function lU(){if(!Db){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");Db=crypto.getRandomValues.bind(crypto)}return Db(uU)}const $A={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function Mb(e,t,n){var a;if($A.randomUUID&&!t&&!e)return $A.randomUUID();e=e||{};const r=e.random??((a=e.rng)==null?void 0:a.call(e))??lU();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,oU(r)}class cU{constructor({config:t,api:n,storageCtx:r}){var a;this.shouldCollectData=()=>{var i;return!!(!((i=this.state.get().contact)!=null&&i.token)&&this.config.collectUserData)},this.autoCreateUnverifiedUserIfNotExists=async()=>{var i,s,o,u,l,c,d,f,p,g,v,w,m,y;if(!((i=this.config.user)!=null&&i.token)){if(this.config.collectUserData&&!((o=(s=this.config.user)==null?void 0:s.data)!=null&&o.email)){if((u=this.config.extraDataCollectionFields)!=null&&u.length)return;const x=await((l=this.storageCtx)==null?void 0:l.getContactToken());x&&await this.setUnverifiedContact(x);return}if(!((d=(c=this.config.user)==null?void 0:c.data)!=null&&d.email)){const x=await((f=this.storageCtx)==null?void 0:f.getContactToken());if(x){await this.setUnverifiedContact(x);return}}await this.createUnverifiedContact({email:(g=(p=this.config.user)==null?void 0:p.data)==null?void 0:g.email,non_verified_name:((w=(v=this.config.user)==null?void 0:v.data)==null?void 0:w.name)||"Anonymous",non_verified_custom_data:(y=(m=this.config.user)==null?void 0:m.data)==null?void 0:y.customData})}},this.createUnverifiedContact=async(i,s)=>{this.state.setPartial({extraCollectedData:s});try{this.state.setPartial({isCreatingUnverifiedContact:!0,isErrorCreatingUnverifiedContact:!1});const{data:o}=await this.api.createUnverifiedContact(i);o!=null&&o.token?await this.setUnverifiedContact(o.token):this.state.setPartial({isErrorCreatingUnverifiedContact:!0})}finally{this.state.setPartial({isCreatingUnverifiedContact:!1})}},this.setUnverifiedContact=async i=>{var u,l,c,d;const s=await((u=this.storageCtx)==null?void 0:u.getExternalContactId()),o=((l=this.config.user)==null?void 0:l.externalId)||s||Mb();this.api.setAuthToken(i),await((c=this.storageCtx)==null?void 0:c.setContactToken(i)),await((d=this.storageCtx)==null?void 0:d.setExternalContactId(o)),this.state.setPartial({contact:{token:i,externalId:o}})},this.config=t,this.storageCtx=r,this.api=n,this.state=new Go({contact:(a=t.user)!=null&&a.token?{token:t.user.token,externalId:t.user.externalId}:null,extraCollectedData:void 0,isCreatingUnverifiedContact:!1,isErrorCreatingUnverifiedContact:!1}),this.autoCreateUnverifiedUserIfNotExists()}}function Lb(){return Mb()}class dU{constructor({api:t,contactCtx:n,sessionsPollingIntervalSeconds:r}){this.sessionsRefresher=new GA,this.sessionState=new Go({session:null,isCreatingSession:!1}),this.sessionsState=new Go({data:[],cursor:void 0,isLastPage:!1,didStartInitialFetch:!1,isInitialFetchLoading:!0}),this.reset=async()=>{this.sessionState.reset()},this.registerSessionsRefresherWrapper=()=>{var a;(a=this.contactCtx.state.get().contact)!=null&&a.token&&!this.sessionsState.get().didStartInitialFetch?this.registerSessionsRefresher():this.contactCtx.state.subscribe(({contact:i})=>{i!=null&&i.token&&!this.sessionsState.get().didStartInitialFetch&&this.registerSessionsRefresher()})},this.registerSessionsRefresher=()=>{this.sessionsRefresher.startPolling(async()=>{this.sessionsState.get().didStartInitialFetch===!1&&this.sessionsState.setPartial({didStartInitialFetch:!0}),await this.refreshSessions(),this.sessionsState.get().isInitialFetchLoading===!0&&this.sessionsState.setPartial({isInitialFetchLoading:!1})},this.sessionsPollingIntervalSeconds*1e3)},this.createSession=async()=>{var o;this.sessionState.setPartial({session:null,isCreatingSession:!0});const a=(o=this.contactCtx.state.get().contact)==null?void 0:o.externalId,{data:i,error:s}=await this.api.createSession({customData:a?{external_id:a}:void 0});return i?(this.sessionState.setPartial({session:i,isCreatingSession:!1}),i):(console.error("Failed to create session:",s),null)},this.loadMoreSessions=async()=>{if(this.sessionsState.get().isLastPage)return;const{data:a}=await this.getSessions({cursor:this.sessionsState.get().cursor});if(a){const s=[...this.sessionsState.get().data,...a.items].filter((o,u,l)=>u===l.findIndex(c=>o.id===c.id));this.sessionsState.setPartial({data:s,cursor:a.next||void 0,isLastPage:a.next===null})}},this.getSessions=async({cursor:a})=>{var s,o;if(!((s=this.contactCtx.state.get().contact)!=null&&s.token))return{data:null};const i=(o=this.contactCtx.state.get().contact)==null?void 0:o.externalId;return await this.api.getSessions({cursor:a,filters:i?{external_id:i}:{}})},this.setSessions=a=>{const i=[...a,...this.sessionsState.get().data].filter((s,o,u)=>o===u.findIndex(l=>s.id===l.id));this.sessionsState.setPartial({data:i})},this.refreshSessions=async()=>{const{data:a}=await this.getSessions({cursor:void 0});a&&this.setSessions(a.items)},this.api=t,this.contactCtx=n,this.sessionsPollingIntervalSeconds=r,this.registerSessionsRefresherWrapper()}}class fU{constructor({config:t,api:n,sessionCtx:r,contactCtx:a}){this.state=new Go({messages:[],isSendingMessage:!1,lastAIResMightSolveUserIssue:!1,isInitialFetchLoading:!1}),this.sendMessageAbortController=new AbortController,this.reset=()=>{this.sendMessageAbortController.abort("Resetting chat"),this.state.reset()},this.sendMessage=async i=>{var c,d,f,p,g,v,w,m;if(!i.content.trim()&&(!i.attachments||i.attachments.length===0)){console.warn("Cannot send an empty message of no content or attachments");return}const s=this.state.get().isSendingMessage,o=((c=this.sessionCtx.sessionState.get().session)==null?void 0:c.assignee.kind)==="ai",u=this.state.get().messages,l=u.length>0?u[u.length-1]:void 0;if(o&&s||o&&(l==null?void 0:l.type)==="FROM_USER"){console.warn("Cannot send messages while awaiting AI response");return}this.sendMessageAbortController=new AbortController,this.state.setPartial({lastAIResMightSolveUserIssue:!1});try{this.state.setPartial({isSendingMessage:!0});const y=this.toUserMessage(i.content.trim(),i.attachments||void 0),x=this.state.get().messages;if(this.state.setPartial({messages:[...x,y]}),!((d=this.sessionCtx.sessionState.get().session)!=null&&d.id)){if(!await this.sessionCtx.createSession()){console.error("Failed to create session");return}this.sessionCtx.refreshSessions()}const T=(f=this.sessionCtx.sessionState.get().session)==null?void 0:f.id;if(!T)return;const{data:_}=await this.api.sendMessage({uuid:y.id,bot_token:this.config.token,headers:this.config.headers,query_params:this.config.queryParams,session_id:T,content:y.content,attachments:i.attachments,clientContext:this.config.context},this.sendMessageAbortController.signal);if(_!=null&&_.success){const A=this.toBotMessage(_);if(A){const C=this.state.get().messages;if(!!C.some(j=>j.id===A.id)){this.state.setPartial({lastAIResMightSolveUserIssue:((p=_.autopilotResponse)==null?void 0:p.mightSolveUserIssue)||((g=_.uiResponse)==null?void 0:g.mightSolveUserIssue)});return}this.state.setPartial({messages:[...C,A],lastAIResMightSolveUserIssue:((v=_.autopilotResponse)==null?void 0:v.mightSolveUserIssue)||((w=_.uiResponse)==null?void 0:w.mightSolveUserIssue)})}}else{const A=this.toBotErrorMessage(((m=_==null?void 0:_.error)==null?void 0:m.message)||"Unknown error occurred"),C=this.state.get().messages;this.state.setPartial({messages:[...C,A]})}}catch(y){this.sendMessageAbortController.signal.aborted||console.error("Failed to send message:",y)}finally{this.state.setPartial({isSendingMessage:!1})}},this.toUserMessage=(i,s)=>{const o=(()=>{const u=this.contactCtx.state.get().extraCollectedData;return this.state.get().messages.length===0&&u&&Object.keys(u).length>0?`${Object.entries(u).filter(([c,d])=>!!d).map(([c,d])=>`${c}: ${d}`).join(`
166
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function PA(e,t){if(e){if(typeof e=="string")return kb(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return kb(e,t)}}function kb(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function HB(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r=[],a=!0,i=!1,s,o;try{for(n=n.call(e);!(a=(s=n.next()).done)&&(r.push(s.value),!(t&&r.length===t));a=!0);}catch(u){i=!0,o=u}finally{try{!a&&n.return!=null&&n.return()}finally{if(i)throw o}}return r}}function zB(e){if(Array.isArray(e))return e}function BA(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function bt(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?BA(Object(n),!0).forEach(function(r){Rb(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):BA(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Rb(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Jf(e,t){if(e==null)return{};var n=VB(e,t),r,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)r=i[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function VB(e,t){if(e==null)return{};var n={},r=Object.keys(e),a,i;for(i=0;i<r.length;i++)a=r[i],!(t.indexOf(a)>=0)&&(n[a]=e[a]);return n}var Ob=b.forwardRef(function(e,t){var n=e.children,r=Jf(e,DB),a=FA(r),i=a.open,s=Jf(a,MB);return b.useImperativeHandle(t,function(){return{open:i}},[i]),hn.createElement(b.Fragment,null,n(bt(bt({},s),{},{open:i})))});Ob.displayName="Dropzone";var UA={disabled:!1,getFilesFromEvent:tB,maxSize:1/0,minSize:0,multiple:!0,maxFiles:0,preventDropOnDocument:!0,noClick:!1,noKeyboard:!1,noDrag:!1,noDragEventsBubbling:!1,validator:null,useFsAccessApi:!1,autoFocus:!1};Ob.defaultProps=UA,Ob.propTypes={children:Je.func,accept:Je.objectOf(Je.arrayOf(Je.string)),multiple:Je.bool,preventDropOnDocument:Je.bool,noClick:Je.bool,noKeyboard:Je.bool,noDrag:Je.bool,noDragEventsBubbling:Je.bool,minSize:Je.number,maxSize:Je.number,maxFiles:Je.number,disabled:Je.bool,getFilesFromEvent:Je.func,onFileDialogCancel:Je.func,onFileDialogOpen:Je.func,useFsAccessApi:Je.bool,autoFocus:Je.bool,onDragEnter:Je.func,onDragLeave:Je.func,onDragOver:Je.func,onDrop:Je.func,onDropAccepted:Je.func,onDropRejected:Je.func,onError:Je.func,validator:Je.func};var Nb={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function FA(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=bt(bt({},UA),e),n=t.accept,r=t.disabled,a=t.getFilesFromEvent,i=t.maxSize,s=t.minSize,o=t.multiple,u=t.maxFiles,l=t.onDragEnter,c=t.onDragLeave,d=t.onDragOver,f=t.onDrop,p=t.onDropAccepted,g=t.onDropRejected,v=t.onFileDialogCancel,w=t.onFileDialogOpen,m=t.useFsAccessApi,y=t.autoFocus,x=t.preventDropOnDocument,T=t.noClick,_=t.noKeyboard,A=t.noDrag,C=t.noDragEventsBubbling,M=t.onError,j=t.validator,N=b.useMemo(function(){return RB(n)},[n]),Y=b.useMemo(function(){return kB(n)},[n]),H=b.useMemo(function(){return typeof w=="function"?w:jA},[w]),ee=b.useMemo(function(){return typeof v=="function"?v:jA},[v]),$=b.useRef(null),ne=b.useRef(null),U=b.useReducer(YB,Nb),q=Cb(U,2),z=q[0],V=q[1],R=z.isFocused,ue=z.isFileDialogActive,Ae=b.useRef(typeof window<"u"&&window.isSecureContext&&m&&CB()),L=function(){!Ae.current&&ue&&setTimeout(function(){if(ne.current){var oe=ne.current.files;oe.length||(V({type:"closeDialog"}),ee())}},300)};b.useEffect(function(){return window.addEventListener("focus",L,!1),function(){window.removeEventListener("focus",L,!1)}},[ne,ue,ee,Ae]);var De=b.useRef([]),de=function(oe){$.current&&$.current.contains(oe.target)||(oe.preventDefault(),De.current=[])};b.useEffect(function(){return x&&(document.addEventListener("dragover",MA,!1),document.addEventListener("drop",de,!1)),function(){x&&(document.removeEventListener("dragover",MA),document.removeEventListener("drop",de))}},[$,x]),b.useEffect(function(){return!r&&y&&$.current&&$.current.focus(),function(){}},[$,y,r]);var Ce=b.useCallback(function(te){M?M(te):console.error(te)},[M]),at=b.useCallback(function(te){te.preventDefault(),te.persist(),jt(te),De.current=[].concat(PB(De.current),[te.target]),Zf(te)&&Promise.resolve(a(te)).then(function(oe){if(!(Qf(te)&&!C)){var B=oe.length,W=B>0&&TB({files:oe,accept:N,minSize:s,maxSize:i,multiple:o,maxFiles:u,validator:j}),se=B>0&&!W;V({isDragAccept:W,isDragReject:se,isDragActive:!0,type:"setDraggedFiles"}),l&&l(te)}}).catch(function(oe){return Ce(oe)})},[a,l,Ce,C,N,s,i,o,u,j]),Ye=b.useCallback(function(te){te.preventDefault(),te.persist(),jt(te);var oe=Zf(te);if(oe&&te.dataTransfer)try{te.dataTransfer.dropEffect="copy"}catch{}return oe&&d&&d(te),!1},[d,C]),qe=b.useCallback(function(te){te.preventDefault(),te.persist(),jt(te);var oe=De.current.filter(function(W){return $.current&&$.current.contains(W)}),B=oe.indexOf(te.target);B!==-1&&oe.splice(B,1),De.current=oe,!(oe.length>0)&&(V({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),Zf(te)&&c&&c(te))},[$,c,C]),$e=b.useCallback(function(te,oe){var B=[],W=[];te.forEach(function(se){var ye=NA(se,N),be=Cb(ye,2),Xt=be[0],Nn=be[1],En=DA(se,s,i),Wn=Cb(En,2),Dn=Wn[0],Lt=Wn[1],Kn=j?j(se):null;if(Xt&&Dn&&!Kn)B.push(se);else{var wn=[Nn,Lt];Kn&&(wn=wn.concat(Kn)),W.push({file:se,errors:wn.filter(function(Fa){return Fa})})}}),(!o&&B.length>1||o&&u>=1&&B.length>u)&&(B.forEach(function(se){W.push({file:se,errors:[wB]})}),B.splice(0)),V({acceptedFiles:B,fileRejections:W,isDragReject:W.length>0,type:"setFiles"}),f&&f(B,W,oe),W.length>0&&g&&g(W,oe),B.length>0&&p&&p(B,oe)},[V,o,N,s,i,u,f,p,g,j]),Rt=b.useCallback(function(te){te.preventDefault(),te.persist(),jt(te),De.current=[],Zf(te)&&Promise.resolve(a(te)).then(function(oe){Qf(te)&&!C||$e(oe,te)}).catch(function(oe){return Ce(oe)}),V({type:"reset"})},[a,$e,Ce,C]),ve=b.useCallback(function(){if(Ae.current){V({type:"openDialog"}),H();var te={multiple:o,types:Y};window.showOpenFilePicker(te).then(function(oe){return a(oe)}).then(function(oe){$e(oe,null),V({type:"closeDialog"})}).catch(function(oe){OB(oe)?(ee(oe),V({type:"closeDialog"})):NB(oe)?(Ae.current=!1,ne.current?(ne.current.value=null,ne.current.click()):Ce(new Error("Cannot open the file picker because the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API is not supported and no <input> was provided."))):Ce(oe)});return}ne.current&&(V({type:"openDialog"}),H(),ne.current.value=null,ne.current.click())},[V,H,ee,m,$e,Ce,Y,o]),ge=b.useCallback(function(te){!$.current||!$.current.isEqualNode(te.target)||(te.key===" "||te.key==="Enter"||te.keyCode===32||te.keyCode===13)&&(te.preventDefault(),ve())},[$,ve]),Ge=b.useCallback(function(){V({type:"focus"})},[]),He=b.useCallback(function(){V({type:"blur"})},[]),wt=b.useCallback(function(){T||(AB()?setTimeout(ve,0):ve())},[T,ve]),Tt=function(oe){return r?null:oe},Xe=function(oe){return _?null:Tt(oe)},Be=function(oe){return A?null:Tt(oe)},jt=function(oe){C&&oe.stopPropagation()},Vi=b.useMemo(function(){return function(){var te=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},oe=te.refKey,B=oe===void 0?"ref":oe,W=te.role,se=te.onKeyDown,ye=te.onFocus,be=te.onBlur,Xt=te.onClick,Nn=te.onDragEnter,En=te.onDragOver,Wn=te.onDragLeave,Dn=te.onDrop,Lt=Jf(te,LB);return bt(bt(Rb({onKeyDown:Xe(qr(se,ge)),onFocus:Xe(qr(ye,Ge)),onBlur:Xe(qr(be,He)),onClick:Tt(qr(Xt,wt)),onDragEnter:Be(qr(Nn,at)),onDragOver:Be(qr(En,Ye)),onDragLeave:Be(qr(Wn,qe)),onDrop:Be(qr(Dn,Rt)),role:typeof W=="string"&&W!==""?W:"presentation"},B,$),!r&&!_?{tabIndex:0}:{}),Lt)}},[$,ge,Ge,He,wt,at,Ye,qe,Rt,_,A,r]),Yi=b.useCallback(function(te){te.stopPropagation()},[]),qi=b.useMemo(function(){return function(){var te=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},oe=te.refKey,B=oe===void 0?"ref":oe,W=te.onChange,se=te.onClick,ye=Jf(te,IB),be=Rb({accept:N,multiple:o,type:"file",style:{border:0,clip:"rect(0, 0, 0, 0)",clipPath:"inset(50%)",height:"1px",margin:"0 -1px -1px 0",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap"},onChange:Tt(qr(W,Rt)),onClick:Tt(qr(se,Yi)),tabIndex:-1},B,ne);return bt(bt({},be),ye)}},[ne,n,o,Rt,r]);return bt(bt({},z),{},{isFocused:R&&!r,getRootProps:Vi,getInputProps:qi,rootRef:$,inputRef:ne,open:Tt(ve)})}function YB(e,t){switch(t.type){case"focus":return bt(bt({},e),{},{isFocused:!0});case"blur":return bt(bt({},e),{},{isFocused:!1});case"openDialog":return bt(bt({},Nb),{},{isFileDialogActive:!0});case"closeDialog":return bt(bt({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return bt(bt({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return bt(bt({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections,isDragReject:t.isDragReject});case"reset":return bt({},Nb);default:return e}}function jA(){}class qB{constructor(t){this.components=[];const{components:n}=t;if(n&&n.forEach(r=>this.register(r)),this.components.length===0)throw new Error("No components registered");if(!this.get("fallback"))throw new Error("No fallback component registered")}register(t){const n=this.components.findIndex(r=>r.key===t.key);return n!==-1?this.components[n]=t:this.components.push(t),this}get(t){const n=this.components.find(r=>r.key.toUpperCase()===t.toUpperCase());return n||null}getComponent(t){var n;return(n=this.get(t))==null?void 0:n.component}}function GB(e){const t=b.createContext({});return[()=>{const r=b.useContext(t);if(r===void 0)throw new Error("useSafeContext must be used within a Provider");return r},t.Provider]}const $B=/\{[^{}]+\}/g,XB=()=>{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 WB(){return Math.random().toString(36).slice(2,11)}function KB(e){let{baseUrl:t="",Request:n=globalThis.Request,fetch:r=globalThis.fetch,querySerializer:a,bodySerializer:i,headers:s,requestInitExt:o=void 0,...u}={...e};o=XB()?o:void 0,t=YA(t);const l=[];async function c(d,f){const{baseUrl:p,fetch:g=r,Request:v=n,headers:w,params:m={},parseAs:y="json",querySerializer:x,bodySerializer:T=i??ZB,body:_,...A}=f||{};p&&(t=YA(p));let C=typeof a=="function"?a:VA(a);x&&(C=typeof x=="function"?x:VA({...typeof a=="object"?a:{},...x}));const M=_===void 0?void 0:T(_),j=M===void 0||M instanceof FormData?{}:{"Content-Type":"application/json"},N={redirect:"follow",...u,...A,body:M,headers:eU(j,s,w,m.header)};let Y,H,ee=new n(JB(d,{baseUrl:t,params:m,querySerializer:C}),N);for(const U in A)U in ee||(ee[U]=A[U]);if(l.length){Y=WB(),H=Object.freeze({baseUrl:t,fetch:g,parseAs:y,querySerializer:C,bodySerializer:T});for(const U of l)if(U&&typeof U=="object"&&typeof U.onRequest=="function"){const q=await U.onRequest({request:ee,schemaPath:d,params:m,options:H,id:Y});if(q){if(!(q instanceof n))throw new Error("onRequest: must return new Request() when modifying the request");ee=q}}}let $;try{$=await g(ee,o)}catch(U){let q=U;if(l.length)for(let z=l.length-1;z>=0;z--){const V=l[z];if(V&&typeof V=="object"&&typeof V.onError=="function"){const R=await V.onError({request:ee,error:q,schemaPath:d,params:m,options:H,id:Y});if(R){if(R instanceof Response){q=void 0,$=R;break}if(R instanceof Error){q=R;continue}throw new Error("onError: must return new Response() or instance of Error")}}}if(q)throw q}if(l.length)for(let U=l.length-1;U>=0;U--){const q=l[U];if(q&&typeof q=="object"&&typeof q.onResponse=="function"){const z=await q.onResponse({request:ee,response:$,schemaPath:d,params:m,options:H,id:Y});if(z){if(!(z instanceof Response))throw new Error("onResponse: must return new Response() when modifying the response");$=z}}}if($.status===204||$.headers.get("Content-Length")==="0")return $.ok?{data:void 0,response:$}:{error:void 0,response:$};if($.ok)return y==="stream"?{data:$.body,response:$}:{data:await $[y](),response:$};let ne=await $.text();try{ne=JSON.parse(ne)}catch{}return{error:ne,response:$}}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 ep(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 HA(e,t,n){if(!t||typeof t!="object")return"";const r=[],a={simple:",",label:".",matrix:";"}[n.style]||"&";if(n.style!=="deepObject"&&n.explode===!1){for(const o in t)r.push(o,n.allowReserved===!0?t[o]:encodeURIComponent(t[o]));const s=r.join(",");switch(n.style){case"form":return`${e}=${s}`;case"label":return`.${s}`;case"matrix":return`;${e}=${s}`;default:return s}}for(const s in t){const o=n.style==="deepObject"?`${e}[${s}]`:s;r.push(ep(o,t[s],n))}const i=r.join(a);return n.style==="label"||n.style==="matrix"?`${a}${i}`:i}function zA(e,t,n){if(!Array.isArray(t))return"";if(n.explode===!1){const i={form:",",spaceDelimited:"%20",pipeDelimited:"|"}[n.style]||",",s=(n.allowReserved===!0?t:t.map(o=>encodeURIComponent(o))).join(i);switch(n.style){case"simple":return s;case"label":return`.${s}`;case"matrix":return`;${e}=${s}`;default:return`${e}=${s}`}}const r={simple:",",label:".",matrix:";"}[n.style]||"&",a=[];for(const i of t)n.style==="simple"||n.style==="label"?a.push(n.allowReserved===!0?i:encodeURIComponent(i)):a.push(ep(e,i,n));return n.style==="label"||n.style==="matrix"?`${r}${a.join(r)}`:a.join(r)}function VA(e){return function(n){const r=[];if(n&&typeof n=="object")for(const a in n){const i=n[a];if(i!=null){if(Array.isArray(i)){if(i.length===0)continue;r.push(zA(a,i,{style:"form",explode:!0,...e==null?void 0:e.array,allowReserved:(e==null?void 0:e.allowReserved)||!1}));continue}if(typeof i=="object"){r.push(HA(a,i,{style:"deepObject",explode:!0,...e==null?void 0:e.object,allowReserved:(e==null?void 0:e.allowReserved)||!1}));continue}r.push(ep(a,i,e))}}return r.join("&")}}function QB(e,t){let n=e;for(const r of e.match($B)??[]){let a=r.substring(1,r.length-1),i=!1,s="simple";if(a.endsWith("*")&&(i=!0,a=a.substring(0,a.length-1)),a.startsWith(".")?(s="label",a=a.substring(1)):a.startsWith(";")&&(s="matrix",a=a.substring(1)),!t||t[a]===void 0||t[a]===null)continue;const o=t[a];if(Array.isArray(o)){n=n.replace(r,zA(a,o,{style:s,explode:i}));continue}if(typeof o=="object"){n=n.replace(r,HA(a,o,{style:s,explode:i}));continue}if(s==="matrix"){n=n.replace(r,`;${ep(a,o)}`);continue}n=n.replace(r,s==="label"?`.${encodeURIComponent(o)}`:encodeURIComponent(o))}return n}function ZB(e){return e instanceof FormData?e:JSON.stringify(e)}function JB(e,t){var a;let n=`${t.baseUrl}${e}`;(a=t.params)!=null&&a.path&&(n=QB(n,t.params.path));let r=t.querySerializer(t.params.query??{});return r.startsWith("?")&&(r=r.substring(1)),r&&(n+=`?${r}`),n}function eU(...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[a,i]of r)if(i===null)t.delete(a);else if(Array.isArray(i))for(const s of i)t.append(a,s);else i!==void 0&&t.set(a,i)}return t}function YA(e){return e.endsWith("/")?e.substring(0,e.length-1):e}const tU=e=>{console.log(e.error)},nU=e=>{const t=KB({baseUrl:e.baseUrl}),n={onRequest:e.onRequest,onResponse:e.onResponse,onError:e.onError||tU};return t.use(n),t};class qA{constructor({config:t}){var a,i;this.userToken=null,this.constructClientOptions=s=>{const o=this.config.apiUrl||"https://api.open.cx",u={"X-Bot-Token":this.config.token,"Content-Type":"application/json",Accept:"application/json",Authorization:s?`Bearer ${s}`:void 0};return{baseUrl:o,headers:u}},this.createOpenAPIClient=({baseUrl:s,headers:o})=>nU({baseUrl:s,onRequest:({request:u})=>{Object.entries(o).forEach(([l,c])=>{c&&u.headers.set(l,c)})}}),this.setAuthToken=s=>{this.userToken=s;const{baseUrl:o,headers:u}=this.constructClientOptions(s);this.client=this.createOpenAPIClient({baseUrl:o,headers:u})},this.getExternalWidgetConfig=async()=>await this.client.GET("/backend/widget/v2/config",{params:{header:{"X-Bot-Token":this.config.token}}}),this.widgetPrelude=async()=>await this.client.GET("/backend/widget/v2/prelude",{params:{header:{"X-Bot-Token":this.config.token}}}),this.sendMessage=async(s,o)=>await this.client.POST("/backend/widget/v2/chat/send",{body:s,signal:o}),this.createUnverifiedContact=async s=>await this.client.POST("/backend/widget/v2/contact/create-unverified",{params:{header:{"x-bot-token":this.config.token}},body:s}),this.createSession=async s=>await this.client.POST("/backend/widget/v2/create-session",{body:s}),this.pollSessionAndHistory=async({sessionId:s,lastMessageTimestamp:o,abortSignal:u})=>{const l=o?{lastMessageTimestamp:o}:void 0;return await this.client.GET("/backend/widget/v2/poll/{sessionId}",{params:{path:{sessionId:s},query:l},signal:u})},this.getSessions=async({cursor:s,filters:o,abortSignal:u})=>await this.client.GET("/backend/widget/v2/sessions",{params:{query:{cursor:s,filters:JSON.stringify(o)}},signal:u}),this.uploadFile=async({file:s,abortSignal:o,onProgress:u})=>new Promise((l,c)=>{var m;const d=new FormData;d.append("file",s);const f=new XMLHttpRequest;if(o&&(o.addEventListener("abort",()=>{f.abort(),c(new DOMException("Aborted","AbortError"))}),o.aborted)){c(new DOMException("Aborted","AbortError"));return}f.upload.addEventListener("progress",y=>{if(y.lengthComputable&&u){const x=Math.round(y.loaded/y.total*100);u(x)}}),f.addEventListener("load",()=>{if(f.status>=200&&f.status<300)try{const y=JSON.parse(f.responseText);l(y)}catch(y){c(new Error(`Failed to parse response: ${y}`))}else c(new Error(`Upload failed with status: ${f.status}`))}),f.addEventListener("error",()=>{c(new Error("Network error occurred"))}),f.addEventListener("timeout",()=>{c(new Error("Upload timed out"))});const{baseUrl:p}=this.constructClientOptions(this.userToken),v=`${p}/backend/widget/v2/upload`;f.open("POST",v),f.setRequestHeader("X-Bot-Token",this.config.token),this.userToken??((m=this.config.user)==null?void 0:m.token)?f.setRequestHeader("Authorization",`Bearer ${this.userToken}`):console.error("User token not set"),f.send(d)}),this.vote=async s=>await this.client.POST("/backend/widget/v2/chat/vote",{body:s}),this.config=t,this.userToken=((a=t.user)==null?void 0:a.token)||null;const{baseUrl:n,headers:r}=this.constructClientOptions((i=t.user)==null?void 0:i.token);this.client=this.createOpenAPIClient({baseUrl:n,headers:r})}}var tp={exports:{}};tp.exports,function(e,t){var n=200,r="__lodash_hash_undefined__",a=1,i=2,s=9007199254740991,o="[object Arguments]",u="[object Array]",l="[object AsyncFunction]",c="[object Boolean]",d="[object Date]",f="[object Error]",p="[object Function]",g="[object GeneratorFunction]",v="[object Map]",w="[object Number]",m="[object Null]",y="[object Object]",x="[object Promise]",T="[object Proxy]",_="[object RegExp]",A="[object Set]",C="[object String]",M="[object Symbol]",j="[object Undefined]",N="[object WeakMap]",Y="[object ArrayBuffer]",H="[object DataView]",ee="[object Float32Array]",$="[object Float64Array]",ne="[object Int8Array]",U="[object Int16Array]",q="[object Int32Array]",z="[object Uint8Array]",V="[object Uint8ClampedArray]",R="[object Uint16Array]",ue="[object Uint32Array]",Ae=/[\\^$.*+?()[\]{}|]/g,L=/^\[object .+?Constructor\]$/,De=/^(?:0|[1-9]\d*)$/,de={};de[ee]=de[$]=de[ne]=de[U]=de[q]=de[z]=de[V]=de[R]=de[ue]=!0,de[o]=de[u]=de[Y]=de[c]=de[H]=de[d]=de[f]=de[p]=de[v]=de[w]=de[y]=de[_]=de[A]=de[C]=de[N]=!1;var Ce=typeof Vs=="object"&&Vs&&Vs.Object===Object&&Vs,at=typeof self=="object"&&self&&self.Object===Object&&self,Ye=Ce||at||Function("return this")(),qe=t&&!t.nodeType&&t,$e=qe&&!0&&e&&!e.nodeType&&e,Rt=$e&&$e.exports===qe,ve=Rt&&Ce.process,ge=function(){try{return ve&&ve.binding&&ve.binding("util")}catch{}}(),Ge=ge&&ge.isTypedArray;function He(k,I){for(var X=-1,ie=k==null?0:k.length,ut=0,ke=[];++X<ie;){var _t=k[X];I(_t,X,k)&&(ke[ut++]=_t)}return ke}function wt(k,I){for(var X=-1,ie=I.length,ut=k.length;++X<ie;)k[ut+X]=I[X];return k}function Tt(k,I){for(var X=-1,ie=k==null?0:k.length;++X<ie;)if(I(k[X],X,k))return!0;return!1}function Xe(k,I){for(var X=-1,ie=Array(k);++X<k;)ie[X]=I(X);return ie}function Be(k){return function(I){return k(I)}}function jt(k,I){return k.has(I)}function Vi(k,I){return k==null?void 0:k[I]}function Yi(k){var I=-1,X=Array(k.size);return k.forEach(function(ie,ut){X[++I]=[ut,ie]}),X}function qi(k,I){return function(X){return k(I(X))}}function te(k){var I=-1,X=Array(k.size);return k.forEach(function(ie){X[++I]=ie}),X}var oe=Array.prototype,B=Function.prototype,W=Object.prototype,se=Ye["__core-js_shared__"],ye=B.toString,be=W.hasOwnProperty,Xt=function(){var k=/[^.]+$/.exec(se&&se.keys&&se.keys.IE_PROTO||"");return k?"Symbol(src)_1."+k:""}(),Nn=W.toString,En=RegExp("^"+ye.call(be).replace(Ae,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Wn=Rt?Ye.Buffer:void 0,Dn=Ye.Symbol,Lt=Ye.Uint8Array,Kn=W.propertyIsEnumerable,wn=oe.splice,Fa=Dn?Dn.toStringTag:void 0,V6=Object.getOwnPropertySymbols,Tne=Wn?Wn.isBuffer:void 0,_ne=qi(Object.keys,Object),my=Ou(Ye,"DataView"),Jc=Ou(Ye,"Map"),gy=Ou(Ye,"Promise"),by=Ou(Ye,"Set"),vy=Ou(Ye,"WeakMap"),ed=Ou(Object,"create"),Sne=Hs(my),Ane=Hs(Jc),Cne=Hs(gy),kne=Hs(by),Rne=Hs(vy),Y6=Dn?Dn.prototype:void 0,yy=Y6?Y6.valueOf:void 0;function Fs(k){var I=-1,X=k==null?0:k.length;for(this.clear();++I<X;){var ie=k[I];this.set(ie[0],ie[1])}}function One(){this.__data__=ed?ed(null):{},this.size=0}function Nne(k){var I=this.has(k)&&delete this.__data__[k];return this.size-=I?1:0,I}function Dne(k){var I=this.__data__;if(ed){var X=I[k];return X===r?void 0:X}return be.call(I,k)?I[k]:void 0}function Mne(k){var I=this.__data__;return ed?I[k]!==void 0:be.call(I,k)}function Lne(k,I){var X=this.__data__;return this.size+=this.has(k)?0:1,X[k]=ed&&I===void 0?r:I,this}Fs.prototype.clear=One,Fs.prototype.delete=Nne,Fs.prototype.get=Dne,Fs.prototype.has=Mne,Fs.prototype.set=Lne;function ja(k){var I=-1,X=k==null?0:k.length;for(this.clear();++I<X;){var ie=k[I];this.set(ie[0],ie[1])}}function Ine(){this.__data__=[],this.size=0}function Pne(k){var I=this.__data__,X=Dh(I,k);if(X<0)return!1;var ie=I.length-1;return X==ie?I.pop():wn.call(I,X,1),--this.size,!0}function Bne(k){var I=this.__data__,X=Dh(I,k);return X<0?void 0:I[X][1]}function Une(k){return Dh(this.__data__,k)>-1}function Fne(k,I){var X=this.__data__,ie=Dh(X,k);return ie<0?(++this.size,X.push([k,I])):X[ie][1]=I,this}ja.prototype.clear=Ine,ja.prototype.delete=Pne,ja.prototype.get=Bne,ja.prototype.has=Une,ja.prototype.set=Fne;function js(k){var I=-1,X=k==null?0:k.length;for(this.clear();++I<X;){var ie=k[I];this.set(ie[0],ie[1])}}function jne(){this.size=0,this.__data__={hash:new Fs,map:new(Jc||ja),string:new Fs}}function Hne(k){var I=Mh(this,k).delete(k);return this.size-=I?1:0,I}function zne(k){return Mh(this,k).get(k)}function Vne(k){return Mh(this,k).has(k)}function Yne(k,I){var X=Mh(this,k),ie=X.size;return X.set(k,I),this.size+=X.size==ie?0:1,this}js.prototype.clear=jne,js.prototype.delete=Hne,js.prototype.get=zne,js.prototype.has=Vne,js.prototype.set=Yne;function Nh(k){var I=-1,X=k==null?0:k.length;for(this.__data__=new js;++I<X;)this.add(k[I])}function qne(k){return this.__data__.set(k,r),this}function Gne(k){return this.__data__.has(k)}Nh.prototype.add=Nh.prototype.push=qne,Nh.prototype.has=Gne;function Gi(k){var I=this.__data__=new ja(k);this.size=I.size}function $ne(){this.__data__=new ja,this.size=0}function Xne(k){var I=this.__data__,X=I.delete(k);return this.size=I.size,X}function Wne(k){return this.__data__.get(k)}function Kne(k){return this.__data__.has(k)}function Qne(k,I){var X=this.__data__;if(X instanceof ja){var ie=X.__data__;if(!Jc||ie.length<n-1)return ie.push([k,I]),this.size=++X.size,this;X=this.__data__=new js(ie)}return X.set(k,I),this.size=X.size,this}Gi.prototype.clear=$ne,Gi.prototype.delete=Xne,Gi.prototype.get=Wne,Gi.prototype.has=Kne,Gi.prototype.set=Qne;function Zne(k,I){var X=Lh(k),ie=!X&&pre(k),ut=!X&&!ie&&xy(k),ke=!X&&!ie&&!ut&&J6(k),_t=X||ie||ut||ke,Wt=_t?Xe(k.length,String):[],nn=Wt.length;for(var yt in k)be.call(k,yt)&&!(_t&&(yt=="length"||ut&&(yt=="offset"||yt=="parent")||ke&&(yt=="buffer"||yt=="byteLength"||yt=="byteOffset")||ure(yt,nn)))&&Wt.push(yt);return Wt}function Dh(k,I){for(var X=k.length;X--;)if(W6(k[X][0],I))return X;return-1}function Jne(k,I,X){var ie=I(k);return Lh(k)?ie:wt(ie,X(k))}function td(k){return k==null?k===void 0?j:m:Fa&&Fa in Object(k)?sre(k):fre(k)}function q6(k){return nd(k)&&td(k)==o}function G6(k,I,X,ie,ut){return k===I?!0:k==null||I==null||!nd(k)&&!nd(I)?k!==k&&I!==I:ere(k,I,X,ie,G6,ut)}function ere(k,I,X,ie,ut,ke){var _t=Lh(k),Wt=Lh(I),nn=_t?u:$i(k),yt=Wt?u:$i(I);nn=nn==o?y:nn,yt=yt==o?y:yt;var Qn=nn==y,Lr=yt==y,pn=nn==yt;if(pn&&xy(k)){if(!xy(I))return!1;_t=!0,Qn=!1}if(pn&&!Qn)return ke||(ke=new Gi),_t||J6(k)?$6(k,I,X,ie,ut,ke):are(k,I,nn,X,ie,ut,ke);if(!(X&a)){var yr=Qn&&be.call(k,"__wrapped__"),xr=Lr&&be.call(I,"__wrapped__");if(yr||xr){var Xi=yr?k.value():k,Ha=xr?I.value():I;return ke||(ke=new Gi),ut(Xi,Ha,X,ie,ke)}}return pn?(ke||(ke=new Gi),ire(k,I,X,ie,ut,ke)):!1}function tre(k){if(!Z6(k)||cre(k))return!1;var I=K6(k)?En:L;return I.test(Hs(k))}function nre(k){return nd(k)&&Q6(k.length)&&!!de[td(k)]}function rre(k){if(!dre(k))return _ne(k);var I=[];for(var X in Object(k))be.call(k,X)&&X!="constructor"&&I.push(X);return I}function $6(k,I,X,ie,ut,ke){var _t=X&a,Wt=k.length,nn=I.length;if(Wt!=nn&&!(_t&&nn>Wt))return!1;var yt=ke.get(k);if(yt&&ke.get(I))return yt==I;var Qn=-1,Lr=!0,pn=X&i?new Nh:void 0;for(ke.set(k,I),ke.set(I,k);++Qn<Wt;){var yr=k[Qn],xr=I[Qn];if(ie)var Xi=_t?ie(xr,yr,Qn,I,k,ke):ie(yr,xr,Qn,k,I,ke);if(Xi!==void 0){if(Xi)continue;Lr=!1;break}if(pn){if(!Tt(I,function(Ha,zs){if(!jt(pn,zs)&&(yr===Ha||ut(yr,Ha,X,ie,ke)))return pn.push(zs)})){Lr=!1;break}}else if(!(yr===xr||ut(yr,xr,X,ie,ke))){Lr=!1;break}}return ke.delete(k),ke.delete(I),Lr}function are(k,I,X,ie,ut,ke,_t){switch(X){case H:if(k.byteLength!=I.byteLength||k.byteOffset!=I.byteOffset)return!1;k=k.buffer,I=I.buffer;case Y:return!(k.byteLength!=I.byteLength||!ke(new Lt(k),new Lt(I)));case c:case d:case w:return W6(+k,+I);case f:return k.name==I.name&&k.message==I.message;case _:case C:return k==I+"";case v:var Wt=Yi;case A:var nn=ie&a;if(Wt||(Wt=te),k.size!=I.size&&!nn)return!1;var yt=_t.get(k);if(yt)return yt==I;ie|=i,_t.set(k,I);var Qn=$6(Wt(k),Wt(I),ie,ut,ke,_t);return _t.delete(k),Qn;case M:if(yy)return yy.call(k)==yy.call(I)}return!1}function ire(k,I,X,ie,ut,ke){var _t=X&a,Wt=X6(k),nn=Wt.length,yt=X6(I),Qn=yt.length;if(nn!=Qn&&!_t)return!1;for(var Lr=nn;Lr--;){var pn=Wt[Lr];if(!(_t?pn in I:be.call(I,pn)))return!1}var yr=ke.get(k);if(yr&&ke.get(I))return yr==I;var xr=!0;ke.set(k,I),ke.set(I,k);for(var Xi=_t;++Lr<nn;){pn=Wt[Lr];var Ha=k[pn],zs=I[pn];if(ie)var e4=_t?ie(zs,Ha,pn,I,k,ke):ie(Ha,zs,pn,k,I,ke);if(!(e4===void 0?Ha===zs||ut(Ha,zs,X,ie,ke):e4)){xr=!1;break}Xi||(Xi=pn=="constructor")}if(xr&&!Xi){var Ih=k.constructor,Ph=I.constructor;Ih!=Ph&&"constructor"in k&&"constructor"in I&&!(typeof Ih=="function"&&Ih instanceof Ih&&typeof Ph=="function"&&Ph instanceof Ph)&&(xr=!1)}return ke.delete(k),ke.delete(I),xr}function X6(k){return Jne(k,gre,ore)}function Mh(k,I){var X=k.__data__;return lre(I)?X[typeof I=="string"?"string":"hash"]:X.map}function Ou(k,I){var X=Vi(k,I);return tre(X)?X:void 0}function sre(k){var I=be.call(k,Fa),X=k[Fa];try{k[Fa]=void 0;var ie=!0}catch{}var ut=Nn.call(k);return ie&&(I?k[Fa]=X:delete k[Fa]),ut}var ore=V6?function(k){return k==null?[]:(k=Object(k),He(V6(k),function(I){return Kn.call(k,I)}))}:bre,$i=td;(my&&$i(new my(new ArrayBuffer(1)))!=H||Jc&&$i(new Jc)!=v||gy&&$i(gy.resolve())!=x||by&&$i(new by)!=A||vy&&$i(new vy)!=N)&&($i=function(k){var I=td(k),X=I==y?k.constructor:void 0,ie=X?Hs(X):"";if(ie)switch(ie){case Sne:return H;case Ane:return v;case Cne:return x;case kne:return A;case Rne:return N}return I});function ure(k,I){return I=I??s,!!I&&(typeof k=="number"||De.test(k))&&k>-1&&k%1==0&&k<I}function lre(k){var I=typeof k;return I=="string"||I=="number"||I=="symbol"||I=="boolean"?k!=="__proto__":k===null}function cre(k){return!!Xt&&Xt in k}function dre(k){var I=k&&k.constructor,X=typeof I=="function"&&I.prototype||W;return k===X}function fre(k){return Nn.call(k)}function Hs(k){if(k!=null){try{return ye.call(k)}catch{}try{return k+""}catch{}}return""}function W6(k,I){return k===I||k!==k&&I!==I}var pre=q6(function(){return arguments}())?q6:function(k){return nd(k)&&be.call(k,"callee")&&!Kn.call(k,"callee")},Lh=Array.isArray;function hre(k){return k!=null&&Q6(k.length)&&!K6(k)}var xy=Tne||vre;function mre(k,I){return G6(k,I)}function K6(k){if(!Z6(k))return!1;var I=td(k);return I==p||I==g||I==l||I==T}function Q6(k){return typeof k=="number"&&k>-1&&k%1==0&&k<=s}function Z6(k){var I=typeof k;return k!=null&&(I=="object"||I=="function")}function nd(k){return k!=null&&typeof k=="object"}var J6=Ge?Be(Ge):nre;function gre(k){return hre(k)?Zne(k):rre(k)}function bre(){return[]}function vre(){return!1}e.exports=mre}(tp,tp.exports);var rU=tp.exports;const aU=rd(rU);class Go{constructor(t){this.subscribers=new Set,this.get=()=>this.state,this.set=n=>{aU(this.state,n)||(this.state=n,this.notifySubscribers(n))},this.setPartial=n=>{if(n==null)return;const r={...this.state,...n};this.set(r)},this.reset=()=>{this.set(this.initialState)},this.notifySubscribers=n=>{Array.from(this.subscribers).forEach(a=>{try{a(n)}catch(i){console.error(i)}})},this.subscribe=n=>(this.subscribers.add(n),()=>{this.subscribers.delete(n)}),this.state=t,this.initialState=t}}class GA{constructor(){this.state=new Go({isPolling:!1,isError:!1}),this.abortController=new AbortController,this.reset=()=>{var t;this.abortController.abort("Resetting poller"),(t=this.stopPolling)==null||t.call(this),this.stopPolling=null},this.stopPolling=null,this.startPolling=(t,n)=>{if(this.stopPolling)return;const r=[],a=async()=>{this.abortController=new AbortController,this.state.setPartial({isPolling:!0});try{await t(this.abortController.signal)}catch(i){if(this.abortController.signal.aborted)return;console.error("Failed to poll:",i),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(a,n))};a(),this.stopPolling=()=>{r.forEach(clearTimeout),this.state.reset()}}}}function iU(e){try{const t=e();return t instanceof Promise?t.then(n=>({data:n})).catch(n=>({error:n})):{data:t}}catch(t){return{error:t}}}class sU{constructor({api:t,config:n,sessionCtx:r,messageCtx:a,sessionPollingIntervalSeconds:i}){this.poller=new GA,this.registerPolling=()=>{this.sessionCtx.sessionState.subscribe(({session:s})=>{s!=null&&s.id?this.poller.startPolling(async o=>{this.hackAndSlash(s.id,o)},this.sessionPollingIntervalSeconds*1e3):this.poller.reset()})},this.hackAndSlash=async(s,o)=>{var d;this.messageCtx.state.get().messages.length===0&&this.messageCtx.state.setPartial({isInitialFetchLoading:!0});const u=this.messageCtx.state.get().messages,l=u.length>0?(d=u[u.length-1])==null?void 0:d.timestamp:void 0,{data:c}=await this.api.pollSessionAndHistory({sessionId:s,abortSignal:o,lastMessageTimestamp:l});if(c!=null&&c.session&&(this.sessionCtx.sessionState.setPartial({session:c.session}),this.sessionCtx.setSessions([c.session])),c!=null&&c.history&&c.history.length>0){const f=this.messageCtx.state.get().messages,p=c.history.map(this.mapHistoryToMessage).filter(g=>!f.some(v=>v.id===g.id));this.messageCtx.state.setPartial({messages:[...f,...p]})}this.messageCtx.state.get().isInitialFetchLoading&&this.messageCtx.state.setPartial({isInitialFetchLoading:!1})},this.mapHistoryToMessage=s=>{var l,c;const o={id:s.publicId,timestamp:s.sentAt||"",attachments:s.attachments||void 0};if(s.sender.kind==="user")return{...o,type:"FROM_USER",content:s.content.text||"",deliveredAt:s.sentAt||""};if(s.sender.kind==="agent")return{...o,type:"FROM_AGENT",component:"agent_message",data:{message:s.content.text||""},agent:{name:s.sender.name||"",avatar:s.sender.avatar||"",id:null,isAi:!1}};const u=s.actionCalls&&s.actionCalls.length>0?s.actionCalls[s.actionCalls.length-1]:void 0;return{...o,type:"FROM_BOT",component:"bot_message",agent:{id:null,name:((l=this.config.bot)==null?void 0:l.name)||"",isAi:!0,avatar:((c=this.config.bot)==null?void 0:c.avatar)||""},data:{message:s.content.text||"",action:u?{name:u.actionName,data:this.extractActionResult(u)}:void 0}}},this.extractActionResult=s=>{const o=s.result;if(o===null||typeof o!="object")return o;if("responseBodyText"in o&&typeof o.responseBodyText=="string"){const u=o.responseBodyText,l=iU(()=>JSON.parse(u)).data;if(l)return l}return s.result},this.api=t,this.config=n,this.sessionCtx=r,this.messageCtx=a,this.sessionPollingIntervalSeconds=i,this.registerPolling()}}const tn=[];for(let e=0;e<256;++e)tn.push((e+256).toString(16).slice(1));function oU(e,t=0){return(tn[e[t+0]]+tn[e[t+1]]+tn[e[t+2]]+tn[e[t+3]]+"-"+tn[e[t+4]]+tn[e[t+5]]+"-"+tn[e[t+6]]+tn[e[t+7]]+"-"+tn[e[t+8]]+tn[e[t+9]]+"-"+tn[e[t+10]]+tn[e[t+11]]+tn[e[t+12]]+tn[e[t+13]]+tn[e[t+14]]+tn[e[t+15]]).toLowerCase()}let Db;const uU=new Uint8Array(16);function lU(){if(!Db){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");Db=crypto.getRandomValues.bind(crypto)}return Db(uU)}const $A={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function Mb(e,t,n){var a;if($A.randomUUID&&!t&&!e)return $A.randomUUID();e=e||{};const r=e.random??((a=e.rng)==null?void 0:a.call(e))??lU();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,oU(r)}class cU{constructor({config:t,api:n,storageCtx:r}){var a;this.shouldCollectData=()=>{var i;return!!(!((i=this.state.get().contact)!=null&&i.token)&&this.config.collectUserData)},this.autoCreateUnverifiedUserIfNotExists=async()=>{var i,s,o,u,l,c,d,f,p,g,v,w,m,y;if(!((i=this.config.user)!=null&&i.token)){if(this.config.collectUserData&&!((o=(s=this.config.user)==null?void 0:s.data)!=null&&o.email)){if((u=this.config.extraDataCollectionFields)!=null&&u.length)return;const x=await((l=this.storageCtx)==null?void 0:l.getContactToken());x&&await this.setUnverifiedContact(x);return}if(!((d=(c=this.config.user)==null?void 0:c.data)!=null&&d.email)){const x=await((f=this.storageCtx)==null?void 0:f.getContactToken());if(x){await this.setUnverifiedContact(x);return}}await this.createUnverifiedContact({email:(g=(p=this.config.user)==null?void 0:p.data)==null?void 0:g.email,non_verified_name:((w=(v=this.config.user)==null?void 0:v.data)==null?void 0:w.name)||"Anonymous",non_verified_custom_data:(y=(m=this.config.user)==null?void 0:m.data)==null?void 0:y.customData})}},this.createUnverifiedContact=async(i,s)=>{this.state.setPartial({extraCollectedData:s});try{this.state.setPartial({isCreatingUnverifiedContact:!0,isErrorCreatingUnverifiedContact:!1});const{data:o}=await this.api.createUnverifiedContact(i);o!=null&&o.token?await this.setUnverifiedContact(o.token):this.state.setPartial({isErrorCreatingUnverifiedContact:!0})}finally{this.state.setPartial({isCreatingUnverifiedContact:!1})}},this.setUnverifiedContact=async i=>{var u,l,c,d;const s=await((u=this.storageCtx)==null?void 0:u.getExternalContactId()),o=((l=this.config.user)==null?void 0:l.externalId)||s||Mb();this.api.setAuthToken(i),await((c=this.storageCtx)==null?void 0:c.setContactToken(i)),await((d=this.storageCtx)==null?void 0:d.setExternalContactId(o)),this.state.setPartial({contact:{token:i,externalId:o}})},this.config=t,this.storageCtx=r,this.api=n,this.state=new Go({contact:(a=t.user)!=null&&a.token?{token:t.user.token,externalId:t.user.externalId}:null,extraCollectedData:void 0,isCreatingUnverifiedContact:!1,isErrorCreatingUnverifiedContact:!1}),this.autoCreateUnverifiedUserIfNotExists()}}function Lb(){return Mb()}class dU{constructor({api:t,contactCtx:n,sessionsPollingIntervalSeconds:r}){this.sessionsRefresher=new GA,this.sessionState=new Go({session:null,isCreatingSession:!1}),this.sessionsState=new Go({data:[],cursor:void 0,isLastPage:!1,didStartInitialFetch:!1,isInitialFetchLoading:!0}),this.reset=async()=>{this.sessionState.reset()},this.registerSessionsRefresherWrapper=()=>{var a;(a=this.contactCtx.state.get().contact)!=null&&a.token&&!this.sessionsState.get().didStartInitialFetch?this.registerSessionsRefresher():this.contactCtx.state.subscribe(({contact:i})=>{i!=null&&i.token&&!this.sessionsState.get().didStartInitialFetch&&this.registerSessionsRefresher()})},this.registerSessionsRefresher=()=>{this.sessionsRefresher.startPolling(async()=>{this.sessionsState.get().didStartInitialFetch===!1&&this.sessionsState.setPartial({didStartInitialFetch:!0}),await this.refreshSessions(),this.sessionsState.get().isInitialFetchLoading===!0&&this.sessionsState.setPartial({isInitialFetchLoading:!1})},this.sessionsPollingIntervalSeconds*1e3)},this.createSession=async()=>{var o;this.sessionState.setPartial({session:null,isCreatingSession:!0});const a=(o=this.contactCtx.state.get().contact)==null?void 0:o.externalId,{data:i,error:s}=await this.api.createSession({customData:a?{external_id:a}:void 0});return i?(this.sessionState.setPartial({session:i,isCreatingSession:!1}),i):(console.error("Failed to create session:",s),null)},this.loadMoreSessions=async()=>{if(this.sessionsState.get().isLastPage)return;const{data:a}=await this.getSessions({cursor:this.sessionsState.get().cursor});if(a){const s=[...this.sessionsState.get().data,...a.items].filter((o,u,l)=>u===l.findIndex(c=>o.id===c.id));this.sessionsState.setPartial({data:s,cursor:a.next||void 0,isLastPage:a.next===null})}},this.getSessions=async({cursor:a})=>{var s,o;if(!((s=this.contactCtx.state.get().contact)!=null&&s.token))return{data:null};const i=(o=this.contactCtx.state.get().contact)==null?void 0:o.externalId;return await this.api.getSessions({cursor:a,filters:i?{external_id:i}:{}})},this.setSessions=a=>{const i=[...a,...this.sessionsState.get().data].filter((s,o,u)=>o===u.findIndex(l=>s.id===l.id));this.sessionsState.setPartial({data:i})},this.refreshSessions=async()=>{const{data:a}=await this.getSessions({cursor:void 0});a&&this.setSessions(a.items)},this.api=t,this.contactCtx=n,this.sessionsPollingIntervalSeconds=r,this.registerSessionsRefresherWrapper()}}class fU{constructor({config:t,api:n,sessionCtx:r,contactCtx:a}){this.state=new Go({messages:[],isSendingMessage:!1,lastAIResMightSolveUserIssue:!1,isInitialFetchLoading:!1}),this.sendMessageAbortController=new AbortController,this.reset=()=>{this.sendMessageAbortController.abort("Resetting chat"),this.state.reset()},this.sendMessage=async i=>{var c,d,f,p,g,v,w,m;if(!i.content.trim()&&(!i.attachments||i.attachments.length===0)){console.warn("Cannot send an empty message of no content or attachments");return}const s=this.state.get().isSendingMessage,o=((c=this.sessionCtx.sessionState.get().session)==null?void 0:c.assignee.kind)==="ai",u=this.state.get().messages,l=u.length>0?u[u.length-1]:void 0;if(o&&s||o&&(l==null?void 0:l.type)==="FROM_USER"){console.warn("Cannot send messages while awaiting AI response");return}this.sendMessageAbortController=new AbortController,this.state.setPartial({lastAIResMightSolveUserIssue:!1});try{this.state.setPartial({isSendingMessage:!0});const y=this.toUserMessage(i.content.trim(),i.attachments||void 0),x=this.state.get().messages;if(this.state.setPartial({messages:[...x,y]}),!((d=this.sessionCtx.sessionState.get().session)!=null&&d.id)){if(!await this.sessionCtx.createSession()){console.error("Failed to create session");return}this.sessionCtx.refreshSessions()}const T=(f=this.sessionCtx.sessionState.get().session)==null?void 0:f.id;if(!T)return;const{data:_}=await this.api.sendMessage({uuid:y.id,bot_token:this.config.token,headers:this.config.headers,query_params:this.config.queryParams,session_id:T,content:y.content,attachments:i.attachments,clientContext:this.config.context},this.sendMessageAbortController.signal);if(_!=null&&_.success){const A=this.toBotMessage(_);if(A){const C=this.state.get().messages;if(!!C.some(j=>j.id===A.id)){this.state.setPartial({lastAIResMightSolveUserIssue:((p=_.autopilotResponse)==null?void 0:p.mightSolveUserIssue)||((g=_.uiResponse)==null?void 0:g.mightSolveUserIssue)});return}this.state.setPartial({messages:[...C,A],lastAIResMightSolveUserIssue:((v=_.autopilotResponse)==null?void 0:v.mightSolveUserIssue)||((w=_.uiResponse)==null?void 0:w.mightSolveUserIssue)})}}else{const A=this.toBotErrorMessage(((m=_==null?void 0:_.error)==null?void 0:m.message)||"Unknown error occurred"),C=this.state.get().messages;this.state.setPartial({messages:[...C,A]})}}catch(y){this.sendMessageAbortController.signal.aborted||console.error("Failed to send message:",y)}finally{this.state.setPartial({isSendingMessage:!1})}},this.toUserMessage=(i,s)=>{const o=(()=>{const u=this.contactCtx.state.get().extraCollectedData;return this.state.get().messages.length===0&&u&&Object.keys(u).length>0?`${Object.entries(u).filter(([c,d])=>!!d).map(([c,d])=>`${c}: ${d}`).join(`
167
167
  `)}
168
168
 
169
169
  ${i}`:i})();return{id:Lb(),type:"FROM_USER",content:o,deliveredAt:new Date().toISOString(),attachments:s,timestamp:new Date().toISOString()}},this.toBotMessage=i=>{var s;return i.success&&i.autopilotResponse?{type:"FROM_BOT",id:i.autopilotResponse.id||Lb(),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:i.autopilotResponse.value.content,action:(s=i.uiResponse)!=null&&s.value.name?{name:i.uiResponse.value.name,data:i.uiResponse.value.request_response}:void 0}}:null},this.toBotErrorMessage=i=>({type:"FROM_BOT",id:Lb(),timestamp:new Date().toISOString(),component:"TEXT",data:{message:i,variant:"error",action:void 0}}),this.config=t,this.api=n,this.sessionCtx=r,this.contactCtx=a}}class pU{constructor({config:t,contactCtx:n,sessionCtx:r,resetChat:a}){this.registerRoutingListener=()=>{this.contactCtx.state.subscribe(({contact:i})=>{i!=null&&i.token&&this.state.get().screen==="welcome"&&this.state.setPartial({screen:"sessions"})}),this.sessionCtx.sessionsState.subscribe(({isInitialFetchLoading:i,data:s})=>{var o;s.length||((o=this.config.router)==null?void 0:o.goToChatIfNoSessions)!==!1&&!i&&this.state.get().screen!=="chat"&&this.toChatScreen()})},this.toSessionsScreen=()=>{this.resetChat(),this.state.setPartial({screen:"sessions"})},this.toChatScreen=i=>{if(this.resetChat(),i){const s=this.sessionCtx.sessionsState.get().data.find(o=>o.id===i);if(!s)return;this.sessionCtx.sessionState.setPartial({session:s})}this.state.setPartial({screen:"chat"})},this.state=new Go({screen:n.shouldCollectData()?"welcome":"sessions"}),this.config=t,this.contactCtx=n,this.sessionCtx=r,this.resetChat=a,this.registerRoutingListener()}}class hU{constructor({storage:t}){this.KEYS={contactToken:"opencx__widget__contactToken",externalContactId:"opencx__widget__externalContactId"},this.setContactToken=async n=>{await this.storage.set(this.KEYS.contactToken,n)},this.getContactToken=async()=>this.storage.get(this.KEYS.contactToken),this.setExternalContactId=async n=>{await this.storage.set(this.KEYS.externalContactId,n)},this.getExternalContactId=async()=>this.storage.get(this.KEYS.externalContactId),this.storage=t}}const Ua=class Ua{constructor({config:t,storage:n}){if(this.resetChat=()=>{this.sessionCtx.reset(),this.messageCtx.reset()},!Ua.pollingIntervalsSeconds)throw Error("Widget polling values are not defined, did you call WidgetCtx.initialize()");this.config=t,this.api=new qA({config:t}),this.storageCtx=n?new hU({storage:n}):void 0,this.contactCtx=new cU({api:this.api,config:this.config,storageCtx:this.storageCtx}),this.sessionCtx=new dU({api:this.api,contactCtx:this.contactCtx,sessionsPollingIntervalSeconds:Ua.pollingIntervalsSeconds.sessions}),this.messageCtx=new fU({config:this.config,api:this.api,sessionCtx:this.sessionCtx,contactCtx:this.contactCtx}),this.activeSessionPollingCtx=new sU({api:this.api,config:this.config,sessionCtx:this.sessionCtx,messageCtx:this.messageCtx,sessionPollingIntervalSeconds:Ua.pollingIntervalsSeconds.session}),this.routerCtx=new pU({config:this.config,contactCtx:this.contactCtx,sessionCtx:this.sessionCtx,resetChat:this.resetChat})}};Ua.pollingIntervalsSeconds=null,Ua.initialize=async({config:t,storage:n})=>{var a,i;const r=await new qA({config:t}).getExternalWidgetConfig();return Ua.pollingIntervalsSeconds={session:((a=r.data)==null?void 0:a.sessionPollingIntervalSeconds)||10,sessions:((i=r.data)==null?void 0:i.sessionsPollingIntervalSeconds)||60},new Ua({config:t,storage:n})};let Ib=Ua;const[fr,mU]=GB();function gU({options:e,children:t,components:n,storage:r}){const a=b.useRef(!1),[i,s]=b.useState(null),o=b.useMemo(()=>new qB({components:n}),[n]);return b.useEffect(()=>{a.current||(a.current=!0,Ib.initialize({config:e,storage:r}).then(s))},[]),i?E.jsx(mU,{value:{widgetCtx:i,components:n,componentStore:o,version:IT},children:t}):null}function $o(){const{widgetCtx:e}=fr();return e.config}function Zl(e){return b.useSyncExternalStore(e.subscribe,e.get,e.get)}function bU(){const{widgetCtx:e}=fr();return{contactState:Zl(e.contactCtx.state),createUnverifiedContact:e.contactCtx.createUnverifiedContact}}function Xo(){const{widgetCtx:e}=fr();return{messagesState:Zl(e.messageCtx.state),sendMessage:e.messageCtx.sendMessage}}function Jl(){const{widgetCtx:e}=fr(),t=Zl(e.sessionCtx.sessionState),n=Zl(e.sessionCtx.sessionsState);return{sessionState:t,sessionsState:n,loadMoreSessions:e.sessionCtx.loadMoreSessions}}function XA(){var s;const{sessionState:e}=Jl(),{messagesState:t}=Xo(),n=((s=e.session)==null?void 0:s.assignee.kind)==="ai",r=t.messages.length>0?t.messages[t.messages.length-1]:null,a=(r==null?void 0:r.type)==="FROM_USER";return{isAwaitingBotReply:(n||e.isCreatingSession)&&(t.isSendingMessage||a)}}var WA={exports:{}},KA={};/**