sootsim 0.1.301 → 0.1.302

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.
Files changed (146) hide show
  1. package/dist-cli/bin.js +5 -5
  2. package/dist-cli/chunks/{agent-DWXNDXDJ.js → agent-QM5DJK6B.js} +2 -2
  3. package/dist-cli/chunks/{agent-wrapper-DTPQFEMR.js → agent-wrapper-HDOQKZ2C.js} +2 -2
  4. package/dist-cli/chunks/{app-fonts-MKW6UNBO.js → app-fonts-VPJDIM5M.js} +2 -2
  5. package/dist-cli/chunks/{assert-GN4KR5TI.js → assert-URPY7JOQ.js} +2 -2
  6. package/dist-cli/chunks/{auth-HLOV4GZN.js → auth-LDIGTG4T.js} +2 -2
  7. package/dist-cli/chunks/{beta-DP7K4JVJ.js → beta-7X7SMIUJ.js} +2 -2
  8. package/dist-cli/chunks/{camera-SH6FT7ZA.js → camera-44FBN2AD.js} +2 -2
  9. package/dist-cli/chunks/{chunk-4FCN3KOD.js → chunk-2AD7UVSQ.js} +2 -2
  10. package/dist-cli/chunks/{chunk-WE74HC52.js → chunk-2BQCOQBK.js} +2 -2
  11. package/dist-cli/chunks/{chunk-MPDBF324.js → chunk-2ELPPBLQ.js} +2 -2
  12. package/dist-cli/chunks/{chunk-KEFBMDYK.js → chunk-47FKMZKZ.js} +1 -1
  13. package/dist-cli/chunks/{chunk-77CFHIGG.js → chunk-5CWTAN4D.js} +1 -1
  14. package/dist-cli/chunks/{chunk-EKNSKDBI.js → chunk-5TWYZNIF.js} +1 -1
  15. package/dist-cli/chunks/{chunk-WKSX2VHB.js → chunk-7F57RUPB.js} +1 -1
  16. package/dist-cli/chunks/{chunk-VXRYV6G6.js → chunk-7UIDSSWQ.js} +1 -1
  17. package/dist-cli/chunks/{chunk-YOLPZLST.js → chunk-AHPEOPNQ.js} +1 -1
  18. package/dist-cli/chunks/{chunk-JDQ5AJJ4.js → chunk-BJDIJYWM.js} +2 -2
  19. package/dist-cli/chunks/{chunk-TABUERS3.js → chunk-BVUQ2PVZ.js} +1 -1
  20. package/dist-cli/chunks/{chunk-IRNRCBRW.js → chunk-C36FJ7OB.js} +1 -1
  21. package/dist-cli/chunks/{chunk-KYGB26L4.js → chunk-D4BPRTTD.js} +2 -2
  22. package/dist-cli/chunks/{chunk-4MNKKMYG.js → chunk-FNJ2IEDC.js} +2 -2
  23. package/dist-cli/chunks/{chunk-NR2G2PSN.js → chunk-GRMK3BZY.js} +2 -2
  24. package/dist-cli/chunks/{chunk-RCH5EVVP.js → chunk-H7J7U34H.js} +1 -1
  25. package/dist-cli/chunks/{chunk-P2HUPEXS.js → chunk-HFHHYL3K.js} +2 -2
  26. package/dist-cli/chunks/{chunk-QNQP3WYV.js → chunk-HNYGEEPF.js} +3 -3
  27. package/dist-cli/chunks/{chunk-3XC55LRK.js → chunk-I4NP3TJR.js} +2 -2
  28. package/dist-cli/chunks/{chunk-7LULF3D2.js → chunk-IJKBAKAA.js} +1 -1
  29. package/dist-cli/chunks/{chunk-SOBEJUH4.js → chunk-KNBZZC7R.js} +2 -2
  30. package/dist-cli/chunks/{chunk-NWM62KI3.js → chunk-LLCCT4VC.js} +2 -2
  31. package/dist-cli/chunks/{chunk-4OZG2LQA.js → chunk-N53HDXGW.js} +3 -3
  32. package/dist-cli/chunks/{chunk-4PKUB2QX.js → chunk-N7ATA44P.js} +2 -2
  33. package/dist-cli/chunks/{chunk-Q4ZLYMUP.js → chunk-NFC3BJMX.js} +1 -1
  34. package/dist-cli/chunks/{chunk-LE6JWEXU.js → chunk-OOP74SPV.js} +1 -1
  35. package/dist-cli/chunks/{chunk-BGY7U4IH.js → chunk-PDB5OX3V.js} +2 -2
  36. package/dist-cli/chunks/{chunk-7RU45W2O.js → chunk-QN5DSQNG.js} +1 -1
  37. package/dist-cli/chunks/{chunk-EODC7ZE7.js → chunk-QNA5RNYZ.js} +2 -2
  38. package/dist-cli/chunks/{chunk-M33LQWC2.js → chunk-QOS3GSOM.js} +1 -1
  39. package/dist-cli/chunks/{chunk-V2SZPQJF.js → chunk-REJQMXOG.js} +1 -1
  40. package/dist-cli/chunks/{chunk-J22XZAGG.js → chunk-RZLCDDE2.js} +2 -2
  41. package/dist-cli/chunks/{chunk-STF4UH5I.js → chunk-SMBMOSXY.js} +2 -2
  42. package/dist-cli/chunks/{chunk-6MFFAN7Q.js → chunk-T3UJXMFJ.js} +1 -1
  43. package/dist-cli/chunks/{chunk-PPD77GEP.js → chunk-TWOBAP7S.js} +2 -2
  44. package/dist-cli/chunks/{chunk-UK7X4OX3.js → chunk-UEFW7TPW.js} +1 -1
  45. package/dist-cli/chunks/{chunk-MKQNHDDF.js → chunk-UJ7P2CWC.js} +2 -2
  46. package/dist-cli/chunks/{chunk-NEKVW4FE.js → chunk-UNDGU5PA.js} +2 -2
  47. package/dist-cli/chunks/{chunk-SDBIR5ON.js → chunk-VEOPRCNX.js} +1 -1
  48. package/dist-cli/chunks/{chunk-OVEH5OOR.js → chunk-W6XC5TUY.js} +1 -1
  49. package/dist-cli/chunks/{chunk-YTUW6DGN.js → chunk-WQWYWERD.js} +2 -2
  50. package/dist-cli/chunks/{chunk-YIBVYNHV.js → chunk-XKUUILJ2.js} +1 -1
  51. package/dist-cli/chunks/{chunk-YXRD4B4X.js → chunk-XLAZCK5H.js} +2 -2
  52. package/dist-cli/chunks/{chunk-HEPIUAFX.js → chunk-XRRW4YFF.js} +3 -3
  53. package/dist-cli/chunks/{chunk-RW75MMQZ.js → chunk-YY27LKQF.js} +2 -2
  54. package/dist-cli/chunks/{chunk-MFLCDFRS.js → chunk-YY54A626.js} +2 -2
  55. package/dist-cli/chunks/{chunk-DNH4ZWVK.js → chunk-ZADSXYX7.js} +2 -2
  56. package/dist-cli/chunks/{chunk-FVNWUEK2.js → chunk-ZORZTTQL.js} +3 -3
  57. package/dist-cli/chunks/{chunk-Y4EES4A2.js → chunk-ZQLQVJUB.js} +2 -2
  58. package/dist-cli/chunks/{cleanup-DIDGDPIX.js → cleanup-QTLASIO7.js} +2 -2
  59. package/dist-cli/chunks/{cli-version-K3UX3EWQ.js → cli-version-EUG2MGT7.js} +2 -2
  60. package/dist-cli/chunks/{compat-CU5BZOTA.js → compat-DA2Z6HOU.js} +2 -2
  61. package/dist-cli/chunks/{config-ZDPMF7NT.js → config-U65JAS2W.js} +2 -2
  62. package/dist-cli/chunks/{control-PKNXORO3.js → control-ZCFRXISU.js} +2 -2
  63. package/dist-cli/chunks/daemon-S25HJFIG.js +4 -0
  64. package/dist-cli/chunks/{debug-FRVAHAUX.js → debug-OXP67EDF.js} +3 -3
  65. package/dist-cli/chunks/{desktop-RM4LA63P.js → desktop-ZEQXNFI2.js} +3 -3
  66. package/dist-cli/chunks/{detox-XXPJIQFG.js → detox-M4JBLH5P.js} +2 -2
  67. package/dist-cli/chunks/{device-5CWUNYYM.js → device-ISL5YP5C.js} +2 -2
  68. package/dist-cli/chunks/{diagnose-7WHQUJOH.js → diagnose-H2TRXSVS.js} +2 -2
  69. package/dist-cli/chunks/disk-cleanup-DY6JAHH3.js +4 -0
  70. package/dist-cli/chunks/drivers-EE4LTPSZ.js +4 -0
  71. package/dist-cli/chunks/{film-EEAFWERR.js → film-LKYPZOJD.js} +3 -3
  72. package/dist-cli/chunks/flow-WGICJ5KS.js +4 -0
  73. package/dist-cli/chunks/help-YQ63GAW6.js +4 -0
  74. package/dist-cli/chunks/{hidden-runtime-alias-GEDAK5VD.js → hidden-runtime-alias-JMWSVMJD.js} +2 -2
  75. package/dist-cli/chunks/{home-paths-PE4236U4.js → home-paths-S66AEW3L.js} +2 -2
  76. package/dist-cli/chunks/inspect-VKVWW64M.js +4 -0
  77. package/dist-cli/chunks/install-desktop-CH27FTQI.js +4 -0
  78. package/dist-cli/chunks/{login-NBG6XEI2.js → login-EJEEYZGB.js} +4 -4
  79. package/dist-cli/chunks/{logout-TLDRLFXP.js → logout-QCEW2MME.js} +2 -2
  80. package/dist-cli/chunks/{maestro-DHRICU2K.js → maestro-4IKBKIUF.js} +3 -3
  81. package/dist-cli/chunks/{maestro-generate-QZAGYXXJ.js → maestro-generate-WSYSKMND.js} +3 -3
  82. package/dist-cli/chunks/{mode-XOMKPZZG.js → mode-KQ5VDMPP.js} +2 -2
  83. package/dist-cli/chunks/{optional-demo-registry-L66RRINW.js → optional-demo-registry-MMHEMCBJ.js} +2 -2
  84. package/dist-cli/chunks/{perf-GSKQKH3W.js → perf-LGZDBRUM.js} +2 -2
  85. package/dist-cli/chunks/{permissions-D4XQ4HBT.js → permissions-DA4JXY2N.js} +2 -2
  86. package/dist-cli/chunks/{record-QTA3IWSU.js → record-TPU2TOEU.js} +3 -3
  87. package/dist-cli/chunks/{report-issue-BVPBXZEM.js → report-issue-PPUNSEEQ.js} +2 -2
  88. package/dist-cli/chunks/runtime-7MZZR6SC.js +4 -0
  89. package/dist-cli/chunks/{screenshot-command-YWDQBPE6.js → screenshot-command-2YSWGL4X.js} +3 -3
  90. package/dist-cli/chunks/{screenshots-capture-NUVPCCYY.js → screenshots-capture-AG2TIYLG.js} +2 -2
  91. package/dist-cli/chunks/{serve-FR5M2RRQ.js → serve-C3WLV2OX.js} +2 -2
  92. package/dist-cli/chunks/{setup-O4WMVQVP.js → setup-4KZKLDZV.js} +2 -2
  93. package/dist-cli/chunks/{skills-RUYLHJED.js → skills-65XCNSNM.js} +2 -2
  94. package/dist-cli/chunks/{storage-OCCDGKMN.js → storage-ADWG4UT7.js} +2 -2
  95. package/dist-cli/chunks/store-FEQIGIYH.js +4 -0
  96. package/dist-cli/chunks/telemetry-KBOJKIRS.js +4 -0
  97. package/dist-cli/chunks/{timeline-QWPHBXJ2.js → timeline-BRHYLQTW.js} +2 -2
  98. package/dist-cli/chunks/{upgrade-WUQAUREZ.js → upgrade-AEJNAP6O.js} +2 -2
  99. package/dist-cli/chunks/upload-QKJRNNL3.js +4 -0
  100. package/dist-cli/chunks/{version-TCSZK3WH.js → version-HZWBK4KJ.js} +2 -2
  101. package/dist-cli/chunks/{web-7P7SQTFS.js → web-LCSSJCZ4.js} +2 -2
  102. package/dist-cli/chunks/{what-happened-KIUBAPFB.js → what-happened-GWA24LHG.js} +2 -2
  103. package/dist-lib/agent-daemon-client.cjs +1 -1
  104. package/dist-lib/agent-events.cjs +1 -1
  105. package/dist-lib/agent-identity.cjs +1 -1
  106. package/dist-lib/agent-sessions.cjs +1 -1
  107. package/dist-lib/attached-projects.cjs +1 -1
  108. package/dist-lib/auth/shared-session.cjs +1 -1
  109. package/dist-lib/backend-origin.cjs +1 -1
  110. package/dist-lib/beta.cjs +1 -1
  111. package/dist-lib/beta.mjs +1 -1
  112. package/dist-lib/bridge-constants.cjs +1 -1
  113. package/dist-lib/cli-constants.cjs +1 -1
  114. package/dist-lib/config.cjs +1 -1
  115. package/dist-lib/detox/index.cjs +1 -1
  116. package/dist-lib/dev-bundle-resolution.cjs +1 -1
  117. package/dist-lib/home-paths.cjs +1 -1
  118. package/dist-lib/host/bridge-host.cjs +1 -1
  119. package/dist-lib/host/fetch-proxy-handler.cjs +1 -1
  120. package/dist-lib/host/fetch-proxy-overrides.cjs +1 -1
  121. package/dist-lib/host/fetch-proxy-overrides.mjs +1 -1
  122. package/dist-lib/host/websocket-proxy.cjs +1 -1
  123. package/dist-lib/index.cjs +1 -1
  124. package/dist-lib/jump-to-source-babel.cjs +1 -1
  125. package/dist-lib/menu.cjs +1 -1
  126. package/dist-lib/menu.mjs +1 -1
  127. package/dist-lib/metro.cjs +1 -1
  128. package/dist-lib/profiles.cjs +1 -1
  129. package/dist-lib/render-mode.cjs +1 -1
  130. package/dist-lib/scripts/dev-server-scanner.cjs +1 -1
  131. package/dist-lib/sdk.cjs +1 -1
  132. package/dist-lib/sdk.mjs +1 -1
  133. package/dist-lib/skills.cjs +1 -1
  134. package/dist-lib/vite.cjs +1 -1
  135. package/package.json +1 -1
  136. package/dist-cli/chunks/daemon-OXELSM3C.js +0 -4
  137. package/dist-cli/chunks/disk-cleanup-EGAZA7DS.js +0 -4
  138. package/dist-cli/chunks/drivers-JEAO6IWD.js +0 -4
  139. package/dist-cli/chunks/flow-DMSEJ526.js +0 -4
  140. package/dist-cli/chunks/help-BTYQFHMT.js +0 -4
  141. package/dist-cli/chunks/inspect-RKOCZZ2A.js +0 -4
  142. package/dist-cli/chunks/install-desktop-25G42KWB.js +0 -4
  143. package/dist-cli/chunks/runtime-UQY75DPC.js +0 -4
  144. package/dist-cli/chunks/store-56RG4ZWJ.js +0 -4
  145. package/dist-cli/chunks/telemetry-YSUNFE7N.js +0 -4
  146. package/dist-cli/chunks/upload-D5BXJTXK.js +0 -4
