@hyperdrive.bot/fleet-server 0.3.129 → 0.3.130
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/server/web-ui/_expo/static/js/web/{index-d07a4bd81a0bceb5cec57c04122afec2.js → index-2e2bf07968713b86ad2cc281cbdf81ce.js} +7 -7
- package/dist/server/web-ui/_expo/static/js/web/index-2e2bf07968713b86ad2cc281cbdf81ce.js.br +0 -0
- package/dist/server/web-ui/_expo/static/js/web/index-2e2bf07968713b86ad2cc281cbdf81ce.js.gz +0 -0
- package/dist/server/web-ui/_expo/static/js/web/{index-d07a4bd81a0bceb5cec57c04122afec2.js.map.br → index-2e2bf07968713b86ad2cc281cbdf81ce.js.map.br} +0 -0
- package/dist/server/web-ui/_expo/static/js/web/{index-d07a4bd81a0bceb5cec57c04122afec2.js.map.gz → index-2e2bf07968713b86ad2cc281cbdf81ce.js.map.gz} +0 -0
- package/dist/server/web-ui/index.html +1 -1
- package/dist/server/web-ui/index.html.br +0 -0
- package/dist/server/web-ui/index.html.gz +0 -0
- package/package.json +6 -6
- package/dist/server/web-ui/_expo/static/js/web/index-d07a4bd81a0bceb5cec57c04122afec2.js.br +0 -0
- package/dist/server/web-ui/_expo/static/js/web/index-d07a4bd81a0bceb5cec57c04122afec2.js.gz +0 -0
|
@@ -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.
|
|
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.130\",\"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.
|
|
15060
|
+
__d(function(e,t,r,a,i,o,n){i.exports={name:"@hyperdrive.bot/fleet-app",version:"0.3.130",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,[]);
|
|
@@ -15229,7 +15229,7 @@ __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{v
|
|
|
15229
15229
|
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"FileSystemSessionType",{enumerable:!0,get:function(){return n}}),Object.defineProperty(e,"FileSystemUploadType",{enumerable:!0,get:function(){return t}}),Object.defineProperty(e,"EncodingType",{enumerable:!0,get:function(){return u}});let n=(function(n){return n[n.BACKGROUND=0]="BACKGROUND",n[n.FOREGROUND=1]="FOREGROUND",n})({}),t=(function(n){return n[n.BINARY_CONTENT=0]="BINARY_CONTENT",n[n.MULTIPART=1]="MULTIPART",n})({}),u=(function(n){return n.UTF8="utf8",n.Base64="base64",n})({})},3574,[]);
|
|
15230
15230
|
__d(function(g,r,i,a,m,_e,d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),_e.isAvailableAsync=async function(){if(s.default)return!s.default.isAvailableAsync||await s.default.isAvailableAsync();return!1},_e.shareAsync=async function(e,t={}){if(!s.default||!s.default.shareAsync)throw new n.UnavailabilityError('Sharing','shareAsync');return await s.default.shareAsync(e,t)};var e,n=r(d[0]),t=r(d[1]),s=(e=t)&&e.__esModule?e:{default:e}},3575,[4,3576]);
|
|
15231
15231
|
__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 t}});var n=r(d[0]),t={isAvailableAsync:async()=>'undefined'!=typeof navigator&&!!navigator.share,async shareAsync(t,s={}){if(!navigator.share)throw new n.UnavailabilityError('navigator','share');await navigator.share(Object.assign({},s,{url:t}))}}},3576,[4]);
|
|
15232
|
-
__d(function(g,r,i,a,m,_e,_d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),_e.openExternalUrl=async function(o){if(t.isWeb){const e=(0,n.getDesktopHost)()?.opener?.openUrl;if("function"==typeof e)return void await e(o);
|
|
15232
|
+
__d(function(g,r,i,a,m,_e,_d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),_e.openExternalUrl=async function(o){if(t.isWeb){const e=(0,n.getDesktopHost)()?.opener?.openUrl;if("function"==typeof e)return void await e(o);const t=window.open(o,"_blank");if(!t)throw new Error("The browser blocked opening that link. Allow popups and try again.");return void(t.opener=null)}await e.openURL(o)};var e=(function(e){if(e&&e.__esModule)return e;var n={};return e&&Object.keys(e).forEach(function(t){var o=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,o.get?o:{enumerable:!0,get:function(){return e[t]}})}),n.default=e,n})(r(_d[0])),n=r(_d[1]),t=r(_d[2])},3577,[746,3417,3420]);
|
|
15233
15233
|
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.QuittingOverlay=function(){const S=(0,o.c)(16),{t:h}=(0,s.useTranslation)(),{theme:v}=(0,u.useUnistyles)(),[x,b]=(0,l.useState)(!1);let j,z,M,k,T,q,E,I;S[0]===Symbol.for("react.memo_cache_sentinel")?(j=()=>{if(!(0,f.getIsElectronRuntime)())return;let t=!1,n=null;return(0,p.listenToDesktopEvent)("quitting",()=>{t||b(!0)}).then(o=>{t?o():n=o}),()=>{t=!0,n?.()}},z=[],S[0]=j,S[1]=z):(j=S[0],z=S[1]);if((0,l.useEffect)(j,z),!x)return null;S[2]!==v.colors.foregroundMuted?(M=(0,_.jsx)(c.LoadingSpinner,{size:"large",color:v.colors.foregroundMuted}),S[2]=v.colors.foregroundMuted,S[3]=M):M=S[3];S[4]!==h?(k=h("desktop.quitting.title"),S[4]=h,S[5]=k):k=S[5];S[6]!==k?(T=(0,_.jsx)(n.Text,{style:y.title,children:k}),S[6]=k,S[7]=T):T=S[7];S[8]!==h?(q=h("desktop.quitting.detail"),S[8]=h,S[9]=q):q=S[9];S[10]!==q?(E=(0,_.jsx)(n.Text,{style:y.detail,children:q}),S[10]=q,S[11]=E):E=S[11];S[12]!==M||S[13]!==T||S[14]!==E?(I=(0,_.jsxs)(t.View,{style:y.overlay,children:[M,T,E]}),S[12]=M,S[13]=T,S[14]=E,S[15]=I):I=S[15];return I};var t=r(d[0]),n=r(d[1]),o=r(d[2]),l=r(d[3]);r(d[4]),r(d[5]);var s=r(d[6]),u=r(d[7]),c=r(d[8]),f=r(d[9]),p=r(d[10]),_=r(d[11]);const y=u.StyleSheet.create(t=>({overlay:{position:"absolute",top:0,left:0,right:0,bottom:0,backgroundColor:t.colors.surface1,alignItems:"center",justifyContent:"center",gap:t.spacing[3],zIndex:9999,uni__dependencies:[0]},title:{color:t.colors.foreground,fontSize:t.fontSize.base,uni__dependencies:[0]},detail:{color:t.colors.foregroundMuted,fontSize:t.fontSize.sm,uni__dependencies:[0]}}))},3578,[348,349,350,36,234,146,352,56,3579,3472,3580,279]);
|
|
15234
15234
|
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.LoadingSpinner=function(c){const s=(0,t.c)(3),{color:l,size:u}=c,v=void 0===u?"small":u;let _;s[0]!==l||s[1]!==v?(_=(0,n.jsx)(o.ActivityIndicator,{size:v,color:l}),s[0]=l,s[1]=v,s[2]=_):_=s[2];return _};var o=r(d[0]),t=r(d[1]);r(d[2]);var n=r(d[3])},3579,[2477,350,654,279]);
|
|
15235
15235
|
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.listenToDesktopEvent=async function(n,o){const s=(0,t.getDesktopHost)()?.events?.on;if("function"!=typeof s)throw new Error("Desktop event API is unavailable.");const c=await s(n,t=>{const n="object"==typeof t&&null!==t&&"payload"in t?t.payload:t;o(n)});return"function"==typeof c?c:()=>{}};var t=r(d[0])},3580,[3417]);
|
|
@@ -16325,9 +16325,9 @@ __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{v
|
|
|
16325
16325
|
__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]})}))},4566,[348,349,350,36,234,146,56,3420,3820,3821,279]);
|
|
16326
16326
|
__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]}}})},4567,[2815,349,348,350,36,352,146,234,182,2482,56,4563,3821,3589,3486,3885,3820,3420,279]);
|
|
16327
16327
|
__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]),u=r(d[6]),c=r(d[7]),f=r(d[8]),v=r(d[9]),b=r(d[10]),S=r(d[11]),k=r(d[12]);function p(){const p=(0,t.c)(23),{serverId:B}=(0,s.useLocalSearchParams)(),_=(0,s.useRouter)(),y=(0,S.useKanbanBuckets)(),I=(0,S.useDefaultBucketId)();let R;p[0]!==y?(R=new Set(y.map(A)),p[0]=y,p[1]=R):R=p[1];const z=R;let j;p[2]!==B?(j=t=>t.sessions[B??""]?.agents,p[2]=B,p[3]=j):j=p[3];const O=(0,u.useSessionStore)(j);let P;e:{if(!O){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]!==O||p[6]!==I||p[7]!==z||p[8]!==B){let s;p[10]!==I||p[11]!==z||p[12]!==B?(s=t=>({id:t.id,serverId:B??"",title:t.title??t.id,statusBucket:(0,v.deriveSidebarStateBucket)((0,v.toBucketInput)(t)),tags:(0,f.getAgentTags)(t),digest:t.digest??null,kanban:(0,b.resolveBucketId)(t,z,I),provider:t.provider,model:t.model,lastActivityAt:t.lastActivityAt,snoozeCount:t.snooze?.count??0,snoozedUntil:t.snooze?.until??null,origin:(0,c.deriveSessionOrigin)(t.labels??null),createdAt:t.createdAt}),p[10]=I,p[11]=z,p[12]=B,p[13]=s):s=p[13],t=(0,l.selectFeedCandidates)([...O.values()]).map(s),p[5]=O,p[6]=I,p[7]=z,p[8]=B,p[9]=t}else t=p[9];P=t}const T=P;let h;if(p[14]!==O){const t=new Set;for(const s of O?.values()??[])for(const n of(0,f.getAgentTags)(s))t.add(n);h=[...t].sort(),p[14]=O,p[15]=h}else h=p[15];const w=h;let C;p[16]!==_||p[17]!==B?(C=()=>{_.replace((0,n.buildHostRootRoute)(B??""))},p[16]=_,p[17]=B,p[18]=C):C=p[18];const L=C;let x;return p[19]!==w||p[20]!==L||p[21]!==T?(x=(0,k.jsx)(o.ReelsScreen,{sessions:T,allTags:w,onLeaveRing:L}),p[19]=w,p[20]=L,p[21]=T,p[22]=x):x=p[22],x}function A(t){return t.id}},4568,[350,36,379,3492,4569,4577,3427,3621,4003,3441,4008,4007,279]);
|
|
16328
|
-
__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,_e.destructiveHint=H,_e.verbAccessibilityLabel=F,Object.defineProperty(_e,"UNWIRED_VERBS",{enumerable:!0,get:function(){return N}}),Object.defineProperty(_e,"CARD_DECISION_LIMIT",{enumerable:!0,get:function(){return K}}),_e.visibleDecisions=q,_e.bucketLabel=Y,_e.relativeAge=X,_e.cardMetaLine=J,_e.consolidateRowLabel=se,_e.emptyRingState=pe,_e.relativeWake=xe,_e.backgroundTextFor=ye,Object.defineProperty(_e,"ReelsScreen",{enumerable:!0,get:function(){return ke}}),_e.shareTextFor=Te;var t=r(_d[0]),n=r(_d[1]),s=r(_d[2]),o=r(_d[3]),i=r(_d[4]),l=r(_d[5]),a=r(_d[6]),c=r(_d[7]),d=r(_d[8]);r(_d[9]);e(r(_d[10]));var u=e(r(_d[11])),h=e(r(_d[12]));r(_d[13]);var b=e(r(_d[14]));r(_d[15]),r(_d[16]),r(_d[17]),r(_d[18]),r(_d[19]),r(_d[20]);var p=r(_d[21]),x=r(_d[22]),y=r(_d[23]),f=r(_d[24]),j=r(_d[25]),k=r(_d[26]),v=r(_d[27]),S=r(_d[28]),w=r(_d[29]),T=r(_d[30]),C=r(_d[31]),_=r(_d[32]),I=r(_d[33]),D=r(_d[34]),V=r(_d[35]),z=r(_d[36]),R=r(_d[37]),L=r(_d[38]),M=r(_d[39]),P=r(_d[40]),A=r(_d[41]),$=r(_d[42]);function O(e){return e>8}function E(e){return e>60}function H(e,t,n){return t&&"hold"!==t?t:e||"hold"===t?"hold to retire, this cannot be undone":n}function F(e,t){return"terminate"===e?`${t}. Hold to confirm, this cannot be undone.`:N.has(e)?`${t}. Not wired yet.`:t}const W={automate:"automate",share:"share",snooze:"snooze",options:"kanban",consolidate:"consolidate"},B={share:null,automate:null,snooze:null,kanban:null,tag:null,consolidate:null},N=new Set([]);function G(e){return e.key}const K=3;function q(e){return{shown:e.slice(0,K),hidden:Math.max(e.length-K,0)}}const U={needs_input:"needs you",failed:"failed",attention:"wants a look",pending:"waiting",running:"running",done:"done"};function Y(e){return U[e]??e.replace(/_/g," ")}function X(e,t=new Date){if(!e)return"";const n=t.getTime()-e.getTime();if(!Number.isFinite(n))return"";if(n<0)return"just now";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 J(e,t){return[Y(String(e.statusBucket)),X(e.lastActivityAt,t),e.model?`${e.provider}/${e.model}`:e.provider].filter(e=>e.length>0).join(" \xb7 ")}function Q(e,t){const n=(0,c.c)(8);let s,o,i,l;n[0]!==e||n[1]!==t?(s=()=>{if(!e||"undefined"==typeof document)return;const n=e=>{"Escape"===e.key&&t()};return document.addEventListener("keydown",n),()=>document.removeEventListener("keydown",n)},o=[e,t],n[0]=e,n[1]=t,n[2]=s,n[3]=o):(s=n[2],o=n[3]),(0,d.useEffect)(s,o),n[4]!==e||n[5]!==t?(i=()=>{},l=[e,t],n[4]=e,n[5]=t,n[6]=i,n[7]=l):(i=n[6],l=n[7]),(0,d.useEffect)(i,l)}const Z=(0,d.memo)(function(e){const a=(0,c.c)(90),{session:u,visible:x,onClose:y,onSend:f,sendError:j,openDecisions:k,target:v,actAllowed:w}=e,[T,C]=(0,d.useState)(""),_=v?.question??null,I=u.digest;let D;a[0]!==f||a[1]!==T?(D=()=>{const e=T.trim();e.length>0&&(f(e),C(""))},a[0]=f,a[1]=T,a[2]=D):D=a[2];const V=D,z=(0,p.useSafeAreaInsets)(),R=ve.captionSheet,[L,M]=(0,d.useState)(!1);let P,A;a[3]===Symbol.for("react.memo_cache_sentinel")?(P=()=>{const e=h.default.addListener("keyboardDidShow",()=>M(!0)),t=h.default.addListener("keyboardDidHide",()=>M(!1));return()=>{e.remove(),t.remove()}},A=[],a[3]=P,a[4]=A):(P=a[3],A=a[4]),(0,d.useEffect)(P,A);const O=L&&!1?0:z.bottom;let H;a[5]!==O?(H=[ve.sheetInner,{paddingBottom:O}],a[5]=O,a[6]=H):H=a[6];const F=H;let W;a[7]!==y?(W=b.default.create({onMoveShouldSetPanResponder:He,onPanResponderRelease:(e,t)=>{E(t.dy)&&y()}}),a[7]=y,a[8]=W):W=a[8];const B=W;let N,G,K;Q(x,y),a[9]!==w?(N=w?null:(0,$.jsx)(s.Text,{style:ve.composerLabel,testID:"reels-composer-capped",children:"Decisions are done for today. This one keeps until tomorrow."}),a[9]=w,a[10]=N):N=a[10],a[11]!==w||a[12]!==_||a[13]!==k.length||a[14]!==V||a[15]!==T?(G=w?(0,$.jsxs)($.Fragment,{children:[_?(0,$.jsx)(s.Text,{style:ve.composerLabel,numberOfLines:2,testID:"reels-composer-target",children:k.length>1?`Answering the first of ${k.length} open decisions: ${_}`:`Answering: ${_}`}):null,(0,$.jsxs)(t.View,{style:ve.composer,children:[(0,$.jsx)(n.TextInput,{value:T,onChangeText:C,placeholder:_?"in your own words":"say what to do",style:ve.composerInput,onSubmitEditing:V,returnKeyType:"send",testID:"reels-composer-input"}),(0,$.jsx)(i.Pressable,{onPress:V,style:ve.composerSend,accessibilityRole:"button",accessibilityLabel:"Send this answer",hitSlop:8,testID:"reels-composer-send",children:(0,$.jsx)(s.Text,{style:ve.link,children:"send"})})]})]}):null,a[11]=w,a[12]=_,a[13]=k.length,a[14]=V,a[15]=T,a[16]=G):G=a[16],a[17]!==N||a[18]!==G?(K=(0,$.jsxs)(t.View,{children:[N,G]}),a[17]=N,a[18]=G,a[19]=K):K=a[19];const q=K;if(!x)return null;let U,Y,X,J,Z,ne,se;a[20]!==y?(U=(0,$.jsx)(i.Pressable,{style:ve.captionBackdrop,onPress:y,accessibilityRole:"button",accessibilityLabel:"Close the digest",testID:"reels-caption-backdrop"}),a[20]=y,a[21]=U):U=a[21],a[22]===Symbol.for("react.memo_cache_sentinel")?(Y=(0,$.jsx)(t.View,{style:ve.sheetHandle}),a[22]=Y):Y=a[22],a[23]!==B.panHandlers?(X=(0,$.jsx)(t.View,Object.assign({},B.panHandlers,{style:ve.sheetGrab,testID:"reels-caption-grab",children:Y})),a[23]=B.panHandlers,a[24]=X):X=a[24],a[25]===Symbol.for("react.memo_cache_sentinel")?(J=(0,$.jsx)(ee,{}),a[25]=J):J=a[25],a[26]!==y?(Z=(0,$.jsx)(i.Pressable,{onPress:y,style:ve.sheetClose,hitSlop:8,accessibilityRole:"button",accessibilityLabel:"Close the digest",testID:"reels-caption-close",children:J}),a[26]=y,a[27]=Z):Z=a[27],a[28]!==u.title?(ne=(0,$.jsx)(s.Text,{style:Ie,numberOfLines:1,children:u.title}),a[28]=u.title,a[29]=ne):ne=a[29],a[30]!==Z||a[31]!==ne?(se=(0,$.jsxs)(t.View,{style:ve.sheetHead,children:[Z,ne]}),a[30]=Z,a[31]=ne,a[32]=se):se=a[32];const oe=I?.summary;let ie;a[33]!==oe?(ie=(0,$.jsx)(te,{label:"Summary",value:oe,derived:!0}),a[33]=oe,a[34]=ie):ie=a[34];const le=I?.goal;let re;a[35]!==le?(re=(0,$.jsx)(te,{label:"Goal",value:le}),a[35]=le,a[36]=re):re=a[36];const ae=I?.nextStep;let ce,de,ue,he,be,ge,pe,xe,ye,me,fe,je,ke;if(a[37]!==ae?(ce=(0,$.jsx)(te,{label:"Next step",value:ae}),a[37]=ae,a[38]=ce):ce=a[38],a[39]!==I?.blockers?(de=I?.blockers?.join("\n"),a[39]=I?.blockers,a[40]=de):de=a[40],a[41]!==de?(ue=(0,$.jsx)(te,{label:"Blockers",value:de,danger:!0}),a[41]=de,a[42]=ue):ue=a[42],a[43]!==I?.accomplishments?(he=I?.accomplishments?.join("\n"),a[43]=I?.accomplishments,a[44]=he):he=a[44],a[45]!==he?(be=(0,$.jsx)(te,{label:"Accomplishments",value:he,derived:!0}),a[45]=he,a[46]=be):be=a[46],a[47]!==I?.keyFiles?(ge=I?.keyFiles?.join("\n"),a[47]=I?.keyFiles,a[48]=ge):ge=a[48],a[49]!==ge?(pe=(0,$.jsx)(te,{label:"Key files",value:ge,derived:!0}),a[49]=ge,a[50]=pe):pe=a[50],a[51]!==I?.links?(xe=I?.links?.map(Fe).join("\n"),a[51]=I?.links,a[52]=xe):xe=a[52],a[53]!==xe?(ye=(0,$.jsx)(te,{label:"Links",value:xe}),a[53]=xe,a[54]=ye):ye=a[54],a[55]!==k){let e;a[57]!==k.length?(e=(e,t)=>(0,$.jsx)(te,{label:k.length>1?`Decision ${t+1} of ${k.length}`:"Decision",value:e.question},e.id),a[57]=k.length,a[58]=e):e=a[58],me=k.map(e),a[55]=k,a[56]=me}else me=a[56];var Se;let we,Te,Ce,De,Ve;return a[59]!==u.tags?(fe=u.tags.join(", ")||"no tag",a[59]=u.tags,a[60]=fe):fe=a[60],a[61]!==fe?(je=(0,$.jsx)(te,{label:"Tags",value:fe}),a[61]=fe,a[62]=je):je=a[62],a[63]!==u.kanban?(ke=(Se=u.kanban)?(0,S.getBucketLabel)(Se)||Se:"no column",a[63]=u.kanban,a[64]=ke):ke=a[64],a[65]!==ke?(we=(0,$.jsx)(te,{label:"Kanban",value:ke}),a[65]=ke,a[66]=we):we=a[66],a[67]!==ie||a[68]!==re||a[69]!==ce||a[70]!==ue||a[71]!==be||a[72]!==pe||a[73]!==ye||a[74]!==me||a[75]!==je||a[76]!==we?(Te=(0,$.jsxs)(o.ScrollView,{style:ve.sheetBody,testID:"reels-caption-body",children:[ie,re,ce,ue,be,pe,ye,me,je,we]}),a[67]=ie,a[68]=re,a[69]=ce,a[70]=ue,a[71]=be,a[72]=pe,a[73]=ye,a[74]=me,a[75]=je,a[76]=we,a[77]=Te):Te=a[77],a[78]!==j?(Ce=j?(0,$.jsxs)(s.Text,{style:ve.sendError,testID:"reels-composer-error",children:["Could not send that: ",j,". Nothing was recorded, so try again."]}):null,a[78]=j,a[79]=Ce):Ce=a[79],a[80]!==q||a[81]!==F||a[82]!==X||a[83]!==se||a[84]!==Te||a[85]!==Ce?(De=(0,$.jsx)(l.KeyboardAvoidingView,{behavior:"height",style:R,testID:"reels-caption-sheet",children:(0,$.jsxs)(t.View,{style:F,children:[X,se,Te,Ce,q]})}),a[80]=q,a[81]=F,a[82]=X,a[83]=se,a[84]=Te,a[85]=Ce,a[86]=De):De=a[86],a[87]!==U||a[88]!==De?(Ve=(0,$.jsxs)($.Fragment,{children:[U,De]}),a[87]=U,a[88]=De,a[89]=Ve):Ve=a[89],Ve}),ee=(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,$.jsx)(y.X,{size:18,color:t.colors.foregroundMuted}),e[0]=t.colors.foregroundMuted,e[1]=n):n=e[1],n}),te=(0,d.memo)(function(e){const n=(0,c.c)(9),{label:o,value:i,derived:l,danger:a}=e;if(!i)return null;const d=l?" (derived)":"";let u;n[0]!==o||n[1]!==d?(u=(0,$.jsxs)(s.Text,{style:ve.fieldLabel,children:[o,d]}),n[0]=o,n[1]=d,n[2]=u):u=n[2];const h=a?Ce:ve.fieldValue;let b,p;return n[3]!==h||n[4]!==i?(b=(0,$.jsx)(s.Text,{style:h,children:i}),n[3]=h,n[4]=i,n[5]=b):b=n[5],n[6]!==u||n[7]!==b?(p=(0,$.jsxs)(t.View,{style:ve.field,children:[u,b]}),n[6]=u,n[7]=b,n[8]=p):p=n[8],p}),ne={on:{selected:!0},off:{selected:!1}};function se(e,t,n){return t?n?`${e}, picked, survives this consolidation`:`${e}, picked`:`${e}, not picked`}const oe=(0,d.memo)(function(e){const n=(0,c.c)(39),{session:o,picked:l,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 k=j;let v,S=y.Square;l&&(S=a?y.Crown:y.SquareCheck),n[6]!==a||n[7]!==l||n[8]!==o.title?(v=se(o.title,l,a),n[6]=a,n[7]=l,n[8]=o.title,n[9]=v):v=n[9];const w=ne[l?"on":"off"],T=l?De:ve.pickRow,C=`reels-consolidate-pick-${o.id}`;let _,I,D;n[10]!==S||n[11]!==b.colors.accent?(_=(0,$.jsx)(t.View,{style:ve.pickMark,children:(0,$.jsx)(S,{size:16,color:b.colors.accent})}),n[10]=S,n[11]=b.colors.accent,n[12]=_):_=n[12],n[13]!==o.title?(I=(0,$.jsx)(s.Text,{style:ve.pickName,children:o.title}),n[13]=o.title,n[14]=I):I=n[14],n[15]!==d||n[16]!==o.lastActivityAt?(D=X(o.lastActivityAt,d),n[15]=d,n[16]=o.lastActivityAt,n[17]=D):D=n[17];const V=a&&l?" \xb7 survives":"";let z,R,L;return n[18]!==V||n[19]!==D?(z=(0,$.jsxs)(s.Text,{style:ve.pickAux,children:[D,V]}),n[18]=V,n[19]=D,n[20]=z):z=n[20],n[21]!==k||n[22]!==a||n[23]!==l||n[24]!==o.id||n[25]!==o.title||n[26]!==b.colors.foregroundMuted?(R=l&&!a?(0,$.jsx)(i.Pressable,{onPress:k,accessibilityRole:"button",accessibilityLabel:`Make ${o.title} the survivor`,hitSlop:8,style:ve.pickCrown,testID:`reels-consolidate-crown-${o.id}`,children:(0,$.jsx)(y.Crown,{size:14,color:b.colors.foregroundMuted})}):null,n[21]=k,n[22]=a,n[23]=l,n[24]=o.id,n[25]=o.title,n[26]=b.colors.foregroundMuted,n[27]=R):R=n[27],n[28]!==k||n[29]!==z||n[30]!==R||n[31]!==v||n[32]!==w||n[33]!==T||n[34]!==C||n[35]!==_||n[36]!==I||n[37]!==f?(L=(0,$.jsxs)(i.Pressable,{onPress:f,onLongPress:k,accessibilityRole:"button",accessibilityLabel:v,accessibilityState:w,style:T,testID:C,children:[_,I,z,R]}),n[28]=k,n[29]=z,n[30]=R,n[31]=v,n[32]=w,n[33]=T,n[34]=C,n[35]=_,n[36]=I,n[37]=f,n[38]=L):L=n[38],L}),ie=(0,d.memo)(function(e){const n=(0,c.c)(67),{candidates:l,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]!==l||n[2]!==x){let e;n[4]!==x?(e=e=>x[e.id],n[4]=x,n[5]=e):e=n[5],f=l.filter(e),n[1]=l,n[2]=x,n[3]=f}else f=n[3];const j=f,[k,v]=(0,d.useState)(null);let S;n[6]!==j||n[7]!==k?(S=(0,A.consolidationTargets)(j,k),n[6]=j,n[7]=k,n[8]=S):S=n[8];const{winner:w,sourceIds:T}=S;let C;n[9]===Symbol.for("react.memo_cache_sentinel")?(C=e=>{y(t=>{const n=Object.assign({},t);return n[e]?delete n[e]:n[e]=!0,n})},n[9]=C):C=n[9];const _=C;let I;n[10]===Symbol.for("react.memo_cache_sentinel")?(I=e=>{v(e),y(t=>t[e]?t:Object.assign({},t,{[e]:!0}))},n[10]=I):I=n[10];const V=I;let z;n[11]!==j||n[12]!==w?(z=(0,A.canConsolidate)(j,w),n[11]=j,n[12]=w,n[13]=z):z=n[13];const R=z;let L;n[14]!==j||n[15]!==h||n[16]!==T||n[17]!==w?(L=()=>{w&&j.length>=2&&h(w,T)},n[14]=j,n[15]=h,n[16]=T,n[17]=w,n[18]=L):L=n[18];const M=(0,D.useDestructiveHold)(L,"consolidate");let P;n[19]!==M.progress?(P=Math.round(100*M.progress),n[19]=M.progress,n[20]=P):P=n[20];const O=`${P}%`;let E;n[21]!==O?(E=[ve.verbFill,{width:O}],n[21]=O,n[22]=E):E=n[22];const F=E;let W,B,N,G,K,q,U,Y;if(n[23]===Symbol.for("react.memo_cache_sentinel")?(W=(0,$.jsx)(s.Text,{style:ve.sheetTitle,children:"Consolidate"}),B=(0,$.jsx)(s.Text,{style:ve.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]=W,n[24]=B):(W=n[23],B=n[24]),n[25]!==b?(N=b?(0,$.jsx)(s.Text,{style:ve.sendError,testID:"reels-verb-error",children:b}):null,n[25]=b,n[26]=N):N=n[26],n[27]!==l||n[28]!==a||n[29]!==x||n[30]!==w){let e;n[32]!==a||n[33]!==x||n[34]!==w?(e=e=>(0,$.jsx)(oe,{session:e,picked:Boolean(x[e.id]),isWinner:w===e.id,now:a,onToggle:_,onCrown:V},e.id),n[32]=a,n[33]=x,n[34]=w,n[35]=e):e=n[35],G=l.map(e),n[27]=l,n[28]=a,n[29]=x,n[30]=w,n[31]=G}else G=n[31];n[36]!==G?(K=(0,$.jsx)(o.ScrollView,{style:ve.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:ve.link,children:"cancel"}),n[38]=q):q=n[38],n[39]!==u?(U=(0,$.jsx)(i.Pressable,{onPress:u,accessibilityRole:"button",accessibilityLabel:"Cancel and close",style:ve.send,testID:"reels-consolidate-cancel",children:q}),n[39]=u,n[40]=U):U=n[40],n[41]!==R||n[42]!==M.handlers?(Y=R?M.handlers:{},n[41]=R,n[42]=M.handlers,n[43]=Y):Y=n[43];const X=!R,J=R?ve.send:Pe,Q=`Consolidate ${T.length} sessions into the survivor. Hold to confirm.`;let Z;n[44]!==F||n[45]!==M.progress?(Z=M.progress>0?(0,$.jsx)(t.View,{style:F,testID:"reels-consolidate-hold-fill"}):null,n[44]=F,n[45]=M.progress,n[46]=Z):Z=n[46];const ee=`hold to consolidate ${T.length}`;let te,ne,se,ie,le;return n[47]!==M.hint||n[48]!==M.showLabel||n[49]!==ee?(te=H(M.showLabel,M.hint,ee),n[47]=M.hint,n[48]=M.showLabel,n[49]=ee,n[50]=te):te=n[50],n[51]!==te?(ne=(0,$.jsx)(s.Text,{style:ve.link,children:te}),n[51]=te,n[52]=ne):ne=n[52],n[53]!==Y||n[54]!==X||n[55]!==J||n[56]!==Q||n[57]!==Z||n[58]!==ne?(se=(0,$.jsxs)(i.Pressable,Object.assign({},Y,{disabled:X,style:J,accessibilityRole:"button",accessibilityLabel:Q,testID:"reels-consolidate-commit",children:[Z,ne]})),n[53]=Y,n[54]=X,n[55]=J,n[56]=Q,n[57]=Z,n[58]=ne,n[59]=se):se=n[59],n[60]!==U||n[61]!==se?(ie=(0,$.jsxs)(t.View,{style:ve.rowGap,children:[U,se]}),n[60]=U,n[61]=se,n[62]=ie):ie=n[62],n[63]!==N||n[64]!==K||n[65]!==ie?(le=(0,$.jsxs)(t.View,{style:ve.sheet,testID:"reels-consolidate",children:[W,B,N,K,ie]}),n[63]=N,n[64]=K,n[65]=ie,n[66]=le):le=n[66],le}),le=(0,d.memo)(function(e){const n=(0,c.c)(46),{verb:o,icon:l,label:a,onVerb:d}=e,{theme:u}=(0,x.useUnistyles)(),h="terminate"===o,{showLabel:b,progress:p,hint:y,handlers:f}=(0,D.useDestructiveHold)(d,o);let j;n[0]!==d||n[1]!==o?(j=()=>d(o),n[0]=d,n[1]=o,n[2]=j):j=n[2];const k=j;let v;n[3]!==p?(v=Math.round(100*p),n[3]=p,n[4]=v):v=n[4];const S=`${v}%`;let w;n[5]!==S?(w=[ve.verbFill,{width:S}],n[5]=S,n[6]=w):w=n[6];const T=w;if(!h){let e;n[7]!==a||n[8]!==o?(e=F(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]!==l||n[11]!==u.colors.foreground?(c=(0,$.jsx)(l,{size:18,color:u.colors.foreground}),n[10]=l,n[11]=u.colors.foreground,n[12]=c):c=n[12],n[13]!==a?(d=(0,$.jsx)(s.Text,{style:ve.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]!==k?(h=(0,$.jsxs)(i.Pressable,{onPress:k,style:ve.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]=k,n[20]=h):h=n[20],h}let C;n[21]!==a||n[22]!==o?(C=F(o,a),n[21]=a,n[22]=o,n[23]=C):C=n[23];const _=`reels-verb-${o}`;let I,V;n[24]!==T||n[25]!==p?(I=p>0?(0,$.jsx)(t.View,{style:T,testID:"reels-verb-hold-fill"}):null,n[24]=T,n[25]=p,n[26]=I):I=n[26],n[27]!==l||n[28]!==u.colors.destructive?(V=(0,$.jsx)(l,{size:18,color:u.colors.destructive}),n[27]=l,n[28]=u.colors.destructive,n[29]=V):V=n[29];const z=b||y?Ve:ve.verbWord;let R,L,M,P;return n[30]!==a||n[31]!==z?(R=(0,$.jsx)(s.Text,{style:z,children:a}),n[30]=a,n[31]=z,n[32]=R):R=n[32],n[33]!==y||n[34]!==b?(L=H(b,y,"hold to retire"),n[33]=y,n[34]=b,n[35]=L):L=n[35],n[36]!==L?(M=(0,$.jsx)(s.Text,{style:ve.verbHoldLabel,testID:"reels-verb-terminate-hold",children:L}),n[36]=L,n[37]=M):M=n[37],n[38]!==f||n[39]!==R||n[40]!==M||n[41]!==C||n[42]!==_||n[43]!==I||n[44]!==V?(P=(0,$.jsxs)(i.Pressable,Object.assign({},f,{style:ve.verbChip,accessibilityRole:"button",accessibilityLabel:C,hitSlop:8,testID:_,children:[I,V,R,M]})),n[38]=f,n[39]=R,n[40]=M,n[41]=C,n[42]=_,n[43]=I,n[44]=V,n[45]=P):P=n[45],P}),re=(0,d.memo)(function(e){const t=(0,c.c)(10),{everyMs:n,label:o,onPick:l}=e;let a;t[0]!==n||t[1]!==l?(a=()=>l(n),t[0]=n,t[1]=l,t[2]=a):a=t[2];const d=a,u=`reels-automate-${n}`;let h,b;return t[3]!==o?(h=(0,$.jsx)(s.Text,{style:ve.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)(i.Pressable,{onPress:d,style:ve.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}),ae=Object.keys(U).sort((e,t)=>(0,j.getWorkspaceStateBucketPriority)(e)-(0,j.getWorkspaceStateBucketPriority)(t)),ce={today:"Today","3d":"3 days","7d":"7 days","30d":"30 days",stale:"Stale"},de={root:"Top-level",delegated:"Subagent"},ue=k.SESSION_ORIGINS.map(e=>({origin:e,label:de[e]})),he=(0,d.memo)(function(e){const t=(0,c.c)(15),{value:n,label:o,mode:l,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=ze[l],b="include"===l;let p;t[3]!==b?(p=Me(b),t[3]=b,t[4]=p):p=t[4];const x="neutral"===l?o:`${o}, ${"include"===l?"only":"excluded"}`,y=`reels-filter-${n}`,f="exclude"===l?"-":"";let j,k;return t[5]!==o||t[6]!==f?(j=(0,$.jsxs)(s.Text,{style:ve.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?(k=(0,$.jsx)(i.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]=k):k=t[14],k}),be=(0,d.memo)(function(e){const t=(0,c.c)(10),{target:n,label:o,onShare:l}=e;let a;t[0]!==l||t[1]!==n?(a=()=>l(n),t[0]=l,t[1]=n,t[2]=a):a=t[2];const d=a,u=`Send to ${o}`,h=`reels-share-${n}`;let b,p;return t[3]!==o?(b=(0,$.jsx)(s.Text,{style:ve.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)(i.Pressable,{onPress:d,style:ve.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}),ge=(0,d.memo)(function(e){const n=(0,c.c)(43),{verb:o,icon:l,label:a,detail:d,onVerb:u}=e,{theme:h}=(0,x.useUnistyles)(),b="terminate"===o,{showLabel:p,progress:y,hint:f,handlers:j}=(0,D.useDestructiveHold)(u,o);let k;n[0]!==u||n[1]!==o?(k=()=>u(o),n[0]=u,n[1]=o,n[2]=k):k=n[2];const v=k;let S;n[3]!==y?(S=Math.round(100*y),n[3]=y,n[4]=S):S=n[4];const w=`${S}%`;let T;n[5]!==w?(T=[ve.verbFill,{width:w}],n[5]=w,n[6]=T):T=n[6];const C=T;let _;n[7]!==b||n[8]!==j||n[9]!==v?(_=b?j:{onPress:v},n[7]=b,n[8]=j,n[9]=v,n[10]=_):_=n[10];const I=_;let V;n[11]!==a||n[12]!==o?(V=F(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]!==C?(R=b&&y>0?(0,$.jsx)(t.View,{style:C,testID:"reels-taco-hold-fill"}):null,n[14]=b,n[15]=y,n[16]=C,n[17]=R):R=n[17];const L=b?h.colors.destructive:h.colors.foreground;let M,P,A,O,E,W,B;return n[18]!==l||n[19]!==L?(M=(0,$.jsx)(t.View,{style:ve.pickMark,children:(0,$.jsx)(l,{size:16,color:L})}),n[18]=l,n[19]=L,n[20]=M):M=n[20],n[21]!==a?(P=(0,$.jsx)(s.Text,{style:ve.pickName,children:a}),n[21]=a,n[22]=P):P=n[22],n[23]!==b||n[24]!==d||n[25]!==f||n[26]!==p?(A=b?H(p,f,"hold to retire"):d,n[23]=b,n[24]=d,n[25]=f,n[26]=p,n[27]=A):A=n[27],n[28]!==A?(O=(0,$.jsx)(s.Text,{style:ve.hint,children:A}),n[28]=A,n[29]=O):O=n[29],n[30]!==o?(E=N.has(o)?(0,$.jsx)(s.Text,{style:ve.pickAux,children:"not wired yet"}):null,n[30]=o,n[31]=E):E=n[31],n[32]!==P||n[33]!==O||n[34]!==E?(W=(0,$.jsxs)(t.View,{style:ve.grow,children:[P,O,E]}),n[32]=P,n[33]=O,n[34]=E,n[35]=W):W=n[35],n[36]!==I||n[37]!==M||n[38]!==W||n[39]!==V||n[40]!==z||n[41]!==R?(B=(0,$.jsxs)(i.Pressable,Object.assign({},I,{style:ve.pickRow,accessibilityRole:"button",accessibilityLabel:V,testID:z,children:[R,M,W]})),n[36]=I,n[37]=M,n[38]=W,n[39]=V,n[40]=z,n[41]=R,n[42]=B):B=n[42],B});function pe(e,t,n){if(t>0){const n=1===t?"filter":"filters";return{filteredOut:!0,exit:"clear-filters",message:`No sessions match. ${e.length} in the fleet, ${t} ${n} on.`}}const s=e.filter(e=>(0,R.isSnoozed)(e,n));if(0===s.length)return{filteredOut:!1,exit:"leave",message:"No sessions in the ring."};const o=s.map(e=>e.snoozedUntil?Date.parse(e.snoozedUntil):Number.NaN).filter(e=>Number.isFinite(e)&&e>n.getTime()).sort((e,t)=>e-t)[0],i=o?` Next one wakes ${xe(new Date(o),n)}.`:"",l=1===s.length?"session is":"sessions are";return{filteredOut:!1,exit:"leave",message:`All ${s.length} ${l} snoozed.${i}`}}function xe(e,t){const n=e.getTime()-t.getTime();if(!Number.isFinite(n)||n<=0)return"any moment";const s=Math.round(n/6e4);if(s<60)return s<1?"any moment":`in ${s}m`;const o=Math.round(s/60);return o<24?`in ${o}h`:`in ${Math.round(o/24)}d`}function ye(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 me=(0,d.memo)(function({mode:e,text:n,active:o}){const i=(0,d.useRef)(new a.Animated.Value(0)).current,l=o&&"text"===e&&n.length>0;(0,d.useEffect)(()=>{if(!l)return;const e=a.Animated.loop(a.Animated.sequence([a.Animated.timing(i,{toValue:-96,duration:24e3,easing:u.default.inOut(u.default.quad),useNativeDriver:!1}),a.Animated.timing(i,{toValue:0,duration:24e3,easing:u.default.inOut(u.default.quad),useNativeDriver:!1})]));return e.start(),()=>{e.stop(),i.setValue(0)}},[l,i]);const c=(0,d.useMemo)(()=>({transform:[{translateY:i}]}),[i]);return"off"===e?null:(0,$.jsx)(t.View,{style:"text"===e?Ae:ve.background,testID:`reels-background-${e}`,children:"text"===e?(0,$.jsx)(a.Animated.View,{style:c,children:(0,$.jsx)(s.Text,{style:ve.backgroundBody,numberOfLines:40,children:n})}):null})}),fe=(0,d.memo)(function(e){const n=(0,c.c)(35),{gated:o,allTags:i,onPickTag:l,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]!==i||n[1]!==l?(e=(0,$.jsx)(C.TagGate,{available:i,onPick:l}),n[0]=i,n[1]=l,n[2]=e):e=n[2],n[3]!==f?(o=f?(0,$.jsx)(s.Text,{style:ve.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,$.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,i,l,a;return n[8]!==y?(e=(0,$.jsx)(s.Text,{style:ve.hint,children:y}),n[8]=y,n[9]=e):e=n[9],n[10]===Symbol.for("react.memo_cache_sentinel")?(o=(0,$.jsx)(s.Text,{style:ve.cardTapHint,children:"Decisions are done for today. You can still retire or snooze this one."}),n[10]=o):o=n[10],n[11]!==p?(i=C.TACO_VERBS.map(e=>(0,$.jsx)(le,{verb:e.id,icon:e.icon,label:e.label,onVerb:p},e.id)),n[11]=p,n[12]=i):i=n[12],n[13]!==i?(l=(0,$.jsx)(t.View,{style:ve.rowGap,children:i}),n[13]=i,n[14]=l):l=n[14],n[15]!==e||n[16]!==l?(a=(0,$.jsxs)(t.View,{testID:"reels-cap-reached",children:[e,o,l]}),n[15]=e,n[16]=l,n[17]=a):a=n[17],a}let e;n[18]!==d?(e=q(d),n[18]=d,n[19]=e):e=n[19];const{shown:o,hidden:i}=e;let l,a,c;return n[20]!==h||n[21]!==b||n[22]!==u||n[23]!==o?(l=(0,$.jsx)(T.DecisionChips,{serverId:u,agentId:h,decisions:o,onAnswered:b}),n[20]=h,n[21]=b,n[22]=u,n[23]=o,n[24]=l):l=n[24],n[25]!==i?(a=i>0?(0,$.jsx)(s.Text,{style:ve.hint,testID:"reels-decisions-overflow",children:1===i?"1 more decision in the digest.":`${i} more decisions in the digest.`}):null,n[25]=i,n[26]=a):a=n[26],n[27]!==l||n[28]!==a?(c=(0,$.jsxs)($.Fragment,{children:[l,a]}),n[27]=l,n[28]=a,n[29]=c):c=n[29],c}let j,k,v;return n[30]===Symbol.for("react.memo_cache_sentinel")?(j=(0,$.jsx)(s.Text,{style:ve.hint,children:"Nothing to decide. Why is this still open?"}),n[30]=j):j=n[30],n[31]!==p?(k=C.TACO_VERBS.map(e=>(0,$.jsx)(le,{verb:e.id,icon:e.icon,label:e.label,onVerb:p},e.id)),n[31]=p,n[32]=k):k=n[32],n[33]!==k?(v=(0,$.jsxs)(t.View,{testID:"reels-taco-row",children:[j,(0,$.jsx)(t.View,{style:ve.rowGap,children:k})]}),n[33]=k,n[34]=v):v=n[34],v}),je=(0,d.memo)(function(e){const n=(0,c.c)(82),{overlay:l,session:a,ring:d,now:u,decisionTarget:h,onClose:b,onSend:p,onSnooze:x,onConsolidate:y,onKanban:j,onVerb:k,overlayStyle:w,sendError:T,timeFieldDisarmed:_,actAllowed:I,verbError:D,openDecisions:V,onShare:z,onAutomate:R,allTags:L,allProviders:M,statusSelection:P,tagSelection:A,kanbanSelection:O,providerSelection:E,originSelection:H,timeSelection:F,onCycleStatus:W,onCycleTag:B,onCycleKanban:N,onCycleProvider:G,onCycleOrigin:K,onToggleTimeWindow:q}=e,U=a;let X;n[0]!==q?(X=e=>q(e),n[0]=q,n[1]=X):X=n[1];const J=X,ee=(0,S.useKanbanBuckets)();Q("none"!==l.kind,b);const te="caption"===l.kind;let ne,se,oe,le,de,pe,xe,ye,me;return n[2]!==I||n[3]!==U||n[4]!==h||n[5]!==b||n[6]!==p||n[7]!==V||n[8]!==T||n[9]!==te?(ne=(0,$.jsx)(Z,{session:U,visible:te,onClose:b,onSend:p,sendError:T,openDecisions:V,target:h,actAllowed:I},U.id),n[2]=I,n[3]=U,n[4]=h,n[5]=b,n[6]=p,n[7]=V,n[8]=T,n[9]=te,n[10]=ne):ne=n[10],n[11]!==U.snoozeCount||n[12]!==u||n[13]!==b||n[14]!==x||n[15]!==l.kind||n[16]!==w||n[17]!==D?(se="snooze"===l.kind?(0,$.jsx)(t.View,{style:w,children:(0,$.jsxs)(t.View,{children:[(0,$.jsx)(C.SnoozeSheet,{priorCount:U.snoozeCount,now:u,onCancel:b,onSnooze:x}),D?(0,$.jsx)(s.Text,{style:ve.sendError,testID:"reels-verb-error",children:D}):null]})}):null,n[11]=U.snoozeCount,n[12]=u,n[13]=b,n[14]=x,n[15]=l.kind,n[16]=w,n[17]=D,n[18]=se):se=n[18],n[19]!==u||n[20]!==b||n[21]!==y||n[22]!==l.kind||n[23]!==w||n[24]!==d||n[25]!==D?(oe="consolidate"===l.kind?(0,$.jsx)(t.View,{style:w,children:(0,$.jsx)(ie,{candidates:d,now:u,onCancel:b,onConsolidate:y,verbError:D})}):null,n[19]=u,n[20]=b,n[21]=y,n[22]=l.kind,n[23]=w,n[24]=d,n[25]=D,n[26]=oe):oe=n[26],n[27]!==b||n[28]!==k||n[29]!==l.kind||n[30]!==w?(le="taco"===l.kind?(0,$.jsx)(t.View,{style:w,children:(0,$.jsxs)(t.View,{style:ve.sheet,testID:"reels-taco-sheet",children:[(0,$.jsx)(s.Text,{style:ve.sheetTitle,children:"TACO"}),C.TACO_VERBS.map(e=>(0,$.jsx)(ge,{verb:e.id,icon:e.icon,label:e.label,detail:e.detail,onVerb:k},e.id)),(0,$.jsx)(i.Pressable,{onPress:b,accessibilityRole:"button",accessibilityLabel:"Cancel and close",style:ve.send,testID:"reels-taco-cancel",children:(0,$.jsx)(s.Text,{style:ve.link,children:"cancel"})})]})}):null,n[27]=b,n[28]=k,n[29]=l.kind,n[30]=w,n[31]=le):le=n[31],n[32]!==M||n[33]!==L||n[34]!==ee||n[35]!==O||n[36]!==b||n[37]!==N||n[38]!==K||n[39]!==G||n[40]!==W||n[41]!==B||n[42]!==J||n[43]!==H||n[44]!==l.kind||n[45]!==w||n[46]!==E||n[47]!==P||n[48]!==A||n[49]!==_||n[50]!==F?(de="filters"===l.kind?(0,$.jsx)(t.View,{style:w,children:(0,$.jsxs)(o.ScrollView,{style:ve.sheet,testID:"reels-filters-sheet",children:[(0,$.jsx)(s.Text,{style:ve.sheetTitle,children:"Filter the ring"}),(0,$.jsx)(s.Text,{style:ve.hint,children:"The same filter the sessions list uses, so setting it here sets it there."}),(0,$.jsx)(s.Text,{style:ve.fieldLabel,children:"State"}),(0,$.jsx)(t.View,{style:ve.rowGap,children:ae.map(e=>(0,$.jsx)(he,{value:e,label:Y(e),mode:(0,f.getFilterValueMode)(P,e),onCycle:W},e))}),(0,$.jsx)(s.Text,{style:ve.fieldLabel,children:"Kanban"}),(0,$.jsx)(t.View,{style:ve.rowGap,children:ee.map(e=>(0,$.jsx)(he,{value:e.id,label:e.label,mode:(0,f.getFilterValueMode)(O,e.id),onCycle:N},e.id))}),(0,$.jsx)(s.Text,{style:ve.fieldLabel,children:"Tag"}),(0,$.jsx)(t.View,{style:ve.rowGap,children:L.map(e=>(0,$.jsx)(he,{value:e,label:e,mode:(0,f.getFilterValueMode)(A,e),onCycle:B},e))}),(0,$.jsx)(s.Text,{style:ve.fieldLabel,children:"Date"}),_?(0,$.jsx)(s.Text,{style:ve.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:ve.rowGap,children:v.SESSION_TIME_WINDOWS.map(e=>(0,$.jsx)(he,{value:e,label:ce[e],mode:"window"===F?.kind&&F.window===e?"include":"neutral",onCycle:J},e))}),(0,$.jsx)(s.Text,{style:ve.fieldLabel,children:"Provider"}),(0,$.jsx)(t.View,{style:ve.rowGap,children:M.map(e=>(0,$.jsx)(he,{value:e,label:e,mode:(0,f.getFilterValueMode)(E,e),onCycle:G},e))}),(0,$.jsx)(s.Text,{style:ve.fieldLabel,children:"Origin"}),(0,$.jsx)(t.View,{style:ve.rowGap,children:ue.map(e=>(0,$.jsx)(he,{value:e.origin,label:e.label,mode:(0,f.getFilterValueMode)(H,e.origin),onCycle:K},e.origin))}),(0,$.jsx)(i.Pressable,{onPress:b,accessibilityRole:"button",accessibilityLabel:"Done, close filters",style:ve.send,testID:"reels-filters-done",children:(0,$.jsx)(s.Text,{style:ve.link,children:"done"})})]})}):null,n[32]=M,n[33]=L,n[34]=ee,n[35]=O,n[36]=b,n[37]=N,n[38]=K,n[39]=G,n[40]=W,n[41]=B,n[42]=J,n[43]=H,n[44]=l.kind,n[45]=w,n[46]=E,n[47]=P,n[48]=A,n[49]=_,n[50]=F,n[51]=de):de=n[51],n[52]!==R||n[53]!==b||n[54]!==l.kind||n[55]!==w||n[56]!==D?(pe="automate"===l.kind?(0,$.jsx)(t.View,{style:w,children:(0,$.jsxs)(t.View,{style:ve.sheet,testID:"reels-automate-sheet",children:[(0,$.jsx)(s.Text,{style:ve.sheetTitle,children:"Automate"}),(0,$.jsx)(s.Text,{style:ve.hint,children:"Re-runs this session on a cadence, with its next step as the prompt."}),D?(0,$.jsx)(s.Text,{style:ve.sendError,testID:"reels-verb-error",children:D}):null,Ee.map(e=>(0,$.jsx)(re,{everyMs:e.everyMs,label:e.label,onPick:R},e.id)),(0,$.jsx)(i.Pressable,{onPress:b,accessibilityRole:"button",accessibilityLabel:"Cancel and close",style:ve.send,testID:"reels-automate-cancel",children:(0,$.jsx)(s.Text,{style:ve.link,children:"cancel"})})]})}):null,n[52]=R,n[53]=b,n[54]=l.kind,n[55]=w,n[56]=D,n[57]=pe):pe=n[57],n[58]!==b||n[59]!==z||n[60]!==l.kind||n[61]!==w||n[62]!==D?(xe="share"===l.kind?(0,$.jsx)(t.View,{style:w,children:(0,$.jsxs)(t.View,{style:ve.sheet,testID:"reels-share-sheet",children:[(0,$.jsx)(s.Text,{style:ve.sheetTitle,children:"Send"}),(0,$.jsx)(s.Text,{style:ve.hint,children:"Send this card somewhere a person will read it."}),D?(0,$.jsx)(s.Text,{style:ve.sendError,testID:"reels-verb-error",children:D}):null,Se.map(e=>(0,$.jsx)(be,{target:e.id,label:e.label,onShare:z},e.id)),(0,$.jsx)(i.Pressable,{onPress:b,accessibilityRole:"button",accessibilityLabel:"Cancel and close",style:ve.send,testID:"reels-share-cancel",children:(0,$.jsx)(s.Text,{style:ve.link,children:"cancel"})})]})}):null,n[58]=b,n[59]=z,n[60]=l.kind,n[61]=w,n[62]=D,n[63]=xe):xe=n[63],n[64]!==U.kanban||n[65]!==U.model||n[66]!==U.provider||n[67]!==b||n[68]!==j||n[69]!==l.kind||n[70]!==w||n[71]!==D?(ye="options"===l.kind?(0,$.jsx)(t.View,{style:w,children:(0,$.jsxs)(o.ScrollView,{style:ve.sheet,testID:"reels-options-sheet",children:[(0,$.jsx)(s.Text,{style:ve.sheetTitle,children:"Session options"}),(0,$.jsx)(s.Text,{style:ve.fieldLabel,children:"Kanban"}),(0,$.jsx)(C.KanbanPicker,{current:U.kanban,onPick:j}),D?(0,$.jsx)(s.Text,{style:ve.sendError,testID:"reels-verb-error",children:D}):null,(0,$.jsx)(s.Text,{style:ve.fieldLabel,children:"Provider and model"}),(0,$.jsx)(s.Text,{style:ve.fieldValue,children:U.model?`${U.provider}/${U.model}`:U.provider}),(0,$.jsx)(i.Pressable,{onPress:b,accessibilityRole:"button",accessibilityLabel:"Close session options",style:ve.send,testID:"reels-options-close",children:(0,$.jsx)(s.Text,{style:ve.link,children:"close"})})]})}):null,n[64]=U.kanban,n[65]=U.model,n[66]=U.provider,n[67]=b,n[68]=j,n[69]=l.kind,n[70]=w,n[71]=D,n[72]=ye):ye=n[72],n[73]!==ye||n[74]!==ne||n[75]!==se||n[76]!==oe||n[77]!==le||n[78]!==de||n[79]!==pe||n[80]!==xe?(me=(0,$.jsxs)($.Fragment,{children:[ne,se,oe,le,de,pe,xe,ye]}),n[73]=ye,n[74]=ne,n[75]=se,n[76]=oe,n[77]=le,n[78]=de,n[79]=pe,n[80]=xe,n[81]=me):me=n[81],me}),ke=(0,d.memo)(function({sessions:e,allTags:n,actCap:o=L.DEFAULT_ACT_CAP,background:l="text",now:a,onLeaveRing:c}){const u=(0,V.useReelsVerbs)(),{answer:h}=(0,I.useAnswerDecision)(),[b,x]=(0,d.useState)(()=>Date.now());(0,d.useEffect)(()=>{if(a)return;const e=setInterval(()=>x(Date.now()),6e4);return()=>clearInterval(e)},[a]);const f=(0,d.useMemo)(()=>a??new Date(b),[a,b]),[j,k]=(0,d.useState)(1),v=(0,M.useActBudgetStore)(e=>e.recordAct),S=(0,M.useActBudgetStore)(e=>(0,M.actsOn)(e,f)),T=(0,M.useActBudgetStore)(e=>e.hydrated),D=(0,d.useCallback)(()=>v(f),[f,v]),[A,O]=(0,d.useState)(0),E=(0,d.useRef)(0),H=(0,d.useRef)(1);E.current=A;const[F,N]=(0,d.useState)({kind:"none"}),[K,q]=(0,d.useState)({}),[U,Y]=(0,d.useState)({}),[X,Q]=(0,d.useState)(null),[Z,ee]=(0,d.useState)(B),te=(0,d.useCallback)((e,t)=>{ee(n=>Object.assign({},n,{[e]:t}))},[]),ne=(0,d.useRef)(null),{feed:se,activeFilters:oe,statusSelection:ie,tagSelection:le,kanbanSelection:re,providerSelection:ae,originSelection:ce,timeSelection:de,onCycleStatus:ue,onCycleTag:he,onCycleKanban:be,onCycleProvider:ge,onCycleOrigin:xe,onToggleTimeWindow:ke,onClearFilters:Se,timeFieldDisarmed:we}=(0,z.useReelsFeed)({sessions:e,localTags:K,actedLaps:U,laps:j,now:f,enteredLap:H.current}),Ce=(0,d.useMemo)(()=>[...new Set(e.map(e=>e.provider))].sort(),[e]),Ie=Math.min(A,Math.max(se.length-1,0)),De=se[Ie]??null,Ve=De?.session??null,ze=De?.lap??1;H.current=Math.max(H.current,ze);const Re=(0,d.useMemo)(()=>se.findIndex(e=>e.lap===ze),[se,ze]),Le=(0,d.useMemo)(()=>se.filter(e=>e.lap===ze).length,[se,ze]),Me=(0,d.useMemo)(()=>se.filter(e=>e.lap===ze).map(e=>e.session),[se,ze]),Pe=Ve?.id??"",Ae=Ve?.serverId??"",{allowMove:Ee}=(0,w.useKanbanMoveGuard)(Ae),He=(0,d.useMemo)(()=>{return Ve?(e=Ve.digest,(e?.pendingDecisions??[]).filter(e=>!e.answeredAt)):[];var e},[Ve]),Fe=He[0]??null,We=(0,d.useMemo)(()=>He.map(e=>({id:e.id,question:e.question})),[He]),Be=He,Ne=!!Ve&&0===Ve.tags.length,Ge=T&&(0,L.canAct)({acts:S,cap:o}),Ke=(0,L.actCapLabel)({acts:S,cap:o}),qe=(0,p.useSafeAreaInsets)(),Ue=(0,d.useMemo)(()=>[ve.headerSlot,{paddingTop:qe.top}],[qe.top]),Ye=(0,d.useMemo)(()=>[ve.seamBanner,{paddingTop:qe.top+56}],[qe.top]),Xe=(0,d.useMemo)(()=>[ve.overlay,{paddingTop:qe.top,paddingBottom:qe.bottom}],[qe.bottom,qe.top]),Je=(0,d.useCallback)(()=>{N({kind:"none"}),ne.current?.scrollToIndex(E.current+1)},[]),Qe=(0,d.useCallback)(e=>{Y(t=>Object.assign({},t,{[e]:ze}))},[ze]),Ze=(0,d.useCallback)(()=>{k(e=>e+1)},[]),et=(0,d.useMemo)(()=>[{id:"read",icon:y.BookOpen,label:"read"},{id:"snooze",icon:y.AlarmClock,label:"snooze",disabled:Ne},{id:"share",icon:y.Send,label:"send"},{id:"taco",icon:y.LayoutList,label:"TACO",disabled:Ne},{id:"archive",icon:y.Archive,label:"archive",destructive:!0},{id:"options",icon:y.MoreHorizontal,label:"options"}],[Ne]),tt=(0,d.useCallback)(()=>N({kind:"caption"}),[]),nt=(0,d.useCallback)(()=>N({kind:"none"}),[]),st=(0,d.useCallback)(()=>N({kind:"filters"}),[]),ot=(0,d.useCallback)(e=>{q(t=>{const n=Object.assign({},t);return delete n[e],n})},[]),it=(0,d.useCallback)(e=>{q(t=>Object.assign({},t,{[Pe]:[e]})),te("tag",null),u.setTags({serverId:Ae,agentId:Pe},[e]).catch(e=>{ot(Pe),te("tag",(0,P.userFacingError)(e,"could not tag this session"))})},[Pe,ot,Ae,te,u]),lt=(0,d.useCallback)(()=>{D(),Qe(Pe),He.length<=1&&Je()},[Je,Pe,He.length,Qe,D]),rt=(0,d.useCallback)(async e=>{if("terminate"===e)return await u.terminate({serverId:Ae,agentId:Pe}),Qe(Pe),void Je();ee(B),N({kind:Oe[e]})},[Je,Pe,Qe,Ae,u]),at=(0,d.useCallback)(e=>{if(ee(B),"archive"===e)return rt("terminate");const t=$e[e];t&&N({kind:t})},[rt]),ct=(0,d.useCallback)(e=>{te("snooze",null),u.snooze({serverId:Ae,agentId:Pe},e.until,e.untilWhat,e.why).then(()=>(Qe(Pe),Je(),null)).catch(e=>{te("snooze",(0,P.userFacingError)(e,"could not snooze this session"))})},[Je,Pe,Qe,Ae,te,u]),dt=(0,d.useCallback)((e,t)=>{te("consolidate",null),u.consolidate({serverId:Ae,winnerId:e,sourceIds:t}).then(()=>{for(const n of[e,...t])Qe(n);return Je(),null}).catch(e=>{te("consolidate",(0,P.userFacingError)(e,"could not consolidate these sessions"))})},[Je,Qe,Ae,te,u]),ut=(0,d.useCallback)(e=>{if(!Ge)return void N({kind:"none"});const t=e.trim();0!==t.length&&Fe?(Q(null),h({serverId:Ae,agentId:Pe,decisionId:Fe.id,optionId:null,note:t}).then(()=>(lt(),null)).catch(e=>{Q((0,P.userFacingError)(e,"could not send that answer"))})):N({kind:"none"})},[Ge,h,Pe,Fe,lt,Ae]),ht=(0,d.useCallback)(e=>{Ve&&(te("share",null),u.share(e,Te(Ve)).then(()=>(N({kind:"none"}),null)).catch(e=>{te("share",(0,P.userFacingError)(e,"could not open that"))}))},[Ve,te,u]),bt=(0,d.useCallback)(e=>{if(!Ve)return;te("automate",null);const t=Ve.digest?.nextStep??Ve.digest?.goal??`Continue ${Ve.title}`;u.automate({serverId:Ae,agentId:Pe},e,t,Ve.title).then(()=>(Qe(Pe),Je(),null)).catch(e=>{te("automate",(0,P.userFacingError)(e,"could not create the routine"))})},[Je,Ve,Pe,Qe,Ae,te,u]),gt=(0,d.useCallback)(e=>{te("kanban",null),Ee(e,Ve?.kanban??null)&&u.setKanban({serverId:Ae,agentId:Pe},e).then(()=>(N({kind:"none"}),null)).catch(e=>{te("kanban",(0,P.userFacingError)(e,"could not move this session"))})},[Ee,Ve?.kanban,Pe,Ae,te,u]),pt=(0,d.useCallback)((e,o)=>{const a=o===Ie,c=e.session;return(0,$.jsxs)(t.View,{style:ve.card,children:[(0,$.jsx)(me,{mode:l,text:ye(c),active:a}),e.firstOfLap&&e.lap>1?(0,$.jsx)(t.View,{style:Ye,testID:`reels-seam-${e.lap}`,children:(0,$.jsx)(C.LapSeam,{lap:e.lap,ringSize:se.filter(t=>t.lap===e.lap-1).length||Me.length,acted:(0,R.actedThisLap)(se.filter(t=>t.lap===e.lap-1).map(e=>e.session),e.lap-1)})}):null,(0,$.jsx)(t.View,{style:ve.middle,children:a?(0,$.jsx)(C.ReelsRail,{actions:et,contextLabel:c.tags[0]??"untagged",onAction:at}):null}),(0,$.jsxs)(t.View,{style:ve.bottom,children:[(0,$.jsxs)(i.Pressable,{onPress:a?tt:void 0,disabled:!a,testID:a?"reels-caption-open":void 0,accessibilityRole:"button",accessibilityLabel:`Open the full digest for ${c.title}`,style:ve.captionTap,children:[(0,$.jsx)(s.Text,{style:ve.cardTitle,children:c.title}),(0,$.jsx)(s.Text,{style:ve.cardMeta,children:J(c,f)}),(0,$.jsx)(s.Text,{style:ve.cardSummary,numberOfLines:4,children:c.digest?.summary??c.digest?.goal??"No digest yet."}),a?(0,$.jsx)(s.Text,{style:ve.cardTapHint,children:"tap for the whole digest and to talk to it"}):null]}),a?(0,$.jsx)(fe,{gated:Ne,allTags:n,onPickTag:it,decision:Fe,decisions:Be,serverId:c.serverId,agentId:c.id,onAnswered:lt,onVerb:rt,actAllowed:Ge,capLabel:Ke,tagError:Z.tag}):null]})]})},[n,Ge,l,Ke,Z.tag,Fe,Be,se,f,Ne,Ie,lt,at,rt,tt,it,et,Me.length,Ye]);if(!Ve){const{message:n,exit:o}=pe(e,oe,f);return(0,$.jsxs)(t.View,{style:ve.empty,testID:"reels-empty",children:[(0,$.jsx)(s.Text,{style:ve.fieldValue,children:n}),"clear-filters"===o?(0,$.jsx)(i.Pressable,{onPress:Se,style:ve.send,accessibilityRole:"button",accessibilityLabel:"Clear all filters",testID:"reels-empty-clear-filters",children:(0,$.jsx)(s.Text,{style:ve.link,children:"clear filters"})}):(0,$.jsx)(i.Pressable,{onPress:c,style:ve.send,accessibilityRole:"button",accessibilityLabel:"Back to the sessions list",testID:"reels-empty-leave",children:(0,$.jsx)(s.Text,{style:ve.link,children:"back to sessions"})})]})}return(0,$.jsxs)(t.View,{style:ve.root,testID:"reels-screen",children:[(0,$.jsx)(_.ReelsPager,{data:se,keyExtractor:G,renderCard:pt,onIndexChange:O,onEndReached:Ze,controllerRef:ne}),(0,$.jsx)(t.View,{style:Ue,pointerEvents:"box-none",children:(0,$.jsx)(C.ReelsHeader,{acts:S,cap:o,activeFilters:oe,onFilter:st,position:`${Re>=0?A-Re+1:A+1}/${Le} \xb7 lap ${ze}`})}),(0,$.jsx)(je,{overlay:F,session:Ve,ring:Me,now:f,decisionTarget:Fe,onClose:nt,onSend:ut,actAllowed:Ge,timeFieldDisarmed:we,onSnooze:ct,onConsolidate:dt,onKanban:gt,onVerb:rt,overlayStyle:Xe,sendError:X,verbError:Z[W[F.kind]??"share"],openDecisions:We,onShare:ht,onAutomate:bt,allTags:n,allProviders:Ce,statusSelection:ie,tagSelection:le,kanbanSelection:re,providerSelection:ae,originSelection:ce,timeSelection:de,onCycleStatus:ue,onCycleTag:he,onCycleKanban:be,onCycleProvider:ge,onCycleOrigin:xe,onToggleTimeWindow:ke})]})}),ve=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]},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]}})),Se=[{id:"whatsapp",label:"WhatsApp"},{id:"slack",label:"Slack"},{id:"email",label:"Email"}],we=400;function Te(e){const t=[`${e.title} (${Y(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>we?`${t.slice(0,399)}\u2026`:t}const Ce=[ve.fieldValue,ve.fieldDanger],Ie=[ve.sheetTitle,ve.sheetHeadTitle],De=[ve.pickRow,ve.pickRowOn],Ve=[ve.verbWord,ve.verbWordDanger],ze={include:[ve.tagChip,ve.tagChipOn],exclude:[ve.tagChip,ve.tagChipOff],neutral:ve.tagChip},Re={selected:!0},Le={selected:!1},Me=e=>e?Re:Le,Pe=[ve.send,ve.dim],Ae=[ve.background,ve.backgroundText],$e={read:"caption",snooze:"snooze",share:"share",taco:"taco",options:"options"},Oe={consolidate:"consolidate",outsource:"share",automate:"automate"},Ee=[{id:"hourly",label:"Every hour",everyMs:36e5},{id:"daily",label:"Every day",everyMs:864e5},{id:"weekly",label:"Every week",everyMs:6048e5}];function He(e,t){return O(t.dy)}function Fe(e){return`${e.kind}: ${e.label??e.url}`}},4569,[348,2838,349,2815,2476,4017,3516,350,36,140,616,252,591,659,649,25,546,182,234,571,146,558,56,811,3619,3442,3621,3618,4007,4009,4013,4016,4570,4014,4019,4571,4572,4573,4018,4575,4020,4576,279]);
|
|
16328
|
+
__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=E,_e.shouldCloseOnDrag=H,_e.destructiveHint=F,_e.verbAccessibilityLabel=W,Object.defineProperty(_e,"UNWIRED_VERBS",{enumerable:!0,get:function(){return G}}),Object.defineProperty(_e,"CARD_DECISION_LIMIT",{enumerable:!0,get:function(){return U}}),_e.visibleDecisions=q,_e.bucketLabel=X,_e.relativeAge=J,_e.cardMetaLine=Q,_e.consolidateRowLabel=oe,_e.emptyRingState=xe,_e.relativeWake=ye,_e.backgroundTextFor=me,Object.defineProperty(_e,"ReelsScreen",{enumerable:!0,get:function(){return ve}}),_e.shareTextFor=Ce;var t=r(d[0]),n=r(d[1]),s=r(d[2]),o=r(d[3]),i=r(d[4]),l=r(d[5]),a=r(d[6]),c=r(d[7]),u=r(d[8]);r(d[9]);e(r(d[10]));var h=e(r(d[11])),b=e(r(d[12]));r(d[13]);var p=e(r(d[14]));r(d[15]),r(d[16]),r(d[17]),r(d[18]),r(d[19]),r(d[20]);var x=r(d[21]),y=r(d[22]),f=r(d[23]),j=r(d[24]),k=r(d[25]),v=r(d[26]),w=r(d[27]),S=r(d[28]),T=r(d[29]),C=r(d[30]),_=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]),A=r(d[39]),M=r(d[40]),$=r(d[41]),O=r(d[42]);function E(e){return e>8}function H(e){return e>60}function F(e,t,n){return t&&"hold"!==t?t:e||"hold"===t?"hold to retire, this cannot be undone":n}function W(e,t){return"terminate"===e?`${t}. Hold to confirm, this cannot be undone.`:G.has(e)?`${t}. Not wired yet.`:t}const B={automate:"automate",share:"share",snooze:"snooze",options:"kanban",consolidate:"consolidate"},N={share:null,automate:null,snooze:null,kanban:null,tag:null,consolidate:null},G=new Set([]);function K(e){return e.key}const U=3;function q(e){return{shown:e.slice(0,U),hidden:Math.max(e.length-U,0)}}const Y={needs_input:"needs you",failed:"failed",attention:"wants a look",pending:"waiting",running:"running",done:"done"};function X(e){return Y[e]??e.replace(/_/g," ")}function J(e,t=new Date){if(!e)return"";const n=t.getTime()-e.getTime();if(!Number.isFinite(n))return"";if(n<0)return"just now";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[X(String(e.statusBucket)),J(e.lastActivityAt,t),e.model?`${e.provider}/${e.model}`:e.provider].filter(e=>e.length>0).join(" \xb7 ")}function Z(e,t){const n=(0,c.c)(8);let s,o,i,l;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,u.useEffect)(s,o),n[4]!==e||n[5]!==t?(i=()=>{},l=[e,t],n[4]=e,n[5]=t,n[6]=i,n[7]=l):(i=n[6],l=n[7]),(0,u.useEffect)(i,l)}const ee=(0,u.memo)(function(e){const a=(0,c.c)(92),{session:h,visible:y,onClose:f,onSend:j,sendError:k,openDecisions:v,target:w,actAllowed:T,onAnswered:_}=e,[I,D]=(0,u.useState)(""),V=w?.question??null,z=h.digest;let R;a[0]!==j||a[1]!==I?(R=()=>{const e=I.trim();e.length>0&&(j(e),D(""))},a[0]=j,a[1]=I,a[2]=R):R=a[2];const L=R,P=(0,x.useSafeAreaInsets)(),A=we.captionSheet,[M,$]=(0,u.useState)(!1);let E,F;a[3]===Symbol.for("react.memo_cache_sentinel")?(E=()=>{const e=b.default.addListener("keyboardDidShow",()=>$(!0)),t=b.default.addListener("keyboardDidHide",()=>$(!1));return()=>{e.remove(),t.remove()}},F=[],a[3]=E,a[4]=F):(E=a[3],F=a[4]),(0,u.useEffect)(E,F);const W=M&&!1?0:P.bottom;let B;a[5]!==W?(B=[we.sheetInner,{paddingBottom:W}],a[5]=W,a[6]=B):B=a[6];const N=B;let G;a[7]!==f?(G=p.default.create({onMoveShouldSetPanResponder:Fe,onPanResponderRelease:(e,t)=>{H(t.dy)&&f()}}),a[7]=f,a[8]=G):G=a[8];const K=G;Z(y,f);const U=T&&v.length>0;let q,Y,X;a[9]!==T?(q=T?null:(0,O.jsx)(s.Text,{style:we.composerLabel,testID:"reels-composer-capped",children:"Decisions are done for today. This one keeps until tomorrow."}),a[9]=T,a[10]=q):q=a[10],a[11]!==T||a[12]!==V||a[13]!==v.length||a[14]!==L||a[15]!==I?(Y=T?(0,O.jsxs)(O.Fragment,{children:[V?(0,O.jsx)(s.Text,{style:we.composerLabel,numberOfLines:2,testID:"reels-composer-target",children:v.length>1?`Answering the first of ${v.length} open decisions: ${V}`:`Answering: ${V}`}):null,(0,O.jsxs)(t.View,{style:we.composer,children:[(0,O.jsx)(n.TextInput,{value:I,onChangeText:D,placeholder:V?"in your own words":"say what to do",style:we.composerInput,onSubmitEditing:L,returnKeyType:"send",testID:"reels-composer-input"}),(0,O.jsx)(i.Pressable,{onPress:L,style:we.composerSend,accessibilityRole:"button",accessibilityLabel:"Send this answer",hitSlop:8,testID:"reels-composer-send",children:(0,O.jsx)(s.Text,{style:we.link,children:"send"})})]})]}):null,a[11]=T,a[12]=V,a[13]=v.length,a[14]=L,a[15]=I,a[16]=Y):Y=a[16],a[17]!==q||a[18]!==Y?(X=(0,O.jsxs)(t.View,{children:[q,Y]}),a[17]=q,a[18]=Y,a[19]=X):X=a[19];const J=X;if(!y)return null;let Q,ee,se,oe,ie,le,re;a[20]!==f?(Q=(0,O.jsx)(i.Pressable,{style:we.captionBackdrop,onPress:f,accessibilityRole:"button",accessibilityLabel:"Close the digest",testID:"reels-caption-backdrop"}),a[20]=f,a[21]=Q):Q=a[21],a[22]===Symbol.for("react.memo_cache_sentinel")?(ee=(0,O.jsx)(t.View,{style:we.sheetHandle}),a[22]=ee):ee=a[22],a[23]!==K.panHandlers?(se=(0,O.jsx)(t.View,Object.assign({},K.panHandlers,{style:we.sheetGrab,testID:"reels-caption-grab",children:ee})),a[23]=K.panHandlers,a[24]=se):se=a[24],a[25]===Symbol.for("react.memo_cache_sentinel")?(oe=(0,O.jsx)(te,{}),a[25]=oe):oe=a[25],a[26]!==f?(ie=(0,O.jsx)(i.Pressable,{onPress:f,style:we.sheetClose,hitSlop:8,accessibilityRole:"button",accessibilityLabel:"Close the digest",testID:"reels-caption-close",children:oe}),a[26]=f,a[27]=ie):ie=a[27],a[28]!==h.title?(le=(0,O.jsx)(s.Text,{style:De,numberOfLines:1,children:h.title}),a[28]=h.title,a[29]=le):le=a[29],a[30]!==ie||a[31]!==le?(re=(0,O.jsxs)(t.View,{style:we.sheetHead,children:[ie,le]}),a[30]=ie,a[31]=le,a[32]=re):re=a[32];const ae=z?.summary;let ce;a[33]!==ae?(ce=(0,O.jsx)(ne,{label:"Summary",value:ae,derived:!0}),a[33]=ae,a[34]=ce):ce=a[34];const de=z?.goal;let ue;a[35]!==de?(ue=(0,O.jsx)(ne,{label:"Goal",value:de}),a[35]=de,a[36]=ue):ue=a[36];const he=z?.nextStep;let be,ge,pe,xe,ye,me,fe,je,ke,ve,Se,Te,Ce;var Ie;let Ve,ze,Re,Le,Pe;return a[37]!==he?(be=(0,O.jsx)(ne,{label:"Next step",value:he}),a[37]=he,a[38]=be):be=a[38],a[39]!==z?.blockers?(ge=z?.blockers?.join("\n"),a[39]=z?.blockers,a[40]=ge):ge=a[40],a[41]!==ge?(pe=(0,O.jsx)(ne,{label:"Blockers",value:ge,danger:!0}),a[41]=ge,a[42]=pe):pe=a[42],a[43]!==z?.accomplishments?(xe=z?.accomplishments?.join("\n"),a[43]=z?.accomplishments,a[44]=xe):xe=a[44],a[45]!==xe?(ye=(0,O.jsx)(ne,{label:"Accomplishments",value:xe,derived:!0}),a[45]=xe,a[46]=ye):ye=a[46],a[47]!==z?.keyFiles?(me=z?.keyFiles?.join("\n"),a[47]=z?.keyFiles,a[48]=me):me=a[48],a[49]!==me?(fe=(0,O.jsx)(ne,{label:"Key files",value:me,derived:!0}),a[49]=me,a[50]=fe):fe=a[50],a[51]!==z?.links?(je=z?.links?.map(We).join("\n"),a[51]=z?.links,a[52]=je):je=a[52],a[53]!==je?(ke=(0,O.jsx)(ne,{label:"Links",value:je}),a[53]=je,a[54]=ke):ke=a[54],a[55]!==U||a[56]!==_||a[57]!==v||a[58]!==h.id||a[59]!==h.serverId?(ve=U?(0,O.jsx)(C.DecisionChips,{serverId:h.serverId,agentId:h.id,decisions:v,onAnswered:_}):v.map((e,t)=>(0,O.jsx)(ne,{label:v.length>1?`Decision ${t+1} of ${v.length}`:"Decision",value:e.question},e.id)),a[55]=U,a[56]=_,a[57]=v,a[58]=h.id,a[59]=h.serverId,a[60]=ve):ve=a[60],a[61]!==h.tags?(Se=h.tags.join(", ")||"no tag",a[61]=h.tags,a[62]=Se):Se=a[62],a[63]!==Se?(Te=(0,O.jsx)(ne,{label:"Tags",value:Se}),a[63]=Se,a[64]=Te):Te=a[64],a[65]!==h.kanban?(Ce=(Ie=h.kanban)?(0,S.getBucketLabel)(Ie)||Ie:"no column",a[65]=h.kanban,a[66]=Ce):Ce=a[66],a[67]!==Ce?(Ve=(0,O.jsx)(ne,{label:"Kanban",value:Ce}),a[67]=Ce,a[68]=Ve):Ve=a[68],a[69]!==ce||a[70]!==ue||a[71]!==be||a[72]!==pe||a[73]!==ye||a[74]!==fe||a[75]!==ke||a[76]!==ve||a[77]!==Te||a[78]!==Ve?(ze=(0,O.jsxs)(o.ScrollView,{style:we.sheetBody,testID:"reels-caption-body",children:[ce,ue,be,pe,ye,fe,ke,ve,Te,Ve]}),a[69]=ce,a[70]=ue,a[71]=be,a[72]=pe,a[73]=ye,a[74]=fe,a[75]=ke,a[76]=ve,a[77]=Te,a[78]=Ve,a[79]=ze):ze=a[79],a[80]!==k?(Re=k?(0,O.jsxs)(s.Text,{style:we.sendError,testID:"reels-composer-error",children:["Could not send that: ",k,". Nothing was recorded, so try again."]}):null,a[80]=k,a[81]=Re):Re=a[81],a[82]!==J||a[83]!==N||a[84]!==se||a[85]!==re||a[86]!==ze||a[87]!==Re?(Le=(0,O.jsx)(l.KeyboardAvoidingView,{behavior:"height",style:A,testID:"reels-caption-sheet",children:(0,O.jsxs)(t.View,{style:N,children:[se,re,ze,Re,J]})}),a[82]=J,a[83]=N,a[84]=se,a[85]=re,a[86]=ze,a[87]=Re,a[88]=Le):Le=a[88],a[89]!==Q||a[90]!==Le?(Pe=(0,O.jsxs)(O.Fragment,{children:[Q,Le]}),a[89]=Q,a[90]=Le,a[91]=Pe):Pe=a[91],Pe}),te=(0,u.memo)(function(){const e=(0,c.c)(2),{theme:t}=(0,y.useUnistyles)();let n;return e[0]!==t.colors.foregroundMuted?(n=(0,O.jsx)(f.X,{size:18,color:t.colors.foregroundMuted}),e[0]=t.colors.foregroundMuted,e[1]=n):n=e[1],n}),ne=(0,u.memo)(function(e){const n=(0,c.c)(9),{label:o,value:i,derived:l,danger:a}=e;if(!i)return null;const u=l?" (derived)":"";let h;n[0]!==o||n[1]!==u?(h=(0,O.jsxs)(s.Text,{style:we.fieldLabel,children:[o,u]}),n[0]=o,n[1]=u,n[2]=h):h=n[2];const b=a?Ie:we.fieldValue;let p,x;return n[3]!==b||n[4]!==i?(p=(0,O.jsx)(s.Text,{style:b,children:i}),n[3]=b,n[4]=i,n[5]=p):p=n[5],n[6]!==h||n[7]!==p?(x=(0,O.jsxs)(t.View,{style:we.field,children:[h,p]}),n[6]=h,n[7]=p,n[8]=x):x=n[8],x}),se={on:{selected:!0},off:{selected:!1}};function oe(e,t,n){return t?n?`${e}, picked, survives this consolidation`:`${e}, picked`:`${e}, not picked`}const ie=(0,u.memo)(function(e){const n=(0,c.c)(39),{session:o,picked:l,isWinner:a,now:u,onToggle:h,onCrown:b}=e,{theme:p}=(0,y.useUnistyles)();let x;n[0]!==h||n[1]!==o.id?(x=()=>h(o.id),n[0]=h,n[1]=o.id,n[2]=x):x=n[2];const j=x;let k;n[3]!==b||n[4]!==o.id?(k=()=>b(o.id),n[3]=b,n[4]=o.id,n[5]=k):k=n[5];const v=k;let w,S=f.Square;l&&(S=a?f.Crown:f.SquareCheck),n[6]!==a||n[7]!==l||n[8]!==o.title?(w=oe(o.title,l,a),n[6]=a,n[7]=l,n[8]=o.title,n[9]=w):w=n[9];const T=se[l?"on":"off"],C=l?Ve:we.pickRow,_=`reels-consolidate-pick-${o.id}`;let I,D,V;n[10]!==S||n[11]!==p.colors.accent?(I=(0,O.jsx)(t.View,{style:we.pickMark,children:(0,O.jsx)(S,{size:16,color:p.colors.accent})}),n[10]=S,n[11]=p.colors.accent,n[12]=I):I=n[12],n[13]!==o.title?(D=(0,O.jsx)(s.Text,{style:we.pickName,children:o.title}),n[13]=o.title,n[14]=D):D=n[14],n[15]!==u||n[16]!==o.lastActivityAt?(V=J(o.lastActivityAt,u),n[15]=u,n[16]=o.lastActivityAt,n[17]=V):V=n[17];const z=a&&l?" \xb7 survives":"";let R,L,P;return n[18]!==z||n[19]!==V?(R=(0,O.jsxs)(s.Text,{style:we.pickAux,children:[V,z]}),n[18]=z,n[19]=V,n[20]=R):R=n[20],n[21]!==v||n[22]!==a||n[23]!==l||n[24]!==o.id||n[25]!==o.title||n[26]!==p.colors.foregroundMuted?(L=l&&!a?(0,O.jsx)(i.Pressable,{onPress:v,accessibilityRole:"button",accessibilityLabel:`Make ${o.title} the survivor`,hitSlop:8,style:we.pickCrown,testID:`reels-consolidate-crown-${o.id}`,children:(0,O.jsx)(f.Crown,{size:14,color:p.colors.foregroundMuted})}):null,n[21]=v,n[22]=a,n[23]=l,n[24]=o.id,n[25]=o.title,n[26]=p.colors.foregroundMuted,n[27]=L):L=n[27],n[28]!==v||n[29]!==R||n[30]!==L||n[31]!==w||n[32]!==T||n[33]!==C||n[34]!==_||n[35]!==I||n[36]!==D||n[37]!==j?(P=(0,O.jsxs)(i.Pressable,{onPress:j,onLongPress:v,accessibilityRole:"button",accessibilityLabel:w,accessibilityState:T,style:C,testID:_,children:[I,D,R,L]}),n[28]=v,n[29]=R,n[30]=L,n[31]=w,n[32]=T,n[33]=C,n[34]=_,n[35]=I,n[36]=D,n[37]=j,n[38]=P):P=n[38],P}),le=(0,u.memo)(function(e){const n=(0,c.c)(67),{candidates:l,now:a,onCancel:h,onConsolidate:b,verbError:p}=e;let x;n[0]===Symbol.for("react.memo_cache_sentinel")?(x={},n[0]=x):x=n[0];const[y,f]=(0,u.useState)(x);let j;if(n[1]!==l||n[2]!==y){let e;n[4]!==y?(e=e=>y[e.id],n[4]=y,n[5]=e):e=n[5],j=l.filter(e),n[1]=l,n[2]=y,n[3]=j}else j=n[3];const k=j,[v,w]=(0,u.useState)(null);let S;n[6]!==k||n[7]!==v?(S=(0,$.consolidationTargets)(k,v),n[6]=k,n[7]=v,n[8]=S):S=n[8];const{winner:T,sourceIds:C}=S;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 I=_;let D;n[10]===Symbol.for("react.memo_cache_sentinel")?(D=e=>{w(e),f(t=>t[e]?t:Object.assign({},t,{[e]:!0}))},n[10]=D):D=n[10];const z=D;let R;n[11]!==k||n[12]!==T?(R=(0,$.canConsolidate)(k,T),n[11]=k,n[12]=T,n[13]=R):R=n[13];const L=R;let P;n[14]!==k||n[15]!==b||n[16]!==C||n[17]!==T?(P=()=>{T&&k.length>=2&&b(T,C)},n[14]=k,n[15]=b,n[16]=C,n[17]=T,n[18]=P):P=n[18];const A=(0,V.useDestructiveHold)(P,"consolidate");let M;n[19]!==A.progress?(M=Math.round(100*A.progress),n[19]=A.progress,n[20]=M):M=n[20];const E=`${M}%`;let H;n[21]!==E?(H=[we.verbFill,{width:E}],n[21]=E,n[22]=H):H=n[22];const W=H;let B,N,G,K,U,q,Y,X;if(n[23]===Symbol.for("react.memo_cache_sentinel")?(B=(0,O.jsx)(s.Text,{style:we.sheetTitle,children:"Consolidate"}),N=(0,O.jsx)(s.Text,{style:we.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]=N):(B=n[23],N=n[24]),n[25]!==p?(G=p?(0,O.jsx)(s.Text,{style:we.sendError,testID:"reels-verb-error",children:p}):null,n[25]=p,n[26]=G):G=n[26],n[27]!==l||n[28]!==a||n[29]!==y||n[30]!==T){let e;n[32]!==a||n[33]!==y||n[34]!==T?(e=e=>(0,O.jsx)(ie,{session:e,picked:Boolean(y[e.id]),isWinner:T===e.id,now:a,onToggle:I,onCrown:z},e.id),n[32]=a,n[33]=y,n[34]=T,n[35]=e):e=n[35],K=l.map(e),n[27]=l,n[28]=a,n[29]=y,n[30]=T,n[31]=K}else K=n[31];n[36]!==K?(U=(0,O.jsx)(o.ScrollView,{style:we.pickList,children:K}),n[36]=K,n[37]=U):U=n[37],n[38]===Symbol.for("react.memo_cache_sentinel")?(q=(0,O.jsx)(s.Text,{style:we.link,children:"cancel"}),n[38]=q):q=n[38],n[39]!==h?(Y=(0,O.jsx)(i.Pressable,{onPress:h,accessibilityRole:"button",accessibilityLabel:"Cancel and close",style:we.send,testID:"reels-consolidate-cancel",children:q}),n[39]=h,n[40]=Y):Y=n[40],n[41]!==L||n[42]!==A.handlers?(X=L?A.handlers:{},n[41]=L,n[42]=A.handlers,n[43]=X):X=n[43];const J=!L,Q=L?we.send:Me,Z=`Consolidate ${C.length} sessions into the survivor. Hold to confirm.`;let ee;n[44]!==W||n[45]!==A.progress?(ee=A.progress>0?(0,O.jsx)(t.View,{style:W,testID:"reels-consolidate-hold-fill"}):null,n[44]=W,n[45]=A.progress,n[46]=ee):ee=n[46];const te=`hold to consolidate ${C.length}`;let ne,se,oe,le,re;return n[47]!==A.hint||n[48]!==A.showLabel||n[49]!==te?(ne=F(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,O.jsx)(s.Text,{style:we.link,children:ne}),n[51]=ne,n[52]=se):se=n[52],n[53]!==X||n[54]!==J||n[55]!==Q||n[56]!==Z||n[57]!==ee||n[58]!==se?(oe=(0,O.jsxs)(i.Pressable,Object.assign({},X,{disabled:J,style:Q,accessibilityRole:"button",accessibilityLabel:Z,testID:"reels-consolidate-commit",children:[ee,se]})),n[53]=X,n[54]=J,n[55]=Q,n[56]=Z,n[57]=ee,n[58]=se,n[59]=oe):oe=n[59],n[60]!==Y||n[61]!==oe?(le=(0,O.jsxs)(t.View,{style:we.rowGap,children:[Y,oe]}),n[60]=Y,n[61]=oe,n[62]=le):le=n[62],n[63]!==G||n[64]!==U||n[65]!==le?(re=(0,O.jsxs)(t.View,{style:we.sheet,testID:"reels-consolidate",children:[B,N,G,U,le]}),n[63]=G,n[64]=U,n[65]=le,n[66]=re):re=n[66],re}),re=(0,u.memo)(function(e){const n=(0,c.c)(46),{verb:o,icon:l,label:a,onVerb:u}=e,{theme:h}=(0,y.useUnistyles)(),b="terminate"===o,{showLabel:p,progress:x,hint:f,handlers:j}=(0,V.useDestructiveHold)(u,o);let k;n[0]!==u||n[1]!==o?(k=()=>u(o),n[0]=u,n[1]=o,n[2]=k):k=n[2];const v=k;let w;n[3]!==x?(w=Math.round(100*x),n[3]=x,n[4]=w):w=n[4];const S=`${w}%`;let T;n[5]!==S?(T=[we.verbFill,{width:S}],n[5]=S,n[6]=T):T=n[6];const C=T;if(!b){let e;n[7]!==a||n[8]!==o?(e=W(o,a),n[7]=a,n[8]=o,n[9]=e):e=n[9];const t=`reels-verb-${o}`;let c,u,b;return n[10]!==l||n[11]!==h.colors.foreground?(c=(0,O.jsx)(l,{size:18,color:h.colors.foreground}),n[10]=l,n[11]=h.colors.foreground,n[12]=c):c=n[12],n[13]!==a?(u=(0,O.jsx)(s.Text,{style:we.verbWord,children:a}),n[13]=a,n[14]=u):u=n[14],n[15]!==e||n[16]!==t||n[17]!==c||n[18]!==u||n[19]!==v?(b=(0,O.jsxs)(i.Pressable,{onPress:v,style:we.verbChip,accessibilityRole:"button",accessibilityLabel:e,hitSlop:8,testID:t,children:[c,u]}),n[15]=e,n[16]=t,n[17]=c,n[18]=u,n[19]=v,n[20]=b):b=n[20],b}let _;n[21]!==a||n[22]!==o?(_=W(o,a),n[21]=a,n[22]=o,n[23]=_):_=n[23];const I=`reels-verb-${o}`;let D,z;n[24]!==C||n[25]!==x?(D=x>0?(0,O.jsx)(t.View,{style:C,testID:"reels-verb-hold-fill"}):null,n[24]=C,n[25]=x,n[26]=D):D=n[26],n[27]!==l||n[28]!==h.colors.destructive?(z=(0,O.jsx)(l,{size:18,color:h.colors.destructive}),n[27]=l,n[28]=h.colors.destructive,n[29]=z):z=n[29];const R=p||f?ze:we.verbWord;let L,P,A,M;return n[30]!==a||n[31]!==R?(L=(0,O.jsx)(s.Text,{style:R,children:a}),n[30]=a,n[31]=R,n[32]=L):L=n[32],n[33]!==f||n[34]!==p?(P=F(p,f,"hold to retire"),n[33]=f,n[34]=p,n[35]=P):P=n[35],n[36]!==P?(A=(0,O.jsx)(s.Text,{style:we.verbHoldLabel,testID:"reels-verb-terminate-hold",children:P}),n[36]=P,n[37]=A):A=n[37],n[38]!==j||n[39]!==L||n[40]!==A||n[41]!==_||n[42]!==I||n[43]!==D||n[44]!==z?(M=(0,O.jsxs)(i.Pressable,Object.assign({},j,{style:we.verbChip,accessibilityRole:"button",accessibilityLabel:_,hitSlop:8,testID:I,children:[D,z,L,A]})),n[38]=j,n[39]=L,n[40]=A,n[41]=_,n[42]=I,n[43]=D,n[44]=z,n[45]=M):M=n[45],M}),ae=(0,u.memo)(function(e){const t=(0,c.c)(10),{everyMs:n,label:o,onPick:l}=e;let a;t[0]!==n||t[1]!==l?(a=()=>l(n),t[0]=n,t[1]=l,t[2]=a):a=t[2];const u=a,h=`reels-automate-${n}`;let b,p;return t[3]!==o?(b=(0,O.jsx)(s.Text,{style:we.pickName,children:o}),t[3]=o,t[4]=b):b=t[4],t[5]!==o||t[6]!==u||t[7]!==h||t[8]!==b?(p=(0,O.jsx)(i.Pressable,{onPress:u,style:we.pickRow,accessibilityRole:"button",accessibilityLabel:o,testID:h,children:b}),t[5]=o,t[6]=u,t[7]=h,t[8]=b,t[9]=p):p=t[9],p}),ce=Object.keys(Y).sort((e,t)=>(0,k.getWorkspaceStateBucketPriority)(e)-(0,k.getWorkspaceStateBucketPriority)(t)),de={today:"Today","3d":"3 days","7d":"7 days","30d":"30 days",stale:"Stale"},ue={root:"Top-level",delegated:"Subagent"},he=v.SESSION_ORIGINS.map(e=>({origin:e,label:ue[e]})),be=(0,u.memo)(function(e){const t=(0,c.c)(15),{value:n,label:o,mode:l,onCycle:a}=e;let u;t[0]!==a||t[1]!==n?(u=()=>a(n),t[0]=a,t[1]=n,t[2]=u):u=t[2];const h=u,b=Re[l],p="include"===l;let x;t[3]!==p?(x=Ae(p),t[3]=p,t[4]=x):x=t[4];const y="neutral"===l?o:`${o}, ${"include"===l?"only":"excluded"}`,f=`reels-filter-${n}`,j="exclude"===l?"-":"";let k,v;return t[5]!==o||t[6]!==j?(k=(0,O.jsxs)(s.Text,{style:we.tagChipText,children:[j,o]}),t[5]=o,t[6]=j,t[7]=k):k=t[7],t[8]!==h||t[9]!==b||t[10]!==x||t[11]!==y||t[12]!==f||t[13]!==k?(v=(0,O.jsx)(i.Pressable,{onPress:h,style:b,accessibilityRole:"button",accessibilityState:x,accessibilityLabel:y,testID:f,children:k}),t[8]=h,t[9]=b,t[10]=x,t[11]=y,t[12]=f,t[13]=k,t[14]=v):v=t[14],v}),ge=(0,u.memo)(function(e){const t=(0,c.c)(10),{target:n,label:o,onShare:l}=e;let a;t[0]!==l||t[1]!==n?(a=()=>l(n),t[0]=l,t[1]=n,t[2]=a):a=t[2];const u=a,h=`Send to ${o}`,b=`reels-share-${n}`;let p,x;return t[3]!==o?(p=(0,O.jsx)(s.Text,{style:we.pickName,children:o}),t[3]=o,t[4]=p):p=t[4],t[5]!==u||t[6]!==h||t[7]!==b||t[8]!==p?(x=(0,O.jsx)(i.Pressable,{onPress:u,style:we.pickRow,accessibilityRole:"button",accessibilityLabel:h,testID:b,children:p}),t[5]=u,t[6]=h,t[7]=b,t[8]=p,t[9]=x):x=t[9],x}),pe=(0,u.memo)(function(e){const n=(0,c.c)(43),{verb:o,icon:l,label:a,detail:u,onVerb:h}=e,{theme:b}=(0,y.useUnistyles)(),p="terminate"===o,{showLabel:x,progress:f,hint:j,handlers:k}=(0,V.useDestructiveHold)(h,o);let v;n[0]!==h||n[1]!==o?(v=()=>h(o),n[0]=h,n[1]=o,n[2]=v):v=n[2];const w=v;let S;n[3]!==f?(S=Math.round(100*f),n[3]=f,n[4]=S):S=n[4];const T=`${S}%`;let C;n[5]!==T?(C=[we.verbFill,{width:T}],n[5]=T,n[6]=C):C=n[6];const _=C;let I;n[7]!==p||n[8]!==k||n[9]!==w?(I=p?k:{onPress:w},n[7]=p,n[8]=k,n[9]=w,n[10]=I):I=n[10];const D=I;let z;n[11]!==a||n[12]!==o?(z=W(o,a),n[11]=a,n[12]=o,n[13]=z):z=n[13];const R=`reels-taco-${o}`;let L;n[14]!==p||n[15]!==f||n[16]!==_?(L=p&&f>0?(0,O.jsx)(t.View,{style:_,testID:"reels-taco-hold-fill"}):null,n[14]=p,n[15]=f,n[16]=_,n[17]=L):L=n[17];const P=p?b.colors.destructive:b.colors.foreground;let A,M,$,E,H,B,N;return n[18]!==l||n[19]!==P?(A=(0,O.jsx)(t.View,{style:we.pickMark,children:(0,O.jsx)(l,{size:16,color:P})}),n[18]=l,n[19]=P,n[20]=A):A=n[20],n[21]!==a?(M=(0,O.jsx)(s.Text,{style:we.pickName,children:a}),n[21]=a,n[22]=M):M=n[22],n[23]!==p||n[24]!==u||n[25]!==j||n[26]!==x?($=p?F(x,j,"hold to retire"):u,n[23]=p,n[24]=u,n[25]=j,n[26]=x,n[27]=$):$=n[27],n[28]!==$?(E=(0,O.jsx)(s.Text,{style:we.hint,children:$}),n[28]=$,n[29]=E):E=n[29],n[30]!==o?(H=G.has(o)?(0,O.jsx)(s.Text,{style:we.pickAux,children:"not wired yet"}):null,n[30]=o,n[31]=H):H=n[31],n[32]!==M||n[33]!==E||n[34]!==H?(B=(0,O.jsxs)(t.View,{style:we.grow,children:[M,E,H]}),n[32]=M,n[33]=E,n[34]=H,n[35]=B):B=n[35],n[36]!==D||n[37]!==A||n[38]!==B||n[39]!==z||n[40]!==R||n[41]!==L?(N=(0,O.jsxs)(i.Pressable,Object.assign({},D,{style:we.pickRow,accessibilityRole:"button",accessibilityLabel:z,testID:R,children:[L,A,B]})),n[36]=D,n[37]=A,n[38]=B,n[39]=z,n[40]=R,n[41]=L,n[42]=N):N=n[42],N});function xe(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,L.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],i=o?` Next one wakes ${ye(new Date(o),n)}.`:"",l=1===s.length?"session is":"sessions are";return{filteredOut:!1,exit:"leave",message:`All ${s.length} ${l} snoozed.${i}`}}function ye(e,t){const n=e.getTime()-t.getTime();if(!Number.isFinite(n)||n<=0)return"any moment";const s=Math.round(n/6e4);if(s<60)return s<1?"any moment":`in ${s}m`;const o=Math.round(s/60);return o<24?`in ${o}h`:`in ${Math.round(o/24)}d`}function me(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 fe=(0,u.memo)(function({mode:e,text:n,active:o}){const i=(0,u.useRef)(new a.Animated.Value(0)).current,l=o&&"text"===e&&n.length>0;(0,u.useEffect)(()=>{if(!l)return;const e=a.Animated.loop(a.Animated.sequence([a.Animated.timing(i,{toValue:-96,duration:24e3,easing:h.default.inOut(h.default.quad),useNativeDriver:!1}),a.Animated.timing(i,{toValue:0,duration:24e3,easing:h.default.inOut(h.default.quad),useNativeDriver:!1})]));return e.start(),()=>{e.stop(),i.setValue(0)}},[l,i]);const c=(0,u.useMemo)(()=>({transform:[{translateY:i}]}),[i]);return"off"===e?null:(0,O.jsx)(t.View,{style:"text"===e?$e:we.background,testID:`reels-background-${e}`,children:"text"===e?(0,O.jsx)(a.Animated.View,{style:c,children:(0,O.jsx)(s.Text,{style:we.backgroundBody,numberOfLines:40,children:n})}):null})}),je=(0,u.memo)(function(e){const n=(0,c.c)(35),{gated:o,allTags:i,onPickTag:l,decision:a,decisions:u,serverId:h,agentId:b,onAnswered:p,onVerb:x,actAllowed:y,capLabel:f,tagError:j}=e;if(o){let e,o,a;return n[0]!==i||n[1]!==l?(e=(0,O.jsx)(_.TagGate,{available:i,onPick:l}),n[0]=i,n[1]=l,n[2]=e):e=n[2],n[3]!==j?(o=j?(0,O.jsx)(s.Text,{style:we.sendError,testID:"reels-verb-error",children:j}):null,n[3]=j,n[4]=o):o=n[4],n[5]!==e||n[6]!==o?(a=(0,O.jsxs)(t.View,{children:[e,o]}),n[5]=e,n[6]=o,n[7]=a):a=n[7],a}if(a){if(!y){let e,o,i,l,a;return n[8]!==f?(e=(0,O.jsx)(s.Text,{style:we.hint,children:f}),n[8]=f,n[9]=e):e=n[9],n[10]===Symbol.for("react.memo_cache_sentinel")?(o=(0,O.jsx)(s.Text,{style:we.cardTapHint,children:"Decisions are done for today. You can still retire or snooze this one."}),n[10]=o):o=n[10],n[11]!==x?(i=_.TACO_VERBS.map(e=>(0,O.jsx)(re,{verb:e.id,icon:e.icon,label:e.label,onVerb:x},e.id)),n[11]=x,n[12]=i):i=n[12],n[13]!==i?(l=(0,O.jsx)(t.View,{style:we.rowGap,children:i}),n[13]=i,n[14]=l):l=n[14],n[15]!==e||n[16]!==l?(a=(0,O.jsxs)(t.View,{testID:"reels-cap-reached",children:[e,o,l]}),n[15]=e,n[16]=l,n[17]=a):a=n[17],a}let e;n[18]!==u?(e=q(u),n[18]=u,n[19]=e):e=n[19];const{shown:o,hidden:i}=e;let l,a,c;return n[20]!==b||n[21]!==p||n[22]!==h||n[23]!==o?(l=(0,O.jsx)(C.DecisionChips,{serverId:h,agentId:b,decisions:o,onAnswered:p}),n[20]=b,n[21]=p,n[22]=h,n[23]=o,n[24]=l):l=n[24],n[25]!==i?(a=i>0?(0,O.jsx)(s.Text,{style:we.hint,testID:"reels-decisions-overflow",children:1===i?"1 more decision in the digest.":`${i} more decisions in the digest.`}):null,n[25]=i,n[26]=a):a=n[26],n[27]!==l||n[28]!==a?(c=(0,O.jsxs)(O.Fragment,{children:[l,a]}),n[27]=l,n[28]=a,n[29]=c):c=n[29],c}let k,v,w;return n[30]===Symbol.for("react.memo_cache_sentinel")?(k=(0,O.jsx)(s.Text,{style:we.hint,children:"Nothing to decide. Why is this still open?"}),n[30]=k):k=n[30],n[31]!==x?(v=_.TACO_VERBS.map(e=>(0,O.jsx)(re,{verb:e.id,icon:e.icon,label:e.label,onVerb:x},e.id)),n[31]=x,n[32]=v):v=n[32],n[33]!==v?(w=(0,O.jsxs)(t.View,{testID:"reels-taco-row",children:[k,(0,O.jsx)(t.View,{style:we.rowGap,children:v})]}),n[33]=v,n[34]=w):w=n[34],w}),ke=(0,u.memo)(function(e){const n=(0,c.c)(83),{overlay:l,session:a,ring:u,now:h,decisionTarget:b,onClose:p,onSend:x,onSnooze:y,onConsolidate:f,onKanban:k,onVerb:v,overlayStyle:T,sendError:C,timeFieldDisarmed:I,actAllowed:D,onAnswered:V,verbError:z,openDecisions:R,onShare:L,onAutomate:P,allTags:A,allProviders:M,statusSelection:$,tagSelection:E,kanbanSelection:H,providerSelection:F,originSelection:W,timeSelection:B,onCycleStatus:N,onCycleTag:G,onCycleKanban:K,onCycleProvider:U,onCycleOrigin:q,onToggleTimeWindow:Y}=e,J=a;let Q;n[0]!==Y?(Q=e=>Y(e),n[0]=Y,n[1]=Q):Q=n[1];const te=Q,ne=(0,S.useKanbanBuckets)();Z("none"!==l.kind,p);const se="caption"===l.kind;let oe,ie,re,ue,xe,ye,me,fe,je;return n[2]!==D||n[3]!==J||n[4]!==b||n[5]!==V||n[6]!==p||n[7]!==x||n[8]!==R||n[9]!==C||n[10]!==se?(oe=(0,O.jsx)(ee,{session:J,visible:se,onClose:p,onSend:x,sendError:C,openDecisions:R,target:b,actAllowed:D,onAnswered:V},J.id),n[2]=D,n[3]=J,n[4]=b,n[5]=V,n[6]=p,n[7]=x,n[8]=R,n[9]=C,n[10]=se,n[11]=oe):oe=n[11],n[12]!==J.snoozeCount||n[13]!==h||n[14]!==p||n[15]!==y||n[16]!==l.kind||n[17]!==T||n[18]!==z?(ie="snooze"===l.kind?(0,O.jsx)(t.View,{style:T,children:(0,O.jsxs)(t.View,{children:[(0,O.jsx)(_.SnoozeSheet,{priorCount:J.snoozeCount,now:h,onCancel:p,onSnooze:y}),z?(0,O.jsx)(s.Text,{style:we.sendError,testID:"reels-verb-error",children:z}):null]})}):null,n[12]=J.snoozeCount,n[13]=h,n[14]=p,n[15]=y,n[16]=l.kind,n[17]=T,n[18]=z,n[19]=ie):ie=n[19],n[20]!==h||n[21]!==p||n[22]!==f||n[23]!==l.kind||n[24]!==T||n[25]!==u||n[26]!==z?(re="consolidate"===l.kind?(0,O.jsx)(t.View,{style:T,children:(0,O.jsx)(le,{candidates:u,now:h,onCancel:p,onConsolidate:f,verbError:z})}):null,n[20]=h,n[21]=p,n[22]=f,n[23]=l.kind,n[24]=T,n[25]=u,n[26]=z,n[27]=re):re=n[27],n[28]!==p||n[29]!==v||n[30]!==l.kind||n[31]!==T?(ue="taco"===l.kind?(0,O.jsx)(t.View,{style:T,children:(0,O.jsxs)(t.View,{style:we.sheet,testID:"reels-taco-sheet",children:[(0,O.jsx)(s.Text,{style:we.sheetTitle,children:"TACO"}),_.TACO_VERBS.map(e=>(0,O.jsx)(pe,{verb:e.id,icon:e.icon,label:e.label,detail:e.detail,onVerb:v},e.id)),(0,O.jsx)(i.Pressable,{onPress:p,accessibilityRole:"button",accessibilityLabel:"Cancel and close",style:we.send,testID:"reels-taco-cancel",children:(0,O.jsx)(s.Text,{style:we.link,children:"cancel"})})]})}):null,n[28]=p,n[29]=v,n[30]=l.kind,n[31]=T,n[32]=ue):ue=n[32],n[33]!==M||n[34]!==A||n[35]!==ne||n[36]!==H||n[37]!==p||n[38]!==K||n[39]!==q||n[40]!==U||n[41]!==N||n[42]!==G||n[43]!==te||n[44]!==W||n[45]!==l.kind||n[46]!==T||n[47]!==F||n[48]!==$||n[49]!==E||n[50]!==I||n[51]!==B?(xe="filters"===l.kind?(0,O.jsx)(t.View,{style:T,children:(0,O.jsxs)(o.ScrollView,{style:we.sheet,testID:"reels-filters-sheet",children:[(0,O.jsx)(s.Text,{style:we.sheetTitle,children:"Filter the ring"}),(0,O.jsx)(s.Text,{style:we.hint,children:"The same filter the sessions list uses, so setting it here sets it there."}),(0,O.jsx)(s.Text,{style:we.fieldLabel,children:"State"}),(0,O.jsx)(t.View,{style:we.rowGap,children:ce.map(e=>(0,O.jsx)(be,{value:e,label:X(e),mode:(0,j.getFilterValueMode)($,e),onCycle:N},e))}),(0,O.jsx)(s.Text,{style:we.fieldLabel,children:"Kanban"}),(0,O.jsx)(t.View,{style:we.rowGap,children:ne.map(e=>(0,O.jsx)(be,{value:e.id,label:e.label,mode:(0,j.getFilterValueMode)(H,e.id),onCycle:K},e.id))}),(0,O.jsx)(s.Text,{style:we.fieldLabel,children:"Tag"}),(0,O.jsx)(t.View,{style:we.rowGap,children:A.map(e=>(0,O.jsx)(be,{value:e,label:e,mode:(0,j.getFilterValueMode)(E,e),onCycle:G},e))}),(0,O.jsx)(s.Text,{style:we.fieldLabel,children:"Date"}),I?(0,O.jsx)(s.Text,{style:we.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,O.jsx)(t.View,{style:we.rowGap,children:w.SESSION_TIME_WINDOWS.map(e=>(0,O.jsx)(be,{value:e,label:de[e],mode:"window"===B?.kind&&B.window===e?"include":"neutral",onCycle:te},e))}),(0,O.jsx)(s.Text,{style:we.fieldLabel,children:"Provider"}),(0,O.jsx)(t.View,{style:we.rowGap,children:M.map(e=>(0,O.jsx)(be,{value:e,label:e,mode:(0,j.getFilterValueMode)(F,e),onCycle:U},e))}),(0,O.jsx)(s.Text,{style:we.fieldLabel,children:"Origin"}),(0,O.jsx)(t.View,{style:we.rowGap,children:he.map(e=>(0,O.jsx)(be,{value:e.origin,label:e.label,mode:(0,j.getFilterValueMode)(W,e.origin),onCycle:q},e.origin))}),(0,O.jsx)(i.Pressable,{onPress:p,accessibilityRole:"button",accessibilityLabel:"Done, close filters",style:we.send,testID:"reels-filters-done",children:(0,O.jsx)(s.Text,{style:we.link,children:"done"})})]})}):null,n[33]=M,n[34]=A,n[35]=ne,n[36]=H,n[37]=p,n[38]=K,n[39]=q,n[40]=U,n[41]=N,n[42]=G,n[43]=te,n[44]=W,n[45]=l.kind,n[46]=T,n[47]=F,n[48]=$,n[49]=E,n[50]=I,n[51]=B,n[52]=xe):xe=n[52],n[53]!==P||n[54]!==p||n[55]!==l.kind||n[56]!==T||n[57]!==z?(ye="automate"===l.kind?(0,O.jsx)(t.View,{style:T,children:(0,O.jsxs)(t.View,{style:we.sheet,testID:"reels-automate-sheet",children:[(0,O.jsx)(s.Text,{style:we.sheetTitle,children:"Automate"}),(0,O.jsx)(s.Text,{style:we.hint,children:"Re-runs this session on a cadence, with its next step as the prompt."}),z?(0,O.jsx)(s.Text,{style:we.sendError,testID:"reels-verb-error",children:z}):null,He.map(e=>(0,O.jsx)(ae,{everyMs:e.everyMs,label:e.label,onPick:P},e.id)),(0,O.jsx)(i.Pressable,{onPress:p,accessibilityRole:"button",accessibilityLabel:"Cancel and close",style:we.send,testID:"reels-automate-cancel",children:(0,O.jsx)(s.Text,{style:we.link,children:"cancel"})})]})}):null,n[53]=P,n[54]=p,n[55]=l.kind,n[56]=T,n[57]=z,n[58]=ye):ye=n[58],n[59]!==p||n[60]!==L||n[61]!==l.kind||n[62]!==T||n[63]!==z?(me="share"===l.kind?(0,O.jsx)(t.View,{style:T,children:(0,O.jsxs)(t.View,{style:we.sheet,testID:"reels-share-sheet",children:[(0,O.jsx)(s.Text,{style:we.sheetTitle,children:"Send"}),(0,O.jsx)(s.Text,{style:we.hint,children:"Send this card somewhere a person will read it."}),z?(0,O.jsx)(s.Text,{style:we.sendError,testID:"reels-verb-error",children:z}):null,Se.map(e=>(0,O.jsx)(ge,{target:e.id,label:e.label,onShare:L},e.id)),(0,O.jsx)(i.Pressable,{onPress:p,accessibilityRole:"button",accessibilityLabel:"Cancel and close",style:we.send,testID:"reels-share-cancel",children:(0,O.jsx)(s.Text,{style:we.link,children:"cancel"})})]})}):null,n[59]=p,n[60]=L,n[61]=l.kind,n[62]=T,n[63]=z,n[64]=me):me=n[64],n[65]!==J.kanban||n[66]!==J.model||n[67]!==J.provider||n[68]!==p||n[69]!==k||n[70]!==l.kind||n[71]!==T||n[72]!==z?(fe="options"===l.kind?(0,O.jsx)(t.View,{style:T,children:(0,O.jsxs)(o.ScrollView,{style:we.sheet,testID:"reels-options-sheet",children:[(0,O.jsx)(s.Text,{style:we.sheetTitle,children:"Session options"}),(0,O.jsx)(s.Text,{style:we.fieldLabel,children:"Kanban"}),(0,O.jsx)(_.KanbanPicker,{current:J.kanban,onPick:k}),z?(0,O.jsx)(s.Text,{style:we.sendError,testID:"reels-verb-error",children:z}):null,(0,O.jsx)(s.Text,{style:we.fieldLabel,children:"Provider and model"}),(0,O.jsx)(s.Text,{style:we.fieldValue,children:J.model?`${J.provider}/${J.model}`:J.provider}),(0,O.jsx)(i.Pressable,{onPress:p,accessibilityRole:"button",accessibilityLabel:"Close session options",style:we.send,testID:"reels-options-close",children:(0,O.jsx)(s.Text,{style:we.link,children:"close"})})]})}):null,n[65]=J.kanban,n[66]=J.model,n[67]=J.provider,n[68]=p,n[69]=k,n[70]=l.kind,n[71]=T,n[72]=z,n[73]=fe):fe=n[73],n[74]!==fe||n[75]!==oe||n[76]!==ie||n[77]!==re||n[78]!==ue||n[79]!==xe||n[80]!==ye||n[81]!==me?(je=(0,O.jsxs)(O.Fragment,{children:[oe,ie,re,ue,xe,ye,me,fe]}),n[74]=fe,n[75]=oe,n[76]=ie,n[77]=re,n[78]=ue,n[79]=xe,n[80]=ye,n[81]=me,n[82]=je):je=n[82],je}),ve=(0,u.memo)(function({sessions:e,allTags:n,actCap:o=P.DEFAULT_ACT_CAP,background:l="text",now:a,onLeaveRing:c}){const h=(0,z.useReelsVerbs)(),{answer:b}=(0,D.useAnswerDecision)(),[p,y]=(0,u.useState)(()=>Date.now());(0,u.useEffect)(()=>{if(a)return;const e=setInterval(()=>y(Date.now()),6e4);return()=>clearInterval(e)},[a]);const j=(0,u.useMemo)(()=>a??new Date(p),[a,p]),[k,v]=(0,u.useState)(1),w=(0,A.useActBudgetStore)(e=>e.recordAct),S=(0,A.useActBudgetStore)(e=>(0,A.actsOn)(e,j)),C=(0,A.useActBudgetStore)(e=>e.hydrated),V=(0,u.useCallback)(()=>w(j),[j,w]),[$,E]=(0,u.useState)(0),H=(0,u.useRef)(0),F=(0,u.useRef)(1);H.current=$;const[W,G]=(0,u.useState)({kind:"none"}),[U,q]=(0,u.useState)({}),[Y,X]=(0,u.useState)({}),[J,Z]=(0,u.useState)(null),[ee,te]=(0,u.useState)(N),ne=(0,u.useCallback)((e,t)=>{te(n=>Object.assign({},n,{[e]:t}))},[]),se=(0,u.useRef)(null),{feed:oe,activeFilters:ie,statusSelection:le,tagSelection:re,kanbanSelection:ae,providerSelection:ce,originSelection:de,timeSelection:ue,onCycleStatus:he,onCycleTag:be,onCycleKanban:ge,onCycleProvider:pe,onCycleOrigin:ye,onToggleTimeWindow:ve,onClearFilters:Se,timeFieldDisarmed:Te}=(0,R.useReelsFeed)({sessions:e,localTags:U,actedLaps:Y,laps:k,now:j,enteredLap:F.current}),Ie=(0,u.useMemo)(()=>[...new Set(e.map(e=>e.provider))].sort(),[e]),De=Math.min($,Math.max(oe.length-1,0)),Ve=oe[De]??null,ze=Ve?.session??null,Re=Ve?.lap??1;F.current=Math.max(F.current,Re);const Le=(0,u.useMemo)(()=>oe.findIndex(e=>e.lap===Re),[oe,Re]),Pe=(0,u.useMemo)(()=>oe.filter(e=>e.lap===Re).length,[oe,Re]),Ae=(0,u.useMemo)(()=>oe.filter(e=>e.lap===Re).map(e=>e.session),[oe,Re]),Me=ze?.id??"",$e=ze?.serverId??"",{allowMove:He}=(0,T.useKanbanMoveGuard)($e),Fe=(0,u.useMemo)(()=>{return ze?(e=ze.digest,(e?.pendingDecisions??[]).filter(e=>!e.answeredAt)):[];var e},[ze]),We=Fe[0]??null,Be=Fe,Ne=!!ze&&0===ze.tags.length,Ge=C&&(0,P.canAct)({acts:S,cap:o}),Ke=(0,P.actCapLabel)({acts:S,cap:o}),Ue=(0,x.useSafeAreaInsets)(),qe=(0,u.useMemo)(()=>[we.headerSlot,{paddingTop:Ue.top}],[Ue.top]),Ye=(0,u.useMemo)(()=>[we.seamBanner,{paddingTop:Ue.top+56}],[Ue.top]),Xe=(0,u.useMemo)(()=>[we.overlay,{paddingTop:Ue.top,paddingBottom:Ue.bottom}],[Ue.bottom,Ue.top]),Je=(0,u.useCallback)(()=>{G({kind:"none"}),se.current?.scrollToIndex(H.current+1)},[]),Qe=(0,u.useCallback)(e=>{X(t=>Object.assign({},t,{[e]:Re}))},[Re]),Ze=(0,u.useCallback)(()=>{v(e=>e+1)},[]),et=(0,u.useMemo)(()=>[{id:"read",icon:f.BookOpen,label:"read"},{id:"snooze",icon:f.AlarmClock,label:"snooze",disabled:Ne},{id:"share",icon:f.Send,label:"send"},{id:"taco",icon:f.LayoutList,label:"TACO",disabled:Ne},{id:"archive",icon:f.Archive,label:"archive",destructive:!0},{id:"options",icon:f.MoreHorizontal,label:"options"}],[Ne]),tt=(0,u.useCallback)(()=>G({kind:"caption"}),[]),nt=(0,u.useCallback)(()=>G({kind:"none"}),[]),st=(0,u.useCallback)(()=>G({kind:"filters"}),[]),ot=(0,u.useCallback)(e=>{q(t=>{const n=Object.assign({},t);return delete n[e],n})},[]),it=(0,u.useCallback)(e=>{q(t=>Object.assign({},t,{[Me]:[e]})),ne("tag",null),h.setTags({serverId:$e,agentId:Me},[e]).catch(e=>{ot(Me),ne("tag",(0,M.userFacingError)(e,"could not tag this session"))})},[Me,ot,$e,ne,h]),lt=(0,u.useCallback)(()=>{V(),Qe(Me),Fe.length<=1&&Je()},[Je,Me,Fe.length,Qe,V]),rt=(0,u.useCallback)(async e=>{if("terminate"===e)return await h.terminate({serverId:$e,agentId:Me}),Qe(Me),void Je();te(N),G({kind:Ee[e]})},[Je,Me,Qe,$e,h]),at=(0,u.useCallback)(e=>{if(te(N),"archive"===e)return rt("terminate");const t=Oe[e];t&&G({kind:t})},[rt]),ct=(0,u.useCallback)(e=>{ne("snooze",null),h.snooze({serverId:$e,agentId:Me},e.until,e.untilWhat,e.why).then(()=>(Qe(Me),Je(),null)).catch(e=>{ne("snooze",(0,M.userFacingError)(e,"could not snooze this session"))})},[Je,Me,Qe,$e,ne,h]),dt=(0,u.useCallback)((e,t)=>{ne("consolidate",null),h.consolidate({serverId:$e,winnerId:e,sourceIds:t}).then(()=>{for(const n of[e,...t])Qe(n);return Je(),null}).catch(e=>{ne("consolidate",(0,M.userFacingError)(e,"could not consolidate these sessions"))})},[Je,Qe,$e,ne,h]),ut=(0,u.useCallback)(e=>{if(!Ge)return void G({kind:"none"});const t=e.trim();0!==t.length&&We?(Z(null),b({serverId:$e,agentId:Me,decisionId:We.id,optionId:null,note:t}).then(()=>(lt(),null)).catch(e=>{Z((0,M.userFacingError)(e,"could not send that answer"))})):G({kind:"none"})},[Ge,b,Me,We,lt,$e]),ht=(0,u.useCallback)(e=>{ze&&(ne("share",null),h.share(e,Ce(ze)).then(()=>(G({kind:"none"}),null)).catch(e=>{ne("share",(0,M.userFacingError)(e,"could not open that"))}))},[ze,ne,h]),bt=(0,u.useCallback)(e=>{if(!ze)return;ne("automate",null);const t=ze.digest?.nextStep??ze.digest?.goal??`Continue ${ze.title}`;h.automate({serverId:$e,agentId:Me},e,t,ze.title).then(()=>(Qe(Me),Je(),null)).catch(e=>{ne("automate",(0,M.userFacingError)(e,"could not create the routine"))})},[Je,ze,Me,Qe,$e,ne,h]),gt=(0,u.useCallback)(e=>{ne("kanban",null),He(e,ze?.kanban??null)&&h.setKanban({serverId:$e,agentId:Me},e).then(()=>(G({kind:"none"}),null)).catch(e=>{ne("kanban",(0,M.userFacingError)(e,"could not move this session"))})},[He,ze?.kanban,Me,$e,ne,h]),pt=(0,u.useCallback)((e,o)=>{const a=o===De,c=e.session;return(0,O.jsxs)(t.View,{style:we.card,children:[(0,O.jsx)(fe,{mode:l,text:me(c),active:a}),e.firstOfLap&&e.lap>1?(0,O.jsx)(t.View,{style:Ye,testID:`reels-seam-${e.lap}`,children:(0,O.jsx)(_.LapSeam,{lap:e.lap,ringSize:oe.filter(t=>t.lap===e.lap-1).length||Ae.length,acted:(0,L.actedThisLap)(oe.filter(t=>t.lap===e.lap-1).map(e=>e.session),e.lap-1)})}):null,(0,O.jsx)(t.View,{style:we.middle,children:a?(0,O.jsx)(_.ReelsRail,{actions:et,contextLabel:c.tags[0]??"untagged",onAction:at}):null}),(0,O.jsxs)(t.View,{style:we.bottom,children:[(0,O.jsxs)(i.Pressable,{onPress:a?tt:void 0,disabled:!a,testID:a?"reels-caption-open":void 0,accessibilityRole:"button",accessibilityLabel:`Open the full digest for ${c.title}`,style:we.captionTap,children:[(0,O.jsx)(s.Text,{style:we.cardTitle,children:c.title}),(0,O.jsx)(s.Text,{style:we.cardMeta,children:Q(c,j)}),(0,O.jsx)(s.Text,{style:we.cardSummary,numberOfLines:4,children:c.digest?.summary??c.digest?.goal??"No digest yet."}),a?(0,O.jsx)(s.Text,{style:we.cardTapHint,children:"tap for the whole digest and to talk to it"}):null]}),a?(0,O.jsx)(je,{gated:Ne,allTags:n,onPickTag:it,decision:We,decisions:Be,serverId:c.serverId,agentId:c.id,onAnswered:lt,onVerb:rt,actAllowed:Ge,capLabel:Ke,tagError:ee.tag}):null]})]})},[n,Ge,l,Ke,ee.tag,We,Be,oe,j,Ne,De,lt,at,rt,tt,it,et,Ae.length,Ye]);if(!ze){const{message:n,exit:o}=xe(e,ie,j);return(0,O.jsxs)(t.View,{style:we.empty,testID:"reels-empty",children:[(0,O.jsx)(s.Text,{style:we.fieldValue,children:n}),"clear-filters"===o?(0,O.jsx)(i.Pressable,{onPress:Se,style:we.send,accessibilityRole:"button",accessibilityLabel:"Clear all filters",testID:"reels-empty-clear-filters",children:(0,O.jsx)(s.Text,{style:we.link,children:"clear filters"})}):(0,O.jsx)(i.Pressable,{onPress:c,style:we.send,accessibilityRole:"button",accessibilityLabel:"Back to the sessions list",testID:"reels-empty-leave",children:(0,O.jsx)(s.Text,{style:we.link,children:"back to sessions"})})]})}return(0,O.jsxs)(t.View,{style:we.root,testID:"reels-screen",children:[(0,O.jsx)(I.ReelsPager,{data:oe,keyExtractor:K,renderCard:pt,onIndexChange:E,onEndReached:Ze,controllerRef:se}),(0,O.jsx)(t.View,{style:qe,pointerEvents:"box-none",children:(0,O.jsx)(_.ReelsHeader,{acts:S,cap:o,activeFilters:ie,onFilter:st,position:`${Le>=0?$-Le+1:$+1}/${Pe} \xb7 lap ${Re}`})}),(0,O.jsx)(ke,{overlay:W,session:ze,ring:Ae,now:j,decisionTarget:We,onClose:nt,onSend:ut,actAllowed:Ge,timeFieldDisarmed:Te,onSnooze:ct,onConsolidate:dt,onKanban:gt,onVerb:rt,overlayStyle:Xe,sendError:J,verbError:ee[B[W.kind]??"share"],openDecisions:Fe,onAnswered:lt,onShare:ht,onAutomate:bt,allTags:n,allProviders:Ie,statusSelection:le,tagSelection:re,kanbanSelection:ae,providerSelection:ce,originSelection:de,timeSelection:ue,onCycleStatus:he,onCycleTag:be,onCycleKanban:ge,onCycleProvider:pe,onCycleOrigin:ye,onToggleTimeWindow:ve})]})}),we=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]}})),Se=[{id:"whatsapp",label:"WhatsApp"},{id:"slack",label:"Slack (copies the text)"},{id:"email",label:"Email"}],Te=400;function Ce(e){const t=[`${e.title} (${X(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>Te?`${t.slice(0,399)}\u2026`:t}const Ie=[we.fieldValue,we.fieldDanger],De=[we.sheetTitle,we.sheetHeadTitle],Ve=[we.pickRow,we.pickRowOn],ze=[we.verbWord,we.verbWordDanger],Re={include:[we.tagChip,we.tagChipOn],exclude:[we.tagChip,we.tagChipOff],neutral:we.tagChip},Le={selected:!0},Pe={selected:!1},Ae=e=>e?Le:Pe,Me=[we.send,we.dim],$e=[we.background,we.backgroundText],Oe={read:"caption",snooze:"snooze",share:"share",taco:"taco",options:"options"},Ee={consolidate:"consolidate",outsource:"share",automate:"automate"},He=[{id:"hourly",label:"Every hour",everyMs:36e5},{id:"daily",label:"Every day",everyMs:864e5},{id:"weekly",label:"Every week",everyMs:6048e5}];function Fe(e,t){return E(t.dy)}function We(e){return`${e.kind}: ${e.label??e.url}`}},4569,[348,2838,349,2815,2476,4017,3516,350,36,140,616,252,591,659,649,25,546,182,234,571,146,558,56,811,3619,3442,3621,3618,4007,4009,4013,4016,4570,4014,4019,4571,4572,4573,4018,4575,4020,4576,279]);
|
|
16329
16329
|
__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)},4570,[348,2656,36,144,686,146,558,56,279]);
|
|
16330
|
-
__d(function(g,r,i,a,m,
|
|
16330
|
+
__d(function(g,r,i,a,m,_e,_d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),_e.shareUrlFor=y,_e.consolidateSessions=w,_e.useReelsVerbs=function(){const n=(0,e.c)(21),l=(0,t.useQueryClient)();let d;n[0]!==l?(d=e=>{l.invalidateQueries({queryKey:(0,s.agentHistoryQueryKey)(e)})},n[0]=l,n[1]=d):d=n[1];const y=d;let f;n[2]!==y?(f=async e=>{const{serverId:t,agentId:n}=e;await v(t).archiveAgent(n),y(t)},n[2]=y,n[3]=f):f=n[3];const p=f;let b;n[4]!==y?(b=async(e,t,n,s)=>{const{serverId:o,agentId:c}=e,u=await v(o).snoozeAgent(c,t,n,s);return y(o),u},n[4]=y,n[5]=b):b=n[5];const h=b;let S;n[6]!==y?(S=async(e,t)=>{const{serverId:n,agentId:s}=e;await v(n).updateAgent(s,{labels:(0,c.buildLabelsForBucketMove)(t,u.useKanbanBoardStore.getState().defaultBucketId)}),y(n)},n[6]=y,n[7]=S):S=n[7];const k=S;let A;n[8]!==y?(A=async(e,t,n)=>{const{serverId:s,agentId:c}=e;await v(s).updateAgent(c,{labels:(0,o.buildLabelPatchForTagSet)(n,t)}),y(s)},n[8]=y,n[9]=A):A=n[9];const O=A;let _;n[10]!==y?(_=async(e,t,n,s)=>{const{serverId:o,agentId:c}=e;await v(o).scheduleCreate({prompt:n,name:s,cadence:{type:"every",everyMs:t},target:{type:"agent",agentId:c},runOnCreate:!1}),y(o)},n[10]=y,n[11]=_):_=n[11];const C=_,j=I;let E;n[12]!==y?(E=async e=>{await w(e),y(e.serverId)},n[12]=y,n[13]=E):E=n[13];const K=E;let M;n[14]!==C||n[15]!==K||n[16]!==k||n[17]!==O||n[18]!==h||n[19]!==p?(M={terminate:p,snooze:h,consolidate:K,setKanban:k,setTags:O,automate:C,share:j},n[14]=C,n[15]=K,n[16]=k,n[17]=O,n[18]=h,n[19]=p,n[20]=M):M=n[20];return M};var e=r(_d[0]);r(_d[1]);var t=r(_d[2]),n=r(_d[3]),s=r(_d[4]),o=r(_d[5]),c=r(_d[6]),u=r(_d[7]),l=(function(e){if(e&&e.__esModule)return e;var t={};return e&&Object.keys(e).forEach(function(n){var s=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,s.get?s:{enumerable:!0,get:function(){return e[n]}})}),t.default=e,t})(r(_d[8])),d=r(_d[9]);function y(e,t){const n=encodeURIComponent(t);switch(e){case"whatsapp":return`https://wa.me/?text=${n}`;case"slack":return"slack://open";case"email":return`mailto:?body=${n}`;default:return f(e)}}function f(e){throw new Error(`unhandled share target: ${String(e)}`)}function v(e){const t=(0,n.getHostRuntimeStore)().getClient(e);if(!t)throw new Error(`No client for server ${e}`);return t}async function w({serverId:e,winnerId:t,sourceIds:n}){const s=v(e);await s.consolidateAgents(t,n.filter(e=>e!==t))}async function I(e,t){"slack"===e&&await l.setStringAsync(t).catch(p),await(0,d.openExternalUrl)(y(e,t))}function p(){}},4571,[350,36,3030,3274,4015,4003,4008,4007,3646,3577]);
|
|
16331
16331
|
__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,enteredLap:f=1}){const v=(0,i.useSessionFilterStore)(t=>t.clearFilters),b=(0,i.useSessionFilterStore)(t=>t.statusSelection),k=(0,i.useSessionFilterStore)(t=>t.tagSelection),y=(0,i.useSessionFilterStore)(t=>t.kanbanSelection),C=(0,i.useSessionFilterStore)(t=>t.providerSelection),h=(0,i.useSessionFilterStore)(t=>t.originSelection),A=(0,i.useSessionFilterStore)(t=>t.timeSelection),M=(0,i.useSessionFilterStore)(t=>t.timeField),R=(0,i.useSessionFilterStore)(t=>t.cycleStatusFilter),w=(0,i.useSessionFilterStore)(t=>t.cycleTagFilter),L=(0,i.useSessionFilterStore)(t=>t.cycleKanbanFilter),T=(0,i.useSessionFilterStore)(t=>t.cycleProviderFilter),B=(0,i.useSessionFilterStore)(t=>t.cycleOriginFilter),O=(0,i.useSessionFilterStore)(t=>t.toggleTimeWindow),P="archived"===M,_=P?null:A,K=[(0,s.isFilterSelectionActive)(b),(0,s.isFilterSelectionActive)(k),(0,s.isFilterSelectionActive)(y),(0,s.isFilterSelectionActive)(C),(0,s.isFilterSelectionActive)(h),null!==_],j=K.some(Boolean),x=K.filter(Boolean).length,W=(0,t.useCallback)(t=>(0,l.sessionPassesListFilter)({statusBucket:t.statusBucket,tags:[...t.tags],kanbanBucket:t.kanban,isArchived:!1,timeValue:"created"===M?t.createdAt:t.lastActivityAt,provider:t.provider,origin:t.origin,searchableText:""},{statusSelection:b,tagSelection:k,kanbanSelection:y,archivedMode:"all",timeSelection:_,providerSelection:C,originSelection:h,textQuery:""},p),[y,p,h,C,_,b,k,M]),$=(0,t.useMemo)(()=>j?c.filter(W):c,[j,W,c]),D=(0,t.useMemo)(()=>$.map(t=>Object.assign({},t,{tags:u[t.id]??t.tags,actedLap:S[t.id]??t.actedLap??null})),[S,$,u]),E=(0,t.useRef)(new Map),Q=(0,t.useRef)(b),V=(0,t.useRef)(k),q=(0,t.useRef)(y),z=(0,t.useRef)(C),G=(0,t.useRef)(h),H=(0,t.useRef)(_);Q.current===b&&V.current===k&&q.current===y&&z.current===C&&G.current===h&&H.current===_||(Q.current=b,V.current=k,q.current=y,z.current=C,G.current=h,H.current=_,E.current=new Map);const I=(0,t.useMemo)(()=>new Map(D.map(t=>[t.id,t])),[D]),J=(0,t.useMemo)(()=>{const t=[];for(let i=1;i<=F;i+=1){let s=(E.current.get(i)??[]).map(t=>I.get(t)).filter(t=>void 0!==t);if(i>f||0===s.length){const t=(0,n.buildLap)({sessions:D,lap:i,now:p});t.length>0&&E.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},[I,D,F,p,f]),N=(0,t.useCallback)(t=>R(t),[R]),U=(0,t.useCallback)(t=>w(t),[w]),X=(0,t.useCallback)(t=>L(t),[L]),Y=(0,t.useCallback)(t=>T(t),[T]),Z=(0,t.useCallback)(t=>B(t),[B]),ee=(0,t.useCallback)(t=>O(t),[O]);return{feed:J,activeFilters:x,statusSelection:b,tagSelection:k,kanbanSelection:y,providerSelection:C,originSelection:h,timeSelection:_,timeFieldDisarmed:P,onCycleStatus:N,onCycleTag:U,onCycleKanban:X,onCycleProvider:Y,onCycleOrigin:Z,onToggleTimeWindow:ee,onClearFilters:v}};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}`}},4572,[36,3617,3622,4573,4574]);
|
|
16332
16332
|
__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}},4573,[3442]);
|
|
16333
16333
|
__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])},4574,[3618,3623,3622]);
|
|
@@ -16701,5 +16701,5 @@ __d(function(g,r,_i,a,_m,_e,d){"use strict";var e,t=r(d[0]),n=this&&this.__creat
|
|
|
16701
16701
|
__r(694);
|
|
16702
16702
|
__r(341);
|
|
16703
16703
|
__r(0);
|
|
16704
|
-
//# sourceMappingURL=/_expo/static/js/web/index-
|
|
16705
|
-
//# debugId=
|
|
16704
|
+
//# sourceMappingURL=/_expo/static/js/web/index-2e2bf07968713b86ad2cc281cbdf81ce.js.map
|
|
16705
|
+
//# debugId=dbc02fba-c6b0-4b1f-9d0e-f892e63f25a4
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -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-
|
|
194
|
+
<script src="/_expo/static/js/web/index-2e2bf07968713b86ad2cc281cbdf81ce.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.
|
|
3
|
+
"version": "0.3.130",
|
|
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.
|
|
70
|
-
"@hyperdrive.bot/fleet-extension-sdk": "0.3.
|
|
71
|
-
"@hyperdrive.bot/fleet-highlight": "0.3.
|
|
72
|
-
"@hyperdrive.bot/fleet-protocol": "0.3.
|
|
73
|
-
"@hyperdrive.bot/fleet-relay": "0.3.
|
|
69
|
+
"@hyperdrive.bot/fleet-client": "0.3.130",
|
|
70
|
+
"@hyperdrive.bot/fleet-extension-sdk": "0.3.130",
|
|
71
|
+
"@hyperdrive.bot/fleet-highlight": "0.3.130",
|
|
72
|
+
"@hyperdrive.bot/fleet-protocol": "0.3.130",
|
|
73
|
+
"@hyperdrive.bot/fleet-relay": "0.3.130",
|
|
74
74
|
"@isaacs/ttlcache": "^2.1.4",
|
|
75
75
|
"@modelcontextprotocol/sdk": "^1.20.1",
|
|
76
76
|
"@opencode-ai/sdk": "1.2.6",
|
|
Binary file
|