upfynai-code 2.2.0 → 2.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/client/dist/assets/index-BnXuHrpJ.js +523 -0
- package/client/dist/assets/index-BwxNox94.css +1 -0
- package/client/dist/index.html +66 -128
- package/client/dist/llms.txt +40 -0
- package/client/dist/manifest.json +15 -61
- package/client/dist/robots.txt +11 -0
- package/client/dist/sitemap.xml +45 -0
- package/client/dist/sw.js +55 -19
- package/package.json +1 -1
- package/server/cli-ui.js +634 -0
- package/server/cli.js +56 -155
- package/server/relay-client.js +67 -43
- package/server/routes/auth.js +39 -13
|
@@ -0,0 +1,523 @@
|
|
|
1
|
+
function Ip(i,o){for(var c=0;c<o.length;c++){const h=o[c];if(typeof h!="string"&&!Array.isArray(h)){for(const p in h)if(p!=="default"&&!(p in i)){const g=Object.getOwnPropertyDescriptor(h,p);g&&Object.defineProperty(i,p,g.get?g:{enumerable:!0,get:()=>h[p]})}}}return Object.freeze(Object.defineProperty(i,Symbol.toStringTag,{value:"Module"}))}(function(){const o=document.createElement("link").relList;if(o&&o.supports&&o.supports("modulepreload"))return;for(const p of document.querySelectorAll('link[rel="modulepreload"]'))h(p);new MutationObserver(p=>{for(const g of p)if(g.type==="childList")for(const v of g.addedNodes)v.tagName==="LINK"&&v.rel==="modulepreload"&&h(v)}).observe(document,{childList:!0,subtree:!0});function c(p){const g={};return p.integrity&&(g.integrity=p.integrity),p.referrerPolicy&&(g.referrerPolicy=p.referrerPolicy),p.crossOrigin==="use-credentials"?g.credentials="include":p.crossOrigin==="anonymous"?g.credentials="omit":g.credentials="same-origin",g}function h(p){if(p.ep)return;p.ep=!0;const g=c(p);fetch(p.href,g)}})();function cd(i){return i&&i.__esModule&&Object.prototype.hasOwnProperty.call(i,"default")?i.default:i}var wo={exports:{}},rs={},jo={exports:{}},be={};var Mu;function Mp(){if(Mu)return be;Mu=1;var i=Symbol.for("react.element"),o=Symbol.for("react.portal"),c=Symbol.for("react.fragment"),h=Symbol.for("react.strict_mode"),p=Symbol.for("react.profiler"),g=Symbol.for("react.provider"),v=Symbol.for("react.context"),x=Symbol.for("react.forward_ref"),m=Symbol.for("react.suspense"),u=Symbol.for("react.memo"),w=Symbol.for("react.lazy"),b=Symbol.iterator;function T(k){return k===null||typeof k!="object"?null:(k=b&&k[b]||k["@@iterator"],typeof k=="function"?k:null)}var C={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},R=Object.assign,A={};function M(k,L,de){this.props=k,this.context=L,this.refs=A,this.updater=de||C}M.prototype.isReactComponent={},M.prototype.setState=function(k,L){if(typeof k!="object"&&typeof k!="function"&&k!=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,k,L,"setState")},M.prototype.forceUpdate=function(k){this.updater.enqueueForceUpdate(this,k,"forceUpdate")};function H(){}H.prototype=M.prototype;function q(k,L,de){this.props=k,this.context=L,this.refs=A,this.updater=de||C}var W=q.prototype=new H;W.constructor=q,R(W,M.prototype),W.isPureReactComponent=!0;var ne=Array.isArray,ye=Object.prototype.hasOwnProperty,Y={current:null},Re={key:!0,ref:!0,__self:!0,__source:!0};function ue(k,L,de){var fe,we={},je=null,Ie=null;if(L!=null)for(fe in L.ref!==void 0&&(Ie=L.ref),L.key!==void 0&&(je=""+L.key),L)ye.call(L,fe)&&!Re.hasOwnProperty(fe)&&(we[fe]=L[fe]);var Ne=arguments.length-2;if(Ne===1)we.children=de;else if(1<Ne){for(var Se=Array(Ne),Je=0;Je<Ne;Je++)Se[Je]=arguments[Je+2];we.children=Se}if(k&&k.defaultProps)for(fe in Ne=k.defaultProps,Ne)we[fe]===void 0&&(we[fe]=Ne[fe]);return{$$typeof:i,type:k,key:je,ref:Ie,props:we,_owner:Y.current}}function ve(k,L){return{$$typeof:i,type:k.type,key:L,ref:k.ref,props:k.props,_owner:k._owner}}function Be(k){return typeof k=="object"&&k!==null&&k.$$typeof===i}function me(k){var L={"=":"=0",":":"=2"};return"$"+k.replace(/[=:]/g,function(de){return L[de]})}var Fe=/\/+/g;function ae(k,L){return typeof k=="object"&&k!==null&&k.key!=null?me(""+k.key):L.toString(36)}function Pe(k,L,de,fe,we){var je=typeof k;(je==="undefined"||je==="boolean")&&(k=null);var Ie=!1;if(k===null)Ie=!0;else switch(je){case"string":case"number":Ie=!0;break;case"object":switch(k.$$typeof){case i:case o:Ie=!0}}if(Ie)return Ie=k,we=we(Ie),k=fe===""?"."+ae(Ie,0):fe,ne(we)?(de="",k!=null&&(de=k.replace(Fe,"$&/")+"/"),Pe(we,L,de,"",function(Je){return Je})):we!=null&&(Be(we)&&(we=ve(we,de+(!we.key||Ie&&Ie.key===we.key?"":(""+we.key).replace(Fe,"$&/")+"/")+k)),L.push(we)),1;if(Ie=0,fe=fe===""?".":fe+":",ne(k))for(var Ne=0;Ne<k.length;Ne++){je=k[Ne];var Se=fe+ae(je,Ne);Ie+=Pe(je,L,de,Se,we)}else if(Se=T(k),typeof Se=="function")for(k=Se.call(k),Ne=0;!(je=k.next()).done;)je=je.value,Se=fe+ae(je,Ne++),Ie+=Pe(je,L,de,Se,we);else if(je==="object")throw L=String(k),Error("Objects are not valid as a React child (found: "+(L==="[object Object]"?"object with keys {"+Object.keys(k).join(", ")+"}":L)+"). If you meant to render a collection of children, use an array instead.");return Ie}function Ce(k,L,de){if(k==null)return k;var fe=[],we=0;return Pe(k,fe,"","",function(je){return L.call(de,je,we++)}),fe}function Ge(k){if(k._status===-1){var L=k._result;L=L(),L.then(function(de){(k._status===0||k._status===-1)&&(k._status=1,k._result=de)},function(de){(k._status===0||k._status===-1)&&(k._status=2,k._result=de)}),k._status===-1&&(k._status=0,k._result=L)}if(k._status===1)return k._result.default;throw k._result}var Le={current:null},B={transition:null},X={ReactCurrentDispatcher:Le,ReactCurrentBatchConfig:B,ReactCurrentOwner:Y};function G(){throw Error("act(...) is not supported in production builds of React.")}return be.Children={map:Ce,forEach:function(k,L,de){Ce(k,function(){L.apply(this,arguments)},de)},count:function(k){var L=0;return Ce(k,function(){L++}),L},toArray:function(k){return Ce(k,function(L){return L})||[]},only:function(k){if(!Be(k))throw Error("React.Children.only expected to receive a single React element child.");return k}},be.Component=M,be.Fragment=c,be.Profiler=p,be.PureComponent=q,be.StrictMode=h,be.Suspense=m,be.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=X,be.act=G,be.cloneElement=function(k,L,de){if(k==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+k+".");var fe=R({},k.props),we=k.key,je=k.ref,Ie=k._owner;if(L!=null){if(L.ref!==void 0&&(je=L.ref,Ie=Y.current),L.key!==void 0&&(we=""+L.key),k.type&&k.type.defaultProps)var Ne=k.type.defaultProps;for(Se in L)ye.call(L,Se)&&!Re.hasOwnProperty(Se)&&(fe[Se]=L[Se]===void 0&&Ne!==void 0?Ne[Se]:L[Se])}var Se=arguments.length-2;if(Se===1)fe.children=de;else if(1<Se){Ne=Array(Se);for(var Je=0;Je<Se;Je++)Ne[Je]=arguments[Je+2];fe.children=Ne}return{$$typeof:i,type:k.type,key:we,ref:je,props:fe,_owner:Ie}},be.createContext=function(k){return k={$$typeof:v,_currentValue:k,_currentValue2:k,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},k.Provider={$$typeof:g,_context:k},k.Consumer=k},be.createElement=ue,be.createFactory=function(k){var L=ue.bind(null,k);return L.type=k,L},be.createRef=function(){return{current:null}},be.forwardRef=function(k){return{$$typeof:x,render:k}},be.isValidElement=Be,be.lazy=function(k){return{$$typeof:w,_payload:{_status:-1,_result:k},_init:Ge}},be.memo=function(k,L){return{$$typeof:u,type:k,compare:L===void 0?null:L}},be.startTransition=function(k){var L=B.transition;B.transition={};try{k()}finally{B.transition=L}},be.unstable_act=G,be.useCallback=function(k,L){return Le.current.useCallback(k,L)},be.useContext=function(k){return Le.current.useContext(k)},be.useDebugValue=function(){},be.useDeferredValue=function(k){return Le.current.useDeferredValue(k)},be.useEffect=function(k,L){return Le.current.useEffect(k,L)},be.useId=function(){return Le.current.useId()},be.useImperativeHandle=function(k,L,de){return Le.current.useImperativeHandle(k,L,de)},be.useInsertionEffect=function(k,L){return Le.current.useInsertionEffect(k,L)},be.useLayoutEffect=function(k,L){return Le.current.useLayoutEffect(k,L)},be.useMemo=function(k,L){return Le.current.useMemo(k,L)},be.useReducer=function(k,L,de){return Le.current.useReducer(k,L,de)},be.useRef=function(k){return Le.current.useRef(k)},be.useState=function(k){return Le.current.useState(k)},be.useSyncExternalStore=function(k,L,de){return Le.current.useSyncExternalStore(k,L,de)},be.useTransition=function(){return Le.current.useTransition()},be.version="18.3.1",be}var _u;function Do(){return _u||(_u=1,jo.exports=Mp()),jo.exports}var Ru;function _p(){if(Ru)return rs;Ru=1;var i=Do(),o=Symbol.for("react.element"),c=Symbol.for("react.fragment"),h=Object.prototype.hasOwnProperty,p=i.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,g={key:!0,ref:!0,__self:!0,__source:!0};function v(x,m,u){var w,b={},T=null,C=null;u!==void 0&&(T=""+u),m.key!==void 0&&(T=""+m.key),m.ref!==void 0&&(C=m.ref);for(w in m)h.call(m,w)&&!g.hasOwnProperty(w)&&(b[w]=m[w]);if(x&&x.defaultProps)for(w in m=x.defaultProps,m)b[w]===void 0&&(b[w]=m[w]);return{$$typeof:o,type:x,key:T,ref:C,props:b,_owner:p.current}}return rs.Fragment=c,rs.jsx=v,rs.jsxs=v,rs}var Au;function Rp(){return Au||(Au=1,wo.exports=_p()),wo.exports}var n=Rp(),y=Do();const ud=cd(y),Ap=Ip({__proto__:null,default:ud},[y]);var Nl={},bo={exports:{}},wt={},No={exports:{}},ko={};var Lu;function Lp(){return Lu||(Lu=1,(function(i){function o(B,X){var G=B.length;B.push(X);e:for(;0<G;){var k=G-1>>>1,L=B[k];if(0<p(L,X))B[k]=X,B[G]=L,G=k;else break e}}function c(B){return B.length===0?null:B[0]}function h(B){if(B.length===0)return null;var X=B[0],G=B.pop();if(G!==X){B[0]=G;e:for(var k=0,L=B.length,de=L>>>1;k<de;){var fe=2*(k+1)-1,we=B[fe],je=fe+1,Ie=B[je];if(0>p(we,G))je<L&&0>p(Ie,we)?(B[k]=Ie,B[je]=G,k=je):(B[k]=we,B[fe]=G,k=fe);else if(je<L&&0>p(Ie,G))B[k]=Ie,B[je]=G,k=je;else break e}}return X}function p(B,X){var G=B.sortIndex-X.sortIndex;return G!==0?G:B.id-X.id}if(typeof performance=="object"&&typeof performance.now=="function"){var g=performance;i.unstable_now=function(){return g.now()}}else{var v=Date,x=v.now();i.unstable_now=function(){return v.now()-x}}var m=[],u=[],w=1,b=null,T=3,C=!1,R=!1,A=!1,M=typeof setTimeout=="function"?setTimeout:null,H=typeof clearTimeout=="function"?clearTimeout:null,q=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function W(B){for(var X=c(u);X!==null;){if(X.callback===null)h(u);else if(X.startTime<=B)h(u),X.sortIndex=X.expirationTime,o(m,X);else break;X=c(u)}}function ne(B){if(A=!1,W(B),!R)if(c(m)!==null)R=!0,Ge(ye);else{var X=c(u);X!==null&&Le(ne,X.startTime-B)}}function ye(B,X){R=!1,A&&(A=!1,H(ue),ue=-1),C=!0;var G=T;try{for(W(X),b=c(m);b!==null&&(!(b.expirationTime>X)||B&&!me());){var k=b.callback;if(typeof k=="function"){b.callback=null,T=b.priorityLevel;var L=k(b.expirationTime<=X);X=i.unstable_now(),typeof L=="function"?b.callback=L:b===c(m)&&h(m),W(X)}else h(m);b=c(m)}if(b!==null)var de=!0;else{var fe=c(u);fe!==null&&Le(ne,fe.startTime-X),de=!1}return de}finally{b=null,T=G,C=!1}}var Y=!1,Re=null,ue=-1,ve=5,Be=-1;function me(){return!(i.unstable_now()-Be<ve)}function Fe(){if(Re!==null){var B=i.unstable_now();Be=B;var X=!0;try{X=Re(!0,B)}finally{X?ae():(Y=!1,Re=null)}}else Y=!1}var ae;if(typeof q=="function")ae=function(){q(Fe)};else if(typeof MessageChannel<"u"){var Pe=new MessageChannel,Ce=Pe.port2;Pe.port1.onmessage=Fe,ae=function(){Ce.postMessage(null)}}else ae=function(){M(Fe,0)};function Ge(B){Re=B,Y||(Y=!0,ae())}function Le(B,X){ue=M(function(){B(i.unstable_now())},X)}i.unstable_IdlePriority=5,i.unstable_ImmediatePriority=1,i.unstable_LowPriority=4,i.unstable_NormalPriority=3,i.unstable_Profiling=null,i.unstable_UserBlockingPriority=2,i.unstable_cancelCallback=function(B){B.callback=null},i.unstable_continueExecution=function(){R||C||(R=!0,Ge(ye))},i.unstable_forceFrameRate=function(B){0>B||125<B?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):ve=0<B?Math.floor(1e3/B):5},i.unstable_getCurrentPriorityLevel=function(){return T},i.unstable_getFirstCallbackNode=function(){return c(m)},i.unstable_next=function(B){switch(T){case 1:case 2:case 3:var X=3;break;default:X=T}var G=T;T=X;try{return B()}finally{T=G}},i.unstable_pauseExecution=function(){},i.unstable_requestPaint=function(){},i.unstable_runWithPriority=function(B,X){switch(B){case 1:case 2:case 3:case 4:case 5:break;default:B=3}var G=T;T=B;try{return X()}finally{T=G}},i.unstable_scheduleCallback=function(B,X,G){var k=i.unstable_now();switch(typeof G=="object"&&G!==null?(G=G.delay,G=typeof G=="number"&&0<G?k+G:k):G=k,B){case 1:var L=-1;break;case 2:L=250;break;case 5:L=1073741823;break;case 4:L=1e4;break;default:L=5e3}return L=G+L,B={id:w++,callback:X,priorityLevel:B,startTime:G,expirationTime:L,sortIndex:-1},G>k?(B.sortIndex=G,o(u,B),c(m)===null&&B===c(u)&&(A?(H(ue),ue=-1):A=!0,Le(ne,G-k))):(B.sortIndex=L,o(m,B),R||C||(R=!0,Ge(ye))),B},i.unstable_shouldYield=me,i.unstable_wrapCallback=function(B){var X=T;return function(){var G=T;T=X;try{return B.apply(this,arguments)}finally{T=G}}}})(ko)),ko}var zu;function zp(){return zu||(zu=1,No.exports=Lp()),No.exports}var Du;function Dp(){if(Du)return wt;Du=1;var i=Do(),o=zp();function c(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,r=1;r<arguments.length;r++)t+="&args[]="+encodeURIComponent(arguments[r]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var h=new Set,p={};function g(e,t){v(e,t),v(e+"Capture",t)}function v(e,t){for(p[e]=t,e=0;e<t.length;e++)h.add(t[e])}var x=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),m=Object.prototype.hasOwnProperty,u=/^[: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]*$/,w={},b={};function T(e){return m.call(b,e)?!0:m.call(w,e)?!1:u.test(e)?b[e]=!0:(w[e]=!0,!1)}function C(e,t,r,s){if(r!==null&&r.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return s?!1:r!==null?!r.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function R(e,t,r,s){if(t===null||typeof t>"u"||C(e,t,r,s))return!0;if(s)return!1;if(r!==null)switch(r.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function A(e,t,r,s,l,a,d){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=s,this.attributeNamespace=l,this.mustUseProperty=r,this.propertyName=e,this.type=t,this.sanitizeURL=a,this.removeEmptyString=d}var M={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){M[e]=new A(e,0,!1,e,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];M[t]=new A(t,1,!1,e[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(e){M[e]=new A(e,2,!1,e.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){M[e]=new A(e,2,!1,e,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){M[e]=new A(e,3,!1,e.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(e){M[e]=new A(e,3,!0,e,null,!1,!1)}),["capture","download"].forEach(function(e){M[e]=new A(e,4,!1,e,null,!1,!1)}),["cols","rows","size","span"].forEach(function(e){M[e]=new A(e,6,!1,e,null,!1,!1)}),["rowSpan","start"].forEach(function(e){M[e]=new A(e,5,!1,e.toLowerCase(),null,!1,!1)});var H=/[\-:]([a-z])/g;function q(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(H,q);M[t]=new A(t,1,!1,e,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(H,q);M[t]=new A(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(H,q);M[t]=new A(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(e){M[e]=new A(e,1,!1,e.toLowerCase(),null,!1,!1)}),M.xlinkHref=new A("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(e){M[e]=new A(e,1,!1,e.toLowerCase(),null,!0,!0)});function W(e,t,r,s){var l=M.hasOwnProperty(t)?M[t]:null;(l!==null?l.type!==0:s||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(R(t,r,l,s)&&(r=null),s||l===null?T(t)&&(r===null?e.removeAttribute(t):e.setAttribute(t,""+r)):l.mustUseProperty?e[l.propertyName]=r===null?l.type===3?!1:"":r:(t=l.attributeName,s=l.attributeNamespace,r===null?e.removeAttribute(t):(l=l.type,r=l===3||l===4&&r===!0?"":""+r,s?e.setAttributeNS(s,t,r):e.setAttribute(t,r))))}var ne=i.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,ye=Symbol.for("react.element"),Y=Symbol.for("react.portal"),Re=Symbol.for("react.fragment"),ue=Symbol.for("react.strict_mode"),ve=Symbol.for("react.profiler"),Be=Symbol.for("react.provider"),me=Symbol.for("react.context"),Fe=Symbol.for("react.forward_ref"),ae=Symbol.for("react.suspense"),Pe=Symbol.for("react.suspense_list"),Ce=Symbol.for("react.memo"),Ge=Symbol.for("react.lazy"),Le=Symbol.for("react.offscreen"),B=Symbol.iterator;function X(e){return e===null||typeof e!="object"?null:(e=B&&e[B]||e["@@iterator"],typeof e=="function"?e:null)}var G=Object.assign,k;function L(e){if(k===void 0)try{throw Error()}catch(r){var t=r.stack.trim().match(/\n( *(at )?)/);k=t&&t[1]||""}return`
|
|
2
|
+
`+k+e}var de=!1;function fe(e,t){if(!e||de)return"";de=!0;var r=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(P){var s=P}Reflect.construct(e,[],t)}else{try{t.call()}catch(P){s=P}e.call(t.prototype)}else{try{throw Error()}catch(P){s=P}e()}}catch(P){if(P&&s&&typeof P.stack=="string"){for(var l=P.stack.split(`
|
|
3
|
+
`),a=s.stack.split(`
|
|
4
|
+
`),d=l.length-1,f=a.length-1;1<=d&&0<=f&&l[d]!==a[f];)f--;for(;1<=d&&0<=f;d--,f--)if(l[d]!==a[f]){if(d!==1||f!==1)do if(d--,f--,0>f||l[d]!==a[f]){var j=`
|
|
5
|
+
`+l[d].replace(" at new "," at ");return e.displayName&&j.includes("<anonymous>")&&(j=j.replace("<anonymous>",e.displayName)),j}while(1<=d&&0<=f);break}}}finally{de=!1,Error.prepareStackTrace=r}return(e=e?e.displayName||e.name:"")?L(e):""}function we(e){switch(e.tag){case 5:return L(e.type);case 16:return L("Lazy");case 13:return L("Suspense");case 19:return L("SuspenseList");case 0:case 2:case 15:return e=fe(e.type,!1),e;case 11:return e=fe(e.type.render,!1),e;case 1:return e=fe(e.type,!0),e;default:return""}}function je(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Re:return"Fragment";case Y:return"Portal";case ve:return"Profiler";case ue:return"StrictMode";case ae:return"Suspense";case Pe:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case me:return(e.displayName||"Context")+".Consumer";case Be:return(e._context.displayName||"Context")+".Provider";case Fe:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Ce:return t=e.displayName||null,t!==null?t:je(e.type)||"Memo";case Ge:t=e._payload,e=e._init;try{return je(e(t))}catch{}}return null}function Ie(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return je(t);case 8:return t===ue?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function Ne(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Se(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Je(e){var t=Se(e)?"checked":"value",r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),s=""+e[t];if(!e.hasOwnProperty(t)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var l=r.get,a=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return l.call(this)},set:function(d){s=""+d,a.call(this,d)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return s},setValue:function(d){s=""+d},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function I(e){e._valueTracker||(e._valueTracker=Je(e))}function F(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var r=t.getValue(),s="";return e&&(s=Se(e)?e.checked?"true":"false":e.value),e=s,e!==r?(t.setValue(e),!0):!1}function V(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function he(e,t){var r=t.checked;return G({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r??e._wrapperState.initialChecked})}function xe(e,t){var r=t.defaultValue==null?"":t.defaultValue,s=t.checked!=null?t.checked:t.defaultChecked;r=Ne(t.value!=null?t.value:r),e._wrapperState={initialChecked:s,initialValue:r,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function le(e,t){t=t.checked,t!=null&&W(e,"checked",t,!1)}function oe(e,t){le(e,t);var r=Ne(t.value),s=t.type;if(r!=null)s==="number"?(r===0&&e.value===""||e.value!=r)&&(e.value=""+r):e.value!==""+r&&(e.value=""+r);else if(s==="submit"||s==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?ie(e,t.type,r):t.hasOwnProperty("defaultValue")&&ie(e,t.type,Ne(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function ze(e,t,r){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var s=t.type;if(!(s!=="submit"&&s!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,r||t===e.value||(e.value=t),e.defaultValue=t}r=e.name,r!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,r!==""&&(e.name=r)}function ie(e,t,r){(t!=="number"||V(e.ownerDocument)!==e)&&(r==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+r&&(e.defaultValue=""+r))}var ke=Array.isArray;function Ee(e,t,r,s){if(e=e.options,t){t={};for(var l=0;l<r.length;l++)t["$"+r[l]]=!0;for(r=0;r<e.length;r++)l=t.hasOwnProperty("$"+e[r].value),e[r].selected!==l&&(e[r].selected=l),l&&s&&(e[r].defaultSelected=!0)}else{for(r=""+Ne(r),t=null,l=0;l<e.length;l++){if(e[l].value===r){e[l].selected=!0,s&&(e[l].defaultSelected=!0);return}t!==null||e[l].disabled||(t=e[l])}t!==null&&(t.selected=!0)}}function Me(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(c(91));return G({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function De(e,t){var r=t.value;if(r==null){if(r=t.children,t=t.defaultValue,r!=null){if(t!=null)throw Error(c(92));if(ke(r)){if(1<r.length)throw Error(c(93));r=r[0]}t=r}t==null&&(t=""),r=t}e._wrapperState={initialValue:Ne(r)}}function ht(e,t){var r=Ne(t.value),s=Ne(t.defaultValue);r!=null&&(r=""+r,r!==e.value&&(e.value=r),t.defaultValue==null&&e.defaultValue!==r&&(e.defaultValue=r)),s!=null&&(e.defaultValue=""+s)}function ms(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function fs(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function vr(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?fs(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var kn,Il=(function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,r,s,l){MSApp.execUnsafeLocalFunction(function(){return e(t,r,s,l)})}:e})(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(kn=kn||document.createElement("div"),kn.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=kn.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Cn(e,t){if(t){var r=e.firstChild;if(r&&r===e.lastChild&&r.nodeType===3){r.nodeValue=t;return}}e.textContent=t}var O={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},_=["Webkit","ms","Moz","O"];Object.keys(O).forEach(function(e){_.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),O[t]=O[e]})});function ge(e,t,r){return t==null||typeof t=="boolean"||t===""?"":r||typeof t!="number"||t===0||O.hasOwnProperty(e)&&O[e]?(""+t).trim():t+"px"}function Ut(e,t){e=e.style;for(var r in t)if(t.hasOwnProperty(r)){var s=r.indexOf("--")===0,l=ge(r,t[r],s);r==="float"&&(r="cssFloat"),s?e.setProperty(r,l):e[r]=l}}var wr=G({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 Ml(e,t){if(t){if(wr[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(c(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(c(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(c(61))}if(t.style!=null&&typeof t.style!="object")throw Error(c(62))}}function _l(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Rl=null;function Al(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Ll=null,Vn=null,Gn=null;function Yo(e){if(e=Wr(e)){if(typeof Ll!="function")throw Error(c(280));var t=e.stateNode;t&&(t=$s(t),Ll(e.stateNode,e.type,t))}}function Qo(e){Vn?Gn?Gn.push(e):Gn=[e]:Vn=e}function Ko(){if(Vn){var e=Vn,t=Gn;if(Gn=Vn=null,Yo(e),t)for(e=0;e<t.length;e++)Yo(t[e])}}function Xo(e,t){return e(t)}function Jo(){}var zl=!1;function Zo(e,t,r){if(zl)return e(t,r);zl=!0;try{return Xo(e,t,r)}finally{zl=!1,(Vn!==null||Gn!==null)&&(Jo(),Ko())}}function jr(e,t){var r=e.stateNode;if(r===null)return null;var s=$s(r);if(s===null)return null;r=s[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(s=!s.disabled)||(e=e.type,s=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!s;break e;default:e=!1}if(e)return null;if(r&&typeof r!="function")throw Error(c(231,t,typeof r));return r}var Dl=!1;if(x)try{var br={};Object.defineProperty(br,"passive",{get:function(){Dl=!0}}),window.addEventListener("test",br,br),window.removeEventListener("test",br,br)}catch{Dl=!1}function zd(e,t,r,s,l,a,d,f,j){var P=Array.prototype.slice.call(arguments,3);try{t.apply(r,P)}catch(D){this.onError(D)}}var Nr=!1,xs=null,gs=!1,$l=null,Dd={onError:function(e){Nr=!0,xs=e}};function $d(e,t,r,s,l,a,d,f,j){Nr=!1,xs=null,zd.apply(Dd,arguments)}function Ud(e,t,r,s,l,a,d,f,j){if($d.apply(this,arguments),Nr){if(Nr){var P=xs;Nr=!1,xs=null}else throw Error(c(198));gs||(gs=!0,$l=P)}}function Sn(e){var t=e,r=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(r=t.return),e=t.return;while(e)}return t.tag===3?r:null}function ei(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function ti(e){if(Sn(e)!==e)throw Error(c(188))}function Od(e){var t=e.alternate;if(!t){if(t=Sn(e),t===null)throw Error(c(188));return t!==e?null:e}for(var r=e,s=t;;){var l=r.return;if(l===null)break;var a=l.alternate;if(a===null){if(s=l.return,s!==null){r=s;continue}break}if(l.child===a.child){for(a=l.child;a;){if(a===r)return ti(l),e;if(a===s)return ti(l),t;a=a.sibling}throw Error(c(188))}if(r.return!==s.return)r=l,s=a;else{for(var d=!1,f=l.child;f;){if(f===r){d=!0,r=l,s=a;break}if(f===s){d=!0,s=l,r=a;break}f=f.sibling}if(!d){for(f=a.child;f;){if(f===r){d=!0,r=a,s=l;break}if(f===s){d=!0,s=a,r=l;break}f=f.sibling}if(!d)throw Error(c(189))}}if(r.alternate!==s)throw Error(c(190))}if(r.tag!==3)throw Error(c(188));return r.stateNode.current===r?e:t}function ni(e){return e=Od(e),e!==null?ri(e):null}function ri(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=ri(e);if(t!==null)return t;e=e.sibling}return null}var si=o.unstable_scheduleCallback,li=o.unstable_cancelCallback,Fd=o.unstable_shouldYield,Wd=o.unstable_requestPaint,Ye=o.unstable_now,Bd=o.unstable_getCurrentPriorityLevel,Ul=o.unstable_ImmediatePriority,ai=o.unstable_UserBlockingPriority,ys=o.unstable_NormalPriority,Hd=o.unstable_LowPriority,oi=o.unstable_IdlePriority,vs=null,Ot=null;function Vd(e){if(Ot&&typeof Ot.onCommitFiberRoot=="function")try{Ot.onCommitFiberRoot(vs,e,void 0,(e.current.flags&128)===128)}catch{}}var Mt=Math.clz32?Math.clz32:Yd,Gd=Math.log,qd=Math.LN2;function Yd(e){return e>>>=0,e===0?32:31-(Gd(e)/qd|0)|0}var ws=64,js=4194304;function kr(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function bs(e,t){var r=e.pendingLanes;if(r===0)return 0;var s=0,l=e.suspendedLanes,a=e.pingedLanes,d=r&268435455;if(d!==0){var f=d&~l;f!==0?s=kr(f):(a&=d,a!==0&&(s=kr(a)))}else d=r&~l,d!==0?s=kr(d):a!==0&&(s=kr(a));if(s===0)return 0;if(t!==0&&t!==s&&(t&l)===0&&(l=s&-s,a=t&-t,l>=a||l===16&&(a&4194240)!==0))return t;if((s&4)!==0&&(s|=r&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=s;0<t;)r=31-Mt(t),l=1<<r,s|=e[r],t&=~l;return s}function Qd(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Kd(e,t){for(var r=e.suspendedLanes,s=e.pingedLanes,l=e.expirationTimes,a=e.pendingLanes;0<a;){var d=31-Mt(a),f=1<<d,j=l[d];j===-1?((f&r)===0||(f&s)!==0)&&(l[d]=Qd(f,t)):j<=t&&(e.expiredLanes|=f),a&=~f}}function Ol(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function ii(){var e=ws;return ws<<=1,(ws&4194240)===0&&(ws=64),e}function Fl(e){for(var t=[],r=0;31>r;r++)t.push(e);return t}function Cr(e,t,r){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Mt(t),e[t]=r}function Xd(e,t){var r=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var s=e.eventTimes;for(e=e.expirationTimes;0<r;){var l=31-Mt(r),a=1<<l;t[l]=0,s[l]=-1,e[l]=-1,r&=~a}}function Wl(e,t){var r=e.entangledLanes|=t;for(e=e.entanglements;r;){var s=31-Mt(r),l=1<<s;l&t|e[s]&t&&(e[s]|=t),r&=~l}}var Ae=0;function ci(e){return e&=-e,1<e?4<e?(e&268435455)!==0?16:536870912:4:1}var ui,Bl,di,hi,pi,Hl=!1,Ns=[],en=null,tn=null,nn=null,Sr=new Map,Er=new Map,rn=[],Jd="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function mi(e,t){switch(e){case"focusin":case"focusout":en=null;break;case"dragenter":case"dragleave":tn=null;break;case"mouseover":case"mouseout":nn=null;break;case"pointerover":case"pointerout":Sr.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Er.delete(t.pointerId)}}function Tr(e,t,r,s,l,a){return e===null||e.nativeEvent!==a?(e={blockedOn:t,domEventName:r,eventSystemFlags:s,nativeEvent:a,targetContainers:[l]},t!==null&&(t=Wr(t),t!==null&&Bl(t)),e):(e.eventSystemFlags|=s,t=e.targetContainers,l!==null&&t.indexOf(l)===-1&&t.push(l),e)}function Zd(e,t,r,s,l){switch(t){case"focusin":return en=Tr(en,e,t,r,s,l),!0;case"dragenter":return tn=Tr(tn,e,t,r,s,l),!0;case"mouseover":return nn=Tr(nn,e,t,r,s,l),!0;case"pointerover":var a=l.pointerId;return Sr.set(a,Tr(Sr.get(a)||null,e,t,r,s,l)),!0;case"gotpointercapture":return a=l.pointerId,Er.set(a,Tr(Er.get(a)||null,e,t,r,s,l)),!0}return!1}function fi(e){var t=En(e.target);if(t!==null){var r=Sn(t);if(r!==null){if(t=r.tag,t===13){if(t=ei(r),t!==null){e.blockedOn=t,pi(e.priority,function(){di(r)});return}}else if(t===3&&r.stateNode.current.memoizedState.isDehydrated){e.blockedOn=r.tag===3?r.stateNode.containerInfo:null;return}}}e.blockedOn=null}function ks(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var r=Gl(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(r===null){r=e.nativeEvent;var s=new r.constructor(r.type,r);Rl=s,r.target.dispatchEvent(s),Rl=null}else return t=Wr(r),t!==null&&Bl(t),e.blockedOn=r,!1;t.shift()}return!0}function xi(e,t,r){ks(e)&&r.delete(t)}function eh(){Hl=!1,en!==null&&ks(en)&&(en=null),tn!==null&&ks(tn)&&(tn=null),nn!==null&&ks(nn)&&(nn=null),Sr.forEach(xi),Er.forEach(xi)}function Pr(e,t){e.blockedOn===t&&(e.blockedOn=null,Hl||(Hl=!0,o.unstable_scheduleCallback(o.unstable_NormalPriority,eh)))}function Ir(e){function t(l){return Pr(l,e)}if(0<Ns.length){Pr(Ns[0],e);for(var r=1;r<Ns.length;r++){var s=Ns[r];s.blockedOn===e&&(s.blockedOn=null)}}for(en!==null&&Pr(en,e),tn!==null&&Pr(tn,e),nn!==null&&Pr(nn,e),Sr.forEach(t),Er.forEach(t),r=0;r<rn.length;r++)s=rn[r],s.blockedOn===e&&(s.blockedOn=null);for(;0<rn.length&&(r=rn[0],r.blockedOn===null);)fi(r),r.blockedOn===null&&rn.shift()}var qn=ne.ReactCurrentBatchConfig,Cs=!0;function th(e,t,r,s){var l=Ae,a=qn.transition;qn.transition=null;try{Ae=1,Vl(e,t,r,s)}finally{Ae=l,qn.transition=a}}function nh(e,t,r,s){var l=Ae,a=qn.transition;qn.transition=null;try{Ae=4,Vl(e,t,r,s)}finally{Ae=l,qn.transition=a}}function Vl(e,t,r,s){if(Cs){var l=Gl(e,t,r,s);if(l===null)ca(e,t,s,Ss,r),mi(e,s);else if(Zd(l,e,t,r,s))s.stopPropagation();else if(mi(e,s),t&4&&-1<Jd.indexOf(e)){for(;l!==null;){var a=Wr(l);if(a!==null&&ui(a),a=Gl(e,t,r,s),a===null&&ca(e,t,s,Ss,r),a===l)break;l=a}l!==null&&s.stopPropagation()}else ca(e,t,s,null,r)}}var Ss=null;function Gl(e,t,r,s){if(Ss=null,e=Al(s),e=En(e),e!==null)if(t=Sn(e),t===null)e=null;else if(r=t.tag,r===13){if(e=ei(t),e!==null)return e;e=null}else if(r===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return Ss=e,null}function gi(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(Bd()){case Ul:return 1;case ai:return 4;case ys:case Hd:return 16;case oi:return 536870912;default:return 16}default:return 16}}var sn=null,ql=null,Es=null;function yi(){if(Es)return Es;var e,t=ql,r=t.length,s,l="value"in sn?sn.value:sn.textContent,a=l.length;for(e=0;e<r&&t[e]===l[e];e++);var d=r-e;for(s=1;s<=d&&t[r-s]===l[a-s];s++);return Es=l.slice(e,1<s?1-s:void 0)}function Ts(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function Ps(){return!0}function vi(){return!1}function jt(e){function t(r,s,l,a,d){this._reactName=r,this._targetInst=l,this.type=s,this.nativeEvent=a,this.target=d,this.currentTarget=null;for(var f in e)e.hasOwnProperty(f)&&(r=e[f],this[f]=r?r(a):a[f]);return this.isDefaultPrevented=(a.defaultPrevented!=null?a.defaultPrevented:a.returnValue===!1)?Ps:vi,this.isPropagationStopped=vi,this}return G(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var r=this.nativeEvent;r&&(r.preventDefault?r.preventDefault():typeof r.returnValue!="unknown"&&(r.returnValue=!1),this.isDefaultPrevented=Ps)},stopPropagation:function(){var r=this.nativeEvent;r&&(r.stopPropagation?r.stopPropagation():typeof r.cancelBubble!="unknown"&&(r.cancelBubble=!0),this.isPropagationStopped=Ps)},persist:function(){},isPersistent:Ps}),t}var Yn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Yl=jt(Yn),Mr=G({},Yn,{view:0,detail:0}),rh=jt(Mr),Ql,Kl,_r,Is=G({},Mr,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Jl,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==_r&&(_r&&e.type==="mousemove"?(Ql=e.screenX-_r.screenX,Kl=e.screenY-_r.screenY):Kl=Ql=0,_r=e),Ql)},movementY:function(e){return"movementY"in e?e.movementY:Kl}}),wi=jt(Is),sh=G({},Is,{dataTransfer:0}),lh=jt(sh),ah=G({},Mr,{relatedTarget:0}),Xl=jt(ah),oh=G({},Yn,{animationName:0,elapsedTime:0,pseudoElement:0}),ih=jt(oh),ch=G({},Yn,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),uh=jt(ch),dh=G({},Yn,{data:0}),ji=jt(dh),hh={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},ph={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},mh={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function fh(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=mh[e])?!!t[e]:!1}function Jl(){return fh}var xh=G({},Mr,{key:function(e){if(e.key){var t=hh[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Ts(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?ph[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Jl,charCode:function(e){return e.type==="keypress"?Ts(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Ts(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),gh=jt(xh),yh=G({},Is,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),bi=jt(yh),vh=G({},Mr,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Jl}),wh=jt(vh),jh=G({},Yn,{propertyName:0,elapsedTime:0,pseudoElement:0}),bh=jt(jh),Nh=G({},Is,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),kh=jt(Nh),Ch=[9,13,27,32],Zl=x&&"CompositionEvent"in window,Rr=null;x&&"documentMode"in document&&(Rr=document.documentMode);var Sh=x&&"TextEvent"in window&&!Rr,Ni=x&&(!Zl||Rr&&8<Rr&&11>=Rr),ki=" ",Ci=!1;function Si(e,t){switch(e){case"keyup":return Ch.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Ei(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Qn=!1;function Eh(e,t){switch(e){case"compositionend":return Ei(t);case"keypress":return t.which!==32?null:(Ci=!0,ki);case"textInput":return e=t.data,e===ki&&Ci?null:e;default:return null}}function Th(e,t){if(Qn)return e==="compositionend"||!Zl&&Si(e,t)?(e=yi(),Es=ql=sn=null,Qn=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return Ni&&t.locale!=="ko"?null:t.data;default:return null}}var Ph={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Ti(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!Ph[e.type]:t==="textarea"}function Pi(e,t,r,s){Qo(s),t=Ls(t,"onChange"),0<t.length&&(r=new Yl("onChange","change",null,r,s),e.push({event:r,listeners:t}))}var Ar=null,Lr=null;function Ih(e){qi(e,0)}function Ms(e){var t=er(e);if(F(t))return e}function Mh(e,t){if(e==="change")return t}var Ii=!1;if(x){var ea;if(x){var ta="oninput"in document;if(!ta){var Mi=document.createElement("div");Mi.setAttribute("oninput","return;"),ta=typeof Mi.oninput=="function"}ea=ta}else ea=!1;Ii=ea&&(!document.documentMode||9<document.documentMode)}function _i(){Ar&&(Ar.detachEvent("onpropertychange",Ri),Lr=Ar=null)}function Ri(e){if(e.propertyName==="value"&&Ms(Lr)){var t=[];Pi(t,Lr,e,Al(e)),Zo(Ih,t)}}function _h(e,t,r){e==="focusin"?(_i(),Ar=t,Lr=r,Ar.attachEvent("onpropertychange",Ri)):e==="focusout"&&_i()}function Rh(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Ms(Lr)}function Ah(e,t){if(e==="click")return Ms(t)}function Lh(e,t){if(e==="input"||e==="change")return Ms(t)}function zh(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var _t=typeof Object.is=="function"?Object.is:zh;function zr(e,t){if(_t(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var r=Object.keys(e),s=Object.keys(t);if(r.length!==s.length)return!1;for(s=0;s<r.length;s++){var l=r[s];if(!m.call(t,l)||!_t(e[l],t[l]))return!1}return!0}function Ai(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Li(e,t){var r=Ai(e);e=0;for(var s;r;){if(r.nodeType===3){if(s=e+r.textContent.length,e<=t&&s>=t)return{node:r,offset:t-e};e=s}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=Ai(r)}}function zi(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?zi(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Di(){for(var e=window,t=V();t instanceof e.HTMLIFrameElement;){try{var r=typeof t.contentWindow.location.href=="string"}catch{r=!1}if(r)e=t.contentWindow;else break;t=V(e.document)}return t}function na(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function Dh(e){var t=Di(),r=e.focusedElem,s=e.selectionRange;if(t!==r&&r&&r.ownerDocument&&zi(r.ownerDocument.documentElement,r)){if(s!==null&&na(r)){if(t=s.start,e=s.end,e===void 0&&(e=t),"selectionStart"in r)r.selectionStart=t,r.selectionEnd=Math.min(e,r.value.length);else if(e=(t=r.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var l=r.textContent.length,a=Math.min(s.start,l);s=s.end===void 0?a:Math.min(s.end,l),!e.extend&&a>s&&(l=s,s=a,a=l),l=Li(r,a);var d=Li(r,s);l&&d&&(e.rangeCount!==1||e.anchorNode!==l.node||e.anchorOffset!==l.offset||e.focusNode!==d.node||e.focusOffset!==d.offset)&&(t=t.createRange(),t.setStart(l.node,l.offset),e.removeAllRanges(),a>s?(e.addRange(t),e.extend(d.node,d.offset)):(t.setEnd(d.node,d.offset),e.addRange(t)))}}for(t=[],e=r;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof r.focus=="function"&&r.focus(),r=0;r<t.length;r++)e=t[r],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var $h=x&&"documentMode"in document&&11>=document.documentMode,Kn=null,ra=null,Dr=null,sa=!1;function $i(e,t,r){var s=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;sa||Kn==null||Kn!==V(s)||(s=Kn,"selectionStart"in s&&na(s)?s={start:s.selectionStart,end:s.selectionEnd}:(s=(s.ownerDocument&&s.ownerDocument.defaultView||window).getSelection(),s={anchorNode:s.anchorNode,anchorOffset:s.anchorOffset,focusNode:s.focusNode,focusOffset:s.focusOffset}),Dr&&zr(Dr,s)||(Dr=s,s=Ls(ra,"onSelect"),0<s.length&&(t=new Yl("onSelect","select",null,t,r),e.push({event:t,listeners:s}),t.target=Kn)))}function _s(e,t){var r={};return r[e.toLowerCase()]=t.toLowerCase(),r["Webkit"+e]="webkit"+t,r["Moz"+e]="moz"+t,r}var Xn={animationend:_s("Animation","AnimationEnd"),animationiteration:_s("Animation","AnimationIteration"),animationstart:_s("Animation","AnimationStart"),transitionend:_s("Transition","TransitionEnd")},la={},Ui={};x&&(Ui=document.createElement("div").style,"AnimationEvent"in window||(delete Xn.animationend.animation,delete Xn.animationiteration.animation,delete Xn.animationstart.animation),"TransitionEvent"in window||delete Xn.transitionend.transition);function Rs(e){if(la[e])return la[e];if(!Xn[e])return e;var t=Xn[e],r;for(r in t)if(t.hasOwnProperty(r)&&r in Ui)return la[e]=t[r];return e}var Oi=Rs("animationend"),Fi=Rs("animationiteration"),Wi=Rs("animationstart"),Bi=Rs("transitionend"),Hi=new Map,Vi="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function ln(e,t){Hi.set(e,t),g(t,[e])}for(var aa=0;aa<Vi.length;aa++){var oa=Vi[aa],Uh=oa.toLowerCase(),Oh=oa[0].toUpperCase()+oa.slice(1);ln(Uh,"on"+Oh)}ln(Oi,"onAnimationEnd"),ln(Fi,"onAnimationIteration"),ln(Wi,"onAnimationStart"),ln("dblclick","onDoubleClick"),ln("focusin","onFocus"),ln("focusout","onBlur"),ln(Bi,"onTransitionEnd"),v("onMouseEnter",["mouseout","mouseover"]),v("onMouseLeave",["mouseout","mouseover"]),v("onPointerEnter",["pointerout","pointerover"]),v("onPointerLeave",["pointerout","pointerover"]),g("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),g("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),g("onBeforeInput",["compositionend","keypress","textInput","paste"]),g("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),g("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),g("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var $r="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),Fh=new Set("cancel close invalid load scroll toggle".split(" ").concat($r));function Gi(e,t,r){var s=e.type||"unknown-event";e.currentTarget=r,Ud(s,t,void 0,e),e.currentTarget=null}function qi(e,t){t=(t&4)!==0;for(var r=0;r<e.length;r++){var s=e[r],l=s.event;s=s.listeners;e:{var a=void 0;if(t)for(var d=s.length-1;0<=d;d--){var f=s[d],j=f.instance,P=f.currentTarget;if(f=f.listener,j!==a&&l.isPropagationStopped())break e;Gi(l,f,P),a=j}else for(d=0;d<s.length;d++){if(f=s[d],j=f.instance,P=f.currentTarget,f=f.listener,j!==a&&l.isPropagationStopped())break e;Gi(l,f,P),a=j}}}if(gs)throw e=$l,gs=!1,$l=null,e}function Ue(e,t){var r=t[fa];r===void 0&&(r=t[fa]=new Set);var s=e+"__bubble";r.has(s)||(Yi(t,e,2,!1),r.add(s))}function ia(e,t,r){var s=0;t&&(s|=4),Yi(r,e,s,t)}var As="_reactListening"+Math.random().toString(36).slice(2);function Ur(e){if(!e[As]){e[As]=!0,h.forEach(function(r){r!=="selectionchange"&&(Fh.has(r)||ia(r,!1,e),ia(r,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[As]||(t[As]=!0,ia("selectionchange",!1,t))}}function Yi(e,t,r,s){switch(gi(t)){case 1:var l=th;break;case 4:l=nh;break;default:l=Vl}r=l.bind(null,t,r,e),l=void 0,!Dl||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(l=!0),s?l!==void 0?e.addEventListener(t,r,{capture:!0,passive:l}):e.addEventListener(t,r,!0):l!==void 0?e.addEventListener(t,r,{passive:l}):e.addEventListener(t,r,!1)}function ca(e,t,r,s,l){var a=s;if((t&1)===0&&(t&2)===0&&s!==null)e:for(;;){if(s===null)return;var d=s.tag;if(d===3||d===4){var f=s.stateNode.containerInfo;if(f===l||f.nodeType===8&&f.parentNode===l)break;if(d===4)for(d=s.return;d!==null;){var j=d.tag;if((j===3||j===4)&&(j=d.stateNode.containerInfo,j===l||j.nodeType===8&&j.parentNode===l))return;d=d.return}for(;f!==null;){if(d=En(f),d===null)return;if(j=d.tag,j===5||j===6){s=a=d;continue e}f=f.parentNode}}s=s.return}Zo(function(){var P=a,D=Al(r),$=[];e:{var z=Hi.get(e);if(z!==void 0){var Q=Yl,J=e;switch(e){case"keypress":if(Ts(r)===0)break e;case"keydown":case"keyup":Q=gh;break;case"focusin":J="focus",Q=Xl;break;case"focusout":J="blur",Q=Xl;break;case"beforeblur":case"afterblur":Q=Xl;break;case"click":if(r.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":Q=wi;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":Q=lh;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":Q=wh;break;case Oi:case Fi:case Wi:Q=ih;break;case Bi:Q=bh;break;case"scroll":Q=rh;break;case"wheel":Q=kh;break;case"copy":case"cut":case"paste":Q=uh;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":Q=bi}var Z=(t&4)!==0,Qe=!Z&&e==="scroll",S=Z?z!==null?z+"Capture":null:z;Z=[];for(var N=P,E;N!==null;){E=N;var U=E.stateNode;if(E.tag===5&&U!==null&&(E=U,S!==null&&(U=jr(N,S),U!=null&&Z.push(Or(N,U,E)))),Qe)break;N=N.return}0<Z.length&&(z=new Q(z,J,null,r,D),$.push({event:z,listeners:Z}))}}if((t&7)===0){e:{if(z=e==="mouseover"||e==="pointerover",Q=e==="mouseout"||e==="pointerout",z&&r!==Rl&&(J=r.relatedTarget||r.fromElement)&&(En(J)||J[Vt]))break e;if((Q||z)&&(z=D.window===D?D:(z=D.ownerDocument)?z.defaultView||z.parentWindow:window,Q?(J=r.relatedTarget||r.toElement,Q=P,J=J?En(J):null,J!==null&&(Qe=Sn(J),J!==Qe||J.tag!==5&&J.tag!==6)&&(J=null)):(Q=null,J=P),Q!==J)){if(Z=wi,U="onMouseLeave",S="onMouseEnter",N="mouse",(e==="pointerout"||e==="pointerover")&&(Z=bi,U="onPointerLeave",S="onPointerEnter",N="pointer"),Qe=Q==null?z:er(Q),E=J==null?z:er(J),z=new Z(U,N+"leave",Q,r,D),z.target=Qe,z.relatedTarget=E,U=null,En(D)===P&&(Z=new Z(S,N+"enter",J,r,D),Z.target=E,Z.relatedTarget=Qe,U=Z),Qe=U,Q&&J)t:{for(Z=Q,S=J,N=0,E=Z;E;E=Jn(E))N++;for(E=0,U=S;U;U=Jn(U))E++;for(;0<N-E;)Z=Jn(Z),N--;for(;0<E-N;)S=Jn(S),E--;for(;N--;){if(Z===S||S!==null&&Z===S.alternate)break t;Z=Jn(Z),S=Jn(S)}Z=null}else Z=null;Q!==null&&Qi($,z,Q,Z,!1),J!==null&&Qe!==null&&Qi($,Qe,J,Z,!0)}}e:{if(z=P?er(P):window,Q=z.nodeName&&z.nodeName.toLowerCase(),Q==="select"||Q==="input"&&z.type==="file")var ee=Mh;else if(Ti(z))if(Ii)ee=Lh;else{ee=Rh;var re=_h}else(Q=z.nodeName)&&Q.toLowerCase()==="input"&&(z.type==="checkbox"||z.type==="radio")&&(ee=Ah);if(ee&&(ee=ee(e,P))){Pi($,ee,r,D);break e}re&&re(e,z,P),e==="focusout"&&(re=z._wrapperState)&&re.controlled&&z.type==="number"&&ie(z,"number",z.value)}switch(re=P?er(P):window,e){case"focusin":(Ti(re)||re.contentEditable==="true")&&(Kn=re,ra=P,Dr=null);break;case"focusout":Dr=ra=Kn=null;break;case"mousedown":sa=!0;break;case"contextmenu":case"mouseup":case"dragend":sa=!1,$i($,r,D);break;case"selectionchange":if($h)break;case"keydown":case"keyup":$i($,r,D)}var se;if(Zl)e:{switch(e){case"compositionstart":var ce="onCompositionStart";break e;case"compositionend":ce="onCompositionEnd";break e;case"compositionupdate":ce="onCompositionUpdate";break e}ce=void 0}else Qn?Si(e,r)&&(ce="onCompositionEnd"):e==="keydown"&&r.keyCode===229&&(ce="onCompositionStart");ce&&(Ni&&r.locale!=="ko"&&(Qn||ce!=="onCompositionStart"?ce==="onCompositionEnd"&&Qn&&(se=yi()):(sn=D,ql="value"in sn?sn.value:sn.textContent,Qn=!0)),re=Ls(P,ce),0<re.length&&(ce=new ji(ce,e,null,r,D),$.push({event:ce,listeners:re}),se?ce.data=se:(se=Ei(r),se!==null&&(ce.data=se)))),(se=Sh?Eh(e,r):Th(e,r))&&(P=Ls(P,"onBeforeInput"),0<P.length&&(D=new ji("onBeforeInput","beforeinput",null,r,D),$.push({event:D,listeners:P}),D.data=se))}qi($,t)})}function Or(e,t,r){return{instance:e,listener:t,currentTarget:r}}function Ls(e,t){for(var r=t+"Capture",s=[];e!==null;){var l=e,a=l.stateNode;l.tag===5&&a!==null&&(l=a,a=jr(e,r),a!=null&&s.unshift(Or(e,a,l)),a=jr(e,t),a!=null&&s.push(Or(e,a,l))),e=e.return}return s}function Jn(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function Qi(e,t,r,s,l){for(var a=t._reactName,d=[];r!==null&&r!==s;){var f=r,j=f.alternate,P=f.stateNode;if(j!==null&&j===s)break;f.tag===5&&P!==null&&(f=P,l?(j=jr(r,a),j!=null&&d.unshift(Or(r,j,f))):l||(j=jr(r,a),j!=null&&d.push(Or(r,j,f)))),r=r.return}d.length!==0&&e.push({event:t,listeners:d})}var Wh=/\r\n?/g,Bh=/\u0000|\uFFFD/g;function Ki(e){return(typeof e=="string"?e:""+e).replace(Wh,`
|
|
6
|
+
`).replace(Bh,"")}function zs(e,t,r){if(t=Ki(t),Ki(e)!==t&&r)throw Error(c(425))}function Ds(){}var ua=null,da=null;function ha(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var pa=typeof setTimeout=="function"?setTimeout:void 0,Hh=typeof clearTimeout=="function"?clearTimeout:void 0,Xi=typeof Promise=="function"?Promise:void 0,Vh=typeof queueMicrotask=="function"?queueMicrotask:typeof Xi<"u"?function(e){return Xi.resolve(null).then(e).catch(Gh)}:pa;function Gh(e){setTimeout(function(){throw e})}function ma(e,t){var r=t,s=0;do{var l=r.nextSibling;if(e.removeChild(r),l&&l.nodeType===8)if(r=l.data,r==="/$"){if(s===0){e.removeChild(l),Ir(t);return}s--}else r!=="$"&&r!=="$?"&&r!=="$!"||s++;r=l}while(r);Ir(t)}function an(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function Ji(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var r=e.data;if(r==="$"||r==="$!"||r==="$?"){if(t===0)return e;t--}else r==="/$"&&t++}e=e.previousSibling}return null}var Zn=Math.random().toString(36).slice(2),Ft="__reactFiber$"+Zn,Fr="__reactProps$"+Zn,Vt="__reactContainer$"+Zn,fa="__reactEvents$"+Zn,qh="__reactListeners$"+Zn,Yh="__reactHandles$"+Zn;function En(e){var t=e[Ft];if(t)return t;for(var r=e.parentNode;r;){if(t=r[Vt]||r[Ft]){if(r=t.alternate,t.child!==null||r!==null&&r.child!==null)for(e=Ji(e);e!==null;){if(r=e[Ft])return r;e=Ji(e)}return t}e=r,r=e.parentNode}return null}function Wr(e){return e=e[Ft]||e[Vt],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function er(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(c(33))}function $s(e){return e[Fr]||null}var xa=[],tr=-1;function on(e){return{current:e}}function Oe(e){0>tr||(e.current=xa[tr],xa[tr]=null,tr--)}function $e(e,t){tr++,xa[tr]=e.current,e.current=t}var cn={},ot=on(cn),ft=on(!1),Tn=cn;function nr(e,t){var r=e.type.contextTypes;if(!r)return cn;var s=e.stateNode;if(s&&s.__reactInternalMemoizedUnmaskedChildContext===t)return s.__reactInternalMemoizedMaskedChildContext;var l={},a;for(a in r)l[a]=t[a];return s&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=l),l}function xt(e){return e=e.childContextTypes,e!=null}function Us(){Oe(ft),Oe(ot)}function Zi(e,t,r){if(ot.current!==cn)throw Error(c(168));$e(ot,t),$e(ft,r)}function ec(e,t,r){var s=e.stateNode;if(t=t.childContextTypes,typeof s.getChildContext!="function")return r;s=s.getChildContext();for(var l in s)if(!(l in t))throw Error(c(108,Ie(e)||"Unknown",l));return G({},r,s)}function Os(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||cn,Tn=ot.current,$e(ot,e),$e(ft,ft.current),!0}function tc(e,t,r){var s=e.stateNode;if(!s)throw Error(c(169));r?(e=ec(e,t,Tn),s.__reactInternalMemoizedMergedChildContext=e,Oe(ft),Oe(ot),$e(ot,e)):Oe(ft),$e(ft,r)}var Gt=null,Fs=!1,ga=!1;function nc(e){Gt===null?Gt=[e]:Gt.push(e)}function Qh(e){Fs=!0,nc(e)}function un(){if(!ga&&Gt!==null){ga=!0;var e=0,t=Ae;try{var r=Gt;for(Ae=1;e<r.length;e++){var s=r[e];do s=s(!0);while(s!==null)}Gt=null,Fs=!1}catch(l){throw Gt!==null&&(Gt=Gt.slice(e+1)),si(Ul,un),l}finally{Ae=t,ga=!1}}return null}var rr=[],sr=0,Ws=null,Bs=0,Ct=[],St=0,Pn=null,qt=1,Yt="";function In(e,t){rr[sr++]=Bs,rr[sr++]=Ws,Ws=e,Bs=t}function rc(e,t,r){Ct[St++]=qt,Ct[St++]=Yt,Ct[St++]=Pn,Pn=e;var s=qt;e=Yt;var l=32-Mt(s)-1;s&=~(1<<l),r+=1;var a=32-Mt(t)+l;if(30<a){var d=l-l%5;a=(s&(1<<d)-1).toString(32),s>>=d,l-=d,qt=1<<32-Mt(t)+l|r<<l|s,Yt=a+e}else qt=1<<a|r<<l|s,Yt=e}function ya(e){e.return!==null&&(In(e,1),rc(e,1,0))}function va(e){for(;e===Ws;)Ws=rr[--sr],rr[sr]=null,Bs=rr[--sr],rr[sr]=null;for(;e===Pn;)Pn=Ct[--St],Ct[St]=null,Yt=Ct[--St],Ct[St]=null,qt=Ct[--St],Ct[St]=null}var bt=null,Nt=null,We=!1,Rt=null;function sc(e,t){var r=It(5,null,null,0);r.elementType="DELETED",r.stateNode=t,r.return=e,t=e.deletions,t===null?(e.deletions=[r],e.flags|=16):t.push(r)}function lc(e,t){switch(e.tag){case 5:var r=e.type;return t=t.nodeType!==1||r.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,bt=e,Nt=an(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,bt=e,Nt=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(r=Pn!==null?{id:qt,overflow:Yt}:null,e.memoizedState={dehydrated:t,treeContext:r,retryLane:1073741824},r=It(18,null,null,0),r.stateNode=t,r.return=e,e.child=r,bt=e,Nt=null,!0):!1;default:return!1}}function wa(e){return(e.mode&1)!==0&&(e.flags&128)===0}function ja(e){if(We){var t=Nt;if(t){var r=t;if(!lc(e,t)){if(wa(e))throw Error(c(418));t=an(r.nextSibling);var s=bt;t&&lc(e,t)?sc(s,r):(e.flags=e.flags&-4097|2,We=!1,bt=e)}}else{if(wa(e))throw Error(c(418));e.flags=e.flags&-4097|2,We=!1,bt=e}}}function ac(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;bt=e}function Hs(e){if(e!==bt)return!1;if(!We)return ac(e),We=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!ha(e.type,e.memoizedProps)),t&&(t=Nt)){if(wa(e))throw oc(),Error(c(418));for(;t;)sc(e,t),t=an(t.nextSibling)}if(ac(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(c(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var r=e.data;if(r==="/$"){if(t===0){Nt=an(e.nextSibling);break e}t--}else r!=="$"&&r!=="$!"&&r!=="$?"||t++}e=e.nextSibling}Nt=null}}else Nt=bt?an(e.stateNode.nextSibling):null;return!0}function oc(){for(var e=Nt;e;)e=an(e.nextSibling)}function lr(){Nt=bt=null,We=!1}function ba(e){Rt===null?Rt=[e]:Rt.push(e)}var Kh=ne.ReactCurrentBatchConfig;function Br(e,t,r){if(e=r.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(r._owner){if(r=r._owner,r){if(r.tag!==1)throw Error(c(309));var s=r.stateNode}if(!s)throw Error(c(147,e));var l=s,a=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===a?t.ref:(t=function(d){var f=l.refs;d===null?delete f[a]:f[a]=d},t._stringRef=a,t)}if(typeof e!="string")throw Error(c(284));if(!r._owner)throw Error(c(290,e))}return e}function Vs(e,t){throw e=Object.prototype.toString.call(t),Error(c(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function ic(e){var t=e._init;return t(e._payload)}function cc(e){function t(S,N){if(e){var E=S.deletions;E===null?(S.deletions=[N],S.flags|=16):E.push(N)}}function r(S,N){if(!e)return null;for(;N!==null;)t(S,N),N=N.sibling;return null}function s(S,N){for(S=new Map;N!==null;)N.key!==null?S.set(N.key,N):S.set(N.index,N),N=N.sibling;return S}function l(S,N){return S=yn(S,N),S.index=0,S.sibling=null,S}function a(S,N,E){return S.index=E,e?(E=S.alternate,E!==null?(E=E.index,E<N?(S.flags|=2,N):E):(S.flags|=2,N)):(S.flags|=1048576,N)}function d(S){return e&&S.alternate===null&&(S.flags|=2),S}function f(S,N,E,U){return N===null||N.tag!==6?(N=mo(E,S.mode,U),N.return=S,N):(N=l(N,E),N.return=S,N)}function j(S,N,E,U){var ee=E.type;return ee===Re?D(S,N,E.props.children,U,E.key):N!==null&&(N.elementType===ee||typeof ee=="object"&&ee!==null&&ee.$$typeof===Ge&&ic(ee)===N.type)?(U=l(N,E.props),U.ref=Br(S,N,E),U.return=S,U):(U=fl(E.type,E.key,E.props,null,S.mode,U),U.ref=Br(S,N,E),U.return=S,U)}function P(S,N,E,U){return N===null||N.tag!==4||N.stateNode.containerInfo!==E.containerInfo||N.stateNode.implementation!==E.implementation?(N=fo(E,S.mode,U),N.return=S,N):(N=l(N,E.children||[]),N.return=S,N)}function D(S,N,E,U,ee){return N===null||N.tag!==7?(N=$n(E,S.mode,U,ee),N.return=S,N):(N=l(N,E),N.return=S,N)}function $(S,N,E){if(typeof N=="string"&&N!==""||typeof N=="number")return N=mo(""+N,S.mode,E),N.return=S,N;if(typeof N=="object"&&N!==null){switch(N.$$typeof){case ye:return E=fl(N.type,N.key,N.props,null,S.mode,E),E.ref=Br(S,null,N),E.return=S,E;case Y:return N=fo(N,S.mode,E),N.return=S,N;case Ge:var U=N._init;return $(S,U(N._payload),E)}if(ke(N)||X(N))return N=$n(N,S.mode,E,null),N.return=S,N;Vs(S,N)}return null}function z(S,N,E,U){var ee=N!==null?N.key:null;if(typeof E=="string"&&E!==""||typeof E=="number")return ee!==null?null:f(S,N,""+E,U);if(typeof E=="object"&&E!==null){switch(E.$$typeof){case ye:return E.key===ee?j(S,N,E,U):null;case Y:return E.key===ee?P(S,N,E,U):null;case Ge:return ee=E._init,z(S,N,ee(E._payload),U)}if(ke(E)||X(E))return ee!==null?null:D(S,N,E,U,null);Vs(S,E)}return null}function Q(S,N,E,U,ee){if(typeof U=="string"&&U!==""||typeof U=="number")return S=S.get(E)||null,f(N,S,""+U,ee);if(typeof U=="object"&&U!==null){switch(U.$$typeof){case ye:return S=S.get(U.key===null?E:U.key)||null,j(N,S,U,ee);case Y:return S=S.get(U.key===null?E:U.key)||null,P(N,S,U,ee);case Ge:var re=U._init;return Q(S,N,E,re(U._payload),ee)}if(ke(U)||X(U))return S=S.get(E)||null,D(N,S,U,ee,null);Vs(N,U)}return null}function J(S,N,E,U){for(var ee=null,re=null,se=N,ce=N=0,rt=null;se!==null&&ce<E.length;ce++){se.index>ce?(rt=se,se=null):rt=se.sibling;var _e=z(S,se,E[ce],U);if(_e===null){se===null&&(se=rt);break}e&&se&&_e.alternate===null&&t(S,se),N=a(_e,N,ce),re===null?ee=_e:re.sibling=_e,re=_e,se=rt}if(ce===E.length)return r(S,se),We&&In(S,ce),ee;if(se===null){for(;ce<E.length;ce++)se=$(S,E[ce],U),se!==null&&(N=a(se,N,ce),re===null?ee=se:re.sibling=se,re=se);return We&&In(S,ce),ee}for(se=s(S,se);ce<E.length;ce++)rt=Q(se,S,ce,E[ce],U),rt!==null&&(e&&rt.alternate!==null&&se.delete(rt.key===null?ce:rt.key),N=a(rt,N,ce),re===null?ee=rt:re.sibling=rt,re=rt);return e&&se.forEach(function(vn){return t(S,vn)}),We&&In(S,ce),ee}function Z(S,N,E,U){var ee=X(E);if(typeof ee!="function")throw Error(c(150));if(E=ee.call(E),E==null)throw Error(c(151));for(var re=ee=null,se=N,ce=N=0,rt=null,_e=E.next();se!==null&&!_e.done;ce++,_e=E.next()){se.index>ce?(rt=se,se=null):rt=se.sibling;var vn=z(S,se,_e.value,U);if(vn===null){se===null&&(se=rt);break}e&&se&&vn.alternate===null&&t(S,se),N=a(vn,N,ce),re===null?ee=vn:re.sibling=vn,re=vn,se=rt}if(_e.done)return r(S,se),We&&In(S,ce),ee;if(se===null){for(;!_e.done;ce++,_e=E.next())_e=$(S,_e.value,U),_e!==null&&(N=a(_e,N,ce),re===null?ee=_e:re.sibling=_e,re=_e);return We&&In(S,ce),ee}for(se=s(S,se);!_e.done;ce++,_e=E.next())_e=Q(se,S,ce,_e.value,U),_e!==null&&(e&&_e.alternate!==null&&se.delete(_e.key===null?ce:_e.key),N=a(_e,N,ce),re===null?ee=_e:re.sibling=_e,re=_e);return e&&se.forEach(function(Pp){return t(S,Pp)}),We&&In(S,ce),ee}function Qe(S,N,E,U){if(typeof E=="object"&&E!==null&&E.type===Re&&E.key===null&&(E=E.props.children),typeof E=="object"&&E!==null){switch(E.$$typeof){case ye:e:{for(var ee=E.key,re=N;re!==null;){if(re.key===ee){if(ee=E.type,ee===Re){if(re.tag===7){r(S,re.sibling),N=l(re,E.props.children),N.return=S,S=N;break e}}else if(re.elementType===ee||typeof ee=="object"&&ee!==null&&ee.$$typeof===Ge&&ic(ee)===re.type){r(S,re.sibling),N=l(re,E.props),N.ref=Br(S,re,E),N.return=S,S=N;break e}r(S,re);break}else t(S,re);re=re.sibling}E.type===Re?(N=$n(E.props.children,S.mode,U,E.key),N.return=S,S=N):(U=fl(E.type,E.key,E.props,null,S.mode,U),U.ref=Br(S,N,E),U.return=S,S=U)}return d(S);case Y:e:{for(re=E.key;N!==null;){if(N.key===re)if(N.tag===4&&N.stateNode.containerInfo===E.containerInfo&&N.stateNode.implementation===E.implementation){r(S,N.sibling),N=l(N,E.children||[]),N.return=S,S=N;break e}else{r(S,N);break}else t(S,N);N=N.sibling}N=fo(E,S.mode,U),N.return=S,S=N}return d(S);case Ge:return re=E._init,Qe(S,N,re(E._payload),U)}if(ke(E))return J(S,N,E,U);if(X(E))return Z(S,N,E,U);Vs(S,E)}return typeof E=="string"&&E!==""||typeof E=="number"?(E=""+E,N!==null&&N.tag===6?(r(S,N.sibling),N=l(N,E),N.return=S,S=N):(r(S,N),N=mo(E,S.mode,U),N.return=S,S=N),d(S)):r(S,N)}return Qe}var ar=cc(!0),uc=cc(!1),Gs=on(null),qs=null,or=null,Na=null;function ka(){Na=or=qs=null}function Ca(e){var t=Gs.current;Oe(Gs),e._currentValue=t}function Sa(e,t,r){for(;e!==null;){var s=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,s!==null&&(s.childLanes|=t)):s!==null&&(s.childLanes&t)!==t&&(s.childLanes|=t),e===r)break;e=e.return}}function ir(e,t){qs=e,Na=or=null,e=e.dependencies,e!==null&&e.firstContext!==null&&((e.lanes&t)!==0&&(gt=!0),e.firstContext=null)}function Et(e){var t=e._currentValue;if(Na!==e)if(e={context:e,memoizedValue:t,next:null},or===null){if(qs===null)throw Error(c(308));or=e,qs.dependencies={lanes:0,firstContext:e}}else or=or.next=e;return t}var Mn=null;function Ea(e){Mn===null?Mn=[e]:Mn.push(e)}function dc(e,t,r,s){var l=t.interleaved;return l===null?(r.next=r,Ea(t)):(r.next=l.next,l.next=r),t.interleaved=r,Qt(e,s)}function Qt(e,t){e.lanes|=t;var r=e.alternate;for(r!==null&&(r.lanes|=t),r=e,e=e.return;e!==null;)e.childLanes|=t,r=e.alternate,r!==null&&(r.childLanes|=t),r=e,e=e.return;return r.tag===3?r.stateNode:null}var dn=!1;function Ta(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function hc(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Kt(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function hn(e,t,r){var s=e.updateQueue;if(s===null)return null;if(s=s.shared,(Te&2)!==0){var l=s.pending;return l===null?t.next=t:(t.next=l.next,l.next=t),s.pending=t,Qt(e,r)}return l=s.interleaved,l===null?(t.next=t,Ea(s)):(t.next=l.next,l.next=t),s.interleaved=t,Qt(e,r)}function Ys(e,t,r){if(t=t.updateQueue,t!==null&&(t=t.shared,(r&4194240)!==0)){var s=t.lanes;s&=e.pendingLanes,r|=s,t.lanes=r,Wl(e,r)}}function pc(e,t){var r=e.updateQueue,s=e.alternate;if(s!==null&&(s=s.updateQueue,r===s)){var l=null,a=null;if(r=r.firstBaseUpdate,r!==null){do{var d={eventTime:r.eventTime,lane:r.lane,tag:r.tag,payload:r.payload,callback:r.callback,next:null};a===null?l=a=d:a=a.next=d,r=r.next}while(r!==null);a===null?l=a=t:a=a.next=t}else l=a=t;r={baseState:s.baseState,firstBaseUpdate:l,lastBaseUpdate:a,shared:s.shared,effects:s.effects},e.updateQueue=r;return}e=r.lastBaseUpdate,e===null?r.firstBaseUpdate=t:e.next=t,r.lastBaseUpdate=t}function Qs(e,t,r,s){var l=e.updateQueue;dn=!1;var a=l.firstBaseUpdate,d=l.lastBaseUpdate,f=l.shared.pending;if(f!==null){l.shared.pending=null;var j=f,P=j.next;j.next=null,d===null?a=P:d.next=P,d=j;var D=e.alternate;D!==null&&(D=D.updateQueue,f=D.lastBaseUpdate,f!==d&&(f===null?D.firstBaseUpdate=P:f.next=P,D.lastBaseUpdate=j))}if(a!==null){var $=l.baseState;d=0,D=P=j=null,f=a;do{var z=f.lane,Q=f.eventTime;if((s&z)===z){D!==null&&(D=D.next={eventTime:Q,lane:0,tag:f.tag,payload:f.payload,callback:f.callback,next:null});e:{var J=e,Z=f;switch(z=t,Q=r,Z.tag){case 1:if(J=Z.payload,typeof J=="function"){$=J.call(Q,$,z);break e}$=J;break e;case 3:J.flags=J.flags&-65537|128;case 0:if(J=Z.payload,z=typeof J=="function"?J.call(Q,$,z):J,z==null)break e;$=G({},$,z);break e;case 2:dn=!0}}f.callback!==null&&f.lane!==0&&(e.flags|=64,z=l.effects,z===null?l.effects=[f]:z.push(f))}else Q={eventTime:Q,lane:z,tag:f.tag,payload:f.payload,callback:f.callback,next:null},D===null?(P=D=Q,j=$):D=D.next=Q,d|=z;if(f=f.next,f===null){if(f=l.shared.pending,f===null)break;z=f,f=z.next,z.next=null,l.lastBaseUpdate=z,l.shared.pending=null}}while(!0);if(D===null&&(j=$),l.baseState=j,l.firstBaseUpdate=P,l.lastBaseUpdate=D,t=l.shared.interleaved,t!==null){l=t;do d|=l.lane,l=l.next;while(l!==t)}else a===null&&(l.shared.lanes=0);An|=d,e.lanes=d,e.memoizedState=$}}function mc(e,t,r){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var s=e[t],l=s.callback;if(l!==null){if(s.callback=null,s=r,typeof l!="function")throw Error(c(191,l));l.call(s)}}}var Hr={},Wt=on(Hr),Vr=on(Hr),Gr=on(Hr);function _n(e){if(e===Hr)throw Error(c(174));return e}function Pa(e,t){switch($e(Gr,t),$e(Vr,e),$e(Wt,Hr),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:vr(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=vr(t,e)}Oe(Wt),$e(Wt,t)}function cr(){Oe(Wt),Oe(Vr),Oe(Gr)}function fc(e){_n(Gr.current);var t=_n(Wt.current),r=vr(t,e.type);t!==r&&($e(Vr,e),$e(Wt,r))}function Ia(e){Vr.current===e&&(Oe(Wt),Oe(Vr))}var He=on(0);function Ks(e){for(var t=e;t!==null;){if(t.tag===13){var r=t.memoizedState;if(r!==null&&(r=r.dehydrated,r===null||r.data==="$?"||r.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Ma=[];function _a(){for(var e=0;e<Ma.length;e++)Ma[e]._workInProgressVersionPrimary=null;Ma.length=0}var Xs=ne.ReactCurrentDispatcher,Ra=ne.ReactCurrentBatchConfig,Rn=0,Ve=null,Ze=null,tt=null,Js=!1,qr=!1,Yr=0,Xh=0;function it(){throw Error(c(321))}function Aa(e,t){if(t===null)return!1;for(var r=0;r<t.length&&r<e.length;r++)if(!_t(e[r],t[r]))return!1;return!0}function La(e,t,r,s,l,a){if(Rn=a,Ve=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Xs.current=e===null||e.memoizedState===null?tp:np,e=r(s,l),qr){a=0;do{if(qr=!1,Yr=0,25<=a)throw Error(c(301));a+=1,tt=Ze=null,t.updateQueue=null,Xs.current=rp,e=r(s,l)}while(qr)}if(Xs.current=tl,t=Ze!==null&&Ze.next!==null,Rn=0,tt=Ze=Ve=null,Js=!1,t)throw Error(c(300));return e}function za(){var e=Yr!==0;return Yr=0,e}function Bt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return tt===null?Ve.memoizedState=tt=e:tt=tt.next=e,tt}function Tt(){if(Ze===null){var e=Ve.alternate;e=e!==null?e.memoizedState:null}else e=Ze.next;var t=tt===null?Ve.memoizedState:tt.next;if(t!==null)tt=t,Ze=e;else{if(e===null)throw Error(c(310));Ze=e,e={memoizedState:Ze.memoizedState,baseState:Ze.baseState,baseQueue:Ze.baseQueue,queue:Ze.queue,next:null},tt===null?Ve.memoizedState=tt=e:tt=tt.next=e}return tt}function Qr(e,t){return typeof t=="function"?t(e):t}function Da(e){var t=Tt(),r=t.queue;if(r===null)throw Error(c(311));r.lastRenderedReducer=e;var s=Ze,l=s.baseQueue,a=r.pending;if(a!==null){if(l!==null){var d=l.next;l.next=a.next,a.next=d}s.baseQueue=l=a,r.pending=null}if(l!==null){a=l.next,s=s.baseState;var f=d=null,j=null,P=a;do{var D=P.lane;if((Rn&D)===D)j!==null&&(j=j.next={lane:0,action:P.action,hasEagerState:P.hasEagerState,eagerState:P.eagerState,next:null}),s=P.hasEagerState?P.eagerState:e(s,P.action);else{var $={lane:D,action:P.action,hasEagerState:P.hasEagerState,eagerState:P.eagerState,next:null};j===null?(f=j=$,d=s):j=j.next=$,Ve.lanes|=D,An|=D}P=P.next}while(P!==null&&P!==a);j===null?d=s:j.next=f,_t(s,t.memoizedState)||(gt=!0),t.memoizedState=s,t.baseState=d,t.baseQueue=j,r.lastRenderedState=s}if(e=r.interleaved,e!==null){l=e;do a=l.lane,Ve.lanes|=a,An|=a,l=l.next;while(l!==e)}else l===null&&(r.lanes=0);return[t.memoizedState,r.dispatch]}function $a(e){var t=Tt(),r=t.queue;if(r===null)throw Error(c(311));r.lastRenderedReducer=e;var s=r.dispatch,l=r.pending,a=t.memoizedState;if(l!==null){r.pending=null;var d=l=l.next;do a=e(a,d.action),d=d.next;while(d!==l);_t(a,t.memoizedState)||(gt=!0),t.memoizedState=a,t.baseQueue===null&&(t.baseState=a),r.lastRenderedState=a}return[a,s]}function xc(){}function gc(e,t){var r=Ve,s=Tt(),l=t(),a=!_t(s.memoizedState,l);if(a&&(s.memoizedState=l,gt=!0),s=s.queue,Ua(wc.bind(null,r,s,e),[e]),s.getSnapshot!==t||a||tt!==null&&tt.memoizedState.tag&1){if(r.flags|=2048,Kr(9,vc.bind(null,r,s,l,t),void 0,null),nt===null)throw Error(c(349));(Rn&30)!==0||yc(r,t,l)}return l}function yc(e,t,r){e.flags|=16384,e={getSnapshot:t,value:r},t=Ve.updateQueue,t===null?(t={lastEffect:null,stores:null},Ve.updateQueue=t,t.stores=[e]):(r=t.stores,r===null?t.stores=[e]:r.push(e))}function vc(e,t,r,s){t.value=r,t.getSnapshot=s,jc(t)&&bc(e)}function wc(e,t,r){return r(function(){jc(t)&&bc(e)})}function jc(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!_t(e,r)}catch{return!0}}function bc(e){var t=Qt(e,1);t!==null&&Dt(t,e,1,-1)}function Nc(e){var t=Bt();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Qr,lastRenderedState:e},t.queue=e,e=e.dispatch=ep.bind(null,Ve,e),[t.memoizedState,e]}function Kr(e,t,r,s){return e={tag:e,create:t,destroy:r,deps:s,next:null},t=Ve.updateQueue,t===null?(t={lastEffect:null,stores:null},Ve.updateQueue=t,t.lastEffect=e.next=e):(r=t.lastEffect,r===null?t.lastEffect=e.next=e:(s=r.next,r.next=e,e.next=s,t.lastEffect=e)),e}function kc(){return Tt().memoizedState}function Zs(e,t,r,s){var l=Bt();Ve.flags|=e,l.memoizedState=Kr(1|t,r,void 0,s===void 0?null:s)}function el(e,t,r,s){var l=Tt();s=s===void 0?null:s;var a=void 0;if(Ze!==null){var d=Ze.memoizedState;if(a=d.destroy,s!==null&&Aa(s,d.deps)){l.memoizedState=Kr(t,r,a,s);return}}Ve.flags|=e,l.memoizedState=Kr(1|t,r,a,s)}function Cc(e,t){return Zs(8390656,8,e,t)}function Ua(e,t){return el(2048,8,e,t)}function Sc(e,t){return el(4,2,e,t)}function Ec(e,t){return el(4,4,e,t)}function Tc(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function Pc(e,t,r){return r=r!=null?r.concat([e]):null,el(4,4,Tc.bind(null,t,e),r)}function Oa(){}function Ic(e,t){var r=Tt();t=t===void 0?null:t;var s=r.memoizedState;return s!==null&&t!==null&&Aa(t,s[1])?s[0]:(r.memoizedState=[e,t],e)}function Mc(e,t){var r=Tt();t=t===void 0?null:t;var s=r.memoizedState;return s!==null&&t!==null&&Aa(t,s[1])?s[0]:(e=e(),r.memoizedState=[e,t],e)}function _c(e,t,r){return(Rn&21)===0?(e.baseState&&(e.baseState=!1,gt=!0),e.memoizedState=r):(_t(r,t)||(r=ii(),Ve.lanes|=r,An|=r,e.baseState=!0),t)}function Jh(e,t){var r=Ae;Ae=r!==0&&4>r?r:4,e(!0);var s=Ra.transition;Ra.transition={};try{e(!1),t()}finally{Ae=r,Ra.transition=s}}function Rc(){return Tt().memoizedState}function Zh(e,t,r){var s=xn(e);if(r={lane:s,action:r,hasEagerState:!1,eagerState:null,next:null},Ac(e))Lc(t,r);else if(r=dc(e,t,r,s),r!==null){var l=mt();Dt(r,e,s,l),zc(r,t,s)}}function ep(e,t,r){var s=xn(e),l={lane:s,action:r,hasEagerState:!1,eagerState:null,next:null};if(Ac(e))Lc(t,l);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var d=t.lastRenderedState,f=a(d,r);if(l.hasEagerState=!0,l.eagerState=f,_t(f,d)){var j=t.interleaved;j===null?(l.next=l,Ea(t)):(l.next=j.next,j.next=l),t.interleaved=l;return}}catch{}r=dc(e,t,l,s),r!==null&&(l=mt(),Dt(r,e,s,l),zc(r,t,s))}}function Ac(e){var t=e.alternate;return e===Ve||t!==null&&t===Ve}function Lc(e,t){qr=Js=!0;var r=e.pending;r===null?t.next=t:(t.next=r.next,r.next=t),e.pending=t}function zc(e,t,r){if((r&4194240)!==0){var s=t.lanes;s&=e.pendingLanes,r|=s,t.lanes=r,Wl(e,r)}}var tl={readContext:Et,useCallback:it,useContext:it,useEffect:it,useImperativeHandle:it,useInsertionEffect:it,useLayoutEffect:it,useMemo:it,useReducer:it,useRef:it,useState:it,useDebugValue:it,useDeferredValue:it,useTransition:it,useMutableSource:it,useSyncExternalStore:it,useId:it,unstable_isNewReconciler:!1},tp={readContext:Et,useCallback:function(e,t){return Bt().memoizedState=[e,t===void 0?null:t],e},useContext:Et,useEffect:Cc,useImperativeHandle:function(e,t,r){return r=r!=null?r.concat([e]):null,Zs(4194308,4,Tc.bind(null,t,e),r)},useLayoutEffect:function(e,t){return Zs(4194308,4,e,t)},useInsertionEffect:function(e,t){return Zs(4,2,e,t)},useMemo:function(e,t){var r=Bt();return t=t===void 0?null:t,e=e(),r.memoizedState=[e,t],e},useReducer:function(e,t,r){var s=Bt();return t=r!==void 0?r(t):t,s.memoizedState=s.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},s.queue=e,e=e.dispatch=Zh.bind(null,Ve,e),[s.memoizedState,e]},useRef:function(e){var t=Bt();return e={current:e},t.memoizedState=e},useState:Nc,useDebugValue:Oa,useDeferredValue:function(e){return Bt().memoizedState=e},useTransition:function(){var e=Nc(!1),t=e[0];return e=Jh.bind(null,e[1]),Bt().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,r){var s=Ve,l=Bt();if(We){if(r===void 0)throw Error(c(407));r=r()}else{if(r=t(),nt===null)throw Error(c(349));(Rn&30)!==0||yc(s,t,r)}l.memoizedState=r;var a={value:r,getSnapshot:t};return l.queue=a,Cc(wc.bind(null,s,a,e),[e]),s.flags|=2048,Kr(9,vc.bind(null,s,a,r,t),void 0,null),r},useId:function(){var e=Bt(),t=nt.identifierPrefix;if(We){var r=Yt,s=qt;r=(s&~(1<<32-Mt(s)-1)).toString(32)+r,t=":"+t+"R"+r,r=Yr++,0<r&&(t+="H"+r.toString(32)),t+=":"}else r=Xh++,t=":"+t+"r"+r.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},np={readContext:Et,useCallback:Ic,useContext:Et,useEffect:Ua,useImperativeHandle:Pc,useInsertionEffect:Sc,useLayoutEffect:Ec,useMemo:Mc,useReducer:Da,useRef:kc,useState:function(){return Da(Qr)},useDebugValue:Oa,useDeferredValue:function(e){var t=Tt();return _c(t,Ze.memoizedState,e)},useTransition:function(){var e=Da(Qr)[0],t=Tt().memoizedState;return[e,t]},useMutableSource:xc,useSyncExternalStore:gc,useId:Rc,unstable_isNewReconciler:!1},rp={readContext:Et,useCallback:Ic,useContext:Et,useEffect:Ua,useImperativeHandle:Pc,useInsertionEffect:Sc,useLayoutEffect:Ec,useMemo:Mc,useReducer:$a,useRef:kc,useState:function(){return $a(Qr)},useDebugValue:Oa,useDeferredValue:function(e){var t=Tt();return Ze===null?t.memoizedState=e:_c(t,Ze.memoizedState,e)},useTransition:function(){var e=$a(Qr)[0],t=Tt().memoizedState;return[e,t]},useMutableSource:xc,useSyncExternalStore:gc,useId:Rc,unstable_isNewReconciler:!1};function At(e,t){if(e&&e.defaultProps){t=G({},t),e=e.defaultProps;for(var r in e)t[r]===void 0&&(t[r]=e[r]);return t}return t}function Fa(e,t,r,s){t=e.memoizedState,r=r(s,t),r=r==null?t:G({},t,r),e.memoizedState=r,e.lanes===0&&(e.updateQueue.baseState=r)}var nl={isMounted:function(e){return(e=e._reactInternals)?Sn(e)===e:!1},enqueueSetState:function(e,t,r){e=e._reactInternals;var s=mt(),l=xn(e),a=Kt(s,l);a.payload=t,r!=null&&(a.callback=r),t=hn(e,a,l),t!==null&&(Dt(t,e,l,s),Ys(t,e,l))},enqueueReplaceState:function(e,t,r){e=e._reactInternals;var s=mt(),l=xn(e),a=Kt(s,l);a.tag=1,a.payload=t,r!=null&&(a.callback=r),t=hn(e,a,l),t!==null&&(Dt(t,e,l,s),Ys(t,e,l))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var r=mt(),s=xn(e),l=Kt(r,s);l.tag=2,t!=null&&(l.callback=t),t=hn(e,l,s),t!==null&&(Dt(t,e,s,r),Ys(t,e,s))}};function Dc(e,t,r,s,l,a,d){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(s,a,d):t.prototype&&t.prototype.isPureReactComponent?!zr(r,s)||!zr(l,a):!0}function $c(e,t,r){var s=!1,l=cn,a=t.contextType;return typeof a=="object"&&a!==null?a=Et(a):(l=xt(t)?Tn:ot.current,s=t.contextTypes,a=(s=s!=null)?nr(e,l):cn),t=new t(r,a),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=nl,e.stateNode=t,t._reactInternals=e,s&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=l,e.__reactInternalMemoizedMaskedChildContext=a),t}function Uc(e,t,r,s){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(r,s),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(r,s),t.state!==e&&nl.enqueueReplaceState(t,t.state,null)}function Wa(e,t,r,s){var l=e.stateNode;l.props=r,l.state=e.memoizedState,l.refs={},Ta(e);var a=t.contextType;typeof a=="object"&&a!==null?l.context=Et(a):(a=xt(t)?Tn:ot.current,l.context=nr(e,a)),l.state=e.memoizedState,a=t.getDerivedStateFromProps,typeof a=="function"&&(Fa(e,t,a,r),l.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof l.getSnapshotBeforeUpdate=="function"||typeof l.UNSAFE_componentWillMount!="function"&&typeof l.componentWillMount!="function"||(t=l.state,typeof l.componentWillMount=="function"&&l.componentWillMount(),typeof l.UNSAFE_componentWillMount=="function"&&l.UNSAFE_componentWillMount(),t!==l.state&&nl.enqueueReplaceState(l,l.state,null),Qs(e,r,l,s),l.state=e.memoizedState),typeof l.componentDidMount=="function"&&(e.flags|=4194308)}function ur(e,t){try{var r="",s=t;do r+=we(s),s=s.return;while(s);var l=r}catch(a){l=`
|
|
7
|
+
Error generating stack: `+a.message+`
|
|
8
|
+
`+a.stack}return{value:e,source:t,stack:l,digest:null}}function Ba(e,t,r){return{value:e,source:null,stack:r??null,digest:t??null}}function Ha(e,t){try{console.error(t.value)}catch(r){setTimeout(function(){throw r})}}var sp=typeof WeakMap=="function"?WeakMap:Map;function Oc(e,t,r){r=Kt(-1,r),r.tag=3,r.payload={element:null};var s=t.value;return r.callback=function(){cl||(cl=!0,lo=s),Ha(e,t)},r}function Fc(e,t,r){r=Kt(-1,r),r.tag=3;var s=e.type.getDerivedStateFromError;if(typeof s=="function"){var l=t.value;r.payload=function(){return s(l)},r.callback=function(){Ha(e,t)}}var a=e.stateNode;return a!==null&&typeof a.componentDidCatch=="function"&&(r.callback=function(){Ha(e,t),typeof s!="function"&&(mn===null?mn=new Set([this]):mn.add(this));var d=t.stack;this.componentDidCatch(t.value,{componentStack:d!==null?d:""})}),r}function Wc(e,t,r){var s=e.pingCache;if(s===null){s=e.pingCache=new sp;var l=new Set;s.set(t,l)}else l=s.get(t),l===void 0&&(l=new Set,s.set(t,l));l.has(r)||(l.add(r),e=yp.bind(null,e,t,r),t.then(e,e))}function Bc(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function Hc(e,t,r,s,l){return(e.mode&1)===0?(e===t?e.flags|=65536:(e.flags|=128,r.flags|=131072,r.flags&=-52805,r.tag===1&&(r.alternate===null?r.tag=17:(t=Kt(-1,1),t.tag=2,hn(r,t,1))),r.lanes|=1),e):(e.flags|=65536,e.lanes=l,e)}var lp=ne.ReactCurrentOwner,gt=!1;function pt(e,t,r,s){t.child=e===null?uc(t,null,r,s):ar(t,e.child,r,s)}function Vc(e,t,r,s,l){r=r.render;var a=t.ref;return ir(t,l),s=La(e,t,r,s,a,l),r=za(),e!==null&&!gt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~l,Xt(e,t,l)):(We&&r&&ya(t),t.flags|=1,pt(e,t,s,l),t.child)}function Gc(e,t,r,s,l){if(e===null){var a=r.type;return typeof a=="function"&&!po(a)&&a.defaultProps===void 0&&r.compare===null&&r.defaultProps===void 0?(t.tag=15,t.type=a,qc(e,t,a,s,l)):(e=fl(r.type,null,s,t,t.mode,l),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,(e.lanes&l)===0){var d=a.memoizedProps;if(r=r.compare,r=r!==null?r:zr,r(d,s)&&e.ref===t.ref)return Xt(e,t,l)}return t.flags|=1,e=yn(a,s),e.ref=t.ref,e.return=t,t.child=e}function qc(e,t,r,s,l){if(e!==null){var a=e.memoizedProps;if(zr(a,s)&&e.ref===t.ref)if(gt=!1,t.pendingProps=s=a,(e.lanes&l)!==0)(e.flags&131072)!==0&&(gt=!0);else return t.lanes=e.lanes,Xt(e,t,l)}return Va(e,t,r,s,l)}function Yc(e,t,r){var s=t.pendingProps,l=s.children,a=e!==null?e.memoizedState:null;if(s.mode==="hidden")if((t.mode&1)===0)t.memoizedState={baseLanes:0,cachePool:null,transitions:null},$e(hr,kt),kt|=r;else{if((r&1073741824)===0)return e=a!==null?a.baseLanes|r:r,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,$e(hr,kt),kt|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},s=a!==null?a.baseLanes:r,$e(hr,kt),kt|=s}else a!==null?(s=a.baseLanes|r,t.memoizedState=null):s=r,$e(hr,kt),kt|=s;return pt(e,t,l,r),t.child}function Qc(e,t){var r=t.ref;(e===null&&r!==null||e!==null&&e.ref!==r)&&(t.flags|=512,t.flags|=2097152)}function Va(e,t,r,s,l){var a=xt(r)?Tn:ot.current;return a=nr(t,a),ir(t,l),r=La(e,t,r,s,a,l),s=za(),e!==null&&!gt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~l,Xt(e,t,l)):(We&&s&&ya(t),t.flags|=1,pt(e,t,r,l),t.child)}function Kc(e,t,r,s,l){if(xt(r)){var a=!0;Os(t)}else a=!1;if(ir(t,l),t.stateNode===null)sl(e,t),$c(t,r,s),Wa(t,r,s,l),s=!0;else if(e===null){var d=t.stateNode,f=t.memoizedProps;d.props=f;var j=d.context,P=r.contextType;typeof P=="object"&&P!==null?P=Et(P):(P=xt(r)?Tn:ot.current,P=nr(t,P));var D=r.getDerivedStateFromProps,$=typeof D=="function"||typeof d.getSnapshotBeforeUpdate=="function";$||typeof d.UNSAFE_componentWillReceiveProps!="function"&&typeof d.componentWillReceiveProps!="function"||(f!==s||j!==P)&&Uc(t,d,s,P),dn=!1;var z=t.memoizedState;d.state=z,Qs(t,s,d,l),j=t.memoizedState,f!==s||z!==j||ft.current||dn?(typeof D=="function"&&(Fa(t,r,D,s),j=t.memoizedState),(f=dn||Dc(t,r,f,s,z,j,P))?($||typeof d.UNSAFE_componentWillMount!="function"&&typeof d.componentWillMount!="function"||(typeof d.componentWillMount=="function"&&d.componentWillMount(),typeof d.UNSAFE_componentWillMount=="function"&&d.UNSAFE_componentWillMount()),typeof d.componentDidMount=="function"&&(t.flags|=4194308)):(typeof d.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=s,t.memoizedState=j),d.props=s,d.state=j,d.context=P,s=f):(typeof d.componentDidMount=="function"&&(t.flags|=4194308),s=!1)}else{d=t.stateNode,hc(e,t),f=t.memoizedProps,P=t.type===t.elementType?f:At(t.type,f),d.props=P,$=t.pendingProps,z=d.context,j=r.contextType,typeof j=="object"&&j!==null?j=Et(j):(j=xt(r)?Tn:ot.current,j=nr(t,j));var Q=r.getDerivedStateFromProps;(D=typeof Q=="function"||typeof d.getSnapshotBeforeUpdate=="function")||typeof d.UNSAFE_componentWillReceiveProps!="function"&&typeof d.componentWillReceiveProps!="function"||(f!==$||z!==j)&&Uc(t,d,s,j),dn=!1,z=t.memoizedState,d.state=z,Qs(t,s,d,l);var J=t.memoizedState;f!==$||z!==J||ft.current||dn?(typeof Q=="function"&&(Fa(t,r,Q,s),J=t.memoizedState),(P=dn||Dc(t,r,P,s,z,J,j)||!1)?(D||typeof d.UNSAFE_componentWillUpdate!="function"&&typeof d.componentWillUpdate!="function"||(typeof d.componentWillUpdate=="function"&&d.componentWillUpdate(s,J,j),typeof d.UNSAFE_componentWillUpdate=="function"&&d.UNSAFE_componentWillUpdate(s,J,j)),typeof d.componentDidUpdate=="function"&&(t.flags|=4),typeof d.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof d.componentDidUpdate!="function"||f===e.memoizedProps&&z===e.memoizedState||(t.flags|=4),typeof d.getSnapshotBeforeUpdate!="function"||f===e.memoizedProps&&z===e.memoizedState||(t.flags|=1024),t.memoizedProps=s,t.memoizedState=J),d.props=s,d.state=J,d.context=j,s=P):(typeof d.componentDidUpdate!="function"||f===e.memoizedProps&&z===e.memoizedState||(t.flags|=4),typeof d.getSnapshotBeforeUpdate!="function"||f===e.memoizedProps&&z===e.memoizedState||(t.flags|=1024),s=!1)}return Ga(e,t,r,s,a,l)}function Ga(e,t,r,s,l,a){Qc(e,t);var d=(t.flags&128)!==0;if(!s&&!d)return l&&tc(t,r,!1),Xt(e,t,a);s=t.stateNode,lp.current=t;var f=d&&typeof r.getDerivedStateFromError!="function"?null:s.render();return t.flags|=1,e!==null&&d?(t.child=ar(t,e.child,null,a),t.child=ar(t,null,f,a)):pt(e,t,f,a),t.memoizedState=s.state,l&&tc(t,r,!0),t.child}function Xc(e){var t=e.stateNode;t.pendingContext?Zi(e,t.pendingContext,t.pendingContext!==t.context):t.context&&Zi(e,t.context,!1),Pa(e,t.containerInfo)}function Jc(e,t,r,s,l){return lr(),ba(l),t.flags|=256,pt(e,t,r,s),t.child}var qa={dehydrated:null,treeContext:null,retryLane:0};function Ya(e){return{baseLanes:e,cachePool:null,transitions:null}}function Zc(e,t,r){var s=t.pendingProps,l=He.current,a=!1,d=(t.flags&128)!==0,f;if((f=d)||(f=e!==null&&e.memoizedState===null?!1:(l&2)!==0),f?(a=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(l|=1),$e(He,l&1),e===null)return ja(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?((t.mode&1)===0?t.lanes=1:e.data==="$!"?t.lanes=8:t.lanes=1073741824,null):(d=s.children,e=s.fallback,a?(s=t.mode,a=t.child,d={mode:"hidden",children:d},(s&1)===0&&a!==null?(a.childLanes=0,a.pendingProps=d):a=xl(d,s,0,null),e=$n(e,s,r,null),a.return=t,e.return=t,a.sibling=e,t.child=a,t.child.memoizedState=Ya(r),t.memoizedState=qa,e):Qa(t,d));if(l=e.memoizedState,l!==null&&(f=l.dehydrated,f!==null))return ap(e,t,d,s,f,l,r);if(a){a=s.fallback,d=t.mode,l=e.child,f=l.sibling;var j={mode:"hidden",children:s.children};return(d&1)===0&&t.child!==l?(s=t.child,s.childLanes=0,s.pendingProps=j,t.deletions=null):(s=yn(l,j),s.subtreeFlags=l.subtreeFlags&14680064),f!==null?a=yn(f,a):(a=$n(a,d,r,null),a.flags|=2),a.return=t,s.return=t,s.sibling=a,t.child=s,s=a,a=t.child,d=e.child.memoizedState,d=d===null?Ya(r):{baseLanes:d.baseLanes|r,cachePool:null,transitions:d.transitions},a.memoizedState=d,a.childLanes=e.childLanes&~r,t.memoizedState=qa,s}return a=e.child,e=a.sibling,s=yn(a,{mode:"visible",children:s.children}),(t.mode&1)===0&&(s.lanes=r),s.return=t,s.sibling=null,e!==null&&(r=t.deletions,r===null?(t.deletions=[e],t.flags|=16):r.push(e)),t.child=s,t.memoizedState=null,s}function Qa(e,t){return t=xl({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function rl(e,t,r,s){return s!==null&&ba(s),ar(t,e.child,null,r),e=Qa(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function ap(e,t,r,s,l,a,d){if(r)return t.flags&256?(t.flags&=-257,s=Ba(Error(c(422))),rl(e,t,d,s)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(a=s.fallback,l=t.mode,s=xl({mode:"visible",children:s.children},l,0,null),a=$n(a,l,d,null),a.flags|=2,s.return=t,a.return=t,s.sibling=a,t.child=s,(t.mode&1)!==0&&ar(t,e.child,null,d),t.child.memoizedState=Ya(d),t.memoizedState=qa,a);if((t.mode&1)===0)return rl(e,t,d,null);if(l.data==="$!"){if(s=l.nextSibling&&l.nextSibling.dataset,s)var f=s.dgst;return s=f,a=Error(c(419)),s=Ba(a,s,void 0),rl(e,t,d,s)}if(f=(d&e.childLanes)!==0,gt||f){if(s=nt,s!==null){switch(d&-d){case 4:l=2;break;case 16:l=8;break;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:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:l=32;break;case 536870912:l=268435456;break;default:l=0}l=(l&(s.suspendedLanes|d))!==0?0:l,l!==0&&l!==a.retryLane&&(a.retryLane=l,Qt(e,l),Dt(s,e,l,-1))}return ho(),s=Ba(Error(c(421))),rl(e,t,d,s)}return l.data==="$?"?(t.flags|=128,t.child=e.child,t=vp.bind(null,e),l._reactRetry=t,null):(e=a.treeContext,Nt=an(l.nextSibling),bt=t,We=!0,Rt=null,e!==null&&(Ct[St++]=qt,Ct[St++]=Yt,Ct[St++]=Pn,qt=e.id,Yt=e.overflow,Pn=t),t=Qa(t,s.children),t.flags|=4096,t)}function eu(e,t,r){e.lanes|=t;var s=e.alternate;s!==null&&(s.lanes|=t),Sa(e.return,t,r)}function Ka(e,t,r,s,l){var a=e.memoizedState;a===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:s,tail:r,tailMode:l}:(a.isBackwards=t,a.rendering=null,a.renderingStartTime=0,a.last=s,a.tail=r,a.tailMode=l)}function tu(e,t,r){var s=t.pendingProps,l=s.revealOrder,a=s.tail;if(pt(e,t,s.children,r),s=He.current,(s&2)!==0)s=s&1|2,t.flags|=128;else{if(e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&eu(e,r,t);else if(e.tag===19)eu(e,r,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}s&=1}if($e(He,s),(t.mode&1)===0)t.memoizedState=null;else switch(l){case"forwards":for(r=t.child,l=null;r!==null;)e=r.alternate,e!==null&&Ks(e)===null&&(l=r),r=r.sibling;r=l,r===null?(l=t.child,t.child=null):(l=r.sibling,r.sibling=null),Ka(t,!1,l,r,a);break;case"backwards":for(r=null,l=t.child,t.child=null;l!==null;){if(e=l.alternate,e!==null&&Ks(e)===null){t.child=l;break}e=l.sibling,l.sibling=r,r=l,l=e}Ka(t,!0,r,null,a);break;case"together":Ka(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function sl(e,t){(t.mode&1)===0&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Xt(e,t,r){if(e!==null&&(t.dependencies=e.dependencies),An|=t.lanes,(r&t.childLanes)===0)return null;if(e!==null&&t.child!==e.child)throw Error(c(153));if(t.child!==null){for(e=t.child,r=yn(e,e.pendingProps),t.child=r,r.return=t;e.sibling!==null;)e=e.sibling,r=r.sibling=yn(e,e.pendingProps),r.return=t;r.sibling=null}return t.child}function op(e,t,r){switch(t.tag){case 3:Xc(t),lr();break;case 5:fc(t);break;case 1:xt(t.type)&&Os(t);break;case 4:Pa(t,t.stateNode.containerInfo);break;case 10:var s=t.type._context,l=t.memoizedProps.value;$e(Gs,s._currentValue),s._currentValue=l;break;case 13:if(s=t.memoizedState,s!==null)return s.dehydrated!==null?($e(He,He.current&1),t.flags|=128,null):(r&t.child.childLanes)!==0?Zc(e,t,r):($e(He,He.current&1),e=Xt(e,t,r),e!==null?e.sibling:null);$e(He,He.current&1);break;case 19:if(s=(r&t.childLanes)!==0,(e.flags&128)!==0){if(s)return tu(e,t,r);t.flags|=128}if(l=t.memoizedState,l!==null&&(l.rendering=null,l.tail=null,l.lastEffect=null),$e(He,He.current),s)break;return null;case 22:case 23:return t.lanes=0,Yc(e,t,r)}return Xt(e,t,r)}var nu,Xa,ru,su;nu=function(e,t){for(var r=t.child;r!==null;){if(r.tag===5||r.tag===6)e.appendChild(r.stateNode);else if(r.tag!==4&&r.child!==null){r.child.return=r,r=r.child;continue}if(r===t)break;for(;r.sibling===null;){if(r.return===null||r.return===t)return;r=r.return}r.sibling.return=r.return,r=r.sibling}},Xa=function(){},ru=function(e,t,r,s){var l=e.memoizedProps;if(l!==s){e=t.stateNode,_n(Wt.current);var a=null;switch(r){case"input":l=he(e,l),s=he(e,s),a=[];break;case"select":l=G({},l,{value:void 0}),s=G({},s,{value:void 0}),a=[];break;case"textarea":l=Me(e,l),s=Me(e,s),a=[];break;default:typeof l.onClick!="function"&&typeof s.onClick=="function"&&(e.onclick=Ds)}Ml(r,s);var d;r=null;for(P in l)if(!s.hasOwnProperty(P)&&l.hasOwnProperty(P)&&l[P]!=null)if(P==="style"){var f=l[P];for(d in f)f.hasOwnProperty(d)&&(r||(r={}),r[d]="")}else P!=="dangerouslySetInnerHTML"&&P!=="children"&&P!=="suppressContentEditableWarning"&&P!=="suppressHydrationWarning"&&P!=="autoFocus"&&(p.hasOwnProperty(P)?a||(a=[]):(a=a||[]).push(P,null));for(P in s){var j=s[P];if(f=l?.[P],s.hasOwnProperty(P)&&j!==f&&(j!=null||f!=null))if(P==="style")if(f){for(d in f)!f.hasOwnProperty(d)||j&&j.hasOwnProperty(d)||(r||(r={}),r[d]="");for(d in j)j.hasOwnProperty(d)&&f[d]!==j[d]&&(r||(r={}),r[d]=j[d])}else r||(a||(a=[]),a.push(P,r)),r=j;else P==="dangerouslySetInnerHTML"?(j=j?j.__html:void 0,f=f?f.__html:void 0,j!=null&&f!==j&&(a=a||[]).push(P,j)):P==="children"?typeof j!="string"&&typeof j!="number"||(a=a||[]).push(P,""+j):P!=="suppressContentEditableWarning"&&P!=="suppressHydrationWarning"&&(p.hasOwnProperty(P)?(j!=null&&P==="onScroll"&&Ue("scroll",e),a||f===j||(a=[])):(a=a||[]).push(P,j))}r&&(a=a||[]).push("style",r);var P=a;(t.updateQueue=P)&&(t.flags|=4)}},su=function(e,t,r,s){r!==s&&(t.flags|=4)};function Xr(e,t){if(!We)switch(e.tailMode){case"hidden":t=e.tail;for(var r=null;t!==null;)t.alternate!==null&&(r=t),t=t.sibling;r===null?e.tail=null:r.sibling=null;break;case"collapsed":r=e.tail;for(var s=null;r!==null;)r.alternate!==null&&(s=r),r=r.sibling;s===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:s.sibling=null}}function ct(e){var t=e.alternate!==null&&e.alternate.child===e.child,r=0,s=0;if(t)for(var l=e.child;l!==null;)r|=l.lanes|l.childLanes,s|=l.subtreeFlags&14680064,s|=l.flags&14680064,l.return=e,l=l.sibling;else for(l=e.child;l!==null;)r|=l.lanes|l.childLanes,s|=l.subtreeFlags,s|=l.flags,l.return=e,l=l.sibling;return e.subtreeFlags|=s,e.childLanes=r,t}function ip(e,t,r){var s=t.pendingProps;switch(va(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return ct(t),null;case 1:return xt(t.type)&&Us(),ct(t),null;case 3:return s=t.stateNode,cr(),Oe(ft),Oe(ot),_a(),s.pendingContext&&(s.context=s.pendingContext,s.pendingContext=null),(e===null||e.child===null)&&(Hs(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,Rt!==null&&(io(Rt),Rt=null))),Xa(e,t),ct(t),null;case 5:Ia(t);var l=_n(Gr.current);if(r=t.type,e!==null&&t.stateNode!=null)ru(e,t,r,s,l),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!s){if(t.stateNode===null)throw Error(c(166));return ct(t),null}if(e=_n(Wt.current),Hs(t)){s=t.stateNode,r=t.type;var a=t.memoizedProps;switch(s[Ft]=t,s[Fr]=a,e=(t.mode&1)!==0,r){case"dialog":Ue("cancel",s),Ue("close",s);break;case"iframe":case"object":case"embed":Ue("load",s);break;case"video":case"audio":for(l=0;l<$r.length;l++)Ue($r[l],s);break;case"source":Ue("error",s);break;case"img":case"image":case"link":Ue("error",s),Ue("load",s);break;case"details":Ue("toggle",s);break;case"input":xe(s,a),Ue("invalid",s);break;case"select":s._wrapperState={wasMultiple:!!a.multiple},Ue("invalid",s);break;case"textarea":De(s,a),Ue("invalid",s)}Ml(r,a),l=null;for(var d in a)if(a.hasOwnProperty(d)){var f=a[d];d==="children"?typeof f=="string"?s.textContent!==f&&(a.suppressHydrationWarning!==!0&&zs(s.textContent,f,e),l=["children",f]):typeof f=="number"&&s.textContent!==""+f&&(a.suppressHydrationWarning!==!0&&zs(s.textContent,f,e),l=["children",""+f]):p.hasOwnProperty(d)&&f!=null&&d==="onScroll"&&Ue("scroll",s)}switch(r){case"input":I(s),ze(s,a,!0);break;case"textarea":I(s),ms(s);break;case"select":case"option":break;default:typeof a.onClick=="function"&&(s.onclick=Ds)}s=l,t.updateQueue=s,s!==null&&(t.flags|=4)}else{d=l.nodeType===9?l:l.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=fs(r)),e==="http://www.w3.org/1999/xhtml"?r==="script"?(e=d.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof s.is=="string"?e=d.createElement(r,{is:s.is}):(e=d.createElement(r),r==="select"&&(d=e,s.multiple?d.multiple=!0:s.size&&(d.size=s.size))):e=d.createElementNS(e,r),e[Ft]=t,e[Fr]=s,nu(e,t,!1,!1),t.stateNode=e;e:{switch(d=_l(r,s),r){case"dialog":Ue("cancel",e),Ue("close",e),l=s;break;case"iframe":case"object":case"embed":Ue("load",e),l=s;break;case"video":case"audio":for(l=0;l<$r.length;l++)Ue($r[l],e);l=s;break;case"source":Ue("error",e),l=s;break;case"img":case"image":case"link":Ue("error",e),Ue("load",e),l=s;break;case"details":Ue("toggle",e),l=s;break;case"input":xe(e,s),l=he(e,s),Ue("invalid",e);break;case"option":l=s;break;case"select":e._wrapperState={wasMultiple:!!s.multiple},l=G({},s,{value:void 0}),Ue("invalid",e);break;case"textarea":De(e,s),l=Me(e,s),Ue("invalid",e);break;default:l=s}Ml(r,l),f=l;for(a in f)if(f.hasOwnProperty(a)){var j=f[a];a==="style"?Ut(e,j):a==="dangerouslySetInnerHTML"?(j=j?j.__html:void 0,j!=null&&Il(e,j)):a==="children"?typeof j=="string"?(r!=="textarea"||j!=="")&&Cn(e,j):typeof j=="number"&&Cn(e,""+j):a!=="suppressContentEditableWarning"&&a!=="suppressHydrationWarning"&&a!=="autoFocus"&&(p.hasOwnProperty(a)?j!=null&&a==="onScroll"&&Ue("scroll",e):j!=null&&W(e,a,j,d))}switch(r){case"input":I(e),ze(e,s,!1);break;case"textarea":I(e),ms(e);break;case"option":s.value!=null&&e.setAttribute("value",""+Ne(s.value));break;case"select":e.multiple=!!s.multiple,a=s.value,a!=null?Ee(e,!!s.multiple,a,!1):s.defaultValue!=null&&Ee(e,!!s.multiple,s.defaultValue,!0);break;default:typeof l.onClick=="function"&&(e.onclick=Ds)}switch(r){case"button":case"input":case"select":case"textarea":s=!!s.autoFocus;break e;case"img":s=!0;break e;default:s=!1}}s&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return ct(t),null;case 6:if(e&&t.stateNode!=null)su(e,t,e.memoizedProps,s);else{if(typeof s!="string"&&t.stateNode===null)throw Error(c(166));if(r=_n(Gr.current),_n(Wt.current),Hs(t)){if(s=t.stateNode,r=t.memoizedProps,s[Ft]=t,(a=s.nodeValue!==r)&&(e=bt,e!==null))switch(e.tag){case 3:zs(s.nodeValue,r,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&zs(s.nodeValue,r,(e.mode&1)!==0)}a&&(t.flags|=4)}else s=(r.nodeType===9?r:r.ownerDocument).createTextNode(s),s[Ft]=t,t.stateNode=s}return ct(t),null;case 13:if(Oe(He),s=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(We&&Nt!==null&&(t.mode&1)!==0&&(t.flags&128)===0)oc(),lr(),t.flags|=98560,a=!1;else if(a=Hs(t),s!==null&&s.dehydrated!==null){if(e===null){if(!a)throw Error(c(318));if(a=t.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(c(317));a[Ft]=t}else lr(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;ct(t),a=!1}else Rt!==null&&(io(Rt),Rt=null),a=!0;if(!a)return t.flags&65536?t:null}return(t.flags&128)!==0?(t.lanes=r,t):(s=s!==null,s!==(e!==null&&e.memoizedState!==null)&&s&&(t.child.flags|=8192,(t.mode&1)!==0&&(e===null||(He.current&1)!==0?et===0&&(et=3):ho())),t.updateQueue!==null&&(t.flags|=4),ct(t),null);case 4:return cr(),Xa(e,t),e===null&&Ur(t.stateNode.containerInfo),ct(t),null;case 10:return Ca(t.type._context),ct(t),null;case 17:return xt(t.type)&&Us(),ct(t),null;case 19:if(Oe(He),a=t.memoizedState,a===null)return ct(t),null;if(s=(t.flags&128)!==0,d=a.rendering,d===null)if(s)Xr(a,!1);else{if(et!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(d=Ks(e),d!==null){for(t.flags|=128,Xr(a,!1),s=d.updateQueue,s!==null&&(t.updateQueue=s,t.flags|=4),t.subtreeFlags=0,s=r,r=t.child;r!==null;)a=r,e=s,a.flags&=14680066,d=a.alternate,d===null?(a.childLanes=0,a.lanes=e,a.child=null,a.subtreeFlags=0,a.memoizedProps=null,a.memoizedState=null,a.updateQueue=null,a.dependencies=null,a.stateNode=null):(a.childLanes=d.childLanes,a.lanes=d.lanes,a.child=d.child,a.subtreeFlags=0,a.deletions=null,a.memoizedProps=d.memoizedProps,a.memoizedState=d.memoizedState,a.updateQueue=d.updateQueue,a.type=d.type,e=d.dependencies,a.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),r=r.sibling;return $e(He,He.current&1|2),t.child}e=e.sibling}a.tail!==null&&Ye()>pr&&(t.flags|=128,s=!0,Xr(a,!1),t.lanes=4194304)}else{if(!s)if(e=Ks(d),e!==null){if(t.flags|=128,s=!0,r=e.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),Xr(a,!0),a.tail===null&&a.tailMode==="hidden"&&!d.alternate&&!We)return ct(t),null}else 2*Ye()-a.renderingStartTime>pr&&r!==1073741824&&(t.flags|=128,s=!0,Xr(a,!1),t.lanes=4194304);a.isBackwards?(d.sibling=t.child,t.child=d):(r=a.last,r!==null?r.sibling=d:t.child=d,a.last=d)}return a.tail!==null?(t=a.tail,a.rendering=t,a.tail=t.sibling,a.renderingStartTime=Ye(),t.sibling=null,r=He.current,$e(He,s?r&1|2:r&1),t):(ct(t),null);case 22:case 23:return uo(),s=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==s&&(t.flags|=8192),s&&(t.mode&1)!==0?(kt&1073741824)!==0&&(ct(t),t.subtreeFlags&6&&(t.flags|=8192)):ct(t),null;case 24:return null;case 25:return null}throw Error(c(156,t.tag))}function cp(e,t){switch(va(t),t.tag){case 1:return xt(t.type)&&Us(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return cr(),Oe(ft),Oe(ot),_a(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 5:return Ia(t),null;case 13:if(Oe(He),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(c(340));lr()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Oe(He),null;case 4:return cr(),null;case 10:return Ca(t.type._context),null;case 22:case 23:return uo(),null;case 24:return null;default:return null}}var ll=!1,ut=!1,up=typeof WeakSet=="function"?WeakSet:Set,K=null;function dr(e,t){var r=e.ref;if(r!==null)if(typeof r=="function")try{r(null)}catch(s){qe(e,t,s)}else r.current=null}function Ja(e,t,r){try{r()}catch(s){qe(e,t,s)}}var lu=!1;function dp(e,t){if(ua=Cs,e=Di(),na(e)){if("selectionStart"in e)var r={start:e.selectionStart,end:e.selectionEnd};else e:{r=(r=e.ownerDocument)&&r.defaultView||window;var s=r.getSelection&&r.getSelection();if(s&&s.rangeCount!==0){r=s.anchorNode;var l=s.anchorOffset,a=s.focusNode;s=s.focusOffset;try{r.nodeType,a.nodeType}catch{r=null;break e}var d=0,f=-1,j=-1,P=0,D=0,$=e,z=null;t:for(;;){for(var Q;$!==r||l!==0&&$.nodeType!==3||(f=d+l),$!==a||s!==0&&$.nodeType!==3||(j=d+s),$.nodeType===3&&(d+=$.nodeValue.length),(Q=$.firstChild)!==null;)z=$,$=Q;for(;;){if($===e)break t;if(z===r&&++P===l&&(f=d),z===a&&++D===s&&(j=d),(Q=$.nextSibling)!==null)break;$=z,z=$.parentNode}$=Q}r=f===-1||j===-1?null:{start:f,end:j}}else r=null}r=r||{start:0,end:0}}else r=null;for(da={focusedElem:e,selectionRange:r},Cs=!1,K=t;K!==null;)if(t=K,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,K=e;else for(;K!==null;){t=K;try{var J=t.alternate;if((t.flags&1024)!==0)switch(t.tag){case 0:case 11:case 15:break;case 1:if(J!==null){var Z=J.memoizedProps,Qe=J.memoizedState,S=t.stateNode,N=S.getSnapshotBeforeUpdate(t.elementType===t.type?Z:At(t.type,Z),Qe);S.__reactInternalSnapshotBeforeUpdate=N}break;case 3:var E=t.stateNode.containerInfo;E.nodeType===1?E.textContent="":E.nodeType===9&&E.documentElement&&E.removeChild(E.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(c(163))}}catch(U){qe(t,t.return,U)}if(e=t.sibling,e!==null){e.return=t.return,K=e;break}K=t.return}return J=lu,lu=!1,J}function Jr(e,t,r){var s=t.updateQueue;if(s=s!==null?s.lastEffect:null,s!==null){var l=s=s.next;do{if((l.tag&e)===e){var a=l.destroy;l.destroy=void 0,a!==void 0&&Ja(t,r,a)}l=l.next}while(l!==s)}}function al(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var r=t=t.next;do{if((r.tag&e)===e){var s=r.create;r.destroy=s()}r=r.next}while(r!==t)}}function Za(e){var t=e.ref;if(t!==null){var r=e.stateNode;e.tag,e=r,typeof t=="function"?t(e):t.current=e}}function au(e){var t=e.alternate;t!==null&&(e.alternate=null,au(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Ft],delete t[Fr],delete t[fa],delete t[qh],delete t[Yh])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function ou(e){return e.tag===5||e.tag===3||e.tag===4}function iu(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||ou(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function eo(e,t,r){var s=e.tag;if(s===5||s===6)e=e.stateNode,t?r.nodeType===8?r.parentNode.insertBefore(e,t):r.insertBefore(e,t):(r.nodeType===8?(t=r.parentNode,t.insertBefore(e,r)):(t=r,t.appendChild(e)),r=r._reactRootContainer,r!=null||t.onclick!==null||(t.onclick=Ds));else if(s!==4&&(e=e.child,e!==null))for(eo(e,t,r),e=e.sibling;e!==null;)eo(e,t,r),e=e.sibling}function to(e,t,r){var s=e.tag;if(s===5||s===6)e=e.stateNode,t?r.insertBefore(e,t):r.appendChild(e);else if(s!==4&&(e=e.child,e!==null))for(to(e,t,r),e=e.sibling;e!==null;)to(e,t,r),e=e.sibling}var lt=null,Lt=!1;function pn(e,t,r){for(r=r.child;r!==null;)cu(e,t,r),r=r.sibling}function cu(e,t,r){if(Ot&&typeof Ot.onCommitFiberUnmount=="function")try{Ot.onCommitFiberUnmount(vs,r)}catch{}switch(r.tag){case 5:ut||dr(r,t);case 6:var s=lt,l=Lt;lt=null,pn(e,t,r),lt=s,Lt=l,lt!==null&&(Lt?(e=lt,r=r.stateNode,e.nodeType===8?e.parentNode.removeChild(r):e.removeChild(r)):lt.removeChild(r.stateNode));break;case 18:lt!==null&&(Lt?(e=lt,r=r.stateNode,e.nodeType===8?ma(e.parentNode,r):e.nodeType===1&&ma(e,r),Ir(e)):ma(lt,r.stateNode));break;case 4:s=lt,l=Lt,lt=r.stateNode.containerInfo,Lt=!0,pn(e,t,r),lt=s,Lt=l;break;case 0:case 11:case 14:case 15:if(!ut&&(s=r.updateQueue,s!==null&&(s=s.lastEffect,s!==null))){l=s=s.next;do{var a=l,d=a.destroy;a=a.tag,d!==void 0&&((a&2)!==0||(a&4)!==0)&&Ja(r,t,d),l=l.next}while(l!==s)}pn(e,t,r);break;case 1:if(!ut&&(dr(r,t),s=r.stateNode,typeof s.componentWillUnmount=="function"))try{s.props=r.memoizedProps,s.state=r.memoizedState,s.componentWillUnmount()}catch(f){qe(r,t,f)}pn(e,t,r);break;case 21:pn(e,t,r);break;case 22:r.mode&1?(ut=(s=ut)||r.memoizedState!==null,pn(e,t,r),ut=s):pn(e,t,r);break;default:pn(e,t,r)}}function uu(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var r=e.stateNode;r===null&&(r=e.stateNode=new up),t.forEach(function(s){var l=wp.bind(null,e,s);r.has(s)||(r.add(s),s.then(l,l))})}}function zt(e,t){var r=t.deletions;if(r!==null)for(var s=0;s<r.length;s++){var l=r[s];try{var a=e,d=t,f=d;e:for(;f!==null;){switch(f.tag){case 5:lt=f.stateNode,Lt=!1;break e;case 3:lt=f.stateNode.containerInfo,Lt=!0;break e;case 4:lt=f.stateNode.containerInfo,Lt=!0;break e}f=f.return}if(lt===null)throw Error(c(160));cu(a,d,l),lt=null,Lt=!1;var j=l.alternate;j!==null&&(j.return=null),l.return=null}catch(P){qe(l,t,P)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)du(t,e),t=t.sibling}function du(e,t){var r=e.alternate,s=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(zt(t,e),Ht(e),s&4){try{Jr(3,e,e.return),al(3,e)}catch(Z){qe(e,e.return,Z)}try{Jr(5,e,e.return)}catch(Z){qe(e,e.return,Z)}}break;case 1:zt(t,e),Ht(e),s&512&&r!==null&&dr(r,r.return);break;case 5:if(zt(t,e),Ht(e),s&512&&r!==null&&dr(r,r.return),e.flags&32){var l=e.stateNode;try{Cn(l,"")}catch(Z){qe(e,e.return,Z)}}if(s&4&&(l=e.stateNode,l!=null)){var a=e.memoizedProps,d=r!==null?r.memoizedProps:a,f=e.type,j=e.updateQueue;if(e.updateQueue=null,j!==null)try{f==="input"&&a.type==="radio"&&a.name!=null&&le(l,a),_l(f,d);var P=_l(f,a);for(d=0;d<j.length;d+=2){var D=j[d],$=j[d+1];D==="style"?Ut(l,$):D==="dangerouslySetInnerHTML"?Il(l,$):D==="children"?Cn(l,$):W(l,D,$,P)}switch(f){case"input":oe(l,a);break;case"textarea":ht(l,a);break;case"select":var z=l._wrapperState.wasMultiple;l._wrapperState.wasMultiple=!!a.multiple;var Q=a.value;Q!=null?Ee(l,!!a.multiple,Q,!1):z!==!!a.multiple&&(a.defaultValue!=null?Ee(l,!!a.multiple,a.defaultValue,!0):Ee(l,!!a.multiple,a.multiple?[]:"",!1))}l[Fr]=a}catch(Z){qe(e,e.return,Z)}}break;case 6:if(zt(t,e),Ht(e),s&4){if(e.stateNode===null)throw Error(c(162));l=e.stateNode,a=e.memoizedProps;try{l.nodeValue=a}catch(Z){qe(e,e.return,Z)}}break;case 3:if(zt(t,e),Ht(e),s&4&&r!==null&&r.memoizedState.isDehydrated)try{Ir(t.containerInfo)}catch(Z){qe(e,e.return,Z)}break;case 4:zt(t,e),Ht(e);break;case 13:zt(t,e),Ht(e),l=e.child,l.flags&8192&&(a=l.memoizedState!==null,l.stateNode.isHidden=a,!a||l.alternate!==null&&l.alternate.memoizedState!==null||(so=Ye())),s&4&&uu(e);break;case 22:if(D=r!==null&&r.memoizedState!==null,e.mode&1?(ut=(P=ut)||D,zt(t,e),ut=P):zt(t,e),Ht(e),s&8192){if(P=e.memoizedState!==null,(e.stateNode.isHidden=P)&&!D&&(e.mode&1)!==0)for(K=e,D=e.child;D!==null;){for($=K=D;K!==null;){switch(z=K,Q=z.child,z.tag){case 0:case 11:case 14:case 15:Jr(4,z,z.return);break;case 1:dr(z,z.return);var J=z.stateNode;if(typeof J.componentWillUnmount=="function"){s=z,r=z.return;try{t=s,J.props=t.memoizedProps,J.state=t.memoizedState,J.componentWillUnmount()}catch(Z){qe(s,r,Z)}}break;case 5:dr(z,z.return);break;case 22:if(z.memoizedState!==null){mu($);continue}}Q!==null?(Q.return=z,K=Q):mu($)}D=D.sibling}e:for(D=null,$=e;;){if($.tag===5){if(D===null){D=$;try{l=$.stateNode,P?(a=l.style,typeof a.setProperty=="function"?a.setProperty("display","none","important"):a.display="none"):(f=$.stateNode,j=$.memoizedProps.style,d=j!=null&&j.hasOwnProperty("display")?j.display:null,f.style.display=ge("display",d))}catch(Z){qe(e,e.return,Z)}}}else if($.tag===6){if(D===null)try{$.stateNode.nodeValue=P?"":$.memoizedProps}catch(Z){qe(e,e.return,Z)}}else if(($.tag!==22&&$.tag!==23||$.memoizedState===null||$===e)&&$.child!==null){$.child.return=$,$=$.child;continue}if($===e)break e;for(;$.sibling===null;){if($.return===null||$.return===e)break e;D===$&&(D=null),$=$.return}D===$&&(D=null),$.sibling.return=$.return,$=$.sibling}}break;case 19:zt(t,e),Ht(e),s&4&&uu(e);break;case 21:break;default:zt(t,e),Ht(e)}}function Ht(e){var t=e.flags;if(t&2){try{e:{for(var r=e.return;r!==null;){if(ou(r)){var s=r;break e}r=r.return}throw Error(c(160))}switch(s.tag){case 5:var l=s.stateNode;s.flags&32&&(Cn(l,""),s.flags&=-33);var a=iu(e);to(e,a,l);break;case 3:case 4:var d=s.stateNode.containerInfo,f=iu(e);eo(e,f,d);break;default:throw Error(c(161))}}catch(j){qe(e,e.return,j)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function hp(e,t,r){K=e,hu(e)}function hu(e,t,r){for(var s=(e.mode&1)!==0;K!==null;){var l=K,a=l.child;if(l.tag===22&&s){var d=l.memoizedState!==null||ll;if(!d){var f=l.alternate,j=f!==null&&f.memoizedState!==null||ut;f=ll;var P=ut;if(ll=d,(ut=j)&&!P)for(K=l;K!==null;)d=K,j=d.child,d.tag===22&&d.memoizedState!==null?fu(l):j!==null?(j.return=d,K=j):fu(l);for(;a!==null;)K=a,hu(a),a=a.sibling;K=l,ll=f,ut=P}pu(e)}else(l.subtreeFlags&8772)!==0&&a!==null?(a.return=l,K=a):pu(e)}}function pu(e){for(;K!==null;){var t=K;if((t.flags&8772)!==0){var r=t.alternate;try{if((t.flags&8772)!==0)switch(t.tag){case 0:case 11:case 15:ut||al(5,t);break;case 1:var s=t.stateNode;if(t.flags&4&&!ut)if(r===null)s.componentDidMount();else{var l=t.elementType===t.type?r.memoizedProps:At(t.type,r.memoizedProps);s.componentDidUpdate(l,r.memoizedState,s.__reactInternalSnapshotBeforeUpdate)}var a=t.updateQueue;a!==null&&mc(t,a,s);break;case 3:var d=t.updateQueue;if(d!==null){if(r=null,t.child!==null)switch(t.child.tag){case 5:r=t.child.stateNode;break;case 1:r=t.child.stateNode}mc(t,d,r)}break;case 5:var f=t.stateNode;if(r===null&&t.flags&4){r=f;var j=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":j.autoFocus&&r.focus();break;case"img":j.src&&(r.src=j.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var P=t.alternate;if(P!==null){var D=P.memoizedState;if(D!==null){var $=D.dehydrated;$!==null&&Ir($)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(c(163))}ut||t.flags&512&&Za(t)}catch(z){qe(t,t.return,z)}}if(t===e){K=null;break}if(r=t.sibling,r!==null){r.return=t.return,K=r;break}K=t.return}}function mu(e){for(;K!==null;){var t=K;if(t===e){K=null;break}var r=t.sibling;if(r!==null){r.return=t.return,K=r;break}K=t.return}}function fu(e){for(;K!==null;){var t=K;try{switch(t.tag){case 0:case 11:case 15:var r=t.return;try{al(4,t)}catch(j){qe(t,r,j)}break;case 1:var s=t.stateNode;if(typeof s.componentDidMount=="function"){var l=t.return;try{s.componentDidMount()}catch(j){qe(t,l,j)}}var a=t.return;try{Za(t)}catch(j){qe(t,a,j)}break;case 5:var d=t.return;try{Za(t)}catch(j){qe(t,d,j)}}}catch(j){qe(t,t.return,j)}if(t===e){K=null;break}var f=t.sibling;if(f!==null){f.return=t.return,K=f;break}K=t.return}}var pp=Math.ceil,ol=ne.ReactCurrentDispatcher,no=ne.ReactCurrentOwner,Pt=ne.ReactCurrentBatchConfig,Te=0,nt=null,Xe=null,at=0,kt=0,hr=on(0),et=0,Zr=null,An=0,il=0,ro=0,es=null,yt=null,so=0,pr=1/0,Jt=null,cl=!1,lo=null,mn=null,ul=!1,fn=null,dl=0,ts=0,ao=null,hl=-1,pl=0;function mt(){return(Te&6)!==0?Ye():hl!==-1?hl:hl=Ye()}function xn(e){return(e.mode&1)===0?1:(Te&2)!==0&&at!==0?at&-at:Kh.transition!==null?(pl===0&&(pl=ii()),pl):(e=Ae,e!==0||(e=window.event,e=e===void 0?16:gi(e.type)),e)}function Dt(e,t,r,s){if(50<ts)throw ts=0,ao=null,Error(c(185));Cr(e,r,s),((Te&2)===0||e!==nt)&&(e===nt&&((Te&2)===0&&(il|=r),et===4&&gn(e,at)),vt(e,s),r===1&&Te===0&&(t.mode&1)===0&&(pr=Ye()+500,Fs&&un()))}function vt(e,t){var r=e.callbackNode;Kd(e,t);var s=bs(e,e===nt?at:0);if(s===0)r!==null&&li(r),e.callbackNode=null,e.callbackPriority=0;else if(t=s&-s,e.callbackPriority!==t){if(r!=null&&li(r),t===1)e.tag===0?Qh(gu.bind(null,e)):nc(gu.bind(null,e)),Vh(function(){(Te&6)===0&&un()}),r=null;else{switch(ci(s)){case 1:r=Ul;break;case 4:r=ai;break;case 16:r=ys;break;case 536870912:r=oi;break;default:r=ys}r=Cu(r,xu.bind(null,e))}e.callbackPriority=t,e.callbackNode=r}}function xu(e,t){if(hl=-1,pl=0,(Te&6)!==0)throw Error(c(327));var r=e.callbackNode;if(mr()&&e.callbackNode!==r)return null;var s=bs(e,e===nt?at:0);if(s===0)return null;if((s&30)!==0||(s&e.expiredLanes)!==0||t)t=ml(e,s);else{t=s;var l=Te;Te|=2;var a=vu();(nt!==e||at!==t)&&(Jt=null,pr=Ye()+500,zn(e,t));do try{xp();break}catch(f){yu(e,f)}while(!0);ka(),ol.current=a,Te=l,Xe!==null?t=0:(nt=null,at=0,t=et)}if(t!==0){if(t===2&&(l=Ol(e),l!==0&&(s=l,t=oo(e,l))),t===1)throw r=Zr,zn(e,0),gn(e,s),vt(e,Ye()),r;if(t===6)gn(e,s);else{if(l=e.current.alternate,(s&30)===0&&!mp(l)&&(t=ml(e,s),t===2&&(a=Ol(e),a!==0&&(s=a,t=oo(e,a))),t===1))throw r=Zr,zn(e,0),gn(e,s),vt(e,Ye()),r;switch(e.finishedWork=l,e.finishedLanes=s,t){case 0:case 1:throw Error(c(345));case 2:Dn(e,yt,Jt);break;case 3:if(gn(e,s),(s&130023424)===s&&(t=so+500-Ye(),10<t)){if(bs(e,0)!==0)break;if(l=e.suspendedLanes,(l&s)!==s){mt(),e.pingedLanes|=e.suspendedLanes&l;break}e.timeoutHandle=pa(Dn.bind(null,e,yt,Jt),t);break}Dn(e,yt,Jt);break;case 4:if(gn(e,s),(s&4194240)===s)break;for(t=e.eventTimes,l=-1;0<s;){var d=31-Mt(s);a=1<<d,d=t[d],d>l&&(l=d),s&=~a}if(s=l,s=Ye()-s,s=(120>s?120:480>s?480:1080>s?1080:1920>s?1920:3e3>s?3e3:4320>s?4320:1960*pp(s/1960))-s,10<s){e.timeoutHandle=pa(Dn.bind(null,e,yt,Jt),s);break}Dn(e,yt,Jt);break;case 5:Dn(e,yt,Jt);break;default:throw Error(c(329))}}}return vt(e,Ye()),e.callbackNode===r?xu.bind(null,e):null}function oo(e,t){var r=es;return e.current.memoizedState.isDehydrated&&(zn(e,t).flags|=256),e=ml(e,t),e!==2&&(t=yt,yt=r,t!==null&&io(t)),e}function io(e){yt===null?yt=e:yt.push.apply(yt,e)}function mp(e){for(var t=e;;){if(t.flags&16384){var r=t.updateQueue;if(r!==null&&(r=r.stores,r!==null))for(var s=0;s<r.length;s++){var l=r[s],a=l.getSnapshot;l=l.value;try{if(!_t(a(),l))return!1}catch{return!1}}}if(r=t.child,t.subtreeFlags&16384&&r!==null)r.return=t,t=r;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function gn(e,t){for(t&=~ro,t&=~il,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var r=31-Mt(t),s=1<<r;e[r]=-1,t&=~s}}function gu(e){if((Te&6)!==0)throw Error(c(327));mr();var t=bs(e,0);if((t&1)===0)return vt(e,Ye()),null;var r=ml(e,t);if(e.tag!==0&&r===2){var s=Ol(e);s!==0&&(t=s,r=oo(e,s))}if(r===1)throw r=Zr,zn(e,0),gn(e,t),vt(e,Ye()),r;if(r===6)throw Error(c(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Dn(e,yt,Jt),vt(e,Ye()),null}function co(e,t){var r=Te;Te|=1;try{return e(t)}finally{Te=r,Te===0&&(pr=Ye()+500,Fs&&un())}}function Ln(e){fn!==null&&fn.tag===0&&(Te&6)===0&&mr();var t=Te;Te|=1;var r=Pt.transition,s=Ae;try{if(Pt.transition=null,Ae=1,e)return e()}finally{Ae=s,Pt.transition=r,Te=t,(Te&6)===0&&un()}}function uo(){kt=hr.current,Oe(hr)}function zn(e,t){e.finishedWork=null,e.finishedLanes=0;var r=e.timeoutHandle;if(r!==-1&&(e.timeoutHandle=-1,Hh(r)),Xe!==null)for(r=Xe.return;r!==null;){var s=r;switch(va(s),s.tag){case 1:s=s.type.childContextTypes,s!=null&&Us();break;case 3:cr(),Oe(ft),Oe(ot),_a();break;case 5:Ia(s);break;case 4:cr();break;case 13:Oe(He);break;case 19:Oe(He);break;case 10:Ca(s.type._context);break;case 22:case 23:uo()}r=r.return}if(nt=e,Xe=e=yn(e.current,null),at=kt=t,et=0,Zr=null,ro=il=An=0,yt=es=null,Mn!==null){for(t=0;t<Mn.length;t++)if(r=Mn[t],s=r.interleaved,s!==null){r.interleaved=null;var l=s.next,a=r.pending;if(a!==null){var d=a.next;a.next=l,s.next=d}r.pending=s}Mn=null}return e}function yu(e,t){do{var r=Xe;try{if(ka(),Xs.current=tl,Js){for(var s=Ve.memoizedState;s!==null;){var l=s.queue;l!==null&&(l.pending=null),s=s.next}Js=!1}if(Rn=0,tt=Ze=Ve=null,qr=!1,Yr=0,no.current=null,r===null||r.return===null){et=1,Zr=t,Xe=null;break}e:{var a=e,d=r.return,f=r,j=t;if(t=at,f.flags|=32768,j!==null&&typeof j=="object"&&typeof j.then=="function"){var P=j,D=f,$=D.tag;if((D.mode&1)===0&&($===0||$===11||$===15)){var z=D.alternate;z?(D.updateQueue=z.updateQueue,D.memoizedState=z.memoizedState,D.lanes=z.lanes):(D.updateQueue=null,D.memoizedState=null)}var Q=Bc(d);if(Q!==null){Q.flags&=-257,Hc(Q,d,f,a,t),Q.mode&1&&Wc(a,P,t),t=Q,j=P;var J=t.updateQueue;if(J===null){var Z=new Set;Z.add(j),t.updateQueue=Z}else J.add(j);break e}else{if((t&1)===0){Wc(a,P,t),ho();break e}j=Error(c(426))}}else if(We&&f.mode&1){var Qe=Bc(d);if(Qe!==null){(Qe.flags&65536)===0&&(Qe.flags|=256),Hc(Qe,d,f,a,t),ba(ur(j,f));break e}}a=j=ur(j,f),et!==4&&(et=2),es===null?es=[a]:es.push(a),a=d;do{switch(a.tag){case 3:a.flags|=65536,t&=-t,a.lanes|=t;var S=Oc(a,j,t);pc(a,S);break e;case 1:f=j;var N=a.type,E=a.stateNode;if((a.flags&128)===0&&(typeof N.getDerivedStateFromError=="function"||E!==null&&typeof E.componentDidCatch=="function"&&(mn===null||!mn.has(E)))){a.flags|=65536,t&=-t,a.lanes|=t;var U=Fc(a,f,t);pc(a,U);break e}}a=a.return}while(a!==null)}ju(r)}catch(ee){t=ee,Xe===r&&r!==null&&(Xe=r=r.return);continue}break}while(!0)}function vu(){var e=ol.current;return ol.current=tl,e===null?tl:e}function ho(){(et===0||et===3||et===2)&&(et=4),nt===null||(An&268435455)===0&&(il&268435455)===0||gn(nt,at)}function ml(e,t){var r=Te;Te|=2;var s=vu();(nt!==e||at!==t)&&(Jt=null,zn(e,t));do try{fp();break}catch(l){yu(e,l)}while(!0);if(ka(),Te=r,ol.current=s,Xe!==null)throw Error(c(261));return nt=null,at=0,et}function fp(){for(;Xe!==null;)wu(Xe)}function xp(){for(;Xe!==null&&!Fd();)wu(Xe)}function wu(e){var t=ku(e.alternate,e,kt);e.memoizedProps=e.pendingProps,t===null?ju(e):Xe=t,no.current=null}function ju(e){var t=e;do{var r=t.alternate;if(e=t.return,(t.flags&32768)===0){if(r=ip(r,t,kt),r!==null){Xe=r;return}}else{if(r=cp(r,t),r!==null){r.flags&=32767,Xe=r;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{et=6,Xe=null;return}}if(t=t.sibling,t!==null){Xe=t;return}Xe=t=e}while(t!==null);et===0&&(et=5)}function Dn(e,t,r){var s=Ae,l=Pt.transition;try{Pt.transition=null,Ae=1,gp(e,t,r,s)}finally{Pt.transition=l,Ae=s}return null}function gp(e,t,r,s){do mr();while(fn!==null);if((Te&6)!==0)throw Error(c(327));r=e.finishedWork;var l=e.finishedLanes;if(r===null)return null;if(e.finishedWork=null,e.finishedLanes=0,r===e.current)throw Error(c(177));e.callbackNode=null,e.callbackPriority=0;var a=r.lanes|r.childLanes;if(Xd(e,a),e===nt&&(Xe=nt=null,at=0),(r.subtreeFlags&2064)===0&&(r.flags&2064)===0||ul||(ul=!0,Cu(ys,function(){return mr(),null})),a=(r.flags&15990)!==0,(r.subtreeFlags&15990)!==0||a){a=Pt.transition,Pt.transition=null;var d=Ae;Ae=1;var f=Te;Te|=4,no.current=null,dp(e,r),du(r,e),Dh(da),Cs=!!ua,da=ua=null,e.current=r,hp(r),Wd(),Te=f,Ae=d,Pt.transition=a}else e.current=r;if(ul&&(ul=!1,fn=e,dl=l),a=e.pendingLanes,a===0&&(mn=null),Vd(r.stateNode),vt(e,Ye()),t!==null)for(s=e.onRecoverableError,r=0;r<t.length;r++)l=t[r],s(l.value,{componentStack:l.stack,digest:l.digest});if(cl)throw cl=!1,e=lo,lo=null,e;return(dl&1)!==0&&e.tag!==0&&mr(),a=e.pendingLanes,(a&1)!==0?e===ao?ts++:(ts=0,ao=e):ts=0,un(),null}function mr(){if(fn!==null){var e=ci(dl),t=Pt.transition,r=Ae;try{if(Pt.transition=null,Ae=16>e?16:e,fn===null)var s=!1;else{if(e=fn,fn=null,dl=0,(Te&6)!==0)throw Error(c(331));var l=Te;for(Te|=4,K=e.current;K!==null;){var a=K,d=a.child;if((K.flags&16)!==0){var f=a.deletions;if(f!==null){for(var j=0;j<f.length;j++){var P=f[j];for(K=P;K!==null;){var D=K;switch(D.tag){case 0:case 11:case 15:Jr(8,D,a)}var $=D.child;if($!==null)$.return=D,K=$;else for(;K!==null;){D=K;var z=D.sibling,Q=D.return;if(au(D),D===P){K=null;break}if(z!==null){z.return=Q,K=z;break}K=Q}}}var J=a.alternate;if(J!==null){var Z=J.child;if(Z!==null){J.child=null;do{var Qe=Z.sibling;Z.sibling=null,Z=Qe}while(Z!==null)}}K=a}}if((a.subtreeFlags&2064)!==0&&d!==null)d.return=a,K=d;else e:for(;K!==null;){if(a=K,(a.flags&2048)!==0)switch(a.tag){case 0:case 11:case 15:Jr(9,a,a.return)}var S=a.sibling;if(S!==null){S.return=a.return,K=S;break e}K=a.return}}var N=e.current;for(K=N;K!==null;){d=K;var E=d.child;if((d.subtreeFlags&2064)!==0&&E!==null)E.return=d,K=E;else e:for(d=N;K!==null;){if(f=K,(f.flags&2048)!==0)try{switch(f.tag){case 0:case 11:case 15:al(9,f)}}catch(ee){qe(f,f.return,ee)}if(f===d){K=null;break e}var U=f.sibling;if(U!==null){U.return=f.return,K=U;break e}K=f.return}}if(Te=l,un(),Ot&&typeof Ot.onPostCommitFiberRoot=="function")try{Ot.onPostCommitFiberRoot(vs,e)}catch{}s=!0}return s}finally{Ae=r,Pt.transition=t}}return!1}function bu(e,t,r){t=ur(r,t),t=Oc(e,t,1),e=hn(e,t,1),t=mt(),e!==null&&(Cr(e,1,t),vt(e,t))}function qe(e,t,r){if(e.tag===3)bu(e,e,r);else for(;t!==null;){if(t.tag===3){bu(t,e,r);break}else if(t.tag===1){var s=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof s.componentDidCatch=="function"&&(mn===null||!mn.has(s))){e=ur(r,e),e=Fc(t,e,1),t=hn(t,e,1),e=mt(),t!==null&&(Cr(t,1,e),vt(t,e));break}}t=t.return}}function yp(e,t,r){var s=e.pingCache;s!==null&&s.delete(t),t=mt(),e.pingedLanes|=e.suspendedLanes&r,nt===e&&(at&r)===r&&(et===4||et===3&&(at&130023424)===at&&500>Ye()-so?zn(e,0):ro|=r),vt(e,t)}function Nu(e,t){t===0&&((e.mode&1)===0?t=1:(t=js,js<<=1,(js&130023424)===0&&(js=4194304)));var r=mt();e=Qt(e,t),e!==null&&(Cr(e,t,r),vt(e,r))}function vp(e){var t=e.memoizedState,r=0;t!==null&&(r=t.retryLane),Nu(e,r)}function wp(e,t){var r=0;switch(e.tag){case 13:var s=e.stateNode,l=e.memoizedState;l!==null&&(r=l.retryLane);break;case 19:s=e.stateNode;break;default:throw Error(c(314))}s!==null&&s.delete(t),Nu(e,r)}var ku;ku=function(e,t,r){if(e!==null)if(e.memoizedProps!==t.pendingProps||ft.current)gt=!0;else{if((e.lanes&r)===0&&(t.flags&128)===0)return gt=!1,op(e,t,r);gt=(e.flags&131072)!==0}else gt=!1,We&&(t.flags&1048576)!==0&&rc(t,Bs,t.index);switch(t.lanes=0,t.tag){case 2:var s=t.type;sl(e,t),e=t.pendingProps;var l=nr(t,ot.current);ir(t,r),l=La(null,t,s,e,l,r);var a=za();return t.flags|=1,typeof l=="object"&&l!==null&&typeof l.render=="function"&&l.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,xt(s)?(a=!0,Os(t)):a=!1,t.memoizedState=l.state!==null&&l.state!==void 0?l.state:null,Ta(t),l.updater=nl,t.stateNode=l,l._reactInternals=t,Wa(t,s,e,r),t=Ga(null,t,s,!0,a,r)):(t.tag=0,We&&a&&ya(t),pt(null,t,l,r),t=t.child),t;case 16:s=t.elementType;e:{switch(sl(e,t),e=t.pendingProps,l=s._init,s=l(s._payload),t.type=s,l=t.tag=bp(s),e=At(s,e),l){case 0:t=Va(null,t,s,e,r);break e;case 1:t=Kc(null,t,s,e,r);break e;case 11:t=Vc(null,t,s,e,r);break e;case 14:t=Gc(null,t,s,At(s.type,e),r);break e}throw Error(c(306,s,""))}return t;case 0:return s=t.type,l=t.pendingProps,l=t.elementType===s?l:At(s,l),Va(e,t,s,l,r);case 1:return s=t.type,l=t.pendingProps,l=t.elementType===s?l:At(s,l),Kc(e,t,s,l,r);case 3:e:{if(Xc(t),e===null)throw Error(c(387));s=t.pendingProps,a=t.memoizedState,l=a.element,hc(e,t),Qs(t,s,null,r);var d=t.memoizedState;if(s=d.element,a.isDehydrated)if(a={element:s,isDehydrated:!1,cache:d.cache,pendingSuspenseBoundaries:d.pendingSuspenseBoundaries,transitions:d.transitions},t.updateQueue.baseState=a,t.memoizedState=a,t.flags&256){l=ur(Error(c(423)),t),t=Jc(e,t,s,r,l);break e}else if(s!==l){l=ur(Error(c(424)),t),t=Jc(e,t,s,r,l);break e}else for(Nt=an(t.stateNode.containerInfo.firstChild),bt=t,We=!0,Rt=null,r=uc(t,null,s,r),t.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if(lr(),s===l){t=Xt(e,t,r);break e}pt(e,t,s,r)}t=t.child}return t;case 5:return fc(t),e===null&&ja(t),s=t.type,l=t.pendingProps,a=e!==null?e.memoizedProps:null,d=l.children,ha(s,l)?d=null:a!==null&&ha(s,a)&&(t.flags|=32),Qc(e,t),pt(e,t,d,r),t.child;case 6:return e===null&&ja(t),null;case 13:return Zc(e,t,r);case 4:return Pa(t,t.stateNode.containerInfo),s=t.pendingProps,e===null?t.child=ar(t,null,s,r):pt(e,t,s,r),t.child;case 11:return s=t.type,l=t.pendingProps,l=t.elementType===s?l:At(s,l),Vc(e,t,s,l,r);case 7:return pt(e,t,t.pendingProps,r),t.child;case 8:return pt(e,t,t.pendingProps.children,r),t.child;case 12:return pt(e,t,t.pendingProps.children,r),t.child;case 10:e:{if(s=t.type._context,l=t.pendingProps,a=t.memoizedProps,d=l.value,$e(Gs,s._currentValue),s._currentValue=d,a!==null)if(_t(a.value,d)){if(a.children===l.children&&!ft.current){t=Xt(e,t,r);break e}}else for(a=t.child,a!==null&&(a.return=t);a!==null;){var f=a.dependencies;if(f!==null){d=a.child;for(var j=f.firstContext;j!==null;){if(j.context===s){if(a.tag===1){j=Kt(-1,r&-r),j.tag=2;var P=a.updateQueue;if(P!==null){P=P.shared;var D=P.pending;D===null?j.next=j:(j.next=D.next,D.next=j),P.pending=j}}a.lanes|=r,j=a.alternate,j!==null&&(j.lanes|=r),Sa(a.return,r,t),f.lanes|=r;break}j=j.next}}else if(a.tag===10)d=a.type===t.type?null:a.child;else if(a.tag===18){if(d=a.return,d===null)throw Error(c(341));d.lanes|=r,f=d.alternate,f!==null&&(f.lanes|=r),Sa(d,r,t),d=a.sibling}else d=a.child;if(d!==null)d.return=a;else for(d=a;d!==null;){if(d===t){d=null;break}if(a=d.sibling,a!==null){a.return=d.return,d=a;break}d=d.return}a=d}pt(e,t,l.children,r),t=t.child}return t;case 9:return l=t.type,s=t.pendingProps.children,ir(t,r),l=Et(l),s=s(l),t.flags|=1,pt(e,t,s,r),t.child;case 14:return s=t.type,l=At(s,t.pendingProps),l=At(s.type,l),Gc(e,t,s,l,r);case 15:return qc(e,t,t.type,t.pendingProps,r);case 17:return s=t.type,l=t.pendingProps,l=t.elementType===s?l:At(s,l),sl(e,t),t.tag=1,xt(s)?(e=!0,Os(t)):e=!1,ir(t,r),$c(t,s,l),Wa(t,s,l,r),Ga(null,t,s,!0,e,r);case 19:return tu(e,t,r);case 22:return Yc(e,t,r)}throw Error(c(156,t.tag))};function Cu(e,t){return si(e,t)}function jp(e,t,r,s){this.tag=e,this.key=r,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=s,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function It(e,t,r,s){return new jp(e,t,r,s)}function po(e){return e=e.prototype,!(!e||!e.isReactComponent)}function bp(e){if(typeof e=="function")return po(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Fe)return 11;if(e===Ce)return 14}return 2}function yn(e,t){var r=e.alternate;return r===null?(r=It(e.tag,t,e.key,e.mode),r.elementType=e.elementType,r.type=e.type,r.stateNode=e.stateNode,r.alternate=e,e.alternate=r):(r.pendingProps=t,r.type=e.type,r.flags=0,r.subtreeFlags=0,r.deletions=null),r.flags=e.flags&14680064,r.childLanes=e.childLanes,r.lanes=e.lanes,r.child=e.child,r.memoizedProps=e.memoizedProps,r.memoizedState=e.memoizedState,r.updateQueue=e.updateQueue,t=e.dependencies,r.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},r.sibling=e.sibling,r.index=e.index,r.ref=e.ref,r}function fl(e,t,r,s,l,a){var d=2;if(s=e,typeof e=="function")po(e)&&(d=1);else if(typeof e=="string")d=5;else e:switch(e){case Re:return $n(r.children,l,a,t);case ue:d=8,l|=8;break;case ve:return e=It(12,r,t,l|2),e.elementType=ve,e.lanes=a,e;case ae:return e=It(13,r,t,l),e.elementType=ae,e.lanes=a,e;case Pe:return e=It(19,r,t,l),e.elementType=Pe,e.lanes=a,e;case Le:return xl(r,l,a,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Be:d=10;break e;case me:d=9;break e;case Fe:d=11;break e;case Ce:d=14;break e;case Ge:d=16,s=null;break e}throw Error(c(130,e==null?e:typeof e,""))}return t=It(d,r,t,l),t.elementType=e,t.type=s,t.lanes=a,t}function $n(e,t,r,s){return e=It(7,e,s,t),e.lanes=r,e}function xl(e,t,r,s){return e=It(22,e,s,t),e.elementType=Le,e.lanes=r,e.stateNode={isHidden:!1},e}function mo(e,t,r){return e=It(6,e,null,t),e.lanes=r,e}function fo(e,t,r){return t=It(4,e.children!==null?e.children:[],e.key,t),t.lanes=r,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Np(e,t,r,s,l){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Fl(0),this.expirationTimes=Fl(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Fl(0),this.identifierPrefix=s,this.onRecoverableError=l,this.mutableSourceEagerHydrationData=null}function xo(e,t,r,s,l,a,d,f,j){return e=new Np(e,t,r,f,j),t===1?(t=1,a===!0&&(t|=8)):t=0,a=It(3,null,null,t),e.current=a,a.stateNode=e,a.memoizedState={element:s,isDehydrated:r,cache:null,transitions:null,pendingSuspenseBoundaries:null},Ta(a),e}function kp(e,t,r){var s=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Y,key:s==null?null:""+s,children:e,containerInfo:t,implementation:r}}function Su(e){if(!e)return cn;e=e._reactInternals;e:{if(Sn(e)!==e||e.tag!==1)throw Error(c(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(xt(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(c(171))}if(e.tag===1){var r=e.type;if(xt(r))return ec(e,r,t)}return t}function Eu(e,t,r,s,l,a,d,f,j){return e=xo(r,s,!0,e,l,a,d,f,j),e.context=Su(null),r=e.current,s=mt(),l=xn(r),a=Kt(s,l),a.callback=t??null,hn(r,a,l),e.current.lanes=l,Cr(e,l,s),vt(e,s),e}function gl(e,t,r,s){var l=t.current,a=mt(),d=xn(l);return r=Su(r),t.context===null?t.context=r:t.pendingContext=r,t=Kt(a,d),t.payload={element:e},s=s===void 0?null:s,s!==null&&(t.callback=s),e=hn(l,t,d),e!==null&&(Dt(e,l,d,a),Ys(e,l,d)),d}function yl(e){return e=e.current,e.child?(e.child.tag===5,e.child.stateNode):null}function Tu(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var r=e.retryLane;e.retryLane=r!==0&&r<t?r:t}}function go(e,t){Tu(e,t),(e=e.alternate)&&Tu(e,t)}function Cp(){return null}var Pu=typeof reportError=="function"?reportError:function(e){console.error(e)};function yo(e){this._internalRoot=e}vl.prototype.render=yo.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(c(409));gl(e,t,null,null)},vl.prototype.unmount=yo.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Ln(function(){gl(null,e,null,null)}),t[Vt]=null}};function vl(e){this._internalRoot=e}vl.prototype.unstable_scheduleHydration=function(e){if(e){var t=hi();e={blockedOn:null,target:e,priority:t};for(var r=0;r<rn.length&&t!==0&&t<rn[r].priority;r++);rn.splice(r,0,e),r===0&&fi(e)}};function vo(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function wl(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function Iu(){}function Sp(e,t,r,s,l){if(l){if(typeof s=="function"){var a=s;s=function(){var P=yl(d);a.call(P)}}var d=Eu(t,s,e,0,null,!1,!1,"",Iu);return e._reactRootContainer=d,e[Vt]=d.current,Ur(e.nodeType===8?e.parentNode:e),Ln(),d}for(;l=e.lastChild;)e.removeChild(l);if(typeof s=="function"){var f=s;s=function(){var P=yl(j);f.call(P)}}var j=xo(e,0,!1,null,null,!1,!1,"",Iu);return e._reactRootContainer=j,e[Vt]=j.current,Ur(e.nodeType===8?e.parentNode:e),Ln(function(){gl(t,j,r,s)}),j}function jl(e,t,r,s,l){var a=r._reactRootContainer;if(a){var d=a;if(typeof l=="function"){var f=l;l=function(){var j=yl(d);f.call(j)}}gl(t,d,e,l)}else d=Sp(r,t,e,l,s);return yl(d)}ui=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var r=kr(t.pendingLanes);r!==0&&(Wl(t,r|1),vt(t,Ye()),(Te&6)===0&&(pr=Ye()+500,un()))}break;case 13:Ln(function(){var s=Qt(e,1);if(s!==null){var l=mt();Dt(s,e,1,l)}}),go(e,1)}},Bl=function(e){if(e.tag===13){var t=Qt(e,134217728);if(t!==null){var r=mt();Dt(t,e,134217728,r)}go(e,134217728)}},di=function(e){if(e.tag===13){var t=xn(e),r=Qt(e,t);if(r!==null){var s=mt();Dt(r,e,t,s)}go(e,t)}},hi=function(){return Ae},pi=function(e,t){var r=Ae;try{return Ae=e,t()}finally{Ae=r}},Ll=function(e,t,r){switch(t){case"input":if(oe(e,r),t=r.name,r.type==="radio"&&t!=null){for(r=e;r.parentNode;)r=r.parentNode;for(r=r.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<r.length;t++){var s=r[t];if(s!==e&&s.form===e.form){var l=$s(s);if(!l)throw Error(c(90));F(s),oe(s,l)}}}break;case"textarea":ht(e,r);break;case"select":t=r.value,t!=null&&Ee(e,!!r.multiple,t,!1)}},Xo=co,Jo=Ln;var Ep={usingClientEntryPoint:!1,Events:[Wr,er,$s,Qo,Ko,co]},ns={findFiberByHostInstance:En,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},Tp={bundleType:ns.bundleType,version:ns.version,rendererPackageName:ns.rendererPackageName,rendererConfig:ns.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:ne.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=ni(e),e===null?null:e.stateNode},findFiberByHostInstance:ns.findFiberByHostInstance||Cp,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var bl=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!bl.isDisabled&&bl.supportsFiber)try{vs=bl.inject(Tp),Ot=bl}catch{}}return wt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Ep,wt.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!vo(t))throw Error(c(200));return kp(e,t,null,r)},wt.createRoot=function(e,t){if(!vo(e))throw Error(c(299));var r=!1,s="",l=Pu;return t!=null&&(t.unstable_strictMode===!0&&(r=!0),t.identifierPrefix!==void 0&&(s=t.identifierPrefix),t.onRecoverableError!==void 0&&(l=t.onRecoverableError)),t=xo(e,1,!1,null,null,r,!1,s,l),e[Vt]=t.current,Ur(e.nodeType===8?e.parentNode:e),new yo(t)},wt.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(c(188)):(e=Object.keys(e).join(","),Error(c(268,e)));return e=ni(t),e=e===null?null:e.stateNode,e},wt.flushSync=function(e){return Ln(e)},wt.hydrate=function(e,t,r){if(!wl(t))throw Error(c(200));return jl(null,e,t,!0,r)},wt.hydrateRoot=function(e,t,r){if(!vo(e))throw Error(c(405));var s=r!=null&&r.hydratedSources||null,l=!1,a="",d=Pu;if(r!=null&&(r.unstable_strictMode===!0&&(l=!0),r.identifierPrefix!==void 0&&(a=r.identifierPrefix),r.onRecoverableError!==void 0&&(d=r.onRecoverableError)),t=Eu(t,null,e,1,r??null,l,!1,a,d),e[Vt]=t.current,Ur(e),s)for(e=0;e<s.length;e++)r=s[e],l=r._getVersion,l=l(r._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[r,l]:t.mutableSourceEagerHydrationData.push(r,l);return new vl(t)},wt.render=function(e,t,r){if(!wl(t))throw Error(c(200));return jl(null,e,t,!1,r)},wt.unmountComponentAtNode=function(e){if(!wl(e))throw Error(c(40));return e._reactRootContainer?(Ln(function(){jl(null,null,e,!1,function(){e._reactRootContainer=null,e[Vt]=null})}),!0):!1},wt.unstable_batchedUpdates=co,wt.unstable_renderSubtreeIntoContainer=function(e,t,r,s){if(!wl(r))throw Error(c(200));if(e==null||e._reactInternals===void 0)throw Error(c(38));return jl(e,t,r,!1,s)},wt.version="18.3.1-next-f1338f8080-20240426",wt}var $u;function dd(){if($u)return bo.exports;$u=1;function i(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(i)}catch(o){console.error(o)}}return i(),bo.exports=Dp(),bo.exports}var Uu;function $p(){if(Uu)return Nl;Uu=1;var i=dd();return Nl.createRoot=i.createRoot,Nl.hydrateRoot=i.hydrateRoot,Nl}var Up=$p();const Op=cd(Up);dd();function os(){return os=Object.assign?Object.assign.bind():function(i){for(var o=1;o<arguments.length;o++){var c=arguments[o];for(var h in c)Object.prototype.hasOwnProperty.call(c,h)&&(i[h]=c[h])}return i},os.apply(this,arguments)}var wn;(function(i){i.Pop="POP",i.Push="PUSH",i.Replace="REPLACE"})(wn||(wn={}));const Ou="popstate";function Fp(i){i===void 0&&(i={});function o(h,p){let{pathname:g,search:v,hash:x}=h.location;return Po("",{pathname:g,search:v,hash:x},p.state&&p.state.usr||null,p.state&&p.state.key||"default")}function c(h,p){return typeof p=="string"?p:El(p)}return Bp(o,c,null,i)}function Ke(i,o){if(i===!1||i===null||typeof i>"u")throw new Error(o)}function $o(i,o){if(!i){typeof console<"u"&&console.warn(o);try{throw new Error(o)}catch{}}}function Wp(){return Math.random().toString(36).substr(2,8)}function Fu(i,o){return{usr:i.state,key:i.key,idx:o}}function Po(i,o,c,h){return c===void 0&&(c=null),os({pathname:typeof i=="string"?i:i.pathname,search:"",hash:""},typeof o=="string"?gr(o):o,{state:c,key:o&&o.key||h||Wp()})}function El(i){let{pathname:o="/",search:c="",hash:h=""}=i;return c&&c!=="?"&&(o+=c.charAt(0)==="?"?c:"?"+c),h&&h!=="#"&&(o+=h.charAt(0)==="#"?h:"#"+h),o}function gr(i){let o={};if(i){let c=i.indexOf("#");c>=0&&(o.hash=i.substr(c),i=i.substr(0,c));let h=i.indexOf("?");h>=0&&(o.search=i.substr(h),i=i.substr(0,h)),i&&(o.pathname=i)}return o}function Bp(i,o,c,h){h===void 0&&(h={});let{window:p=document.defaultView,v5Compat:g=!1}=h,v=p.history,x=wn.Pop,m=null,u=w();u==null&&(u=0,v.replaceState(os({},v.state,{idx:u}),""));function w(){return(v.state||{idx:null}).idx}function b(){x=wn.Pop;let M=w(),H=M==null?null:M-u;u=M,m&&m({action:x,location:A.location,delta:H})}function T(M,H){x=wn.Push;let q=Po(A.location,M,H);u=w()+1;let W=Fu(q,u),ne=A.createHref(q);try{v.pushState(W,"",ne)}catch(ye){if(ye instanceof DOMException&&ye.name==="DataCloneError")throw ye;p.location.assign(ne)}g&&m&&m({action:x,location:A.location,delta:1})}function C(M,H){x=wn.Replace;let q=Po(A.location,M,H);u=w();let W=Fu(q,u),ne=A.createHref(q);v.replaceState(W,"",ne),g&&m&&m({action:x,location:A.location,delta:0})}function R(M){let H=p.location.origin!=="null"?p.location.origin:p.location.href,q=typeof M=="string"?M:El(M);return q=q.replace(/ $/,"%20"),Ke(H,"No window.location.(origin|href) available to create URL for href: "+q),new URL(q,H)}let A={get action(){return x},get location(){return i(p,v)},listen(M){if(m)throw new Error("A history only accepts one active listener");return p.addEventListener(Ou,b),m=M,()=>{p.removeEventListener(Ou,b),m=null}},createHref(M){return o(p,M)},createURL:R,encodeLocation(M){let H=R(M);return{pathname:H.pathname,search:H.search,hash:H.hash}},push:T,replace:C,go(M){return v.go(M)}};return A}var Wu;(function(i){i.data="data",i.deferred="deferred",i.redirect="redirect",i.error="error"})(Wu||(Wu={}));function Hp(i,o,c){return c===void 0&&(c="/"),Vp(i,o,c)}function Vp(i,o,c,h){let p=typeof o=="string"?gr(o):o,g=Uo(p.pathname||"/",c);if(g==null)return null;let v=hd(i);Gp(v);let x=null;for(let m=0;x==null&&m<v.length;++m){let u=sm(g);x=tm(v[m],u)}return x}function hd(i,o,c,h){o===void 0&&(o=[]),c===void 0&&(c=[]),h===void 0&&(h="");let p=(g,v,x)=>{let m={relativePath:x===void 0?g.path||"":x,caseSensitive:g.caseSensitive===!0,childrenIndex:v,route:g};m.relativePath.startsWith("/")&&(Ke(m.relativePath.startsWith(h),'Absolute route path "'+m.relativePath+'" nested under path '+('"'+h+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),m.relativePath=m.relativePath.slice(h.length));let u=jn([h,m.relativePath]),w=c.concat(m);g.children&&g.children.length>0&&(Ke(g.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+u+'".')),hd(g.children,o,w,u)),!(g.path==null&&!g.index)&&o.push({path:u,score:Zp(u,g.index),routesMeta:w})};return i.forEach((g,v)=>{var x;if(g.path===""||!((x=g.path)!=null&&x.includes("?")))p(g,v);else for(let m of pd(g.path))p(g,v,m)}),o}function pd(i){let o=i.split("/");if(o.length===0)return[];let[c,...h]=o,p=c.endsWith("?"),g=c.replace(/\?$/,"");if(h.length===0)return p?[g,""]:[g];let v=pd(h.join("/")),x=[];return x.push(...v.map(m=>m===""?g:[g,m].join("/"))),p&&x.push(...v),x.map(m=>i.startsWith("/")&&m===""?"/":m)}function Gp(i){i.sort((o,c)=>o.score!==c.score?c.score-o.score:em(o.routesMeta.map(h=>h.childrenIndex),c.routesMeta.map(h=>h.childrenIndex)))}const qp=/^:[\w-]+$/,Yp=3,Qp=2,Kp=1,Xp=10,Jp=-2,Bu=i=>i==="*";function Zp(i,o){let c=i.split("/"),h=c.length;return c.some(Bu)&&(h+=Jp),o&&(h+=Qp),c.filter(p=>!Bu(p)).reduce((p,g)=>p+(qp.test(g)?Yp:g===""?Kp:Xp),h)}function em(i,o){return i.length===o.length&&i.slice(0,-1).every((h,p)=>h===o[p])?i[i.length-1]-o[o.length-1]:0}function tm(i,o,c){let{routesMeta:h}=i,p={},g="/",v=[];for(let x=0;x<h.length;++x){let m=h[x],u=x===h.length-1,w=g==="/"?o:o.slice(g.length)||"/",b=nm({path:m.relativePath,caseSensitive:m.caseSensitive,end:u},w),T=m.route;if(!b)return null;Object.assign(p,b.params),v.push({params:p,pathname:jn([g,b.pathname]),pathnameBase:cm(jn([g,b.pathnameBase])),route:T}),b.pathnameBase!=="/"&&(g=jn([g,b.pathnameBase]))}return v}function nm(i,o){typeof i=="string"&&(i={path:i,caseSensitive:!1,end:!0});let[c,h]=rm(i.path,i.caseSensitive,i.end),p=o.match(c);if(!p)return null;let g=p[0],v=g.replace(/(.)\/+$/,"$1"),x=p.slice(1);return{params:h.reduce((u,w,b)=>{let{paramName:T,isOptional:C}=w;if(T==="*"){let A=x[b]||"";v=g.slice(0,g.length-A.length).replace(/(.)\/+$/,"$1")}const R=x[b];return C&&!R?u[T]=void 0:u[T]=(R||"").replace(/%2F/g,"/"),u},{}),pathname:g,pathnameBase:v,pattern:i}}function rm(i,o,c){o===void 0&&(o=!1),c===void 0&&(c=!0),$o(i==="*"||!i.endsWith("*")||i.endsWith("/*"),'Route path "'+i+'" will be treated as if it were '+('"'+i.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+i.replace(/\*$/,"/*")+'".'));let h=[],p="^"+i.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(v,x,m)=>(h.push({paramName:x,isOptional:m!=null}),m?"/?([^\\/]+)?":"/([^\\/]+)"));return i.endsWith("*")?(h.push({paramName:"*"}),p+=i==="*"||i==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):c?p+="\\/*$":i!==""&&i!=="/"&&(p+="(?:(?=\\/|$))"),[new RegExp(p,o?void 0:"i"),h]}function sm(i){try{return i.split("/").map(o=>decodeURIComponent(o).replace(/\//g,"%2F")).join("/")}catch(o){return $o(!1,'The URL path "'+i+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+o+").")),i}}function Uo(i,o){if(o==="/")return i;if(!i.toLowerCase().startsWith(o.toLowerCase()))return null;let c=o.endsWith("/")?o.length-1:o.length,h=i.charAt(c);return h&&h!=="/"?null:i.slice(c)||"/"}const lm=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,am=i=>lm.test(i);function om(i,o){o===void 0&&(o="/");let{pathname:c,search:h="",hash:p=""}=typeof i=="string"?gr(i):i,g;if(c)if(am(c))g=c;else{if(c.includes("//")){let v=c;c=c.replace(/\/\/+/g,"/"),$o(!1,"Pathnames cannot have embedded double slashes - normalizing "+(v+" -> "+c))}c.startsWith("/")?g=Hu(c.substring(1),"/"):g=Hu(c,o)}else g=o;return{pathname:g,search:um(h),hash:dm(p)}}function Hu(i,o){let c=o.replace(/\/+$/,"").split("/");return i.split("/").forEach(p=>{p===".."?c.length>1&&c.pop():p!=="."&&c.push(p)}),c.length>1?c.join("/"):"/"}function Co(i,o,c,h){return"Cannot include a '"+i+"' character in a manually specified "+("`to."+o+"` field ["+JSON.stringify(h)+"]. Please separate it out to the ")+("`to."+c+"` field. Alternatively you may provide the full path as ")+'a string in <Link to="..."> and the router will parse it for you.'}function im(i){return i.filter((o,c)=>c===0||o.route.path&&o.route.path.length>0)}function Oo(i,o){let c=im(i);return o?c.map((h,p)=>p===c.length-1?h.pathname:h.pathnameBase):c.map(h=>h.pathnameBase)}function Fo(i,o,c,h){h===void 0&&(h=!1);let p;typeof i=="string"?p=gr(i):(p=os({},i),Ke(!p.pathname||!p.pathname.includes("?"),Co("?","pathname","search",p)),Ke(!p.pathname||!p.pathname.includes("#"),Co("#","pathname","hash",p)),Ke(!p.search||!p.search.includes("#"),Co("#","search","hash",p)));let g=i===""||p.pathname==="",v=g?"/":p.pathname,x;if(v==null)x=c;else{let b=o.length-1;if(!h&&v.startsWith("..")){let T=v.split("/");for(;T[0]==="..";)T.shift(),b-=1;p.pathname=T.join("/")}x=b>=0?o[b]:"/"}let m=om(p,x),u=v&&v!=="/"&&v.endsWith("/"),w=(g||v===".")&&c.endsWith("/");return!m.pathname.endsWith("/")&&(u||w)&&(m.pathname+="/"),m}const jn=i=>i.join("/").replace(/\/\/+/g,"/"),cm=i=>i.replace(/\/+$/,"").replace(/^\/*/,"/"),um=i=>!i||i==="?"?"":i.startsWith("?")?i:"?"+i,dm=i=>!i||i==="#"?"":i.startsWith("#")?i:"#"+i;function hm(i){return i!=null&&typeof i.status=="number"&&typeof i.statusText=="string"&&typeof i.internal=="boolean"&&"data"in i}const md=["post","put","patch","delete"];new Set(md);const pm=["get",...md];new Set(pm);function is(){return is=Object.assign?Object.assign.bind():function(i){for(var o=1;o<arguments.length;o++){var c=arguments[o];for(var h in c)Object.prototype.hasOwnProperty.call(c,h)&&(i[h]=c[h])}return i},is.apply(this,arguments)}const Wo=y.createContext(null),mm=y.createContext(null),bn=y.createContext(null),Tl=y.createContext(null),Nn=y.createContext({outlet:null,matches:[],isDataRoute:!1}),fd=y.createContext(null);function fm(i,o){let{relative:c}=o===void 0?{}:o;yr()||Ke(!1);let{basename:h,navigator:p}=y.useContext(bn),{hash:g,pathname:v,search:x}=gd(i,{relative:c}),m=v;return h!=="/"&&(m=v==="/"?h:jn([h,v])),p.createHref({pathname:m,search:x,hash:g})}function yr(){return y.useContext(Tl)!=null}function Zt(){return yr()||Ke(!1),y.useContext(Tl).location}function xd(i){y.useContext(bn).static||y.useLayoutEffect(i)}function Wn(){let{isDataRoute:i}=y.useContext(Nn);return i?Tm():xm()}function xm(){yr()||Ke(!1);let i=y.useContext(Wo),{basename:o,future:c,navigator:h}=y.useContext(bn),{matches:p}=y.useContext(Nn),{pathname:g}=Zt(),v=JSON.stringify(Oo(p,c.v7_relativeSplatPath)),x=y.useRef(!1);return xd(()=>{x.current=!0}),y.useCallback(function(u,w){if(w===void 0&&(w={}),!x.current)return;if(typeof u=="number"){h.go(u);return}let b=Fo(u,JSON.parse(v),g,w.relative==="path");i==null&&o!=="/"&&(b.pathname=b.pathname==="/"?o:jn([o,b.pathname])),(w.replace?h.replace:h.push)(b,w.state,w)},[o,h,v,g,i])}function gd(i,o){let{relative:c}=o===void 0?{}:o,{future:h}=y.useContext(bn),{matches:p}=y.useContext(Nn),{pathname:g}=Zt(),v=JSON.stringify(Oo(p,h.v7_relativeSplatPath));return y.useMemo(()=>Fo(i,JSON.parse(v),g,c==="path"),[i,v,g,c])}function gm(i,o){return ym(i,o)}function ym(i,o,c,h){yr()||Ke(!1);let{navigator:p}=y.useContext(bn),{matches:g}=y.useContext(Nn),v=g[g.length-1],x=v?v.params:{};v&&v.pathname;let m=v?v.pathnameBase:"/";v&&v.route;let u=Zt(),w;if(o){var b;let M=typeof o=="string"?gr(o):o;m==="/"||(b=M.pathname)!=null&&b.startsWith(m)||Ke(!1),w=M}else w=u;let T=w.pathname||"/",C=T;if(m!=="/"){let M=m.replace(/^\//,"").split("/");C="/"+T.replace(/^\//,"").split("/").slice(M.length).join("/")}let R=Hp(i,{pathname:C}),A=Nm(R&&R.map(M=>Object.assign({},M,{params:Object.assign({},x,M.params),pathname:jn([m,p.encodeLocation?p.encodeLocation(M.pathname).pathname:M.pathname]),pathnameBase:M.pathnameBase==="/"?m:jn([m,p.encodeLocation?p.encodeLocation(M.pathnameBase).pathname:M.pathnameBase])})),g,c,h);return o&&A?y.createElement(Tl.Provider,{value:{location:is({pathname:"/",search:"",hash:"",state:null,key:"default"},w),navigationType:wn.Pop}},A):A}function vm(){let i=Em(),o=hm(i)?i.status+" "+i.statusText:i instanceof Error?i.message:JSON.stringify(i),c=i instanceof Error?i.stack:null,p={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return y.createElement(y.Fragment,null,y.createElement("h2",null,"Unexpected Application Error!"),y.createElement("h3",{style:{fontStyle:"italic"}},o),c?y.createElement("pre",{style:p},c):null,null)}const wm=y.createElement(vm,null);class jm extends y.Component{constructor(o){super(o),this.state={location:o.location,revalidation:o.revalidation,error:o.error}}static getDerivedStateFromError(o){return{error:o}}static getDerivedStateFromProps(o,c){return c.location!==o.location||c.revalidation!=="idle"&&o.revalidation==="idle"?{error:o.error,location:o.location,revalidation:o.revalidation}:{error:o.error!==void 0?o.error:c.error,location:c.location,revalidation:o.revalidation||c.revalidation}}componentDidCatch(o,c){console.error("React Router caught the following error during render",o,c)}render(){return this.state.error!==void 0?y.createElement(Nn.Provider,{value:this.props.routeContext},y.createElement(fd.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function bm(i){let{routeContext:o,match:c,children:h}=i,p=y.useContext(Wo);return p&&p.static&&p.staticContext&&(c.route.errorElement||c.route.ErrorBoundary)&&(p.staticContext._deepestRenderedBoundaryId=c.route.id),y.createElement(Nn.Provider,{value:o},h)}function Nm(i,o,c,h){var p;if(o===void 0&&(o=[]),c===void 0&&(c=null),h===void 0&&(h=null),i==null){var g;if(!c)return null;if(c.errors)i=c.matches;else if((g=h)!=null&&g.v7_partialHydration&&o.length===0&&!c.initialized&&c.matches.length>0)i=c.matches;else return null}let v=i,x=(p=c)==null?void 0:p.errors;if(x!=null){let w=v.findIndex(b=>b.route.id&&x?.[b.route.id]!==void 0);w>=0||Ke(!1),v=v.slice(0,Math.min(v.length,w+1))}let m=!1,u=-1;if(c&&h&&h.v7_partialHydration)for(let w=0;w<v.length;w++){let b=v[w];if((b.route.HydrateFallback||b.route.hydrateFallbackElement)&&(u=w),b.route.id){let{loaderData:T,errors:C}=c,R=b.route.loader&&T[b.route.id]===void 0&&(!C||C[b.route.id]===void 0);if(b.route.lazy||R){m=!0,u>=0?v=v.slice(0,u+1):v=[v[0]];break}}}return v.reduceRight((w,b,T)=>{let C,R=!1,A=null,M=null;c&&(C=x&&b.route.id?x[b.route.id]:void 0,A=b.route.errorElement||wm,m&&(u<0&&T===0?(Pm("route-fallback"),R=!0,M=null):u===T&&(R=!0,M=b.route.hydrateFallbackElement||null)));let H=o.concat(v.slice(0,T+1)),q=()=>{let W;return C?W=A:R?W=M:b.route.Component?W=y.createElement(b.route.Component,null):b.route.element?W=b.route.element:W=w,y.createElement(bm,{match:b,routeContext:{outlet:w,matches:H,isDataRoute:c!=null},children:W})};return c&&(b.route.ErrorBoundary||b.route.errorElement||T===0)?y.createElement(jm,{location:c.location,revalidation:c.revalidation,component:A,error:C,children:q(),routeContext:{outlet:null,matches:H,isDataRoute:!0}}):q()},null)}var yd=(function(i){return i.UseBlocker="useBlocker",i.UseRevalidator="useRevalidator",i.UseNavigateStable="useNavigate",i})(yd||{}),vd=(function(i){return i.UseBlocker="useBlocker",i.UseLoaderData="useLoaderData",i.UseActionData="useActionData",i.UseRouteError="useRouteError",i.UseNavigation="useNavigation",i.UseRouteLoaderData="useRouteLoaderData",i.UseMatches="useMatches",i.UseRevalidator="useRevalidator",i.UseNavigateStable="useNavigate",i.UseRouteId="useRouteId",i})(vd||{});function km(i){let o=y.useContext(Wo);return o||Ke(!1),o}function Cm(i){let o=y.useContext(mm);return o||Ke(!1),o}function Sm(i){let o=y.useContext(Nn);return o||Ke(!1),o}function wd(i){let o=Sm(),c=o.matches[o.matches.length-1];return c.route.id||Ke(!1),c.route.id}function Em(){var i;let o=y.useContext(fd),c=Cm(),h=wd();return o!==void 0?o:(i=c.errors)==null?void 0:i[h]}function Tm(){let{router:i}=km(yd.UseNavigateStable),o=wd(vd.UseNavigateStable),c=y.useRef(!1);return xd(()=>{c.current=!0}),y.useCallback(function(p,g){g===void 0&&(g={}),c.current&&(typeof p=="number"?i.navigate(p):i.navigate(p,is({fromRouteId:o},g)))},[i,o])}const Vu={};function Pm(i,o,c){Vu[i]||(Vu[i]=!0)}function Im(i,o){i?.v7_startTransition,i?.v7_relativeSplatPath}function kl(i){let{to:o,replace:c,state:h,relative:p}=i;yr()||Ke(!1);let{future:g,static:v}=y.useContext(bn),{matches:x}=y.useContext(Nn),{pathname:m}=Zt(),u=Wn(),w=Fo(o,Oo(x,g.v7_relativeSplatPath),m,p==="path"),b=JSON.stringify(w);return y.useEffect(()=>u(JSON.parse(b),{replace:c,state:h,relative:p}),[u,b,p,c,h]),null}function $t(i){Ke(!1)}function Mm(i){let{basename:o="/",children:c=null,location:h,navigationType:p=wn.Pop,navigator:g,static:v=!1,future:x}=i;yr()&&Ke(!1);let m=o.replace(/^\/*/,"/"),u=y.useMemo(()=>({basename:m,navigator:g,static:v,future:is({v7_relativeSplatPath:!1},x)}),[m,x,g,v]);typeof h=="string"&&(h=gr(h));let{pathname:w="/",search:b="",hash:T="",state:C=null,key:R="default"}=h,A=y.useMemo(()=>{let M=Uo(w,m);return M==null?null:{location:{pathname:M,search:b,hash:T,state:C,key:R},navigationType:p}},[m,w,b,T,C,R,p]);return A==null?null:y.createElement(bn.Provider,{value:u},y.createElement(Tl.Provider,{children:c,value:A}))}function _m(i){let{children:o,location:c}=i;return gm(Io(o),c)}new Promise(()=>{});function Io(i,o){o===void 0&&(o=[]);let c=[];return y.Children.forEach(i,(h,p)=>{if(!y.isValidElement(h))return;let g=[...o,p];if(h.type===y.Fragment){c.push.apply(c,Io(h.props.children,g));return}h.type!==$t&&Ke(!1),!h.props.index||!h.props.children||Ke(!1);let v={id:h.props.id||g.join("-"),caseSensitive:h.props.caseSensitive,element:h.props.element,Component:h.props.Component,index:h.props.index,path:h.props.path,loader:h.props.loader,action:h.props.action,errorElement:h.props.errorElement,ErrorBoundary:h.props.ErrorBoundary,hasErrorBoundary:h.props.ErrorBoundary!=null||h.props.errorElement!=null,shouldRevalidate:h.props.shouldRevalidate,handle:h.props.handle,lazy:h.props.lazy};h.props.children&&(v.children=Io(h.props.children,g)),c.push(v)}),c}function Mo(){return Mo=Object.assign?Object.assign.bind():function(i){for(var o=1;o<arguments.length;o++){var c=arguments[o];for(var h in c)Object.prototype.hasOwnProperty.call(c,h)&&(i[h]=c[h])}return i},Mo.apply(this,arguments)}function Rm(i,o){if(i==null)return{};var c={},h=Object.keys(i),p,g;for(g=0;g<h.length;g++)p=h[g],!(o.indexOf(p)>=0)&&(c[p]=i[p]);return c}function Am(i){return!!(i.metaKey||i.altKey||i.ctrlKey||i.shiftKey)}function Lm(i,o){return i.button===0&&(!o||o==="_self")&&!Am(i)}const zm=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],Dm="6";try{window.__reactRouterVersion=Dm}catch{}const $m="startTransition",Gu=Ap[$m];function Um(i){let{basename:o,children:c,future:h,window:p}=i,g=y.useRef();g.current==null&&(g.current=Fp({window:p,v5Compat:!0}));let v=g.current,[x,m]=y.useState({action:v.action,location:v.location}),{v7_startTransition:u}=h||{},w=y.useCallback(b=>{u&&Gu?Gu(()=>m(b)):m(b)},[m,u]);return y.useLayoutEffect(()=>v.listen(w),[v,w]),y.useEffect(()=>Im(h),[h]),y.createElement(Mm,{basename:o,children:c,location:x.location,navigationType:x.action,navigator:v,future:h})}const Om=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",Fm=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,dt=y.forwardRef(function(o,c){let{onClick:h,relative:p,reloadDocument:g,replace:v,state:x,target:m,to:u,preventScrollReset:w,viewTransition:b}=o,T=Rm(o,zm),{basename:C}=y.useContext(bn),R,A=!1;if(typeof u=="string"&&Fm.test(u)&&(R=u,Om))try{let W=new URL(window.location.href),ne=u.startsWith("//")?new URL(W.protocol+u):new URL(u),ye=Uo(ne.pathname,C);ne.origin===W.origin&&ye!=null?u=ye+ne.search+ne.hash:A=!0}catch{}let M=fm(u,{relative:p}),H=Wm(u,{replace:v,state:x,target:m,preventScrollReset:w,relative:p,viewTransition:b});function q(W){h&&h(W),W.defaultPrevented||H(W)}return y.createElement("a",Mo({},T,{href:R||M,onClick:A||g?h:q,ref:c,target:m}))});var qu;(function(i){i.UseScrollRestoration="useScrollRestoration",i.UseSubmit="useSubmit",i.UseSubmitFetcher="useSubmitFetcher",i.UseFetcher="useFetcher",i.useViewTransitionState="useViewTransitionState"})(qu||(qu={}));var Yu;(function(i){i.UseFetcher="useFetcher",i.UseFetchers="useFetchers",i.UseScrollRestoration="useScrollRestoration"})(Yu||(Yu={}));function Wm(i,o){let{target:c,replace:h,state:p,preventScrollReset:g,relative:v,viewTransition:x}=o===void 0?{}:o,m=Wn(),u=Zt(),w=gd(i,{relative:v});return y.useCallback(b=>{if(Lm(b,c)){b.preventDefault();let T=h!==void 0?h:El(u)===El(w);m(i,{replace:T,state:p,preventScrollReset:g,relative:v,viewTransition:x})}},[u,m,w,h,p,c,i,g,v,x])}const Bm=i=>i.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Hm=i=>i.replace(/^([A-Z])|[\s-_]+(\w)/g,(o,c,h)=>h?h.toUpperCase():c.toLowerCase()),Qu=i=>{const o=Hm(i);return o.charAt(0).toUpperCase()+o.slice(1)},jd=(...i)=>i.filter((o,c,h)=>!!o&&o.trim()!==""&&h.indexOf(o)===c).join(" ").trim(),Vm=i=>{for(const o in i)if(o.startsWith("aria-")||o==="role"||o==="title")return!0};var Gm={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"};const qm=y.forwardRef(({color:i="currentColor",size:o=24,strokeWidth:c=2,absoluteStrokeWidth:h,className:p="",children:g,iconNode:v,...x},m)=>y.createElement("svg",{ref:m,...Gm,width:o,height:o,stroke:i,strokeWidth:h?Number(c)*24/Number(o):c,className:jd("lucide",p),...!g&&!Vm(x)&&{"aria-hidden":"true"},...x},[...v.map(([u,w])=>y.createElement(u,w)),...Array.isArray(g)?g:[g]]));const te=(i,o)=>{const c=y.forwardRef(({className:h,...p},g)=>y.createElement(qm,{ref:g,iconNode:o,className:jd(`lucide-${Bm(Qu(i))}`,`lucide-${i}`,h),...p}));return c.displayName=Qu(i),c};const Ym=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],bd=te("arrow-left",Ym);const Qm=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],cs=te("arrow-right",Qm);const Km=[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]],Xm=te("bot",Km);const Jm=[["path",{d:"M6 22V4a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v18Z",key:"1b4qmf"}],["path",{d:"M6 12H4a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2h2",key:"i71pzd"}],["path",{d:"M18 9h2a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2h-2",key:"10jefs"}],["path",{d:"M10 6h4",key:"1itunk"}],["path",{d:"M10 10h4",key:"tcdvrf"}],["path",{d:"M10 14h4",key:"kelpxr"}],["path",{d:"M10 18h4",key:"1ulq68"}]],Zm=te("building-2",Jm);const ef=[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"M18 17V9",key:"2bz60n"}],["path",{d:"M13 17V5",key:"1frdt8"}],["path",{d:"M8 17v-3",key:"17ska0"}]],tf=te("chart-column",ef);const nf=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],On=te("check",nf);const rf=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],sf=te("chevron-down",rf);const lf=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],Bo=te("chevron-right",lf);const af=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],of=te("circle-check",af);const cf=[["path",{d:"m18 16 4-4-4-4",key:"1inbqp"}],["path",{d:"m6 8-4 4 4 4",key:"15zrgr"}],["path",{d:"m14.5 4-5 16",key:"e7oirm"}]],Nd=te("code-xml",cf);const uf=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]],us=te("copy",uf);const df=[["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M17 20v2",key:"1rnc9c"}],["path",{d:"M17 2v2",key:"11trls"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M2 17h2",key:"7oei6x"}],["path",{d:"M2 7h2",key:"asdhe0"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"M20 17h2",key:"1fpfkl"}],["path",{d:"M20 7h2",key:"1o8tra"}],["path",{d:"M7 20v2",key:"4gnj0m"}],["path",{d:"M7 2v2",key:"1i4yhu"}],["rect",{x:"4",y:"4",width:"16",height:"16",rx:"2",key:"1vbyd7"}],["rect",{x:"8",y:"8",width:"8",height:"8",rx:"1",key:"z9xiuo"}]],kd=te("cpu",df);const hf=[["path",{d:"M11.562 3.266a.5.5 0 0 1 .876 0L15.39 8.87a1 1 0 0 0 1.516.294L21.183 5.5a.5.5 0 0 1 .798.519l-2.834 10.246a1 1 0 0 1-.956.734H5.81a1 1 0 0 1-.957-.734L2.02 6.02a.5.5 0 0 1 .798-.519l4.276 3.664a1 1 0 0 0 1.516-.294z",key:"1vdc57"}],["path",{d:"M5 21h14",key:"11awu3"}]],pf=te("crown",hf);const mf=[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]],_o=te("download",mf);const ff=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]],ss=te("external-link",ff);const xf=[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],gf=te("eye",xf);const yf=[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]],vf=te("eye-off",yf);const wf=[["path",{d:"M10 12.5 8 15l2 2.5",key:"1tg20x"}],["path",{d:"m14 12.5 2 2.5-2 2.5",key:"yinavb"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7z",key:"1mlx9k"}]],Ro=te("file-code",wf);const jf=[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]],Cd=te("file-text",jf);const bf=[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]],xr=te("folder-open",bf);const Nf=[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]],kf=te("folder",Nf);const Cf=[["line",{x1:"6",x2:"6",y1:"3",y2:"15",key:"17qcm7"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["path",{d:"M18 9a9 9 0 0 1-9 9",key:"n2h4wq"}]],Fn=te("git-branch",Cf);const Sf=[["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}],["line",{x1:"3",x2:"9",y1:"12",y2:"12",key:"1dyftd"}],["line",{x1:"15",x2:"21",y1:"12",y2:"12",key:"oup4p8"}]],Ef=te("git-commit-horizontal",Sf);const Tf=[["path",{d:"M15 22v-4a4.8 4.8 0 0 0-1-3.5c3 0 6-2 6-5.5.08-1.25-.27-2.48-1-3.5.28-1.15.28-2.35 0-3.5 0 0-1 0-3 1.5-2.64-.5-5.36-.5-8 0C6 2 5 2 5 2c-.3 1.15-.3 2.35 0 3.5A5.403 5.403 0 0 0 4 9c0 3.5 3 5.5 6 5.5-.39.49-.68 1.05-.85 1.65-.17.6-.22 1.23-.15 1.85v4",key:"tonef"}],["path",{d:"M9 18c-4.51 2-5-2-7-2",key:"9comsn"}]],Ao=te("github",Tf);const Pf=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]],Sd=te("globe",Pf);const If=[["path",{d:"M9 17H7A5 5 0 0 1 7 7h2",key:"8i5ue5"}],["path",{d:"M15 7h2a5 5 0 1 1 0 10h-2",key:"1b9ql8"}],["line",{x1:"8",x2:"16",y1:"12",y2:"12",key:"1jonct"}]],Mf=te("link-2",If);const _f=[["path",{d:"M16 8a6 6 0 0 1 6 6v7h-4v-7a2 2 0 0 0-2-2 2 2 0 0 0-2 2v7h-4v-7a6 6 0 0 1 6-6z",key:"c2jq9f"}],["rect",{width:"4",height:"12",x:"2",y:"9",key:"mk3on5"}],["circle",{cx:"4",cy:"4",r:"2",key:"bt5ra8"}]],Rf=te("linkedin",_f);const Af=[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]],ls=te("lock",Af);const Lf=[["path",{d:"m16 17 5-5-5-5",key:"1bji2h"}],["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}]],Ku=te("log-out",Lf);const zf=[["path",{d:"m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7",key:"132q7q"}],["rect",{x:"2",y:"4",width:"20",height:"16",rx:"2",key:"izxlao"}]],Lo=te("mail",zf);const Df=[["path",{d:"M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0",key:"1r0f0z"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}]],$f=te("map-pin",Df);const Uf=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"m21 3-7 7",key:"1l2asr"}],["path",{d:"m3 21 7-7",key:"tjx5ai"}],["path",{d:"M9 21H3v-6",key:"wtvkvv"}]],Of=te("maximize-2",Uf);const Ff=[["path",{d:"M8 3H5a2 2 0 0 0-2 2v3",key:"1dcmit"}],["path",{d:"M21 8V5a2 2 0 0 0-2-2h-3",key:"1e4gt3"}],["path",{d:"M3 16v3a2 2 0 0 0 2 2h3",key:"wsl5sc"}],["path",{d:"M16 21h3a2 2 0 0 0 2-2v-3",key:"18trek"}]],Wf=te("maximize",Ff);const Bf=[["path",{d:"M4 12h16",key:"1lakjw"}],["path",{d:"M4 18h16",key:"19g7jn"}],["path",{d:"M4 6h16",key:"1o0s65"}]],Hf=te("menu",Bf);const Vf=[["path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z",key:"1lielz"}]],ds=te("message-square",Vf);const Gf=[["path",{d:"m14 10 7-7",key:"oa77jy"}],["path",{d:"M20 10h-6V4",key:"mjg0md"}],["path",{d:"m3 21 7-7",key:"tjx5ai"}],["path",{d:"M4 14h6v6",key:"rmj7iw"}]],qf=te("minimize-2",Gf);const Yf=[["path",{d:"m14.622 17.897-10.68-2.913",key:"vj2p1u"}],["path",{d:"M18.376 2.622a1 1 0 1 1 3.002 3.002L17.36 9.643a.5.5 0 0 0 0 .707l.944.944a2.41 2.41 0 0 1 0 3.408l-.944.944a.5.5 0 0 1-.707 0L8.354 7.348a.5.5 0 0 1 0-.707l.944-.944a2.41 2.41 0 0 1 3.408 0l.944.944a.5.5 0 0 0 .707 0z",key:"18tc5c"}],["path",{d:"M9 8c-1.804 2.71-3.97 3.46-6.583 3.948a.507.507 0 0 0-.302.819l7.32 8.883a1 1 0 0 0 1.185.204C12.735 20.405 16 16.792 16 15",key:"ytzfxy"}]],hs=te("paintbrush",Yf);const Qf=[["path",{d:"M12 22a1 1 0 0 1 0-20 10 9 0 0 1 10 9 5 5 0 0 1-5 5h-2.25a1.75 1.75 0 0 0-1.4 2.8l.3.4a1.75 1.75 0 0 1-1.4 2.8z",key:"e79jfc"}],["circle",{cx:"13.5",cy:"6.5",r:".5",fill:"currentColor",key:"1okk4w"}],["circle",{cx:"17.5",cy:"10.5",r:".5",fill:"currentColor",key:"f64h9f"}],["circle",{cx:"6.5",cy:"12.5",r:".5",fill:"currentColor",key:"qy21gx"}],["circle",{cx:"8.5",cy:"7.5",r:".5",fill:"currentColor",key:"fotxhn"}]],Kf=te("palette",Qf);const Xf=[["path",{d:"M13.832 16.568a1 1 0 0 0 1.213-.303l.355-.465A2 2 0 0 1 17 15h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2A18 18 0 0 1 2 4a2 2 0 0 1 2-2h3a2 2 0 0 1 2 2v3a2 2 0 0 1-.8 1.6l-.468.351a1 1 0 0 0-.292 1.233 14 14 0 0 0 6.392 6.384",key:"9njp5v"}]],Xu=te("phone",Xf);const Jf=[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]],Ho=te("play",Jf);const Zf=[["path",{d:"M12 22v-5",key:"1ega77"}],["path",{d:"M9 8V2",key:"14iosj"}],["path",{d:"M15 8V2",key:"18g5xt"}],["path",{d:"M18 8v5a4 4 0 0 1-4 4h-4a4 4 0 0 1-4-4V8Z",key:"osxo6l"}]],Pl=te("plug",Zf);const ex=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],Vo=te("plus",ex);const tx=[["path",{d:"M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91-.09z",key:"m3kijz"}],["path",{d:"m12 15-3-3a22 22 0 0 1 2-3.95A12.88 12.88 0 0 1 22 2c0 2.72-.78 7.5-6 11a22.35 22.35 0 0 1-4 2z",key:"1fmvmk"}],["path",{d:"M9 12H4s.55-3.03 2-4c1.62-1.08 5 0 5 0",key:"1f8sc4"}],["path",{d:"M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5",key:"qeys4"}]],nx=te("rocket",tx);const rx=[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]],sx=te("rotate-ccw",rx);const lx=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],ax=te("search",lx);const ox=[["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"}]],Ed=te("send",ox);const ix=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]],Td=te("shield",ix);const cx=[["path",{d:"M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z",key:"4pj2yx"}],["path",{d:"M20 3v4",key:"1olli1"}],["path",{d:"M22 5h-4",key:"1gvqau"}],["path",{d:"M4 17v2",key:"vumght"}],["path",{d:"M5 18H3",key:"zchphs"}]],Cl=te("sparkles",cx);const ux=[["path",{d:"M16 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V8Z",key:"qazsjp"}],["path",{d:"M15 3v4a2 2 0 0 0 2 2h4",key:"40519r"}]],Go=te("sticky-note",ux);const dx=[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]],ps=te("terminal",dx);const hx=[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]],px=te("trash-2",hx);const mx=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],fx=te("triangle-alert",mx);const xx=[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["line",{x1:"19",x2:"19",y1:"8",y2:"14",key:"1bvyxn"}],["line",{x1:"22",x2:"16",y1:"11",y2:"11",key:"1shjgl"}]],Ju=te("user-plus",xx);const gx=[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]],yx=te("user",gx);const vx=[["path",{d:"M12 20h.01",key:"zekei9"}],["path",{d:"M2 8.82a15 15 0 0 1 20 0",key:"dnpr2z"}],["path",{d:"M5 12.859a10 10 0 0 1 14 0",key:"1x1e6c"}],["path",{d:"M8.5 16.429a5 5 0 0 1 7 0",key:"1bycff"}]],Pd=te("wifi",vx);const wx=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],qo=te("x",wx);const jx=[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]],as=te("zap",jx);const bx=[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["line",{x1:"21",x2:"16.65",y1:"21",y2:"16.65",key:"13gj7c"}],["line",{x1:"11",x2:"11",y1:"8",y2:"14",key:"1vmskp"}],["line",{x1:"8",x2:"14",y1:"11",y2:"11",key:"durymu"}]],Nx=te("zoom-in",bx);const kx=[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["line",{x1:"21",x2:"16.65",y1:"21",y2:"16.65",key:"13gj7c"}],["line",{x1:"8",x2:"14",y1:"11",y2:"11",key:"durymu"}]],Cx=te("zoom-out",kx);function Bn({onOpenAuth:i}){const{pathname:o}=Zt();Wn();const[c,h]=y.useState(!1),p=v=>`px-3 py-2 text-xs sm:text-sm font-medium transition-colors ${v?"text-white":"text-slate-500 hover:text-slate-300"}`,g=v=>`block px-4 py-3 text-sm font-medium transition-colors ${v?"text-white bg-white/5":"text-slate-400 hover:text-white hover:bg-white/5"}`;return n.jsxs("nav",{className:"fixed top-0 left-0 right-0 z-50 bg-[#0a0f1e]/80 backdrop-blur-md border-b border-white/5",children:[n.jsxs("div",{className:"flex items-center justify-between px-4 sm:px-6 py-3 sm:py-4",children:[n.jsx(dt,{to:"/",className:"text-sm font-semibold text-slate-400 hover:text-white tracking-wide transition-colors",children:"Upfyn-Code"}),n.jsxs("div",{className:"hidden md:flex items-center gap-1 sm:gap-2",children:[n.jsx(dt,{to:"/docs",className:p(o==="/docs"),children:"Docs"}),n.jsx(dt,{to:"/pricing",className:p(o==="/pricing"),children:"Pricing"}),n.jsx(dt,{to:"/about",className:p(o==="/about"),children:"About"}),n.jsx(dt,{to:"/contact",className:p(o==="/contact"),children:"Contact"}),n.jsxs("a",{href:"https://github.com/AnitChaudhry",target:"_blank",rel:"noopener noreferrer",className:"px-3 py-2 text-slate-500 hover:text-white transition-colors flex items-center gap-1.5",title:"View on GitHub",children:[n.jsx(Ao,{size:16}),n.jsx("span",{className:"hidden sm:inline text-xs sm:text-sm font-medium",children:"GitHub"})]}),n.jsx("button",{onClick:()=>i("login"),className:"px-3 sm:px-4 py-2 text-xs sm:text-sm font-medium text-slate-400 hover:text-white transition-colors",children:"Sign In"}),n.jsx("button",{onClick:()=>i("signup"),className:"px-3 sm:px-4 py-2 text-xs sm:text-sm font-medium text-white bg-white/10 hover:bg-white/15 border border-white/10 rounded-lg transition-all active:scale-[0.97]",children:"Get Started"})]}),n.jsxs("div",{className:"flex items-center gap-2 md:hidden",children:[n.jsx("button",{onClick:()=>i("login"),className:"px-3 py-1.5 text-xs font-medium text-slate-400 hover:text-white transition-colors",children:"Sign In"}),n.jsx("button",{onClick:()=>i("signup"),className:"px-3 py-1.5 text-xs font-medium text-white bg-white/10 hover:bg-white/15 border border-white/10 rounded-lg transition-all active:scale-[0.97]",children:"Get Started"}),n.jsx("button",{onClick:()=>h(!c),className:"p-2 text-slate-400 hover:text-white transition-colors",children:c?n.jsx(qo,{size:20}):n.jsx(Hf,{size:20})})]})]}),c&&n.jsxs("div",{className:"md:hidden border-t border-white/5 bg-[#0a0f1e]/95 backdrop-blur-md",children:[n.jsx(dt,{to:"/docs",className:g(o==="/docs"),onClick:()=>h(!1),children:"Docs"}),n.jsx(dt,{to:"/pricing",className:g(o==="/pricing"),onClick:()=>h(!1),children:"Pricing"}),n.jsx(dt,{to:"/about",className:g(o==="/about"),onClick:()=>h(!1),children:"About"}),n.jsx(dt,{to:"/contact",className:g(o==="/contact"),onClick:()=>h(!1),children:"Contact"}),n.jsxs("a",{href:"https://github.com/AnitChaudhry",target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-2 px-4 py-3 text-sm font-medium text-slate-400 hover:text-white hover:bg-white/5 transition-colors",onClick:()=>h(!1),children:[n.jsx(Ao,{size:16}),"GitHub"]})]})]})}function Hn(){return n.jsx("footer",{className:"border-t border-white/5 bg-[#070b16] px-4 sm:px-6 py-10",children:n.jsxs("div",{className:"max-w-5xl mx-auto",children:[n.jsx("div",{className:"text-center mb-8",children:n.jsx("code",{className:"inline-block px-4 py-2 bg-slate-800/60 border border-slate-700/50 rounded-lg text-emerald-400 font-mono text-xs sm:text-sm select-all max-w-full",children:"npm install -g upfyn-code"})}),n.jsxs("div",{className:"flex flex-wrap justify-center gap-4 sm:gap-6 text-sm text-slate-500 mb-6",children:[n.jsx(dt,{to:"/docs",className:"hover:text-white transition-colors",children:"Documentation"}),n.jsx(dt,{to:"/pricing",className:"hover:text-white transition-colors",children:"Pricing"}),n.jsx(dt,{to:"/about",className:"hover:text-white transition-colors",children:"About"}),n.jsx(dt,{to:"/contact",className:"hover:text-white transition-colors",children:"Contact"}),n.jsx(dt,{to:"/privacy",className:"hover:text-white transition-colors",children:"Privacy Policy"}),n.jsx(dt,{to:"/terms",className:"hover:text-white transition-colors",children:"Terms & Conditions"})]}),n.jsxs("p",{className:"text-center text-xs text-slate-600 flex items-center justify-center gap-1.5 flex-wrap",children:[n.jsxs("span",{children:["© ",new Date().getFullYear()," ",n.jsx("a",{href:"https://www.thinqmesh.com",target:"_blank",rel:"noopener noreferrer",className:"hover:text-white transition-colors",children:"Thinqmesh Technologies"}),". All rights reserved."]}),n.jsxs("span",{className:"inline-flex items-center gap-1",children:["Built in India",n.jsx("span",{className:"inline-block animate-spin-slow text-sm","aria-label":"India flag",children:"🇮🇳"}),n.jsx("span",{className:"text-red-400 animate-pulse",children:"♥"}),"for the world"]})]})]})})}function Sx(){const i=y.useRef(null),o=y.useRef(null),c=y.useRef([]);return y.useEffect(()=>{const h=i.current;if(!h)return;const p=h.getContext("2d");let g,v;const x=()=>{g=h.width=window.innerWidth,v=h.height=window.innerHeight};x(),window.addEventListener("resize",x);const m=Math.min(80,Math.floor(g*v/18e3)),u=[];for(let C=0;C<m;C++)u.push({x:Math.random()*g,y:Math.random()*v,vx:(Math.random()-.5)*.3,vy:(Math.random()-.5)*.3,r:Math.random()*1.5+.5,color:C%5===0?"rgba(139,92,246,":C%3===0?"rgba(59,130,246,":"rgba(148,163,184,"});c.current=u;const w=140,b=w*w,T=()=>{p.clearRect(0,0,g,v);for(const C of u)C.x+=C.vx,C.y+=C.vy,C.x<-10&&(C.x=g+10),C.x>g+10&&(C.x=-10),C.y<-10&&(C.y=v+10),C.y>v+10&&(C.y=-10);for(let C=0;C<u.length;C++)for(let R=C+1;R<u.length;R++){const A=u[C].x-u[R].x,M=u[C].y-u[R].y,H=A*A+M*M;if(H<b){const q=(1-H/b)*.25;p.strokeStyle=`rgba(148,163,184,${q})`,p.lineWidth=.5,p.beginPath(),p.moveTo(u[C].x,u[C].y),p.lineTo(u[R].x,u[R].y),p.stroke()}}for(const C of u)p.beginPath(),p.arc(C.x,C.y,C.r,0,Math.PI*2),p.fillStyle=C.color+"0.6)",p.fill();o.current=requestAnimationFrame(T)};return T(),()=>{window.removeEventListener("resize",x),o.current&&cancelAnimationFrame(o.current)}},[]),n.jsx("canvas",{ref:i,className:"fixed inset-0 z-0 pointer-events-none",style:{opacity:1}})}function Ex({onOpenAuth:i,returningName:o,onSessionResume:c,onTryDemo:h}){const[p,g]=y.useState(!1),[v,x]=y.useState(null),[m,u]=y.useState(!1),w=y.useRef(null),b=y.useRef(null),T=async(C,R)=>{if(C==="login"&&o&&c){x(C),g(!0),u(!0);try{if(await c())return}catch{}u(!1)}x(C),g(!0),setTimeout(()=>{i(C),g(!1),x(null)},650)};return n.jsxs("section",{className:"min-h-screen flex flex-col items-center justify-center relative px-4 pt-14 sm:pt-16",children:[n.jsx(Sx,{}),p&&n.jsx("div",{className:"fixed inset-0 z-20 pointer-events-none blur-bloom-overlay",style:{background:"radial-gradient(circle at 50% 50%, rgba(10,15,30,0.95) 0%, rgba(10,15,30,0.85) 100%)"}}),m&&p&&n.jsx("div",{className:"fixed inset-0 z-30 flex items-center justify-center",children:n.jsxs("div",{className:"flex flex-col items-center gap-4",children:[n.jsx("div",{className:"w-10 h-10 border-2 border-emerald-500 border-t-transparent rounded-full animate-spin"}),n.jsx("p",{className:"text-slate-400 text-sm font-mono",children:"Resuming session..."})]})}),n.jsxs("div",{className:"flex flex-col items-center justify-center relative z-10",children:[n.jsx("button",{ref:w,onClick:()=>T("signup"),className:`landing-word landing-hello text-4xl sm:text-5xl md:text-7xl lg:text-8xl xl:text-[10rem] 2xl:text-[12rem] font-black leading-none tracking-tight ${p?v==="signup"?"word-explode":"word-fade-away":""}`,children:"Hello"}),n.jsx("button",{ref:b,onClick:()=>T("login"),className:`landing-word landing-welcome text-4xl sm:text-5xl md:text-7xl lg:text-8xl xl:text-[10rem] 2xl:text-[12rem] font-black leading-none tracking-tight mt-1 sm:mt-2 ${p?v==="login"?"word-explode":"word-fade-away":""}`,children:o?`Welcome, ${o}!`:"Welcome!"}),n.jsxs("div",{className:`flex flex-col sm:flex-row flex-wrap items-center justify-center gap-3 mt-6 sm:mt-8 ${p?"word-fade-away":""}`,children:[n.jsx("button",{onClick:h,className:"px-5 py-2.5 text-sm text-slate-400 hover:text-white bg-white/5 hover:bg-white/10 border border-white/10 rounded-lg transition-all active:scale-[0.97]",children:"Try Demo →"}),n.jsx("code",{className:"px-4 sm:px-5 py-2.5 text-xs sm:text-sm text-emerald-400 bg-emerald-500/10 hover:bg-emerald-500/15 border border-emerald-500/20 rounded-lg transition-all cursor-pointer active:scale-[0.97] font-mono select-all",onClick:()=>navigator.clipboard?.writeText("npm install -g upfyn-code"),title:"Click to copy",children:"npm install -g upfyn-code"})]})]})]})}const Zu=[{icon:ds,title:"AI Chat",desc:"Chat with AI to write, debug, and refactor code across any language.",accent:"#3b82f6",color:"blue"},{icon:ps,title:"Integrated Terminal",desc:"Run shell commands on your connected machine directly from the browser.",accent:"#10b981",color:"emerald"},{icon:xr,title:"File Explorer",desc:"Browse, create, edit, and manage your entire project tree remotely.",accent:"#f59e0b",color:"amber"},{icon:Fn,title:"Git Management",desc:"Commit, branch, merge, and resolve conflicts with a visual git interface.",accent:"#f97316",color:"orange"},{icon:hs,title:"Upfyn Canvas",desc:"Visual whiteboard with AI-powered blocks for planning and collaboration.",accent:"#a855f7",color:"purple"},{icon:Pl,title:"MCP Protocol",desc:"Connect external tools and services via the Model Context Protocol.",accent:"#ec4899",color:"pink"}];function Tx(){const[i,o]=y.useState(0);return y.useEffect(()=>{o(0);const c=[setTimeout(()=>o(1),400),setTimeout(()=>o(2),1200),setTimeout(()=>o(3),2200)];return()=>c.forEach(clearTimeout)},[]),n.jsxs("div",{className:"p-4 sm:p-5 space-y-3 min-h-[280px]",children:[n.jsx("div",{className:"flex items-center gap-2 mb-4",children:n.jsx("div",{className:"flex gap-1.5",children:["GPT-4o","Claude","Gemini"].map((c,h)=>n.jsx("span",{className:`px-2.5 py-1 rounded-md text-[10px] font-medium border transition-all ${h===1?"bg-blue-500/15 border-blue-500/30 text-blue-400":"bg-white/[0.03] border-white/[0.08] text-slate-600"}`,children:c},c))})}),n.jsxs("div",{className:`flex items-start gap-2.5 transition-all duration-500 ${i>=0?"opacity-100 translate-y-0":"opacity-0 translate-y-2"}`,children:[n.jsx("div",{className:"w-6 h-6 rounded-md bg-emerald-500/15 flex items-center justify-center shrink-0 mt-0.5",children:n.jsx(yx,{size:12,className:"text-emerald-400"})}),n.jsx("div",{className:"bg-white/[0.04] border border-white/[0.08] rounded-lg rounded-tl-sm px-3 py-2 max-w-[85%]",children:n.jsx("p",{className:"text-xs text-slate-300",children:"Fix the auth middleware to handle expired tokens"})})]}),i>=1&&n.jsxs("div",{className:"flex items-start gap-2.5 animate-fade-in",children:[n.jsx("div",{className:"w-6 h-6 rounded-md bg-blue-500/15 flex items-center justify-center shrink-0 mt-0.5",children:n.jsx(Xm,{size:12,className:"text-blue-400"})}),n.jsx("div",{className:"space-y-1.5 flex-1",children:i<2?n.jsxs("div",{className:"flex items-center gap-1.5 py-2",children:[n.jsx("div",{className:"w-1.5 h-1.5 rounded-full bg-blue-400 animate-pulse"}),n.jsx("div",{className:"w-1.5 h-1.5 rounded-full bg-blue-400 animate-pulse",style:{animationDelay:"200ms"}}),n.jsx("div",{className:"w-1.5 h-1.5 rounded-full bg-blue-400 animate-pulse",style:{animationDelay:"400ms"}})]}):n.jsxs("div",{className:"bg-white/[0.04] border border-white/[0.08] rounded-lg rounded-tl-sm px-3 py-2.5 space-y-2",children:[n.jsxs("p",{className:"text-xs text-slate-300",children:["Found the issue in ",n.jsx("code",{className:"text-blue-400 bg-blue-500/10 px-1 rounded text-[10px]",children:"middleware/auth.js"})]}),n.jsx("div",{className:"space-y-1",children:[{label:"Analyzed codebase",done:!0},{label:"Added token refresh logic",done:!0},{label:"Updated error handling",done:i>=3}].map(c=>n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx(of,{size:11,className:c.done?"text-emerald-400":"text-slate-600"}),n.jsx("span",{className:`text-[10px] ${c.done?"text-slate-400":"text-slate-600"}`,children:c.label})]},c.label))}),i>=3&&n.jsx("div",{className:"mt-1.5 px-2 py-1.5 rounded-md bg-emerald-500/10 border border-emerald-500/20 text-[10px] text-emerald-400 font-mono",children:"3 files modified · 28 lines changed"})]})})]})]})}function Px(){const[i,o]=y.useState(0);y.useEffect(()=>{o(0);const h=[setTimeout(()=>o(1),300),setTimeout(()=>o(2),800),setTimeout(()=>o(3),1300),setTimeout(()=>o(4),1600),setTimeout(()=>o(5),2e3),setTimeout(()=>o(6),2400)];return()=>h.forEach(clearTimeout)},[]);const c=[{type:"cmd",text:"~/project $ npm run build"},{type:"info",text:"> vite build"},{type:"success",text:"✓ 1,247 modules transformed"},{type:"file",label:"dist/index.js",size:"142.3 kB",gzip:"45.2 kB"},{type:"success",text:"✓ Built in 2.41s"},{type:"cmd",text:"~/project $ _"}];return n.jsxs("div",{className:"p-4 sm:p-5 min-h-[280px] font-mono text-xs space-y-1",children:[n.jsxs("div",{className:"flex items-center gap-1 mb-3 -mt-1",children:[n.jsx("span",{className:"px-2.5 py-1 rounded-md bg-emerald-500/10 border border-emerald-500/20 text-emerald-400 text-[10px]",children:"bash"}),n.jsx("span",{className:"px-2.5 py-1 rounded-md bg-white/[0.03] border border-white/[0.06] text-slate-600 text-[10px]",children:"node"}),n.jsx("div",{className:"flex-1"}),n.jsx("span",{className:"text-[10px] text-slate-600",children:"connected to local"}),n.jsx("div",{className:"w-1.5 h-1.5 rounded-full bg-emerald-500 animate-pulse"})]}),c.slice(0,i).map((h,p)=>n.jsxs("div",{className:"flex items-center gap-2 animate-fade-in",style:{animationDelay:`${p*50}ms`},children:[h.type==="cmd"&&n.jsx("span",{className:"text-emerald-400",children:h.text}),h.type==="info"&&n.jsx("span",{className:"text-slate-500",children:h.text}),h.type==="success"&&n.jsx("span",{className:"text-emerald-400",children:h.text}),h.type==="file"&&n.jsxs("span",{className:"text-slate-400",children:[" ",h.label," ",n.jsx("span",{className:"text-blue-400",children:h.size})," ",n.jsxs("span",{className:"text-slate-600",children:["│ gzip: ",h.gzip]})]})]},p)),i>0&&i<6&&n.jsx("div",{className:"inline-block w-2 h-3.5 bg-emerald-400/60 animate-pulse ml-0.5"})]})}function Ix(){const[i,o]=y.useState({src:!0,components:!1,pages:!1});y.useEffect(()=>{o({src:!0,components:!1,pages:!1});const h=[setTimeout(()=>o(p=>({...p,components:!0})),600),setTimeout(()=>o(p=>({...p,pages:!0})),1200)];return()=>h.forEach(clearTimeout)},[]);const c=({name:h,size:p,indent:g=0,icon:v="file",color:x="text-slate-400",active:m})=>n.jsxs("div",{className:`flex items-center gap-2 py-1 px-2 rounded-md transition-all ${m?"bg-amber-500/10 border border-amber-500/15":"hover:bg-white/[0.03]"}`,style:{paddingLeft:`${g*16+8}px`},children:[v==="folder"?n.jsx(kf,{size:13,className:x}):n.jsx(Cd,{size:13,className:x}),n.jsx("span",{className:`text-xs flex-1 ${m?"text-amber-300":"text-slate-400"}`,children:h}),p&&n.jsx("span",{className:"text-[10px] text-slate-600",children:p})]});return n.jsxs("div",{className:"p-4 sm:p-5 min-h-[280px] space-y-0.5",children:[n.jsxs("div",{className:"flex items-center gap-2 mb-3 -mt-1",children:[n.jsx("span",{className:"text-[10px] text-slate-500 font-medium",children:"EXPLORER"}),n.jsx("div",{className:"flex-1"}),n.jsx("span",{className:"text-[10px] text-slate-600 bg-white/[0.03] px-2 py-0.5 rounded border border-white/[0.06]",children:"~/project"})]}),n.jsx(c,{name:"src/",icon:"folder",color:"text-amber-400",indent:0}),i.src&&n.jsxs(n.Fragment,{children:[n.jsx(c,{name:"components/",icon:"folder",color:"text-blue-400",indent:1}),i.components&&n.jsxs(n.Fragment,{children:[n.jsx(c,{name:"Navbar.jsx",size:"2.1 kB",indent:2,active:!0}),n.jsx(c,{name:"Footer.jsx",size:"1.4 kB",indent:2}),n.jsx(c,{name:"AuthModal.jsx",size:"12.8 kB",indent:2})]}),n.jsx(c,{name:"pages/",icon:"folder",color:"text-purple-400",indent:1}),i.pages&&n.jsxs(n.Fragment,{children:[n.jsx(c,{name:"LandingPage.jsx",size:"1.8 kB",indent:2}),n.jsx(c,{name:"DocsPage.jsx",size:"8.2 kB",indent:2})]}),n.jsx(c,{name:"App.jsx",size:"3.2 kB",indent:1}),n.jsx(c,{name:"main.jsx",size:"0.4 kB",indent:1})]}),n.jsx(c,{name:"package.json",size:"1.1 kB",indent:0})]})}function Mx(){const[i,o]=y.useState(0);y.useEffect(()=>{o(0);const h=[setTimeout(()=>o(1),400),setTimeout(()=>o(2),900),setTimeout(()=>o(3),1400),setTimeout(()=>o(4),2e3)];return()=>h.forEach(clearTimeout)},[]);const c=[{hash:"a1b2c3d",msg:"feat: add OAuth flow",time:"2m ago",color:"text-emerald-400"},{hash:"d4e5f6g",msg:"fix: token refresh",time:"18m ago",color:"text-blue-400"},{hash:"h7i8j9k",msg:"test: auth middleware",time:"1h ago",color:"text-purple-400"}];return n.jsxs("div",{className:"p-4 sm:p-5 min-h-[280px] space-y-3",children:[n.jsxs("div",{className:`flex items-center gap-3 transition-all duration-500 ${i>=0?"opacity-100":"opacity-0"}`,children:[n.jsxs("div",{className:"flex items-center gap-2 px-3 py-1.5 rounded-lg bg-emerald-500/10 border border-emerald-500/20",children:[n.jsx(Fn,{size:12,className:"text-emerald-400"}),n.jsx("span",{className:"text-xs text-emerald-400 font-medium",children:"main"})]}),n.jsx(cs,{size:14,className:"text-slate-600"}),n.jsxs("div",{className:"flex items-center gap-2 px-3 py-1.5 rounded-lg bg-orange-500/10 border border-orange-500/20",children:[n.jsx(Fn,{size:12,className:"text-orange-400"}),n.jsx("span",{className:"text-xs text-orange-400 font-medium",children:"feature/auth"})]}),i>=1&&n.jsx("span",{className:"text-[10px] text-slate-500 animate-fade-in",children:"3 commits ahead"})]}),n.jsx("div",{className:"space-y-1.5",children:c.map((h,p)=>i>=p+1&&n.jsxs("div",{className:"flex items-center gap-3 px-3 py-2 rounded-lg bg-white/[0.03] border border-white/[0.06] animate-fade-in",children:[n.jsxs("div",{className:"flex items-center gap-2 shrink-0",children:[n.jsx(Ef,{size:12,className:h.color}),n.jsx("code",{className:"text-[10px] text-slate-500 font-mono",children:h.hash})]}),n.jsx("span",{className:"text-xs text-slate-300 flex-1 truncate",children:h.msg}),n.jsx("span",{className:"text-[10px] text-slate-600 shrink-0",children:h.time})]},h.hash))}),i>=4&&n.jsxs("div",{className:"flex items-center gap-4 px-3 py-2 rounded-lg bg-white/[0.02] border border-white/[0.05] animate-fade-in",children:[n.jsx("span",{className:"text-[10px] text-emerald-400",children:"+142 lines"}),n.jsx("span",{className:"text-[10px] text-red-400",children:"-28 lines"}),n.jsx("span",{className:"text-[10px] text-slate-500",children:"3 files changed"}),n.jsx("div",{className:"flex-1"}),n.jsx("button",{className:"px-2.5 py-1 rounded-md bg-emerald-500/15 border border-emerald-500/25 text-[10px] text-emerald-400 font-medium",children:"Merge"})]})]})}function _x(){return n.jsxs("div",{className:"p-4 sm:p-5 min-h-[240px] sm:min-h-[280px] relative overflow-hidden",children:[n.jsx("div",{className:"absolute inset-4 rounded-lg overflow-hidden",children:n.jsx("div",{className:"absolute inset-0",style:{backgroundImage:"radial-gradient(circle, rgba(255,255,255,0.06) 1px, transparent 1px)",backgroundSize:"16px 16px"}})}),n.jsxs("div",{className:"relative space-y-0 scale-[0.82] sm:scale-100 origin-top-left",children:[n.jsxs("div",{className:"flex items-start gap-3",children:[n.jsxs("div",{className:"w-[45%] rounded-lg border border-blue-500/20 bg-blue-500/[0.06] p-2.5 animate-fade-in",children:[n.jsxs("div",{className:"flex items-center gap-1.5 mb-1.5",children:[n.jsx("div",{className:"w-4 h-4 rounded bg-blue-500/20 flex items-center justify-center",children:n.jsx(ds,{size:9,className:"text-blue-400"})}),n.jsx("span",{className:"text-[10px] font-medium text-blue-400",children:"Chat"})]}),n.jsx("p",{className:"text-[9px] text-slate-500 leading-relaxed",children:'"Analyze the payment API and suggest improvements"'})]}),n.jsx("div",{className:"flex items-center pt-6",children:n.jsxs("svg",{width:"24",height:"12",className:"text-purple-400/40",children:[n.jsx("line",{x1:"0",y1:"6",x2:"18",y2:"6",stroke:"currentColor",strokeWidth:"1.5"}),n.jsx("polygon",{points:"18,2 24,6 18,10",fill:"currentColor"})]})}),n.jsxs("div",{className:"w-[45%] rounded-lg border border-purple-500/20 bg-purple-500/[0.06] p-2.5 animate-fade-in",style:{animationDelay:"300ms"},children:[n.jsxs("div",{className:"flex items-center gap-1.5 mb-1.5",children:[n.jsx("div",{className:"w-4 h-4 rounded bg-purple-500/20 flex items-center justify-center",children:n.jsx(Sd,{size:9,className:"text-purple-400"})}),n.jsx("span",{className:"text-[10px] font-medium text-purple-400",children:"Research"})]}),n.jsx("p",{className:"text-[9px] text-slate-500 leading-relaxed",children:"API docs, best practices, security patterns"})]})]}),n.jsx("div",{className:"flex justify-[65%] pl-[55%] py-1",children:n.jsxs("svg",{width:"12",height:"20",className:"text-emerald-400/40",children:[n.jsx("line",{x1:"6",y1:"0",x2:"6",y2:"14",stroke:"currentColor",strokeWidth:"1.5"}),n.jsx("polygon",{points:"2,14 6,20 10,14",fill:"currentColor"})]})}),n.jsxs("div",{className:"ml-[25%] w-[55%] rounded-lg border border-emerald-500/20 bg-emerald-500/[0.06] p-2.5 animate-fade-in",style:{animationDelay:"600ms"},children:[n.jsxs("div",{className:"flex items-center gap-1.5 mb-1.5",children:[n.jsx("div",{className:"w-4 h-4 rounded bg-emerald-500/20 flex items-center justify-center",children:n.jsx(as,{size:9,className:"text-emerald-400"})}),n.jsx("span",{className:"text-[10px] font-medium text-emerald-400",children:"Code"})]}),n.jsxs("div",{className:"font-mono text-[9px] text-slate-500 space-y-0.5 leading-relaxed",children:[n.jsxs("p",{children:[n.jsx("span",{className:"text-purple-400",children:"async"})," ",n.jsx("span",{className:"text-blue-400",children:"validatePayment"}),"(req) ","{"]}),n.jsxs("p",{children:[" ",n.jsx("span",{className:"text-slate-600",children:"// Generated with tests"})]}),n.jsx("p",{children:"}"})]})]}),n.jsx("div",{className:"flex pl-[48%] py-1",children:n.jsxs("svg",{width:"12",height:"20",className:"text-amber-400/40",children:[n.jsx("line",{x1:"6",y1:"0",x2:"6",y2:"14",stroke:"currentColor",strokeWidth:"1.5"}),n.jsx("polygon",{points:"2,14 6,20 10,14",fill:"currentColor"})]})}),n.jsxs("div",{className:"ml-[15%] w-[55%] rounded-lg border border-amber-500/20 bg-amber-500/[0.06] p-2.5 animate-fade-in",style:{animationDelay:"900ms"},children:[n.jsxs("div",{className:"flex items-center gap-1.5 mb-1.5",children:[n.jsx("div",{className:"w-4 h-4 rounded bg-amber-500/20 flex items-center justify-center",children:n.jsx(Ho,{size:9,className:"text-amber-400"})}),n.jsx("span",{className:"text-[10px] font-medium text-amber-400",children:"Dashboard"})]}),n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx("div",{className:"flex-1 h-2 rounded-full bg-emerald-500/20 overflow-hidden",children:n.jsx("div",{className:"h-full w-[85%] bg-emerald-500/50 rounded-full"})}),n.jsx("span",{className:"text-[9px] text-emerald-400",children:"85%"})]})]})]})]})}function Rx(){const[i,o]=y.useState(0);y.useEffect(()=>{o(0);const h=[setTimeout(()=>o(1),400),setTimeout(()=>o(2),1e3),setTimeout(()=>o(3),1600)];return()=>h.forEach(clearTimeout)},[]);const c=[{name:"Claude Code",icon:"🤖",color:"blue"},{name:"Cursor",icon:"⚡",color:"purple"},{name:"Windsurf",icon:"🌊",color:"cyan"}];return n.jsxs("div",{className:"p-4 sm:p-5 min-h-[280px] space-y-4",children:[n.jsxs("div",{className:"flex items-center gap-2 px-3 py-2 rounded-lg bg-white/[0.03] border border-white/[0.06] font-mono text-xs",children:[n.jsx("span",{className:"text-emerald-400",children:"$"}),n.jsx("span",{className:"text-slate-400",children:"upfyn-code mcp"})]}),n.jsx("div",{className:"flex items-center justify-center gap-3",children:n.jsx("div",{className:"flex flex-col items-center gap-3",children:c.map((h,p)=>i>=p+1&&n.jsxs("div",{className:"flex items-center gap-3 animate-fade-in",children:[n.jsxs("div",{className:`px-3 py-2 rounded-lg border text-xs font-medium flex items-center gap-2 ${h.color==="blue"?"bg-blue-500/10 border-blue-500/20 text-blue-400":h.color==="purple"?"bg-purple-500/10 border-purple-500/20 text-purple-400":"bg-cyan-500/10 border-cyan-500/20 text-cyan-400"}`,children:[n.jsx("span",{children:h.icon}),h.name]}),n.jsxs("svg",{width:"32",height:"12",className:"text-slate-600",children:[n.jsx("line",{x1:"0",y1:"6",x2:"24",y2:"6",stroke:"currentColor",strokeWidth:"1",strokeDasharray:"3,3"}),n.jsx("polygon",{points:"24,3 30,6 24,9",fill:"currentColor"})]}),n.jsxs("div",{className:"px-3 py-2 rounded-lg bg-pink-500/10 border border-pink-500/20 text-xs text-pink-400 font-medium flex items-center gap-1.5",children:[n.jsx(Pl,{size:11}),"MCP"]})]},h.name))})}),i>=3&&n.jsxs("div",{className:"rounded-lg bg-white/[0.03] border border-white/[0.06] p-3 font-mono text-[10px] space-y-0.5 animate-fade-in",children:[n.jsx("p",{className:"text-slate-600",children:"// .claude/mcp.json"}),n.jsxs("p",{className:"text-slate-400",children:["{"," ",n.jsx("span",{className:"text-pink-400",children:'"upfyn-code"'}),": ","{"]}),n.jsxs("p",{className:"text-slate-400",children:[" ",n.jsx("span",{className:"text-blue-400",children:'"command"'}),": ",n.jsx("span",{className:"text-emerald-400",children:'"upfyn-code mcp"'})]}),n.jsxs("p",{className:"text-slate-400",children:["}"," ","}"]})]})]})}const Ax={0:Tx,1:Px,2:Ix,3:Mx,4:_x,5:Rx};function Lx(){const[i,o]=y.useState(0),[c,h]=y.useState(0),p=Zu[i],g=Ax[i],v=x=>{o(x),h(m=>m+1)};return n.jsxs("section",{id:"features",className:"py-20 sm:py-32 px-4 relative overflow-hidden scroll-section",children:[n.jsx("div",{className:"absolute inset-0 opacity-[0.03]",style:{backgroundImage:"linear-gradient(rgba(255,255,255,0.1) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,0.1) 1px, transparent 1px)",backgroundSize:"60px 60px"}}),n.jsxs("div",{className:"max-w-6xl mx-auto relative z-10",children:[n.jsxs("div",{className:"text-center mb-14 sm:mb-20",children:[n.jsx("p",{className:"text-sm font-mono text-blue-400/80 tracking-wider uppercase mb-3",children:"Features"}),n.jsxs("h2",{className:"text-3xl sm:text-4xl lg:text-5xl font-bold text-white mb-4",children:["Everything you need."," ",n.jsx("span",{className:"bg-gradient-to-r from-blue-400 via-purple-400 to-pink-400 bg-clip-text text-transparent",children:"Nothing you don't."})]}),n.jsx("p",{className:"text-slate-500 text-base sm:text-lg max-w-xl mx-auto",children:"One interface for AI, terminal, files, git, and canvas — accessible from any browser, anywhere."})]}),n.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-6 lg:gap-10 items-start",children:[n.jsx("div",{className:"space-y-2",children:Zu.map(({icon:x,title:m,desc:u,accent:w},b)=>n.jsx("button",{onClick:()=>v(b),className:`w-full text-left px-4 sm:px-5 py-4 rounded-xl border transition-all duration-300 group ${i===b?"bg-white/[0.04] border-white/10":"bg-transparent border-transparent hover:bg-white/[0.02] hover:border-white/5"}`,style:i===b?{boxShadow:`0 0 20px ${w}10, inset 0 1px 0 ${w}15`}:{},children:n.jsxs("div",{className:"flex items-start gap-3",children:[n.jsx("div",{className:"w-8 h-8 rounded-lg flex items-center justify-center shrink-0 mt-0.5 transition-colors",style:{background:i===b?`${w}15`:"rgba(255,255,255,0.04)"},children:n.jsx(x,{size:16,style:{color:i===b?w:"#64748b"}})}),n.jsxs("div",{className:"min-w-0",children:[n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx("h3",{className:`font-semibold text-sm transition-colors ${i===b?"text-white":"text-slate-400"}`,children:m}),i===b&&n.jsx(Bo,{size:14,className:"text-slate-600"})]}),n.jsx("p",{className:`text-xs mt-0.5 transition-colors ${i===b?"text-slate-400":"text-slate-600"}`,children:u})]})]})},m))}),n.jsxs("div",{className:"relative",children:[n.jsx("div",{className:"absolute -inset-4 rounded-3xl opacity-20 blur-2xl transition-colors duration-500",style:{background:p.accent}}),n.jsxs("div",{className:"relative rounded-2xl border border-white/10 bg-[#0c1222] overflow-hidden shadow-2xl shadow-black/40",children:[n.jsxs("div",{className:"flex items-center gap-2 px-4 py-3 border-b border-white/5 bg-white/[0.02]",children:[n.jsxs("div",{className:"flex gap-1.5",children:[n.jsx("div",{className:"w-2.5 h-2.5 rounded-full bg-red-500/50"}),n.jsx("div",{className:"w-2.5 h-2.5 rounded-full bg-yellow-500/50"}),n.jsx("div",{className:"w-2.5 h-2.5 rounded-full bg-green-500/50"})]}),n.jsx("span",{className:"text-xs font-mono text-slate-600 ml-2",children:p.title.toLowerCase()})]}),n.jsx(g,{},c),n.jsx("div",{className:"h-[1px] transition-colors duration-500",style:{background:`linear-gradient(90deg, transparent, ${p.accent}40, transparent)`}})]})]})]})]})]})}const zx=[{icon:_o,num:"01",title:"Install the CLI",desc:"One command. Works on Windows, macOS, and Linux. No dependencies.",code:"npm install -g upfyn-code",accent:"#3b82f6"},{icon:Mf,num:"02",title:"Connect your machine",desc:"Bridge your local dev environment to the web interface securely.",code:"upfyn-code connect",accent:"#10b981"},{icon:Nd,num:"03",title:"Code from anywhere",desc:"Open any browser and access your full development environment.",code:"open cli.upfyn.com",accent:"#a855f7"}];function Dx(){const[i,o]=y.useState(null),c=(h,p)=>{navigator.clipboard?.writeText(h),o(p),setTimeout(()=>o(null),2e3)};return n.jsxs("section",{id:"how-it-works",className:"py-20 sm:py-32 px-4 relative overflow-hidden scroll-section",children:[n.jsx("div",{className:"absolute top-0 left-1/2 -translate-x-1/2 w-3/4 max-w-2xl h-px bg-gradient-to-r from-transparent via-white/10 to-transparent"}),n.jsxs("div",{className:"max-w-5xl mx-auto relative z-10",children:[n.jsxs("div",{className:"text-center mb-14 sm:mb-20",children:[n.jsx("p",{className:"text-sm font-mono text-emerald-400/80 tracking-wider uppercase mb-3",children:"Getting Started"}),n.jsxs("h2",{className:"text-3xl sm:text-4xl lg:text-5xl font-bold text-white mb-4",children:["Three commands."," ",n.jsx("span",{className:"bg-gradient-to-r from-emerald-400 to-cyan-400 bg-clip-text text-transparent",children:"That's it."})]}),n.jsx("p",{className:"text-slate-500 text-base sm:text-lg max-w-lg mx-auto",children:"No complex setup, no configuration files, no environment variables."})]}),n.jsxs("div",{className:"relative max-w-2xl mx-auto",children:[n.jsx("div",{className:"absolute left-[22px] sm:left-[28px] top-8 bottom-8 w-px bg-gradient-to-b from-blue-500/30 via-emerald-500/30 to-purple-500/30 hidden sm:block"}),n.jsx("div",{className:"space-y-6 sm:space-y-8",children:zx.map(({icon:h,num:p,title:g,desc:v,code:x,accent:m},u)=>n.jsxs("div",{className:"flex items-start gap-4 sm:gap-6 group",children:[n.jsx("div",{className:"w-11 h-11 sm:w-14 sm:h-14 rounded-2xl flex items-center justify-center shrink-0 border transition-all duration-300",style:{background:`${m}10`,borderColor:`${m}25`,boxShadow:`0 0 20px ${m}08`},children:n.jsx(h,{size:20,style:{color:m}})}),n.jsxs("div",{className:"flex-1 min-w-0",children:[n.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[n.jsx("span",{className:"text-xs font-mono",style:{color:`${m}90`},children:p}),n.jsx("h3",{className:"text-white font-semibold text-base sm:text-lg",children:g})]}),n.jsx("p",{className:"text-slate-500 text-sm mb-3",children:v}),n.jsxs("div",{className:"inline-flex items-center gap-2 px-3 py-2 bg-[#0c1222] rounded-lg border border-white/5 group/code max-w-full overflow-x-auto",children:[n.jsx("span",{className:"text-slate-600 text-xs select-none",children:"$"}),n.jsx("code",{className:"text-sm font-mono text-slate-300 select-all",children:x}),n.jsx("button",{onClick:()=>c(x,u),className:"p-0.5 text-slate-600 hover:text-white transition-colors",title:"Copy",children:i===u?n.jsx(On,{size:13,className:"text-emerald-400"}):n.jsx(us,{size:13})})]})]})]},p))})]})]})]})}function $x(){const[i,o]=y.useState(!1),c="npm install -g upfyn-code",h=()=>{navigator.clipboard?.writeText(c),o(!0),setTimeout(()=>o(!1),2e3)};return n.jsxs("section",{className:"py-20 sm:py-32 px-4 relative overflow-hidden scroll-section",children:[n.jsx("div",{className:"absolute inset-0 flex items-center justify-center pointer-events-none",children:n.jsx("div",{className:"w-[600px] h-[300px] rounded-full bg-blue-500/5 blur-3xl"})}),n.jsxs("div",{className:"max-w-3xl mx-auto text-center relative z-10",children:[n.jsxs("div",{className:"inline-flex items-center gap-2 px-3 py-1 rounded-full bg-white/5 border border-white/10 text-xs text-slate-400 mb-6",children:[n.jsx(ps,{size:12,className:"text-emerald-400"}),"Open source · GPL-3.0"]}),n.jsxs("h2",{className:"text-3xl sm:text-4xl lg:text-5xl font-bold text-white mb-4",children:["Start building"," ",n.jsx("span",{className:"bg-gradient-to-r from-blue-400 via-purple-400 to-emerald-400 bg-clip-text text-transparent",children:"right now"})]}),n.jsx("p",{className:"text-slate-500 text-base sm:text-lg max-w-lg mx-auto mb-8",children:"Install the CLI and connect your machine in under a minute. Free forever."}),n.jsxs("div",{className:"inline-flex items-center gap-3 px-4 sm:px-6 py-3 sm:py-4 rounded-xl border border-white/10 bg-[#0c1222] shadow-2xl shadow-black/30 max-w-full overflow-x-auto",children:[n.jsx("span",{className:"text-slate-600 text-sm font-mono select-none",children:"$"}),n.jsx("code",{className:"text-emerald-400 font-mono text-xs sm:text-sm md:text-lg select-all tracking-wide",children:c}),n.jsx("button",{onClick:h,className:"p-1.5 rounded-md text-slate-500 hover:text-white hover:bg-white/10 transition-all",title:"Copy to clipboard",children:i?n.jsx(On,{size:16,className:"text-emerald-400"}):n.jsx(us,{size:16})})]}),n.jsxs("div",{className:"flex flex-wrap items-center justify-center gap-4 mt-8 text-xs font-mono text-slate-600",children:[n.jsxs("span",{className:"flex items-center gap-1.5",children:[n.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-blue-500/50"}),"upfyn-code login"]}),n.jsx(cs,{size:10,className:"text-slate-700"}),n.jsxs("span",{className:"flex items-center gap-1.5",children:[n.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-emerald-500/50"}),"upfyn-code connect"]}),n.jsx(cs,{size:10,className:"text-slate-700"}),n.jsxs("span",{className:"flex items-center gap-1.5",children:[n.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-purple-500/50"}),"open cli.upfyn.com"]})]})]})]})}const Ux=[{id:"chat",label:"Chat",icon:ds},{id:"shell",label:"Shell",icon:ps},{id:"files",label:"Files",icon:xr},{id:"git",label:"Git",icon:Fn},{id:"canvas",label:"Canvas",icon:hs}],zo=[{label:"What is Upfyn-Code?",key:"about"},{label:"Connect my machine",key:"remote"},{label:"Write me a REST API",key:"api"},{label:"Plan with Canvas blocks",key:"canvas"},{label:"Set up MCP for Cursor",key:"mcp"}],st={about:`**Upfyn-Code** is an AI-powered cloud IDE built by **Thinqmesh Technologies**. Here's what makes it unique:
|
|
9
|
+
|
|
10
|
+
- **Remote Machine Access** — connect your local machine via \`upfyn-code connect\` and code from any browser, anywhere
|
|
11
|
+
- **AI Chat** — I can write code, debug errors, explain architecture, and plan projects
|
|
12
|
+
- **Upfyn Canvas** — visual AI workflow builder with connected blocks (Chat, Research, Code, Dashboard)
|
|
13
|
+
- **Integrated Terminal** — run shell commands on your connected machine from the browser
|
|
14
|
+
- **Git Management** — visual commit history, branch switching, staging, and diffs
|
|
15
|
+
- **File Explorer** — browse, read, and edit files on your remote machine
|
|
16
|
+
- **MCP Protocol** — connect Upfyn-Code to Claude Code, Cursor, or any MCP-compatible AI tool
|
|
17
|
+
|
|
18
|
+
Install with \`npm i -g upfyn-code\` and run \`upfyn-code login\` to get started!
|
|
19
|
+
|
|
20
|
+
Try the other suggestions to dive deeper into each feature.`,remote:`Here's how you connect your local machine to Upfyn-Code:
|
|
21
|
+
|
|
22
|
+
\`\`\`bash
|
|
23
|
+
# Install the CLI globally
|
|
24
|
+
npm i -g upfyn-code
|
|
25
|
+
|
|
26
|
+
# Login to your account
|
|
27
|
+
upfyn-code login
|
|
28
|
+
|
|
29
|
+
# Connect your machine via WebSocket relay
|
|
30
|
+
upfyn-code connect
|
|
31
|
+
\`\`\`
|
|
32
|
+
|
|
33
|
+
Once connected, your machine is **bridged to the browser** — I can run commands in your terminal, browse your files, manage git, and execute code. All from any device, anywhere.
|
|
34
|
+
|
|
35
|
+
The relay uses encrypted WebSocket tunnels — your code never leaves the connection.`,shell:`With a connected machine, you can run **any shell command** right from this browser:
|
|
36
|
+
|
|
37
|
+
\`\`\`bash
|
|
38
|
+
~/my-project $ npm run dev
|
|
39
|
+
|
|
40
|
+
VITE v7.1.8 ready in 342 ms
|
|
41
|
+
➜ Local: http://localhost:5173/
|
|
42
|
+
|
|
43
|
+
~/my-project $ git status
|
|
44
|
+
On branch main
|
|
45
|
+
Changes not staged for commit:
|
|
46
|
+
modified: src/App.jsx
|
|
47
|
+
|
|
48
|
+
~/my-project $ docker ps
|
|
49
|
+
CONTAINER ID IMAGE STATUS
|
|
50
|
+
a3f2e1d... redis Up 2 hours
|
|
51
|
+
\`\`\`
|
|
52
|
+
|
|
53
|
+
Switch to the **Shell tab** above to try the interactive terminal!`,canvas:`The **Upfyn Canvas** is a visual workspace where every block is AI-powered:
|
|
54
|
+
|
|
55
|
+
1. Drop a **Chat block** → ask me to plan your architecture
|
|
56
|
+
2. Connect it to a **Research block** → I'll search the web for best practices
|
|
57
|
+
3. Pipe results into a **Code block** → I generate the implementation
|
|
58
|
+
4. Add a **Dashboard block** → track your project metrics live
|
|
59
|
+
|
|
60
|
+
Blocks are connected with lines — **output flows from one to the next**, creating an AI-powered workflow.
|
|
61
|
+
|
|
62
|
+
Switch to the **Canvas tab** to drag blocks, connect them, and see it in action!`,mcp:`Sure! Here's how to set up MCP (Model Context Protocol) so you can use Upfyn-Code with Claude or Cursor:
|
|
63
|
+
|
|
64
|
+
\`\`\`bash
|
|
65
|
+
# Generate your MCP config
|
|
66
|
+
upfyn-code mcp
|
|
67
|
+
\`\`\`
|
|
68
|
+
|
|
69
|
+
This outputs a JSON config you paste into your AI tool:
|
|
70
|
+
|
|
71
|
+
\`\`\`json
|
|
72
|
+
{
|
|
73
|
+
"mcpServers": {
|
|
74
|
+
"upfyn-code": {
|
|
75
|
+
"url": "https://cli.upfyn.com/mcp",
|
|
76
|
+
"headers": {
|
|
77
|
+
"Authorization": "Bearer rt_your_token"
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
\`\`\`
|
|
83
|
+
|
|
84
|
+
Now Claude Code or Cursor can **read your files, run commands, and manage git** through Upfyn-Code's relay.`,git:`The **Git tab** gives you a full visual timeline of your project:
|
|
85
|
+
|
|
86
|
+
- **Commits** — color-coded by type (feat, fix, refactor) with hash, author, and time
|
|
87
|
+
- **Changes** — all unstaged files with additions/deletions counts
|
|
88
|
+
- **Branches** — switch branches, see ahead/behind status
|
|
89
|
+
|
|
90
|
+
You can stage files, view diffs, and create commits — all from the browser, running on your connected machine.
|
|
91
|
+
|
|
92
|
+
Switch to the **Git tab** above to explore it!`,greeting:`Hey! I'm the Upfyn-Code AI assistant, built by **Thinqmesh Technologies**. I can help you with coding, debugging, architecture, DevOps, and more.
|
|
93
|
+
|
|
94
|
+
Try the suggestions below to explore what Upfyn-Code can do — or just ask me anything!`,owner:`Upfyn-Code is built and maintained by **Thinqmesh Technologies** — a software engineering company focused on building AI-powered developer tools and enterprise solutions.
|
|
95
|
+
|
|
96
|
+
The platform combines a **cloud IDE**, **AI chat**, **visual Canvas workflows**, and **remote machine access** into a single tool that works from any browser.
|
|
97
|
+
|
|
98
|
+
Key technologies used:
|
|
99
|
+
- **Frontend** — React + Vite + Tailwind CSS, deployed on Vercel
|
|
100
|
+
- **Backend** — Node.js + Express, deployed on Railway
|
|
101
|
+
- **Database** — Turso (libSQL) for cloud-edge storage
|
|
102
|
+
- **CLI** — Published on npm as \`upfyn-code\`
|
|
103
|
+
- **AI** — Multi-model support (GPT-4o, Claude, Gemini)
|
|
104
|
+
- **Payments** — Razorpay integration for subscriptions
|
|
105
|
+
|
|
106
|
+
Visit the **Contact** page to learn more about Thinqmesh Technologies or reach out for enterprise solutions!`,pricing:`Upfyn-Code offers three subscription plans:
|
|
107
|
+
|
|
108
|
+
**Monthly** — ₹499/mo
|
|
109
|
+
- AI Chat with all models, Terminal, File Explorer, Git, Canvas, MCP Protocol
|
|
110
|
+
|
|
111
|
+
**6 Months** — ₹2,499/6mo (save ₹495)
|
|
112
|
+
- Everything in Monthly + TaskMaster AI, Advanced Canvas, Multi-device Sync
|
|
113
|
+
|
|
114
|
+
**Annual** — ₹499/yr (90% off launch offer!)
|
|
115
|
+
- Everything in 6 Months + Custom MCP configs, Unlimited API rotations, Dedicated support
|
|
116
|
+
|
|
117
|
+
All payments are processed securely via **Razorpay**. Visit the Pricing page to grab a plan!`,features:`Here's everything Upfyn-Code offers:
|
|
118
|
+
|
|
119
|
+
**AI Chat** — Multi-model support (GPT-4o, Claude, Gemini). Ask anything — I write code, debug errors, explain concepts, and plan architectures.
|
|
120
|
+
|
|
121
|
+
**Remote Connect** — Bridge your local machine to the browser via \`upfyn-code connect\`. Encrypted WebSocket relay.
|
|
122
|
+
|
|
123
|
+
**Integrated Terminal** — Run any shell command on your connected machine from the browser.
|
|
124
|
+
|
|
125
|
+
**File Explorer** — Browse, read, and edit files on your remote machine with syntax highlighting.
|
|
126
|
+
|
|
127
|
+
**Git Management** — Visual commit log, branch switching, staging, diffs, and inline changes.
|
|
128
|
+
|
|
129
|
+
**Upfyn Canvas** — Visual AI workflow builder. Drop blocks (Chat, Research, Code, Dashboard), connect them, and let data flow.
|
|
130
|
+
|
|
131
|
+
**MCP Protocol** — Connect to Claude Code, Cursor, or any MCP-compatible tool.
|
|
132
|
+
|
|
133
|
+
Try each tab above to explore these features interactively!`,api:`Sure! Here's a clean REST API with Express:
|
|
134
|
+
|
|
135
|
+
\`\`\`javascript
|
|
136
|
+
import express from 'express';
|
|
137
|
+
const app = express();
|
|
138
|
+
app.use(express.json());
|
|
139
|
+
|
|
140
|
+
const items = [];
|
|
141
|
+
|
|
142
|
+
app.get('/api/items', (req, res) => {
|
|
143
|
+
res.json(items);
|
|
144
|
+
});
|
|
145
|
+
|
|
146
|
+
app.post('/api/items', (req, res) => {
|
|
147
|
+
const item = { id: Date.now(), ...req.body };
|
|
148
|
+
items.push(item);
|
|
149
|
+
res.status(201).json(item);
|
|
150
|
+
});
|
|
151
|
+
|
|
152
|
+
app.delete('/api/items/:id', (req, res) => {
|
|
153
|
+
const idx = items.findIndex(i => i.id === +req.params.id);
|
|
154
|
+
if (idx === -1) return res.status(404).json({ error: 'Not found' });
|
|
155
|
+
items.splice(idx, 1);
|
|
156
|
+
res.json({ success: true });
|
|
157
|
+
});
|
|
158
|
+
|
|
159
|
+
app.listen(3000, () => console.log('Server running on :3000'));
|
|
160
|
+
\`\`\`
|
|
161
|
+
|
|
162
|
+
This gives you **GET**, **POST**, and **DELETE** endpoints. Want me to add authentication or database integration?`,debug:`Here's my approach to debugging:
|
|
163
|
+
|
|
164
|
+
1. **Reproduce** — isolate the exact steps that trigger the bug
|
|
165
|
+
2. **Inspect** — check the error stack trace, network tab, and console logs
|
|
166
|
+
3. **Narrow down** — use binary search: comment out half the code, see if the bug persists
|
|
167
|
+
4. **Fix & verify** — apply the fix, then test edge cases
|
|
168
|
+
|
|
169
|
+
Common quick wins:
|
|
170
|
+
\`\`\`bash
|
|
171
|
+
# Check for typos in env vars
|
|
172
|
+
printenv | grep -i your_var
|
|
173
|
+
|
|
174
|
+
# Node debugging
|
|
175
|
+
node --inspect src/index.js
|
|
176
|
+
|
|
177
|
+
# React — check component re-renders
|
|
178
|
+
console.log('Render count:', ++window.rc);
|
|
179
|
+
\`\`\`
|
|
180
|
+
|
|
181
|
+
Paste your error message or code and I'll help you track it down!`,react:`Here's a clean React component with hooks:
|
|
182
|
+
|
|
183
|
+
\`\`\`jsx
|
|
184
|
+
import { useState, useEffect } from 'react';
|
|
185
|
+
|
|
186
|
+
export default function UserList() {
|
|
187
|
+
const [users, setUsers] = useState([]);
|
|
188
|
+
const [loading, setLoading] = useState(true);
|
|
189
|
+
|
|
190
|
+
useEffect(() => {
|
|
191
|
+
fetch('/api/users')
|
|
192
|
+
.then(res => res.json())
|
|
193
|
+
.then(data => { setUsers(data); setLoading(false); })
|
|
194
|
+
.catch(() => setLoading(false));
|
|
195
|
+
}, []);
|
|
196
|
+
|
|
197
|
+
if (loading) return <div className="animate-pulse">Loading...</div>;
|
|
198
|
+
|
|
199
|
+
return (
|
|
200
|
+
<ul className="space-y-2">
|
|
201
|
+
{users.map(u => (
|
|
202
|
+
<li key={u.id} className="p-3 bg-slate-800 rounded-lg">
|
|
203
|
+
{u.name} — {u.email}
|
|
204
|
+
</li>
|
|
205
|
+
))}
|
|
206
|
+
</ul>
|
|
207
|
+
);
|
|
208
|
+
}
|
|
209
|
+
\`\`\`
|
|
210
|
+
|
|
211
|
+
This handles loading state, error handling, and clean rendering. Want me to add search filtering or pagination?`,explain:`I'd be happy to explain! Here's how modern web apps are typically structured:
|
|
212
|
+
|
|
213
|
+
**Frontend** (React/Vue/Svelte)
|
|
214
|
+
- Components render the UI
|
|
215
|
+
- State management handles data flow
|
|
216
|
+
- API calls fetch data from the backend
|
|
217
|
+
|
|
218
|
+
**Backend** (Express/Fastify/Hono)
|
|
219
|
+
- Routes handle HTTP requests
|
|
220
|
+
- Middleware processes auth, validation, logging
|
|
221
|
+
- Database layer stores persistent data
|
|
222
|
+
|
|
223
|
+
**Infrastructure**
|
|
224
|
+
- Vite/Webpack bundles frontend code
|
|
225
|
+
- Docker containers for deployment
|
|
226
|
+
- CI/CD pipelines automate testing & deploys
|
|
227
|
+
|
|
228
|
+
Paste any code snippet and I'll walk you through it line by line!`,install:`Getting started with Upfyn-Code is simple:
|
|
229
|
+
|
|
230
|
+
\`\`\`bash
|
|
231
|
+
# 1. Install the CLI
|
|
232
|
+
npm install -g upfyn-code
|
|
233
|
+
|
|
234
|
+
# 2. Login to your account
|
|
235
|
+
upfyn-code login
|
|
236
|
+
|
|
237
|
+
# 3. Connect your machine
|
|
238
|
+
upfyn-code connect
|
|
239
|
+
\`\`\`
|
|
240
|
+
|
|
241
|
+
Once connected, open **cli.upfyn.com** in your browser and you'll have full access to:
|
|
242
|
+
- AI Chat with your codebase
|
|
243
|
+
- Terminal running on your machine
|
|
244
|
+
- File explorer for your project
|
|
245
|
+
- Git management with visual diffs
|
|
246
|
+
- Canvas for AI-powered workflows
|
|
247
|
+
|
|
248
|
+
You can also set up **MCP** to use Upfyn-Code with Claude Code or Cursor:
|
|
249
|
+
\`\`\`bash
|
|
250
|
+
upfyn-code mcp
|
|
251
|
+
\`\`\`
|
|
252
|
+
|
|
253
|
+
Need help? Check the **Docs** page or ask me anything!`,fallback:`Great question! I can help with all kinds of development tasks. Here are some things you can ask me:
|
|
254
|
+
|
|
255
|
+
- **"What is Upfyn-Code?"** — learn about the platform and its features
|
|
256
|
+
- **"Write me a REST API"** — I'll generate working code for you
|
|
257
|
+
- **"Debug my code"** — paste an error and I'll help fix it
|
|
258
|
+
- **"Connect my machine"** — set up remote access with the CLI
|
|
259
|
+
- **"Set up MCP"** — integrate with Claude Code or Cursor
|
|
260
|
+
- **"Show pricing"** — see subscription plans
|
|
261
|
+
- **"Who built this?"** — learn about Thinqmesh Technologies
|
|
262
|
+
|
|
263
|
+
Or try the suggestion chips below to explore specific features!`};function Ox(i){const o=i.toLowerCase().trim();if(/^(hi|hey|hello|yo|sup|howdy|hola|what'?s up)\b/.test(o))return st.greeting;for(const c of zo)if(o===c.label.toLowerCase())return st[c.key];return o.includes("what is upfyn")||o.includes("about upfyn")||o.includes("tell me about")||o.includes("what are you")?st.about:o.includes("who built")||o.includes("who made")||o.includes("who created")||o.includes("thinqmesh")||o.includes("owner")||o.includes("founder")||o.includes("company")?st.owner:o.includes("price")||o.includes("pricing")||o.includes("plan")||o.includes("subscription")||o.includes("cost")||o.includes("pay")?st.pricing:o.includes("feature")||o.includes("what can you")||o.includes("what do you")||o.includes("capable")||o.includes("everything")?st.features:o.includes("install")||o.includes("setup")||o.includes("get started")||o.includes("start")||o.includes("npm")||o.includes("how to use")?st.install:o.includes("connect")||o.includes("remote")||o.includes("relay")||o.includes("websocket")?st.remote:o.includes("mcp")||o.includes("cursor")||o.includes("protocol")?st.mcp:o.includes("canvas")||o.includes("whiteboard")||o.includes("block")||o.includes("workflow")?st.canvas:o.includes("git")||o.includes("commit")||o.includes("branch")||o.includes("timeline")?st.git:o.includes("shell")||o.includes("terminal")||o.includes("command")||o.includes("run")?st.shell:o.includes("api")||o.includes("rest")||o.includes("express")||o.includes("server")||o.includes("endpoint")?st.api:o.includes("debug")||o.includes("error")||o.includes("fix")||o.includes("bug")||o.includes("crash")?st.debug:o.includes("react")||o.includes("component")||o.includes("hook")||o.includes("useState")?st.react:o.includes("explain")||o.includes("how does")||o.includes("what is")||o.includes("help")?st.explain:o.includes("write")||o.includes("code")||o.includes("build")||o.includes("create")||o.includes("make")?st.api:st.fallback}function ed(i){return i.split(/(```[\s\S]*?```)/g).map((o,c)=>o.startsWith("```")?n.jsx("div",{className:"my-2 bg-slate-900 rounded-lg p-3 border border-slate-800 font-mono text-[11px] sm:text-xs text-slate-400 overflow-x-auto",children:o.replace(/```\w*\n?/,"").replace(/```$/,"")},c):n.jsx("span",{children:o.split(/(\*\*[^*]+\*\*)/g).map((h,p)=>h.startsWith("**")&&h.endsWith("**")?n.jsx("strong",{className:"text-slate-200",children:h.slice(2,-2)},p):n.jsx("span",{children:h},p))},c))}function Id(){const[i,o]=y.useState([{role:"ai",text:`Hey! I'm the Upfyn-Code AI assistant, built by **Thinqmesh Technologies**. I can help you write code, debug errors, explain concepts, and explore the platform.
|
|
264
|
+
|
|
265
|
+
Try the suggestions below or ask me anything — like "Who built this?", "Show pricing", or "Write me a REST API".`}]),[c,h]=y.useState(""),[p,g]=y.useState(!1),[v,x]=y.useState(new Set),[m,u]=y.useState(""),w=y.useRef(null);y.useEffect(()=>{w.current&&(w.current.scrollTop=w.current.scrollHeight)},[i,m,p]);const b=y.useCallback(R=>{if(!R.trim()||p)return;const A=R.trim();h(""),o(W=>[...W,{role:"user",text:A}]),g(!0),u("");const M=zo.find(W=>W.label.toLowerCase()===A.toLowerCase());M&&x(W=>new Set(W).add(M.key));const H=Ox(A),q=600+Math.random()*600;setTimeout(()=>{let W=0;const ne=2+Math.floor(Math.random()*2),ye=setInterval(()=>{W+=ne,W>=H.length?(clearInterval(ye),u(""),o(Y=>[...Y,{role:"ai",text:H}]),g(!1)):u(H.slice(0,W))},25)},q)},[p]),T=y.useCallback(()=>b(c),[c,b]),C=zo.filter(R=>!v.has(R.key));return n.jsxs("div",{className:"flex flex-col h-full",children:[n.jsxs("div",{ref:w,className:"flex-1 overflow-auto p-3 sm:p-4 space-y-4",children:[i.map((R,A)=>R.role==="ai"?n.jsxs("div",{className:"flex gap-2 sm:gap-3 slide-up",style:{animationDelay:`${A*50}ms`},children:[n.jsx("div",{className:"w-6 h-6 sm:w-7 sm:h-7 rounded-full bg-blue-500/20 flex items-center justify-center shrink-0 mt-0.5",children:n.jsx(Cl,{className:"w-3 h-3 sm:w-3.5 sm:h-3.5 text-blue-400"})}),n.jsx("div",{className:"flex-1 text-xs sm:text-sm text-slate-300 whitespace-pre-wrap leading-relaxed min-w-0",children:ed(R.text)})]},A):n.jsx("div",{className:"flex justify-end slide-up",children:n.jsx("div",{className:"bg-blue-600/20 border border-blue-500/20 rounded-xl px-3 sm:px-4 py-2 sm:py-2.5 max-w-[85%] sm:max-w-xs",children:n.jsx("p",{className:"text-xs sm:text-sm text-blue-200",children:R.text})})},A)),p&&!m&&n.jsxs("div",{className:"flex gap-2 sm:gap-3",children:[n.jsx("div",{className:"w-6 h-6 sm:w-7 sm:h-7 rounded-full bg-blue-500/20 flex items-center justify-center shrink-0",children:n.jsx(Cl,{className:"w-3 h-3 sm:w-3.5 sm:h-3.5 text-blue-400"})}),n.jsxs("div",{className:"flex items-center gap-1 py-2",children:[n.jsx("div",{className:"w-1.5 h-1.5 bg-blue-400 rounded-full animate-bounce",style:{animationDelay:"0ms"}}),n.jsx("div",{className:"w-1.5 h-1.5 bg-blue-400 rounded-full animate-bounce",style:{animationDelay:"150ms"}}),n.jsx("div",{className:"w-1.5 h-1.5 bg-blue-400 rounded-full animate-bounce",style:{animationDelay:"300ms"}})]})]}),p&&m&&n.jsxs("div",{className:"flex gap-2 sm:gap-3",children:[n.jsx("div",{className:"w-6 h-6 sm:w-7 sm:h-7 rounded-full bg-blue-500/20 flex items-center justify-center shrink-0 mt-0.5",children:n.jsx(Cl,{className:"w-3 h-3 sm:w-3.5 sm:h-3.5 text-blue-400"})}),n.jsxs("div",{className:"flex-1 text-xs sm:text-sm text-slate-300 whitespace-pre-wrap leading-relaxed min-w-0",children:[ed(m),n.jsx("span",{className:"inline-block w-1.5 h-4 bg-blue-400/60 cursor-blink ml-0.5 align-middle"})]})]})]}),C.length>0&&n.jsx("div",{className:"px-3 sm:px-4 pb-2 flex gap-1.5 sm:gap-2 flex-wrap",children:C.map(R=>n.jsx("button",{onClick:()=>b(R.label),className:"px-2.5 sm:px-3 py-1.5 text-[11px] sm:text-xs bg-slate-800 hover:bg-slate-700 text-slate-400 hover:text-slate-200 rounded-lg border border-slate-700 transition-colors active:scale-95",children:R.label},R.key))}),n.jsx("div",{className:"p-2.5 sm:p-3 border-t border-slate-800",children:n.jsxs("div",{className:"flex gap-2",children:[n.jsx("input",{type:"text",value:c,onChange:R=>h(R.target.value),onKeyDown:R=>R.key==="Enter"&&T(),placeholder:"Ask me anything...",className:"flex-1 px-3 py-2 sm:py-2.5 bg-slate-900 border border-slate-700 rounded-lg text-sm text-white placeholder:text-slate-600 focus:outline-none focus:border-blue-500"}),n.jsx("button",{onClick:T,disabled:!c.trim()||p,className:"p-2 sm:p-2.5 bg-blue-600 hover:bg-blue-500 disabled:opacity-30 text-white rounded-lg transition-colors active:scale-95",children:n.jsx(Ed,{className:"w-4 h-4"})})]})})]})}const Fx={"npm run dev":[{type:"output",text:""},{type:"success",text:" VITE v7.1.8 ready in 342 ms"},{type:"output",text:""},{type:"output",text:" ➜ Local: http://localhost:5173/"},{type:"output",text:" ➜ Network: use --host to expose"},{type:"dim",text:" ➜ press h + enter to show help"}],"git status":[{type:"output",text:"On branch main"},{type:"success",text:"Your branch is ahead of 'origin/main' by 3 commits."},{type:"output",text:""},{type:"output",text:"Changes not staged for commit:"},{type:"warn",text:" modified: src/App.jsx"},{type:"warn",text:" modified: src/components/DemoMode.jsx"}],"git log --oneline -5":[{type:"output",text:"a3f2e1d feat: add canvas block system"},{type:"output",text:"b7c9f4a fix: auth cookie handling for cross-origin"},{type:"output",text:"e2d8a6c refactor: split frontend/backend deployment"},{type:"output",text:"f1b3c5e feat: add real-time shell relay via WebSocket"},{type:"output",text:"c4a9d2b init: project setup with Vite + Express"}],ls:[{type:"dir",text:"backend/ frontend/ node_modules/ src/"},{type:"output",text:"README.md package.json server/ vite.config.js"}],"node -v":[{type:"success",text:"v22.12.0"}],"npm -v":[{type:"success",text:"10.9.2"}],pwd:[{type:"output",text:"/home/user/upfyn-code"}],whoami:[{type:"output",text:"user"}],clear:"CLEAR",help:[{type:"output",text:""},{type:"success",text:"Upfyn-Code Shell — Demo Commands:"},{type:"output",text:" npm run dev Start dev server"},{type:"output",text:" git status Show git status"},{type:"output",text:" git log Recent commits"},{type:"output",text:" ls List files"},{type:"output",text:" node -v / npm -v Version info"},{type:"output",text:" pwd / whoami Environment info"},{type:"output",text:" clear Clear terminal"},{type:"output",text:""}]};function Md(){const[i,o]=y.useState([{type:"system",text:" Upfyn-Code Terminal v1.0 — Demo Session"},{type:"dim",text:` Type "help" to see available commands
|
|
266
|
+
`},{type:"prompt",text:""}]),[c,h]=y.useState(""),[p,g]=y.useState(!1),v=y.useRef(null);y.useEffect(()=>{v.current&&(v.current.scrollTop=v.current.scrollHeight)},[i]);const x=y.useCallback(u=>{if(!u.trim()||p)return;u=u.trim(),h(""),u==="git log"&&(u="git log --oneline -5");const w=Fx[u];if(w==="CLEAR"){o([{type:"prompt",text:""}]);return}o(T=>[...T.slice(0,-1),{type:"command",text:u}]),g(!0);const b=w?300+Math.random()*400:150;setTimeout(()=>{const T=w||[{type:"error",text:`bash: ${u}: command not found`}];o(C=>[...C,...T,{type:"prompt",text:""}]),g(!1)},b)},[p]),m=["npm run dev","git status","ls","help"];return n.jsxs("div",{className:"flex flex-col h-full bg-[#0c0c0c]",children:[n.jsxs("div",{className:"flex items-center gap-2 px-3 sm:px-4 py-2 bg-slate-900/80 border-b border-slate-800",children:[n.jsxs("div",{className:"flex gap-1.5",children:[n.jsx("div",{className:"w-2.5 h-2.5 rounded-full bg-red-500/70"}),n.jsx("div",{className:"w-2.5 h-2.5 rounded-full bg-yellow-500/70"}),n.jsx("div",{className:"w-2.5 h-2.5 rounded-full bg-green-500/70"})]}),n.jsx("span",{className:"text-xs text-slate-500 ml-2 font-mono",children:"~/upfyn-code"}),n.jsx("span",{className:"ml-auto text-[10px] text-slate-600 font-mono",children:"bash"})]}),n.jsx("div",{ref:v,className:"flex-1 overflow-auto p-3 sm:p-4 font-mono text-[12px] sm:text-[13px] leading-5 space-y-0",children:i.map((u,w)=>u.type==="system"?n.jsx("div",{className:"text-blue-400/70 text-xs mb-1",children:u.text},w):u.type==="dim"?n.jsx("div",{className:"text-slate-600 text-xs mb-2 whitespace-pre-wrap",children:u.text},w):u.type==="command"?n.jsxs("div",{className:"text-slate-300 mt-1",children:[n.jsx("span",{className:"text-cyan-400",children:"~/upfyn-code"}),n.jsx("span",{className:"text-slate-600",children:" $ "}),n.jsx("span",{children:u.text})]},w):u.type==="error"?n.jsx("div",{className:"text-red-400",children:u.text},w):u.type==="success"?n.jsx("div",{className:"text-green-400",children:u.text},w):u.type==="warn"?n.jsx("div",{className:"text-amber-400",children:u.text},w):u.type==="dir"?n.jsx("div",{className:"text-blue-300",children:u.text},w):u.type==="output"?n.jsx("div",{className:"text-slate-400",children:u.text||" "},w):u.type==="prompt"?n.jsxs("div",{className:"text-slate-300 mt-1",children:[n.jsx("span",{className:"text-cyan-400",children:"~/upfyn-code"}),n.jsx("span",{className:"text-slate-600",children:" $ "}),n.jsx("span",{className:"cursor-blink text-slate-500",children:"▌"})]},w):null)}),n.jsx("div",{className:"px-3 sm:px-4 pb-2 flex gap-1.5 sm:gap-2 flex-wrap",children:m.map((u,w)=>n.jsx("button",{onClick:()=>x(u),disabled:p,className:"px-2 sm:px-2.5 py-1 text-[11px] sm:text-xs font-mono bg-slate-800/80 hover:bg-slate-700 text-slate-400 hover:text-slate-200 rounded border border-slate-700 transition-colors disabled:opacity-40 active:scale-95",children:u},w))}),n.jsx("div",{className:"px-3 sm:px-4 py-2.5 sm:py-3 border-t border-slate-800/50 bg-[#0c0c0c]",children:n.jsxs("div",{className:"flex items-center gap-2 font-mono text-xs sm:text-sm",children:[n.jsx("span",{className:"text-cyan-400 text-xs hidden sm:inline",children:"~/upfyn-code"}),n.jsx("span",{className:"text-slate-600",children:"$"}),n.jsx("input",{type:"text",value:c,onChange:u=>h(u.target.value),onKeyDown:u=>u.key==="Enter"&&x(c),placeholder:p?"Running...":"Type a command...",disabled:p,className:"flex-1 bg-transparent text-white placeholder:text-slate-700 focus:outline-none disabled:opacity-50"}),n.jsx("button",{onClick:()=>x(c),disabled:!c.trim()||p,className:"p-1.5 text-slate-500 hover:text-white disabled:opacity-30 transition-colors",children:n.jsx(Ho,{className:"w-3.5 h-3.5"})})]})})]})}function td(i){return i.endsWith(".jsx")||i.endsWith(".tsx")?"text-blue-400":i.endsWith(".js")||i.endsWith(".ts")?"text-yellow-400":i.endsWith(".css")?"text-purple-400":i.endsWith(".json")?"text-green-400":i.endsWith(".md")?"text-slate-400":"text-slate-500"}const So=[{name:"src",type:"dir",path:"src",depth:0},{name:"components",type:"dir",path:"src/components",depth:1,parent:"src"},{name:"DemoMode.jsx",type:"file",depth:2,parent:"src/components",size:"8.2 KB"},{name:"Sidebar.jsx",type:"file",depth:2,parent:"src/components",size:"3.1 KB"},{name:"pages",type:"dir",path:"src/pages",depth:1,parent:"src"},{name:"LoginPage.jsx",type:"file",depth:2,parent:"src/pages",size:"4.8 KB"},{name:"AppShell.jsx",type:"file",depth:2,parent:"src/pages",size:"6.5 KB"},{name:"App.jsx",type:"file",depth:1,parent:"src",size:"2.9 KB"},{name:"main.jsx",type:"file",depth:1,parent:"src",size:"0.4 KB"},{name:"index.css",type:"file",depth:1,parent:"src",size:"1.2 KB"},{name:"server",type:"dir",path:"server",depth:0},{name:"index.js",type:"file",depth:1,parent:"server",size:"5.7 KB"},{name:"routes.js",type:"file",depth:1,parent:"server",size:"3.4 KB"},{name:"package.json",type:"file",depth:0,size:"1.8 KB"},{name:"vite.config.js",type:"file",depth:0,size:"0.6 KB"},{name:"README.md",type:"file",depth:0,size:"2.1 KB"}],Wx={"App.jsx":`import { useState, useEffect } from 'react';
|
|
267
|
+
import LoginPage from './pages/LoginPage';
|
|
268
|
+
import AppShell from './pages/AppShell';
|
|
269
|
+
|
|
270
|
+
export default function App() {
|
|
271
|
+
const [user, setUser] = useState(null);
|
|
272
|
+
|
|
273
|
+
useEffect(() => {
|
|
274
|
+
checkAuth();
|
|
275
|
+
}, []);
|
|
276
|
+
|
|
277
|
+
return user ? <AppShell /> : <LoginPage />;
|
|
278
|
+
}`,"main.jsx":`import React from 'react';
|
|
279
|
+
import ReactDOM from 'react-dom/client';
|
|
280
|
+
import App from './App';
|
|
281
|
+
import './index.css';
|
|
282
|
+
|
|
283
|
+
ReactDOM.createRoot(
|
|
284
|
+
document.getElementById('root')
|
|
285
|
+
).render(
|
|
286
|
+
<React.StrictMode>
|
|
287
|
+
<App />
|
|
288
|
+
</React.StrictMode>
|
|
289
|
+
);`,"LoginPage.jsx":`import { useState } from 'react';
|
|
290
|
+
import DemoMode from '../components/DemoMode';
|
|
291
|
+
|
|
292
|
+
export default function LoginPage({ onLogin }) {
|
|
293
|
+
const [mode, setMode] = useState(null);
|
|
294
|
+
const [identifier, setIdentifier] = useState('');
|
|
295
|
+
const [password, setPassword] = useState('');
|
|
296
|
+
|
|
297
|
+
const handleLogin = async (e) => {
|
|
298
|
+
e.preventDefault();
|
|
299
|
+
const result = await onLogin(identifier, password);
|
|
300
|
+
if (!result.success) setError(result.error);
|
|
301
|
+
};
|
|
302
|
+
|
|
303
|
+
return (
|
|
304
|
+
<div className="min-h-screen bg-[#0a0f1e]">
|
|
305
|
+
{/* ... */}
|
|
306
|
+
</div>
|
|
307
|
+
);
|
|
308
|
+
}`,"package.json":`{
|
|
309
|
+
"name": "upfynai-v2",
|
|
310
|
+
"version": "1.0.0",
|
|
311
|
+
"private": true,
|
|
312
|
+
"scripts": {
|
|
313
|
+
"dev": "vite",
|
|
314
|
+
"build": "vite build",
|
|
315
|
+
"preview": "vite preview"
|
|
316
|
+
},
|
|
317
|
+
"dependencies": {
|
|
318
|
+
"react": "^18.3.0",
|
|
319
|
+
"react-dom": "^18.3.0",
|
|
320
|
+
"lucide-react": "^0.400.0"
|
|
321
|
+
},
|
|
322
|
+
"devDependencies": {
|
|
323
|
+
"vite": "^7.1.8",
|
|
324
|
+
"tailwindcss": "^3.4.0"
|
|
325
|
+
}
|
|
326
|
+
}`,"index.css":`@tailwind base;
|
|
327
|
+
@tailwind components;
|
|
328
|
+
@tailwind utilities;
|
|
329
|
+
|
|
330
|
+
:root {
|
|
331
|
+
font-family: Inter, system-ui, sans-serif;
|
|
332
|
+
}
|
|
333
|
+
|
|
334
|
+
body {
|
|
335
|
+
margin: 0;
|
|
336
|
+
background: #0a0f1e;
|
|
337
|
+
}`,"DemoMode.jsx":`import { useState, useCallback } from 'react';
|
|
338
|
+
import { Sparkles, Send, Terminal } from 'lucide-react';
|
|
339
|
+
|
|
340
|
+
const SUGGESTIONS = [
|
|
341
|
+
{ label: 'What can you do?', key: 'capabilities' },
|
|
342
|
+
{ label: 'Write me a REST API', key: 'code' },
|
|
343
|
+
{ label: 'Debug my code', key: 'debug' },
|
|
344
|
+
];
|
|
345
|
+
|
|
346
|
+
export function DemoChat() {
|
|
347
|
+
const [messages, setMessages] = useState([]);
|
|
348
|
+
// ...
|
|
349
|
+
}`};function _d(){const[i,o]=y.useState({src:!0,server:!1,"src/components":!1,"src/pages":!1}),[c,h]=y.useState(null),[p,g]=y.useState(!0),v=w=>{if(w.depth===0)return!0;if(w.parent&&i[w.parent]){if(w.depth===1)return!0;const b=So.find(T=>T.path===w.parent)?.parent;if(b&&i[b]||!b)return!0}return!1},x=w=>{o(b=>({...b,[w]:!b[w]}))},m=c&&Wx[c],u=m?m.split(`
|
|
350
|
+
`):[];return n.jsxs("div",{className:"flex h-full",children:[n.jsxs("div",{className:`${p?"w-48 sm:w-60":"w-0"} border-r border-slate-800 overflow-hidden bg-slate-950/50 transition-all duration-200 shrink-0`,children:[n.jsxs("div",{className:"flex items-center justify-between p-2 px-3 border-b border-slate-800",children:[n.jsx("span",{className:"text-[10px] text-slate-500 uppercase tracking-wider font-semibold",children:"Explorer"}),n.jsxs("span",{className:"text-[10px] text-slate-700",children:[So.filter(w=>w.type==="file").length," files"]})]}),n.jsx("div",{className:"py-1 overflow-auto",style:{maxHeight:"calc(100% - 32px)"},children:So.filter(v).map((w,b)=>n.jsx("button",{onClick:()=>{w.type==="dir"?x(w.path):(h(w.name),window.innerWidth<640&&g(!1))},className:`w-full flex items-center gap-1.5 py-[5px] px-2 text-[12px] sm:text-[13px] hover:bg-slate-800/50 transition-colors ${c===w.name?"bg-blue-500/10 text-blue-300":"text-slate-400"}`,style:{paddingLeft:`${w.depth*12+8}px`},children:w.type==="dir"?n.jsxs(n.Fragment,{children:[i[w.path]?n.jsx(sf,{className:"w-3 h-3 text-slate-600 shrink-0"}):n.jsx(Bo,{className:"w-3 h-3 text-slate-600 shrink-0"}),n.jsx(xr,{className:"w-3.5 h-3.5 text-blue-400/60 shrink-0"}),n.jsx("span",{className:"text-blue-300 font-medium",children:w.name})]}):n.jsxs(n.Fragment,{children:[n.jsx(Ro,{className:`w-3.5 h-3.5 shrink-0 ${td(w.name)}`}),n.jsx("span",{className:"truncate",children:w.name}),n.jsx("span",{className:"ml-auto text-[10px] text-slate-700 shrink-0 hidden sm:inline",children:w.size})]})},b))})]}),n.jsx("div",{className:"flex-1 overflow-auto bg-[#0d1117] min-w-0",children:m?n.jsxs("div",{className:"flex flex-col h-full",children:[n.jsxs("div",{className:"flex items-center gap-2 px-3 sm:px-4 py-2 bg-slate-900/60 border-b border-slate-800",children:[n.jsx("button",{onClick:()=>g(!p),className:"sm:hidden p-1 text-slate-500 hover:text-white",children:n.jsx(xr,{className:"w-3.5 h-3.5"})}),n.jsx(Ro,{className:`w-3.5 h-3.5 ${td(c)}`}),n.jsx("span",{className:"text-xs text-slate-300 font-medium",children:c}),n.jsxs("span",{className:"text-[10px] text-slate-600 ml-auto",children:[u.length," lines"]})]}),n.jsx("div",{className:"flex-1 overflow-auto",children:n.jsx("table",{className:"w-full border-collapse",children:n.jsx("tbody",{children:u.map((w,b)=>n.jsxs("tr",{className:"hover:bg-slate-800/30",children:[n.jsx("td",{className:"text-right pr-3 sm:pr-4 pl-3 sm:pl-4 py-0 text-[10px] sm:text-[11px] text-slate-700 select-none font-mono w-8 sm:w-10 align-top leading-5",children:b+1}),n.jsx("td",{className:"py-0 font-mono text-[11px] sm:text-[12px] text-slate-400 whitespace-pre leading-5 pr-3 sm:pr-4",children:w||" "})]},b))})})})]}):n.jsxs("div",{className:"flex flex-col items-center justify-center h-full text-slate-600",children:[n.jsx("button",{onClick:()=>g(!0),className:"sm:hidden mb-3 px-3 py-1.5 text-xs bg-slate-800 rounded-lg text-slate-400",children:"Show Files"}),n.jsx(xr,{className:"w-10 h-10 text-slate-800 mb-3"}),n.jsx("p",{className:"text-sm",children:c?"Preview not available":"Select a file to preview"}),n.jsx("p",{className:"text-xs text-slate-700 mt-1",children:"Click any file in the explorer"})]})})]})}const nd=[{hash:"a3f2e1d",msg:"feat: add canvas block system",tag:"feat",author:"Anit",time:"2 hours ago",files:4},{hash:"b7c9f4a",msg:"fix: auth cookie handling for cross-origin",tag:"fix",author:"Anit",time:"5 hours ago",files:2},{hash:"e2d8a6c",msg:"refactor: split frontend/backend deployment",tag:"refactor",author:"Anit",time:"1 day ago",files:8},{hash:"f1b3c5e",msg:"feat: add real-time shell relay via WebSocket",tag:"feat",author:"Anit",time:"2 days ago",files:5},{hash:"c4a9d2b",msg:"init: project setup with Vite + Express",tag:"init",author:"Anit",time:"3 days ago",files:12}],Bx={feat:"text-green-400 bg-green-400/10",fix:"text-amber-400 bg-amber-400/10",refactor:"text-purple-400 bg-purple-400/10",init:"text-blue-400 bg-blue-400/10"},Eo=[{file:"src/components/DemoMode.jsx",status:"M",additions:42,deletions:18},{file:"src/pages/LoginPage.jsx",status:"M",additions:8,deletions:3},{file:"src/pages/AppShell.jsx",status:"M",additions:15,deletions:7},{file:"src/utils/helpers.js",status:"A",additions:24,deletions:0}],rd=[{name:"main",current:!0,ahead:3,behind:0},{name:"feat/canvas-blocks",current:!1,ahead:1,behind:2},{name:"fix/auth-cookies",current:!1,ahead:0,behind:0}];function Rd(){const[i,o]=y.useState("log"),[c,h]=y.useState(null);return n.jsxs("div",{className:"flex flex-col h-full",children:[n.jsx("div",{className:"flex border-b border-slate-800 px-2 sm:px-3 bg-slate-900/40 overflow-x-auto",children:[{id:"log",label:"Commits",count:nd.length},{id:"changes",label:"Changes",count:Eo.length},{id:"branches",label:"Branches",count:rd.length}].map(p=>n.jsxs("button",{onClick:()=>o(p.id),className:`flex items-center gap-1.5 px-2.5 sm:px-3 py-2.5 text-[11px] sm:text-xs font-medium transition-colors border-b-2 whitespace-nowrap ${i===p.id?"text-blue-400 border-blue-400":"text-slate-500 border-transparent hover:text-slate-300"}`,children:[p.label,n.jsx("span",{className:`text-[10px] px-1.5 py-0.5 rounded-full ${i===p.id?"bg-blue-500/20 text-blue-400":"bg-slate-800 text-slate-600"}`,children:p.count})]},p.id))}),n.jsxs("div",{className:"flex-1 overflow-auto p-3 sm:p-4",children:[i==="log"&&n.jsx("div",{className:"space-y-2",children:nd.map((p,g)=>n.jsx("div",{onClick:()=>h(c===p.hash?null:p.hash),className:`border rounded-lg px-3 py-2.5 transition-all cursor-pointer ${c===p.hash?"bg-blue-500/5 border-blue-500/30 shadow-lg shadow-blue-500/5":"bg-slate-900/50 border-slate-800 hover:border-slate-700"}`,children:n.jsxs("div",{className:"flex items-start gap-2",children:[n.jsx("div",{className:"mt-1.5 w-2 h-2 rounded-full bg-blue-400/60 shrink-0"}),n.jsxs("div",{className:"flex-1 min-w-0",children:[n.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[n.jsx("span",{className:`text-[10px] font-medium px-1.5 py-0.5 rounded ${Bx[p.tag]||"text-slate-400 bg-slate-800"}`,children:p.tag}),n.jsx("span",{className:"text-xs sm:text-sm text-slate-300",children:p.msg.replace(/^\w+:\s*/,"")})]}),n.jsxs("div",{className:"flex items-center gap-2 sm:gap-3 mt-1.5 flex-wrap",children:[n.jsx("code",{className:"text-[10px] sm:text-[11px] text-blue-400/50 font-mono",children:p.hash}),n.jsx("span",{className:"text-[10px] sm:text-[11px] text-slate-600",children:p.author}),n.jsx("span",{className:"text-[10px] sm:text-[11px] text-slate-700",children:p.time}),n.jsxs("span",{className:"ml-auto text-[10px] sm:text-[11px] text-slate-700",children:[p.files," files"]})]})]})]})},g))}),i==="changes"&&n.jsxs("div",{className:"space-y-2",children:[n.jsxs("div",{className:"flex items-center justify-between mb-3",children:[n.jsxs("span",{className:"text-xs sm:text-sm text-slate-400",children:[Eo.length," unstaged changes"]}),n.jsx("button",{className:"px-2.5 py-1 text-xs bg-blue-600/20 text-blue-400 rounded hover:bg-blue-600/30 transition-colors active:scale-95",children:"Stage All"})]}),Eo.map((p,g)=>n.jsxs("div",{className:"flex items-center gap-2 bg-slate-900/30 border border-slate-800 rounded-lg px-3 py-2 hover:border-slate-700 transition-colors",children:[n.jsx("span",{className:`text-[10px] font-bold px-1.5 py-0.5 rounded ${p.status==="A"?"text-green-400 bg-green-400/10":"text-amber-400 bg-amber-400/10"}`,children:p.status}),n.jsx("span",{className:"text-xs sm:text-sm text-slate-400 font-mono truncate flex-1 min-w-0",children:p.file}),n.jsxs("span",{className:"text-[11px] text-green-400/70 shrink-0",children:["+",p.additions]}),p.deletions>0&&n.jsxs("span",{className:"text-[11px] text-red-400/70 shrink-0",children:["-",p.deletions]})]},g))]}),i==="branches"&&n.jsx("div",{className:"space-y-2",children:rd.map((p,g)=>n.jsxs("div",{className:`flex items-center gap-2 border rounded-lg px-3 py-2.5 transition-colors ${p.current?"bg-blue-500/5 border-blue-500/20":"bg-slate-900/30 border-slate-800 hover:border-slate-700"}`,children:[n.jsx(Fn,{className:`w-3.5 h-3.5 shrink-0 ${p.current?"text-blue-400":"text-slate-600"}`}),n.jsx("span",{className:`text-xs sm:text-sm ${p.current?"text-blue-300 font-medium":"text-slate-400"}`,children:p.name}),p.current&&n.jsx("span",{className:"text-[10px] bg-blue-500/20 text-blue-400 px-1.5 py-0.5 rounded font-medium",children:"HEAD"}),n.jsxs("div",{className:"ml-auto flex items-center gap-2",children:[p.ahead>0&&n.jsxs("span",{className:"text-[11px] text-green-400 font-mono",children:["+",p.ahead]}),p.behind>0&&n.jsxs("span",{className:"text-[11px] text-amber-400 font-mono",children:["-",p.behind]})]})]},g))})]})]})}const Sl=[{id:"Chat",icon:ds,color:"blue",label:"Chat"},{id:"Research",icon:ax,color:"cyan",label:"Research"},{id:"Notes",icon:Go,color:"amber",label:"Notes"},{id:"PDF",icon:Cd,color:"purple",label:"PDF"},{id:"Code",icon:Ro,color:"green",label:"Code"},{id:"Dashboard",icon:tf,color:"rose",label:"Dashboard"}],Un={blue:{bg:"bg-blue-500/10",border:"border-blue-500/30",hoverBorder:"hover:border-blue-400/50",headerBorder:"border-blue-500/20",text:"text-blue-400",ring:"ring-blue-400/50",shadow:"shadow-blue-500/10",line:"#3b82f6",glow:"rgba(59,130,246,0.15)",solid:"#141d2f"},cyan:{bg:"bg-cyan-500/10",border:"border-cyan-500/30",hoverBorder:"hover:border-cyan-400/50",headerBorder:"border-cyan-500/20",text:"text-cyan-400",ring:"ring-cyan-400/50",shadow:"shadow-cyan-500/10",line:"#06b6d4",glow:"rgba(6,182,212,0.15)",solid:"#0f1e24"},amber:{bg:"bg-amber-500/10",border:"border-amber-500/30",hoverBorder:"hover:border-amber-400/50",headerBorder:"border-amber-500/20",text:"text-amber-400",ring:"ring-amber-400/50",shadow:"shadow-amber-500/10",line:"#f59e0b",glow:"rgba(245,158,11,0.15)",solid:"#1a1810"},purple:{bg:"bg-purple-500/10",border:"border-purple-500/30",hoverBorder:"hover:border-purple-400/50",headerBorder:"border-purple-500/20",text:"text-purple-400",ring:"ring-purple-400/50",shadow:"shadow-purple-500/10",line:"#a855f7",glow:"rgba(168,85,247,0.15)",solid:"#1a1428"},green:{bg:"bg-green-500/10",border:"border-green-500/30",hoverBorder:"hover:border-green-400/50",headerBorder:"border-green-500/20",text:"text-green-400",ring:"ring-green-400/50",shadow:"shadow-green-500/10",line:"#22c55e",glow:"rgba(34,197,94,0.15)",solid:"#0f1e14"},rose:{bg:"bg-rose-500/10",border:"border-rose-500/30",hoverBorder:"hover:border-rose-400/50",headerBorder:"border-rose-500/20",text:"text-rose-400",ring:"ring-rose-400/50",shadow:"shadow-rose-500/10",line:"#f43f5e",glow:"rgba(244,63,94,0.15)",solid:"#1e1015"}},sd=[{id:1,type:"Chat",x:40,y:40,w:240,h:120,color:"blue",label:"AI Chat",content:'"Refactor the auth module to use Express middleware pattern"',model:"GPT-4o"},{id:2,type:"Research",x:350,y:40,w:240,h:120,color:"cyan",label:"Deep Research",content:`Searching: "Express middleware best practices"
|
|
351
|
+
3 sources found`},{id:3,type:"Notes",x:660,y:40,w:240,h:120,color:"amber",label:"Architecture Notes",content:`- Middleware chain pattern
|
|
352
|
+
- Error boundaries
|
|
353
|
+
- Rate limiting strategy`},{id:4,type:"PDF",x:40,y:230,w:240,h:120,color:"purple",label:"API Documentation",content:`API_Docs_v2.pdf — 12 pages
|
|
354
|
+
Section: Authentication`},{id:5,type:"Code",x:350,y:230,w:240,h:120,color:"green",label:"auth-middleware.js",content:`function authMiddleware(req, res, next) {
|
|
355
|
+
const token = req.headers.auth;
|
|
356
|
+
// verify token...
|
|
357
|
+
next();
|
|
358
|
+
}`},{id:6,type:"Dashboard",x:660,y:230,w:240,h:120,color:"rose",label:"Project Metrics",content:`Files: 24 | Lines: 3,847
|
|
359
|
+
Tests: 18 passing
|
|
360
|
+
Coverage: 72%`}],ld=[{from:1,to:2},{from:2,to:3},{from:2,to:5},{from:4,to:5},{from:5,to:6}],Hx={1:{instruction:"Start a conversation with the AI to plan the refactoring. The Chat block sends your prompt to the selected model and receives a structured response.",input:{label:"User Prompt",data:'"Refactor the auth module to use Express middleware pattern. Handle token validation, refresh, and error responses."'},output:{label:"AI Response",data:`✓ Plan: 1) Extract token validation → middleware
|
|
361
|
+
2) Add refresh logic for expired tokens
|
|
362
|
+
3) Standardize error responses with status codes
|
|
363
|
+
4) Add rate limiting per-user`}},2:{instruction:"Automatically search the web for relevant documentation, best practices, and community patterns related to the Chat output.",input:{label:"Search Query",data:`"Express middleware best practices 2025"
|
|
364
|
+
"JWT token validation middleware pattern"
|
|
365
|
+
"Node.js auth error handling"`},output:{label:"Research Results",data:`1. expressjs.com/guide/using-middleware
|
|
366
|
+
→ Chaining, error-first, async patterns
|
|
367
|
+
2. auth0.com/blog/node-js-auth-middleware
|
|
368
|
+
→ JWT verify + refresh flow
|
|
369
|
+
3. github.com/express-rate-limit
|
|
370
|
+
→ 150 req/15min per IP`}},3:{instruction:"Capture and organize key findings from Research into structured architecture notes for reference during implementation.",input:{label:"Research Findings",data:`3 sources analyzed:
|
|
371
|
+
- Middleware chaining patterns
|
|
372
|
+
- JWT validation best practices
|
|
373
|
+
- Rate limiting strategies`},output:{label:"Documented Notes",data:`## Architecture Decisions
|
|
374
|
+
- Middleware chain: validate → refresh → authorize
|
|
375
|
+
- Error format: { status, code, message }
|
|
376
|
+
- Rate limit: 150 req/15min per user
|
|
377
|
+
- Token refresh: silent, return new token in header`}},4:{instruction:"Extract relevant sections from uploaded PDF documentation to provide context for code generation.",input:{label:"PDF File",data:`API_Docs_v2.pdf
|
|
378
|
+
Total: 12 pages
|
|
379
|
+
Target section: "Authentication" (pages 4-6)`},output:{label:"Extracted Content",data:`Authentication Endpoints:
|
|
380
|
+
- POST /auth/login → returns { accessToken, refreshToken }
|
|
381
|
+
- POST /auth/refresh → returns { accessToken }
|
|
382
|
+
- Token format: JWT with exp, sub, role claims
|
|
383
|
+
- Header: Authorization: Bearer <token>`}},5:{instruction:"Generate the implementation code based on Research findings, Notes architecture, and PDF documentation context.",input:{label:"Combined Context",data:`From Research: middleware patterns + JWT flow
|
|
384
|
+
From Notes: chain order + error format
|
|
385
|
+
From PDF: endpoint specs + token format`},output:{label:"Generated Code",data:`const jwt = require("jsonwebtoken");
|
|
386
|
+
|
|
387
|
+
function authMiddleware(req, res, next) {
|
|
388
|
+
const token = req.headers.authorization?.split(" ")[1];
|
|
389
|
+
if (!token) return res.status(401).json({
|
|
390
|
+
code: "NO_TOKEN", message: "Missing auth token"
|
|
391
|
+
});
|
|
392
|
+
try {
|
|
393
|
+
req.user = jwt.verify(token, process.env.JWT_SECRET);
|
|
394
|
+
next();
|
|
395
|
+
} catch (err) {
|
|
396
|
+
if (err.name === "TokenExpiredError") {
|
|
397
|
+
return res.status(401).json({ code: "EXPIRED" });
|
|
398
|
+
}
|
|
399
|
+
res.status(403).json({ code: "INVALID" });
|
|
400
|
+
}
|
|
401
|
+
}`}},6:{instruction:"Analyze the generated code and project state to display real-time metrics, test results, and coverage reports.",input:{label:"Code Analysis",data:`Scanning: auth-middleware.js + 23 other files
|
|
402
|
+
Running: npm test
|
|
403
|
+
Analyzing: coverage report`},output:{label:"Project Metrics",data:`Files: 24 | Lines: 3,847
|
|
404
|
+
─────────────────────────
|
|
405
|
+
Tests: 18 passing (0 failing)
|
|
406
|
+
Coverage: 72% (+4% from last run)
|
|
407
|
+
New middleware: 100% covered
|
|
408
|
+
Build: ✓ passing (2.1s)`}}};function Vx({block:i,onClose:o}){const c=Hx[i.id],h=Un[i.color]||Un.blue,g=Sl.find(v=>v.id===i.type)?.icon||Go;return n.jsxs("div",{className:"absolute inset-0 z-[100] flex items-center justify-center",onClick:o,children:[n.jsx("div",{className:"absolute inset-0 bg-black/60 backdrop-blur-sm"}),n.jsxs("div",{className:"relative w-[92%] max-w-lg max-h-[85%] overflow-auto rounded-xl border",style:{background:h.solid,borderColor:`${h.line}40`,boxShadow:`0 8px 32px rgba(0,0,0,0.5), 0 0 24px ${h.glow}`},onClick:v=>v.stopPropagation(),children:[n.jsxs("div",{className:"sticky top-0 flex items-center gap-2 px-4 py-3 border-b",style:{background:h.solid,borderColor:`${h.line}25`},children:[n.jsx("div",{className:"w-7 h-7 rounded-lg flex items-center justify-center",style:{background:`${h.line}20`},children:n.jsx(g,{size:15,className:h.text})}),n.jsxs("div",{className:"flex-1 min-w-0",children:[n.jsx("h3",{className:"text-sm font-semibold text-white",children:i.label||i.type}),n.jsxs("p",{className:"text-[10px] text-slate-500",children:[i.type," Block",i.model?` · ${i.model}`:""]})]}),n.jsx("button",{onClick:o,className:"p-1 rounded-md hover:bg-white/10 text-slate-500 hover:text-white transition-colors",children:n.jsx(Vo,{size:16,className:"rotate-45"})})]}),c?n.jsxs("div",{className:"p-4 space-y-4",children:[n.jsxs("div",{children:[n.jsxs("div",{className:"flex items-center gap-1.5 mb-2",children:[n.jsx(Cl,{size:12,className:h.text}),n.jsx("span",{className:"text-[11px] font-semibold text-slate-300 uppercase tracking-wider",children:"Instruction"})]}),n.jsx("p",{className:"text-xs text-slate-400 leading-relaxed",children:c.instruction})]}),n.jsxs("div",{children:[n.jsxs("div",{className:"flex items-center gap-1.5 mb-2",children:[n.jsx(Bo,{size:12,className:"text-blue-400"}),n.jsx("span",{className:"text-[11px] font-semibold text-slate-300 uppercase tracking-wider",children:"Input"}),n.jsxs("span",{className:"text-[10px] text-slate-600 ml-1",children:["— ",c.input.label]})]}),n.jsx("div",{className:"rounded-lg border border-white/[0.08] p-3 font-mono text-[11px] text-slate-400 whitespace-pre-wrap leading-relaxed",style:{background:"rgba(0,0,0,0.25)"},children:c.input.data})]}),n.jsxs("div",{children:[n.jsxs("div",{className:"flex items-center gap-1.5 mb-2",children:[n.jsx(Ho,{size:12,className:"text-emerald-400"}),n.jsx("span",{className:"text-[11px] font-semibold text-slate-300 uppercase tracking-wider",children:"Output"}),n.jsxs("span",{className:"text-[10px] text-slate-600 ml-1",children:["— ",c.output.label]})]}),n.jsx("div",{className:"rounded-lg border p-3 font-mono text-[11px] text-slate-300 whitespace-pre-wrap leading-relaxed",style:{background:"rgba(0,0,0,0.25)",borderColor:`${h.line}30`},children:c.output.data})]})]}):n.jsxs("div",{className:"p-4",children:[n.jsx("p",{className:"text-xs text-slate-500",children:"This is a custom block. Connect it to other blocks to create a workflow."}),n.jsx("div",{className:"mt-3 rounded-lg border border-white/[0.08] p-3 text-xs text-slate-400 whitespace-pre-wrap",style:{background:"rgba(0,0,0,0.25)"},children:i.content})]})]})]})}function Ad(){const[i,o]=y.useState(sd),[c,h]=y.useState(ld),[p,g]=y.useState(null),[v,x]=y.useState(null),[m,u]=y.useState(null),[w,b]=y.useState(null),T=y.useRef(null),C=y.useRef({}),R=y.useRef(!1),A=y.useRef(!1),[M,H]=y.useState({x:0,y:0}),[q,W]=y.useState(1),[ne,ye]=y.useState(null);y.useEffect(()=>{if(R.current)return;const I=T.current;if(!I||i.length===0)return;const F=setTimeout(()=>{const V=Math.min(...i.map(ht=>ht.x)),he=Math.min(...i.map(ht=>ht.y)),xe=Math.max(...i.map(ht=>ht.x+ht.w)),le=Math.max(...i.map(ht=>ht.y+(C.current[ht.id]?.offsetHeight||ht.h))),oe=xe-V+80,ze=le-he+80,ie=I.clientWidth/oe,ke=I.clientHeight/ze,Ee=Math.max(.4,Math.min(1.2,Math.min(ie,ke))),Me=(I.clientWidth-oe*Ee)/2-V*Ee+40*Ee,De=(I.clientHeight-ze*Ee)/2-he*Ee+40*Ee;W(Ee),H({x:Me,y:De}),R.current=!0},100);return()=>clearTimeout(F)},[i]);const Y=y.useCallback((I,F)=>{const V=T.current;if(!V)return{x:0,y:0};const he=V.getBoundingClientRect();return{x:(I-he.left-M.x)/q,y:(F-he.top-M.y)/q}},[M,q]),Re=I=>{const F=Sl.find(ie=>ie.id===I),V={Chat:`New AI Chat
|
|
409
|
+
|
|
410
|
+
Type a message to start...`,Research:`New Research
|
|
411
|
+
|
|
412
|
+
Enter a topic to explore...`,Notes:`New Note
|
|
413
|
+
|
|
414
|
+
Click to edit...`,PDF:`Drop a PDF file here
|
|
415
|
+
|
|
416
|
+
or click to browse`,Code:`new-file.js
|
|
417
|
+
|
|
418
|
+
// Start coding here...`,Dashboard:`Dashboard
|
|
419
|
+
|
|
420
|
+
Connect data sources
|
|
421
|
+
to see metrics`},he={Chat:"Claude 3.5"},xe=T.current,le=xe?(xe.clientWidth/2-M.x)/q:200,oe=xe?(xe.clientHeight/2-M.y)/q:150,ze={id:Date.now(),type:I,label:I,x:le-105+Math.random()*80-40,y:oe-55+Math.random()*60-30,w:240,h:120,color:F?.color||"blue",content:V[I]||"New block",...he[I]?{model:he[I]}:{}};o(ie=>[...ie,ze]),g(ze.id)},ue=I=>{o(F=>F.filter(V=>V.id!==I)),h(F=>F.filter(V=>V.from!==I&&V.to!==I)),p===I&&g(null),v?.id===I&&x(null)},ve=I=>{const F=C.current[I.id];return F?F.offsetHeight:I.h},Be=y.useCallback(I=>{const F=ve(I);return{x:I.x+I.w,y:I.y+F/2}},[]),me=y.useCallback(I=>{const F=ve(I);return{x:I.x,y:I.y+F/2}},[]),Fe=y.useCallback(I=>{const F=ve(I);return{x:I.x+I.w/2,y:I.y+F}},[]),ae=y.useCallback(I=>({x:I.x+I.w/2,y:I.y}),[]),Pe=y.useCallback((I,F)=>{const V=F.x-I.x,he=F.y-I.y,xe=8;if(Math.abs(V)<50&&Math.abs(he)>80){const ie=Fe(I),ke=ae(F);return`M ${ie.x} ${ie.y} L ${ie.x} ${(ie.y+ke.y)/2} L ${ke.x} ${(ie.y+ke.y)/2} L ${ke.x} ${ke.y}`}const le=Be(I),oe=me(F),ze=oe.x-le.x;if(ze>30){const ie=le.x+ze/2,ke=oe.y-le.y;if(Math.abs(ke)<2)return`M ${le.x} ${le.y} L ${oe.x} ${oe.y}`;const Ee=ke>0?1:-1,Me=Math.abs(ke),De=Math.min(xe,Me/2,Math.abs(ze)/4);return`M ${le.x} ${le.y} L ${ie-De} ${le.y} Q ${ie} ${le.y} ${ie} ${le.y+Ee*De} L ${ie} ${oe.y-Ee*De} Q ${ie} ${oe.y} ${ie+De} ${oe.y} L ${oe.x} ${oe.y}`}else{const ke={x:le.x+40,y:le.y},Ee={x:oe.x-40,y:oe.y},Me=Math.max(le.y,oe.y)+60;return`M ${le.x} ${le.y} L ${ke.x} ${le.y} Q ${ke.x+xe} ${le.y} ${ke.x+xe} ${le.y+xe} L ${ke.x+xe} ${Me-xe} Q ${ke.x+xe} ${Me} ${ke.x} ${Me} L ${Ee.x} ${Me} Q ${Ee.x-xe} ${Me} ${Ee.x-xe} ${Me-xe} L ${Ee.x-xe} ${oe.y+xe} Q ${Ee.x-xe} ${oe.y} ${Ee.x} ${oe.y} L ${oe.x} ${oe.y}`}},[Be,me,Fe,ae]),Ce=y.useCallback((I,F)=>{if(!I||!F)return"";const V=Be(I),he=(V.x+F.x)/2,xe=8,le=F.y-V.y;if(Math.abs(le)<2)return`M ${V.x} ${V.y} L ${F.x} ${F.y}`;const oe=le>0?1:-1,ze=Math.min(xe,Math.abs(le)/2,Math.abs(F.x-V.x)/4);return`M ${V.x} ${V.y} L ${he-ze} ${V.y} Q ${he} ${V.y} ${he} ${V.y+oe*ze} L ${he} ${F.y-oe*ze} Q ${he} ${F.y} ${he+ze} ${F.y} L ${F.x} ${F.y}`},[Be]),Ge=y.useCallback(I=>{(I.target===T.current||I.target.dataset.grid==="true")&&(I.preventDefault(),g(null),ye({startX:I.clientX,startY:I.clientY,panX:M.x,panY:M.y}))},[M]),Le=y.useCallback((I,F)=>{if(w)return;I.preventDefault(),I.stopPropagation(),A.current=!1;const V=Y(I.clientX,I.clientY);u({id:F.id,offsetX:V.x-F.x,offsetY:V.y-F.y}),g(F.id)},[w,Y]),B=y.useCallback(I=>{if(ne){const F=I.clientX-ne.startX,V=I.clientY-ne.startY;H({x:ne.panX+F,y:ne.panY+V});return}if(w){const F=Y(I.clientX,I.clientY);b(V=>({...V,mouseX:F.x,mouseY:F.y}));return}if(m){A.current=!0;const F=Y(I.clientX,I.clientY);o(V=>V.map(he=>he.id===m.id?{...he,x:F.x-m.offsetX,y:F.y-m.offsetY}:he))}},[ne,w,m,Y]),X=y.useCallback(()=>{u(null),b(null),ye(null)},[]),G=y.useCallback((I,F)=>{I.stopPropagation(),A.current||x(F)},[]),k=y.useRef(null),L=y.useCallback(I=>{if(I.touches.length===1){const F=I.touches[0];k.current={x:F.clientX,y:F.clientY,panX:M.x,panY:M.y}}},[M]),de=y.useCallback(I=>{if(I.touches.length===1&&k.current&&!m){I.preventDefault();const F=I.touches[0],V=F.clientX-k.current.x,he=F.clientY-k.current.y;H({x:k.current.panX+V,y:k.current.panY+he})}},[m]),fe=y.useCallback(()=>{k.current=null,u(null),b(null)},[]),we=y.useCallback(I=>{I.preventDefault();const F=T.current;if(!F)return;const V=F.getBoundingClientRect(),he=I.clientX-V.left,xe=I.clientY-V.top,le=I.deltaY<0?1.1:.9,oe=Math.max(.2,Math.min(3,q*le)),ze=he-(he-M.x)*(oe/q),ie=xe-(xe-M.y)*(oe/q);W(oe),H({x:ze,y:ie})},[q,M]),je=y.useCallback((I,F)=>{I.stopPropagation(),I.preventDefault();const V=Y(I.clientX,I.clientY);b({fromId:F,mouseX:V.x,mouseY:V.y})},[Y]),Ie=y.useCallback((I,F)=>{I.stopPropagation(),w&&w.fromId!==F&&(c.some(he=>he.from===w.fromId&&he.to===F)||h(he=>[...he,{from:w.fromId,to:F}]),b(null))},[w,c]),Ne=!!w,Se=12,Je=y.useCallback(()=>{const I=T.current;if(!I||i.length===0)return;const F=Math.min(...i.map(De=>De.x)),V=Math.min(...i.map(De=>De.y)),he=Math.max(...i.map(De=>De.x+De.w)),xe=Math.max(...i.map(De=>De.y+(ve(De)||De.h))),le=he-F+80,oe=xe-V+80,ze=I.clientWidth/le,ie=I.clientHeight/oe,ke=Math.max(.3,Math.min(1.2,Math.min(ze,ie))),Ee=(I.clientWidth-le*ke)/2-F*ke+40*ke,Me=(I.clientHeight-oe*ke)/2-V*ke+40*ke;W(ke),H({x:Ee,y:Me})},[i]);return n.jsxs("div",{className:"flex flex-col h-full min-h-0 flex-1",children:[n.jsxs("div",{className:"flex items-center gap-1 sm:gap-1.5 px-2 sm:px-3 py-2 border-b border-slate-800 bg-slate-900/40 overflow-x-auto shrink-0",children:[n.jsx("span",{className:"text-[10px] sm:text-xs text-slate-500 font-medium mr-1 hidden sm:inline",children:"Canvas"}),n.jsx("div",{className:"w-px h-4 bg-slate-800 mx-0.5 sm:mx-1 hidden sm:block"}),Sl.map(I=>{const F=I.icon,V=Un[I.color];return n.jsxs("button",{onClick:()=>Re(I.id),className:"flex items-center gap-1 px-1.5 sm:px-2 py-1 text-[10px] sm:text-xs rounded bg-slate-800 hover:bg-slate-700 text-slate-400 hover:text-white border border-slate-700 transition-colors active:scale-95 shrink-0",title:`Add ${I.label} block`,children:[n.jsx(Vo,{className:"w-2.5 sm:w-3 h-2.5 sm:h-3"}),n.jsx(F,{className:`w-2.5 sm:w-3 h-2.5 sm:h-3 ${V.text}`}),n.jsx("span",{className:"hidden md:inline",children:I.label})]},I.id)}),n.jsxs("div",{className:"ml-auto flex items-center gap-1 sm:gap-2 shrink-0",children:[n.jsx("button",{onClick:()=>W(I=>Math.min(3,I*1.2)),className:"p-1 text-slate-500 hover:text-white transition-colors",title:"Zoom in",children:n.jsx(Nx,{className:"w-3.5 h-3.5"})}),n.jsx("button",{onClick:()=>W(I=>Math.max(.2,I*.8)),className:"p-1 text-slate-500 hover:text-white transition-colors",title:"Zoom out",children:n.jsx(Cx,{className:"w-3.5 h-3.5"})}),n.jsx("button",{onClick:Je,className:"p-1 text-slate-500 hover:text-white transition-colors",title:"Fit to view",children:n.jsx(Wf,{className:"w-3.5 h-3.5"})}),n.jsx("button",{onClick:()=>{o(sd),h(ld),g(null),x(null),b(null),H({x:0,y:0}),W(1),R.current=!1},className:"p-1 text-slate-500 hover:text-white transition-colors",title:"Reset",children:n.jsx(sx,{className:"w-3.5 h-3.5"})}),n.jsxs("span",{className:"text-[9px] sm:text-[10px] text-slate-600 ml-1 hidden sm:inline",children:[i.length,"b · ",c.length,"l · ",Math.round(q*100),"%"]})]})]}),n.jsxs("div",{ref:T,className:"flex-1 relative overflow-hidden",onMouseDown:Ge,onMouseMove:B,onMouseUp:X,onMouseLeave:X,onWheel:we,onTouchStart:L,onTouchMove:de,onTouchEnd:fe,style:{cursor:ne?"grabbing":w?"crosshair":m?"grabbing":"grab",touchAction:"none",background:"#0d1117"},children:[n.jsx("div",{"data-grid":"true",className:"absolute",style:{left:0,top:0,right:0,bottom:0,backgroundImage:"radial-gradient(circle, rgba(255,255,255,0.06) 1px, transparent 1px)",backgroundSize:`${20*q}px ${20*q}px`,backgroundPosition:`${M.x%(20*q)}px ${M.y%(20*q)}px`}}),n.jsxs("div",{style:{transform:`translate(${M.x}px, ${M.y}px) scale(${q})`,transformOrigin:"0 0",position:"absolute",left:0,top:0,width:1,height:1},children:[n.jsxs("svg",{className:"absolute pointer-events-none",style:{overflow:"visible",zIndex:1,left:0,top:0,width:1,height:1},children:[n.jsx("defs",{children:n.jsx("marker",{id:"conn-arrow",markerWidth:"10",markerHeight:"10",refX:"9",refY:"5",orient:"auto",children:n.jsx("path",{d:"M 0 1 L 9 5 L 0 9 Z",fill:"rgba(255,255,255,0.3)"})})}),c.map((I,F)=>{const V=i.find(oe=>oe.id===I.from),he=i.find(oe=>oe.id===I.to);if(!V||!he)return null;const xe=Pe(V,he),le=(Un[V.color]||Un.blue).line;return n.jsx("path",{d:xe,stroke:le,strokeWidth:"2",fill:"none",opacity:"0.5",markerEnd:"url(#conn-arrow)"},F)}),w&&(()=>{const I=i.find(F=>F.id===w.fromId);return I?n.jsx("path",{d:Ce(I,{x:w.mouseX,y:w.mouseY}),stroke:"rgba(255,255,255,0.3)",strokeWidth:"2",strokeDasharray:"6 3",fill:"none",opacity:"0.6"}):null})()]}),i.map((I,F)=>{const V=Un[I.color]||Un.blue,xe=Sl.find(ie=>ie.id===I.type)?.icon||Go,le=p===I.id,oe=m?.id===I.id,ze=le||Ne;return n.jsxs("div",{ref:ie=>{ie&&(C.current[I.id]=ie)},className:"group block-enter",style:{position:"absolute",left:I.x,top:I.y,width:I.w,zIndex:oe?50:le?10:3,animationDelay:`${F*60}ms`},children:[n.jsx("div",{onMouseUp:ie=>Ie(ie,I.id),className:`absolute top-1/2 -translate-y-1/2 rounded-full border-2 transition-all duration-150 ${Ne&&w.fromId!==I.id?"opacity-100 scale-110 bg-blue-500/20 border-blue-400":ze?"opacity-100 scale-100 border-slate-500 bg-slate-800":"opacity-0 group-hover:opacity-100 scale-75 group-hover:scale-100 border-slate-500 bg-slate-800"}`,style:{left:-7,width:Se,height:Se,cursor:Ne?"pointer":"default",zIndex:60}}),n.jsx("div",{onMouseDown:ie=>je(ie,I.id),className:`absolute top-1/2 -translate-y-1/2 rounded-full border-2 transition-all duration-150 ${ze?"opacity-100 scale-100 border-slate-500 bg-slate-800":"opacity-0 group-hover:opacity-100 scale-75 group-hover:scale-100 border-slate-500 bg-slate-800"}`,style:{right:-7,width:Se,height:Se,cursor:"crosshair",zIndex:60}}),n.jsxs("div",{onMouseDown:ie=>Le(ie,I),onClick:ie=>G(ie,I),className:`w-full rounded-lg border-l-[3px] border transition-all duration-200 ${oe?"scale-[1.02]":""}`,style:{cursor:oe?"grabbing":"pointer",background:V.solid,borderLeftColor:V.line,borderTopColor:le?`${V.line}60`:`${V.line}25`,borderRightColor:le?`${V.line}60`:`${V.line}25`,borderBottomColor:le?`${V.line}60`:`${V.line}25`,boxShadow:oe?`0 8px 25px rgba(0,0,0,0.5), 0 0 20px ${V.glow}`:le?`0 4px 12px rgba(0,0,0,0.4), 0 0 15px ${V.glow}`:"0 2px 8px rgba(0,0,0,0.4)"},children:[n.jsxs("div",{className:"flex items-center gap-1.5 px-3 py-2 border-b rounded-t-lg",style:{borderColor:`${V.line}15`},children:[n.jsx(xe,{className:`w-3.5 h-3.5 ${V.text}`}),n.jsx("span",{className:"text-xs font-semibold text-slate-200",children:I.type}),I.model&&n.jsxs("span",{className:"ml-auto text-[10px] px-1.5 py-0.5 rounded text-slate-400 border flex items-center gap-1",style:{background:`${V.line}10`,borderColor:`${V.line}20`},children:[n.jsx(kd,{className:"w-2.5 h-2.5"})," ",I.model]}),le&&n.jsx("button",{onClick:ie=>{ie.stopPropagation(),ue(I.id)},className:"ml-auto p-0.5 rounded hover:bg-red-500/10 text-slate-500 hover:text-red-400 transition-colors",title:"Remove block",children:n.jsx(px,{className:"w-3 h-3"})})]}),I.label&&n.jsx("div",{className:"px-3 pt-1.5 text-[11px] font-medium text-slate-300",children:I.label}),n.jsx("div",{className:"px-3 py-2 text-[11px] text-slate-500 whitespace-pre-wrap leading-relaxed",children:I.content}),n.jsx("div",{className:"px-3 pb-1.5 text-[9px] text-slate-600 opacity-0 group-hover:opacity-100 transition-opacity",children:"Click to view details"})]})]},I.id)})]}),v&&n.jsx(Vx,{block:v,onClose:()=>x(null)}),i.length===0&&n.jsx("div",{className:"absolute inset-0 flex items-center justify-center",style:{zIndex:2},children:n.jsxs("div",{className:"text-center",children:[n.jsx(hs,{className:"w-10 h-10 text-slate-600 mx-auto mb-2"}),n.jsx("p",{className:"text-slate-500 text-sm",children:"Click a tool above to add blocks"}),n.jsx("p",{className:"text-slate-600 text-xs mt-1",children:"Scroll to zoom · Drag to pan"})]})})]}),n.jsxs("div",{className:"flex items-center justify-between px-2 sm:px-3 py-1 sm:py-1.5 border-t border-slate-800 bg-slate-900/60 text-[9px] sm:text-[10px] text-slate-600 shrink-0",children:[n.jsx("span",{className:"hidden sm:inline",children:"Scroll to zoom · Drag to pan · Click blocks for details"}),n.jsx("span",{className:"sm:hidden",children:"Pinch to zoom · Tap blocks for details"}),n.jsxs("span",{children:[i.length," blocks · ",c.length," links · ",Math.round(q*100),"%"]})]})]})}const Gx={chat:Id,shell:Md,files:_d,git:Rd,canvas:Ad};function Ld({onBack:i}){const[o,c]=y.useState("chat"),h=Gx[o];return n.jsxs("div",{className:"h-screen bg-[#0a0f1e] text-slate-200 flex flex-col overflow-hidden",children:[n.jsxs("div",{className:"flex items-center justify-between px-3 sm:px-4 py-2 border-b border-slate-800 bg-slate-900/80 shrink-0",children:[n.jsxs("button",{onClick:i,className:"flex items-center gap-1 sm:gap-1.5 text-xs sm:text-sm text-slate-400 hover:text-white transition-colors active:scale-95",children:[n.jsx(bd,{className:"w-3.5 sm:w-4 h-3.5 sm:h-4"})," ",n.jsx("span",{className:"hidden sm:inline",children:"Back"})]}),n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx("span",{className:"text-xs sm:text-sm font-semibold text-white",children:"Upfyn-Code"}),n.jsx("span",{className:"text-[9px] sm:text-[10px] px-1.5 py-0.5 rounded bg-blue-500/20 text-blue-400 font-medium",children:"DEMO"})]}),n.jsx("button",{onClick:()=>window.open("https://www.npmjs.com/package/upfyn-code","_blank"),className:"px-2.5 sm:px-3 py-1.5 bg-emerald-600 hover:bg-emerald-500 text-white text-xs sm:text-sm font-medium rounded-lg transition-colors active:scale-95 font-mono",children:"npm i -g upfyn-code"})]}),n.jsxs("div",{className:"flex items-center gap-2 px-3 sm:px-4 py-1.5 bg-amber-500/10 border-b border-amber-500/20 shrink-0",children:[n.jsx(fx,{className:"w-3 sm:w-3.5 h-3 sm:h-3.5 text-amber-400 shrink-0"}),n.jsxs("p",{className:"text-[10px] sm:text-[11px] text-amber-300/80",children:[n.jsx("span",{className:"font-semibold text-amber-300",children:"Beta"})," — Demo preview. Install ",n.jsx("code",{className:"bg-amber-500/20 px-1 rounded text-amber-200 font-mono",children:"upfyn-code"})," for the full experience."]})]}),n.jsx("div",{className:"flex border-b border-slate-800 bg-slate-900/50 px-1 sm:px-2 shrink-0 overflow-x-auto",children:Ux.map(({id:p,label:g,icon:v})=>n.jsxs("button",{onClick:()=>c(p),className:`flex items-center gap-1 sm:gap-1.5 px-2.5 sm:px-4 py-2 sm:py-2.5 text-xs sm:text-sm transition-colors border-b-2 whitespace-nowrap ${o===p?"text-blue-400 border-blue-400":"text-slate-500 border-transparent hover:text-slate-300"}`,children:[n.jsx(v,{className:"w-3 sm:w-3.5 h-3 sm:h-3.5"})," ",g]},p))}),n.jsx("div",{className:"flex-1 overflow-hidden min-h-0",children:n.jsx(h,{})})]})}function qx({onOpenAuth:i,returningName:o,onSessionResume:c}){const[h,p]=y.useState(!1);return h?n.jsx(Ld,{onBack:()=>p(!1)}):n.jsxs("div",{className:"min-h-screen bg-[#0a0f1e] text-slate-200",children:[n.jsx(Bn,{onOpenAuth:i}),n.jsx(Ex,{onOpenAuth:i,returningName:o,onSessionResume:c,onTryDemo:()=>p(!0)}),n.jsx(Lx,{}),n.jsx(Dx,{}),n.jsx($x,{}),n.jsx(Hn,{})]})}const Yx="",Qx={5:{bright:"#34d399",mid:"#10b981",dim:"#059669",glow:"rgba(16,185,129,0.08)"}},Kx="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789{}[]()<>=!+-*/&|;:.,@#$%^~?_import const function async await return if else for while class new export default require module let var try catch throw switch case break continue typeof instanceof void delete null undefined true false";function ad(){const i=y.useRef(null),o=y.useRef(null),c=Qx[5];return y.useEffect(()=>{const h=i.current;if(!h)return;const p=h.getContext("2d");let g,v,x,m,u,w,b,T;const C=14,R=C+4,A=C*.7,M=18,H=()=>{const Y=Math.random();return Y<.15?.08+Math.random()*.12:Y<.35?.2+Math.random()*.3:Y<.65?.5+Math.random()*.4:Y<.85?.9+Math.random()*.4:1.3+Math.random()*.3},q=Kx.split(""),W=()=>q[Math.floor(Math.random()*q.length)],ne=()=>{g=h.width=window.innerWidth,v=h.height=window.innerHeight,x=Math.floor(g/A),m=new Float32Array(x),u=new Float32Array(x),w=new Float32Array(x),b=new Float32Array(x),T=[];for(let Y=0;Y<x;Y++){m[Y]=Math.random()*-80,u[Y]=H(),w[Y]=u[Y],b[Y]=C-1+Math.floor(Math.random()*3),T[Y]=[];for(let Re=0;Re<M;Re++)T[Y][Re]=W()}};ne(),window.addEventListener("resize",ne);const ye=()=>{p.fillStyle="rgba(10, 15, 30, 0.05)",p.fillRect(0,0,g,v);for(let Y=0;Y<x;Y++){const Re=Y*A,ue=m[Y]*R,ve=b[Y];Math.random()<.003&&(w[Y]=H()),u[Y]+=(w[Y]-u[Y])*.02,Math.random()<8e-4&&(u[Y]=Math.random()<.5?1.4+Math.random()*.4:.06+Math.random()*.1,w[Y]=H());const Be=W();p.font=`${ve}px "Fira Code","Cascadia Code","JetBrains Mono",monospace`,p.shadowBlur=0,p.fillStyle="#ffffff",p.globalAlpha=.95,p.fillText(Be,Re,ue);for(let me=1;me<M;me++){const Fe=ue-me*R;if(Fe<-R)break;Math.random()<.02&&(T[Y][me]=W());const ae=me/M,Pe=Math.max(0,.7-ae*.65);p.globalAlpha=Pe,p.fillStyle=me<=2?c.bright:me<=6?c.mid:c.dim,p.fillText(T[Y][me],Re,Fe)}if(p.globalAlpha=1,m[Y]+=u[Y],ue>v+M*R){m[Y]=Math.random()*-30-5,u[Y]=H(),w[Y]=H(),b[Y]=C-1+Math.floor(Math.random()*3);for(let me=0;me<M;me++)T[Y][me]=W()}}o.current=requestAnimationFrame(ye)};return o.current=requestAnimationFrame(ye),()=>{cancelAnimationFrame(o.current),window.removeEventListener("resize",ne)}},[]),n.jsxs("div",{className:"fixed inset-0 pointer-events-none z-0 fade-in",children:[n.jsx("canvas",{ref:i,className:"absolute inset-0 w-full h-full"}),n.jsx("div",{className:"float-orb absolute rounded-full blur-3xl opacity-40",style:{top:"10%",left:"8%",width:350,height:350,background:c.glow}}),n.jsx("div",{className:"float-orb-2 absolute rounded-full blur-3xl opacity-30",style:{top:"50%",right:"5%",width:300,height:300,background:c.glow}}),n.jsx("div",{className:"absolute inset-0",style:{background:"radial-gradient(ellipse at center, rgba(10,15,30,0.5) 0%, rgba(10,15,30,0.15) 60%, transparent 100%)"}})]})}function Xx(){const i=y.useRef(null),o=y.useRef(null);return y.useEffect(()=>{const c=i.current;if(!c)return;const h=c.getContext("2d");let p,g,v;const x=()=>{p=c.width=window.innerWidth,g=c.height=window.innerHeight;const u=Math.floor(p*g/18e3)+20;v=Array.from({length:u},()=>{const w=Math.random();let b;return w<.5?b=2+Math.random()*4:w<.82?b=6+Math.random()*12:b=16+Math.random()*24,{x:Math.random()*p,y:Math.random()*g,r:b,dx:(Math.random()-.5)*.4,dy:-(.15+Math.random()*.5),alpha:b>14?.06+Math.random()*.06:b>5?.12+Math.random()*.15:.25+Math.random()*.4,pulse:Math.random()*Math.PI*2}})};x(),window.addEventListener("resize",x);const m=()=>{h.clearRect(0,0,p,g);for(const u of v){u.x+=u.dx,u.y+=u.dy,u.pulse+=.01,u.y+u.r<0&&(u.y=g+u.r,u.x=Math.random()*p),u.x<-u.r&&(u.x=p+u.r),u.x>p+u.r&&(u.x=-u.r);const w=u.alpha*(.7+.3*Math.sin(u.pulse));if(u.r>8){const b=h.createRadialGradient(u.x,u.y,u.r*.3,u.x,u.y,u.r*1.8);b.addColorStop(0,`rgba(96, 165, 250, ${w*.5})`),b.addColorStop(1,"rgba(96, 165, 250, 0)"),h.beginPath(),h.arc(u.x,u.y,u.r*1.8,0,Math.PI*2),h.fillStyle=b,h.fill()}h.beginPath(),h.arc(u.x,u.y,u.r,0,Math.PI*2),h.fillStyle=`rgba(96, 165, 250, ${w})`,h.fill(),u.r>5&&(h.beginPath(),h.arc(u.x-u.r*.25,u.y-u.r*.25,u.r*.3,0,Math.PI*2),h.fillStyle=`rgba(200, 220, 255, ${w*.4})`,h.fill())}for(let u=0;u<v.length;u++)if(!(v[u].r>14))for(let w=u+1;w<v.length;w++){if(v[w].r>14)continue;const b=v[u].x-v[w].x,T=v[u].y-v[w].y,C=Math.sqrt(b*b+T*T);C<130&&(h.beginPath(),h.moveTo(v[u].x,v[u].y),h.lineTo(v[w].x,v[w].y),h.strokeStyle=`rgba(96, 165, 250, ${.15*(1-C/130)})`,h.lineWidth=.8,h.stroke())}o.current=requestAnimationFrame(m)};return o.current=requestAnimationFrame(m),()=>{cancelAnimationFrame(o.current),window.removeEventListener("resize",x)}},[]),n.jsxs("div",{className:"fixed inset-0 pointer-events-none z-0 fade-in",children:[n.jsx("canvas",{ref:i,className:"absolute inset-0 w-full h-full"}),n.jsx("div",{className:"float-orb absolute rounded-full blur-3xl opacity-60",style:{top:"15%",left:"10%",width:350,height:350,background:"rgba(59,130,246,0.12)"}}),n.jsx("div",{className:"float-orb-2 absolute rounded-full blur-3xl opacity-50",style:{top:"60%",right:"10%",width:300,height:300,background:"rgba(59,130,246,0.10)"}})]})}function Jx(){const i=y.useRef(null),o=y.useRef(null);return y.useEffect(()=>{const c=i.current;if(!c)return;const h=c.getContext("2d");let p,g,v;const x=()=>{p=c.width=window.innerWidth,g=c.height=window.innerHeight,v=Array.from({length:12},()=>({x:Math.random()*p,y:Math.random()*g,size:15+Math.random()*25,dx:(Math.random()-.5)*.2,dy:(Math.random()-.5)*.2,alpha:.08+Math.random()*.12,rotation:Math.random()*Math.PI,rotSpeed:(Math.random()-.5)*.003}))};x(),window.addEventListener("resize",x);const m=()=>{h.clearRect(0,0,p,g);for(const u of v)u.x+=u.dx,u.y+=u.dy,u.rotation+=u.rotSpeed,u.x<-50&&(u.x=p+50),u.x>p+50&&(u.x=-50),u.y<-50&&(u.y=g+50),u.y>g+50&&(u.y=-50),h.save(),h.translate(u.x,u.y),h.rotate(u.rotation),h.strokeStyle=`rgba(148, 163, 184, ${u.alpha})`,h.lineWidth=1.5,h.beginPath(),h.moveTo(-u.size,0),h.lineTo(u.size,0),h.moveTo(0,-u.size),h.lineTo(0,u.size),h.stroke(),h.restore();o.current=requestAnimationFrame(m)};return o.current=requestAnimationFrame(m),()=>{cancelAnimationFrame(o.current),window.removeEventListener("resize",x)}},[]),n.jsxs("div",{className:"fixed inset-0 pointer-events-none z-0 fade-in",children:[n.jsx("canvas",{ref:i,className:"absolute inset-0 w-full h-full"}),n.jsx("div",{className:"absolute inset-0 opacity-[0.12]",style:{backgroundImage:"radial-gradient(circle, #94a3b8 1px, transparent 1px)",backgroundSize:"30px 30px"}}),n.jsx("div",{className:"absolute inset-0",style:{background:"radial-gradient(ellipse at 30% 20%, rgba(148,163,184,0.10) 0%, transparent 60%), radial-gradient(ellipse at 70% 80%, rgba(148,163,184,0.08) 0%, transparent 60%)"}})]})}function Zx(){const i=y.useRef(null),o=y.useRef(null);return y.useEffect(()=>{const c=i.current;if(!c)return;const h=c.getContext("2d");let p,g,v=0;const x=()=>{p=c.width=window.innerWidth,g=c.height=window.innerHeight};x(),window.addEventListener("resize",x);const m=()=>{h.clearRect(0,0,p,g),v+=.004;for(let u=0;u<4;u++){const w=u*.9,b=.12-u*.025;h.beginPath(),h.moveTo(0,g);for(let C=0;C<=p;C+=3){const R=g*(.35+u*.1)+Math.sin(C*.003+v+w)*90+Math.sin(C*.007+v*1.3+w)*50+Math.cos(C*.002+v*.7+w)*70;h.lineTo(C,R)}h.lineTo(p,g),h.closePath();const T=h.createLinearGradient(0,g*.2,p,g*.8);T.addColorStop(0,`rgba(168, 85, 247, ${b})`),T.addColorStop(.5,`rgba(139, 92, 246, ${b*1.3})`),T.addColorStop(1,`rgba(192, 132, 252, ${b})`),h.fillStyle=T,h.fill()}o.current=requestAnimationFrame(m)};return o.current=requestAnimationFrame(m),()=>{cancelAnimationFrame(o.current),window.removeEventListener("resize",x)}},[]),n.jsxs("div",{className:"fixed inset-0 pointer-events-none z-0 fade-in",children:[n.jsx("canvas",{ref:i,className:"absolute inset-0 w-full h-full"}),n.jsx("div",{className:"float-orb absolute rounded-full blur-3xl opacity-70",style:{top:"20%",right:"15%",width:350,height:350,background:"rgba(139,92,246,0.12)"}}),n.jsx("div",{className:"float-orb-3 absolute rounded-full blur-3xl opacity-60",style:{bottom:"20%",left:"10%",width:300,height:300,background:"rgba(168,85,247,0.10)"}})]})}function e0(){const i=y.useRef(null),o=y.useRef(null);return y.useEffect(()=>{const c=i.current;if(!c)return;const h=c.getContext("2d");let p,g,v=0;const x=()=>{p=c.width=window.innerWidth,g=c.height=window.innerHeight};x(),window.addEventListener("resize",x);const m=()=>{h.clearRect(0,0,p,g),v+=.003;for(let u=0;u<5;u++){const w=g*(.15+u*.16);h.beginPath();for(let C=0;C<=p;C+=3){const R=Math.sin(C*.004+v*(1+u*.3))*60,A=Math.cos(C*.002+v*.8+u)*40,M=Math.sin(C*.001+v*.5+u*2)*25,H=w+R+A+M;C===0?h.moveTo(C,H):h.lineTo(C,H)}h.lineWidth=50+u*15;const b=.08-u*.012,T=240+u*20;h.strokeStyle=`hsla(${T}, 80%, 65%, ${b})`,h.lineCap="round",h.stroke(),h.lineWidth=3+u,h.strokeStyle=`hsla(${T}, 85%, 75%, ${b*2.5})`,h.stroke()}o.current=requestAnimationFrame(m)};return o.current=requestAnimationFrame(m),()=>{cancelAnimationFrame(o.current),window.removeEventListener("resize",x)}},[]),n.jsxs("div",{className:"fixed inset-0 pointer-events-none z-0 fade-in",children:[n.jsx("canvas",{ref:i,className:"absolute inset-0 w-full h-full"}),n.jsx("div",{className:"float-orb absolute rounded-full blur-3xl opacity-60",style:{top:"10%",left:"20%",width:400,height:400,background:"rgba(139,92,246,0.10)"}}),n.jsx("div",{className:"float-orb-2 absolute rounded-full blur-3xl opacity-50",style:{top:"55%",right:"15%",width:350,height:350,background:"rgba(124,58,237,0.08)"}})]})}function t0(){const i=y.useRef(null),o=y.useRef(null);return y.useEffect(()=>{const c=i.current;if(!c)return;const h=c.getContext("2d");let p,g;const v=()=>{p=c.width=window.innerWidth,g=c.height=window.innerHeight};v(),window.addEventListener("resize",v);const x=Math.min(80,Math.floor(p*g/18e3)),m=[];for(let T=0;T<x;T++)m.push({x:Math.random()*p,y:Math.random()*g,vx:(Math.random()-.5)*.3,vy:(Math.random()-.5)*.3,r:Math.random()*1.5+.5,color:T%5===0?"rgba(139,92,246,":T%3===0?"rgba(59,130,246,":"rgba(148,163,184,"});const u=140,w=u*u,b=()=>{h.clearRect(0,0,p,g);for(const T of m)T.x+=T.vx,T.y+=T.vy,T.x<-10&&(T.x=p+10),T.x>p+10&&(T.x=-10),T.y<-10&&(T.y=g+10),T.y>g+10&&(T.y=-10);for(let T=0;T<m.length;T++)for(let C=T+1;C<m.length;C++){const R=m[T].x-m[C].x,A=m[T].y-m[C].y,M=R*R+A*A;if(M<w){const H=(1-M/w)*.12;h.strokeStyle=`rgba(148,163,184,${H})`,h.lineWidth=.5,h.beginPath(),h.moveTo(m[T].x,m[T].y),h.lineTo(m[C].x,m[C].y),h.stroke()}}for(const T of m)h.beginPath(),h.arc(T.x,T.y,T.r,0,Math.PI*2),h.fillStyle=T.color+"0.35)",h.fill();o.current=requestAnimationFrame(b)};return b(),()=>{window.removeEventListener("resize",v),o.current&&cancelAnimationFrame(o.current)}},[]),n.jsx("canvas",{ref:i,className:"fixed inset-0 z-0 pointer-events-none",style:{opacity:.7}})}function n0({variant:i}){switch(i){case 1:return n.jsx(Xx,{});case 2:return n.jsx(Jx,{});case 3:return n.jsx(Zx,{});case 4:return n.jsx(e0,{});case 5:return n.jsx(ad,{});default:return n.jsx(ad,{})}}const r0=[{id:1,label:"Glass",color:"bg-blue-500"},{id:2,label:"Minimal",color:"bg-white"},{id:3,label:"Card",color:"bg-purple-500"},{id:4,label:"Pill",color:"bg-violet-500"},{id:5,label:"Terminal",color:"bg-emerald-500"}];function s0({onLogin:i,onRegister:o,needsSetup:c,onSessionResume:h}){const p=Zt(),g=Wn(),v=p.state?.mode||null,[x,m]=y.useState(v),[u,w]=y.useState(""),[b,T]=y.useState(""),[C,R]=y.useState(""),[A,M]=y.useState(""),[H,q]=y.useState(""),[W,ne]=y.useState(""),[ye,Y]=y.useState(""),[Re,ue]=y.useState(""),[ve,Be]=y.useState(!1),[me,Fe]=y.useState(!1),[ae,Pe]=y.useState(!1),[Ce,Ge]=y.useState(!1),[Le,B]=y.useState(null),[X,G]=y.useState(!1),[k,L]=y.useState(null),[de,fe]=y.useState({x:"50%",y:"50%"}),[we,je]=y.useState(5),[Ie,Ne]=y.useState(!1),Se=y.useRef(null),Je=y.useRef(null),[I,F]=y.useState(!1);y.useEffect(()=>{const O=localStorage.getItem("upfynai-user-name");O&&B(O);const _=localStorage.getItem("upfynai-form-variant");_&&je(parseInt(_,10)),fetch(`${Yx}/api/auth/user`,{credentials:"include"}).then(ge=>ge.ok?ge.json():null).then(ge=>{const Ut=ge?.user||ge;if(Ut?.id){const wr=Ut.first_name||Ut.firstName||Ut.username||"";wr&&(B(wr),localStorage.setItem("upfynai-user-name",wr)),F(!0),h&&h()}}).catch(()=>{})},[]);const V=O=>{je(O),localStorage.setItem("upfynai-form-variant",O.toString()),fetch("/api/auth/preferences",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({key:"form_variant",value:String(O)}),credentials:"include"}).catch(()=>{})};if(y.useEffect(()=>{fetch("/api/auth/preferences",{credentials:"include"}).then(O=>O.ok?O.json():null).then(O=>{if(O?.preferences?.form_variant){const _=parseInt(O.preferences.form_variant,10);_>=1&&_<=5&&(je(_),localStorage.setItem("upfynai-form-variant",String(_)))}}).catch(()=>{})},[]),x==="demo")return n.jsx(Ld,{onBack:()=>m(null)});const he=()=>{fetch("/api/auth/preferences",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({key:"form_variant",value:String(we)}),credentials:"include"}).catch(()=>{})},xe=async O=>{if(O.preventDefault(),ue(""),!A||!u){ue("Email and password are required");return}Be(!0);try{const _=await i(A,u,b,C,H);_.success?he():ue(_.error)}catch{ue("Network error. Please check your connection.")}Be(!1)},le=async O=>{if(O.preventDefault(),ue(""),!b.trim()||!A.trim()||!W){ue("First name, email and password are required");return}if(W!==ye){ue("Passwords do not match");return}if(W.length<6){ue("Password must be at least 6 characters");return}Be(!0);try{const _=await o(b,C,W,A,H);_.success?he():ue(_.error)}catch{ue("Network error. Please check your connection.")}Be(!1)},[oe,ze]=y.useState(!1),ie=async(O,_)=>{if(ue(""),_?.current){const ge=_.current.getBoundingClientRect();fe({x:`${ge.left+ge.width/2}px`,y:`${ge.top+ge.height/2}px`})}if(O==="login"&&Le&&h){L(O),G(!0),ze(!0);try{if(await h())return}catch{}ze(!1),F(!1)}L(O),G(!0),setTimeout(()=>{m(O),G(!1),L(null)},650)},ke=()=>{G(!0),setTimeout(()=>{m(null),ue(""),G(!1)},400)},Ee=x==="login"||x==="signup",Me=({show:O,onToggle:_})=>n.jsx("button",{type:"button",onClick:_,className:"absolute right-3 top-1/2 -translate-y-1/2 text-slate-500 hover:text-slate-300 transition-colors p-1",children:O?n.jsx(vf,{size:16}):n.jsx(gf,{size:16})}),De=()=>Re?n.jsx("div",{className:"bg-red-500/10 border border-red-500/30 text-red-400 text-sm px-3 py-2 rounded-lg mb-4 slide-up",children:Re}):null,ht=()=>{const O="w-full px-4 py-3 bg-white/5 border border-white/10 rounded-xl text-white placeholder:text-slate-600 focus:outline-none focus:border-blue-500/50 focus:bg-white/[0.07] transition-all text-sm";return n.jsxs("div",{className:"glass border border-white/10 rounded-3xl p-6 sm:p-8 shadow-2xl shadow-black/40 max-w-sm w-full pulse-glow",children:[n.jsx("h2",{className:"text-xl sm:text-2xl font-bold text-white mb-1",children:x==="signup"?"Create Account":"Welcome back"}),n.jsx("p",{className:"text-slate-500 text-sm mb-6",children:x==="signup"?"Start building with Upfyn-Code":"Sign in to continue"}),n.jsx(De,{}),x==="login"?n.jsxs("form",{onSubmit:xe,className:"space-y-3",children:[n.jsxs("div",{className:"flex flex-col sm:flex-row gap-2",children:[n.jsx("input",{type:"text",placeholder:"First name",value:b,onChange:_=>T(_.target.value),className:O}),n.jsx("input",{type:"text",placeholder:"Last name",value:C,onChange:_=>R(_.target.value),className:O})]}),n.jsx("input",{type:"email",placeholder:"Email *",value:A,onChange:_=>M(_.target.value),className:O,autoComplete:"email"}),n.jsx("input",{type:"tel",placeholder:"Phone",value:H,onChange:_=>q(_.target.value),className:O}),n.jsxs("div",{className:"relative",children:[n.jsx("input",{type:me?"text":"password",placeholder:"Password *",value:u,onChange:_=>w(_.target.value),className:O+" pr-10",autoComplete:"current-password"}),n.jsx(Me,{show:me,onToggle:()=>Fe(!me)})]}),n.jsx("button",{type:"submit",disabled:ve,className:"w-full py-3 bg-gradient-to-r from-blue-600 to-blue-500 hover:from-blue-500 hover:to-blue-400 text-white font-semibold rounded-xl transition-all disabled:opacity-50 mt-2 active:scale-[0.98]",children:ve?"Signing in...":"Sign In"}),n.jsxs("p",{className:"text-center text-sm text-slate-500 mt-3",children:["Don't have an account? ",n.jsx("button",{type:"button",onClick:()=>{m("signup"),ue("")},className:"text-blue-400 hover:text-blue-300",children:"Sign up"})]})]}):n.jsxs("form",{onSubmit:le,className:"space-y-3",children:[n.jsxs("div",{className:"flex flex-col sm:flex-row gap-2",children:[n.jsx("input",{type:"text",placeholder:"First name *",value:b,onChange:_=>T(_.target.value),className:O}),n.jsx("input",{type:"text",placeholder:"Last name",value:C,onChange:_=>R(_.target.value),className:O})]}),n.jsx("input",{type:"email",placeholder:"Email *",value:A,onChange:_=>M(_.target.value),className:O,autoComplete:"email"}),n.jsx("input",{type:"tel",placeholder:"Phone (optional)",value:H,onChange:_=>q(_.target.value),className:O}),n.jsxs("div",{className:"relative",children:[n.jsx("input",{type:ae?"text":"password",placeholder:"Password *",value:W,onChange:_=>ne(_.target.value),className:O+" pr-10",autoComplete:"new-password"}),n.jsx(Me,{show:ae,onToggle:()=>Pe(!ae)})]}),n.jsxs("div",{className:"relative",children:[n.jsx("input",{type:Ce?"text":"password",placeholder:"Confirm password *",value:ye,onChange:_=>Y(_.target.value),className:O+" pr-10",autoComplete:"new-password"}),n.jsx(Me,{show:Ce,onToggle:()=>Ge(!Ce)})]}),n.jsx("button",{type:"submit",disabled:ve,className:"w-full py-3 bg-gradient-to-r from-blue-600 to-blue-500 hover:from-blue-500 hover:to-blue-400 text-white font-semibold rounded-xl transition-all disabled:opacity-50 mt-2 active:scale-[0.98]",children:ve?"Creating account...":"Create Account"}),n.jsxs("p",{className:"text-center text-sm text-slate-500 mt-3",children:["Already have an account? ",n.jsx("button",{type:"button",onClick:()=>{m("login"),ue("")},className:"text-blue-400 hover:text-blue-300",children:"Sign in"})]})]})]})},ms=()=>{const O="w-full px-0 py-3 bg-transparent border-b border-slate-700 text-white placeholder:text-slate-600 focus:outline-none focus:border-blue-500 transition-colors text-sm";return n.jsxs("div",{className:"max-w-sm w-full px-6",children:[n.jsx("div",{className:"w-8 h-1 bg-blue-500 rounded-full mb-6"}),n.jsx("h2",{className:"text-2xl sm:text-3xl font-light text-white mb-1 tracking-tight",children:x==="signup"?"Create Account":"Sign In"}),n.jsx("p",{className:"text-slate-600 text-sm mb-8",children:x==="signup"?"Join Upfyn-Code":"Welcome back"}),n.jsx(De,{}),x==="login"?n.jsxs("form",{onSubmit:xe,className:"space-y-1",children:[n.jsxs("div",{className:"flex flex-col sm:flex-row gap-2 sm:gap-4",children:[n.jsx("input",{type:"text",placeholder:"First name",value:b,onChange:_=>T(_.target.value),className:O}),n.jsx("input",{type:"text",placeholder:"Last name",value:C,onChange:_=>R(_.target.value),className:O})]}),n.jsx("input",{type:"email",placeholder:"Email *",value:A,onChange:_=>M(_.target.value),className:O,autoComplete:"email"}),n.jsx("input",{type:"tel",placeholder:"Phone",value:H,onChange:_=>q(_.target.value),className:O}),n.jsxs("div",{className:"relative",children:[n.jsx("input",{type:me?"text":"password",placeholder:"Password *",value:u,onChange:_=>w(_.target.value),className:O+" pr-10",autoComplete:"current-password"}),n.jsx(Me,{show:me,onToggle:()=>Fe(!me)})]}),n.jsx("button",{type:"submit",disabled:ve,className:"w-full py-3 mt-6 bg-white text-slate-900 font-semibold rounded-lg hover:bg-slate-100 transition-colors disabled:opacity-50 active:scale-[0.98]",children:ve?"Signing in...":"Continue"}),n.jsxs("p",{className:"text-center text-sm text-slate-600 mt-4",children:["No account? ",n.jsx("button",{type:"button",onClick:()=>{m("signup"),ue("")},className:"text-white hover:text-blue-400",children:"Create one"})]})]}):n.jsxs("form",{onSubmit:le,className:"space-y-1",children:[n.jsxs("div",{className:"flex flex-col sm:flex-row gap-2 sm:gap-4",children:[n.jsx("input",{type:"text",placeholder:"First name *",value:b,onChange:_=>T(_.target.value),className:O}),n.jsx("input",{type:"text",placeholder:"Last name",value:C,onChange:_=>R(_.target.value),className:O})]}),n.jsx("input",{type:"email",placeholder:"Email *",value:A,onChange:_=>M(_.target.value),className:O,autoComplete:"email"}),n.jsx("input",{type:"tel",placeholder:"Phone (optional)",value:H,onChange:_=>q(_.target.value),className:O}),n.jsxs("div",{className:"relative",children:[n.jsx("input",{type:ae?"text":"password",placeholder:"Password *",value:W,onChange:_=>ne(_.target.value),className:O+" pr-10",autoComplete:"new-password"}),n.jsx(Me,{show:ae,onToggle:()=>Pe(!ae)})]}),n.jsxs("div",{className:"relative",children:[n.jsx("input",{type:Ce?"text":"password",placeholder:"Confirm password *",value:ye,onChange:_=>Y(_.target.value),className:O+" pr-10",autoComplete:"new-password"}),n.jsx(Me,{show:Ce,onToggle:()=>Ge(!Ce)})]}),n.jsx("button",{type:"submit",disabled:ve,className:"w-full py-3 mt-6 bg-white text-slate-900 font-semibold rounded-lg hover:bg-slate-100 transition-colors disabled:opacity-50 active:scale-[0.98]",children:ve?"Creating...":"Get Started"}),n.jsxs("p",{className:"text-center text-sm text-slate-600 mt-4",children:["Have an account? ",n.jsx("button",{type:"button",onClick:()=>{m("login"),ue("")},className:"text-white hover:text-blue-400",children:"Sign in"})]})]})]})},fs=()=>{const O="w-full pl-10 pr-3 py-3 bg-slate-800/60 border border-slate-700/50 rounded-xl text-white placeholder:text-slate-600 focus:outline-none focus:border-blue-500/60 focus:ring-1 focus:ring-blue-500/20 transition-all text-sm",_=({icon:ge,...Ut})=>n.jsxs("div",{className:"relative",children:[n.jsx(ge,{size:16,className:"absolute left-3 top-1/2 -translate-y-1/2 text-slate-600"}),n.jsx("input",{...Ut,className:O+(Ut.className||"")})]});return n.jsxs("div",{className:"max-w-md w-full overflow-hidden rounded-2xl border border-slate-700/50 shadow-2xl shadow-black/50",children:[n.jsxs("div",{className:`px-5 sm:px-6 py-4 sm:py-5 ${x==="signup"?"bg-gradient-to-r from-orange-500/10 to-pink-500/10":"bg-gradient-to-r from-blue-500/10 to-purple-500/10"}`,children:[n.jsx("h2",{className:"text-lg sm:text-xl font-bold text-white",children:x==="signup"?"Create Account":"Sign In"}),n.jsx("p",{className:"text-slate-400 text-xs mt-1",children:x==="signup"?"Fill in your details to get started":"Enter your credentials to continue"})]}),n.jsxs("div",{className:"bg-slate-900/90 px-5 sm:px-6 py-5 sm:py-6",children:[n.jsx(De,{}),x==="login"?n.jsxs("form",{onSubmit:xe,className:"space-y-3",children:[n.jsxs("div",{className:"flex flex-col sm:flex-row gap-2",children:[n.jsx(_,{icon:Ju,type:"text",placeholder:"First name",value:b,onChange:ge=>T(ge.target.value)}),n.jsx("input",{type:"text",placeholder:"Last name",value:C,onChange:ge=>R(ge.target.value),className:"w-full px-3 py-3 bg-slate-800/60 border border-slate-700/50 rounded-xl text-white placeholder:text-slate-600 focus:outline-none focus:border-blue-500/60 text-sm"})]}),n.jsx(_,{icon:Lo,type:"email",placeholder:"Email *",value:A,onChange:ge=>M(ge.target.value)}),n.jsx(_,{icon:Xu,type:"tel",placeholder:"Phone",value:H,onChange:ge=>q(ge.target.value)}),n.jsxs("div",{className:"relative",children:[n.jsx(ls,{size:16,className:"absolute left-3 top-1/2 -translate-y-1/2 text-slate-600 z-10"}),n.jsx("input",{type:me?"text":"password",placeholder:"Password *",value:u,onChange:ge=>w(ge.target.value),className:O+" !pr-10",autoComplete:"current-password"}),n.jsx(Me,{show:me,onToggle:()=>Fe(!me)})]}),n.jsx("button",{type:"submit",disabled:ve,className:"w-full py-3 bg-blue-600 hover:bg-blue-500 text-white font-semibold rounded-xl transition-colors disabled:opacity-50 mt-1 active:scale-[0.98]",children:ve?"Signing in...":"Sign In"}),n.jsxs("p",{className:"text-center text-xs text-slate-500 pt-2",children:["No account? ",n.jsx("button",{type:"button",onClick:()=>{m("signup"),ue("")},className:"text-blue-400 hover:text-blue-300",children:"Sign up"})]})]}):n.jsxs("form",{onSubmit:le,className:"space-y-3",children:[n.jsxs("div",{className:"flex flex-col sm:flex-row gap-2",children:[n.jsx(_,{icon:Ju,type:"text",placeholder:"First name *",value:b,onChange:ge=>T(ge.target.value)}),n.jsx("input",{type:"text",placeholder:"Last name",value:C,onChange:ge=>R(ge.target.value),className:"w-full px-3 py-3 bg-slate-800/60 border border-slate-700/50 rounded-xl text-white placeholder:text-slate-600 focus:outline-none focus:border-blue-500/60 text-sm"})]}),n.jsx(_,{icon:Lo,type:"email",placeholder:"Email *",value:A,onChange:ge=>M(ge.target.value)}),n.jsx(_,{icon:Xu,type:"tel",placeholder:"Phone (optional)",value:H,onChange:ge=>q(ge.target.value)}),n.jsxs("div",{className:"relative",children:[n.jsx(ls,{size:16,className:"absolute left-3 top-1/2 -translate-y-1/2 text-slate-600 z-10"}),n.jsx("input",{type:ae?"text":"password",placeholder:"Password *",value:W,onChange:ge=>ne(ge.target.value),className:O+" !pr-10",autoComplete:"new-password"}),n.jsx(Me,{show:ae,onToggle:()=>Pe(!ae)})]}),n.jsxs("div",{className:"relative",children:[n.jsx(ls,{size:16,className:"absolute left-3 top-1/2 -translate-y-1/2 text-slate-600 z-10"}),n.jsx("input",{type:Ce?"text":"password",placeholder:"Confirm password *",value:ye,onChange:ge=>Y(ge.target.value),className:O+" !pr-10",autoComplete:"new-password"}),n.jsx(Me,{show:Ce,onToggle:()=>Ge(!Ce)})]}),n.jsx("button",{type:"submit",disabled:ve,className:"w-full py-3 bg-blue-600 hover:bg-blue-500 text-white font-semibold rounded-xl transition-colors disabled:opacity-50 mt-1 active:scale-[0.98]",children:ve?"Creating...":"Create Account"}),n.jsxs("p",{className:"text-center text-xs text-slate-500 pt-2",children:["Have an account? ",n.jsx("button",{type:"button",onClick:()=>{m("login"),ue("")},className:"text-blue-400 hover:text-blue-300",children:"Sign in"})]})]})]})]})},vr=()=>{const O="w-full px-5 py-3.5 bg-slate-800 rounded-full text-white placeholder:text-slate-500 focus:outline-none focus:ring-2 focus:ring-blue-500/40 border-0 transition-all text-sm";return n.jsxs("div",{className:"max-w-sm w-full px-4 text-center",children:[n.jsx("div",{className:"text-3xl sm:text-4xl mb-2",children:x==="signup"?"✦":"⟡"}),n.jsx("h2",{className:"text-xl sm:text-2xl font-bold text-white mb-1",children:x==="signup"?"Get Started":"Welcome Back"}),n.jsx("p",{className:"text-slate-500 text-sm mb-8",children:x==="signup"?"Create your account":"Sign in to your account"}),n.jsx(De,{}),x==="login"?n.jsxs("form",{onSubmit:xe,className:"space-y-3",children:[n.jsxs("div",{className:"flex flex-col sm:flex-row gap-2",children:[n.jsx("input",{type:"text",placeholder:"First name",value:b,onChange:_=>T(_.target.value),className:O}),n.jsx("input",{type:"text",placeholder:"Last name",value:C,onChange:_=>R(_.target.value),className:O})]}),n.jsx("input",{type:"email",placeholder:"Email *",value:A,onChange:_=>M(_.target.value),className:O,autoComplete:"email"}),n.jsx("input",{type:"tel",placeholder:"Phone",value:H,onChange:_=>q(_.target.value),className:O}),n.jsxs("div",{className:"relative",children:[n.jsx("input",{type:me?"text":"password",placeholder:"Password *",value:u,onChange:_=>w(_.target.value),className:O+" pr-12",autoComplete:"current-password"}),n.jsx(Me,{show:me,onToggle:()=>Fe(!me)})]}),n.jsx("button",{type:"submit",disabled:ve,className:"w-full py-3.5 bg-gradient-to-r from-blue-500 to-violet-500 hover:from-blue-400 hover:to-violet-400 text-white font-bold rounded-full transition-all disabled:opacity-50 shadow-lg shadow-blue-500/20 active:scale-[0.98]",children:ve?"Signing in...":"Sign In"}),n.jsxs("p",{className:"text-sm text-slate-500 mt-4",children:["Don't have an account? ",n.jsx("button",{type:"button",onClick:()=>{m("signup"),ue("")},className:"text-blue-400 hover:text-blue-300",children:"Sign up"})]})]}):n.jsxs("form",{onSubmit:le,className:"space-y-3",children:[n.jsxs("div",{className:"flex flex-col sm:flex-row gap-2",children:[n.jsx("input",{type:"text",placeholder:"First name *",value:b,onChange:_=>T(_.target.value),className:O}),n.jsx("input",{type:"text",placeholder:"Last name",value:C,onChange:_=>R(_.target.value),className:O})]}),n.jsx("input",{type:"email",placeholder:"Email *",value:A,onChange:_=>M(_.target.value),className:O,autoComplete:"email"}),n.jsx("input",{type:"tel",placeholder:"Phone (optional)",value:H,onChange:_=>q(_.target.value),className:O}),n.jsxs("div",{className:"relative",children:[n.jsx("input",{type:ae?"text":"password",placeholder:"Password *",value:W,onChange:_=>ne(_.target.value),className:O+" pr-12",autoComplete:"new-password"}),n.jsx(Me,{show:ae,onToggle:()=>Pe(!ae)})]}),n.jsxs("div",{className:"relative",children:[n.jsx("input",{type:Ce?"text":"password",placeholder:"Confirm password *",value:ye,onChange:_=>Y(_.target.value),className:O+" pr-12",autoComplete:"new-password"}),n.jsx(Me,{show:Ce,onToggle:()=>Ge(!Ce)})]}),n.jsx("button",{type:"submit",disabled:ve,className:"w-full py-3.5 bg-gradient-to-r from-blue-500 to-violet-500 hover:from-blue-400 hover:to-violet-400 text-white font-bold rounded-full transition-all disabled:opacity-50 shadow-lg shadow-blue-500/20 active:scale-[0.98]",children:ve?"Creating...":"Create Account"}),n.jsxs("p",{className:"text-sm text-slate-500 mt-4",children:["Have an account? ",n.jsx("button",{type:"button",onClick:()=>{m("login"),ue("")},className:"text-blue-400 hover:text-blue-300",children:"Sign in"})]})]})]})},kn=()=>{const O="w-full px-4 py-3 bg-black/40 border border-emerald-500/20 rounded-lg text-emerald-100 placeholder:text-emerald-800 focus:outline-none focus:border-emerald-500/50 font-mono text-sm transition-colors";return n.jsxs("div",{className:"max-w-sm w-full border border-emerald-500/30 rounded-2xl overflow-hidden bg-[#0b1120] shadow-2xl shadow-black/60",children:[n.jsxs("div",{className:"px-4 sm:px-5 py-3 border-b border-emerald-500/10 flex items-center gap-2",children:[n.jsxs("div",{className:"flex gap-1.5",children:[n.jsx("div",{className:"w-2.5 h-2.5 rounded-full bg-red-500/60"}),n.jsx("div",{className:"w-2.5 h-2.5 rounded-full bg-yellow-500/60"}),n.jsx("div",{className:"w-2.5 h-2.5 rounded-full bg-green-500/60"})]}),n.jsxs("span",{className:"text-emerald-600 text-xs font-mono ml-2",children:["upfyn-code — ",x==="signup"?"register":"auth"]})]}),n.jsxs("div",{className:"px-4 sm:px-5 py-5 sm:py-6",children:[n.jsxs("p",{className:"text-emerald-500 font-mono text-sm mb-4",children:[n.jsx("span",{className:"text-emerald-700",children:"$"})," ",x==="signup"?"upfyn-code register":"upfyn-code login"]}),n.jsx(De,{}),x==="login"?n.jsxs("form",{onSubmit:xe,className:"space-y-3",children:[n.jsxs("div",{className:"flex flex-col sm:flex-row gap-2",children:[n.jsx("input",{type:"text",placeholder:"first_name",value:b,onChange:_=>T(_.target.value),className:O}),n.jsx("input",{type:"text",placeholder:"last_name",value:C,onChange:_=>R(_.target.value),className:O})]}),n.jsx("input",{type:"email",placeholder:"email *",value:A,onChange:_=>M(_.target.value),className:O,autoComplete:"email"}),n.jsx("input",{type:"tel",placeholder:"phone",value:H,onChange:_=>q(_.target.value),className:O}),n.jsxs("div",{className:"relative",children:[n.jsx("input",{type:me?"text":"password",placeholder:"password *",value:u,onChange:_=>w(_.target.value),className:O+" pr-10",autoComplete:"current-password"}),n.jsx(Me,{show:me,onToggle:()=>Fe(!me)})]}),n.jsx("button",{type:"submit",disabled:ve,className:"w-full py-3 bg-emerald-600/20 hover:bg-emerald-600/30 border border-emerald-500/40 text-emerald-400 font-mono font-bold rounded-lg transition-all disabled:opacity-50 mt-2 active:scale-[0.98]",children:ve?"authenticating...":"> authenticate"}),n.jsxs("p",{className:"text-center text-xs text-emerald-800 mt-3 font-mono",children:["no account? ",n.jsx("button",{type:"button",onClick:()=>{m("signup"),ue("")},className:"text-emerald-500 hover:text-emerald-400",children:"register"})]})]}):n.jsxs("form",{onSubmit:le,className:"space-y-3",children:[n.jsxs("div",{className:"flex flex-col sm:flex-row gap-2",children:[n.jsx("input",{type:"text",placeholder:"first_name *",value:b,onChange:_=>T(_.target.value),className:O}),n.jsx("input",{type:"text",placeholder:"last_name",value:C,onChange:_=>R(_.target.value),className:O})]}),n.jsx("input",{type:"email",placeholder:"email *",value:A,onChange:_=>M(_.target.value),className:O,autoComplete:"email"}),n.jsx("input",{type:"tel",placeholder:"phone",value:H,onChange:_=>q(_.target.value),className:O}),n.jsxs("div",{className:"relative",children:[n.jsx("input",{type:ae?"text":"password",placeholder:"password *",value:W,onChange:_=>ne(_.target.value),className:O+" pr-10",autoComplete:"new-password"}),n.jsx(Me,{show:ae,onToggle:()=>Pe(!ae)})]}),n.jsxs("div",{className:"relative",children:[n.jsx("input",{type:Ce?"text":"password",placeholder:"confirm_password *",value:ye,onChange:_=>Y(_.target.value),className:O+" pr-10",autoComplete:"new-password"}),n.jsx(Me,{show:Ce,onToggle:()=>Ge(!Ce)})]}),n.jsx("button",{type:"submit",disabled:ve,className:"w-full py-3 bg-emerald-600/20 hover:bg-emerald-600/30 border border-emerald-500/40 text-emerald-400 font-mono font-bold rounded-lg transition-all disabled:opacity-50 mt-2 active:scale-[0.98]",children:ve?"creating...":"> create_account"}),n.jsxs("p",{className:"text-center text-xs text-emerald-800 mt-3 font-mono",children:["have account? ",n.jsx("button",{type:"button",onClick:()=>{m("login"),ue("")},className:"text-emerald-500 hover:text-emerald-400",children:"login"})]})]})]})]})},Cn={1:ht,2:ms,3:fs,4:vr,5:kn}[we]||kn;return n.jsxs("div",{className:"min-h-screen bg-[#0a0f1e] text-slate-200 flex items-center justify-center relative overflow-hidden",children:[!Ee&&!X&&n.jsxs("div",{className:"fixed top-0 left-0 right-0 z-30 flex items-center justify-between px-4 sm:px-5 py-3 sm:py-4 fade-in",children:[n.jsx("button",{onClick:()=>g("/"),className:"text-sm font-semibold text-slate-600 hover:text-white tracking-wide transition-colors",children:"Upfyn-Code"}),n.jsxs("div",{className:"flex items-center gap-2 sm:gap-3",children:[n.jsx("button",{onClick:()=>ie("login",Je),className:"px-3 sm:px-4 py-2 text-xs sm:text-sm font-medium text-slate-400 hover:text-white transition-colors",children:"Sign In"}),n.jsx("button",{onClick:()=>ie("signup",Se),className:"px-3 sm:px-4 py-2 text-xs sm:text-sm font-medium text-white bg-white/10 hover:bg-white/15 border border-white/10 rounded-lg transition-all active:scale-[0.97]",children:"Create Account"})]})]}),X&&n.jsx("div",{className:"fixed inset-0 z-20 pointer-events-none blur-bloom-overlay",style:{background:`radial-gradient(circle at ${de.x} ${de.y}, rgba(10,15,30,0.95) 0%, rgba(10,15,30,0.85) 100%)`}}),n.jsxs("div",{className:`flex flex-col items-center justify-center px-4 ${Ee&&!X?"hidden":""}`,children:[n.jsx("button",{ref:Se,onClick:()=>ie("signup",Se),className:`landing-word landing-hello text-5xl sm:text-7xl md:text-8xl lg:text-[10rem] xl:text-[12rem] font-black leading-none tracking-tight ${X?k==="signup"?"word-explode":"word-fade-away":""}`,children:"Hello"}),n.jsx("button",{ref:Je,onClick:()=>ie("login",Je),className:`landing-word landing-welcome text-5xl sm:text-7xl md:text-8xl lg:text-[10rem] xl:text-[12rem] font-black leading-none tracking-tight mt-1 sm:mt-2 ${X?k==="login"?"word-explode":"word-fade-away":""}`,children:Le?`Welcome, ${Le}!`:"Welcome!"}),n.jsx("button",{onClick:()=>m("demo"),className:`mt-6 sm:mt-8 px-5 py-2.5 text-sm text-slate-400 hover:text-white bg-white/5 hover:bg-white/10 border border-white/10 rounded-lg transition-all active:scale-[0.97] ${X?"word-fade-away":""}`,children:"Try Demo →"})]}),Ee&&!X&&n.jsx(n0,{variant:we}),!Ee&&!X&&n.jsx(t0,{}),!Ee&&!X&&n.jsxs("div",{className:"fixed inset-0 pointer-events-none z-0",children:[n.jsx("div",{className:"float-orb absolute rounded-full blur-3xl opacity-20",style:{top:"20%",left:"15%",width:400,height:400,background:"rgba(59,130,246,0.08)"}}),n.jsx("div",{className:"float-orb-2 absolute rounded-full blur-3xl opacity-15",style:{top:"60%",right:"10%",width:350,height:350,background:"rgba(139,92,246,0.06)"}}),n.jsx("div",{className:"float-orb-3 absolute rounded-full blur-3xl opacity-10",style:{top:"40%",left:"50%",width:300,height:300,background:"rgba(236,72,153,0.05)"}})]}),oe&&X&&n.jsx("div",{className:"fixed inset-0 z-30 flex items-center justify-center",children:n.jsxs("div",{className:"flex flex-col items-center gap-4",children:[n.jsx("div",{className:"w-10 h-10 border-2 border-emerald-500 border-t-transparent rounded-full animate-spin"}),n.jsx("p",{className:"text-slate-400 text-sm font-mono",children:"Resuming session..."})]})}),Ee&&!X&&n.jsxs("div",{className:"w-full flex flex-col items-center justify-center px-4 form-enter z-10 relative",children:[n.jsxs("button",{onClick:ke,className:"mb-4 sm:mb-6 px-4 py-2 text-sm text-slate-300 hover:text-white bg-slate-800/90 hover:bg-slate-700/90 border border-slate-700/60 rounded-lg flex items-center gap-2 transition-all self-center active:scale-[0.97] shadow-lg shadow-black/30",children:[n.jsx(bd,{size:14})," Back"]}),Cn(),n.jsxs("div",{className:"mt-5 sm:mt-6 flex items-center justify-center gap-2 relative flex-wrap",children:[n.jsxs("button",{onClick:()=>Ne(!Ie),className:"flex items-center gap-1.5 text-xs text-slate-600 hover:text-slate-400 transition-colors",children:[n.jsx(Kf,{size:13}),Ie?"Close":"Theme"]}),Ie&&n.jsx("div",{className:"flex items-center gap-1.5 ml-1 flex-wrap justify-center",children:r0.map(({id:O,label:_,color:ge})=>n.jsxs("button",{onClick:()=>V(O),className:`flex items-center gap-1.5 px-2.5 py-1 rounded-full text-xs transition-all active:scale-95 ${we===O?"bg-slate-700 text-white scale-105":"bg-slate-800/60 text-slate-500 hover:text-slate-300 hover:bg-slate-800"}`,title:_,children:[n.jsx("span",{className:`w-2 h-2 rounded-full ${ge}`}),n.jsx("span",{className:"hidden sm:inline",children:_})]},O))})]})]})]})}const To=[{id:"getting-started",label:"Getting Started"},{id:"why-upfyn",label:"Why Upfyn-Code"},{id:"architecture",label:"Architecture"},{id:"installation",label:"Installation"},{id:"cli-commands",label:"CLI Commands"},{id:"remote-access",label:"Remote Access"},{id:"ai-chat",label:"AI Chat"},{id:"terminal",label:"Terminal"},{id:"file-explorer",label:"File Explorer"},{id:"git",label:"Git Management"},{id:"canvas",label:"Upfyn Canvas"},{id:"mcp",label:"MCP Protocol"},{id:"taskmaster",label:"TaskMaster AI"},{id:"security",label:"Security"},{id:"api-keys",label:"API Keys"},{id:"configuration",label:"Configuration"},{id:"self-hosting",label:"Self-Hosting"},{id:"faq",label:"FAQ"}],pe=({children:i,block:o})=>o?n.jsx("pre",{className:"bg-slate-900 border border-slate-800 rounded-lg p-3 sm:p-4 overflow-x-auto text-sm font-mono text-slate-400 my-3",children:n.jsx("code",{children:i})}):n.jsx("code",{className:"text-emerald-400 bg-slate-800/50 px-1.5 py-0.5 rounded text-[13px] font-mono",children:i});function l0({onOpenAuth:i}){const{hash:o}=Zt(),[c,h]=y.useState("getting-started"),p=y.useRef(!1);y.useEffect(()=>(document.title="Documentation — Upfyn-Code",()=>{document.title="Upfyn-Code"}),[]),y.useEffect(()=>{if(o){const C=o.replace("#",""),R=document.getElementById(C);R&&(R.scrollIntoView({behavior:"smooth"}),h(C))}},[o]),y.useEffect(()=>{const C=()=>{if(p.current)return;const R=window.scrollY+120;let A=To[0].id;for(const{id:M}of To){const H=document.getElementById(M);H&&H.offsetTop<=R&&(A=M)}h(A)};return window.addEventListener("scroll",C,{passive:!0}),()=>window.removeEventListener("scroll",C)},[]);const g=y.useCallback(C=>{const R=document.getElementById(C);R&&(p.current=!0,h(C),R.scrollIntoView({behavior:"smooth"}),setTimeout(()=>{p.current=!1},800))},[]),v=({id:C,children:R})=>n.jsx("h2",{id:C,className:"text-xl sm:text-2xl font-bold text-white mb-4 pt-10",children:R}),x=({children:C})=>n.jsx("h3",{className:"text-base sm:text-lg font-semibold text-white mb-2 mt-6",children:C}),m=({children:C})=>n.jsx("p",{className:"text-slate-400 text-sm leading-relaxed mb-3",children:C}),u=({children:C})=>n.jsx("li",{className:"text-slate-400 text-sm leading-relaxed",children:C}),w=({children:C})=>n.jsx("ul",{className:"list-disc list-inside text-slate-400 text-sm space-y-1.5 mb-4 ml-2",children:C}),b=({children:C})=>n.jsxs("div",{className:"bg-blue-500/5 border border-blue-500/15 rounded-lg px-4 py-3 my-4 text-sm text-blue-300/80",children:[n.jsx("strong",{className:"text-blue-400",children:"Tip:"})," ",C]}),T=({children:C})=>n.jsxs("div",{className:"bg-amber-500/5 border border-amber-500/15 rounded-lg px-4 py-3 my-4 text-sm text-amber-300/80",children:[n.jsx("strong",{className:"text-amber-400",children:"Note:"})," ",C]});return n.jsxs("div",{className:"min-h-screen bg-[#0a0f1e] text-slate-200",children:[n.jsx(Bn,{onOpenAuth:i}),n.jsxs("div",{className:"pt-20 max-w-6xl mx-auto flex",children:[n.jsxs("aside",{className:"hidden md:block w-56 shrink-0 sticky top-20 h-[calc(100vh-5rem)] overflow-y-auto pr-4 border-r border-white/5 py-4 pl-4",children:[n.jsx("p",{className:"text-xs font-semibold text-slate-600 uppercase tracking-wider mb-3",children:"Documentation"}),To.map(({id:C,label:R})=>n.jsx("button",{onClick:()=>g(C),className:`block w-full text-left py-1.5 text-sm transition-all duration-200 border-l-2 pl-3 ${c===C?"text-blue-400 font-medium border-blue-400 bg-blue-500/5":"text-slate-500 hover:text-slate-300 border-transparent hover:border-slate-700"}`,children:R},C))]}),n.jsxs("main",{className:"flex-1 px-4 sm:px-8 pb-20 min-w-0",children:[n.jsx(v,{id:"getting-started",children:"Getting Started"}),n.jsxs(m,{children:[n.jsx("strong",{className:"text-white",children:"Upfyn-Code"})," is a cloud-powered IDE that connects to your local machine. Unlike traditional cloud IDEs that run code on remote VMs, Upfyn-Code executes everything on ",n.jsx("strong",{className:"text-white",children:"your own machine"})," through an encrypted WebSocket relay — the browser is simply the interface."]}),n.jsxs(m,{children:["This means you get the full power of your local environment (your files, your tools, your hardware) combined with the convenience of accessing it from ",n.jsx("strong",{className:"text-white",children:"any browser, any device, anywhere"}),"."]}),n.jsx(x,{children:"Quick start in 3 steps"}),n.jsx(pe,{block:!0,children:`# 1. Install the CLI
|
|
422
|
+
npm install -g upfyn-code
|
|
423
|
+
|
|
424
|
+
# 2. Login to your account
|
|
425
|
+
upfyn-code login
|
|
426
|
+
|
|
427
|
+
# 3. Connect your machine
|
|
428
|
+
upfyn-code connect`}),n.jsxs(m,{children:["Once connected, open ",n.jsx(pe,{children:"cli.upfyn.com"})," in any browser and you'll have full access to AI chat, terminal, file explorer, git management, and the Upfyn Canvas."]}),n.jsx(v,{id:"why-upfyn",children:"Why Upfyn-Code"}),n.jsx(m,{children:"There are many AI coding tools available today — Claude Code, GitHub Copilot, Cursor, Windsurf, Cody. So why Upfyn-Code? Here's what makes it different:"}),n.jsx(x,{children:"Your machine, any browser"}),n.jsxs(m,{children:["Most cloud IDEs run code on remote VMs. That means limited storage, slow builds, no access to your local Docker containers, databases, or custom toolchains. Upfyn-Code runs ",n.jsx("strong",{className:"text-white",children:"everything on your machine"})," — the browser is just a window into your real environment. Open a terminal and you're running commands on ",n.jsx("em",{children:"your hardware"}),", not a shared server."]}),n.jsx(x,{children:"Unified interface"}),n.jsx(m,{children:"Instead of juggling multiple tools — one for AI chat, one for terminal, one for git — Upfyn-Code puts everything in a single, responsive interface. AI Chat, Terminal, File Explorer, Git Management, and the Canvas are all tabs in one app. No context switching."}),n.jsx(x,{children:"Works from any device"}),n.jsxs(m,{children:["Start coding on your desktop at work. Continue on your laptop at home. Quick fix from your tablet on the couch. As long as your machine is connected via ",n.jsx(pe,{children:"upfyn-code connect"}),", you can access your full development environment from any browser. Mobile-first responsive design means it works on phones too."]}),n.jsx(x,{children:"AI-powered Canvas workflows"}),n.jsx(m,{children:"The Upfyn Canvas is something no other AI coding tool offers — a visual workflow builder where you drop AI-powered blocks (Chat, Research, Code, Dashboard, Notes, PDF), connect them with lines, and let data flow between them. Plan your architecture, research best practices, generate code, and track metrics — all in one visual space."}),n.jsx(x,{children:"MCP Protocol — connect to any AI tool"}),n.jsxs(m,{children:["Upfyn-Code implements the ",n.jsx("strong",{className:"text-white",children:"Model Context Protocol (MCP)"}),", which means you can connect it to Claude Code, Cursor, Windsurf, or any MCP-compatible AI tool. Your Upfyn-Code instance becomes a bridge — other AI tools can read your files, run commands, and manage git through the relay."]}),n.jsx(x,{children:"Comparison with other tools"}),n.jsx("div",{className:"overflow-x-auto my-4",children:n.jsxs("table",{className:"w-full text-sm border border-slate-800 rounded-lg overflow-hidden",children:[n.jsx("thead",{children:n.jsxs("tr",{className:"bg-slate-900/60 text-slate-300",children:[n.jsx("th",{className:"text-left px-3 py-2 border-b border-slate-800 font-medium",children:"Feature"}),n.jsx("th",{className:"text-center px-3 py-2 border-b border-slate-800 font-medium",children:"Upfyn-Code"}),n.jsx("th",{className:"text-center px-3 py-2 border-b border-slate-800 font-medium",children:"Cloud IDEs"}),n.jsx("th",{className:"text-center px-3 py-2 border-b border-slate-800 font-medium",children:"Local AI Tools"})]})}),n.jsxs("tbody",{className:"text-slate-400",children:[n.jsxs("tr",{className:"border-b border-slate-800/50",children:[n.jsx("td",{className:"px-3 py-2",children:"Runs on your machine"}),n.jsx("td",{className:"text-center px-3 py-2 text-emerald-400",children:"Yes"}),n.jsx("td",{className:"text-center px-3 py-2 text-slate-600",children:"No"}),n.jsx("td",{className:"text-center px-3 py-2 text-emerald-400",children:"Yes"})]}),n.jsxs("tr",{className:"border-b border-slate-800/50",children:[n.jsx("td",{className:"px-3 py-2",children:"Access from any browser"}),n.jsx("td",{className:"text-center px-3 py-2 text-emerald-400",children:"Yes"}),n.jsx("td",{className:"text-center px-3 py-2 text-emerald-400",children:"Yes"}),n.jsx("td",{className:"text-center px-3 py-2 text-slate-600",children:"No"})]}),n.jsxs("tr",{className:"border-b border-slate-800/50",children:[n.jsx("td",{className:"px-3 py-2",children:"Visual AI Canvas"}),n.jsx("td",{className:"text-center px-3 py-2 text-emerald-400",children:"Yes"}),n.jsx("td",{className:"text-center px-3 py-2 text-slate-600",children:"No"}),n.jsx("td",{className:"text-center px-3 py-2 text-slate-600",children:"No"})]}),n.jsxs("tr",{className:"border-b border-slate-800/50",children:[n.jsx("td",{className:"px-3 py-2",children:"MCP Protocol"}),n.jsx("td",{className:"text-center px-3 py-2 text-emerald-400",children:"Yes"}),n.jsx("td",{className:"text-center px-3 py-2 text-slate-600",children:"Varies"}),n.jsx("td",{className:"text-center px-3 py-2 text-slate-600",children:"Varies"})]}),n.jsxs("tr",{className:"border-b border-slate-800/50",children:[n.jsx("td",{className:"px-3 py-2",children:"Integrated terminal"}),n.jsx("td",{className:"text-center px-3 py-2 text-emerald-400",children:"Yes"}),n.jsx("td",{className:"text-center px-3 py-2 text-emerald-400",children:"Yes"}),n.jsx("td",{className:"text-center px-3 py-2 text-slate-600",children:"Varies"})]}),n.jsxs("tr",{className:"border-b border-slate-800/50",children:[n.jsx("td",{className:"px-3 py-2",children:"Git visual interface"}),n.jsx("td",{className:"text-center px-3 py-2 text-emerald-400",children:"Yes"}),n.jsx("td",{className:"text-center px-3 py-2 text-slate-600",children:"Varies"}),n.jsx("td",{className:"text-center px-3 py-2 text-slate-600",children:"No"})]}),n.jsxs("tr",{children:[n.jsx("td",{className:"px-3 py-2",children:"Self-hostable"}),n.jsx("td",{className:"text-center px-3 py-2 text-emerald-400",children:"Yes"}),n.jsx("td",{className:"text-center px-3 py-2 text-slate-600",children:"No"}),n.jsx("td",{className:"text-center px-3 py-2 text-emerald-400",children:"Yes"})]})]})]})}),n.jsx(v,{id:"architecture",children:"Architecture"}),n.jsx(m,{children:"Upfyn-Code has a three-layer architecture designed for security, performance, and flexibility:"}),n.jsx(x,{children:"1. CLI (your machine)"}),n.jsxs(m,{children:["The ",n.jsx(pe,{children:"upfyn-code"})," CLI is a lightweight Node.js process that runs on your local machine. When you run ",n.jsx(pe,{children:"upfyn-code connect"}),", it:"]}),n.jsxs(w,{children:[n.jsx(u,{children:"Establishes an encrypted WebSocket connection to the cloud server"}),n.jsx(u,{children:"Listens for incoming commands (file reads, terminal, git ops)"}),n.jsx(u,{children:"Executes them locally and streams results back"}),n.jsx(u,{children:"Manages authentication tokens and relay keys"})]}),n.jsx(m,{children:"The CLI never exposes any ports. All communication goes through the outbound WebSocket — no firewall configuration needed."}),n.jsx(x,{children:"2. Backend (cloud server)"}),n.jsx(m,{children:"The backend is a Node.js + Express server deployed on Railway. It handles:"}),n.jsxs(w,{children:[n.jsxs(u,{children:[n.jsx("strong",{className:"text-white",children:"WebSocket relay"})," — routes messages between the browser and your CLI"]}),n.jsxs(u,{children:[n.jsx("strong",{className:"text-white",children:"Authentication"})," — JWT tokens, bcrypt password hashing, HTTP-only cookies"]}),n.jsxs(u,{children:[n.jsx("strong",{className:"text-white",children:"AI model routing"})," — proxies requests to GPT-4o, Claude, Gemini"]}),n.jsxs(u,{children:[n.jsx("strong",{className:"text-white",children:"Database"})," — Turso (libSQL) for user accounts, subscriptions, preferences"]}),n.jsxs(u,{children:[n.jsx("strong",{className:"text-white",children:"Payments"})," — Razorpay integration for subscription management"]})]}),n.jsx(x,{children:"3. Frontend (browser UI)"}),n.jsx(m,{children:"The frontend is a React + Vite + Tailwind CSS app deployed on Vercel. It provides:"}),n.jsxs(w,{children:[n.jsx(u,{children:"AI Chat with streaming responses and model selection"}),n.jsx(u,{children:"Terminal emulator with full ANSI color support"}),n.jsx(u,{children:"File explorer with syntax highlighting"}),n.jsx(u,{children:"Git interface with visual commit log, branches, and diffs"}),n.jsx(u,{children:"Upfyn Canvas with infinite zoom, pan, and block connections"})]}),n.jsx(x,{children:"Data flow"}),n.jsx(pe,{block:!0,children:`Browser (cli.upfyn.com)
|
|
429
|
+
↕ HTTPS / WebSocket
|
|
430
|
+
Backend (Railway)
|
|
431
|
+
↕ Encrypted WebSocket relay
|
|
432
|
+
CLI (your machine)
|
|
433
|
+
↕ Local filesystem, terminal, git`}),n.jsx(b,{children:"Your code never leaves your machine. The relay only passes structured messages (commands and responses) — never raw file contents at rest."}),n.jsx(v,{id:"installation",children:"Installation"}),n.jsx(x,{children:"Prerequisites"}),n.jsxs(w,{children:[n.jsxs(u,{children:[n.jsx("strong",{className:"text-white",children:"Node.js 18+"})," — required for the CLI"]}),n.jsxs(u,{children:[n.jsx("strong",{className:"text-white",children:"npm or yarn"})," — comes with Node.js"]}),n.jsx(u,{children:"A modern browser (Chrome, Firefox, Safari, Edge)"})]}),n.jsx(x,{children:"Global install (recommended)"}),n.jsx(pe,{block:!0,children:"npm install -g upfyn-code"}),n.jsxs(m,{children:["This installs the ",n.jsx(pe,{children:"upfyn-code"})," command globally. You can verify the installation:"]}),n.jsx(pe,{block:!0,children:`upfyn-code --version # Shows current version
|
|
434
|
+
upfyn-code --help # Shows all available commands`}),n.jsx(x,{children:"Quick run with npx"}),n.jsx(pe,{block:!0,children:"npx upfyn-code"}),n.jsx(m,{children:"Runs without installing globally. Good for trying it out before committing to an install."}),n.jsx(x,{children:"Update to latest version"}),n.jsx(pe,{block:!0,children:"npm update -g upfyn-code"}),n.jsx(v,{id:"cli-commands",children:"CLI Commands"}),n.jsxs(m,{children:["The ",n.jsx(pe,{children:"upfyn-code"})," CLI provides all the commands you need to authenticate, connect, and manage your Upfyn-Code setup."]}),n.jsx(x,{children:"upfyn-code"}),n.jsx(m,{children:"Launch the web interface. Opens the hosted app in your default browser."}),n.jsx(pe,{block:!0,children:`upfyn-code # Open cli.upfyn.com in browser
|
|
435
|
+
upfyn-code --local # Start local server on port 4200`}),n.jsxs(m,{children:["The ",n.jsx(pe,{children:"--local"})," flag starts a local Express server for self-hosted usage. Useful for development or when you want everything on your machine."]}),n.jsx(x,{children:"upfyn-code login"}),n.jsx(m,{children:"Authenticate with your Upfyn-Code account. Interactive prompts for email and password."}),n.jsx(pe,{block:!0,children:"upfyn-code login"}),n.jsxs(m,{children:["On success, your credentials are saved to ",n.jsx(pe,{children:"~/.upfynrc"})," so you don't need to login again on this machine."]}),n.jsx(x,{children:"upfyn-code logout"}),n.jsx(m,{children:"Clear saved credentials from your machine."}),n.jsx(pe,{block:!0,children:"upfyn-code logout"}),n.jsx(x,{children:"upfyn-code connect"}),n.jsx(m,{children:"The core command — bridges your local machine to the browser interface via an encrypted WebSocket relay."}),n.jsx(pe,{block:!0,children:`upfyn-code connect
|
|
436
|
+
upfyn-code connect --server https://cli.upfyn.com --key rt_xxx`}),n.jsx(m,{children:"Once connected, you'll see:"}),n.jsx(pe,{block:!0,children:`✓ Connected to Upfyn-Code relay
|
|
437
|
+
Session: abc123
|
|
438
|
+
Open cli.upfyn.com to start coding`}),n.jsxs(w,{children:[n.jsxs(u,{children:[n.jsx(pe,{children:"--server"})," — specify a custom server URL (for self-hosted setups)"]}),n.jsxs(u,{children:[n.jsx(pe,{children:"--key"})," — use a relay token instead of session auth"]})]}),n.jsx(b,{children:"Keep the terminal open while connected. If the connection drops, the CLI reconnects automatically."}),n.jsx(x,{children:"upfyn-code status"}),n.jsx(m,{children:"Show current authentication status, connection info, and configuration."}),n.jsx(pe,{block:!0,children:`upfyn-code status
|
|
439
|
+
|
|
440
|
+
# Output:
|
|
441
|
+
Logged in as: user@example.com
|
|
442
|
+
Server: https://cli.upfyn.com
|
|
443
|
+
Connection: active (session abc123)`}),n.jsx(x,{children:"upfyn-code mcp"}),n.jsx(m,{children:"Generate an MCP configuration JSON for use with Claude Code, Cursor, or any MCP-compatible tool."}),n.jsx(pe,{block:!0,children:`upfyn-code mcp
|
|
444
|
+
upfyn-code mcp --server https://cli.upfyn.com --key rt_xxx`}),n.jsxs(m,{children:["Outputs a JSON config you can paste into your AI tool's MCP settings. See the ",n.jsx("button",{onClick:()=>g("mcp"),className:"text-blue-400 hover:underline",children:"MCP Protocol"})," section for details."]}),n.jsx(v,{id:"remote-access",children:"Remote Access"}),n.jsx(m,{children:"Remote access is the foundation of Upfyn-Code. The relay system lets you access your development environment from any browser without exposing ports, configuring firewalls, or using VPNs."}),n.jsx(x,{children:"How the relay works"}),n.jsxs(m,{children:["When you run ",n.jsx(pe,{children:"upfyn-code connect"}),", the CLI establishes an outbound WebSocket connection to the Upfyn-Code server. The browser UI connects to the same server. The server acts as a message broker — routing commands from the browser to your CLI and responses back."]}),n.jsxs(w,{children:[n.jsxs(u,{children:[n.jsx("strong",{className:"text-white",children:"Terminal commands"})," — you type ",n.jsx(pe,{children:"npm run dev"})," in the browser, it executes on your machine"]}),n.jsxs(u,{children:[n.jsx("strong",{className:"text-white",children:"File operations"})," — browse, read, edit, create, delete files on your local filesystem"]}),n.jsxs(u,{children:[n.jsx("strong",{className:"text-white",children:"Git operations"})," — stage, commit, push, pull, branch — all running locally"]}),n.jsxs(u,{children:[n.jsx("strong",{className:"text-white",children:"AI queries"})," — the AI assistant can read your project context through the relay"]})]}),n.jsx(x,{children:"Connection lifecycle"}),n.jsx(pe,{block:!0,children:`1. CLI starts → authenticates with server
|
|
445
|
+
2. WebSocket tunnel established (encrypted)
|
|
446
|
+
3. Browser connects → server pairs browser ↔ CLI
|
|
447
|
+
4. Commands flow: Browser → Server → CLI → Execute → Response → Browser
|
|
448
|
+
5. CLI disconnects → browser shows "disconnected" state
|
|
449
|
+
6. CLI reconnects → session resumes automatically`}),n.jsx(x,{children:"Security model"}),n.jsxs(w,{children:[n.jsx(u,{children:"All connections are encrypted (WSS/TLS)"}),n.jsx(u,{children:"No inbound ports exposed on your machine"}),n.jsx(u,{children:"Relay tokens are scoped per-user and per-session"}),n.jsx(u,{children:"File operations are sandboxed to your project directory"}),n.jsx(u,{children:"The server never stores your code — only relays messages"})]}),n.jsx(v,{id:"ai-chat",children:"AI Chat"}),n.jsx(m,{children:"The AI Chat is your primary interface for working with AI coding assistants. It's not just a chatbot — it's a full coding partner that understands your project context."}),n.jsx(x,{children:"What you can do"}),n.jsxs(w,{children:[n.jsxs(u,{children:[n.jsx("strong",{className:"text-white",children:"Write code"}),' — "Write a REST API for user authentication with JWT"']}),n.jsxs(u,{children:[n.jsx("strong",{className:"text-white",children:"Debug errors"})," — paste an error message and get a fix"]}),n.jsxs(u,{children:[n.jsx("strong",{className:"text-white",children:"Explain code"}),' — "Explain what this regex does"']}),n.jsxs(u,{children:[n.jsx("strong",{className:"text-white",children:"Refactor"}),' — "Refactor this to use async/await instead of callbacks"']}),n.jsxs(u,{children:[n.jsx("strong",{className:"text-white",children:"Architecture"}),' — "Design a database schema for an e-commerce app"']}),n.jsxs(u,{children:[n.jsx("strong",{className:"text-white",children:"DevOps"}),' — "Write a Dockerfile for this Node.js app"']})]}),n.jsx(x,{children:"Features"}),n.jsxs(w,{children:[n.jsx(u,{children:"Streaming responses with real-time character-by-character typing"}),n.jsx(u,{children:"Full conversation history preserved across sessions"}),n.jsx(u,{children:"Syntax-highlighted code blocks with copy support"}),n.jsx(u,{children:"Multi-model support — GPT-4o, Claude, Gemini"}),n.jsx(u,{children:"Context-aware suggestions based on your project files"}),n.jsx(u,{children:"Markdown rendering for rich formatted responses"})]}),n.jsx(x,{children:"Project context"}),n.jsx(m,{children:"When your machine is connected, the AI can access your project structure to give more relevant answers. It can reference your actual files, suggest changes to your real code, and understand your project's architecture."}),n.jsx(v,{id:"terminal",children:"Terminal"}),n.jsx(m,{children:"The integrated terminal gives you full shell access to your connected machine — right from the browser. It's not a simulation — every command runs on your actual machine."}),n.jsx(x,{children:"Features"}),n.jsxs(w,{children:[n.jsx(u,{children:"Full ANSI color output (256 colors)"}),n.jsx(u,{children:"Real-time output streaming via WebSocket"}),n.jsx(u,{children:"Command history with arrow key navigation"}),n.jsx(u,{children:"Resizable terminal with auto-fit"}),n.jsx(u,{children:"Uses node-pty when available for full PTY support"}),n.jsx(u,{children:"Fallback to relay-based execution for lightweight usage"})]}),n.jsx(x,{children:"Example usage"}),n.jsx(pe,{block:!0,children:`~/my-project $ npm run dev
|
|
450
|
+
VITE v7.1.8 ready in 342 ms
|
|
451
|
+
➜ Local: http://localhost:5173/
|
|
452
|
+
|
|
453
|
+
~/my-project $ docker compose up -d
|
|
454
|
+
✓ Container redis started
|
|
455
|
+
✓ Container postgres started
|
|
456
|
+
|
|
457
|
+
~/my-project $ python train.py --epochs 50
|
|
458
|
+
Epoch 1/50: loss=2.341, acc=0.42
|
|
459
|
+
Epoch 2/50: loss=1.892, acc=0.58`}),n.jsx(m,{children:"Any command you can run in your local terminal works here — npm, docker, python, cargo, go, kubectl, terraform — whatever tools you have installed."}),n.jsx(v,{id:"file-explorer",children:"File Explorer"}),n.jsx(m,{children:"The file explorer lets you browse, read, edit, and manage your project files directly from the browser. All operations run on your connected machine."}),n.jsx(x,{children:"Features"}),n.jsxs(w,{children:[n.jsx(u,{children:"Expandable/collapsible directory tree"}),n.jsx(u,{children:"File creation, renaming, and deletion"}),n.jsx(u,{children:"Syntax-highlighted code viewer for 50+ languages"}),n.jsx(u,{children:"Line numbers with click-to-navigate"}),n.jsx(u,{children:"Search within files"}),n.jsx(u,{children:"Workspace path validation for safety (prevents access outside project root)"}),n.jsx(u,{children:"File size and line count display"})]}),n.jsx(T,{children:"File operations are sandboxed to your project directory. The explorer cannot access files outside the workspace root."}),n.jsx(v,{id:"git",children:"Git Management"}),n.jsx(m,{children:"The visual git interface lets you manage version control entirely from the browser — no need to switch to the terminal for basic git operations."}),n.jsx(x,{children:"Commit log"}),n.jsx(m,{children:"View your commit history with color-coded tags (feat, fix, refactor, init), commit hashes, authors, timestamps, and file change counts. Click a commit to see its details."}),n.jsx(x,{children:"Changes view"}),n.jsx(m,{children:"See all unstaged changes with per-file addition/deletion counts. Stage individual files or all changes at once. Create commits with messages directly from the UI."}),n.jsx(x,{children:"Branches"}),n.jsx(m,{children:"View all branches with ahead/behind status. Switch branches, see the current HEAD, and manage your branching workflow visually."}),n.jsx(x,{children:"All git features"}),n.jsxs(w,{children:[n.jsx(u,{children:"Visual commit history with color-coded types"}),n.jsx(u,{children:"Inline diff viewer for staged and unstaged changes"}),n.jsx(u,{children:"Stage/unstage individual files or all"}),n.jsx(u,{children:"Create commits with commit messages"}),n.jsx(u,{children:"Switch branches"}),n.jsx(u,{children:"Ahead/behind counts for each branch"}),n.jsx(u,{children:"Git config management (name, email auto-sync)"}),n.jsx(u,{children:"Push and pull operations"})]}),n.jsx(v,{id:"canvas",children:"Upfyn Canvas"}),n.jsx(m,{children:"The Upfyn Canvas is a feature unique to Upfyn-Code — a visual, infinite workspace where you can plan, research, code, and track your project using AI-powered blocks connected in a flow."}),n.jsx(x,{children:"Block types"}),n.jsxs(w,{children:[n.jsxs(u,{children:[n.jsx("strong",{className:"text-blue-400",children:"Chat block"})," — start an AI conversation for planning, coding, or debugging"]}),n.jsxs(u,{children:[n.jsx("strong",{className:"text-cyan-400",children:"Research block"})," — AI searches the web for best practices, documentation, and solutions"]}),n.jsxs(u,{children:[n.jsx("strong",{className:"text-amber-400",children:"Notes block"})," — freeform text notes for architecture decisions, TODOs, meeting notes"]}),n.jsxs(u,{children:[n.jsx("strong",{className:"text-purple-400",children:"PDF block"})," — drop PDF documents for reference (API docs, specs, papers)"]}),n.jsxs(u,{children:[n.jsx("strong",{className:"text-green-400",children:"Code block"})," — write and edit code with syntax highlighting"]}),n.jsxs(u,{children:[n.jsx("strong",{className:"text-rose-400",children:"Dashboard block"})," — track project metrics (files, lines, tests, coverage)"]})]}),n.jsx(x,{children:"Connections"}),n.jsx(m,{children:"Blocks are connected with bezier curves. Output from one block flows as input to the next — creating AI-powered workflows. For example:"}),n.jsx(pe,{block:!0,children:`Chat (plan architecture)
|
|
460
|
+
└→ Research (find best practices)
|
|
461
|
+
└→ Code (generate implementation)
|
|
462
|
+
└→ Dashboard (track progress)`}),n.jsx(x,{children:"Canvas controls"}),n.jsxs(w,{children:[n.jsxs(u,{children:[n.jsx("strong",{className:"text-white",children:"Pan"})," — click and drag the background (or touch-drag on mobile)"]}),n.jsxs(u,{children:[n.jsx("strong",{className:"text-white",children:"Zoom"})," — scroll wheel (or pinch on mobile)"]}),n.jsxs(u,{children:[n.jsx("strong",{className:"text-white",children:"Connect blocks"})," — drag from an output port to an input port"]}),n.jsxs(u,{children:[n.jsx("strong",{className:"text-white",children:"Move blocks"})," — click and drag any block"]}),n.jsxs(u,{children:[n.jsx("strong",{className:"text-white",children:"Fit to view"})," — auto-zoom to show all blocks"]}),n.jsxs(u,{children:[n.jsx("strong",{className:"text-white",children:"Reset"})," — restore to default layout"]})]}),n.jsx(v,{id:"mcp",children:"MCP Protocol"}),n.jsxs(m,{children:[n.jsx("strong",{className:"text-white",children:"Model Context Protocol (MCP)"})," is an open standard for connecting AI tools to data sources and services. Upfyn-Code supports MCP both as a ",n.jsx("strong",{className:"text-white",children:"server"})," (other tools connect to it) and as a ",n.jsx("strong",{className:"text-white",children:"client"})," (it connects to other MCP servers)."]}),n.jsx(x,{children:"Use Upfyn-Code with Claude Code or Cursor"}),n.jsx(m,{children:"Generate your MCP config with:"}),n.jsx(pe,{block:!0,children:"upfyn-code mcp"}),n.jsx(m,{children:"This outputs JSON you paste into your AI tool's settings:"}),n.jsx(pe,{block:!0,children:`{
|
|
463
|
+
"mcpServers": {
|
|
464
|
+
"upfyn-code": {
|
|
465
|
+
"url": "https://cli.upfyn.com/mcp",
|
|
466
|
+
"headers": {
|
|
467
|
+
"Authorization": "Bearer rt_your_relay_token"
|
|
468
|
+
}
|
|
469
|
+
}
|
|
470
|
+
}
|
|
471
|
+
}`}),n.jsxs(m,{children:["Now Claude Code, Cursor, Windsurf, or any MCP-compatible tool can ",n.jsx("strong",{className:"text-white",children:"read your files, run commands, and manage git"})," through Upfyn-Code's relay — even when you're not in the Upfyn-Code browser UI."]}),n.jsx(x,{children:"Connect external MCP servers"}),n.jsx(m,{children:"You can also connect external MCP servers to Upfyn-Code:"}),n.jsx(pe,{block:!0,children:`// MCP server configuration
|
|
472
|
+
{
|
|
473
|
+
"mcpServers": {
|
|
474
|
+
"my-database": {
|
|
475
|
+
"command": "node",
|
|
476
|
+
"args": ["./db-mcp-server.js"],
|
|
477
|
+
"env": { "DB_URL": "postgres://..." }
|
|
478
|
+
},
|
|
479
|
+
"my-api": {
|
|
480
|
+
"url": "https://api.example.com/mcp",
|
|
481
|
+
"headers": { "Authorization": "Bearer ..." }
|
|
482
|
+
}
|
|
483
|
+
}
|
|
484
|
+
}`}),n.jsx(m,{children:"Supported transports: stdio, HTTP, and SSE. Servers can be scoped per-user or per-project."}),n.jsx(x,{children:"Why MCP matters"}),n.jsxs(m,{children:["MCP is the bridge between AI tools. Instead of being locked into one ecosystem, you can use Upfyn-Code as a ",n.jsx("strong",{className:"text-white",children:"universal adapter"})," — connecting any AI assistant to your local machine through a standardized protocol."]}),n.jsx(v,{id:"taskmaster",children:"TaskMaster AI"}),n.jsx(m,{children:"TaskMaster is an AI-powered project management integration built into Upfyn-Code. It turns high-level requirements into structured, actionable task lists."}),n.jsx(x,{children:"How it works"}),n.jsxs(w,{children:[n.jsx(u,{children:"Give it a PRD (Product Requirements Document) or describe your feature"}),n.jsx(u,{children:"AI breaks it down into tasks with dependencies"}),n.jsx(u,{children:"Visual Kanban-style task board for tracking progress"}),n.jsx(u,{children:"Tasks can be linked to Canvas blocks for visual planning"}),n.jsx(u,{children:"Real-time status updates via WebSocket"})]}),n.jsx(x,{children:"Task features"}),n.jsxs(w,{children:[n.jsx(u,{children:"AI-generated task breakdown from natural language descriptions"}),n.jsx(u,{children:"Task dependencies (this task blocks that task)"}),n.jsx(u,{children:"Priority levels (critical, high, medium, low)"}),n.jsx(u,{children:"Time estimates generated by AI"}),n.jsxs(u,{children:["Auto-detection of ",n.jsx(pe,{children:".taskmaster"})," directory in projects"]})]}),n.jsx(v,{id:"security",children:"Security"}),n.jsx(m,{children:"Security is foundational to Upfyn-Code's design. Since the platform bridges your local machine to a remote interface, every layer is built with security in mind."}),n.jsx(x,{children:"Relay security"}),n.jsxs(w,{children:[n.jsxs(u,{children:["All WebSocket connections use ",n.jsx("strong",{className:"text-white",children:"WSS (TLS encrypted)"})]}),n.jsx(u,{children:"No inbound ports exposed on your machine — only outbound connections"}),n.jsx(u,{children:"Relay tokens are cryptographically generated and scoped per-session"}),n.jsxs(u,{children:["The server ",n.jsx("strong",{className:"text-white",children:"never stores your code"})," — only passes messages"]}),n.jsx(u,{children:"File operations are sandboxed to the project workspace"})]}),n.jsx(x,{children:"Authentication"}),n.jsxs(w,{children:[n.jsxs(u,{children:["Passwords hashed with ",n.jsx("strong",{className:"text-white",children:"bcrypt (12 rounds)"})]}),n.jsx(u,{children:"JWT tokens with configurable expiration"}),n.jsx(u,{children:"HTTP-only, Secure, SameSite cookies for session management"}),n.jsx(u,{children:"No sensitive data in localStorage or client-side storage"})]}),n.jsx(x,{children:"Payment security"}),n.jsxs(w,{children:[n.jsxs(u,{children:["All payments processed through ",n.jsx("strong",{className:"text-white",children:"Razorpay"})," (PCI DSS compliant)"]}),n.jsx(u,{children:"No card data ever touches our servers"}),n.jsx(u,{children:"HMAC signature verification for payment callbacks"})]}),n.jsx(v,{id:"api-keys",children:"API Keys"}),n.jsx(m,{children:"API keys provide programmatic access to the Upfyn-Code backend for automation, integrations, and custom workflows."}),n.jsx(x,{children:"Managing API keys"}),n.jsxs(w,{children:[n.jsx(u,{children:"Generate new API keys from the Settings panel in the web UI"}),n.jsx(u,{children:"Each key is scoped to the authenticated user"}),n.jsx(u,{children:"Keys can be enabled/disabled without deleting them"}),n.jsx(u,{children:"Revoke keys at any time for security"})]}),n.jsx(x,{children:"Usage"}),n.jsxs(m,{children:["Include the API key in the ",n.jsx(pe,{children:"Authorization"})," header:"]}),n.jsx(pe,{block:!0,children:`curl -H "Authorization: Bearer your_api_key" \\
|
|
485
|
+
https://cli.upfyn.com/api/your-endpoint`}),n.jsx(m,{children:"API keys support the same operations available through the web UI — file operations, terminal commands, git management, and AI chat."}),n.jsx(v,{id:"configuration",children:"Configuration"}),n.jsx(x,{children:"CLI config file"}),n.jsxs(m,{children:["The CLI stores configuration in ",n.jsx(pe,{children:"~/.upfynrc"}),":"]}),n.jsx(pe,{block:!0,children:`{
|
|
486
|
+
"token": "eyJhbGci...",
|
|
487
|
+
"user": {
|
|
488
|
+
"firstName": "John",
|
|
489
|
+
"email": "john@example.com"
|
|
490
|
+
},
|
|
491
|
+
"serverUrl": "https://cli.upfyn.com",
|
|
492
|
+
"localPort": 4200
|
|
493
|
+
}`}),n.jsxs(w,{children:[n.jsxs(u,{children:[n.jsx(pe,{children:"token"})," — your authentication JWT (set by ",n.jsx(pe,{children:"upfyn-code login"}),")"]}),n.jsxs(u,{children:[n.jsx(pe,{children:"user"})," — cached user info for display"]}),n.jsxs(u,{children:[n.jsx(pe,{children:"serverUrl"})," — the backend server URL"]}),n.jsxs(u,{children:[n.jsx(pe,{children:"localPort"})," — port for local mode (",n.jsx(pe,{children:"--local"})," flag)"]})]}),n.jsx(x,{children:"Environment variables"}),n.jsx(pe,{block:!0,children:`# Frontend (Vercel)
|
|
494
|
+
VITE_BACKEND_URL # Backend API URL
|
|
495
|
+
VITE_RAZORPAY_KEY # Razorpay public key
|
|
496
|
+
|
|
497
|
+
# Backend (Railway)
|
|
498
|
+
PORT # Server port (default: 3001)
|
|
499
|
+
JWT_SECRET # JWT signing secret
|
|
500
|
+
TURSO_DATABASE_URL # Turso database URL
|
|
501
|
+
TURSO_AUTH_TOKEN # Turso auth token
|
|
502
|
+
RAZORPAY_KEY_ID # Razorpay key ID
|
|
503
|
+
RAZORPAY_KEY_SECRET # Razorpay secret
|
|
504
|
+
IS_PLATFORM # "true" for platform mode`}),n.jsx(v,{id:"self-hosting",children:"Self-Hosting"}),n.jsx(m,{children:"Upfyn-Code can be fully self-hosted. This gives you complete control over your data, infrastructure, and configuration."}),n.jsx(x,{children:"Quick setup"}),n.jsx(pe,{block:!0,children:`# Clone the repository
|
|
505
|
+
git clone https://github.com/AnitChaudhry/UpfynAI-Code.git
|
|
506
|
+
cd UpfynAI-Code
|
|
507
|
+
|
|
508
|
+
# Install dependencies
|
|
509
|
+
npm install
|
|
510
|
+
|
|
511
|
+
# Set up environment variables
|
|
512
|
+
cp .env.example .env
|
|
513
|
+
# Edit .env with your values
|
|
514
|
+
|
|
515
|
+
# Development mode
|
|
516
|
+
npm run dev
|
|
517
|
+
|
|
518
|
+
# Production build
|
|
519
|
+
npm run build
|
|
520
|
+
npm start`}),n.jsx(x,{children:"Requirements"}),n.jsxs(w,{children:[n.jsx(u,{children:"Node.js 18+"}),n.jsx(u,{children:"A Turso database (or any libSQL-compatible DB)"}),n.jsx(u,{children:"Optional: Razorpay keys for payment processing"}),n.jsx(u,{children:"Optional: AI API keys (OpenAI, Anthropic, Google) for chat"})]}),n.jsx(m,{children:"In self-hosted mode, all data stays on your infrastructure. The first user to register automatically becomes the admin."}),n.jsx(b,{children:"Self-hosted mode is perfect for teams that need full control over their development environment and data."}),n.jsx(v,{id:"faq",children:"FAQ"}),n.jsx(x,{children:"Does my code get sent to the cloud?"}),n.jsx(m,{children:`No. Your code stays on your machine. The relay only passes structured messages (commands like "read file X" and responses like "here's the content"). The server never stores your code.`}),n.jsx(x,{children:"What happens if the connection drops?"}),n.jsx(m,{children:'The browser UI shows a "disconnected" indicator. When the CLI reconnects, the session resumes automatically. Your work in the AI chat, canvas, and other tabs is preserved locally.'}),n.jsx(x,{children:"Can I use Upfyn-Code offline?"}),n.jsx(m,{children:"The web UI requires an internet connection to communicate with the backend. However, if you self-host, you can run everything on your local network."}),n.jsx(x,{children:"Which AI models are supported?"}),n.jsx(m,{children:"Upfyn-Code supports GPT-4o (OpenAI), Claude (Anthropic), and Gemini (Google). Model availability depends on your plan and configured API keys."}),n.jsx(x,{children:"Is Upfyn-Code open source?"}),n.jsx(m,{children:"Yes, Upfyn-Code is licensed under GPL-3.0. You can self-host, customize, and contribute to the codebase."}),n.jsx(x,{children:"How is this different from VS Code in the browser?"}),n.jsxs(m,{children:["VS Code in the browser (like code-server) gives you a remote editor. Upfyn-Code gives you an ",n.jsx("strong",{className:"text-white",children:"AI-first development environment"})," with built-in AI chat, visual Canvas workflows, MCP protocol support, and a purpose-built interface for working with AI assistants — not just editing files."]}),n.jsx(x,{children:"Can I use it on my phone?"}),n.jsx(m,{children:"Yes! Upfyn-Code is mobile-first responsive. The full interface — chat, terminal, files, git, canvas — works on phones and tablets. Touch gestures are supported for canvas pan/zoom."}),n.jsxs("div",{className:"mt-12 p-6 rounded-xl border border-white/[0.06] bg-white/[0.02] text-center",children:[n.jsxs("p",{className:"text-slate-400 text-sm mb-3",children:["Built by ",n.jsx("a",{href:"https://www.thinqmesh.com",target:"_blank",rel:"noopener noreferrer",className:"text-blue-400 hover:underline",children:"Thinqmesh Technologies"})]}),n.jsxs("p",{className:"text-slate-600 text-xs",children:["Questions? Visit the ",n.jsx("button",{onClick:()=>window.location.href="/contact",className:"text-blue-400 hover:underline",children:"Contact page"})," or email ",n.jsx("a",{href:"mailto:contact@thinqmesh.com",className:"text-blue-400 hover:underline",children:"contact@thinqmesh.com"})]})]})]})]}),n.jsx(Hn,{})]})}const a0=[{icon:kd,color:"blue",title:"AI Chat",desc:"Multi-model conversations with GPT-4o, Claude, and Gemini. Write code, debug, explain, and architect — all in context."},{icon:ps,color:"emerald",title:"Remote Terminal",desc:"Run shell commands on your connected machine from any browser. Full ANSI color, resize, and real-time output streaming."},{icon:Nd,color:"purple",title:"File Explorer",desc:"Browse, read, and edit project files remotely with syntax highlighting and workspace validation."},{icon:Fn,color:"amber",title:"Git Management",desc:"Visual commit history, branch switching, staging, diffs — version control without leaving the browser."},{icon:hs,color:"rose",title:"Upfyn Canvas",desc:"Visual AI workflow builder with connected blocks: Chat, Research, Code, Dashboard, Notes, and PDF."},{icon:Sd,color:"cyan",title:"MCP Protocol",desc:"Model Context Protocol support — connect Upfyn-Code to Claude Code, Cursor, or any MCP-compatible tool."}],o0={blue:"bg-blue-500/10",emerald:"bg-emerald-500/10",purple:"bg-purple-500/10",amber:"bg-amber-500/10",rose:"bg-rose-500/10",cyan:"bg-cyan-500/10"},i0={blue:"text-blue-400",emerald:"text-emerald-400",purple:"text-purple-400",amber:"text-amber-400",rose:"text-rose-400",cyan:"text-cyan-400"};function c0({onOpenAuth:i}){return y.useEffect(()=>(document.title="About — Upfyn-Code",()=>{document.title="Upfyn-Code"}),[]),n.jsxs("div",{className:"min-h-screen bg-[#0a0f1e] text-slate-200",children:[n.jsx(Bn,{onOpenAuth:i}),n.jsx("main",{className:"pt-24 pb-20 px-4 sm:px-6",children:n.jsxs("div",{className:"max-w-4xl mx-auto",children:[n.jsxs("div",{className:"text-center mb-14",children:[n.jsx("p",{className:"text-sm font-mono text-emerald-400/80 tracking-wider uppercase mb-3",children:"About"}),n.jsxs("h1",{className:"text-3xl sm:text-4xl lg:text-5xl font-bold text-white mb-4",children:["Code from"," ",n.jsx("span",{className:"bg-gradient-to-r from-blue-400 via-purple-400 to-emerald-400 bg-clip-text text-transparent",children:"anywhere"})]}),n.jsx("p",{className:"text-slate-500 text-base sm:text-lg max-w-2xl mx-auto",children:"Upfyn-Code is a cloud IDE that connects to your local machine. Write code, debug, manage git, and build AI workflows — all from any browser."})]}),n.jsxs("section",{className:"mb-16",children:[n.jsx("h2",{className:"text-xl sm:text-2xl font-bold text-white mb-4",children:"What is Upfyn-Code?"}),n.jsxs("div",{className:"space-y-4 text-slate-400 text-sm sm:text-base leading-relaxed",children:[n.jsxs("p",{children:[n.jsx("strong",{className:"text-white",children:"Upfyn-Code"})," is a unified visual interface for AI-powered coding. Install the CLI on your machine, run ",n.jsx("code",{className:"text-emerald-400 bg-slate-800/50 px-1.5 rounded",children:"upfyn-code connect"}),", and your full development environment becomes accessible from any browser — desktop, tablet, or phone."]}),n.jsxs("p",{children:["Unlike cloud sandboxes that run code on remote VMs, Upfyn-Code executes everything on ",n.jsx("strong",{className:"text-white",children:"your local machine"})," through a secure WebSocket relay. Your files, terminal, and git all run locally — the browser is just the interface."]})]})]}),n.jsxs("section",{className:"mb-16",children:[n.jsx("h2",{className:"text-xl sm:text-2xl font-bold text-white mb-6",children:"How it works"}),n.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-4",children:[{step:"01",title:"Install",desc:"npm install -g upfyn-code",detail:"One command to set up the CLI globally on your machine."},{step:"02",title:"Connect",desc:"upfyn-code connect",detail:"Establishes an encrypted WebSocket tunnel to the cloud interface."},{step:"03",title:"Code",desc:"Open cli.upfyn.com",detail:"Full IDE in the browser — AI chat, terminal, files, git, and canvas."}].map(o=>n.jsxs("div",{className:"rounded-xl border border-white/[0.06] bg-white/[0.02] p-5",children:[n.jsx("div",{className:"text-emerald-400 font-mono text-xs mb-2",children:o.step}),n.jsx("h3",{className:"text-white font-semibold mb-1",children:o.title}),n.jsx("code",{className:"text-emerald-400/80 text-xs font-mono",children:o.desc}),n.jsx("p",{className:"text-slate-500 text-sm mt-2",children:o.detail})]},o.step))})]}),n.jsxs("section",{className:"mb-16",children:[n.jsx("h2",{className:"text-xl sm:text-2xl font-bold text-white mb-4",children:"Architecture"}),n.jsxs("div",{className:"rounded-xl border border-white/[0.06] bg-white/[0.02] p-6 space-y-4 text-slate-400 text-sm leading-relaxed",children:[n.jsx("p",{children:"The system has three main components:"}),n.jsxs("ul",{className:"space-y-3 ml-1",children:[n.jsxs("li",{className:"flex items-start gap-3",children:[n.jsx(as,{size:16,className:"text-blue-400 mt-0.5 shrink-0"}),n.jsxs("span",{children:[n.jsx("strong",{className:"text-white",children:"Frontend"})," — React + Vite + Tailwind CSS, deployed on Vercel. The browser-based IDE interface with AI chat, terminal emulator, file explorer, git panel, and canvas."]})]}),n.jsxs("li",{className:"flex items-start gap-3",children:[n.jsx(as,{size:16,className:"text-emerald-400 mt-0.5 shrink-0"}),n.jsxs("span",{children:[n.jsx("strong",{className:"text-white",children:"Backend"})," — Node.js + Express, deployed on Railway. Handles authentication, WebSocket relay, AI model routing, payment processing, and database operations via Turso (libSQL)."]})]}),n.jsxs("li",{className:"flex items-start gap-3",children:[n.jsx(as,{size:16,className:"text-purple-400 mt-0.5 shrink-0"}),n.jsxs("span",{children:[n.jsx("strong",{className:"text-white",children:"CLI"})," — Published on npm as ",n.jsx("code",{className:"text-emerald-400 bg-slate-800/50 px-1 rounded",children:"upfyn-code"}),". Runs on the user's machine and bridges local filesystem, terminal, and git to the cloud via encrypted WebSocket tunnels."]})]})]}),n.jsxs("p",{children:["All operations execute ",n.jsx("strong",{className:"text-white",children:"locally on your machine"}),". The relay never stores your code — it only passes messages between the browser and CLI in real-time."]})]})]}),n.jsxs("section",{className:"mb-16",children:[n.jsx("h2",{className:"text-xl sm:text-2xl font-bold text-white mb-6",children:"Capabilities"}),n.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:a0.map(o=>{const c=o.icon;return n.jsxs("div",{className:"rounded-xl border border-white/[0.06] bg-white/[0.02] p-5 hover:border-white/10 hover:bg-white/[0.03] transition-all duration-300",children:[n.jsxs("div",{className:"flex items-center gap-3 mb-3",children:[n.jsx("div",{className:`w-9 h-9 rounded-lg ${o0[o.color]} flex items-center justify-center`,children:n.jsx(c,{size:18,className:i0[o.color]})}),n.jsx("h3",{className:"text-white font-semibold text-sm",children:o.title})]}),n.jsx("p",{className:"text-slate-400 text-sm leading-relaxed",children:o.desc})]},o.title)})})]}),n.jsxs("section",{className:"mb-16",children:[n.jsx("h2",{className:"text-xl sm:text-2xl font-bold text-white mb-4",children:"Security"}),n.jsxs("div",{className:"rounded-xl border border-white/[0.06] bg-white/[0.02] p-6 flex items-start gap-4",children:[n.jsx("div",{className:"w-10 h-10 rounded-xl bg-emerald-500/10 flex items-center justify-center shrink-0",children:n.jsx(Td,{size:20,className:"text-emerald-400"})}),n.jsxs("div",{className:"text-slate-400 text-sm leading-relaxed space-y-2",children:[n.jsx("p",{children:"Upfyn-Code is built with security as a priority:"}),n.jsxs("ul",{className:"list-disc list-inside space-y-1 ml-1",children:[n.jsxs("li",{children:["All relay connections use ",n.jsx("strong",{className:"text-white",children:"encrypted WebSocket tunnels"})]}),n.jsxs("li",{children:["Your code ",n.jsx("strong",{className:"text-white",children:"never leaves your machine"})," — only relay messages pass through"]}),n.jsx("li",{children:"Passwords are hashed with bcrypt (12 rounds)"}),n.jsx("li",{children:"Sessions use HTTP-only, secure, SameSite cookies"}),n.jsx("li",{children:"Payments processed securely via Razorpay — no card data stored"}),n.jsxs("li",{children:["Self-hosting option keeps ",n.jsx("strong",{className:"text-white",children:"everything on your infrastructure"})]})]})]})]})]}),n.jsxs("section",{className:"mb-16",children:[n.jsxs("h2",{className:"text-xl sm:text-2xl font-bold text-white mb-4",children:["Built by ",n.jsx("a",{href:"https://www.thinqmesh.com",target:"_blank",rel:"noopener noreferrer",className:"hover:text-blue-400 transition-colors",children:"Thinqmesh Technologies"})]}),n.jsxs("div",{className:"text-slate-400 text-sm sm:text-base leading-relaxed space-y-3",children:[n.jsxs("p",{children:[n.jsx("a",{href:"https://www.thinqmesh.com",target:"_blank",rel:"noopener noreferrer",className:"text-white font-bold hover:text-blue-400 transition-colors",children:"Thinqmesh Technologies"})," builds AI-powered developer tools and enterprise software solutions. Our focus is making development more accessible, efficient, and enjoyable — regardless of where you work or what device you use."]}),n.jsx("p",{children:"We believe the future of development is AI-augmented, browser-based, and device-agnostic. Upfyn-Code is our first step toward that vision."})]})]}),n.jsx("div",{className:"text-center",children:n.jsxs(dt,{to:"/contact",className:"inline-flex items-center gap-2 px-6 py-3 bg-white/10 hover:bg-white/15 border border-white/10 rounded-xl text-white text-sm font-medium transition-all active:scale-[0.97]",children:["Get in touch ",n.jsx(cs,{size:15})]})})]})}),n.jsx(Hn,{})]})}function u0({onOpenAuth:i}){y.useEffect(()=>(document.title="Privacy Policy — Upfyn-Code",()=>{document.title="Upfyn-Code"}),[]);const o=({title:c,children:h})=>n.jsxs("section",{className:"mb-8",children:[n.jsx("h2",{className:"text-lg font-semibold text-white mb-3",children:c}),n.jsx("div",{className:"text-slate-400 text-sm leading-relaxed space-y-3",children:h})]});return n.jsxs("div",{className:"min-h-screen bg-[#0a0f1e] text-slate-200",children:[n.jsx(Bn,{onOpenAuth:i}),n.jsx("main",{className:"pt-24 pb-20 px-4 sm:px-6",children:n.jsxs("div",{className:"max-w-3xl mx-auto",children:[n.jsx("h1",{className:"text-3xl sm:text-4xl font-bold text-white mb-2",children:"Privacy Policy"}),n.jsx("p",{className:"text-slate-600 text-sm mb-8",children:"Last updated: February 22, 2026"}),n.jsx("div",{className:"text-slate-400 text-sm leading-relaxed mb-8",children:n.jsx("p",{children:'This Privacy Policy describes how Thinqmesh Technologies ("we", "us", or "our") collects, uses, and protects your information when you use Upfyn-Code ("the Service"). By using the Service, you agree to the collection and use of information in accordance with this policy.'})}),n.jsxs(o,{title:"1. Information We Collect",children:[n.jsxs("p",{children:[n.jsx("strong",{className:"text-white",children:"Account information:"})," When you create an account, we collect your name, email address, and an encrypted password. We do not store raw passwords — all credentials are hashed using industry-standard bcrypt."]}),n.jsxs("p",{children:[n.jsx("strong",{className:"text-white",children:"Authentication data:"})," If you sign in using a third-party provider (such as Google), we receive your name, email address, and profile picture from that provider. We do not receive or store your password from third-party providers."]}),n.jsxs("p",{children:[n.jsx("strong",{className:"text-white",children:"Usage data:"})," We collect basic usage metadata such as login timestamps, session duration, and feature usage to improve the service. We do not track your browsing activity outside of the Service."]}),n.jsxs("p",{children:[n.jsx("strong",{className:"text-white",children:"Device information:"})," We may collect device type, browser type, and operating system for service optimization and security purposes."]}),n.jsxs("p",{children:[n.jsx("strong",{className:"text-white",children:"Relay data:"})," When you connect your local machine via the CLI, session metadata (connection status, timestamps) is stored temporarily. Your source code, files, and terminal output are relayed in real-time and are ",n.jsx("strong",{className:"text-white",children:"not stored on our servers"}),"."]})]}),n.jsxs(o,{title:"2. Google OAuth and API Data",children:[n.jsx("p",{children:"Upfyn-Code may offer the option to sign in with your Google account. When you use Google Sign-In, we access the following information from your Google account:"}),n.jsxs("ul",{className:"list-disc list-inside space-y-1 ml-2",children:[n.jsxs("li",{children:[n.jsx("strong",{className:"text-white",children:"Basic profile information:"})," Your name, email address, and profile picture"]}),n.jsxs("li",{children:[n.jsx("strong",{className:"text-white",children:"Email address:"})," Used to create and identify your Upfyn-Code account"]})]}),n.jsxs("p",{children:["We use this information solely for the purpose of authenticating your identity and creating your account. We do ",n.jsx("strong",{className:"text-white",children:"not"})," request access to your Google Drive, Gmail, Calendar, or any other Google services beyond basic profile information."]}),n.jsxs("p",{children:["Upfyn-Code's use and transfer of information received from Google APIs adheres to the"," ",n.jsx("a",{href:"https://developers.google.com/terms/api-services-user-data-policy",target:"_blank",rel:"noopener noreferrer",className:"text-blue-400 hover:text-blue-300 underline",children:"Google API Services User Data Policy"}),", including the Limited Use requirements."]})]}),n.jsxs(o,{title:"3. How We Use Your Information",children:[n.jsx("p",{children:"We use your information to:"}),n.jsxs("ul",{className:"list-disc list-inside space-y-1 ml-2",children:[n.jsx("li",{children:"Authenticate your identity and maintain your session"}),n.jsx("li",{children:"Provide the relay connection between your local machine and the web interface"}),n.jsx("li",{children:"Store your preferences (theme, settings) for a consistent experience"}),n.jsx("li",{children:"Send essential service communications (password resets, security alerts)"}),n.jsx("li",{children:"Analyze aggregated usage patterns to improve the Service"}),n.jsx("li",{children:"Detect and prevent fraud, abuse, and security incidents"})]}),n.jsxs("p",{children:["We do ",n.jsx("strong",{className:"text-white",children:"not"})," sell, rent, or trade your personal information to any third party."]})]}),n.jsxs(o,{title:"4. Data Storage and Security",children:[n.jsx("p",{children:"Account data is stored in encrypted databases. Sessions and relay connections use WebSocket tunnels that transmit data directly between your browser and your local machine. We use JWT tokens for authentication and HTTPS/TLS for all communications."}),n.jsx("p",{children:"We implement appropriate technical and organizational measures to protect your personal data against unauthorized access, alteration, disclosure, or destruction. These include encryption at rest, encryption in transit, regular security audits, and access controls."}),n.jsx("p",{children:"If you self-host Upfyn-Code, all data stays entirely on your own infrastructure."})]}),n.jsxs(o,{title:"5. Third-Party Services",children:[n.jsx("p",{children:"Upfyn-Code may integrate with third-party AI services for code assistance features. When you use these features, your prompts and code context are sent to the respective AI provider's API according to their own privacy policies."}),n.jsx("p",{children:"We may use the following categories of third-party services:"}),n.jsxs("ul",{className:"list-disc list-inside space-y-1 ml-2",children:[n.jsxs("li",{children:[n.jsx("strong",{className:"text-white",children:"Authentication providers:"})," Google OAuth for sign-in"]}),n.jsxs("li",{children:[n.jsx("strong",{className:"text-white",children:"AI service providers:"})," For code generation and assistance features"]}),n.jsxs("li",{children:[n.jsx("strong",{className:"text-white",children:"Hosting providers:"})," For serving the web application"]})]}),n.jsx("p",{children:"No data is shared with third parties for advertising or marketing purposes."})]}),n.jsx(o,{title:"6. Cookies and Local Storage",children:n.jsx("p",{children:"We use httpOnly cookies for session authentication and browser localStorage for user preferences (theme selection, returning user name). We do not use tracking cookies, third-party analytics cookies, or advertising cookies."})}),n.jsxs(o,{title:"7. Your Rights",children:[n.jsx("p",{children:"Depending on your jurisdiction, you have the right to:"}),n.jsxs("ul",{className:"list-disc list-inside space-y-1 ml-2",children:[n.jsxs("li",{children:[n.jsx("strong",{className:"text-white",children:"Access:"})," Request a copy of the personal data we hold about you"]}),n.jsxs("li",{children:[n.jsx("strong",{className:"text-white",children:"Rectification:"})," Request correction of inaccurate personal data"]}),n.jsxs("li",{children:[n.jsx("strong",{className:"text-white",children:"Deletion:"})," Request deletion of your account and all associated data"]}),n.jsxs("li",{children:[n.jsx("strong",{className:"text-white",children:"Portability:"})," Request your data in a machine-readable format"]}),n.jsxs("li",{children:[n.jsx("strong",{className:"text-white",children:"Restriction:"})," Request that we limit processing of your data"]}),n.jsxs("li",{children:[n.jsx("strong",{className:"text-white",children:"Objection:"})," Object to processing based on legitimate interests"]}),n.jsxs("li",{children:[n.jsx("strong",{className:"text-white",children:"Withdrawal:"})," Withdraw consent at any time where processing is based on consent"]})]}),n.jsxs("p",{children:["To exercise any of these rights, contact us at ",n.jsx("span",{className:"text-blue-400",children:"privacy@thinqmesh.com"}),"."]})]}),n.jsx(o,{title:"8. Data Retention",children:n.jsx("p",{children:"Account data is retained for as long as your account is active. When you delete your account, all personal data is permanently removed within 30 days. Session data and relay logs are automatically purged after 24 hours of inactivity. Anonymized, aggregated analytics data may be retained for service improvement purposes."})}),n.jsx(o,{title:"9. International Data Transfers",children:n.jsx("p",{children:"Your information may be transferred to and processed in countries other than your country of residence. We ensure appropriate safeguards are in place for such transfers in compliance with applicable data protection laws."})}),n.jsx(o,{title:"10. Children's Privacy",children:n.jsx("p",{children:"The Service is not directed to children under the age of 13 (or 16 in the EEA). We do not knowingly collect personal information from children. If we become aware that we have collected personal data from a child without parental consent, we will take steps to delete that information."})}),n.jsx(o,{title:"11. Changes to This Policy",children:n.jsx("p",{children:'We may update this Privacy Policy from time to time. We will notify registered users of significant changes via email at least 30 days before the changes take effect. The "Last updated" date at the top of this page indicates when the policy was last revised.'})}),n.jsxs(o,{title:"12. Contact Us",children:[n.jsx("p",{children:"For privacy-related inquiries or to exercise your data rights, contact us at:"}),n.jsxs("ul",{className:"list-none space-y-1 ml-2",children:[n.jsxs("li",{children:["Email: ",n.jsx("span",{className:"text-blue-400",children:"privacy@thinqmesh.com"})]}),n.jsx("li",{children:"Company: Thinqmesh Technologies"})]})]})]})}),n.jsx(Hn,{})]})}function d0({onOpenAuth:i}){y.useEffect(()=>(document.title="Terms of Service — Upfyn-Code",()=>{document.title="Upfyn-Code"}),[]);const o=({title:c,children:h})=>n.jsxs("section",{className:"mb-8",children:[n.jsx("h2",{className:"text-lg font-semibold text-white mb-3",children:c}),n.jsx("div",{className:"text-slate-400 text-sm leading-relaxed space-y-3",children:h})]});return n.jsxs("div",{className:"min-h-screen bg-[#0a0f1e] text-slate-200",children:[n.jsx(Bn,{onOpenAuth:i}),n.jsx("main",{className:"pt-24 pb-20 px-4 sm:px-6",children:n.jsxs("div",{className:"max-w-3xl mx-auto",children:[n.jsx("h1",{className:"text-3xl sm:text-4xl font-bold text-white mb-2",children:"Terms of Service"}),n.jsx("p",{className:"text-slate-600 text-sm mb-8",children:"Last updated: February 22, 2026"}),n.jsx("div",{className:"text-slate-400 text-sm leading-relaxed mb-8",children:n.jsx("p",{children:'These Terms of Service ("Terms") govern your access to and use of Upfyn-Code, a product of Thinqmesh Technologies ("we", "us", or "our"). By accessing or using the Service, you agree to be bound by these Terms. If you do not agree, you may not use the Service.'})}),n.jsx(o,{title:"1. Definitions",children:n.jsxs("ul",{className:"list-disc list-inside space-y-1 ml-2",children:[n.jsxs("li",{children:[n.jsx("strong",{className:"text-white",children:'"Service"'})," refers to the Upfyn-Code web application, CLI tool, API, and all related services."]}),n.jsxs("li",{children:[n.jsx("strong",{className:"text-white",children:'"User"'})," refers to any individual or entity that creates an account or uses the Service."]}),n.jsxs("li",{children:[n.jsx("strong",{className:"text-white",children:'"Content"'})," refers to code, files, data, text, and other materials you create, upload, or transmit through the Service."]}),n.jsxs("li",{children:[n.jsx("strong",{className:"text-white",children:'"CLI"'})," refers to the Upfyn-Code command-line interface tool installed on your local machine."]})]})}),n.jsxs(o,{title:"2. Account Registration",children:[n.jsx("p",{children:"To use the Service, you must create an account by providing accurate and complete information. You may register using an email address and password or through a supported third-party authentication provider (such as Google)."}),n.jsx("p",{children:"You are responsible for maintaining the confidentiality of your account credentials and for all activities that occur under your account. You must immediately notify us of any unauthorized use of your account or any other breach of security."}),n.jsx("p",{children:"You must be at least 13 years of age (or 16 in the EEA) to create an account. By creating an account, you represent that you meet this age requirement."})]}),n.jsxs(o,{title:"3. Description of Service",children:[n.jsx("p",{children:"Upfyn-Code is a web-based development interface that connects to your local machine via the Upfyn-Code CLI. The Service provides AI-powered coding assistance, terminal access, file management, git integration, visual whiteboarding, and MCP protocol support through a browser-based interface."}),n.jsxs("p",{children:["The Service requires an active connection between your local machine (running the CLI) and the web interface. ",n.jsx("strong",{className:"text-white",children:"Upfyn-Code does not host, store, or backup your source code."})," All file operations are performed on your local machine through the relay connection. You are solely responsible for maintaining backups of your work."]})]}),n.jsxs(o,{title:"4. Third-Party Authentication",children:[n.jsx("p",{children:"If you choose to sign in using a third-party provider (such as Google), you authorize us to access basic profile information (name and email address) from that provider for the purpose of account creation and authentication. Your use of third-party sign-in is also subject to that provider's terms of service and privacy policy."}),n.jsx("p",{children:"You may revoke third-party access at any time through the respective provider's account settings. Revoking access will prevent future sign-ins via that provider but will not delete your Upfyn-Code account."})]}),n.jsxs(o,{title:"5. Acceptable Use",children:[n.jsx("p",{children:"You agree to use the Service only for lawful purposes. You agree not to:"}),n.jsxs("ul",{className:"list-disc list-inside space-y-1 ml-2",children:[n.jsx("li",{children:"Use the Service for any unlawful, harmful, or fraudulent purpose"}),n.jsx("li",{children:"Attempt to gain unauthorized access to other users' accounts, data, or systems"}),n.jsx("li",{children:"Interfere with, disrupt, or overburden the Service or its infrastructure"}),n.jsx("li",{children:"Reverse engineer, decompile, or disassemble the Service beyond what is permitted by the GPL-3.0 license"}),n.jsx("li",{children:"Use the Service to develop, distribute, or deploy malware, viruses, or harmful code"}),n.jsx("li",{children:"Resell, sublicense, or redistribute the hosted Service without written authorization"}),n.jsx("li",{children:"Use the Service to violate any applicable law, regulation, or third-party rights"}),n.jsx("li",{children:"Circumvent any security features or access controls of the Service"}),n.jsx("li",{children:"Use automated means (bots, scrapers) to access the Service without prior written consent"})]})]}),n.jsxs(o,{title:"6. Intellectual Property",children:[n.jsx("p",{children:"The Upfyn-Code software is licensed under the GNU General Public License v3.0 (GPL-3.0). The source code is available under the terms of that license."}),n.jsxs("p",{children:[n.jsx("strong",{className:"text-white",children:"You retain full ownership"})," of all code, files, and content you create, edit, or manage through the Service. Thinqmesh Technologies claims no intellectual property rights over your work product. The Service merely provides the interface through which you interact with your own local development environment."]}),n.jsx("p",{children:"The Upfyn-Code name, logo, and branding are trademarks of Thinqmesh Technologies and may not be used without written permission."})]}),n.jsxs(o,{title:"7. AI-Powered Features",children:[n.jsx("p",{children:'The Service may include AI-powered features for code generation, completion, and assistance. These features use third-party AI models and APIs. Output from AI features is provided "as is" and may contain errors, inaccuracies, or security vulnerabilities.'}),n.jsx("p",{children:"You are solely responsible for reviewing, testing, and validating any code or content generated by AI features before using it in production. We do not guarantee the accuracy, completeness, or fitness for purpose of AI-generated output."})]}),n.jsxs(o,{title:"8. Service Availability and Modifications",children:[n.jsx("p",{children:"We strive to maintain high availability but do not guarantee uninterrupted or error-free service. The Service depends on your local machine being online and connected via the CLI."}),n.jsx("p",{children:"We reserve the right to modify, suspend, or discontinue the Service (or any part thereof) at any time with or without notice. We will make reasonable efforts to notify users of significant changes. We are not liable for any modification, suspension, or discontinuation of the Service."})]}),n.jsx(o,{title:"9. Fees and Payment",children:n.jsx("p",{children:"The core Upfyn-Code service is currently provided free of charge. We reserve the right to introduce paid features or subscription plans in the future. If we do, we will notify existing users and provide clear terms before any charges apply."})}),n.jsxs(o,{title:"10. Limitation of Liability",children:[n.jsx("p",{children:'TO THE MAXIMUM EXTENT PERMITTED BY LAW, THE SERVICE IS PROVIDED "AS IS" AND "AS AVAILABLE" WITHOUT WARRANTIES OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT.'}),n.jsx("p",{children:"THINQMESH TECHNOLOGIES SHALL NOT BE LIABLE FOR ANY INDIRECT, INCIDENTAL, SPECIAL, CONSEQUENTIAL, OR PUNITIVE DAMAGES, OR ANY LOSS OF PROFITS, DATA, USE, GOODWILL, OR OTHER INTANGIBLE LOSSES, RESULTING FROM:"}),n.jsxs("ul",{className:"list-disc list-inside space-y-1 ml-2",children:[n.jsx("li",{children:"Your use of or inability to use the Service"}),n.jsx("li",{children:"Any unauthorized access to or alteration of your data"}),n.jsx("li",{children:"Loss of data resulting from relay connection interruptions"}),n.jsx("li",{children:"Any third-party conduct on or related to the Service"}),n.jsx("li",{children:"Any bugs, viruses, or errors in the Service or AI-generated output"})]}),n.jsx("p",{children:"Since all code operations execute on your local machine, you are responsible for maintaining backups of your work and ensuring appropriate version control practices."})]}),n.jsx(o,{title:"11. Indemnification",children:n.jsx("p",{children:"You agree to indemnify and hold harmless Thinqmesh Technologies, its officers, directors, employees, and agents from any claims, damages, losses, liabilities, costs, and expenses (including reasonable attorneys' fees) arising from your use of the Service, violation of these Terms, or infringement of any third-party rights."})}),n.jsxs(o,{title:"12. Termination",children:[n.jsx("p",{children:"You may terminate your account at any time by contacting us or using the account deletion feature. We may suspend or terminate your account if you violate these Terms, engage in fraudulent activity, or for any other reason at our sole discretion with reasonable notice."}),n.jsx("p",{children:"Upon termination, your right to use the Service ceases immediately. Your account data will be deleted in accordance with our Privacy Policy. Provisions that by their nature should survive termination (including Limitation of Liability, Indemnification, and Governing Law) shall survive."})]}),n.jsx(o,{title:"13. Dispute Resolution",children:n.jsx("p",{children:"Any dispute arising from these Terms or your use of the Service shall first be resolved through good-faith negotiation. If negotiation fails, disputes shall be resolved through binding arbitration in accordance with the rules of the applicable arbitration body in the jurisdiction where Thinqmesh Technologies is registered."})}),n.jsx(o,{title:"14. Changes to Terms",children:n.jsx("p",{children:'We may update these Terms from time to time. We will notify registered users of significant changes via email at least 30 days before the changes take effect. The "Last updated" date at the top indicates when these Terms were last revised. Continued use of the Service after changes constitutes acceptance of the updated Terms.'})}),n.jsx(o,{title:"15. Severability",children:n.jsx("p",{children:"If any provision of these Terms is found to be unenforceable or invalid, that provision shall be limited or eliminated to the minimum extent necessary, and the remaining provisions shall remain in full force and effect."})}),n.jsx(o,{title:"16. Entire Agreement",children:n.jsx("p",{children:"These Terms, together with our Privacy Policy, constitute the entire agreement between you and Thinqmesh Technologies regarding the use of the Service and supersede all prior agreements and understandings."})}),n.jsxs(o,{title:"17. Contact Us",children:[n.jsx("p",{children:"For questions about these Terms, contact us at:"}),n.jsxs("ul",{className:"list-none space-y-1 ml-2",children:[n.jsxs("li",{children:["Email: ",n.jsx("span",{className:"text-blue-400",children:"legal@thinqmesh.com"})]}),n.jsx("li",{children:"Company: Thinqmesh Technologies"})]})]})]})}),n.jsx(Hn,{})]})}const h0="",od="",p0=[{id:"monthly",name:"Monthly",icon:as,price:499,originalPrice:null,period:"/mo",duration:"1 month",badge:null,accent:"#3b82f6",accentRgb:"59, 130, 246",description:"Perfect for trying out Upfyn-Code",features:["AI Chat with all models","Integrated Terminal","File Explorer","Git Management","Upfyn Canvas","MCP Protocol","Connect command access","Priority support"]},{id:"half-yearly",name:"6 Months",icon:pf,price:2499,originalPrice:null,period:"/6mo",duration:"6 months",badge:"Most Popular",accent:"#a855f7",accentRgb:"168, 85, 247",description:"Best value for regular developers",features:["Everything in Monthly","TaskMaster AI project management","Advanced Canvas blocks","Multi-device sync","Early access to new features","Save ₹495 vs monthly"]},{id:"yearly",name:"Annual",icon:nx,price:499,originalPrice:4999,period:"/yr",duration:"1 year",badge:"90% Off",accent:"#10b981",accentRgb:"16, 185, 129",description:"Limited time launch offer",features:["Everything in 6 Months","Unlimited API key rotations","Custom MCP server configs","Team collaboration (coming soon)","Dedicated support channel","Save ₹4,500 vs monthly"]}],m0=[{planName:"Monthly",accent:"#3b82f6",accentRgb:"59, 130, 246",included:["AI Chat","Terminal","File Explorer","Git","Canvas","MCP Protocol","Connect Command","Priority Support"]},{planName:"6 Months",accent:"#a855f7",accentRgb:"168, 85, 247",included:["Everything in Monthly"],extras:["TaskMaster AI","Advanced Canvas","Multi-device Sync","Early Access"]},{planName:"Annual",accent:"#10b981",accentRgb:"16, 185, 129",included:["Everything in 6 Months"],extras:["Custom MCP Configs","Unlimited API Rotations","Dedicated Channel","Team Collab (soon)"]}];function f0({onOpenAuth:i,user:o,onSubscribed:c}){const h=Wn(),[p,g]=y.useState(null),[v,x]=y.useState(null);y.useEffect(()=>(document.title="Pricing — Upfyn-Code",()=>{document.title="Upfyn-Code"}),[]);const m=async u=>{if(!o){i("signup");return}g(u.id);try{const b=await(await fetch(`${od}/api/payments/create-order`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({planId:u.id}),credentials:"include"})).json();if(!b.orderId){alert("Could not create order. Please try again."),g(null);return}const C=b.originalAmount&&b.originalAmount!==b.amount?`${u.name} Plan — ${u.duration} (₹${(b.originalAmount/100).toLocaleString("en-IN")} → ₹${(b.amount/100).toLocaleString("en-IN")})`:`${u.name} Plan — ${u.duration}`,R={key:h0,amount:b.amount,currency:b.currency,name:"Upfyn-Code",description:C,order_id:b.orderId,prefill:{name:o.first_name||o.firstName||"",email:o.email||"",contact:o.phone||""},theme:{color:u.accent},handler:async M=>{try{(await fetch(`${od}/api/payments/verify`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({orderId:M.razorpay_order_id,paymentId:M.razorpay_payment_id,signature:M.razorpay_signature,planId:u.id}),credentials:"include"})).ok?(c&&await c(),h("/app")):alert("Payment verification failed. Contact support.")}catch{alert("Payment verification failed. Contact support.")}g(null)},modal:{ondismiss:()=>g(null)}};new window.Razorpay(R).open()}catch{alert("Something went wrong. Please try again."),g(null)}};return n.jsxs("div",{className:"min-h-screen bg-[#0a0f1e] text-slate-200",children:[n.jsx(Bn,{onOpenAuth:i}),n.jsx("main",{className:"pt-24 pb-20 px-4 sm:px-6",children:n.jsxs("div",{className:"max-w-6xl mx-auto",children:[n.jsxs("div",{className:"text-center mb-16",children:[n.jsx("p",{className:"text-sm font-mono text-emerald-400/80 tracking-wider uppercase mb-3",children:"Pricing"}),n.jsxs("h1",{className:"text-3xl sm:text-4xl lg:text-5xl font-bold text-white mb-4",children:["Choose your"," ",n.jsx("span",{className:"bg-gradient-to-r from-blue-400 via-purple-400 to-emerald-400 bg-clip-text text-transparent",children:"plan"})]}),n.jsx("p",{className:"text-slate-500 text-base sm:text-lg max-w-xl mx-auto",children:"Start with the free demo. Upgrade to connect your machine and unlock the full Upfyn-Code experience."})]}),n.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-6 mb-24 items-stretch",children:p0.map(u=>{const w=u.icon,b=v===u.id,T=v!==null;return n.jsx("div",{className:"relative flex flex-col",onMouseEnter:()=>x(u.id),onMouseLeave:()=>x(null),children:n.jsxs("div",{className:`relative flex flex-col flex-1 rounded-2xl border p-7 transition-all duration-300 ease-out ${b?"scale-[1.03] z-10":T?"scale-[0.98] opacity-70":""}`,style:{borderColor:b?`rgba(${u.accentRgb}, 0.5)`:"rgba(255,255,255,0.08)",background:b?`linear-gradient(135deg, rgba(${u.accentRgb}, 0.08) 0%, rgba(${u.accentRgb}, 0.02) 100%)`:"rgba(255,255,255,0.02)",boxShadow:b?`0 0 40px rgba(${u.accentRgb}, 0.15), 0 20px 60px rgba(0,0,0,0.3)`:"none"},children:[u.badge&&n.jsx("div",{className:"absolute -top-3.5 left-1/2 -translate-x-1/2 px-4 py-1 rounded-full text-xs font-bold tracking-wide uppercase",style:{background:u.accent,color:"#fff",boxShadow:`0 4px 12px rgba(${u.accentRgb}, 0.4)`},children:u.badge}),n.jsxs("div",{className:"flex items-center gap-3 mb-2 mt-1",children:[n.jsx("div",{className:"w-10 h-10 rounded-xl flex items-center justify-center transition-all duration-300",style:{background:`rgba(${u.accentRgb}, ${b?.2:.1})`},children:n.jsx(w,{size:20,style:{color:u.accent}})}),n.jsx("h3",{className:"text-xl font-bold text-white",children:u.name})]}),n.jsx("p",{className:"text-slate-500 text-sm mb-5",children:u.description}),n.jsxs("div",{className:"mb-6",children:[n.jsxs("div",{className:"flex items-baseline gap-2",children:[u.originalPrice&&n.jsxs("span",{className:"text-slate-600 line-through text-lg",children:["₹",u.originalPrice.toLocaleString("en-IN")]}),n.jsxs("span",{className:"text-4xl font-bold text-white",children:["₹",u.price.toLocaleString("en-IN")]}),n.jsx("span",{className:"text-slate-500 text-sm",children:u.period})]}),u.originalPrice&&n.jsxs("p",{className:"text-emerald-400 text-xs font-medium mt-1",children:["Save ₹",(u.originalPrice-u.price).toLocaleString("en-IN")," with this offer"]})]}),n.jsx("div",{className:"h-px bg-white/[0.06] mb-5"}),n.jsx("ul",{className:"space-y-3 mb-8 flex-1",children:u.features.map((C,R)=>n.jsxs("li",{className:"flex items-start gap-2.5 text-sm text-slate-300",children:[n.jsx(On,{size:15,className:"mt-0.5 shrink-0",style:{color:u.accent}}),C]},R))}),n.jsx("button",{onClick:()=>m(u),disabled:p===u.id,className:"w-full py-3.5 rounded-xl font-semibold text-sm transition-all duration-200 active:scale-[0.97] disabled:opacity-60 flex items-center justify-center gap-2 cursor-pointer",style:{background:b?u.accent:`rgba(${u.accentRgb}, 0.12)`,color:b?"#fff":u.accent,border:`1px solid rgba(${u.accentRgb}, ${b?.6:.2})`},children:p===u.id?n.jsxs(n.Fragment,{children:[n.jsx("span",{className:"w-4 h-4 border-2 border-white/40 border-t-white rounded-full animate-spin"}),"Processing..."]}):n.jsxs(n.Fragment,{children:[o?"Grab Now":"Sign Up to Grab",n.jsx(cs,{size:15,className:"transition-transform group-hover:translate-x-0.5"})]})})]})},u.id)})}),n.jsxs("div",{className:"mb-16",children:[n.jsxs("div",{className:"text-center mb-10",children:[n.jsx("h2",{className:"text-2xl sm:text-3xl font-bold text-white mb-3",children:"What's included"}),n.jsx("p",{className:"text-slate-500 text-sm sm:text-base max-w-md mx-auto",children:"Every plan builds on the previous. Higher tiers unlock more tools."})]}),n.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-5",children:m0.map(u=>n.jsxs("div",{className:"rounded-xl border border-white/[0.06] bg-white/[0.02] p-5 transition-all duration-300 hover:border-opacity-40 hover:bg-white/[0.04]",style:{"--plan-accent":u.accent},children:[n.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[n.jsx("div",{className:"w-2 h-2 rounded-full",style:{background:u.accent}}),n.jsx("span",{className:"text-sm font-semibold",style:{color:u.accent},children:u.planName})]}),n.jsx("ul",{className:"space-y-2",children:u.included.map(w=>n.jsxs("li",{className:"flex items-center gap-2 text-sm text-slate-300",children:[n.jsx(On,{size:14,className:"shrink-0",style:{color:u.accent}}),w]},w))}),u.extras&&n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"h-px bg-white/[0.05] my-3"}),n.jsx("ul",{className:"space-y-2",children:u.extras.map(w=>n.jsxs("li",{className:"flex items-center gap-2 text-sm text-white font-medium",children:[n.jsx(Vo,{size:14,className:"shrink-0",style:{color:u.accent}}),w]},w))})]})]},u.planName))})]}),n.jsxs("div",{className:"rounded-xl border border-white/[0.06] bg-white/[0.02] p-5 sm:p-6 flex items-start gap-4 transition-all duration-300 hover:border-blue-500/20 hover:bg-blue-500/[0.02]",children:[n.jsx("div",{className:"w-10 h-10 rounded-xl bg-blue-500/10 flex items-center justify-center shrink-0",children:n.jsx(Td,{size:20,className:"text-blue-400"})}),n.jsxs("div",{children:[n.jsx("h3",{className:"text-white font-semibold text-sm mb-1",children:"Secure Payments via Razorpay"}),n.jsx("p",{className:"text-slate-500 text-xs leading-relaxed",children:"All payments are processed securely through Razorpay, India's leading payment gateway. We never store your card details. Cancel anytime from your account settings."})]})]})]})}),n.jsx(Hn,{})]})}function x0({onOpenAuth:i}){y.useEffect(()=>(document.title="Contact — Upfyn-Code",()=>{document.title="Upfyn-Code"}),[]);const[o,c]=y.useState({name:"",email:"",subject:"",message:""}),[h,p]=y.useState(!1),g=v=>{v.preventDefault();const{name:x,email:m,subject:u,message:w}=o,b=`mailto:contact@thinqmesh.com?subject=${encodeURIComponent(u||"Inquiry from "+x)}&body=${encodeURIComponent(`Name: ${x}
|
|
521
|
+
Email: ${m}
|
|
522
|
+
|
|
523
|
+
${w}`)}`;window.open(b,"_blank"),p(!0),setTimeout(()=>p(!1),4e3)};return n.jsxs("div",{className:"min-h-screen bg-[#0a0f1e] text-slate-200",children:[n.jsx(Bn,{onOpenAuth:i}),n.jsx("main",{className:"pt-24 pb-20 px-4 sm:px-6",children:n.jsxs("div",{className:"max-w-5xl mx-auto",children:[n.jsxs("div",{className:"text-center mb-14",children:[n.jsx("p",{className:"text-sm font-mono text-emerald-400/80 tracking-wider uppercase mb-3",children:"Contact"}),n.jsxs("h1",{className:"text-3xl sm:text-4xl lg:text-5xl font-bold text-white mb-4",children:["Let's"," ",n.jsx("span",{className:"bg-gradient-to-r from-blue-400 via-purple-400 to-emerald-400 bg-clip-text text-transparent",children:"build together"})]}),n.jsx("p",{className:"text-slate-500 text-base sm:text-lg max-w-xl mx-auto",children:"Whether you're exploring enterprise solutions, custom integrations, or want to collaborate — we'd love to hear from you."})]}),n.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-8 mb-16",children:[n.jsxs("div",{className:"space-y-5",children:[n.jsxs("div",{className:"rounded-xl border border-white/[0.06] bg-white/[0.02] p-6 hover:border-blue-500/20 hover:bg-blue-500/[0.02] transition-all duration-300",children:[n.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[n.jsx("div",{className:"w-10 h-10 rounded-xl bg-blue-500/10 flex items-center justify-center",children:n.jsx(Zm,{size:20,className:"text-blue-400"})}),n.jsxs("div",{children:[n.jsx("a",{href:"https://www.thinqmesh.com",target:"_blank",rel:"noopener noreferrer",className:"text-white font-semibold text-sm hover:text-blue-400 transition-colors",children:"Thinqmesh Technologies"}),n.jsx("p",{className:"text-slate-500 text-xs",children:"Building AI-powered developer tools"})]})]}),n.jsxs("p",{className:"text-slate-400 text-sm leading-relaxed",children:["We build intelligent software solutions for developers and enterprises. From AI-powered IDEs to custom automation pipelines — if you can imagine it, we can build it. Learn more at ",n.jsx("a",{href:"https://www.thinqmesh.com",target:"_blank",rel:"noopener noreferrer",className:"text-blue-400 hover:underline",children:"www.thinqmesh.com"}),"."]})]}),n.jsxs("div",{className:"rounded-xl border border-white/[0.06] bg-white/[0.02] p-6 hover:border-purple-500/20 hover:bg-purple-500/[0.02] transition-all duration-300",children:[n.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[n.jsx("div",{className:"w-10 h-10 rounded-xl bg-purple-500/10 flex items-center justify-center",children:n.jsx(ss,{size:20,className:"text-purple-400"})}),n.jsxs("div",{children:[n.jsx("h3",{className:"text-white font-semibold text-sm",children:"Connect with us"}),n.jsx("p",{className:"text-slate-500 text-xs",children:"Find us on the web"})]})]}),n.jsxs("div",{className:"space-y-2.5",children:[n.jsxs("a",{href:"https://github.com/AnitChaudhry",target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-3 px-3 py-2.5 rounded-lg bg-white/[0.03] border border-white/[0.06] hover:border-white/15 hover:bg-white/[0.05] transition-all group",children:[n.jsx(Ao,{size:16,className:"text-slate-400 group-hover:text-white transition-colors"}),n.jsx("span",{className:"text-sm text-slate-400 group-hover:text-slate-200 transition-colors flex-1",children:"GitHub — Thinqmesh Technologies"}),n.jsx(ss,{size:12,className:"text-slate-600 group-hover:text-slate-400 transition-colors"})]}),n.jsxs("a",{href:"https://www.linkedin.com/company/thinqmesh",target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-3 px-3 py-2.5 rounded-lg bg-white/[0.03] border border-white/[0.06] hover:border-blue-500/20 hover:bg-blue-500/[0.02] transition-all group",children:[n.jsx(Rf,{size:16,className:"text-slate-400 group-hover:text-blue-400 transition-colors"}),n.jsx("span",{className:"text-sm text-slate-400 group-hover:text-slate-200 transition-colors flex-1",children:"LinkedIn — Thinqmesh Technologies"}),n.jsx(ss,{size:12,className:"text-slate-600 group-hover:text-slate-400 transition-colors"})]}),n.jsxs("a",{href:"mailto:contact@thinqmesh.com",className:"flex items-center gap-3 px-3 py-2.5 rounded-lg bg-white/[0.03] border border-white/[0.06] hover:border-emerald-500/20 hover:bg-emerald-500/[0.02] transition-all group",children:[n.jsx(Lo,{size:16,className:"text-slate-400 group-hover:text-emerald-400 transition-colors"}),n.jsx("span",{className:"text-sm text-slate-400 group-hover:text-slate-200 transition-colors flex-1",children:"contact@thinqmesh.com"}),n.jsx(ss,{size:12,className:"text-slate-600 group-hover:text-slate-400 transition-colors"})]})]})]}),n.jsxs("div",{className:"rounded-xl border border-white/[0.06] bg-white/[0.02] p-5 flex items-center gap-3",children:[n.jsx("div",{className:"w-8 h-8 rounded-lg bg-emerald-500/10 flex items-center justify-center shrink-0",children:n.jsx($f,{size:16,className:"text-emerald-400"})}),n.jsx("div",{children:n.jsx("p",{className:"text-slate-400 text-sm",children:"Based in India, building for the world"})})]})]}),n.jsxs("div",{className:"rounded-xl border border-white/[0.06] bg-white/[0.02] p-6 sm:p-8",children:[n.jsx("h2",{className:"text-lg font-semibold text-white mb-1",children:"Get in touch"}),n.jsx("p",{className:"text-slate-500 text-sm mb-6",children:"Enterprise inquiries, partnerships, custom builds, or just want to say hello."}),n.jsxs("form",{onSubmit:g,className:"space-y-4",children:[n.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:[n.jsxs("div",{children:[n.jsx("label",{className:"block text-xs text-slate-500 mb-1.5",children:"Name"}),n.jsx("input",{type:"text",required:!0,value:o.name,onChange:v=>c(x=>({...x,name:v.target.value})),className:"w-full px-3 py-2.5 bg-white/[0.03] border border-white/[0.08] rounded-lg text-sm text-white placeholder:text-slate-600 focus:outline-none focus:border-blue-500/50 transition-colors",placeholder:"Your name"})]}),n.jsxs("div",{children:[n.jsx("label",{className:"block text-xs text-slate-500 mb-1.5",children:"Email"}),n.jsx("input",{type:"email",required:!0,value:o.email,onChange:v=>c(x=>({...x,email:v.target.value})),className:"w-full px-3 py-2.5 bg-white/[0.03] border border-white/[0.08] rounded-lg text-sm text-white placeholder:text-slate-600 focus:outline-none focus:border-blue-500/50 transition-colors",placeholder:"you@company.com"})]})]}),n.jsxs("div",{children:[n.jsx("label",{className:"block text-xs text-slate-500 mb-1.5",children:"Subject"}),n.jsx("input",{type:"text",value:o.subject,onChange:v=>c(x=>({...x,subject:v.target.value})),className:"w-full px-3 py-2.5 bg-white/[0.03] border border-white/[0.08] rounded-lg text-sm text-white placeholder:text-slate-600 focus:outline-none focus:border-blue-500/50 transition-colors",placeholder:"Enterprise inquiry, partnership, feedback..."})]}),n.jsxs("div",{children:[n.jsx("label",{className:"block text-xs text-slate-500 mb-1.5",children:"Message"}),n.jsx("textarea",{required:!0,rows:5,value:o.message,onChange:v=>c(x=>({...x,message:v.target.value})),className:"w-full px-3 py-2.5 bg-white/[0.03] border border-white/[0.08] rounded-lg text-sm text-white placeholder:text-slate-600 focus:outline-none focus:border-blue-500/50 transition-colors resize-none",placeholder:"Tell us about your project or how we can help..."})]}),n.jsx("button",{type:"submit",className:"w-full py-3 rounded-xl font-semibold text-sm bg-blue-600 hover:bg-blue-500 text-white transition-all active:scale-[0.97] flex items-center justify-center gap-2",children:h?"Opening mail client...":n.jsxs(n.Fragment,{children:["Send Message",n.jsx(Ed,{size:14})]})})]}),n.jsxs("p",{className:"text-slate-600 text-xs mt-4 text-center",children:["Or email us directly at ",n.jsx("a",{href:"mailto:contact@thinqmesh.com",className:"text-blue-400 hover:underline",children:"contact@thinqmesh.com"})]})]})]}),n.jsxs("div",{className:"rounded-xl border border-white/[0.06] bg-gradient-to-br from-blue-500/[0.04] to-purple-500/[0.04] p-8 text-center",children:[n.jsx("h2",{className:"text-xl sm:text-2xl font-bold text-white mb-3",children:"Enterprise Solutions"}),n.jsx("p",{className:"text-slate-400 text-sm sm:text-base max-w-lg mx-auto mb-6",children:"Need a custom AI-powered development environment for your team? We build tailored solutions — from private cloud IDEs to custom automation pipelines and AI integrations."}),n.jsxs("div",{className:"flex flex-wrap justify-center gap-3 text-sm text-slate-500",children:[n.jsx("span",{className:"px-3 py-1.5 rounded-full border border-white/[0.06] bg-white/[0.02]",children:"Custom AI Tooling"}),n.jsx("span",{className:"px-3 py-1.5 rounded-full border border-white/[0.06] bg-white/[0.02]",children:"Private Cloud IDEs"}),n.jsx("span",{className:"px-3 py-1.5 rounded-full border border-white/[0.06] bg-white/[0.02]",children:"CI/CD Automation"}),n.jsx("span",{className:"px-3 py-1.5 rounded-full border border-white/[0.06] bg-white/[0.02]",children:"MCP Integrations"}),n.jsx("span",{className:"px-3 py-1.5 rounded-full border border-white/[0.06] bg-white/[0.02]",children:"Team Collaboration"})]})]})]})}),n.jsx(Hn,{})]})}const id="",g0=window.location.origin,y0=[{id:"chat",label:"Chat",icon:ds},{id:"shell",label:"Shell",icon:ps},{id:"files",label:"Files",icon:xr},{id:"git",label:"Git",icon:Fn},{id:"canvas",label:"Canvas",icon:hs}],v0={chat:Id,shell:Md,files:_d,git:Rd,canvas:Ad};function w0({connectCommand:i,onClose:o}){const[c,h]=y.useState(!1),p=()=>{navigator.clipboard.writeText(i),h(!0),setTimeout(()=>h(!1),2e3)};return n.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/60 backdrop-blur-sm",onClick:o,children:n.jsxs("div",{className:"bg-slate-900 border border-slate-700 rounded-2xl p-6 max-w-lg w-full mx-4 shadow-2xl",onClick:g=>g.stopPropagation(),children:[n.jsxs("div",{className:"flex items-center justify-between mb-4",children:[n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx(Pd,{className:"w-5 h-5 text-blue-400"}),n.jsx("h3",{className:"text-lg font-semibold text-white",children:"Connect Your Machine"})]}),n.jsx("button",{onClick:o,className:"p-1 text-slate-500 hover:text-white rounded",children:n.jsx(qo,{className:"w-4 h-4"})})]}),n.jsx("p",{className:"text-slate-400 text-sm mb-2",children:"Install the CLI and connect your machine:"}),n.jsx("div",{className:"bg-black/40 border border-slate-700 rounded-lg p-2.5 font-mono text-xs text-slate-500 mb-2",children:"npm i -g upfyn-code"}),n.jsx("p",{className:"text-slate-400 text-sm mb-2",children:"Then run:"}),n.jsxs("div",{className:"bg-black/40 border border-slate-700 rounded-lg p-3 font-mono text-sm text-slate-300 flex items-center gap-2",children:[n.jsx("code",{className:"flex-1 break-all text-xs",children:i}),n.jsx("button",{onClick:p,className:"shrink-0 p-1.5 rounded hover:bg-slate-700 transition-colors",children:c?n.jsx(On,{className:"w-4 h-4 text-green-400"}):n.jsx(us,{className:"w-4 h-4 text-slate-400"})})]}),n.jsx("p",{className:"text-slate-500 text-xs mt-3 leading-relaxed",children:"This bridges your local Claude Code, terminal, filesystem, and git to the web UI. Once connected, the app works offline from any device."}),n.jsxs("div",{className:"flex items-center gap-2 mt-3 text-xs text-slate-600",children:[n.jsx("div",{className:"w-4 h-4 border-2 border-blue-500 border-t-transparent rounded-full animate-spin"}),"Waiting for connection..."]})]})})}function j0({backendUrl:i,connectionToken:o,onClose:c}){const[h,p]=y.useState("json"),[g,v]=y.useState(!1),[x,m]=y.useState(!1),u=JSON.stringify({mcpServers:{"upfyn-code":{url:`${i||"{backend-url}"}/mcp`,headers:{Authorization:`Bearer ${o||"{token}"}`}}}},null,2),w=`npx upfyn-code mcp --server ${i||"{backend-url}"} --key ${o||"{token}"}`,b=()=>{navigator.clipboard.writeText(u),v(!0),setTimeout(()=>v(!1),2e3)},T=()=>{navigator.clipboard.writeText(w),m(!0),setTimeout(()=>m(!1),2e3)};return n.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/60 backdrop-blur-sm",onClick:c,children:n.jsxs("div",{className:"bg-slate-900 border border-slate-700 rounded-2xl p-6 max-w-lg w-full mx-4 shadow-2xl",onClick:C=>C.stopPropagation(),children:[n.jsxs("div",{className:"flex items-center justify-between mb-4",children:[n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx(Pl,{className:"w-5 h-5 text-purple-400"}),n.jsx("h3",{className:"text-lg font-semibold text-white",children:"MCP Integration"})]}),n.jsx("button",{onClick:c,className:"p-1 text-slate-500 hover:text-white rounded",children:n.jsx(qo,{className:"w-4 h-4"})})]}),n.jsxs("div",{className:"flex border-b border-slate-700 mb-4",children:[n.jsx("button",{onClick:()=>p("json"),className:`px-4 py-2 text-sm font-medium border-b-2 transition-colors ${h==="json"?"text-purple-400 border-purple-400":"text-slate-500 border-transparent hover:text-slate-300"}`,children:"JSON Config"}),n.jsx("button",{onClick:()=>p("cli"),className:`px-4 py-2 text-sm font-medium border-b-2 transition-colors ${h==="cli"?"text-purple-400 border-purple-400":"text-slate-500 border-transparent hover:text-slate-300"}`,children:"CLI Command"})]}),h==="json"?n.jsxs(n.Fragment,{children:[n.jsx("p",{className:"text-slate-400 text-sm mb-3",children:"Add this to your Claude / Cursor MCP settings:"}),n.jsxs("div",{className:"relative bg-black/40 border border-slate-700 rounded-lg p-3 font-mono text-xs text-slate-300",children:[n.jsx("pre",{className:"overflow-x-auto whitespace-pre",children:u}),n.jsx("button",{onClick:b,className:"absolute top-2 right-2 p-1.5 rounded hover:bg-slate-700 transition-colors",children:g?n.jsx(On,{className:"w-3.5 h-3.5 text-green-400"}):n.jsx(us,{className:"w-3.5 h-3.5 text-slate-400"})})]})]}):n.jsxs(n.Fragment,{children:[n.jsx("p",{className:"text-slate-400 text-sm mb-3",children:"Or connect via CLI:"}),n.jsxs("div",{className:"bg-black/40 border border-slate-700 rounded-lg p-3 font-mono text-sm text-slate-300 flex items-center gap-2",children:[n.jsx("code",{className:"flex-1 break-all text-xs",children:w}),n.jsx("button",{onClick:T,className:"shrink-0 p-1.5 rounded hover:bg-slate-700 transition-colors",children:x?n.jsx(On,{className:"w-4 h-4 text-green-400"}):n.jsx(us,{className:"w-4 h-4 text-slate-400"})})]})]})]})})}function b0(i){if(!i)return!1;if(i.access_override==="paid")return!0;if(i.access_override==="unpaid")return!1;const o=i.subscription;return!(!o||o.status!=="active"||o.expiresAt&&new Date(o.expiresAt)<new Date)}function N0({user:i,onLogout:o}){const c=Wn(),h=y.useRef(null),p=b0(i),[g,v]=y.useState(!1),[x,m]=y.useState(!0),[u,w]=y.useState(!1),[b,T]=y.useState("chat"),[C,R]=y.useState(null),[A,M]=y.useState(null),[H,q]=y.useState(!1),[W,ne]=y.useState(!1),[ye,Y]=y.useState(null);y.useEffect(()=>{const ae=Pe=>{Pe.preventDefault(),Y(Pe)};return window.addEventListener("beforeinstallprompt",ae),()=>window.removeEventListener("beforeinstallprompt",ae)},[]);const Re=async()=>{if(!ye)return;ye.prompt();const{outcome:ae}=await ye.userChoice;ae==="accepted"&&Y(null)};y.useEffect(()=>{M(g0),(async()=>{try{const Pe=await fetch(`${id}/api/auth/connect-token`,{credentials:"include"});if(Pe.ok){const Ce=await Pe.json();R(Ce.token)}}catch{}})()},[]),y.useEffect(()=>{const ae=setInterval(async()=>{try{const Pe=await fetch(`${id}/api/auth/connection-status`,{credentials:"include"});Pe.ok&&(await Pe.json()).connected&&(w(!0),clearInterval(ae))}catch{}},3e3);return()=>clearInterval(ae)},[]),y.useEffect(()=>{const ae=setTimeout(()=>m(!1),3e3);return()=>clearTimeout(ae)},[]);const ue=()=>m(!1),ve=()=>v(!g),Be=()=>window.open(A,"_blank"),me=C&&A?`npx upfyn-code connect --server ${A} --key ${C}`:"Loading...";if(u)return g?n.jsxs("div",{className:"fixed inset-0 z-50",children:[n.jsx("button",{onClick:ve,className:"absolute top-2 right-2 z-50 p-2 bg-slate-900/90 hover:bg-slate-800 text-white rounded-lg border border-slate-700",children:n.jsx(qf,{className:"w-4 h-4"})}),n.jsx("iframe",{ref:h,src:A,className:"w-full h-full border-0",title:"Upfyn-Code",allow:"clipboard-read; clipboard-write",onLoad:ue})]}):n.jsxs("div",{className:"min-h-screen bg-[#0a0f1e] flex flex-col",children:[n.jsxs("div",{className:"flex items-center justify-between px-4 py-2 border-b border-slate-800 bg-slate-900/80 shrink-0",children:[n.jsxs("div",{className:"flex items-center gap-3",children:[n.jsx("span",{className:"text-sm font-semibold text-white",children:"Upfyn-Code"}),n.jsx("span",{className:"text-xs text-slate-500",children:"|"}),n.jsx("span",{className:"text-xs text-slate-400",children:i?.username||i?.firstName||"User"})]}),n.jsxs("div",{className:"flex items-center gap-1",children:[ye&&n.jsx("button",{onClick:Re,className:"p-1.5 text-emerald-400 hover:text-emerald-300 rounded",title:"Install App",children:n.jsx(_o,{className:"w-4 h-4"})}),n.jsx("button",{onClick:ve,className:"p-1.5 text-slate-500 hover:text-white rounded",title:"Fullscreen",children:n.jsx(Of,{className:"w-4 h-4"})}),n.jsx("button",{onClick:Be,className:"p-1.5 text-slate-500 hover:text-white rounded",title:"Open in new tab",children:n.jsx(ss,{className:"w-4 h-4"})}),n.jsx("button",{onClick:o,className:"p-1.5 text-slate-500 hover:text-red-400 rounded",title:"Sign out",children:n.jsx(Ku,{className:"w-4 h-4"})})]})]}),n.jsxs("div",{className:"flex-1 relative",children:[x&&n.jsx("div",{className:"absolute inset-0 z-10 bg-[#0a0f1e] flex items-center justify-center",children:n.jsxs("div",{className:"text-center",children:[n.jsx("div",{className:"w-8 h-8 border-2 border-blue-500 border-t-transparent rounded-full animate-spin mx-auto mb-3"}),n.jsx("p",{className:"text-slate-400 text-sm",children:"Loading Upfyn-Code..."})]})}),n.jsx("iframe",{ref:h,src:A,className:"w-full h-full border-0 absolute inset-0",title:"Upfyn-Code",allow:"clipboard-read; clipboard-write",onLoad:ue})]})]});const Fe=v0[b];return n.jsxs("div",{className:"h-screen bg-[#0a0f1e] text-slate-200 flex flex-col overflow-hidden",children:[n.jsxs("div",{className:"flex items-center justify-between px-4 py-2 border-b border-slate-800 bg-slate-900/80 shrink-0",children:[n.jsxs("div",{className:"flex items-center gap-3",children:[n.jsx("span",{className:"text-sm font-semibold text-white",children:"Upfyn-Code"}),n.jsx("span",{className:"text-xs text-slate-500",children:"|"}),n.jsx("span",{className:"text-xs text-slate-400",children:i?.username||i?.firstName||"User"})]}),n.jsxs("div",{className:"flex items-center gap-1 sm:gap-2",children:[ye&&n.jsxs("button",{onClick:Re,className:"flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-emerald-600 hover:bg-emerald-500 text-white rounded-lg transition-colors",title:"Install Upfyn-Code as an app",children:[n.jsx(_o,{className:"w-3.5 h-3.5"})," ",n.jsx("span",{className:"hidden sm:inline",children:"Install App"})]}),n.jsxs("button",{onClick:()=>p?q(!0):c("/pricing"),className:"flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-blue-600 hover:bg-blue-500 text-white rounded-lg transition-colors",children:[p?n.jsx(Pd,{className:"w-3.5 h-3.5"}):n.jsx(ls,{className:"w-3.5 h-3.5"}),n.jsx("span",{className:"hidden sm:inline",children:"Connect"})]}),n.jsxs("button",{onClick:()=>p?ne(!0):c("/pricing"),className:"flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-purple-600/80 hover:bg-purple-500 text-white rounded-lg transition-colors",children:[p?n.jsx(Pl,{className:"w-3.5 h-3.5"}):n.jsx(ls,{className:"w-3.5 h-3.5"}),n.jsx("span",{className:"hidden sm:inline",children:"MCP"})]}),n.jsx("button",{onClick:o,className:"p-1.5 text-slate-500 hover:text-red-400 rounded",title:"Sign out",children:n.jsx(Ku,{className:"w-4 h-4"})})]})]}),n.jsx("div",{className:"flex border-b border-slate-800 bg-slate-900/50 px-2 shrink-0",children:y0.map(({id:ae,label:Pe,icon:Ce})=>n.jsxs("button",{onClick:()=>T(ae),className:`flex items-center gap-1.5 px-3 sm:px-4 py-2.5 text-sm transition-colors border-b-2 ${b===ae?"text-blue-400 border-blue-400":"text-slate-500 border-transparent hover:text-slate-300"}`,children:[n.jsx(Ce,{className:"w-3.5 h-3.5"})," ",n.jsx("span",{className:"hidden sm:inline",children:Pe})]},ae))}),n.jsx("div",{className:"flex-1 flex flex-col overflow-hidden min-h-0",children:n.jsx(Fe,{})}),H&&n.jsx(w0,{connectCommand:me,onClose:()=>q(!1)}),W&&n.jsx(j0,{backendUrl:A,connectionToken:C,onClose:()=>ne(!1)})]})}const fr="";function k0(){const{pathname:i}=Zt();return y.useEffect(()=>{window.scrollTo(0,0)},[i]),null}function C0(){const[i,o]=y.useState(null),[c,h]=y.useState(!0),[p,g]=y.useState(!1),v=Wn();y.useEffect(()=>{x()},[]);const x=async()=>{try{if((await(await fetch(`${fr}/api/auth/status`,{credentials:"include"})).json()).needsSetup){g(!0),h(!1);return}const A=await fetch(`${fr}/api/auth/user`,{credentials:"include"});if(A.ok){const M=await A.json();o(M.user||M)}}catch{}h(!1)},m=async(C,R,A,M,H)=>{try{const q=await fetch(`${fr}/api/auth/login`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({username:C,password:R,firstName:A,lastName:M,phone:H}),credentials:"include"}),W=await q.json();if(q.ok){o(W.user);const ne=W.user?.first_name||W.user?.firstName||W.user?.username||"";return ne&&localStorage.setItem("upfynai-user-name",ne),v("/app"),{success:!0,token:W.token,user:W.user}}return{success:!1,error:W.error||"Login failed"}}catch{return{success:!1,error:"Unable to reach server. Please try again."}}},u=async(C,R,A,M,H)=>{try{const q=await fetch(`${fr}/api/auth/register`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({firstName:C,lastName:R,password:A,email:M,phone:H}),credentials:"include"}),W=await q.json();return q.ok?(o(W.user),C&&localStorage.setItem("upfynai-user-name",C),v("/app"),{success:!0,token:W.token,user:W.user}):{success:!1,error:W.error||"Registration failed"}}catch{return{success:!1,error:"Unable to reach server. Please try again."}}},w=()=>{fetch(`${fr}/api/auth/logout`,{method:"POST",credentials:"include"}),o(null),v("/")},b=async()=>{try{const C=await fetch(`${fr}/api/auth/user`,{credentials:"include"});if(C.ok){const R=await C.json(),A=R.user||R;if(A?.id)return o(A),v("/app"),!0}}catch{}return!1},T=C=>{v("/get-started",{state:{mode:C}})};return c?n.jsx("div",{className:"min-h-screen bg-[#0a0f1e] flex items-center justify-center",children:n.jsx("div",{className:"w-8 h-8 border-2 border-blue-500 border-t-transparent rounded-full animate-spin"})}):n.jsxs(n.Fragment,{children:[n.jsx(k0,{}),n.jsxs(_m,{children:[n.jsx($t,{path:"/",element:i?n.jsx(kl,{to:"/app",replace:!0}):n.jsx(qx,{onOpenAuth:T,returningName:localStorage.getItem("upfynai-user-name"),onSessionResume:b})}),n.jsx($t,{path:"/get-started",element:i?n.jsx(kl,{to:"/app",replace:!0}):n.jsx(s0,{onLogin:m,onRegister:u,needsSetup:p,onSessionResume:b})}),n.jsx($t,{path:"/docs",element:n.jsx(l0,{onOpenAuth:T})}),n.jsx($t,{path:"/about",element:n.jsx(c0,{onOpenAuth:T})}),n.jsx($t,{path:"/privacy",element:n.jsx(u0,{onOpenAuth:T})}),n.jsx($t,{path:"/terms",element:n.jsx(d0,{onOpenAuth:T})}),n.jsx($t,{path:"/pricing",element:n.jsx(f0,{onOpenAuth:T,user:i,onSubscribed:x})}),n.jsx($t,{path:"/contact",element:n.jsx(x0,{onOpenAuth:T})}),n.jsx($t,{path:"/app",element:i?n.jsx(N0,{user:i,onLogout:w}):n.jsx(kl,{to:"/get-started",replace:!0})}),n.jsx($t,{path:"*",element:n.jsx(kl,{to:"/",replace:!0})})]})]})}Op.createRoot(document.getElementById("root")).render(n.jsx(ud.StrictMode,{children:n.jsx(Um,{children:n.jsx(C0,{})})}));"serviceWorker"in navigator&&window.addEventListener("load",()=>{navigator.serviceWorker.register("/sw.js").catch(()=>{})});
|