@hyperdrive.bot/fleet-server 0.3.122 → 0.3.123

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.122\",\"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.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]);
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,[]);
@@ -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.122",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.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,[]);
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,[]);
@@ -15769,14 +15769,14 @@ __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{v
15769
15769
  __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.countKanbanBucketMembers=c,e.useKanbanBucketCounts=function(u,o){const f=(0,n.c)(7);let l;f[0]!==u?(l=n=>n.sessions[u]?.agents,f[0]=u,f[1]=l):l=f[1];const b=(0,s.useSessionStore)(l),v=(0,t.useKanbanBuckets)(),k=(0,t.useDefaultBucketId)();let B;f[2]!==b||f[3]!==v||f[4]!==k||f[5]!==o?(B=c(b?.values()??[],v,k,o),f[2]=b,f[3]=v,f[4]=k,f[5]=o,f[6]=B):B=f[6];return B};var n=r(d[0]);r(d[1]);var t=r(d[2]),s=r(d[3]),u=r(d[4]),o=r(d[5]);function c(n,t,s,c){const f={};for(const n of t)f[n.id]=0;const l=new Set(t.map(n=>n.id));for(const t of n){if(t.archivedAt)continue;if((0,o.isDurableAgent)(t))continue;const n=c?.[t.id]??(0,u.resolveBucketId)(t,l,s);null!==n&&n in f&&(f[n]+=1)}return f}},4010,[350,36,4007,3427,4008,3632]);
15770
15770
  __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.buildCompactOverflowRows=function(t){const n=[];t.hasOrganize&&n.push({id:"screen",labelKey:"agentControls.options.screen",value:"",testID:"agent-controls-overflow-screen"});null!==t.thinkingLabel&&n.push({id:"thinking",labelKey:"agentControls.thinking.title",value:t.thinkingLabel,testID:"agent-controls-overflow-thinking"});t.hasOrganize&&(n.push({id:"bucket",labelKey:"agentControls.options.bucket",value:"",testID:"agent-controls-overflow-bucket"}),n.push({id:"tags",labelKey:"agentControls.options.tags",value:"",testID:"agent-controls-overflow-tags"}));return n},e.hasCompactOverflow=function(t,n){return t.length>0||n>0}},4011,[]);
15771
15771
  __d(function(g,r,i,a,m,e,_d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"ConversationDigestControl",{enumerable:!0,get:function(){return L}});var s=r(_d[0]),n=r(_d[1]),t=r(_d[2]),o=r(_d[3]),l=r(_d[4]);r(_d[5]),r(_d[6]),r(_d[7]);var d=r(_d[8]),c=r(_d[9]),u=r(_d[10]),p=r(_d[11]),b=r(_d[12]),f=r(_d[13]),x=r(_d[14]),h=r(_d[15]),y=r(_d[16]),S=r(_d[17]),v=r(_d[18]),_=r(_d[19]),j=r(_d[20]);const I=(0,d.withUnistyles)(u.ScrollText),k=s=>({color:s.colors.foregroundMuted}),w={title:"Session digest"};function P(s){const n=s.generatedAt??s.selfReportedAt;if(!n)return null;const t=new Date(n);return Number.isNaN(t.getTime())?null:`updated ${(0,_.formatTimeAgo)(t)}`}function R(t){const l=(0,o.c)(7),{label:d,value:c}=t;if(!c||!c.trim())return null;let u,p,b;return l[0]!==d?(u=(0,j.jsx)(n.Text,{style:H.sectionLabel,children:d}),l[0]=d,l[1]=u):u=l[1],l[2]!==c?(p=(0,j.jsx)(n.Text,{style:H.sectionValue,children:c}),l[2]=c,l[3]=p):p=l[3],l[4]!==u||l[5]!==p?(b=(0,j.jsxs)(s.View,{style:H.section,children:[u,p]}),l[4]=u,l[5]=p,l[6]=b):b=l[6],b}function D(t){const l=(0,o.c)(10),{label:d,items:c}=t;if(!c||0===c.length)return null;let u,p,b;if(l[0]!==d?(u=(0,j.jsx)(n.Text,{style:H.sectionLabel,children:d}),l[0]=d,l[1]=u):u=l[1],l[2]!==c||l[3]!==d){let s;l[5]!==d?(s=s=>(0,j.jsx)(n.Text,{style:H.sectionValue,children:`\u2022 ${s}`},`${d}:${s}`),l[5]=d,l[6]=s):s=l[6],p=c.map(s),l[2]=c,l[3]=d,l[4]=p}else p=l[4];return l[7]!==u||l[8]!==p?(b=(0,j.jsxs)(s.View,{style:H.section,children:[u,p]}),l[7]=u,l[8]=p,l[9]=b):b=l[9],b}function z(s){const l=(0,o.c)(16),{row:d}=s,c=(0,x.useToast)();let u;l[0]!==d.label||l[1]!==d.value||l[2]!==c?(u=()=>{(async()=>{await(0,v.copyToClipboard)(d.value),c.copied(`${d.label} id`)})()},l[0]=d.label,l[1]=d.value,l[2]=c,l[3]=u):u=l[3];const p=u,b=`Copy ${d.label} id`,f=`agent-digest-id-${d.key}`;let h,S,_,I;return l[4]!==d.label?(h=(0,j.jsx)(n.Text,{style:H.idLabel,children:d.label}),l[4]=d.label,l[5]=h):h=l[5],l[6]!==d.value?(S=(0,y.truncateSessionId)(d.value),l[6]=d.value,l[7]=S):S=l[7],l[8]!==S?(_=(0,j.jsx)(n.Text,{style:H.idValue,children:S}),l[8]=S,l[9]=_):_=l[9],l[10]!==p||l[11]!==b||l[12]!==f||l[13]!==h||l[14]!==_?(I=(0,j.jsxs)(t.Pressable,{onPress:p,style:V,accessibilityRole:"button",accessibilityLabel:b,testID:f,children:[h,_]}),l[10]=p,l[11]=b,l[12]=f,l[13]=h,l[14]=_,l[15]=I):I=l[15],I}function C({pressed:s,hovered:n}){return[H.badge,n&&H.badgeHovered,s&&H.badgePressed]}function T({pressed:s,hovered:n}){return[H.iconBadge,n&&H.badgeHovered,s&&H.badgePressed]}function V({pressed:s,hovered:n}){return[H.idRow,n&&H.idRowHovered,s&&H.idRowPressed]}function $(s,n){const t=(0,o.c)(3);let l;return t[0]!==n||t[1]!==s?(l=t=>{const o=t.sessions[s];return o?.agents?.get(n)?.digest??o?.agentDetails?.get(n)?.digest??null},t[0]=n,t[1]=s,t[2]=l):l=t[2],(0,S.useSessionStore)((0,c.useShallow)(l))}function F(s,n){const t=(0,o.c)(9);let l;t[0]!==n||t[1]!==s?(l=t=>{const o=t.sessions[s],l=o?.agents?.get(n)??o?.agentDetails?.get(n);return{persistenceProvider:l?.persistence?.provider,persistenceSessionId:l?.persistence?.sessionId??null,runtimeProvider:l?.runtimeInfo?.provider,runtimeSessionId:l?.runtimeInfo?.sessionId??null}},t[0]=n,t[1]=s,t[2]=l):l=t[2];const d=(0,S.useSessionStore)((0,c.useShallow)(l));let u;return t[3]!==n||t[4]!==d.persistenceProvider||t[5]!==d.persistenceSessionId||t[6]!==d.runtimeProvider||t[7]!==d.runtimeSessionId?(u=(0,y.buildSessionIdRows)({agentId:n,persistence:{provider:d.persistenceProvider,sessionId:d.persistenceSessionId},runtimeInfo:{provider:d.runtimeProvider,sessionId:d.runtimeSessionId}}),t[3]=n,t[4]=d.persistenceProvider,t[5]=d.persistenceSessionId,t[6]=d.runtimeProvider,t[7]=d.runtimeSessionId,t[8]=u):u=t[8],u}const L=(0,l.memo)(function(d){const c=(0,o.c)(50),{agentId:u,serverId:x}=d,y=(0,h.useSessionDigestFeatureEnabled)(x),S=(0,f.useIsCompactFormFactor)(),v=$(x,u),_=F(x,u),[z,V]=(0,l.useState)(!1);let L;c[0]===Symbol.for("react.memo_cache_sentinel")?(L=()=>V(!0),c[0]=L):L=c[0];const A=L;let N;c[1]===Symbol.for("react.memo_cache_sentinel")?(N=()=>V(!1),c[1]=N):N=c[1];const O=N;if(!(y&&v&&(E=v,E.goal||E.nextStep||E.summary||0!==(E.blockers?.length??0)||0!==(E.links?.length??0)||0!==(E.keyFiles?.length??0)||0!==(E.accomplishments?.length??0))))return null;var E;const G=v.blockers?.length??0;let K;c[2]!==v?(K=P(v),c[2]=v,c[3]=K):K=c[3];const U=K;let W;c[4]!==v.links?(W=v.links?.map(B),c[4]=v.links,c[5]=W):W=c[5];const q=W,J=G>0?`Session digest (${G} blocker${1===G?"":"s"})`:"Session digest";let Q,X,Y,Z,ee,se,ne,te,ie,oe,re,le,de,ce;return c[6]!==J||c[7]!==G||c[8]!==S?(Q=S?(0,j.jsxs)(t.Pressable,{onPress:A,style:T,accessibilityRole:"button",accessibilityLabel:J,testID:"agent-controls-digest",children:[(0,j.jsx)(I,{size:16,uniProps:k}),G>0?(0,j.jsx)(s.View,{style:H.dot}):null]}):(0,j.jsxs)(t.Pressable,{onPress:A,style:C,accessibilityRole:"button",accessibilityLabel:J,testID:"agent-digest-selector",children:[(0,j.jsx)(I,{size:16,uniProps:k}),G>0?(0,j.jsx)(s.View,{style:H.dot}):null]}),c[6]=J,c[7]=G,c[8]=S,c[9]=Q):Q=c[9],c[10]!==G||c[11]!==U?(X=G>0||U?(0,j.jsxs)(s.View,{style:H.metaRow,children:[G>0?(0,j.jsx)(n.Text,{style:H.blockedBadge,children:1===G?"Blocked":`${G} blockers`}):null,U?(0,j.jsx)(n.Text,{style:H.updated,children:U}):null]}):null,c[10]=G,c[11]=U,c[12]=X):X=c[12],c[13]!==u||c[14]!==v.pendingDecisions||c[15]!==x?(Y=(0,j.jsx)(b.DecisionChips,{serverId:x,agentId:u,decisions:v.pendingDecisions}),c[13]=u,c[14]=v.pendingDecisions,c[15]=x,c[16]=Y):Y=c[16],c[17]!==v.goal?(Z=(0,j.jsx)(R,{label:"Goal",value:v.goal}),c[17]=v.goal,c[18]=Z):Z=c[18],c[19]!==v.nextStep?(ee=(0,j.jsx)(R,{label:"Next step",value:v.nextStep}),c[19]=v.nextStep,c[20]=ee):ee=c[20],c[21]!==v.blockers?(se=(0,j.jsx)(D,{label:"Blockers",items:v.blockers}),c[21]=v.blockers,c[22]=se):se=c[22],c[23]!==v.summary?(ne=(0,j.jsx)(R,{label:"Summary",value:v.summary}),c[23]=v.summary,c[24]=ne):ne=c[24],c[25]!==v.accomplishments?(te=(0,j.jsx)(D,{label:"Accomplishments",items:v.accomplishments}),c[25]=v.accomplishments,c[26]=te):te=c[26],c[27]!==v.keyFiles?(ie=(0,j.jsx)(D,{label:"Key files",items:v.keyFiles}),c[27]=v.keyFiles,c[28]=ie):ie=c[28],c[29]!==q?(oe=(0,j.jsx)(D,{label:"Links",items:q}),c[29]=q,c[30]=oe):oe=c[30],c[31]!==_?(re=_.length>0?(0,j.jsxs)(s.View,{style:H.section,testID:"agent-digest-ids",children:[(0,j.jsx)(n.Text,{style:H.sectionLabel,children:"IDs"}),_.map(M)]}):null,c[31]=_,c[32]=re):re=c[32],c[33]!==se||c[34]!==ne||c[35]!==te||c[36]!==ie||c[37]!==oe||c[38]!==re||c[39]!==X||c[40]!==Y||c[41]!==Z||c[42]!==ee?(le=(0,j.jsxs)(s.View,{style:H.body,children:[X,Y,Z,ee,se,ne,te,ie,oe,re]}),c[33]=se,c[34]=ne,c[35]=te,c[36]=ie,c[37]=oe,c[38]=re,c[39]=X,c[40]=Y,c[41]=Z,c[42]=ee,c[43]=le):le=c[43],c[44]!==z||c[45]!==le?(de=(0,j.jsx)(p.AdaptiveModalSheet,{header:w,visible:z,onClose:O,testID:"agent-digest-sheet",children:le}),c[44]=z,c[45]=le,c[46]=de):de=c[46],c[47]!==de||c[48]!==Q?(ce=(0,j.jsxs)(j.Fragment,{children:[Q,de]}),c[47]=de,c[48]=Q,c[49]=ce):ce=c[49],ce}),H=d.StyleSheet.create(s=>({badge:{height:28,flexDirection:"row",alignItems:"center",backgroundColor:"transparent",gap:s.spacing[1],paddingHorizontal:s.spacing[2],borderRadius:s.borderRadius["2xl"],uni__dependencies:[0]},badgeHovered:{backgroundColor:s.colors.surface2,uni__dependencies:[0]},badgePressed:{backgroundColor:s.colors.surface0,uni__dependencies:[0]},iconBadge:{width:28,height:28,alignItems:"center",justifyContent:"center",backgroundColor:"transparent",borderRadius:s.borderRadius.full,uni__dependencies:[0]},dot:{position:"absolute",top:5,right:5,width:7,height:7,borderRadius:s.borderRadius.full,backgroundColor:s.colors.destructive,uni__dependencies:[0]},body:{gap:s.spacing[3],uni__dependencies:[0]},metaRow:{flexDirection:"row",alignItems:"center",gap:s.spacing[2],uni__dependencies:[0]},blockedBadge:{fontSize:s.fontSize.xs,paddingHorizontal:s.spacing[2],paddingVertical:s.spacing[1],borderRadius:s.spacing[1],overflow:"hidden",color:s.colors.destructiveForeground,backgroundColor:s.colors.destructive,uni__dependencies:[0]},updated:{fontSize:s.fontSize.xs,color:s.colors.foregroundMuted,uni__dependencies:[0]},section:{gap:s.spacing[1],uni__dependencies:[0]},sectionLabel:{fontSize:s.fontSize.xs,fontWeight:"600",textTransform:"uppercase",color:s.colors.foregroundMuted,uni__dependencies:[0]},sectionValue:{fontSize:s.fontSize.sm,lineHeight:20,color:s.colors.foreground,uni__dependencies:[0]},idRow:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:s.spacing[2],paddingVertical:s.spacing[1],paddingHorizontal:s.spacing[1],borderRadius:s.spacing[1],uni__dependencies:[0]},idRowHovered:{backgroundColor:s.colors.surface2,uni__dependencies:[0]},idRowPressed:{backgroundColor:s.colors.surface0,uni__dependencies:[0]},idLabel:{fontSize:s.fontSize.xs,color:s.colors.foregroundMuted,uni__dependencies:[0]},idValue:{fontFamily:s.fontFamily.mono,fontSize:s.fontSize.xs,color:s.colors.foreground,uni__dependencies:[0]}}));function B(s){return s.label?`${s.label} \u2014 ${s.url}`:s.url}function M(s){return(0,j.jsx)(z,{row:s},s.key)}},4012,[348,349,2476,350,36,546,234,146,56,3462,811,3481,4013,3472,3514,4021,4022,3427,3711,3526,279]);
