@swifty.js/swifty 0.0.13 → 0.0.14
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/dist/chunk-5LZ5YVYW.js +354 -0
- package/dist/glob.wasm +0 -0
- package/dist/main.js +2 -2
- package/dist/{server-TYLDPSLT.js → server-R4QVQ3LB.js} +15 -15
- package/package.json +2 -2
- package/dist/chunk-QNFMJDDO.js +0 -354
- package/dist/glob_addon.node +0 -0
package/dist/glob.wasm
ADDED
|
Binary file
|
package/dist/main.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire as __swiftyCreateRequire } from "node:module";
|
|
3
3
|
const require = __swiftyCreateRequire(import.meta.url);
|
|
4
|
-
import{$ as Hv,A as Lg,B as Qg,C as Ug,D as Pg,E as Fg,F as g0,G as Mv,H as xv,I as Gg,J as zg,K as Hg,L as Yg,M as Lv,N as Qv,P as uC,Q as dC,R as AC,S as _C,T as Uv,U as Pv,V as Fv,W as pC,X as gC,Y as mC,Z as Gv,_ as zv,a as Og,aa as fC,b as Bg,ba as Yv,c as wg,ca as qv,d as Iv,da as LE,e as bv,ea as Kv,f as Rv,fa as m0,g as Nv,ga as EC,h as rC,ha as Vv,i as Dv,ia as Wv,j as kg,ja as Jv,k as Ov,ka as Xv,l as iC,la as jv,m as xE,ma as Zv,n as oC,na as $v,p as ud,q as sC,r as lC,s as cC,t as vv,u as Bv,v as p0,w as wv,x as jA,y as xg,z as kv}from"./chunk-QNFMJDDO.js";import{c as vE}from"./chunk-XBHVVB5A.js";import{a as hv,b as ME,c as Sv,d as Cv,e as yv,f as nC,g as Tv,h as Dg}from"./chunk-RNUCVDX2.js";import{a as cd,d as _v,e as Rg,f as A0,g as _0,h as pv,i as gv,j as mv,n as fv}from"./chunk-GQ2COSTQ.js";import{e as wE,f as Ev,g as aC,i as kE,j as Ng}from"./chunk-MSJOPX6X.js";import"./chunk-FZPTNGTU.js";import{e as vg}from"./chunk-R7VREEYH.js";import"./chunk-7MHXMDYC.js";import{C as _r,E as uv,F as BE,G as eC,H as tC,I as ri,K as ml,L as dv,M as Av,O as Ti,S as ws,e as lv,f as cv}from"./chunk-M5AOLYFS.js";import{a as Mg}from"./chunk-UBV5T4TV.js";import{a as XA,b as U,c as q7,d as qe}from"./chunk-X3UA5OZL.js";var uB=U(ea=>{"use strict";var h0=Symbol.for("react.transitional.element"),K7=Symbol.for("react.portal"),V7=Symbol.for("react.fragment"),W7=Symbol.for("react.strict_mode"),J7=Symbol.for("react.profiler"),X7=Symbol.for("react.consumer"),j7=Symbol.for("react.context"),Z7=Symbol.for("react.forward_ref"),$7=Symbol.for("react.suspense"),ez=Symbol.for("react.memo"),rB=Symbol.for("react.lazy"),tz=Symbol.for("react.activity"),eB=Symbol.iterator;function az(e){return e===null||typeof e!="object"?null:(e=eB&&e[eB]||e["@@iterator"],typeof e=="function"?e:null)}var iB={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},oB=Object.assign,sB={};function Kg(e,t,a){this.props=e,this.context=t,this.refs=sB,this.updater=a||iB}Kg.prototype.isReactComponent={};Kg.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};Kg.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function lB(){}lB.prototype=Kg.prototype;function S0(e,t,a){this.props=e,this.context=t,this.refs=sB,this.updater=a||iB}var C0=S0.prototype=new lB;C0.constructor=S0;oB(C0,Kg.prototype);C0.isPureReactComponent=!0;var tB=Array.isArray;function E0(){}var Ln={H:null,A:null,T:null,S:null},cB=Object.prototype.hasOwnProperty;function y0(e,t,a){var i=a.ref;return{$$typeof:h0,type:e,key:t,ref:i!==void 0?i:null,props:a}}function nz(e,t){return y0(e.type,t,e.props)}function T0(e){return typeof e=="object"&&e!==null&&e.$$typeof===h0}function rz(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(a){return t[a]})}var aB=/\/+/g;function f0(e,t){return typeof e=="object"&&e!==null&&e.key!=null?rz(""+e.key):t.toString(36)}function iz(e){switch(e.status){case"fulfilled":return e.value;case"rejected":throw e.reason;default:switch(typeof e.status=="string"?e.then(E0,E0):(e.status="pending",e.then(function(t){e.status==="pending"&&(e.status="fulfilled",e.value=t)},function(t){e.status==="pending"&&(e.status="rejected",e.reason=t)})),e.status){case"fulfilled":return e.value;case"rejected":throw e.reason}}throw e}function qg(e,t,a,i,l){var u=typeof e;(u==="undefined"||u==="boolean")&&(e=null);var _=!1;if(e===null)_=!0;else switch(u){case"bigint":case"string":case"number":_=!0;break;case"object":switch(e.$$typeof){case h0:case K7:_=!0;break;case rB:return _=e._init,qg(_(e._payload),t,a,i,l)}}if(_)return l=l(e),_=i===""?"."+f0(e,0):i,tB(l)?(a="",_!=null&&(a=_.replace(aB,"$&/")+"/"),qg(l,t,a,"",function(S){return S})):l!=null&&(T0(l)&&(l=nz(l,a+(l.key==null||e&&e.key===l.key?"":(""+l.key).replace(aB,"$&/")+"/")+_)),t.push(l)),1;_=0;var p=i===""?".":i+":";if(tB(e))for(var E=0;E<e.length;E++)i=e[E],u=p+f0(i,E),_+=qg(i,t,a,u,l);else if(E=az(e),typeof E=="function")for(e=E.call(e),E=0;!(i=e.next()).done;)i=i.value,u=p+f0(i,E++),_+=qg(i,t,a,u,l);else if(u==="object"){if(typeof e.then=="function")return qg(iz(e),t,a,i,l);throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.")}return _}function hC(e,t,a){if(e==null)return e;var i=[],l=0;return qg(e,i,"","",function(u){return t.call(a,u,l++)}),i}function oz(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(a){(e._status===0||e._status===-1)&&(e._status=1,e._result=a)},function(a){(e._status===0||e._status===-1)&&(e._status=2,e._result=a)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var nB=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},sz={map:hC,forEach:function(e,t,a){hC(e,function(){t.apply(this,arguments)},a)},count:function(e){var t=0;return hC(e,function(){t++}),t},toArray:function(e){return hC(e,function(t){return t})||[]},only:function(e){if(!T0(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};ea.Activity=tz;ea.Children=sz;ea.Component=Kg;ea.Fragment=V7;ea.Profiler=J7;ea.PureComponent=S0;ea.StrictMode=W7;ea.Suspense=$7;ea.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=Ln;ea.__COMPILER_RUNTIME={__proto__:null,c:function(e){return Ln.H.useMemoCache(e)}};ea.cache=function(e){return function(){return e.apply(null,arguments)}};ea.cacheSignal=function(){return null};ea.cloneElement=function(e,t,a){if(e==null)throw Error("The argument must be a React element, but you passed "+e+".");var i=oB({},e.props),l=e.key;if(t!=null)for(u in t.key!==void 0&&(l=""+t.key),t)!cB.call(t,u)||u==="key"||u==="__self"||u==="__source"||u==="ref"&&t.ref===void 0||(i[u]=t[u]);var u=arguments.length-2;if(u===1)i.children=a;else if(1<u){for(var _=Array(u),p=0;p<u;p++)_[p]=arguments[p+2];i.children=_}return y0(e.type,l,i)};ea.createContext=function(e){return e={$$typeof:j7,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:X7,_context:e},e};ea.createElement=function(e,t,a){var i,l={},u=null;if(t!=null)for(i in t.key!==void 0&&(u=""+t.key),t)cB.call(t,i)&&i!=="key"&&i!=="__self"&&i!=="__source"&&(l[i]=t[i]);var _=arguments.length-2;if(_===1)l.children=a;else if(1<_){for(var p=Array(_),E=0;E<_;E++)p[E]=arguments[E+2];l.children=p}if(e&&e.defaultProps)for(i in _=e.defaultProps,_)l[i]===void 0&&(l[i]=_[i]);return y0(e,u,l)};ea.createRef=function(){return{current:null}};ea.forwardRef=function(e){return{$$typeof:Z7,render:e}};ea.isValidElement=T0;ea.lazy=function(e){return{$$typeof:rB,_payload:{_status:-1,_result:e},_init:oz}};ea.memo=function(e,t){return{$$typeof:ez,type:e,compare:t===void 0?null:t}};ea.startTransition=function(e){var t=Ln.T,a={};Ln.T=a;try{var i=e(),l=Ln.S;l!==null&&l(a,i),typeof i=="object"&&i!==null&&typeof i.then=="function"&&i.then(E0,nB)}catch(u){nB(u)}finally{t!==null&&a.types!==null&&(t.types=a.types),Ln.T=t}};ea.unstable_useCacheRefresh=function(){return Ln.H.useCacheRefresh()};ea.use=function(e){return Ln.H.use(e)};ea.useActionState=function(e,t,a){return Ln.H.useActionState(e,t,a)};ea.useCallback=function(e,t){return Ln.H.useCallback(e,t)};ea.useContext=function(e){return Ln.H.useContext(e)};ea.useDebugValue=function(){};ea.useDeferredValue=function(e,t){return Ln.H.useDeferredValue(e,t)};ea.useEffect=function(e,t){return Ln.H.useEffect(e,t)};ea.useEffectEvent=function(e){return Ln.H.useEffectEvent(e)};ea.useId=function(){return Ln.H.useId()};ea.useImperativeHandle=function(e,t,a){return Ln.H.useImperativeHandle(e,t,a)};ea.useInsertionEffect=function(e,t){return Ln.H.useInsertionEffect(e,t)};ea.useLayoutEffect=function(e,t){return Ln.H.useLayoutEffect(e,t)};ea.useMemo=function(e,t){return Ln.H.useMemo(e,t)};ea.useOptimistic=function(e,t){return Ln.H.useOptimistic(e,t)};ea.useReducer=function(e,t,a){return Ln.H.useReducer(e,t,a)};ea.useRef=function(e){return Ln.H.useRef(e)};ea.useState=function(e){return Ln.H.useState(e)};ea.useSyncExternalStore=function(e,t,a){return Ln.H.useSyncExternalStore(e,t,a)};ea.useTransition=function(){return Ln.H.useTransition()};ea.version="19.2.7"});var dB=U((Jt,SC)=>{"use strict";process.env.NODE_ENV!=="production"&&(function(){function e(w,$){Object.defineProperty(i.prototype,w,{get:function(){console.warn("%s(...) is deprecated in plain JavaScript React classes. %s",$[0],$[1])}})}function t(w){return w===null||typeof w!="object"?null:(w=Je&&w[Je]||w["@@iterator"],typeof w=="function"?w:null)}function a(w,$){w=(w=w.constructor)&&(w.displayName||w.name)||"ReactClass";var Te=w+"."+$;wt[Te]||(console.error("Can't call %s on a component that is not yet mounted. This is a no-op, but it might indicate a bug in your application. Instead, assign to `this.state` directly or define a `state = {};` class property with the desired state in the %s component.",$,w),wt[Te]=!0)}function i(w,$,Te){this.props=w,this.context=$,this.refs=St,this.updater=Te||fa}function l(){}function u(w,$,Te){this.props=w,this.context=$,this.refs=St,this.updater=Te||fa}function _(){}function p(w){return""+w}function E(w){try{p(w);var $=!1}catch{$=!0}if($){$=console;var Te=$.error,ze=typeof Symbol=="function"&&Symbol.toStringTag&&w[Symbol.toStringTag]||w.constructor.name||"Object";return Te.call($,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",ze),p(w)}}function S(w){if(w==null)return null;if(typeof w=="function")return w.$$typeof===da?null:w.displayName||w.name||null;if(typeof w=="string")return w;switch(w){case Dt:return"Fragment";case te:return"Profiler";case Wt:return"StrictMode";case we:return"Suspense";case Ie:return"SuspenseList";case ce:return"Activity"}if(typeof w=="object")switch(typeof w.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),w.$$typeof){case Ze:return"Portal";case ne:return w.displayName||"Context";case ye:return(w._context.displayName||"Context")+".Consumer";case ge:var $=w.render;return w=w.displayName,w||(w=$.displayName||$.name||"",w=w!==""?"ForwardRef("+w+")":"ForwardRef"),w;case Ce:return $=w.displayName||null,$!==null?$:S(w.type)||"Memo";case We:$=w._payload,w=w._init;try{return S(w($))}catch{}}return null}function T(w){if(w===Dt)return"<>";if(typeof w=="object"&&w!==null&&w.$$typeof===We)return"<...>";try{var $=S(w);return $?"<"+$+">":"<...>"}catch{return"<...>"}}function D(){var w=gt.A;return w===null?null:w.getOwner()}function R(){return Error("react-stack-top-frame")}function b(w){if(Ua.call(w,"key")){var $=Object.getOwnPropertyDescriptor(w,"key").get;if($&&$.isReactWarning)return!1}return w.key!==void 0}function B(w,$){function Te(){Aa||(Aa=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",$))}Te.isReactWarning=!0,Object.defineProperty(w,"key",{get:Te,configurable:!0})}function k(){var w=S(this.type);return Dn[w]||(Dn[w]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),w=this.props.ref,w!==void 0?w:null}function x(w,$,Te,ze,st,Nt){var Ct=Te.ref;return w={$$typeof:ot,type:w,key:$,props:Te,_owner:ze},(Ct!==void 0?Ct:null)!==null?Object.defineProperty(w,"ref",{enumerable:!1,get:k}):Object.defineProperty(w,"ref",{enumerable:!1,value:null}),w._store={},Object.defineProperty(w._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(w,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(w,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:st}),Object.defineProperty(w,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:Nt}),Object.freeze&&(Object.freeze(w.props),Object.freeze(w)),w}function z(w,$){return $=x(w.type,$,w.props,w._owner,w._debugStack,w._debugTask),w._store&&($._store.validated=w._store.validated),$}function J(w){re(w)?w._store&&(w._store.validated=1):typeof w=="object"&&w!==null&&w.$$typeof===We&&(w._payload.status==="fulfilled"?re(w._payload.value)&&w._payload.value._store&&(w._payload.value._store.validated=1):w._store&&(w._store.validated=1))}function re(w){return typeof w=="object"&&w!==null&&w.$$typeof===ot}function ie(w){var $={"=":"=0",":":"=2"};return"$"+w.replace(/[=:]/g,function(Te){return $[Te]})}function Fe(w,$){return typeof w=="object"&&w!==null&&w.key!=null?(E(w.key),ie(""+w.key)):$.toString(36)}function Be(w){switch(w.status){case"fulfilled":return w.value;case"rejected":throw w.reason;default:switch(typeof w.status=="string"?w.then(_,_):(w.status="pending",w.then(function($){w.status==="pending"&&(w.status="fulfilled",w.value=$)},function($){w.status==="pending"&&(w.status="rejected",w.reason=$)})),w.status){case"fulfilled":return w.value;case"rejected":throw w.reason}}throw w}function Ge(w,$,Te,ze,st){var Nt=typeof w;(Nt==="undefined"||Nt==="boolean")&&(w=null);var Ct=!1;if(w===null)Ct=!0;else switch(Nt){case"bigint":case"string":case"number":Ct=!0;break;case"object":switch(w.$$typeof){case ot:case Ze:Ct=!0;break;case We:return Ct=w._init,Ge(Ct(w._payload),$,Te,ze,st)}}if(Ct){Ct=w,st=st(Ct);var Vt=ze===""?"."+Fe(Ct,0):ze;return Ot(st)?(Te="",Vt!=null&&(Te=Vt.replace(On,"$&/")+"/"),Ge(st,$,Te,"",function(An){return An})):st!=null&&(re(st)&&(st.key!=null&&(Ct&&Ct.key===st.key||E(st.key)),Te=z(st,Te+(st.key==null||Ct&&Ct.key===st.key?"":(""+st.key).replace(On,"$&/")+"/")+Vt),ze!==""&&Ct!=null&&re(Ct)&&Ct.key==null&&Ct._store&&!Ct._store.validated&&(Te._store.validated=2),st=Te),$.push(st)),1}if(Ct=0,Vt=ze===""?".":ze+":",Ot(w))for(var Ut=0;Ut<w.length;Ut++)ze=w[Ut],Nt=Vt+Fe(ze,Ut),Ct+=Ge(ze,$,Te,Nt,st);else if(Ut=t(w),typeof Ut=="function")for(Ut===w.entries&&(on||console.warn("Using Maps as children is not supported. Use an array of keyed ReactElements instead."),on=!0),w=Ut.call(w),Ut=0;!(ze=w.next()).done;)ze=ze.value,Nt=Vt+Fe(ze,Ut++),Ct+=Ge(ze,$,Te,Nt,st);else if(Nt==="object"){if(typeof w.then=="function")return Ge(Be(w),$,Te,ze,st);throw $=String(w),Error("Objects are not valid as a React child (found: "+($==="[object Object]"?"object with keys {"+Object.keys(w).join(", ")+"}":$)+"). If you meant to render a collection of children, use an array instead.")}return Ct}function Ke(w,$,Te){if(w==null)return w;var ze=[],st=0;return Ge(w,ze,"","",function(Nt){return $.call(Te,Nt,st++)}),ze}function de(w){if(w._status===-1){var $=w._ioInfo;$!=null&&($.start=$.end=performance.now()),$=w._result;var Te=$();if(Te.then(function(st){if(w._status===0||w._status===-1){w._status=1,w._result=st;var Nt=w._ioInfo;Nt!=null&&(Nt.end=performance.now()),Te.status===void 0&&(Te.status="fulfilled",Te.value=st)}},function(st){if(w._status===0||w._status===-1){w._status=2,w._result=st;var Nt=w._ioInfo;Nt!=null&&(Nt.end=performance.now()),Te.status===void 0&&(Te.status="rejected",Te.reason=st)}}),$=w._ioInfo,$!=null){$.value=Te;var ze=Te.displayName;typeof ze=="string"&&($.name=ze)}w._status===-1&&(w._status=0,w._result=Te)}if(w._status===1)return $=w._result,$===void 0&&console.error(`lazy: Expected the result of a dynamic import() call. Instead received: %s
|
|
4
|
+
import{$ as Hv,A as Lg,B as Qg,C as Ug,D as Pg,E as Fg,F as g0,G as Mv,H as xv,I as Gg,J as zg,K as Hg,L as Yg,M as Lv,N as Qv,P as uC,Q as dC,R as AC,S as _C,T as Uv,U as Pv,V as Fv,W as pC,X as gC,Y as mC,Z as Gv,_ as zv,a as Og,aa as fC,b as Bg,ba as Yv,c as wg,ca as qv,d as Iv,da as LE,e as bv,ea as Kv,f as Rv,fa as m0,g as Nv,ga as EC,h as rC,ha as Vv,i as Dv,ia as Wv,j as kg,ja as Jv,k as Ov,ka as Xv,l as iC,la as jv,m as xE,ma as Zv,n as oC,na as $v,p as ud,q as sC,r as lC,s as cC,t as vv,u as Bv,v as p0,w as wv,x as jA,y as xg,z as kv}from"./chunk-5LZ5YVYW.js";import{c as vE}from"./chunk-XBHVVB5A.js";import{a as hv,b as ME,c as Sv,d as Cv,e as yv,f as nC,g as Tv,h as Dg}from"./chunk-RNUCVDX2.js";import{a as cd,d as _v,e as Rg,f as A0,g as _0,h as pv,i as gv,j as mv,n as fv}from"./chunk-GQ2COSTQ.js";import{e as wE,f as Ev,g as aC,i as kE,j as Ng}from"./chunk-MSJOPX6X.js";import"./chunk-FZPTNGTU.js";import{e as vg}from"./chunk-R7VREEYH.js";import"./chunk-7MHXMDYC.js";import{C as _r,E as uv,F as BE,G as eC,H as tC,I as ri,K as ml,L as dv,M as Av,O as Ti,S as ws,e as lv,f as cv}from"./chunk-M5AOLYFS.js";import{a as Mg}from"./chunk-UBV5T4TV.js";import{a as XA,b as U,c as q7,d as qe}from"./chunk-X3UA5OZL.js";var uB=U(ea=>{"use strict";var h0=Symbol.for("react.transitional.element"),K7=Symbol.for("react.portal"),V7=Symbol.for("react.fragment"),W7=Symbol.for("react.strict_mode"),J7=Symbol.for("react.profiler"),X7=Symbol.for("react.consumer"),j7=Symbol.for("react.context"),Z7=Symbol.for("react.forward_ref"),$7=Symbol.for("react.suspense"),ez=Symbol.for("react.memo"),rB=Symbol.for("react.lazy"),tz=Symbol.for("react.activity"),eB=Symbol.iterator;function az(e){return e===null||typeof e!="object"?null:(e=eB&&e[eB]||e["@@iterator"],typeof e=="function"?e:null)}var iB={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},oB=Object.assign,sB={};function Kg(e,t,a){this.props=e,this.context=t,this.refs=sB,this.updater=a||iB}Kg.prototype.isReactComponent={};Kg.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};Kg.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function lB(){}lB.prototype=Kg.prototype;function S0(e,t,a){this.props=e,this.context=t,this.refs=sB,this.updater=a||iB}var C0=S0.prototype=new lB;C0.constructor=S0;oB(C0,Kg.prototype);C0.isPureReactComponent=!0;var tB=Array.isArray;function E0(){}var Ln={H:null,A:null,T:null,S:null},cB=Object.prototype.hasOwnProperty;function y0(e,t,a){var i=a.ref;return{$$typeof:h0,type:e,key:t,ref:i!==void 0?i:null,props:a}}function nz(e,t){return y0(e.type,t,e.props)}function T0(e){return typeof e=="object"&&e!==null&&e.$$typeof===h0}function rz(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(a){return t[a]})}var aB=/\/+/g;function f0(e,t){return typeof e=="object"&&e!==null&&e.key!=null?rz(""+e.key):t.toString(36)}function iz(e){switch(e.status){case"fulfilled":return e.value;case"rejected":throw e.reason;default:switch(typeof e.status=="string"?e.then(E0,E0):(e.status="pending",e.then(function(t){e.status==="pending"&&(e.status="fulfilled",e.value=t)},function(t){e.status==="pending"&&(e.status="rejected",e.reason=t)})),e.status){case"fulfilled":return e.value;case"rejected":throw e.reason}}throw e}function qg(e,t,a,i,l){var u=typeof e;(u==="undefined"||u==="boolean")&&(e=null);var _=!1;if(e===null)_=!0;else switch(u){case"bigint":case"string":case"number":_=!0;break;case"object":switch(e.$$typeof){case h0:case K7:_=!0;break;case rB:return _=e._init,qg(_(e._payload),t,a,i,l)}}if(_)return l=l(e),_=i===""?"."+f0(e,0):i,tB(l)?(a="",_!=null&&(a=_.replace(aB,"$&/")+"/"),qg(l,t,a,"",function(S){return S})):l!=null&&(T0(l)&&(l=nz(l,a+(l.key==null||e&&e.key===l.key?"":(""+l.key).replace(aB,"$&/")+"/")+_)),t.push(l)),1;_=0;var p=i===""?".":i+":";if(tB(e))for(var E=0;E<e.length;E++)i=e[E],u=p+f0(i,E),_+=qg(i,t,a,u,l);else if(E=az(e),typeof E=="function")for(e=E.call(e),E=0;!(i=e.next()).done;)i=i.value,u=p+f0(i,E++),_+=qg(i,t,a,u,l);else if(u==="object"){if(typeof e.then=="function")return qg(iz(e),t,a,i,l);throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.")}return _}function hC(e,t,a){if(e==null)return e;var i=[],l=0;return qg(e,i,"","",function(u){return t.call(a,u,l++)}),i}function oz(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(a){(e._status===0||e._status===-1)&&(e._status=1,e._result=a)},function(a){(e._status===0||e._status===-1)&&(e._status=2,e._result=a)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var nB=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},sz={map:hC,forEach:function(e,t,a){hC(e,function(){t.apply(this,arguments)},a)},count:function(e){var t=0;return hC(e,function(){t++}),t},toArray:function(e){return hC(e,function(t){return t})||[]},only:function(e){if(!T0(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};ea.Activity=tz;ea.Children=sz;ea.Component=Kg;ea.Fragment=V7;ea.Profiler=J7;ea.PureComponent=S0;ea.StrictMode=W7;ea.Suspense=$7;ea.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=Ln;ea.__COMPILER_RUNTIME={__proto__:null,c:function(e){return Ln.H.useMemoCache(e)}};ea.cache=function(e){return function(){return e.apply(null,arguments)}};ea.cacheSignal=function(){return null};ea.cloneElement=function(e,t,a){if(e==null)throw Error("The argument must be a React element, but you passed "+e+".");var i=oB({},e.props),l=e.key;if(t!=null)for(u in t.key!==void 0&&(l=""+t.key),t)!cB.call(t,u)||u==="key"||u==="__self"||u==="__source"||u==="ref"&&t.ref===void 0||(i[u]=t[u]);var u=arguments.length-2;if(u===1)i.children=a;else if(1<u){for(var _=Array(u),p=0;p<u;p++)_[p]=arguments[p+2];i.children=_}return y0(e.type,l,i)};ea.createContext=function(e){return e={$$typeof:j7,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:X7,_context:e},e};ea.createElement=function(e,t,a){var i,l={},u=null;if(t!=null)for(i in t.key!==void 0&&(u=""+t.key),t)cB.call(t,i)&&i!=="key"&&i!=="__self"&&i!=="__source"&&(l[i]=t[i]);var _=arguments.length-2;if(_===1)l.children=a;else if(1<_){for(var p=Array(_),E=0;E<_;E++)p[E]=arguments[E+2];l.children=p}if(e&&e.defaultProps)for(i in _=e.defaultProps,_)l[i]===void 0&&(l[i]=_[i]);return y0(e,u,l)};ea.createRef=function(){return{current:null}};ea.forwardRef=function(e){return{$$typeof:Z7,render:e}};ea.isValidElement=T0;ea.lazy=function(e){return{$$typeof:rB,_payload:{_status:-1,_result:e},_init:oz}};ea.memo=function(e,t){return{$$typeof:ez,type:e,compare:t===void 0?null:t}};ea.startTransition=function(e){var t=Ln.T,a={};Ln.T=a;try{var i=e(),l=Ln.S;l!==null&&l(a,i),typeof i=="object"&&i!==null&&typeof i.then=="function"&&i.then(E0,nB)}catch(u){nB(u)}finally{t!==null&&a.types!==null&&(t.types=a.types),Ln.T=t}};ea.unstable_useCacheRefresh=function(){return Ln.H.useCacheRefresh()};ea.use=function(e){return Ln.H.use(e)};ea.useActionState=function(e,t,a){return Ln.H.useActionState(e,t,a)};ea.useCallback=function(e,t){return Ln.H.useCallback(e,t)};ea.useContext=function(e){return Ln.H.useContext(e)};ea.useDebugValue=function(){};ea.useDeferredValue=function(e,t){return Ln.H.useDeferredValue(e,t)};ea.useEffect=function(e,t){return Ln.H.useEffect(e,t)};ea.useEffectEvent=function(e){return Ln.H.useEffectEvent(e)};ea.useId=function(){return Ln.H.useId()};ea.useImperativeHandle=function(e,t,a){return Ln.H.useImperativeHandle(e,t,a)};ea.useInsertionEffect=function(e,t){return Ln.H.useInsertionEffect(e,t)};ea.useLayoutEffect=function(e,t){return Ln.H.useLayoutEffect(e,t)};ea.useMemo=function(e,t){return Ln.H.useMemo(e,t)};ea.useOptimistic=function(e,t){return Ln.H.useOptimistic(e,t)};ea.useReducer=function(e,t,a){return Ln.H.useReducer(e,t,a)};ea.useRef=function(e){return Ln.H.useRef(e)};ea.useState=function(e){return Ln.H.useState(e)};ea.useSyncExternalStore=function(e,t,a){return Ln.H.useSyncExternalStore(e,t,a)};ea.useTransition=function(){return Ln.H.useTransition()};ea.version="19.2.7"});var dB=U((Jt,SC)=>{"use strict";process.env.NODE_ENV!=="production"&&(function(){function e(w,$){Object.defineProperty(i.prototype,w,{get:function(){console.warn("%s(...) is deprecated in plain JavaScript React classes. %s",$[0],$[1])}})}function t(w){return w===null||typeof w!="object"?null:(w=Je&&w[Je]||w["@@iterator"],typeof w=="function"?w:null)}function a(w,$){w=(w=w.constructor)&&(w.displayName||w.name)||"ReactClass";var Te=w+"."+$;wt[Te]||(console.error("Can't call %s on a component that is not yet mounted. This is a no-op, but it might indicate a bug in your application. Instead, assign to `this.state` directly or define a `state = {};` class property with the desired state in the %s component.",$,w),wt[Te]=!0)}function i(w,$,Te){this.props=w,this.context=$,this.refs=St,this.updater=Te||fa}function l(){}function u(w,$,Te){this.props=w,this.context=$,this.refs=St,this.updater=Te||fa}function _(){}function p(w){return""+w}function E(w){try{p(w);var $=!1}catch{$=!0}if($){$=console;var Te=$.error,ze=typeof Symbol=="function"&&Symbol.toStringTag&&w[Symbol.toStringTag]||w.constructor.name||"Object";return Te.call($,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",ze),p(w)}}function S(w){if(w==null)return null;if(typeof w=="function")return w.$$typeof===da?null:w.displayName||w.name||null;if(typeof w=="string")return w;switch(w){case Dt:return"Fragment";case te:return"Profiler";case Wt:return"StrictMode";case we:return"Suspense";case Ie:return"SuspenseList";case ce:return"Activity"}if(typeof w=="object")switch(typeof w.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),w.$$typeof){case Ze:return"Portal";case ne:return w.displayName||"Context";case ye:return(w._context.displayName||"Context")+".Consumer";case ge:var $=w.render;return w=w.displayName,w||(w=$.displayName||$.name||"",w=w!==""?"ForwardRef("+w+")":"ForwardRef"),w;case Ce:return $=w.displayName||null,$!==null?$:S(w.type)||"Memo";case We:$=w._payload,w=w._init;try{return S(w($))}catch{}}return null}function T(w){if(w===Dt)return"<>";if(typeof w=="object"&&w!==null&&w.$$typeof===We)return"<...>";try{var $=S(w);return $?"<"+$+">":"<...>"}catch{return"<...>"}}function D(){var w=gt.A;return w===null?null:w.getOwner()}function R(){return Error("react-stack-top-frame")}function b(w){if(Ua.call(w,"key")){var $=Object.getOwnPropertyDescriptor(w,"key").get;if($&&$.isReactWarning)return!1}return w.key!==void 0}function B(w,$){function Te(){Aa||(Aa=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",$))}Te.isReactWarning=!0,Object.defineProperty(w,"key",{get:Te,configurable:!0})}function k(){var w=S(this.type);return Dn[w]||(Dn[w]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),w=this.props.ref,w!==void 0?w:null}function x(w,$,Te,ze,st,Nt){var Ct=Te.ref;return w={$$typeof:ot,type:w,key:$,props:Te,_owner:ze},(Ct!==void 0?Ct:null)!==null?Object.defineProperty(w,"ref",{enumerable:!1,get:k}):Object.defineProperty(w,"ref",{enumerable:!1,value:null}),w._store={},Object.defineProperty(w._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(w,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(w,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:st}),Object.defineProperty(w,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:Nt}),Object.freeze&&(Object.freeze(w.props),Object.freeze(w)),w}function z(w,$){return $=x(w.type,$,w.props,w._owner,w._debugStack,w._debugTask),w._store&&($._store.validated=w._store.validated),$}function J(w){re(w)?w._store&&(w._store.validated=1):typeof w=="object"&&w!==null&&w.$$typeof===We&&(w._payload.status==="fulfilled"?re(w._payload.value)&&w._payload.value._store&&(w._payload.value._store.validated=1):w._store&&(w._store.validated=1))}function re(w){return typeof w=="object"&&w!==null&&w.$$typeof===ot}function ie(w){var $={"=":"=0",":":"=2"};return"$"+w.replace(/[=:]/g,function(Te){return $[Te]})}function Fe(w,$){return typeof w=="object"&&w!==null&&w.key!=null?(E(w.key),ie(""+w.key)):$.toString(36)}function Be(w){switch(w.status){case"fulfilled":return w.value;case"rejected":throw w.reason;default:switch(typeof w.status=="string"?w.then(_,_):(w.status="pending",w.then(function($){w.status==="pending"&&(w.status="fulfilled",w.value=$)},function($){w.status==="pending"&&(w.status="rejected",w.reason=$)})),w.status){case"fulfilled":return w.value;case"rejected":throw w.reason}}throw w}function Ge(w,$,Te,ze,st){var Nt=typeof w;(Nt==="undefined"||Nt==="boolean")&&(w=null);var Ct=!1;if(w===null)Ct=!0;else switch(Nt){case"bigint":case"string":case"number":Ct=!0;break;case"object":switch(w.$$typeof){case ot:case Ze:Ct=!0;break;case We:return Ct=w._init,Ge(Ct(w._payload),$,Te,ze,st)}}if(Ct){Ct=w,st=st(Ct);var Vt=ze===""?"."+Fe(Ct,0):ze;return Ot(st)?(Te="",Vt!=null&&(Te=Vt.replace(On,"$&/")+"/"),Ge(st,$,Te,"",function(An){return An})):st!=null&&(re(st)&&(st.key!=null&&(Ct&&Ct.key===st.key||E(st.key)),Te=z(st,Te+(st.key==null||Ct&&Ct.key===st.key?"":(""+st.key).replace(On,"$&/")+"/")+Vt),ze!==""&&Ct!=null&&re(Ct)&&Ct.key==null&&Ct._store&&!Ct._store.validated&&(Te._store.validated=2),st=Te),$.push(st)),1}if(Ct=0,Vt=ze===""?".":ze+":",Ot(w))for(var Ut=0;Ut<w.length;Ut++)ze=w[Ut],Nt=Vt+Fe(ze,Ut),Ct+=Ge(ze,$,Te,Nt,st);else if(Ut=t(w),typeof Ut=="function")for(Ut===w.entries&&(on||console.warn("Using Maps as children is not supported. Use an array of keyed ReactElements instead."),on=!0),w=Ut.call(w),Ut=0;!(ze=w.next()).done;)ze=ze.value,Nt=Vt+Fe(ze,Ut++),Ct+=Ge(ze,$,Te,Nt,st);else if(Nt==="object"){if(typeof w.then=="function")return Ge(Be(w),$,Te,ze,st);throw $=String(w),Error("Objects are not valid as a React child (found: "+($==="[object Object]"?"object with keys {"+Object.keys(w).join(", ")+"}":$)+"). If you meant to render a collection of children, use an array instead.")}return Ct}function Ke(w,$,Te){if(w==null)return w;var ze=[],st=0;return Ge(w,ze,"","",function(Nt){return $.call(Te,Nt,st++)}),ze}function de(w){if(w._status===-1){var $=w._ioInfo;$!=null&&($.start=$.end=performance.now()),$=w._result;var Te=$();if(Te.then(function(st){if(w._status===0||w._status===-1){w._status=1,w._result=st;var Nt=w._ioInfo;Nt!=null&&(Nt.end=performance.now()),Te.status===void 0&&(Te.status="fulfilled",Te.value=st)}},function(st){if(w._status===0||w._status===-1){w._status=2,w._result=st;var Nt=w._ioInfo;Nt!=null&&(Nt.end=performance.now()),Te.status===void 0&&(Te.status="rejected",Te.reason=st)}}),$=w._ioInfo,$!=null){$.value=Te;var ze=Te.displayName;typeof ze=="string"&&($.name=ze)}w._status===-1&&(w._status=0,w._result=Te)}if(w._status===1)return $=w._result,$===void 0&&console.error(`lazy: Expected the result of a dynamic import() call. Instead received: %s
|
|
5
5
|
|
|
6
6
|
Your code should look like:
|
|
7
7
|
const MyComponent = lazy(() => import('./MyComponent'))
|
|
@@ -458,7 +458,7 @@ ${L}`)):Ne==="feedback"&&O&&_i(O)},[ce,te]),Ai=(0,it.useCallback)(Ne=>{Ya(!1);le
|
|
|
458
458
|
`+v.map(Q=>" "+Q).join(`
|
|
459
459
|
`):"";b(Q=>[...Q,{role:"system",content:`\u27F2 Restored ${String(v.length)} file(s). Conversation unchanged.${L}`}]);break}case"cancel":break}},[li]),mo=()=>{let Ne=Aa.current;Ne&&Ne.needsReload()&&(Ne.reload(),aI(Ne,da.current,Ee.current))},Bn=(0,it.useRef)(!1),_i=async Ne=>{if(Bn.current)return;if(Bn.current=!0,mo(),cx(Je,Ne),We(v=>[...v,Ne]),Ne.startsWith("/")&&await di(Ne)){Bn.current=!1;return}if(!wt.current){Ze("LLM client not ready yet"),Bn.current=!1;return}b(v=>[...v,{role:"user",content:Ne}]);let O=await Cx(Ne,ce);zt.current.addUserMessage(O),A0(ce,St.current,{role:"user",content:typeof O=="string"?Ne:[{type:"text",text:Ne},...O.filter(v=>v.type==="image")],timestamp:Math.floor(Date.now()/1e3)}),Be.current=Date.now(),Fe(null),z(!0),k(""),Ze(null),Oe([]);try{await Vr()}catch(v){let L=Ti(v);if(ws(Av(v),"name")==="AbortError"||L.includes("abort")){let F=Ge.current;F&&b(X=>[...X,{role:"assistant",content:F+`
|
|
460
460
|
|
|
461
|
-
*[cancelled]*`}]),b(X=>[...X,{role:"system",content:"(response interrupted)"}])}else{let F=Ge.current;F&&b(X=>[...X,{role:"assistant",content:F}]),Ze(L),b(X=>[...X,{role:"system",content:`Error: ${L}`}])}}finally{let v=Math.floor((Date.now()-Be.current)/1e3);Fe(`\u273B ${Bv()} for ${String(v)}s`),z(!1),Oe([]),Vt.current=null,Bn.current=!1}};return E==="providerSelect"?(0,ta.jsx)(r7,{providers:e,onSelect:go}):(0,ta.jsxs)(at,{flexDirection:"column",width:"100%",children:[(0,ta.jsxs)(at,{flexDirection:"column",paddingTop:0,flexGrow:1,children:[(0,ta.jsx)(fy,{items:[{type:"brand",_key:"brand",model:T.model||T.name,workDir:ce},...R.map((Ne,O)=>({type:"message",_key:`message-${String(O)}`,message:Ne}))],children:Ne=>Ne.type==="brand"?(0,ta.jsxs)(at,{flexDirection:"column",children:[(0,ta.jsxs)(j,{children:[(0,ta.jsx)(j,{color:wd.focused,children:" /\\_/\\ "}),(0,ta.jsxs)(j,{dimColor:!0,children:["Swifty v",uC]})]}),(0,ta.jsxs)(j,{children:[(0,ta.jsx)(j,{color:wd.focused,children:"( o o ) "}),(0,ta.jsx)(j,{dimColor:!0,children:Ne.model})]}),(0,ta.jsxs)(j,{children:[(0,ta.jsx)(j,{color:wd.focused,children:" > < "}),(0,ta.jsx)(j,{dimColor:!0,children:Ne.workDir})]}),(0,ta.jsx)(j,{children:" "})]},Ne._key):(0,ta.jsx)(xG,{message:Ne.message,expanded:Kr},Ne._key)},`transcript-${St.current}-${String(Oi)}-${String(Kr)}`),(0,ta.jsx)(MG,{messages:[],streamingText:x?B:void 0,expanded:Kr}),de.length>0&&!mr&&(0,ta.jsx)(E7,{tools:de}),Ji.length>0&&!mr&&(0,ta.jsx)(at,{flexDirection:"column",paddingLeft:1,children:Ji.map(Ne=>(0,ta.jsxs)(j,{color:"magenta",children:[$a.dot," ",Ne.label," subagent \xB7 turn ",Ne.turn,Ne.lastTool?` \xB7 ${Ne.lastTool}`:""]},Ne.id))}),x&&!mr&&(0,ta.jsxs)(at,{paddingLeft:1,flexDirection:"column",children:[(0,ta.jsx)(CD,{inputTokens:lt,outputTokens:xt}),ir.length>0&&(0,ta.jsx)(yD,{teammates:ir,leaderTokens:lt+xt})]}),!x&&ir.some(Ne=>Ne.status==="running")&&(0,ta.jsx)(at,{paddingLeft:1,children:(0,ta.jsx)(yD,{teammates:ir})}),J&&!x&&!mr&&(0,ta.jsx)(at,{paddingLeft:1,children:(0,ta.jsx)(CD,{label:"Compacting conversation"})}),ot&&(0,ta.jsx)(at,{paddingLeft:1,children:(0,ta.jsx)(j,{color:"red",children:ot})}),!x&&ie&&!mr&&!fn&&(0,ta.jsx)(at,{paddingLeft:1,children:(0,ta.jsx)(j,{dimColor:!0,children:ie})}),(0,ta.jsx)(j,{children:" "})]}),Dt&&(0,ta.jsx)(a7,{onSelect:Xa}),An&&(0,ta.jsx)(i7,{snapshots:li,onComplete:Ai,onCancel:()=>{Ya(!1)}}),fn&&(0,ta.jsx)(t7,{toolName:fn.toolName,argsSummary:fn.argsSummary,reason:fn.reason,onComplete:Ne=>{Ut.current?.(Ne),Ut.current=null,Xn(null)}}),mr&&(0,ta.jsx)(fx,{questions:mr,onComplete:Ne=>{Oa.current?.(Ne),Oa.current=null,Hs(null)}}),qr&&(0,ta.jsx)(m7,{teammates:ir,onClose:()=>{Di(!1)},onKill:(Ne,O)=>{let v=ve.current.get(O);v&&v.stopMember(Ne)},onShutdown:(Ne,O)=>{let v=ve.current.get(O);v&&v.sendMessage("lead",Ne,"[shutdown] Please finish and exit")}}),po&&(0,ta.jsx)(at,{paddingLeft:1,children:(0,ta.jsx)(j,{dimColor:!0,children:"Press Ctrl+C again to exit."})}),(0,ta.jsx)(p7,{count:ir.filter(Ne=>Ne.status==="running"||Ne.status==="idle").length}),(0,ta.jsx)($G,{onSubmit:Ne=>{_i(Ne)},disabled:An||fn!==null||mr!==null,submitDisabled:x||J,history:Ce,commands:da.current.listCommands(),usageTracker:gt.current,inputState:ot?"error":x||J||An||fn?"idle":"focused",permMode:he,onModeChange:Ne=>{Ve(Ne)},workDir:ce,insertTextRef:Uo,onEscape:()=>{x&&Vt.current?.abort()}})]})}function Jse(e,t){return t?a=>e(a)&&t(a):e}var Xse="\x1B[?2026h",jse="\x1B[?2026l";function Zse(){if(process.env.TMUX)return!1;let e=process.env.TERM_PROGRAM,t=process.env.TERM;if(e==="iTerm.app"||e==="WezTerm"||e==="WarpTerminal"||e==="ghostty"||e==="contour"||e==="vscode"||e==="alacritty"||t?.includes("kitty")||process.env.KITTY_WINDOW_ID||t==="xterm-ghostty"||t?.startsWith("foot")||t?.includes("alacritty")||process.env.ZED_TERM||process.env.WT_SESSION)return!0;let a=process.env.VTE_VERSION;return!!(a&&parseInt(a,10)>=6800)}function y7(){if(!Zse())return;let e=process.stdout.write.bind(process.stdout),t="",a=!1;process.stdout.write=function(i,l,u){let _=typeof i=="string"?i:Buffer.isBuffer(i)?i.toString():String(i);return t+=_,a||(a=!0,queueMicrotask(()=>{let p=Xse+t+jse;t="",a=!1,e(p)})),typeof l=="function"?l():typeof u=="function"&&u(),!0}}var T7=qe(Ga(),1);async function $se(){let e=process.argv.slice(2),t=ax(e);if(t){try{await nx(t)}catch(_){console.error(`teammate: ${Ti(_)}`),process.exit(1)}return}let a="";for(let _=0;_<e.length;_++)e[_]==="--remote"&&(a=":18888",_+1<e.length&&!e[_+1].startsWith("-")&&(a=e[_+1],_++));let i=ZM(e);if(i){try{await $M(i)}catch(_){console.error(`Error: ${Ti(_)}`),process.exit(1)}return}let l;try{l=Ng()}catch(_){console.error(`Error: ${Ti(_)}`),process.exit(1)}if(e.includes("--remote")&&a){let{RemoteServer:_}=await import("./server-
|
|
461
|
+
*[cancelled]*`}]),b(X=>[...X,{role:"system",content:"(response interrupted)"}])}else{let F=Ge.current;F&&b(X=>[...X,{role:"assistant",content:F}]),Ze(L),b(X=>[...X,{role:"system",content:`Error: ${L}`}])}}finally{let v=Math.floor((Date.now()-Be.current)/1e3);Fe(`\u273B ${Bv()} for ${String(v)}s`),z(!1),Oe([]),Vt.current=null,Bn.current=!1}};return E==="providerSelect"?(0,ta.jsx)(r7,{providers:e,onSelect:go}):(0,ta.jsxs)(at,{flexDirection:"column",width:"100%",children:[(0,ta.jsxs)(at,{flexDirection:"column",paddingTop:0,flexGrow:1,children:[(0,ta.jsx)(fy,{items:[{type:"brand",_key:"brand",model:T.model||T.name,workDir:ce},...R.map((Ne,O)=>({type:"message",_key:`message-${String(O)}`,message:Ne}))],children:Ne=>Ne.type==="brand"?(0,ta.jsxs)(at,{flexDirection:"column",children:[(0,ta.jsxs)(j,{children:[(0,ta.jsx)(j,{color:wd.focused,children:" /\\_/\\ "}),(0,ta.jsxs)(j,{dimColor:!0,children:["Swifty v",uC]})]}),(0,ta.jsxs)(j,{children:[(0,ta.jsx)(j,{color:wd.focused,children:"( o o ) "}),(0,ta.jsx)(j,{dimColor:!0,children:Ne.model})]}),(0,ta.jsxs)(j,{children:[(0,ta.jsx)(j,{color:wd.focused,children:" > < "}),(0,ta.jsx)(j,{dimColor:!0,children:Ne.workDir})]}),(0,ta.jsx)(j,{children:" "})]},Ne._key):(0,ta.jsx)(xG,{message:Ne.message,expanded:Kr},Ne._key)},`transcript-${St.current}-${String(Oi)}-${String(Kr)}`),(0,ta.jsx)(MG,{messages:[],streamingText:x?B:void 0,expanded:Kr}),de.length>0&&!mr&&(0,ta.jsx)(E7,{tools:de}),Ji.length>0&&!mr&&(0,ta.jsx)(at,{flexDirection:"column",paddingLeft:1,children:Ji.map(Ne=>(0,ta.jsxs)(j,{color:"magenta",children:[$a.dot," ",Ne.label," subagent \xB7 turn ",Ne.turn,Ne.lastTool?` \xB7 ${Ne.lastTool}`:""]},Ne.id))}),x&&!mr&&(0,ta.jsxs)(at,{paddingLeft:1,flexDirection:"column",children:[(0,ta.jsx)(CD,{inputTokens:lt,outputTokens:xt}),ir.length>0&&(0,ta.jsx)(yD,{teammates:ir,leaderTokens:lt+xt})]}),!x&&ir.some(Ne=>Ne.status==="running")&&(0,ta.jsx)(at,{paddingLeft:1,children:(0,ta.jsx)(yD,{teammates:ir})}),J&&!x&&!mr&&(0,ta.jsx)(at,{paddingLeft:1,children:(0,ta.jsx)(CD,{label:"Compacting conversation"})}),ot&&(0,ta.jsx)(at,{paddingLeft:1,children:(0,ta.jsx)(j,{color:"red",children:ot})}),!x&&ie&&!mr&&!fn&&(0,ta.jsx)(at,{paddingLeft:1,children:(0,ta.jsx)(j,{dimColor:!0,children:ie})}),(0,ta.jsx)(j,{children:" "})]}),Dt&&(0,ta.jsx)(a7,{onSelect:Xa}),An&&(0,ta.jsx)(i7,{snapshots:li,onComplete:Ai,onCancel:()=>{Ya(!1)}}),fn&&(0,ta.jsx)(t7,{toolName:fn.toolName,argsSummary:fn.argsSummary,reason:fn.reason,onComplete:Ne=>{Ut.current?.(Ne),Ut.current=null,Xn(null)}}),mr&&(0,ta.jsx)(fx,{questions:mr,onComplete:Ne=>{Oa.current?.(Ne),Oa.current=null,Hs(null)}}),qr&&(0,ta.jsx)(m7,{teammates:ir,onClose:()=>{Di(!1)},onKill:(Ne,O)=>{let v=ve.current.get(O);v&&v.stopMember(Ne)},onShutdown:(Ne,O)=>{let v=ve.current.get(O);v&&v.sendMessage("lead",Ne,"[shutdown] Please finish and exit")}}),po&&(0,ta.jsx)(at,{paddingLeft:1,children:(0,ta.jsx)(j,{dimColor:!0,children:"Press Ctrl+C again to exit."})}),(0,ta.jsx)(p7,{count:ir.filter(Ne=>Ne.status==="running"||Ne.status==="idle").length}),(0,ta.jsx)($G,{onSubmit:Ne=>{_i(Ne)},disabled:An||fn!==null||mr!==null,submitDisabled:x||J,history:Ce,commands:da.current.listCommands(),usageTracker:gt.current,inputState:ot?"error":x||J||An||fn?"idle":"focused",permMode:he,onModeChange:Ne=>{Ve(Ne)},workDir:ce,insertTextRef:Uo,onEscape:()=>{x&&Vt.current?.abort()}})]})}function Jse(e,t){return t?a=>e(a)&&t(a):e}var Xse="\x1B[?2026h",jse="\x1B[?2026l";function Zse(){if(process.env.TMUX)return!1;let e=process.env.TERM_PROGRAM,t=process.env.TERM;if(e==="iTerm.app"||e==="WezTerm"||e==="WarpTerminal"||e==="ghostty"||e==="contour"||e==="vscode"||e==="alacritty"||t?.includes("kitty")||process.env.KITTY_WINDOW_ID||t==="xterm-ghostty"||t?.startsWith("foot")||t?.includes("alacritty")||process.env.ZED_TERM||process.env.WT_SESSION)return!0;let a=process.env.VTE_VERSION;return!!(a&&parseInt(a,10)>=6800)}function y7(){if(!Zse())return;let e=process.stdout.write.bind(process.stdout),t="",a=!1;process.stdout.write=function(i,l,u){let _=typeof i=="string"?i:Buffer.isBuffer(i)?i.toString():String(i);return t+=_,a||(a=!0,queueMicrotask(()=>{let p=Xse+t+jse;t="",a=!1,e(p)})),typeof l=="function"?l():typeof u=="function"&&u(),!0}}var T7=qe(Ga(),1);async function $se(){let e=process.argv.slice(2),t=ax(e);if(t){try{await nx(t)}catch(_){console.error(`teammate: ${Ti(_)}`),process.exit(1)}return}let a="";for(let _=0;_<e.length;_++)e[_]==="--remote"&&(a=":18888",_+1<e.length&&!e[_+1].startsWith("-")&&(a=e[_+1],_++));let i=ZM(e);if(i){try{await $M(i)}catch(_){console.error(`Error: ${Ti(_)}`),process.exit(1)}return}let l;try{l=Ng()}catch(_){console.error(`Error: ${Ti(_)}`),process.exit(1)}if(e.includes("--remote")&&a){let{RemoteServer:_}=await import("./server-R4QVQ3LB.js");BE({sessionId:Rg(),mode:"remote"});let p=new _({providers:l.providers,mcpServers:l.mcp_servers,hookConfigs:l.hooks,addr:a,enableCoordinatorMode:l.enable_coordinator_mode??!1,forkDisabled:!kE(l)});try{await p.run()}catch(E){console.error(`Remote server error: ${Ti(E)}`),process.exit(1)}return}BE({sessionId:Rg(),mode:"tui"}),y7(),await Yb((0,T7.jsx)(C7,{providers:l.providers,permissionMode:l.permission_mode,mcpServers:l.mcp_servers,hooks:l.hooks,sandboxConfig:l.sandbox,enableCoordinatorMode:l.enable_coordinator_mode,forkDisabled:!kE(l)}),{exitOnCtrlC:!1}).waitUntilExit()}$se().catch(e=>{console.error(e),tC.fatal({err:e},"main() unhandled error"),process.exit(-1)});process.on("exit",eC);process.on("unhandledRejection",e=>{console.error("unhandled rejection:",e),tC.fatal({err:e},"unhandled rejection"),process.exit(1)});process.on("uncaughtException",e=>{console.error("uncaught exception:",e),tC.fatal({err:e},"uncaught exception"),process.exit(1)});
|
|
462
462
|
/*! Bundled license information:
|
|
463
463
|
|
|
464
464
|
react/cjs/react.production.js:
|