@opencx/widget 3.0.93 → 3.0.94

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<=i);break}}}finally{Up=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:"")?Du(n):""}function ZN(e){switch(e.tag){case 26:case 27:case 5:return Du(e.type);case 16:return Du("Lazy");case 13:return Du("Suspense");case 19:return Du("SuspenseList");case 0:case 15:return e=jp(e.type,!1),e;case 11:return e=jp(e.type.render,!1),e;case 1:return e=jp(e.type,!0),e;default:return""}}function Rv(e){try{var t="";do t+=ZN(e),e=e.return;while(e);return t}catch(n){return`
47
47
  Error generating stack: `+n.message+`
48
48
  `+n.stack}}function Xs(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 Nv(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 Dv(e){if(Xs(e)!==e)throw Error(q(188))}function JN(e){var t=e.alternate;if(!t){if(t=Xs(e),t===null)throw Error(q(188));return t!==e?null:e}for(var n=e,r=t;;){var i=n.return;if(i===null)break;var a=i.alternate;if(a===null){if(r=i.return,r!==null){n=r;continue}break}if(i.child===a.child){for(a=i.child;a;){if(a===n)return Dv(i),e;if(a===r)return Dv(i),t;a=a.sibling}throw Error(q(188))}if(n.return!==r.return)n=i,r=a;else{for(var s=!1,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){for(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)throw Error(q(189))}}if(n.alternate!==r)throw Error(q(190))}if(n.tag!==3)throw Error(q(188));return n.stateNode.current===n?e:t}function Mv(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=Mv(e),t!==null)return t;e=e.sibling}return null}var Mu=Array.isArray,st=$N.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Za={pending:!1,data:null,method:null,action:null},Fp=[],Ks=-1;function Nr(e){return{current:e}}function Ft(e){0>Ks||(e.current=Fp[Ks],Fp[Ks]=null,Ks--)}function lt(e,t){Ks++,Fp[Ks]=e.current,e.current=t}var Dr=Nr(null),Lu=Nr(null),Yi=Nr(null),rd=Nr(null);function id(e,t){switch(lt(Yi,t),lt(Lu,e),lt(Dr,null),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)&&(t=t.namespaceURI)?qT(t):0;break;default:if(e=e===8?t.parentNode:t,t=e.tagName,e=e.namespaceURI)e=qT(e),t=GT(e,t);else switch(t){case"svg":t=1;break;case"math":t=2;break;default:t=0}}Ft(Dr),lt(Dr,t)}function Qs(){Ft(Dr),Ft(Lu),Ft(Yi)}function zp(e){e.memoizedState!==null&&lt(rd,e);var t=Dr.current,n=GT(t,e.type);t!==n&&(lt(Lu,e),lt(Dr,n))}function ad(e){Lu.current===e&&(Ft(Dr),Ft(Lu)),rd.current===e&&(Ft(rd),Al._currentValue=Za)}var Hp=Object.prototype.hasOwnProperty,Vp=Lt.unstable_scheduleCallback,Yp=Lt.unstable_cancelCallback,eD=Lt.unstable_shouldYield,tD=Lt.unstable_requestPaint,Mr=Lt.unstable_now,nD=Lt.unstable_getCurrentPriorityLevel,Lv=Lt.unstable_ImmediatePriority,Iv=Lt.unstable_UserBlockingPriority,sd=Lt.unstable_NormalPriority,rD=Lt.unstable_LowPriority,Pv=Lt.unstable_IdlePriority,iD=Lt.log,aD=Lt.unstable_setDisableYieldValue,Iu=null,Dn=null;function sD(e){if(Dn&&typeof Dn.onCommitFiberRoot=="function")try{Dn.onCommitFiberRoot(Iu,e,void 0,(e.current.flags&128)===128)}catch{}}function qi(e){if(typeof iD=="function"&&aD(e),Dn&&typeof Dn.setStrictMode=="function")try{Dn.setStrictMode(Iu,e)}catch{}}var Mn=Math.clz32?Math.clz32:lD,oD=Math.log,uD=Math.LN2;function lD(e){return e>>>=0,e===0?32:31-(oD(e)/uD|0)|0}var od=128,ud=4194304;function Ja(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 ld(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,a=e.pingedLanes,s=e.warmLanes;e=e.finishedLanes!==0;var o=n&134217727;return o!==0?(n=o&~i,n!==0?r=Ja(n):(a&=o,a!==0?r=Ja(a):e||(s=o&~s,s!==0&&(r=Ja(s))))):(o=n&~i,o!==0?r=Ja(o):a!==0?r=Ja(a):e||(s=n&~s,s!==0&&(r=Ja(s)))),r===0?0:t!==0&&t!==r&&!(t&i)&&(i=r&-r,s=t&-t,i>=s||i===32&&(s&4194176)!==0)?t:r}function Pu(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function cD(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 Bv(){var e=od;return od<<=1,!(od&4194176)&&(od=128),e}function Uv(){var e=ud;return ud<<=1,!(ud&62914560)&&(ud=4194304),e}function qp(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Bu(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function dD(e,t,n,r,i,a){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-Mn(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 h=f[c];h!==null&&(h.lane&=-536870913)}n&=~d}r!==0&&jv(e,r,0),a!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=a&~(s&~t))}function jv(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-Mn(t);e.entangledLanes|=t,e.entanglements[r]=e.entanglements[r]|1073741824|n&4194218}function Fv(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Mn(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}function zv(e){return e&=-e,2<e?8<e?e&134217727?32:268435456:8:2}function Hv(){var e=st.p;return e!==0?e:(e=window.event,e===void 0?32:c2(e.type))}function fD(e,t){var n=st.p;try{return st.p=e,t()}finally{st.p=n}}var Gi=Math.random().toString(36).slice(2),nn="__reactFiber$"+Gi,Tn="__reactProps$"+Gi,Zs="__reactContainer$"+Gi,Gp="__reactEvents$"+Gi,hD="__reactListeners$"+Gi,pD="__reactHandles$"+Gi,Vv="__reactResources$"+Gi,Uu="__reactMarker$"+Gi;function $p(e){delete e[nn],delete e[Tn],delete e[Gp],delete e[hD],delete e[pD]}function es(e){var t=e[nn];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Zs]||n[nn]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=XT(e);e!==null;){if(n=e[nn])return n;e=XT(e)}return t}e=n,n=e.parentNode}return null}function Js(e){if(e=e[nn]||e[Zs]){var t=e.tag;if(t===5||t===6||t===13||t===26||t===27||t===3)return e}return null}function ju(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(q(33))}function eo(e){var t=e[Vv];return t||(t=e[Vv]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function zt(e){e[Uu]=!0}var Yv=new Set,qv={};function ts(e,t){to(e,t),to(e+"Capture",t)}function to(e,t){for(qv[e]=t,e=0;e<t.length;e++)Yv.add(t[e])}var ni=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),mD=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]*$"),Gv={},$v={};function gD(e){return Hp.call($v,e)?!0:Hp.call(Gv,e)?!1:mD.test(e)?$v[e]=!0:(Gv[e]=!0,!1)}function cd(e,t,n){if(gD(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 dd(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 ri(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 Kn(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Wv(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function bD(e){var t=Wv(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,a=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(s){r=""+s,a.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 fd(e){e._valueTracker||(e._valueTracker=bD(e))}function Xv(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=Wv(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function hd(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 yD=/[\n"\\]/g;function Qn(e){return e.replace(yD,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function Wp(e,t,n,r,i,a,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=""+Kn(t)):e.value!==""+Kn(t)&&(e.value=""+Kn(t)):s!=="submit"&&s!=="reset"||e.removeAttribute("value"),t!=null?Xp(e,s,Kn(t)):n!=null?Xp(e,s,Kn(n)):r!=null&&e.removeAttribute("value"),i==null&&a!=null&&(e.defaultChecked=!!a),i!=null&&(e.checked=i&&typeof i!="function"&&typeof i!="symbol"),o!=null&&typeof o!="function"&&typeof o!="symbol"&&typeof o!="boolean"?e.name=""+Kn(o):e.removeAttribute("name")}function Kv(e,t,n,r,i,a,s,o){if(a!=null&&typeof a!="function"&&typeof a!="symbol"&&typeof a!="boolean"&&(e.type=a),t!=null||n!=null){if(!(a!=="submit"&&a!=="reset"||t!=null))return;n=n!=null?""+Kn(n):"",t=t!=null?""+Kn(t):n,o||t===e.value||(e.value=t),e.defaultValue=t}r=r??i,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 Xp(e,t,n){t==="number"&&hd(e.ownerDocument)===e||e.defaultValue===""+n||(e.defaultValue=""+n)}function no(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t["$"+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty("$"+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=""+Kn(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,r&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function Qv(e,t,n){if(t!=null&&(t=""+Kn(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n!=null?""+Kn(n):""}function Zv(e,t,n,r){if(t==null){if(r!=null){if(n!=null)throw Error(q(92));if(Mu(r)){if(1<r.length)throw Error(q(93));r=r[0]}n=r}n==null&&(n=""),t=n}n=Kn(t),e.defaultValue=n,r=e.textContent,r===n&&r!==""&&r!==null&&(e.value=r)}function ro(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var vD=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 Jv(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||vD.has(t)?t==="float"?e.cssFloat=n:e[t]=(""+n).trim():e[t]=n+"px"}function ex(e,t,n){if(t!=null&&typeof t!="object")throw Error(q(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 i in t)r=t[i],t.hasOwnProperty(i)&&n[i]!==r&&Jv(e,i,r)}else for(var a in t)t.hasOwnProperty(a)&&Jv(e,a,t[a])}function Kp(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 xD=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"]]),ED=/^[\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 pd(e){return ED.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}var Qp=null;function Zp(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var io=null,ao=null;function tx(e){var t=Js(e);if(t&&(e=t.stateNode)){var n=e[Tn]||null;e:switch(e=t.stateNode,t.type){case"input":if(Wp(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="'+Qn(""+t)+'"][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var i=r[Tn]||null;if(!i)throw Error(q(90));Wp(r,i.value,i.defaultValue,i.defaultValue,i.checked,i.defaultChecked,i.type,i.name)}}for(t=0;t<n.length;t++)r=n[t],r.form===e.form&&Xv(r)}break e;case"textarea":Qv(e,n.value,n.defaultValue);break e;case"select":t=n.value,t!=null&&no(e,!!n.multiple,t,!1)}}}var Jp=!1;function nx(e,t,n){if(Jp)return e(t,n);Jp=!0;try{var r=e(t);return r}finally{if(Jp=!1,(io!==null||ao!==null)&&(Qd(),io&&(t=io,e=ao,ao=io=null,tx(t),e)))for(t=0;t<e.length;t++)tx(e[t])}}function Fu(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(q(231,t,typeof n));return n}var em=!1;if(ni)try{var zu={};Object.defineProperty(zu,"passive",{get:function(){em=!0}}),window.addEventListener("test",zu,zu),window.removeEventListener("test",zu,zu)}catch{em=!1}var $i=null,tm=null,md=null;function rx(){if(md)return md;var e,t=tm,n=t.length,r,i="value"in $i?$i.value:$i.textContent,a=i.length;for(e=0;e<n&&t[e]===i[e];e++);var s=n-e;for(r=1;r<=s&&t[n-r]===i[a-r];r++);return md=i.slice(e,1<r?1-r:void 0)}function gd(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 bd(){return!0}function ix(){return!1}function wn(e){function t(n,r,i,a,s){this._reactName=n,this._targetInst=i,this.type=r,this.nativeEvent=a,this.target=s,this.currentTarget=null;for(var o in e)e.hasOwnProperty(o)&&(n=e[o],this[o]=n?n(a):a[o]);return this.isDefaultPrevented=(a.defaultPrevented!=null?a.defaultPrevented:a.returnValue===!1)?bd:ix,this.isPropagationStopped=ix,this}return at(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=bd)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=bd)},persist:function(){},isPersistent:bd}),t}var ns={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},yd=wn(ns),Hu=at({},ns,{view:0,detail:0}),TD=wn(Hu),nm,rm,Vu,vd=at({},Hu,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:am,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==Vu&&(Vu&&e.type==="mousemove"?(nm=e.screenX-Vu.screenX,rm=e.screenY-Vu.screenY):rm=nm=0,Vu=e),nm)},movementY:function(e){return"movementY"in e?e.movementY:rm}}),ax=wn(vd),wD=at({},vd,{dataTransfer:0}),_D=wn(wD),SD=at({},Hu,{relatedTarget:0}),im=wn(SD),AD=at({},ns,{animationName:0,elapsedTime:0,pseudoElement:0}),CD=wn(AD),kD=at({},ns,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),OD=wn(kD),RD=at({},ns,{data:0}),sx=wn(RD),ND={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},DD={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"},MD={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function LD(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=MD[e])?!!t[e]:!1}function am(){return LD}var ID=at({},Hu,{key:function(e){if(e.key){var t=ND[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=gd(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?DD[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:am,charCode:function(e){return e.type==="keypress"?gd(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?gd(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),PD=wn(ID),BD=at({},vd,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),ox=wn(BD),UD=at({},Hu,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:am}),jD=wn(UD),FD=at({},ns,{propertyName:0,elapsedTime:0,pseudoElement:0}),zD=wn(FD),HD=at({},vd,{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}),VD=wn(HD),YD=at({},ns,{newState:0,oldState:0}),qD=wn(YD),GD=[9,13,27,32],sm=ni&&"CompositionEvent"in window,Yu=null;ni&&"documentMode"in document&&(Yu=document.documentMode);var $D=ni&&"TextEvent"in window&&!Yu,ux=ni&&(!sm||Yu&&8<Yu&&11>=Yu),lx=" ",cx=!1;function dx(e,t){switch(e){case"keyup":return GD.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function fx(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var so=!1;function WD(e,t){switch(e){case"compositionend":return fx(t);case"keypress":return t.which!==32?null:(cx=!0,lx);case"textInput":return e=t.data,e===lx&&cx?null:e;default:return null}}function XD(e,t){if(so)return e==="compositionend"||!sm&&dx(e,t)?(e=rx(),md=tm=$i=null,so=!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 ux&&t.locale!=="ko"?null:t.data;default:return null}}var KD={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 hx(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!KD[e.type]:t==="textarea"}function px(e,t,n,r){io?ao?ao.push(r):ao=[r]:io=r,t=nf(t,"onChange"),0<t.length&&(n=new yd("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var qu=null,Gu=null;function QD(e){FT(e,0)}function xd(e){var t=ju(e);if(Xv(t))return e}function mx(e,t){if(e==="change")return t}var gx=!1;if(ni){var om;if(ni){var um="oninput"in document;if(!um){var bx=document.createElement("div");bx.setAttribute("oninput","return;"),um=typeof bx.oninput=="function"}om=um}else om=!1;gx=om&&(!document.documentMode||9<document.documentMode)}function yx(){qu&&(qu.detachEvent("onpropertychange",vx),Gu=qu=null)}function vx(e){if(e.propertyName==="value"&&xd(Gu)){var t=[];px(t,Gu,e,Zp(e)),nx(QD,t)}}function ZD(e,t,n){e==="focusin"?(yx(),qu=t,Gu=n,qu.attachEvent("onpropertychange",vx)):e==="focusout"&&yx()}function JD(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return xd(Gu)}function e4(e,t){if(e==="click")return xd(t)}function t4(e,t){if(e==="input"||e==="change")return xd(t)}function n4(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Ln=typeof Object.is=="function"?Object.is:n4;function $u(e,t){if(Ln(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!Hp.call(t,i)||!Ln(e[i],t[i]))return!1}return!0}function xx(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Ex(e,t){var n=xx(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=xx(n)}}function Tx(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Tx(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function wx(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=hd(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=hd(e.document)}return t}function lm(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 r4(e,t){var n=wx(t);t=e.focusedElem;var r=e.selectionRange;if(n!==t&&t&&t.ownerDocument&&Tx(t.ownerDocument.documentElement,t)){if(r!==null&&lm(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 i=t.textContent.length,a=Math.min(r.start,i);r=r.end===void 0?a:Math.min(r.end,i),!n.extend&&a>r&&(i=r,r=a,a=i),i=Ex(t,a);var s=Ex(t,r);i&&s&&(n.rangeCount!==1||n.anchorNode!==i.node||n.anchorOffset!==i.offset||n.focusNode!==s.node||n.focusOffset!==s.offset)&&(e=e.createRange(),e.setStart(i.node,i.offset),n.removeAllRanges(),a>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 i4=ni&&"documentMode"in document&&11>=document.documentMode,oo=null,cm=null,Wu=null,dm=!1;function _x(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;dm||oo==null||oo!==hd(r)||(r=oo,"selectionStart"in r&&lm(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}),Wu&&$u(Wu,r)||(Wu=r,r=nf(cm,"onSelect"),0<r.length&&(t=new yd("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=oo)))}function rs(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var uo={animationend:rs("Animation","AnimationEnd"),animationiteration:rs("Animation","AnimationIteration"),animationstart:rs("Animation","AnimationStart"),transitionrun:rs("Transition","TransitionRun"),transitionstart:rs("Transition","TransitionStart"),transitioncancel:rs("Transition","TransitionCancel"),transitionend:rs("Transition","TransitionEnd")},fm={},Sx={};ni&&(Sx=document.createElement("div").style,"AnimationEvent"in window||(delete uo.animationend.animation,delete uo.animationiteration.animation,delete uo.animationstart.animation),"TransitionEvent"in window||delete uo.transitionend.transition);function is(e){if(fm[e])return fm[e];if(!uo[e])return e;var t=uo[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Sx)return fm[e]=t[n];return e}var Ax=is("animationend"),Cx=is("animationiteration"),kx=is("animationstart"),a4=is("transitionrun"),s4=is("transitionstart"),o4=is("transitioncancel"),Ox=is("transitionend"),Rx=new Map,Nx="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 br(e,t){Rx.set(e,t),ts(t,[e])}var Zn=[],lo=0,hm=0;function Ed(){for(var e=lo,t=hm=lo=0;t<e;){var n=Zn[t];Zn[t++]=null;var r=Zn[t];Zn[t++]=null;var i=Zn[t];Zn[t++]=null;var a=Zn[t];if(Zn[t++]=null,r!==null&&i!==null){var s=r.pending;s===null?i.next=i:(i.next=s.next,s.next=i),r.pending=i}a!==0&&Dx(n,i,a)}}function Td(e,t,n,r){Zn[lo++]=e,Zn[lo++]=t,Zn[lo++]=n,Zn[lo++]=r,hm|=r,e.lanes|=r,e=e.alternate,e!==null&&(e.lanes|=r)}function pm(e,t,n,r){return Td(e,t,n,r),wd(e)}function Wi(e,t){return Td(e,null,null,t),wd(e)}function Dx(e,t,n){e.lanes|=n;var r=e.alternate;r!==null&&(r.lanes|=n);for(var i=!1,a=e.return;a!==null;)a.childLanes|=n,r=a.alternate,r!==null&&(r.childLanes|=n),a.tag===22&&(e=a.stateNode,e===null||e._visibility&1||(i=!0)),e=a,a=a.return;i&&t!==null&&e.tag===3&&(a=e.stateNode,i=31-Mn(n),a=a.hiddenUpdates,e=a[i],e===null?a[i]=[t]:e.push(t),t.lane=n|536870912)}function wd(e){if(50<vl)throw vl=0,x0=null,Error(q(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var co={},Mx=new WeakMap;function Jn(e,t){if(typeof e=="object"&&e!==null){var n=Mx.get(e);return n!==void 0?n:(t={value:e,source:t,stack:Rv(t)},Mx.set(e,t),t)}return{value:e,source:t,stack:Rv(t)}}var fo=[],ho=0,_d=null,Sd=0,er=[],tr=0,as=null,ii=1,ai="";function ss(e,t){fo[ho++]=Sd,fo[ho++]=_d,_d=e,Sd=t}function Lx(e,t,n){er[tr++]=ii,er[tr++]=ai,er[tr++]=as,as=e;var r=ii;e=ai;var i=32-Mn(r)-1;r&=~(1<<i),n+=1;var a=32-Mn(t)+i;if(30<a){var s=i-i%5;a=(r&(1<<s)-1).toString(32),r>>=s,i-=s,ii=1<<32-Mn(t)+i|n<<i|r,ai=a+e}else ii=1<<a|n<<i|r,ai=e}function mm(e){e.return!==null&&(ss(e,1),Lx(e,1,0))}function gm(e){for(;e===_d;)_d=fo[--ho],fo[ho]=null,Sd=fo[--ho],fo[ho]=null;for(;e===as;)as=er[--tr],er[tr]=null,ai=er[--tr],er[tr]=null,ii=er[--tr],er[tr]=null}var gn=null,Xt=null,Fe=!1,yr=null,Lr=!1,bm=Error(q(519));function os(e){var t=Error(q(418,""));throw Qu(Jn(t,e)),bm}function Ix(e){var t=e.stateNode,n=e.type,r=e.memoizedProps;switch(t[nn]=e,t[Tn]=r,n){case"dialog":Le("cancel",t),Le("close",t);break;case"iframe":case"object":case"embed":Le("load",t);break;case"video":case"audio":for(n=0;n<El.length;n++)Le(El[n],t);break;case"source":Le("error",t);break;case"img":case"image":case"link":Le("error",t),Le("load",t);break;case"details":Le("toggle",t);break;case"input":Le("invalid",t),Kv(t,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0),fd(t);break;case"select":Le("invalid",t);break;case"textarea":Le("invalid",t),Zv(t,r.value,r.defaultValue,r.children),fd(t)}n=r.children,typeof n!="string"&&typeof n!="number"&&typeof n!="bigint"||t.textContent===""+n||r.suppressHydrationWarning===!0||YT(t.textContent,n)?(r.popover!=null&&(Le("beforetoggle",t),Le("toggle",t)),r.onScroll!=null&&Le("scroll",t),r.onScrollEnd!=null&&Le("scrollend",t),r.onClick!=null&&(t.onclick=rf),t=!0):t=!1,t||os(e)}function Px(e){for(gn=e.return;gn;)switch(gn.tag){case 3:case 27:Lr=!0;return;case 5:case 13:Lr=!1;return;default:gn=gn.return}}function Xu(e){if(e!==gn)return!1;if(!Fe)return Px(e),Fe=!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")||B0(e.type,e.memoizedProps)),n=!n),n&&(t=!0),t&&Xt&&os(e),Px(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(q(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8)if(n=e.data,n==="/$"){if(t===0){Xt=xr(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++;e=e.nextSibling}Xt=null}}else Xt=gn?xr(e.stateNode.nextSibling):null;return!0}function Ku(){Xt=gn=null,Fe=!1}function Qu(e){yr===null?yr=[e]:yr.push(e)}var Zu=Error(q(460)),Bx=Error(q(474)),ym={then:function(){}};function Ux(e){return e=e.status,e==="fulfilled"||e==="rejected"}function Ad(){}function jx(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(Ad,Ad),t=n),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,e===Zu?Error(q(483)):e;default:if(typeof t.status=="string")t.then(Ad,Ad);else{if(e=tt,e!==null&&100<e.shellSuspendCounter)throw Error(q(482));e=t,e.status="pending",e.then(function(r){if(t.status==="pending"){var i=t;i.status="fulfilled",i.value=r}},function(r){if(t.status==="pending"){var i=t;i.status="rejected",i.reason=r}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,e===Zu?Error(q(483)):e}throw Ju=t,Zu}}var Ju=null;function Fx(){if(Ju===null)throw Error(q(459));var e=Ju;return Ju=null,e}var po=null,el=0;function Cd(e){var t=el;return el+=1,po===null&&(po=[]),jx(po,e,t)}function tl(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function kd(e,t){throw t.$$typeof===WN?Error(q(525)):(e=Object.prototype.toString.call(t),Error(q(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function zx(e){var t=e._init;return t(e._payload)}function Hx(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 i(m,y){return m=sa(m,y),m.index=0,m.sibling=null,m}function a(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,w){return y===null||y.tag!==6?(y=f0(x,m.mode,w),y.return=m,y):(y=i(y,x),y.return=m,y)}function u(m,y,x,w){var _=x.type;return _===Ws?c(m,y,x.props.children,w,x.key):y!==null&&(y.elementType===_||typeof _=="object"&&_!==null&&_.$$typeof===Vi&&zx(_)===y.type)?(y=i(y,x.props),tl(y,x),y.return=m,y):(y=Gd(x.type,x.key,x.props,null,m.mode,w),tl(y,x),y.return=m,y)}function l(m,y,x,w){return y===null||y.tag!==4||y.stateNode.containerInfo!==x.containerInfo||y.stateNode.implementation!==x.implementation?(y=h0(x,m.mode,w),y.return=m,y):(y=i(y,x.children||[]),y.return=m,y)}function c(m,y,x,w,_){return y===null||y.tag!==7?(y=bs(x,m.mode,w,_),y.return=m,y):(y=i(y,x),y.return=m,y)}function d(m,y,x){if(typeof y=="string"&&y!==""||typeof y=="number"||typeof y=="bigint")return y=f0(""+y,m.mode,x),y.return=m,y;if(typeof y=="object"&&y!==null){switch(y.$$typeof){case nd:return x=Gd(y.type,y.key,y.props,null,m.mode,x),tl(x,y),x.return=m,x;case Ru:return y=h0(y,m.mode,x),y.return=m,y;case Vi:var w=y._init;return y=w(y._payload),d(m,y,x)}if(Mu(y)||Nu(y))return y=bs(y,m.mode,x,null),y.return=m,y;if(typeof y.then=="function")return d(m,Cd(y),x);if(y.$$typeof===ti)return d(m,Vd(m,y),x);kd(m,y)}return null}function f(m,y,x,w){var _=y!==null?y.key:null;if(typeof x=="string"&&x!==""||typeof x=="number"||typeof x=="bigint")return _!==null?null:o(m,y,""+x,w);if(typeof x=="object"&&x!==null){switch(x.$$typeof){case nd:return x.key===_?u(m,y,x,w):null;case Ru:return x.key===_?l(m,y,x,w):null;case Vi:return _=x._init,x=_(x._payload),f(m,y,x,w)}if(Mu(x)||Nu(x))return _!==null?null:c(m,y,x,w,null);if(typeof x.then=="function")return f(m,y,Cd(x),w);if(x.$$typeof===ti)return f(m,y,Vd(m,x),w);kd(m,x)}return null}function h(m,y,x,w,_){if(typeof w=="string"&&w!==""||typeof w=="number"||typeof w=="bigint")return m=m.get(x)||null,o(y,m,""+w,_);if(typeof w=="object"&&w!==null){switch(w.$$typeof){case nd:return m=m.get(w.key===null?x:w.key)||null,u(y,m,w,_);case Ru:return m=m.get(w.key===null?x:w.key)||null,l(y,m,w,_);case Vi:var A=w._init;return w=A(w._payload),h(m,y,x,w,_)}if(Mu(w)||Nu(w))return m=m.get(x)||null,c(y,m,w,_,null);if(typeof w.then=="function")return h(m,y,x,Cd(w),_);if(w.$$typeof===ti)return h(m,y,x,Vd(y,w),_);kd(y,w)}return null}function g(m,y,x,w){for(var _=null,A=null,D=y,L=y=0,U=null;D!==null&&L<x.length;L++){D.index>L?(U=D,D=null):U=D.sibling;var R=f(m,D,x[L],w);if(R===null){D===null&&(D=U);break}e&&D&&R.alternate===null&&t(m,D),y=a(R,y,L),A===null?_=R:A.sibling=R,A=R,D=U}if(L===x.length)return n(m,D),Fe&&ss(m,L),_;if(D===null){for(;L<x.length;L++)D=d(m,x[L],w),D!==null&&(y=a(D,y,L),A===null?_=D:A.sibling=D,A=D);return Fe&&ss(m,L),_}for(D=r(D);L<x.length;L++)U=h(D,m,L,x[L],w),U!==null&&(e&&U.alternate!==null&&D.delete(U.key===null?L:U.key),y=a(U,y,L),A===null?_=U:A.sibling=U,A=U);return e&&D.forEach(function(H){return t(m,H)}),Fe&&ss(m,L),_}function b(m,y,x,w){if(x==null)throw Error(q(151));for(var _=null,A=null,D=y,L=y=0,U=null,R=x.next();D!==null&&!R.done;L++,R=x.next()){D.index>L?(U=D,D=null):U=D.sibling;var H=f(m,D,R.value,w);if(H===null){D===null&&(D=U);break}e&&D&&H.alternate===null&&t(m,D),y=a(H,y,L),A===null?_=H:A.sibling=H,A=H,D=U}if(R.done)return n(m,D),Fe&&ss(m,L),_;if(D===null){for(;!R.done;L++,R=x.next())R=d(m,R.value,w),R!==null&&(y=a(R,y,L),A===null?_=R:A.sibling=R,A=R);return Fe&&ss(m,L),_}for(D=r(D);!R.done;L++,R=x.next())R=h(D,m,L,R.value,w),R!==null&&(e&&R.alternate!==null&&D.delete(R.key===null?L:R.key),y=a(R,y,L),A===null?_=R:A.sibling=R,A=R);return e&&D.forEach(function(z){return t(m,z)}),Fe&&ss(m,L),_}function T(m,y,x,w){if(typeof x=="object"&&x!==null&&x.type===Ws&&x.key===null&&(x=x.props.children),typeof x=="object"&&x!==null){switch(x.$$typeof){case nd:e:{for(var _=x.key;y!==null;){if(y.key===_){if(_=x.type,_===Ws){if(y.tag===7){n(m,y.sibling),w=i(y,x.props.children),w.return=m,m=w;break e}}else if(y.elementType===_||typeof _=="object"&&_!==null&&_.$$typeof===Vi&&zx(_)===y.type){n(m,y.sibling),w=i(y,x.props),tl(w,x),w.return=m,m=w;break e}n(m,y);break}else t(m,y);y=y.sibling}x.type===Ws?(w=bs(x.props.children,m.mode,w,x.key),w.return=m,m=w):(w=Gd(x.type,x.key,x.props,null,m.mode,w),tl(w,x),w.return=m,m=w)}return s(m);case Ru: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),w=i(y,x.children||[]),w.return=m,m=w;break e}else{n(m,y);break}else t(m,y);y=y.sibling}w=h0(x,m.mode,w),w.return=m,m=w}return s(m);case Vi:return _=x._init,x=_(x._payload),T(m,y,x,w)}if(Mu(x))return g(m,y,x,w);if(Nu(x)){if(_=Nu(x),typeof _!="function")throw Error(q(150));return x=_.call(x),b(m,y,x,w)}if(typeof x.then=="function")return T(m,y,Cd(x),w);if(x.$$typeof===ti)return T(m,y,Vd(m,x),w);kd(m,x)}return typeof x=="string"&&x!==""||typeof x=="number"||typeof x=="bigint"?(x=""+x,y!==null&&y.tag===6?(n(m,y.sibling),w=i(y,x),w.return=m,m=w):(n(m,y),w=f0(x,m.mode,w),w.return=m,m=w),s(m)):n(m,y)}return function(m,y,x,w){try{el=0;var _=T(m,y,x,w);return po=null,_}catch(D){if(D===Zu)throw D;var A=ar(29,D,null,m.mode);return A.lanes=w,A.return=m,A}finally{}}}var us=Hx(!0),Vx=Hx(!1),mo=Nr(null),Od=Nr(0);function Yx(e,t){e=gi,lt(Od,e),lt(mo,t),gi=e|t.baseLanes}function vm(){lt(Od,gi),lt(mo,mo.current)}function xm(){gi=Od.current,Ft(mo),Ft(Od)}var nr=Nr(null),Ir=null;function Xi(e){var t=e.alternate;lt(It,It.current&1),lt(nr,e),Ir===null&&(t===null||mo.current!==null||t.memoizedState!==null)&&(Ir=e)}function qx(e){if(e.tag===22){if(lt(It,It.current),lt(nr,e),Ir===null){var t=e.alternate;t!==null&&t.memoizedState!==null&&(Ir=e)}}else Ki()}function Ki(){lt(It,It.current),lt(nr,nr.current)}function si(e){Ft(nr),Ir===e&&(Ir=null),Ft(It)}var It=Nr(0);function Rd(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 u4=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()})}},l4=Lt.unstable_scheduleCallback,c4=Lt.unstable_NormalPriority,Pt={$$typeof:ti,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Em(){return{controller:new u4,data:new Map,refCount:0}}function nl(e){e.refCount--,e.refCount===0&&l4(c4,function(){e.controller.abort()})}var rl=null,Tm=0,go=0,bo=null;function d4(e,t){if(rl===null){var n=rl=[];Tm=0,go=k0(),bo={status:"pending",value:void 0,then:function(r){n.push(r)}}}return Tm++,t.then(Gx,Gx),t}function Gx(){if(--Tm===0&&rl!==null){bo!==null&&(bo.status="fulfilled");var e=rl;rl=null,go=0,bo=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function f4(e,t){var n=[],r={status:"pending",value:null,reason:null,then:function(i){n.push(i)}};return e.then(function(){r.status="fulfilled",r.value=t;for(var i=0;i<n.length;i++)(0,n[i])(t)},function(i){for(r.status="rejected",r.reason=i,i=0;i<n.length;i++)(0,n[i])(void 0)}),r}var $x=xe.S;xe.S=function(e,t){typeof t=="object"&&t!==null&&typeof t.then=="function"&&d4(e,t),$x!==null&&$x(e,t)};var ls=Nr(null);function wm(){var e=ls.current;return e!==null?e:tt.pooledCache}function Nd(e,t){t===null?lt(ls,ls.current):lt(ls,t.pool)}function Wx(){var e=wm();return e===null?null:{parent:Pt._currentValue,pool:e}}var Qi=0,ke=null,$e=null,Ct=null,Dd=!1,yo=!1,cs=!1,Md=0,il=0,vo=null,h4=0;function wt(){throw Error(q(321))}function _m(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Ln(e[n],t[n]))return!1;return!0}function Sm(e,t,n,r,i,a){return Qi=a,ke=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,xe.H=e===null||e.memoizedState===null?ds:Zi,cs=!1,a=n(r,i),cs=!1,yo&&(a=Kx(t,n,r,i)),Xx(e),a}function Xx(e){xe.H=Pr;var t=$e!==null&&$e.next!==null;if(Qi=0,Ct=$e=ke=null,Dd=!1,il=0,vo=null,t)throw Error(q(300));e===null||Ht||(e=e.dependencies,e!==null&&Hd(e)&&(Ht=!0))}function Kx(e,t,n,r){ke=e;var i=0;do{if(yo&&(vo=null),il=0,yo=!1,25<=i)throw Error(q(301));if(i+=1,Ct=$e=null,e.updateQueue!=null){var a=e.updateQueue;a.lastEffect=null,a.events=null,a.stores=null,a.memoCache!=null&&(a.memoCache.index=0)}xe.H=fs,a=t(n,r)}while(yo);return a}function p4(){var e=xe.H,t=e.useState()[0];return t=typeof t.then=="function"?al(t):t,e=e.useState()[0],($e!==null?$e.memoizedState:null)!==e&&(ke.flags|=1024),t}function Am(){var e=Md!==0;return Md=0,e}function Cm(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function km(e){if(Dd){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Dd=!1}Qi=0,Ct=$e=ke=null,yo=!1,il=Md=0,vo=null}function _n(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ct===null?ke.memoizedState=Ct=e:Ct=Ct.next=e,Ct}function kt(){if($e===null){var e=ke.alternate;e=e!==null?e.memoizedState:null}else e=$e.next;var t=Ct===null?ke.memoizedState:Ct.next;if(t!==null)Ct=t,$e=e;else{if(e===null)throw ke.alternate===null?Error(q(467)):Error(q(310));$e=e,e={memoizedState:$e.memoizedState,baseState:$e.baseState,baseQueue:$e.baseQueue,queue:$e.queue,next:null},Ct===null?ke.memoizedState=Ct=e:Ct=Ct.next=e}return Ct}var Ld;Ld=function(){return{lastEffect:null,events:null,stores:null,memoCache:null}};function al(e){var t=il;return il+=1,vo===null&&(vo=[]),e=jx(vo,e,t),t=ke,(Ct===null?t.memoizedState:Ct.next)===null&&(t=t.alternate,xe.H=t===null||t.memoizedState===null?ds:Zi),e}function Id(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return al(e);if(e.$$typeof===ti)return rn(e)}throw Error(q(438,String(e)))}function Om(e){var t=null,n=ke.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var r=ke.alternate;r!==null&&(r=r.updateQueue,r!==null&&(r=r.memoCache,r!=null&&(t={data:r.data.map(function(i){return i.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),n===null&&(n=Ld(),ke.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]=KN;return t.index++,n}function oi(e,t){return typeof t=="function"?t(e):t}function Pd(e){var t=kt();return Rm(t,$e,e)}function Rm(e,t,n){var r=e.queue;if(r===null)throw Error(q(311));r.lastRenderedReducer=n;var i=e.baseQueue,a=r.pending;if(a!==null){if(i!==null){var s=i.next;i.next=a.next,a.next=s}t.baseQueue=i=a,r.pending=null}if(a=e.baseState,i===null)e.memoizedState=a;else{t=i.next;var o=s=null,u=null,l=t,c=!1;do{var d=l.lane&-536870913;if(d!==l.lane?(Ie&d)===d:(Qi&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===go&&(c=!0);else if((Qi&f)===f){l=l.next,f===go&&(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=a):u=u.next=d,ke.lanes|=f,oa|=f;d=l.action,cs&&n(a,d),a=l.hasEagerState?l.eagerState:n(a,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=a):u=u.next=f,ke.lanes|=d,oa|=d;l=l.next}while(l!==null&&l!==t);if(u===null?s=a:u.next=o,!Ln(a,e.memoizedState)&&(Ht=!0,c&&(n=bo,n!==null)))throw n;e.memoizedState=a,e.baseState=s,e.baseQueue=u,r.lastRenderedState=a}return i===null&&(r.lanes=0),[e.memoizedState,r.dispatch]}function Nm(e){var t=kt(),n=t.queue;if(n===null)throw Error(q(311));n.lastRenderedReducer=e;var r=n.dispatch,i=n.pending,a=t.memoizedState;if(i!==null){n.pending=null;var s=i=i.next;do a=e(a,s.action),s=s.next;while(s!==i);Ln(a,t.memoizedState)||(Ht=!0),t.memoizedState=a,t.baseQueue===null&&(t.baseState=a),n.lastRenderedState=a}return[a,r]}function Qx(e,t,n){var r=ke,i=kt(),a=Fe;if(a){if(n===void 0)throw Error(q(407));n=n()}else n=t();var s=!Ln(($e||i).memoizedState,n);if(s&&(i.memoizedState=n,Ht=!0),i=i.queue,Lm(eE.bind(null,r,i,e),[e]),i.getSnapshot!==t||s||Ct!==null&&Ct.memoizedState.tag&1){if(r.flags|=2048,xo(9,Jx.bind(null,r,i,n,t),{destroy:void 0},null),tt===null)throw Error(q(349));a||Qi&60||Zx(r,t,n)}return n}function Zx(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=ke.updateQueue,t===null?(t=Ld(),ke.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Jx(e,t,n,r){t.value=n,t.getSnapshot=r,tE(t)&&nE(e)}function eE(e,t,n){return n(function(){tE(t)&&nE(e)})}function tE(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Ln(e,n)}catch{return!0}}function nE(e){var t=Wi(e,2);t!==null&&bn(t,e,2)}function Dm(e){var t=_n();if(typeof e=="function"){var n=e;if(e=n(),cs){qi(!0);try{n()}finally{qi(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:oi,lastRenderedState:e},t}function rE(e,t,n,r){return e.baseState=n,Rm(e,$e,typeof r=="function"?r:oi)}function m4(e,t,n,r,i){if(jd(e))throw Error(q(485));if(e=t.action,e!==null){var a={payload:i,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(s){a.listeners.push(s)}};xe.T!==null?n(!0):a.isTransition=!1,r(a),n=t.pending,n===null?(a.next=t.pending=a,iE(t,a)):(a.next=n.next,t.pending=n.next=a)}}function iE(e,t){var n=t.action,r=t.payload,i=e.state;if(t.isTransition){var a=xe.T,s={};xe.T=s;try{var o=n(i,r),u=xe.S;u!==null&&u(s,o),aE(e,t,o)}catch(l){Mm(e,t,l)}finally{xe.T=a}}else try{a=n(i,r),aE(e,t,a)}catch(l){Mm(e,t,l)}}function aE(e,t,n){n!==null&&typeof n=="object"&&typeof n.then=="function"?n.then(function(r){sE(e,t,r)},function(r){return Mm(e,t,r)}):sE(e,t,n)}function sE(e,t,n){t.status="fulfilled",t.value=n,oE(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,iE(e,n)))}function Mm(e,t,n){var r=e.pending;if(e.pending=null,r!==null){r=r.next;do t.status="rejected",t.reason=n,oE(t),t=t.next;while(t!==r)}e.action=null}function oE(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function uE(e,t){return t}function lE(e,t){if(Fe){var n=tt.formState;if(n!==null){e:{var r=ke;if(Fe){if(Xt){t:{for(var i=Xt,a=Lr;i.nodeType!==8;){if(!a){i=null;break t}if(i=xr(i.nextSibling),i===null){i=null;break t}}a=i.data,i=a==="F!"||a==="F"?i:null}if(i){Xt=xr(i.nextSibling),r=i.data==="F!";break e}}os(r)}r=!1}r&&(t=n[0])}}return n=_n(),n.memoizedState=n.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:uE,lastRenderedState:t},n.queue=r,n=CE.bind(null,ke,r),r.dispatch=n,r=Dm(!1),a=jm.bind(null,ke,!1,r.queue),r=_n(),i={state:t,dispatch:null,action:e,pending:null},r.queue=i,n=m4.bind(null,ke,i,a,n),i.dispatch=n,r.memoizedState=e,[t,n,!1]}function cE(e){var t=kt();return dE(t,$e,e)}function dE(e,t,n){t=Rm(e,t,uE)[0],e=Pd(oi)[0],t=typeof t=="object"&&t!==null&&typeof t.then=="function"?al(t):t;var r=kt(),i=r.queue,a=i.dispatch;return n!==r.memoizedState&&(ke.flags|=2048,xo(9,g4.bind(null,i,n),{destroy:void 0},null)),[t,a,e]}function g4(e,t){e.action=t}function fE(e){var t=kt(),n=$e;if(n!==null)return dE(t,n,e);kt(),t=t.memoizedState,n=kt();var r=n.queue.dispatch;return n.memoizedState=e,[t,r,!1]}function xo(e,t,n,r){return e={tag:e,create:t,inst:n,deps:r,next:null},t=ke.updateQueue,t===null&&(t=Ld(),ke.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 hE(){return kt().memoizedState}function Bd(e,t,n,r){var i=_n();ke.flags|=e,i.memoizedState=xo(1|t,n,{destroy:void 0},r===void 0?null:r)}function Ud(e,t,n,r){var i=kt();r=r===void 0?null:r;var a=i.memoizedState.inst;$e!==null&&r!==null&&_m(r,$e.memoizedState.deps)?i.memoizedState=xo(t,n,a,r):(ke.flags|=e,i.memoizedState=xo(1|t,n,a,r))}function pE(e,t){Bd(8390656,8,e,t)}function Lm(e,t){Ud(2048,8,e,t)}function mE(e,t){return Ud(4,2,e,t)}function gE(e,t){return Ud(4,4,e,t)}function bE(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 yE(e,t,n){n=n!=null?n.concat([e]):null,Ud(4,4,bE.bind(null,t,e),n)}function Im(){}function vE(e,t){var n=kt();t=t===void 0?null:t;var r=n.memoizedState;return t!==null&&_m(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function xE(e,t){var n=kt();t=t===void 0?null:t;var r=n.memoizedState;if(t!==null&&_m(t,r[1]))return r[0];if(r=e(),cs){qi(!0);try{e()}finally{qi(!1)}}return n.memoizedState=[r,t],r}function Pm(e,t,n){return n===void 0||Qi&1073741824?e.memoizedState=t:(e.memoizedState=n,e=TT(),ke.lanes|=e,oa|=e,n)}function EE(e,t,n,r){return Ln(n,t)?n:mo.current!==null?(e=Pm(e,n,r),Ln(e,t)||(Ht=!0),e):Qi&42?(e=TT(),ke.lanes|=e,oa|=e,t):(Ht=!0,e.memoizedState=n)}function TE(e,t,n,r,i){var a=st.p;st.p=a!==0&&8>a?a:8;var s=xe.T,o={};xe.T=o,jm(e,!1,t,n);try{var u=i(),l=xe.S;if(l!==null&&l(o,u),u!==null&&typeof u=="object"&&typeof u.then=="function"){var c=f4(u,r);sl(e,t,c,Un(e))}else sl(e,t,r,Un(e))}catch(d){sl(e,t,{then:function(){},status:"rejected",reason:d},Un())}finally{st.p=a,xe.T=s}}function b4(){}function Bm(e,t,n,r){if(e.tag!==5)throw Error(q(476));var i=wE(e).queue;TE(e,i,t,Za,n===null?b4:function(){return _E(e),n(r)})}function wE(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:Za,baseState:Za,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:oi,lastRenderedState:Za},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:oi,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function _E(e){var t=wE(e).next.queue;sl(e,t,{},Un())}function Um(){return rn(Al)}function SE(){return kt().memoizedState}function AE(){return kt().memoizedState}function y4(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=Un();e=ta(n);var r=na(t,e,n);r!==null&&(bn(r,t,n),ll(r,t,n)),t={cache:Em()},e.payload=t;return}t=t.return}}function v4(e,t,n){var r=Un();n={lane:r,revertLane:0,action:n,hasEagerState:!1,eagerState:null,next:null},jd(e)?kE(t,n):(n=pm(e,t,n,r),n!==null&&(bn(n,e,r),OE(n,t,r)))}function CE(e,t,n){var r=Un();sl(e,t,n,r)}function sl(e,t,n,r){var i={lane:r,revertLane:0,action:n,hasEagerState:!1,eagerState:null,next:null};if(jd(e))kE(t,i);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var s=t.lastRenderedState,o=a(s,n);if(i.hasEagerState=!0,i.eagerState=o,Ln(o,s))return Td(e,t,i,0),tt===null&&Ed(),!1}catch{}finally{}if(n=pm(e,t,i,r),n!==null)return bn(n,e,r),OE(n,t,r),!0}return!1}function jm(e,t,n,r){if(r={lane:2,revertLane:k0(),action:r,hasEagerState:!1,eagerState:null,next:null},jd(e)){if(t)throw Error(q(479))}else t=pm(e,n,r,2),t!==null&&bn(t,e,2)}function jd(e){var t=e.alternate;return e===ke||t!==null&&t===ke}function kE(e,t){yo=Dd=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function OE(e,t,n){if(n&4194176){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Fv(e,n)}}var Pr={readContext:rn,use:Id,useCallback:wt,useContext:wt,useEffect:wt,useImperativeHandle:wt,useLayoutEffect:wt,useInsertionEffect:wt,useMemo:wt,useReducer:wt,useRef:wt,useState:wt,useDebugValue:wt,useDeferredValue:wt,useTransition:wt,useSyncExternalStore:wt,useId:wt};Pr.useCacheRefresh=wt,Pr.useMemoCache=wt,Pr.useHostTransitionStatus=wt,Pr.useFormState=wt,Pr.useActionState=wt,Pr.useOptimistic=wt;var ds={readContext:rn,use:Id,useCallback:function(e,t){return _n().memoizedState=[e,t===void 0?null:t],e},useContext:rn,useEffect:pE,useImperativeHandle:function(e,t,n){n=n!=null?n.concat([e]):null,Bd(4194308,4,bE.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Bd(4194308,4,e,t)},useInsertionEffect:function(e,t){Bd(4,2,e,t)},useMemo:function(e,t){var n=_n();t=t===void 0?null:t;var r=e();if(cs){qi(!0);try{e()}finally{qi(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=_n();if(n!==void 0){var i=n(t);if(cs){qi(!0);try{n(t)}finally{qi(!1)}}}else i=t;return r.memoizedState=r.baseState=i,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:i},r.queue=e,e=e.dispatch=v4.bind(null,ke,e),[r.memoizedState,e]},useRef:function(e){var t=_n();return e={current:e},t.memoizedState=e},useState:function(e){e=Dm(e);var t=e.queue,n=CE.bind(null,ke,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:Im,useDeferredValue:function(e,t){var n=_n();return Pm(n,e,t)},useTransition:function(){var e=Dm(!1);return e=TE.bind(null,ke,e.queue,!0,!1),_n().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=ke,i=_n();if(Fe){if(n===void 0)throw Error(q(407));n=n()}else{if(n=t(),tt===null)throw Error(q(349));Ie&60||Zx(r,t,n)}i.memoizedState=n;var a={value:n,getSnapshot:t};return i.queue=a,pE(eE.bind(null,r,a,e),[e]),r.flags|=2048,xo(9,Jx.bind(null,r,a,n,t),{destroy:void 0},null),n},useId:function(){var e=_n(),t=tt.identifierPrefix;if(Fe){var n=ai,r=ii;n=(r&~(1<<32-Mn(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Md++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=h4++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},useCacheRefresh:function(){return _n().memoizedState=y4.bind(null,ke)}};ds.useMemoCache=Om,ds.useHostTransitionStatus=Um,ds.useFormState=lE,ds.useActionState=lE,ds.useOptimistic=function(e){var t=_n();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=jm.bind(null,ke,!0,n),n.dispatch=t,[e,t]};var Zi={readContext:rn,use:Id,useCallback:vE,useContext:rn,useEffect:Lm,useImperativeHandle:yE,useInsertionEffect:mE,useLayoutEffect:gE,useMemo:xE,useReducer:Pd,useRef:hE,useState:function(){return Pd(oi)},useDebugValue:Im,useDeferredValue:function(e,t){var n=kt();return EE(n,$e.memoizedState,e,t)},useTransition:function(){var e=Pd(oi)[0],t=kt().memoizedState;return[typeof e=="boolean"?e:al(e),t]},useSyncExternalStore:Qx,useId:SE};Zi.useCacheRefresh=AE,Zi.useMemoCache=Om,Zi.useHostTransitionStatus=Um,Zi.useFormState=cE,Zi.useActionState=cE,Zi.useOptimistic=function(e,t){var n=kt();return rE(n,$e,e,t)};var fs={readContext:rn,use:Id,useCallback:vE,useContext:rn,useEffect:Lm,useImperativeHandle:yE,useInsertionEffect:mE,useLayoutEffect:gE,useMemo:xE,useReducer:Nm,useRef:hE,useState:function(){return Nm(oi)},useDebugValue:Im,useDeferredValue:function(e,t){var n=kt();return $e===null?Pm(n,e,t):EE(n,$e.memoizedState,e,t)},useTransition:function(){var e=Nm(oi)[0],t=kt().memoizedState;return[typeof e=="boolean"?e:al(e),t]},useSyncExternalStore:Qx,useId:SE};fs.useCacheRefresh=AE,fs.useMemoCache=Om,fs.useHostTransitionStatus=Um,fs.useFormState=fE,fs.useActionState=fE,fs.useOptimistic=function(e,t){var n=kt();return $e!==null?rE(n,$e,e,t):(n.baseState=e,[e,n.queue.dispatch])};function Fm(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:at({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var zm={isMounted:function(e){return(e=e._reactInternals)?Xs(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=Un(),i=ta(r);i.payload=t,n!=null&&(i.callback=n),t=na(e,i,r),t!==null&&(bn(t,e,r),ll(t,e,r))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=Un(),i=ta(r);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=na(e,i,r),t!==null&&(bn(t,e,r),ll(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Un(),r=ta(n);r.tag=2,t!=null&&(r.callback=t),t=na(e,r,n),t!==null&&(bn(t,e,n),ll(t,e,n))}};function RE(e,t,n,r,i,a,s){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,a,s):t.prototype&&t.prototype.isPureReactComponent?!$u(n,r)||!$u(i,a):!0}function NE(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&&zm.enqueueReplaceState(t,t.state,null)}function hs(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=at({},n));for(var i in e)n[i]===void 0&&(n[i]=e[i])}return n}var Fd=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 DE(e){Fd(e)}function ME(e){console.error(e)}function LE(e){Fd(e)}function zd(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(r){setTimeout(function(){throw r})}}function IE(e,t,n){try{var r=e.onCaughtError;r(n.value,{componentStack:n.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(i){setTimeout(function(){throw i})}}function Hm(e,t,n){return n=ta(n),n.tag=3,n.payload={element:null},n.callback=function(){zd(e,t)},n}function PE(e){return e=ta(e),e.tag=3,e}function BE(e,t,n,r){var i=n.type.getDerivedStateFromError;if(typeof i=="function"){var a=r.value;e.payload=function(){return i(a)},e.callback=function(){IE(t,n,r)}}var s=n.stateNode;s!==null&&typeof s.componentDidCatch=="function"&&(e.callback=function(){IE(t,n,r),typeof i!="function"&&(ua===null?ua=new Set([this]):ua.add(this));var o=r.stack;this.componentDidCatch(r.value,{componentStack:o!==null?o:""})})}function x4(e,t,n,r,i){if(n.flags|=32768,r!==null&&typeof r=="object"&&typeof r.then=="function"){if(t=n.alternate,t!==null&&ul(t,n,i,!0),n=nr.current,n!==null){switch(n.tag){case 13:return Ir===null?w0():n.alternate===null&&xt===0&&(xt=3),n.flags&=-257,n.flags|=65536,n.lanes=i,r===ym?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([r]):t.add(r),S0(e,r,i)),!1;case 22:return n.flags|=65536,r===ym?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)),S0(e,r,i)),!1}throw Error(q(435,n.tag))}return S0(e,r,i),w0(),!1}if(Fe)return t=nr.current,t!==null?(!(t.flags&65536)&&(t.flags|=256),t.flags|=65536,t.lanes=i,r!==bm&&(e=Error(q(422),{cause:r}),Qu(Jn(e,n)))):(r!==bm&&(t=Error(q(423),{cause:r}),Qu(Jn(t,n))),e=e.current.alternate,e.flags|=65536,i&=-i,e.lanes|=i,r=Jn(r,n),i=Hm(e.stateNode,r,i),r0(e,i),xt!==4&&(xt=2)),!1;var a=Error(q(520),{cause:r});if(a=Jn(a,n),bl===null?bl=[a]:bl.push(a),xt!==4&&(xt=2),t===null)return!0;r=Jn(r,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=i&-i,n.lanes|=e,e=Hm(n.stateNode,r,e),r0(n,e),!1;case 1:if(t=n.type,a=n.stateNode,(n.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||a!==null&&typeof a.componentDidCatch=="function"&&(ua===null||!ua.has(a))))return n.flags|=65536,i&=-i,n.lanes|=i,i=PE(i),BE(i,e,n,r),r0(n,i),!1}n=n.return}while(n!==null);return!1}var UE=Error(q(461)),Ht=!1;function Kt(e,t,n,r){t.child=e===null?Vx(t,null,n,r):us(t,e.child,n,r)}function jE(e,t,n,r,i){n=n.render;var a=t.ref;if("ref"in r){var s={};for(var o in r)o!=="ref"&&(s[o]=r[o])}else s=r;return ms(t),r=Sm(e,t,n,s,a,i),o=Am(),e!==null&&!Ht?(Cm(e,t,i),ui(e,t,i)):(Fe&&o&&mm(t),t.flags|=1,Kt(e,t,r,i),t.child)}function FE(e,t,n,r,i){if(e===null){var a=n.type;return typeof a=="function"&&!d0(a)&&a.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=a,zE(e,t,a,r,i)):(e=Gd(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,!Qm(e,i)){var s=a.memoizedProps;if(n=n.compare,n=n!==null?n:$u,n(s,r)&&e.ref===t.ref)return ui(e,t,i)}return t.flags|=1,e=sa(a,r),e.ref=t.ref,e.return=t,t.child=e}function zE(e,t,n,r,i){if(e!==null){var a=e.memoizedProps;if($u(a,r)&&e.ref===t.ref)if(Ht=!1,t.pendingProps=r=a,Qm(e,i))e.flags&131072&&(Ht=!0);else return t.lanes=e.lanes,ui(e,t,i)}return Vm(e,t,n,r,i)}function HE(e,t,n){var r=t.pendingProps,i=r.children,a=(t.stateNode._pendingVisibility&2)!==0,s=e!==null?e.memoizedState:null;if(ol(e,t),r.mode==="hidden"||a){if(t.flags&128){if(r=s!==null?s.baseLanes|n:n,e!==null){for(i=t.child=e.child,a=0;i!==null;)a=a|i.lanes|i.childLanes,i=i.sibling;t.childLanes=a&~r}else t.childLanes=0,t.child=null;return VE(e,t,r,n)}if(n&536870912)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Nd(t,s!==null?s.cachePool:null),s!==null?Yx(t,s):vm(),qx(t);else return t.lanes=t.childLanes=536870912,VE(e,t,s!==null?s.baseLanes|n:n,n)}else s!==null?(Nd(t,s.cachePool),Yx(t,s),Ki(),t.memoizedState=null):(e!==null&&Nd(t,null),vm(),Ki());return Kt(e,t,i,n),t.child}function VE(e,t,n,r){var i=wm();return i=i===null?null:{parent:Pt._currentValue,pool:i},t.memoizedState={baseLanes:n,cachePool:i},e!==null&&Nd(t,null),vm(),qx(t),e!==null&&ul(e,t,r,!0),null}function ol(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(q(284));(e===null||e.ref!==n)&&(t.flags|=2097664)}}function Vm(e,t,n,r,i){return ms(t),n=Sm(e,t,n,r,void 0,i),r=Am(),e!==null&&!Ht?(Cm(e,t,i),ui(e,t,i)):(Fe&&r&&mm(t),t.flags|=1,Kt(e,t,n,i),t.child)}function YE(e,t,n,r,i,a){return ms(t),t.updateQueue=null,n=Kx(t,r,n,i),Xx(e),r=Am(),e!==null&&!Ht?(Cm(e,t,a),ui(e,t,a)):(Fe&&r&&mm(t),t.flags|=1,Kt(e,t,n,a),t.child)}function qE(e,t,n,r,i){if(ms(t),t.stateNode===null){var a=co,s=n.contextType;typeof s=="object"&&s!==null&&(a=rn(s)),a=new n(r,a),t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,a.updater=zm,t.stateNode=a,a._reactInternals=t,a=t.stateNode,a.props=r,a.state=t.memoizedState,a.refs={},t0(t),s=n.contextType,a.context=typeof s=="object"&&s!==null?rn(s):co,a.state=t.memoizedState,s=n.getDerivedStateFromProps,typeof s=="function"&&(Fm(t,n,s,r),a.state=t.memoizedState),typeof n.getDerivedStateFromProps=="function"||typeof a.getSnapshotBeforeUpdate=="function"||typeof a.UNSAFE_componentWillMount!="function"&&typeof a.componentWillMount!="function"||(s=a.state,typeof a.componentWillMount=="function"&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount=="function"&&a.UNSAFE_componentWillMount(),s!==a.state&&zm.enqueueReplaceState(a,a.state,null),dl(t,r,a,i),cl(),a.state=t.memoizedState),typeof a.componentDidMount=="function"&&(t.flags|=4194308),r=!0}else if(e===null){a=t.stateNode;var o=t.memoizedProps,u=hs(n,o);a.props=u;var l=a.context,c=n.contextType;s=co,typeof c=="object"&&c!==null&&(s=rn(c));var d=n.getDerivedStateFromProps;c=typeof d=="function"||typeof a.getSnapshotBeforeUpdate=="function",o=t.pendingProps!==o,c||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(o||l!==s)&&NE(t,a,r,s),ea=!1;var f=t.memoizedState;a.state=f,dl(t,r,a,i),cl(),l=t.memoizedState,o||f!==l||ea?(typeof d=="function"&&(Fm(t,n,d,r),l=t.memoizedState),(u=ea||RE(t,n,u,r,f,l,s))?(c||typeof a.UNSAFE_componentWillMount!="function"&&typeof a.componentWillMount!="function"||(typeof a.componentWillMount=="function"&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount=="function"&&a.UNSAFE_componentWillMount()),typeof a.componentDidMount=="function"&&(t.flags|=4194308)):(typeof a.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),a.props=r,a.state=l,a.context=s,r=u):(typeof a.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,n0(e,t),s=t.memoizedProps,c=hs(n,s),a.props=c,d=t.pendingProps,f=a.context,l=n.contextType,u=co,typeof l=="object"&&l!==null&&(u=rn(l)),o=n.getDerivedStateFromProps,(l=typeof o=="function"||typeof a.getSnapshotBeforeUpdate=="function")||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(s!==d||f!==u)&&NE(t,a,r,u),ea=!1,f=t.memoizedState,a.state=f,dl(t,r,a,i),cl();var h=t.memoizedState;s!==d||f!==h||ea||e!==null&&e.dependencies!==null&&Hd(e.dependencies)?(typeof o=="function"&&(Fm(t,n,o,r),h=t.memoizedState),(c=ea||RE(t,n,c,r,f,h,u)||e!==null&&e.dependencies!==null&&Hd(e.dependencies))?(l||typeof a.UNSAFE_componentWillUpdate!="function"&&typeof a.componentWillUpdate!="function"||(typeof a.componentWillUpdate=="function"&&a.componentWillUpdate(r,h,u),typeof a.UNSAFE_componentWillUpdate=="function"&&a.UNSAFE_componentWillUpdate(r,h,u)),typeof a.componentDidUpdate=="function"&&(t.flags|=4),typeof a.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof a.componentDidUpdate!="function"||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=h),a.props=r,a.state=h,a.context=u,r=c):(typeof a.componentDidUpdate!="function"||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return a=r,ol(e,t),r=(t.flags&128)!==0,a||r?(a=t.stateNode,n=r&&typeof n.getDerivedStateFromError!="function"?null:a.render(),t.flags|=1,e!==null&&r?(t.child=us(t,e.child,null,i),t.child=us(t,null,n,i)):Kt(e,t,n,i),t.memoizedState=a.state,e=t.child):e=ui(e,t,i),e}function GE(e,t,n,r){return Ku(),t.flags|=256,Kt(e,t,n,r),t.child}var Ym={dehydrated:null,treeContext:null,retryLane:0};function qm(e){return{baseLanes:e,cachePool:Wx()}}function Gm(e,t,n){return e=e!==null?e.childLanes&~n:0,t&&(e|=sr),e}function $E(e,t,n){var r=t.pendingProps,i=!1,a=(t.flags&128)!==0,s;if((s=a)||(s=e!==null&&e.memoizedState===null?!1:(It.current&2)!==0),s&&(i=!0,t.flags&=-129),s=(t.flags&32)!==0,t.flags&=-33,e===null){if(Fe){if(i?Xi(t):Ki(),Fe){var o=Xt,u;if(u=o){e:{for(u=o,o=Lr;u.nodeType!==8;){if(!o){o=null;break e}if(u=xr(u.nextSibling),u===null){o=null;break e}}o=u}o!==null?(t.memoizedState={dehydrated:o,treeContext:as!==null?{id:ii,overflow:ai}:null,retryLane:536870912},u=ar(18,null,null,0),u.stateNode=o,u.return=t,t.child=u,gn=t,Xt=null,u=!0):u=!1}u||os(t)}if(o=t.memoizedState,o!==null&&(o=o.dehydrated,o!==null))return o.data==="$!"?t.lanes=16:t.lanes=536870912,null;si(t)}return o=r.children,r=r.fallback,i?(Ki(),i=t.mode,o=Wm({mode:"hidden",children:o},i),r=bs(r,i,n,null),o.return=t,r.return=t,o.sibling=r,t.child=o,i=t.child,i.memoizedState=qm(n),i.childLanes=Gm(e,s,n),t.memoizedState=Ym,r):(Xi(t),$m(t,o))}if(u=e.memoizedState,u!==null&&(o=u.dehydrated,o!==null)){if(a)t.flags&256?(Xi(t),t.flags&=-257,t=Xm(e,t,n)):t.memoizedState!==null?(Ki(),t.child=e.child,t.flags|=128,t=null):(Ki(),i=r.fallback,o=t.mode,r=Wm({mode:"visible",children:r.children},o),i=bs(i,o,n,null),i.flags|=2,r.return=t,i.return=t,r.sibling=i,t.child=r,us(t,e.child,null,n),r=t.child,r.memoizedState=qm(n),r.childLanes=Gm(e,s,n),t.memoizedState=Ym,t=i);else if(Xi(t),o.data==="$!"){if(s=o.nextSibling&&o.nextSibling.dataset,s)var l=s.dgst;s=l,r=Error(q(419)),r.stack="",r.digest=s,Qu({value:r,source:null,stack:null}),t=Xm(e,t,n)}else if(Ht||ul(e,t,n,!1),s=(n&e.childLanes)!==0,Ht||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,Wi(e,r),bn(s,e,r),UE}o.data==="$?"||w0(),t=Xm(e,t,n)}else o.data==="$?"?(t.flags|=128,t.child=e.child,t=I4.bind(null,e),o._reactRetry=t,t=null):(e=u.treeContext,Xt=xr(o.nextSibling),gn=t,Fe=!0,yr=null,Lr=!1,e!==null&&(er[tr++]=ii,er[tr++]=ai,er[tr++]=as,ii=e.id,ai=e.overflow,as=t),t=$m(t,r.children),t.flags|=4096);return t}return i?(Ki(),i=r.fallback,o=t.mode,u=e.child,l=u.sibling,r=sa(u,{mode:"hidden",children:r.children}),r.subtreeFlags=u.subtreeFlags&31457280,l!==null?i=sa(l,i):(i=bs(i,o,n,null),i.flags|=2),i.return=t,r.return=t,r.sibling=i,t.child=r,r=i,i=t.child,o=e.child.memoizedState,o===null?o=qm(n):(u=o.cachePool,u!==null?(l=Pt._currentValue,u=u.parent!==l?{parent:l,pool:l}:u):u=Wx(),o={baseLanes:o.baseLanes|n,cachePool:u}),i.memoizedState=o,i.childLanes=Gm(e,s,n),t.memoizedState=Ym,r):(Xi(t),n=e.child,e=n.sibling,n=sa(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 $m(e,t){return t=Wm({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function Wm(e,t){return vT(e,t,0,null)}function Xm(e,t,n){return us(t,e.child,null,n),e=$m(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function WE(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Jm(e.return,t,n)}function Km(e,t,n,r,i){var a=e.memoizedState;a===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(a.isBackwards=t,a.rendering=null,a.renderingStartTime=0,a.last=r,a.tail=n,a.tailMode=i)}function XE(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;if(Kt(e,t,r.children,n),r=It.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&&WE(e,n,t);else if(e.tag===19)WE(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(It,r),i){case"forwards":for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&Rd(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),Km(t,!1,i,n,a);break;case"backwards":for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&Rd(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}Km(t,!0,n,null,a);break;case"together":Km(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function ui(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),oa|=t.lanes,!(n&t.childLanes))if(e!==null){if(ul(e,t,n,!1),(n&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(q(153));if(t.child!==null){for(e=t.child,n=sa(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=sa(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function Qm(e,t){return e.lanes&t?!0:(e=e.dependencies,!!(e!==null&&Hd(e)))}function E4(e,t,n){switch(t.tag){case 3:id(t,t.stateNode.containerInfo),Ji(t,Pt,e.memoizedState.cache),Ku();break;case 27:case 5:zp(t);break;case 4:id(t,t.stateNode.containerInfo);break;case 10:Ji(t,t.type,t.memoizedProps.value);break;case 13:var r=t.memoizedState;if(r!==null)return r.dehydrated!==null?(Xi(t),t.flags|=128,null):n&t.child.childLanes?$E(e,t,n):(Xi(t),e=ui(e,t,n),e!==null?e.sibling:null);Xi(t);break;case 19:var i=(e.flags&128)!==0;if(r=(n&t.childLanes)!==0,r||(ul(e,t,n,!1),r=(n&t.childLanes)!==0),i){if(r)return XE(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),lt(It,It.current),r)break;return null;case 22:case 23:return t.lanes=0,HE(e,t,n);case 24:Ji(t,Pt,e.memoizedState.cache)}return ui(e,t,n)}function KE(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps)Ht=!0;else{if(!Qm(e,n)&&!(t.flags&128))return Ht=!1,E4(e,t,n);Ht=!!(e.flags&131072)}else Ht=!1,Fe&&t.flags&1048576&&Lx(t,Sd,t.index);switch(t.lanes=0,t.tag){case 16:e:{e=t.pendingProps;var r=t.elementType,i=r._init;if(r=i(r._payload),t.type=r,typeof r=="function")d0(r)?(e=hs(r,e),t.tag=1,t=qE(null,t,r,e,n)):(t.tag=0,t=Vm(null,t,r,e,n));else{if(r!=null){if(i=r.$$typeof,i===Dp){t.tag=11,t=jE(null,t,r,e,n);break e}else if(i===Ip){t.tag=14,t=FE(null,t,r,e,n);break e}}throw t=Pp(r)||r,Error(q(306,t,""))}}return t;case 0:return Vm(e,t,t.type,t.pendingProps,n);case 1:return r=t.type,i=hs(r,t.pendingProps),qE(e,t,r,i,n);case 3:e:{if(id(t,t.stateNode.containerInfo),e===null)throw Error(q(387));var a=t.pendingProps;i=t.memoizedState,r=i.element,n0(e,t),dl(t,a,null,n);var s=t.memoizedState;if(a=s.cache,Ji(t,Pt,a),a!==i.cache&&e0(t,[Pt],n,!0),cl(),a=s.element,i.isDehydrated)if(i={element:a,isDehydrated:!1,cache:s.cache},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){t=GE(e,t,a,n);break e}else if(a!==r){r=Jn(Error(q(424)),t),Qu(r),t=GE(e,t,a,n);break e}else for(Xt=xr(t.stateNode.containerInfo.firstChild),gn=t,Fe=!0,yr=null,Lr=!0,n=Vx(t,null,a,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Ku(),a===r){t=ui(e,t,n);break e}Kt(e,t,a,n)}t=t.child}return t;case 26:return ol(e,t),e===null?(n=JT(t.type,null,t.pendingProps,null))?t.memoizedState=n:Fe||(n=t.type,e=t.pendingProps,r=af(Yi.current).createElement(n),r[nn]=t,r[Tn]=e,Qt(r,n,e),zt(r),t.stateNode=r):t.memoizedState=JT(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return zp(t),e===null&&Fe&&(r=t.stateNode=KT(t.type,t.pendingProps,Yi.current),gn=t,Lr=!0,Xt=xr(r.firstChild)),r=t.pendingProps.children,e!==null||Fe?Kt(e,t,r,n):t.child=us(t,null,r,n),ol(e,t),t.child;case 5:return e===null&&Fe&&((i=r=Xt)&&(r=Q4(r,t.type,t.pendingProps,Lr),r!==null?(t.stateNode=r,gn=t,Xt=xr(r.firstChild),Lr=!1,i=!0):i=!1),i||os(t)),zp(t),i=t.type,a=t.pendingProps,s=e!==null?e.memoizedProps:null,r=a.children,B0(i,a)?r=null:s!==null&&B0(i,s)&&(t.flags|=32),t.memoizedState!==null&&(i=Sm(e,t,p4,null,null,n),Al._currentValue=i),ol(e,t),Kt(e,t,r,n),t.child;case 6:return e===null&&Fe&&((e=n=Xt)&&(n=Z4(n,t.pendingProps,Lr),n!==null?(t.stateNode=n,gn=t,Xt=null,e=!0):e=!1),e||os(t)),null;case 13:return $E(e,t,n);case 4:return id(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=us(t,null,r,n):Kt(e,t,r,n),t.child;case 11:return jE(e,t,t.type,t.pendingProps,n);case 7:return Kt(e,t,t.pendingProps,n),t.child;case 8:return Kt(e,t,t.pendingProps.children,n),t.child;case 12:return Kt(e,t,t.pendingProps.children,n),t.child;case 10:return r=t.pendingProps,Ji(t,t.type,r.value),Kt(e,t,r.children,n),t.child;case 9:return i=t.type._context,r=t.pendingProps.children,ms(t),i=rn(i),r=r(i),t.flags|=1,Kt(e,t,r,n),t.child;case 14:return FE(e,t,t.type,t.pendingProps,n);case 15:return zE(e,t,t.type,t.pendingProps,n);case 19:return XE(e,t,n);case 22:return HE(e,t,n);case 24:return ms(t),r=rn(Pt),e===null?(i=wm(),i===null&&(i=tt,a=Em(),i.pooledCache=a,a.refCount++,a!==null&&(i.pooledCacheLanes|=n),i=a),t.memoizedState={parent:r,cache:i},t0(t),Ji(t,Pt,i)):(e.lanes&n&&(n0(e,t),dl(t,null,null,n),cl()),i=e.memoizedState,a=t.memoizedState,i.parent!==r?(i={parent:r,cache:r},t.memoizedState=i,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=i),Ji(t,Pt,r)):(r=a.cache,Ji(t,Pt,r),r!==i.cache&&e0(t,[Pt],n,!0))),Kt(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(q(156,t.tag))}var Zm=Nr(null),ps=null,li=null;function Ji(e,t,n){lt(Zm,t._currentValue),t._currentValue=n}function ci(e){e._currentValue=Zm.current,Ft(Zm)}function Jm(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 e0(e,t,n,r){var i=e.child;for(i!==null&&(i.return=e);i!==null;){var a=i.dependencies;if(a!==null){var s=i.child;a=a.firstContext;e:for(;a!==null;){var o=a;a=i;for(var u=0;u<t.length;u++)if(o.context===t[u]){a.lanes|=n,o=a.alternate,o!==null&&(o.lanes|=n),Jm(a.return,n,e),r||(s=null);break e}a=o.next}}else if(i.tag===18){if(s=i.return,s===null)throw Error(q(341));s.lanes|=n,a=s.alternate,a!==null&&(a.lanes|=n),Jm(s,n,e),s=null}else s=i.child;if(s!==null)s.return=i;else for(s=i;s!==null;){if(s===e){s=null;break}if(i=s.sibling,i!==null){i.return=s.return,s=i;break}s=s.return}i=s}}function ul(e,t,n,r){e=null;for(var i=t,a=!1;i!==null;){if(!a){if(i.flags&524288)a=!0;else if(i.flags&262144)break}if(i.tag===10){var s=i.alternate;if(s===null)throw Error(q(387));if(s=s.memoizedProps,s!==null){var o=i.type;Ln(i.pendingProps.value,s.value)||(e!==null?e.push(o):e=[o])}}else if(i===rd.current){if(s=i.alternate,s===null)throw Error(q(387));s.memoizedState.memoizedState!==i.memoizedState.memoizedState&&(e!==null?e.push(Al):e=[Al])}i=i.return}e!==null&&e0(t,e,n,r),t.flags|=262144}function Hd(e){for(e=e.firstContext;e!==null;){if(!Ln(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function ms(e){ps=e,li=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function rn(e){return QE(ps,e)}function Vd(e,t){return ps===null&&ms(e),QE(e,t)}function QE(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},li===null){if(e===null)throw Error(q(308));li=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else li=li.next=t;return n}var ea=!1;function t0(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function n0(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 ta(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function na(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,pt&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=wd(e),Dx(e,null,n),t}return Td(e,r,t,n),wd(e)}function ll(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,Fv(e,n)}}function r0(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,a=null;if(n=n.firstBaseUpdate,n!==null){do{var s={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};a===null?i=a=s:a=a.next=s,n=n.next}while(n!==null);a===null?i=a=t:a=a.next=t}else i=a=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:r.shared,callbacks:r.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var i0=!1;function cl(){if(i0){var e=bo;if(e!==null)throw e}}function dl(e,t,n,r){i0=!1;var i=e.updateQueue;ea=!1;var a=i.firstBaseUpdate,s=i.lastBaseUpdate,o=i.shared.pending;if(o!==null){i.shared.pending=null;var u=o,l=u.next;u.next=null,s===null?a=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(a!==null){var d=i.baseState;s=0,c=l=u=null,o=a;do{var f=o.lane&-536870913,h=f!==o.lane;if(h?(Ie&f)===f:(r&f)===f){f!==0&&f===go&&(i0=!0),c!==null&&(c=c.next={lane:0,tag:o.tag,payload:o.payload,callback:null,next:null});e:{var g=e,b=o;f=t;var T=n;switch(b.tag){case 1:if(g=b.payload,typeof g=="function"){d=g.call(T,d,f);break e}d=g;break e;case 3:g.flags=g.flags&-65537|128;case 0:if(g=b.payload,f=typeof g=="function"?g.call(T,d,f):g,f==null)break e;d=at({},d,f);break e;case 2:ea=!0}}f=o.callback,f!==null&&(e.flags|=64,h&&(e.flags|=8192),h=i.callbacks,h===null?i.callbacks=[f]:h.push(f))}else h={lane:f,tag:o.tag,payload:o.payload,callback:o.callback,next:null},c===null?(l=c=h,u=d):c=c.next=h,s|=f;if(o=o.next,o===null){if(o=i.shared.pending,o===null)break;h=o,o=h.next,h.next=null,i.lastBaseUpdate=h,i.shared.pending=null}}while(!0);c===null&&(u=d),i.baseState=u,i.firstBaseUpdate=l,i.lastBaseUpdate=c,a===null&&(i.shared.lanes=0),oa|=s,e.lanes=s,e.memoizedState=d}}function ZE(e,t){if(typeof e!="function")throw Error(q(191,e));e.call(t)}function JE(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)ZE(n[e],t)}function fl(e,t){try{var n=t.updateQueue,r=n!==null?n.lastEffect:null;if(r!==null){var i=r.next;n=i;do{if((n.tag&e)===e){r=void 0;var a=n.create,s=n.inst;r=a(),s.destroy=r}n=n.next}while(n!==i)}}catch(o){Ke(t,t.return,o)}}function ra(e,t,n){try{var r=t.updateQueue,i=r!==null?r.lastEffect:null;if(i!==null){var a=i.next;r=a;do{if((r.tag&e)===e){var s=r.inst,o=s.destroy;if(o!==void 0){s.destroy=void 0,i=t;var u=n;try{o()}catch(l){Ke(i,u,l)}}}r=r.next}while(r!==a)}}catch(l){Ke(t,t.return,l)}}function eT(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{JE(t,n)}catch(r){Ke(e,e.return,r)}}}function tT(e,t,n){n.props=hs(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(r){Ke(e,t,r)}}function gs(e,t){try{var n=e.ref;if(n!==null){var r=e.stateNode;switch(e.tag){case 26:case 27:case 5:var i=r;break;default:i=r}typeof n=="function"?e.refCleanup=n(i):n.current=i}}catch(a){Ke(e,t,a)}}function In(e,t){var n=e.ref,r=e.refCleanup;if(n!==null)if(typeof r=="function")try{r()}catch(i){Ke(e,t,i)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n=="function")try{n(null)}catch(i){Ke(e,t,i)}else n.current=null}function nT(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(i){Ke(e,e.return,i)}}function rT(e,t,n){try{var r=e.stateNode;G4(r,e.type,n,t),r[Tn]=t}catch(i){Ke(e,e.return,i)}}function iT(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27||e.tag===4}function a0(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||iT(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 s0(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=rf));else if(r!==4&&r!==27&&(e=e.child,e!==null))for(s0(e,t,n),e=e.sibling;e!==null;)s0(e,t,n),e=e.sibling}function Yd(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&r!==27&&(e=e.child,e!==null))for(Yd(e,t,n),e=e.sibling;e!==null;)Yd(e,t,n),e=e.sibling}var di=!1,vt=!1,o0=!1,aT=typeof WeakSet=="function"?WeakSet:Set,Vt=null,sT=!1;function T4(e,t){if(e=e.containerInfo,I0=df,e=wx(e),lm(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,a=r.focusNode;r=r.focusOffset;try{n.nodeType,a.nodeType}catch{n=null;break e}var s=0,o=-1,u=-1,l=0,c=0,d=e,f=null;t:for(;;){for(var h;d!==n||i!==0&&d.nodeType!==3||(o=s+i),d!==a||r!==0&&d.nodeType!==3||(u=s+r),d.nodeType===3&&(s+=d.nodeValue.length),(h=d.firstChild)!==null;)f=d,d=h;for(;;){if(d===e)break t;if(f===n&&++l===i&&(o=s),f===a&&++c===r&&(u=s),(h=d.nextSibling)!==null)break;d=f,f=d.parentNode}d=h}n=o===-1||u===-1?null:{start:o,end:u}}else n=null}n=n||{start:0,end:0}}else n=null;for(P0={focusedElem:e,selectionRange:n},df=!1,Vt=t;Vt!==null;)if(t=Vt,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Vt=e;else for(;Vt!==null;){switch(t=Vt,a=t.alternate,e=t.flags,t.tag){case 0:break;case 11:case 15:break;case 1:if(e&1024&&a!==null){e=void 0,n=t,i=a.memoizedProps,a=a.memoizedState,r=n.stateNode;try{var g=hs(n.type,i,n.elementType===n.type);e=r.getSnapshotBeforeUpdate(g,a),r.__reactInternalSnapshotBeforeUpdate=e}catch(b){Ke(n,n.return,b)}}break;case 3:if(e&1024){if(e=t.stateNode.containerInfo,n=e.nodeType,n===9)F0(e);else if(n===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":F0(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(q(163))}if(e=t.sibling,e!==null){e.return=t.return,Vt=e;break}Vt=t.return}return g=sT,sT=!1,g}function oT(e,t,n){var r=n.flags;switch(n.tag){case 0:case 11:case 15:hi(e,n),r&4&&fl(5,n);break;case 1:if(hi(e,n),r&4)if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(o){Ke(n,n.return,o)}else{var i=hs(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}catch(o){Ke(n,n.return,o)}}r&64&&eT(n),r&512&&gs(n,n.return);break;case 3:if(hi(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{JE(r,e)}catch(o){Ke(n,n.return,o)}}break;case 26:hi(e,n),r&512&&gs(n,n.return);break;case 27:case 5:hi(e,n),t===null&&r&4&&nT(n),r&512&&gs(n,n.return);break;case 12:hi(e,n);break;case 13:hi(e,n),r&4&&cT(e,n);break;case 22:if(i=n.memoizedState!==null||di,!i){t=t!==null&&t.memoizedState!==null||vt;var a=di,s=vt;di=i,(vt=t)&&!s?ia(e,n,(n.subtreeFlags&8772)!==0):hi(e,n),di=a,vt=s}r&512&&(n.memoizedProps.mode==="manual"?gs(n,n.return):In(n,n.return));break;default:hi(e,n)}}function uT(e){var t=e.alternate;t!==null&&(e.alternate=null,uT(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&$p(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 Ot=null,Pn=!1;function fi(e,t,n){for(n=n.child;n!==null;)lT(e,t,n),n=n.sibling}function lT(e,t,n){if(Dn&&typeof Dn.onCommitFiberUnmount=="function")try{Dn.onCommitFiberUnmount(Iu,n)}catch{}switch(n.tag){case 26:vt||In(n,t),fi(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:vt||In(n,t);var r=Ot,i=Pn;for(Ot=n.stateNode,fi(e,t,n),n=n.stateNode,t=n.attributes;t.length;)n.removeAttributeNode(t[0]);$p(n),Ot=r,Pn=i;break;case 5:vt||In(n,t);case 6:i=Ot;var a=Pn;if(Ot=null,fi(e,t,n),Ot=i,Pn=a,Ot!==null)if(Pn)try{e=Ot,r=n.stateNode,e.nodeType===8?e.parentNode.removeChild(r):e.removeChild(r)}catch(s){Ke(n,t,s)}else try{Ot.removeChild(n.stateNode)}catch(s){Ke(n,t,s)}break;case 18:Ot!==null&&(Pn?(t=Ot,n=n.stateNode,t.nodeType===8?j0(t.parentNode,n):t.nodeType===1&&j0(t,n),Rl(t)):j0(Ot,n.stateNode));break;case 4:r=Ot,i=Pn,Ot=n.stateNode.containerInfo,Pn=!0,fi(e,t,n),Ot=r,Pn=i;break;case 0:case 11:case 14:case 15:vt||ra(2,n,t),vt||ra(4,n,t),fi(e,t,n);break;case 1:vt||(In(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"&&tT(n,t,r)),fi(e,t,n);break;case 21:fi(e,t,n);break;case 22:vt||In(n,t),vt=(r=vt)||n.memoizedState!==null,fi(e,t,n),vt=r;break;default:fi(e,t,n)}}function cT(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Rl(e)}catch(n){Ke(t,t.return,n)}}function w4(e){switch(e.tag){case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new aT),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new aT),t;default:throw Error(q(435,e.tag))}}function u0(e,t){var n=w4(e);t.forEach(function(r){var i=P4.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}function rr(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r],a=e,s=t,o=s;e:for(;o!==null;){switch(o.tag){case 27:case 5:Ot=o.stateNode,Pn=!1;break e;case 3:Ot=o.stateNode.containerInfo,Pn=!0;break e;case 4:Ot=o.stateNode.containerInfo,Pn=!0;break e}o=o.return}if(Ot===null)throw Error(q(160));lT(a,s,i),Ot=null,Pn=!1,a=i.alternate,a!==null&&(a.return=null),i.return=null}if(t.subtreeFlags&13878)for(t=t.child;t!==null;)dT(t,e),t=t.sibling}var vr=null;function dT(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:rr(t,e),ir(e),r&4&&(ra(3,e,e.return),fl(3,e),ra(5,e,e.return));break;case 1:rr(t,e),ir(e),r&512&&(vt||n===null||In(n,n.return)),r&64&&di&&(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 i=vr;if(rr(t,e),ir(e),r&512&&(vt||n===null||In(n,n.return)),r&4){var a=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,i=i.ownerDocument||i;t:switch(r){case"title":a=i.getElementsByTagName("title")[0],(!a||a[Uu]||a[nn]||a.namespaceURI==="http://www.w3.org/2000/svg"||a.hasAttribute("itemprop"))&&(a=i.createElement(r),i.head.insertBefore(a,i.querySelector("head > title"))),Qt(a,r,n),a[nn]=e,zt(a),r=a;break e;case"link":var s=n2("link","href",i).get(r+(n.href||""));if(s){for(var o=0;o<s.length;o++)if(a=s[o],a.getAttribute("href")===(n.href==null?null:n.href)&&a.getAttribute("rel")===(n.rel==null?null:n.rel)&&a.getAttribute("title")===(n.title==null?null:n.title)&&a.getAttribute("crossorigin")===(n.crossOrigin==null?null:n.crossOrigin)){s.splice(o,1);break t}}a=i.createElement(r),Qt(a,r,n),i.head.appendChild(a);break;case"meta":if(s=n2("meta","content",i).get(r+(n.content||""))){for(o=0;o<s.length;o++)if(a=s[o],a.getAttribute("content")===(n.content==null?null:""+n.content)&&a.getAttribute("name")===(n.name==null?null:n.name)&&a.getAttribute("property")===(n.property==null?null:n.property)&&a.getAttribute("http-equiv")===(n.httpEquiv==null?null:n.httpEquiv)&&a.getAttribute("charset")===(n.charSet==null?null:n.charSet)){s.splice(o,1);break t}}a=i.createElement(r),Qt(a,r,n),i.head.appendChild(a);break;default:throw Error(q(468,r))}a[nn]=e,zt(a),r=a}e.stateNode=r}else r2(i,e.type,e.stateNode);else e.stateNode=t2(i,r,e.memoizedProps);else a!==r?(a===null?n.stateNode!==null&&(n=n.stateNode,n.parentNode.removeChild(n)):a.count--,r===null?r2(i,e.type,e.stateNode):t2(i,r,e.memoizedProps)):r===null&&e.stateNode!==null&&rT(e,e.memoizedProps,n.memoizedProps)}break;case 27:if(r&4&&e.alternate===null){i=e.stateNode,a=e.memoizedProps;try{for(var u=i.firstChild;u;){var l=u.nextSibling,c=u.nodeName;u[Uu]||c==="HEAD"||c==="BODY"||c==="SCRIPT"||c==="STYLE"||c==="LINK"&&u.rel.toLowerCase()==="stylesheet"||i.removeChild(u),u=l}for(var d=e.type,f=i.attributes;f.length;)i.removeAttributeNode(f[0]);Qt(i,d,a),i[nn]=e,i[Tn]=a}catch(g){Ke(e,e.return,g)}}case 5:if(rr(t,e),ir(e),r&512&&(vt||n===null||In(n,n.return)),e.flags&32){i=e.stateNode;try{ro(i,"")}catch(g){Ke(e,e.return,g)}}r&4&&e.stateNode!=null&&(i=e.memoizedProps,rT(e,i,n!==null?n.memoizedProps:i)),r&1024&&(o0=!0);break;case 6:if(rr(t,e),ir(e),r&4){if(e.stateNode===null)throw Error(q(162));r=e.memoizedProps,n=e.stateNode;try{n.nodeValue=r}catch(g){Ke(e,e.return,g)}}break;case 3:if(uf=null,i=vr,vr=sf(t.containerInfo),rr(t,e),vr=i,ir(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Rl(t.containerInfo)}catch(g){Ke(e,e.return,g)}o0&&(o0=!1,fT(e));break;case 4:r=vr,vr=sf(e.stateNode.containerInfo),rr(t,e),ir(e),vr=r;break;case 12:rr(t,e),ir(e);break;case 13:rr(t,e),ir(e),e.child.flags&8192&&e.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&(b0=Mr()),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,u0(e,r)));break;case 22:if(r&512&&(vt||n===null||In(n,n.return)),u=e.memoizedState!==null,l=n!==null&&n.memoizedState!==null,c=di,d=vt,di=c||u,vt=d||l,rr(t,e),vt=d,di=c,ir(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=di||vt,n===null||l||t||Eo(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(i=l.stateNode,u)a=i.style,typeof a.setProperty=="function"?a.setProperty("display","none","important"):a.display="none";else{s=l.stateNode,o=l.memoizedProps.style;var h=o!=null&&o.hasOwnProperty("display")?o.display:null;s.style.display=h==null||typeof h=="boolean"?"":(""+h).trim()}}catch(g){Ke(l,l.return,g)}}}else if(t.tag===6){if(n===null){l=t;try{l.stateNode.nodeValue=u?"":l.memoizedProps}catch(g){Ke(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,u0(e,n))));break;case 19:rr(t,e),ir(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,u0(e,r)));break;case 21:break;default:rr(t,e),ir(e)}}function ir(e){var t=e.flags;if(t&2){try{if(e.tag!==27){e:{for(var n=e.return;n!==null;){if(iT(n)){var r=n;break e}n=n.return}throw Error(q(160))}switch(r.tag){case 27:var i=r.stateNode,a=a0(e);Yd(e,a,i);break;case 5:var s=r.stateNode;r.flags&32&&(ro(s,""),r.flags&=-33);var o=a0(e);Yd(e,o,s);break;case 3:case 4:var u=r.stateNode.containerInfo,l=a0(e);s0(e,l,u);break;default:throw Error(q(161))}}}catch(c){Ke(e,e.return,c)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function fT(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;fT(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function hi(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)oT(e,t.alternate,t),t=t.sibling}function Eo(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:ra(4,t,t.return),Eo(t);break;case 1:In(t,t.return);var n=t.stateNode;typeof n.componentWillUnmount=="function"&&tT(t,t.return,n),Eo(t);break;case 26:case 27:case 5:In(t,t.return),Eo(t);break;case 22:In(t,t.return),t.memoizedState===null&&Eo(t);break;default:Eo(t)}e=e.sibling}}function ia(e,t,n){for(n=n&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var r=t.alternate,i=e,a=t,s=a.flags;switch(a.tag){case 0:case 11:case 15:ia(i,a,n),fl(4,a);break;case 1:if(ia(i,a,n),r=a,i=r.stateNode,typeof i.componentDidMount=="function")try{i.componentDidMount()}catch(l){Ke(r,r.return,l)}if(r=a,i=r.updateQueue,i!==null){var o=r.stateNode;try{var u=i.shared.hiddenCallbacks;if(u!==null)for(i.shared.hiddenCallbacks=null,i=0;i<u.length;i++)ZE(u[i],o)}catch(l){Ke(r,r.return,l)}}n&&s&64&&eT(a),gs(a,a.return);break;case 26:case 27:case 5:ia(i,a,n),n&&r===null&&s&4&&nT(a),gs(a,a.return);break;case 12:ia(i,a,n);break;case 13:ia(i,a,n),n&&s&4&&cT(i,a);break;case 22:a.memoizedState===null&&ia(i,a,n),gs(a,a.return);break;default:ia(i,a,n)}t=t.sibling}}function l0(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&&nl(n))}function c0(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&nl(e))}function aa(e,t,n,r){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)hT(e,t,n,r),t=t.sibling}function hT(e,t,n,r){var i=t.flags;switch(t.tag){case 0:case 11:case 15:aa(e,t,n,r),i&2048&&fl(9,t);break;case 3:aa(e,t,n,r),i&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&nl(e)));break;case 12:if(i&2048){aa(e,t,n,r),e=t.stateNode;try{var a=t.memoizedProps,s=a.id,o=a.onPostCommit;typeof o=="function"&&o(s,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(u){Ke(t,t.return,u)}}else aa(e,t,n,r);break;case 23:break;case 22:a=t.stateNode,t.memoizedState!==null?a._visibility&4?aa(e,t,n,r):hl(e,t):a._visibility&4?aa(e,t,n,r):(a._visibility|=4,To(e,t,n,r,(t.subtreeFlags&10256)!==0)),i&2048&&l0(t.alternate,t);break;case 24:aa(e,t,n,r),i&2048&&c0(t.alternate,t);break;default:aa(e,t,n,r)}}function To(e,t,n,r,i){for(i=i&&(t.subtreeFlags&10256)!==0,t=t.child;t!==null;){var a=e,s=t,o=n,u=r,l=s.flags;switch(s.tag){case 0:case 11:case 15:To(a,s,o,u,i),fl(8,s);break;case 23:break;case 22:var c=s.stateNode;s.memoizedState!==null?c._visibility&4?To(a,s,o,u,i):hl(a,s):(c._visibility|=4,To(a,s,o,u,i)),i&&l&2048&&l0(s.alternate,s);break;case 24:To(a,s,o,u,i),i&&l&2048&&c0(s.alternate,s);break;default:To(a,s,o,u,i)}t=t.sibling}}function hl(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var n=e,r=t,i=r.flags;switch(r.tag){case 22:hl(n,r),i&2048&&l0(r.alternate,r);break;case 24:hl(n,r),i&2048&&c0(r.alternate,r);break;default:hl(n,r)}t=t.sibling}}var pl=8192;function wo(e){if(e.subtreeFlags&pl)for(e=e.child;e!==null;)pT(e),e=e.sibling}function pT(e){switch(e.tag){case 26:wo(e),e.flags&pl&&e.memoizedState!==null&&d5(vr,e.memoizedState,e.memoizedProps);break;case 5:wo(e);break;case 3:case 4:var t=vr;vr=sf(e.stateNode.containerInfo),wo(e),vr=t;break;case 22:e.memoizedState===null&&(t=e.alternate,t!==null&&t.memoizedState!==null?(t=pl,pl=16777216,wo(e),pl=t):wo(e));break;default:wo(e)}}function mT(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 ml(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];Vt=r,bT(r,e)}mT(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)gT(e),e=e.sibling}function gT(e){switch(e.tag){case 0:case 11:case 15:ml(e),e.flags&2048&&ra(9,e,e.return);break;case 3:ml(e);break;case 12:ml(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)):ml(e);break;default:ml(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];Vt=r,bT(r,e)}mT(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:ra(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 bT(e,t){for(;Vt!==null;){var n=Vt;switch(n.tag){case 0:case 11:case 15:ra(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:nl(n.memoizedState.cache)}if(r=n.child,r!==null)r.return=n,Vt=r;else e:for(n=e;Vt!==null;){r=Vt;var i=r.sibling,a=r.return;if(uT(r),r===n){Vt=null;break e}if(i!==null){i.return=a,Vt=i;break e}Vt=a}}}function _4(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 ar(e,t,n,r){return new _4(e,t,n,r)}function d0(e){return e=e.prototype,!(!e||!e.isReactComponent)}function sa(e,t){var n=e.alternate;return n===null?(n=ar(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 yT(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 Gd(e,t,n,r,i,a){var s=0;if(r=e,typeof e=="function")d0(e)&&(s=1);else if(typeof e=="string")s=l5(e,n,Dr.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case Ws:return bs(n.children,i,a,t);case Sv:s=8,i|=24;break;case Np:return e=ar(12,n,t,i|2),e.elementType=Np,e.lanes=a,e;case Mp:return e=ar(13,n,t,i),e.elementType=Mp,e.lanes=a,e;case Lp:return e=ar(19,n,t,i),e.elementType=Lp,e.lanes=a,e;case Cv:return vT(n,i,a,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case XN:case ti:s=10;break e;case Av:s=9;break e;case Dp:s=11;break e;case Ip:s=14;break e;case Vi:s=16,r=null;break e}s=29,n=Error(q(130,e===null?"null":typeof e,"")),r=null}return t=ar(s,n,t,i),t.elementType=e,t.type=r,t.lanes=a,t}function bs(e,t,n,r){return e=ar(7,e,r,t),e.lanes=n,e}function vT(e,t,n,r){e=ar(22,e,r,t),e.elementType=Cv,e.lanes=n;var i={_visibility:1,_pendingVisibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null,_current:null,detach:function(){var a=i._current;if(a===null)throw Error(q(456));if(!(i._pendingVisibility&2)){var s=Wi(a,2);s!==null&&(i._pendingVisibility|=2,bn(s,a,2))}},attach:function(){var a=i._current;if(a===null)throw Error(q(456));if(i._pendingVisibility&2){var s=Wi(a,2);s!==null&&(i._pendingVisibility&=-3,bn(s,a,2))}}};return e.stateNode=i,e}function f0(e,t,n){return e=ar(6,e,null,t),e.lanes=n,e}function h0(e,t,n){return t=ar(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function pi(e){e.flags|=4}function xT(e,t){if(t.type!=="stylesheet"||t.state.loading&4)e.flags&=-16777217;else if(e.flags|=16777216,!i2(t)){if(t=nr.current,t!==null&&((Ie&4194176)===Ie?Ir!==null:(Ie&62914560)!==Ie&&!(Ie&536870912)||t!==Ir))throw Ju=ym,Bx;e.flags|=8192}}function $d(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?Uv():536870912,e.lanes|=t,So|=t)}function gl(e,t){if(!Fe)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 i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&31457280,r|=i.flags&31457280,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function S4(e,t,n){var r=t.pendingProps;switch(gm(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),ci(Pt),Qs(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(Xu(t)?pi(t):e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,yr!==null&&(E0(yr),yr=null))),ht(t),null;case 26:return n=t.memoizedState,e===null?(pi(t),n!==null?(ht(t),xT(t,n)):(ht(t),t.flags&=-16777217)):n?n!==e.memoizedState?(pi(t),ht(t),xT(t,n)):(ht(t),t.flags&=-16777217):(e.memoizedProps!==r&&pi(t),ht(t),t.flags&=-16777217),null;case 27:ad(t),n=Yi.current;var i=t.type;if(e!==null&&t.stateNode!=null)e.memoizedProps!==r&&pi(t);else{if(!r){if(t.stateNode===null)throw Error(q(166));return ht(t),null}e=Dr.current,Xu(t)?Ix(t):(e=KT(i,r,n),t.stateNode=e,pi(t))}return ht(t),null;case 5:if(ad(t),n=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&pi(t);else{if(!r){if(t.stateNode===null)throw Error(q(166));return ht(t),null}if(e=Dr.current,Xu(t))Ix(t);else{switch(i=af(Yi.current),e){case 1:e=i.createElementNS("http://www.w3.org/2000/svg",n);break;case 2:e=i.createElementNS("http://www.w3.org/1998/Math/MathML",n);break;default:switch(n){case"svg":e=i.createElementNS("http://www.w3.org/2000/svg",n);break;case"math":e=i.createElementNS("http://www.w3.org/1998/Math/MathML",n);break;case"script":e=i.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild);break;case"select":e=typeof r.is=="string"?i.createElement("select",{is:r.is}):i.createElement("select"),r.multiple?e.multiple=!0:r.size&&(e.size=r.size);break;default:e=typeof r.is=="string"?i.createElement(n,{is:r.is}):i.createElement(n)}}e[nn]=t,e[Tn]=r;e:for(i=t.child;i!==null;){if(i.tag===5||i.tag===6)e.appendChild(i.stateNode);else if(i.tag!==4&&i.tag!==27&&i.child!==null){i.child.return=i,i=i.child;continue}if(i===t)break e;for(;i.sibling===null;){if(i.return===null||i.return===t)break e;i=i.return}i.sibling.return=i.return,i=i.sibling}t.stateNode=e;e:switch(Qt(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&&pi(t)}}return ht(t),t.flags&=-16777217,null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&pi(t);else{if(typeof r!="string"&&t.stateNode===null)throw Error(q(166));if(e=Yi.current,Xu(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,i=gn,i!==null)switch(i.tag){case 27:case 5:r=i.memoizedProps}e[nn]=t,e=!!(e.nodeValue===n||r!==null&&r.suppressHydrationWarning===!0||YT(e.nodeValue,n)),e||os(t)}else e=af(e).createTextNode(r),e[nn]=t,t.stateNode=e}return ht(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(i=Xu(t),r!==null&&r.dehydrated!==null){if(e===null){if(!i)throw Error(q(318));if(i=t.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(q(317));i[nn]=t}else Ku(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;ht(t),i=!1}else yr!==null&&(E0(yr),yr=null),i=!0;if(!i)return t.flags&256?(si(t),t):(si(t),null)}if(si(t),t.flags&128)return t.lanes=n,t;if(n=r!==null,e=e!==null&&e.memoizedState!==null,n){r=t.child,i=null,r.alternate!==null&&r.alternate.memoizedState!==null&&r.alternate.memoizedState.cachePool!==null&&(i=r.alternate.memoizedState.cachePool.pool);var a=null;r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(a=r.memoizedState.cachePool.pool),a!==i&&(r.flags|=2048)}return n!==e&&n&&(t.child.flags|=8192),$d(t,t.updateQueue),ht(t),null;case 4:return Qs(),e===null&&D0(t.stateNode.containerInfo),ht(t),null;case 10:return ci(t.type),ht(t),null;case 19:if(Ft(It),i=t.memoizedState,i===null)return ht(t),null;if(r=(t.flags&128)!==0,a=i.rendering,a===null)if(r)gl(i,!1);else{if(xt!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(a=Rd(e),a!==null){for(t.flags|=128,gl(i,!1),e=a.updateQueue,t.updateQueue=e,$d(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)yT(n,e),n=n.sibling;return lt(It,It.current&1|2),t.child}e=e.sibling}i.tail!==null&&Mr()>Wd&&(t.flags|=128,r=!0,gl(i,!1),t.lanes=4194304)}else{if(!r)if(e=Rd(a),e!==null){if(t.flags|=128,r=!0,e=e.updateQueue,t.updateQueue=e,$d(t,e),gl(i,!0),i.tail===null&&i.tailMode==="hidden"&&!a.alternate&&!Fe)return ht(t),null}else 2*Mr()-i.renderingStartTime>Wd&&n!==536870912&&(t.flags|=128,r=!0,gl(i,!1),t.lanes=4194304);i.isBackwards?(a.sibling=t.child,t.child=a):(e=i.last,e!==null?e.sibling=a:t.child=a,i.last=a)}return i.tail!==null?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=Mr(),t.sibling=null,e=It.current,lt(It,r?e&1|2:e&1),t):(ht(t),null);case 22:case 23:return si(t),xm(),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&&$d(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&&Ft(ls),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),ci(Pt),ht(t),null;case 25:return null}throw Error(q(156,t.tag))}function A4(e,t){switch(gm(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return ci(Pt),Qs(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return ad(t),null;case 13:if(si(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(q(340));Ku()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Ft(It),null;case 4:return Qs(),null;case 10:return ci(t.type),null;case 22:case 23:return si(t),xm(),e!==null&&Ft(ls),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return ci(Pt),null;case 25:return null;default:return null}}function ET(e,t){switch(gm(t),t.tag){case 3:ci(Pt),Qs();break;case 26:case 27:case 5:ad(t);break;case 4:Qs();break;case 13:si(t);break;case 19:Ft(It);break;case 10:ci(t.type);break;case 22:case 23:si(t),xm(),e!==null&&Ft(ls);break;case 24:ci(Pt)}}var C4={getCacheForType:function(e){var t=rn(Pt),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n}},k4=typeof WeakMap=="function"?WeakMap:Map,pt=0,tt=null,Re=null,Ie=0,nt=0,Bn=null,mi=!1,_o=!1,p0=!1,gi=0,xt=0,oa=0,ys=0,m0=0,sr=0,So=0,bl=null,Br=null,g0=!1,b0=0,Wd=1/0,Xd=null,ua=null,Kd=!1,vs=null,yl=0,y0=0,v0=null,vl=0,x0=null;function Un(){if(pt&2&&Ie!==0)return Ie&-Ie;if(xe.T!==null){var e=go;return e!==0?e:k0()}return Hv()}function TT(){sr===0&&(sr=!(Ie&536870912)||Fe?Bv():536870912);var e=nr.current;return e!==null&&(e.flags|=32),sr}function bn(e,t,n){(e===tt&&nt===2||e.cancelPendingCommit!==null)&&(Ao(e,0),bi(e,Ie,sr,!1)),Bu(e,n),(!(pt&2)||e!==tt)&&(e===tt&&(!(pt&2)&&(ys|=n),xt===4&&bi(e,Ie,sr,!1)),Ur(e))}function wT(e,t,n){if(pt&6)throw Error(q(327));var r=!n&&(t&60)===0&&(t&e.expiredLanes)===0||Pu(e,t),i=r?N4(e,t):_0(e,t,!0),a=r;do{if(i===0){_o&&!r&&bi(e,t,0,!1);break}else if(i===6)bi(e,t,0,!mi);else{if(n=e.current.alternate,a&&!O4(n)){i=_0(e,t,!1),a=!1;continue}if(i===2){if(a=t,e.errorRecoveryDisabledLanes&a)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;i=bl;var u=o.current.memoizedState.isDehydrated;if(u&&(Ao(o,s).flags|=256),s=_0(o,s,!1),s!==2){if(p0&&!u){o.errorRecoveryDisabledLanes|=a,ys|=a,i=4;break e}a=Br,Br=i,a!==null&&E0(a)}i=s}if(a=!1,i!==2)continue}}if(i===1){Ao(e,0),bi(e,t,0,!0);break}e:{switch(r=e,i){case 0:case 1:throw Error(q(345));case 4:if((t&4194176)===t){bi(r,t,sr,!mi);break e}break;case 2:Br=null;break;case 3:case 5:break;default:throw Error(q(329))}if(r.finishedWork=n,r.finishedLanes=t,(t&62914560)===t&&(a=b0+300-Mr(),10<a)){if(bi(r,t,sr,!mi),ld(r,0)!==0)break e;r.timeoutHandle=$T(_T.bind(null,r,n,Br,Xd,g0,t,sr,ys,So,mi,2,-0,0),a);break e}_T(r,n,Br,Xd,g0,t,sr,ys,So,mi,0,-0,0)}}break}while(!0);Ur(e)}function E0(e){Br===null?Br=e:Br.push.apply(Br,e)}function _T(e,t,n,r,i,a,s,o,u,l,c,d,f){var h=t.subtreeFlags;if((h&8192||(h&16785408)===16785408)&&(Sl={stylesheets:null,count:0,unsuspend:c5},pT(t),t=f5(),t!==null)){e.cancelPendingCommit=t(NT.bind(null,e,n,r,i,s,o,u,1,d,f)),bi(e,a,s,!l);return}NT(e,n,r,i,s,o,u,c,d,f)}function O4(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 i=n[r],a=i.getSnapshot;i=i.value;try{if(!Ln(a(),i))return!1}catch{return!1}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function bi(e,t,n,r){t&=~m0,t&=~ys,e.suspendedLanes|=t,e.pingedLanes&=~t,r&&(e.warmLanes|=t),r=e.expirationTimes;for(var i=t;0<i;){var a=31-Mn(i),s=1<<a;r[a]=-1,i&=~s}n!==0&&jv(e,n,t)}function Qd(){return pt&6?!0:(xl(0),!1)}function T0(){if(Re!==null){if(nt===0)var e=Re.return;else e=Re,li=ps=null,km(e),po=null,el=0,e=Re;for(;e!==null;)ET(e.alternate,e),e=e.return;Re=null}}function Ao(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;n!==-1&&(e.timeoutHandle=-1,W4(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),T0(),tt=e,Re=n=sa(e.current,null),Ie=t,nt=0,Bn=null,mi=!1,_o=Pu(e,t),p0=!1,So=sr=m0=ys=oa=xt=0,Br=bl=null,g0=!1,t&8&&(t|=t&32);var r=e.entangledLanes;if(r!==0)for(e=e.entanglements,r&=t;0<r;){var i=31-Mn(r),a=1<<i;t|=e[i],r&=~a}return gi=t,Ed(),n}function ST(e,t){ke=null,xe.H=Pr,t===Zu?(t=Fx(),nt=3):t===Bx?(t=Fx(),nt=4):nt=t===UE?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,Bn=t,Re===null&&(xt=1,zd(e,Jn(t,e.current)))}function AT(){var e=xe.H;return xe.H=Pr,e===null?Pr:e}function CT(){var e=xe.A;return xe.A=C4,e}function w0(){xt=4,mi||(Ie&4194176)!==Ie&&nr.current!==null||(_o=!0),!(oa&134217727)&&!(ys&134217727)||tt===null||bi(tt,Ie,sr,!1)}function _0(e,t,n){var r=pt;pt|=2;var i=AT(),a=CT();(tt!==e||Ie!==t)&&(Xd=null,Ao(e,t)),t=!1;var s=xt;e:do try{if(nt!==0&&Re!==null){var o=Re,u=Bn;switch(nt){case 8:T0(),s=6;break e;case 3:case 2:case 6:nr.current===null&&(t=!0);var l=nt;if(nt=0,Bn=null,Co(e,o,u,l),n&&_o){s=0;break e}break;default:l=nt,nt=0,Bn=null,Co(e,o,u,l)}}R4(),s=xt;break}catch(c){ST(e,c)}while(!0);return t&&e.shellSuspendCounter++,li=ps=null,pt=r,xe.H=i,xe.A=a,Re===null&&(tt=null,Ie=0,Ed()),s}function R4(){for(;Re!==null;)kT(Re)}function N4(e,t){var n=pt;pt|=2;var r=AT(),i=CT();tt!==e||Ie!==t?(Xd=null,Wd=Mr()+500,Ao(e,t)):_o=Pu(e,t);e:do try{if(nt!==0&&Re!==null){t=Re;var a=Bn;t:switch(nt){case 1:nt=0,Bn=null,Co(e,t,a,1);break;case 2:if(Ux(a)){nt=0,Bn=null,OT(t);break}t=function(){nt===2&&tt===e&&(nt=7),Ur(e)},a.then(t,t);break e;case 3:nt=7;break e;case 4:nt=5;break e;case 7:Ux(a)?(nt=0,Bn=null,OT(t)):(nt=0,Bn=null,Co(e,t,a,7));break;case 5:var s=null;switch(Re.tag){case 26:s=Re.memoizedState;case 5:case 27:var o=Re;if(!s||i2(s)){nt=0,Bn=null;var u=o.sibling;if(u!==null)Re=u;else{var l=o.return;l!==null?(Re=l,Zd(l)):Re=null}break t}}nt=0,Bn=null,Co(e,t,a,5);break;case 6:nt=0,Bn=null,Co(e,t,a,6);break;case 8:T0(),xt=6;break e;default:throw Error(q(462))}}D4();break}catch(c){ST(e,c)}while(!0);return li=ps=null,xe.H=r,xe.A=i,pt=n,Re!==null?0:(tt=null,Ie=0,Ed(),xt)}function D4(){for(;Re!==null&&!eD();)kT(Re)}function kT(e){var t=KE(e.alternate,e,gi);e.memoizedProps=e.pendingProps,t===null?Zd(e):Re=t}function OT(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=YE(n,t,t.pendingProps,t.type,void 0,Ie);break;case 11:t=YE(n,t,t.pendingProps,t.type.render,t.ref,Ie);break;case 5:km(t);default:ET(n,t),t=Re=yT(t,gi),t=KE(n,t,gi)}e.memoizedProps=e.pendingProps,t===null?Zd(e):Re=t}function Co(e,t,n,r){li=ps=null,km(t),po=null,el=0;var i=t.return;try{if(x4(e,i,t,n,Ie)){xt=1,zd(e,Jn(n,e.current)),Re=null;return}}catch(a){if(i!==null)throw Re=i,a;xt=1,zd(e,Jn(n,e.current)),Re=null;return}t.flags&32768?(Fe||r===1?e=!0:_o||Ie&536870912?e=!1:(mi=e=!0,(r===2||r===3||r===6)&&(r=nr.current,r!==null&&r.tag===13&&(r.flags|=16384))),RT(t,e)):Zd(t)}function Zd(e){var t=e;do{if(t.flags&32768){RT(t,mi);return}e=t.return;var n=S4(t.alternate,t,gi);if(n!==null){Re=n;return}if(t=t.sibling,t!==null){Re=t;return}Re=t=e}while(t!==null);xt===0&&(xt=5)}function RT(e,t){do{var n=A4(e.alternate,e);if(n!==null){n.flags&=32767,Re=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){Re=e;return}Re=e=n}while(e!==null);xt=6,Re=null}function NT(e,t,n,r,i,a,s,o,u,l){var c=xe.T,d=st.p;try{st.p=2,xe.T=null,M4(e,t,n,r,d,i,a,s,o,u,l)}finally{xe.T=c,st.p=d}}function M4(e,t,n,r,i,a,s,o){do ko();while(vs!==null);if(pt&6)throw Error(q(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(q(177));e.callbackNode=null,e.callbackPriority=0,e.cancelPendingCommit=null;var l=u.lanes|u.childLanes;if(l|=hm,dD(e,r,l,a,s,o),e===tt&&(Re=tt=null,Ie=0),!(u.subtreeFlags&10256)&&!(u.flags&10256)||Kd||(Kd=!0,y0=l,v0=n,B4(sd,function(){return ko(),null})),n=(u.flags&15990)!==0,u.subtreeFlags&15990||n?(n=xe.T,xe.T=null,a=st.p,st.p=2,s=pt,pt|=4,T4(e,u),dT(u,e),r4(P0,e.containerInfo),df=!!I0,P0=I0=null,e.current=u,oT(e,u.alternate,u),tD(),pt=s,st.p=a,xe.T=n):e.current=u,Kd?(Kd=!1,vs=e,yl=r):DT(e,l),l=e.pendingLanes,l===0&&(ua=null),sD(u.stateNode),Ur(e),t!==null)for(i=e.onRecoverableError,u=0;u<t.length;u++)l=t[u],i(l.value,{componentStack:l.stack});return yl&3&&ko(),l=e.pendingLanes,r&4194218&&l&42?e===x0?vl++:(vl=0,x0=e):vl=0,xl(0),null}function DT(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,nl(t)))}function ko(){if(vs!==null){var e=vs,t=y0;y0=0;var n=zv(yl),r=xe.T,i=st.p;try{if(st.p=32>n?32:n,xe.T=null,vs===null)var a=!1;else{n=v0,v0=null;var s=vs,o=yl;if(vs=null,yl=0,pt&6)throw Error(q(331));var u=pt;if(pt|=4,gT(s.current),hT(s,s.current,o,n),pt=u,xl(0,!1),Dn&&typeof Dn.onPostCommitFiberRoot=="function")try{Dn.onPostCommitFiberRoot(Iu,s)}catch{}a=!0}return a}finally{st.p=i,xe.T=r,DT(e,t)}}return!1}function MT(e,t,n){t=Jn(n,t),t=Hm(e.stateNode,t,2),e=na(e,t,2),e!==null&&(Bu(e,2),Ur(e))}function Ke(e,t,n){if(e.tag===3)MT(e,e,n);else for(;t!==null;){if(t.tag===3){MT(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(ua===null||!ua.has(r))){e=Jn(n,e),n=PE(2),r=na(t,n,2),r!==null&&(BE(n,r,t,e),Bu(r,2),Ur(r));break}}t=t.return}}function S0(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new k4;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(p0=!0,i.add(n),e=L4.bind(null,e,t,n),t.then(e,e))}function L4(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,tt===e&&(Ie&n)===n&&(xt===4||xt===3&&(Ie&62914560)===Ie&&300>Mr()-b0?!(pt&2)&&Ao(e,0):m0|=n,So===Ie&&(So=0)),Ur(e)}function LT(e,t){t===0&&(t=Uv()),e=Wi(e,t),e!==null&&(Bu(e,t),Ur(e))}function I4(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),LT(e,n)}function P4(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(q(314))}r!==null&&r.delete(t),LT(e,n)}function B4(e,t){return Vp(e,t)}var Jd=null,Oo=null,A0=!1,ef=!1,C0=!1,xs=0;function Ur(e){e!==Oo&&e.next===null&&(Oo===null?Jd=Oo=e:Oo=Oo.next=e),ef=!0,A0||(A0=!0,j4(U4))}function xl(e,t){if(!C0&&ef){C0=!0;do for(var n=!1,r=Jd;r!==null;){if(e!==0){var i=r.pendingLanes;if(i===0)var a=0;else{var s=r.suspendedLanes,o=r.pingedLanes;a=(1<<31-Mn(42|e)+1)-1,a&=i&~(s&~o),a=a&201326677?a&201326677|1:a?a|2:0}a!==0&&(n=!0,BT(r,a))}else a=Ie,a=ld(r,r===tt?a:0),!(a&3)||Pu(r,a)||(n=!0,BT(r,a));r=r.next}while(n);C0=!1}}function U4(){ef=A0=!1;var e=0;xs!==0&&($4()&&(e=xs),xs=0);for(var t=Mr(),n=null,r=Jd;r!==null;){var i=r.next,a=IT(r,t);a===0?(r.next=null,n===null?Jd=i:n.next=i,i===null&&(Oo=n)):(n=r,(e!==0||a&3)&&(ef=!0)),r=i}xl(e)}function IT(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes&-62914561;0<a;){var s=31-Mn(a),o=1<<s,u=i[s];u===-1?(!(o&n)||o&r)&&(i[s]=cD(o,t)):u<=t&&(e.expiredLanes|=o),a&=~o}if(t=tt,n=Ie,n=ld(e,e===t?n:0),r=e.callbackNode,n===0||e===t&&nt===2||e.cancelPendingCommit!==null)return r!==null&&r!==null&&Yp(r),e.callbackNode=null,e.callbackPriority=0;if(!(n&3)||Pu(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(r!==null&&Yp(r),zv(n)){case 2:case 8:n=Iv;break;case 32:n=sd;break;case 268435456:n=Pv;break;default:n=sd}return r=PT.bind(null,e),n=Vp(n,r),e.callbackPriority=t,e.callbackNode=n,t}return r!==null&&r!==null&&Yp(r),e.callbackPriority=2,e.callbackNode=null,2}function PT(e,t){var n=e.callbackNode;if(ko()&&e.callbackNode!==n)return null;var r=Ie;return r=ld(e,e===tt?r:0),r===0?null:(wT(e,r,t),IT(e,Mr()),e.callbackNode!=null&&e.callbackNode===n?PT.bind(null,e):null)}function BT(e,t){if(ko())return null;wT(e,t,!0)}function j4(e){X4(function(){pt&6?Vp(Lv,e):e()})}function k0(){return xs===0&&(xs=Bv()),xs}function UT(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:pd(""+e)}function jT(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 F4(e,t,n,r,i){if(t==="submit"&&n&&n.stateNode===i){var a=UT((i[Tn]||null).action),s=r.submitter;s&&(t=(t=s[Tn]||null)?UT(t.formAction):s.getAttribute("formAction"),t!==null&&(a=t,s=null));var o=new yd("action","action",null,r,i);e.push({event:o,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(xs!==0){var u=s?jT(i,s):new FormData(i);Bm(n,{pending:!0,data:u,method:i.method,action:a},null,u)}}else typeof a=="function"&&(o.preventDefault(),u=s?jT(i,s):new FormData(i),Bm(n,{pending:!0,data:u,method:i.method,action:a},a,u))},currentTarget:i}]})}}for(var O0=0;O0<Nx.length;O0++){var R0=Nx[O0],z4=R0.toLowerCase(),H4=R0[0].toUpperCase()+R0.slice(1);br(z4,"on"+H4)}br(Ax,"onAnimationEnd"),br(Cx,"onAnimationIteration"),br(kx,"onAnimationStart"),br("dblclick","onDoubleClick"),br("focusin","onFocus"),br("focusout","onBlur"),br(a4,"onTransitionRun"),br(s4,"onTransitionStart"),br(o4,"onTransitionCancel"),br(Ox,"onTransitionEnd"),to("onMouseEnter",["mouseout","mouseover"]),to("onMouseLeave",["mouseout","mouseover"]),to("onPointerEnter",["pointerout","pointerover"]),to("onPointerLeave",["pointerout","pointerover"]),ts("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),ts("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),ts("onBeforeInput",["compositionend","keypress","textInput","paste"]),ts("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),ts("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),ts("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var El="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(" "),V4=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(El));function FT(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;e:{var a=void 0;if(t)for(var s=r.length-1;0<=s;s--){var o=r[s],u=o.instance,l=o.currentTarget;if(o=o.listener,u!==a&&i.isPropagationStopped())break e;a=o,i.currentTarget=l;try{a(i)}catch(c){Fd(c)}i.currentTarget=null,a=u}else for(s=0;s<r.length;s++){if(o=r[s],u=o.instance,l=o.currentTarget,o=o.listener,u!==a&&i.isPropagationStopped())break e;a=o,i.currentTarget=l;try{a(i)}catch(c){Fd(c)}i.currentTarget=null,a=u}}}}function Le(e,t){var n=t[Gp];n===void 0&&(n=t[Gp]=new Set);var r=e+"__bubble";n.has(r)||(zT(t,e,2,!1),n.add(r))}function N0(e,t,n){var r=0;t&&(r|=4),zT(n,e,r,t)}var tf="_reactListening"+Math.random().toString(36).slice(2);function D0(e){if(!e[tf]){e[tf]=!0,Yv.forEach(function(n){n!=="selectionchange"&&(V4.has(n)||N0(n,!1,e),N0(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[tf]||(t[tf]=!0,N0("selectionchange",!1,t))}}function zT(e,t,n,r){switch(c2(t)){case 2:var i=m5;break;case 8:i=g5;break;default:i=q0}n=i.bind(null,t,n,e),i=void 0,!em||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(i=!0),r?i!==void 0?e.addEventListener(t,n,{capture:!0,passive:i}):e.addEventListener(t,n,!0):i!==void 0?e.addEventListener(t,n,{passive:i}):e.addEventListener(t,n,!1)}function M0(e,t,n,r,i){var a=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===i||o.nodeType===8&&o.parentNode===i)break;if(s===4)for(s=r.return;s!==null;){var u=s.tag;if((u===3||u===4)&&(u=s.stateNode.containerInfo,u===i||u.nodeType===8&&u.parentNode===i))return;s=s.return}for(;o!==null;){if(s=es(o),s===null)return;if(u=s.tag,u===5||u===6||u===26||u===27){r=a=s;continue e}o=o.parentNode}}r=r.return}nx(function(){var l=a,c=Zp(n),d=[];e:{var f=Rx.get(e);if(f!==void 0){var h=yd,g=e;switch(e){case"keypress":if(gd(n)===0)break e;case"keydown":case"keyup":h=PD;break;case"focusin":g="focus",h=im;break;case"focusout":g="blur",h=im;break;case"beforeblur":case"afterblur":h=im;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":h=ax;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":h=_D;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":h=jD;break;case Ax:case Cx:case kx:h=CD;break;case Ox:h=zD;break;case"scroll":case"scrollend":h=TD;break;case"wheel":h=VD;break;case"copy":case"cut":case"paste":h=OD;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":h=ox;break;case"toggle":case"beforetoggle":h=qD}var b=(t&4)!==0,T=!b&&(e==="scroll"||e==="scrollend"),m=b?f!==null?f+"Capture":null:f;b=[];for(var y=l,x;y!==null;){var w=y;if(x=w.stateNode,w=w.tag,w!==5&&w!==26&&w!==27||x===null||m===null||(w=Fu(y,m),w!=null&&b.push(Tl(y,w,x))),T)break;y=y.return}0<b.length&&(f=new h(f,g,null,n,c),d.push({event:f,listeners:b}))}}if(!(t&7)){e:{if(f=e==="mouseover"||e==="pointerover",h=e==="mouseout"||e==="pointerout",f&&n!==Qp&&(g=n.relatedTarget||n.fromElement)&&(es(g)||g[Zs]))break e;if((h||f)&&(f=c.window===c?c:(f=c.ownerDocument)?f.defaultView||f.parentWindow:window,h?(g=n.relatedTarget||n.toElement,h=l,g=g?es(g):null,g!==null&&(T=Xs(g),b=g.tag,g!==T||b!==5&&b!==27&&b!==6)&&(g=null)):(h=null,g=l),h!==g)){if(b=ax,w="onMouseLeave",m="onMouseEnter",y="mouse",(e==="pointerout"||e==="pointerover")&&(b=ox,w="onPointerLeave",m="onPointerEnter",y="pointer"),T=h==null?f:ju(h),x=g==null?f:ju(g),f=new b(w,y+"leave",h,n,c),f.target=T,f.relatedTarget=x,w=null,es(c)===l&&(b=new b(m,y+"enter",g,n,c),b.target=x,b.relatedTarget=T,w=b),T=w,h&&g)t:{for(b=h,m=g,y=0,x=b;x;x=Ro(x))y++;for(x=0,w=m;w;w=Ro(w))x++;for(;0<y-x;)b=Ro(b),y--;for(;0<x-y;)m=Ro(m),x--;for(;y--;){if(b===m||m!==null&&b===m.alternate)break t;b=Ro(b),m=Ro(m)}b=null}else b=null;h!==null&&HT(d,f,h,b,!1),g!==null&&T!==null&&HT(d,T,g,b,!0)}}e:{if(f=l?ju(l):window,h=f.nodeName&&f.nodeName.toLowerCase(),h==="select"||h==="input"&&f.type==="file")var _=mx;else if(hx(f))if(gx)_=t4;else{_=JD;var A=ZD}else h=f.nodeName,!h||h.toLowerCase()!=="input"||f.type!=="checkbox"&&f.type!=="radio"?l&&Kp(l.elementType)&&(_=mx):_=e4;if(_&&(_=_(e,l))){px(d,_,n,c);break e}A&&A(e,f,l),e==="focusout"&&l&&f.type==="number"&&l.memoizedProps.value!=null&&Xp(f,"number",f.value)}switch(A=l?ju(l):window,e){case"focusin":(hx(A)||A.contentEditable==="true")&&(oo=A,cm=l,Wu=null);break;case"focusout":Wu=cm=oo=null;break;case"mousedown":dm=!0;break;case"contextmenu":case"mouseup":case"dragend":dm=!1,_x(d,n,c);break;case"selectionchange":if(i4)break;case"keydown":case"keyup":_x(d,n,c)}var D;if(sm)e:{switch(e){case"compositionstart":var L="onCompositionStart";break e;case"compositionend":L="onCompositionEnd";break e;case"compositionupdate":L="onCompositionUpdate";break e}L=void 0}else so?dx(e,n)&&(L="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(L="onCompositionStart");L&&(ux&&n.locale!=="ko"&&(so||L!=="onCompositionStart"?L==="onCompositionEnd"&&so&&(D=rx()):($i=c,tm="value"in $i?$i.value:$i.textContent,so=!0)),A=nf(l,L),0<A.length&&(L=new sx(L,e,null,n,c),d.push({event:L,listeners:A}),D?L.data=D:(D=fx(n),D!==null&&(L.data=D)))),(D=$D?WD(e,n):XD(e,n))&&(L=nf(l,"onBeforeInput"),0<L.length&&(A=new sx("onBeforeInput","beforeinput",null,n,c),d.push({event:A,listeners:L}),A.data=D)),F4(d,e,l,n,c)}FT(d,t)})}function Tl(e,t,n){return{instance:e,listener:t,currentTarget:n}}function nf(e,t){for(var n=t+"Capture",r=[];e!==null;){var i=e,a=i.stateNode;i=i.tag,i!==5&&i!==26&&i!==27||a===null||(i=Fu(e,n),i!=null&&r.unshift(Tl(e,i,a)),i=Fu(e,t),i!=null&&r.push(Tl(e,i,a))),e=e.return}return r}function Ro(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function HT(e,t,n,r,i){for(var a=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,i?(l=Fu(n,a),l!=null&&s.unshift(Tl(n,l,u))):i||(l=Fu(n,a),l!=null&&s.push(Tl(n,l,u)))),n=n.return}s.length!==0&&e.push({event:t,listeners:s})}var Y4=/\r\n?/g,q4=/\u0000|\uFFFD/g;function VT(e){return(typeof e=="string"?e:""+e).replace(Y4,`
49
- `).replace(q4,"")}function YT(e,t){return t=VT(t),VT(e)===t}function rf(){}function We(e,t,n,r,i,a){switch(n){case"children":typeof r=="string"?t==="body"||t==="textarea"&&r===""||ro(e,r):(typeof r=="number"||typeof r=="bigint")&&t!=="body"&&ro(e,""+r);break;case"className":dd(e,"class",r);break;case"tabIndex":dd(e,"tabindex",r);break;case"dir":case"role":case"viewBox":case"width":case"height":dd(e,n,r);break;case"style":ex(e,r,a);break;case"data":if(t!=="object"){dd(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=pd(""+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 a=="function"&&(n==="formAction"?(t!=="input"&&We(e,t,"name",i.name,i,null),We(e,t,"formEncType",i.formEncType,i,null),We(e,t,"formMethod",i.formMethod,i,null),We(e,t,"formTarget",i.formTarget,i,null)):(We(e,t,"encType",i.encType,i,null),We(e,t,"method",i.method,i,null),We(e,t,"target",i.target,i,null)));if(r==null||typeof r=="symbol"||typeof r=="boolean"){e.removeAttribute(n);break}r=pd(""+r),e.setAttribute(n,r);break;case"onClick":r!=null&&(e.onclick=rf);break;case"onScroll":r!=null&&Le("scroll",e);break;case"onScrollEnd":r!=null&&Le("scrollend",e);break;case"dangerouslySetInnerHTML":if(r!=null){if(typeof r!="object"||!("__html"in r))throw Error(q(61));if(n=r.__html,n!=null){if(i.children!=null)throw Error(q(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=pd(""+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":Le("beforetoggle",e),Le("toggle",e),cd(e,"popover",r);break;case"xlinkActuate":ri(e,"http://www.w3.org/1999/xlink","xlink:actuate",r);break;case"xlinkArcrole":ri(e,"http://www.w3.org/1999/xlink","xlink:arcrole",r);break;case"xlinkRole":ri(e,"http://www.w3.org/1999/xlink","xlink:role",r);break;case"xlinkShow":ri(e,"http://www.w3.org/1999/xlink","xlink:show",r);break;case"xlinkTitle":ri(e,"http://www.w3.org/1999/xlink","xlink:title",r);break;case"xlinkType":ri(e,"http://www.w3.org/1999/xlink","xlink:type",r);break;case"xmlBase":ri(e,"http://www.w3.org/XML/1998/namespace","xml:base",r);break;case"xmlLang":ri(e,"http://www.w3.org/XML/1998/namespace","xml:lang",r);break;case"xmlSpace":ri(e,"http://www.w3.org/XML/1998/namespace","xml:space",r);break;case"is":cd(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=xD.get(n)||n,cd(e,n,r))}}function L0(e,t,n,r,i,a){switch(n){case"style":ex(e,r,a);break;case"dangerouslySetInnerHTML":if(r!=null){if(typeof r!="object"||!("__html"in r))throw Error(q(61));if(n=r.__html,n!=null){if(i.children!=null)throw Error(q(60));e.innerHTML=n}}break;case"children":typeof r=="string"?ro(e,r):(typeof r=="number"||typeof r=="bigint")&&ro(e,""+r);break;case"onScroll":r!=null&&Le("scroll",e);break;case"onScrollEnd":r!=null&&Le("scrollend",e);break;case"onClick":r!=null&&(e.onclick=rf);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!qv.hasOwnProperty(n))e:{if(n[0]==="o"&&n[1]==="n"&&(i=n.endsWith("Capture"),t=n.slice(2,i?n.length-7:void 0),a=e[Tn]||null,a=a!=null?a[n]:null,typeof a=="function"&&e.removeEventListener(t,a,i),typeof r=="function")){typeof a!="function"&&a!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(t,r,i);break e}n in e?e[n]=r:r===!0?e.setAttribute(n,""):cd(e,n,r)}}}function Qt(e,t,n){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Le("error",e),Le("load",e);var r=!1,i=!1,a;for(a in n)if(n.hasOwnProperty(a)){var s=n[a];if(s!=null)switch(a){case"src":r=!0;break;case"srcSet":i=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(q(137,t));default:We(e,t,a,s,n,null)}}i&&We(e,t,"srcSet",n.srcSet,n,null),r&&We(e,t,"src",n.src,n,null);return;case"input":Le("invalid",e);var o=a=s=i=null,u=null,l=null;for(r in n)if(n.hasOwnProperty(r)){var c=n[r];if(c!=null)switch(r){case"name":i=c;break;case"type":s=c;break;case"checked":u=c;break;case"defaultChecked":l=c;break;case"value":a=c;break;case"defaultValue":o=c;break;case"children":case"dangerouslySetInnerHTML":if(c!=null)throw Error(q(137,t));break;default:We(e,t,r,c,n,null)}}Kv(e,a,o,u,l,s,i,!1),fd(e);return;case"select":Le("invalid",e),r=s=a=null;for(i in n)if(n.hasOwnProperty(i)&&(o=n[i],o!=null))switch(i){case"value":a=o;break;case"defaultValue":s=o;break;case"multiple":r=o;default:We(e,t,i,o,n,null)}t=a,n=s,e.multiple=!!r,t!=null?no(e,!!r,t,!1):n!=null&&no(e,!!r,n,!0);return;case"textarea":Le("invalid",e),a=i=r=null;for(s in n)if(n.hasOwnProperty(s)&&(o=n[s],o!=null))switch(s){case"value":r=o;break;case"defaultValue":i=o;break;case"children":a=o;break;case"dangerouslySetInnerHTML":if(o!=null)throw Error(q(91));break;default:We(e,t,s,o,n,null)}Zv(e,r,i,a),fd(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:We(e,t,u,r,n,null)}return;case"dialog":Le("cancel",e),Le("close",e);break;case"iframe":case"object":Le("load",e);break;case"video":case"audio":for(r=0;r<El.length;r++)Le(El[r],e);break;case"image":Le("error",e),Le("load",e);break;case"details":Le("toggle",e);break;case"embed":case"source":case"link":Le("error",e),Le("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(q(137,t));default:We(e,t,l,r,n,null)}return;default:if(Kp(t)){for(c in n)n.hasOwnProperty(c)&&(r=n[c],r!==void 0&&L0(e,t,c,r,n,void 0));return}}for(o in n)n.hasOwnProperty(o)&&(r=n[o],r!=null&&We(e,t,o,r,n,null))}function G4(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 i=null,a=null,s=null,o=null,u=null,l=null,c=null;for(h in n){var d=n[h];if(n.hasOwnProperty(h)&&d!=null)switch(h){case"checked":break;case"value":break;case"defaultValue":u=d;default:r.hasOwnProperty(h)||We(e,t,h,null,r,d)}}for(var f in r){var h=r[f];if(d=n[f],r.hasOwnProperty(f)&&(h!=null||d!=null))switch(f){case"type":a=h;break;case"name":i=h;break;case"checked":l=h;break;case"defaultChecked":c=h;break;case"value":s=h;break;case"defaultValue":o=h;break;case"children":case"dangerouslySetInnerHTML":if(h!=null)throw Error(q(137,t));break;default:h!==d&&We(e,t,f,h,r,d)}}Wp(e,s,o,u,l,c,a,i);return;case"select":h=s=o=f=null;for(a in n)if(u=n[a],n.hasOwnProperty(a)&&u!=null)switch(a){case"value":break;case"multiple":h=u;default:r.hasOwnProperty(a)||We(e,t,a,null,r,u)}for(i in r)if(a=r[i],u=n[i],r.hasOwnProperty(i)&&(a!=null||u!=null))switch(i){case"value":f=a;break;case"defaultValue":o=a;break;case"multiple":s=a;default:a!==u&&We(e,t,i,a,r,u)}t=o,n=s,r=h,f!=null?no(e,!!n,f,!1):!!r!=!!n&&(t!=null?no(e,!!n,t,!0):no(e,!!n,n?[]:"",!1));return;case"textarea":h=f=null;for(o in n)if(i=n[o],n.hasOwnProperty(o)&&i!=null&&!r.hasOwnProperty(o))switch(o){case"value":break;case"children":break;default:We(e,t,o,null,r,i)}for(s in r)if(i=r[s],a=n[s],r.hasOwnProperty(s)&&(i!=null||a!=null))switch(s){case"value":f=i;break;case"defaultValue":h=i;break;case"children":break;case"dangerouslySetInnerHTML":if(i!=null)throw Error(q(91));break;default:i!==a&&We(e,t,s,i,r,a)}Qv(e,f,h);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:We(e,t,g,null,r,f)}for(u in r)if(f=r[u],h=n[u],r.hasOwnProperty(u)&&f!==h&&(f!=null||h!=null))switch(u){case"selected":e.selected=f&&typeof f!="function"&&typeof f!="symbol";break;default:We(e,t,u,f,r,h)}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 b in n)f=n[b],n.hasOwnProperty(b)&&f!=null&&!r.hasOwnProperty(b)&&We(e,t,b,null,r,f);for(l in r)if(f=r[l],h=n[l],r.hasOwnProperty(l)&&f!==h&&(f!=null||h!=null))switch(l){case"children":case"dangerouslySetInnerHTML":if(f!=null)throw Error(q(137,t));break;default:We(e,t,l,f,r,h)}return;default:if(Kp(t)){for(var T in n)f=n[T],n.hasOwnProperty(T)&&f!==void 0&&!r.hasOwnProperty(T)&&L0(e,t,T,void 0,r,f);for(c in r)f=r[c],h=n[c],!r.hasOwnProperty(c)||f===h||f===void 0&&h===void 0||L0(e,t,c,f,r,h);return}}for(var m in n)f=n[m],n.hasOwnProperty(m)&&f!=null&&!r.hasOwnProperty(m)&&We(e,t,m,null,r,f);for(d in r)f=r[d],h=n[d],!r.hasOwnProperty(d)||f===h||f==null&&h==null||We(e,t,d,f,r,h)}var I0=null,P0=null;function af(e){return e.nodeType===9?e:e.ownerDocument}function qT(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 GT(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 B0(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 U0=null;function $4(){var e=window.event;return e&&e.type==="popstate"?e===U0?!1:(U0=e,!0):(U0=null,!1)}var $T=typeof setTimeout=="function"?setTimeout:void 0,W4=typeof clearTimeout=="function"?clearTimeout:void 0,WT=typeof Promise=="function"?Promise:void 0,X4=typeof queueMicrotask=="function"?queueMicrotask:typeof WT<"u"?function(e){return WT.resolve(null).then(e).catch(K4)}:$T;function K4(e){setTimeout(function(){throw e})}function j0(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8)if(n=i.data,n==="/$"){if(r===0){e.removeChild(i),Rl(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=i}while(n);Rl(t)}function F0(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":F0(n),$p(n);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(n.rel.toLowerCase()==="stylesheet")continue}e.removeChild(n)}}function Q4(e,t,n,r){for(;e.nodeType===1;){var i=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!r&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(r){if(!e[Uu])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(a=e.getAttribute("rel"),a==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(a!==i.rel||e.getAttribute("href")!==(i.href==null?null:i.href)||e.getAttribute("crossorigin")!==(i.crossOrigin==null?null:i.crossOrigin)||e.getAttribute("title")!==(i.title==null?null:i.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(a=e.getAttribute("src"),(a!==(i.src==null?null:i.src)||e.getAttribute("type")!==(i.type==null?null:i.type)||e.getAttribute("crossorigin")!==(i.crossOrigin==null?null:i.crossOrigin))&&a&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var a=i.name==null?null:""+i.name;if(i.type==="hidden"&&e.getAttribute("name")===a)return e}else return e;if(e=xr(e.nextSibling),e===null)break}return null}function Z4(e,t,n){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!n||(e=xr(e.nextSibling),e===null))return null;return e}function xr(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 XT(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 KT(e,t,n){switch(t=af(n),e){case"html":if(e=t.documentElement,!e)throw Error(q(452));return e;case"head":if(e=t.head,!e)throw Error(q(453));return e;case"body":if(e=t.body,!e)throw Error(q(454));return e;default:throw Error(q(451))}}var or=new Map,QT=new Set;function sf(e){return typeof e.getRootNode=="function"?e.getRootNode():e.ownerDocument}var yi=st.d;st.d={f:J4,r:e5,D:t5,C:n5,L:r5,m:i5,X:s5,S:a5,M:o5};function J4(){var e=yi.f(),t=Qd();return e||t}function e5(e){var t=Js(e);t!==null&&t.tag===5&&t.type==="form"?_E(t):yi.r(e)}var No=typeof document>"u"?null:document;function ZT(e,t,n){var r=No;if(r&&typeof t=="string"&&t){var i=Qn(t);i='link[rel="'+e+'"][href="'+i+'"]',typeof n=="string"&&(i+='[crossorigin="'+n+'"]'),QT.has(i)||(QT.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement("link"),Qt(t,"link",e),zt(t),r.head.appendChild(t)))}}function t5(e){yi.D(e),ZT("dns-prefetch",e,null)}function n5(e,t){yi.C(e,t),ZT("preconnect",e,t)}function r5(e,t,n){yi.L(e,t,n);var r=No;if(r&&e&&t){var i='link[rel="preload"][as="'+Qn(t)+'"]';t==="image"&&n&&n.imageSrcSet?(i+='[imagesrcset="'+Qn(n.imageSrcSet)+'"]',typeof n.imageSizes=="string"&&(i+='[imagesizes="'+Qn(n.imageSizes)+'"]')):i+='[href="'+Qn(e)+'"]';var a=i;switch(t){case"style":a=Do(e);break;case"script":a=Mo(e)}or.has(a)||(e=at({rel:"preload",href:t==="image"&&n&&n.imageSrcSet?void 0:e,as:t},n),or.set(a,e),r.querySelector(i)!==null||t==="style"&&r.querySelector(wl(a))||t==="script"&&r.querySelector(_l(a))||(t=r.createElement("link"),Qt(t,"link",e),zt(t),r.head.appendChild(t)))}}function i5(e,t){yi.m(e,t);var n=No;if(n&&e){var r=t&&typeof t.as=="string"?t.as:"script",i='link[rel="modulepreload"][as="'+Qn(r)+'"][href="'+Qn(e)+'"]',a=i;switch(r){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":a=Mo(e)}if(!or.has(a)&&(e=at({rel:"modulepreload",href:e},t),or.set(a,e),n.querySelector(i)===null)){switch(r){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(n.querySelector(_l(a)))return}r=n.createElement("link"),Qt(r,"link",e),zt(r),n.head.appendChild(r)}}}function a5(e,t,n){yi.S(e,t,n);var r=No;if(r&&e){var i=eo(r).hoistableStyles,a=Do(e);t=t||"default";var s=i.get(a);if(!s){var o={loading:0,preload:null};if(s=r.querySelector(wl(a)))o.loading=5;else{e=at({rel:"stylesheet",href:e,"data-precedence":t},n),(n=or.get(a))&&z0(e,n);var u=s=r.createElement("link");zt(u),Qt(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,of(s,t,r)}s={type:"stylesheet",instance:s,count:1,state:o},i.set(a,s)}}}function s5(e,t){yi.X(e,t);var n=No;if(n&&e){var r=eo(n).hoistableScripts,i=Mo(e),a=r.get(i);a||(a=n.querySelector(_l(i)),a||(e=at({src:e,async:!0},t),(t=or.get(i))&&H0(e,t),a=n.createElement("script"),zt(a),Qt(a,"link",e),n.head.appendChild(a)),a={type:"script",instance:a,count:1,state:null},r.set(i,a))}}function o5(e,t){yi.M(e,t);var n=No;if(n&&e){var r=eo(n).hoistableScripts,i=Mo(e),a=r.get(i);a||(a=n.querySelector(_l(i)),a||(e=at({src:e,async:!0,type:"module"},t),(t=or.get(i))&&H0(e,t),a=n.createElement("script"),zt(a),Qt(a,"link",e),n.head.appendChild(a)),a={type:"script",instance:a,count:1,state:null},r.set(i,a))}}function JT(e,t,n,r){var i=(i=Yi.current)?sf(i):null;if(!i)throw Error(q(446));switch(e){case"meta":case"title":return null;case"style":return typeof n.precedence=="string"&&typeof n.href=="string"?(t=Do(n.href),n=eo(i).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=Do(n.href);var a=eo(i).hoistableStyles,s=a.get(e);if(s||(i=i.ownerDocument||i,s={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},a.set(e,s),(a=i.querySelector(wl(e)))&&!a._p&&(s.instance=a,s.state.loading=5),or.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},or.set(e,n),a||u5(i,e,n,s.state))),t&&r===null)throw Error(q(528,""));return s}if(t&&r!==null)throw Error(q(529,""));return null;case"script":return t=n.async,n=n.src,typeof n=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=Mo(n),n=eo(i).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(q(444,e))}}function Do(e){return'href="'+Qn(e)+'"'}function wl(e){return'link[rel="stylesheet"]['+e+"]"}function e2(e){return at({},e,{"data-precedence":e.precedence,precedence:null})}function u5(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}),Qt(t,"link",n),zt(t),e.head.appendChild(t))}function Mo(e){return'[src="'+Qn(e)+'"]'}function _l(e){return"script[async]"+e}function t2(e,t,n){if(t.count++,t.instance===null)switch(t.type){case"style":var r=e.querySelector('style[data-href~="'+Qn(n.href)+'"]');if(r)return t.instance=r,zt(r),r;var i=at({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement("style"),zt(r),Qt(r,"style",i),of(r,n.precedence,e),t.instance=r;case"stylesheet":i=Do(n.href);var a=e.querySelector(wl(i));if(a)return t.state.loading|=4,t.instance=a,zt(a),a;r=e2(n),(i=or.get(i))&&z0(r,i),a=(e.ownerDocument||e).createElement("link"),zt(a);var s=a;return s._p=new Promise(function(o,u){s.onload=o,s.onerror=u}),Qt(a,"link",r),t.state.loading|=4,of(a,n.precedence,e),t.instance=a;case"script":return a=Mo(n.src),(i=e.querySelector(_l(a)))?(t.instance=i,zt(i),i):(r=n,(i=or.get(a))&&(r=at({},n),H0(r,i)),e=e.ownerDocument||e,i=e.createElement("script"),zt(i),Qt(i,"link",r),e.head.appendChild(i),t.instance=i);case"void":return null;default:throw Error(q(443,t.type))}else t.type==="stylesheet"&&!(t.state.loading&4)&&(r=t.instance,t.state.loading|=4,of(r,n.precedence,e));return t.instance}function of(e,t,n){for(var r=n.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),i=r.length?r[r.length-1]:null,a=i,s=0;s<r.length;s++){var o=r[s];if(o.dataset.precedence===t)a=o;else if(a!==i)break}a?a.parentNode.insertBefore(e,a.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function z0(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function H0(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var uf=null;function n2(e,t,n){if(uf===null){var r=new Map,i=uf=new Map;i.set(n,r)}else i=uf,r=i.get(n),r||(r=new Map,i.set(n,r));if(r.has(e))return r;for(r.set(e,null),n=n.getElementsByTagName(e),i=0;i<n.length;i++){var a=n[i];if(!(a[Uu]||a[nn]||e==="link"&&a.getAttribute("rel")==="stylesheet")&&a.namespaceURI!=="http://www.w3.org/2000/svg"){var s=a.getAttribute(t)||"";s=e+s;var o=r.get(s);o?o.push(a):r.set(s,[a])}}return r}function r2(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t==="title"?e.querySelector("head > title"):null)}function l5(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 i2(e){return!(e.type==="stylesheet"&&!(e.state.loading&3))}var Sl=null;function c5(){}function d5(e,t,n){if(Sl===null)throw Error(q(475));var r=Sl;if(t.type==="stylesheet"&&(typeof n.media!="string"||matchMedia(n.media).matches!==!1)&&!(t.state.loading&4)){if(t.instance===null){var i=Do(n.href),a=e.querySelector(wl(i));if(a){e=a._p,e!==null&&typeof e=="object"&&typeof e.then=="function"&&(r.count++,r=lf.bind(r),e.then(r,r)),t.state.loading|=4,t.instance=a,zt(a);return}a=e.ownerDocument||e,n=e2(n),(i=or.get(i))&&z0(n,i),a=a.createElement("link"),zt(a);var s=a;s._p=new Promise(function(o,u){s.onload=o,s.onerror=u}),Qt(a,"link",n),t.instance=a}r.stylesheets===null&&(r.stylesheets=new Map),r.stylesheets.set(t,e),(e=t.state.preload)&&!(t.state.loading&3)&&(r.count++,t=lf.bind(r),e.addEventListener("load",t),e.addEventListener("error",t))}}function f5(){if(Sl===null)throw Error(q(475));var e=Sl;return e.stylesheets&&e.count===0&&V0(e,e.stylesheets),0<e.count?function(t){var n=setTimeout(function(){if(e.stylesheets&&V0(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 lf(){if(this.count--,this.count===0){if(this.stylesheets)V0(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var cf=null;function V0(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,cf=new Map,t.forEach(h5,e),cf=null,lf.call(e))}function h5(e,t){if(!(t.state.loading&4)){var n=cf.get(e);if(n)var r=n.get(null);else{n=new Map,cf.set(e,n);for(var i=e.querySelectorAll("link[data-precedence],style[data-precedence]"),a=0;a<i.length;a++){var s=i[a];(s.nodeName==="LINK"||s.getAttribute("media")!=="not all")&&(n.set(s.dataset.precedence,s),r=s)}r&&n.set(null,r)}i=t.instance,s=i.getAttribute("data-precedence"),a=n.get(s)||r,a===r&&n.set(null,i),n.set(s,i),this.count++,r=lf.bind(this),i.addEventListener("load",r),i.addEventListener("error",r),a?a.parentNode.insertBefore(i,a.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(i,e.firstChild)),t.state.loading|=4}}var Al={$$typeof:ti,Provider:null,Consumer:null,_currentValue:Za,_currentValue2:Za,_threadCount:0};function p5(e,t,n,r,i,a,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=qp(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.finishedLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=qp(0),this.hiddenUpdates=qp(null),this.identifierPrefix=r,this.onUncaughtError=i,this.onCaughtError=a,this.onRecoverableError=s,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=o,this.incompleteTransitions=new Map}function a2(e,t,n,r,i,a,s,o,u,l,c,d){return e=new p5(e,t,n,s,o,u,l,d),t=1,a===!0&&(t|=24),a=ar(3,null,null,t),e.current=a,a.stateNode=e,t=Em(),t.refCount++,e.pooledCache=t,t.refCount++,a.memoizedState={element:r,isDehydrated:n,cache:t},t0(a),e}function s2(e){return e?(e=co,e):co}function o2(e,t,n,r,i,a){i=s2(i),r.context===null?r.context=i:r.pendingContext=i,r=ta(t),r.payload={element:n},a=a===void 0?null:a,a!==null&&(r.callback=a),n=na(e,r,t),n!==null&&(bn(n,e,t),ll(n,e,t))}function u2(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function Y0(e,t){u2(e,t),(e=e.alternate)&&u2(e,t)}function l2(e){if(e.tag===13){var t=Wi(e,67108864);t!==null&&bn(t,e,67108864),Y0(e,67108864)}}var df=!0;function m5(e,t,n,r){var i=xe.T;xe.T=null;var a=st.p;try{st.p=2,q0(e,t,n,r)}finally{st.p=a,xe.T=i}}function g5(e,t,n,r){var i=xe.T;xe.T=null;var a=st.p;try{st.p=8,q0(e,t,n,r)}finally{st.p=a,xe.T=i}}function q0(e,t,n,r){if(df){var i=G0(r);if(i===null)M0(e,t,r,ff,n),d2(e,r);else if(y5(i,e,t,n,r))r.stopPropagation();else if(d2(e,r),t&4&&-1<b5.indexOf(e)){for(;i!==null;){var a=Js(i);if(a!==null)switch(a.tag){case 3:if(a=a.stateNode,a.current.memoizedState.isDehydrated){var s=Ja(a.pendingLanes);if(s!==0){var o=a;for(o.pendingLanes|=2,o.entangledLanes|=2;s;){var u=1<<31-Mn(s);o.entanglements[1]|=u,s&=~u}Ur(a),!(pt&6)&&(Wd=Mr()+500,xl(0))}}break;case 13:o=Wi(a,2),o!==null&&bn(o,a,2),Qd(),Y0(a,2)}if(a=G0(r),a===null&&M0(e,t,r,ff,n),a===i)break;i=a}i!==null&&r.stopPropagation()}else M0(e,t,r,null,n)}}function G0(e){return e=Zp(e),$0(e)}var ff=null;function $0(e){if(ff=null,e=es(e),e!==null){var t=Xs(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=Nv(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 ff=e,null}function c2(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(nD()){case Lv:return 2;case Iv:return 8;case sd:case rD:return 32;case Pv:return 268435456;default:return 32}default:return 32}}var W0=!1,la=null,ca=null,da=null,Cl=new Map,kl=new Map,fa=[],b5="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 d2(e,t){switch(e){case"focusin":case"focusout":la=null;break;case"dragenter":case"dragleave":ca=null;break;case"mouseover":case"mouseout":da=null;break;case"pointerover":case"pointerout":Cl.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":kl.delete(t.pointerId)}}function Ol(e,t,n,r,i,a){return e===null||e.nativeEvent!==a?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:a,targetContainers:[i]},t!==null&&(t=Js(t),t!==null&&l2(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function y5(e,t,n,r,i){switch(t){case"focusin":return la=Ol(la,e,t,n,r,i),!0;case"dragenter":return ca=Ol(ca,e,t,n,r,i),!0;case"mouseover":return da=Ol(da,e,t,n,r,i),!0;case"pointerover":var a=i.pointerId;return Cl.set(a,Ol(Cl.get(a)||null,e,t,n,r,i)),!0;case"gotpointercapture":return a=i.pointerId,kl.set(a,Ol(kl.get(a)||null,e,t,n,r,i)),!0}return!1}function f2(e){var t=es(e.target);if(t!==null){var n=Xs(t);if(n!==null){if(t=n.tag,t===13){if(t=Nv(n),t!==null){e.blockedOn=t,fD(e.priority,function(){if(n.tag===13){var r=Un(),i=Wi(n,r);i!==null&&bn(i,n,r),Y0(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 hf(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=G0(e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);Qp=r,n.target.dispatchEvent(r),Qp=null}else return t=Js(n),t!==null&&l2(t),e.blockedOn=n,!1;t.shift()}return!0}function h2(e,t,n){hf(e)&&n.delete(t)}function v5(){W0=!1,la!==null&&hf(la)&&(la=null),ca!==null&&hf(ca)&&(ca=null),da!==null&&hf(da)&&(da=null),Cl.forEach(h2),kl.forEach(h2)}function pf(e,t){e.blockedOn===t&&(e.blockedOn=null,W0||(W0=!0,Lt.unstable_scheduleCallback(Lt.unstable_NormalPriority,v5)))}var mf=null;function p2(e){mf!==e&&(mf=e,Lt.unstable_scheduleCallback(Lt.unstable_NormalPriority,function(){mf===e&&(mf=null);for(var t=0;t<e.length;t+=3){var n=e[t],r=e[t+1],i=e[t+2];if(typeof r!="function"){if($0(r||n)===null)continue;break}var a=Js(n);a!==null&&(e.splice(t,3),t-=3,Bm(a,{pending:!0,data:i,method:n.method,action:r},r,i))}}))}function Rl(e){function t(u){return pf(u,e)}la!==null&&pf(la,e),ca!==null&&pf(ca,e),da!==null&&pf(da,e),Cl.forEach(t),kl.forEach(t);for(var n=0;n<fa.length;n++){var r=fa[n];r.blockedOn===e&&(r.blockedOn=null)}for(;0<fa.length&&(n=fa[0],n.blockedOn===null);)f2(n),n.blockedOn===null&&fa.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(r=0;r<n.length;r+=3){var i=n[r],a=n[r+1],s=i[Tn]||null;if(typeof a=="function")s||p2(n);else if(s){var o=null;if(a&&a.hasAttribute("formAction")){if(i=a,s=a[Tn]||null)o=s.formAction;else if($0(i)!==null)continue}else o=s.action;typeof o=="function"?n[r+1]=o:(n.splice(r,3),r-=3),p2(n)}}}function X0(e){this._internalRoot=e}gf.prototype.render=X0.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(q(409));var n=t.current,r=Un();o2(n,r,e,t,null,null)},gf.prototype.unmount=X0.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;e.tag===0&&ko(),o2(e.current,2,null,e,null,null),Qd(),t[Zs]=null}};function gf(e){this._internalRoot=e}gf.prototype.unstable_scheduleHydration=function(e){if(e){var t=Hv();e={blockedOn:null,target:e,priority:t};for(var n=0;n<fa.length&&t!==0&&t<fa[n].priority;n++);fa.splice(n,0,e),n===0&&f2(e)}};var m2=wv.version;if(m2!=="19.0.0")throw Error(q(527,m2,"19.0.0"));st.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(q(188)):(e=Object.keys(e).join(","),Error(q(268,e)));return e=JN(t),e=e!==null?Mv(e):null,e=e===null?null:e.stateNode,e};var x5={bundleType:0,version:"19.0.0",rendererPackageName:"react-dom",currentDispatcherRef:xe,findFiberByHostInstance:es,reconcilerVersion:"19.0.0"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var bf=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!bf.isDisabled&&bf.supportsFiber)try{Iu=bf.inject(x5),Dn=bf}catch{}}ed.createRoot=function(e,t){if(!_v(e))throw Error(q(299));var n=!1,r="",i=DE,a=ME,s=LE,o=null;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onUncaughtError!==void 0&&(i=t.onUncaughtError),t.onCaughtError!==void 0&&(a=t.onCaughtError),t.onRecoverableError!==void 0&&(s=t.onRecoverableError),t.unstable_transitionCallbacks!==void 0&&(o=t.unstable_transitionCallbacks)),t=a2(e,1,!1,null,null,n,r,i,a,s,o,null),e[Zs]=t.current,D0(e.nodeType===8?e.parentNode:e),new X0(t)},ed.hydrateRoot=function(e,t,n){if(!_v(e))throw Error(q(299));var r=!1,i="",a=DE,s=ME,o=LE,u=null,l=null;return n!=null&&(n.unstable_strictMode===!0&&(r=!0),n.identifierPrefix!==void 0&&(i=n.identifierPrefix),n.onUncaughtError!==void 0&&(a=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=a2(e,1,!0,t,n??null,r,i,a,s,o,u,l),t.context=s2(null),n=t.current,r=Un(),i=ta(r),i.callback=null,na(n,i,r),t.current.lanes=r,Bu(t,r),Ur(t),e[Zs]=t.current,D0(e),new gf(t)},ed.version="19.0.0";function g2(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(g2)}catch(e){console.error(e)}}g2(),bv.exports=ed;var E5=bv.exports;const b2="3.0.93";function Sn(e,t,{checkForDefaultPrevented:n=!0}={}){return function(i){if(e==null||e(i),n===!1||!i.defaultPrevented)return t==null?void 0:t(i)}}function T5(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function y2(...e){return t=>e.forEach(n=>T5(n,t))}function jr(...e){return v.useCallback(y2(...e),e)}function w5(e,t){const n=v.createContext(t),r=a=>{const{children:s,...o}=a,u=v.useMemo(()=>o,Object.values(o));return E.jsx(n.Provider,{value:u,children:s})};r.displayName=e+"Provider";function i(a){const s=v.useContext(n);if(s)return s;if(t!==void 0)return t;throw new Error(`\`${a}\` must be used within \`${e}\``)}return[r,i]}function yf(e,t=[]){let n=[];function r(a,s){const o=v.createContext(s),u=n.length;n=[...n,s];const l=d=>{var m;const{scope:f,children:h,...g}=d,b=((m=f==null?void 0:f[e])==null?void 0:m[u])||o,T=v.useMemo(()=>g,Object.values(g));return E.jsx(b.Provider,{value:T,children:h})};l.displayName=a+"Provider";function c(d,f){var b;const h=((b=f==null?void 0:f[e])==null?void 0:b[u])||o,g=v.useContext(h);if(g)return g;if(s!==void 0)return s;throw new Error(`\`${d}\` must be used within \`${a}\``)}return[l,c]}const i=()=>{const a=n.map(s=>v.createContext(s));return function(o){const u=(o==null?void 0:o[e])||a;return v.useMemo(()=>({[`__scope${e}`]:{...o,[e]:u}}),[o,u])}};return i.scopeName=e,[r,_5(i,...t)]}function _5(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(a){const s=r.reduce((o,{useScope:u,scopeName:l})=>{const d=u(a)[`__scope${l}`];return{...o,...d}},{});return v.useMemo(()=>({[`__scope${t.scopeName}`]:s}),[s])}};return n.scopeName=t.scopeName,n}var vf=v.forwardRef((e,t)=>{const{children:n,...r}=e,i=v.Children.toArray(n),a=i.find(S5);if(a){const s=a.props.children,o=i.map(u=>u===a?v.Children.count(s)>1?v.Children.only(null):v.isValidElement(s)?s.props.children:null:u);return E.jsx(K0,{...r,ref:t,children:v.isValidElement(s)?v.cloneElement(s,void 0,o):null})}return E.jsx(K0,{...r,ref:t,children:n})});vf.displayName="Slot";var K0=v.forwardRef((e,t)=>{const{children:n,...r}=e;if(v.isValidElement(n)){const i=C5(n);return v.cloneElement(n,{...A5(r,n.props),ref:t?y2(t,i):i})}return v.Children.count(n)>1?v.Children.only(null):null});K0.displayName="SlotClone";var v2=({children:e})=>E.jsx(E.Fragment,{children:e});function S5(e){return v.isValidElement(e)&&e.type===v2}function A5(e,t){const n={...t};for(const r in t){const i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...o)=>{a(...o),i(...o)}:i&&(n[r]=i):r==="style"?n[r]={...i,...a}:r==="className"&&(n[r]=[i,a].filter(Boolean).join(" "))}return{...e,...n}}function C5(e){var r,i;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var k5=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],jn=k5.reduce((e,t)=>{const n=v.forwardRef((r,i)=>{const{asChild:a,...s}=r,o=a?vf:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),E.jsx(o,{...s,ref:i})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function O5(e,t){e&&Qa.flushSync(()=>e.dispatchEvent(t))}function Fn(e){const t=v.useRef(e);return v.useEffect(()=>{t.current=e}),v.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function x2(e,t=globalThis==null?void 0:globalThis.document){const n=Fn(e);v.useEffect(()=>{const r=i=>{i.key==="Escape"&&n(i)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var R5="DismissableLayer",Q0="dismissableLayer.update",N5="dismissableLayer.pointerDownOutside",D5="dismissableLayer.focusOutside",E2,T2=v.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Z0=v.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:a,onInteractOutside:s,onDismiss:o,...u}=e,l=v.useContext(T2),[c,d]=v.useState(null),f=(c==null?void 0:c.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,h]=v.useState({}),g=jr(t,D=>d(D)),b=Array.from(l.layers),[T]=[...l.layersWithOutsidePointerEventsDisabled].slice(-1),m=b.indexOf(T),y=c?b.indexOf(c):-1,x=l.layersWithOutsidePointerEventsDisabled.size>0,w=y>=m,_=I5(D=>{const L=D.target,U=[...l.branches].some(R=>R.contains(L));!w||U||(i==null||i(D),s==null||s(D),D.defaultPrevented||o==null||o())},f),A=P5(D=>{const L=D.target;[...l.branches].some(R=>R.contains(L))||(a==null||a(D),s==null||s(D),D.defaultPrevented||o==null||o())},f);return x2(D=>{y===l.layers.size-1&&(r==null||r(D),!D.defaultPrevented&&o&&(D.preventDefault(),o()))},f),v.useEffect(()=>{if(c)return n&&(l.layersWithOutsidePointerEventsDisabled.size===0&&(E2=f.body.style.pointerEvents,f.body.style.pointerEvents="none"),l.layersWithOutsidePointerEventsDisabled.add(c)),l.layers.add(c),w2(),()=>{n&&l.layersWithOutsidePointerEventsDisabled.size===1&&(f.body.style.pointerEvents=E2)}},[c,f,n,l]),v.useEffect(()=>()=>{c&&(l.layers.delete(c),l.layersWithOutsidePointerEventsDisabled.delete(c),w2())},[c,l]),v.useEffect(()=>{const D=()=>h({});return document.addEventListener(Q0,D),()=>document.removeEventListener(Q0,D)},[]),E.jsx(jn.div,{...u,ref:g,style:{pointerEvents:x?w?"auto":"none":void 0,...e.style},onFocusCapture:Sn(e.onFocusCapture,A.onFocusCapture),onBlurCapture:Sn(e.onBlurCapture,A.onBlurCapture),onPointerDownCapture:Sn(e.onPointerDownCapture,_.onPointerDownCapture)})});Z0.displayName=R5;var M5="DismissableLayerBranch",L5=v.forwardRef((e,t)=>{const n=v.useContext(T2),r=v.useRef(null),i=jr(t,r);return v.useEffect(()=>{const a=r.current;if(a)return n.branches.add(a),()=>{n.branches.delete(a)}},[n.branches]),E.jsx(jn.div,{...e,ref:i})});L5.displayName=M5;function I5(e,t=globalThis==null?void 0:globalThis.document){const n=Fn(e),r=v.useRef(!1),i=v.useRef(()=>{});return v.useEffect(()=>{const a=o=>{if(o.target&&!r.current){let u=function(){_2(N5,n,l,{discrete:!0})};const l={originalEvent:o};o.pointerType==="touch"?(t.removeEventListener("click",i.current),i.current=u,t.addEventListener("click",i.current,{once:!0})):u()}else t.removeEventListener("click",i.current);r.current=!1},s=window.setTimeout(()=>{t.addEventListener("pointerdown",a)},0);return()=>{window.clearTimeout(s),t.removeEventListener("pointerdown",a),t.removeEventListener("click",i.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function P5(e,t=globalThis==null?void 0:globalThis.document){const n=Fn(e),r=v.useRef(!1);return v.useEffect(()=>{const i=a=>{a.target&&!r.current&&_2(D5,n,{originalEvent:a},{discrete:!1})};return t.addEventListener("focusin",i),()=>t.removeEventListener("focusin",i)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function w2(){const e=new CustomEvent(Q0);document.dispatchEvent(e)}function _2(e,t,n,{discrete:r}){const i=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?O5(i,a):i.dispatchEvent(a)}var J0=0;function S2(){v.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??A2()),document.body.insertAdjacentElement("beforeend",e[1]??A2()),J0++,()=>{J0===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),J0--}},[])}function A2(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var eg="focusScope.autoFocusOnMount",tg="focusScope.autoFocusOnUnmount",C2={bubbles:!1,cancelable:!0},B5="FocusScope",k2=v.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:a,...s}=e,[o,u]=v.useState(null),l=Fn(i),c=Fn(a),d=v.useRef(null),f=jr(t,b=>u(b)),h=v.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;v.useEffect(()=>{if(r){let b=function(x){if(h.paused||!o)return;const w=x.target;o.contains(w)?d.current=w:ha(d.current,{select:!0})},T=function(x){if(h.paused||!o)return;const w=x.relatedTarget;w!==null&&(o.contains(w)||ha(d.current,{select:!0}))},m=function(x){if(document.activeElement===document.body)for(const _ of x)_.removedNodes.length>0&&ha(o)};document.addEventListener("focusin",b),document.addEventListener("focusout",T);const y=new MutationObserver(m);return o&&y.observe(o,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",b),document.removeEventListener("focusout",T),y.disconnect()}}},[r,o,h.paused]),v.useEffect(()=>{if(o){N2.add(h);const b=document.activeElement;if(!o.contains(b)){const m=new CustomEvent(eg,C2);o.addEventListener(eg,l),o.dispatchEvent(m),m.defaultPrevented||(U5(V5(O2(o)),{select:!0}),document.activeElement===b&&ha(o))}return()=>{o.removeEventListener(eg,l),setTimeout(()=>{const m=new CustomEvent(tg,C2);o.addEventListener(tg,c),o.dispatchEvent(m),m.defaultPrevented||ha(b??document.body,{select:!0}),o.removeEventListener(tg,c),N2.remove(h)},0)}}},[o,l,c,h]);const g=v.useCallback(b=>{if(!n&&!r||h.paused)return;const T=b.key==="Tab"&&!b.altKey&&!b.ctrlKey&&!b.metaKey,m=document.activeElement;if(T&&m){const y=b.currentTarget,[x,w]=j5(y);x&&w?!b.shiftKey&&m===w?(b.preventDefault(),n&&ha(x,{select:!0})):b.shiftKey&&m===x&&(b.preventDefault(),n&&ha(w,{select:!0})):m===y&&b.preventDefault()}},[n,r,h.paused]);return E.jsx(jn.div,{tabIndex:-1,...s,ref:f,onKeyDown:g})});k2.displayName=B5;function U5(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(ha(r,{select:t}),document.activeElement!==n)return}function j5(e){const t=O2(e),n=R2(t,e),r=R2(t.reverse(),e);return[n,r]}function O2(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const i=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||i?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function R2(e,t){for(const n of e)if(!F5(n,{upTo:t}))return n}function F5(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function z5(e){return e instanceof HTMLInputElement&&"select"in e}function ha(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&z5(e)&&t&&e.select()}}var N2=H5();function H5(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=D2(e,t),e.unshift(t)},remove(t){var n;e=D2(e,t),(n=e[0])==null||n.resume()}}}function D2(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function V5(e){return e.filter(t=>t.tagName!=="A")}var Fr=globalThis!=null&&globalThis.document?v.useLayoutEffect:()=>{},Y5=HN.useId||(()=>{}),q5=0;function Nl(e){const[t,n]=v.useState(Y5());return Fr(()=>{e||n(r=>r??String(q5++))},[e]),e||(t?`radix-${t}`:"")}const G5=["top","right","bottom","left"],pa=Math.min,zn=Math.max,xf=Math.round,Ef=Math.floor,ma=e=>({x:e,y:e}),$5={left:"right",right:"left",bottom:"top",top:"bottom"},W5={start:"end",end:"start"};function ng(e,t,n){return zn(e,pa(t,n))}function vi(e,t){return typeof e=="function"?e(t):e}function xi(e){return e.split("-")[0]}function Lo(e){return e.split("-")[1]}function rg(e){return e==="x"?"y":"x"}function ig(e){return e==="y"?"height":"width"}function ga(e){return["top","bottom"].includes(xi(e))?"y":"x"}function ag(e){return rg(ga(e))}function X5(e,t,n){n===void 0&&(n=!1);const r=Lo(e),i=ag(e),a=ig(i);let s=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(s=Tf(s)),[s,Tf(s)]}function K5(e){const t=Tf(e);return[sg(e),t,sg(t)]}function sg(e){return e.replace(/start|end/g,t=>W5[t])}function Q5(e,t,n){const r=["left","right"],i=["right","left"],a=["top","bottom"],s=["bottom","top"];switch(e){case"top":case"bottom":return n?t?i:r:t?r:i;case"left":case"right":return t?a:s;default:return[]}}function Z5(e,t,n,r){const i=Lo(e);let a=Q5(xi(e),n==="start",r);return i&&(a=a.map(s=>s+"-"+i),t&&(a=a.concat(a.map(sg)))),a}function Tf(e){return e.replace(/left|right|bottom|top/g,t=>$5[t])}function J5(e){return{top:0,right:0,bottom:0,left:0,...e}}function M2(e){return typeof e!="number"?J5(e):{top:e,right:e,bottom:e,left:e}}function wf(e){const{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function L2(e,t,n){let{reference:r,floating:i}=e;const a=ga(t),s=ag(t),o=ig(s),u=xi(t),l=a==="y",c=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[o]/2-i[o]/2;let h;switch(u){case"top":h={x:c,y:r.y-i.height};break;case"bottom":h={x:c,y:r.y+r.height};break;case"right":h={x:r.x+r.width,y:d};break;case"left":h={x:r.x-i.width,y:d};break;default:h={x:r.x,y:r.y}}switch(Lo(t)){case"start":h[s]-=f*(n&&l?-1:1);break;case"end":h[s]+=f*(n&&l?-1:1);break}return h}const eM=async(e,t,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:a=[],platform:s}=n,o=a.filter(Boolean),u=await(s.isRTL==null?void 0:s.isRTL(t));let l=await s.getElementRects({reference:e,floating:t,strategy:i}),{x:c,y:d}=L2(l,r,u),f=r,h={},g=0;for(let b=0;b<o.length;b++){const{name:T,fn:m}=o[b],{x:y,y:x,data:w,reset:_}=await m({x:c,y:d,initialPlacement:r,placement:f,strategy:i,middlewareData:h,rects:l,platform:s,elements:{reference:e,floating:t}});c=y??c,d=x??d,h={...h,[T]:{...h[T],...w}},_&&g<=50&&(g++,typeof _=="object"&&(_.placement&&(f=_.placement),_.rects&&(l=_.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:i}):_.rects),{x:c,y:d}=L2(l,f,u)),b=-1)}return{x:c,y:d,placement:f,strategy:i,middlewareData:h}};async function Dl(e,t){var n;t===void 0&&(t={});const{x:r,y:i,platform:a,rects:s,elements:o,strategy:u}=e,{boundary:l="clippingAncestors",rootBoundary:c="viewport",elementContext:d="floating",altBoundary:f=!1,padding:h=0}=vi(t,e),g=M2(h),T=o[f?d==="floating"?"reference":"floating":d],m=wf(await a.getClippingRect({element:(n=await(a.isElement==null?void 0:a.isElement(T)))==null||n?T:T.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(o.floating)),boundary:l,rootBoundary:c,strategy:u})),y=d==="floating"?{x:r,y:i,width:s.floating.width,height:s.floating.height}:s.reference,x=await(a.getOffsetParent==null?void 0:a.getOffsetParent(o.floating)),w=await(a.isElement==null?void 0:a.isElement(x))?await(a.getScale==null?void 0:a.getScale(x))||{x:1,y:1}:{x:1,y:1},_=wf(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:y,offsetParent:x,strategy:u}):y);return{top:(m.top-_.top+g.top)/w.y,bottom:(_.bottom-m.bottom+g.bottom)/w.y,left:(m.left-_.left+g.left)/w.x,right:(_.right-m.right+g.right)/w.x}}const tM=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:i,rects:a,platform:s,elements:o,middlewareData:u}=t,{element:l,padding:c=0}=vi(e,t)||{};if(l==null)return{};const d=M2(c),f={x:n,y:r},h=ag(i),g=ig(h),b=await s.getDimensions(l),T=h==="y",m=T?"top":"left",y=T?"bottom":"right",x=T?"clientHeight":"clientWidth",w=a.reference[g]+a.reference[h]-f[h]-a.floating[g],_=f[h]-a.reference[h],A=await(s.getOffsetParent==null?void 0:s.getOffsetParent(l));let D=A?A[x]:0;(!D||!await(s.isElement==null?void 0:s.isElement(A)))&&(D=o.floating[x]||a.floating[g]);const L=w/2-_/2,U=D/2-b[g]/2-1,R=pa(d[m],U),H=pa(d[y],U),z=R,te=D-b[g]-H,X=D/2-b[g]/2+L,ne=ng(z,X,te),F=!u.arrow&&Lo(i)!=null&&X!==ne&&a.reference[g]/2-(X<z?R:H)-b[g]/2<0,Y=F?X<z?X-z:X-te:0;return{[h]:f[h]+Y,data:{[h]:ne,centerOffset:X-ne-Y,...F&&{alignmentOffset:Y}},reset:F}}}),nM=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:i,middlewareData:a,rects:s,initialPlacement:o,platform:u,elements:l}=t,{mainAxis:c=!0,crossAxis:d=!0,fallbackPlacements:f,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:b=!0,...T}=vi(e,t);if((n=a.arrow)!=null&&n.alignmentOffset)return{};const m=xi(i),y=ga(o),x=xi(o)===o,w=await(u.isRTL==null?void 0:u.isRTL(l.floating)),_=f||(x||!b?[Tf(o)]:K5(o)),A=g!=="none";!f&&A&&_.push(...Z5(o,b,g,w));const D=[o,..._],L=await Dl(t,T),U=[];let R=((r=a.flip)==null?void 0:r.overflows)||[];if(c&&U.push(L[m]),d){const X=X5(i,s,w);U.push(L[X[0]],L[X[1]])}if(R=[...R,{placement:i,overflows:U}],!U.every(X=>X<=0)){var H,z;const X=(((H=a.flip)==null?void 0:H.index)||0)+1,ne=D[X];if(ne)return{data:{index:X,overflows:R},reset:{placement:ne}};let F=(z=R.filter(Y=>Y.overflows[0]<=0).sort((Y,V)=>Y.overflows[1]-V.overflows[1])[0])==null?void 0:z.placement;if(!F)switch(h){case"bestFit":{var te;const Y=(te=R.filter(V=>{if(A){const ee=ga(V.placement);return ee===y||ee==="y"}return!0}).map(V=>[V.placement,V.overflows.filter(ee=>ee>0).reduce((ee,O)=>ee+O,0)]).sort((V,ee)=>V[1]-ee[1])[0])==null?void 0:te[0];Y&&(F=Y);break}case"initialPlacement":F=o;break}if(i!==F)return{reset:{placement:F}}}return{}}}};function I2(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function P2(e){return G5.some(t=>e[t]>=0)}const rM=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...i}=vi(e,t);switch(r){case"referenceHidden":{const a=await Dl(t,{...i,elementContext:"reference"}),s=I2(a,n.reference);return{data:{referenceHiddenOffsets:s,referenceHidden:P2(s)}}}case"escaped":{const a=await Dl(t,{...i,altBoundary:!0}),s=I2(a,n.floating);return{data:{escapedOffsets:s,escaped:P2(s)}}}default:return{}}}}};async function iM(e,t){const{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),s=xi(n),o=Lo(n),u=ga(n)==="y",l=["left","top"].includes(s)?-1:1,c=a&&u?-1:1,d=vi(t,e);let{mainAxis:f,crossAxis:h,alignmentAxis:g}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return o&&typeof g=="number"&&(h=o==="end"?g*-1:g),u?{x:h*c,y:f*l}:{x:f*l,y:h*c}}const aM=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:i,y:a,placement:s,middlewareData:o}=t,u=await iM(t,e);return s===((n=o.offset)==null?void 0:n.placement)&&(r=o.arrow)!=null&&r.alignmentOffset?{}:{x:i+u.x,y:a+u.y,data:{...u,placement:s}}}}},sM=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:i}=t,{mainAxis:a=!0,crossAxis:s=!1,limiter:o={fn:T=>{let{x:m,y}=T;return{x:m,y}}},...u}=vi(e,t),l={x:n,y:r},c=await Dl(t,u),d=ga(xi(i)),f=rg(d);let h=l[f],g=l[d];if(a){const T=f==="y"?"top":"left",m=f==="y"?"bottom":"right",y=h+c[T],x=h-c[m];h=ng(y,h,x)}if(s){const T=d==="y"?"top":"left",m=d==="y"?"bottom":"right",y=g+c[T],x=g-c[m];g=ng(y,g,x)}const b=o.fn({...t,[f]:h,[d]:g});return{...b,data:{x:b.x-n,y:b.y-r,enabled:{[f]:a,[d]:s}}}}}},oM=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:i,rects:a,middlewareData:s}=t,{offset:o=0,mainAxis:u=!0,crossAxis:l=!0}=vi(e,t),c={x:n,y:r},d=ga(i),f=rg(d);let h=c[f],g=c[d];const b=vi(o,t),T=typeof b=="number"?{mainAxis:b,crossAxis:0}:{mainAxis:0,crossAxis:0,...b};if(u){const x=f==="y"?"height":"width",w=a.reference[f]-a.floating[x]+T.mainAxis,_=a.reference[f]+a.reference[x]-T.mainAxis;h<w?h=w:h>_&&(h=_)}if(l){var m,y;const x=f==="y"?"width":"height",w=["top","left"].includes(xi(i)),_=a.reference[d]-a.floating[x]+(w&&((m=s.offset)==null?void 0:m[d])||0)+(w?0:T.crossAxis),A=a.reference[d]+a.reference[x]+(w?0:((y=s.offset)==null?void 0:y[d])||0)-(w?T.crossAxis:0);g<_?g=_:g>A&&(g=A)}return{[f]:h,[d]:g}}}},uM=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:i,rects:a,platform:s,elements:o}=t,{apply:u=()=>{},...l}=vi(e,t),c=await Dl(t,l),d=xi(i),f=Lo(i),h=ga(i)==="y",{width:g,height:b}=a.floating;let T,m;d==="top"||d==="bottom"?(T=d,m=f===(await(s.isRTL==null?void 0:s.isRTL(o.floating))?"start":"end")?"left":"right"):(m=d,T=f==="end"?"top":"bottom");const y=b-c.top-c.bottom,x=g-c.left-c.right,w=pa(b-c[T],y),_=pa(g-c[m],x),A=!t.middlewareData.shift;let D=w,L=_;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(L=x),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(D=y),A&&!f){const R=zn(c.left,0),H=zn(c.right,0),z=zn(c.top,0),te=zn(c.bottom,0);h?L=g-2*(R!==0||H!==0?R+H:zn(c.left,c.right)):D=b-2*(z!==0||te!==0?z+te:zn(c.top,c.bottom))}await u({...t,availableWidth:L,availableHeight:D});const U=await s.getDimensions(o.floating);return g!==U.width||b!==U.height?{reset:{rects:!0}}:{}}}};function _f(){return typeof window<"u"}function Io(e){return B2(e)?(e.nodeName||"").toLowerCase():"#document"}function Hn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function zr(e){var t;return(t=(B2(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function B2(e){return _f()?e instanceof Node||e instanceof Hn(e).Node:!1}function Er(e){return _f()?e instanceof Element||e instanceof Hn(e).Element:!1}function Hr(e){return _f()?e instanceof HTMLElement||e instanceof Hn(e).HTMLElement:!1}function U2(e){return!_f()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Hn(e).ShadowRoot}function Ml(e){const{overflow:t,overflowX:n,overflowY:r,display:i}=Tr(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(i)}function lM(e){return["table","td","th"].includes(Io(e))}function Sf(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function og(e){const t=ug(),n=Er(e)?Tr(e):e;return n.transform!=="none"||n.perspective!=="none"||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function cM(e){let t=ba(e);for(;Hr(t)&&!Po(t);){if(og(t))return t;if(Sf(t))return null;t=ba(t)}return null}function ug(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Po(e){return["html","body","#document"].includes(Io(e))}function Tr(e){return Hn(e).getComputedStyle(e)}function Af(e){return Er(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function ba(e){if(Io(e)==="html")return e;const t=e.assignedSlot||e.parentNode||U2(e)&&e.host||zr(e);return U2(t)?t.host:t}function j2(e){const t=ba(e);return Po(t)?e.ownerDocument?e.ownerDocument.body:e.body:Hr(t)&&Ml(t)?t:j2(t)}function Ll(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=j2(e),a=i===((r=e.ownerDocument)==null?void 0:r.body),s=Hn(i);if(a){const o=lg(s);return t.concat(s,s.visualViewport||[],Ml(i)?i:[],o&&n?Ll(o):[])}return t.concat(i,Ll(i,[],n))}function lg(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function F2(e){const t=Tr(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const i=Hr(e),a=i?e.offsetWidth:n,s=i?e.offsetHeight:r,o=xf(n)!==a||xf(r)!==s;return o&&(n=a,r=s),{width:n,height:r,$:o}}function cg(e){return Er(e)?e:e.contextElement}function Bo(e){const t=cg(e);if(!Hr(t))return ma(1);const n=t.getBoundingClientRect(),{width:r,height:i,$:a}=F2(t);let s=(a?xf(n.width):n.width)/r,o=(a?xf(n.height):n.height)/i;return(!s||!Number.isFinite(s))&&(s=1),(!o||!Number.isFinite(o))&&(o=1),{x:s,y:o}}const dM=ma(0);function z2(e){const t=Hn(e);return!ug()||!t.visualViewport?dM:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function fM(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Hn(e)?!1:t}function Es(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),a=cg(e);let s=ma(1);t&&(r?Er(r)&&(s=Bo(r)):s=Bo(e));const o=fM(a,n,r)?z2(a):ma(0);let u=(i.left+o.x)/s.x,l=(i.top+o.y)/s.y,c=i.width/s.x,d=i.height/s.y;if(a){const f=Hn(a),h=r&&Er(r)?Hn(r):r;let g=f,b=lg(g);for(;b&&r&&h!==g;){const T=Bo(b),m=b.getBoundingClientRect(),y=Tr(b),x=m.left+(b.clientLeft+parseFloat(y.paddingLeft))*T.x,w=m.top+(b.clientTop+parseFloat(y.paddingTop))*T.y;u*=T.x,l*=T.y,c*=T.x,d*=T.y,u+=x,l+=w,g=Hn(b),b=lg(g)}}return wf({width:c,height:d,x:u,y:l})}function hM(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e;const a=i==="fixed",s=zr(r),o=t?Sf(t.floating):!1;if(r===s||o&&a)return n;let u={scrollLeft:0,scrollTop:0},l=ma(1);const c=ma(0),d=Hr(r);if((d||!d&&!a)&&((Io(r)!=="body"||Ml(s))&&(u=Af(r)),Hr(r))){const f=Es(r);l=Bo(r),c.x=f.x+r.clientLeft,c.y=f.y+r.clientTop}return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-u.scrollLeft*l.x+c.x,y:n.y*l.y-u.scrollTop*l.y+c.y}}function pM(e){return Array.from(e.getClientRects())}function dg(e,t){const n=Af(e).scrollLeft;return t?t.left+n:Es(zr(e)).left+n}function mM(e){const t=zr(e),n=Af(e),r=e.ownerDocument.body,i=zn(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=zn(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let s=-n.scrollLeft+dg(e);const o=-n.scrollTop;return Tr(r).direction==="rtl"&&(s+=zn(t.clientWidth,r.clientWidth)-i),{width:i,height:a,x:s,y:o}}function gM(e,t){const n=Hn(e),r=zr(e),i=n.visualViewport;let a=r.clientWidth,s=r.clientHeight,o=0,u=0;if(i){a=i.width,s=i.height;const l=ug();(!l||l&&t==="fixed")&&(o=i.offsetLeft,u=i.offsetTop)}return{width:a,height:s,x:o,y:u}}function bM(e,t){const n=Es(e,!0,t==="fixed"),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=Hr(e)?Bo(e):ma(1),s=e.clientWidth*a.x,o=e.clientHeight*a.y,u=i*a.x,l=r*a.y;return{width:s,height:o,x:u,y:l}}function H2(e,t,n){let r;if(t==="viewport")r=gM(e,n);else if(t==="document")r=mM(zr(e));else if(Er(t))r=bM(t,n);else{const i=z2(e);r={...t,x:t.x-i.x,y:t.y-i.y}}return wf(r)}function V2(e,t){const n=ba(e);return n===t||!Er(n)||Po(n)?!1:Tr(n).position==="fixed"||V2(n,t)}function yM(e,t){const n=t.get(e);if(n)return n;let r=Ll(e,[],!1).filter(o=>Er(o)&&Io(o)!=="body"),i=null;const a=Tr(e).position==="fixed";let s=a?ba(e):e;for(;Er(s)&&!Po(s);){const o=Tr(s),u=og(s);!u&&o.position==="fixed"&&(i=null),(a?!u&&!i:!u&&o.position==="static"&&!!i&&["absolute","fixed"].includes(i.position)||Ml(s)&&!u&&V2(e,s))?r=r.filter(c=>c!==s):i=o,s=ba(s)}return t.set(e,r),r}function vM(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const s=[...n==="clippingAncestors"?Sf(t)?[]:yM(t,this._c):[].concat(n),r],o=s[0],u=s.reduce((l,c)=>{const d=H2(t,c,i);return l.top=zn(d.top,l.top),l.right=pa(d.right,l.right),l.bottom=pa(d.bottom,l.bottom),l.left=zn(d.left,l.left),l},H2(t,o,i));return{width:u.right-u.left,height:u.bottom-u.top,x:u.left,y:u.top}}function xM(e){const{width:t,height:n}=F2(e);return{width:t,height:n}}function EM(e,t,n){const r=Hr(t),i=zr(t),a=n==="fixed",s=Es(e,!0,a,t);let o={scrollLeft:0,scrollTop:0};const u=ma(0);if(r||!r&&!a)if((Io(t)!=="body"||Ml(i))&&(o=Af(t)),r){const h=Es(t,!0,a,t);u.x=h.x+t.clientLeft,u.y=h.y+t.clientTop}else i&&(u.x=dg(i));let l=0,c=0;if(i&&!r&&!a){const h=i.getBoundingClientRect();c=h.top+o.scrollTop,l=h.left+o.scrollLeft-dg(i,h)}const d=s.left+o.scrollLeft-u.x-l,f=s.top+o.scrollTop-u.y-c;return{x:d,y:f,width:s.width,height:s.height}}function fg(e){return Tr(e).position==="static"}function Y2(e,t){if(!Hr(e)||Tr(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return zr(e)===n&&(n=n.ownerDocument.body),n}function q2(e,t){const n=Hn(e);if(Sf(e))return n;if(!Hr(e)){let i=ba(e);for(;i&&!Po(i);){if(Er(i)&&!fg(i))return i;i=ba(i)}return n}let r=Y2(e,t);for(;r&&lM(r)&&fg(r);)r=Y2(r,t);return r&&Po(r)&&fg(r)&&!og(r)?n:r||cM(e)||n}const TM=async function(e){const t=this.getOffsetParent||q2,n=this.getDimensions,r=await n(e.floating);return{reference:EM(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function wM(e){return Tr(e).direction==="rtl"}const _M={convertOffsetParentRelativeRectToViewportRelativeRect:hM,getDocumentElement:zr,getClippingRect:vM,getOffsetParent:q2,getElementRects:TM,getClientRects:pM,getDimensions:xM,getScale:Bo,isElement:Er,isRTL:wM};function SM(e,t){let n=null,r;const i=zr(e);function a(){var o;clearTimeout(r),(o=n)==null||o.disconnect(),n=null}function s(o,u){o===void 0&&(o=!1),u===void 0&&(u=1),a();const{left:l,top:c,width:d,height:f}=e.getBoundingClientRect();if(o||t(),!d||!f)return;const h=Ef(c),g=Ef(i.clientWidth-(l+d)),b=Ef(i.clientHeight-(c+f)),T=Ef(l),y={rootMargin:-h+"px "+-g+"px "+-b+"px "+-T+"px",threshold:zn(0,pa(1,u))||1};let x=!0;function w(_){const A=_[0].intersectionRatio;if(A!==u){if(!x)return s();A?s(!1,A):r=setTimeout(()=>{s(!1,1e-7)},1e3)}x=!1}try{n=new IntersectionObserver(w,{...y,root:i.ownerDocument})}catch{n=new IntersectionObserver(w,y)}n.observe(e)}return s(!0),a}function AM(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:o=typeof IntersectionObserver=="function",animationFrame:u=!1}=r,l=cg(e),c=i||a?[...l?Ll(l):[],...Ll(t)]:[];c.forEach(m=>{i&&m.addEventListener("scroll",n,{passive:!0}),a&&m.addEventListener("resize",n)});const d=l&&o?SM(l,n):null;let f=-1,h=null;s&&(h=new ResizeObserver(m=>{let[y]=m;y&&y.target===l&&h&&(h.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var x;(x=h)==null||x.observe(t)})),n()}),l&&!u&&h.observe(l),h.observe(t));let g,b=u?Es(e):null;u&&T();function T(){const m=Es(e);b&&(m.x!==b.x||m.y!==b.y||m.width!==b.width||m.height!==b.height)&&n(),b=m,g=requestAnimationFrame(T)}return n(),()=>{var m;c.forEach(y=>{i&&y.removeEventListener("scroll",n),a&&y.removeEventListener("resize",n)}),d==null||d(),(m=h)==null||m.disconnect(),h=null,u&&cancelAnimationFrame(g)}}const CM=aM,kM=sM,OM=nM,RM=uM,NM=rM,G2=tM,DM=oM,MM=(e,t,n)=>{const r=new Map,i={platform:_M,...n},a={...i.platform,_c:r};return eM(e,t,{...i,platform:a})};var Cf=typeof document<"u"?v.useLayoutEffect:v.useEffect;function kf(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!kf(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){const a=i[r];if(!(a==="_owner"&&e.$$typeof)&&!kf(e[a],t[a]))return!1}return!0}return e!==e&&t!==t}function $2(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function W2(e,t){const n=$2(e);return Math.round(t*n)/n}function hg(e){const t=v.useRef(e);return Cf(()=>{t.current=e}),t}function LM(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:i,elements:{reference:a,floating:s}={},transform:o=!0,whileElementsMounted:u,open:l}=e,[c,d]=v.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,h]=v.useState(r);kf(f,r)||h(r);const[g,b]=v.useState(null),[T,m]=v.useState(null),y=v.useCallback(V=>{V!==A.current&&(A.current=V,b(V))},[]),x=v.useCallback(V=>{V!==D.current&&(D.current=V,m(V))},[]),w=a||g,_=s||T,A=v.useRef(null),D=v.useRef(null),L=v.useRef(c),U=u!=null,R=hg(u),H=hg(i),z=hg(l),te=v.useCallback(()=>{if(!A.current||!D.current)return;const V={placement:t,strategy:n,middleware:f};H.current&&(V.platform=H.current),MM(A.current,D.current,V).then(ee=>{const O={...ee,isPositioned:z.current!==!1};X.current&&!kf(L.current,O)&&(L.current=O,Qa.flushSync(()=>{d(O)}))})},[f,t,n,H,z]);Cf(()=>{l===!1&&L.current.isPositioned&&(L.current.isPositioned=!1,d(V=>({...V,isPositioned:!1})))},[l]);const X=v.useRef(!1);Cf(()=>(X.current=!0,()=>{X.current=!1}),[]),Cf(()=>{if(w&&(A.current=w),_&&(D.current=_),w&&_){if(R.current)return R.current(w,_,te);te()}},[w,_,te,R,U]);const ne=v.useMemo(()=>({reference:A,floating:D,setReference:y,setFloating:x}),[y,x]),F=v.useMemo(()=>({reference:w,floating:_}),[w,_]),Y=v.useMemo(()=>{const V={position:n,left:0,top:0};if(!F.floating)return V;const ee=W2(F.floating,c.x),O=W2(F.floating,c.y);return o?{...V,transform:"translate("+ee+"px, "+O+"px)",...$2(F.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:ee,top:O}},[n,o,F.floating,c.x,c.y]);return v.useMemo(()=>({...c,update:te,refs:ne,elements:F,floatingStyles:Y}),[c,te,ne,F,Y])}const IM=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:i}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?G2({element:r.current,padding:i}).fn(n):{}:r?G2({element:r,padding:i}).fn(n):{}}}},PM=(e,t)=>({...CM(e),options:[e,t]}),BM=(e,t)=>({...kM(e),options:[e,t]}),UM=(e,t)=>({...DM(e),options:[e,t]}),jM=(e,t)=>({...OM(e),options:[e,t]}),FM=(e,t)=>({...RM(e),options:[e,t]}),zM=(e,t)=>({...NM(e),options:[e,t]}),HM=(e,t)=>({...IM(e),options:[e,t]});var VM="Arrow",X2=v.forwardRef((e,t)=>{const{children:n,width:r=10,height:i=5,...a}=e;return E.jsx(jn.svg,{...a,ref:t,width:r,height:i,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:E.jsx("polygon",{points:"0,0 30,0 15,10"})})});X2.displayName=VM;var YM=X2;function qM(e,t=[]){let n=[];function r(a,s){const o=v.createContext(s),u=n.length;n=[...n,s];function l(d){const{scope:f,children:h,...g}=d,b=(f==null?void 0:f[e][u])||o,T=v.useMemo(()=>g,Object.values(g));return E.jsx(b.Provider,{value:T,children:h})}function c(d,f){const h=(f==null?void 0:f[e][u])||o,g=v.useContext(h);if(g)return g;if(s!==void 0)return s;throw new Error(`\`${d}\` must be used within \`${a}\``)}return l.displayName=a+"Provider",[l,c]}const i=()=>{const a=n.map(s=>v.createContext(s));return function(o){const u=(o==null?void 0:o[e])||a;return v.useMemo(()=>({[`__scope${e}`]:{...o,[e]:u}}),[o,u])}};return i.scopeName=e,[r,GM(i,...t)]}function GM(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(a){const s=r.reduce((o,{useScope:u,scopeName:l})=>{const d=u(a)[`__scope${l}`];return{...o,...d}},{});return v.useMemo(()=>({[`__scope${t.scopeName}`]:s}),[s])}};return n.scopeName=t.scopeName,n}function $M(e){const[t,n]=v.useState(void 0);return Fr(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const a=i[0];let s,o;if("borderBoxSize"in a){const u=a.borderBoxSize,l=Array.isArray(u)?u[0]:u;s=l.inlineSize,o=l.blockSize}else s=e.offsetWidth,o=e.offsetHeight;n({width:s,height:o})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var pg="Popper",[K2,Of]=qM(pg),[WM,Q2]=K2(pg),Z2=e=>{const{__scopePopper:t,children:n}=e,[r,i]=v.useState(null);return E.jsx(WM,{scope:t,anchor:r,onAnchorChange:i,children:n})};Z2.displayName=pg;var J2="PopperAnchor",ew=v.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...i}=e,a=Q2(J2,n),s=v.useRef(null),o=jr(t,s);return v.useEffect(()=>{a.onAnchorChange((r==null?void 0:r.current)||s.current)}),r?null:E.jsx(jn.div,{...i,ref:o})});ew.displayName=J2;var mg="PopperContent",[XM,KM]=K2(mg),tw=v.forwardRef((e,t)=>{var Ut,Ge,Nt,it,At,ye;const{__scopePopper:n,side:r="bottom",sideOffset:i=0,align:a="center",alignOffset:s=0,arrowPadding:o=0,avoidCollisions:u=!0,collisionBoundary:l=[],collisionPadding:c=0,sticky:d="partial",hideWhenDetached:f=!1,updatePositionStrategy:h="optimized",onPlaced:g,...b}=e,T=Q2(mg,n),[m,y]=v.useState(null),x=jr(t,we=>y(we)),[w,_]=v.useState(null),A=$M(w),D=(A==null?void 0:A.width)??0,L=(A==null?void 0:A.height)??0,U=r+(a!=="center"?"-"+a:""),R=typeof c=="number"?c:{top:0,right:0,bottom:0,left:0,...c},H=Array.isArray(l)?l:[l],z=H.length>0,te={padding:R,boundary:H.filter(ZM),altBoundary:z},{refs:X,floatingStyles:ne,placement:F,isPositioned:Y,middlewareData:V}=LM({strategy:"fixed",placement:U,whileElementsMounted:(...we)=>AM(...we,{animationFrame:h==="always"}),elements:{reference:T.anchor},middleware:[PM({mainAxis:i+L,alignmentAxis:s}),u&&BM({mainAxis:!0,crossAxis:!1,limiter:d==="partial"?UM():void 0,...te}),u&&jM({...te}),FM({...te,apply:({elements:we,rects:Ye,availableWidth:je,availableHeight:Et})=>{const{width:Dt,height:et}=Ye.reference,qe=we.floating.style;qe.setProperty("--radix-popper-available-width",`${je}px`),qe.setProperty("--radix-popper-available-height",`${Et}px`),qe.setProperty("--radix-popper-anchor-width",`${Dt}px`),qe.setProperty("--radix-popper-anchor-height",`${et}px`)}}),w&&HM({element:w,padding:o}),JM({arrowWidth:D,arrowHeight:L}),f&&zM({strategy:"referenceHidden",...te})]}),[ee,O]=iw(F),ge=Fn(g);Fr(()=>{Y&&(ge==null||ge())},[Y,ge]);const Ue=(Ut=V.arrow)==null?void 0:Ut.x,M=(Ge=V.arrow)==null?void 0:Ge.y,De=((Nt=V.arrow)==null?void 0:Nt.centerOffset)!==0,[fe,Me]=v.useState();return Fr(()=>{m&&Me(window.getComputedStyle(m).zIndex)},[m]),E.jsx("div",{ref:X.setFloating,"data-radix-popper-content-wrapper":"",style:{...ne,transform:Y?ne.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:fe,"--radix-popper-transform-origin":[(it=V.transformOrigin)==null?void 0:it.x,(At=V.transformOrigin)==null?void 0:At.y].join(" "),...((ye=V.hide)==null?void 0:ye.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:E.jsx(XM,{scope:n,placedSide:ee,onArrowChange:_,arrowX:Ue,arrowY:M,shouldHideArrow:De,children:E.jsx(jn.div,{"data-side":ee,"data-align":O,...b,ref:x,style:{...b.style,animation:Y?void 0:"none"}})})})});tw.displayName=mg;var nw="PopperArrow",QM={top:"bottom",right:"left",bottom:"top",left:"right"},rw=v.forwardRef(function(t,n){const{__scopePopper:r,...i}=t,a=KM(nw,r),s=QM[a.placedSide];return E.jsx("span",{ref:a.onArrowChange,style:{position:"absolute",left:a.arrowX,top:a.arrowY,[s]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[a.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[a.placedSide],visibility:a.shouldHideArrow?"hidden":void 0},children:E.jsx(YM,{...i,ref:n,style:{...i.style,display:"block"}})})});rw.displayName=nw;function ZM(e){return e!==null}var JM=e=>({name:"transformOrigin",options:e,fn(t){var T,m,y;const{placement:n,rects:r,middlewareData:i}=t,s=((T=i.arrow)==null?void 0:T.centerOffset)!==0,o=s?0:e.arrowWidth,u=s?0:e.arrowHeight,[l,c]=iw(n),d={start:"0%",center:"50%",end:"100%"}[c],f=(((m=i.arrow)==null?void 0:m.x)??0)+o/2,h=(((y=i.arrow)==null?void 0:y.y)??0)+u/2;let g="",b="";return l==="bottom"?(g=s?d:`${f}px`,b=`${-u}px`):l==="top"?(g=s?d:`${f}px`,b=`${r.floating.height+u}px`):l==="right"?(g=`${-u}px`,b=s?d:`${h}px`):l==="left"&&(g=`${r.floating.width+u}px`,b=s?d:`${h}px`),{data:{x:g,y:b}}}});function iw(e){const[t,n="center"]=e.split("-");return[t,n]}var aw=Z2,gg=ew,sw=tw,ow=rw;function eL(e,t){return v.useReducer((n,r)=>t[n][r]??n,e)}var bg=e=>{const{present:t,children:n}=e,r=tL(t),i=typeof n=="function"?n({present:r.isPresent}):v.Children.only(n),a=jr(r.ref,nL(i));return typeof n=="function"||r.isPresent?v.cloneElement(i,{ref:a}):null};bg.displayName="Presence";function tL(e){const[t,n]=v.useState(),r=v.useRef({}),i=v.useRef(e),a=v.useRef("none"),s=e?"mounted":"unmounted",[o,u]=eL(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return v.useEffect(()=>{const l=Rf(r.current);a.current=o==="mounted"?l:"none"},[o]),Fr(()=>{const l=r.current,c=i.current;if(c!==e){const f=a.current,h=Rf(l);e?u("MOUNT"):h==="none"||(l==null?void 0:l.display)==="none"?u("UNMOUNT"):u(c&&f!==h?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,u]),Fr(()=>{if(t){let l;const c=t.ownerDocument.defaultView??window,d=h=>{const b=Rf(r.current).includes(h.animationName);if(h.target===t&&b&&(u("ANIMATION_END"),!i.current)){const T=t.style.animationFillMode;t.style.animationFillMode="forwards",l=c.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=T)})}},f=h=>{h.target===t&&(a.current=Rf(r.current))};return t.addEventListener("animationstart",f),t.addEventListener("animationcancel",d),t.addEventListener("animationend",d),()=>{c.clearTimeout(l),t.removeEventListener("animationstart",f),t.removeEventListener("animationcancel",d),t.removeEventListener("animationend",d)}}else u("ANIMATION_END")},[t,u]),{isPresent:["mounted","unmountSuspended"].includes(o),ref:v.useCallback(l=>{l&&(r.current=getComputedStyle(l)),n(l)},[])}}function Rf(e){return(e==null?void 0:e.animationName)||"none"}function nL(e){var r,i;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function yg({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,i]=rL({defaultProp:t,onChange:n}),a=e!==void 0,s=a?e:r,o=Fn(n),u=v.useCallback(l=>{if(a){const d=typeof l=="function"?l(e):l;d!==e&&o(d)}else i(l)},[a,e,i,o]);return[s,u]}function rL({defaultProp:e,onChange:t}){const n=v.useState(e),[r]=n,i=v.useRef(r),a=Fn(t);return v.useEffect(()=>{i.current!==r&&(a(r),i.current=r)},[r,i,a]),n}var iL=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Uo=new WeakMap,Nf=new WeakMap,Df={},vg=0,uw=function(e){return e&&(e.host||uw(e.parentNode))},aL=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=uw(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},sL=function(e,t,n,r){var i=aL(t,Array.isArray(e)?e:[e]);Df[n]||(Df[n]=new WeakMap);var a=Df[n],s=[],o=new Set,u=new Set(i),l=function(d){!d||o.has(d)||(o.add(d),l(d.parentNode))};i.forEach(l);var c=function(d){!d||u.has(d)||Array.prototype.forEach.call(d.children,function(f){if(o.has(f))c(f);else try{var h=f.getAttribute(r),g=h!==null&&h!=="false",b=(Uo.get(f)||0)+1,T=(a.get(f)||0)+1;Uo.set(f,b),a.set(f,T),s.push(f),b===1&&g&&Nf.set(f,!0),T===1&&f.setAttribute(n,"true"),g||f.setAttribute(r,"true")}catch(m){console.error("aria-hidden: cannot operate on ",f,m)}})};return c(t),o.clear(),vg++,function(){s.forEach(function(d){var f=Uo.get(d)-1,h=a.get(d)-1;Uo.set(d,f),a.set(d,h),f||(Nf.has(d)||d.removeAttribute(r),Nf.delete(d)),h||d.removeAttribute(n)}),vg--,vg||(Uo=new WeakMap,Uo=new WeakMap,Nf=new WeakMap,Df={})}},lw=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),i=iL(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll("[aria-live]"))),sL(r,i,n,"aria-hidden")):function(){return null}},xg=function(e,t){return xg=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[i]=r[i])},xg(e,t)};function cw(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");xg(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var Yt=function(){return Yt=Object.assign||function(t){for(var n,r=1,i=arguments.length;r<i;r++){n=arguments[r];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(t[a]=n[a])}return t},Yt.apply(this,arguments)};function Il(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function dw(e,t,n,r){var i=arguments.length,a=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(s=e[o])&&(a=(i<3?s(a):i>3?s(t,n,a):s(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a}function fw(e,t){return function(n,r){t(n,r,e)}}function hw(e,t,n,r,i,a){function s(m){if(m!==void 0&&typeof m!="function")throw new TypeError("Function expected");return m}for(var o=r.kind,u=o==="getter"?"get":o==="setter"?"set":"value",l=!t&&e?r.static?e:e.prototype:null,c=t||(l?Object.getOwnPropertyDescriptor(l,r.name):{}),d,f=!1,h=n.length-1;h>=0;h--){var g={};for(var b in r)g[b]=b==="access"?{}:r[b];for(var b in r.access)g.access[b]=r.access[b];g.addInitializer=function(m){if(f)throw new TypeError("Cannot add initializers after decoration has completed");a.push(s(m||null))};var T=(0,n[h])(o==="accessor"?{get:c.get,set:c.set}:c[u],g);if(o==="accessor"){if(T===void 0)continue;if(T===null||typeof T!="object")throw new TypeError("Object expected");(d=s(T.get))&&(c.get=d),(d=s(T.set))&&(c.set=d),(d=s(T.init))&&i.unshift(d)}else(d=s(T))&&(o==="field"?i.unshift(d):c[u]=d)}l&&Object.defineProperty(l,r.name,c),f=!0}function pw(e,t,n){for(var r=arguments.length>2,i=0;i<t.length;i++)n=r?t[i].call(e,n):t[i].call(e);return r?n:void 0}function mw(e){return typeof e=="symbol"?e:"".concat(e)}function gw(e,t,n){return typeof t=="symbol"&&(t=t.description?"[".concat(t.description,"]"):""),Object.defineProperty(e,"name",{configurable:!0,value:n?"".concat(n," ",t):t})}function bw(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}function Ei(e,t,n,r){function i(a){return a instanceof n?a:new n(function(s){s(a)})}return new(n||(n=Promise))(function(a,s){function o(c){try{l(r.next(c))}catch(d){s(d)}}function u(c){try{l(r.throw(c))}catch(d){s(d)}}function l(c){c.done?a(c.value):i(c.value).then(o,u)}l((r=r.apply(e,t||[])).next())})}function yw(e,t){var n={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},r,i,a,s=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return s.next=o(0),s.throw=o(1),s.return=o(2),typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function o(l){return function(c){return u([l,c])}}function u(l){if(r)throw new TypeError("Generator is already executing.");for(;s&&(s=0,l[0]&&(n=0)),n;)try{if(r=1,i&&(a=l[0]&2?i.return:l[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,l[1])).done)return a;switch(i=0,a&&(l=[l[0]&2,a.value]),l[0]){case 0:case 1:a=l;break;case 4:return n.label++,{value:l[1],done:!1};case 5:n.label++,i=l[1],l=[0];continue;case 7:l=n.ops.pop(),n.trys.pop();continue;default:if(a=n.trys,!(a=a.length>0&&a[a.length-1])&&(l[0]===6||l[0]===2)){n=0;continue}if(l[0]===3&&(!a||l[1]>a[0]&&l[1]<a[3])){n.label=l[1];break}if(l[0]===6&&n.label<a[1]){n.label=a[1],a=l;break}if(a&&n.label<a[2]){n.label=a[2],n.ops.push(l);break}a[2]&&n.ops.pop(),n.trys.pop();continue}l=t.call(e,n)}catch(c){l=[6,c],i=0}finally{r=a=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}}var Mf=Object.create?function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]};function vw(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&Mf(t,e,n)}function Lf(e){var t=typeof Symbol=="function"&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function Eg(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,a=[],s;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)a.push(i.value)}catch(o){s={error:o}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return a}function xw(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(Eg(arguments[t]));return e}function Ew(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;for(var r=Array(e),i=0,t=0;t<n;t++)for(var a=arguments[t],s=0,o=a.length;s<o;s++,i++)r[i]=a[s];return r}function If(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||(a=Array.prototype.slice.call(t,0,r)),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}function jo(e){return this instanceof jo?(this.v=e,this):new jo(e)}function Tw(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r=n.apply(e,t||[]),i,a=[];return i=Object.create((typeof AsyncIterator=="function"?AsyncIterator:Object).prototype),o("next"),o("throw"),o("return",s),i[Symbol.asyncIterator]=function(){return this},i;function s(h){return function(g){return Promise.resolve(g).then(h,d)}}function o(h,g){r[h]&&(i[h]=function(b){return new Promise(function(T,m){a.push([h,b,T,m])>1||u(h,b)})},g&&(i[h]=g(i[h])))}function u(h,g){try{l(r[h](g))}catch(b){f(a[0][3],b)}}function l(h){h.value instanceof jo?Promise.resolve(h.value.v).then(c,d):f(a[0][2],h)}function c(h){u("next",h)}function d(h){u("throw",h)}function f(h,g){h(g),a.shift(),a.length&&u(a[0][0],a[0][1])}}function ww(e){var t,n;return t={},r("next"),r("throw",function(i){throw i}),r("return"),t[Symbol.iterator]=function(){return this},t;function r(i,a){t[i]=e[i]?function(s){return(n=!n)?{value:jo(e[i](s)),done:!1}:a?a(s):s}:a}}function _w(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t=e[Symbol.asyncIterator],n;return t?t.call(e):(e=typeof Lf=="function"?Lf(e):e[Symbol.iterator](),n={},r("next"),r("throw"),r("return"),n[Symbol.asyncIterator]=function(){return this},n);function r(a){n[a]=e[a]&&function(s){return new Promise(function(o,u){s=e[a](s),i(o,u,s.done,s.value)})}}function i(a,s,o,u){Promise.resolve(u).then(function(l){a({value:l,done:o})},s)}}function Sw(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}var oL=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t};function Aw(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)&&Mf(t,e,n);return oL(t,e),t}function Cw(e){return e&&e.__esModule?e:{default:e}}function kw(e,t,n,r){if(n==="a"&&!r)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return n==="m"?r:n==="a"?r.call(e):r?r.value:t.get(e)}function Ow(e,t,n,r,i){if(r==="m")throw new TypeError("Private method is not writable");if(r==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return r==="a"?i.call(e,n):i?i.value=n:t.set(e,n),n}function Rw(e,t){if(t===null||typeof t!="object"&&typeof t!="function")throw new TypeError("Cannot use 'in' operator on non-object");return typeof e=="function"?t===e:e.has(t)}function Nw(e,t,n){if(t!=null){if(typeof t!="object"&&typeof t!="function")throw new TypeError("Object expected.");var r,i;if(n){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");r=t[Symbol.asyncDispose]}if(r===void 0){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");r=t[Symbol.dispose],n&&(i=r)}if(typeof r!="function")throw new TypeError("Object not disposable.");i&&(r=function(){try{i.call(this)}catch(a){return Promise.reject(a)}}),e.stack.push({value:t,dispose:r,async:n})}else n&&e.stack.push({async:!0});return t}var uL=typeof SuppressedError=="function"?SuppressedError:function(e,t,n){var r=new Error(n);return r.name="SuppressedError",r.error=e,r.suppressed=t,r};function Dw(e){function t(a){e.error=e.hasError?new uL(a,e.error,"An error was suppressed during disposal."):a,e.hasError=!0}var n,r=0;function i(){for(;n=e.stack.pop();)try{if(!n.async&&r===1)return r=0,e.stack.push(n),Promise.resolve().then(i);if(n.dispose){var a=n.dispose.call(n.value);if(n.async)return r|=2,Promise.resolve(a).then(i,function(s){return t(s),i()})}else r|=1}catch(s){t(s)}if(r===1)return e.hasError?Promise.reject(e.error):Promise.resolve();if(e.hasError)throw e.error}return i()}function Mw(e,t){return typeof e=="string"&&/^\.\.?\//.test(e)?e.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i,function(n,r,i,a,s){return r?t?".jsx":".js":i&&(!a||!s)?n:i+a+"."+s.toLowerCase()+"js"}):e}const lL=Object.freeze(Object.defineProperty({__proto__:null,__addDisposableResource:Nw,get __assign(){return Yt},__asyncDelegator:ww,__asyncGenerator:Tw,__asyncValues:_w,__await:jo,__awaiter:Ei,__classPrivateFieldGet:kw,__classPrivateFieldIn:Rw,__classPrivateFieldSet:Ow,__createBinding:Mf,__decorate:dw,__disposeResources:Dw,__esDecorate:hw,__exportStar:vw,__extends:cw,__generator:yw,__importDefault:Cw,__importStar:Aw,__makeTemplateObject:Sw,__metadata:bw,__param:fw,__propKey:mw,__read:Eg,__rest:Il,__rewriteRelativeImportExtension:Mw,__runInitializers:pw,__setFunctionName:gw,__spread:xw,__spreadArray:If,__spreadArrays:Ew,__values:Lf,default:{__extends:cw,__assign:Yt,__rest:Il,__decorate:dw,__param:fw,__esDecorate:hw,__runInitializers:pw,__propKey:mw,__setFunctionName:gw,__metadata:bw,__awaiter:Ei,__generator:yw,__createBinding:Mf,__exportStar:vw,__values:Lf,__read:Eg,__spread:xw,__spreadArrays:Ew,__spreadArray:If,__await:jo,__asyncGenerator:Tw,__asyncDelegator:ww,__asyncValues:_w,__makeTemplateObject:Sw,__importStar:Aw,__importDefault:Cw,__classPrivateFieldGet:kw,__classPrivateFieldSet:Ow,__classPrivateFieldIn:Rw,__addDisposableResource:Nw,__disposeResources:Dw,__rewriteRelativeImportExtension:Mw}},Symbol.toStringTag,{value:"Module"}));var Pf="right-scroll-bar-position",Bf="width-before-scroll-bar",cL="with-scroll-bars-hidden",dL="--removed-body-scroll-bar-size";function Tg(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function fL(e,t){var n=v.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var i=n.value;i!==r&&(n.value=r,n.callback(r,i))}}}})[0];return n.callback=t,n.facade}var hL=typeof window<"u"?v.useLayoutEffect:v.useEffect,Lw=new WeakMap;function pL(e,t){var n=fL(null,function(r){return e.forEach(function(i){return Tg(i,r)})});return hL(function(){var r=Lw.get(n);if(r){var i=new Set(r),a=new Set(e),s=n.current;i.forEach(function(o){a.has(o)||Tg(o,null)}),a.forEach(function(o){i.has(o)||Tg(o,s)})}Lw.set(n,e)},[e]),n}function mL(e){return e}function gL(e,t){t===void 0&&(t=mL);var n=[],r=!1,i={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(a){var s=t(a,r);return n.push(s),function(){n=n.filter(function(o){return o!==s})}},assignSyncMedium:function(a){for(r=!0;n.length;){var s=n;n=[],s.forEach(a)}n={push:function(o){return a(o)},filter:function(){return n}}},assignMedium:function(a){r=!0;var s=[];if(n.length){var o=n;n=[],o.forEach(a),s=n}var u=function(){var c=s;s=[],c.forEach(a)},l=function(){return Promise.resolve().then(u)};l(),n={push:function(c){s.push(c),l()},filter:function(c){return s=s.filter(c),n}}}};return i}function Iw(e){e===void 0&&(e={});var t=gL(null);return t.options=Yt({async:!0,ssr:!1},e),t}var Pw=function(e){var t=e.sideCar,n=Il(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return v.createElement(r,Yt({},n))};Pw.isSideCarExport=!0;function Bw(e,t){return e.useMedium(t),Pw}var Uw=Iw(),wg=function(){},Uf=v.forwardRef(function(e,t){var n=v.useRef(null),r=v.useState({onScrollCapture:wg,onWheelCapture:wg,onTouchMoveCapture:wg}),i=r[0],a=r[1],s=e.forwardProps,o=e.children,u=e.className,l=e.removeScrollBar,c=e.enabled,d=e.shards,f=e.sideCar,h=e.noIsolation,g=e.inert,b=e.allowPinchZoom,T=e.as,m=T===void 0?"div":T,y=e.gapMode,x=Il(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),w=f,_=pL([n,t]),A=Yt(Yt({},x),i);return v.createElement(v.Fragment,null,c&&v.createElement(w,{sideCar:Uw,removeScrollBar:l,shards:d,noIsolation:h,inert:g,setCallbacks:a,allowPinchZoom:!!b,lockRef:n,gapMode:y}),s?v.cloneElement(v.Children.only(o),Yt(Yt({},A),{ref:_})):v.createElement(m,Yt({},A,{className:u,ref:_}),o))});Uf.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},Uf.classNames={fullWidth:Bf,zeroRight:Pf};var jw=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function bL(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=jw();return t&&e.setAttribute("nonce",t),e}function yL(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function vL(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var xL=function(){var e=0,t=null;return{add:function(n){e==0&&(t=bL())&&(yL(t,n),vL(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},EL=function(){var e=xL();return function(t,n){v.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},_g=function(){var e=EL(),t=function(n){var r=n.styles,i=n.dynamic;return e(r,i),null};return t},TL={left:0,top:0,right:0,gap:0},Sg=function(e){return parseInt(e||"",10)||0},wL=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],i=t[e==="padding"?"paddingRight":"marginRight"];return[Sg(n),Sg(r),Sg(i)]},_L=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return TL;var t=wL(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},SL=_g(),Fo="data-scroll-locked",AL=function(e,t,n,r){var i=e.left,a=e.top,s=e.right,o=e.gap;return n===void 0&&(n="margin"),`
49
+ `).replace(q4,"")}function YT(e,t){return t=VT(t),VT(e)===t}function rf(){}function We(e,t,n,r,i,a){switch(n){case"children":typeof r=="string"?t==="body"||t==="textarea"&&r===""||ro(e,r):(typeof r=="number"||typeof r=="bigint")&&t!=="body"&&ro(e,""+r);break;case"className":dd(e,"class",r);break;case"tabIndex":dd(e,"tabindex",r);break;case"dir":case"role":case"viewBox":case"width":case"height":dd(e,n,r);break;case"style":ex(e,r,a);break;case"data":if(t!=="object"){dd(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=pd(""+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 a=="function"&&(n==="formAction"?(t!=="input"&&We(e,t,"name",i.name,i,null),We(e,t,"formEncType",i.formEncType,i,null),We(e,t,"formMethod",i.formMethod,i,null),We(e,t,"formTarget",i.formTarget,i,null)):(We(e,t,"encType",i.encType,i,null),We(e,t,"method",i.method,i,null),We(e,t,"target",i.target,i,null)));if(r==null||typeof r=="symbol"||typeof r=="boolean"){e.removeAttribute(n);break}r=pd(""+r),e.setAttribute(n,r);break;case"onClick":r!=null&&(e.onclick=rf);break;case"onScroll":r!=null&&Le("scroll",e);break;case"onScrollEnd":r!=null&&Le("scrollend",e);break;case"dangerouslySetInnerHTML":if(r!=null){if(typeof r!="object"||!("__html"in r))throw Error(q(61));if(n=r.__html,n!=null){if(i.children!=null)throw Error(q(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=pd(""+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":Le("beforetoggle",e),Le("toggle",e),cd(e,"popover",r);break;case"xlinkActuate":ri(e,"http://www.w3.org/1999/xlink","xlink:actuate",r);break;case"xlinkArcrole":ri(e,"http://www.w3.org/1999/xlink","xlink:arcrole",r);break;case"xlinkRole":ri(e,"http://www.w3.org/1999/xlink","xlink:role",r);break;case"xlinkShow":ri(e,"http://www.w3.org/1999/xlink","xlink:show",r);break;case"xlinkTitle":ri(e,"http://www.w3.org/1999/xlink","xlink:title",r);break;case"xlinkType":ri(e,"http://www.w3.org/1999/xlink","xlink:type",r);break;case"xmlBase":ri(e,"http://www.w3.org/XML/1998/namespace","xml:base",r);break;case"xmlLang":ri(e,"http://www.w3.org/XML/1998/namespace","xml:lang",r);break;case"xmlSpace":ri(e,"http://www.w3.org/XML/1998/namespace","xml:space",r);break;case"is":cd(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=xD.get(n)||n,cd(e,n,r))}}function L0(e,t,n,r,i,a){switch(n){case"style":ex(e,r,a);break;case"dangerouslySetInnerHTML":if(r!=null){if(typeof r!="object"||!("__html"in r))throw Error(q(61));if(n=r.__html,n!=null){if(i.children!=null)throw Error(q(60));e.innerHTML=n}}break;case"children":typeof r=="string"?ro(e,r):(typeof r=="number"||typeof r=="bigint")&&ro(e,""+r);break;case"onScroll":r!=null&&Le("scroll",e);break;case"onScrollEnd":r!=null&&Le("scrollend",e);break;case"onClick":r!=null&&(e.onclick=rf);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!qv.hasOwnProperty(n))e:{if(n[0]==="o"&&n[1]==="n"&&(i=n.endsWith("Capture"),t=n.slice(2,i?n.length-7:void 0),a=e[Tn]||null,a=a!=null?a[n]:null,typeof a=="function"&&e.removeEventListener(t,a,i),typeof r=="function")){typeof a!="function"&&a!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(t,r,i);break e}n in e?e[n]=r:r===!0?e.setAttribute(n,""):cd(e,n,r)}}}function Qt(e,t,n){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Le("error",e),Le("load",e);var r=!1,i=!1,a;for(a in n)if(n.hasOwnProperty(a)){var s=n[a];if(s!=null)switch(a){case"src":r=!0;break;case"srcSet":i=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(q(137,t));default:We(e,t,a,s,n,null)}}i&&We(e,t,"srcSet",n.srcSet,n,null),r&&We(e,t,"src",n.src,n,null);return;case"input":Le("invalid",e);var o=a=s=i=null,u=null,l=null;for(r in n)if(n.hasOwnProperty(r)){var c=n[r];if(c!=null)switch(r){case"name":i=c;break;case"type":s=c;break;case"checked":u=c;break;case"defaultChecked":l=c;break;case"value":a=c;break;case"defaultValue":o=c;break;case"children":case"dangerouslySetInnerHTML":if(c!=null)throw Error(q(137,t));break;default:We(e,t,r,c,n,null)}}Kv(e,a,o,u,l,s,i,!1),fd(e);return;case"select":Le("invalid",e),r=s=a=null;for(i in n)if(n.hasOwnProperty(i)&&(o=n[i],o!=null))switch(i){case"value":a=o;break;case"defaultValue":s=o;break;case"multiple":r=o;default:We(e,t,i,o,n,null)}t=a,n=s,e.multiple=!!r,t!=null?no(e,!!r,t,!1):n!=null&&no(e,!!r,n,!0);return;case"textarea":Le("invalid",e),a=i=r=null;for(s in n)if(n.hasOwnProperty(s)&&(o=n[s],o!=null))switch(s){case"value":r=o;break;case"defaultValue":i=o;break;case"children":a=o;break;case"dangerouslySetInnerHTML":if(o!=null)throw Error(q(91));break;default:We(e,t,s,o,n,null)}Zv(e,r,i,a),fd(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:We(e,t,u,r,n,null)}return;case"dialog":Le("cancel",e),Le("close",e);break;case"iframe":case"object":Le("load",e);break;case"video":case"audio":for(r=0;r<El.length;r++)Le(El[r],e);break;case"image":Le("error",e),Le("load",e);break;case"details":Le("toggle",e);break;case"embed":case"source":case"link":Le("error",e),Le("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(q(137,t));default:We(e,t,l,r,n,null)}return;default:if(Kp(t)){for(c in n)n.hasOwnProperty(c)&&(r=n[c],r!==void 0&&L0(e,t,c,r,n,void 0));return}}for(o in n)n.hasOwnProperty(o)&&(r=n[o],r!=null&&We(e,t,o,r,n,null))}function G4(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 i=null,a=null,s=null,o=null,u=null,l=null,c=null;for(h in n){var d=n[h];if(n.hasOwnProperty(h)&&d!=null)switch(h){case"checked":break;case"value":break;case"defaultValue":u=d;default:r.hasOwnProperty(h)||We(e,t,h,null,r,d)}}for(var f in r){var h=r[f];if(d=n[f],r.hasOwnProperty(f)&&(h!=null||d!=null))switch(f){case"type":a=h;break;case"name":i=h;break;case"checked":l=h;break;case"defaultChecked":c=h;break;case"value":s=h;break;case"defaultValue":o=h;break;case"children":case"dangerouslySetInnerHTML":if(h!=null)throw Error(q(137,t));break;default:h!==d&&We(e,t,f,h,r,d)}}Wp(e,s,o,u,l,c,a,i);return;case"select":h=s=o=f=null;for(a in n)if(u=n[a],n.hasOwnProperty(a)&&u!=null)switch(a){case"value":break;case"multiple":h=u;default:r.hasOwnProperty(a)||We(e,t,a,null,r,u)}for(i in r)if(a=r[i],u=n[i],r.hasOwnProperty(i)&&(a!=null||u!=null))switch(i){case"value":f=a;break;case"defaultValue":o=a;break;case"multiple":s=a;default:a!==u&&We(e,t,i,a,r,u)}t=o,n=s,r=h,f!=null?no(e,!!n,f,!1):!!r!=!!n&&(t!=null?no(e,!!n,t,!0):no(e,!!n,n?[]:"",!1));return;case"textarea":h=f=null;for(o in n)if(i=n[o],n.hasOwnProperty(o)&&i!=null&&!r.hasOwnProperty(o))switch(o){case"value":break;case"children":break;default:We(e,t,o,null,r,i)}for(s in r)if(i=r[s],a=n[s],r.hasOwnProperty(s)&&(i!=null||a!=null))switch(s){case"value":f=i;break;case"defaultValue":h=i;break;case"children":break;case"dangerouslySetInnerHTML":if(i!=null)throw Error(q(91));break;default:i!==a&&We(e,t,s,i,r,a)}Qv(e,f,h);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:We(e,t,g,null,r,f)}for(u in r)if(f=r[u],h=n[u],r.hasOwnProperty(u)&&f!==h&&(f!=null||h!=null))switch(u){case"selected":e.selected=f&&typeof f!="function"&&typeof f!="symbol";break;default:We(e,t,u,f,r,h)}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 b in n)f=n[b],n.hasOwnProperty(b)&&f!=null&&!r.hasOwnProperty(b)&&We(e,t,b,null,r,f);for(l in r)if(f=r[l],h=n[l],r.hasOwnProperty(l)&&f!==h&&(f!=null||h!=null))switch(l){case"children":case"dangerouslySetInnerHTML":if(f!=null)throw Error(q(137,t));break;default:We(e,t,l,f,r,h)}return;default:if(Kp(t)){for(var T in n)f=n[T],n.hasOwnProperty(T)&&f!==void 0&&!r.hasOwnProperty(T)&&L0(e,t,T,void 0,r,f);for(c in r)f=r[c],h=n[c],!r.hasOwnProperty(c)||f===h||f===void 0&&h===void 0||L0(e,t,c,f,r,h);return}}for(var m in n)f=n[m],n.hasOwnProperty(m)&&f!=null&&!r.hasOwnProperty(m)&&We(e,t,m,null,r,f);for(d in r)f=r[d],h=n[d],!r.hasOwnProperty(d)||f===h||f==null&&h==null||We(e,t,d,f,r,h)}var I0=null,P0=null;function af(e){return e.nodeType===9?e:e.ownerDocument}function qT(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 GT(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 B0(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 U0=null;function $4(){var e=window.event;return e&&e.type==="popstate"?e===U0?!1:(U0=e,!0):(U0=null,!1)}var $T=typeof setTimeout=="function"?setTimeout:void 0,W4=typeof clearTimeout=="function"?clearTimeout:void 0,WT=typeof Promise=="function"?Promise:void 0,X4=typeof queueMicrotask=="function"?queueMicrotask:typeof WT<"u"?function(e){return WT.resolve(null).then(e).catch(K4)}:$T;function K4(e){setTimeout(function(){throw e})}function j0(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8)if(n=i.data,n==="/$"){if(r===0){e.removeChild(i),Rl(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=i}while(n);Rl(t)}function F0(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":F0(n),$p(n);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(n.rel.toLowerCase()==="stylesheet")continue}e.removeChild(n)}}function Q4(e,t,n,r){for(;e.nodeType===1;){var i=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!r&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(r){if(!e[Uu])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(a=e.getAttribute("rel"),a==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(a!==i.rel||e.getAttribute("href")!==(i.href==null?null:i.href)||e.getAttribute("crossorigin")!==(i.crossOrigin==null?null:i.crossOrigin)||e.getAttribute("title")!==(i.title==null?null:i.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(a=e.getAttribute("src"),(a!==(i.src==null?null:i.src)||e.getAttribute("type")!==(i.type==null?null:i.type)||e.getAttribute("crossorigin")!==(i.crossOrigin==null?null:i.crossOrigin))&&a&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var a=i.name==null?null:""+i.name;if(i.type==="hidden"&&e.getAttribute("name")===a)return e}else return e;if(e=xr(e.nextSibling),e===null)break}return null}function Z4(e,t,n){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!n||(e=xr(e.nextSibling),e===null))return null;return e}function xr(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 XT(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 KT(e,t,n){switch(t=af(n),e){case"html":if(e=t.documentElement,!e)throw Error(q(452));return e;case"head":if(e=t.head,!e)throw Error(q(453));return e;case"body":if(e=t.body,!e)throw Error(q(454));return e;default:throw Error(q(451))}}var or=new Map,QT=new Set;function sf(e){return typeof e.getRootNode=="function"?e.getRootNode():e.ownerDocument}var yi=st.d;st.d={f:J4,r:e5,D:t5,C:n5,L:r5,m:i5,X:s5,S:a5,M:o5};function J4(){var e=yi.f(),t=Qd();return e||t}function e5(e){var t=Js(e);t!==null&&t.tag===5&&t.type==="form"?_E(t):yi.r(e)}var No=typeof document>"u"?null:document;function ZT(e,t,n){var r=No;if(r&&typeof t=="string"&&t){var i=Qn(t);i='link[rel="'+e+'"][href="'+i+'"]',typeof n=="string"&&(i+='[crossorigin="'+n+'"]'),QT.has(i)||(QT.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement("link"),Qt(t,"link",e),zt(t),r.head.appendChild(t)))}}function t5(e){yi.D(e),ZT("dns-prefetch",e,null)}function n5(e,t){yi.C(e,t),ZT("preconnect",e,t)}function r5(e,t,n){yi.L(e,t,n);var r=No;if(r&&e&&t){var i='link[rel="preload"][as="'+Qn(t)+'"]';t==="image"&&n&&n.imageSrcSet?(i+='[imagesrcset="'+Qn(n.imageSrcSet)+'"]',typeof n.imageSizes=="string"&&(i+='[imagesizes="'+Qn(n.imageSizes)+'"]')):i+='[href="'+Qn(e)+'"]';var a=i;switch(t){case"style":a=Do(e);break;case"script":a=Mo(e)}or.has(a)||(e=at({rel:"preload",href:t==="image"&&n&&n.imageSrcSet?void 0:e,as:t},n),or.set(a,e),r.querySelector(i)!==null||t==="style"&&r.querySelector(wl(a))||t==="script"&&r.querySelector(_l(a))||(t=r.createElement("link"),Qt(t,"link",e),zt(t),r.head.appendChild(t)))}}function i5(e,t){yi.m(e,t);var n=No;if(n&&e){var r=t&&typeof t.as=="string"?t.as:"script",i='link[rel="modulepreload"][as="'+Qn(r)+'"][href="'+Qn(e)+'"]',a=i;switch(r){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":a=Mo(e)}if(!or.has(a)&&(e=at({rel:"modulepreload",href:e},t),or.set(a,e),n.querySelector(i)===null)){switch(r){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(n.querySelector(_l(a)))return}r=n.createElement("link"),Qt(r,"link",e),zt(r),n.head.appendChild(r)}}}function a5(e,t,n){yi.S(e,t,n);var r=No;if(r&&e){var i=eo(r).hoistableStyles,a=Do(e);t=t||"default";var s=i.get(a);if(!s){var o={loading:0,preload:null};if(s=r.querySelector(wl(a)))o.loading=5;else{e=at({rel:"stylesheet",href:e,"data-precedence":t},n),(n=or.get(a))&&z0(e,n);var u=s=r.createElement("link");zt(u),Qt(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,of(s,t,r)}s={type:"stylesheet",instance:s,count:1,state:o},i.set(a,s)}}}function s5(e,t){yi.X(e,t);var n=No;if(n&&e){var r=eo(n).hoistableScripts,i=Mo(e),a=r.get(i);a||(a=n.querySelector(_l(i)),a||(e=at({src:e,async:!0},t),(t=or.get(i))&&H0(e,t),a=n.createElement("script"),zt(a),Qt(a,"link",e),n.head.appendChild(a)),a={type:"script",instance:a,count:1,state:null},r.set(i,a))}}function o5(e,t){yi.M(e,t);var n=No;if(n&&e){var r=eo(n).hoistableScripts,i=Mo(e),a=r.get(i);a||(a=n.querySelector(_l(i)),a||(e=at({src:e,async:!0,type:"module"},t),(t=or.get(i))&&H0(e,t),a=n.createElement("script"),zt(a),Qt(a,"link",e),n.head.appendChild(a)),a={type:"script",instance:a,count:1,state:null},r.set(i,a))}}function JT(e,t,n,r){var i=(i=Yi.current)?sf(i):null;if(!i)throw Error(q(446));switch(e){case"meta":case"title":return null;case"style":return typeof n.precedence=="string"&&typeof n.href=="string"?(t=Do(n.href),n=eo(i).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=Do(n.href);var a=eo(i).hoistableStyles,s=a.get(e);if(s||(i=i.ownerDocument||i,s={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},a.set(e,s),(a=i.querySelector(wl(e)))&&!a._p&&(s.instance=a,s.state.loading=5),or.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},or.set(e,n),a||u5(i,e,n,s.state))),t&&r===null)throw Error(q(528,""));return s}if(t&&r!==null)throw Error(q(529,""));return null;case"script":return t=n.async,n=n.src,typeof n=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=Mo(n),n=eo(i).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(q(444,e))}}function Do(e){return'href="'+Qn(e)+'"'}function wl(e){return'link[rel="stylesheet"]['+e+"]"}function e2(e){return at({},e,{"data-precedence":e.precedence,precedence:null})}function u5(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}),Qt(t,"link",n),zt(t),e.head.appendChild(t))}function Mo(e){return'[src="'+Qn(e)+'"]'}function _l(e){return"script[async]"+e}function t2(e,t,n){if(t.count++,t.instance===null)switch(t.type){case"style":var r=e.querySelector('style[data-href~="'+Qn(n.href)+'"]');if(r)return t.instance=r,zt(r),r;var i=at({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement("style"),zt(r),Qt(r,"style",i),of(r,n.precedence,e),t.instance=r;case"stylesheet":i=Do(n.href);var a=e.querySelector(wl(i));if(a)return t.state.loading|=4,t.instance=a,zt(a),a;r=e2(n),(i=or.get(i))&&z0(r,i),a=(e.ownerDocument||e).createElement("link"),zt(a);var s=a;return s._p=new Promise(function(o,u){s.onload=o,s.onerror=u}),Qt(a,"link",r),t.state.loading|=4,of(a,n.precedence,e),t.instance=a;case"script":return a=Mo(n.src),(i=e.querySelector(_l(a)))?(t.instance=i,zt(i),i):(r=n,(i=or.get(a))&&(r=at({},n),H0(r,i)),e=e.ownerDocument||e,i=e.createElement("script"),zt(i),Qt(i,"link",r),e.head.appendChild(i),t.instance=i);case"void":return null;default:throw Error(q(443,t.type))}else t.type==="stylesheet"&&!(t.state.loading&4)&&(r=t.instance,t.state.loading|=4,of(r,n.precedence,e));return t.instance}function of(e,t,n){for(var r=n.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),i=r.length?r[r.length-1]:null,a=i,s=0;s<r.length;s++){var o=r[s];if(o.dataset.precedence===t)a=o;else if(a!==i)break}a?a.parentNode.insertBefore(e,a.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function z0(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function H0(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var uf=null;function n2(e,t,n){if(uf===null){var r=new Map,i=uf=new Map;i.set(n,r)}else i=uf,r=i.get(n),r||(r=new Map,i.set(n,r));if(r.has(e))return r;for(r.set(e,null),n=n.getElementsByTagName(e),i=0;i<n.length;i++){var a=n[i];if(!(a[Uu]||a[nn]||e==="link"&&a.getAttribute("rel")==="stylesheet")&&a.namespaceURI!=="http://www.w3.org/2000/svg"){var s=a.getAttribute(t)||"";s=e+s;var o=r.get(s);o?o.push(a):r.set(s,[a])}}return r}function r2(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t==="title"?e.querySelector("head > title"):null)}function l5(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 i2(e){return!(e.type==="stylesheet"&&!(e.state.loading&3))}var Sl=null;function c5(){}function d5(e,t,n){if(Sl===null)throw Error(q(475));var r=Sl;if(t.type==="stylesheet"&&(typeof n.media!="string"||matchMedia(n.media).matches!==!1)&&!(t.state.loading&4)){if(t.instance===null){var i=Do(n.href),a=e.querySelector(wl(i));if(a){e=a._p,e!==null&&typeof e=="object"&&typeof e.then=="function"&&(r.count++,r=lf.bind(r),e.then(r,r)),t.state.loading|=4,t.instance=a,zt(a);return}a=e.ownerDocument||e,n=e2(n),(i=or.get(i))&&z0(n,i),a=a.createElement("link"),zt(a);var s=a;s._p=new Promise(function(o,u){s.onload=o,s.onerror=u}),Qt(a,"link",n),t.instance=a}r.stylesheets===null&&(r.stylesheets=new Map),r.stylesheets.set(t,e),(e=t.state.preload)&&!(t.state.loading&3)&&(r.count++,t=lf.bind(r),e.addEventListener("load",t),e.addEventListener("error",t))}}function f5(){if(Sl===null)throw Error(q(475));var e=Sl;return e.stylesheets&&e.count===0&&V0(e,e.stylesheets),0<e.count?function(t){var n=setTimeout(function(){if(e.stylesheets&&V0(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 lf(){if(this.count--,this.count===0){if(this.stylesheets)V0(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var cf=null;function V0(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,cf=new Map,t.forEach(h5,e),cf=null,lf.call(e))}function h5(e,t){if(!(t.state.loading&4)){var n=cf.get(e);if(n)var r=n.get(null);else{n=new Map,cf.set(e,n);for(var i=e.querySelectorAll("link[data-precedence],style[data-precedence]"),a=0;a<i.length;a++){var s=i[a];(s.nodeName==="LINK"||s.getAttribute("media")!=="not all")&&(n.set(s.dataset.precedence,s),r=s)}r&&n.set(null,r)}i=t.instance,s=i.getAttribute("data-precedence"),a=n.get(s)||r,a===r&&n.set(null,i),n.set(s,i),this.count++,r=lf.bind(this),i.addEventListener("load",r),i.addEventListener("error",r),a?a.parentNode.insertBefore(i,a.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(i,e.firstChild)),t.state.loading|=4}}var Al={$$typeof:ti,Provider:null,Consumer:null,_currentValue:Za,_currentValue2:Za,_threadCount:0};function p5(e,t,n,r,i,a,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=qp(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.finishedLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=qp(0),this.hiddenUpdates=qp(null),this.identifierPrefix=r,this.onUncaughtError=i,this.onCaughtError=a,this.onRecoverableError=s,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=o,this.incompleteTransitions=new Map}function a2(e,t,n,r,i,a,s,o,u,l,c,d){return e=new p5(e,t,n,s,o,u,l,d),t=1,a===!0&&(t|=24),a=ar(3,null,null,t),e.current=a,a.stateNode=e,t=Em(),t.refCount++,e.pooledCache=t,t.refCount++,a.memoizedState={element:r,isDehydrated:n,cache:t},t0(a),e}function s2(e){return e?(e=co,e):co}function o2(e,t,n,r,i,a){i=s2(i),r.context===null?r.context=i:r.pendingContext=i,r=ta(t),r.payload={element:n},a=a===void 0?null:a,a!==null&&(r.callback=a),n=na(e,r,t),n!==null&&(bn(n,e,t),ll(n,e,t))}function u2(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function Y0(e,t){u2(e,t),(e=e.alternate)&&u2(e,t)}function l2(e){if(e.tag===13){var t=Wi(e,67108864);t!==null&&bn(t,e,67108864),Y0(e,67108864)}}var df=!0;function m5(e,t,n,r){var i=xe.T;xe.T=null;var a=st.p;try{st.p=2,q0(e,t,n,r)}finally{st.p=a,xe.T=i}}function g5(e,t,n,r){var i=xe.T;xe.T=null;var a=st.p;try{st.p=8,q0(e,t,n,r)}finally{st.p=a,xe.T=i}}function q0(e,t,n,r){if(df){var i=G0(r);if(i===null)M0(e,t,r,ff,n),d2(e,r);else if(y5(i,e,t,n,r))r.stopPropagation();else if(d2(e,r),t&4&&-1<b5.indexOf(e)){for(;i!==null;){var a=Js(i);if(a!==null)switch(a.tag){case 3:if(a=a.stateNode,a.current.memoizedState.isDehydrated){var s=Ja(a.pendingLanes);if(s!==0){var o=a;for(o.pendingLanes|=2,o.entangledLanes|=2;s;){var u=1<<31-Mn(s);o.entanglements[1]|=u,s&=~u}Ur(a),!(pt&6)&&(Wd=Mr()+500,xl(0))}}break;case 13:o=Wi(a,2),o!==null&&bn(o,a,2),Qd(),Y0(a,2)}if(a=G0(r),a===null&&M0(e,t,r,ff,n),a===i)break;i=a}i!==null&&r.stopPropagation()}else M0(e,t,r,null,n)}}function G0(e){return e=Zp(e),$0(e)}var ff=null;function $0(e){if(ff=null,e=es(e),e!==null){var t=Xs(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=Nv(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 ff=e,null}function c2(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(nD()){case Lv:return 2;case Iv:return 8;case sd:case rD:return 32;case Pv:return 268435456;default:return 32}default:return 32}}var W0=!1,la=null,ca=null,da=null,Cl=new Map,kl=new Map,fa=[],b5="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 d2(e,t){switch(e){case"focusin":case"focusout":la=null;break;case"dragenter":case"dragleave":ca=null;break;case"mouseover":case"mouseout":da=null;break;case"pointerover":case"pointerout":Cl.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":kl.delete(t.pointerId)}}function Ol(e,t,n,r,i,a){return e===null||e.nativeEvent!==a?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:a,targetContainers:[i]},t!==null&&(t=Js(t),t!==null&&l2(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function y5(e,t,n,r,i){switch(t){case"focusin":return la=Ol(la,e,t,n,r,i),!0;case"dragenter":return ca=Ol(ca,e,t,n,r,i),!0;case"mouseover":return da=Ol(da,e,t,n,r,i),!0;case"pointerover":var a=i.pointerId;return Cl.set(a,Ol(Cl.get(a)||null,e,t,n,r,i)),!0;case"gotpointercapture":return a=i.pointerId,kl.set(a,Ol(kl.get(a)||null,e,t,n,r,i)),!0}return!1}function f2(e){var t=es(e.target);if(t!==null){var n=Xs(t);if(n!==null){if(t=n.tag,t===13){if(t=Nv(n),t!==null){e.blockedOn=t,fD(e.priority,function(){if(n.tag===13){var r=Un(),i=Wi(n,r);i!==null&&bn(i,n,r),Y0(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 hf(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=G0(e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);Qp=r,n.target.dispatchEvent(r),Qp=null}else return t=Js(n),t!==null&&l2(t),e.blockedOn=n,!1;t.shift()}return!0}function h2(e,t,n){hf(e)&&n.delete(t)}function v5(){W0=!1,la!==null&&hf(la)&&(la=null),ca!==null&&hf(ca)&&(ca=null),da!==null&&hf(da)&&(da=null),Cl.forEach(h2),kl.forEach(h2)}function pf(e,t){e.blockedOn===t&&(e.blockedOn=null,W0||(W0=!0,Lt.unstable_scheduleCallback(Lt.unstable_NormalPriority,v5)))}var mf=null;function p2(e){mf!==e&&(mf=e,Lt.unstable_scheduleCallback(Lt.unstable_NormalPriority,function(){mf===e&&(mf=null);for(var t=0;t<e.length;t+=3){var n=e[t],r=e[t+1],i=e[t+2];if(typeof r!="function"){if($0(r||n)===null)continue;break}var a=Js(n);a!==null&&(e.splice(t,3),t-=3,Bm(a,{pending:!0,data:i,method:n.method,action:r},r,i))}}))}function Rl(e){function t(u){return pf(u,e)}la!==null&&pf(la,e),ca!==null&&pf(ca,e),da!==null&&pf(da,e),Cl.forEach(t),kl.forEach(t);for(var n=0;n<fa.length;n++){var r=fa[n];r.blockedOn===e&&(r.blockedOn=null)}for(;0<fa.length&&(n=fa[0],n.blockedOn===null);)f2(n),n.blockedOn===null&&fa.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(r=0;r<n.length;r+=3){var i=n[r],a=n[r+1],s=i[Tn]||null;if(typeof a=="function")s||p2(n);else if(s){var o=null;if(a&&a.hasAttribute("formAction")){if(i=a,s=a[Tn]||null)o=s.formAction;else if($0(i)!==null)continue}else o=s.action;typeof o=="function"?n[r+1]=o:(n.splice(r,3),r-=3),p2(n)}}}function X0(e){this._internalRoot=e}gf.prototype.render=X0.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(q(409));var n=t.current,r=Un();o2(n,r,e,t,null,null)},gf.prototype.unmount=X0.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;e.tag===0&&ko(),o2(e.current,2,null,e,null,null),Qd(),t[Zs]=null}};function gf(e){this._internalRoot=e}gf.prototype.unstable_scheduleHydration=function(e){if(e){var t=Hv();e={blockedOn:null,target:e,priority:t};for(var n=0;n<fa.length&&t!==0&&t<fa[n].priority;n++);fa.splice(n,0,e),n===0&&f2(e)}};var m2=wv.version;if(m2!=="19.0.0")throw Error(q(527,m2,"19.0.0"));st.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(q(188)):(e=Object.keys(e).join(","),Error(q(268,e)));return e=JN(t),e=e!==null?Mv(e):null,e=e===null?null:e.stateNode,e};var x5={bundleType:0,version:"19.0.0",rendererPackageName:"react-dom",currentDispatcherRef:xe,findFiberByHostInstance:es,reconcilerVersion:"19.0.0"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var bf=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!bf.isDisabled&&bf.supportsFiber)try{Iu=bf.inject(x5),Dn=bf}catch{}}ed.createRoot=function(e,t){if(!_v(e))throw Error(q(299));var n=!1,r="",i=DE,a=ME,s=LE,o=null;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onUncaughtError!==void 0&&(i=t.onUncaughtError),t.onCaughtError!==void 0&&(a=t.onCaughtError),t.onRecoverableError!==void 0&&(s=t.onRecoverableError),t.unstable_transitionCallbacks!==void 0&&(o=t.unstable_transitionCallbacks)),t=a2(e,1,!1,null,null,n,r,i,a,s,o,null),e[Zs]=t.current,D0(e.nodeType===8?e.parentNode:e),new X0(t)},ed.hydrateRoot=function(e,t,n){if(!_v(e))throw Error(q(299));var r=!1,i="",a=DE,s=ME,o=LE,u=null,l=null;return n!=null&&(n.unstable_strictMode===!0&&(r=!0),n.identifierPrefix!==void 0&&(i=n.identifierPrefix),n.onUncaughtError!==void 0&&(a=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=a2(e,1,!0,t,n??null,r,i,a,s,o,u,l),t.context=s2(null),n=t.current,r=Un(),i=ta(r),i.callback=null,na(n,i,r),t.current.lanes=r,Bu(t,r),Ur(t),e[Zs]=t.current,D0(e),new gf(t)},ed.version="19.0.0";function g2(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(g2)}catch(e){console.error(e)}}g2(),bv.exports=ed;var E5=bv.exports;const b2="3.0.94";function Sn(e,t,{checkForDefaultPrevented:n=!0}={}){return function(i){if(e==null||e(i),n===!1||!i.defaultPrevented)return t==null?void 0:t(i)}}function T5(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function y2(...e){return t=>e.forEach(n=>T5(n,t))}function jr(...e){return v.useCallback(y2(...e),e)}function w5(e,t){const n=v.createContext(t),r=a=>{const{children:s,...o}=a,u=v.useMemo(()=>o,Object.values(o));return E.jsx(n.Provider,{value:u,children:s})};r.displayName=e+"Provider";function i(a){const s=v.useContext(n);if(s)return s;if(t!==void 0)return t;throw new Error(`\`${a}\` must be used within \`${e}\``)}return[r,i]}function yf(e,t=[]){let n=[];function r(a,s){const o=v.createContext(s),u=n.length;n=[...n,s];const l=d=>{var m;const{scope:f,children:h,...g}=d,b=((m=f==null?void 0:f[e])==null?void 0:m[u])||o,T=v.useMemo(()=>g,Object.values(g));return E.jsx(b.Provider,{value:T,children:h})};l.displayName=a+"Provider";function c(d,f){var b;const h=((b=f==null?void 0:f[e])==null?void 0:b[u])||o,g=v.useContext(h);if(g)return g;if(s!==void 0)return s;throw new Error(`\`${d}\` must be used within \`${a}\``)}return[l,c]}const i=()=>{const a=n.map(s=>v.createContext(s));return function(o){const u=(o==null?void 0:o[e])||a;return v.useMemo(()=>({[`__scope${e}`]:{...o,[e]:u}}),[o,u])}};return i.scopeName=e,[r,_5(i,...t)]}function _5(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(a){const s=r.reduce((o,{useScope:u,scopeName:l})=>{const d=u(a)[`__scope${l}`];return{...o,...d}},{});return v.useMemo(()=>({[`__scope${t.scopeName}`]:s}),[s])}};return n.scopeName=t.scopeName,n}var vf=v.forwardRef((e,t)=>{const{children:n,...r}=e,i=v.Children.toArray(n),a=i.find(S5);if(a){const s=a.props.children,o=i.map(u=>u===a?v.Children.count(s)>1?v.Children.only(null):v.isValidElement(s)?s.props.children:null:u);return E.jsx(K0,{...r,ref:t,children:v.isValidElement(s)?v.cloneElement(s,void 0,o):null})}return E.jsx(K0,{...r,ref:t,children:n})});vf.displayName="Slot";var K0=v.forwardRef((e,t)=>{const{children:n,...r}=e;if(v.isValidElement(n)){const i=C5(n);return v.cloneElement(n,{...A5(r,n.props),ref:t?y2(t,i):i})}return v.Children.count(n)>1?v.Children.only(null):null});K0.displayName="SlotClone";var v2=({children:e})=>E.jsx(E.Fragment,{children:e});function S5(e){return v.isValidElement(e)&&e.type===v2}function A5(e,t){const n={...t};for(const r in t){const i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...o)=>{a(...o),i(...o)}:i&&(n[r]=i):r==="style"?n[r]={...i,...a}:r==="className"&&(n[r]=[i,a].filter(Boolean).join(" "))}return{...e,...n}}function C5(e){var r,i;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var k5=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],jn=k5.reduce((e,t)=>{const n=v.forwardRef((r,i)=>{const{asChild:a,...s}=r,o=a?vf:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),E.jsx(o,{...s,ref:i})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function O5(e,t){e&&Qa.flushSync(()=>e.dispatchEvent(t))}function Fn(e){const t=v.useRef(e);return v.useEffect(()=>{t.current=e}),v.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function x2(e,t=globalThis==null?void 0:globalThis.document){const n=Fn(e);v.useEffect(()=>{const r=i=>{i.key==="Escape"&&n(i)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var R5="DismissableLayer",Q0="dismissableLayer.update",N5="dismissableLayer.pointerDownOutside",D5="dismissableLayer.focusOutside",E2,T2=v.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Z0=v.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:a,onInteractOutside:s,onDismiss:o,...u}=e,l=v.useContext(T2),[c,d]=v.useState(null),f=(c==null?void 0:c.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,h]=v.useState({}),g=jr(t,D=>d(D)),b=Array.from(l.layers),[T]=[...l.layersWithOutsidePointerEventsDisabled].slice(-1),m=b.indexOf(T),y=c?b.indexOf(c):-1,x=l.layersWithOutsidePointerEventsDisabled.size>0,w=y>=m,_=I5(D=>{const L=D.target,U=[...l.branches].some(R=>R.contains(L));!w||U||(i==null||i(D),s==null||s(D),D.defaultPrevented||o==null||o())},f),A=P5(D=>{const L=D.target;[...l.branches].some(R=>R.contains(L))||(a==null||a(D),s==null||s(D),D.defaultPrevented||o==null||o())},f);return x2(D=>{y===l.layers.size-1&&(r==null||r(D),!D.defaultPrevented&&o&&(D.preventDefault(),o()))},f),v.useEffect(()=>{if(c)return n&&(l.layersWithOutsidePointerEventsDisabled.size===0&&(E2=f.body.style.pointerEvents,f.body.style.pointerEvents="none"),l.layersWithOutsidePointerEventsDisabled.add(c)),l.layers.add(c),w2(),()=>{n&&l.layersWithOutsidePointerEventsDisabled.size===1&&(f.body.style.pointerEvents=E2)}},[c,f,n,l]),v.useEffect(()=>()=>{c&&(l.layers.delete(c),l.layersWithOutsidePointerEventsDisabled.delete(c),w2())},[c,l]),v.useEffect(()=>{const D=()=>h({});return document.addEventListener(Q0,D),()=>document.removeEventListener(Q0,D)},[]),E.jsx(jn.div,{...u,ref:g,style:{pointerEvents:x?w?"auto":"none":void 0,...e.style},onFocusCapture:Sn(e.onFocusCapture,A.onFocusCapture),onBlurCapture:Sn(e.onBlurCapture,A.onBlurCapture),onPointerDownCapture:Sn(e.onPointerDownCapture,_.onPointerDownCapture)})});Z0.displayName=R5;var M5="DismissableLayerBranch",L5=v.forwardRef((e,t)=>{const n=v.useContext(T2),r=v.useRef(null),i=jr(t,r);return v.useEffect(()=>{const a=r.current;if(a)return n.branches.add(a),()=>{n.branches.delete(a)}},[n.branches]),E.jsx(jn.div,{...e,ref:i})});L5.displayName=M5;function I5(e,t=globalThis==null?void 0:globalThis.document){const n=Fn(e),r=v.useRef(!1),i=v.useRef(()=>{});return v.useEffect(()=>{const a=o=>{if(o.target&&!r.current){let u=function(){_2(N5,n,l,{discrete:!0})};const l={originalEvent:o};o.pointerType==="touch"?(t.removeEventListener("click",i.current),i.current=u,t.addEventListener("click",i.current,{once:!0})):u()}else t.removeEventListener("click",i.current);r.current=!1},s=window.setTimeout(()=>{t.addEventListener("pointerdown",a)},0);return()=>{window.clearTimeout(s),t.removeEventListener("pointerdown",a),t.removeEventListener("click",i.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function P5(e,t=globalThis==null?void 0:globalThis.document){const n=Fn(e),r=v.useRef(!1);return v.useEffect(()=>{const i=a=>{a.target&&!r.current&&_2(D5,n,{originalEvent:a},{discrete:!1})};return t.addEventListener("focusin",i),()=>t.removeEventListener("focusin",i)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function w2(){const e=new CustomEvent(Q0);document.dispatchEvent(e)}function _2(e,t,n,{discrete:r}){const i=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?O5(i,a):i.dispatchEvent(a)}var J0=0;function S2(){v.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??A2()),document.body.insertAdjacentElement("beforeend",e[1]??A2()),J0++,()=>{J0===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),J0--}},[])}function A2(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var eg="focusScope.autoFocusOnMount",tg="focusScope.autoFocusOnUnmount",C2={bubbles:!1,cancelable:!0},B5="FocusScope",k2=v.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:a,...s}=e,[o,u]=v.useState(null),l=Fn(i),c=Fn(a),d=v.useRef(null),f=jr(t,b=>u(b)),h=v.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;v.useEffect(()=>{if(r){let b=function(x){if(h.paused||!o)return;const w=x.target;o.contains(w)?d.current=w:ha(d.current,{select:!0})},T=function(x){if(h.paused||!o)return;const w=x.relatedTarget;w!==null&&(o.contains(w)||ha(d.current,{select:!0}))},m=function(x){if(document.activeElement===document.body)for(const _ of x)_.removedNodes.length>0&&ha(o)};document.addEventListener("focusin",b),document.addEventListener("focusout",T);const y=new MutationObserver(m);return o&&y.observe(o,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",b),document.removeEventListener("focusout",T),y.disconnect()}}},[r,o,h.paused]),v.useEffect(()=>{if(o){N2.add(h);const b=document.activeElement;if(!o.contains(b)){const m=new CustomEvent(eg,C2);o.addEventListener(eg,l),o.dispatchEvent(m),m.defaultPrevented||(U5(V5(O2(o)),{select:!0}),document.activeElement===b&&ha(o))}return()=>{o.removeEventListener(eg,l),setTimeout(()=>{const m=new CustomEvent(tg,C2);o.addEventListener(tg,c),o.dispatchEvent(m),m.defaultPrevented||ha(b??document.body,{select:!0}),o.removeEventListener(tg,c),N2.remove(h)},0)}}},[o,l,c,h]);const g=v.useCallback(b=>{if(!n&&!r||h.paused)return;const T=b.key==="Tab"&&!b.altKey&&!b.ctrlKey&&!b.metaKey,m=document.activeElement;if(T&&m){const y=b.currentTarget,[x,w]=j5(y);x&&w?!b.shiftKey&&m===w?(b.preventDefault(),n&&ha(x,{select:!0})):b.shiftKey&&m===x&&(b.preventDefault(),n&&ha(w,{select:!0})):m===y&&b.preventDefault()}},[n,r,h.paused]);return E.jsx(jn.div,{tabIndex:-1,...s,ref:f,onKeyDown:g})});k2.displayName=B5;function U5(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(ha(r,{select:t}),document.activeElement!==n)return}function j5(e){const t=O2(e),n=R2(t,e),r=R2(t.reverse(),e);return[n,r]}function O2(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const i=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||i?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function R2(e,t){for(const n of e)if(!F5(n,{upTo:t}))return n}function F5(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function z5(e){return e instanceof HTMLInputElement&&"select"in e}function ha(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&z5(e)&&t&&e.select()}}var N2=H5();function H5(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=D2(e,t),e.unshift(t)},remove(t){var n;e=D2(e,t),(n=e[0])==null||n.resume()}}}function D2(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function V5(e){return e.filter(t=>t.tagName!=="A")}var Fr=globalThis!=null&&globalThis.document?v.useLayoutEffect:()=>{},Y5=HN.useId||(()=>{}),q5=0;function Nl(e){const[t,n]=v.useState(Y5());return Fr(()=>{e||n(r=>r??String(q5++))},[e]),e||(t?`radix-${t}`:"")}const G5=["top","right","bottom","left"],pa=Math.min,zn=Math.max,xf=Math.round,Ef=Math.floor,ma=e=>({x:e,y:e}),$5={left:"right",right:"left",bottom:"top",top:"bottom"},W5={start:"end",end:"start"};function ng(e,t,n){return zn(e,pa(t,n))}function vi(e,t){return typeof e=="function"?e(t):e}function xi(e){return e.split("-")[0]}function Lo(e){return e.split("-")[1]}function rg(e){return e==="x"?"y":"x"}function ig(e){return e==="y"?"height":"width"}function ga(e){return["top","bottom"].includes(xi(e))?"y":"x"}function ag(e){return rg(ga(e))}function X5(e,t,n){n===void 0&&(n=!1);const r=Lo(e),i=ag(e),a=ig(i);let s=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(s=Tf(s)),[s,Tf(s)]}function K5(e){const t=Tf(e);return[sg(e),t,sg(t)]}function sg(e){return e.replace(/start|end/g,t=>W5[t])}function Q5(e,t,n){const r=["left","right"],i=["right","left"],a=["top","bottom"],s=["bottom","top"];switch(e){case"top":case"bottom":return n?t?i:r:t?r:i;case"left":case"right":return t?a:s;default:return[]}}function Z5(e,t,n,r){const i=Lo(e);let a=Q5(xi(e),n==="start",r);return i&&(a=a.map(s=>s+"-"+i),t&&(a=a.concat(a.map(sg)))),a}function Tf(e){return e.replace(/left|right|bottom|top/g,t=>$5[t])}function J5(e){return{top:0,right:0,bottom:0,left:0,...e}}function M2(e){return typeof e!="number"?J5(e):{top:e,right:e,bottom:e,left:e}}function wf(e){const{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function L2(e,t,n){let{reference:r,floating:i}=e;const a=ga(t),s=ag(t),o=ig(s),u=xi(t),l=a==="y",c=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[o]/2-i[o]/2;let h;switch(u){case"top":h={x:c,y:r.y-i.height};break;case"bottom":h={x:c,y:r.y+r.height};break;case"right":h={x:r.x+r.width,y:d};break;case"left":h={x:r.x-i.width,y:d};break;default:h={x:r.x,y:r.y}}switch(Lo(t)){case"start":h[s]-=f*(n&&l?-1:1);break;case"end":h[s]+=f*(n&&l?-1:1);break}return h}const eM=async(e,t,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:a=[],platform:s}=n,o=a.filter(Boolean),u=await(s.isRTL==null?void 0:s.isRTL(t));let l=await s.getElementRects({reference:e,floating:t,strategy:i}),{x:c,y:d}=L2(l,r,u),f=r,h={},g=0;for(let b=0;b<o.length;b++){const{name:T,fn:m}=o[b],{x:y,y:x,data:w,reset:_}=await m({x:c,y:d,initialPlacement:r,placement:f,strategy:i,middlewareData:h,rects:l,platform:s,elements:{reference:e,floating:t}});c=y??c,d=x??d,h={...h,[T]:{...h[T],...w}},_&&g<=50&&(g++,typeof _=="object"&&(_.placement&&(f=_.placement),_.rects&&(l=_.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:i}):_.rects),{x:c,y:d}=L2(l,f,u)),b=-1)}return{x:c,y:d,placement:f,strategy:i,middlewareData:h}};async function Dl(e,t){var n;t===void 0&&(t={});const{x:r,y:i,platform:a,rects:s,elements:o,strategy:u}=e,{boundary:l="clippingAncestors",rootBoundary:c="viewport",elementContext:d="floating",altBoundary:f=!1,padding:h=0}=vi(t,e),g=M2(h),T=o[f?d==="floating"?"reference":"floating":d],m=wf(await a.getClippingRect({element:(n=await(a.isElement==null?void 0:a.isElement(T)))==null||n?T:T.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(o.floating)),boundary:l,rootBoundary:c,strategy:u})),y=d==="floating"?{x:r,y:i,width:s.floating.width,height:s.floating.height}:s.reference,x=await(a.getOffsetParent==null?void 0:a.getOffsetParent(o.floating)),w=await(a.isElement==null?void 0:a.isElement(x))?await(a.getScale==null?void 0:a.getScale(x))||{x:1,y:1}:{x:1,y:1},_=wf(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:y,offsetParent:x,strategy:u}):y);return{top:(m.top-_.top+g.top)/w.y,bottom:(_.bottom-m.bottom+g.bottom)/w.y,left:(m.left-_.left+g.left)/w.x,right:(_.right-m.right+g.right)/w.x}}const tM=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:i,rects:a,platform:s,elements:o,middlewareData:u}=t,{element:l,padding:c=0}=vi(e,t)||{};if(l==null)return{};const d=M2(c),f={x:n,y:r},h=ag(i),g=ig(h),b=await s.getDimensions(l),T=h==="y",m=T?"top":"left",y=T?"bottom":"right",x=T?"clientHeight":"clientWidth",w=a.reference[g]+a.reference[h]-f[h]-a.floating[g],_=f[h]-a.reference[h],A=await(s.getOffsetParent==null?void 0:s.getOffsetParent(l));let D=A?A[x]:0;(!D||!await(s.isElement==null?void 0:s.isElement(A)))&&(D=o.floating[x]||a.floating[g]);const L=w/2-_/2,U=D/2-b[g]/2-1,R=pa(d[m],U),H=pa(d[y],U),z=R,te=D-b[g]-H,X=D/2-b[g]/2+L,ne=ng(z,X,te),F=!u.arrow&&Lo(i)!=null&&X!==ne&&a.reference[g]/2-(X<z?R:H)-b[g]/2<0,Y=F?X<z?X-z:X-te:0;return{[h]:f[h]+Y,data:{[h]:ne,centerOffset:X-ne-Y,...F&&{alignmentOffset:Y}},reset:F}}}),nM=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:i,middlewareData:a,rects:s,initialPlacement:o,platform:u,elements:l}=t,{mainAxis:c=!0,crossAxis:d=!0,fallbackPlacements:f,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:b=!0,...T}=vi(e,t);if((n=a.arrow)!=null&&n.alignmentOffset)return{};const m=xi(i),y=ga(o),x=xi(o)===o,w=await(u.isRTL==null?void 0:u.isRTL(l.floating)),_=f||(x||!b?[Tf(o)]:K5(o)),A=g!=="none";!f&&A&&_.push(...Z5(o,b,g,w));const D=[o,..._],L=await Dl(t,T),U=[];let R=((r=a.flip)==null?void 0:r.overflows)||[];if(c&&U.push(L[m]),d){const X=X5(i,s,w);U.push(L[X[0]],L[X[1]])}if(R=[...R,{placement:i,overflows:U}],!U.every(X=>X<=0)){var H,z;const X=(((H=a.flip)==null?void 0:H.index)||0)+1,ne=D[X];if(ne)return{data:{index:X,overflows:R},reset:{placement:ne}};let F=(z=R.filter(Y=>Y.overflows[0]<=0).sort((Y,V)=>Y.overflows[1]-V.overflows[1])[0])==null?void 0:z.placement;if(!F)switch(h){case"bestFit":{var te;const Y=(te=R.filter(V=>{if(A){const ee=ga(V.placement);return ee===y||ee==="y"}return!0}).map(V=>[V.placement,V.overflows.filter(ee=>ee>0).reduce((ee,O)=>ee+O,0)]).sort((V,ee)=>V[1]-ee[1])[0])==null?void 0:te[0];Y&&(F=Y);break}case"initialPlacement":F=o;break}if(i!==F)return{reset:{placement:F}}}return{}}}};function I2(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function P2(e){return G5.some(t=>e[t]>=0)}const rM=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...i}=vi(e,t);switch(r){case"referenceHidden":{const a=await Dl(t,{...i,elementContext:"reference"}),s=I2(a,n.reference);return{data:{referenceHiddenOffsets:s,referenceHidden:P2(s)}}}case"escaped":{const a=await Dl(t,{...i,altBoundary:!0}),s=I2(a,n.floating);return{data:{escapedOffsets:s,escaped:P2(s)}}}default:return{}}}}};async function iM(e,t){const{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),s=xi(n),o=Lo(n),u=ga(n)==="y",l=["left","top"].includes(s)?-1:1,c=a&&u?-1:1,d=vi(t,e);let{mainAxis:f,crossAxis:h,alignmentAxis:g}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return o&&typeof g=="number"&&(h=o==="end"?g*-1:g),u?{x:h*c,y:f*l}:{x:f*l,y:h*c}}const aM=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:i,y:a,placement:s,middlewareData:o}=t,u=await iM(t,e);return s===((n=o.offset)==null?void 0:n.placement)&&(r=o.arrow)!=null&&r.alignmentOffset?{}:{x:i+u.x,y:a+u.y,data:{...u,placement:s}}}}},sM=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:i}=t,{mainAxis:a=!0,crossAxis:s=!1,limiter:o={fn:T=>{let{x:m,y}=T;return{x:m,y}}},...u}=vi(e,t),l={x:n,y:r},c=await Dl(t,u),d=ga(xi(i)),f=rg(d);let h=l[f],g=l[d];if(a){const T=f==="y"?"top":"left",m=f==="y"?"bottom":"right",y=h+c[T],x=h-c[m];h=ng(y,h,x)}if(s){const T=d==="y"?"top":"left",m=d==="y"?"bottom":"right",y=g+c[T],x=g-c[m];g=ng(y,g,x)}const b=o.fn({...t,[f]:h,[d]:g});return{...b,data:{x:b.x-n,y:b.y-r,enabled:{[f]:a,[d]:s}}}}}},oM=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:i,rects:a,middlewareData:s}=t,{offset:o=0,mainAxis:u=!0,crossAxis:l=!0}=vi(e,t),c={x:n,y:r},d=ga(i),f=rg(d);let h=c[f],g=c[d];const b=vi(o,t),T=typeof b=="number"?{mainAxis:b,crossAxis:0}:{mainAxis:0,crossAxis:0,...b};if(u){const x=f==="y"?"height":"width",w=a.reference[f]-a.floating[x]+T.mainAxis,_=a.reference[f]+a.reference[x]-T.mainAxis;h<w?h=w:h>_&&(h=_)}if(l){var m,y;const x=f==="y"?"width":"height",w=["top","left"].includes(xi(i)),_=a.reference[d]-a.floating[x]+(w&&((m=s.offset)==null?void 0:m[d])||0)+(w?0:T.crossAxis),A=a.reference[d]+a.reference[x]+(w?0:((y=s.offset)==null?void 0:y[d])||0)-(w?T.crossAxis:0);g<_?g=_:g>A&&(g=A)}return{[f]:h,[d]:g}}}},uM=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:i,rects:a,platform:s,elements:o}=t,{apply:u=()=>{},...l}=vi(e,t),c=await Dl(t,l),d=xi(i),f=Lo(i),h=ga(i)==="y",{width:g,height:b}=a.floating;let T,m;d==="top"||d==="bottom"?(T=d,m=f===(await(s.isRTL==null?void 0:s.isRTL(o.floating))?"start":"end")?"left":"right"):(m=d,T=f==="end"?"top":"bottom");const y=b-c.top-c.bottom,x=g-c.left-c.right,w=pa(b-c[T],y),_=pa(g-c[m],x),A=!t.middlewareData.shift;let D=w,L=_;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(L=x),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(D=y),A&&!f){const R=zn(c.left,0),H=zn(c.right,0),z=zn(c.top,0),te=zn(c.bottom,0);h?L=g-2*(R!==0||H!==0?R+H:zn(c.left,c.right)):D=b-2*(z!==0||te!==0?z+te:zn(c.top,c.bottom))}await u({...t,availableWidth:L,availableHeight:D});const U=await s.getDimensions(o.floating);return g!==U.width||b!==U.height?{reset:{rects:!0}}:{}}}};function _f(){return typeof window<"u"}function Io(e){return B2(e)?(e.nodeName||"").toLowerCase():"#document"}function Hn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function zr(e){var t;return(t=(B2(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function B2(e){return _f()?e instanceof Node||e instanceof Hn(e).Node:!1}function Er(e){return _f()?e instanceof Element||e instanceof Hn(e).Element:!1}function Hr(e){return _f()?e instanceof HTMLElement||e instanceof Hn(e).HTMLElement:!1}function U2(e){return!_f()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Hn(e).ShadowRoot}function Ml(e){const{overflow:t,overflowX:n,overflowY:r,display:i}=Tr(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(i)}function lM(e){return["table","td","th"].includes(Io(e))}function Sf(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function og(e){const t=ug(),n=Er(e)?Tr(e):e;return n.transform!=="none"||n.perspective!=="none"||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function cM(e){let t=ba(e);for(;Hr(t)&&!Po(t);){if(og(t))return t;if(Sf(t))return null;t=ba(t)}return null}function ug(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Po(e){return["html","body","#document"].includes(Io(e))}function Tr(e){return Hn(e).getComputedStyle(e)}function Af(e){return Er(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function ba(e){if(Io(e)==="html")return e;const t=e.assignedSlot||e.parentNode||U2(e)&&e.host||zr(e);return U2(t)?t.host:t}function j2(e){const t=ba(e);return Po(t)?e.ownerDocument?e.ownerDocument.body:e.body:Hr(t)&&Ml(t)?t:j2(t)}function Ll(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=j2(e),a=i===((r=e.ownerDocument)==null?void 0:r.body),s=Hn(i);if(a){const o=lg(s);return t.concat(s,s.visualViewport||[],Ml(i)?i:[],o&&n?Ll(o):[])}return t.concat(i,Ll(i,[],n))}function lg(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function F2(e){const t=Tr(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const i=Hr(e),a=i?e.offsetWidth:n,s=i?e.offsetHeight:r,o=xf(n)!==a||xf(r)!==s;return o&&(n=a,r=s),{width:n,height:r,$:o}}function cg(e){return Er(e)?e:e.contextElement}function Bo(e){const t=cg(e);if(!Hr(t))return ma(1);const n=t.getBoundingClientRect(),{width:r,height:i,$:a}=F2(t);let s=(a?xf(n.width):n.width)/r,o=(a?xf(n.height):n.height)/i;return(!s||!Number.isFinite(s))&&(s=1),(!o||!Number.isFinite(o))&&(o=1),{x:s,y:o}}const dM=ma(0);function z2(e){const t=Hn(e);return!ug()||!t.visualViewport?dM:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function fM(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Hn(e)?!1:t}function Es(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),a=cg(e);let s=ma(1);t&&(r?Er(r)&&(s=Bo(r)):s=Bo(e));const o=fM(a,n,r)?z2(a):ma(0);let u=(i.left+o.x)/s.x,l=(i.top+o.y)/s.y,c=i.width/s.x,d=i.height/s.y;if(a){const f=Hn(a),h=r&&Er(r)?Hn(r):r;let g=f,b=lg(g);for(;b&&r&&h!==g;){const T=Bo(b),m=b.getBoundingClientRect(),y=Tr(b),x=m.left+(b.clientLeft+parseFloat(y.paddingLeft))*T.x,w=m.top+(b.clientTop+parseFloat(y.paddingTop))*T.y;u*=T.x,l*=T.y,c*=T.x,d*=T.y,u+=x,l+=w,g=Hn(b),b=lg(g)}}return wf({width:c,height:d,x:u,y:l})}function hM(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e;const a=i==="fixed",s=zr(r),o=t?Sf(t.floating):!1;if(r===s||o&&a)return n;let u={scrollLeft:0,scrollTop:0},l=ma(1);const c=ma(0),d=Hr(r);if((d||!d&&!a)&&((Io(r)!=="body"||Ml(s))&&(u=Af(r)),Hr(r))){const f=Es(r);l=Bo(r),c.x=f.x+r.clientLeft,c.y=f.y+r.clientTop}return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-u.scrollLeft*l.x+c.x,y:n.y*l.y-u.scrollTop*l.y+c.y}}function pM(e){return Array.from(e.getClientRects())}function dg(e,t){const n=Af(e).scrollLeft;return t?t.left+n:Es(zr(e)).left+n}function mM(e){const t=zr(e),n=Af(e),r=e.ownerDocument.body,i=zn(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=zn(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let s=-n.scrollLeft+dg(e);const o=-n.scrollTop;return Tr(r).direction==="rtl"&&(s+=zn(t.clientWidth,r.clientWidth)-i),{width:i,height:a,x:s,y:o}}function gM(e,t){const n=Hn(e),r=zr(e),i=n.visualViewport;let a=r.clientWidth,s=r.clientHeight,o=0,u=0;if(i){a=i.width,s=i.height;const l=ug();(!l||l&&t==="fixed")&&(o=i.offsetLeft,u=i.offsetTop)}return{width:a,height:s,x:o,y:u}}function bM(e,t){const n=Es(e,!0,t==="fixed"),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=Hr(e)?Bo(e):ma(1),s=e.clientWidth*a.x,o=e.clientHeight*a.y,u=i*a.x,l=r*a.y;return{width:s,height:o,x:u,y:l}}function H2(e,t,n){let r;if(t==="viewport")r=gM(e,n);else if(t==="document")r=mM(zr(e));else if(Er(t))r=bM(t,n);else{const i=z2(e);r={...t,x:t.x-i.x,y:t.y-i.y}}return wf(r)}function V2(e,t){const n=ba(e);return n===t||!Er(n)||Po(n)?!1:Tr(n).position==="fixed"||V2(n,t)}function yM(e,t){const n=t.get(e);if(n)return n;let r=Ll(e,[],!1).filter(o=>Er(o)&&Io(o)!=="body"),i=null;const a=Tr(e).position==="fixed";let s=a?ba(e):e;for(;Er(s)&&!Po(s);){const o=Tr(s),u=og(s);!u&&o.position==="fixed"&&(i=null),(a?!u&&!i:!u&&o.position==="static"&&!!i&&["absolute","fixed"].includes(i.position)||Ml(s)&&!u&&V2(e,s))?r=r.filter(c=>c!==s):i=o,s=ba(s)}return t.set(e,r),r}function vM(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const s=[...n==="clippingAncestors"?Sf(t)?[]:yM(t,this._c):[].concat(n),r],o=s[0],u=s.reduce((l,c)=>{const d=H2(t,c,i);return l.top=zn(d.top,l.top),l.right=pa(d.right,l.right),l.bottom=pa(d.bottom,l.bottom),l.left=zn(d.left,l.left),l},H2(t,o,i));return{width:u.right-u.left,height:u.bottom-u.top,x:u.left,y:u.top}}function xM(e){const{width:t,height:n}=F2(e);return{width:t,height:n}}function EM(e,t,n){const r=Hr(t),i=zr(t),a=n==="fixed",s=Es(e,!0,a,t);let o={scrollLeft:0,scrollTop:0};const u=ma(0);if(r||!r&&!a)if((Io(t)!=="body"||Ml(i))&&(o=Af(t)),r){const h=Es(t,!0,a,t);u.x=h.x+t.clientLeft,u.y=h.y+t.clientTop}else i&&(u.x=dg(i));let l=0,c=0;if(i&&!r&&!a){const h=i.getBoundingClientRect();c=h.top+o.scrollTop,l=h.left+o.scrollLeft-dg(i,h)}const d=s.left+o.scrollLeft-u.x-l,f=s.top+o.scrollTop-u.y-c;return{x:d,y:f,width:s.width,height:s.height}}function fg(e){return Tr(e).position==="static"}function Y2(e,t){if(!Hr(e)||Tr(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return zr(e)===n&&(n=n.ownerDocument.body),n}function q2(e,t){const n=Hn(e);if(Sf(e))return n;if(!Hr(e)){let i=ba(e);for(;i&&!Po(i);){if(Er(i)&&!fg(i))return i;i=ba(i)}return n}let r=Y2(e,t);for(;r&&lM(r)&&fg(r);)r=Y2(r,t);return r&&Po(r)&&fg(r)&&!og(r)?n:r||cM(e)||n}const TM=async function(e){const t=this.getOffsetParent||q2,n=this.getDimensions,r=await n(e.floating);return{reference:EM(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function wM(e){return Tr(e).direction==="rtl"}const _M={convertOffsetParentRelativeRectToViewportRelativeRect:hM,getDocumentElement:zr,getClippingRect:vM,getOffsetParent:q2,getElementRects:TM,getClientRects:pM,getDimensions:xM,getScale:Bo,isElement:Er,isRTL:wM};function SM(e,t){let n=null,r;const i=zr(e);function a(){var o;clearTimeout(r),(o=n)==null||o.disconnect(),n=null}function s(o,u){o===void 0&&(o=!1),u===void 0&&(u=1),a();const{left:l,top:c,width:d,height:f}=e.getBoundingClientRect();if(o||t(),!d||!f)return;const h=Ef(c),g=Ef(i.clientWidth-(l+d)),b=Ef(i.clientHeight-(c+f)),T=Ef(l),y={rootMargin:-h+"px "+-g+"px "+-b+"px "+-T+"px",threshold:zn(0,pa(1,u))||1};let x=!0;function w(_){const A=_[0].intersectionRatio;if(A!==u){if(!x)return s();A?s(!1,A):r=setTimeout(()=>{s(!1,1e-7)},1e3)}x=!1}try{n=new IntersectionObserver(w,{...y,root:i.ownerDocument})}catch{n=new IntersectionObserver(w,y)}n.observe(e)}return s(!0),a}function AM(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:o=typeof IntersectionObserver=="function",animationFrame:u=!1}=r,l=cg(e),c=i||a?[...l?Ll(l):[],...Ll(t)]:[];c.forEach(m=>{i&&m.addEventListener("scroll",n,{passive:!0}),a&&m.addEventListener("resize",n)});const d=l&&o?SM(l,n):null;let f=-1,h=null;s&&(h=new ResizeObserver(m=>{let[y]=m;y&&y.target===l&&h&&(h.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var x;(x=h)==null||x.observe(t)})),n()}),l&&!u&&h.observe(l),h.observe(t));let g,b=u?Es(e):null;u&&T();function T(){const m=Es(e);b&&(m.x!==b.x||m.y!==b.y||m.width!==b.width||m.height!==b.height)&&n(),b=m,g=requestAnimationFrame(T)}return n(),()=>{var m;c.forEach(y=>{i&&y.removeEventListener("scroll",n),a&&y.removeEventListener("resize",n)}),d==null||d(),(m=h)==null||m.disconnect(),h=null,u&&cancelAnimationFrame(g)}}const CM=aM,kM=sM,OM=nM,RM=uM,NM=rM,G2=tM,DM=oM,MM=(e,t,n)=>{const r=new Map,i={platform:_M,...n},a={...i.platform,_c:r};return eM(e,t,{...i,platform:a})};var Cf=typeof document<"u"?v.useLayoutEffect:v.useEffect;function kf(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!kf(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){const a=i[r];if(!(a==="_owner"&&e.$$typeof)&&!kf(e[a],t[a]))return!1}return!0}return e!==e&&t!==t}function $2(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function W2(e,t){const n=$2(e);return Math.round(t*n)/n}function hg(e){const t=v.useRef(e);return Cf(()=>{t.current=e}),t}function LM(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:i,elements:{reference:a,floating:s}={},transform:o=!0,whileElementsMounted:u,open:l}=e,[c,d]=v.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,h]=v.useState(r);kf(f,r)||h(r);const[g,b]=v.useState(null),[T,m]=v.useState(null),y=v.useCallback(V=>{V!==A.current&&(A.current=V,b(V))},[]),x=v.useCallback(V=>{V!==D.current&&(D.current=V,m(V))},[]),w=a||g,_=s||T,A=v.useRef(null),D=v.useRef(null),L=v.useRef(c),U=u!=null,R=hg(u),H=hg(i),z=hg(l),te=v.useCallback(()=>{if(!A.current||!D.current)return;const V={placement:t,strategy:n,middleware:f};H.current&&(V.platform=H.current),MM(A.current,D.current,V).then(ee=>{const O={...ee,isPositioned:z.current!==!1};X.current&&!kf(L.current,O)&&(L.current=O,Qa.flushSync(()=>{d(O)}))})},[f,t,n,H,z]);Cf(()=>{l===!1&&L.current.isPositioned&&(L.current.isPositioned=!1,d(V=>({...V,isPositioned:!1})))},[l]);const X=v.useRef(!1);Cf(()=>(X.current=!0,()=>{X.current=!1}),[]),Cf(()=>{if(w&&(A.current=w),_&&(D.current=_),w&&_){if(R.current)return R.current(w,_,te);te()}},[w,_,te,R,U]);const ne=v.useMemo(()=>({reference:A,floating:D,setReference:y,setFloating:x}),[y,x]),F=v.useMemo(()=>({reference:w,floating:_}),[w,_]),Y=v.useMemo(()=>{const V={position:n,left:0,top:0};if(!F.floating)return V;const ee=W2(F.floating,c.x),O=W2(F.floating,c.y);return o?{...V,transform:"translate("+ee+"px, "+O+"px)",...$2(F.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:ee,top:O}},[n,o,F.floating,c.x,c.y]);return v.useMemo(()=>({...c,update:te,refs:ne,elements:F,floatingStyles:Y}),[c,te,ne,F,Y])}const IM=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:i}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?G2({element:r.current,padding:i}).fn(n):{}:r?G2({element:r,padding:i}).fn(n):{}}}},PM=(e,t)=>({...CM(e),options:[e,t]}),BM=(e,t)=>({...kM(e),options:[e,t]}),UM=(e,t)=>({...DM(e),options:[e,t]}),jM=(e,t)=>({...OM(e),options:[e,t]}),FM=(e,t)=>({...RM(e),options:[e,t]}),zM=(e,t)=>({...NM(e),options:[e,t]}),HM=(e,t)=>({...IM(e),options:[e,t]});var VM="Arrow",X2=v.forwardRef((e,t)=>{const{children:n,width:r=10,height:i=5,...a}=e;return E.jsx(jn.svg,{...a,ref:t,width:r,height:i,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:E.jsx("polygon",{points:"0,0 30,0 15,10"})})});X2.displayName=VM;var YM=X2;function qM(e,t=[]){let n=[];function r(a,s){const o=v.createContext(s),u=n.length;n=[...n,s];function l(d){const{scope:f,children:h,...g}=d,b=(f==null?void 0:f[e][u])||o,T=v.useMemo(()=>g,Object.values(g));return E.jsx(b.Provider,{value:T,children:h})}function c(d,f){const h=(f==null?void 0:f[e][u])||o,g=v.useContext(h);if(g)return g;if(s!==void 0)return s;throw new Error(`\`${d}\` must be used within \`${a}\``)}return l.displayName=a+"Provider",[l,c]}const i=()=>{const a=n.map(s=>v.createContext(s));return function(o){const u=(o==null?void 0:o[e])||a;return v.useMemo(()=>({[`__scope${e}`]:{...o,[e]:u}}),[o,u])}};return i.scopeName=e,[r,GM(i,...t)]}function GM(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(a){const s=r.reduce((o,{useScope:u,scopeName:l})=>{const d=u(a)[`__scope${l}`];return{...o,...d}},{});return v.useMemo(()=>({[`__scope${t.scopeName}`]:s}),[s])}};return n.scopeName=t.scopeName,n}function $M(e){const[t,n]=v.useState(void 0);return Fr(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const a=i[0];let s,o;if("borderBoxSize"in a){const u=a.borderBoxSize,l=Array.isArray(u)?u[0]:u;s=l.inlineSize,o=l.blockSize}else s=e.offsetWidth,o=e.offsetHeight;n({width:s,height:o})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var pg="Popper",[K2,Of]=qM(pg),[WM,Q2]=K2(pg),Z2=e=>{const{__scopePopper:t,children:n}=e,[r,i]=v.useState(null);return E.jsx(WM,{scope:t,anchor:r,onAnchorChange:i,children:n})};Z2.displayName=pg;var J2="PopperAnchor",ew=v.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...i}=e,a=Q2(J2,n),s=v.useRef(null),o=jr(t,s);return v.useEffect(()=>{a.onAnchorChange((r==null?void 0:r.current)||s.current)}),r?null:E.jsx(jn.div,{...i,ref:o})});ew.displayName=J2;var mg="PopperContent",[XM,KM]=K2(mg),tw=v.forwardRef((e,t)=>{var Ut,Ge,Nt,it,At,ye;const{__scopePopper:n,side:r="bottom",sideOffset:i=0,align:a="center",alignOffset:s=0,arrowPadding:o=0,avoidCollisions:u=!0,collisionBoundary:l=[],collisionPadding:c=0,sticky:d="partial",hideWhenDetached:f=!1,updatePositionStrategy:h="optimized",onPlaced:g,...b}=e,T=Q2(mg,n),[m,y]=v.useState(null),x=jr(t,we=>y(we)),[w,_]=v.useState(null),A=$M(w),D=(A==null?void 0:A.width)??0,L=(A==null?void 0:A.height)??0,U=r+(a!=="center"?"-"+a:""),R=typeof c=="number"?c:{top:0,right:0,bottom:0,left:0,...c},H=Array.isArray(l)?l:[l],z=H.length>0,te={padding:R,boundary:H.filter(ZM),altBoundary:z},{refs:X,floatingStyles:ne,placement:F,isPositioned:Y,middlewareData:V}=LM({strategy:"fixed",placement:U,whileElementsMounted:(...we)=>AM(...we,{animationFrame:h==="always"}),elements:{reference:T.anchor},middleware:[PM({mainAxis:i+L,alignmentAxis:s}),u&&BM({mainAxis:!0,crossAxis:!1,limiter:d==="partial"?UM():void 0,...te}),u&&jM({...te}),FM({...te,apply:({elements:we,rects:Ye,availableWidth:je,availableHeight:Et})=>{const{width:Dt,height:et}=Ye.reference,qe=we.floating.style;qe.setProperty("--radix-popper-available-width",`${je}px`),qe.setProperty("--radix-popper-available-height",`${Et}px`),qe.setProperty("--radix-popper-anchor-width",`${Dt}px`),qe.setProperty("--radix-popper-anchor-height",`${et}px`)}}),w&&HM({element:w,padding:o}),JM({arrowWidth:D,arrowHeight:L}),f&&zM({strategy:"referenceHidden",...te})]}),[ee,O]=iw(F),ge=Fn(g);Fr(()=>{Y&&(ge==null||ge())},[Y,ge]);const Ue=(Ut=V.arrow)==null?void 0:Ut.x,M=(Ge=V.arrow)==null?void 0:Ge.y,De=((Nt=V.arrow)==null?void 0:Nt.centerOffset)!==0,[fe,Me]=v.useState();return Fr(()=>{m&&Me(window.getComputedStyle(m).zIndex)},[m]),E.jsx("div",{ref:X.setFloating,"data-radix-popper-content-wrapper":"",style:{...ne,transform:Y?ne.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:fe,"--radix-popper-transform-origin":[(it=V.transformOrigin)==null?void 0:it.x,(At=V.transformOrigin)==null?void 0:At.y].join(" "),...((ye=V.hide)==null?void 0:ye.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:E.jsx(XM,{scope:n,placedSide:ee,onArrowChange:_,arrowX:Ue,arrowY:M,shouldHideArrow:De,children:E.jsx(jn.div,{"data-side":ee,"data-align":O,...b,ref:x,style:{...b.style,animation:Y?void 0:"none"}})})})});tw.displayName=mg;var nw="PopperArrow",QM={top:"bottom",right:"left",bottom:"top",left:"right"},rw=v.forwardRef(function(t,n){const{__scopePopper:r,...i}=t,a=KM(nw,r),s=QM[a.placedSide];return E.jsx("span",{ref:a.onArrowChange,style:{position:"absolute",left:a.arrowX,top:a.arrowY,[s]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[a.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[a.placedSide],visibility:a.shouldHideArrow?"hidden":void 0},children:E.jsx(YM,{...i,ref:n,style:{...i.style,display:"block"}})})});rw.displayName=nw;function ZM(e){return e!==null}var JM=e=>({name:"transformOrigin",options:e,fn(t){var T,m,y;const{placement:n,rects:r,middlewareData:i}=t,s=((T=i.arrow)==null?void 0:T.centerOffset)!==0,o=s?0:e.arrowWidth,u=s?0:e.arrowHeight,[l,c]=iw(n),d={start:"0%",center:"50%",end:"100%"}[c],f=(((m=i.arrow)==null?void 0:m.x)??0)+o/2,h=(((y=i.arrow)==null?void 0:y.y)??0)+u/2;let g="",b="";return l==="bottom"?(g=s?d:`${f}px`,b=`${-u}px`):l==="top"?(g=s?d:`${f}px`,b=`${r.floating.height+u}px`):l==="right"?(g=`${-u}px`,b=s?d:`${h}px`):l==="left"&&(g=`${r.floating.width+u}px`,b=s?d:`${h}px`),{data:{x:g,y:b}}}});function iw(e){const[t,n="center"]=e.split("-");return[t,n]}var aw=Z2,gg=ew,sw=tw,ow=rw;function eL(e,t){return v.useReducer((n,r)=>t[n][r]??n,e)}var bg=e=>{const{present:t,children:n}=e,r=tL(t),i=typeof n=="function"?n({present:r.isPresent}):v.Children.only(n),a=jr(r.ref,nL(i));return typeof n=="function"||r.isPresent?v.cloneElement(i,{ref:a}):null};bg.displayName="Presence";function tL(e){const[t,n]=v.useState(),r=v.useRef({}),i=v.useRef(e),a=v.useRef("none"),s=e?"mounted":"unmounted",[o,u]=eL(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return v.useEffect(()=>{const l=Rf(r.current);a.current=o==="mounted"?l:"none"},[o]),Fr(()=>{const l=r.current,c=i.current;if(c!==e){const f=a.current,h=Rf(l);e?u("MOUNT"):h==="none"||(l==null?void 0:l.display)==="none"?u("UNMOUNT"):u(c&&f!==h?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,u]),Fr(()=>{if(t){let l;const c=t.ownerDocument.defaultView??window,d=h=>{const b=Rf(r.current).includes(h.animationName);if(h.target===t&&b&&(u("ANIMATION_END"),!i.current)){const T=t.style.animationFillMode;t.style.animationFillMode="forwards",l=c.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=T)})}},f=h=>{h.target===t&&(a.current=Rf(r.current))};return t.addEventListener("animationstart",f),t.addEventListener("animationcancel",d),t.addEventListener("animationend",d),()=>{c.clearTimeout(l),t.removeEventListener("animationstart",f),t.removeEventListener("animationcancel",d),t.removeEventListener("animationend",d)}}else u("ANIMATION_END")},[t,u]),{isPresent:["mounted","unmountSuspended"].includes(o),ref:v.useCallback(l=>{l&&(r.current=getComputedStyle(l)),n(l)},[])}}function Rf(e){return(e==null?void 0:e.animationName)||"none"}function nL(e){var r,i;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function yg({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,i]=rL({defaultProp:t,onChange:n}),a=e!==void 0,s=a?e:r,o=Fn(n),u=v.useCallback(l=>{if(a){const d=typeof l=="function"?l(e):l;d!==e&&o(d)}else i(l)},[a,e,i,o]);return[s,u]}function rL({defaultProp:e,onChange:t}){const n=v.useState(e),[r]=n,i=v.useRef(r),a=Fn(t);return v.useEffect(()=>{i.current!==r&&(a(r),i.current=r)},[r,i,a]),n}var iL=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Uo=new WeakMap,Nf=new WeakMap,Df={},vg=0,uw=function(e){return e&&(e.host||uw(e.parentNode))},aL=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=uw(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},sL=function(e,t,n,r){var i=aL(t,Array.isArray(e)?e:[e]);Df[n]||(Df[n]=new WeakMap);var a=Df[n],s=[],o=new Set,u=new Set(i),l=function(d){!d||o.has(d)||(o.add(d),l(d.parentNode))};i.forEach(l);var c=function(d){!d||u.has(d)||Array.prototype.forEach.call(d.children,function(f){if(o.has(f))c(f);else try{var h=f.getAttribute(r),g=h!==null&&h!=="false",b=(Uo.get(f)||0)+1,T=(a.get(f)||0)+1;Uo.set(f,b),a.set(f,T),s.push(f),b===1&&g&&Nf.set(f,!0),T===1&&f.setAttribute(n,"true"),g||f.setAttribute(r,"true")}catch(m){console.error("aria-hidden: cannot operate on ",f,m)}})};return c(t),o.clear(),vg++,function(){s.forEach(function(d){var f=Uo.get(d)-1,h=a.get(d)-1;Uo.set(d,f),a.set(d,h),f||(Nf.has(d)||d.removeAttribute(r),Nf.delete(d)),h||d.removeAttribute(n)}),vg--,vg||(Uo=new WeakMap,Uo=new WeakMap,Nf=new WeakMap,Df={})}},lw=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),i=iL(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll("[aria-live]"))),sL(r,i,n,"aria-hidden")):function(){return null}},xg=function(e,t){return xg=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[i]=r[i])},xg(e,t)};function cw(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");xg(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var Yt=function(){return Yt=Object.assign||function(t){for(var n,r=1,i=arguments.length;r<i;r++){n=arguments[r];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(t[a]=n[a])}return t},Yt.apply(this,arguments)};function Il(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function dw(e,t,n,r){var i=arguments.length,a=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(s=e[o])&&(a=(i<3?s(a):i>3?s(t,n,a):s(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a}function fw(e,t){return function(n,r){t(n,r,e)}}function hw(e,t,n,r,i,a){function s(m){if(m!==void 0&&typeof m!="function")throw new TypeError("Function expected");return m}for(var o=r.kind,u=o==="getter"?"get":o==="setter"?"set":"value",l=!t&&e?r.static?e:e.prototype:null,c=t||(l?Object.getOwnPropertyDescriptor(l,r.name):{}),d,f=!1,h=n.length-1;h>=0;h--){var g={};for(var b in r)g[b]=b==="access"?{}:r[b];for(var b in r.access)g.access[b]=r.access[b];g.addInitializer=function(m){if(f)throw new TypeError("Cannot add initializers after decoration has completed");a.push(s(m||null))};var T=(0,n[h])(o==="accessor"?{get:c.get,set:c.set}:c[u],g);if(o==="accessor"){if(T===void 0)continue;if(T===null||typeof T!="object")throw new TypeError("Object expected");(d=s(T.get))&&(c.get=d),(d=s(T.set))&&(c.set=d),(d=s(T.init))&&i.unshift(d)}else(d=s(T))&&(o==="field"?i.unshift(d):c[u]=d)}l&&Object.defineProperty(l,r.name,c),f=!0}function pw(e,t,n){for(var r=arguments.length>2,i=0;i<t.length;i++)n=r?t[i].call(e,n):t[i].call(e);return r?n:void 0}function mw(e){return typeof e=="symbol"?e:"".concat(e)}function gw(e,t,n){return typeof t=="symbol"&&(t=t.description?"[".concat(t.description,"]"):""),Object.defineProperty(e,"name",{configurable:!0,value:n?"".concat(n," ",t):t})}function bw(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}function Ei(e,t,n,r){function i(a){return a instanceof n?a:new n(function(s){s(a)})}return new(n||(n=Promise))(function(a,s){function o(c){try{l(r.next(c))}catch(d){s(d)}}function u(c){try{l(r.throw(c))}catch(d){s(d)}}function l(c){c.done?a(c.value):i(c.value).then(o,u)}l((r=r.apply(e,t||[])).next())})}function yw(e,t){var n={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},r,i,a,s=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return s.next=o(0),s.throw=o(1),s.return=o(2),typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function o(l){return function(c){return u([l,c])}}function u(l){if(r)throw new TypeError("Generator is already executing.");for(;s&&(s=0,l[0]&&(n=0)),n;)try{if(r=1,i&&(a=l[0]&2?i.return:l[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,l[1])).done)return a;switch(i=0,a&&(l=[l[0]&2,a.value]),l[0]){case 0:case 1:a=l;break;case 4:return n.label++,{value:l[1],done:!1};case 5:n.label++,i=l[1],l=[0];continue;case 7:l=n.ops.pop(),n.trys.pop();continue;default:if(a=n.trys,!(a=a.length>0&&a[a.length-1])&&(l[0]===6||l[0]===2)){n=0;continue}if(l[0]===3&&(!a||l[1]>a[0]&&l[1]<a[3])){n.label=l[1];break}if(l[0]===6&&n.label<a[1]){n.label=a[1],a=l;break}if(a&&n.label<a[2]){n.label=a[2],n.ops.push(l);break}a[2]&&n.ops.pop(),n.trys.pop();continue}l=t.call(e,n)}catch(c){l=[6,c],i=0}finally{r=a=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}}var Mf=Object.create?function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]};function vw(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&Mf(t,e,n)}function Lf(e){var t=typeof Symbol=="function"&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function Eg(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,a=[],s;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)a.push(i.value)}catch(o){s={error:o}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return a}function xw(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(Eg(arguments[t]));return e}function Ew(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;for(var r=Array(e),i=0,t=0;t<n;t++)for(var a=arguments[t],s=0,o=a.length;s<o;s++,i++)r[i]=a[s];return r}function If(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||(a=Array.prototype.slice.call(t,0,r)),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}function jo(e){return this instanceof jo?(this.v=e,this):new jo(e)}function Tw(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r=n.apply(e,t||[]),i,a=[];return i=Object.create((typeof AsyncIterator=="function"?AsyncIterator:Object).prototype),o("next"),o("throw"),o("return",s),i[Symbol.asyncIterator]=function(){return this},i;function s(h){return function(g){return Promise.resolve(g).then(h,d)}}function o(h,g){r[h]&&(i[h]=function(b){return new Promise(function(T,m){a.push([h,b,T,m])>1||u(h,b)})},g&&(i[h]=g(i[h])))}function u(h,g){try{l(r[h](g))}catch(b){f(a[0][3],b)}}function l(h){h.value instanceof jo?Promise.resolve(h.value.v).then(c,d):f(a[0][2],h)}function c(h){u("next",h)}function d(h){u("throw",h)}function f(h,g){h(g),a.shift(),a.length&&u(a[0][0],a[0][1])}}function ww(e){var t,n;return t={},r("next"),r("throw",function(i){throw i}),r("return"),t[Symbol.iterator]=function(){return this},t;function r(i,a){t[i]=e[i]?function(s){return(n=!n)?{value:jo(e[i](s)),done:!1}:a?a(s):s}:a}}function _w(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t=e[Symbol.asyncIterator],n;return t?t.call(e):(e=typeof Lf=="function"?Lf(e):e[Symbol.iterator](),n={},r("next"),r("throw"),r("return"),n[Symbol.asyncIterator]=function(){return this},n);function r(a){n[a]=e[a]&&function(s){return new Promise(function(o,u){s=e[a](s),i(o,u,s.done,s.value)})}}function i(a,s,o,u){Promise.resolve(u).then(function(l){a({value:l,done:o})},s)}}function Sw(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}var oL=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t};function Aw(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)&&Mf(t,e,n);return oL(t,e),t}function Cw(e){return e&&e.__esModule?e:{default:e}}function kw(e,t,n,r){if(n==="a"&&!r)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return n==="m"?r:n==="a"?r.call(e):r?r.value:t.get(e)}function Ow(e,t,n,r,i){if(r==="m")throw new TypeError("Private method is not writable");if(r==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return r==="a"?i.call(e,n):i?i.value=n:t.set(e,n),n}function Rw(e,t){if(t===null||typeof t!="object"&&typeof t!="function")throw new TypeError("Cannot use 'in' operator on non-object");return typeof e=="function"?t===e:e.has(t)}function Nw(e,t,n){if(t!=null){if(typeof t!="object"&&typeof t!="function")throw new TypeError("Object expected.");var r,i;if(n){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");r=t[Symbol.asyncDispose]}if(r===void 0){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");r=t[Symbol.dispose],n&&(i=r)}if(typeof r!="function")throw new TypeError("Object not disposable.");i&&(r=function(){try{i.call(this)}catch(a){return Promise.reject(a)}}),e.stack.push({value:t,dispose:r,async:n})}else n&&e.stack.push({async:!0});return t}var uL=typeof SuppressedError=="function"?SuppressedError:function(e,t,n){var r=new Error(n);return r.name="SuppressedError",r.error=e,r.suppressed=t,r};function Dw(e){function t(a){e.error=e.hasError?new uL(a,e.error,"An error was suppressed during disposal."):a,e.hasError=!0}var n,r=0;function i(){for(;n=e.stack.pop();)try{if(!n.async&&r===1)return r=0,e.stack.push(n),Promise.resolve().then(i);if(n.dispose){var a=n.dispose.call(n.value);if(n.async)return r|=2,Promise.resolve(a).then(i,function(s){return t(s),i()})}else r|=1}catch(s){t(s)}if(r===1)return e.hasError?Promise.reject(e.error):Promise.resolve();if(e.hasError)throw e.error}return i()}function Mw(e,t){return typeof e=="string"&&/^\.\.?\//.test(e)?e.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i,function(n,r,i,a,s){return r?t?".jsx":".js":i&&(!a||!s)?n:i+a+"."+s.toLowerCase()+"js"}):e}const lL=Object.freeze(Object.defineProperty({__proto__:null,__addDisposableResource:Nw,get __assign(){return Yt},__asyncDelegator:ww,__asyncGenerator:Tw,__asyncValues:_w,__await:jo,__awaiter:Ei,__classPrivateFieldGet:kw,__classPrivateFieldIn:Rw,__classPrivateFieldSet:Ow,__createBinding:Mf,__decorate:dw,__disposeResources:Dw,__esDecorate:hw,__exportStar:vw,__extends:cw,__generator:yw,__importDefault:Cw,__importStar:Aw,__makeTemplateObject:Sw,__metadata:bw,__param:fw,__propKey:mw,__read:Eg,__rest:Il,__rewriteRelativeImportExtension:Mw,__runInitializers:pw,__setFunctionName:gw,__spread:xw,__spreadArray:If,__spreadArrays:Ew,__values:Lf,default:{__extends:cw,__assign:Yt,__rest:Il,__decorate:dw,__param:fw,__esDecorate:hw,__runInitializers:pw,__propKey:mw,__setFunctionName:gw,__metadata:bw,__awaiter:Ei,__generator:yw,__createBinding:Mf,__exportStar:vw,__values:Lf,__read:Eg,__spread:xw,__spreadArrays:Ew,__spreadArray:If,__await:jo,__asyncGenerator:Tw,__asyncDelegator:ww,__asyncValues:_w,__makeTemplateObject:Sw,__importStar:Aw,__importDefault:Cw,__classPrivateFieldGet:kw,__classPrivateFieldSet:Ow,__classPrivateFieldIn:Rw,__addDisposableResource:Nw,__disposeResources:Dw,__rewriteRelativeImportExtension:Mw}},Symbol.toStringTag,{value:"Module"}));var Pf="right-scroll-bar-position",Bf="width-before-scroll-bar",cL="with-scroll-bars-hidden",dL="--removed-body-scroll-bar-size";function Tg(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function fL(e,t){var n=v.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var i=n.value;i!==r&&(n.value=r,n.callback(r,i))}}}})[0];return n.callback=t,n.facade}var hL=typeof window<"u"?v.useLayoutEffect:v.useEffect,Lw=new WeakMap;function pL(e,t){var n=fL(null,function(r){return e.forEach(function(i){return Tg(i,r)})});return hL(function(){var r=Lw.get(n);if(r){var i=new Set(r),a=new Set(e),s=n.current;i.forEach(function(o){a.has(o)||Tg(o,null)}),a.forEach(function(o){i.has(o)||Tg(o,s)})}Lw.set(n,e)},[e]),n}function mL(e){return e}function gL(e,t){t===void 0&&(t=mL);var n=[],r=!1,i={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(a){var s=t(a,r);return n.push(s),function(){n=n.filter(function(o){return o!==s})}},assignSyncMedium:function(a){for(r=!0;n.length;){var s=n;n=[],s.forEach(a)}n={push:function(o){return a(o)},filter:function(){return n}}},assignMedium:function(a){r=!0;var s=[];if(n.length){var o=n;n=[],o.forEach(a),s=n}var u=function(){var c=s;s=[],c.forEach(a)},l=function(){return Promise.resolve().then(u)};l(),n={push:function(c){s.push(c),l()},filter:function(c){return s=s.filter(c),n}}}};return i}function Iw(e){e===void 0&&(e={});var t=gL(null);return t.options=Yt({async:!0,ssr:!1},e),t}var Pw=function(e){var t=e.sideCar,n=Il(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return v.createElement(r,Yt({},n))};Pw.isSideCarExport=!0;function Bw(e,t){return e.useMedium(t),Pw}var Uw=Iw(),wg=function(){},Uf=v.forwardRef(function(e,t){var n=v.useRef(null),r=v.useState({onScrollCapture:wg,onWheelCapture:wg,onTouchMoveCapture:wg}),i=r[0],a=r[1],s=e.forwardProps,o=e.children,u=e.className,l=e.removeScrollBar,c=e.enabled,d=e.shards,f=e.sideCar,h=e.noIsolation,g=e.inert,b=e.allowPinchZoom,T=e.as,m=T===void 0?"div":T,y=e.gapMode,x=Il(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),w=f,_=pL([n,t]),A=Yt(Yt({},x),i);return v.createElement(v.Fragment,null,c&&v.createElement(w,{sideCar:Uw,removeScrollBar:l,shards:d,noIsolation:h,inert:g,setCallbacks:a,allowPinchZoom:!!b,lockRef:n,gapMode:y}),s?v.cloneElement(v.Children.only(o),Yt(Yt({},A),{ref:_})):v.createElement(m,Yt({},A,{className:u,ref:_}),o))});Uf.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},Uf.classNames={fullWidth:Bf,zeroRight:Pf};var jw=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function bL(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=jw();return t&&e.setAttribute("nonce",t),e}function yL(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function vL(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var xL=function(){var e=0,t=null;return{add:function(n){e==0&&(t=bL())&&(yL(t,n),vL(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},EL=function(){var e=xL();return function(t,n){v.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},_g=function(){var e=EL(),t=function(n){var r=n.styles,i=n.dynamic;return e(r,i),null};return t},TL={left:0,top:0,right:0,gap:0},Sg=function(e){return parseInt(e||"",10)||0},wL=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],i=t[e==="padding"?"paddingRight":"marginRight"];return[Sg(n),Sg(r),Sg(i)]},_L=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return TL;var t=wL(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},SL=_g(),Fo="data-scroll-locked",AL=function(e,t,n,r){var i=e.left,a=e.top,s=e.right,o=e.gap;return n===void 0&&(n="margin"),`
50
50
  .`.concat(cL,` {
51
51
  overflow: hidden `).concat(r,`;
52
52
  padding-right: `).concat(o,"px ").concat(r,`;
@@ -86,10 +86,10 @@ Error generating stack: `+n.message+`
86
86
  `)},Fw=function(){var e=parseInt(document.body.getAttribute(Fo)||"0",10);return isFinite(e)?e:0},CL=function(){v.useEffect(function(){return document.body.setAttribute(Fo,(Fw()+1).toString()),function(){var e=Fw()-1;e<=0?document.body.removeAttribute(Fo):document.body.setAttribute(Fo,e.toString())}},[])},kL=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?"margin":r;CL();var a=v.useMemo(function(){return _L(i)},[i]);return v.createElement(SL,{styles:AL(a,!t,i,n?"":"!important")})},Ag=!1;if(typeof window<"u")try{var jf=Object.defineProperty({},"passive",{get:function(){return Ag=!0,!0}});window.addEventListener("test",jf,jf),window.removeEventListener("test",jf,jf)}catch{Ag=!1}var zo=Ag?{passive:!1}:!1,OL=function(e){return e.tagName==="TEXTAREA"},zw=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!OL(e)&&n[t]==="visible")},RL=function(e){return zw(e,"overflowY")},NL=function(e){return zw(e,"overflowX")},Hw=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var i=Vw(e,r);if(i){var a=Yw(e,r),s=a[1],o=a[2];if(s>o)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},DL=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},ML=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},Vw=function(e,t){return e==="v"?RL(t):NL(t)},Yw=function(e,t){return e==="v"?DL(t):ML(t)},LL=function(e,t){return e==="h"&&t==="rtl"?-1:1},IL=function(e,t,n,r,i){var a=LL(e,window.getComputedStyle(t).direction),s=a*r,o=n.target,u=t.contains(o),l=!1,c=s>0,d=0,f=0;do{var h=Yw(e,o),g=h[0],b=h[1],T=h[2],m=b-T-a*g;(g||m)&&Vw(e,o)&&(d+=m,f+=g),o instanceof ShadowRoot?o=o.host:o=o.parentNode}while(!u&&o!==document.body||u&&(t.contains(o)||t===o));return(c&&(Math.abs(d)<1||!i)||!c&&(Math.abs(f)<1||!i))&&(l=!0),l},Ff=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},qw=function(e){return[e.deltaX,e.deltaY]},Gw=function(e){return e&&"current"in e?e.current:e},PL=function(e,t){return e[0]===t[0]&&e[1]===t[1]},BL=function(e){return`
87
87
  .block-interactivity-`.concat(e,` {pointer-events: none;}
88
88
  .allow-interactivity-`).concat(e,` {pointer-events: all;}
89
- `)},UL=0,Ho=[];function jL(e){var t=v.useRef([]),n=v.useRef([0,0]),r=v.useRef(),i=v.useState(UL++)[0],a=v.useState(_g)[0],s=v.useRef(e);v.useEffect(function(){s.current=e},[e]),v.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var b=If([e.lockRef.current],(e.shards||[]).map(Gw),!0).filter(Boolean);return b.forEach(function(T){return T.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),b.forEach(function(T){return T.classList.remove("allow-interactivity-".concat(i))})}}},[e.inert,e.lockRef.current,e.shards]);var o=v.useCallback(function(b,T){if("touches"in b&&b.touches.length===2||b.type==="wheel"&&b.ctrlKey)return!s.current.allowPinchZoom;var m=Ff(b),y=n.current,x="deltaX"in b?b.deltaX:y[0]-m[0],w="deltaY"in b?b.deltaY:y[1]-m[1],_,A=b.target,D=Math.abs(x)>Math.abs(w)?"h":"v";if("touches"in b&&D==="h"&&A.type==="range")return!1;var L=Hw(D,A);if(!L)return!0;if(L?_=D:(_=D==="v"?"h":"v",L=Hw(D,A)),!L)return!1;if(!r.current&&"changedTouches"in b&&(x||w)&&(r.current=_),!_)return!0;var U=r.current||_;return IL(U,T,b,U==="h"?x:w,!0)},[]),u=v.useCallback(function(b){var T=b;if(!(!Ho.length||Ho[Ho.length-1]!==a)){var m="deltaY"in T?qw(T):Ff(T),y=t.current.filter(function(_){return _.name===T.type&&(_.target===T.target||T.target===_.shadowParent)&&PL(_.delta,m)})[0];if(y&&y.should){T.cancelable&&T.preventDefault();return}if(!y){var x=(s.current.shards||[]).map(Gw).filter(Boolean).filter(function(_){return _.contains(T.target)}),w=x.length>0?o(T,x[0]):!s.current.noIsolation;w&&T.cancelable&&T.preventDefault()}}},[]),l=v.useCallback(function(b,T,m,y){var x={name:b,delta:T,target:m,should:y,shadowParent:FL(m)};t.current.push(x),setTimeout(function(){t.current=t.current.filter(function(w){return w!==x})},1)},[]),c=v.useCallback(function(b){n.current=Ff(b),r.current=void 0},[]),d=v.useCallback(function(b){l(b.type,qw(b),b.target,o(b,e.lockRef.current))},[]),f=v.useCallback(function(b){l(b.type,Ff(b),b.target,o(b,e.lockRef.current))},[]);v.useEffect(function(){return Ho.push(a),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:f}),document.addEventListener("wheel",u,zo),document.addEventListener("touchmove",u,zo),document.addEventListener("touchstart",c,zo),function(){Ho=Ho.filter(function(b){return b!==a}),document.removeEventListener("wheel",u,zo),document.removeEventListener("touchmove",u,zo),document.removeEventListener("touchstart",c,zo)}},[]);var h=e.removeScrollBar,g=e.inert;return v.createElement(v.Fragment,null,g?v.createElement(a,{styles:BL(i)}):null,h?v.createElement(kL,{gapMode:e.gapMode}):null)}function FL(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const zL=Bw(Uw,jL);var $w=v.forwardRef(function(e,t){return v.createElement(Uf,Yt({},e,{ref:t,sideCar:zL}))});$w.classNames=Uf.classNames;var Cg="Popover",[Ww,See]=yf(Cg,[Of]),Pl=Of(),[HL,Ts]=Ww(Cg),Xw=e=>{const{__scopePopover:t,children:n,open:r,defaultOpen:i,onOpenChange:a,modal:s=!1}=e,o=Pl(t),u=v.useRef(null),[l,c]=v.useState(!1),[d=!1,f]=yg({prop:r,defaultProp:i,onChange:a});return E.jsx(aw,{...o,children:E.jsx(HL,{scope:t,contentId:Nl(),triggerRef:u,open:d,onOpenChange:f,onOpenToggle:v.useCallback(()=>f(h=>!h),[f]),hasCustomAnchor:l,onCustomAnchorAdd:v.useCallback(()=>c(!0),[]),onCustomAnchorRemove:v.useCallback(()=>c(!1),[]),modal:s,children:n})})};Xw.displayName=Cg;var Kw="PopoverAnchor",Qw=v.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,i=Ts(Kw,n),a=Pl(n),{onCustomAnchorAdd:s,onCustomAnchorRemove:o}=i;return v.useEffect(()=>(s(),()=>o()),[s,o]),E.jsx(gg,{...a,...r,ref:t})});Qw.displayName=Kw;var Zw="PopoverTrigger",Jw=v.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,i=Ts(Zw,n),a=Pl(n),s=jr(t,i.triggerRef),o=E.jsx(jn.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":r_(i.open),...r,ref:s,onClick:Sn(e.onClick,i.onOpenToggle)});return i.hasCustomAnchor?o:E.jsx(gg,{asChild:!0,...a,children:o})});Jw.displayName=Zw;var VL="PopoverPortal",[Aee,YL]=Ww(VL,{forceMount:void 0}),Vo="PopoverContent",e_=v.forwardRef((e,t)=>{const n=YL(Vo,e.__scopePopover),{forceMount:r=n.forceMount,...i}=e,a=Ts(Vo,e.__scopePopover);return E.jsx(bg,{present:r||a.open,children:a.modal?E.jsx(qL,{...i,ref:t}):E.jsx(GL,{...i,ref:t})})});e_.displayName=Vo;var qL=v.forwardRef((e,t)=>{const n=Ts(Vo,e.__scopePopover),r=v.useRef(null),i=jr(t,r),a=v.useRef(!1);return v.useEffect(()=>{const s=r.current;if(s)return lw(s)},[]),E.jsx($w,{as:vf,allowPinchZoom:!0,children:E.jsx(t_,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Sn(e.onCloseAutoFocus,s=>{var o;s.preventDefault(),a.current||(o=n.triggerRef.current)==null||o.focus()}),onPointerDownOutside:Sn(e.onPointerDownOutside,s=>{const o=s.detail.originalEvent,u=o.button===0&&o.ctrlKey===!0,l=o.button===2||u;a.current=l},{checkForDefaultPrevented:!1}),onFocusOutside:Sn(e.onFocusOutside,s=>s.preventDefault(),{checkForDefaultPrevented:!1})})})}),GL=v.forwardRef((e,t)=>{const n=Ts(Vo,e.__scopePopover),r=v.useRef(!1),i=v.useRef(!1);return E.jsx(t_,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{var s,o;(s=e.onCloseAutoFocus)==null||s.call(e,a),a.defaultPrevented||(r.current||(o=n.triggerRef.current)==null||o.focus(),a.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:a=>{var u,l;(u=e.onInteractOutside)==null||u.call(e,a),a.defaultPrevented||(r.current=!0,a.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const s=a.target;((l=n.triggerRef.current)==null?void 0:l.contains(s))&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&i.current&&a.preventDefault()}})}),t_=v.forwardRef((e,t)=>{const{__scopePopover:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:a,disableOutsidePointerEvents:s,onEscapeKeyDown:o,onPointerDownOutside:u,onFocusOutside:l,onInteractOutside:c,...d}=e,f=Ts(Vo,n),h=Pl(n);return S2(),E.jsx(k2,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:a,children:E.jsx(Z0,{asChild:!0,disableOutsidePointerEvents:s,onInteractOutside:c,onEscapeKeyDown:o,onPointerDownOutside:u,onFocusOutside:l,onDismiss:()=>f.onOpenChange(!1),children:E.jsx(sw,{"data-state":r_(f.open),role:"dialog",id:f.contentId,...h,...d,ref:t,style:{...d.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),n_="PopoverClose",$L=v.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,i=Ts(n_,n);return E.jsx(jn.button,{type:"button",...r,ref:t,onClick:Sn(e.onClick,()=>i.onOpenChange(!1))})});$L.displayName=n_;var WL="PopoverArrow",XL=v.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,i=Pl(n);return E.jsx(ow,{...i,...r,ref:t})});XL.displayName=WL;function r_(e){return e?"open":"closed"}var KL=Xw,QL=Qw,ZL=e_;const JL=/\{[^{}]+\}/g,e8=()=>{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 t8(){return Math.random().toString(36).slice(2,11)}function n8(e){let{baseUrl:t="",Request:n=globalThis.Request,fetch:r=globalThis.fetch,querySerializer:i,bodySerializer:a,headers:s,requestInitExt:o=void 0,...u}={...e};o=e8()?o:void 0,t=o_(t);const l=[];async function c(d,f){const{baseUrl:h,fetch:g=r,Request:b=n,headers:T,params:m={},parseAs:y="json",querySerializer:x,bodySerializer:w=a??i8,body:_,...A}=f||{};h&&(t=o_(h));let D=typeof i=="function"?i:s_(i);x&&(D=typeof x=="function"?x:s_({...typeof i=="object"?i:{},...x}));const L=_===void 0?void 0:w(_),U=L===void 0||L instanceof FormData?{}:{"Content-Type":"application/json"},R={redirect:"follow",...u,...A,body:L,headers:s8(U,s,T,m.header)};let H,z,te=new n(a8(d,{baseUrl:t,params:m,querySerializer:D}),R);for(const F in A)F in te||(te[F]=A[F]);if(l.length){H=t8(),z=Object.freeze({baseUrl:t,fetch:g,parseAs:y,querySerializer:D,bodySerializer:w});for(const F of l)if(F&&typeof F=="object"&&typeof F.onRequest=="function"){const Y=await F.onRequest({request:te,schemaPath:d,params:m,options:z,id:H});if(Y){if(!(Y instanceof n))throw new Error("onRequest: must return new Request() when modifying the request");te=Y}}}let X;try{X=await g(te,o)}catch(F){let Y=F;if(l.length)for(let V=l.length-1;V>=0;V--){const ee=l[V];if(ee&&typeof ee=="object"&&typeof ee.onError=="function"){const O=await ee.onError({request:te,error:Y,schemaPath:d,params:m,options:z,id:H});if(O){if(O instanceof Response){Y=void 0,X=O;break}if(O instanceof Error){Y=O;continue}throw new Error("onError: must return new Response() or instance of Error")}}}if(Y)throw Y}if(l.length)for(let F=l.length-1;F>=0;F--){const Y=l[F];if(Y&&typeof Y=="object"&&typeof Y.onResponse=="function"){const V=await Y.onResponse({request:te,response:X,schemaPath:d,params:m,options:z,id:H});if(V){if(!(V instanceof Response))throw new Error("onResponse: must return new Response() when modifying the response");X=V}}}if(X.status===204||X.headers.get("Content-Length")==="0")return X.ok?{data:void 0,response:X}:{error:void 0,response:X};if(X.ok)return y==="stream"?{data:X.body,response:X}:{data:await X[y](),response:X};let ne=await X.text();try{ne=JSON.parse(ne)}catch{}return{error:ne,response:X}}return{request(d,f,h){return c(f,{...h,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 h=l.indexOf(f);h!==-1&&l.splice(h,1)}}}}function zf(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 i_(e,t,n){if(!t||typeof t!="object")return"";const r=[],i={simple:",",label:".",matrix:";"}[n.style]||"&";if(n.style!=="deepObject"&&n.explode===!1){for(const 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(zf(o,t[s],n))}const a=r.join(i);return n.style==="label"||n.style==="matrix"?`${i}${a}`:a}function a_(e,t,n){if(!Array.isArray(t))return"";if(n.explode===!1){const a={form:",",spaceDelimited:"%20",pipeDelimited:"|"}[n.style]||",",s=(n.allowReserved===!0?t:t.map(o=>encodeURIComponent(o))).join(a);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]||"&",i=[];for(const a of t)n.style==="simple"||n.style==="label"?i.push(n.allowReserved===!0?a:encodeURIComponent(a)):i.push(zf(e,a,n));return n.style==="label"||n.style==="matrix"?`${r}${i.join(r)}`:i.join(r)}function s_(e){return function(n){const r=[];if(n&&typeof n=="object")for(const i in n){const a=n[i];if(a!=null){if(Array.isArray(a)){if(a.length===0)continue;r.push(a_(i,a,{style:"form",explode:!0,...e==null?void 0:e.array,allowReserved:(e==null?void 0:e.allowReserved)||!1}));continue}if(typeof a=="object"){r.push(i_(i,a,{style:"deepObject",explode:!0,...e==null?void 0:e.object,allowReserved:(e==null?void 0:e.allowReserved)||!1}));continue}r.push(zf(i,a,e))}}return r.join("&")}}function r8(e,t){let n=e;for(const r of e.match(JL)??[]){let i=r.substring(1,r.length-1),a=!1,s="simple";if(i.endsWith("*")&&(a=!0,i=i.substring(0,i.length-1)),i.startsWith(".")?(s="label",i=i.substring(1)):i.startsWith(";")&&(s="matrix",i=i.substring(1)),!t||t[i]===void 0||t[i]===null)continue;const o=t[i];if(Array.isArray(o)){n=n.replace(r,a_(i,o,{style:s,explode:a}));continue}if(typeof o=="object"){n=n.replace(r,i_(i,o,{style:s,explode:a}));continue}if(s==="matrix"){n=n.replace(r,`;${zf(i,o)}`);continue}n=n.replace(r,s==="label"?`.${encodeURIComponent(o)}`:encodeURIComponent(o))}return n}function i8(e){return e instanceof FormData?e:JSON.stringify(e)}function a8(e,t){var i;let n=`${t.baseUrl}${e}`;(i=t.params)!=null&&i.path&&(n=r8(n,t.params.path));let r=t.querySerializer(t.params.query??{});return r.startsWith("?")&&(r=r.substring(1)),r&&(n+=`?${r}`),n}function s8(...e){const t=new Headers;for(const n of e){if(!n||typeof n!="object")continue;const r=n instanceof Headers?n.entries():Object.entries(n);for(const[i,a]of r)if(a===null)t.delete(i);else if(Array.isArray(a))for(const s of a)t.append(i,s);else a!==void 0&&t.set(i,a)}return t}function o_(e){return e.endsWith("/")?e.substring(0,e.length-1):e}const o8=e=>{console.log(e.error)},u8=e=>{const t=n8({baseUrl:e.baseUrl}),n={onRequest:e.onRequest,onResponse:e.onResponse,onError:e.onError||o8};return t.use(n),t};class u_{constructor({config:t}){var i,a;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})=>u8({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:h}=this.constructClientOptions(this.userToken),b=`${h}/backend/widget/v2/upload`;f.open("POST",b),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.resolveSession=async(s,o)=>await this.client.POST("/backend/widget/v2/session/resolve",{body:s,signal:o}),this.createStateCheckpoint=async s=>await this.client.POST("/backend/widget/v2/checkpoint",{body:s}),this.config=t,this.userToken=((i=t.user)==null?void 0:i.token)||null;const{baseUrl:n,headers:r}=this.constructClientOptions((a=t.user)==null?void 0:a.token);this.client=this.createOpenAPIClient({baseUrl:n,headers:r})}}var Hf={exports:{}};Hf.exports,function(e,t){var n=200,r="__lodash_hash_undefined__",i=1,a=2,s=9007199254740991,o="[object Arguments]",u="[object Array]",l="[object AsyncFunction]",c="[object Boolean]",d="[object Date]",f="[object Error]",h="[object Function]",g="[object GeneratorFunction]",b="[object Map]",T="[object Number]",m="[object Null]",y="[object Object]",x="[object Promise]",w="[object Proxy]",_="[object RegExp]",A="[object Set]",D="[object String]",L="[object Symbol]",U="[object Undefined]",R="[object WeakMap]",H="[object ArrayBuffer]",z="[object DataView]",te="[object Float32Array]",X="[object Float64Array]",ne="[object Int8Array]",F="[object Int16Array]",Y="[object Int32Array]",V="[object Uint8Array]",ee="[object Uint8ClampedArray]",O="[object Uint16Array]",ge="[object Uint32Array]",Ue=/[\\^$.*+?()[\]{}|]/g,M=/^\[object .+?Constructor\]$/,De=/^(?:0|[1-9]\d*)$/,fe={};fe[te]=fe[X]=fe[ne]=fe[F]=fe[Y]=fe[V]=fe[ee]=fe[O]=fe[ge]=!0,fe[o]=fe[u]=fe[H]=fe[c]=fe[z]=fe[d]=fe[f]=fe[h]=fe[b]=fe[T]=fe[y]=fe[_]=fe[A]=fe[D]=fe[R]=!1;var Me=typeof qs=="object"&&qs&&qs.Object===Object&&qs,Ut=typeof self=="object"&&self&&self.Object===Object&&self,Ge=Me||Ut||Function("return this")(),Nt=t&&!t.nodeType&&t,it=Nt&&!0&&e&&!e.nodeType&&e,At=it&&it.exports===Nt,ye=At&&Me.process,we=function(){try{return ye&&ye.binding&&ye.binding("util")}catch{}}(),Ye=we&&we.isTypedArray;function je(C,I){for(var G=-1,ae=C==null?0:C.length,ut=0,Se=[];++G<ae;){var Tt=C[G];I(Tt,G,C)&&(Se[ut++]=Tt)}return Se}function Et(C,I){for(var G=-1,ae=I.length,ut=C.length;++G<ae;)C[ut+G]=I[G];return C}function Dt(C,I){for(var G=-1,ae=C==null?0:C.length;++G<ae;)if(I(C[G],G,C))return!0;return!1}function et(C,I){for(var G=-1,ae=Array(C);++G<C;)ae[G]=I(G);return ae}function qe(C){return function(I){return C(I)}}function jt(C,I){return C.has(I)}function qa(C,I){return C==null?void 0:C[I]}function Ga(C){var I=-1,G=Array(C.size);return C.forEach(function(ae,ut){G[++I]=[ut,ae]}),G}function $a(C,I){return function(G){return C(I(G))}}function J(C){var I=-1,G=Array(C.size);return C.forEach(function(ae){G[++I]=ae}),G}var oe=Array.prototype,B=Function.prototype,$=Object.prototype,se=Ge["__core-js_shared__"],ve=B.toString,be=$.hasOwnProperty,$t=function(){var C=/[^.]+$/.exec(se&&se.keys&&se.keys.IE_PROTO||"");return C?"Symbol(src)_1."+C:""}(),Rn=$.toString,xn=RegExp("^"+ve.call(be).replace(Ue,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),$n=At?Ge.Buffer:void 0,Nn=Ge.Symbol,Mt=Ge.Uint8Array,Wn=$.propertyIsEnumerable,En=oe.splice,ji=Nn?Nn.toStringTag:void 0,dN=Object.getOwnPropertySymbols,kJ=$n?$n.isBuffer:void 0,OJ=$a(Object.keys,Object),Qy=ku(Ge,"DataView"),$c=ku(Ge,"Map"),Zy=ku(Ge,"Promise"),Jy=ku(Ge,"Set"),ev=ku(Ge,"WeakMap"),Wc=ku(Object,"create"),RJ=Vs(Qy),NJ=Vs($c),DJ=Vs(Zy),MJ=Vs(Jy),LJ=Vs(ev),fN=Nn?Nn.prototype:void 0,tv=fN?fN.valueOf:void 0;function zs(C){var I=-1,G=C==null?0:C.length;for(this.clear();++I<G;){var ae=C[I];this.set(ae[0],ae[1])}}function IJ(){this.__data__=Wc?Wc(null):{},this.size=0}function PJ(C){var I=this.has(C)&&delete this.__data__[C];return this.size-=I?1:0,I}function BJ(C){var I=this.__data__;if(Wc){var G=I[C];return G===r?void 0:G}return be.call(I,C)?I[C]:void 0}function UJ(C){var I=this.__data__;return Wc?I[C]!==void 0:be.call(I,C)}function jJ(C,I){var G=this.__data__;return this.size+=this.has(C)?0:1,G[C]=Wc&&I===void 0?r:I,this}zs.prototype.clear=IJ,zs.prototype.delete=PJ,zs.prototype.get=BJ,zs.prototype.has=UJ,zs.prototype.set=jJ;function Fi(C){var I=-1,G=C==null?0:C.length;for(this.clear();++I<G;){var ae=C[I];this.set(ae[0],ae[1])}}function FJ(){this.__data__=[],this.size=0}function zJ(C){var I=this.__data__,G=xp(I,C);if(G<0)return!1;var ae=I.length-1;return G==ae?I.pop():En.call(I,G,1),--this.size,!0}function HJ(C){var I=this.__data__,G=xp(I,C);return G<0?void 0:I[G][1]}function VJ(C){return xp(this.__data__,C)>-1}function YJ(C,I){var G=this.__data__,ae=xp(G,C);return ae<0?(++this.size,G.push([C,I])):G[ae][1]=I,this}Fi.prototype.clear=FJ,Fi.prototype.delete=zJ,Fi.prototype.get=HJ,Fi.prototype.has=VJ,Fi.prototype.set=YJ;function Hs(C){var I=-1,G=C==null?0:C.length;for(this.clear();++I<G;){var ae=C[I];this.set(ae[0],ae[1])}}function qJ(){this.size=0,this.__data__={hash:new zs,map:new($c||Fi),string:new zs}}function GJ(C){var I=Ep(this,C).delete(C);return this.size-=I?1:0,I}function $J(C){return Ep(this,C).get(C)}function WJ(C){return Ep(this,C).has(C)}function XJ(C,I){var G=Ep(this,C),ae=G.size;return G.set(C,I),this.size+=G.size==ae?0:1,this}Hs.prototype.clear=qJ,Hs.prototype.delete=GJ,Hs.prototype.get=$J,Hs.prototype.has=WJ,Hs.prototype.set=XJ;function vp(C){var I=-1,G=C==null?0:C.length;for(this.__data__=new Hs;++I<G;)this.add(C[I])}function KJ(C){return this.__data__.set(C,r),this}function QJ(C){return this.__data__.has(C)}vp.prototype.add=vp.prototype.push=KJ,vp.prototype.has=QJ;function Wa(C){var I=this.__data__=new Fi(C);this.size=I.size}function ZJ(){this.__data__=new Fi,this.size=0}function JJ(C){var I=this.__data__,G=I.delete(C);return this.size=I.size,G}function eee(C){return this.__data__.get(C)}function tee(C){return this.__data__.has(C)}function nee(C,I){var G=this.__data__;if(G instanceof Fi){var ae=G.__data__;if(!$c||ae.length<n-1)return ae.push([C,I]),this.size=++G.size,this;G=this.__data__=new Hs(ae)}return G.set(C,I),this.size=G.size,this}Wa.prototype.clear=ZJ,Wa.prototype.delete=JJ,Wa.prototype.get=eee,Wa.prototype.has=tee,Wa.prototype.set=nee;function ree(C,I){var G=Tp(C),ae=!G&&yee(C),ut=!G&&!ae&&nv(C),Se=!G&&!ae&&!ut&&EN(C),Tt=G||ae||ut||Se,Wt=Tt?et(C.length,String):[],tn=Wt.length;for(var yt in C)be.call(C,yt)&&!(Tt&&(yt=="length"||ut&&(yt=="offset"||yt=="parent")||Se&&(yt=="buffer"||yt=="byteLength"||yt=="byteOffset")||hee(yt,tn)))&&Wt.push(yt);return Wt}function xp(C,I){for(var G=C.length;G--;)if(bN(C[G][0],I))return G;return-1}function iee(C,I,G){var ae=I(C);return Tp(C)?ae:Et(ae,G(C))}function Xc(C){return C==null?C===void 0?U:m:ji&&ji in Object(C)?dee(C):bee(C)}function hN(C){return Kc(C)&&Xc(C)==o}function pN(C,I,G,ae,ut){return C===I?!0:C==null||I==null||!Kc(C)&&!Kc(I)?C!==C&&I!==I:aee(C,I,G,ae,pN,ut)}function aee(C,I,G,ae,ut,Se){var Tt=Tp(C),Wt=Tp(I),tn=Tt?u:Xa(C),yt=Wt?u:Xa(I);tn=tn==o?y:tn,yt=yt==o?y:yt;var Xn=tn==y,Rr=yt==y,hn=tn==yt;if(hn&&nv(C)){if(!nv(I))return!1;Tt=!0,Xn=!1}if(hn&&!Xn)return Se||(Se=new Wa),Tt||EN(C)?mN(C,I,G,ae,ut,Se):lee(C,I,tn,G,ae,ut,Se);if(!(G&i)){var pr=Xn&&be.call(C,"__wrapped__"),mr=Rr&&be.call(I,"__wrapped__");if(pr||mr){var Ka=pr?C.value():C,zi=mr?I.value():I;return Se||(Se=new Wa),ut(Ka,zi,G,ae,Se)}}return hn?(Se||(Se=new Wa),cee(C,I,G,ae,ut,Se)):!1}function see(C){if(!xN(C)||mee(C))return!1;var I=yN(C)?xn:M;return I.test(Vs(C))}function oee(C){return Kc(C)&&vN(C.length)&&!!fe[Xc(C)]}function uee(C){if(!gee(C))return OJ(C);var I=[];for(var G in Object(C))be.call(C,G)&&G!="constructor"&&I.push(G);return I}function mN(C,I,G,ae,ut,Se){var Tt=G&i,Wt=C.length,tn=I.length;if(Wt!=tn&&!(Tt&&tn>Wt))return!1;var yt=Se.get(C);if(yt&&Se.get(I))return yt==I;var Xn=-1,Rr=!0,hn=G&a?new vp:void 0;for(Se.set(C,I),Se.set(I,C);++Xn<Wt;){var pr=C[Xn],mr=I[Xn];if(ae)var Ka=Tt?ae(mr,pr,Xn,I,C,Se):ae(pr,mr,Xn,C,I,Se);if(Ka!==void 0){if(Ka)continue;Rr=!1;break}if(hn){if(!Dt(I,function(zi,Ys){if(!jt(hn,Ys)&&(pr===zi||ut(pr,zi,G,ae,Se)))return hn.push(Ys)})){Rr=!1;break}}else if(!(pr===mr||ut(pr,mr,G,ae,Se))){Rr=!1;break}}return Se.delete(C),Se.delete(I),Rr}function lee(C,I,G,ae,ut,Se,Tt){switch(G){case z:if(C.byteLength!=I.byteLength||C.byteOffset!=I.byteOffset)return!1;C=C.buffer,I=I.buffer;case H:return!(C.byteLength!=I.byteLength||!Se(new Mt(C),new Mt(I)));case c:case d:case T:return bN(+C,+I);case f:return C.name==I.name&&C.message==I.message;case _:case D:return C==I+"";case b:var Wt=Ga;case A:var tn=ae&i;if(Wt||(Wt=J),C.size!=I.size&&!tn)return!1;var yt=Tt.get(C);if(yt)return yt==I;ae|=a,Tt.set(C,I);var Xn=mN(Wt(C),Wt(I),ae,ut,Se,Tt);return Tt.delete(C),Xn;case L:if(tv)return tv.call(C)==tv.call(I)}return!1}function cee(C,I,G,ae,ut,Se){var Tt=G&i,Wt=gN(C),tn=Wt.length,yt=gN(I),Xn=yt.length;if(tn!=Xn&&!Tt)return!1;for(var Rr=tn;Rr--;){var hn=Wt[Rr];if(!(Tt?hn in I:be.call(I,hn)))return!1}var pr=Se.get(C);if(pr&&Se.get(I))return pr==I;var mr=!0;Se.set(C,I),Se.set(I,C);for(var Ka=Tt;++Rr<tn;){hn=Wt[Rr];var zi=C[hn],Ys=I[hn];if(ae)var TN=Tt?ae(Ys,zi,hn,I,C,Se):ae(zi,Ys,hn,C,I,Se);if(!(TN===void 0?zi===Ys||ut(zi,Ys,G,ae,Se):TN)){mr=!1;break}Ka||(Ka=hn=="constructor")}if(mr&&!Ka){var wp=C.constructor,_p=I.constructor;wp!=_p&&"constructor"in C&&"constructor"in I&&!(typeof wp=="function"&&wp instanceof wp&&typeof _p=="function"&&_p instanceof _p)&&(mr=!1)}return Se.delete(C),Se.delete(I),mr}function gN(C){return iee(C,Eee,fee)}function Ep(C,I){var G=C.__data__;return pee(I)?G[typeof I=="string"?"string":"hash"]:G.map}function ku(C,I){var G=qa(C,I);return see(G)?G:void 0}function dee(C){var I=be.call(C,ji),G=C[ji];try{C[ji]=void 0;var ae=!0}catch{}var ut=Rn.call(C);return ae&&(I?C[ji]=G:delete C[ji]),ut}var fee=dN?function(C){return C==null?[]:(C=Object(C),je(dN(C),function(I){return Wn.call(C,I)}))}:Tee,Xa=Xc;(Qy&&Xa(new Qy(new ArrayBuffer(1)))!=z||$c&&Xa(new $c)!=b||Zy&&Xa(Zy.resolve())!=x||Jy&&Xa(new Jy)!=A||ev&&Xa(new ev)!=R)&&(Xa=function(C){var I=Xc(C),G=I==y?C.constructor:void 0,ae=G?Vs(G):"";if(ae)switch(ae){case RJ:return z;case NJ:return b;case DJ:return x;case MJ:return A;case LJ:return R}return I});function hee(C,I){return I=I??s,!!I&&(typeof C=="number"||De.test(C))&&C>-1&&C%1==0&&C<I}function pee(C){var I=typeof C;return I=="string"||I=="number"||I=="symbol"||I=="boolean"?C!=="__proto__":C===null}function mee(C){return!!$t&&$t in C}function gee(C){var I=C&&C.constructor,G=typeof I=="function"&&I.prototype||$;return C===G}function bee(C){return Rn.call(C)}function Vs(C){if(C!=null){try{return ve.call(C)}catch{}try{return C+""}catch{}}return""}function bN(C,I){return C===I||C!==C&&I!==I}var yee=hN(function(){return arguments}())?hN:function(C){return Kc(C)&&be.call(C,"callee")&&!Wn.call(C,"callee")},Tp=Array.isArray;function vee(C){return C!=null&&vN(C.length)&&!yN(C)}var nv=kJ||wee;function xee(C,I){return pN(C,I)}function yN(C){if(!xN(C))return!1;var I=Xc(C);return I==h||I==g||I==l||I==w}function vN(C){return typeof C=="number"&&C>-1&&C%1==0&&C<=s}function xN(C){var I=typeof C;return C!=null&&(I=="object"||I=="function")}function Kc(C){return C!=null&&typeof C=="object"}var EN=Ye?qe(Ye):oee;function Eee(C){return vee(C)?ree(C):uee(C)}function Tee(){return[]}function wee(){return!1}e.exports=xee}(Hf,Hf.exports);var l8=Hf.exports;const c8=Qc(l8);class Yo{constructor(t){this.subscribers=new Set,this.get=()=>this.state,this.set=n=>{c8(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(i=>{try{i(n)}catch(a){console.error(a)}})},this.subscribe=n=>(this.subscribers.add(n),()=>{this.subscribers.delete(n)}),this.state=t,this.initialState=t}}class l_{constructor(){this.state=new Yo({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=[],i=async()=>{this.abortController=new AbortController,this.state.setPartial({isPolling:!0});try{await t(this.abortController.signal)}catch(a){if(this.abortController.signal.aborted)return;console.error("Failed to poll:",a),this.state.setPartial({isError:!0})}finally{this.state.setPartial({isPolling:!1})}this.abortController.signal.aborted?console.log("Poller aborted, not scheduling anymore"):r.push(setTimeout(i,n))};i(),this.stopPolling=()=>{r.forEach(clearTimeout),this.state.reset()}}}}function c_(e){return e()}function d8(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 f8{constructor({api:t,config:n,sessionCtx:r,messageCtx:i,sessionPollingIntervalSeconds:a}){this.poller=new l_,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,h=c.history.map(this.mapHistoryToMessage).filter(g=>!f.some(b=>b.id===g.id));this.messageCtx.state.setPartial({messages:[...f,...h]})}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=d8(()=>JSON.parse(u)).data;if(l)return l}return s.result},this.api=t,this.config=n,this.sessionCtx=r,this.messageCtx=i,this.sessionPollingIntervalSeconds=a,this.registerPolling()}}const Zt=[];for(let e=0;e<256;++e)Zt.push((e+256).toString(16).slice(1));function h8(e,t=0){return(Zt[e[t+0]]+Zt[e[t+1]]+Zt[e[t+2]]+Zt[e[t+3]]+"-"+Zt[e[t+4]]+Zt[e[t+5]]+"-"+Zt[e[t+6]]+Zt[e[t+7]]+"-"+Zt[e[t+8]]+Zt[e[t+9]]+"-"+Zt[e[t+10]]+Zt[e[t+11]]+Zt[e[t+12]]+Zt[e[t+13]]+Zt[e[t+14]]+Zt[e[t+15]]).toLowerCase()}let kg;const p8=new Uint8Array(16);function m8(){if(!kg){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");kg=crypto.getRandomValues.bind(crypto)}return kg(p8)}const d_={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function Og(e,t,n){var i;if(d_.randomUUID&&!t&&!e)return d_.randomUUID();e=e||{};const r=e.random??((i=e.rng)==null?void 0:i.call(e))??m8();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,h8(r)}class g8{constructor({config:t,api:n,storageCtx:r}){var i;this.shouldCollectData=()=>{var a;return!!(!((a=this.state.get().contact)!=null&&a.token)&&this.config.collectUserData)},this.autoCreateUnverifiedUserIfNotExists=async()=>{var a,s,o,u,l,c,d,f,h,g,b,T,m,y;if(!((a=this.config.user)!=null&&a.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=(h=this.config.user)==null?void 0:h.data)==null?void 0:g.email,non_verified_name:((T=(b=this.config.user)==null?void 0:b.data)==null?void 0:T.name)||"Anonymous",non_verified_custom_data:(y=(m=this.config.user)==null?void 0:m.data)==null?void 0:y.customData})}},this.createUnverifiedContact=async(a,s)=>{this.state.setPartial({extraCollectedData:s});try{this.state.setPartial({isCreatingUnverifiedContact:!0,isErrorCreatingUnverifiedContact:!1});const{data:o}=await this.api.createUnverifiedContact(a);o!=null&&o.token?await this.setUnverifiedContact(o.token):this.state.setPartial({isErrorCreatingUnverifiedContact:!0})}finally{this.state.setPartial({isCreatingUnverifiedContact:!1})}},this.setUnverifiedContact=async a=>{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||Og();this.api.setAuthToken(a),await((c=this.storageCtx)==null?void 0:c.setContactToken(a)),await((d=this.storageCtx)==null?void 0:d.setExternalContactId(o)),this.state.setPartial({contact:{token:a,externalId:o}})},this.config=t,this.storageCtx=r,this.api=n,this.state=new Yo({contact:(i=t.user)!=null&&i.token?{token:t.user.token,externalId:t.user.externalId}:null,extraCollectedData:void 0,isCreatingUnverifiedContact:!1,isErrorCreatingUnverifiedContact:!1}),this.autoCreateUnverifiedUserIfNotExists()}}function Rg(){return Og()}class b8{constructor({api:t,contactCtx:n,sessionsPollingIntervalSeconds:r}){this.sessionsRefresher=new l_,this.sessionState=new Yo({session:null,isCreatingSession:!1,isResolvingSession:!1}),this.sessionsState=new Yo({data:[],cursor:void 0,isLastPage:!1,didStartInitialFetch:!1,isInitialFetchLoading:!0}),this.reset=async()=>{this.sessionState.reset()},this.registerSessionsRefresherWrapper=()=>{var i;(i=this.contactCtx.state.get().contact)!=null&&i.token&&!this.sessionsState.get().didStartInitialFetch?this.registerSessionsRefresher():this.contactCtx.state.subscribe(({contact:a})=>{a!=null&&a.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 i=(o=this.contactCtx.state.get().contact)==null?void 0:o.externalId,{data:a,error:s}=await this.api.createSession({customData:i?{external_id:i}:void 0});return a?(this.sessionState.setPartial({session:a,isCreatingSession:!1}),a):(this.sessionState.setPartial({isCreatingSession:!1}),console.error("Failed to create session:",s),null)},this.loadMoreSessions=async()=>{if(this.sessionsState.get().isLastPage)return;const{data:i}=await this.getSessions({cursor:this.sessionsState.get().cursor});if(i){const s=[...this.sessionsState.get().data,...i.items].filter((o,u,l)=>u===l.findIndex(c=>o.id===c.id));this.sessionsState.setPartial({data:s,cursor:i.next||void 0,isLastPage:i.next===null})}},this.getSessions=async({cursor:i})=>{var s,o;if(!((s=this.contactCtx.state.get().contact)!=null&&s.token))return{data:null};const a=(o=this.contactCtx.state.get().contact)==null?void 0:o.externalId;return await this.api.getSessions({cursor:i,filters:a?{external_id:a}:{}})},this.setSessions=i=>{const a=[...i,...this.sessionsState.get().data].filter((s,o,u)=>o===u.findIndex(l=>s.id===l.id));this.sessionsState.setPartial({data:a})},this.refreshSessions=async()=>{const{data:i}=await this.getSessions({cursor:void 0});i&&this.setSessions(i.items)},this.resolveSession=async()=>{const i=this.sessionState.get().session;if(!i||!i.isOpened)return{success:!1,error:"Session is not opened"};this.sessionState.setPartial({isResolvingSession:!0});const{data:a,error:s}=await this.api.resolveSession({session_id:i.id});return a?(this.sessionState.setPartial({session:a,isResolvingSession:!1}),{success:!0,data:a}):(this.sessionState.setPartial({isResolvingSession:!1}),{success:!1,error:s})},this.createStateCheckpoint=async i=>{var u;const a=(u=this.sessionState.get().session)==null?void 0:u.id;if(!a)return;const{data:s,error:o}=await this.api.createStateCheckpoint({session_id:a,payload:i});return s?{data:s}:{success:!1,error:o}},this.api=t,this.contactCtx=n,this.sessionsPollingIntervalSeconds=r,this.registerSessionsRefresherWrapper()}}class y8{constructor({config:t,api:n,sessionCtx:r,contactCtx:i}){this.state=new Yo({messages:[],isSendingMessage:!1,lastAIResMightSolveUserIssue:!1,isInitialFetchLoading:!1}),this.sendMessageAbortController=new AbortController,this.reset=()=>{this.sendMessageAbortController.abort("Resetting chat"),this.state.reset()},this.sendMessage=async a=>{var c,d,f,h,g,b,T,m;if(!a.content.trim()&&(!a.attachments||a.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(a.content.trim(),a.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 w=(f=this.sessionCtx.sessionState.get().session)==null?void 0:f.id;if(!w)return;const{data:_}=await this.api.sendMessage({uuid:y.id,bot_token:this.config.token,headers:this.config.headers,query_params:this.config.queryParams,body_properties:this.config.bodyProperties,session_id:w,content:y.content,attachments:a.attachments,clientContext:this.config.context,custom_data:{...this.config.messageCustomData||{},...a.customData||{}},language:this.config.language,exit_mode_prompt:a.exitModePrompt},this.sendMessageAbortController.signal);if(_!=null&&_.success){const A=this.toBotMessage(_);if(A){const D=this.state.get().messages;if(!!D.some(U=>U.id===A.id)){this.state.setPartial({lastAIResMightSolveUserIssue:((h=_.autopilotResponse)==null?void 0:h.mightSolveUserIssue)||((g=_.uiResponse)==null?void 0:g.mightSolveUserIssue)});return}this.state.setPartial({messages:[...D,A],lastAIResMightSolveUserIssue:((b=_.autopilotResponse)==null?void 0:b.mightSolveUserIssue)||((T=_.uiResponse)==null?void 0:T.mightSolveUserIssue)})}_.session&&this.sessionCtx.sessionState.setPartial({session:_.session})}else{const A=this.toBotErrorMessage(((m=_==null?void 0:_.error)==null?void 0:m.message)||"Unknown error occurred"),D=this.state.get().messages;this.state.setPartial({messages:[...D,A]})}}catch(y){this.sendMessageAbortController.signal.aborted||console.error("Failed to send message:",y)}finally{this.state.setPartial({isSendingMessage:!1})}},this.toUserMessage=(a,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(`
89
+ `)},UL=0,Ho=[];function jL(e){var t=v.useRef([]),n=v.useRef([0,0]),r=v.useRef(),i=v.useState(UL++)[0],a=v.useState(_g)[0],s=v.useRef(e);v.useEffect(function(){s.current=e},[e]),v.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var b=If([e.lockRef.current],(e.shards||[]).map(Gw),!0).filter(Boolean);return b.forEach(function(T){return T.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),b.forEach(function(T){return T.classList.remove("allow-interactivity-".concat(i))})}}},[e.inert,e.lockRef.current,e.shards]);var o=v.useCallback(function(b,T){if("touches"in b&&b.touches.length===2||b.type==="wheel"&&b.ctrlKey)return!s.current.allowPinchZoom;var m=Ff(b),y=n.current,x="deltaX"in b?b.deltaX:y[0]-m[0],w="deltaY"in b?b.deltaY:y[1]-m[1],_,A=b.target,D=Math.abs(x)>Math.abs(w)?"h":"v";if("touches"in b&&D==="h"&&A.type==="range")return!1;var L=Hw(D,A);if(!L)return!0;if(L?_=D:(_=D==="v"?"h":"v",L=Hw(D,A)),!L)return!1;if(!r.current&&"changedTouches"in b&&(x||w)&&(r.current=_),!_)return!0;var U=r.current||_;return IL(U,T,b,U==="h"?x:w,!0)},[]),u=v.useCallback(function(b){var T=b;if(!(!Ho.length||Ho[Ho.length-1]!==a)){var m="deltaY"in T?qw(T):Ff(T),y=t.current.filter(function(_){return _.name===T.type&&(_.target===T.target||T.target===_.shadowParent)&&PL(_.delta,m)})[0];if(y&&y.should){T.cancelable&&T.preventDefault();return}if(!y){var x=(s.current.shards||[]).map(Gw).filter(Boolean).filter(function(_){return _.contains(T.target)}),w=x.length>0?o(T,x[0]):!s.current.noIsolation;w&&T.cancelable&&T.preventDefault()}}},[]),l=v.useCallback(function(b,T,m,y){var x={name:b,delta:T,target:m,should:y,shadowParent:FL(m)};t.current.push(x),setTimeout(function(){t.current=t.current.filter(function(w){return w!==x})},1)},[]),c=v.useCallback(function(b){n.current=Ff(b),r.current=void 0},[]),d=v.useCallback(function(b){l(b.type,qw(b),b.target,o(b,e.lockRef.current))},[]),f=v.useCallback(function(b){l(b.type,Ff(b),b.target,o(b,e.lockRef.current))},[]);v.useEffect(function(){return Ho.push(a),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:f}),document.addEventListener("wheel",u,zo),document.addEventListener("touchmove",u,zo),document.addEventListener("touchstart",c,zo),function(){Ho=Ho.filter(function(b){return b!==a}),document.removeEventListener("wheel",u,zo),document.removeEventListener("touchmove",u,zo),document.removeEventListener("touchstart",c,zo)}},[]);var h=e.removeScrollBar,g=e.inert;return v.createElement(v.Fragment,null,g?v.createElement(a,{styles:BL(i)}):null,h?v.createElement(kL,{gapMode:e.gapMode}):null)}function FL(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const zL=Bw(Uw,jL);var $w=v.forwardRef(function(e,t){return v.createElement(Uf,Yt({},e,{ref:t,sideCar:zL}))});$w.classNames=Uf.classNames;var Cg="Popover",[Ww,See]=yf(Cg,[Of]),Pl=Of(),[HL,Ts]=Ww(Cg),Xw=e=>{const{__scopePopover:t,children:n,open:r,defaultOpen:i,onOpenChange:a,modal:s=!1}=e,o=Pl(t),u=v.useRef(null),[l,c]=v.useState(!1),[d=!1,f]=yg({prop:r,defaultProp:i,onChange:a});return E.jsx(aw,{...o,children:E.jsx(HL,{scope:t,contentId:Nl(),triggerRef:u,open:d,onOpenChange:f,onOpenToggle:v.useCallback(()=>f(h=>!h),[f]),hasCustomAnchor:l,onCustomAnchorAdd:v.useCallback(()=>c(!0),[]),onCustomAnchorRemove:v.useCallback(()=>c(!1),[]),modal:s,children:n})})};Xw.displayName=Cg;var Kw="PopoverAnchor",Qw=v.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,i=Ts(Kw,n),a=Pl(n),{onCustomAnchorAdd:s,onCustomAnchorRemove:o}=i;return v.useEffect(()=>(s(),()=>o()),[s,o]),E.jsx(gg,{...a,...r,ref:t})});Qw.displayName=Kw;var Zw="PopoverTrigger",Jw=v.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,i=Ts(Zw,n),a=Pl(n),s=jr(t,i.triggerRef),o=E.jsx(jn.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":r_(i.open),...r,ref:s,onClick:Sn(e.onClick,i.onOpenToggle)});return i.hasCustomAnchor?o:E.jsx(gg,{asChild:!0,...a,children:o})});Jw.displayName=Zw;var VL="PopoverPortal",[Aee,YL]=Ww(VL,{forceMount:void 0}),Vo="PopoverContent",e_=v.forwardRef((e,t)=>{const n=YL(Vo,e.__scopePopover),{forceMount:r=n.forceMount,...i}=e,a=Ts(Vo,e.__scopePopover);return E.jsx(bg,{present:r||a.open,children:a.modal?E.jsx(qL,{...i,ref:t}):E.jsx(GL,{...i,ref:t})})});e_.displayName=Vo;var qL=v.forwardRef((e,t)=>{const n=Ts(Vo,e.__scopePopover),r=v.useRef(null),i=jr(t,r),a=v.useRef(!1);return v.useEffect(()=>{const s=r.current;if(s)return lw(s)},[]),E.jsx($w,{as:vf,allowPinchZoom:!0,children:E.jsx(t_,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Sn(e.onCloseAutoFocus,s=>{var o;s.preventDefault(),a.current||(o=n.triggerRef.current)==null||o.focus()}),onPointerDownOutside:Sn(e.onPointerDownOutside,s=>{const o=s.detail.originalEvent,u=o.button===0&&o.ctrlKey===!0,l=o.button===2||u;a.current=l},{checkForDefaultPrevented:!1}),onFocusOutside:Sn(e.onFocusOutside,s=>s.preventDefault(),{checkForDefaultPrevented:!1})})})}),GL=v.forwardRef((e,t)=>{const n=Ts(Vo,e.__scopePopover),r=v.useRef(!1),i=v.useRef(!1);return E.jsx(t_,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{var s,o;(s=e.onCloseAutoFocus)==null||s.call(e,a),a.defaultPrevented||(r.current||(o=n.triggerRef.current)==null||o.focus(),a.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:a=>{var u,l;(u=e.onInteractOutside)==null||u.call(e,a),a.defaultPrevented||(r.current=!0,a.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const s=a.target;((l=n.triggerRef.current)==null?void 0:l.contains(s))&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&i.current&&a.preventDefault()}})}),t_=v.forwardRef((e,t)=>{const{__scopePopover:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:a,disableOutsidePointerEvents:s,onEscapeKeyDown:o,onPointerDownOutside:u,onFocusOutside:l,onInteractOutside:c,...d}=e,f=Ts(Vo,n),h=Pl(n);return S2(),E.jsx(k2,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:a,children:E.jsx(Z0,{asChild:!0,disableOutsidePointerEvents:s,onInteractOutside:c,onEscapeKeyDown:o,onPointerDownOutside:u,onFocusOutside:l,onDismiss:()=>f.onOpenChange(!1),children:E.jsx(sw,{"data-state":r_(f.open),role:"dialog",id:f.contentId,...h,...d,ref:t,style:{...d.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),n_="PopoverClose",$L=v.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,i=Ts(n_,n);return E.jsx(jn.button,{type:"button",...r,ref:t,onClick:Sn(e.onClick,()=>i.onOpenChange(!1))})});$L.displayName=n_;var WL="PopoverArrow",XL=v.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,i=Pl(n);return E.jsx(ow,{...i,...r,ref:t})});XL.displayName=WL;function r_(e){return e?"open":"closed"}var KL=Xw,QL=Qw,ZL=e_;const JL=/\{[^{}]+\}/g,e8=()=>{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 t8(){return Math.random().toString(36).slice(2,11)}function n8(e){let{baseUrl:t="",Request:n=globalThis.Request,fetch:r=globalThis.fetch,querySerializer:i,bodySerializer:a,headers:s,requestInitExt:o=void 0,...u}={...e};o=e8()?o:void 0,t=o_(t);const l=[];async function c(d,f){const{baseUrl:h,fetch:g=r,Request:b=n,headers:T,params:m={},parseAs:y="json",querySerializer:x,bodySerializer:w=a??i8,body:_,...A}=f||{};h&&(t=o_(h));let D=typeof i=="function"?i:s_(i);x&&(D=typeof x=="function"?x:s_({...typeof i=="object"?i:{},...x}));const L=_===void 0?void 0:w(_),U=L===void 0||L instanceof FormData?{}:{"Content-Type":"application/json"},R={redirect:"follow",...u,...A,body:L,headers:s8(U,s,T,m.header)};let H,z,te=new n(a8(d,{baseUrl:t,params:m,querySerializer:D}),R);for(const F in A)F in te||(te[F]=A[F]);if(l.length){H=t8(),z=Object.freeze({baseUrl:t,fetch:g,parseAs:y,querySerializer:D,bodySerializer:w});for(const F of l)if(F&&typeof F=="object"&&typeof F.onRequest=="function"){const Y=await F.onRequest({request:te,schemaPath:d,params:m,options:z,id:H});if(Y){if(!(Y instanceof n))throw new Error("onRequest: must return new Request() when modifying the request");te=Y}}}let X;try{X=await g(te,o)}catch(F){let Y=F;if(l.length)for(let V=l.length-1;V>=0;V--){const ee=l[V];if(ee&&typeof ee=="object"&&typeof ee.onError=="function"){const O=await ee.onError({request:te,error:Y,schemaPath:d,params:m,options:z,id:H});if(O){if(O instanceof Response){Y=void 0,X=O;break}if(O instanceof Error){Y=O;continue}throw new Error("onError: must return new Response() or instance of Error")}}}if(Y)throw Y}if(l.length)for(let F=l.length-1;F>=0;F--){const Y=l[F];if(Y&&typeof Y=="object"&&typeof Y.onResponse=="function"){const V=await Y.onResponse({request:te,response:X,schemaPath:d,params:m,options:z,id:H});if(V){if(!(V instanceof Response))throw new Error("onResponse: must return new Response() when modifying the response");X=V}}}if(X.status===204||X.headers.get("Content-Length")==="0")return X.ok?{data:void 0,response:X}:{error:void 0,response:X};if(X.ok)return y==="stream"?{data:X.body,response:X}:{data:await X[y](),response:X};let ne=await X.text();try{ne=JSON.parse(ne)}catch{}return{error:ne,response:X}}return{request(d,f,h){return c(f,{...h,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 h=l.indexOf(f);h!==-1&&l.splice(h,1)}}}}function zf(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 i_(e,t,n){if(!t||typeof t!="object")return"";const r=[],i={simple:",",label:".",matrix:";"}[n.style]||"&";if(n.style!=="deepObject"&&n.explode===!1){for(const 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(zf(o,t[s],n))}const a=r.join(i);return n.style==="label"||n.style==="matrix"?`${i}${a}`:a}function a_(e,t,n){if(!Array.isArray(t))return"";if(n.explode===!1){const a={form:",",spaceDelimited:"%20",pipeDelimited:"|"}[n.style]||",",s=(n.allowReserved===!0?t:t.map(o=>encodeURIComponent(o))).join(a);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]||"&",i=[];for(const a of t)n.style==="simple"||n.style==="label"?i.push(n.allowReserved===!0?a:encodeURIComponent(a)):i.push(zf(e,a,n));return n.style==="label"||n.style==="matrix"?`${r}${i.join(r)}`:i.join(r)}function s_(e){return function(n){const r=[];if(n&&typeof n=="object")for(const i in n){const a=n[i];if(a!=null){if(Array.isArray(a)){if(a.length===0)continue;r.push(a_(i,a,{style:"form",explode:!0,...e==null?void 0:e.array,allowReserved:(e==null?void 0:e.allowReserved)||!1}));continue}if(typeof a=="object"){r.push(i_(i,a,{style:"deepObject",explode:!0,...e==null?void 0:e.object,allowReserved:(e==null?void 0:e.allowReserved)||!1}));continue}r.push(zf(i,a,e))}}return r.join("&")}}function r8(e,t){let n=e;for(const r of e.match(JL)??[]){let i=r.substring(1,r.length-1),a=!1,s="simple";if(i.endsWith("*")&&(a=!0,i=i.substring(0,i.length-1)),i.startsWith(".")?(s="label",i=i.substring(1)):i.startsWith(";")&&(s="matrix",i=i.substring(1)),!t||t[i]===void 0||t[i]===null)continue;const o=t[i];if(Array.isArray(o)){n=n.replace(r,a_(i,o,{style:s,explode:a}));continue}if(typeof o=="object"){n=n.replace(r,i_(i,o,{style:s,explode:a}));continue}if(s==="matrix"){n=n.replace(r,`;${zf(i,o)}`);continue}n=n.replace(r,s==="label"?`.${encodeURIComponent(o)}`:encodeURIComponent(o))}return n}function i8(e){return e instanceof FormData?e:JSON.stringify(e)}function a8(e,t){var i;let n=`${t.baseUrl}${e}`;(i=t.params)!=null&&i.path&&(n=r8(n,t.params.path));let r=t.querySerializer(t.params.query??{});return r.startsWith("?")&&(r=r.substring(1)),r&&(n+=`?${r}`),n}function s8(...e){const t=new Headers;for(const n of e){if(!n||typeof n!="object")continue;const r=n instanceof Headers?n.entries():Object.entries(n);for(const[i,a]of r)if(a===null)t.delete(i);else if(Array.isArray(a))for(const s of a)t.append(i,s);else a!==void 0&&t.set(i,a)}return t}function o_(e){return e.endsWith("/")?e.substring(0,e.length-1):e}const o8=e=>{console.log(e.error)},u8=e=>{const t=n8({baseUrl:e.baseUrl}),n={onRequest:e.onRequest,onResponse:e.onResponse,onError:e.onError||o8};return t.use(n),t};class u_{constructor({config:t}){var i,a;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})=>u8({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:h}=this.constructClientOptions(this.userToken),b=`${h}/backend/widget/v2/upload`;f.open("POST",b),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.resolveSession=async(s,o)=>await this.client.POST("/backend/widget/v2/session/resolve",{body:s,signal:o}),this.createStateCheckpoint=async s=>await this.client.POST("/backend/widget/v2/checkpoint",{body:s}),this.config=t,this.userToken=((i=t.user)==null?void 0:i.token)||null;const{baseUrl:n,headers:r}=this.constructClientOptions((a=t.user)==null?void 0:a.token);this.client=this.createOpenAPIClient({baseUrl:n,headers:r})}}var Hf={exports:{}};Hf.exports,function(e,t){var n=200,r="__lodash_hash_undefined__",i=1,a=2,s=9007199254740991,o="[object Arguments]",u="[object Array]",l="[object AsyncFunction]",c="[object Boolean]",d="[object Date]",f="[object Error]",h="[object Function]",g="[object GeneratorFunction]",b="[object Map]",T="[object Number]",m="[object Null]",y="[object Object]",x="[object Promise]",w="[object Proxy]",_="[object RegExp]",A="[object Set]",D="[object String]",L="[object Symbol]",U="[object Undefined]",R="[object WeakMap]",H="[object ArrayBuffer]",z="[object DataView]",te="[object Float32Array]",X="[object Float64Array]",ne="[object Int8Array]",F="[object Int16Array]",Y="[object Int32Array]",V="[object Uint8Array]",ee="[object Uint8ClampedArray]",O="[object Uint16Array]",ge="[object Uint32Array]",Ue=/[\\^$.*+?()[\]{}|]/g,M=/^\[object .+?Constructor\]$/,De=/^(?:0|[1-9]\d*)$/,fe={};fe[te]=fe[X]=fe[ne]=fe[F]=fe[Y]=fe[V]=fe[ee]=fe[O]=fe[ge]=!0,fe[o]=fe[u]=fe[H]=fe[c]=fe[z]=fe[d]=fe[f]=fe[h]=fe[b]=fe[T]=fe[y]=fe[_]=fe[A]=fe[D]=fe[R]=!1;var Me=typeof qs=="object"&&qs&&qs.Object===Object&&qs,Ut=typeof self=="object"&&self&&self.Object===Object&&self,Ge=Me||Ut||Function("return this")(),Nt=t&&!t.nodeType&&t,it=Nt&&!0&&e&&!e.nodeType&&e,At=it&&it.exports===Nt,ye=At&&Me.process,we=function(){try{return ye&&ye.binding&&ye.binding("util")}catch{}}(),Ye=we&&we.isTypedArray;function je(C,I){for(var G=-1,ae=C==null?0:C.length,ut=0,Se=[];++G<ae;){var Tt=C[G];I(Tt,G,C)&&(Se[ut++]=Tt)}return Se}function Et(C,I){for(var G=-1,ae=I.length,ut=C.length;++G<ae;)C[ut+G]=I[G];return C}function Dt(C,I){for(var G=-1,ae=C==null?0:C.length;++G<ae;)if(I(C[G],G,C))return!0;return!1}function et(C,I){for(var G=-1,ae=Array(C);++G<C;)ae[G]=I(G);return ae}function qe(C){return function(I){return C(I)}}function jt(C,I){return C.has(I)}function qa(C,I){return C==null?void 0:C[I]}function Ga(C){var I=-1,G=Array(C.size);return C.forEach(function(ae,ut){G[++I]=[ut,ae]}),G}function $a(C,I){return function(G){return C(I(G))}}function J(C){var I=-1,G=Array(C.size);return C.forEach(function(ae){G[++I]=ae}),G}var oe=Array.prototype,B=Function.prototype,$=Object.prototype,se=Ge["__core-js_shared__"],ve=B.toString,be=$.hasOwnProperty,$t=function(){var C=/[^.]+$/.exec(se&&se.keys&&se.keys.IE_PROTO||"");return C?"Symbol(src)_1."+C:""}(),Rn=$.toString,xn=RegExp("^"+ve.call(be).replace(Ue,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),$n=At?Ge.Buffer:void 0,Nn=Ge.Symbol,Mt=Ge.Uint8Array,Wn=$.propertyIsEnumerable,En=oe.splice,ji=Nn?Nn.toStringTag:void 0,dN=Object.getOwnPropertySymbols,kJ=$n?$n.isBuffer:void 0,OJ=$a(Object.keys,Object),Qy=ku(Ge,"DataView"),$c=ku(Ge,"Map"),Zy=ku(Ge,"Promise"),Jy=ku(Ge,"Set"),ev=ku(Ge,"WeakMap"),Wc=ku(Object,"create"),RJ=Vs(Qy),NJ=Vs($c),DJ=Vs(Zy),MJ=Vs(Jy),LJ=Vs(ev),fN=Nn?Nn.prototype:void 0,tv=fN?fN.valueOf:void 0;function zs(C){var I=-1,G=C==null?0:C.length;for(this.clear();++I<G;){var ae=C[I];this.set(ae[0],ae[1])}}function IJ(){this.__data__=Wc?Wc(null):{},this.size=0}function PJ(C){var I=this.has(C)&&delete this.__data__[C];return this.size-=I?1:0,I}function BJ(C){var I=this.__data__;if(Wc){var G=I[C];return G===r?void 0:G}return be.call(I,C)?I[C]:void 0}function UJ(C){var I=this.__data__;return Wc?I[C]!==void 0:be.call(I,C)}function jJ(C,I){var G=this.__data__;return this.size+=this.has(C)?0:1,G[C]=Wc&&I===void 0?r:I,this}zs.prototype.clear=IJ,zs.prototype.delete=PJ,zs.prototype.get=BJ,zs.prototype.has=UJ,zs.prototype.set=jJ;function Fi(C){var I=-1,G=C==null?0:C.length;for(this.clear();++I<G;){var ae=C[I];this.set(ae[0],ae[1])}}function FJ(){this.__data__=[],this.size=0}function zJ(C){var I=this.__data__,G=xp(I,C);if(G<0)return!1;var ae=I.length-1;return G==ae?I.pop():En.call(I,G,1),--this.size,!0}function HJ(C){var I=this.__data__,G=xp(I,C);return G<0?void 0:I[G][1]}function VJ(C){return xp(this.__data__,C)>-1}function YJ(C,I){var G=this.__data__,ae=xp(G,C);return ae<0?(++this.size,G.push([C,I])):G[ae][1]=I,this}Fi.prototype.clear=FJ,Fi.prototype.delete=zJ,Fi.prototype.get=HJ,Fi.prototype.has=VJ,Fi.prototype.set=YJ;function Hs(C){var I=-1,G=C==null?0:C.length;for(this.clear();++I<G;){var ae=C[I];this.set(ae[0],ae[1])}}function qJ(){this.size=0,this.__data__={hash:new zs,map:new($c||Fi),string:new zs}}function GJ(C){var I=Ep(this,C).delete(C);return this.size-=I?1:0,I}function $J(C){return Ep(this,C).get(C)}function WJ(C){return Ep(this,C).has(C)}function XJ(C,I){var G=Ep(this,C),ae=G.size;return G.set(C,I),this.size+=G.size==ae?0:1,this}Hs.prototype.clear=qJ,Hs.prototype.delete=GJ,Hs.prototype.get=$J,Hs.prototype.has=WJ,Hs.prototype.set=XJ;function vp(C){var I=-1,G=C==null?0:C.length;for(this.__data__=new Hs;++I<G;)this.add(C[I])}function KJ(C){return this.__data__.set(C,r),this}function QJ(C){return this.__data__.has(C)}vp.prototype.add=vp.prototype.push=KJ,vp.prototype.has=QJ;function Wa(C){var I=this.__data__=new Fi(C);this.size=I.size}function ZJ(){this.__data__=new Fi,this.size=0}function JJ(C){var I=this.__data__,G=I.delete(C);return this.size=I.size,G}function eee(C){return this.__data__.get(C)}function tee(C){return this.__data__.has(C)}function nee(C,I){var G=this.__data__;if(G instanceof Fi){var ae=G.__data__;if(!$c||ae.length<n-1)return ae.push([C,I]),this.size=++G.size,this;G=this.__data__=new Hs(ae)}return G.set(C,I),this.size=G.size,this}Wa.prototype.clear=ZJ,Wa.prototype.delete=JJ,Wa.prototype.get=eee,Wa.prototype.has=tee,Wa.prototype.set=nee;function ree(C,I){var G=Tp(C),ae=!G&&yee(C),ut=!G&&!ae&&nv(C),Se=!G&&!ae&&!ut&&EN(C),Tt=G||ae||ut||Se,Wt=Tt?et(C.length,String):[],tn=Wt.length;for(var yt in C)be.call(C,yt)&&!(Tt&&(yt=="length"||ut&&(yt=="offset"||yt=="parent")||Se&&(yt=="buffer"||yt=="byteLength"||yt=="byteOffset")||hee(yt,tn)))&&Wt.push(yt);return Wt}function xp(C,I){for(var G=C.length;G--;)if(bN(C[G][0],I))return G;return-1}function iee(C,I,G){var ae=I(C);return Tp(C)?ae:Et(ae,G(C))}function Xc(C){return C==null?C===void 0?U:m:ji&&ji in Object(C)?dee(C):bee(C)}function hN(C){return Kc(C)&&Xc(C)==o}function pN(C,I,G,ae,ut){return C===I?!0:C==null||I==null||!Kc(C)&&!Kc(I)?C!==C&&I!==I:aee(C,I,G,ae,pN,ut)}function aee(C,I,G,ae,ut,Se){var Tt=Tp(C),Wt=Tp(I),tn=Tt?u:Xa(C),yt=Wt?u:Xa(I);tn=tn==o?y:tn,yt=yt==o?y:yt;var Xn=tn==y,Rr=yt==y,hn=tn==yt;if(hn&&nv(C)){if(!nv(I))return!1;Tt=!0,Xn=!1}if(hn&&!Xn)return Se||(Se=new Wa),Tt||EN(C)?mN(C,I,G,ae,ut,Se):lee(C,I,tn,G,ae,ut,Se);if(!(G&i)){var pr=Xn&&be.call(C,"__wrapped__"),mr=Rr&&be.call(I,"__wrapped__");if(pr||mr){var Ka=pr?C.value():C,zi=mr?I.value():I;return Se||(Se=new Wa),ut(Ka,zi,G,ae,Se)}}return hn?(Se||(Se=new Wa),cee(C,I,G,ae,ut,Se)):!1}function see(C){if(!xN(C)||mee(C))return!1;var I=yN(C)?xn:M;return I.test(Vs(C))}function oee(C){return Kc(C)&&vN(C.length)&&!!fe[Xc(C)]}function uee(C){if(!gee(C))return OJ(C);var I=[];for(var G in Object(C))be.call(C,G)&&G!="constructor"&&I.push(G);return I}function mN(C,I,G,ae,ut,Se){var Tt=G&i,Wt=C.length,tn=I.length;if(Wt!=tn&&!(Tt&&tn>Wt))return!1;var yt=Se.get(C);if(yt&&Se.get(I))return yt==I;var Xn=-1,Rr=!0,hn=G&a?new vp:void 0;for(Se.set(C,I),Se.set(I,C);++Xn<Wt;){var pr=C[Xn],mr=I[Xn];if(ae)var Ka=Tt?ae(mr,pr,Xn,I,C,Se):ae(pr,mr,Xn,C,I,Se);if(Ka!==void 0){if(Ka)continue;Rr=!1;break}if(hn){if(!Dt(I,function(zi,Ys){if(!jt(hn,Ys)&&(pr===zi||ut(pr,zi,G,ae,Se)))return hn.push(Ys)})){Rr=!1;break}}else if(!(pr===mr||ut(pr,mr,G,ae,Se))){Rr=!1;break}}return Se.delete(C),Se.delete(I),Rr}function lee(C,I,G,ae,ut,Se,Tt){switch(G){case z:if(C.byteLength!=I.byteLength||C.byteOffset!=I.byteOffset)return!1;C=C.buffer,I=I.buffer;case H:return!(C.byteLength!=I.byteLength||!Se(new Mt(C),new Mt(I)));case c:case d:case T:return bN(+C,+I);case f:return C.name==I.name&&C.message==I.message;case _:case D:return C==I+"";case b:var Wt=Ga;case A:var tn=ae&i;if(Wt||(Wt=J),C.size!=I.size&&!tn)return!1;var yt=Tt.get(C);if(yt)return yt==I;ae|=a,Tt.set(C,I);var Xn=mN(Wt(C),Wt(I),ae,ut,Se,Tt);return Tt.delete(C),Xn;case L:if(tv)return tv.call(C)==tv.call(I)}return!1}function cee(C,I,G,ae,ut,Se){var Tt=G&i,Wt=gN(C),tn=Wt.length,yt=gN(I),Xn=yt.length;if(tn!=Xn&&!Tt)return!1;for(var Rr=tn;Rr--;){var hn=Wt[Rr];if(!(Tt?hn in I:be.call(I,hn)))return!1}var pr=Se.get(C);if(pr&&Se.get(I))return pr==I;var mr=!0;Se.set(C,I),Se.set(I,C);for(var Ka=Tt;++Rr<tn;){hn=Wt[Rr];var zi=C[hn],Ys=I[hn];if(ae)var TN=Tt?ae(Ys,zi,hn,I,C,Se):ae(zi,Ys,hn,C,I,Se);if(!(TN===void 0?zi===Ys||ut(zi,Ys,G,ae,Se):TN)){mr=!1;break}Ka||(Ka=hn=="constructor")}if(mr&&!Ka){var wp=C.constructor,_p=I.constructor;wp!=_p&&"constructor"in C&&"constructor"in I&&!(typeof wp=="function"&&wp instanceof wp&&typeof _p=="function"&&_p instanceof _p)&&(mr=!1)}return Se.delete(C),Se.delete(I),mr}function gN(C){return iee(C,Eee,fee)}function Ep(C,I){var G=C.__data__;return pee(I)?G[typeof I=="string"?"string":"hash"]:G.map}function ku(C,I){var G=qa(C,I);return see(G)?G:void 0}function dee(C){var I=be.call(C,ji),G=C[ji];try{C[ji]=void 0;var ae=!0}catch{}var ut=Rn.call(C);return ae&&(I?C[ji]=G:delete C[ji]),ut}var fee=dN?function(C){return C==null?[]:(C=Object(C),je(dN(C),function(I){return Wn.call(C,I)}))}:Tee,Xa=Xc;(Qy&&Xa(new Qy(new ArrayBuffer(1)))!=z||$c&&Xa(new $c)!=b||Zy&&Xa(Zy.resolve())!=x||Jy&&Xa(new Jy)!=A||ev&&Xa(new ev)!=R)&&(Xa=function(C){var I=Xc(C),G=I==y?C.constructor:void 0,ae=G?Vs(G):"";if(ae)switch(ae){case RJ:return z;case NJ:return b;case DJ:return x;case MJ:return A;case LJ:return R}return I});function hee(C,I){return I=I??s,!!I&&(typeof C=="number"||De.test(C))&&C>-1&&C%1==0&&C<I}function pee(C){var I=typeof C;return I=="string"||I=="number"||I=="symbol"||I=="boolean"?C!=="__proto__":C===null}function mee(C){return!!$t&&$t in C}function gee(C){var I=C&&C.constructor,G=typeof I=="function"&&I.prototype||$;return C===G}function bee(C){return Rn.call(C)}function Vs(C){if(C!=null){try{return ve.call(C)}catch{}try{return C+""}catch{}}return""}function bN(C,I){return C===I||C!==C&&I!==I}var yee=hN(function(){return arguments}())?hN:function(C){return Kc(C)&&be.call(C,"callee")&&!Wn.call(C,"callee")},Tp=Array.isArray;function vee(C){return C!=null&&vN(C.length)&&!yN(C)}var nv=kJ||wee;function xee(C,I){return pN(C,I)}function yN(C){if(!xN(C))return!1;var I=Xc(C);return I==h||I==g||I==l||I==w}function vN(C){return typeof C=="number"&&C>-1&&C%1==0&&C<=s}function xN(C){var I=typeof C;return C!=null&&(I=="object"||I=="function")}function Kc(C){return C!=null&&typeof C=="object"}var EN=Ye?qe(Ye):oee;function Eee(C){return vee(C)?ree(C):uee(C)}function Tee(){return[]}function wee(){return!1}e.exports=xee}(Hf,Hf.exports);var l8=Hf.exports;const c8=Qc(l8);class Yo{constructor(t){this.subscribers=new Set,this.get=()=>this.state,this.set=n=>{c8(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(i=>{try{i(n)}catch(a){console.error(a)}})},this.subscribe=n=>(this.subscribers.add(n),()=>{this.subscribers.delete(n)}),this.state=t,this.initialState=t}}class l_{constructor(){this.state=new Yo({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=[],i=async()=>{this.abortController=new AbortController,this.state.setPartial({isPolling:!0});try{await t(this.abortController.signal)}catch(a){if(this.abortController.signal.aborted)return;console.error("Failed to poll:",a),this.state.setPartial({isError:!0})}finally{this.state.setPartial({isPolling:!1})}this.abortController.signal.aborted?console.log("Poller aborted, not scheduling anymore"):r.push(setTimeout(i,n))};i(),this.stopPolling=()=>{r.forEach(clearTimeout),this.state.reset()}}}}function c_(e){return e()}function d8(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 f8{constructor({api:t,config:n,sessionCtx:r,messageCtx:i,sessionPollingIntervalSeconds:a}){this.poller=new l_,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,h=c.history.map(this.mapHistoryToMessage).filter(g=>!f.some(b=>b.id===g.id));this.messageCtx.state.setPartial({messages:[...f,...h]})}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=d8(()=>JSON.parse(u)).data;if(l)return l}return s.result},this.api=t,this.config=n,this.sessionCtx=r,this.messageCtx=i,this.sessionPollingIntervalSeconds=a,this.registerPolling()}}const Zt=[];for(let e=0;e<256;++e)Zt.push((e+256).toString(16).slice(1));function h8(e,t=0){return(Zt[e[t+0]]+Zt[e[t+1]]+Zt[e[t+2]]+Zt[e[t+3]]+"-"+Zt[e[t+4]]+Zt[e[t+5]]+"-"+Zt[e[t+6]]+Zt[e[t+7]]+"-"+Zt[e[t+8]]+Zt[e[t+9]]+"-"+Zt[e[t+10]]+Zt[e[t+11]]+Zt[e[t+12]]+Zt[e[t+13]]+Zt[e[t+14]]+Zt[e[t+15]]).toLowerCase()}let kg;const p8=new Uint8Array(16);function m8(){if(!kg){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");kg=crypto.getRandomValues.bind(crypto)}return kg(p8)}const d_={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function Og(e,t,n){var i;if(d_.randomUUID&&!t&&!e)return d_.randomUUID();e=e||{};const r=e.random??((i=e.rng)==null?void 0:i.call(e))??m8();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,h8(r)}class g8{constructor({config:t,api:n,storageCtx:r}){var i;this.shouldCollectData=()=>{var a;return!!(!((a=this.state.get().contact)!=null&&a.token)&&this.config.collectUserData)},this.autoCreateUnverifiedUserIfNotExists=async()=>{var a,s,o,u,l,c,d,f,h,g,b,T,m,y;if(!((a=this.config.user)!=null&&a.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=(h=this.config.user)==null?void 0:h.data)==null?void 0:g.email,non_verified_name:((T=(b=this.config.user)==null?void 0:b.data)==null?void 0:T.name)||"Anonymous",non_verified_custom_data:(y=(m=this.config.user)==null?void 0:m.data)==null?void 0:y.customData})}},this.createUnverifiedContact=async(a,s)=>{this.state.setPartial({extraCollectedData:s});try{this.state.setPartial({isCreatingUnverifiedContact:!0,isErrorCreatingUnverifiedContact:!1});const{data:o}=await this.api.createUnverifiedContact(a);o!=null&&o.token?await this.setUnverifiedContact(o.token):this.state.setPartial({isErrorCreatingUnverifiedContact:!0})}finally{this.state.setPartial({isCreatingUnverifiedContact:!1})}},this.setUnverifiedContact=async a=>{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||Og();this.api.setAuthToken(a),await((c=this.storageCtx)==null?void 0:c.setContactToken(a)),await((d=this.storageCtx)==null?void 0:d.setExternalContactId(o)),this.state.setPartial({contact:{token:a,externalId:o}})},this.config=t,this.storageCtx=r,this.api=n,this.state=new Yo({contact:(i=t.user)!=null&&i.token?{token:t.user.token,externalId:t.user.externalId}:null,extraCollectedData:void 0,isCreatingUnverifiedContact:!1,isErrorCreatingUnverifiedContact:!1}),this.autoCreateUnverifiedUserIfNotExists()}}function Rg(){return Og()}class b8{constructor({config:t,api:n,contactCtx:r,sessionsPollingIntervalSeconds:i}){this.sessionsRefresher=new l_,this.sessionState=new Yo({session:null,isCreatingSession:!1,isResolvingSession:!1}),this.sessionsState=new Yo({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:s})=>{s!=null&&s.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 l;this.sessionState.setPartial({session:null,isCreatingSession:!0});const a=(l=this.contactCtx.state.get().contact)==null?void 0:l.externalId,s={...this.config.sessionCustomData,...a?{external_id:a}:{}},{data:o,error:u}=await this.api.createSession({customData:Object.keys(s).length>0?s:void 0});return o?(this.sessionState.setPartial({session:o,isCreatingSession:!1}),o):(this.sessionState.setPartial({isCreatingSession:!1}),console.error("Failed to create session:",u),null)},this.loadMoreSessions=async()=>{if(this.sessionsState.get().isLastPage)return;const{data:a}=await this.getSessions({cursor:this.sessionsState.get().cursor});if(a){const o=[...this.sessionsState.get().data,...a.items].filter((u,l,c)=>l===c.findIndex(d=>u.id===d.id));this.sessionsState.setPartial({data:o,cursor:a.next||void 0,isLastPage:a.next===null})}},this.getSessions=async({cursor:a})=>{var o,u;if(!((o=this.contactCtx.state.get().contact)!=null&&o.token))return{data:null};const s=(u=this.contactCtx.state.get().contact)==null?void 0:u.externalId;return await this.api.getSessions({cursor:a,filters:s?{external_id:s}:{}})},this.setSessions=a=>{const s=[...a,...this.sessionsState.get().data].filter((o,u,l)=>u===l.findIndex(c=>o.id===c.id));this.sessionsState.setPartial({data:s})},this.refreshSessions=async()=>{const{data:a}=await this.getSessions({cursor:void 0});a&&this.setSessions(a.items)},this.resolveSession=async()=>{const a=this.sessionState.get().session;if(!a||!a.isOpened)return{success:!1,error:"Session is not opened"};this.sessionState.setPartial({isResolvingSession:!0});const{data:s,error:o}=await this.api.resolveSession({session_id:a.id});return s?(this.sessionState.setPartial({session:s,isResolvingSession:!1}),{success:!0,data:s}):(this.sessionState.setPartial({isResolvingSession:!1}),{success:!1,error:o})},this.createStateCheckpoint=async a=>{var l;const s=(l=this.sessionState.get().session)==null?void 0:l.id;if(!s)return;const{data:o,error:u}=await this.api.createStateCheckpoint({session_id:s,payload:a});return o?{data:o}:{success:!1,error:u}},this.config=t,this.api=n,this.contactCtx=r,this.sessionsPollingIntervalSeconds=i,this.registerSessionsRefresherWrapper()}}class y8{constructor({config:t,api:n,sessionCtx:r,contactCtx:i}){this.state=new Yo({messages:[],isSendingMessage:!1,lastAIResMightSolveUserIssue:!1,isInitialFetchLoading:!1}),this.sendMessageAbortController=new AbortController,this.reset=()=>{this.sendMessageAbortController.abort("Resetting chat"),this.state.reset()},this.sendMessage=async a=>{var c,d,f,h,g,b,T,m;if(!a.content.trim()&&(!a.attachments||a.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(a.content.trim(),a.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 w=(f=this.sessionCtx.sessionState.get().session)==null?void 0:f.id;if(!w)return;const{data:_}=await this.api.sendMessage({uuid:y.id,bot_token:this.config.token,headers:this.config.headers,query_params:this.config.queryParams,body_properties:this.config.bodyProperties,session_id:w,content:y.content,attachments:a.attachments,clientContext:this.config.context,custom_data:{...this.config.messageCustomData||{},...a.customData||{}},language:this.config.language,exit_mode_prompt:a.exitModePrompt},this.sendMessageAbortController.signal);if(_!=null&&_.success){const A=this.toBotMessage(_);if(A){const D=this.state.get().messages;if(!!D.some(U=>U.id===A.id)){this.state.setPartial({lastAIResMightSolveUserIssue:((h=_.autopilotResponse)==null?void 0:h.mightSolveUserIssue)||((g=_.uiResponse)==null?void 0:g.mightSolveUserIssue)});return}this.state.setPartial({messages:[...D,A],lastAIResMightSolveUserIssue:((b=_.autopilotResponse)==null?void 0:b.mightSolveUserIssue)||((T=_.uiResponse)==null?void 0:T.mightSolveUserIssue)})}_.session&&this.sessionCtx.sessionState.setPartial({session:_.session})}else{const A=this.toBotErrorMessage(((m=_==null?void 0:_.error)==null?void 0:m.message)||"Unknown error occurred"),D=this.state.get().messages;this.state.setPartial({messages:[...D,A]})}}catch(y){this.sendMessageAbortController.signal.aborted||console.error("Failed to send message:",y)}finally{this.state.setPartial({isSendingMessage:!1})}},this.toUserMessage=(a,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(`
90
90
  `)}
91
91
 
92
- ${a}`:a})();return{id:Rg(),type:"FROM_USER",content:o,deliveredAt:new Date().toISOString(),attachments:s,timestamp:new Date().toISOString()}},this.toBotMessage=a=>{var s;return a.success&&a.autopilotResponse?{type:"FROM_BOT",id:a.autopilotResponse.id||Rg(),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:a.autopilotResponse.value.content,action:(s=a.uiResponse)!=null&&s.value.name?{name:a.uiResponse.value.name,data:a.uiResponse.value.request_response}:void 0}}:null},this.toBotErrorMessage=a=>({type:"FROM_BOT",id:Rg(),timestamp:new Date().toISOString(),component:"TEXT",data:{message:a,variant:"error",action:void 0}}),this.config=t,this.api=n,this.sessionCtx=r,this.contactCtx=i}}class v8{constructor({config:t,contactCtx:n,sessionCtx:r,resetChat:i}){var a;this.registerRoutingListener=()=>{this.contactCtx.state.subscribe(({contact:s})=>{var o;s!=null&&s.token&&this.state.get().screen==="welcome"&&this.state.setPartial({screen:(o=this.config.router)!=null&&o.chatScreenOnly?"chat":"sessions"})}),this.sessionCtx.sessionsState.subscribe(({isInitialFetchLoading:s,data:o})=>{var u,l,c,d;if((u=this.config.router)!=null&&u.chatScreenOnly&&!((l=this.sessionCtx.sessionState.get().session)!=null&&l.id)){const f=(c=o.find(h=>h.isOpened))==null?void 0:c.id;return f?this.toChatScreen(f):void 0}o.length||((d=this.config.router)==null?void 0:d.goToChatIfNoSessions)!==!1&&!s&&this.state.get().screen!=="chat"&&this.toChatScreen()})},this.toSessionsScreen=()=>{this.resetChat(),this.state.setPartial({screen:"sessions"})},this.toChatScreen=s=>{if(this.resetChat(),s){const o=this.sessionCtx.sessionsState.get().data.find(u=>u.id===s);if(!o)return;this.sessionCtx.sessionState.setPartial({session:o})}this.state.setPartial({screen:"chat"})},this.config=t,this.contactCtx=n,this.sessionCtx=r,this.resetChat=i,this.state=new Yo({screen:this.contactCtx.shouldCollectData()?"welcome":(a=this.config.router)!=null&&a.chatScreenOnly?"chat":"sessions"}),this.registerRoutingListener()}}class x8{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 Ui=class Ui{constructor({config:t,storage:n,modes:r}){if(this.modes=[],this.resetChat=()=>{this.sessionCtx.reset(),this.messageCtx.reset()},!Ui.pollingIntervalsSeconds)throw Error("Widget polling values are not defined, did you call WidgetCtx.initialize()");this.config=t,this.api=new u_({config:t}),this.storageCtx=n?new x8({storage:n}):void 0,this.modes=r,this.contactCtx=new g8({api:this.api,config:this.config,storageCtx:this.storageCtx}),this.sessionCtx=new b8({api:this.api,contactCtx:this.contactCtx,sessionsPollingIntervalSeconds:Ui.pollingIntervalsSeconds.sessions}),this.messageCtx=new y8({config:this.config,api:this.api,sessionCtx:this.sessionCtx,contactCtx:this.contactCtx}),this.activeSessionPollingCtx=new f8({api:this.api,config:this.config,sessionCtx:this.sessionCtx,messageCtx:this.messageCtx,sessionPollingIntervalSeconds:Ui.pollingIntervalsSeconds.session}),this.routerCtx=new v8({config:this.config,contactCtx:this.contactCtx,sessionCtx:this.sessionCtx,resetChat:this.resetChat})}};Ui.pollingIntervalsSeconds=null,Ui.initialize=async({config:t,storage:n})=>{var i,a,s;const r=await new u_({config:t}).getExternalWidgetConfig();return Ui.pollingIntervalsSeconds={session:((i=r.data)==null?void 0:i.sessionPollingIntervalSeconds)||10,sessions:((a=r.data)==null?void 0:a.sessionsPollingIntervalSeconds)||60},new Ui({config:t,storage:n,modes:((s=r.data)==null?void 0:s.modes)||[]})};let Ng=Ui;function ya(e,t){console.error(`Missing case for ${e} in ${t}`)}class E8{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}}const f_=v.createContext(null);function T8({options:e,children:t,components:n,storage:r,loadingComponent:i}){const a=v.useRef(null),s=v.useRef(!1),[o,u]=v.useState(null),l=v.useMemo(()=>new E8({components:n}),[n]);return v.useEffect(()=>{s.current||(s.current=!0,Ng.initialize({config:e,storage:r}).then(u))},[]),o?E.jsx(f_.Provider,{value:{widgetCtx:o,config:e,components:n,componentStore:l,version:b2,contentIframeRef:a},children:t}):i||null}function an(){const e=v.useContext(f_);if(!e)throw new Error("useWidget must be used within a WidgetProvider");return e}function Jt(){const{config:e}=an();return e}function Bl(e){return v.useSyncExternalStore(e.subscribe,e.get,e.get)}function w8(){const{widgetCtx:e}=an();return{contactState:Bl(e.contactCtx.state),createUnverifiedContact:e.contactCtx.createUnverifiedContact}}function va(){const{widgetCtx:e}=an();return{messagesState:Bl(e.messageCtx.state),sendMessage:e.messageCtx.sendMessage}}function Ti(){const{widgetCtx:e}=an(),{oneOpenSessionAllowed:t}=Jt(),n=Bl(e.sessionCtx.sessionState),r=Bl(e.sessionCtx.sessionsState),{openSessions:i,closedSessions:a}=v.useMemo(()=>({openSessions:r.data.filter(o=>o.isOpened===!0),closedSessions:r.data.filter(o=>o.isOpened===!1)}),[r.data]),s=v.useMemo(()=>t?i.length===0:!0,[t,i.length]);return{sessionState:n,sessionsState:r,loadMoreSessions:e.sessionCtx.loadMoreSessions,resolveSession:e.sessionCtx.resolveSession,createStateCheckpoint:e.sessionCtx.createStateCheckpoint,openSessions:i,closedSessions:a,canCreateNewSession:s}}function h_(){var s;const{sessionState:e}=Ti(),{messagesState:t}=va(),n=((s=e.session)==null?void 0:s.assignee.kind)==="ai",r=t.messages.length>0?t.messages[t.messages.length-1]:null,i=(r==null?void 0:r.type)==="FROM_USER";return{isAwaitingBotReply:(n||e.isCreatingSession)&&(t.isSendingMessage||i)}}var p_={exports:{}},m_={};/**
92
+ ${a}`:a})();return{id:Rg(),type:"FROM_USER",content:o,deliveredAt:new Date().toISOString(),attachments:s,timestamp:new Date().toISOString()}},this.toBotMessage=a=>{var s;return a.success&&a.autopilotResponse?{type:"FROM_BOT",id:a.autopilotResponse.id||Rg(),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:a.autopilotResponse.value.content,action:(s=a.uiResponse)!=null&&s.value.name?{name:a.uiResponse.value.name,data:a.uiResponse.value.request_response}:void 0}}:null},this.toBotErrorMessage=a=>({type:"FROM_BOT",id:Rg(),timestamp:new Date().toISOString(),component:"TEXT",data:{message:a,variant:"error",action:void 0}}),this.config=t,this.api=n,this.sessionCtx=r,this.contactCtx=i}}class v8{constructor({config:t,contactCtx:n,sessionCtx:r,resetChat:i}){var a;this.registerRoutingListener=()=>{this.contactCtx.state.subscribe(({contact:s})=>{var o;s!=null&&s.token&&this.state.get().screen==="welcome"&&this.state.setPartial({screen:(o=this.config.router)!=null&&o.chatScreenOnly?"chat":"sessions"})}),this.sessionCtx.sessionsState.subscribe(({isInitialFetchLoading:s,data:o})=>{var u,l,c,d;if((u=this.config.router)!=null&&u.chatScreenOnly&&!((l=this.sessionCtx.sessionState.get().session)!=null&&l.id)){const f=(c=o.find(h=>h.isOpened))==null?void 0:c.id;return f?this.toChatScreen(f):void 0}o.length||((d=this.config.router)==null?void 0:d.goToChatIfNoSessions)!==!1&&!s&&this.state.get().screen!=="chat"&&this.toChatScreen()})},this.toSessionsScreen=()=>{this.resetChat(),this.state.setPartial({screen:"sessions"})},this.toChatScreen=s=>{if(this.resetChat(),s){const o=this.sessionCtx.sessionsState.get().data.find(u=>u.id===s);if(!o)return;this.sessionCtx.sessionState.setPartial({session:o})}this.state.setPartial({screen:"chat"})},this.config=t,this.contactCtx=n,this.sessionCtx=r,this.resetChat=i,this.state=new Yo({screen:this.contactCtx.shouldCollectData()?"welcome":(a=this.config.router)!=null&&a.chatScreenOnly?"chat":"sessions"}),this.registerRoutingListener()}}class x8{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 Ui=class Ui{constructor({config:t,storage:n,modes:r}){if(this.modes=[],this.resetChat=()=>{this.sessionCtx.reset(),this.messageCtx.reset()},!Ui.pollingIntervalsSeconds)throw Error("Widget polling values are not defined, did you call WidgetCtx.initialize()");this.config=t,this.api=new u_({config:t}),this.storageCtx=n?new x8({storage:n}):void 0,this.modes=r,this.contactCtx=new g8({api:this.api,config:this.config,storageCtx:this.storageCtx}),this.sessionCtx=new b8({config:this.config,api:this.api,contactCtx:this.contactCtx,sessionsPollingIntervalSeconds:Ui.pollingIntervalsSeconds.sessions}),this.messageCtx=new y8({config:this.config,api:this.api,sessionCtx:this.sessionCtx,contactCtx:this.contactCtx}),this.activeSessionPollingCtx=new f8({api:this.api,config:this.config,sessionCtx:this.sessionCtx,messageCtx:this.messageCtx,sessionPollingIntervalSeconds:Ui.pollingIntervalsSeconds.session}),this.routerCtx=new v8({config:this.config,contactCtx:this.contactCtx,sessionCtx:this.sessionCtx,resetChat:this.resetChat})}};Ui.pollingIntervalsSeconds=null,Ui.initialize=async({config:t,storage:n})=>{var i,a,s;const r=await new u_({config:t}).getExternalWidgetConfig();return Ui.pollingIntervalsSeconds={session:((i=r.data)==null?void 0:i.sessionPollingIntervalSeconds)||10,sessions:((a=r.data)==null?void 0:a.sessionsPollingIntervalSeconds)||60},new Ui({config:t,storage:n,modes:((s=r.data)==null?void 0:s.modes)||[]})};let Ng=Ui;function ya(e,t){console.error(`Missing case for ${e} in ${t}`)}class E8{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}}const f_=v.createContext(null);function T8({options:e,children:t,components:n,storage:r,loadingComponent:i}){const a=v.useRef(null),s=v.useRef(!1),[o,u]=v.useState(null),l=v.useMemo(()=>new E8({components:n}),[n]);return v.useEffect(()=>{s.current||(s.current=!0,Ng.initialize({config:e,storage:r}).then(u))},[]),o?E.jsx(f_.Provider,{value:{widgetCtx:o,config:e,components:n,componentStore:l,version:b2,contentIframeRef:a},children:t}):i||null}function an(){const e=v.useContext(f_);if(!e)throw new Error("useWidget must be used within a WidgetProvider");return e}function Jt(){const{config:e}=an();return e}function Bl(e){return v.useSyncExternalStore(e.subscribe,e.get,e.get)}function w8(){const{widgetCtx:e}=an();return{contactState:Bl(e.contactCtx.state),createUnverifiedContact:e.contactCtx.createUnverifiedContact}}function va(){const{widgetCtx:e}=an();return{messagesState:Bl(e.messageCtx.state),sendMessage:e.messageCtx.sendMessage}}function Ti(){const{widgetCtx:e}=an(),{oneOpenSessionAllowed:t}=Jt(),n=Bl(e.sessionCtx.sessionState),r=Bl(e.sessionCtx.sessionsState),{openSessions:i,closedSessions:a}=v.useMemo(()=>({openSessions:r.data.filter(o=>o.isOpened===!0),closedSessions:r.data.filter(o=>o.isOpened===!1)}),[r.data]),s=v.useMemo(()=>t?i.length===0:!0,[t,i.length]);return{sessionState:n,sessionsState:r,loadMoreSessions:e.sessionCtx.loadMoreSessions,resolveSession:e.sessionCtx.resolveSession,createStateCheckpoint:e.sessionCtx.createStateCheckpoint,openSessions:i,closedSessions:a,canCreateNewSession:s}}function h_(){var s;const{sessionState:e}=Ti(),{messagesState:t}=va(),n=((s=e.session)==null?void 0:s.assignee.kind)==="ai",r=t.messages.length>0?t.messages[t.messages.length-1]:null,i=(r==null?void 0:r.type)==="FROM_USER";return{isAwaitingBotReply:(n||e.isCreatingSession)&&(t.isSendingMessage||i)}}var p_={exports:{}},m_={};/**
93
93
  * @license React
94
94
  * use-sync-external-store-shim.production.min.js
95
95
  *