15772
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"ANSWER_HOLD_SPEC",{enumerable:!0,get:function(){return S}}),Object.defineProperty(e,"DecisionChips",{enumerable:!0,get:function(){return w}});var n=r(d[0]),o=r(d[1]),t=r(d[2]),s=r(d[3]),c=r(d[4]),l=r(d[5]);r(d[6]),r(d[7]),r(d[8]),r(d[9]);var u=r(d[10]),p=r(d[11]),h=r(d[12]),f=r(d[13]),b=r(d[14]);function _(n){const o=(0,c.c)(34),{optionId:u,glyph:p,label:h,recommended:_,disabled:x,onCommit:y}=n,[w,I]=(0,l.useState)(f.idleHold),z=(0,l.useRef)(null);let D;o[0]===Symbol.for("react.memo_cache_sentinel")?(D=(0,f.idleHold)(),o[0]=D):D=o[0];const T=(0,l.useRef)(D);let R;o[1]===Symbol.for("react.memo_cache_sentinel")?(R=()=>{null!==z.current&&(clearTimeout(z.current),z.current=null)},o[1]=R):R=o[1];const C=R;let H;o[2]===Symbol.for("react.memo_cache_sentinel")?(H=()=>{const n=(0,f.press)(Date.now());T.current=n,I(n),C(),z.current=setTimeout(()=>{const n=(0,f.tick)(T.current,Date.now());T.current=n,I(n)},f.UNFURL_MS)},o[2]=H):H=o[2];const O=H;let v;o[3]!==y||o[4]!==u?(v=n=>{C();const o=(0,f.release)(T.current,Date.now(),S,n);T.current=(0,f.idleHold)(),I((0,f.idleHold)()),o.commit&&y(u)},o[3]=y,o[4]=u,o[5]=v):v=o[5];const L=v;let P,q,V;o[6]===Symbol.for("react.memo_cache_sentinel")?(P=()=>C,q=[C],o[6]=P,o[7]=q):(P=o[6],q=o[7]),(0,l.useEffect)(P,q),o[8]!==L?(V=()=>L(!1),o[8]=L,o[9]=V):V=o[9];const A=V;let E;o[10]!==L?(E=()=>L(!0),o[10]=L,o[11]=E):E=o[11];const W=E;let $;o[12]!==w?($=(0,f.isLabelVisible)(w),o[12]=w,o[13]=$):$=o[13];const M=$,N=M?j.chipOpen:null,k=x?j.chipDisabled:null;let G;o[14]!==N||o[15]!==k?(G=[j.chip,N,k],o[14]=N,o[15]=k,o[16]=G):G=o[16];const U=G,F=`${h}. Hold to read, release to send.`,B=`decision-chip-${h}`;let J,K,Q,X;return o[17]!==p?(J=(0,b.jsx)(t.Text,{style:j.chipGlyph,children:p}),o[17]=p,o[18]=J):J=o[18],o[19]!==h||o[20]!==M?(K=M?(0,b.jsx)(t.Text,{style:j.chipLabel,numberOfLines:4,children:h}):null,o[19]=h,o[20]=M,o[21]=K):K=o[21],o[22]!==_?(Q=_?(0,b.jsx)(t.Text,{style:j.recommended,children:"recommended"}):null,o[22]=_,o[23]=Q):Q=o[23],o[24]!==U||o[25]!==x||o[26]!==W||o[27]!==A||o[28]!==F||o[29]!==B||o[30]!==J||o[31]!==K||o[32]!==Q?(X=(0,b.jsxs)(s.Pressable,{onPressIn:O,onPressOut:A,onTouchCancel:W,disabled:x,accessibilityRole:"button",accessibilityLabel:F,style:U,testID:B,children:[J,K,Q]}),o[24]=U,o[25]=x,o[26]=W,o[27]=A,o[28]=F,o[29]=B,o[30]=J,o[31]=K,o[32]=Q,o[33]=X):X=o[33],X}function x(u){const f=(0,c.c)(55),{serverId:x,agentId:S,decision:w,onAnswered:I,useEmoji:z}=u,D=void 0===z||z,{answer:T,error:R,isPending:C}=(0,p.useAnswerDecision)(),[H,O]=(0,l.useState)("");let v;f[0]!==S||f[1]!==T||f[2]!==w.id||f[3]!==I||f[4]!==x?(v=(n,o)=>{T({serverId:x,agentId:S,decisionId:w.id,optionId:n,note:o??null}).then(()=>(I?.(),null)).catch(y)},f[0]=S,f[1]=T,f[2]=w.id,f[3]=I,f[4]=x,f[5]=v):v=f[5];const L=v;let P;f[6]!==H?(P=H.trim(),f[6]=H,f[7]=P):P=f[7];const q=P.length>0,V=q?null:j.chipDisabled;let A;f[8]!==V?(A=[j.send,V],f[8]=V,f[9]=A):A=f[9];const E=A;let W;f[10]!==L||f[11]!==H?(W=()=>{L(null,H.trim()),O("")},f[10]=L,f[11]=H,f[12]=W):W=f[12];const $=W;if(w.answeredAt){let o;f[13]!==w.chosenOptionId||f[14]!==w.options?(o=w.options?.find(n=>n.id===w.chosenOptionId),f[13]=w.chosenOptionId,f[14]=w.options,f[15]=o):o=f[15];const s=o,c=`decision-answered-${w.id}`;let l;f[16]!==w.question?(l=(0,b.jsx)(t.Text,{style:j.question,children:w.question}),f[16]=w.question,f[17]=l):l=f[17];const u=s?.label??w.answerNote??"Answered";let p,h;return f[18]!==u?(p=(0,b.jsx)(t.Text,{style:j.answered,children:u}),f[18]=u,f[19]=p):p=f[19],f[20]!==p||f[21]!==c||f[22]!==l?(h=(0,b.jsxs)(n.View,{style:j.block,testID:c,children:[l,p]}),f[20]=p,f[21]=c,f[22]=l,f[23]=h):h=f[23],h}const M=`decision-${w.id}`;let N,k,G;f[24]!==w.question?(N=(0,b.jsx)(t.Text,{style:j.question,children:w.question}),f[24]=w.question,f[25]=N):N=f[25],f[26]!==L||f[27]!==w.options||f[28]!==C||f[29]!==D?(k=w.options?.map((n,o)=>(0,b.jsx)(_,{optionId:n.id,glyph:(0,h.optionGlyph)(n.emoji,o,D),label:n.label,recommended:!0===n.recommended,disabled:C,onCommit:L},n.id)),f[26]=L,f[27]=w.options,f[28]=C,f[29]=D,f[30]=k):k=f[30],f[31]!==k?(G=(0,b.jsx)(n.View,{style:j.chipRow,children:k}),f[31]=k,f[32]=G):G=f[32];const U=!C,F=`decision-free-text-${w.id}`;let B;f[33]!==H||f[34]!==U||f[35]!==F?(B=(0,b.jsx)(o.TextInput,{value:H,onChangeText:O,placeholder:"None of these? Say what to do",style:j.input,editable:U,testID:F}),f[33]=H,f[34]=U,f[35]=F,f[36]=B):B=f[36];const J=C||!q,K=`decision-free-send-${w.id}`;let Q,X,Y,Z,ee;return f[37]===Symbol.for("react.memo_cache_sentinel")?(Q=(0,b.jsx)(t.Text,{style:j.sendText,children:"Send"}),f[37]=Q):Q=f[37],f[38]!==$||f[39]!==E||f[40]!==J||f[41]!==K?(X=(0,b.jsx)(s.Pressable,{onPress:$,disabled:J,accessibilityRole:"button",accessibilityLabel:"Send a free-text answer",style:E,testID:K,children:Q}),f[38]=$,f[39]=E,f[40]=J,f[41]=K,f[42]=X):X=f[42],f[43]!==B||f[44]!==X?(Y=(0,b.jsxs)(n.View,{style:j.freeRow,children:[B,X]}),f[43]=B,f[44]=X,f[45]=Y):Y=f[45],f[46]!==w.id||f[47]!==R?(Z=R?(0,b.jsxs)(t.Text,{style:j.error,testID:`decision-error-${w.id}`,children:["Could not send that: ",R instanceof Error?R.message:String(R),". Nothing was recorded, so pick again."]}):null,f[46]=w.id,f[47]=R,f[48]=Z):Z=f[48],f[49]!==G||f[50]!==Y||f[51]!==Z||f[52]!==M||f[53]!==N?(ee=(0,b.jsxs)(n.View,{style:j.block,testID:M,children:[N,G,Y,Z]}),f[49]=G,f[50]=Y,f[51]=Z,f[52]=M,f[53]=N,f[54]=ee):ee=f[54],ee}function y(){}const S={holdMs:f.ANSWER_HOLD_MS},w=(0,l.memo)(function(o){const s=(0,c.c)(14),{serverId:l,agentId:u,decisions:p,onAnswered:h,useEmoji:f}=o,_=void 0===f||f;if(!p||0===p.length)return null;let y,S,w;if(s[0]===Symbol.for("react.memo_cache_sentinel")?(y=(0,b.jsx)(t.Text,{style:j.sectionLabel,children:"Decisions"}),s[0]=y):y=s[0],s[1]!==u||s[2]!==p||s[3]!==h||s[4]!==l||s[5]!==_){let n;s[7]!==u||s[8]!==h||s[9]!==l||s[10]!==_?(n=n=>(0,b.jsx)(x,{serverId:l,agentId:u,decision:n,onAnswered:h,useEmoji:_},n.id),s[7]=u,s[8]=h,s[9]=l,s[10]=_,s[11]=n):n=s[11],S=p.map(n),s[1]=u,s[2]=p,s[3]=h,s[4]=l,s[5]=_,s[6]=S}else S=s[6];return s[12]!==S?(w=(0,b.jsxs)(n.View,{style:j.section,testID:"agent-digest-decisions",children:[y,S]}),s[12]=S,s[13]=w):w=s[13],w}),j=u.StyleSheet.create(n=>({error:{color:n.colors.destructive,fontSize:n.fontSize.xs,marginTop:n.spacing[1],uni__dependencies:[0]},section:{gap:n.spacing[2],uni__dependencies:[0]},sectionLabel:{color:n.colors.foregroundMuted,fontSize:n.fontSize.xs,textTransform:"uppercase",letterSpacing:.6,uni__dependencies:[0]},block:{gap:n.spacing[2],uni__dependencies:[0]},question:{color:n.colors.foreground,fontSize:n.fontSize.sm,lineHeight:18,uni__dependencies:[0]},chipRow:{flexDirection:"row",flexWrap:"wrap",gap:n.spacing[2],uni__dependencies:[0]},chip:{minHeight:44,justifyContent:"center",borderWidth:1,borderColor:n.colors.border,borderRadius:n.borderRadius["2xl"],paddingVertical:n.spacing[1],paddingHorizontal:n.spacing[2],maxWidth:"100%",uni__dependencies:[0]},chipOpen:{borderColor:n.colors.accent,uni__dependencies:[0]},chipDisabled:{opacity:.4},chipGlyph:{fontSize:20},chipLabel:{color:n.colors.foreground,fontSize:n.fontSize.xs,marginTop:4,uni__dependencies:[0]},recommended:{color:n.colors.accent,fontSize:n.fontSize.xs,marginTop:2,uni__dependencies:[0]},answered:{color:n.colors.foregroundMuted,fontSize:n.fontSize.xs,uni__dependencies:[0]},freeRow:{flexDirection:"row",alignItems:"center",gap:n.spacing[2],uni__dependencies:[0]},input:{flex:1,borderWidth:1,borderColor:n.colors.border,borderRadius:n.borderRadius["2xl"],paddingVertical:n.spacing[1],paddingHorizontal:n.spacing[2],color:n.colors.foreground,fontSize:n.fontSize.xs,uni__dependencies:[0]},send:{minHeight:44,justifyContent:"center",borderWidth:1,borderColor:n.colors.accent,borderRadius:n.borderRadius["2xl"],paddingVertical:n.spacing[1],paddingHorizontal:n.spacing[2],uni__dependencies:[0]},sendText:{color:n.colors.accent,fontSize:n.fontSize.xs,uni__dependencies:[0]}}))},4013,[348,2838,349,2476,350,36,546,234,571,146,56,4014,4016,4020,279]);
15772
+ __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"ANSWER_HOLD_SPEC",{enumerable:!0,get:function(){return S}}),Object.defineProperty(e,"DecisionChips",{enumerable:!0,get:function(){return w}});var n=r(d[0]),o=r(d[1]),t=r(d[2]),s=r(d[3]),c=r(d[4]),l=r(d[5]);r(d[6]),r(d[7]),r(d[8]),r(d[9]);var u=r(d[10]),p=r(d[11]),h=r(d[12]),f=r(d[13]),b=r(d[14]);function x(n){const o=(0,c.c)(35),{optionId:u,glyph:p,label:h,recommended:x,disabled:_,onCommit:y}=n,[w,I]=(0,l.useState)(f.idleHold),[z,T]=(0,l.useState)(null),D=(0,l.useRef)(null);let R;o[0]===Symbol.for("react.memo_cache_sentinel")?(R=(0,f.idleHold)(),o[0]=R):R=o[0];const H=(0,l.useRef)(R);let C;o[1]===Symbol.for("react.memo_cache_sentinel")?(C=()=>{null!==D.current&&(clearTimeout(D.current),D.current=null)},o[1]=C):C=o[1];const v=C;let O;o[2]===Symbol.for("react.memo_cache_sentinel")?(O=()=>{T(null);const n=(0,f.press)(Date.now());H.current=n,I(n),v(),D.current=setTimeout(()=>{const n=(0,f.tick)(H.current,Date.now());H.current=n,I(n)},f.UNFURL_MS)},o[2]=O):O=o[2];const L=O;let P;o[3]!==y||o[4]!==u?(P=n=>{v();const o=(0,f.release)(H.current,Date.now(),S,n);if(H.current=(0,f.idleHold)(),I((0,f.idleHold)()),o.commit)return T(null),void y(u);T((0,f.answerHint)(o.reason))},o[3]=y,o[4]=u,o[5]=P):P=o[5];const q=P;let V,A,E;o[6]===Symbol.for("react.memo_cache_sentinel")?(V=()=>v,A=[v],o[6]=V,o[7]=A):(V=o[6],A=o[7]),(0,l.useEffect)(V,A),o[8]!==q?(E=()=>q(!1),o[8]=q,o[9]=E):E=o[9];const M=E;let W;o[10]!==q?(W=()=>q(!0),o[10]=q,o[11]=W):W=o[11];const $=W,N=(0,f.isLabelVisible)(w),k=N?j.chipOpen:null,G=_?j.chipDisabled:null;let U;o[12]!==G||o[13]!==k?(U=[j.chip,k,G],o[12]=G,o[13]=k,o[14]=U):U=o[14];const F=U,B=`${h}. Hold to send.`,J=`decision-chip-${h}`;let K;o[15]!==p?(K=(0,b.jsx)(t.Text,{style:j.chipGlyph,children:p}),o[15]=p,o[16]=K):K=o[16];const Q=N?4:2;let X,Y,Z,ee;return o[17]!==h||o[18]!==Q?(X=(0,b.jsx)(t.Text,{style:j.chipLabel,numberOfLines:Q,children:h}),o[17]=h,o[18]=Q,o[19]=X):X=o[19],o[20]!==z?(Y=z?(0,b.jsx)(t.Text,{style:j.chipHint,testID:"decision-chip-hint",children:z}):null,o[20]=z,o[21]=Y):Y=o[21],o[22]!==x?(Z=x?(0,b.jsx)(t.Text,{style:j.recommended,children:"recommended"}):null,o[22]=x,o[23]=Z):Z=o[23],o[24]!==F||o[25]!==_||o[26]!==$||o[27]!==M||o[28]!==B||o[29]!==J||o[30]!==K||o[31]!==X||o[32]!==Y||o[33]!==Z?(ee=(0,b.jsxs)(s.Pressable,{onPressIn:L,onPressOut:M,onTouchCancel:$,disabled:_,accessibilityRole:"button",accessibilityLabel:B,style:F,testID:J,children:[K,X,Y,Z]}),o[24]=F,o[25]=_,o[26]=$,o[27]=M,o[28]=B,o[29]=J,o[30]=K,o[31]=X,o[32]=Y,o[33]=Z,o[34]=ee):ee=o[34],ee}function _(u){const f=(0,c.c)(55),{serverId:_,agentId:S,decision:w,onAnswered:I,useEmoji:z}=u,T=void 0===z||z,{answer:D,error:R,isPending:H}=(0,p.useAnswerDecision)(),[C,v]=(0,l.useState)("");let O;f[0]!==S||f[1]!==D||f[2]!==w.id||f[3]!==I||f[4]!==_?(O=(n,o)=>{D({serverId:_,agentId:S,decisionId:w.id,optionId:n,note:o??null}).then(()=>(I?.(),null)).catch(y)},f[0]=S,f[1]=D,f[2]=w.id,f[3]=I,f[4]=_,f[5]=O):O=f[5];const L=O;let P;f[6]!==C?(P=C.trim(),f[6]=C,f[7]=P):P=f[7];const q=P.length>0,V=q?null:j.chipDisabled;let A;f[8]!==V?(A=[j.send,V],f[8]=V,f[9]=A):A=f[9];const E=A;let M;f[10]!==L||f[11]!==C?(M=()=>{L(null,C.trim()),v("")},f[10]=L,f[11]=C,f[12]=M):M=f[12];const W=M;if(w.answeredAt){let o;f[13]!==w.chosenOptionId||f[14]!==w.options?(o=w.options?.find(n=>n.id===w.chosenOptionId),f[13]=w.chosenOptionId,f[14]=w.options,f[15]=o):o=f[15];const s=o,c=`decision-answered-${w.id}`;let l;f[16]!==w.question?(l=(0,b.jsx)(t.Text,{style:j.question,children:w.question}),f[16]=w.question,f[17]=l):l=f[17];const u=s?.label??w.answerNote??"Answered";let p,h;return f[18]!==u?(p=(0,b.jsx)(t.Text,{style:j.answered,children:u}),f[18]=u,f[19]=p):p=f[19],f[20]!==p||f[21]!==c||f[22]!==l?(h=(0,b.jsxs)(n.View,{style:j.block,testID:c,children:[l,p]}),f[20]=p,f[21]=c,f[22]=l,f[23]=h):h=f[23],h}const $=`decision-${w.id}`;let N,k,G;f[24]!==w.question?(N=(0,b.jsx)(t.Text,{style:j.question,children:w.question}),f[24]=w.question,f[25]=N):N=f[25],f[26]!==L||f[27]!==w.options||f[28]!==H||f[29]!==T?(k=w.options?.map((n,o)=>(0,b.jsx)(x,{optionId:n.id,glyph:(0,h.optionGlyph)(n.emoji,o,T),label:n.label,recommended:!0===n.recommended,disabled:H,onCommit:L},n.id)),f[26]=L,f[27]=w.options,f[28]=H,f[29]=T,f[30]=k):k=f[30],f[31]!==k?(G=(0,b.jsx)(n.View,{style:j.chipRow,children:k}),f[31]=k,f[32]=G):G=f[32];const U=!H,F=`decision-free-text-${w.id}`;let B;f[33]!==C||f[34]!==U||f[35]!==F?(B=(0,b.jsx)(o.TextInput,{value:C,onChangeText:v,placeholder:"None of these? Say what to do",style:j.input,editable:U,testID:F}),f[33]=C,f[34]=U,f[35]=F,f[36]=B):B=f[36];const J=H||!q,K=`decision-free-send-${w.id}`;let Q,X,Y,Z,ee;return f[37]===Symbol.for("react.memo_cache_sentinel")?(Q=(0,b.jsx)(t.Text,{style:j.sendText,children:"Send"}),f[37]=Q):Q=f[37],f[38]!==W||f[39]!==E||f[40]!==J||f[41]!==K?(X=(0,b.jsx)(s.Pressable,{onPress:W,disabled:J,accessibilityRole:"button",accessibilityLabel:"Send a free-text answer",style:E,testID:K,children:Q}),f[38]=W,f[39]=E,f[40]=J,f[41]=K,f[42]=X):X=f[42],f[43]!==B||f[44]!==X?(Y=(0,b.jsxs)(n.View,{style:j.freeRow,children:[B,X]}),f[43]=B,f[44]=X,f[45]=Y):Y=f[45],f[46]!==w.id||f[47]!==R?(Z=R?(0,b.jsxs)(t.Text,{style:j.error,testID:`decision-error-${w.id}`,children:["Could not send that: ",R instanceof Error?R.message:String(R),". Nothing was recorded, so pick again."]}):null,f[46]=w.id,f[47]=R,f[48]=Z):Z=f[48],f[49]!==G||f[50]!==Y||f[51]!==Z||f[52]!==$||f[53]!==N?(ee=(0,b.jsxs)(n.View,{style:j.block,testID:$,children:[N,G,Y,Z]}),f[49]=G,f[50]=Y,f[51]=Z,f[52]=$,f[53]=N,f[54]=ee):ee=f[54],ee}function y(){}const S={holdMs:f.ANSWER_HOLD_MS},w=(0,l.memo)(function(o){const s=(0,c.c)(14),{serverId:l,agentId:u,decisions:p,onAnswered:h,useEmoji:f}=o,x=void 0===f||f;if(!p||0===p.length)return null;let y,S,w;if(s[0]===Symbol.for("react.memo_cache_sentinel")?(y=(0,b.jsx)(t.Text,{style:j.sectionLabel,children:"Decisions"}),s[0]=y):y=s[0],s[1]!==u||s[2]!==p||s[3]!==h||s[4]!==l||s[5]!==x){let n;s[7]!==u||s[8]!==h||s[9]!==l||s[10]!==x?(n=n=>(0,b.jsx)(_,{serverId:l,agentId:u,decision:n,onAnswered:h,useEmoji:x},n.id),s[7]=u,s[8]=h,s[9]=l,s[10]=x,s[11]=n):n=s[11],S=p.map(n),s[1]=u,s[2]=p,s[3]=h,s[4]=l,s[5]=x,s[6]=S}else S=s[6];return s[12]!==S?(w=(0,b.jsxs)(n.View,{style:j.section,testID:"agent-digest-decisions",children:[y,S]}),s[12]=S,s[13]=w):w=s[13],w}),j=u.StyleSheet.create(n=>({error:{color:n.colors.destructive,fontSize:n.fontSize.xs,marginTop:n.spacing[1],uni__dependencies:[0]},section:{gap:n.spacing[2],uni__dependencies:[0]},sectionLabel:{color:n.colors.foregroundMuted,fontSize:n.fontSize.xs,textTransform:"uppercase",letterSpacing:.6,uni__dependencies:[0]},block:{gap:n.spacing[2],uni__dependencies:[0]},question:{color:n.colors.foreground,fontSize:n.fontSize.sm,lineHeight:18,uni__dependencies:[0]},chipRow:{flexDirection:"row",flexWrap:"wrap",gap:n.spacing[2],uni__dependencies:[0]},chip:{minHeight:44,justifyContent:"center",borderWidth:1,borderColor:n.colors.border,borderRadius:n.borderRadius["2xl"],paddingVertical:n.spacing[1],paddingHorizontal:n.spacing[2],maxWidth:"100%",uni__dependencies:[0]},chipOpen:{borderColor:n.colors.accent,uni__dependencies:[0]},chipDisabled:{opacity:.4},chipGlyph:{fontSize:20},chipLabel:{color:n.colors.foreground,fontSize:n.fontSize.xs,marginTop:4,uni__dependencies:[0]},chipHint:{color:n.colors.foregroundMuted,fontSize:n.fontSize.xs,marginTop:2,uni__dependencies:[0]},recommended:{color:n.colors.accent,fontSize:n.fontSize.xs,marginTop:2,uni__dependencies:[0]},answered:{color:n.colors.foregroundMuted,fontSize:n.fontSize.xs,uni__dependencies:[0]},freeRow:{flexDirection:"row",alignItems:"center",gap:n.spacing[2],uni__dependencies:[0]},input:{flex:1,borderWidth:1,borderColor:n.colors.border,borderRadius:n.borderRadius["2xl"],paddingVertical:n.spacing[1],paddingHorizontal:n.spacing[2],color:n.colors.foreground,fontSize:n.fontSize.xs,uni__dependencies:[0]},send:{minHeight:44,justifyContent:"center",borderWidth:1,borderColor:n.colors.accent,borderRadius:n.borderRadius["2xl"],paddingVertical:n.spacing[1],paddingHorizontal:n.spacing[2],uni__dependencies:[0]},sendText:{color:n.colors.accent,fontSize:n.fontSize.xs,uni__dependencies:[0]}}))},4013,[348,2838,349,2476,350,36,546,234,571,146,56,4014,4016,4020,279]);
15773
15773
  __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"MissingDecisionAnswerError",{enumerable:!0,get:function(){return u}}),e.assertAnswerable=c,e.answerDecision=l,e.useAnswerDecision=function(){const s=(0,n.c)(8),u=(0,t.useQueryClient)();let c;s[0]!==u?(c={mutationFn:l,onSuccess:(n,t)=>{u.invalidateQueries({queryKey:(0,o.agentHistoryQueryKey)(t.serverId)})}},s[0]=u,s[1]=c):c=s[1];const w=(0,t.useMutation)(c);let f;s[2]!==w?(f=async n=>await w.mutateAsync(n),s[2]=w,s[3]=f):f=s[3];const y=f;let h;s[4]!==y||s[5]!==w.error||s[6]!==w.isPending?(h={answer:y,isPending:w.isPending,error:w.error},s[4]=y,s[5]=w.error,s[6]=w.isPending,s[7]=h):h=s[7];return h};var n=r(d[0]);r(d[1]);var t=r(d[2]),s=r(d[3]),o=r(d[4]);class u extends Error{constructor(n){super(n),this.name="MissingDecisionAnswerError"}}function c(n){if(null!==n.optionId)return;if(0===(n.note?.trim()??"").length)throw new u("A free-text answer needs a note: without an option and without text there is no answer to record.")}async function l(n){c(n);const t=(0,s.getHostRuntimeStore)().getClient(n.serverId);if(!t)throw new Error(`No client for server ${n.serverId}`);const o=n.note?.trim();return await t.answerAgentDecision(n.agentId,n.decisionId,n.optionId,o&&o.length>0?o:null)}},4014,[350,36,3030,3274,4015]);
