function jw(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 s of i.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&r(s)}).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 lm(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var am={exports:{}},zs={},cm={exports:{}},te={};/** * @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 ei=Symbol.for("react.element"),Lw=Symbol.for("react.portal"),Iw=Symbol.for("react.fragment"),$w=Symbol.for("react.strict_mode"),Fw=Symbol.for("react.profiler"),zw=Symbol.for("react.provider"),Uw=Symbol.for("react.context"),Bw=Symbol.for("react.forward_ref"),Vw=Symbol.for("react.suspense"),Hw=Symbol.for("react.memo"),Ww=Symbol.for("react.lazy"),ef=Symbol.iterator;function Kw(e){return e===null||typeof e!="object"?null:(e=ef&&e[ef]||e["@@iterator"],typeof e=="function"?e:null)}var um={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},dm=Object.assign,fm={};function Wr(e,t,n){this.props=e,this.context=t,this.refs=fm,this.updater=n||um}Wr.prototype.isReactComponent={};Wr.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")};Wr.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function pm(){}pm.prototype=Wr.prototype;function Uc(e,t,n){this.props=e,this.context=t,this.refs=fm,this.updater=n||um}var Bc=Uc.prototype=new pm;Bc.constructor=Uc;dm(Bc,Wr.prototype);Bc.isPureReactComponent=!0;var tf=Array.isArray,mm=Object.prototype.hasOwnProperty,Vc={current:null},hm={key:!0,ref:!0,__self:!0,__source:!0};function vm(e,t,n){var r,o={},i=null,s=null;if(t!=null)for(r in t.ref!==void 0&&(s=t.ref),t.key!==void 0&&(i=""+t.key),t)mm.call(t,r)&&!hm.hasOwnProperty(r)&&(o[r]=t[r]);var l=arguments.length-2;if(l===1)o.children=n;else if(1>>1,N=A[W];if(0>>1;W<$;){var K=2*(W+1)-1,z=A[K],G=K+1,Q=A[G];if(0>o(z,L))Go(Q,z)?(A[W]=Q,A[G]=L,W=G):(A[W]=z,A[K]=L,W=K);else if(Go(Q,L))A[W]=Q,A[G]=L,W=G;else break e}}return T}function o(A,T){var L=A.sortIndex-T.sortIndex;return L!==0?L:A.id-T.id}if(typeof performance=="object"&&typeof performance.now=="function"){var i=performance;e.unstable_now=function(){return i.now()}}else{var s=Date,l=s.now();e.unstable_now=function(){return s.now()-l}}var a=[],u=[],f=1,d=null,p=3,w=!1,y=!1,v=!1,S=typeof setTimeout=="function"?setTimeout:null,h=typeof clearTimeout=="function"?clearTimeout:null,g=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function x(A){for(var T=n(u);T!==null;){if(T.callback===null)r(u);else if(T.startTime<=A)r(u),T.sortIndex=T.expirationTime,t(a,T);else break;T=n(u)}}function C(A){if(v=!1,x(A),!y)if(n(a)!==null)y=!0,H(E);else{var T=n(u);T!==null&&I(C,T.startTime-A)}}function E(A,T){y=!1,v&&(v=!1,h(R),R=-1),w=!0;var L=p;try{for(x(T),d=n(a);d!==null&&(!(d.expirationTime>T)||A&&!D());){var W=d.callback;if(typeof W=="function"){d.callback=null,p=d.priorityLevel;var N=W(d.expirationTime<=T);T=e.unstable_now(),typeof N=="function"?d.callback=N:d===n(a)&&r(a),x(T)}else r(a);d=n(a)}if(d!==null)var $=!0;else{var K=n(u);K!==null&&I(C,K.startTime-T),$=!1}return $}finally{d=null,p=L,w=!1}}var b=!1,_=null,R=-1,k=5,P=-1;function D(){return!(e.unstable_now()-PA||125W?(A.sortIndex=L,t(u,A),n(a)===null&&A===n(u)&&(v?(h(R),R=-1):v=!0,I(C,L-W))):(A.sortIndex=N,t(a,A),y||w||(y=!0,H(E))),A},e.unstable_shouldYield=D,e.unstable_wrapCallback=function(A){var T=p;return function(){var L=p;p=T;try{return A.apply(this,arguments)}finally{p=L}}}})(Cm);Sm.exports=Cm;var rx=Sm.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 ox=c,tt=rx;function j(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"),ba=Object.prototype.hasOwnProperty,ix=/^[: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]*$/,rf={},of={};function sx(e){return ba.call(of,e)?!0:ba.call(rf,e)?!1:ix.test(e)?of[e]=!0:(rf[e]=!0,!1)}function lx(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 ax(e,t,n,r){if(t===null||typeof t>"u"||lx(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 Be(e,t,n,r,o,i,s){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=s}var Te={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Te[e]=new Be(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Te[t]=new Be(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Te[e]=new Be(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Te[e]=new Be(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){Te[e]=new Be(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Te[e]=new Be(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Te[e]=new Be(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Te[e]=new Be(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Te[e]=new Be(e,5,!1,e.toLowerCase(),null,!1,!1)});var Wc=/[\-:]([a-z])/g;function Kc(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(Wc,Kc);Te[t]=new Be(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(Wc,Kc);Te[t]=new Be(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(Wc,Kc);Te[t]=new Be(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Te[e]=new Be(e,1,!1,e.toLowerCase(),null,!1,!1)});Te.xlinkHref=new Be("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Te[e]=new Be(e,1,!1,e.toLowerCase(),null,!0,!0)});function Gc(e,t,n,r){var o=Te.hasOwnProperty(t)?Te[t]:null;(o!==null?o.type!==0:r||!(2l||o[s]!==i[l]){var a=` `+o[s].replace(" at new "," at ");return e.displayName&&a.includes("")&&(a=a.replace("",e.displayName)),a}while(1<=s&&0<=l);break}}}finally{Al=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?co(e):""}function cx(e){switch(e.tag){case 5:return co(e.type);case 16:return co("Lazy");case 13:return co("Suspense");case 19:return co("SuspenseList");case 0:case 2:case 15:return e=Dl(e.type,!1),e;case 11:return e=Dl(e.type.render,!1),e;case 1:return e=Dl(e.type,!0),e;default:return""}}function Na(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 mr:return"Fragment";case pr:return"Portal";case Ra:return"Profiler";case Yc:return"StrictMode";case Pa:return"Suspense";case ka:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case bm:return(e.displayName||"Context")+".Consumer";case _m:return(e._context.displayName||"Context")+".Provider";case Xc:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Qc:return t=e.displayName||null,t!==null?t:Na(e.type)||"Memo";case ln:t=e._payload,e=e._init;try{return Na(e(t))}catch{}}return null}function ux(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 Na(t);case 8:return t===Yc?"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 Sn(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Pm(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function dx(e){var t=Pm(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(s){r=""+s,i.call(this,s)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(s){r=""+s},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function gi(e){e._valueTracker||(e._valueTracker=dx(e))}function km(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=Pm(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function os(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 Ta(e,t){var n=t.checked;return ve({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function lf(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=Sn(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 Nm(e,t){t=t.checked,t!=null&&Gc(e,"checked",t,!1)}function Aa(e,t){Nm(e,t);var n=Sn(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")?Da(e,t.type,n):t.hasOwnProperty("defaultValue")&&Da(e,t.type,Sn(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function af(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 Da(e,t,n){(t!=="number"||os(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var uo=Array.isArray;function br(e,t,n,r){if(e=e.options,t){t={};for(var o=0;o"+t.valueOf().toString()+"",t=yi.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function No(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var ho={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},fx=["Webkit","ms","Moz","O"];Object.keys(ho).forEach(function(e){fx.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),ho[t]=ho[e]})});function Mm(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||ho.hasOwnProperty(e)&&ho[e]?(""+t).trim():t+"px"}function Om(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,o=Mm(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}}var px=ve({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 ja(e,t){if(t){if(px[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(j(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(j(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(j(61))}if(t.style!=null&&typeof t.style!="object")throw Error(j(62))}}function La(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 Ia=null;function Zc(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var $a=null,Rr=null,Pr=null;function df(e){if(e=ri(e)){if(typeof $a!="function")throw Error(j(280));var t=e.stateNode;t&&(t=Ws(t),$a(e.stateNode,e.type,t))}}function jm(e){Rr?Pr?Pr.push(e):Pr=[e]:Rr=e}function Lm(){if(Rr){var e=Rr,t=Pr;if(Pr=Rr=null,df(e),t)for(e=0;e>>=0,e===0?32:31-(_x(e)/bx|0)|0}var wi=64,xi=4194304;function fo(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 as(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,o=e.suspendedLanes,i=e.pingedLanes,s=n&268435455;if(s!==0){var l=s&~o;l!==0?r=fo(l):(i&=s,i!==0&&(r=fo(i)))}else s=n&~o,s!==0?r=fo(s):i!==0&&(r=fo(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 ti(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-wt(t),e[t]=n}function Nx(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=go),xf=" ",Sf=!1;function nh(e,t){switch(e){case"keyup":return rS.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function rh(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var hr=!1;function iS(e,t){switch(e){case"compositionend":return rh(t);case"keypress":return t.which!==32?null:(Sf=!0,xf);case"textInput":return e=t.data,e===xf&&Sf?null:e;default:return null}}function sS(e,t){if(hr)return e==="compositionend"||!iu&&nh(e,t)?(e=eh(),Ki=nu=dn=null,hr=!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=bf(n)}}function lh(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?lh(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function ah(){for(var e=window,t=os();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=os(e.document)}return t}function su(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 hS(e){var t=ah(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&lh(n.ownerDocument.documentElement,n)){if(r!==null&&su(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=Rf(n,i);var s=Rf(n,r);o&&s&&(e.rangeCount!==1||e.anchorNode!==o.node||e.anchorOffset!==o.offset||e.focusNode!==s.node||e.focusOffset!==s.offset)&&(t=t.createRange(),t.setStart(o.node,o.offset),e.removeAllRanges(),i>r?(e.addRange(t),e.extend(s.node,s.offset)):(t.setEnd(s.node,s.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,vr=null,Ha=null,wo=null,Wa=!1;function Pf(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Wa||vr==null||vr!==os(r)||(r=vr,"selectionStart"in r&&su(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}),wo&&jo(wo,r)||(wo=r,r=ds(Ha,"onSelect"),0wr||(e.current=Za[wr],Za[wr]=null,wr--)}function le(e,t){wr++,Za[wr]=e.current,e.current=t}var Cn={},je=Nn(Cn),Ke=Nn(!1),Vn=Cn;function Lr(e,t){var n=e.type.contextTypes;if(!n)return Cn;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 Ge(e){return e=e.childContextTypes,e!=null}function ps(){de(Ke),de(je)}function Of(e,t,n){if(je.current!==Cn)throw Error(j(168));le(je,t),le(Ke,n)}function gh(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(j(108,ux(e)||"Unknown",o));return ve({},n,r)}function ms(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Cn,Vn=je.current,le(je,e),le(Ke,Ke.current),!0}function jf(e,t,n){var r=e.stateNode;if(!r)throw Error(j(169));n?(e=gh(e,t,Vn),r.__reactInternalMemoizedMergedChildContext=e,de(Ke),de(je),le(je,e)):de(Ke),le(Ke,n)}var zt=null,Ks=!1,Kl=!1;function yh(e){zt===null?zt=[e]:zt.push(e)}function PS(e){Ks=!0,yh(e)}function Tn(){if(!Kl&&zt!==null){Kl=!0;var e=0,t=se;try{var n=zt;for(se=1;e>=s,o-=s,Ut=1<<32-wt(t)+o|n<R?(k=_,_=null):k=_.sibling;var P=p(h,_,x[R],C);if(P===null){_===null&&(_=k);break}e&&_&&P.alternate===null&&t(h,_),g=i(P,g,R),b===null?E=P:b.sibling=P,b=P,_=k}if(R===x.length)return n(h,_),fe&&Dn(h,R),E;if(_===null){for(;RR?(k=_,_=null):k=_.sibling;var D=p(h,_,P.value,C);if(D===null){_===null&&(_=k);break}e&&_&&D.alternate===null&&t(h,_),g=i(D,g,R),b===null?E=D:b.sibling=D,b=D,_=k}if(P.done)return n(h,_),fe&&Dn(h,R),E;if(_===null){for(;!P.done;R++,P=x.next())P=d(h,P.value,C),P!==null&&(g=i(P,g,R),b===null?E=P:b.sibling=P,b=P);return fe&&Dn(h,R),E}for(_=r(h,_);!P.done;R++,P=x.next())P=w(_,h,R,P.value,C),P!==null&&(e&&P.alternate!==null&&_.delete(P.key===null?R:P.key),g=i(P,g,R),b===null?E=P:b.sibling=P,b=P);return e&&_.forEach(function(M){return t(h,M)}),fe&&Dn(h,R),E}function S(h,g,x,C){if(typeof x=="object"&&x!==null&&x.type===mr&&x.key===null&&(x=x.props.children),typeof x=="object"&&x!==null){switch(x.$$typeof){case vi:e:{for(var E=x.key,b=g;b!==null;){if(b.key===E){if(E=x.type,E===mr){if(b.tag===7){n(h,b.sibling),g=o(b,x.props.children),g.return=h,h=g;break e}}else if(b.elementType===E||typeof E=="object"&&E!==null&&E.$$typeof===ln&&$f(E)===b.type){n(h,b.sibling),g=o(b,x.props),g.ref=ro(h,b,x),g.return=h,h=g;break e}n(h,b);break}else t(h,b);b=b.sibling}x.type===mr?(g=zn(x.props.children,h.mode,C,x.key),g.return=h,h=g):(C=es(x.type,x.key,x.props,null,h.mode,C),C.ref=ro(h,g,x),C.return=h,h=C)}return s(h);case pr:e:{for(b=x.key;g!==null;){if(g.key===b)if(g.tag===4&&g.stateNode.containerInfo===x.containerInfo&&g.stateNode.implementation===x.implementation){n(h,g.sibling),g=o(g,x.children||[]),g.return=h,h=g;break e}else{n(h,g);break}else t(h,g);g=g.sibling}g=ea(x,h.mode,C),g.return=h,h=g}return s(h);case ln:return b=x._init,S(h,g,b(x._payload),C)}if(uo(x))return y(h,g,x,C);if(qr(x))return v(h,g,x,C);Pi(h,x)}return typeof x=="string"&&x!==""||typeof x=="number"?(x=""+x,g!==null&&g.tag===6?(n(h,g.sibling),g=o(g,x),g.return=h,h=g):(n(h,g),g=Jl(x,h.mode,C),g.return=h,h=g),s(h)):n(h,g)}return S}var $r=Ch(!0),Eh=Ch(!1),gs=Nn(null),ys=null,Cr=null,uu=null;function du(){uu=Cr=ys=null}function fu(e){var t=gs.current;de(gs),e._currentValue=t}function ec(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 Nr(e,t){ys=e,uu=Cr=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(We=!0),e.firstContext=null)}function ut(e){var t=e._currentValue;if(uu!==e)if(e={context:e,memoizedValue:t,next:null},Cr===null){if(ys===null)throw Error(j(308));Cr=e,ys.dependencies={lanes:0,firstContext:e}}else Cr=Cr.next=e;return t}var Ln=null;function pu(e){Ln===null?Ln=[e]:Ln.push(e)}function _h(e,t,n,r){var o=t.interleaved;return o===null?(n.next=n,pu(t)):(n.next=o.next,o.next=n),t.interleaved=n,Kt(e,r)}function Kt(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 an=!1;function mu(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function bh(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 Vt(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function gn(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,ie&2){var o=r.pending;return o===null?t.next=t:(t.next=o.next,o.next=t),r.pending=t,Kt(e,n)}return o=r.interleaved,o===null?(t.next=t,pu(r)):(t.next=o.next,o.next=t),r.interleaved=t,Kt(e,n)}function Yi(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,Jc(e,n)}}function Ff(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 s={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};i===null?o=i=s:i=i.next=s,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 ws(e,t,n,r){var o=e.updateQueue;an=!1;var i=o.firstBaseUpdate,s=o.lastBaseUpdate,l=o.shared.pending;if(l!==null){o.shared.pending=null;var a=l,u=a.next;a.next=null,s===null?i=u:s.next=u,s=a;var f=e.alternate;f!==null&&(f=f.updateQueue,l=f.lastBaseUpdate,l!==s&&(l===null?f.firstBaseUpdate=u:l.next=u,f.lastBaseUpdate=a))}if(i!==null){var d=o.baseState;s=0,f=u=a=null,l=i;do{var p=l.lane,w=l.eventTime;if((r&p)===p){f!==null&&(f=f.next={eventTime:w,lane:0,tag:l.tag,payload:l.payload,callback:l.callback,next:null});e:{var y=e,v=l;switch(p=t,w=n,v.tag){case 1:if(y=v.payload,typeof y=="function"){d=y.call(w,d,p);break e}d=y;break e;case 3:y.flags=y.flags&-65537|128;case 0:if(y=v.payload,p=typeof y=="function"?y.call(w,d,p):y,p==null)break e;d=ve({},d,p);break e;case 2:an=!0}}l.callback!==null&&l.lane!==0&&(e.flags|=64,p=o.effects,p===null?o.effects=[l]:p.push(l))}else w={eventTime:w,lane:p,tag:l.tag,payload:l.payload,callback:l.callback,next:null},f===null?(u=f=w,a=d):f=f.next=w,s|=p;if(l=l.next,l===null){if(l=o.shared.pending,l===null)break;p=l,l=p.next,p.next=null,o.lastBaseUpdate=p,o.shared.pending=null}}while(!0);if(f===null&&(a=d),o.baseState=a,o.firstBaseUpdate=u,o.lastBaseUpdate=f,t=o.shared.interleaved,t!==null){o=t;do s|=o.lane,o=o.next;while(o!==t)}else i===null&&(o.shared.lanes=0);Kn|=s,e.lanes=s,e.memoizedState=d}}function zf(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;tn?n:4,e(!0);var r=Yl.transition;Yl.transition={};try{e(!1),t()}finally{se=n,Yl.transition=r}}function Bh(){return dt().memoizedState}function AS(e,t,n){var r=wn(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},Vh(e))Hh(t,n);else if(n=_h(e,t,n,r),n!==null){var o=Fe();xt(n,e,r,o),Wh(n,t,r)}}function DS(e,t,n){var r=wn(e),o={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Vh(e))Hh(t,o);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var s=t.lastRenderedState,l=i(s,n);if(o.hasEagerState=!0,o.eagerState=l,Ct(l,s)){var a=t.interleaved;a===null?(o.next=o,pu(t)):(o.next=a.next,a.next=o),t.interleaved=o;return}}catch{}finally{}n=_h(e,t,o,r),n!==null&&(o=Fe(),xt(n,e,r,o),Wh(n,t,r))}}function Vh(e){var t=e.alternate;return e===he||t!==null&&t===he}function Hh(e,t){xo=Ss=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Wh(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Jc(e,n)}}var Cs={readContext:ut,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},MS={readContext:ut,useCallback:function(e,t){return kt().memoizedState=[e,t===void 0?null:t],e},useContext:ut,useEffect:Bf,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Qi(4194308,4,Ih.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Qi(4194308,4,e,t)},useInsertionEffect:function(e,t){return Qi(4,2,e,t)},useMemo:function(e,t){var n=kt();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=kt();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=AS.bind(null,he,e),[r.memoizedState,e]},useRef:function(e){var t=kt();return e={current:e},t.memoizedState=e},useState:Uf,useDebugValue:Cu,useDeferredValue:function(e){return kt().memoizedState=e},useTransition:function(){var e=Uf(!1),t=e[0];return e=TS.bind(null,e[1]),kt().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=he,o=kt();if(fe){if(n===void 0)throw Error(j(407));n=n()}else{if(n=t(),Re===null)throw Error(j(349));Wn&30||Nh(r,t,n)}o.memoizedState=n;var i={value:n,getSnapshot:t};return o.queue=i,Bf(Ah.bind(null,r,i,e),[e]),r.flags|=2048,Vo(9,Th.bind(null,r,i,n,t),void 0,null),n},useId:function(){var e=kt(),t=Re.identifierPrefix;if(fe){var n=Bt,r=Ut;n=(r&~(1<<32-wt(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Uo++,0<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=s.createElement(n,{is:r.is}):(e=s.createElement(n),n==="select"&&(s=e,r.multiple?s.multiple=!0:r.size&&(s.size=r.size))):e=s.createElementNS(e,n),e[Nt]=t,e[$o]=r,tv(e,t,!1,!1),t.stateNode=e;e:{switch(s=La(n,r),n){case"dialog":ue("cancel",e),ue("close",e),o=r;break;case"iframe":case"object":case"embed":ue("load",e),o=r;break;case"video":case"audio":for(o=0;oUr&&(t.flags|=128,r=!0,oo(i,!1),t.lanes=4194304)}else{if(!r)if(e=xs(s),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),oo(i,!0),i.tail===null&&i.tailMode==="hidden"&&!s.alternate&&!fe)return De(t),null}else 2*Se()-i.renderingStartTime>Ur&&n!==1073741824&&(t.flags|=128,r=!0,oo(i,!1),t.lanes=4194304);i.isBackwards?(s.sibling=t.child,t.child=s):(n=i.last,n!==null?n.sibling=s:t.child=s,i.last=s)}return i.tail!==null?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=Se(),t.sibling=null,n=pe.current,le(pe,r?n&1|2:n&1),t):(De(t),null);case 22:case 23:return ku(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?Qe&1073741824&&(De(t),t.subtreeFlags&6&&(t.flags|=8192)):De(t),null;case 24:return null;case 25:return null}throw Error(j(156,t.tag))}function US(e,t){switch(au(t),t.tag){case 1:return Ge(t.type)&&ps(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Fr(),de(Ke),de(je),gu(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return vu(t),null;case 13:if(de(pe),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(j(340));Ir()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return de(pe),null;case 4:return Fr(),null;case 10:return fu(t.type._context),null;case 22:case 23:return ku(),null;case 24:return null;default:return null}}var Ni=!1,Me=!1,BS=typeof WeakSet=="function"?WeakSet:Set,B=null;function Er(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){we(e,t,r)}else n.current=null}function cc(e,t,n){try{n()}catch(r){we(e,t,r)}}var Jf=!1;function VS(e,t){if(Ka=cs,e=ah(),su(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 s=0,l=-1,a=-1,u=0,f=0,d=e,p=null;t:for(;;){for(var w;d!==n||o!==0&&d.nodeType!==3||(l=s+o),d!==i||r!==0&&d.nodeType!==3||(a=s+r),d.nodeType===3&&(s+=d.nodeValue.length),(w=d.firstChild)!==null;)p=d,d=w;for(;;){if(d===e)break t;if(p===n&&++u===o&&(l=s),p===i&&++f===r&&(a=s),(w=d.nextSibling)!==null)break;d=p,p=d.parentNode}d=w}n=l===-1||a===-1?null:{start:l,end:a}}else n=null}n=n||{start:0,end:0}}else n=null;for(Ga={focusedElem:e,selectionRange:n},cs=!1,B=t;B!==null;)if(t=B,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,B=e;else for(;B!==null;){t=B;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,S=y.memoizedState,h=t.stateNode,g=h.getSnapshotBeforeUpdate(t.elementType===t.type?v:vt(t.type,v),S);h.__reactInternalSnapshotBeforeUpdate=g}break;case 3:var x=t.stateNode.containerInfo;x.nodeType===1?x.textContent="":x.nodeType===9&&x.documentElement&&x.removeChild(x.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(j(163))}}catch(C){we(t,t.return,C)}if(e=t.sibling,e!==null){e.return=t.return,B=e;break}B=t.return}return y=Jf,Jf=!1,y}function So(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&&cc(t,n,i)}o=o.next}while(o!==r)}}function Xs(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 uc(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 ov(e){var t=e.alternate;t!==null&&(e.alternate=null,ov(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Nt],delete t[$o],delete t[Qa],delete t[bS],delete t[RS])),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 iv(e){return e.tag===5||e.tag===3||e.tag===4}function ep(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||iv(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 dc(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=fs));else if(r!==4&&(e=e.child,e!==null))for(dc(e,t,n),e=e.sibling;e!==null;)dc(e,t,n),e=e.sibling}function fc(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(fc(e,t,n),e=e.sibling;e!==null;)fc(e,t,n),e=e.sibling}var ke=null,gt=!1;function tn(e,t,n){for(n=n.child;n!==null;)sv(e,t,n),n=n.sibling}function sv(e,t,n){if(At&&typeof At.onCommitFiberUnmount=="function")try{At.onCommitFiberUnmount(Us,n)}catch{}switch(n.tag){case 5:Me||Er(n,t);case 6:var r=ke,o=gt;ke=null,tn(e,t,n),ke=r,gt=o,ke!==null&&(gt?(e=ke,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):ke.removeChild(n.stateNode));break;case 18:ke!==null&&(gt?(e=ke,n=n.stateNode,e.nodeType===8?Wl(e.parentNode,n):e.nodeType===1&&Wl(e,n),Mo(e)):Wl(ke,n.stateNode));break;case 4:r=ke,o=gt,ke=n.stateNode.containerInfo,gt=!0,tn(e,t,n),ke=r,gt=o;break;case 0:case 11:case 14:case 15:if(!Me&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){o=r=r.next;do{var i=o,s=i.destroy;i=i.tag,s!==void 0&&(i&2||i&4)&&cc(n,t,s),o=o.next}while(o!==r)}tn(e,t,n);break;case 1:if(!Me&&(Er(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(l){we(n,t,l)}tn(e,t,n);break;case 21:tn(e,t,n);break;case 22:n.mode&1?(Me=(r=Me)||n.memoizedState!==null,tn(e,t,n),Me=r):tn(e,t,n);break;default:tn(e,t,n)}}function tp(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new BS),t.forEach(function(r){var o=qS.bind(null,e,r);n.has(r)||(n.add(r),r.then(o,o))})}}function ht(e,t){var n=t.deletions;if(n!==null)for(var r=0;ro&&(o=s),r&=~i}if(r=o,r=Se()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*WS(r/1960))-r,10e?16:e,fn===null)var r=!1;else{if(e=fn,fn=null,bs=0,ie&6)throw Error(j(331));var o=ie;for(ie|=4,B=e.current;B!==null;){var i=B,s=i.child;if(B.flags&16){var l=i.deletions;if(l!==null){for(var a=0;aSe()-Ru?Fn(e,0):bu|=n),Ye(e,t)}function mv(e,t){t===0&&(e.mode&1?(t=xi,xi<<=1,!(xi&130023424)&&(xi=4194304)):t=1);var n=Fe();e=Kt(e,t),e!==null&&(ti(e,t,n),Ye(e,n))}function ZS(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),mv(e,n)}function qS(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(j(314))}r!==null&&r.delete(t),mv(e,n)}var hv;hv=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Ke.current)We=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return We=!1,FS(e,t,n);We=!!(e.flags&131072)}else We=!1,fe&&t.flags&1048576&&wh(t,vs,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Zi(e,t),e=t.pendingProps;var o=Lr(t,je.current);Nr(t,n),o=wu(null,t,r,e,o,n);var i=xu();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,Ge(r)?(i=!0,ms(t)):i=!1,t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,mu(t),o.updater=Ys,t.stateNode=o,o._reactInternals=t,nc(t,r,e,n),t=ic(null,t,r,!0,i,n)):(t.tag=0,fe&&i&&lu(t),$e(null,t,o,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Zi(e,t),e=t.pendingProps,o=r._init,r=o(r._payload),t.type=r,o=t.tag=eC(r),e=vt(r,e),o){case 0:t=oc(null,t,r,e,n);break e;case 1:t=Qf(null,t,r,e,n);break e;case 11:t=Yf(null,t,r,e,n);break e;case 14:t=Xf(null,t,r,vt(r.type,e),n);break e}throw Error(j(306,r,""))}return t;case 0:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:vt(r,o),oc(e,t,r,o,n);case 1:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:vt(r,o),Qf(e,t,r,o,n);case 3:e:{if(qh(t),e===null)throw Error(j(387));r=t.pendingProps,i=t.memoizedState,o=i.element,bh(e,t),ws(t,r,null,n);var s=t.memoizedState;if(r=s.element,i.isDehydrated)if(i={element:r,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){o=zr(Error(j(423)),t),t=Zf(e,t,r,n,o);break e}else if(r!==o){o=zr(Error(j(424)),t),t=Zf(e,t,r,n,o);break e}else for(qe=vn(t.stateNode.containerInfo.firstChild),Je=t,fe=!0,yt=null,n=Eh(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Ir(),r===o){t=Gt(e,t,n);break e}$e(e,t,r,n)}t=t.child}return t;case 5:return Rh(t),e===null&&Ja(t),r=t.type,o=t.pendingProps,i=e!==null?e.memoizedProps:null,s=o.children,Ya(r,o)?s=null:i!==null&&Ya(r,i)&&(t.flags|=32),Zh(e,t),$e(e,t,s,n),t.child;case 6:return e===null&&Ja(t),null;case 13:return Jh(e,t,n);case 4:return hu(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=$r(t,null,r,n):$e(e,t,r,n),t.child;case 11:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:vt(r,o),Yf(e,t,r,o,n);case 7:return $e(e,t,t.pendingProps,n),t.child;case 8:return $e(e,t,t.pendingProps.children,n),t.child;case 12:return $e(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,o=t.pendingProps,i=t.memoizedProps,s=o.value,le(gs,r._currentValue),r._currentValue=s,i!==null)if(Ct(i.value,s)){if(i.children===o.children&&!Ke.current){t=Gt(e,t,n);break e}}else for(i=t.child,i!==null&&(i.return=t);i!==null;){var l=i.dependencies;if(l!==null){s=i.child;for(var a=l.firstContext;a!==null;){if(a.context===r){if(i.tag===1){a=Vt(-1,n&-n),a.tag=2;var u=i.updateQueue;if(u!==null){u=u.shared;var f=u.pending;f===null?a.next=a:(a.next=f.next,f.next=a),u.pending=a}}i.lanes|=n,a=i.alternate,a!==null&&(a.lanes|=n),ec(i.return,n,t),l.lanes|=n;break}a=a.next}}else if(i.tag===10)s=i.type===t.type?null:i.child;else if(i.tag===18){if(s=i.return,s===null)throw Error(j(341));s.lanes|=n,l=s.alternate,l!==null&&(l.lanes|=n),ec(s,n,t),s=i.sibling}else s=i.child;if(s!==null)s.return=i;else for(s=i;s!==null;){if(s===t){s=null;break}if(i=s.sibling,i!==null){i.return=s.return,s=i;break}s=s.return}i=s}$e(e,t,o.children,n),t=t.child}return t;case 9:return o=t.type,r=t.pendingProps.children,Nr(t,n),o=ut(o),r=r(o),t.flags|=1,$e(e,t,r,n),t.child;case 14:return r=t.type,o=vt(r,t.pendingProps),o=vt(r.type,o),Xf(e,t,r,o,n);case 15:return Xh(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:vt(r,o),Zi(e,t),t.tag=1,Ge(r)?(e=!0,ms(t)):e=!1,Nr(t,n),Kh(t,r,o),nc(t,r,o,n),ic(null,t,r,!0,e,n);case 19:return ev(e,t,n);case 22:return Qh(e,t,n)}throw Error(j(156,t.tag))};function vv(e,t){return Vm(e,t)}function JS(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 lt(e,t,n,r){return new JS(e,t,n,r)}function Tu(e){return e=e.prototype,!(!e||!e.isReactComponent)}function eC(e){if(typeof e=="function")return Tu(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Xc)return 11;if(e===Qc)return 14}return 2}function xn(e,t){var n=e.alternate;return n===null?(n=lt(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 es(e,t,n,r,o,i){var s=2;if(r=e,typeof e=="function")Tu(e)&&(s=1);else if(typeof e=="string")s=5;else e:switch(e){case mr:return zn(n.children,o,i,t);case Yc:s=8,o|=8;break;case Ra:return e=lt(12,n,t,o|2),e.elementType=Ra,e.lanes=i,e;case Pa:return e=lt(13,n,t,o),e.elementType=Pa,e.lanes=i,e;case ka:return e=lt(19,n,t,o),e.elementType=ka,e.lanes=i,e;case Rm:return Zs(n,o,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case _m:s=10;break e;case bm:s=9;break e;case Xc:s=11;break e;case Qc:s=14;break e;case ln:s=16,r=null;break e}throw Error(j(130,e==null?e:typeof e,""))}return t=lt(s,n,t,o),t.elementType=e,t.type=r,t.lanes=i,t}function zn(e,t,n,r){return e=lt(7,e,r,t),e.lanes=n,e}function Zs(e,t,n,r){return e=lt(22,e,r,t),e.elementType=Rm,e.lanes=n,e.stateNode={isHidden:!1},e}function Jl(e,t,n){return e=lt(6,e,null,t),e.lanes=n,e}function ea(e,t,n){return t=lt(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function tC(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=Ol(0),this.expirationTimes=Ol(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ol(0),this.identifierPrefix=r,this.onRecoverableError=o,this.mutableSourceEagerHydrationData=null}function Au(e,t,n,r,o,i,s,l,a){return e=new tC(e,t,n,l,a),t===1?(t=1,i===!0&&(t|=8)):t=0,i=lt(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},mu(i),e}function nC(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(xv)}catch(e){console.error(e)}}xv(),xm.exports=nt;var qt=xm.exports;const Sv=lm(qt);var cp=qt;_a.createRoot=cp.createRoot,_a.hydrateRoot=cp.hydrateRoot;function Pe(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,i;for(i=0;i=0)&&(n[o]=e[o]);return n}var lC=["color"],aC=c.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,o=Pe(e,lC);return c.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o,{ref:t}),c.createElement("path",{d:"M7.5 2C7.77614 2 8 2.22386 8 2.5L8 11.2929L11.1464 8.14645C11.3417 7.95118 11.6583 7.95118 11.8536 8.14645C12.0488 8.34171 12.0488 8.65829 11.8536 8.85355L7.85355 12.8536C7.75979 12.9473 7.63261 13 7.5 13C7.36739 13 7.24021 12.9473 7.14645 12.8536L3.14645 8.85355C2.95118 8.65829 2.95118 8.34171 3.14645 8.14645C3.34171 7.95118 3.65829 7.95118 3.85355 8.14645L7 11.2929L7 2.5C7 2.22386 7.22386 2 7.5 2Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),cC=["color"],uC=c.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,o=Pe(e,cC);return c.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o,{ref:t}),c.createElement("path",{d:"M6.85355 3.14645C7.04882 3.34171 7.04882 3.65829 6.85355 3.85355L3.70711 7H12.5C12.7761 7 13 7.22386 13 7.5C13 7.77614 12.7761 8 12.5 8H3.70711L6.85355 11.1464C7.04882 11.3417 7.04882 11.6583 6.85355 11.8536C6.65829 12.0488 6.34171 12.0488 6.14645 11.8536L2.14645 7.85355C1.95118 7.65829 1.95118 7.34171 2.14645 7.14645L6.14645 3.14645C6.34171 2.95118 6.65829 2.95118 6.85355 3.14645Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),dC=["color"],Cv=c.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,o=Pe(e,dC);return c.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o,{ref:t}),c.createElement("path",{d:"M8.14645 3.14645C8.34171 2.95118 8.65829 2.95118 8.85355 3.14645L12.8536 7.14645C13.0488 7.34171 13.0488 7.65829 12.8536 7.85355L8.85355 11.8536C8.65829 12.0488 8.34171 12.0488 8.14645 11.8536C7.95118 11.6583 7.95118 11.3417 8.14645 11.1464L11.2929 8H2.5C2.22386 8 2 7.77614 2 7.5C2 7.22386 2.22386 7 2.5 7H11.2929L8.14645 3.85355C7.95118 3.65829 7.95118 3.34171 8.14645 3.14645Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),fC=["color"],Ev=c.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,o=Pe(e,fC);return c.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o,{ref:t}),c.createElement("path",{d:"M4.93179 5.43179C4.75605 5.60753 4.75605 5.89245 4.93179 6.06819C5.10753 6.24392 5.39245 6.24392 5.56819 6.06819L7.49999 4.13638L9.43179 6.06819C9.60753 6.24392 9.89245 6.24392 10.0682 6.06819C10.2439 5.89245 10.2439 5.60753 10.0682 5.43179L7.81819 3.18179C7.73379 3.0974 7.61933 3.04999 7.49999 3.04999C7.38064 3.04999 7.26618 3.0974 7.18179 3.18179L4.93179 5.43179ZM10.0682 9.56819C10.2439 9.39245 10.2439 9.10753 10.0682 8.93179C9.89245 8.75606 9.60753 8.75606 9.43179 8.93179L7.49999 10.8636L5.56819 8.93179C5.39245 8.75606 5.10753 8.75606 4.93179 8.93179C4.75605 9.10753 4.75605 9.39245 4.93179 9.56819L7.18179 11.8182C7.35753 11.9939 7.64245 11.9939 7.81819 11.8182L10.0682 9.56819Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),pC=["color"],nl=c.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,o=Pe(e,pC);return c.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o,{ref:t}),c.createElement("path",{d:"M11.4669 3.72684C11.7558 3.91574 11.8369 4.30308 11.648 4.59198L7.39799 11.092C7.29783 11.2452 7.13556 11.3467 6.95402 11.3699C6.77247 11.3931 6.58989 11.3355 6.45446 11.2124L3.70446 8.71241C3.44905 8.48022 3.43023 8.08494 3.66242 7.82953C3.89461 7.57412 4.28989 7.55529 4.5453 7.78749L6.75292 9.79441L10.6018 3.90792C10.7907 3.61902 11.178 3.53795 11.4669 3.72684Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),mC=["color"],hC=c.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,o=Pe(e,mC);return c.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o,{ref:t}),c.createElement("path",{d:"M6.1584 3.13508C6.35985 2.94621 6.67627 2.95642 6.86514 3.15788L10.6151 7.15788C10.7954 7.3502 10.7954 7.64949 10.6151 7.84182L6.86514 11.8418C6.67627 12.0433 6.35985 12.0535 6.1584 11.8646C5.95694 11.6757 5.94673 11.3593 6.1356 11.1579L9.565 7.49985L6.1356 3.84182C5.94673 3.64036 5.95694 3.32394 6.1584 3.13508Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),vC=["color"],gC=c.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,o=Pe(e,vC);return c.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o,{ref:t}),c.createElement("path",{d:"M9.96424 2.68571C10.0668 2.42931 9.94209 2.13833 9.6857 2.03577C9.4293 1.93322 9.13832 2.05792 9.03576 2.31432L5.03576 12.3143C4.9332 12.5707 5.05791 12.8617 5.3143 12.9642C5.5707 13.0668 5.86168 12.9421 5.96424 12.6857L9.96424 2.68571ZM3.85355 5.14646C4.04882 5.34172 4.04882 5.6583 3.85355 5.85356L2.20711 7.50001L3.85355 9.14646C4.04882 9.34172 4.04882 9.6583 3.85355 9.85356C3.65829 10.0488 3.34171 10.0488 3.14645 9.85356L1.14645 7.85356C0.951184 7.6583 0.951184 7.34172 1.14645 7.14646L3.14645 5.14646C3.34171 4.9512 3.65829 4.9512 3.85355 5.14646ZM11.1464 5.14646C11.3417 4.9512 11.6583 4.9512 11.8536 5.14646L13.8536 7.14646C14.0488 7.34172 14.0488 7.6583 13.8536 7.85356L11.8536 9.85356C11.6583 10.0488 11.3417 10.0488 11.1464 9.85356C10.9512 9.6583 10.9512 9.34172 11.1464 9.14646L12.7929 7.50001L11.1464 5.85356C10.9512 5.6583 10.9512 5.34172 11.1464 5.14646Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),yC=["color"],_v=c.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,o=Pe(e,yC);return c.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o,{ref:t}),c.createElement("path",{d:"M11.7816 4.03157C12.0062 3.80702 12.0062 3.44295 11.7816 3.2184C11.5571 2.99385 11.193 2.99385 10.9685 3.2184L7.50005 6.68682L4.03164 3.2184C3.80708 2.99385 3.44301 2.99385 3.21846 3.2184C2.99391 3.44295 2.99391 3.80702 3.21846 4.03157L6.68688 7.49999L3.21846 10.9684C2.99391 11.193 2.99391 11.557 3.21846 11.7816C3.44301 12.0061 3.80708 12.0061 4.03164 11.7816L7.50005 8.31316L10.9685 11.7816C11.193 12.0061 11.5571 12.0061 11.7816 11.7816C12.0062 11.557 12.0062 11.193 11.7816 10.9684L8.31322 7.49999L11.7816 4.03157Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),wC=["color"],xC=c.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,o=Pe(e,wC);return c.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o,{ref:t}),c.createElement("path",{d:"M9.875 7.5C9.875 8.81168 8.81168 9.875 7.5 9.875C6.18832 9.875 5.125 8.81168 5.125 7.5C5.125 6.18832 6.18832 5.125 7.5 5.125C8.81168 5.125 9.875 6.18832 9.875 7.5Z",fill:r}))}),SC=["color"],CC=c.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,o=Pe(e,SC);return c.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o,{ref:t}),c.createElement("path",{d:"M7.50005 1.04999C7.74858 1.04999 7.95005 1.25146 7.95005 1.49999V8.41359L10.1819 6.18179C10.3576 6.00605 10.6425 6.00605 10.8182 6.18179C10.994 6.35753 10.994 6.64245 10.8182 6.81819L7.81825 9.81819C7.64251 9.99392 7.35759 9.99392 7.18185 9.81819L4.18185 6.81819C4.00611 6.64245 4.00611 6.35753 4.18185 6.18179C4.35759 6.00605 4.64251 6.00605 4.81825 6.18179L7.05005 8.41359V1.49999C7.05005 1.25146 7.25152 1.04999 7.50005 1.04999ZM2.5 10C2.77614 10 3 10.2239 3 10.5V12C3 12.5539 3.44565 13 3.99635 13H11.0012C11.5529 13 12 12.5528 12 12V10.5C12 10.2239 12.2239 10 12.5 10C12.7761 10 13 10.2239 13 10.5V12C13 13.1041 12.1062 14 11.0012 14H3.99635C2.89019 14 2 13.103 2 12V10.5C2 10.2239 2.22386 10 2.5 10Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),EC=["color"],_C=c.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,o=Pe(e,EC);return c.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o,{ref:t}),c.createElement("path",{d:"M3.35355 1.85355C3.54882 1.65829 3.54882 1.34171 3.35355 1.14645C3.15829 0.951184 2.84171 0.951184 2.64645 1.14645L0.646447 3.14645C0.451184 3.34171 0.451184 3.65829 0.646447 3.85355L2.64645 5.85355C2.84171 6.04882 3.15829 6.04882 3.35355 5.85355C3.54882 5.65829 3.54882 5.34171 3.35355 5.14645L2.20711 4H9.5C11.433 4 13 5.567 13 7.5C13 7.77614 13.2239 8 13.5 8C13.7761 8 14 7.77614 14 7.5C14 5.01472 11.9853 3 9.5 3H2.20711L3.35355 1.85355ZM2 7.5C2 7.22386 1.77614 7 1.5 7C1.22386 7 1 7.22386 1 7.5C1 9.98528 3.01472 12 5.5 12H12.7929L11.6464 13.1464C11.4512 13.3417 11.4512 13.6583 11.6464 13.8536C11.8417 14.0488 12.1583 14.0488 12.3536 13.8536L14.3536 11.8536C14.5488 11.6583 14.5488 11.3417 14.3536 11.1464L12.3536 9.14645C12.1583 8.95118 11.8417 8.95118 11.6464 9.14645C11.4512 9.34171 11.4512 9.65829 11.6464 9.85355L12.7929 11H5.5C3.567 11 2 9.433 2 7.5Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),bC=["color"],RC=c.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,o=Pe(e,bC);return c.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o,{ref:t}),c.createElement("path",{d:"M10 6.5C10 8.433 8.433 10 6.5 10C4.567 10 3 8.433 3 6.5C3 4.567 4.567 3 6.5 3C8.433 3 10 4.567 10 6.5ZM9.30884 10.0159C8.53901 10.6318 7.56251 11 6.5 11C4.01472 11 2 8.98528 2 6.5C2 4.01472 4.01472 2 6.5 2C8.98528 2 11 4.01472 11 6.5C11 7.56251 10.6318 8.53901 10.0159 9.30884L12.8536 12.1464C13.0488 12.3417 13.0488 12.6583 12.8536 12.8536C12.6583 13.0488 12.3417 13.0488 12.1464 12.8536L9.30884 10.0159Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),PC=["color"],kC=c.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,o=Pe(e,PC);return c.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o,{ref:t}),c.createElement("path",{d:"M1.20308 1.04312C1.00481 0.954998 0.772341 1.0048 0.627577 1.16641C0.482813 1.32802 0.458794 1.56455 0.568117 1.75196L3.92115 7.50002L0.568117 13.2481C0.458794 13.4355 0.482813 13.672 0.627577 13.8336C0.772341 13.9952 1.00481 14.045 1.20308 13.9569L14.7031 7.95693C14.8836 7.87668 15 7.69762 15 7.50002C15 7.30243 14.8836 7.12337 14.7031 7.04312L1.20308 1.04312ZM4.84553 7.10002L2.21234 2.586L13.2689 7.50002L2.21234 12.414L4.84552 7.90002H9C9.22092 7.90002 9.4 7.72094 9.4 7.50002C9.4 7.27911 9.22092 7.10002 9 7.10002H4.84553Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),NC=["color"],TC=c.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,o=Pe(e,NC);return c.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o,{ref:t}),c.createElement("path",{d:"M7.46968 1.05085C7.64122 1.13475 7.75 1.30904 7.75 1.5V13.5C7.75 13.691 7.64122 13.8653 7.46968 13.9492C7.29813 14.0331 7.09377 14.0119 6.94303 13.8947L3.2213 11H1.5C0.671571 11 0 10.3284 0 9.5V5.5C0 4.67158 0.671573 4 1.5 4H3.2213L6.94303 1.10533C7.09377 0.988085 7.29813 0.966945 7.46968 1.05085ZM6.75 2.52232L3.69983 4.89468C3.61206 4.96294 3.50405 5 3.39286 5H1.5C1.22386 5 1 5.22386 1 5.5V9.5C1 9.77615 1.22386 10 1.5 10H3.39286C3.50405 10 3.61206 10.0371 3.69983 10.1053L6.75 12.4777V2.52232ZM10.2784 3.84804C10.4623 3.72567 10.7106 3.77557 10.833 3.95949C12.2558 6.09798 12.2558 8.90199 10.833 11.0405C10.7106 11.2244 10.4623 11.2743 10.2784 11.1519C10.0944 11.0296 10.0445 10.7813 10.1669 10.5973C11.4111 8.72728 11.4111 6.27269 10.1669 4.40264C10.0445 4.21871 10.0944 3.97041 10.2784 3.84804ZM12.6785 1.43044C12.5356 1.2619 12.2832 1.24104 12.1147 1.38386C11.9462 1.52667 11.9253 1.77908 12.0681 1.94762C14.7773 5.14488 14.7773 9.85513 12.0681 13.0524C11.9253 13.2209 11.9462 13.4733 12.1147 13.6161C12.2832 13.759 12.5356 13.7381 12.6785 13.5696C15.6406 10.0739 15.6406 4.92612 12.6785 1.43044Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),AC=["color"],DC=c.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,o=Pe(e,AC);return c.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o,{ref:t}),c.createElement("path",{d:"M7.72361 1.05279C7.893 1.13749 8 1.31062 8 1.5V13.5C8 13.6894 7.893 13.8625 7.72361 13.9472C7.55421 14.0319 7.35151 14.0136 7.2 13.9L3.33333 11H1.5C0.671573 11 0 10.3284 0 9.5V5.5C0 4.67158 0.671573 4 1.5 4H3.33333L7.2 1.1C7.35151 0.986371 7.55421 0.968093 7.72361 1.05279ZM7 2.5L3.8 4.9C3.71345 4.96491 3.60819 5 3.5 5H1.5C1.22386 5 1 5.22386 1 5.5V9.5C1 9.77614 1.22386 10 1.5 10H3.5C3.60819 10 3.71345 10.0351 3.8 10.1L7 12.5V2.5ZM14.8536 5.14645C15.0488 5.34171 15.0488 5.65829 14.8536 5.85355L13.2071 7.5L14.8536 9.14645C15.0488 9.34171 15.0488 9.65829 14.8536 9.85355C14.6583 10.0488 14.3417 10.0488 14.1464 9.85355L12.5 8.20711L10.8536 9.85355C10.6583 10.0488 10.3417 10.0488 10.1464 9.85355C9.95118 9.65829 9.95118 9.34171 10.1464 9.14645L11.7929 7.5L10.1464 5.85355C9.95118 5.65829 9.95118 5.34171 10.1464 5.14645C10.3417 4.95118 10.6583 4.95118 10.8536 5.14645L12.5 6.79289L14.1464 5.14645C14.3417 4.95118 14.6583 4.95118 14.8536 5.14645Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),MC=["color"],OC=c.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,o=Pe(e,MC);return c.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o,{ref:t}),c.createElement("path",{d:"M13.0502 2.74989C13.0502 2.44613 12.804 2.19989 12.5002 2.19989C12.1965 2.19989 11.9502 2.44613 11.9502 2.74989V7.2825C11.9046 7.18802 11.8295 7.10851 11.7334 7.05776L2.73338 2.30776C2.5784 2.22596 2.3919 2.23127 2.24182 2.32176C2.09175 2.41225 2 2.57471 2 2.74995V12.25C2 12.4252 2.09175 12.5877 2.24182 12.6781C2.3919 12.7686 2.5784 12.7739 2.73338 12.6921L11.7334 7.94214C11.8295 7.89139 11.9046 7.81188 11.9502 7.7174V12.2499C11.9502 12.5536 12.1965 12.7999 12.5002 12.7999C12.804 12.7999 13.0502 12.5536 13.0502 12.2499V2.74989ZM3 11.4207V3.5792L10.4288 7.49995L3 11.4207Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),jC=["color"],LC=c.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,o=Pe(e,jC);return c.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o,{ref:t}),c.createElement("path",{d:"M1.94976 2.74989C1.94976 2.44613 2.196 2.19989 2.49976 2.19989C2.80351 2.19989 3.04976 2.44613 3.04976 2.74989V7.2825C3.0954 7.18802 3.17046 7.10851 3.26662 7.05776L12.2666 2.30776C12.4216 2.22596 12.6081 2.23127 12.7582 2.32176C12.9083 2.41225 13 2.57471 13 2.74995V12.25C13 12.4252 12.9083 12.5877 12.7582 12.6781C12.6081 12.7686 12.4216 12.7739 12.2666 12.6921L3.26662 7.94214C3.17046 7.89139 3.0954 7.81188 3.04976 7.7174V12.2499C3.04976 12.5536 2.80351 12.7999 2.49976 12.7999C2.196 12.7999 1.94976 12.5536 1.94976 12.2499V2.74989ZM4.57122 7.49995L12 11.4207V3.5792L4.57122 7.49995Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),IC=["color"],$C=c.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,o=Pe(e,IC);return c.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o,{ref:t}),c.createElement("path",{d:"M5.5 1C5.22386 1 5 1.22386 5 1.5C5 1.77614 5.22386 2 5.5 2H9.5C9.77614 2 10 1.77614 10 1.5C10 1.22386 9.77614 1 9.5 1H5.5ZM3 3.5C3 3.22386 3.22386 3 3.5 3H5H10H11.5C11.7761 3 12 3.22386 12 3.5C12 3.77614 11.7761 4 11.5 4H11V12C11 12.5523 10.5523 13 10 13H5C4.44772 13 4 12.5523 4 12V4L3.5 4C3.22386 4 3 3.77614 3 3.5ZM5 4H10V12H5V4Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))});function F(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e==null||e(o),n===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}function FC(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function rl(...e){return t=>e.forEach(n=>FC(n,t))}function ne(...e){return c.useCallback(rl(...e),e)}function zC(e,t){const n=c.createContext(t);function r(i){const{children:s,...l}=i,a=c.useMemo(()=>l,Object.values(l));return m.jsx(n.Provider,{value:a,children:s})}function o(i){const s=c.useContext(n);if(s)return s;if(t!==void 0)return t;throw new Error(`\`${i}\` must be used within \`${e}\``)}return r.displayName=e+"Provider",[r,o]}function ot(e,t=[]){let n=[];function r(i,s){const l=c.createContext(s),a=n.length;n=[...n,s];function u(d){const{scope:p,children:w,...y}=d,v=(p==null?void 0:p[e][a])||l,S=c.useMemo(()=>y,Object.values(y));return m.jsx(v.Provider,{value:S,children:w})}function f(d,p){const w=(p==null?void 0:p[e][a])||l,y=c.useContext(w);if(y)return y;if(s!==void 0)return s;throw new Error(`\`${d}\` must be used within \`${i}\``)}return u.displayName=i+"Provider",[u,f]}const o=()=>{const i=n.map(s=>c.createContext(s));return function(l){const a=(l==null?void 0:l[e])||i;return c.useMemo(()=>({[`__scope${e}`]:{...l,[e]:a}}),[l,a])}};return o.scopeName=e,[r,UC(o,...t)]}function UC(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(i){const s=r.reduce((l,{useScope:a,scopeName:u})=>{const d=a(i)[`__scope${u}`];return{...l,...d}},{});return c.useMemo(()=>({[`__scope${t.scopeName}`]:s}),[s])}};return n.scopeName=t.scopeName,n}var En=c.forwardRef((e,t)=>{const{children:n,...r}=e,o=c.Children.toArray(n),i=o.find(BC);if(i){const s=i.props.children,l=o.map(a=>a===i?c.Children.count(s)>1?c.Children.only(null):c.isValidElement(s)?s.props.children:null:a);return m.jsx(gc,{...r,ref:t,children:c.isValidElement(s)?c.cloneElement(s,void 0,l):null})}return m.jsx(gc,{...r,ref:t,children:n})});En.displayName="Slot";var gc=c.forwardRef((e,t)=>{const{children:n,...r}=e;if(c.isValidElement(n)){const o=HC(n);return c.cloneElement(n,{...VC(r,n.props),ref:t?rl(t,o):o})}return c.Children.count(n)>1?c.Children.only(null):null});gc.displayName="SlotClone";var bv=({children:e})=>m.jsx(m.Fragment,{children:e});function BC(e){return c.isValidElement(e)&&e.type===bv}function VC(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...l)=>{i(...l),o(...l)}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}function HC(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function ol(e){const t=e+"CollectionProvider",[n,r]=ot(t),[o,i]=n(t,{collectionRef:{current:null},itemMap:new Map}),s=w=>{const{scope:y,children:v}=w,S=$t.useRef(null),h=$t.useRef(new Map).current;return m.jsx(o,{scope:y,itemMap:h,collectionRef:S,children:v})};s.displayName=t;const l=e+"CollectionSlot",a=$t.forwardRef((w,y)=>{const{scope:v,children:S}=w,h=i(l,v),g=ne(y,h.collectionRef);return m.jsx(En,{ref:g,children:S})});a.displayName=l;const u=e+"CollectionItemSlot",f="data-radix-collection-item",d=$t.forwardRef((w,y)=>{const{scope:v,children:S,...h}=w,g=$t.useRef(null),x=ne(y,g),C=i(u,v);return $t.useEffect(()=>(C.itemMap.set(g,{ref:g,...h}),()=>void C.itemMap.delete(g))),m.jsx(En,{[f]:"",ref:x,children:S})});d.displayName=u;function p(w){const y=i(e+"CollectionConsumer",w);return $t.useCallback(()=>{const S=y.collectionRef.current;if(!S)return[];const h=Array.from(S.querySelectorAll(`[${f}]`));return Array.from(y.itemMap.values()).sort((C,E)=>h.indexOf(C.ref.current)-h.indexOf(E.ref.current))},[y.collectionRef,y.itemMap])}return[{Provider:s,Slot:a,ItemSlot:d},p,r]}var WC=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],Z=WC.reduce((e,t)=>{const n=c.forwardRef((r,o)=>{const{asChild:i,...s}=r,l=i?En:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),m.jsx(l,{...s,ref:o})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function ju(e,t){e&&qt.flushSync(()=>e.dispatchEvent(t))}function xe(e){const t=c.useRef(e);return c.useEffect(()=>{t.current=e}),c.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function KC(e,t=globalThis==null?void 0:globalThis.document){const n=xe(e);c.useEffect(()=>{const r=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var GC="DismissableLayer",yc="dismissableLayer.update",YC="dismissableLayer.pointerDownOutside",XC="dismissableLayer.focusOutside",up,Rv=c.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),ii=c.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:i,onInteractOutside:s,onDismiss:l,...a}=e,u=c.useContext(Rv),[f,d]=c.useState(null),p=(f==null?void 0:f.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,w]=c.useState({}),y=ne(t,_=>d(_)),v=Array.from(u.layers),[S]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),h=v.indexOf(S),g=f?v.indexOf(f):-1,x=u.layersWithOutsidePointerEventsDisabled.size>0,C=g>=h,E=ZC(_=>{const R=_.target,k=[...u.branches].some(P=>P.contains(R));!C||k||(o==null||o(_),s==null||s(_),_.defaultPrevented||l==null||l())},p),b=qC(_=>{const R=_.target;[...u.branches].some(P=>P.contains(R))||(i==null||i(_),s==null||s(_),_.defaultPrevented||l==null||l())},p);return KC(_=>{g===u.layers.size-1&&(r==null||r(_),!_.defaultPrevented&&l&&(_.preventDefault(),l()))},p),c.useEffect(()=>{if(f)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(up=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(f)),u.layers.add(f),dp(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(p.body.style.pointerEvents=up)}},[f,p,n,u]),c.useEffect(()=>()=>{f&&(u.layers.delete(f),u.layersWithOutsidePointerEventsDisabled.delete(f),dp())},[f,u]),c.useEffect(()=>{const _=()=>w({});return document.addEventListener(yc,_),()=>document.removeEventListener(yc,_)},[]),m.jsx(Z.div,{...a,ref:y,style:{pointerEvents:x?C?"auto":"none":void 0,...e.style},onFocusCapture:F(e.onFocusCapture,b.onFocusCapture),onBlurCapture:F(e.onBlurCapture,b.onBlurCapture),onPointerDownCapture:F(e.onPointerDownCapture,E.onPointerDownCapture)})});ii.displayName=GC;var QC="DismissableLayerBranch",Pv=c.forwardRef((e,t)=>{const n=c.useContext(Rv),r=c.useRef(null),o=ne(t,r);return c.useEffect(()=>{const i=r.current;if(i)return n.branches.add(i),()=>{n.branches.delete(i)}},[n.branches]),m.jsx(Z.div,{...e,ref:o})});Pv.displayName=QC;function ZC(e,t=globalThis==null?void 0:globalThis.document){const n=xe(e),r=c.useRef(!1),o=c.useRef(()=>{});return c.useEffect(()=>{const i=l=>{if(l.target&&!r.current){let a=function(){kv(YC,n,u,{discrete:!0})};const u={originalEvent:l};l.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=a,t.addEventListener("click",o.current,{once:!0})):a()}else t.removeEventListener("click",o.current);r.current=!1},s=window.setTimeout(()=>{t.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(s),t.removeEventListener("pointerdown",i),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function qC(e,t=globalThis==null?void 0:globalThis.document){const n=xe(e),r=c.useRef(!1);return c.useEffect(()=>{const o=i=>{i.target&&!r.current&&kv(XC,n,{originalEvent:i},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function dp(){const e=new CustomEvent(yc);document.dispatchEvent(e)}function kv(e,t,n,{discrete:r}){const o=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?ju(o,i):o.dispatchEvent(i)}var JC=ii,eE=Pv,Yt=globalThis!=null&&globalThis.document?c.useLayoutEffect:()=>{},tE="Portal",si=c.forwardRef((e,t)=>{var l;const{container:n,...r}=e,[o,i]=c.useState(!1);Yt(()=>i(!0),[]);const s=n||o&&((l=globalThis==null?void 0:globalThis.document)==null?void 0:l.body);return s?Sv.createPortal(m.jsx(Z.div,{...r,ref:t}),s):null});si.displayName=tE;function nE(e,t){return c.useReducer((n,r)=>t[n][r]??n,e)}var Le=e=>{const{present:t,children:n}=e,r=rE(t),o=typeof n=="function"?n({present:r.isPresent}):c.Children.only(n),i=ne(r.ref,oE(o));return typeof n=="function"||r.isPresent?c.cloneElement(o,{ref:i}):null};Le.displayName="Presence";function rE(e){const[t,n]=c.useState(),r=c.useRef({}),o=c.useRef(e),i=c.useRef("none"),s=e?"mounted":"unmounted",[l,a]=nE(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return c.useEffect(()=>{const u=Di(r.current);i.current=l==="mounted"?u:"none"},[l]),Yt(()=>{const u=r.current,f=o.current;if(f!==e){const p=i.current,w=Di(u);e?a("MOUNT"):w==="none"||(u==null?void 0:u.display)==="none"?a("UNMOUNT"):a(f&&p!==w?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,a]),Yt(()=>{if(t){const u=d=>{const w=Di(r.current).includes(d.animationName);d.target===t&&w&&qt.flushSync(()=>a("ANIMATION_END"))},f=d=>{d.target===t&&(i.current=Di(r.current))};return t.addEventListener("animationstart",f),t.addEventListener("animationcancel",u),t.addEventListener("animationend",u),()=>{t.removeEventListener("animationstart",f),t.removeEventListener("animationcancel",u),t.removeEventListener("animationend",u)}}else a("ANIMATION_END")},[t,a]),{isPresent:["mounted","unmountSuspended"].includes(l),ref:c.useCallback(u=>{u&&(r.current=getComputedStyle(u)),n(u)},[])}}function Di(e){return(e==null?void 0:e.animationName)||"none"}function oE(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function nr({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,o]=iE({defaultProp:t,onChange:n}),i=e!==void 0,s=i?e:r,l=xe(n),a=c.useCallback(u=>{if(i){const d=typeof u=="function"?u(e):u;d!==e&&l(d)}else o(u)},[i,e,o,l]);return[s,a]}function iE({defaultProp:e,onChange:t}){const n=c.useState(e),[r]=n,o=c.useRef(r),i=xe(t);return c.useEffect(()=>{o.current!==r&&(i(r),o.current=r)},[r,o,i]),n}var sE="VisuallyHidden",Lu=c.forwardRef((e,t)=>m.jsx(Z.span,{...e,ref:t,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}}));Lu.displayName=sE;var Iu="ToastProvider",[$u,lE,aE]=ol("Toast"),[Nv,ZP]=ot("Toast",[aE]),[cE,il]=Nv(Iu),Tv=e=>{const{__scopeToast:t,label:n="Notification",duration:r=5e3,swipeDirection:o="right",swipeThreshold:i=50,children:s}=e,[l,a]=c.useState(null),[u,f]=c.useState(0),d=c.useRef(!1),p=c.useRef(!1);return n.trim()||console.error(`Invalid prop \`label\` supplied to \`${Iu}\`. Expected non-empty \`string\`.`),m.jsx($u.Provider,{scope:t,children:m.jsx(cE,{scope:t,label:n,duration:r,swipeDirection:o,swipeThreshold:i,toastCount:u,viewport:l,onViewportChange:a,onToastAdd:c.useCallback(()=>f(w=>w+1),[]),onToastRemove:c.useCallback(()=>f(w=>w-1),[]),isFocusedToastEscapeKeyDownRef:d,isClosePausedRef:p,children:s})})};Tv.displayName=Iu;var Av="ToastViewport",uE=["F8"],wc="toast.viewportPause",xc="toast.viewportResume",Dv=c.forwardRef((e,t)=>{const{__scopeToast:n,hotkey:r=uE,label:o="Notifications ({hotkey})",...i}=e,s=il(Av,n),l=lE(n),a=c.useRef(null),u=c.useRef(null),f=c.useRef(null),d=c.useRef(null),p=ne(t,d,s.onViewportChange),w=r.join("+").replace(/Key/g,"").replace(/Digit/g,""),y=s.toastCount>0;c.useEffect(()=>{const S=h=>{var x;r.every(C=>h[C]||h.code===C)&&((x=d.current)==null||x.focus())};return document.addEventListener("keydown",S),()=>document.removeEventListener("keydown",S)},[r]),c.useEffect(()=>{const S=a.current,h=d.current;if(y&&S&&h){const g=()=>{if(!s.isClosePausedRef.current){const b=new CustomEvent(wc);h.dispatchEvent(b),s.isClosePausedRef.current=!0}},x=()=>{if(s.isClosePausedRef.current){const b=new CustomEvent(xc);h.dispatchEvent(b),s.isClosePausedRef.current=!1}},C=b=>{!S.contains(b.relatedTarget)&&x()},E=()=>{S.contains(document.activeElement)||x()};return S.addEventListener("focusin",g),S.addEventListener("focusout",C),S.addEventListener("pointermove",g),S.addEventListener("pointerleave",E),window.addEventListener("blur",g),window.addEventListener("focus",x),()=>{S.removeEventListener("focusin",g),S.removeEventListener("focusout",C),S.removeEventListener("pointermove",g),S.removeEventListener("pointerleave",E),window.removeEventListener("blur",g),window.removeEventListener("focus",x)}}},[y,s.isClosePausedRef]);const v=c.useCallback(({tabbingDirection:S})=>{const g=l().map(x=>{const C=x.ref.current,E=[C,...EE(C)];return S==="forwards"?E:E.reverse()});return(S==="forwards"?g.reverse():g).flat()},[l]);return c.useEffect(()=>{const S=d.current;if(S){const h=g=>{var E,b,_;const x=g.altKey||g.ctrlKey||g.metaKey;if(g.key==="Tab"&&!x){const R=document.activeElement,k=g.shiftKey;if(g.target===S&&k){(E=u.current)==null||E.focus();return}const M=v({tabbingDirection:k?"backwards":"forwards"}),X=M.findIndex(O=>O===R);ta(M.slice(X+1))?g.preventDefault():k?(b=u.current)==null||b.focus():(_=f.current)==null||_.focus()}};return S.addEventListener("keydown",h),()=>S.removeEventListener("keydown",h)}},[l,v]),m.jsxs(eE,{ref:a,role:"region","aria-label":o.replace("{hotkey}",w),tabIndex:-1,style:{pointerEvents:y?void 0:"none"},children:[y&&m.jsx(Sc,{ref:u,onFocusFromOutsideViewport:()=>{const S=v({tabbingDirection:"forwards"});ta(S)}}),m.jsx($u.Slot,{scope:n,children:m.jsx(Z.ol,{tabIndex:-1,...i,ref:p})}),y&&m.jsx(Sc,{ref:f,onFocusFromOutsideViewport:()=>{const S=v({tabbingDirection:"backwards"});ta(S)}})]})});Dv.displayName=Av;var Mv="ToastFocusProxy",Sc=c.forwardRef((e,t)=>{const{__scopeToast:n,onFocusFromOutsideViewport:r,...o}=e,i=il(Mv,n);return m.jsx(Lu,{"aria-hidden":!0,tabIndex:0,...o,ref:t,style:{position:"fixed"},onFocus:s=>{var u;const l=s.relatedTarget;!((u=i.viewport)!=null&&u.contains(l))&&r()}})});Sc.displayName=Mv;var sl="Toast",dE="toast.swipeStart",fE="toast.swipeMove",pE="toast.swipeCancel",mE="toast.swipeEnd",Ov=c.forwardRef((e,t)=>{const{forceMount:n,open:r,defaultOpen:o,onOpenChange:i,...s}=e,[l=!0,a]=nr({prop:r,defaultProp:o,onChange:i});return m.jsx(Le,{present:n||l,children:m.jsx(gE,{open:l,...s,ref:t,onClose:()=>a(!1),onPause:xe(e.onPause),onResume:xe(e.onResume),onSwipeStart:F(e.onSwipeStart,u=>{u.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:F(e.onSwipeMove,u=>{const{x:f,y:d}=u.detail.delta;u.currentTarget.setAttribute("data-swipe","move"),u.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${f}px`),u.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${d}px`)}),onSwipeCancel:F(e.onSwipeCancel,u=>{u.currentTarget.setAttribute("data-swipe","cancel"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),u.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:F(e.onSwipeEnd,u=>{const{x:f,y:d}=u.detail.delta;u.currentTarget.setAttribute("data-swipe","end"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),u.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${f}px`),u.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${d}px`),a(!1)})})})});Ov.displayName=sl;var[hE,vE]=Nv(sl,{onClose(){}}),gE=c.forwardRef((e,t)=>{const{__scopeToast:n,type:r="foreground",duration:o,open:i,onClose:s,onEscapeKeyDown:l,onPause:a,onResume:u,onSwipeStart:f,onSwipeMove:d,onSwipeCancel:p,onSwipeEnd:w,...y}=e,v=il(sl,n),[S,h]=c.useState(null),g=ne(t,O=>h(O)),x=c.useRef(null),C=c.useRef(null),E=o||v.duration,b=c.useRef(0),_=c.useRef(E),R=c.useRef(0),{onToastAdd:k,onToastRemove:P}=v,D=xe(()=>{var V;(S==null?void 0:S.contains(document.activeElement))&&((V=v.viewport)==null||V.focus()),s()}),M=c.useCallback(O=>{!O||O===1/0||(window.clearTimeout(R.current),b.current=new Date().getTime(),R.current=window.setTimeout(D,O))},[D]);c.useEffect(()=>{const O=v.viewport;if(O){const V=()=>{M(_.current),u==null||u()},H=()=>{const I=new Date().getTime()-b.current;_.current=_.current-I,window.clearTimeout(R.current),a==null||a()};return O.addEventListener(wc,H),O.addEventListener(xc,V),()=>{O.removeEventListener(wc,H),O.removeEventListener(xc,V)}}},[v.viewport,E,a,u,M]),c.useEffect(()=>{i&&!v.isClosePausedRef.current&&M(E)},[i,E,v.isClosePausedRef,M]),c.useEffect(()=>(k(),()=>P()),[k,P]);const X=c.useMemo(()=>S?Uv(S):null,[S]);return v.viewport?m.jsxs(m.Fragment,{children:[X&&m.jsx(yE,{__scopeToast:n,role:"status","aria-live":r==="foreground"?"assertive":"polite","aria-atomic":!0,children:X}),m.jsx(hE,{scope:n,onClose:D,children:qt.createPortal(m.jsx($u.ItemSlot,{scope:n,children:m.jsx(JC,{asChild:!0,onEscapeKeyDown:F(l,()=>{v.isFocusedToastEscapeKeyDownRef.current||D(),v.isFocusedToastEscapeKeyDownRef.current=!1}),children:m.jsx(Z.li,{role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":i?"open":"closed","data-swipe-direction":v.swipeDirection,...y,ref:g,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:F(e.onKeyDown,O=>{O.key==="Escape"&&(l==null||l(O.nativeEvent),O.nativeEvent.defaultPrevented||(v.isFocusedToastEscapeKeyDownRef.current=!0,D()))}),onPointerDown:F(e.onPointerDown,O=>{O.button===0&&(x.current={x:O.clientX,y:O.clientY})}),onPointerMove:F(e.onPointerMove,O=>{if(!x.current)return;const V=O.clientX-x.current.x,H=O.clientY-x.current.y,I=!!C.current,A=["left","right"].includes(v.swipeDirection),T=["left","up"].includes(v.swipeDirection)?Math.min:Math.max,L=A?T(0,V):0,W=A?0:T(0,H),N=O.pointerType==="touch"?10:2,$={x:L,y:W},K={originalEvent:O,delta:$};I?(C.current=$,Mi(fE,d,K,{discrete:!1})):fp($,v.swipeDirection,N)?(C.current=$,Mi(dE,f,K,{discrete:!1}),O.target.setPointerCapture(O.pointerId)):(Math.abs(V)>N||Math.abs(H)>N)&&(x.current=null)}),onPointerUp:F(e.onPointerUp,O=>{const V=C.current,H=O.target;if(H.hasPointerCapture(O.pointerId)&&H.releasePointerCapture(O.pointerId),C.current=null,x.current=null,V){const I=O.currentTarget,A={originalEvent:O,delta:V};fp(V,v.swipeDirection,v.swipeThreshold)?Mi(mE,w,A,{discrete:!0}):Mi(pE,p,A,{discrete:!0}),I.addEventListener("click",T=>T.preventDefault(),{once:!0})}})})})}),v.viewport)})]}):null}),yE=e=>{const{__scopeToast:t,children:n,...r}=e,o=il(sl,t),[i,s]=c.useState(!1),[l,a]=c.useState(!1);return SE(()=>s(!0)),c.useEffect(()=>{const u=window.setTimeout(()=>a(!0),1e3);return()=>window.clearTimeout(u)},[]),l?null:m.jsx(si,{asChild:!0,children:m.jsx(Lu,{...r,children:i&&m.jsxs(m.Fragment,{children:[o.label," ",n]})})})},wE="ToastTitle",jv=c.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return m.jsx(Z.div,{...r,ref:t})});jv.displayName=wE;var xE="ToastDescription",Lv=c.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return m.jsx(Z.div,{...r,ref:t})});Lv.displayName=xE;var Iv="ToastAction",$v=c.forwardRef((e,t)=>{const{altText:n,...r}=e;return n.trim()?m.jsx(zv,{altText:n,asChild:!0,children:m.jsx(Fu,{...r,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${Iv}\`. Expected non-empty \`string\`.`),null)});$v.displayName=Iv;var Fv="ToastClose",Fu=c.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e,o=vE(Fv,n);return m.jsx(zv,{asChild:!0,children:m.jsx(Z.button,{type:"button",...r,ref:t,onClick:F(e.onClick,o.onClose)})})});Fu.displayName=Fv;var zv=c.forwardRef((e,t)=>{const{__scopeToast:n,altText:r,...o}=e;return m.jsx(Z.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":r||void 0,...o,ref:t})});function Uv(e){const t=[];return Array.from(e.childNodes).forEach(r=>{if(r.nodeType===r.TEXT_NODE&&r.textContent&&t.push(r.textContent),CE(r)){const o=r.ariaHidden||r.hidden||r.style.display==="none",i=r.dataset.radixToastAnnounceExclude==="";if(!o)if(i){const s=r.dataset.radixToastAnnounceAlt;s&&t.push(s)}else t.push(...Uv(r))}}),t}function Mi(e,t,n,{discrete:r}){const o=n.originalEvent.currentTarget,i=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?ju(o,i):o.dispatchEvent(i)}var fp=(e,t,n=0)=>{const r=Math.abs(e.x),o=Math.abs(e.y),i=r>o;return t==="left"||t==="right"?i&&r>n:!i&&o>n};function SE(e=()=>{}){const t=xe(e);Yt(()=>{let n=0,r=0;return n=window.requestAnimationFrame(()=>r=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(n),window.cancelAnimationFrame(r)}},[t])}function CE(e){return e.nodeType===e.ELEMENT_NODE}function EE(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function ta(e){const t=document.activeElement;return e.some(n=>n===t?!0:(n.focus(),document.activeElement!==t))}var _E=Tv,Bv=Dv,Vv=Ov,Hv=jv,Wv=Lv,Kv=$v,Gv=Fu;function Yv(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;ttypeof e=="boolean"?"".concat(e):e===0?"0":e,mp=bE,ll=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return mp(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:o,defaultVariants:i}=t,s=Object.keys(o).map(u=>{const f=n==null?void 0:n[u],d=i==null?void 0:i[u];if(f===null)return null;const p=pp(f)||pp(d);return o[u][p]}),l=n&&Object.entries(n).reduce((u,f)=>{let[d,p]=f;return p===void 0||(u[d]=p),u},{}),a=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((u,f)=>{let{class:d,className:p,...w}=f;return Object.entries(w).every(y=>{let[v,S]=y;return Array.isArray(S)?S.includes({...i,...l}[v]):{...i,...l}[v]===S})?[...u,d,p]:u},[]);return mp(e,s,a,n==null?void 0:n.class,n==null?void 0:n.className)};function Xv(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;tl(i)))==null?void 0:s.classGroupId}const hp=/^\[(.+)\]$/;function kE(e){if(hp.test(e)){const t=hp.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}}function NE(e){const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return AE(Object.entries(e.classGroups),n).forEach(([i,s])=>{Cc(s,r,i,t)}),r}function Cc(e,t,n,r){e.forEach(o=>{if(typeof o=="string"){const i=o===""?t:vp(t,o);i.classGroupId=n;return}if(typeof o=="function"){if(TE(o)){Cc(o(r),t,n,r);return}t.validators.push({validator:o,classGroupId:n});return}Object.entries(o).forEach(([i,s])=>{Cc(s,vp(t,i),n,r)})})}function vp(e,t){let n=e;return t.split(zu).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n}function TE(e){return e.isThemeGetter}function AE(e,t){return t?e.map(([n,r])=>{const o=r.map(i=>typeof i=="string"?t+i:typeof i=="object"?Object.fromEntries(Object.entries(i).map(([s,l])=>[t+s,l])):i);return[n,o]}):e}function DE(e){if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;function o(i,s){n.set(i,s),t++,t>e&&(t=0,r=n,n=new Map)}return{get(i){let s=n.get(i);if(s!==void 0)return s;if((s=r.get(i))!==void 0)return o(i,s),s},set(i,s){n.has(i)?n.set(i,s):o(i,s)}}}const Zv="!";function ME(e){const{separator:t,experimentalParseClassName:n}=e,r=t.length===1,o=t[0],i=t.length;function s(l){const a=[];let u=0,f=0,d;for(let S=0;Sf?d-f:void 0;return{modifiers:a,hasImportantModifier:w,baseClassName:y,maybePostfixModifierPosition:v}}return n?function(a){return n({className:a,parseClassName:s})}:s}function OE(e){if(e.length<=1)return e;const t=[];let n=[];return e.forEach(r=>{r[0]==="["?(t.push(...n.sort(),r),n=[]):n.push(r)}),t.push(...n.sort()),t}function jE(e){return{cache:DE(e.cacheSize),parseClassName:ME(e),...PE(e)}}const LE=/\s+/;function IE(e,t){const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o}=t,i=new Set;return e.trim().split(LE).map(s=>{const{modifiers:l,hasImportantModifier:a,baseClassName:u,maybePostfixModifierPosition:f}=n(s);let d=!!f,p=r(d?u.substring(0,f):u);if(!p){if(!d)return{isTailwindClass:!1,originalClassName:s};if(p=r(u),!p)return{isTailwindClass:!1,originalClassName:s};d=!1}const w=OE(l).join(":");return{isTailwindClass:!0,modifierId:a?w+Zv:w,classGroupId:p,originalClassName:s,hasPostfixModifier:d}}).reverse().filter(s=>{if(!s.isTailwindClass)return!0;const{modifierId:l,classGroupId:a,hasPostfixModifier:u}=s,f=l+a;return i.has(f)?!1:(i.add(f),o(a,u).forEach(d=>i.add(l+d)),!0)}).reverse().map(s=>s.originalClassName).join(" ")}function $E(){let e=0,t,n,r="";for(;ed(f),e());return n=jE(u),r=n.cache.get,o=n.cache.set,i=l,l(a)}function l(a){const u=r(a);if(u)return u;const f=IE(a,n);return o(a,f),f}return function(){return i($E.apply(null,arguments))}}function ce(e){const t=n=>n[e]||[];return t.isThemeGetter=!0,t}const Jv=/^\[(?:([a-z-]+):)?(.+)\]$/i,zE=/^\d+\/\d+$/,UE=new Set(["px","full","screen"]),BE=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,VE=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,HE=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,WE=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,KE=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/;function It(e){return $n(e)||UE.has(e)||zE.test(e)}function nn(e){return Yr(e,"length",e2)}function $n(e){return!!e&&!Number.isNaN(Number(e))}function Oi(e){return Yr(e,"number",$n)}function so(e){return!!e&&Number.isInteger(Number(e))}function GE(e){return e.endsWith("%")&&$n(e.slice(0,-1))}function q(e){return Jv.test(e)}function rn(e){return BE.test(e)}const YE=new Set(["length","size","percentage"]);function XE(e){return Yr(e,YE,eg)}function QE(e){return Yr(e,"position",eg)}const ZE=new Set(["image","url"]);function qE(e){return Yr(e,ZE,n2)}function JE(e){return Yr(e,"",t2)}function lo(){return!0}function Yr(e,t,n){const r=Jv.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1}function e2(e){return VE.test(e)&&!HE.test(e)}function eg(){return!1}function t2(e){return WE.test(e)}function n2(e){return KE.test(e)}function r2(){const e=ce("colors"),t=ce("spacing"),n=ce("blur"),r=ce("brightness"),o=ce("borderColor"),i=ce("borderRadius"),s=ce("borderSpacing"),l=ce("borderWidth"),a=ce("contrast"),u=ce("grayscale"),f=ce("hueRotate"),d=ce("invert"),p=ce("gap"),w=ce("gradientColorStops"),y=ce("gradientColorStopPositions"),v=ce("inset"),S=ce("margin"),h=ce("opacity"),g=ce("padding"),x=ce("saturate"),C=ce("scale"),E=ce("sepia"),b=ce("skew"),_=ce("space"),R=ce("translate"),k=()=>["auto","contain","none"],P=()=>["auto","hidden","clip","visible","scroll"],D=()=>["auto",q,t],M=()=>[q,t],X=()=>["",It,nn],O=()=>["auto",$n,q],V=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],H=()=>["solid","dashed","dotted","double","none"],I=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],A=()=>["start","end","center","between","around","evenly","stretch"],T=()=>["","0",q],L=()=>["auto","avoid","all","avoid-page","page","left","right","column"],W=()=>[$n,Oi],N=()=>[$n,q];return{cacheSize:500,separator:":",theme:{colors:[lo],spacing:[It,nn],blur:["none","",rn,q],brightness:W(),borderColor:[e],borderRadius:["none","","full",rn,q],borderSpacing:M(),borderWidth:X(),contrast:W(),grayscale:T(),hueRotate:N(),invert:T(),gap:M(),gradientColorStops:[e],gradientColorStopPositions:[GE,nn],inset:D(),margin:D(),opacity:W(),padding:M(),saturate:W(),scale:W(),sepia:T(),skew:N(),space:M(),translate:M()},classGroups:{aspect:[{aspect:["auto","square","video",q]}],container:["container"],columns:[{columns:[rn]}],"break-after":[{"break-after":L()}],"break-before":[{"break-before":L()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...V(),q]}],overflow:[{overflow:P()}],"overflow-x":[{"overflow-x":P()}],"overflow-y":[{"overflow-y":P()}],overscroll:[{overscroll:k()}],"overscroll-x":[{"overscroll-x":k()}],"overscroll-y":[{"overscroll-y":k()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[v]}],"inset-x":[{"inset-x":[v]}],"inset-y":[{"inset-y":[v]}],start:[{start:[v]}],end:[{end:[v]}],top:[{top:[v]}],right:[{right:[v]}],bottom:[{bottom:[v]}],left:[{left:[v]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",so,q]}],basis:[{basis:D()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",q]}],grow:[{grow:T()}],shrink:[{shrink:T()}],order:[{order:["first","last","none",so,q]}],"grid-cols":[{"grid-cols":[lo]}],"col-start-end":[{col:["auto",{span:["full",so,q]},q]}],"col-start":[{"col-start":O()}],"col-end":[{"col-end":O()}],"grid-rows":[{"grid-rows":[lo]}],"row-start-end":[{row:["auto",{span:[so,q]},q]}],"row-start":[{"row-start":O()}],"row-end":[{"row-end":O()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",q]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",q]}],gap:[{gap:[p]}],"gap-x":[{"gap-x":[p]}],"gap-y":[{"gap-y":[p]}],"justify-content":[{justify:["normal",...A()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...A(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...A(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[g]}],px:[{px:[g]}],py:[{py:[g]}],ps:[{ps:[g]}],pe:[{pe:[g]}],pt:[{pt:[g]}],pr:[{pr:[g]}],pb:[{pb:[g]}],pl:[{pl:[g]}],m:[{m:[S]}],mx:[{mx:[S]}],my:[{my:[S]}],ms:[{ms:[S]}],me:[{me:[S]}],mt:[{mt:[S]}],mr:[{mr:[S]}],mb:[{mb:[S]}],ml:[{ml:[S]}],"space-x":[{"space-x":[_]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[_]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",q,t]}],"min-w":[{"min-w":[q,t,"min","max","fit"]}],"max-w":[{"max-w":[q,t,"none","full","min","max","fit","prose",{screen:[rn]},rn]}],h:[{h:[q,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[q,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[q,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[q,t,"auto","min","max","fit"]}],"font-size":[{text:["base",rn,nn]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Oi]}],"font-family":[{font:[lo]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractons"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",q]}],"line-clamp":[{"line-clamp":["none",$n,Oi]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",It,q]}],"list-image":[{"list-image":["none",q]}],"list-style-type":[{list:["none","disc","decimal",q]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[h]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[h]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...H(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",It,nn]}],"underline-offset":[{"underline-offset":["auto",It,q]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:M()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",q]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",q]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[h]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...V(),QE]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",XE]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},qE]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[y]}],"gradient-via-pos":[{via:[y]}],"gradient-to-pos":[{to:[y]}],"gradient-from":[{from:[w]}],"gradient-via":[{via:[w]}],"gradient-to":[{to:[w]}],rounded:[{rounded:[i]}],"rounded-s":[{"rounded-s":[i]}],"rounded-e":[{"rounded-e":[i]}],"rounded-t":[{"rounded-t":[i]}],"rounded-r":[{"rounded-r":[i]}],"rounded-b":[{"rounded-b":[i]}],"rounded-l":[{"rounded-l":[i]}],"rounded-ss":[{"rounded-ss":[i]}],"rounded-se":[{"rounded-se":[i]}],"rounded-ee":[{"rounded-ee":[i]}],"rounded-es":[{"rounded-es":[i]}],"rounded-tl":[{"rounded-tl":[i]}],"rounded-tr":[{"rounded-tr":[i]}],"rounded-br":[{"rounded-br":[i]}],"rounded-bl":[{"rounded-bl":[i]}],"border-w":[{border:[l]}],"border-w-x":[{"border-x":[l]}],"border-w-y":[{"border-y":[l]}],"border-w-s":[{"border-s":[l]}],"border-w-e":[{"border-e":[l]}],"border-w-t":[{"border-t":[l]}],"border-w-r":[{"border-r":[l]}],"border-w-b":[{"border-b":[l]}],"border-w-l":[{"border-l":[l]}],"border-opacity":[{"border-opacity":[h]}],"border-style":[{border:[...H(),"hidden"]}],"divide-x":[{"divide-x":[l]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[l]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[h]}],"divide-style":[{divide:H()}],"border-color":[{border:[o]}],"border-color-x":[{"border-x":[o]}],"border-color-y":[{"border-y":[o]}],"border-color-t":[{"border-t":[o]}],"border-color-r":[{"border-r":[o]}],"border-color-b":[{"border-b":[o]}],"border-color-l":[{"border-l":[o]}],"divide-color":[{divide:[o]}],"outline-style":[{outline:["",...H()]}],"outline-offset":[{"outline-offset":[It,q]}],"outline-w":[{outline:[It,nn]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:X()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[h]}],"ring-offset-w":[{"ring-offset":[It,nn]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",rn,JE]}],"shadow-color":[{shadow:[lo]}],opacity:[{opacity:[h]}],"mix-blend":[{"mix-blend":[...I(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":I()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[a]}],"drop-shadow":[{"drop-shadow":["","none",rn,q]}],grayscale:[{grayscale:[u]}],"hue-rotate":[{"hue-rotate":[f]}],invert:[{invert:[d]}],saturate:[{saturate:[x]}],sepia:[{sepia:[E]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[a]}],"backdrop-grayscale":[{"backdrop-grayscale":[u]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[f]}],"backdrop-invert":[{"backdrop-invert":[d]}],"backdrop-opacity":[{"backdrop-opacity":[h]}],"backdrop-saturate":[{"backdrop-saturate":[x]}],"backdrop-sepia":[{"backdrop-sepia":[E]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[s]}],"border-spacing-x":[{"border-spacing-x":[s]}],"border-spacing-y":[{"border-spacing-y":[s]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",q]}],duration:[{duration:N()}],ease:[{ease:["linear","in","out","in-out",q]}],delay:[{delay:N()}],animate:[{animate:["none","spin","ping","pulse","bounce",q]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[C]}],"scale-x":[{"scale-x":[C]}],"scale-y":[{"scale-y":[C]}],rotate:[{rotate:[so,q]}],"translate-x":[{"translate-x":[R]}],"translate-y":[{"translate-y":[R]}],"skew-x":[{"skew-x":[b]}],"skew-y":[{"skew-y":[b]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",q]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",q]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":M()}],"scroll-mx":[{"scroll-mx":M()}],"scroll-my":[{"scroll-my":M()}],"scroll-ms":[{"scroll-ms":M()}],"scroll-me":[{"scroll-me":M()}],"scroll-mt":[{"scroll-mt":M()}],"scroll-mr":[{"scroll-mr":M()}],"scroll-mb":[{"scroll-mb":M()}],"scroll-ml":[{"scroll-ml":M()}],"scroll-p":[{"scroll-p":M()}],"scroll-px":[{"scroll-px":M()}],"scroll-py":[{"scroll-py":M()}],"scroll-ps":[{"scroll-ps":M()}],"scroll-pe":[{"scroll-pe":M()}],"scroll-pt":[{"scroll-pt":M()}],"scroll-pr":[{"scroll-pr":M()}],"scroll-pb":[{"scroll-pb":M()}],"scroll-pl":[{"scroll-pl":M()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",q]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[It,nn,Oi]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}}const o2=FE(r2);function U(...e){return o2(RE(e))}const i2=_E,tg=c.forwardRef(({className:e,...t},n)=>m.jsx(Bv,{ref:n,className:U("fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]",e),...t}));tg.displayName=Bv.displayName;const s2=ll("group pointer-events-auto relative flex w-full items-center justify-between space-x-2 overflow-hidden rounded-md border p-4 pr-6 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full",{variants:{variant:{default:"border bg-background text-foreground",destructive:"destructive group border-destructive bg-destructive text-destructive-foreground"}},defaultVariants:{variant:"default"}}),ng=c.forwardRef(({className:e,variant:t,...n},r)=>m.jsx(Vv,{ref:r,className:U(s2({variant:t}),e),...n}));ng.displayName=Vv.displayName;const l2=c.forwardRef(({className:e,...t},n)=>m.jsx(Kv,{ref:n,className:U("inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium transition-colors hover:bg-secondary focus:outline-none focus:ring-1 focus:ring-ring disabled:pointer-events-none disabled:opacity-50 group-[.destructive]:border-muted/40 group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground group-[.destructive]:focus:ring-destructive",e),...t}));l2.displayName=Kv.displayName;const rg=c.forwardRef(({className:e,...t},n)=>m.jsx(Gv,{ref:n,className:U("absolute right-1 top-1 rounded-md p-1 text-foreground/50 opacity-0 transition-opacity hover:text-foreground focus:opacity-100 focus:outline-none focus:ring-1 group-hover:opacity-100 group-[.destructive]:text-red-300 group-[.destructive]:hover:text-red-50 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600",e),"toast-close":"",...t,children:m.jsx(_v,{className:"h-4 w-4"})}));rg.displayName=Gv.displayName;const og=c.forwardRef(({className:e,...t},n)=>m.jsx(Hv,{ref:n,className:U("text-sm font-semibold [&+div]:text-xs",e),...t}));og.displayName=Hv.displayName;const ig=c.forwardRef(({className:e,...t},n)=>m.jsx(Wv,{ref:n,className:U("text-sm opacity-90",e),...t}));ig.displayName=Wv.displayName;const a2=1,c2=1e6;let na=0;function u2(){return na=(na+1)%Number.MAX_SAFE_INTEGER,na.toString()}const ra=new Map,gp=e=>{if(ra.has(e))return;const t=setTimeout(()=>{ra.delete(e),_o({type:"REMOVE_TOAST",toastId:e})},c2);ra.set(e,t)},d2=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,a2)};case"UPDATE_TOAST":return{...e,toasts:e.toasts.map(n=>n.id===t.toast.id?{...n,...t.toast}:n)};case"DISMISS_TOAST":{const{toastId:n}=t;return n?gp(n):e.toasts.forEach(r=>{gp(r.id)}),{...e,toasts:e.toasts.map(r=>r.id===n||n===void 0?{...r,open:!1}:r)}}case"REMOVE_TOAST":return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(n=>n.id!==t.toastId)}}},ts=[];let ns={toasts:[]};function _o(e){ns=d2(ns,e),ts.forEach(t=>{t(ns)})}function f2({...e}){const t=u2(),n=o=>_o({type:"UPDATE_TOAST",toast:{...o,id:t}}),r=()=>_o({type:"DISMISS_TOAST",toastId:t});return _o({type:"ADD_TOAST",toast:{...e,id:t,open:!0,onOpenChange:o=>{o||r()}}}),{id:t,dismiss:r,update:n}}function sg(){const[e,t]=c.useState(ns);return c.useEffect(()=>(ts.push(t),()=>{const n=ts.indexOf(t);n>-1&&ts.splice(n,1)}),[e]),{...e,toast:f2,dismiss:n=>_o({type:"DISMISS_TOAST",toastId:n})}}function p2(){const{toasts:e}=sg();return m.jsxs(i2,{children:[e.map(function({id:t,title:n,description:r,action:o,...i}){return m.jsxs(ng,{...i,children:[m.jsxs("div",{className:"grid gap-1",children:[n&&m.jsx(og,{children:n}),r&&m.jsx(ig,{children:r})]}),o,m.jsx(rg,{})]},t)}),m.jsx(tg,{})]})}const m2=1/3,Pt=1/6,oa=e=>Math.floor(e)|0,ia=new Float64Array([1,1,0,-1,1,0,1,-1,0,-1,-1,0,1,0,1,-1,0,1,1,0,-1,-1,0,-1,0,1,1,0,-1,1,0,1,-1,0,-1,-1]);function h2(e=Math.random){const t=v2(e),n=new Float64Array(t).map(i=>ia[i%12*3]),r=new Float64Array(t).map(i=>ia[i%12*3+1]),o=new Float64Array(t).map(i=>ia[i%12*3+2]);return function(s,l,a){let u,f,d,p;const w=(s+l+a)*m2,y=oa(s+w),v=oa(l+w),S=oa(a+w),h=(y+v+S)*Pt,g=y-h,x=v-h,C=S-h,E=s-g,b=l-x,_=a-C;let R,k,P,D,M,X;E>=b?b>=_?(R=1,k=0,P=0,D=1,M=1,X=0):E>=_?(R=1,k=0,P=0,D=1,M=0,X=1):(R=0,k=0,P=1,D=1,M=0,X=1):b<_?(R=0,k=0,P=1,D=0,M=1,X=1):E<_?(R=0,k=1,P=0,D=0,M=1,X=1):(R=0,k=1,P=0,D=1,M=1,X=0);const O=E-R+Pt,V=b-k+Pt,H=_-P+Pt,I=E-D+2*Pt,A=b-M+2*Pt,T=_-X+2*Pt,L=E-1+3*Pt,W=b-1+3*Pt,N=_-1+3*Pt,$=y&255,K=v&255,z=S&255;let G=.6-E*E-b*b-_*_;if(G<0)u=0;else{const ee=$+t[K+t[z]];G*=G,u=G*G*(n[ee]*E+r[ee]*b+o[ee]*_)}let Q=.6-O*O-V*V-H*H;if(Q<0)f=0;else{const ee=$+R+t[K+k+t[z+P]];Q*=Q,f=Q*Q*(n[ee]*O+r[ee]*V+o[ee]*H)}let J=.6-I*I-A*A-T*T;if(J<0)d=0;else{const ee=$+D+t[K+M+t[z+X]];J*=J,d=J*J*(n[ee]*I+r[ee]*A+o[ee]*T)}let re=.6-L*L-W*W-N*N;if(re<0)p=0;else{const ee=$+1+t[K+1+t[z+1]];re*=re,p=re*re*(n[ee]*L+r[ee]*W+o[ee]*N)}return 32*(u+f+d+p)}}function v2(e){const n=new Uint8Array(512);for(let r=0;r<512/2;r++)n[r]=r;for(let r=0;r<512/2-1;r++){const o=r+~~(e()*(256-r)),i=n[r];n[r]=n[o],n[o]=i}for(let r=256;r<512;r++)n[r]=n[r-256];return n}function g2({children:e,className:t,containerClassName:n,colors:r,waveWidth:o,backgroundFill:i,blur:s=10,speed:l="fast",waveOpacity:a=.5,...u}){const f=h2();let d,p,w,y,v,S,h;const g=c.useRef(null),x=()=>{switch(l){case"slow":return .001;case"fast":return .002;default:return .001}},C=()=>{h=g.current,S=h.getContext("2d"),d=S.canvas.width=window.innerWidth,p=S.canvas.height=window.innerHeight,S.filter=`blur(${s}px)`,w=0,window.onresize=function(){d=S.canvas.width=window.innerWidth,p=S.canvas.height=window.innerHeight,S.filter=`blur(${s}px)`},R()},E=r??["#38bdf8","#818cf8","#c084fc","#e879f9","#22d3ee"],b=D=>{for(w+=x(),y=0;y{S.fillStyle=i||"black",S.globalAlpha=a||.5,S.fillRect(0,0,d,p),b(5),_=requestAnimationFrame(R)};c.useEffect(()=>(C(),()=>{cancelAnimationFrame(_)}),[]);const[k,P]=c.useState(!1);return c.useEffect(()=>{P(typeof window<"u"&&navigator.userAgent.includes("Safari")&&!navigator.userAgent.includes("Chrome"))},[]),m.jsxs("div",{className:U("h-screen flex flex-col items-center justify-center",n),children:[m.jsx("canvas",{className:"absolute inset-0 z-0",ref:g,id:"canvas",style:{...k?{filter:`blur(${s}px)`}:{}}}),m.jsx("div",{className:U("relative z-10",t),...u,children:e})]})}function y2(e){return m.jsxs("section",{...e,className:U("mx-auto flex flex-col items-start gap-2 w-full",e.className),children:[m.jsxs("a",{className:"group inline-flex items-center px-0.5 text-sm font-medium",href:"https://github.com/diffusion-studio/vits-web",target:"_blank",children:[m.jsx(gC,{className:"h-4 w-4"}),m.jsx("span",{className:"underline-offset-4 group-hover:underline ml-3",children:"Introducing VITS Web"}),m.jsx(Cv,{className:"h-4 w-4 ml-1"})]}),m.jsx("h1",{className:"text-3xl font-bold leading-tight tracking-tighter md:text-4xl lg:leading-[1.1] hidden md:block",children:"Local speech generation demo."}),m.jsx("h1",{className:"text-3xl font-bold leading-tight tracking-tighter md:text-4xl lg:leading-[1.1] md:hidden",children:"Local speech generation demo."}),m.jsx("p",{className:"max-w-2xl text-lg font-light text-foreground",children:"Javascript library for running text-to-speech locally in your browser."}),m.jsx("div",{className:"px-2 py-1 rounded-md bg-zinc-50 border border-zinc-300 mt-1",children:m.jsx("p",{className:"font-mono text-zinc-500 text-sm",children:"npm i @diffusionstudio/vits-web"})})]})}const Uu=ll("inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary text-primary-foreground shadow hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",outline:"border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-md px-3 text-xs",lg:"h-10 rounded-md px-8",icon:"h-9 w-9"}},defaultVariants:{variant:"default",size:"default"}}),_n=c.forwardRef(({className:e,variant:t,size:n,asChild:r=!1,...o},i)=>{const s=r?En:"button";return m.jsx(s,{className:U(Uu({variant:t,size:n,className:e})),ref:i,...o})});_n.displayName="Button";/** * @license lucide-react v0.403.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const w2=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),lg=(...e)=>e.filter((t,n,r)=>!!t&&r.indexOf(t)===n).join(" ");/** * @license lucide-react v0.403.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */var x2={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/** * @license lucide-react v0.403.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const S2=c.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:o="",children:i,iconNode:s,...l},a)=>c.createElement("svg",{ref:a,...x2,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:lg("lucide",o),...l},[...s.map(([u,f])=>c.createElement(u,f)),...Array.isArray(i)?i:[i]]));/** * @license lucide-react v0.403.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const li=(e,t)=>{const n=c.forwardRef(({className:r,...o},i)=>c.createElement(S2,{ref:i,iconNode:t,className:lg(`lucide-${w2(e)}`,r),...o}));return n.displayName=`${e}`,n};/** * @license lucide-react v0.403.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const ag=li("Blocks",[["rect",{width:"7",height:"7",x:"14",y:"3",rx:"1",key:"6d4xhi"}],["path",{d:"M10 21V8a1 1 0 0 0-1-1H4a1 1 0 0 0-1 1v12a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-5a1 1 0 0 0-1-1H3",key:"1fpvtg"}]]);/** * @license lucide-react v0.403.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const C2=li("Command",[["path",{d:"M15 6v12a3 3 0 1 0 3-3H6a3 3 0 1 0 3 3V6a3 3 0 1 0-3 3h12a3 3 0 1 0-3-3",key:"11bfej"}]]);/** * @license lucide-react v0.403.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const E2=li("CornerDownLeft",[["polyline",{points:"9 10 4 15 9 20",key:"r3jprv"}],["path",{d:"M20 4v7a4 4 0 0 1-4 4H4",key:"6o5b7l"}]]);/** * @license lucide-react v0.403.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const cg=li("Pause",[["rect",{x:"14",y:"4",width:"4",height:"16",rx:"1",key:"zuxfzm"}],["rect",{x:"6",y:"4",width:"4",height:"16",rx:"1",key:"1okwgv"}]]);/** * @license lucide-react v0.403.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const ug=li("Play",[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]]),ks="https://huggingface.co/diffusionstudio/piper-voices/resolve/main",dg={"ar_JO-kareem-low":"ar/ar_JO/kareem/low/ar_JO-kareem-low.onnx","ar_JO-kareem-medium":"ar/ar_JO/kareem/medium/ar_JO-kareem-medium.onnx","ca_ES-upc_ona-medium":"ca/ca_ES/upc_ona/medium/ca_ES-upc_ona-medium.onnx","ca_ES-upc_ona-x_low":"ca/ca_ES/upc_ona/x_low/ca_ES-upc_ona-x_low.onnx","ca_ES-upc_pau-x_low":"ca/ca_ES/upc_pau/x_low/ca_ES-upc_pau-x_low.onnx","cs_CZ-jirka-low":"cs/cs_CZ/jirka/low/cs_CZ-jirka-low.onnx","cs_CZ-jirka-medium":"cs/cs_CZ/jirka/medium/cs_CZ-jirka-medium.onnx","da_DK-talesyntese-medium":"da/da_DK/talesyntese/medium/da_DK-talesyntese-medium.onnx","de_DE-eva_k-x_low":"de/de_DE/eva_k/x_low/de_DE-eva_k-x_low.onnx","de_DE-karlsson-low":"de/de_DE/karlsson/low/de_DE-karlsson-low.onnx","de_DE-kerstin-low":"de/de_DE/kerstin/low/de_DE-kerstin-low.onnx","de_DE-mls-medium":"de/de_DE/mls/medium/de_DE-mls-medium.onnx","de_DE-pavoque-low":"de/de_DE/pavoque/low/de_DE-pavoque-low.onnx","de_DE-ramona-low":"de/de_DE/ramona/low/de_DE-ramona-low.onnx","de_DE-thorsten-high":"de/de_DE/thorsten/high/de_DE-thorsten-high.onnx","de_DE-thorsten-low":"de/de_DE/thorsten/low/de_DE-thorsten-low.onnx","de_DE-thorsten-medium":"de/de_DE/thorsten/medium/de_DE-thorsten-medium.onnx","de_DE-thorsten_emotional-medium":"de/de_DE/thorsten_emotional/medium/de_DE-thorsten_emotional-medium.onnx","el_GR-rapunzelina-low":"el/el_GR/rapunzelina/low/el_GR-rapunzelina-low.onnx","en_GB-alan-low":"en/en_GB/alan/low/en_GB-alan-low.onnx","en_GB-alan-medium":"en/en_GB/alan/medium/en_GB-alan-medium.onnx","en_GB-alba-medium":"en/en_GB/alba/medium/en_GB-alba-medium.onnx","en_GB-aru-medium":"en/en_GB/aru/medium/en_GB-aru-medium.onnx","en_GB-cori-high":"en/en_GB/cori/high/en_GB-cori-high.onnx","en_GB-cori-medium":"en/en_GB/cori/medium/en_GB-cori-medium.onnx","en_GB-jenny_dioco-medium":"en/en_GB/jenny_dioco/medium/en_GB-jenny_dioco-medium.onnx","en_GB-northern_english_male-medium":"en/en_GB/northern_english_male/medium/en_GB-northern_english_male-medium.onnx","en_GB-semaine-medium":"en/en_GB/semaine/medium/en_GB-semaine-medium.onnx","en_GB-southern_english_female-low":"en/en_GB/southern_english_female/low/en_GB-southern_english_female-low.onnx","en_GB-vctk-medium":"en/en_GB/vctk/medium/en_GB-vctk-medium.onnx","en_US-amy-low":"en/en_US/amy/low/en_US-amy-low.onnx","en_US-amy-medium":"en/en_US/amy/medium/en_US-amy-medium.onnx","en_US-arctic-medium":"en/en_US/arctic/medium/en_US-arctic-medium.onnx","en_US-danny-low":"en/en_US/danny/low/en_US-danny-low.onnx","en_US-hfc_female-medium":"en/en_US/hfc_female/medium/en_US-hfc_female-medium.onnx","en_US-hfc_male-medium":"en/en_US/hfc_male/medium/en_US-hfc_male-medium.onnx","en_US-joe-medium":"en/en_US/joe/medium/en_US-joe-medium.onnx","en_US-kathleen-low":"en/en_US/kathleen/low/en_US-kathleen-low.onnx","en_US-kristin-medium":"en/en_US/kristin/medium/en_US-kristin-medium.onnx","en_US-kusal-medium":"en/en_US/kusal/medium/en_US-kusal-medium.onnx","en_US-l2arctic-medium":"en/en_US/l2arctic/medium/en_US-l2arctic-medium.onnx","en_US-lessac-high":"en/en_US/lessac/high/en_US-lessac-high.onnx","en_US-lessac-low":"en/en_US/lessac/low/en_US-lessac-low.onnx","en_US-lessac-medium":"en/en_US/lessac/medium/en_US-lessac-medium.onnx","en_US-libritts-high":"en/en_US/libritts/high/en_US-libritts-high.onnx","en_US-libritts_r-medium":"en/en_US/libritts_r/medium/en_US-libritts_r-medium.onnx","en_US-ljspeech-high":"en/en_US/ljspeech/high/en_US-ljspeech-high.onnx","en_US-ljspeech-medium":"en/en_US/ljspeech/medium/en_US-ljspeech-medium.onnx","en_US-ryan-high":"en/en_US/ryan/high/en_US-ryan-high.onnx","en_US-ryan-low":"en/en_US/ryan/low/en_US-ryan-low.onnx","en_US-ryan-medium":"en/en_US/ryan/medium/en_US-ryan-medium.onnx","es_ES-carlfm-x_low":"es/es_ES/carlfm/x_low/es_ES-carlfm-x_low.onnx","es_ES-davefx-medium":"es/es_ES/davefx/medium/es_ES-davefx-medium.onnx","es_ES-mls_10246-low":"es/es_ES/mls_10246/low/es_ES-mls_10246-low.onnx","es_ES-mls_9972-low":"es/es_ES/mls_9972/low/es_ES-mls_9972-low.onnx","es_ES-sharvard-medium":"es/es_ES/sharvard/medium/es_ES-sharvard-medium.onnx","es_MX-ald-medium":"es/es_MX/ald/medium/es_MX-ald-medium.onnx","es_MX-claude-high":"es/es_MX/claude/high/es_MX-claude-high.onnx","fa_IR-amir-medium":"fa/fa_IR/amir/medium/fa_IR-amir-medium.onnx","fa_IR-gyro-medium":"fa/fa_IR/gyro/medium/fa_IR-gyro-medium.onnx","fi_FI-harri-low":"fi/fi_FI/harri/low/fi_FI-harri-low.onnx","fi_FI-harri-medium":"fi/fi_FI/harri/medium/fi_FI-harri-medium.onnx","fr_FR-gilles-low":"fr/fr_FR/gilles/low/fr_FR-gilles-low.onnx","fr_FR-mls-medium":"fr/fr_FR/mls/medium/fr_FR-mls-medium.onnx","fr_FR-mls_1840-low":"fr/fr_FR/mls_1840/low/fr_FR-mls_1840-low.onnx","fr_FR-siwis-low":"fr/fr_FR/siwis/low/fr_FR-siwis-low.onnx","fr_FR-siwis-medium":"fr/fr_FR/siwis/medium/fr_FR-siwis-medium.onnx","fr_FR-tom-medium":"fr/fr_FR/tom/medium/fr_FR-tom-medium.onnx","fr_FR-upmc-medium":"fr/fr_FR/upmc/medium/fr_FR-upmc-medium.onnx","hu_HU-anna-medium":"hu/hu_HU/anna/medium/hu_HU-anna-medium.onnx","hu_HU-berta-medium":"hu/hu_HU/berta/medium/hu_HU-berta-medium.onnx","hu_HU-imre-medium":"hu/hu_HU/imre/medium/hu_HU-imre-medium.onnx","is_IS-bui-medium":"is/is_IS/bui/medium/is_IS-bui-medium.onnx","is_IS-salka-medium":"is/is_IS/salka/medium/is_IS-salka-medium.onnx","is_IS-steinn-medium":"is/is_IS/steinn/medium/is_IS-steinn-medium.onnx","is_IS-ugla-medium":"is/is_IS/ugla/medium/is_IS-ugla-medium.onnx","it_IT-riccardo-x_low":"it/it_IT/riccardo/x_low/it_IT-riccardo-x_low.onnx","ka_GE-natia-medium":"ka/ka_GE/natia/medium/ka_GE-natia-medium.onnx","kk_KZ-iseke-x_low":"kk/kk_KZ/iseke/x_low/kk_KZ-iseke-x_low.onnx","kk_KZ-issai-high":"kk/kk_KZ/issai/high/kk_KZ-issai-high.onnx","kk_KZ-raya-x_low":"kk/kk_KZ/raya/x_low/kk_KZ-raya-x_low.onnx","lb_LU-marylux-medium":"lb/lb_LU/marylux/medium/lb_LU-marylux-medium.onnx","ne_NP-google-medium":"ne/ne_NP/google/medium/ne_NP-google-medium.onnx","ne_NP-google-x_low":"ne/ne_NP/google/x_low/ne_NP-google-x_low.onnx","nl_BE-nathalie-medium":"nl/nl_BE/nathalie/medium/nl_BE-nathalie-medium.onnx","nl_BE-nathalie-x_low":"nl/nl_BE/nathalie/x_low/nl_BE-nathalie-x_low.onnx","nl_BE-rdh-medium":"nl/nl_BE/rdh/medium/nl_BE-rdh-medium.onnx","nl_BE-rdh-x_low":"nl/nl_BE/rdh/x_low/nl_BE-rdh-x_low.onnx","nl_NL-mls-medium":"nl/nl_NL/mls/medium/nl_NL-mls-medium.onnx","nl_NL-mls_5809-low":"nl/nl_NL/mls_5809/low/nl_NL-mls_5809-low.onnx","nl_NL-mls_7432-low":"nl/nl_NL/mls_7432/low/nl_NL-mls_7432-low.onnx","no_NO-talesyntese-medium":"no/no_NO/talesyntese/medium/no_NO-talesyntese-medium.onnx","pl_PL-darkman-medium":"pl/pl_PL/darkman/medium/pl_PL-darkman-medium.onnx","pl_PL-gosia-medium":"pl/pl_PL/gosia/medium/pl_PL-gosia-medium.onnx","pl_PL-mc_speech-medium":"pl/pl_PL/mc_speech/medium/pl_PL-mc_speech-medium.onnx","pl_PL-mls_6892-low":"pl/pl_PL/mls_6892/low/pl_PL-mls_6892-low.onnx","pt_BR-edresson-low":"pt/pt_BR/edresson/low/pt_BR-edresson-low.onnx","pt_BR-faber-medium":"pt/pt_BR/faber/medium/pt_BR-faber-medium.onnx","pt_PT-tugão-medium":"pt/pt_PT/tugão/medium/pt_PT-tugão-medium.onnx","ro_RO-mihai-medium":"ro/ro_RO/mihai/medium/ro_RO-mihai-medium.onnx","ru_RU-denis-medium":"ru/ru_RU/denis/medium/ru_RU-denis-medium.onnx","ru_RU-dmitri-medium":"ru/ru_RU/dmitri/medium/ru_RU-dmitri-medium.onnx","ru_RU-irina-medium":"ru/ru_RU/irina/medium/ru_RU-irina-medium.onnx","ru_RU-ruslan-medium":"ru/ru_RU/ruslan/medium/ru_RU-ruslan-medium.onnx","sk_SK-lili-medium":"sk/sk_SK/lili/medium/sk_SK-lili-medium.onnx","sl_SI-artur-medium":"sl/sl_SI/artur/medium/sl_SI-artur-medium.onnx","sr_RS-serbski_institut-medium":"sr/sr_RS/serbski_institut/medium/sr_RS-serbski_institut-medium.onnx","sv_SE-nst-medium":"sv/sv_SE/nst/medium/sv_SE-nst-medium.onnx","sw_CD-lanfrica-medium":"sw/sw_CD/lanfrica/medium/sw_CD-lanfrica-medium.onnx","tr_TR-dfki-medium":"tr/tr_TR/dfki/medium/tr_TR-dfki-medium.onnx","tr_TR-fahrettin-medium":"tr/tr_TR/fahrettin/medium/tr_TR-fahrettin-medium.onnx","tr_TR-fettah-medium":"tr/tr_TR/fettah/medium/tr_TR-fettah-medium.onnx","uk_UA-lada-x_low":"uk/uk_UA/lada/x_low/uk_UA-lada-x_low.onnx","uk_UA-ukrainian_tts-medium":"uk/uk_UA/ukrainian_tts/medium/uk_UA-ukrainian_tts-medium.onnx","vi_VN-25hours_single-low":"vi/vi_VN/25hours_single/low/vi_VN-25hours_single-low.onnx","vi_VN-vais1000-medium":"vi/vi_VN/vais1000/medium/vi_VN-vais1000-medium.onnx","vi_VN-vivos-x_low":"vi/vi_VN/vivos/x_low/vi_VN-vivos-x_low.onnx","zh_CN-huayan-medium":"zh/zh_CN/huayan/medium/zh_CN-huayan-medium.onnx","zh_CN-huayan-x_low":"zh/zh_CN/huayan/x_low/zh_CN-huayan-x_low.onnx"};async function _2(e){try{const t=await(await navigator.storage.getDirectory()).getDirectoryHandle("piper"),n=e.split("/").at(-1);await(await t.getFileHandle(n)).remove()}catch(t){console.error(t)}}async function b2(e){const t=dg[e],n=[`${ks}/${t}`,`${ks}/${t}.json`];await Promise.all(n.map(r=>_2(r)))}async function sa(){const e=await(await navigator.storage.getDirectory()).getDirectoryHandle("piper",{create:!0}),t=[];for await(const n of e.keys()){const r=n.split(".")[0];n.endsWith(".onnx")&&r in dg&&t.push(r)}return t}async function R2(){try{await(await(await navigator.storage.getDirectory()).getDirectoryHandle("piper")).remove({recursive:!0})}catch(e){console.error(e)}}async function P2(){const e=await fetch(`${ks}/voices.json`);if(!e.ok)throw new Error("Could not retrieve voices file from huggingface");return Object.values(await e.json())}var yp=1,k2=.9,N2=.8,T2=.17,la=.1,aa=.999,A2=.9999,D2=.99,M2=/[\\\/_+.#"@\[\(\{&]/,O2=/[\\\/_+.#"@\[\(\{&]/g,j2=/[\s-]/,fg=/[\s-]/g;function Ec(e,t,n,r,o,i,s){if(i===t.length)return o===e.length?yp:D2;var l=`${o},${i}`;if(s[l]!==void 0)return s[l];for(var a=r.charAt(i),u=n.indexOf(a,o),f=0,d,p,w,y;u>=0;)d=Ec(e,t,n,r,u+1,i+1,s),d>f&&(u===o?d*=yp:M2.test(e.charAt(u-1))?(d*=N2,w=e.slice(o,u-1).match(O2),w&&o>0&&(d*=Math.pow(aa,w.length))):j2.test(e.charAt(u-1))?(d*=k2,y=e.slice(o,u-1).match(fg),y&&o>0&&(d*=Math.pow(aa,y.length))):(d*=T2,o>0&&(d*=Math.pow(aa,u-o))),e.charAt(u)!==t.charAt(i)&&(d*=A2)),(dd&&(d=p*la)),d>f&&(f=d),u=n.indexOf(a,u+1);return s[l]=f,f}function wp(e){return e.toLowerCase().replace(fg," ")}function L2(e,t,n){return e=n&&n.length>0?`${e+" "+n.join(" ")}`:e,Ec(e,t,wp(e),wp(t),0,0,{})}function ze(){return ze=Object.assign?Object.assign.bind():function(e){for(var t=1;te.forEach(n=>I2(n,t))}function ai(...e){return c.useCallback(pg(...e),e)}function $2(e,t=[]){let n=[];function r(i,s){const l=c.createContext(s),a=n.length;n=[...n,s];function u(d){const{scope:p,children:w,...y}=d,v=(p==null?void 0:p[e][a])||l,S=c.useMemo(()=>y,Object.values(y));return c.createElement(v.Provider,{value:S},w)}function f(d,p){const w=(p==null?void 0:p[e][a])||l,y=c.useContext(w);if(y)return y;if(s!==void 0)return s;throw new Error(`\`${d}\` must be used within \`${i}\``)}return u.displayName=i+"Provider",[u,f]}const o=()=>{const i=n.map(s=>c.createContext(s));return function(l){const a=(l==null?void 0:l[e])||i;return c.useMemo(()=>({[`__scope${e}`]:{...l,[e]:a}}),[l,a])}};return o.scopeName=e,[r,F2(o,...t)]}function F2(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(i){const s=r.reduce((l,{useScope:a,scopeName:u})=>{const d=a(i)[`__scope${u}`];return{...l,...d}},{});return c.useMemo(()=>({[`__scope${t.scopeName}`]:s}),[s])}};return n.scopeName=t.scopeName,n}const _c=globalThis!=null&&globalThis.document?c.useLayoutEffect:()=>{},z2=ym.useId||(()=>{});let U2=0;function ca(e){const[t,n]=c.useState(z2());return _c(()=>{e||n(r=>r??String(U2++))},[e]),e||(t?`radix-${t}`:"")}function Yn(e){const t=c.useRef(e);return c.useEffect(()=>{t.current=e}),c.useMemo(()=>(...n)=>{var r;return(r=t.current)===null||r===void 0?void 0:r.call(t,...n)},[])}function B2({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,o]=V2({defaultProp:t,onChange:n}),i=e!==void 0,s=i?e:r,l=Yn(n),a=c.useCallback(u=>{if(i){const d=typeof u=="function"?u(e):u;d!==e&&l(d)}else o(u)},[i,e,o,l]);return[s,a]}function V2({defaultProp:e,onChange:t}){const n=c.useState(e),[r]=n,o=c.useRef(r),i=Yn(t);return c.useEffect(()=>{o.current!==r&&(i(r),o.current=r)},[r,o,i]),n}const Bu=c.forwardRef((e,t)=>{const{children:n,...r}=e,o=c.Children.toArray(n),i=o.find(W2);if(i){const s=i.props.children,l=o.map(a=>a===i?c.Children.count(s)>1?c.Children.only(null):c.isValidElement(s)?s.props.children:null:a);return c.createElement(bc,ze({},r,{ref:t}),c.isValidElement(s)?c.cloneElement(s,void 0,l):null)}return c.createElement(bc,ze({},r,{ref:t}),n)});Bu.displayName="Slot";const bc=c.forwardRef((e,t)=>{const{children:n,...r}=e;return c.isValidElement(n)?c.cloneElement(n,{...K2(r,n.props),ref:t?pg(t,n.ref):n.ref}):c.Children.count(n)>1?c.Children.only(null):null});bc.displayName="SlotClone";const H2=({children:e})=>c.createElement(c.Fragment,null,e);function W2(e){return c.isValidElement(e)&&e.type===H2}function K2(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...l)=>{i(...l),o(...l)}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}const G2=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],ft=G2.reduce((e,t)=>{const n=c.forwardRef((r,o)=>{const{asChild:i,...s}=r,l=i?Bu:t;return c.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),c.createElement(l,ze({},s,{ref:o}))});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function Y2(e,t){e&&qt.flushSync(()=>e.dispatchEvent(t))}function X2(e,t=globalThis==null?void 0:globalThis.document){const n=Yn(e);c.useEffect(()=>{const r=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",r),()=>t.removeEventListener("keydown",r)},[n,t])}const Rc="dismissableLayer.update",Q2="dismissableLayer.pointerDownOutside",Z2="dismissableLayer.focusOutside";let xp;const q2=c.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),J2=c.forwardRef((e,t)=>{var n;const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:o,onPointerDownOutside:i,onFocusOutside:s,onInteractOutside:l,onDismiss:a,...u}=e,f=c.useContext(q2),[d,p]=c.useState(null),w=(n=d==null?void 0:d.ownerDocument)!==null&&n!==void 0?n:globalThis==null?void 0:globalThis.document,[,y]=c.useState({}),v=ai(t,R=>p(R)),S=Array.from(f.layers),[h]=[...f.layersWithOutsidePointerEventsDisabled].slice(-1),g=S.indexOf(h),x=d?S.indexOf(d):-1,C=f.layersWithOutsidePointerEventsDisabled.size>0,E=x>=g,b=e5(R=>{const k=R.target,P=[...f.branches].some(D=>D.contains(k));!E||P||(i==null||i(R),l==null||l(R),R.defaultPrevented||a==null||a())},w),_=t5(R=>{const k=R.target;[...f.branches].some(D=>D.contains(k))||(s==null||s(R),l==null||l(R),R.defaultPrevented||a==null||a())},w);return X2(R=>{x===f.layers.size-1&&(o==null||o(R),!R.defaultPrevented&&a&&(R.preventDefault(),a()))},w),c.useEffect(()=>{if(d)return r&&(f.layersWithOutsidePointerEventsDisabled.size===0&&(xp=w.body.style.pointerEvents,w.body.style.pointerEvents="none"),f.layersWithOutsidePointerEventsDisabled.add(d)),f.layers.add(d),Sp(),()=>{r&&f.layersWithOutsidePointerEventsDisabled.size===1&&(w.body.style.pointerEvents=xp)}},[d,w,r,f]),c.useEffect(()=>()=>{d&&(f.layers.delete(d),f.layersWithOutsidePointerEventsDisabled.delete(d),Sp())},[d,f]),c.useEffect(()=>{const R=()=>y({});return document.addEventListener(Rc,R),()=>document.removeEventListener(Rc,R)},[]),c.createElement(ft.div,ze({},u,{ref:v,style:{pointerEvents:C?E?"auto":"none":void 0,...e.style},onFocusCapture:Ar(e.onFocusCapture,_.onFocusCapture),onBlurCapture:Ar(e.onBlurCapture,_.onBlurCapture),onPointerDownCapture:Ar(e.onPointerDownCapture,b.onPointerDownCapture)}))});function e5(e,t=globalThis==null?void 0:globalThis.document){const n=Yn(e),r=c.useRef(!1),o=c.useRef(()=>{});return c.useEffect(()=>{const i=l=>{if(l.target&&!r.current){let f=function(){mg(Q2,n,u,{discrete:!0})};var a=f;const u={originalEvent:l};l.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=f,t.addEventListener("click",o.current,{once:!0})):f()}else t.removeEventListener("click",o.current);r.current=!1},s=window.setTimeout(()=>{t.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(s),t.removeEventListener("pointerdown",i),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function t5(e,t=globalThis==null?void 0:globalThis.document){const n=Yn(e),r=c.useRef(!1);return c.useEffect(()=>{const o=i=>{i.target&&!r.current&&mg(Z2,n,{originalEvent:i},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function Sp(){const e=new CustomEvent(Rc);document.dispatchEvent(e)}function mg(e,t,n,{discrete:r}){const o=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?Y2(o,i):o.dispatchEvent(i)}const ua="focusScope.autoFocusOnMount",da="focusScope.autoFocusOnUnmount",Cp={bubbles:!1,cancelable:!0},n5=c.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:i,...s}=e,[l,a]=c.useState(null),u=Yn(o),f=Yn(i),d=c.useRef(null),p=ai(t,v=>a(v)),w=c.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;c.useEffect(()=>{if(r){let g=function(b){if(w.paused||!l)return;const _=b.target;l.contains(_)?d.current=_:on(d.current,{select:!0})},x=function(b){if(w.paused||!l)return;const _=b.relatedTarget;_!==null&&(l.contains(_)||on(d.current,{select:!0}))},C=function(b){if(document.activeElement===document.body)for(const R of b)R.removedNodes.length>0&&on(l)};var v=g,S=x,h=C;document.addEventListener("focusin",g),document.addEventListener("focusout",x);const E=new MutationObserver(C);return l&&E.observe(l,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",g),document.removeEventListener("focusout",x),E.disconnect()}}},[r,l,w.paused]),c.useEffect(()=>{if(l){_p.add(w);const v=document.activeElement;if(!l.contains(v)){const h=new CustomEvent(ua,Cp);l.addEventListener(ua,u),l.dispatchEvent(h),h.defaultPrevented||(r5(a5(hg(l)),{select:!0}),document.activeElement===v&&on(l))}return()=>{l.removeEventListener(ua,u),setTimeout(()=>{const h=new CustomEvent(da,Cp);l.addEventListener(da,f),l.dispatchEvent(h),h.defaultPrevented||on(v??document.body,{select:!0}),l.removeEventListener(da,f),_p.remove(w)},0)}}},[l,u,f,w]);const y=c.useCallback(v=>{if(!n&&!r||w.paused)return;const S=v.key==="Tab"&&!v.altKey&&!v.ctrlKey&&!v.metaKey,h=document.activeElement;if(S&&h){const g=v.currentTarget,[x,C]=o5(g);x&&C?!v.shiftKey&&h===C?(v.preventDefault(),n&&on(x,{select:!0})):v.shiftKey&&h===x&&(v.preventDefault(),n&&on(C,{select:!0})):h===g&&v.preventDefault()}},[n,r,w.paused]);return c.createElement(ft.div,ze({tabIndex:-1},s,{ref:p,onKeyDown:y}))});function r5(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(on(r,{select:t}),document.activeElement!==n)return}function o5(e){const t=hg(e),n=Ep(t,e),r=Ep(t.reverse(),e);return[n,r]}function hg(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Ep(e,t){for(const n of e)if(!i5(n,{upTo:t}))return n}function i5(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function s5(e){return e instanceof HTMLInputElement&&"select"in e}function on(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&s5(e)&&t&&e.select()}}const _p=l5();function l5(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=bp(e,t),e.unshift(t)},remove(t){var n;e=bp(e,t),(n=e[0])===null||n===void 0||n.resume()}}}function bp(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function a5(e){return e.filter(t=>t.tagName!=="A")}const c5=c.forwardRef((e,t)=>{var n;const{container:r=globalThis==null||(n=globalThis.document)===null||n===void 0?void 0:n.body,...o}=e;return r?Sv.createPortal(c.createElement(ft.div,ze({},o,{ref:t})),r):null});function u5(e,t){return c.useReducer((n,r)=>{const o=t[n][r];return o??n},e)}const al=e=>{const{present:t,children:n}=e,r=d5(t),o=typeof n=="function"?n({present:r.isPresent}):c.Children.only(n),i=ai(r.ref,o.ref);return typeof n=="function"||r.isPresent?c.cloneElement(o,{ref:i}):null};al.displayName="Presence";function d5(e){const[t,n]=c.useState(),r=c.useRef({}),o=c.useRef(e),i=c.useRef("none"),s=e?"mounted":"unmounted",[l,a]=u5(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return c.useEffect(()=>{const u=ji(r.current);i.current=l==="mounted"?u:"none"},[l]),_c(()=>{const u=r.current,f=o.current;if(f!==e){const p=i.current,w=ji(u);e?a("MOUNT"):w==="none"||(u==null?void 0:u.display)==="none"?a("UNMOUNT"):a(f&&p!==w?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,a]),_c(()=>{if(t){const u=d=>{const w=ji(r.current).includes(d.animationName);d.target===t&&w&&qt.flushSync(()=>a("ANIMATION_END"))},f=d=>{d.target===t&&(i.current=ji(r.current))};return t.addEventListener("animationstart",f),t.addEventListener("animationcancel",u),t.addEventListener("animationend",u),()=>{t.removeEventListener("animationstart",f),t.removeEventListener("animationcancel",u),t.removeEventListener("animationend",u)}}else a("ANIMATION_END")},[t,a]),{isPresent:["mounted","unmountSuspended"].includes(l),ref:c.useCallback(u=>{u&&(r.current=getComputedStyle(u)),n(u)},[])}}function ji(e){return(e==null?void 0:e.animationName)||"none"}let fa=0;function f5(){c.useEffect(()=>{var e,t;const n=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",(e=n[0])!==null&&e!==void 0?e:Rp()),document.body.insertAdjacentElement("beforeend",(t=n[1])!==null&&t!==void 0?t:Rp()),fa++,()=>{fa===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(r=>r.remove()),fa--}},[])}function Rp(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",e}var Oe=function(){return Oe=Object.assign||function(t){for(var n,r=1,o=arguments.length;r"u")return b5;var t=R5(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},k5=Hu(),Dr="data-scroll-locked",N5=function(e,t,n,r){var o=e.left,i=e.top,s=e.right,l=e.gap;return n===void 0&&(n="margin"),` .`.concat(p5,` { overflow: hidden `).concat(r,`; padding-right: `).concat(l,"px ").concat(r,`; } body[`).concat(Dr,`] { overflow: hidden `).concat(r,`; overscroll-behavior: contain; `).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&` padding-left: `.concat(o,`px; padding-top: `).concat(i,`px; padding-right: `).concat(s,`px; margin-left:0; margin-top:0; margin-right: `).concat(l,"px ").concat(r,`; `),n==="padding"&&"padding-right: ".concat(l,"px ").concat(r,";")].filter(Boolean).join(""),` } .`).concat(bo,` { right: `).concat(l,"px ").concat(r,`; } .`).concat(Ro,` { margin-right: `).concat(l,"px ").concat(r,`; } .`).concat(bo," .").concat(bo,` { right: 0 `).concat(r,`; } .`).concat(Ro," .").concat(Ro,` { margin-right: 0 `).concat(r,`; } body[`).concat(Dr,`] { `).concat(m5,": ").concat(l,`px; } `)},kp=function(){var e=parseInt(document.body.getAttribute(Dr)||"0",10);return isFinite(e)?e:0},T5=function(){c.useEffect(function(){return document.body.setAttribute(Dr,(kp()+1).toString()),function(){var e=kp()-1;e<=0?document.body.removeAttribute(Dr):document.body.setAttribute(Dr,e.toString())}},[])},Cg=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=r===void 0?"margin":r;T5();var i=c.useMemo(function(){return P5(o)},[o]);return c.createElement(k5,{styles:N5(i,!t,o,n?"":"!important")})},Pc=!1;if(typeof window<"u")try{var Li=Object.defineProperty({},"passive",{get:function(){return Pc=!0,!0}});window.addEventListener("test",Li,Li),window.removeEventListener("test",Li,Li)}catch{Pc=!1}var lr=Pc?{passive:!1}:!1,A5=function(e){return e.tagName==="TEXTAREA"},Eg=function(e,t){var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!A5(e)&&n[t]==="visible")},D5=function(e){return Eg(e,"overflowY")},M5=function(e){return Eg(e,"overflowX")},Np=function(e,t){var n=t;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var r=_g(e,n);if(r){var o=bg(e,n),i=o[1],s=o[2];if(i>s)return!0}n=n.parentNode}while(n&&n!==document.body);return!1},O5=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},j5=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},_g=function(e,t){return e==="v"?D5(t):M5(t)},bg=function(e,t){return e==="v"?O5(t):j5(t)},L5=function(e,t){return e==="h"&&t==="rtl"?-1:1},I5=function(e,t,n,r,o){var i=L5(e,window.getComputedStyle(t).direction),s=i*r,l=n.target,a=t.contains(l),u=!1,f=s>0,d=0,p=0;do{var w=bg(e,l),y=w[0],v=w[1],S=w[2],h=v-S-i*y;(y||h)&&_g(e,l)&&(d+=h,p+=y),l=l.parentNode}while(!a&&l!==document.body||a&&(t.contains(l)||t===l));return(f&&(d===0||!o)||!f&&(p===0||!o))&&(u=!0),u},Ii=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Tp=function(e){return[e.deltaX,e.deltaY]},Ap=function(e){return e&&"current"in e?e.current:e},$5=function(e,t){return e[0]===t[0]&&e[1]===t[1]},F5=function(e){return` .block-interactivity-`.concat(e,` {pointer-events: none;} .allow-interactivity-`).concat(e,` {pointer-events: all;} `)},z5=0,ar=[];function U5(e){var t=c.useRef([]),n=c.useRef([0,0]),r=c.useRef(),o=c.useState(z5++)[0],i=c.useState(function(){return Hu()})[0],s=c.useRef(e);c.useEffect(function(){s.current=e},[e]),c.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var v=vg([e.lockRef.current],(e.shards||[]).map(Ap),!0).filter(Boolean);return v.forEach(function(S){return S.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),v.forEach(function(S){return S.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var l=c.useCallback(function(v,S){if("touches"in v&&v.touches.length===2)return!s.current.allowPinchZoom;var h=Ii(v),g=n.current,x="deltaX"in v?v.deltaX:g[0]-h[0],C="deltaY"in v?v.deltaY:g[1]-h[1],E,b=v.target,_=Math.abs(x)>Math.abs(C)?"h":"v";if("touches"in v&&_==="h"&&b.type==="range")return!1;var R=Np(_,b);if(!R)return!0;if(R?E=_:(E=_==="v"?"h":"v",R=Np(_,b)),!R)return!1;if(!r.current&&"changedTouches"in v&&(x||C)&&(r.current=E),!E)return!0;var k=r.current||E;return I5(k,S,v,k==="h"?x:C,!0)},[]),a=c.useCallback(function(v){var S=v;if(!(!ar.length||ar[ar.length-1]!==i)){var h="deltaY"in S?Tp(S):Ii(S),g=t.current.filter(function(E){return E.name===S.type&&E.target===S.target&&$5(E.delta,h)})[0];if(g&&g.should){S.cancelable&&S.preventDefault();return}if(!g){var x=(s.current.shards||[]).map(Ap).filter(Boolean).filter(function(E){return E.contains(S.target)}),C=x.length>0?l(S,x[0]):!s.current.noIsolation;C&&S.cancelable&&S.preventDefault()}}},[]),u=c.useCallback(function(v,S,h,g){var x={name:v,delta:S,target:h,should:g};t.current.push(x),setTimeout(function(){t.current=t.current.filter(function(C){return C!==x})},1)},[]),f=c.useCallback(function(v){n.current=Ii(v),r.current=void 0},[]),d=c.useCallback(function(v){u(v.type,Tp(v),v.target,l(v,e.lockRef.current))},[]),p=c.useCallback(function(v){u(v.type,Ii(v),v.target,l(v,e.lockRef.current))},[]);c.useEffect(function(){return ar.push(i),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:p}),document.addEventListener("wheel",a,lr),document.addEventListener("touchmove",a,lr),document.addEventListener("touchstart",f,lr),function(){ar=ar.filter(function(v){return v!==i}),document.removeEventListener("wheel",a,lr),document.removeEventListener("touchmove",a,lr),document.removeEventListener("touchstart",f,lr)}},[]);var w=e.removeScrollBar,y=e.inert;return c.createElement(c.Fragment,null,y?c.createElement(i,{styles:F5(o)}):null,w?c.createElement(Cg,{gapMode:"margin"}):null)}const B5=xg(Sg,U5);var Rg=c.forwardRef(function(e,t){return c.createElement(cl,Oe({},e,{ref:t,sideCar:B5}))});Rg.classNames=cl.classNames;var V5=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},cr=new WeakMap,$i=new WeakMap,Fi={},va=0,Pg=function(e){return e&&(e.host||Pg(e.parentNode))},H5=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=Pg(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},W5=function(e,t,n,r){var o=H5(t,Array.isArray(e)?e:[e]);Fi[n]||(Fi[n]=new WeakMap);var i=Fi[n],s=[],l=new Set,a=new Set(o),u=function(d){!d||l.has(d)||(l.add(d),u(d.parentNode))};o.forEach(u);var f=function(d){!d||a.has(d)||Array.prototype.forEach.call(d.children,function(p){if(l.has(p))f(p);else try{var w=p.getAttribute(r),y=w!==null&&w!=="false",v=(cr.get(p)||0)+1,S=(i.get(p)||0)+1;cr.set(p,v),i.set(p,S),s.push(p),v===1&&y&&$i.set(p,!0),S===1&&p.setAttribute(n,"true"),y||p.setAttribute(r,"true")}catch(h){console.error("aria-hidden: cannot operate on ",p,h)}})};return f(t),l.clear(),va++,function(){s.forEach(function(d){var p=cr.get(d)-1,w=i.get(d)-1;cr.set(d,p),i.set(d,w),p||($i.has(d)||d.removeAttribute(r),$i.delete(d)),w||d.removeAttribute(n)}),va--,va||(cr=new WeakMap,cr=new WeakMap,$i=new WeakMap,Fi={})}},ul=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=V5(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live]"))),W5(r,o,n,"aria-hidden")):function(){return null}};const kg="Dialog",[Ng,qP]=$2(kg),[K5,rr]=Ng(kg),G5=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:o,onOpenChange:i,modal:s=!0}=e,l=c.useRef(null),a=c.useRef(null),[u=!1,f]=B2({prop:r,defaultProp:o,onChange:i});return c.createElement(K5,{scope:t,triggerRef:l,contentRef:a,contentId:ca(),titleId:ca(),descriptionId:ca(),open:u,onOpenChange:f,onOpenToggle:c.useCallback(()=>f(d=>!d),[f]),modal:s},n)},Tg="DialogPortal",[Y5,Ag]=Ng(Tg,{forceMount:void 0}),X5=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:o}=e,i=rr(Tg,t);return c.createElement(Y5,{scope:t,forceMount:n},c.Children.map(r,s=>c.createElement(al,{present:n||i.open},c.createElement(c5,{asChild:!0,container:o},s))))},kc="DialogOverlay",Q5=c.forwardRef((e,t)=>{const n=Ag(kc,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,i=rr(kc,e.__scopeDialog);return i.modal?c.createElement(al,{present:r||i.open},c.createElement(Z5,ze({},o,{ref:t}))):null}),Z5=c.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=rr(kc,n);return c.createElement(Rg,{as:Bu,allowPinchZoom:!0,shards:[o.contentRef]},c.createElement(ft.div,ze({"data-state":Mg(o.open)},r,{ref:t,style:{pointerEvents:"auto",...r.style}})))}),Wo="DialogContent",q5=c.forwardRef((e,t)=>{const n=Ag(Wo,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,i=rr(Wo,e.__scopeDialog);return c.createElement(al,{present:r||i.open},i.modal?c.createElement(J5,ze({},o,{ref:t})):c.createElement(e_,ze({},o,{ref:t})))}),J5=c.forwardRef((e,t)=>{const n=rr(Wo,e.__scopeDialog),r=c.useRef(null),o=ai(t,n.contentRef,r);return c.useEffect(()=>{const i=r.current;if(i)return ul(i)},[]),c.createElement(Dg,ze({},e,{ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Ar(e.onCloseAutoFocus,i=>{var s;i.preventDefault(),(s=n.triggerRef.current)===null||s===void 0||s.focus()}),onPointerDownOutside:Ar(e.onPointerDownOutside,i=>{const s=i.detail.originalEvent,l=s.button===0&&s.ctrlKey===!0;(s.button===2||l)&&i.preventDefault()}),onFocusOutside:Ar(e.onFocusOutside,i=>i.preventDefault())}))}),e_=c.forwardRef((e,t)=>{const n=rr(Wo,e.__scopeDialog),r=c.useRef(!1),o=c.useRef(!1);return c.createElement(Dg,ze({},e,{ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{var s;if((s=e.onCloseAutoFocus)===null||s===void 0||s.call(e,i),!i.defaultPrevented){var l;r.current||(l=n.triggerRef.current)===null||l===void 0||l.focus(),i.preventDefault()}r.current=!1,o.current=!1},onInteractOutside:i=>{var s,l;(s=e.onInteractOutside)===null||s===void 0||s.call(e,i),i.defaultPrevented||(r.current=!0,i.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const a=i.target;((l=n.triggerRef.current)===null||l===void 0?void 0:l.contains(a))&&i.preventDefault(),i.detail.originalEvent.type==="focusin"&&o.current&&i.preventDefault()}}))}),Dg=c.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:i,...s}=e,l=rr(Wo,n),a=c.useRef(null),u=ai(t,a);return f5(),c.createElement(c.Fragment,null,c.createElement(n5,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:i},c.createElement(J2,ze({role:"dialog",id:l.contentId,"aria-describedby":l.descriptionId,"aria-labelledby":l.titleId,"data-state":Mg(l.open)},s,{ref:u,onDismiss:()=>l.onOpenChange(!1)}))),!1)});function Mg(e){return e?"open":"closed"}const t_=G5,n_=X5,r_=Q5,o_=q5;var ao='[cmdk-group=""]',ga='[cmdk-group-items=""]',i_='[cmdk-group-heading=""]',Wu='[cmdk-item=""]',Dp=`${Wu}:not([aria-disabled="true"])`,Nc="cmdk-item-select",On="data-value",s_=(e,t,n)=>L2(e,t,n),Og=c.createContext(void 0),ci=()=>c.useContext(Og),jg=c.createContext(void 0),Ku=()=>c.useContext(jg),Lg=c.createContext(void 0),Ig=c.forwardRef((e,t)=>{let n=fr(()=>{var N,$;return{search:"",value:($=(N=e.value)!=null?N:e.defaultValue)!=null?$:"",filtered:{count:0,items:new Map,groups:new Set}}}),r=fr(()=>new Set),o=fr(()=>new Map),i=fr(()=>new Map),s=fr(()=>new Set),l=$g(e),{label:a,children:u,value:f,onValueChange:d,filter:p,shouldFilter:w,loop:y,disablePointerSelection:v=!1,vimBindings:S=!0,...h}=e,g=c.useId(),x=c.useId(),C=c.useId(),E=c.useRef(null),b=g_();Xn(()=>{if(f!==void 0){let N=f.trim();n.current.value=N,_.emit()}},[f]),Xn(()=>{b(6,X)},[]);let _=c.useMemo(()=>({subscribe:N=>(s.current.add(N),()=>s.current.delete(N)),snapshot:()=>n.current,setState:(N,$,K)=>{var z,G,Q;if(!Object.is(n.current[N],$)){if(n.current[N]=$,N==="search")M(),P(),b(1,D);else if(N==="value"&&(K||b(5,X),((z=l.current)==null?void 0:z.value)!==void 0)){let J=$??"";(Q=(G=l.current).onValueChange)==null||Q.call(G,J);return}_.emit()}},emit:()=>{s.current.forEach(N=>N())}}),[]),R=c.useMemo(()=>({value:(N,$,K)=>{var z;$!==((z=i.current.get(N))==null?void 0:z.value)&&(i.current.set(N,{value:$,keywords:K}),n.current.filtered.items.set(N,k($,K)),b(2,()=>{P(),_.emit()}))},item:(N,$)=>(r.current.add(N),$&&(o.current.has($)?o.current.get($).add(N):o.current.set($,new Set([N]))),b(3,()=>{M(),P(),n.current.value||D(),_.emit()}),()=>{i.current.delete(N),r.current.delete(N),n.current.filtered.items.delete(N);let K=O();b(4,()=>{M(),(K==null?void 0:K.getAttribute("id"))===N&&D(),_.emit()})}),group:N=>(o.current.has(N)||o.current.set(N,new Set),()=>{i.current.delete(N),o.current.delete(N)}),filter:()=>l.current.shouldFilter,label:a||e["aria-label"],disablePointerSelection:v,listId:g,inputId:C,labelId:x,listInnerRef:E}),[]);function k(N,$){var K,z;let G=(z=(K=l.current)==null?void 0:K.filter)!=null?z:s_;return N?G(N,n.current.search,$):0}function P(){if(!n.current.search||l.current.shouldFilter===!1)return;let N=n.current.filtered.items,$=[];n.current.filtered.groups.forEach(z=>{let G=o.current.get(z),Q=0;G.forEach(J=>{let re=N.get(J);Q=Math.max(re,Q)}),$.push([z,Q])});let K=E.current;V().sort((z,G)=>{var Q,J;let re=z.getAttribute("id"),ee=G.getAttribute("id");return((Q=N.get(ee))!=null?Q:0)-((J=N.get(re))!=null?J:0)}).forEach(z=>{let G=z.closest(ga);G?G.appendChild(z.parentElement===G?z:z.closest(`${ga} > *`)):K.appendChild(z.parentElement===K?z:z.closest(`${ga} > *`))}),$.sort((z,G)=>G[1]-z[1]).forEach(z=>{let G=E.current.querySelector(`${ao}[${On}="${encodeURIComponent(z[0])}"]`);G==null||G.parentElement.appendChild(G)})}function D(){let N=V().find(K=>K.getAttribute("aria-disabled")!=="true"),$=N==null?void 0:N.getAttribute(On);_.setState("value",$||void 0)}function M(){var N,$,K,z;if(!n.current.search||l.current.shouldFilter===!1){n.current.filtered.count=r.current.size;return}n.current.filtered.groups=new Set;let G=0;for(let Q of r.current){let J=($=(N=i.current.get(Q))==null?void 0:N.value)!=null?$:"",re=(z=(K=i.current.get(Q))==null?void 0:K.keywords)!=null?z:[],ee=k(J,re);n.current.filtered.items.set(Q,ee),ee>0&&G++}for(let[Q,J]of o.current)for(let re of J)if(n.current.filtered.items.get(re)>0){n.current.filtered.groups.add(Q);break}n.current.filtered.count=G}function X(){var N,$,K;let z=O();z&&(((N=z.parentElement)==null?void 0:N.firstChild)===z&&((K=($=z.closest(ao))==null?void 0:$.querySelector(i_))==null||K.scrollIntoView({block:"nearest"})),z.scrollIntoView({block:"nearest"}))}function O(){var N;return(N=E.current)==null?void 0:N.querySelector(`${Wu}[aria-selected="true"]`)}function V(){var N;return Array.from((N=E.current)==null?void 0:N.querySelectorAll(Dp))}function H(N){let $=V()[N];$&&_.setState("value",$.getAttribute(On))}function I(N){var $;let K=O(),z=V(),G=z.findIndex(J=>J===K),Q=z[G+N];($=l.current)!=null&&$.loop&&(Q=G+N<0?z[z.length-1]:G+N===z.length?z[0]:z[G+N]),Q&&_.setState("value",Q.getAttribute(On))}function A(N){let $=O(),K=$==null?void 0:$.closest(ao),z;for(;K&&!z;)K=N>0?h_(K,ao):v_(K,ao),z=K==null?void 0:K.querySelector(Dp);z?_.setState("value",z.getAttribute(On)):I(N)}let T=()=>H(V().length-1),L=N=>{N.preventDefault(),N.metaKey?T():N.altKey?A(1):I(1)},W=N=>{N.preventDefault(),N.metaKey?H(0):N.altKey?A(-1):I(-1)};return c.createElement(ft.div,{ref:t,tabIndex:-1,...h,"cmdk-root":"",onKeyDown:N=>{var $;if(($=h.onKeyDown)==null||$.call(h,N),!N.defaultPrevented)switch(N.key){case"n":case"j":{S&&N.ctrlKey&&L(N);break}case"ArrowDown":{L(N);break}case"p":case"k":{S&&N.ctrlKey&&W(N);break}case"ArrowUp":{W(N);break}case"Home":{N.preventDefault(),H(0);break}case"End":{N.preventDefault(),T();break}case"Enter":if(!N.nativeEvent.isComposing&&N.keyCode!==229){N.preventDefault();let K=O();if(K){let z=new Event(Nc);K.dispatchEvent(z)}}}}},c.createElement("label",{"cmdk-label":"",htmlFor:R.inputId,id:R.labelId,style:w_},a),dl(e,N=>c.createElement(jg.Provider,{value:_},c.createElement(Og.Provider,{value:R},N))))}),l_=c.forwardRef((e,t)=>{var n,r;let o=c.useId(),i=c.useRef(null),s=c.useContext(Lg),l=ci(),a=$g(e),u=(r=(n=a.current)==null?void 0:n.forceMount)!=null?r:s==null?void 0:s.forceMount;Xn(()=>{if(!u)return l.item(o,s==null?void 0:s.id)},[u]);let f=Fg(o,i,[e.value,e.children,i],e.keywords),d=Ku(),p=Qn(b=>b.value&&b.value===f.current),w=Qn(b=>u||l.filter()===!1?!0:b.search?b.filtered.items.get(o)>0:!0);c.useEffect(()=>{let b=i.current;if(!(!b||e.disabled))return b.addEventListener(Nc,y),()=>b.removeEventListener(Nc,y)},[w,e.onSelect,e.disabled]);function y(){var b,_;v(),(_=(b=a.current).onSelect)==null||_.call(b,f.current)}function v(){d.setState("value",f.current,!0)}if(!w)return null;let{disabled:S,value:h,onSelect:g,forceMount:x,keywords:C,...E}=e;return c.createElement(ft.div,{ref:Ko([i,t]),...E,id:o,"cmdk-item":"",role:"option","aria-disabled":!!S,"aria-selected":!!p,"data-disabled":!!S,"data-selected":!!p,onPointerMove:S||l.disablePointerSelection?void 0:v,onClick:S?void 0:y},e.children)}),a_=c.forwardRef((e,t)=>{let{heading:n,children:r,forceMount:o,...i}=e,s=c.useId(),l=c.useRef(null),a=c.useRef(null),u=c.useId(),f=ci(),d=Qn(w=>o||f.filter()===!1?!0:w.search?w.filtered.groups.has(s):!0);Xn(()=>f.group(s),[]),Fg(s,l,[e.value,e.heading,a]);let p=c.useMemo(()=>({id:s,forceMount:o}),[o]);return c.createElement(ft.div,{ref:Ko([l,t]),...i,"cmdk-group":"",role:"presentation",hidden:d?void 0:!0},n&&c.createElement("div",{ref:a,"cmdk-group-heading":"","aria-hidden":!0,id:u},n),dl(e,w=>c.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":n?u:void 0},c.createElement(Lg.Provider,{value:p},w))))}),c_=c.forwardRef((e,t)=>{let{alwaysRender:n,...r}=e,o=c.useRef(null),i=Qn(s=>!s.search);return!n&&!i?null:c.createElement(ft.div,{ref:Ko([o,t]),...r,"cmdk-separator":"",role:"separator"})}),u_=c.forwardRef((e,t)=>{let{onValueChange:n,...r}=e,o=e.value!=null,i=Ku(),s=Qn(f=>f.search),l=Qn(f=>f.value),a=ci(),u=c.useMemo(()=>{var f;let d=(f=a.listInnerRef.current)==null?void 0:f.querySelector(`${Wu}[${On}="${encodeURIComponent(l)}"]`);return d==null?void 0:d.getAttribute("id")},[]);return c.useEffect(()=>{e.value!=null&&i.setState("search",e.value)},[e.value]),c.createElement(ft.input,{ref:t,...r,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":a.listId,"aria-labelledby":a.labelId,"aria-activedescendant":u,id:a.inputId,type:"text",value:o?e.value:s,onChange:f=>{o||i.setState("search",f.target.value),n==null||n(f.target.value)}})}),d_=c.forwardRef((e,t)=>{let{children:n,label:r="Suggestions",...o}=e,i=c.useRef(null),s=c.useRef(null),l=ci();return c.useEffect(()=>{if(s.current&&i.current){let a=s.current,u=i.current,f,d=new ResizeObserver(()=>{f=requestAnimationFrame(()=>{let p=a.offsetHeight;u.style.setProperty("--cmdk-list-height",p.toFixed(1)+"px")})});return d.observe(a),()=>{cancelAnimationFrame(f),d.unobserve(a)}}},[]),c.createElement(ft.div,{ref:Ko([i,t]),...o,"cmdk-list":"",role:"listbox","aria-label":r,id:l.listId},dl(e,a=>c.createElement("div",{ref:Ko([s,l.listInnerRef]),"cmdk-list-sizer":""},a)))}),f_=c.forwardRef((e,t)=>{let{open:n,onOpenChange:r,overlayClassName:o,contentClassName:i,container:s,...l}=e;return c.createElement(t_,{open:n,onOpenChange:r},c.createElement(n_,{container:s},c.createElement(r_,{"cmdk-overlay":"",className:o}),c.createElement(o_,{"aria-label":e.label,"cmdk-dialog":"",className:i},c.createElement(Ig,{ref:t,...l}))))}),p_=c.forwardRef((e,t)=>Qn(n=>n.filtered.count===0)?c.createElement(ft.div,{ref:t,...e,"cmdk-empty":"",role:"presentation"}):null),m_=c.forwardRef((e,t)=>{let{progress:n,children:r,label:o="Loading...",...i}=e;return c.createElement(ft.div,{ref:t,...i,"cmdk-loading":"",role:"progressbar","aria-valuenow":n,"aria-valuemin":0,"aria-valuemax":100,"aria-label":o},dl(e,s=>c.createElement("div",{"aria-hidden":!0},s)))}),Xe=Object.assign(Ig,{List:d_,Item:l_,Input:u_,Group:a_,Separator:c_,Dialog:f_,Empty:p_,Loading:m_});function h_(e,t){let n=e.nextElementSibling;for(;n;){if(n.matches(t))return n;n=n.nextElementSibling}}function v_(e,t){let n=e.previousElementSibling;for(;n;){if(n.matches(t))return n;n=n.previousElementSibling}}function $g(e){let t=c.useRef(e);return Xn(()=>{t.current=e}),t}var Xn=typeof window>"u"?c.useEffect:c.useLayoutEffect;function fr(e){let t=c.useRef();return t.current===void 0&&(t.current=e()),t}function Ko(e){return t=>{e.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})}}function Qn(e){let t=Ku(),n=()=>e(t.snapshot());return c.useSyncExternalStore(t.subscribe,n,n)}function Fg(e,t,n,r=[]){let o=c.useRef(),i=ci();return Xn(()=>{var s;let l=(()=>{var u;for(let f of n){if(typeof f=="string")return f.trim();if(typeof f=="object"&&"current"in f)return f.current?(u=f.current.textContent)==null?void 0:u.trim():o.current}})(),a=r.map(u=>u.trim());i.value(e,l,a),(s=t.current)==null||s.setAttribute(On,l),o.current=l}),o}var g_=()=>{let[e,t]=c.useState(),n=fr(()=>new Map);return Xn(()=>{n.current.forEach(r=>r()),n.current=new Map},[e]),(r,o)=>{n.current.set(r,o),t({})}};function y_(e){let t=e.type;return typeof t=="function"?t(e.props):"render"in t?t.render(e.props):e}function dl({asChild:e,children:t},n){return e&&c.isValidElement(t)?c.cloneElement(y_(t),{ref:t.ref},n(t.props.children)):n(t)}var w_={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"},x_=ym.useId||(()=>{}),S_=0;function Un(e){const[t,n]=c.useState(x_());return Yt(()=>{n(r=>r??String(S_++))},[e]),t?`radix-${t}`:""}var ya="focusScope.autoFocusOnMount",wa="focusScope.autoFocusOnUnmount",Mp={bubbles:!1,cancelable:!0},C_="FocusScope",fl=c.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:i,...s}=e,[l,a]=c.useState(null),u=xe(o),f=xe(i),d=c.useRef(null),p=ne(t,v=>a(v)),w=c.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;c.useEffect(()=>{if(r){let v=function(x){if(w.paused||!l)return;const C=x.target;l.contains(C)?d.current=C:sn(d.current,{select:!0})},S=function(x){if(w.paused||!l)return;const C=x.relatedTarget;C!==null&&(l.contains(C)||sn(d.current,{select:!0}))},h=function(x){if(document.activeElement===document.body)for(const E of x)E.removedNodes.length>0&&sn(l)};document.addEventListener("focusin",v),document.addEventListener("focusout",S);const g=new MutationObserver(h);return l&&g.observe(l,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",v),document.removeEventListener("focusout",S),g.disconnect()}}},[r,l,w.paused]),c.useEffect(()=>{if(l){jp.add(w);const v=document.activeElement;if(!l.contains(v)){const h=new CustomEvent(ya,Mp);l.addEventListener(ya,u),l.dispatchEvent(h),h.defaultPrevented||(E_(k_(zg(l)),{select:!0}),document.activeElement===v&&sn(l))}return()=>{l.removeEventListener(ya,u),setTimeout(()=>{const h=new CustomEvent(wa,Mp);l.addEventListener(wa,f),l.dispatchEvent(h),h.defaultPrevented||sn(v??document.body,{select:!0}),l.removeEventListener(wa,f),jp.remove(w)},0)}}},[l,u,f,w]);const y=c.useCallback(v=>{if(!n&&!r||w.paused)return;const S=v.key==="Tab"&&!v.altKey&&!v.ctrlKey&&!v.metaKey,h=document.activeElement;if(S&&h){const g=v.currentTarget,[x,C]=__(g);x&&C?!v.shiftKey&&h===C?(v.preventDefault(),n&&sn(x,{select:!0})):v.shiftKey&&h===x&&(v.preventDefault(),n&&sn(C,{select:!0})):h===g&&v.preventDefault()}},[n,r,w.paused]);return m.jsx(Z.div,{tabIndex:-1,...s,ref:p,onKeyDown:y})});fl.displayName=C_;function E_(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(sn(r,{select:t}),document.activeElement!==n)return}function __(e){const t=zg(e),n=Op(t,e),r=Op(t.reverse(),e);return[n,r]}function zg(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Op(e,t){for(const n of e)if(!b_(n,{upTo:t}))return n}function b_(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function R_(e){return e instanceof HTMLInputElement&&"select"in e}function sn(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&R_(e)&&t&&e.select()}}var jp=P_();function P_(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=Lp(e,t),e.unshift(t)},remove(t){var n;e=Lp(e,t),(n=e[0])==null||n.resume()}}}function Lp(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function k_(e){return e.filter(t=>t.tagName!=="A")}var xa=0;function Gu(){c.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Ip()),document.body.insertAdjacentElement("beforeend",e[1]??Ip()),xa++,()=>{xa===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),xa--}},[])}function Ip(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",e}var Ug=yg(),Sa=function(){},pl=c.forwardRef(function(e,t){var n=c.useRef(null),r=c.useState({onScrollCapture:Sa,onWheelCapture:Sa,onTouchMoveCapture:Sa}),o=r[0],i=r[1],s=e.forwardProps,l=e.children,a=e.className,u=e.removeScrollBar,f=e.enabled,d=e.shards,p=e.sideCar,w=e.noIsolation,y=e.inert,v=e.allowPinchZoom,S=e.as,h=S===void 0?"div":S,g=e.gapMode,x=Vu(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),C=p,E=gg([n,t]),b=Oe(Oe({},x),o);return c.createElement(c.Fragment,null,f&&c.createElement(C,{sideCar:Ug,removeScrollBar:u,shards:d,noIsolation:w,inert:y,setCallbacks:i,allowPinchZoom:!!v,lockRef:n,gapMode:g}),s?c.cloneElement(c.Children.only(l),Oe(Oe({},b),{ref:E})):c.createElement(h,Oe({},b,{className:a,ref:E}),l))});pl.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};pl.classNames={fullWidth:Ro,zeroRight:bo};var Tc=!1;if(typeof window<"u")try{var zi=Object.defineProperty({},"passive",{get:function(){return Tc=!0,!0}});window.addEventListener("test",zi,zi),window.removeEventListener("test",zi,zi)}catch{Tc=!1}var ur=Tc?{passive:!1}:!1,N_=function(e){return e.tagName==="TEXTAREA"},Bg=function(e,t){var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!N_(e)&&n[t]==="visible")},T_=function(e){return Bg(e,"overflowY")},A_=function(e){return Bg(e,"overflowX")},$p=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var o=Vg(e,r);if(o){var i=Hg(e,r),s=i[1],l=i[2];if(s>l)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},D_=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},M_=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},Vg=function(e,t){return e==="v"?T_(t):A_(t)},Hg=function(e,t){return e==="v"?D_(t):M_(t)},O_=function(e,t){return e==="h"&&t==="rtl"?-1:1},j_=function(e,t,n,r,o){var i=O_(e,window.getComputedStyle(t).direction),s=i*r,l=n.target,a=t.contains(l),u=!1,f=s>0,d=0,p=0;do{var w=Hg(e,l),y=w[0],v=w[1],S=w[2],h=v-S-i*y;(y||h)&&Vg(e,l)&&(d+=h,p+=y),l instanceof ShadowRoot?l=l.host:l=l.parentNode}while(!a&&l!==document.body||a&&(t.contains(l)||t===l));return(f&&(Math.abs(d)<1||!o)||!f&&(Math.abs(p)<1||!o))&&(u=!0),u},Ui=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Fp=function(e){return[e.deltaX,e.deltaY]},zp=function(e){return e&&"current"in e?e.current:e},L_=function(e,t){return e[0]===t[0]&&e[1]===t[1]},I_=function(e){return` .block-interactivity-`.concat(e,` {pointer-events: none;} .allow-interactivity-`).concat(e,` {pointer-events: all;} `)},$_=0,dr=[];function F_(e){var t=c.useRef([]),n=c.useRef([0,0]),r=c.useRef(),o=c.useState($_++)[0],i=c.useState(Hu)[0],s=c.useRef(e);c.useEffect(function(){s.current=e},[e]),c.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var v=vg([e.lockRef.current],(e.shards||[]).map(zp),!0).filter(Boolean);return v.forEach(function(S){return S.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),v.forEach(function(S){return S.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var l=c.useCallback(function(v,S){if("touches"in v&&v.touches.length===2)return!s.current.allowPinchZoom;var h=Ui(v),g=n.current,x="deltaX"in v?v.deltaX:g[0]-h[0],C="deltaY"in v?v.deltaY:g[1]-h[1],E,b=v.target,_=Math.abs(x)>Math.abs(C)?"h":"v";if("touches"in v&&_==="h"&&b.type==="range")return!1;var R=$p(_,b);if(!R)return!0;if(R?E=_:(E=_==="v"?"h":"v",R=$p(_,b)),!R)return!1;if(!r.current&&"changedTouches"in v&&(x||C)&&(r.current=E),!E)return!0;var k=r.current||E;return j_(k,S,v,k==="h"?x:C,!0)},[]),a=c.useCallback(function(v){var S=v;if(!(!dr.length||dr[dr.length-1]!==i)){var h="deltaY"in S?Fp(S):Ui(S),g=t.current.filter(function(E){return E.name===S.type&&(E.target===S.target||S.target===E.shadowParent)&&L_(E.delta,h)})[0];if(g&&g.should){S.cancelable&&S.preventDefault();return}if(!g){var x=(s.current.shards||[]).map(zp).filter(Boolean).filter(function(E){return E.contains(S.target)}),C=x.length>0?l(S,x[0]):!s.current.noIsolation;C&&S.cancelable&&S.preventDefault()}}},[]),u=c.useCallback(function(v,S,h,g){var x={name:v,delta:S,target:h,should:g,shadowParent:z_(h)};t.current.push(x),setTimeout(function(){t.current=t.current.filter(function(C){return C!==x})},1)},[]),f=c.useCallback(function(v){n.current=Ui(v),r.current=void 0},[]),d=c.useCallback(function(v){u(v.type,Fp(v),v.target,l(v,e.lockRef.current))},[]),p=c.useCallback(function(v){u(v.type,Ui(v),v.target,l(v,e.lockRef.current))},[]);c.useEffect(function(){return dr.push(i),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:p}),document.addEventListener("wheel",a,ur),document.addEventListener("touchmove",a,ur),document.addEventListener("touchstart",f,ur),function(){dr=dr.filter(function(v){return v!==i}),document.removeEventListener("wheel",a,ur),document.removeEventListener("touchmove",a,ur),document.removeEventListener("touchstart",f,ur)}},[]);var w=e.removeScrollBar,y=e.inert;return c.createElement(c.Fragment,null,y?c.createElement(i,{styles:I_(o)}):null,w?c.createElement(Cg,{gapMode:e.gapMode}):null)}function z_(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const U_=xg(Ug,F_);var ml=c.forwardRef(function(e,t){return c.createElement(pl,Oe({},e,{ref:t,sideCar:U_}))});ml.classNames=pl.classNames;var Yu="Dialog",[Wg,Kg]=ot(Yu),[B_,_t]=Wg(Yu),Gg=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:o,onOpenChange:i,modal:s=!0}=e,l=c.useRef(null),a=c.useRef(null),[u=!1,f]=nr({prop:r,defaultProp:o,onChange:i});return m.jsx(B_,{scope:t,triggerRef:l,contentRef:a,contentId:Un(),titleId:Un(),descriptionId:Un(),open:u,onOpenChange:f,onOpenToggle:c.useCallback(()=>f(d=>!d),[f]),modal:s,children:n})};Gg.displayName=Yu;var Yg="DialogTrigger",Xg=c.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=_t(Yg,n),i=ne(t,o.triggerRef);return m.jsx(Z.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":Zu(o.open),...r,ref:i,onClick:F(e.onClick,o.onOpenToggle)})});Xg.displayName=Yg;var Xu="DialogPortal",[V_,Qg]=Wg(Xu,{forceMount:void 0}),Zg=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:o}=e,i=_t(Xu,t);return m.jsx(V_,{scope:t,forceMount:n,children:c.Children.map(r,s=>m.jsx(Le,{present:n||i.open,children:m.jsx(si,{asChild:!0,container:o,children:s})}))})};Zg.displayName=Xu;var Ns="DialogOverlay",qg=c.forwardRef((e,t)=>{const n=Qg(Ns,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,i=_t(Ns,e.__scopeDialog);return i.modal?m.jsx(Le,{present:r||i.open,children:m.jsx(H_,{...o,ref:t})}):null});qg.displayName=Ns;var H_=c.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=_t(Ns,n);return m.jsx(ml,{as:En,allowPinchZoom:!0,shards:[o.contentRef],children:m.jsx(Z.div,{"data-state":Zu(o.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),Zn="DialogContent",Jg=c.forwardRef((e,t)=>{const n=Qg(Zn,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,i=_t(Zn,e.__scopeDialog);return m.jsx(Le,{present:r||i.open,children:i.modal?m.jsx(W_,{...o,ref:t}):m.jsx(K_,{...o,ref:t})})});Jg.displayName=Zn;var W_=c.forwardRef((e,t)=>{const n=_t(Zn,e.__scopeDialog),r=c.useRef(null),o=ne(t,n.contentRef,r);return c.useEffect(()=>{const i=r.current;if(i)return ul(i)},[]),m.jsx(e1,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:F(e.onCloseAutoFocus,i=>{var s;i.preventDefault(),(s=n.triggerRef.current)==null||s.focus()}),onPointerDownOutside:F(e.onPointerDownOutside,i=>{const s=i.detail.originalEvent,l=s.button===0&&s.ctrlKey===!0;(s.button===2||l)&&i.preventDefault()}),onFocusOutside:F(e.onFocusOutside,i=>i.preventDefault())})}),K_=c.forwardRef((e,t)=>{const n=_t(Zn,e.__scopeDialog),r=c.useRef(!1),o=c.useRef(!1);return m.jsx(e1,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{var s,l;(s=e.onCloseAutoFocus)==null||s.call(e,i),i.defaultPrevented||(r.current||(l=n.triggerRef.current)==null||l.focus(),i.preventDefault()),r.current=!1,o.current=!1},onInteractOutside:i=>{var a,u;(a=e.onInteractOutside)==null||a.call(e,i),i.defaultPrevented||(r.current=!0,i.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const s=i.target;((u=n.triggerRef.current)==null?void 0:u.contains(s))&&i.preventDefault(),i.detail.originalEvent.type==="focusin"&&o.current&&i.preventDefault()}})}),e1=c.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:i,...s}=e,l=_t(Zn,n),a=c.useRef(null),u=ne(t,a);return Gu(),m.jsxs(m.Fragment,{children:[m.jsx(fl,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:i,children:m.jsx(ii,{role:"dialog",id:l.contentId,"aria-describedby":l.descriptionId,"aria-labelledby":l.titleId,"data-state":Zu(l.open),...s,ref:u,onDismiss:()=>l.onOpenChange(!1)})}),m.jsxs(m.Fragment,{children:[m.jsx(Y_,{titleId:l.titleId}),m.jsx(Q_,{contentRef:a,descriptionId:l.descriptionId})]})]})}),Qu="DialogTitle",t1=c.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=_t(Qu,n);return m.jsx(Z.h2,{id:o.titleId,...r,ref:t})});t1.displayName=Qu;var n1="DialogDescription",r1=c.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=_t(n1,n);return m.jsx(Z.p,{id:o.descriptionId,...r,ref:t})});r1.displayName=n1;var o1="DialogClose",i1=c.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=_t(o1,n);return m.jsx(Z.button,{type:"button",...r,ref:t,onClick:F(e.onClick,()=>o.onOpenChange(!1))})});i1.displayName=o1;function Zu(e){return e?"open":"closed"}var s1="DialogTitleWarning",[G_,l1]=zC(s1,{contentName:Zn,titleName:Qu,docsSlug:"dialog"}),Y_=({titleId:e})=>{const t=l1(s1),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users. If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component. For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return c.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},X_="DialogDescriptionWarning",Q_=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${l1(X_).contentName}}.`;return c.useEffect(()=>{var i;const o=(i=e.current)==null?void 0:i.getAttribute("aria-describedby");t&&o&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},Z_=Gg,q_=Xg,a1=Zg,qu=qg,Ju=Jg,ed=t1,td=r1,nd=i1;const J_=a1,c1=c.forwardRef(({className:e,...t},n)=>m.jsx(qu,{ref:n,className:U("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));c1.displayName=qu.displayName;const e3=c.forwardRef(({className:e,children:t,...n},r)=>m.jsxs(J_,{children:[m.jsx(c1,{}),m.jsxs(Ju,{ref:r,className:U("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...n,children:[t,m.jsxs(nd,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[m.jsx(_v,{className:"h-4 w-4"}),m.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));e3.displayName=Ju.displayName;const t3=c.forwardRef(({className:e,...t},n)=>m.jsx(ed,{ref:n,className:U("text-lg font-semibold leading-none tracking-tight",e),...t}));t3.displayName=ed.displayName;const n3=c.forwardRef(({className:e,...t},n)=>m.jsx(td,{ref:n,className:U("text-sm text-muted-foreground",e),...t}));n3.displayName=td.displayName;const rd=c.forwardRef(({className:e,...t},n)=>m.jsx(Xe,{ref:n,className:U("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",e),...t}));rd.displayName=Xe.displayName;const u1=c.forwardRef(({className:e,...t},n)=>m.jsxs("div",{className:"flex items-center border-b px-3","cmdk-input-wrapper":"",children:[m.jsx(RC,{className:"mr-2 h-4 w-4 shrink-0 opacity-50"}),m.jsx(Xe.Input,{ref:n,className:U("flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",e),...t})]}));u1.displayName=Xe.Input.displayName;const od=c.forwardRef(({className:e,...t},n)=>m.jsx(Xe.List,{ref:n,className:U("max-h-[300px] overflow-y-auto overflow-x-hidden",e),...t}));od.displayName=Xe.List.displayName;const id=c.forwardRef((e,t)=>m.jsx(Xe.Empty,{ref:t,className:"py-6 text-center text-sm",...e}));id.displayName=Xe.Empty.displayName;const sd=c.forwardRef(({className:e,...t},n)=>m.jsx(Xe.Group,{ref:n,className:U("overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",e),...t}));sd.displayName=Xe.Group.displayName;const r3=c.forwardRef(({className:e,...t},n)=>m.jsx(Xe.Separator,{ref:n,className:U("-mx-1 h-px bg-border",e),...t}));r3.displayName=Xe.Separator.displayName;const ld=c.forwardRef(({className:e,...t},n)=>m.jsx(Xe.Item,{ref:n,className:U("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none aria-selected:bg-accent aria-selected:text-accent-foreground data-[disabled='true']:pointer-events-none data-[disabled='true']:opacity-50",e),...t}));ld.displayName=Xe.Item.displayName;const o3=["top","right","bottom","left"],Tt=Math.min,Ze=Math.max,Ts=Math.round,Bi=Math.floor,bn=e=>({x:e,y:e}),i3={left:"right",right:"left",bottom:"top",top:"bottom"},s3={start:"end",end:"start"};function Ac(e,t,n){return Ze(e,Tt(t,n))}function Xt(e,t){return typeof e=="function"?e(t):e}function Qt(e){return e.split("-")[0]}function Xr(e){return e.split("-")[1]}function ad(e){return e==="x"?"y":"x"}function cd(e){return e==="y"?"height":"width"}function Rn(e){return["top","bottom"].includes(Qt(e))?"y":"x"}function ud(e){return ad(Rn(e))}function l3(e,t,n){n===void 0&&(n=!1);const r=Xr(e),o=ud(e),i=cd(o);let s=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(s=As(s)),[s,As(s)]}function a3(e){const t=As(e);return[Dc(e),t,Dc(t)]}function Dc(e){return e.replace(/start|end/g,t=>s3[t])}function c3(e,t,n){const r=["left","right"],o=["right","left"],i=["top","bottom"],s=["bottom","top"];switch(e){case"top":case"bottom":return n?t?o:r:t?r:o;case"left":case"right":return t?i:s;default:return[]}}function u3(e,t,n,r){const o=Xr(e);let i=c3(Qt(e),n==="start",r);return o&&(i=i.map(s=>s+"-"+o),t&&(i=i.concat(i.map(Dc)))),i}function As(e){return e.replace(/left|right|bottom|top/g,t=>i3[t])}function d3(e){return{top:0,right:0,bottom:0,left:0,...e}}function d1(e){return typeof e!="number"?d3(e):{top:e,right:e,bottom:e,left:e}}function Ds(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function Up(e,t,n){let{reference:r,floating:o}=e;const i=Rn(t),s=ud(t),l=cd(s),a=Qt(t),u=i==="y",f=r.x+r.width/2-o.width/2,d=r.y+r.height/2-o.height/2,p=r[l]/2-o[l]/2;let w;switch(a){case"top":w={x:f,y:r.y-o.height};break;case"bottom":w={x:f,y:r.y+r.height};break;case"right":w={x:r.x+r.width,y:d};break;case"left":w={x:r.x-o.width,y:d};break;default:w={x:r.x,y:r.y}}switch(Xr(t)){case"start":w[s]-=p*(n&&u?-1:1);break;case"end":w[s]+=p*(n&&u?-1:1);break}return w}const f3=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:s}=n,l=i.filter(Boolean),a=await(s.isRTL==null?void 0:s.isRTL(t));let u=await s.getElementRects({reference:e,floating:t,strategy:o}),{x:f,y:d}=Up(u,r,a),p=r,w={},y=0;for(let v=0;v({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:i,platform:s,elements:l,middlewareData:a}=t,{element:u,padding:f=0}=Xt(e,t)||{};if(u==null)return{};const d=d1(f),p={x:n,y:r},w=ud(o),y=cd(w),v=await s.getDimensions(u),S=w==="y",h=S?"top":"left",g=S?"bottom":"right",x=S?"clientHeight":"clientWidth",C=i.reference[y]+i.reference[w]-p[w]-i.floating[y],E=p[w]-i.reference[w],b=await(s.getOffsetParent==null?void 0:s.getOffsetParent(u));let _=b?b[x]:0;(!_||!await(s.isElement==null?void 0:s.isElement(b)))&&(_=l.floating[x]||i.floating[y]);const R=C/2-E/2,k=_/2-v[y]/2-1,P=Tt(d[h],k),D=Tt(d[g],k),M=P,X=_-v[y]-D,O=_/2-v[y]/2+R,V=Ac(M,O,X),H=!a.arrow&&Xr(o)!=null&&O!==V&&i.reference[y]/2-(OO<=0)){var D,M;const O=(((D=i.flip)==null?void 0:D.index)||0)+1,V=_[O];if(V)return{data:{index:O,overflows:P},reset:{placement:V}};let H=(M=P.filter(I=>I.overflows[0]<=0).sort((I,A)=>I.overflows[1]-A.overflows[1])[0])==null?void 0:M.placement;if(!H)switch(w){case"bestFit":{var X;const I=(X=P.filter(A=>{if(b){const T=Rn(A.placement);return T===g||T==="y"}return!0}).map(A=>[A.placement,A.overflows.filter(T=>T>0).reduce((T,L)=>T+L,0)]).sort((A,T)=>A[1]-T[1])[0])==null?void 0:X[0];I&&(H=I);break}case"initialPlacement":H=l;break}if(o!==H)return{reset:{placement:H}}}return{}}}};function Bp(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Vp(e){return o3.some(t=>e[t]>=0)}const h3=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...o}=Xt(e,t);switch(r){case"referenceHidden":{const i=await Go(t,{...o,elementContext:"reference"}),s=Bp(i,n.reference);return{data:{referenceHiddenOffsets:s,referenceHidden:Vp(s)}}}case"escaped":{const i=await Go(t,{...o,altBoundary:!0}),s=Bp(i,n.floating);return{data:{escapedOffsets:s,escaped:Vp(s)}}}default:return{}}}}};async function v3(e,t){const{placement:n,platform:r,elements:o}=e,i=await(r.isRTL==null?void 0:r.isRTL(o.floating)),s=Qt(n),l=Xr(n),a=Rn(n)==="y",u=["left","top"].includes(s)?-1:1,f=i&&a?-1:1,d=Xt(t,e);let{mainAxis:p,crossAxis:w,alignmentAxis:y}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...d};return l&&typeof y=="number"&&(w=l==="end"?y*-1:y),a?{x:w*f,y:p*u}:{x:p*u,y:w*f}}const g3=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:i,placement:s,middlewareData:l}=t,a=await v3(t,e);return s===((n=l.offset)==null?void 0:n.placement)&&(r=l.arrow)!=null&&r.alignmentOffset?{}:{x:o+a.x,y:i+a.y,data:{...a,placement:s}}}}},y3=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:i=!0,crossAxis:s=!1,limiter:l={fn:S=>{let{x:h,y:g}=S;return{x:h,y:g}}},...a}=Xt(e,t),u={x:n,y:r},f=await Go(t,a),d=Rn(Qt(o)),p=ad(d);let w=u[p],y=u[d];if(i){const S=p==="y"?"top":"left",h=p==="y"?"bottom":"right",g=w+f[S],x=w-f[h];w=Ac(g,w,x)}if(s){const S=d==="y"?"top":"left",h=d==="y"?"bottom":"right",g=y+f[S],x=y-f[h];y=Ac(g,y,x)}const v=l.fn({...t,[p]:w,[d]:y});return{...v,data:{x:v.x-n,y:v.y-r}}}}},w3=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:i,middlewareData:s}=t,{offset:l=0,mainAxis:a=!0,crossAxis:u=!0}=Xt(e,t),f={x:n,y:r},d=Rn(o),p=ad(d);let w=f[p],y=f[d];const v=Xt(l,t),S=typeof v=="number"?{mainAxis:v,crossAxis:0}:{mainAxis:0,crossAxis:0,...v};if(a){const x=p==="y"?"height":"width",C=i.reference[p]-i.floating[x]+S.mainAxis,E=i.reference[p]+i.reference[x]-S.mainAxis;wE&&(w=E)}if(u){var h,g;const x=p==="y"?"width":"height",C=["top","left"].includes(Qt(o)),E=i.reference[d]-i.floating[x]+(C&&((h=s.offset)==null?void 0:h[d])||0)+(C?0:S.crossAxis),b=i.reference[d]+i.reference[x]+(C?0:((g=s.offset)==null?void 0:g[d])||0)-(C?S.crossAxis:0);yb&&(y=b)}return{[p]:w,[d]:y}}}},x3=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){const{placement:n,rects:r,platform:o,elements:i}=t,{apply:s=()=>{},...l}=Xt(e,t),a=await Go(t,l),u=Qt(n),f=Xr(n),d=Rn(n)==="y",{width:p,height:w}=r.floating;let y,v;u==="top"||u==="bottom"?(y=u,v=f===(await(o.isRTL==null?void 0:o.isRTL(i.floating))?"start":"end")?"left":"right"):(v=u,y=f==="end"?"top":"bottom");const S=w-a.top-a.bottom,h=p-a.left-a.right,g=Tt(w-a[y],S),x=Tt(p-a[v],h),C=!t.middlewareData.shift;let E=g,b=x;if(d?b=f||C?Tt(x,h):h:E=f||C?Tt(g,S):S,C&&!f){const R=Ze(a.left,0),k=Ze(a.right,0),P=Ze(a.top,0),D=Ze(a.bottom,0);d?b=p-2*(R!==0||k!==0?R+k:Ze(a.left,a.right)):E=w-2*(P!==0||D!==0?P+D:Ze(a.top,a.bottom))}await s({...t,availableWidth:b,availableHeight:E});const _=await o.getDimensions(i.floating);return p!==_.width||w!==_.height?{reset:{rects:!0}}:{}}}};function Qr(e){return f1(e)?(e.nodeName||"").toLowerCase():"#document"}function et(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Jt(e){var t;return(t=(f1(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function f1(e){return e instanceof Node||e instanceof et(e).Node}function Mt(e){return e instanceof Element||e instanceof et(e).Element}function Ot(e){return e instanceof HTMLElement||e instanceof et(e).HTMLElement}function Hp(e){return typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof et(e).ShadowRoot}function ui(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Et(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function S3(e){return["table","td","th"].includes(Qr(e))}function hl(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function dd(e){const t=fd(),n=Et(e);return n.transform!=="none"||n.perspective!=="none"||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function C3(e){let t=Pn(e);for(;Ot(t)&&!Br(t);){if(hl(t))return null;if(dd(t))return t;t=Pn(t)}return null}function fd(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Br(e){return["html","body","#document"].includes(Qr(e))}function Et(e){return et(e).getComputedStyle(e)}function vl(e){return Mt(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Pn(e){if(Qr(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Hp(e)&&e.host||Jt(e);return Hp(t)?t.host:t}function p1(e){const t=Pn(e);return Br(t)?e.ownerDocument?e.ownerDocument.body:e.body:Ot(t)&&ui(t)?t:p1(t)}function Yo(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=p1(e),i=o===((r=e.ownerDocument)==null?void 0:r.body),s=et(o);return i?t.concat(s,s.visualViewport||[],ui(o)?o:[],s.frameElement&&n?Yo(s.frameElement):[]):t.concat(o,Yo(o,[],n))}function m1(e){const t=Et(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=Ot(e),i=o?e.offsetWidth:n,s=o?e.offsetHeight:r,l=Ts(n)!==i||Ts(r)!==s;return l&&(n=i,r=s),{width:n,height:r,$:l}}function pd(e){return Mt(e)?e:e.contextElement}function Mr(e){const t=pd(e);if(!Ot(t))return bn(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=m1(t);let s=(i?Ts(n.width):n.width)/r,l=(i?Ts(n.height):n.height)/o;return(!s||!Number.isFinite(s))&&(s=1),(!l||!Number.isFinite(l))&&(l=1),{x:s,y:l}}const E3=bn(0);function h1(e){const t=et(e);return!fd()||!t.visualViewport?E3:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function _3(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==et(e)?!1:t}function qn(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),i=pd(e);let s=bn(1);t&&(r?Mt(r)&&(s=Mr(r)):s=Mr(e));const l=_3(i,n,r)?h1(i):bn(0);let a=(o.left+l.x)/s.x,u=(o.top+l.y)/s.y,f=o.width/s.x,d=o.height/s.y;if(i){const p=et(i),w=r&&Mt(r)?et(r):r;let y=p,v=y.frameElement;for(;v&&r&&w!==y;){const S=Mr(v),h=v.getBoundingClientRect(),g=Et(v),x=h.left+(v.clientLeft+parseFloat(g.paddingLeft))*S.x,C=h.top+(v.clientTop+parseFloat(g.paddingTop))*S.y;a*=S.x,u*=S.y,f*=S.x,d*=S.y,a+=x,u+=C,y=et(v),v=y.frameElement}}return Ds({width:f,height:d,x:a,y:u})}function b3(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i=o==="fixed",s=Jt(r),l=t?hl(t.floating):!1;if(r===s||l&&i)return n;let a={scrollLeft:0,scrollTop:0},u=bn(1);const f=bn(0),d=Ot(r);if((d||!d&&!i)&&((Qr(r)!=="body"||ui(s))&&(a=vl(r)),Ot(r))){const p=qn(r);u=Mr(r),f.x=p.x+r.clientLeft,f.y=p.y+r.clientTop}return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-a.scrollLeft*u.x+f.x,y:n.y*u.y-a.scrollTop*u.y+f.y}}function R3(e){return Array.from(e.getClientRects())}function v1(e){return qn(Jt(e)).left+vl(e).scrollLeft}function P3(e){const t=Jt(e),n=vl(e),r=e.ownerDocument.body,o=Ze(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=Ze(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let s=-n.scrollLeft+v1(e);const l=-n.scrollTop;return Et(r).direction==="rtl"&&(s+=Ze(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:s,y:l}}function k3(e,t){const n=et(e),r=Jt(e),o=n.visualViewport;let i=r.clientWidth,s=r.clientHeight,l=0,a=0;if(o){i=o.width,s=o.height;const u=fd();(!u||u&&t==="fixed")&&(l=o.offsetLeft,a=o.offsetTop)}return{width:i,height:s,x:l,y:a}}function N3(e,t){const n=qn(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=Ot(e)?Mr(e):bn(1),s=e.clientWidth*i.x,l=e.clientHeight*i.y,a=o*i.x,u=r*i.y;return{width:s,height:l,x:a,y:u}}function Wp(e,t,n){let r;if(t==="viewport")r=k3(e,n);else if(t==="document")r=P3(Jt(e));else if(Mt(t))r=N3(t,n);else{const o=h1(e);r={...t,x:t.x-o.x,y:t.y-o.y}}return Ds(r)}function g1(e,t){const n=Pn(e);return n===t||!Mt(n)||Br(n)?!1:Et(n).position==="fixed"||g1(n,t)}function T3(e,t){const n=t.get(e);if(n)return n;let r=Yo(e,[],!1).filter(l=>Mt(l)&&Qr(l)!=="body"),o=null;const i=Et(e).position==="fixed";let s=i?Pn(e):e;for(;Mt(s)&&!Br(s);){const l=Et(s),a=dd(s);!a&&l.position==="fixed"&&(o=null),(i?!a&&!o:!a&&l.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||ui(s)&&!a&&g1(e,s))?r=r.filter(f=>f!==s):o=l,s=Pn(s)}return t.set(e,r),r}function A3(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const s=[...n==="clippingAncestors"?hl(t)?[]:T3(t,this._c):[].concat(n),r],l=s[0],a=s.reduce((u,f)=>{const d=Wp(t,f,o);return u.top=Ze(d.top,u.top),u.right=Tt(d.right,u.right),u.bottom=Tt(d.bottom,u.bottom),u.left=Ze(d.left,u.left),u},Wp(t,l,o));return{width:a.right-a.left,height:a.bottom-a.top,x:a.left,y:a.top}}function D3(e){const{width:t,height:n}=m1(e);return{width:t,height:n}}function M3(e,t,n){const r=Ot(t),o=Jt(t),i=n==="fixed",s=qn(e,!0,i,t);let l={scrollLeft:0,scrollTop:0};const a=bn(0);if(r||!r&&!i)if((Qr(t)!=="body"||ui(o))&&(l=vl(t)),r){const d=qn(t,!0,i,t);a.x=d.x+t.clientLeft,a.y=d.y+t.clientTop}else o&&(a.x=v1(o));const u=s.left+l.scrollLeft-a.x,f=s.top+l.scrollTop-a.y;return{x:u,y:f,width:s.width,height:s.height}}function Ca(e){return Et(e).position==="static"}function Kp(e,t){return!Ot(e)||Et(e).position==="fixed"?null:t?t(e):e.offsetParent}function y1(e,t){const n=et(e);if(hl(e))return n;if(!Ot(e)){let o=Pn(e);for(;o&&!Br(o);){if(Mt(o)&&!Ca(o))return o;o=Pn(o)}return n}let r=Kp(e,t);for(;r&&S3(r)&&Ca(r);)r=Kp(r,t);return r&&Br(r)&&Ca(r)&&!dd(r)?n:r||C3(e)||n}const O3=async function(e){const t=this.getOffsetParent||y1,n=this.getDimensions,r=await n(e.floating);return{reference:M3(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function j3(e){return Et(e).direction==="rtl"}const L3={convertOffsetParentRelativeRectToViewportRelativeRect:b3,getDocumentElement:Jt,getClippingRect:A3,getOffsetParent:y1,getElementRects:O3,getClientRects:R3,getDimensions:D3,getScale:Mr,isElement:Mt,isRTL:j3};function I3(e,t){let n=null,r;const o=Jt(e);function i(){var l;clearTimeout(r),(l=n)==null||l.disconnect(),n=null}function s(l,a){l===void 0&&(l=!1),a===void 0&&(a=1),i();const{left:u,top:f,width:d,height:p}=e.getBoundingClientRect();if(l||t(),!d||!p)return;const w=Bi(f),y=Bi(o.clientWidth-(u+d)),v=Bi(o.clientHeight-(f+p)),S=Bi(u),g={rootMargin:-w+"px "+-y+"px "+-v+"px "+-S+"px",threshold:Ze(0,Tt(1,a))||1};let x=!0;function C(E){const b=E[0].intersectionRatio;if(b!==a){if(!x)return s();b?s(!1,b):r=setTimeout(()=>{s(!1,1e-7)},1e3)}x=!1}try{n=new IntersectionObserver(C,{...g,root:o.ownerDocument})}catch{n=new IntersectionObserver(C,g)}n.observe(e)}return s(!0),i}function $3(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:a=!1}=r,u=pd(e),f=o||i?[...u?Yo(u):[],...Yo(t)]:[];f.forEach(h=>{o&&h.addEventListener("scroll",n,{passive:!0}),i&&h.addEventListener("resize",n)});const d=u&&l?I3(u,n):null;let p=-1,w=null;s&&(w=new ResizeObserver(h=>{let[g]=h;g&&g.target===u&&w&&(w.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var x;(x=w)==null||x.observe(t)})),n()}),u&&!a&&w.observe(u),w.observe(t));let y,v=a?qn(e):null;a&&S();function S(){const h=qn(e);v&&(h.x!==v.x||h.y!==v.y||h.width!==v.width||h.height!==v.height)&&n(),v=h,y=requestAnimationFrame(S)}return n(),()=>{var h;f.forEach(g=>{o&&g.removeEventListener("scroll",n),i&&g.removeEventListener("resize",n)}),d==null||d(),(h=w)==null||h.disconnect(),w=null,a&&cancelAnimationFrame(y)}}const F3=g3,z3=y3,U3=m3,B3=x3,V3=h3,Gp=p3,H3=w3,W3=(e,t,n)=>{const r=new Map,o={platform:L3,...n},i={...o.platform,_c:r};return f3(e,t,{...o,platform:i})};var rs=typeof document<"u"?c.useLayoutEffect:c.useEffect;function Ms(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!Ms(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){const i=o[r];if(!(i==="_owner"&&e.$$typeof)&&!Ms(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function w1(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Yp(e,t){const n=w1(e);return Math.round(t*n)/n}function Xp(e){const t=c.useRef(e);return rs(()=>{t.current=e}),t}function K3(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:i,floating:s}={},transform:l=!0,whileElementsMounted:a,open:u}=e,[f,d]=c.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[p,w]=c.useState(r);Ms(p,r)||w(r);const[y,v]=c.useState(null),[S,h]=c.useState(null),g=c.useCallback(I=>{I!==b.current&&(b.current=I,v(I))},[]),x=c.useCallback(I=>{I!==_.current&&(_.current=I,h(I))},[]),C=i||y,E=s||S,b=c.useRef(null),_=c.useRef(null),R=c.useRef(f),k=a!=null,P=Xp(a),D=Xp(o),M=c.useCallback(()=>{if(!b.current||!_.current)return;const I={placement:t,strategy:n,middleware:p};D.current&&(I.platform=D.current),W3(b.current,_.current,I).then(A=>{const T={...A,isPositioned:!0};X.current&&!Ms(R.current,T)&&(R.current=T,qt.flushSync(()=>{d(T)}))})},[p,t,n,D]);rs(()=>{u===!1&&R.current.isPositioned&&(R.current.isPositioned=!1,d(I=>({...I,isPositioned:!1})))},[u]);const X=c.useRef(!1);rs(()=>(X.current=!0,()=>{X.current=!1}),[]),rs(()=>{if(C&&(b.current=C),E&&(_.current=E),C&&E){if(P.current)return P.current(C,E,M);M()}},[C,E,M,P,k]);const O=c.useMemo(()=>({reference:b,floating:_,setReference:g,setFloating:x}),[g,x]),V=c.useMemo(()=>({reference:C,floating:E}),[C,E]),H=c.useMemo(()=>{const I={position:n,left:0,top:0};if(!V.floating)return I;const A=Yp(V.floating,f.x),T=Yp(V.floating,f.y);return l?{...I,transform:"translate("+A+"px, "+T+"px)",...w1(V.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:A,top:T}},[n,l,V.floating,f.x,f.y]);return c.useMemo(()=>({...f,update:M,refs:O,elements:V,floatingStyles:H}),[f,M,O,V,H])}const G3=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:o}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?Gp({element:r.current,padding:o}).fn(n):{}:r?Gp({element:r,padding:o}).fn(n):{}}}},Y3=(e,t)=>({...F3(e),options:[e,t]}),X3=(e,t)=>({...z3(e),options:[e,t]}),Q3=(e,t)=>({...H3(e),options:[e,t]}),Z3=(e,t)=>({...U3(e),options:[e,t]}),q3=(e,t)=>({...B3(e),options:[e,t]}),J3=(e,t)=>({...V3(e),options:[e,t]}),eb=(e,t)=>({...G3(e),options:[e,t]});var tb="Arrow",x1=c.forwardRef((e,t)=>{const{children:n,width:r=10,height:o=5,...i}=e;return m.jsx(Z.svg,{...i,ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:m.jsx("polygon",{points:"0,0 30,0 15,10"})})});x1.displayName=tb;var nb=x1;function md(e){const[t,n]=c.useState(void 0);return Yt(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const i=o[0];let s,l;if("borderBoxSize"in i){const a=i.borderBoxSize,u=Array.isArray(a)?a[0]:a;s=u.inlineSize,l=u.blockSize}else s=e.offsetWidth,l=e.offsetHeight;n({width:s,height:l})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var hd="Popper",[S1,gl]=ot(hd),[rb,C1]=S1(hd),E1=e=>{const{__scopePopper:t,children:n}=e,[r,o]=c.useState(null);return m.jsx(rb,{scope:t,anchor:r,onAnchorChange:o,children:n})};E1.displayName=hd;var _1="PopperAnchor",b1=c.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,i=C1(_1,n),s=c.useRef(null),l=ne(t,s);return c.useEffect(()=>{i.onAnchorChange((r==null?void 0:r.current)||s.current)}),r?null:m.jsx(Z.div,{...o,ref:l})});b1.displayName=_1;var vd="PopperContent",[ob,ib]=S1(vd),R1=c.forwardRef((e,t)=>{var Q,J,re,ee,ae,Y;const{__scopePopper:n,side:r="bottom",sideOffset:o=0,align:i="center",alignOffset:s=0,arrowPadding:l=0,avoidCollisions:a=!0,collisionBoundary:u=[],collisionPadding:f=0,sticky:d="partial",hideWhenDetached:p=!1,updatePositionStrategy:w="optimized",onPlaced:y,...v}=e,S=C1(vd,n),[h,g]=c.useState(null),x=ne(t,oe=>g(oe)),[C,E]=c.useState(null),b=md(C),_=(b==null?void 0:b.width)??0,R=(b==null?void 0:b.height)??0,k=r+(i!=="center"?"-"+i:""),P=typeof f=="number"?f:{top:0,right:0,bottom:0,left:0,...f},D=Array.isArray(u)?u:[u],M=D.length>0,X={padding:P,boundary:D.filter(lb),altBoundary:M},{refs:O,floatingStyles:V,placement:H,isPositioned:I,middlewareData:A}=K3({strategy:"fixed",placement:k,whileElementsMounted:(...oe)=>$3(...oe,{animationFrame:w==="always"}),elements:{reference:S.anchor},middleware:[Y3({mainAxis:o+R,alignmentAxis:s}),a&&X3({mainAxis:!0,crossAxis:!1,limiter:d==="partial"?Q3():void 0,...X}),a&&Z3({...X}),q3({...X,apply:({elements:oe,rects:ge,availableWidth:ye,availableHeight:Ie})=>{const{width:mt,height:Lt}=ge.reference,bt=oe.floating.style;bt.setProperty("--radix-popper-available-width",`${ye}px`),bt.setProperty("--radix-popper-available-height",`${Ie}px`),bt.setProperty("--radix-popper-anchor-width",`${mt}px`),bt.setProperty("--radix-popper-anchor-height",`${Lt}px`)}}),C&&eb({element:C,padding:l}),ab({arrowWidth:_,arrowHeight:R}),p&&J3({strategy:"referenceHidden",...X})]}),[T,L]=N1(H),W=xe(y);Yt(()=>{I&&(W==null||W())},[I,W]);const N=(Q=A.arrow)==null?void 0:Q.x,$=(J=A.arrow)==null?void 0:J.y,K=((re=A.arrow)==null?void 0:re.centerOffset)!==0,[z,G]=c.useState();return Yt(()=>{h&&G(window.getComputedStyle(h).zIndex)},[h]),m.jsx("div",{ref:O.setFloating,"data-radix-popper-content-wrapper":"",style:{...V,transform:I?V.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:z,"--radix-popper-transform-origin":[(ee=A.transformOrigin)==null?void 0:ee.x,(ae=A.transformOrigin)==null?void 0:ae.y].join(" "),...((Y=A.hide)==null?void 0:Y.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:m.jsx(ob,{scope:n,placedSide:T,onArrowChange:E,arrowX:N,arrowY:$,shouldHideArrow:K,children:m.jsx(Z.div,{"data-side":T,"data-align":L,...v,ref:x,style:{...v.style,animation:I?void 0:"none"}})})})});R1.displayName=vd;var P1="PopperArrow",sb={top:"bottom",right:"left",bottom:"top",left:"right"},k1=c.forwardRef(function(t,n){const{__scopePopper:r,...o}=t,i=ib(P1,r),s=sb[i.placedSide];return m.jsx("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[s]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[i.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[i.placedSide],visibility:i.shouldHideArrow?"hidden":void 0},children:m.jsx(nb,{...o,ref:n,style:{...o.style,display:"block"}})})});k1.displayName=P1;function lb(e){return e!==null}var ab=e=>({name:"transformOrigin",options:e,fn(t){var S,h,g;const{placement:n,rects:r,middlewareData:o}=t,s=((S=o.arrow)==null?void 0:S.centerOffset)!==0,l=s?0:e.arrowWidth,a=s?0:e.arrowHeight,[u,f]=N1(n),d={start:"0%",center:"50%",end:"100%"}[f],p=(((h=o.arrow)==null?void 0:h.x)??0)+l/2,w=(((g=o.arrow)==null?void 0:g.y)??0)+a/2;let y="",v="";return u==="bottom"?(y=s?d:`${p}px`,v=`${-a}px`):u==="top"?(y=s?d:`${p}px`,v=`${r.floating.height+a}px`):u==="right"?(y=`${-a}px`,v=s?d:`${w}px`):u==="left"&&(y=`${r.floating.width+a}px`,v=s?d:`${w}px`),{data:{x:y,y:v}}}});function N1(e){const[t,n="center"]=e.split("-");return[t,n]}var T1=E1,gd=b1,A1=R1,D1=k1,yd="Popover",[M1,JP]=ot(yd,[gl]),di=gl(),[cb,An]=M1(yd),O1=e=>{const{__scopePopover:t,children:n,open:r,defaultOpen:o,onOpenChange:i,modal:s=!1}=e,l=di(t),a=c.useRef(null),[u,f]=c.useState(!1),[d=!1,p]=nr({prop:r,defaultProp:o,onChange:i});return m.jsx(T1,{...l,children:m.jsx(cb,{scope:t,contentId:Un(),triggerRef:a,open:d,onOpenChange:p,onOpenToggle:c.useCallback(()=>p(w=>!w),[p]),hasCustomAnchor:u,onCustomAnchorAdd:c.useCallback(()=>f(!0),[]),onCustomAnchorRemove:c.useCallback(()=>f(!1),[]),modal:s,children:n})})};O1.displayName=yd;var j1="PopoverAnchor",ub=c.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=An(j1,n),i=di(n),{onCustomAnchorAdd:s,onCustomAnchorRemove:l}=o;return c.useEffect(()=>(s(),()=>l()),[s,l]),m.jsx(gd,{...i,...r,ref:t})});ub.displayName=j1;var L1="PopoverTrigger",I1=c.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=An(L1,n),i=di(n),s=ne(t,o.triggerRef),l=m.jsx(Z.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":B1(o.open),...r,ref:s,onClick:F(e.onClick,o.onOpenToggle)});return o.hasCustomAnchor?l:m.jsx(gd,{asChild:!0,...i,children:l})});I1.displayName=L1;var wd="PopoverPortal",[db,fb]=M1(wd,{forceMount:void 0}),$1=e=>{const{__scopePopover:t,forceMount:n,children:r,container:o}=e,i=An(wd,t);return m.jsx(db,{scope:t,forceMount:n,children:m.jsx(Le,{present:n||i.open,children:m.jsx(si,{asChild:!0,container:o,children:r})})})};$1.displayName=wd;var Vr="PopoverContent",F1=c.forwardRef((e,t)=>{const n=fb(Vr,e.__scopePopover),{forceMount:r=n.forceMount,...o}=e,i=An(Vr,e.__scopePopover);return m.jsx(Le,{present:r||i.open,children:i.modal?m.jsx(pb,{...o,ref:t}):m.jsx(mb,{...o,ref:t})})});F1.displayName=Vr;var pb=c.forwardRef((e,t)=>{const n=An(Vr,e.__scopePopover),r=c.useRef(null),o=ne(t,r),i=c.useRef(!1);return c.useEffect(()=>{const s=r.current;if(s)return ul(s)},[]),m.jsx(ml,{as:En,allowPinchZoom:!0,children:m.jsx(z1,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:F(e.onCloseAutoFocus,s=>{var l;s.preventDefault(),i.current||(l=n.triggerRef.current)==null||l.focus()}),onPointerDownOutside:F(e.onPointerDownOutside,s=>{const l=s.detail.originalEvent,a=l.button===0&&l.ctrlKey===!0,u=l.button===2||a;i.current=u},{checkForDefaultPrevented:!1}),onFocusOutside:F(e.onFocusOutside,s=>s.preventDefault(),{checkForDefaultPrevented:!1})})})}),mb=c.forwardRef((e,t)=>{const n=An(Vr,e.__scopePopover),r=c.useRef(!1),o=c.useRef(!1);return m.jsx(z1,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{var s,l;(s=e.onCloseAutoFocus)==null||s.call(e,i),i.defaultPrevented||(r.current||(l=n.triggerRef.current)==null||l.focus(),i.preventDefault()),r.current=!1,o.current=!1},onInteractOutside:i=>{var a,u;(a=e.onInteractOutside)==null||a.call(e,i),i.defaultPrevented||(r.current=!0,i.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const s=i.target;((u=n.triggerRef.current)==null?void 0:u.contains(s))&&i.preventDefault(),i.detail.originalEvent.type==="focusin"&&o.current&&i.preventDefault()}})}),z1=c.forwardRef((e,t)=>{const{__scopePopover:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:i,disableOutsidePointerEvents:s,onEscapeKeyDown:l,onPointerDownOutside:a,onFocusOutside:u,onInteractOutside:f,...d}=e,p=An(Vr,n),w=di(n);return Gu(),m.jsx(fl,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:i,children:m.jsx(ii,{asChild:!0,disableOutsidePointerEvents:s,onInteractOutside:f,onEscapeKeyDown:l,onPointerDownOutside:a,onFocusOutside:u,onDismiss:()=>p.onOpenChange(!1),children:m.jsx(A1,{"data-state":B1(p.open),role:"dialog",id:p.contentId,...w,...d,ref:t,style:{...d.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),U1="PopoverClose",hb=c.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=An(U1,n);return m.jsx(Z.button,{type:"button",...r,ref:t,onClick:F(e.onClick,()=>o.onOpenChange(!1))})});hb.displayName=U1;var vb="PopoverArrow",gb=c.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=di(n);return m.jsx(D1,{...o,...r,ref:t})});gb.displayName=vb;function B1(e){return e?"open":"closed"}var yb=O1,wb=I1,xb=$1,V1=F1;const H1=yb,W1=wb,xd=c.forwardRef(({className:e,align:t="center",sideOffset:n=4,...r},o)=>m.jsx(xb,{children:m.jsx(V1,{ref:o,align:t,sideOffset:n,className:U("z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...r})}));xd.displayName=V1.displayName;var Sb=c.createContext(void 0);function yl(e){const t=c.useContext(Sb);return e||t||"ltr"}function Sd(e,[t,n]){return Math.min(n,Math.max(t,e))}function Cb(e,t){return c.useReducer((n,r)=>t[n][r]??n,e)}var Cd="ScrollArea",[K1,ek]=ot(Cd),[Eb,pt]=K1(Cd),G1=c.forwardRef((e,t)=>{const{__scopeScrollArea:n,type:r="hover",dir:o,scrollHideDelay:i=600,...s}=e,[l,a]=c.useState(null),[u,f]=c.useState(null),[d,p]=c.useState(null),[w,y]=c.useState(null),[v,S]=c.useState(null),[h,g]=c.useState(0),[x,C]=c.useState(0),[E,b]=c.useState(!1),[_,R]=c.useState(!1),k=ne(t,D=>a(D)),P=yl(o);return m.jsx(Eb,{scope:n,type:r,dir:P,scrollHideDelay:i,scrollArea:l,viewport:u,onViewportChange:f,content:d,onContentChange:p,scrollbarX:w,onScrollbarXChange:y,scrollbarXEnabled:E,onScrollbarXEnabledChange:b,scrollbarY:v,onScrollbarYChange:S,scrollbarYEnabled:_,onScrollbarYEnabledChange:R,onCornerWidthChange:g,onCornerHeightChange:C,children:m.jsx(Z.div,{dir:P,...s,ref:k,style:{position:"relative","--radix-scroll-area-corner-width":h+"px","--radix-scroll-area-corner-height":x+"px",...e.style}})})});G1.displayName=Cd;var Y1="ScrollAreaViewport",X1=c.forwardRef((e,t)=>{const{__scopeScrollArea:n,children:r,nonce:o,...i}=e,s=pt(Y1,n),l=c.useRef(null),a=ne(t,l,s.onViewportChange);return m.jsxs(m.Fragment,{children:[m.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"},nonce:o}),m.jsx(Z.div,{"data-radix-scroll-area-viewport":"",...i,ref:a,style:{overflowX:s.scrollbarXEnabled?"scroll":"hidden",overflowY:s.scrollbarYEnabled?"scroll":"hidden",...e.style},children:m.jsx("div",{ref:s.onContentChange,style:{minWidth:"100%",display:"table"},children:r})})]})});X1.displayName=Y1;var jt="ScrollAreaScrollbar",Ed=c.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=pt(jt,e.__scopeScrollArea),{onScrollbarXEnabledChange:i,onScrollbarYEnabledChange:s}=o,l=e.orientation==="horizontal";return c.useEffect(()=>(l?i(!0):s(!0),()=>{l?i(!1):s(!1)}),[l,i,s]),o.type==="hover"?m.jsx(_b,{...r,ref:t,forceMount:n}):o.type==="scroll"?m.jsx(bb,{...r,ref:t,forceMount:n}):o.type==="auto"?m.jsx(Q1,{...r,ref:t,forceMount:n}):o.type==="always"?m.jsx(_d,{...r,ref:t}):null});Ed.displayName=jt;var _b=c.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=pt(jt,e.__scopeScrollArea),[i,s]=c.useState(!1);return c.useEffect(()=>{const l=o.scrollArea;let a=0;if(l){const u=()=>{window.clearTimeout(a),s(!0)},f=()=>{a=window.setTimeout(()=>s(!1),o.scrollHideDelay)};return l.addEventListener("pointerenter",u),l.addEventListener("pointerleave",f),()=>{window.clearTimeout(a),l.removeEventListener("pointerenter",u),l.removeEventListener("pointerleave",f)}}},[o.scrollArea,o.scrollHideDelay]),m.jsx(Le,{present:n||i,children:m.jsx(Q1,{"data-state":i?"visible":"hidden",...r,ref:t})})}),bb=c.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=pt(jt,e.__scopeScrollArea),i=e.orientation==="horizontal",s=xl(()=>a("SCROLL_END"),100),[l,a]=Cb("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return c.useEffect(()=>{if(l==="idle"){const u=window.setTimeout(()=>a("HIDE"),o.scrollHideDelay);return()=>window.clearTimeout(u)}},[l,o.scrollHideDelay,a]),c.useEffect(()=>{const u=o.viewport,f=i?"scrollLeft":"scrollTop";if(u){let d=u[f];const p=()=>{const w=u[f];d!==w&&(a("SCROLL"),s()),d=w};return u.addEventListener("scroll",p),()=>u.removeEventListener("scroll",p)}},[o.viewport,i,a,s]),m.jsx(Le,{present:n||l!=="hidden",children:m.jsx(_d,{"data-state":l==="hidden"?"hidden":"visible",...r,ref:t,onPointerEnter:F(e.onPointerEnter,()=>a("POINTER_ENTER")),onPointerLeave:F(e.onPointerLeave,()=>a("POINTER_LEAVE"))})})}),Q1=c.forwardRef((e,t)=>{const n=pt(jt,e.__scopeScrollArea),{forceMount:r,...o}=e,[i,s]=c.useState(!1),l=e.orientation==="horizontal",a=xl(()=>{if(n.viewport){const u=n.viewport.offsetWidth{const{orientation:n="vertical",...r}=e,o=pt(jt,e.__scopeScrollArea),i=c.useRef(null),s=c.useRef(0),[l,a]=c.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),u=t0(l.viewport,l.content),f={...r,sizes:l,onSizesChange:a,hasThumb:u>0&&u<1,onThumbChange:p=>i.current=p,onThumbPointerUp:()=>s.current=0,onThumbPointerDown:p=>s.current=p};function d(p,w){return Ab(p,s.current,l,w)}return n==="horizontal"?m.jsx(Rb,{...f,ref:t,onThumbPositionChange:()=>{if(o.viewport&&i.current){const p=o.viewport.scrollLeft,w=Qp(p,l,o.dir);i.current.style.transform=`translate3d(${w}px, 0, 0)`}},onWheelScroll:p=>{o.viewport&&(o.viewport.scrollLeft=p)},onDragScroll:p=>{o.viewport&&(o.viewport.scrollLeft=d(p,o.dir))}}):n==="vertical"?m.jsx(Pb,{...f,ref:t,onThumbPositionChange:()=>{if(o.viewport&&i.current){const p=o.viewport.scrollTop,w=Qp(p,l);i.current.style.transform=`translate3d(0, ${w}px, 0)`}},onWheelScroll:p=>{o.viewport&&(o.viewport.scrollTop=p)},onDragScroll:p=>{o.viewport&&(o.viewport.scrollTop=d(p))}}):null}),Rb=c.forwardRef((e,t)=>{const{sizes:n,onSizesChange:r,...o}=e,i=pt(jt,e.__scopeScrollArea),[s,l]=c.useState(),a=c.useRef(null),u=ne(t,a,i.onScrollbarXChange);return c.useEffect(()=>{a.current&&l(getComputedStyle(a.current))},[a]),m.jsx(q1,{"data-orientation":"horizontal",...o,ref:u,sizes:n,style:{bottom:0,left:i.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:i.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":wl(n)+"px",...e.style},onThumbPointerDown:f=>e.onThumbPointerDown(f.x),onDragScroll:f=>e.onDragScroll(f.x),onWheelScroll:(f,d)=>{if(i.viewport){const p=i.viewport.scrollLeft+f.deltaX;e.onWheelScroll(p),r0(p,d)&&f.preventDefault()}},onResize:()=>{a.current&&i.viewport&&s&&r({content:i.viewport.scrollWidth,viewport:i.viewport.offsetWidth,scrollbar:{size:a.current.clientWidth,paddingStart:js(s.paddingLeft),paddingEnd:js(s.paddingRight)}})}})}),Pb=c.forwardRef((e,t)=>{const{sizes:n,onSizesChange:r,...o}=e,i=pt(jt,e.__scopeScrollArea),[s,l]=c.useState(),a=c.useRef(null),u=ne(t,a,i.onScrollbarYChange);return c.useEffect(()=>{a.current&&l(getComputedStyle(a.current))},[a]),m.jsx(q1,{"data-orientation":"vertical",...o,ref:u,sizes:n,style:{top:0,right:i.dir==="ltr"?0:void 0,left:i.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":wl(n)+"px",...e.style},onThumbPointerDown:f=>e.onThumbPointerDown(f.y),onDragScroll:f=>e.onDragScroll(f.y),onWheelScroll:(f,d)=>{if(i.viewport){const p=i.viewport.scrollTop+f.deltaY;e.onWheelScroll(p),r0(p,d)&&f.preventDefault()}},onResize:()=>{a.current&&i.viewport&&s&&r({content:i.viewport.scrollHeight,viewport:i.viewport.offsetHeight,scrollbar:{size:a.current.clientHeight,paddingStart:js(s.paddingTop),paddingEnd:js(s.paddingBottom)}})}})}),[kb,Z1]=K1(jt),q1=c.forwardRef((e,t)=>{const{__scopeScrollArea:n,sizes:r,hasThumb:o,onThumbChange:i,onThumbPointerUp:s,onThumbPointerDown:l,onThumbPositionChange:a,onDragScroll:u,onWheelScroll:f,onResize:d,...p}=e,w=pt(jt,n),[y,v]=c.useState(null),S=ne(t,k=>v(k)),h=c.useRef(null),g=c.useRef(""),x=w.viewport,C=r.content-r.viewport,E=xe(f),b=xe(a),_=xl(d,10);function R(k){if(h.current){const P=k.clientX-h.current.left,D=k.clientY-h.current.top;u({x:P,y:D})}}return c.useEffect(()=>{const k=P=>{const D=P.target;(y==null?void 0:y.contains(D))&&E(P,C)};return document.addEventListener("wheel",k,{passive:!1}),()=>document.removeEventListener("wheel",k,{passive:!1})},[x,y,C,E]),c.useEffect(b,[r,b]),Hr(y,_),Hr(w.content,_),m.jsx(kb,{scope:n,scrollbar:y,hasThumb:o,onThumbChange:xe(i),onThumbPointerUp:xe(s),onThumbPositionChange:b,onThumbPointerDown:xe(l),children:m.jsx(Z.div,{...p,ref:S,style:{position:"absolute",...p.style},onPointerDown:F(e.onPointerDown,k=>{k.button===0&&(k.target.setPointerCapture(k.pointerId),h.current=y.getBoundingClientRect(),g.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",w.viewport&&(w.viewport.style.scrollBehavior="auto"),R(k))}),onPointerMove:F(e.onPointerMove,R),onPointerUp:F(e.onPointerUp,k=>{const P=k.target;P.hasPointerCapture(k.pointerId)&&P.releasePointerCapture(k.pointerId),document.body.style.webkitUserSelect=g.current,w.viewport&&(w.viewport.style.scrollBehavior=""),h.current=null})})})}),Os="ScrollAreaThumb",J1=c.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=Z1(Os,e.__scopeScrollArea);return m.jsx(Le,{present:n||o.hasThumb,children:m.jsx(Nb,{ref:t,...r})})}),Nb=c.forwardRef((e,t)=>{const{__scopeScrollArea:n,style:r,...o}=e,i=pt(Os,n),s=Z1(Os,n),{onThumbPositionChange:l}=s,a=ne(t,d=>s.onThumbChange(d)),u=c.useRef(),f=xl(()=>{u.current&&(u.current(),u.current=void 0)},100);return c.useEffect(()=>{const d=i.viewport;if(d){const p=()=>{if(f(),!u.current){const w=Db(d,l);u.current=w,l()}};return l(),d.addEventListener("scroll",p),()=>d.removeEventListener("scroll",p)}},[i.viewport,f,l]),m.jsx(Z.div,{"data-state":s.hasThumb?"visible":"hidden",...o,ref:a,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...r},onPointerDownCapture:F(e.onPointerDownCapture,d=>{const w=d.target.getBoundingClientRect(),y=d.clientX-w.left,v=d.clientY-w.top;s.onThumbPointerDown({x:y,y:v})}),onPointerUp:F(e.onPointerUp,s.onThumbPointerUp)})});J1.displayName=Os;var bd="ScrollAreaCorner",e0=c.forwardRef((e,t)=>{const n=pt(bd,e.__scopeScrollArea),r=!!(n.scrollbarX&&n.scrollbarY);return n.type!=="scroll"&&r?m.jsx(Tb,{...e,ref:t}):null});e0.displayName=bd;var Tb=c.forwardRef((e,t)=>{const{__scopeScrollArea:n,...r}=e,o=pt(bd,n),[i,s]=c.useState(0),[l,a]=c.useState(0),u=!!(i&&l);return Hr(o.scrollbarX,()=>{var d;const f=((d=o.scrollbarX)==null?void 0:d.offsetHeight)||0;o.onCornerHeightChange(f),a(f)}),Hr(o.scrollbarY,()=>{var d;const f=((d=o.scrollbarY)==null?void 0:d.offsetWidth)||0;o.onCornerWidthChange(f),s(f)}),u?m.jsx(Z.div,{...r,ref:t,style:{width:i,height:l,position:"absolute",right:o.dir==="ltr"?0:void 0,left:o.dir==="rtl"?0:void 0,bottom:0,...e.style}}):null});function js(e){return e?parseInt(e,10):0}function t0(e,t){const n=e/t;return isNaN(n)?0:n}function wl(e){const t=t0(e.viewport,e.content),n=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,r=(e.scrollbar.size-n)*t;return Math.max(r,18)}function Ab(e,t,n,r="ltr"){const o=wl(n),i=o/2,s=t||i,l=o-s,a=n.scrollbar.paddingStart+s,u=n.scrollbar.size-n.scrollbar.paddingEnd-l,f=n.content-n.viewport,d=r==="ltr"?[0,f]:[f*-1,0];return n0([a,u],d)(e)}function Qp(e,t,n="ltr"){const r=wl(t),o=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,i=t.scrollbar.size-o,s=t.content-t.viewport,l=i-r,a=n==="ltr"?[0,s]:[s*-1,0],u=Sd(e,a);return n0([0,s],[0,l])(u)}function n0(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])}}function r0(e,t){return e>0&&e{})=>{let n={left:e.scrollLeft,top:e.scrollTop},r=0;return function o(){const i={left:e.scrollLeft,top:e.scrollTop},s=n.left!==i.left,l=n.top!==i.top;(s||l)&&t(),n=i,r=window.requestAnimationFrame(o)}(),()=>window.cancelAnimationFrame(r)};function xl(e,t){const n=xe(e),r=c.useRef(0);return c.useEffect(()=>()=>window.clearTimeout(r.current),[]),c.useCallback(()=>{window.clearTimeout(r.current),r.current=window.setTimeout(n,t)},[n,t])}function Hr(e,t){const n=xe(t);Yt(()=>{let r=0;if(e){const o=new ResizeObserver(()=>{cancelAnimationFrame(r),r=window.requestAnimationFrame(n)});return o.observe(e),()=>{window.cancelAnimationFrame(r),o.unobserve(e)}}},[e,n])}var o0=G1,Mb=X1,Ob=e0;const Rd=c.forwardRef(({className:e,children:t,...n},r)=>m.jsxs(o0,{ref:r,className:U("relative overflow-hidden",e),...n,children:[m.jsx(Mb,{className:"h-full w-full rounded-[inherit]",children:t}),m.jsx(i0,{}),m.jsx(Ob,{})]}));Rd.displayName=o0.displayName;const i0=c.forwardRef(({className:e,orientation:t="vertical",...n},r)=>m.jsx(Ed,{ref:r,orientation:t,className:U("flex touch-none select-none transition-colors",t==="vertical"&&"h-full w-2.5 border-l border-l-transparent p-[1px]",t==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent p-[1px]",e),...n,children:m.jsx(J1,{className:"relative flex-1 rounded-full bg-border"})}));i0.displayName=Ed.displayName;function jb(e){const[t,n]=c.useState(!1);return m.jsxs(H1,{open:t,onOpenChange:n,children:[m.jsx(W1,{asChild:!0,className:"bg-transparent hover:bg-background",children:m.jsxs(_n,{variant:"outline",role:"combobox","aria-expanded":t,className:"w-[70px] justify-between px-3",children:[m.jsx("div",{className:"h-5 w-5 rounded-full overflow-hidden",children:m.jsx("span",{className:U("fi fis h-5 flag-icon-squared text-xl",`fi-${e.value}`)})}),m.jsx(Ev,{className:"ml-2 h-4 w-4 shrink-0 opacity-50"})]})}),m.jsx(xd,{className:"w-[180px] p-0",children:m.jsxs(rd,{children:[m.jsx(id,{children:"No language found."}),m.jsx(od,{className:"overflow-hidden",children:m.jsx(Rd,{className:e.languages.length?"h-[300px]":"",children:m.jsx(sd,{children:e.languages.map(r=>m.jsxs(ld,{value:r.code,onSelect:()=>{e.onValueChange(r.code),n(!1)},children:[m.jsx("div",{className:"h-5 w-5 rounded-full overflow-hidden mr-2",children:m.jsx("span",{className:U("fi fis h-5 flag-icon-squared text-xl",`fi-${r.code}`)})}),m.jsx("p",{children:r.name}),m.jsx(nl,{className:U("ml-auto h-4 w-4",e.value===r.code?"opacity-100":"opacity-0")})]},r.code))})})})]})})]})}const Lb=ll("inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function Ib({className:e,variant:t,...n}){return m.jsx("div",{className:U(Lb({variant:t}),e),...n})}function $b(e){const[t,n]=c.useState(!1),[r,o]=c.useState(),i=c.useRef(new Audio);c.useEffect(()=>{i.current.volume=.5;const l=()=>o(void 0);return i.current.addEventListener("pause",l),()=>{i.current.removeEventListener("pause",l),i.current.pause()}},[]);const s=l=>{var f;const a=(f=Object.keys(l.files).find(d=>d.endsWith("MODEL_CARD")))==null?void 0:f.replace("MODEL_CARD",""),u=ks+"/"+a+"samples/speaker_0.mp3";l.key==r?i.current.pause():i.current.src=u??"",i.current.oncanplay=()=>{i.current.play(),o(l.key)}};return m.jsxs(H1,{open:t,onOpenChange:n,children:[m.jsx(W1,{asChild:!0,className:"bg-transparent hover:bg-background",children:m.jsxs(_n,{variant:"outline",role:"combobox","aria-expanded":t,className:"w-[200px] justify-between",children:[m.jsx("span",{className:"max-w-36 truncate",children:e.value?`${e.value.name} / ${e.value.quality}`:"Select voice..."}),m.jsx(Ev,{className:"ml-2 h-4 w-4 shrink-0 opacity-50"})]})}),m.jsx(xd,{className:"w-[250px] p-0",children:m.jsxs(rd,{children:[m.jsx(u1,{placeholder:"Search voice...",className:"h-9"}),m.jsx(id,{children:"No voice found."}),m.jsx(od,{className:"overflow-y-hidden",children:m.jsx(Rd,{className:U("w-full",e.voices.length>7?"h-[300px]":""),children:m.jsx(sd,{children:e.voices.map(l=>{var a;return m.jsxs(ld,{value:`${l.key} ${l.quality}`,className:"w-full",onSelect:()=>{e.onValueChange(l),n(!1)},children:[m.jsxs("button",{onClick:u=>{u.stopPropagation(),s(l)},children:[r!=l.key&&m.jsx(ug,{className:"mr-2 h-4 w-4"}),r==l.key&&m.jsx(cg,{className:"mr-2 h-4 w-4"})]}),m.jsx("span",{className:"mr-1 max-w-24 truncate",children:l.name}),!e.stored.includes(l.key)&&m.jsx(aC,{className:"h-3 w-3"}),m.jsx(Ib,{variant:"secondary",className:"ml-auto",children:l.quality}),((a=e.value)==null?void 0:a.name)==l.name&&m.jsx(nl,{className:"ml-2 h-4 w-4"})]},l.key)})})})})]})})]})}const Fb="_spinner_1fsci_1",zb="_l23_1fsci_1",Ub={spinner:Fb,l23:zb};function Zp(e){return m.jsx("div",{...e,className:U("w-4 aspect-square grid",Ub.spinner,e.className)})}function Bb(e){return new Worker("/assets/worker-B4zGO3TH.js",{type:"module",name:e==null?void 0:e.name})}const Vb=ll("relative w-full rounded-lg border px-4 py-3 text-sm [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground [&>svg~*]:pl-7",{variants:{variant:{default:"bg-background text-foreground",destructive:"border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive"}},defaultVariants:{variant:"default"}}),s0=c.forwardRef(({className:e,variant:t,...n},r)=>m.jsx("div",{ref:r,role:"alert",className:U(Vb({variant:t}),e),...n}));s0.displayName="Alert";const l0=c.forwardRef(({className:e,...t},n)=>m.jsx("h5",{ref:n,className:U("mb-1 font-medium leading-none tracking-tight",e),...t}));l0.displayName="AlertTitle";const a0=c.forwardRef(({className:e,...t},n)=>m.jsx("div",{ref:n,className:U("text-sm [&_p]:leading-relaxed",e),...t}));a0.displayName="AlertDescription";var Pd="Progress",kd=100,[Hb,tk]=ot(Pd),[Wb,Kb]=Hb(Pd),c0=c.forwardRef((e,t)=>{const{__scopeProgress:n,value:r=null,max:o,getValueLabel:i=Gb,...s}=e;(o||o===0)&&!qp(o)&&console.error(Yb(`${o}`,"Progress"));const l=qp(o)?o:kd;r!==null&&!Jp(r,l)&&console.error(Xb(`${r}`,"Progress"));const a=Jp(r,l)?r:null,u=Ls(a)?i(a,l):void 0;return m.jsx(Wb,{scope:n,value:a,max:l,children:m.jsx(Z.div,{"aria-valuemax":l,"aria-valuemin":0,"aria-valuenow":Ls(a)?a:void 0,"aria-valuetext":u,role:"progressbar","data-state":f0(a,l),"data-value":a??void 0,"data-max":l,...s,ref:t})})});c0.displayName=Pd;var u0="ProgressIndicator",d0=c.forwardRef((e,t)=>{const{__scopeProgress:n,...r}=e,o=Kb(u0,n);return m.jsx(Z.div,{"data-state":f0(o.value,o.max),"data-value":o.value??void 0,"data-max":o.max,...r,ref:t})});d0.displayName=u0;function Gb(e,t){return`${Math.round(e/t*100)}%`}function f0(e,t){return e==null?"indeterminate":e===t?"complete":"loading"}function Ls(e){return typeof e=="number"}function qp(e){return Ls(e)&&!isNaN(e)&&e>0}function Jp(e,t){return Ls(e)&&!isNaN(e)&&e<=t&&e>=0}function Yb(e,t){return`Invalid prop \`max\` of value \`${e}\` supplied to \`${t}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${kd}\`.`}function Xb(e,t){return`Invalid prop \`value\` of value \`${e}\` supplied to \`${t}\`. The \`value\` prop must be: - a positive number - less than the value passed to \`max\` (or ${kd} if no \`max\` prop is set) - \`null\` or \`undefined\` if the progress is indeterminate. Defaulting to \`null\`.`}var p0=c0,Qb=d0;const m0=c.forwardRef(({className:e,value:t,...n},r)=>m.jsx(p0,{ref:r,className:U("relative h-2 w-full overflow-hidden rounded-full bg-primary/20",e),...n,children:m.jsx(Qb,{className:"h-full w-full flex-1 bg-primary transition-all",style:{transform:`translateX(-${100-(t||0)}%)`}})}));m0.displayName=p0.displayName;function Zb(e){return m.jsx("span",{...e,className:U("min-w-[48px] rounded-md border border-transparent px-2 py-0.5 text-right text-sm text-muted-foreground hover:border-border",e.disabled?"opacity-50":"",e.className),children:e.children})}function qb(e){return typeof e.progress!="number"||typeof e.title!="string"||e.progress>=100?null:qt.createPortal(m.jsxs(s0,{className:"w-96 fixed top-4 left-[50%] translate-x-[-50%] z-[999]",children:[m.jsx(ag,{className:"h-4 w-4",strokeWidth:1.5}),m.jsxs("div",{className:"flex w-full items-center justify-between",children:[m.jsx(l0,{children:e.title}),m.jsxs(Zb,{children:[e.progress,"%"]})]}),m.jsx(a0,{className:"mt-1",children:m.jsx(m0,{className:"w-full",value:e.progress})})]}),document.body)}const Jb={key:"en_US-hfc_female-medium",name:"hfc_female",language:{code:"en_US",family:"en",region:"US",name_native:"English",name_english:"English",country_english:"United States"},quality:"medium",num_speakers:1,speaker_id_map:{},files:{"en/en_US/hfc_female/medium/en_US-hfc_female-medium.onnx":{size_bytes:63201294,md5_digest:"7abec91f1d6e19e913fbc4a333f62787"},"en/en_US/hfc_female/medium/en_US-hfc_female-medium.onnx.json":{size_bytes:5033,md5_digest:"c3d00f54dac3b4068f2576c15c5da3bc"},"en/en_US/hfc_female/medium/MODEL_CARD":{size_bytes:354,md5_digest:"a4a7b5da65e03e6972e44e9555a59aef"}},aliases:[]};var Ea="rovingFocusGroup.onEntryFocus",e4={bubbles:!1,cancelable:!0},Sl="RovingFocusGroup",[Mc,h0,t4]=ol(Sl),[n4,v0]=ot(Sl,[t4]),[r4,o4]=n4(Sl),g0=c.forwardRef((e,t)=>m.jsx(Mc.Provider,{scope:e.__scopeRovingFocusGroup,children:m.jsx(Mc.Slot,{scope:e.__scopeRovingFocusGroup,children:m.jsx(i4,{...e,ref:t})})}));g0.displayName=Sl;var i4=c.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:o=!1,dir:i,currentTabStopId:s,defaultCurrentTabStopId:l,onCurrentTabStopIdChange:a,onEntryFocus:u,preventScrollOnEntryFocus:f=!1,...d}=e,p=c.useRef(null),w=ne(t,p),y=yl(i),[v=null,S]=nr({prop:s,defaultProp:l,onChange:a}),[h,g]=c.useState(!1),x=xe(u),C=h0(n),E=c.useRef(!1),[b,_]=c.useState(0);return c.useEffect(()=>{const R=p.current;if(R)return R.addEventListener(Ea,x),()=>R.removeEventListener(Ea,x)},[x]),m.jsx(r4,{scope:n,orientation:r,dir:y,loop:o,currentTabStopId:v,onItemFocus:c.useCallback(R=>S(R),[S]),onItemShiftTab:c.useCallback(()=>g(!0),[]),onFocusableItemAdd:c.useCallback(()=>_(R=>R+1),[]),onFocusableItemRemove:c.useCallback(()=>_(R=>R-1),[]),children:m.jsx(Z.div,{tabIndex:h||b===0?-1:0,"data-orientation":r,...d,ref:w,style:{outline:"none",...e.style},onMouseDown:F(e.onMouseDown,()=>{E.current=!0}),onFocus:F(e.onFocus,R=>{const k=!E.current;if(R.target===R.currentTarget&&k&&!h){const P=new CustomEvent(Ea,e4);if(R.currentTarget.dispatchEvent(P),!P.defaultPrevented){const D=C().filter(H=>H.focusable),M=D.find(H=>H.active),X=D.find(H=>H.id===v),V=[M,X,...D].filter(Boolean).map(H=>H.ref.current);x0(V,f)}}E.current=!1}),onBlur:F(e.onBlur,()=>g(!1))})})}),y0="RovingFocusGroupItem",w0=c.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:o=!1,tabStopId:i,...s}=e,l=Un(),a=i||l,u=o4(y0,n),f=u.currentTabStopId===a,d=h0(n),{onFocusableItemAdd:p,onFocusableItemRemove:w}=u;return c.useEffect(()=>{if(r)return p(),()=>w()},[r,p,w]),m.jsx(Mc.ItemSlot,{scope:n,id:a,focusable:r,active:o,children:m.jsx(Z.span,{tabIndex:f?0:-1,"data-orientation":u.orientation,...s,ref:t,onMouseDown:F(e.onMouseDown,y=>{r?u.onItemFocus(a):y.preventDefault()}),onFocus:F(e.onFocus,()=>u.onItemFocus(a)),onKeyDown:F(e.onKeyDown,y=>{if(y.key==="Tab"&&y.shiftKey){u.onItemShiftTab();return}if(y.target!==y.currentTarget)return;const v=a4(y,u.orientation,u.dir);if(v!==void 0){if(y.metaKey||y.ctrlKey||y.altKey||y.shiftKey)return;y.preventDefault();let h=d().filter(g=>g.focusable).map(g=>g.ref.current);if(v==="last")h.reverse();else if(v==="prev"||v==="next"){v==="prev"&&h.reverse();const g=h.indexOf(y.currentTarget);h=u.loop?c4(h,g+1):h.slice(g+1)}setTimeout(()=>x0(h))}})})})});w0.displayName=y0;var s4={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function l4(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function a4(e,t,n){const r=l4(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return s4[r]}function x0(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function c4(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var u4=g0,d4=w0,Oc=["Enter"," "],f4=["ArrowDown","PageUp","Home"],S0=["ArrowUp","PageDown","End"],p4=[...f4,...S0],m4={ltr:[...Oc,"ArrowRight"],rtl:[...Oc,"ArrowLeft"]},h4={ltr:["ArrowLeft"],rtl:["ArrowRight"]},fi="Menu",[Xo,v4,g4]=ol(fi),[or,C0]=ot(fi,[g4,gl,v0]),Cl=gl(),E0=v0(),[y4,ir]=or(fi),[w4,pi]=or(fi),_0=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:o,onOpenChange:i,modal:s=!0}=e,l=Cl(t),[a,u]=c.useState(null),f=c.useRef(!1),d=xe(i),p=yl(o);return c.useEffect(()=>{const w=()=>{f.current=!0,document.addEventListener("pointerdown",y,{capture:!0,once:!0}),document.addEventListener("pointermove",y,{capture:!0,once:!0})},y=()=>f.current=!1;return document.addEventListener("keydown",w,{capture:!0}),()=>{document.removeEventListener("keydown",w,{capture:!0}),document.removeEventListener("pointerdown",y,{capture:!0}),document.removeEventListener("pointermove",y,{capture:!0})}},[]),m.jsx(T1,{...l,children:m.jsx(y4,{scope:t,open:n,onOpenChange:d,content:a,onContentChange:u,children:m.jsx(w4,{scope:t,onClose:c.useCallback(()=>d(!1),[d]),isUsingKeyboardRef:f,dir:p,modal:s,children:r})})})};_0.displayName=fi;var x4="MenuAnchor",Nd=c.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,o=Cl(n);return m.jsx(gd,{...o,...r,ref:t})});Nd.displayName=x4;var Td="MenuPortal",[S4,b0]=or(Td,{forceMount:void 0}),R0=e=>{const{__scopeMenu:t,forceMount:n,children:r,container:o}=e,i=ir(Td,t);return m.jsx(S4,{scope:t,forceMount:n,children:m.jsx(Le,{present:n||i.open,children:m.jsx(si,{asChild:!0,container:o,children:r})})})};R0.displayName=Td;var ct="MenuContent",[C4,Ad]=or(ct),P0=c.forwardRef((e,t)=>{const n=b0(ct,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,i=ir(ct,e.__scopeMenu),s=pi(ct,e.__scopeMenu);return m.jsx(Xo.Provider,{scope:e.__scopeMenu,children:m.jsx(Le,{present:r||i.open,children:m.jsx(Xo.Slot,{scope:e.__scopeMenu,children:s.modal?m.jsx(E4,{...o,ref:t}):m.jsx(_4,{...o,ref:t})})})})}),E4=c.forwardRef((e,t)=>{const n=ir(ct,e.__scopeMenu),r=c.useRef(null),o=ne(t,r);return c.useEffect(()=>{const i=r.current;if(i)return ul(i)},[]),m.jsx(Dd,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:F(e.onFocusOutside,i=>i.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),_4=c.forwardRef((e,t)=>{const n=ir(ct,e.__scopeMenu);return m.jsx(Dd,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),Dd=c.forwardRef((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:o,onOpenAutoFocus:i,onCloseAutoFocus:s,disableOutsidePointerEvents:l,onEntryFocus:a,onEscapeKeyDown:u,onPointerDownOutside:f,onFocusOutside:d,onInteractOutside:p,onDismiss:w,disableOutsideScroll:y,...v}=e,S=ir(ct,n),h=pi(ct,n),g=Cl(n),x=E0(n),C=v4(n),[E,b]=c.useState(null),_=c.useRef(null),R=ne(t,_,S.onContentChange),k=c.useRef(0),P=c.useRef(""),D=c.useRef(0),M=c.useRef(null),X=c.useRef("right"),O=c.useRef(0),V=y?ml:c.Fragment,H=y?{as:En,allowPinchZoom:!0}:void 0,I=T=>{var Q,J;const L=P.current+T,W=C().filter(re=>!re.disabled),N=document.activeElement,$=(Q=W.find(re=>re.ref.current===N))==null?void 0:Q.textValue,K=W.map(re=>re.textValue),z=L4(K,L,$),G=(J=W.find(re=>re.textValue===z))==null?void 0:J.ref.current;(function re(ee){P.current=ee,window.clearTimeout(k.current),ee!==""&&(k.current=window.setTimeout(()=>re(""),1e3))})(L),G&&setTimeout(()=>G.focus())};c.useEffect(()=>()=>window.clearTimeout(k.current),[]),Gu();const A=c.useCallback(T=>{var W,N;return X.current===((W=M.current)==null?void 0:W.side)&&$4(T,(N=M.current)==null?void 0:N.area)},[]);return m.jsx(C4,{scope:n,searchRef:P,onItemEnter:c.useCallback(T=>{A(T)&&T.preventDefault()},[A]),onItemLeave:c.useCallback(T=>{var L;A(T)||((L=_.current)==null||L.focus(),b(null))},[A]),onTriggerLeave:c.useCallback(T=>{A(T)&&T.preventDefault()},[A]),pointerGraceTimerRef:D,onPointerGraceIntentChange:c.useCallback(T=>{M.current=T},[]),children:m.jsx(V,{...H,children:m.jsx(fl,{asChild:!0,trapped:o,onMountAutoFocus:F(i,T=>{var L;T.preventDefault(),(L=_.current)==null||L.focus({preventScroll:!0})}),onUnmountAutoFocus:s,children:m.jsx(ii,{asChild:!0,disableOutsidePointerEvents:l,onEscapeKeyDown:u,onPointerDownOutside:f,onFocusOutside:d,onInteractOutside:p,onDismiss:w,children:m.jsx(u4,{asChild:!0,...x,dir:h.dir,orientation:"vertical",loop:r,currentTabStopId:E,onCurrentTabStopIdChange:b,onEntryFocus:F(a,T=>{h.isUsingKeyboardRef.current||T.preventDefault()}),preventScrollOnEntryFocus:!0,children:m.jsx(A1,{role:"menu","aria-orientation":"vertical","data-state":V0(S.open),"data-radix-menu-content":"",dir:h.dir,...g,...v,ref:R,style:{outline:"none",...v.style},onKeyDown:F(v.onKeyDown,T=>{const W=T.target.closest("[data-radix-menu-content]")===T.currentTarget,N=T.ctrlKey||T.altKey||T.metaKey,$=T.key.length===1;W&&(T.key==="Tab"&&T.preventDefault(),!N&&$&&I(T.key));const K=_.current;if(T.target!==K||!p4.includes(T.key))return;T.preventDefault();const G=C().filter(Q=>!Q.disabled).map(Q=>Q.ref.current);S0.includes(T.key)&&G.reverse(),O4(G)}),onBlur:F(e.onBlur,T=>{T.currentTarget.contains(T.target)||(window.clearTimeout(k.current),P.current="")}),onPointerMove:F(e.onPointerMove,Qo(T=>{const L=T.target,W=O.current!==T.clientX;if(T.currentTarget.contains(L)&&W){const N=T.clientX>O.current?"right":"left";X.current=N,O.current=T.clientX}}))})})})})})})});P0.displayName=ct;var b4="MenuGroup",Md=c.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return m.jsx(Z.div,{role:"group",...r,ref:t})});Md.displayName=b4;var R4="MenuLabel",k0=c.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return m.jsx(Z.div,{...r,ref:t})});k0.displayName=R4;var Is="MenuItem",em="menu.itemSelect",El=c.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...o}=e,i=c.useRef(null),s=pi(Is,e.__scopeMenu),l=Ad(Is,e.__scopeMenu),a=ne(t,i),u=c.useRef(!1),f=()=>{const d=i.current;if(!n&&d){const p=new CustomEvent(em,{bubbles:!0,cancelable:!0});d.addEventListener(em,w=>r==null?void 0:r(w),{once:!0}),ju(d,p),p.defaultPrevented?u.current=!1:s.onClose()}};return m.jsx(N0,{...o,ref:a,disabled:n,onClick:F(e.onClick,f),onPointerDown:d=>{var p;(p=e.onPointerDown)==null||p.call(e,d),u.current=!0},onPointerUp:F(e.onPointerUp,d=>{var p;u.current||(p=d.currentTarget)==null||p.click()}),onKeyDown:F(e.onKeyDown,d=>{const p=l.searchRef.current!=="";n||p&&d.key===" "||Oc.includes(d.key)&&(d.currentTarget.click(),d.preventDefault())})})});El.displayName=Is;var N0=c.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:o,...i}=e,s=Ad(Is,n),l=E0(n),a=c.useRef(null),u=ne(t,a),[f,d]=c.useState(!1),[p,w]=c.useState("");return c.useEffect(()=>{const y=a.current;y&&w((y.textContent??"").trim())},[i.children]),m.jsx(Xo.ItemSlot,{scope:n,disabled:r,textValue:o??p,children:m.jsx(d4,{asChild:!0,...l,focusable:!r,children:m.jsx(Z.div,{role:"menuitem","data-highlighted":f?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0,...i,ref:u,onPointerMove:F(e.onPointerMove,Qo(y=>{r?s.onItemLeave(y):(s.onItemEnter(y),y.defaultPrevented||y.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:F(e.onPointerLeave,Qo(y=>s.onItemLeave(y))),onFocus:F(e.onFocus,()=>d(!0)),onBlur:F(e.onBlur,()=>d(!1))})})})}),P4="MenuCheckboxItem",T0=c.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:r,...o}=e;return m.jsx(j0,{scope:e.__scopeMenu,checked:n,children:m.jsx(El,{role:"menuitemcheckbox","aria-checked":$s(n)?"mixed":n,...o,ref:t,"data-state":jd(n),onSelect:F(o.onSelect,()=>r==null?void 0:r($s(n)?!0:!n),{checkForDefaultPrevented:!1})})})});T0.displayName=P4;var A0="MenuRadioGroup",[k4,N4]=or(A0,{value:void 0,onValueChange:()=>{}}),D0=c.forwardRef((e,t)=>{const{value:n,onValueChange:r,...o}=e,i=xe(r);return m.jsx(k4,{scope:e.__scopeMenu,value:n,onValueChange:i,children:m.jsx(Md,{...o,ref:t})})});D0.displayName=A0;var M0="MenuRadioItem",O0=c.forwardRef((e,t)=>{const{value:n,...r}=e,o=N4(M0,e.__scopeMenu),i=n===o.value;return m.jsx(j0,{scope:e.__scopeMenu,checked:i,children:m.jsx(El,{role:"menuitemradio","aria-checked":i,...r,ref:t,"data-state":jd(i),onSelect:F(r.onSelect,()=>{var s;return(s=o.onValueChange)==null?void 0:s.call(o,n)},{checkForDefaultPrevented:!1})})})});O0.displayName=M0;var Od="MenuItemIndicator",[j0,T4]=or(Od,{checked:!1}),L0=c.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:r,...o}=e,i=T4(Od,n);return m.jsx(Le,{present:r||$s(i.checked)||i.checked===!0,children:m.jsx(Z.span,{...o,ref:t,"data-state":jd(i.checked)})})});L0.displayName=Od;var A4="MenuSeparator",I0=c.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return m.jsx(Z.div,{role:"separator","aria-orientation":"horizontal",...r,ref:t})});I0.displayName=A4;var D4="MenuArrow",$0=c.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,o=Cl(n);return m.jsx(D1,{...o,...r,ref:t})});$0.displayName=D4;var M4="MenuSub",[nk,F0]=or(M4),mo="MenuSubTrigger",z0=c.forwardRef((e,t)=>{const n=ir(mo,e.__scopeMenu),r=pi(mo,e.__scopeMenu),o=F0(mo,e.__scopeMenu),i=Ad(mo,e.__scopeMenu),s=c.useRef(null),{pointerGraceTimerRef:l,onPointerGraceIntentChange:a}=i,u={__scopeMenu:e.__scopeMenu},f=c.useCallback(()=>{s.current&&window.clearTimeout(s.current),s.current=null},[]);return c.useEffect(()=>f,[f]),c.useEffect(()=>{const d=l.current;return()=>{window.clearTimeout(d),a(null)}},[l,a]),m.jsx(Nd,{asChild:!0,...u,children:m.jsx(N0,{id:o.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":o.contentId,"data-state":V0(n.open),...e,ref:rl(t,o.onTriggerChange),onClick:d=>{var p;(p=e.onClick)==null||p.call(e,d),!(e.disabled||d.defaultPrevented)&&(d.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:F(e.onPointerMove,Qo(d=>{i.onItemEnter(d),!d.defaultPrevented&&!e.disabled&&!n.open&&!s.current&&(i.onPointerGraceIntentChange(null),s.current=window.setTimeout(()=>{n.onOpenChange(!0),f()},100))})),onPointerLeave:F(e.onPointerLeave,Qo(d=>{var w,y;f();const p=(w=n.content)==null?void 0:w.getBoundingClientRect();if(p){const v=(y=n.content)==null?void 0:y.dataset.side,S=v==="right",h=S?-5:5,g=p[S?"left":"right"],x=p[S?"right":"left"];i.onPointerGraceIntentChange({area:[{x:d.clientX+h,y:d.clientY},{x:g,y:p.top},{x,y:p.top},{x,y:p.bottom},{x:g,y:p.bottom}],side:v}),window.clearTimeout(l.current),l.current=window.setTimeout(()=>i.onPointerGraceIntentChange(null),300)}else{if(i.onTriggerLeave(d),d.defaultPrevented)return;i.onPointerGraceIntentChange(null)}})),onKeyDown:F(e.onKeyDown,d=>{var w;const p=i.searchRef.current!=="";e.disabled||p&&d.key===" "||m4[r.dir].includes(d.key)&&(n.onOpenChange(!0),(w=n.content)==null||w.focus(),d.preventDefault())})})})});z0.displayName=mo;var U0="MenuSubContent",B0=c.forwardRef((e,t)=>{const n=b0(ct,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,i=ir(ct,e.__scopeMenu),s=pi(ct,e.__scopeMenu),l=F0(U0,e.__scopeMenu),a=c.useRef(null),u=ne(t,a);return m.jsx(Xo.Provider,{scope:e.__scopeMenu,children:m.jsx(Le,{present:r||i.open,children:m.jsx(Xo.Slot,{scope:e.__scopeMenu,children:m.jsx(Dd,{id:l.contentId,"aria-labelledby":l.triggerId,...o,ref:u,align:"start",side:s.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:f=>{var d;s.isUsingKeyboardRef.current&&((d=a.current)==null||d.focus()),f.preventDefault()},onCloseAutoFocus:f=>f.preventDefault(),onFocusOutside:F(e.onFocusOutside,f=>{f.target!==l.trigger&&i.onOpenChange(!1)}),onEscapeKeyDown:F(e.onEscapeKeyDown,f=>{s.onClose(),f.preventDefault()}),onKeyDown:F(e.onKeyDown,f=>{var w;const d=f.currentTarget.contains(f.target),p=h4[s.dir].includes(f.key);d&&p&&(i.onOpenChange(!1),(w=l.trigger)==null||w.focus(),f.preventDefault())})})})})})});B0.displayName=U0;function V0(e){return e?"open":"closed"}function $s(e){return e==="indeterminate"}function jd(e){return $s(e)?"indeterminate":e?"checked":"unchecked"}function O4(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function j4(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function L4(e,t,n){const o=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,i=n?e.indexOf(n):-1;let s=j4(e,Math.max(i,0));o.length===1&&(s=s.filter(u=>u!==n));const a=s.find(u=>u.toLowerCase().startsWith(o.toLowerCase()));return a!==n?a:void 0}function I4(e,t){const{x:n,y:r}=e;let o=!1;for(let i=0,s=t.length-1;ir!=f>r&&n<(u-l)*(r-a)/(f-a)+l&&(o=!o)}return o}function $4(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return I4(n,t)}function Qo(e){return t=>t.pointerType==="mouse"?e(t):void 0}var F4=_0,z4=Nd,U4=R0,B4=P0,V4=Md,H4=k0,W4=El,K4=T0,G4=D0,Y4=O0,X4=L0,Q4=I0,Z4=$0,q4=z0,J4=B0,Ld="DropdownMenu",[eR,rk]=ot(Ld,[C0]),Ve=C0(),[tR,H0]=eR(Ld),W0=e=>{const{__scopeDropdownMenu:t,children:n,dir:r,open:o,defaultOpen:i,onOpenChange:s,modal:l=!0}=e,a=Ve(t),u=c.useRef(null),[f=!1,d]=nr({prop:o,defaultProp:i,onChange:s});return m.jsx(tR,{scope:t,triggerId:Un(),triggerRef:u,contentId:Un(),open:f,onOpenChange:d,onOpenToggle:c.useCallback(()=>d(p=>!p),[d]),modal:l,children:m.jsx(F4,{...a,open:f,onOpenChange:d,dir:r,modal:l,children:n})})};W0.displayName=Ld;var K0="DropdownMenuTrigger",G0=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...o}=e,i=H0(K0,n),s=Ve(n);return m.jsx(z4,{asChild:!0,...s,children:m.jsx(Z.button,{type:"button",id:i.triggerId,"aria-haspopup":"menu","aria-expanded":i.open,"aria-controls":i.open?i.contentId:void 0,"data-state":i.open?"open":"closed","data-disabled":r?"":void 0,disabled:r,...o,ref:rl(t,i.triggerRef),onPointerDown:F(e.onPointerDown,l=>{!r&&l.button===0&&l.ctrlKey===!1&&(i.onOpenToggle(),i.open||l.preventDefault())}),onKeyDown:F(e.onKeyDown,l=>{r||(["Enter"," "].includes(l.key)&&i.onOpenToggle(),l.key==="ArrowDown"&&i.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(l.key)&&l.preventDefault())})})})});G0.displayName=K0;var nR="DropdownMenuPortal",Y0=e=>{const{__scopeDropdownMenu:t,...n}=e,r=Ve(t);return m.jsx(U4,{...r,...n})};Y0.displayName=nR;var X0="DropdownMenuContent",Q0=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=H0(X0,n),i=Ve(n),s=c.useRef(!1);return m.jsx(B4,{id:o.contentId,"aria-labelledby":o.triggerId,...i,...r,ref:t,onCloseAutoFocus:F(e.onCloseAutoFocus,l=>{var a;s.current||(a=o.triggerRef.current)==null||a.focus(),s.current=!1,l.preventDefault()}),onInteractOutside:F(e.onInteractOutside,l=>{const a=l.detail.originalEvent,u=a.button===0&&a.ctrlKey===!0,f=a.button===2||u;(!o.modal||f)&&(s.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});Q0.displayName=X0;var rR="DropdownMenuGroup",oR=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ve(n);return m.jsx(V4,{...o,...r,ref:t})});oR.displayName=rR;var iR="DropdownMenuLabel",Z0=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ve(n);return m.jsx(H4,{...o,...r,ref:t})});Z0.displayName=iR;var sR="DropdownMenuItem",q0=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ve(n);return m.jsx(W4,{...o,...r,ref:t})});q0.displayName=sR;var lR="DropdownMenuCheckboxItem",J0=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ve(n);return m.jsx(K4,{...o,...r,ref:t})});J0.displayName=lR;var aR="DropdownMenuRadioGroup",cR=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ve(n);return m.jsx(G4,{...o,...r,ref:t})});cR.displayName=aR;var uR="DropdownMenuRadioItem",ey=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ve(n);return m.jsx(Y4,{...o,...r,ref:t})});ey.displayName=uR;var dR="DropdownMenuItemIndicator",ty=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ve(n);return m.jsx(X4,{...o,...r,ref:t})});ty.displayName=dR;var fR="DropdownMenuSeparator",ny=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ve(n);return m.jsx(Q4,{...o,...r,ref:t})});ny.displayName=fR;var pR="DropdownMenuArrow",mR=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ve(n);return m.jsx(Z4,{...o,...r,ref:t})});mR.displayName=pR;var hR="DropdownMenuSubTrigger",ry=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ve(n);return m.jsx(q4,{...o,...r,ref:t})});ry.displayName=hR;var vR="DropdownMenuSubContent",oy=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ve(n);return m.jsx(J4,{...o,...r,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});oy.displayName=vR;var gR=W0,yR=G0,wR=Y0,iy=Q0,sy=Z0,ly=q0,ay=J0,cy=ey,uy=ty,dy=ny,fy=ry,py=oy;const xR=gR,SR=yR,CR=c.forwardRef(({className:e,inset:t,children:n,...r},o)=>m.jsxs(fy,{ref:o,className:U("flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent",t&&"pl-8",e),...r,children:[n,m.jsx(hC,{className:"ml-auto h-4 w-4"})]}));CR.displayName=fy.displayName;const ER=c.forwardRef(({className:e,...t},n)=>m.jsx(py,{ref:n,className:U("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...t}));ER.displayName=py.displayName;const my=c.forwardRef(({className:e,sideOffset:t=4,...n},r)=>m.jsx(wR,{children:m.jsx(iy,{ref:r,sideOffset:t,className:U("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md","data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...n})}));my.displayName=iy.displayName;const _R=c.forwardRef(({className:e,inset:t,...n},r)=>m.jsx(ly,{ref:r,className:U("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t&&"pl-8",e),...n}));_R.displayName=ly.displayName;const hy=c.forwardRef(({className:e,children:t,checked:n,...r},o)=>m.jsxs(ay,{ref:o,className:U("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),checked:n,...r,children:[m.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:m.jsx(uy,{children:m.jsx(nl,{className:"h-4 w-4"})})}),t]}));hy.displayName=ay.displayName;const bR=c.forwardRef(({className:e,children:t,...n},r)=>m.jsxs(cy,{ref:r,className:U("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...n,children:[m.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:m.jsx(uy,{children:m.jsx(xC,{className:"h-4 w-4 fill-current"})})}),t]}));bR.displayName=cy.displayName;const vy=c.forwardRef(({className:e,inset:t,...n},r)=>m.jsx(sy,{ref:r,className:U("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...n}));vy.displayName=sy.displayName;const gy=c.forwardRef(({className:e,...t},n)=>m.jsx(dy,{ref:n,className:U("-mx-1 my-1 h-px bg-muted",e),...t}));gy.displayName=dy.displayName;var yy="AlertDialog",[RR,ok]=ot(yy,[Kg]),en=Kg(),wy=e=>{const{__scopeAlertDialog:t,...n}=e,r=en(t);return m.jsx(Z_,{...r,...n,modal:!0})};wy.displayName=yy;var PR="AlertDialogTrigger",xy=c.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,o=en(n);return m.jsx(q_,{...o,...r,ref:t})});xy.displayName=PR;var kR="AlertDialogPortal",Sy=e=>{const{__scopeAlertDialog:t,...n}=e,r=en(t);return m.jsx(a1,{...r,...n})};Sy.displayName=kR;var NR="AlertDialogOverlay",Cy=c.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,o=en(n);return m.jsx(qu,{...o,...r,ref:t})});Cy.displayName=NR;var Or="AlertDialogContent",[TR,AR]=RR(Or),Ey=c.forwardRef((e,t)=>{const{__scopeAlertDialog:n,children:r,...o}=e,i=en(n),s=c.useRef(null),l=ne(t,s),a=c.useRef(null);return m.jsx(G_,{contentName:Or,titleName:_y,docsSlug:"alert-dialog",children:m.jsx(TR,{scope:n,cancelRef:a,children:m.jsxs(Ju,{role:"alertdialog",...i,...o,ref:l,onOpenAutoFocus:F(o.onOpenAutoFocus,u=>{var f;u.preventDefault(),(f=a.current)==null||f.focus({preventScroll:!0})}),onPointerDownOutside:u=>u.preventDefault(),onInteractOutside:u=>u.preventDefault(),children:[m.jsx(bv,{children:r}),m.jsx(MR,{contentRef:s})]})})})});Ey.displayName=Or;var _y="AlertDialogTitle",by=c.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,o=en(n);return m.jsx(ed,{...o,...r,ref:t})});by.displayName=_y;var Ry="AlertDialogDescription",Py=c.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,o=en(n);return m.jsx(td,{...o,...r,ref:t})});Py.displayName=Ry;var DR="AlertDialogAction",ky=c.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,o=en(n);return m.jsx(nd,{...o,...r,ref:t})});ky.displayName=DR;var Ny="AlertDialogCancel",Ty=c.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,{cancelRef:o}=AR(Ny,n),i=en(n),s=ne(t,o);return m.jsx(nd,{...i,...r,ref:s})});Ty.displayName=Ny;var MR=({contentRef:e})=>{const t=`\`${Or}\` requires a description for the component to be accessible for screen reader users. You can add a description to the \`${Or}\` by passing a \`${Ry}\` component as a child, which also benefits sighted users by adding visible context to the dialog. Alternatively, you can use your own component as a description by assigning it an \`id\` and passing the same value to the \`aria-describedby\` prop in \`${Or}\`. If the description is confusing or duplicative for sighted users, you can use the \`@radix-ui/react-visually-hidden\` primitive as a wrapper around your description component. For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;return c.useEffect(()=>{var r;document.getElementById((r=e.current)==null?void 0:r.getAttribute("aria-describedby"))||console.warn(t)},[t,e]),null},OR=wy,jR=xy,LR=Sy,Ay=Cy,Dy=Ey,My=ky,Oy=Ty,jy=by,Ly=Py;const IR=OR,$R=jR,FR=LR,Iy=c.forwardRef(({className:e,...t},n)=>m.jsx(Ay,{className:U("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t,ref:n}));Iy.displayName=Ay.displayName;const $y=c.forwardRef(({className:e,...t},n)=>m.jsxs(FR,{children:[m.jsx(Iy,{}),m.jsx(Dy,{ref:n,className:U("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...t})]}));$y.displayName=Dy.displayName;const Fy=({className:e,...t})=>m.jsx("div",{className:U("flex flex-col space-y-2 text-center sm:text-left",e),...t});Fy.displayName="AlertDialogHeader";const zy=({className:e,...t})=>m.jsx("div",{className:U("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});zy.displayName="AlertDialogFooter";const Uy=c.forwardRef(({className:e,...t},n)=>m.jsx(jy,{ref:n,className:U("text-lg font-semibold",e),...t}));Uy.displayName=jy.displayName;const By=c.forwardRef(({className:e,...t},n)=>m.jsx(Ly,{ref:n,className:U("text-sm text-muted-foreground",e),...t}));By.displayName=Ly.displayName;const Vy=c.forwardRef(({className:e,...t},n)=>m.jsx(My,{ref:n,className:U(Uu(),e),...t}));Vy.displayName=My.displayName;const Hy=c.forwardRef(({className:e,...t},n)=>m.jsx(Oy,{ref:n,className:U(Uu({variant:"outline"}),"mt-2 sm:mt-0",e),...t}));Hy.displayName=Oy.displayName;function Wy(e){const t=c.useRef({value:e,previous:e});return c.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var Id="Checkbox",[zR,ik]=ot(Id),[UR,BR]=zR(Id),Ky=c.forwardRef((e,t)=>{const{__scopeCheckbox:n,name:r,checked:o,defaultChecked:i,required:s,disabled:l,value:a="on",onCheckedChange:u,...f}=e,[d,p]=c.useState(null),w=ne(t,x=>p(x)),y=c.useRef(!1),v=d?!!d.closest("form"):!0,[S=!1,h]=nr({prop:o,defaultProp:i,onChange:u}),g=c.useRef(S);return c.useEffect(()=>{const x=d==null?void 0:d.form;if(x){const C=()=>h(g.current);return x.addEventListener("reset",C),()=>x.removeEventListener("reset",C)}},[d,h]),m.jsxs(UR,{scope:n,state:S,disabled:l,children:[m.jsx(Z.button,{type:"button",role:"checkbox","aria-checked":Bn(S)?"mixed":S,"aria-required":s,"data-state":Xy(S),"data-disabled":l?"":void 0,disabled:l,value:a,...f,ref:w,onKeyDown:F(e.onKeyDown,x=>{x.key==="Enter"&&x.preventDefault()}),onClick:F(e.onClick,x=>{h(C=>Bn(C)?!0:!C),v&&(y.current=x.isPropagationStopped(),y.current||x.stopPropagation())})}),v&&m.jsx(VR,{control:d,bubbles:!y.current,name:r,value:a,checked:S,required:s,disabled:l,style:{transform:"translateX(-100%)"}})]})});Ky.displayName=Id;var Gy="CheckboxIndicator",Yy=c.forwardRef((e,t)=>{const{__scopeCheckbox:n,forceMount:r,...o}=e,i=BR(Gy,n);return m.jsx(Le,{present:r||Bn(i.state)||i.state===!0,children:m.jsx(Z.span,{"data-state":Xy(i.state),"data-disabled":i.disabled?"":void 0,...o,ref:t,style:{pointerEvents:"none",...e.style}})})});Yy.displayName=Gy;var VR=e=>{const{control:t,checked:n,bubbles:r=!0,...o}=e,i=c.useRef(null),s=Wy(n),l=md(t);return c.useEffect(()=>{const a=i.current,u=window.HTMLInputElement.prototype,d=Object.getOwnPropertyDescriptor(u,"checked").set;if(s!==n&&d){const p=new Event("click",{bubbles:r});a.indeterminate=Bn(n),d.call(a,Bn(n)?!1:n),a.dispatchEvent(p)}},[s,n,r]),m.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:Bn(n)?!1:n,...o,tabIndex:-1,ref:i,style:{...e.style,...l,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})};function Bn(e){return e==="indeterminate"}function Xy(e){return Bn(e)?"indeterminate":e?"checked":"unchecked"}var Qy=Ky,HR=Yy;const Zy=c.forwardRef(({className:e,...t},n)=>m.jsx(Qy,{ref:n,className:U("peer h-4 w-4 shrink-0 rounded-sm border border-primary shadow focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",e),...t,children:m.jsx(HR,{className:U("flex items-center justify-center text-current"),children:m.jsx(nl,{className:"h-4 w-4"})})}));Zy.displayName=Qy.displayName;function tm({toDelete:e,toDeleteChange:t,stored:n,onSubmit:r,...o}){return m.jsxs(xR,{children:[m.jsx(SR,{...o,asChild:!0,className:o.className,children:m.jsx(_n,{variant:"ghost",size:"icon",children:m.jsx(ag,{className:"h-4 w-4"})})}),m.jsxs(my,{children:[m.jsxs(vy,{className:"flex flex-row items-center w-full",children:[m.jsx(Zy,{className:"mr-2",checked:e.length==n.length,onCheckedChange:i=>{t(i?n:[])}}),"Stored Models",m.jsxs(IR,{children:[m.jsx($R,{className:"ml-auto",children:m.jsx($C,{className:"h-4 w-4"})}),m.jsxs($y,{children:[m.jsxs(Fy,{children:[m.jsx(Uy,{children:"Are you absolutely sure?"}),m.jsx(By,{children:"This action cannot be undone. This will permanently delete the selected models from your file system."})]}),m.jsxs(zy,{children:[m.jsx(Hy,{onClick:()=>t([]),children:"Cancel"}),m.jsx(Vy,{onClick:r,children:"Continue"})]})]})]})]}),m.jsx(gy,{}),n.map(i=>m.jsx(hy,{checked:e.includes(i),onSelect:s=>s.preventDefault(),onCheckedChange:s=>{t(s?[...e,i]:[...e.filter(l=>l!=i)])},children:i},i))]})]})}function WR({onFileCreated:e,...t}){const[n,r]=c.useState("us"),[o,i]=c.useState([]),[s,l]=c.useState([]),[a,u]=c.useState(!1),[f,d]=c.useState(),[p,w]=c.useState(!1),[y,v]=c.useState(Jb),[S,h]=c.useState(),[g,x]=c.useState([]),{toast:C}=sg();c.useEffect(()=>{o.length||(P2().then(i),sa().then(l))},[]),c.useEffect(()=>{function k(P){P.metaKey&&P.key=="Enter"&&(P.preventDefault(),_())}return document.addEventListener("keydown",k),()=>document.removeEventListener("keydown",k)},[y,S,p]);const E=c.useMemo(()=>{if(!o.length)return[];const k={};for(const{language:P}of o)k[P.region.toLocaleLowerCase()]=P.name_english;return Object.entries(k).map(([P,D])=>({code:P,name:D}))},[o]),b=c.useMemo(()=>o.filter(k=>k.language.region.toLowerCase()==n),[o,n]),_=()=>{if(!(y!=null&&y.key)||!(S!=null&&S.length)||p)return;w(!0);const k=new Bb;k.postMessage({type:"init",voiceId:y.key,text:S}),k.addEventListener("message",P=>{const D=P.data;D.type=="result"?(e(P.data.audio),sa().then(l)):D.type=="error"?C({title:"Synthesis Error",description:D.message,variant:"destructive"}):typeof D.url=="string"&&d({title:`Downloading ${y.name}`,progress:Math.round(D.loaded*100/D.total)}),["result","error"].includes(D.type??"")&&(k.terminate(),w(!1),d(void 0))})},R=async()=>{if(g.length){if(s.length==g.length)return l([]),await R2();for(const k of g)await b2(k);sa().then(l)}};return m.jsxs(m.Fragment,{children:[m.jsxs("div",{...t,"data-focussed":a,className:U("border border-border rounded-lg backdrop-blur-2xl bg-background/20 p-4 grid grid-cols-1 grid-rows-[1fr_auto] data-[focussed=true]:border-zinc-300 data-[focussed=true]:bg-background/30",t.className),children:[m.jsx("textarea",{placeholder:"Start typing here or paste any text you want",className:"h-full placeholder:text-muted-foreground text-xl w-full bg-transparent scrollbar-thin scrollbar-thumb-zinc-300 scrollbar-track-transparent scrollbar-thumb-rounded-full",onChange:k=>h(k.currentTarget.value),onFocus:()=>u(!0),onBlur:()=>u(!1)}),m.jsxs("div",{className:"w-full flex justify-between pt-4",children:[m.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-[auto_auto_auto] gap-y-2",children:[m.jsxs("div",{className:"flex gap-2 mr-3",children:[m.jsx(jb,{languages:E,value:n,onValueChange:r}),s.length>0&&m.jsx(tm,{className:"flex md:hidden",stored:s,toDelete:g,onSubmit:R,toDeleteChange:x})]}),m.jsx($b,{voices:b,value:y,stored:s,onValueChange:v}),s.length>0&&m.jsx(tm,{className:"hidden md:flex ml-2",stored:s,toDelete:g,onSubmit:R,toDeleteChange:x})]}),m.jsxs("div",{className:"items-end md:items-center flex",children:[m.jsx("div",{className:"flex h-9 items-center mr-3 justify-end",children:m.jsxs("p",{className:"text-[11px] sm:text-xs text-muted-foreground text-end",children:[(S==null?void 0:S.length)??0," / 3000"]})}),m.jsxs(_n,{className:"hidden sm:flex",disabled:!(y!=null&&y.key)||!(S!=null&&S.length)||p,onClick:_,children:[p&&m.jsx(Zp,{className:"mr-2"}),"Generate Speech",m.jsx(C2,{className:"h-4 w-4 ml-2"}),m.jsx(E2,{className:"h-4 w-4 ml-1"})]}),m.jsxs(_n,{className:"sm:hidden",disabled:!(y!=null&&y.key)||!(S!=null&&S.length)||p,onClick:_,size:"icon",children:[p&&m.jsx(Zp,{}),!p&&m.jsx(kC,{className:"h-4 w-4"})]})]})]})]}),m.jsx(qb,{title:f==null?void 0:f.title,progress:f==null?void 0:f.progress})]})}function KR(e){return Object.prototype.toString.call(e)==="[object Object]"}function nm(e){return KR(e)||Array.isArray(e)}function GR(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}function $d(e,t){const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;const o=JSON.stringify(Object.keys(e.breakpoints||{})),i=JSON.stringify(Object.keys(t.breakpoints||{}));return o!==i?!1:n.every(s=>{const l=e[s],a=t[s];return typeof l=="function"?`${l}`==`${a}`:!nm(l)||!nm(a)?l===a:$d(l,a)})}function rm(e){return e.concat().sort((t,n)=>t.name>n.name?1:-1).map(t=>t.options)}function YR(e,t){if(e.length!==t.length)return!1;const n=rm(e),r=rm(t);return n.every((o,i)=>{const s=r[i];return $d(o,s)})}function Fd(e){return typeof e=="number"}function jc(e){return typeof e=="string"}function zd(e){return typeof e=="boolean"}function om(e){return Object.prototype.toString.call(e)==="[object Object]"}function me(e){return Math.abs(e)}function Ud(e){return Math.sign(e)}function Po(e,t){return me(e-t)}function XR(e,t){if(e===0||t===0||me(e)<=me(t))return 0;const n=Po(me(e),me(t));return me(n/e)}function Zo(e){return qo(e).map(Number)}function St(e){return e[mi(e)]}function mi(e){return Math.max(0,e.length-1)}function Bd(e,t){return t===mi(e)}function im(e,t=0){return Array.from(Array(e),(n,r)=>t+r)}function qo(e){return Object.keys(e)}function qy(e,t){return[e,t].reduce((n,r)=>(qo(r).forEach(o=>{const i=n[o],s=r[o],l=om(i)&&om(s);n[o]=l?qy(i,s):s}),n),{})}function Lc(e,t){return typeof t.MouseEvent<"u"&&e instanceof t.MouseEvent}function QR(e,t){const n={start:r,center:o,end:i};function r(){return 0}function o(a){return i(a)/2}function i(a){return t-a}function s(a,u){return jc(e)?n[e](a):e(t,a,u)}return{measure:s}}function Jo(){let e=[];function t(o,i,s,l={passive:!0}){let a;if("addEventListener"in o)o.addEventListener(i,s,l),a=()=>o.removeEventListener(i,s,l);else{const u=o;u.addListener(s),a=()=>u.removeListener(s)}return e.push(a),r}function n(){e=e.filter(o=>o())}const r={add:t,clear:n};return r}function ZR(e,t,n){const r=Jo(),o=1e3/60;let i=null,s=0,l=0;function a(){r.add(e,"visibilitychange",()=>{e.hidden&&w()})}function u(){p(),r.clear()}function f(v){if(!s)return;i||(i=v);const S=v-i;for(i=v,l+=S;l>=o;)n(),l-=o;s&&t.requestAnimationFrame(f)}function d(){s||(s=t.requestAnimationFrame(f))}function p(){t.cancelAnimationFrame(s),i=null,l=0,s=0}function w(){i=null,l=0}return{init:a,destroy:u,start:d,stop:p,update:n}}function qR(e,t){const n=t==="rtl",r=e==="y",o=r?"y":"x",i=r?"x":"y",s=!r&&n?-1:1,l=f(),a=d();function u(y){const{height:v,width:S}=y;return r?v:S}function f(){return r?"top":n?"right":"left"}function d(){return r?"bottom":n?"left":"right"}function p(y){return y*s}return{scroll:o,cross:i,startEdge:l,endEdge:a,measureSize:u,direction:p}}function Jn(e=0,t=0){const n=me(e-t);function r(u){return ut}function i(u){return r(u)||o(u)}function s(u){return i(u)?r(u)?e:t:u}function l(u){return n?u-n*Math.ceil((u-t)/n):u}return{length:n,max:t,min:e,constrain:s,reachedAny:i,reachedMax:o,reachedMin:r,removeOffset:l}}function Jy(e,t,n){const{constrain:r}=Jn(0,e),o=e+1;let i=s(t);function s(p){return n?me((o+p)%o):r(p)}function l(){return i}function a(p){return i=s(p),d}function u(p){return f().set(l()+p)}function f(){return Jy(e,l(),n)}const d={get:l,set:a,add:u,clone:f};return d}function JR(e,t,n,r,o,i,s,l,a,u,f,d,p,w,y,v,S,h,g){const{cross:x,direction:C}=e,E=["INPUT","SELECT","TEXTAREA"],b={passive:!1},_=Jo(),R=Jo(),k=Jn(50,225).constrain(w.measure(20)),P={mouse:300,touch:400},D={mouse:500,touch:600},M=y?43:25;let X=!1,O=0,V=0,H=!1,I=!1,A=!1,T=!1;function L(Y){if(!g)return;function oe(ye){(zd(g)||g(Y,ye))&&G(ye)}const ge=t;_.add(ge,"dragstart",ye=>ye.preventDefault(),b).add(ge,"touchmove",()=>{},b).add(ge,"touchend",()=>{}).add(ge,"touchstart",oe).add(ge,"mousedown",oe).add(ge,"touchcancel",J).add(ge,"contextmenu",J).add(ge,"click",re,!0)}function W(){_.clear(),R.clear()}function N(){const Y=T?n:t;R.add(Y,"touchmove",Q,b).add(Y,"touchend",J).add(Y,"mousemove",Q,b).add(Y,"mouseup",J)}function $(Y){const oe=Y.nodeName||"";return E.includes(oe)}function K(){return(y?D:P)[T?"mouse":"touch"]}function z(Y,oe){const ge=d.add(Ud(Y)*-1),ye=f.byDistance(Y,!y).distance;return y||me(Y)=2,!(oe&&Y.button!==0)&&($(Y.target)||(H=!0,i.pointerDown(Y),u.useFriction(0).useDuration(0),o.set(s),N(),O=i.readPoint(Y),V=i.readPoint(Y,x),p.emit("pointerDown")))}function Q(Y){if(!Lc(Y,r)&&Y.touches.length>=2)return J(Y);const ge=i.readPoint(Y),ye=i.readPoint(Y,x),Ie=Po(ge,O),mt=Po(ye,V);if(!I&&!T&&(!Y.cancelable||(I=Ie>mt,!I)))return J(Y);const Lt=i.pointerMove(Y);Ie>v&&(A=!0),u.useFriction(.3).useDuration(.75),l.start(),o.add(C(Lt)),Y.preventDefault()}function J(Y){const ge=f.byDistance(0,!1).index!==d.get(),ye=i.pointerUp(Y)*K(),Ie=z(C(ye),ge),mt=XR(ye,Ie),Lt=M-10*mt,bt=h+mt/50;I=!1,H=!1,R.clear(),u.useDuration(Lt).useFriction(bt),a.distance(Ie,!y),T=!1,p.emit("pointerUp")}function re(Y){A&&(Y.stopPropagation(),Y.preventDefault(),A=!1)}function ee(){return H}return{init:L,destroy:W,pointerDown:ee}}function eP(e,t){let r,o;function i(d){return d.timeStamp}function s(d,p){const y=`client${(p||e.scroll)==="x"?"X":"Y"}`;return(Lc(d,t)?d:d.touches[0])[y]}function l(d){return r=d,o=d,s(d)}function a(d){const p=s(d)-s(o),w=i(d)-i(r)>170;return o=d,w&&(r=d),p}function u(d){if(!r||!o)return 0;const p=s(o)-s(r),w=i(d)-i(r),y=i(d)-i(o)>170,v=p/w;return w&&!y&&me(v)>.1?v:0}return{pointerDown:l,pointerMove:a,pointerUp:u,readPoint:s}}function tP(){function e(n){const{offsetTop:r,offsetLeft:o,offsetWidth:i,offsetHeight:s}=n;return{top:r,right:o+i,bottom:r+s,left:o,width:i,height:s}}return{measure:e}}function nP(e){function t(r){return e*(r/100)}return{measure:t}}function rP(e,t,n,r,o,i,s){let l,a,u=[],f=!1;function d(v){return o.measureSize(s.measure(v))}function p(v){if(!i)return;a=d(e),u=r.map(d);function S(g){for(const x of g){const C=x.target===e,E=r.indexOf(x.target),b=C?a:u[E],_=d(C?e:r[E]);if(me(_-b)>=.5){n.requestAnimationFrame(()=>{v.reInit(),t.emit("resize")});break}}}l=new ResizeObserver(g=>{f||(zd(i)||i(v,g))&&S(g)}),[e].concat(r).forEach(g=>l.observe(g))}function w(){l&&l.disconnect(),f=!0}return{init:p,destroy:w}}function oP(e,t,n,r){let o=0,i=0,s=n,l=r,a=e.get(),u=0;function f(){const C=t.get()-e.get(),E=!s;let b=0;return E?(o=0,e.set(t),b=C):(o+=C/s,o*=l,a+=o,e.add(o),b=a-u),i=Ud(b),u=a,x}function d(){const C=t.get()-e.get();return me(C)<.001}function p(){return s}function w(){return i}function y(){return o}function v(){return h(n)}function S(){return g(r)}function h(C){return s=C,x}function g(C){return l=C,x}const x={direction:w,duration:p,velocity:y,seek:f,settled:d,useBaseFriction:S,useBaseDuration:v,useFriction:g,useDuration:h};return x}function iP(e,t,n,r,o){const i=o.measure(10),s=o.measure(50),l=Jn(.1,.99);let a=!1;function u(){return!(a||!e.reachedAny(n.get())||!e.reachedAny(t.get()))}function f(w){if(!u())return;const y=e.reachedMin(t.get())?"min":"max",v=me(e[y]-t.get()),S=n.get()-t.get(),h=l.constrain(v/s);n.subtract(S*h),!w&&me(S){const{min:S,max:h}=i,g=i.constrain(y),x=!v,C=Bd(n,v);return x?h:C||u(S,g)?S:u(h,g)?h:g}).map(y=>parseFloat(y.toFixed(3)))}function p(){if(t<=e+o)return[i.max];if(r==="keepSnaps")return s;const{min:y,max:v}=l;return s.slice(y,v)}return{snapsContained:a,scrollContainLimit:l}}function lP(e,t,n){const r=t[0],o=n?r-e:St(t);return{limit:Jn(o,r)}}function aP(e,t,n,r){const i=t.min+.1,s=t.max+.1,{reachedMin:l,reachedMax:a}=Jn(i,s);function u(p){return p===1?a(n.get()):p===-1?l(n.get()):!1}function f(p){if(!u(p))return;const w=e*(p*-1);r.forEach(y=>y.add(w))}return{loop:f}}function cP(e){const{max:t,length:n}=e;function r(i){const s=i-t;return n?s/-n:0}return{get:r}}function uP(e,t,n,r,o){const{startEdge:i,endEdge:s}=e,{groupSlides:l}=o,a=d().map(t.measure),u=p(),f=w();function d(){return l(r).map(v=>St(v)[s]-v[0][i]).map(me)}function p(){return r.map(v=>n[i]-v[i]).map(v=>-me(v))}function w(){return l(u).map(v=>v[0]).map((v,S)=>v+a[S])}return{snaps:u,snapsAligned:f}}function dP(e,t,n,r,o,i){const{groupSlides:s}=o,{min:l,max:a}=r,u=f();function f(){const p=s(i),w=!e||t==="keepSnaps";return n.length===1?[i]:w?p:p.slice(l,a).map((y,v,S)=>{const h=!v,g=Bd(S,v);if(h){const x=St(S[0])+1;return im(x)}if(g){const x=mi(i)-St(S)[0]+1;return im(x,St(S)[0])}return y})}return{slideRegistry:u}}function fP(e,t,n,r,o){const{reachedAny:i,removeOffset:s,constrain:l}=r;function a(y){return y.concat().sort((v,S)=>me(v)-me(S))[0]}function u(y){const v=e?s(y):l(y),S=t.map((g,x)=>({diff:f(g-v,0),index:x})).sort((g,x)=>me(g.diff)-me(x.diff)),{index:h}=S[0];return{index:h,distance:v}}function f(y,v){const S=[y,y+n,y-n];if(!e)return y;if(!v)return a(S);const h=S.filter(g=>Ud(g)===v);return h.length?a(h):St(S)-n}function d(y,v){const S=t[y]-o.get(),h=f(S,v);return{index:y,distance:h}}function p(y,v){const S=o.get()+y,{index:h,distance:g}=u(S),x=!e&&i(S);if(!v||x)return{index:h,distance:y};const C=t[h]-g,E=y+f(C,0);return{index:h,distance:E}}return{byDistance:p,byIndex:d,shortcut:f}}function pP(e,t,n,r,o,i){function s(f){const d=f.distance,p=f.index!==t.get();o.add(d),d&&e.start(),p&&(n.set(t.get()),t.set(f.index),i.emit("select"))}function l(f,d){const p=r.byDistance(f,d);s(p)}function a(f,d){const p=t.clone().set(f),w=r.byIndex(p.get(),d);s(w)}return{distance:l,index:a}}function mP(e,t,n,r,o,i,s){let l=0;function a(){i.add(document,"keydown",u,!1),t.forEach(f)}function u(p){p.code==="Tab"&&(l=new Date().getTime())}function f(p){const w=()=>{if(new Date().getTime()-l>10)return;e.scrollLeft=0;const S=t.indexOf(p),h=n.findIndex(g=>g.includes(S));Fd(h)&&(o.useDuration(0),r.index(h,0),s.emit("slideFocus"))};i.add(p,"focus",w,{passive:!0,capture:!0})}return{init:a}}function Ic(e){let t=e;function n(){return t}function r(a){t=s(a)}function o(a){t+=s(a)}function i(a){t-=s(a)}function s(a){return Fd(a)?a:a.get()}return{get:n,set:r,add:o,subtract:i}}function ew(e,t){const n=e.scroll==="x"?i:s,r=t.style;let o=!1;function i(d){return`translate3d(${d}px,0px,0px)`}function s(d){return`translate3d(0px,${d}px,0px)`}function l(d){o||(r.transform=n(e.direction(d)))}function a(d){o=!d}function u(){o||(r.transform="",t.getAttribute("style")||t.removeAttribute("style"))}return{clear:u,to:l,toggleActive:a}}function hP(e,t,n,r,o,i,s,l,a){const f=Zo(o),d=Zo(o).reverse(),p=h().concat(g());function w(_,R){return _.reduce((k,P)=>k-o[P],R)}function y(_,R){return _.reduce((k,P)=>w(k,R)>0?k.concat([P]):k,[])}function v(_){return i.map((R,k)=>({start:R-r[k]+.5+_,end:R+t-.5+_}))}function S(_,R,k){const P=v(R);return _.map(D=>{const M=k?0:-n,X=k?n:0,O=k?"end":"start",V=P[D][O];return{index:D,loopPoint:V,slideLocation:Ic(-1),translate:ew(e,a[D]),target:()=>l.get()>V?M:X}})}function h(){const _=s[0],R=y(d,_);return S(R,n,!1)}function g(){const _=t-s[0]-1,R=y(f,_);return S(R,-n,!0)}function x(){return p.every(({index:_})=>{const R=f.filter(k=>k!==_);return w(R,t)<=.1})}function C(){p.forEach(_=>{const{target:R,translate:k,slideLocation:P}=_,D=R();D!==P.get()&&(k.to(D),P.set(D))})}function E(){p.forEach(_=>_.translate.clear())}return{canLoop:x,clear:E,loop:C,loopPoints:p}}function vP(e,t,n){let r,o=!1;function i(a){if(!n)return;function u(f){for(const d of f)if(d.type==="childList"){a.reInit(),t.emit("slidesChanged");break}}r=new MutationObserver(f=>{o||(zd(n)||n(a,f))&&u(f)}),r.observe(e,{childList:!0})}function s(){r&&r.disconnect(),o=!0}return{init:i,destroy:s}}function gP(e,t,n,r){const o={};let i=null,s=null,l,a=!1;function u(){l=new IntersectionObserver(y=>{a||(y.forEach(v=>{const S=t.indexOf(v.target);o[S]=v}),i=null,s=null,n.emit("slidesInView"))},{root:e.parentElement,threshold:r}),t.forEach(y=>l.observe(y))}function f(){l&&l.disconnect(),a=!0}function d(y){return qo(o).reduce((v,S)=>{const h=parseInt(S),{isIntersecting:g}=o[h];return(y&&g||!y&&!g)&&v.push(h),v},[])}function p(y=!0){if(y&&i)return i;if(!y&&s)return s;const v=d(y);return y&&(i=v),y||(s=v),v}return{init:u,destroy:f,get:p}}function yP(e,t,n,r,o,i){const{measureSize:s,startEdge:l,endEdge:a}=e,u=n[0]&&o,f=y(),d=v(),p=n.map(s),w=S();function y(){if(!u)return 0;const g=n[0];return me(t[l]-g[l])}function v(){if(!u)return 0;const g=i.getComputedStyle(St(r));return parseFloat(g.getPropertyValue(`margin-${a}`))}function S(){return n.map((g,x,C)=>{const E=!x,b=Bd(C,x);return E?p[x]+f:b?p[x]+d:C[x+1][l]-g[l]}).map(me)}return{slideSizes:p,slideSizesWithGaps:w,startGap:f,endGap:d}}function wP(e,t,n,r,o,i,s,l,a){const{startEdge:u,endEdge:f,direction:d}=e,p=Fd(n);function w(h,g){return Zo(h).filter(x=>x%g===0).map(x=>h.slice(x,x+g))}function y(h){return h.length?Zo(h).reduce((g,x,C)=>{const E=St(g)||0,b=E===0,_=x===mi(h),R=o[u]-i[E][u],k=o[u]-i[x][f],P=!r&&b?d(s):0,D=!r&&_?d(l):0,M=me(k-D-(R+P));return C&&M>t+a&&g.push(x),_&&g.push(h.length),g},[]).map((g,x,C)=>{const E=Math.max(C[x-1]||0);return h.slice(E,g)}):[]}function v(h){return p?w(h,n):y(h)}return{groupSlides:v}}function xP(e,t,n,r,o,i,s){const{align:l,axis:a,direction:u,startIndex:f,loop:d,duration:p,dragFree:w,dragThreshold:y,inViewThreshold:v,slidesToScroll:S,skipSnaps:h,containScroll:g,watchResize:x,watchSlides:C,watchDrag:E}=i,b=2,_=tP(),R=_.measure(t),k=n.map(_.measure),P=qR(a,u),D=P.measureSize(R),M=nP(D),X=QR(l,D),O=!d&&!!g,V=d||!!g,{slideSizes:H,slideSizesWithGaps:I,startGap:A,endGap:T}=yP(P,R,k,n,V,o),L=wP(P,D,S,d,R,k,A,T,b),{snaps:W,snapsAligned:N}=uP(P,X,R,k,L),$=-St(W)+St(I),{snapsContained:K,scrollContainLimit:z}=sP(D,$,N,g,b),G=O?K:N,{limit:Q}=lP($,G,d),J=Jy(mi(G),f,d),re=J.clone(),ee=Zo(n),ae=({dragHandler:Xd,eventHandler:Qd,scrollBody:Pl,scrollBounds:Zd,scrollLooper:Nw,slideLooper:Tw,translate:Aw,location:Dw,animation:Mw,options:{loop:kl}})=>{kl||Zd.constrain(Xd.pointerDown()),Pl.seek();const qd=Pl.settled(),Ow=!Zd.shouldConstrain(),Jd=kl?qd:qd&&Ow;Jd&&!Xd.pointerDown()&&(Mw.stop(),Qd.emit("settle")),Jd||Qd.emit("scroll"),kl&&(Nw.loop(Pl.direction()),Tw.loop()),Aw.to(Dw.get())},Y=ZR(r,o,()=>ae(Yd)),oe=.68,ge=G[J.get()],ye=Ic(ge),Ie=Ic(ge),mt=oP(ye,Ie,p,oe),Lt=fP(d,G,$,Q,Ie),bt=pP(Y,J,re,Lt,Ie,s),Wd=cP(Q),Kd=Jo(),Pw=gP(t,n,s,v),{slideRegistry:Gd}=dP(O,g,G,z,L,ee),kw=mP(e,n,Gd,bt,mt,Kd,s),Yd={ownerDocument:r,ownerWindow:o,eventHandler:s,containerRect:R,slideRects:k,animation:Y,axis:P,dragHandler:JR(P,e,r,o,Ie,eP(P,o),ye,Y,bt,mt,Lt,J,s,M,w,y,h,oe,E),eventStore:Kd,percentOfView:M,index:J,indexPrevious:re,limit:Q,location:ye,options:i,resizeHandler:rP(t,s,o,n,P,x,_),scrollBody:mt,scrollBounds:iP(Q,ye,Ie,mt,M),scrollLooper:aP($,Q,ye,[ye,Ie]),scrollProgress:Wd,scrollSnapList:G.map(Wd.get),scrollSnaps:G,scrollTarget:Lt,scrollTo:bt,slideLooper:hP(P,D,$,H,I,W,G,ye,n),slideFocus:kw,slidesHandler:vP(t,s,C),slidesInView:Pw,slideIndexes:ee,slideRegistry:Gd,slidesToScroll:L,target:Ie,translate:ew(P,t)};return Yd}function SP(){let e={},t;function n(u){t=u}function r(u){return e[u]||[]}function o(u){return r(u).forEach(f=>f(t,u)),a}function i(u,f){return e[u]=r(u).concat([f]),a}function s(u,f){return e[u]=r(u).filter(d=>d!==f),a}function l(){e={}}const a={init:n,emit:o,off:s,on:i,clear:l};return a}const CP={align:"center",axis:"x",container:null,slides:null,containScroll:"trimSnaps",direction:"ltr",slidesToScroll:1,inViewThreshold:0,breakpoints:{},dragFree:!1,dragThreshold:10,loop:!1,skipSnaps:!1,duration:25,startIndex:0,active:!0,watchDrag:!0,watchResize:!0,watchSlides:!0};function EP(e){function t(i,s){return qy(i,s||{})}function n(i){const s=i.breakpoints||{},l=qo(s).filter(a=>e.matchMedia(a).matches).map(a=>s[a]).reduce((a,u)=>t(a,u),{});return t(i,l)}function r(i){return i.map(s=>qo(s.breakpoints||{})).reduce((s,l)=>s.concat(l),[]).map(e.matchMedia)}return{mergeOptions:t,optionsAtMedia:n,optionsMediaQueries:r}}function _P(e){let t=[];function n(i,s){return t=s.filter(({options:l})=>e.optionsAtMedia(l).active!==!1),t.forEach(l=>l.init(i,e)),s.reduce((l,a)=>Object.assign(l,{[a.name]:a}),{})}function r(){t=t.filter(i=>i.destroy())}return{init:n,destroy:r}}function Fs(e,t,n){const r=e.ownerDocument,o=r.defaultView,i=EP(o),s=_P(i),l=Jo(),a=SP(),{mergeOptions:u,optionsAtMedia:f,optionsMediaQueries:d}=i,{on:p,off:w,emit:y}=a,v=D;let S=!1,h,g=u(CP,Fs.globalOptions),x=u(g),C=[],E,b,_;function R(){const{container:ae,slides:Y}=x;b=(jc(ae)?e.querySelector(ae):ae)||e.children[0];const ge=jc(Y)?b.querySelectorAll(Y):Y;_=[].slice.call(ge||b.children)}function k(ae){const Y=xP(e,b,_,r,o,ae,a);if(ae.loop&&!Y.slideLooper.canLoop()){const oe=Object.assign({},ae,{loop:!1});return k(oe)}return Y}function P(ae,Y){S||(g=u(g,ae),x=f(g),C=Y||C,R(),h=k(x),d([g,...C.map(({options:oe})=>oe)]).forEach(oe=>l.add(oe,"change",D)),x.active&&(h.translate.to(h.location.get()),h.animation.init(),h.slidesInView.init(),h.slideFocus.init(),h.eventHandler.init(ee),h.resizeHandler.init(ee),h.slidesHandler.init(ee),h.options.loop&&h.slideLooper.loop(),b.offsetParent&&_.length&&h.dragHandler.init(ee),E=s.init(ee,C)))}function D(ae,Y){const oe=W();M(),P(u({startIndex:oe},ae),Y),a.emit("reInit")}function M(){h.dragHandler.destroy(),h.eventStore.clear(),h.translate.clear(),h.slideLooper.clear(),h.resizeHandler.destroy(),h.slidesHandler.destroy(),h.slidesInView.destroy(),h.animation.destroy(),s.destroy(),l.clear()}function X(){S||(S=!0,l.clear(),M(),a.emit("destroy"),a.clear())}function O(ae,Y,oe){!x.active||S||(h.scrollBody.useBaseFriction().useDuration(Y===!0?0:x.duration),h.scrollTo.index(ae,oe||0))}function V(ae){const Y=h.index.add(1).get();O(Y,ae,-1)}function H(ae){const Y=h.index.add(-1).get();O(Y,ae,1)}function I(){return h.index.add(1).get()!==W()}function A(){return h.index.add(-1).get()!==W()}function T(){return h.scrollSnapList}function L(){return h.scrollProgress.get(h.location.get())}function W(){return h.index.get()}function N(){return h.indexPrevious.get()}function $(){return h.slidesInView.get()}function K(){return h.slidesInView.get(!1)}function z(){return E}function G(){return h}function Q(){return e}function J(){return b}function re(){return _}const ee={canScrollNext:I,canScrollPrev:A,containerNode:J,internalEngine:G,destroy:X,off:w,on:p,emit:y,plugins:z,previousScrollSnap:N,reInit:v,rootNode:Q,scrollNext:V,scrollPrev:H,scrollProgress:L,scrollSnapList:T,scrollTo:O,selectedScrollSnap:W,slideNodes:re,slidesInView:$,slidesNotInView:K};return P(t,n),setTimeout(()=>a.emit("init"),0),ee}Fs.globalOptions=void 0;function Vd(e={},t=[]){const n=c.useRef(e),r=c.useRef(t),[o,i]=c.useState(),[s,l]=c.useState(),a=c.useCallback(()=>{o&&o.reInit(n.current,r.current)},[o]);return c.useEffect(()=>{if(GR()&&s){Fs.globalOptions=Vd.globalOptions;const u=Fs(s,n.current,r.current);return i(u),()=>u.destroy()}else i(void 0)},[s,i]),c.useEffect(()=>{$d(n.current,e)||(n.current=e,a())},[e,a]),c.useEffect(()=>{YR(r.current,t)||(r.current=t,a())},[t,a]),[l,o]}Vd.globalOptions=void 0;const tw=c.createContext(null);function _l(){const e=c.useContext(tw);if(!e)throw new Error("useCarousel must be used within a ");return e}const nw=c.forwardRef(({orientation:e="horizontal",opts:t,setApi:n,plugins:r,className:o,children:i,...s},l)=>{const[a,u]=Vd({...t,axis:e==="horizontal"?"x":"y"},r),[f,d]=c.useState(!1),[p,w]=c.useState(!1),y=c.useCallback(g=>{g&&(d(g.canScrollPrev()),w(g.canScrollNext()))},[]),v=c.useCallback(()=>{u==null||u.scrollPrev()},[u]),S=c.useCallback(()=>{u==null||u.scrollNext()},[u]),h=c.useCallback(g=>{g.key==="ArrowLeft"?(g.preventDefault(),v()):g.key==="ArrowRight"&&(g.preventDefault(),S())},[v,S]);return c.useEffect(()=>{!u||!n||n(u)},[u,n]),c.useEffect(()=>{if(u)return y(u),u.on("reInit",y),u.on("select",y),()=>{u==null||u.off("select",y)}},[u,y]),m.jsx(tw.Provider,{value:{carouselRef:a,api:u,opts:t,orientation:e||((t==null?void 0:t.axis)==="y"?"vertical":"horizontal"),scrollPrev:v,scrollNext:S,canScrollPrev:f,canScrollNext:p},children:m.jsx("div",{ref:l,onKeyDownCapture:h,className:U("relative",o),role:"region","aria-roledescription":"carousel",...s,children:i})})});nw.displayName="Carousel";const rw=c.forwardRef(({className:e,...t},n)=>{const{carouselRef:r,orientation:o}=_l();return m.jsx("div",{ref:r,className:"overflow-hidden",children:m.jsx("div",{ref:n,className:U("flex",o==="horizontal"?"-ml-4":"-mt-4 flex-col",e),...t})})});rw.displayName="CarouselContent";const ow=c.forwardRef(({className:e,...t},n)=>{const{orientation:r}=_l();return m.jsx("div",{ref:n,role:"group","aria-roledescription":"slide",className:U("min-w-0 shrink-0 grow-0 basis-full",r==="horizontal"?"pl-4":"pt-4",e),...t})});ow.displayName="CarouselItem";const iw=c.forwardRef(({className:e,variant:t="outline",size:n="icon",...r},o)=>{const{orientation:i,scrollPrev:s,canScrollPrev:l}=_l();return m.jsxs(_n,{ref:o,variant:t,size:n,className:U("absolute h-8 w-8 rounded-full",i==="horizontal"?"-left-12 top-1/2 -translate-y-1/2":"-top-12 left-1/2 -translate-x-1/2 rotate-90",e),disabled:!l,onClick:s,...r,children:[m.jsx(uC,{className:"h-4 w-4"}),m.jsx("span",{className:"sr-only",children:"Previous slide"})]})});iw.displayName="CarouselPrevious";const sw=c.forwardRef(({className:e,variant:t="outline",size:n="icon",...r},o)=>{const{orientation:i,scrollNext:s,canScrollNext:l}=_l();return m.jsxs(_n,{ref:o,variant:t,size:n,className:U("absolute h-8 w-8 rounded-full",i==="horizontal"?"-right-12 top-1/2 -translate-y-1/2":"-bottom-12 left-1/2 -translate-x-1/2 rotate-90",e),disabled:!l,onClick:s,...r,children:[m.jsx(Cv,{className:"h-4 w-4"}),m.jsx("span",{className:"sr-only",children:"Next slide"})]})});sw.displayName="CarouselNext";const lw=c.forwardRef(({className:e,...t},n)=>m.jsx("div",{ref:n,className:U("rounded-xl border bg-card text-card-foreground shadow",e),...t}));lw.displayName="Card";const bP=c.forwardRef(({className:e,...t},n)=>m.jsx("div",{ref:n,className:U("flex flex-col space-y-1.5 p-6",e),...t}));bP.displayName="CardHeader";const RP=c.forwardRef(({className:e,...t},n)=>m.jsx("h3",{ref:n,className:U("font-semibold leading-none tracking-tight",e),...t}));RP.displayName="CardTitle";const PP=c.forwardRef(({className:e,...t},n)=>m.jsx("p",{ref:n,className:U("text-sm text-muted-foreground",e),...t}));PP.displayName="CardDescription";const aw=c.forwardRef(({className:e,...t},n)=>m.jsx("div",{ref:n,className:U("p-6 pt-0",e),...t}));aw.displayName="CardContent";const kP=c.forwardRef(({className:e,...t},n)=>m.jsx("div",{ref:n,className:U("flex items-center p-6 pt-0",e),...t}));kP.displayName="CardFooter";var cw=["PageUp","PageDown"],uw=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],dw={"from-left":["Home","PageDown","ArrowDown","ArrowLeft"],"from-right":["Home","PageDown","ArrowDown","ArrowRight"],"from-bottom":["Home","PageDown","ArrowDown","ArrowLeft"],"from-top":["Home","PageDown","ArrowUp","ArrowLeft"]},Zr="Slider",[$c,NP,TP]=ol(Zr),[fw,sk]=ot(Zr,[TP]),[AP,bl]=fw(Zr),pw=c.forwardRef((e,t)=>{const{name:n,min:r=0,max:o=100,step:i=1,orientation:s="horizontal",disabled:l=!1,minStepsBetweenThumbs:a=0,defaultValue:u=[r],value:f,onValueChange:d=()=>{},onValueCommit:p=()=>{},inverted:w=!1,...y}=e,v=c.useRef(new Set),S=c.useRef(0),g=s==="horizontal"?DP:MP,[x=[],C]=nr({prop:f,defaultProp:u,onChange:P=>{var M;(M=[...v.current][S.current])==null||M.focus(),d(P)}}),E=c.useRef(x);function b(P){const D=$P(x,P);k(P,D)}function _(P){k(P,S.current)}function R(){const P=E.current[S.current];x[S.current]!==P&&p(x)}function k(P,D,{commit:M}={commit:!1}){const X=BP(i),O=VP(Math.round((P-r)/i)*i+r,X),V=Sd(O,[r,o]);C((H=[])=>{const I=LP(H,V,D);if(UP(I,a*i)){S.current=I.indexOf(V);const A=String(I)!==String(H);return A&&M&&p(I),A?I:H}else return H})}return m.jsx(AP,{scope:e.__scopeSlider,name:n,disabled:l,min:r,max:o,valueIndexToChangeRef:S,thumbs:v.current,values:x,orientation:s,children:m.jsx($c.Provider,{scope:e.__scopeSlider,children:m.jsx($c.Slot,{scope:e.__scopeSlider,children:m.jsx(g,{"aria-disabled":l,"data-disabled":l?"":void 0,...y,ref:t,onPointerDown:F(y.onPointerDown,()=>{l||(E.current=x)}),min:r,max:o,inverted:w,onSlideStart:l?void 0:b,onSlideMove:l?void 0:_,onSlideEnd:l?void 0:R,onHomeKeyDown:()=>!l&&k(r,0,{commit:!0}),onEndKeyDown:()=>!l&&k(o,x.length-1,{commit:!0}),onStepKeyDown:({event:P,direction:D})=>{if(!l){const O=cw.includes(P.key)||P.shiftKey&&uw.includes(P.key)?10:1,V=S.current,H=x[V],I=i*O*D;k(H+I,V,{commit:!0})}}})})})})});pw.displayName=Zr;var[mw,hw]=fw(Zr,{startEdge:"left",endEdge:"right",size:"width",direction:1}),DP=c.forwardRef((e,t)=>{const{min:n,max:r,dir:o,inverted:i,onSlideStart:s,onSlideMove:l,onSlideEnd:a,onStepKeyDown:u,...f}=e,[d,p]=c.useState(null),w=ne(t,x=>p(x)),y=c.useRef(),v=yl(o),S=v==="ltr",h=S&&!i||!S&&i;function g(x){const C=y.current||d.getBoundingClientRect(),E=[0,C.width],_=Hd(E,h?[n,r]:[r,n]);return y.current=C,_(x-C.left)}return m.jsx(mw,{scope:e.__scopeSlider,startEdge:h?"left":"right",endEdge:h?"right":"left",direction:h?1:-1,size:"width",children:m.jsx(vw,{dir:v,"data-orientation":"horizontal",...f,ref:w,style:{...f.style,"--radix-slider-thumb-transform":"translateX(-50%)"},onSlideStart:x=>{const C=g(x.clientX);s==null||s(C)},onSlideMove:x=>{const C=g(x.clientX);l==null||l(C)},onSlideEnd:()=>{y.current=void 0,a==null||a()},onStepKeyDown:x=>{const E=dw[h?"from-left":"from-right"].includes(x.key);u==null||u({event:x,direction:E?-1:1})}})})}),MP=c.forwardRef((e,t)=>{const{min:n,max:r,inverted:o,onSlideStart:i,onSlideMove:s,onSlideEnd:l,onStepKeyDown:a,...u}=e,f=c.useRef(null),d=ne(t,f),p=c.useRef(),w=!o;function y(v){const S=p.current||f.current.getBoundingClientRect(),h=[0,S.height],x=Hd(h,w?[r,n]:[n,r]);return p.current=S,x(v-S.top)}return m.jsx(mw,{scope:e.__scopeSlider,startEdge:w?"bottom":"top",endEdge:w?"top":"bottom",size:"height",direction:w?1:-1,children:m.jsx(vw,{"data-orientation":"vertical",...u,ref:d,style:{...u.style,"--radix-slider-thumb-transform":"translateY(50%)"},onSlideStart:v=>{const S=y(v.clientY);i==null||i(S)},onSlideMove:v=>{const S=y(v.clientY);s==null||s(S)},onSlideEnd:()=>{p.current=void 0,l==null||l()},onStepKeyDown:v=>{const h=dw[w?"from-bottom":"from-top"].includes(v.key);a==null||a({event:v,direction:h?-1:1})}})})}),vw=c.forwardRef((e,t)=>{const{__scopeSlider:n,onSlideStart:r,onSlideMove:o,onSlideEnd:i,onHomeKeyDown:s,onEndKeyDown:l,onStepKeyDown:a,...u}=e,f=bl(Zr,n);return m.jsx(Z.span,{...u,ref:t,onKeyDown:F(e.onKeyDown,d=>{d.key==="Home"?(s(d),d.preventDefault()):d.key==="End"?(l(d),d.preventDefault()):cw.concat(uw).includes(d.key)&&(a(d),d.preventDefault())}),onPointerDown:F(e.onPointerDown,d=>{const p=d.target;p.setPointerCapture(d.pointerId),d.preventDefault(),f.thumbs.has(p)?p.focus():r(d)}),onPointerMove:F(e.onPointerMove,d=>{d.target.hasPointerCapture(d.pointerId)&&o(d)}),onPointerUp:F(e.onPointerUp,d=>{const p=d.target;p.hasPointerCapture(d.pointerId)&&(p.releasePointerCapture(d.pointerId),i(d))})})}),gw="SliderTrack",yw=c.forwardRef((e,t)=>{const{__scopeSlider:n,...r}=e,o=bl(gw,n);return m.jsx(Z.span,{"data-disabled":o.disabled?"":void 0,"data-orientation":o.orientation,...r,ref:t})});yw.displayName=gw;var Fc="SliderRange",ww=c.forwardRef((e,t)=>{const{__scopeSlider:n,...r}=e,o=bl(Fc,n),i=hw(Fc,n),s=c.useRef(null),l=ne(t,s),a=o.values.length,u=o.values.map(p=>Sw(p,o.min,o.max)),f=a>1?Math.min(...u):0,d=100-Math.max(...u);return m.jsx(Z.span,{"data-orientation":o.orientation,"data-disabled":o.disabled?"":void 0,...r,ref:l,style:{...e.style,[i.startEdge]:f+"%",[i.endEdge]:d+"%"}})});ww.displayName=Fc;var zc="SliderThumb",xw=c.forwardRef((e,t)=>{const n=NP(e.__scopeSlider),[r,o]=c.useState(null),i=ne(t,l=>o(l)),s=c.useMemo(()=>r?n().findIndex(l=>l.ref.current===r):-1,[n,r]);return m.jsx(OP,{...e,ref:i,index:s})}),OP=c.forwardRef((e,t)=>{const{__scopeSlider:n,index:r,name:o,...i}=e,s=bl(zc,n),l=hw(zc,n),[a,u]=c.useState(null),f=ne(t,g=>u(g)),d=a?!!a.closest("form"):!0,p=md(a),w=s.values[r],y=w===void 0?0:Sw(w,s.min,s.max),v=IP(r,s.values.length),S=p==null?void 0:p[l.size],h=S?FP(S,y,l.direction):0;return c.useEffect(()=>{if(a)return s.thumbs.add(a),()=>{s.thumbs.delete(a)}},[a,s.thumbs]),m.jsxs("span",{style:{transform:"var(--radix-slider-thumb-transform)",position:"absolute",[l.startEdge]:`calc(${y}% + ${h}px)`},children:[m.jsx($c.ItemSlot,{scope:e.__scopeSlider,children:m.jsx(Z.span,{role:"slider","aria-label":e["aria-label"]||v,"aria-valuemin":s.min,"aria-valuenow":w,"aria-valuemax":s.max,"aria-orientation":s.orientation,"data-orientation":s.orientation,"data-disabled":s.disabled?"":void 0,tabIndex:s.disabled?void 0:0,...i,ref:f,style:w===void 0?{display:"none"}:e.style,onFocus:F(e.onFocus,()=>{s.valueIndexToChangeRef.current=r})})}),d&&m.jsx(jP,{name:o??(s.name?s.name+(s.values.length>1?"[]":""):void 0),value:w},r)]})});xw.displayName=zc;var jP=e=>{const{value:t,...n}=e,r=c.useRef(null),o=Wy(t);return c.useEffect(()=>{const i=r.current,s=window.HTMLInputElement.prototype,a=Object.getOwnPropertyDescriptor(s,"value").set;if(o!==t&&a){const u=new Event("input",{bubbles:!0});a.call(i,t),i.dispatchEvent(u)}},[o,t]),m.jsx("input",{style:{display:"none"},...n,ref:r,defaultValue:t})};function LP(e=[],t,n){const r=[...e];return r[n]=t,r.sort((o,i)=>o-i)}function Sw(e,t,n){const i=100/(n-t)*(e-t);return Sd(i,[0,100])}function IP(e,t){return t>2?`Value ${e+1} of ${t}`:t===2?["Minimum","Maximum"][e]:void 0}function $P(e,t){if(e.length===1)return 0;const n=e.map(o=>Math.abs(o-t)),r=Math.min(...n);return n.indexOf(r)}function FP(e,t,n){const r=e/2,i=Hd([0,50],[0,r]);return(r-i(t)*n)*n}function zP(e){return e.slice(0,-1).map((t,n)=>e[n+1]-t)}function UP(e,t){if(t>0){const n=zP(e);return Math.min(...n)>=t}return!0}function Hd(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])}}function BP(e){return(String(e).split(".")[1]||"").length}function VP(e,t){const n=Math.pow(10,t);return Math.round(e*n)/n}var Rl=pw,Cw=yw,Ew=ww,_w=xw;const bw=c.forwardRef(({className:e,...t},n)=>m.jsxs(Rl,{ref:n,className:U("relative flex w-full touch-none select-none items-center",e),...t,children:[m.jsx(Cw,{className:"relative h-1.5 w-full grow overflow-hidden rounded-full bg-primary/20",children:m.jsx(Ew,{className:"absolute h-full bg-primary"})}),m.jsx(_w,{className:"block h-4 w-4 rounded-full border border-primary/50 bg-background shadow transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50"})]}));bw.displayName=Rl.displayName;const Rw=c.forwardRef(({className:e,...t},n)=>m.jsxs(Rl,{ref:n,className:U("relative flex w-full touch-none select-none items-center",e),...t,children:[m.jsx(Cw,{className:"relative h-1 w-full grow overflow-hidden rounded-full bg-primary/20",children:m.jsx(Ew,{className:"absolute h-full bg-primary"})}),m.jsx(_w,{className:"block h-3.5 w-3.5 rounded-full border border-primary/50 bg-background shadow transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50"})]}));Rw.displayName=Rl.displayName;function sm(e){try{return new Date(e*1e3).toISOString().slice(14,19)}catch{return new Date(0).toISOString().slice(14,19)}}function HP(e){const t=c.useRef(new Audio),[n,r]=c.useState(!1),[o,i]=c.useState(!1),[s,l]=c.useState(0),[a,u]=c.useState(0),[f,d]=c.useState(t.current.volume),[p,w]=c.useState(!1);c.useEffect(()=>{t.current.duration||(t.current.src=URL.createObjectURL(e.file),t.current.onloadedmetadata=()=>{u(t.current.duration)},t.current.onplay=()=>{r(!0)},t.current.onpause=()=>{r(!1),t.current.currentTime>=t.current.duration&&(t.current.currentTime=0)},t.current.ontimeupdate=()=>{l(t.current.currentTime)},t.current.play())},[]),c.useEffect(()=>{t.current.loop=o},[o]),c.useEffect(()=>{t.current.volume=f},[f]),c.useEffect(()=>{t.current.muted=p},[p]);const y=c.useMemo(()=>s/(a!=0?a:1),[s]);return m.jsx(lw,{children:m.jsxs(aw,{className:"flex h-28 flex-col justify-between p-3 sm:p-5",children:[m.jsxs("div",{className:"w-full flex items-center",children:[m.jsx("span",{className:"text-sm font-medium w-[70px]",children:sm(y)}),m.jsx(bw,{value:[Math.round(y*100)],onValueChange:v=>{a!=0&&(t.current.currentTime=v[0]/100*a)}}),m.jsx("span",{className:"text-sm font-medium w-[70px] text-end",children:sm(a)})]}),m.jsxs("div",{className:"w-full grid grid-cols-2 gap-y-4 sm:grid-cols-3 items-center",children:[m.jsxs("div",{className:"flex gap-4 col-start-2 row-start-2 sm:col-start-1 sm:row-start-1 justify-end sm:justify-start",children:[m.jsx("button",{onClick:()=>i(!o),"data-loop":o,className:"data-[loop=true]:text-primary text-zinc-400",children:m.jsx(_C,{className:"h-4 w-4"})}),m.jsx("button",{onClick:()=>WP(e.file),className:"text-primary",children:m.jsx(CC,{className:"h-4 w-4"})})]}),m.jsxs("div",{className:"flex items-center gap-3 sm:gap-4 sm:justify-center",children:[m.jsx("button",{onClick:()=>{t.current.pause(),t.current.currentTime=0},children:m.jsx(LC,{className:"h-5 w-5 sm:h-6 sm:w-6"})}),m.jsxs("button",{onClick:()=>{n?t.current.pause():t.current.play()},children:[!n&&m.jsx(ug,{className:"h-5 w-5 sm:h-6 sm:w-6"}),n&&m.jsx(cg,{className:"h-5 w-5 sm:h-6 sm:w-6"})]}),m.jsx("button",{onClick:()=>{t.current.pause(),t.current.currentTime=a},children:m.jsx(OC,{className:"h-5 w-5 sm:h-6 sm:w-6"})})]}),m.jsxs("div",{className:"flex items-center gap-3 justify-end",children:[m.jsxs("button",{onClick:()=>w(!p),children:[!p&&m.jsx(TC,{className:"h-4 w-4"}),p&&m.jsx(DC,{className:"h-4 w-4"})]}),m.jsx(Rw,{className:"w-24",value:[Math.round(f*100)],onValueChange:v=>d(v[0]/100)})]})]})]})})}function WP(e){const t=document.createElement("a");document.head.appendChild(t),t.download=e.name,t.href=URL.createObjectURL(e),t.click(),t.remove()}function KP({files:e,...t}){return e.length?m.jsxs(nw,{...t,children:[m.jsx(rw,{children:e.map(n=>m.jsx(ow,{children:m.jsx("div",{className:"p-1",children:m.jsx(HP,{file:n})})},n.name))}),m.jsx(iw,{}),m.jsx(sw,{})]}):null}const GP="/assets/logo-DzVvHBFv.svg";function YP(e){return m.jsxs("section",{...e,className:U("mx-auto grid grid-cols-1 sm:grid-cols-3 lg:grid-cols-[2fr_3fr_2fr] gap-2 sm:gap-4 w-full items-center relative",e.className),children:[m.jsxs("div",{className:"flex flex-1 items-center",children:[m.jsx("img",{src:GP,className:"h-6 w-6"}),m.jsx("span",{className:"underline-offset-4 group-hover:underline ml-3 text-sm font-medium sm:font-normal sm:text-xs lg:text-sm",children:"Developed by Diffusion Studio"})]}),m.jsx("div",{className:"flex sm:justify-center sm:items-center mt-2 sm:mt-0",children:m.jsxs("p",{className:"w-full sm:text-center text-xs text-muted-foreground",children:["All available models were trained and open-sourced by"," ",m.jsx("a",{className:"underline-offset-2 underline text-primary",href:"https://github.com/rhasspy/piper",target:"_blank",children:"rhasspy / piper"})]})}),m.jsx("div",{className:"flex flex-1 sm:justify-end",children:m.jsx("a",{className:"underline-offset-4 hover:underline text-xs lg:text-sm",href:"https://diffusion.studio",target:"_blank",children:"www.diffusion.studio"})})]})}const XP=["#4C3F91","#9145B6","#FF5677","#B958A5","#FF5677"];function QP(){const[e,t]=c.useState([]);return m.jsxs("div",{className:"h-full w-full relative overflow-hidden",children:[m.jsx(g2,{className:"absolute inset-0 -z-10",backgroundFill:"#FFF",colors:XP}),m.jsx("div",{className:"absolute inset-0 overflow-hidden",children:m.jsxs("div",{className:"w-full container flex flex-col h-full",children:[m.jsx(y2,{className:"md:py-8 lg:py-10"}),m.jsxs("div",{className:"flex flex-col flex-1 items-center mt-2 sm:mt-3 h-full w-full",children:[m.jsx(WR,{className:"w-full max-w-[700px] h-[60%]",onFileCreated:n=>t([n,...e])}),m.jsx(KP,{files:e,className:"w-[calc(100%_-_100px)] max-w-[600px] mt-3 sm:mt-4"})]}),m.jsx(YP,{className:"mb-6"})]})})]})}_a.createRoot(document.getElementById("root")).render(m.jsx($t.StrictMode,{children:m.jsxs(m.Fragment,{children:[m.jsx(QP,{}),m.jsx(p2,{})]})}));