function vp(e,t){for(var n=0;nr[o]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))r(o);new MutationObserver(o=>{for(const i of o)if(i.type==="childList")for(const l of i.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&r(l)}).observe(document,{childList:!0,subtree:!0});function n(o){const i={};return o.integrity&&(i.integrity=o.integrity),o.referrerPolicy&&(i.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?i.credentials="include":o.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function r(o){if(o.ep)return;o.ep=!0;const i=n(o);fetch(o.href,i)}})();function wp(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var sc={exports:{}},li={},ac={exports:{}},$={};/** * @license React * react.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var Br=Symbol.for("react.element"),Sp=Symbol.for("react.portal"),Ep=Symbol.for("react.fragment"),kp=Symbol.for("react.strict_mode"),xp=Symbol.for("react.profiler"),Cp=Symbol.for("react.provider"),Tp=Symbol.for("react.context"),Pp=Symbol.for("react.forward_ref"),Rp=Symbol.for("react.suspense"),Np=Symbol.for("react.memo"),_p=Symbol.for("react.lazy"),Ns=Symbol.iterator;function Lp(e){return e===null||typeof e!="object"?null:(e=Ns&&e[Ns]||e["@@iterator"],typeof e=="function"?e:null)}var cc={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},fc=Object.assign,dc={};function Vn(e,t,n){this.props=e,this.context=t,this.refs=dc,this.updater=n||cc}Vn.prototype.isReactComponent={};Vn.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};Vn.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function pc(){}pc.prototype=Vn.prototype;function ku(e,t,n){this.props=e,this.context=t,this.refs=dc,this.updater=n||cc}var xu=ku.prototype=new pc;xu.constructor=ku;fc(xu,Vn.prototype);xu.isPureReactComponent=!0;var _s=Array.isArray,mc=Object.prototype.hasOwnProperty,Cu={current:null},hc={key:!0,ref:!0,__self:!0,__source:!0};function yc(e,t,n){var r,o={},i=null,l=null;if(t!=null)for(r in t.ref!==void 0&&(l=t.ref),t.key!==void 0&&(i=""+t.key),t)mc.call(t,r)&&!hc.hasOwnProperty(r)&&(o[r]=t[r]);var u=arguments.length-2;if(u===1)o.children=n;else if(1>>1,Y=_[z];if(0>>1;zo(lt,O))Heo(ut,lt)?(_[z]=ut,_[He]=O,z=He):(_[z]=lt,_[it]=O,z=it);else if(Heo(ut,O))_[z]=ut,_[He]=O,z=He;else break e}}return F}function o(_,F){var O=_.sortIndex-F.sortIndex;return O!==0?O:_.id-F.id}if(typeof performance=="object"&&typeof performance.now=="function"){var i=performance;e.unstable_now=function(){return i.now()}}else{var l=Date,u=l.now();e.unstable_now=function(){return l.now()-u}}var s=[],a=[],c=1,p=null,m=3,g=!1,y=!1,v=!1,k=typeof setTimeout=="function"?setTimeout:null,d=typeof clearTimeout=="function"?clearTimeout:null,f=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function h(_){for(var F=n(a);F!==null;){if(F.callback===null)r(a);else if(F.startTime<=_)r(a),F.sortIndex=F.expirationTime,t(s,F);else break;F=n(a)}}function E(_){if(v=!1,h(_),!y)if(n(s)!==null)y=!0,St(x);else{var F=n(a);F!==null&&Et(E,F.startTime-_)}}function x(_,F){y=!1,v&&(v=!1,d(N),N=-1),g=!0;var O=m;try{for(h(F),p=n(s);p!==null&&(!(p.expirationTime>F)||_&&!ee());){var z=p.callback;if(typeof z=="function"){p.callback=null,m=p.priorityLevel;var Y=z(p.expirationTime<=F);F=e.unstable_now(),typeof Y=="function"?p.callback=Y:p===n(s)&&r(s),h(F)}else r(s);p=n(s)}if(p!==null)var te=!0;else{var it=n(a);it!==null&&Et(E,it.startTime-F),te=!1}return te}finally{p=null,m=O,g=!1}}var R=!1,P=null,N=-1,j=5,U=-1;function ee(){return!(e.unstable_now()-U_||125<_?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):j=0<_?Math.floor(1e3/_):5},e.unstable_getCurrentPriorityLevel=function(){return m},e.unstable_getFirstCallbackNode=function(){return n(s)},e.unstable_next=function(_){switch(m){case 1:case 2:case 3:var F=3;break;default:F=m}var O=m;m=F;try{return _()}finally{m=O}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(_,F){switch(_){case 1:case 2:case 3:case 4:case 5:break;default:_=3}var O=m;m=_;try{return F()}finally{m=O}},e.unstable_scheduleCallback=function(_,F,O){var z=e.unstable_now();switch(typeof O=="object"&&O!==null?(O=O.delay,O=typeof O=="number"&&0z?(_.sortIndex=O,t(a,_),n(s)===null&&_===n(a)&&(v?(d(N),N=-1):v=!0,Et(E,O-z))):(_.sortIndex=Y,t(s,_),y||g||(y=!0,St(x))),_},e.unstable_shouldYield=ee,e.unstable_wrapCallback=function(_){var F=m;return function(){var O=m;m=F;try{return _.apply(this,arguments)}finally{m=O}}}})(Ec);Sc.exports=Ec;var Bp=Sc.exports;/** * @license React * react-dom.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var Hp=w,Le=Bp;function C(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),gl=Object.prototype.hasOwnProperty,bp=/^[: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]*$/,Fs={},Us={};function Vp(e){return gl.call(Us,e)?!0:gl.call(Fs,e)?!1:bp.test(e)?Us[e]=!0:(Fs[e]=!0,!1)}function Wp(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function Qp(e,t,n,r){if(t===null||typeof t>"u"||Wp(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function ge(e,t,n,r,o,i,l){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=o,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=l}var se={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){se[e]=new ge(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];se[t]=new ge(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){se[e]=new ge(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){se[e]=new ge(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){se[e]=new ge(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){se[e]=new ge(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){se[e]=new ge(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){se[e]=new ge(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){se[e]=new ge(e,5,!1,e.toLowerCase(),null,!1,!1)});var Pu=/[\-:]([a-z])/g;function Ru(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(Pu,Ru);se[t]=new ge(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(Pu,Ru);se[t]=new ge(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(Pu,Ru);se[t]=new ge(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){se[e]=new ge(e,1,!1,e.toLowerCase(),null,!1,!1)});se.xlinkHref=new ge("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){se[e]=new ge(e,1,!1,e.toLowerCase(),null,!0,!0)});function Nu(e,t,n,r){var o=se.hasOwnProperty(t)?se[t]:null;(o!==null?o.type!==0:r||!(2u||o[l]!==i[u]){var s=` `+o[l].replace(" at new "," at ");return e.displayName&&s.includes("")&&(s=s.replace("",e.displayName)),s}while(1<=l&&0<=u);break}}}finally{$i=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?ur(e):""}function Kp(e){switch(e.tag){case 5:return ur(e.type);case 16:return ur("Lazy");case 13:return ur("Suspense");case 19:return ur("SuspenseList");case 0:case 2:case 15:return e=Mi(e.type,!1),e;case 11:return e=Mi(e.type.render,!1),e;case 1:return e=Mi(e.type,!0),e;default:return""}}function El(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Sn:return"Fragment";case wn:return"Portal";case vl:return"Profiler";case _u:return"StrictMode";case wl:return"Suspense";case Sl:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Cc:return(e.displayName||"Context")+".Consumer";case xc:return(e._context.displayName||"Context")+".Provider";case Lu:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Ou:return t=e.displayName||null,t!==null?t:El(e.type)||"Memo";case Ct:t=e._payload,e=e._init;try{return El(e(t))}catch{}}return null}function qp(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return El(t);case 8:return t===_u?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function zt(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Pc(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Gp(e){var t=Pc(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 o=n.get,i=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(l){r=""+l,i.call(this,l)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(l){r=""+l},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Jr(e){e._valueTracker||(e._valueTracker=Gp(e))}function Rc(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=Pc(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Lo(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function kl(e,t){var n=t.checked;return q({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Ds(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=zt(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function Nc(e,t){t=t.checked,t!=null&&Nu(e,"checked",t,!1)}function xl(e,t){Nc(e,t);var n=zt(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?Cl(e,t.type,n):t.hasOwnProperty("defaultValue")&&Cl(e,t.type,zt(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function js(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function Cl(e,t,n){(t!=="number"||Lo(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var sr=Array.isArray;function On(e,t,n,r){if(e=e.options,t){t={};for(var o=0;o"+t.valueOf().toString()+"",t=Zr.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Cr(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var dr={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Xp=["Webkit","ms","Moz","O"];Object.keys(dr).forEach(function(e){Xp.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),dr[t]=dr[e]})});function Fc(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||dr.hasOwnProperty(e)&&dr[e]?(""+t).trim():t+"px"}function Uc(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,o=Fc(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}}var Yp=q({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Rl(e,t){if(t){if(Yp[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(C(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(C(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(C(61))}if(t.style!=null&&typeof t.style!="object")throw Error(C(62))}}function Nl(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var _l=null;function Fu(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Ll=null,Fn=null,Un=null;function Is(e){if(e=Vr(e)){if(typeof Ll!="function")throw Error(C(280));var t=e.stateNode;t&&(t=fi(t),Ll(e.stateNode,e.type,t))}}function Ac(e){Fn?Un?Un.push(e):Un=[e]:Fn=e}function Dc(){if(Fn){var e=Fn,t=Un;if(Un=Fn=null,Is(e),t)for(e=0;e>>=0,e===0?32:31-(sm(e)/am|0)|0}var eo=64,to=4194304;function ar(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Ao(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,o=e.suspendedLanes,i=e.pingedLanes,l=n&268435455;if(l!==0){var u=l&~o;u!==0?r=ar(u):(i&=l,i!==0&&(r=ar(i)))}else l=n&~o,l!==0?r=ar(l):i!==0&&(r=ar(i));if(r===0)return 0;if(t!==0&&t!==r&&!(t&o)&&(o=r&-r,i=t&-t,o>=i||o===16&&(i&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function Hr(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-qe(t),e[t]=n}function pm(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0=mr),qs=" ",Gs=!1;function tf(e,t){switch(e){case"keyup":return Bm.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function nf(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var En=!1;function bm(e,t){switch(e){case"compositionend":return nf(t);case"keypress":return t.which!==32?null:(Gs=!0,qs);case"textInput":return e=t.data,e===qs&&Gs?null:e;default:return null}}function Vm(e,t){if(En)return e==="compositionend"||!zu&&tf(e,t)?(e=Zc(),vo=$u=_t=null,En=!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)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=Zs(n)}}function uf(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?uf(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function sf(){for(var e=window,t=Lo();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Lo(e.document)}return t}function Bu(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 Zm(e){var t=sf(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&uf(n.ownerDocument.documentElement,n)){if(r!==null&&Bu(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var o=n.textContent.length,i=Math.min(r.start,o);r=r.end===void 0?i:Math.min(r.end,o),!e.extend&&i>r&&(o=r,r=i,i=o),o=ea(n,i);var l=ea(n,r);o&&l&&(e.rangeCount!==1||e.anchorNode!==o.node||e.anchorOffset!==o.offset||e.focusNode!==l.node||e.focusOffset!==l.offset)&&(t=t.createRange(),t.setStart(o.node,o.offset),e.removeAllRanges(),i>r?(e.addRange(t),e.extend(l.node,l.offset)):(t.setEnd(l.node,l.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,kn=null,jl=null,yr=null,$l=!1;function ta(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;$l||kn==null||kn!==Lo(r)||(r=kn,"selectionStart"in r&&Bu(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}),yr&&Lr(yr,r)||(yr=r,r=$o(jl,"onSelect"),0Tn||(e.current=bl[Tn],bl[Tn]=null,Tn--)}function B(e,t){Tn++,bl[Tn]=e.current,e.current=t}var Bt={},de=Vt(Bt),Se=Vt(!1),an=Bt;function Mn(e,t){var n=e.type.contextTypes;if(!n)return Bt;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var o={},i;for(i in n)o[i]=t[i];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function Ee(e){return e=e.childContextTypes,e!=null}function Io(){b(Se),b(de)}function sa(e,t,n){if(de.current!==Bt)throw Error(C(168));B(de,t),B(Se,n)}function gf(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var o in r)if(!(o in t))throw Error(C(108,qp(e)||"Unknown",o));return q({},n,r)}function zo(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Bt,an=de.current,B(de,e),B(Se,Se.current),!0}function aa(e,t,n){var r=e.stateNode;if(!r)throw Error(C(169));n?(e=gf(e,t,an),r.__reactInternalMemoizedMergedChildContext=e,b(Se),b(de),B(de,e)):b(Se),B(Se,n)}var at=null,di=!1,Ji=!1;function vf(e){at===null?at=[e]:at.push(e)}function fh(e){di=!0,vf(e)}function Wt(){if(!Ji&&at!==null){Ji=!0;var e=0,t=I;try{var n=at;for(I=1;e>=l,o-=l,ft=1<<32-qe(t)+o|n<N?(j=P,P=null):j=P.sibling;var U=m(d,P,h[N],E);if(U===null){P===null&&(P=j);break}e&&P&&U.alternate===null&&t(d,P),f=i(U,f,N),R===null?x=U:R.sibling=U,R=U,P=j}if(N===h.length)return n(d,P),V&&qt(d,N),x;if(P===null){for(;NN?(j=P,P=null):j=P.sibling;var ee=m(d,P,U.value,E);if(ee===null){P===null&&(P=j);break}e&&P&&ee.alternate===null&&t(d,P),f=i(ee,f,N),R===null?x=ee:R.sibling=ee,R=ee,P=j}if(U.done)return n(d,P),V&&qt(d,N),x;if(P===null){for(;!U.done;N++,U=h.next())U=p(d,U.value,E),U!==null&&(f=i(U,f,N),R===null?x=U:R.sibling=U,R=U);return V&&qt(d,N),x}for(P=r(d,P);!U.done;N++,U=h.next())U=g(P,d,N,U.value,E),U!==null&&(e&&U.alternate!==null&&P.delete(U.key===null?N:U.key),f=i(U,f,N),R===null?x=U:R.sibling=U,R=U);return e&&P.forEach(function(Be){return t(d,Be)}),V&&qt(d,N),x}function k(d,f,h,E){if(typeof h=="object"&&h!==null&&h.type===Sn&&h.key===null&&(h=h.props.children),typeof h=="object"&&h!==null){switch(h.$$typeof){case Yr:e:{for(var x=h.key,R=f;R!==null;){if(R.key===x){if(x=h.type,x===Sn){if(R.tag===7){n(d,R.sibling),f=o(R,h.props.children),f.return=d,d=f;break e}}else if(R.elementType===x||typeof x=="object"&&x!==null&&x.$$typeof===Ct&&da(x)===R.type){n(d,R.sibling),f=o(R,h.props),f.ref=nr(d,R,h),f.return=d,d=f;break e}n(d,R);break}else t(d,R);R=R.sibling}h.type===Sn?(f=ln(h.props.children,d.mode,E,h.key),f.return=d,d=f):(E=Po(h.type,h.key,h.props,null,d.mode,E),E.ref=nr(d,f,h),E.return=d,d=E)}return l(d);case wn:e:{for(R=h.key;f!==null;){if(f.key===R)if(f.tag===4&&f.stateNode.containerInfo===h.containerInfo&&f.stateNode.implementation===h.implementation){n(d,f.sibling),f=o(f,h.children||[]),f.return=d,d=f;break e}else{n(d,f);break}else t(d,f);f=f.sibling}f=ll(h,d.mode,E),f.return=d,d=f}return l(d);case Ct:return R=h._init,k(d,f,R(h._payload),E)}if(sr(h))return y(d,f,h,E);if(Yn(h))return v(d,f,h,E);so(d,h)}return typeof h=="string"&&h!==""||typeof h=="number"?(h=""+h,f!==null&&f.tag===6?(n(d,f.sibling),f=o(f,h),f.return=d,d=f):(n(d,f),f=il(h,d.mode,E),f.return=d,d=f),l(d)):n(d,f)}return k}var zn=kf(!0),xf=kf(!1),bo=Vt(null),Vo=null,Nn=null,Wu=null;function Qu(){Wu=Nn=Vo=null}function Ku(e){var t=bo.current;b(bo),e._currentValue=t}function Ql(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 Dn(e,t){Vo=e,Wu=Nn=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(we=!0),e.firstContext=null)}function Me(e){var t=e._currentValue;if(Wu!==e)if(e={context:e,memoizedValue:t,next:null},Nn===null){if(Vo===null)throw Error(C(308));Nn=e,Vo.dependencies={lanes:0,firstContext:e}}else Nn=Nn.next=e;return t}var Zt=null;function qu(e){Zt===null?Zt=[e]:Zt.push(e)}function Cf(e,t,n,r){var o=t.interleaved;return o===null?(n.next=n,qu(t)):(n.next=o.next,o.next=n),t.interleaved=n,gt(e,r)}function gt(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var Tt=!1;function Gu(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Tf(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function pt(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function jt(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,M&2){var o=r.pending;return o===null?t.next=t:(t.next=o.next,o.next=t),r.pending=t,gt(e,n)}return o=r.interleaved,o===null?(t.next=t,qu(r)):(t.next=o.next,o.next=t),r.interleaved=t,gt(e,n)}function So(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Au(e,n)}}function pa(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var o=null,i=null;if(n=n.firstBaseUpdate,n!==null){do{var l={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};i===null?o=i=l:i=i.next=l,n=n.next}while(n!==null);i===null?o=i=t:i=i.next=t}else o=i=t;n={baseState:r.baseState,firstBaseUpdate:o,lastBaseUpdate:i,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function Wo(e,t,n,r){var o=e.updateQueue;Tt=!1;var i=o.firstBaseUpdate,l=o.lastBaseUpdate,u=o.shared.pending;if(u!==null){o.shared.pending=null;var s=u,a=s.next;s.next=null,l===null?i=a:l.next=a,l=s;var c=e.alternate;c!==null&&(c=c.updateQueue,u=c.lastBaseUpdate,u!==l&&(u===null?c.firstBaseUpdate=a:u.next=a,c.lastBaseUpdate=s))}if(i!==null){var p=o.baseState;l=0,c=a=s=null,u=i;do{var m=u.lane,g=u.eventTime;if((r&m)===m){c!==null&&(c=c.next={eventTime:g,lane:0,tag:u.tag,payload:u.payload,callback:u.callback,next:null});e:{var y=e,v=u;switch(m=t,g=n,v.tag){case 1:if(y=v.payload,typeof y=="function"){p=y.call(g,p,m);break e}p=y;break e;case 3:y.flags=y.flags&-65537|128;case 0:if(y=v.payload,m=typeof y=="function"?y.call(g,p,m):y,m==null)break e;p=q({},p,m);break e;case 2:Tt=!0}}u.callback!==null&&u.lane!==0&&(e.flags|=64,m=o.effects,m===null?o.effects=[u]:m.push(u))}else g={eventTime:g,lane:m,tag:u.tag,payload:u.payload,callback:u.callback,next:null},c===null?(a=c=g,s=p):c=c.next=g,l|=m;if(u=u.next,u===null){if(u=o.shared.pending,u===null)break;m=u,u=m.next,m.next=null,o.lastBaseUpdate=m,o.shared.pending=null}}while(!0);if(c===null&&(s=p),o.baseState=s,o.firstBaseUpdate=a,o.lastBaseUpdate=c,t=o.shared.interleaved,t!==null){o=t;do l|=o.lane,o=o.next;while(o!==t)}else i===null&&(o.shared.lanes=0);dn|=l,e.lanes=l,e.memoizedState=p}}function ma(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;tn?n:4,e(!0);var r=el.transition;el.transition={};try{e(!1),t()}finally{I=n,el.transition=r}}function Hf(){return Ie().memoizedState}function hh(e,t,n){var r=Mt(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},bf(e))Vf(t,n);else if(n=Cf(e,t,n,r),n!==null){var o=me();Ge(n,e,r,o),Wf(n,t,r)}}function yh(e,t,n){var r=Mt(e),o={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(bf(e))Vf(t,o);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var l=t.lastRenderedState,u=i(l,n);if(o.hasEagerState=!0,o.eagerState=u,Xe(u,l)){var s=t.interleaved;s===null?(o.next=o,qu(t)):(o.next=s.next,s.next=o),t.interleaved=o;return}}catch{}finally{}n=Cf(e,t,o,r),n!==null&&(o=me(),Ge(n,e,r,o),Wf(n,t,r))}}function bf(e){var t=e.alternate;return e===K||t!==null&&t===K}function Vf(e,t){gr=Ko=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Wf(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Au(e,n)}}var qo={readContext:Me,useCallback:ae,useContext:ae,useEffect:ae,useImperativeHandle:ae,useInsertionEffect:ae,useLayoutEffect:ae,useMemo:ae,useReducer:ae,useRef:ae,useState:ae,useDebugValue:ae,useDeferredValue:ae,useTransition:ae,useMutableSource:ae,useSyncExternalStore:ae,useId:ae,unstable_isNewReconciler:!1},gh={readContext:Me,useCallback:function(e,t){return Ze().memoizedState=[e,t===void 0?null:t],e},useContext:Me,useEffect:ya,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,ko(4194308,4,$f.bind(null,t,e),n)},useLayoutEffect:function(e,t){return ko(4194308,4,e,t)},useInsertionEffect:function(e,t){return ko(4,2,e,t)},useMemo:function(e,t){var n=Ze();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Ze();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=hh.bind(null,K,e),[r.memoizedState,e]},useRef:function(e){var t=Ze();return e={current:e},t.memoizedState=e},useState:ha,useDebugValue:rs,useDeferredValue:function(e){return Ze().memoizedState=e},useTransition:function(){var e=ha(!1),t=e[0];return e=mh.bind(null,e[1]),Ze().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=K,o=Ze();if(V){if(n===void 0)throw Error(C(407));n=n()}else{if(n=t(),ie===null)throw Error(C(349));fn&30||_f(r,t,n)}o.memoizedState=n;var i={value:n,getSnapshot:t};return o.queue=i,ya(Of.bind(null,r,i,e),[e]),r.flags|=2048,Mr(9,Lf.bind(null,r,i,n,t),void 0,null),n},useId:function(){var e=Ze(),t=ie.identifierPrefix;if(V){var n=dt,r=ft;n=(r&~(1<<32-qe(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=jr++,0<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=l.createElement(n,{is:r.is}):(e=l.createElement(n),n==="select"&&(l=e,r.multiple?l.multiple=!0:r.size&&(l.size=r.size))):e=l.createElementNS(e,n),e[et]=t,e[Ur]=r,td(e,t,!1,!1),t.stateNode=e;e:{switch(l=Nl(n,r),n){case"dialog":H("cancel",e),H("close",e),o=r;break;case"iframe":case"object":case"embed":H("load",e),o=r;break;case"video":case"audio":for(o=0;obn&&(t.flags|=128,r=!0,rr(i,!1),t.lanes=4194304)}else{if(!r)if(e=Qo(l),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),rr(i,!0),i.tail===null&&i.tailMode==="hidden"&&!l.alternate&&!V)return ce(t),null}else 2*X()-i.renderingStartTime>bn&&n!==1073741824&&(t.flags|=128,r=!0,rr(i,!1),t.lanes=4194304);i.isBackwards?(l.sibling=t.child,t.child=l):(n=i.last,n!==null?n.sibling=l:t.child=l,i.last=l)}return i.tail!==null?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=X(),t.sibling=null,n=W.current,B(W,r?n&1|2:n&1),t):(ce(t),null);case 22:case 23:return as(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?Pe&1073741824&&(ce(t),t.subtreeFlags&6&&(t.flags|=8192)):ce(t),null;case 24:return null;case 25:return null}throw Error(C(156,t.tag))}function Th(e,t){switch(bu(t),t.tag){case 1:return Ee(t.type)&&Io(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Bn(),b(Se),b(de),Ju(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Yu(t),null;case 13:if(b(W),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(C(340));In()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return b(W),null;case 4:return Bn(),null;case 10:return Ku(t.type._context),null;case 22:case 23:return as(),null;case 24:return null;default:return null}}var co=!1,fe=!1,Ph=typeof WeakSet=="function"?WeakSet:Set,L=null;function _n(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){G(e,t,r)}else n.current=null}function tu(e,t,n){try{n()}catch(r){G(e,t,r)}}var Ra=!1;function Rh(e,t){if(Ml=Do,e=sf(),Bu(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 o=r.anchorOffset,i=r.focusNode;r=r.focusOffset;try{n.nodeType,i.nodeType}catch{n=null;break e}var l=0,u=-1,s=-1,a=0,c=0,p=e,m=null;t:for(;;){for(var g;p!==n||o!==0&&p.nodeType!==3||(u=l+o),p!==i||r!==0&&p.nodeType!==3||(s=l+r),p.nodeType===3&&(l+=p.nodeValue.length),(g=p.firstChild)!==null;)m=p,p=g;for(;;){if(p===e)break t;if(m===n&&++a===o&&(u=l),m===i&&++c===r&&(s=l),(g=p.nextSibling)!==null)break;p=m,m=p.parentNode}p=g}n=u===-1||s===-1?null:{start:u,end:s}}else n=null}n=n||{start:0,end:0}}else n=null;for(Il={focusedElem:e,selectionRange:n},Do=!1,L=t;L!==null;)if(t=L,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,L=e;else for(;L!==null;){t=L;try{var y=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(y!==null){var v=y.memoizedProps,k=y.memoizedState,d=t.stateNode,f=d.getSnapshotBeforeUpdate(t.elementType===t.type?v:Ve(t.type,v),k);d.__reactInternalSnapshotBeforeUpdate=f}break;case 3:var h=t.stateNode.containerInfo;h.nodeType===1?h.textContent="":h.nodeType===9&&h.documentElement&&h.removeChild(h.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(C(163))}}catch(E){G(t,t.return,E)}if(e=t.sibling,e!==null){e.return=t.return,L=e;break}L=t.return}return y=Ra,Ra=!1,y}function vr(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var o=r=r.next;do{if((o.tag&e)===e){var i=o.destroy;o.destroy=void 0,i!==void 0&&tu(t,n,i)}o=o.next}while(o!==r)}}function hi(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function nu(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function od(e){var t=e.alternate;t!==null&&(e.alternate=null,od(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[et],delete t[Ur],delete t[Hl],delete t[ah],delete t[ch])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function id(e){return e.tag===5||e.tag===3||e.tag===4}function Na(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||id(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function ru(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=Mo));else if(r!==4&&(e=e.child,e!==null))for(ru(e,t,n),e=e.sibling;e!==null;)ru(e,t,n),e=e.sibling}function ou(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(ou(e,t,n),e=e.sibling;e!==null;)ou(e,t,n),e=e.sibling}var le=null,We=!1;function kt(e,t,n){for(n=n.child;n!==null;)ld(e,t,n),n=n.sibling}function ld(e,t,n){if(tt&&typeof tt.onCommitFiberUnmount=="function")try{tt.onCommitFiberUnmount(ui,n)}catch{}switch(n.tag){case 5:fe||_n(n,t);case 6:var r=le,o=We;le=null,kt(e,t,n),le=r,We=o,le!==null&&(We?(e=le,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):le.removeChild(n.stateNode));break;case 18:le!==null&&(We?(e=le,n=n.stateNode,e.nodeType===8?Yi(e.parentNode,n):e.nodeType===1&&Yi(e,n),Nr(e)):Yi(le,n.stateNode));break;case 4:r=le,o=We,le=n.stateNode.containerInfo,We=!0,kt(e,t,n),le=r,We=o;break;case 0:case 11:case 14:case 15:if(!fe&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){o=r=r.next;do{var i=o,l=i.destroy;i=i.tag,l!==void 0&&(i&2||i&4)&&tu(n,t,l),o=o.next}while(o!==r)}kt(e,t,n);break;case 1:if(!fe&&(_n(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(u){G(n,t,u)}kt(e,t,n);break;case 21:kt(e,t,n);break;case 22:n.mode&1?(fe=(r=fe)||n.memoizedState!==null,kt(e,t,n),fe=r):kt(e,t,n);break;default:kt(e,t,n)}}function _a(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new Ph),t.forEach(function(r){var o=jh.bind(null,e,r);n.has(r)||(n.add(r),r.then(o,o))})}}function be(e,t){var n=t.deletions;if(n!==null)for(var r=0;ro&&(o=l),r&=~i}if(r=o,r=X()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*_h(r/1960))-r,10e?16:e,Lt===null)var r=!1;else{if(e=Lt,Lt=null,Yo=0,M&6)throw Error(C(331));var o=M;for(M|=4,L=e.current;L!==null;){var i=L,l=i.child;if(L.flags&16){var u=i.deletions;if(u!==null){for(var s=0;sX()-us?on(e,0):ls|=n),ke(e,t)}function md(e,t){t===0&&(e.mode&1?(t=to,to<<=1,!(to&130023424)&&(to=4194304)):t=1);var n=me();e=gt(e,t),e!==null&&(Hr(e,t,n),ke(e,n))}function Dh(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),md(e,n)}function jh(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,o=e.memoizedState;o!==null&&(n=o.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(C(314))}r!==null&&r.delete(t),md(e,n)}var hd;hd=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Se.current)we=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return we=!1,xh(e,t,n);we=!!(e.flags&131072)}else we=!1,V&&t.flags&1048576&&wf(t,Ho,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;xo(e,t),e=t.pendingProps;var o=Mn(t,de.current);Dn(t,n),o=es(null,t,r,e,o,n);var i=ts();return t.flags|=1,typeof o=="object"&&o!==null&&typeof o.render=="function"&&o.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Ee(r)?(i=!0,zo(t)):i=!1,t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,Gu(t),o.updater=mi,t.stateNode=o,o._reactInternals=t,ql(t,r,e,n),t=Yl(null,t,r,!0,i,n)):(t.tag=0,V&&i&&Hu(t),pe(null,t,o,n),t=t.child),t;case 16:r=t.elementType;e:{switch(xo(e,t),e=t.pendingProps,o=r._init,r=o(r._payload),t.type=r,o=t.tag=Mh(r),e=Ve(r,e),o){case 0:t=Xl(null,t,r,e,n);break e;case 1:t=Ca(null,t,r,e,n);break e;case 11:t=ka(null,t,r,e,n);break e;case 14:t=xa(null,t,r,Ve(r.type,e),n);break e}throw Error(C(306,r,""))}return t;case 0:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Ve(r,o),Xl(e,t,r,o,n);case 1:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Ve(r,o),Ca(e,t,r,o,n);case 3:e:{if(Jf(t),e===null)throw Error(C(387));r=t.pendingProps,i=t.memoizedState,o=i.element,Tf(e,t),Wo(t,r,null,n);var l=t.memoizedState;if(r=l.element,i.isDehydrated)if(i={element:r,isDehydrated:!1,cache:l.cache,pendingSuspenseBoundaries:l.pendingSuspenseBoundaries,transitions:l.transitions},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){o=Hn(Error(C(423)),t),t=Ta(e,t,r,n,o);break e}else if(r!==o){o=Hn(Error(C(424)),t),t=Ta(e,t,r,n,o);break e}else for(Re=Dt(t.stateNode.containerInfo.firstChild),Ne=t,V=!0,Qe=null,n=xf(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(In(),r===o){t=vt(e,t,n);break e}pe(e,t,r,n)}t=t.child}return t;case 5:return Pf(t),e===null&&Wl(t),r=t.type,o=t.pendingProps,i=e!==null?e.memoizedProps:null,l=o.children,zl(r,o)?l=null:i!==null&&zl(r,i)&&(t.flags|=32),Yf(e,t),pe(e,t,l,n),t.child;case 6:return e===null&&Wl(t),null;case 13:return Zf(e,t,n);case 4:return Xu(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=zn(t,null,r,n):pe(e,t,r,n),t.child;case 11:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Ve(r,o),ka(e,t,r,o,n);case 7:return pe(e,t,t.pendingProps,n),t.child;case 8:return pe(e,t,t.pendingProps.children,n),t.child;case 12:return pe(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,o=t.pendingProps,i=t.memoizedProps,l=o.value,B(bo,r._currentValue),r._currentValue=l,i!==null)if(Xe(i.value,l)){if(i.children===o.children&&!Se.current){t=vt(e,t,n);break e}}else for(i=t.child,i!==null&&(i.return=t);i!==null;){var u=i.dependencies;if(u!==null){l=i.child;for(var s=u.firstContext;s!==null;){if(s.context===r){if(i.tag===1){s=pt(-1,n&-n),s.tag=2;var a=i.updateQueue;if(a!==null){a=a.shared;var c=a.pending;c===null?s.next=s:(s.next=c.next,c.next=s),a.pending=s}}i.lanes|=n,s=i.alternate,s!==null&&(s.lanes|=n),Ql(i.return,n,t),u.lanes|=n;break}s=s.next}}else if(i.tag===10)l=i.type===t.type?null:i.child;else if(i.tag===18){if(l=i.return,l===null)throw Error(C(341));l.lanes|=n,u=l.alternate,u!==null&&(u.lanes|=n),Ql(l,n,t),l=i.sibling}else l=i.child;if(l!==null)l.return=i;else for(l=i;l!==null;){if(l===t){l=null;break}if(i=l.sibling,i!==null){i.return=l.return,l=i;break}l=l.return}i=l}pe(e,t,o.children,n),t=t.child}return t;case 9:return o=t.type,r=t.pendingProps.children,Dn(t,n),o=Me(o),r=r(o),t.flags|=1,pe(e,t,r,n),t.child;case 14:return r=t.type,o=Ve(r,t.pendingProps),o=Ve(r.type,o),xa(e,t,r,o,n);case 15:return Gf(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Ve(r,o),xo(e,t),t.tag=1,Ee(r)?(e=!0,zo(t)):e=!1,Dn(t,n),Qf(t,r,o),ql(t,r,o,n),Yl(null,t,r,!0,e,n);case 19:return ed(e,t,n);case 22:return Xf(e,t,n)}throw Error(C(156,t.tag))};function yd(e,t){return Hc(e,t)}function $h(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function je(e,t,n,r){return new $h(e,t,n,r)}function fs(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Mh(e){if(typeof e=="function")return fs(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Lu)return 11;if(e===Ou)return 14}return 2}function It(e,t){var n=e.alternate;return n===null?(n=je(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Po(e,t,n,r,o,i){var l=2;if(r=e,typeof e=="function")fs(e)&&(l=1);else if(typeof e=="string")l=5;else e:switch(e){case Sn:return ln(n.children,o,i,t);case _u:l=8,o|=8;break;case vl:return e=je(12,n,t,o|2),e.elementType=vl,e.lanes=i,e;case wl:return e=je(13,n,t,o),e.elementType=wl,e.lanes=i,e;case Sl:return e=je(19,n,t,o),e.elementType=Sl,e.lanes=i,e;case Tc:return gi(n,o,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case xc:l=10;break e;case Cc:l=9;break e;case Lu:l=11;break e;case Ou:l=14;break e;case Ct:l=16,r=null;break e}throw Error(C(130,e==null?e:typeof e,""))}return t=je(l,n,t,o),t.elementType=e,t.type=r,t.lanes=i,t}function ln(e,t,n,r){return e=je(7,e,r,t),e.lanes=n,e}function gi(e,t,n,r){return e=je(22,e,r,t),e.elementType=Tc,e.lanes=n,e.stateNode={isHidden:!1},e}function il(e,t,n){return e=je(6,e,null,t),e.lanes=n,e}function ll(e,t,n){return t=je(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Ih(e,t,n,r,o){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=zi(0),this.expirationTimes=zi(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=zi(0),this.identifierPrefix=r,this.onRecoverableError=o,this.mutableSourceEagerHydrationData=null}function ds(e,t,n,r,o,i,l,u,s){return e=new Ih(e,t,n,u,s),t===1?(t=1,i===!0&&(t|=8)):t=0,i=je(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Gu(i),e}function zh(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Sd)}catch(e){console.error(e)}}Sd(),wc.exports=Oe;var Ed=wc.exports,$a=Ed;yl.createRoot=$a.createRoot,yl.hydrateRoot=$a.hydrateRoot;function kd(e,t){return function(){return e.apply(t,arguments)}}const{toString:Wh}=Object.prototype,{getPrototypeOf:ys}=Object,ki=(e=>t=>{const n=Wh.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Ye=e=>(e=e.toLowerCase(),t=>ki(t)===e),xi=e=>t=>typeof t===e,{isArray:Kn}=Array,zr=xi("undefined");function Qh(e){return e!==null&&!zr(e)&&e.constructor!==null&&!zr(e.constructor)&&_e(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const xd=Ye("ArrayBuffer");function Kh(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&xd(e.buffer),t}const qh=xi("string"),_e=xi("function"),Cd=xi("number"),Ci=e=>e!==null&&typeof e=="object",Gh=e=>e===!0||e===!1,Ro=e=>{if(ki(e)!=="object")return!1;const t=ys(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},Xh=Ye("Date"),Yh=Ye("File"),Jh=Ye("Blob"),Zh=Ye("FileList"),e0=e=>Ci(e)&&_e(e.pipe),t0=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||_e(e.append)&&((t=ki(e))==="formdata"||t==="object"&&_e(e.toString)&&e.toString()==="[object FormData]"))},n0=Ye("URLSearchParams"),[r0,o0,i0,l0]=["ReadableStream","Request","Response","Headers"].map(Ye),u0=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Qr(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,o;if(typeof e!="object"&&(e=[e]),Kn(e))for(r=0,o=e.length;r0;)if(o=n[r],t===o.toLowerCase())return o;return null}const tn=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Pd=e=>!zr(e)&&e!==tn;function au(){const{caseless:e}=Pd(this)&&this||{},t={},n=(r,o)=>{const i=e&&Td(t,o)||o;Ro(t[i])&&Ro(r)?t[i]=au(t[i],r):Ro(r)?t[i]=au({},r):Kn(r)?t[i]=r.slice():t[i]=r};for(let r=0,o=arguments.length;r(Qr(t,(o,i)=>{n&&_e(o)?e[i]=kd(o,n):e[i]=o},{allOwnKeys:r}),e),a0=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),c0=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},f0=(e,t,n,r)=>{let o,i,l;const u={};if(t=t||{},e==null)return t;do{for(o=Object.getOwnPropertyNames(e),i=o.length;i-- >0;)l=o[i],(!r||r(l,e,t))&&!u[l]&&(t[l]=e[l],u[l]=!0);e=n!==!1&&ys(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},d0=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},p0=e=>{if(!e)return null;if(Kn(e))return e;let t=e.length;if(!Cd(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},m0=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&ys(Uint8Array)),h0=(e,t)=>{const r=(e&&e[Symbol.iterator]).call(e);let o;for(;(o=r.next())&&!o.done;){const i=o.value;t.call(e,i[0],i[1])}},y0=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},g0=Ye("HTMLFormElement"),v0=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,o){return r.toUpperCase()+o}),Ma=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),w0=Ye("RegExp"),Rd=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};Qr(n,(o,i)=>{let l;(l=t(o,i,e))!==!1&&(r[i]=l||o)}),Object.defineProperties(e,r)},S0=e=>{Rd(e,(t,n)=>{if(_e(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(_e(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},E0=(e,t)=>{const n={},r=o=>{o.forEach(i=>{n[i]=!0})};return Kn(e)?r(e):r(String(e).split(t)),n},k0=()=>{},x0=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t,ul="abcdefghijklmnopqrstuvwxyz",Ia="0123456789",Nd={DIGIT:Ia,ALPHA:ul,ALPHA_DIGIT:ul+ul.toUpperCase()+Ia},C0=(e=16,t=Nd.ALPHA_DIGIT)=>{let n="";const{length:r}=t;for(;e--;)n+=t[Math.random()*r|0];return n};function T0(e){return!!(e&&_e(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}const P0=e=>{const t=new Array(10),n=(r,o)=>{if(Ci(r)){if(t.indexOf(r)>=0)return;if(!("toJSON"in r)){t[o]=r;const i=Kn(r)?[]:{};return Qr(r,(l,u)=>{const s=n(l,o+1);!zr(s)&&(i[u]=s)}),t[o]=void 0,i}}return r};return n(e,0)},R0=Ye("AsyncFunction"),N0=e=>e&&(Ci(e)||_e(e))&&_e(e.then)&&_e(e.catch),_d=((e,t)=>e?setImmediate:t?((n,r)=>(tn.addEventListener("message",({source:o,data:i})=>{o===tn&&i===n&&r.length&&r.shift()()},!1),o=>{r.push(o),tn.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",_e(tn.postMessage)),_0=typeof queueMicrotask<"u"?queueMicrotask.bind(tn):typeof process<"u"&&process.nextTick||_d,S={isArray:Kn,isArrayBuffer:xd,isBuffer:Qh,isFormData:t0,isArrayBufferView:Kh,isString:qh,isNumber:Cd,isBoolean:Gh,isObject:Ci,isPlainObject:Ro,isReadableStream:r0,isRequest:o0,isResponse:i0,isHeaders:l0,isUndefined:zr,isDate:Xh,isFile:Yh,isBlob:Jh,isRegExp:w0,isFunction:_e,isStream:e0,isURLSearchParams:n0,isTypedArray:m0,isFileList:Zh,forEach:Qr,merge:au,extend:s0,trim:u0,stripBOM:a0,inherits:c0,toFlatObject:f0,kindOf:ki,kindOfTest:Ye,endsWith:d0,toArray:p0,forEachEntry:h0,matchAll:y0,isHTMLForm:g0,hasOwnProperty:Ma,hasOwnProp:Ma,reduceDescriptors:Rd,freezeMethods:S0,toObjectSet:E0,toCamelCase:v0,noop:k0,toFiniteNumber:x0,findKey:Td,global:tn,isContextDefined:Pd,ALPHABET:Nd,generateString:C0,isSpecCompliantForm:T0,toJSONObject:P0,isAsyncFn:R0,isThenable:N0,setImmediate:_d,asap:_0};function D(e,t,n,r,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),o&&(this.response=o,this.status=o.status?o.status:null)}S.inherits(D,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:S.toJSONObject(this.config),code:this.code,status:this.status}}});const Ld=D.prototype,Od={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{Od[e]={value:e}});Object.defineProperties(D,Od);Object.defineProperty(Ld,"isAxiosError",{value:!0});D.from=(e,t,n,r,o,i)=>{const l=Object.create(Ld);return S.toFlatObject(e,l,function(s){return s!==Error.prototype},u=>u!=="isAxiosError"),D.call(l,e.message,t,n,r,o),l.cause=e,l.name=e.name,i&&Object.assign(l,i),l};const L0=null;function cu(e){return S.isPlainObject(e)||S.isArray(e)}function Fd(e){return S.endsWith(e,"[]")?e.slice(0,-2):e}function za(e,t,n){return e?e.concat(t).map(function(o,i){return o=Fd(o),!n&&i?"["+o+"]":o}).join(n?".":""):t}function O0(e){return S.isArray(e)&&!e.some(cu)}const F0=S.toFlatObject(S,{},null,function(t){return/^is[A-Z]/.test(t)});function Ti(e,t,n){if(!S.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=S.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(v,k){return!S.isUndefined(k[v])});const r=n.metaTokens,o=n.visitor||c,i=n.dots,l=n.indexes,s=(n.Blob||typeof Blob<"u"&&Blob)&&S.isSpecCompliantForm(t);if(!S.isFunction(o))throw new TypeError("visitor must be a function");function a(y){if(y===null)return"";if(S.isDate(y))return y.toISOString();if(!s&&S.isBlob(y))throw new D("Blob is not supported. Use a Buffer instead.");return S.isArrayBuffer(y)||S.isTypedArray(y)?s&&typeof Blob=="function"?new Blob([y]):Buffer.from(y):y}function c(y,v,k){let d=y;if(y&&!k&&typeof y=="object"){if(S.endsWith(v,"{}"))v=r?v:v.slice(0,-2),y=JSON.stringify(y);else if(S.isArray(y)&&O0(y)||(S.isFileList(y)||S.endsWith(v,"[]"))&&(d=S.toArray(y)))return v=Fd(v),d.forEach(function(h,E){!(S.isUndefined(h)||h===null)&&t.append(l===!0?za([v],E,i):l===null?v:v+"[]",a(h))}),!1}return cu(y)?!0:(t.append(za(k,v,i),a(y)),!1)}const p=[],m=Object.assign(F0,{defaultVisitor:c,convertValue:a,isVisitable:cu});function g(y,v){if(!S.isUndefined(y)){if(p.indexOf(y)!==-1)throw Error("Circular reference detected in "+v.join("."));p.push(y),S.forEach(y,function(d,f){(!(S.isUndefined(d)||d===null)&&o.call(t,d,S.isString(f)?f.trim():f,v,m))===!0&&g(d,v?v.concat(f):[f])}),p.pop()}}if(!S.isObject(e))throw new TypeError("data must be an object");return g(e),t}function Ba(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function gs(e,t){this._pairs=[],e&&Ti(e,this,t)}const Ud=gs.prototype;Ud.append=function(t,n){this._pairs.push([t,n])};Ud.toString=function(t){const n=t?function(r){return t.call(this,r,Ba)}:Ba;return this._pairs.map(function(o){return n(o[0])+"="+n(o[1])},"").join("&")};function U0(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Ad(e,t,n){if(!t)return e;const r=n&&n.encode||U0,o=n&&n.serialize;let i;if(o?i=o(t,n):i=S.isURLSearchParams(t)?t.toString():new gs(t,n).toString(r),i){const l=e.indexOf("#");l!==-1&&(e=e.slice(0,l)),e+=(e.indexOf("?")===-1?"?":"&")+i}return e}class Ha{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){S.forEach(this.handlers,function(r){r!==null&&t(r)})}}const Dd={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},A0=typeof URLSearchParams<"u"?URLSearchParams:gs,D0=typeof FormData<"u"?FormData:null,j0=typeof Blob<"u"?Blob:null,$0={isBrowser:!0,classes:{URLSearchParams:A0,FormData:D0,Blob:j0},protocols:["http","https","file","blob","url","data"]},vs=typeof window<"u"&&typeof document<"u",fu=typeof navigator=="object"&&navigator||void 0,M0=vs&&(!fu||["ReactNative","NativeScript","NS"].indexOf(fu.product)<0),I0=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",z0=vs&&window.location.href||"http://localhost",B0=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:vs,hasStandardBrowserEnv:M0,hasStandardBrowserWebWorkerEnv:I0,navigator:fu,origin:z0},Symbol.toStringTag,{value:"Module"})),xe={...B0,...$0};function H0(e,t){return Ti(e,new xe.classes.URLSearchParams,Object.assign({visitor:function(n,r,o,i){return xe.isNode&&S.isBuffer(n)?(this.append(r,n.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)}},t))}function b0(e){return S.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function V0(e){const t={},n=Object.keys(e);let r;const o=n.length;let i;for(r=0;r=n.length;return l=!l&&S.isArray(o)?o.length:l,s?(S.hasOwnProp(o,l)?o[l]=[o[l],r]:o[l]=r,!u):((!o[l]||!S.isObject(o[l]))&&(o[l]=[]),t(n,r,o[l],i)&&S.isArray(o[l])&&(o[l]=V0(o[l])),!u)}if(S.isFormData(e)&&S.isFunction(e.entries)){const n={};return S.forEachEntry(e,(r,o)=>{t(b0(r),o,n,0)}),n}return null}function W0(e,t,n){if(S.isString(e))try{return(t||JSON.parse)(e),S.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(0,JSON.stringify)(e)}const Kr={transitional:Dd,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",o=r.indexOf("application/json")>-1,i=S.isObject(t);if(i&&S.isHTMLForm(t)&&(t=new FormData(t)),S.isFormData(t))return o?JSON.stringify(jd(t)):t;if(S.isArrayBuffer(t)||S.isBuffer(t)||S.isStream(t)||S.isFile(t)||S.isBlob(t)||S.isReadableStream(t))return t;if(S.isArrayBufferView(t))return t.buffer;if(S.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let u;if(i){if(r.indexOf("application/x-www-form-urlencoded")>-1)return H0(t,this.formSerializer).toString();if((u=S.isFileList(t))||r.indexOf("multipart/form-data")>-1){const s=this.env&&this.env.FormData;return Ti(u?{"files[]":t}:t,s&&new s,this.formSerializer)}}return i||o?(n.setContentType("application/json",!1),W0(t)):t}],transformResponse:[function(t){const n=this.transitional||Kr.transitional,r=n&&n.forcedJSONParsing,o=this.responseType==="json";if(S.isResponse(t)||S.isReadableStream(t))return t;if(t&&S.isString(t)&&(r&&!this.responseType||o)){const l=!(n&&n.silentJSONParsing)&&o;try{return JSON.parse(t)}catch(u){if(l)throw u.name==="SyntaxError"?D.from(u,D.ERR_BAD_RESPONSE,this,null,this.response):u}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:xe.classes.FormData,Blob:xe.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};S.forEach(["delete","get","head","post","put","patch"],e=>{Kr.headers[e]={}});const Q0=S.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),K0=e=>{const t={};let n,r,o;return e&&e.split(` `).forEach(function(l){o=l.indexOf(":"),n=l.substring(0,o).trim().toLowerCase(),r=l.substring(o+1).trim(),!(!n||t[n]&&Q0[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},ba=Symbol("internals");function ir(e){return e&&String(e).trim().toLowerCase()}function No(e){return e===!1||e==null?e:S.isArray(e)?e.map(No):String(e)}function q0(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}const G0=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function sl(e,t,n,r,o){if(S.isFunction(r))return r.call(this,t,n);if(o&&(t=n),!!S.isString(t)){if(S.isString(r))return t.indexOf(r)!==-1;if(S.isRegExp(r))return r.test(t)}}function X0(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function Y0(e,t){const n=S.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(o,i,l){return this[r].call(this,t,o,i,l)},configurable:!0})})}class Ce{constructor(t){t&&this.set(t)}set(t,n,r){const o=this;function i(u,s,a){const c=ir(s);if(!c)throw new Error("header name must be a non-empty string");const p=S.findKey(o,c);(!p||o[p]===void 0||a===!0||a===void 0&&o[p]!==!1)&&(o[p||s]=No(u))}const l=(u,s)=>S.forEach(u,(a,c)=>i(a,c,s));if(S.isPlainObject(t)||t instanceof this.constructor)l(t,n);else if(S.isString(t)&&(t=t.trim())&&!G0(t))l(K0(t),n);else if(S.isHeaders(t))for(const[u,s]of t.entries())i(s,u,r);else t!=null&&i(n,t,r);return this}get(t,n){if(t=ir(t),t){const r=S.findKey(this,t);if(r){const o=this[r];if(!n)return o;if(n===!0)return q0(o);if(S.isFunction(n))return n.call(this,o,r);if(S.isRegExp(n))return n.exec(o);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=ir(t),t){const r=S.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||sl(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let o=!1;function i(l){if(l=ir(l),l){const u=S.findKey(r,l);u&&(!n||sl(r,r[u],u,n))&&(delete r[u],o=!0)}}return S.isArray(t)?t.forEach(i):i(t),o}clear(t){const n=Object.keys(this);let r=n.length,o=!1;for(;r--;){const i=n[r];(!t||sl(this,this[i],i,t,!0))&&(delete this[i],o=!0)}return o}normalize(t){const n=this,r={};return S.forEach(this,(o,i)=>{const l=S.findKey(r,i);if(l){n[l]=No(o),delete n[i];return}const u=t?X0(i):String(i).trim();u!==i&&delete n[i],n[u]=No(o),r[u]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return S.forEach(this,(r,o)=>{r!=null&&r!==!1&&(n[o]=t&&S.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(` `)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(o=>r.set(o)),r}static accessor(t){const r=(this[ba]=this[ba]={accessors:{}}).accessors,o=this.prototype;function i(l){const u=ir(l);r[u]||(Y0(o,l),r[u]=!0)}return S.isArray(t)?t.forEach(i):i(t),this}}Ce.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);S.reduceDescriptors(Ce.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}});S.freezeMethods(Ce);function al(e,t){const n=this||Kr,r=t||n,o=Ce.from(r.headers);let i=r.data;return S.forEach(e,function(u){i=u.call(n,i,o.normalize(),t?t.status:void 0)}),o.normalize(),i}function $d(e){return!!(e&&e.__CANCEL__)}function qn(e,t,n){D.call(this,e??"canceled",D.ERR_CANCELED,t,n),this.name="CanceledError"}S.inherits(qn,D,{__CANCEL__:!0});function Md(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new D("Request failed with status code "+n.status,[D.ERR_BAD_REQUEST,D.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function J0(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function Z0(e,t){e=e||10;const n=new Array(e),r=new Array(e);let o=0,i=0,l;return t=t!==void 0?t:1e3,function(s){const a=Date.now(),c=r[i];l||(l=a),n[o]=s,r[o]=a;let p=i,m=0;for(;p!==o;)m+=n[p++],p=p%e;if(o=(o+1)%e,o===i&&(i=(i+1)%e),a-l{n=c,o=null,i&&(clearTimeout(i),i=null),e.apply(null,a)};return[(...a)=>{const c=Date.now(),p=c-n;p>=r?l(a,c):(o=a,i||(i=setTimeout(()=>{i=null,l(o)},r-p)))},()=>o&&l(o)]}const ei=(e,t,n=3)=>{let r=0;const o=Z0(50,250);return ey(i=>{const l=i.loaded,u=i.lengthComputable?i.total:void 0,s=l-r,a=o(s),c=l<=u;r=l;const p={loaded:l,total:u,progress:u?l/u:void 0,bytes:s,rate:a||void 0,estimated:a&&u&&c?(u-l)/a:void 0,event:i,lengthComputable:u!=null,[t?"download":"upload"]:!0};e(p)},n)},Va=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},Wa=e=>(...t)=>S.asap(()=>e(...t)),ty=xe.hasStandardBrowserEnv?function(){const t=xe.navigator&&/(msie|trident)/i.test(xe.navigator.userAgent),n=document.createElement("a");let r;function o(i){let l=i;return t&&(n.setAttribute("href",l),l=n.href),n.setAttribute("href",l),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:n.pathname.charAt(0)==="/"?n.pathname:"/"+n.pathname}}return r=o(window.location.href),function(l){const u=S.isString(l)?o(l):l;return u.protocol===r.protocol&&u.host===r.host}}():function(){return function(){return!0}}(),ny=xe.hasStandardBrowserEnv?{write(e,t,n,r,o,i){const l=[e+"="+encodeURIComponent(t)];S.isNumber(n)&&l.push("expires="+new Date(n).toGMTString()),S.isString(r)&&l.push("path="+r),S.isString(o)&&l.push("domain="+o),i===!0&&l.push("secure"),document.cookie=l.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function ry(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function oy(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function Id(e,t){return e&&!ry(t)?oy(e,t):t}const Qa=e=>e instanceof Ce?{...e}:e;function mn(e,t){t=t||{};const n={};function r(a,c,p){return S.isPlainObject(a)&&S.isPlainObject(c)?S.merge.call({caseless:p},a,c):S.isPlainObject(c)?S.merge({},c):S.isArray(c)?c.slice():c}function o(a,c,p){if(S.isUndefined(c)){if(!S.isUndefined(a))return r(void 0,a,p)}else return r(a,c,p)}function i(a,c){if(!S.isUndefined(c))return r(void 0,c)}function l(a,c){if(S.isUndefined(c)){if(!S.isUndefined(a))return r(void 0,a)}else return r(void 0,c)}function u(a,c,p){if(p in t)return r(a,c);if(p in e)return r(void 0,a)}const s={url:i,method:i,data:i,baseURL:l,transformRequest:l,transformResponse:l,paramsSerializer:l,timeout:l,timeoutMessage:l,withCredentials:l,withXSRFToken:l,adapter:l,responseType:l,xsrfCookieName:l,xsrfHeaderName:l,onUploadProgress:l,onDownloadProgress:l,decompress:l,maxContentLength:l,maxBodyLength:l,beforeRedirect:l,transport:l,httpAgent:l,httpsAgent:l,cancelToken:l,socketPath:l,responseEncoding:l,validateStatus:u,headers:(a,c)=>o(Qa(a),Qa(c),!0)};return S.forEach(Object.keys(Object.assign({},e,t)),function(c){const p=s[c]||o,m=p(e[c],t[c],c);S.isUndefined(m)&&p!==u||(n[c]=m)}),n}const zd=e=>{const t=mn({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:o,xsrfCookieName:i,headers:l,auth:u}=t;t.headers=l=Ce.from(l),t.url=Ad(Id(t.baseURL,t.url),e.params,e.paramsSerializer),u&&l.set("Authorization","Basic "+btoa((u.username||"")+":"+(u.password?unescape(encodeURIComponent(u.password)):"")));let s;if(S.isFormData(n)){if(xe.hasStandardBrowserEnv||xe.hasStandardBrowserWebWorkerEnv)l.setContentType(void 0);else if((s=l.getContentType())!==!1){const[a,...c]=s?s.split(";").map(p=>p.trim()).filter(Boolean):[];l.setContentType([a||"multipart/form-data",...c].join("; "))}}if(xe.hasStandardBrowserEnv&&(r&&S.isFunction(r)&&(r=r(t)),r||r!==!1&&ty(t.url))){const a=o&&i&&ny.read(i);a&&l.set(o,a)}return t},iy=typeof XMLHttpRequest<"u",ly=iy&&function(e){return new Promise(function(n,r){const o=zd(e);let i=o.data;const l=Ce.from(o.headers).normalize();let{responseType:u,onUploadProgress:s,onDownloadProgress:a}=o,c,p,m,g,y;function v(){g&&g(),y&&y(),o.cancelToken&&o.cancelToken.unsubscribe(c),o.signal&&o.signal.removeEventListener("abort",c)}let k=new XMLHttpRequest;k.open(o.method.toUpperCase(),o.url,!0),k.timeout=o.timeout;function d(){if(!k)return;const h=Ce.from("getAllResponseHeaders"in k&&k.getAllResponseHeaders()),x={data:!u||u==="text"||u==="json"?k.responseText:k.response,status:k.status,statusText:k.statusText,headers:h,config:e,request:k};Md(function(P){n(P),v()},function(P){r(P),v()},x),k=null}"onloadend"in k?k.onloadend=d:k.onreadystatechange=function(){!k||k.readyState!==4||k.status===0&&!(k.responseURL&&k.responseURL.indexOf("file:")===0)||setTimeout(d)},k.onabort=function(){k&&(r(new D("Request aborted",D.ECONNABORTED,e,k)),k=null)},k.onerror=function(){r(new D("Network Error",D.ERR_NETWORK,e,k)),k=null},k.ontimeout=function(){let E=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded";const x=o.transitional||Dd;o.timeoutErrorMessage&&(E=o.timeoutErrorMessage),r(new D(E,x.clarifyTimeoutError?D.ETIMEDOUT:D.ECONNABORTED,e,k)),k=null},i===void 0&&l.setContentType(null),"setRequestHeader"in k&&S.forEach(l.toJSON(),function(E,x){k.setRequestHeader(x,E)}),S.isUndefined(o.withCredentials)||(k.withCredentials=!!o.withCredentials),u&&u!=="json"&&(k.responseType=o.responseType),a&&([m,y]=ei(a,!0),k.addEventListener("progress",m)),s&&k.upload&&([p,g]=ei(s),k.upload.addEventListener("progress",p),k.upload.addEventListener("loadend",g)),(o.cancelToken||o.signal)&&(c=h=>{k&&(r(!h||h.type?new qn(null,e,k):h),k.abort(),k=null)},o.cancelToken&&o.cancelToken.subscribe(c),o.signal&&(o.signal.aborted?c():o.signal.addEventListener("abort",c)));const f=J0(o.url);if(f&&xe.protocols.indexOf(f)===-1){r(new D("Unsupported protocol "+f+":",D.ERR_BAD_REQUEST,e));return}k.send(i||null)})},uy=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let r=new AbortController,o;const i=function(a){if(!o){o=!0,u();const c=a instanceof Error?a:this.reason;r.abort(c instanceof D?c:new qn(c instanceof Error?c.message:c))}};let l=t&&setTimeout(()=>{l=null,i(new D(`timeout ${t} of ms exceeded`,D.ETIMEDOUT))},t);const u=()=>{e&&(l&&clearTimeout(l),l=null,e.forEach(a=>{a.unsubscribe?a.unsubscribe(i):a.removeEventListener("abort",i)}),e=null)};e.forEach(a=>a.addEventListener("abort",i));const{signal:s}=r;return s.unsubscribe=()=>S.asap(u),s}},sy=function*(e,t){let n=e.byteLength;if(n{const o=ay(e,t);let i=0,l,u=s=>{l||(l=!0,r&&r(s))};return new ReadableStream({async pull(s){try{const{done:a,value:c}=await o.next();if(a){u(),s.close();return}let p=c.byteLength;if(n){let m=i+=p;n(m)}s.enqueue(new Uint8Array(c))}catch(a){throw u(a),a}},cancel(s){return u(s),o.return()}},{highWaterMark:2})},Pi=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",Bd=Pi&&typeof ReadableStream=="function",fy=Pi&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),Hd=(e,...t)=>{try{return!!e(...t)}catch{return!1}},dy=Bd&&Hd(()=>{let e=!1;const t=new Request(xe.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),qa=64*1024,du=Bd&&Hd(()=>S.isReadableStream(new Response("").body)),ti={stream:du&&(e=>e.body)};Pi&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!ti[t]&&(ti[t]=S.isFunction(e[t])?n=>n[t]():(n,r)=>{throw new D(`Response type '${t}' is not supported`,D.ERR_NOT_SUPPORT,r)})})})(new Response);const py=async e=>{if(e==null)return 0;if(S.isBlob(e))return e.size;if(S.isSpecCompliantForm(e))return(await new Request(xe.origin,{method:"POST",body:e}).arrayBuffer()).byteLength;if(S.isArrayBufferView(e)||S.isArrayBuffer(e))return e.byteLength;if(S.isURLSearchParams(e)&&(e=e+""),S.isString(e))return(await fy(e)).byteLength},my=async(e,t)=>{const n=S.toFiniteNumber(e.getContentLength());return n??py(t)},hy=Pi&&(async e=>{let{url:t,method:n,data:r,signal:o,cancelToken:i,timeout:l,onDownloadProgress:u,onUploadProgress:s,responseType:a,headers:c,withCredentials:p="same-origin",fetchOptions:m}=zd(e);a=a?(a+"").toLowerCase():"text";let g=uy([o,i&&i.toAbortSignal()],l),y;const v=g&&g.unsubscribe&&(()=>{g.unsubscribe()});let k;try{if(s&&dy&&n!=="get"&&n!=="head"&&(k=await my(c,r))!==0){let x=new Request(t,{method:"POST",body:r,duplex:"half"}),R;if(S.isFormData(r)&&(R=x.headers.get("content-type"))&&c.setContentType(R),x.body){const[P,N]=Va(k,ei(Wa(s)));r=Ka(x.body,qa,P,N)}}S.isString(p)||(p=p?"include":"omit");const d="credentials"in Request.prototype;y=new Request(t,{...m,signal:g,method:n.toUpperCase(),headers:c.normalize().toJSON(),body:r,duplex:"half",credentials:d?p:void 0});let f=await fetch(y);const h=du&&(a==="stream"||a==="response");if(du&&(u||h&&v)){const x={};["status","statusText","headers"].forEach(j=>{x[j]=f[j]});const R=S.toFiniteNumber(f.headers.get("content-length")),[P,N]=u&&Va(R,ei(Wa(u),!0))||[];f=new Response(Ka(f.body,qa,P,()=>{N&&N(),v&&v()}),x)}a=a||"text";let E=await ti[S.findKey(ti,a)||"text"](f,e);return!h&&v&&v(),await new Promise((x,R)=>{Md(x,R,{data:E,headers:Ce.from(f.headers),status:f.status,statusText:f.statusText,config:e,request:y})})}catch(d){throw v&&v(),d&&d.name==="TypeError"&&/fetch/i.test(d.message)?Object.assign(new D("Network Error",D.ERR_NETWORK,e,y),{cause:d.cause||d}):D.from(d,d&&d.code,e,y)}}),pu={http:L0,xhr:ly,fetch:hy};S.forEach(pu,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const Ga=e=>`- ${e}`,yy=e=>S.isFunction(e)||e===null||e===!1,bd={getAdapter:e=>{e=S.isArray(e)?e:[e];const{length:t}=e;let n,r;const o={};for(let i=0;i`adapter ${u} `+(s===!1?"is not supported by the environment":"is not available in the build"));let l=t?i.length>1?`since : `+i.map(Ga).join(` `):" "+Ga(i[0]):"as no adapter specified";throw new D("There is no suitable adapter to dispatch the request "+l,"ERR_NOT_SUPPORT")}return r},adapters:pu};function cl(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new qn(null,e)}function Xa(e){return cl(e),e.headers=Ce.from(e.headers),e.data=al.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),bd.getAdapter(e.adapter||Kr.adapter)(e).then(function(r){return cl(e),r.data=al.call(e,e.transformResponse,r),r.headers=Ce.from(r.headers),r},function(r){return $d(r)||(cl(e),r&&r.response&&(r.response.data=al.call(e,e.transformResponse,r.response),r.response.headers=Ce.from(r.response.headers))),Promise.reject(r)})}const Vd="1.7.7",ws={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{ws[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const Ya={};ws.transitional=function(t,n,r){function o(i,l){return"[Axios v"+Vd+"] Transitional option '"+i+"'"+l+(r?". "+r:"")}return(i,l,u)=>{if(t===!1)throw new D(o(l," has been removed"+(n?" in "+n:"")),D.ERR_DEPRECATED);return n&&!Ya[l]&&(Ya[l]=!0,console.warn(o(l," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(i,l,u):!0}};function gy(e,t,n){if(typeof e!="object")throw new D("options must be an object",D.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let o=r.length;for(;o-- >0;){const i=r[o],l=t[i];if(l){const u=e[i],s=u===void 0||l(u,i,e);if(s!==!0)throw new D("option "+i+" must be "+s,D.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new D("Unknown option "+i,D.ERR_BAD_OPTION)}}const mu={assertOptions:gy,validators:ws},xt=mu.validators;class un{constructor(t){this.defaults=t,this.interceptors={request:new Ha,response:new Ha}}async request(t,n){try{return await this._request(t,n)}catch(r){if(r instanceof Error){let o;Error.captureStackTrace?Error.captureStackTrace(o={}):o=new Error;const i=o.stack?o.stack.replace(/^.+\n/,""):"";try{r.stack?i&&!String(r.stack).endsWith(i.replace(/^.+\n.+\n/,""))&&(r.stack+=` `+i):r.stack=i}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=mn(this.defaults,n);const{transitional:r,paramsSerializer:o,headers:i}=n;r!==void 0&&mu.assertOptions(r,{silentJSONParsing:xt.transitional(xt.boolean),forcedJSONParsing:xt.transitional(xt.boolean),clarifyTimeoutError:xt.transitional(xt.boolean)},!1),o!=null&&(S.isFunction(o)?n.paramsSerializer={serialize:o}:mu.assertOptions(o,{encode:xt.function,serialize:xt.function},!0)),n.method=(n.method||this.defaults.method||"get").toLowerCase();let l=i&&S.merge(i.common,i[n.method]);i&&S.forEach(["delete","get","head","post","put","patch","common"],y=>{delete i[y]}),n.headers=Ce.concat(l,i);const u=[];let s=!0;this.interceptors.request.forEach(function(v){typeof v.runWhen=="function"&&v.runWhen(n)===!1||(s=s&&v.synchronous,u.unshift(v.fulfilled,v.rejected))});const a=[];this.interceptors.response.forEach(function(v){a.push(v.fulfilled,v.rejected)});let c,p=0,m;if(!s){const y=[Xa.bind(this),void 0];for(y.unshift.apply(y,u),y.push.apply(y,a),m=y.length,c=Promise.resolve(n);p{if(!r._listeners)return;let i=r._listeners.length;for(;i-- >0;)r._listeners[i](o);r._listeners=null}),this.promise.then=o=>{let i;const l=new Promise(u=>{r.subscribe(u),i=u}).then(o);return l.cancel=function(){r.unsubscribe(i)},l},t(function(i,l,u){r.reason||(r.reason=new qn(i,l,u),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=r=>{t.abort(r)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new Ss(function(o){t=o}),cancel:t}}}function vy(e){return function(n){return e.apply(null,n)}}function wy(e){return S.isObject(e)&&e.isAxiosError===!0}const hu={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(hu).forEach(([e,t])=>{hu[t]=e});function Wd(e){const t=new un(e),n=kd(un.prototype.request,t);return S.extend(n,un.prototype,t,{allOwnKeys:!0}),S.extend(n,t,null,{allOwnKeys:!0}),n.create=function(o){return Wd(mn(e,o))},n}const Z=Wd(Kr);Z.Axios=un;Z.CanceledError=qn;Z.CancelToken=Ss;Z.isCancel=$d;Z.VERSION=Vd;Z.toFormData=Ti;Z.AxiosError=D;Z.Cancel=Z.CanceledError;Z.all=function(t){return Promise.all(t)};Z.spread=vy;Z.isAxiosError=wy;Z.mergeConfig=mn;Z.AxiosHeaders=Ce;Z.formToJSON=e=>jd(S.isHTMLForm(e)?new FormData(e):e);Z.getAdapter=bd.getAdapter;Z.HttpStatusCode=hu;Z.default=Z;var Sy=Object.defineProperty,Ey=(e,t,n)=>t in e?Sy(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,fl=(e,t,n)=>(Ey(e,typeof t!="symbol"?t+"":t,n),n);let ky=class{constructor(){fl(this,"current",this.detect()),fl(this,"handoffState","pending"),fl(this,"currentId",0)}set(t){this.current!==t&&(this.handoffState="pending",this.currentId=0,this.current=t)}reset(){this.set(this.detect())}nextId(){return++this.currentId}get isServer(){return this.current==="server"}get isClient(){return this.current==="client"}detect(){return typeof window>"u"||typeof document>"u"?"server":"client"}handoff(){this.handoffState==="pending"&&(this.handoffState="complete")}get isHandoffComplete(){return this.handoffState==="complete"}},sn=new ky;function Ri(e){return sn.isServer?null:e instanceof Node?e.ownerDocument:e!=null&&e.hasOwnProperty("current")&&e.current instanceof Node?e.current.ownerDocument:document}function Ni(e){typeof queueMicrotask=="function"?queueMicrotask(e):Promise.resolve().then(e).catch(t=>setTimeout(()=>{throw t}))}function Qt(){let e=[],t={addEventListener(n,r,o,i){return n.addEventListener(r,o,i),t.add(()=>n.removeEventListener(r,o,i))},requestAnimationFrame(...n){let r=requestAnimationFrame(...n);return t.add(()=>cancelAnimationFrame(r))},nextFrame(...n){return t.requestAnimationFrame(()=>t.requestAnimationFrame(...n))},setTimeout(...n){let r=setTimeout(...n);return t.add(()=>clearTimeout(r))},microTask(...n){let r={current:!0};return Ni(()=>{r.current&&n[0]()}),t.add(()=>{r.current=!1})},style(n,r,o){let i=n.style.getPropertyValue(r);return Object.assign(n.style,{[r]:o}),this.add(()=>{Object.assign(n.style,{[r]:i})})},group(n){let r=Qt();return n(r),this.add(()=>r.dispose())},add(n){return e.includes(n)||e.push(n),()=>{let r=e.indexOf(n);if(r>=0)for(let o of e.splice(r,1))o()}},dispose(){for(let n of e.splice(0))n()}};return t}function Es(){let[e]=w.useState(Qt);return w.useEffect(()=>()=>e.dispose(),[e]),e}let he=(e,t)=>{sn.isServer?w.useEffect(e,t):w.useLayoutEffect(e,t)};function gn(e){let t=w.useRef(e);return he(()=>{t.current=e},[e]),t}let Q=function(e){let t=gn(e);return A.useCallback((...n)=>t.current(...n),[t])},xy=w.createContext(void 0);function Cy(){return w.useContext(xy)}function yu(...e){return Array.from(new Set(e.flatMap(t=>typeof t=="string"?t.split(" "):[]))).filter(Boolean).join(" ")}function Ht(e,t,...n){if(e in t){let o=t[e];return typeof o=="function"?o(...n):o}let r=new Error(`Tried to handle "${e}" but there is no handler defined. Only defined handlers are: ${Object.keys(t).map(o=>`"${o}"`).join(", ")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,Ht),r}var ni=(e=>(e[e.None=0]="None",e[e.RenderStrategy=1]="RenderStrategy",e[e.Static=2]="Static",e))(ni||{}),Ot=(e=>(e[e.Unmount=0]="Unmount",e[e.Hidden=1]="Hidden",e))(Ot||{});function ze({ourProps:e,theirProps:t,slot:n,defaultTag:r,features:o,visible:i=!0,name:l,mergeRefs:u}){u=u??Ty;let s=Qd(t,e);if(i)return mo(s,n,r,l,u);let a=o??0;if(a&2){let{static:c=!1,...p}=s;if(c)return mo(p,n,r,l,u)}if(a&1){let{unmount:c=!0,...p}=s;return Ht(c?0:1,{0(){return null},1(){return mo({...p,hidden:!0,style:{display:"none"}},n,r,l,u)}})}return mo(s,n,r,l,u)}function mo(e,t={},n,r,o){let{as:i=n,children:l,refName:u="ref",...s}=dl(e,["unmount","static"]),a=e.ref!==void 0?{[u]:e.ref}:{},c=typeof l=="function"?l(t):l;"className"in s&&s.className&&typeof s.className=="function"&&(s.className=s.className(t)),s["aria-labelledby"]&&s["aria-labelledby"]===s.id&&(s["aria-labelledby"]=void 0);let p={};if(t){let m=!1,g=[];for(let[y,v]of Object.entries(t))typeof v=="boolean"&&(m=!0),v===!0&&g.push(y.replace(/([A-Z])/g,k=>`-${k.toLowerCase()}`));if(m){p["data-headlessui-state"]=g.join(" ");for(let y of g)p[`data-${y}`]=""}}if(i===w.Fragment&&(Object.keys(Xt(s)).length>0||Object.keys(Xt(p)).length>0))if(!w.isValidElement(c)||Array.isArray(c)&&c.length>1){if(Object.keys(Xt(s)).length>0)throw new Error(['Passing props on "Fragment"!',"",`The current component <${r} /> is rendering a "Fragment".`,"However we need to passthrough the following props:",Object.keys(Xt(s)).concat(Object.keys(Xt(p))).map(m=>` - ${m}`).join(` `),"","You can apply a few solutions:",['Add an `as="..."` prop, to ensure that we render an actual element instead of a "Fragment".',"Render a single element as the child so that we can forward the props onto that element."].map(m=>` - ${m}`).join(` `)].join(` `))}else{let m=c.props,g=m==null?void 0:m.className,y=typeof g=="function"?(...d)=>yu(g(...d),s.className):yu(g,s.className),v=y?{className:y}:{},k=Qd(c.props,Xt(dl(s,["ref"])));for(let d in p)d in k&&delete p[d];return w.cloneElement(c,Object.assign({},k,p,a,{ref:o(c.ref,a.ref)},v))}return w.createElement(i,Object.assign({},dl(s,["ref"]),i!==w.Fragment&&a,i!==w.Fragment&&p),c)}function Ty(...e){return e.every(t=>t==null)?void 0:t=>{for(let n of e)n!=null&&(typeof n=="function"?n(t):n.current=t)}}function Qd(...e){if(e.length===0)return{};if(e.length===1)return e[0];let t={},n={};for(let r of e)for(let o in r)o.startsWith("on")&&typeof r[o]=="function"?(n[o]!=null||(n[o]=[]),n[o].push(r[o])):t[o]=r[o];if(t.disabled||t["aria-disabled"])for(let r in n)/^(on(?:Click|Pointer|Mouse|Key)(?:Down|Up|Press)?)$/.test(r)&&(n[r]=[o=>{var i;return(i=o==null?void 0:o.preventDefault)==null?void 0:i.call(o)}]);for(let r in n)Object.assign(t,{[r](o,...i){let l=n[r];for(let u of l){if((o instanceof Event||(o==null?void 0:o.nativeEvent)instanceof Event)&&o.defaultPrevented)return;u(o,...i)}}});return t}function Te(e){var t;return Object.assign(w.forwardRef(e),{displayName:(t=e.displayName)!=null?t:e.name})}function Xt(e){let t=Object.assign({},e);for(let n in t)t[n]===void 0&&delete t[n];return t}function dl(e,t=[]){let n=Object.assign({},e);for(let r of t)r in n&&delete n[r];return n}let Py="span";var ri=(e=>(e[e.None=1]="None",e[e.Focusable=2]="Focusable",e[e.Hidden=4]="Hidden",e))(ri||{});function Ry(e,t){var n;let{features:r=1,...o}=e,i={ref:t,"aria-hidden":(r&2)===2?!0:(n=o["aria-hidden"])!=null?n:void 0,hidden:(r&4)===4?!0:void 0,style:{position:"fixed",top:1,left:1,width:1,height:0,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0",...(r&4)===4&&(r&2)!==2&&{display:"none"}}};return ze({ourProps:i,theirProps:o,slot:{},defaultTag:Py,name:"Hidden"})}let gu=Te(Ry),Kd=Symbol();function Ny(e,t=!0){return Object.assign(e,{[Kd]:t})}function rt(...e){let t=w.useRef(e);w.useEffect(()=>{t.current=e},[e]);let n=Q(r=>{for(let o of t.current)o!=null&&(typeof o=="function"?o(r):o.current=r)});return e.every(r=>r==null||(r==null?void 0:r[Kd]))?void 0:n}let ks=w.createContext(null);ks.displayName="DescriptionContext";function qd(){let e=w.useContext(ks);if(e===null){let t=new Error("You used a component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(t,qd),t}return e}function _y(){let[e,t]=w.useState([]);return[e.length>0?e.join(" "):void 0,w.useMemo(()=>function(n){let r=Q(i=>(t(l=>[...l,i]),()=>t(l=>{let u=l.slice(),s=u.indexOf(i);return s!==-1&&u.splice(s,1),u}))),o=w.useMemo(()=>({register:r,slot:n.slot,name:n.name,props:n.props,value:n.value}),[r,n.slot,n.name,n.props,n.value]);return A.createElement(ks.Provider,{value:o},n.children)},[t])]}let Ly="p";function Oy(e,t){let n=w.useId(),r=Cy(),{id:o=`headlessui-description-${n}`,...i}=e,l=qd(),u=rt(t);he(()=>l.register(o),[o,l.register]);let s=r||!1,a=w.useMemo(()=>({...l.slot,disabled:s}),[l.slot,s]),c={ref:u,...l.props,id:o};return ze({ourProps:c,theirProps:i,slot:a,defaultTag:Ly,name:l.name||"Description"})}let Fy=Te(Oy),Uy=Object.assign(Fy,{});var Gd=(e=>(e.Space=" ",e.Enter="Enter",e.Escape="Escape",e.Backspace="Backspace",e.Delete="Delete",e.ArrowLeft="ArrowLeft",e.ArrowUp="ArrowUp",e.ArrowRight="ArrowRight",e.ArrowDown="ArrowDown",e.Home="Home",e.End="End",e.PageUp="PageUp",e.PageDown="PageDown",e.Tab="Tab",e))(Gd||{});let Ay=w.createContext(()=>{});function Dy({value:e,children:t}){return A.createElement(Ay.Provider,{value:e},t)}let jy=class extends Map{constructor(t){super(),this.factory=t}get(t){let n=super.get(t);return n===void 0&&(n=this.factory(t),this.set(t,n)),n}};function Xd(e,t){let n=e(),r=new Set;return{getSnapshot(){return n},subscribe(o){return r.add(o),()=>r.delete(o)},dispatch(o,...i){let l=t[o].call(n,...i);l&&(n=l,r.forEach(u=>u()))}}}function Yd(e){return w.useSyncExternalStore(e.subscribe,e.getSnapshot,e.getSnapshot)}let $y=new jy(()=>Xd(()=>[],{ADD(e){return this.includes(e)?this:[...this,e]},REMOVE(e){let t=this.indexOf(e);if(t===-1)return this;let n=this.slice();return n.splice(t,1),n}}));function Gn(e,t){let n=$y.get(t),r=w.useId(),o=Yd(n);if(he(()=>{if(e)return n.dispatch("ADD",r),()=>n.dispatch("REMOVE",r)},[n,e]),!e)return!1;let i=o.indexOf(r),l=o.length;return i===-1&&(i=l,l+=1),i===l-1}let vu=new Map,Er=new Map;function Ja(e){var t;let n=(t=Er.get(e))!=null?t:0;return Er.set(e,n+1),n!==0?()=>Za(e):(vu.set(e,{"aria-hidden":e.getAttribute("aria-hidden"),inert:e.inert}),e.setAttribute("aria-hidden","true"),e.inert=!0,()=>Za(e))}function Za(e){var t;let n=(t=Er.get(e))!=null?t:1;if(n===1?Er.delete(e):Er.set(e,n-1),n!==1)return;let r=vu.get(e);r&&(r["aria-hidden"]===null?e.removeAttribute("aria-hidden"):e.setAttribute("aria-hidden",r["aria-hidden"]),e.inert=r.inert,vu.delete(e))}function My(e,{allowed:t,disallowed:n}={}){let r=Gn(e,"inert-others");he(()=>{var o,i;if(!r)return;let l=Qt();for(let s of(o=n==null?void 0:n())!=null?o:[])s&&l.add(Ja(s));let u=(i=t==null?void 0:t())!=null?i:[];for(let s of u){if(!s)continue;let a=Ri(s);if(!a)continue;let c=s.parentElement;for(;c&&c!==a.body;){for(let p of c.children)u.some(m=>p.contains(m))||l.add(Ja(p));c=c.parentElement}}return l.dispose},[r,t,n])}function Iy(e,t,n){let r=gn(o=>{let i=o.getBoundingClientRect();i.x===0&&i.y===0&&i.width===0&&i.height===0&&n()});w.useEffect(()=>{if(!e)return;let o=t===null?null:t instanceof HTMLElement?t:t.current;if(!o)return;let i=Qt();if(typeof ResizeObserver<"u"){let l=new ResizeObserver(()=>r.current(o));l.observe(o),i.add(()=>l.disconnect())}if(typeof IntersectionObserver<"u"){let l=new IntersectionObserver(()=>r.current(o));l.observe(o),i.add(()=>l.disconnect())}return()=>i.dispose()},[t,r,e])}let oi=["[contentEditable=true]","[tabindex]","a[href]","area[href]","button:not([disabled])","iframe","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].map(e=>`${e}:not([tabindex='-1'])`).join(","),zy=["[data-autofocus]"].map(e=>`${e}:not([tabindex='-1'])`).join(",");var ct=(e=>(e[e.First=1]="First",e[e.Previous=2]="Previous",e[e.Next=4]="Next",e[e.Last=8]="Last",e[e.WrapAround=16]="WrapAround",e[e.NoScroll=32]="NoScroll",e[e.AutoFocus=64]="AutoFocus",e))(ct||{}),wu=(e=>(e[e.Error=0]="Error",e[e.Overflow=1]="Overflow",e[e.Success=2]="Success",e[e.Underflow=3]="Underflow",e))(wu||{}),By=(e=>(e[e.Previous=-1]="Previous",e[e.Next=1]="Next",e))(By||{});function Hy(e=document.body){return e==null?[]:Array.from(e.querySelectorAll(oi)).sort((t,n)=>Math.sign((t.tabIndex||Number.MAX_SAFE_INTEGER)-(n.tabIndex||Number.MAX_SAFE_INTEGER)))}function by(e=document.body){return e==null?[]:Array.from(e.querySelectorAll(zy)).sort((t,n)=>Math.sign((t.tabIndex||Number.MAX_SAFE_INTEGER)-(n.tabIndex||Number.MAX_SAFE_INTEGER)))}var Jd=(e=>(e[e.Strict=0]="Strict",e[e.Loose=1]="Loose",e))(Jd||{});function Vy(e,t=0){var n;return e===((n=Ri(e))==null?void 0:n.body)?!1:Ht(t,{0(){return e.matches(oi)},1(){let r=e;for(;r!==null;){if(r.matches(oi))return!0;r=r.parentElement}return!1}})}var Wy=(e=>(e[e.Keyboard=0]="Keyboard",e[e.Mouse=1]="Mouse",e))(Wy||{});typeof window<"u"&&typeof document<"u"&&(document.addEventListener("keydown",e=>{e.metaKey||e.altKey||e.ctrlKey||(document.documentElement.dataset.headlessuiFocusVisible="")},!0),document.addEventListener("click",e=>{e.detail===1?delete document.documentElement.dataset.headlessuiFocusVisible:e.detail===0&&(document.documentElement.dataset.headlessuiFocusVisible="")},!0));function mt(e){e==null||e.focus({preventScroll:!0})}let Qy=["textarea","input"].join(",");function Ky(e){var t,n;return(n=(t=e==null?void 0:e.matches)==null?void 0:t.call(e,Qy))!=null?n:!1}function qy(e,t=n=>n){return e.slice().sort((n,r)=>{let o=t(n),i=t(r);if(o===null||i===null)return 0;let l=o.compareDocumentPosition(i);return l&Node.DOCUMENT_POSITION_FOLLOWING?-1:l&Node.DOCUMENT_POSITION_PRECEDING?1:0})}function kr(e,t,{sorted:n=!0,relativeTo:r=null,skipElements:o=[]}={}){let i=Array.isArray(e)?e.length>0?e[0].ownerDocument:document:e.ownerDocument,l=Array.isArray(e)?n?qy(e):e:t&64?by(e):Hy(e);o.length>0&&l.length>1&&(l=l.filter(g=>!o.some(y=>y!=null&&"current"in y?(y==null?void 0:y.current)===g:y===g))),r=r??i.activeElement;let u=(()=>{if(t&5)return 1;if(t&10)return-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),s=(()=>{if(t&1)return 0;if(t&2)return Math.max(0,l.indexOf(r))-1;if(t&4)return Math.max(0,l.indexOf(r))+1;if(t&8)return l.length-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),a=t&32?{preventScroll:!0}:{},c=0,p=l.length,m;do{if(c>=p||c+p<=0)return 0;let g=s+c;if(t&16)g=(g+p)%p;else{if(g<0)return 3;if(g>=p)return 1}m=l[g],m==null||m.focus(a),c+=u}while(m!==i.activeElement);return t&6&&Ky(m)&&m.select(),2}function Zd(){return/iPhone/gi.test(window.navigator.platform)||/Mac/gi.test(window.navigator.platform)&&window.navigator.maxTouchPoints>0}function Gy(){return/Android/gi.test(window.navigator.userAgent)}function Xy(){return Zd()||Gy()}function lr(e,t,n,r){let o=gn(n);w.useEffect(()=>{if(!e)return;function i(l){o.current(l)}return document.addEventListener(t,i,r),()=>document.removeEventListener(t,i,r)},[e,t,r])}function ep(e,t,n,r){let o=gn(n);w.useEffect(()=>{if(!e)return;function i(l){o.current(l)}return window.addEventListener(t,i,r),()=>window.removeEventListener(t,i,r)},[e,t,r])}const ec=30;function Yy(e,t,n){let r=Gn(e,"outside-click"),o=gn(n),i=w.useCallback(function(s,a){if(s.defaultPrevented)return;let c=a(s);if(c===null||!c.getRootNode().contains(c)||!c.isConnected)return;let p=function m(g){return typeof g=="function"?m(g()):Array.isArray(g)||g instanceof Set?g:[g]}(t);for(let m of p)if(m!==null&&(m.contains(c)||s.composed&&s.composedPath().includes(m)))return;return!Vy(c,Jd.Loose)&&c.tabIndex!==-1&&s.preventDefault(),o.current(s,c)},[o,t]),l=w.useRef(null);lr(r,"pointerdown",s=>{var a,c;l.current=((c=(a=s.composedPath)==null?void 0:a.call(s))==null?void 0:c[0])||s.target},!0),lr(r,"mousedown",s=>{var a,c;l.current=((c=(a=s.composedPath)==null?void 0:a.call(s))==null?void 0:c[0])||s.target},!0),lr(r,"click",s=>{Xy()||l.current&&(i(s,()=>l.current),l.current=null)},!0);let u=w.useRef({x:0,y:0});lr(r,"touchstart",s=>{u.current.x=s.touches[0].clientX,u.current.y=s.touches[0].clientY},!0),lr(r,"touchend",s=>{let a={x:s.changedTouches[0].clientX,y:s.changedTouches[0].clientY};if(!(Math.abs(a.x-u.current.x)>=ec||Math.abs(a.y-u.current.y)>=ec))return i(s,()=>s.target instanceof HTMLElement?s.target:null)},!0),ep(r,"blur",s=>i(s,()=>window.document.activeElement instanceof HTMLIFrameElement?window.document.activeElement:null),!0)}function qr(...e){return w.useMemo(()=>Ri(...e),[...e])}function tp(e,t,n,r){let o=gn(n);w.useEffect(()=>{e=e??window;function i(l){o.current(l)}return e.addEventListener(t,i,r),()=>e.removeEventListener(t,i,r)},[e,t,r])}function Jy(){let e;return{before({doc:t}){var n;let r=t.documentElement,o=(n=t.defaultView)!=null?n:window;e=Math.max(0,o.innerWidth-r.clientWidth)},after({doc:t,d:n}){let r=t.documentElement,o=Math.max(0,r.clientWidth-r.offsetWidth),i=Math.max(0,e-o);n.style(r,"paddingRight",`${i}px`)}}}function Zy(){return Zd()?{before({doc:e,d:t,meta:n}){function r(o){return n.containers.flatMap(i=>i()).some(i=>i.contains(o))}t.microTask(()=>{var o;if(window.getComputedStyle(e.documentElement).scrollBehavior!=="auto"){let u=Qt();u.style(e.documentElement,"scrollBehavior","auto"),t.add(()=>t.microTask(()=>u.dispose()))}let i=(o=window.scrollY)!=null?o:window.pageYOffset,l=null;t.addEventListener(e,"click",u=>{if(u.target instanceof HTMLElement)try{let s=u.target.closest("a");if(!s)return;let{hash:a}=new URL(s.href),c=e.querySelector(a);c&&!r(c)&&(l=c)}catch{}},!0),t.addEventListener(e,"touchstart",u=>{if(u.target instanceof HTMLElement)if(r(u.target)){let s=u.target;for(;s.parentElement&&r(s.parentElement);)s=s.parentElement;t.style(s,"overscrollBehavior","contain")}else t.style(u.target,"touchAction","none")}),t.addEventListener(e,"touchmove",u=>{if(u.target instanceof HTMLElement){if(u.target.tagName==="INPUT")return;if(r(u.target)){let s=u.target;for(;s.parentElement&&s.dataset.headlessuiPortal!==""&&!(s.scrollHeight>s.clientHeight||s.scrollWidth>s.clientWidth);)s=s.parentElement;s.dataset.headlessuiPortal===""&&u.preventDefault()}else u.preventDefault()}},{passive:!1}),t.add(()=>{var u;let s=(u=window.scrollY)!=null?u:window.pageYOffset;i!==s&&window.scrollTo(0,i),l&&l.isConnected&&(l.scrollIntoView({block:"nearest"}),l=null)})})}}:{}}function eg(){return{before({doc:e,d:t}){t.style(e.documentElement,"overflow","hidden")}}}function tg(e){let t={};for(let n of e)Object.assign(t,n(t));return t}let nn=Xd(()=>new Map,{PUSH(e,t){var n;let r=(n=this.get(e))!=null?n:{doc:e,count:0,d:Qt(),meta:new Set};return r.count++,r.meta.add(t),this.set(e,r),this},POP(e,t){let n=this.get(e);return n&&(n.count--,n.meta.delete(t)),this},SCROLL_PREVENT({doc:e,d:t,meta:n}){let r={doc:e,d:t,meta:tg(n)},o=[Zy(),Jy(),eg()];o.forEach(({before:i})=>i==null?void 0:i(r)),o.forEach(({after:i})=>i==null?void 0:i(r))},SCROLL_ALLOW({d:e}){e.dispose()},TEARDOWN({doc:e}){this.delete(e)}});nn.subscribe(()=>{let e=nn.getSnapshot(),t=new Map;for(let[n]of e)t.set(n,n.documentElement.style.overflow);for(let n of e.values()){let r=t.get(n.doc)==="hidden",o=n.count!==0;(o&&!r||!o&&r)&&nn.dispatch(n.count>0?"SCROLL_PREVENT":"SCROLL_ALLOW",n),n.count===0&&nn.dispatch("TEARDOWN",n)}});function ng(e,t,n=()=>({containers:[]})){let r=Yd(nn),o=t?r.get(t):void 0,i=o?o.count>0:!1;return he(()=>{if(!(!t||!e))return nn.dispatch("PUSH",t,n),()=>nn.dispatch("POP",t,n)},[e,t]),i}function rg(e,t,n=()=>[document.body]){let r=Gn(e,"scroll-lock");ng(r,t,o=>{var i;return{containers:[...(i=o.containers)!=null?i:[],n]}})}function og(e=0){let[t,n]=w.useState(e),r=w.useCallback(s=>n(s),[t]),o=w.useCallback(s=>n(a=>a|s),[t]),i=w.useCallback(s=>(t&s)===s,[t]),l=w.useCallback(s=>n(a=>a&~s),[n]),u=w.useCallback(s=>n(a=>a^s),[n]);return{flags:t,setFlag:r,addFlag:o,hasFlag:i,removeFlag:l,toggleFlag:u}}var ig={},tc;typeof process<"u"&&typeof globalThis<"u"&&((tc=process==null?void 0:ig)==null?void 0:tc.NODE_ENV)==="test"&&typeof Element.prototype.getAnimations>"u"&&(Element.prototype.getAnimations=function(){return console.warn(["Headless UI has polyfilled `Element.prototype.getAnimations` for your tests.","Please install a proper polyfill e.g. `jsdom-testing-mocks`, to silence these warnings.","","Example usage:","```js","import { mockAnimationsApi } from 'jsdom-testing-mocks'","mockAnimationsApi()","```"].join(` `)),[]});var lg=(e=>(e[e.None=0]="None",e[e.Closed=1]="Closed",e[e.Enter=2]="Enter",e[e.Leave=4]="Leave",e))(lg||{});function ug(e){let t={};for(let n in e)e[n]===!0&&(t[`data-${n}`]="");return t}function sg(e,t,n,r){let[o,i]=w.useState(n),{hasFlag:l,addFlag:u,removeFlag:s}=og(e&&o?3:0),a=w.useRef(!1),c=w.useRef(!1),p=Es();return he(()=>{var m;if(e){if(n&&i(!0),!t){n&&u(3);return}return(m=r==null?void 0:r.start)==null||m.call(r,n),ag(t,{inFlight:a,prepare(){c.current?c.current=!1:c.current=a.current,a.current=!0,!c.current&&(n?(u(3),s(4)):(u(4),s(2)))},run(){c.current?n?(s(3),u(4)):(s(4),u(3)):n?s(1):u(1)},done(){var g;c.current&&typeof t.getAnimations=="function"&&t.getAnimations().length>0||(a.current=!1,s(7),n||i(!1),(g=r==null?void 0:r.end)==null||g.call(r,n))}})}},[e,n,t,p]),e?[o,{closed:l(1),enter:l(2),leave:l(4),transition:l(2)||l(4)}]:[n,{closed:void 0,enter:void 0,leave:void 0,transition:void 0}]}function ag(e,{prepare:t,run:n,done:r,inFlight:o}){let i=Qt();return fg(e,{prepare:t,inFlight:o}),i.nextFrame(()=>{n(),i.requestAnimationFrame(()=>{i.add(cg(e,r))})}),i.dispose}function cg(e,t){var n,r;let o=Qt();if(!e)return o.dispose;let i=!1;o.add(()=>{i=!0});let l=(r=(n=e.getAnimations)==null?void 0:n.call(e).filter(u=>u instanceof CSSTransition))!=null?r:[];return l.length===0?(t(),o.dispose):(Promise.allSettled(l.map(u=>u.finished)).then(()=>{i||t()}),o.dispose)}function fg(e,{inFlight:t,prepare:n}){if(t!=null&&t.current){n();return}let r=e.style.transition;e.style.transition="none",n(),e.offsetHeight,e.style.transition=r}function xs(e,t){let n=w.useRef([]),r=Q(e);w.useEffect(()=>{let o=[...n.current];for(let[i,l]of t.entries())if(n.current[i]!==l){let u=r(t,o);return n.current=t,u}},[r,...t])}let _i=w.createContext(null);_i.displayName="OpenClosedContext";var Ke=(e=>(e[e.Open=1]="Open",e[e.Closed=2]="Closed",e[e.Closing=4]="Closing",e[e.Opening=8]="Opening",e))(Ke||{});function Li(){return w.useContext(_i)}function dg({value:e,children:t}){return A.createElement(_i.Provider,{value:e},t)}function pg({children:e}){return A.createElement(_i.Provider,{value:null},e)}function mg(e){function t(){document.readyState!=="loading"&&(e(),document.removeEventListener("DOMContentLoaded",t))}typeof window<"u"&&typeof document<"u"&&(document.addEventListener("DOMContentLoaded",t),t())}let Nt=[];mg(()=>{function e(t){if(!(t.target instanceof HTMLElement)||t.target===document.body||Nt[0]===t.target)return;let n=t.target;n=n.closest(oi),Nt.unshift(n??t.target),Nt=Nt.filter(r=>r!=null&&r.isConnected),Nt.splice(10)}window.addEventListener("click",e,{capture:!0}),window.addEventListener("mousedown",e,{capture:!0}),window.addEventListener("focus",e,{capture:!0}),document.body.addEventListener("click",e,{capture:!0}),document.body.addEventListener("mousedown",e,{capture:!0}),document.body.addEventListener("focus",e,{capture:!0})});function np(e){let t=Q(e),n=w.useRef(!1);w.useEffect(()=>(n.current=!1,()=>{n.current=!0,Ni(()=>{n.current&&t()})}),[t])}function hg(){let e=typeof document>"u";return"useSyncExternalStore"in Os?(t=>t.useSyncExternalStore)(Os)(()=>()=>{},()=>!1,()=>!e):!1}function Gr(){let e=hg(),[t,n]=w.useState(sn.isHandoffComplete);return t&&sn.isHandoffComplete===!1&&n(!1),w.useEffect(()=>{t!==!0&&n(!0)},[t]),w.useEffect(()=>sn.handoff(),[]),e?!1:t}let rp=w.createContext(!1);function yg(){return w.useContext(rp)}function nc(e){return A.createElement(rp.Provider,{value:e.force},e.children)}function gg(e){let t=yg(),n=w.useContext(ip),r=qr(e),[o,i]=w.useState(()=>{var l;if(!t&&n!==null)return(l=n.current)!=null?l:null;if(sn.isServer)return null;let u=r==null?void 0:r.getElementById("headlessui-portal-root");if(u)return u;if(r===null)return null;let s=r.createElement("div");return s.setAttribute("id","headlessui-portal-root"),r.body.appendChild(s)});return w.useEffect(()=>{o!==null&&(r!=null&&r.body.contains(o)||r==null||r.body.appendChild(o))},[o,r]),w.useEffect(()=>{t||n!==null&&i(n.current)},[n,i,t]),o}let op=w.Fragment,vg=Te(function(e,t){let n=e,r=w.useRef(null),o=rt(Ny(c=>{r.current=c}),t),i=qr(r),l=gg(r),[u]=w.useState(()=>{var c;return sn.isServer?null:(c=i==null?void 0:i.createElement("div"))!=null?c:null}),s=w.useContext(Su),a=Gr();return he(()=>{!l||!u||l.contains(u)||(u.setAttribute("data-headlessui-portal",""),l.appendChild(u))},[l,u]),he(()=>{if(u&&s)return s.register(u)},[s,u]),np(()=>{var c;!l||!u||(u instanceof Node&&l.contains(u)&&l.removeChild(u),l.childNodes.length<=0&&((c=l.parentElement)==null||c.removeChild(l)))}),a?!l||!u?null:Ed.createPortal(ze({ourProps:{ref:o},theirProps:n,slot:{},defaultTag:op,name:"Portal"}),u):null});function wg(e,t){let n=rt(t),{enabled:r=!0,...o}=e;return r?A.createElement(vg,{...o,ref:n}):ze({ourProps:{ref:n},theirProps:o,slot:{},defaultTag:op,name:"Portal"})}let Sg=w.Fragment,ip=w.createContext(null);function Eg(e,t){let{target:n,...r}=e,o={ref:rt(t)};return A.createElement(ip.Provider,{value:n},ze({ourProps:o,theirProps:r,defaultTag:Sg,name:"Popover.Group"}))}let Su=w.createContext(null);function kg(){let e=w.useContext(Su),t=w.useRef([]),n=Q(i=>(t.current.push(i),e&&e.register(i),()=>r(i))),r=Q(i=>{let l=t.current.indexOf(i);l!==-1&&t.current.splice(l,1),e&&e.unregister(i)}),o=w.useMemo(()=>({register:n,unregister:r,portals:t}),[n,r,t]);return[t,w.useMemo(()=>function({children:i}){return A.createElement(Su.Provider,{value:o},i)},[o])]}let xg=Te(wg),lp=Te(Eg),Cg=Object.assign(xg,{Group:lp});function Tg(e,t=typeof document<"u"?document.defaultView:null,n){let r=Gn(e,"escape");tp(t,"keydown",o=>{r&&(o.defaultPrevented||o.key===Gd.Escape&&n(o))})}function Pg(){var e;let[t]=w.useState(()=>typeof window<"u"&&typeof window.matchMedia=="function"?window.matchMedia("(pointer: coarse)"):null),[n,r]=w.useState((e=t==null?void 0:t.matches)!=null?e:!1);return he(()=>{if(!t)return;function o(i){r(i.matches)}return t.addEventListener("change",o),()=>t.removeEventListener("change",o)},[t]),n}function Rg({defaultContainers:e=[],portals:t,mainTreeNode:n}={}){let r=qr(n),o=Q(()=>{var i,l;let u=[];for(let s of e)s!==null&&(s instanceof HTMLElement?u.push(s):"current"in s&&s.current instanceof HTMLElement&&u.push(s.current));if(t!=null&&t.current)for(let s of t.current)u.push(s);for(let s of(i=r==null?void 0:r.querySelectorAll("html > *, body > *"))!=null?i:[])s!==document.body&&s!==document.head&&s instanceof HTMLElement&&s.id!=="headlessui-portal-root"&&(n&&(s.contains(n)||s.contains((l=n==null?void 0:n.getRootNode())==null?void 0:l.host))||u.some(a=>s.contains(a))||u.push(s));return u});return{resolveContainers:o,contains:Q(i=>o().some(l=>l.contains(i)))}}let up=w.createContext(null);function rc({children:e,node:t}){let[n,r]=w.useState(null),o=sp(t??n);return A.createElement(up.Provider,{value:o},e,o===null&&A.createElement(gu,{features:ri.Hidden,ref:i=>{var l,u;if(i){for(let s of(u=(l=Ri(i))==null?void 0:l.querySelectorAll("html > *, body > *"))!=null?u:[])if(s!==document.body&&s!==document.head&&s instanceof HTMLElement&&s!=null&&s.contains(i)){r(s);break}}}}))}function sp(e=null){var t;return(t=w.useContext(up))!=null?t:e}function Cs(){let e=w.useRef(!1);return he(()=>(e.current=!0,()=>{e.current=!1}),[]),e}var fr=(e=>(e[e.Forwards=0]="Forwards",e[e.Backwards=1]="Backwards",e))(fr||{});function Ng(){let e=w.useRef(0);return ep(!0,"keydown",t=>{t.key==="Tab"&&(e.current=t.shiftKey?1:0)},!0),e}function ap(e){if(!e)return new Set;if(typeof e=="function")return new Set(e());let t=new Set;for(let n of e.current)n.current instanceof HTMLElement&&t.add(n.current);return t}let _g="div";var Yt=(e=>(e[e.None=0]="None",e[e.InitialFocus=1]="InitialFocus",e[e.TabLock=2]="TabLock",e[e.FocusLock=4]="FocusLock",e[e.RestoreFocus=8]="RestoreFocus",e[e.AutoFocus=16]="AutoFocus",e))(Yt||{});function Lg(e,t){let n=w.useRef(null),r=rt(n,t),{initialFocus:o,initialFocusFallback:i,containers:l,features:u=15,...s}=e;Gr()||(u=0);let a=qr(n);Ag(u,{ownerDocument:a});let c=Dg(u,{ownerDocument:a,container:n,initialFocus:o,initialFocusFallback:i});jg(u,{ownerDocument:a,container:n,containers:l,previousActiveElement:c});let p=Ng(),m=Q(d=>{let f=n.current;f&&(h=>h())(()=>{Ht(p.current,{[fr.Forwards]:()=>{kr(f,ct.First,{skipElements:[d.relatedTarget,i]})},[fr.Backwards]:()=>{kr(f,ct.Last,{skipElements:[d.relatedTarget,i]})}})})}),g=Gn(!!(u&2),"focus-trap#tab-lock"),y=Es(),v=w.useRef(!1),k={ref:r,onKeyDown(d){d.key=="Tab"&&(v.current=!0,y.requestAnimationFrame(()=>{v.current=!1}))},onBlur(d){if(!(u&4))return;let f=ap(l);n.current instanceof HTMLElement&&f.add(n.current);let h=d.relatedTarget;h instanceof HTMLElement&&h.dataset.headlessuiFocusGuard!=="true"&&(cp(f,h)||(v.current?kr(n.current,Ht(p.current,{[fr.Forwards]:()=>ct.Next,[fr.Backwards]:()=>ct.Previous})|ct.WrapAround,{relativeTo:d.target}):d.target instanceof HTMLElement&&mt(d.target)))}};return A.createElement(A.Fragment,null,g&&A.createElement(gu,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:m,features:ri.Focusable}),ze({ourProps:k,theirProps:s,defaultTag:_g,name:"FocusTrap"}),g&&A.createElement(gu,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:m,features:ri.Focusable}))}let Og=Te(Lg),Fg=Object.assign(Og,{features:Yt});function Ug(e=!0){let t=w.useRef(Nt.slice());return xs(([n],[r])=>{r===!0&&n===!1&&Ni(()=>{t.current.splice(0)}),r===!1&&n===!0&&(t.current=Nt.slice())},[e,Nt,t]),Q(()=>{var n;return(n=t.current.find(r=>r!=null&&r.isConnected))!=null?n:null})}function Ag(e,{ownerDocument:t}){let n=!!(e&8),r=Ug(n);xs(()=>{n||(t==null?void 0:t.activeElement)===(t==null?void 0:t.body)&&mt(r())},[n]),np(()=>{n&&mt(r())})}function Dg(e,{ownerDocument:t,container:n,initialFocus:r,initialFocusFallback:o}){let i=w.useRef(null),l=Gn(!!(e&1),"focus-trap#initial-focus"),u=Cs();return xs(()=>{if(e===0)return;if(!l){o!=null&&o.current&&mt(o.current);return}let s=n.current;s&&Ni(()=>{if(!u.current)return;let a=t==null?void 0:t.activeElement;if(r!=null&&r.current){if((r==null?void 0:r.current)===a){i.current=a;return}}else if(s.contains(a)){i.current=a;return}if(r!=null&&r.current)mt(r.current);else{if(e&16){if(kr(s,ct.First|ct.AutoFocus)!==wu.Error)return}else if(kr(s,ct.First)!==wu.Error)return;if(o!=null&&o.current&&(mt(o.current),(t==null?void 0:t.activeElement)===o.current))return;console.warn("There are no focusable elements inside the ")}i.current=t==null?void 0:t.activeElement})},[o,l,e]),i}function jg(e,{ownerDocument:t,container:n,containers:r,previousActiveElement:o}){let i=Cs(),l=!!(e&4);tp(t==null?void 0:t.defaultView,"focus",u=>{if(!l||!i.current)return;let s=ap(r);n.current instanceof HTMLElement&&s.add(n.current);let a=o.current;if(!a)return;let c=u.target;c&&c instanceof HTMLElement?cp(s,c)?(o.current=c,mt(c)):(u.preventDefault(),u.stopPropagation(),mt(a)):mt(o.current)},!0)}function cp(e,t){for(let n of e)if(n.contains(t))return!0;return!1}function fp(e){var t;return!!(e.enter||e.enterFrom||e.enterTo||e.leave||e.leaveFrom||e.leaveTo)||((t=e.as)!=null?t:pp)!==w.Fragment||A.Children.count(e.children)===1}let Oi=w.createContext(null);Oi.displayName="TransitionContext";var $g=(e=>(e.Visible="visible",e.Hidden="hidden",e))($g||{});function Mg(){let e=w.useContext(Oi);if(e===null)throw new Error("A is used but it is missing a parent or .");return e}function Ig(){let e=w.useContext(Fi);if(e===null)throw new Error("A is used but it is missing a parent or .");return e}let Fi=w.createContext(null);Fi.displayName="NestingContext";function Ui(e){return"children"in e?Ui(e.children):e.current.filter(({el:t})=>t.current!==null).filter(({state:t})=>t==="visible").length>0}function dp(e,t){let n=gn(e),r=w.useRef([]),o=Cs(),i=Es(),l=Q((g,y=Ot.Hidden)=>{let v=r.current.findIndex(({el:k})=>k===g);v!==-1&&(Ht(y,{[Ot.Unmount](){r.current.splice(v,1)},[Ot.Hidden](){r.current[v].state="hidden"}}),i.microTask(()=>{var k;!Ui(r)&&o.current&&((k=n.current)==null||k.call(n))}))}),u=Q(g=>{let y=r.current.find(({el:v})=>v===g);return y?y.state!=="visible"&&(y.state="visible"):r.current.push({el:g,state:"visible"}),()=>l(g,Ot.Unmount)}),s=w.useRef([]),a=w.useRef(Promise.resolve()),c=w.useRef({enter:[],leave:[]}),p=Q((g,y,v)=>{s.current.splice(0),t&&(t.chains.current[y]=t.chains.current[y].filter(([k])=>k!==g)),t==null||t.chains.current[y].push([g,new Promise(k=>{s.current.push(k)})]),t==null||t.chains.current[y].push([g,new Promise(k=>{Promise.all(c.current[y].map(([d,f])=>f)).then(()=>k())})]),y==="enter"?a.current=a.current.then(()=>t==null?void 0:t.wait.current).then(()=>v(y)):v(y)}),m=Q((g,y,v)=>{Promise.all(c.current[y].splice(0).map(([k,d])=>d)).then(()=>{var k;(k=s.current.shift())==null||k()}).then(()=>v(y))});return w.useMemo(()=>({children:r,register:u,unregister:l,onStart:p,onStop:m,wait:a,chains:c}),[u,l,r,p,m,c,a])}let pp=w.Fragment,mp=ni.RenderStrategy;function zg(e,t){var n,r;let{transition:o=!0,beforeEnter:i,afterEnter:l,beforeLeave:u,afterLeave:s,enter:a,enterFrom:c,enterTo:p,entered:m,leave:g,leaveFrom:y,leaveTo:v,...k}=e,[d,f]=w.useState(null),h=w.useRef(null),E=fp(e),x=rt(...E?[h,t,f]:t===null?[]:[t]),R=(n=k.unmount)==null||n?Ot.Unmount:Ot.Hidden,{show:P,appear:N,initial:j}=Mg(),[U,ee]=w.useState(P?"visible":"hidden"),Be=Ig(),{register:Ue,unregister:ot}=Be;he(()=>Ue(h),[Ue,h]),he(()=>{if(R===Ot.Hidden&&h.current){if(P&&U!=="visible"){ee("visible");return}return Ht(U,{hidden:()=>ot(h),visible:()=>Ue(h)})}},[U,h,Ue,ot,P,R]);let Kt=Gr();he(()=>{if(E&&Kt&&U==="visible"&&h.current===null)throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?")},[h,U,Kt,E]);let St=j&&!N,Et=N&&P&&j,_=w.useRef(!1),F=dp(()=>{_.current||(ee("hidden"),ot(h))},Be),O=Q(He=>{_.current=!0;let ut=He?"enter":"leave";F.onStart(h,ut,Xn=>{Xn==="enter"?i==null||i():Xn==="leave"&&(u==null||u())})}),z=Q(He=>{let ut=He?"enter":"leave";_.current=!1,F.onStop(h,ut,Xn=>{Xn==="enter"?l==null||l():Xn==="leave"&&(s==null||s())}),ut==="leave"&&!Ui(F)&&(ee("hidden"),ot(h))});w.useEffect(()=>{E&&o||(O(P),z(P))},[P,E,o]);let Y=!(!o||!E||!Kt||St),[,te]=sg(Y,d,P,{start:O,end:z}),it=Xt({ref:x,className:((r=yu(k.className,Et&&a,Et&&c,te.enter&&a,te.enter&&te.closed&&c,te.enter&&!te.closed&&p,te.leave&&g,te.leave&&!te.closed&&y,te.leave&&te.closed&&v,!te.transition&&P&&m))==null?void 0:r.trim())||void 0,...ug(te)}),lt=0;return U==="visible"&&(lt|=Ke.Open),U==="hidden"&&(lt|=Ke.Closed),te.enter&&(lt|=Ke.Opening),te.leave&&(lt|=Ke.Closing),A.createElement(Fi.Provider,{value:F},A.createElement(dg,{value:lt},ze({ourProps:it,theirProps:k,defaultTag:pp,features:mp,visible:U==="visible",name:"Transition.Child"})))}function Bg(e,t){let{show:n,appear:r=!1,unmount:o=!0,...i}=e,l=w.useRef(null),u=fp(e),s=rt(...u?[l,t]:t===null?[]:[t]);Gr();let a=Li();if(n===void 0&&a!==null&&(n=(a&Ke.Open)===Ke.Open),n===void 0)throw new Error("A is used but it is missing a `show={true | false}` prop.");let[c,p]=w.useState(n?"visible":"hidden"),m=dp(()=>{n||p("hidden")}),[g,y]=w.useState(!0),v=w.useRef([n]);he(()=>{g!==!1&&v.current[v.current.length-1]!==n&&(v.current.push(n),y(!1))},[v,n]);let k=w.useMemo(()=>({show:n,appear:r,initial:g}),[n,r,g]);he(()=>{n?p("visible"):!Ui(m)&&l.current!==null&&p("hidden")},[n,m]);let d={unmount:o},f=Q(()=>{var E;g&&y(!1),(E=e.beforeEnter)==null||E.call(e)}),h=Q(()=>{var E;g&&y(!1),(E=e.beforeLeave)==null||E.call(e)});return A.createElement(Fi.Provider,{value:m},A.createElement(Oi.Provider,{value:k},ze({ourProps:{...d,as:w.Fragment,children:A.createElement(hp,{ref:s,...d,...i,beforeEnter:f,beforeLeave:h})},theirProps:{},defaultTag:w.Fragment,features:mp,visible:c==="visible",name:"Transition"})))}function Hg(e,t){let n=w.useContext(Oi)!==null,r=Li()!==null;return A.createElement(A.Fragment,null,!n&&r?A.createElement(Eu,{ref:t,...e}):A.createElement(hp,{ref:t,...e}))}let Eu=Te(Bg),hp=Te(zg),Ts=Te(Hg),_o=Object.assign(Eu,{Child:Ts,Root:Eu});var bg=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(bg||{}),Vg=(e=>(e[e.SetTitleId=0]="SetTitleId",e))(Vg||{});let Wg={0(e,t){return e.titleId===t.id?e:{...e,titleId:t.id}}},Ps=w.createContext(null);Ps.displayName="DialogContext";function Ai(e){let t=w.useContext(Ps);if(t===null){let n=new Error(`<${e} /> is missing a parent component.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,Ai),n}return t}function Qg(e,t){return Ht(t.type,Wg,e,t)}let oc=Te(function(e,t){let n=w.useId(),{id:r=`headlessui-dialog-${n}`,open:o,onClose:i,initialFocus:l,role:u="dialog",autoFocus:s=!0,__demoMode:a=!1,unmount:c=!1,...p}=e,m=w.useRef(!1);u=function(){return u==="dialog"||u==="alertdialog"?u:(m.current||(m.current=!0,console.warn(`Invalid role [${u}] passed to . Only \`dialog\` and and \`alertdialog\` are supported. Using \`dialog\` instead.`)),"dialog")}();let g=Li();o===void 0&&g!==null&&(o=(g&Ke.Open)===Ke.Open);let y=w.useRef(null),v=rt(y,t),k=qr(y),d=o?0:1,[f,h]=w.useReducer(Qg,{titleId:null,descriptionId:null,panelRef:w.createRef()}),E=Q(()=>i(!1)),x=Q(O=>h({type:0,id:O})),R=Gr()?d===0:!1,[P,N]=kg(),j={get current(){var O;return(O=f.panelRef.current)!=null?O:y.current}},U=sp(),{resolveContainers:ee}=Rg({mainTreeNode:U,portals:P,defaultContainers:[j]}),Be=g!==null?(g&Ke.Closing)===Ke.Closing:!1;My(a||Be?!1:R,{allowed:Q(()=>{var O,z;return[(z=(O=y.current)==null?void 0:O.closest("[data-headlessui-portal]"))!=null?z:null]}),disallowed:Q(()=>{var O;return[(O=U==null?void 0:U.closest("body > *:not(#headlessui-portal-root)"))!=null?O:null]})}),Yy(R,ee,O=>{O.preventDefault(),E()}),Tg(R,k==null?void 0:k.defaultView,O=>{O.preventDefault(),O.stopPropagation(),document.activeElement&&"blur"in document.activeElement&&typeof document.activeElement.blur=="function"&&document.activeElement.blur(),E()}),rg(a||Be?!1:R,k,ee),Iy(R,y,E);let[Ue,ot]=_y(),Kt=w.useMemo(()=>[{dialogState:d,close:E,setTitleId:x,unmount:c},f],[d,f,E,x,c]),St=w.useMemo(()=>({open:d===0}),[d]),Et={ref:v,id:r,role:u,tabIndex:-1,"aria-modal":a?void 0:d===0?!0:void 0,"aria-labelledby":f.titleId,"aria-describedby":Ue,unmount:c},_=!Pg(),F=Yt.None;return R&&!a&&(F|=Yt.RestoreFocus,F|=Yt.TabLock,s&&(F|=Yt.AutoFocus),_&&(F|=Yt.InitialFocus)),A.createElement(pg,null,A.createElement(nc,{force:!0},A.createElement(Cg,null,A.createElement(Ps.Provider,{value:Kt},A.createElement(lp,{target:y},A.createElement(nc,{force:!1},A.createElement(ot,{slot:St},A.createElement(N,null,A.createElement(Fg,{initialFocus:l,initialFocusFallback:y,containers:ee,features:F},A.createElement(Dy,{value:E},ze({ourProps:Et,theirProps:p,slot:St,defaultTag:Kg,features:qg,visible:d===0,name:"Dialog"})))))))))))}),Kg="div",qg=ni.RenderStrategy|ni.Static;function Gg(e,t){let{transition:n=!1,open:r,...o}=e,i=Li(),l=e.hasOwnProperty("open")||i!==null,u=e.hasOwnProperty("onClose");if(!l&&!u)throw new Error("You have to provide an `open` and an `onClose` prop to the `Dialog` component.");if(!l)throw new Error("You provided an `onClose` prop to the `Dialog`, but forgot an `open` prop.");if(!u)throw new Error("You provided an `open` prop to the `Dialog`, but forgot an `onClose` prop.");if(!i&&typeof e.open!="boolean")throw new Error(`You provided an \`open\` prop to the \`Dialog\`, but the value is not a boolean. Received: ${e.open}`);if(typeof e.onClose!="function")throw new Error(`You provided an \`onClose\` prop to the \`Dialog\`, but the value is not a function. Received: ${e.onClose}`);return(r!==void 0||n)&&!o.static?A.createElement(rc,null,A.createElement(_o,{show:r,transition:n,unmount:o.unmount},A.createElement(oc,{ref:t,...o}))):A.createElement(rc,null,A.createElement(oc,{ref:t,open:r,...o}))}let Xg="div";function Yg(e,t){let n=w.useId(),{id:r=`headlessui-dialog-panel-${n}`,transition:o=!1,...i}=e,[{dialogState:l,unmount:u},s]=Ai("Dialog.Panel"),a=rt(t,s.panelRef),c=w.useMemo(()=>({open:l===0}),[l]),p=Q(g=>{g.stopPropagation()}),m={ref:a,id:r,onClick:p};return A.createElement(o?Ts:w.Fragment,{...o?{unmount:u}:{}},ze({ourProps:m,theirProps:i,slot:c,defaultTag:Xg,name:"Dialog.Panel"}))}let Jg="div";function Zg(e,t){let{transition:n=!1,...r}=e,[{dialogState:o,unmount:i}]=Ai("Dialog.Backdrop"),l=w.useMemo(()=>({open:o===0}),[o]),u={ref:t,"aria-hidden":!0};return A.createElement(n?Ts:w.Fragment,{...n?{unmount:i}:{}},ze({ourProps:u,theirProps:r,slot:l,defaultTag:Jg,name:"Dialog.Backdrop"}))}let e1="h2";function t1(e,t){let n=w.useId(),{id:r=`headlessui-dialog-title-${n}`,...o}=e,[{dialogState:i,setTitleId:l}]=Ai("Dialog.Title"),u=rt(t);w.useEffect(()=>(l(r),()=>l(null)),[r,l]);let s=w.useMemo(()=>({open:i===0}),[i]);return ze({ourProps:{ref:u,id:r},theirProps:o,slot:s,defaultTag:e1,name:"Dialog.Title"})}let n1=Te(Gg),r1=Te(Yg);Te(Zg);let o1=Te(t1),pl=Object.assign(n1,{Panel:r1,Title:o1,Description:Uy});function i1({show:e,onClose:t,onSubmit:n,title:r,content:o,submitText:i,submitEnabled:l=!0}){return T.jsx(_o,{appear:!0,show:e,as:w.Fragment,children:T.jsxs(pl,{as:"div",className:"relative z-10",onClose:t,children:[T.jsx(_o.Child,{as:w.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"ease-in duration-200",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:T.jsx("div",{className:"fixed inset-0 bg-black bg-opacity-25"})}),T.jsx("div",{className:"fixed inset-0 overflow-y-auto",children:T.jsx("div",{className:"flex min-h-full items-center justify-center p-4 text-center",children:T.jsx(_o.Child,{as:w.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0 scale-95",enterTo:"opacity-100 scale-100",leave:"ease-in duration-200",leaveFrom:"opacity-100 scale-100",leaveTo:"opacity-0 scale-95",children:T.jsxs(pl.Panel,{className:"w-full max-w-md transform overflow-hidden rounded-2xl bg-white p-6 text-left align-middle shadow-xl transition-all",children:[T.jsx(pl.Title,{as:"h3",className:"text-lg font-medium leading-6 text-gray-900",children:r}),T.jsx("div",{className:"mt-3 text-sm text-gray-500",children:o}),T.jsxs("div",{className:"mt-4 flex flex-row-reverse",children:[i&&T.jsx("button",{type:"button",disabled:!l,className:`inline-flex ml-4 justify-center rounded-md border border-transparent ${l?"bg-indigo-600":"bg-grey-300"} px-4 py-2 text-sm font-medium text-indigo-100 ${l?"hover:bg-indigo-500 focus:outline-none focus-visible:ring-2 focus-visible:ring-indigo-500 focus-visible:ring-offset-2":""} transition-all duration-300`,onClick:n,children:i}),T.jsx("button",{type:"button",className:"inline-flex justify-center rounded-md border border-transparent bg-indigo-100 px-4 py-2 text-sm font-medium text-indigo-900 hover:bg-indigo-200 focus:outline-none focus-visible:ring-2 focus-visible:ring-indigo-500 focus-visible:ring-offset-2 transition-all duration-300",onClick:t,children:"Close"})]})]})})})})]})})}function l1(e){const t=w.useRef(null),n=w.useRef(null);return w.useEffect(()=>{t.current&&n.current&&(n.current.src=e.audioUrl,t.current.load())},[e.audioUrl]),T.jsx("div",{className:"flex relative z-10 p-4 w-full mt-4",children:T.jsx("audio",{ref:t,controls:!0,className:"w-full h-14 rounded-lg bg-white shadow-xl shadow-black/5 ring-1 ring-slate-700/10",children:T.jsx("source",{ref:n,type:e.mimeType})})})}function u1(e){const{isModelLoading:t,isTranscribing:n,onClick:r,...o}=e;return T.jsx("button",{...o,onClick:i=>{r&&!n&&!t&&r(i)},disabled:n,className:"text-white bg-blue-700 hover:bg-blue-800 focus:ring-4 focus:ring-blue-300 font-medium rounded-lg text-sm px-5 py-2.5 text-center mr-2 dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800 inline-flex items-center",children:t?T.jsx(ic,{text:"Loading model..."}):n?T.jsx(ic,{text:"Transcribing..."}):"Transcribe Audio"})}function ic(e){return T.jsxs("div",{role:"status",children:[T.jsxs("svg",{"aria-hidden":"true",role:"status",className:"inline w-4 h-4 mr-3 text-white animate-spin",viewBox:"0 0 100 101",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[T.jsx("path",{d:"M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z",fill:"#E5E7EB"}),T.jsx("path",{d:"M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",fill:"currentColor"})]}),e.text]})}function s1(){let e=!1;return function(t){(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(t)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw-(n|u)|c55\/|capi|ccwa|cdm-|cell|chtm|cldc|cmd-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc-s|devi|dica|dmob|do(c|p)o|ds(12|-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(-|_)|g1 u|g560|gene|gf-5|g-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd-(m|p|t)|hei-|hi(pt|ta)|hp( i|ip)|hs-c|ht(c(-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i-(20|go|ma)|i230|iac( |-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|-[a-w])|libw|lynx|m1-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|-([1-8]|c))|phil|pire|pl(ay|uc)|pn-2|po(ck|rt|se)|prox|psio|pt-g|qa-a|qc(07|12|21|32|60|-[2-7]|i-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h-|oo|p-)|sdk\/|se(c(-|0|1)|47|mc|nd|ri)|sgh-|shar|sie(-|m)|sk-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h-|v-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl-|tdg-|tel(i|m)|tim-|t-mo|to(pl|sh)|ts(70|m-|m3|m5)|tx-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas-|your|zeto|zte-/i.test(t.slice(0,4)))&&(e=!0)}(navigator.userAgent||navigator.vendor||("opera"in window&&typeof window.opera=="string"?window.opera:"")),e}const ml=s1(),rn={SAMPLING_RATE:16e3,DEFAULT_AUDIO_URL:`https://huggingface.co/datasets/Xenova/transformers.js-docs/resolve/main/${ml?"jfk":"ted_60_16k"}.wav`,DEFAULT_MODEL:ml?"onnx-community/whisper-tiny":"onnx-community/whisper-large-v3-turbo",DEFAULT_SUBTASK:"transcribe",DEFAULT_LANGUAGE:"french",DEFAULT_QUANTIZED:ml,DEFAULT_MULTILINGUAL:!0};function a1({text:e,percentage:t}){return t=t??0,T.jsx("div",{className:"mt-0.5 w-full relative text-sm text-white background-bg-cyan-400 bg-gray-200 border-1 border-gray-400 rounded-lg text-left overflow-hidden",children:T.jsxs("div",{className:"top-0 h-full bg-blue-500 whitespace-nowrap px-2",style:{width:`${t}%`},children:[e," (",`${t.toFixed(2)}%`,")"]})})}function hl(e){return String(e).padStart(2,"0")}function yp(e){const t=e/3600|0;e-=t*(60*60);const n=e/60|0;e-=n*60;const r=e|0;return`${t?hl(t)+":":""}${hl(n)}:${hl(r)}`}const c1={172351395:{name:"EBML",type:"Container"},646:{name:"EBMLVersion",type:"Uint"},759:{name:"EBMLReadVersion",type:"Uint"},754:{name:"EBMLMaxIDLength",type:"Uint"},755:{name:"EBMLMaxSizeLength",type:"Uint"},642:{name:"DocType",type:"String"},647:{name:"DocTypeVersion",type:"Uint"},645:{name:"DocTypeReadVersion",type:"Uint"},108:{name:"Void",type:"Binary"},63:{name:"CRC-32",type:"Binary"},190023271:{name:"SignatureSlot",type:"Container"},16010:{name:"SignatureAlgo",type:"Uint"},16026:{name:"SignatureHash",type:"Uint"},16037:{name:"SignaturePublicKey",type:"Binary"},16053:{name:"Signature",type:"Binary"},15963:{name:"SignatureElements",type:"Container"},15995:{name:"SignatureElementList",type:"Container"},9522:{name:"SignedElement",type:"Binary"},139690087:{name:"Segment",type:"Container"},21863284:{name:"SeekHead",type:"Container"},3515:{name:"Seek",type:"Container"},5035:{name:"SeekID",type:"Binary"},5036:{name:"SeekPosition",type:"Uint"},88713574:{name:"Info",type:"Container"},13220:{name:"SegmentUID",type:"Binary"},13188:{name:"SegmentFilename",type:"String"},1882403:{name:"PrevUID",type:"Binary"},1868715:{name:"PrevFilename",type:"String"},2013475:{name:"NextUID",type:"Binary"},1999803:{name:"NextFilename",type:"String"},1092:{name:"SegmentFamily",type:"Binary"},10532:{name:"ChapterTranslate",type:"Container"},10748:{name:"ChapterTranslateEditionUID",type:"Uint"},10687:{name:"ChapterTranslateCodec",type:"Uint"},10661:{name:"ChapterTranslateID",type:"Binary"},710577:{name:"TimecodeScale",type:"Uint"},1161:{name:"Duration",type:"Float"},1121:{name:"DateUTC",type:"Date"},15273:{name:"Title",type:"String"},3456:{name:"MuxingApp",type:"String"},5953:{name:"WritingApp",type:"String"},103:{name:"Timecode",type:"Uint"},6228:{name:"SilentTracks",type:"Container"},6359:{name:"SilentTrackNumber",type:"Uint"},39:{name:"Position",type:"Uint"},43:{name:"PrevSize",type:"Uint"},35:{name:"SimpleBlock",type:"Binary"},32:{name:"BlockGroup",type:"Container"},33:{name:"Block",type:"Binary"},34:{name:"BlockVirtual",type:"Binary"},13729:{name:"BlockAdditions",type:"Container"},38:{name:"BlockMore",type:"Container"},110:{name:"BlockAddID",type:"Uint"},37:{name:"BlockAdditional",type:"Binary"},27:{name:"BlockDuration",type:"Uint"},122:{name:"ReferencePriority",type:"Uint"},123:{name:"ReferenceBlock",type:"Int"},125:{name:"ReferenceVirtual",type:"Int"},36:{name:"CodecState",type:"Binary"},13730:{name:"DiscardPadding",type:"Int"},14:{name:"Slices",type:"Container"},104:{name:"TimeSlice",type:"Container"},76:{name:"LaceNumber",type:"Uint"},77:{name:"FrameNumber",type:"Uint"},75:{name:"BlockAdditionID",type:"Uint"},78:{name:"Delay",type:"Uint"},79:{name:"SliceDuration",type:"Uint"},72:{name:"ReferenceFrame",type:"Container"},73:{name:"ReferenceOffset",type:"Uint"},74:{name:"ReferenceTimeCode",type:"Uint"},47:{name:"EncryptedBlock",type:"Binary"},106212971:{name:"Tracks",type:"Container"},46:{name:"TrackEntry",type:"Container"},87:{name:"TrackNumber",type:"Uint"},13253:{name:"TrackUID",type:"Uint"},3:{name:"TrackType",type:"Uint"},57:{name:"FlagEnabled",type:"Uint"},8:{name:"FlagDefault",type:"Uint"},5546:{name:"FlagForced",type:"Uint"},28:{name:"FlagLacing",type:"Uint"},11751:{name:"MinCache",type:"Uint"},11768:{name:"MaxCache",type:"Uint"},254851:{name:"DefaultDuration",type:"Uint"},216698:{name:"DefaultDecodedFieldDuration",type:"Uint"},209231:{name:"TrackTimecodeScale",type:"Float"},4991:{name:"TrackOffset",type:"Int"},5614:{name:"MaxBlockAdditionID",type:"Uint"},4974:{name:"Name",type:"String"},177564:{name:"Language",type:"String"},6:{name:"CodecID",type:"String"},9122:{name:"CodecPrivate",type:"Binary"},362120:{name:"CodecName",type:"String"},13382:{name:"AttachmentLink",type:"Uint"},1742487:{name:"CodecSettings",type:"String"},1785920:{name:"CodecInfoURL",type:"String"},438848:{name:"CodecDownloadURL",type:"String"},42:{name:"CodecDecodeAll",type:"Uint"},12203:{name:"TrackOverlay",type:"Uint"},5802:{name:"CodecDelay",type:"Uint"},5819:{name:"SeekPreRoll",type:"Uint"},9764:{name:"TrackTranslate",type:"Container"},9980:{name:"TrackTranslateEditionUID",type:"Uint"},9919:{name:"TrackTranslateCodec",type:"Uint"},9893:{name:"TrackTranslateTrackID",type:"Binary"},96:{name:"Video",type:"Container"},26:{name:"FlagInterlaced",type:"Uint"},5048:{name:"StereoMode",type:"Uint"},5056:{name:"AlphaMode",type:"Uint"},5049:{name:"OldStereoMode",type:"Uint"},48:{name:"PixelWidth",type:"Uint"},58:{name:"PixelHeight",type:"Uint"},5290:{name:"PixelCropBottom",type:"Uint"},5307:{name:"PixelCropTop",type:"Uint"},5324:{name:"PixelCropLeft",type:"Uint"},5341:{name:"PixelCropRight",type:"Uint"},5296:{name:"DisplayWidth",type:"Uint"},5306:{name:"DisplayHeight",type:"Uint"},5298:{name:"DisplayUnit",type:"Uint"},5299:{name:"AspectRatioType",type:"Uint"},963876:{name:"ColourSpace",type:"Binary"},1029411:{name:"GammaValue",type:"Float"},230371:{name:"FrameRate",type:"Float"},97:{name:"Audio",type:"Container"},53:{name:"SamplingFrequency",type:"Float"},14517:{name:"OutputSamplingFrequency",type:"Float"},31:{name:"Channels",type:"Uint"},15739:{name:"ChannelPositions",type:"Binary"},8804:{name:"BitDepth",type:"Uint"},98:{name:"TrackOperation",type:"Container"},99:{name:"TrackCombinePlanes",type:"Container"},100:{name:"TrackPlane",type:"Container"},101:{name:"TrackPlaneUID",type:"Uint"},102:{name:"TrackPlaneType",type:"Uint"},105:{name:"TrackJoinBlocks",type:"Container"},109:{name:"TrackJoinUID",type:"Uint"},64:{name:"TrickTrackUID",type:"Uint"},65:{name:"TrickTrackSegmentUID",type:"Binary"},70:{name:"TrickTrackFlag",type:"Uint"},71:{name:"TrickMasterTrackUID",type:"Uint"},68:{name:"TrickMasterTrackSegmentUID",type:"Binary"},11648:{name:"ContentEncodings",type:"Container"},8768:{name:"ContentEncoding",type:"Container"},4145:{name:"ContentEncodingOrder",type:"Uint"},4146:{name:"ContentEncodingScope",type:"Uint"},4147:{name:"ContentEncodingType",type:"Uint"},4148:{name:"ContentCompression",type:"Container"},596:{name:"ContentCompAlgo",type:"Uint"},597:{name:"ContentCompSettings",type:"Binary"},4149:{name:"ContentEncryption",type:"Container"},2017:{name:"ContentEncAlgo",type:"Uint"},2018:{name:"ContentEncKeyID",type:"Binary"},2019:{name:"ContentSignature",type:"Binary"},2020:{name:"ContentSigKeyID",type:"Binary"},2021:{name:"ContentSigAlgo",type:"Uint"},2022:{name:"ContentSigHashAlgo",type:"Uint"},206814059:{name:"Cues",type:"Container"},59:{name:"CuePoint",type:"Container"},51:{name:"CueTime",type:"Uint"},55:{name:"CueTrackPositions",type:"Container"},119:{name:"CueTrack",type:"Uint"},113:{name:"CueClusterPosition",type:"Uint"},112:{name:"CueRelativePosition",type:"Uint"},50:{name:"CueDuration",type:"Uint"},4984:{name:"CueBlockNumber",type:"Uint"},106:{name:"CueCodecState",type:"Uint"},91:{name:"CueReference",type:"Container"},22:{name:"CueRefTime",type:"Uint"},23:{name:"CueRefCluster",type:"Uint"},4959:{name:"CueRefNumber",type:"Uint"},107:{name:"CueRefCodecState",type:"Uint"},155296873:{name:"Attachments",type:"Container"},8615:{name:"AttachedFile",type:"Container"},1662:{name:"FileDescription",type:"String"},1646:{name:"FileName",type:"String"},1632:{name:"FileMimeType",type:"String"},1628:{name:"FileData",type:"Binary"},1710:{name:"FileUID",type:"Uint"},1653:{name:"FileReferral",type:"Binary"},1633:{name:"FileUsedStartTime",type:"Uint"},1634:{name:"FileUsedEndTime",type:"Uint"},4433776:{name:"Chapters",type:"Container"},1465:{name:"EditionEntry",type:"Container"},1468:{name:"EditionUID",type:"Uint"},1469:{name:"EditionFlagHidden",type:"Uint"},1499:{name:"EditionFlagDefault",type:"Uint"},1501:{name:"EditionFlagOrdered",type:"Uint"},54:{name:"ChapterAtom",type:"Container"},13252:{name:"ChapterUID",type:"Uint"},5716:{name:"ChapterStringUID",type:"String"},17:{name:"ChapterTimeStart",type:"Uint"},18:{name:"ChapterTimeEnd",type:"Uint"},24:{name:"ChapterFlagHidden",type:"Uint"},1432:{name:"ChapterFlagEnabled",type:"Uint"},11879:{name:"ChapterSegmentUID",type:"Binary"},11964:{name:"ChapterSegmentEditionUID",type:"Uint"},9155:{name:"ChapterPhysicalEquiv",type:"Uint"},15:{name:"ChapterTrack",type:"Container"},9:{name:"ChapterTrackNumber",type:"Uint"},0:{name:"ChapterDisplay",type:"Container"},5:{name:"ChapString",type:"String"},892:{name:"ChapLanguage",type:"String"},894:{name:"ChapCountry",type:"String"},10564:{name:"ChapProcess",type:"Container"},10581:{name:"ChapProcessCodecID",type:"Uint"},1293:{name:"ChapProcessPrivate",type:"Binary"},10513:{name:"ChapProcessCommand",type:"Container"},10530:{name:"ChapProcessTime",type:"Uint"},10547:{name:"ChapProcessData",type:"Binary"},39109479:{name:"Tags",type:"Container"},13171:{name:"Tag",type:"Container"},9152:{name:"Targets",type:"Container"},10442:{name:"TargetTypeValue",type:"Uint"},9162:{name:"TargetType",type:"String"},9157:{name:"TagTrackUID",type:"Uint"},9161:{name:"TagEditionUID",type:"Uint"},9156:{name:"TagChapterUID",type:"Uint"},9158:{name:"TagAttachmentUID",type:"Uint"},10184:{name:"SimpleTag",type:"Container"},1443:{name:"TagName",type:"String"},1146:{name:"TagLanguage",type:"String"},1156:{name:"TagDefault",type:"Uint"},1159:{name:"TagString",type:"String"},1157:{name:"TagBinary",type:"Binary"}};class ii{constructor(t="Unknown",n="Unknown"){this.name=t,this.type=n}updateBySource(){}setSource(t){this.source=t,this.updateBySource()}updateByData(){}setData(t){this.data=t,this.updateByData()}}class f1 extends ii{constructor(t,n){super(t,n||"Uint")}updateBySource(){this.data="";for(let t=0;t=o&&r<8;r++,o*=128);if(!n){let i=o+t;for(let l=r-1;l>=0;l--){const u=i%256;this.source[this.offset+l]=u,i=(i-u)/256}}this.offset+=r}writeSections(t=!1){this.offset=0;for(let n=0;nnew Promise((r,o)=>{try{const i=new FileReader;i.addEventListener("loadend",()=>{try{const l=i.result,u=new d1(new Uint8Array(l));u.fixDuration(t)?r(u.toBlob(n)):r(e)}catch(l){o(l)}}),i.addEventListener("error",()=>o()),i.readAsArrayBuffer(e)}catch(i){o(i)}});function m1(){const e=["audio/webm","audio/mp4","audio/ogg","audio/wav","audio/aac"];for(let t=0;t{l(null);try{u.current||(u.current=await navigator.mediaDevices.getUserMedia({audio:!0}));const g=Date.now(),y=m1(),v=new MediaRecorder(u.current,{mimeType:y});s.current=v,v.addEventListener("dataavailable",async k=>{if(k.data.size===0)return;a.current.push(k.data);const d=Date.now()-g;let f=new Blob(a.current,{type:y});v.state==="inactive"?(y==="audio/webm"&&(f=await p1(f,d,f.type)),l(f),e.onRecordingComplete(f),a.current=[]):v.state==="recording"&&e.onRecordingProgress(f)}),v.start(),n(!0)}catch(g){console.error("Error accessing microphone:",g)}},p=()=>{var g;((g=s.current)==null?void 0:g.state)==="recording"&&(s.current.stop(),o(0),n(!1))};w.useEffect(()=>{if(t){const g=setInterval(()=>{o(y=>y+1)},1e3);return()=>{clearInterval(g)}}},[t]);const m=()=>{t?p():c()};return T.jsx("div",{className:"flex flex-col justify-center items-center",children:T.jsx("button",{type:"button",className:`m-2 inline-flex justify-center rounded-md border border-transparent px-4 py-2 text-sm font-medium text-white focus:outline-none focus-visible:ring-2 focus-visible:ring-indigo-500 focus-visible:ring-offset-2 transition-all duration-200 ${t?"bg-red-500 hover:bg-red-600":"bg-green-500 hover:bg-green-600"}`,onClick:m,children:t?`Stop Recording (${yp(r)})`:"Start Recording"})})}function y1(e){return e=e.toLowerCase(),(e.match(/\w+.?/g)||[]).map(t=>t.charAt(0).toUpperCase()+t.slice(1)).join("")}const uc={fr:"french",en:"english",zh:"chinese",de:"german",es:"spanish/castilian",ru:"russian",ko:"korean",ja:"japanese",pt:"portuguese",tr:"turkish",pl:"polish",ca:"catalan/valencian",nl:"dutch/flemish",ar:"arabic",sv:"swedish",it:"italian",id:"indonesian",hi:"hindi",fi:"finnish",vi:"vietnamese",he:"hebrew",uk:"ukrainian",el:"greek",ms:"malay",cs:"czech",ro:"romanian/moldavian/moldovan",da:"danish",hu:"hungarian",ta:"tamil",no:"norwegian",th:"thai",ur:"urdu",hr:"croatian",bg:"bulgarian",lt:"lithuanian",la:"latin",mi:"maori",ml:"malayalam",cy:"welsh",sk:"slovak",te:"telugu",fa:"persian",lv:"latvian",bn:"bengali",sr:"serbian",az:"azerbaijani",sl:"slovenian",kn:"kannada",et:"estonian",mk:"macedonian",br:"breton",eu:"basque",is:"icelandic",hy:"armenian",ne:"nepali",mn:"mongolian",bs:"bosnian",kk:"kazakh",sq:"albanian",sw:"swahili",gl:"galician",mr:"marathi",pa:"punjabi/panjabi",si:"sinhala/sinhalese",km:"khmer",sn:"shona",yo:"yoruba",so:"somali",af:"afrikaans",oc:"occitan",ka:"georgian",be:"belarusian",tg:"tajik",sd:"sindhi",gu:"gujarati",am:"amharic",yi:"yiddish",lo:"lao",uz:"uzbek",fo:"faroese",ht:"haitian creole/haitian",ps:"pashto/pushto",tk:"turkmen",nn:"nynorsk",mt:"maltese",sa:"sanskrit",lb:"luxembourgish/letzeburgesch",my:"myanmar/burmese",bo:"tibetan",tl:"tagalog",mg:"malagasy",as:"assamese",tt:"tatar",haw:"hawaiian",ln:"lingala",ha:"hausa",ba:"bashkir",jw:"javanese",su:"sundanese"},g1=Object.entries({"onnx-community/whisper-tiny":120,"onnx-community/whisper-base":206,"onnx-community/whisper-small":586,"onnx-community/whisper-large-v3-turbo":1604,"onnx-community/distil-small.en":538});function v1(e){const[t,n]=w.useState(0),[r,o]=w.useState(void 0),[i,l]=w.useState(void 0),u=()=>{o(void 0),l(void 0)},s=async(m,g)=>{const y=new AudioContext({sampleRate:rn.SAMPLING_RATE}),v=URL.createObjectURL(new Blob([m],{type:"audio/*"})),k=await y.decodeAudioData(m);o({buffer:k,url:v,source:"URL",mimeType:g})},a=async m=>{u(),n(0);const g=URL.createObjectURL(m),y=new FileReader;y.onprogress=v=>{n(v.loaded/v.total||0)},y.onloadend=async()=>{const v=new AudioContext({sampleRate:rn.SAMPLING_RATE}),k=y.result,d=await v.decodeAudioData(k);n(void 0),o({buffer:d,url:g,source:"RECORDING",mimeType:m.type})},y.readAsArrayBuffer(m)},c=async m=>{if(i)try{o(void 0),n(0);const{data:g,headers:y}=await Z.get(i,{signal:m.signal,responseType:"arraybuffer",onDownloadProgress(k){n(k.progress||0)}});let v=y["content-type"];(!v||v==="audio/wave")&&(v="audio/wav"),s(g,v)}catch(g){console.log("Request failed or aborted",g),n(void 0)}};w.useEffect(()=>{if(i){const m=new AbortController;return c(m),()=>{m.abort()}}},[i]);const p=m=>{a(m)};return T.jsxs(T.Fragment,{children:[T.jsxs("div",{children:[" ",T.jsx(h1,{onRecordingProgress:m=>{},onRecordingComplete:p})]}),r&&T.jsxs(T.Fragment,{children:[T.jsx(l1,{audioUrl:r.url,mimeType:r.mimeType}),T.jsx("div",{className:"relative w-full flex justify-center items-center",children:T.jsx(u1,{onClick:()=>{e.transcriber.start(r.buffer)},isModelLoading:e.transcriber.isModelLoading,isTranscribing:e.transcriber.isBusy})}),e.transcriber.progressItems.length>0&&T.jsxs("div",{className:"relative z-10 p-4 w-full text-center",children:[T.jsx("label",{children:"Loading model files... (only run once)"}),e.transcriber.progressItems.map(m=>T.jsx("div",{children:T.jsx(a1,{text:m.file,percentage:m.progress})},m.file))]})]}),T.jsx(w1,{className:"absolute bottom-4 right-4",transcriber:e.transcriber,icon:T.jsx(k1,{})})]})}function w1(e){const[t,n]=w.useState(!1),r=()=>{n(!0)},o=()=>{n(!1)},i=()=>{o()};return T.jsxs("div",{className:e.className,children:[T.jsx(E1,{icon:e.icon,onClick:r}),T.jsx(S1,{show:t,onSubmit:i,onClose:o,transcriber:e.transcriber})]})}function S1(e){const t=Object.values(uc).map(y1),n=g1.filter(([r,o])=>!e.transcriber.multilingual||!r.includes("/distil-")).map(([r,o])=>({key:r,size:o,id:`${r}${e.transcriber.multilingual||r.includes("/distil-")?"":".en"}`}));return T.jsx(i1,{show:e.show,title:"Settings",content:T.jsxs(T.Fragment,{children:[T.jsx("label",{children:"Select the model to use."}),T.jsx("select",{className:"mt-1 mb-1 bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500",value:e.transcriber.model,onChange:r=>{e.transcriber.setModel(r.target.value)},children:n.map(({key:r,id:o,size:i})=>T.jsx("option",{value:o,children:`${o} (${i}MB)`},r))}),T.jsx("div",{className:"flex justify-end items-center mb-3 px-1",children:T.jsxs("div",{className:"flex",children:[T.jsx("input",{id:"multilingual",type:"checkbox",checked:e.transcriber.multilingual,onChange:r=>{let o=rn.DEFAULT_MODEL;r.target.checked||(o+=".en"),e.transcriber.setModel(o),e.transcriber.setMultilingual(r.target.checked)}}),T.jsx("label",{htmlFor:"multilingual",className:"ms-1",children:"Multilingual"})]})}),e.transcriber.multilingual&&T.jsxs(T.Fragment,{children:[T.jsx("label",{children:"Select the source language."}),T.jsx("select",{className:"mt-1 mb-3 bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500",defaultValue:e.transcriber.language,onChange:r=>{e.transcriber.setLanguage(r.target.value)},children:Object.keys(uc).map((r,o)=>T.jsx("option",{value:r,children:t[o]},r))}),T.jsx("label",{children:"Select the task to perform."}),T.jsxs("select",{className:"mt-1 mb-3 bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500",defaultValue:e.transcriber.subtask,onChange:r=>{e.transcriber.setSubtask(r.target.value)},children:[T.jsx("option",{value:"transcribe",children:"Transcribe"}),T.jsx("option",{value:"translate",children:"Translate (to English)"})]})]})]}),onClose:e.onClose,onSubmit:()=>{}})}function E1(e){return T.jsxs("button",{onClick:e.onClick,className:"flex items-center justify-center rounded-lg p-2 bg-blue text-slate-500 hover:text-indigo-600 hover:bg-indigo-50 transition-all duration-200",children:[T.jsx("div",{className:"w-7 h-7",children:e.icon}),e.text&&T.jsx("div",{className:"ml-2 break-text text-center text-md w-30",children:e.text})]})}function k1(){return T.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:"1.25",stroke:"currentColor",children:[T.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9.594 3.94c.09-.542.56-.94 1.11-.94h2.593c.55 0 1.02.398 1.11.94l.213 1.281c.063.374.313.686.645.87.074.04.147.083.22.127.324.196.72.257 1.075.124l1.217-.456a1.125 1.125 0 011.37.49l1.296 2.247a1.125 1.125 0 01-.26 1.431l-1.003.827c-.293.24-.438.613-.431.992a6.759 6.759 0 010 .255c-.007.378.138.75.43.99l1.005.828c.424.35.534.954.26 1.43l-1.298 2.247a1.125 1.125 0 01-1.369.491l-1.217-.456c-.355-.133-.75-.072-1.076.124a6.57 6.57 0 01-.22.128c-.331.183-.581.495-.644.869l-.213 1.28c-.09.543-.56.941-1.11.941h-2.594c-.55 0-1.02-.398-1.11-.94l-.213-1.281c-.062-.374-.312-.686-.644-.87a6.52 6.52 0 01-.22-.127c-.325-.196-.72-.257-1.076-.124l-1.217.456a1.125 1.125 0 01-1.369-.49l-1.297-2.247a1.125 1.125 0 01.26-1.431l1.004-.827c.292-.24.437-.613.43-.992a6.932 6.932 0 010-.255c.007-.378-.138-.75-.43-.99l-1.004-.828a1.125 1.125 0 01-.26-1.43l1.297-2.247a1.125 1.125 0 011.37-.491l1.216.456c.356.133.751.072 1.076-.124.072-.044.146-.087.22-.128.332-.183.582-.495.644-.869l.214-1.281z"}),T.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"})]})}function x1({transcribedData:e}){const t=w.useRef(null),n=(i,l)=>{const u=URL.createObjectURL(i),s=document.createElement("a");s.href=u,s.download=l,s.click(),URL.revokeObjectURL(u)},r=()=>{const l=((e==null?void 0:e.chunks)??[]).map(s=>s.text).join(` `).trim(),u=new Blob([l],{type:"text/plain"});n(u,"transcript.txt")},o=()=>{let i=JSON.stringify((e==null?void 0:e.chunks)??[],null,2);const l=/( {4}"timestamp": )\[\s+(\S+)\s+(\S+)\s+\]/gm;i=i.replace(l,"$1[$2 $3]");const u=new Blob([i],{type:"application/json"});n(u,"transcript.json")};return w.useEffect(()=>{t.current&&Math.abs(t.current.offsetHeight+t.current.scrollTop-t.current.scrollHeight)<=100&&(t.current.scrollTop=t.current.scrollHeight)}),T.jsxs("div",{ref:t,className:"w-full flex flex-col my-2 p-4 max-h-[20rem] overflow-y-auto",children:[(e==null?void 0:e.chunks)&&e.chunks.map((i,l)=>T.jsxs("div",{className:`w-full flex flex-row mb-2 ${e!=null&&e.isBusy?"bg-gray-100":"bg-white"} rounded-lg p-4 shadow-xl shadow-black/5 ring-1 ring-slate-700/10`,children:[T.jsx("div",{className:"mr-5",children:yp(i.timestamp[0])}),i.text]},`${l}-${i.text}`)),(e==null?void 0:e.tps)&&T.jsxs("p",{className:"text-sm text-center mt-4 mb-1",children:[T.jsx("span",{className:"font-semibold text-black",children:e==null?void 0:e.tps.toFixed(2)})," ",T.jsx("span",{className:"text-gray-500",children:"tokens/second"})]}),e&&!e.isBusy&&T.jsxs("div",{className:"w-full text-right",children:[T.jsx("button",{onClick:r,className:"text-white bg-green-500 hover:bg-green-600 focus:ring-4 focus:ring-green-300 font-medium rounded-lg text-sm px-4 py-2 text-center mr-2 dark:bg-green-600 dark:hover:bg-green-700 dark:focus:ring-green-800 inline-flex items-center",children:"Export TXT"}),T.jsx("button",{onClick:o,className:"text-white bg-green-500 hover:bg-green-600 focus:ring-4 focus:ring-green-300 font-medium rounded-lg text-sm px-4 py-2 text-center mr-2 dark:bg-green-600 dark:hover:bg-green-700 dark:focus:ring-green-800 inline-flex items-center",children:"Export JSON"})]})]})}function C1(e){const[t]=w.useState(()=>T1(e));return t}function T1(e){const t=new Worker(new URL("/assets/worker-749W3JaX.js",import.meta.url),{type:"module"});return t.addEventListener("message",e),t}function P1(){const[e,t]=w.useState(void 0),[n,r]=w.useState(!1),[o,i]=w.useState(!1),[l,u]=w.useState([]),s=C1(E=>{const x=E.data;switch(x.status){case"progress":u(N=>N.map(j=>j.file===x.file?{...j,progress:x.progress}:j));break;case"update":case"complete":const R=x.status==="update",P=x;t({isBusy:R,text:P.data.text,tps:P.data.tps,chunks:P.data.chunks}),r(R);break;case"initiate":i(!0),u(N=>[...N,x]);break;case"ready":i(!1);break;case"error":r(!1),alert(`An error occurred: "${x.data.message}". Please file a bug report.`);break;case"done":u(N=>N.filter(j=>j.file!==x.file));break}}),[a,c]=w.useState(rn.DEFAULT_MODEL),[p,m]=w.useState(rn.DEFAULT_SUBTASK),[g,y]=w.useState(rn.DEFAULT_MULTILINGUAL),[v,k]=w.useState(rn.DEFAULT_LANGUAGE),d=w.useCallback(()=>{t(void 0)},[]),f=w.useCallback(async E=>{if(E){t(void 0),r(!0);let x;if(E.numberOfChannels===2){const R=Math.sqrt(2),P=E.getChannelData(0),N=E.getChannelData(1);x=new Float32Array(P.length);for(let j=0;j({onInputChange:d,isBusy:n,isModelLoading:o,progressItems:l,start:f,output:e,model:a,setModel:c,multilingual:g,setMultilingual:y,subtask:p,setSubtask:m,language:v,setLanguage:k}),[n,o,l,f,e,a,g,p,v])}const R1=!!navigator.gpu;function N1(){const e=P1();return R1?T.jsxs("div",{className:"flex justify-center items-center min-h-screen",children:[T.jsxs("div",{className:"container flex flex-col justify-center items-center",children:[T.jsx("h1",{className:"text-5xl font-extrabold tracking-tight text-slate-900 sm:text-7xl text-center",children:"Local Whisper"}),T.jsx("h2",{className:"mt-3 mb-5 px-4 text-center text-1xl font-semibold tracking-tight text-slate-900 sm:text-2xl",children:"A very simple interface to directly record your audio and transcribe it locally."}),T.jsx(v1,{transcriber:e}),T.jsx(x1,{transcribedData:e.output})]}),T.jsxs("div",{className:"absolute bottom-4",children:["Made with"," ",T.jsx("a",{className:"underline",href:"https://github.com/xenova/transformers.js",children:"🤗 Transformers.js"})]})]}):T.jsxs("div",{className:"fixed w-screen h-screen bg-black z-10 bg-opacity-[92%] text-white text-2xl font-semibold flex justify-center items-center text-center",children:["WebGPU is not supported",T.jsx("br",{}),"by this browser :("]})}yl.createRoot(document.getElementById("root")).render(T.jsx(A.StrictMode,{children:T.jsx(N1,{})}));