15774
15774
  __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.agentHistoryQueryKey=function(t){return["agentHistory",t]},e.allAgentHistoryQueryRootKey=function(){return t},e.allAgentHistoryQueryKey=function(n){return[...t,...[...n].sort()]};const t=["allAgentHistory"]},4015,[]);
15775
- __d(function(g,r,_i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"TACO_VERBS",{enumerable:!0,get:function(){return _}}),e.optionGlyph=function(t,n,i){if(i&&t)return t;return String(n+1)},Object.defineProperty(e,"ReelsHeader",{enumerable:!0,get:function(){return S}}),Object.defineProperty(e,"ReelsRail",{enumerable:!0,get:function(){return z}}),Object.defineProperty(e,"TagGate",{enumerable:!0,get:function(){return I}}),Object.defineProperty(e,"SnoozeSheet",{enumerable:!0,get:function(){return P}}),Object.defineProperty(e,"KanbanPicker",{enumerable:!0,get:function(){return D}}),Object.defineProperty(e,"LapSeam",{enumerable:!0,get:function(){return v}});var t=r(d[0]),n=r(d[1]),i=r(d[2]),o=r(d[3]),s=r(d[4]),l=r(d[5]),c=r(d[6]),u=r(d[7]);r(d[8]),r(d[9]),r(d[10]),r(d[11]),r(d[12]),r(d[13]),r(d[14]);var p=r(d[15]),h=r(d[16]),b=r(d[17]),x=r(d[18]),f=r(d[19]),y=r(d[20]);const _=[{id:"terminate",icon:h.Archive,label:"Terminate",detail:"Archive it. Soft delete, still readable by id."},{id:"automate",icon:h.Repeat,label:"Automate",detail:"Promote it to a routine: a cadence, running its next step."},{id:"consolidate",icon:h.Merge,label:"Consolidate",detail:"Fold sessions together. You pick which one survives."},{id:"outsource",icon:h.Share2,label:"Outsource",detail:"Share it with a person: WhatsApp, Slack or email."}];const j=(0,u.memo)(function(t){const n=(0,c.c)(10),{value:o,label:l,selected:u,onPick:p,testIDPrefix:h,testIDValue:b}=t;let x;n[0]!==p||n[1]!==o?(x=()=>p(o),n[0]=p,n[1]=o,n[2]=x):x=n[2];const f=x,_=u?L:C.tagPick,j=`${h}-${b??o}`;let S,w;return n[3]!==l?(S=(0,y.jsx)(i.Text,{style:C.tagPickText,children:l}),n[3]=l,n[4]=S):S=n[4],n[5]!==f||n[6]!==_||n[7]!==j||n[8]!==S?(w=(0,y.jsx)(s.Pressable,{onPress:f,style:_,testID:j,children:S}),n[5]=f,n[6]=_,n[7]=j,n[8]=S,n[9]=w):w=n[9],w}),S=(0,u.memo)(function(n){const o=(0,c.c)(28),{acts:l,cap:u,activeFilters:p,onFilter:h,position:x}=n,f=null!==u&&l>=u;let _;if(o[0]!==l||o[1]!==u){let t;o[3]!==l?(t=(t,n)=>({key:`pip-${n}`,on:n<l}),o[3]=l,o[4]=t):t=o[4],_=Array.from({length:u??0},t),o[0]=l,o[1]=u,o[2]=_}else _=o[2];const j=_;let S;o[5]!==f||o[6]!==j?(S=j.map(n=>(0,y.jsx)(t.View,{style:W(n.on,f)},n.key)),o[5]=f,o[6]=j,o[7]=S):S=o[7];const w=f?M:C.pipLabel;let T,z,I,P;o[8]!==l||o[9]!==u?(T=(0,b.actCapLabel)({acts:l,cap:u}),o[8]=l,o[9]=u,o[10]=T):T=o[10],o[11]!==w||o[12]!==T?(z=(0,y.jsx)(i.Text,{style:w,children:T}),o[11]=w,o[12]=T,o[13]=z):z=o[13],o[14]!==x?(I=x?(0,y.jsx)(i.Text,{style:C.pipLabel,children:x}):null,o[14]=x,o[15]=I):I=o[15],o[16]!==S||o[17]!==z||o[18]!==I?(P=(0,y.jsxs)(t.View,{style:C.pips,children:[S,z,I]}),o[16]=S,o[17]=z,o[18]=I,o[19]=P):P=o[19];const D=p>0?`filter ${p}`:"filter";let v,k,R;return o[20]!==D?(v=(0,y.jsx)(i.Text,{style:C.headerBtnText,children:D}),o[20]=D,o[21]=v):v=o[21],o[22]!==h||o[23]!==v?(k=(0,y.jsx)(s.Pressable,{onPress:h,style:C.headerBtn,testID:"reels-filter-open",children:v}),o[22]=h,o[23]=v,o[24]=k):k=o[24],o[25]!==k||o[26]!==P?(R=(0,y.jsxs)(t.View,{style:C.header,testID:"reels-header",children:[P,k]}),o[25]=k,o[26]=P,o[27]=R):R=o[27],R}),w=(0,u.memo)(function(n){const o=(0,c.c)(17),{action:l,onAction:u}=n,{theme:h}=(0,p.useUnistyles)();let b;o[0]!==l.id||o[1]!==u?(b=()=>u(l.id),o[0]=l.id,o[1]=u,o[2]=b):b=o[2];const x=b,f=l.icon,_=l.disabled?O:C.railItem,j=`reels-rail-${l.id}`,S=l.destructive?h.colors.destructive:h.colors.foreground;let w;o[3]!==f||o[4]!==S?(w=(0,y.jsx)(t.View,{style:C.railIcon,children:(0,y.jsx)(f,{size:19,color:S})}),o[3]=f,o[4]=S,o[5]=w):w=o[5];const T=l.destructive?A:C.railLabel;let z,I;return o[6]!==l.label||o[7]!==T?(z=(0,y.jsx)(i.Text,{style:T,children:l.label}),o[6]=l.label,o[7]=T,o[8]=z):z=o[8],o[9]!==l.disabled||o[10]!==l.label||o[11]!==x||o[12]!==_||o[13]!==j||o[14]!==w||o[15]!==z?(I=(0,y.jsxs)(s.Pressable,{onPress:x,disabled:l.disabled,accessibilityRole:"button",accessibilityLabel:l.label,style:_,testID:j,children:[w,z]}),o[9]=l.disabled,o[10]=l.label,o[11]=x,o[12]=_,o[13]=j,o[14]=w,o[15]=z,o[16]=I):I=o[16],I}),T=(0,u.memo)(function(n){const o=(0,c.c)(23),{action:l,onAction:u}=n,{theme:h}=(0,p.useUnistyles)(),{showLabel:b,progress:x,hint:_,handlers:j}=(0,f.useDestructiveHold)(u,l.id),S=l.icon;let w;o[0]!==x?(w=Math.round(100*x),o[0]=x,o[1]=w):w=o[1];const T=`${w}%`;let z;o[2]!==T?(z=[C.railHoldFill,{height:T}],o[2]=T,o[3]=z):z=o[3];const I=z,P=`${l.label}. Hold to confirm, this cannot be undone.`,D=l.disabled?O:C.railItem,v=`reels-rail-${l.id}`;let k,R,V;o[4]!==I||o[5]!==x?(k=x>0?(0,y.jsx)(t.View,{style:I,testID:"reels-rail-hold-fill"}):null,o[4]=I,o[5]=x,o[6]=k):k=o[6],o[7]!==S||o[8]!==h.colors.destructive?(R=(0,y.jsx)(S,{size:19,color:h.colors.destructive}),o[7]=S,o[8]=h.colors.destructive,o[9]=R):R=o[9],o[10]!==k||o[11]!==R?(V=(0,y.jsxs)(t.View,{style:C.railIcon,children:[k,R]}),o[10]=k,o[11]=R,o[12]=V):V=o[12];const M=b||"hold"===_?"hold\u2026":_??l.label;let L,H;return o[13]!==M?(L=(0,y.jsx)(i.Text,{style:A,children:M}),o[13]=M,o[14]=L):L=o[14],o[15]!==l.disabled||o[16]!==j||o[17]!==L||o[18]!==P||o[19]!==D||o[20]!==v||o[21]!==V?(H=(0,y.jsxs)(s.Pressable,Object.assign({},j,{disabled:l.disabled,accessibilityRole:"button",accessibilityLabel:P,style:D,testID:v,children:[V,L]})),o[15]=l.disabled,o[16]=j,o[17]=L,o[18]=P,o[19]=D,o[20]=v,o[21]=V,o[22]=H):H=o[22],H}),z=(0,u.memo)(function(n){const o=(0,c.c)(10),{actions:s,contextLabel:l,onAction:u}=n;let p,h,b;if(o[0]!==s||o[1]!==u){let t;o[3]!==u?(t=t=>t.destructive?(0,y.jsx)(T,{action:t,onAction:u},t.id):(0,y.jsx)(w,{action:t,onAction:u},t.id),o[3]=u,o[4]=t):t=o[4],p=s.map(t),o[0]=s,o[1]=u,o[2]=p}else p=o[2];return o[5]!==l?(h=(0,y.jsx)(t.View,{style:C.disc,children:(0,y.jsx)(i.Text,{style:C.discText,numberOfLines:1,children:l})}),o[5]=l,o[6]=h):h=o[6],o[7]!==p||o[8]!==h?(b=(0,y.jsxs)(t.View,{style:C.rail,testID:"reels-rail",children:[p,h]}),o[7]=p,o[8]=h,o[9]=b):b=o[9],b}),I=(0,u.memo)(function(l){const p=(0,c.c)(24),{available:h,onPick:b}=l,[x,f]=(0,u.useState)("");let _;p[0]!==x||p[1]!==b?(_=()=>{const t=x.trim().toLowerCase().replace(/\s+/g,"-");t.length>0&&(b(t),f(""))},p[0]=x,p[1]=b,p[2]=_):_=p[2];const S=_;let w,T,z,I,P,D,v,k,R;if(p[3]===Symbol.for("react.memo_cache_sentinel")?(w=(0,y.jsx)(i.Text,{style:C.gateTitle,children:"This session has no tag"}),T=(0,y.jsx)(i.Text,{style:C.gateBody,children:"Tag it before deciding. Without one it is invisible to every filter, report and invoice, and it comes back at the front of the next lap."}),p[3]=w,p[4]=T):(w=p[3],T=p[4]),p[5]!==h||p[6]!==b){let t;p[8]!==b?(t=t=>(0,y.jsx)(j,{value:t,label:t,onPick:b,testIDPrefix:"reels-tag"},t),p[8]=b,p[9]=t):t=p[9],z=h.map(t),p[5]=h,p[6]=b,p[7]=z}else z=p[7];return p[10]!==z?(I=(0,y.jsx)(o.ScrollView,{style:C.gateChipScroll,testID:"reels-tag-gate-list",children:(0,y.jsx)(t.View,{style:C.chipRow,children:z})}),p[10]=z,p[11]=I):I=p[11],p[12]!==x||p[13]!==S?(P=(0,y.jsx)(n.TextInput,{value:x,onChangeText:f,placeholder:"or a new tag",style:C.input,onSubmitEditing:S,testID:"reels-tag-new"}),p[12]=x,p[13]=S,p[14]=P):P=p[14],p[15]===Symbol.for("react.memo_cache_sentinel")?(D=(0,y.jsx)(i.Text,{style:C.sendText,children:"Add"}),p[15]=D):D=p[15],p[16]!==S?(v=(0,y.jsx)(s.Pressable,{onPress:S,style:C.send,testID:"reels-tag-new-send",children:D}),p[16]=S,p[17]=v):v=p[17],p[18]!==P||p[19]!==v?(k=(0,y.jsxs)(t.View,{style:C.freeRow,children:[P,v]}),p[18]=P,p[19]=v,p[20]=k):k=p[20],p[21]!==I||p[22]!==k?(R=(0,y.jsxs)(t.View,{style:C.gate,testID:"reels-tag-gate",children:[w,T,I,k]}),p[21]=I,p[22]=k,p[23]=R):R=p[23],R}),P=(0,u.memo)(function({priorCount:o,now:c=new Date,onCancel:p,onSnooze:h}){const x=(0,b.snoozeDemand)(o),[f,_]=(0,u.useState)(null),[S,w]=(0,u.useState)(""),[T,z]=(0,u.useState)(""),I=(0,u.useMemo)(()=>({until:f,untilWhat:S||null,why:T||null}),[f,S,T]),P=(0,b.snoozeDraftSatisfies)(x,I),D=(0,u.useCallback)(()=>h(I),[I,h]),v="needs-all"===x,k=(0,u.useMemo)(()=>{const t=c.getTime();return[{label:"2h",iso:new Date(t+72e5).toISOString()},{label:"18h",iso:new Date(t+648e5).toISOString()},{label:"3d",iso:new Date(t+2592e5).toISOString()},{label:"next week",iso:new Date(t+6048e5).toISOString()}]},[c]);return"refused"===x?(0,y.jsxs)(t.View,{style:C.sheet,testID:"reels-snooze-refused",children:[(0,y.jsx)(i.Text,{style:C.sheetTitle,children:"Snoozed twice already"}),(0,y.jsx)(i.Text,{style:C.gateBody,children:"A third push is not a decision. Terminate it, automate it, fold it into another session, or hand it to someone."}),(0,y.jsx)(s.Pressable,{onPress:p,style:C.send,testID:"reels-snooze-back",children:(0,y.jsx)(i.Text,{style:C.sendText,children:"Back"})})]}):(0,y.jsxs)(l.KeyboardAvoidingView,{behavior:void 0,style:C.sheet,testID:"reels-snooze-sheet",children:[(0,y.jsx)(i.Text,{style:C.sheetTitle,children:"Snooze"}),(0,y.jsxs)(i.Text,{style:C.label,children:["Until when ",v?"(required)":""]}),(0,y.jsx)(t.View,{style:C.chipRow,children:k.map(t=>(0,y.jsx)(j,{value:t.iso,label:t.label,selected:f===t.iso,onPick:_,testIDPrefix:"reels-snooze-until",testIDValue:t.label},t.label))}),(0,y.jsxs)(i.Text,{style:C.label,children:["Until what ",v?"(required)":"(optional)"]}),(0,y.jsx)(n.TextInput,{value:S,onChangeText:w,placeholder:"the event you are waiting on",style:C.input,testID:"reels-snooze-what"}),(0,y.jsxs)(i.Text,{style:C.label,children:["Why ",v?"(required)":"(optional)"]}),(0,y.jsx)(n.TextInput,{value:T,onChangeText:z,placeholder:"what is missing",style:C.input,testID:"reels-snooze-why"}),(0,y.jsx)(i.Text,{style:C.note,children:"A snooze is a bet that nothing changes. A failure cancels it and the card comes back."}),(0,y.jsxs)(t.View,{style:C.freeRow,children:[(0,y.jsx)(s.Pressable,{onPress:p,style:C.send,testID:"reels-snooze-cancel",children:(0,y.jsx)(i.Text,{style:C.sendText,children:"Cancel"})}),(0,y.jsx)(s.Pressable,{onPress:D,disabled:!P,style:P?C.send:H,testID:"reels-snooze-commit",children:(0,y.jsx)(i.Text,{style:C.sendText,children:"Snooze"})})]})]})}),D=(0,u.memo)(function(n){const i=(0,c.c)(5),{current:o,onPick:s}=n;let l,u;return i[0]!==o||i[1]!==s?(l=x.KANBAN_SEED_BUCKETS.map(t=>(0,y.jsx)(j,{value:t.id,label:t.label,selected:o===t.id,onPick:s,testIDPrefix:"reels-kanban"},t.id)),i[0]=o,i[1]=s,i[2]=l):l=i[2],i[3]!==l?(u=(0,y.jsx)(t.View,{style:C.chipRow,testID:"reels-kanban",children:l}),i[3]=l,i[4]=u):u=i[4],u}),v=(0,u.memo)(function(n){const o=(0,c.c)(8),{lap:s,ringSize:l,acted:u}=n;let p,h,b;return o[0]!==s?(p=(0,y.jsxs)(i.Text,{style:C.seamRule,children:["lap ",s]}),o[0]=s,o[1]=p):p=o[1],o[2]!==u||o[3]!==l?(h=(0,y.jsxs)(i.Text,{style:C.seamNote,children:[l," sessions in the ring","\n",u," acted last lap, now at the back","\n","no caught-up card. the work is never done."]}),o[2]=u,o[3]=l,o[4]=h):h=o[4],o[5]!==p||o[6]!==h?(b=(0,y.jsxs)(t.View,{style:C.seam,testID:"reels-seam",children:[p,h]}),o[5]=p,o[6]=h,o[7]=b):b=o[7],b}),C=p.StyleSheet.create(t=>({header:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",paddingHorizontal:t.spacing[2],paddingTop:t.spacing[2],gap:t.spacing[2],uni__dependencies:[0]},pips:{flexDirection:"row",alignItems:"center",gap:t.spacing[1],uni__dependencies:[0]},pip:{width:7,height:7,borderRadius:t.borderRadius.full,borderWidth:1,borderColor:t.colors.foregroundMuted,uni__dependencies:[0]},pipOn:{backgroundColor:t.colors.foregroundMuted,uni__dependencies:[0]},pipMaxed:{borderColor:t.colors.accent,uni__dependencies:[0]},pipLabel:{color:t.colors.foregroundMuted,fontSize:t.fontSize.xs,uni__dependencies:[0]},pipLabelMaxed:{color:t.colors.accent,uni__dependencies:[0]},headerBtn:{minHeight:44,justifyContent:"center",borderWidth:1,borderColor:t.colors.border,borderRadius:t.borderRadius.full,paddingHorizontal:t.spacing[2],paddingVertical:t.spacing[1],uni__dependencies:[0]},headerBtnText:{color:t.colors.foregroundMuted,fontSize:t.fontSize.xs,uni__dependencies:[0]},rail:{alignItems:"center",gap:t.spacing[1],uni__dependencies:[0]},railItem:{alignItems:"center",gap:2,width:56},railIcon:{width:44,height:44,borderRadius:t.borderRadius.full,borderWidth:1,borderColor:t.colors.border,alignItems:"center",justifyContent:"center",backgroundColor:t.colors.surface0,overflow:"hidden",uni__dependencies:[0]},railHoldFill:{position:"absolute",left:0,right:0,bottom:0,backgroundColor:t.colors.destructive,opacity:.18,uni__dependencies:[0]},railLabel:{color:t.colors.foregroundMuted,fontSize:t.fontSize.xs,textAlign:"center",uni__dependencies:[0]},railLabelDanger:{color:t.colors.destructive,uni__dependencies:[0]},gateChipScroll:{maxHeight:104},disc:{minHeight:38,maxWidth:96,paddingHorizontal:t.spacing[2],borderRadius:t.borderRadius.full,borderWidth:1,borderColor:t.colors.foregroundMuted,alignItems:"center",justifyContent:"center",backgroundColor:t.colors.surface0,uni__dependencies:[0]},discText:{color:t.colors.foregroundMuted,fontSize:t.fontSize.xs,uni__dependencies:[0]},dim:{opacity:.35},gate:{borderWidth:1,borderStyle:"dashed",borderColor:t.colors.destructive,borderRadius:t.borderRadius["2xl"],padding:t.spacing[2],gap:t.spacing[1],uni__dependencies:[0]},gateTitle:{color:t.colors.destructive,fontSize:t.fontSize.sm,fontWeight:"600",uni__dependencies:[0]},gateBody:{color:t.colors.foregroundMuted,fontSize:t.fontSize.xs,lineHeight:17,uni__dependencies:[0]},chipRow:{flexDirection:"row",flexWrap:"wrap",gap:t.spacing[1],uni__dependencies:[0]},tagPick:{minHeight:44,justifyContent:"center",borderWidth:1,borderColor:t.colors.border,borderRadius:t.borderRadius.full,paddingHorizontal:t.spacing[2],paddingVertical:t.spacing[1],uni__dependencies:[0]},tagPickOn:{borderColor:t.colors.accent,uni__dependencies:[0]},tagPickText:{color:t.colors.foreground,fontSize:t.fontSize.xs,uni__dependencies:[0]},freeRow:{flexDirection:"row",alignItems:"center",gap:t.spacing[1],uni__dependencies:[0]},input:{flex:1,borderWidth:1,borderColor:t.colors.border,borderRadius:t.borderRadius["2xl"],paddingHorizontal:t.spacing[2],paddingVertical:t.spacing[1],color:t.colors.foreground,fontSize:t.fontSize.xs,uni__dependencies:[0]},send:{minHeight:44,justifyContent:"center",borderWidth:1,borderColor:t.colors.accent,borderRadius:t.borderRadius["2xl"],paddingHorizontal:t.spacing[2],paddingVertical:t.spacing[1],uni__dependencies:[0]},sendText:{color:t.colors.accent,fontSize:t.fontSize.xs,uni__dependencies:[0]},sheet:{gap:t.spacing[1],padding:t.spacing[2],uni__dependencies:[0]},sheetTitle:{color:t.colors.foreground,fontSize:t.fontSize.base,fontWeight:"600",uni__dependencies:[0]},label:{color:t.colors.foregroundMuted,fontSize:t.fontSize.xs,textTransform:"uppercase",letterSpacing:.6,marginTop:t.spacing[1],uni__dependencies:[0]},note:{color:t.colors.foregroundMuted,fontSize:t.fontSize.xs,fontStyle:"italic",marginTop:t.spacing[1],uni__dependencies:[0]},seam:{alignItems:"center",justifyContent:"center",gap:t.spacing[1],padding:t.spacing[3],uni__dependencies:[0]},seamRule:{color:t.colors.foregroundMuted,fontSize:t.fontSize.sm,letterSpacing:3,uni__dependencies:[0]},seamNote:{color:t.colors.foregroundMuted,fontSize:t.fontSize.xs,textAlign:"center",lineHeight:18,uni__dependencies:[0]}})),k=[C.pip,C.pipOn],R=[C.pip,C.pipMaxed],V=[C.pip,C.pipOn,C.pipMaxed],M=[C.pipLabel,C.pipLabelMaxed],O=[C.railItem,C.dim],A=[C.railLabel,C.railLabelDanger],L=[C.tagPick,C.tagPickOn],H=[C.send,C.dim];function W(t,n){return t&&n?V:t?k:n?R:C.pip}},4016,[348,2838,349,2815,2476,4017,350,36,659,25,546,182,234,571,146,56,811,4018,4008,4019,279]);
15775
+ __d(function(g,r,_i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"TACO_VERBS",{enumerable:!0,get:function(){return _}}),e.optionGlyph=function(t,i,n){if(n&&t)return t;return String(i+1)},Object.defineProperty(e,"ReelsHeader",{enumerable:!0,get:function(){return w}}),Object.defineProperty(e,"ReelsRail",{enumerable:!0,get:function(){return I}}),Object.defineProperty(e,"TagGate",{enumerable:!0,get:function(){return P}}),Object.defineProperty(e,"SnoozeSheet",{enumerable:!0,get:function(){return D}}),Object.defineProperty(e,"KanbanPicker",{enumerable:!0,get:function(){return R}}),Object.defineProperty(e,"LapSeam",{enumerable:!0,get:function(){return v}});var t=r(d[0]),i=r(d[1]),n=r(d[2]),s=r(d[3]),o=r(d[4]),l=r(d[5]),c=r(d[6]),u=r(d[7]);r(d[8]),r(d[9]),r(d[10]),r(d[11]),r(d[12]),r(d[13]),r(d[14]);var p=r(d[15]),b=r(d[16]),h=r(d[17]),f=r(d[18]),x=r(d[19]),y=r(d[20]);const _=[{id:"terminate",icon:b.Archive,label:"Terminate",detail:"Archive it. Soft delete, still readable by id."},{id:"automate",icon:b.Repeat,label:"Automate",detail:"Promote it to a routine: a cadence, running its next step."},{id:"consolidate",icon:b.Merge,label:"Consolidate",detail:"Fold sessions together. You pick which one survives."},{id:"outsource",icon:b.Share2,label:"Outsource",detail:"Share it with a person: WhatsApp, Slack or email."}];const j={on:{selected:!0},off:{selected:!1}},S=(0,u.memo)(function(t){const i=(0,c.c)(12),{value:s,label:l,selected:u,onPick:p,testIDPrefix:b,testIDValue:h}=t;let f;i[0]!==p||i[1]!==s?(f=()=>p(s),i[0]=p,i[1]=s,i[2]=f):f=i[2];const x=f,_=u?`${l}, selected`:l,S=j[!0===u?"on":"off"],w=u?H:C.tagPick,T=`${b}-${h??s}`;let z,I;return i[3]!==l?(z=(0,y.jsx)(n.Text,{style:C.tagPickText,children:l}),i[3]=l,i[4]=z):z=i[4],i[5]!==x||i[6]!==_||i[7]!==S||i[8]!==w||i[9]!==T||i[10]!==z?(I=(0,y.jsx)(o.Pressable,{onPress:x,accessibilityRole:"button",accessibilityLabel:_,accessibilityState:S,style:w,testID:T,children:z}),i[5]=x,i[6]=_,i[7]=S,i[8]=w,i[9]=T,i[10]=z,i[11]=I):I=i[11],I}),w=(0,u.memo)(function(i){const s=(0,c.c)(28),{acts:l,cap:u,activeFilters:p,onFilter:b,position:f}=i,x=null!==u&&l>=u;let _;if(s[0]!==l||s[1]!==u){let t;s[3]!==l?(t=(t,i)=>({key:`pip-${i}`,on:i<l}),s[3]=l,s[4]=t):t=s[4],_=Array.from({length:u??0},t),s[0]=l,s[1]=u,s[2]=_}else _=s[2];const j=_;let S;s[5]!==x||s[6]!==j?(S=j.map(i=>(0,y.jsx)(t.View,{style:B(i.on,x)},i.key)),s[5]=x,s[6]=j,s[7]=S):S=s[7];const w=x?O:C.pipLabel;let T,z,I,P;s[8]!==l||s[9]!==u?(T=(0,h.actCapLabel)({acts:l,cap:u}),s[8]=l,s[9]=u,s[10]=T):T=s[10],s[11]!==w||s[12]!==T?(z=(0,y.jsx)(n.Text,{style:w,children:T}),s[11]=w,s[12]=T,s[13]=z):z=s[13],s[14]!==f?(I=f?(0,y.jsx)(n.Text,{style:C.pipLabel,children:f}):null,s[14]=f,s[15]=I):I=s[15],s[16]!==S||s[17]!==z||s[18]!==I?(P=(0,y.jsxs)(t.View,{style:C.pips,children:[S,z,I]}),s[16]=S,s[17]=z,s[18]=I,s[19]=P):P=s[19];const D=p>0?`filter ${p}`:"filter";let R,v,k;return s[20]!==D?(R=(0,y.jsx)(n.Text,{style:C.headerBtnText,children:D}),s[20]=D,s[21]=R):R=s[21],s[22]!==b||s[23]!==R?(v=(0,y.jsx)(o.Pressable,{onPress:b,accessibilityRole:"button",accessibilityLabel:"Open filters",style:C.headerBtn,testID:"reels-filter-open",children:R}),s[22]=b,s[23]=R,s[24]=v):v=s[24],s[25]!==v||s[26]!==P?(k=(0,y.jsxs)(t.View,{style:C.header,testID:"reels-header",children:[P,v]}),s[25]=v,s[26]=P,s[27]=k):k=s[27],k}),T=(0,u.memo)(function(i){const s=(0,c.c)(17),{action:l,onAction:u}=i,{theme:b}=(0,p.useUnistyles)();let h;s[0]!==l.id||s[1]!==u?(h=()=>u(l.id),s[0]=l.id,s[1]=u,s[2]=h):h=s[2];const f=h,x=l.icon,_=l.disabled?M:C.railItem,j=`reels-rail-${l.id}`,S=l.destructive?b.colors.destructive:b.colors.foreground;let w;s[3]!==x||s[4]!==S?(w=(0,y.jsx)(t.View,{style:C.railIcon,children:(0,y.jsx)(x,{size:19,color:S})}),s[3]=x,s[4]=S,s[5]=w):w=s[5];const T=l.destructive?A:C.railLabel;let z,I;return s[6]!==l.label||s[7]!==T?(z=(0,y.jsx)(n.Text,{style:T,children:l.label}),s[6]=l.label,s[7]=T,s[8]=z):z=s[8],s[9]!==l.disabled||s[10]!==l.label||s[11]!==f||s[12]!==_||s[13]!==j||s[14]!==w||s[15]!==z?(I=(0,y.jsxs)(o.Pressable,{onPress:f,disabled:l.disabled,accessibilityRole:"button",accessibilityLabel:l.label,style:_,testID:j,children:[w,z]}),s[9]=l.disabled,s[10]=l.label,s[11]=f,s[12]=_,s[13]=j,s[14]=w,s[15]=z,s[16]=I):I=s[16],I}),z=(0,u.memo)(function(i){const s=(0,c.c)(23),{action:l,onAction:u}=i,{theme:b}=(0,p.useUnistyles)(),{showLabel:h,progress:f,hint:_,handlers:j}=(0,x.useDestructiveHold)(u,l.id),S=l.icon;let w;s[0]!==f?(w=Math.round(100*f),s[0]=f,s[1]=w):w=s[1];const T=`${w}%`;let z;s[2]!==T?(z=[C.railHoldFill,{height:T}],s[2]=T,s[3]=z):z=s[3];const I=z,P=`${l.label}. Hold to confirm, this cannot be undone.`,D=l.disabled?M:C.railItem,R=`reels-rail-${l.id}`;let v,k,L;s[4]!==I||s[5]!==f?(v=f>0?(0,y.jsx)(t.View,{style:I,testID:"reels-rail-hold-fill"}):null,s[4]=I,s[5]=f,s[6]=v):v=s[6],s[7]!==S||s[8]!==b.colors.destructive?(k=(0,y.jsx)(S,{size:19,color:b.colors.destructive}),s[7]=S,s[8]=b.colors.destructive,s[9]=k):k=s[9],s[10]!==v||s[11]!==k?(L=(0,y.jsxs)(t.View,{style:C.railIcon,children:[v,k]}),s[10]=v,s[11]=k,s[12]=L):L=s[12];const V=h||"hold"===_?"hold\u2026":_??`hold to ${l.label}`;let O,H;return s[13]!==V?(O=(0,y.jsx)(n.Text,{style:A,numberOfLines:2,children:V}),s[13]=V,s[14]=O):O=s[14],s[15]!==l.disabled||s[16]!==j||s[17]!==O||s[18]!==P||s[19]!==D||s[20]!==R||s[21]!==L?(H=(0,y.jsxs)(o.Pressable,Object.assign({},j,{disabled:l.disabled,accessibilityRole:"button",accessibilityLabel:P,style:D,testID:R,children:[L,O]})),s[15]=l.disabled,s[16]=j,s[17]=O,s[18]=P,s[19]=D,s[20]=R,s[21]=L,s[22]=H):H=s[22],H}),I=(0,u.memo)(function(i){const s=(0,c.c)(10),{actions:o,contextLabel:l,onAction:u}=i;let p,b,h;if(s[0]!==o||s[1]!==u){let t;s[3]!==u?(t=t=>t.destructive?(0,y.jsx)(z,{action:t,onAction:u},t.id):(0,y.jsx)(T,{action:t,onAction:u},t.id),s[3]=u,s[4]=t):t=s[4],p=o.map(t),s[0]=o,s[1]=u,s[2]=p}else p=s[2];return s[5]!==l?(b=(0,y.jsx)(t.View,{style:C.disc,children:(0,y.jsx)(n.Text,{style:C.discText,numberOfLines:1,children:l})}),s[5]=l,s[6]=b):b=s[6],s[7]!==p||s[8]!==b?(h=(0,y.jsxs)(t.View,{style:C.rail,testID:"reels-rail",children:[p,b]}),s[7]=p,s[8]=b,s[9]=h):h=s[9],h}),P=(0,u.memo)(function(l){const p=(0,c.c)(24),{available:b,onPick:h}=l,[f,x]=(0,u.useState)("");let _;p[0]!==f||p[1]!==h?(_=()=>{const t=f.trim().toLowerCase().replace(/\s+/g,"-");t.length>0&&(h(t),x(""))},p[0]=f,p[1]=h,p[2]=_):_=p[2];const j=_;let w,T,z,I,P,D,R,v,k;if(p[3]===Symbol.for("react.memo_cache_sentinel")?(w=(0,y.jsx)(n.Text,{style:C.gateTitle,children:"This session has no tag"}),T=(0,y.jsx)(n.Text,{style:C.gateBody,children:"Tag it before deciding. Without one it is invisible to every filter, report and invoice, and it comes back at the front of the next lap."}),p[3]=w,p[4]=T):(w=p[3],T=p[4]),p[5]!==b||p[6]!==h){let t;p[8]!==h?(t=t=>(0,y.jsx)(S,{value:t,label:t,onPick:h,testIDPrefix:"reels-tag"},t),p[8]=h,p[9]=t):t=p[9],z=b.map(t),p[5]=b,p[6]=h,p[7]=z}else z=p[7];return p[10]!==z?(I=(0,y.jsx)(s.ScrollView,{style:C.gateChipScroll,testID:"reels-tag-gate-list",children:(0,y.jsx)(t.View,{style:C.chipRow,children:z})}),p[10]=z,p[11]=I):I=p[11],p[12]!==f||p[13]!==j?(P=(0,y.jsx)(i.TextInput,{value:f,onChangeText:x,placeholder:"or a new tag",style:C.input,onSubmitEditing:j,testID:"reels-tag-new"}),p[12]=f,p[13]=j,p[14]=P):P=p[14],p[15]===Symbol.for("react.memo_cache_sentinel")?(D=(0,y.jsx)(n.Text,{style:C.sendText,children:"Add"}),p[15]=D):D=p[15],p[16]!==j?(R=(0,y.jsx)(o.Pressable,{onPress:j,style:C.send,accessibilityRole:"button",accessibilityLabel:"Add this tag",testID:"reels-tag-new-send",children:D}),p[16]=j,p[17]=R):R=p[17],p[18]!==P||p[19]!==R?(v=(0,y.jsxs)(t.View,{style:C.freeRow,children:[P,R]}),p[18]=P,p[19]=R,p[20]=v):v=p[20],p[21]!==I||p[22]!==v?(k=(0,y.jsxs)(t.View,{style:C.gate,testID:"reels-tag-gate",children:[w,T,I,v]}),p[21]=I,p[22]=v,p[23]=k):k=p[23],k}),D=(0,u.memo)(function({priorCount:s,now:c=new Date,onCancel:p,onSnooze:b}){const f=(0,h.snoozeDemand)(s),[x,_]=(0,u.useState)(null),[j,w]=(0,u.useState)(""),[T,z]=(0,u.useState)(""),I=(0,u.useMemo)(()=>({until:x,untilWhat:j||null,why:T||null}),[x,j,T]),P=(0,h.snoozeDraftSatisfies)(f,I),D=(0,u.useCallback)(()=>b(I),[I,b]),R="needs-all"===f,v=(0,u.useMemo)(()=>{const t=c.getTime();return[{label:"2h",iso:new Date(t+72e5).toISOString()},{label:"18h",iso:new Date(t+648e5).toISOString()},{label:"3d",iso:new Date(t+2592e5).toISOString()},{label:"next week",iso:new Date(t+6048e5).toISOString()}]},[c]);return"refused"===f?(0,y.jsxs)(t.View,{style:C.sheet,testID:"reels-snooze-refused",children:[(0,y.jsx)(n.Text,{style:C.sheetTitle,children:"Snoozed twice already"}),(0,y.jsx)(n.Text,{style:C.gateBody,children:"A third push is not a decision. Terminate it, automate it, fold it into another session, or hand it to someone."}),(0,y.jsx)(o.Pressable,{onPress:p,style:C.send,accessibilityRole:"button",accessibilityLabel:"Back",testID:"reels-snooze-back",children:(0,y.jsx)(n.Text,{style:C.sendText,children:"Back"})})]}):(0,y.jsxs)(l.KeyboardAvoidingView,{behavior:void 0,style:C.sheet,testID:"reels-snooze-sheet",children:[(0,y.jsx)(n.Text,{style:C.sheetTitle,children:"Snooze"}),(0,y.jsxs)(n.Text,{style:C.label,children:["Until when ",R?"(required)":""]}),(0,y.jsx)(t.View,{style:C.chipRow,children:v.map(t=>(0,y.jsx)(S,{value:t.iso,label:t.label,selected:x===t.iso,onPick:_,testIDPrefix:"reels-snooze-until",testIDValue:t.label},t.label))}),(0,y.jsxs)(n.Text,{style:C.label,children:["Until what ",R?"(required)":"(optional)"]}),(0,y.jsx)(i.TextInput,{value:j,onChangeText:w,placeholder:"the event you are waiting on",style:C.input,testID:"reels-snooze-what"}),(0,y.jsxs)(n.Text,{style:C.label,children:["Why ",R?"(required)":"(optional)"]}),(0,y.jsx)(i.TextInput,{value:T,onChangeText:z,placeholder:"what is missing",style:C.input,testID:"reels-snooze-why"}),(0,y.jsx)(n.Text,{style:C.note,children:"A snooze is a bet that nothing changes. A failure cancels it and the card comes back."}),(0,y.jsxs)(t.View,{style:C.freeRow,children:[(0,y.jsx)(o.Pressable,{onPress:p,style:C.send,accessibilityRole:"button",accessibilityLabel:"Cancel and close",testID:"reels-snooze-cancel",children:(0,y.jsx)(n.Text,{style:C.sendText,children:"Cancel"})}),(0,y.jsx)(o.Pressable,{onPress:D,disabled:!P,style:P?C.send:W,accessibilityRole:"button",accessibilityLabel:"Snooze this session",testID:"reels-snooze-commit",children:(0,y.jsx)(n.Text,{style:C.sendText,children:"Snooze"})})]})]})}),R=(0,u.memo)(function(i){const n=(0,c.c)(9),{current:s,onPick:o}=i,l=(0,f.useKanbanBuckets)();let u,p;if(n[0]!==l||n[1]!==s||n[2]!==o){let t;n[4]!==s||n[5]!==o?(t=t=>(0,y.jsx)(S,{value:t.id,label:t.label,selected:s===t.id,onPick:o,testIDPrefix:"reels-kanban"},t.id),n[4]=s,n[5]=o,n[6]=t):t=n[6],u=l.map(t),n[0]=l,n[1]=s,n[2]=o,n[3]=u}else u=n[3];return n[7]!==u?(p=(0,y.jsx)(t.View,{style:C.chipRow,testID:"reels-kanban",children:u}),n[7]=u,n[8]=p):p=n[8],p}),v=(0,u.memo)(function(i){const s=(0,c.c)(8),{lap:o,ringSize:l,acted:u}=i;let p,b,h;return s[0]!==o?(p=(0,y.jsxs)(n.Text,{style:C.seamRule,children:["lap ",o]}),s[0]=o,s[1]=p):p=s[1],s[2]!==u||s[3]!==l?(b=(0,y.jsxs)(n.Text,{style:C.seamNote,children:[l," sessions in the ring","\n",u," acted last lap, now at the back","\n","no caught-up card. the work is never done."]}),s[2]=u,s[3]=l,s[4]=b):b=s[4],s[5]!==p||s[6]!==b?(h=(0,y.jsxs)(t.View,{style:C.seam,testID:"reels-seam",children:[p,b]}),s[5]=p,s[6]=b,s[7]=h):h=s[7],h}),C=p.StyleSheet.create(t=>({header:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",paddingHorizontal:t.spacing[2],paddingTop:t.spacing[2],gap:t.spacing[2],uni__dependencies:[0]},pips:{flexDirection:"row",alignItems:"center",gap:t.spacing[1],uni__dependencies:[0]},pip:{width:7,height:7,borderRadius:t.borderRadius.full,borderWidth:1,borderColor:t.colors.foregroundMuted,uni__dependencies:[0]},pipOn:{backgroundColor:t.colors.foregroundMuted,uni__dependencies:[0]},pipMaxed:{borderColor:t.colors.accent,uni__dependencies:[0]},pipLabel:{color:t.colors.foregroundMuted,fontSize:t.fontSize.xs,uni__dependencies:[0]},pipLabelMaxed:{color:t.colors.accent,uni__dependencies:[0]},headerBtn:{minHeight:44,justifyContent:"center",borderWidth:1,borderColor:t.colors.border,borderRadius:t.borderRadius.full,paddingHorizontal:t.spacing[2],paddingVertical:t.spacing[1],uni__dependencies:[0]},headerBtnText:{color:t.colors.foregroundMuted,fontSize:t.fontSize.xs,uni__dependencies:[0]},rail:{alignItems:"center",gap:t.spacing[1],uni__dependencies:[0]},railItem:{alignItems:"center",gap:2,width:56},railIcon:{width:44,height:44,borderRadius:t.borderRadius.full,borderWidth:1,borderColor:t.colors.border,alignItems:"center",justifyContent:"center",backgroundColor:t.colors.surface0,overflow:"hidden",uni__dependencies:[0]},railHoldFill:{position:"absolute",left:0,right:0,bottom:0,backgroundColor:t.colors.destructive,opacity:.18,uni__dependencies:[0]},railLabel:{color:t.colors.foregroundMuted,fontSize:t.fontSize.xs,textAlign:"center",uni__dependencies:[0]},railLabelDanger:{color:t.colors.destructive,uni__dependencies:[0]},gateChipScroll:{maxHeight:104},disc:{minHeight:38,maxWidth:96,paddingHorizontal:t.spacing[2],borderRadius:t.borderRadius.full,borderWidth:1,borderColor:t.colors.foregroundMuted,alignItems:"center",justifyContent:"center",backgroundColor:t.colors.surface0,uni__dependencies:[0]},discText:{color:t.colors.foregroundMuted,fontSize:t.fontSize.xs,uni__dependencies:[0]},dim:{opacity:.35},gate:{borderWidth:1,borderStyle:"dashed",borderColor:t.colors.destructive,borderRadius:t.borderRadius["2xl"],padding:t.spacing[2],gap:t.spacing[1],uni__dependencies:[0]},gateTitle:{color:t.colors.destructive,fontSize:t.fontSize.sm,fontWeight:"600",uni__dependencies:[0]},gateBody:{color:t.colors.foregroundMuted,fontSize:t.fontSize.xs,lineHeight:17,uni__dependencies:[0]},chipRow:{flexDirection:"row",flexWrap:"wrap",gap:t.spacing[1],uni__dependencies:[0]},tagPick:{minHeight:44,justifyContent:"center",borderWidth:1,borderColor:t.colors.border,borderRadius:t.borderRadius.full,paddingHorizontal:t.spacing[2],paddingVertical:t.spacing[1],uni__dependencies:[0]},tagPickOn:{borderColor:t.colors.accent,uni__dependencies:[0]},tagPickText:{color:t.colors.foreground,fontSize:t.fontSize.xs,uni__dependencies:[0]},freeRow:{flexDirection:"row",alignItems:"center",gap:t.spacing[1],uni__dependencies:[0]},input:{flex:1,borderWidth:1,borderColor:t.colors.border,borderRadius:t.borderRadius["2xl"],paddingHorizontal:t.spacing[2],paddingVertical:t.spacing[1],color:t.colors.foreground,fontSize:t.fontSize.xs,uni__dependencies:[0]},send:{minHeight:44,justifyContent:"center",borderWidth:1,borderColor:t.colors.accent,borderRadius:t.borderRadius["2xl"],paddingHorizontal:t.spacing[2],paddingVertical:t.spacing[1],uni__dependencies:[0]},sendText:{color:t.colors.accent,fontSize:t.fontSize.xs,uni__dependencies:[0]},sheet:{gap:t.spacing[1],padding:t.spacing[2],uni__dependencies:[0]},sheetTitle:{color:t.colors.foreground,fontSize:t.fontSize.base,fontWeight:"600",uni__dependencies:[0]},label:{color:t.colors.foregroundMuted,fontSize:t.fontSize.xs,textTransform:"uppercase",letterSpacing:.6,marginTop:t.spacing[1],uni__dependencies:[0]},note:{color:t.colors.foregroundMuted,fontSize:t.fontSize.xs,fontStyle:"italic",marginTop:t.spacing[1],uni__dependencies:[0]},seam:{alignItems:"center",justifyContent:"center",gap:t.spacing[1],padding:t.spacing[3],uni__dependencies:[0]},seamRule:{color:t.colors.foregroundMuted,fontSize:t.fontSize.sm,letterSpacing:3,uni__dependencies:[0]},seamNote:{color:t.colors.foregroundMuted,fontSize:t.fontSize.xs,textAlign:"center",lineHeight:18,uni__dependencies:[0]}})),k=[C.pip,C.pipOn],L=[C.pip,C.pipMaxed],V=[C.pip,C.pipOn,C.pipMaxed],O=[C.pipLabel,C.pipLabelMaxed],M=[C.railItem,C.dim],A=[C.railLabel,C.railLabelDanger],H=[C.tagPick,C.tagPickOn],W=[C.send,C.dim];function B(t,i){return t&&i?V:t?k:i?L:C.pip}},4016,[348,2838,349,2815,2476,4017,350,36,659,25,546,182,234,571,146,56,811,4018,4007,4019,279]);
15776
15776
  __d(function(g,r,i,a,m,_e,d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"KeyboardAvoidingView",{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)},4017,[659,274]);
15777
15777
  __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.snoozeDemand=function(t){if(t<=0)return"free";if(1===t)return"needs-all";return"refused"},e.snoozeDraftSatisfies=function(t,n){if("refused"===t)return!1;if(!n.until)return!1;if("free"===t)return!0;return(n.untilWhat?.trim().length??0)>1&&(n.why?.trim().length??0)>2},Object.defineProperty(e,"DEFAULT_ACT_CAP",{enumerable:!0,get:function(){return t}}),e.canAct=function({acts:t,cap:n}){if(null===n)return!0;return t<n},e.actCapLabel=function({acts:t,cap:n}){if(null===n)return`${t} decisions`;return t>=n?`${t}/${n} - the rest is tomorrow`:`${t}/${n} essential`};const t=5},4018,[]);
15778
15778
  __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"FILL_TICK_MS",{enumerable:!0,get:function(){return o}}),e.useDestructiveHold=function(s,u){const _=(0,t.c)(23),[f,h]=(0,n.useState)(l.idleHold),[S,b]=(0,n.useState)(null),[v,I]=(0,n.useState)(0),y=(0,n.useRef)(null);let D;_[0]===Symbol.for("react.memo_cache_sentinel")?(D=(0,l.idleHold)(),_[0]=D):D=_[0];const H=(0,n.useRef)(D),L=(0,n.useRef)(null);let P;_[1]===Symbol.for("react.memo_cache_sentinel")?(P=()=>{null!==L.current&&(clearTimeout(L.current),L.current=null),null!==y.current&&(clearInterval(y.current),y.current=null)},_[1]=P):P=_[1];const T=P;let w;_[2]===Symbol.for("react.memo_cache_sentinel")?(w=()=>{null!==y.current&&clearInterval(y.current),y.current=setInterval(()=>{const t=(0,l.holdProgress)(H.current,Date.now(),c);I(t),t>=1&&null!==y.current&&(clearInterval(y.current),y.current=null)},o)},_[2]=w):w=_[2];const M=w;let R;_[3]===Symbol.for("react.memo_cache_sentinel")?(R=()=>{b(null);const t=(0,l.press)(Date.now());H.current=t,h(t),T(),L.current=setTimeout(()=>{const t=(0,l.tick)(H.current,Date.now());H.current=t,h(t),M()},l.UNFURL_MS)},_[3]=R):R=_[3];const p=R;let E;_[4]!==s||_[5]!==u?(E=t=>{T();const n=(0,l.release)(H.current,Date.now(),c,t);H.current=(0,l.idleHold)(),h((0,l.idleHold)()),I(0),n.commit?(b(null),Promise.resolve(s(u)).catch(t=>{b(t instanceof Error?t.message:"could not retire it")})):b("too-short"===n.reason||"not-read"===n.reason?"hold":null)},_[4]=s,_[5]=u,_[6]=E):E=_[6];const O=E;let C;_[7]!==O?(C=()=>O(!1),_[7]=O,_[8]=C):C=_[8];const U=C;let j;_[9]!==O?(j=()=>O(!0),_[9]=O,_[10]=j):j=_[10];const F=j;let V,k,K,N,q;_[11]===Symbol.for("react.memo_cache_sentinel")?(V=()=>T,k=[T],_[11]=V,_[12]=k):(V=_[11],k=_[12]);(0,n.useEffect)(V,k),_[13]!==f?(K=(0,l.isLabelVisible)(f),_[13]=f,_[14]=K):K=_[14];_[15]!==F||_[16]!==U?(N={onPressIn:p,onPressOut:U,onTouchCancel:F},_[15]=F,_[16]=U,_[17]=N):N=_[17];_[18]!==S||_[19]!==v||_[20]!==N||_[21]!==K?(q={showLabel:K,progress:v,hint:S,handlers:N},_[18]=S,_[19]=v,_[20]=N,_[21]=K,_[22]=q):q=_[22];return q};var t=r(d[0]),n=r(d[1]),l=r(d[2]);const c={holdMs:l.DESTRUCTIVE_HOLD_MS},o=40},4019,[350,36,4020]);
15779
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"UNFURL_MS",{enumerable:!0,get:function(){return n}}),Object.defineProperty(e,"DESTRUCTIVE_HOLD_MS",{enumerable:!0,get:function(){return t}}),Object.defineProperty(e,"ANSWER_HOLD_MS",{enumerable:!0,get:function(){return u}}),e.idleHold=function(){return{phase:"idle",pressedAt:null,unfurledAt:null}},e.press=function(n){return{phase:"pressing",pressedAt:n,unfurledAt:null}},e.tick=function(t,u,s={}){if("idle"===t.phase||null===t.pressedAt)return t;if("pressing"===t.phase&&u-t.pressedAt>=n){const n={phase:"unfurled",pressedAt:t.pressedAt,unfurledAt:u};return s.holdMs&&s.holdMs>0?Object.assign({},n,{phase:"armed"}):n}return t},e.holdProgress=function(n,t,u={}){if(null===n.unfurledAt)return 0;const s=u.holdMs??0;if(s<=0)return 1;return Math.max(0,Math.min(1,(t-n.unfurledAt)/s))},e.isLabelVisible=s,e.release=function(n,t,u={},l=!1){if("idle"===n.phase||null===n.pressedAt)return{commit:!1,reason:"not-pressed"};if(l)return{commit:!1,reason:"slid-off"};if(!s(n))return{commit:!1,reason:"not-read"};const o=u.holdMs??0;if(o>0&&null!==n.unfurledAt&&t-n.unfurledAt<o)return{commit:!1,reason:"too-short"};return{commit:!0}};const n=120,t=500,u=260;function s(n){return"unfurled"===n.phase||"armed"===n.phase}},4020,[]);
15779
+ __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"UNFURL_MS",{enumerable:!0,get:function(){return n}}),Object.defineProperty(e,"DESTRUCTIVE_HOLD_MS",{enumerable:!0,get:function(){return t}}),Object.defineProperty(e,"ANSWER_HOLD_MS",{enumerable:!0,get:function(){return u}}),e.idleHold=function(){return{phase:"idle",pressedAt:null,unfurledAt:null}},e.press=function(n){return{phase:"pressing",pressedAt:n,unfurledAt:null}},e.tick=function(t,u,s={}){if("idle"===t.phase||null===t.pressedAt)return t;if("pressing"===t.phase&&u-t.pressedAt>=n){const n={phase:"unfurled",pressedAt:t.pressedAt,unfurledAt:u};return s.holdMs&&s.holdMs>0?Object.assign({},n,{phase:"armed"}):n}return t},e.holdProgress=function(n,t,u={}){if(null===n.unfurledAt)return 0;const s=u.holdMs??0;if(s<=0)return 1;return Math.max(0,Math.min(1,(t-n.unfurledAt)/s))},e.isLabelVisible=s,e.release=function(n,t,u={},l=!1){if("idle"===n.phase||null===n.pressedAt)return{commit:!1,reason:"not-pressed"};if(l)return{commit:!1,reason:"slid-off"};if(!s(n))return{commit:!1,reason:"not-read"};const o=u.holdMs??0;if(o>0&&null!==n.unfurledAt&&t-n.unfurledAt<o)return{commit:!1,reason:"too-short"};return{commit:!0}},e.answerHint=function(n){return"slid-off"===n?null:"hold to send"};const n=120,t=500,u=260;function s(n){return"unfurled"===n.phase||"armed"===n.phase}},4020,[]);
15780
15780
  __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.useSessionDigestFeatureEnabled=function(n){const o=(0,s.c)(2);let u;o[0]!==n?(u=s=>!!n&&!0===s.sessions[n]?.serverInfo?.features?.sessionDigest,o[0]=n,o[1]=u):u=o[1];return(0,t.useSessionStore)(u)};var s=r(d[0]),t=r(d[1])},4021,[350,3427]);
