var tg=t=>{throw TypeError(t)};var Bc=(t,e,r)=>e.has(t)||tg("Cannot "+r);var R=(t,e,r)=>(Bc(t,e,"read from private field"),r?r.call(t):e.get(t)),he=(t,e,r)=>e.has(t)?tg("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,r),Y=(t,e,r,i)=>(Bc(t,e,"write to private field"),i?i.call(t,r):e.set(t,r),r),Ce=(t,e,r)=>(Bc(t,e,"access private method"),r);var Ja=(t,e,r,i)=>({set _(a){Y(t,e,a,r)},get _(){return R(t,e,i)}});function KS(t,e){for(var r=0;ri[a]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const a of document.querySelectorAll('link[rel="modulepreload"]'))i(a);new MutationObserver(a=>{for(const l of a)if(l.type==="childList")for(const c of l.addedNodes)c.tagName==="LINK"&&c.rel==="modulepreload"&&i(c)}).observe(document,{childList:!0,subtree:!0});function r(a){const l={};return a.integrity&&(l.integrity=a.integrity),a.referrerPolicy&&(l.referrerPolicy=a.referrerPolicy),a.crossOrigin==="use-credentials"?l.credentials="include":a.crossOrigin==="anonymous"?l.credentials="omit":l.credentials="same-origin",l}function i(a){if(a.ep)return;a.ep=!0;const l=r(a);fetch(a.href,l)}})();function Wv(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Uc={exports:{}},eo={},zc={exports:{}},Ee={};/** * @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 ng;function QS(){if(ng)return Ee;ng=1;var t=Symbol.for("react.element"),e=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),l=Symbol.for("react.provider"),c=Symbol.for("react.context"),d=Symbol.for("react.forward_ref"),h=Symbol.for("react.suspense"),m=Symbol.for("react.memo"),g=Symbol.for("react.lazy"),y=Symbol.iterator;function w(O){return O===null||typeof O!="object"?null:(O=y&&O[y]||O["@@iterator"],typeof O=="function"?O:null)}var k={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},_=Object.assign,b={};function x(O,z,xe){this.props=O,this.context=z,this.refs=b,this.updater=xe||k}x.prototype.isReactComponent={},x.prototype.setState=function(O,z){if(typeof O!="object"&&typeof O!="function"&&O!=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,O,z,"setState")},x.prototype.forceUpdate=function(O){this.updater.enqueueForceUpdate(this,O,"forceUpdate")};function E(){}E.prototype=x.prototype;function N(O,z,xe){this.props=O,this.context=z,this.refs=b,this.updater=xe||k}var A=N.prototype=new E;A.constructor=N,_(A,x.prototype),A.isPureReactComponent=!0;var D=Array.isArray,B=Object.prototype.hasOwnProperty,W={current:null},X={key:!0,ref:!0,__self:!0,__source:!0};function I(O,z,xe){var J,le={},pe=null,Re=null;if(z!=null)for(J in z.ref!==void 0&&(Re=z.ref),z.key!==void 0&&(pe=""+z.key),z)B.call(z,J)&&!X.hasOwnProperty(J)&&(le[J]=z[J]);var Se=arguments.length-2;if(Se===1)le.children=xe;else if(1>>1,z=Q[O];if(0>>1;Oa(le,U))pea(Re,le)?(Q[O]=Re,Q[pe]=U,O=pe):(Q[O]=le,Q[J]=U,O=J);else if(pea(Re,U))Q[O]=Re,Q[pe]=U,O=pe;else break e}}return oe}function a(Q,oe){var U=Q.sortIndex-oe.sortIndex;return U!==0?U:Q.id-oe.id}if(typeof performance=="object"&&typeof performance.now=="function"){var l=performance;t.unstable_now=function(){return l.now()}}else{var c=Date,d=c.now();t.unstable_now=function(){return c.now()-d}}var h=[],m=[],g=1,y=null,w=3,k=!1,_=!1,b=!1,x=typeof setTimeout=="function"?setTimeout:null,E=typeof clearTimeout=="function"?clearTimeout:null,N=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function A(Q){for(var oe=r(m);oe!==null;){if(oe.callback===null)i(m);else if(oe.startTime<=Q)i(m),oe.sortIndex=oe.expirationTime,e(h,oe);else break;oe=r(m)}}function D(Q){if(b=!1,A(Q),!_)if(r(h)!==null)_=!0,Ae(B);else{var oe=r(m);oe!==null&&ge(D,oe.startTime-Q)}}function B(Q,oe){_=!1,b&&(b=!1,E(I),I=-1),k=!0;var U=w;try{for(A(oe),y=r(h);y!==null&&(!(y.expirationTime>oe)||Q&&!ue());){var O=y.callback;if(typeof O=="function"){y.callback=null,w=y.priorityLevel;var z=O(y.expirationTime<=oe);oe=t.unstable_now(),typeof z=="function"?y.callback=z:y===r(h)&&i(h),A(oe)}else i(h);y=r(h)}if(y!==null)var xe=!0;else{var J=r(m);J!==null&&ge(D,J.startTime-oe),xe=!1}return xe}finally{y=null,w=U,k=!1}}var W=!1,X=null,I=-1,ee=5,ce=-1;function ue(){return!(t.unstable_now()-ceQ||125O?(Q.sortIndex=U,e(m,Q),r(h)===null&&Q===r(m)&&(b?(E(I),I=-1):b=!0,ge(D,U-O))):(Q.sortIndex=z,e(h,Q),_||k||(_=!0,Ae(B))),Q},t.unstable_shouldYield=ue,t.unstable_wrapCallback=function(Q){var oe=w;return function(){var U=w;w=oe;try{return Q.apply(this,arguments)}finally{w=U}}}})(Hc)),Hc}var ag;function eb(){return ag||(ag=1,qc.exports=ZS()),qc.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 lg;function tb(){if(lg)return Dt;lg=1;var t=df(),e=eb();function r(n){for(var s="https://reactjs.org/docs/error-decoder.html?invariant="+n,o=1;o"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),h=Object.prototype.hasOwnProperty,m=/^[: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]*$/,g={},y={};function w(n){return h.call(y,n)?!0:h.call(g,n)?!1:m.test(n)?y[n]=!0:(g[n]=!0,!1)}function k(n,s,o,u){if(o!==null&&o.type===0)return!1;switch(typeof s){case"function":case"symbol":return!0;case"boolean":return u?!1:o!==null?!o.acceptsBooleans:(n=n.toLowerCase().slice(0,5),n!=="data-"&&n!=="aria-");default:return!1}}function _(n,s,o,u){if(s===null||typeof s>"u"||k(n,s,o,u))return!0;if(u)return!1;if(o!==null)switch(o.type){case 3:return!s;case 4:return s===!1;case 5:return isNaN(s);case 6:return isNaN(s)||1>s}return!1}function b(n,s,o,u,f,p,v){this.acceptsBooleans=s===2||s===3||s===4,this.attributeName=u,this.attributeNamespace=f,this.mustUseProperty=o,this.propertyName=n,this.type=s,this.sanitizeURL=p,this.removeEmptyString=v}var x={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(n){x[n]=new b(n,0,!1,n,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(n){var s=n[0];x[s]=new b(s,1,!1,n[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(n){x[n]=new b(n,2,!1,n.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(n){x[n]=new b(n,2,!1,n,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(n){x[n]=new b(n,3,!1,n.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(n){x[n]=new b(n,3,!0,n,null,!1,!1)}),["capture","download"].forEach(function(n){x[n]=new b(n,4,!1,n,null,!1,!1)}),["cols","rows","size","span"].forEach(function(n){x[n]=new b(n,6,!1,n,null,!1,!1)}),["rowSpan","start"].forEach(function(n){x[n]=new b(n,5,!1,n.toLowerCase(),null,!1,!1)});var E=/[\-:]([a-z])/g;function N(n){return n[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(n){var s=n.replace(E,N);x[s]=new b(s,1,!1,n,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(n){var s=n.replace(E,N);x[s]=new b(s,1,!1,n,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(n){var s=n.replace(E,N);x[s]=new b(s,1,!1,n,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(n){x[n]=new b(n,1,!1,n.toLowerCase(),null,!1,!1)}),x.xlinkHref=new b("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(n){x[n]=new b(n,1,!1,n.toLowerCase(),null,!0,!0)});function A(n,s,o,u){var f=x.hasOwnProperty(s)?x[s]:null;(f!==null?f.type!==0:u||!(2C||f[v]!==p[C]){var T=` `+f[v].replace(" at new "," at ");return n.displayName&&T.includes("")&&(T=T.replace("",n.displayName)),T}while(1<=v&&0<=C);break}}}finally{xe=!1,Error.prepareStackTrace=o}return(n=n?n.displayName||n.name:"")?z(n):""}function le(n){switch(n.tag){case 5:return z(n.type);case 16:return z("Lazy");case 13:return z("Suspense");case 19:return z("SuspenseList");case 0:case 2:case 15:return n=J(n.type,!1),n;case 11:return n=J(n.type.render,!1),n;case 1:return n=J(n.type,!0),n;default:return""}}function pe(n){if(n==null)return null;if(typeof n=="function")return n.displayName||n.name||null;if(typeof n=="string")return n;switch(n){case X:return"Fragment";case W:return"Portal";case ee:return"Profiler";case I:return"StrictMode";case ze:return"Suspense";case _e:return"SuspenseList"}if(typeof n=="object")switch(n.$$typeof){case ue:return(n.displayName||"Context")+".Consumer";case ce:return(n._context.displayName||"Context")+".Provider";case Pe:var s=n.render;return n=n.displayName,n||(n=s.displayName||s.name||"",n=n!==""?"ForwardRef("+n+")":"ForwardRef"),n;case je:return s=n.displayName||null,s!==null?s:pe(n.type)||"Memo";case Ae:s=n._payload,n=n._init;try{return pe(n(s))}catch{}}return null}function Re(n){var s=n.type;switch(n.tag){case 24:return"Cache";case 9:return(s.displayName||"Context")+".Consumer";case 10:return(s._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return n=s.render,n=n.displayName||n.name||"",s.displayName||(n!==""?"ForwardRef("+n+")":"ForwardRef");case 7:return"Fragment";case 5:return s;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return pe(s);case 8:return s===I?"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 s=="function")return s.displayName||s.name||null;if(typeof s=="string")return s}return null}function Se(n){switch(typeof n){case"boolean":case"number":case"string":case"undefined":return n;case"object":return n;default:return""}}function ve(n){var s=n.type;return(n=n.nodeName)&&n.toLowerCase()==="input"&&(s==="checkbox"||s==="radio")}function Fe(n){var s=ve(n)?"checked":"value",o=Object.getOwnPropertyDescriptor(n.constructor.prototype,s),u=""+n[s];if(!n.hasOwnProperty(s)&&typeof o<"u"&&typeof o.get=="function"&&typeof o.set=="function"){var f=o.get,p=o.set;return Object.defineProperty(n,s,{configurable:!0,get:function(){return f.call(this)},set:function(v){u=""+v,p.call(this,v)}}),Object.defineProperty(n,s,{enumerable:o.enumerable}),{getValue:function(){return u},setValue:function(v){u=""+v},stopTracking:function(){n._valueTracker=null,delete n[s]}}}}function ye(n){n._valueTracker||(n._valueTracker=Fe(n))}function it(n){if(!n)return!1;var s=n._valueTracker;if(!s)return!0;var o=s.getValue(),u="";return n&&(u=ve(n)?n.checked?"true":"false":n.value),n=u,n!==o?(s.setValue(n),!0):!1}function Et(n){if(n=n||(typeof document<"u"?document:void 0),typeof n>"u")return null;try{return n.activeElement||n.body}catch{return n.body}}function Vt(n,s){var o=s.checked;return U({},s,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:o??n._wrapperState.initialChecked})}function pi(n,s){var o=s.defaultValue==null?"":s.defaultValue,u=s.checked!=null?s.checked:s.defaultChecked;o=Se(s.value!=null?s.value:o),n._wrapperState={initialChecked:u,initialValue:o,controlled:s.type==="checkbox"||s.type==="radio"?s.checked!=null:s.value!=null}}function $o(n,s){s=s.checked,s!=null&&A(n,"checked",s,!1)}function Pn(n,s){$o(n,s);var o=Se(s.value),u=s.type;if(o!=null)u==="number"?(o===0&&n.value===""||n.value!=o)&&(n.value=""+o):n.value!==""+o&&(n.value=""+o);else if(u==="submit"||u==="reset"){n.removeAttribute("value");return}s.hasOwnProperty("value")?Gl(n,s.type,o):s.hasOwnProperty("defaultValue")&&Gl(n,s.type,Se(s.defaultValue)),s.checked==null&&s.defaultChecked!=null&&(n.defaultChecked=!!s.defaultChecked)}function ch(n,s,o){if(s.hasOwnProperty("value")||s.hasOwnProperty("defaultValue")){var u=s.type;if(!(u!=="submit"&&u!=="reset"||s.value!==void 0&&s.value!==null))return;s=""+n._wrapperState.initialValue,o||s===n.value||(n.value=s),n.defaultValue=s}o=n.name,o!==""&&(n.name=""),n.defaultChecked=!!n._wrapperState.initialChecked,o!==""&&(n.name=o)}function Gl(n,s,o){(s!=="number"||Et(n.ownerDocument)!==n)&&(o==null?n.defaultValue=""+n._wrapperState.initialValue:n.defaultValue!==""+o&&(n.defaultValue=""+o))}var mi=Array.isArray;function hs(n,s,o,u){if(n=n.options,s){s={};for(var f=0;f"+s.valueOf().toString()+"",s=qo.firstChild;n.firstChild;)n.removeChild(n.firstChild);for(;s.firstChild;)n.appendChild(s.firstChild)}});function gi(n,s){if(s){var o=n.firstChild;if(o&&o===n.lastChild&&o.nodeType===3){o.nodeValue=s;return}}n.textContent=s}var yi={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},Xx=["Webkit","ms","Moz","O"];Object.keys(yi).forEach(function(n){Xx.forEach(function(s){s=s+n.charAt(0).toUpperCase()+n.substring(1),yi[s]=yi[n]})});function gh(n,s,o){return s==null||typeof s=="boolean"||s===""?"":o||typeof s!="number"||s===0||yi.hasOwnProperty(n)&&yi[n]?(""+s).trim():s+"px"}function yh(n,s){n=n.style;for(var o in s)if(s.hasOwnProperty(o)){var u=o.indexOf("--")===0,f=gh(o,s[o],u);o==="float"&&(o="cssFloat"),u?n.setProperty(o,f):n[o]=f}}var Jx=U({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 Jl(n,s){if(s){if(Jx[n]&&(s.children!=null||s.dangerouslySetInnerHTML!=null))throw Error(r(137,n));if(s.dangerouslySetInnerHTML!=null){if(s.children!=null)throw Error(r(60));if(typeof s.dangerouslySetInnerHTML!="object"||!("__html"in s.dangerouslySetInnerHTML))throw Error(r(61))}if(s.style!=null&&typeof s.style!="object")throw Error(r(62))}}function Zl(n,s){if(n.indexOf("-")===-1)return typeof s.is=="string";switch(n){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 eu=null;function tu(n){return n=n.target||n.srcElement||window,n.correspondingUseElement&&(n=n.correspondingUseElement),n.nodeType===3?n.parentNode:n}var nu=null,ps=null,ms=null;function vh(n){if(n=Vi(n)){if(typeof nu!="function")throw Error(r(280));var s=n.stateNode;s&&(s=ha(s),nu(n.stateNode,n.type,s))}}function wh(n){ps?ms?ms.push(n):ms=[n]:ps=n}function xh(){if(ps){var n=ps,s=ms;if(ms=ps=null,vh(n),s)for(n=0;n>>=0,n===0?32:31-(u1(n)/c1|0)|0}var Go=64,Yo=4194304;function Si(n){switch(n&-n){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 n&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return n&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return n}}function Xo(n,s){var o=n.pendingLanes;if(o===0)return 0;var u=0,f=n.suspendedLanes,p=n.pingedLanes,v=o&268435455;if(v!==0){var C=v&~f;C!==0?u=Si(C):(p&=v,p!==0&&(u=Si(p)))}else v=o&~f,v!==0?u=Si(v):p!==0&&(u=Si(p));if(u===0)return 0;if(s!==0&&s!==u&&(s&f)===0&&(f=u&-u,p=s&-s,f>=p||f===16&&(p&4194240)!==0))return s;if((u&4)!==0&&(u|=o&16),s=n.entangledLanes,s!==0)for(n=n.entanglements,s&=u;0o;o++)s.push(n);return s}function bi(n,s,o){n.pendingLanes|=s,s!==536870912&&(n.suspendedLanes=0,n.pingedLanes=0),n=n.eventTimes,s=31-sn(s),n[s]=o}function p1(n,s){var o=n.pendingLanes&~s;n.pendingLanes=s,n.suspendedLanes=0,n.pingedLanes=0,n.expiredLanes&=s,n.mutableReadLanes&=s,n.entangledLanes&=s,s=n.entanglements;var u=n.eventTimes;for(n=n.expirationTimes;0=Ai),Qh=" ",Gh=!1;function Yh(n,s){switch(n){case"keyup":return z1.indexOf(s.keyCode)!==-1;case"keydown":return s.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Xh(n){return n=n.detail,typeof n=="object"&&"data"in n?n.data:null}var vs=!1;function q1(n,s){switch(n){case"compositionend":return Xh(s);case"keypress":return s.which!==32?null:(Gh=!0,Qh);case"textInput":return n=s.data,n===Qh&&Gh?null:n;default:return null}}function H1(n,s){if(vs)return n==="compositionend"||!xu&&Yh(n,s)?(n=zh(),na=pu=Xn=null,vs=!1,n):null;switch(n){case"paste":return null;case"keypress":if(!(s.ctrlKey||s.altKey||s.metaKey)||s.ctrlKey&&s.altKey){if(s.char&&1=s)return{node:o,offset:s-n};n=u}e:{for(;o;){if(o.nextSibling){o=o.nextSibling;break e}o=o.parentNode}o=void 0}o=sp(o)}}function op(n,s){return n&&s?n===s?!0:n&&n.nodeType===3?!1:s&&s.nodeType===3?op(n,s.parentNode):"contains"in n?n.contains(s):n.compareDocumentPosition?!!(n.compareDocumentPosition(s)&16):!1:!1}function ap(){for(var n=window,s=Et();s instanceof n.HTMLIFrameElement;){try{var o=typeof s.contentWindow.location.href=="string"}catch{o=!1}if(o)n=s.contentWindow;else break;s=Et(n.document)}return s}function Eu(n){var s=n&&n.nodeName&&n.nodeName.toLowerCase();return s&&(s==="input"&&(n.type==="text"||n.type==="search"||n.type==="tel"||n.type==="url"||n.type==="password")||s==="textarea"||n.contentEditable==="true")}function eS(n){var s=ap(),o=n.focusedElem,u=n.selectionRange;if(s!==o&&o&&o.ownerDocument&&op(o.ownerDocument.documentElement,o)){if(u!==null&&Eu(o)){if(s=u.start,n=u.end,n===void 0&&(n=s),"selectionStart"in o)o.selectionStart=s,o.selectionEnd=Math.min(n,o.value.length);else if(n=(s=o.ownerDocument||document)&&s.defaultView||window,n.getSelection){n=n.getSelection();var f=o.textContent.length,p=Math.min(u.start,f);u=u.end===void 0?p:Math.min(u.end,f),!n.extend&&p>u&&(f=u,u=p,p=f),f=ip(o,p);var v=ip(o,u);f&&v&&(n.rangeCount!==1||n.anchorNode!==f.node||n.anchorOffset!==f.offset||n.focusNode!==v.node||n.focusOffset!==v.offset)&&(s=s.createRange(),s.setStart(f.node,f.offset),n.removeAllRanges(),p>u?(n.addRange(s),n.extend(v.node,v.offset)):(s.setEnd(v.node,v.offset),n.addRange(s)))}}for(s=[],n=o;n=n.parentNode;)n.nodeType===1&&s.push({element:n,left:n.scrollLeft,top:n.scrollTop});for(typeof o.focus=="function"&&o.focus(),o=0;o=document.documentMode,ws=null,Cu=null,Li=null,ku=!1;function lp(n,s,o){var u=o.window===o?o.document:o.nodeType===9?o:o.ownerDocument;ku||ws==null||ws!==Et(u)||(u=ws,"selectionStart"in u&&Eu(u)?u={start:u.selectionStart,end:u.selectionEnd}:(u=(u.ownerDocument&&u.ownerDocument.defaultView||window).getSelection(),u={anchorNode:u.anchorNode,anchorOffset:u.anchorOffset,focusNode:u.focusNode,focusOffset:u.focusOffset}),Li&&Di(Li,u)||(Li=u,u=ca(Cu,"onSelect"),0Cs||(n.current=Fu[Cs],Fu[Cs]=null,Cs--)}function Ie(n,s){Cs++,Fu[Cs]=n.current,n.current=s}var tr={},gt=er(tr),Rt=er(!1),Dr=tr;function ks(n,s){var o=n.type.contextTypes;if(!o)return tr;var u=n.stateNode;if(u&&u.__reactInternalMemoizedUnmaskedChildContext===s)return u.__reactInternalMemoizedMaskedChildContext;var f={},p;for(p in o)f[p]=s[p];return u&&(n=n.stateNode,n.__reactInternalMemoizedUnmaskedChildContext=s,n.__reactInternalMemoizedMaskedChildContext=f),f}function Pt(n){return n=n.childContextTypes,n!=null}function pa(){Be(Rt),Be(gt)}function Ep(n,s,o){if(gt.current!==tr)throw Error(r(168));Ie(gt,s),Ie(Rt,o)}function Cp(n,s,o){var u=n.stateNode;if(s=s.childContextTypes,typeof u.getChildContext!="function")return o;u=u.getChildContext();for(var f in u)if(!(f in s))throw Error(r(108,Re(n)||"Unknown",f));return U({},o,u)}function ma(n){return n=(n=n.stateNode)&&n.__reactInternalMemoizedMergedChildContext||tr,Dr=gt.current,Ie(gt,n),Ie(Rt,Rt.current),!0}function kp(n,s,o){var u=n.stateNode;if(!u)throw Error(r(169));o?(n=Cp(n,s,Dr),u.__reactInternalMemoizedMergedChildContext=n,Be(Rt),Be(gt),Ie(gt,n)):Be(Rt),Ie(Rt,o)}var On=null,ga=!1,Iu=!1;function Tp(n){On===null?On=[n]:On.push(n)}function fS(n){ga=!0,Tp(n)}function nr(){if(!Iu&&On!==null){Iu=!0;var n=0,s=Le;try{var o=On;for(Le=1;n>=v,f-=v,Nn=1<<32-sn(s)+f|o<we?(lt=fe,fe=null):lt=fe.sibling;var Ne=$(j,fe,M[we],K);if(Ne===null){fe===null&&(fe=lt);break}n&&fe&&Ne.alternate===null&&s(j,fe),P=p(Ne,P,we),de===null?ae=Ne:de.sibling=Ne,de=Ne,fe=lt}if(we===M.length)return o(j,fe),$e&&jr(j,we),ae;if(fe===null){for(;wewe?(lt=fe,fe=null):lt=fe.sibling;var dr=$(j,fe,Ne.value,K);if(dr===null){fe===null&&(fe=lt);break}n&&fe&&dr.alternate===null&&s(j,fe),P=p(dr,P,we),de===null?ae=dr:de.sibling=dr,de=dr,fe=lt}if(Ne.done)return o(j,fe),$e&&jr(j,we),ae;if(fe===null){for(;!Ne.done;we++,Ne=M.next())Ne=H(j,Ne.value,K),Ne!==null&&(P=p(Ne,P,we),de===null?ae=Ne:de.sibling=Ne,de=Ne);return $e&&jr(j,we),ae}for(fe=u(j,fe);!Ne.done;we++,Ne=M.next())Ne=G(fe,j,we,Ne.value,K),Ne!==null&&(n&&Ne.alternate!==null&&fe.delete(Ne.key===null?we:Ne.key),P=p(Ne,P,we),de===null?ae=Ne:de.sibling=Ne,de=Ne);return n&&fe.forEach(function(WS){return s(j,WS)}),$e&&jr(j,we),ae}function Xe(j,P,M,K){if(typeof M=="object"&&M!==null&&M.type===X&&M.key===null&&(M=M.props.children),typeof M=="object"&&M!==null){switch(M.$$typeof){case B:e:{for(var ae=M.key,de=P;de!==null;){if(de.key===ae){if(ae=M.type,ae===X){if(de.tag===7){o(j,de.sibling),P=f(de,M.props.children),P.return=j,j=P;break e}}else if(de.elementType===ae||typeof ae=="object"&&ae!==null&&ae.$$typeof===Ae&&Np(ae)===de.type){o(j,de.sibling),P=f(de,M.props),P.ref=Bi(j,de,M),P.return=j,j=P;break e}o(j,de);break}else s(j,de);de=de.sibling}M.type===X?(P=$r(M.props.children,j.mode,K,M.key),P.return=j,j=P):(K=qa(M.type,M.key,M.props,null,j.mode,K),K.ref=Bi(j,P,M),K.return=j,j=K)}return v(j);case W:e:{for(de=M.key;P!==null;){if(P.key===de)if(P.tag===4&&P.stateNode.containerInfo===M.containerInfo&&P.stateNode.implementation===M.implementation){o(j,P.sibling),P=f(P,M.children||[]),P.return=j,j=P;break e}else{o(j,P);break}else s(j,P);P=P.sibling}P=jc(M,j.mode,K),P.return=j,j=P}return v(j);case Ae:return de=M._init,Xe(j,P,de(M._payload),K)}if(mi(M))return te(j,P,M,K);if(oe(M))return ie(j,P,M,K);xa(j,M)}return typeof M=="string"&&M!==""||typeof M=="number"?(M=""+M,P!==null&&P.tag===6?(o(j,P.sibling),P=f(P,M),P.return=j,j=P):(o(j,P),P=Lc(M,j.mode,K),P.return=j,j=P),v(j)):o(j,P)}return Xe}var Ps=Dp(!0),Lp=Dp(!1),Sa=er(null),ba=null,As=null,qu=null;function Hu(){qu=As=ba=null}function Wu(n){var s=Sa.current;Be(Sa),n._currentValue=s}function Ku(n,s,o){for(;n!==null;){var u=n.alternate;if((n.childLanes&s)!==s?(n.childLanes|=s,u!==null&&(u.childLanes|=s)):u!==null&&(u.childLanes&s)!==s&&(u.childLanes|=s),n===o)break;n=n.return}}function Os(n,s){ba=n,qu=As=null,n=n.dependencies,n!==null&&n.firstContext!==null&&((n.lanes&s)!==0&&(At=!0),n.firstContext=null)}function Qt(n){var s=n._currentValue;if(qu!==n)if(n={context:n,memoizedValue:s,next:null},As===null){if(ba===null)throw Error(r(308));As=n,ba.dependencies={lanes:0,firstContext:n}}else As=As.next=n;return s}var Mr=null;function Qu(n){Mr===null?Mr=[n]:Mr.push(n)}function jp(n,s,o,u){var f=s.interleaved;return f===null?(o.next=o,Qu(s)):(o.next=f.next,f.next=o),s.interleaved=o,Ln(n,u)}function Ln(n,s){n.lanes|=s;var o=n.alternate;for(o!==null&&(o.lanes|=s),o=n,n=n.return;n!==null;)n.childLanes|=s,o=n.alternate,o!==null&&(o.childLanes|=s),o=n,n=n.return;return o.tag===3?o.stateNode:null}var rr=!1;function Gu(n){n.updateQueue={baseState:n.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Mp(n,s){n=n.updateQueue,s.updateQueue===n&&(s.updateQueue={baseState:n.baseState,firstBaseUpdate:n.firstBaseUpdate,lastBaseUpdate:n.lastBaseUpdate,shared:n.shared,effects:n.effects})}function jn(n,s){return{eventTime:n,lane:s,tag:0,payload:null,callback:null,next:null}}function sr(n,s,o){var u=n.updateQueue;if(u===null)return null;if(u=u.shared,(Oe&2)!==0){var f=u.pending;return f===null?s.next=s:(s.next=f.next,f.next=s),u.pending=s,Ln(n,o)}return f=u.interleaved,f===null?(s.next=s,Qu(u)):(s.next=f.next,f.next=s),u.interleaved=s,Ln(n,o)}function Ea(n,s,o){if(s=s.updateQueue,s!==null&&(s=s.shared,(o&4194240)!==0)){var u=s.lanes;u&=n.pendingLanes,o|=u,s.lanes=o,uu(n,o)}}function Fp(n,s){var o=n.updateQueue,u=n.alternate;if(u!==null&&(u=u.updateQueue,o===u)){var f=null,p=null;if(o=o.firstBaseUpdate,o!==null){do{var v={eventTime:o.eventTime,lane:o.lane,tag:o.tag,payload:o.payload,callback:o.callback,next:null};p===null?f=p=v:p=p.next=v,o=o.next}while(o!==null);p===null?f=p=s:p=p.next=s}else f=p=s;o={baseState:u.baseState,firstBaseUpdate:f,lastBaseUpdate:p,shared:u.shared,effects:u.effects},n.updateQueue=o;return}n=o.lastBaseUpdate,n===null?o.firstBaseUpdate=s:n.next=s,o.lastBaseUpdate=s}function Ca(n,s,o,u){var f=n.updateQueue;rr=!1;var p=f.firstBaseUpdate,v=f.lastBaseUpdate,C=f.shared.pending;if(C!==null){f.shared.pending=null;var T=C,F=T.next;T.next=null,v===null?p=F:v.next=F,v=T;var q=n.alternate;q!==null&&(q=q.updateQueue,C=q.lastBaseUpdate,C!==v&&(C===null?q.firstBaseUpdate=F:C.next=F,q.lastBaseUpdate=T))}if(p!==null){var H=f.baseState;v=0,q=F=T=null,C=p;do{var $=C.lane,G=C.eventTime;if((u&$)===$){q!==null&&(q=q.next={eventTime:G,lane:0,tag:C.tag,payload:C.payload,callback:C.callback,next:null});e:{var te=n,ie=C;switch($=s,G=o,ie.tag){case 1:if(te=ie.payload,typeof te=="function"){H=te.call(G,H,$);break e}H=te;break e;case 3:te.flags=te.flags&-65537|128;case 0:if(te=ie.payload,$=typeof te=="function"?te.call(G,H,$):te,$==null)break e;H=U({},H,$);break e;case 2:rr=!0}}C.callback!==null&&C.lane!==0&&(n.flags|=64,$=f.effects,$===null?f.effects=[C]:$.push(C))}else G={eventTime:G,lane:$,tag:C.tag,payload:C.payload,callback:C.callback,next:null},q===null?(F=q=G,T=H):q=q.next=G,v|=$;if(C=C.next,C===null){if(C=f.shared.pending,C===null)break;$=C,C=$.next,$.next=null,f.lastBaseUpdate=$,f.shared.pending=null}}while(!0);if(q===null&&(T=H),f.baseState=T,f.firstBaseUpdate=F,f.lastBaseUpdate=q,s=f.shared.interleaved,s!==null){f=s;do v|=f.lane,f=f.next;while(f!==s)}else p===null&&(f.shared.lanes=0);Vr|=v,n.lanes=v,n.memoizedState=H}}function Ip(n,s,o){if(n=s.effects,s.effects=null,n!==null)for(s=0;so?o:4,n(!0);var u=ec.transition;ec.transition={};try{n(!1),s()}finally{Le=o,ec.transition=u}}function rm(){return Gt().memoizedState}function gS(n,s,o){var u=lr(n);if(o={lane:u,action:o,hasEagerState:!1,eagerState:null,next:null},sm(n))im(s,o);else if(o=jp(n,s,o,u),o!==null){var f=kt();dn(o,n,u,f),om(o,s,u)}}function yS(n,s,o){var u=lr(n),f={lane:u,action:o,hasEagerState:!1,eagerState:null,next:null};if(sm(n))im(s,f);else{var p=n.alternate;if(n.lanes===0&&(p===null||p.lanes===0)&&(p=s.lastRenderedReducer,p!==null))try{var v=s.lastRenderedState,C=p(v,o);if(f.hasEagerState=!0,f.eagerState=C,on(C,v)){var T=s.interleaved;T===null?(f.next=f,Qu(s)):(f.next=T.next,T.next=f),s.interleaved=f;return}}catch{}finally{}o=jp(n,s,f,u),o!==null&&(f=kt(),dn(o,n,u,f),om(o,s,u))}}function sm(n){var s=n.alternate;return n===He||s!==null&&s===He}function im(n,s){qi=_a=!0;var o=n.pending;o===null?s.next=s:(s.next=o.next,o.next=s),n.pending=s}function om(n,s,o){if((o&4194240)!==0){var u=s.lanes;u&=n.pendingLanes,o|=u,s.lanes=o,uu(n,o)}}var Aa={readContext:Qt,useCallback:yt,useContext:yt,useEffect:yt,useImperativeHandle:yt,useInsertionEffect:yt,useLayoutEffect:yt,useMemo:yt,useReducer:yt,useRef:yt,useState:yt,useDebugValue:yt,useDeferredValue:yt,useTransition:yt,useMutableSource:yt,useSyncExternalStore:yt,useId:yt,unstable_isNewReconciler:!1},vS={readContext:Qt,useCallback:function(n,s){return xn().memoizedState=[n,s===void 0?null:s],n},useContext:Qt,useEffect:Gp,useImperativeHandle:function(n,s,o){return o=o!=null?o.concat([n]):null,Ra(4194308,4,Jp.bind(null,s,n),o)},useLayoutEffect:function(n,s){return Ra(4194308,4,n,s)},useInsertionEffect:function(n,s){return Ra(4,2,n,s)},useMemo:function(n,s){var o=xn();return s=s===void 0?null:s,n=n(),o.memoizedState=[n,s],n},useReducer:function(n,s,o){var u=xn();return s=o!==void 0?o(s):s,u.memoizedState=u.baseState=s,n={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:n,lastRenderedState:s},u.queue=n,n=n.dispatch=gS.bind(null,He,n),[u.memoizedState,n]},useRef:function(n){var s=xn();return n={current:n},s.memoizedState=n},useState:Kp,useDebugValue:ac,useDeferredValue:function(n){return xn().memoizedState=n},useTransition:function(){var n=Kp(!1),s=n[0];return n=mS.bind(null,n[1]),xn().memoizedState=n,[s,n]},useMutableSource:function(){},useSyncExternalStore:function(n,s,o){var u=He,f=xn();if($e){if(o===void 0)throw Error(r(407));o=o()}else{if(o=s(),at===null)throw Error(r(349));(Ir&30)!==0||zp(u,s,o)}f.memoizedState=o;var p={value:o,getSnapshot:s};return f.queue=p,Gp(qp.bind(null,u,p,n),[n]),u.flags|=2048,Ki(9,$p.bind(null,u,p,o,s),void 0,null),o},useId:function(){var n=xn(),s=at.identifierPrefix;if($e){var o=Dn,u=Nn;o=(u&~(1<<32-sn(u)-1)).toString(32)+o,s=":"+s+"R"+o,o=Hi++,0<\/script>",n=n.removeChild(n.firstChild)):typeof u.is=="string"?n=v.createElement(o,{is:u.is}):(n=v.createElement(o),o==="select"&&(v=n,u.multiple?v.multiple=!0:u.size&&(v.size=u.size))):n=v.createElementNS(n,o),n[vn]=s,n[Ii]=u,Tm(n,s,!1,!1),s.stateNode=n;e:{switch(v=Zl(o,u),o){case"dialog":Ve("cancel",n),Ve("close",n),f=u;break;case"iframe":case"object":case"embed":Ve("load",n),f=u;break;case"video":case"audio":for(f=0;fMs&&(s.flags|=128,u=!0,Qi(p,!1),s.lanes=4194304)}else{if(!u)if(n=ka(v),n!==null){if(s.flags|=128,u=!0,o=n.updateQueue,o!==null&&(s.updateQueue=o,s.flags|=4),Qi(p,!0),p.tail===null&&p.tailMode==="hidden"&&!v.alternate&&!$e)return vt(s),null}else 2*Ye()-p.renderingStartTime>Ms&&o!==1073741824&&(s.flags|=128,u=!0,Qi(p,!1),s.lanes=4194304);p.isBackwards?(v.sibling=s.child,s.child=v):(o=p.last,o!==null?o.sibling=v:s.child=v,p.last=v)}return p.tail!==null?(s=p.tail,p.rendering=s,p.tail=s.sibling,p.renderingStartTime=Ye(),s.sibling=null,o=qe.current,Ie(qe,u?o&1|2:o&1),s):(vt(s),null);case 22:case 23:return Oc(),u=s.memoizedState!==null,n!==null&&n.memoizedState!==null!==u&&(s.flags|=8192),u&&(s.mode&1)!==0?($t&1073741824)!==0&&(vt(s),s.subtreeFlags&6&&(s.flags|=8192)):vt(s),null;case 24:return null;case 25:return null}throw Error(r(156,s.tag))}function TS(n,s){switch(Bu(s),s.tag){case 1:return Pt(s.type)&&pa(),n=s.flags,n&65536?(s.flags=n&-65537|128,s):null;case 3:return Ns(),Be(Rt),Be(gt),Zu(),n=s.flags,(n&65536)!==0&&(n&128)===0?(s.flags=n&-65537|128,s):null;case 5:return Xu(s),null;case 13:if(Be(qe),n=s.memoizedState,n!==null&&n.dehydrated!==null){if(s.alternate===null)throw Error(r(340));Rs()}return n=s.flags,n&65536?(s.flags=n&-65537|128,s):null;case 19:return Be(qe),null;case 4:return Ns(),null;case 10:return Wu(s.type._context),null;case 22:case 23:return Oc(),null;case 24:return null;default:return null}}var La=!1,wt=!1,_S=typeof WeakSet=="function"?WeakSet:Set,Z=null;function Ls(n,s){var o=n.ref;if(o!==null)if(typeof o=="function")try{o(null)}catch(u){Ke(n,s,u)}else o.current=null}function wc(n,s,o){try{o()}catch(u){Ke(n,s,u)}}var Pm=!1;function RS(n,s){if(Ou=ea,n=ap(),Eu(n)){if("selectionStart"in n)var o={start:n.selectionStart,end:n.selectionEnd};else e:{o=(o=n.ownerDocument)&&o.defaultView||window;var u=o.getSelection&&o.getSelection();if(u&&u.rangeCount!==0){o=u.anchorNode;var f=u.anchorOffset,p=u.focusNode;u=u.focusOffset;try{o.nodeType,p.nodeType}catch{o=null;break e}var v=0,C=-1,T=-1,F=0,q=0,H=n,$=null;t:for(;;){for(var G;H!==o||f!==0&&H.nodeType!==3||(C=v+f),H!==p||u!==0&&H.nodeType!==3||(T=v+u),H.nodeType===3&&(v+=H.nodeValue.length),(G=H.firstChild)!==null;)$=H,H=G;for(;;){if(H===n)break t;if($===o&&++F===f&&(C=v),$===p&&++q===u&&(T=v),(G=H.nextSibling)!==null)break;H=$,$=H.parentNode}H=G}o=C===-1||T===-1?null:{start:C,end:T}}else o=null}o=o||{start:0,end:0}}else o=null;for(Nu={focusedElem:n,selectionRange:o},ea=!1,Z=s;Z!==null;)if(s=Z,n=s.child,(s.subtreeFlags&1028)!==0&&n!==null)n.return=s,Z=n;else for(;Z!==null;){s=Z;try{var te=s.alternate;if((s.flags&1024)!==0)switch(s.tag){case 0:case 11:case 15:break;case 1:if(te!==null){var ie=te.memoizedProps,Xe=te.memoizedState,j=s.stateNode,P=j.getSnapshotBeforeUpdate(s.elementType===s.type?ie:ln(s.type,ie),Xe);j.__reactInternalSnapshotBeforeUpdate=P}break;case 3:var M=s.stateNode.containerInfo;M.nodeType===1?M.textContent="":M.nodeType===9&&M.documentElement&&M.removeChild(M.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(r(163))}}catch(K){Ke(s,s.return,K)}if(n=s.sibling,n!==null){n.return=s.return,Z=n;break}Z=s.return}return te=Pm,Pm=!1,te}function Gi(n,s,o){var u=s.updateQueue;if(u=u!==null?u.lastEffect:null,u!==null){var f=u=u.next;do{if((f.tag&n)===n){var p=f.destroy;f.destroy=void 0,p!==void 0&&wc(s,o,p)}f=f.next}while(f!==u)}}function ja(n,s){if(s=s.updateQueue,s=s!==null?s.lastEffect:null,s!==null){var o=s=s.next;do{if((o.tag&n)===n){var u=o.create;o.destroy=u()}o=o.next}while(o!==s)}}function xc(n){var s=n.ref;if(s!==null){var o=n.stateNode;switch(n.tag){case 5:n=o;break;default:n=o}typeof s=="function"?s(n):s.current=n}}function Am(n){var s=n.alternate;s!==null&&(n.alternate=null,Am(s)),n.child=null,n.deletions=null,n.sibling=null,n.tag===5&&(s=n.stateNode,s!==null&&(delete s[vn],delete s[Ii],delete s[Mu],delete s[cS],delete s[dS])),n.stateNode=null,n.return=null,n.dependencies=null,n.memoizedProps=null,n.memoizedState=null,n.pendingProps=null,n.stateNode=null,n.updateQueue=null}function Om(n){return n.tag===5||n.tag===3||n.tag===4}function Nm(n){e:for(;;){for(;n.sibling===null;){if(n.return===null||Om(n.return))return null;n=n.return}for(n.sibling.return=n.return,n=n.sibling;n.tag!==5&&n.tag!==6&&n.tag!==18;){if(n.flags&2||n.child===null||n.tag===4)continue e;n.child.return=n,n=n.child}if(!(n.flags&2))return n.stateNode}}function Sc(n,s,o){var u=n.tag;if(u===5||u===6)n=n.stateNode,s?o.nodeType===8?o.parentNode.insertBefore(n,s):o.insertBefore(n,s):(o.nodeType===8?(s=o.parentNode,s.insertBefore(n,o)):(s=o,s.appendChild(n)),o=o._reactRootContainer,o!=null||s.onclick!==null||(s.onclick=fa));else if(u!==4&&(n=n.child,n!==null))for(Sc(n,s,o),n=n.sibling;n!==null;)Sc(n,s,o),n=n.sibling}function bc(n,s,o){var u=n.tag;if(u===5||u===6)n=n.stateNode,s?o.insertBefore(n,s):o.appendChild(n);else if(u!==4&&(n=n.child,n!==null))for(bc(n,s,o),n=n.sibling;n!==null;)bc(n,s,o),n=n.sibling}var ct=null,un=!1;function ir(n,s,o){for(o=o.child;o!==null;)Dm(n,s,o),o=o.sibling}function Dm(n,s,o){if(yn&&typeof yn.onCommitFiberUnmount=="function")try{yn.onCommitFiberUnmount(Qo,o)}catch{}switch(o.tag){case 5:wt||Ls(o,s);case 6:var u=ct,f=un;ct=null,ir(n,s,o),ct=u,un=f,ct!==null&&(un?(n=ct,o=o.stateNode,n.nodeType===8?n.parentNode.removeChild(o):n.removeChild(o)):ct.removeChild(o.stateNode));break;case 18:ct!==null&&(un?(n=ct,o=o.stateNode,n.nodeType===8?ju(n.parentNode,o):n.nodeType===1&&ju(n,o),_i(n)):ju(ct,o.stateNode));break;case 4:u=ct,f=un,ct=o.stateNode.containerInfo,un=!0,ir(n,s,o),ct=u,un=f;break;case 0:case 11:case 14:case 15:if(!wt&&(u=o.updateQueue,u!==null&&(u=u.lastEffect,u!==null))){f=u=u.next;do{var p=f,v=p.destroy;p=p.tag,v!==void 0&&((p&2)!==0||(p&4)!==0)&&wc(o,s,v),f=f.next}while(f!==u)}ir(n,s,o);break;case 1:if(!wt&&(Ls(o,s),u=o.stateNode,typeof u.componentWillUnmount=="function"))try{u.props=o.memoizedProps,u.state=o.memoizedState,u.componentWillUnmount()}catch(C){Ke(o,s,C)}ir(n,s,o);break;case 21:ir(n,s,o);break;case 22:o.mode&1?(wt=(u=wt)||o.memoizedState!==null,ir(n,s,o),wt=u):ir(n,s,o);break;default:ir(n,s,o)}}function Lm(n){var s=n.updateQueue;if(s!==null){n.updateQueue=null;var o=n.stateNode;o===null&&(o=n.stateNode=new _S),s.forEach(function(u){var f=FS.bind(null,n,u);o.has(u)||(o.add(u),u.then(f,f))})}}function cn(n,s){var o=s.deletions;if(o!==null)for(var u=0;uf&&(f=v),u&=~p}if(u=f,u=Ye()-u,u=(120>u?120:480>u?480:1080>u?1080:1920>u?1920:3e3>u?3e3:4320>u?4320:1960*AS(u/1960))-u,10n?16:n,ar===null)var u=!1;else{if(n=ar,ar=null,Ba=0,(Oe&6)!==0)throw Error(r(331));var f=Oe;for(Oe|=4,Z=n.current;Z!==null;){var p=Z,v=p.child;if((Z.flags&16)!==0){var C=p.deletions;if(C!==null){for(var T=0;TYe()-kc?Ur(n,0):Cc|=o),Nt(n,s)}function Km(n,s){s===0&&((n.mode&1)===0?s=1:(s=Yo,Yo<<=1,(Yo&130023424)===0&&(Yo=4194304)));var o=kt();n=Ln(n,s),n!==null&&(bi(n,s,o),Nt(n,o))}function MS(n){var s=n.memoizedState,o=0;s!==null&&(o=s.retryLane),Km(n,o)}function FS(n,s){var o=0;switch(n.tag){case 13:var u=n.stateNode,f=n.memoizedState;f!==null&&(o=f.retryLane);break;case 19:u=n.stateNode;break;default:throw Error(r(314))}u!==null&&u.delete(s),Km(n,o)}var Qm;Qm=function(n,s,o){if(n!==null)if(n.memoizedProps!==s.pendingProps||Rt.current)At=!0;else{if((n.lanes&o)===0&&(s.flags&128)===0)return At=!1,CS(n,s,o);At=(n.flags&131072)!==0}else At=!1,$e&&(s.flags&1048576)!==0&&_p(s,va,s.index);switch(s.lanes=0,s.tag){case 2:var u=s.type;Da(n,s),n=s.pendingProps;var f=ks(s,gt.current);Os(s,o),f=nc(null,s,u,n,f,o);var p=rc();return s.flags|=1,typeof f=="object"&&f!==null&&typeof f.render=="function"&&f.$$typeof===void 0?(s.tag=1,s.memoizedState=null,s.updateQueue=null,Pt(u)?(p=!0,ma(s)):p=!1,s.memoizedState=f.state!==null&&f.state!==void 0?f.state:null,Gu(s),f.updater=Oa,s.stateNode=f,f._reactInternals=s,uc(s,u,n,o),s=hc(null,s,u,!0,p,o)):(s.tag=0,$e&&p&&Vu(s),Ct(null,s,f,o),s=s.child),s;case 16:u=s.elementType;e:{switch(Da(n,s),n=s.pendingProps,f=u._init,u=f(u._payload),s.type=u,f=s.tag=VS(u),n=ln(u,n),f){case 0:s=fc(null,s,u,n,o);break e;case 1:s=xm(null,s,u,n,o);break e;case 11:s=mm(null,s,u,n,o);break e;case 14:s=gm(null,s,u,ln(u.type,n),o);break e}throw Error(r(306,u,""))}return s;case 0:return u=s.type,f=s.pendingProps,f=s.elementType===u?f:ln(u,f),fc(n,s,u,f,o);case 1:return u=s.type,f=s.pendingProps,f=s.elementType===u?f:ln(u,f),xm(n,s,u,f,o);case 3:e:{if(Sm(s),n===null)throw Error(r(387));u=s.pendingProps,p=s.memoizedState,f=p.element,Mp(n,s),Ca(s,u,null,o);var v=s.memoizedState;if(u=v.element,p.isDehydrated)if(p={element:u,isDehydrated:!1,cache:v.cache,pendingSuspenseBoundaries:v.pendingSuspenseBoundaries,transitions:v.transitions},s.updateQueue.baseState=p,s.memoizedState=p,s.flags&256){f=Ds(Error(r(423)),s),s=bm(n,s,u,o,f);break e}else if(u!==f){f=Ds(Error(r(424)),s),s=bm(n,s,u,o,f);break e}else for(zt=Zn(s.stateNode.containerInfo.firstChild),Ut=s,$e=!0,an=null,o=Lp(s,null,u,o),s.child=o;o;)o.flags=o.flags&-3|4096,o=o.sibling;else{if(Rs(),u===f){s=Mn(n,s,o);break e}Ct(n,s,u,o)}s=s.child}return s;case 5:return Vp(s),n===null&&zu(s),u=s.type,f=s.pendingProps,p=n!==null?n.memoizedProps:null,v=f.children,Du(u,f)?v=null:p!==null&&Du(u,p)&&(s.flags|=32),wm(n,s),Ct(n,s,v,o),s.child;case 6:return n===null&&zu(s),null;case 13:return Em(n,s,o);case 4:return Yu(s,s.stateNode.containerInfo),u=s.pendingProps,n===null?s.child=Ps(s,null,u,o):Ct(n,s,u,o),s.child;case 11:return u=s.type,f=s.pendingProps,f=s.elementType===u?f:ln(u,f),mm(n,s,u,f,o);case 7:return Ct(n,s,s.pendingProps,o),s.child;case 8:return Ct(n,s,s.pendingProps.children,o),s.child;case 12:return Ct(n,s,s.pendingProps.children,o),s.child;case 10:e:{if(u=s.type._context,f=s.pendingProps,p=s.memoizedProps,v=f.value,Ie(Sa,u._currentValue),u._currentValue=v,p!==null)if(on(p.value,v)){if(p.children===f.children&&!Rt.current){s=Mn(n,s,o);break e}}else for(p=s.child,p!==null&&(p.return=s);p!==null;){var C=p.dependencies;if(C!==null){v=p.child;for(var T=C.firstContext;T!==null;){if(T.context===u){if(p.tag===1){T=jn(-1,o&-o),T.tag=2;var F=p.updateQueue;if(F!==null){F=F.shared;var q=F.pending;q===null?T.next=T:(T.next=q.next,q.next=T),F.pending=T}}p.lanes|=o,T=p.alternate,T!==null&&(T.lanes|=o),Ku(p.return,o,s),C.lanes|=o;break}T=T.next}}else if(p.tag===10)v=p.type===s.type?null:p.child;else if(p.tag===18){if(v=p.return,v===null)throw Error(r(341));v.lanes|=o,C=v.alternate,C!==null&&(C.lanes|=o),Ku(v,o,s),v=p.sibling}else v=p.child;if(v!==null)v.return=p;else for(v=p;v!==null;){if(v===s){v=null;break}if(p=v.sibling,p!==null){p.return=v.return,v=p;break}v=v.return}p=v}Ct(n,s,f.children,o),s=s.child}return s;case 9:return f=s.type,u=s.pendingProps.children,Os(s,o),f=Qt(f),u=u(f),s.flags|=1,Ct(n,s,u,o),s.child;case 14:return u=s.type,f=ln(u,s.pendingProps),f=ln(u.type,f),gm(n,s,u,f,o);case 15:return ym(n,s,s.type,s.pendingProps,o);case 17:return u=s.type,f=s.pendingProps,f=s.elementType===u?f:ln(u,f),Da(n,s),s.tag=1,Pt(u)?(n=!0,ma(s)):n=!1,Os(s,o),lm(s,u,f),uc(s,u,f,o),hc(null,s,u,!0,n,o);case 19:return km(n,s,o);case 22:return vm(n,s,o)}throw Error(r(156,s.tag))};function Gm(n,s){return Rh(n,s)}function IS(n,s,o,u){this.tag=n,this.key=o,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=s,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=u,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Xt(n,s,o,u){return new IS(n,s,o,u)}function Dc(n){return n=n.prototype,!(!n||!n.isReactComponent)}function VS(n){if(typeof n=="function")return Dc(n)?1:0;if(n!=null){if(n=n.$$typeof,n===Pe)return 11;if(n===je)return 14}return 2}function cr(n,s){var o=n.alternate;return o===null?(o=Xt(n.tag,s,n.key,n.mode),o.elementType=n.elementType,o.type=n.type,o.stateNode=n.stateNode,o.alternate=n,n.alternate=o):(o.pendingProps=s,o.type=n.type,o.flags=0,o.subtreeFlags=0,o.deletions=null),o.flags=n.flags&14680064,o.childLanes=n.childLanes,o.lanes=n.lanes,o.child=n.child,o.memoizedProps=n.memoizedProps,o.memoizedState=n.memoizedState,o.updateQueue=n.updateQueue,s=n.dependencies,o.dependencies=s===null?null:{lanes:s.lanes,firstContext:s.firstContext},o.sibling=n.sibling,o.index=n.index,o.ref=n.ref,o}function qa(n,s,o,u,f,p){var v=2;if(u=n,typeof n=="function")Dc(n)&&(v=1);else if(typeof n=="string")v=5;else e:switch(n){case X:return $r(o.children,f,p,s);case I:v=8,f|=8;break;case ee:return n=Xt(12,o,s,f|2),n.elementType=ee,n.lanes=p,n;case ze:return n=Xt(13,o,s,f),n.elementType=ze,n.lanes=p,n;case _e:return n=Xt(19,o,s,f),n.elementType=_e,n.lanes=p,n;case ge:return Ha(o,f,p,s);default:if(typeof n=="object"&&n!==null)switch(n.$$typeof){case ce:v=10;break e;case ue:v=9;break e;case Pe:v=11;break e;case je:v=14;break e;case Ae:v=16,u=null;break e}throw Error(r(130,n==null?n:typeof n,""))}return s=Xt(v,o,s,f),s.elementType=n,s.type=u,s.lanes=p,s}function $r(n,s,o,u){return n=Xt(7,n,u,s),n.lanes=o,n}function Ha(n,s,o,u){return n=Xt(22,n,u,s),n.elementType=ge,n.lanes=o,n.stateNode={isHidden:!1},n}function Lc(n,s,o){return n=Xt(6,n,null,s),n.lanes=o,n}function jc(n,s,o){return s=Xt(4,n.children!==null?n.children:[],n.key,s),s.lanes=o,s.stateNode={containerInfo:n.containerInfo,pendingChildren:null,implementation:n.implementation},s}function BS(n,s,o,u,f){this.tag=s,this.containerInfo=n,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=lu(0),this.expirationTimes=lu(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=lu(0),this.identifierPrefix=u,this.onRecoverableError=f,this.mutableSourceEagerHydrationData=null}function Mc(n,s,o,u,f,p,v,C,T){return n=new BS(n,s,o,C,T),s===1?(s=1,p===!0&&(s|=8)):s=0,p=Xt(3,null,null,s),n.current=p,p.stateNode=n,p.memoizedState={element:u,isDehydrated:o,cache:null,transitions:null,pendingSuspenseBoundaries:null},Gu(p),n}function US(n,s,o){var u=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(e){console.error(e)}}return t(),$c.exports=tb(),$c.exports}var cg;function nb(){if(cg)return Za;cg=1;var t=Kv();return Za.createRoot=t.createRoot,Za.hydrateRoot=t.hydrateRoot,Za}var rb=nb();const sb=Wv(rb),ib=20,ob=1e6,$n={ADD_TOAST:"ADD_TOAST",UPDATE_TOAST:"UPDATE_TOAST",DISMISS_TOAST:"DISMISS_TOAST",REMOVE_TOAST:"REMOVE_TOAST"};let Wc=0;function ab(){return Wc=(Wc+1)%Number.MAX_VALUE,Wc.toString()}const Kc=new Map,dg=t=>{if(Kc.has(t))return;const e=setTimeout(()=>{Kc.delete(t),po({type:$n.REMOVE_TOAST,toastId:t})},ob);Kc.set(t,e)},lb=(t,e)=>{switch(e.type){case $n.ADD_TOAST:return{...t,toasts:[e.toast,...t.toasts].slice(0,ib)};case $n.UPDATE_TOAST:return{...t,toasts:t.toasts.map(r=>r.id===e.toast.id?{...r,...e.toast}:r)};case $n.DISMISS_TOAST:{const{toastId:r}=e;return r?dg(r):t.toasts.forEach(i=>{dg(i.id)}),{...t,toasts:t.toasts.map(i=>i.id===r||r===void 0?{...i,open:!1}:i)}}case $n.REMOVE_TOAST:return e.toastId===void 0?{...t,toasts:[]}:{...t,toasts:t.toasts.filter(r=>r.id!==e.toastId)}}},cl=[];let dl={toasts:[]};function po(t){dl=lb(dl,t),cl.forEach(e=>{e(dl)})}function ub({...t}){const e=ab(),r=a=>po({type:$n.UPDATE_TOAST,toast:{...a,id:e}}),i=()=>po({type:$n.DISMISS_TOAST,toastId:e});return po({type:$n.ADD_TOAST,toast:{...t,id:e,open:!0,onOpenChange:a=>{a||i()}}}),{id:e,dismiss:i,update:r}}function cb(){const[t,e]=V.useState(dl);return V.useEffect(()=>(cl.push(e),()=>{const r=cl.indexOf(e);r>-1&&cl.splice(r,1)}),[t]),{...t,toast:ub,dismiss:r=>po({type:$n.DISMISS_TOAST,toastId:r})}}function Qv(t){var e,r,i="";if(typeof t=="string"||typeof t=="number")i+=t;else if(typeof t=="object")if(Array.isArray(t)){var a=t.length;for(e=0;etypeof t=="boolean"?`${t}`:t===0?"0":t,hg=Gv,db=(t,e)=>r=>{var i;if((e==null?void 0:e.variants)==null)return hg(t,r==null?void 0:r.class,r==null?void 0:r.className);const{variants:a,defaultVariants:l}=e,c=Object.keys(a).map(m=>{const g=r==null?void 0:r[m],y=l==null?void 0:l[m];if(g===null)return null;const w=fg(g)||fg(y);return a[m][w]}),d=r&&Object.entries(r).reduce((m,g)=>{let[y,w]=g;return w===void 0||(m[y]=w),m},{}),h=e==null||(i=e.compoundVariants)===null||i===void 0?void 0:i.reduce((m,g)=>{let{class:y,className:w,...k}=g;return Object.entries(k).every(_=>{let[b,x]=_;return Array.isArray(x)?x.includes({...l,...d}[b]):{...l,...d}[b]===x})?[...m,y,w]:m},[]);return hg(t,c,h,r==null?void 0:r.class,r==null?void 0:r.className)};/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const fb=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Yv=(...t)=>t.filter((e,r,i)=>!!e&&e.trim()!==""&&i.indexOf(e)===r).join(" ").trim();/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */var hb={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.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const pb=V.forwardRef(({color:t="currentColor",size:e=24,strokeWidth:r=2,absoluteStrokeWidth:i,className:a="",children:l,iconNode:c,...d},h)=>V.createElement("svg",{ref:h,...hb,width:e,height:e,stroke:t,strokeWidth:i?Number(r)*24/Number(e):r,className:Yv("lucide",a),...d},[...c.map(([m,g])=>V.createElement(m,g)),...Array.isArray(l)?l:[l]]));/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const rn=(t,e)=>{const r=V.forwardRef(({className:i,...a},l)=>V.createElement(pb,{ref:l,iconNode:e,className:Yv(`lucide-${fb(t)}`,i),...a}));return r.displayName=`${t}`,r};/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const mb=[["path",{d:"M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z",key:"hh9hay"}],["path",{d:"m3.3 7 8.7 5 8.7-5",key:"g66t2b"}],["path",{d:"M12 22V12",key:"d0xqtd"}]],gb=rn("Box",mb);/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const yb=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],vb=rn("Check",yb);/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const wb=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],xb=rn("ChevronDown",wb);/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Sb=[["polyline",{points:"16 18 22 12 16 6",key:"z7tu5w"}],["polyline",{points:"8 6 2 12 8 18",key:"1eg1df"}]],bb=rn("Code",Sb);/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Eb=[["rect",{width:"16",height:"16",x:"4",y:"4",rx:"2",key:"14l7u7"}],["rect",{width:"6",height:"6",x:"9",y:"9",rx:"1",key:"5aljv4"}],["path",{d:"M15 2v2",key:"13l42r"}],["path",{d:"M15 20v2",key:"15mkzm"}],["path",{d:"M2 15h2",key:"1gxd5l"}],["path",{d:"M2 9h2",key:"1bbxkp"}],["path",{d:"M20 15h2",key:"19e6y8"}],["path",{d:"M20 9h2",key:"19tzq7"}],["path",{d:"M9 2v2",key:"165o2o"}],["path",{d:"M9 20v2",key:"i2bqo8"}]],Cb=rn("Cpu",Eb);/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const kb=[["line",{x1:"4",x2:"20",y1:"12",y2:"12",key:"1e0a9i"}],["line",{x1:"4",x2:"20",y1:"6",y2:"6",key:"1owob3"}],["line",{x1:"4",x2:"20",y1:"18",y2:"18",key:"yk5zj1"}]],Tb=rn("Menu",kb);/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const _b=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],Rb=rn("Plus",_b);/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Pb=[["path",{d:"M4.9 19.1C1 15.2 1 8.8 4.9 4.9",key:"1vaf9d"}],["path",{d:"M7.8 16.2c-2.3-2.3-2.3-6.1 0-8.5",key:"u1ii0m"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}],["path",{d:"M16.2 7.8c2.3 2.3 2.3 6.1 0 8.5",key:"1j5fej"}],["path",{d:"M19.1 4.9C23 8.8 23 15.1 19.1 19",key:"10b0cb"}]],Ab=rn("Radio",Pb);/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Ob=[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]],Nb=rn("Send",Ob);/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Db=[["polyline",{points:"4 17 10 11 4 5",key:"akl6gq"}],["line",{x1:"12",x2:"20",y1:"19",y2:"19",key:"q2wloq"}]],Lb=rn("Terminal",Db);/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const jb=[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z",key:"cbrjhi"}]],Mb=rn("Wrench",jb);/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Fb=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Xv=rn("X",Fb),Ib=(t,e)=>{const r=new Array(t.length+e.length);for(let i=0;i({classGroupId:t,validator:e}),Jv=(t=new Map,e=null,r)=>({nextPart:t,validators:e,classGroupId:r}),bl="-",pg=[],Bb="arbitrary..",Ub=t=>{const e=$b(t),{conflictingClassGroups:r,conflictingClassGroupModifiers:i}=t;return{getClassGroupId:c=>{if(c.startsWith("[")&&c.endsWith("]"))return zb(c);const d=c.split(bl),h=d[0]===""&&d.length>1?1:0;return Zv(d,h,e)},getConflictingClassGroupIds:(c,d)=>{if(d){const h=i[c],m=r[c];return h?m?Ib(m,h):h:m||pg}return r[c]||pg}}},Zv=(t,e,r)=>{if(t.length-e===0)return r.classGroupId;const a=t[e],l=r.nextPart.get(a);if(l){const m=Zv(t,e+1,l);if(m)return m}const c=r.validators;if(c===null)return;const d=e===0?t.join(bl):t.slice(e).join(bl),h=c.length;for(let m=0;mt.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const e=t.slice(1,-1),r=e.indexOf(":"),i=e.slice(0,r);return i?Bb+i:void 0})(),$b=t=>{const{theme:e,classGroups:r}=t;return qb(r,e)},qb=(t,e)=>{const r=Jv();for(const i in t){const a=t[i];ff(a,r,i,e)}return r},ff=(t,e,r,i)=>{const a=t.length;for(let l=0;l{if(typeof t=="string"){Wb(t,e,r);return}if(typeof t=="function"){Kb(t,e,r,i);return}Qb(t,e,r,i)},Wb=(t,e,r)=>{const i=t===""?e:e0(e,t);i.classGroupId=r},Kb=(t,e,r,i)=>{if(Gb(t)){ff(t(i),e,r,i);return}e.validators===null&&(e.validators=[]),e.validators.push(Vb(r,t))},Qb=(t,e,r,i)=>{const a=Object.entries(t),l=a.length;for(let c=0;c{let r=t;const i=e.split(bl),a=i.length;for(let l=0;l"isThemeGetter"in t&&t.isThemeGetter===!0,Yb=t=>{if(t<1)return{get:()=>{},set:()=>{}};let e=0,r=Object.create(null),i=Object.create(null);const a=(l,c)=>{r[l]=c,e++,e>t&&(e=0,i=r,r=Object.create(null))};return{get(l){let c=r[l];if(c!==void 0)return c;if((c=i[l])!==void 0)return a(l,c),c},set(l,c){l in r?r[l]=c:a(l,c)}}},vd="!",mg=":",Xb=[],gg=(t,e,r,i,a)=>({modifiers:t,hasImportantModifier:e,baseClassName:r,maybePostfixModifierPosition:i,isExternal:a}),Jb=t=>{const{prefix:e,experimentalParseClassName:r}=t;let i=a=>{const l=[];let c=0,d=0,h=0,m;const g=a.length;for(let b=0;bh?m-h:void 0;return gg(l,k,w,_)};if(e){const a=e+mg,l=i;i=c=>c.startsWith(a)?l(c.slice(a.length)):gg(Xb,!1,c,void 0,!0)}if(r){const a=i;i=l=>r({className:l,parseClassName:a})}return i},Zb=t=>{const e=new Map;return t.orderSensitiveModifiers.forEach((r,i)=>{e.set(r,1e6+i)}),r=>{const i=[];let a=[];for(let l=0;l0&&(a.sort(),i.push(...a),a=[]),i.push(c)):a.push(c)}return a.length>0&&(a.sort(),i.push(...a)),i}},eE=t=>({cache:Yb(t.cacheSize),parseClassName:Jb(t),sortModifiers:Zb(t),...Ub(t)}),tE=/\s+/,nE=(t,e)=>{const{parseClassName:r,getClassGroupId:i,getConflictingClassGroupIds:a,sortModifiers:l}=e,c=[],d=t.trim().split(tE);let h="";for(let m=d.length-1;m>=0;m-=1){const g=d[m],{isExternal:y,modifiers:w,hasImportantModifier:k,baseClassName:_,maybePostfixModifierPosition:b}=r(g);if(y){h=g+(h.length>0?" "+h:h);continue}let x=!!b,E=i(x?_.substring(0,b):_);if(!E){if(!x){h=g+(h.length>0?" "+h:h);continue}if(E=i(_),!E){h=g+(h.length>0?" "+h:h);continue}x=!1}const N=w.length===0?"":w.length===1?w[0]:l(w).join(":"),A=k?N+vd:N,D=A+E;if(c.indexOf(D)>-1)continue;c.push(D);const B=a(E,x);for(let W=0;W0?" "+h:h)}return h},rE=(...t)=>{let e=0,r,i,a="";for(;e{if(typeof t=="string")return t;let e,r="";for(let i=0;i{let r,i,a,l;const c=h=>{const m=e.reduce((g,y)=>y(g),t());return r=eE(m),i=r.cache.get,a=r.cache.set,l=d,d(h)},d=h=>{const m=i(h);if(m)return m;const g=nE(h,r);return a(h,g),g};return l=c,(...h)=>l(rE(...h))},iE=[],st=t=>{const e=r=>r[t]||iE;return e.isThemeGetter=!0,e},n0=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,r0=/^\((?:(\w[\w-]*):)?(.+)\)$/i,oE=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,aE=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,lE=/\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$/,uE=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,cE=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,dE=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,fr=t=>oE.test(t),be=t=>!!t&&!Number.isNaN(Number(t)),hr=t=>!!t&&Number.isInteger(Number(t)),Qc=t=>t.endsWith("%")&&be(t.slice(0,-1)),In=t=>aE.test(t),s0=()=>!0,fE=t=>lE.test(t)&&!uE.test(t),hf=()=>!1,hE=t=>cE.test(t),pE=t=>dE.test(t),mE=t=>!ne(t)&&!re(t),gE=t=>Pr(t,a0,hf),ne=t=>n0.test(t),qr=t=>Pr(t,l0,fE),yg=t=>Pr(t,CE,be),yE=t=>Pr(t,c0,s0),vE=t=>Pr(t,u0,hf),vg=t=>Pr(t,i0,hf),wE=t=>Pr(t,o0,pE),el=t=>Pr(t,d0,hE),re=t=>r0.test(t),to=t=>ds(t,l0),xE=t=>ds(t,u0),wg=t=>ds(t,i0),SE=t=>ds(t,a0),bE=t=>ds(t,o0),tl=t=>ds(t,d0,!0),EE=t=>ds(t,c0,!0),Pr=(t,e,r)=>{const i=n0.exec(t);return i?i[1]?e(i[1]):r(i[2]):!1},ds=(t,e,r=!1)=>{const i=r0.exec(t);return i?i[1]?e(i[1]):r:!1},i0=t=>t==="position"||t==="percentage",o0=t=>t==="image"||t==="url",a0=t=>t==="length"||t==="size"||t==="bg-size",l0=t=>t==="length",CE=t=>t==="number",u0=t=>t==="family-name",c0=t=>t==="number"||t==="weight",d0=t=>t==="shadow",kE=()=>{const t=st("color"),e=st("font"),r=st("text"),i=st("font-weight"),a=st("tracking"),l=st("leading"),c=st("breakpoint"),d=st("container"),h=st("spacing"),m=st("radius"),g=st("shadow"),y=st("inset-shadow"),w=st("text-shadow"),k=st("drop-shadow"),_=st("blur"),b=st("perspective"),x=st("aspect"),E=st("ease"),N=st("animate"),A=()=>["auto","avoid","all","avoid-page","page","left","right","column"],D=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],B=()=>[...D(),re,ne],W=()=>["auto","hidden","clip","visible","scroll"],X=()=>["auto","contain","none"],I=()=>[re,ne,h],ee=()=>[fr,"full","auto",...I()],ce=()=>[hr,"none","subgrid",re,ne],ue=()=>["auto",{span:["full",hr,re,ne]},hr,re,ne],Pe=()=>[hr,"auto",re,ne],ze=()=>["auto","min","max","fr",re,ne],_e=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],je=()=>["start","end","center","stretch","center-safe","end-safe"],Ae=()=>["auto",...I()],ge=()=>[fr,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...I()],Q=()=>[fr,"screen","full","dvw","lvw","svw","min","max","fit",...I()],oe=()=>[fr,"screen","full","lh","dvh","lvh","svh","min","max","fit",...I()],U=()=>[t,re,ne],O=()=>[...D(),wg,vg,{position:[re,ne]}],z=()=>["no-repeat",{repeat:["","x","y","space","round"]}],xe=()=>["auto","cover","contain",SE,gE,{size:[re,ne]}],J=()=>[Qc,to,qr],le=()=>["","none","full",m,re,ne],pe=()=>["",be,to,qr],Re=()=>["solid","dashed","dotted","double"],Se=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],ve=()=>[be,Qc,wg,vg],Fe=()=>["","none",_,re,ne],ye=()=>["none",be,re,ne],it=()=>["none",be,re,ne],Et=()=>[be,re,ne],Vt=()=>[fr,"full",...I()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[In],breakpoint:[In],color:[s0],container:[In],"drop-shadow":[In],ease:["in","out","in-out"],font:[mE],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[In],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[In],shadow:[In],spacing:["px",be],text:[In],"text-shadow":[In],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",fr,ne,re,x]}],container:["container"],columns:[{columns:[be,ne,re,d]}],"break-after":[{"break-after":A()}],"break-before":[{"break-before":A()}],"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"],sr:["sr-only","not-sr-only"],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:B()}],overflow:[{overflow:W()}],"overflow-x":[{"overflow-x":W()}],"overflow-y":[{"overflow-y":W()}],overscroll:[{overscroll:X()}],"overscroll-x":[{"overscroll-x":X()}],"overscroll-y":[{"overscroll-y":X()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:ee()}],"inset-x":[{"inset-x":ee()}],"inset-y":[{"inset-y":ee()}],start:[{"inset-s":ee(),start:ee()}],end:[{"inset-e":ee(),end:ee()}],"inset-bs":[{"inset-bs":ee()}],"inset-be":[{"inset-be":ee()}],top:[{top:ee()}],right:[{right:ee()}],bottom:[{bottom:ee()}],left:[{left:ee()}],visibility:["visible","invisible","collapse"],z:[{z:[hr,"auto",re,ne]}],basis:[{basis:[fr,"full","auto",d,...I()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[be,fr,"auto","initial","none",ne]}],grow:[{grow:["",be,re,ne]}],shrink:[{shrink:["",be,re,ne]}],order:[{order:[hr,"first","last","none",re,ne]}],"grid-cols":[{"grid-cols":ce()}],"col-start-end":[{col:ue()}],"col-start":[{"col-start":Pe()}],"col-end":[{"col-end":Pe()}],"grid-rows":[{"grid-rows":ce()}],"row-start-end":[{row:ue()}],"row-start":[{"row-start":Pe()}],"row-end":[{"row-end":Pe()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":ze()}],"auto-rows":[{"auto-rows":ze()}],gap:[{gap:I()}],"gap-x":[{"gap-x":I()}],"gap-y":[{"gap-y":I()}],"justify-content":[{justify:[..._e(),"normal"]}],"justify-items":[{"justify-items":[...je(),"normal"]}],"justify-self":[{"justify-self":["auto",...je()]}],"align-content":[{content:["normal",..._e()]}],"align-items":[{items:[...je(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...je(),{baseline:["","last"]}]}],"place-content":[{"place-content":_e()}],"place-items":[{"place-items":[...je(),"baseline"]}],"place-self":[{"place-self":["auto",...je()]}],p:[{p:I()}],px:[{px:I()}],py:[{py:I()}],ps:[{ps:I()}],pe:[{pe:I()}],pbs:[{pbs:I()}],pbe:[{pbe:I()}],pt:[{pt:I()}],pr:[{pr:I()}],pb:[{pb:I()}],pl:[{pl:I()}],m:[{m:Ae()}],mx:[{mx:Ae()}],my:[{my:Ae()}],ms:[{ms:Ae()}],me:[{me:Ae()}],mbs:[{mbs:Ae()}],mbe:[{mbe:Ae()}],mt:[{mt:Ae()}],mr:[{mr:Ae()}],mb:[{mb:Ae()}],ml:[{ml:Ae()}],"space-x":[{"space-x":I()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":I()}],"space-y-reverse":["space-y-reverse"],size:[{size:ge()}],"inline-size":[{inline:["auto",...Q()]}],"min-inline-size":[{"min-inline":["auto",...Q()]}],"max-inline-size":[{"max-inline":["none",...Q()]}],"block-size":[{block:["auto",...oe()]}],"min-block-size":[{"min-block":["auto",...oe()]}],"max-block-size":[{"max-block":["none",...oe()]}],w:[{w:[d,"screen",...ge()]}],"min-w":[{"min-w":[d,"screen","none",...ge()]}],"max-w":[{"max-w":[d,"screen","none","prose",{screen:[c]},...ge()]}],h:[{h:["screen","lh",...ge()]}],"min-h":[{"min-h":["screen","lh","none",...ge()]}],"max-h":[{"max-h":["screen","lh",...ge()]}],"font-size":[{text:["base",r,to,qr]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[i,EE,yE]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Qc,ne]}],"font-family":[{font:[xE,vE,e]}],"font-features":[{"font-features":[ne]}],"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-fractions"],tracking:[{tracking:[a,re,ne]}],"line-clamp":[{"line-clamp":[be,"none",re,yg]}],leading:[{leading:[l,...I()]}],"list-image":[{"list-image":["none",re,ne]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",re,ne]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:U()}],"text-color":[{text:U()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Re(),"wavy"]}],"text-decoration-thickness":[{decoration:[be,"from-font","auto",re,qr]}],"text-decoration-color":[{decoration:U()}],"underline-offset":[{"underline-offset":[be,"auto",re,ne]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:I()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",re,ne]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",re,ne]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:O()}],"bg-repeat":[{bg:z()}],"bg-size":[{bg:xe()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},hr,re,ne],radial:["",re,ne],conic:[hr,re,ne]},bE,wE]}],"bg-color":[{bg:U()}],"gradient-from-pos":[{from:J()}],"gradient-via-pos":[{via:J()}],"gradient-to-pos":[{to:J()}],"gradient-from":[{from:U()}],"gradient-via":[{via:U()}],"gradient-to":[{to:U()}],rounded:[{rounded:le()}],"rounded-s":[{"rounded-s":le()}],"rounded-e":[{"rounded-e":le()}],"rounded-t":[{"rounded-t":le()}],"rounded-r":[{"rounded-r":le()}],"rounded-b":[{"rounded-b":le()}],"rounded-l":[{"rounded-l":le()}],"rounded-ss":[{"rounded-ss":le()}],"rounded-se":[{"rounded-se":le()}],"rounded-ee":[{"rounded-ee":le()}],"rounded-es":[{"rounded-es":le()}],"rounded-tl":[{"rounded-tl":le()}],"rounded-tr":[{"rounded-tr":le()}],"rounded-br":[{"rounded-br":le()}],"rounded-bl":[{"rounded-bl":le()}],"border-w":[{border:pe()}],"border-w-x":[{"border-x":pe()}],"border-w-y":[{"border-y":pe()}],"border-w-s":[{"border-s":pe()}],"border-w-e":[{"border-e":pe()}],"border-w-bs":[{"border-bs":pe()}],"border-w-be":[{"border-be":pe()}],"border-w-t":[{"border-t":pe()}],"border-w-r":[{"border-r":pe()}],"border-w-b":[{"border-b":pe()}],"border-w-l":[{"border-l":pe()}],"divide-x":[{"divide-x":pe()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":pe()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...Re(),"hidden","none"]}],"divide-style":[{divide:[...Re(),"hidden","none"]}],"border-color":[{border:U()}],"border-color-x":[{"border-x":U()}],"border-color-y":[{"border-y":U()}],"border-color-s":[{"border-s":U()}],"border-color-e":[{"border-e":U()}],"border-color-bs":[{"border-bs":U()}],"border-color-be":[{"border-be":U()}],"border-color-t":[{"border-t":U()}],"border-color-r":[{"border-r":U()}],"border-color-b":[{"border-b":U()}],"border-color-l":[{"border-l":U()}],"divide-color":[{divide:U()}],"outline-style":[{outline:[...Re(),"none","hidden"]}],"outline-offset":[{"outline-offset":[be,re,ne]}],"outline-w":[{outline:["",be,to,qr]}],"outline-color":[{outline:U()}],shadow:[{shadow:["","none",g,tl,el]}],"shadow-color":[{shadow:U()}],"inset-shadow":[{"inset-shadow":["none",y,tl,el]}],"inset-shadow-color":[{"inset-shadow":U()}],"ring-w":[{ring:pe()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:U()}],"ring-offset-w":[{"ring-offset":[be,qr]}],"ring-offset-color":[{"ring-offset":U()}],"inset-ring-w":[{"inset-ring":pe()}],"inset-ring-color":[{"inset-ring":U()}],"text-shadow":[{"text-shadow":["none",w,tl,el]}],"text-shadow-color":[{"text-shadow":U()}],opacity:[{opacity:[be,re,ne]}],"mix-blend":[{"mix-blend":[...Se(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":Se()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[be]}],"mask-image-linear-from-pos":[{"mask-linear-from":ve()}],"mask-image-linear-to-pos":[{"mask-linear-to":ve()}],"mask-image-linear-from-color":[{"mask-linear-from":U()}],"mask-image-linear-to-color":[{"mask-linear-to":U()}],"mask-image-t-from-pos":[{"mask-t-from":ve()}],"mask-image-t-to-pos":[{"mask-t-to":ve()}],"mask-image-t-from-color":[{"mask-t-from":U()}],"mask-image-t-to-color":[{"mask-t-to":U()}],"mask-image-r-from-pos":[{"mask-r-from":ve()}],"mask-image-r-to-pos":[{"mask-r-to":ve()}],"mask-image-r-from-color":[{"mask-r-from":U()}],"mask-image-r-to-color":[{"mask-r-to":U()}],"mask-image-b-from-pos":[{"mask-b-from":ve()}],"mask-image-b-to-pos":[{"mask-b-to":ve()}],"mask-image-b-from-color":[{"mask-b-from":U()}],"mask-image-b-to-color":[{"mask-b-to":U()}],"mask-image-l-from-pos":[{"mask-l-from":ve()}],"mask-image-l-to-pos":[{"mask-l-to":ve()}],"mask-image-l-from-color":[{"mask-l-from":U()}],"mask-image-l-to-color":[{"mask-l-to":U()}],"mask-image-x-from-pos":[{"mask-x-from":ve()}],"mask-image-x-to-pos":[{"mask-x-to":ve()}],"mask-image-x-from-color":[{"mask-x-from":U()}],"mask-image-x-to-color":[{"mask-x-to":U()}],"mask-image-y-from-pos":[{"mask-y-from":ve()}],"mask-image-y-to-pos":[{"mask-y-to":ve()}],"mask-image-y-from-color":[{"mask-y-from":U()}],"mask-image-y-to-color":[{"mask-y-to":U()}],"mask-image-radial":[{"mask-radial":[re,ne]}],"mask-image-radial-from-pos":[{"mask-radial-from":ve()}],"mask-image-radial-to-pos":[{"mask-radial-to":ve()}],"mask-image-radial-from-color":[{"mask-radial-from":U()}],"mask-image-radial-to-color":[{"mask-radial-to":U()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":D()}],"mask-image-conic-pos":[{"mask-conic":[be]}],"mask-image-conic-from-pos":[{"mask-conic-from":ve()}],"mask-image-conic-to-pos":[{"mask-conic-to":ve()}],"mask-image-conic-from-color":[{"mask-conic-from":U()}],"mask-image-conic-to-color":[{"mask-conic-to":U()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:O()}],"mask-repeat":[{mask:z()}],"mask-size":[{mask:xe()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",re,ne]}],filter:[{filter:["","none",re,ne]}],blur:[{blur:Fe()}],brightness:[{brightness:[be,re,ne]}],contrast:[{contrast:[be,re,ne]}],"drop-shadow":[{"drop-shadow":["","none",k,tl,el]}],"drop-shadow-color":[{"drop-shadow":U()}],grayscale:[{grayscale:["",be,re,ne]}],"hue-rotate":[{"hue-rotate":[be,re,ne]}],invert:[{invert:["",be,re,ne]}],saturate:[{saturate:[be,re,ne]}],sepia:[{sepia:["",be,re,ne]}],"backdrop-filter":[{"backdrop-filter":["","none",re,ne]}],"backdrop-blur":[{"backdrop-blur":Fe()}],"backdrop-brightness":[{"backdrop-brightness":[be,re,ne]}],"backdrop-contrast":[{"backdrop-contrast":[be,re,ne]}],"backdrop-grayscale":[{"backdrop-grayscale":["",be,re,ne]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[be,re,ne]}],"backdrop-invert":[{"backdrop-invert":["",be,re,ne]}],"backdrop-opacity":[{"backdrop-opacity":[be,re,ne]}],"backdrop-saturate":[{"backdrop-saturate":[be,re,ne]}],"backdrop-sepia":[{"backdrop-sepia":["",be,re,ne]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":I()}],"border-spacing-x":[{"border-spacing-x":I()}],"border-spacing-y":[{"border-spacing-y":I()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",re,ne]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[be,"initial",re,ne]}],ease:[{ease:["linear","initial",E,re,ne]}],delay:[{delay:[be,re,ne]}],animate:[{animate:["none",N,re,ne]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[b,re,ne]}],"perspective-origin":[{"perspective-origin":B()}],rotate:[{rotate:ye()}],"rotate-x":[{"rotate-x":ye()}],"rotate-y":[{"rotate-y":ye()}],"rotate-z":[{"rotate-z":ye()}],scale:[{scale:it()}],"scale-x":[{"scale-x":it()}],"scale-y":[{"scale-y":it()}],"scale-z":[{"scale-z":it()}],"scale-3d":["scale-3d"],skew:[{skew:Et()}],"skew-x":[{"skew-x":Et()}],"skew-y":[{"skew-y":Et()}],transform:[{transform:[re,ne,"","none","gpu","cpu"]}],"transform-origin":[{origin:B()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Vt()}],"translate-x":[{"translate-x":Vt()}],"translate-y":[{"translate-y":Vt()}],"translate-z":[{"translate-z":Vt()}],"translate-none":["translate-none"],accent:[{accent:U()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:U()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],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",re,ne]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":I()}],"scroll-mx":[{"scroll-mx":I()}],"scroll-my":[{"scroll-my":I()}],"scroll-ms":[{"scroll-ms":I()}],"scroll-me":[{"scroll-me":I()}],"scroll-mbs":[{"scroll-mbs":I()}],"scroll-mbe":[{"scroll-mbe":I()}],"scroll-mt":[{"scroll-mt":I()}],"scroll-mr":[{"scroll-mr":I()}],"scroll-mb":[{"scroll-mb":I()}],"scroll-ml":[{"scroll-ml":I()}],"scroll-p":[{"scroll-p":I()}],"scroll-px":[{"scroll-px":I()}],"scroll-py":[{"scroll-py":I()}],"scroll-ps":[{"scroll-ps":I()}],"scroll-pe":[{"scroll-pe":I()}],"scroll-pbs":[{"scroll-pbs":I()}],"scroll-pbe":[{"scroll-pbe":I()}],"scroll-pt":[{"scroll-pt":I()}],"scroll-pr":[{"scroll-pr":I()}],"scroll-pb":[{"scroll-pb":I()}],"scroll-pl":[{"scroll-pl":I()}],"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",re,ne]}],fill:[{fill:["none",...U()]}],"stroke-w":[{stroke:[be,to,qr,yg]}],stroke:[{stroke:["none",...U()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","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","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","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-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","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-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","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"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","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-pbs","scroll-pbe","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"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},TE=sE(kE);function No(...t){return TE(Gv(t))}const f0=V.forwardRef(({...t},e)=>S.jsx("div",{ref:e,className:"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]",...t}));f0.displayName="ToastProvider";const h0=V.forwardRef(({...t},e)=>S.jsx("div",{ref:e,className:"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]",...t}));h0.displayName="ToastViewport";const _E=db("group pointer-events-auto relative flex w-full items-center justify-between space-x-4 overflow-hidden rounded-md border p-6 pr-8 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"}}),p0=V.forwardRef(({className:t,variant:e,...r},i)=>S.jsx("div",{ref:i,className:No(_E({variant:e}),t),...r}));p0.displayName="Toast";const RE=V.forwardRef(({className:t,...e},r)=>S.jsx("div",{ref:r,className:No("inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium ring-offset-background transition-colors hover:bg-secondary focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 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",t),...e}));RE.displayName="ToastAction";const m0=V.forwardRef(({className:t,...e},r)=>S.jsx("button",{ref:r,className:No("absolute right-2 top-2 rounded-md p-1 text-foreground/50 opacity-0 transition-opacity hover:text-foreground focus:opacity-100 focus:outline-none focus:ring-2 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",t),"toast-close":"",...e,children:S.jsx(Xv,{className:"h-4 w-4"})}));m0.displayName="ToastClose";const g0=V.forwardRef(({className:t,...e},r)=>S.jsx("div",{ref:r,className:No("text-sm font-semibold",t),...e}));g0.displayName="ToastTitle";const y0=V.forwardRef(({className:t,...e},r)=>S.jsx("div",{ref:r,className:No("text-sm opacity-90",t),...e}));y0.displayName="ToastDescription";function PE(){const{toasts:t}=cb();return S.jsxs(f0,{children:[t.map(function({id:e,title:r,description:i,action:a,...l}){return S.jsxs(p0,{...l,children:[S.jsxs("div",{className:"grid gap-1",children:[r&&S.jsx(g0,{children:r}),i&&S.jsx(y0,{children:i})]}),a,S.jsx(m0,{})]},e)}),S.jsx(h0,{})]})}var Do=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(t){return this.listeners.add(t),this.onSubscribe(),()=>{this.listeners.delete(t),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},AE={setTimeout:(t,e)=>setTimeout(t,e),clearTimeout:t=>clearTimeout(t),setInterval:(t,e)=>setInterval(t,e),clearInterval:t=>clearInterval(t)},gr,cf,Mv,OE=(Mv=class{constructor(){he(this,gr,AE);he(this,cf,!1)}setTimeoutProvider(t){Y(this,gr,t)}setTimeout(t,e){return R(this,gr).setTimeout(t,e)}clearTimeout(t){R(this,gr).clearTimeout(t)}setInterval(t,e){return R(this,gr).setInterval(t,e)}clearInterval(t){R(this,gr).clearInterval(t)}},gr=new WeakMap,cf=new WeakMap,Mv),Qr=new OE;function NE(t){setTimeout(t,0)}var ls=typeof window>"u"||"Deno"in globalThis;function Mt(){}function DE(t,e){return typeof t=="function"?t(e):t}function wd(t){return typeof t=="number"&&t>=0&&t!==1/0}function v0(t,e){return Math.max(t+(e||0)-Date.now(),0)}function kr(t,e){return typeof t=="function"?t(e):t}function tn(t,e){return typeof t=="function"?t(e):t}function xg(t,e){const{type:r="all",exact:i,fetchStatus:a,predicate:l,queryKey:c,stale:d}=t;if(c){if(i){if(e.queryHash!==pf(c,e.options))return!1}else if(!So(e.queryKey,c))return!1}if(r!=="all"){const h=e.isActive();if(r==="active"&&!h||r==="inactive"&&h)return!1}return!(typeof d=="boolean"&&e.isStale()!==d||a&&a!==e.state.fetchStatus||l&&!l(e))}function Sg(t,e){const{exact:r,status:i,predicate:a,mutationKey:l}=t;if(l){if(!e.options.mutationKey)return!1;if(r){if(xo(e.options.mutationKey)!==xo(l))return!1}else if(!So(e.options.mutationKey,l))return!1}return!(i&&e.state.status!==i||a&&!a(e))}function pf(t,e){return((e==null?void 0:e.queryKeyHashFn)||xo)(t)}function xo(t){return JSON.stringify(t,(e,r)=>Sd(r)?Object.keys(r).sort().reduce((i,a)=>(i[a]=r[a],i),{}):r)}function So(t,e){return t===e?!0:typeof t!=typeof e?!1:t&&e&&typeof t=="object"&&typeof e=="object"?Object.keys(e).every(r=>So(t[r],e[r])):!1}var LE=Object.prototype.hasOwnProperty;function w0(t,e,r=0){if(t===e)return t;if(r>500)return e;const i=bg(t)&&bg(e);if(!i&&!(Sd(t)&&Sd(e)))return e;const l=(i?t:Object.keys(t)).length,c=i?e:Object.keys(e),d=c.length,h=i?new Array(d):{};let m=0;for(let g=0;g{Qr.setTimeout(e,t)})}function bd(t,e,r){return typeof r.structuralSharing=="function"?r.structuralSharing(t,e):r.structuralSharing!==!1?w0(t,e):e}function ME(t,e,r=0){const i=[...t,e];return r&&i.length>r?i.slice(1):i}function FE(t,e,r=0){const i=[e,...t];return r&&i.length>r?i.slice(0,-1):i}var mf=Symbol();function x0(t,e){return!t.queryFn&&(e!=null&&e.initialPromise)?()=>e.initialPromise:!t.queryFn||t.queryFn===mf?()=>Promise.reject(new Error(`Missing queryFn: '${t.queryHash}'`)):t.queryFn}function S0(t,e){return typeof t=="function"?t(...e):!!t}function IE(t,e,r){let i=!1,a;return Object.defineProperty(t,"signal",{enumerable:!0,get:()=>(a??(a=e()),i||(i=!0,a.aborted?r():a.addEventListener("abort",r,{once:!0})),a)}),t}var Xr,yr,Ks,Fv,VE=(Fv=class extends Do{constructor(){super();he(this,Xr);he(this,yr);he(this,Ks);Y(this,Ks,e=>{if(!ls&&window.addEventListener){const r=()=>e();return window.addEventListener("visibilitychange",r,!1),()=>{window.removeEventListener("visibilitychange",r)}}})}onSubscribe(){R(this,yr)||this.setEventListener(R(this,Ks))}onUnsubscribe(){var e;this.hasListeners()||((e=R(this,yr))==null||e.call(this),Y(this,yr,void 0))}setEventListener(e){var r;Y(this,Ks,e),(r=R(this,yr))==null||r.call(this),Y(this,yr,e(i=>{typeof i=="boolean"?this.setFocused(i):this.onFocus()}))}setFocused(e){R(this,Xr)!==e&&(Y(this,Xr,e),this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach(r=>{r(e)})}isFocused(){var e;return typeof R(this,Xr)=="boolean"?R(this,Xr):((e=globalThis.document)==null?void 0:e.visibilityState)!=="hidden"}},Xr=new WeakMap,yr=new WeakMap,Ks=new WeakMap,Fv),gf=new VE;function Ed(){let t,e;const r=new Promise((a,l)=>{t=a,e=l});r.status="pending",r.catch(()=>{});function i(a){Object.assign(r,a),delete r.resolve,delete r.reject}return r.resolve=a=>{i({status:"fulfilled",value:a}),t(a)},r.reject=a=>{i({status:"rejected",reason:a}),e(a)},r}var BE=NE;function UE(){let t=[],e=0,r=d=>{d()},i=d=>{d()},a=BE;const l=d=>{e?t.push(d):a(()=>{r(d)})},c=()=>{const d=t;t=[],d.length&&a(()=>{i(()=>{d.forEach(h=>{r(h)})})})};return{batch:d=>{let h;e++;try{h=d()}finally{e--,e||c()}return h},batchCalls:d=>(...h)=>{l(()=>{d(...h)})},schedule:l,setNotifyFunction:d=>{r=d},setBatchNotifyFunction:d=>{i=d},setScheduler:d=>{a=d}}}var pt=UE(),Qs,vr,Gs,Iv,zE=(Iv=class extends Do{constructor(){super();he(this,Qs,!0);he(this,vr);he(this,Gs);Y(this,Gs,e=>{if(!ls&&window.addEventListener){const r=()=>e(!0),i=()=>e(!1);return window.addEventListener("online",r,!1),window.addEventListener("offline",i,!1),()=>{window.removeEventListener("online",r),window.removeEventListener("offline",i)}}})}onSubscribe(){R(this,vr)||this.setEventListener(R(this,Gs))}onUnsubscribe(){var e;this.hasListeners()||((e=R(this,vr))==null||e.call(this),Y(this,vr,void 0))}setEventListener(e){var r;Y(this,Gs,e),(r=R(this,vr))==null||r.call(this),Y(this,vr,e(this.setOnline.bind(this)))}setOnline(e){R(this,Qs)!==e&&(Y(this,Qs,e),this.listeners.forEach(i=>{i(e)}))}isOnline(){return R(this,Qs)}},Qs=new WeakMap,vr=new WeakMap,Gs=new WeakMap,Iv),El=new zE;function $E(t){return Math.min(1e3*2**t,3e4)}function b0(t){return(t??"online")==="online"?El.isOnline():!0}var Cd=class extends Error{constructor(t){super("CancelledError"),this.revert=t==null?void 0:t.revert,this.silent=t==null?void 0:t.silent}};function E0(t){let e=!1,r=0,i;const a=Ed(),l=()=>a.status!=="pending",c=b=>{var x;if(!l()){const E=new Cd(b);w(E),(x=t.onCancel)==null||x.call(t,E)}},d=()=>{e=!0},h=()=>{e=!1},m=()=>gf.isFocused()&&(t.networkMode==="always"||El.isOnline())&&t.canRun(),g=()=>b0(t.networkMode)&&t.canRun(),y=b=>{l()||(i==null||i(),a.resolve(b))},w=b=>{l()||(i==null||i(),a.reject(b))},k=()=>new Promise(b=>{var x;i=E=>{(l()||m())&&b(E)},(x=t.onPause)==null||x.call(t)}).then(()=>{var b;i=void 0,l()||(b=t.onContinue)==null||b.call(t)}),_=()=>{if(l())return;let b;const x=r===0?t.initialPromise:void 0;try{b=x??t.fn()}catch(E){b=Promise.reject(E)}Promise.resolve(b).then(y).catch(E=>{var W;if(l())return;const N=t.retry??(ls?0:3),A=t.retryDelay??$E,D=typeof A=="function"?A(r,E):A,B=N===!0||typeof N=="number"&&rm()?void 0:k()).then(()=>{e?w(E):_()})})};return{promise:a,status:()=>a.status,cancel:c,continue:()=>(i==null||i(),a),cancelRetry:d,continueRetry:h,canStart:g,start:()=>(g()?_():k().then(_),a)}}var Jr,Vv,C0=(Vv=class{constructor(){he(this,Jr)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),wd(this.gcTime)&&Y(this,Jr,Qr.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(t){this.gcTime=Math.max(this.gcTime||0,t??(ls?1/0:300*1e3))}clearGcTimeout(){R(this,Jr)&&(Qr.clearTimeout(R(this,Jr)),Y(this,Jr,void 0))}},Jr=new WeakMap,Vv),Zr,Ys,en,es,ut,_o,ts,hn,Vn,Bv,qE=(Bv=class extends C0{constructor(e){super();he(this,hn);he(this,Zr);he(this,Ys);he(this,en);he(this,es);he(this,ut);he(this,_o);he(this,ts);Y(this,ts,!1),Y(this,_o,e.defaultOptions),this.setOptions(e.options),this.observers=[],Y(this,es,e.client),Y(this,en,R(this,es).getQueryCache()),this.queryKey=e.queryKey,this.queryHash=e.queryHash,Y(this,Zr,kg(this.options)),this.state=e.state??R(this,Zr),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var e;return(e=R(this,ut))==null?void 0:e.promise}setOptions(e){if(this.options={...R(this,_o),...e},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const r=kg(this.options);r.data!==void 0&&(this.setState(Cg(r.data,r.dataUpdatedAt)),Y(this,Zr,r))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&R(this,en).remove(this)}setData(e,r){const i=bd(this.state.data,e,this.options);return Ce(this,hn,Vn).call(this,{data:i,type:"success",dataUpdatedAt:r==null?void 0:r.updatedAt,manual:r==null?void 0:r.manual}),i}setState(e,r){Ce(this,hn,Vn).call(this,{type:"setState",state:e,setStateOptions:r})}cancel(e){var i,a;const r=(i=R(this,ut))==null?void 0:i.promise;return(a=R(this,ut))==null||a.cancel(e),r?r.then(Mt).catch(Mt):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(R(this,Zr))}isActive(){return this.observers.some(e=>tn(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===mf||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>kr(e.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e==="static"?!1:this.state.isInvalidated?!0:!v0(this.state.dataUpdatedAt,e)}onFocus(){var r;const e=this.observers.find(i=>i.shouldFetchOnWindowFocus());e==null||e.refetch({cancelRefetch:!1}),(r=R(this,ut))==null||r.continue()}onOnline(){var r;const e=this.observers.find(i=>i.shouldFetchOnReconnect());e==null||e.refetch({cancelRefetch:!1}),(r=R(this,ut))==null||r.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),R(this,en).notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(r=>r!==e),this.observers.length||(R(this,ut)&&(R(this,ts)?R(this,ut).cancel({revert:!0}):R(this,ut).cancelRetry()),this.scheduleGc()),R(this,en).notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||Ce(this,hn,Vn).call(this,{type:"invalidate"})}async fetch(e,r){var h,m,g,y,w,k,_,b,x,E,N,A;if(this.state.fetchStatus!=="idle"&&((h=R(this,ut))==null?void 0:h.status())!=="rejected"){if(this.state.data!==void 0&&(r!=null&&r.cancelRefetch))this.cancel({silent:!0});else if(R(this,ut))return R(this,ut).continueRetry(),R(this,ut).promise}if(e&&this.setOptions(e),!this.options.queryFn){const D=this.observers.find(B=>B.options.queryFn);D&&this.setOptions(D.options)}const i=new AbortController,a=D=>{Object.defineProperty(D,"signal",{enumerable:!0,get:()=>(Y(this,ts,!0),i.signal)})},l=()=>{const D=x0(this.options,r),W=(()=>{const X={client:R(this,es),queryKey:this.queryKey,meta:this.meta};return a(X),X})();return Y(this,ts,!1),this.options.persister?this.options.persister(D,W,this):D(W)},d=(()=>{const D={fetchOptions:r,options:this.options,queryKey:this.queryKey,client:R(this,es),state:this.state,fetchFn:l};return a(D),D})();(m=this.options.behavior)==null||m.onFetch(d,this),Y(this,Ys,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((g=d.fetchOptions)==null?void 0:g.meta))&&Ce(this,hn,Vn).call(this,{type:"fetch",meta:(y=d.fetchOptions)==null?void 0:y.meta}),Y(this,ut,E0({initialPromise:r==null?void 0:r.initialPromise,fn:d.fetchFn,onCancel:D=>{D instanceof Cd&&D.revert&&this.setState({...R(this,Ys),fetchStatus:"idle"}),i.abort()},onFail:(D,B)=>{Ce(this,hn,Vn).call(this,{type:"failed",failureCount:D,error:B})},onPause:()=>{Ce(this,hn,Vn).call(this,{type:"pause"})},onContinue:()=>{Ce(this,hn,Vn).call(this,{type:"continue"})},retry:d.options.retry,retryDelay:d.options.retryDelay,networkMode:d.options.networkMode,canRun:()=>!0}));try{const D=await R(this,ut).start();if(D===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(D),(k=(w=R(this,en).config).onSuccess)==null||k.call(w,D,this),(b=(_=R(this,en).config).onSettled)==null||b.call(_,D,this.state.error,this),D}catch(D){if(D instanceof Cd){if(D.silent)return R(this,ut).promise;if(D.revert){if(this.state.data===void 0)throw D;return this.state.data}}throw Ce(this,hn,Vn).call(this,{type:"error",error:D}),(E=(x=R(this,en).config).onError)==null||E.call(x,D,this),(A=(N=R(this,en).config).onSettled)==null||A.call(N,this.state.data,D,this),D}finally{this.scheduleGc()}}},Zr=new WeakMap,Ys=new WeakMap,en=new WeakMap,es=new WeakMap,ut=new WeakMap,_o=new WeakMap,ts=new WeakMap,hn=new WeakSet,Vn=function(e){const r=i=>{switch(e.type){case"failed":return{...i,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...i,fetchStatus:"paused"};case"continue":return{...i,fetchStatus:"fetching"};case"fetch":return{...i,...k0(i.data,this.options),fetchMeta:e.meta??null};case"success":const a={...i,...Cg(e.data,e.dataUpdatedAt),dataUpdateCount:i.dataUpdateCount+1,...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return Y(this,Ys,e.manual?a:void 0),a;case"error":const l=e.error;return{...i,error:l,errorUpdateCount:i.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:i.fetchFailureCount+1,fetchFailureReason:l,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...i,isInvalidated:!0};case"setState":return{...i,...e.state}}};this.state=r(this.state),pt.batch(()=>{this.observers.forEach(i=>{i.onQueryUpdate()}),R(this,en).notify({query:this,type:"updated",action:e})})},Bv);function k0(t,e){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:b0(e.networkMode)?"fetching":"paused",...t===void 0&&{error:null,status:"pending"}}}function Cg(t,e){return{data:t,dataUpdatedAt:e??Date.now(),error:null,isInvalidated:!1,status:"success"}}function kg(t){const e=typeof t.initialData=="function"?t.initialData():t.initialData,r=e!==void 0,i=r?typeof t.initialDataUpdatedAt=="function"?t.initialDataUpdatedAt():t.initialDataUpdatedAt:0;return{data:e,dataUpdateCount:0,dataUpdatedAt:r?i??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:r?"success":"pending",fetchStatus:"idle"}}var jt,ke,Ro,Tt,ns,Xs,Un,wr,Po,Js,Zs,rs,ss,xr,ei,De,oo,kd,Td,_d,Rd,Pd,Ad,Od,T0,Uv,HE=(Uv=class extends Do{constructor(e,r){super();he(this,De);he(this,jt);he(this,ke);he(this,Ro);he(this,Tt);he(this,ns);he(this,Xs);he(this,Un);he(this,wr);he(this,Po);he(this,Js);he(this,Zs);he(this,rs);he(this,ss);he(this,xr);he(this,ei,new Set);this.options=r,Y(this,jt,e),Y(this,wr,null),Y(this,Un,Ed()),this.bindMethods(),this.setOptions(r)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(R(this,ke).addObserver(this),Tg(R(this,ke),this.options)?Ce(this,De,oo).call(this):this.updateResult(),Ce(this,De,Rd).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Nd(R(this,ke),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Nd(R(this,ke),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,Ce(this,De,Pd).call(this),Ce(this,De,Ad).call(this),R(this,ke).removeObserver(this)}setOptions(e){const r=this.options,i=R(this,ke);if(this.options=R(this,jt).defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof tn(this.options.enabled,R(this,ke))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");Ce(this,De,Od).call(this),R(this,ke).setOptions(this.options),r._defaulted&&!xd(this.options,r)&&R(this,jt).getQueryCache().notify({type:"observerOptionsUpdated",query:R(this,ke),observer:this});const a=this.hasListeners();a&&_g(R(this,ke),i,this.options,r)&&Ce(this,De,oo).call(this),this.updateResult(),a&&(R(this,ke)!==i||tn(this.options.enabled,R(this,ke))!==tn(r.enabled,R(this,ke))||kr(this.options.staleTime,R(this,ke))!==kr(r.staleTime,R(this,ke)))&&Ce(this,De,kd).call(this);const l=Ce(this,De,Td).call(this);a&&(R(this,ke)!==i||tn(this.options.enabled,R(this,ke))!==tn(r.enabled,R(this,ke))||l!==R(this,xr))&&Ce(this,De,_d).call(this,l)}getOptimisticResult(e){const r=R(this,jt).getQueryCache().build(R(this,jt),e),i=this.createResult(r,e);return KE(this,i)&&(Y(this,Tt,i),Y(this,Xs,this.options),Y(this,ns,R(this,ke).state)),i}getCurrentResult(){return R(this,Tt)}trackResult(e,r){return new Proxy(e,{get:(i,a)=>(this.trackProp(a),r==null||r(a),a==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&R(this,Un).status==="pending"&&R(this,Un).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(i,a))})}trackProp(e){R(this,ei).add(e)}getCurrentQuery(){return R(this,ke)}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){const r=R(this,jt).defaultQueryOptions(e),i=R(this,jt).getQueryCache().build(R(this,jt),r);return i.fetch().then(()=>this.createResult(i,r))}fetch(e){return Ce(this,De,oo).call(this,{...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),R(this,Tt)))}createResult(e,r){var ee;const i=R(this,ke),a=this.options,l=R(this,Tt),c=R(this,ns),d=R(this,Xs),m=e!==i?e.state:R(this,Ro),{state:g}=e;let y={...g},w=!1,k;if(r._optimisticResults){const ce=this.hasListeners(),ue=!ce&&Tg(e,r),Pe=ce&&_g(e,i,r,a);(ue||Pe)&&(y={...y,...k0(g.data,e.options)}),r._optimisticResults==="isRestoring"&&(y.fetchStatus="idle")}let{error:_,errorUpdatedAt:b,status:x}=y;k=y.data;let E=!1;if(r.placeholderData!==void 0&&k===void 0&&x==="pending"){let ce;l!=null&&l.isPlaceholderData&&r.placeholderData===(d==null?void 0:d.placeholderData)?(ce=l.data,E=!0):ce=typeof r.placeholderData=="function"?r.placeholderData((ee=R(this,Zs))==null?void 0:ee.state.data,R(this,Zs)):r.placeholderData,ce!==void 0&&(x="success",k=bd(l==null?void 0:l.data,ce,r),w=!0)}if(r.select&&k!==void 0&&!E)if(l&&k===(c==null?void 0:c.data)&&r.select===R(this,Po))k=R(this,Js);else try{Y(this,Po,r.select),k=r.select(k),k=bd(l==null?void 0:l.data,k,r),Y(this,Js,k),Y(this,wr,null)}catch(ce){Y(this,wr,ce)}R(this,wr)&&(_=R(this,wr),k=R(this,Js),b=Date.now(),x="error");const N=y.fetchStatus==="fetching",A=x==="pending",D=x==="error",B=A&&N,W=k!==void 0,I={status:x,fetchStatus:y.fetchStatus,isPending:A,isSuccess:x==="success",isError:D,isInitialLoading:B,isLoading:B,data:k,dataUpdatedAt:y.dataUpdatedAt,error:_,errorUpdatedAt:b,failureCount:y.fetchFailureCount,failureReason:y.fetchFailureReason,errorUpdateCount:y.errorUpdateCount,isFetched:y.dataUpdateCount>0||y.errorUpdateCount>0,isFetchedAfterMount:y.dataUpdateCount>m.dataUpdateCount||y.errorUpdateCount>m.errorUpdateCount,isFetching:N,isRefetching:N&&!A,isLoadingError:D&&!W,isPaused:y.fetchStatus==="paused",isPlaceholderData:w,isRefetchError:D&&W,isStale:yf(e,r),refetch:this.refetch,promise:R(this,Un),isEnabled:tn(r.enabled,e)!==!1};if(this.options.experimental_prefetchInRender){const ce=I.data!==void 0,ue=I.status==="error"&&!ce,Pe=je=>{ue?je.reject(I.error):ce&&je.resolve(I.data)},ze=()=>{const je=Y(this,Un,I.promise=Ed());Pe(je)},_e=R(this,Un);switch(_e.status){case"pending":e.queryHash===i.queryHash&&Pe(_e);break;case"fulfilled":(ue||I.data!==_e.value)&&ze();break;case"rejected":(!ue||I.error!==_e.reason)&&ze();break}}return I}updateResult(){const e=R(this,Tt),r=this.createResult(R(this,ke),this.options);if(Y(this,ns,R(this,ke).state),Y(this,Xs,this.options),R(this,ns).data!==void 0&&Y(this,Zs,R(this,ke)),xd(r,e))return;Y(this,Tt,r);const i=()=>{if(!e)return!0;const{notifyOnChangeProps:a}=this.options,l=typeof a=="function"?a():a;if(l==="all"||!l&&!R(this,ei).size)return!0;const c=new Set(l??R(this,ei));return this.options.throwOnError&&c.add("error"),Object.keys(R(this,Tt)).some(d=>{const h=d;return R(this,Tt)[h]!==e[h]&&c.has(h)})};Ce(this,De,T0).call(this,{listeners:i()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&Ce(this,De,Rd).call(this)}},jt=new WeakMap,ke=new WeakMap,Ro=new WeakMap,Tt=new WeakMap,ns=new WeakMap,Xs=new WeakMap,Un=new WeakMap,wr=new WeakMap,Po=new WeakMap,Js=new WeakMap,Zs=new WeakMap,rs=new WeakMap,ss=new WeakMap,xr=new WeakMap,ei=new WeakMap,De=new WeakSet,oo=function(e){Ce(this,De,Od).call(this);let r=R(this,ke).fetch(this.options,e);return e!=null&&e.throwOnError||(r=r.catch(Mt)),r},kd=function(){Ce(this,De,Pd).call(this);const e=kr(this.options.staleTime,R(this,ke));if(ls||R(this,Tt).isStale||!wd(e))return;const i=v0(R(this,Tt).dataUpdatedAt,e)+1;Y(this,rs,Qr.setTimeout(()=>{R(this,Tt).isStale||this.updateResult()},i))},Td=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(R(this,ke)):this.options.refetchInterval)??!1},_d=function(e){Ce(this,De,Ad).call(this),Y(this,xr,e),!(ls||tn(this.options.enabled,R(this,ke))===!1||!wd(R(this,xr))||R(this,xr)===0)&&Y(this,ss,Qr.setInterval(()=>{(this.options.refetchIntervalInBackground||gf.isFocused())&&Ce(this,De,oo).call(this)},R(this,xr)))},Rd=function(){Ce(this,De,kd).call(this),Ce(this,De,_d).call(this,Ce(this,De,Td).call(this))},Pd=function(){R(this,rs)&&(Qr.clearTimeout(R(this,rs)),Y(this,rs,void 0))},Ad=function(){R(this,ss)&&(Qr.clearInterval(R(this,ss)),Y(this,ss,void 0))},Od=function(){const e=R(this,jt).getQueryCache().build(R(this,jt),this.options);if(e===R(this,ke))return;const r=R(this,ke);Y(this,ke,e),Y(this,Ro,e.state),this.hasListeners()&&(r==null||r.removeObserver(this),e.addObserver(this))},T0=function(e){pt.batch(()=>{e.listeners&&this.listeners.forEach(r=>{r(R(this,Tt))}),R(this,jt).getQueryCache().notify({query:R(this,ke),type:"observerResultsUpdated"})})},Uv);function WE(t,e){return tn(e.enabled,t)!==!1&&t.state.data===void 0&&!(t.state.status==="error"&&e.retryOnMount===!1)}function Tg(t,e){return WE(t,e)||t.state.data!==void 0&&Nd(t,e,e.refetchOnMount)}function Nd(t,e,r){if(tn(e.enabled,t)!==!1&&kr(e.staleTime,t)!=="static"){const i=typeof r=="function"?r(t):r;return i==="always"||i!==!1&&yf(t,e)}return!1}function _g(t,e,r,i){return(t!==e||tn(i.enabled,t)===!1)&&(!r.suspense||t.state.status!=="error")&&yf(t,r)}function yf(t,e){return tn(e.enabled,t)!==!1&&t.isStaleByTime(kr(e.staleTime,t))}function KE(t,e){return!xd(t.getCurrentResult(),e)}function Rg(t){return{onFetch:(e,r)=>{var g,y,w,k,_;const i=e.options,a=(w=(y=(g=e.fetchOptions)==null?void 0:g.meta)==null?void 0:y.fetchMore)==null?void 0:w.direction,l=((k=e.state.data)==null?void 0:k.pages)||[],c=((_=e.state.data)==null?void 0:_.pageParams)||[];let d={pages:[],pageParams:[]},h=0;const m=async()=>{let b=!1;const x=A=>{IE(A,()=>e.signal,()=>b=!0)},E=x0(e.options,e.fetchOptions),N=async(A,D,B)=>{if(b)return Promise.reject();if(D==null&&A.pages.length)return Promise.resolve(A);const X=(()=>{const ue={client:e.client,queryKey:e.queryKey,pageParam:D,direction:B?"backward":"forward",meta:e.options.meta};return x(ue),ue})(),I=await E(X),{maxPages:ee}=e.options,ce=B?FE:ME;return{pages:ce(A.pages,I,ee),pageParams:ce(A.pageParams,D,ee)}};if(a&&l.length){const A=a==="backward",D=A?QE:Pg,B={pages:l,pageParams:c},W=D(i,B);d=await N(B,W,A)}else{const A=t??l.length;do{const D=h===0?c[0]??i.initialPageParam:Pg(i,d);if(h>0&&D==null)break;d=await N(d,D),h++}while(h{var b,x;return(x=(b=e.options).persister)==null?void 0:x.call(b,m,{client:e.client,queryKey:e.queryKey,meta:e.options.meta,signal:e.signal},r)}:e.fetchFn=m}}}function Pg(t,{pages:e,pageParams:r}){const i=e.length-1;return e.length>0?t.getNextPageParam(e[i],e,r[i],r):void 0}function QE(t,{pages:e,pageParams:r}){var i;return e.length>0?(i=t.getPreviousPageParam)==null?void 0:i.call(t,e[0],e,r[0],r):void 0}var Ao,bn,xt,is,En,pr,zv,GE=(zv=class extends C0{constructor(e){super();he(this,En);he(this,Ao);he(this,bn);he(this,xt);he(this,is);Y(this,Ao,e.client),this.mutationId=e.mutationId,Y(this,xt,e.mutationCache),Y(this,bn,[]),this.state=e.state||YE(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){R(this,bn).includes(e)||(R(this,bn).push(e),this.clearGcTimeout(),R(this,xt).notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){Y(this,bn,R(this,bn).filter(r=>r!==e)),this.scheduleGc(),R(this,xt).notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){R(this,bn).length||(this.state.status==="pending"?this.scheduleGc():R(this,xt).remove(this))}continue(){var e;return((e=R(this,is))==null?void 0:e.continue())??this.execute(this.state.variables)}async execute(e){var c,d,h,m,g,y,w,k,_,b,x,E,N,A,D,B,W,X;const r=()=>{Ce(this,En,pr).call(this,{type:"continue"})},i={client:R(this,Ao),meta:this.options.meta,mutationKey:this.options.mutationKey};Y(this,is,E0({fn:()=>this.options.mutationFn?this.options.mutationFn(e,i):Promise.reject(new Error("No mutationFn found")),onFail:(I,ee)=>{Ce(this,En,pr).call(this,{type:"failed",failureCount:I,error:ee})},onPause:()=>{Ce(this,En,pr).call(this,{type:"pause"})},onContinue:r,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>R(this,xt).canRun(this)}));const a=this.state.status==="pending",l=!R(this,is).canStart();try{if(a)r();else{Ce(this,En,pr).call(this,{type:"pending",variables:e,isPaused:l}),R(this,xt).config.onMutate&&await R(this,xt).config.onMutate(e,this,i);const ee=await((d=(c=this.options).onMutate)==null?void 0:d.call(c,e,i));ee!==this.state.context&&Ce(this,En,pr).call(this,{type:"pending",context:ee,variables:e,isPaused:l})}const I=await R(this,is).start();return await((m=(h=R(this,xt).config).onSuccess)==null?void 0:m.call(h,I,e,this.state.context,this,i)),await((y=(g=this.options).onSuccess)==null?void 0:y.call(g,I,e,this.state.context,i)),await((k=(w=R(this,xt).config).onSettled)==null?void 0:k.call(w,I,null,this.state.variables,this.state.context,this,i)),await((b=(_=this.options).onSettled)==null?void 0:b.call(_,I,null,e,this.state.context,i)),Ce(this,En,pr).call(this,{type:"success",data:I}),I}catch(I){try{await((E=(x=R(this,xt).config).onError)==null?void 0:E.call(x,I,e,this.state.context,this,i))}catch(ee){Promise.reject(ee)}try{await((A=(N=this.options).onError)==null?void 0:A.call(N,I,e,this.state.context,i))}catch(ee){Promise.reject(ee)}try{await((B=(D=R(this,xt).config).onSettled)==null?void 0:B.call(D,void 0,I,this.state.variables,this.state.context,this,i))}catch(ee){Promise.reject(ee)}try{await((X=(W=this.options).onSettled)==null?void 0:X.call(W,void 0,I,e,this.state.context,i))}catch(ee){Promise.reject(ee)}throw Ce(this,En,pr).call(this,{type:"error",error:I}),I}finally{R(this,xt).runNext(this)}}},Ao=new WeakMap,bn=new WeakMap,xt=new WeakMap,is=new WeakMap,En=new WeakSet,pr=function(e){const r=i=>{switch(e.type){case"failed":return{...i,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...i,isPaused:!0};case"continue":return{...i,isPaused:!1};case"pending":return{...i,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...i,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...i,data:void 0,error:e.error,failureCount:i.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}};this.state=r(this.state),pt.batch(()=>{R(this,bn).forEach(i=>{i.onMutationUpdate(e)}),R(this,xt).notify({mutation:this,type:"updated",action:e})})},zv);function YE(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var zn,pn,Oo,$v,XE=($v=class extends Do{constructor(e={}){super();he(this,zn);he(this,pn);he(this,Oo);this.config=e,Y(this,zn,new Set),Y(this,pn,new Map),Y(this,Oo,0)}build(e,r,i){const a=new GE({client:e,mutationCache:this,mutationId:++Ja(this,Oo)._,options:e.defaultMutationOptions(r),state:i});return this.add(a),a}add(e){R(this,zn).add(e);const r=nl(e);if(typeof r=="string"){const i=R(this,pn).get(r);i?i.push(e):R(this,pn).set(r,[e])}this.notify({type:"added",mutation:e})}remove(e){if(R(this,zn).delete(e)){const r=nl(e);if(typeof r=="string"){const i=R(this,pn).get(r);if(i)if(i.length>1){const a=i.indexOf(e);a!==-1&&i.splice(a,1)}else i[0]===e&&R(this,pn).delete(r)}}this.notify({type:"removed",mutation:e})}canRun(e){const r=nl(e);if(typeof r=="string"){const i=R(this,pn).get(r),a=i==null?void 0:i.find(l=>l.state.status==="pending");return!a||a===e}else return!0}runNext(e){var i;const r=nl(e);if(typeof r=="string"){const a=(i=R(this,pn).get(r))==null?void 0:i.find(l=>l!==e&&l.state.isPaused);return(a==null?void 0:a.continue())??Promise.resolve()}else return Promise.resolve()}clear(){pt.batch(()=>{R(this,zn).forEach(e=>{this.notify({type:"removed",mutation:e})}),R(this,zn).clear(),R(this,pn).clear()})}getAll(){return Array.from(R(this,zn))}find(e){const r={exact:!0,...e};return this.getAll().find(i=>Sg(r,i))}findAll(e={}){return this.getAll().filter(r=>Sg(e,r))}notify(e){pt.batch(()=>{this.listeners.forEach(r=>{r(e)})})}resumePausedMutations(){const e=this.getAll().filter(r=>r.state.isPaused);return pt.batch(()=>Promise.all(e.map(r=>r.continue().catch(Mt))))}},zn=new WeakMap,pn=new WeakMap,Oo=new WeakMap,$v);function nl(t){var e;return(e=t.options.scope)==null?void 0:e.id}var Cn,qv,JE=(qv=class extends Do{constructor(e={}){super();he(this,Cn);this.config=e,Y(this,Cn,new Map)}build(e,r,i){const a=r.queryKey,l=r.queryHash??pf(a,r);let c=this.get(l);return c||(c=new qE({client:e,queryKey:a,queryHash:l,options:e.defaultQueryOptions(r),state:i,defaultOptions:e.getQueryDefaults(a)}),this.add(c)),c}add(e){R(this,Cn).has(e.queryHash)||(R(this,Cn).set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){const r=R(this,Cn).get(e.queryHash);r&&(e.destroy(),r===e&&R(this,Cn).delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){pt.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return R(this,Cn).get(e)}getAll(){return[...R(this,Cn).values()]}find(e){const r={exact:!0,...e};return this.getAll().find(i=>xg(r,i))}findAll(e={}){const r=this.getAll();return Object.keys(e).length>0?r.filter(i=>xg(e,i)):r}notify(e){pt.batch(()=>{this.listeners.forEach(r=>{r(e)})})}onFocus(){pt.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){pt.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},Cn=new WeakMap,qv),Qe,Sr,br,ti,ni,Er,ri,si,Hv,ZE=(Hv=class{constructor(t={}){he(this,Qe);he(this,Sr);he(this,br);he(this,ti);he(this,ni);he(this,Er);he(this,ri);he(this,si);Y(this,Qe,t.queryCache||new JE),Y(this,Sr,t.mutationCache||new XE),Y(this,br,t.defaultOptions||{}),Y(this,ti,new Map),Y(this,ni,new Map),Y(this,Er,0)}mount(){Ja(this,Er)._++,R(this,Er)===1&&(Y(this,ri,gf.subscribe(async t=>{t&&(await this.resumePausedMutations(),R(this,Qe).onFocus())})),Y(this,si,El.subscribe(async t=>{t&&(await this.resumePausedMutations(),R(this,Qe).onOnline())})))}unmount(){var t,e;Ja(this,Er)._--,R(this,Er)===0&&((t=R(this,ri))==null||t.call(this),Y(this,ri,void 0),(e=R(this,si))==null||e.call(this),Y(this,si,void 0))}isFetching(t){return R(this,Qe).findAll({...t,fetchStatus:"fetching"}).length}isMutating(t){return R(this,Sr).findAll({...t,status:"pending"}).length}getQueryData(t){var r;const e=this.defaultQueryOptions({queryKey:t});return(r=R(this,Qe).get(e.queryHash))==null?void 0:r.state.data}ensureQueryData(t){const e=this.defaultQueryOptions(t),r=R(this,Qe).build(this,e),i=r.state.data;return i===void 0?this.fetchQuery(t):(t.revalidateIfStale&&r.isStaleByTime(kr(e.staleTime,r))&&this.prefetchQuery(e),Promise.resolve(i))}getQueriesData(t){return R(this,Qe).findAll(t).map(({queryKey:e,state:r})=>{const i=r.data;return[e,i]})}setQueryData(t,e,r){const i=this.defaultQueryOptions({queryKey:t}),a=R(this,Qe).get(i.queryHash),l=a==null?void 0:a.state.data,c=DE(e,l);if(c!==void 0)return R(this,Qe).build(this,i).setData(c,{...r,manual:!0})}setQueriesData(t,e,r){return pt.batch(()=>R(this,Qe).findAll(t).map(({queryKey:i})=>[i,this.setQueryData(i,e,r)]))}getQueryState(t){var r;const e=this.defaultQueryOptions({queryKey:t});return(r=R(this,Qe).get(e.queryHash))==null?void 0:r.state}removeQueries(t){const e=R(this,Qe);pt.batch(()=>{e.findAll(t).forEach(r=>{e.remove(r)})})}resetQueries(t,e){const r=R(this,Qe);return pt.batch(()=>(r.findAll(t).forEach(i=>{i.reset()}),this.refetchQueries({type:"active",...t},e)))}cancelQueries(t,e={}){const r={revert:!0,...e},i=pt.batch(()=>R(this,Qe).findAll(t).map(a=>a.cancel(r)));return Promise.all(i).then(Mt).catch(Mt)}invalidateQueries(t,e={}){return pt.batch(()=>(R(this,Qe).findAll(t).forEach(r=>{r.invalidate()}),(t==null?void 0:t.refetchType)==="none"?Promise.resolve():this.refetchQueries({...t,type:(t==null?void 0:t.refetchType)??(t==null?void 0:t.type)??"active"},e)))}refetchQueries(t,e={}){const r={...e,cancelRefetch:e.cancelRefetch??!0},i=pt.batch(()=>R(this,Qe).findAll(t).filter(a=>!a.isDisabled()&&!a.isStatic()).map(a=>{let l=a.fetch(void 0,r);return r.throwOnError||(l=l.catch(Mt)),a.state.fetchStatus==="paused"?Promise.resolve():l}));return Promise.all(i).then(Mt)}fetchQuery(t){const e=this.defaultQueryOptions(t);e.retry===void 0&&(e.retry=!1);const r=R(this,Qe).build(this,e);return r.isStaleByTime(kr(e.staleTime,r))?r.fetch(e):Promise.resolve(r.state.data)}prefetchQuery(t){return this.fetchQuery(t).then(Mt).catch(Mt)}fetchInfiniteQuery(t){return t.behavior=Rg(t.pages),this.fetchQuery(t)}prefetchInfiniteQuery(t){return this.fetchInfiniteQuery(t).then(Mt).catch(Mt)}ensureInfiniteQueryData(t){return t.behavior=Rg(t.pages),this.ensureQueryData(t)}resumePausedMutations(){return El.isOnline()?R(this,Sr).resumePausedMutations():Promise.resolve()}getQueryCache(){return R(this,Qe)}getMutationCache(){return R(this,Sr)}getDefaultOptions(){return R(this,br)}setDefaultOptions(t){Y(this,br,t)}setQueryDefaults(t,e){R(this,ti).set(xo(t),{queryKey:t,defaultOptions:e})}getQueryDefaults(t){const e=[...R(this,ti).values()],r={};return e.forEach(i=>{So(t,i.queryKey)&&Object.assign(r,i.defaultOptions)}),r}setMutationDefaults(t,e){R(this,ni).set(xo(t),{mutationKey:t,defaultOptions:e})}getMutationDefaults(t){const e=[...R(this,ni).values()],r={};return e.forEach(i=>{So(t,i.mutationKey)&&Object.assign(r,i.defaultOptions)}),r}defaultQueryOptions(t){if(t._defaulted)return t;const e={...R(this,br).queries,...this.getQueryDefaults(t.queryKey),...t,_defaulted:!0};return e.queryHash||(e.queryHash=pf(e.queryKey,e)),e.refetchOnReconnect===void 0&&(e.refetchOnReconnect=e.networkMode!=="always"),e.throwOnError===void 0&&(e.throwOnError=!!e.suspense),!e.networkMode&&e.persister&&(e.networkMode="offlineFirst"),e.queryFn===mf&&(e.enabled=!1),e}defaultMutationOptions(t){return t!=null&&t._defaulted?t:{...R(this,br).mutations,...(t==null?void 0:t.mutationKey)&&this.getMutationDefaults(t.mutationKey),...t,_defaulted:!0}}clear(){R(this,Qe).clear(),R(this,Sr).clear()}},Qe=new WeakMap,Sr=new WeakMap,br=new WeakMap,ti=new WeakMap,ni=new WeakMap,Er=new WeakMap,ri=new WeakMap,si=new WeakMap,Hv),_0=V.createContext(void 0),eC=t=>{const e=V.useContext(_0);if(!e)throw new Error("No QueryClient set, use QueryClientProvider to set one");return e},tC=({client:t,children:e})=>(V.useEffect(()=>(t.mount(),()=>{t.unmount()}),[t]),S.jsx(_0.Provider,{value:t,children:e})),R0=V.createContext(!1),nC=()=>V.useContext(R0);R0.Provider;function rC(){let t=!1;return{clearReset:()=>{t=!1},reset:()=>{t=!0},isReset:()=>t}}var sC=V.createContext(rC()),iC=()=>V.useContext(sC),oC=(t,e,r)=>{const i=r!=null&&r.state.error&&typeof t.throwOnError=="function"?S0(t.throwOnError,[r.state.error,r]):t.throwOnError;(t.suspense||t.experimental_prefetchInRender||i)&&(e.isReset()||(t.retryOnMount=!1))},aC=t=>{V.useEffect(()=>{t.clearReset()},[t])},lC=({result:t,errorResetBoundary:e,throwOnError:r,query:i,suspense:a})=>t.isError&&!e.isReset()&&!t.isFetching&&i&&(a&&t.data===void 0||S0(r,[t.error,i])),uC=t=>{if(t.suspense){const r=a=>a==="static"?a:Math.max(a??1e3,1e3),i=t.staleTime;t.staleTime=typeof i=="function"?(...a)=>r(i(...a)):r(i),typeof t.gcTime=="number"&&(t.gcTime=Math.max(t.gcTime,1e3))}},cC=(t,e)=>t.isLoading&&t.isFetching&&!e,dC=(t,e)=>(t==null?void 0:t.suspense)&&e.isPending,Ag=(t,e,r)=>e.fetchOptimistic(t).catch(()=>{r.clearReset()});function fC(t,e,r){var w,k,_,b;const i=nC(),a=iC(),l=eC(),c=l.defaultQueryOptions(t);(k=(w=l.getDefaultOptions().queries)==null?void 0:w._experimental_beforeQuery)==null||k.call(w,c);const d=l.getQueryCache().get(c.queryHash);c._optimisticResults=i?"isRestoring":"optimistic",uC(c),oC(c,a,d),aC(a);const h=!l.getQueryCache().get(c.queryHash),[m]=V.useState(()=>new e(l,c)),g=m.getOptimisticResult(c),y=!i&&t.subscribed!==!1;if(V.useSyncExternalStore(V.useCallback(x=>{const E=y?m.subscribe(pt.batchCalls(x)):Mt;return m.updateResult(),E},[m,y]),()=>m.getCurrentResult(),()=>m.getCurrentResult()),V.useEffect(()=>{m.setOptions(c)},[c,m]),dC(c,g))throw Ag(c,m,a);if(lC({result:g,errorResetBoundary:a,throwOnError:c.throwOnError,query:d,suspense:c.suspense}))throw g.error;if((b=(_=l.getDefaultOptions().queries)==null?void 0:_._experimental_afterQuery)==null||b.call(_,c,g),c.experimental_prefetchInRender&&!ls&&cC(g,i)){const x=h?Ag(c,m,a):d==null?void 0:d.promise;x==null||x.catch(Mt).finally(()=>{m.updateResult()})}return c.notifyOnChangeProps?g:m.trackResult(g)}function hC(t,e){return fC(t,HE)}const pC=new ZE({defaultOptions:{queries:{refetchOnWindowFocus:!1,retry:1}}});Kv();/** * @remix-run/router v1.23.3 * * Copyright (c) Remix Software Inc. * * This source code is licensed under the MIT license found in the * LICENSE.md file in the root directory of this source tree. * * @license MIT */function Cl(){return Cl=Object.assign?Object.assign.bind():function(t){for(var e=1;e"u")throw new Error(e)}function P0(t,e){if(!t){typeof console<"u"&&console.warn(e);try{throw new Error(e)}catch{}}}function gC(){return Math.random().toString(36).substr(2,8)}function Ng(t,e){return{usr:t.state,key:t.key,idx:e}}function Dd(t,e,r,i){return r===void 0&&(r=null),Cl({pathname:typeof t=="string"?t:t.pathname,search:"",hash:""},typeof e=="string"?Ll(e):e,{state:r,key:e&&e.key||i||gC()})}function A0(t){let{pathname:e="/",search:r="",hash:i=""}=t;return r&&r!=="?"&&(e+=r.charAt(0)==="?"?r:"?"+r),i&&i!=="#"&&(e+=i.charAt(0)==="#"?i:"#"+i),e}function Ll(t){let e={};if(t){let r=t.indexOf("#");r>=0&&(e.hash=t.substr(r),t=t.substr(0,r));let i=t.indexOf("?");i>=0&&(e.search=t.substr(i),t=t.substr(0,i)),t&&(e.pathname=t)}return e}function yC(t,e,r,i){i===void 0&&(i={});let{window:a=document.defaultView,v5Compat:l=!1}=i,c=a.history,d=Cr.Pop,h=null,m=g();m==null&&(m=0,c.replaceState(Cl({},c.state,{idx:m}),""));function g(){return(c.state||{idx:null}).idx}function y(){d=Cr.Pop;let x=g(),E=x==null?null:x-m;m=x,h&&h({action:d,location:b.location,delta:E})}function w(x,E){d=Cr.Push;let N=Dd(b.location,x,E);m=g()+1;let A=Ng(N,m),D=b.createHref(N);try{c.pushState(A,"",D)}catch(B){if(B instanceof DOMException&&B.name==="DataCloneError")throw B;a.location.assign(D)}l&&h&&h({action:d,location:b.location,delta:1})}function k(x,E){d=Cr.Replace;let N=Dd(b.location,x,E);m=g();let A=Ng(N,m),D=b.createHref(N);c.replaceState(A,"",D),l&&h&&h({action:d,location:b.location,delta:0})}function _(x){let E=a.location.origin!=="null"?a.location.origin:a.location.href,N=typeof x=="string"?x:A0(x);return N=N.replace(/ $/,"%20"),It(E,"No window.location.(origin|href) available to create URL for href: "+N),new URL(N,E)}let b={get action(){return d},get location(){return t(a,c)},listen(x){if(h)throw new Error("A history only accepts one active listener");return a.addEventListener(Og,y),h=x,()=>{a.removeEventListener(Og,y),h=null}},createHref(x){return e(a,x)},createURL:_,encodeLocation(x){let E=_(x);return{pathname:E.pathname,search:E.search,hash:E.hash}},push:w,replace:k,go(x){return c.go(x)}};return b}var Dg;(function(t){t.data="data",t.deferred="deferred",t.redirect="redirect",t.error="error"})(Dg||(Dg={}));function vC(t,e,r){return r===void 0&&(r="/"),wC(t,e,r)}function wC(t,e,r,i){let a=typeof e=="string"?Ll(e):e,l=D0(a.pathname||"/",r);if(l==null)return null;let c=O0(t);xC(c);let d=null,h=NC(l);for(let m=0;d==null&&m{let h={relativePath:d===void 0?l.path||"":d,caseSensitive:l.caseSensitive===!0,childrenIndex:c,route:l};h.relativePath.startsWith("/")&&(It(h.relativePath.startsWith(i),'Absolute route path "'+h.relativePath+'" nested under path '+('"'+i+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),h.relativePath=h.relativePath.slice(i.length));let m=Ws([i,h.relativePath]),g=r.concat(h);l.children&&l.children.length>0&&(It(l.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+m+'".')),O0(l.children,e,g,m)),!(l.path==null&&!l.index)&&e.push({path:m,score:_C(m,l.index),routesMeta:g})};return t.forEach((l,c)=>{var d;if(l.path===""||!((d=l.path)!=null&&d.includes("?")))a(l,c);else for(let h of N0(l.path))a(l,c,h)}),e}function N0(t){let e=t.split("/");if(e.length===0)return[];let[r,...i]=e,a=r.endsWith("?"),l=r.replace(/\?$/,"");if(i.length===0)return a?[l,""]:[l];let c=N0(i.join("/")),d=[];return d.push(...c.map(h=>h===""?l:[l,h].join("/"))),a&&d.push(...c),d.map(h=>t.startsWith("/")&&h===""?"/":h)}function xC(t){t.sort((e,r)=>e.score!==r.score?r.score-e.score:RC(e.routesMeta.map(i=>i.childrenIndex),r.routesMeta.map(i=>i.childrenIndex)))}const SC=/^:[\w-]+$/,bC=3,EC=2,CC=1,kC=10,TC=-2,Lg=t=>t==="*";function _C(t,e){let r=t.split("/"),i=r.length;return r.some(Lg)&&(i+=TC),e&&(i+=EC),r.filter(a=>!Lg(a)).reduce((a,l)=>a+(SC.test(l)?bC:l===""?CC:kC),i)}function RC(t,e){return t.length===e.length&&t.slice(0,-1).every((i,a)=>i===e[a])?t[t.length-1]-e[e.length-1]:0}function PC(t,e,r){let{routesMeta:i}=t,a={},l="/",c=[];for(let d=0;d{let{paramName:w,isOptional:k}=g;if(w==="*"){let b=d[y]||"";c=l.slice(0,l.length-b.length).replace(/(.)\/+$/,"$1")}const _=d[y];return k&&!_?m[w]=void 0:m[w]=(_||"").replace(/%2F/g,"/"),m},{}),pathname:l,pathnameBase:c,pattern:t}}function OC(t,e,r){e===void 0&&(e=!1),r===void 0&&(r=!0),P0(t==="*"||!t.endsWith("*")||t.endsWith("/*"),'Route path "'+t+'" will be treated as if it were '+('"'+t.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+t.replace(/\*$/,"/*")+'".'));let i=[],a="^"+t.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(c,d,h)=>(i.push({paramName:d,isOptional:h!=null}),h?"/?([^\\/]+)?":"/([^\\/]+)"));return t.endsWith("*")?(i.push({paramName:"*"}),a+=t==="*"||t==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?a+="\\/*$":t!==""&&t!=="/"&&(a+="(?:(?=\\/|$))"),[new RegExp(a,e?void 0:"i"),i]}function NC(t){try{return t.split("/").map(e=>decodeURIComponent(e).replace(/\//g,"%2F")).join("/")}catch(e){return P0(!1,'The URL path "'+t+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+e+").")),t}}function D0(t,e){if(e==="/")return t;if(!t.toLowerCase().startsWith(e.toLowerCase()))return null;let r=e.endsWith("/")?e.length-1:e.length,i=t.charAt(r);return i&&i!=="/"?null:t.slice(r)||"/"}const DC=t=>t.replace(/\/\/+/g,"/"),Ws=t=>DC(t.join("/")),LC=t=>t.replace(/\/+$/,"").replace(/^\/*/,"/");function jC(t){return t!=null&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.internal=="boolean"&&"data"in t}const L0=["post","put","patch","delete"];new Set(L0);const MC=["get",...L0];new Set(MC);/** * React Router v6.30.4 * * Copyright (c) Remix Software Inc. * * This source code is licensed under the MIT license found in the * LICENSE.md file in the root directory of this source tree. * * @license MIT */function kl(){return kl=Object.assign?Object.assign.bind():function(t){for(var e=1;eObject.assign({},x,{params:Object.assign({},d,x.params),pathname:Ws([h,a.encodeLocation?a.encodeLocation(x.pathname).pathname:x.pathname]),pathnameBase:x.pathnameBase==="/"?h:Ws([h,a.encodeLocation?a.encodeLocation(x.pathnameBase).pathname:x.pathnameBase])})),l,r,i);return e&&b?V.createElement(Lo.Provider,{value:{location:kl({pathname:"/",search:"",hash:"",state:null,key:"default"},g),navigationType:Cr.Pop}},b):b}function zC(){let t=YC(),e=jC(t)?t.status+" "+t.statusText:t instanceof Error?t.message:JSON.stringify(t),r=t instanceof Error?t.stack:null,a={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return V.createElement(V.Fragment,null,V.createElement("h2",null,"Unexpected Application Error!"),V.createElement("h3",{style:{fontStyle:"italic"}},e),r?V.createElement("pre",{style:a},r):null,null)}const $C=V.createElement(zC,null);class qC extends V.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,r){return r.location!==e.location||r.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:r.error,location:r.location,revalidation:e.revalidation||r.revalidation}}componentDidCatch(e,r){console.error("React Router caught the following error during render",e,r)}render(){return this.state.error!==void 0?V.createElement(jl.Provider,{value:this.props.routeContext},V.createElement(M0.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function HC(t){let{routeContext:e,match:r,children:i}=t,a=V.useContext(FC);return a&&a.static&&a.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)&&(a.staticContext._deepestRenderedBoundaryId=r.route.id),V.createElement(jl.Provider,{value:e},i)}function WC(t,e,r,i){var a;if(e===void 0&&(e=[]),r===void 0&&(r=null),i===void 0&&(i=null),t==null){var l;if(!r)return null;if(r.errors)t=r.matches;else if((l=i)!=null&&l.v7_partialHydration&&e.length===0&&!r.initialized&&r.matches.length>0)t=r.matches;else return null}let c=t,d=(a=r)==null?void 0:a.errors;if(d!=null){let g=c.findIndex(y=>y.route.id&&(d==null?void 0:d[y.route.id])!==void 0);g>=0||It(!1),c=c.slice(0,Math.min(c.length,g+1))}let h=!1,m=-1;if(r&&i&&i.v7_partialHydration)for(let g=0;g=0?c=c.slice(0,m+1):c=[c[0]];break}}}return c.reduceRight((g,y,w)=>{let k,_=!1,b=null,x=null;r&&(k=d&&y.route.id?d[y.route.id]:void 0,b=y.route.errorElement||$C,h&&(m<0&&w===0?(XC("route-fallback"),_=!0,x=null):m===w&&(_=!0,x=y.route.hydrateFallbackElement||null)));let E=e.concat(c.slice(0,w+1)),N=()=>{let A;return k?A=b:_?A=x:y.route.Component?A=V.createElement(y.route.Component,null):y.route.element?A=y.route.element:A=g,V.createElement(HC,{match:y,routeContext:{outlet:g,matches:E,isDataRoute:r!=null},children:A})};return r&&(y.route.ErrorBoundary||y.route.errorElement||w===0)?V.createElement(qC,{location:r.location,revalidation:r.revalidation,component:b,error:k,children:N(),routeContext:{outlet:null,matches:E,isDataRoute:!0}}):N()},null)}var F0=(function(t){return t.UseBlocker="useBlocker",t.UseLoaderData="useLoaderData",t.UseActionData="useActionData",t.UseRouteError="useRouteError",t.UseNavigation="useNavigation",t.UseRouteLoaderData="useRouteLoaderData",t.UseMatches="useMatches",t.UseRevalidator="useRevalidator",t.UseNavigateStable="useNavigate",t.UseRouteId="useRouteId",t})(F0||{});function KC(t){let e=V.useContext(IC);return e||It(!1),e}function QC(t){let e=V.useContext(jl);return e||It(!1),e}function GC(t){let e=QC(),r=e.matches[e.matches.length-1];return r.route.id||It(!1),r.route.id}function YC(){var t;let e=V.useContext(M0),r=KC(F0.UseRouteError),i=GC();return e!==void 0?e:(t=r.errors)==null?void 0:t[i]}const jg={};function XC(t,e,r){jg[t]||(jg[t]=!0)}function JC(t,e){t==null||t.v7_startTransition,t==null||t.v7_relativeSplatPath}function Ld(t){It(!1)}function ZC(t){let{basename:e="/",children:r=null,location:i,navigationType:a=Cr.Pop,navigator:l,static:c=!1,future:d}=t;vf()&&It(!1);let h=e.replace(/^\/*/,"/"),m=V.useMemo(()=>({basename:h,navigator:l,static:c,future:kl({v7_relativeSplatPath:!1},d)}),[h,d,l,c]);typeof i=="string"&&(i=Ll(i));let{pathname:g="/",search:y="",hash:w="",state:k=null,key:_="default"}=i,b=V.useMemo(()=>{let x=D0(g,h);return x==null?null:{location:{pathname:x,search:y,hash:w,state:k,key:_},navigationType:a}},[h,g,y,w,k,_,a]);return b==null?null:V.createElement(j0.Provider,{value:m},V.createElement(Lo.Provider,{children:r,value:b}))}function ek(t){let{children:e,location:r}=t;return BC(jd(e),r)}new Promise(()=>{});function jd(t,e){e===void 0&&(e=[]);let r=[];return V.Children.forEach(t,(i,a)=>{if(!V.isValidElement(i))return;let l=[...e,a];if(i.type===V.Fragment){r.push.apply(r,jd(i.props.children,l));return}i.type!==Ld&&It(!1),!i.props.index||!i.props.children||It(!1);let c={id:i.props.id||l.join("-"),caseSensitive:i.props.caseSensitive,element:i.props.element,Component:i.props.Component,index:i.props.index,path:i.props.path,loader:i.props.loader,action:i.props.action,errorElement:i.props.errorElement,ErrorBoundary:i.props.ErrorBoundary,hasErrorBoundary:i.props.ErrorBoundary!=null||i.props.errorElement!=null,shouldRevalidate:i.props.shouldRevalidate,handle:i.props.handle,lazy:i.props.lazy};i.props.children&&(c.children=jd(i.props.children,l)),r.push(c)}),r}/** * React Router DOM v6.30.4 * * Copyright (c) Remix Software Inc. * * This source code is licensed under the MIT license found in the * LICENSE.md file in the root directory of this source tree. * * @license MIT */const tk="6";try{window.__reactRouterVersion=tk}catch{}const nk="startTransition",Mg=JS[nk];function rk(t){let{basename:e,children:r,future:i,window:a}=t,l=V.useRef();l.current==null&&(l.current=mC({window:a,v5Compat:!0}));let c=l.current,[d,h]=V.useState({action:c.action,location:c.location}),{v7_startTransition:m}=i||{},g=V.useCallback(y=>{m&&Mg?Mg(()=>h(y)):h(y)},[h,m]);return V.useLayoutEffect(()=>c.listen(g),[c,g]),V.useEffect(()=>JC(i),[i]),V.createElement(ZC,{basename:e,children:r,location:d.location,navigationType:d.action,navigator:c,future:i})}var Fg;(function(t){t.UseScrollRestoration="useScrollRestoration",t.UseSubmit="useSubmit",t.UseSubmitFetcher="useSubmitFetcher",t.UseFetcher="useFetcher",t.useViewTransitionState="useViewTransitionState"})(Fg||(Fg={}));var Ig;(function(t){t.UseFetcher="useFetcher",t.UseFetchers="useFetchers",t.UseScrollRestoration="useScrollRestoration"})(Ig||(Ig={}));function I0(t,e){return function(){return t.apply(e,arguments)}}const{toString:sk}=Object.prototype,{getPrototypeOf:Ml}=Object,{iterator:Fl,toStringTag:V0}=Symbol,Il=(t=>e=>{const r=sk.call(e);return t[r]||(t[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),gn=t=>(t=t.toLowerCase(),e=>Il(e)===t),Vl=t=>e=>typeof e===t,{isArray:us}=Array,ii=Vl("undefined");function ci(t){return t!==null&&!ii(t)&&t.constructor!==null&&!ii(t.constructor)&&Ft(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}const B0=gn("ArrayBuffer");function ik(t){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&B0(t.buffer),e}const ok=Vl("string"),Ft=Vl("function"),U0=Vl("number"),jo=t=>t!==null&&typeof t=="object",ak=t=>t===!0||t===!1,fl=t=>{if(Il(t)!=="object")return!1;const e=Ml(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(V0 in t)&&!(Fl in t)},lk=t=>{if(!jo(t)||ci(t))return!1;try{return Object.keys(t).length===0&&Object.getPrototypeOf(t)===Object.prototype}catch{return!1}},uk=gn("Date"),ck=gn("File"),dk=t=>!!(t&&typeof t.uri<"u"),fk=t=>t&&typeof t.getParts<"u",hk=gn("Blob"),pk=gn("FileList"),mk=t=>jo(t)&&Ft(t.pipe);function gk(){return typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}}const Vg=gk(),Bg=typeof Vg.FormData<"u"?Vg.FormData:void 0,yk=t=>{if(!t)return!1;if(Bg&&t instanceof Bg)return!0;const e=Ml(t);if(!e||e===Object.prototype||!Ft(t.append))return!1;const r=Il(t);return r==="formdata"||r==="object"&&Ft(t.toString)&&t.toString()==="[object FormData]"},vk=gn("URLSearchParams"),[wk,xk,Sk,bk]=["ReadableStream","Request","Response","Headers"].map(gn),Ek=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Mo(t,e,{allOwnKeys:r=!1}={}){if(t===null||typeof t>"u")return;let i,a;if(typeof t!="object"&&(t=[t]),us(t))for(i=0,a=t.length;i0;)if(a=r[i],e===a.toLowerCase())return a;return null}const Gr=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,$0=t=>!ii(t)&&t!==Gr;function Md(...t){const{caseless:e,skipUndefined:r}=$0(this)&&this||{},i={},a=(l,c)=>{if(c==="__proto__"||c==="constructor"||c==="prototype")return;const d=e&&typeof c=="string"&&z0(i,c)||c,h=Fd(i,d)?i[d]:void 0;fl(h)&&fl(l)?i[d]=Md(h,l):fl(l)?i[d]=Md({},l):us(l)?i[d]=l.slice():(!r||!ii(l))&&(i[d]=l)};for(let l=0,c=t.length;l(Mo(e,(a,l)=>{r&&Ft(a)?Object.defineProperty(t,l,{__proto__:null,value:I0(a,r),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(t,l,{__proto__:null,value:a,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:i}),t),kk=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),Tk=(t,e,r,i)=>{t.prototype=Object.create(e.prototype,i),Object.defineProperty(t.prototype,"constructor",{__proto__:null,value:t,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(t,"super",{__proto__:null,value:e.prototype}),r&&Object.assign(t.prototype,r)},_k=(t,e,r,i)=>{let a,l,c;const d={};if(e=e||{},t==null)return e;do{for(a=Object.getOwnPropertyNames(t),l=a.length;l-- >0;)c=a[l],(!i||i(c,t,e))&&!d[c]&&(e[c]=t[c],d[c]=!0);t=r!==!1&&Ml(t)}while(t&&(!r||r(t,e))&&t!==Object.prototype);return e},Rk=(t,e,r)=>{t=String(t),(r===void 0||r>t.length)&&(r=t.length),r-=e.length;const i=t.indexOf(e,r);return i!==-1&&i===r},Pk=t=>{if(!t)return null;if(us(t))return t;let e=t.length;if(!U0(e))return null;const r=new Array(e);for(;e-- >0;)r[e]=t[e];return r},Ak=(t=>e=>t&&e instanceof t)(typeof Uint8Array<"u"&&Ml(Uint8Array)),Ok=(t,e)=>{const i=(t&&t[Fl]).call(t);let a;for(;(a=i.next())&&!a.done;){const l=a.value;e.call(t,l[0],l[1])}},Nk=(t,e)=>{let r;const i=[];for(;(r=t.exec(e))!==null;)i.push(r);return i},Dk=gn("HTMLFormElement"),Lk=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(r,i,a){return i.toUpperCase()+a}),Fd=(({hasOwnProperty:t})=>(e,r)=>t.call(e,r))(Object.prototype),{propertyIsEnumerable:jk}=Object.prototype,Mk=gn("RegExp"),q0=(t,e)=>{const r=Object.getOwnPropertyDescriptors(t),i={};Mo(r,(a,l)=>{let c;(c=e(a,l,t))!==!1&&(i[l]=c||a)}),Object.defineProperties(t,i)},Fk=t=>{q0(t,(e,r)=>{if(Ft(t)&&["arguments","caller","callee"].includes(r))return!1;const i=t[r];if(Ft(i)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")})}})},Ik=(t,e)=>{const r={},i=a=>{a.forEach(l=>{r[l]=!0})};return us(t)?i(t):i(String(t).split(e)),r},Vk=()=>{},Bk=(t,e)=>t!=null&&Number.isFinite(t=+t)?t:e;function Uk(t){return!!(t&&Ft(t.append)&&t[V0]==="FormData"&&t[Fl])}const zk=t=>{const e=new WeakSet,r=i=>{if(jo(i)){if(e.has(i))return;if(ci(i))return i;if(!("toJSON"in i)){e.add(i);const a=us(i)?[]:{};return Mo(i,(l,c)=>{const d=r(l);!ii(d)&&(a[c]=d)}),e.delete(i),a}}return i};return r(t)},$k=gn("AsyncFunction"),qk=t=>t&&(jo(t)||Ft(t))&&Ft(t.then)&&Ft(t.catch),H0=((t,e)=>t?setImmediate:e?((r,i)=>(Gr.addEventListener("message",({source:a,data:l})=>{a===Gr&&l===r&&i.length&&i.shift()()},!1),a=>{i.push(a),Gr.postMessage(r,"*")}))(`axios@${Math.random()}`,[]):r=>setTimeout(r))(typeof setImmediate=="function",Ft(Gr.postMessage)),Hk=typeof queueMicrotask<"u"?queueMicrotask.bind(Gr):typeof process<"u"&&process.nextTick||H0,Wk=t=>t!=null&&Ft(t[Fl]),L={isArray:us,isArrayBuffer:B0,isBuffer:ci,isFormData:yk,isArrayBufferView:ik,isString:ok,isNumber:U0,isBoolean:ak,isObject:jo,isPlainObject:fl,isEmptyObject:lk,isReadableStream:wk,isRequest:xk,isResponse:Sk,isHeaders:bk,isUndefined:ii,isDate:uk,isFile:ck,isReactNativeBlob:dk,isReactNative:fk,isBlob:hk,isRegExp:Mk,isFunction:Ft,isStream:mk,isURLSearchParams:vk,isTypedArray:Ak,isFileList:pk,forEach:Mo,merge:Md,extend:Ck,trim:Ek,stripBOM:kk,inherits:Tk,toFlatObject:_k,kindOf:Il,kindOfTest:gn,endsWith:Rk,toArray:Pk,forEachEntry:Ok,matchAll:Nk,isHTMLForm:Dk,hasOwnProperty:Fd,hasOwnProp:Fd,reduceDescriptors:q0,freezeMethods:Fk,toObjectSet:Ik,toCamelCase:Lk,noop:Vk,toFiniteNumber:Bk,findKey:z0,global:Gr,isContextDefined:$0,isSpecCompliantForm:Uk,toJSONObject:zk,isAsyncFn:$k,isThenable:qk,setImmediate:H0,asap:Hk,isIterable:Wk},Kk=L.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Qk=t=>{const e={};let r,i,a;return t&&t.split(` `).forEach(function(c){a=c.indexOf(":"),r=c.substring(0,a).trim().toLowerCase(),i=c.substring(a+1).trim(),!(!r||e[r]&&Kk[r])&&(r==="set-cookie"?e[r]?e[r].push(i):e[r]=[i]:e[r]=e[r]?e[r]+", "+i:i)}),e};function Gk(t){let e=0,r=t.length;for(;ee;){const i=t.charCodeAt(r-1);if(i!==9&&i!==32)break;r-=1}return e===0&&r===t.length?t:t.slice(e,r)}const Yk=new RegExp("[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+","g"),Xk=new RegExp("[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+","g");function xf(t,e){return L.isArray(t)?t.map(r=>xf(r,e)):Gk(String(t).replace(e,""))}const Jk=t=>xf(t,Yk),Zk=t=>xf(t,Xk);function W0(t){const e=Object.create(null);return L.forEach(t.toJSON(),(r,i)=>{e[i]=Zk(r)}),e}const Ug=Symbol("internals");function no(t){return t&&String(t).trim().toLowerCase()}function hl(t){return t===!1||t==null?t:L.isArray(t)?t.map(hl):Jk(String(t))}function eT(t){const e=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let i;for(;i=r.exec(t);)e[i[1]]=i[2];return e}const tT=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());function Gc(t,e,r,i,a){if(L.isFunction(i))return i.call(this,e,r);if(a&&(e=r),!!L.isString(e)){if(L.isString(i))return e.indexOf(i)!==-1;if(L.isRegExp(i))return i.test(e)}}function nT(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,r,i)=>r.toUpperCase()+i)}function rT(t,e){const r=L.toCamelCase(" "+e);["get","set","has"].forEach(i=>{Object.defineProperty(t,i+r,{__proto__:null,value:function(a,l,c){return this[i].call(this,e,a,l,c)},configurable:!0})})}let _t=class{constructor(e){e&&this.set(e)}set(e,r,i){const a=this;function l(d,h,m){const g=no(h);if(!g)return;const y=L.findKey(a,g);(!y||a[y]===void 0||m===!0||m===void 0&&a[y]!==!1)&&(a[y||h]=hl(d))}const c=(d,h)=>L.forEach(d,(m,g)=>l(m,g,h));if(L.isPlainObject(e)||e instanceof this.constructor)c(e,r);else if(L.isString(e)&&(e=e.trim())&&!tT(e))c(Qk(e),r);else if(L.isObject(e)&&L.isIterable(e)){let d={},h,m;for(const g of e){if(!L.isArray(g))throw new TypeError("Object iterator must return a key-value pair");d[m=g[0]]=(h=d[m])?L.isArray(h)?[...h,g[1]]:[h,g[1]]:g[1]}c(d,r)}else e!=null&&l(r,e,i);return this}get(e,r){if(e=no(e),e){const i=L.findKey(this,e);if(i){const a=this[i];if(!r)return a;if(r===!0)return eT(a);if(L.isFunction(r))return r.call(this,a,i);if(L.isRegExp(r))return r.exec(a);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,r){if(e=no(e),e){const i=L.findKey(this,e);return!!(i&&this[i]!==void 0&&(!r||Gc(this,this[i],i,r)))}return!1}delete(e,r){const i=this;let a=!1;function l(c){if(c=no(c),c){const d=L.findKey(i,c);d&&(!r||Gc(i,i[d],d,r))&&(delete i[d],a=!0)}}return L.isArray(e)?e.forEach(l):l(e),a}clear(e){const r=Object.keys(this);let i=r.length,a=!1;for(;i--;){const l=r[i];(!e||Gc(this,this[l],l,e,!0))&&(delete this[l],a=!0)}return a}normalize(e){const r=this,i={};return L.forEach(this,(a,l)=>{const c=L.findKey(i,l);if(c){r[c]=hl(a),delete r[l];return}const d=e?nT(l):String(l).trim();d!==l&&delete r[l],r[d]=hl(a),i[d]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const r=Object.create(null);return L.forEach(this,(i,a)=>{i!=null&&i!==!1&&(r[a]=e&&L.isArray(i)?i.join(", "):i)}),r}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,r])=>e+": "+r).join(` `)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...r){const i=new this(e);return r.forEach(a=>i.set(a)),i}static accessor(e){const i=(this[Ug]=this[Ug]={accessors:{}}).accessors,a=this.prototype;function l(c){const d=no(c);i[d]||(rT(a,c),i[d]=!0)}return L.isArray(e)?e.forEach(l):l(e),this}};_t.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);L.reduceDescriptors(_t.prototype,({value:t},e)=>{let r=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(i){this[r]=i}}});L.freezeMethods(_t);const sT="[REDACTED ****]";function iT(t){if(L.hasOwnProp(t,"toJSON"))return!0;let e=Object.getPrototypeOf(t);for(;e&&e!==Object.prototype;){if(L.hasOwnProp(e,"toJSON"))return!0;e=Object.getPrototypeOf(e)}return!1}function oT(t,e){const r=new Set(e.map(l=>String(l).toLowerCase())),i=[],a=l=>{if(l===null||typeof l!="object"||L.isBuffer(l))return l;if(i.indexOf(l)!==-1)return;l instanceof _t&&(l=l.toJSON()),i.push(l);let c;if(L.isArray(l))c=[],l.forEach((d,h)=>{const m=a(d);L.isUndefined(m)||(c[h]=m)});else{if(!L.isPlainObject(l)&&iT(l))return i.pop(),l;c=Object.create(null);for(const[d,h]of Object.entries(l)){const m=r.has(d.toLowerCase())?sT:a(h);L.isUndefined(m)||(c[d]=m)}}return i.pop(),c};return a(t)}let se=class K0 extends Error{static from(e,r,i,a,l,c){const d=new K0(e.message,r||e.code,i,a,l);return d.cause=e,d.name=e.name,e.status!=null&&d.status==null&&(d.status=e.status),c&&Object.assign(d,c),d}constructor(e,r,i,a,l){super(e),Object.defineProperty(this,"message",{__proto__:null,value:e,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,r&&(this.code=r),i&&(this.config=i),a&&(this.request=a),l&&(this.response=l,this.status=l.status)}toJSON(){const e=this.config,r=e&&L.hasOwnProp(e,"redact")?e.redact:void 0,i=L.isArray(r)&&r.length>0?oT(e,r):L.toJSONObject(e);return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:i,code:this.code,status:this.status}}};se.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE";se.ERR_BAD_OPTION="ERR_BAD_OPTION";se.ECONNABORTED="ECONNABORTED";se.ETIMEDOUT="ETIMEDOUT";se.ECONNREFUSED="ECONNREFUSED";se.ERR_NETWORK="ERR_NETWORK";se.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS";se.ERR_DEPRECATED="ERR_DEPRECATED";se.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE";se.ERR_BAD_REQUEST="ERR_BAD_REQUEST";se.ERR_CANCELED="ERR_CANCELED";se.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT";se.ERR_INVALID_URL="ERR_INVALID_URL";se.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";const aT=null;function Id(t){return L.isPlainObject(t)||L.isArray(t)}function Q0(t){return L.endsWith(t,"[]")?t.slice(0,-2):t}function Yc(t,e,r){return t?t.concat(e).map(function(a,l){return a=Q0(a),!r&&l?"["+a+"]":a}).join(r?".":""):e}function lT(t){return L.isArray(t)&&!t.some(Id)}const uT=L.toFlatObject(L,{},null,function(e){return/^is[A-Z]/.test(e)});function Bl(t,e,r){if(!L.isObject(t))throw new TypeError("target must be an object");e=e||new FormData,r=L.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(x,E){return!L.isUndefined(E[x])});const i=r.metaTokens,a=r.visitor||y,l=r.dots,c=r.indexes,d=r.Blob||typeof Blob<"u"&&Blob,h=r.maxDepth===void 0?100:r.maxDepth,m=d&&L.isSpecCompliantForm(e);if(!L.isFunction(a))throw new TypeError("visitor must be a function");function g(b){if(b===null)return"";if(L.isDate(b))return b.toISOString();if(L.isBoolean(b))return b.toString();if(!m&&L.isBlob(b))throw new se("Blob is not supported. Use a Buffer instead.");return L.isArrayBuffer(b)||L.isTypedArray(b)?m&&typeof Blob=="function"?new Blob([b]):Buffer.from(b):b}function y(b,x,E){let N=b;if(L.isReactNative(e)&&L.isReactNativeBlob(b))return e.append(Yc(E,x,l),g(b)),!1;if(b&&!E&&typeof b=="object"){if(L.endsWith(x,"{}"))x=i?x:x.slice(0,-2),b=JSON.stringify(b);else if(L.isArray(b)&&lT(b)||(L.isFileList(b)||L.endsWith(x,"[]"))&&(N=L.toArray(b)))return x=Q0(x),N.forEach(function(D,B){!(L.isUndefined(D)||D===null)&&e.append(c===!0?Yc([x],B,l):c===null?x:x+"[]",g(D))}),!1}return Id(b)?!0:(e.append(Yc(E,x,l),g(b)),!1)}const w=[],k=Object.assign(uT,{defaultVisitor:y,convertValue:g,isVisitable:Id});function _(b,x,E=0){if(!L.isUndefined(b)){if(E>h)throw new se("Object is too deeply nested ("+E+" levels). Max depth: "+h,se.ERR_FORM_DATA_DEPTH_EXCEEDED);if(w.indexOf(b)!==-1)throw new Error("Circular reference detected in "+x.join("."));w.push(b),L.forEach(b,function(A,D){(!(L.isUndefined(A)||A===null)&&a.call(e,A,L.isString(D)?D.trim():D,x,k))===!0&&_(A,x?x.concat(D):[D],E+1)}),w.pop()}}if(!L.isObject(t))throw new TypeError("data must be an object");return _(t),e}function zg(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(t).replace(/[!'()~]|%20/g,function(i){return e[i]})}function Sf(t,e){this._pairs=[],t&&Bl(t,this,e)}const G0=Sf.prototype;G0.append=function(e,r){this._pairs.push([e,r])};G0.toString=function(e){const r=e?function(i){return e.call(this,i,zg)}:zg;return this._pairs.map(function(a){return r(a[0])+"="+r(a[1])},"").join("&")};function cT(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function Y0(t,e,r){if(!e)return t;const i=r&&r.encode||cT,a=L.isFunction(r)?{serialize:r}:r,l=a&&a.serialize;let c;if(l?c=l(e,a):c=L.isURLSearchParams(e)?e.toString():new Sf(e,a).toString(i),c){const d=t.indexOf("#");d!==-1&&(t=t.slice(0,d)),t+=(t.indexOf("?")===-1?"?":"&")+c}return t}class $g{constructor(){this.handlers=[]}use(e,r,i){return this.handlers.push({fulfilled:e,rejected:r,synchronous:i?i.synchronous:!1,runWhen:i?i.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){L.forEach(this.handlers,function(i){i!==null&&e(i)})}}const bf={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0,advertiseZstdAcceptEncoding:!1},dT=typeof URLSearchParams<"u"?URLSearchParams:Sf,fT=typeof FormData<"u"?FormData:null,hT=typeof Blob<"u"?Blob:null,pT={isBrowser:!0,classes:{URLSearchParams:dT,FormData:fT,Blob:hT},protocols:["http","https","file","blob","url","data"]},Ef=typeof window<"u"&&typeof document<"u",Vd=typeof navigator=="object"&&navigator||void 0,mT=Ef&&(!Vd||["ReactNative","NativeScript","NS"].indexOf(Vd.product)<0),gT=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",yT=Ef&&window.location.href||"http://localhost",vT=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Ef,hasStandardBrowserEnv:mT,hasStandardBrowserWebWorkerEnv:gT,navigator:Vd,origin:yT},Symbol.toStringTag,{value:"Module"})),mt={...vT,...pT};function wT(t,e){return Bl(t,new mt.classes.URLSearchParams,{visitor:function(r,i,a,l){return mt.isNode&&L.isBuffer(r)?(this.append(i,r.toString("base64")),!1):l.defaultVisitor.apply(this,arguments)},...e})}function xT(t){return L.matchAll(/\w+|\[(\w*)]/g,t).map(e=>e[0]==="[]"?"":e[1]||e[0])}function ST(t){const e={},r=Object.keys(t);let i;const a=r.length;let l;for(i=0;i=r.length;return c=!c&&L.isArray(a)?a.length:c,h?(L.hasOwnProp(a,c)?a[c]=L.isArray(a[c])?a[c].concat(i):[a[c],i]:a[c]=i,!d):((!L.hasOwnProp(a,c)||!L.isObject(a[c]))&&(a[c]=[]),e(r,i,a[c],l)&&L.isArray(a[c])&&(a[c]=ST(a[c])),!d)}if(L.isFormData(t)&&L.isFunction(t.entries)){const r={};return L.forEachEntry(t,(i,a)=>{e(xT(i),a,r,0)}),r}return null}const Is=(t,e)=>t!=null&&L.hasOwnProp(t,e)?t[e]:void 0;function bT(t,e,r){if(L.isString(t))try{return(e||JSON.parse)(t),L.trim(t)}catch(i){if(i.name!=="SyntaxError")throw i}return(r||JSON.stringify)(t)}const Fo={transitional:bf,adapter:["xhr","http","fetch"],transformRequest:[function(e,r){const i=r.getContentType()||"",a=i.indexOf("application/json")>-1,l=L.isObject(e);if(l&&L.isHTMLForm(e)&&(e=new FormData(e)),L.isFormData(e))return a?JSON.stringify(X0(e)):e;if(L.isArrayBuffer(e)||L.isBuffer(e)||L.isStream(e)||L.isFile(e)||L.isBlob(e)||L.isReadableStream(e))return e;if(L.isArrayBufferView(e))return e.buffer;if(L.isURLSearchParams(e))return r.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let d;if(l){const h=Is(this,"formSerializer");if(i.indexOf("application/x-www-form-urlencoded")>-1)return wT(e,h).toString();if((d=L.isFileList(e))||i.indexOf("multipart/form-data")>-1){const m=Is(this,"env"),g=m&&m.FormData;return Bl(d?{"files[]":e}:e,g&&new g,h)}}return l||a?(r.setContentType("application/json",!1),bT(e)):e}],transformResponse:[function(e){const r=Is(this,"transitional")||Fo.transitional,i=r&&r.forcedJSONParsing,a=Is(this,"responseType"),l=a==="json";if(L.isResponse(e)||L.isReadableStream(e))return e;if(e&&L.isString(e)&&(i&&!a||l)){const d=!(r&&r.silentJSONParsing)&&l;try{return JSON.parse(e,Is(this,"parseReviver"))}catch(h){if(d)throw h.name==="SyntaxError"?se.from(h,se.ERR_BAD_RESPONSE,this,null,Is(this,"response")):h}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:mt.classes.FormData,Blob:mt.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};L.forEach(["delete","get","head","post","put","patch","query"],t=>{Fo.headers[t]={}});function Xc(t,e){const r=this||Fo,i=e||r,a=_t.from(i.headers);let l=i.data;return L.forEach(t,function(d){l=d.call(r,l,a.normalize(),e?e.status:void 0)}),a.normalize(),l}function J0(t){return!!(t&&t.__CANCEL__)}let Io=class extends se{constructor(e,r,i){super(e??"canceled",se.ERR_CANCELED,r,i),this.name="CanceledError",this.__CANCEL__=!0}};function Z0(t,e,r){const i=r.config.validateStatus;!r.status||!i||i(r.status)?t(r):e(new se("Request failed with status code "+r.status,r.status>=400&&r.status<500?se.ERR_BAD_REQUEST:se.ERR_BAD_RESPONSE,r.config,r.request,r))}function ET(t){const e=/^([-+\w]{1,25}):(?:\/\/)?/.exec(t);return e&&e[1]||""}function CT(t,e){t=t||10;const r=new Array(t),i=new Array(t);let a=0,l=0,c;return e=e!==void 0?e:1e3,function(h){const m=Date.now(),g=i[l];c||(c=m),r[a]=h,i[a]=m;let y=l,w=0;for(;y!==a;)w+=r[y++],y=y%t;if(a=(a+1)%t,a===l&&(l=(l+1)%t),m-c{r=g,a=null,l&&(clearTimeout(l),l=null),t(...m)};return[(...m)=>{const g=Date.now(),y=g-r;y>=i?c(m,g):(a=m,l||(l=setTimeout(()=>{l=null,c(a)},i-y)))},()=>a&&c(a)]}const Tl=(t,e,r=3)=>{let i=0;const a=CT(50,250);return kT(l=>{if(!l||typeof l.loaded!="number")return;const c=l.loaded,d=l.lengthComputable?l.total:void 0,h=d!=null?Math.min(c,d):c,m=Math.max(0,h-i),g=a(m);i=Math.max(i,h);const y={loaded:h,total:d,progress:d?h/d:void 0,bytes:m,rate:g||void 0,estimated:g&&d?(d-h)/g:void 0,event:l,lengthComputable:d!=null,[e?"download":"upload"]:!0};t(y)},r)},qg=(t,e)=>{const r=t!=null;return[i=>e[0]({lengthComputable:r,total:t,loaded:i}),e[1]]},Hg=t=>(...e)=>L.asap(()=>t(...e)),TT=mt.hasStandardBrowserEnv?((t,e)=>r=>(r=new URL(r,mt.origin),t.protocol===r.protocol&&t.host===r.host&&(e||t.port===r.port)))(new URL(mt.origin),mt.navigator&&/(msie|trident)/i.test(mt.navigator.userAgent)):()=>!0,_T=mt.hasStandardBrowserEnv?{write(t,e,r,i,a,l,c){if(typeof document>"u")return;const d=[`${t}=${encodeURIComponent(e)}`];L.isNumber(r)&&d.push(`expires=${new Date(r).toUTCString()}`),L.isString(i)&&d.push(`path=${i}`),L.isString(a)&&d.push(`domain=${a}`),l===!0&&d.push("secure"),L.isString(c)&&d.push(`SameSite=${c}`),document.cookie=d.join("; ")},read(t){if(typeof document>"u")return null;const e=document.cookie.split(";");for(let r=0;rt instanceof _t?{...t}:t;function cs(t,e){e=e||{};const r=Object.create(null);Object.defineProperty(r,"hasOwnProperty",{__proto__:null,value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0});function i(m,g,y,w){return L.isPlainObject(m)&&L.isPlainObject(g)?L.merge.call({caseless:w},m,g):L.isPlainObject(g)?L.merge({},g):L.isArray(g)?g.slice():g}function a(m,g,y,w){if(L.isUndefined(g)){if(!L.isUndefined(m))return i(void 0,m,y,w)}else return i(m,g,y,w)}function l(m,g){if(!L.isUndefined(g))return i(void 0,g)}function c(m,g){if(L.isUndefined(g)){if(!L.isUndefined(m))return i(void 0,m)}else return i(void 0,g)}function d(m,g,y){if(L.hasOwnProp(e,y))return i(m,g);if(L.hasOwnProp(t,y))return i(void 0,m)}const h={url:l,method:l,data:l,baseURL:c,transformRequest:c,transformResponse:c,paramsSerializer:c,timeout:c,timeoutMessage:c,withCredentials:c,withXSRFToken:c,adapter:c,responseType:c,xsrfCookieName:c,xsrfHeaderName:c,onUploadProgress:c,onDownloadProgress:c,decompress:c,maxContentLength:c,maxBodyLength:c,beforeRedirect:c,transport:c,httpAgent:c,httpsAgent:c,cancelToken:c,socketPath:c,allowedSocketPaths:c,responseEncoding:c,validateStatus:d,headers:(m,g,y)=>a(Wg(m),Wg(g),y,!0)};return L.forEach(Object.keys({...t,...e}),function(g){if(g==="__proto__"||g==="constructor"||g==="prototype")return;const y=L.hasOwnProp(h,g)?h[g]:a,w=L.hasOwnProp(t,g)?t[g]:void 0,k=L.hasOwnProp(e,g)?e[g]:void 0,_=y(w,k,g);L.isUndefined(_)&&y!==d||(r[g]=_)}),r}const AT=["content-type","content-length"];function OT(t,e,r){if(r!=="content-only"){t.set(e);return}Object.entries(e).forEach(([i,a])=>{AT.includes(i.toLowerCase())&&t.set(i,a)})}const NT=t=>encodeURIComponent(t).replace(/%([0-9A-F]{2})/gi,(e,r)=>String.fromCharCode(parseInt(r,16)));function tw(t){const e=cs({},t),r=w=>L.hasOwnProp(e,w)?e[w]:void 0,i=r("data");let a=r("withXSRFToken");const l=r("xsrfHeaderName"),c=r("xsrfCookieName");let d=r("headers");const h=r("auth"),m=r("baseURL"),g=r("allowAbsoluteUrls"),y=r("url");if(e.headers=d=_t.from(d),e.url=Y0(ew(m,y,g),r("params"),r("paramsSerializer")),h&&d.set("Authorization","Basic "+btoa((h.username||"")+":"+(h.password?NT(h.password):""))),L.isFormData(i)&&(mt.hasStandardBrowserEnv||mt.hasStandardBrowserWebWorkerEnv||L.isReactNative(i)?d.setContentType(void 0):L.isFunction(i.getHeaders)&&OT(d,i.getHeaders(),r("formDataHeaderPolicy"))),mt.hasStandardBrowserEnv&&(L.isFunction(a)&&(a=a(e)),a===!0||a==null&&TT(e.url))){const k=l&&c&&_T.read(c);k&&d.set(l,k)}return e}const DT=typeof XMLHttpRequest<"u",LT=DT&&function(t){return new Promise(function(r,i){const a=tw(t);let l=a.data;const c=_t.from(a.headers).normalize();let{responseType:d,onUploadProgress:h,onDownloadProgress:m}=a,g,y,w,k,_;function b(){k&&k(),_&&_(),a.cancelToken&&a.cancelToken.unsubscribe(g),a.signal&&a.signal.removeEventListener("abort",g)}let x=new XMLHttpRequest;x.open(a.method.toUpperCase(),a.url,!0),x.timeout=a.timeout;function E(){if(!x)return;const A=_t.from("getAllResponseHeaders"in x&&x.getAllResponseHeaders()),B={data:!d||d==="text"||d==="json"?x.responseText:x.response,status:x.status,statusText:x.statusText,headers:A,config:t,request:x};Z0(function(X){r(X),b()},function(X){i(X),b()},B),x=null}"onloadend"in x?x.onloadend=E:x.onreadystatechange=function(){!x||x.readyState!==4||x.status===0&&!(x.responseURL&&x.responseURL.startsWith("file:"))||setTimeout(E)},x.onabort=function(){x&&(i(new se("Request aborted",se.ECONNABORTED,t,x)),b(),x=null)},x.onerror=function(D){const B=D&&D.message?D.message:"Network Error",W=new se(B,se.ERR_NETWORK,t,x);W.event=D||null,i(W),b(),x=null},x.ontimeout=function(){let D=a.timeout?"timeout of "+a.timeout+"ms exceeded":"timeout exceeded";const B=a.transitional||bf;a.timeoutErrorMessage&&(D=a.timeoutErrorMessage),i(new se(D,B.clarifyTimeoutError?se.ETIMEDOUT:se.ECONNABORTED,t,x)),b(),x=null},l===void 0&&c.setContentType(null),"setRequestHeader"in x&&L.forEach(W0(c),function(D,B){x.setRequestHeader(B,D)}),L.isUndefined(a.withCredentials)||(x.withCredentials=!!a.withCredentials),d&&d!=="json"&&(x.responseType=a.responseType),m&&([w,_]=Tl(m,!0),x.addEventListener("progress",w)),h&&x.upload&&([y,k]=Tl(h),x.upload.addEventListener("progress",y),x.upload.addEventListener("loadend",k)),(a.cancelToken||a.signal)&&(g=A=>{x&&(i(!A||A.type?new Io(null,t,x):A),x.abort(),b(),x=null)},a.cancelToken&&a.cancelToken.subscribe(g),a.signal&&(a.signal.aborted?g():a.signal.addEventListener("abort",g)));const N=ET(a.url);if(N&&!mt.protocols.includes(N)){i(new se("Unsupported protocol "+N+":",se.ERR_BAD_REQUEST,t));return}x.send(l||null)})},jT=(t,e)=>{if(t=t?t.filter(Boolean):[],!e&&!t.length)return;const r=new AbortController;let i=!1;const a=function(h){if(!i){i=!0,c();const m=h instanceof Error?h:this.reason;r.abort(m instanceof se?m:new Io(m instanceof Error?m.message:m))}};let l=e&&setTimeout(()=>{l=null,a(new se(`timeout of ${e}ms exceeded`,se.ETIMEDOUT))},e);const c=()=>{t&&(l&&clearTimeout(l),l=null,t.forEach(h=>{h.unsubscribe?h.unsubscribe(a):h.removeEventListener("abort",a)}),t=null)};t.forEach(h=>h.addEventListener("abort",a));const{signal:d}=r;return d.unsubscribe=()=>L.asap(c),d},MT=function*(t,e){let r=t.byteLength;if(r{const a=FT(t,e);let l=0,c,d=h=>{c||(c=!0,i&&i(h))};return new ReadableStream({async pull(h){try{const{done:m,value:g}=await a.next();if(m){d(),h.close();return}let y=g.byteLength;if(r){let w=l+=y;r(w)}h.enqueue(new Uint8Array(g))}catch(m){throw d(m),m}},cancel(h){return d(h),a.return()}},{highWaterMark:2})};function VT(t){if(!t||typeof t!="string"||!t.startsWith("data:"))return 0;const e=t.indexOf(",");if(e<0)return 0;const r=t.slice(5,e),i=t.slice(e+1);if(/;base64/i.test(r)){let c=i.length;const d=i.length;for(let k=0;k=48&&_<=57||_>=65&&_<=70||_>=97&&_<=102)&&(b>=48&&b<=57||b>=65&&b<=70||b>=97&&b<=102)&&(c-=2,k+=2)}let h=0,m=d-1;const g=k=>k>=2&&i.charCodeAt(k-2)===37&&i.charCodeAt(k-1)===51&&(i.charCodeAt(k)===68||i.charCodeAt(k)===100);m>=0&&(i.charCodeAt(m)===61?(h++,m--):g(m)&&(h++,m-=3)),h===1&&m>=0&&(i.charCodeAt(m)===61||g(m))&&h++;const w=Math.floor(c/4)*3-(h||0);return w>0?w:0}if(typeof Buffer<"u"&&typeof Buffer.byteLength=="function")return Buffer.byteLength(i,"utf8");let l=0;for(let c=0,d=i.length;c=55296&&h<=56319&&c+1=56320&&m<=57343?(l+=4,c++):l+=3}else l+=3}return l}const Cf="1.17.0",Qg=64*1024,{isFunction:rl}=L,BT=t=>encodeURIComponent(t).replace(/%([0-9A-F]{2})/gi,(e,r)=>String.fromCharCode(parseInt(r,16))),Gg=t=>{if(!L.isString(t))return t;try{return decodeURIComponent(t)}catch{return t}},Yg=(t,...e)=>{try{return!!t(...e)}catch{return!1}},UT=t=>{const e=t.indexOf("://");let r=t;return e!==-1&&(r=r.slice(e+3)),r.includes("@")||r.includes(":")},zT=t=>{const e=L.global!==void 0&&L.global!==null?L.global:globalThis,{ReadableStream:r,TextEncoder:i}=e;t=L.merge.call({skipUndefined:!0},{Request:e.Request,Response:e.Response},t);const{fetch:a,Request:l,Response:c}=t,d=a?rl(a):typeof fetch=="function",h=rl(l),m=rl(c);if(!d)return!1;const g=d&&rl(r),y=d&&(typeof i=="function"?(E=>N=>E.encode(N))(new i):async E=>new Uint8Array(await new l(E).arrayBuffer())),w=h&&g&&Yg(()=>{let E=!1;const N=new l(mt.origin,{body:new r,method:"POST",get duplex(){return E=!0,"half"}}),A=N.headers.has("Content-Type");return N.body!=null&&N.body.cancel(),E&&!A}),k=m&&g&&Yg(()=>L.isReadableStream(new c("").body)),_={stream:k&&(E=>E.body)};d&&["text","arrayBuffer","blob","formData","stream"].forEach(E=>{!_[E]&&(_[E]=(N,A)=>{let D=N&&N[E];if(D)return D.call(N);throw new se(`Response type '${E}' is not supported`,se.ERR_NOT_SUPPORT,A)})});const b=async E=>{if(E==null)return 0;if(L.isBlob(E))return E.size;if(L.isSpecCompliantForm(E))return(await new l(mt.origin,{method:"POST",body:E}).arrayBuffer()).byteLength;if(L.isArrayBufferView(E)||L.isArrayBuffer(E))return E.byteLength;if(L.isURLSearchParams(E)&&(E=E+""),L.isString(E))return(await y(E)).byteLength},x=async(E,N)=>{const A=L.toFiniteNumber(E.getContentLength());return A??b(N)};return async E=>{let{url:N,method:A,data:D,signal:B,cancelToken:W,timeout:X,onDownloadProgress:I,onUploadProgress:ee,responseType:ce,headers:ue,withCredentials:Pe="same-origin",fetchOptions:ze,maxContentLength:_e,maxBodyLength:je}=tw(E);const Ae=L.isNumber(_e)&&_e>-1,ge=L.isNumber(je)&&je>-1,Q=J=>L.hasOwnProp(E,J)?E[J]:void 0;let oe=a||fetch;ce=ce?(ce+"").toLowerCase():"text";let U=jT([B,W&&W.toAbortSignal()],X),O=null;const z=U&&U.unsubscribe&&(()=>{U.unsubscribe()});let xe;try{let J;const le=Q("auth");if(le){const ye=le.username||"",it=le.password||"";J={username:ye,password:it}}if(UT(N)){const ye=new URL(N,mt.origin);if(!J&&(ye.username||ye.password)){const it=Gg(ye.username),Et=Gg(ye.password);J={username:it,password:Et}}(ye.username||ye.password)&&(ye.username="",ye.password="",N=ye.href)}if(J&&(ue.delete("authorization"),ue.set("Authorization","Basic "+btoa(BT((J.username||"")+":"+(J.password||""))))),Ae&&typeof N=="string"&&N.startsWith("data:")&&VT(N)>_e)throw new se("maxContentLength size of "+_e+" exceeded",se.ERR_BAD_RESPONSE,E,O);if(ge&&A!=="get"&&A!=="head"){const ye=await x(ue,D);if(typeof ye=="number"&&isFinite(ye)&&ye>je)throw new se("Request body larger than maxBodyLength limit",se.ERR_BAD_REQUEST,E,O)}if(ee&&w&&A!=="get"&&A!=="head"&&(xe=await x(ue,D))!==0){let ye=new l(N,{method:"POST",body:D,duplex:"half"}),it;if(L.isFormData(D)&&(it=ye.headers.get("content-type"))&&ue.setContentType(it),ye.body){const[Et,Vt]=qg(xe,Tl(Hg(ee)));D=Kg(ye.body,Qg,Et,Vt)}}L.isString(Pe)||(Pe=Pe?"include":"omit");const pe=h&&"credentials"in l.prototype;if(L.isFormData(D)){const ye=ue.getContentType();ye&&/^multipart\/form-data/i.test(ye)&&!/boundary=/i.test(ye)&&ue.delete("content-type")}ue.set("User-Agent","axios/"+Cf,!1);const Re={...ze,signal:U,method:A.toUpperCase(),headers:W0(ue.normalize()),body:D,duplex:"half",credentials:pe?Pe:void 0};O=h&&new l(N,Re);let Se=await(h?oe(O,ze):oe(N,Re));if(Ae){const ye=L.toFiniteNumber(Se.headers.get("content-length"));if(ye!=null&&ye>_e)throw new se("maxContentLength size of "+_e+" exceeded",se.ERR_BAD_RESPONSE,E,O)}const ve=k&&(ce==="stream"||ce==="response");if(k&&Se.body&&(I||Ae||ve&&z)){const ye={};["status","statusText","headers"].forEach(Pn=>{ye[Pn]=Se[Pn]});const it=L.toFiniteNumber(Se.headers.get("content-length")),[Et,Vt]=I&&qg(it,Tl(Hg(I),!0))||[];let pi=0;const $o=Pn=>{if(Ae&&(pi=Pn,pi>_e))throw new se("maxContentLength size of "+_e+" exceeded",se.ERR_BAD_RESPONSE,E,O);Et&&Et(Pn)};Se=new c(Kg(Se.body,Qg,$o,()=>{Vt&&Vt(),z&&z()}),ye)}ce=ce||"text";let Fe=await _[L.findKey(_,ce)||"text"](Se,E);if(Ae&&!k&&!ve){let ye;if(Fe!=null&&(typeof Fe.byteLength=="number"?ye=Fe.byteLength:typeof Fe.size=="number"?ye=Fe.size:typeof Fe=="string"&&(ye=typeof i=="function"?new i().encode(Fe).byteLength:Fe.length)),typeof ye=="number"&&ye>_e)throw new se("maxContentLength size of "+_e+" exceeded",se.ERR_BAD_RESPONSE,E,O)}return!ve&&z&&z(),await new Promise((ye,it)=>{Z0(ye,it,{data:Fe,headers:_t.from(Se.headers),status:Se.status,statusText:Se.statusText,config:E,request:O})})}catch(J){if(z&&z(),U&&U.aborted&&U.reason instanceof se){const le=U.reason;throw le.config=E,O&&(le.request=O),J!==le&&(le.cause=J),le}throw J&&J.name==="TypeError"&&/Load failed|fetch/i.test(J.message)?Object.assign(new se("Network Error",se.ERR_NETWORK,E,O,J&&J.response),{cause:J.cause||J}):se.from(J,J&&J.code,E,O,J&&J.response)}}},$T=new Map,nw=t=>{let e=t&&t.env||{};const{fetch:r,Request:i,Response:a}=e,l=[i,a,r];let c=l.length,d=c,h,m,g=$T;for(;d--;)h=l[d],m=g.get(h),m===void 0&&g.set(h,m=d?new Map:zT(e)),g=m;return m};nw();const kf={http:aT,xhr:LT,fetch:{get:nw}};L.forEach(kf,(t,e)=>{if(t){try{Object.defineProperty(t,"name",{__proto__:null,value:e})}catch{}Object.defineProperty(t,"adapterName",{__proto__:null,value:e})}});const Xg=t=>`- ${t}`,qT=t=>L.isFunction(t)||t===null||t===!1;function HT(t,e){t=L.isArray(t)?t:[t];const{length:r}=t;let i,a;const l={};for(let c=0;c`adapter ${h} `+(m===!1?"is not supported by the environment":"is not available in the build"));let d=r?c.length>1?`since : `+c.map(Xg).join(` `):" "+Xg(c[0]):"as no adapter specified";throw new se("There is no suitable adapter to dispatch the request "+d,"ERR_NOT_SUPPORT")}return a}const rw={getAdapter:HT,adapters:kf};function Jc(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new Io(null,t)}function Jg(t){return Jc(t),t.headers=_t.from(t.headers),t.data=Xc.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),rw.getAdapter(t.adapter||Fo.adapter,t)(t).then(function(i){Jc(t),t.response=i;try{i.data=Xc.call(t,t.transformResponse,i)}finally{delete t.response}return i.headers=_t.from(i.headers),i},function(i){if(!J0(i)&&(Jc(t),i&&i.response)){t.response=i.response;try{i.response.data=Xc.call(t,t.transformResponse,i.response)}finally{delete t.response}i.response.headers=_t.from(i.response.headers)}return Promise.reject(i)})}const Ul={};["object","boolean","number","function","string","symbol"].forEach((t,e)=>{Ul[t]=function(i){return typeof i===t||"a"+(e<1?"n ":" ")+t}});const Zg={};Ul.transitional=function(e,r,i){function a(l,c){return"[Axios v"+Cf+"] Transitional option '"+l+"'"+c+(i?". "+i:"")}return(l,c,d)=>{if(e===!1)throw new se(a(c," has been removed"+(r?" in "+r:"")),se.ERR_DEPRECATED);return r&&!Zg[c]&&(Zg[c]=!0,console.warn(a(c," has been deprecated since v"+r+" and will be removed in the near future"))),e?e(l,c,d):!0}};Ul.spelling=function(e){return(r,i)=>(console.warn(`${i} is likely a misspelling of ${e}`),!0)};function WT(t,e,r){if(typeof t!="object")throw new se("options must be an object",se.ERR_BAD_OPTION_VALUE);const i=Object.keys(t);let a=i.length;for(;a-- >0;){const l=i[a],c=Object.prototype.hasOwnProperty.call(e,l)?e[l]:void 0;if(c){const d=t[l],h=d===void 0||c(d,l,t);if(h!==!0)throw new se("option "+l+" must be "+h,se.ERR_BAD_OPTION_VALUE);continue}if(r!==!0)throw new se("Unknown option "+l,se.ERR_BAD_OPTION)}}const pl={assertOptions:WT,validators:Ul},Lt=pl.validators;let os=class{constructor(e){this.defaults=e||{},this.interceptors={request:new $g,response:new $g}}async request(e,r){try{return await this._request(e,r)}catch(i){if(i instanceof Error){let a={};Error.captureStackTrace?Error.captureStackTrace(a):a=new Error;const l=(()=>{if(!a.stack)return"";const c=a.stack.indexOf(` `);return c===-1?"":a.stack.slice(c+1)})();try{if(!i.stack)i.stack=l;else if(l){const c=l.indexOf(` `),d=c===-1?-1:l.indexOf(` `,c+1),h=d===-1?"":l.slice(d+1);String(i.stack).endsWith(h)||(i.stack+=` `+l)}}catch{}}throw i}}_request(e,r){typeof e=="string"?(r=r||{},r.url=e):r=e||{},r=cs(this.defaults,r);const{transitional:i,paramsSerializer:a,headers:l}=r;i!==void 0&&pl.assertOptions(i,{silentJSONParsing:Lt.transitional(Lt.boolean),forcedJSONParsing:Lt.transitional(Lt.boolean),clarifyTimeoutError:Lt.transitional(Lt.boolean),legacyInterceptorReqResOrdering:Lt.transitional(Lt.boolean),advertiseZstdAcceptEncoding:Lt.transitional(Lt.boolean)},!1),a!=null&&(L.isFunction(a)?r.paramsSerializer={serialize:a}:pl.assertOptions(a,{encode:Lt.function,serialize:Lt.function},!0)),r.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?r.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:r.allowAbsoluteUrls=!0),pl.assertOptions(r,{baseUrl:Lt.spelling("baseURL"),withXsrfToken:Lt.spelling("withXSRFToken")},!0),r.method=(r.method||this.defaults.method||"get").toLowerCase();let c=l&&L.merge(l.common,l[r.method]);l&&L.forEach(["delete","get","head","post","put","patch","query","common"],_=>{delete l[_]}),r.headers=_t.concat(c,l);const d=[];let h=!0;this.interceptors.request.forEach(function(b){if(typeof b.runWhen=="function"&&b.runWhen(r)===!1)return;h=h&&b.synchronous;const x=r.transitional||bf;x&&x.legacyInterceptorReqResOrdering?d.unshift(b.fulfilled,b.rejected):d.push(b.fulfilled,b.rejected)});const m=[];this.interceptors.response.forEach(function(b){m.push(b.fulfilled,b.rejected)});let g,y=0,w;if(!h){const _=[Jg.bind(this),void 0];for(_.unshift(...d),_.push(...m),w=_.length,g=Promise.resolve(r);y{if(!i._listeners)return;let l=i._listeners.length;for(;l-- >0;)i._listeners[l](a);i._listeners=null}),this.promise.then=a=>{let l;const c=new Promise(d=>{i.subscribe(d),l=d}).then(a);return c.cancel=function(){i.unsubscribe(l)},c},e(function(l,c,d){i.reason||(i.reason=new Io(l,c,d),r(i.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const r=this._listeners.indexOf(e);r!==-1&&this._listeners.splice(r,1)}toAbortSignal(){const e=new AbortController,r=i=>{e.abort(i)};return this.subscribe(r),e.signal.unsubscribe=()=>this.unsubscribe(r),e.signal}static source(){let e;return{token:new sw(function(a){e=a}),cancel:e}}};function QT(t){return function(r){return t.apply(null,r)}}function GT(t){return L.isObject(t)&&t.isAxiosError===!0}const Bd={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(Bd).forEach(([t,e])=>{Bd[e]=t});function iw(t){const e=new os(t),r=I0(os.prototype.request,e);return L.extend(r,os.prototype,e,{allOwnKeys:!0}),L.extend(r,e,null,{allOwnKeys:!0}),r.create=function(a){return iw(cs(t,a))},r}const Ze=iw(Fo);Ze.Axios=os;Ze.CanceledError=Io;Ze.CancelToken=KT;Ze.isCancel=J0;Ze.VERSION=Cf;Ze.toFormData=Bl;Ze.AxiosError=se;Ze.Cancel=Ze.CanceledError;Ze.all=function(e){return Promise.all(e)};Ze.spread=QT;Ze.isAxiosError=GT;Ze.mergeConfig=cs;Ze.AxiosHeaders=_t;Ze.formToJSON=t=>X0(L.isHTMLForm(t)?new FormData(t):t);Ze.getAdapter=rw.getAdapter;Ze.HttpStatusCode=Bd;Ze.default=Ze;const{Axios:A2,AxiosError:O2,CanceledError:N2,isCancel:D2,CancelToken:L2,VERSION:j2,all:M2,Cancel:F2,isAxiosError:I2,spread:V2,toFormData:B2,AxiosHeaders:U2,HttpStatusCode:z2,formToJSON:$2,getAdapter:q2,mergeConfig:H2,create:W2}=Ze,ow=typeof window>"u",ey=!ow&&window.self!==window.top,YT=!ow&&typeof document>"u",Zc=()=>Math.random().toString(36).substring(2,15)+Math.random().toString(36).substring(2,15),ft=[];for(let t=0;t<256;++t)ft.push((t+256).toString(16).slice(1));function XT(t,e=0){return(ft[t[e+0]]+ft[t[e+1]]+ft[t[e+2]]+ft[t[e+3]]+"-"+ft[t[e+4]]+ft[t[e+5]]+"-"+ft[t[e+6]]+ft[t[e+7]]+"-"+ft[t[e+8]]+ft[t[e+9]]+"-"+ft[t[e+10]]+ft[t[e+11]]+ft[t[e+12]]+ft[t[e+13]]+ft[t[e+14]]+ft[t[e+15]]).toLowerCase()}let ed;const JT=new Uint8Array(16);function ZT(){if(!ed){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");ed=crypto.getRandomValues.bind(crypto)}return ed(JT)}const e_=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),ty={randomUUID:e_};function t_(t,e,r){var a;t=t||{};const i=t.random??((a=t.rng)==null?void 0:a.call(t))??ZT();if(i.length<16)throw new Error("Random bytes length must be >= 16");return i[6]=i[6]&15|64,i[8]=i[8]&63|128,XT(i)}function n_(t,e,r){return ty.randomUUID&&!t?ty.randomUUID():t_(t)}const ro=typeof window<"u"?window:{base44SharedInstances:{}};function r_(t,e){return ro.base44SharedInstances||(ro.base44SharedInstances={}),ro.base44SharedInstances[t]||(ro.base44SharedInstances[t]={instance:e()}),ro.base44SharedInstances[t].instance}const s_="__user_heartbeat_event__",i_="__initialization_event__",o_="__session_duration_event__",ny="analytics-enable",ry="base44_analytics_session_id",a_={enabled:!0,maxQueueSize:1e3,throttleTime:1e3,batchSize:30,heartBeatInterval:60*1e3},l_="analytics",Me=r_(l_,()=>({requestsQueue:[],isProcessing:!1,isHeartBeatProcessing:!1,wasInitializationTracked:!1,sessionContext:null,sessionStartTime:null,config:{...a_,...g_()}})),u_=({axiosClient:t,serverUrl:e,appId:r,userAuthModule:i})=>{var a;const{maxQueueSize:l,throttleTime:c,batchSize:d}=Me.config;if(!(!((a=Me.config)===null||a===void 0)&&a.enabled)||YT)return{track:()=>{},cleanup:()=>{}};let h;const m=`${e}/api/apps/${r}/analytics/track/batch`,g=async A=>{await t.request({method:"POST",url:`/apps/${r}/analytics/track/batch`,data:{events:A}})},y=A=>{try{const D=JSON.stringify({events:A}),B=new Blob([D],{type:"application/json"});return typeof navigator>"u"||D.length>6e4||!navigator.sendBeacon(m,B)}catch{return!1}},w=async(A,D={})=>{if(A.length===0)return;const B=await m_(i),W=A.map(p_(B));try{(!D.isBeacon||!y(W))&&await g(W)}catch{}},k=()=>{iy(w,{throttleTime:c,batchSize:d})},_=A=>{if(Me.requestsQueue.length>=l)return;const D=h_();Me.requestsQueue.push({...A,...D}),k()},b=()=>{iy(w,{throttleTime:c,batchSize:d}),h=oy(_),d_()},x=()=>{sy(),h==null||h(),f_(_);const A=Me.requestsQueue.splice(0);w(A,{isBeacon:!0})},E=()=>{typeof window>"u"||(document.visibilityState==="hidden"?x():document.visibilityState==="visible"&&b())},N=()=>{sy(),h==null||h(),typeof window<"u"&&window.removeEventListener("visibilitychange",E)};return k(),h=oy(_),c_(_),typeof window<"u"&&window.addEventListener("visibilitychange",E),{track:_,cleanup:N}};function sy(){Me.isProcessing=!1}async function iy(t,e){if(Me.isProcessing)return;Me.isProcessing=!0;const{throttleTime:r=1e3,batchSize:i=30}=e??{};for(;Me.isProcessing&&Me.requestsQueue.length>0;){const a=Me.requestsQueue.splice(0,i);a.length&&await t(a),await new Promise(l=>setTimeout(l,r))}Me.isProcessing=!1}function oy(t){var e;if(Me.isHeartBeatProcessing||((e=Me.config.heartBeatInterval)!==null&&e!==void 0?e:0)<10)return()=>{};Me.isHeartBeatProcessing=!0;const r=setInterval(()=>{t({eventName:s_})},Me.config.heartBeatInterval);return()=>{clearInterval(r),Me.isHeartBeatProcessing=!1}}function c_(t){typeof window>"u"||Me.wasInitializationTracked||(Me.wasInitializationTracked=!0,t({eventName:i_,properties:{referrer:document==null?void 0:document.referrer}}))}function d_(){typeof window>"u"||Me.sessionStartTime!==null||(Me.sessionStartTime=new Date().toISOString())}function f_(t){if(typeof window>"u"||Me.sessionStartTime===null)return;const e=new Date().getTime()-new Date(Me.sessionStartTime).getTime();Me.sessionStartTime=null,t({eventName:o_,properties:{sessionDuration:e}})}function h_(){return{timestamp:new Date().toISOString(),pageUrl:typeof window<"u"?window.location.pathname:null}}function p_(t){return e=>({event_name:e.eventName,properties:e.properties,timestamp:e.timestamp,page_url:e.pageUrl,...t})}let td=null;async function m_(t){if(!Me.sessionContext){if(!td){const e=Tf();td=t.me().then(r=>({user_id:r.id,session_id:e})).catch(()=>({user_id:null,session_id:e}))}Me.sessionContext=await td}return Me.sessionContext}function g_(){if(typeof window>"u"||!window.location)return;const e=new URLSearchParams(window.location.search).get(ny);if(e==null||!e.length)return;const r=new URLSearchParams(window.location.search);r.delete(ny);const i=window.location.pathname+(r.toString()?"?"+r.toString():"");return window.history.replaceState({},"",i),{enabled:e==="true"}}function Tf(){if(typeof window>"u")return Zc();try{const t=localStorage.getItem(ry);if(!t){const e=Zc();return localStorage.setItem(ry,e),e}return t}catch{return Zc()}}class y_ extends Error{constructor(e,r,i,a,l){super(e),this.name="Base44Error",this.status=r,this.code=i,this.data=a,this.originalError=l}toJSON(){return{name:this.name,message:this.message,status:this.status,code:this.code,data:this.data}}}function ao({baseURL:t,headers:e={},token:r,interceptResponses:i=!0,onError:a}){const l=Ze.create({baseURL:t,headers:{"Content-Type":"application/json",Accept:"application/json",...e}});return r&&(l.defaults.headers.common.Authorization=`Bearer ${r}`),l.interceptors.request.use(c=>{typeof window<"u"&&window.location&&(c.headers.set("X-Origin-URL",window.location.href),c.headers.get("Authorization")||c.headers.set("X-Base44-Anonymous-Id",Tf()));const d=n_();if(c.requestId=d,ey)try{window.parent.postMessage({type:"api-request-start",requestId:d,data:{url:t+c.url,method:c.method,body:c.data instanceof FormData?"[FormData object]":c.data}},"*")}catch{}return c}),i&&l.interceptors.response.use(c=>{var d;const h=(d=c.config)===null||d===void 0?void 0:d.requestId;try{ey&&h&&window.parent.postMessage({type:"api-request-end",requestId:h,data:{statusCode:c.status,response:c.data}},"*")}catch{}return c.data},c=>{var d,h,m,g,y,w,k,_;const b=((h=(d=c.response)===null||d===void 0?void 0:d.data)===null||h===void 0?void 0:h.message)||((g=(m=c.response)===null||m===void 0?void 0:m.data)===null||g===void 0?void 0:g.detail)||c.message,x=new y_(b,(y=c.response)===null||y===void 0?void 0:y.status,(k=(w=c.response)===null||w===void 0?void 0:w.data)===null||k===void 0?void 0:k.code,(_=c.response)===null||_===void 0?void 0:_.data,c);return a==null||a(x),Promise.reject(x)}),l}function ay(t){const{axios:e,appId:r,getSocket:i}=t;return new Proxy({},{get(a,l){if(!(typeof l!="string"||l==="then"||l.startsWith("_")))return w_(e,r,l,i)}})}function v_(t){var e;try{const r=JSON.parse(t);return{type:r.type,data:r.data,id:r.id||((e=r.data)===null||e===void 0?void 0:e.id),timestamp:r.timestamp||new Date().toISOString()}}catch(r){return console.warn("[Base44 SDK] Failed to parse realtime message:",r),null}}function w_(t,e,r,i){const a=`/apps/${e}/entities/${r}`;return{async list(l,c,d,h){const m={};return l&&(m.sort=l),c&&(m.limit=c),d&&(m.skip=d),h&&(m.fields=Array.isArray(h)?h.join(","):h),t.get(a,{params:m})},async filter(l,c,d,h,m){const g={q:JSON.stringify(l)};return c&&(g.sort=c),d&&(g.limit=d),h&&(g.skip=h),m&&(g.fields=Array.isArray(m)?m.join(","):m),t.get(a,{params:g})},async get(l){return t.get(`${a}/${l}`)},async create(l){return t.post(a,l)},async update(l,c){return t.put(`${a}/${l}`,c)},async delete(l){return t.delete(`${a}/${l}`)},async deleteMany(l){return t.delete(a,{data:l})},async bulkCreate(l){return t.post(`${a}/bulk`,l)},async updateMany(l,c){return t.patch(`${a}/update-many`,{query:l,data:c})},async bulkUpdate(l){return t.put(`${a}/bulk`,l)},async importEntities(l){const c=new FormData;return c.append("file",l,l.name),t.post(`${a}/import`,c,{headers:{"Content-Type":"multipart/form-data"}})},subscribe(l){const c=`entities:${e}:${r}`;return i().subscribeToRoom(c,{update_model:m=>{var g;const y=v_(m.data);if(y){y.type!=="delete"&&(!((g=y.data)===null||g===void 0)&&g._oversize)&&console.error(`[Base44 SDK] Realtime broadcast for ${r}#${y.id} was oversize and got slimmed for transport. Fields >10 KB are empty and the rest of the record may be a stub. Call \`entities.${r}.get("${y.id}")\` to fetch the full record.`);try{l(y)}catch(w){console.error("[Base44 SDK] Subscription callback error:",w)}}}})}}}function x_(t,e){return{async call(r,i,a){if(!(r!=null&&r.trim()))throw new Error("Integration slug is required and cannot be empty");if(!(i!=null&&i.trim()))throw new Error("Operation ID is required and cannot be empty");const{pathParams:l,queryParams:c,...d}=a??{},h={...d,...l&&{path_params:l},...c&&{query_params:c}};return await t.post(`/apps/${e}/integrations/custom/${r}/${i}`,h)}}}function ly(t,e){const r=x_(t,e);return new Proxy({},{get(i,a){if(!(typeof a!="string"||a==="then"||a.startsWith("_")))return a==="custom"?r:new Proxy({},{get(l,c){if(!(typeof c!="string"||c==="then"||c.startsWith("_")))return async d=>{if(typeof d=="string")throw new Error(`Integration ${c} must receive an object with named parameters, received: ${d}`);let h,m;return d instanceof FormData||d&&Object.values(d).some(g=>g instanceof File)?(h=new FormData,Object.keys(d).forEach(g=>{d[g]instanceof File?h.append(g,d[g],d[g].name):typeof d[g]=="object"&&d[g]!==null?h.append(g,JSON.stringify(d[g])):h.append(g,d[g])}),m="multipart/form-data"):(h=d,m="application/json"),a==="Core"?t.post(`/apps/${e}/integration-endpoints/Core/${c}`,h||d,{headers:{"Content-Type":m}}):t.post(`/apps/${e}/integration-endpoints/installable/${a}/integration-endpoints/${c}`,h||d,{headers:{"Content-Type":m}})}}})}})}function S_(){return typeof window>"u"?!1:window!==window.parent}function b_(t,e,r){const l=Math.round(window.screenX+(window.outerWidth-500)/2),c=Math.round(window.screenY+(window.outerHeight-600)/2),d=window.open(t,"base44_auth",`width=500,height=600,left=${l},top=${c},resizable=yes,scrollbars=yes`);if(!d)return;const h=()=>{window.removeEventListener("message",m),clearInterval(g),d.closed||d.close()},m=y=>{var w;if(y.origin!==r||y.source!==d||!(!((w=y.data)===null||w===void 0)&&w.access_token))return;h();const k=new URL(e),{access_token:_,is_new_user:b}=y.data;k.searchParams.set("access_token",_),b!=null&&k.searchParams.set("is_new_user",String(b)),window.location.href=k.toString()},g=setInterval(()=>{d.closed&&h()},500);window.addEventListener("message",m)}function E_(t,e,r,i){return{async me(){return t.get(`/apps/${r}/entities/User/me`)},async updateMe(a){return t.put(`/apps/${r}/entities/User/me`,a)},redirectToLogin(a){if(typeof window>"u")throw new Error("Login method can only be used in a browser environment");const l=a?new URL(a,window.location.origin).toString():window.location.href,c=`${i.appBaseUrl}/login?from_url=${encodeURIComponent(l)}`;window.location.href=c},loginWithProvider(a,l="/"){const c=new URL(l,window.location.origin).toString(),d=`app_id=${r}&from_url=${encodeURIComponent(c)}`;let h;a==="sso"?h=`/apps/${r}/auth/sso/login`:h=`/apps/auth${a==="google"?"":`/${a}`}/login`;const m=`${i.appBaseUrl}/api${h}?${d}`;if(S_()){const g=`${m}&popup_origin=${encodeURIComponent(window.location.origin)}`;return b_(g,c,window.location.origin)}window.location.href=m},logout(a){if(delete t.defaults.headers.common.Authorization,typeof window<"u"){if(window.localStorage)try{window.localStorage.removeItem("base44_access_token"),window.localStorage.removeItem("token")}catch(d){console.error("Failed to remove token from localStorage:",d)}const l=a||window.location.href,c=`${i.appBaseUrl}/api/apps/auth/logout?from_url=${encodeURIComponent(l)}`;window.location.href=c}},setToken(a,l=!0){if(a&&(t.defaults.headers.common.Authorization=`Bearer ${a}`,e.defaults.headers.common.Authorization=`Bearer ${a}`,l&&typeof window<"u"&&window.localStorage))try{window.localStorage.setItem("base44_access_token",a),window.localStorage.setItem("token",a)}catch(c){console.error("Failed to save token to localStorage:",c)}},async loginViaEmailPassword(a,l,c){var d;try{const h=await t.post(`/apps/${r}/auth/login`,{email:a,password:l,...c&&{turnstile_token:c}}),{access_token:m,user:g}=h;return m&&this.setToken(m),{access_token:m,user:g}}catch(h){throw((d=h.response)===null||d===void 0?void 0:d.status)===401&&await this.logout(),h}},async isAuthenticated(){try{return await this.me(),!0}catch{return!1}},inviteUser(a,l){return t.post(`/apps/${r}/users/invite-user`,{user_email:a,role:l})},register(a){return t.post(`/apps/${r}/auth/register`,a)},verifyOtp({email:a,otpCode:l}){return t.post(`/apps/${r}/auth/verify-otp`,{email:a,otp_code:l})},resendOtp(a){return t.post(`/apps/${r}/auth/resend-otp`,{email:a})},resetPasswordRequest(a){return t.post(`/apps/${r}/auth/reset-password-request`,{email:a})},resetPassword({resetToken:a,newPassword:l}){return t.post(`/apps/${r}/auth/reset-password`,{reset_token:a,new_password:l})},changePassword({userId:a,currentPassword:l,newPassword:c}){return t.post(`/apps/${r}/auth/change-password`,{user_id:a,current_password:l,new_password:c})}}}function C_(t,e){return{async getAccessToken(r){const i=`/apps/${e}/auth/sso/accesstoken/${r}`;return t.get(i)}}}function k_(t,e){return{async getAccessToken(r){if(!r||typeof r!="string")throw new Error("Integration type is required and must be a string");return(await t.get(`/apps/${e}/external-auth/tokens/${r}`)).access_token},async getConnection(r){var i;if(!r||typeof r!="string")throw new Error("Integration type is required and must be a string");const l=await t.get(`/apps/${e}/external-auth/tokens/${r}`);return{accessToken:l.access_token,connectionConfig:(i=l.connection_config)!==null&&i!==void 0?i:null}},async getWorkspaceConnection(r){var i;if(!r||typeof r!="string")throw new Error("Connector ID is required and must be a string");const l=await t.get(`/apps/${e}/external-auth/tokens/connectors/${r}`);return{accessToken:l.access_token,connectionConfig:(i=l.connection_config)!==null&&i!==void 0?i:null}},async getCurrentAppUserAccessToken(r){if(!r||typeof r!="string")throw new Error("Connector ID is required and must be a string");return(await t.get(`/apps/${e}/app-user-auth/connectors/${r}/token`)).access_token},async getCurrentAppUserConnection(r){var i;if(!r||typeof r!="string")throw new Error("Connector ID is required and must be a string");const l=await t.get(`/apps/${e}/app-user-auth/connectors/${r}/token`);return{accessToken:l.access_token,connectionConfig:(i=l.connection_config)!==null&&i!==void 0?i:null}}}}function T_(t,e){return{async connectAppUser(r){if(!r||typeof r!="string")throw new Error("Connector ID is required and must be a string");return(await t.post(`/apps/${e}/app-user-auth/connectors/${r}/initiate`)).redirect_url},async disconnectAppUser(r){if(!r||typeof r!="string")throw new Error("Connector ID is required and must be a string");await t.delete(`/apps/${e}/app-user-auth/connectors/${r}`)}}}function oi(t={}){const{storageKey:e="base44_access_token",paramName:r="access_token",saveToStorage:i=!0,removeFromUrl:a=!0}=t;let l=null;if(typeof window<"u"&&window.location)try{const c=new URLSearchParams(window.location.search);if(l=c.get(r),l){if(i&&__(l,{storageKey:e}),a){c.delete(r);const d=`${window.location.pathname}${c.toString()?`?${c.toString()}`:""}${window.location.hash}`;window.history.replaceState({},document.title,d)}return l}}catch(c){console.error("Error retrieving token from URL:",c)}if(typeof window<"u"&&window.localStorage)try{return l=window.localStorage.getItem(e),l}catch(c){console.error("Error retrieving token from local storage:",c)}return null}function __(t,e){const{storageKey:r="base44_access_token"}=e;if(typeof window>"u"||!window.localStorage||!t)return!1;try{return window.localStorage.setItem(r,t),window.localStorage.setItem("token",t),!0}catch(i){return console.error("Error saving token to local storage:",i),!1}}function uy(t,e,r){const i=(l,c)=>l?`${String(l).replace(/\/$/,"")}${c}`:c,a=l=>{const c=new Headers;if(r!=null&&r.getAuthHeaders){const d=r.getAuthHeaders();Object.entries(d).forEach(([h,m])=>{m!=null&&c.set(h,String(m))})}return l&&new Headers(l).forEach((d,h)=>{c.set(h,d)}),c};return{async invoke(l,c){if(typeof c=="string")throw new Error(`Function ${l} must receive an object with named parameters, received: ${c}`);let d,h;return c instanceof FormData||c&&Object.values(c).some(m=>m instanceof File)?(d=new FormData,Object.keys(c).forEach(m=>{c[m]instanceof File?d.append(m,c[m],c[m].name):typeof c[m]=="object"&&c[m]!==null?d.append(m,JSON.stringify(c[m])):d.append(m,c[m])}),h="multipart/form-data"):(d=c,h="application/json"),t.post(`/apps/${e}/functions/${l}`,d||c,{headers:{"Content-Type":h}})},async fetch(l,c={}){const h=`/functions${l.startsWith("/")?l:`/${l}`}`,m=a(c.headers),g={...c,headers:m};return await fetch(i(r==null?void 0:r.baseURL,h),g)}}}function cy({axios:t,getSocket:e,appId:r,serverUrl:i,token:a}){const l=`/apps/${r}/agents`,c={},d=()=>t.get(`${l}/conversations`),h=b=>t.get(`${l}/conversations/${b}`);return{getConversations:d,getConversation:h,listConversations:b=>t.get(`${l}/conversations`,{params:b}),createConversation:b=>t.post(`${l}/conversations`,b),addMessage:async(b,x)=>t.post(`${l}/conversations/v2/${b.id}/messages`,x),subscribeToConversation:(b,x)=>{const E=`/agent-conversations/${b}`,N=e(),A=h(b).then(D=>(c[b]=D,D));return N.subscribeToRoom(E,{connect:()=>{},update_model:async({data:D})=>{const B=JSON.parse(D);if(B._message){await A;const W=B._message,X=c[b];if(X){const I=X.messages||[],ee=I.findIndex(ue=>ue.id===W.id),ce=ee!==-1?I.map((ue,Pe)=>Pe===ee?W:ue):[...I,W];c[b]={...X,messages:ce},x==null||x(c[b])}}}})},getWhatsAppConnectURL:b=>{const x=`${i}/api/apps/${r}/agents/${encodeURIComponent(b)}/whatsapp`,E=a??oi();return E?`${x}?token=${E}`:x},getTelegramConnectURL:b=>{const x=`${i}/api/apps/${r}/agents/${encodeURIComponent(b)}/telegram`,E=a??oi();return E?`${x}?token=${E}`:x}}}function dy({serverUrl:t,token:e,appId:r}){return{connection:()=>{var a;return{baseURL:`${t}/api/apps/${r}/ai/openai/v1`,token:(a=e??oi())!==null&&a!==void 0?a:""}}}}function fy(t,e){const r=`/app-logs/${e}`;return{async logUserInApp(i){await t.post(`${r}/log-user-in-app/${i}`)},async fetchLogs(i={}){return await t.get(r,{params:i})},async getStats(i={}){return await t.get(`${r}/stats`,{params:i})}}}function R_(t,e){return{async inviteUser(r,i){if(i!=="user"&&i!=="admin")throw new Error(`Invalid role: "${i}". Role must be either "user" or "admin".`);return await t.post(`/apps/${e}/runtime/users/invite-user`,{user_email:r,role:i})}}}const Rn=Object.create(null);Rn.open="0";Rn.close="1";Rn.ping="2";Rn.pong="3";Rn.message="4";Rn.upgrade="5";Rn.noop="6";const ml=Object.create(null);Object.keys(Rn).forEach(t=>{ml[Rn[t]]=t});const Ud={type:"error",data:"parser error"},aw=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",lw=typeof ArrayBuffer=="function",uw=t=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(t):t&&t.buffer instanceof ArrayBuffer,_f=({type:t,data:e},r,i)=>aw&&e instanceof Blob?r?i(e):hy(e,i):lw&&(e instanceof ArrayBuffer||uw(e))?r?i(e):hy(new Blob([e]),i):i(Rn[t]+(e||"")),hy=(t,e)=>{const r=new FileReader;return r.onload=function(){const i=r.result.split(",")[1];e("b"+(i||""))},r.readAsDataURL(t)};function py(t){return t instanceof Uint8Array?t:t instanceof ArrayBuffer?new Uint8Array(t):new Uint8Array(t.buffer,t.byteOffset,t.byteLength)}let nd;function P_(t,e){if(aw&&t.data instanceof Blob)return t.data.arrayBuffer().then(py).then(e);if(lw&&(t.data instanceof ArrayBuffer||uw(t.data)))return e(py(t.data));_f(t,!1,r=>{nd||(nd=new TextEncoder),e(nd.encode(r))})}const my="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",lo=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let t=0;t{let e=t.length*.75,r=t.length,i,a=0,l,c,d,h;t[t.length-1]==="="&&(e--,t[t.length-2]==="="&&e--);const m=new ArrayBuffer(e),g=new Uint8Array(m);for(i=0;i>4,g[a++]=(c&15)<<4|d>>2,g[a++]=(d&3)<<6|h&63;return m},O_=typeof ArrayBuffer=="function",Rf=(t,e)=>{if(typeof t!="string")return{type:"message",data:cw(t,e)};const r=t.charAt(0);return r==="b"?{type:"message",data:N_(t.substring(1),e)}:ml[r]?t.length>1?{type:ml[r],data:t.substring(1)}:{type:ml[r]}:Ud},N_=(t,e)=>{if(O_){const r=A_(t);return cw(r,e)}else return{base64:!0,data:t}},cw=(t,e)=>{switch(e){case"blob":return t instanceof Blob?t:new Blob([t]);case"arraybuffer":default:return t instanceof ArrayBuffer?t:t.buffer}},dw="",D_=(t,e)=>{const r=t.length,i=new Array(r);let a=0;t.forEach((l,c)=>{_f(l,!1,d=>{i[c]=d,++a===r&&e(i.join(dw))})})},L_=(t,e)=>{const r=t.split(dw),i=[];for(let a=0;a{const i=r.length;let a;if(i<126)a=new Uint8Array(1),new DataView(a.buffer).setUint8(0,i);else if(i<65536){a=new Uint8Array(3);const l=new DataView(a.buffer);l.setUint8(0,126),l.setUint16(1,i)}else{a=new Uint8Array(9);const l=new DataView(a.buffer);l.setUint8(0,127),l.setBigUint64(1,BigInt(i))}t.data&&typeof t.data!="string"&&(a[0]|=128),e.enqueue(a),e.enqueue(r)})}})}let rd;function sl(t){return t.reduce((e,r)=>e+r.length,0)}function il(t,e){if(t[0].length===e)return t.shift();const r=new Uint8Array(e);let i=0;for(let a=0;aMath.pow(2,21)-1){d.enqueue(Ud);break}a=g*Math.pow(2,32)+m.getUint32(4),i=3}else{if(sl(r)t){d.enqueue(Ud);break}}}})}const fw=4;function tt(t){if(t)return F_(t)}function F_(t){for(var e in tt.prototype)t[e]=tt.prototype[e];return t}tt.prototype.on=tt.prototype.addEventListener=function(t,e){return this._callbacks=this._callbacks||{},(this._callbacks["$"+t]=this._callbacks["$"+t]||[]).push(e),this};tt.prototype.once=function(t,e){function r(){this.off(t,r),e.apply(this,arguments)}return r.fn=e,this.on(t,r),this};tt.prototype.off=tt.prototype.removeListener=tt.prototype.removeAllListeners=tt.prototype.removeEventListener=function(t,e){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var r=this._callbacks["$"+t];if(!r)return this;if(arguments.length==1)return delete this._callbacks["$"+t],this;for(var i,a=0;aPromise.resolve().then(e):(e,r)=>r(e,0),nn=typeof self<"u"?self:typeof window<"u"?window:Function("return this")(),I_="arraybuffer";function hw(t,...e){return e.reduce((r,i)=>(t.hasOwnProperty(i)&&(r[i]=t[i]),r),{})}const V_=nn.setTimeout,B_=nn.clearTimeout;function $l(t,e){e.useNativeTimers?(t.setTimeoutFn=V_.bind(nn),t.clearTimeoutFn=B_.bind(nn)):(t.setTimeoutFn=nn.setTimeout.bind(nn),t.clearTimeoutFn=nn.clearTimeout.bind(nn))}const U_=1.33;function z_(t){return typeof t=="string"?$_(t):Math.ceil((t.byteLength||t.size)*U_)}function $_(t){let e=0,r=0;for(let i=0,a=t.length;i=57344?r+=3:(i++,r+=4);return r}function pw(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function q_(t){let e="";for(let r in t)t.hasOwnProperty(r)&&(e.length&&(e+="&"),e+=encodeURIComponent(r)+"="+encodeURIComponent(t[r]));return e}function H_(t){let e={},r=t.split("&");for(let i=0,a=r.length;i{this.readyState="paused",e()};if(this._polling||!this.writable){let i=0;this._polling&&(i++,this.once("pollComplete",function(){--i||r()})),this.writable||(i++,this.once("drain",function(){--i||r()}))}else r()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(e){const r=i=>{if(this.readyState==="opening"&&i.type==="open"&&this.onOpen(),i.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(i)};L_(e,this.socket.binaryType).forEach(r),this.readyState!=="closed"&&(this._polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this._poll())}doClose(){const e=()=>{this.write([{type:"close"}])};this.readyState==="open"?e():this.once("open",e)}write(e){this.writable=!1,D_(e,r=>{this.doWrite(r,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const e=this.opts.secure?"https":"http",r=this.query||{};return this.opts.timestampRequests!==!1&&(r[this.opts.timestampParam]=pw()),!this.supportsBinary&&!r.sid&&(r.b64=1),this.createUri(e,r)}}let mw=!1;try{mw=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}const Q_=mw;function G_(){}class Y_ extends K_{constructor(e){if(super(e),typeof location<"u"){const r=location.protocol==="https:";let i=location.port;i||(i=r?"443":"80"),this.xd=typeof location<"u"&&e.hostname!==location.hostname||i!==e.port}}doWrite(e,r){const i=this.request({method:"POST",data:e});i.on("success",r),i.on("error",(a,l)=>{this.onError("xhr post error",a,l)})}doPoll(){const e=this.request();e.on("data",this.onData.bind(this)),e.on("error",(r,i)=>{this.onError("xhr poll error",r,i)}),this.pollXhr=e}}class kn extends tt{constructor(e,r,i){super(),this.createRequest=e,$l(this,i),this._opts=i,this._method=i.method||"GET",this._uri=r,this._data=i.data!==void 0?i.data:null,this._create()}_create(){var e;const r=hw(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");r.xdomain=!!this._opts.xd;const i=this._xhr=this.createRequest(r);try{i.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){i.setDisableHeaderCheck&&i.setDisableHeaderCheck(!0);for(let a in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(a)&&i.setRequestHeader(a,this._opts.extraHeaders[a])}}catch{}if(this._method==="POST")try{i.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{i.setRequestHeader("Accept","*/*")}catch{}(e=this._opts.cookieJar)===null||e===void 0||e.addCookies(i),"withCredentials"in i&&(i.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(i.timeout=this._opts.requestTimeout),i.onreadystatechange=()=>{var a;i.readyState===3&&((a=this._opts.cookieJar)===null||a===void 0||a.parseCookies(i.getResponseHeader("set-cookie"))),i.readyState===4&&(i.status===200||i.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof i.status=="number"?i.status:0)},0))},i.send(this._data)}catch(a){this.setTimeoutFn(()=>{this._onError(a)},0);return}typeof document<"u"&&(this._index=kn.requestsCount++,kn.requests[this._index]=this)}_onError(e){this.emitReserved("error",e,this._xhr),this._cleanup(!0)}_cleanup(e){if(!(typeof this._xhr>"u"||this._xhr===null)){if(this._xhr.onreadystatechange=G_,e)try{this._xhr.abort()}catch{}typeof document<"u"&&delete kn.requests[this._index],this._xhr=null}}_onLoad(){const e=this._xhr.responseText;e!==null&&(this.emitReserved("data",e),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}}kn.requestsCount=0;kn.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",gy);else if(typeof addEventListener=="function"){const t="onpagehide"in nn?"pagehide":"unload";addEventListener(t,gy,!1)}}function gy(){for(let t in kn.requests)kn.requests.hasOwnProperty(t)&&kn.requests[t].abort()}const X_=(function(){const t=gw({xdomain:!1});return t&&t.responseType!==null})();class J_ extends Y_{constructor(e){super(e);const r=e&&e.forceBase64;this.supportsBinary=X_&&!r}request(e={}){return Object.assign(e,{xd:this.xd},this.opts),new kn(gw,this.uri(),e)}}function gw(t){const e=t.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!e||Q_))return new XMLHttpRequest}catch{}if(!e)try{return new nn[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}const yw=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class Z_ extends Pf{get name(){return"websocket"}doOpen(){const e=this.uri(),r=this.opts.protocols,i=yw?{}:hw(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(i.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(e,r,i)}catch(a){return this.emitReserved("error",a)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=e=>this.onClose({description:"websocket connection closed",context:e}),this.ws.onmessage=e=>this.onData(e.data),this.ws.onerror=e=>this.onError("websocket error",e)}write(e){this.writable=!1;for(let r=0;r{try{this.doWrite(i,l)}catch{}a&&zl(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){const e=this.opts.secure?"wss":"ws",r=this.query||{};return this.opts.timestampRequests&&(r[this.opts.timestampParam]=pw()),this.supportsBinary||(r.b64=1),this.createUri(e,r)}}const sd=nn.WebSocket||nn.MozWebSocket;class eR extends Z_{createSocket(e,r,i){return yw?new sd(e,r,i):r?new sd(e,r):new sd(e)}doWrite(e,r){this.ws.send(r)}}class tR extends Pf{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(e){return this.emitReserved("error",e)}this._transport.closed.then(()=>{this.onClose()}).catch(e=>{this.onError("webtransport error",e)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(e=>{const r=M_(Number.MAX_SAFE_INTEGER,this.socket.binaryType),i=e.readable.pipeThrough(r).getReader(),a=j_();a.readable.pipeTo(e.writable),this._writer=a.writable.getWriter();const l=()=>{i.read().then(({done:d,value:h})=>{d||(this.onPacket(h),l())}).catch(d=>{})};l();const c={type:"open"};this.query.sid&&(c.data=`{"sid":"${this.query.sid}"}`),this._writer.write(c).then(()=>this.onOpen())})})}write(e){this.writable=!1;for(let r=0;r{a&&zl(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var e;(e=this._transport)===null||e===void 0||e.close()}}const nR={websocket:eR,webtransport:tR,polling:J_},rR=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,sR=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function zd(t){if(t.length>8e3)throw"URI too long";const e=t,r=t.indexOf("["),i=t.indexOf("]");r!=-1&&i!=-1&&(t=t.substring(0,r)+t.substring(r,i).replace(/:/g,";")+t.substring(i,t.length));let a=rR.exec(t||""),l={},c=14;for(;c--;)l[sR[c]]=a[c]||"";return r!=-1&&i!=-1&&(l.source=e,l.host=l.host.substring(1,l.host.length-1).replace(/;/g,":"),l.authority=l.authority.replace("[","").replace("]","").replace(/;/g,":"),l.ipv6uri=!0),l.pathNames=iR(l,l.path),l.queryKey=oR(l,l.query),l}function iR(t,e){const r=/\/{2,9}/g,i=e.replace(r,"/").split("/");return(e.slice(0,1)=="/"||e.length===0)&&i.splice(0,1),e.slice(-1)=="/"&&i.splice(i.length-1,1),i}function oR(t,e){const r={};return e.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(i,a,l){a&&(r[a]=l)}),r}const $d=typeof addEventListener=="function"&&typeof removeEventListener=="function",gl=[];$d&&addEventListener("offline",()=>{gl.forEach(t=>t())},!1);class Tr extends tt{constructor(e,r){if(super(),this.binaryType=I_,this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,e&&typeof e=="object"&&(r=e,e=null),e){const i=zd(e);r.hostname=i.host,r.secure=i.protocol==="https"||i.protocol==="wss",r.port=i.port,i.query&&(r.query=i.query)}else r.host&&(r.hostname=zd(r.host).host);$l(this,r),this.secure=r.secure!=null?r.secure:typeof location<"u"&&location.protocol==="https:",r.hostname&&!r.port&&(r.port=this.secure?"443":"80"),this.hostname=r.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=r.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},r.transports.forEach(i=>{const a=i.prototype.name;this.transports.push(a),this._transportsByName[a]=i}),this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},r),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=H_(this.opts.query)),$d&&(this.opts.closeOnBeforeunload&&(this._beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this._beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this._offlineEventListener=()=>{this._onClose("transport close",{description:"network connection lost"})},gl.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(e){const r=Object.assign({},this.opts.query);r.EIO=fw,r.transport=e,this.id&&(r.sid=this.id);const i=Object.assign({},this.opts,{query:r,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[e]);return new this._transportsByName[e](i)}_open(){if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}const e=this.opts.rememberUpgrade&&Tr.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1?"websocket":this.transports[0];this.readyState="opening";const r=this.createTransport(e);r.open(),this.setTransport(r)}setTransport(e){this.transport&&this.transport.removeAllListeners(),this.transport=e,e.on("drain",this._onDrain.bind(this)).on("packet",this._onPacket.bind(this)).on("error",this._onError.bind(this)).on("close",r=>this._onClose("transport close",r))}onOpen(){this.readyState="open",Tr.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush()}_onPacket(e){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",e),this.emitReserved("heartbeat"),e.type){case"open":this.onHandshake(JSON.parse(e.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":const r=new Error("server error");r.code=e.data,this._onError(r);break;case"message":this.emitReserved("data",e.data),this.emitReserved("message",e.data);break}}onHandshake(e){this.emitReserved("handshake",e),this.id=e.sid,this.transport.query.sid=e.sid,this._pingInterval=e.pingInterval,this._pingTimeout=e.pingTimeout,this._maxPayload=e.maxPayload,this.onOpen(),this.readyState!=="closed"&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);const e=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+e,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},e),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const e=this._getWritablePackets();this.transport.send(e),this._prevBufferLen=e.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let r=1;for(let i=0;i0&&r>this._maxPayload)return this.writeBuffer.slice(0,i);r+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;const e=Date.now()>this._pingTimeoutTime;return e&&(this._pingTimeoutTime=0,zl(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),e}write(e,r,i){return this._sendPacket("message",e,r,i),this}send(e,r,i){return this._sendPacket("message",e,r,i),this}_sendPacket(e,r,i,a){if(typeof r=="function"&&(a=r,r=void 0),typeof i=="function"&&(a=i,i=null),this.readyState==="closing"||this.readyState==="closed")return;i=i||{},i.compress=i.compress!==!1;const l={type:e,data:r,options:i};this.emitReserved("packetCreate",l),this.writeBuffer.push(l),a&&this.once("flush",a),this.flush()}close(){const e=()=>{this._onClose("forced close"),this.transport.close()},r=()=>{this.off("upgrade",r),this.off("upgradeError",r),e()},i=()=>{this.once("upgrade",r),this.once("upgradeError",r)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?i():e()}):this.upgrading?i():e()),this}_onError(e){if(Tr.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&this.readyState==="opening")return this.transports.shift(),this._open();this.emitReserved("error",e),this._onClose("transport error",e)}_onClose(e,r){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing"){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),$d&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const i=gl.indexOf(this._offlineEventListener);i!==-1&&gl.splice(i,1)}this.readyState="closed",this.id=null,this.emitReserved("close",e,r),this.writeBuffer=[],this._prevBufferLen=0}}}Tr.protocol=fw;class aR extends Tr{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),this.readyState==="open"&&this.opts.upgrade)for(let e=0;e{i||(r.send([{type:"ping",data:"probe"}]),r.once("packet",y=>{if(!i)if(y.type==="pong"&&y.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",r),!r)return;Tr.priorWebsocketSuccess=r.name==="websocket",this.transport.pause(()=>{i||this.readyState!=="closed"&&(g(),this.setTransport(r),r.send([{type:"upgrade"}]),this.emitReserved("upgrade",r),r=null,this.upgrading=!1,this.flush())})}else{const w=new Error("probe error");w.transport=r.name,this.emitReserved("upgradeError",w)}}))};function l(){i||(i=!0,g(),r.close(),r=null)}const c=y=>{const w=new Error("probe error: "+y);w.transport=r.name,l(),this.emitReserved("upgradeError",w)};function d(){c("transport closed")}function h(){c("socket closed")}function m(y){r&&y.name!==r.name&&l()}const g=()=>{r.removeListener("open",a),r.removeListener("error",c),r.removeListener("close",d),this.off("close",h),this.off("upgrading",m)};r.once("open",a),r.once("error",c),r.once("close",d),this.once("close",h),this.once("upgrading",m),this._upgrades.indexOf("webtransport")!==-1&&e!=="webtransport"?this.setTimeoutFn(()=>{i||r.open()},200):r.open()}onHandshake(e){this._upgrades=this._filterUpgrades(e.upgrades),super.onHandshake(e)}_filterUpgrades(e){const r=[];for(let i=0;inR[l]).filter(l=>!!l)),super(i?a:e,a)}};function uR(t,e="",r){let i=t;r=r||typeof location<"u"&&location,t==null&&(t=r.protocol+"//"+r.host),typeof t=="string"&&(t.charAt(0)==="/"&&(t.charAt(1)==="/"?t=r.protocol+t:t=r.host+t),/^(https?|wss?):\/\//.test(t)||(typeof r<"u"?t=r.protocol+"//"+t:t="https://"+t),i=zd(t)),i.port||(/^(http|ws)$/.test(i.protocol)?i.port="80":/^(http|ws)s$/.test(i.protocol)&&(i.port="443")),i.path=i.path||"/";const l=i.host.indexOf(":")!==-1?"["+i.host+"]":i.host;return i.id=i.protocol+"://"+l+":"+i.port+e,i.href=i.protocol+"://"+l+(r&&r.port===i.port?"":":"+i.port),i}const cR=typeof ArrayBuffer=="function",dR=t=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(t):t.buffer instanceof ArrayBuffer,vw=Object.prototype.toString,fR=typeof Blob=="function"||typeof Blob<"u"&&vw.call(Blob)==="[object BlobConstructor]",hR=typeof File=="function"||typeof File<"u"&&vw.call(File)==="[object FileConstructor]";function Af(t){return cR&&(t instanceof ArrayBuffer||dR(t))||fR&&t instanceof Blob||hR&&t instanceof File}function yl(t,e){if(!t||typeof t!="object")return!1;if(Array.isArray(t)){for(let r=0,i=t.length;r=0&&t.numthis.opts.maxAttachments)throw new Error("too many attachments");i.attachments=d}if(e.charAt(r+1)==="/"){const l=r+1;for(;++r&&!(e.charAt(r)===","||r===e.length););i.nsp=e.substring(l,r)}else i.nsp="/";const a=e.charAt(r+1);if(a!==""&&Number(a)==a){const l=r+1;for(;++r;){const c=e.charAt(r);if(c==null||Number(c)!=c){--r;break}if(r===e.length)break}i.id=Number(e.substring(l,r+1))}if(e.charAt(++r)){const l=this.tryParse(e.substr(r));if(Of.isPayloadValid(i.type,l))i.data=l;else throw new Error("invalid payload")}return i}tryParse(e){try{return JSON.parse(e,this.opts.reviver)}catch{return!1}}static isPayloadValid(e,r){switch(e){case Te.CONNECT:return yy(r);case Te.DISCONNECT:return r===void 0;case Te.CONNECT_ERROR:return typeof r=="string"||yy(r);case Te.EVENT:case Te.BINARY_EVENT:return Array.isArray(r)&&(typeof r[0]=="number"||typeof r[0]=="string"&&gR.indexOf(r[0])===-1);case Te.ACK:case Te.BINARY_ACK:return Array.isArray(r)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class vR{constructor(e){this.packet=e,this.buffers=[],this.reconPack=e}takeBinaryData(e){if(this.buffers.push(e),this.buffers.length===this.reconPack.attachments){const r=mR(this.reconPack,this.buffers);return this.finishedReconstruction(),r}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const wR=Number.isInteger||function(t){return typeof t=="number"&&isFinite(t)&&Math.floor(t)===t};function yy(t){return Object.prototype.toString.call(t)==="[object Object]"}const xR=Object.freeze(Object.defineProperty({__proto__:null,Decoder:Of,Encoder:yR,get PacketType(){return Te}},Symbol.toStringTag,{value:"Module"}));function mn(t,e,r){return t.on(e,r),function(){t.off(e,r)}}const SR=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class ww extends tt{constructor(e,r,i){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=e,this.nsp=r,i&&i.auth&&(this.auth=i.auth),this._opts=Object.assign({},i),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const e=this.io;this.subs=[mn(e,"open",this.onopen.bind(this)),mn(e,"packet",this.onpacket.bind(this)),mn(e,"error",this.onerror.bind(this)),mn(e,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...e){return e.unshift("message"),this.emit.apply(this,e),this}emit(e,...r){var i,a,l;if(SR.hasOwnProperty(e))throw new Error('"'+e.toString()+'" is a reserved event name');if(r.unshift(e),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(r),this;const c={type:Te.EVENT,data:r};if(c.options={},c.options.compress=this.flags.compress!==!1,typeof r[r.length-1]=="function"){const g=this.ids++,y=r.pop();this._registerAckCallback(g,y),c.id=g}const d=(a=(i=this.io.engine)===null||i===void 0?void 0:i.transport)===null||a===void 0?void 0:a.writable,h=this.connected&&!(!((l=this.io.engine)===null||l===void 0)&&l._hasPingExpired());return this.flags.volatile&&!d||(h?(this.notifyOutgoingListeners(c),this.packet(c)):this.sendBuffer.push(c)),this.flags={},this}_registerAckCallback(e,r){var i;const a=(i=this.flags.timeout)!==null&&i!==void 0?i:this._opts.ackTimeout;if(a===void 0){this.acks[e]=r;return}const l=this.io.setTimeoutFn(()=>{delete this.acks[e];for(let d=0;d{this.io.clearTimeoutFn(l),r.apply(this,d)};c.withError=!0,this.acks[e]=c}emitWithAck(e,...r){return new Promise((i,a)=>{const l=(c,d)=>c?a(c):i(d);l.withError=!0,r.push(l),this.emit(e,...r)})}_addToQueue(e){let r;typeof e[e.length-1]=="function"&&(r=e.pop());const i={id:this._queueSeq++,tryCount:0,pending:!1,args:e,flags:Object.assign({fromQueue:!0},this.flags)};e.push((a,...l)=>(this._queue[0],a!==null?i.tryCount>this._opts.retries&&(this._queue.shift(),r&&r(a)):(this._queue.shift(),r&&r(null,...l)),i.pending=!1,this._drainQueue())),this._queue.push(i),this._drainQueue()}_drainQueue(e=!1){if(!this.connected||this._queue.length===0)return;const r=this._queue[0];r.pending&&!e||(r.pending=!0,r.tryCount++,this.flags=r.flags,this.emit.apply(this,r.args))}packet(e){e.nsp=this.nsp,this.io._packet(e)}onopen(){typeof this.auth=="function"?this.auth(e=>{this._sendConnectPacket(e)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(e){this.packet({type:Te.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},e):e})}onerror(e){this.connected||this.emitReserved("connect_error",e)}onclose(e,r){this.connected=!1,delete this.id,this.emitReserved("disconnect",e,r),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(e=>{if(!this.sendBuffer.some(i=>String(i.id)===e)){const i=this.acks[e];delete this.acks[e],i.withError&&i.call(this,new Error("socket has been disconnected"))}})}onpacket(e){if(e.nsp===this.nsp)switch(e.type){case Te.CONNECT:e.data&&e.data.sid?this.onconnect(e.data.sid,e.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case Te.EVENT:case Te.BINARY_EVENT:this.onevent(e);break;case Te.ACK:case Te.BINARY_ACK:this.onack(e);break;case Te.DISCONNECT:this.ondisconnect();break;case Te.CONNECT_ERROR:this.destroy();const i=new Error(e.data.message);i.data=e.data.data,this.emitReserved("connect_error",i);break}}onevent(e){const r=e.data||[];e.id!=null&&r.push(this.ack(e.id)),this.connected?this.emitEvent(r):this.receiveBuffer.push(Object.freeze(r))}emitEvent(e){if(this._anyListeners&&this._anyListeners.length){const r=this._anyListeners.slice();for(const i of r)i.apply(this,e)}super.emit.apply(this,e),this._pid&&e.length&&typeof e[e.length-1]=="string"&&(this._lastOffset=e[e.length-1])}ack(e){const r=this;let i=!1;return function(...a){i||(i=!0,r.packet({type:Te.ACK,id:e,data:a}))}}onack(e){const r=this.acks[e.id];typeof r=="function"&&(delete this.acks[e.id],r.withError&&e.data.unshift(null),r.apply(this,e.data))}onconnect(e,r){this.id=e,this.recovered=r&&this._pid===r,this._pid=r,this.connected=!0,this.emitBuffered(),this._drainQueue(!0),this.emitReserved("connect")}emitBuffered(){this.receiveBuffer.forEach(e=>this.emitEvent(e)),this.receiveBuffer=[],this.sendBuffer.forEach(e=>{this.notifyOutgoingListeners(e),this.packet(e)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(e=>e()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:Te.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(e){return this.flags.compress=e,this}get volatile(){return this.flags.volatile=!0,this}timeout(e){return this.flags.timeout=e,this}onAny(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(e),this}prependAny(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(e),this}offAny(e){if(!this._anyListeners)return this;if(e){const r=this._anyListeners;for(let i=0;i0&&t.jitter<=1?t.jitter:0,this.attempts=0}di.prototype.duration=function(){var t=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var e=Math.random(),r=Math.floor(e*this.jitter*t);t=(Math.floor(e*10)&1)==0?t-r:t+r}return Math.min(t,this.max)|0};di.prototype.reset=function(){this.attempts=0};di.prototype.setMin=function(t){this.ms=t};di.prototype.setMax=function(t){this.max=t};di.prototype.setJitter=function(t){this.jitter=t};class Wd extends tt{constructor(e,r){var i;super(),this.nsps={},this.subs=[],e&&typeof e=="object"&&(r=e,e=void 0),r=r||{},r.path=r.path||"/socket.io",this.opts=r,$l(this,r),this.reconnection(r.reconnection!==!1),this.reconnectionAttempts(r.reconnectionAttempts||1/0),this.reconnectionDelay(r.reconnectionDelay||1e3),this.reconnectionDelayMax(r.reconnectionDelayMax||5e3),this.randomizationFactor((i=r.randomizationFactor)!==null&&i!==void 0?i:.5),this.backoff=new di({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(r.timeout==null?2e4:r.timeout),this._readyState="closed",this.uri=e;const a=r.parser||xR;this.encoder=new a.Encoder,this.decoder=new a.Decoder,this._autoConnect=r.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(e){return arguments.length?(this._reconnection=!!e,e||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(e){return e===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=e,this)}reconnectionDelay(e){var r;return e===void 0?this._reconnectionDelay:(this._reconnectionDelay=e,(r=this.backoff)===null||r===void 0||r.setMin(e),this)}randomizationFactor(e){var r;return e===void 0?this._randomizationFactor:(this._randomizationFactor=e,(r=this.backoff)===null||r===void 0||r.setJitter(e),this)}reconnectionDelayMax(e){var r;return e===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=e,(r=this.backoff)===null||r===void 0||r.setMax(e),this)}timeout(e){return arguments.length?(this._timeout=e,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(e){if(~this._readyState.indexOf("open"))return this;this.engine=new lR(this.uri,this.opts);const r=this.engine,i=this;this._readyState="opening",this.skipReconnect=!1;const a=mn(r,"open",function(){i.onopen(),e&&e()}),l=d=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",d),e?e(d):this.maybeReconnectOnOpen()},c=mn(r,"error",l);if(this._timeout!==!1){const d=this._timeout,h=this.setTimeoutFn(()=>{a(),l(new Error("timeout")),r.close()},d);this.opts.autoUnref&&h.unref(),this.subs.push(()=>{this.clearTimeoutFn(h)})}return this.subs.push(a),this.subs.push(c),this}connect(e){return this.open(e)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const e=this.engine;this.subs.push(mn(e,"ping",this.onping.bind(this)),mn(e,"data",this.ondata.bind(this)),mn(e,"error",this.onerror.bind(this)),mn(e,"close",this.onclose.bind(this)),mn(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(e){try{this.decoder.add(e)}catch(r){this.onclose("parse error",r)}}ondecoded(e){zl(()=>{this.emitReserved("packet",e)},this.setTimeoutFn)}onerror(e){this.emitReserved("error",e)}socket(e,r){let i=this.nsps[e];return i?this._autoConnect&&!i.active&&i.connect():(i=new ww(this,e,r),this.nsps[e]=i),i}_destroy(e){const r=Object.keys(this.nsps);for(const i of r)if(this.nsps[i].active)return;this._close()}_packet(e){const r=this.encoder.encode(e);for(let i=0;ie()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(e,r){var i;this.cleanup(),(i=this.engine)===null||i===void 0||i.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",e,r),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const e=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const r=this.backoff.duration();this._reconnecting=!0;const i=this.setTimeoutFn(()=>{e.skipReconnect||(this.emitReserved("reconnect_attempt",e.backoff.attempts),!e.skipReconnect&&e.open(a=>{a?(e._reconnecting=!1,e.reconnect(),this.emitReserved("reconnect_error",a)):e.onreconnect()}))},r);this.opts.autoUnref&&i.unref(),this.subs.push(()=>{this.clearTimeoutFn(i)})}}onreconnect(){const e=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",e)}}const so={};function vl(t,e){typeof t=="object"&&(e=t,t=void 0),e=e||{};const r=uR(t,e.path||"/socket.io"),i=r.source,a=r.id,l=r.path,c=so[a]&&l in so[a].nsps,d=e.forceNew||e["force new connection"]||e.multiplex===!1||c;let h;return d?h=new Wd(i,e):(so[a]||(so[a]=new Wd(i,e)),h=so[a]),r.query&&!e.query&&(e.query=r.queryKey),h.socket(r.path,e)}Object.assign(vl,{Manager:Wd,Socket:ww,io:vl,connect:vl});const bR=250;function vy(t,e){var r;const i=(r=t.token)!==null&&r!==void 0?r:oi(),a={app_id:t.appId,token:i};i||(a.anonymous_id=Tf());const l=vl(t.serverUrl,{path:t.mountPath,transports:t.transports,query:a});return l.on("connect",async()=>{var c;return console.log("connect",l.id),(c=e.connect)===null||c===void 0?void 0:c.call(e)}),l.on("update_model",async c=>{var d;return(d=e.update_model)===null||d===void 0?void 0:d.call(e,c)}),l.on("error",async c=>{var d;return(d=e.error)===null||d===void 0?void 0:d.call(e,c)}),l.on("connect_error",async c=>{var d;return console.error("connect_error",c),(d=e.error)===null||d===void 0?void 0:d.call(e,c)}),l}function ER({config:t}){let e={...t};const r={},i={},a={connect:async()=>{const E=[];Object.keys(r).forEach(N=>{const A=w(N);A.length!==0&&(m(N),A.forEach(({connect:D})=>{const B=async()=>D==null?void 0:D();E.push(B())}))}),await Promise.all(E)},update_model:async E=>{const A=w(E.room).map(D=>{var B;return(B=D.update_model)===null||B===void 0?void 0:B.call(D,E)});await Promise.all(A)},error:async E=>{console.error("error",E);const N=Object.values(r).flat().map(A=>{var D;return(D=A.error)===null||D===void 0?void 0:D.call(A,E)});await Promise.all(N)}};let l=vy(t,a);function c(){d()}function d(){_(),l&&l.disconnect()}function h(E){c(),e={...e,...E},l=vy(e,a)}function m(E){l.emit("join",E)}function g(E){l.emit("leave",E)}async function y(E,N){var A;const D=JSON.stringify(N);return(A=a.update_model)===null||A===void 0?void 0:A.call(a,{room:E,data:D})}function w(E){var N;return(N=r[E])!==null&&N!==void 0?N:[]}function k(E){const N=i[E];N&&(clearTimeout(N),delete i[E])}function _(){Object.keys(i).forEach(E=>{var N,A;clearTimeout(i[E]),delete i[E],((A=(N=r[E])===null||N===void 0?void 0:N.length)!==null&&A!==void 0?A:0)===0&&delete r[E]})}function b(E){k(E),i[E]=setTimeout(()=>{var N,A;delete i[E],!(((A=(N=r[E])===null||N===void 0?void 0:N.length)!==null&&A!==void 0?A:0)>0)&&(g(E),delete r[E])},bR)}return{socket:l,subscribeToRoom:(E,N)=>{r[E]?k(E):(m(E),r[E]=[]),r[E].push(N);let A=!1;return()=>{var D,B;A||(A=!0,r[E]=(B=(D=r[E])===null||D===void 0?void 0:D.filter(W=>W!==N))!==null&&B!==void 0?B:[],r[E].length===0&&b(E))}},updateConfig:h,updateModel:y,disconnect:d}}function CR(t){var e,r;const{serverUrl:i="https://base44.app",appId:a,token:l,serviceToken:c,requiresAuth:d=!1,appBaseUrl:h,options:m,functionsVersion:g,headers:y}=t,w=typeof h=="string"?h:"",k={serverUrl:i,mountPath:"/ws-user-apps/socket.io/",transports:["websocket"],appId:a,token:l};let _=null;const b=()=>(_||(_=ER({config:k})),_),x={...y,"X-App-Id":String(a)},E=g?{...x,"Base44-Functions-Version":g}:x,N=ao({baseURL:`${i}/api`,headers:x,token:l,onError:m==null?void 0:m.onError}),A=ao({baseURL:`${i}/api`,headers:E,token:l,interceptResponses:!1,onError:m==null?void 0:m.onError}),D={...x,...l?{"on-behalf-of":`Bearer ${l}`}:{}},B=ao({baseURL:`${i}/api`,headers:D,token:c,onError:m==null?void 0:m.onError}),W=ao({baseURL:`${i}/api`,headers:E,token:c,interceptResponses:!1}),X=E_(N,A,a,{appBaseUrl:w});if(typeof window<"u"){const ue=l||oi();ue&&X.setToken(ue)}const I={entities:ay({axios:N,appId:a,getSocket:b}),integrations:ly(N,a),connectors:T_(N,a),auth:X,functions:uy(A,a,{getAuthHeaders:()=>{const ue={},Pe=l||oi();return Pe&&(ue.Authorization=`Bearer ${Pe}`),ue},baseURL:(e=A.defaults)===null||e===void 0?void 0:e.baseURL}),agents:cy({axios:N,getSocket:b,appId:a,serverUrl:i,token:l}),aiGateway:dy({serverUrl:i,token:l,appId:a}),appLogs:fy(N,a),users:R_(N,a),analytics:u_({axiosClient:N,serverUrl:i,appId:a,userAuthModule:X}),cleanup:()=>{I.analytics.cleanup(),_&&_.disconnect()}},ee={entities:ay({axios:B,appId:a,getSocket:b}),integrations:ly(B,a),sso:C_(B,a),connectors:k_(B,a),functions:uy(W,a,{getAuthHeaders:()=>{const ue={};return c&&(ue.Authorization=`Bearer ${c}`),ue},baseURL:(r=W.defaults)===null||r===void 0?void 0:r.baseURL}),agents:cy({axios:B,getSocket:b,appId:a,serverUrl:i,token:l}),aiGateway:dy({serverUrl:i,token:c,appId:a}),appLogs:fy(B,a),cleanup:()=>{_&&_.disconnect()}};return d&&typeof window<"u"&&setTimeout(async()=>{try{await I.auth.isAuthenticated()||I.auth.redirectToLogin(window.location.href)}catch(ue){console.error("Authentication check failed:",ue),I.auth.redirectToLogin(window.location.href)}},0),{...I,setToken(ue){I.auth.setToken(ue),_&&_.updateConfig({token:ue}),k.token=ue},getConfig(){return{serverUrl:i,appId:a,requiresAuth:d}},get asServiceRole(){if(!c)throw new Error("Service token is required to use asServiceRole. Please provide a serviceToken when creating the client.");return ee}}}const xw=typeof window>"u",kR=xw?{localStorage:new Map}:window,mo=kR.localStorage,TR=t=>t.replace(/([A-Z])/g,"_$1").toLowerCase(),Vs=(t,{defaultValue:e=void 0,removeFromUrl:r=!1}={})=>{if(xw)return e;const i=`base44_${TR(t)}`,a=new URLSearchParams(window.location.search),l=a.get(t);if(r){a.delete(t);const d=`${window.location.pathname}${a.toString()?`?${a.toString()}`:""}${window.location.hash}`;window.history.replaceState({},document.title,d)}if(l)return mo.setItem(i,l),l;if(e)return mo.setItem(i,e),e;const c=mo.getItem(i);return c||null},_R=()=>(Vs("clear_access_token")==="true"&&(mo.removeItem("base44_access_token"),mo.removeItem("token")),{appId:Vs("app_id",{defaultValue:"6a5838ef1d73c761566f80a6"}),token:Vs("access_token",{removeFromUrl:!0}),fromUrl:Vs("from_url",{defaultValue:window.location.href}),functionsVersion:Vs("functions_version",{defaultValue:"prod"}),appBaseUrl:Vs("app_base_url",{defaultValue:void 0})}),uo={..._R()},{appId:RR,token:PR,functionsVersion:AR,appBaseUrl:OR}=uo,Bs=CR({appId:RR,token:PR,functionsVersion:AR,serverUrl:"",requiresAuth:!1,appBaseUrl:OR});function NR({}){var a;const e=wf().pathname.substring(1),{data:r,isFetched:i}=hC({queryKey:["user"],queryFn:async()=>{try{return{user:await Bs.auth.me(),isAuthenticated:!0}}catch{return{user:null,isAuthenticated:!1}}}});return S.jsx("div",{className:"min-h-screen flex items-center justify-center p-6 bg-slate-50",children:S.jsx("div",{className:"max-w-md w-full",children:S.jsxs("div",{className:"text-center space-y-6",children:[S.jsxs("div",{className:"space-y-2",children:[S.jsx("h1",{className:"text-7xl font-light text-slate-300",children:"404"}),S.jsx("div",{className:"h-0.5 w-16 bg-slate-200 mx-auto"})]}),S.jsxs("div",{className:"space-y-3",children:[S.jsx("h2",{className:"text-2xl font-medium text-slate-800",children:"Page Not Found"}),S.jsxs("p",{className:"text-slate-600 leading-relaxed",children:["The page ",S.jsxs("span",{className:"font-medium text-slate-700",children:['"',e,'"']})," could not be found in this application."]})]}),i&&r.isAuthenticated&&((a=r.user)==null?void 0:a.role)==="admin"&&S.jsx("div",{className:"mt-8 p-4 bg-slate-100 rounded-lg border border-slate-200",children:S.jsxs("div",{className:"flex items-start space-x-3",children:[S.jsx("div",{className:"flex-shrink-0 w-5 h-5 rounded-full bg-orange-100 flex items-center justify-center mt-0.5",children:S.jsx("div",{className:"w-2 h-2 rounded-full bg-orange-400"})}),S.jsxs("div",{className:"text-left space-y-1",children:[S.jsx("p",{className:"text-sm font-medium text-slate-700",children:"Admin Note"}),S.jsx("p",{className:"text-sm text-slate-600 leading-relaxed",children:"This could mean that the AI hasn't implemented this page yet. Ask it to implement it in the chat."})]})]})}),S.jsx("div",{className:"pt-6",children:S.jsxs("button",{onClick:()=>window.location.href="/",className:"inline-flex items-center px-4 py-2 text-sm font-medium text-slate-700 bg-white border border-slate-200 rounded-lg hover:bg-slate-50 hover:border-slate-300 transition-colors duration-200 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-slate-500",children:[S.jsx("svg",{className:"w-4 h-4 mr-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:S.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 12l2-2m0 0l7-7 7 7M5 10v10a1 1 0 001 1h3m10-11l2 2m-2-2v10a1 1 0 01-1 1h-3m-6 0a1 1 0 001-1v-4a1 1 0 011-1h2a1 1 0 011 1v4a1 1 0 001 1m-6 0h6"})}),"Go Home"]})})]})})})}const Sw=V.createContext(),DR=({children:t})=>{const[e,r]=V.useState(null),[i,a]=V.useState(!1),[l,c]=V.useState(!0),[d,h]=V.useState(!0),[m,g]=V.useState(null),[y,w]=V.useState(!1),[k,_]=V.useState(null);V.useEffect(()=>{b()},[]);const b=async()=>{var A,D;try{h(!0),g(null);const B=ao({baseURL:"/api/apps/public",headers:{"X-App-Id":uo.appId},token:uo.token,interceptResponses:!0});try{const W=await B.get(`/prod/public-settings/by-id/${uo.appId}`);_(W),uo.token?await x():(c(!1),a(!1),w(!0)),h(!1)}catch(W){if(console.error("App state check failed:",W),W.status===403&&((D=(A=W.data)==null?void 0:A.extra_data)!=null&&D.reason)){const X=W.data.extra_data.reason;g(X==="auth_required"?{type:"auth_required",message:"Authentication required"}:X==="user_not_registered"?{type:"user_not_registered",message:"User not registered for this app"}:{type:X,message:W.message})}else g({type:"unknown",message:W.message||"Failed to load app"});h(!1),c(!1)}}catch(B){console.error("Unexpected error:",B),g({type:"unknown",message:B.message||"An unexpected error occurred"}),h(!1),c(!1)}},x=async()=>{try{c(!0);const A=await Bs.auth.me();r(A),a(!0),c(!1),w(!0)}catch(A){console.error("User auth check failed:",A),c(!1),a(!1),w(!0),(A.status===401||A.status===403)&&g({type:"auth_required",message:"Authentication required"})}},E=(A=!0)=>{r(null),a(!1),A?Bs.auth.logout(window.location.href):Bs.auth.logout()},N=()=>{Bs.auth.redirectToLogin(window.location.href)};return S.jsx(Sw.Provider,{value:{user:e,isAuthenticated:i,isLoadingAuth:l,isLoadingPublicSettings:d,authError:m,appPublicSettings:k,authChecked:y,logout:E,navigateToLogin:N,checkUserAuth:x,checkAppState:b},children:t})},LR=()=>{const t=V.useContext(Sw);if(!t)throw new Error("useAuth must be used within an AuthProvider");return t},jR=()=>S.jsx("div",{className:"flex flex-col items-center justify-center min-h-screen bg-gradient-to-b from-white to-slate-50",children:S.jsx("div",{className:"max-w-md w-full p-8 bg-white rounded-lg shadow-lg border border-slate-100",children:S.jsxs("div",{className:"text-center",children:[S.jsx("div",{className:"inline-flex items-center justify-center w-16 h-16 mb-6 rounded-full bg-orange-100",children:S.jsx("svg",{className:"w-8 h-8 text-orange-600",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:S.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"})})}),S.jsx("h1",{className:"text-3xl font-bold text-slate-900 mb-4",children:"Access Restricted"}),S.jsx("p",{className:"text-slate-600 mb-8",children:"You are not registered to use this application. Please contact the app administrator to request access."}),S.jsxs("div",{className:"p-4 bg-slate-50 rounded-md text-sm text-slate-600",children:[S.jsx("p",{children:"If you believe this is an error, you can:"}),S.jsxs("ul",{className:"list-disc list-inside mt-2 space-y-1",children:[S.jsx("li",{children:"Verify you are logged in with the correct account"}),S.jsx("li",{children:"Contact the app administrator for access"}),S.jsx("li",{children:"Try logging out and back in again"})]})]})]})})}),MR=t=>{const e=t.slice(1);try{return decodeURIComponent(e)}catch{return e}};function FR(){const{pathname:t,hash:e}=wf(),r=VC();return V.useEffect(()=>{if(r!=="POP"){if(e){const i=MR(e),a=window.setTimeout(()=>{var l;(l=document.getElementById(i))==null||l.scrollIntoView({behavior:"smooth"})},50);return()=>window.clearTimeout(a)}window.scrollTo({top:0,left:0,behavior:"instant"})}},[t,e,r]),null}const IR="https://media.base44.com/images/public/6a5838ef1d73c761566f80a6/0082adb20_LOGOCOMPLETOCURVAS.svg",wy=[{label:"SERVICIOS",href:"#servicios"},{label:"HARDWARE",href:"#hardware"},{label:"CONTACTO",href:"#contacto"}];function VR(){const[t,e]=V.useState(!1),[r,i]=V.useState(!1);return V.useEffect(()=>{const a=()=>e(window.scrollY>40);return window.addEventListener("scroll",a),()=>window.removeEventListener("scroll",a)},[]),S.jsxs(S.Fragment,{children:[S.jsx("header",{className:`fixed top-0 left-0 right-0 z-50 transition-all duration-300 ${t?"bg-[#0A0A0B]/85 backdrop-blur-md border-b border-white/10":"bg-transparent"}`,children:S.jsxs("div",{className:"mx-auto max-w-[1600px] px-6 md:px-12 h-16 flex items-center justify-between",children:[S.jsx("a",{href:"#top",className:"flex items-center gap-2 group",children:S.jsx("img",{src:IR,alt:"F1.com.uy",className:"h-8 md:h-9 w-auto"})}),S.jsx("nav",{className:"hidden md:flex items-center gap-8",children:wy.map(a=>S.jsx("a",{href:a.href,className:"text-[11px] font-mono tracking-[0.2em] text-white/60 hover:text-[#FF8C00] transition-colors",children:a.label},a.href))}),S.jsxs("div",{className:"flex items-center gap-4",children:[S.jsxs("span",{className:"hidden lg:block font-mono text-[10px] text-white/40 tracking-widest",children:[new Date().toLocaleTimeString("es-UY",{hour:"2-digit",minute:"2-digit"})," · UY"]}),S.jsx("a",{href:"#contacto",className:"hidden md:inline-flex items-center px-4 h-9 bg-[#E61919] text-white text-[11px] font-mono tracking-[0.2em] hover:bg-[#FF8C00] transition-colors",children:"INICIAR"}),S.jsx("button",{onClick:()=>i(!0),className:"md:hidden text-white","aria-label":"Abrir menú",children:S.jsx(Tb,{size:22})})]})]})}),r&&S.jsxs("div",{className:"fixed inset-0 z-[60] bg-[#0A0A0B] flex flex-col",children:[S.jsxs("div",{className:"h-16 px-6 flex items-center justify-between border-b border-white/10",children:[S.jsx("span",{className:"font-mono text-[10px] text-[#FF8C00] tracking-widest animate-pulse",children:"▌ DIAGNÓSTICO DE SISTEMA..."}),S.jsx("button",{onClick:()=>i(!1),className:"text-white","aria-label":"Cerrar",children:S.jsx(Xv,{size:22})})]}),S.jsx("nav",{className:"flex-1 flex flex-col justify-center px-6 gap-2",children:wy.map((a,l)=>S.jsxs("a",{href:a.href,onClick:()=>i(!1),className:"group flex items-baseline gap-4 py-3 border-b border-white/10",children:[S.jsxs("span",{className:"font-mono text-[10px] text-white/30",children:["0",l+1]}),S.jsx("span",{className:"text-3xl font-extrabold tracking-tighter text-white group-hover:text-[#FF8C00] transition-colors",children:a.label})]},a.href))}),S.jsxs("div",{className:"p-6 font-mono text-[10px] text-white/40 flex justify-between",children:[S.jsx("span",{children:"F1.COM.UY"}),S.jsx("span",{children:"DURAZNO · UY"})]})]})]})}const bw=V.createContext({});function BR(t){const e=V.useRef(null);return e.current===null&&(e.current=t()),e.current}const Nf=V.createContext(null),Ew=V.createContext({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"});function UR(t=!0){const e=V.useContext(Nf);if(e===null)return[!0,null];const{isPresent:r,onExitComplete:i,register:a}=e,l=V.useId();V.useEffect(()=>{t&&a(l)},[t]);const c=V.useCallback(()=>t&&i&&i(l),[l,i,t]);return!r&&i?[!1,c]:[!0]}const Df=typeof window<"u",zR=Df?V.useLayoutEffect:V.useEffect,qt=t=>t;let Cw=qt;function Lf(t){let e;return()=>(e===void 0&&(e=t()),e)}const ai=(t,e,r)=>{const i=e-t;return i===0?1:(r-t)/i},qn=t=>t*1e3,Hn=t=>t/1e3,$R={useManualTiming:!1};function qR(t){let e=new Set,r=new Set,i=!1,a=!1;const l=new WeakSet;let c={delta:0,timestamp:0,isProcessing:!1};function d(m){l.has(m)&&(h.schedule(m),t()),m(c)}const h={schedule:(m,g=!1,y=!1)=>{const k=y&&i?e:r;return g&&l.add(m),k.has(m)||k.add(m),m},cancel:m=>{r.delete(m),l.delete(m)},process:m=>{if(c=m,i){a=!0;return}i=!0,[e,r]=[r,e],e.forEach(d),e.clear(),i=!1,a&&(a=!1,h.process(m))}};return h}const ol=["read","resolveKeyframes","update","preRender","render","postRender"],HR=40;function kw(t,e){let r=!1,i=!0;const a={delta:0,timestamp:0,isProcessing:!1},l=()=>r=!0,c=ol.reduce((E,N)=>(E[N]=qR(l),E),{}),{read:d,resolveKeyframes:h,update:m,preRender:g,render:y,postRender:w}=c,k=()=>{const E=performance.now();r=!1,a.delta=i?1e3/60:Math.max(Math.min(E-a.timestamp,HR),1),a.timestamp=E,a.isProcessing=!0,d.process(a),h.process(a),m.process(a),g.process(a),y.process(a),w.process(a),a.isProcessing=!1,r&&e&&(i=!1,t(k))},_=()=>{r=!0,i=!0,a.isProcessing||t(k)};return{schedule:ol.reduce((E,N)=>{const A=c[N];return E[N]=(D,B=!1,W=!1)=>(r||_(),A.schedule(D,B,W)),E},{}),cancel:E=>{for(let N=0;Nxy[t].some(r=>!!e[r])};function WR(t){for(const e in t)li[e]={...li[e],...t[e]}}const KR=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function _l(t){return t.startsWith("while")||t.startsWith("drag")&&t!=="draggable"||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||t.startsWith("onLayout")||KR.has(t)}let _w=t=>!_l(t);function QR(t){t&&(_w=e=>e.startsWith("on")?!_l(e):t(e))}try{QR(require("@emotion/is-prop-valid").default)}catch{}function GR(t,e,r){const i={};for(const a in t)a==="values"&&typeof t.values=="object"||(_w(a)||r===!0&&_l(a)||!e&&!_l(a)||t.draggable&&a.startsWith("onDrag"))&&(i[a]=t[a]);return i}function YR(t){if(typeof Proxy>"u")return t;const e=new Map,r=(...i)=>t(...i);return new Proxy(r,{get:(i,a)=>a==="create"?t:(e.has(a)||e.set(a,t(a)),e.get(a))})}const ql=V.createContext({});function bo(t){return typeof t=="string"||Array.isArray(t)}function Hl(t){return t!==null&&typeof t=="object"&&typeof t.start=="function"}const jf=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Mf=["initial",...jf];function Wl(t){return Hl(t.animate)||Mf.some(e=>bo(t[e]))}function Rw(t){return!!(Wl(t)||t.variants)}function XR(t,e){if(Wl(t)){const{initial:r,animate:i}=t;return{initial:r===!1||bo(r)?r:void 0,animate:bo(i)?i:void 0}}return t.inherit!==!1?e:{}}function JR(t){const{initial:e,animate:r}=XR(t,V.useContext(ql));return V.useMemo(()=>({initial:e,animate:r}),[Sy(e),Sy(r)])}function Sy(t){return Array.isArray(t)?t.join(" "):t}const ZR=Symbol.for("motionComponentSymbol");function Us(t){return t&&typeof t=="object"&&Object.prototype.hasOwnProperty.call(t,"current")}function eP(t,e,r){return V.useCallback(i=>{i&&t.onMount&&t.onMount(i),e&&(i?e.mount(i):e.unmount()),r&&(typeof r=="function"?r(i):Us(r)&&(r.current=i))},[e])}const Ff=t=>t.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),tP="framerAppearId",Pw="data-"+Ff(tP),{schedule:If}=kw(queueMicrotask,!1),Aw=V.createContext({});function nP(t,e,r,i,a){var l,c;const{visualElement:d}=V.useContext(ql),h=V.useContext(Tw),m=V.useContext(Nf),g=V.useContext(Ew).reducedMotion,y=V.useRef(null);i=i||h.renderer,!y.current&&i&&(y.current=i(t,{visualState:e,parent:d,props:r,presenceContext:m,blockInitialAnimation:m?m.initial===!1:!1,reducedMotionConfig:g}));const w=y.current,k=V.useContext(Aw);w&&!w.projection&&a&&(w.type==="html"||w.type==="svg")&&rP(y.current,r,a,k);const _=V.useRef(!1);V.useInsertionEffect(()=>{w&&_.current&&w.update(r,m)});const b=r[Pw],x=V.useRef(!!b&&!(!((l=window.MotionHandoffIsComplete)===null||l===void 0)&&l.call(window,b))&&((c=window.MotionHasOptimisedAnimation)===null||c===void 0?void 0:c.call(window,b)));return zR(()=>{w&&(_.current=!0,window.MotionIsMounted=!0,w.updateFeatures(),If.render(w.render),x.current&&w.animationState&&w.animationState.animateChanges())}),V.useEffect(()=>{w&&(!x.current&&w.animationState&&w.animationState.animateChanges(),x.current&&(queueMicrotask(()=>{var E;(E=window.MotionHandoffMarkAsComplete)===null||E===void 0||E.call(window,b)}),x.current=!1))}),w}function rP(t,e,r,i){const{layoutId:a,layout:l,drag:c,dragConstraints:d,layoutScroll:h,layoutRoot:m}=e;t.projection=new r(t.latestValues,e["data-framer-portal-id"]?void 0:Ow(t.parent)),t.projection.setOptions({layoutId:a,layout:l,alwaysMeasureLayout:!!c||d&&Us(d),visualElement:t,animationType:typeof l=="string"?l:"both",initialPromotionConfig:i,layoutScroll:h,layoutRoot:m})}function Ow(t){if(t)return t.options.allowProjection!==!1?t.projection:Ow(t.parent)}function sP({preloadedFeatures:t,createVisualElement:e,useRender:r,useVisualState:i,Component:a}){var l,c;t&&WR(t);function d(m,g){let y;const w={...V.useContext(Ew),...m,layoutId:iP(m)},{isStatic:k}=w,_=JR(m),b=i(m,k);if(!k&&Df){oP();const x=aP(w);y=x.MeasureLayout,_.visualElement=nP(a,b,w,e,x.ProjectionNode)}return S.jsxs(ql.Provider,{value:_,children:[y&&_.visualElement?S.jsx(y,{visualElement:_.visualElement,...w}):null,r(a,m,eP(b,_.visualElement,g),b,k,_.visualElement)]})}d.displayName=`motion.${typeof a=="string"?a:`create(${(c=(l=a.displayName)!==null&&l!==void 0?l:a.name)!==null&&c!==void 0?c:""})`}`;const h=V.forwardRef(d);return h[ZR]=a,h}function iP({layoutId:t}){const e=V.useContext(bw).id;return e&&t!==void 0?e+"-"+t:t}function oP(t,e){V.useContext(Tw).strict}function aP(t){const{drag:e,layout:r}=li;if(!e&&!r)return{};const i={...e,...r};return{MeasureLayout:e!=null&&e.isEnabled(t)||r!=null&&r.isEnabled(t)?i.MeasureLayout:void 0,ProjectionNode:i.ProjectionNode}}const lP=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function Vf(t){return typeof t!="string"||t.includes("-")?!1:!!(lP.indexOf(t)>-1||/[A-Z]/u.test(t))}function by(t){const e=[{},{}];return t==null||t.values.forEach((r,i)=>{e[0][i]=r.get(),e[1][i]=r.getVelocity()}),e}function Bf(t,e,r,i){if(typeof e=="function"){const[a,l]=by(i);e=e(r!==void 0?r:t.custom,a,l)}if(typeof e=="string"&&(e=t.variants&&t.variants[e]),typeof e=="function"){const[a,l]=by(i);e=e(r!==void 0?r:t.custom,a,l)}return e}const Kd=t=>Array.isArray(t),uP=t=>!!(t&&typeof t=="object"&&t.mix&&t.toValue),cP=t=>Kd(t)?t[t.length-1]||0:t,bt=t=>!!(t&&t.getVelocity);function wl(t){const e=bt(t)?t.get():t;return uP(e)?e.toValue():e}function dP({scrapeMotionValuesFromProps:t,createRenderState:e,onUpdate:r},i,a,l){const c={latestValues:fP(i,a,l,t),renderState:e()};return r&&(c.onMount=d=>r({props:i,current:d,...c}),c.onUpdate=d=>r(d)),c}const Nw=t=>(e,r)=>{const i=V.useContext(ql),a=V.useContext(Nf),l=()=>dP(t,e,i,a);return r?l():BR(l)};function fP(t,e,r,i){const a={},l=i(t,{});for(const w in l)a[w]=wl(l[w]);let{initial:c,animate:d}=t;const h=Wl(t),m=Rw(t);e&&m&&!h&&t.inherit!==!1&&(c===void 0&&(c=e.initial),d===void 0&&(d=e.animate));let g=r?r.initial===!1:!1;g=g||c===!1;const y=g?d:c;if(y&&typeof y!="boolean"&&!Hl(y)){const w=Array.isArray(y)?y:[y];for(let k=0;ke=>typeof e=="string"&&e.startsWith(t),Lw=Dw("--"),hP=Dw("var(--"),Uf=t=>hP(t)?pP.test(t.split("/*")[0].trim()):!1,pP=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,jw=(t,e)=>e&&typeof t=="number"?e.transform(t):t,Wn=(t,e,r)=>r>e?e:rtypeof t=="number",parse:parseFloat,transform:t=>t},Eo={...hi,transform:t=>Wn(0,1,t)},al={...hi,default:1},Vo=t=>({test:e=>typeof e=="string"&&e.endsWith(t)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${t}`}),mr=Vo("deg"),Tn=Vo("%"),me=Vo("px"),mP=Vo("vh"),gP=Vo("vw"),Ey={...Tn,parse:t=>Tn.parse(t)/100,transform:t=>Tn.transform(t*100)},yP={borderWidth:me,borderTopWidth:me,borderRightWidth:me,borderBottomWidth:me,borderLeftWidth:me,borderRadius:me,radius:me,borderTopLeftRadius:me,borderTopRightRadius:me,borderBottomRightRadius:me,borderBottomLeftRadius:me,width:me,maxWidth:me,height:me,maxHeight:me,top:me,right:me,bottom:me,left:me,padding:me,paddingTop:me,paddingRight:me,paddingBottom:me,paddingLeft:me,margin:me,marginTop:me,marginRight:me,marginBottom:me,marginLeft:me,backgroundPositionX:me,backgroundPositionY:me},vP={rotate:mr,rotateX:mr,rotateY:mr,rotateZ:mr,scale:al,scaleX:al,scaleY:al,scaleZ:al,skew:mr,skewX:mr,skewY:mr,distance:me,translateX:me,translateY:me,translateZ:me,x:me,y:me,z:me,perspective:me,transformPerspective:me,opacity:Eo,originX:Ey,originY:Ey,originZ:me},Cy={...hi,transform:Math.round},zf={...yP,...vP,zIndex:Cy,size:me,fillOpacity:Eo,strokeOpacity:Eo,numOctaves:Cy},wP={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},xP=fi.length;function SP(t,e,r){let i="",a=!0;for(let l=0;l({style:{},transform:{},transformOrigin:{},vars:{}}),Mw=()=>({...Hf(),attrs:{}}),Wf=t=>typeof t=="string"&&t.toLowerCase()==="svg";function Fw(t,{style:e,vars:r},i,a){Object.assign(t.style,e,a&&a.getProjectionStyles(i));for(const l in r)t.style.setProperty(l,r[l])}const Iw=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function Vw(t,e,r,i){Fw(t,e,void 0,i);for(const a in e.attrs)t.setAttribute(Iw.has(a)?a:Ff(a),e.attrs[a])}const Rl={};function TP(t){Object.assign(Rl,t)}function Bw(t,{layout:e,layoutId:r}){return fs.has(t)||t.startsWith("origin")||(e||r!==void 0)&&(!!Rl[t]||t==="opacity")}function Kf(t,e,r){var i;const{style:a}=t,l={};for(const c in a)(bt(a[c])||e.style&&bt(e.style[c])||Bw(c,t)||((i=r==null?void 0:r.getValue(c))===null||i===void 0?void 0:i.liveStyle)!==void 0)&&(l[c]=a[c]);return l}function Uw(t,e,r){const i=Kf(t,e,r);for(const a in t)if(bt(t[a])||bt(e[a])){const l=fi.indexOf(a)!==-1?"attr"+a.charAt(0).toUpperCase()+a.substring(1):a;i[l]=t[a]}return i}function _P(t,e){try{e.dimensions=typeof t.getBBox=="function"?t.getBBox():t.getBoundingClientRect()}catch{e.dimensions={x:0,y:0,width:0,height:0}}}const Ty=["x","y","width","height","cx","cy","r"],RP={useVisualState:Nw({scrapeMotionValuesFromProps:Uw,createRenderState:Mw,onUpdate:({props:t,prevProps:e,current:r,renderState:i,latestValues:a})=>{if(!r)return;let l=!!t.drag;if(!l){for(const d in a)if(fs.has(d)){l=!0;break}}if(!l)return;let c=!e;if(e)for(let d=0;d{_P(r,i),Ue.render(()=>{qf(i,a,Wf(r.tagName),t.transformTemplate),Vw(r,i)})})}})},PP={useVisualState:Nw({scrapeMotionValuesFromProps:Kf,createRenderState:Hf})};function zw(t,e,r){for(const i in e)!bt(e[i])&&!Bw(i,r)&&(t[i]=e[i])}function AP({transformTemplate:t},e){return V.useMemo(()=>{const r=Hf();return $f(r,e,t),Object.assign({},r.vars,r.style)},[e])}function OP(t,e){const r=t.style||{},i={};return zw(i,r,t),Object.assign(i,AP(t,e)),i}function NP(t,e){const r={},i=OP(t,e);return t.drag&&t.dragListener!==!1&&(r.draggable=!1,i.userSelect=i.WebkitUserSelect=i.WebkitTouchCallout="none",i.touchAction=t.drag===!0?"none":`pan-${t.drag==="x"?"y":"x"}`),t.tabIndex===void 0&&(t.onTap||t.onTapStart||t.whileTap)&&(r.tabIndex=0),r.style=i,r}function DP(t,e,r,i){const a=V.useMemo(()=>{const l=Mw();return qf(l,e,Wf(i),t.transformTemplate),{...l.attrs,style:{...l.style}}},[e]);if(t.style){const l={};zw(l,t.style,t),a.style={...l,...a.style}}return a}function LP(t=!1){return(r,i,a,{latestValues:l},c)=>{const h=(Vf(r)?DP:NP)(i,l,c,r),m=GR(i,typeof r=="string",t),g=r!==V.Fragment?{...m,...h,ref:a}:{},{children:y}=i,w=V.useMemo(()=>bt(y)?y.get():y,[y]);return V.createElement(r,{...g,children:w})}}function jP(t,e){return function(i,{forwardMotionProps:a}={forwardMotionProps:!1}){const c={...Vf(i)?RP:PP,preloadedFeatures:t,useRender:LP(a),createVisualElement:e,Component:i};return sP(c)}}function $w(t,e){if(!Array.isArray(e))return!1;const r=e.length;if(r!==t.length)return!1;for(let i=0;iwindow.ScrollTimeline!==void 0);class FP{constructor(e){this.stop=()=>this.runAll("stop"),this.animations=e.filter(Boolean)}get finished(){return Promise.all(this.animations.map(e=>"finished"in e?e.finished:e))}getAll(e){return this.animations[0][e]}setAll(e,r){for(let i=0;i{if(MP()&&a.attachTimeline)return a.attachTimeline(e);if(typeof r=="function")return r(a)});return()=>{i.forEach((a,l)=>{a&&a(),this.animations[l].stop()})}}get time(){return this.getAll("time")}set time(e){this.setAll("time",e)}get speed(){return this.getAll("speed")}set speed(e){this.setAll("speed",e)}get startTime(){return this.getAll("startTime")}get duration(){let e=0;for(let r=0;rr[e]())}flatten(){this.runAll("flatten")}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}class IP extends FP{then(e,r){return Promise.all(this.animations).then(e).catch(r)}}function Qf(t,e){return t?t[e]||t.default||t:void 0}const Qd=2e4;function qw(t){let e=0;const r=50;let i=t.next(e);for(;!i.done&&e=Qd?1/0:e}function Gf(t){return typeof t=="function"}function _y(t,e){t.timeline=e,t.onfinish=null}const Yf=t=>Array.isArray(t)&&typeof t[0]=="number",VP={linearEasing:void 0};function BP(t,e){const r=Lf(t);return()=>{var i;return(i=VP[e])!==null&&i!==void 0?i:r()}}const Pl=BP(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Hw=(t,e,r=10)=>{let i="";const a=Math.max(Math.round(e/r),2);for(let l=0;l`cubic-bezier(${t}, ${e}, ${r}, ${i})`,Gd={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:co([0,.65,.55,1]),circOut:co([.55,0,1,.45]),backIn:co([.31,.01,.66,-.59]),backOut:co([.33,1.53,.69,.99])};function Kw(t,e){if(t)return typeof t=="function"&&Pl()?Hw(t,e):Yf(t)?co(t):Array.isArray(t)?t.map(r=>Kw(r,e)||Gd.easeOut):Gd[t]}const fn={x:!1,y:!1};function Qw(){return fn.x||fn.y}function UP(t,e,r){var i;if(t instanceof Element)return[t];if(typeof t=="string"){let a=document;const l=(i=void 0)!==null&&i!==void 0?i:a.querySelectorAll(t);return l?Array.from(l):[]}return Array.from(t)}function Gw(t,e){const r=UP(t),i=new AbortController,a={passive:!0,...e,signal:i.signal};return[r,a,()=>i.abort()]}function Ry(t){return e=>{e.pointerType==="touch"||Qw()||t(e)}}function zP(t,e,r={}){const[i,a,l]=Gw(t,r),c=Ry(d=>{const{target:h}=d,m=e(d);if(typeof m!="function"||!h)return;const g=Ry(y=>{m(y),h.removeEventListener("pointerleave",g)});h.addEventListener("pointerleave",g,a)});return i.forEach(d=>{d.addEventListener("pointerenter",c,a)}),l}const Yw=(t,e)=>e?t===e?!0:Yw(t,e.parentElement):!1,Xf=t=>t.pointerType==="mouse"?typeof t.button!="number"||t.button<=0:t.isPrimary!==!1,$P=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function qP(t){return $P.has(t.tagName)||t.tabIndex!==-1}const fo=new WeakSet;function Py(t){return e=>{e.key==="Enter"&&t(e)}}function od(t,e){t.dispatchEvent(new PointerEvent("pointer"+e,{isPrimary:!0,bubbles:!0}))}const HP=(t,e)=>{const r=t.currentTarget;if(!r)return;const i=Py(()=>{if(fo.has(r))return;od(r,"down");const a=Py(()=>{od(r,"up")}),l=()=>od(r,"cancel");r.addEventListener("keyup",a,e),r.addEventListener("blur",l,e)});r.addEventListener("keydown",i,e),r.addEventListener("blur",()=>r.removeEventListener("keydown",i),e)};function Ay(t){return Xf(t)&&!Qw()}function WP(t,e,r={}){const[i,a,l]=Gw(t,r),c=d=>{const h=d.currentTarget;if(!Ay(d)||fo.has(h))return;fo.add(h);const m=e(d),g=(k,_)=>{window.removeEventListener("pointerup",y),window.removeEventListener("pointercancel",w),!(!Ay(k)||!fo.has(h))&&(fo.delete(h),typeof m=="function"&&m(k,{success:_}))},y=k=>{g(k,r.useGlobalTarget||Yw(h,k.target))},w=k=>{g(k,!1)};window.addEventListener("pointerup",y,a),window.addEventListener("pointercancel",w,a)};return i.forEach(d=>{!qP(d)&&d.getAttribute("tabindex")===null&&(d.tabIndex=0),(r.useGlobalTarget?window:d).addEventListener("pointerdown",c,a),d.addEventListener("focus",m=>HP(m,a),a)}),l}function KP(t){return t==="x"||t==="y"?fn[t]?null:(fn[t]=!0,()=>{fn[t]=!1}):fn.x||fn.y?null:(fn.x=fn.y=!0,()=>{fn.x=fn.y=!1})}const Xw=new Set(["width","height","top","left","right","bottom",...fi]);let xl;function QP(){xl=void 0}const _n={now:()=>(xl===void 0&&_n.set(ht.isProcessing||$R.useManualTiming?ht.timestamp:performance.now()),xl),set:t=>{xl=t,queueMicrotask(QP)}};function Jf(t,e){t.indexOf(e)===-1&&t.push(e)}function Zf(t,e){const r=t.indexOf(e);r>-1&&t.splice(r,1)}class eh{constructor(){this.subscriptions=[]}add(e){return Jf(this.subscriptions,e),()=>Zf(this.subscriptions,e)}notify(e,r,i){const a=this.subscriptions.length;if(a)if(a===1)this.subscriptions[0](e,r,i);else for(let l=0;l!isNaN(parseFloat(t));class YP{constructor(e,r={}){this.version="11.18.2",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(i,a=!0)=>{const l=_n.now();this.updatedAt!==l&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(i),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),a&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(e),this.owner=r.owner}setCurrent(e){this.current=e,this.updatedAt=_n.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=GP(this.current))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return this.on("change",e)}on(e,r){this.events[e]||(this.events[e]=new eh);const i=this.events[e].add(r);return e==="change"?()=>{i(),Ue.read(()=>{this.events.change.getSize()||this.stop()})}:i}clearListeners(){for(const e in this.events)this.events[e].clear()}attach(e,r){this.passiveEffect=e,this.stopPassiveEffect=r}set(e,r=!0){!r||!this.passiveEffect?this.updateAndNotify(e,r):this.passiveEffect(e,this.updateAndNotify)}setWithVelocity(e,r,i){this.set(r),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-i}jump(e,r=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,r&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const e=_n.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>Oy)return 0;const r=Math.min(this.updatedAt-this.prevUpdatedAt,Oy);return Jw(parseFloat(this.current)-parseFloat(this.prevFrameValue),r)}start(e){return this.stop(),new Promise(r=>{this.hasAnimated=!0,this.animation=e(r),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Co(t,e){return new YP(t,e)}function XP(t,e,r){t.hasValue(e)?t.getValue(e).set(r):t.addValue(e,Co(r))}function JP(t,e){const r=Kl(t,e);let{transitionEnd:i={},transition:a={},...l}=r||{};l={...l,...i};for(const c in l){const d=cP(l[c]);XP(t,c,d)}}function ZP(t){return!!(bt(t)&&t.add)}function Yd(t,e){const r=t.getValue("willChange");if(ZP(r))return r.add(e)}function Zw(t){return t.props[Pw]}const ex=(t,e,r)=>(((1-3*r+3*e)*t+(3*r-6*e))*t+3*e)*t,eA=1e-7,tA=12;function nA(t,e,r,i,a){let l,c,d=0;do c=e+(r-e)/2,l=ex(c,i,a)-t,l>0?r=c:e=c;while(Math.abs(l)>eA&&++dnA(l,0,1,t,r);return l=>l===0||l===1?l:ex(a(l),e,i)}const tx=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,nx=t=>e=>1-t(1-e),rx=Bo(.33,1.53,.69,.99),th=nx(rx),sx=tx(th),ix=t=>(t*=2)<1?.5*th(t):.5*(2-Math.pow(2,-10*(t-1))),nh=t=>1-Math.sin(Math.acos(t)),ox=nx(nh),ax=tx(nh),lx=t=>/^0[^.\s]+$/u.test(t);function rA(t){return typeof t=="number"?t===0:t!==null?t==="none"||t==="0"||lx(t):!0}const go=t=>Math.round(t*1e5)/1e5,rh=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function sA(t){return t==null}const iA=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,sh=(t,e)=>r=>!!(typeof r=="string"&&iA.test(r)&&r.startsWith(t)||e&&!sA(r)&&Object.prototype.hasOwnProperty.call(r,e)),ux=(t,e,r)=>i=>{if(typeof i!="string")return i;const[a,l,c,d]=i.match(rh);return{[t]:parseFloat(a),[e]:parseFloat(l),[r]:parseFloat(c),alpha:d!==void 0?parseFloat(d):1}},oA=t=>Wn(0,255,t),ad={...hi,transform:t=>Math.round(oA(t))},Yr={test:sh("rgb","red"),parse:ux("red","green","blue"),transform:({red:t,green:e,blue:r,alpha:i=1})=>"rgba("+ad.transform(t)+", "+ad.transform(e)+", "+ad.transform(r)+", "+go(Eo.transform(i))+")"};function aA(t){let e="",r="",i="",a="";return t.length>5?(e=t.substring(1,3),r=t.substring(3,5),i=t.substring(5,7),a=t.substring(7,9)):(e=t.substring(1,2),r=t.substring(2,3),i=t.substring(3,4),a=t.substring(4,5),e+=e,r+=r,i+=i,a+=a),{red:parseInt(e,16),green:parseInt(r,16),blue:parseInt(i,16),alpha:a?parseInt(a,16)/255:1}}const Xd={test:sh("#"),parse:aA,transform:Yr.transform},zs={test:sh("hsl","hue"),parse:ux("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:r,alpha:i=1})=>"hsla("+Math.round(t)+", "+Tn.transform(go(e))+", "+Tn.transform(go(r))+", "+go(Eo.transform(i))+")"},St={test:t=>Yr.test(t)||Xd.test(t)||zs.test(t),parse:t=>Yr.test(t)?Yr.parse(t):zs.test(t)?zs.parse(t):Xd.parse(t),transform:t=>typeof t=="string"?t:t.hasOwnProperty("red")?Yr.transform(t):zs.transform(t)},lA=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function uA(t){var e,r;return isNaN(t)&&typeof t=="string"&&(((e=t.match(rh))===null||e===void 0?void 0:e.length)||0)+(((r=t.match(lA))===null||r===void 0?void 0:r.length)||0)>0}const cx="number",dx="color",cA="var",dA="var(",Ny="${}",fA=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function ko(t){const e=t.toString(),r=[],i={color:[],number:[],var:[]},a=[];let l=0;const d=e.replace(fA,h=>(St.test(h)?(i.color.push(l),a.push(dx),r.push(St.parse(h))):h.startsWith(dA)?(i.var.push(l),a.push(cA),r.push(h)):(i.number.push(l),a.push(cx),r.push(parseFloat(h))),++l,Ny)).split(Ny);return{values:r,split:d,indexes:i,types:a}}function fx(t){return ko(t).values}function hx(t){const{split:e,types:r}=ko(t),i=e.length;return a=>{let l="";for(let c=0;ctypeof t=="number"?0:t;function pA(t){const e=fx(t);return hx(t)(e.map(hA))}const Rr={test:uA,parse:fx,createTransformer:hx,getAnimatableNone:pA},mA=new Set(["brightness","contrast","saturate","opacity"]);function gA(t){const[e,r]=t.slice(0,-1).split("(");if(e==="drop-shadow")return t;const[i]=r.match(rh)||[];if(!i)return t;const a=r.replace(i,"");let l=mA.has(e)?1:0;return i!==r&&(l*=100),e+"("+l+a+")"}const yA=/\b([a-z-]*)\(.*?\)/gu,Jd={...Rr,getAnimatableNone:t=>{const e=t.match(yA);return e?e.map(gA).join(" "):t}},vA={...zf,color:St,backgroundColor:St,outlineColor:St,fill:St,stroke:St,borderColor:St,borderTopColor:St,borderRightColor:St,borderBottomColor:St,borderLeftColor:St,filter:Jd,WebkitFilter:Jd},ih=t=>vA[t];function px(t,e){let r=ih(t);return r!==Jd&&(r=Rr),r.getAnimatableNone?r.getAnimatableNone(e):void 0}const wA=new Set(["auto","none","0"]);function xA(t,e,r){let i=0,a;for(;it===hi||t===me,Ly=(t,e)=>parseFloat(t.split(", ")[e]),jy=(t,e)=>(r,{transform:i})=>{if(i==="none"||!i)return 0;const a=i.match(/^matrix3d\((.+)\)$/u);if(a)return Ly(a[1],e);{const l=i.match(/^matrix\((.+)\)$/u);return l?Ly(l[1],t):0}},SA=new Set(["x","y","z"]),bA=fi.filter(t=>!SA.has(t));function EA(t){const e=[];return bA.forEach(r=>{const i=t.getValue(r);i!==void 0&&(e.push([r,i.get()]),i.set(r.startsWith("scale")?1:0))}),e}const ui={width:({x:t},{paddingLeft:e="0",paddingRight:r="0"})=>t.max-t.min-parseFloat(e)-parseFloat(r),height:({y:t},{paddingTop:e="0",paddingBottom:r="0"})=>t.max-t.min-parseFloat(e)-parseFloat(r),top:(t,{top:e})=>parseFloat(e),left:(t,{left:e})=>parseFloat(e),bottom:({y:t},{top:e})=>parseFloat(e)+(t.max-t.min),right:({x:t},{left:e})=>parseFloat(e)+(t.max-t.min),x:jy(4,13),y:jy(5,14)};ui.translateX=ui.x;ui.translateY=ui.y;const as=new Set;let Zd=!1,ef=!1;function mx(){if(ef){const t=Array.from(as).filter(i=>i.needsMeasurement),e=new Set(t.map(i=>i.element)),r=new Map;e.forEach(i=>{const a=EA(i);a.length&&(r.set(i,a),i.render())}),t.forEach(i=>i.measureInitialState()),e.forEach(i=>{i.render();const a=r.get(i);a&&a.forEach(([l,c])=>{var d;(d=i.getValue(l))===null||d===void 0||d.set(c)})}),t.forEach(i=>i.measureEndState()),t.forEach(i=>{i.suspendedScrollY!==void 0&&window.scrollTo(0,i.suspendedScrollY)})}ef=!1,Zd=!1,as.forEach(t=>t.complete()),as.clear()}function gx(){as.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(ef=!0)})}function CA(){gx(),mx()}class oh{constructor(e,r,i,a,l,c=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...e],this.onComplete=r,this.name=i,this.motionValue=a,this.element=l,this.isAsync=c}scheduleResolve(){this.isScheduled=!0,this.isAsync?(as.add(this),Zd||(Zd=!0,Ue.read(gx),Ue.resolveKeyframes(mx))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:e,name:r,element:i,motionValue:a}=this;for(let l=0;l/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t),kA=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function TA(t){const e=kA.exec(t);if(!e)return[,];const[,r,i,a]=e;return[`--${r??i}`,a]}function vx(t,e,r=1){const[i,a]=TA(t);if(!i)return;const l=window.getComputedStyle(e).getPropertyValue(i);if(l){const c=l.trim();return yx(c)?parseFloat(c):c}return Uf(a)?vx(a,e,r+1):a}const wx=t=>e=>e.test(t),_A={test:t=>t==="auto",parse:t=>t},xx=[hi,me,Tn,mr,gP,mP,_A],My=t=>xx.find(wx(t));class Sx extends oh{constructor(e,r,i,a,l){super(e,r,i,a,l,!0)}readKeyframes(){const{unresolvedKeyframes:e,element:r,name:i}=this;if(!r||!r.current)return;super.readKeyframes();for(let h=0;h{r.getValue(h).set(m)}),this.resolveNoneKeyframes()}}const Fy=(t,e)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&(Rr.test(t)||t==="0")&&!t.startsWith("url("));function RA(t){const e=t[0];if(t.length===1)return!0;for(let r=0;rt!==null;function Ql(t,{repeat:e,repeatType:r="loop"},i){const a=t.filter(AA),l=e&&r!=="loop"&&e%2===1?0:a.length-1;return!l||i===void 0?a[l]:i}const OA=40;class bx{constructor({autoplay:e=!0,delay:r=0,type:i="keyframes",repeat:a=0,repeatDelay:l=0,repeatType:c="loop",...d}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.createdAt=_n.now(),this.options={autoplay:e,delay:r,type:i,repeat:a,repeatDelay:l,repeatType:c,...d},this.updateFinishedPromise()}calcStartTime(){return this.resolvedAt?this.resolvedAt-this.createdAt>OA?this.resolvedAt:this.createdAt:this.createdAt}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&CA(),this._resolved}onKeyframesResolved(e,r){this.resolvedAt=_n.now(),this.hasAttemptedResolve=!0;const{name:i,type:a,velocity:l,delay:c,onComplete:d,onUpdate:h,isGenerator:m}=this.options;if(!m&&!PA(e,i,a,l))if(c)this.options.duration=0;else{h&&h(Ql(e,this.options,r)),d&&d(),this.resolveFinishedPromise();return}const g=this.initPlayback(e,r);g!==!1&&(this._resolved={keyframes:e,finalKeyframe:r,...g},this.onPostResolved())}onPostResolved(){}then(e,r){return this.currentFinishedPromise.then(e,r)}flatten(){this.options.type="keyframes",this.options.ease="linear"}updateFinishedPromise(){this.currentFinishedPromise=new Promise(e=>{this.resolveFinishedPromise=e})}}const We=(t,e,r)=>t+(e-t)*r;function ld(t,e,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?t+(e-t)*6*r:r<1/2?e:r<2/3?t+(e-t)*(2/3-r)*6:t}function NA({hue:t,saturation:e,lightness:r,alpha:i}){t/=360,e/=100,r/=100;let a=0,l=0,c=0;if(!e)a=l=c=r;else{const d=r<.5?r*(1+e):r+e-r*e,h=2*r-d;a=ld(h,d,t+1/3),l=ld(h,d,t),c=ld(h,d,t-1/3)}return{red:Math.round(a*255),green:Math.round(l*255),blue:Math.round(c*255),alpha:i}}function Al(t,e){return r=>r>0?e:t}const ud=(t,e,r)=>{const i=t*t,a=r*(e*e-i)+i;return a<0?0:Math.sqrt(a)},DA=[Xd,Yr,zs],LA=t=>DA.find(e=>e.test(t));function Iy(t){const e=LA(t);if(!e)return!1;let r=e.parse(t);return e===zs&&(r=NA(r)),r}const Vy=(t,e)=>{const r=Iy(t),i=Iy(e);if(!r||!i)return Al(t,e);const a={...r};return l=>(a.red=ud(r.red,i.red,l),a.green=ud(r.green,i.green,l),a.blue=ud(r.blue,i.blue,l),a.alpha=We(r.alpha,i.alpha,l),Yr.transform(a))},jA=(t,e)=>r=>e(t(r)),Uo=(...t)=>t.reduce(jA),tf=new Set(["none","hidden"]);function MA(t,e){return tf.has(t)?r=>r<=0?t:e:r=>r>=1?e:t}function FA(t,e){return r=>We(t,e,r)}function ah(t){return typeof t=="number"?FA:typeof t=="string"?Uf(t)?Al:St.test(t)?Vy:BA:Array.isArray(t)?Ex:typeof t=="object"?St.test(t)?Vy:IA:Al}function Ex(t,e){const r=[...t],i=r.length,a=t.map((l,c)=>ah(l)(l,e[c]));return l=>{for(let c=0;c{for(const l in i)r[l]=i[l](a);return r}}function VA(t,e){var r;const i=[],a={color:0,var:0,number:0};for(let l=0;l{const r=Rr.createTransformer(e),i=ko(t),a=ko(e);return i.indexes.var.length===a.indexes.var.length&&i.indexes.color.length===a.indexes.color.length&&i.indexes.number.length>=a.indexes.number.length?tf.has(t)&&!a.values.length||tf.has(e)&&!i.values.length?MA(t,e):Uo(Ex(VA(i,a),a.values),r):Al(t,e)};function Cx(t,e,r){return typeof t=="number"&&typeof e=="number"&&typeof r=="number"?We(t,e,r):ah(t)(t,e)}const UA=5;function kx(t,e,r){const i=Math.max(e-UA,0);return Jw(r-t(i),e-i)}const Ge={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},cd=.001;function zA({duration:t=Ge.duration,bounce:e=Ge.bounce,velocity:r=Ge.velocity,mass:i=Ge.mass}){let a,l,c=1-e;c=Wn(Ge.minDamping,Ge.maxDamping,c),t=Wn(Ge.minDuration,Ge.maxDuration,Hn(t)),c<1?(a=m=>{const g=m*c,y=g*t,w=g-r,k=nf(m,c),_=Math.exp(-y);return cd-w/k*_},l=m=>{const y=m*c*t,w=y*r+r,k=Math.pow(c,2)*Math.pow(m,2)*t,_=Math.exp(-y),b=nf(Math.pow(m,2),c);return(-a(m)+cd>0?-1:1)*((w-k)*_)/b}):(a=m=>{const g=Math.exp(-m*t),y=(m-r)*t+1;return-cd+g*y},l=m=>{const g=Math.exp(-m*t),y=(r-m)*(t*t);return g*y});const d=5/t,h=qA(a,l,d);if(t=qn(t),isNaN(h))return{stiffness:Ge.stiffness,damping:Ge.damping,duration:t};{const m=Math.pow(h,2)*i;return{stiffness:m,damping:c*2*Math.sqrt(i*m),duration:t}}}const $A=12;function qA(t,e,r){let i=r;for(let a=1;a<$A;a++)i=i-t(i)/e(i);return i}function nf(t,e){return t*Math.sqrt(1-e*e)}const HA=["duration","bounce"],WA=["stiffness","damping","mass"];function By(t,e){return e.some(r=>t[r]!==void 0)}function KA(t){let e={velocity:Ge.velocity,stiffness:Ge.stiffness,damping:Ge.damping,mass:Ge.mass,isResolvedFromDuration:!1,...t};if(!By(t,WA)&&By(t,HA))if(t.visualDuration){const r=t.visualDuration,i=2*Math.PI/(r*1.2),a=i*i,l=2*Wn(.05,1,1-(t.bounce||0))*Math.sqrt(a);e={...e,mass:Ge.mass,stiffness:a,damping:l}}else{const r=zA(t);e={...e,...r,mass:Ge.mass},e.isResolvedFromDuration=!0}return e}function Tx(t=Ge.visualDuration,e=Ge.bounce){const r=typeof t!="object"?{visualDuration:t,keyframes:[0,1],bounce:e}:t;let{restSpeed:i,restDelta:a}=r;const l=r.keyframes[0],c=r.keyframes[r.keyframes.length-1],d={done:!1,value:l},{stiffness:h,damping:m,mass:g,duration:y,velocity:w,isResolvedFromDuration:k}=KA({...r,velocity:-Hn(r.velocity||0)}),_=w||0,b=m/(2*Math.sqrt(h*g)),x=c-l,E=Hn(Math.sqrt(h/g)),N=Math.abs(x)<5;i||(i=N?Ge.restSpeed.granular:Ge.restSpeed.default),a||(a=N?Ge.restDelta.granular:Ge.restDelta.default);let A;if(b<1){const B=nf(E,b);A=W=>{const X=Math.exp(-b*E*W);return c-X*((_+b*E*x)/B*Math.sin(B*W)+x*Math.cos(B*W))}}else if(b===1)A=B=>c-Math.exp(-E*B)*(x+(_+E*x)*B);else{const B=E*Math.sqrt(b*b-1);A=W=>{const X=Math.exp(-b*E*W),I=Math.min(B*W,300);return c-X*((_+b*E*x)*Math.sinh(I)+B*x*Math.cosh(I))/B}}const D={calculatedDuration:k&&y||null,next:B=>{const W=A(B);if(k)d.done=B>=y;else{let X=0;b<1&&(X=B===0?qn(_):kx(A,B,W));const I=Math.abs(X)<=i,ee=Math.abs(c-W)<=a;d.done=I&&ee}return d.value=d.done?c:W,d},toString:()=>{const B=Math.min(qw(D),Qd),W=Hw(X=>D.next(B*X).value,B,30);return B+"ms "+W}};return D}function Uy({keyframes:t,velocity:e=0,power:r=.8,timeConstant:i=325,bounceDamping:a=10,bounceStiffness:l=500,modifyTarget:c,min:d,max:h,restDelta:m=.5,restSpeed:g}){const y=t[0],w={done:!1,value:y},k=I=>d!==void 0&&Ih,_=I=>d===void 0?h:h===void 0||Math.abs(d-I)-b*Math.exp(-I/i),A=I=>E+N(I),D=I=>{const ee=N(I),ce=A(I);w.done=Math.abs(ee)<=m,w.value=w.done?E:ce};let B,W;const X=I=>{k(w.value)&&(B=I,W=Tx({keyframes:[w.value,_(w.value)],velocity:kx(A,I,w.value),damping:a,stiffness:l,restDelta:m,restSpeed:g}))};return X(0),{calculatedDuration:null,next:I=>{let ee=!1;return!W&&B===void 0&&(ee=!0,D(I),X(I)),B!==void 0&&I>=B?W.next(I-B):(!ee&&D(I),w)}}}const QA=Bo(.42,0,1,1),GA=Bo(0,0,.58,1),_x=Bo(.42,0,.58,1),YA=t=>Array.isArray(t)&&typeof t[0]!="number",XA={linear:qt,easeIn:QA,easeInOut:_x,easeOut:GA,circIn:nh,circInOut:ax,circOut:ox,backIn:th,backInOut:sx,backOut:rx,anticipate:ix},zy=t=>{if(Yf(t)){Cw(t.length===4);const[e,r,i,a]=t;return Bo(e,r,i,a)}else if(typeof t=="string")return XA[t];return t};function JA(t,e,r){const i=[],a=r||Cx,l=t.length-1;for(let c=0;ce[0];if(l===2&&e[0]===e[1])return()=>e[1];const c=t[0]===t[1];t[0]>t[l-1]&&(t=[...t].reverse(),e=[...e].reverse());const d=JA(e,i,a),h=d.length,m=g=>{if(c&&g1)for(;ym(Wn(t[0],t[l-1],g)):m}function eO(t,e){const r=t[t.length-1];for(let i=1;i<=e;i++){const a=ai(0,e,i);t.push(We(r,1,a))}}function tO(t){const e=[0];return eO(e,t.length-1),e}function nO(t,e){return t.map(r=>r*e)}function rO(t,e){return t.map(()=>e||_x).splice(0,t.length-1)}function Ol({duration:t=300,keyframes:e,times:r,ease:i="easeInOut"}){const a=YA(i)?i.map(zy):zy(i),l={done:!1,value:e[0]},c=nO(r&&r.length===e.length?r:tO(e),t),d=ZA(c,e,{ease:Array.isArray(a)?a:rO(e,a)});return{calculatedDuration:t,next:h=>(l.value=d(h),l.done=h>=t,l)}}const sO=t=>{const e=({timestamp:r})=>t(r);return{start:()=>Ue.update(e,!0),stop:()=>_r(e),now:()=>ht.isProcessing?ht.timestamp:_n.now()}},iO={decay:Uy,inertia:Uy,tween:Ol,keyframes:Ol,spring:Tx},oO=t=>t/100;class lh extends bx{constructor(e){super(e),this.holdTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.startTime=null,this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.teardown();const{onStop:h}=this.options;h&&h()};const{name:r,motionValue:i,element:a,keyframes:l}=this.options,c=(a==null?void 0:a.KeyframeResolver)||oh,d=(h,m)=>this.onKeyframesResolved(h,m);this.resolver=new c(l,d,r,i,a),this.resolver.scheduleResolve()}flatten(){super.flatten(),this._resolved&&Object.assign(this._resolved,this.initPlayback(this._resolved.keyframes))}initPlayback(e){const{type:r="keyframes",repeat:i=0,repeatDelay:a=0,repeatType:l,velocity:c=0}=this.options,d=Gf(r)?r:iO[r]||Ol;let h,m;d!==Ol&&typeof e[0]!="number"&&(h=Uo(oO,Cx(e[0],e[1])),e=[0,100]);const g=d({...this.options,keyframes:e});l==="mirror"&&(m=d({...this.options,keyframes:[...e].reverse(),velocity:-c})),g.calculatedDuration===null&&(g.calculatedDuration=qw(g));const{calculatedDuration:y}=g,w=y+a,k=w*(i+1)-a;return{generator:g,mirroredGenerator:m,mapPercentToKeyframes:h,calculatedDuration:y,resolvedDuration:w,totalDuration:k}}onPostResolved(){const{autoplay:e=!0}=this.options;this.play(),this.pendingPlayState==="paused"||!e?this.pause():this.state=this.pendingPlayState}tick(e,r=!1){const{resolved:i}=this;if(!i){const{keyframes:I}=this.options;return{done:!0,value:I[I.length-1]}}const{finalKeyframe:a,generator:l,mirroredGenerator:c,mapPercentToKeyframes:d,keyframes:h,calculatedDuration:m,totalDuration:g,resolvedDuration:y}=i;if(this.startTime===null)return l.next(0);const{delay:w,repeat:k,repeatType:_,repeatDelay:b,onUpdate:x}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-g/this.speed,this.startTime)),r?this.currentTime=e:this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=Math.round(e-this.startTime)*this.speed;const E=this.currentTime-w*(this.speed>=0?1:-1),N=this.speed>=0?E<0:E>g;this.currentTime=Math.max(E,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=g);let A=this.currentTime,D=l;if(k){const I=Math.min(this.currentTime,g)/y;let ee=Math.floor(I),ce=I%1;!ce&&I>=1&&(ce=1),ce===1&&ee--,ee=Math.min(ee,k+1),!!(ee%2)&&(_==="reverse"?(ce=1-ce,b&&(ce-=b/y)):_==="mirror"&&(D=c)),A=Wn(0,1,ce)*y}const B=N?{done:!1,value:h[0]}:D.next(A);d&&(B.value=d(B.value));let{done:W}=B;!N&&m!==null&&(W=this.speed>=0?this.currentTime>=g:this.currentTime<=0);const X=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&W);return X&&a!==void 0&&(B.value=Ql(h,this.options,a)),x&&x(B.value),X&&this.finish(),B}get duration(){const{resolved:e}=this;return e?Hn(e.calculatedDuration):0}get time(){return Hn(this.currentTime)}set time(e){e=qn(e),this.currentTime=e,this.holdTime!==null||this.speed===0?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.speed)}get speed(){return this.playbackSpeed}set speed(e){const r=this.playbackSpeed!==e;this.playbackSpeed=e,r&&(this.time=Hn(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:e=sO,onPlay:r,startTime:i}=this.options;this.driver||(this.driver=e(l=>this.tick(l))),r&&r();const a=this.driver.now();this.holdTime!==null?this.startTime=a-this.holdTime:this.startTime?this.state==="finished"&&(this.startTime=a):this.startTime=i??this.calcStartTime(),this.state==="finished"&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){var e;if(!this._resolved){this.pendingPlayState="paused";return}this.state="paused",this.holdTime=(e=this.currentTime)!==null&&e!==void 0?e:0}complete(){this.state!=="running"&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:e}=this.options;e&&e()}cancel(){this.cancelTime!==null&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}}const aO=new Set(["opacity","clipPath","filter","transform"]);function lO(t,e,r,{delay:i=0,duration:a=300,repeat:l=0,repeatType:c="loop",ease:d="easeInOut",times:h}={}){const m={[e]:r};h&&(m.offset=h);const g=Kw(d,a);return Array.isArray(g)&&(m.easing=g),t.animate(m,{delay:i,duration:a,easing:Array.isArray(g)?"linear":g,fill:"both",iterations:l+1,direction:c==="reverse"?"alternate":"normal"})}const uO=Lf(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),Nl=10,cO=2e4;function dO(t){return Gf(t.type)||t.type==="spring"||!Ww(t.ease)}function fO(t,e){const r=new lh({...e,keyframes:t,repeat:0,delay:0,isGenerator:!0});let i={done:!1,value:t[0]};const a=[];let l=0;for(;!i.done&&lthis.onKeyframesResolved(c,d),r,i,a),this.resolver.scheduleResolve()}initPlayback(e,r){let{duration:i=300,times:a,ease:l,type:c,motionValue:d,name:h,startTime:m}=this.options;if(!d.owner||!d.owner.current)return!1;if(typeof l=="string"&&Pl()&&hO(l)&&(l=Rx[l]),dO(this.options)){const{onComplete:y,onUpdate:w,motionValue:k,element:_,...b}=this.options,x=fO(e,b);e=x.keyframes,e.length===1&&(e[1]=e[0]),i=x.duration,a=x.times,l=x.ease,c="keyframes"}const g=lO(d.owner.current,h,e,{...this.options,duration:i,times:a,ease:l});return g.startTime=m??this.calcStartTime(),this.pendingTimeline?(_y(g,this.pendingTimeline),this.pendingTimeline=void 0):g.onfinish=()=>{const{onComplete:y}=this.options;d.set(Ql(e,this.options,r)),y&&y(),this.cancel(),this.resolveFinishedPromise()},{animation:g,duration:i,times:a,type:c,ease:l,keyframes:e}}get duration(){const{resolved:e}=this;if(!e)return 0;const{duration:r}=e;return Hn(r)}get time(){const{resolved:e}=this;if(!e)return 0;const{animation:r}=e;return Hn(r.currentTime||0)}set time(e){const{resolved:r}=this;if(!r)return;const{animation:i}=r;i.currentTime=qn(e)}get speed(){const{resolved:e}=this;if(!e)return 1;const{animation:r}=e;return r.playbackRate}set speed(e){const{resolved:r}=this;if(!r)return;const{animation:i}=r;i.playbackRate=e}get state(){const{resolved:e}=this;if(!e)return"idle";const{animation:r}=e;return r.playState}get startTime(){const{resolved:e}=this;if(!e)return null;const{animation:r}=e;return r.startTime}attachTimeline(e){if(!this._resolved)this.pendingTimeline=e;else{const{resolved:r}=this;if(!r)return qt;const{animation:i}=r;_y(i,e)}return qt}play(){if(this.isStopped)return;const{resolved:e}=this;if(!e)return;const{animation:r}=e;r.playState==="finished"&&this.updateFinishedPromise(),r.play()}pause(){const{resolved:e}=this;if(!e)return;const{animation:r}=e;r.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.resolveFinishedPromise(),this.updateFinishedPromise();const{resolved:e}=this;if(!e)return;const{animation:r,keyframes:i,duration:a,type:l,ease:c,times:d}=e;if(r.playState==="idle"||r.playState==="finished")return;if(this.time){const{motionValue:m,onUpdate:g,onComplete:y,element:w,...k}=this.options,_=new lh({...k,keyframes:i,duration:a,type:l,ease:c,times:d,isGenerator:!0}),b=qn(this.time);m.setWithVelocity(_.sample(b-Nl).value,_.sample(b).value,Nl)}const{onStop:h}=this.options;h&&h(),this.cancel()}complete(){const{resolved:e}=this;e&&e.animation.finish()}cancel(){const{resolved:e}=this;e&&e.animation.cancel()}static supports(e){const{motionValue:r,name:i,repeatDelay:a,repeatType:l,damping:c,type:d}=e;if(!r||!r.owner||!(r.owner.current instanceof HTMLElement))return!1;const{onUpdate:h,transformTemplate:m}=r.owner.getProps();return uO()&&i&&aO.has(i)&&!h&&!m&&!a&&l!=="mirror"&&c!==0&&d!=="inertia"}}const pO={type:"spring",stiffness:500,damping:25,restSpeed:10},mO=t=>({type:"spring",stiffness:550,damping:t===0?2*Math.sqrt(550):30,restSpeed:10}),gO={type:"keyframes",duration:.8},yO={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},vO=(t,{keyframes:e})=>e.length>2?gO:fs.has(t)?t.startsWith("scale")?mO(e[1]):pO:yO;function wO({when:t,delay:e,delayChildren:r,staggerChildren:i,staggerDirection:a,repeat:l,repeatType:c,repeatDelay:d,from:h,elapsed:m,...g}){return!!Object.keys(g).length}const uh=(t,e,r,i={},a,l)=>c=>{const d=Qf(i,t)||{},h=d.delay||i.delay||0;let{elapsed:m=0}=i;m=m-qn(h);let g={keyframes:Array.isArray(r)?r:[null,r],ease:"easeOut",velocity:e.getVelocity(),...d,delay:-m,onUpdate:w=>{e.set(w),d.onUpdate&&d.onUpdate(w)},onComplete:()=>{c(),d.onComplete&&d.onComplete()},name:t,motionValue:e,element:l?void 0:a};wO(d)||(g={...g,...vO(t,g)}),g.duration&&(g.duration=qn(g.duration)),g.repeatDelay&&(g.repeatDelay=qn(g.repeatDelay)),g.from!==void 0&&(g.keyframes[0]=g.from);let y=!1;if((g.type===!1||g.duration===0&&!g.repeatDelay)&&(g.duration=0,g.delay===0&&(y=!0)),y&&!l&&e.get()!==void 0){const w=Ql(g.keyframes,d);if(w!==void 0)return Ue.update(()=>{g.onUpdate(w),g.onComplete()}),new IP([])}return!l&&$y.supports(g)?new $y(g):new lh(g)};function xO({protectedKeys:t,needsAnimating:e},r){const i=t.hasOwnProperty(r)&&e[r]!==!0;return e[r]=!1,i}function Px(t,e,{delay:r=0,transitionOverride:i,type:a}={}){var l;let{transition:c=t.getDefaultTransition(),transitionEnd:d,...h}=e;i&&(c=i);const m=[],g=a&&t.animationState&&t.animationState.getState()[a];for(const y in h){const w=t.getValue(y,(l=t.latestValues[y])!==null&&l!==void 0?l:null),k=h[y];if(k===void 0||g&&xO(g,y))continue;const _={delay:r,...Qf(c||{},y)};let b=!1;if(window.MotionHandoffAnimation){const E=Zw(t);if(E){const N=window.MotionHandoffAnimation(E,y,Ue);N!==null&&(_.startTime=N,b=!0)}}Yd(t,y),w.start(uh(y,w,k,t.shouldReduceMotion&&Xw.has(y)?{type:!1}:_,t,b));const x=w.animation;x&&m.push(x)}return d&&Promise.all(m).then(()=>{Ue.update(()=>{d&&JP(t,d)})}),m}function rf(t,e,r={}){var i;const a=Kl(t,e,r.type==="exit"?(i=t.presenceContext)===null||i===void 0?void 0:i.custom:void 0);let{transition:l=t.getDefaultTransition()||{}}=a||{};r.transitionOverride&&(l=r.transitionOverride);const c=a?()=>Promise.all(Px(t,a,r)):()=>Promise.resolve(),d=t.variantChildren&&t.variantChildren.size?(m=0)=>{const{delayChildren:g=0,staggerChildren:y,staggerDirection:w}=l;return SO(t,e,g+m,y,w,r)}:()=>Promise.resolve(),{when:h}=l;if(h){const[m,g]=h==="beforeChildren"?[c,d]:[d,c];return m().then(()=>g())}else return Promise.all([c(),d(r.delay)])}function SO(t,e,r=0,i=0,a=1,l){const c=[],d=(t.variantChildren.size-1)*i,h=a===1?(m=0)=>m*i:(m=0)=>d-m*i;return Array.from(t.variantChildren).sort(bO).forEach((m,g)=>{m.notify("AnimationStart",e),c.push(rf(m,e,{...l,delay:r+h(g)}).then(()=>m.notify("AnimationComplete",e)))}),Promise.all(c)}function bO(t,e){return t.sortNodePosition(e)}function EO(t,e,r={}){t.notify("AnimationStart",e);let i;if(Array.isArray(e)){const a=e.map(l=>rf(t,l,r));i=Promise.all(a)}else if(typeof e=="string")i=rf(t,e,r);else{const a=typeof e=="function"?Kl(t,e,r.custom):e;i=Promise.all(Px(t,a,r))}return i.then(()=>{t.notify("AnimationComplete",e)})}const CO=Mf.length;function Ax(t){if(!t)return;if(!t.isControllingVariants){const r=t.parent?Ax(t.parent)||{}:{};return t.props.initial!==void 0&&(r.initial=t.props.initial),r}const e={};for(let r=0;rPromise.all(e.map(({animation:r,options:i})=>EO(t,r,i)))}function RO(t){let e=_O(t),r=qy(),i=!0;const a=h=>(m,g)=>{var y;const w=Kl(t,g,h==="exit"?(y=t.presenceContext)===null||y===void 0?void 0:y.custom:void 0);if(w){const{transition:k,transitionEnd:_,...b}=w;m={...m,...b,..._}}return m};function l(h){e=h(t)}function c(h){const{props:m}=t,g=Ax(t.parent)||{},y=[],w=new Set;let k={},_=1/0;for(let x=0;x_&&D,ee=!1;const ce=Array.isArray(A)?A:[A];let ue=ce.reduce(a(E),{});B===!1&&(ue={});const{prevResolvedValues:Pe={}}=N,ze={...Pe,...ue},_e=ge=>{I=!0,w.has(ge)&&(ee=!0,w.delete(ge)),N.needsAnimating[ge]=!0;const Q=t.getValue(ge);Q&&(Q.liveStyle=!1)};for(const ge in ze){const Q=ue[ge],oe=Pe[ge];if(k.hasOwnProperty(ge))continue;let U=!1;Kd(Q)&&Kd(oe)?U=!$w(Q,oe):U=Q!==oe,U?Q!=null?_e(ge):w.add(ge):Q!==void 0&&w.has(ge)?_e(ge):N.protectedKeys[ge]=!0}N.prevProp=A,N.prevResolvedValues=ue,N.isActive&&(k={...k,...ue}),i&&t.blockInitialAnimation&&(I=!1),I&&(!(W&&X)||ee)&&y.push(...ce.map(ge=>({animation:ge,options:{type:E}})))}if(w.size){const x={};w.forEach(E=>{const N=t.getBaseTarget(E),A=t.getValue(E);A&&(A.liveStyle=!0),x[E]=N??null}),y.push({animation:x})}let b=!!y.length;return i&&(m.initial===!1||m.initial===m.animate)&&!t.manuallyAnimateOnMount&&(b=!1),i=!1,b?e(y):Promise.resolve()}function d(h,m){var g;if(r[h].isActive===m)return Promise.resolve();(g=t.variantChildren)===null||g===void 0||g.forEach(w=>{var k;return(k=w.animationState)===null||k===void 0?void 0:k.setActive(h,m)}),r[h].isActive=m;const y=c(h);for(const w in r)r[w].protectedKeys={};return y}return{animateChanges:c,setActive:d,setAnimateFunction:l,getState:()=>r,reset:()=>{r=qy(),i=!0}}}function PO(t,e){return typeof e=="string"?e!==t:Array.isArray(e)?!$w(e,t):!1}function Hr(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function qy(){return{animate:Hr(!0),whileInView:Hr(),whileHover:Hr(),whileTap:Hr(),whileDrag:Hr(),whileFocus:Hr(),exit:Hr()}}class Ar{constructor(e){this.isMounted=!1,this.node=e}update(){}}class AO extends Ar{constructor(e){super(e),e.animationState||(e.animationState=RO(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();Hl(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:e}=this.node.getProps(),{animate:r}=this.node.prevProps||{};e!==r&&this.updateAnimationControlsSubscription()}unmount(){var e;this.node.animationState.reset(),(e=this.unmountControls)===null||e===void 0||e.call(this)}}let OO=0;class NO extends Ar{constructor(){super(...arguments),this.id=OO++}update(){if(!this.node.presenceContext)return;const{isPresent:e,onExitComplete:r}=this.node.presenceContext,{isPresent:i}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===i)return;const a=this.node.animationState.setActive("exit",!e);r&&!e&&a.then(()=>r(this.id))}mount(){const{register:e}=this.node.presenceContext||{};e&&(this.unmount=e(this.id))}unmount(){}}const DO={animation:{Feature:AO},exit:{Feature:NO}};function To(t,e,r,i={passive:!0}){return t.addEventListener(e,r,i),()=>t.removeEventListener(e,r)}function zo(t){return{point:{x:t.pageX,y:t.pageY}}}const LO=t=>e=>Xf(e)&&t(e,zo(e));function yo(t,e,r,i){return To(t,e,LO(r),i)}const Hy=(t,e)=>Math.abs(t-e);function jO(t,e){const r=Hy(t.x,e.x),i=Hy(t.y,e.y);return Math.sqrt(r**2+i**2)}class Ox{constructor(e,r,{transformPagePoint:i,contextWindow:a,dragSnapToOrigin:l=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const y=fd(this.lastMoveEventInfo,this.history),w=this.startEvent!==null,k=jO(y.offset,{x:0,y:0})>=3;if(!w&&!k)return;const{point:_}=y,{timestamp:b}=ht;this.history.push({..._,timestamp:b});const{onStart:x,onMove:E}=this.handlers;w||(x&&x(this.lastMoveEvent,y),this.startEvent=this.lastMoveEvent),E&&E(this.lastMoveEvent,y)},this.handlePointerMove=(y,w)=>{this.lastMoveEvent=y,this.lastMoveEventInfo=dd(w,this.transformPagePoint),Ue.update(this.updatePoint,!0)},this.handlePointerUp=(y,w)=>{this.end();const{onEnd:k,onSessionEnd:_,resumeAnimation:b}=this.handlers;if(this.dragSnapToOrigin&&b&&b(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const x=fd(y.type==="pointercancel"?this.lastMoveEventInfo:dd(w,this.transformPagePoint),this.history);this.startEvent&&k&&k(y,x),_&&_(y,x)},!Xf(e))return;this.dragSnapToOrigin=l,this.handlers=r,this.transformPagePoint=i,this.contextWindow=a||window;const c=zo(e),d=dd(c,this.transformPagePoint),{point:h}=d,{timestamp:m}=ht;this.history=[{...h,timestamp:m}];const{onSessionStart:g}=r;g&&g(e,fd(d,this.history)),this.removeListeners=Uo(yo(this.contextWindow,"pointermove",this.handlePointerMove),yo(this.contextWindow,"pointerup",this.handlePointerUp),yo(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),_r(this.updatePoint)}}function dd(t,e){return e?{point:e(t.point)}:t}function Wy(t,e){return{x:t.x-e.x,y:t.y-e.y}}function fd({point:t},e){return{point:t,delta:Wy(t,Nx(e)),offset:Wy(t,MO(e)),velocity:FO(e,.1)}}function MO(t){return t[0]}function Nx(t){return t[t.length-1]}function FO(t,e){if(t.length<2)return{x:0,y:0};let r=t.length-1,i=null;const a=Nx(t);for(;r>=0&&(i=t[r],!(a.timestamp-i.timestamp>qn(e)));)r--;if(!i)return{x:0,y:0};const l=Hn(a.timestamp-i.timestamp);if(l===0)return{x:0,y:0};const c={x:(a.x-i.x)/l,y:(a.y-i.y)/l};return c.x===1/0&&(c.x=0),c.y===1/0&&(c.y=0),c}const Dx=1e-4,IO=1-Dx,VO=1+Dx,Lx=.01,BO=0-Lx,UO=0+Lx;function Ht(t){return t.max-t.min}function zO(t,e,r){return Math.abs(t-e)<=r}function Ky(t,e,r,i=.5){t.origin=i,t.originPoint=We(e.min,e.max,t.origin),t.scale=Ht(r)/Ht(e),t.translate=We(r.min,r.max,t.origin)-t.originPoint,(t.scale>=IO&&t.scale<=VO||isNaN(t.scale))&&(t.scale=1),(t.translate>=BO&&t.translate<=UO||isNaN(t.translate))&&(t.translate=0)}function vo(t,e,r,i){Ky(t.x,e.x,r.x,i?i.originX:void 0),Ky(t.y,e.y,r.y,i?i.originY:void 0)}function Qy(t,e,r){t.min=r.min+e.min,t.max=t.min+Ht(e)}function $O(t,e,r){Qy(t.x,e.x,r.x),Qy(t.y,e.y,r.y)}function Gy(t,e,r){t.min=e.min-r.min,t.max=t.min+Ht(e)}function wo(t,e,r){Gy(t.x,e.x,r.x),Gy(t.y,e.y,r.y)}function qO(t,{min:e,max:r},i){return e!==void 0&&tr&&(t=i?We(r,t,i.max):Math.min(t,r)),t}function Yy(t,e,r){return{min:e!==void 0?t.min+e:void 0,max:r!==void 0?t.max+r-(t.max-t.min):void 0}}function HO(t,{top:e,left:r,bottom:i,right:a}){return{x:Yy(t.x,r,a),y:Yy(t.y,e,i)}}function Xy(t,e){let r=e.min-t.min,i=e.max-t.max;return e.max-e.mini?r=ai(e.min,e.max-i,t.min):i>a&&(r=ai(t.min,t.max-a,e.min)),Wn(0,1,r)}function QO(t,e){const r={};return e.min!==void 0&&(r.min=e.min-t.min),e.max!==void 0&&(r.max=e.max-t.min),r}const sf=.35;function GO(t=sf){return t===!1?t=0:t===!0&&(t=sf),{x:Jy(t,"left","right"),y:Jy(t,"top","bottom")}}function Jy(t,e,r){return{min:Zy(t,e),max:Zy(t,r)}}function Zy(t,e){return typeof t=="number"?t:t[e]||0}const ev=()=>({translate:0,scale:1,origin:0,originPoint:0}),$s=()=>({x:ev(),y:ev()}),tv=()=>({min:0,max:0}),Je=()=>({x:tv(),y:tv()});function Zt(t){return[t("x"),t("y")]}function jx({top:t,left:e,right:r,bottom:i}){return{x:{min:e,max:r},y:{min:t,max:i}}}function YO({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}function XO(t,e){if(!e)return t;const r=e({x:t.left,y:t.top}),i=e({x:t.right,y:t.bottom});return{top:r.y,left:r.x,bottom:i.y,right:i.x}}function hd(t){return t===void 0||t===1}function of({scale:t,scaleX:e,scaleY:r}){return!hd(t)||!hd(e)||!hd(r)}function Wr(t){return of(t)||Mx(t)||t.z||t.rotate||t.rotateX||t.rotateY||t.skewX||t.skewY}function Mx(t){return nv(t.x)||nv(t.y)}function nv(t){return t&&t!=="0%"}function Dl(t,e,r){const i=t-r,a=e*i;return r+a}function rv(t,e,r,i,a){return a!==void 0&&(t=Dl(t,a,i)),Dl(t,r,i)+e}function af(t,e=0,r=1,i,a){t.min=rv(t.min,e,r,i,a),t.max=rv(t.max,e,r,i,a)}function Fx(t,{x:e,y:r}){af(t.x,e.translate,e.scale,e.originPoint),af(t.y,r.translate,r.scale,r.originPoint)}const sv=.999999999999,iv=1.0000000000001;function JO(t,e,r,i=!1){const a=r.length;if(!a)return;e.x=e.y=1;let l,c;for(let d=0;dsv&&(e.x=1),e.ysv&&(e.y=1)}function qs(t,e){t.min=t.min+e,t.max=t.max+e}function ov(t,e,r,i,a=.5){const l=We(t.min,t.max,a);af(t,e,r,l,i)}function Hs(t,e){ov(t.x,e.x,e.scaleX,e.scale,e.originX),ov(t.y,e.y,e.scaleY,e.scale,e.originY)}function Ix(t,e){return jx(XO(t.getBoundingClientRect(),e))}function ZO(t,e,r){const i=Ix(t,r),{scroll:a}=e;return a&&(qs(i.x,a.offset.x),qs(i.y,a.offset.y)),i}const Vx=({current:t})=>t?t.ownerDocument.defaultView:null,eN=new WeakMap;class tN{constructor(e){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=Je(),this.visualElement=e}start(e,{snapToCursor:r=!1}={}){const{presenceContext:i}=this.visualElement;if(i&&i.isPresent===!1)return;const a=g=>{const{dragSnapToOrigin:y}=this.getProps();y?this.pauseAnimation():this.stopAnimation(),r&&this.snapToCursor(zo(g).point)},l=(g,y)=>{const{drag:w,dragPropagation:k,onDragStart:_}=this.getProps();if(w&&!k&&(this.openDragLock&&this.openDragLock(),this.openDragLock=KP(w),!this.openDragLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Zt(x=>{let E=this.getAxisMotionValue(x).get()||0;if(Tn.test(E)){const{projection:N}=this.visualElement;if(N&&N.layout){const A=N.layout.layoutBox[x];A&&(E=Ht(A)*(parseFloat(E)/100))}}this.originPoint[x]=E}),_&&Ue.postRender(()=>_(g,y)),Yd(this.visualElement,"transform");const{animationState:b}=this.visualElement;b&&b.setActive("whileDrag",!0)},c=(g,y)=>{const{dragPropagation:w,dragDirectionLock:k,onDirectionLock:_,onDrag:b}=this.getProps();if(!w&&!this.openDragLock)return;const{offset:x}=y;if(k&&this.currentDirection===null){this.currentDirection=nN(x),this.currentDirection!==null&&_&&_(this.currentDirection);return}this.updateAxis("x",y.point,x),this.updateAxis("y",y.point,x),this.visualElement.render(),b&&b(g,y)},d=(g,y)=>this.stop(g,y),h=()=>Zt(g=>{var y;return this.getAnimationState(g)==="paused"&&((y=this.getAxisMotionValue(g).animation)===null||y===void 0?void 0:y.play())}),{dragSnapToOrigin:m}=this.getProps();this.panSession=new Ox(e,{onSessionStart:a,onStart:l,onMove:c,onSessionEnd:d,resumeAnimation:h},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:m,contextWindow:Vx(this.visualElement)})}stop(e,r){const i=this.isDragging;if(this.cancel(),!i)return;const{velocity:a}=r;this.startAnimation(a);const{onDragEnd:l}=this.getProps();l&&Ue.postRender(()=>l(e,r))}cancel(){this.isDragging=!1;const{projection:e,animationState:r}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:i}=this.getProps();!i&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),r&&r.setActive("whileDrag",!1)}updateAxis(e,r,i){const{drag:a}=this.getProps();if(!i||!ll(e,a,this.currentDirection))return;const l=this.getAxisMotionValue(e);let c=this.originPoint[e]+i[e];this.constraints&&this.constraints[e]&&(c=qO(c,this.constraints[e],this.elastic[e])),l.set(c)}resolveConstraints(){var e;const{dragConstraints:r,dragElastic:i}=this.getProps(),a=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(e=this.visualElement.projection)===null||e===void 0?void 0:e.layout,l=this.constraints;r&&Us(r)?this.constraints||(this.constraints=this.resolveRefConstraints()):r&&a?this.constraints=HO(a.layoutBox,r):this.constraints=!1,this.elastic=GO(i),l!==this.constraints&&a&&this.constraints&&!this.hasMutatedConstraints&&Zt(c=>{this.constraints!==!1&&this.getAxisMotionValue(c)&&(this.constraints[c]=QO(a.layoutBox[c],this.constraints[c]))})}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:r}=this.getProps();if(!e||!Us(e))return!1;const i=e.current,{projection:a}=this.visualElement;if(!a||!a.layout)return!1;const l=ZO(i,a.root,this.visualElement.getTransformPagePoint());let c=WO(a.layout.layoutBox,l);if(r){const d=r(YO(c));this.hasMutatedConstraints=!!d,d&&(c=jx(d))}return c}startAnimation(e){const{drag:r,dragMomentum:i,dragElastic:a,dragTransition:l,dragSnapToOrigin:c,onDragTransitionEnd:d}=this.getProps(),h=this.constraints||{},m=Zt(g=>{if(!ll(g,r,this.currentDirection))return;let y=h&&h[g]||{};c&&(y={min:0,max:0});const w=a?200:1e6,k=a?40:1e7,_={type:"inertia",velocity:i?e[g]:0,bounceStiffness:w,bounceDamping:k,timeConstant:750,restDelta:1,restSpeed:10,...l,...y};return this.startAxisValueAnimation(g,_)});return Promise.all(m).then(d)}startAxisValueAnimation(e,r){const i=this.getAxisMotionValue(e);return Yd(this.visualElement,e),i.start(uh(e,i,0,r,this.visualElement,!1))}stopAnimation(){Zt(e=>this.getAxisMotionValue(e).stop())}pauseAnimation(){Zt(e=>{var r;return(r=this.getAxisMotionValue(e).animation)===null||r===void 0?void 0:r.pause()})}getAnimationState(e){var r;return(r=this.getAxisMotionValue(e).animation)===null||r===void 0?void 0:r.state}getAxisMotionValue(e){const r=`_drag${e.toUpperCase()}`,i=this.visualElement.getProps(),a=i[r];return a||this.visualElement.getValue(e,(i.initial?i.initial[e]:void 0)||0)}snapToCursor(e){Zt(r=>{const{drag:i}=this.getProps();if(!ll(r,i,this.currentDirection))return;const{projection:a}=this.visualElement,l=this.getAxisMotionValue(r);if(a&&a.layout){const{min:c,max:d}=a.layout.layoutBox[r];l.set(e[r]-We(c,d,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:r}=this.getProps(),{projection:i}=this.visualElement;if(!Us(r)||!i||!this.constraints)return;this.stopAnimation();const a={x:0,y:0};Zt(c=>{const d=this.getAxisMotionValue(c);if(d&&this.constraints!==!1){const h=d.get();a[c]=KO({min:h,max:h},this.constraints[c])}});const{transformTemplate:l}=this.visualElement.getProps();this.visualElement.current.style.transform=l?l({},""):"none",i.root&&i.root.updateScroll(),i.updateLayout(),this.resolveConstraints(),Zt(c=>{if(!ll(c,e,null))return;const d=this.getAxisMotionValue(c),{min:h,max:m}=this.constraints[c];d.set(We(h,m,a[c]))})}addListeners(){if(!this.visualElement.current)return;eN.set(this.visualElement,this);const e=this.visualElement.current,r=yo(e,"pointerdown",h=>{const{drag:m,dragListener:g=!0}=this.getProps();m&&g&&this.start(h)}),i=()=>{const{dragConstraints:h}=this.getProps();Us(h)&&h.current&&(this.constraints=this.resolveRefConstraints())},{projection:a}=this.visualElement,l=a.addEventListener("measure",i);a&&!a.layout&&(a.root&&a.root.updateScroll(),a.updateLayout()),Ue.read(i);const c=To(window,"resize",()=>this.scalePositionWithinConstraints()),d=a.addEventListener("didUpdate",(({delta:h,hasLayoutChanged:m})=>{this.isDragging&&m&&(Zt(g=>{const y=this.getAxisMotionValue(g);y&&(this.originPoint[g]+=h[g].translate,y.set(y.get()+h[g].translate))}),this.visualElement.render())}));return()=>{c(),r(),l(),d&&d()}}getProps(){const e=this.visualElement.getProps(),{drag:r=!1,dragDirectionLock:i=!1,dragPropagation:a=!1,dragConstraints:l=!1,dragElastic:c=sf,dragMomentum:d=!0}=e;return{...e,drag:r,dragDirectionLock:i,dragPropagation:a,dragConstraints:l,dragElastic:c,dragMomentum:d}}}function ll(t,e,r){return(e===!0||e===t)&&(r===null||r===t)}function nN(t,e=10){let r=null;return Math.abs(t.y)>e?r="y":Math.abs(t.x)>e&&(r="x"),r}class rN extends Ar{constructor(e){super(e),this.removeGroupControls=qt,this.removeListeners=qt,this.controls=new tN(e)}mount(){const{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||qt}unmount(){this.removeGroupControls(),this.removeListeners()}}const av=t=>(e,r)=>{t&&Ue.postRender(()=>t(e,r))};class sN extends Ar{constructor(){super(...arguments),this.removePointerDownListener=qt}onPointerDown(e){this.session=new Ox(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Vx(this.node)})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:r,onPan:i,onPanEnd:a}=this.node.getProps();return{onSessionStart:av(e),onStart:av(r),onMove:i,onEnd:(l,c)=>{delete this.session,a&&Ue.postRender(()=>a(l,c))}}}mount(){this.removePointerDownListener=yo(this.node.current,"pointerdown",e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const Sl={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function lv(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const io={correct:(t,e)=>{if(!e.target)return t;if(typeof t=="string")if(me.test(t))t=parseFloat(t);else return t;const r=lv(t,e.target.x),i=lv(t,e.target.y);return`${r}% ${i}%`}},iN={correct:(t,{treeScale:e,projectionDelta:r})=>{const i=t,a=Rr.parse(t);if(a.length>5)return i;const l=Rr.createTransformer(t),c=typeof a[0]!="number"?1:0,d=r.x.scale*e.x,h=r.y.scale*e.y;a[0+c]/=d,a[1+c]/=h;const m=We(d,h,.5);return typeof a[2+c]=="number"&&(a[2+c]/=m),typeof a[3+c]=="number"&&(a[3+c]/=m),l(a)}};class oN extends V.Component{componentDidMount(){const{visualElement:e,layoutGroup:r,switchLayoutGroup:i,layoutId:a}=this.props,{projection:l}=e;TP(aN),l&&(r.group&&r.group.add(l),i&&i.register&&a&&i.register(l),l.root.didUpdate(),l.addEventListener("animationComplete",()=>{this.safeToRemove()}),l.setOptions({...l.options,onExitComplete:()=>this.safeToRemove()})),Sl.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:r,visualElement:i,drag:a,isPresent:l}=this.props,c=i.projection;return c&&(c.isPresent=l,a||e.layoutDependency!==r||r===void 0?c.willUpdate():this.safeToRemove(),e.isPresent!==l&&(l?c.promote():c.relegate()||Ue.postRender(()=>{const d=c.getStack();(!d||!d.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),If.postRender(()=>{!e.currentAnimation&&e.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:e,layoutGroup:r,switchLayoutGroup:i}=this.props,{projection:a}=e;a&&(a.scheduleCheckAfterUnmount(),r&&r.group&&r.group.remove(a),i&&i.deregister&&i.deregister(a))}safeToRemove(){const{safeToRemove:e}=this.props;e&&e()}render(){return null}}function Bx(t){const[e,r]=UR(),i=V.useContext(bw);return S.jsx(oN,{...t,layoutGroup:i,switchLayoutGroup:V.useContext(Aw),isPresent:e,safeToRemove:r})}const aN={borderRadius:{...io,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:io,borderTopRightRadius:io,borderBottomLeftRadius:io,borderBottomRightRadius:io,boxShadow:iN};function lN(t,e,r){const i=bt(t)?t:Co(t);return i.start(uh("",i,e,r)),i.animation}function uN(t){return t instanceof SVGElement&&t.tagName!=="svg"}const cN=(t,e)=>t.depth-e.depth;class dN{constructor(){this.children=[],this.isDirty=!1}add(e){Jf(this.children,e),this.isDirty=!0}remove(e){Zf(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(cN),this.isDirty=!1,this.children.forEach(e)}}function fN(t,e){const r=_n.now(),i=({timestamp:a})=>{const l=a-r;l>=e&&(_r(i),t(l-e))};return Ue.read(i,!0),()=>_r(i)}const Ux=["TopLeft","TopRight","BottomLeft","BottomRight"],hN=Ux.length,uv=t=>typeof t=="string"?parseFloat(t):t,cv=t=>typeof t=="number"||me.test(t);function pN(t,e,r,i,a,l){a?(t.opacity=We(0,r.opacity!==void 0?r.opacity:1,mN(i)),t.opacityExit=We(e.opacity!==void 0?e.opacity:1,0,gN(i))):l&&(t.opacity=We(e.opacity!==void 0?e.opacity:1,r.opacity!==void 0?r.opacity:1,i));for(let c=0;cie?1:r(ai(t,e,i))}function fv(t,e){t.min=e.min,t.max=e.max}function Jt(t,e){fv(t.x,e.x),fv(t.y,e.y)}function hv(t,e){t.translate=e.translate,t.scale=e.scale,t.originPoint=e.originPoint,t.origin=e.origin}function pv(t,e,r,i,a){return t-=e,t=Dl(t,1/r,i),a!==void 0&&(t=Dl(t,1/a,i)),t}function yN(t,e=0,r=1,i=.5,a,l=t,c=t){if(Tn.test(e)&&(e=parseFloat(e),e=We(c.min,c.max,e/100)-c.min),typeof e!="number")return;let d=We(l.min,l.max,i);t===l&&(d-=e),t.min=pv(t.min,e,r,d,a),t.max=pv(t.max,e,r,d,a)}function mv(t,e,[r,i,a],l,c){yN(t,e[r],e[i],e[a],e.scale,l,c)}const vN=["x","scaleX","originX"],wN=["y","scaleY","originY"];function gv(t,e,r,i){mv(t.x,e,vN,r?r.x:void 0,i?i.x:void 0),mv(t.y,e,wN,r?r.y:void 0,i?i.y:void 0)}function yv(t){return t.translate===0&&t.scale===1}function $x(t){return yv(t.x)&&yv(t.y)}function vv(t,e){return t.min===e.min&&t.max===e.max}function xN(t,e){return vv(t.x,e.x)&&vv(t.y,e.y)}function wv(t,e){return Math.round(t.min)===Math.round(e.min)&&Math.round(t.max)===Math.round(e.max)}function qx(t,e){return wv(t.x,e.x)&&wv(t.y,e.y)}function xv(t){return Ht(t.x)/Ht(t.y)}function Sv(t,e){return t.translate===e.translate&&t.scale===e.scale&&t.originPoint===e.originPoint}class SN{constructor(){this.members=[]}add(e){Jf(this.members,e),e.scheduleRender()}remove(e){if(Zf(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){const r=this.members[this.members.length-1];r&&this.promote(r)}}relegate(e){const r=this.members.findIndex(a=>e===a);if(r===0)return!1;let i;for(let a=r;a>=0;a--){const l=this.members[a];if(l.isPresent!==!1){i=l;break}}return i?(this.promote(i),!0):!1}promote(e,r){const i=this.lead;if(e!==i&&(this.prevLead=i,this.lead=e,e.show(),i)){i.instance&&i.scheduleRender(),e.scheduleRender(),e.resumeFrom=i,r&&(e.resumeFrom.preserveOpacity=!0),i.snapshot&&(e.snapshot=i.snapshot,e.snapshot.latestValues=i.animationValues||i.latestValues),e.root&&e.root.isUpdating&&(e.isLayoutDirty=!0);const{crossfade:a}=e.options;a===!1&&i.hide()}}exitAnimationComplete(){this.members.forEach(e=>{const{options:r,resumingFrom:i}=e;r.onExitComplete&&r.onExitComplete(),i&&i.options.onExitComplete&&i.options.onExitComplete()})}scheduleRender(){this.members.forEach(e=>{e.instance&&e.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function bN(t,e,r){let i="";const a=t.x.translate/e.x,l=t.y.translate/e.y,c=(r==null?void 0:r.z)||0;if((a||l||c)&&(i=`translate3d(${a}px, ${l}px, ${c}px) `),(e.x!==1||e.y!==1)&&(i+=`scale(${1/e.x}, ${1/e.y}) `),r){const{transformPerspective:m,rotate:g,rotateX:y,rotateY:w,skewX:k,skewY:_}=r;m&&(i=`perspective(${m}px) ${i}`),g&&(i+=`rotate(${g}deg) `),y&&(i+=`rotateX(${y}deg) `),w&&(i+=`rotateY(${w}deg) `),k&&(i+=`skewX(${k}deg) `),_&&(i+=`skewY(${_}deg) `)}const d=t.x.scale*e.x,h=t.y.scale*e.y;return(d!==1||h!==1)&&(i+=`scale(${d}, ${h})`),i||"none"}const Kr={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0},ho=typeof window<"u"&&window.MotionDebug!==void 0,pd=["","X","Y","Z"],EN={visibility:"hidden"},bv=1e3;let CN=0;function md(t,e,r,i){const{latestValues:a}=e;a[t]&&(r[t]=a[t],e.setStaticValue(t,0),i&&(i[t]=0))}function Hx(t){if(t.hasCheckedOptimisedAppear=!0,t.root===t)return;const{visualElement:e}=t.options;if(!e)return;const r=Zw(e);if(window.MotionHasOptimisedAnimation(r,"transform")){const{layout:a,layoutId:l}=t.options;window.MotionCancelOptimisedAnimation(r,"transform",Ue,!(a||l))}const{parent:i}=t;i&&!i.hasCheckedOptimisedAppear&&Hx(i)}function Wx({attachResizeListener:t,defaultParent:e,measureScroll:r,checkIsScrollRoot:i,resetTransform:a}){return class{constructor(c={},d=e==null?void 0:e()){this.id=CN++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,ho&&(Kr.totalNodes=Kr.resolvedTargetDeltas=Kr.recalculatedProjection=0),this.nodes.forEach(_N),this.nodes.forEach(NN),this.nodes.forEach(DN),this.nodes.forEach(RN),ho&&window.MotionDebug.record(Kr)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=c,this.root=d?d.root||d:this,this.path=d?[...d.path,d]:[],this.parent=d,this.depth=d?d.depth+1:0;for(let h=0;hthis.root.updateBlockedByResize=!1;t(c,()=>{this.root.updateBlockedByResize=!0,y&&y(),y=fN(w,250),Sl.hasAnimatedSinceResize&&(Sl.hasAnimatedSinceResize=!1,this.nodes.forEach(Cv))})}h&&this.root.registerSharedNode(h,this),this.options.animate!==!1&&g&&(h||m)&&this.addEventListener("didUpdate",({delta:y,hasLayoutChanged:w,hasRelativeTargetChanged:k,layout:_})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const b=this.options.transition||g.getDefaultTransition()||IN,{onLayoutAnimationStart:x,onLayoutAnimationComplete:E}=g.getProps(),N=!this.targetLayout||!qx(this.targetLayout,_)||k,A=!w&&k;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||A||w&&(N||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(y,A);const D={...Qf(b,"layout"),onPlay:x,onComplete:E};(g.shouldReduceMotion||this.options.layoutRoot)&&(D.delay=0,D.type=!1),this.startAnimation(D)}else w||Cv(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=_})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const c=this.getStack();c&&c.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,_r(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(LN),this.animationId++)}getTransformTemplate(){const{visualElement:c}=this.options;return c&&c.getProps().transformTemplate}willUpdate(c=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&Hx(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let g=0;g{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure())}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let h=0;h{const B=D/1e3;kv(y.x,c.x,B),kv(y.y,c.y,B),this.setTargetDelta(y),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(wo(w,this.layout.layoutBox,this.relativeParent.layout.layoutBox),MN(this.relativeTarget,this.relativeTargetOrigin,w,B),A&&xN(this.relativeTarget,A)&&(this.isProjectionDirty=!1),A||(A=Je()),Jt(A,this.relativeTarget)),b&&(this.animationValues=g,pN(g,m,this.latestValues,B,N,E)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=B},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(c){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(_r(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Ue.update(()=>{Sl.hasAnimatedSinceResize=!0,this.currentAnimation=lN(0,bv,{...c,onUpdate:d=>{this.mixTargetDelta(d),c.onUpdate&&c.onUpdate(d)},onComplete:()=>{c.onComplete&&c.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const c=this.getStack();c&&c.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(bv),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const c=this.getLead();let{targetWithTransforms:d,target:h,layout:m,latestValues:g}=c;if(!(!d||!h||!m)){if(this!==c&&this.layout&&m&&Kx(this.options.animationType,this.layout.layoutBox,m.layoutBox)){h=this.target||Je();const y=Ht(this.layout.layoutBox.x);h.x.min=c.target.x.min,h.x.max=h.x.min+y;const w=Ht(this.layout.layoutBox.y);h.y.min=c.target.y.min,h.y.max=h.y.min+w}Jt(d,h),Hs(d,g),vo(this.projectionDeltaWithTransform,this.layoutCorrected,d,g)}}registerSharedNode(c,d){this.sharedNodes.has(c)||this.sharedNodes.set(c,new SN),this.sharedNodes.get(c).add(d);const m=d.options.initialPromotionConfig;d.promote({transition:m?m.transition:void 0,preserveFollowOpacity:m&&m.shouldPreserveFollowOpacity?m.shouldPreserveFollowOpacity(d):void 0})}isLead(){const c=this.getStack();return c?c.lead===this:!0}getLead(){var c;const{layoutId:d}=this.options;return d?((c=this.getStack())===null||c===void 0?void 0:c.lead)||this:this}getPrevLead(){var c;const{layoutId:d}=this.options;return d?(c=this.getStack())===null||c===void 0?void 0:c.prevLead:void 0}getStack(){const{layoutId:c}=this.options;if(c)return this.root.sharedNodes.get(c)}promote({needsReset:c,transition:d,preserveFollowOpacity:h}={}){const m=this.getStack();m&&m.promote(this,h),c&&(this.projectionDelta=void 0,this.needsReset=!0),d&&this.setOptions({transition:d})}relegate(){const c=this.getStack();return c?c.relegate(this):!1}resetSkewAndRotation(){const{visualElement:c}=this.options;if(!c)return;let d=!1;const{latestValues:h}=c;if((h.z||h.rotate||h.rotateX||h.rotateY||h.rotateZ||h.skewX||h.skewY)&&(d=!0),!d)return;const m={};h.z&&md("z",c,m,this.animationValues);for(let g=0;g{var d;return(d=c.currentAnimation)===null||d===void 0?void 0:d.stop()}),this.root.nodes.forEach(Ev),this.root.sharedNodes.clear()}}}function kN(t){t.updateLayout()}function TN(t){var e;const r=((e=t.resumeFrom)===null||e===void 0?void 0:e.snapshot)||t.snapshot;if(t.isLead()&&t.layout&&r&&t.hasListeners("didUpdate")){const{layoutBox:i,measuredBox:a}=t.layout,{animationType:l}=t.options,c=r.source!==t.layout.source;l==="size"?Zt(y=>{const w=c?r.measuredBox[y]:r.layoutBox[y],k=Ht(w);w.min=i[y].min,w.max=w.min+k}):Kx(l,r.layoutBox,i)&&Zt(y=>{const w=c?r.measuredBox[y]:r.layoutBox[y],k=Ht(i[y]);w.max=w.min+k,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[y].max=t.relativeTarget[y].min+k)});const d=$s();vo(d,i,r.layoutBox);const h=$s();c?vo(h,t.applyTransform(a,!0),r.measuredBox):vo(h,i,r.layoutBox);const m=!$x(d);let g=!1;if(!t.resumeFrom){const y=t.getClosestProjectingParent();if(y&&!y.resumeFrom){const{snapshot:w,layout:k}=y;if(w&&k){const _=Je();wo(_,r.layoutBox,w.layoutBox);const b=Je();wo(b,i,k.layoutBox),qx(_,b)||(g=!0),y.options.layoutRoot&&(t.relativeTarget=b,t.relativeTargetOrigin=_,t.relativeParent=y)}}}t.notifyListeners("didUpdate",{layout:i,snapshot:r,delta:h,layoutDelta:d,hasLayoutChanged:m,hasRelativeTargetChanged:g})}else if(t.isLead()){const{onExitComplete:i}=t.options;i&&i()}t.options.transition=void 0}function _N(t){ho&&Kr.totalNodes++,t.parent&&(t.isProjecting()||(t.isProjectionDirty=t.parent.isProjectionDirty),t.isSharedProjectionDirty||(t.isSharedProjectionDirty=!!(t.isProjectionDirty||t.parent.isProjectionDirty||t.parent.isSharedProjectionDirty)),t.isTransformDirty||(t.isTransformDirty=t.parent.isTransformDirty))}function RN(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function PN(t){t.clearSnapshot()}function Ev(t){t.clearMeasurements()}function AN(t){t.isLayoutDirty=!1}function ON(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function Cv(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function NN(t){t.resolveTargetDelta()}function DN(t){t.calcProjection()}function LN(t){t.resetSkewAndRotation()}function jN(t){t.removeLeadSnapshot()}function kv(t,e,r){t.translate=We(e.translate,0,r),t.scale=We(e.scale,1,r),t.origin=e.origin,t.originPoint=e.originPoint}function Tv(t,e,r,i){t.min=We(e.min,r.min,i),t.max=We(e.max,r.max,i)}function MN(t,e,r,i){Tv(t.x,e.x,r.x,i),Tv(t.y,e.y,r.y,i)}function FN(t){return t.animationValues&&t.animationValues.opacityExit!==void 0}const IN={duration:.45,ease:[.4,0,.1,1]},_v=t=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),Rv=_v("applewebkit/")&&!_v("chrome/")?Math.round:qt;function Pv(t){t.min=Rv(t.min),t.max=Rv(t.max)}function VN(t){Pv(t.x),Pv(t.y)}function Kx(t,e,r){return t==="position"||t==="preserve-aspect"&&!zO(xv(e),xv(r),.2)}function BN(t){var e;return t!==t.root&&((e=t.scroll)===null||e===void 0?void 0:e.wasRoot)}const UN=Wx({attachResizeListener:(t,e)=>To(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),gd={current:void 0},Qx=Wx({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!gd.current){const t=new UN({});t.mount(window),t.setOptions({layoutScroll:!0}),gd.current=t}return gd.current},resetTransform:(t,e)=>{t.style.transform=e!==void 0?e:"none"},checkIsScrollRoot:t=>window.getComputedStyle(t).position==="fixed"}),zN={pan:{Feature:sN},drag:{Feature:rN,ProjectionNode:Qx,MeasureLayout:Bx}};function Av(t,e,r){const{props:i}=t;t.animationState&&i.whileHover&&t.animationState.setActive("whileHover",r==="Start");const a="onHover"+r,l=i[a];l&&Ue.postRender(()=>l(e,zo(e)))}class $N extends Ar{mount(){const{current:e}=this.node;e&&(this.unmount=zP(e,r=>(Av(this.node,r,"Start"),i=>Av(this.node,i,"End"))))}unmount(){}}class qN extends Ar{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(":focus-visible")}catch{e=!0}!e||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=Uo(To(this.node.current,"focus",()=>this.onFocus()),To(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function Ov(t,e,r){const{props:i}=t;t.animationState&&i.whileTap&&t.animationState.setActive("whileTap",r==="Start");const a="onTap"+(r==="End"?"":r),l=i[a];l&&Ue.postRender(()=>l(e,zo(e)))}class HN extends Ar{mount(){const{current:e}=this.node;e&&(this.unmount=WP(e,r=>(Ov(this.node,r,"Start"),(i,{success:a})=>Ov(this.node,i,a?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const lf=new WeakMap,yd=new WeakMap,WN=t=>{const e=lf.get(t.target);e&&e(t)},KN=t=>{t.forEach(WN)};function QN({root:t,...e}){const r=t||document;yd.has(r)||yd.set(r,{});const i=yd.get(r),a=JSON.stringify(e);return i[a]||(i[a]=new IntersectionObserver(KN,{root:t,...e})),i[a]}function GN(t,e,r){const i=QN(e);return lf.set(t,r),i.observe(t),()=>{lf.delete(t),i.unobserve(t)}}const YN={some:0,all:1};class XN extends Ar{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:e={}}=this.node.getProps(),{root:r,margin:i,amount:a="some",once:l}=e,c={root:r?r.current:void 0,rootMargin:i,threshold:typeof a=="number"?a:YN[a]},d=h=>{const{isIntersecting:m}=h;if(this.isInView===m||(this.isInView=m,l&&!m&&this.hasEnteredView))return;m&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",m);const{onViewportEnter:g,onViewportLeave:y}=this.node.getProps(),w=m?g:y;w&&w(h)};return GN(this.node.current,c,d)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:e,prevProps:r}=this.node;["amount","margin","root"].some(JN(e,r))&&this.startObserver()}unmount(){}}function JN({viewport:t={}},{viewport:e={}}={}){return r=>t[r]!==e[r]}const ZN={inView:{Feature:XN},tap:{Feature:HN},focus:{Feature:qN},hover:{Feature:$N}},e2={layout:{ProjectionNode:Qx,MeasureLayout:Bx}},uf={current:null},Gx={current:!1};function t2(){if(Gx.current=!0,!!Df)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>uf.current=t.matches;t.addListener(e),e()}else uf.current=!1}const n2=[...xx,St,Rr],r2=t=>n2.find(wx(t)),Nv=new WeakMap;function s2(t,e,r){for(const i in e){const a=e[i],l=r[i];if(bt(a))t.addValue(i,a);else if(bt(l))t.addValue(i,Co(a,{owner:t}));else if(l!==a)if(t.hasValue(i)){const c=t.getValue(i);c.liveStyle===!0?c.jump(a):c.hasAnimated||c.set(a)}else{const c=t.getStaticValue(i);t.addValue(i,Co(c!==void 0?c:a,{owner:t}))}}for(const i in r)e[i]===void 0&&t.removeValue(i);return e}const Dv=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class i2{scrapeMotionValuesFromProps(e,r,i){return{}}constructor({parent:e,props:r,presenceContext:i,reducedMotionConfig:a,blockInitialAnimation:l,visualState:c},d={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=oh,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const k=_n.now();this.renderScheduledAtthis.bindToMotionValue(i,r)),Gx.current||t2(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:uf.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){Nv.delete(this.current),this.projection&&this.projection.unmount(),_r(this.notifyUpdate),_r(this.render),this.valueSubscriptions.forEach(e=>e()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const e in this.events)this.events[e].clear();for(const e in this.features){const r=this.features[e];r&&(r.unmount(),r.isMounted=!1)}this.current=null}bindToMotionValue(e,r){this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)();const i=fs.has(e),a=r.on("change",d=>{this.latestValues[e]=d,this.props.onUpdate&&Ue.preRender(this.notifyUpdate),i&&this.projection&&(this.projection.isTransformDirty=!0)}),l=r.on("renderRequest",this.scheduleRender);let c;window.MotionCheckAppearSync&&(c=window.MotionCheckAppearSync(this,e,r)),this.valueSubscriptions.set(e,()=>{a(),l(),c&&c(),r.owner&&r.stop()})}sortNodePosition(e){return!this.current||!this.sortInstanceNodePosition||this.type!==e.type?0:this.sortInstanceNodePosition(this.current,e.current)}updateFeatures(){let e="animation";for(e in li){const r=li[e];if(!r)continue;const{isEnabled:i,Feature:a}=r;if(!this.features[e]&&a&&i(this.props)&&(this.features[e]=new a(this)),this.features[e]){const l=this.features[e];l.isMounted?l.update():(l.mount(),l.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Je()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,r){this.latestValues[e]=r}update(e,r){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=r;for(let i=0;ir.variantChildren.delete(e)}addValue(e,r){const i=this.values.get(e);r!==i&&(i&&this.removeValue(e),this.bindToMotionValue(e,r),this.values.set(e,r),this.latestValues[e]=r.get())}removeValue(e){this.values.delete(e);const r=this.valueSubscriptions.get(e);r&&(r(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,r){if(this.props.values&&this.props.values[e])return this.props.values[e];let i=this.values.get(e);return i===void 0&&r!==void 0&&(i=Co(r===null?void 0:r,{owner:this}),this.addValue(e,i)),i}readValue(e,r){var i;let a=this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:(i=this.getBaseTargetFromProps(this.props,e))!==null&&i!==void 0?i:this.readValueFromInstance(this.current,e,this.options);return a!=null&&(typeof a=="string"&&(yx(a)||lx(a))?a=parseFloat(a):!r2(a)&&Rr.test(r)&&(a=px(e,r)),this.setBaseTarget(e,bt(a)?a.get():a)),bt(a)?a.get():a}setBaseTarget(e,r){this.baseTarget[e]=r}getBaseTarget(e){var r;const{initial:i}=this.props;let a;if(typeof i=="string"||typeof i=="object"){const c=Bf(this.props,i,(r=this.presenceContext)===null||r===void 0?void 0:r.custom);c&&(a=c[e])}if(i&&a!==void 0)return a;const l=this.getBaseTargetFromProps(this.props,e);return l!==void 0&&!bt(l)?l:this.initialValues[e]!==void 0&&a===void 0?void 0:this.baseTarget[e]}on(e,r){return this.events[e]||(this.events[e]=new eh),this.events[e].add(r)}notify(e,...r){this.events[e]&&this.events[e].notify(...r)}}class Yx extends i2{constructor(){super(...arguments),this.KeyframeResolver=Sx}sortInstanceNodePosition(e,r){return e.compareDocumentPosition(r)&2?1:-1}getBaseTargetFromProps(e,r){return e.style?e.style[r]:void 0}removeValueFromRenderState(e,{vars:r,style:i}){delete r[e],delete i[e]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:e}=this.props;bt(e)&&(this.childSubscription=e.on("change",r=>{this.current&&(this.current.textContent=`${r}`)}))}}function o2(t){return window.getComputedStyle(t)}class a2 extends Yx{constructor(){super(...arguments),this.type="html",this.renderInstance=Fw}readValueFromInstance(e,r){if(fs.has(r)){const i=ih(r);return i&&i.default||0}else{const i=o2(e),a=(Lw(r)?i.getPropertyValue(r):i[r])||0;return typeof a=="string"?a.trim():a}}measureInstanceViewportBox(e,{transformPagePoint:r}){return Ix(e,r)}build(e,r,i){$f(e,r,i.transformTemplate)}scrapeMotionValuesFromProps(e,r,i){return Kf(e,r,i)}}class l2 extends Yx{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Je}getBaseTargetFromProps(e,r){return e[r]}readValueFromInstance(e,r){if(fs.has(r)){const i=ih(r);return i&&i.default||0}return r=Iw.has(r)?r:Ff(r),e.getAttribute(r)}scrapeMotionValuesFromProps(e,r,i){return Uw(e,r,i)}build(e,r,i){qf(e,r,this.isSVGTag,i.transformTemplate)}renderInstance(e,r,i,a){Vw(e,r,i,a)}mount(e){this.isSVGTag=Wf(e.tagName),super.mount(e)}}const u2=(t,e)=>Vf(t)?new l2(e):new a2(e,{allowProjection:t!==V.Fragment}),c2=jP({...DO,...ZN,...zN,...e2},u2),Bn=YR(c2),d2=[{code:"01",name:"Programas a medida",href:"#servicios"},{code:"02",name:"Diseño e impresión 3D",href:"#servicios"},{code:"03",name:"Servicio de Streaming",href:"#servicios"},{code:"04",name:"Venta y reparación",href:"#servicios"}];function f2({bgImage:t}){return S.jsxs("section",{id:"top",className:"relative min-h-screen flex flex-col justify-between overflow-hidden bg-[#0A0A0B]",children:[S.jsxs("div",{className:"absolute inset-0",children:[S.jsx("img",{src:t,alt:"Hardware de alto rendimiento",className:"w-full h-full object-cover opacity-60"}),S.jsx("div",{className:"absolute inset-0 bg-gradient-to-b from-[#0A0A0B]/70 via-[#0A0A0B]/40 to-[#0A0A0B]"}),S.jsx("div",{className:"absolute inset-0 bg-gradient-to-r from-[#0A0A0B] via-transparent to-transparent"})]}),S.jsx("div",{className:"absolute inset-0 opacity-[0.07] pointer-events-none",style:{backgroundImage:"linear-gradient(to right, #fff 1px, transparent 1px), linear-gradient(to bottom, #fff 1px, transparent 1px)",backgroundSize:"80px 80px"}}),S.jsxs("div",{className:"relative z-10 mx-auto max-w-[1600px] w-full px-6 md:px-12 pt-32 pb-12 flex-1 flex flex-col justify-center",children:[S.jsxs(Bn.div,{initial:{opacity:0,x:-20},animate:{opacity:1,x:0},transition:{duration:.6},className:"flex items-center gap-3 mb-8",children:[S.jsx("span",{className:"h-px w-12 bg-[#FF8C00]"}),S.jsx("span",{className:"font-mono text-[10px] tracking-[0.3em] text-[#FF8C00]",children:"SERVICIOS INFORMÁTICOS · URUGUAY"})]}),S.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-12 gap-8 items-end",children:[S.jsx("div",{className:"lg:col-span-9",children:S.jsxs("h1",{className:"font-extrabold tracking-tighter leading-[0.85] text-white text-[18vw] md:text-[14vw] lg:text-[11vw]",children:[S.jsxs(Bn.span,{initial:{opacity:0,y:30},animate:{opacity:1,y:0},transition:{duration:.7,delay:.1},className:"block",children:["F1",S.jsx("span",{className:"text-[#E61919]",children:"."}),"com"]}),S.jsxs(Bn.span,{initial:{opacity:0,y:30},animate:{opacity:1,y:0},transition:{duration:.7,delay:.25},className:"block text-white/90",children:[S.jsx("span",{className:"text-[#FF8C00]",children:"."}),"uy"]})]})}),S.jsx(Bn.div,{initial:{opacity:0},animate:{opacity:1},transition:{duration:.8,delay:.5},className:"lg:col-span-3 lg:pb-6",children:S.jsx("p",{className:"text-white/70 text-base md:text-lg leading-relaxed max-w-xs",children:"Ingeniería de software, fabricación 3D, streaming y hardware de alto rendimiento. Precisión técnica con espíritu de velocidad."})})]}),S.jsxs(Bn.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.7,delay:.6},className:"mt-12 md:mt-16",children:[S.jsxs("div",{className:"flex items-center justify-between mb-3 font-mono text-[10px] tracking-widest text-white/40",children:[S.jsx("span",{children:"VELOCIDAD DE SERVICIO"}),S.jsx("span",{className:"text-[#FF8C00]",children:"100%"})]}),S.jsx("div",{className:"h-px w-full bg-white/10 mb-10 overflow-hidden",children:S.jsx(Bn.div,{initial:{width:0},animate:{width:"100%"},transition:{duration:1.4,delay:.8},className:"h-full bg-gradient-to-r from-[#E61919] to-[#FF8C00]"})}),S.jsx("div",{className:"grid grid-cols-2 lg:grid-cols-4 border-l border-white/10",children:d2.map(e=>S.jsxs("a",{href:e.href,className:"group relative px-4 py-4 border-r border-t border-white/10 hover:bg-white/5 transition-colors",children:[S.jsx("span",{className:"font-mono text-[10px] text-white/30",children:e.code}),S.jsx("p",{className:"mt-1 text-sm md:text-base font-semibold text-white group-hover:text-[#FF8C00] transition-colors leading-tight",children:e.name}),S.jsx("span",{className:"absolute bottom-0 left-0 h-0.5 w-0 bg-[#E61919] group-hover:w-full transition-all duration-300"})]},e.code))})]})]}),S.jsxs("a",{href:"#servicios",className:"relative z-10 mx-auto max-w-[1600px] w-full px-6 md:px-12 pb-8 flex items-center gap-2 text-white/40 hover:text-[#FF8C00] transition-colors",children:[S.jsx(xb,{size:14,className:"animate-bounce"}),S.jsx("span",{className:"font-mono text-[10px] tracking-widest",children:"SCROLL"})]})]})}const h2=[{code:"01",name:"Programas a Medida",icon:bb,desc:"Desarrollo de software personalizado: aplicaciones web, de escritorio y sistemas de gestión diseñados exactamente para tu flujo de trabajo.",specs:["Web · Desktop · API","Stack moderno","Mantenimiento continuo"]},{code:"02",name:"Diseño e Impresión 3D",icon:gb,desc:"Modelado CAD y fabricación aditiva con filamento de ingeniería. Prototipos, repuestos y piezas funcionales con tolerancia precisa.",specs:["Modelado CAD","Filamento técnico","Baja y media resolución"]},{code:"03",name:"Servicio de Streaming",icon:Ab,desc:"Producción y transmisión en vivo: multimedios, eventos deportivos y corporativos con calidad broadcast y baja latencia.",specs:["Multi-cámara","Encoding pro","Plataforma propia"]},{code:"04",name:"Venta y Reparación",icon:Cb,desc:"Equipos a medida, upgrades y diagnóstico técnico. Componentes seleccionados y reparación con garantía para gaming y workstation.",specs:["Rigs a medida","Diagnóstico","Garantía real"]}];function p2(){return S.jsx("section",{id:"servicios",className:"relative bg-[#0A0A0B] py-24 md:py-32 border-t border-white/10",children:S.jsxs("div",{className:"mx-auto max-w-[1600px] px-6 md:px-12",children:[S.jsxs("div",{className:"flex flex-col md:flex-row md:items-end justify-between gap-6 mb-16",children:[S.jsxs("div",{children:[S.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[S.jsx("span",{className:"h-px w-8 bg-[#FF8C00]"}),S.jsx("span",{className:"font-mono text-[10px] tracking-[0.3em] text-[#FF8C00]",children:"MOTOR DE SERVICIOS"})]}),S.jsxs("h2",{className:"text-4xl md:text-6xl font-extrabold tracking-tighter text-white leading-[0.9]",children:["Cuatro disciplinas.",S.jsx("br",{}),S.jsx("span",{className:"text-white/40",children:"Un solo motor."})]})]}),S.jsx("p",{className:"text-white/60 text-base md:text-lg max-w-md leading-relaxed",children:"Desde el código hasta el hardware físico. Cada servicio es un módulo calibrado del mismo equipo técnico."})]}),S.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 border-l border-t border-white/10",children:h2.map((t,e)=>{const r=t.icon;return S.jsxs(Bn.div,{initial:{opacity:0,y:30},whileInView:{opacity:1,y:0},viewport:{once:!0,margin:"-80px"},transition:{duration:.5,delay:e*.08},className:"group relative border-r border-b border-white/10 p-6 md:p-8 min-h-[420px] flex flex-col overflow-hidden hover:bg-white/[0.03] transition-colors",children:[S.jsx("div",{className:"absolute inset-0 opacity-0 group-hover:opacity-100 transition-opacity duration-500 pointer-events-none",children:S.jsx("div",{className:"absolute inset-0",style:{backgroundImage:"linear-gradient(to right, rgba(255,140,0,0.04) 1px, transparent 1px), linear-gradient(to bottom, rgba(255,140,0,0.04) 1px, transparent 1px)",backgroundSize:"24px 24px"}})}),S.jsxs("div",{className:"relative flex items-start justify-between mb-8",children:[S.jsx(r,{size:28,className:"text-[#FF8C00] group-hover:scale-110 transition-transform"}),S.jsx("span",{className:"font-mono text-[10px] text-white/30",children:t.code})]}),S.jsxs("div",{className:"relative mt-auto",children:[S.jsx("h3",{className:"text-2xl font-bold tracking-tight text-white mb-3 leading-tight",children:t.name}),S.jsx("p",{className:"text-white/55 text-sm leading-relaxed mb-6",children:t.desc}),S.jsx("ul",{className:"space-y-1.5",children:t.specs.map(i=>S.jsxs("li",{className:"flex items-center gap-2 font-mono text-[10px] tracking-wider text-white/40",children:[S.jsx("span",{className:"h-1 w-1 bg-[#E61919]"}),i]},i))})]})]},t.code)})})]})})}const Lv=[{name:"Workstation Render",tag:"CAD · 3D",score:"98",img:null},{name:"Rig Streaming Pro",tag:"MULTI-CAM",score:"94",img:null}];function m2({images:t}){const e=[{...Lv[0],img:t.gpu},{...Lv[1],img:t.server}];return S.jsx("section",{id:"hardware",className:"relative bg-[#0A0A0B] py-24 md:py-32 border-t border-white/10",children:S.jsxs("div",{className:"mx-auto max-w-[1600px] px-6 md:px-12",children:[S.jsxs("div",{className:"flex flex-col md:flex-row md:items-end justify-between gap-6 mb-16",children:[S.jsxs("div",{children:[S.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[S.jsx("span",{className:"h-px w-8 bg-[#FF8C00]"}),S.jsx("span",{className:"font-mono text-[10px] tracking-[0.3em] text-[#FF8C00]",children:"LABORATORIO DE HARDWARE"})]}),S.jsxs("h2",{className:"text-4xl md:text-6xl font-extrabold tracking-tighter text-white leading-[0.9]",children:["Máquinas que ",S.jsx("span",{className:"text-[#E61919]",children:"rinden"}),"."]})]}),S.jsxs("a",{href:"#contacto",className:"inline-flex items-center gap-2 self-start px-5 h-11 border border-white/20 text-white text-[11px] font-mono tracking-[0.2em] hover:border-[#FF8C00] hover:text-[#FF8C00] transition-colors",children:[S.jsx(Mb,{size:14}),"RESERVAR DIAGNÓSTICO"]})]}),S.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-px bg-white/10",children:e.map((r,i)=>S.jsxs(Bn.div,{initial:{opacity:0,y:30},whileInView:{opacity:1,y:0},viewport:{once:!0,margin:"-80px"},transition:{duration:.5,delay:i*.1},className:"group relative bg-[#0A0A0B] overflow-hidden",children:[S.jsxs("div",{className:"relative aspect-[4/3] overflow-hidden",children:[S.jsx("img",{src:r.img,alt:r.name,className:"w-full h-full object-cover opacity-70 group-hover:opacity-90 group-hover:scale-105 transition-all duration-700"}),S.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-[#0A0A0B] via-transparent to-transparent"}),S.jsx("span",{className:"absolute top-4 left-4 w-4 h-4 border-l border-t border-[#FF8C00]"}),S.jsx("span",{className:"absolute top-4 right-4 w-4 h-4 border-r border-t border-[#FF8C00]"}),S.jsx("span",{className:"absolute bottom-4 left-4 w-4 h-4 border-l border-b border-[#FF8C00]"}),S.jsx("span",{className:"absolute bottom-4 right-4 w-4 h-4 border-r border-b border-[#FF8C00]"}),S.jsxs("div",{className:"absolute top-4 right-10 text-right",children:[S.jsx("span",{className:"font-mono text-[9px] text-white/50 block tracking-widest",children:"SCORE"}),S.jsx("span",{className:"font-extrabold text-2xl text-[#FF8C00] leading-none",children:r.score})]})]}),S.jsxs("div",{className:"p-6 md:p-8 flex items-end justify-between",children:[S.jsxs("div",{children:[S.jsx("span",{className:"font-mono text-[10px] tracking-widest text-white/40",children:r.tag}),S.jsx("h3",{className:"text-2xl font-bold text-white mt-1",children:r.name})]}),S.jsxs("button",{className:"inline-flex items-center gap-2 px-4 h-10 bg-[#E61919] text-white text-[11px] font-mono tracking-[0.2em] hover:bg-[#FF8C00] transition-colors",onClick:()=>window.location.hash="#contacto",children:[S.jsx(Rb,{size:14}),"ARMAR"]})]})]},r.name))})]})})}const jv=["Programas a medida","Diseño e impresión 3D","Servicio de Streaming","Venta y reparación de computadoras","Otro"];function g2(){const[t,e]=V.useState({name:"",email:"",service:jv[0],message:""}),[r,i]=V.useState(!1),[a,l]=V.useState(!1),[c,d]=V.useState(""),h=g=>y=>e(w=>({...w,[g]:y.target.value})),m=async g=>{g.preventDefault(),i(!0),d("");try{await Bs.entities.Lead.create(t),l(!0)}catch{d("No se pudo enviar. Intenta de nuevo.")}finally{i(!1)}};return S.jsx("section",{id:"contacto",className:"relative bg-[#0A0A0B] py-24 md:py-32 border-t border-white/10",children:S.jsx("div",{className:"mx-auto max-w-[1600px] px-6 md:px-12",children:S.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-12 gap-12",children:[S.jsxs("div",{className:"lg:col-span-5",children:[S.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[S.jsx("span",{className:"h-px w-8 bg-[#FF8C00]"}),S.jsx("span",{className:"font-mono text-[10px] tracking-[0.3em] text-[#FF8C00]",children:"DATA STREAM · CONTACTO"})]}),S.jsxs("h2",{className:"text-4xl md:text-6xl font-extrabold tracking-tighter text-white leading-[0.9]",children:["Iniciemos",S.jsx("br",{}),S.jsx("span",{className:"text-[#E61919]",children:"tu proyecto"}),"."]}),S.jsx("p",{className:"mt-6 text-white/60 text-base md:text-lg leading-relaxed max-w-md",children:"Contanos qué necesitás. Respondemos en horario hábil con un diagnóstico técnico inicial sin costo."}),S.jsxs("div",{className:"mt-10 space-y-3 font-mono text-xs text-white/50",children:[S.jsxs("p",{className:"flex items-center gap-3",children:[S.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-[#FF8C00] animate-pulse"}),"Durazno, Uruguay"]}),S.jsxs("p",{className:"flex items-center gap-3",children:[S.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-[#E61919]"}),"Respuesta promedio: ","<"," 24h"]})]})]}),S.jsx("div",{className:"lg:col-span-7",children:S.jsxs("div",{className:"border border-white/15 bg-black/40 backdrop-blur-sm",children:[S.jsxs("div",{className:"flex items-center gap-2 px-4 h-10 border-b border-white/10 bg-white/[0.02]",children:[S.jsx(Lb,{size:14,className:"text-[#FF8C00]"}),S.jsx("span",{className:"font-mono text-[10px] tracking-widest text-white/50",children:"F1@CLIENTE:~/nuevo-proyecto$"}),S.jsx("span",{className:"ml-auto h-2 w-2 bg-[#FF8C00] animate-pulse"})]}),a?S.jsxs(Bn.div,{initial:{opacity:0},animate:{opacity:1},className:"p-10 md:p-14 flex flex-col items-center text-center",children:[S.jsx("div",{className:"h-14 w-14 rounded-full border-2 border-[#FF8C00] flex items-center justify-center mb-6",children:S.jsx(vb,{size:26,className:"text-[#FF8C00]"})}),S.jsx("h3",{className:"text-2xl font-bold text-white mb-2",children:"Transmisión recibida"}),S.jsx("p",{className:"text-white/50 font-mono text-sm",children:"Tu solicitud fue registrada. Te contactaremos a la brevedad."})]}):S.jsxs("form",{onSubmit:m,className:"p-6 md:p-10 space-y-6",children:[S.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[S.jsx(ul,{label:"NOMBRE",children:S.jsx("input",{required:!0,value:t.name,onChange:h("name"),placeholder:"tu_nombre",className:"terminal-input"})}),S.jsx(ul,{label:"EMAIL",children:S.jsx("input",{required:!0,type:"email",value:t.email,onChange:h("email"),placeholder:"tu@email.com",className:"terminal-input"})})]}),S.jsx(ul,{label:"SERVICIO",children:S.jsx("div",{className:"flex flex-wrap gap-2",children:jv.map(g=>S.jsx("button",{type:"button",onClick:()=>e(y=>({...y,service:g})),className:`px-3 h-8 font-mono text-[11px] tracking-wide border transition-colors ${t.service===g?"bg-[#E61919] border-[#E61919] text-white":"border-white/15 text-white/50 hover:border-[#FF8C00] hover:text-[#FF8C00]"}`,children:g},g))})}),S.jsx(ul,{label:"MENSAJE",children:S.jsx("textarea",{required:!0,value:t.message,onChange:h("message"),rows:5,placeholder:"// describí tu proyecto...",className:"terminal-input resize-none"})}),c&&S.jsx("p",{className:"font-mono text-xs text-[#E61919]",children:c}),S.jsxs("button",{type:"submit",disabled:r,className:"w-full md:w-auto inline-flex items-center justify-center gap-2 px-8 h-12 bg-[#E61919] text-white font-mono text-[11px] tracking-[0.2em] hover:bg-[#FF8C00] transition-colors disabled:opacity-50",children:[r?"TRANSMITIENDO...":"ENVIAR SOLICITUD",!r&&S.jsx(Nb,{size:14})]})]})]})})]})})})}function ul({label:t,children:e}){return S.jsxs("label",{className:"block",children:[S.jsx("span",{className:"block mb-2 font-mono text-[10px] tracking-widest text-white/40",children:t}),e]})}const y2="https://media.base44.com/images/public/6a5838ef1d73c761566f80a6/0082adb20_LOGOCOMPLETOCURVAS.svg";function v2(){const[t,e]=V.useState("");return V.useEffect(()=>{const r=()=>e(new Date().toLocaleTimeString("es-UY",{hour:"2-digit",minute:"2-digit",second:"2-digit"}));r();const i=setInterval(r,1e3);return()=>clearInterval(i)},[]),S.jsxs("footer",{className:"bg-[#0A0A0B] border-t border-white/10",children:[S.jsxs("div",{className:"mx-auto max-w-[1600px] px-6 md:px-12 py-6 border-b border-white/10 flex flex-wrap items-center gap-6 md:gap-12",children:[S.jsxs("div",{className:"flex items-center gap-3",children:[S.jsxs("span",{className:"relative flex h-2.5 w-2.5",children:[S.jsx("span",{className:"absolute inline-flex h-full w-full rounded-full bg-[#FF8C00] opacity-60 animate-ping"}),S.jsx("span",{className:"relative inline-flex rounded-full h-2.5 w-2.5 bg-[#FF8C00]"})]}),S.jsx("span",{className:"font-mono text-[10px] tracking-widest text-white/50",children:"SISTEMA EN LÍNEA · 99.9% UPTIME"})]}),S.jsxs("div",{className:"font-mono text-[10px] tracking-widest text-white/50",children:["DURAZNO · UY · ",t]}),S.jsx("div",{className:"font-mono text-[10px] tracking-widest text-white/50 ml-auto hidden md:block",children:"LAT: -32.4933 · LON: -55.9667"})]}),S.jsxs("div",{className:"mx-auto max-w-[1600px] px-6 md:px-12 py-12 grid grid-cols-1 md:grid-cols-3 gap-8",children:[S.jsxs("div",{children:[S.jsx("div",{className:"flex items-center gap-2 mb-4",children:S.jsx("img",{src:y2,alt:"F1.com.uy",className:"h-9 w-auto"})}),S.jsx("p",{className:"text-white/50 text-sm leading-relaxed max-w-xs",children:"Servicios informáticos integrales. Software, 3D, streaming y hardware de alto rendimiento."})]}),S.jsxs("div",{children:[S.jsx("h4",{className:"font-mono text-[10px] tracking-widest text-[#FF8C00] mb-4",children:"SERVICIOS"}),S.jsxs("ul",{className:"space-y-2 text-sm text-white/60",children:[S.jsx("li",{children:S.jsx("a",{href:"#servicios",className:"hover:text-white transition-colors",children:"Programas a medida"})}),S.jsx("li",{children:S.jsx("a",{href:"#servicios",className:"hover:text-white transition-colors",children:"Diseño e impresión 3D"})}),S.jsx("li",{children:S.jsx("a",{href:"#servicios",className:"hover:text-white transition-colors",children:"Servicio de Streaming"})}),S.jsx("li",{children:S.jsx("a",{href:"#hardware",className:"hover:text-white transition-colors",children:"Venta y reparación"})})]})]}),S.jsxs("div",{children:[S.jsx("h4",{className:"font-mono text-[10px] tracking-widest text-[#FF8C00] mb-4",children:"CONTACTO"}),S.jsxs("ul",{className:"space-y-2 text-sm text-white/60",children:[S.jsx("li",{children:S.jsx("a",{href:"#contacto",className:"hover:text-white transition-colors",children:"Iniciar proyecto"})}),S.jsx("li",{children:S.jsx("a",{href:"https://wa.me/59800000000",target:"_blank",rel:"noreferrer",className:"hover:text-white transition-colors",children:"WhatsApp: @f1.com.uy"})}),S.jsx("li",{children:S.jsx("a",{href:"mailto:f1@f1.com.uy",className:"hover:text-white transition-colors",children:"f1@f1.com.uy"})})]})]})]}),S.jsx("div",{className:"border-t border-white/10",children:S.jsxs("div",{className:"mx-auto max-w-[1600px] px-6 md:px-12 py-5 flex flex-col md:flex-row items-center justify-between gap-2 font-mono text-[10px] tracking-widest text-white/30",children:[S.jsxs("span",{children:["© ",new Date().getFullYear()," F1.COM.UY · TODOS LOS DERECHOS RESERVADOS"]}),S.jsx("span",{children:"BUILD · NEOS-VELOCITY · v1.0"})]})})]})}const w2="https://media.base44.com/images/public/6a5838ef1d73c761566f80a6/561ba65c8_generated_65d01965.png",x2="https://media.base44.com/images/public/6a5838ef1d73c761566f80a6/7022c5986_generated_694c3053.png",S2="https://media.base44.com/images/public/6a5838ef1d73c761566f80a6/9872042c7_generated_3b112ffa.png",b2="https://media.base44.com/images/public/6a5838ef1d73c761566f80a6/c2c335658_generated_b7c4da39.png";function E2(){return S.jsxs("div",{className:"bg-[#0A0A0B] text-white min-h-screen overflow-x-hidden",children:[S.jsx(VR,{}),S.jsx(f2,{bgImage:w2}),S.jsx(p2,{}),S.jsx(m2,{images:{gpu:x2,server:S2,print:b2}}),S.jsx(g2,{}),S.jsx(v2,{})]})}const C2=()=>{const{isLoadingAuth:t,isLoadingPublicSettings:e,authError:r,navigateToLogin:i}=LR();if(e||t)return S.jsx("div",{className:"fixed inset-0 flex items-center justify-center",children:S.jsx("div",{className:"w-8 h-8 border-4 border-slate-200 border-t-slate-800 rounded-full animate-spin"})});if(r){if(r.type==="user_not_registered")return S.jsx(jR,{});if(r.type==="auth_required")return i(),null}return S.jsxs(ek,{children:[S.jsx(Ld,{path:"/",element:S.jsx(E2,{})}),S.jsx(Ld,{path:"*",element:S.jsx(NR,{})})]})};function k2(){return S.jsx(DR,{children:S.jsxs(tC,{client:pC,children:[S.jsxs(rk,{children:[S.jsx(FR,{}),S.jsx(C2,{})]}),S.jsx(PE,{})]})})}sb.createRoot(document.getElementById("root")).render(S.jsx(k2,{}));