@hyperdrive.bot/fleet-server 0.3.123 → 0.3.125

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.
@@ -849,7 +849,7 @@ __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,"__esModule",{v
849
849
  __d(function(g,r,i,a,m,e,d){"use strict";var t=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.shouldAppendSitemap=u,e.shouldAppendNotFound=s,e.getRootStackRouteNames=function(){const t=[n.INTERNAL_SLOT_NAME];s()&&t.push(n.NOT_FOUND_ROUTE_NAME);u()&&t.push(n.SITEMAP_ROUTE_NAME);return t};const o=t(r(d[0])),n=r(d[1]);function u(){const t=o.default.expoConfig?.extra?.router;return!1!==t?.sitemap}function s(){const t=o.default.expoConfig?.extra?.router;return!1!==t?.notFound}},717,[718,721]);
850
850
  __d(function(g,r,i,a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return N}}),Object.defineProperty(_e,"AppOwnership",{enumerable:!0,get:function(){return l.AppOwnership}}),Object.defineProperty(_e,"ExecutionEnvironment",{enumerable:!0,get:function(){return l.ExecutionEnvironment}}),Object.defineProperty(_e,"UserInterfaceIdiom",{enumerable:!0,get:function(){return l.UserInterfaceIdiom}});var n=e(r(d[0])),t=r(d[1]);r(d[2]);var u=e(r(d[3])),l=r(d[4]),o=e(r(d[5]));o.default||console.warn("No native ExponentConstants module found, are you sure the expo-constants's module is linked properly?");const s=(0,t.requireOptionalNativeModule)('ExpoUpdates');let f=null;if(s){let e;s.manifest?e=s.manifest:s.manifestString&&(e=JSON.parse(s.manifestString)),e&&Object.keys(e).length>0&&(f=e)}let c=null;if(u.default.EXDevLauncher){let e;u.default.EXDevLauncher.manifestString&&(e=JSON.parse(u.default.EXDevLauncher.manifestString)),e&&Object.keys(e).length>0&&(c=e)}let p=null;if(o.default&&o.default.manifest){const e=o.default.manifest;p='string'==typeof e?JSON.parse(e):e}let b=f??c??p;const E=o.default||{},{appOwnership:O}=E,x=(0,n.default)(E,["name","appOwnership"]),v=Object.assign({},x,{appOwnership:O??null});function _(e){return!h(e)}function h(e){return'metadata'in e}function S(e=!1){if(!b){const e=null===b?'null':'undefined';if(x.executionEnvironment,l.ExecutionEnvironment.Bare,x.executionEnvironment===l.ExecutionEnvironment.StoreClient||x.executionEnvironment===l.ExecutionEnvironment.Standalone)throw new t.CodedError('ERR_CONSTANTS_MANIFEST_UNAVAILABLE',`Constants.manifest is ${e}, must be an object.`)}return b}Object.defineProperties(v,{__unsafeNoWarnManifest:{get(){const e=S(!0);return e&&_(e)?e:null},enumerable:!1},__unsafeNoWarnManifest2:{get(){const e=S(!0);return e&&h(e)?e:null},enumerable:!1},manifest:{get(){const e=S();return e&&_(e)?e:null},enumerable:!0},manifest2:{get(){const e=S();return e&&h(e)?e:null},enumerable:!0},expoConfig:{get(){const e=S(!0);return e?s&&s.isEmbeddedLaunch?p:h(e)?e.extra?.expoClient??null:_(e)?e:null:null},enumerable:!0},expoGoConfig:{get(){const e=S(!0);return e?h(e)?e.extra?.expoGo??null:_(e)?e:null:null},enumerable:!0},easConfig:{get(){const e=S(!0);return e?h(e)?e.extra?.eas??null:_(e)?e:null:null},enumerable:!0},__rawManifest_TEST:{get:()=>b,set(e){b=e},enumerable:!1}});var N=v},718,[35,4,25,637,719,720]);
851
851
  __d(function(g,r,i,a,m,e,d){"use strict";var t,n,o;Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"AppOwnership",{enumerable:!0,get:function(){return t}}),Object.defineProperty(e,"ExecutionEnvironment",{enumerable:!0,get:function(){return n}}),Object.defineProperty(e,"UserInterfaceIdiom",{enumerable:!0,get:function(){return o}}),(function(t){t.Expo="expo"})(t||(t={})),(function(t){t.Bare="bare",t.Standalone="standalone",t.StoreClient="storeClient"})(n||(n={})),(function(t){t.Handset="handset",t.Tablet="tablet",t.Desktop="desktop",t.TV="tv",t.Unsupported="unsupported"})(o||(o={}))},719,[]);
852
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return s}});var t=r(d[0]);const n=(Date.now()+'-'+Math.floor(1e9*Math.random())).toString();function o(){if('undefined'!=typeof navigator&&'string'==typeof navigator.userAgent){const t=navigator.userAgent.toLowerCase();if(t.includes('edge'))return'Edge';if(t.includes('edg'))return'Chromium Edge';if(t.includes('opr')&&'opr'in window&&window.opr)return'Opera';if(t.includes('chrome')&&'chrome'in window&&window.chrome)return'Chrome';if(t.includes('trident'))return'IE';if(t.includes('firefox'))return'Firefox';if(t.includes('safari'))return'Safari'}}var s={get appOwnership(){return null},get executionEnvironment(){return t.ExecutionEnvironment.Bare},get sessionId(){return n},get isHeadless(){return'undefined'==typeof navigator||/\bHeadlessChrome\//.test(navigator.userAgent)},get expoVersion(){return this.manifest.sdkVersion||null},get linkingUri(){return'undefined'!=typeof location?location.origin:''},get expoRuntimeVersion(){return this.expoVersion},get deviceName(){return o()},get systemFonts(){return[]},get statusBarHeight(){return 0},get deviceYearClass(){return null},get manifest(){return"{\"name\":\"Paseo\",\"slug\":\"paseo-hyperdrive\",\"version\":\"0.3.123\",\"orientation\":\"portrait\",\"icon\":\"./assets/images/icon.png\",\"scheme\":\"paseo\",\"userInterfaceStyle\":\"automatic\",\"newArchEnabled\":true,\"web\":{\"output\":\"single\",\"favicon\":\"./assets/images/favicon.png\",\"shortName\":\"Paseo\",\"orientation\":\"portrait\",\"name\":\"Paseo\"},\"autolinking\":{\"searchPaths\":[\"../../node_modules\",\"./node_modules\"]},\"experiments\":{\"typedRoutes\":true,\"reactCompiler\":true,\"autolinkingModuleResolution\":true},\"extra\":{\"router\":{},\"eas\":{\"build\":{\"experimental\":{\"ios\":{\"appExtensions\":[{\"bundleIdentifier\":\"bot.hyperdrive.paseo.AgentActivity\",\"targetName\":\"AgentActivity\"}]}}}}},\"sdkVersion\":\"54.0.0\",\"platforms\":[\"ios\",\"android\",\"web\"]}"},get manifest2(){return null},get experienceUrl(){return'undefined'!=typeof location?location.origin:''},get debugMode(){return!1},getWebViewUserAgentAsync:async()=>'undefined'!=typeof navigator?navigator.userAgent:null}},720,[719]);
852
+ __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return s}});var t=r(d[0]);const n=(Date.now()+'-'+Math.floor(1e9*Math.random())).toString();function o(){if('undefined'!=typeof navigator&&'string'==typeof navigator.userAgent){const t=navigator.userAgent.toLowerCase();if(t.includes('edge'))return'Edge';if(t.includes('edg'))return'Chromium Edge';if(t.includes('opr')&&'opr'in window&&window.opr)return'Opera';if(t.includes('chrome')&&'chrome'in window&&window.chrome)return'Chrome';if(t.includes('trident'))return'IE';if(t.includes('firefox'))return'Firefox';if(t.includes('safari'))return'Safari'}}var s={get appOwnership(){return null},get executionEnvironment(){return t.ExecutionEnvironment.Bare},get sessionId(){return n},get isHeadless(){return'undefined'==typeof navigator||/\bHeadlessChrome\//.test(navigator.userAgent)},get expoVersion(){return this.manifest.sdkVersion||null},get linkingUri(){return'undefined'!=typeof location?location.origin:''},get expoRuntimeVersion(){return this.expoVersion},get deviceName(){return o()},get systemFonts(){return[]},get statusBarHeight(){return 0},get deviceYearClass(){return null},get manifest(){return"{\"name\":\"Paseo\",\"slug\":\"paseo-hyperdrive\",\"version\":\"0.3.125\",\"orientation\":\"portrait\",\"icon\":\"./assets/images/icon.png\",\"scheme\":\"paseo\",\"userInterfaceStyle\":\"automatic\",\"newArchEnabled\":true,\"web\":{\"output\":\"single\",\"favicon\":\"./assets/images/favicon.png\",\"shortName\":\"Paseo\",\"orientation\":\"portrait\",\"name\":\"Paseo\"},\"autolinking\":{\"searchPaths\":[\"../../node_modules\",\"./node_modules\"]},\"experiments\":{\"typedRoutes\":true,\"reactCompiler\":true,\"autolinkingModuleResolution\":true},\"extra\":{\"router\":{},\"eas\":{\"build\":{\"experimental\":{\"ios\":{\"appExtensions\":[{\"bundleIdentifier\":\"bot.hyperdrive.paseo.AgentActivity\",\"targetName\":\"AgentActivity\"}]}}}}},\"sdkVersion\":\"54.0.0\",\"platforms\":[\"ios\",\"android\",\"web\"]}"},get manifest2(){return null},get experienceUrl(){return'undefined'!=typeof location?location.origin:''},get debugMode(){return!1},getWebViewUserAgentAsync:async()=>'undefined'!=typeof navigator?navigator.userAgent:null}},720,[719]);
853
853
  __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SITEMAP_ROUTE_NAME=e.NOT_FOUND_ROUTE_NAME=e.INTERNAL_SLOT_NAME=void 0,e.INTERNAL_SLOT_NAME='__root',e.NOT_FOUND_ROUTE_NAME='+not-found',e.SITEMAP_ROUTE_NAME='_sitemap'},721,[]);
854
854
  __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.resolveHref=void 0,e.resolveHrefStringWithSegments=function(t,{segments:n=[],params:s={}}={},{relativeToDirectory:o}={}){if(t.startsWith('.')){let c=n?.map(t=>{if(!t.startsWith('['))return t;if(t.startsWith('[...')){t=t.slice(4,-1);const n=s[t];return Array.isArray(n)?n.join('/'):n?.split(',')?.join('/')??''}return t=t.slice(1,-1),s[t]}).filter(Boolean).join('/')??'/';o&&(c=`${c}/`);const f=new URL(t,`http://hostname/${c}`);t=`${f.pathname}${f.search}`}return t};function t(t,s){for(const[o,c=""]of Object.entries(s)){const f=`[${o}]`,l=`[...${o}]`;if(t.includes(f))t=t.replace(f,n(c));else{if(!t.includes(l))continue;t=t.replace(l,n(c))}delete s[o]}return{pathname:t,params:s}}function n(t){return Array.isArray(t)?t.map(t=>n(t)).join('/'):encodeURIComponent(t.toString())}function s(t){return Object.entries(t).filter(([,t])=>null!=t).map(([t,n])=>`${t}=${encodeURIComponent(n.toString())}`).join('&')}e.resolveHref=n=>{if('string'==typeof n)return(0,e.resolveHref)({pathname:n});const o=n.pathname??'';if(!n?.params)return o;const{pathname:c,params:f}=t(o,Object.assign({},n.params)),l=s(f);return c+(l?`?${l}`:'')}},722,[]);
855
855
  __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isRoutePreloadedInStack=function(t,o){if(!t||'stack'!==t.type)return!1;return t.preloadedRoutes.some(t=>t.key===o.key)}},723,[]);
@@ -14092,7 +14092,7 @@ __d(function(g,r,i,a,m,_e,_d){"use strict";const e=["color","size","strokeWidth"
14092
14092
  __d(function(g,r,i,a,m,_e,d){"use strict";const e=["children","variant","size","leftIcon","trailing","style","textStyle","disabled","loading","accessibilityRole"];Object.defineProperty(_e,'__esModule',{value:!0}),_e.Button=function(o){const t=(0,p.c)(58);let h,v,C,j,z,R,S,H,V,M,k;if(t[0]!==o){var w=o;({children:v,variant:S,size:H,leftIcon:j,trailing:k,style:R,textStyle:M,disabled:C,loading:V,accessibilityRole:h}=w),z=(0,n.default)(w,e),t[0]=o,t[1]=h,t[2]=v,t[3]=C,t[4]=j,t[5]=z,t[6]=R,t[7]=S,t[8]=H,t[9]=V,t[10]=M,t[11]=k}else h=t[1],v=t[2],C=t[3],j=t[4],z=t[5],R=t[6],S=t[7],H=t[8],V=t[9],M=t[10],k=t[11];const D=void 0===S?"secondary":S,F=void 0===H?"md":H,I=void 0!==V&&V,[G,O]=(0,f.useState)(!1),{theme:W}=(0,_.useUnistyles)(),A=C||I;let P,X;t[12]!==D?(P="default"===D?y.default:"secondary"===D?y.secondary:"outline"===D?y.outline:"ghost"===D?y.ghost:y.destructive,t[12]=D,t[13]=P):P=t[13];t[14]!==F?(X="xs"===F?y.xs:"sm"===F?y.sm:"lg"===F?y.lg:y.md,t[14]=F,t[15]=X):X=t[15];const B=G&&"ghost"===D;let T;t[16]===Symbol.for("react.memo_cache_sentinel")?(T=()=>O(!0),t[16]=T):T=t[16];const U=T;let q;t[17]===Symbol.for("react.memo_cache_sentinel")?(q=()=>O(!1),t[17]=q):q=t[17];const E=q;let J;t[18]!==A||t[19]!==X||t[20]!==R||t[21]!==P?(J=e=>{const{pressed:o}=e;return[y.base,X,P,o?y.pressed:null,A?y.disabled:null,R]},t[18]=A,t[19]=X,t[20]=R,t[21]=P,t[22]=J):J=t[22];const K=J,L="xs"===F?y.textXs:null,N="default"===D?y.textDefault:null,Q="destructive"===D?y.textDestructive:null,Y="ghost"===D?y.textGhost:null,Z=B?y.textGhostHovered:null;let $;t[23]!==Y||t[24]!==Z||t[25]!==L||t[26]!==N||t[27]!==Q||t[28]!==M?($=[y.text,L,N,Q,Y,M,Z],t[23]=Y,t[24]=Z,t[25]=L,t[26]=N,t[27]=Q,t[28]=M,t[29]=$):$=t[29];const ee=$;let oe;t[30]!==A||t[31]!==I?(oe={disabled:A,busy:I},t[30]=A,t[31]=I,t[32]=oe):oe=t[32];const te=oe;let ne;t[33]!==B||t[34]!==W.colors.accentForeground||t[35]!==W.colors.foreground||t[36]!==W.colors.foregroundMuted||t[37]!==D?(ne=function(){return"default"===D?W.colors.accentForeground:"ghost"===D?B?W.colors.foreground:W.colors.foregroundMuted:W.colors.foreground},t[33]=B,t[34]=W.colors.accentForeground,t[35]=W.colors.foreground,t[36]=W.colors.foregroundMuted,t[37]=D,t[38]=ne):ne=t[38];const re=ne;let se;t[39]!==j||t[40]!==I||t[41]!==re||t[42]!==F?(se=function(){if(I)return(0,b.jsx)(s.View,{children:(0,b.jsx)(u.ActivityIndicator,{size:"small",color:re()})});if(!j)return null;if("object"==typeof j&&"type"in j)return(0,b.jsx)(s.View,{children:j});const e=re(),o=x[F];if("function"==typeof j&&!j.prototype?.isReactComponent&&j.length>0)return(0,b.jsx)(s.View,{children:j(e)});const t=j;return(0,b.jsx)(s.View,{children:(0,b.jsx)(t,{color:e,size:o})})},t[39]=j,t[40]=I,t[41]=re,t[42]=F,t[43]=se):se=t[43];const ie=se,de=h??"button";let ce,le,ae;t[44]!==ie?(ce=ie(),t[44]=ie,t[45]=ce):ce=t[45];t[46]!==v||t[47]!==ee?(le=null!=v?(0,b.jsx)(c.Text,{style:ee,children:v}):null,t[46]=v,t[47]=ee,t[48]=le):le=t[48];t[49]!==te||t[50]!==A||t[51]!==K||t[52]!==z||t[53]!==de||t[54]!==ce||t[55]!==le||t[56]!==k?(ae=(0,b.jsxs)(l.Pressable,Object.assign({},z,{accessibilityRole:de,accessibilityState:te,disabled:A,onHoverIn:U,onHoverOut:E,style:K,children:[ce,le,k]})),t[49]=te,t[50]=A,t[51]=K,t[52]=z,t[53]=de,t[54]=ce,t[55]=le,t[56]=k,t[57]=ae):ae=t[57];return ae};var o,t=r(d[0]),n=(o=t)&&o.__esModule?o:{default:o},s=r(d[1]),c=r(d[2]),l=r(d[3]),u=r(d[4]),p=r(d[5]),f=r(d[6]);r(d[7]),r(d[8]),r(d[9]),r(d[10]);var _=r(d[11]),b=r(d[12]);const x={xs:12,sm:14,md:16,lg:20},y=_.StyleSheet.create(e=>({base:{flexDirection:"row",alignItems:"center",justifyContent:"center",gap:e.spacing[2],borderRadius:e.borderRadius.lg,borderWidth:1,borderColor:"transparent",uni__dependencies:[0]},md:{paddingVertical:e.spacing[3],paddingHorizontal:e.spacing[4],uni__dependencies:[0]},xs:{minHeight:28,paddingVertical:e.spacing[1],paddingHorizontal:e.spacing[3],borderRadius:e.borderRadius.md,uni__dependencies:[0]},sm:{paddingVertical:e.spacing[1.5],paddingHorizontal:e.spacing[3],borderRadius:e.borderRadius.md,uni__dependencies:[0]},lg:{paddingVertical:e.spacing[4],paddingHorizontal:e.spacing[6],borderRadius:e.borderRadius.xl,uni__dependencies:[0]},default:{backgroundColor:e.colors.accent,borderColor:e.colors.accent,uni__dependencies:[0]},secondary:{backgroundColor:e.colors.surface3,borderColor:e.colors.surface3,uni__dependencies:[0]},outline:{backgroundColor:"transparent",borderColor:e.colors.borderAccent,uni__dependencies:[0]},ghost:{backgroundColor:"transparent",borderColor:"transparent"},destructive:{backgroundColor:e.colors.destructive,borderColor:e.colors.destructive,uni__dependencies:[0]},pressed:{opacity:.85,transform:[{scale:.97}]},disabled:{opacity:e.opacity[50],uni__dependencies:[0]},text:{color:e.colors.foreground,fontSize:e.fontSize.sm,fontWeight:e.fontWeight.normal,uni__dependencies:[0]},textXs:{fontSize:e.fontSize.xs,uni__dependencies:[0]},textDefault:{color:e.colors.accentForeground,uni__dependencies:[0]},textDestructive:{color:e.colors.destructiveForeground,uni__dependencies:[0]},textGhost:{color:e.colors.foregroundMuted,uni__dependencies:[0]},textGhostHovered:{color:e.colors.foreground,uni__dependencies:[0]}}))},2475,[35,348,349,2476,2477,350,36,654,546,234,146,56,279]);
14093
14093
  __d(function(g,r,i,a,m,_e,d){"use strict";const e=["style"];function t(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"Pressable",{enumerable:!0,get:function(){return h}});var s=t(r(d[0])),n=r(d[1]),o=t(r(d[2])),l=r(d[3]),y=r(d[4]),u=r(d[5]),c=r(d[6]);const h=(0,n.forwardRef)((t,n)=>{let{style:h}=t,f=(0,s.default)(t,e);const S=y.UnistylesShadowRegistry.getScopedTheme();let p,w=null;return(0,c.jsx)(o.default,Object.assign({},f,{ref:(0,u.isServer)()?void 0:e=>{if(w=e,y.UnistylesShadowRegistry.add(w,p?.hash),'function'==typeof n)return n(e);n&&(n.current=e)},style:e=>{const t='function'==typeof h?h(e):h,s=y.UnistylesShadowRegistry.getScopedTheme();return y.UnistylesShadowRegistry.setScopedTheme(S),y.UnistylesShadowRegistry.remove(w,p?.hash),p=(0,l.getClassName)(t),y.UnistylesShadowRegistry.add(w,p?.hash),y.UnistylesShadowRegistry.setScopedTheme(s),p}}))})},2476,[35,36,546,274,57,137,279]);
14094
14094
  __d(function(g,r,i,a,m,_e,d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"ActivityIndicator",{enumerable:!0,get:function(){return u}});var e,t=r(d[0]),n=(e=t)&&e.__esModule?e:{default:e};const u=(0,r(d[1]).createUnistylesElement)(n.default)},2477,[654,274]);
14095
- __d(function(g,r,i,a,m,_e,_d){"use strict";function e(e){if(e&&e.__esModule)return e;var t={};return e&&Object.keys(e).forEach(function(n){var o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,o.get?o:{enumerable:!0,get:function(){return e[n]}})}),t.default=e,t}function t(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return At}}),_e.useEarliestOnlineHostServerId=ze,_e.useStoreReady=qe,_e.useHostRuntimeBootstrapState=function(){return(0,S.useContext)(He)};var n=r(_d[0]),o=r(_d[1]);r(_d[2]);var s=r(_d[3]),c=r(_d[4]),l=r(_d[5]),u=e(r(_d[6])),d=e(r(_d[7])),h=r(_d[8]),S=r(_d[9]),f=(t(r(_d[10])),t(r(_d[11])));r(_d[12]);var _=r(_d[13]),p=r(_d[14]),v=r(_d[15]),b=r(_d[16]),y=r(_d[17]),x=r(_d[18]),k=r(_d[19]),j=r(_d[20]),w=r(_d[21]),O=r(_d[22]),E=r(_d[23]),P=r(_d[24]),I=r(_d[25]),T=r(_d[26]),D=r(_d[27]),F=r(_d[28]),W=r(_d[29]),C=r(_d[30]),R=r(_d[31]),A=r(_d[32]),H=r(_d[33]),G=r(_d[34]),L=r(_d[35]),X=r(_d[36]),M=r(_d[37]),B=r(_d[38]),z=r(_d[39]),N=r(_d[40]),Y=r(_d[41]),U=r(_d[42]),J=r(_d[43]),V=r(_d[44]),K=r(_d[45]),$=r(_d[46]),q=r(_d[47]),Q=r(_d[48]),Z=r(_d[49]),ee=r(_d[50]),te=r(_d[51]),ne=r(_d[52]),oe=r(_d[53]),re=r(_d[54]),se=r(_d[55]),ae=r(_d[56]),ie=r(_d[57]),ce=r(_d[58]),le=r(_d[59]),ue=r(_d[60]),de=r(_d[61]),he=r(_d[62]),Se=r(_d[63]),me=r(_d[64]),fe=r(_d[65]),pe=r(_d[66]),ge=r(_d[67]),ve=r(_d[68]),be=r(_d[69]),ye=r(_d[70]),xe=r(_d[71]),ke=r(_d[72]),je=r(_d[73]),we=r(_d[74]),Oe=r(_d[75]),Ee=r(_d[76]),Pe=r(_d[77]),Ie=r(_d[78]),Te=r(_d[79]),De=r(_d[80]),Fe=r(_d[81]),We=r(_d[82]),Ce=r(_d[83]),Re=r(_d[84]),Ae=r(_d[85]);(0,be.polyfillCrypto)(),(0,Re.initializeDatadog)();const He=(0,S.createContext)({splashError:null,retry:()=>{},hasGivenUpWaitingForHost:!1,storeReady:!1,startupBlocker:{kind:"none"}});function Ge(){const e=(0,o.c)(5),t=(0,h.useRouter)(),n=(0,S.useRef)(null);let s;(0,Z.useDatadogViewTracking)(),e[0]!==t?(s=e=>{const n=(0,Fe.resolveNotificationTarget)(e),o=n.serverId,s=n.agentId;o&&s?(0,We.navigateToAgent)({serverId:o,agentId:s,pin:!0}):t.navigate((0,Fe.buildNotificationRoute)(e))},e[0]=t,e[1]=s):s=e[1];const c=(0,pe.useStableEvent)(s);let l,u;return e[2]!==c?(l=()=>{if(L.isWeb){let e=null,t=!1;if((0,G.getIsElectronRuntime)()){(0,Ce.ensureOsNotificationPermission)();const n=(0,oe.getDesktopHost)()?.events?.on?.("notification-click",e=>{const t="object"==typeof e&&null!==e&&"data"in e&&"object"==typeof e.data&&null!==e.data?e.data:void 0;c(t)});Promise.resolve(n).then(n=>{"function"==typeof n&&(t?n():e=n)})}const n=e=>{const t=e;e.preventDefault(),c(t.detail?.data)};return window.addEventListener(Ce.WEB_NOTIFICATION_CLICK_EVENT,n),()=>{t=!0,e?.(),window.removeEventListener(Ce.WEB_NOTIFICATION_CLICK_EVENT,n)}}d.setNotificationHandler({handleNotification:Le}),(0,Q.registerNotificationCategories)(),(0,$.registerBackgroundAgentStateFetch)(),(0,q.registerLiveActivities)();const e=e=>{const t=e.notification.request.identifier;n.current!==t&&(n.current=t,(0,K.handlePermissionNotificationResponse)(e).then(t=>{if(t.handled)return;const n=e.notification.request.content.data;c(n)}))},t=d.addNotificationResponseReceivedListener(e);return d.getLastNotificationResponseAsync().then(t=>{t&&e(t)}),()=>{t.remove()}},u=[c],e[2]=c,e[3]=l,e[4]=u):(l=e[3],u=e[4]),(0,S.useEffect)(l,u),null}async function Le(){return{shouldShowAlert:!1,shouldShowBanner:!1,shouldShowList:!1,shouldPlaySound:!1,shouldSetBadge:!1}}function Xe(e){const t=(0,o.c)(3),{daemon:n}=e,s=(0,ke.useHostRuntimeClient)(n.serverId);if(!s)return null;let c;return t[0]!==s||t[1]!==n.serverId?(c=(0,Ae.jsx)(M.SessionProvider,{serverId:n.serverId,client:s,children:null},n.serverId),t[0]=s,t[1]=n.serverId,t[2]=c):c=t[2],c}function Me(){const e=(0,o.c)(4),t=(0,ke.useHosts)();if(0===t.length)return null;let n,s;return e[0]!==t?(n=t.map(Be),e[0]=t,e[1]=n):n=e[1],e[2]!==n?(s=(0,Ae.jsx)(Ae.Fragment,{children:n}),e[2]=n,e[3]=s):s=e[3],s}function Be(e){return(0,Ae.jsx)(Xe,{daemon:e},e.serverId)}function ze(){const e=(0,o.c)(4);let t;e[0]===Symbol.for("react.memo_cache_sentinel")?(t=(0,ke.getHostRuntimeStore)(),e[0]=t):t=e[0];const n=t;let s;e[1]===Symbol.for("react.memo_cache_sentinel")?(s=e=>{const t=n.subscribeAll(e),o=n.subscribeHostList(e);return()=>{t(),o()}},e[1]=s):s=e[1];const c=s;let l,u;return e[2]===Symbol.for("react.memo_cache_sentinel")?(l=()=>n.getEarliestOnlineHostServerId(),u=()=>n.getEarliestOnlineHostServerId(),e[2]=l,e[3]=u):(l=e[2],u=e[3]),(0,S.useSyncExternalStore)(c,l,u)}function Ne(){const e=(0,o.c)(4);let t;e[0]===Symbol.for("react.memo_cache_sentinel")?(t=(0,je.getDaemonStartService)({store:(0,ke.getHostRuntimeStore)()}),e[0]=t):t=e[0];const n=t;let s,c,l;return e[1]===Symbol.for("react.memo_cache_sentinel")?(s=e=>n.subscribe(e),c=()=>n.getLastError(),l=()=>n.getLastError(),e[1]=s,e[2]=c,e[3]=l):(s=e[1],c=e[2],l=e[3]),(0,S.useSyncExternalStore)(s,c,l)}function Ye(){const e=(0,o.c)(4);let t;e[0]===Symbol.for("react.memo_cache_sentinel")?(t=(0,je.getDaemonStartService)({store:(0,ke.getHostRuntimeStore)()}),e[0]=t):t=e[0];const n=t;let s,c,l;return e[1]===Symbol.for("react.memo_cache_sentinel")?(s=e=>n.subscribe(e),c=()=>n.isRunning(),l=()=>n.isRunning(),e[1]=s,e[2]=c,e[3]=l):(s=e[1],c=e[2],l=e[3]),(0,S.useSyncExternalStore)(s,c,l)}const Ue=5e3;async function Je(){if(!(0,ee.shouldUseDesktopDaemon)())return!1;if((0,ke.hasConfiguredLocalDaemonOverride)())return!1;return(await(0,re.loadDesktopSettings)()).daemon.manageBuiltInDaemon}function Ve(e){const t=(0,o.c)(23),{children:n}=e;let s;t[0]===Symbol.for("react.memo_cache_sentinel")?(s=[],t[0]=s):s=t[0],(0,S.useEffect)($e,s);const c=ze(),l=Ne(),u=Ye(),[d,h]=(0,S.useState)(!1);let f;t[1]===Symbol.for("react.memo_cache_sentinel")?(f=(0,ee.shouldUseDesktopDaemon)(),t[1]=f):f=t[1];const _=f;let p;t[2]!==c||t[3]!==l||t[4]!==u?(p=(0,J.resolveStartupBlocker)({isDesktopRuntime:_,anyOnlineHostServerId:c,daemonStartIsRunning:u,daemonStartError:l}),t[2]=c,t[3]=l,t[4]=u,t[5]=p):p=t[5];const v=p;let b;t[6]!==c||t[7]!==d||t[8]!==v?(b=(0,J.shouldRunStartupGiveUpTimer)({startupBlocker:v,anyOnlineHostServerId:c,hasGivenUpWaitingForHost:d}),t[6]=c,t[7]=d,t[8]=v,t[9]=b):b=t[9];const y=b;let x,k;t[10]!==y?(x=()=>{if(!y)return;const e=setTimeout(()=>{h(!0)},Ue);return()=>{clearTimeout(e)}},k=[y],t[10]=y,t[11]=x,t[12]=k):(x=t[11],k=t[12]),(0,S.useEffect)(x,k);const j=Ke,w="managed-daemon-error"===v.kind?v.message:null;let O;t[13]!==v?(O=(0,J.resolveStartupNavigationReady)({startupBlocker:v}),t[13]=v,t[14]=O):O=t[14];const E=O;let P;t[15]!==d||t[16]!==w||t[17]!==v||t[18]!==E?(P={splashError:w,retry:j,hasGivenUpWaitingForHost:d,storeReady:E,startupBlocker:v},t[15]=d,t[16]=w,t[17]=v,t[18]=E,t[19]=P):P=t[19];const I=P;let T;return t[20]!==n||t[21]!==I?(T=(0,Ae.jsx)(He.Provider,{value:I,children:n}),t[20]=n,t[21]=I,t[22]=T):T=t[22],T}function Ke(){const e=(0,je.getDaemonStartService)({store:(0,ke.getHostRuntimeStore)()});(0,J.startDaemonIfGateAllows)({daemonStartService:e,shouldStartDaemon:Je,onGateError:t=>e.recordError(t)})}function $e(){const e=(0,ke.getHostRuntimeStore)(),t=(0,je.getDaemonStartService)({store:e});(0,J.startHostRuntimeBootstrap)({store:e,daemonStartService:t,shouldStartDaemon:Je,onGateError:e=>t.recordError(e)})}function qe(){return(0,S.useContext)(He).storeReady}function Qe(e){const t=(0,o.c)(2),{children:n}=e;let s;return t[0]!==n?(s=(0,Ae.jsx)(l.QueryClientProvider,{client:xe.queryClient,children:n}),t[0]=n,t[1]=s):s=t[1],s}const Ze={flex:1,flexDirection:"row"},et={flex:1},tt=32,nt=L.isWeb?"auto":"pan-y",ot=["dark","zinc","midnight","claude","ghostty","light"];function rt(e){const t=(0,o.c)(58),{children:s,selectedAgentId:c,chromeEnabled:l}=e,u=(0,ke.useHosts)(),{settings:d,updateSettings:S}=(0,fe.useAppSettings)(),_=(0,Ee.usePanelStore)(mt),p=(0,Ee.usePanelStore)(St),v=(0,Ee.usePanelStore)(ht),b=(0,Ee.usePanelStore)(dt),y=(0,Ee.usePanelStore)(ut),w=(0,Ee.usePanelStore)(lt),L=(0,Ee.usePanelStore)(ct);(0,Se.useForegroundReconnect)();const X=at;let M;t[0]!==d.theme||t[1]!==S?(M=()=>{const e=(ot.indexOf(d.theme)+1)%ot.length;S({theme:ot[e]})},t[0]=d.theme,t[1]=S,t[2]=M):M=t[2];const z=M,N=(0,G.useIsCompactFormFactor)(),Y=(0,f.default)(),U=!1;let J;t[3]!==Y.height||t[4]!==Y.width?(J=(0,x.resolveColumnMode)({width:Y.width,height:Y.height,isTablet:U}),t[3]=Y.height,t[4]=Y.width,t[5]=J):J=t[5];const V=N||U;(0,he.useCompactWebViewportZoomLock)(V);const K=(0,h.usePathname)(),$=l??u.length>0,q=V?_:p;let Q;t[6]!==b||t[7]!==y||t[8]!==v?(Q=()=>{const{desktop:e}=Ee.usePanelStore.getState();(0,Ie.toggleDesktopSidebarsWithCheckoutIntent)({isAgentListOpen:e.agentListOpen,isFileExplorerOpen:e.fileExplorerOpen,openAgentList:v,closeAgentList:b,closeFileExplorer:y,toggleFocusedFileExplorer:st})},t[6]=b,t[7]=y,t[8]=v,t[9]=Q):Q=t[9];const Z=Q;let ee;t[10]!==$||t[11]!==K?(ee=$||K.startsWith("/settings"),t[10]=$,t[11]=K,t[12]=ee):ee=t[12];const te=ee;let ne,oe,re,le;t[13]!==z||t[14]!==V||t[15]!==te||t[16]!==q||t[17]!==Z||t[18]!==w?(ne={enabled:te,isMobile:V,toggleAgentList:q,toggleBothSidebars:Z,toggleFocusMode:w,cycleTheme:z},t[13]=z,t[14]=V,t[15]=te,t[16]=q,t[17]=Z,t[18]=w,t[19]=ne):ne=t[19],(0,ue.useKeyboardShortcuts)(ne),(0,ie.useActiveWorktreeNewAction)(),(0,ce.useGlobalNewWorkspaceAction)(),t[20]!==$||t[21]!==V||t[22]!==L||t[23]!==c?(oe=!V&&$&&!L&&(0,Ae.jsx)(T.LeftSidebar,{selectedAgentId:c}),t[20]=$,t[21]=V,t[22]=L,t[23]=c,t[24]=oe):oe=t[24],t[25]!==s||t[26]!==$||t[27]!==V?(re=V&&$?(0,Ae.jsx)(B.ExplorerSidebarAnimationProvider,{children:(0,Ae.jsx)(D.CompactExplorerSidebarHost,{enabled:$,children:(0,Ae.jsx)(n.View,{style:et,children:s})})}):(0,Ae.jsx)(n.View,{style:et,children:s}),t[25]=s,t[26]=$,t[27]=V,t[28]=re):re=t[28],t[29]!==oe||t[30]!==re?(le=(0,Ae.jsxs)(n.View,{style:Ze,children:[oe,re]}),t[29]=oe,t[30]=re,t[31]=le):le=t[31];const de=le;let me,pe,ge,ve,be,ye,xe,je,we,Oe,Pe,Te,De,Fe,We,Ce;t[32]===Symbol.for("react.memo_cache_sentinel")?(me=(0,Ae.jsx)(j.DaemonConnectionBanner,{onRetry:X}),t[32]=me):me=t[32],t[33]===Symbol.for("react.memo_cache_sentinel")?(pe=(0,Ae.jsx)(A.FloatingPanelPortalHost,{}),t[33]=pe):pe=t[33],t[34]!==$||t[35]!==V||t[36]!==c?(ge=V&&$&&(0,Ae.jsx)(T.LeftSidebar,{selectedAgentId:c}),t[34]=$,t[35]=V,t[36]=c,t[37]=ge):ge=t[37],t[38]===Symbol.for("react.memo_cache_sentinel")?(ve=(0,Ae.jsx)(E.DownloadToast,{}),be=(0,Ae.jsx)(se.RosettaCalloutSource,{}),ye=(0,Ae.jsx)(ae.UpdateCalloutSource,{}),xe=(0,Ae.jsx)(O.WorktreeSetupCalloutSource,{}),je=(0,Ae.jsx)(k.CommandCenter,{}),we=(0,Ae.jsx)(H.HostChooserModal,{}),Oe=(0,Ae.jsx)(F.ProjectPickerModal,{}),Pe=(0,Ae.jsx)(W.ProviderSettingsHost,{}),t[38]=ve,t[39]=be,t[40]=ye,t[41]=xe,t[42]=je,t[43]=we,t[44]=Oe,t[45]=Pe):(ve=t[38],be=t[39],ye=t[40],xe=t[41],je=t[42],we=t[43],Oe=t[44],Pe=t[45]),t[46]!==te?(Te=(0,Ae.jsx)(R.WorkspaceShortcutTargetsSubscriber,{enabled:te}),t[46]=te,t[47]=Te):Te=t[47],t[48]===Symbol.for("react.memo_cache_sentinel")?(De=(0,Ae.jsx)(C.WorkspaceSetupDialog,{}),Fe=(0,Ae.jsx)(I.KeyboardShortcutsDialog,{}),We=(0,Ae.jsx)(P.QuittingOverlay,{}),t[48]=De,t[49]=Fe,t[50]=We):(De=t[48],Fe=t[49],We=t[50]),t[51]!==ge||t[52]!==Te||t[53]!==de?(Ce=(0,Ae.jsxs)(n.View,{style:Ht.surfaceFill,children:[me,de,pe,ge,ve,be,ye,xe,je,we,Oe,Pe,Te,De,Fe,We]}),t[51]=ge,t[52]=Te,t[53]=de,t[54]=Ce):Ce=t[54];const Re=Ce;if(!V)return Re;let He;return t[55]!==$||t[56]!==Re?(He=(0,Ae.jsx)(yt,{chromeEnabled:$,children:Re}),t[55]=$,t[56]=Re,t[57]=He):He=t[57],He}function st(){return ve.keyboardActionDispatcher.dispatch({id:"sidebar.toggle.right",scope:"sidebar"})}function at(e){const t=(0,ke.getHostRuntimeStore)();t.ensureConnectedAll(),t.runProbeCycleNow(e).catch(it)}function it(){}function ct(e){return e.desktop.focusModeEnabled}function lt(e){return e.toggleFocusMode}function ut(e){return e.closeDesktopFileExplorer}function dt(e){return e.closeDesktopAgentList}function ht(e){return e.openDesktopAgentList}function St(e){return e.toggleDesktopAgentList}function mt(e){return e.toggleMobileAgentList}const ft={code:"function _layoutTsx1(){const{isGesturing,runOnJS,setOverlayPeek}=this.__closure;isGesturing.value=false;runOnJS(setOverlayPeek)(false);}"},_t={code:"function _layoutTsx2(event_2){const{isGesturing,windowWidth,animateToOpen,runOnJS,handleGestureOpen,animateToClose}=this.__closure;isGesturing.value=false;const shouldOpen=event_2.translationX>windowWidth/3||event_2.velocityX>500;if(shouldOpen){animateToOpen();runOnJS(handleGestureOpen)();}else{animateToClose();}}"},pt={code:"function _layoutTsx3(event_1){const{windowWidth,translateX,backdropOpacity,interpolate,Extrapolation}=this.__closure;const newTranslateX=Math.min(0,-windowWidth+event_1.translationX);translateX.value=newTranslateX;backdropOpacity.value=interpolate(newTranslateX,[-windowWidth,0],[0,1],Extrapolation.CLAMP);}"},gt={code:"function _layoutTsx4(){const{isGesturing,runOnJS,setOverlayPeek}=this.__closure;isGesturing.value=true;runOnJS(setOverlayPeek)(true);}"},vt={code:"function _layoutTsx5(event_0,stateManager){const{touchStartX,touchStartY,canOpenLeftSidebarGesture,mobilePanelState,translateX,windowWidth,horizontalScroll,isWeb,MOBILE_WEB_EDGE_SWIPE_WIDTH}=this.__closure;var _horizontalScroll;const touch_0=event_0.changedTouches[0];if(!touch_0||event_0.numberOfTouches!==1)return;const deltaX=touch_0.absoluteX-touchStartX.value;const deltaY=touch_0.absoluteY-touchStartY.value;const absDeltaX=Math.abs(deltaX);const absDeltaY=Math.abs(deltaY);if(!canOpenLeftSidebarGesture(mobilePanelState.value,translateX.value,windowWidth)){stateManager.fail();return;}if((_horizontalScroll=horizontalScroll)!==null&&_horizontalScroll!==void 0&&_horizontalScroll.isAnyScrolledRight.value){stateManager.fail();return;}if(isWeb&&touchStartX.value>MOBILE_WEB_EDGE_SWIPE_WIDTH){stateManager.fail();return;}if(deltaX<=-10){stateManager.fail();return;}if(absDeltaY>10&&absDeltaY>absDeltaX){stateManager.fail();return;}if(deltaX>15&&absDeltaX>absDeltaY){stateManager.activate();}}"},bt={code:"function _layoutTsx6(event){const{touchStartX,touchStartY}=this.__closure;const touch=event.changedTouches[0];if(touch){touchStartX.value=touch.absoluteX;touchStartY.value=touch.absoluteY;}}"};function yt({children:e,chromeEnabled:t}){const n=(0,Ee.usePanelStore)(e=>e.showMobileAgentList),o=(0,X.useHorizontalScrollOptional)(),{translateX:s,backdropOpacity:c,windowWidth:l,animateToOpen:u,animateToClose:d,setOverlayPeek:h,isGesturing:f,mobilePanelState:p,gestureAnimatingRef:b,openGestureRef:y}=(0,z.useSidebarAnimation)(),x=(0,v.useSharedValue)(0),k=(0,v.useSharedValue)(0),j=t,w=(0,S.useCallback)(()=>{b.current=!0,n()},[n,b]),O=(0,S.useMemo)(()=>_.Gesture.Pan().withRef(y).enabled(j).manualActivation(!0).failOffsetY([-10,10]).onTouchesDown((function({_worklet_1615879058013_init_data:e,touchStartX:t,touchStartY:n}){const o=function(e){const o=e.changedTouches[0];o&&(t.value=o.absoluteX,n.value=o.absoluteY)};return o.__closure={touchStartX:t,touchStartY:n},o.__workletHash=1615879058013,o.__initData=e,o})({_worklet_1615879058013_init_data:bt,touchStartX:x,touchStartY:k})).onTouchesMove((function({_worklet_8337771416778_init_data:e,touchStartX:t,touchStartY:n,canOpenLeftSidebarGesture:o,mobilePanelState:s,translateX:c,windowWidth:l,horizontalScroll:u,isWeb:d,MOBILE_WEB_EDGE_SWIPE_WIDTH:h}){const S=function(e,S){const f=e.changedTouches[0];if(!f||1!==e.numberOfTouches)return;const _=f.absoluteX-t.value,p=f.absoluteY-n.value,v=Math.abs(_),b=Math.abs(p);o(s.value,c.value,l)?u?.isAnyScrolledRight.value||d&&t.value>h||_<=-10||b>10&&b>v?S.fail():_>15&&v>b&&S.activate():S.fail()};return S.__closure={touchStartX:t,touchStartY:n,canOpenLeftSidebarGesture:o,mobilePanelState:s,translateX:c,windowWidth:l,horizontalScroll:u,isWeb:d,MOBILE_WEB_EDGE_SWIPE_WIDTH:h},S.__workletHash=8337771416778,S.__initData=e,S})({_worklet_8337771416778_init_data:vt,touchStartX:x,touchStartY:k,canOpenLeftSidebarGesture:Te.canOpenLeftSidebarGesture,mobilePanelState:p,translateX:s,windowWidth:l,horizontalScroll:o,isWeb:L.isWeb,MOBILE_WEB_EDGE_SWIPE_WIDTH:tt})).onStart((function({_worklet_11112183592680_init_data:e,isGesturing:t,runOnJS:n,setOverlayPeek:o}){const s=function(){t.value=!0,n(o)(!0)};return s.__closure={isGesturing:t,runOnJS:n,setOverlayPeek:o},s.__workletHash=0xa1b41c176e8,s.__initData=e,s})({_worklet_11112183592680_init_data:gt,isGesturing:f,runOnJS:v.runOnJS,setOverlayPeek:h})).onUpdate((function({_worklet_4399350013762_init_data:e,windowWidth:t,translateX:n,backdropOpacity:o,interpolate:s,Extrapolation:c}){const l=function(e){const l=Math.min(0,-t+e.translationX);n.value=l,o.value=s(l,[-t,0],[0,1],c.CLAMP)};return l.__closure={windowWidth:t,translateX:n,backdropOpacity:o,interpolate:s,Extrapolation:c},l.__workletHash=4399350013762,l.__initData=e,l})({_worklet_4399350013762_init_data:pt,windowWidth:l,translateX:s,backdropOpacity:c,interpolate:v.interpolate,Extrapolation:v.Extrapolation})).onEnd((function({_worklet_3566839805561_init_data:e,isGesturing:t,windowWidth:n,animateToOpen:o,runOnJS:s,handleGestureOpen:c,animateToClose:l}){const u=function(e){t.value=!1;e.translationX>n/3||e.velocityX>500?(o(),s(c)()):l()};return u.__closure={isGesturing:t,windowWidth:n,animateToOpen:o,runOnJS:s,handleGestureOpen:c,animateToClose:l},u.__workletHash=3566839805561,u.__initData=e,u})({_worklet_3566839805561_init_data:_t,isGesturing:f,windowWidth:l,animateToOpen:u,runOnJS:v.runOnJS,handleGestureOpen:w,animateToClose:d})).onFinalize((function({_worklet_11316004136205_init_data:e,isGesturing:t,runOnJS:n,setOverlayPeek:o}){const s=function(){t.value=!1,n(o)(!1)};return s.__closure={isGesturing:t,runOnJS:n,setOverlayPeek:o},s.__workletHash=0xa4ab668250d,s.__initData=e,s})({_worklet_11316004136205_init_data:ft,isGesturing:f,runOnJS:v.runOnJS,setOverlayPeek:h})),[j,l,s,c,p,u,d,h,w,f,y,o?.isAnyScrolledRight,x,k]);return(0,Ae.jsx)(_.GestureDetector,{gesture:O,touchAction:nt,children:e})}function xt(e){const t=(0,o.c)(25),{children:n}=e,{settings:s,isLoading:c}=(0,fe.useAppSettings)(),{upsertConnectionFromOfferUrl:l}=(0,ke.useHostMutations)(),{theme:u}=(0,y.useUnistyles)();let d,h,f,_,p,v;t[0]!==s.theme||t[1]!==c?(d=()=>{c||("auto"===s.theme?y.UnistylesRuntime.setAdaptiveThemes(!0):(y.UnistylesRuntime.setAdaptiveThemes(!1),y.UnistylesRuntime.setTheme(Pe.THEME_TO_UNISTYLES[s.theme])))},h=[c,s.theme],t[0]=s.theme,t[1]=c,t[2]=d,t[3]=h):(d=t[2],h=t[3]),(0,S.useEffect)(d,h),t[4]!==u.colors.accent?(f=()=>{(0,Oe.applyFocusRingColor)(u.colors.accent)},_=[u.colors.accent],t[4]=u.colors.accent,t[5]=f,t[6]=_):(f=t[5],_=t[6]),(0,S.useEffect)(f,_),t[7]!==s.codeFontSize||t[8]!==s.monoFontFamily||t[9]!==s.syntaxTheme||t[10]!==s.uiFontFamily||t[11]!==s.uiFontSize||t[12]!==c?(p=()=>{c||(0,we.applyAppearance)({uiFontFamily:s.uiFontFamily,monoFontFamily:s.monoFontFamily,uiFontSize:s.uiFontSize,codeFontSize:s.codeFontSize,syntaxTheme:s.syntaxTheme})},v=[c,s.uiFontFamily,s.monoFontFamily,s.uiFontSize,s.codeFontSize,s.syntaxTheme],t[7]=s.codeFontSize,t[8]=s.monoFontFamily,t[9]=s.syntaxTheme,t[10]=s.uiFontFamily,t[11]=s.uiFontSize,t[12]=c,t[13]=p,t[14]=v):(p=t[13],v=t[14]),(0,S.useEffect)(p,v);const b=!c;let x,k,j,w,O;return t[15]!==b?(x=(0,Ae.jsx)(kt,{enabled:b}),t[15]=b,t[16]=x):x=t[16],t[17]!==l?(k=(0,Ae.jsx)(wt,{upsertDaemonFromOfferUrl:l}),t[17]=l,t[18]=k):k=t[18],t[19]===Symbol.for("react.memo_cache_sentinel")?(j=(0,Ae.jsx)(Me,{}),w=(0,Ae.jsx)(Tt,{}),t[19]=j,t[20]=w):(j=t[19],w=t[20]),t[21]!==n||t[22]!==x||t[23]!==k?(O=(0,Ae.jsxs)(U.VoiceProvider,{children:[x,k,j,w,n]}),t[21]=n,t[22]=x,t[23]=k,t[24]=O):O=t[24],O}function kt(e){const t=(0,o.c)(5),{enabled:n}=e,{theme:s}=(0,y.useUnistyles)(),c=s.colors.surface0,l=s.colors.foreground;let u,d;return t[0]!==n||t[1]!==l||t[2]!==c?(u=()=>{n&&!L.isNative&&(0,ne.updateDesktopWindowControls)({backgroundColor:c,foregroundColor:l}).catch(jt)},d=[n,c,l],t[0]=n,t[1]=l,t[2]=c,t[3]=u,t[4]=d):(u=t[3],d=t[4]),(0,S.useEffect)(u,d),null}function jt(e){console.warn("[DesktopWindow] Failed to update window controls overlay",e)}function wt(e){const t=(0,o.c)(4),{upsertDaemonFromOfferUrl:n}=e,s=(0,h.useRouter)();let c,l;return t[0]!==s||t[1]!==n?(c=()=>{let e=!1;const t=t=>{t&&t.includes("#offer=")&&n(t).then(t=>{if(e)return;const n=t?.serverId;"string"==typeof n&&n&&s.replace((0,De.buildOpenProjectRoute)())}).catch(t=>{e||console.warn("[Linking] Failed to import pairing offer",t)})};u.getInitialURL().then(t).catch(Ot);const o=u.addEventListener("url",e=>{t(e.url)});return()=>{e=!0,o.remove()}},l=[s,n],t[0]=s,t[1]=n,t[2]=c,t[3]=l):(c=t[2],l=t[3]),(0,S.useEffect)(c,l),null}function Ot(){}let Et=1;function Pt(){const e=(0,H.useHostChooser)(),t=(0,ke.useHostRegistryLoaded)(),[n,o]=(0,S.useState)(null),[s,c]=(0,S.useState)(null),l=(0,me.useOpenProject)(n?.serverId??null),u=(0,S.useCallback)(n=>{const s=n.trim();s&&(t?e({title:"Choose host",onChooseHost:e=>{o({id:Et++,serverId:e,path:s})}}):c(s))},[e,t]);return(0,S.useEffect)(()=>{if(!t||!s)return;const e=s;c(null),u(e)},[t,u,s]),(0,S.useEffect)(()=>{if(!n)return;let e=!1;return l(n.path).then(t=>e?null:t.ok?(o(e=>e?.id===n.id?null:e),null):(o(e=>e?.id===n.id?null:e),null)),()=>{e=!0}},[l,n]),(0,S.useEffect)(()=>{let e=!1,t=null;return(0,oe.getDesktopHost)()?.getPendingOpenProject?.()?.then(t=>{!e&&t&&u(t)}).catch(()=>{}),(0,te.listenToDesktopEvent)("open-project",t=>{if(e)return;const n="string"==typeof t?.path?t.path.trim():"";u(n)}).then(n=>{e?n():t=n}).catch(()=>{}),()=>{e=!0,t?.()}},[u]),null}function It(e){const t=(0,o.c)(16),{children:n}=e,s=(0,h.usePathname)(),c=(0,h.useGlobalSearchParams)(),l=(0,ke.useHosts)(),u=qe();let d;t[0]!==s?(d=(0,De.parseServerIdFromPathname)(s),t[0]=s,t[1]=d):d=t[1];const S=d;let f;t[2]!==l||t[3]!==S?(f=null!==S&&l.some(e=>e.serverId===S),t[2]=l,t[3]=S,t[4]=f):f=t[4];const _=u&&("/open-project"===s||"/new"===s||"/sessions"===s||"/schedules"===s||"/sources"===s||"/loops"===s||"/inbox"===s||f);let p;if(t[5]!==c.open||t[6]!==s){e:{let e;if(t[8]!==s){const n=s.match(/^\/h\/([^/]+)\/workspace\/[^/]+(?:\/|$)/);e=n?.[1]?.trim()??"",t[8]=s,t[9]=e}else e=t[9];const n=e,o=Array.isArray(c.open)?c.open[0]:c.open,l=(0,De.parseWorkspaceOpenIntent)(o);if(n&&"agent"===l?.kind){const e=l.agentId.trim();p=e?`${n}:${e}`:void 0;break e}let u;t[10]!==s?(u=(0,De.parseHostAgentRouteFromPathname)(s),t[10]=s,t[11]=u):u=t[11];const d=u;p=d?`${d.serverId}:${d.agentId}`:void 0}t[5]=c.open,t[6]=s,t[7]=p}else p=t[7];const v=_?p:void 0;let b;return t[12]!==n||t[13]!==_||t[14]!==v?(b=(0,Ae.jsx)(rt,{selectedAgentId:v,chromeEnabled:_,children:n}),t[12]=n,t[13]=_,t[14]=v,t[15]=b):b=t[15],b}function Tt(){return(0,le.useFaviconStatus)(),null}function Dt(){const e=(0,o.c)(25),t=qe(),{theme:n}=(0,y.useUnistyles)();let s;e[0]!==n.colors.surface0?(s={headerShown:!1,animation:"none",contentStyle:{backgroundColor:n.colors.surface0}},e[0]=n.colors.surface0,e[1]=s):s=e[1];const c=s;let l,u,d,S,f,_,p,v,b,x,k,j,w,O,E,P,I,T,D,F;return e[2]===Symbol.for("react.memo_cache_sentinel")?(l=(0,Ae.jsx)(h.Stack.Screen,{name:"index"}),u=(0,Ae.jsx)(h.Stack.Screen,{name:"agent/[agentId]"}),e[2]=l,e[3]=u):(l=e[2],u=e[3]),e[4]===Symbol.for("react.memo_cache_sentinel")?(b=(0,Ae.jsx)(h.Stack.Screen,{name:"welcome"}),x=(0,Ae.jsx)(h.Stack.Screen,{name:"settings/index"}),k=(0,Ae.jsx)(h.Stack.Screen,{name:"settings/[section]"}),j=(0,Ae.jsx)(h.Stack.Screen,{name:"settings/projects/index"}),w=(0,Ae.jsx)(h.Stack.Screen,{name:"settings/projects/[projectKey]"}),O=(0,Ae.jsx)(h.Stack.Screen,{name:"new"}),E=(0,Ae.jsx)(h.Stack.Screen,{name:"open-project"}),d=(0,Ae.jsx)(h.Stack.Screen,{name:"sessions"}),S=(0,Ae.jsx)(h.Stack.Screen,{name:"schedules"}),f=(0,Ae.jsx)(h.Stack.Screen,{name:"sources"}),_=(0,Ae.jsx)(h.Stack.Screen,{name:"loops"}),p=(0,Ae.jsx)(h.Stack.Screen,{name:"inbox"}),v=(0,Ae.jsx)(h.Stack.Screen,{name:"pair-scan"}),e[4]=d,e[5]=S,e[6]=f,e[7]=_,e[8]=p,e[9]=v,e[10]=b,e[11]=x,e[12]=k,e[13]=j,e[14]=w,e[15]=O,e[16]=E):(d=e[4],S=e[5],f=e[6],_=e[7],p=e[8],v=e[9],b=e[10],x=e[11],k=e[12],j=e[13],w=e[14],O=e[15],E=e[16]),e[17]!==t?(P=(0,Ae.jsxs)(h.Stack.Protected,{guard:t,children:[b,x,k,j,w,O,E,d,S,f,_,p,v]}),e[17]=t,e[18]=P):P=e[18],e[19]===Symbol.for("react.memo_cache_sentinel")?(I=(0,Ae.jsx)(h.Stack.Screen,{name:"h/[serverId]"}),T=(0,Ae.jsx)(h.Stack.Screen,{name:"settings/hosts/[serverId]/index"}),D=(0,Ae.jsx)(h.Stack.Screen,{name:"settings/hosts/[serverId]/[hostSection]"}),e[19]=I,e[20]=T,e[21]=D):(I=e[19],T=e[20],D=e[21]),e[22]!==c||e[23]!==P?(F=(0,Ae.jsxs)(h.Stack,{screenOptions:c,children:[l,u,P,I,T,D]}),e[22]=c,e[23]=P,e[24]=F):F=e[24],F}function Ft(){const e=(0,o.c)(3),t=(0,h.useNavigationContainerRef)();let n,s;return e[0]!==t?(n=()=>(0,V.registerWorkspaceRouteNavigationRef)(t),s=[t],e[0]=t,e[1]=n,e[2]=s):(n=e[1],s=e[2]),(0,S.useEffect)(n,s),null}function Wt(){const e=(0,o.c)(2);let t,n;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=(0,Ae.jsx)(Pt,{}),e[0]=t):t=e[0],e[1]===Symbol.for("react.memo_cache_sentinel")?(n=(0,Ae.jsx)(z.SidebarAnimationProvider,{children:(0,Ae.jsxs)(X.HorizontalScrollProvider,{children:[t,(0,Ae.jsx)(w.DaemonRpcBoundary,{children:(0,Ae.jsxs)(It,{children:[(0,Ae.jsx)(Ft,{}),(0,Ae.jsx)(Dt,{})]})})]})}),e[1]=n):n=e[1],n}function Ct(e){const t=(0,o.c)(3),{children:n}=e;let s,c;return t[0]===Symbol.for("react.memo_cache_sentinel")?(s=(0,Ae.jsx)(Ge,{}),t[0]=s):s=t[0],t[1]!==n?(c=(0,Ae.jsxs)(Ve,{children:[s,(0,Ae.jsx)(N.SidebarCalloutProvider,{children:(0,Ae.jsx)(Y.ToastProvider,{children:(0,Ae.jsx)(xt,{children:n})})})]}),t[1]=n,t[2]=c):c=t[2],c}function Rt(e){const t=(0,o.c)(2),{children:n}=e;let l;return t[0]!==n?(l=(0,Ae.jsx)(Qe,{children:(0,Ae.jsx)(ge.I18nProvider,{children:(0,Ae.jsx)(b.SafeAreaProvider,{children:(0,Ae.jsx)(p.KeyboardProvider,{children:(0,Ae.jsx)(de.KeyboardShiftProvider,{children:(0,Ae.jsx)(c.PortalProvider,{children:(0,Ae.jsx)(s.BottomSheetModalProvider,{children:n})})})})})})}),t[0]=n,t[1]=l):l=t[1],l}function At(){const e=(0,o.c)(2);let t,s;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=(0,Ae.jsx)(v.ReducedMotionConfig,{mode:v.ReduceMotion.System}),e[0]=t):t=e[0],e[1]===Symbol.for("react.memo_cache_sentinel")?(s=(0,Ae.jsxs)(_.GestureHandlerRootView,{style:et,children:[t,(0,Ae.jsx)(n.View,{style:Ht.surfaceFill,children:(0,Ae.jsx)(Rt,{children:(0,Ae.jsx)(ye.TenantAuthProvider,{children:(0,Ae.jsx)(ye.TenantAuthGate,{children:(0,Ae.jsx)(Ct,{children:(0,Ae.jsx)(Wt,{})})})})})})]}),e[1]=s):s=e[1],s}const Ht=y.StyleSheet.create(e=>({surfaceFill:{flex:1,backgroundColor:e.colors.surface0,uni__dependencies:[0]}}))},2478,[348,350,55,2479,2991,3030,746,3079,379,36,25,686,146,2482,3214,2570,558,56,3265,3266,3533,3534,3535,3559,3578,3581,3582,3717,3918,3926,3937,4156,4083,3468,3472,3420,4157,4158,3872,3596,3536,3514,4057,4193,3507,4194,4195,4202,4205,4206,3416,3580,3627,3417,3591,4208,4210,4214,4215,4216,4224,3910,4227,4228,3920,3590,3538,4229,3272,1,4231,3445,3274,4246,4247,4249,3597,305,4250,3600,3492,4188,3499,4175,4251,279]);
14095
+ __d(function(g,r,i,a,m,_e,_d){"use strict";function e(e){if(e&&e.__esModule)return e;var t={};return e&&Object.keys(e).forEach(function(n){var o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,o.get?o:{enumerable:!0,get:function(){return e[n]}})}),t.default=e,t}function t(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return Ht}}),_e.useEarliestOnlineHostServerId=ze,_e.useStoreReady=qe,_e.useHostRuntimeBootstrapState=function(){return(0,S.useContext)(He)};var n=r(_d[0]),o=r(_d[1]);r(_d[2]);var s=r(_d[3]),c=r(_d[4]),l=r(_d[5]),u=e(r(_d[6])),d=e(r(_d[7])),h=r(_d[8]),S=r(_d[9]),f=(t(r(_d[10])),t(r(_d[11])));r(_d[12]);var _=r(_d[13]),p=r(_d[14]),v=r(_d[15]),b=r(_d[16]),y=r(_d[17]),x=r(_d[18]),k=r(_d[19]),j=r(_d[20]),w=r(_d[21]),O=r(_d[22]),E=r(_d[23]),P=r(_d[24]),I=r(_d[25]),T=r(_d[26]),D=r(_d[27]),F=r(_d[28]),W=r(_d[29]),C=r(_d[30]),R=r(_d[31]),A=r(_d[32]),H=r(_d[33]),G=r(_d[34]),L=r(_d[35]),X=r(_d[36]),M=r(_d[37]),B=r(_d[38]),z=r(_d[39]),N=r(_d[40]),Y=r(_d[41]),U=r(_d[42]),J=r(_d[43]),V=r(_d[44]),K=r(_d[45]),$=r(_d[46]),q=r(_d[47]),Q=r(_d[48]),Z=r(_d[49]),ee=r(_d[50]),te=r(_d[51]),ne=r(_d[52]),oe=r(_d[53]),re=r(_d[54]),se=r(_d[55]),ae=r(_d[56]),ie=r(_d[57]),ce=r(_d[58]),le=r(_d[59]),ue=r(_d[60]),de=r(_d[61]),he=r(_d[62]),Se=r(_d[63]),me=r(_d[64]),fe=r(_d[65]),pe=r(_d[66]),ge=r(_d[67]),ve=r(_d[68]),be=r(_d[69]),ye=r(_d[70]),xe=r(_d[71]),ke=r(_d[72]),je=r(_d[73]),we=r(_d[74]),Oe=r(_d[75]),Ee=r(_d[76]),Pe=r(_d[77]),Ie=r(_d[78]),Te=r(_d[79]),De=r(_d[80]),Fe=r(_d[81]),We=r(_d[82]),Ce=r(_d[83]),Re=r(_d[84]),Ae=r(_d[85]);(0,be.polyfillCrypto)(),(0,Re.initializeDatadog)();const He=(0,S.createContext)({splashError:null,retry:()=>{},hasGivenUpWaitingForHost:!1,storeReady:!1,startupBlocker:{kind:"none"}});function Ge(){const e=(0,o.c)(5),t=(0,h.useRouter)(),n=(0,S.useRef)(null);let s;(0,Z.useDatadogViewTracking)(),e[0]!==t?(s=e=>{const n=(0,Fe.resolveNotificationTarget)(e),o=n.serverId,s=n.agentId;o&&s?(0,We.navigateToAgent)({serverId:o,agentId:s,pin:!0}):t.navigate((0,Fe.buildNotificationRoute)(e))},e[0]=t,e[1]=s):s=e[1];const c=(0,pe.useStableEvent)(s);let l,u;return e[2]!==c?(l=()=>{if(L.isWeb){let e=null,t=!1;if((0,G.getIsElectronRuntime)()){(0,Ce.ensureOsNotificationPermission)();const n=(0,oe.getDesktopHost)()?.events?.on?.("notification-click",e=>{const t="object"==typeof e&&null!==e&&"data"in e&&"object"==typeof e.data&&null!==e.data?e.data:void 0;c(t)});Promise.resolve(n).then(n=>{"function"==typeof n&&(t?n():e=n)})}const n=e=>{const t=e;e.preventDefault(),c(t.detail?.data)};return window.addEventListener(Ce.WEB_NOTIFICATION_CLICK_EVENT,n),()=>{t=!0,e?.(),window.removeEventListener(Ce.WEB_NOTIFICATION_CLICK_EVENT,n)}}d.setNotificationHandler({handleNotification:Le}),(0,Q.registerNotificationCategories)(),(0,$.registerBackgroundAgentStateFetch)(),(0,q.registerLiveActivities)();const e=e=>{const t=e.notification.request.identifier;n.current!==t&&(n.current=t,(0,K.handlePermissionNotificationResponse)(e).then(t=>{if(t.handled)return;const n=e.notification.request.content.data;c(n)}))},t=d.addNotificationResponseReceivedListener(e);return d.getLastNotificationResponseAsync().then(t=>{t&&e(t)}),()=>{t.remove()}},u=[c],e[2]=c,e[3]=l,e[4]=u):(l=e[3],u=e[4]),(0,S.useEffect)(l,u),null}async function Le(){return{shouldShowAlert:!1,shouldShowBanner:!1,shouldShowList:!1,shouldPlaySound:!1,shouldSetBadge:!1}}function Xe(e){const t=(0,o.c)(3),{daemon:n}=e,s=(0,ke.useHostRuntimeClient)(n.serverId);if(!s)return null;let c;return t[0]!==s||t[1]!==n.serverId?(c=(0,Ae.jsx)(M.SessionProvider,{serverId:n.serverId,client:s,children:null},n.serverId),t[0]=s,t[1]=n.serverId,t[2]=c):c=t[2],c}function Me(){const e=(0,o.c)(4),t=(0,ke.useHosts)();if(0===t.length)return null;let n,s;return e[0]!==t?(n=t.map(Be),e[0]=t,e[1]=n):n=e[1],e[2]!==n?(s=(0,Ae.jsx)(Ae.Fragment,{children:n}),e[2]=n,e[3]=s):s=e[3],s}function Be(e){return(0,Ae.jsx)(Xe,{daemon:e},e.serverId)}function ze(){const e=(0,o.c)(4);let t;e[0]===Symbol.for("react.memo_cache_sentinel")?(t=(0,ke.getHostRuntimeStore)(),e[0]=t):t=e[0];const n=t;let s;e[1]===Symbol.for("react.memo_cache_sentinel")?(s=e=>{const t=n.subscribeAll(e),o=n.subscribeHostList(e);return()=>{t(),o()}},e[1]=s):s=e[1];const c=s;let l,u;return e[2]===Symbol.for("react.memo_cache_sentinel")?(l=()=>n.getEarliestOnlineHostServerId(),u=()=>n.getEarliestOnlineHostServerId(),e[2]=l,e[3]=u):(l=e[2],u=e[3]),(0,S.useSyncExternalStore)(c,l,u)}function Ne(){const e=(0,o.c)(4);let t;e[0]===Symbol.for("react.memo_cache_sentinel")?(t=(0,je.getDaemonStartService)({store:(0,ke.getHostRuntimeStore)()}),e[0]=t):t=e[0];const n=t;let s,c,l;return e[1]===Symbol.for("react.memo_cache_sentinel")?(s=e=>n.subscribe(e),c=()=>n.getLastError(),l=()=>n.getLastError(),e[1]=s,e[2]=c,e[3]=l):(s=e[1],c=e[2],l=e[3]),(0,S.useSyncExternalStore)(s,c,l)}function Ye(){const e=(0,o.c)(4);let t;e[0]===Symbol.for("react.memo_cache_sentinel")?(t=(0,je.getDaemonStartService)({store:(0,ke.getHostRuntimeStore)()}),e[0]=t):t=e[0];const n=t;let s,c,l;return e[1]===Symbol.for("react.memo_cache_sentinel")?(s=e=>n.subscribe(e),c=()=>n.isRunning(),l=()=>n.isRunning(),e[1]=s,e[2]=c,e[3]=l):(s=e[1],c=e[2],l=e[3]),(0,S.useSyncExternalStore)(s,c,l)}const Ue=5e3;async function Je(){if(!(0,ee.shouldUseDesktopDaemon)())return!1;if((0,ke.hasConfiguredLocalDaemonOverride)())return!1;return(await(0,re.loadDesktopSettings)()).daemon.manageBuiltInDaemon}function Ve(e){const t=(0,o.c)(23),{children:n}=e;let s;t[0]===Symbol.for("react.memo_cache_sentinel")?(s=[],t[0]=s):s=t[0],(0,S.useEffect)($e,s);const c=ze(),l=Ne(),u=Ye(),[d,h]=(0,S.useState)(!1);let f;t[1]===Symbol.for("react.memo_cache_sentinel")?(f=(0,ee.shouldUseDesktopDaemon)(),t[1]=f):f=t[1];const _=f;let p;t[2]!==c||t[3]!==l||t[4]!==u?(p=(0,J.resolveStartupBlocker)({isDesktopRuntime:_,anyOnlineHostServerId:c,daemonStartIsRunning:u,daemonStartError:l}),t[2]=c,t[3]=l,t[4]=u,t[5]=p):p=t[5];const v=p;let b;t[6]!==c||t[7]!==d||t[8]!==v?(b=(0,J.shouldRunStartupGiveUpTimer)({startupBlocker:v,anyOnlineHostServerId:c,hasGivenUpWaitingForHost:d}),t[6]=c,t[7]=d,t[8]=v,t[9]=b):b=t[9];const y=b;let x,k;t[10]!==y?(x=()=>{if(!y)return;const e=setTimeout(()=>{h(!0)},Ue);return()=>{clearTimeout(e)}},k=[y],t[10]=y,t[11]=x,t[12]=k):(x=t[11],k=t[12]),(0,S.useEffect)(x,k);const j=Ke,w="managed-daemon-error"===v.kind?v.message:null;let O;t[13]!==v?(O=(0,J.resolveStartupNavigationReady)({startupBlocker:v}),t[13]=v,t[14]=O):O=t[14];const E=O;let P;t[15]!==d||t[16]!==w||t[17]!==v||t[18]!==E?(P={splashError:w,retry:j,hasGivenUpWaitingForHost:d,storeReady:E,startupBlocker:v},t[15]=d,t[16]=w,t[17]=v,t[18]=E,t[19]=P):P=t[19];const I=P;let T;return t[20]!==n||t[21]!==I?(T=(0,Ae.jsx)(He.Provider,{value:I,children:n}),t[20]=n,t[21]=I,t[22]=T):T=t[22],T}function Ke(){const e=(0,je.getDaemonStartService)({store:(0,ke.getHostRuntimeStore)()});(0,J.startDaemonIfGateAllows)({daemonStartService:e,shouldStartDaemon:Je,onGateError:t=>e.recordError(t)})}function $e(){const e=(0,ke.getHostRuntimeStore)(),t=(0,je.getDaemonStartService)({store:e});(0,J.startHostRuntimeBootstrap)({store:e,daemonStartService:t,shouldStartDaemon:Je,onGateError:e=>t.recordError(e)})}function qe(){return(0,S.useContext)(He).storeReady}function Qe(e){const t=(0,o.c)(2),{children:n}=e;let s;return t[0]!==n?(s=(0,Ae.jsx)(l.QueryClientProvider,{client:xe.queryClient,children:n}),t[0]=n,t[1]=s):s=t[1],s}const Ze={flex:1,flexDirection:"row"},et={flex:1},tt=32,nt=L.isWeb?"auto":"pan-y",ot=["dark","zinc","midnight","claude","ghostty","light"];function rt(e){const t=(0,o.c)(58),{children:s,selectedAgentId:c,chromeEnabled:l}=e,u=(0,ke.useHosts)(),{settings:d,updateSettings:S}=(0,fe.useAppSettings)(),_=(0,Ee.usePanelStore)(mt),p=(0,Ee.usePanelStore)(St),v=(0,Ee.usePanelStore)(ht),b=(0,Ee.usePanelStore)(dt),y=(0,Ee.usePanelStore)(ut),w=(0,Ee.usePanelStore)(lt),L=(0,Ee.usePanelStore)(ct);(0,Se.useForegroundReconnect)();const X=at;let M;t[0]!==d.theme||t[1]!==S?(M=()=>{const e=(ot.indexOf(d.theme)+1)%ot.length;S({theme:ot[e]})},t[0]=d.theme,t[1]=S,t[2]=M):M=t[2];const z=M,N=(0,G.useIsCompactFormFactor)(),Y=(0,f.default)(),U=!1;let J;t[3]!==Y.height||t[4]!==Y.width?(J=(0,x.resolveColumnMode)({width:Y.width,height:Y.height,isTablet:U}),t[3]=Y.height,t[4]=Y.width,t[5]=J):J=t[5];const V=N||U;(0,he.useCompactWebViewportZoomLock)(V);const K=(0,h.usePathname)(),$=l??u.length>0,q=V?_:p;let Q;t[6]!==b||t[7]!==y||t[8]!==v?(Q=()=>{const{desktop:e}=Ee.usePanelStore.getState();(0,Ie.toggleDesktopSidebarsWithCheckoutIntent)({isAgentListOpen:e.agentListOpen,isFileExplorerOpen:e.fileExplorerOpen,openAgentList:v,closeAgentList:b,closeFileExplorer:y,toggleFocusedFileExplorer:st})},t[6]=b,t[7]=y,t[8]=v,t[9]=Q):Q=t[9];const Z=Q;let ee;t[10]!==$||t[11]!==K?(ee=$||K.startsWith("/settings"),t[10]=$,t[11]=K,t[12]=ee):ee=t[12];const te=ee;let ne,oe,re,le;t[13]!==z||t[14]!==V||t[15]!==te||t[16]!==q||t[17]!==Z||t[18]!==w?(ne={enabled:te,isMobile:V,toggleAgentList:q,toggleBothSidebars:Z,toggleFocusMode:w,cycleTheme:z},t[13]=z,t[14]=V,t[15]=te,t[16]=q,t[17]=Z,t[18]=w,t[19]=ne):ne=t[19],(0,ue.useKeyboardShortcuts)(ne),(0,ie.useActiveWorktreeNewAction)(),(0,ce.useGlobalNewWorkspaceAction)(),t[20]!==$||t[21]!==V||t[22]!==L||t[23]!==c?(oe=!V&&$&&!L&&(0,Ae.jsx)(T.LeftSidebar,{selectedAgentId:c}),t[20]=$,t[21]=V,t[22]=L,t[23]=c,t[24]=oe):oe=t[24],t[25]!==s||t[26]!==$||t[27]!==V?(re=V&&$?(0,Ae.jsx)(B.ExplorerSidebarAnimationProvider,{children:(0,Ae.jsx)(D.CompactExplorerSidebarHost,{enabled:$,children:(0,Ae.jsx)(n.View,{style:et,children:s})})}):(0,Ae.jsx)(n.View,{style:et,children:s}),t[25]=s,t[26]=$,t[27]=V,t[28]=re):re=t[28],t[29]!==oe||t[30]!==re?(le=(0,Ae.jsxs)(n.View,{style:Ze,children:[oe,re]}),t[29]=oe,t[30]=re,t[31]=le):le=t[31];const de=le;let me,pe,ge,ve,be,ye,xe,je,we,Oe,Pe,Te,De,Fe,We,Ce;t[32]===Symbol.for("react.memo_cache_sentinel")?(me=(0,Ae.jsx)(j.DaemonConnectionBanner,{onRetry:X}),t[32]=me):me=t[32],t[33]===Symbol.for("react.memo_cache_sentinel")?(pe=(0,Ae.jsx)(A.FloatingPanelPortalHost,{}),t[33]=pe):pe=t[33],t[34]!==$||t[35]!==V||t[36]!==c?(ge=V&&$&&(0,Ae.jsx)(T.LeftSidebar,{selectedAgentId:c}),t[34]=$,t[35]=V,t[36]=c,t[37]=ge):ge=t[37],t[38]===Symbol.for("react.memo_cache_sentinel")?(ve=(0,Ae.jsx)(E.DownloadToast,{}),be=(0,Ae.jsx)(se.RosettaCalloutSource,{}),ye=(0,Ae.jsx)(ae.UpdateCalloutSource,{}),xe=(0,Ae.jsx)(O.WorktreeSetupCalloutSource,{}),je=(0,Ae.jsx)(k.CommandCenter,{}),we=(0,Ae.jsx)(H.HostChooserModal,{}),Oe=(0,Ae.jsx)(F.ProjectPickerModal,{}),Pe=(0,Ae.jsx)(W.ProviderSettingsHost,{}),t[38]=ve,t[39]=be,t[40]=ye,t[41]=xe,t[42]=je,t[43]=we,t[44]=Oe,t[45]=Pe):(ve=t[38],be=t[39],ye=t[40],xe=t[41],je=t[42],we=t[43],Oe=t[44],Pe=t[45]),t[46]!==te?(Te=(0,Ae.jsx)(R.WorkspaceShortcutTargetsSubscriber,{enabled:te}),t[46]=te,t[47]=Te):Te=t[47],t[48]===Symbol.for("react.memo_cache_sentinel")?(De=(0,Ae.jsx)(C.WorkspaceSetupDialog,{}),Fe=(0,Ae.jsx)(I.KeyboardShortcutsDialog,{}),We=(0,Ae.jsx)(P.QuittingOverlay,{}),t[48]=De,t[49]=Fe,t[50]=We):(De=t[48],Fe=t[49],We=t[50]),t[51]!==ge||t[52]!==Te||t[53]!==de?(Ce=(0,Ae.jsxs)(n.View,{style:Gt.surfaceFill,children:[me,de,pe,ge,ve,be,ye,xe,je,we,Oe,Pe,Te,De,Fe,We]}),t[51]=ge,t[52]=Te,t[53]=de,t[54]=Ce):Ce=t[54];const Re=Ce;if(!V)return Re;let He;return t[55]!==$||t[56]!==Re?(He=(0,Ae.jsx)(yt,{chromeEnabled:$,children:Re}),t[55]=$,t[56]=Re,t[57]=He):He=t[57],He}function st(){return ve.keyboardActionDispatcher.dispatch({id:"sidebar.toggle.right",scope:"sidebar"})}function at(e){const t=(0,ke.getHostRuntimeStore)();t.ensureConnectedAll(),t.runProbeCycleNow(e).catch(it)}function it(){}function ct(e){return e.desktop.focusModeEnabled}function lt(e){return e.toggleFocusMode}function ut(e){return e.closeDesktopFileExplorer}function dt(e){return e.closeDesktopAgentList}function ht(e){return e.openDesktopAgentList}function St(e){return e.toggleDesktopAgentList}function mt(e){return e.toggleMobileAgentList}const ft={code:"function _layoutTsx1(){const{isGesturing,runOnJS,setOverlayPeek}=this.__closure;isGesturing.value=false;runOnJS(setOverlayPeek)(false);}"},_t={code:"function _layoutTsx2(event_2){const{isGesturing,windowWidth,animateToOpen,runOnJS,handleGestureOpen,animateToClose}=this.__closure;isGesturing.value=false;const shouldOpen=event_2.translationX>windowWidth/3||event_2.velocityX>500;if(shouldOpen){animateToOpen();runOnJS(handleGestureOpen)();}else{animateToClose();}}"},pt={code:"function _layoutTsx3(event_1){const{windowWidth,translateX,backdropOpacity,interpolate,Extrapolation}=this.__closure;const newTranslateX=Math.min(0,-windowWidth+event_1.translationX);translateX.value=newTranslateX;backdropOpacity.value=interpolate(newTranslateX,[-windowWidth,0],[0,1],Extrapolation.CLAMP);}"},gt={code:"function _layoutTsx4(){const{isGesturing,runOnJS,setOverlayPeek}=this.__closure;isGesturing.value=true;runOnJS(setOverlayPeek)(true);}"},vt={code:"function _layoutTsx5(event_0,stateManager){const{touchStartX,touchStartY,canOpenLeftSidebarGesture,mobilePanelState,translateX,windowWidth,horizontalScroll,isWeb,MOBILE_WEB_EDGE_SWIPE_WIDTH}=this.__closure;var _horizontalScroll;const touch_0=event_0.changedTouches[0];if(!touch_0||event_0.numberOfTouches!==1)return;const deltaX=touch_0.absoluteX-touchStartX.value;const deltaY=touch_0.absoluteY-touchStartY.value;const absDeltaX=Math.abs(deltaX);const absDeltaY=Math.abs(deltaY);if(!canOpenLeftSidebarGesture(mobilePanelState.value,translateX.value,windowWidth)){stateManager.fail();return;}if((_horizontalScroll=horizontalScroll)!==null&&_horizontalScroll!==void 0&&_horizontalScroll.isAnyScrolledRight.value){stateManager.fail();return;}if(isWeb&&touchStartX.value>MOBILE_WEB_EDGE_SWIPE_WIDTH){stateManager.fail();return;}if(deltaX<=-10){stateManager.fail();return;}if(absDeltaY>10&&absDeltaY>absDeltaX){stateManager.fail();return;}if(deltaX>15&&absDeltaX>absDeltaY){stateManager.activate();}}"},bt={code:"function _layoutTsx6(event){const{touchStartX,touchStartY}=this.__closure;const touch=event.changedTouches[0];if(touch){touchStartX.value=touch.absoluteX;touchStartY.value=touch.absoluteY;}}"};function yt({children:e,chromeEnabled:t}){const n=(0,Ee.usePanelStore)(e=>e.showMobileAgentList),o=(0,X.useHorizontalScrollOptional)(),{translateX:s,backdropOpacity:c,windowWidth:l,animateToOpen:u,animateToClose:d,setOverlayPeek:h,isGesturing:f,mobilePanelState:p,gestureAnimatingRef:b,openGestureRef:y}=(0,z.useSidebarAnimation)(),x=(0,v.useSharedValue)(0),k=(0,v.useSharedValue)(0),j=t,w=(0,S.useCallback)(()=>{b.current=!0,n()},[n,b]),O=(0,S.useMemo)(()=>_.Gesture.Pan().withRef(y).enabled(j).manualActivation(!0).failOffsetY([-10,10]).onTouchesDown((function({_worklet_1615879058013_init_data:e,touchStartX:t,touchStartY:n}){const o=function(e){const o=e.changedTouches[0];o&&(t.value=o.absoluteX,n.value=o.absoluteY)};return o.__closure={touchStartX:t,touchStartY:n},o.__workletHash=1615879058013,o.__initData=e,o})({_worklet_1615879058013_init_data:bt,touchStartX:x,touchStartY:k})).onTouchesMove((function({_worklet_8337771416778_init_data:e,touchStartX:t,touchStartY:n,canOpenLeftSidebarGesture:o,mobilePanelState:s,translateX:c,windowWidth:l,horizontalScroll:u,isWeb:d,MOBILE_WEB_EDGE_SWIPE_WIDTH:h}){const S=function(e,S){const f=e.changedTouches[0];if(!f||1!==e.numberOfTouches)return;const _=f.absoluteX-t.value,p=f.absoluteY-n.value,v=Math.abs(_),b=Math.abs(p);o(s.value,c.value,l)?u?.isAnyScrolledRight.value||d&&t.value>h||_<=-10||b>10&&b>v?S.fail():_>15&&v>b&&S.activate():S.fail()};return S.__closure={touchStartX:t,touchStartY:n,canOpenLeftSidebarGesture:o,mobilePanelState:s,translateX:c,windowWidth:l,horizontalScroll:u,isWeb:d,MOBILE_WEB_EDGE_SWIPE_WIDTH:h},S.__workletHash=8337771416778,S.__initData=e,S})({_worklet_8337771416778_init_data:vt,touchStartX:x,touchStartY:k,canOpenLeftSidebarGesture:Te.canOpenLeftSidebarGesture,mobilePanelState:p,translateX:s,windowWidth:l,horizontalScroll:o,isWeb:L.isWeb,MOBILE_WEB_EDGE_SWIPE_WIDTH:tt})).onStart((function({_worklet_11112183592680_init_data:e,isGesturing:t,runOnJS:n,setOverlayPeek:o}){const s=function(){t.value=!0,n(o)(!0)};return s.__closure={isGesturing:t,runOnJS:n,setOverlayPeek:o},s.__workletHash=0xa1b41c176e8,s.__initData=e,s})({_worklet_11112183592680_init_data:gt,isGesturing:f,runOnJS:v.runOnJS,setOverlayPeek:h})).onUpdate((function({_worklet_4399350013762_init_data:e,windowWidth:t,translateX:n,backdropOpacity:o,interpolate:s,Extrapolation:c}){const l=function(e){const l=Math.min(0,-t+e.translationX);n.value=l,o.value=s(l,[-t,0],[0,1],c.CLAMP)};return l.__closure={windowWidth:t,translateX:n,backdropOpacity:o,interpolate:s,Extrapolation:c},l.__workletHash=4399350013762,l.__initData=e,l})({_worklet_4399350013762_init_data:pt,windowWidth:l,translateX:s,backdropOpacity:c,interpolate:v.interpolate,Extrapolation:v.Extrapolation})).onEnd((function({_worklet_3566839805561_init_data:e,isGesturing:t,windowWidth:n,animateToOpen:o,runOnJS:s,handleGestureOpen:c,animateToClose:l}){const u=function(e){t.value=!1;e.translationX>n/3||e.velocityX>500?(o(),s(c)()):l()};return u.__closure={isGesturing:t,windowWidth:n,animateToOpen:o,runOnJS:s,handleGestureOpen:c,animateToClose:l},u.__workletHash=3566839805561,u.__initData=e,u})({_worklet_3566839805561_init_data:_t,isGesturing:f,windowWidth:l,animateToOpen:u,runOnJS:v.runOnJS,handleGestureOpen:w,animateToClose:d})).onFinalize((function({_worklet_11316004136205_init_data:e,isGesturing:t,runOnJS:n,setOverlayPeek:o}){const s=function(){t.value=!1,n(o)(!1)};return s.__closure={isGesturing:t,runOnJS:n,setOverlayPeek:o},s.__workletHash=0xa4ab668250d,s.__initData=e,s})({_worklet_11316004136205_init_data:ft,isGesturing:f,runOnJS:v.runOnJS,setOverlayPeek:h})),[j,l,s,c,p,u,d,h,w,f,y,o?.isAnyScrolledRight,x,k]);return(0,Ae.jsx)(_.GestureDetector,{gesture:O,touchAction:nt,children:e})}function xt(e){const t=(0,o.c)(25),{children:n}=e,{settings:s,isLoading:c}=(0,fe.useAppSettings)(),{upsertConnectionFromOfferUrl:l}=(0,ke.useHostMutations)(),{theme:u}=(0,y.useUnistyles)();let d,h,f,_,p,v;t[0]!==s.theme||t[1]!==c?(d=()=>{c||("auto"===s.theme?y.UnistylesRuntime.setAdaptiveThemes(!0):(y.UnistylesRuntime.setAdaptiveThemes(!1),y.UnistylesRuntime.setTheme(Pe.THEME_TO_UNISTYLES[s.theme])))},h=[c,s.theme],t[0]=s.theme,t[1]=c,t[2]=d,t[3]=h):(d=t[2],h=t[3]),(0,S.useEffect)(d,h),t[4]!==u.colors.accent?(f=()=>{(0,Oe.applyFocusRingColor)(u.colors.accent)},_=[u.colors.accent],t[4]=u.colors.accent,t[5]=f,t[6]=_):(f=t[5],_=t[6]),(0,S.useEffect)(f,_),t[7]!==s.codeFontSize||t[8]!==s.monoFontFamily||t[9]!==s.syntaxTheme||t[10]!==s.uiFontFamily||t[11]!==s.uiFontSize||t[12]!==c?(p=()=>{c||(0,we.applyAppearance)({uiFontFamily:s.uiFontFamily,monoFontFamily:s.monoFontFamily,uiFontSize:s.uiFontSize,codeFontSize:s.codeFontSize,syntaxTheme:s.syntaxTheme})},v=[c,s.uiFontFamily,s.monoFontFamily,s.uiFontSize,s.codeFontSize,s.syntaxTheme],t[7]=s.codeFontSize,t[8]=s.monoFontFamily,t[9]=s.syntaxTheme,t[10]=s.uiFontFamily,t[11]=s.uiFontSize,t[12]=c,t[13]=p,t[14]=v):(p=t[13],v=t[14]),(0,S.useEffect)(p,v);const b=!c;let x,k,j,w,O;return t[15]!==b?(x=(0,Ae.jsx)(kt,{enabled:b}),t[15]=b,t[16]=x):x=t[16],t[17]!==l?(k=(0,Ae.jsx)(wt,{upsertDaemonFromOfferUrl:l}),t[17]=l,t[18]=k):k=t[18],t[19]===Symbol.for("react.memo_cache_sentinel")?(j=(0,Ae.jsx)(Me,{}),w=(0,Ae.jsx)(Tt,{}),t[19]=j,t[20]=w):(j=t[19],w=t[20]),t[21]!==n||t[22]!==x||t[23]!==k?(O=(0,Ae.jsxs)(U.VoiceProvider,{children:[x,k,j,w,n]}),t[21]=n,t[22]=x,t[23]=k,t[24]=O):O=t[24],O}function kt(e){const t=(0,o.c)(5),{enabled:n}=e,{theme:s}=(0,y.useUnistyles)(),c=s.colors.surface0,l=s.colors.foreground;let u,d;return t[0]!==n||t[1]!==l||t[2]!==c?(u=()=>{n&&!L.isNative&&(0,ne.updateDesktopWindowControls)({backgroundColor:c,foregroundColor:l}).catch(jt)},d=[n,c,l],t[0]=n,t[1]=l,t[2]=c,t[3]=u,t[4]=d):(u=t[3],d=t[4]),(0,S.useEffect)(u,d),null}function jt(e){console.warn("[DesktopWindow] Failed to update window controls overlay",e)}function wt(e){const t=(0,o.c)(4),{upsertDaemonFromOfferUrl:n}=e,s=(0,h.useRouter)();let c,l;return t[0]!==s||t[1]!==n?(c=()=>{let e=!1;const t=t=>{t&&t.includes("#offer=")&&n(t).then(t=>{if(e)return;const n=t?.serverId;"string"==typeof n&&n&&s.replace((0,De.buildOpenProjectRoute)())}).catch(t=>{e||console.warn("[Linking] Failed to import pairing offer",t)})};u.getInitialURL().then(t).catch(Ot);const o=u.addEventListener("url",e=>{t(e.url)});return()=>{e=!0,o.remove()}},l=[s,n],t[0]=s,t[1]=n,t[2]=c,t[3]=l):(c=t[2],l=t[3]),(0,S.useEffect)(c,l),null}function Ot(){}let Et=1;function Pt(){const e=(0,H.useHostChooser)(),t=(0,ke.useHostRegistryLoaded)(),[n,o]=(0,S.useState)(null),[s,c]=(0,S.useState)(null),l=(0,me.useOpenProject)(n?.serverId??null),u=(0,S.useCallback)(n=>{const s=n.trim();s&&(t?e({title:"Choose host",onChooseHost:e=>{o({id:Et++,serverId:e,path:s})}}):c(s))},[e,t]);return(0,S.useEffect)(()=>{if(!t||!s)return;const e=s;c(null),u(e)},[t,u,s]),(0,S.useEffect)(()=>{if(!n)return;let e=!1;return l(n.path).then(t=>e?null:t.ok?(o(e=>e?.id===n.id?null:e),null):(o(e=>e?.id===n.id?null:e),null)),()=>{e=!0}},[l,n]),(0,S.useEffect)(()=>{let e=!1,t=null;return(0,oe.getDesktopHost)()?.getPendingOpenProject?.()?.then(t=>{!e&&t&&u(t)}).catch(()=>{}),(0,te.listenToDesktopEvent)("open-project",t=>{if(e)return;const n="string"==typeof t?.path?t.path.trim():"";u(n)}).then(n=>{e?n():t=n}).catch(()=>{}),()=>{e=!0,t?.()}},[u]),null}function It(e){const t=(0,o.c)(16),{children:n}=e,s=(0,h.usePathname)(),c=(0,h.useGlobalSearchParams)(),l=(0,ke.useHosts)(),u=qe();let d;t[0]!==s?(d=(0,De.parseServerIdFromPathname)(s),t[0]=s,t[1]=d):d=t[1];const S=d;let f;t[2]!==l||t[3]!==S?(f=null!==S&&l.some(e=>e.serverId===S),t[2]=l,t[3]=S,t[4]=f):f=t[4];const _=u&&("/open-project"===s||"/new"===s||"/sessions"===s||"/schedules"===s||"/sources"===s||"/loops"===s||"/inbox"===s||f);let p;if(t[5]!==c.open||t[6]!==s){e:{let e;if(t[8]!==s){const n=s.match(/^\/h\/([^/]+)\/workspace\/[^/]+(?:\/|$)/);e=n?.[1]?.trim()??"",t[8]=s,t[9]=e}else e=t[9];const n=e,o=Array.isArray(c.open)?c.open[0]:c.open,l=(0,De.parseWorkspaceOpenIntent)(o);if(n&&"agent"===l?.kind){const e=l.agentId.trim();p=e?`${n}:${e}`:void 0;break e}let u;t[10]!==s?(u=(0,De.parseHostAgentRouteFromPathname)(s),t[10]=s,t[11]=u):u=t[11];const d=u;p=d?`${d.serverId}:${d.agentId}`:void 0}t[5]=c.open,t[6]=s,t[7]=p}else p=t[7];const v=_?p:void 0;let b;return t[12]!==n||t[13]!==_||t[14]!==v?(b=(0,Ae.jsx)(rt,{selectedAgentId:v,chromeEnabled:_,children:n}),t[12]=n,t[13]=_,t[14]=v,t[15]=b):b=t[15],b}function Tt(){return(0,le.useFaviconStatus)(),null}function Dt(){const e=(0,o.c)(25),t=qe(),{theme:n}=(0,y.useUnistyles)();let s;e[0]!==n.colors.surface0?(s={headerShown:!1,animation:"none",contentStyle:{backgroundColor:n.colors.surface0}},e[0]=n.colors.surface0,e[1]=s):s=e[1];const c=s;let l,u,d,S,f,_,p,v,b,x,k,j,w,O,E,P,I,T,D,F;return e[2]===Symbol.for("react.memo_cache_sentinel")?(l=(0,Ae.jsx)(h.Stack.Screen,{name:"index"}),u=(0,Ae.jsx)(h.Stack.Screen,{name:"agent/[agentId]"}),e[2]=l,e[3]=u):(l=e[2],u=e[3]),e[4]===Symbol.for("react.memo_cache_sentinel")?(b=(0,Ae.jsx)(h.Stack.Screen,{name:"welcome"}),x=(0,Ae.jsx)(h.Stack.Screen,{name:"settings/index"}),k=(0,Ae.jsx)(h.Stack.Screen,{name:"settings/[section]"}),j=(0,Ae.jsx)(h.Stack.Screen,{name:"settings/projects/index"}),w=(0,Ae.jsx)(h.Stack.Screen,{name:"settings/projects/[projectKey]"}),O=(0,Ae.jsx)(h.Stack.Screen,{name:"new"}),E=(0,Ae.jsx)(h.Stack.Screen,{name:"open-project"}),d=(0,Ae.jsx)(h.Stack.Screen,{name:"sessions"}),S=(0,Ae.jsx)(h.Stack.Screen,{name:"schedules"}),f=(0,Ae.jsx)(h.Stack.Screen,{name:"sources"}),_=(0,Ae.jsx)(h.Stack.Screen,{name:"loops"}),p=(0,Ae.jsx)(h.Stack.Screen,{name:"inbox"}),v=(0,Ae.jsx)(h.Stack.Screen,{name:"pair-scan"}),e[4]=d,e[5]=S,e[6]=f,e[7]=_,e[8]=p,e[9]=v,e[10]=b,e[11]=x,e[12]=k,e[13]=j,e[14]=w,e[15]=O,e[16]=E):(d=e[4],S=e[5],f=e[6],_=e[7],p=e[8],v=e[9],b=e[10],x=e[11],k=e[12],j=e[13],w=e[14],O=e[15],E=e[16]),e[17]!==t?(P=(0,Ae.jsxs)(h.Stack.Protected,{guard:t,children:[b,x,k,j,w,O,E,d,S,f,_,p,v]}),e[17]=t,e[18]=P):P=e[18],e[19]===Symbol.for("react.memo_cache_sentinel")?(I=(0,Ae.jsx)(h.Stack.Screen,{name:"h/[serverId]"}),T=(0,Ae.jsx)(h.Stack.Screen,{name:"settings/hosts/[serverId]/index"}),D=(0,Ae.jsx)(h.Stack.Screen,{name:"settings/hosts/[serverId]/[hostSection]"}),e[19]=I,e[20]=T,e[21]=D):(I=e[19],T=e[20],D=e[21]),e[22]!==c||e[23]!==P?(F=(0,Ae.jsxs)(h.Stack,{screenOptions:c,children:[l,u,P,I,T,D]}),e[22]=c,e[23]=P,e[24]=F):F=e[24],F}function Ft(){const e=(0,o.c)(3),t=(0,h.useNavigationContainerRef)();let n,s;return e[0]!==t?(n=()=>(0,V.registerWorkspaceRouteNavigationRef)(t),s=[t],e[0]=t,e[1]=n,e[2]=s):(n=e[1],s=e[2]),(0,S.useEffect)(n,s),null}function Wt(){const e=(0,o.c)(2);let t,n;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=(0,Ae.jsx)(Pt,{}),e[0]=t):t=e[0],e[1]===Symbol.for("react.memo_cache_sentinel")?(n=(0,Ae.jsx)(z.SidebarAnimationProvider,{children:(0,Ae.jsxs)(X.HorizontalScrollProvider,{children:[t,(0,Ae.jsx)(w.DaemonRpcBoundary,{children:(0,Ae.jsxs)(It,{children:[(0,Ae.jsx)(Ft,{}),(0,Ae.jsx)(Dt,{})]})})]})}),e[1]=n):n=e[1],n}function Ct(e){const t=(0,o.c)(3),{children:n}=e;let s,c;return t[0]===Symbol.for("react.memo_cache_sentinel")?(s=(0,Ae.jsx)(Ge,{}),t[0]=s):s=t[0],t[1]!==n?(c=(0,Ae.jsxs)(Ve,{children:[s,(0,Ae.jsx)(N.SidebarCalloutProvider,{children:(0,Ae.jsx)(xt,{children:n})})]}),t[1]=n,t[2]=c):c=t[2],c}function Rt(e){const t=(0,o.c)(2),{children:n}=e;let l;return t[0]!==n?(l=(0,Ae.jsx)(Y.ToastProvider,{children:(0,Ae.jsx)(c.PortalProvider,{children:(0,Ae.jsx)(s.BottomSheetModalProvider,{children:n})})}),t[0]=n,t[1]=l):l=t[1],l}function At(e){const t=(0,o.c)(2),{children:n}=e;let s;return t[0]!==n?(s=(0,Ae.jsx)(Qe,{children:(0,Ae.jsx)(ge.I18nProvider,{children:(0,Ae.jsx)(b.SafeAreaProvider,{children:(0,Ae.jsx)(p.KeyboardProvider,{children:(0,Ae.jsx)(de.KeyboardShiftProvider,{children:(0,Ae.jsx)(Rt,{children:n})})})})})}),t[0]=n,t[1]=s):s=t[1],s}function Ht(){const e=(0,o.c)(2);let t,s;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=(0,Ae.jsx)(v.ReducedMotionConfig,{mode:v.ReduceMotion.System}),e[0]=t):t=e[0],e[1]===Symbol.for("react.memo_cache_sentinel")?(s=(0,Ae.jsxs)(_.GestureHandlerRootView,{style:et,children:[t,(0,Ae.jsx)(n.View,{style:Gt.surfaceFill,children:(0,Ae.jsx)(At,{children:(0,Ae.jsx)(ye.TenantAuthProvider,{children:(0,Ae.jsx)(ye.TenantAuthGate,{children:(0,Ae.jsx)(Ct,{children:(0,Ae.jsx)(Wt,{})})})})})})]}),e[1]=s):s=e[1],s}const Gt=y.StyleSheet.create(e=>({surfaceFill:{flex:1,backgroundColor:e.colors.surface0,uni__dependencies:[0]}}))},2478,[348,350,55,2479,2991,3030,746,3079,379,36,25,686,146,2482,3214,2570,558,56,3265,3266,3533,3534,3535,3559,3578,3581,3582,3717,3918,3926,3937,4156,4083,3468,3472,3420,4157,4158,3872,3596,3536,3514,4057,4193,3507,4194,4195,4202,4205,4206,3416,3580,3627,3417,3591,4208,4210,4214,4215,4216,4224,3910,4227,4228,3920,3590,3538,4229,3272,1,4231,3445,3274,4246,4247,4249,3597,305,4250,3600,3492,4188,3499,4175,4251,279]);
14096
14096
  __d(function(g,r,i,a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return t.default}}),Object.defineProperty(_e,"BottomSheetModal",{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(_e,"BottomSheetModalProvider",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(_e,"useBottomSheet",{enumerable:!0,get:function(){return u.useBottomSheet}}),Object.defineProperty(_e,"useBottomSheetModal",{enumerable:!0,get:function(){return l.useBottomSheetModal}}),Object.defineProperty(_e,"useBottomSheetSpringConfigs",{enumerable:!0,get:function(){return c.useBottomSheetSpringConfigs}}),Object.defineProperty(_e,"useBottomSheetTimingConfigs",{enumerable:!0,get:function(){return f.useBottomSheetTimingConfigs}}),Object.defineProperty(_e,"useBottomSheetInternal",{enumerable:!0,get:function(){return b.useBottomSheetInternal}}),Object.defineProperty(_e,"useBottomSheetModalInternal",{enumerable:!0,get:function(){return s.useBottomSheetModalInternal}}),Object.defineProperty(_e,"useScrollEventsHandlersDefault",{enumerable:!0,get:function(){return S.useScrollEventsHandlersDefault}}),Object.defineProperty(_e,"useGestureEventsHandlersDefault",{enumerable:!0,get:function(){return h.useGestureEventsHandlersDefault}}),Object.defineProperty(_e,"useBottomSheetGestureHandlers",{enumerable:!0,get:function(){return p.useBottomSheetGestureHandlers}}),Object.defineProperty(_e,"useScrollHandler",{enumerable:!0,get:function(){return B.useScrollHandler}}),Object.defineProperty(_e,"useScrollableSetter",{enumerable:!0,get:function(){return y.useScrollableSetter}}),Object.defineProperty(_e,"useBottomSheetScrollableCreator",{enumerable:!0,get:function(){return O.useBottomSheetScrollableCreator}}),Object.defineProperty(_e,"BottomSheetScrollView",{enumerable:!0,get:function(){return j.BottomSheetScrollView}}),Object.defineProperty(_e,"BottomSheetSectionList",{enumerable:!0,get:function(){return j.BottomSheetSectionList}}),Object.defineProperty(_e,"BottomSheetFlatList",{enumerable:!0,get:function(){return j.BottomSheetFlatList}}),Object.defineProperty(_e,"BottomSheetVirtualizedList",{enumerable:!0,get:function(){return j.BottomSheetVirtualizedList}}),Object.defineProperty(_e,"BottomSheetFlashList",{enumerable:!0,get:function(){return j.BottomSheetFlashList}}),Object.defineProperty(_e,"BottomSheetHandle",{enumerable:!0,get:function(){return P.BottomSheetHandle}}),Object.defineProperty(_e,"BottomSheetDraggableView",{enumerable:!0,get:function(){return H.default}}),Object.defineProperty(_e,"BottomSheetView",{enumerable:!0,get:function(){return C.default}}),Object.defineProperty(_e,"BottomSheetTextInput",{enumerable:!0,get:function(){return F.default}}),Object.defineProperty(_e,"BottomSheetBackdrop",{enumerable:!0,get:function(){return L.BottomSheetBackdrop}}),Object.defineProperty(_e,"BottomSheetFooter",{enumerable:!0,get:function(){return T.BottomSheetFooter}}),Object.defineProperty(_e,"BottomSheetFooterContainer",{enumerable:!0,get:function(){return T.BottomSheetFooterContainer}}),Object.defineProperty(_e,"createBottomSheetScrollableComponent",{enumerable:!0,get:function(){return j.createBottomSheetScrollableComponent}}),Object.defineProperty(_e,"enableLogging",{enumerable:!0,get:function(){return V.enableLogging}}),Object.defineProperty(_e,"TouchableHighlight",{enumerable:!0,get:function(){return _}}),Object.defineProperty(_e,"TouchableOpacity",{enumerable:!0,get:function(){return k}}),Object.defineProperty(_e,"TouchableWithoutFeedback",{enumerable:!0,get:function(){return w}});var t=e(r(d[0])),n=e(r(d[1])),o=e(r(d[2])),u=r(d[3]),l=r(d[4]),c=r(d[5]),f=r(d[6]),b=r(d[7]),s=r(d[8]),S=r(d[9]),h=r(d[10]),p=r(d[11]),B=r(d[12]),y=r(d[13]),O=r(d[14]),j=r(d[15]),P=r(d[16]),H=e(r(d[17])),C=e(r(d[18])),F=e(r(d[19])),L=r(d[20]),T=r(d[21]),v=e(r(d[22])),M=r(d[23]);Object.keys(M).forEach(function(e){'default'===e||Object.prototype.hasOwnProperty.call(_e,e)||Object.defineProperty(_e,e,{enumerable:!0,get:function(){return M[e]}})});var V=r(d[24]);const{TouchableHighlight:_,TouchableOpacity:k,TouchableWithoutFeedback:w}=v.default},2479,[2480,2989,3003,2937,2939,3005,3006,2938,2940,3007,2953,2956,2951,2950,3008,3009,2976,2987,3019,3022,3024,2970,3028,2929,2946]);
14097
14097
  __d(function(g,r,i,a,m,_e,d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return u.default}});var e,t=r(d[0]),u=(e=t)&&e.__esModule?e:{default:e}},2480,[2481]);
14098
14098
  __d(function(g,r,i,a,m,_e,d){"use strict";function t(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return tt}});var e=t(r(d[0])),n=r(d[1]),o=t(r(d[2])),s=t(r(d[3])),_=t(r(d[4])),u=r(d[5]),A=r(d[6]),S=t(A),l=r(d[7]),I=r(d[8]),c=r(d[9]),T=r(d[10]),O=r(d[11]),N=r(d[12]),h=t(r(d[13])),E=r(d[14]),P=r(d[15]),D=r(d[16]),f=r(d[17]),C=r(d[18]),U=r(d[19]);S.default.addWhitelistedUIProps({decelerationRate:!0});const R={code:"function gorhom_BottomSheetJs1(){const{animatedLayoutState,animatedDetentsState,INITIAL_LAYOUT_VALUE}=this.__closure;const{containerHeight:containerHeight}=animatedLayoutState.get();const{highestDetentPosition:highestDetentPosition}=animatedDetentsState.get();if(highestDetentPosition===undefined){return INITIAL_LAYOUT_VALUE;}return containerHeight-highestDetentPosition;}"},x={code:"function gorhom_BottomSheetJs2(){const{animatedLayoutState,INITIAL_LAYOUT_VALUE,handleComponent,animatedDetentsState}=this.__closure;let isContainerHeightCalculated=false;const{containerHeight:containerHeight,handleHeight:handleHeight}=animatedLayoutState.get();if(containerHeight!==null&&containerHeight!==undefined&&containerHeight!==INITIAL_LAYOUT_VALUE){isContainerHeightCalculated=true;}let isHandleHeightCalculated=false;if(handleComponent===null){isHandleHeightCalculated=true;}if(handleHeight!==INITIAL_LAYOUT_VALUE){isHandleHeightCalculated=true;}let isSnapPointsNormalized=false;const{detents:detents}=animatedDetentsState.get();if(detents){isSnapPointsNormalized=true;}return isContainerHeightCalculated&&isHandleHeightCalculated&&isSnapPointsNormalized;}"},v={code:"function gorhom_BottomSheetJs3(){const{animatedDetentsState,SHEET_STATE,animatedPosition,animatedLayoutState,animatedSheetHeight,animatedKeyboardState,keyboardBehavior,KEYBOARD_BEHAVIOR,isInTemporaryPosition}=this.__closure;const{detents:detents,closedDetentPosition:closedDetentPosition}=animatedDetentsState.get();if(!detents||detents.length===0||closedDetentPosition===undefined){return SHEET_STATE.CLOSED;}if(animatedPosition.value>=closedDetentPosition){return SHEET_STATE.CLOSED;}const{containerHeight:containerHeight}=animatedLayoutState.get();const extendedPosition=containerHeight-animatedSheetHeight.value;if(animatedPosition.value===extendedPosition){return SHEET_STATE.EXTENDED;}const keyboardHeightInContainer=animatedKeyboardState.get().heightWithinContainer;const extendedPositionWithKeyboard=Math.max(0,containerHeight-(animatedSheetHeight.value+keyboardHeightInContainer));if(keyboardBehavior===KEYBOARD_BEHAVIOR.interactive&&isInTemporaryPosition.value&&animatedPosition.value===extendedPositionWithKeyboard){return SHEET_STATE.EXTENDED;}if(animatedPosition.value===0){return SHEET_STATE.FILL_PARENT;}if(animatedPosition.value<extendedPosition){return SHEET_STATE.OVER_EXTENDED;}return SHEET_STATE.OPENED;}"},p={code:"function gorhom_BottomSheetJs4(){const{animatedDetentsState,animatedLayoutState,isLayoutCalculated,interpolate,animatedPosition,Extrapolation,animatedAnimationState,android_keyboardInputMode,KEYBOARD_INPUT_MODE,ANIMATION_STATUS,ANIMATION_SOURCE,isInTemporaryPosition,animatedCurrentIndex}=this.__closure;const{detents:detents}=animatedDetentsState.get();if(!detents||detents.length===0){return-1;}const adjustedSnapPoints=detents.slice().reverse();const adjustedSnapPointsIndexes=detents.slice().map(function(_,index){return index;}).reverse();const{containerHeight:containerHeight}=animatedLayoutState.get();adjustedSnapPoints.push(containerHeight);adjustedSnapPointsIndexes.push(-1);const currentIndex=isLayoutCalculated.value?interpolate(animatedPosition.value,adjustedSnapPoints,adjustedSnapPointsIndexes,Extrapolation.CLAMP):-1;const{status:animationStatus,source:animationSource,nextIndex:nextIndex,nextPosition:nextPosition}=animatedAnimationState.get();if(android_keyboardInputMode===KEYBOARD_INPUT_MODE.adjustResize&&animationStatus===ANIMATION_STATUS.RUNNING&&animationSource===ANIMATION_SOURCE.KEYBOARD&&isInTemporaryPosition.value){return Math.max(animatedCurrentIndex.value,currentIndex);}if(animationStatus===ANIMATION_STATUS.RUNNING&&animationSource===ANIMATION_SOURCE.SNAP_POINT_CHANGE&&nextIndex!==undefined&&nextPosition!==undefined){return nextIndex;}return currentIndex;}"},B={code:"function gorhom_BottomSheetJs5(){const{cancelAnimation,animatedPosition,animatedAnimationState,ANIMATION_STATUS,ANIMATION_SOURCE}=this.__closure;cancelAnimation(animatedPosition);animatedAnimationState.set({status:ANIMATION_STATUS.STOPPED,source:ANIMATION_SOURCE.NONE});}"},M={code:"function animateToPositionCompleted_Gorhom_BottomSheetJs6(isFinished){const{animatedAnimationState,__DEV__,runOnJS,print,animatedCurrentIndex,handleOnChange,handleOnClose,animatedContainerHeightDidChange,didAnimateOnMount,ANIMATION_STATUS,ANIMATION_SOURCE}=this.__closure;if(!isFinished){return;}const{nextIndex:nextIndex,nextPosition:nextPosition}=animatedAnimationState.get();if(__DEV__){runOnJS(print)({component:'BottomSheet',method:'animateToPositionCompleted',params:{currentIndex:animatedCurrentIndex.value,nextIndex:nextIndex,nextPosition:nextPosition}});}if(nextIndex===undefined||nextPosition===undefined){return;}if(nextIndex!==animatedCurrentIndex.get()){runOnJS(handleOnChange)(nextIndex,nextPosition);}if(nextIndex===-1){runOnJS(handleOnClose)();}animatedCurrentIndex.set(nextIndex);animatedContainerHeightDidChange.set(false);didAnimateOnMount.set(true);animatedAnimationState.set({status:ANIMATION_STATUS.STOPPED,source:ANIMATION_SOURCE.NONE,nextIndex:undefined,nextPosition:undefined,isForcedClosing:undefined});}"},y={code:"function gorhom_BottomSheetJs7(state){const{ANIMATION_STATUS,source,index,position}=this.__closure;return{...state,status:ANIMATION_STATUS.RUNNING,source:source,nextIndex:index,nextPosition:position};}"},H={code:"function animateToPosition_Gorhom_BottomSheetJs8(position,source,velocity=0,configs){const{__DEV__,runOnJS,print,animatedPosition,animatedAnimationState,ANIMATION_STATUS,stopAnimation,animatedKeyboardState,animatedSheetState,KEYBOARD_STATUS,keyboardBehavior,KEYBOARD_BEHAVIOR,ANIMATION_SOURCE,SHEET_STATE,animatedDetentsState,DEFAULT_KEYBOARD_INDEX,_worklet_3054184197869_init_data,handleOnAnimate,animate,_providedAnimationConfigs,_providedOverrideReduceMotion,animateToPositionCompleted}=this.__closure;var _detents$indexOf;if(__DEV__){runOnJS(print)({component:'BottomSheet',method:'animateToPosition',params:{currentPosition:animatedPosition.value,nextPosition:position,source:source}});}if(position===undefined){return;}if(position===animatedPosition.get()){return;}const{status:animationStatus,nextPosition:nextPosition}=animatedAnimationState.get();if(animationStatus===ANIMATION_STATUS.RUNNING&&position===nextPosition){return;}if(animationStatus===ANIMATION_STATUS.RUNNING){stopAnimation();}let offset=0;const{status:status,heightWithinContainer:heightWithinContainer}=animatedKeyboardState.get();const sheetState=animatedSheetState.get();if(status===KEYBOARD_STATUS.SHOWN&&keyboardBehavior!==KEYBOARD_BEHAVIOR.extend&&([ANIMATION_SOURCE.KEYBOARD,ANIMATION_SOURCE.SNAP_POINT_CHANGE].includes(source)||sheetState===SHEET_STATE.OVER_EXTENDED)){offset=heightWithinContainer;}const{detents:detents,closedDetentPosition:closedDetentPosition,highestDetentPosition:highestDetentPosition}=animatedDetentsState.get();let index=(_detents$indexOf=detents===null||detents===void 0?void 0:detents.indexOf(position+offset))!==null&&_detents$indexOf!==void 0?_detents$indexOf:-1;if(index===-1&&status===KEYBOARD_STATUS.SHOWN&&position!==closedDetentPosition){if(detents!==undefined&&highestDetentPosition!==undefined){index=detents.indexOf(highestDetentPosition);}if(index===-1){index=DEFAULT_KEYBOARD_INDEX;}}animatedAnimationState.set(function animateToPosition_Gorhom_BottomSheetJs8({_worklet_3054184197869_init_data:_worklet_3054184197869_init_data,ANIMATION_STATUS:ANIMATION_STATUS,source:source,index:index,position:position}){const gorhom_BottomSheetJs7=function(state){return{...state,status:ANIMATION_STATUS.RUNNING,source:source,nextIndex:index,nextPosition:position};};gorhom_BottomSheetJs7.__closure={ANIMATION_STATUS:ANIMATION_STATUS,source:source,index:index,position:position};gorhom_BottomSheetJs7.__workletHash=3054184197869;gorhom_BottomSheetJs7.__initData=_worklet_3054184197869_init_data;return gorhom_BottomSheetJs7;}({_worklet_3054184197869_init_data:_worklet_3054184197869_init_data,ANIMATION_STATUS:ANIMATION_STATUS,source:source,index:index,position:position}));runOnJS(handleOnAnimate)(index,position);animatedPosition.value=animate({point:position,configs:configs||_providedAnimationConfigs,velocity:velocity,overrideReduceMotion:_providedOverrideReduceMotion,onComplete:animateToPositionCompleted});}"},b={code:"function gorhom_BottomSheetJs9(state){const{targetPosition,index}=this.__closure;return{...state,nextPosition:targetPosition,nextIndex:index};}"},L={code:"function setToPosition_Gorhom_BottomSheetJs10(targetPosition){const{animatedPosition,animatedAnimationState,ANIMATION_STATUS,__DEV__,runOnJS,print,animatedDetentsState,_worklet_3650511913251_init_data,stopAnimation,animatedContainerHeightDidChange}=this.__closure;var _detents$indexOf;if(!targetPosition){return;}if(targetPosition===animatedPosition.get()){return;}const{status:animationStatus,nextPosition:nextPosition}=animatedAnimationState.get();if(animationStatus===ANIMATION_STATUS.RUNNING&&targetPosition===nextPosition){return;}if(__DEV__){runOnJS(print)({component:'BottomSheet',method:'setToPosition',params:{currentPosition:animatedPosition.value,targetPosition:targetPosition}});}const{detents:detents}=animatedDetentsState.get();const index=(_detents$indexOf=detents===null||detents===void 0?void 0:detents.indexOf(targetPosition))!==null&&_detents$indexOf!==void 0?_detents$indexOf:-1;animatedAnimationState.set(function setToPosition_Gorhom_BottomSheetJs10({_worklet_3650511913251_init_data:_worklet_3650511913251_init_data,targetPosition:targetPosition,index:index}){const gorhom_BottomSheetJs9=function(state){return{...state,nextPosition:targetPosition,nextIndex:index};};gorhom_BottomSheetJs9.__closure={targetPosition:targetPosition,index:index};gorhom_BottomSheetJs9.__workletHash=3650511913251;gorhom_BottomSheetJs9.__initData=_worklet_3650511913251_init_data;return gorhom_BottomSheetJs9;}({_worklet_3650511913251_init_data:_worklet_3650511913251_init_data,targetPosition:targetPosition,index:index}));stopAnimation();animatedPosition.value=targetPosition;animatedContainerHeightDidChange.value=false;}"},k={code:"function getEvaluatedPosition_Gorhom_BottomSheetJs11(source){const{animatedCurrentIndex,animatedDetentsState,animatedKeyboardState,ANIMATION_SOURCE,keyboardBlurBehavior,KEYBOARD_BLUR_BEHAVIOR,KEYBOARD_STATUS,animatedContentGestureState,State,animatedHandleGestureState,isInTemporaryPosition,keyboardBehavior,KEYBOARD_BEHAVIOR,Platform,android_keyboardInputMode,animatedPosition,didAnimateOnMount,_providedIndex,animatedAnimationState,ANIMATION_STATUS}=this.__closure;const currentIndex=animatedCurrentIndex.value;const{detents:detents,highestDetentPosition:highestDetentPosition,closedDetentPosition:closedDetentPosition}=animatedDetentsState.get();const keyboardStatus=animatedKeyboardState.get().status;if(detents===undefined||highestDetentPosition===undefined||closedDetentPosition===undefined){return;}if(source===ANIMATION_SOURCE.KEYBOARD&&keyboardBlurBehavior===KEYBOARD_BLUR_BEHAVIOR.restore&&keyboardStatus===KEYBOARD_STATUS.HIDDEN&&animatedContentGestureState.value!==State.ACTIVE&&animatedHandleGestureState.value!==State.ACTIVE){isInTemporaryPosition.value=false;const nextPosition=detents[currentIndex];return nextPosition;}if(keyboardBehavior===KEYBOARD_BEHAVIOR.extend&&keyboardStatus===KEYBOARD_STATUS.SHOWN){return highestDetentPosition;}if(keyboardBehavior===KEYBOARD_BEHAVIOR.fillParent&&keyboardStatus===KEYBOARD_STATUS.SHOWN){isInTemporaryPosition.value=true;return 0;}if(keyboardBehavior===KEYBOARD_BEHAVIOR.interactive&&keyboardStatus===KEYBOARD_STATUS.SHOWN&&!(Platform.OS==='android'&&android_keyboardInputMode==='adjustResize')){isInTemporaryPosition.value=true;const keyboardHeightInContainer=animatedKeyboardState.get().heightWithinContainer;return Math.max(0,highestDetentPosition-keyboardHeightInContainer);}if(isInTemporaryPosition.value){return animatedPosition.value;}if(!didAnimateOnMount.value){return _providedIndex===-1?closedDetentPosition:detents[_providedIndex];}const{status:status,nextIndex:nextIndex,nextPosition:nextPosition}=animatedAnimationState.get();if(source===ANIMATION_SOURCE.SNAP_POINT_CHANGE&&status===ANIMATION_STATUS.RUNNING&&nextIndex!==undefined&&nextPosition!==undefined&&detents[nextIndex]!==nextPosition){return detents[nextIndex];}return detents[currentIndex];}"},K={code:"function evaluatePosition_Gorhom_BottomSheetJs12(source,animationConfigs){const{animatedAnimationState,animatedDetentsState,ANIMATION_SOURCE,isLayoutCalculated,getEvaluatedPosition,didAnimateOnMount,ANIMATION_STATUS,animateOnMount,animateToPosition,setToPosition,INITIAL_VALUE,isInTemporaryPosition,animatedCurrentIndex,reduceMotion,animatedIndex,animatedPosition,animatedContainerHeightDidChange}=this.__closure;const{status:animationStatus,nextIndex:nextIndex,isForcedClosing:isForcedClosing}=animatedAnimationState.get();const{detents:detents,closedDetentPosition:closedDetentPosition}=animatedDetentsState.get();if(detents===undefined||detents.length===0||closedDetentPosition===undefined){return;}if(isForcedClosing&&source!==ANIMATION_SOURCE.USER){return;}if(!isLayoutCalculated.value){return;}const proposedPosition=getEvaluatedPosition(source);if(proposedPosition===undefined){return;}if(!didAnimateOnMount.value){if(animationStatus===ANIMATION_STATUS.RUNNING&&(isForcedClosing||nextIndex===-1)){return;}if(animateOnMount){animateToPosition(proposedPosition,ANIMATION_SOURCE.MOUNT,undefined,animationConfigs);}else{setToPosition(proposedPosition);didAnimateOnMount.value=true;}return;}if(animationStatus===ANIMATION_STATUS.RUNNING){const nextPositionIndex=nextIndex!==null&&nextIndex!==void 0?nextIndex:INITIAL_VALUE;if(nextPositionIndex===-1&&!isInTemporaryPosition.value){setToPosition(closedDetentPosition);return;}if(nextPositionIndex!==animatedCurrentIndex.value){animateToPosition(detents[nextPositionIndex],source,undefined,animationConfigs);return;}}if(animationStatus!==ANIMATION_STATUS.RUNNING&&animatedCurrentIndex.value===-1){if(reduceMotion&&detents[animatedIndex.value]!==animatedPosition.value){return;}setToPosition(closedDetentPosition);return;}if(animatedContainerHeightDidChange.value){setToPosition(proposedPosition);return;}animateToPosition(proposedPosition,source,undefined,animationConfigs);}"},V={code:"function handleSnapToPosition_Gorhom_BottomSheetJs13(position,animationConfigs){const{__DEV__,print,animatedLayoutState,normalizeSnapPoint,animatedAnimationState,isLayoutCalculated,isInTemporaryPosition,runOnUI,animateToPosition,ANIMATION_SOURCE}=this.__closure;if(__DEV__){print({component:'BottomSheet',method:'handleSnapToPosition',params:{position:position}});}const{containerHeight:containerHeight}=animatedLayoutState.get();const targetPosition=normalizeSnapPoint(position,containerHeight);const{nextPosition:nextPosition,isForcedClosing:isForcedClosing}=animatedAnimationState.get();if(!isLayoutCalculated||targetPosition===nextPosition||isForcedClosing){return;}isInTemporaryPosition.value=true;runOnUI(animateToPosition)(targetPosition,ANIMATION_SOURCE.USER,0,animationConfigs);}"},Y={code:"function gorhom_BottomSheetJs14(state){return{...state,isForcedClosing:true};}"},w={code:"function gorhom_BottomSheetJs15(){const{animatedLayoutState}=this.__closure;return animatedLayoutState.get().containerHeight;}"},G={code:"function gorhom_BottomSheetJs16(result,previous){const{INITIAL_LAYOUT_VALUE,animatedContainerHeightDidChange,animatedDetentsState,animatedAnimationState,ANIMATION_STATUS,ANIMATION_SOURCE,animateToPosition}=this.__closure;if(result===INITIAL_LAYOUT_VALUE){return;}animatedContainerHeightDidChange.value=result!==previous;const{closedDetentPosition:closedDetentPosition}=animatedDetentsState.get();if(closedDetentPosition===undefined){return;}const{status:animationStatus,source:animationSource,nextIndex:nextIndex}=animatedAnimationState.get();if(animationStatus===ANIMATION_STATUS.RUNNING&&animationSource===ANIMATION_SOURCE.GESTURE&&nextIndex===-1){animateToPosition(closedDetentPosition,ANIMATION_SOURCE.GESTURE);}}"},J={code:"function gorhom_BottomSheetJs17(){const{animatedDetentsState}=this.__closure;return animatedDetentsState.get().detents;}"},F={code:"function gorhom_BottomSheetJs18(result,previous){const{didAnimateOnMount,isLayoutCalculated,__DEV__,runOnJS,print,evaluatePosition,ANIMATION_SOURCE}=this.__closure;if(JSON.stringify(result)===JSON.stringify(previous)&&didAnimateOnMount.value){return;}if(!isLayoutCalculated.value){return;}if(__DEV__){runOnJS(print)({component:'BottomSheet',method:'useAnimatedReaction::OnSnapPointChange',category:'effect',params:{result:result}});}evaluatePosition(ANIMATION_SOURCE.SNAP_POINT_CHANGE);}"},W={code:"function gorhom_BottomSheetJs19(){const{animatedKeyboardState}=this.__closure;return animatedKeyboardState.get().status+animatedKeyboardState.get().height;}"},j={code:"function gorhom_BottomSheetJs20(result,_previousResult){const{animatedKeyboardState,KEYBOARD_STATUS,animatedAnimationState,ANIMATION_STATUS,ANIMATION_SOURCE,animatedLayoutState,$modal,bottomInset,__DEV__,runOnJS,print,Platform,android_keyboardInputMode,KEYBOARD_INPUT_MODE,keyboardBehavior,KEYBOARD_BEHAVIOR,animatedContentGestureState,State,animatedHandleGestureState,keyboardBlurBehavior,KEYBOARD_BLUR_BEHAVIOR,getKeyboardAnimationConfigs,evaluatePosition}=this.__closure;if(result===_previousResult){return;}const{status:status,height:height,easing:easing,duration:duration,target:target}=animatedKeyboardState.get();if(status===KEYBOARD_STATUS.UNDETERMINED){return;}const{status:animationStatus,source:animationSource}=animatedAnimationState.get();if(status===KEYBOARD_STATUS.HIDDEN&&animationStatus===ANIMATION_STATUS.RUNNING&&animationSource===ANIMATION_SOURCE.GESTURE){return;}const containerOffset=animatedLayoutState.get().containerOffset;let heightWithinContainer=height===0?0:$modal?Math.abs(height-Math.abs(bottomInset-containerOffset.bottom)):Math.abs(height-containerOffset.bottom);if(__DEV__){runOnJS(print)({component:'BottomSheet',method:'useAnimatedReaction::OnKeyboardStateChange',category:'effect',params:{status:status,height:height,heightWithinContainer:heightWithinContainer,containerOffset:containerOffset}});}if(Platform.OS==='android'&&android_keyboardInputMode===KEYBOARD_INPUT_MODE.adjustResize){heightWithinContainer=0;if(keyboardBehavior===KEYBOARD_BEHAVIOR.interactive){animatedKeyboardState.set({target:target,status:status,height:height,easing:easing,duration:duration,heightWithinContainer:heightWithinContainer});return;}}animatedKeyboardState.set(function(state){return{...state,heightWithinContainer:heightWithinContainer};});const hasActiveGesture=animatedContentGestureState.value===State.ACTIVE||animatedContentGestureState.value===State.BEGAN||animatedHandleGestureState.value===State.ACTIVE||animatedHandleGestureState.value===State.BEGAN;if(hasActiveGesture){return;}if(status===KEYBOARD_STATUS.HIDDEN&&keyboardBlurBehavior===KEYBOARD_BLUR_BEHAVIOR.none){return;}const animationConfigs=getKeyboardAnimationConfigs(easing,duration);evaluatePosition(ANIMATION_SOURCE.KEYBOARD,animationConfigs);}"},X={code:"function gorhom_BottomSheetJs21(){const{animatedPosition}=this.__closure;return animatedPosition.value;}"},z={code:"function gorhom_BottomSheetJs22(_animatedPosition){const{_providedAnimatedPosition,topInset}=this.__closure;if(_providedAnimatedPosition){_providedAnimatedPosition.value=_animatedPosition+topInset;}}"},$={code:"function gorhom_BottomSheetJs23(){const{animatedIndex}=this.__closure;return animatedIndex.value;}"},Z={code:"function gorhom_BottomSheetJs24(_animatedIndex){const{_providedAnimatedIndex}=this.__closure;if(_providedAnimatedIndex){_providedAnimatedIndex.value=_animatedIndex;}}"},q=(0,n.forwardRef)(function(t,S){const{animationConfigs:q,index:Q=0,snapPoints:tt,animateOnMount:et=C.DEFAULT_ANIMATE_ON_MOUNT,enableContentPanningGesture:nt=C.DEFAULT_ENABLE_CONTENT_PANNING_GESTURE,enableHandlePanningGesture:it,enableOverDrag:at=C.DEFAULT_ENABLE_OVER_DRAG,enablePanDownToClose:ot=C.DEFAULT_ENABLE_PAN_DOWN_TO_CLOSE,enableDynamicSizing:st=C.DEFAULT_DYNAMIC_SIZING,overDragResistanceFactor:dt=C.DEFAULT_OVER_DRAG_RESISTANCE_FACTOR,overrideReduceMotion:rt,style:_t,containerStyle:ut,backgroundStyle:At,handleStyle:mt,handleIndicatorStyle:St,gestureEventsHandlersHook:lt,keyboardBehavior:It=C.DEFAULT_KEYBOARD_BEHAVIOR,keyboardBlurBehavior:ct=C.DEFAULT_KEYBOARD_BLUR_BEHAVIOR,android_keyboardInputMode:Tt=C.DEFAULT_KEYBOARD_INPUT_MODE,enableBlurKeyboardOnGesture:Ot=C.DEFAULT_ENABLE_BLUR_KEYBOARD_ON_GESTURE,containerLayoutState:Nt,topInset:ht=0,bottomInset:Et=0,maxDynamicContentSize:gt,containerHeight:Pt,containerOffset:Dt,animatedPosition:ft,animatedIndex:Ct,simultaneousHandlers:Ut,waitFor:Rt,activeOffsetX:xt,activeOffsetY:vt,failOffsetX:pt,failOffsetY:Bt,onChange:Mt,onClose:yt,onAnimate:Ht,$modal:bt=!1,detached:Lt=!1,handleComponent:kt=E.BottomSheetHandle,backdropComponent:Kt,backgroundComponent:Vt,footerComponent:Yt,children:wt,accessible:Gt=C.DEFAULT_ACCESSIBLE,accessibilityLabel:Jt=C.DEFAULT_ACCESSIBILITY_LABEL,accessibilityRole:Ft=C.DEFAULT_ACCESSIBILITY_ROLE}=t,Wt=(0,c.useAnimatedLayout)(Nt,ht,Et,bt,null===kt),jt=(0,c.useAnimatedDetents)(tt,Wt,st,gt,Lt,bt,Et),Xt=(0,A.useDerivedValue)((function({_worklet_4739220383715_init_data:t,animatedLayoutState:e,animatedDetentsState:n,INITIAL_LAYOUT_VALUE:o}){const s=function(){const{containerHeight:t}=e.get(),{highestDetentPosition:s}=n.get();return void 0===s?o:t-s};return s.__closure={animatedLayoutState:e,animatedDetentsState:n,INITIAL_LAYOUT_VALUE:o},s.__workletHash=4739220383715,s.__initData=t,s})({_worklet_4739220383715_init_data:R,animatedLayoutState:Wt,animatedDetentsState:jt,INITIAL_LAYOUT_VALUE:l.INITIAL_LAYOUT_VALUE}),[Wt,jt]),zt=(0,c.useReactiveSharedValue)(et?-1:Q),$t=(0,A.useSharedValue)(o.default.get('window').height),Zt=(0,A.useSharedValue)(!et||-1===Q),qt=(0,A.useDerivedValue)((function({_worklet_5675370605537_init_data:t,animatedLayoutState:e,INITIAL_LAYOUT_VALUE:n,handleComponent:o,animatedDetentsState:s}){const _=function(){let t=!1;const{containerHeight:_,handleHeight:u}=e.get();null!=_&&_!==n&&(t=!0);let A=!1;null===o&&(A=!0),u!==n&&(A=!0);let S=!1;const{detents:l}=s.get();return l&&(S=!0),t&&A&&S};return _.__closure={animatedLayoutState:e,INITIAL_LAYOUT_VALUE:n,handleComponent:o,animatedDetentsState:s},_.__workletHash=5675370605537,_.__initData=t,_})({_worklet_5675370605537_init_data:x,animatedLayoutState:Wt,INITIAL_LAYOUT_VALUE:l.INITIAL_LAYOUT_VALUE,handleComponent:kt,animatedDetentsState:jt}),[Wt,jt,kt]),Qt=(0,A.useSharedValue)(!1),te=(0,A.useSharedValue)(!1),ee=(0,A.useSharedValue)(u.State.UNDETERMINED),ne=(0,A.useSharedValue)(u.State.UNDETERMINED),{state:ie,textInputNodesRef:ae}=(0,c.useAnimatedKeyboard)(),oe=(0,A.useReducedMotion)(),se=(0,n.useMemo)(()=>rt&&rt!==A.ReduceMotion.System?rt===A.ReduceMotion.Always:oe,[oe,rt]),de=(0,A.useSharedValue)({status:l.ANIMATION_STATUS.UNDETERMINED,source:l.ANIMATION_SOURCE.MOUNT}),re=(0,A.useDerivedValue)((function({_worklet_13452930535016_init_data:t,animatedDetentsState:e,SHEET_STATE:n,animatedPosition:o,animatedLayoutState:s,animatedSheetHeight:_,animatedKeyboardState:u,keyboardBehavior:A,KEYBOARD_BEHAVIOR:S,isInTemporaryPosition:l}){const I=function(){const{detents:t,closedDetentPosition:I}=e.get();if(!t||0===t.length||void 0===I)return n.CLOSED;if(o.value>=I)return n.CLOSED;const{containerHeight:c}=s.get(),T=c-_.value;if(o.value===T)return n.EXTENDED;const O=u.get().heightWithinContainer,N=Math.max(0,c-(_.value+O));return A===S.interactive&&l.value&&o.value===N?n.EXTENDED:0===o.value?n.FILL_PARENT:o.value<T?n.OVER_EXTENDED:n.OPENED};return I.__closure={animatedDetentsState:e,SHEET_STATE:n,animatedPosition:o,animatedLayoutState:s,animatedSheetHeight:_,animatedKeyboardState:u,keyboardBehavior:A,KEYBOARD_BEHAVIOR:S,isInTemporaryPosition:l},I.__workletHash=0xc3c41254e68,I.__initData=t,I})({_worklet_13452930535016_init_data:v,animatedDetentsState:jt,SHEET_STATE:l.SHEET_STATE,animatedPosition:$t,animatedLayoutState:Wt,animatedSheetHeight:Xt,animatedKeyboardState:ie,keyboardBehavior:It,KEYBOARD_BEHAVIOR:l.KEYBOARD_BEHAVIOR,isInTemporaryPosition:Qt}),[Wt,jt,ie,$t,Xt,Qt,It]),{state:ue,status:Ae,setScrollableRef:me,removeScrollableRef:Se}=(0,c.useScrollable)(nt,re,ie,de),le=(0,A.useDerivedValue)((function({_worklet_14040060957476_init_data:t,animatedDetentsState:e,animatedLayoutState:n,isLayoutCalculated:o,interpolate:s,animatedPosition:_,Extrapolation:u,animatedAnimationState:A,android_keyboardInputMode:S,KEYBOARD_INPUT_MODE:l,ANIMATION_STATUS:I,ANIMATION_SOURCE:c,isInTemporaryPosition:T,animatedCurrentIndex:O}){const N=function(){const{detents:t}=e.get();if(!t||0===t.length)return-1;const N=t.slice().reverse(),h=t.slice().map((t,e)=>e).reverse(),{containerHeight:E}=n.get();N.push(E),h.push(-1);const P=o.value?s(_.value,N,h,u.CLAMP):-1,{status:D,source:f,nextIndex:C,nextPosition:U}=A.get();return S===l.adjustResize&&D===I.RUNNING&&f===c.KEYBOARD&&T.value?Math.max(O.value,P):D===I.RUNNING&&f===c.SNAP_POINT_CHANGE&&void 0!==C&&void 0!==U?C:P};return N.__closure={animatedDetentsState:e,animatedLayoutState:n,isLayoutCalculated:o,interpolate:s,animatedPosition:_,Extrapolation:u,animatedAnimationState:A,android_keyboardInputMode:S,KEYBOARD_INPUT_MODE:l,ANIMATION_STATUS:I,ANIMATION_SOURCE:c,isInTemporaryPosition:T,animatedCurrentIndex:O},N.__workletHash=0xcc4f4d89324,N.__initData=t,N})({_worklet_14040060957476_init_data:p,animatedDetentsState:jt,animatedLayoutState:Wt,isLayoutCalculated:qt,interpolate:A.interpolate,animatedPosition:$t,Extrapolation:A.Extrapolation,animatedAnimationState:de,android_keyboardInputMode:Tt,KEYBOARD_INPUT_MODE:l.KEYBOARD_INPUT_MODE,ANIMATION_STATUS:l.ANIMATION_STATUS,ANIMATION_SOURCE:l.ANIMATION_SOURCE,isInTemporaryPosition:Qt,animatedCurrentIndex:zt}),[Tt,de,Wt,zt,$t,jt,Qt,qt]),Ie=(0,n.useCallback)(function(t,e){if(!Mt)return;const{dynamicDetentIndex:n}=jt.get();Mt(t,e,t===n?l.SNAP_POINT_TYPE.DYNAMIC:l.SNAP_POINT_TYPE.PROVIDED)},[Mt,jt]),ce=(0,n.useCallback)(function(t,e){t!==zt.get()&&Ht&&Ht(zt.value,t,$t.value,e)},[Ht,zt,$t]),Te=(0,n.useCallback)(function(){yt&&yt()},[yt]),Oe=(0,n.useCallback)((function({_worklet_12445268428881_init_data:t,cancelAnimation:e,animatedPosition:n,animatedAnimationState:o,ANIMATION_STATUS:s,ANIMATION_SOURCE:_}){const u=function(){e(n),o.set({status:s.STOPPED,source:_.NONE})};return u.__closure={cancelAnimation:e,animatedPosition:n,animatedAnimationState:o,ANIMATION_STATUS:s,ANIMATION_SOURCE:_},u.__workletHash=0xb51a3cdc851,u.__initData=t,u})({_worklet_12445268428881_init_data:B,cancelAnimation:A.cancelAnimation,animatedPosition:$t,animatedAnimationState:de,ANIMATION_STATUS:l.ANIMATION_STATUS,ANIMATION_SOURCE:l.ANIMATION_SOURCE}),[$t,de]),Ne=(0,n.useCallback)((function({_worklet_6749885698847_init_data:t,animatedAnimationState:e,__DEV__:n,runOnJS:o,print:s,animatedCurrentIndex:_,handleOnChange:u,handleOnClose:A,animatedContainerHeightDidChange:S,didAnimateOnMount:l,ANIMATION_STATUS:I,ANIMATION_SOURCE:c}){const T=function(t){if(!t)return;const{nextIndex:T,nextPosition:O}=e.get();n&&o(s)({component:'BottomSheet',method:'animateToPositionCompleted',params:{currentIndex:_.value,nextIndex:T,nextPosition:O}}),void 0!==T&&void 0!==O&&(T!==_.get()&&o(u)(T,O),-1===T&&o(A)(),_.set(T),S.set(!1),l.set(!0),e.set({status:I.STOPPED,source:c.NONE,nextIndex:void 0,nextPosition:void 0,isForcedClosing:void 0}))};return T.__closure={animatedAnimationState:e,__DEV__:n,runOnJS:o,print:s,animatedCurrentIndex:_,handleOnChange:u,handleOnClose:A,animatedContainerHeightDidChange:S,didAnimateOnMount:l,ANIMATION_STATUS:I,ANIMATION_SOURCE:c},T.__workletHash=6749885698847,T.__initData=t,T})({_worklet_6749885698847_init_data:M,animatedAnimationState:de,__DEV__:!1,runOnJS:A.runOnJS,print:T.print,animatedCurrentIndex:zt,handleOnChange:Ie,handleOnClose:Te,animatedContainerHeightDidChange:te,didAnimateOnMount:Zt,ANIMATION_STATUS:l.ANIMATION_STATUS,ANIMATION_SOURCE:l.ANIMATION_SOURCE}),[Ie,Te,zt,de,te,Zt]),he=(0,n.useCallback)((function({_worklet_7080750884016_init_data:t,__DEV__:e,runOnJS:n,print:o,animatedPosition:s,animatedAnimationState:_,ANIMATION_STATUS:u,stopAnimation:A,animatedKeyboardState:S,animatedSheetState:l,KEYBOARD_STATUS:I,keyboardBehavior:c,KEYBOARD_BEHAVIOR:T,ANIMATION_SOURCE:O,SHEET_STATE:N,animatedDetentsState:h,DEFAULT_KEYBOARD_INDEX:E,_worklet_3054184197869_init_data:P,handleOnAnimate:D,animate:f,_providedAnimationConfigs:C,_providedOverrideReduceMotion:U,animateToPositionCompleted:R}){const x=function(t,x,v=0,p){if(e&&n(o)({component:'BottomSheet',method:'animateToPosition',params:{currentPosition:s.value,nextPosition:t,source:x}}),void 0===t)return;if(t===s.get())return;const{status:B,nextPosition:M}=_.get();if(B===u.RUNNING&&t===M)return;B===u.RUNNING&&A();let y=0;const{status:H,heightWithinContainer:b}=S.get(),L=l.get();H!==I.SHOWN||c===T.extend||![O.KEYBOARD,O.SNAP_POINT_CHANGE].includes(x)&&L!==N.OVER_EXTENDED||(y=b);const{detents:k,closedDetentPosition:K,highestDetentPosition:V}=h.get();let Y=k?.indexOf(t+y)??-1;-1===Y&&H===I.SHOWN&&t!==K&&(void 0!==k&&void 0!==V&&(Y=k.indexOf(V)),-1===Y&&(Y=E)),_.set((function({_worklet_3054184197869_init_data:t,ANIMATION_STATUS:e,source:n,index:o,position:s}){const _=function(t){return Object.assign({},t,{status:e.RUNNING,source:n,nextIndex:o,nextPosition:s})};return _.__closure={ANIMATION_STATUS:e,source:n,index:o,position:s},_.__workletHash=3054184197869,_.__initData=t,_})({_worklet_3054184197869_init_data:P,ANIMATION_STATUS:u,source:x,index:Y,position:t})),n(D)(Y,t),s.value=f({point:t,configs:p||C,velocity:v,overrideReduceMotion:U,onComplete:R})};return x.__closure={__DEV__:e,runOnJS:n,print:o,animatedPosition:s,animatedAnimationState:_,ANIMATION_STATUS:u,stopAnimation:A,animatedKeyboardState:S,animatedSheetState:l,KEYBOARD_STATUS:I,keyboardBehavior:c,KEYBOARD_BEHAVIOR:T,ANIMATION_SOURCE:O,SHEET_STATE:N,animatedDetentsState:h,DEFAULT_KEYBOARD_INDEX:E,_worklet_3054184197869_init_data:P,handleOnAnimate:D,animate:f,_providedAnimationConfigs:C,_providedOverrideReduceMotion:U,animateToPositionCompleted:R},x.__workletHash=7080750884016,x.__initData=t,x})({_worklet_7080750884016_init_data:H,__DEV__:!1,runOnJS:A.runOnJS,print:T.print,animatedPosition:$t,animatedAnimationState:de,ANIMATION_STATUS:l.ANIMATION_STATUS,stopAnimation:Oe,animatedKeyboardState:ie,animatedSheetState:re,KEYBOARD_STATUS:l.KEYBOARD_STATUS,keyboardBehavior:It,KEYBOARD_BEHAVIOR:l.KEYBOARD_BEHAVIOR,ANIMATION_SOURCE:l.ANIMATION_SOURCE,SHEET_STATE:l.SHEET_STATE,animatedDetentsState:jt,DEFAULT_KEYBOARD_INDEX:C.DEFAULT_KEYBOARD_INDEX,_worklet_3054184197869_init_data:y,handleOnAnimate:ce,animate:T.animate,_providedAnimationConfigs:q,_providedOverrideReduceMotion:rt,animateToPositionCompleted:Ne}),[ce,Oe,Ne,It,q,rt,jt,de,ie,$t,re]),Ee=(0,n.useCallback)((function({_worklet_17559292240469_init_data:t,animatedPosition:e,animatedAnimationState:n,ANIMATION_STATUS:o,__DEV__:s,runOnJS:_,print:u,animatedDetentsState:A,_worklet_3650511913251_init_data:S,stopAnimation:l,animatedContainerHeightDidChange:I}){const c=function(t){if(!t)return;if(t===e.get())return;const{status:c,nextPosition:T}=n.get();if(c===o.RUNNING&&t===T)return;s&&_(u)({component:'BottomSheet',method:'setToPosition',params:{currentPosition:e.value,targetPosition:t}});const{detents:O}=A.get(),N=O?.indexOf(t)??-1;n.set((function({_worklet_3650511913251_init_data:t,targetPosition:e,index:n}){const o=function(t){return Object.assign({},t,{nextPosition:e,nextIndex:n})};return o.__closure={targetPosition:e,index:n},o.__workletHash=3650511913251,o.__initData=t,o})({_worklet_3650511913251_init_data:S,targetPosition:t,index:N})),l(),e.value=t,I.value=!1};return c.__closure={animatedPosition:e,animatedAnimationState:n,ANIMATION_STATUS:o,__DEV__:s,runOnJS:_,print:u,animatedDetentsState:A,_worklet_3650511913251_init_data:S,stopAnimation:l,animatedContainerHeightDidChange:I},c.__workletHash=0xff857606255,c.__initData=t,c})({_worklet_17559292240469_init_data:L,animatedPosition:$t,animatedAnimationState:de,ANIMATION_STATUS:l.ANIMATION_STATUS,__DEV__:!1,runOnJS:A.runOnJS,print:T.print,animatedDetentsState:jt,_worklet_3650511913251_init_data:b,stopAnimation:Oe,animatedContainerHeightDidChange:te}),[Oe,$t,te,de,jt]),ge=(0,n.useCallback)((function({_worklet_14289569669057_init_data:t,animatedCurrentIndex:e,animatedDetentsState:n,animatedKeyboardState:o,ANIMATION_SOURCE:s,keyboardBlurBehavior:_,KEYBOARD_BLUR_BEHAVIOR:u,KEYBOARD_STATUS:A,animatedContentGestureState:S,State:l,animatedHandleGestureState:I,isInTemporaryPosition:c,keyboardBehavior:T,KEYBOARD_BEHAVIOR:O,Platform:N,android_keyboardInputMode:h,animatedPosition:E,didAnimateOnMount:P,_providedIndex:D,animatedAnimationState:f,ANIMATION_STATUS:C}){const U=function(t){const N=e.value,{detents:h,highestDetentPosition:U,closedDetentPosition:R}=n.get(),x=o.get().status;if(void 0===h||void 0===U||void 0===R)return;if(t===s.KEYBOARD&&_===u.restore&&x===A.HIDDEN&&S.value!==l.ACTIVE&&I.value!==l.ACTIVE){c.value=!1;return h[N]}if(T===O.extend&&x===A.SHOWN)return U;if(T===O.fillParent&&x===A.SHOWN)return c.value=!0,0;if(T===O.interactive&&x===A.SHOWN){c.value=!0;const t=o.get().heightWithinContainer;return Math.max(0,U-t)}if(c.value)return E.value;if(!P.value)return-1===D?R:h[D];const{status:v,nextIndex:p,nextPosition:B}=f.get();return t===s.SNAP_POINT_CHANGE&&v===C.RUNNING&&void 0!==p&&void 0!==B&&h[p]!==B?h[p]:h[N]};return U.__closure={animatedCurrentIndex:e,animatedDetentsState:n,animatedKeyboardState:o,ANIMATION_SOURCE:s,keyboardBlurBehavior:_,KEYBOARD_BLUR_BEHAVIOR:u,KEYBOARD_STATUS:A,animatedContentGestureState:S,State:l,animatedHandleGestureState:I,isInTemporaryPosition:c,keyboardBehavior:T,KEYBOARD_BEHAVIOR:O,Platform:N,android_keyboardInputMode:h,animatedPosition:E,didAnimateOnMount:P,_providedIndex:D,animatedAnimationState:f,ANIMATION_STATUS:C},U.__workletHash=0xcff0cb95fc1,U.__initData=t,U})({_worklet_14289569669057_init_data:k,animatedCurrentIndex:zt,animatedDetentsState:jt,animatedKeyboardState:ie,ANIMATION_SOURCE:l.ANIMATION_SOURCE,keyboardBlurBehavior:ct,KEYBOARD_BLUR_BEHAVIOR:l.KEYBOARD_BLUR_BEHAVIOR,KEYBOARD_STATUS:l.KEYBOARD_STATUS,animatedContentGestureState:ee,State:u.State,animatedHandleGestureState:ne,isInTemporaryPosition:Qt,keyboardBehavior:It,KEYBOARD_BEHAVIOR:l.KEYBOARD_BEHAVIOR,Platform:s.default,android_keyboardInputMode:Tt,animatedPosition:$t,didAnimateOnMount:Zt,_providedIndex:Q,animatedAnimationState:de,ANIMATION_STATUS:l.ANIMATION_STATUS}),[ee,zt,ne,de,ie,$t,jt,Qt,Zt,It,ct,Q,Tt]),Pe=(0,n.useCallback)((function({_worklet_11430790997000_init_data:t,animatedAnimationState:e,animatedDetentsState:n,ANIMATION_SOURCE:o,isLayoutCalculated:s,getEvaluatedPosition:_,didAnimateOnMount:u,ANIMATION_STATUS:A,animateOnMount:S,animateToPosition:l,setToPosition:I,INITIAL_VALUE:c,isInTemporaryPosition:T,animatedCurrentIndex:O,reduceMotion:N,animatedIndex:h,animatedPosition:E,animatedContainerHeightDidChange:P}){const D=function(t,D){const{status:f,nextIndex:C,isForcedClosing:U}=e.get(),{detents:R,closedDetentPosition:x}=n.get();if(void 0===R||0===R.length||void 0===x)return;if(U&&t!==o.USER)return;if(!s.value)return;const v=_(t);if(void 0!==v)if(u.value){if(f===A.RUNNING){const e=C??c;if(-1===e&&!T.value)return void I(x);if(e!==O.value)return void l(R[e],t,void 0,D)}if(f===A.RUNNING||-1!==O.value)P.value?I(v):l(v,t,void 0,D);else{if(N&&R[h.value]!==E.value)return;I(x)}}else{if(f===A.RUNNING&&(U||-1===C))return;S?l(v,o.MOUNT,void 0,D):(I(v),u.value=!0)}};return D.__closure={animatedAnimationState:e,animatedDetentsState:n,ANIMATION_SOURCE:o,isLayoutCalculated:s,getEvaluatedPosition:_,didAnimateOnMount:u,ANIMATION_STATUS:A,animateOnMount:S,animateToPosition:l,setToPosition:I,INITIAL_VALUE:c,isInTemporaryPosition:T,animatedCurrentIndex:O,reduceMotion:N,animatedIndex:h,animatedPosition:E,animatedContainerHeightDidChange:P},D.__workletHash=0xa65703ca408,D.__initData=t,D})({_worklet_11430790997000_init_data:K,animatedAnimationState:de,animatedDetentsState:jt,ANIMATION_SOURCE:l.ANIMATION_SOURCE,isLayoutCalculated:qt,getEvaluatedPosition:ge,didAnimateOnMount:Zt,ANIMATION_STATUS:l.ANIMATION_STATUS,animateOnMount:et,animateToPosition:he,setToPosition:Ee,INITIAL_VALUE:C.INITIAL_VALUE,isInTemporaryPosition:Qt,animatedCurrentIndex:zt,reduceMotion:se,animatedIndex:le,animatedPosition:$t,animatedContainerHeightDidChange:te}),[ge,he,Ee,se,et,de,te,zt,le,$t,jt,Zt,Qt,qt]),De=(0,c.useStableCallback)(function(t,n){const{detents:o}=jt.get(),s=qt.get();if(void 0===o||0===o.length)return;if(!s)return;(0,e.default)(t>=-1&&t<=o.length-1,"'index' was provided but out of the provided snap points range! expected value to be between -1, "+(o.length-1));const _=o[t],{nextPosition:u,nextIndex:S,isForcedClosing:I}=de.get();qt.value&&t!==S&&_!==u&&!I&&(Qt.value=!1,(0,A.runOnUI)(he)(_,l.ANIMATION_SOURCE.USER,0,n))}),fe=(0,n.useCallback)((function({_worklet_11461861112613_init_data:t,__DEV__:e,print:n,animatedLayoutState:o,normalizeSnapPoint:s,animatedAnimationState:_,isLayoutCalculated:u,isInTemporaryPosition:A,runOnUI:S,animateToPosition:l,ANIMATION_SOURCE:I}){const c=function(t,c){e&&n({component:'BottomSheet',method:'handleSnapToPosition',params:{position:t}});const{containerHeight:T}=o.get(),O=s(t,T),{nextPosition:N,isForcedClosing:h}=_.get();u&&O!==N&&!h&&(A.value=!0,S(l)(O,I.USER,0,c))};return c.__closure={__DEV__:e,print:n,animatedLayoutState:o,normalizeSnapPoint:s,animatedAnimationState:_,isLayoutCalculated:u,isInTemporaryPosition:A,runOnUI:S,animateToPosition:l,ANIMATION_SOURCE:I},c.__workletHash=0xa6cac28fb25,c.__initData=t,c})({_worklet_11461861112613_init_data:V,__DEV__:!1,print:T.print,animatedLayoutState:Wt,normalizeSnapPoint:T.normalizeSnapPoint,animatedAnimationState:de,isLayoutCalculated:qt,isInTemporaryPosition:Qt,runOnUI:A.runOnUI,animateToPosition:he,ANIMATION_SOURCE:l.ANIMATION_SOURCE}),[he,Qt,qt,Wt,de]),Ce=(0,n.useCallback)(function(t){const e=jt.get().closedDetentPosition;if(void 0===e)return;const n=e,{nextPosition:o,isForcedClosing:s}=de.get();qt.value&&n!==o&&!s&&(Qt.value=!1,(0,A.runOnUI)(he)(n,l.ANIMATION_SOURCE.USER,0,t))},[he,qt,Qt,jt,de]),Ue=(0,n.useCallback)(function(t){const e=jt.get().closedDetentPosition;if(void 0===e)return;const n=e,{nextPosition:o,isForcedClosing:s}=de.get();n===o||s||(Qt.value=!1,de.set((function({_worklet_11886015550520_init_data:t}){const e=function(t){return Object.assign({},t,{isForcedClosing:!0})};return e.__closure={},e.__workletHash=0xacf6dbc1438,e.__initData=t,e})({_worklet_11886015550520_init_data:Y})),(0,A.runOnUI)(he)(n,l.ANIMATION_SOURCE.USER,0,t))},[he,Qt,jt,de]),Re=(0,n.useCallback)(function(t){const{detents:e}=jt.get();if(void 0===e||0===e.length)return;const n=e.length-1,o=e[n],{nextPosition:s,nextIndex:_,isForcedClosing:u}=de.get();qt.value&&n!==_&&o!==s&&!u&&(Qt.value=!1,(0,A.runOnUI)(he)(o,l.ANIMATION_SOURCE.USER,0,t))},[he,Qt,qt,jt,de]),xe=(0,n.useCallback)(function(t){const{detents:e}=jt.get();if(void 0===e||0===e.length)return;const n=e[0],{nextPosition:o,nextIndex:s,isForcedClosing:_}=de.get();qt&&0!==s&&n!==o&&!_&&(Qt.value=!1,(0,A.runOnUI)(he)(n,l.ANIMATION_SOURCE.USER,0,t))},[he,qt,Qt,jt,de]);(0,n.useImperativeHandle)(S,()=>({snapToIndex:De,snapToPosition:fe,expand:Re,collapse:xe,close:Ce,forceClose:Ue}));const ve=(0,n.useMemo)(()=>({textInputNodesRef:ae,enableContentPanningGesture:nt,enableDynamicSizing:st,overDragResistanceFactor:dt,enableOverDrag:at,enablePanDownToClose:ot,animatedAnimationState:de,animatedSheetState:re,animatedScrollableState:ue,animatedScrollableStatus:Ae,animatedContentGestureState:ee,animatedHandleGestureState:ne,animatedKeyboardState:ie,animatedLayoutState:Wt,animatedIndex:le,animatedPosition:$t,animatedSheetHeight:Xt,animatedDetentsState:jt,isInTemporaryPosition:Qt,simultaneousHandlers:Ut,waitFor:Rt,activeOffsetX:xt,activeOffsetY:vt,failOffsetX:pt,failOffsetY:Bt,enableBlurKeyboardOnGesture:Ot,animateToPosition:he,stopAnimation:Oe,setScrollableRef:me,removeScrollableRef:Se}),[ae,le,$t,Xt,Wt,ee,ne,de,ie,re,ue,Ae,jt,Qt,nt,dt,at,ot,st,Ot,Ut,Rt,xt,vt,pt,Bt,me,Se,he,Oe]),pe=(0,n.useMemo)(()=>({animatedIndex:le,animatedPosition:$t,snapToIndex:De,snapToPosition:fe,expand:Re,collapse:xe,close:Ce,forceClose:Ue}),[le,$t,De,fe,Re,xe,Ce,Ue]);return(0,A.useAnimatedReaction)((function({_worklet_3740846712338_init_data:t,animatedLayoutState:e}){const n=()=>e.get().containerHeight;return n.__closure={animatedLayoutState:e},n.__workletHash=3740846712338,n.__initData=t,n})({_worklet_3740846712338_init_data:w,animatedLayoutState:Wt}),(function({_worklet_7305691804640_init_data:t,INITIAL_LAYOUT_VALUE:e,animatedContainerHeightDidChange:n,animatedDetentsState:o,animatedAnimationState:s,ANIMATION_STATUS:_,ANIMATION_SOURCE:u,animateToPosition:A}){const S=function(t,S){if(t===e)return;n.value=t!==S;const{closedDetentPosition:l}=o.get();if(void 0===l)return;const{status:I,source:c,nextIndex:T}=s.get();I===_.RUNNING&&c===u.GESTURE&&-1===T&&A(l,u.GESTURE)};return S.__closure={INITIAL_LAYOUT_VALUE:e,animatedContainerHeightDidChange:n,animatedDetentsState:o,animatedAnimationState:s,ANIMATION_STATUS:_,ANIMATION_SOURCE:u,animateToPosition:A},S.__workletHash=7305691804640,S.__initData=t,S})({_worklet_7305691804640_init_data:G,INITIAL_LAYOUT_VALUE:l.INITIAL_LAYOUT_VALUE,animatedContainerHeightDidChange:te,animatedDetentsState:jt,animatedAnimationState:de,ANIMATION_STATUS:l.ANIMATION_STATUS,ANIMATION_SOURCE:l.ANIMATION_SOURCE,animateToPosition:he}),[te,de,jt]),(0,A.useAnimatedReaction)((function({_worklet_2047626166417_init_data:t,animatedDetentsState:e}){const n=()=>e.get().detents;return n.__closure={animatedDetentsState:e},n.__workletHash=2047626166417,n.__initData=t,n})({_worklet_2047626166417_init_data:J,animatedDetentsState:jt}),(function({_worklet_2736065060575_init_data:t,didAnimateOnMount:e,isLayoutCalculated:n,__DEV__:o,runOnJS:s,print:_,evaluatePosition:u,ANIMATION_SOURCE:A}){const S=function(t,S){JSON.stringify(t)===JSON.stringify(S)&&e.value||n.value&&(o&&s(_)({component:'BottomSheet',method:'useAnimatedReaction::OnSnapPointChange',category:'effect',params:{result:t}}),u(A.SNAP_POINT_CHANGE))};return S.__closure={didAnimateOnMount:e,isLayoutCalculated:n,__DEV__:o,runOnJS:s,print:_,evaluatePosition:u,ANIMATION_SOURCE:A},S.__workletHash=2736065060575,S.__initData=t,S})({_worklet_2736065060575_init_data:F,didAnimateOnMount:Zt,isLayoutCalculated:qt,__DEV__:!1,runOnJS:A.runOnJS,print:T.print,evaluatePosition:Pe,ANIMATION_SOURCE:l.ANIMATION_SOURCE}),[qt,Zt,jt]),(0,A.useAnimatedReaction)((function({_worklet_3372124159444_init_data:t,animatedKeyboardState:e}){const n=()=>e.get().status+e.get().height;return n.__closure={animatedKeyboardState:e},n.__workletHash=3372124159444,n.__initData=t,n})({_worklet_3372124159444_init_data:W,animatedKeyboardState:ie}),(function({_worklet_784372441099_init_data:t,animatedKeyboardState:e,KEYBOARD_STATUS:n,animatedAnimationState:o,ANIMATION_STATUS:s,ANIMATION_SOURCE:_,animatedLayoutState:u,$modal:A,bottomInset:S,__DEV__:l,runOnJS:I,print:c,Platform:T,android_keyboardInputMode:O,KEYBOARD_INPUT_MODE:N,keyboardBehavior:h,KEYBOARD_BEHAVIOR:E,animatedContentGestureState:P,State:D,animatedHandleGestureState:f,keyboardBlurBehavior:C,KEYBOARD_BLUR_BEHAVIOR:U,getKeyboardAnimationConfigs:R,evaluatePosition:x}){const v=function(t,T){if(t===T)return;const{status:O,height:N,easing:h,duration:E,target:v}=e.get();if(O===n.UNDETERMINED)return;const{status:p,source:B}=o.get();if(O===n.HIDDEN&&p===s.RUNNING&&B===_.GESTURE)return;const M=u.get().containerOffset;let y=0===N?0:A?Math.abs(N-Math.abs(S-M.bottom)):Math.abs(N-M.bottom);l&&I(c)({component:'BottomSheet',method:'useAnimatedReaction::OnKeyboardStateChange',category:'effect',params:{status:O,height:N,heightWithinContainer:y,containerOffset:M}}),e.set(t=>Object.assign({},t,{heightWithinContainer:y}));if(P.value===D.ACTIVE||P.value===D.BEGAN||f.value===D.ACTIVE||f.value===D.BEGAN)return;if(O===n.HIDDEN&&C===U.none)return;const H=R(h,E);x(_.KEYBOARD,H)};return v.__closure={animatedKeyboardState:e,KEYBOARD_STATUS:n,animatedAnimationState:o,ANIMATION_STATUS:s,ANIMATION_SOURCE:_,animatedLayoutState:u,$modal:A,bottomInset:S,__DEV__:l,runOnJS:I,print:c,Platform:T,android_keyboardInputMode:O,KEYBOARD_INPUT_MODE:N,keyboardBehavior:h,KEYBOARD_BEHAVIOR:E,animatedContentGestureState:P,State:D,animatedHandleGestureState:f,keyboardBlurBehavior:C,KEYBOARD_BLUR_BEHAVIOR:U,getKeyboardAnimationConfigs:R,evaluatePosition:x},v.__workletHash=784372441099,v.__initData=t,v})({_worklet_784372441099_init_data:j,animatedKeyboardState:ie,KEYBOARD_STATUS:l.KEYBOARD_STATUS,animatedAnimationState:de,ANIMATION_STATUS:l.ANIMATION_STATUS,ANIMATION_SOURCE:l.ANIMATION_SOURCE,animatedLayoutState:Wt,$modal:bt,bottomInset:Et,__DEV__:!1,runOnJS:A.runOnJS,print:T.print,Platform:s.default,android_keyboardInputMode:Tt,KEYBOARD_INPUT_MODE:l.KEYBOARD_INPUT_MODE,keyboardBehavior:It,KEYBOARD_BEHAVIOR:l.KEYBOARD_BEHAVIOR,animatedContentGestureState:ee,State:u.State,animatedHandleGestureState:ne,keyboardBlurBehavior:ct,KEYBOARD_BLUR_BEHAVIOR:l.KEYBOARD_BLUR_BEHAVIOR,getKeyboardAnimationConfigs:T.getKeyboardAnimationConfigs,evaluatePosition:Pe}),[bt,Et,It,ct,Tt,ie,Wt,ge]),(0,A.useAnimatedReaction)((function({_worklet_150016498047_init_data:t,animatedPosition:e}){const n=()=>e.value;return n.__closure={animatedPosition:e},n.__workletHash=150016498047,n.__initData=t,n})({_worklet_150016498047_init_data:X,animatedPosition:$t}),(function({_worklet_14307923316202_init_data:t,_providedAnimatedPosition:e,topInset:n}){const o=function(t){e&&(e.value=t+n)};return o.__closure={_providedAnimatedPosition:e,topInset:n},o.__workletHash=0xd0352afcdea,o.__initData=t,o})({_worklet_14307923316202_init_data:z,_providedAnimatedPosition:ft,topInset:ht}),[ft,ht]),(0,A.useAnimatedReaction)((function({_worklet_1413329246429_init_data:t,animatedIndex:e}){const n=()=>e.value;return n.__closure={animatedIndex:e},n.__workletHash=1413329246429,n.__initData=t,n})({_worklet_1413329246429_init_data:$,animatedIndex:le}),(function({_worklet_11790345600748_init_data:t,_providedAnimatedIndex:e}){const n=function(t){e&&(e.value=t)};return n.__closure={_providedAnimatedIndex:e},n.__workletHash=0xab9275c7eec,n.__initData=t,n})({_worklet_11790345600748_init_data:Z,_providedAnimatedIndex:Ct}),[Ct]),(0,n.useEffect)(()=>{et&&!Zt.value||De(Q)},[et,Q,Zt,De]),(0,U.jsx)(I.BottomSheetProvider,{value:pe,children:(0,U.jsx)(I.BottomSheetInternalProvider,{value:ve,children:(0,U.jsxs)(h.default,{gestureEventsHandlersHook:lt,children:[Kt?(0,U.jsx)(Kt,{animatedIndex:le,animatedPosition:$t,style:_.default.absoluteFill}):null,(0,U.jsx)(P.BottomSheetHostingContainer,{shouldCalculateHeight:!bt,layoutState:Wt,containerLayoutState:Nt,topInset:ht,bottomInset:Et,detached:Lt,style:ut,children:(0,U.jsxs)(D.BottomSheetBody,{style:_t,children:[null===Vt?null:(0,U.jsx)(O.BottomSheetBackgroundContainer,{animatedIndex:le,animatedPosition:$t,backgroundComponent:Vt,backgroundStyle:At},"BottomSheetBackgroundContainer"),(0,U.jsxs)(f.BottomSheetContent,{pointerEvents:"box-none",accessible:Gt??void 0,accessibilityRole:Ft??void 0,accessibilityLabel:Jt??void 0,keyboardBehavior:It,detached:Lt,children:[wt,Yt?(0,U.jsx)(N.BottomSheetFooterContainer,{footerComponent:Yt}):null]}),null!==kt?(0,U.jsx)(E.BottomSheetHandleContainer,{animatedIndex:le,animatedPosition:$t,enableHandlePanningGesture:it,enableOverDrag:at,enablePanDownToClose:ot,overDragResistanceFactor:dt,keyboardBehavior:It,handleComponent:kt,handleStyle:mt,handleIndicatorStyle:St},"BottomSheetHandleContainer"):null]})},"BottomSheetContainer")]})})})}),Q=(0,n.memo)(q);Q.displayName='BottomSheet';var tt=Q},2481,[42,36,183,25,59,2482,2570,2929,2930,2936,2942,2966,2970,2974,2976,2981,2984,2986,2961,279]);
@@ -15057,7 +15057,7 @@ __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{v
15057
15057
  __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"decodeOfferFragmentPayload",{enumerable:!0,get:function(){return n.decodeOfferFragmentPayload}}),Object.defineProperty(e,"buildDaemonWebSocketUrl",{enumerable:!0,get:function(){return t.buildDaemonWebSocketUrl}}),Object.defineProperty(e,"deriveLabelFromEndpoint",{enumerable:!0,get:function(){return t.deriveLabelFromEndpoint}}),Object.defineProperty(e,"extractHostPortFromWebSocketUrl",{enumerable:!0,get:function(){return t.extractHostPortFromWebSocketUrl}}),Object.defineProperty(e,"normalizeHostPort",{enumerable:!0,get:function(){return t.normalizeHostPort}}),Object.defineProperty(e,"parseConnectionUri",{enumerable:!0,get:function(){return t.parseConnectionUri}}),Object.defineProperty(e,"parseHostPort",{enumerable:!0,get:function(){return t.parseHostPort}}),Object.defineProperty(e,"serializeConnectionUri",{enumerable:!0,get:function(){return t.serializeConnectionUri}}),Object.defineProperty(e,"serializeConnectionUriForStorage",{enumerable:!0,get:function(){return t.serializeConnectionUriForStorage}}),Object.defineProperty(e,"shouldUseTlsForDefaultHostedRelay",{enumerable:!0,get:function(){return t.shouldUseTlsForDefaultHostedRelay}}),e.buildRelayWebSocketUrl=function(n){return(0,t.buildRelayWebSocketUrl)(Object.assign({},n,{role:"client"}))};var t=r(d[0]),n=r(d[1])},3412,[3392,3413]);
15058
15058
  __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"ConnectionOfferV2Schema",{enumerable:!0,get:function(){return t}}),Object.defineProperty(e,"ConnectionOfferSchema",{enumerable:!0,get:function(){return o}}),e.decodeOfferFragmentPayload=l,e.parseConnectionOfferFromUrl=function(n){const t=f(n);if(!t)return null;const c=l(t);return o.parse(c)};var n=r(d[0]);const t=n.z.object({v:n.z.literal(2),serverId:n.z.string().min(1),daemonPublicKeyB64:n.z.string().min(1),relay:n.z.object({endpoint:n.z.string().min(1),useTls:n.z.boolean().optional()})}),o=t;function c(n){const t=n.replace(/-/g,"+").replace(/_/g,"/"),o=t.padEnd(t.length+(4-t.length%4)%4,"="),c=globalThis.atob(o),l=Uint8Array.from(c,n=>n.charCodeAt(0));return new TextDecoder("utf-8",{fatal:!0}).decode(l)}function l(n){const t=c(n);return JSON.parse(t)}const u="#offer=";function f(n){const t=n.trim();if(!t)return null;const o=t.indexOf(u);if(-1===o)return null;const c=t.slice(o+u.length).trim();return c.length>0?c:null}},3413,[3285]);
15059
15059
  __d(function(g,r,i,a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),_e.resolveAppVersion=function(){const e=u(t.default?.version);if(e)return e;const o=u(n.default.expoConfig?.version);if(o)return o;const f=u(n.default.manifest?.version);if(f)return f;return null};var n=e(r(d[0])),t=e(r(d[1]));function u(e){if("string"!=typeof e)return null;const n=e.trim();return 0===n.length?null:n}},3414,[718,3415]);
15060
- __d(function(e,t,r,a,i,o,n){i.exports={name:"@hyperdrive.bot/fleet-app",version:"0.3.123",private:!0,main:"index.ts",scripts:{start:"npm run start:expo","start:expo":"cross-env APP_VARIANT=development expo start","reset-project":"node ./scripts/reset-project.js","build:terminal-webview":"node ./scripts/build-terminal-webview-html.mjs","eas-build-post-install":"npm --prefix ../.. run build:app-deps && npm run build:terminal-webview",android:"npm run android:development","android:development":"npm --prefix ../.. run build:client && cross-env APP_VARIANT=development expo prebuild --platform android --non-interactive && cross-env APP_VARIANT=development expo run:android --variant=debug","android:production":"npm --prefix ../.. run build:client && cross-env APP_VARIANT=production expo prebuild --platform android --non-interactive && cross-env APP_VARIANT=production expo run:android --variant=release","android:release":"npm run android:production","android:clear":"node -e \"require('node:fs').rmSync('android', { recursive: true, force: true })\"",ios:"npm --prefix ../.. run build:client && expo run:ios","ios:release":"npm --prefix ../.. run build:client && expo run:ios --configuration Release",web:"npm --prefix ../.. run build:client && concurrently --kill-others --names protocol,client,expo --prefix-colors yellow,blue,magenta \"npm --prefix ../.. run watch:protocol\" \"npm --prefix ../.. run watch:client\" \"npm run web:expo\"","web:expo":"expo start --web",lint:"expo lint",typecheck:"tsgo --noEmit",test:"vitest run","test:browser":"vitest run --project browser","test:e2e":"playwright test --project='Desktop Chrome'","test:e2e:real":"cross-env E2E_FORK_PASEO_HOME_FROM=../../.dev/paseo-home playwright test --project=real-provider","test:e2e:ui":"playwright test --ui","test:coverage":"vitest run --project unit --coverage",build:"npm run build:web","build:web":"npm --prefix ../.. run build:app-deps && expo export --platform web --source-maps","profile:workspace-tabs":"node ./scripts/profile-workspace-tabs.mjs","deploy:web":"npm run build:web && wrangler pages deploy dist --project-name paseo-app --branch main"},dependencies:{"@bacons/apple-targets":"4.0.6","@datadog/browser-rum":"^6.23.0","@datadog/browser-rum-react":"^6.23.0","@datadog/mobile-react-native":"^2.7.0","@datadog/mobile-react-native-session-replay":"^2.14.8","@dnd-kit/core":"^6.3.1","@dnd-kit/sortable":"^10.0.0","@dnd-kit/utilities":"^3.2.2","@expo/image-utils":"0.8.8","@expo/plist":"0.4.9","@expo/prebuild-config":"54.0.8","@floating-ui/react-native":"^0.10.7","@gorhom/bottom-sheet":"^5.2.14","@gorhom/portal":"^1.0.14","@hyperdrive.bot/fleet-client":"*","@hyperdrive.bot/fleet-expo-two-way-audio":"*","@hyperdrive.bot/fleet-extension-sdk":"*","@hyperdrive.bot/fleet-highlight":"*","@react-native-async-storage/async-storage":"2.2.0","@react-native-masked-view/masked-view":"^0.3.2","@react-native/normalize-colors":"^0.81.5","@react-navigation/native":"^7.1.8","@sentry/electron":"^6.11.0","@sentry/react-native":"^6.20.0","@tanstack/react-query":"^5.90.11","@tanstack/react-virtual":"^3.13.21","@xterm/addon-clipboard":"^0.3.0-beta.213","@xterm/addon-fit":"^0.12.0-beta.213","@xterm/addon-image":"^0.10.0-beta.213","@xterm/addon-ligatures":"0.11.0-beta.213","@xterm/addon-search":"^0.17.0-beta.213","@xterm/addon-unicode11":"^0.10.0-beta.213","@xterm/addon-web-links":"^0.13.0-beta.213","@xterm/addon-webgl":"^0.20.0-beta.212","@xterm/xterm":"^6.1.0-beta.213",buffer:"^6.0.3",expo:"^54.0.18","expo-asset":"~12.0.12","expo-audio":"~1.0.13","expo-background-fetch":"~14.0.9","expo-build-properties":"^1.0.9","expo-camera":"~17.0.10","expo-clipboard":"~8.0.7","expo-constants":"~18.0.9","expo-crypto":"^15.0.8","expo-dev-client":"^6.0.15","expo-document-picker":"~14.0.8","expo-file-system":"~19.0.17","expo-haptics":"~15.0.7","expo-image":"~3.0.10","expo-image-manipulator":"~14.0.8","expo-image-picker":"^17.0.8","expo-keep-awake":"^15.0.7","expo-linking":"~8.0.8","expo-localization":"~17.0.9","expo-notifications":"^0.32.16","expo-router":"~6.0.13","expo-sharing":"^14.0.8","expo-speech":"~14.0.8","expo-speech-recognition":"^56.0.1","expo-splash-screen":"~31.0.10","expo-system-ui":"~6.0.7","expo-task-manager":"~14.0.9","expo-video":"~3.0.16","fast-deep-equal":"^3.1.3",htmlparser2:"^12.0.0",i18next:"^26.3.0","lucide-react-native":"^0.546.0","markdown-it":"^10.0.0","mnemonic-id":"^3.2.7",qrcode:"^1.5.4",react:"19.1.0","react-dom":"19.1.0","react-i18next":"^17.0.8","react-native":"0.81.5","react-native-draggable-flatlist":"^4.0.3","react-native-edge-to-edge":"^1.7.0","react-native-gesture-handler":"~2.28.0","react-native-keyboard-controller":"^1.21.7","react-native-markdown-display":"^7.0.2","react-native-nitro-modules":"0.35.5","react-native-reanimated":"~4.3.1","react-native-safe-area-context":"~5.6.0","react-native-screens":"~4.16.0","react-native-svg":"^15.14.0","react-native-uitextview":"^2.2.0","react-native-unistyles":"^3.2.4","react-native-web":"~0.21.0","react-native-webview":"^13.16.0","react-native-worklets":"~0.8.3","tiny-invariant":"^1.3.3","use-sync-external-store":"^1.6.0",zod:"^4.4.3",zustand:"^5.0.9"},devDependencies:{"@playwright/test":"^1.56.1","@testing-library/dom":"^10.4.1","@testing-library/react":"^16.3.2","@types/chai":"^5.2.2","@types/markdown-it":"^14.1.2","@types/qrcode":"^1.5.6","@types/react":"~19.2.0","@types/ws":"^8.18.1","@vitest/browser":"^4.1.7","@vitest/browser-playwright":"^4.1.7","@vitest/coverage-v8":"^4.1.7","@xterm/headless":"^6.1.0-beta.213",dotenv:"^17.2.3",eslint:"^9.25.0","eslint-config-expo":"~10.0.0",jsdom:"^20.0.3","material-icon-theme":"^5.32.0",playwright:"^1.56.1","serve-sim":"^0.1.40",typescript:"~5.9.2",vitest:"^4.1.6",wrangler:"^4.105.0",ws:"^8.20.0"}}},3415,[]);
15060
+ __d(function(e,t,r,a,i,o,n){i.exports={name:"@hyperdrive.bot/fleet-app",version:"0.3.125",private:!0,main:"index.ts",scripts:{start:"npm run start:expo","start:expo":"cross-env APP_VARIANT=development expo start","reset-project":"node ./scripts/reset-project.js","build:terminal-webview":"node ./scripts/build-terminal-webview-html.mjs","eas-build-post-install":"npm --prefix ../.. run build:app-deps && npm run build:terminal-webview",android:"npm run android:development","android:development":"npm --prefix ../.. run build:client && cross-env APP_VARIANT=development expo prebuild --platform android --non-interactive && cross-env APP_VARIANT=development expo run:android --variant=debug","android:production":"npm --prefix ../.. run build:client && cross-env APP_VARIANT=production expo prebuild --platform android --non-interactive && cross-env APP_VARIANT=production expo run:android --variant=release","android:release":"npm run android:production","android:clear":"node -e \"require('node:fs').rmSync('android', { recursive: true, force: true })\"",ios:"npm --prefix ../.. run build:client && expo run:ios","ios:release":"npm --prefix ../.. run build:client && expo run:ios --configuration Release",web:"npm --prefix ../.. run build:client && concurrently --kill-others --names protocol,client,expo --prefix-colors yellow,blue,magenta \"npm --prefix ../.. run watch:protocol\" \"npm --prefix ../.. run watch:client\" \"npm run web:expo\"","web:expo":"expo start --web",lint:"expo lint",typecheck:"tsgo --noEmit",test:"vitest run","test:browser":"vitest run --project browser","test:e2e":"playwright test --project='Desktop Chrome'","test:e2e:real":"cross-env E2E_FORK_PASEO_HOME_FROM=../../.dev/paseo-home playwright test --project=real-provider","test:e2e:ui":"playwright test --ui","test:coverage":"vitest run --project unit --coverage",build:"npm run build:web","build:web":"npm --prefix ../.. run build:app-deps && expo export --platform web --source-maps","profile:workspace-tabs":"node ./scripts/profile-workspace-tabs.mjs","deploy:web":"npm run build:web && wrangler pages deploy dist --project-name paseo-app --branch main"},dependencies:{"@bacons/apple-targets":"4.0.6","@datadog/browser-rum":"^6.23.0","@datadog/browser-rum-react":"^6.23.0","@datadog/mobile-react-native":"^2.7.0","@datadog/mobile-react-native-session-replay":"^2.14.8","@dnd-kit/core":"^6.3.1","@dnd-kit/sortable":"^10.0.0","@dnd-kit/utilities":"^3.2.2","@expo/image-utils":"0.8.8","@expo/plist":"0.4.9","@expo/prebuild-config":"54.0.8","@floating-ui/react-native":"^0.10.7","@gorhom/bottom-sheet":"^5.2.14","@gorhom/portal":"^1.0.14","@hyperdrive.bot/fleet-client":"*","@hyperdrive.bot/fleet-expo-two-way-audio":"*","@hyperdrive.bot/fleet-extension-sdk":"*","@hyperdrive.bot/fleet-highlight":"*","@react-native-async-storage/async-storage":"2.2.0","@react-native-masked-view/masked-view":"^0.3.2","@react-native/normalize-colors":"^0.81.5","@react-navigation/native":"^7.1.8","@sentry/electron":"^6.11.0","@sentry/react-native":"^6.20.0","@tanstack/react-query":"^5.90.11","@tanstack/react-virtual":"^3.13.21","@xterm/addon-clipboard":"^0.3.0-beta.213","@xterm/addon-fit":"^0.12.0-beta.213","@xterm/addon-image":"^0.10.0-beta.213","@xterm/addon-ligatures":"0.11.0-beta.213","@xterm/addon-search":"^0.17.0-beta.213","@xterm/addon-unicode11":"^0.10.0-beta.213","@xterm/addon-web-links":"^0.13.0-beta.213","@xterm/addon-webgl":"^0.20.0-beta.212","@xterm/xterm":"^6.1.0-beta.213",buffer:"^6.0.3",expo:"^54.0.18","expo-asset":"~12.0.12","expo-audio":"~1.0.13","expo-background-fetch":"~14.0.9","expo-build-properties":"^1.0.9","expo-camera":"~17.0.10","expo-clipboard":"~8.0.7","expo-constants":"~18.0.9","expo-crypto":"^15.0.8","expo-dev-client":"^6.0.15","expo-document-picker":"~14.0.8","expo-file-system":"~19.0.17","expo-haptics":"~15.0.7","expo-image":"~3.0.10","expo-image-manipulator":"~14.0.8","expo-image-picker":"^17.0.8","expo-keep-awake":"^15.0.7","expo-linking":"~8.0.8","expo-localization":"~17.0.9","expo-notifications":"^0.32.16","expo-router":"~6.0.13","expo-sharing":"^14.0.8","expo-speech":"~14.0.8","expo-speech-recognition":"^56.0.1","expo-splash-screen":"~31.0.10","expo-system-ui":"~6.0.7","expo-task-manager":"~14.0.9","expo-video":"~3.0.16","fast-deep-equal":"^3.1.3",htmlparser2:"^12.0.0",i18next:"^26.3.0","lucide-react-native":"^0.546.0","markdown-it":"^10.0.0","mnemonic-id":"^3.2.7",qrcode:"^1.5.4",react:"19.1.0","react-dom":"19.1.0","react-i18next":"^17.0.8","react-native":"0.81.5","react-native-draggable-flatlist":"^4.0.3","react-native-edge-to-edge":"^1.7.0","react-native-gesture-handler":"~2.28.0","react-native-keyboard-controller":"^1.21.7","react-native-markdown-display":"^7.0.2","react-native-nitro-modules":"0.35.5","react-native-reanimated":"~4.3.1","react-native-safe-area-context":"~5.6.0","react-native-screens":"~4.16.0","react-native-svg":"^15.14.0","react-native-uitextview":"^2.2.0","react-native-unistyles":"^3.2.4","react-native-web":"~0.21.0","react-native-webview":"^13.16.0","react-native-worklets":"~0.8.3","tiny-invariant":"^1.3.3","use-sync-external-store":"^1.6.0",zod:"^4.4.3",zustand:"^5.0.9"},devDependencies:{"@playwright/test":"^1.56.1","@testing-library/dom":"^10.4.1","@testing-library/react":"^16.3.2","@types/chai":"^5.2.2","@types/markdown-it":"^14.1.2","@types/qrcode":"^1.5.6","@types/react":"~19.2.0","@types/ws":"^8.18.1","@vitest/browser":"^4.1.7","@vitest/browser-playwright":"^4.1.7","@vitest/coverage-v8":"^4.1.7","@xterm/headless":"^6.1.0-beta.213",dotenv:"^17.2.3",eslint:"^9.25.0","eslint-config-expo":"~10.0.0",jsdom:"^20.0.3","material-icon-theme":"^5.32.0",playwright:"^1.56.1","serve-sim":"^0.1.40",typescript:"~5.9.2",vitest:"^4.1.6",wrangler:"^4.105.0",ws:"^8.20.0"}}},3415,[]);
15061
15061
  __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.shouldUseDesktopDaemon=function(){return(0,n.isElectronRuntime)()},e.getDesktopDaemonStatus=async function(){return c(await(0,t.invokeDesktopCommand)("desktop_daemon_status"))},e.startDesktopDaemon=async function(){return c(await(0,t.invokeDesktopCommand)("start_desktop_daemon"))},e.stopDesktopDaemon=async function(n="manual_ipc"){return c(await(0,t.invokeDesktopCommand)("stop_desktop_daemon",{reason:n}))},e.restartDesktopDaemon=async function(){return c(await(0,t.invokeDesktopCommand)("restart_desktop_daemon"))},e.getDesktopDaemonLogs=async function(){return p(await(0,t.invokeDesktopCommand)("desktop_daemon_logs"))},e.getDesktopDaemonPairing=async function(){return k(await(0,t.invokeDesktopCommand)("desktop_daemon_pairing"))},e.getCliDaemonStatus=async function(){const n=await(0,t.invokeDesktopCommand)("cli_daemon_status");if("string"!=typeof n)throw new Error("Unexpected CLI daemon status response.");return n},e.listenToLocalTransportEvents=async function(t){const u=(0,n.getDesktopHost)()?.events?.on;if("function"!=typeof u)throw new Error("Desktop events API is unavailable.");const c=await u("local-daemon-transport-event",n=>{o(n)&&t({sessionId:s(n.sessionId)??"",kind:s(n.kind)??"error",text:s(n.text),binaryBase64:s(n.binaryBase64),code:l(n.code),reason:s(n.reason),error:s(n.error)})});return"function"==typeof c?c:()=>{}},e.openLocalTransportSession=async function(n){const o=await(0,t.invokeDesktopCommand)("open_local_daemon_transport",n);if("string"!=typeof o||0===o.trim().length)throw new Error("Unexpected local transport session response.");return o},e.sendLocalTransportMessage=async function(n){await(0,t.invokeDesktopCommand)("send_local_daemon_transport_message",Object.assign({sessionId:n.sessionId},n.text?{text:n.text}:{},n.binaryBase64?{binaryBase64:n.binaryBase64}:{}))},e.closeLocalTransportSession=async function(n){await(0,t.invokeDesktopCommand)("close_local_daemon_transport",{sessionId:n})},e.getCliInstallStatus=async function(){return f(await(0,t.invokeDesktopCommand)("get_cli_install_status"))},e.installCli=async function(){return f(await(0,t.invokeDesktopCommand)("install_cli"))},e.getSkillsStatus=async function(){return y(await(0,t.invokeDesktopCommand)("get_skills_status"))},e.installSkills=async function(){return y(await(0,t.invokeDesktopCommand)("install_skills"))},e.updateSkills=async function(){return y(await(0,t.invokeDesktopCommand)("update_skills"))},e.uninstallSkills=async function(){return y(await(0,t.invokeDesktopCommand)("uninstall_skills"))};var n=r(d[0]),t=r(d[1]);function o(n){return"object"==typeof n&&null!==n}function s(n){return"string"==typeof n&&n.trim().length>0?n:null}function l(n){return"number"==typeof n&&Number.isFinite(n)?n:null}function u(n){const t=s(n)?.toLowerCase();switch(t){case"starting":return"starting";case"running":return"running";case"errored":case"error":return"errored";default:return"stopped"}}function c(n){if(!o(n))throw new Error("Unexpected desktop daemon status response.");return{serverId:s(n.serverId)??"",status:u(n.status),listen:s(n.listen),hostname:s(n.hostname),pid:l(n.pid),home:s(n.home)??"",version:s(n.version),desktopManaged:!0===n.desktopManaged,error:s(n.error)}}function p(n){if(!o(n))throw new Error("Unexpected desktop daemon logs response.");return{logPath:s(n.logPath)??"",contents:"string"==typeof n.contents?n.contents:""}}function k(n){if(!o(n))throw new Error("Unexpected desktop daemon pairing response.");return{relayEnabled:!0===n.relayEnabled,url:s(n.url),qr:s(n.qr)}}function f(n){if(!o(n))throw new Error("Unexpected install status response.");return{installed:!0===n.installed}}function w(n){switch(n){case"not-installed":case"up-to-date":case"drift":return n;default:throw new Error(`Unexpected skills status state: ${String(n)}`)}}function _(n){if(!o(n))throw new Error("Unexpected skill op response.");const t=s(n.name);if(!t)throw new Error("Skill op missing name.");switch(n.kind){case"add":return{kind:"add",name:t};case"update":return{kind:"update",name:t};case"delete":return{kind:"delete",name:t};default:throw new Error(`Unexpected skill op kind: ${String(n.kind)}`)}}function y(n){if(!o(n))throw new Error("Unexpected skills status response.");const t=Array.isArray(n.ops)?n.ops.map(_):[];return{state:w(n.state),ops:t}}},3416,[3417,3419]);
15062
15062
  __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.getDesktopHost=n,e.isElectronRuntime=o,e.isElectronRuntimeMac=function(){if(!o())return!1;if("undefined"==typeof navigator)return!1;const t=n()?.platform?.toLowerCase();if("darwin"===t||"mac"===t||"macos"===t)return!0;const u=navigator.userAgent;return u.includes("Mac OS")||u.includes("Macintosh")},r(d[0]);var t=r(d[1]);function n(){return(0,t.getElectronHost)()}function o(){return null!==n()}},3417,[25,3418]);
15063
15063
  __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.getElectronHost=function(){if("undefined"==typeof window)return null;const t=window.paseoDesktop;if(!t||"object"!=typeof t)return null;return t}},3418,[]);
@@ -15078,7 +15078,7 @@ __d(function(g,r,i,a,m,e,d){"use strict";function n(n){if("string"!=typeof n)ret
15078
15078
  __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"scheduleAgentLastActivityFlush",{enumerable:!0,get:function(){return t.scheduleAgentLastActivityFlush}}),Object.defineProperty(e,"createAgentLastActivityCoalescer",{enumerable:!0,get:function(){return c.createAgentLastActivityCoalescer}});var t=r(d[0]),c=r(d[1])},3433,[3434,3435]);
15079
15079
  __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.scheduleAgentLastActivityFlush=function(n,c=t){if("function"==typeof requestAnimationFrame){const t=requestAnimationFrame(n);return{cancel:()=>{"function"==typeof cancelAnimationFrame&&cancelAnimationFrame(t)}}}const o=setTimeout(n,c);return{cancel:()=>{clearTimeout(o)}}};const t=16},3434,[]);
15080
15080
  __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.createAgentLastActivityCoalescer=function(){let n=new Map,l=null,s=null;const u=()=>{l&&(l.cancel(),l=null)},c=()=>{if(u(),0===n.size)return;const t=n;n=new Map,s?.(t)};return{setCommitter(t){s=t},enqueue(s,u){const o=n.get(s);o&&o.getTime()>=u.getTime()||(n.set(s,u),l||(l=(0,t.scheduleAgentLastActivityFlush)(()=>{l=null,c()})))},flushNow:c,deletePending(t){n.delete(t)},dispose(){u(),n.clear(),s=null}}};var t=r(d[0])},3435,[3434]);
15081
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.derivePendingPermissionKey=function(t,n){const s=n.id||("string"==typeof n.metadata?.id?n.metadata.id:void 0)||n.name||n.title||`${n.kind}:${JSON.stringify(n.input??n.metadata??{})}`;return`${t}:${s}`},e.normalizeAgentSnapshot=function(n,s){const o=new Date(n.createdAt),l=new Date(n.updatedAt),u=n.lastUserMessageAt?new Date(n.lastUserMessageAt):null,c=n.attentionTimestamp?new Date(n.attentionTimestamp):null,p=n.archivedAt?new Date(n.archivedAt):null,A=(0,t.getParentAgentIdFromLabels)(n.labels);return{serverId:s,id:n.id,provider:n.provider,status:n.status,createdAt:o,updatedAt:l,lastUserMessageAt:u,lastActivityAt:l,capabilities:n.capabilities,currentModeId:n.currentModeId,availableModes:n.availableModes??[],pendingPermissions:n.pendingPermissions??[],persistence:n.persistence??null,runtimeInfo:n.runtimeInfo,lastUsage:n.lastUsage,lastError:n.lastError??null,title:n.title??null,cwd:n.cwd,workspaceId:n.workspaceId,model:n.model??null,features:n.features,thinkingOptionId:n.thinkingOptionId??null,requiresAttention:n.requiresAttention??!1,attentionReason:n.attentionReason??null,attentionTimestamp:c,archivedAt:p,parentAgentId:A,activeBackgroundTaskCount:n.activeBackgroundTaskCount,labels:n.labels,digest:n.digest,hasSystemPrompt:n.hasSystemPrompt,allowedTools:n.allowedTools,mcpServerNames:n.mcpServerNames,nextFireAt:n.nextFireAt,hasRoutine:n.hasRoutine}};var t=r(d[0])},3436,[3437]);
15081
+ __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.derivePendingPermissionKey=function(t,n){const s=n.id||("string"==typeof n.metadata?.id?n.metadata.id:void 0)||n.name||n.title||`${n.kind}:${JSON.stringify(n.input??n.metadata??{})}`;return`${t}:${s}`},e.normalizeAgentSnapshot=function(n,s){const o=new Date(n.createdAt),l=new Date(n.updatedAt),u=n.lastUserMessageAt?new Date(n.lastUserMessageAt):null,c=n.attentionTimestamp?new Date(n.attentionTimestamp):null,p=n.archivedAt?new Date(n.archivedAt):null,A=(0,t.getParentAgentIdFromLabels)(n.labels);return{serverId:s,id:n.id,provider:n.provider,status:n.status,createdAt:o,updatedAt:l,lastUserMessageAt:u,lastActivityAt:l,capabilities:n.capabilities,currentModeId:n.currentModeId,availableModes:n.availableModes??[],pendingPermissions:n.pendingPermissions??[],persistence:n.persistence??null,runtimeInfo:n.runtimeInfo,lastUsage:n.lastUsage,lastError:n.lastError??null,title:n.title??null,cwd:n.cwd,workspaceId:n.workspaceId,model:n.model??null,features:n.features,thinkingOptionId:n.thinkingOptionId??null,requiresAttention:n.requiresAttention??!1,attentionReason:n.attentionReason??null,attentionTimestamp:c,archivedAt:p,snooze:n.snooze??null,parentAgentId:A,activeBackgroundTaskCount:n.activeBackgroundTaskCount,labels:n.labels,digest:n.digest,hasSystemPrompt:n.hasSystemPrompt,allowedTools:n.allowedTools,mcpServerNames:n.mcpServerNames,nextFireAt:n.nextFireAt,hasRoutine:n.hasRoutine}};var t=r(d[0])},3436,[3437]);
15082
15082
  __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"PARENT_AGENT_ID_LABEL",{enumerable:!0,get:function(){return t}}),Object.defineProperty(e,"WORKFLOW_ID_LABEL",{enumerable:!0,get:function(){return n}}),Object.defineProperty(e,"WORKFLOW_TASK_ID_LABEL",{enumerable:!0,get:function(){return o}}),Object.defineProperty(e,"FILTER_ID_LABEL",{enumerable:!0,get:function(){return u}}),Object.defineProperty(e,"ITEM_GROUP_LABEL",{enumerable:!0,get:function(){return l}}),Object.defineProperty(e,"ITEM_KEYS_LABEL",{enumerable:!0,get:function(){return c}}),Object.defineProperty(e,"INGESTION_MODE_LABEL",{enumerable:!0,get:function(){return s}}),Object.defineProperty(e,"LOOP_NAME_LABEL",{enumerable:!0,get:function(){return f}}),Object.defineProperty(e,"LOOP_RUN_LABEL",{enumerable:!0,get:function(){return p}}),Object.defineProperty(e,"SCHEDULE_ID_LABEL",{enumerable:!0,get:function(){return L}}),Object.defineProperty(e,"SCHEDULE_RUN_LABEL",{enumerable:!0,get:function(){return b}}),e.getParentAgentIdFromLabels=_,e.isDelegatedAgent=function(t){return null!==_(t.labels)},Object.defineProperty(e,"LOOP_ADOPTED_AT_LABEL",{enumerable:!0,get:function(){return E}}),e.getLoopNameFromLabels=A,e.getLoopRunFromLabels=function(t){const n=t?.[p];return"string"==typeof n&&n.trim().length>0?n.trim():null},e.getLoopAdoptedAtFromLabels=O,e.isLoopAgent=y,e.isLoopExecutionAgent=P,e.getFilterIdFromLabels=function(t){const n=t?.[u];return"string"==typeof n&&n.trim().length>0?n.trim():null},e.getIngestionModeFromLabels=function(t){const n=t?.[s];if("string"!=typeof n)return null;const o=n.trim();return"apply"===o||"dry-run"===o?o:null},e.getItemKeysFromLabels=function(t){const n=t?.[c];if("string"!=typeof n)return[];return n.split(",").map(t=>t.trim()).filter(t=>t.length>0)},e.getScheduleIdFromLabels=h,e.getScheduleRunFromLabels=function(t){const n=t?.[b];return"string"==typeof n&&n.trim().length>0?n.trim():null},e.isScheduleAgent=I,e.isScheduleExecutionAgent=j,e.isMachineExecutionAgent=function(t){return P(t)||j(t)};const t="paseo.parent-agent-id",n="paseo.workflow-id",o="paseo.workflow-task-id",u="paseo.filter-id",l="paseo.item-group",c="paseo.item-keys",s="paseo.ingestion-mode",f="loop",p="run",L="paseo.schedule-id",b="paseo.schedule-run";function _(n){const o=n?.[t];return"string"==typeof o&&o.trim().length>0?o.trim():null}const E="loop.adopted-at";function A(t){const n=t?.[f];return"string"==typeof n&&n.trim().length>0?n.trim():null}function O(t){const n=t?.[E];return"string"==typeof n&&n.trim().length>0?n.trim():null}function y(t){return null!==A(t.labels)}function P(t){return y(t)&&null===O(t.labels)}function h(t){const n=t?.[L];return"string"==typeof n&&n.trim().length>0?n.trim():null}function I(t){return null!==h(t.labels)}function j(t){return I(t)}},3437,[]);
15083
15083
  __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.deriveProjectPlacementFromCwd=n,e.resolveProjectPlacement=function(t){return t.projectPlacement??n(t.cwd)};var t=r(d[0]);function o(t){const o=t.trim();return o.length>0?o:"."}function n(n){const c=o(n),l=(0,t.deriveProjectKey)(c);return{projectKey:l,projectName:(0,t.deriveProjectName)(l),workspaceName:null,checkout:{cwd:c,isGit:!1,currentBranch:null,remoteUrl:null,worktreeRoot:null,isPaseoOwnedWorktree:!1,mainRepoRoot:null}}}},3438,[3439]);
15084
15084
  __d(function(g,r,i,_a,m,e,d){"use strict";function t(t){const n=t.indexOf(".paseo/worktrees/");return-1!==n?t.slice(0,n).replace(/\/$/,""):t}function n(t){if(!t)return null;const n=t.trim();if(!n)return null;let o=null,c=null;const s=n.match(/^[^@]+@([^:]+):(.+)$/);if(s)o=s[1]??null,c=s[2]??null;else if(n.includes("://"))try{const t=new URL(n);o=t.hostname||null,c=t.pathname?t.pathname.replace(/^\//,""):null}catch{}if(!o||!c)return null;let l=c.trim().replace(/^\/+/,"").replace(/\/+$/,"");if(l.endsWith(".git")&&(l=l.slice(0,-4)),!l.includes("/"))return null;const u=o.toLowerCase();return"github.com"===u?`remote:github.com/${l}`:`remote:${u}/${l}`}function o(t){if(!t)return null;let n=t;if(n.startsWith("git@")){const t=n.indexOf(":");-1!==t&&(n=n.slice(t+1))}else if(n.includes("://")){const t=n.split("://")[1];if(t){const o=t.indexOf("/");-1!==o&&(n=t.slice(o+1))}}return n.endsWith(".git")&&(n=n.slice(0,-4)),n.includes("/")?n:null}function c(t){const n="remote:github.com/";if(t.startsWith(n))return t.slice(18)||t;const o=t.split("/").filter(Boolean);return o[o.length-1]||t}function s(t){const n=new Date,o=new Date(n.getFullYear(),n.getMonth(),n.getDate()),c=new Date(o.getTime()-864e5),s=new Date(t.getFullYear(),t.getMonth(),t.getDate());if(s.getTime()>=o.getTime())return"Recent";if(s.getTime()>=c.getTime())return"Yesterday";const l=o.getTime()-s.getTime(),u=Math.floor(l/864e5);return u<=7?"This week":u<=30?"This month":"Older"}Object.defineProperty(e,'__esModule',{value:!0}),e.deriveProjectKey=t,e.deriveRemoteProjectKey=n,e.parseRepoNameFromRemoteUrl=o,e.parseRepoShortNameFromRemoteUrl=function(t){const n=o(t);if(!n)return null;const c=n.split("/");return c[c.length-1]||null},e.deriveProjectName=c,e.deriveProjectDisplayName=function(t){const n="remote:github.com/";if(t.projectKey.startsWith(n))return t.projectKey.slice(18);if(t.projectKey.startsWith("remote:")){const n=t.projectKey.slice(7),o=n.indexOf("/");if(o>=0){const t=n.slice(o+1).trim();if(t.length>0)return t}return n}const o=t.projectName.trim();if(o.length>0)return o;const c=t.projectKey.replace(/\\/g,"/").replace(/\/+$/,"").split("/").filter(Boolean);return c[c.length-1]??t.projectKey},e.deriveDateGroup=s,e.groupAgents=function(t,n){const{activeAgents:o,inactiveAgents:c}=f(t,Date.now()),s=v(h(o,n)),l=y(c);return{activeGroups:s,inactiveGroups:l}};const l=1728e5,u=5;function a(t){return"running"===t.status||t.requiresAttention||(t.pendingPermissionCount??0)>0}function f(t,n){const o=[],c=[];for(const s of t){if(s.archivedAt){c.push(s);continue}const t=n-s.lastActivityAt.getTime()<l;a(s)||t?o.push(s):c.push(s)}return{activeAgents:o,inactiveAgents:c}}function h(o,c){const s=new Map;for(const l of o){const o=n(c?.getRemoteUrl?.(l)??null)??t(l.cwd),u=s.get(o)||{trulyActive:[],recentlyActive:[]};a(l)?u.trulyActive.push(l):u.recentlyActive.push(l),s.set(o,u)}return s}function p(t,n){return n.lastActivityAt.getTime()-t.lastActivityAt.getTime()}function v(t){const n=[];for(const[o,{trulyActive:s,recentlyActive:l}]of t){s.sort(p),l.sort(p);const t=l.slice(0,u),a=[...s,...t];a.sort(p),n.push({projectKey:o,projectName:c(o),agents:a,activeCount:s.length,totalCount:s.length+l.length})}return n.sort((t,n)=>{const o=t.agents[0]?.lastActivityAt.getTime()??0;return(n.agents[0]?.lastActivityAt.getTime()??0)-o}),n}function y(t){const n=new Map;for(const o of t){const t=s(o.lastActivityAt),c=n.get(t)||[];c.push(o),n.set(t,c)}const o=["Recent","Yesterday","This week","This month","Older"],c=[];for(const t of o){const o=n.get(t);o&&o.length>0&&(o.sort(p),c.push({label:t,agents:o}))}return c}},3439,[]);
@@ -15156,8 +15156,8 @@ __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{v
15156
15156
  __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.focusWithRetries=function({focus:t,isFocused:o,timeoutMs:n=1500,onSuccess:s,onTimeout:u}){let c=!1;const f=Date.now()+n,_=()=>{if(!c){try{t()}catch{}o()?s?.():Date.now()>=f?u?.():requestAnimationFrame(()=>{requestAnimationFrame(_)})}};return _(),()=>{c=!0}}},3511,[]);
15157
15157
  __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.useActiveHost=o,e.useActiveServerId=function(){return o()?.serverId??null};var t=r(d[0]);r(d[1]);var s=r(d[2]),n=r(d[3]),u=r(d[4]);function o(){const o=(0,t.c)(3),c=(0,s.usePathname)(),v=(0,n.useHosts)();let l;return o[0]!==v||o[1]!==c?(l=(0,u.resolveActiveHost)({hosts:v,pathname:c}),o[0]=v,o[1]=c,o[2]=l):l=o[2],l}},3512,[350,36,379,3274,3513]);
15158
15158
  __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.resolveActiveHost=function({hosts:n,pathname:s}){const o=(0,t.parseServerIdFromPathname)(s);if(o){const t=n.find(t=>t.serverId===o);if(t)return t}return n[0]??null};var t=r(d[0])},3513,[3492]);
15159
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.useToast=function(){const t=(0,s.useContext)(u);if(!t)throw new Error("useToast must be used within ToastProvider");return t},e.ToastProvider=function(s){const c=(0,t.c)(7),{children:l}=s,{api:v,toast:T,dismiss:f}=(0,o.useToastHost)();let h,w;c[0]!==f||c[1]!==T?(h=(0,n.jsx)(o.ToastViewport,{toast:T,onDismiss:f}),c[0]=f,c[1]=T,c[2]=h):h=c[2];c[3]!==v||c[4]!==l||c[5]!==h?(w=(0,n.jsxs)(u.Provider,{value:v,children:[l,h]}),c[3]=v,c[4]=l,c[5]=h,c[6]=w):w=c[6];return w};var t=r(d[0]),s=r(d[1]),o=r(d[2]),n=r(d[3]);const u=(0,s.createContext)(null)},3514,[350,36,3515,279]);
15160
- __d(function(g,r,i,a,m,_e,d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),_e.useToastHost=function(){const e=(0,o.c)(11),{theme:t}=(0,_.useUnistyles)(),{t:n}=(0,h.useTranslation)(),[l,u]=(0,s.useState)(null),c=(0,s.useRef)(0);let f;e[0]===Symbol.for("react.memo_cache_sentinel")?(f=(e,t)=>{const n="string"==typeof e?e.trim():null;if(!e||""===n)return;const o=t?.variant??"default",s=void 0===t?.durationMs?I:t.durationMs;c.current=c.current+1,u({id:c.current,content:e,nativeMessage:n,icon:t?.icon,variant:o,durationMs:s,testID:t?.testID})},e[0]=f):f=e[0];const p=f;let v,b,E;e[1]!==n||e[2]!==t.colors.foreground?(v=e=>p(e?n("common.states.copiedLabel",{label:e}):n("common.states.copied"),{variant:"success",icon:(0,D.jsx)(y.CheckCircle2,{size:18,color:t.colors.foreground})}),e[1]=n,e[2]=t.colors.foreground,e[3]=v):v=e[3];e[4]===Symbol.for("react.memo_cache_sentinel")?(b=e=>p(e,{variant:"error",durationMs:3200}),e[4]=b):b=e[4];e[5]!==v?(E={show:p,copied:v,error:b},e[5]=v,e[6]=E):E=e[6];const x=E;let S;e[7]===Symbol.for("react.memo_cache_sentinel")?(S=()=>{u(null)},e[7]=S):S=e[7];const V=S;let A;e[8]!==x||e[9]!==l?(A={api:x,toast:l,dismiss:V},e[8]=x,e[9]=l,e[10]=A):A=e[10];return A},_e.ToastViewport=function({toast:o,onDismiss:u,placement:c="app-shell"}){const{theme:h}=(0,_.useUnistyles)(),I=(0,p.useSafeAreaInsets)(),S=(0,v.useIsCompactFormFactor)(),V=(0,s.useRef)(new n.Animated.Value(0)).current,A=(0,s.useRef)(new n.Animated.Value(-8)).current,M=(0,s.useRef)(null),R=(0,s.useRef)(null),C=(0,s.useRef)(0),w=(0,s.useCallback)(()=>{M.current&&(clearTimeout(M.current),M.current=null)},[]),j=(0,s.useCallback)(()=>{w(),n.Animated.parallel([n.Animated.timing(V,{toValue:0,duration:140,easing:f.default.out(f.default.quad),useNativeDriver:!0}),n.Animated.timing(A,{toValue:-8,duration:140,easing:f.default.out(f.default.quad),useNativeDriver:!0})]).start(({finished:e})=>{e&&u()})},[w,u,V,A]),T=(0,s.useCallback)(e=>{if(w(),null===e)return C.current=0,void(R.current=null);const t=Math.max(0,e);C.current=t,R.current=Date.now()+t,M.current=setTimeout(()=>{j()},t)},[j,w]),k=(0,s.useCallback)(()=>{null!==R.current&&(C.current=Math.max(0,R.current-Date.now())),R.current=null,w()},[w]),H=(0,s.useCallback)(()=>{o&&null!==o.durationMs&&T(C.current||o.durationMs)},[T,o]);(0,s.useEffect)(()=>o?(w(),V.setValue(0),A.setValue(-8),n.Animated.parallel([n.Animated.timing(V,{toValue:1,duration:140,easing:f.default.out(f.default.quad),useNativeDriver:!0}),n.Animated.timing(A,{toValue:0,duration:140,easing:f.default.out(f.default.quad),useNativeDriver:!0})]).start(),T(o.durationMs),()=>{w()}):(w(),R.current=null,C.current=0,V.setValue(0),void A.setValue(-8)),[w,V,T,o,A]);const N=S?v.HEADER_INNER_HEIGHT_MOBILE:v.HEADER_INNER_HEIGHT,W=S?v.HEADER_TOP_PADDING_MOBILE:0,z="app-shell"===c?I.top+W+N+h.spacing[2]:h.spacing[3],O=o?.variant,P=(0,s.useMemo)(()=>[x.toast,"success"===O?x.toastSuccess:null,"error"===O?x.toastError:null,{marginTop:z,opacity:V,transform:[{translateY:A}]}],[O,z,V,A]),L=(0,s.useMemo)(()=>[x.message,"error"===O?x.messageError:null],[O]);if(!o)return null;let q=null;"success"===o.variant?q=(0,D.jsx)(y.CheckCircle2,{size:18,color:h.colors.primary}):"error"===o.variant&&(q=(0,D.jsx)(y.AlertTriangle,{size:18,color:h.colors.destructive}));const G=o.icon??q,B=(0,D.jsx)(e.View,{style:x.container,pointerEvents:"box-none",children:(0,D.jsxs)(n.Animated.View,{testID:o.testID??"app-toast",onPointerEnter:b.isWeb?k:void 0,onPointerLeave:b.isWeb?H:void 0,style:P,accessibilityRole:"alert",children:[G?(0,D.jsx)(e.View,{style:x.iconSlot,children:G}):null,"string"==typeof o.content?(0,D.jsx)(t.Text,{testID:"app-toast-message",style:L,children:o.content}):(0,D.jsx)(e.View,{testID:"app-toast-message",style:x.contentSlot,children:o.content})]})});if("app-shell"===c&&b.isWeb&&"undefined"!=typeof document)return(0,l.createPortal)(B,(0,E.getOverlayRoot)());return B};var e=r(d[0]),t=r(d[1]),n=r(d[2]),o=r(d[3]),s=r(d[4]),l=r(d[5]);r(d[6]);var u,c=r(d[7]),f=(u=c)&&u.__esModule?u:{default:u};r(d[8]),r(d[9]);r(d[10]);r(d[11]);var p=r(d[12]),_=r(d[13]),h=r(d[14]),v=r(d[15]),b=r(d[16]),y=r(d[17]),E=r(d[18]),D=r(d[19]);const I=2200;const x=_.StyleSheet.create(e=>({container:{position:"absolute",left:e.spacing[4],right:e.spacing[4],top:0,zIndex:E.OVERLAY_Z.toast,alignItems:"center",uni__dependencies:[0]},toast:Object.assign({alignSelf:"center",maxWidth:"92%",flexDirection:"row",alignItems:"center",gap:e.spacing[2],backgroundColor:e.colors.surface0,borderRadius:e.borderRadius["2xl"],borderWidth:e.borderWidth[1],borderColor:e.colors.border,paddingVertical:e.spacing[2],paddingHorizontal:e.spacing[3]},e.shadow.md,{uni__dependencies:[0]}),toastSuccess:{borderColor:e.colors.border,uni__dependencies:[0]},toastError:{borderColor:e.colors.destructive,uni__dependencies:[0]},iconSlot:{alignItems:"center",justifyContent:"center"},contentSlot:{flexShrink:1,minWidth:0},message:{flexShrink:1,color:e.colors.foreground,fontSize:e.fontSize.sm,fontWeight:e.fontWeight.normal,uni__dependencies:[0]},messageError:{color:e.colors.foreground,uni__dependencies:[0]}}))},3515,[348,349,3516,350,36,634,140,252,25,234,627,146,558,56,352,3472,3420,811,3482,279]);
15159
+ __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.SilentToastProvider=function(o){const s=(0,t.c)(5),{children:v,onToast:T}=o,h=T??f;let P;s[0]!==h?(P={show:h,copied:l,error:u},s[0]=h,s[1]=P):P=s[1];const w=P;let x;s[2]!==w||s[3]!==v?(x=(0,n.jsx)(c.Provider,{value:w,children:v}),s[2]=w,s[3]=v,s[4]=x):x=s[4];return x},e.useToast=function(){const t=(0,o.useContext)(c);if(!t)throw new Error("useToast must be used within ToastProvider");return t},e.ToastProvider=function(o){const u=(0,t.c)(7),{children:l}=o,{api:f,toast:v,dismiss:T}=(0,s.useToastHost)();let h,P;u[0]!==T||u[1]!==v?(h=(0,n.jsx)(s.ToastViewport,{toast:v,onDismiss:T}),u[0]=T,u[1]=v,u[2]=h):h=u[2];u[3]!==f||u[4]!==l||u[5]!==h?(P=(0,n.jsxs)(c.Provider,{value:f,children:[l,h]}),u[3]=f,u[4]=l,u[5]=h,u[6]=P):P=u[6];return P};var t=r(d[0]),o=r(d[1]),s=r(d[2]),n=r(d[3]);const c=(0,o.createContext)(null);function u(){}function l(){}function f(){}},3514,[350,36,3515,279]);
15160
+ __d(function(g,r,i,a,m,_e,_d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),_e.useToastHost=function(){const e=(0,o.c)(11),{theme:t}=(0,_.useUnistyles)(),{t:n}=(0,b.useTranslation)(),[l,c]=(0,s.useState)(null),d=(0,s.useRef)(0);let f;e[0]===Symbol.for("react.memo_cache_sentinel")?(f=(e,t)=>{const n="string"==typeof e?e.trim():null;if(!e||""===n)return;const o=t?.variant??"default",s=void 0===t?.durationMs?I:t.durationMs;u.ToastAndroid;d.current=d.current+1,c({id:d.current,content:e,nativeMessage:n,icon:t?.icon,variant:o,durationMs:s,testID:t?.testID})},e[0]=f):f=e[0];const p=f;let v,h,E;e[1]!==n||e[2]!==t.colors.foreground?(v=e=>p(e?n("common.states.copiedLabel",{label:e}):n("common.states.copied"),{variant:"success",icon:(0,D.jsx)(y.CheckCircle2,{size:18,color:t.colors.foreground})}),e[1]=n,e[2]=t.colors.foreground,e[3]=v):v=e[3];e[4]===Symbol.for("react.memo_cache_sentinel")?(h=e=>p(e,{variant:"error",durationMs:3200}),e[4]=h):h=e[4];e[5]!==v?(E={show:p,copied:v,error:h},e[5]=v,e[6]=E):E=e[6];const x=E;let S;e[7]===Symbol.for("react.memo_cache_sentinel")?(S=()=>{c(null)},e[7]=S):S=e[7];const A=S;let M;e[8]!==x||e[9]!==l?(M={api:x,toast:l,dismiss:A},e[8]=x,e[9]=l,e[10]=M):M=e[10];return M},_e.ToastViewport=function({toast:o,onDismiss:u,placement:c="app-shell"}){const{theme:d}=(0,_.useUnistyles)(),b=(0,p.useSafeAreaInsets)(),I=(0,v.useIsCompactFormFactor)(),S=(0,s.useRef)(new n.Animated.Value(0)).current,A=(0,s.useRef)(new n.Animated.Value(-8)).current,M=(0,s.useRef)(null),V=(0,s.useRef)(null),R=(0,s.useRef)(0),C=(0,s.useCallback)(()=>{M.current&&(clearTimeout(M.current),M.current=null)},[]),j=(0,s.useCallback)(()=>{C(),n.Animated.parallel([n.Animated.timing(S,{toValue:0,duration:140,easing:f.default.out(f.default.quad),useNativeDriver:!0}),n.Animated.timing(A,{toValue:-8,duration:140,easing:f.default.out(f.default.quad),useNativeDriver:!0})]).start(({finished:e})=>{e&&u()})},[C,u,S,A]),w=(0,s.useCallback)(e=>{if(C(),null===e)return R.current=0,void(V.current=null);const t=Math.max(0,e);R.current=t,V.current=Date.now()+t,M.current=setTimeout(()=>{j()},t)},[j,C]),T=(0,s.useCallback)(()=>{null!==V.current&&(R.current=Math.max(0,V.current-Date.now())),V.current=null,C()},[C]),k=(0,s.useCallback)(()=>{o&&null!==o.durationMs&&w(R.current||o.durationMs)},[w,o]);(0,s.useEffect)(()=>o?(C(),S.setValue(0),A.setValue(-8),n.Animated.parallel([n.Animated.timing(S,{toValue:1,duration:140,easing:f.default.out(f.default.quad),useNativeDriver:!0}),n.Animated.timing(A,{toValue:0,duration:140,easing:f.default.out(f.default.quad),useNativeDriver:!0})]).start(),w(o.durationMs),()=>{C()}):(C(),V.current=null,R.current=0,S.setValue(0),void A.setValue(-8)),[C,S,w,o,A]);const O=I?v.HEADER_INNER_HEIGHT_MOBILE:v.HEADER_INNER_HEIGHT,H=I?v.HEADER_TOP_PADDING_MOBILE:0,N="app-shell"===c?b.top+H+O+d.spacing[2]:d.spacing[3],W=o?.variant,P=(0,s.useMemo)(()=>[x.toast,"success"===W?x.toastSuccess:null,"error"===W?x.toastError:null,{marginTop:N,opacity:S,transform:[{translateY:A}]}],[W,N,S,A]),z=(0,s.useMemo)(()=>[x.message,"error"===W?x.messageError:null],[W]);if(!o)return null;let L=null;"success"===o.variant?L=(0,D.jsx)(y.CheckCircle2,{size:18,color:d.colors.primary}):"error"===o.variant&&(L=(0,D.jsx)(y.AlertTriangle,{size:18,color:d.colors.destructive}));const q=o.icon??L,G=(0,D.jsx)(e.View,{style:x.container,pointerEvents:"box-none",children:(0,D.jsxs)(n.Animated.View,{testID:o.testID??"app-toast",onPointerEnter:h.isWeb?T:void 0,onPointerLeave:h.isWeb?k:void 0,style:P,accessibilityRole:"alert",children:[q?(0,D.jsx)(e.View,{style:x.iconSlot,children:q}):null,"string"==typeof o.content?(0,D.jsx)(t.Text,{testID:"app-toast-message",style:z,children:o.content}):(0,D.jsx)(e.View,{testID:"app-toast-message",style:x.contentSlot,children:o.content})]})});if("app-shell"===c&&h.isWeb&&"undefined"!=typeof document)return(0,l.createPortal)(G,(0,E.getOverlayRoot)());return G};var e=r(_d[0]),t=r(_d[1]),n=r(_d[2]),o=r(_d[3]),s=r(_d[4]),l=r(_d[5]),u=(function(e){if(e&&e.__esModule)return e;var t={};return e&&Object.keys(e).forEach(function(n){var o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,o.get?o:{enumerable:!0,get:function(){return e[n]}})}),t.default=e,t})(r(_d[6]));r(_d[7]);var c,d=r(_d[8]),f=(c=d)&&c.__esModule?c:{default:c};r(_d[9]),r(_d[10]),r(_d[11]);var p=r(_d[12]),_=r(_d[13]),b=r(_d[14]),v=r(_d[15]),h=r(_d[16]),y=r(_d[17]),E=r(_d[18]),D=r(_d[19]);const I=2200;const x=_.StyleSheet.create(e=>({container:{position:"absolute",left:e.spacing[4],right:e.spacing[4],top:0,zIndex:E.OVERLAY_Z.toast,alignItems:"center",uni__dependencies:[0]},toast:Object.assign({alignSelf:"center",maxWidth:"92%",flexDirection:"row",alignItems:"center",gap:e.spacing[2],backgroundColor:e.colors.surface0,borderRadius:e.borderRadius["2xl"],borderWidth:e.borderWidth[1],borderColor:e.colors.border,paddingVertical:e.spacing[2],paddingHorizontal:e.spacing[3]},e.shadow.md,{uni__dependencies:[0]}),toastSuccess:{borderColor:e.colors.border,uni__dependencies:[0]},toastError:{borderColor:e.colors.destructive,uni__dependencies:[0]},iconSlot:{alignItems:"center",justifyContent:"center"},contentSlot:{flexShrink:1,minWidth:0},message:{flexShrink:1,color:e.colors.foreground,fontSize:e.fontSize.sm,fontWeight:e.fontWeight.normal,uni__dependencies:[0]},messageError:{color:e.colors.foreground,uni__dependencies:[0]}}))},3515,[348,349,3516,350,36,634,627,140,252,25,234,146,558,56,352,3472,3420,811,3482,279]);
15161
15161
  __d(function(g,r,i,a,m,_e,d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"Animated",{enumerable:!0,get:function(){return p}});var e,t=r(d[0]),n=(e=t)&&e.__esModule?e:{default:e},o=r(d[1]),l=r(d[2]),c=r(d[3]),u=r(d[4]),f=r(d[5]),s=r(d[6]);const p=Object.assign({},n.default,{View:n.default.createAnimatedComponent(s.View),Text:n.default.createAnimatedComponent(f.Text),FlatList:n.default.createAnimatedComponent(o.FlatList),Image:n.default.createAnimatedComponent(l.Image),ScrollView:n.default.createAnimatedComponent(c.ScrollView),SectionList:n.default.createAnimatedComponent(u.SectionList)})},3516,[140,2656,2813,2815,3517,349,348]);
15162
15162
  __d(function(g,r,i,a,m,_e,d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"SectionList",{enumerable:!0,get:function(){return u}});var e,t=r(d[0]),n=(e=t)&&e.__esModule?e:{default:e};const u=(0,r(d[1]).createUnistylesElement)(n.default)},3517,[230,274]);
15163
15163
  __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.buildPaletteSessionOpenOptions=function(s){const{target:t,workspaceId:n}=s,c=n?.trim();return Object.assign({config:{provider:"claude",cwd:t.cwd},resumeSessionId:t.sid},c?{workspaceId:c}:{})}},3518,[]);
@@ -16323,14 +16323,14 @@ __d(function(g,r,i,a,m,e,d){"use strict";function t(n){return null!=n&&("string"
16323
16323
  __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.isBinaryByPath=function(n){const s=o(n);return!!s&&t.has(s)};const t=new Set(["pdf","doc","docx","xls","xlsx","ppt","pptx","rtf","odt","ods","odp","png","jpg","jpeg","gif","webp","ico","bmp","tiff","tif","heic","heif","avif","mp3","wav","ogg","m4a","flac","opus","aac","mp4","webm","avi","mov","mkv","m4v","zip","tar","gz","bz2","xz","7z","rar","lz","zst","exe","dll","so","dylib","a","o","obj","lib","class","jar","war","dmg","iso","img","pkg","apk","ipa","msi","deb","rpm","ttf","otf","woff","woff2","eot","db","sqlite","sqlite3","mdb","pyc","pyo","pyd","bin","dat","pak"]);function o(t){if(!t)return null;const o=t.split("/").findLast(Boolean)??"";if(o.startsWith(".")&&-1===o.indexOf(".",1))return null;const n=o.lastIndexOf(".");if(n<=0)return null;const s=o.slice(n+1).toLowerCase();return 0===s.length?null:s}},4564,[]);
16324
16324
  __d(function(g,r,i,a,m,_e,d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),_e.HighlightedLines=function(e){const n=(0,o.c)(13),{lines:l,startLine:s}=e;if(void 0===s){let e,o;return n[0]!==l?(e=l.map(j),n[0]=l,n[1]=e):e=n[1],n[2]!==e?(o=(0,S.jsx)(t.View,{dataSet:f.CODE_SURFACE_DATASET,children:e}),n[2]=e,n[3]=o):o=n[3],o}const c=s+l.length-1,u=Math.max(2,String(c).length);let x,h;if(n[4]!==u||n[5]!==l||n[6]!==s){let e;n[8]!==u||n[9]!==s?(e=(e,t)=>(0,S.jsx)(T,{line:e,lineNumber:s+t,digits:u},e.key),n[8]=u,n[9]=s,n[10]=e):e=n[10],x=l.map(e),n[4]=u,n[5]=l,n[6]=s,n[7]=x}else x=n[7];n[11]!==x?(h=(0,S.jsx)(t.View,{dataSet:f.CODE_SURFACE_DATASET,children:x}),n[11]=x,n[12]=h):h=n[12];return h};var e,t=r(d[0]),n=r(d[1]),o=r(d[2]),l=r(d[3]),s=(e=l)&&e.__esModule?e:{default:e};r(d[4]),r(d[5]);var c=r(d[6]),u=r(d[7]),f=r(d[8]),x=r(d[9]),S=r(d[10]);const h="\u200b";function y(e){const t=(0,o.c)(4),{line:l}=e;let s,c;return t[0]!==l.tokens?(s=0===l.tokens.length?h:l.tokens.map(_),t[0]=l.tokens,t[1]=s):s=t[1],t[2]!==s?(c=(0,S.jsx)(n.Text,{selectable:!0,style:p.lineText,children:s}),t[2]=s,t[3]=c):c=t[3],c}function _(e){const{key:t,token:o}=e;return(0,S.jsx)(n.Text,{style:o.style?(0,x.syntaxTokenStyleFor)(o.style):void 0,children:o.text},t)}const T=s.default.memo(function(e){const l=(0,o.c)(10),{line:s,lineNumber:c,digits:u}=e,f=String(c);let x,h,_,T;return l[0]!==u||l[1]!==f?(x=f.padStart(u),l[0]=u,l[1]=f,l[2]=x):x=l[2],l[3]!==x?(h=(0,S.jsxs)(n.Text,{style:p.gutterText,children:[x," "]}),l[3]=x,l[4]=h):h=l[4],l[5]!==s?(_=(0,S.jsx)(y,{line:s}),l[5]=s,l[6]=_):_=l[6],l[7]!==h||l[8]!==_?(T=(0,S.jsxs)(t.View,{style:p.row,children:[h,_]}),l[7]=h,l[8]=_,l[9]=T):T=l[9],T});function j(e){return(0,S.jsx)(y,{line:e},e.key)}const p=c.StyleSheet.create(e=>({row:{flexDirection:"row",minHeight:18},gutterText:{fontFamily:e.fontFamily.mono,fontSize:e.fontSize.code,lineHeight:18,color:e.colors.foregroundMuted,opacity:.6,userSelect:"none",flexShrink:0,uni__dependencies:[0]},lineText:Object.assign({fontFamily:e.fontFamily.mono,fontSize:e.fontSize.code,color:e.colors.foreground,lineHeight:18},u.isWeb?{whiteSpace:"pre",overflowWrap:"normal"}:null,{uni__dependencies:[0]})}))},4565,[348,349,350,36,234,146,56,3420,3820,3821,279]);
16325
16325
  __d(function(g,r,i,a,m,_e,d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),_e.DiffViewer=function(e){const t=(0,l.c)(32),{diffLines:c,maxHeight:u,emptyLabel:y,fillAvailableHeight:h}=e,p=void 0!==h&&h,{t:S}=(0,x.useTranslation)(),[v,k]=s.default.useState(0);let C;t[0]!==y||t[1]!==S?(C=y??S("diffViewer.empty"),t[0]=y,t[1]=S,t[2]=C):C=t[2];const w=C,H=(0,f.useWebScrollbarStyle)();let L;t[3]===Symbol.for("react.memo_cache_sentinel")?(L=e=>k(e.nativeEvent.layout.width),t[3]=L):L=t[3];const E=L;let W;t[4]!==u?(W=void 0!==u&&(0,T.inlineUnistylesStyle)({maxHeight:u}),t[4]=u,t[5]=W):W=t[5];const F=p&&$.fillHeight;let M;t[6]!==W||t[7]!==F||t[8]!==H?(M=[$.verticalScroll,W,F,H],t[6]=W,t[7]=F,t[8]=H,t[9]=M):M=t[9];const A=M;let D,I;t[10]!==v?(D=v>0&&(0,T.inlineUnistylesStyle)({minWidth:v}),t[10]=v,t[11]=D):D=t[11];t[12]!==D?(I=[$.linesContainer,D],t[12]=D,t[13]=I):I=t[13];const O=I;let R;t[14]!==c?(R=c.map(z),t[14]=c,t[15]=R):R=t[15];const U=R,B=p&&$.fillHeight;let P;t[16]!==B?(P=[$.verticalContent,B],t[16]=B,t[17]=P):P=t[17];const G=P;if(!c.length){let e;return t[18]!==w?(e=(0,b.jsx)(o.View,{style:$.emptyState,children:(0,b.jsx)(n.Text,{style:$.emptyText,children:w})}),t[18]=w,t[19]=e):e=t[19],e}let q,J;t[20]!==U?(q=U.map(V),t[20]=U,t[21]=q):q=t[21];t[22]!==O||t[23]!==q?(J=(0,b.jsx)(o.View,{style:O,dataSet:_.CODE_SURFACE_DATASET,children:q}),t[22]=O,t[23]=q,t[24]=J):J=t[24];const K=J;let N;t[25]!==K||t[26]!==H?(N=(0,b.jsx)(j,{horizontal:!0,nestedScrollEnabled:!0,showsHorizontalScrollIndicator:!0,style:H,contentContainerStyle:$.horizontalContent,onLayout:E,children:K}),t[25]=K,t[26]=H,t[27]=N):N=t[27];const Q=N;let X;t[28]!==Q||t[29]!==A||t[30]!==G?(X=(0,b.jsx)(j,{style:A,contentContainerStyle:G,nestedScrollEnabled:!0,showsVerticalScrollIndicator:!0,children:Q}),t[28]=Q,t[29]=A,t[30]=G,t[31]=X):X=t[31];return X};var e,t=r(d[0]),n=r(d[1]),o=r(d[2]),l=r(d[3]),c=r(d[4]),s=(e=c)&&e.__esModule?e:{default:e},x=r(d[5]);r(d[6]),r(d[7]),r(d[8]);var u=r(d[9]),y=r(d[10]),h=r(d[11]),p=r(d[12]),f=r(d[13]),T=r(d[14]),S=r(d[15]),_=r(d[16]),v=r(d[17]),b=r(d[18]);const j=v.isWeb?t.ScrollView:u.ScrollView;function k(e){const t=(0,l.c)(35),{line:c}=e,s="header"===c.type&&$.headerLine,x="add"===c.type&&$.addLine,u="remove"===c.type&&$.removeLine,y="context"===c.type&&$.contextLine;let p;t[0]!==s||t[1]!==x||t[2]!==u||t[3]!==y?(p=[$.line,s,x,u,y],t[0]=s,t[1]=x,t[2]=u,t[3]=y,t[4]=p):p=t[4];const f=p,T="header"===c.type&&$.headerText,S="add"===c.type&&$.addText,_="remove"===c.type&&$.removeText,v="context"===c.type&&$.contextText;let j;t[5]!==T||t[6]!==S||t[7]!==_||t[8]!==v?(j=[$.lineText,T,S,_,v],t[5]=T,t[6]=S,t[7]=_,t[8]=v,t[9]=j):j=t[9];const k=j,w="add"===c.type&&$.addText,H="remove"===c.type&&$.removeText,V="context"===c.type&&$.contextText;let z;t[10]!==w||t[11]!==H||t[12]!==V?(z=[w,H,V],t[10]=w,t[11]=H,t[12]=V,t[13]=z):z=t[13];const E=z;if(c.tokens){let e,l,s,x,u;return t[14]!==c?(e=(0,h.diffLinePrefix)(c),t[14]=c,t[15]=e):e=t[15],t[16]!==E||t[17]!==e?(l=(0,b.jsx)(n.Text,{style:E,children:e}),t[16]=E,t[17]=e,t[18]=l):l=t[18],t[19]!==c.tokens?(s=(0,b.jsx)(C,{tokens:c.tokens}),t[19]=c.tokens,t[20]=s):s=t[20],t[21]!==l||t[22]!==s?(x=(0,b.jsxs)(n.Text,{style:$.lineText,children:[l,s]}),t[21]=l,t[22]=s,t[23]=x):x=t[23],t[24]!==f||t[25]!==x?(u=(0,b.jsx)(o.View,{style:f,children:x}),t[24]=f,t[25]=x,t[26]=u):u=t[26],u}let W,F;return t[27]!==c.content||t[28]!==c.segments||t[29]!==c.type||t[30]!==k?(W=c.segments?(0,b.jsxs)(n.Text,{style:$.lineText,children:[(0,b.jsx)(n.Text,{style:"add"===c.type?$.addText:$.removeText,children:c.content[0]}),c.segments.map(e=>(0,b.jsx)(L,{segment:e,lineType:c.type},`${e.changed?"c":"u"}:${e.text}`))]}):(0,b.jsx)(n.Text,{style:k,children:c.content}),t[27]=c.content,t[28]=c.segments,t[29]=c.type,t[30]=k,t[31]=W):W=t[31],t[32]!==f||t[33]!==W?(F=(0,b.jsx)(o.View,{style:f,children:W}),t[32]=f,t[33]=W,t[34]=F):F=t[34],F}function C(e){const t=(0,l.c)(6),{tokens:n}=e;let o;t[0]!==n?(o=n.map(H),t[0]=n,t[1]=o):o=t[1];const c=o;let s,x;return t[2]!==c?(s=c.map(w),t[2]=c,t[3]=s):s=t[3],t[4]!==s?(x=(0,b.jsx)(b.Fragment,{children:s}),t[4]=s,t[5]=x):x=t[5],x}function w(e){const{key:t,token:o}=e;return(0,b.jsx)(n.Text,{style:o.style?(0,p.syntaxTokenStyleFor)(o.style):void 0,children:o.text},t)}function H(e,t){return{key:`${t}-${e.text}`,token:e}}function L(e){const t=(0,l.c)(6),{segment:o,lineType:c}=e,s="add"===c?$.addText:$.removeText,x=o.changed&&("add"===c?$.addHighlight:$.removeHighlight);let u;t[0]!==s||t[1]!==x?(u=[s,x],t[0]=s,t[1]=x,t[2]=u):u=t[2];const y=u;let h;return t[3]!==o.text||t[4]!==y?(h=(0,b.jsx)(n.Text,{style:y,children:o.text}),t[3]=o.text,t[4]=y,t[5]=h):h=t[5],h}function V(e){const{key:t,line:n}=e;return(0,b.jsx)(k,{line:n},t)}function z(e,t){return{key:`${t}-${e.type}-${e.content}`,line:e}}const $=y.StyleSheet.create(e=>{const t=(0,S.getCodeInsets)(e);return{verticalScroll:{},fillHeight:{flex:1,minHeight:0},verticalContent:{flexGrow:1,paddingBottom:t.extraBottom},horizontalContent:{flexDirection:"column",paddingRight:t.extraRight},linesContainer:{alignSelf:"flex-start",padding:t.padding},line:{minWidth:"100%",paddingHorizontal:0,paddingVertical:e.spacing[1],uni__dependencies:[0]},lineText:Object.assign({fontFamily:e.fontFamily.mono,fontSize:e.fontSize.code,color:e.colors.foreground},v.isWeb?{whiteSpace:"pre",overflowWrap:"normal"}:null,{uni__dependencies:[0]}),headerLine:{backgroundColor:e.colors.surface1,uni__dependencies:[0]},headerText:{color:e.colors.foregroundMuted,uni__dependencies:[0]},addLine:{backgroundColor:"rgba(46, 160, 67, 0.15)"},addText:{color:e.colors.foreground,uni__dependencies:[0]},removeLine:{backgroundColor:"rgba(248, 81, 73, 0.1)"},removeText:{color:e.colors.foreground,uni__dependencies:[0]},addHighlight:{backgroundColor:"rgba(46, 160, 67, 0.4)"},removeHighlight:{backgroundColor:"rgba(248, 81, 73, 0.35)"},contextLine:{backgroundColor:e.colors.surface1,uni__dependencies:[0]},contextText:{color:e.colors.foregroundMuted,uni__dependencies:[0]},emptyState:{padding:e.spacing[4],alignItems:"center",justifyContent:"center",uni__dependencies:[0]},emptyText:{fontSize:e.fontSize.sm,color:e.colors.foregroundMuted,uni__dependencies:[0]}}})},4566,[2815,349,348,350,36,352,146,234,182,2482,56,4562,3821,3589,3486,3885,3820,3420,279]);
16326
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return p}});var t=r(d[0]);r(d[1]);var s=r(d[2]),n=r(d[3]),o=r(d[4]),l=r(d[5]),c=r(d[6]),u=r(d[7]),f=r(d[8]),v=r(d[9]),b=r(d[10]),S=r(d[11]);function p(){const p=(0,t.c)(23),{serverId:_}=(0,s.useLocalSearchParams)(),y=(0,s.useRouter)(),I=(0,b.useKanbanBuckets)(),R=(0,b.useDefaultBucketId)();let j;p[0]!==I?(j=new Set(I.map(B)),p[0]=I,p[1]=j):j=p[1];const z=j;let O;p[2]!==_?(O=t=>t.sessions[_??""]?.agents,p[2]=_,p[3]=O):O=p[3];const h=(0,c.useSessionStore)(O);let P;e:{if(!h){let t;p[4]===Symbol.for("react.memo_cache_sentinel")?(t=[],p[4]=t):t=p[4],P=t;break e}let t;if(p[5]!==h||p[6]!==R||p[7]!==z||p[8]!==_){let s;p[10]!==R||p[11]!==z||p[12]!==_?(s=t=>({id:t.id,serverId:_??"",title:t.title??t.id,statusBucket:(0,f.deriveSidebarStateBucket)((0,f.toBucketInput)(t)),tags:Object.entries(t.labels??{}).filter(A).map(k),digest:t.digest??null,kanban:(0,v.resolveBucketId)(t,z,R),provider:t.provider,model:t.model,lastActivityAt:t.lastActivityAt,snoozeCount:t.snooze?.count??0,snoozedUntil:t.snooze?.until??null,origin:(0,u.deriveSessionOrigin)(t.labels??null),createdAt:t.createdAt}),p[10]=R,p[11]=z,p[12]=_,p[13]=s):s=p[13],t=(0,l.selectFeedCandidates)([...h.values()]).map(s),p[5]=h,p[6]=R,p[7]=z,p[8]=_,p[9]=t}else t=p[9];P=t}const w=P;let C;if(p[14]!==w){const t=new Set;for(const s of w)for(const n of s.tags)t.add(n);C=[...t].sort(),p[14]=w,p[15]=C}else C=p[15];const L=C;let x;p[16]!==y||p[17]!==_?(x=()=>{y.replace((0,n.buildHostRootRoute)(_??""))},p[16]=y,p[17]=_,p[18]=x):x=p[18];const D=x;let F;return p[19]!==L||p[20]!==D||p[21]!==w?(F=(0,S.jsx)(o.ReelsScreen,{sessions:w,allTags:L,onLeaveRing:D}),p[19]=L,p[20]=D,p[21]=w,p[22]=F):F=p[22],F}function k(t){const[s]=t;return s.slice(4)}function A(t){const[s]=t;return s.startsWith("tag:")}function B(t){return t.id}},4567,[350,36,379,3492,4568,4576,3427,3621,3441,4008,4007,279]);
16327
- __d(function(g,r,_i,_a,m,_e,_d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),_e.shouldTrackSheetDrag=A,_e.shouldCloseOnDrag=O,_e.destructiveHint=E,_e.verbAccessibilityLabel=M,Object.defineProperty(_e,"UNWIRED_VERBS",{enumerable:!0,get:function(){return F}}),_e.bucketLabel=G,_e.relativeAge=K,_e.cardMetaLine=q,_e.consolidateRowLabel=Z,_e.emptyRingState=ue,_e.relativeWake=he,_e.backgroundTextFor=be,Object.defineProperty(_e,"ReelsScreen",{enumerable:!0,get:function(){return ye}}),_e.shareTextFor=Se;var t=r(_d[0]),n=r(_d[1]),s=r(_d[2]),o=r(_d[3]),l=r(_d[4]),i=r(_d[5]),c=r(_d[6]),a=r(_d[7]),d=r(_d[8]);r(_d[9]);var u=e(r(_d[10])),h=e(r(_d[11]));r(_d[12]);var b=e(r(_d[13]));r(_d[14]),r(_d[15]),r(_d[16]),r(_d[17]),r(_d[18]),r(_d[19]);var p=r(_d[20]),y=r(_d[21]),f=r(_d[22]),x=r(_d[23]),j=r(_d[24]),S=r(_d[25]),v=r(_d[26]),k=r(_d[27]),w=r(_d[28]),T=r(_d[29]),_=r(_d[30]),C=r(_d[31]),I=r(_d[32]),D=r(_d[33]),V=r(_d[34]),z=r(_d[35]),R=r(_d[36]),L=r(_d[37]),P=r(_d[38]),$=r(_d[39]);function A(e){return e>8}function O(e){return e>60}function E(e,t,n){return t&&"hold"!==t?t:e||"hold"===t?"hold to retire, this cannot be undone":n}function M(e,t){return"terminate"===e?`${t}. Hold to confirm, this cannot be undone.`:F.has(e)?`${t}. Not wired yet.`:t}const H={automate:"automate",share:"share",snooze:"snooze",options:"kanban",consolidate:"consolidate"},W={share:null,automate:null,snooze:null,kanban:null,tag:null,consolidate:null},F=new Set([]);function B(e){return e.key}const N={needs_input:"needs you",failed:"failed",attention:"wants a look",pending:"waiting",running:"running",done:"done"};function G(e){return N[e]??e.replace(/_/g," ")}function K(e,t=new Date){if(!e)return"";const n=t.getTime()-e.getTime();if(!Number.isFinite(n)||n<0)return"";const s=Math.floor(n/6e4);if(s<1)return"just now";if(s<60)return`${s}m`;const o=Math.floor(s/60);return o<24?`${o}h`:`${Math.floor(o/24)}d`}function q(e,t){return[G(String(e.statusBucket)),K(e.lastActivityAt,t),e.model?`${e.provider}/${e.model}`:e.provider].filter(e=>e.length>0).join(" \xb7 ")}function U(e,t){const n=(0,a.c)(4);let s,o;n[0]!==e||n[1]!==t?(s=()=>{if(!e||"undefined"==typeof document)return;const n=e=>{"Escape"===e.key&&t()};return document.addEventListener("keydown",n),()=>document.removeEventListener("keydown",n)},o=[e,t],n[0]=e,n[1]=t,n[2]=s,n[3]=o):(s=n[2],o=n[3]),(0,d.useEffect)(s,o)}const Y=(0,d.memo)(function(e){const c=(0,a.c)(90),{session:u,visible:y,onClose:f,onSend:x,sendError:j,openDecisions:S,target:v,actAllowed:w}=e,[T,_]=(0,d.useState)(""),C=v?.question??null,I=u.digest;let D;c[0]!==x||c[1]!==T?(D=()=>{const e=T.trim();e.length>0&&(x(e),_(""))},c[0]=x,c[1]=T,c[2]=D):D=c[2];const V=D,z=(0,p.useSafeAreaInsets)(),R=fe.captionSheet,[L,P]=(0,d.useState)(!1);let A,E;c[3]===Symbol.for("react.memo_cache_sentinel")?(A=()=>{const e=h.default.addListener("keyboardDidShow",()=>P(!0)),t=h.default.addListener("keyboardDidHide",()=>P(!1));return()=>{e.remove(),t.remove()}},E=[],c[3]=A,c[4]=E):(A=c[3],E=c[4]),(0,d.useEffect)(A,E);const M=L&&!1?0:z.bottom;let H;c[5]!==M?(H=[fe.sheetInner,{paddingBottom:M}],c[5]=M,c[6]=H):H=c[6];const W=H;let F;c[7]!==f?(F=b.default.create({onMoveShouldSetPanResponder:Ae,onPanResponderRelease:(e,t)=>{O(t.dy)&&f()}}),c[7]=f,c[8]=F):F=c[8];const B=F;let N,G,K;U(y,f),c[9]!==w?(N=w?null:(0,$.jsx)(s.Text,{style:fe.composerLabel,testID:"reels-composer-capped",children:"Decisions are done for today. This one keeps until tomorrow."}),c[9]=w,c[10]=N):N=c[10],c[11]!==w||c[12]!==C||c[13]!==S.length||c[14]!==V||c[15]!==T?(G=w?(0,$.jsxs)($.Fragment,{children:[C?(0,$.jsx)(s.Text,{style:fe.composerLabel,numberOfLines:2,testID:"reels-composer-target",children:S.length>1?`Answering the first of ${S.length} open decisions: ${C}`:`Answering: ${C}`}):null,(0,$.jsxs)(t.View,{style:fe.composer,children:[(0,$.jsx)(n.TextInput,{value:T,onChangeText:_,placeholder:C?"in your own words":"say what to do",style:fe.composerInput,onSubmitEditing:V,returnKeyType:"send",testID:"reels-composer-input"}),(0,$.jsx)(l.Pressable,{onPress:V,style:fe.composerSend,accessibilityRole:"button",accessibilityLabel:"Send this answer",hitSlop:8,testID:"reels-composer-send",children:(0,$.jsx)(s.Text,{style:fe.link,children:"send"})})]})]}):null,c[11]=w,c[12]=C,c[13]=S.length,c[14]=V,c[15]=T,c[16]=G):G=c[16],c[17]!==N||c[18]!==G?(K=(0,$.jsxs)(t.View,{children:[N,G]}),c[17]=N,c[18]=G,c[19]=K):K=c[19];const q=K;if(!y)return null;let Y,Q,Z,ee,te,ne,se;c[20]!==f?(Y=(0,$.jsx)(l.Pressable,{style:fe.captionBackdrop,onPress:f,accessibilityRole:"button",accessibilityLabel:"Close the digest",testID:"reels-caption-backdrop"}),c[20]=f,c[21]=Y):Y=c[21],c[22]===Symbol.for("react.memo_cache_sentinel")?(Q=(0,$.jsx)(t.View,{style:fe.sheetHandle}),c[22]=Q):Q=c[22],c[23]!==B.panHandlers?(Z=(0,$.jsx)(t.View,Object.assign({},B.panHandlers,{style:fe.sheetGrab,testID:"reels-caption-grab",children:Q})),c[23]=B.panHandlers,c[24]=Z):Z=c[24],c[25]===Symbol.for("react.memo_cache_sentinel")?(ee=(0,$.jsx)(X,{}),c[25]=ee):ee=c[25],c[26]!==f?(te=(0,$.jsx)(l.Pressable,{onPress:f,style:fe.sheetClose,hitSlop:8,accessibilityRole:"button",accessibilityLabel:"Close the digest",testID:"reels-caption-close",children:ee}),c[26]=f,c[27]=te):te=c[27],c[28]!==u.title?(ne=(0,$.jsx)(s.Text,{style:ke,numberOfLines:1,children:u.title}),c[28]=u.title,c[29]=ne):ne=c[29],c[30]!==te||c[31]!==ne?(se=(0,$.jsxs)(t.View,{style:fe.sheetHead,children:[te,ne]}),c[30]=te,c[31]=ne,c[32]=se):se=c[32];const oe=I?.summary;let le;c[33]!==oe?(le=(0,$.jsx)(J,{label:"Summary",value:oe,derived:!0}),c[33]=oe,c[34]=le):le=c[34];const ie=I?.goal;let re;c[35]!==ie?(re=(0,$.jsx)(J,{label:"Goal",value:ie}),c[35]=ie,c[36]=re):re=c[36];const ce=I?.nextStep;let ae,de,ue,he,be,ge,pe,me,ye,xe,je,Se,ve;if(c[37]!==ce?(ae=(0,$.jsx)(J,{label:"Next step",value:ce}),c[37]=ce,c[38]=ae):ae=c[38],c[39]!==I?.blockers?(de=I?.blockers?.join("\n"),c[39]=I?.blockers,c[40]=de):de=c[40],c[41]!==de?(ue=(0,$.jsx)(J,{label:"Blockers",value:de,danger:!0}),c[41]=de,c[42]=ue):ue=c[42],c[43]!==I?.accomplishments?(he=I?.accomplishments?.join("\n"),c[43]=I?.accomplishments,c[44]=he):he=c[44],c[45]!==he?(be=(0,$.jsx)(J,{label:"Accomplishments",value:he,derived:!0}),c[45]=he,c[46]=be):be=c[46],c[47]!==I?.keyFiles?(ge=I?.keyFiles?.join("\n"),c[47]=I?.keyFiles,c[48]=ge):ge=c[48],c[49]!==ge?(pe=(0,$.jsx)(J,{label:"Key files",value:ge,derived:!0}),c[49]=ge,c[50]=pe):pe=c[50],c[51]!==I?.links?(me=I?.links?.map(Oe).join("\n"),c[51]=I?.links,c[52]=me):me=c[52],c[53]!==me?(ye=(0,$.jsx)(J,{label:"Links",value:me}),c[53]=me,c[54]=ye):ye=c[54],c[55]!==S){let e;c[57]!==S.length?(e=(e,t)=>(0,$.jsx)(J,{label:S.length>1?`Decision ${t+1} of ${S.length}`:"Decision",value:e.question},e.id),c[57]=S.length,c[58]=e):e=c[58],xe=S.map(e),c[55]=S,c[56]=xe}else xe=c[56];var we;let Te,Ce,Ie,De,Ve;return c[59]!==u.tags?(je=u.tags.join(", ")||"no tag",c[59]=u.tags,c[60]=je):je=c[60],c[61]!==je?(Se=(0,$.jsx)(J,{label:"Tags",value:je}),c[61]=je,c[62]=Se):Se=c[62],c[63]!==u.kanban?(ve=(we=u.kanban)?(0,k.getBucketLabel)(we)||we:"no column",c[63]=u.kanban,c[64]=ve):ve=c[64],c[65]!==ve?(Te=(0,$.jsx)(J,{label:"Kanban",value:ve}),c[65]=ve,c[66]=Te):Te=c[66],c[67]!==le||c[68]!==re||c[69]!==ae||c[70]!==ue||c[71]!==be||c[72]!==pe||c[73]!==ye||c[74]!==xe||c[75]!==Se||c[76]!==Te?(Ce=(0,$.jsxs)(o.ScrollView,{style:fe.sheetBody,testID:"reels-caption-body",children:[le,re,ae,ue,be,pe,ye,xe,Se,Te]}),c[67]=le,c[68]=re,c[69]=ae,c[70]=ue,c[71]=be,c[72]=pe,c[73]=ye,c[74]=xe,c[75]=Se,c[76]=Te,c[77]=Ce):Ce=c[77],c[78]!==j?(Ie=j?(0,$.jsxs)(s.Text,{style:fe.sendError,testID:"reels-composer-error",children:["Could not send that: ",j,". Nothing was recorded, so try again."]}):null,c[78]=j,c[79]=Ie):Ie=c[79],c[80]!==q||c[81]!==W||c[82]!==Z||c[83]!==se||c[84]!==Ce||c[85]!==Ie?(De=(0,$.jsx)(i.KeyboardAvoidingView,{behavior:"height",style:R,testID:"reels-caption-sheet",children:(0,$.jsxs)(t.View,{style:W,children:[Z,se,Ce,Ie,q]})}),c[80]=q,c[81]=W,c[82]=Z,c[83]=se,c[84]=Ce,c[85]=Ie,c[86]=De):De=c[86],c[87]!==Y||c[88]!==De?(Ve=(0,$.jsxs)($.Fragment,{children:[Y,De]}),c[87]=Y,c[88]=De,c[89]=Ve):Ve=c[89],Ve}),X=(0,d.memo)(function(){const e=(0,a.c)(2),{theme:t}=(0,y.useUnistyles)();let n;return e[0]!==t.colors.foregroundMuted?(n=(0,$.jsx)(f.X,{size:18,color:t.colors.foregroundMuted}),e[0]=t.colors.foregroundMuted,e[1]=n):n=e[1],n}),J=(0,d.memo)(function(e){const n=(0,a.c)(9),{label:o,value:l,derived:i,danger:c}=e;if(!l)return null;const d=i?" (derived)":"";let u;n[0]!==o||n[1]!==d?(u=(0,$.jsxs)(s.Text,{style:fe.fieldLabel,children:[o,d]}),n[0]=o,n[1]=d,n[2]=u):u=n[2];const h=c?ve:fe.fieldValue;let b,p;return n[3]!==h||n[4]!==l?(b=(0,$.jsx)(s.Text,{style:h,children:l}),n[3]=h,n[4]=l,n[5]=b):b=n[5],n[6]!==u||n[7]!==b?(p=(0,$.jsxs)(t.View,{style:fe.field,children:[u,b]}),n[6]=u,n[7]=b,n[8]=p):p=n[8],p}),Q={on:{selected:!0},off:{selected:!1}};function Z(e,t,n){return t?n?`${e}, picked, survives this consolidation`:`${e}, picked`:`${e}, not picked`}const ee=(0,d.memo)(function(e){const n=(0,a.c)(39),{session:o,picked:i,isWinner:c,now:d,onToggle:u,onCrown:h}=e,{theme:b}=(0,y.useUnistyles)();let p;n[0]!==u||n[1]!==o.id?(p=()=>u(o.id),n[0]=u,n[1]=o.id,n[2]=p):p=n[2];const x=p;let j;n[3]!==h||n[4]!==o.id?(j=()=>h(o.id),n[3]=h,n[4]=o.id,n[5]=j):j=n[5];const S=j;let v,k=f.Square;i&&(k=c?f.Crown:f.SquareCheck),n[6]!==c||n[7]!==i||n[8]!==o.title?(v=Z(o.title,i,c),n[6]=c,n[7]=i,n[8]=o.title,n[9]=v):v=n[9];const w=Q[i?"on":"off"],T=i?we:fe.pickRow,_=`reels-consolidate-pick-${o.id}`;let C,I,D;n[10]!==k||n[11]!==b.colors.accent?(C=(0,$.jsx)(t.View,{style:fe.pickMark,children:(0,$.jsx)(k,{size:16,color:b.colors.accent})}),n[10]=k,n[11]=b.colors.accent,n[12]=C):C=n[12],n[13]!==o.title?(I=(0,$.jsx)(s.Text,{style:fe.pickName,children:o.title}),n[13]=o.title,n[14]=I):I=n[14],n[15]!==d||n[16]!==o.lastActivityAt?(D=K(o.lastActivityAt,d),n[15]=d,n[16]=o.lastActivityAt,n[17]=D):D=n[17];const V=c&&i?" \xb7 survives":"";let z,R,L;return n[18]!==V||n[19]!==D?(z=(0,$.jsxs)(s.Text,{style:fe.pickAux,children:[D,V]}),n[18]=V,n[19]=D,n[20]=z):z=n[20],n[21]!==S||n[22]!==c||n[23]!==i||n[24]!==o.id||n[25]!==o.title||n[26]!==b.colors.foregroundMuted?(R=i&&!c?(0,$.jsx)(l.Pressable,{onPress:S,accessibilityRole:"button",accessibilityLabel:`Make ${o.title} the survivor`,hitSlop:8,style:fe.pickCrown,testID:`reels-consolidate-crown-${o.id}`,children:(0,$.jsx)(f.Crown,{size:14,color:b.colors.foregroundMuted})}):null,n[21]=S,n[22]=c,n[23]=i,n[24]=o.id,n[25]=o.title,n[26]=b.colors.foregroundMuted,n[27]=R):R=n[27],n[28]!==S||n[29]!==z||n[30]!==R||n[31]!==v||n[32]!==w||n[33]!==T||n[34]!==_||n[35]!==C||n[36]!==I||n[37]!==x?(L=(0,$.jsxs)(l.Pressable,{onPress:x,onLongPress:S,accessibilityRole:"button",accessibilityLabel:v,accessibilityState:w,style:T,testID:_,children:[C,I,z,R]}),n[28]=S,n[29]=z,n[30]=R,n[31]=v,n[32]=w,n[33]=T,n[34]=_,n[35]=C,n[36]=I,n[37]=x,n[38]=L):L=n[38],L}),te=(0,d.memo)(function(e){const n=(0,a.c)(67),{candidates:i,now:c,onCancel:u,onConsolidate:h,verbError:b}=e;let p;n[0]===Symbol.for("react.memo_cache_sentinel")?(p={},n[0]=p):p=n[0];const[y,f]=(0,d.useState)(p);let x;if(n[1]!==i||n[2]!==y){let e;n[4]!==y?(e=e=>y[e.id],n[4]=y,n[5]=e):e=n[5],x=i.filter(e),n[1]=i,n[2]=y,n[3]=x}else x=n[3];const j=x,[S,v]=(0,d.useState)(null);let k;n[6]!==j||n[7]!==S?(k=(0,P.consolidationTargets)(j,S),n[6]=j,n[7]=S,n[8]=k):k=n[8];const{winner:w,sourceIds:T}=k;let _;n[9]===Symbol.for("react.memo_cache_sentinel")?(_=e=>{f(t=>{const n=Object.assign({},t);return n[e]?delete n[e]:n[e]=!0,n})},n[9]=_):_=n[9];const C=_;let D;n[10]===Symbol.for("react.memo_cache_sentinel")?(D=e=>{v(e),f(t=>t[e]?t:Object.assign({},t,{[e]:!0}))},n[10]=D):D=n[10];const V=D;let z;n[11]!==j||n[12]!==w?(z=(0,P.canConsolidate)(j,w),n[11]=j,n[12]=w,n[13]=z):z=n[13];const R=z;let L;n[14]!==j||n[15]!==h||n[16]!==T||n[17]!==w?(L=()=>{w&&j.length>=2&&h(w,T)},n[14]=j,n[15]=h,n[16]=T,n[17]=w,n[18]=L):L=n[18];const A=(0,I.useDestructiveHold)(L,"consolidate");let O;n[19]!==A.progress?(O=Math.round(100*A.progress),n[19]=A.progress,n[20]=O):O=n[20];const M=`${O}%`;let H;n[21]!==M?(H=[fe.verbFill,{width:M}],n[21]=M,n[22]=H):H=n[22];const W=H;let F,B,N,G,K,q,U,Y;if(n[23]===Symbol.for("react.memo_cache_sentinel")?(F=(0,$.jsx)(s.Text,{style:fe.sheetTitle,children:"Consolidate"}),B=(0,$.jsx)(s.Text,{style:fe.hint,children:"The winner keeps its transcript. The others are archived and linked to it, both ways. Archived is a soft delete: still readable by id, same as Terminate."}),n[23]=F,n[24]=B):(F=n[23],B=n[24]),n[25]!==b?(N=b?(0,$.jsx)(s.Text,{style:fe.sendError,testID:"reels-verb-error",children:b}):null,n[25]=b,n[26]=N):N=n[26],n[27]!==i||n[28]!==c||n[29]!==y||n[30]!==w){let e;n[32]!==c||n[33]!==y||n[34]!==w?(e=e=>(0,$.jsx)(ee,{session:e,picked:Boolean(y[e.id]),isWinner:w===e.id,now:c,onToggle:C,onCrown:V},e.id),n[32]=c,n[33]=y,n[34]=w,n[35]=e):e=n[35],G=i.map(e),n[27]=i,n[28]=c,n[29]=y,n[30]=w,n[31]=G}else G=n[31];n[36]!==G?(K=(0,$.jsx)(o.ScrollView,{style:fe.pickList,children:G}),n[36]=G,n[37]=K):K=n[37],n[38]===Symbol.for("react.memo_cache_sentinel")?(q=(0,$.jsx)(s.Text,{style:fe.link,children:"cancel"}),n[38]=q):q=n[38],n[39]!==u?(U=(0,$.jsx)(l.Pressable,{onPress:u,accessibilityRole:"button",accessibilityLabel:"Cancel and close",style:fe.send,testID:"reels-consolidate-cancel",children:q}),n[39]=u,n[40]=U):U=n[40],n[41]!==R||n[42]!==A.handlers?(Y=R?A.handlers:{},n[41]=R,n[42]=A.handlers,n[43]=Y):Y=n[43];const X=!R,J=R?fe.send:ze,Q=`Consolidate ${T.length} sessions into the survivor. Hold to confirm.`;let Z;n[44]!==W||n[45]!==A.progress?(Z=A.progress>0?(0,$.jsx)(t.View,{style:W,testID:"reels-consolidate-hold-fill"}):null,n[44]=W,n[45]=A.progress,n[46]=Z):Z=n[46];const te=`hold to consolidate ${T.length}`;let ne,se,oe,le,ie;return n[47]!==A.hint||n[48]!==A.showLabel||n[49]!==te?(ne=E(A.showLabel,A.hint,te),n[47]=A.hint,n[48]=A.showLabel,n[49]=te,n[50]=ne):ne=n[50],n[51]!==ne?(se=(0,$.jsx)(s.Text,{style:fe.link,children:ne}),n[51]=ne,n[52]=se):se=n[52],n[53]!==Y||n[54]!==X||n[55]!==J||n[56]!==Q||n[57]!==Z||n[58]!==se?(oe=(0,$.jsxs)(l.Pressable,Object.assign({},Y,{disabled:X,style:J,accessibilityRole:"button",accessibilityLabel:Q,testID:"reels-consolidate-commit",children:[Z,se]})),n[53]=Y,n[54]=X,n[55]=J,n[56]=Q,n[57]=Z,n[58]=se,n[59]=oe):oe=n[59],n[60]!==U||n[61]!==oe?(le=(0,$.jsxs)(t.View,{style:fe.rowGap,children:[U,oe]}),n[60]=U,n[61]=oe,n[62]=le):le=n[62],n[63]!==N||n[64]!==K||n[65]!==le?(ie=(0,$.jsxs)(t.View,{style:fe.sheet,testID:"reels-consolidate",children:[F,B,N,K,le]}),n[63]=N,n[64]=K,n[65]=le,n[66]=ie):ie=n[66],ie}),ne=(0,d.memo)(function(e){const n=(0,a.c)(46),{verb:o,icon:i,label:c,onVerb:d}=e,{theme:u}=(0,y.useUnistyles)(),h="terminate"===o,{showLabel:b,progress:p,hint:f,handlers:x}=(0,I.useDestructiveHold)(d,o);let j;n[0]!==d||n[1]!==o?(j=()=>d(o),n[0]=d,n[1]=o,n[2]=j):j=n[2];const S=j;let v;n[3]!==p?(v=Math.round(100*p),n[3]=p,n[4]=v):v=n[4];const k=`${v}%`;let w;n[5]!==k?(w=[fe.verbFill,{width:k}],n[5]=k,n[6]=w):w=n[6];const T=w;if(!h){let e;n[7]!==c||n[8]!==o?(e=M(o,c),n[7]=c,n[8]=o,n[9]=e):e=n[9];const t=`reels-verb-${o}`;let a,d,h;return n[10]!==i||n[11]!==u.colors.foreground?(a=(0,$.jsx)(i,{size:18,color:u.colors.foreground}),n[10]=i,n[11]=u.colors.foreground,n[12]=a):a=n[12],n[13]!==c?(d=(0,$.jsx)(s.Text,{style:fe.verbWord,children:c}),n[13]=c,n[14]=d):d=n[14],n[15]!==e||n[16]!==t||n[17]!==a||n[18]!==d||n[19]!==S?(h=(0,$.jsxs)(l.Pressable,{onPress:S,style:fe.verbChip,accessibilityRole:"button",accessibilityLabel:e,hitSlop:8,testID:t,children:[a,d]}),n[15]=e,n[16]=t,n[17]=a,n[18]=d,n[19]=S,n[20]=h):h=n[20],h}let _;n[21]!==c||n[22]!==o?(_=M(o,c),n[21]=c,n[22]=o,n[23]=_):_=n[23];const C=`reels-verb-${o}`;let D,V;n[24]!==T||n[25]!==p?(D=p>0?(0,$.jsx)(t.View,{style:T,testID:"reels-verb-hold-fill"}):null,n[24]=T,n[25]=p,n[26]=D):D=n[26],n[27]!==i||n[28]!==u.colors.destructive?(V=(0,$.jsx)(i,{size:18,color:u.colors.destructive}),n[27]=i,n[28]=u.colors.destructive,n[29]=V):V=n[29];const z=b||f?Te:fe.verbWord;let R,L,P,A;return n[30]!==c||n[31]!==z?(R=(0,$.jsx)(s.Text,{style:z,children:c}),n[30]=c,n[31]=z,n[32]=R):R=n[32],n[33]!==f||n[34]!==b?(L=E(b,f,"hold to retire"),n[33]=f,n[34]=b,n[35]=L):L=n[35],n[36]!==L?(P=(0,$.jsx)(s.Text,{style:fe.verbHoldLabel,testID:"reels-verb-terminate-hold",children:L}),n[36]=L,n[37]=P):P=n[37],n[38]!==x||n[39]!==R||n[40]!==P||n[41]!==_||n[42]!==C||n[43]!==D||n[44]!==V?(A=(0,$.jsxs)(l.Pressable,Object.assign({},x,{style:fe.verbChip,accessibilityRole:"button",accessibilityLabel:_,hitSlop:8,testID:C,children:[D,V,R,P]})),n[38]=x,n[39]=R,n[40]=P,n[41]=_,n[42]=C,n[43]=D,n[44]=V,n[45]=A):A=n[45],A}),se=(0,d.memo)(function(e){const t=(0,a.c)(10),{everyMs:n,label:o,onPick:i}=e;let c;t[0]!==n||t[1]!==i?(c=()=>i(n),t[0]=n,t[1]=i,t[2]=c):c=t[2];const d=c,u=`reels-automate-${n}`;let h,b;return t[3]!==o?(h=(0,$.jsx)(s.Text,{style:fe.pickName,children:o}),t[3]=o,t[4]=h):h=t[4],t[5]!==o||t[6]!==d||t[7]!==u||t[8]!==h?(b=(0,$.jsx)(l.Pressable,{onPress:d,style:fe.pickRow,accessibilityRole:"button",accessibilityLabel:o,testID:u,children:h}),t[5]=o,t[6]=d,t[7]=u,t[8]=h,t[9]=b):b=t[9],b}),oe=Object.keys(N).sort((e,t)=>(0,j.getWorkspaceStateBucketPriority)(e)-(0,j.getWorkspaceStateBucketPriority)(t)),le={today:"Today","3d":"3 days","7d":"7 days","30d":"30 days",stale:"Stale"},ie={root:"Top-level",delegated:"Subagent"},re=S.SESSION_ORIGINS.map(e=>({origin:e,label:ie[e]})),ce=(0,d.memo)(function(e){const t=(0,a.c)(15),{value:n,label:o,mode:i,onCycle:c}=e;let d;t[0]!==c||t[1]!==n?(d=()=>c(n),t[0]=c,t[1]=n,t[2]=d):d=t[2];const u=d,h=Ce[i],b="include"===i;let p;t[3]!==b?(p=Ve(b),t[3]=b,t[4]=p):p=t[4];const y="neutral"===i?o:`${o}, ${"include"===i?"only":"excluded"}`,f=`reels-filter-${n}`,x="exclude"===i?"-":"";let j,S;return t[5]!==o||t[6]!==x?(j=(0,$.jsxs)(s.Text,{style:fe.tagChipText,children:[x,o]}),t[5]=o,t[6]=x,t[7]=j):j=t[7],t[8]!==u||t[9]!==h||t[10]!==p||t[11]!==y||t[12]!==f||t[13]!==j?(S=(0,$.jsx)(l.Pressable,{onPress:u,style:h,accessibilityRole:"button",accessibilityState:p,accessibilityLabel:y,testID:f,children:j}),t[8]=u,t[9]=h,t[10]=p,t[11]=y,t[12]=f,t[13]=j,t[14]=S):S=t[14],S}),ae=(0,d.memo)(function(e){const t=(0,a.c)(10),{target:n,label:o,onShare:i}=e;let c;t[0]!==i||t[1]!==n?(c=()=>i(n),t[0]=i,t[1]=n,t[2]=c):c=t[2];const d=c,u=`Send to ${o}`,h=`reels-share-${n}`;let b,p;return t[3]!==o?(b=(0,$.jsx)(s.Text,{style:fe.pickName,children:o}),t[3]=o,t[4]=b):b=t[4],t[5]!==d||t[6]!==u||t[7]!==h||t[8]!==b?(p=(0,$.jsx)(l.Pressable,{onPress:d,style:fe.pickRow,accessibilityRole:"button",accessibilityLabel:u,testID:h,children:b}),t[5]=d,t[6]=u,t[7]=h,t[8]=b,t[9]=p):p=t[9],p}),de=(0,d.memo)(function(e){const n=(0,a.c)(43),{verb:o,icon:i,label:c,detail:d,onVerb:u}=e,{theme:h}=(0,y.useUnistyles)(),b="terminate"===o,{showLabel:p,progress:f,hint:x,handlers:j}=(0,I.useDestructiveHold)(u,o);let S;n[0]!==u||n[1]!==o?(S=()=>u(o),n[0]=u,n[1]=o,n[2]=S):S=n[2];const v=S;let k;n[3]!==f?(k=Math.round(100*f),n[3]=f,n[4]=k):k=n[4];const w=`${k}%`;let T;n[5]!==w?(T=[fe.verbFill,{width:w}],n[5]=w,n[6]=T):T=n[6];const _=T;let C;n[7]!==b||n[8]!==j||n[9]!==v?(C=b?j:{onPress:v},n[7]=b,n[8]=j,n[9]=v,n[10]=C):C=n[10];const D=C;let V;n[11]!==c||n[12]!==o?(V=M(o,c),n[11]=c,n[12]=o,n[13]=V):V=n[13];const z=`reels-taco-${o}`;let R;n[14]!==b||n[15]!==f||n[16]!==_?(R=b&&f>0?(0,$.jsx)(t.View,{style:_,testID:"reels-taco-hold-fill"}):null,n[14]=b,n[15]=f,n[16]=_,n[17]=R):R=n[17];const L=b?h.colors.destructive:h.colors.foreground;let P,A,O,H,W,B,N;return n[18]!==i||n[19]!==L?(P=(0,$.jsx)(t.View,{style:fe.pickMark,children:(0,$.jsx)(i,{size:16,color:L})}),n[18]=i,n[19]=L,n[20]=P):P=n[20],n[21]!==c?(A=(0,$.jsx)(s.Text,{style:fe.pickName,children:c}),n[21]=c,n[22]=A):A=n[22],n[23]!==b||n[24]!==d||n[25]!==x||n[26]!==p?(O=b?E(p,x,"hold to retire"):d,n[23]=b,n[24]=d,n[25]=x,n[26]=p,n[27]=O):O=n[27],n[28]!==O?(H=(0,$.jsx)(s.Text,{style:fe.hint,children:O}),n[28]=O,n[29]=H):H=n[29],n[30]!==o?(W=F.has(o)?(0,$.jsx)(s.Text,{style:fe.pickAux,children:"not wired yet"}):null,n[30]=o,n[31]=W):W=n[31],n[32]!==A||n[33]!==H||n[34]!==W?(B=(0,$.jsxs)(t.View,{style:fe.grow,children:[A,H,W]}),n[32]=A,n[33]=H,n[34]=W,n[35]=B):B=n[35],n[36]!==D||n[37]!==P||n[38]!==B||n[39]!==V||n[40]!==z||n[41]!==R?(N=(0,$.jsxs)(l.Pressable,Object.assign({},D,{style:fe.pickRow,accessibilityRole:"button",accessibilityLabel:V,testID:z,children:[R,P,B]})),n[36]=D,n[37]=P,n[38]=B,n[39]=V,n[40]=z,n[41]=R,n[42]=N):N=n[42],N});function ue(e,t,n){if(t>0){const n=1===t?"filter":"filters";return{filteredOut:!0,exit:"clear-filters",message:`No sessions match. ${e.length} in the fleet, ${t} ${n} on.`}}const s=e.filter(e=>(0,z.isSnoozed)(e,n));if(0===s.length)return{filteredOut:!1,exit:"leave",message:"No sessions in the ring."};const o=s.map(e=>e.snoozedUntil?Date.parse(e.snoozedUntil):Number.NaN).filter(e=>Number.isFinite(e)&&e>n.getTime()).sort((e,t)=>e-t)[0],l=o?` Next one wakes ${he(new Date(o),n)}.`:"",i=1===s.length?"session is":"sessions are";return{filteredOut:!1,exit:"leave",message:`All ${s.length} ${i} snoozed.${l}`}}function he(e,t){const n=e.getTime()-t.getTime();if(!Number.isFinite(n)||n<=0)return"any moment";const s=Math.round(n/6e4);if(s<60)return`in ${s}m`;const o=Math.round(s/60);return o<24?`in ${o}h`:`in ${Math.round(o/24)}d`}function be(e){const t=e.digest,n=t?.summary??t?.goal,s=[t?.goal,t?.nextStep,t?.blockers?.length?t.blockers.join("\n"):void 0].filter(e=>Boolean(e&&e!==n));return s.length>0?s.join("\n\n"):""}const ge=(0,d.memo)(function({mode:e,text:n,active:o}){const l=(0,d.useRef)(new c.Animated.Value(0)).current,i=o&&"text"===e&&n.length>0;(0,d.useEffect)(()=>{if(!i)return;const e=c.Animated.loop(c.Animated.sequence([c.Animated.timing(l,{toValue:-96,duration:24e3,easing:u.default.inOut(u.default.quad),useNativeDriver:!1}),c.Animated.timing(l,{toValue:0,duration:24e3,easing:u.default.inOut(u.default.quad),useNativeDriver:!1})]));return e.start(),()=>{e.stop(),l.setValue(0)}},[i,l]);const a=(0,d.useMemo)(()=>({transform:[{translateY:l}]}),[l]);return"off"===e?null:(0,$.jsx)(t.View,{style:"text"===e?Re:fe.background,testID:`reels-background-${e}`,children:"text"===e?(0,$.jsx)(c.Animated.View,{style:a,children:(0,$.jsx)(s.Text,{style:fe.backgroundBody,numberOfLines:40,children:n})}):null})}),pe=(0,d.memo)(function(e){const n=(0,a.c)(28),{gated:o,allTags:l,onPickTag:i,decision:c,decisions:d,serverId:u,agentId:h,onAnswered:b,onVerb:p,actAllowed:y,capLabel:f,tagError:x}=e;if(o){let e,o,c;return n[0]!==l||n[1]!==i?(e=(0,$.jsx)(T.TagGate,{available:l,onPick:i}),n[0]=l,n[1]=i,n[2]=e):e=n[2],n[3]!==x?(o=x?(0,$.jsx)(s.Text,{style:fe.sendError,testID:"reels-verb-error",children:x}):null,n[3]=x,n[4]=o):o=n[4],n[5]!==e||n[6]!==o?(c=(0,$.jsxs)(t.View,{children:[e,o]}),n[5]=e,n[6]=o,n[7]=c):c=n[7],c}if(c){if(!y){let e,o,l,i,c;return n[8]!==f?(e=(0,$.jsx)(s.Text,{style:fe.hint,children:f}),n[8]=f,n[9]=e):e=n[9],n[10]===Symbol.for("react.memo_cache_sentinel")?(o=(0,$.jsx)(s.Text,{style:fe.cardTapHint,children:"Decisions are done for today. You can still retire or snooze this one."}),n[10]=o):o=n[10],n[11]!==p?(l=T.TACO_VERBS.map(e=>(0,$.jsx)(ne,{verb:e.id,icon:e.icon,label:e.label,onVerb:p},e.id)),n[11]=p,n[12]=l):l=n[12],n[13]!==l?(i=(0,$.jsx)(t.View,{style:fe.rowGap,children:l}),n[13]=l,n[14]=i):i=n[14],n[15]!==e||n[16]!==i?(c=(0,$.jsxs)(t.View,{testID:"reels-cap-reached",children:[e,o,i]}),n[15]=e,n[16]=i,n[17]=c):c=n[17],c}let e;return n[18]!==h||n[19]!==d||n[20]!==b||n[21]!==u?(e=(0,$.jsx)(w.DecisionChips,{serverId:u,agentId:h,decisions:d,onAnswered:b}),n[18]=h,n[19]=d,n[20]=b,n[21]=u,n[22]=e):e=n[22],e}let j,S,v;return n[23]===Symbol.for("react.memo_cache_sentinel")?(j=(0,$.jsx)(s.Text,{style:fe.hint,children:"Nothing to decide. Why is this still open?"}),n[23]=j):j=n[23],n[24]!==p?(S=T.TACO_VERBS.map(e=>(0,$.jsx)(ne,{verb:e.id,icon:e.icon,label:e.label,onVerb:p},e.id)),n[24]=p,n[25]=S):S=n[25],n[26]!==S?(v=(0,$.jsxs)(t.View,{testID:"reels-taco-row",children:[j,(0,$.jsx)(t.View,{style:fe.rowGap,children:S})]}),n[26]=S,n[27]=v):v=n[27],v}),me=(0,d.memo)(function(e){const n=(0,a.c)(82),{overlay:i,session:c,ring:d,now:u,decisionTarget:h,onClose:b,onSend:p,onSnooze:y,onConsolidate:f,onKanban:j,onVerb:S,overlayStyle:w,sendError:_,timeFieldDisarmed:C,actAllowed:I,verbError:D,openDecisions:V,onShare:z,onAutomate:R,allTags:L,allProviders:P,statusSelection:A,tagSelection:O,kanbanSelection:E,providerSelection:M,originSelection:H,timeSelection:W,onCycleStatus:F,onCycleTag:B,onCycleKanban:N,onCycleProvider:K,onCycleOrigin:q,onToggleTimeWindow:X}=e,J=c;let Q;n[0]!==X?(Q=e=>X(e),n[0]=X,n[1]=Q):Q=n[1];const Z=Q,ee=(0,k.useKanbanBuckets)();U("none"!==i.kind,b);const ne="caption"===i.kind;let ie,ue,he,be,ge,pe,me,ye,je;return n[2]!==I||n[3]!==J||n[4]!==h||n[5]!==b||n[6]!==p||n[7]!==V||n[8]!==_||n[9]!==ne?(ie=(0,$.jsx)(Y,{session:J,visible:ne,onClose:b,onSend:p,sendError:_,openDecisions:V,target:h,actAllowed:I},J.id),n[2]=I,n[3]=J,n[4]=h,n[5]=b,n[6]=p,n[7]=V,n[8]=_,n[9]=ne,n[10]=ie):ie=n[10],n[11]!==J.snoozeCount||n[12]!==u||n[13]!==b||n[14]!==y||n[15]!==i.kind||n[16]!==w||n[17]!==D?(ue="snooze"===i.kind?(0,$.jsx)(t.View,{style:w,children:(0,$.jsxs)(t.View,{children:[(0,$.jsx)(T.SnoozeSheet,{priorCount:J.snoozeCount,now:u,onCancel:b,onSnooze:y}),D?(0,$.jsx)(s.Text,{style:fe.sendError,testID:"reels-verb-error",children:D}):null]})}):null,n[11]=J.snoozeCount,n[12]=u,n[13]=b,n[14]=y,n[15]=i.kind,n[16]=w,n[17]=D,n[18]=ue):ue=n[18],n[19]!==u||n[20]!==b||n[21]!==f||n[22]!==i.kind||n[23]!==w||n[24]!==d||n[25]!==D?(he="consolidate"===i.kind?(0,$.jsx)(t.View,{style:w,children:(0,$.jsx)(te,{candidates:d,now:u,onCancel:b,onConsolidate:f,verbError:D})}):null,n[19]=u,n[20]=b,n[21]=f,n[22]=i.kind,n[23]=w,n[24]=d,n[25]=D,n[26]=he):he=n[26],n[27]!==b||n[28]!==S||n[29]!==i.kind||n[30]!==w?(be="taco"===i.kind?(0,$.jsx)(t.View,{style:w,children:(0,$.jsxs)(t.View,{style:fe.sheet,testID:"reels-taco-sheet",children:[(0,$.jsx)(s.Text,{style:fe.sheetTitle,children:"TACO"}),T.TACO_VERBS.map(e=>(0,$.jsx)(de,{verb:e.id,icon:e.icon,label:e.label,detail:e.detail,onVerb:S},e.id)),(0,$.jsx)(l.Pressable,{onPress:b,accessibilityRole:"button",accessibilityLabel:"Cancel and close",style:fe.send,testID:"reels-taco-cancel",children:(0,$.jsx)(s.Text,{style:fe.link,children:"cancel"})})]})}):null,n[27]=b,n[28]=S,n[29]=i.kind,n[30]=w,n[31]=be):be=n[31],n[32]!==P||n[33]!==L||n[34]!==ee||n[35]!==E||n[36]!==b||n[37]!==N||n[38]!==q||n[39]!==K||n[40]!==F||n[41]!==B||n[42]!==Z||n[43]!==H||n[44]!==i.kind||n[45]!==w||n[46]!==M||n[47]!==A||n[48]!==O||n[49]!==C||n[50]!==W?(ge="filters"===i.kind?(0,$.jsx)(t.View,{style:w,children:(0,$.jsxs)(o.ScrollView,{style:fe.sheet,testID:"reels-filters-sheet",children:[(0,$.jsx)(s.Text,{style:fe.sheetTitle,children:"Filter the ring"}),(0,$.jsx)(s.Text,{style:fe.hint,children:"The same filter the sessions list uses, so setting it here sets it there."}),(0,$.jsx)(s.Text,{style:fe.fieldLabel,children:"State"}),(0,$.jsx)(t.View,{style:fe.rowGap,children:oe.map(e=>(0,$.jsx)(ce,{value:e,label:G(e),mode:(0,x.getFilterValueMode)(A,e),onCycle:F},e))}),(0,$.jsx)(s.Text,{style:fe.fieldLabel,children:"Kanban"}),(0,$.jsx)(t.View,{style:fe.rowGap,children:ee.map(e=>(0,$.jsx)(ce,{value:e.id,label:e.label,mode:(0,x.getFilterValueMode)(E,e.id),onCycle:N},e.id))}),(0,$.jsx)(s.Text,{style:fe.fieldLabel,children:"Tag"}),(0,$.jsx)(t.View,{style:fe.rowGap,children:L.map(e=>(0,$.jsx)(ce,{value:e,label:e,mode:(0,x.getFilterValueMode)(O,e),onCycle:B},e))}),(0,$.jsx)(s.Text,{style:fe.fieldLabel,children:"Date"}),C?(0,$.jsx)(s.Text,{style:fe.hint,testID:"reels-filter-date-off",children:"Off while dates are measured on when a session was archived. The ring only holds live sessions. Change it on the sessions bar to filter by date here."}):(0,$.jsx)(t.View,{style:fe.rowGap,children:v.SESSION_TIME_WINDOWS.map(e=>(0,$.jsx)(ce,{value:e,label:le[e],mode:"window"===W?.kind&&W.window===e?"include":"neutral",onCycle:Z},e))}),(0,$.jsx)(s.Text,{style:fe.fieldLabel,children:"Provider"}),(0,$.jsx)(t.View,{style:fe.rowGap,children:P.map(e=>(0,$.jsx)(ce,{value:e,label:e,mode:(0,x.getFilterValueMode)(M,e),onCycle:K},e))}),(0,$.jsx)(s.Text,{style:fe.fieldLabel,children:"Origin"}),(0,$.jsx)(t.View,{style:fe.rowGap,children:re.map(e=>(0,$.jsx)(ce,{value:e.origin,label:e.label,mode:(0,x.getFilterValueMode)(H,e.origin),onCycle:q},e.origin))}),(0,$.jsx)(l.Pressable,{onPress:b,accessibilityRole:"button",accessibilityLabel:"Done, close filters",style:fe.send,testID:"reels-filters-done",children:(0,$.jsx)(s.Text,{style:fe.link,children:"done"})})]})}):null,n[32]=P,n[33]=L,n[34]=ee,n[35]=E,n[36]=b,n[37]=N,n[38]=q,n[39]=K,n[40]=F,n[41]=B,n[42]=Z,n[43]=H,n[44]=i.kind,n[45]=w,n[46]=M,n[47]=A,n[48]=O,n[49]=C,n[50]=W,n[51]=ge):ge=n[51],n[52]!==R||n[53]!==b||n[54]!==i.kind||n[55]!==w||n[56]!==D?(pe="automate"===i.kind?(0,$.jsx)(t.View,{style:w,children:(0,$.jsxs)(t.View,{style:fe.sheet,testID:"reels-automate-sheet",children:[(0,$.jsx)(s.Text,{style:fe.sheetTitle,children:"Automate"}),(0,$.jsx)(s.Text,{style:fe.hint,children:"Re-runs this session on a cadence, with its next step as the prompt."}),D?(0,$.jsx)(s.Text,{style:fe.sendError,testID:"reels-verb-error",children:D}):null,$e.map(e=>(0,$.jsx)(se,{everyMs:e.everyMs,label:e.label,onPick:R},e.id)),(0,$.jsx)(l.Pressable,{onPress:b,accessibilityRole:"button",accessibilityLabel:"Cancel and close",style:fe.send,testID:"reels-automate-cancel",children:(0,$.jsx)(s.Text,{style:fe.link,children:"cancel"})})]})}):null,n[52]=R,n[53]=b,n[54]=i.kind,n[55]=w,n[56]=D,n[57]=pe):pe=n[57],n[58]!==b||n[59]!==z||n[60]!==i.kind||n[61]!==w||n[62]!==D?(me="share"===i.kind?(0,$.jsx)(t.View,{style:w,children:(0,$.jsxs)(t.View,{style:fe.sheet,testID:"reels-share-sheet",children:[(0,$.jsx)(s.Text,{style:fe.sheetTitle,children:"Send"}),(0,$.jsx)(s.Text,{style:fe.hint,children:"Send this card somewhere a person will read it."}),D?(0,$.jsx)(s.Text,{style:fe.sendError,testID:"reels-verb-error",children:D}):null,xe.map(e=>(0,$.jsx)(ae,{target:e.id,label:e.label,onShare:z},e.id)),(0,$.jsx)(l.Pressable,{onPress:b,accessibilityRole:"button",accessibilityLabel:"Cancel and close",style:fe.send,testID:"reels-share-cancel",children:(0,$.jsx)(s.Text,{style:fe.link,children:"cancel"})})]})}):null,n[58]=b,n[59]=z,n[60]=i.kind,n[61]=w,n[62]=D,n[63]=me):me=n[63],n[64]!==J.kanban||n[65]!==J.model||n[66]!==J.provider||n[67]!==b||n[68]!==j||n[69]!==i.kind||n[70]!==w||n[71]!==D?(ye="options"===i.kind?(0,$.jsx)(t.View,{style:w,children:(0,$.jsxs)(o.ScrollView,{style:fe.sheet,testID:"reels-options-sheet",children:[(0,$.jsx)(s.Text,{style:fe.sheetTitle,children:"Session options"}),(0,$.jsx)(s.Text,{style:fe.fieldLabel,children:"Kanban"}),(0,$.jsx)(T.KanbanPicker,{current:J.kanban,onPick:j}),D?(0,$.jsx)(s.Text,{style:fe.sendError,testID:"reels-verb-error",children:D}):null,(0,$.jsx)(s.Text,{style:fe.fieldLabel,children:"Provider and model"}),(0,$.jsx)(s.Text,{style:fe.fieldValue,children:J.model?`${J.provider}/${J.model}`:J.provider}),(0,$.jsx)(s.Text,{style:fe.hint,children:"One control in the app, not two: combined-model-selector with favourites."}),(0,$.jsx)(l.Pressable,{onPress:b,accessibilityRole:"button",accessibilityLabel:"Close session options",style:fe.send,testID:"reels-options-close",children:(0,$.jsx)(s.Text,{style:fe.link,children:"close"})})]})}):null,n[64]=J.kanban,n[65]=J.model,n[66]=J.provider,n[67]=b,n[68]=j,n[69]=i.kind,n[70]=w,n[71]=D,n[72]=ye):ye=n[72],n[73]!==ye||n[74]!==ie||n[75]!==ue||n[76]!==he||n[77]!==be||n[78]!==ge||n[79]!==pe||n[80]!==me?(je=(0,$.jsxs)($.Fragment,{children:[ie,ue,he,be,ge,pe,me,ye]}),n[73]=ye,n[74]=ie,n[75]=ue,n[76]=he,n[77]=be,n[78]=ge,n[79]=pe,n[80]=me,n[81]=je):je=n[81],je}),ye=(0,d.memo)(function(e){const n=(0,a.c)(202),{sessions:o,allTags:i,actCap:c,background:u,now:h,onLeaveRing:b}=e,y=void 0===c?R.DEFAULT_ACT_CAP:c,x=void 0===u?"text":u,j=(0,D.useReelsVerbs)(),{answer:S}=(0,C.useAnswerDecision)(),[v,k]=(0,d.useState)(Ee);let w,I,P;n[0]!==h?(w=()=>{if(h)return;const e=setInterval(()=>k(Date.now()),6e4);return()=>clearInterval(e)},I=[h],n[0]=h,n[1]=w,n[2]=I):(w=n[1],I=n[2]),(0,d.useEffect)(w,I),n[3]!==h||n[4]!==v?(P=h??new Date(v),n[3]=h,n[4]=v,n[5]=P):P=n[5];const A=P,[O,E]=(0,d.useState)(1),M=(0,L.useActBudgetStore)(Me);let F;n[6]!==A?(F=e=>(0,L.actsOn)(e,A),n[6]=A,n[7]=F):F=n[7];const N=(0,L.useActBudgetStore)(F);let G;n[8]!==A||n[9]!==M?(G=()=>M(A),n[8]=A,n[9]=M,n[10]=G):G=n[10];const K=G,[U,Y]=(0,d.useState)(0);let X;n[11]===Symbol.for("react.memo_cache_sentinel")?(X={kind:"none"},n[11]=X):X=n[11];const[J,Q]=(0,d.useState)(X);let Z;n[12]===Symbol.for("react.memo_cache_sentinel")?(Z={},n[12]=Z):Z=n[12];const[ee,te]=(0,d.useState)(Z);let ne;n[13]===Symbol.for("react.memo_cache_sentinel")?(ne={},n[13]=ne):ne=n[13];const[se,oe]=(0,d.useState)(ne),[le,ie]=(0,d.useState)(null),[re,ce]=(0,d.useState)(W);let ae;n[14]===Symbol.for("react.memo_cache_sentinel")?(ae=(e,t)=>{ce(n=>Object.assign({},n,{[e]:t}))},n[14]=ae):ae=n[14];const de=ae,he=(0,d.useRef)(null);let ye;n[15]!==se||n[16]!==O||n[17]!==ee||n[18]!==A||n[19]!==o?(ye={sessions:o,localTags:ee,actedLaps:se,laps:O,now:A},n[15]=se,n[16]=O,n[17]=ee,n[18]=A,n[19]=o,n[20]=ye):ye=n[20];const{feed:xe,activeFilters:je,statusSelection:ve,tagSelection:ke,kanbanSelection:we,providerSelection:Te,originSelection:Ce,timeSelection:Ie,onCycleStatus:De,onCycleTag:Ve,onCycleKanban:ze,onCycleProvider:Re,onCycleOrigin:$e,onToggleTimeWindow:Ae,onClearFilters:Oe,timeFieldDisarmed:Ge}=(0,V.useReelsFeed)(ye);let Ke;n[21]!==o?(Ke=[...new Set(o.map(He))].sort(),n[21]=o,n[22]=Ke):Ke=n[22];const qe=Ke,Ue=xe[Math.min(U,Math.max(xe.length-1,0))]??null,Ye=Ue?.session??null,Xe=Ue?.lap??1;let Je;n[23]!==Xe?(Je=e=>e.lap===Xe,n[23]=Xe,n[24]=Je):Je=n[24];const Qe=xe.findIndex(Je);let Ze;if(n[25]!==xe||n[26]!==Xe){let e;n[28]!==Xe?(e=e=>e.lap===Xe,n[28]=Xe,n[29]=e):e=n[29],Ze=xe.filter(e),n[25]=xe,n[26]=Xe,n[27]=Ze}else Ze=n[27];const et=Ze.length;let tt;if(n[30]!==xe||n[31]!==Xe){let e;n[33]!==Xe?(e=e=>e.lap===Xe,n[33]=Xe,n[34]=e):e=n[34],tt=xe.filter(e).map(We),n[30]=xe,n[31]=Xe,n[32]=tt}else tt=n[32];const nt=tt,st=Ye?.id??"",ot=Ye?.serverId??"";let lt;var it;n[35]!==Ye?(lt=Ye?(it=Ye.digest,(it?.pendingDecisions??[]).filter(e=>!e.answeredAt)):[],n[35]=Ye,n[36]=lt):lt=n[36];const rt=lt,ct=rt[0]??null;let at;n[37]!==rt?(at=rt.map(Fe),n[37]=rt,n[38]=at):at=n[38];const dt=at,ut=rt,ht=!!Ye&&0===Ye.tags.length;let bt;n[39]!==y||n[40]!==N?(bt=(0,R.canAct)({acts:N,cap:y}),n[39]=y,n[40]=N,n[41]=bt):bt=n[41];const gt=bt;let pt;n[42]!==y||n[43]!==N?(pt=(0,R.actCapLabel)({acts:N,cap:y}),n[42]=y,n[43]=N,n[44]=pt):pt=n[44];const mt=pt,yt=(0,p.useSafeAreaInsets)();let ft;n[45]!==yt.top?(ft=[fe.headerSlot,{paddingTop:yt.top}],n[45]=yt.top,n[46]=ft):ft=n[46];const xt=ft,jt=yt.top+56;let St;n[47]!==jt?(St=[fe.seamBanner,{paddingTop:jt}],n[47]=jt,n[48]=St):St=n[48];const vt=St;let kt;n[49]!==yt.bottom||n[50]!==yt.top?(kt=[fe.overlay,{paddingTop:yt.top,paddingBottom:yt.bottom}],n[49]=yt.bottom,n[50]=yt.top,n[51]=kt):kt=n[51];const wt=kt;let Tt;n[52]!==U?(Tt=()=>{Q({kind:"none"}),he.current?.scrollToIndex(U+1)},n[52]=U,n[53]=Tt):Tt=n[53];const _t=Tt;let Ct;n[54]!==Xe?(Ct=e=>{oe(t=>Object.assign({},t,{[e]:Xe}))},n[54]=Xe,n[55]=Ct):Ct=n[55];const It=Ct;let Dt;n[56]===Symbol.for("react.memo_cache_sentinel")?(Dt=()=>{E(Be)},n[56]=Dt):Dt=n[56];const Vt=Dt;let zt,Rt,Lt,Pt,$t,At,Ot;n[57]===Symbol.for("react.memo_cache_sentinel")?(zt={id:"read",icon:f.BookOpen,label:"read"},n[57]=zt):zt=n[57],n[58]!==ht?(Rt={id:"snooze",icon:f.AlarmClock,label:"snooze",disabled:ht},n[58]=ht,n[59]=Rt):Rt=n[59],n[60]===Symbol.for("react.memo_cache_sentinel")?(Lt={id:"share",icon:f.Send,label:"send"},n[60]=Lt):Lt=n[60],n[61]!==ht?(Pt={id:"taco",icon:f.LayoutList,label:"TACO",disabled:ht},n[61]=ht,n[62]=Pt):Pt=n[62],n[63]===Symbol.for("react.memo_cache_sentinel")?($t={id:"archive",icon:f.Archive,label:"archive",destructive:!0},At={id:"options",icon:f.MoreHorizontal,label:"options"},n[63]=$t,n[64]=At):($t=n[63],At=n[64]),n[65]!==Rt||n[66]!==Pt?(Ot=[zt,Rt,Lt,Pt,$t,At],n[65]=Rt,n[66]=Pt,n[67]=Ot):Ot=n[67];const Et=Ot;let Mt;n[68]===Symbol.for("react.memo_cache_sentinel")?(Mt=()=>Q({kind:"caption"}),n[68]=Mt):Mt=n[68];const Ht=Mt;let Wt;n[69]===Symbol.for("react.memo_cache_sentinel")?(Wt=()=>Q({kind:"none"}),n[69]=Wt):Wt=n[69];const Ft=Wt;let Bt;n[70]===Symbol.for("react.memo_cache_sentinel")?(Bt=()=>Q({kind:"filters"}),n[70]=Bt):Bt=n[70];const Nt=Bt;let Gt;n[71]===Symbol.for("react.memo_cache_sentinel")?(Gt=e=>{te(t=>{const n=Object.assign({},t);return delete n[e],n})},n[71]=Gt):Gt=n[71];const Kt=Gt;let qt;n[72]!==st||n[73]!==ot||n[74]!==j?(qt=e=>{te(t=>Object.assign({},t,{[st]:[e]})),de("tag",null),j.setTags({serverId:ot,agentId:st},[e]).catch(e=>{Kt(st),de("tag",e instanceof Error?e.message:"could not tag this session")})},n[72]=st,n[73]=ot,n[74]=j,n[75]=qt):qt=n[75];const Ut=qt;let Yt;n[76]!==_t||n[77]!==st||n[78]!==rt.length||n[79]!==It||n[80]!==K?(Yt=()=>{K(),It(st),rt.length<=1&&_t()},n[76]=_t,n[77]=st,n[78]=rt.length,n[79]=It,n[80]=K,n[81]=Yt):Yt=n[81];const Xt=Yt;let Jt;n[82]!==_t||n[83]!==st||n[84]!==It||n[85]!==ot||n[86]!==j?(Jt=async e=>{if("terminate"===e)return await j.terminate({serverId:ot,agentId:st}),It(st),void _t();ce(W),Q({kind:Pe[e]})},n[82]=_t,n[83]=st,n[84]=It,n[85]=ot,n[86]=j,n[87]=Jt):Jt=n[87];const Qt=Jt;let Zt;n[88]!==Qt?(Zt=e=>{if(ce(W),"archive"===e)return Qt("terminate");const t=Le[e];t&&Q({kind:t})},n[88]=Qt,n[89]=Zt):Zt=n[89];const en=Zt;let tn;n[90]!==_t||n[91]!==st||n[92]!==It||n[93]!==ot||n[94]!==j?(tn=e=>{de("snooze",null),j.snooze({serverId:ot,agentId:st},e.until,e.untilWhat,e.why).then(()=>(It(st),_t(),null)).catch(e=>{de("snooze",e instanceof Error?e.message:"could not snooze this session")})},n[90]=_t,n[91]=st,n[92]=It,n[93]=ot,n[94]=j,n[95]=tn):tn=n[95];const nn=tn;let sn;n[96]!==_t||n[97]!==It||n[98]!==ot||n[99]!==j?(sn=(e,t)=>{de("consolidate",null),j.consolidate({serverId:ot,winnerId:e,sourceIds:t}).then(()=>{for(const n of[e,...t])It(n);return _t(),null}).catch(e=>{de("consolidate",e instanceof Error?e.message:"could not consolidate these sessions")})},n[96]=_t,n[97]=It,n[98]=ot,n[99]=j,n[100]=sn):sn=n[100];const on=sn;let ln;n[101]!==gt||n[102]!==S||n[103]!==st||n[104]!==ct||n[105]!==Xt||n[106]!==ot?(ln=e=>{if(!gt)return void Q({kind:"none"});const t=e.trim();0!==t.length&&ct?(ie(null),S({serverId:ot,agentId:st,decisionId:ct.id,optionId:null,note:t}).then(()=>(Xt(),null)).catch(e=>{ie(e instanceof Error?e.message:String(e))})):Q({kind:"none"})},n[101]=gt,n[102]=S,n[103]=st,n[104]=ct,n[105]=Xt,n[106]=ot,n[107]=ln):ln=n[107];const rn=ln;let cn;n[108]!==Ye||n[109]!==j?(cn=e=>{Ye&&(de("share",null),j.share(e,Se(Ye)).then(()=>(Q({kind:"none"}),null)).catch(e=>{de("share",e instanceof Error?e.message:"could not open that")}))},n[108]=Ye,n[109]=j,n[110]=cn):cn=n[110];const an=cn;let dn;n[111]!==_t||n[112]!==Ye||n[113]!==st||n[114]!==It||n[115]!==ot||n[116]!==j?(dn=e=>{if(!Ye)return;de("automate",null);const t=Ye.digest?.nextStep??Ye.digest?.goal??`Continue ${Ye.title}`;j.automate({serverId:ot,agentId:st},e,t,Ye.title).then(()=>(It(st),_t(),null)).catch(e=>{de("automate",e instanceof Error?e.message:"could not create the routine")})},n[111]=_t,n[112]=Ye,n[113]=st,n[114]=It,n[115]=ot,n[116]=j,n[117]=dn):dn=n[117];const un=dn;let hn;n[118]!==st||n[119]!==ot||n[120]!==j?(hn=e=>{de("kanban",null),j.setKanban({serverId:ot,agentId:st},e).then(()=>(Q({kind:"none"}),null)).catch(e=>{de("kanban",e instanceof Error?e.message:"could not move this session")})},n[118]=st,n[119]=ot,n[120]=j,n[121]=hn):hn=n[121];const bn=hn;let gn;n[122]!==i||n[123]!==gt||n[124]!==x||n[125]!==mt||n[126]!==ct||n[127]!==ut||n[128]!==xe||n[129]!==ht||n[130]!==U||n[131]!==A||n[132]!==Xt||n[133]!==en||n[134]!==Qt||n[135]!==Ut||n[136]!==Et||n[137]!==nt.length||n[138]!==vt||n[139]!==re.tag?(gn=(e,n)=>{const o=n===U,c=e.session;return(0,$.jsxs)(t.View,{style:fe.card,children:[(0,$.jsx)(ge,{mode:x,text:be(c),active:o}),e.firstOfLap&&e.lap>1?(0,$.jsx)(t.View,{style:vt,testID:`reels-seam-${e.lap}`,children:(0,$.jsx)(T.LapSeam,{lap:e.lap,ringSize:xe.filter(t=>t.lap===e.lap-1).length||nt.length,acted:(0,z.actedThisLap)(xe.filter(t=>t.lap===e.lap-1).map(Ne),e.lap-1)})}):null,(0,$.jsx)(t.View,{style:fe.middle,children:o?(0,$.jsx)(T.ReelsRail,{actions:Et,contextLabel:c.tags[0]??"untagged",onAction:en}):null}),(0,$.jsxs)(t.View,{style:fe.bottom,children:[(0,$.jsxs)(l.Pressable,{onPress:o?Ht:void 0,disabled:!o,testID:o?"reels-caption-open":void 0,accessibilityRole:"button",accessibilityLabel:`Open the full digest for ${c.title}`,style:fe.captionTap,children:[(0,$.jsx)(s.Text,{style:fe.cardTitle,children:c.title}),(0,$.jsx)(s.Text,{style:fe.cardMeta,children:q(c,A)}),(0,$.jsx)(s.Text,{style:fe.cardSummary,numberOfLines:4,children:c.digest?.summary??c.digest?.goal??"No digest yet."}),o?(0,$.jsx)(s.Text,{style:fe.cardTapHint,children:"tap for the whole digest and to talk to it"}):null]}),o?(0,$.jsx)(pe,{gated:ht,allTags:i,onPickTag:Ut,decision:ct,decisions:ut,serverId:c.serverId,agentId:c.id,onAnswered:Xt,onVerb:Qt,actAllowed:gt,capLabel:mt,tagError:re.tag}):null]})]})},n[122]=i,n[123]=gt,n[124]=x,n[125]=mt,n[126]=ct,n[127]=ut,n[128]=xe,n[129]=ht,n[130]=U,n[131]=A,n[132]=Xt,n[133]=en,n[134]=Qt,n[135]=Ut,n[136]=Et,n[137]=nt.length,n[138]=vt,n[139]=re.tag,n[140]=gn):gn=n[140];const pn=gn;if(!Ye){let e;n[141]!==je||n[142]!==A||n[143]!==o?(e=ue(o,je,A),n[141]=je,n[142]=A,n[143]=o,n[144]=e):e=n[144];const{message:i,exit:c}=e;let a,d,u;return n[145]!==i?(a=(0,$.jsx)(s.Text,{style:fe.fieldValue,children:i}),n[145]=i,n[146]=a):a=n[146],n[147]!==c||n[148]!==Oe||n[149]!==b?(d="clear-filters"===c?(0,$.jsx)(l.Pressable,{onPress:Oe,style:fe.send,accessibilityRole:"button",accessibilityLabel:"Clear all filters",testID:"reels-empty-clear-filters",children:(0,$.jsx)(s.Text,{style:fe.link,children:"clear filters"})}):(0,$.jsx)(l.Pressable,{onPress:b,style:fe.send,accessibilityRole:"button",accessibilityLabel:"Back to the sessions list",testID:"reels-empty-leave",children:(0,$.jsx)(s.Text,{style:fe.link,children:"back to sessions"})}),n[147]=c,n[148]=Oe,n[149]=b,n[150]=d):d=n[150],n[151]!==a||n[152]!==d?(u=(0,$.jsxs)(t.View,{style:fe.empty,testID:"reels-empty",children:[a,d]}),n[151]=a,n[152]=d,n[153]=u):u=n[153],u}let mn;n[154]!==xe||n[155]!==pn?(mn=(0,$.jsx)(_.ReelsPager,{data:xe,keyExtractor:B,renderCard:pn,onIndexChange:Y,onEndReached:Vt,controllerRef:he}),n[154]=xe,n[155]=pn,n[156]=mn):mn=n[156];const yn=`${Qe>=0?U-Qe+1:U+1}/${et} \xb7 lap ${Xe}`;let fn,xn;n[157]!==y||n[158]!==je||n[159]!==N||n[160]!==yn?(fn=(0,$.jsx)(T.ReelsHeader,{acts:N,cap:y,activeFilters:je,onFilter:Nt,position:yn}),n[157]=y,n[158]=je,n[159]=N,n[160]=yn,n[161]=fn):fn=n[161],n[162]!==xt||n[163]!==fn?(xn=(0,$.jsx)(t.View,{style:xt,pointerEvents:"box-none",children:fn}),n[162]=xt,n[163]=fn,n[164]=xn):xn=n[164];const jn=re[H[J.kind]??"share"];let Sn,vn;return n[165]!==qe||n[166]!==i||n[167]!==gt||n[168]!==Ye||n[169]!==ct||n[170]!==we||n[171]!==A||n[172]!==un||n[173]!==rn||n[174]!==on||n[175]!==ze||n[176]!==$e||n[177]!==Re||n[178]!==De||n[179]!==Ve||n[180]!==bn||n[181]!==an||n[182]!==nn||n[183]!==Ae||n[184]!==Qt||n[185]!==dt||n[186]!==Ce||n[187]!==J||n[188]!==wt||n[189]!==Te||n[190]!==nt||n[191]!==le||n[192]!==ve||n[193]!==jn||n[194]!==ke||n[195]!==Ge||n[196]!==Ie?(Sn=(0,$.jsx)(me,{overlay:J,session:Ye,ring:nt,now:A,decisionTarget:ct,onClose:Ft,onSend:rn,actAllowed:gt,timeFieldDisarmed:Ge,onSnooze:nn,onConsolidate:on,onKanban:bn,onVerb:Qt,overlayStyle:wt,sendError:le,verbError:jn,openDecisions:dt,onShare:an,onAutomate:un,allTags:i,allProviders:qe,statusSelection:ve,tagSelection:ke,kanbanSelection:we,providerSelection:Te,originSelection:Ce,timeSelection:Ie,onCycleStatus:De,onCycleTag:Ve,onCycleKanban:ze,onCycleProvider:Re,onCycleOrigin:$e,onToggleTimeWindow:Ae}),n[165]=qe,n[166]=i,n[167]=gt,n[168]=Ye,n[169]=ct,n[170]=we,n[171]=A,n[172]=un,n[173]=rn,n[174]=on,n[175]=ze,n[176]=$e,n[177]=Re,n[178]=De,n[179]=Ve,n[180]=bn,n[181]=an,n[182]=nn,n[183]=Ae,n[184]=Qt,n[185]=dt,n[186]=Ce,n[187]=J,n[188]=wt,n[189]=Te,n[190]=nt,n[191]=le,n[192]=ve,n[193]=jn,n[194]=ke,n[195]=Ge,n[196]=Ie,n[197]=Sn):Sn=n[197],n[198]!==mn||n[199]!==xn||n[200]!==Sn?(vn=(0,$.jsxs)(t.View,{style:fe.root,testID:"reels-screen",children:[mn,xn,Sn]}),n[198]=mn,n[199]=xn,n[200]=Sn,n[201]=vn):vn=n[201],vn}),fe=y.StyleSheet.create(e=>({composerLabel:{color:e.colors.foregroundMuted,fontSize:e.fontSize.xs,paddingHorizontal:e.spacing[2],paddingTop:e.spacing[1],uni__dependencies:[0]},sheetInner:{flex:1},tagChip:{minHeight:44,justifyContent:"center",borderWidth:1,borderColor:e.colors.border,borderRadius:e.borderRadius.full,paddingHorizontal:e.spacing[2],uni__dependencies:[0]},tagChipOn:{borderColor:e.colors.accent,uni__dependencies:[0]},tagChipOff:{borderColor:e.colors.destructive,borderStyle:"dashed",opacity:.6,uni__dependencies:[0]},tagChipText:{color:e.colors.foreground,fontSize:e.fontSize.xs,uni__dependencies:[0]},sheetGrab:{minHeight:44,alignItems:"center",justifyContent:"center"},sheetHandle:{width:38,height:4,borderRadius:e.borderRadius.full,backgroundColor:e.colors.border,uni__dependencies:[0]},verbFill:{position:"absolute",left:0,top:0,bottom:0,backgroundColor:e.colors.destructive,opacity:.18,borderRadius:e.borderRadius.full,uni__dependencies:[0]},sendError:{color:e.colors.destructive,fontSize:e.fontSize.xs,paddingHorizontal:e.spacing[2],uni__dependencies:[0]},verbHoldLabel:{color:e.colors.destructive,fontSize:e.fontSize.xs,uni__dependencies:[0]},captionBackdrop:Object.assign({},y.StyleSheet.absoluteFillObject,{backgroundColor:e.colors.background,opacity:.72,uni__dependencies:[0]}),sheetClose:{minWidth:44,minHeight:44,alignItems:"center",justifyContent:"center"},card:{flex:1,overflow:"hidden"},seamBanner:{paddingHorizontal:e.spacing[2],uni__dependencies:[0]},headerSlot:{position:"absolute",top:0,left:0,right:0},captionTap:{minHeight:44,justifyContent:"flex-end"},root:{flex:1,backgroundColor:e.colors.background,uni__dependencies:[0]},background:Object.assign({},y.StyleSheet.absoluteFillObject,{opacity:.35,backgroundColor:e.colors.surface0,overflow:"hidden",uni__dependencies:[0]}),backgroundText:{padding:e.spacing[2],uni__dependencies:[0]},backgroundBody:{color:e.colors.foregroundMuted,fontSize:e.fontSize.xs,lineHeight:20,uni__dependencies:[0]},middle:{flex:1,alignItems:"flex-end",justifyContent:"flex-end",paddingHorizontal:e.spacing[2],uni__dependencies:[0]},bottom:{padding:e.spacing[2],gap:e.spacing[1],uni__dependencies:[0]},cardTitle:{color:e.colors.foreground,fontSize:e.fontSize.base,fontWeight:"600",uni__dependencies:[0]},cardMeta:{color:e.colors.foregroundMuted,fontSize:e.fontSize.xs,marginTop:2,uni__dependencies:[0]},cardSummary:{color:e.colors.foreground,fontSize:e.fontSize.sm,marginTop:6,lineHeight:19,uni__dependencies:[0]},cardTapHint:{color:e.colors.foregroundMuted,fontSize:e.fontSize.xs,marginTop:4,uni__dependencies:[0]},hint:{color:e.colors.foregroundMuted,fontSize:e.fontSize.xs,lineHeight:17,uni__dependencies:[0]},rowGap:{flexDirection:"row",flexWrap:"wrap",gap:e.spacing[1],alignItems:"center",uni__dependencies:[0]},verbChip:{minHeight:44,minWidth:44,alignItems:"center",justifyContent:"center",overflow:"hidden",borderWidth:1,borderColor:e.colors.border,borderRadius:e.borderRadius["2xl"],paddingHorizontal:e.spacing[2],paddingVertical:e.spacing[1],uni__dependencies:[0]},verbWord:{color:e.colors.foregroundMuted,fontSize:e.fontSize.xs,uni__dependencies:[0]},verbWordDanger:{color:e.colors.destructive,fontSize:e.fontSize.xs,fontWeight:"600",uni__dependencies:[0]},overlay:Object.assign({},y.StyleSheet.absoluteFillObject,{backgroundColor:e.colors.background,uni__dependencies:[0]}),sheet:{padding:e.spacing[2],gap:e.spacing[1],uni__dependencies:[0]},sheetTitle:{color:e.colors.foreground,fontSize:e.fontSize.base,fontWeight:"600",uni__dependencies:[0]},sheetHeadTitle:{flex:1},captionSheet:{position:"absolute",left:0,right:0,bottom:0,top:"42%",backgroundColor:e.colors.background,borderTopWidth:1,borderTopColor:e.colors.border,borderTopLeftRadius:e.borderRadius["2xl"],borderTopRightRadius:e.borderRadius["2xl"],uni__dependencies:[0]},sheetHead:{flexDirection:"row",alignItems:"center",gap:e.spacing[1],padding:e.spacing[2],borderBottomWidth:1,borderBottomColor:e.colors.border,uni__dependencies:[0]},sheetBody:{flex:1,padding:e.spacing[2],uni__dependencies:[0]},field:{marginBottom:e.spacing[1],uni__dependencies:[0]},fieldLabel:{color:e.colors.foregroundMuted,fontSize:e.fontSize.xs,textTransform:"uppercase",letterSpacing:.6,marginTop:e.spacing[1],uni__dependencies:[0]},fieldValue:{color:e.colors.foreground,fontSize:e.fontSize.xs,lineHeight:18,uni__dependencies:[0]},fieldDanger:{color:e.colors.destructive,uni__dependencies:[0]},composer:{flexDirection:"row",alignItems:"center",gap:e.spacing[1],padding:e.spacing[2],borderTopWidth:1,borderTopColor:e.colors.border,uni__dependencies:[0]},composerInput:{flex:1,borderWidth:1,borderColor:e.colors.border,borderRadius:e.borderRadius.full,paddingHorizontal:e.spacing[2],paddingVertical:e.spacing[1],color:e.colors.foreground,fontSize:e.fontSize.xs,uni__dependencies:[0]},composerSend:{minHeight:44,justifyContent:"center",paddingHorizontal:e.spacing[1],uni__dependencies:[0]},link:{color:e.colors.accent,fontSize:e.fontSize.xs,uni__dependencies:[0]},send:{borderWidth:1,borderColor:e.colors.accent,borderRadius:e.borderRadius["2xl"],paddingHorizontal:e.spacing[2],paddingVertical:e.spacing[1],alignSelf:"flex-start",uni__dependencies:[0]},dim:{opacity:.35},pickList:{maxHeight:400},pickRow:{minHeight:44,flexDirection:"row",alignItems:"center",gap:e.spacing[1],paddingVertical:e.spacing[1],paddingHorizontal:e.spacing[1],borderWidth:1,borderColor:e.colors.border,borderRadius:e.borderRadius["2xl"],marginBottom:4,uni__dependencies:[0]},pickRowOn:{borderColor:e.colors.accent,uni__dependencies:[0]},pickMark:{width:22,alignItems:"center"},pickName:{color:e.colors.foreground,fontSize:e.fontSize.xs,fontWeight:"600",uni__dependencies:[0]},pickCrown:{paddingHorizontal:6,paddingVertical:4,justifyContent:"center"},pickAux:{color:e.colors.foregroundMuted,fontSize:e.fontSize.xs,uni__dependencies:[0]},grow:{flex:1},empty:{flex:1,alignItems:"center",justifyContent:"center",padding:e.spacing[3],uni__dependencies:[0]}})),xe=[{id:"whatsapp",label:"WhatsApp"},{id:"slack",label:"Slack"},{id:"email",label:"Email"}],je=400;function Se(e){const t=[`${e.title} (${G(String(e.statusBucket))})`,e.digest?.summary??e.digest?.goal??"",e.digest?.nextStep?`Next: ${e.digest.nextStep}`:"",e.digest?.blockers?.length?`Blocked: ${e.digest.blockers.join("; ")}`:""].filter(e=>e.length>0).join("\n");return t.length>je?`${t.slice(0,399)}\u2026`:t}const ve=[fe.fieldValue,fe.fieldDanger],ke=[fe.sheetTitle,fe.sheetHeadTitle],we=[fe.pickRow,fe.pickRowOn],Te=[fe.verbWord,fe.verbWordDanger],Ce={include:[fe.tagChip,fe.tagChipOn],exclude:[fe.tagChip,fe.tagChipOff],neutral:fe.tagChip},Ie={selected:!0},De={selected:!1},Ve=e=>e?Ie:De,ze=[fe.send,fe.dim],Re=[fe.background,fe.backgroundText],Le={read:"caption",snooze:"snooze",share:"share",taco:"taco",options:"options"},Pe={consolidate:"consolidate",outsource:"share",automate:"automate"},$e=[{id:"hourly",label:"Every hour",everyMs:36e5},{id:"daily",label:"Every day",everyMs:864e5},{id:"weekly",label:"Every week",everyMs:6048e5}];function Ae(e,t){return A(t.dy)}function Oe(e){return`${e.kind}: ${e.label??e.url}`}function Ee(){return Date.now()}function Me(e){return e.recordAct}function He(e){return e.provider}function We(e){return e.session}function Fe(e){return{id:e.id,question:e.question}}function Be(e){return e+1}function Ne(e){return e.session}},4568,[348,2838,349,2815,2476,4017,3516,350,36,140,252,591,659,649,25,546,182,234,571,146,558,56,811,3619,3442,3621,3618,4007,4013,4016,4569,4014,4019,4570,4571,4572,4018,4574,4575,279]);
16326
+ __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return k}});var t=r(d[0]);r(d[1]);var s=r(d[2]),n=r(d[3]),o=r(d[4]),l=r(d[5]),c=r(d[6]),u=r(d[7]),f=r(d[8]),v=r(d[9]),b=r(d[10]),S=r(d[11]);function k(){const k=(0,t.c)(23),{serverId:B}=(0,s.useLocalSearchParams)(),_=(0,s.useRouter)(),j=(0,b.useKanbanBuckets)(),I=(0,b.useDefaultBucketId)();let O;k[0]!==j?(O=new Set(j.map(A)),k[0]=j,k[1]=O):O=k[1];const R=O;let h;k[2]!==B?(h=t=>t.sessions[B??""]?.agents,k[2]=B,k[3]=h):h=k[3];const z=(0,c.useSessionStore)(h);let P;e:{if(!z){let t;k[4]===Symbol.for("react.memo_cache_sentinel")?(t=[],k[4]=t):t=k[4],P=t;break e}let t;if(k[5]!==z||k[6]!==I||k[7]!==R||k[8]!==B){let s;k[10]!==I||k[11]!==R||k[12]!==B?(s=t=>({id:t.id,serverId:B??"",title:t.title??t.id,statusBucket:(0,f.deriveSidebarStateBucket)((0,f.toBucketInput)(t)),tags:Object.entries(t.labels??{}).filter(y).map(p),digest:t.digest??null,kanban:(0,v.resolveBucketId)(t,R,I),provider:t.provider,model:t.model,lastActivityAt:t.lastActivityAt,snoozeCount:t.snooze?.count??0,snoozedUntil:t.snooze?.until??null,origin:(0,u.deriveSessionOrigin)(t.labels??null),createdAt:t.createdAt}),k[10]=I,k[11]=R,k[12]=B,k[13]=s):s=k[13],t=(0,l.selectFeedCandidates)([...z.values()]).map(s),k[5]=z,k[6]=I,k[7]=R,k[8]=B,k[9]=t}else t=k[9];P=t}const w=P;let C;if(k[14]!==z){const t=new Set;for(const s of z?.values()??[])for(const n of Object.keys(s.labels??{}))n.startsWith("tag:")&&t.add(n.slice(4));C=[...t].sort(),k[14]=z,k[15]=C}else C=k[15];const L=C;let W;k[16]!==_||k[17]!==B?(W=()=>{_.replace((0,n.buildHostRootRoute)(B??""))},k[16]=_,k[17]=B,k[18]=W):W=k[18];const x=W;let D;return k[19]!==L||k[20]!==x||k[21]!==w?(D=(0,S.jsx)(o.ReelsScreen,{sessions:w,allTags:L,onLeaveRing:x}),k[19]=L,k[20]=x,k[21]=w,k[22]=D):D=k[22],D}function p(t){const[s]=t;return s.slice(4)}function y(t){const[s]=t;return s.startsWith("tag:")}function A(t){return t.id}},4567,[350,36,379,3492,4568,4576,3427,3621,3441,4008,4007,279]);
16327
+ __d(function(g,r,_i,_a,m,_e,_d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),_e.shouldTrackSheetDrag=O,_e.shouldCloseOnDrag=M,_e.destructiveHint=E,_e.verbAccessibilityLabel=H,Object.defineProperty(_e,"UNWIRED_VERBS",{enumerable:!0,get:function(){return F}}),_e.bucketLabel=K,_e.relativeAge=q,_e.cardMetaLine=U,_e.consolidateRowLabel=ee,_e.emptyRingState=he,_e.relativeWake=be,_e.backgroundTextFor=ge,Object.defineProperty(_e,"ReelsScreen",{enumerable:!0,get:function(){return fe}}),_e.shareTextFor=ve;var t=r(_d[0]),n=r(_d[1]),s=r(_d[2]),o=r(_d[3]),l=r(_d[4]),i=r(_d[5]),a=r(_d[6]),c=r(_d[7]),d=r(_d[8]);r(_d[9]);e(r(_d[10]));var u=e(r(_d[11])),h=e(r(_d[12]));r(_d[13]);var b=e(r(_d[14]));r(_d[15]),r(_d[16]),r(_d[17]),r(_d[18]),r(_d[19]),r(_d[20]);var p=r(_d[21]),y=r(_d[22]),f=r(_d[23]),x=r(_d[24]),j=r(_d[25]),S=r(_d[26]),v=r(_d[27]),k=r(_d[28]),w=r(_d[29]),T=r(_d[30]),_=r(_d[31]),C=r(_d[32]),I=r(_d[33]),D=r(_d[34]),V=r(_d[35]),z=r(_d[36]),R=r(_d[37]),L=r(_d[38]),P=r(_d[39]),A=r(_d[40]),$=r(_d[41]);function O(e){return e>8}function M(e){return e>60}function E(e,t,n){return t&&"hold"!==t?t:e||"hold"===t?"hold to retire, this cannot be undone":n}function H(e,t){return"terminate"===e?`${t}. Hold to confirm, this cannot be undone.`:F.has(e)?`${t}. Not wired yet.`:t}const W={automate:"automate",share:"share",snooze:"snooze",options:"kanban",consolidate:"consolidate"},B={share:null,automate:null,snooze:null,kanban:null,tag:null,consolidate:null},F=new Set([]);function N(e){return e.key}const G={needs_input:"needs you",failed:"failed",attention:"wants a look",pending:"waiting",running:"running",done:"done"};function K(e){return G[e]??e.replace(/_/g," ")}function q(e,t=new Date){if(!e)return"";const n=t.getTime()-e.getTime();if(!Number.isFinite(n)||n<0)return"";const s=Math.floor(n/6e4);if(s<1)return"just now";if(s<60)return`${s}m`;const o=Math.floor(s/60);return o<24?`${o}h`:`${Math.floor(o/24)}d`}function U(e,t){return[K(String(e.statusBucket)),q(e.lastActivityAt,t),e.model?`${e.provider}/${e.model}`:e.provider].filter(e=>e.length>0).join(" \xb7 ")}function Y(e,t){const n=(0,c.c)(8);let s,o,l,i;n[0]!==e||n[1]!==t?(s=()=>{if(!e||"undefined"==typeof document)return;const n=e=>{"Escape"===e.key&&t()};return document.addEventListener("keydown",n),()=>document.removeEventListener("keydown",n)},o=[e,t],n[0]=e,n[1]=t,n[2]=s,n[3]=o):(s=n[2],o=n[3]),(0,d.useEffect)(s,o),n[4]!==e||n[5]!==t?(l=()=>{},i=[e,t],n[4]=e,n[5]=t,n[6]=l,n[7]=i):(l=n[6],i=n[7]),(0,d.useEffect)(l,i)}const X=(0,d.memo)(function(e){const a=(0,c.c)(90),{session:u,visible:y,onClose:f,onSend:x,sendError:j,openDecisions:S,target:v,actAllowed:w}=e,[T,_]=(0,d.useState)(""),C=v?.question??null,I=u.digest;let D;a[0]!==x||a[1]!==T?(D=()=>{const e=T.trim();e.length>0&&(x(e),_(""))},a[0]=x,a[1]=T,a[2]=D):D=a[2];const V=D,z=(0,p.useSafeAreaInsets)(),R=xe.captionSheet,[L,P]=(0,d.useState)(!1);let A,O;a[3]===Symbol.for("react.memo_cache_sentinel")?(A=()=>{const e=h.default.addListener("keyboardDidShow",()=>P(!0)),t=h.default.addListener("keyboardDidHide",()=>P(!1));return()=>{e.remove(),t.remove()}},O=[],a[3]=A,a[4]=O):(A=a[3],O=a[4]),(0,d.useEffect)(A,O);const E=L&&!1?0:z.bottom;let H;a[5]!==E?(H=[xe.sheetInner,{paddingBottom:E}],a[5]=E,a[6]=H):H=a[6];const W=H;let B;a[7]!==f?(B=b.default.create({onMoveShouldSetPanResponder:Oe,onPanResponderRelease:(e,t)=>{M(t.dy)&&f()}}),a[7]=f,a[8]=B):B=a[8];const F=B;let N,G,K;Y(y,f),a[9]!==w?(N=w?null:(0,$.jsx)(s.Text,{style:xe.composerLabel,testID:"reels-composer-capped",children:"Decisions are done for today. This one keeps until tomorrow."}),a[9]=w,a[10]=N):N=a[10],a[11]!==w||a[12]!==C||a[13]!==S.length||a[14]!==V||a[15]!==T?(G=w?(0,$.jsxs)($.Fragment,{children:[C?(0,$.jsx)(s.Text,{style:xe.composerLabel,numberOfLines:2,testID:"reels-composer-target",children:S.length>1?`Answering the first of ${S.length} open decisions: ${C}`:`Answering: ${C}`}):null,(0,$.jsxs)(t.View,{style:xe.composer,children:[(0,$.jsx)(n.TextInput,{value:T,onChangeText:_,placeholder:C?"in your own words":"say what to do",style:xe.composerInput,onSubmitEditing:V,returnKeyType:"send",testID:"reels-composer-input"}),(0,$.jsx)(l.Pressable,{onPress:V,style:xe.composerSend,accessibilityRole:"button",accessibilityLabel:"Send this answer",hitSlop:8,testID:"reels-composer-send",children:(0,$.jsx)(s.Text,{style:xe.link,children:"send"})})]})]}):null,a[11]=w,a[12]=C,a[13]=S.length,a[14]=V,a[15]=T,a[16]=G):G=a[16],a[17]!==N||a[18]!==G?(K=(0,$.jsxs)(t.View,{children:[N,G]}),a[17]=N,a[18]=G,a[19]=K):K=a[19];const q=K;if(!y)return null;let U,X,Z,ee,te,ne,se;a[20]!==f?(U=(0,$.jsx)(l.Pressable,{style:xe.captionBackdrop,onPress:f,accessibilityRole:"button",accessibilityLabel:"Close the digest",testID:"reels-caption-backdrop"}),a[20]=f,a[21]=U):U=a[21],a[22]===Symbol.for("react.memo_cache_sentinel")?(X=(0,$.jsx)(t.View,{style:xe.sheetHandle}),a[22]=X):X=a[22],a[23]!==F.panHandlers?(Z=(0,$.jsx)(t.View,Object.assign({},F.panHandlers,{style:xe.sheetGrab,testID:"reels-caption-grab",children:X})),a[23]=F.panHandlers,a[24]=Z):Z=a[24],a[25]===Symbol.for("react.memo_cache_sentinel")?(ee=(0,$.jsx)(J,{}),a[25]=ee):ee=a[25],a[26]!==f?(te=(0,$.jsx)(l.Pressable,{onPress:f,style:xe.sheetClose,hitSlop:8,accessibilityRole:"button",accessibilityLabel:"Close the digest",testID:"reels-caption-close",children:ee}),a[26]=f,a[27]=te):te=a[27],a[28]!==u.title?(ne=(0,$.jsx)(s.Text,{style:we,numberOfLines:1,children:u.title}),a[28]=u.title,a[29]=ne):ne=a[29],a[30]!==te||a[31]!==ne?(se=(0,$.jsxs)(t.View,{style:xe.sheetHead,children:[te,ne]}),a[30]=te,a[31]=ne,a[32]=se):se=a[32];const oe=I?.summary;let le;a[33]!==oe?(le=(0,$.jsx)(Q,{label:"Summary",value:oe,derived:!0}),a[33]=oe,a[34]=le):le=a[34];const ie=I?.goal;let re;a[35]!==ie?(re=(0,$.jsx)(Q,{label:"Goal",value:ie}),a[35]=ie,a[36]=re):re=a[36];const ae=I?.nextStep;let ce,de,ue,he,be,ge,pe,me,ye,fe,je,Se,ve;if(a[37]!==ae?(ce=(0,$.jsx)(Q,{label:"Next step",value:ae}),a[37]=ae,a[38]=ce):ce=a[38],a[39]!==I?.blockers?(de=I?.blockers?.join("\n"),a[39]=I?.blockers,a[40]=de):de=a[40],a[41]!==de?(ue=(0,$.jsx)(Q,{label:"Blockers",value:de,danger:!0}),a[41]=de,a[42]=ue):ue=a[42],a[43]!==I?.accomplishments?(he=I?.accomplishments?.join("\n"),a[43]=I?.accomplishments,a[44]=he):he=a[44],a[45]!==he?(be=(0,$.jsx)(Q,{label:"Accomplishments",value:he,derived:!0}),a[45]=he,a[46]=be):be=a[46],a[47]!==I?.keyFiles?(ge=I?.keyFiles?.join("\n"),a[47]=I?.keyFiles,a[48]=ge):ge=a[48],a[49]!==ge?(pe=(0,$.jsx)(Q,{label:"Key files",value:ge,derived:!0}),a[49]=ge,a[50]=pe):pe=a[50],a[51]!==I?.links?(me=I?.links?.map(Me).join("\n"),a[51]=I?.links,a[52]=me):me=a[52],a[53]!==me?(ye=(0,$.jsx)(Q,{label:"Links",value:me}),a[53]=me,a[54]=ye):ye=a[54],a[55]!==S){let e;a[57]!==S.length?(e=(e,t)=>(0,$.jsx)(Q,{label:S.length>1?`Decision ${t+1} of ${S.length}`:"Decision",value:e.question},e.id),a[57]=S.length,a[58]=e):e=a[58],fe=S.map(e),a[55]=S,a[56]=fe}else fe=a[56];var ke;let Te,Ce,Ie,De,Ve;return a[59]!==u.tags?(je=u.tags.join(", ")||"no tag",a[59]=u.tags,a[60]=je):je=a[60],a[61]!==je?(Se=(0,$.jsx)(Q,{label:"Tags",value:je}),a[61]=je,a[62]=Se):Se=a[62],a[63]!==u.kanban?(ve=(ke=u.kanban)?(0,k.getBucketLabel)(ke)||ke:"no column",a[63]=u.kanban,a[64]=ve):ve=a[64],a[65]!==ve?(Te=(0,$.jsx)(Q,{label:"Kanban",value:ve}),a[65]=ve,a[66]=Te):Te=a[66],a[67]!==le||a[68]!==re||a[69]!==ce||a[70]!==ue||a[71]!==be||a[72]!==pe||a[73]!==ye||a[74]!==fe||a[75]!==Se||a[76]!==Te?(Ce=(0,$.jsxs)(o.ScrollView,{style:xe.sheetBody,testID:"reels-caption-body",children:[le,re,ce,ue,be,pe,ye,fe,Se,Te]}),a[67]=le,a[68]=re,a[69]=ce,a[70]=ue,a[71]=be,a[72]=pe,a[73]=ye,a[74]=fe,a[75]=Se,a[76]=Te,a[77]=Ce):Ce=a[77],a[78]!==j?(Ie=j?(0,$.jsxs)(s.Text,{style:xe.sendError,testID:"reels-composer-error",children:["Could not send that: ",j,". Nothing was recorded, so try again."]}):null,a[78]=j,a[79]=Ie):Ie=a[79],a[80]!==q||a[81]!==W||a[82]!==Z||a[83]!==se||a[84]!==Ce||a[85]!==Ie?(De=(0,$.jsx)(i.KeyboardAvoidingView,{behavior:"height",style:R,testID:"reels-caption-sheet",children:(0,$.jsxs)(t.View,{style:W,children:[Z,se,Ce,Ie,q]})}),a[80]=q,a[81]=W,a[82]=Z,a[83]=se,a[84]=Ce,a[85]=Ie,a[86]=De):De=a[86],a[87]!==U||a[88]!==De?(Ve=(0,$.jsxs)($.Fragment,{children:[U,De]}),a[87]=U,a[88]=De,a[89]=Ve):Ve=a[89],Ve}),J=(0,d.memo)(function(){const e=(0,c.c)(2),{theme:t}=(0,y.useUnistyles)();let n;return e[0]!==t.colors.foregroundMuted?(n=(0,$.jsx)(f.X,{size:18,color:t.colors.foregroundMuted}),e[0]=t.colors.foregroundMuted,e[1]=n):n=e[1],n}),Q=(0,d.memo)(function(e){const n=(0,c.c)(9),{label:o,value:l,derived:i,danger:a}=e;if(!l)return null;const d=i?" (derived)":"";let u;n[0]!==o||n[1]!==d?(u=(0,$.jsxs)(s.Text,{style:xe.fieldLabel,children:[o,d]}),n[0]=o,n[1]=d,n[2]=u):u=n[2];const h=a?ke:xe.fieldValue;let b,p;return n[3]!==h||n[4]!==l?(b=(0,$.jsx)(s.Text,{style:h,children:l}),n[3]=h,n[4]=l,n[5]=b):b=n[5],n[6]!==u||n[7]!==b?(p=(0,$.jsxs)(t.View,{style:xe.field,children:[u,b]}),n[6]=u,n[7]=b,n[8]=p):p=n[8],p}),Z={on:{selected:!0},off:{selected:!1}};function ee(e,t,n){return t?n?`${e}, picked, survives this consolidation`:`${e}, picked`:`${e}, not picked`}const te=(0,d.memo)(function(e){const n=(0,c.c)(39),{session:o,picked:i,isWinner:a,now:d,onToggle:u,onCrown:h}=e,{theme:b}=(0,y.useUnistyles)();let p;n[0]!==u||n[1]!==o.id?(p=()=>u(o.id),n[0]=u,n[1]=o.id,n[2]=p):p=n[2];const x=p;let j;n[3]!==h||n[4]!==o.id?(j=()=>h(o.id),n[3]=h,n[4]=o.id,n[5]=j):j=n[5];const S=j;let v,k=f.Square;i&&(k=a?f.Crown:f.SquareCheck),n[6]!==a||n[7]!==i||n[8]!==o.title?(v=ee(o.title,i,a),n[6]=a,n[7]=i,n[8]=o.title,n[9]=v):v=n[9];const w=Z[i?"on":"off"],T=i?Te:xe.pickRow,_=`reels-consolidate-pick-${o.id}`;let C,I,D;n[10]!==k||n[11]!==b.colors.accent?(C=(0,$.jsx)(t.View,{style:xe.pickMark,children:(0,$.jsx)(k,{size:16,color:b.colors.accent})}),n[10]=k,n[11]=b.colors.accent,n[12]=C):C=n[12],n[13]!==o.title?(I=(0,$.jsx)(s.Text,{style:xe.pickName,children:o.title}),n[13]=o.title,n[14]=I):I=n[14],n[15]!==d||n[16]!==o.lastActivityAt?(D=q(o.lastActivityAt,d),n[15]=d,n[16]=o.lastActivityAt,n[17]=D):D=n[17];const V=a&&i?" \xb7 survives":"";let z,R,L;return n[18]!==V||n[19]!==D?(z=(0,$.jsxs)(s.Text,{style:xe.pickAux,children:[D,V]}),n[18]=V,n[19]=D,n[20]=z):z=n[20],n[21]!==S||n[22]!==a||n[23]!==i||n[24]!==o.id||n[25]!==o.title||n[26]!==b.colors.foregroundMuted?(R=i&&!a?(0,$.jsx)(l.Pressable,{onPress:S,accessibilityRole:"button",accessibilityLabel:`Make ${o.title} the survivor`,hitSlop:8,style:xe.pickCrown,testID:`reels-consolidate-crown-${o.id}`,children:(0,$.jsx)(f.Crown,{size:14,color:b.colors.foregroundMuted})}):null,n[21]=S,n[22]=a,n[23]=i,n[24]=o.id,n[25]=o.title,n[26]=b.colors.foregroundMuted,n[27]=R):R=n[27],n[28]!==S||n[29]!==z||n[30]!==R||n[31]!==v||n[32]!==w||n[33]!==T||n[34]!==_||n[35]!==C||n[36]!==I||n[37]!==x?(L=(0,$.jsxs)(l.Pressable,{onPress:x,onLongPress:S,accessibilityRole:"button",accessibilityLabel:v,accessibilityState:w,style:T,testID:_,children:[C,I,z,R]}),n[28]=S,n[29]=z,n[30]=R,n[31]=v,n[32]=w,n[33]=T,n[34]=_,n[35]=C,n[36]=I,n[37]=x,n[38]=L):L=n[38],L}),ne=(0,d.memo)(function(e){const n=(0,c.c)(67),{candidates:i,now:a,onCancel:u,onConsolidate:h,verbError:b}=e;let p;n[0]===Symbol.for("react.memo_cache_sentinel")?(p={},n[0]=p):p=n[0];const[y,f]=(0,d.useState)(p);let x;if(n[1]!==i||n[2]!==y){let e;n[4]!==y?(e=e=>y[e.id],n[4]=y,n[5]=e):e=n[5],x=i.filter(e),n[1]=i,n[2]=y,n[3]=x}else x=n[3];const j=x,[S,v]=(0,d.useState)(null);let k;n[6]!==j||n[7]!==S?(k=(0,A.consolidationTargets)(j,S),n[6]=j,n[7]=S,n[8]=k):k=n[8];const{winner:w,sourceIds:T}=k;let _;n[9]===Symbol.for("react.memo_cache_sentinel")?(_=e=>{f(t=>{const n=Object.assign({},t);return n[e]?delete n[e]:n[e]=!0,n})},n[9]=_):_=n[9];const C=_;let I;n[10]===Symbol.for("react.memo_cache_sentinel")?(I=e=>{v(e),f(t=>t[e]?t:Object.assign({},t,{[e]:!0}))},n[10]=I):I=n[10];const V=I;let z;n[11]!==j||n[12]!==w?(z=(0,A.canConsolidate)(j,w),n[11]=j,n[12]=w,n[13]=z):z=n[13];const R=z;let L;n[14]!==j||n[15]!==h||n[16]!==T||n[17]!==w?(L=()=>{w&&j.length>=2&&h(w,T)},n[14]=j,n[15]=h,n[16]=T,n[17]=w,n[18]=L):L=n[18];const P=(0,D.useDestructiveHold)(L,"consolidate");let O;n[19]!==P.progress?(O=Math.round(100*P.progress),n[19]=P.progress,n[20]=O):O=n[20];const M=`${O}%`;let H;n[21]!==M?(H=[xe.verbFill,{width:M}],n[21]=M,n[22]=H):H=n[22];const W=H;let B,F,N,G,K,q,U,Y;if(n[23]===Symbol.for("react.memo_cache_sentinel")?(B=(0,$.jsx)(s.Text,{style:xe.sheetTitle,children:"Consolidate"}),F=(0,$.jsx)(s.Text,{style:xe.hint,children:"The winner keeps its transcript. The others are archived and linked to it, both ways. Archived is a soft delete: still readable by id, same as Terminate."}),n[23]=B,n[24]=F):(B=n[23],F=n[24]),n[25]!==b?(N=b?(0,$.jsx)(s.Text,{style:xe.sendError,testID:"reels-verb-error",children:b}):null,n[25]=b,n[26]=N):N=n[26],n[27]!==i||n[28]!==a||n[29]!==y||n[30]!==w){let e;n[32]!==a||n[33]!==y||n[34]!==w?(e=e=>(0,$.jsx)(te,{session:e,picked:Boolean(y[e.id]),isWinner:w===e.id,now:a,onToggle:C,onCrown:V},e.id),n[32]=a,n[33]=y,n[34]=w,n[35]=e):e=n[35],G=i.map(e),n[27]=i,n[28]=a,n[29]=y,n[30]=w,n[31]=G}else G=n[31];n[36]!==G?(K=(0,$.jsx)(o.ScrollView,{style:xe.pickList,children:G}),n[36]=G,n[37]=K):K=n[37],n[38]===Symbol.for("react.memo_cache_sentinel")?(q=(0,$.jsx)(s.Text,{style:xe.link,children:"cancel"}),n[38]=q):q=n[38],n[39]!==u?(U=(0,$.jsx)(l.Pressable,{onPress:u,accessibilityRole:"button",accessibilityLabel:"Cancel and close",style:xe.send,testID:"reels-consolidate-cancel",children:q}),n[39]=u,n[40]=U):U=n[40],n[41]!==R||n[42]!==P.handlers?(Y=R?P.handlers:{},n[41]=R,n[42]=P.handlers,n[43]=Y):Y=n[43];const X=!R,J=R?xe.send:Re,Q=`Consolidate ${T.length} sessions into the survivor. Hold to confirm.`;let Z;n[44]!==W||n[45]!==P.progress?(Z=P.progress>0?(0,$.jsx)(t.View,{style:W,testID:"reels-consolidate-hold-fill"}):null,n[44]=W,n[45]=P.progress,n[46]=Z):Z=n[46];const ee=`hold to consolidate ${T.length}`;let ne,se,oe,le,ie;return n[47]!==P.hint||n[48]!==P.showLabel||n[49]!==ee?(ne=E(P.showLabel,P.hint,ee),n[47]=P.hint,n[48]=P.showLabel,n[49]=ee,n[50]=ne):ne=n[50],n[51]!==ne?(se=(0,$.jsx)(s.Text,{style:xe.link,children:ne}),n[51]=ne,n[52]=se):se=n[52],n[53]!==Y||n[54]!==X||n[55]!==J||n[56]!==Q||n[57]!==Z||n[58]!==se?(oe=(0,$.jsxs)(l.Pressable,Object.assign({},Y,{disabled:X,style:J,accessibilityRole:"button",accessibilityLabel:Q,testID:"reels-consolidate-commit",children:[Z,se]})),n[53]=Y,n[54]=X,n[55]=J,n[56]=Q,n[57]=Z,n[58]=se,n[59]=oe):oe=n[59],n[60]!==U||n[61]!==oe?(le=(0,$.jsxs)(t.View,{style:xe.rowGap,children:[U,oe]}),n[60]=U,n[61]=oe,n[62]=le):le=n[62],n[63]!==N||n[64]!==K||n[65]!==le?(ie=(0,$.jsxs)(t.View,{style:xe.sheet,testID:"reels-consolidate",children:[B,F,N,K,le]}),n[63]=N,n[64]=K,n[65]=le,n[66]=ie):ie=n[66],ie}),se=(0,d.memo)(function(e){const n=(0,c.c)(46),{verb:o,icon:i,label:a,onVerb:d}=e,{theme:u}=(0,y.useUnistyles)(),h="terminate"===o,{showLabel:b,progress:p,hint:f,handlers:x}=(0,D.useDestructiveHold)(d,o);let j;n[0]!==d||n[1]!==o?(j=()=>d(o),n[0]=d,n[1]=o,n[2]=j):j=n[2];const S=j;let v;n[3]!==p?(v=Math.round(100*p),n[3]=p,n[4]=v):v=n[4];const k=`${v}%`;let w;n[5]!==k?(w=[xe.verbFill,{width:k}],n[5]=k,n[6]=w):w=n[6];const T=w;if(!h){let e;n[7]!==a||n[8]!==o?(e=H(o,a),n[7]=a,n[8]=o,n[9]=e):e=n[9];const t=`reels-verb-${o}`;let c,d,h;return n[10]!==i||n[11]!==u.colors.foreground?(c=(0,$.jsx)(i,{size:18,color:u.colors.foreground}),n[10]=i,n[11]=u.colors.foreground,n[12]=c):c=n[12],n[13]!==a?(d=(0,$.jsx)(s.Text,{style:xe.verbWord,children:a}),n[13]=a,n[14]=d):d=n[14],n[15]!==e||n[16]!==t||n[17]!==c||n[18]!==d||n[19]!==S?(h=(0,$.jsxs)(l.Pressable,{onPress:S,style:xe.verbChip,accessibilityRole:"button",accessibilityLabel:e,hitSlop:8,testID:t,children:[c,d]}),n[15]=e,n[16]=t,n[17]=c,n[18]=d,n[19]=S,n[20]=h):h=n[20],h}let _;n[21]!==a||n[22]!==o?(_=H(o,a),n[21]=a,n[22]=o,n[23]=_):_=n[23];const C=`reels-verb-${o}`;let I,V;n[24]!==T||n[25]!==p?(I=p>0?(0,$.jsx)(t.View,{style:T,testID:"reels-verb-hold-fill"}):null,n[24]=T,n[25]=p,n[26]=I):I=n[26],n[27]!==i||n[28]!==u.colors.destructive?(V=(0,$.jsx)(i,{size:18,color:u.colors.destructive}),n[27]=i,n[28]=u.colors.destructive,n[29]=V):V=n[29];const z=b||f?Ce:xe.verbWord;let R,L,P,A;return n[30]!==a||n[31]!==z?(R=(0,$.jsx)(s.Text,{style:z,children:a}),n[30]=a,n[31]=z,n[32]=R):R=n[32],n[33]!==f||n[34]!==b?(L=E(b,f,"hold to retire"),n[33]=f,n[34]=b,n[35]=L):L=n[35],n[36]!==L?(P=(0,$.jsx)(s.Text,{style:xe.verbHoldLabel,testID:"reels-verb-terminate-hold",children:L}),n[36]=L,n[37]=P):P=n[37],n[38]!==x||n[39]!==R||n[40]!==P||n[41]!==_||n[42]!==C||n[43]!==I||n[44]!==V?(A=(0,$.jsxs)(l.Pressable,Object.assign({},x,{style:xe.verbChip,accessibilityRole:"button",accessibilityLabel:_,hitSlop:8,testID:C,children:[I,V,R,P]})),n[38]=x,n[39]=R,n[40]=P,n[41]=_,n[42]=C,n[43]=I,n[44]=V,n[45]=A):A=n[45],A}),oe=(0,d.memo)(function(e){const t=(0,c.c)(10),{everyMs:n,label:o,onPick:i}=e;let a;t[0]!==n||t[1]!==i?(a=()=>i(n),t[0]=n,t[1]=i,t[2]=a):a=t[2];const d=a,u=`reels-automate-${n}`;let h,b;return t[3]!==o?(h=(0,$.jsx)(s.Text,{style:xe.pickName,children:o}),t[3]=o,t[4]=h):h=t[4],t[5]!==o||t[6]!==d||t[7]!==u||t[8]!==h?(b=(0,$.jsx)(l.Pressable,{onPress:d,style:xe.pickRow,accessibilityRole:"button",accessibilityLabel:o,testID:u,children:h}),t[5]=o,t[6]=d,t[7]=u,t[8]=h,t[9]=b):b=t[9],b}),le=Object.keys(G).sort((e,t)=>(0,j.getWorkspaceStateBucketPriority)(e)-(0,j.getWorkspaceStateBucketPriority)(t)),ie={today:"Today","3d":"3 days","7d":"7 days","30d":"30 days",stale:"Stale"},re={root:"Top-level",delegated:"Subagent"},ae=S.SESSION_ORIGINS.map(e=>({origin:e,label:re[e]})),ce=(0,d.memo)(function(e){const t=(0,c.c)(15),{value:n,label:o,mode:i,onCycle:a}=e;let d;t[0]!==a||t[1]!==n?(d=()=>a(n),t[0]=a,t[1]=n,t[2]=d):d=t[2];const u=d,h=Ie[i],b="include"===i;let p;t[3]!==b?(p=ze(b),t[3]=b,t[4]=p):p=t[4];const y="neutral"===i?o:`${o}, ${"include"===i?"only":"excluded"}`,f=`reels-filter-${n}`,x="exclude"===i?"-":"";let j,S;return t[5]!==o||t[6]!==x?(j=(0,$.jsxs)(s.Text,{style:xe.tagChipText,children:[x,o]}),t[5]=o,t[6]=x,t[7]=j):j=t[7],t[8]!==u||t[9]!==h||t[10]!==p||t[11]!==y||t[12]!==f||t[13]!==j?(S=(0,$.jsx)(l.Pressable,{onPress:u,style:h,accessibilityRole:"button",accessibilityState:p,accessibilityLabel:y,testID:f,children:j}),t[8]=u,t[9]=h,t[10]=p,t[11]=y,t[12]=f,t[13]=j,t[14]=S):S=t[14],S}),de=(0,d.memo)(function(e){const t=(0,c.c)(10),{target:n,label:o,onShare:i}=e;let a;t[0]!==i||t[1]!==n?(a=()=>i(n),t[0]=i,t[1]=n,t[2]=a):a=t[2];const d=a,u=`Send to ${o}`,h=`reels-share-${n}`;let b,p;return t[3]!==o?(b=(0,$.jsx)(s.Text,{style:xe.pickName,children:o}),t[3]=o,t[4]=b):b=t[4],t[5]!==d||t[6]!==u||t[7]!==h||t[8]!==b?(p=(0,$.jsx)(l.Pressable,{onPress:d,style:xe.pickRow,accessibilityRole:"button",accessibilityLabel:u,testID:h,children:b}),t[5]=d,t[6]=u,t[7]=h,t[8]=b,t[9]=p):p=t[9],p}),ue=(0,d.memo)(function(e){const n=(0,c.c)(43),{verb:o,icon:i,label:a,detail:d,onVerb:u}=e,{theme:h}=(0,y.useUnistyles)(),b="terminate"===o,{showLabel:p,progress:f,hint:x,handlers:j}=(0,D.useDestructiveHold)(u,o);let S;n[0]!==u||n[1]!==o?(S=()=>u(o),n[0]=u,n[1]=o,n[2]=S):S=n[2];const v=S;let k;n[3]!==f?(k=Math.round(100*f),n[3]=f,n[4]=k):k=n[4];const w=`${k}%`;let T;n[5]!==w?(T=[xe.verbFill,{width:w}],n[5]=w,n[6]=T):T=n[6];const _=T;let C;n[7]!==b||n[8]!==j||n[9]!==v?(C=b?j:{onPress:v},n[7]=b,n[8]=j,n[9]=v,n[10]=C):C=n[10];const I=C;let V;n[11]!==a||n[12]!==o?(V=H(o,a),n[11]=a,n[12]=o,n[13]=V):V=n[13];const z=`reels-taco-${o}`;let R;n[14]!==b||n[15]!==f||n[16]!==_?(R=b&&f>0?(0,$.jsx)(t.View,{style:_,testID:"reels-taco-hold-fill"}):null,n[14]=b,n[15]=f,n[16]=_,n[17]=R):R=n[17];const L=b?h.colors.destructive:h.colors.foreground;let P,A,O,M,W,B,N;return n[18]!==i||n[19]!==L?(P=(0,$.jsx)(t.View,{style:xe.pickMark,children:(0,$.jsx)(i,{size:16,color:L})}),n[18]=i,n[19]=L,n[20]=P):P=n[20],n[21]!==a?(A=(0,$.jsx)(s.Text,{style:xe.pickName,children:a}),n[21]=a,n[22]=A):A=n[22],n[23]!==b||n[24]!==d||n[25]!==x||n[26]!==p?(O=b?E(p,x,"hold to retire"):d,n[23]=b,n[24]=d,n[25]=x,n[26]=p,n[27]=O):O=n[27],n[28]!==O?(M=(0,$.jsx)(s.Text,{style:xe.hint,children:O}),n[28]=O,n[29]=M):M=n[29],n[30]!==o?(W=F.has(o)?(0,$.jsx)(s.Text,{style:xe.pickAux,children:"not wired yet"}):null,n[30]=o,n[31]=W):W=n[31],n[32]!==A||n[33]!==M||n[34]!==W?(B=(0,$.jsxs)(t.View,{style:xe.grow,children:[A,M,W]}),n[32]=A,n[33]=M,n[34]=W,n[35]=B):B=n[35],n[36]!==I||n[37]!==P||n[38]!==B||n[39]!==V||n[40]!==z||n[41]!==R?(N=(0,$.jsxs)(l.Pressable,Object.assign({},I,{style:xe.pickRow,accessibilityRole:"button",accessibilityLabel:V,testID:z,children:[R,P,B]})),n[36]=I,n[37]=P,n[38]=B,n[39]=V,n[40]=z,n[41]=R,n[42]=N):N=n[42],N});function he(e,t,n){if(t>0){const n=1===t?"filter":"filters";return{filteredOut:!0,exit:"clear-filters",message:`No sessions match. ${e.length} in the fleet, ${t} ${n} on.`}}const s=e.filter(e=>(0,R.isSnoozed)(e,n));if(0===s.length)return{filteredOut:!1,exit:"leave",message:"No sessions in the ring."};const o=s.map(e=>e.snoozedUntil?Date.parse(e.snoozedUntil):Number.NaN).filter(e=>Number.isFinite(e)&&e>n.getTime()).sort((e,t)=>e-t)[0],l=o?` Next one wakes ${be(new Date(o),n)}.`:"",i=1===s.length?"session is":"sessions are";return{filteredOut:!1,exit:"leave",message:`All ${s.length} ${i} snoozed.${l}`}}function be(e,t){const n=e.getTime()-t.getTime();if(!Number.isFinite(n)||n<=0)return"any moment";const s=Math.round(n/6e4);if(s<60)return s<1?"any moment":`in ${s}m`;const o=Math.round(s/60);return o<24?`in ${o}h`:`in ${Math.round(o/24)}d`}function ge(e){const t=e.digest,n=t?.summary??t?.goal,s=[t?.goal,t?.nextStep,t?.blockers?.length?t.blockers.join("\n"):void 0].filter(e=>Boolean(e&&e!==n));return s.length>0?s.join("\n\n"):""}const pe=(0,d.memo)(function({mode:e,text:n,active:o}){const l=(0,d.useRef)(new a.Animated.Value(0)).current,i=o&&"text"===e&&n.length>0;(0,d.useEffect)(()=>{if(!i)return;const e=a.Animated.loop(a.Animated.sequence([a.Animated.timing(l,{toValue:-96,duration:24e3,easing:u.default.inOut(u.default.quad),useNativeDriver:!1}),a.Animated.timing(l,{toValue:0,duration:24e3,easing:u.default.inOut(u.default.quad),useNativeDriver:!1})]));return e.start(),()=>{e.stop(),l.setValue(0)}},[i,l]);const c=(0,d.useMemo)(()=>({transform:[{translateY:l}]}),[l]);return"off"===e?null:(0,$.jsx)(t.View,{style:"text"===e?Le:xe.background,testID:`reels-background-${e}`,children:"text"===e?(0,$.jsx)(a.Animated.View,{style:c,children:(0,$.jsx)(s.Text,{style:xe.backgroundBody,numberOfLines:40,children:n})}):null})}),me=(0,d.memo)(function(e){const n=(0,c.c)(28),{gated:o,allTags:l,onPickTag:i,decision:a,decisions:d,serverId:u,agentId:h,onAnswered:b,onVerb:p,actAllowed:y,capLabel:f,tagError:x}=e;if(o){let e,o,a;return n[0]!==l||n[1]!==i?(e=(0,$.jsx)(_.TagGate,{available:l,onPick:i}),n[0]=l,n[1]=i,n[2]=e):e=n[2],n[3]!==x?(o=x?(0,$.jsx)(s.Text,{style:xe.sendError,testID:"reels-verb-error",children:x}):null,n[3]=x,n[4]=o):o=n[4],n[5]!==e||n[6]!==o?(a=(0,$.jsxs)(t.View,{children:[e,o]}),n[5]=e,n[6]=o,n[7]=a):a=n[7],a}if(a){if(!y){let e,o,l,i,a;return n[8]!==f?(e=(0,$.jsx)(s.Text,{style:xe.hint,children:f}),n[8]=f,n[9]=e):e=n[9],n[10]===Symbol.for("react.memo_cache_sentinel")?(o=(0,$.jsx)(s.Text,{style:xe.cardTapHint,children:"Decisions are done for today. You can still retire or snooze this one."}),n[10]=o):o=n[10],n[11]!==p?(l=_.TACO_VERBS.map(e=>(0,$.jsx)(se,{verb:e.id,icon:e.icon,label:e.label,onVerb:p},e.id)),n[11]=p,n[12]=l):l=n[12],n[13]!==l?(i=(0,$.jsx)(t.View,{style:xe.rowGap,children:l}),n[13]=l,n[14]=i):i=n[14],n[15]!==e||n[16]!==i?(a=(0,$.jsxs)(t.View,{testID:"reels-cap-reached",children:[e,o,i]}),n[15]=e,n[16]=i,n[17]=a):a=n[17],a}let e;return n[18]!==h||n[19]!==d||n[20]!==b||n[21]!==u?(e=(0,$.jsx)(T.DecisionChips,{serverId:u,agentId:h,decisions:d,onAnswered:b}),n[18]=h,n[19]=d,n[20]=b,n[21]=u,n[22]=e):e=n[22],e}let j,S,v;return n[23]===Symbol.for("react.memo_cache_sentinel")?(j=(0,$.jsx)(s.Text,{style:xe.hint,children:"Nothing to decide. Why is this still open?"}),n[23]=j):j=n[23],n[24]!==p?(S=_.TACO_VERBS.map(e=>(0,$.jsx)(se,{verb:e.id,icon:e.icon,label:e.label,onVerb:p},e.id)),n[24]=p,n[25]=S):S=n[25],n[26]!==S?(v=(0,$.jsxs)(t.View,{testID:"reels-taco-row",children:[j,(0,$.jsx)(t.View,{style:xe.rowGap,children:S})]}),n[26]=S,n[27]=v):v=n[27],v}),ye=(0,d.memo)(function(e){const n=(0,c.c)(82),{overlay:i,session:a,ring:d,now:u,decisionTarget:h,onClose:b,onSend:p,onSnooze:y,onConsolidate:f,onKanban:j,onVerb:S,overlayStyle:w,sendError:T,timeFieldDisarmed:C,actAllowed:I,verbError:D,openDecisions:V,onShare:z,onAutomate:R,allTags:L,allProviders:P,statusSelection:A,tagSelection:O,kanbanSelection:M,providerSelection:E,originSelection:H,timeSelection:W,onCycleStatus:B,onCycleTag:F,onCycleKanban:N,onCycleProvider:G,onCycleOrigin:q,onToggleTimeWindow:U}=e,J=a;let Q;n[0]!==U?(Q=e=>U(e),n[0]=U,n[1]=Q):Q=n[1];const Z=Q,ee=(0,k.useKanbanBuckets)();Y("none"!==i.kind,b);const te="caption"===i.kind;let se,re,he,be,ge,pe,me,ye,fe;return n[2]!==I||n[3]!==J||n[4]!==h||n[5]!==b||n[6]!==p||n[7]!==V||n[8]!==T||n[9]!==te?(se=(0,$.jsx)(X,{session:J,visible:te,onClose:b,onSend:p,sendError:T,openDecisions:V,target:h,actAllowed:I},J.id),n[2]=I,n[3]=J,n[4]=h,n[5]=b,n[6]=p,n[7]=V,n[8]=T,n[9]=te,n[10]=se):se=n[10],n[11]!==J.snoozeCount||n[12]!==u||n[13]!==b||n[14]!==y||n[15]!==i.kind||n[16]!==w||n[17]!==D?(re="snooze"===i.kind?(0,$.jsx)(t.View,{style:w,children:(0,$.jsxs)(t.View,{children:[(0,$.jsx)(_.SnoozeSheet,{priorCount:J.snoozeCount,now:u,onCancel:b,onSnooze:y}),D?(0,$.jsx)(s.Text,{style:xe.sendError,testID:"reels-verb-error",children:D}):null]})}):null,n[11]=J.snoozeCount,n[12]=u,n[13]=b,n[14]=y,n[15]=i.kind,n[16]=w,n[17]=D,n[18]=re):re=n[18],n[19]!==u||n[20]!==b||n[21]!==f||n[22]!==i.kind||n[23]!==w||n[24]!==d||n[25]!==D?(he="consolidate"===i.kind?(0,$.jsx)(t.View,{style:w,children:(0,$.jsx)(ne,{candidates:d,now:u,onCancel:b,onConsolidate:f,verbError:D})}):null,n[19]=u,n[20]=b,n[21]=f,n[22]=i.kind,n[23]=w,n[24]=d,n[25]=D,n[26]=he):he=n[26],n[27]!==b||n[28]!==S||n[29]!==i.kind||n[30]!==w?(be="taco"===i.kind?(0,$.jsx)(t.View,{style:w,children:(0,$.jsxs)(t.View,{style:xe.sheet,testID:"reels-taco-sheet",children:[(0,$.jsx)(s.Text,{style:xe.sheetTitle,children:"TACO"}),_.TACO_VERBS.map(e=>(0,$.jsx)(ue,{verb:e.id,icon:e.icon,label:e.label,detail:e.detail,onVerb:S},e.id)),(0,$.jsx)(l.Pressable,{onPress:b,accessibilityRole:"button",accessibilityLabel:"Cancel and close",style:xe.send,testID:"reels-taco-cancel",children:(0,$.jsx)(s.Text,{style:xe.link,children:"cancel"})})]})}):null,n[27]=b,n[28]=S,n[29]=i.kind,n[30]=w,n[31]=be):be=n[31],n[32]!==P||n[33]!==L||n[34]!==ee||n[35]!==M||n[36]!==b||n[37]!==N||n[38]!==q||n[39]!==G||n[40]!==B||n[41]!==F||n[42]!==Z||n[43]!==H||n[44]!==i.kind||n[45]!==w||n[46]!==E||n[47]!==A||n[48]!==O||n[49]!==C||n[50]!==W?(ge="filters"===i.kind?(0,$.jsx)(t.View,{style:w,children:(0,$.jsxs)(o.ScrollView,{style:xe.sheet,testID:"reels-filters-sheet",children:[(0,$.jsx)(s.Text,{style:xe.sheetTitle,children:"Filter the ring"}),(0,$.jsx)(s.Text,{style:xe.hint,children:"The same filter the sessions list uses, so setting it here sets it there."}),(0,$.jsx)(s.Text,{style:xe.fieldLabel,children:"State"}),(0,$.jsx)(t.View,{style:xe.rowGap,children:le.map(e=>(0,$.jsx)(ce,{value:e,label:K(e),mode:(0,x.getFilterValueMode)(A,e),onCycle:B},e))}),(0,$.jsx)(s.Text,{style:xe.fieldLabel,children:"Kanban"}),(0,$.jsx)(t.View,{style:xe.rowGap,children:ee.map(e=>(0,$.jsx)(ce,{value:e.id,label:e.label,mode:(0,x.getFilterValueMode)(M,e.id),onCycle:N},e.id))}),(0,$.jsx)(s.Text,{style:xe.fieldLabel,children:"Tag"}),(0,$.jsx)(t.View,{style:xe.rowGap,children:L.map(e=>(0,$.jsx)(ce,{value:e,label:e,mode:(0,x.getFilterValueMode)(O,e),onCycle:F},e))}),(0,$.jsx)(s.Text,{style:xe.fieldLabel,children:"Date"}),C?(0,$.jsx)(s.Text,{style:xe.hint,testID:"reels-filter-date-off",children:"Off while dates are measured on when a session was archived. The ring only holds live sessions. Change it on the sessions bar to filter by date here."}):(0,$.jsx)(t.View,{style:xe.rowGap,children:v.SESSION_TIME_WINDOWS.map(e=>(0,$.jsx)(ce,{value:e,label:ie[e],mode:"window"===W?.kind&&W.window===e?"include":"neutral",onCycle:Z},e))}),(0,$.jsx)(s.Text,{style:xe.fieldLabel,children:"Provider"}),(0,$.jsx)(t.View,{style:xe.rowGap,children:P.map(e=>(0,$.jsx)(ce,{value:e,label:e,mode:(0,x.getFilterValueMode)(E,e),onCycle:G},e))}),(0,$.jsx)(s.Text,{style:xe.fieldLabel,children:"Origin"}),(0,$.jsx)(t.View,{style:xe.rowGap,children:ae.map(e=>(0,$.jsx)(ce,{value:e.origin,label:e.label,mode:(0,x.getFilterValueMode)(H,e.origin),onCycle:q},e.origin))}),(0,$.jsx)(l.Pressable,{onPress:b,accessibilityRole:"button",accessibilityLabel:"Done, close filters",style:xe.send,testID:"reels-filters-done",children:(0,$.jsx)(s.Text,{style:xe.link,children:"done"})})]})}):null,n[32]=P,n[33]=L,n[34]=ee,n[35]=M,n[36]=b,n[37]=N,n[38]=q,n[39]=G,n[40]=B,n[41]=F,n[42]=Z,n[43]=H,n[44]=i.kind,n[45]=w,n[46]=E,n[47]=A,n[48]=O,n[49]=C,n[50]=W,n[51]=ge):ge=n[51],n[52]!==R||n[53]!==b||n[54]!==i.kind||n[55]!==w||n[56]!==D?(pe="automate"===i.kind?(0,$.jsx)(t.View,{style:w,children:(0,$.jsxs)(t.View,{style:xe.sheet,testID:"reels-automate-sheet",children:[(0,$.jsx)(s.Text,{style:xe.sheetTitle,children:"Automate"}),(0,$.jsx)(s.Text,{style:xe.hint,children:"Re-runs this session on a cadence, with its next step as the prompt."}),D?(0,$.jsx)(s.Text,{style:xe.sendError,testID:"reels-verb-error",children:D}):null,$e.map(e=>(0,$.jsx)(oe,{everyMs:e.everyMs,label:e.label,onPick:R},e.id)),(0,$.jsx)(l.Pressable,{onPress:b,accessibilityRole:"button",accessibilityLabel:"Cancel and close",style:xe.send,testID:"reels-automate-cancel",children:(0,$.jsx)(s.Text,{style:xe.link,children:"cancel"})})]})}):null,n[52]=R,n[53]=b,n[54]=i.kind,n[55]=w,n[56]=D,n[57]=pe):pe=n[57],n[58]!==b||n[59]!==z||n[60]!==i.kind||n[61]!==w||n[62]!==D?(me="share"===i.kind?(0,$.jsx)(t.View,{style:w,children:(0,$.jsxs)(t.View,{style:xe.sheet,testID:"reels-share-sheet",children:[(0,$.jsx)(s.Text,{style:xe.sheetTitle,children:"Send"}),(0,$.jsx)(s.Text,{style:xe.hint,children:"Send this card somewhere a person will read it."}),D?(0,$.jsx)(s.Text,{style:xe.sendError,testID:"reels-verb-error",children:D}):null,je.map(e=>(0,$.jsx)(de,{target:e.id,label:e.label,onShare:z},e.id)),(0,$.jsx)(l.Pressable,{onPress:b,accessibilityRole:"button",accessibilityLabel:"Cancel and close",style:xe.send,testID:"reels-share-cancel",children:(0,$.jsx)(s.Text,{style:xe.link,children:"cancel"})})]})}):null,n[58]=b,n[59]=z,n[60]=i.kind,n[61]=w,n[62]=D,n[63]=me):me=n[63],n[64]!==J.kanban||n[65]!==J.model||n[66]!==J.provider||n[67]!==b||n[68]!==j||n[69]!==i.kind||n[70]!==w||n[71]!==D?(ye="options"===i.kind?(0,$.jsx)(t.View,{style:w,children:(0,$.jsxs)(o.ScrollView,{style:xe.sheet,testID:"reels-options-sheet",children:[(0,$.jsx)(s.Text,{style:xe.sheetTitle,children:"Session options"}),(0,$.jsx)(s.Text,{style:xe.fieldLabel,children:"Kanban"}),(0,$.jsx)(_.KanbanPicker,{current:J.kanban,onPick:j}),D?(0,$.jsx)(s.Text,{style:xe.sendError,testID:"reels-verb-error",children:D}):null,(0,$.jsx)(s.Text,{style:xe.fieldLabel,children:"Provider and model"}),(0,$.jsx)(s.Text,{style:xe.fieldValue,children:J.model?`${J.provider}/${J.model}`:J.provider}),(0,$.jsx)(s.Text,{style:xe.hint,children:"One control in the app, not two: combined-model-selector with favourites."}),(0,$.jsx)(l.Pressable,{onPress:b,accessibilityRole:"button",accessibilityLabel:"Close session options",style:xe.send,testID:"reels-options-close",children:(0,$.jsx)(s.Text,{style:xe.link,children:"close"})})]})}):null,n[64]=J.kanban,n[65]=J.model,n[66]=J.provider,n[67]=b,n[68]=j,n[69]=i.kind,n[70]=w,n[71]=D,n[72]=ye):ye=n[72],n[73]!==ye||n[74]!==se||n[75]!==re||n[76]!==he||n[77]!==be||n[78]!==ge||n[79]!==pe||n[80]!==me?(fe=(0,$.jsxs)($.Fragment,{children:[se,re,he,be,ge,pe,me,ye]}),n[73]=ye,n[74]=se,n[75]=re,n[76]=he,n[77]=be,n[78]=ge,n[79]=pe,n[80]=me,n[81]=fe):fe=n[81],fe}),fe=(0,d.memo)(function(e){const n=(0,c.c)(205),{sessions:o,allTags:i,actCap:a,background:u,now:h,onLeaveRing:b}=e,y=void 0===a?L.DEFAULT_ACT_CAP:a,x=void 0===u?"text":u,j=(0,V.useReelsVerbs)(),{answer:S}=(0,I.useAnswerDecision)(),[v,k]=(0,d.useState)(Ee);let T,D,A;n[0]!==h?(T=()=>{if(h)return;const e=setInterval(()=>k(Date.now()),6e4);return()=>clearInterval(e)},D=[h],n[0]=h,n[1]=T,n[2]=D):(T=n[1],D=n[2]),(0,d.useEffect)(T,D),n[3]!==h||n[4]!==v?(A=h??new Date(v),n[3]=h,n[4]=v,n[5]=A):A=n[5];const O=A,[M,E]=(0,d.useState)(1),H=(0,P.useActBudgetStore)(He);let F;n[6]!==O?(F=e=>(0,P.actsOn)(e,O),n[6]=O,n[7]=F):F=n[7];const G=(0,P.useActBudgetStore)(F),K=(0,P.useActBudgetStore)(We);let q;n[8]!==O||n[9]!==H?(q=()=>H(O),n[8]=O,n[9]=H,n[10]=q):q=n[10];const Y=q,[X,J]=(0,d.useState)(0);let Q;n[11]===Symbol.for("react.memo_cache_sentinel")?(Q={kind:"none"},n[11]=Q):Q=n[11];const[Z,ee]=(0,d.useState)(Q);let te;n[12]===Symbol.for("react.memo_cache_sentinel")?(te={},n[12]=te):te=n[12];const[ne,se]=(0,d.useState)(te);let oe;n[13]===Symbol.for("react.memo_cache_sentinel")?(oe={},n[13]=oe):oe=n[13];const[le,ie]=(0,d.useState)(oe),[re,ae]=(0,d.useState)(null),[ce,de]=(0,d.useState)(B);let ue;n[14]===Symbol.for("react.memo_cache_sentinel")?(ue=(e,t)=>{de(n=>Object.assign({},n,{[e]:t}))},n[14]=ue):ue=n[14];const be=ue,fe=(0,d.useRef)(null);let je;n[15]!==le||n[16]!==M||n[17]!==ne||n[18]!==O||n[19]!==o?(je={sessions:o,localTags:ne,actedLaps:le,laps:M,now:O},n[15]=le,n[16]=M,n[17]=ne,n[18]=O,n[19]=o,n[20]=je):je=n[20];const{feed:Se,activeFilters:ke,statusSelection:we,tagSelection:Te,kanbanSelection:Ce,providerSelection:Ie,originSelection:De,timeSelection:Ve,onCycleStatus:ze,onCycleTag:Re,onCycleKanban:Le,onCycleProvider:$e,onCycleOrigin:Oe,onToggleTimeWindow:Me,onClearFilters:qe,timeFieldDisarmed:Ue}=(0,z.useReelsFeed)(je);let Ye;n[21]!==o?(Ye=[...new Set(o.map(Be))].sort(),n[21]=o,n[22]=Ye):Ye=n[22];const Xe=Ye,Je=Se[Math.min(X,Math.max(Se.length-1,0))]??null,Qe=Je?.session??null,Ze=Je?.lap??1;let et;n[23]!==Ze?(et=e=>e.lap===Ze,n[23]=Ze,n[24]=et):et=n[24];const tt=Se.findIndex(et);let nt;if(n[25]!==Se||n[26]!==Ze){let e;n[28]!==Ze?(e=e=>e.lap===Ze,n[28]=Ze,n[29]=e):e=n[29],nt=Se.filter(e),n[25]=Se,n[26]=Ze,n[27]=nt}else nt=n[27];const st=nt.length;let ot;if(n[30]!==Se||n[31]!==Ze){let e;n[33]!==Ze?(e=e=>e.lap===Ze,n[33]=Ze,n[34]=e):e=n[34],ot=Se.filter(e).map(Fe),n[30]=Se,n[31]=Ze,n[32]=ot}else ot=n[32];const lt=ot,it=Qe?.id??"",rt=Qe?.serverId??"",{allowMove:at}=(0,w.useKanbanMoveGuard)(rt);let ct;var dt;n[35]!==Qe?(ct=Qe?(dt=Qe.digest,(dt?.pendingDecisions??[]).filter(e=>!e.answeredAt)):[],n[35]=Qe,n[36]=ct):ct=n[36];const ut=ct,ht=ut[0]??null;let bt;n[37]!==ut?(bt=ut.map(Ne),n[37]=ut,n[38]=bt):bt=n[38];const gt=bt,pt=ut,mt=!!Qe&&0===Qe.tags.length;let yt;n[39]!==y||n[40]!==G||n[41]!==K?(yt=K&&(0,L.canAct)({acts:G,cap:y}),n[39]=y,n[40]=G,n[41]=K,n[42]=yt):yt=n[42];const ft=yt;let xt;n[43]!==y||n[44]!==G?(xt=(0,L.actCapLabel)({acts:G,cap:y}),n[43]=y,n[44]=G,n[45]=xt):xt=n[45];const jt=xt,St=(0,p.useSafeAreaInsets)();let vt;n[46]!==St.top?(vt=[xe.headerSlot,{paddingTop:St.top}],n[46]=St.top,n[47]=vt):vt=n[47];const kt=vt,wt=St.top+56;let Tt;n[48]!==wt?(Tt=[xe.seamBanner,{paddingTop:wt}],n[48]=wt,n[49]=Tt):Tt=n[49];const _t=Tt;let Ct;n[50]!==St.bottom||n[51]!==St.top?(Ct=[xe.overlay,{paddingTop:St.top,paddingBottom:St.bottom}],n[50]=St.bottom,n[51]=St.top,n[52]=Ct):Ct=n[52];const It=Ct;let Dt;n[53]!==X?(Dt=()=>{ee({kind:"none"}),fe.current?.scrollToIndex(X+1)},n[53]=X,n[54]=Dt):Dt=n[54];const Vt=Dt;let zt;n[55]!==Ze?(zt=e=>{ie(t=>Object.assign({},t,{[e]:Ze}))},n[55]=Ze,n[56]=zt):zt=n[56];const Rt=zt;let Lt;n[57]===Symbol.for("react.memo_cache_sentinel")?(Lt=()=>{E(Ge)},n[57]=Lt):Lt=n[57];const Pt=Lt;let At,$t,Ot,Mt,Et,Ht,Wt;n[58]===Symbol.for("react.memo_cache_sentinel")?(At={id:"read",icon:f.BookOpen,label:"read"},n[58]=At):At=n[58],n[59]!==mt?($t={id:"snooze",icon:f.AlarmClock,label:"snooze",disabled:mt},n[59]=mt,n[60]=$t):$t=n[60],n[61]===Symbol.for("react.memo_cache_sentinel")?(Ot={id:"share",icon:f.Send,label:"send"},n[61]=Ot):Ot=n[61],n[62]!==mt?(Mt={id:"taco",icon:f.LayoutList,label:"TACO",disabled:mt},n[62]=mt,n[63]=Mt):Mt=n[63],n[64]===Symbol.for("react.memo_cache_sentinel")?(Et={id:"archive",icon:f.Archive,label:"archive",destructive:!0},Ht={id:"options",icon:f.MoreHorizontal,label:"options"},n[64]=Et,n[65]=Ht):(Et=n[64],Ht=n[65]),n[66]!==$t||n[67]!==Mt?(Wt=[At,$t,Ot,Mt,Et,Ht],n[66]=$t,n[67]=Mt,n[68]=Wt):Wt=n[68];const Bt=Wt;let Ft;n[69]===Symbol.for("react.memo_cache_sentinel")?(Ft=()=>ee({kind:"caption"}),n[69]=Ft):Ft=n[69];const Nt=Ft;let Gt;n[70]===Symbol.for("react.memo_cache_sentinel")?(Gt=()=>ee({kind:"none"}),n[70]=Gt):Gt=n[70];const Kt=Gt;let qt;n[71]===Symbol.for("react.memo_cache_sentinel")?(qt=()=>ee({kind:"filters"}),n[71]=qt):qt=n[71];const Ut=qt;let Yt;n[72]===Symbol.for("react.memo_cache_sentinel")?(Yt=e=>{se(t=>{const n=Object.assign({},t);return delete n[e],n})},n[72]=Yt):Yt=n[72];const Xt=Yt;let Jt;n[73]!==it||n[74]!==rt||n[75]!==j?(Jt=e=>{se(t=>Object.assign({},t,{[it]:[e]})),be("tag",null),j.setTags({serverId:rt,agentId:it},[e]).catch(e=>{Xt(it),be("tag",e instanceof Error?e.message:"could not tag this session")})},n[73]=it,n[74]=rt,n[75]=j,n[76]=Jt):Jt=n[76];const Qt=Jt;let Zt;n[77]!==Vt||n[78]!==it||n[79]!==ut.length||n[80]!==Rt||n[81]!==Y?(Zt=()=>{Y(),Rt(it),ut.length<=1&&Vt()},n[77]=Vt,n[78]=it,n[79]=ut.length,n[80]=Rt,n[81]=Y,n[82]=Zt):Zt=n[82];const en=Zt;let tn;n[83]!==Vt||n[84]!==it||n[85]!==Rt||n[86]!==rt||n[87]!==j?(tn=async e=>{if("terminate"===e)return await j.terminate({serverId:rt,agentId:it}),Rt(it),void Vt();de(B),ee({kind:Ae[e]})},n[83]=Vt,n[84]=it,n[85]=Rt,n[86]=rt,n[87]=j,n[88]=tn):tn=n[88];const nn=tn;let sn;n[89]!==nn?(sn=e=>{if(de(B),"archive"===e)return nn("terminate");const t=Pe[e];t&&ee({kind:t})},n[89]=nn,n[90]=sn):sn=n[90];const on=sn;let ln;n[91]!==Vt||n[92]!==it||n[93]!==Rt||n[94]!==rt||n[95]!==j?(ln=e=>{be("snooze",null),j.snooze({serverId:rt,agentId:it},e.until,e.untilWhat,e.why).then(()=>(Rt(it),Vt(),null)).catch(e=>{be("snooze",e instanceof Error?e.message:"could not snooze this session")})},n[91]=Vt,n[92]=it,n[93]=Rt,n[94]=rt,n[95]=j,n[96]=ln):ln=n[96];const rn=ln;let an;n[97]!==Vt||n[98]!==Rt||n[99]!==rt||n[100]!==j?(an=(e,t)=>{be("consolidate",null),j.consolidate({serverId:rt,winnerId:e,sourceIds:t}).then(()=>{for(const n of[e,...t])Rt(n);return Vt(),null}).catch(e=>{be("consolidate",e instanceof Error?e.message:"could not consolidate these sessions")})},n[97]=Vt,n[98]=Rt,n[99]=rt,n[100]=j,n[101]=an):an=n[101];const cn=an;let dn;n[102]!==ft||n[103]!==S||n[104]!==it||n[105]!==ht||n[106]!==en||n[107]!==rt?(dn=e=>{if(!ft)return void ee({kind:"none"});const t=e.trim();0!==t.length&&ht?(ae(null),S({serverId:rt,agentId:it,decisionId:ht.id,optionId:null,note:t}).then(()=>(en(),null)).catch(e=>{ae(e instanceof Error?e.message:String(e))})):ee({kind:"none"})},n[102]=ft,n[103]=S,n[104]=it,n[105]=ht,n[106]=en,n[107]=rt,n[108]=dn):dn=n[108];const un=dn;let hn;n[109]!==Qe||n[110]!==j?(hn=e=>{Qe&&(be("share",null),j.share(e,ve(Qe)).then(()=>(ee({kind:"none"}),null)).catch(e=>{be("share",e instanceof Error?e.message:"could not open that")}))},n[109]=Qe,n[110]=j,n[111]=hn):hn=n[111];const bn=hn;let gn;n[112]!==Vt||n[113]!==Qe||n[114]!==it||n[115]!==Rt||n[116]!==rt||n[117]!==j?(gn=e=>{if(!Qe)return;be("automate",null);const t=Qe.digest?.nextStep??Qe.digest?.goal??`Continue ${Qe.title}`;j.automate({serverId:rt,agentId:it},e,t,Qe.title).then(()=>(Rt(it),Vt(),null)).catch(e=>{be("automate",e instanceof Error?e.message:"could not create the routine")})},n[112]=Vt,n[113]=Qe,n[114]=it,n[115]=Rt,n[116]=rt,n[117]=j,n[118]=gn):gn=n[118];const pn=gn;let mn;n[119]!==at||n[120]!==Qe?.kanban||n[121]!==it||n[122]!==rt||n[123]!==j?(mn=e=>{be("kanban",null),at(e,Qe?.kanban??null)&&j.setKanban({serverId:rt,agentId:it},e).then(()=>(ee({kind:"none"}),null)).catch(e=>{be("kanban",e instanceof Error?e.message:"could not move this session")})},n[119]=at,n[120]=Qe?.kanban,n[121]=it,n[122]=rt,n[123]=j,n[124]=mn):mn=n[124];const yn=mn;let fn;n[125]!==i||n[126]!==ft||n[127]!==x||n[128]!==jt||n[129]!==ht||n[130]!==pt||n[131]!==Se||n[132]!==mt||n[133]!==X||n[134]!==O||n[135]!==en||n[136]!==on||n[137]!==nn||n[138]!==Qt||n[139]!==Bt||n[140]!==lt.length||n[141]!==_t||n[142]!==ce.tag?(fn=(e,n)=>{const o=n===X,a=e.session;return(0,$.jsxs)(t.View,{style:xe.card,children:[(0,$.jsx)(pe,{mode:x,text:ge(a),active:o}),e.firstOfLap&&e.lap>1?(0,$.jsx)(t.View,{style:_t,testID:`reels-seam-${e.lap}`,children:(0,$.jsx)(_.LapSeam,{lap:e.lap,ringSize:Se.filter(t=>t.lap===e.lap-1).length||lt.length,acted:(0,R.actedThisLap)(Se.filter(t=>t.lap===e.lap-1).map(Ke),e.lap-1)})}):null,(0,$.jsx)(t.View,{style:xe.middle,children:o?(0,$.jsx)(_.ReelsRail,{actions:Bt,contextLabel:a.tags[0]??"untagged",onAction:on}):null}),(0,$.jsxs)(t.View,{style:xe.bottom,children:[(0,$.jsxs)(l.Pressable,{onPress:o?Nt:void 0,disabled:!o,testID:o?"reels-caption-open":void 0,accessibilityRole:"button",accessibilityLabel:`Open the full digest for ${a.title}`,style:xe.captionTap,children:[(0,$.jsx)(s.Text,{style:xe.cardTitle,children:a.title}),(0,$.jsx)(s.Text,{style:xe.cardMeta,children:U(a,O)}),(0,$.jsx)(s.Text,{style:xe.cardSummary,numberOfLines:4,children:a.digest?.summary??a.digest?.goal??"No digest yet."}),o?(0,$.jsx)(s.Text,{style:xe.cardTapHint,children:"tap for the whole digest and to talk to it"}):null]}),o?(0,$.jsx)(me,{gated:mt,allTags:i,onPickTag:Qt,decision:ht,decisions:pt,serverId:a.serverId,agentId:a.id,onAnswered:en,onVerb:nn,actAllowed:ft,capLabel:jt,tagError:ce.tag}):null]})]})},n[125]=i,n[126]=ft,n[127]=x,n[128]=jt,n[129]=ht,n[130]=pt,n[131]=Se,n[132]=mt,n[133]=X,n[134]=O,n[135]=en,n[136]=on,n[137]=nn,n[138]=Qt,n[139]=Bt,n[140]=lt.length,n[141]=_t,n[142]=ce.tag,n[143]=fn):fn=n[143];const xn=fn;if(!Qe){let e;n[144]!==ke||n[145]!==O||n[146]!==o?(e=he(o,ke,O),n[144]=ke,n[145]=O,n[146]=o,n[147]=e):e=n[147];const{message:i,exit:a}=e;let c,d,u;return n[148]!==i?(c=(0,$.jsx)(s.Text,{style:xe.fieldValue,children:i}),n[148]=i,n[149]=c):c=n[149],n[150]!==a||n[151]!==qe||n[152]!==b?(d="clear-filters"===a?(0,$.jsx)(l.Pressable,{onPress:qe,style:xe.send,accessibilityRole:"button",accessibilityLabel:"Clear all filters",testID:"reels-empty-clear-filters",children:(0,$.jsx)(s.Text,{style:xe.link,children:"clear filters"})}):(0,$.jsx)(l.Pressable,{onPress:b,style:xe.send,accessibilityRole:"button",accessibilityLabel:"Back to the sessions list",testID:"reels-empty-leave",children:(0,$.jsx)(s.Text,{style:xe.link,children:"back to sessions"})}),n[150]=a,n[151]=qe,n[152]=b,n[153]=d):d=n[153],n[154]!==c||n[155]!==d?(u=(0,$.jsxs)(t.View,{style:xe.empty,testID:"reels-empty",children:[c,d]}),n[154]=c,n[155]=d,n[156]=u):u=n[156],u}let jn;n[157]!==Se||n[158]!==xn?(jn=(0,$.jsx)(C.ReelsPager,{data:Se,keyExtractor:N,renderCard:xn,onIndexChange:J,onEndReached:Pt,controllerRef:fe}),n[157]=Se,n[158]=xn,n[159]=jn):jn=n[159];const Sn=`${tt>=0?X-tt+1:X+1}/${st} \xb7 lap ${Ze}`;let vn,kn;n[160]!==y||n[161]!==ke||n[162]!==G||n[163]!==Sn?(vn=(0,$.jsx)(_.ReelsHeader,{acts:G,cap:y,activeFilters:ke,onFilter:Ut,position:Sn}),n[160]=y,n[161]=ke,n[162]=G,n[163]=Sn,n[164]=vn):vn=n[164],n[165]!==kt||n[166]!==vn?(kn=(0,$.jsx)(t.View,{style:kt,pointerEvents:"box-none",children:vn}),n[165]=kt,n[166]=vn,n[167]=kn):kn=n[167];const wn=ce[W[Z.kind]??"share"];let Tn,_n;return n[168]!==Xe||n[169]!==i||n[170]!==ft||n[171]!==Qe||n[172]!==ht||n[173]!==Ce||n[174]!==O||n[175]!==pn||n[176]!==un||n[177]!==cn||n[178]!==Le||n[179]!==Oe||n[180]!==$e||n[181]!==ze||n[182]!==Re||n[183]!==yn||n[184]!==bn||n[185]!==rn||n[186]!==Me||n[187]!==nn||n[188]!==gt||n[189]!==De||n[190]!==Z||n[191]!==It||n[192]!==Ie||n[193]!==lt||n[194]!==re||n[195]!==we||n[196]!==wn||n[197]!==Te||n[198]!==Ue||n[199]!==Ve?(Tn=(0,$.jsx)(ye,{overlay:Z,session:Qe,ring:lt,now:O,decisionTarget:ht,onClose:Kt,onSend:un,actAllowed:ft,timeFieldDisarmed:Ue,onSnooze:rn,onConsolidate:cn,onKanban:yn,onVerb:nn,overlayStyle:It,sendError:re,verbError:wn,openDecisions:gt,onShare:bn,onAutomate:pn,allTags:i,allProviders:Xe,statusSelection:we,tagSelection:Te,kanbanSelection:Ce,providerSelection:Ie,originSelection:De,timeSelection:Ve,onCycleStatus:ze,onCycleTag:Re,onCycleKanban:Le,onCycleProvider:$e,onCycleOrigin:Oe,onToggleTimeWindow:Me}),n[168]=Xe,n[169]=i,n[170]=ft,n[171]=Qe,n[172]=ht,n[173]=Ce,n[174]=O,n[175]=pn,n[176]=un,n[177]=cn,n[178]=Le,n[179]=Oe,n[180]=$e,n[181]=ze,n[182]=Re,n[183]=yn,n[184]=bn,n[185]=rn,n[186]=Me,n[187]=nn,n[188]=gt,n[189]=De,n[190]=Z,n[191]=It,n[192]=Ie,n[193]=lt,n[194]=re,n[195]=we,n[196]=wn,n[197]=Te,n[198]=Ue,n[199]=Ve,n[200]=Tn):Tn=n[200],n[201]!==jn||n[202]!==kn||n[203]!==Tn?(_n=(0,$.jsxs)(t.View,{style:xe.root,testID:"reels-screen",children:[jn,kn,Tn]}),n[201]=jn,n[202]=kn,n[203]=Tn,n[204]=_n):_n=n[204],_n}),xe=y.StyleSheet.create(e=>({composerLabel:{color:e.colors.foregroundMuted,fontSize:e.fontSize.xs,paddingHorizontal:e.spacing[2],paddingTop:e.spacing[1],uni__dependencies:[0]},sheetInner:{flex:1},tagChip:{minHeight:44,justifyContent:"center",borderWidth:1,borderColor:e.colors.border,borderRadius:e.borderRadius.full,paddingHorizontal:e.spacing[2],uni__dependencies:[0]},tagChipOn:{borderColor:e.colors.accent,uni__dependencies:[0]},tagChipOff:{borderColor:e.colors.destructive,borderStyle:"dashed",opacity:.6,uni__dependencies:[0]},tagChipText:{color:e.colors.foreground,fontSize:e.fontSize.xs,uni__dependencies:[0]},sheetGrab:{minHeight:44,alignItems:"center",justifyContent:"center"},sheetHandle:{width:38,height:4,borderRadius:e.borderRadius.full,backgroundColor:e.colors.border,uni__dependencies:[0]},verbFill:{position:"absolute",left:0,top:0,bottom:0,backgroundColor:e.colors.destructive,opacity:.18,borderRadius:e.borderRadius.full,uni__dependencies:[0]},sendError:{color:e.colors.destructive,fontSize:e.fontSize.xs,paddingHorizontal:e.spacing[2],uni__dependencies:[0]},verbHoldLabel:{color:e.colors.destructive,fontSize:e.fontSize.xs,uni__dependencies:[0]},captionBackdrop:Object.assign({},y.StyleSheet.absoluteFillObject,{backgroundColor:e.colors.background,opacity:.72,uni__dependencies:[0]}),sheetClose:{minWidth:44,minHeight:44,alignItems:"center",justifyContent:"center"},card:{flex:1,overflow:"hidden"},seamBanner:{paddingHorizontal:e.spacing[2],uni__dependencies:[0]},headerSlot:{position:"absolute",top:0,left:0,right:0},captionTap:{minHeight:44,justifyContent:"flex-end"},root:{flex:1,backgroundColor:e.colors.background,uni__dependencies:[0]},background:Object.assign({},y.StyleSheet.absoluteFillObject,{opacity:.35,backgroundColor:e.colors.surface0,overflow:"hidden",uni__dependencies:[0]}),backgroundText:{padding:e.spacing[2],uni__dependencies:[0]},backgroundBody:{color:e.colors.foregroundMuted,fontSize:e.fontSize.xs,lineHeight:20,uni__dependencies:[0]},middle:{flex:1,alignItems:"flex-end",justifyContent:"flex-end",paddingHorizontal:e.spacing[2],uni__dependencies:[0]},bottom:{padding:e.spacing[2],gap:e.spacing[1],uni__dependencies:[0]},cardTitle:{color:e.colors.foreground,fontSize:e.fontSize.base,fontWeight:"600",uni__dependencies:[0]},cardMeta:{color:e.colors.foregroundMuted,fontSize:e.fontSize.xs,marginTop:2,uni__dependencies:[0]},cardSummary:{color:e.colors.foreground,fontSize:e.fontSize.sm,marginTop:6,lineHeight:19,uni__dependencies:[0]},cardTapHint:{color:e.colors.foregroundMuted,fontSize:e.fontSize.xs,marginTop:4,uni__dependencies:[0]},hint:{color:e.colors.foregroundMuted,fontSize:e.fontSize.xs,lineHeight:17,uni__dependencies:[0]},rowGap:{flexDirection:"row",flexWrap:"wrap",gap:e.spacing[1],alignItems:"center",uni__dependencies:[0]},verbChip:{minHeight:44,minWidth:44,alignItems:"center",justifyContent:"center",overflow:"hidden",borderWidth:1,borderColor:e.colors.border,borderRadius:e.borderRadius["2xl"],paddingHorizontal:e.spacing[2],paddingVertical:e.spacing[1],uni__dependencies:[0]},verbWord:{color:e.colors.foregroundMuted,fontSize:e.fontSize.xs,uni__dependencies:[0]},verbWordDanger:{color:e.colors.destructive,fontSize:e.fontSize.xs,fontWeight:"600",uni__dependencies:[0]},overlay:Object.assign({},y.StyleSheet.absoluteFillObject,{backgroundColor:e.colors.background,uni__dependencies:[0]}),sheet:{padding:e.spacing[2],gap:e.spacing[1],uni__dependencies:[0]},sheetTitle:{color:e.colors.foreground,fontSize:e.fontSize.base,fontWeight:"600",uni__dependencies:[0]},sheetHeadTitle:{flex:1},captionSheet:{position:"absolute",left:0,right:0,bottom:0,top:"42%",backgroundColor:e.colors.background,borderTopWidth:1,borderTopColor:e.colors.border,borderTopLeftRadius:e.borderRadius["2xl"],borderTopRightRadius:e.borderRadius["2xl"],uni__dependencies:[0]},sheetHead:{flexDirection:"row",alignItems:"center",gap:e.spacing[1],padding:e.spacing[2],borderBottomWidth:1,borderBottomColor:e.colors.border,uni__dependencies:[0]},sheetBody:{flex:1,padding:e.spacing[2],uni__dependencies:[0]},field:{marginBottom:e.spacing[1],uni__dependencies:[0]},fieldLabel:{color:e.colors.foregroundMuted,fontSize:e.fontSize.xs,textTransform:"uppercase",letterSpacing:.6,marginTop:e.spacing[1],uni__dependencies:[0]},fieldValue:{color:e.colors.foreground,fontSize:e.fontSize.xs,lineHeight:18,uni__dependencies:[0]},fieldDanger:{color:e.colors.destructive,uni__dependencies:[0]},composer:{flexDirection:"row",alignItems:"center",gap:e.spacing[1],padding:e.spacing[2],borderTopWidth:1,borderTopColor:e.colors.border,uni__dependencies:[0]},composerInput:{flex:1,borderWidth:1,borderColor:e.colors.border,borderRadius:e.borderRadius.full,paddingHorizontal:e.spacing[2],paddingVertical:e.spacing[1],color:e.colors.foreground,fontSize:e.fontSize.xs,uni__dependencies:[0]},composerSend:{minHeight:44,justifyContent:"center",paddingHorizontal:e.spacing[1],uni__dependencies:[0]},link:{color:e.colors.accent,fontSize:e.fontSize.xs,uni__dependencies:[0]},send:{borderWidth:1,borderColor:e.colors.accent,borderRadius:e.borderRadius["2xl"],paddingHorizontal:e.spacing[2],paddingVertical:e.spacing[1],alignSelf:"flex-start",uni__dependencies:[0]},dim:{opacity:.35},pickList:{maxHeight:400},pickRow:{minHeight:44,flexDirection:"row",alignItems:"center",gap:e.spacing[1],paddingVertical:e.spacing[1],paddingHorizontal:e.spacing[1],borderWidth:1,borderColor:e.colors.border,borderRadius:e.borderRadius["2xl"],marginBottom:4,uni__dependencies:[0]},pickRowOn:{borderColor:e.colors.accent,uni__dependencies:[0]},pickMark:{width:22,alignItems:"center"},pickName:{color:e.colors.foreground,fontSize:e.fontSize.xs,fontWeight:"600",uni__dependencies:[0]},pickCrown:{paddingHorizontal:6,paddingVertical:4,justifyContent:"center"},pickAux:{color:e.colors.foregroundMuted,fontSize:e.fontSize.xs,uni__dependencies:[0]},grow:{flex:1},empty:{flex:1,alignItems:"center",justifyContent:"center",padding:e.spacing[3],uni__dependencies:[0]}})),je=[{id:"whatsapp",label:"WhatsApp"},{id:"slack",label:"Slack"},{id:"email",label:"Email"}],Se=400;function ve(e){const t=[`${e.title} (${K(String(e.statusBucket))})`,e.digest?.summary??e.digest?.goal??"",e.digest?.nextStep?`Next: ${e.digest.nextStep}`:"",e.digest?.blockers?.length?`Blocked: ${e.digest.blockers.join("; ")}`:""].filter(e=>e.length>0).join("\n");return t.length>Se?`${t.slice(0,399)}\u2026`:t}const ke=[xe.fieldValue,xe.fieldDanger],we=[xe.sheetTitle,xe.sheetHeadTitle],Te=[xe.pickRow,xe.pickRowOn],Ce=[xe.verbWord,xe.verbWordDanger],Ie={include:[xe.tagChip,xe.tagChipOn],exclude:[xe.tagChip,xe.tagChipOff],neutral:xe.tagChip},De={selected:!0},Ve={selected:!1},ze=e=>e?De:Ve,Re=[xe.send,xe.dim],Le=[xe.background,xe.backgroundText],Pe={read:"caption",snooze:"snooze",share:"share",taco:"taco",options:"options"},Ae={consolidate:"consolidate",outsource:"share",automate:"automate"},$e=[{id:"hourly",label:"Every hour",everyMs:36e5},{id:"daily",label:"Every day",everyMs:864e5},{id:"weekly",label:"Every week",everyMs:6048e5}];function Oe(e,t){return O(t.dy)}function Me(e){return`${e.kind}: ${e.label??e.url}`}function Ee(){return Date.now()}function He(e){return e.recordAct}function We(e){return e.hydrated}function Be(e){return e.provider}function Fe(e){return e.session}function Ne(e){return{id:e.id,question:e.question}}function Ge(e){return e+1}function Ke(e){return e.session}},4568,[348,2838,349,2815,2476,4017,3516,350,36,140,616,252,591,659,649,25,546,182,234,571,146,558,56,811,3619,3442,3621,3618,4007,4009,4013,4016,4569,4014,4019,4570,4571,4572,4018,4574,4575,279]);
16328
16328
  __d(function(g,r,i,a,m,_e,d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"ReelsPager",{enumerable:!0,get:function(){return p}});var e=r(d[0]),t=r(d[1]),n=r(d[2]);r(d[3]);var o,l=r(d[4]),s=(o=l)&&o.__esModule?o:{default:o};r(d[5]);var c=r(d[6]),u=r(d[7]),h=r(d[8]);const f={itemVisiblePercentThreshold:60};function b({data:o,keyExtractor:l,renderCard:u,onIndexChange:b,onEndReached:p,controllerRef:I,testID:R}){const{height:v}=(0,s.default)(),y=(0,n.useRef)(null),T=(0,c.useSafeAreaInsets)(),w=Math.max(1,v-T.top-T.bottom),C=(0,n.useMemo)(()=>[...o],[o]),M=(0,n.useMemo)(()=>[x.list,{paddingTop:T.top,paddingBottom:T.bottom}],[T.bottom,T.top]),E=(0,n.useRef)(b);E.current=b;const S=(0,n.useRef)(({viewableItems:e})=>{const t=e[0];null!=t?.index&&E.current(t.index)}).current,_=(0,n.useRef)(f).current;I&&(I.current={scrollToIndex:e=>{e>=0&&e<C.length&&y.current?.scrollToIndex({index:e,animated:!0})}});const P=(0,n.useCallback)((e,t)=>({length:w,offset:w*t,index:t}),[w]),j=(0,n.useMemo)(()=>({height:w}),[w]),k=(0,n.useCallback)(({item:t,index:n})=>(0,h.jsx)(e.View,{style:j,children:u(t,n,w)}),[w,j,u]);return(0,h.jsx)(t.FlatList,{ref:y,style:M,testID:R??"reels-pager",data:C,keyExtractor:l,renderItem:k,getItemLayout:P,pagingEnabled:!0,snapToInterval:w,snapToAlignment:"start",disableIntervalMomentum:!0,decelerationRate:"fast",showsVerticalScrollIndicator:!1,onViewableItemsChanged:S,viewabilityConfig:_,onEndReached:p,onEndReachedThreshold:.5,initialNumToRender:2,maxToRenderPerBatch:3,windowSize:5,removeClippedSubviews:!1})}const x=u.StyleSheet.create(()=>({list:{flex:1}})),p=(0,n.memo)(b)},4569,[348,2656,36,144,686,146,558,56,279]);
16329
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.shareUrlFor=y,e.consolidateSessions=v,e.useReelsVerbs=function(){const s=(0,t.c)(21),u=(0,n.useQueryClient)();let y;s[0]!==u?(y=t=>{u.invalidateQueries({queryKey:(0,o.agentHistoryQueryKey)(t)})},s[0]=u,s[1]=y):y=s[1];const w=y;let f;s[2]!==w?(f=async t=>{const{serverId:n,agentId:s}=t;await I(n).archiveAgent(s),w(n)},s[2]=w,s[3]=f):f=s[3];const h=f;let b;s[4]!==w?(b=async(t,n,s,o)=>{const{serverId:c,agentId:l}=t,u=await I(c).snoozeAgent(l,n,s,o);return w(c),u},s[4]=w,s[5]=b):b=s[5];const A=b;let _;s[6]!==w?(_=async(t,n)=>{const{serverId:s,agentId:o}=t;await I(s).updateAgent(o,{labels:{[l.KANBAN_LABEL_KEY]:n}}),w(s)},s[6]=w,s[7]=_):_=s[7];const E=_;let K;s[8]!==w?(K=async(t,n,s)=>{const{serverId:o,agentId:l}=t;await I(o).updateAgent(l,{labels:(0,c.buildLabelPatchForTagSet)(s,n)}),w(o)},s[8]=w,s[9]=K):K=s[9];const $=K;let C;s[10]!==w?(C=async(t,n,s,o)=>{const{serverId:c,agentId:l}=t;await I(c).scheduleCreate({prompt:s,name:o,cadence:{type:"every",everyMs:n},target:{type:"agent",agentId:l}}),w(c)},s[10]=w,s[11]=C):C=s[11];const S=C,x=p;let L;s[12]!==w?(L=async t=>{await v(t),w(t.serverId)},s[12]=w,s[13]=L):L=s[13];const N=L;let Q;s[14]!==S||s[15]!==N||s[16]!==E||s[17]!==$||s[18]!==A||s[19]!==h?(Q={terminate:h,snooze:A,consolidate:N,setKanban:E,setTags:$,automate:S,share:x},s[14]=S,s[15]=N,s[16]=E,s[17]=$,s[18]=A,s[19]=h,s[20]=Q):Q=s[20];return Q};var t=r(d[0]);r(d[1]);var n=r(d[2]),s=r(d[3]),o=r(d[4]),c=r(d[5]),l=r(d[6]),u=r(d[7]);function y(t,n){const s=encodeURIComponent(n);switch(t){case"whatsapp":return`https://wa.me/?text=${s}`;case"slack":return`slack://open?text=${s}`;case"email":return`mailto:?body=${s}`;default:return w(t)}}function w(t){throw new Error(`unhandled share target: ${String(t)}`)}function I(t){const n=(0,s.getHostRuntimeStore)().getClient(t);if(!n)throw new Error(`No client for server ${t}`);return n}async function v({serverId:t,winnerId:n,sourceIds:s}){const o=I(t);await o.consolidateAgents(n,s.filter(t=>t!==n))}async function p(t,n){await(0,u.openExternalUrl)(y(t,n))}},4570,[350,36,3030,3274,4015,4003,4008,3577]);
16329
+ __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.shareUrlFor=I,e.consolidateSessions=f,e.useReelsVerbs=function(){const s=(0,t.c)(21),y=(0,n.useQueryClient)();let I;s[0]!==y?(I=t=>{y.invalidateQueries({queryKey:(0,o.agentHistoryQueryKey)(t)})},s[0]=y,s[1]=I):I=s[1];const v=I;let h;s[2]!==v?(h=async t=>{const{serverId:n,agentId:s}=t;await w(n).archiveAgent(s),v(n)},s[2]=v,s[3]=h):h=s[3];const b=h;let S;s[4]!==v?(S=async(t,n,s,o)=>{const{serverId:c,agentId:l}=t,u=await w(c).snoozeAgent(l,n,s,o);return v(c),u},s[4]=v,s[5]=S):S=s[5];const A=S;let $;s[6]!==v?($=async(t,n,s)=>{const{serverId:o,agentId:c}=t;await w(o).updateAgent(c,{labels:(0,l.buildLabelsForBucketMove)(s,n,u.useKanbanBoardStore.getState().defaultBucketId)}),v(o)},s[6]=v,s[7]=$):$=s[7];const k=$;let C;s[8]!==v?(C=async(t,n,s)=>{const{serverId:o,agentId:l}=t;await w(o).updateAgent(l,{labels:(0,c.buildLabelPatchForTagSet)(s,n)}),v(o)},s[8]=v,s[9]=C):C=s[9];const K=C;let _;s[10]!==v?(_=async(t,n,s,o)=>{const{serverId:c,agentId:l}=t;await w(c).scheduleCreate({prompt:s,name:o,cadence:{type:"every",everyMs:n},target:{type:"agent",agentId:l}}),v(c)},s[10]=v,s[11]=_):_=s[11];const x=_,B=p;let E;s[12]!==v?(E=async t=>{await f(t),v(t.serverId)},s[12]=v,s[13]=E):E=s[13];const F=E;let M;s[14]!==x||s[15]!==F||s[16]!==k||s[17]!==K||s[18]!==A||s[19]!==b?(M={terminate:b,snooze:A,consolidate:F,setKanban:k,setTags:K,automate:x,share:B},s[14]=x,s[15]=F,s[16]=k,s[17]=K,s[18]=A,s[19]=b,s[20]=M):M=s[20];return M};var t=r(d[0]);r(d[1]);var n=r(d[2]),s=r(d[3]),o=r(d[4]),c=r(d[5]),l=r(d[6]),u=r(d[7]),y=r(d[8]);function I(t,n){const s=encodeURIComponent(n);switch(t){case"whatsapp":return`https://wa.me/?text=${s}`;case"slack":return`slack://open?text=${s}`;case"email":return`mailto:?body=${s}`;default:return v(t)}}function v(t){throw new Error(`unhandled share target: ${String(t)}`)}function w(t){const n=(0,s.getHostRuntimeStore)().getClient(t);if(!n)throw new Error(`No client for server ${t}`);return n}async function f({serverId:t,winnerId:n,sourceIds:s}){const o=w(t);await o.consolidateAgents(n,s.filter(t=>t!==n))}async function p(t,n){await(0,y.openExternalUrl)(I(t,n))}},4570,[350,36,3030,3274,4015,4003,4008,4007,3577]);
16330
16330
  __d(function(g,r,_i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.feedKeyFor=o,e.useReelsFeed=function({sessions:c,localTags:u,actedLaps:S,laps:F,now:p}){const f=(0,i.useSessionFilterStore)(t=>t.clearFilters),v=(0,i.useSessionFilterStore)(t=>t.statusSelection),b=(0,i.useSessionFilterStore)(t=>t.tagSelection),k=(0,i.useSessionFilterStore)(t=>t.kanbanSelection),y=(0,i.useSessionFilterStore)(t=>t.providerSelection),C=(0,i.useSessionFilterStore)(t=>t.originSelection),h=(0,i.useSessionFilterStore)(t=>t.timeSelection),A=(0,i.useSessionFilterStore)(t=>t.timeField),M=(0,i.useSessionFilterStore)(t=>t.cycleStatusFilter),R=(0,i.useSessionFilterStore)(t=>t.cycleTagFilter),w=(0,i.useSessionFilterStore)(t=>t.cycleKanbanFilter),T=(0,i.useSessionFilterStore)(t=>t.cycleProviderFilter),L=(0,i.useSessionFilterStore)(t=>t.cycleOriginFilter),B=(0,i.useSessionFilterStore)(t=>t.toggleTimeWindow),O="archived"===A,P=O?null:h,_=[(0,s.isFilterSelectionActive)(v),(0,s.isFilterSelectionActive)(b),(0,s.isFilterSelectionActive)(k),(0,s.isFilterSelectionActive)(y),(0,s.isFilterSelectionActive)(C),null!==P],K=_.some(Boolean),j=_.filter(Boolean).length,x=(0,t.useCallback)(t=>(0,l.sessionPassesListFilter)({statusBucket:t.statusBucket,tags:[...t.tags],kanbanBucket:t.kanban,isArchived:!1,timeValue:"created"===A?t.createdAt:t.lastActivityAt,provider:t.provider,origin:t.origin,searchableText:""},{statusSelection:v,tagSelection:b,kanbanSelection:k,archivedMode:"all",timeSelection:P,providerSelection:y,originSelection:C,textQuery:""},p),[k,p,C,y,P,v,b,A]),W=(0,t.useMemo)(()=>K?c.filter(x):c,[K,x,c]),$=(0,t.useMemo)(()=>W.map(t=>Object.assign({},t,{tags:u[t.id]??t.tags,actedLap:S[t.id]??t.actedLap??null})),[S,W,u]),D=(0,t.useRef)(new Map),E=(0,t.useRef)(v),Q=(0,t.useRef)(b),V=(0,t.useRef)(k),q=(0,t.useRef)(y),z=(0,t.useRef)(C),G=(0,t.useRef)(P);E.current===v&&Q.current===b&&V.current===k&&q.current===y&&z.current===C&&G.current===P||(E.current=v,Q.current=b,V.current=k,q.current=y,z.current=C,G.current=P,D.current=new Map);const H=(0,t.useMemo)(()=>new Map($.map(t=>[t.id,t])),[$]),I=(0,t.useMemo)(()=>{const t=[];for(let i=1;i<=F;i+=1){let s=(D.current.get(i)??[]).map(t=>H.get(t)).filter(t=>void 0!==t);if(0===s.length){const t=(0,n.buildLap)({sessions:$,lap:i,now:p});t.length>0&&D.current.set(i,t.map(t=>t.id)),s=t}s.forEach((s,n)=>{t.push({session:s,lap:i,key:o(i,s.id),firstOfLap:0===n})})}return t},[H,$,F,p]),J=(0,t.useCallback)(t=>M(t),[M]),N=(0,t.useCallback)(t=>R(t),[R]),U=(0,t.useCallback)(t=>w(t),[w]),X=(0,t.useCallback)(t=>T(t),[T]),Y=(0,t.useCallback)(t=>L(t),[L]),Z=(0,t.useCallback)(t=>B(t),[B]);return{feed:I,activeFilters:j,statusSelection:v,tagSelection:b,kanbanSelection:k,providerSelection:y,originSelection:C,timeSelection:P,timeFieldDisarmed:O,onCycleStatus:J,onCycleTag:N,onCycleKanban:U,onCycleProvider:X,onCycleOrigin:Y,onToggleTimeWindow:Z,onClearFilters:f}};var t=r(d[0]),i=r(d[1]),s=r(d[2]),n=r(d[3]),l=r(d[4]);function o(t,i){return`${t}:${i}`}},4571,[36,3617,3622,4572,4573]);
16331
16331
  __d(function(g,r,i,_a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.ringStateRank=n,e.isSnoozed=u,e.snoozeCancelledByFailure=a,e.isUntagged=o,e.buildLap=function({sessions:t,lap:s,now:c}){return[...t.filter(t=>a(t)||!u(t,c))].sort((t,u)=>{const a=o(t)?0:1,c=o(u)?0:1;if(a!==c)return a-c;if(1===a){const n=t.actedLap===s-1?1:0,a=u.actedLap===s-1?1:0;if(n!==a)return n-a}const l=n(String(t.statusBucket)),f=n(String(u.statusBucket));return l!==f?l-f:t.id.localeCompare(u.id)})},e.actedThisLap=function(t,n){return t.filter(t=>t.actedLap===n).length};var t=r(d[0]);function n(n){return(0,t.getWorkspaceStateBucketPriority)(n)??Number.MAX_SAFE_INTEGER}function u(t,n){if(!t.snoozedUntil)return!1;const u=Date.parse(t.snoozedUntil);return Number.isFinite(u)&&u>n.getTime()}function a(t){return"failed"===t.statusBucket}function o(t){return 0===t.tags.length}},4572,[3442]);
16332
16332
  __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.sessionPassesListFilter=function(o,c,l){const{statusSelection:u,tagSelection:S,kanbanSelection:f,archivedMode:p,timeSelection:v,providerSelection:h,originSelection:F,textQuery:b}=c;if(!(0,n.passesFilterSelection)(o.statusBucket,u))return!1;if(!(0,n.passesFilterSelectionMulti)(o.tags,S))return!1;if(!(0,n.passesFilterSelection)(o.kanbanBucket,f))return!1;if(!(0,s.passesSessionArchivedMode)(o.isArchived,p))return!1;if(!(0,t.matchesSessionTimeSelection)(o.timeValue,v,l))return!1;if(!(0,n.passesFilterSelection)(o.provider,h))return!1;if(!(0,n.passesFilterSelection)(o.origin,F))return!1;if(b.length>0&&!o.searchableText.includes(b))return!1;return!0};var t=r(d[0]),s=r(d[1]),n=r(d[2])},4573,[3618,3623,3622]);
16333
- __d(function(g,r,i,a,_m,_e,_d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),_e.localDayKey=u,Object.defineProperty(_e,"useActBudgetStore",{enumerable:!0,get:function(){return d}}),_e.actsOn=function(e,t){return e.day===u(t)?e.acts:0};var e,t=r(_d[0]),c=(e=t)&&e.__esModule?e:{default:e},n=r(_d[1]),s=r(_d[2]);function u(e=new Date){return`${e.getFullYear()}-${`${e.getMonth()+1}`.padStart(2,"0")}-${`${e.getDate()}`.padStart(2,"0")}`}const d=(0,n.create)()((0,s.persist)((e,t)=>({day:u(),acts:0,actsToday:(e=new Date)=>{const c=u(e);return t().day===c?t().acts:0},recordAct:(t=new Date)=>{const c=u(t);e(e=>e.day===c?{acts:e.acts+1}:{day:c,acts:1})}}),{name:"reels-act-budget",storage:(0,s.createJSONStorage)(()=>c.default)}))},4574,[3275,3269,3428]);
16333
+ __d(function(g,r,i,a,_m,_e,_d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),_e.localDayKey=s,Object.defineProperty(_e,"useActBudgetStore",{enumerable:!0,get:function(){return o}}),_e.actsOn=function(t,e){return t.day===s(e)?t.acts:0};var t,e=r(_d[0]),c=(t=e)&&t.__esModule?t:{default:t},d=r(_d[1]),n=r(_d[2]);function s(t=new Date){return`${t.getFullYear()}-${`${t.getMonth()+1}`.padStart(2,"0")}-${`${t.getDate()}`.padStart(2,"0")}`}const o=(0,d.create)()((0,n.persist)((t,e)=>({day:s(),acts:0,hydrated:!1,actsToday:(t=new Date)=>{const c=s(t);return e().day===c?e().acts:0},recordAct:(e=new Date)=>{const c=s(e);t(t=>t.day===c?{acts:t.acts+1}:{day:c,acts:1})}}),{name:"reels-act-budget",storage:(0,n.createJSONStorage)(()=>c.default),partialize:t=>({day:t.day,acts:t.acts}),onRehydrateStorage:()=>(t,e)=>{o.setState({hydrated:!0})}}))},4574,[3275,3269,3428]);
16334
16334
  __d(function(g,r,i,_a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.consolidationTargets=function(t,n){const l=null!==n&&t.some(t=>t.id===n),o=t.slice().sort((t,n)=>(n.lastActivityAt?.getTime()??0)-(t.lastActivityAt?.getTime()??0))[0]?.id??null,s=(l?n:null)??o;return{winner:s,sourceIds:t.filter(t=>t.id!==s).map(t=>t.id)}},e.canConsolidate=function(t,n){return t.length>=2&&null!==n}},4575,[]);
16335
16335
  __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.isMachineExecution=t,e.isDurable=u,e.isArchived=c,e.selectFeedCandidates=function(n){return n.filter(n=>!t(n)&&!u(n)&&!c(n))};var n=r(d[0]);function t(t){return(0,n.isMachineExecutionAgent)({labels:t.labels??{}})}function u(n){return!0===n.hasSystemPrompt&&!0===n.hasRoutine}function c(n){return null!=n.archivedAt}},4576,[3437]);
16336
16336
  __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return u}});var t=r(d[0]),n=r(d[1]),c=r(d[2]),o=r(d[3]);function u(){const u=(0,t.c)(1);let s;return u[0]===Symbol.for("react.memo_cache_sentinel")?(s=(0,o.jsx)(n.Redirect,{href:(0,c.buildSessionsRoute)()}),u[0]=s):s=u[0],s}},4577,[350,379,3492,279]);
@@ -16700,5 +16700,5 @@ __d(function(g,r,_i,a,_m,_e,d){"use strict";var e,t=r(d[0]),n=this&&this.__creat
16700
16700
  __r(694);
16701
16701
  __r(341);
16702
16702
  __r(0);
16703
- //# sourceMappingURL=/_expo/static/js/web/index-2836ce72bcca908cdd706d9aab0a425c.js.map
16704
- //# debugId=ead4b92d-196a-4939-b850-bff44d197ba8
16703
+ //# sourceMappingURL=/_expo/static/js/web/index-f10895609ae9a38a645e2380899e9238.js.map
16704
+ //# debugId=538b2f45-387f-40da-9863-f36da6fd926f
@@ -191,6 +191,6 @@
191
191
  <body>
192
192
  <noscript>You need to enable JavaScript to run this app.</noscript>
193
193
  <div id="root"></div>
194
- <script src="/_expo/static/js/web/index-2836ce72bcca908cdd706d9aab0a425c.js" defer></script>
194
+ <script src="/_expo/static/js/web/index-f10895609ae9a38a645e2380899e9238.js" defer></script>
195
195
  </body>
196
196
  </html>
Binary file
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hyperdrive.bot/fleet-server",
3
- "version": "0.3.123",
3
+ "version": "0.3.125",
4
4
  "description": "Paseo backend server",
5
5
  "license": "Apache-2.0",
6
6
  "files": [
@@ -66,11 +66,11 @@
66
66
  "@agentclientprotocol/sdk": "^0.17.1",
67
67
  "@anthropic-ai/claude-agent-sdk": "^0.3.195",
68
68
  "@anthropic-ai/sdk": "^0.104.2",
69
- "@hyperdrive.bot/fleet-client": "0.3.123",
70
- "@hyperdrive.bot/fleet-extension-sdk": "0.3.123",
71
- "@hyperdrive.bot/fleet-highlight": "0.3.123",
72
- "@hyperdrive.bot/fleet-protocol": "0.3.123",
73
- "@hyperdrive.bot/fleet-relay": "0.3.123",
69
+ "@hyperdrive.bot/fleet-client": "0.3.125",
70
+ "@hyperdrive.bot/fleet-extension-sdk": "0.3.125",
71
+ "@hyperdrive.bot/fleet-highlight": "0.3.125",
72
+ "@hyperdrive.bot/fleet-protocol": "0.3.125",
73
+ "@hyperdrive.bot/fleet-relay": "0.3.125",
74
74
  "@isaacs/ttlcache": "^2.1.4",
75
75
  "@modelcontextprotocol/sdk": "^1.20.1",
76
76
  "@opencode-ai/sdk": "1.2.6",