15781
15781
  __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.providerSessionLabel=n,e.truncateSessionId=function(s,n=8,t=6){if(s.length<=n+t+1)return s;return`${s.slice(0,n)}\u2026${s.slice(-t)}`},e.buildSessionIdRows=function(s){const t=[],o=s.agentId.trim();o&&t.push({key:"paseo",label:"Paseo session",value:o});const u=s.persistence?.sessionId?.trim()||s.runtimeInfo?.sessionId?.trim()||"";u&&t.push({key:"provider",label:n(s.persistence?.provider??s.runtimeInfo?.provider),value:u});return t};var s=r(d[0]);function n(n){const t=n?.trim();if(!t)return"Provider session";const o=s.AGENT_PROVIDER_DEFINITIONS.find(s=>s.id===t);return`${o?.label??t} session`}},4022,[3367]);
15782
15782
  __d(function(g,r,i,a,m,_e,d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),_e.ContextWindowMeter=function(l){const k=(0,o.c)(86),{maxTokens:v,usedTokens:_,totalCostUsd:j,showPercentage:w,serverId:z,provider:W,pending:T}=l,C=void 0!==w&&w,M=void 0!==T&&T,{theme:D}=(0,f.useUnistyles)(),{t:I}=(0,h.useTranslation)(),[H,O]=(0,s.useState)(!1);let U;k[0]!==H?(U={enabled:H},k[0]=H,k[1]=U):U=k[1];const{view:N,refresh:V}=(0,y.useProviderUsage)(z??null,U);let A,B,E,q,G,J,K,Q,X,Y,Z,ee,te,ne,ie,oe,re,se,le,ce,de,ae;if(k[2]!==H||k[3]!==v||k[4]!==M||k[5]!==V||k[6]!==C||k[7]!==I||k[8]!==D||k[9]!==j||k[10]!==_){ee=Symbol.for("react.early_return_sentinel");e:{const o=null!==v&&null!==_?P(v,_):null;let s;k[29]!==V?(s=e=>{O(e),e&&V()},k[29]=V,k[30]=s):s=k[30];const l=s;let f;k[31]!==C?(f=R(C),k[31]=C,k[32]=f):f=k[32];const h=f;if(null===o||null===v||null===_){if(!M){ee=null;break e}const t=`0 0 ${h.svgSize} ${h.svgSize}`;let n,o,s,l;k[33]!==h.center||k[34]!==h.radius||k[35]!==h.strokeWidth||k[36]!==D.colors.surface3?(n=(0,S.jsx)(c.Circle,{cx:h.center,cy:h.center,r:h.radius,fill:"none",stroke:D.colors.surface3,strokeWidth:h.strokeWidth}),k[33]=h.center,k[34]=h.radius,k[35]=h.strokeWidth,k[36]=D.colors.surface3,k[37]=n):n=k[37],k[38]!==h.svgSize||k[39]!==t||k[40]!==n?(o=(0,S.jsx)(u.default,{width:h.svgSize,height:h.svgSize,viewBox:t,style:F.svg,accessibilityElementsHidden:!0,importantForAccessibility:"no-hide-descendants",children:n}),k[38]=h.svgSize,k[39]=t,k[40]=n,k[41]=o):o=k[41],k[42]!==C?(s=C?(0,S.jsx)(e.View,{style:F.skeletonLabel}):null,k[42]=C,k[43]=s):s=k[43],k[44]!==h.containerStyle||k[45]!==o||k[46]!==s?(l=(0,S.jsxs)(e.View,{style:h.containerStyle,children:[o,s]}),k[44]=h.containerStyle,k[45]=o,k[46]=s,k[47]=l):l=k[47],ee=l;break e}const x=(ue=o,Math.max(0,Math.min(100,ue))),y=Math.round(o),{svgSize:w,center:z,radius:W,strokeWidth:T,circumference:U,containerStyle:N}=h,le=U-x/100*U,ce=L(x,D),de="number"==typeof j?$(j):null;let ae;E=p.Tooltip,J=H,K=l,Q=0,X=!0,Y=!0,Z=(0,S.jsx)(p.TooltipTrigger,{asChild:!0,triggerRefProp:"ref",children:(0,S.jsxs)(n.Pressable,{style:N,testID:"context-window-meter",accessibilityRole:"image",accessibilityLabel:I("contextWindow.accessibility",{percentage:y}),children:[(0,S.jsxs)(u.default,{width:w,height:w,viewBox:`0 0 ${w} ${w}`,style:F.svg,accessibilityElementsHidden:!0,importantForAccessibility:"no-hide-descendants",children:[(0,S.jsx)(c.Circle,{cx:z,cy:z,r:W,fill:"none",stroke:ce.track,strokeWidth:T}),(0,S.jsx)(c.Circle,{cx:z,cy:z,r:W,fill:"none",stroke:ce.progress,strokeWidth:T,strokeLinecap:"round",strokeDasharray:U,strokeDashoffset:le})]}),C?(0,S.jsx)(t.Text,{style:F.percentageLabel,children:`${y}%`}):null]})}),B=p.TooltipContent,se="top",q="center",G=8,A=e.View,te=F.tooltipContent,k[48]!==I?(ae=I("contextWindow.title"),k[48]=I,k[49]=ae):ae=k[49],k[50]!==ae?(ne=(0,S.jsx)(t.Text,{style:F.tooltipTitle,children:ae}),k[50]=ae,k[51]=ne):ne=k[51];const fe=I("contextWindow.used",{percentage:y});let he;k[52]!==fe?(ie=(0,S.jsx)(t.Text,{style:F.tooltipText,children:fe}),k[52]=fe,k[53]=ie):ie=k[53],k[54]!==v||k[55]!==I||k[56]!==_?(he=I("contextWindow.tokens",{used:(0,b.formatTokenCount)(_),max:(0,b.formatTokenCount)(v)}),k[54]=v,k[55]=I,k[56]=_,k[57]=he):he=k[57],k[58]!==he?(oe=(0,S.jsx)(t.Text,{style:F.tooltipDetail,children:he}),k[58]=he,k[59]=oe):oe=k[59],re=de?(0,S.jsx)(t.Text,{style:F.tooltipDetail,children:I("contextWindow.sessionCost",{cost:de})}):null}k[2]=H,k[3]=v,k[4]=M,k[5]=V,k[6]=C,k[7]=I,k[8]=D,k[9]=j,k[10]=_,k[11]=A,k[12]=B,k[13]=E,k[14]=q,k[15]=G,k[16]=J,k[17]=K,k[18]=Q,k[19]=X,k[20]=Y,k[21]=Z,k[22]=ee,k[23]=te,k[24]=ne,k[25]=ie,k[26]=oe,k[27]=re,k[28]=se}else A=k[11],B=k[12],E=k[13],q=k[14],G=k[15],J=k[16],K=k[17],Q=k[18],X=k[19],Y=k[20],Z=k[21],ee=k[22],te=k[23],ne=k[24],ie=k[25],oe=k[26],re=k[27],se=k[28];var ue;if(ee!==Symbol.for("react.early_return_sentinel"))return ee;k[60]!==W||k[61]!==N?(le=(0,S.jsx)(x.ProviderUsageTooltipSection,{view:N,activeProviderId:W}),k[60]=W,k[61]=N,k[62]=le):le=k[62];k[63]!==A||k[64]!==le||k[65]!==te||k[66]!==ne||k[67]!==ie||k[68]!==oe||k[69]!==re?(ce=(0,S.jsxs)(A,{style:te,children:[ne,ie,oe,re,le]}),k[63]=A,k[64]=le,k[65]=te,k[66]=ne,k[67]=ie,k[68]=oe,k[69]=re,k[70]=ce):ce=k[70];k[71]!==B||k[72]!==q||k[73]!==G||k[74]!==ce||k[75]!==se?(de=(0,S.jsx)(B,{side:se,align:q,offset:G,children:ce}),k[71]=B,k[72]=q,k[73]=G,k[74]=ce,k[75]=se,k[76]=de):de=k[76];k[77]!==E||k[78]!==J||k[79]!==K||k[80]!==Q||k[81]!==X||k[82]!==Y||k[83]!==Z||k[84]!==de?(ae=(0,S.jsxs)(E,{open:J,onOpenChange:K,delayDuration:Q,enabledOnDesktop:X,enabledOnMobile:Y,children:[Z,de]}),k[77]=E,k[78]=J,k[79]=K,k[80]=Q,k[81]=X,k[82]=Y,k[83]=Z,k[84]=de,k[85]=ae):ae=k[85];return ae};var e=r(d[0]),t=r(d[1]),n=r(d[2]),o=r(d[3]),s=r(d[4]);r(d[5]),r(d[6]),r(d[7]);var l,c=r(d[8]),u=(l=c)&&l.__esModule?l:{default:l},f=r(d[9]),h=r(d[10]),p=r(d[11]),x=r(d[12]),y=r(d[13]),b=r(d[14]),S=r(d[15]);const k=14,v=12,_=7,j=6,w=6,z=5,W=2,T=1.75,C=2*Math.PI*w,M=2*Math.PI*z;function D(e){return Number.isFinite(e)&&e>=0}function P(e,t){return n=e,Number.isFinite(n)&&n>0&&D(t)?t/e*100:null;var n}function $(e){return!Number.isFinite(e)||e<=0?null:e<.01?`$${e.toFixed(4)}`:`$${e.toFixed(2)}`}function L(e,t){const n=t.colors.surface3;return e>90?{progress:t.colors.destructive,track:n}:e>=70?{progress:t.colors.palette.amber[500],track:n}:{progress:t.colors.foregroundMuted,track:n}}function R(e){return e?{svgSize:v,center:j,radius:z,strokeWidth:T,circumference:M,containerStyle:F.containerWithLabel}:{svgSize:k,center:_,radius:w,strokeWidth:W,circumference:C,containerStyle:F.container}}const F=f.StyleSheet.create(e=>({container:{width:28,height:28,borderRadius:e.borderRadius.full,alignItems:"center",justifyContent:"center",uni__dependencies:[0]},containerWithLabel:{height:28,flexDirection:"row",alignItems:"center",justifyContent:"center",gap:e.spacing[1],borderRadius:e.borderRadius.full,uni__dependencies:[0]},svg:{transform:[{rotate:"-90deg"}]},percentageLabel:{color:e.colors.foregroundMuted,fontSize:e.fontSize.sm,fontWeight:e.fontWeight.normal,uni__dependencies:[0]},skeletonLabel:{width:22,height:e.fontSize.sm,borderRadius:e.borderRadius.full,backgroundColor:e.colors.surface3,uni__dependencies:[0]},tooltipContent:{gap:e.spacing[1.5],minWidth:200,uni__dependencies:[0]},tooltipTitle:{color:e.colors.foreground,fontSize:e.fontSize.sm,uni__dependencies:[0]},tooltipText:{color:e.colors.foreground,fontSize:e.fontSize.sm,lineHeight:1.4*e.fontSize.sm,uni__dependencies:[0]},tooltipDetail:{color:e.colors.foregroundMuted,fontSize:e.fontSize.xs,lineHeight:1.4*e.fontSize.xs,uni__dependencies:[0]}}))},4023,[348,349,2476,350,36,546,234,146,815,56,352,3588,4024,4032,4028,279]);