@@ -1,4 +1,4 @@
1
- /*! sootsim v0.1.301 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.302 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  import { createRequire as __sootsimCreateRequire } from 'node:module'
3
3
  var require = __sootsimCreateRequire(import.meta.url)
4
4
  import{existsSync as M,mkdirSync as A,readFileSync as v,rmSync as f,writeFileSync as h}from"fs";import{tmpdir as w}from"os";import{dirname as B,join as $,resolve as V}from"path";import{execFileSync as _}from"child_process";import{readFileSync as b}from"fs";import{createRequire as y}from"module";var c=null,p=null;function m(r){c||(c=E());try{return c(r)}catch{return null}}function C(r){p||(p=T());try{return p(r)}catch{return null}}function T(){if(process.platform==="linux")return r=>{try{return b(`/proc/${r}/comm`,"utf8").trim()||null}catch{return null}};if(process.platform==="darwin"){let r=x();return r||F()}return()=>null}function E(){let r=Number(process.env.PPID);if(Number.isFinite(r)&&r>1&&r!==process.ppid)return()=>r;if(process.platform==="linux")return D();if(process.platform==="darwin"){let n=R();return n||k()}return()=>null}function D(){return r=>{try{let n=b(`/proc/${r}/stat`,"utf8"),t=n.lastIndexOf(")");if(t<0)return null;let e=n.slice(t+1).trim().split(/\s+/),i=Number(e[1]);return Number.isFinite(i)&&i>0?i:null}catch{return null}}}var g=3,l=216,P=16,S=48,L=16;function R(){if(!process.versions?.bun)return null;try{let r=y(import.meta.url),{dlopen:n,FFIType:t}=r("bun:ffi"),e=n("/usr/lib/libproc.dylib",{proc_pidinfo:{args:[t.i32,t.i32,t.u64,t.ptr,t.i32],returns:t.i32}}),i=Buffer.alloc(l);return o=>{if(Number(e.symbols.proc_pidinfo(o,g,0n,i,l))<=0)return null;let u=i.readUInt32LE(P);return u>0?u:null}}catch{return null}}function x(){if(!process.versions?.bun)return null;try{let r=y(import.meta.url),{dlopen:n,FFIType:t}=r("bun:ffi"),e=n("/usr/lib/libproc.dylib",{proc_pidinfo:{args:[t.i32,t.i32,t.u64,t.ptr,t.i32],returns:t.i32}}),i=Buffer.alloc(l);return o=>{if(Number(e.symbols.proc_pidinfo(o,g,0n,i,l))<=0)return null;let u=i.subarray(S,S+L),I=u.indexOf(0);return u.subarray(0,I<0?u.length:I).toString("utf8")||null}}catch{return null}}function F(){return r=>{try{let t=_("lsof",["-R","-p",String(r),"-d","cwd","-a"],{encoding:"utf8",timeout:2e3,stdio:["ignore","pipe","ignore"]}).split(`
@@ -1,7 +1,7 @@
1
- /*! sootsim v0.1.301 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.302 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  import { createRequire as __sootsimCreateRequire } from 'node:module'
3
3
  var require = __sootsimCreateRequire(import.meta.url)
4
- import{a as m,b as T}from"./chunk-WKSX2VHB.js";import{a as w,b as A,c as C}from"./chunk-TABUERS3.js";import{a as I}from"./chunk-M33LQWC2.js";import{a as _,d as E}from"./chunk-YOLPZLST.js";import{G as O,o as x,q as f}from"./chunk-UK7X4OX3.js";import h from"fs";import v from"path";var c="default",j="profiles.json",a=1;function s(e){let r=e.trim();if(!r)throw new Error("profile id is required");if(!/^[A-Za-z0-9][A-Za-z0-9._-]*$/.test(r))throw new Error("profile ids must start with a letter or number and contain only letters, numbers, dot, dash, or underscore");if(r==="."||r==="..")throw new Error(`invalid profile id: ${r}`);return r}function g(){return v.join(f(),j)}function H(e){return`sootsim-profile-${s(e)}`}function z(e){return v.join(x(),"Partitions",H(e))}function y(e){return v.join(f(),"playwright",s(e))}function b(){try{let e=JSON.parse(h.readFileSync(g(),"utf8"));if(!e||e.version!==a)return{version:a,profiles:[]};let r=Array.isArray(e.profiles)?e.profiles.filter(t=>!!t&&typeof t.id=="string"&&typeof t.createdAt=="string"&&typeof t.updatedAt=="string").map(t=>({id:s(t.id),createdAt:t.createdAt,updatedAt:t.updatedAt})):[];return{version:a,profiles:r}}catch{return{version:a,profiles:[]}}}function M(e){return[...e].sort((r,t)=>r.id===c?-1:t.id===c?1:r.id.localeCompare(t.id))}function P(e){if(e.profiles.some(t=>t.id===c))return{...e,profiles:M(e.profiles)};let r=new Date().toISOString();return{version:a,profiles:M([{id:c,createdAt:r,updatedAt:r},...e.profiles])}}function S(e){O();let r=P(e),t=`${g()}.tmp`;return h.writeFileSync(t,`${JSON.stringify(r,null,2)}
4
+ import{a as m,b as T}from"./chunk-7F57RUPB.js";import{a as w,b as A,c as C}from"./chunk-BVUQ2PVZ.js";import{a as I}from"./chunk-QOS3GSOM.js";import{a as _,d as E}from"./chunk-AHPEOPNQ.js";import{G as O,o as x,q as f}from"./chunk-UEFW7TPW.js";import h from"fs";import v from"path";var c="default",j="profiles.json",a=1;function s(e){let r=e.trim();if(!r)throw new Error("profile id is required");if(!/^[A-Za-z0-9][A-Za-z0-9._-]*$/.test(r))throw new Error("profile ids must start with a letter or number and contain only letters, numbers, dot, dash, or underscore");if(r==="."||r==="..")throw new Error(`invalid profile id: ${r}`);return r}function g(){return v.join(f(),j)}function H(e){return`sootsim-profile-${s(e)}`}function z(e){return v.join(x(),"Partitions",H(e))}function y(e){return v.join(f(),"playwright",s(e))}function b(){try{let e=JSON.parse(h.readFileSync(g(),"utf8"));if(!e||e.version!==a)return{version:a,profiles:[]};let r=Array.isArray(e.profiles)?e.profiles.filter(t=>!!t&&typeof t.id=="string"&&typeof t.createdAt=="string"&&typeof t.updatedAt=="string").map(t=>({id:s(t.id),createdAt:t.createdAt,updatedAt:t.updatedAt})):[];return{version:a,profiles:r}}catch{return{version:a,profiles:[]}}}function M(e){return[...e].sort((r,t)=>r.id===c?-1:t.id===c?1:r.id.localeCompare(t.id))}function P(e){if(e.profiles.some(t=>t.id===c))return{...e,profiles:M(e.profiles)};let r=new Date().toISOString();return{version:a,profiles:M([{id:c,createdAt:r,updatedAt:r},...e.profiles])}}function S(e){O();let r=P(e),t=`${g()}.tmp`;return h.writeFileSync(t,`${JSON.stringify(r,null,2)}
5
5
  `,"utf8"),h.renameSync(t,g()),r}function K(){return S(b()).profiles}function Y(e){let r=s(e);return K().find(t=>t.id===r)??null}function L(e=c){let r=s(e),t=Y(r);return t||V(r)}function V(e){let r=s(e),t=P(b());if(t.profiles.some(i=>i.id===r))throw new Error(`profile already exists: ${r}`);let o=new Date().toISOString(),n={id:r,createdAt:o,updatedAt:o};return S({version:a,profiles:[...t.profiles,n]}),n}function ge(e){let r=s(e);if(r===c)throw new Error("the default profile cannot be deleted; clear it instead");let t=P(b()),o=t.profiles.find(n=>n.id===r);if(!o)throw new Error(`profile not found: ${r}`);return S({version:a,profiles:t.profiles.filter(n=>n.id!==r)}),J(r),o}function J(e){let r=s(e);for(let t of[z(r),y(r)])try{h.rmSync(t,{recursive:!0,force:!0})}catch{}}function X(){let e=w();return e?{available:!0,reason:null,detail:e}:{available:!1,reason:"no chromium-family browser found (chrome, chromium, edge, brave, arc)"}}async function Z(e){if(e.headless)return{launched:!1,message:"the chromium driver launches a visible browser window and cannot run headless \u2014 a headless `chrome --headless=new` process exits immediately and the sim never connects. for headless automation use `--driver playwright`."};let r=w();if(!r)return{launched:!1,message:"chromium not found \u2014 install chrome or run `sootsim list --drivers`"};if(!e.url)return{launched:!1,message:"chromium driver requires a target url"};if(e.profileId||e.ephemeralProfile)return{launched:!1,message:"profiles require electron or playwright; browser tabs use your current Chrome profile"};try{let t=await C(e.url,{detached:e.detached??!0});return{launched:!0,message:`chromium launched \u2192 ${e.url}`,pid:t.pid,target:t.target??r,attachUrl:e.url}}catch(t){return{launched:!1,message:`chromium spawn failed: ${t instanceof Error?t.message:String(t)}`}}}var R={id:"chromium",name:"chromium",description:"system chrome / chromium / edge \u2014 visible window (headless: use playwright)",kind:"browser",availability:X,launch:Z};function Q(){let e=m();return e?{available:!0,reason:null,detail:`${e.kind} @ ${e.path}`}:{available:!1,reason:"sootsim desktop app not installed (run `sootsim desktop install`)"}}async function ee(e){let r=m();if(!r)return{launched:!1,message:"sootsim desktop app not installed"};try{let t=await T(e.url,r,{device:e.device,profileId:e.profileId,ephemeralProfile:e.ephemeralProfile,ownerPid:e.ownerPid});return t.launched?{launched:!0,message:e.url?`electron launched via ${t.via} \u2192 ${e.url}`:`electron launched via ${t.via}`,target:t.target,attachUrl:e.url}:{launched:!1,message:"desktop companion failed to start"}}catch(t){return{launched:!1,message:`electron launch failed: ${t instanceof Error?t.message:String(t)}`}}}var W={id:"electron",name:"electron",description:"sootsim desktop companion app (native window, menu bar)",kind:"native",availability:Q,launch:ee};import{spawn as re}from"child_process";import{closeSync as te,mkdtempSync as oe,openSync as ie,readFileSync as ne}from"fs";import{createRequire as se}from"module";import{tmpdir as N}from"os";import{join as $}from"path";var ae=`
6
6
  const modulePath = process.env.SOOTSIM_PW_MODULE;
7
7
  const url = process.env.SOOTSIM_PW_URL;
@@ -1,4 +1,4 @@
1
- /*! sootsim v0.1.301 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.302 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  import { createRequire as __sootsimCreateRequire } from 'node:module'
3
3
  var require = __sootsimCreateRequire(import.meta.url)
4
4
  import{execFileSync as d,spawn as g}from"child_process";import{existsSync as m}from"fs";import{homedir as h}from"os";import{join as C}from"path";var f=["/Applications/Google Chrome.app/Contents/MacOS/Google Chrome","~/Applications/Google Chrome.app/Contents/MacOS/Google Chrome","/Applications/Chromium.app/Contents/MacOS/Chromium","~/Applications/Chromium.app/Contents/MacOS/Chromium","/Applications/Microsoft Edge.app/Contents/MacOS/Microsoft Edge","~/Applications/Microsoft Edge.app/Contents/MacOS/Microsoft Edge","/Applications/Brave Browser.app/Contents/MacOS/Brave Browser","~/Applications/Brave Browser.app/Contents/MacOS/Brave Browser","/Applications/Arc.app/Contents/MacOS/Arc","~/Applications/Arc.app/Contents/MacOS/Arc"],O=["/usr/bin/google-chrome","/usr/bin/chromium","/usr/bin/chromium-browser","/usr/bin/microsoft-edge","/usr/bin/brave-browser","/snap/bin/chromium"],w=["C:\\Program Files\\Google\\Chrome\\Application\\chrome.exe","C:\\Program Files (x86)\\Google\\Chrome\\Application\\chrome.exe","C:\\Program Files\\Microsoft\\Edge\\Application\\msedge.exe","C:\\Program Files (x86)\\Microsoft\\Edge\\Application\\msedge.exe","C:\\Program Files\\BraveSoftware\\Brave-Browser\\Application\\brave.exe","C:\\Program Files (x86)\\BraveSoftware\\Brave-Browser\\Application\\brave.exe"],U=["google-chrome","chromium","chromium-browser","microsoft-edge","brave-browser"],M=["chrome","msedge","brave"];function A(r){return r.startsWith("~/")?C(h(),r.slice(2)):r}function a(r){for(let n of r){let o=A(n);if(m(o))return o}return null}function x(r,n){try{let e=d(n==="win32"?"where":"which",[r],{encoding:"utf8",timeout:1500,stdio:["ignore","pipe","ignore"]}).trim();return e?e.split(/\r?\n/)[0]:null}catch{return null}}function c(r=process.platform){let n=process.env.CHROME_PATH||process.env.CHROMIUM_PATH;if(n&&m(n))return n;let o=a(r==="darwin"?f:r==="win32"?w:O);if(o)return o;let e=r==="win32"?M:U;for(let t of e){let i=x(t,r);if(i)return i}return null}function p(r,n={}){if(!r)throw new Error("openUrl requires a url");let o=n.platform??process.platform;return n.newWindow?s(r,{...n,platform:o,newWindow:!0}):o==="darwin"?{command:"open",args:n.background===!1?[r]:["-g",r],via:"system"}:o==="win32"?{command:"cmd",args:["/c","start","",r],via:"system"}:{command:"xdg-open",args:[r],via:"system"}}function s(r,n={}){if(!r)throw new Error("openUrl requires a url");let o=n.platform??process.platform,e="chromiumBinary"in n?n.chromiumBinary:c(o);if(!e)throw new Error("browser launch requires Chrome, Chromium, Edge, Brave, or Arc");let t=[];return n.newWindow!==!1&&t.push("--new-window"),t.push(r),{command:e,args:t,via:"chromium",target:e}}async function l(r,n,o){return new Promise((e,t)=>{let i=g(r,n,{detached:o,stdio:"ignore"});i.once("error",t),i.once("spawn",()=>{o&&i.unref(),e(i.pid)})})}async function u(r,n={}){let o=p(r,n),e=await l(o.command,o.args,n.detached??!0);return{...o,pid:e,attachUrl:r}}async function b(r,n={}){let o=s(r,n),e=await l(o.command,o.args,n.detached??!0);return{...o,pid:e,attachUrl:r}}async function v(r,n={}){await u(r,n)}export{c as a,u as b,b as c,v as d};
@@ -1,4 +1,4 @@
1
- /*! sootsim v0.1.301 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.302 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  import { createRequire as __sootsimCreateRequire } from 'node:module'
3
3
  var require = __sootsimCreateRequire(import.meta.url)
4
4
  var g=Object.create;var e=Object.defineProperty;var h=Object.getOwnPropertyDescriptor;var i=Object.getOwnPropertyNames;var j=Object.getPrototypeOf,k=Object.prototype.hasOwnProperty;var m=(a=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(a,{get:(b,c)=>(typeof require<"u"?require:b)[c]}):a)(function(a){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+a+'" is not supported')});var n=(a,b)=>()=>(b||a((b={exports:{}}).exports,b),b.exports),o=(a,b)=>{for(var c in b)e(a,c,{get:b[c],enumerable:!0})},l=(a,b,c,f)=>{if(b&&typeof b=="object"||typeof b=="function")for(let d of i(b))!k.call(a,d)&&d!==c&&e(a,d,{get:()=>b[d],enumerable:!(f=h(b,d))||f.enumerable});return a};var p=(a,b,c)=>(c=a!=null?g(j(a)):{},l(b||!a||!a.__esModule?e(c,"default",{value:a,enumerable:!0}):c,a));export{m as a,n as b,o as c,p as d};
@@ -1,7 +1,7 @@
1
- /*! sootsim v0.1.301 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.302 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  import { createRequire as __sootsimCreateRequire } from 'node:module'
3
3
  var require = __sootsimCreateRequire(import.meta.url)
4
- import{b as A,e as T,g as E}from"./chunk-YOLPZLST.js";import{K as S,L as I,M as B,N as P,g as F}from"./chunk-UK7X4OX3.js";var b="http://localhost:5173/";import{WebSocket as $}from"ws";var W=null;function M(){let i=F();if(W?.homeDir===i)return W.world;let r=_();return W={homeDir:i,world:r},r}function _(){let i=I();if(i&&P(i))return{source:"dev-bridge",bridgePort:i.bridgePort,shellBaseUrl:i.shellPort?`http://localhost:${i.shellPort}/`:b};let r=S();return r&&B(r)?{source:"daemon",bridgePort:r.bridgePort,shellBaseUrl:r.runtimePort>0?`http://localhost:${r.runtimePort}/`:b}:{source:"default",bridgePort:7668,shellBaseUrl:b}}function U(i){let r=I();if(r&&P(r)&&r.bridgePort===i)return{source:"dev-bridge",shellBaseUrl:r.shellPort?`http://localhost:${r.shellPort}/`:b};let e=S();return e&&B(e)&&e.bridgePort===i?{source:"daemon",shellBaseUrl:e.runtimePort>0?`http://localhost:${e.runtimePort}/`:b}:null}function Q(i){let r;try{let l=new URL(i);r=l.port?Number(l.port):l.protocol==="https:"?443:80}catch{return null}if(!Number.isFinite(r)||r<=0)return null;let e=I();if(e&&P(e)&&(e.shellPort===r||e.runtimePort===r||e.bridgePort===r))return e.bridgePort;let d=S();return d&&B(d)&&(d.runtimePort===r||d.bridgePort===r)?d.bridgePort:null}function D(){return M().bridgePort}function z(i,r){let e=U(i),d=e?.source==="dev-bridge"?"dev bridge":e?.source==="daemon"?"daemon bridge":"bridge",l=e?`${e.source}.json`:"no lockfile",t=r??e?.shellBaseUrl;process.stderr.write(` \u2192 ${d} :${i} (${t?`shell ${t}, `:""}${l})
4
+ import{b as A,e as T,g as E}from"./chunk-AHPEOPNQ.js";import{K as S,L as I,M as B,N as P,g as F}from"./chunk-UEFW7TPW.js";var b="http://localhost:5173/";import{WebSocket as $}from"ws";var W=null;function M(){let i=F();if(W?.homeDir===i)return W.world;let r=_();return W={homeDir:i,world:r},r}function _(){let i=I();if(i&&P(i))return{source:"dev-bridge",bridgePort:i.bridgePort,shellBaseUrl:i.shellPort?`http://localhost:${i.shellPort}/`:b};let r=S();return r&&B(r)?{source:"daemon",bridgePort:r.bridgePort,shellBaseUrl:r.runtimePort>0?`http://localhost:${r.runtimePort}/`:b}:{source:"default",bridgePort:7668,shellBaseUrl:b}}function U(i){let r=I();if(r&&P(r)&&r.bridgePort===i)return{source:"dev-bridge",shellBaseUrl:r.shellPort?`http://localhost:${r.shellPort}/`:b};let e=S();return e&&B(e)&&e.bridgePort===i?{source:"daemon",shellBaseUrl:e.runtimePort>0?`http://localhost:${e.runtimePort}/`:b}:null}function Q(i){let r;try{let l=new URL(i);r=l.port?Number(l.port):l.protocol==="https:"?443:80}catch{return null}if(!Number.isFinite(r)||r<=0)return null;let e=I();if(e&&P(e)&&(e.shellPort===r||e.runtimePort===r||e.bridgePort===r))return e.bridgePort;let d=S();return d&&B(d)&&(d.runtimePort===r||d.bridgePort===r)?d.bridgePort:null}function D(){return M().bridgePort}function z(i,r){let e=U(i),d=e?.source==="dev-bridge"?"dev bridge":e?.source==="daemon"?"daemon bridge":"bridge",l=e?`${e.source}.json`:"no lockfile",t=r??e?.shellBaseUrl;process.stderr.write(` \u2192 ${d} :${i} (${t?`shell ${t}, `:""}${l})
5
5
  `)}var C=class extends Error{lock;constructor(r,e){super(r),this.name="BridgeSimLockedError",this.lock=e}};function N(i){return i==="flag"?"via --sim":i==="saved"?"saved via `sootsim use`":"primary fallback \u2014 no sim pinned"}function X(i,r={}){let e=new Set,d=r.port??D(),l=r.commandTimeoutMs??15e3,t,u="none",v=new Set(r.stripBooleanFlags??[]),y=new Set(r.stripValueFlags??[]);for(let n=0;n<i.length;n++){let a=i[n];if(a==="--port"||a==="-p"){e.add(n),n+1<i.length&&(e.add(n+1),d=Number(i[n+1])),n++;continue}if(a.startsWith("--port=")){e.add(n),d=Number(a.slice(7));continue}if(a==="--timeout"){e.add(n),n+1<i.length&&(e.add(n+1),l=Number(i[n+1])),n++;continue}if(a==="--sim"||a==="--session"||a==="--tab"){e.add(n),n+1<i.length&&(e.add(n+1),t=i[n+1]?.trim()||void 0,u="flag"),n++;continue}let s=a.startsWith("--sim=")?a.slice(6):a.startsWith("--session=")?a.slice(10):a.startsWith("--tab=")?a.slice(6):void 0;if(s!==void 0){e.add(n),t=s.trim()||void 0,u="flag";continue}if(v.has(a)){e.add(n);continue}y.has(a)&&(e.add(n),n+1<i.length&&e.add(n+1),n++)}if(!t){let n=T();n&&(t=n.trim()||void 0,u="saved")}return{positional:i.filter((n,a)=>!e.has(a)),wsPort:d,simId:t,simIdSource:u,commandTimeoutMs:l}}function R(i,r={}){let e=1,d=r.commandTimeoutMs??15e3,l=new Map,t=new $(`ws://localhost:${i}`),u=A(),v=new Promise((s,o)=>{t.on("open",()=>{try{t.send(JSON.stringify({type:"bridge:hello",id:0,cliIdentityKey:u.key,cliIdentitySource:u.source,cliLabel:r.cliLabel}))}catch{}s()}),t.on("error",c=>{let m=c.message?`: ${c.message}`:"";o(new Error(`could not connect to ws://localhost:${i}${m}`))})}),y=!1,n=!1;function a(s,o){if(n||process.env.SOOTSIM_QUIET_TARGET_NOTICE==="1"||s.startsWith("bridge:")||s==="focus"||s==="close")return;n=!0;let c=o??"primary",m=N(o?r.simIdSource:"none");process.stderr.write(` \u2192 ${c} (${m})
6
6
  `)}return t.on("message",s=>{let o;try{o=JSON.parse(s.toString())}catch{return}if(o.id===0)return;let c=l.get(o.id);c&&(l.delete(o.id),o._otherCliCount>0&&!y&&(y=!0,process.stderr.write(`
7
7
  \u26A0 ${o._otherCliCount} other CLI identity/identities are driving this sim
@@ -1,5 +1,5 @@
1
- /*! sootsim v0.1.301 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.302 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  import { createRequire as __sootsimCreateRequire } from 'node:module'
3
3
  var require = __sootsimCreateRequire(import.meta.url)
4
4
  function i(t,o,a,c){return{width:3,ringToggle:{side:"left",top:t[0],height:t[1]},volumeUp:{side:"left",top:o[0],height:o[1]},volumeDown:{side:"left",top:a[0],height:a[1]},lock:{side:"right",top:c[0],height:c[1]}}}var E={width:2.5,lock:{side:"right",top:188.7,height:68.1},ringToggle:{side:"left",top:113.2,height:36},volumeUp:{side:"left",top:188.2,height:68.1},volumeDown:{side:"left",top:269,height:68.1}},y={width:3,lock:{side:"right",top:671/2.625,height:163/2.625},ringToggle:{side:"left",top:-1e3,height:0},volumeUp:{side:"right",top:971/2.625,height:165/2.625},volumeDown:{side:"right",top:1136/2.625,height:166/2.625}},A={width:3,lock:{side:"right",top:248,height:72},ringToggle:{side:"left",top:-1e3,height:0},volumeUp:{side:"right",top:144,height:62},volumeDown:{side:"right",top:216,height:62}},s=24,d="17",u=37,T=1080/2.625,O=2400/2.625,h=132/2.625;function r(t){return{top:t,right:t,bottom:t,left:t}}function N(t){let o=(t.frameInsets.top+t.frameInsets.right+t.frameInsets.bottom+t.frameInsets.left)/4,a=Math.max(Math.abs(t.frameInsets.top-o),Math.abs(t.frameInsets.right-o),Math.abs(t.frameInsets.bottom-o),Math.abs(t.frameInsets.left-o));return{frameRadius:t.cornerRadius+o,frameRadiusApproximationError:a,screenRadius:t.cornerRadius}}function _(t){return{...N(t),frameHeight:t.frameInsets.top+t.height+t.frameInsets.bottom,frameWidth:t.frameInsets.left+t.width+t.frameInsets.right,screenBottomInset:t.frameInsets.bottom,screenLeft:t.frameInsets.left,screenRightInset:t.frameInsets.right,screenTop:t.frameInsets.top}}function n(t){return{...t,platform:"ios",navigationBarHeight:0,navigationBarMode:t.homeIndicatorHeight>0?"gesture":"none",displayCutout:{top:t.dynamicIsland?t.statusBarHeight:0,bottom:0,left:0,right:0},cameraCutout:null,osVersion:t.iosVersion,androidApiLevel:null,systemName:"iOS",manufacturer:"Apple",brand:"Apple",modelName:t.name}}var C={"canvas-workspace":n({name:"Canvas Workspace",width:1440,height:900,scale:1,statusBarHeight:0,homeIndicatorHeight:0,cornerRadius:0,continuousCornerRadius:0,frameInsets:r(16),dynamicIsland:null,safeAreaInsets:{top:0,bottom:0,left:0,right:0},iosVersion:"26.4",physicalPPI:110,hardwareButtons:i([185.8,41.7],[258.2,67.6],[344,67.6],[281.5,106.9]),experimental:!0}),"iphone-se":n({name:"iPhone SE",width:375,height:667,scale:2,statusBarHeight:20,homeIndicatorHeight:0,cornerRadius:0,continuousCornerRadius:0,frameInsets:r(28.7),dynamicIsland:null,safeAreaInsets:{top:20,bottom:0,left:0,right:0},iosVersion:"15.8",physicalPPI:326,hardwareButtons:E}),"iphone-14":n({name:"iPhone 14",width:390,height:844,scale:3,statusBarHeight:47,homeIndicatorHeight:34,cornerRadius:46.2,continuousCornerRadius:67.462,frameInsets:r(19.5),dynamicIsland:null,safeAreaInsets:{top:47,bottom:34,left:0,right:0},iosVersion:"17.6",physicalPPI:460,hardwareButtons:i([141.7,29.7],[205.9,69.6],[289.5,69.6],[228.9,114.5])}),"iphone-15":n({name:"iPhone 15",width:393,height:852,scale:3,statusBarHeight:59,homeIndicatorHeight:34,cornerRadius:53.9,continuousCornerRadius:73.402,frameInsets:r(18.2),dynamicIsland:{width:126,height:37.3,top:14.1},safeAreaInsets:{top:59,bottom:34,left:0,right:0},iosVersion:"17.6",physicalPPI:460,hardwareButtons:i([171.7,32],[235.8,65.3],[320.5,65.3],[280.6,105.2])}),"iphone-15-plus":n({name:"iPhone 15 Plus",width:430,height:932,scale:3,statusBarHeight:59,homeIndicatorHeight:34,cornerRadius:53.9,continuousCornerRadius:74.654,frameInsets:r(17.3),dynamicIsland:{width:126,height:37.3,top:11.4},safeAreaInsets:{top:59,bottom:34,left:0,right:0},iosVersion:"17.6",physicalPPI:460,hardwareButtons:i([172.1,33],[236.1,66.6],[321.2,66.6],[281,106.8])}),"iphone-15-pro":n({name:"iPhone 15 Pro",width:393,height:852,scale:3,statusBarHeight:59,homeIndicatorHeight:34,cornerRadius:53.9,continuousCornerRadius:73.402,frameInsets:r(15.3),dynamicIsland:{width:126,height:38,top:13.4},safeAreaInsets:{top:59,bottom:34,left:0,right:0},iosVersion:"18.2",physicalPPI:460,hardwareButtons:i([159.1,31.5],[220.1,61.9],[299,61.9],[260.8,98.9])}),"iphone-15-pro-max":n({name:"iPhone 15 Pro Max",width:430,height:932,scale:3,statusBarHeight:59,homeIndicatorHeight:34,cornerRadius:53.9,continuousCornerRadius:74.654,frameInsets:r(15.3),dynamicIsland:{width:126,height:38,top:13.3},safeAreaInsets:{top:59,bottom:34,left:0,right:0},iosVersion:"18.2",physicalPPI:460,hardwareButtons:i([173.3,32.2],[253.4,61.7],[343.3,61.7],[268.5,98.5])}),"iphone-16":n({name:"iPhone 16",width:393,height:852,scale:3,statusBarHeight:59,homeIndicatorHeight:34,cornerRadius:53.9,continuousCornerRadius:73.402,frameInsets:r(15.3),dynamicIsland:{width:126,height:37.3,top:11},safeAreaInsets:{top:59,bottom:34,left:0,right:0},iosVersion:"26.4",physicalPPI:460,hardwareButtons:i([159.1,31.5],[220.1,61.9],[299,61.9],[260.8,98.9])}),"iphone-16-plus":n({name:"iPhone 16 Plus",width:430,height:932,scale:3,statusBarHeight:59,homeIndicatorHeight:34,cornerRadius:53.9,continuousCornerRadius:74.654,frameInsets:r(15.3),dynamicIsland:{width:126,height:37.3,top:11.4},safeAreaInsets:{top:59,bottom:34,left:0,right:0},iosVersion:"26.4",physicalPPI:460,hardwareButtons:i([173.3,32.2],[253.4,61.7],[343.3,61.7],[268.5,98.5])}),"iphone-16-pro":n({name:"iPhone 16 Pro",width:402,height:874,scale:3,statusBarHeight:62,homeIndicatorHeight:34,cornerRadius:61,continuousCornerRadius:84.661,frameInsets:r(15.3),dynamicIsland:{width:126,height:38,top:13.5},safeAreaInsets:{top:62,bottom:34,left:0,right:0},iosVersion:"26.4",physicalPPI:460,hardwareButtons:i([159.1,31.5],[220.1,61.9],[299,61.9],[260.8,98.9])}),"iphone-16-pro-max":n({name:"iPhone 16 Pro Max",width:440,height:956,scale:3,statusBarHeight:62,homeIndicatorHeight:34,cornerRadius:61.3,continuousCornerRadius:85.163,frameInsets:r(15.4),dynamicIsland:{width:126,height:38,top:14},safeAreaInsets:{top:62,bottom:34,left:0,right:0},iosVersion:"26.4",physicalPPI:460,hardwareButtons:i([178.8,32.2],[266.8,61.8],[352.7,61.8],[292.2,98.3])}),"iphone-17":n({name:"iPhone 17",width:402,height:874,scale:3,statusBarHeight:59,homeIndicatorHeight:34,cornerRadius:61,continuousCornerRadius:84.661,frameInsets:r(15.3),dynamicIsland:{width:126,height:37.3,top:14},safeAreaInsets:{top:59,bottom:34,left:0,right:0},iosVersion:"26.4",physicalPPI:460,hardwareButtons:i([159.1,31.5],[220.1,61.9],[299,61.9],[260.8,98.9])}),"iphone-17-air":n({name:"iPhone Air",width:420,height:912,scale:3,statusBarHeight:59,homeIndicatorHeight:34,cornerRadius:64.6,continuousCornerRadius:88.313,frameInsets:r(10.7),dynamicIsland:{width:126,height:38,top:20},safeAreaInsets:{top:59,bottom:34,left:0,right:0},iosVersion:"26.4",physicalPPI:460,hardwareButtons:i([178.8,32.2],[266.8,61.8],[352.7,61.8],[292.2,98.3])}),"iphone-17-pro":n({name:"iPhone 17 Pro",width:402,height:874,scale:3,statusBarHeight:59,homeIndicatorHeight:34,cornerRadius:61,continuousCornerRadius:84.661,frameInsets:r(15.3),dynamicIsland:{width:126,height:38,top:14},safeAreaInsets:{top:59,bottom:34,left:0,right:0},iosVersion:"26.4",physicalPPI:460,hardwareButtons:i([159.1,31.5],[220.1,61.9],[299,61.9],[260.8,98.9])}),"iphone-17-pro-max":n({name:"iPhone 17 Pro Max",width:440,height:956,scale:3,statusBarHeight:62,homeIndicatorHeight:34,cornerRadius:61.3,continuousCornerRadius:85.163,frameInsets:r(15.4),dynamicIsland:{width:126,height:38,top:14},safeAreaInsets:{top:62,bottom:34,left:0,right:0},iosVersion:"26.4",physicalPPI:460,hardwareButtons:i([178.8,32.2],[266.8,61.8],[352.7,61.8],[292.2,98.3])}),"pixel-8":{platform:"android",name:"Pixel 8",width:T,height:O,scale:2.625,statusBarHeight:h,homeIndicatorHeight:0,navigationBarHeight:s,navigationBarMode:"gesture",displayCutout:{top:h,bottom:0,left:0,right:0},cornerRadius:39,continuousCornerRadius:39,frameInsets:{top:55/2.625,right:50/2.625,bottom:58/2.625,left:49/2.625},dynamicIsland:null,cameraCutout:{diameter:72.5/2.625},safeAreaInsets:{top:h,bottom:s,left:0,right:0},osVersion:d,iosVersion:"",androidApiLevel:u,systemName:"Android",manufacturer:"Google",brand:"google",modelName:"Pixel 8",physicalPPI:428,hardwareButtons:y},"pixel-8-three-button":{platform:"android",name:"Pixel 8 (3-button)",width:T,height:O,scale:2.625,statusBarHeight:h,homeIndicatorHeight:0,navigationBarHeight:48,navigationBarMode:"three-button",displayCutout:{top:h,bottom:0,left:0,right:0},cornerRadius:39,continuousCornerRadius:39,frameInsets:{top:55/2.625,right:50/2.625,bottom:58/2.625,left:49/2.625},dynamicIsland:null,cameraCutout:{diameter:72.5/2.625},safeAreaInsets:{top:h,bottom:48,left:0,right:0},osVersion:d,iosVersion:"",androidApiLevel:u,systemName:"Android",manufacturer:"Google",brand:"google",modelName:"Pixel 8",physicalPPI:428,hardwareButtons:y},"pixel-9-pro-xl":{platform:"android",name:"Pixel 9 Pro XL",width:448,height:997,scale:3,statusBarHeight:40,homeIndicatorHeight:0,navigationBarHeight:s,navigationBarMode:"gesture",displayCutout:{top:40,bottom:0,left:0,right:0},cornerRadius:41,continuousCornerRadius:41,frameInsets:r(12),dynamicIsland:null,cameraCutout:{diameter:24},safeAreaInsets:{top:40,bottom:s,left:0,right:0},osVersion:d,iosVersion:"",androidApiLevel:u,systemName:"Android",manufacturer:"Google",brand:"google",modelName:"Pixel 9 Pro XL",physicalPPI:486,hardwareButtons:y},"pixel-10":{platform:"android",name:"Pixel 10",width:360,height:808,scale:3,statusBarHeight:40,homeIndicatorHeight:0,navigationBarHeight:s,navigationBarMode:"gesture",displayCutout:{top:40,bottom:0,left:0,right:0},cornerRadius:40,continuousCornerRadius:40,frameInsets:r(18),dynamicIsland:null,cameraCutout:{diameter:26},safeAreaInsets:{top:40,bottom:s,left:0,right:0},osVersion:d,iosVersion:"",androidApiLevel:u,systemName:"Android",manufacturer:"Google",brand:"google",modelName:"Pixel 10",physicalPPI:422,hardwareButtons:y},"galaxy-s24":{platform:"android",name:"Galaxy S24",width:360,height:780,scale:3,statusBarHeight:36,homeIndicatorHeight:0,navigationBarHeight:s,navigationBarMode:"gesture",displayCutout:{top:36,bottom:0,left:0,right:0},cornerRadius:36,continuousCornerRadius:36,frameInsets:r(8),dynamicIsland:null,cameraCutout:{diameter:18},safeAreaInsets:{top:36,bottom:s,left:0,right:0},osVersion:d,iosVersion:"",androidApiLevel:u,systemName:"Android",manufacturer:"Samsung",brand:"samsung",modelName:"SM-S921B",physicalPPI:416,hardwareButtons:A},"galaxy-s24-ultra":{platform:"android",name:"Galaxy S24 Ultra",width:384,height:832,scale:3.75,statusBarHeight:36,homeIndicatorHeight:0,navigationBarHeight:s,navigationBarMode:"gesture",displayCutout:{top:36,bottom:0,left:0,right:0},cornerRadius:24,continuousCornerRadius:24,frameInsets:r(9),dynamicIsland:null,cameraCutout:{diameter:18},safeAreaInsets:{top:36,bottom:s,left:0,right:0},osVersion:d,iosVersion:"",androidApiLevel:u,systemName:"Android",manufacturer:"Samsung",brand:"samsung",modelName:"SM-S928B",physicalPPI:505,hardwareButtons:A}},R="iphone-17-pro";function z(t){return C[t]}function v(){return Object.keys(C)}function G(){return v().filter(t=>!C[t].experimental)}var D=["off","soft","full"];function B(t){return t==="off"||t==="soft"||t==="full"}var S={"iphone-6-9":{name:"iphone-6-9",label:'iPhone 6.7"',width:1284,height:2778,store:"apple"},"iphone-6-1":{name:"iphone-6-1",label:'iPhone 6.5"',width:1242,height:2688,store:"apple"},"android-phone":{name:"android-phone",label:"Google Play phone",width:1080,height:1920,store:"google"},"android-tablet-7":{name:"android-tablet-7",label:'Google Play 7" tablet',width:1200,height:1920,store:"google"},"android-tablet-10":{name:"android-tablet-10",label:'Google Play 10" tablet',width:1600,height:2560,store:"google"}},w={dark:{type:"gradient",direction:180,glow:"#4caeff",stops:[{offset:0,color:"#111827"},{offset:40,color:"#101725"},{offset:100,color:"#06080d"}]},cyan:{type:"gradient",direction:180,glow:"#25c3ec",stops:[{offset:0,color:"#1b465c"},{offset:32,color:"#122336"},{offset:100,color:"#05070b"}]},gold:{type:"gradient",direction:180,glow:"#ffc25a",stops:[{offset:0,color:"#3b2f1a"},{offset:34,color:"#18140d"},{offset:100,color:"#050505"}]},red:{type:"gradient",direction:180,glow:"#ff6178",stops:[{offset:0,color:"#3e1018"},{offset:35,color:"#17080c"},{offset:100,color:"#050405"}]}},K={color:"#25c3ec",blur:120,spread:52,opacity:.34},Y="iphone-17-pro";var H=[{name:"white",value:"#ffffff"},{name:"gray-light",value:"#d1d5db"},{name:"gray",value:"#6b7280"},{name:"gray-dark",value:"#3b4350"},{name:"slate",value:"#2a3644"},{name:"black",value:"#000000"},{name:"cyan",value:"#25c3ec"},{name:"blue",value:"#3f7cff"},{name:"teal",value:"#1fc7b4"},{name:"green",value:"#42c95d"},{name:"lime",value:"#92d21b"},{name:"gold",value:"#f5c518"},{name:"orange",value:"#ff912e"},{name:"coral",value:"#ff6f5b"},{name:"red",value:"#ff4f6f"},{name:"berry",value:"#d054ff"},{name:"magenta",value:"#ff4eb8"}],k=Object.fromEntries(H.map(t=>[t.name,t.value]));function X(t){return k[t]??k.gray}function $(t){return Object.prototype.hasOwnProperty.call(S,t)?S[t]:null}function L(t){return{type:t.type,color:t.color,direction:t.direction,glow:t.glow,stops:t.stops?.map(o=>({...o}))}}function q(t){return Object.prototype.hasOwnProperty.call(w,t)?L(w[t]):null}var F=[.823,.882,.941,1,1.118,1.235,1.353,1.786,2.143,2.643,3.143,3.571];function e(t,o){return Object.freeze({fontSize:t,lineHeight:o})}var Q=Object.freeze({xs:Object.freeze({largeTitle:e(31,44.408775),title1:e(25,37.128102),title2:e(19,27.816685),title3:e(17,23.807109),headline:e(14,20.161577),body:e(14,20.161577),callout:e(13,18.942243),subheadline:e(12,16.720313),footnote:e(12,16.986979),caption1:e(11,15.564453),caption2:e(11,16.126953)}),s:Object.freeze({largeTitle:e(32,45.797256),title1:e(26,38.556756),title2:e(20,29.22433),title3:e(18,25.160469),headline:e(15,21.536754),body:e(15,21.536754),callout:e(14,20.326079),subheadline:e(13,18.213672),footnote:e(12,16.986979),caption1:e(11,15.564453),caption2:e(11,16.126953)}),m:Object.freeze({largeTitle:e(33,47.185737),title1:e(27,39.985409),title2:e(21,30.631975),title3:e(19,26.513828),headline:e(16,22.911932),body:e(16,22.911932),callout:e(15,21.709914),subheadline:e(14,19.557031),footnote:e(12,16.986979),caption1:e(11,15.564453),caption2:e(11,16.126953)}),l:Object.freeze({largeTitle:e(34,48.574219),title1:e(28,41.414063),title2:e(22,32.253906),title3:e(20,27.867187),headline:e(17,24.287109),body:e(17,24.287109),callout:e(16,23.09375),subheadline:e(15,20.900391),footnote:e(13,18.513672),caption1:e(12,17.320313),caption2:e(11,16.126953)}),xl:Object.freeze({largeTitle:e(36,51.351181),title1:e(30,44.271369),title2:e(24,35.069196),title3:e(22,30.733906),headline:e(19,27.037464),body:e(19,27.037464),callout:e(18,25.861421),subheadline:e(17,23.587109),footnote:e(15,21.233724),caption1:e(14,20.269531),caption2:e(13,19.667518)}),xxl:Object.freeze({largeTitle:e(38,54.323266),title1:e(32,47.128676),title2:e(26,37.884487),title3:e(24,33.440625),headline:e(21,29.78782),body:e(21,29.78782),callout:e(20,28.629092),subheadline:e(19,26.273828),footnote:e(17,23.953776),caption1:e(16,23.03125),caption2:e(15,22.515775)}),xxxl:Object.freeze({largeTitle:e(40,57.100229),title1:e(34,50.221278),title2:e(28,40.699777),title3:e(26,36.147344),headline:e(23,32.719993),body:e(23,32.719993),callout:e(22,31.58724),subheadline:e(21,28.960547),footnote:e(19,26.673828),caption1:e(18,25.792969),caption2:e(17,25.364032)}),ax1:Object.freeze({largeTitle:e(44,62.654154),title1:e(38,56.171186),title2:e(34,49.359933),title3:e(31,43.074141),headline:e(28,39.595881),body:e(28,39.595881),callout:e(26,37.122582),subheadline:e(25,34.483984),footnote:e(23,32.280599),caption1:e(22,31.316406),caption2:e(20,29.636418)}),ax2:Object.freeze({largeTitle:e(48,68.403201),title1:e(43,63.314453),title2:e(39,56.612444),title3:e(37,51.194297),headline:e(33,46.653587),body:e(33,46.653587),callout:e(32,45.616071),subheadline:e(30,41.200781),footnote:e(27,37.720703),caption1:e(26,37.027344),caption2:e(24,35.332933)}),ax3:Object.freeze({largeTitle:e(52,73.957127),title1:e(48,70.693015),title2:e(44,63.65067),title3:e(43,59.474453),headline:e(40,56.461648),body:e(40,56.461648),callout:e(38,54.109561),subheadline:e(36,49.410937),footnote:e(33,46.047526),caption1:e(32,45.5),caption2:e(29,42.684345)}),ax4:Object.freeze({largeTitle:e(56,79.706174),title1:e(53,77.600988),title2:e(50,72.310826),title3:e(49,67.754609),headline:e(47,65.360618),body:e(47,66.269709),callout:e(44,62.412574),subheadline:e(42,57.621094),footnote:e(38,53.014323),caption1:e(37,52.404297),caption2:e(34,50.035757)}),ax5:Object.freeze({largeTitle:e(60,85.260099),title1:e(58,85.214844),title2:e(56,80.970982),title3:e(55,76.034766),headline:e(53,74.520774),body:e(53,74.520774),callout:e(51,72.2899),subheadline:e(49,67.174609),footnote:e(44,61.174479),caption1:e(43,60.876953),caption2:e(40,58.811298)})});function M(t){return F.some(o=>Object.is(o,t))}var ne=["colorScheme","reduceMotion","boldText","fontSize","largerAccessibilitySizes"],l={deviceModel:{type:"enum",default:R,description:"device model to simulate",cliFlag:"device",cliFlagShort:"d",options:v(),group:"device"},orientation:{type:"enum",default:"portrait",description:"screen orientation",cliFlag:"orientation",options:["portrait","landscape"],group:"device"},colorScheme:{type:"enum",default:"auto",description:"color scheme (auto follows system preference)",cliFlag:"theme",cliFlagShort:"t",options:["light","dark","auto"],group:"appearance"},reduceMotion:{type:"boolean",default:!1,description:"reduce motion",group:"appearance"},boldText:{type:"boolean",default:!1,description:"bold text",group:"appearance"},fontSize:{type:"number",default:1,description:"font size multiplier (1.0 = default)",group:"appearance",validate:t=>t>=.5&&t<=4},largerAccessibilitySizes:{type:"boolean",default:!1,description:"show accessibility categories in the dynamic type size picker",group:"appearance"},networkCondition:{type:"enum",default:"wifi",description:"simulated network condition",cliFlag:"network",options:["wifi","lte","fast-3g","slow-3g","offline"],group:"network"},language:{type:"string",default:"en",description:"language code (ISO 639-1)",cliFlag:"language",group:"locale"},region:{type:"string",default:"US",description:"region code (ISO 3166-1)",cliFlag:"region",group:"locale"},renderDensity:{type:"number",default:0,description:"render density override in device pixels per point for high-resolution capture (0 = device native)",group:"simulator",validate:t=>t===0||t>=1&&t<=9},showTouches:{type:"boolean",default:!1,description:"show touch indicators",group:"simulator"},showFrame:{type:"boolean",default:!0,description:"show device frame",cliFlag:"frame",group:"simulator"},showMenuBar:{type:"boolean",default:!0,description:"keep the menu bar visible instead of revealing it at the top edge",group:"simulator"},showRail:{type:"boolean",default:!0,description:"keep the rail visible instead of revealing it on hover",group:"simulator"},solidWindow:{type:"boolean",default:!1,description:"desktop app: always use the solid, freely-resizable window instead of the device-shaped transparent one (3d mode uses it regardless)",group:"simulator"},ambientGlow:{type:"enum",default:"off",description:"bleed the app's own edge colors outward behind the device, like bias lighting behind a TV (off, soft, full)",options:D,cliFlag:"ambient-glow",group:"simulator"},screenshotMode:{type:"boolean",default:!1,description:"show screenshot composition mode in the browser shell",group:"simulator"},screenshotCanvasEditing:{type:"boolean",default:!1,description:"experimental figma-style slide editing: draggable copy block, drop-in image layers (owner review pending)",group:"simulator"},threeMode:{type:"boolean",default:!1,description:"show the experimental 3d device stage in the browser shell",group:"simulator"},threeRecordingEditor:{type:"boolean",default:!1,description:"dock the 3d recording editor in the 3d stage (toggled from its rail)",group:"simulator"},screenshotCanvas:{type:"enum",default:"iphone-6-9",description:"target app-store canvas preset for screenshot mode",options:Object.keys(S),group:"simulator"},screenshotBackground:{type:"enum",default:"dark",description:"background preset rendered inside the screenshot canvas",options:Object.keys(w),group:"simulator"},screenshotText:{type:"enum",default:"bold-top",description:"text layout preset for the screenshot canvas",options:["bold-top","editorial-left","minimal-bottom","none"],group:"simulator"},screenshotPose:{type:"enum",default:"straight",description:"device pose preset inside the screenshot canvas",options:["straight","tilted-left","tilted-right","cut-bottom","cut-top"],group:"simulator"},screenshotDynamicSize:{type:"boolean",default:!1,description:"let the screenshot canvas rect fit available space (off = pin to exact preset pixels)",group:"simulator"},showStatusBar:{type:"boolean",default:!0,description:"show status bar",group:"simulator"},showHomeIndicator:{type:"boolean",default:!0,description:"show home indicator",group:"simulator"},alwaysShowLiveWebViews:{type:"boolean",default:!1,description:"always render WebViews as live browser views",group:"simulator"},a11yMode:{type:"enum",default:"delayed",description:"accessibility tree sync mode (off, delayed=100ms, active=30ms)",options:["off","delayed","active"],group:"simulator"},a11yDepth:{type:"enum",default:"deep",description:"accessibility tree structure depth (shallow or deep)",options:["shallow","deep"],group:"simulator"},inspectMode:{type:"boolean",default:!1,description:"inspect mode",group:"simulator"},productAnalytics:{type:"boolean",default:!0,description:"send bounded product usage analytics",group:"privacy"},crashReports:{type:"boolean",default:!0,description:"send anonymous crash reports",group:"privacy"},agentProvider:{type:"enum",default:"codex",description:"ai agent used by the sootsim agent prompt bar",options:["codex","claude"],group:"agent"}},ie={colorScheme:l.colorScheme.default,reduceMotion:l.reduceMotion.default,boldText:l.boldText.default,fontSize:l.fontSize.default,largerAccessibilitySizes:l.largerAccessibilitySizes.default};function V(){if(typeof window>"u")return{};let t={};try{let o=new URLSearchParams(window.location.search),a=o.get("device");a&&l.deviceModel.options?.includes(a)&&(t.deviceModel=a),o.get("ssMode")==="1"&&(t.screenshotMode=!0),o.get("filmStage")==="1"&&(t.threeMode=!0,a||(t.deviceModel="iphone-17-air"));let c=Number(o.get("renderDensity"));Number.isFinite(c)&&c>=1&&c<=9&&(t.renderDensity=c),o.get("ssEdit")==="1"&&(t.screenshotCanvasEditing=!0);let I=o.get("colorScheme")??o.get("theme");I&&l.colorScheme.options?.includes(I)&&(t.colorScheme=I);let p=o.get("reduceMotion");p==="1"||p==="true"?t.reduceMotion=!0:(p==="0"||p==="false")&&(t.reduceMotion=!1);let m=o.get("boldText");m==="1"||m==="true"?t.boldText=!0:(m==="0"||m==="false")&&(t.boldText=!1);let x=Number(o.get("fontSize"));Number.isFinite(x)&&M(x)&&(t.fontSize=x);let g=o.get("largerAccessibilitySizes");g==="1"||g==="true"?t.largerAccessibilitySizes=!0:(g==="0"||g==="false")&&(t.largerAccessibilitySizes=!1);let f=o.get("alwaysShowLiveWebViews");f==="1"||f==="true"?t.alwaysShowLiveWebViews=!0:(f==="0"||f==="false")&&(t.alwaysShowLiveWebViews=!1);let b=o.get("showFrame");b==="1"||b==="true"?t.showFrame=!0:(b==="0"||b==="false")&&(t.showFrame=!1);let P=o.get("ambientGlow");B(P)&&(t.ambientGlow=P)}catch{}return t}function ae(){let t={};for(let[o,a]of Object.entries(l))t[o]=a.default;return Object.assign(t,V()),t}export{_ as a,C as b,z as c,G as d,K as e,Y as f,X as g,$ as h,L as i,q as j,ne as k,l,ie as m,V as n,ae as o};
5
- /*! sootsim v0.1.301 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
5
+ /*! sootsim v0.1.302 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
@@ -1,4 +1,4 @@
1
- /*! sootsim v0.1.301 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.302 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  import { createRequire as __sootsimCreateRequire } from 'node:module'
3
3
  var require = __sootsimCreateRequire(import.meta.url)
4
- import{a as S}from"./chunk-SDBIR5ON.js";import{createHash as W}from"node:crypto";import A from"node:fs";import{createRequire as O}from"node:module";import c from"node:path";var C=/\.(ttf|otf|woff|woff2)$/i;function _(t,n,e){if(!t||typeof t!="object")return;let o=t.fonts;if(Array.isArray(o))for(let i of o)typeof i=="string"&&e.push(i);let r=t[n];if(!r||typeof r!="object")return;let s=r.fonts;if(Array.isArray(s))for(let i of s){if(typeof i=="string"){e.push(i);continue}if(!i||typeof i!="object")continue;let a=i.fontDefinitions;if(Array.isArray(a))for(let y of a){if(!y||typeof y!="object")continue;let d=y.path;typeof d=="string"&&e.push(d)}}}function D(t,n){if(!Array.isArray(t))return[];let e=[];for(let o of t){let r=Array.isArray(o)?o[0]:o;if(typeof r!="string"||!/(^|\/)expo-font$/.test(r))continue;let s=Array.isArray(o)?o[1]??{}:{};_(s,n,e)}return e}function N(t){return t.slice(t.lastIndexOf("/")+1).replace(C,"")}function $(t,n){let e=n.replace(/\/+$/,""),o=new Set,r=[];for(let s of t){let i=s.replace(/^\.\//,"").replace(/^\/+/,"");!i||o.has(i)||(o.add(i),C.test(i)&&r.push({family:N(i),url:`${e}/assets/${i}`}))}return r}var T=O(import.meta.url);function E(t){try{let n=new URL(t),e=n.hostname.replace(/^\[|\]$/g,"").toLowerCase();if(e==="localhost"||e.endsWith(".localhost")||e==="0.0.0.0"||e==="::1"||/^127(?:\.\d{1,3}){3}$/.test(e))return n.origin}catch{}return null}function q(t){try{return A.statSync(c.join(t,"package.json")).isFile()}catch{return!1}}function Q(t){let n=E(t.bundleUrl);if(!n)return[];let e=t.repoDir||process.env.CONTRAST_REPO_DIR,o=e?c.resolve(e):process.cwd();if(!e&&!q(o))return[];let r=S(o,{trustStart:t.exactProjectDir}),s=r?.appDir??null;if(!s)return[];let i=(t.platform||process.env.CONTRAST_PLATFORM||"ios").toLowerCase(),a=null;if(e||r)try{let p=T.resolve("@expo/config",{paths:[s,o]}),u=T(p);typeof u.getConfig=="function"&&(a=u.getConfig)}catch{}let y=[];if(a)try{let p=a(s,{skipSDKVersionRequirement:!0});if(p?.exp&&typeof p.exp=="object"){let u=p.exp.plugins;Array.isArray(u)&&(y=u)}}catch{}let d=D(y,i==="android"?"android":"ios").slice(0,256),I=Date.now(),P=0,j=(p,u)=>{let h=[{dir:p,depth:0}],l=0;for(;l<h.length&&P<64&&d.length<256&&Date.now()-I<50;){let f=h[l++];if(!f)continue;P++;let m;try{m=A.readdirSync(f.dir,{withFileTypes:!0})}catch{continue}for(let g of m){if(g.isSymbolicLink())continue;let x=c.join(f.dir,g.name);if(g.isDirectory()){f.depth<4&&h.length<64&&!g.name.startsWith(".")&&h.push({dir:x,depth:f.depth+1});continue}if(!g.isFile()||!/\.(ttf|otf|woff|woff2)$/i.test(g.name))continue;let w=c.relative(p,x).split(c.sep).join("/");if(d.push(c.posix.join(u,w)),d.length>=256)break}}};try{let p=JSON.parse(A.readFileSync(c.join(s,"package.json"),"utf8")),u=new Set;for(let l of["dependencies","devDependencies","optionalDependencies"]){let f=Reflect.get(p,l);if(!(!f||typeof f!="object"))for(let m of Object.keys(f))u.add(m)}let h=[...u].filter(l=>l==="react-native-vector-icons"||l.startsWith("@react-native-vector-icons/"));if(h.length>0){let l=Reflect.get(p,"reactNativeVectorIcons"),f=l&&typeof l=="object"?Reflect.get(l,"fontDir"):null,m=typeof f=="string"?f:"rnvi-fonts",g=c.resolve(s,m),x=c.relative(s,g);!x.startsWith("..")&&!c.isAbsolute(x)&&j(g,x.split(c.sep).join("/"));let w=O(c.join(s,"package.json"));for(let F of h)try{let v=w.resolve(F),L=F.split("/").join(c.sep),b=`${c.sep}node_modules${c.sep}${L}${c.sep}`,R=v.lastIndexOf(b);if(R===-1)continue;let U=v.slice(0,R+b.length-1),k=F==="react-native-vector-icons"?"Fonts":"fonts";j(c.join(U,k),c.posix.join("node_modules",F,k))}catch{}}}catch{}return $(d,n)}async function Y(t,n){let e=E(t);if(!e)return null;let o=new AbortController,r=setTimeout(()=>o.abort(),n?.timeoutMs??1500);try{let s=await fetch(`${e}/`,{headers:{"expo-platform":"ios",Accept:"application/json"},signal:o.signal});if(!s.ok)return null;let a=(await s.json())?.extra?.expoClient?._internal?.projectRoot;return typeof a=="string"&&a.length>0?a:null}catch{return null}finally{clearTimeout(r)}}function Z(t){return t.map(n=>`${encodeURIComponent(n.url)}::${encodeURIComponent(n.family)}`).join(",")}function M(t){let n=[];for(let e of t.split(",")){let o=e.trim();if(!o)continue;let r=o.indexOf("::"),s=r===-1?o:o.slice(0,r);try{n.push(decodeURIComponent(s))}catch{n.push(s)}}return n.filter(Boolean)}function G(t){let n=(t.split("?")[0].split(".").pop()||"").toLowerCase();return n==="ttf"?"font/ttf":n==="otf"?"font/otf":n==="woff"?"font/woff":n==="woff2"?"font/woff2":"application/octet-stream"}async function tt(t,n){let e=[],o=new Set;for(let r of M(t)){let s=W("sha256").update(r).digest("hex");if(!o.has(s)){o.add(s);try{let i=await fetch(r);if(!i.ok){n?.onError?.(r,new Error(`${i.status} ${i.statusText}`));continue}let a=new Uint8Array(await i.arrayBuffer());e.push({url:r,urlhash:s,contentType:G(r),bytes:a}),n?.onStaged?.({url:r,byteLength:a.byteLength})}catch(i){n?.onError?.(r,i)}}}return e}export{Q as a,Y as b,Z as c,tt as d};
4
+ import{a as S}from"./chunk-VEOPRCNX.js";import{createHash as W}from"node:crypto";import A from"node:fs";import{createRequire as O}from"node:module";import c from"node:path";var C=/\.(ttf|otf|woff|woff2)$/i;function _(t,n,e){if(!t||typeof t!="object")return;let o=t.fonts;if(Array.isArray(o))for(let i of o)typeof i=="string"&&e.push(i);let r=t[n];if(!r||typeof r!="object")return;let s=r.fonts;if(Array.isArray(s))for(let i of s){if(typeof i=="string"){e.push(i);continue}if(!i||typeof i!="object")continue;let a=i.fontDefinitions;if(Array.isArray(a))for(let y of a){if(!y||typeof y!="object")continue;let d=y.path;typeof d=="string"&&e.push(d)}}}function D(t,n){if(!Array.isArray(t))return[];let e=[];for(let o of t){let r=Array.isArray(o)?o[0]:o;if(typeof r!="string"||!/(^|\/)expo-font$/.test(r))continue;let s=Array.isArray(o)?o[1]??{}:{};_(s,n,e)}return e}function N(t){return t.slice(t.lastIndexOf("/")+1).replace(C,"")}function $(t,n){let e=n.replace(/\/+$/,""),o=new Set,r=[];for(let s of t){let i=s.replace(/^\.\//,"").replace(/^\/+/,"");!i||o.has(i)||(o.add(i),C.test(i)&&r.push({family:N(i),url:`${e}/assets/${i}`}))}return r}var T=O(import.meta.url);function E(t){try{let n=new URL(t),e=n.hostname.replace(/^\[|\]$/g,"").toLowerCase();if(e==="localhost"||e.endsWith(".localhost")||e==="0.0.0.0"||e==="::1"||/^127(?:\.\d{1,3}){3}$/.test(e))return n.origin}catch{}return null}function q(t){try{return A.statSync(c.join(t,"package.json")).isFile()}catch{return!1}}function Q(t){let n=E(t.bundleUrl);if(!n)return[];let e=t.repoDir||process.env.CONTRAST_REPO_DIR,o=e?c.resolve(e):process.cwd();if(!e&&!q(o))return[];let r=S(o,{trustStart:t.exactProjectDir}),s=r?.appDir??null;if(!s)return[];let i=(t.platform||process.env.CONTRAST_PLATFORM||"ios").toLowerCase(),a=null;if(e||r)try{let p=T.resolve("@expo/config",{paths:[s,o]}),u=T(p);typeof u.getConfig=="function"&&(a=u.getConfig)}catch{}let y=[];if(a)try{let p=a(s,{skipSDKVersionRequirement:!0});if(p?.exp&&typeof p.exp=="object"){let u=p.exp.plugins;Array.isArray(u)&&(y=u)}}catch{}let d=D(y,i==="android"?"android":"ios").slice(0,256),I=Date.now(),P=0,j=(p,u)=>{let h=[{dir:p,depth:0}],l=0;for(;l<h.length&&P<64&&d.length<256&&Date.now()-I<50;){let f=h[l++];if(!f)continue;P++;let m;try{m=A.readdirSync(f.dir,{withFileTypes:!0})}catch{continue}for(let g of m){if(g.isSymbolicLink())continue;let x=c.join(f.dir,g.name);if(g.isDirectory()){f.depth<4&&h.length<64&&!g.name.startsWith(".")&&h.push({dir:x,depth:f.depth+1});continue}if(!g.isFile()||!/\.(ttf|otf|woff|woff2)$/i.test(g.name))continue;let w=c.relative(p,x).split(c.sep).join("/");if(d.push(c.posix.join(u,w)),d.length>=256)break}}};try{let p=JSON.parse(A.readFileSync(c.join(s,"package.json"),"utf8")),u=new Set;for(let l of["dependencies","devDependencies","optionalDependencies"]){let f=Reflect.get(p,l);if(!(!f||typeof f!="object"))for(let m of Object.keys(f))u.add(m)}let h=[...u].filter(l=>l==="react-native-vector-icons"||l.startsWith("@react-native-vector-icons/"));if(h.length>0){let l=Reflect.get(p,"reactNativeVectorIcons"),f=l&&typeof l=="object"?Reflect.get(l,"fontDir"):null,m=typeof f=="string"?f:"rnvi-fonts",g=c.resolve(s,m),x=c.relative(s,g);!x.startsWith("..")&&!c.isAbsolute(x)&&j(g,x.split(c.sep).join("/"));let w=O(c.join(s,"package.json"));for(let F of h)try{let v=w.resolve(F),L=F.split("/").join(c.sep),b=`${c.sep}node_modules${c.sep}${L}${c.sep}`,R=v.lastIndexOf(b);if(R===-1)continue;let U=v.slice(0,R+b.length-1),k=F==="react-native-vector-icons"?"Fonts":"fonts";j(c.join(U,k),c.posix.join("node_modules",F,k))}catch{}}}catch{}return $(d,n)}async function Y(t,n){let e=E(t);if(!e)return null;let o=new AbortController,r=setTimeout(()=>o.abort(),n?.timeoutMs??1500);try{let s=await fetch(`${e}/`,{headers:{"expo-platform":"ios",Accept:"application/json"},signal:o.signal});if(!s.ok)return null;let a=(await s.json())?.extra?.expoClient?._internal?.projectRoot;return typeof a=="string"&&a.length>0?a:null}catch{return null}finally{clearTimeout(r)}}function Z(t){return t.map(n=>`${encodeURIComponent(n.url)}::${encodeURIComponent(n.family)}`).join(",")}function M(t){let n=[];for(let e of t.split(",")){let o=e.trim();if(!o)continue;let r=o.indexOf("::"),s=r===-1?o:o.slice(0,r);try{n.push(decodeURIComponent(s))}catch{n.push(s)}}return n.filter(Boolean)}function G(t){let n=(t.split("?")[0].split(".").pop()||"").toLowerCase();return n==="ttf"?"font/ttf":n==="otf"?"font/otf":n==="woff"?"font/woff":n==="woff2"?"font/woff2":"application/octet-stream"}async function tt(t,n){let e=[],o=new Set;for(let r of M(t)){let s=W("sha256").update(r).digest("hex");if(!o.has(s)){o.add(s);try{let i=await fetch(r);if(!i.ok){n?.onError?.(r,new Error(`${i.status} ${i.statusText}`));continue}let a=new Uint8Array(await i.arrayBuffer());e.push({url:r,urlhash:s,contentType:G(r),bytes:a}),n?.onStaged?.({url:r,byteLength:a.byteLength})}catch(i){n?.onError?.(r,i)}}}return e}export{Q as a,Y as b,Z as c,tt as d};
@@ -1,4 +1,4 @@
1
- /*! sootsim v0.1.301 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.302 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  import { createRequire as __sootsimCreateRequire } from 'node:module'
3
3
  var require = __sootsimCreateRequire(import.meta.url)
4
4
  var e="./demo-app-registry.ts",o=null;async function p(){if(o)return o;try{let r=await import(e);o=Array.isArray(r.APPS)?r.APPS:[]}catch{o=[]}return o}function n(){return o??[]}function i(r){let t=o;return o=r,{restore:()=>{o=t}}}export{p as a,n as b,i as c};
@@ -1,7 +1,7 @@
1
- /*! sootsim v0.1.301 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.302 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  import { createRequire as __sootsimCreateRequire } from 'node:module'
3
3
  var require = __sootsimCreateRequire(import.meta.url)
4
- import{a as K,b as V,c as Ne}from"./chunk-YTUW6DGN.js";import{c as Fe}from"./chunk-NEKVW4FE.js";import{d as $e}from"./chunk-NR2G2PSN.js";import{d as Oe}from"./chunk-TABUERS3.js";import{h as _e,j as Pe,l as B}from"./chunk-KYGB26L4.js";import{c as Ue,d as E}from"./chunk-BGY7U4IH.js";import{a as Ae}from"./chunk-4FCN3KOD.js";import{createHash as St}from"crypto";import{readFileSync as M}from"fs";import je from"path";import{gzipSync as ge,gunzipSync as vt}from"zlib";function Ce(e){let t=(e||"").toLowerCase().split(";")[0].trim();return t?!(t.startsWith("image/")||t.startsWith("video/")||t.startsWith("audio/")||t==="font/woff2"||t==="application/font-woff2"||t==="application/zip"||t==="application/gzip"):!0}import{brotliCompressSync as ut,constants as ct}from"node:zlib";var dt=9;function Le(e){return ut(e,{params:{[ct.BROTLI_PARAM_QUALITY]:dt}})}function ce(e,t){let r=new AbortController,s=setTimeout(()=>r.abort(new Error(`${t} timed out after ${e/1e3}s`)),e);return{signal:r.signal,cancel:()=>clearTimeout(s)}}async function pt(e){let t=ce(12e4,`PUT ${e.url}`),r;try{r=await fetch(e.url,{method:"PUT",headers:{"content-type":e.contentType},body:e.bytes,signal:t.signal})}finally{t.cancel()}if(!r.ok){let s=await r.text().catch(()=>"");throw new Error(`PUT ${e.url} failed ${r.status}: ${s.slice(0,200)}`)}}async function mt(e,t=8,r){let s=0,o=0,i=e.length;await Promise.all(Array.from({length:Math.min(t,i)},async()=>{for(;s<i;){let l=e[s++];await pt(l),o++,r?.(o,i)}}))}function ft(e,t,r,s){let o=[];o.push({url:e.bundle.putUrl,contentType:e.bundle.contentType,bytes:t});for(let i of e.files){let l=r.get(i.urlhash);l&&o.push({url:i.putUrl,contentType:i.contentType,bytes:l})}e.events&&s?.eventsBytes&&o.push({url:e.events.putUrl,contentType:e.events.contentType,bytes:s.eventsBytes}),e.timeline&&s?.timelineBytes&&o.push({url:e.timeline.putUrl,contentType:e.timeline.contentType,bytes:s.timelineBytes}),e.flowVideo&&s?.videoBytes&&o.push({url:e.flowVideo.putUrl,contentType:e.flowVideo.contentType,bytes:s.videoBytes}),e.storage&&s?.storageBytes&&o.push({url:e.storage.putUrl,contentType:e.storage.contentType,bytes:s.storageBytes}),e.failureBundle&&s?.failureBundleBytes&&o.push({url:e.failureBundle.putUrl,contentType:e.failureBundle.contentType,bytes:s.failureBundleBytes});for(let i of e.snapshots??[]){let l=s?.snapshotBytes?.get(i.id);l&&o.push({url:i.putUrl,contentType:i.contentType,bytes:l})}return o}function gt(e){return e.replace(/\/+$/,"")}var W=class extends Error{constructor(r,s,o,i=""){super(r);this.status=s;this.phase=o;this.responseText=i;this.name="PresignedUploadError"}};async function ze(e){let t=gt(e.originBase),r={"content-type":"application/json"};e.authHeader&&(r.authorization=e.authHeader),e.adminBypassToken&&(r["x-contrast-admin-upload-bypass"]=e.adminBypassToken);let s=ce(3e4,"init"),o;try{o=await fetch(`${t}/api/preview/upload/init`,{method:"POST",headers:r,body:JSON.stringify(e.initBody),signal:s.signal})}finally{s.cancel()}if(!o.ok){let T=await o.text().catch(()=>"");throw new W(`init failed: ${o.status} ${T.slice(0,200)}`,o.status,"init",T)}let i=await o.json(),l=ft(i,e.bundleBytes,e.filesByHash,e.extras);await mt(l,e.concurrency??8,e.onPutProgress);let m=ce(3e4,"finalize"),c;try{c=await fetch(`${t}/api/preview/upload/finalize`,{method:"POST",headers:r,body:JSON.stringify({token:i.token}),signal:m.signal})}finally{m.cancel()}if(!c.ok){let T=await c.text().catch(()=>"");throw new W(`finalize failed: ${c.status} ${T.slice(0,200)}`,c.status,"finalize",T)}let h=await c.json();return{init:i,finalize:h}}function ht(e){return e!==null&&typeof e=="object"?e:null}function De(e){return typeof e=="number"&&Number.isFinite(e)?e:void 0}function de(e){let t=ht(e);return t?t.schemaVersion===1&&De(t.t)!==void 0&&De(t.seq)!==void 0&&typeof t.context=="string"&&typeof t.kind=="string"&&"data"in t:!1}function yt(e,t){let r=[];for(let s of e.split(`
4
+ import{a as K,b as V,c as Ne}from"./chunk-WQWYWERD.js";import{c as Fe}from"./chunk-UNDGU5PA.js";import{d as $e}from"./chunk-GRMK3BZY.js";import{d as Oe}from"./chunk-BVUQ2PVZ.js";import{h as _e,j as Pe,l as B}from"./chunk-D4BPRTTD.js";import{c as Ue,d as E}from"./chunk-PDB5OX3V.js";import{a as Ae}from"./chunk-2AD7UVSQ.js";import{createHash as St}from"crypto";import{readFileSync as M}from"fs";import je from"path";import{gzipSync as ge,gunzipSync as vt}from"zlib";function Ce(e){let t=(e||"").toLowerCase().split(";")[0].trim();return t?!(t.startsWith("image/")||t.startsWith("video/")||t.startsWith("audio/")||t==="font/woff2"||t==="application/font-woff2"||t==="application/zip"||t==="application/gzip"):!0}import{brotliCompressSync as ut,constants as ct}from"node:zlib";var dt=9;function Le(e){return ut(e,{params:{[ct.BROTLI_PARAM_QUALITY]:dt}})}function ce(e,t){let r=new AbortController,s=setTimeout(()=>r.abort(new Error(`${t} timed out after ${e/1e3}s`)),e);return{signal:r.signal,cancel:()=>clearTimeout(s)}}async function pt(e){let t=ce(12e4,`PUT ${e.url}`),r;try{r=await fetch(e.url,{method:"PUT",headers:{"content-type":e.contentType},body:e.bytes,signal:t.signal})}finally{t.cancel()}if(!r.ok){let s=await r.text().catch(()=>"");throw new Error(`PUT ${e.url} failed ${r.status}: ${s.slice(0,200)}`)}}async function mt(e,t=8,r){let s=0,o=0,i=e.length;await Promise.all(Array.from({length:Math.min(t,i)},async()=>{for(;s<i;){let l=e[s++];await pt(l),o++,r?.(o,i)}}))}function ft(e,t,r,s){let o=[];o.push({url:e.bundle.putUrl,contentType:e.bundle.contentType,bytes:t});for(let i of e.files){let l=r.get(i.urlhash);l&&o.push({url:i.putUrl,contentType:i.contentType,bytes:l})}e.events&&s?.eventsBytes&&o.push({url:e.events.putUrl,contentType:e.events.contentType,bytes:s.eventsBytes}),e.timeline&&s?.timelineBytes&&o.push({url:e.timeline.putUrl,contentType:e.timeline.contentType,bytes:s.timelineBytes}),e.flowVideo&&s?.videoBytes&&o.push({url:e.flowVideo.putUrl,contentType:e.flowVideo.contentType,bytes:s.videoBytes}),e.storage&&s?.storageBytes&&o.push({url:e.storage.putUrl,contentType:e.storage.contentType,bytes:s.storageBytes}),e.failureBundle&&s?.failureBundleBytes&&o.push({url:e.failureBundle.putUrl,contentType:e.failureBundle.contentType,bytes:s.failureBundleBytes});for(let i of e.snapshots??[]){let l=s?.snapshotBytes?.get(i.id);l&&o.push({url:i.putUrl,contentType:i.contentType,bytes:l})}return o}function gt(e){return e.replace(/\/+$/,"")}var W=class extends Error{constructor(r,s,o,i=""){super(r);this.status=s;this.phase=o;this.responseText=i;this.name="PresignedUploadError"}};async function ze(e){let t=gt(e.originBase),r={"content-type":"application/json"};e.authHeader&&(r.authorization=e.authHeader),e.adminBypassToken&&(r["x-contrast-admin-upload-bypass"]=e.adminBypassToken);let s=ce(3e4,"init"),o;try{o=await fetch(`${t}/api/preview/upload/init`,{method:"POST",headers:r,body:JSON.stringify(e.initBody),signal:s.signal})}finally{s.cancel()}if(!o.ok){let T=await o.text().catch(()=>"");throw new W(`init failed: ${o.status} ${T.slice(0,200)}`,o.status,"init",T)}let i=await o.json(),l=ft(i,e.bundleBytes,e.filesByHash,e.extras);await mt(l,e.concurrency??8,e.onPutProgress);let m=ce(3e4,"finalize"),c;try{c=await fetch(`${t}/api/preview/upload/finalize`,{method:"POST",headers:r,body:JSON.stringify({token:i.token}),signal:m.signal})}finally{m.cancel()}if(!c.ok){let T=await c.text().catch(()=>"");throw new W(`finalize failed: ${c.status} ${T.slice(0,200)}`,c.status,"finalize",T)}let h=await c.json();return{init:i,finalize:h}}function ht(e){return e!==null&&typeof e=="object"?e:null}function De(e){return typeof e=="number"&&Number.isFinite(e)?e:void 0}function de(e){let t=ht(e);return t?t.schemaVersion===1&&De(t.t)!==void 0&&De(t.seq)!==void 0&&typeof t.context=="string"&&typeof t.kind=="string"&&"data"in t:!1}function yt(e,t){let r=[];for(let s of e.split(`
5
5
  `)){let o=s.trim();if(o)try{let i=JSON.parse(o);t(i)&&r.push(i)}catch{}}return r}function He(e){return yt(e,de)}import{execSync as bt}from"child_process";function me(e){try{return bt(e,{stdio:["ignore","pipe","ignore"],timeout:3e3,encoding:"utf8"}).trim()||null}catch{return null}}function pe(e){let t=e?.trim();return!t||!/^\d+$/.test(t)?null:Number(t)}function wt(){let e=me("git remote get-url origin");if(!e)return null;let t=e.match(/github\.com[/:]([^/\s]+)\/([^/\s]+?)(?:\.git)?\/?$/i);return t?{owner:t[1],repo:t[2]}:null}function fe(){let e=process.env.GITHUB_ACTIONS==="true",t=process.env.CONTRAST_BRANCH?.trim()||null,r=process.env.CONTRAST_SHA?.trim()||null,s=process.env.CONTRAST_PR_TITLE?.trim()||null,o=(process.env.CONTRAST_REPO||process.env.GITHUB_REPOSITORY||"").trim(),[i,l]=o.includes("/")?o.split("/",2):[null,null];if(e){let h=process.env.GITHUB_REF?.match(/^refs\/pull\/(\d+)\//)?.[1];return{owner:i,repo:l,branch:t||process.env.GITHUB_HEAD_REF?.trim()||process.env.GITHUB_REF_NAME?.trim()||null,commitSha:r||process.env.GITHUB_SHA?.trim()||null,githubUsername:process.env.GITHUB_ACTOR?.trim()||null,pullRequestNumber:pe(process.env.CONTRAST_PR_NUMBER)??pe(h),pullRequestTitle:s,githubRunId:process.env.GITHUB_RUN_ID?.trim()||null,source:"ci"}}let m=t??me("git rev-parse --abbrev-ref HEAD"),c=i?null:wt();return{owner:i??c?.owner??null,repo:l??c?.repo??null,branch:m==="HEAD"?null:m,commitSha:r??me("git rev-parse HEAD"),githubUsername:null,pullRequestNumber:pe(process.env.CONTRAST_PR_NUMBER),pullRequestTitle:s,githubRunId:null,source:"cli"}}function Yt(e){if(e.length===0)return{stepCount:null,failedStepIndex:null};let t=e.find(r=>r.status==="failure");return{stepCount:e.length,failedStepIndex:t?t.stepIndex:null}}function Qt(e){return e.auth?e.uploadedShare?!0:e.auth.kind==="github"||process.env.GITHUB_ACTIONS==="true":!1}async function Xt(e){let t=e.auth??K();if(!t)return null;let r=fe(),s=e.owner??(t.kind==="github"?t.owner:null)??r.owner,o=e.repo??(t.kind==="github"?t.repo:null)??r.repo;try{let i=await fetch(`${e.origin.replace(/\/$/,"")}/api/sootsim/test-runs`,{method:"POST",headers:{"content-type":"application/json",authorization:V(t)},body:JSON.stringify({kind:e.kind,source:r.source,name:e.name??void 0,prompt:e.prompt??void 0,summary:e.summary??void 0,status:e.status,failureMessage:e.failureMessage??void 0,previewShareId:e.previewShareId??void 0,owner:s??void 0,repo:o??void 0,branch:r.branch??void 0,commitSha:r.commitSha??void 0,githubUsername:r.githubUsername??void 0,pullRequestNumber:r.pullRequestNumber??void 0,githubRunId:r.githubRunId??void 0,stepCount:e.stepCount??void 0,failedStepIndex:e.failedStepIndex??void 0,durationMs:e.durationMs??void 0,flowYamlSizeBytes:e.flowYamlSizeBytes??void 0})});if(!i.ok){let m=await i.text().catch(()=>"");return console.warn(` warn: run registration failed: /api/sootsim/test-runs ${i.status}${m?`: ${m.slice(0,200)}`:""}`),null}let l=await i.json();return l.run?.id?{id:l.run.id,previewUrl:l.run.previewUrl??null,traceUrl:l.run.traceUrl??null}:(console.warn(" warn: run registration returned no id"),null)}catch(i){return console.warn(` warn: run registration failed: ${i instanceof Error?i.message:String(i)}`),null}}function Rt(e){if(!e)return null;try{let t=JSON.parse(e);return typeof t.message=="string"&&t.message?t.message:null}catch{return null}}function xt(e){let t=JSON.parse(M(e,"utf8"));if(!Array.isArray(t))throw new Error("snapshot manifest must be an array");let r=new Set;return t.map((s,o)=>{if(s===null||typeof s!="object")throw new Error(`snapshot manifest entry ${o} must be an object`);let i=Reflect.get(s,"id"),l=Reflect.get(s,"label"),m=Reflect.get(s,"path"),c=Reflect.get(s,"t");if(typeof i!="string"||!i||r.has(i))throw new Error(`snapshot manifest entry ${o} has an invalid or duplicate id`);if(typeof m!="string"||!m)throw new Error(`snapshot manifest entry ${o} has no PNG path`);if(typeof c!="number"||!Number.isFinite(c)||c<0)throw new Error(`snapshot manifest entry ${o} has an invalid capture time`);r.add(i);let h=M(m);return{meta:{id:i,label:typeof l=="string"&&l?l:i,kind:"interaction",t:Math.round(c),contentType:"image/png",sizeBytes:h.byteLength},bytes:h}})}var Ve=process.env.SOOTSIM_UPLOAD_ORIGIN||"https://contrast.dev",We=process.env.SOOTSIM_PREVIEW_ORIGIN||"https://sootsim.com",ye="https://contrast.localhost:3000",kt=2e3;async function Et(e){if(e)return e;if(process.env.SOOTSIM_UPLOAD_ORIGIN)return process.env.SOOTSIM_UPLOAD_ORIGIN;try{let t=await fetch(`${ye}/api/preview/upload/init`,{method:"OPTIONS",signal:AbortSignal.timeout(kt)});if(t.ok||t.status===204||t.status===405)return ye}catch{}return Ve}function N(e){return e.replace(/\/$/,"")}function Bt(e){try{let r=new URL(e).hostname.replace(/^\[|\]$/g,"").toLowerCase();return r==="localhost"||r.endsWith(".localhost")||r==="0.0.0.0"||r==="::1"||/^127(?:\.\d{1,3}){3}$/.test(r)}catch{return!1}}function It(e){try{let t=new URL(e).hostname.toLowerCase();return t==="contrast.dev"||t.endsWith(".contrast.dev")}catch{return!1}}function At(e,t){return t?N(t):process.env.SOOTSIM_PREVIEW_ORIGIN?N(process.env.SOOTSIM_PREVIEW_ORIGIN):Bt(e)?N(e):It(e)?N(We):N(e)}function Ut(){console.log(`
6
6
  sootsim record upload \u2014 publish the current recorded bundle as a /preview/<id> link
7
7
 
@@ -1,7 +1,7 @@
1
- /*! sootsim v0.1.301 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.302 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  import { createRequire as __sootsimCreateRequire } from 'node:module'
3
3
  var require = __sootsimCreateRequire(import.meta.url)
4
- import{a as at}from"./chunk-DNH4ZWVK.js";import{a as ot}from"./chunk-77CFHIGG.js";import{a as pe,c as ge,d as we,e as ze,f as ye,g as be,h as Ye,i as Se,j as it}from"./chunk-4OZG2LQA.js";import{a as qe}from"./chunk-STF4UH5I.js";import{e as st}from"./chunk-P2HUPEXS.js";import{i as et,q as tt,s as rt,w as nt}from"./chunk-RW75MMQZ.js";import{g as Xe}from"./chunk-3XC55LRK.js";import{h as Ge,m as Ke}from"./chunk-NWM62KI3.js";import{J as he,m as He,n as Ue,o as We,p as je,q as Ve}from"./chunk-7LULF3D2.js";import{a as Qe}from"./chunk-WKSX2VHB.js";import{a as Ze}from"./chunk-RCH5EVVP.js";import{h as fe,i as me,j as Je}from"./chunk-KYGB26L4.js";import{c as De,d as ce}from"./chunk-BGY7U4IH.js";import{a as Be,b as Le,c as Ne}from"./chunk-4MNKKMYG.js";import{e as ue,f as Ce}from"./chunk-YOLPZLST.js";import*as $ from"fs";import{createHash as qt,randomUUID as zt}from"node:crypto";import{tmpdir as z}from"os";import*as w from"path";import*as v from"fs";import*as S from"path";var Pt="inset 0 0 0 0.5px #000, inset 0 0 0 2px #757575, inset 0 0 0 5px #212121",dt=1;function At(i){let e=Ne(i),t=e.scale,r=e.statusBarHeight>0&&!e.dynamicIsland&&e.homeIndicatorHeight===0&&e.cornerRadius===0,n=e.width,o=e.height,a=Be(e),s=r?e.width+58:a.frameWidth,l=r?e.height+111+111:a.frameHeight,p=9.5,u=dt,g=s+p*2,b=l+dt*2,m=p+(r?29:a.screenLeft),k=r?111:a.screenTop,P=r?52:a.frameRadius,H=[{side:e.hardwareButtons.lock.side,top:e.hardwareButtons.lock.top,height:e.hardwareButtons.lock.height,width:e.hardwareButtons.width},{side:e.hardwareButtons.ringToggle.side,top:e.hardwareButtons.ringToggle.top,height:e.hardwareButtons.ringToggle.height,width:e.hardwareButtons.width},{side:e.hardwareButtons.volumeUp.side,top:e.hardwareButtons.volumeUp.top,height:e.hardwareButtons.volumeUp.height,width:e.hardwareButtons.width},{side:e.hardwareButtons.volumeDown.side,top:e.hardwareButtons.volumeDown.top,height:e.hardwareButtons.volumeDown.height,width:e.hardwareButtons.width}];return{model:i,renderScale:t,outerWidth:Math.round(g*t),outerHeight:Math.round(b*t),logicalOuterWidth:g,logicalOuterHeight:b,logicalFrameWidth:s,logicalFrameHeight:l,logicalFrameLeft:p,logicalFrameTop:u,logicalScreenWidth:n,logicalScreenHeight:o,logicalScreenLeft:m,logicalScreenTop:k,logicalScreenRadius:r?0:a.screenRadius,logicalFrameRadius:P,frameBackground:r?"linear-gradient(180deg, #1b1c20 0%, #0f1012 42%, #050608 100%)":"#000000",frameOutline:r?"0 0 0 1px #1f2125":"0 0 0 1px #333",metallicRingShadow:r?null:Pt,buttons:H,legacyHomeButton:r?{top:111+e.height+47/2,left:e.width/2-64/2+29,size:64,ring:1.5}:null,showHomeIndicator:e.homeIndicatorHeight>0,logicalHomeIndicatorStripHeight:e.homeIndicatorHeight}}function Mt(i){let e=i.side==="right",t=e?"inset(-3px -3px -3px 0)":"inset(-3px 0 -3px -3px)";return`
4
+ import{a as at}from"./chunk-ZADSXYX7.js";import{a as ot}from"./chunk-5CWTAN4D.js";import{a as pe,c as ge,d as we,e as ze,f as ye,g as be,h as Ye,i as Se,j as it}from"./chunk-N53HDXGW.js";import{a as qe}from"./chunk-SMBMOSXY.js";import{e as st}from"./chunk-HFHHYL3K.js";import{i as et,q as tt,s as rt,w as nt}from"./chunk-YY27LKQF.js";import{g as Xe}from"./chunk-I4NP3TJR.js";import{h as Ge,m as Ke}from"./chunk-LLCCT4VC.js";import{J as he,m as He,n as Ue,o as We,p as je,q as Ve}from"./chunk-IJKBAKAA.js";import{a as Qe}from"./chunk-7F57RUPB.js";import{a as Ze}from"./chunk-H7J7U34H.js";import{h as fe,i as me,j as Je}from"./chunk-D4BPRTTD.js";import{c as De,d as ce}from"./chunk-PDB5OX3V.js";import{a as Be,b as Le,c as Ne}from"./chunk-FNJ2IEDC.js";import{e as ue,f as Ce}from"./chunk-AHPEOPNQ.js";import*as $ from"fs";import{createHash as qt,randomUUID as zt}from"node:crypto";import{tmpdir as z}from"os";import*as w from"path";import*as v from"fs";import*as S from"path";var Pt="inset 0 0 0 0.5px #000, inset 0 0 0 2px #757575, inset 0 0 0 5px #212121",dt=1;function At(i){let e=Ne(i),t=e.scale,r=e.statusBarHeight>0&&!e.dynamicIsland&&e.homeIndicatorHeight===0&&e.cornerRadius===0,n=e.width,o=e.height,a=Be(e),s=r?e.width+58:a.frameWidth,l=r?e.height+111+111:a.frameHeight,p=9.5,u=dt,g=s+p*2,b=l+dt*2,m=p+(r?29:a.screenLeft),k=r?111:a.screenTop,P=r?52:a.frameRadius,H=[{side:e.hardwareButtons.lock.side,top:e.hardwareButtons.lock.top,height:e.hardwareButtons.lock.height,width:e.hardwareButtons.width},{side:e.hardwareButtons.ringToggle.side,top:e.hardwareButtons.ringToggle.top,height:e.hardwareButtons.ringToggle.height,width:e.hardwareButtons.width},{side:e.hardwareButtons.volumeUp.side,top:e.hardwareButtons.volumeUp.top,height:e.hardwareButtons.volumeUp.height,width:e.hardwareButtons.width},{side:e.hardwareButtons.volumeDown.side,top:e.hardwareButtons.volumeDown.top,height:e.hardwareButtons.volumeDown.height,width:e.hardwareButtons.width}];return{model:i,renderScale:t,outerWidth:Math.round(g*t),outerHeight:Math.round(b*t),logicalOuterWidth:g,logicalOuterHeight:b,logicalFrameWidth:s,logicalFrameHeight:l,logicalFrameLeft:p,logicalFrameTop:u,logicalScreenWidth:n,logicalScreenHeight:o,logicalScreenLeft:m,logicalScreenTop:k,logicalScreenRadius:r?0:a.screenRadius,logicalFrameRadius:P,frameBackground:r?"linear-gradient(180deg, #1b1c20 0%, #0f1012 42%, #050608 100%)":"#000000",frameOutline:r?"0 0 0 1px #1f2125":"0 0 0 1px #333",metallicRingShadow:r?null:Pt,buttons:H,legacyHomeButton:r?{top:111+e.height+47/2,left:e.width/2-64/2+29,size:64,ring:1.5}:null,showHomeIndicator:e.homeIndicatorHeight>0,logicalHomeIndicatorStripHeight:e.homeIndicatorHeight}}function Mt(i){let e=i.side==="right",t=e?"inset(-3px -3px -3px 0)":"inset(-3px 0 -3px -3px)";return`
5
5
  <div
6
6
  aria-hidden="true"
7
7
  style="
@@ -561,7 +561,7 @@ flow extension:
561
561
  })()`}),console.log(` captured ${O.length} partial replay events`)}catch(d){console.warn(` event recorder stop failed: ${d?.message||String(d)}`)}console.error(`
562
562
  x failed: ${h.message}
563
563
  `),_&&(console.log(" partial profile:"),ft(_)),I&&console.log(` partial video: ${I}`);try{let d=c.lastFailedStep,y=d?`step-${String(d.index+1).padStart(2,"0")}-${d.kind}`:"unstaged",F=w.join(s,y);await c.captureFailureBundle(F,{error:h,stepIndex:d?.index,stepKind:d?.kind,stepTarget:d?.target}),de=F,console.log(` failure bundle: ${F}`),console.log(" (contents: screenshot.png, describe.json, a11y.txt, tree.txt, console.json, error.json)")}catch(d){try{let y=w.join(s,"error.png");await c.captureScreenshot(y),console.log(` error screenshot: ${y}`)}catch{}console.log(` (failure bundle capture failed: ${d instanceof Error?d.message:String(d)})`)}await Ke(E,{errorsCommand:`sootsim get errors 5${c.simId?` --sim ${c.simId}`:""}`,warningsCommand:`sootsim get warnings 5${c.simId?` --sim ${c.simId}`:""}`,requestsCommand:`sootsim get requests 5${c.simId?` --sim ${c.simId}`:""}`}),V=1}if(await c.liveStatus?.end(V===0?"passed":"failed"),m&&(V===0||I||O))try{let h=await Qt(O??[]),d=["--origin",k,"--events",h];P&&d.push("--public-origin",P),I&&d.push("--video",I),j&&d.push("--screenshot",j),I&&L&&Number.isFinite(L)&&(d.push("--video-duration-ms",String(Math.round(L))),d.push("--recorded-duration-ms",String(Math.round(L))));let y=c.getLastRecordingStartedAtMs();y&&Number.isFinite(y)&&d.push("--recording-started-at-ms",String(Math.round(y))),x.wsPort&&d.push("--port",String(x.wsPort)),c.simId&&d.push("--sim",c.simId),H&&d.push("--open"),$e&&d.push("--owner",$e),ke&&d.push("--repo",ke),d.push("--run-scope",gt),U&&d.push("--billing-kind",U),console.log(`
564
- preparing preview upload\u2026`);let F=c.getFlowTraceSteps();F.length>0&&d.push("--timeline-events",await er(F));let J=await tr(F,y);J&&d.push("--snapshot-manifest",J),de&&d.push("--failure-bundle",de);let D=c.getLastRecordingFrameStats();D&&d.push("--trace-frame-stats",await rr(D));let{runUpload:It}=await import("./upload-D5BXJTXK.js");Ie=await It(d,{})}catch(h){console.error(` preview upload failed: ${h?.message||h}`),V=1}return Fe=c.getFlowTraceSteps(),E.close(),ae?(c.simId&&le.add(c.simId),await Xt(x.wsPort,x.commandTimeoutMs,[...le])):c.simId&&c.simId!==Z&&Ce(c.simId),await ce(),V}async function Xt(i,e,t){let r=[...new Set(t.filter(Boolean))];if(r.length===0)return;let n=me(i,{commandTimeoutMs:e});try{let o=await n.listSims(),a=r.filter(l=>o.some(p=>p.id===l&&p.readyState==="open"));if(a.length===0)return;let s=await nt(n,i,e,a);await tt(o,a),s.closed.length>0&&console.log(` closed flow sim(s): ${s.closed.join(", ")}`),s.remaining.length>0&&console.warn(` warn: flow sim(s) still connected after close: ${s.remaining.join(", ")}`)}catch(o){console.warn(` warn: failed to close flow sim(s): ${o instanceof Error?o.message:String(o)}`)}finally{n.close()}}async function Qt(i){let{gzipSync:e}=await import("zlib"),t=i.map(o=>JSON.stringify(o)).join(`
564
+ preparing preview upload\u2026`);let F=c.getFlowTraceSteps();F.length>0&&d.push("--timeline-events",await er(F));let J=await tr(F,y);J&&d.push("--snapshot-manifest",J),de&&d.push("--failure-bundle",de);let D=c.getLastRecordingFrameStats();D&&d.push("--trace-frame-stats",await rr(D));let{runUpload:It}=await import("./upload-QKJRNNL3.js");Ie=await It(d,{})}catch(h){console.error(` preview upload failed: ${h?.message||h}`),V=1}return Fe=c.getFlowTraceSteps(),E.close(),ae?(c.simId&&le.add(c.simId),await Xt(x.wsPort,x.commandTimeoutMs,[...le])):c.simId&&c.simId!==Z&&Ce(c.simId),await ce(),V}async function Xt(i,e,t){let r=[...new Set(t.filter(Boolean))];if(r.length===0)return;let n=me(i,{commandTimeoutMs:e});try{let o=await n.listSims(),a=r.filter(l=>o.some(p=>p.id===l&&p.readyState==="open"));if(a.length===0)return;let s=await nt(n,i,e,a);await tt(o,a),s.closed.length>0&&console.log(` closed flow sim(s): ${s.closed.join(", ")}`),s.remaining.length>0&&console.warn(` warn: flow sim(s) still connected after close: ${s.remaining.join(", ")}`)}catch(o){console.warn(` warn: failed to close flow sim(s): ${o instanceof Error?o.message:String(o)}`)}finally{n.close()}}async function Qt(i){let{gzipSync:e}=await import("zlib"),t=i.map(o=>JSON.stringify(o)).join(`
565
565
  `)+(i.length?`
566
566
  `:""),r=e(Buffer.from(t,"utf8")),n=w.join(z(),`sootsim-events-${Date.now()}.jsonl.gz`);return $.writeFileSync(n,r),console.log(` events: ${i.length} written to ${n} (${r.length} bytes gz)`),n}async function er(i){let{gzipSync:e}=await import("zlib"),t=i.map((a,s)=>({schemaVersion:1,t:a.endedAtMs,seq:1e6+s,context:"host",kind:"flow-step",id:`flow-step-${a.stepIndex}`,data:{stepIndex:a.stepIndex,stepNumber:a.stepIndex+1,stepName:a.stepName,...a.targetLabel?{targetLabel:a.targetLabel}:{},status:a.status,durationMs:a.durationMs,startedAtMs:a.startedAtMs,endedAtMs:a.endedAtMs,...a.error?{error:a.error}:{}}})),r=t.map(a=>JSON.stringify(a)).join(`
567
567
  `)+`