@@ -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 v}});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]),b=r(d[9]);function v(){const v=(0,t.c)(17),{serverId:k}=(0,s.useLocalSearchParams)(),A=(0,s.useRouter)();let _;v[0]!==k?(_=t=>t.sessions[k??""]?.agents,v[0]=k,v[1]=_):_=v[1];const y=(0,c.useSessionStore)(_);let R;e:{if(!y){let t;v[2]===Symbol.for("react.memo_cache_sentinel")?(t=[],v[2]=t):t=v[2],R=t;break e}let t;if(v[3]!==y||v[4]!==k){let s;v[6]!==k?(s=t=>({id:t.id,serverId:k??"",title:t.title??t.id,statusBucket:(0,f.deriveSidebarStateBucket)((0,f.toBucketInput)(t)),tags:Object.entries(t.labels??{}).filter(p).map(S),digest:t.digest??null,kanban:t.labels?.kanban??null,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}),v[6]=k,v[7]=s):s=v[7],t=(0,l.selectFeedCandidates)([...y.values()]).map(s),v[3]=y,v[4]=k,v[5]=t}else t=v[5];R=t}const j=R;let z;if(v[8]!==j){const t=new Set;for(const s of j)for(const n of s.tags)t.add(n);z=[...t].sort(),v[8]=j,v[9]=z}else z=v[9];const O=z;let h;v[10]!==A||v[11]!==k?(h=()=>{A.replace((0,n.buildHostRootRoute)(k??""))},v[10]=A,v[11]=k,v[12]=h):h=v[12];const B=h;let I;return v[13]!==O||v[14]!==B||v[15]!==j?(I=(0,b.jsx)(o.ReelsScreen,{sessions:j,allTags:O,onLeaveRing:B}),v[13]=O,v[14]=B,v[15]=j,v[16]=I):I=v[16],I}function S(t){const[s]=t;return s.slice(4)}function p(t){const[s]=t;return s.startsWith("tag:")}},4567,[350,36,379,3492,4568,4576,3427,3621,3441,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=$,_e.destructiveHint=E,_e.verbAccessibilityLabel=H,Object.defineProperty(_e,"UNWIRED_VERBS",{enumerable:!0,get:function(){return B}}),_e.bucketLabel=G,_e.relativeAge=K,_e.cardMetaLine=q,_e.emptyRingState=ae,_e.relativeWake=ce,_e.backgroundTextFor=de,Object.defineProperty(_e,"ReelsScreen",{enumerable:!0,get:function(){return be}}),_e.shareTextFor=ye;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]);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]),x=r(_d[21]),y=r(_d[22]),f=r(_d[23]),j=r(_d[24]),S=r(_d[25]),v=r(_d[26]),k=r(_d[27]),w=r(_d[28]),_=r(_d[29]),T=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]),P=r(_d[37]),L=r(_d[38]),A=r(_d[39]);function O(e){return e>8}function $(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.`:B.has(e)?`${t}. Not wired yet.`:t}const M={automate:"automate",share:"share",snooze:"snooze",options:"kanban",consolidate:"consolidate"},W={share:null,automate:null,snooze:null,kanban:null,tag:null,consolidate:null},B=new Set([]);function F(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 ")}const U=(0,d.memo)(function(e){const a=(0,c.c)(92),{session:u,visible:x,onClose:y,onSend:f,sendError:j,openDecisions:S,target:v,actAllowed:k}=e,[w,_]=(0,d.useState)(""),T=v?.question??null,C=u.digest;let I;a[0]!==f||a[1]!==w?(I=()=>{const e=w.trim();e.length>0&&(f(e),_(""))},a[0]=f,a[1]=w,a[2]=I):I=a[2];const D=I,V=(0,p.useSafeAreaInsets)(),z=pe.captionSheet,[R,P]=(0,d.useState)(!1);let L,O;a[3]===Symbol.for("react.memo_cache_sentinel")?(L=()=>{const e=h.default.addListener("keyboardDidShow",()=>P(!0)),t=h.default.addListener("keyboardDidHide",()=>P(!1));return()=>{e.remove(),t.remove()}},O=[],a[3]=L,a[4]=O):(L=a[3],O=a[4]),(0,d.useEffect)(L,O);const E=R&&!1?0:V.bottom;let H;a[5]!==E?(H=[pe.sheetInner,{paddingBottom:E}],a[5]=E,a[6]=H):H=a[6];const M=H;let W;a[7]!==y?(W=b.default.create({onMoveShouldSetPanResponder:Pe,onPanResponderRelease:(e,t)=>{$(t.dy)&&y()}}),a[7]=y,a[8]=W):W=a[8];const B=W;let F,N,G,K,q;a[9]!==y||a[10]!==x?(F=()=>{if(!x||"undefined"==typeof document)return;const e=e=>{"Escape"===e.key&&y()};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)},N=[y,x],a[9]=y,a[10]=x,a[11]=F,a[12]=N):(F=a[11],N=a[12]),(0,d.useEffect)(F,N),a[13]!==k?(G=k?null:(0,A.jsx)(s.Text,{style:pe.composerLabel,testID:"reels-composer-capped",children:"Decisions are done for today. This one keeps until tomorrow."}),a[13]=k,a[14]=G):G=a[14],a[15]!==k||a[16]!==T||a[17]!==S.length||a[18]!==D||a[19]!==w?(K=k?(0,A.jsxs)(A.Fragment,{children:[T?(0,A.jsx)(s.Text,{style:pe.composerLabel,numberOfLines:2,testID:"reels-composer-target",children:S.length>1?`Answering the first of ${S.length} open decisions: ${T}`:`Answering: ${T}`}):null,(0,A.jsxs)(t.View,{style:pe.composer,children:[(0,A.jsx)(n.TextInput,{value:w,onChangeText:_,placeholder:T?"in your own words":"say what to do",style:pe.composerInput,onSubmitEditing:D,returnKeyType:"send",testID:"reels-composer-input"}),(0,A.jsx)(l.Pressable,{onPress:D,style:pe.composerSend,accessibilityRole:"button",accessibilityLabel:"Send this answer",hitSlop:8,testID:"reels-composer-send",children:(0,A.jsx)(s.Text,{style:pe.link,children:"send"})})]})]}):null,a[15]=k,a[16]=T,a[17]=S.length,a[18]=D,a[19]=w,a[20]=K):K=a[20],a[21]!==K||a[22]!==G?(q=(0,A.jsxs)(t.View,{children:[G,K]}),a[21]=K,a[22]=G,a[23]=q):q=a[23];const U=q;if(!x)return null;let J,Q,Z,ee,te,ne,se;a[24]!==y?(J=(0,A.jsx)(l.Pressable,{style:pe.captionBackdrop,onPress:y,accessibilityRole:"button",accessibilityLabel:"Close the digest",testID:"reels-caption-backdrop"}),a[24]=y,a[25]=J):J=a[25],a[26]===Symbol.for("react.memo_cache_sentinel")?(Q=(0,A.jsx)(t.View,{style:pe.sheetHandle}),a[26]=Q):Q=a[26],a[27]!==B.panHandlers?(Z=(0,A.jsx)(t.View,Object.assign({},B.panHandlers,{style:pe.sheetGrab,testID:"reels-caption-grab",children:Q})),a[27]=B.panHandlers,a[28]=Z):Z=a[28],a[29]===Symbol.for("react.memo_cache_sentinel")?(ee=(0,A.jsx)(Y,{}),a[29]=ee):ee=a[29],a[30]!==y?(te=(0,A.jsx)(l.Pressable,{onPress:y,style:pe.sheetClose,hitSlop:8,accessibilityRole:"button",accessibilityLabel:"Close the digest",testID:"reels-caption-close",children:ee}),a[30]=y,a[31]=te):te=a[31],a[32]!==u.title?(ne=(0,A.jsx)(s.Text,{style:je,numberOfLines:1,children:u.title}),a[32]=u.title,a[33]=ne):ne=a[33],a[34]!==te||a[35]!==ne?(se=(0,A.jsxs)(t.View,{style:pe.sheetHead,children:[te,ne]}),a[34]=te,a[35]=ne,a[36]=se):se=a[36];const oe=C?.summary;let le;a[37]!==oe?(le=(0,A.jsx)(X,{label:"Summary",value:oe,derived:!0}),a[37]=oe,a[38]=le):le=a[38];const ie=C?.goal;let re;a[39]!==ie?(re=(0,A.jsx)(X,{label:"Goal",value:ie}),a[39]=ie,a[40]=re):re=a[40];const ae=C?.nextStep;let ce,de,ue,he,ge,be,me,xe,ye,fe,Se,ve;if(a[41]!==ae?(ce=(0,A.jsx)(X,{label:"Next step",value:ae}),a[41]=ae,a[42]=ce):ce=a[42],a[43]!==C?.blockers?(de=C?.blockers?.join("\n"),a[43]=C?.blockers,a[44]=de):de=a[44],a[45]!==de?(ue=(0,A.jsx)(X,{label:"Blockers",value:de,danger:!0}),a[45]=de,a[46]=ue):ue=a[46],a[47]!==C?.accomplishments?(he=C?.accomplishments?.join("\n"),a[47]=C?.accomplishments,a[48]=he):he=a[48],a[49]!==he?(ge=(0,A.jsx)(X,{label:"Accomplishments",value:he,derived:!0}),a[49]=he,a[50]=ge):ge=a[50],a[51]!==C?.keyFiles?(be=C?.keyFiles?.join("\n"),a[51]=C?.keyFiles,a[52]=be):be=a[52],a[53]!==be?(me=(0,A.jsx)(X,{label:"Key files",value:be,derived:!0}),a[53]=be,a[54]=me):me=a[54],a[55]!==C?.links?(xe=C?.links?.map(Le).join("\n"),a[55]=C?.links,a[56]=xe):xe=a[56],a[57]!==xe?(ye=(0,A.jsx)(X,{label:"Links",value:xe}),a[57]=xe,a[58]=ye):ye=a[58],a[59]!==S){let e;a[61]!==S.length?(e=(e,t)=>(0,A.jsx)(X,{label:S.length>1?`Decision ${t+1} of ${S.length}`:"Decision",value:e.question},e.id),a[61]=S.length,a[62]=e):e=a[62],fe=S.map(e),a[59]=S,a[60]=fe}else fe=a[60];a[63]!==u.tags?(Se=u.tags.join(", ")||"no tag",a[63]=u.tags,a[64]=Se):Se=a[64],a[65]!==Se?(ve=(0,A.jsx)(X,{label:"Tags",value:Se}),a[65]=Se,a[66]=ve):ve=a[66];const ke=u.kanban??"inbox";let we,Te,Ce,Ie,De;return a[67]!==ke?(we=(0,A.jsx)(X,{label:"Kanban",value:ke}),a[67]=ke,a[68]=we):we=a[68],a[69]!==le||a[70]!==re||a[71]!==ce||a[72]!==ue||a[73]!==ge||a[74]!==me||a[75]!==ye||a[76]!==fe||a[77]!==ve||a[78]!==we?(Te=(0,A.jsxs)(o.ScrollView,{style:pe.sheetBody,testID:"reels-caption-body",children:[le,re,ce,ue,ge,me,ye,fe,ve,we]}),a[69]=le,a[70]=re,a[71]=ce,a[72]=ue,a[73]=ge,a[74]=me,a[75]=ye,a[76]=fe,a[77]=ve,a[78]=we,a[79]=Te):Te=a[79],a[80]!==j?(Ce=j?(0,A.jsxs)(s.Text,{style:pe.sendError,testID:"reels-composer-error",children:["Could not send that: ",j,". Nothing was recorded, so try again."]}):null,a[80]=j,a[81]=Ce):Ce=a[81],a[82]!==U||a[83]!==M||a[84]!==Z||a[85]!==se||a[86]!==Te||a[87]!==Ce?(Ie=(0,A.jsx)(i.KeyboardAvoidingView,{behavior:"height",style:z,testID:"reels-caption-sheet",children:(0,A.jsxs)(t.View,{style:M,children:[Z,se,Te,Ce,U]})}),a[82]=U,a[83]=M,a[84]=Z,a[85]=se,a[86]=Te,a[87]=Ce,a[88]=Ie):Ie=a[88],a[89]!==J||a[90]!==Ie?(De=(0,A.jsxs)(A.Fragment,{children:[J,Ie]}),a[89]=J,a[90]=Ie,a[91]=De):De=a[91],De}),Y=(0,d.memo)(function(){const e=(0,c.c)(2),{theme:t}=(0,x.useUnistyles)();let n;return e[0]!==t.colors.foregroundMuted?(n=(0,A.jsx)(y.X,{size:18,color:t.colors.foregroundMuted}),e[0]=t.colors.foregroundMuted,e[1]=n):n=e[1],n}),X=(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,A.jsxs)(s.Text,{style:pe.fieldLabel,children:[o,d]}),n[0]=o,n[1]=d,n[2]=u):u=n[2];const h=a?fe:pe.fieldValue;let b,p;return n[3]!==h||n[4]!==l?(b=(0,A.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,A.jsxs)(t.View,{style:pe.field,children:[u,b]}),n[6]=u,n[7]=b,n[8]=p):p=n[8],p}),J=(0,d.memo)(function(e){const n=(0,c.c)(25),{session:o,picked:i,isWinner:a,now:d,onToggle:u,onCrown:h}=e,{theme:b}=(0,x.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 f=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=y.Square;i&&(v=a?y.Crown:y.SquareCheck);const k=i?Se:pe.pickRow,w=`reels-consolidate-pick-${o.id}`;let _,T,C;n[6]!==v||n[7]!==b.colors.accent?(_=(0,A.jsx)(t.View,{style:pe.pickMark,children:(0,A.jsx)(v,{size:16,color:b.colors.accent})}),n[6]=v,n[7]=b.colors.accent,n[8]=_):_=n[8],n[9]!==o.title?(T=(0,A.jsx)(s.Text,{style:pe.pickName,children:o.title}),n[9]=o.title,n[10]=T):T=n[10],n[11]!==d||n[12]!==o.lastActivityAt?(C=K(o.lastActivityAt,d),n[11]=d,n[12]=o.lastActivityAt,n[13]=C):C=n[13];const I=a&&i?" \xb7 survives":"";let D,V;return n[14]!==C||n[15]!==I?(D=(0,A.jsxs)(s.Text,{style:pe.pickAux,children:[C,I]}),n[14]=C,n[15]=I,n[16]=D):D=n[16],n[17]!==S||n[18]!==k||n[19]!==w||n[20]!==_||n[21]!==T||n[22]!==D||n[23]!==f?(V=(0,A.jsxs)(l.Pressable,{onPress:f,onLongPress:S,style:k,testID:w,children:[_,T,D]}),n[17]=S,n[18]=k,n[19]=w,n[20]=_,n[21]=T,n[22]=D,n[23]=f,n[24]=V):V=n[24],V}),Q=(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[x,y]=(0,d.useState)(p);let f;if(n[1]!==i||n[2]!==x){let e;n[4]!==x?(e=e=>x[e.id],n[4]=x,n[5]=e):e=n[5],f=i.filter(e),n[1]=i,n[2]=x,n[3]=f}else f=n[3];const j=f,[S,v]=(0,d.useState)(null);let k;n[6]!==j||n[7]!==S?(k=(0,L.consolidationTargets)(j,S),n[6]=j,n[7]=S,n[8]=k):k=n[8];const{winner:w,sourceIds:_}=k;let T;n[9]===Symbol.for("react.memo_cache_sentinel")?(T=e=>{y(t=>{const n=Object.assign({},t);return n[e]?delete n[e]:n[e]=!0,n})},n[9]=T):T=n[9];const C=T;let D;n[10]===Symbol.for("react.memo_cache_sentinel")?(D=e=>{v(e),y(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,L.canConsolidate)(j,w),n[11]=j,n[12]=w,n[13]=z):z=n[13];const R=z;let P;n[14]!==j||n[15]!==h||n[16]!==_||n[17]!==w?(P=()=>{w&&j.length>=2&&h(w,_)},n[14]=j,n[15]=h,n[16]=_,n[17]=w,n[18]=P):P=n[18];const O=(0,I.useDestructiveHold)(P,"consolidate");let $;n[19]!==O.progress?($=Math.round(100*O.progress),n[19]=O.progress,n[20]=$):$=n[20];const H=`${$}%`;let M;n[21]!==H?(M=[pe.verbFill,{width:H}],n[21]=H,n[22]=M):M=n[22];const W=M;let B,F,N,G,K,q,U,Y;if(n[23]===Symbol.for("react.memo_cache_sentinel")?(B=(0,A.jsx)(s.Text,{style:pe.sheetTitle,children:"Consolidate"}),F=(0,A.jsx)(s.Text,{style:pe.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,A.jsx)(s.Text,{style:pe.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]!==x||n[30]!==w){let e;n[32]!==a||n[33]!==x||n[34]!==w?(e=e=>(0,A.jsx)(J,{session:e,picked:Boolean(x[e.id]),isWinner:w===e.id,now:a,onToggle:C,onCrown:V},e.id),n[32]=a,n[33]=x,n[34]=w,n[35]=e):e=n[35],G=i.map(e),n[27]=i,n[28]=a,n[29]=x,n[30]=w,n[31]=G}else G=n[31];n[36]!==G?(K=(0,A.jsx)(o.ScrollView,{style:pe.pickList,children:G}),n[36]=G,n[37]=K):K=n[37],n[38]===Symbol.for("react.memo_cache_sentinel")?(q=(0,A.jsx)(s.Text,{style:pe.link,children:"cancel"}),n[38]=q):q=n[38],n[39]!==u?(U=(0,A.jsx)(l.Pressable,{onPress:u,style:pe.send,testID:"reels-consolidate-cancel",children:q}),n[39]=u,n[40]=U):U=n[40],n[41]!==R||n[42]!==O.handlers?(Y=R?O.handlers:{},n[41]=R,n[42]=O.handlers,n[43]=Y):Y=n[43];const X=!R,Q=R?pe.send:Ie,Z=`Consolidate ${_.length} sessions into the survivor. Hold to confirm.`;let ee;n[44]!==W||n[45]!==O.progress?(ee=O.progress>0?(0,A.jsx)(t.View,{style:W,testID:"reels-consolidate-hold-fill"}):null,n[44]=W,n[45]=O.progress,n[46]=ee):ee=n[46];const te=`hold to consolidate ${_.length}`;let ne,se,oe,le,ie;return n[47]!==O.hint||n[48]!==O.showLabel||n[49]!==te?(ne=E(O.showLabel,O.hint,te),n[47]=O.hint,n[48]=O.showLabel,n[49]=te,n[50]=ne):ne=n[50],n[51]!==ne?(se=(0,A.jsx)(s.Text,{style:pe.link,children:ne}),n[51]=ne,n[52]=se):se=n[52],n[53]!==Y||n[54]!==X||n[55]!==Q||n[56]!==Z||n[57]!==ee||n[58]!==se?(oe=(0,A.jsxs)(l.Pressable,Object.assign({},Y,{disabled:X,style:Q,accessibilityRole:"button",accessibilityLabel:Z,testID:"reels-consolidate-commit",children:[ee,se]})),n[53]=Y,n[54]=X,n[55]=Q,n[56]=Z,n[57]=ee,n[58]=se,n[59]=oe):oe=n[59],n[60]!==U||n[61]!==oe?(le=(0,A.jsxs)(t.View,{style:pe.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,A.jsxs)(t.View,{style:pe.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}),Z=(0,d.memo)(function(e){const n=(0,c.c)(44),{verb:o,icon:i,label:a,onVerb:d}=e,{theme:u}=(0,x.useUnistyles)(),h="terminate"===o,{showLabel:b,progress:p,hint:y,handlers:f}=(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=[pe.verbFill,{width:k}],n[5]=k,n[6]=w):w=n[6];const _=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,A.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,A.jsx)(s.Text,{style:pe.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,A.jsxs)(l.Pressable,{onPress:S,style:pe.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 T;n[21]!==a||n[22]!==o?(T=H(o,a),n[21]=a,n[22]=o,n[23]=T):T=n[23];const C=`reels-verb-${o}`;let D,V;n[24]!==_||n[25]!==p?(D=p>0?(0,A.jsx)(t.View,{style:_,testID:"reels-verb-hold-fill"}):null,n[24]=_,n[25]=p,n[26]=D):D=n[26],n[27]!==i||n[28]!==u.colors.destructive?(V=(0,A.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||y?ve:pe.verbWord;let R,P,L;return n[30]!==a||n[31]!==z?(R=(0,A.jsx)(s.Text,{style:z,children:a}),n[30]=a,n[31]=z,n[32]=R):R=n[32],n[33]!==y||n[34]!==b?(P=b||y?(0,A.jsx)(s.Text,{style:pe.verbHoldLabel,testID:"reels-verb-terminate-hold",children:E(b,y,"hold to retire")}):null,n[33]=y,n[34]=b,n[35]=P):P=n[35],n[36]!==f||n[37]!==R||n[38]!==P||n[39]!==T||n[40]!==C||n[41]!==D||n[42]!==V?(L=(0,A.jsxs)(l.Pressable,Object.assign({},f,{style:pe.verbChip,accessibilityRole:"button",accessibilityLabel:T,hitSlop:8,testID:C,children:[D,V,R,P]})),n[36]=f,n[37]=R,n[38]=P,n[39]=T,n[40]=C,n[41]=D,n[42]=V,n[43]=L):L=n[43],L}),ee=(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,A.jsx)(s.Text,{style:pe.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,A.jsx)(l.Pressable,{onPress:d,style:pe.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}),te=Object.keys(N).sort((e,t)=>(0,j.getWorkspaceStateBucketPriority)(e)-(0,j.getWorkspaceStateBucketPriority)(t)),ne={today:"Today","3d":"3 days","7d":"7 days","30d":"30 days",stale:"Stale"},se={root:"Top-level",delegated:"Subagent"},oe=S.SESSION_ORIGINS.map(e=>({origin:e,label:se[e]})),le=(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=ke[i],b="include"===i;let p;t[3]!==b?(p=Ce(b),t[3]=b,t[4]=p):p=t[4];const x="neutral"===i?o:`${o}, ${"include"===i?"only":"excluded"}`,y=`reels-filter-${n}`,f="exclude"===i?"-":"";let j,S;return t[5]!==o||t[6]!==f?(j=(0,A.jsxs)(s.Text,{style:pe.tagChipText,children:[f,o]}),t[5]=o,t[6]=f,t[7]=j):j=t[7],t[8]!==u||t[9]!==h||t[10]!==p||t[11]!==x||t[12]!==y||t[13]!==j?(S=(0,A.jsx)(l.Pressable,{onPress:u,style:h,accessibilityRole:"button",accessibilityState:p,accessibilityLabel:x,testID:y,children:j}),t[8]=u,t[9]=h,t[10]=p,t[11]=x,t[12]=y,t[13]=j,t[14]=S):S=t[14],S}),ie=(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,A.jsx)(s.Text,{style:pe.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,A.jsx)(l.Pressable,{onPress:d,style:pe.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}),re=(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,x.useUnistyles)(),b="terminate"===o,{showLabel:p,progress:y,hint:f,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]!==y?(k=Math.round(100*y),n[3]=y,n[4]=k):k=n[4];const w=`${k}%`;let _;n[5]!==w?(_=[pe.verbFill,{width:w}],n[5]=w,n[6]=_):_=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]!==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]!==y||n[16]!==T?(R=b&&y>0?(0,A.jsx)(t.View,{style:T,testID:"reels-taco-hold-fill"}):null,n[14]=b,n[15]=y,n[16]=T,n[17]=R):R=n[17];const P=b?h.colors.destructive:h.colors.foreground;let L,O,$,M,W,F,N;return n[18]!==i||n[19]!==P?(L=(0,A.jsx)(t.View,{style:pe.pickMark,children:(0,A.jsx)(i,{size:16,color:P})}),n[18]=i,n[19]=P,n[20]=L):L=n[20],n[21]!==a?(O=(0,A.jsx)(s.Text,{style:pe.pickName,children:a}),n[21]=a,n[22]=O):O=n[22],n[23]!==b||n[24]!==d||n[25]!==f||n[26]!==p?($=b?E(p,f,d):d,n[23]=b,n[24]=d,n[25]=f,n[26]=p,n[27]=$):$=n[27],n[28]!==$?(M=(0,A.jsx)(s.Text,{style:pe.hint,children:$}),n[28]=$,n[29]=M):M=n[29],n[30]!==o?(W=B.has(o)?(0,A.jsx)(s.Text,{style:pe.pickAux,children:"not wired yet"}):null,n[30]=o,n[31]=W):W=n[31],n[32]!==O||n[33]!==M||n[34]!==W?(F=(0,A.jsxs)(t.View,{style:pe.grow,children:[O,M,W]}),n[32]=O,n[33]=M,n[34]=W,n[35]=F):F=n[35],n[36]!==D||n[37]!==L||n[38]!==F||n[39]!==V||n[40]!==z||n[41]!==R?(N=(0,A.jsxs)(l.Pressable,Object.assign({},D,{style:pe.pickRow,accessibilityRole:"button",accessibilityLabel:V,testID:z,children:[R,L,F]})),n[36]=D,n[37]=L,n[38]=F,n[39]=V,n[40]=z,n[41]=R,n[42]=N):N=n[42],N});function ae(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 ${ce(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 ce(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 de(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 ue=(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,A.jsx)(t.View,{style:"text"===e?De:pe.background,testID:`reels-background-${e}`,children:"text"===e?(0,A.jsx)(a.Animated.View,{style:c,children:(0,A.jsx)(s.Text,{style:pe.backgroundBody,numberOfLines:40,children:n})}):null})}),he=(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:x,capLabel:y,tagError:f}=e;if(o){let e,o,a;return n[0]!==l||n[1]!==i?(e=(0,A.jsx)(_.TagGate,{available:l,onPick:i}),n[0]=l,n[1]=i,n[2]=e):e=n[2],n[3]!==f?(o=f?(0,A.jsx)(s.Text,{style:pe.sendError,testID:"reels-verb-error",children:f}):null,n[3]=f,n[4]=o):o=n[4],n[5]!==e||n[6]!==o?(a=(0,A.jsxs)(t.View,{children:[e,o]}),n[5]=e,n[6]=o,n[7]=a):a=n[7],a}if(a){if(!x){let e,o,l,i,a;return n[8]!==y?(e=(0,A.jsx)(s.Text,{style:pe.hint,children:y}),n[8]=y,n[9]=e):e=n[9],n[10]===Symbol.for("react.memo_cache_sentinel")?(o=(0,A.jsx)(s.Text,{style:pe.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,A.jsx)(Z,{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,A.jsx)(t.View,{style:pe.rowGap,children:l}),n[13]=l,n[14]=i):i=n[14],n[15]!==e||n[16]!==i?(a=(0,A.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,A.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,A.jsx)(s.Text,{style:pe.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,A.jsx)(Z,{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,A.jsxs)(t.View,{testID:"reels-taco-row",children:[j,(0,A.jsx)(t.View,{style:pe.rowGap,children:S})]}),n[26]=S,n[27]=v):v=n[27],v}),ge=(0,d.memo)(function(e){const n=(0,c.c)(80),{overlay:i,session:a,ring:d,now:u,decisionTarget:h,onClose:b,onSend:p,onSnooze:x,onConsolidate:y,onKanban:j,onVerb:S,overlayStyle:w,sendError:T,actAllowed:C,verbError:I,openDecisions:D,onShare:V,onAutomate:z,allTags:R,allProviders:P,statusSelection:L,tagSelection:O,kanbanSelection:$,providerSelection:E,originSelection:H,timeSelection:M,onCycleStatus:W,onCycleTag:B,onCycleKanban:F,onCycleProvider:N,onCycleOrigin:K,onToggleTimeWindow:q}=e,Y=a;let X;n[0]!==q?(X=e=>q(e),n[0]=q,n[1]=X):X=n[1];const J=X,Z="caption"===i.kind;let se,ae,ce,de,ue,he,ge,be,xe;return n[2]!==C||n[3]!==Y||n[4]!==h||n[5]!==b||n[6]!==p||n[7]!==D||n[8]!==T||n[9]!==Z?(se=(0,A.jsx)(U,{session:Y,visible:Z,onClose:b,onSend:p,sendError:T,openDecisions:D,target:h,actAllowed:C},Y.id),n[2]=C,n[3]=Y,n[4]=h,n[5]=b,n[6]=p,n[7]=D,n[8]=T,n[9]=Z,n[10]=se):se=n[10],n[11]!==Y.snoozeCount||n[12]!==u||n[13]!==b||n[14]!==x||n[15]!==i.kind||n[16]!==w||n[17]!==I?(ae="snooze"===i.kind?(0,A.jsx)(t.View,{style:w,children:(0,A.jsxs)(t.View,{children:[(0,A.jsx)(_.SnoozeSheet,{priorCount:Y.snoozeCount,now:u,onCancel:b,onSnooze:x}),I?(0,A.jsx)(s.Text,{style:pe.sendError,testID:"reels-verb-error",children:I}):null]})}):null,n[11]=Y.snoozeCount,n[12]=u,n[13]=b,n[14]=x,n[15]=i.kind,n[16]=w,n[17]=I,n[18]=ae):ae=n[18],n[19]!==u||n[20]!==b||n[21]!==y||n[22]!==i.kind||n[23]!==w||n[24]!==d||n[25]!==I?(ce="consolidate"===i.kind?(0,A.jsx)(t.View,{style:w,children:(0,A.jsx)(Q,{candidates:d,now:u,onCancel:b,onConsolidate:y,verbError:I})}):null,n[19]=u,n[20]=b,n[21]=y,n[22]=i.kind,n[23]=w,n[24]=d,n[25]=I,n[26]=ce):ce=n[26],n[27]!==b||n[28]!==S||n[29]!==i.kind||n[30]!==w?(de="taco"===i.kind?(0,A.jsx)(t.View,{style:w,children:(0,A.jsxs)(t.View,{style:pe.sheet,testID:"reels-taco-sheet",children:[(0,A.jsx)(s.Text,{style:pe.sheetTitle,children:"TACO"}),_.TACO_VERBS.map(e=>(0,A.jsx)(re,{verb:e.id,icon:e.icon,label:e.label,detail:e.detail,onVerb:S},e.id)),(0,A.jsx)(l.Pressable,{onPress:b,style:pe.send,children:(0,A.jsx)(s.Text,{style:pe.link,children:"cancel"})})]})}):null,n[27]=b,n[28]=S,n[29]=i.kind,n[30]=w,n[31]=de):de=n[31],n[32]!==P||n[33]!==R||n[34]!==$||n[35]!==b||n[36]!==F||n[37]!==K||n[38]!==N||n[39]!==W||n[40]!==B||n[41]!==J||n[42]!==H||n[43]!==i.kind||n[44]!==w||n[45]!==E||n[46]!==L||n[47]!==O||n[48]!==M?(ue="filters"===i.kind?(0,A.jsx)(t.View,{style:w,children:(0,A.jsxs)(o.ScrollView,{style:pe.sheet,testID:"reels-filters-sheet",children:[(0,A.jsx)(s.Text,{style:pe.sheetTitle,children:"Filter the ring"}),(0,A.jsx)(s.Text,{style:pe.hint,children:"The same filter the sessions list uses, so setting it here sets it there."}),(0,A.jsx)(s.Text,{style:pe.fieldLabel,children:"State"}),(0,A.jsx)(t.View,{style:pe.rowGap,children:te.map(e=>(0,A.jsx)(le,{value:e,label:G(e),mode:(0,f.getFilterValueMode)(L,e),onCycle:W},e))}),(0,A.jsx)(s.Text,{style:pe.fieldLabel,children:"Kanban"}),(0,A.jsx)(t.View,{style:pe.rowGap,children:k.KANBAN_SEED_BUCKETS.map(e=>(0,A.jsx)(le,{value:e.id,label:e.label,mode:(0,f.getFilterValueMode)($,e.id),onCycle:F},e.id))}),(0,A.jsx)(s.Text,{style:pe.fieldLabel,children:"Tag"}),(0,A.jsx)(t.View,{style:pe.rowGap,children:R.map(e=>(0,A.jsx)(le,{value:e,label:e,mode:(0,f.getFilterValueMode)(O,e),onCycle:B},e))}),(0,A.jsx)(s.Text,{style:pe.fieldLabel,children:"Date"}),(0,A.jsx)(t.View,{style:pe.rowGap,children:v.SESSION_TIME_WINDOWS.map(e=>(0,A.jsx)(le,{value:e,label:ne[e],mode:"window"===M?.kind&&M.window===e?"include":"neutral",onCycle:J},e))}),(0,A.jsx)(s.Text,{style:pe.fieldLabel,children:"Provider"}),(0,A.jsx)(t.View,{style:pe.rowGap,children:P.map(e=>(0,A.jsx)(le,{value:e,label:e,mode:(0,f.getFilterValueMode)(E,e),onCycle:N},e))}),(0,A.jsx)(s.Text,{style:pe.fieldLabel,children:"Origin"}),(0,A.jsx)(t.View,{style:pe.rowGap,children:oe.map(e=>(0,A.jsx)(le,{value:e.origin,label:e.label,mode:(0,f.getFilterValueMode)(H,e.origin),onCycle:K},e.origin))}),(0,A.jsx)(l.Pressable,{onPress:b,style:pe.send,testID:"reels-filters-done",children:(0,A.jsx)(s.Text,{style:pe.link,children:"done"})})]})}):null,n[32]=P,n[33]=R,n[34]=$,n[35]=b,n[36]=F,n[37]=K,n[38]=N,n[39]=W,n[40]=B,n[41]=J,n[42]=H,n[43]=i.kind,n[44]=w,n[45]=E,n[46]=L,n[47]=O,n[48]=M,n[49]=ue):ue=n[49],n[50]!==z||n[51]!==b||n[52]!==i.kind||n[53]!==w||n[54]!==I?(he="automate"===i.kind?(0,A.jsx)(t.View,{style:w,children:(0,A.jsxs)(t.View,{style:pe.sheet,testID:"reels-automate-sheet",children:[(0,A.jsx)(s.Text,{style:pe.sheetTitle,children:"Automate"}),(0,A.jsx)(s.Text,{style:pe.hint,children:"Re-runs this session on a cadence, with its next step as the prompt."}),I?(0,A.jsx)(s.Text,{style:pe.sendError,testID:"reels-verb-error",children:I}):null,Re.map(e=>(0,A.jsx)(ee,{everyMs:e.everyMs,label:e.label,onPick:z},e.id)),(0,A.jsx)(l.Pressable,{onPress:b,style:pe.send,children:(0,A.jsx)(s.Text,{style:pe.link,children:"cancel"})})]})}):null,n[50]=z,n[51]=b,n[52]=i.kind,n[53]=w,n[54]=I,n[55]=he):he=n[55],n[56]!==b||n[57]!==V||n[58]!==i.kind||n[59]!==w||n[60]!==I?(ge="share"===i.kind?(0,A.jsx)(t.View,{style:w,children:(0,A.jsxs)(t.View,{style:pe.sheet,testID:"reels-share-sheet",children:[(0,A.jsx)(s.Text,{style:pe.sheetTitle,children:"Send"}),(0,A.jsx)(s.Text,{style:pe.hint,children:"Send this card somewhere a person will read it."}),I?(0,A.jsx)(s.Text,{style:pe.sendError,testID:"reels-verb-error",children:I}):null,me.map(e=>(0,A.jsx)(ie,{target:e.id,label:e.label,onShare:V},e.id)),(0,A.jsx)(l.Pressable,{onPress:b,style:pe.send,children:(0,A.jsx)(s.Text,{style:pe.link,children:"cancel"})})]})}):null,n[56]=b,n[57]=V,n[58]=i.kind,n[59]=w,n[60]=I,n[61]=ge):ge=n[61],n[62]!==Y.kanban||n[63]!==Y.model||n[64]!==Y.provider||n[65]!==b||n[66]!==j||n[67]!==i.kind||n[68]!==w||n[69]!==I?(be="options"===i.kind?(0,A.jsx)(t.View,{style:w,children:(0,A.jsxs)(o.ScrollView,{style:pe.sheet,testID:"reels-options-sheet",children:[(0,A.jsx)(s.Text,{style:pe.sheetTitle,children:"Session options"}),(0,A.jsx)(s.Text,{style:pe.fieldLabel,children:"Kanban"}),(0,A.jsx)(_.KanbanPicker,{current:Y.kanban,onPick:j}),I?(0,A.jsx)(s.Text,{style:pe.sendError,testID:"reels-verb-error",children:I}):null,(0,A.jsx)(s.Text,{style:pe.fieldLabel,children:"Provider and model"}),(0,A.jsx)(s.Text,{style:pe.fieldValue,children:Y.model?`${Y.provider}/${Y.model}`:Y.provider}),(0,A.jsx)(s.Text,{style:pe.hint,children:"One control in the app, not two: combined-model-selector with favourites."}),(0,A.jsx)(l.Pressable,{onPress:b,style:pe.send,children:(0,A.jsx)(s.Text,{style:pe.link,children:"close"})})]})}):null,n[62]=Y.kanban,n[63]=Y.model,n[64]=Y.provider,n[65]=b,n[66]=j,n[67]=i.kind,n[68]=w,n[69]=I,n[70]=be):be=n[70],n[71]!==be||n[72]!==se||n[73]!==ae||n[74]!==ce||n[75]!==de||n[76]!==ue||n[77]!==he||n[78]!==ge?(xe=(0,A.jsxs)(A.Fragment,{children:[se,ae,ce,de,ue,he,ge,be]}),n[71]=be,n[72]=se,n[73]=ae,n[74]=ce,n[75]=de,n[76]=ue,n[77]=he,n[78]=ge,n[79]=xe):xe=n[79],xe}),be=(0,d.memo)(function(e){const n=(0,c.c)(201),{sessions:o,allTags:i,actCap:a,background:u,now:h,onLeaveRing:b}=e,x=void 0===a?R.DEFAULT_ACT_CAP:a,f=void 0===u?"text":u,j=(0,D.useReelsVerbs)(),{answer:S}=(0,C.useAnswerDecision)(),[v,k]=(0,d.useState)(Ae);let w,I,L;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?(L=h??new Date(v),n[3]=h,n[4]=v,n[5]=L):L=n[5];const O=L,[$,E]=(0,d.useState)(1),H=(0,P.useActBudgetStore)(Oe);let B;n[6]!==O?(B=e=>(0,P.actsOn)(e,O),n[6]=O,n[7]=B):B=n[7];const N=(0,P.useActBudgetStore)(B);let G;n[8]!==O||n[9]!==H?(G=()=>H(O),n[8]=O,n[9]=H,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 be;n[14]===Symbol.for("react.memo_cache_sentinel")?(be=(e,t)=>{ce(n=>Object.assign({},n,{[e]:t}))},n[14]=be):be=n[14];const me=be,xe=(0,d.useRef)(null);let fe;n[15]!==se||n[16]!==$||n[17]!==ee||n[18]!==O||n[19]!==o?(fe={sessions:o,localTags:ee,actedLaps:se,laps:$,now:O},n[15]=se,n[16]=$,n[17]=ee,n[18]=O,n[19]=o,n[20]=fe):fe=n[20];const{feed:je,activeFilters:Se,statusSelection:ve,tagSelection:ke,kanbanSelection:we,providerSelection:Te,originSelection:Ce,timeSelection:Ie,onCycleStatus:De,onCycleTag:Re,onCycleKanban:Pe,onCycleProvider:Le,onCycleOrigin:Be,onToggleTimeWindow:Fe,onClearFilters:Ne}=(0,V.useReelsFeed)(fe);let Ge;n[21]!==o?(Ge=[...new Set(o.map($e))].sort(),n[21]=o,n[22]=Ge):Ge=n[22];const Ke=Ge,qe=je[Math.min(U,Math.max(je.length-1,0))]??null,Ue=qe?.session??null,Ye=qe?.lap??1;let Xe;n[23]!==Ye?(Xe=e=>e.lap===Ye,n[23]=Ye,n[24]=Xe):Xe=n[24];const Je=je.findIndex(Xe);let Qe;if(n[25]!==je||n[26]!==Ye){let e;n[28]!==Ye?(e=e=>e.lap===Ye,n[28]=Ye,n[29]=e):e=n[29],Qe=je.filter(e),n[25]=je,n[26]=Ye,n[27]=Qe}else Qe=n[27];const Ze=Qe.length;let et;if(n[30]!==je||n[31]!==Ye){let e;n[33]!==Ye?(e=e=>e.lap===Ye,n[33]=Ye,n[34]=e):e=n[34],et=je.filter(e).map(Ee),n[30]=je,n[31]=Ye,n[32]=et}else et=n[32];const tt=et,nt=Ue?.id??"",st=Ue?.serverId??"";let ot;var lt;n[35]!==Ue?(ot=Ue?(lt=Ue.digest,(lt?.pendingDecisions??[]).filter(e=>!e.answeredAt)):[],n[35]=Ue,n[36]=ot):ot=n[36];const it=ot,rt=it[0]??null;let at;n[37]!==it?(at=it.map(He),n[37]=it,n[38]=at):at=n[38];const ct=at,dt=it,ut=!!Ue&&0===Ue.tags.length;let ht;n[39]!==x||n[40]!==N?(ht=(0,R.canAct)({acts:N,cap:x}),n[39]=x,n[40]=N,n[41]=ht):ht=n[41];const gt=ht;let bt;n[42]!==x||n[43]!==N?(bt=(0,R.actCapLabel)({acts:N,cap:x}),n[42]=x,n[43]=N,n[44]=bt):bt=n[44];const pt=bt,mt=(0,p.useSafeAreaInsets)();let xt;n[45]!==mt.top?(xt=[pe.headerSlot,{paddingTop:mt.top}],n[45]=mt.top,n[46]=xt):xt=n[46];const yt=xt,ft=mt.top+56;let jt;n[47]!==ft?(jt=[pe.seamBanner,{paddingTop:ft}],n[47]=ft,n[48]=jt):jt=n[48];const St=jt;let vt;n[49]!==mt.bottom||n[50]!==mt.top?(vt=[pe.overlay,{paddingTop:mt.top,paddingBottom:mt.bottom}],n[49]=mt.bottom,n[50]=mt.top,n[51]=vt):vt=n[51];const kt=vt;let wt;n[52]!==U?(wt=()=>{Q({kind:"none"}),xe.current?.scrollToIndex(U+1)},n[52]=U,n[53]=wt):wt=n[53];const _t=wt;let Tt;n[54]!==Ye?(Tt=e=>{oe(t=>Object.assign({},t,{[e]:Ye}))},n[54]=Ye,n[55]=Tt):Tt=n[55];const Ct=Tt;let It;n[56]===Symbol.for("react.memo_cache_sentinel")?(It=()=>{E(Me)},n[56]=It):It=n[56];const Dt=It;let Vt,zt,Rt,Pt,Lt,At,Ot;n[57]===Symbol.for("react.memo_cache_sentinel")?(Vt={id:"read",icon:y.BookOpen,label:"read"},n[57]=Vt):Vt=n[57],n[58]!==ut?(zt={id:"snooze",icon:y.AlarmClock,label:"snooze",disabled:ut},n[58]=ut,n[59]=zt):zt=n[59],n[60]===Symbol.for("react.memo_cache_sentinel")?(Rt={id:"share",icon:y.Send,label:"send"},n[60]=Rt):Rt=n[60],n[61]!==ut?(Pt={id:"taco",icon:y.LayoutList,label:"TACO",disabled:ut},n[61]=ut,n[62]=Pt):Pt=n[62],n[63]===Symbol.for("react.memo_cache_sentinel")?(Lt={id:"archive",icon:y.Archive,label:"archive",destructive:!0},At={id:"options",icon:y.MoreHorizontal,label:"options"},n[63]=Lt,n[64]=At):(Lt=n[63],At=n[64]),n[65]!==zt||n[66]!==Pt?(Ot=[Vt,zt,Rt,Pt,Lt,At],n[65]=zt,n[66]=Pt,n[67]=Ot):Ot=n[67];const $t=Ot;let Et;n[68]===Symbol.for("react.memo_cache_sentinel")?(Et=()=>Q({kind:"caption"}),n[68]=Et):Et=n[68];const Ht=Et;let Mt;n[69]===Symbol.for("react.memo_cache_sentinel")?(Mt=()=>Q({kind:"none"}),n[69]=Mt):Mt=n[69];const Wt=Mt;let Bt;n[70]===Symbol.for("react.memo_cache_sentinel")?(Bt=()=>Q({kind:"filters"}),n[70]=Bt):Bt=n[70];const Ft=Bt;let Nt;n[71]===Symbol.for("react.memo_cache_sentinel")?(Nt=e=>{te(t=>{const n=Object.assign({},t);return delete n[e],n})},n[71]=Nt):Nt=n[71];const Gt=Nt;let Kt;n[72]!==nt||n[73]!==st||n[74]!==j?(Kt=e=>{te(t=>Object.assign({},t,{[nt]:[e]})),me("tag",null),j.setTags({serverId:st,agentId:nt},[e]).catch(e=>{Gt(nt),me("tag",e instanceof Error?e.message:"could not tag this session")})},n[72]=nt,n[73]=st,n[74]=j,n[75]=Kt):Kt=n[75];const qt=Kt;let Ut;n[76]!==_t||n[77]!==nt||n[78]!==it.length||n[79]!==Ct||n[80]!==K?(Ut=()=>{K(),Ct(nt),it.length<=1&&_t()},n[76]=_t,n[77]=nt,n[78]=it.length,n[79]=Ct,n[80]=K,n[81]=Ut):Ut=n[81];const Yt=Ut;let Xt;n[82]!==_t||n[83]!==nt||n[84]!==Ct||n[85]!==st||n[86]!==j?(Xt=async e=>{if("terminate"===e)return await j.terminate({serverId:st,agentId:nt}),Ct(nt),void _t();ce(W),Q({kind:ze[e]})},n[82]=_t,n[83]=nt,n[84]=Ct,n[85]=st,n[86]=j,n[87]=Xt):Xt=n[87];const Jt=Xt;let Qt;n[88]!==Jt?(Qt=e=>{if(ce(W),"archive"===e)return Jt("terminate");const t=Ve[e];t&&Q({kind:t})},n[88]=Jt,n[89]=Qt):Qt=n[89];const Zt=Qt;let en;n[90]!==_t||n[91]!==nt||n[92]!==Ct||n[93]!==st||n[94]!==j?(en=e=>{me("snooze",null),j.snooze({serverId:st,agentId:nt},e.until,e.untilWhat,e.why).then(()=>(Ct(nt),_t(),null)).catch(e=>{me("snooze",e instanceof Error?e.message:"could not snooze this session")})},n[90]=_t,n[91]=nt,n[92]=Ct,n[93]=st,n[94]=j,n[95]=en):en=n[95];const tn=en;let nn;n[96]!==_t||n[97]!==Ct||n[98]!==st||n[99]!==j?(nn=(e,t)=>{me("consolidate",null),j.consolidate({serverId:st,winnerId:e,sourceIds:t}).then(()=>{for(const n of[e,...t])Ct(n);return _t(),null}).catch(e=>{me("consolidate",e instanceof Error?e.message:"could not consolidate these sessions")})},n[96]=_t,n[97]=Ct,n[98]=st,n[99]=j,n[100]=nn):nn=n[100];const sn=nn;let on;n[101]!==gt||n[102]!==S||n[103]!==nt||n[104]!==rt||n[105]!==Yt||n[106]!==st?(on=e=>{if(!gt)return void Q({kind:"none"});const t=e.trim();0!==t.length&&rt?(ie(null),S({serverId:st,agentId:nt,decisionId:rt.id,optionId:null,note:t}).then(()=>(Yt(),null)).catch(e=>{ie(e instanceof Error?e.message:String(e))})):Q({kind:"none"})},n[101]=gt,n[102]=S,n[103]=nt,n[104]=rt,n[105]=Yt,n[106]=st,n[107]=on):on=n[107];const ln=on;let rn;n[108]!==Ue||n[109]!==j?(rn=e=>{Ue&&(me("share",null),j.share(e,ye(Ue)).then(()=>(Q({kind:"none"}),null)).catch(e=>{me("share",e instanceof Error?e.message:"could not open that")}))},n[108]=Ue,n[109]=j,n[110]=rn):rn=n[110];const an=rn;let cn;n[111]!==_t||n[112]!==Ue||n[113]!==nt||n[114]!==Ct||n[115]!==st||n[116]!==j?(cn=e=>{if(!Ue)return;me("automate",null);const t=Ue.digest?.nextStep??Ue.digest?.goal??`Continue ${Ue.title}`;j.automate({serverId:st,agentId:nt},e,t,Ue.title).then(()=>(Ct(nt),_t(),null)).catch(e=>{me("automate",e instanceof Error?e.message:"could not create the routine")})},n[111]=_t,n[112]=Ue,n[113]=nt,n[114]=Ct,n[115]=st,n[116]=j,n[117]=cn):cn=n[117];const dn=cn;let un;n[118]!==nt||n[119]!==st||n[120]!==j?(un=e=>{me("kanban",null),j.setKanban({serverId:st,agentId:nt},e).then(()=>(Q({kind:"none"}),null)).catch(e=>{me("kanban",e instanceof Error?e.message:"could not move this session")})},n[118]=nt,n[119]=st,n[120]=j,n[121]=un):un=n[121];const hn=un;let gn;n[122]!==i||n[123]!==gt||n[124]!==f||n[125]!==pt||n[126]!==rt||n[127]!==dt||n[128]!==je||n[129]!==ut||n[130]!==U||n[131]!==O||n[132]!==Yt||n[133]!==Zt||n[134]!==Jt||n[135]!==qt||n[136]!==$t||n[137]!==tt.length||n[138]!==St||n[139]!==re.tag?(gn=(e,n)=>{const o=n===U,a=e.session;return(0,A.jsxs)(t.View,{style:pe.card,children:[(0,A.jsx)(ue,{mode:f,text:de(a),active:o}),e.firstOfLap&&e.lap>1?(0,A.jsx)(t.View,{style:St,testID:`reels-seam-${e.lap}`,children:(0,A.jsx)(_.LapSeam,{lap:e.lap,ringSize:je.filter(t=>t.lap===e.lap-1).length||tt.length,acted:(0,z.actedThisLap)(je.filter(t=>t.lap===e.lap-1).map(We),e.lap-1)})}):null,(0,A.jsx)(t.View,{style:pe.middle,children:o?(0,A.jsx)(_.ReelsRail,{actions:$t,contextLabel:a.tags[0]??"untagged",onAction:Zt}):null}),(0,A.jsxs)(t.View,{style:pe.bottom,children:[(0,A.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 ${a.title}`,style:pe.captionTap,children:[(0,A.jsx)(s.Text,{style:pe.cardTitle,children:a.title}),(0,A.jsx)(s.Text,{style:pe.cardMeta,children:q(a,O)}),(0,A.jsx)(s.Text,{style:pe.cardSummary,numberOfLines:4,children:a.digest?.summary??a.digest?.goal??"No digest yet."}),o?(0,A.jsx)(s.Text,{style:pe.cardTapHint,children:"tap for the whole digest and to talk to it"}):null]}),o?(0,A.jsx)(he,{gated:ut,allTags:i,onPickTag:qt,decision:rt,decisions:dt,serverId:a.serverId,agentId:a.id,onAnswered:Yt,onVerb:Jt,actAllowed:gt,capLabel:pt,tagError:re.tag}):null]})]})},n[122]=i,n[123]=gt,n[124]=f,n[125]=pt,n[126]=rt,n[127]=dt,n[128]=je,n[129]=ut,n[130]=U,n[131]=O,n[132]=Yt,n[133]=Zt,n[134]=Jt,n[135]=qt,n[136]=$t,n[137]=tt.length,n[138]=St,n[139]=re.tag,n[140]=gn):gn=n[140];const bn=gn;if(!Ue){let e;n[141]!==Se||n[142]!==O||n[143]!==o?(e=ae(o,Se,O),n[141]=Se,n[142]=O,n[143]=o,n[144]=e):e=n[144];const{message:i,exit:a}=e;let c,d,u;return n[145]!==i?(c=(0,A.jsx)(s.Text,{style:pe.fieldValue,children:i}),n[145]=i,n[146]=c):c=n[146],n[147]!==a||n[148]!==Ne||n[149]!==b?(d="clear-filters"===a?(0,A.jsx)(l.Pressable,{onPress:Ne,style:pe.send,accessibilityRole:"button",accessibilityLabel:"Clear all filters",testID:"reels-empty-clear-filters",children:(0,A.jsx)(s.Text,{style:pe.link,children:"clear filters"})}):(0,A.jsx)(l.Pressable,{onPress:b,style:pe.send,accessibilityRole:"button",accessibilityLabel:"Back to the sessions list",testID:"reels-empty-leave",children:(0,A.jsx)(s.Text,{style:pe.link,children:"back to sessions"})}),n[147]=a,n[148]=Ne,n[149]=b,n[150]=d):d=n[150],n[151]!==c||n[152]!==d?(u=(0,A.jsxs)(t.View,{style:pe.empty,testID:"reels-empty",children:[c,d]}),n[151]=c,n[152]=d,n[153]=u):u=n[153],u}let pn;n[154]!==je||n[155]!==bn?(pn=(0,A.jsx)(T.ReelsPager,{data:je,keyExtractor:F,renderCard:bn,onIndexChange:Y,onEndReached:Dt,controllerRef:xe}),n[154]=je,n[155]=bn,n[156]=pn):pn=n[156];const mn=`${Je>=0?U-Je+1:U+1}/${Ze} \xb7 lap ${Ye}`;let xn,yn;n[157]!==x||n[158]!==Se||n[159]!==N||n[160]!==mn?(xn=(0,A.jsx)(_.ReelsHeader,{acts:N,cap:x,activeFilters:Se,onFilter:Ft,position:mn}),n[157]=x,n[158]=Se,n[159]=N,n[160]=mn,n[161]=xn):xn=n[161],n[162]!==yt||n[163]!==xn?(yn=(0,A.jsx)(t.View,{style:yt,pointerEvents:"box-none",children:xn}),n[162]=yt,n[163]=xn,n[164]=yn):yn=n[164];const fn=re[M[J.kind]??"share"];let jn,Sn;return n[165]!==Ke||n[166]!==i||n[167]!==gt||n[168]!==Ue||n[169]!==rt||n[170]!==we||n[171]!==O||n[172]!==dn||n[173]!==ln||n[174]!==sn||n[175]!==Pe||n[176]!==Be||n[177]!==Le||n[178]!==De||n[179]!==Re||n[180]!==hn||n[181]!==an||n[182]!==tn||n[183]!==Fe||n[184]!==Jt||n[185]!==ct||n[186]!==Ce||n[187]!==J||n[188]!==kt||n[189]!==Te||n[190]!==tt||n[191]!==le||n[192]!==ve||n[193]!==fn||n[194]!==ke||n[195]!==Ie?(jn=(0,A.jsx)(ge,{overlay:J,session:Ue,ring:tt,now:O,decisionTarget:rt,onClose:Wt,onSend:ln,actAllowed:gt,onSnooze:tn,onConsolidate:sn,onKanban:hn,onVerb:Jt,overlayStyle:kt,sendError:le,verbError:fn,openDecisions:ct,onShare:an,onAutomate:dn,allTags:i,allProviders:Ke,statusSelection:ve,tagSelection:ke,kanbanSelection:we,providerSelection:Te,originSelection:Ce,timeSelection:Ie,onCycleStatus:De,onCycleTag:Re,onCycleKanban:Pe,onCycleProvider:Le,onCycleOrigin:Be,onToggleTimeWindow:Fe}),n[165]=Ke,n[166]=i,n[167]=gt,n[168]=Ue,n[169]=rt,n[170]=we,n[171]=O,n[172]=dn,n[173]=ln,n[174]=sn,n[175]=Pe,n[176]=Be,n[177]=Le,n[178]=De,n[179]=Re,n[180]=hn,n[181]=an,n[182]=tn,n[183]=Fe,n[184]=Jt,n[185]=ct,n[186]=Ce,n[187]=J,n[188]=kt,n[189]=Te,n[190]=tt,n[191]=le,n[192]=ve,n[193]=fn,n[194]=ke,n[195]=Ie,n[196]=jn):jn=n[196],n[197]!==pn||n[198]!==yn||n[199]!==jn?(Sn=(0,A.jsxs)(t.View,{style:pe.root,testID:"reels-screen",children:[pn,yn,jn]}),n[197]=pn,n[198]=yn,n[199]=jn,n[200]=Sn):Sn=n[200],Sn}),pe=x.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({},x.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({},x.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({},x.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]},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]}})),me=[{id:"whatsapp",label:"WhatsApp"},{id:"slack",label:"Slack"},{id:"email",label:"Email"}],xe=400;function ye(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>xe?`${t.slice(0,399)}\u2026`:t}const fe=[pe.fieldValue,pe.fieldDanger],je=[pe.sheetTitle,pe.sheetHeadTitle],Se=[pe.pickRow,pe.pickRowOn],ve=[pe.verbWord,pe.verbWordDanger],ke={include:[pe.tagChip,pe.tagChipOn],exclude:[pe.tagChip,pe.tagChipOff],neutral:pe.tagChip},we={selected:!0},Te={selected:!1},Ce=e=>e?we:Te,Ie=[pe.send,pe.dim],De=[pe.background,pe.backgroundText],Ve={read:"caption",snooze:"snooze",share:"share",taco:"taco",options:"options"},ze={consolidate:"consolidate",outsource:"share",automate:"automate"},Re=[{id:"hourly",label:"Every hour",everyMs:36e5},{id:"daily",label:"Every day",everyMs:864e5},{id:"weekly",label:"Every week",everyMs:6048e5}];function Pe(e,t){return O(t.dy)}function Le(e){return`${e.kind}: ${e.label??e.url}`}function Ae(){return Date.now()}function Oe(e){return e.recordAct}function $e(e){return e.provider}function Ee(e){return e.session}function He(e){return{id:e.id,question:e.question}}function Me(e){return e+1}function We(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,4008,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 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]);
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
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]);
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?null:h,P=[(0,s.isFilterSelectionActive)(v),(0,s.isFilterSelectionActive)(b),(0,s.isFilterSelectionActive)(k),(0,s.isFilterSelectionActive)(y),(0,s.isFilterSelectionActive)(C),null!==O],_=P.some(Boolean),K=P.filter(Boolean).length,j=(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:O,providerSelection:y,originSelection:C,textQuery:""},p),[k,p,C,y,O,v,b,A]),x=(0,t.useMemo)(()=>_?c.filter(j):c,[_,j,c]),W=(0,t.useMemo)(()=>x.map(t=>Object.assign({},t,{tags:u[t.id]??t.tags,actedLap:S[t.id]??t.actedLap??null})),[S,x,u]),$=(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),D=(0,t.useRef)(O);E.current===v&&Q.current===b&&V.current===k&&q.current===y&&z.current===C&&D.current===O||(E.current=v,Q.current=b,V.current=k,q.current=y,z.current=C,D.current=O,$.current=new Map);const G=(0,t.useMemo)(()=>new Map(W.map(t=>[t.id,t])),[W]),H=(0,t.useMemo)(()=>{const t=[];for(let i=1;i<=F;i+=1){let s=($.current.get(i)??[]).map(t=>G.get(t)).filter(t=>void 0!==t);if(0===s.length){const t=(0,n.buildLap)({sessions:W,lap:i,now:p});t.length>0&&$.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},[G,W,F,p]),I=(0,t.useCallback)(t=>M(t),[M]),J=(0,t.useCallback)(t=>R(t),[R]),N=(0,t.useCallback)(t=>w(t),[w]),U=(0,t.useCallback)(t=>T(t),[T]),X=(0,t.useCallback)(t=>L(t),[L]),Y=(0,t.useCallback)(t=>B(t),[B]);return{feed:H,activeFilters:K,statusSelection:v,tagSelection:b,kanbanSelection:k,providerSelection:y,originSelection:C,timeSelection:O,onCycleStatus:I,onCycleTag:J,onCycleKanban:N,onCycleProvider:U,onCycleOrigin:X,onToggleTimeWindow:Y,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]);
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=n,Object.defineProperty(e,"useActBudgetStore",{enumerable:!0,get:function(){return s}}),e.actsOn=function(t,c){return t.day===n(c)?t.acts:0};var t=r(_d[0]),c=r(_d[1]);function n(t=new Date){return`${t.getFullYear()}-${`${t.getMonth()+1}`.padStart(2,"0")}-${`${t.getDate()}`.padStart(2,"0")}`}const s=(0,t.create)()((0,c.persist)((t,c)=>({day:n(),acts:0,actsToday:(t=new Date)=>{const s=n(t);return c().day===s?c().acts:0},recordAct:(c=new Date)=>{const s=n(c);t(t=>t.day===s?{acts:t.acts+1}:{day:s,acts:1})}}),{name:"reels-act-budget"}))},4574,[3269,3428]);
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]);
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-f996782b4306ba9b5650d9b678fbe3e1.js.map
16704
- //# debugId=c7712536-def4-4c38-8f8b-beaabc279365
16703
+ //# sourceMappingURL=/_expo/static/js/web/index-2836ce72bcca908cdd706d9aab0a425c.js.map
16704
+ //# debugId=ead4b92d-196a-4939-b850-bff44d197ba8
@@ -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-f996782b4306ba9b5650d9b678fbe3e1.js" defer></script>
194
+ <script src="/_expo/static/js/web/index-2836ce72bcca908cdd706d9aab0a425c.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.122",
3
+ "version": "0.3.123",
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.122",
70
- "@hyperdrive.bot/fleet-extension-sdk": "0.3.122",
71
- "@hyperdrive.bot/fleet-highlight": "0.3.122",
72
- "@hyperdrive.bot/fleet-protocol": "0.3.122",
73
- "@hyperdrive.bot/fleet-relay": "0.3.122",
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",
74
74
  "@isaacs/ttlcache": "^2.1.4",
75
75
  "@modelcontextprotocol/sdk": "^1.20.1",
76
76
  "@opencode-ai/sdk": "1.2.6",