@kaeawc/auto-mobile 0.0.90 → 0.0.92

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 (280) hide show
  1. package/README.md +7 -0
  2. package/README.md.backup +7 -0
  3. package/dist/build-info.json +12 -11
  4. package/dist/schemas/README.md +16 -0
  5. package/dist/schemas/prototype-icon-names.json +302 -0
  6. package/dist/schemas/prototype-platform-permissions.json +75 -0
  7. package/dist/schemas/test-plan.schema.json +2 -2
  8. package/dist/src/chunk-09442h7v.js +4 -0
  9. package/dist/src/chunk-0dfnyfkh.js +5 -0
  10. package/dist/src/chunk-0e4gm1kj.js +5 -0
  11. package/dist/src/chunk-0eb8576f.js +4 -0
  12. package/dist/src/chunk-0rjm4nx7.js +5 -0
  13. package/dist/src/chunk-0w1spptt.js +6 -0
  14. package/dist/src/chunk-1zmh2eak.js +4 -0
  15. package/dist/src/chunk-28k63ha3.js +5 -0
  16. package/dist/src/chunk-2d4wmp8b.js +4 -0
  17. package/dist/src/chunk-2e6s75qv.js +78 -0
  18. package/dist/src/chunk-2v7tw1nj.js +5 -0
  19. package/dist/src/chunk-32jpxz2y.js +323 -0
  20. package/dist/src/chunk-34zxqcmq.js +5 -0
  21. package/dist/src/chunk-3jmvqygr.js +238 -0
  22. package/dist/src/chunk-3swvfhqt.js +5 -0
  23. package/dist/src/chunk-44bt78m9.js +5 -0
  24. package/dist/src/chunk-488vt2bp.js +4 -0
  25. package/dist/src/chunk-4fgdhcwx.js +5 -0
  26. package/dist/src/chunk-4jp2se4w.js +4 -0
  27. package/dist/src/chunk-4pfftt07.js +5 -0
  28. package/dist/src/chunk-4vhr9e4t.js +4 -0
  29. package/dist/src/chunk-4xd6zs3y.js +15 -0
  30. package/dist/src/chunk-51567pg8.js +4 -0
  31. package/dist/src/chunk-5agqsfev.js +4 -0
  32. package/dist/src/chunk-5d706gmr.js +4 -0
  33. package/dist/src/chunk-5kd4rqk7.js +5 -0
  34. package/dist/src/chunk-5s645vr4.js +4 -0
  35. package/dist/src/chunk-61t538bm.js +4 -0
  36. package/dist/src/chunk-6d3mmqxt.js +54 -0
  37. package/dist/src/chunk-6hyt398x.js +5 -0
  38. package/dist/src/chunk-6mnr8kpm.js +4 -0
  39. package/dist/src/chunk-6pg7bqck.js +4 -0
  40. package/dist/src/chunk-79q5xsdc.js +42 -0
  41. package/dist/src/chunk-7bdgand3.js +4 -0
  42. package/dist/src/chunk-84cp9dw5.js +4 -0
  43. package/dist/src/chunk-86f2h5ww.js +5 -0
  44. package/dist/src/chunk-8cghfzb2.js +19 -0
  45. package/dist/src/chunk-8en08r7q.js +5 -0
  46. package/dist/src/chunk-950qcq1e.js +10 -0
  47. package/dist/src/chunk-9rkfyt6q.js +5 -0
  48. package/dist/src/chunk-9tf2p9y9.js +5 -0
  49. package/dist/src/chunk-9y5bcy28.js +6 -0
  50. package/dist/src/chunk-a2sc4jm0.js +5 -0
  51. package/dist/src/chunk-a4k9rt7z.js +5 -0
  52. package/dist/src/chunk-aa5ng3d1.js +4 -0
  53. package/dist/src/chunk-ajsrz473.js +5 -0
  54. package/dist/src/chunk-b3h0a6ca.js +4 -0
  55. package/dist/src/chunk-b4cxdzwy.js +20 -0
  56. package/dist/src/chunk-b6a737qt.js +4 -0
  57. package/dist/src/chunk-bn64x5z5.js +5 -0
  58. package/dist/src/chunk-bvh649za.js +12 -0
  59. package/dist/src/chunk-c9nk1r78.js +5 -0
  60. package/dist/src/chunk-c9tyfg4j.js +26 -0
  61. package/dist/src/chunk-cfsdfqnm.js +4 -0
  62. package/dist/src/chunk-cxyf04jc.js +7 -0
  63. package/dist/src/chunk-d57432wq.js +4 -0
  64. package/dist/src/chunk-da08tx5v.js +4 -0
  65. package/dist/src/chunk-eka89q3k.js +4 -0
  66. package/dist/src/chunk-f2tc08m2.js +4 -0
  67. package/dist/src/chunk-f8tnk179.js +5 -0
  68. package/dist/src/chunk-f9s1kkhx.js +5 -0
  69. package/dist/src/chunk-fbp8a4rx.js +4 -0
  70. package/dist/src/chunk-fd2z0sze.js +4 -0
  71. package/dist/src/chunk-fk927f4q.js +54 -0
  72. package/dist/src/chunk-fxmr3a0f.js +4 -0
  73. package/dist/src/chunk-gaqwhd44.js +4 -0
  74. package/dist/src/chunk-ggtd5x5a.js +5 -0
  75. package/dist/src/chunk-gndcfrm7.js +4 -0
  76. package/dist/src/chunk-h3n4adc6.js +310 -0
  77. package/dist/src/chunk-h5pjbb83.js +4 -0
  78. package/dist/src/chunk-hgnnh302.js +4 -0
  79. package/dist/src/chunk-hmke8nhx.js +5 -0
  80. package/dist/src/chunk-j2bx12hn.js +4 -0
  81. package/dist/src/chunk-j70y1a2g.js +4 -0
  82. package/dist/src/chunk-jdqvcq0a.js +5 -0
  83. package/dist/src/chunk-jhnbfj19.js +55 -0
  84. package/dist/src/chunk-js1jpyxp.js +6 -0
  85. package/dist/src/chunk-kbjq0qvb.js +4 -0
  86. package/dist/src/chunk-kfwx57xd.js +4 -0
  87. package/dist/src/chunk-km0dy5vc.js +71 -0
  88. package/dist/src/chunk-kzwctna2.js +4 -0
  89. package/dist/src/chunk-m9ehyehy.js +4 -0
  90. package/dist/src/chunk-mct91p1f.js +4 -0
  91. package/dist/src/chunk-mf9spd4g.js +5 -0
  92. package/dist/src/chunk-mgrcansb.js +4 -0
  93. package/dist/src/chunk-mqc1d0eb.js +6 -0
  94. package/dist/src/chunk-n1zmpk0z.js +4 -0
  95. package/dist/src/chunk-ncyjf63g.js +4 -0
  96. package/dist/src/chunk-nr64d21q.js +973 -0
  97. package/dist/src/chunk-nwm2pq5v.js +168 -0
  98. package/dist/src/chunk-pm06b05d.js +9 -0
  99. package/dist/src/chunk-q50s00ry.js +4 -0
  100. package/dist/src/chunk-qv2918jt.js +4 -0
  101. package/dist/src/chunk-qwye1958.js +14 -0
  102. package/dist/src/chunk-r0f1q783.js +5 -0
  103. package/dist/src/chunk-r14wwk37.js +18 -0
  104. package/dist/src/chunk-r20pe1nv.js +5 -0
  105. package/dist/src/chunk-r8z9pfve.js +5 -0
  106. package/dist/src/chunk-rdpgkjf6.js +4 -0
  107. package/dist/src/chunk-rkr0dks9.js +5 -0
  108. package/dist/src/chunk-rn84t3sf.js +11 -0
  109. package/dist/src/chunk-s123kn7n.js +4 -0
  110. package/dist/src/chunk-s1zq65ny.js +4 -0
  111. package/dist/src/chunk-s73qn3fx.js +4 -0
  112. package/dist/src/chunk-sjn0nj4p.js +5 -0
  113. package/dist/src/chunk-sns0c35v.js +7 -0
  114. package/dist/src/chunk-stfzjr9y.js +8 -0
  115. package/dist/src/chunk-sz1a7p43.js +4 -0
  116. package/dist/src/chunk-t4dr5c8v.js +8 -0
  117. package/dist/src/chunk-tc8k9c1j.js +4 -0
  118. package/dist/src/chunk-teznhase.js +4 -0
  119. package/dist/src/chunk-ty9xgmz4.js +4 -0
  120. package/dist/src/chunk-tyazf3sk.js +145 -0
  121. package/dist/src/chunk-v6npjrjm.js +5 -0
  122. package/dist/src/chunk-v90es00d.js +4 -0
  123. package/dist/src/chunk-vbvtzkwz.js +5 -0
  124. package/dist/src/chunk-vefd8qee.js +8 -0
  125. package/dist/src/chunk-vs9r72ta.js +17 -0
  126. package/dist/src/chunk-w2mwa0jk.js +4 -0
  127. package/dist/src/chunk-w7zsh13a.js +9 -0
  128. package/dist/src/chunk-w88k0bgr.js +4 -0
  129. package/dist/src/chunk-wry6skrm.js +4 -0
  130. package/dist/src/chunk-wzdt0enk.js +4 -0
  131. package/dist/src/chunk-xhhv854c.js +4 -0
  132. package/dist/src/chunk-y58270hd.js +4 -0
  133. package/dist/src/chunk-yk0hmbex.js +4 -0
  134. package/dist/src/chunk-ympy4fdz.js +28 -0
  135. package/dist/src/chunk-yw436axy.js +4 -0
  136. package/dist/src/chunk-z04jrpjy.js +5 -0
  137. package/dist/src/chunk-z2xznczw.js +4 -0
  138. package/dist/src/chunk-z4xnrgps.js +4 -0
  139. package/dist/src/chunk-z7csyszv.js +4 -0
  140. package/dist/src/chunk-z8t0v07j.js +11 -0
  141. package/dist/src/chunk-z916af47.js +228 -0
  142. package/dist/src/chunk-zcr8he8q.js +5 -0
  143. package/dist/src/chunk-zd9vmkzn.js +9 -0
  144. package/dist/src/chunk-zg67wjkh.js +5 -0
  145. package/dist/src/chunk-zj939v0h.js +5 -0
  146. package/dist/src/chunk-zkdjwtc1.js +4 -0
  147. package/dist/src/chunk-zkv5kzt6.js +4 -0
  148. package/dist/src/daemon/processEntry.js +4 -0
  149. package/dist/src/index.js +4 -2797
  150. package/dist/src/runtime/bunRuntimeGuard.js +4 -0
  151. package/dist/src/utils/workers/iosBundleExtractWorker.js +2 -3
  152. package/node_modules/strtok3/lib/BufferSizeError.js +1 -1
  153. package/node_modules/strtok3/lib/TokenWriter.js +151 -0
  154. package/node_modules/strtok3/lib/core.js +1 -0
  155. package/node_modules/strtok3/package.json +2 -2
  156. package/node_modules/token-types/LICENSE.txt +9 -9
  157. package/node_modules/token-types/{lib → dist/lib}/index.js +21 -3
  158. package/node_modules/token-types/package.json +81 -81
  159. package/package.json +10 -10
  160. package/schemas/README.md +16 -0
  161. package/schemas/prototype-icon-names.json +302 -0
  162. package/schemas/prototype-platform-permissions.json +75 -0
  163. package/schemas/test-plan.schema.json +2 -2
  164. package/node_modules/@borewit/text-codec/README.md +0 -87
  165. package/node_modules/@jimp/diff/node_modules/pixelmatch/README.md +0 -110
  166. package/node_modules/@jimp/diff/node_modules/pixelmatch/node_modules/pngjs/README.md +0 -433
  167. package/node_modules/@jimp/file-ops/dist/browser/index.js +0 -8
  168. package/node_modules/@jimp/js-png/README.md +0 -35
  169. package/node_modules/@jimp/js-png/src/__image_snapshots__/index-node-test-ts-png-should-use-png-options-1-snap.png +0 -0
  170. package/node_modules/@jimp/js-png/src/output.png +0 -0
  171. package/node_modules/@jimp/js-png/vitest.config.browser.mjs +0 -3
  172. package/node_modules/@jimp/plugin-resize/README.md +0 -12
  173. package/node_modules/@jimp/plugin-resize/vitest.config.browser.mjs +0 -3
  174. package/node_modules/@tokenizer/inflate/README.md +0 -114
  175. package/node_modules/@tokenizer/token/README.md +0 -19
  176. package/node_modules/await-to-js/README.md +0 -82
  177. package/node_modules/debug/README.md +0 -481
  178. package/node_modules/exif-parser/README.md +0 -83
  179. package/node_modules/file-type/readme.md +0 -667
  180. package/node_modules/ieee754/README.md +0 -51
  181. package/node_modules/mime/README.md +0 -178
  182. package/node_modules/ms/readme.md +0 -59
  183. package/node_modules/parse-bmfont-xml/README.md +0 -74
  184. package/node_modules/parse-bmfont-xml/lib/browser.js +0 -85
  185. package/node_modules/parse-bmfont-xml/node_modules/xml2js/README.md +0 -507
  186. package/node_modules/pngjs/README.md +0 -287
  187. package/node_modules/sax/README.md +0 -228
  188. package/node_modules/strtok3/README.md +0 -736
  189. package/node_modules/tinycolor2/README.md +0 -492
  190. package/node_modules/tinycolor2/cjs/test.js +0 -2191
  191. package/node_modules/tinycolor2/cjs/test_template.js +0 -26
  192. package/node_modules/tinycolor2/deno_asserts@0.168.0.mjs +0 -807
  193. package/node_modules/tinycolor2/esm/test.js +0 -2189
  194. package/node_modules/tinycolor2/esm/test_template.js +0 -24
  195. package/node_modules/tinycolor2/tinycolor.js +0 -1191
  196. package/node_modules/token-types/README.md +0 -120
  197. package/node_modules/uint8array-extras/readme.md +0 -318
  198. package/node_modules/xml-parse-from-string/README.md +0 -35
  199. package/node_modules/xmlbuilder/README.md +0 -86
  200. package/node_modules/zod/README.md +0 -208
  201. package/node_modules/zod/v4/locales/ar.d.cts +0 -4
  202. package/node_modules/zod/v4/locales/ar.d.ts +0 -4
  203. package/node_modules/zod/v4/locales/az.d.cts +0 -4
  204. package/node_modules/zod/v4/locales/az.d.ts +0 -4
  205. package/node_modules/zod/v4/locales/be.d.cts +0 -4
  206. package/node_modules/zod/v4/locales/be.d.ts +0 -4
  207. package/node_modules/zod/v4/locales/ca.d.cts +0 -4
  208. package/node_modules/zod/v4/locales/ca.d.ts +0 -4
  209. package/node_modules/zod/v4/locales/cs.d.cts +0 -4
  210. package/node_modules/zod/v4/locales/cs.d.ts +0 -4
  211. package/node_modules/zod/v4/locales/de.d.cts +0 -4
  212. package/node_modules/zod/v4/locales/de.d.ts +0 -4
  213. package/node_modules/zod/v4/locales/en.d.cts +0 -5
  214. package/node_modules/zod/v4/locales/en.d.ts +0 -5
  215. package/node_modules/zod/v4/locales/eo.d.cts +0 -5
  216. package/node_modules/zod/v4/locales/eo.d.ts +0 -5
  217. package/node_modules/zod/v4/locales/es.d.cts +0 -4
  218. package/node_modules/zod/v4/locales/es.d.ts +0 -4
  219. package/node_modules/zod/v4/locales/fa.d.cts +0 -4
  220. package/node_modules/zod/v4/locales/fa.d.ts +0 -4
  221. package/node_modules/zod/v4/locales/fi.d.cts +0 -4
  222. package/node_modules/zod/v4/locales/fi.d.ts +0 -4
  223. package/node_modules/zod/v4/locales/fr-CA.d.cts +0 -4
  224. package/node_modules/zod/v4/locales/fr-CA.d.ts +0 -4
  225. package/node_modules/zod/v4/locales/fr.d.cts +0 -4
  226. package/node_modules/zod/v4/locales/fr.d.ts +0 -4
  227. package/node_modules/zod/v4/locales/he.d.cts +0 -4
  228. package/node_modules/zod/v4/locales/he.d.ts +0 -4
  229. package/node_modules/zod/v4/locales/hu.d.cts +0 -4
  230. package/node_modules/zod/v4/locales/hu.d.ts +0 -4
  231. package/node_modules/zod/v4/locales/id.d.cts +0 -4
  232. package/node_modules/zod/v4/locales/id.d.ts +0 -4
  233. package/node_modules/zod/v4/locales/index.d.cts +0 -39
  234. package/node_modules/zod/v4/locales/index.d.ts +0 -39
  235. package/node_modules/zod/v4/locales/it.d.cts +0 -4
  236. package/node_modules/zod/v4/locales/it.d.ts +0 -4
  237. package/node_modules/zod/v4/locales/ja.d.cts +0 -4
  238. package/node_modules/zod/v4/locales/ja.d.ts +0 -4
  239. package/node_modules/zod/v4/locales/kh.d.cts +0 -4
  240. package/node_modules/zod/v4/locales/kh.d.ts +0 -4
  241. package/node_modules/zod/v4/locales/ko.d.cts +0 -4
  242. package/node_modules/zod/v4/locales/ko.d.ts +0 -4
  243. package/node_modules/zod/v4/locales/mk.d.cts +0 -4
  244. package/node_modules/zod/v4/locales/mk.d.ts +0 -4
  245. package/node_modules/zod/v4/locales/ms.d.cts +0 -4
  246. package/node_modules/zod/v4/locales/ms.d.ts +0 -4
  247. package/node_modules/zod/v4/locales/nl.d.cts +0 -4
  248. package/node_modules/zod/v4/locales/nl.d.ts +0 -4
  249. package/node_modules/zod/v4/locales/no.d.cts +0 -4
  250. package/node_modules/zod/v4/locales/no.d.ts +0 -4
  251. package/node_modules/zod/v4/locales/ota.d.cts +0 -4
  252. package/node_modules/zod/v4/locales/ota.d.ts +0 -4
  253. package/node_modules/zod/v4/locales/pl.d.cts +0 -4
  254. package/node_modules/zod/v4/locales/pl.d.ts +0 -4
  255. package/node_modules/zod/v4/locales/ps.d.cts +0 -4
  256. package/node_modules/zod/v4/locales/ps.d.ts +0 -4
  257. package/node_modules/zod/v4/locales/pt.d.cts +0 -4
  258. package/node_modules/zod/v4/locales/pt.d.ts +0 -4
  259. package/node_modules/zod/v4/locales/ru.d.cts +0 -4
  260. package/node_modules/zod/v4/locales/ru.d.ts +0 -4
  261. package/node_modules/zod/v4/locales/sl.d.cts +0 -4
  262. package/node_modules/zod/v4/locales/sl.d.ts +0 -4
  263. package/node_modules/zod/v4/locales/sv.d.cts +0 -4
  264. package/node_modules/zod/v4/locales/sv.d.ts +0 -4
  265. package/node_modules/zod/v4/locales/ta.d.cts +0 -4
  266. package/node_modules/zod/v4/locales/ta.d.ts +0 -4
  267. package/node_modules/zod/v4/locales/th.d.cts +0 -4
  268. package/node_modules/zod/v4/locales/th.d.ts +0 -4
  269. package/node_modules/zod/v4/locales/tr.d.cts +0 -5
  270. package/node_modules/zod/v4/locales/tr.d.ts +0 -5
  271. package/node_modules/zod/v4/locales/ua.d.cts +0 -4
  272. package/node_modules/zod/v4/locales/ua.d.ts +0 -4
  273. package/node_modules/zod/v4/locales/ur.d.cts +0 -4
  274. package/node_modules/zod/v4/locales/ur.d.ts +0 -4
  275. package/node_modules/zod/v4/locales/vi.d.cts +0 -4
  276. package/node_modules/zod/v4/locales/vi.d.ts +0 -4
  277. package/node_modules/zod/v4/locales/zh-CN.d.cts +0 -4
  278. package/node_modules/zod/v4/locales/zh-CN.d.ts +0 -4
  279. package/node_modules/zod/v4/locales/zh-TW.d.cts +0 -4
  280. package/node_modules/zod/v4/locales/zh-TW.d.ts +0 -4
@@ -0,0 +1,4 @@
1
+ // @bun
2
+ import{ku,Aoe}from"./chunk-zd9vmkzn.js";import"./chunk-vs9r72ta.js";import"./chunk-mqc1d0eb.js";import"./chunk-nwm2pq5v.js";import"./chunk-a4k9rt7z.js";import"./chunk-8cghfzb2.js";import"./chunk-44bt78m9.js";import"./chunk-a2sc4jm0.js";import"./chunk-jhnbfj19.js";import"./chunk-sjn0nj4p.js";import"./chunk-tyazf3sk.js";import"./chunk-bn64x5z5.js";import"./chunk-0e4gm1kj.js";import"./chunk-4fgdhcwx.js";import"./chunk-6d3mmqxt.js";import"./chunk-sns0c35v.js";import"./chunk-h3n4adc6.js";import"./chunk-32jpxz2y.js";import"./chunk-79q5xsdc.js";import"./chunk-ggtd5x5a.js";import"./chunk-z8t0v07j.js";import"./chunk-mf9spd4g.js";export{ku as DaemonManager,Aoe as runDaemonCommand};
3
+
4
+ //# debugId=4288AA1B4881D86A64756E2164756E21
@@ -0,0 +1,5 @@
1
+ // @bun
2
+ import{i,Bt,te,e}from"./chunk-z8t0v07j.js";import{Ji,w,ht,pe,B,oe,Aee,v,ls,S,me,Rt,o,R,tg,M,G,Nte,mr,_e,Lm,bc,E3,pl,On,qB,VB,_,xe,k}from"./chunk-h3n4adc6.js";import{PF,nm,Fi,mn,IF,yQ,Zy,vQ,XA,um,vV,QA,Yi,$F,qF,Zn}from"./chunk-6d3mmqxt.js";import{r,t}from"./chunk-9rkfyt6q.js";import{AsyncLocalStorage as ce}from"async_hooks";var Yy=Symbol("terminalScreenshotUnavailable"),O=new ce;async function N4(n,s,a=!0){if(!a)return O.run(void 0,s);let c={pending:[],unavailable:[],signal:n,closed:!1,multiAction:!1};return O.run(c,async()=>{let d=!1;try{let l=await s();return d=!0,l}finally{try{if(d)await Qq();else c.pending=[]}finally{c.closed=!0}}})}function dQ(n,s,a){return(c)=>()=>N4(n,c,!s&&a!=="observe")}function C(n,s){return n===s||!!n.observationId&&n.observationId===s.observationId&&n.deviceId===s.deviceId}async function Yl(){let n=O.getStore();if(!n||n.closed||n.pending.length===0)return;n.multiAction=!0,await Qq()}function Zq(n,s){let a=O.getStore();if(!a)return!1;if(a.closed)return!0;if(a.multiAction)return!1;if(!n.observationId||!n.deviceId)return!1;if(!a.pending.some((c)=>C(c.observation,n)))a.pending.push({observation:n,capture:s});return!0}function lQ(n){return O.getStore()?.pending.some((s)=>C(s.observation,n))??!1}async function F4(n,s,a){n[Yy]=!0;let c=O.getStore(),d={observation:n};c?.unavailable.push(d);for(let l=0;l<2;l++){if(c?.closed||a?.aborted)return;n.screenshotCaptureAttempted=!0;try{if(await s(n,a),delete n[Yy],c)c.unavailable=c.unavailable.filter((u)=>!C(u.observation,n));if(n.accessibilityAudit!==void 0)delete n.accessibilityAuditSkipped;return}catch(u){d.error=u,delete n.screenshotPath,delete n.screenshotSource,delete n.screenshotCapturedAt,delete n.screenshotImageSize,delete n.screenshotExpiresAt,delete n.screenshotSettled,delete n.screenshotOrientation,delete n.screenshotPixelsPerNativeUnit,delete n.screenshotScaleProvenance,delete n.screenshotAgeMs,delete n.screenshotFormat,delete n.screenshotMimeType,delete n.screenshotImage,delete n.screenshotCaptureSource,delete n.observationScreenshotResourceUri,delete n.accessibilityAudit,e.warn(`[PostActionCapture] terminal screenshot failed: ${r(u)}`,u)}}}async function Bu(n,s=n,a,c){let d=O.getStore(),l=d?.pending.findIndex((p)=>C(p.observation,n))??-1;if(!d||l<0)return!1;let[u]=d.pending.splice(l,1);return await F4(s,a??u.capture,d.signal??c),!0}async function Qq(){let n=O.getStore();while(n&&n.pending.length>0)await Bu(n.pending[0].observation)}function Xx(n){return n[Yy]===!0||(O.getStore()?.unavailable.some((s)=>C(s.observation,n))??!1)}function uQ(n){return O.getStore()?.unavailable.find((s)=>C(s.observation,n))?.error}function V(n,s,a){let c=n.observationHostTimestampProvider?.(),d=n.observationTimestampProvider?.()??(typeof c==="number"?c+a:void 0);if(typeof d!=="number"||Number.isNaN(d))return s;if(d>=s)return e.debug(`[BaseVisualChange] Using observation timestamp override: ${d}`),d;return e.debug(`[BaseVisualChange] Ignoring observation timestamp override (${d}) older than action start (${s})`),s}function H(n,s,a){if(s.platform!=="android"||a.skipUiStability||a.display!==void 0)return;return n.getCachedActiveWindow()}function L(n,s){if(n===void 0||!s?.appId)return;if(n===null)return s.appId;return n.appId!==s.appId||n.activityName!==s.activityName||n.layoutSeqSum!==s.layoutSeqSum?s.appId:void 0}async function de(n,s,a,c){if(a===void 0||s.display!==void 0)return;let d=await n.getCachedActiveWindow();if(L(a,d)||!s.foregroundAppMayChange||s.packageName)return d;try{return await n.getActive(!0,s.perf,{timeoutMs:Math.min(c,E3),signal:s.signal})}catch(l){return o(s.signal),e.warn(`[BaseVisualChange] Post-dispatch active window read failed; using cached window: ${r(l)}`,l),d}}async function z(n,s,a,{beforeWindow:c,timeoutMs:d}){let l=await de(n,s,c,d),u=L(c,l);if(u)return u;if(s.packageName)return s.packageName;let p=a?.viewHierarchy?.packageName;if(p)return e.info(`[BaseVisualChange] Using packageName from view hierarchy: ${p}`),p;if(s.display!==void 0)return;let f=(l===void 0?await n.getCachedActiveWindow():l)?.appId;if(f)e.info(`[BaseVisualChange] Using cached packageName: ${f}`);return f||void 0}var le=10,ue=1000,fe=te({initialDelayMs:50,multiplier:2,maxDelayMs:400});class x{adb;adbFactory;idle;timer;rotationPollBackoff;stabilityThresholdMs=60;pollIntervalMs=17;constructor(n,s=v,a=i,{hierarchyReader:c,rotationPollBackoff:d=fe}={}){this.rotationPollBackoff=d,this.adbFactory=s,this.adb=s.create(n),this.idle=new XA(n,this.adbFactory,a,c),this.timer=a}async waitForRotation(n,s=vQ,a){let c=this.timer.now();for(let d=1;;d++){o(a);let l=await R(this.idle.getRotationStatus(n,c,s,{signal:a}),a);if(l.rotationComplete)return;if(!l.shouldContinue)throw Error(`Timeout waiting for rotation to ${n} after ${s}ms`);await R(this.timer.sleep(Math.min(this.rotationPollBackoff.delayForAttempt(d),Math.max(0,s-(this.timer.now()-c)))),a)}}async initializeUiStabilityTracking(n,s,a){let c=this.timer.now(),d=c,l=c+s;e.info(`[AwaitIdle] Starting UI stability wait for ${n} (timeout: ${s}ms, threshold: ${this.stabilityThresholdMs}ms)`);try{await ls(l,this.timer,a,(u,p)=>this.adb.executeCommand(`shell dumpsys gfxinfo ${S(n)} reset`,{timeoutMs:p,maxBuffer:oe,signal:u}))}catch(u){a?.throwIfAborted(),e.info(`[AwaitIdle] Failed to reset gfxinfo for ${n}: ${u}`)}return{startTime:c,lastNonIdleTime:d,prevMissedVsync:null,prevSlowUiThread:null,prevFrameDeadlineMissed:null,prevTotalFrames:null,firstGfxInfoLog:!0}}checkUiStabilityTimeout(n,s,a){let c=this.timer.now()-s,d=this.timer.now()-n,l=d>=this.stabilityThresholdMs,u=c<a;return{isStable:l,shouldContinue:u,stableTime:d,elapsedTime:c}}async processSingleUiStabilityCheck(n,s,a,c){let d=await this.idle.getUiStability(n,{missedVsync:s.prevMissedVsync,slowUiThread:s.prevSlowUiThread,frameDeadlineMissed:s.prevFrameDeadlineMissed,totalFrames:s.prevTotalFrames},s.firstGfxInfoLog,{perf:new B,timeoutMs:a,signal:c});return{updatedState:{prevMissedVsync:d.updatedPrevMissedVsync,prevSlowUiThread:d.updatedPrevSlowUiThread,prevFrameDeadlineMissed:d.updatedPrevFrameDeadlineMissed,prevTotalFrames:d.updatedPrevTotalFrames,firstGfxInfoLog:d.updatedFirstGfxInfoLog,lastNonIdleTime:d.shouldUpdateLastNonIdleTime?this.timer.now():s.lastNonIdleTime},...d.noFrameData?{noFrameData:!0}:{},...d.frameStatsUnavailable?{frameStatsUnavailable:!0}:{},shouldUpdateLastNonIdleTime:d.shouldUpdateLastNonIdleTime}}createNoFrameGraceCheck(n){let s=0,a=null;return(c,d)=>{if(d||this.timer.now()>=n)return!1;if(!c)return s=0,a=null,!1;if(s===0)a=this.timer.now();return s++,s>=le&&a!==null&&this.timer.now()-a>=ue}}async waitForUiStabilityWithState(n,s,a,{perf:c=new B,signal:d}={}){return await this.idle.waitForQuietTreeStability(n,a.startTime,s,d)??this.waitForFrameStabilityWithState(n,s,a,{perf:c,signal:d})}async waitForFrameStabilityWithState(n,s,a,{perf:c,signal:d}){e.info(`[AwaitIdle] Continuing UI stability wait with existing state for package: ${n}`);let l=a,u=0,p=!1,f=a.startTime+s,m=this.createNoFrameGraceCheck(f),h={percentile50thMs:null,percentile90thMs:null,percentile95thMs:null,percentile99thMs:null,missedVsyncCount:null,slowUiThreadCount:null,frameDeadlineMissedCount:null};try{while(!0){let b=this.timer.now()-a.startTime;if(o(d),b>=s){e.info(`[AwaitIdle] Timeout waiting for UI stability after ${s}ms`);break}u++;let T=await c.track(`gfxinfoPoll_${u}`,async()=>ls(f,this.timer,d,(g,P)=>this.processSingleUiStabilityCheck(n,l,P,g)));if(l={...l,...T.updatedState},h.missedVsyncCount=l.prevMissedVsync,h.slowUiThreadCount=l.prevSlowUiThread,h.frameDeadlineMissedCount=l.prevFrameDeadlineMissed,m(T.noFrameData,T.frameStatsUnavailable)){e.info(`[AwaitIdle] Ending UI stability wait after the grace period without valid frame stats for ${n}`),h.idleEndReason="noFrameStats";break}let y=this.checkUiStabilityTimeout(l.lastNonIdleTime,a.startTime,s);if(e.info(`[AwaitIdle] Checking stability: ${y.elapsedTime}ms elapsed of ${s}ms timeout, stable for ${y.stableTime}ms/${this.stabilityThresholdMs}ms`),y.isStable){e.info(`[AwaitIdle] UI stable after ${y.elapsedTime}ms (stable for ${y.stableTime}ms)`),p=!0;break}if(!y.shouldContinue){e.info(`[AwaitIdle] Timeout waiting for UI stability after ${s}ms`);break}await this.timer.sleep(Math.min(this.pollIntervalMs,f-this.timer.now()))}}catch(b){d?.throwIfAborted(),e.error(`[AwaitIdle] Encountered an error while waiting for UI stability: ${b}`)}if(f>this.timer.now())try{let b=await c.track("finalGfxinfo",async()=>{let T=await ls(f,this.timer,d,(g,P)=>this.adb.executeCommand(`shell dumpsys gfxinfo ${S(n)}`,{timeoutMs:P,maxBuffer:oe,signal:g})),y=this.idle.parseMetrics(T.stdout);if(this.idle.validateFrameData(y))delete h.idleEndReason;return y});h.percentile50thMs=b.percentile50th,h.percentile90thMs=b.percentile90th,h.percentile95thMs=b.percentile95th,h.percentile99thMs=b.percentile99th,h.missedVsyncCount=b.missedVsync,h.slowUiThreadCount=b.slowUiThread,h.frameDeadlineMissedCount=b.frameDeadlineMissed}catch(b){d?.throwIfAborted(),e.warn(`[AwaitIdle] Failed to get final gfxinfo: ${b}`)}let A=this.timer.now()-a.startTime;return{packageName:n,...h,pollCount:u,stabilityWaitMs:A,isStable:p}}async waitForUiStability(n,s,a=new B,c){e.info(`[AwaitIdle] Waiting for UI stability for package: ${n} with timeoutMs: ${s}`);let d=await a.track("initUiStabilityTracking",async()=>this.initializeUiStabilityTracking(n,s,c));return this.waitForUiStabilityWithState(n,s,d,{perf:a,signal:c})}}function ve(n){let s=n.viewHierarchy?.hierarchy;return!!s&&typeof s==="object"&&!("error"in s)}function zd(n,s,a){if(a&&s.display?.key!==n.display?.key)return!1;if(!ve(s))return!1;let c=s.freshness;if(c?.isFresh===!1||c?.verified===!1)return!1;let d=On(n.viewHierarchy);if(d===void 0)return!0;let l=On(s.viewHierarchy);return l!==void 0&&l>=d}class E{elementParser=new G;historyRepository;navigationGraph;timer;constructor(n=new $F,s,a=i){this.historyRepository=n,this.navigationGraph=s,this.timer=a}async recordOutcomeForAction(n,s,a){if(!n?.predictions?.likelyActions||!s)return;let c=this.findMatchingPrediction(n.predictions.likelyActions,a.toolName,a.toolArgs);if(!c)return;let l=(a.navigationGraph??this.navigationGraph??me.getInstance()).getCurrentScreen();if(!l)return;let u=c.predictedElements??[],p=this.extractElementIdentifiers(s),f=this.calculateMatchScore(u,p,c.predictedScreen,l),m=this.isCorrectPrediction(c.predictedScreen,l,u,f),h=this.isPartialMatch(c.predictedScreen,l,f),A=this.resolveErrorType(c.predictedScreen,l,u,f),b=bc.generateCacheKey(JSON.stringify({fromScreen:a.fromScreen,predictedScreen:c.predictedScreen,toolName:a.toolName,toolArgs:QA(a.toolArgs),timestamp:this.timer.now()}));try{await this.historyRepository.recordOutcome({appId:a.appId,predictionId:b,timestamp:this.timer.now(),fromScreen:a.fromScreen,predictedScreen:c.predictedScreen,actualScreen:l,toolName:a.toolName,toolArgs:a.toolArgs,predictedElements:u,foundElements:p,confidence:c.confidence??0.5,matchScore:f,correct:m,partialMatch:h,errorType:A})}catch(T){e.warn(`[PredictionAnalyzer] Failed to record outcome: ${T}`)}}findMatchingPrediction(n,s,a){let c=n.filter((d)=>d.action===s);if(c.length===0)return;for(let d of c){if(s==="tapOn"&&this.matchesTapOn(d,a))return d;if(s==="swipeOn"&&this.matchesSwipeOn(d,a))return d}return}matchesTapOn(n,s){let a=n.target,c=Yi(s.text),d=Yi(s.elementId??s.id),l=Yi(a.text),u=Yi(a.elementId),p=Yi(a.contentDesc);if(c&&(c===l||c===p))return!0;if(d&&d===u)return!0;return!1}matchesSwipeOn(n,s){let a=n.target,c=s.container??{},d=s.lookFor??{},l=this.matchesTarget(c,a.container),u=this.matchesTarget(d,a.lookFor);return l||u}matchesTarget(n,s){if(!s)return!1;let a=Yi(n.text),c=Yi(n.elementId),d=Yi(n.contentDesc),l=Yi(s.text),u=Yi(s.elementId),p=Yi(s.contentDesc);if(a&&(a===l||a===p))return!0;if(c&&c===u)return!0;if(d&&d===p)return!0;return!1}extractElementIdentifiers(n){if(!n.viewHierarchy)return[];let s=this.elementParser.flattenViewHierarchy(n.viewHierarchy),a=new Set;for(let{element:c}of s){if(c.text)a.add(c.text);if(c["resource-id"])a.add(c["resource-id"]);if(c["content-desc"])a.add(c["content-desc"])}return Array.from(a)}calculateMatchScore(n,s,a,c){if(a!==c)return 0;if(n.length===0)return 1;let d=new Set(n.map(Yi).filter((p)=>Boolean(p)));if(d.size===0)return 1;let l=new Set(s.map(Yi).filter((p)=>Boolean(p))),u=0;for(let p of d)if(l.has(p))u+=1;return u/d.size}isCorrectPrediction(n,s,a,c){if(n!==s)return!1;if(a.length===0)return!0;return c>=1}isPartialMatch(n,s,a){return n===s&&a>0&&a<1}resolveErrorType(n,s,a,c){if(n!==s)return"wrong_screen";if(a.length>0&&c<1)return"missing_elements";return}}class N{window;adb;deviceId;timer;formFactor;constructor(n){this.window=n.window,this.adb=n.adb,this.deviceId=n.deviceId,this.timer=n.timer,this.formFactor=n.formFactor}async verify(n={}){let s=await this.readForeground(n);if(!s)yQ(this.deviceId);return s}async readForeground(n){let s=pe(n.signal),{timeoutMs:a}=n,c=n.retryDelaysMs??[150,300],d=a!==void 0?this.timer.now()+a:void 0,l=()=>d===void 0?void 0:d-this.timer.now();for(let u=0;;u++){try{let m=await this.probeHomeForeground(s,l,n);if(m!=="not-home")return m==="verified"}catch(m){if(s?.aborted)throw m;e.warn(`[BaseVisualChange] Failed to read foreground app while verifying home press: ${r(m)}`,m)}let p=c[u],f=l();if(p===void 0||f!==void 0&&f<=p)return!1;await this.timer.sleep(p)}}async probeHomeForeground(n,s,a){if((s()??1)<=0)return"expired";let c=()=>({signal:n,timeoutMs:s()}),d=await this.window.getActive(!0,void 0,c());if((s()??1)<=0)return"expired";let{deviceId:l}=this;if(await Zy(d.appId,this.adb,l,{timer:this.timer,...c(),incarnationToken:Ji(l),formFactor:this.formFactor})&&(s()??1)>0)return a.onVerifiedForeground?.(d.appId),"verified";return"not-home"}}function he(n,s){let a=n.screenIdentity,c=s.screenIdentity;if(!a||!c||a.platform!==c.platform)return;let d=a.key!==c.key;return{screenChanged:d,basis:d?"screenIdentity changed":"screenIdentity unchanged"}}function U(n,s){let a=n.activeWindow,c=s.activeWindow;if(!q(a)||!q(c))return;let d=a.appId!==c.appId||a.activityName!==c.activityName;return{screenChanged:d,basis:d?"activeWindow changed":"activeWindow unchanged"}}function q(n){return Boolean(n?.appId&&n.activityName&&Number.isInteger(n.layoutSeqSum))}function be(n,s){let a=mn(n.viewHierarchy??null),c=mn(s.viewHierarchy??null);if(!a||!c)return;let d=a!==c;return{screenChanged:d,basis:d?"viewHierarchy changed":"viewHierarchy unchanged"}}function Y(n,s){if(!n||!s)return;let a=be(n,s),c=[he(n,s),U(n,s),a].filter((l)=>l!==void 0);if(a&&!a.screenChanged)return c.find((l)=>!l.screenChanged)??a;let d=c.find((l)=>l.screenChanged);if(d)return d;return c[0]??{screenChanged:!1,basis:"insufficient observation data"}}var wF=[50,100,200,400],I=new Set(["tapAt","swipeAt","tapOn","tapAny","swipeOn","dragAndDrop","pinchOn","multiTouch"]),ye=Object.freeze({assertCurrent:()=>{}}),ac={skipScreenshot:!0,skipAccessibilityAudit:!0};function Jy(n){return n?.displayFence??ye}function j(n,s){return{renderedDisplayRevision:n.renderedDisplayRevision??s,displayTransitionReader:n.displayTransitions??xe,renderedDisplayGeneration:n.renderedDisplayGeneration??K}}function K(n,s=w){let a=s.renderedDisplaySessions();if(!a)return;let c=a.getSessionForDevice(n);return c?a.getLastRenderedDisplayGeneration(c):void 0}function Q(n,s=w){let a=s.renderedDisplaySessions();if(!a)return;let c=a.getSessionForDevice(n);return c?a.getLastRenderedDisplayRevision(c):void 0}var Zx=4;function ge(n){return n.platform==="ios"&&(n.displays?.panels.length??0)>1}function we(n,s,a){return ge(n)&&s.display===void 0&&I.has(s.predictionContext?.toolName??"")&&!a()}async function X(n,s,{observer:a,transitions:c,callerStampIsStale:d=()=>!1,observeOptions:l={}}){if(!we(n,s,d))return;let u=c.revision(n.deviceId);if(s.previousObservation?.displayRevision===u)return;let p=await a.getMostRecentCachedObserveResult();if(p.error===void 0&&p.displayRevision===u)return;return e.info(`[PANEL_GEOMETRY] Cached observation display revision ${p.displayRevision??"none"} != current ${u} on ${n.deviceId}; observing before ${s.predictionContext?.toolName}`),a.execute({...l,freshness:"fresh"})}class VA extends t{constructor(n){super("Cannot perform action without view hierarchy",n);this.name="MissingViewHierarchyError"}}function W(n){return n}function Z(n,s,a,c){if(n.viewHierarchy?.hierarchy?.error)return!1;if(s>0&&!(n.freshness?.isFresh??!0))return!0;if(!a)return!1;let d=mn(n.viewHierarchy);return!!c&&!!d&&c===d}function J(n){return Boolean(n.viewHierarchy&&!n.viewHierarchy.hierarchy.error)}function ee(n,s){let a=s>0?"Observation may be stale after interaction":"Observation may not reflect expected visual change";n.freshness=n.freshness?{...n.freshness,warning:a}:{isFresh:!1,warning:a},e.warn(`[BaseVisualChange] ${a}`)}function re(n,s){if(s!==null){if(n.success!==!1){if(n.success=s,!s)n.error="No visual change observed"}return}if(n&&"error"in n&&n.error!==void 0)n.success=!1;else if(n&&(!("success"in n)||n.success===void 0))n.success=!0}function ie(n,s,a){if(s)n.gfxMetrics=s;let c=a.isEnabled()?a.getTimings():void 0;if(c)n.perfTiming=c}function ne(n){if(n.secure===!0)return`${"Device is locked; this interaction likely did not reach the app under test."} The lock is secure (PIN/pattern/password) \u2014 ask the user to unlock the device before continuing.`;if(n.secure===!1)return`${"Device is locked; this interaction likely did not reach the app under test."} The lock is a swipe lock \u2014 dismiss the keyguard (e.g. swipe up) before continuing.`;return"Device is locked; this interaction likely did not reach the app under test. Unlock or dismiss the keyguard before continuing."}function se(n,s){if(!n)return;let a=s(),c=a.getCurrentAppId(),d=a.getCurrentScreen();if(!c||!d)return;return{appId:c,fromScreen:d,toolName:n.toolName,toolArgs:n.toolArgs,navigationGraph:a}}class D{timer;constructor(n){this.timer=n}async capturePostActionObservation(n,s,a,c){let d=s.perf??new B,l=Bt(wF),u,p,f=async()=>{let m=await n.execute(s);if(s.display!==void 0)o(s.signal);if(s.display!==void 0&&zd(p??m,m,!0))p=m;return m};try{d.serial("finalObserve"),u=await f(),d.end();for(let m=0;m<Zx&&a(u);m++){let h=l.delayForAttempt(m+1);e.info(`[BaseVisualChange] Observation appears stale/unchanged, retrying in ${h}ms (attempt ${m+1}/${Zx})`),await this.timer.sleep(h),d.serial(`finalObserve_retry_${m+1}`),u=await f(),d.end()}}catch(m){return this.recoverPostActionObservation(m,p??u,s,c)}return{observation:u,readFailed:!1}}recoverPostActionObservation(n,s,a,c){if(a.display===void 0)throw n;if(o(a.signal),n instanceof Error&&n.name==="AbortError")throw n;if(s&&zd(s,s,!0))return this.notePostActionReadFailure(s,"observation retry",r(n),n);if(c.success===!1||c.skipped||c.wasAlreadyFocused)throw n;throw new mr(n)}notePostActionReadFailure(n,s,a,c){let d=`Post-action ${s} failed: ${a}; retaining the earlier observation`;return e.warn(`[BaseVisualChange] ${d}`,c),{observation:{...n,settled:!1,freshness:{...n.freshness,isFresh:n.freshness?.isFresh??!0,warning:[n.freshness?.warning,d].filter(Boolean).join("; ")}},readFailed:!0,...c instanceof _e?{staleDisplay:c.details}:{}}}}var Oe="Boomerang partially applied: the forward swipe was delivered, so the content has moved. Observe before retrying; do not retry automatically.";function Re(n){return{...n,success:!1,error:`Boomerang partially applied: the forward swipe was delivered; the return swipe failed (${n.error??"unknown error"}). The content has moved. Observe before retrying; do not retry automatically.`,retryable:!1,partialApplication:!0}}function F(n){if(ht(n)||n instanceof _e)return n;let s=new t(`${r(n)}. ${Oe}`,{cause:n});return ae.add(s),s}var ae=new WeakSet;function eV(n,s){try{o(n)}catch(a){throw typeof s==="object"&&s!==null&&ae.has(s)?F(a):a}}async function Qx(n){let{timer:s,apexPauseMs:a,signal:c,returnSwipe:d}=n;try{if(o(c),a>0)await R(s.sleep(a),c);o(c);let l=await d();return l.success?l:Re(l)}catch(l){throw F(l)}}class De{static shouldRefetchCachedObservation(n,s=!1){return s?n.freshness?.isFresh!==!0:n.freshness?.isFresh===!1}windowCacheInvalidator=new Zn;actionClockSkewCache;navigationGraphResolver=vV;device;adb;adbFactory;awaitIdle;observeScreen;window;predictionAnalyzer;deferredPredictionOutcomes=new WeakMap;timer;displayTransitionReader;renderedDisplayGeneration;renderedDisplayRevision;shouldCapturePostActionScreenshot(){return nm()==="settled"||!PF()||(Rt()?.hasSubscriberForDevice(this.device.deviceId)??!1)}constructor(n,{adb:s=v,timer:a=i,renderedDisplayRevision:c=Q,displayFence:d={}}={}){this.actionClockSkewCache=Nte(a,d.actionClockSkewCache),this.device=n;let{adbFactory:l,adb:u}=De.resolveAdb(n,s);this.adbFactory=l,this.adb=u,this.awaitIdle=d.awaitIdle??new x(n,this.adbFactory,a),this.observeScreen=d.observeScreen??qF(n,this.adbFactory),this.window=d.window??new pl(n,this.adbFactory,a),this.predictionAnalyzer=d.predictionAnalyzer??new E,this.timer=a;let p=j(d,c);this.renderedDisplayRevision=p.renderedDisplayRevision,this.displayTransitionReader=p.displayTransitionReader,this.renderedDisplayGeneration=p.renderedDisplayGeneration}static resolveAdb(n,s){if(s&&typeof s.create==="function"){let a=s;return{adbFactory:a,adb:a.create(n)}}if(s){let a=s;return{adbFactory:{create:()=>a},adb:a}}return{adbFactory:v,adb:v.create(n)}}staleDisplay(n){return Lm(n,this.displayTransitionReader.identityRevision(this.device.deviceId),this.displayTransitionReader.currentObservedPanel(this.device.deviceId)?.key)}captureDisplayFence(n){let s=this.device.deviceId,a=()=>this.device.platform==="ios"?this.displayTransitionReader.identityRevision(s):this.displayTransitionReader.revision(s),c=a(),d=n??this.renderedDisplayGeneration(s)??this.displayTransitionReader.identityRevision(s);return{assertCurrent:()=>{if(a()!==c)throw this.staleDisplay(d)}}}async observedInteraction(n,s){if(!s.observePartialApplication)return this.runObservedInteraction(n,s);let a=!1;try{return await this.runObservedInteraction(async(c,d)=>{let l=await n(c,d);return a=l?.success===!1&&l.partialApplication===!0,l},s)}catch(c){throw a&&s.signal?.aborted?F(c):c}}async runObservedInteraction(n,s){await Yl();let a=s.timeoutMs||12000,c=s.perf??new B;await X(this.device,s,{observer:this.observeScreen,transitions:this.displayTransitionReader,callerStampIsStale:()=>this.callerDisplayStampIsStale(s),observeOptions:this.previousObserveOptions(s,c,"fresh")});let d=this.captureCallerFenceState(s);if(s.progress)await s.progress(0,100,"Preparing to execute action...");o(s.signal);let l=await this.resolvePreviousObservation(s,c,d),u=se(s.predictionContext,()=>this.navigationGraphResolver(this.device)),p=this.reconcileDisplayAfterRead(s,d,l),f=H(this.window,this.device,s),{actionStartTime:m,clockSkewMs:h}=await this.readActionClock(c),A=await this.runBlock(n,l,d,{options:s,stage:{perf:c,coordinateAction:p}});if(this.isUnconfirmedIosFailure(A,s))return c.end(),W(A);this.invalidateCtrlProxyCacheForDisplay(s);let b=V(s,m,h),T=await z(this.window,s,l,{beforeWindow:await f,timeoutMs:a}),y=await this.awaitUiStability(s,T,a,c),g=await this.takeObservation(A,l,{changeExpected:s.changeExpected,display:s.display,postActionObserveScreen:s.postActionObserveScreen,tolerancePercent:s.tolerancePercent??Aee,queryOptions:s.queryOptions,gfxMetrics:y,perf:c,actionStartTime:s.overrideMinTimestamp??b,predictionContext:s.deferPredictionOutcome?void 0:u,signal:s.signal,deferPostActionScreenshot:s.deferPostActionScreenshot});if(s.deferPredictionOutcome&&u&&typeof g==="object")this.deferredPredictionOutcomes.set(g,async(P)=>{await this.predictionAnalyzer.recordOutcomeForAction(l,P,u)});if(s.display!==void 0)g.effect=this.deriveInteractionEffect(l,g.observation);return this.annotateDeviceLock(g,l),g}actionDisplayRevision(){return this.displayTransitionReader.identityRevision(this.device.deviceId)}captureCallerFenceState(n){let s=this.actionDisplayRevision(),a=this.renderedDisplayGeneration(this.device.deviceId)??s,c=n.resolvesTargetFromRead===!0&&n.display===void 0&&!n.skipPreviousObserve,d={displayRevision:s,fence:this.captureDisplayFence(),observedGeneration:a,reresolvesTarget:c,refreshForDisplayChange:!1};if(this.callerDisplayStampIsStale(n)){if(!c)throw this.staleDisplay(a);d.refreshForDisplayChange=!0}return d}callerDisplayStampIsStale(n){let s=this.renderedDisplayRevision(this.device.deviceId);if(n.skipCallerDisplayFence||!I.has(n.predictionContext?.toolName??"")||s===void 0)return!1;return this.device.platform==="ios"?!this.displayTransitionReader.sameIdentitySince(this.device.deviceId,s):s!==this.displayTransitionReader.revision(this.device.deviceId)}async resolvePreviousObservation(n,s,a){if(n.skipPreviousObserve)return e.info("[BaseVisualChange] Skipping previous observe (app was terminated/cleared)"),n.previousObservation??null;if(n.previousObservation)return n.previousObservation;let c=await this.readFreshPreviousObservation(n,s,a.refreshForDisplayChange);if(n.usesObservationForResolution!==!1&&tg(c))throw new t(`Cannot resolve elements against a wrong-window hierarchy: ${c.freshness?.warning??"The refreshed observation still belongs to another window"}`);return c}async readFreshPreviousObservation(n,s,a){let c=n.usesObservationForResolution!==!1,d=c?qB(this.device.deviceId):void 0,l=a||d!==void 0,u={knownWrongWindow:d!==void 0},p;try{await n.progress?.(10,100,"Getting previous view hierarchy..."),p=await s.track("getPreviousObserve",()=>this.readCachedOrFreshPrevious(n,s,l,u))}catch(f){if(u.knownWrongWindow&&c)throw new VA({cause:f});e.warn(`Previous observation failed: ${r(f)}`,f),p=await this.readPreviousFallback(n,s)}return De.assertUsablePrevious(p,u.knownWrongWindow&&c),this.completeResolutionRead(p,d),p}static assertUsablePrevious(n,s){if(!n)throw new VA;if(s&&(!n.viewHierarchy||n.viewHierarchy.hierarchy.error))throw new VA}completeResolutionRead(n,s){if(s!==void 0&&!tg(n))VB(this.device.deviceId,s)}readPreviousFallback(n,s){return s.track("getPreviousObserveFallback",()=>this.observeScreen.execute(this.previousObserveOptions(n,s,n.skipCallerDisplayFence?"fresh":"cached-ok")))}async readCachedOrFreshPrevious(n,s,a,c){let d=n.display?void 0:await this.observeScreen.getMostRecentCachedObserveResult();c.knownWrongWindow||=tg(d);let l=Boolean(d?.viewHierarchy&&!d.viewHierarchy.hierarchy.error),u=a||l&&De.shouldRefetchCachedObservation(d);if(!l||u||De.shouldRefetchCachedObservation(d,n.skipCallerDisplayFence))return this.observeScreen.execute(this.previousObserveOptions(n,s,u||n.skipCallerDisplayFence?"fresh":"cached-ok"));return d}previousObserveOptions(n,s,a){return{...ac,freshness:a,timeoutMs:Fi,skipStaleWindowRecovery:!0,display:n.display,queryOptions:n.queryOptions,perf:s,signal:n.signal}}reconcileDisplayAfterRead(n,s,a){let c=I.has(n.predictionContext?.toolName??""),d=()=>s.refreshForDisplayChange||this.actionDisplayRevision()!==s.displayRevision;if(s.reresolvesTarget&&d()&&a?.displayRevision!==void 0&&a.displayRevision===this.displayTransitionReader.revision(this.device.deviceId))s.displayRevision=this.actionDisplayRevision(),s.observedGeneration=this.displayTransitionReader.identityRevision(this.device.deviceId),s.fence=this.captureDisplayFence(s.observedGeneration),s.refreshForDisplayChange=!1;if(c&&d())throw this.staleDisplay(s.observedGeneration);return c}async readActionClock(n){return n.track("getActionStartTime",async()=>{let s=0;if(this.device.platform==="android"&&typeof this.adb.getDeviceTimestampMs==="function")s=await this.actionClockSkewCache.getSkewMs(this.device.deviceId,()=>typeof this.adb.getDeviceTimestampMsWithSource==="function"?this.adb.getDeviceTimestampMsWithSource():this.adb.getDeviceTimestampMs())??0;return{actionStartTime:this.timer.now()+s,clockSkewMs:s}})}runBlock(n,s,a,{options:c,stage:d}){let{perf:l,coordinateAction:u}=d;return l.track("executeBlock",async()=>{if(o(c.signal),u&&this.actionDisplayRevision()!==a.displayRevision)throw this.staleDisplay(a.observedGeneration);try{return await n(s,a.fence)}finally{if(c.foregroundAppMayChange)this.windowCacheInvalidator.invalidate(this.device,!0)}})}isUnconfirmedIosFailure(n,s){return this.device.platform==="ios"&&n?.success===!1&&n.retryable===!1&&!(s.observePartialApplication&&n.partialApplication===!0)}invalidateCtrlProxyCacheForDisplay(n){if(n.display===void 0)return;if(this.device.platform==="android")k.getExistingInstance(this.device.deviceId)?.invalidateCache();else if(this.device.platform==="ios")_.getExistingInstance(this.device.deviceId)?.invalidateCache();o(n.signal)}async awaitUiStability(n,s,a,c){if(n.skipUiStability)return e.info("[BaseVisualChange] Skipping UI stability tracking (skipUiStability=true)"),null;if(this.device.platform!=="android")return e.debug("[BaseVisualChange] Skipping UI stability tracking (gfxinfo is Android-only)"),null;if(!s)return null;e.info(`[BaseVisualChange] Starting UI stability initialization with package: ${s}`);let d=await c.track("initUiStability",async()=>this.awaitIdle.initializeUiStabilityTracking(s,a,n.signal)).catch((u)=>(o(n.signal),e.debug(`[BaseVisualChange] UI stability initialization failed: ${u}`),null));if(s.trim()==="")return null;c.serial("uiStability");let l=d!==null?await this.awaitIdle.waitForUiStabilityWithState(s,a,d,{perf:c,signal:n.signal}):await this.awaitIdle.waitForUiStability(s,a,c,n.signal);return c.end(),l}annotateDeviceLock(n,s){if(!n||this.device.platform!=="android")return;let a=s?.deviceLock;if(!a?.locked)return;delete n.deviceLockUnknown,n.deviceLock=a,n.deviceLockWarning=ne(a),e.warn(`[BaseVisualChange] ${n.deviceLockWarning}`)}async recordDeferredPredictionOutcome(n,s){if(!n||typeof n!=="object")return;let a=this.deferredPredictionOutcomes.get(n);if(!a)return;this.deferredPredictionOutcomes.delete(n),await a(s)}async captureTerminalObservationScreenshot(n,s=new B,a){if(!n)return;if(this.shouldCapturePostActionScreenshot()||M.isAccessibilityAuditEnabled()){if(this.observeScreen.captureScreenshot&&Zq(n,async(c,d)=>{await this.observeScreen.captureScreenshot?.(s,{signal:d??a,observation:c})}))return;await this.observeScreen.captureScreenshot?.(s,{signal:a,observation:n});return}await this.observeScreen.runAccessibilityAudit?.(n,s)}compareActiveWindow(n,s){return U(n,s)}deriveInteractionEffect(n,s){return Y(n,s)}capturePostActionObservation(n,s,a,c){return new D(this.timer).capturePostActionObservation(n,s,a,c)}notePostActionReadFailure(n,s,a,c){return new D(this.timer).notePostActionReadFailure(n,s,a,c)}rethrowObservationAbort(n,s,a=!0){if(!a)return;if(o(s),n instanceof Error&&n.name==="AbortError")throw n}checkPostActionDisplay(n,s,a){try{return s?.(),!0}catch(c){if(o(a),c instanceof Error&&c.name==="AbortError")throw c;if(!n.observation||!zd(n.observation,n.observation,!0))throw new mr(c);let d=this.notePostActionReadFailure(n.observation,"display settle validation",r(c),c);return n.observation=d.observation,n.staleDisplay=d.staleDisplay??n.staleDisplay,!1}}async settleDisplayObservation(n,s,a){try{let c=await new um(s,this.timer).execute({...a,initialMinTimestampMs:On(n.viewHierarchy),skipPerformanceAudit:!0,skipRecompositionTracking:!0});return o(a.signal),zd(n,c.observation,!0)?{observation:c.observation,readFailed:!1}:this.notePostActionReadFailure(n,"display settle","unusable settle capture",this.staleDisplay(n.display.generation??this.displayTransitionReader.identityRevision(this.device.deviceId)))}catch(c){if(o(a.signal),c instanceof Error&&c.name==="AbortError")throw c;return this.notePostActionReadFailure(n,"display settle",r(c),c)}}async finalizePostActionCapture(n,s){try{return await this.captureTerminalObservationScreenshot(n.observation,s.perf,s.signal),n}catch(a){if(s.display===void 0)throw a;this.rethrowObservationAbort(a,s.signal);let c=this.notePostActionReadFailure(n.observation,"terminal screenshot/audit",r(a),a);return{...c,staleDisplay:c.staleDisplay??n.staleDisplay}}}async refineCapture(n,s,a,c){let d=n;if(a.display!==void 0&&!d.readFailed&&J(d.observation))d=await this.settleDisplayObservation(d.observation,s,{display:a.display,signal:a.signal});if(!a.deferPostActionScreenshot)d=await this.finalizePostActionCapture(d,{...a,perf:c});return d}async takeObservation(n,s,a){let c=a.perf??new B,d=a.postActionObserveScreen??this.observeScreen,l=a.actionStartTime??0,u=mn(s?.viewHierarchy),p=(b)=>Z(b,l,a.changeExpected,u),f=await this.capturePostActionObservation(d,{freshness:"fresh",display:a.display,queryOptions:a.queryOptions,perf:c,minTimestamp:l,signal:a.signal,...ac},p,n);if(!f.readFailed&&p(f.observation))ee(f.observation,l);f=await this.refineCapture(f,d,a,c);let m=f.observation,h=n;if(f.staleDisplay)h.staleDisplay=f.staleDisplay;let A=a.changeExpected?IF(s?.viewHierarchy,m.viewHierarchy):null;if(re(h,A),ie(m,a.gfxMetrics,c),h.observation=m,a.predictionContext)await this.predictionAnalyzer.recordOutcomeForAction(s,m,a.predictionContext);return W(h)}async verifyAndroidHomeForeground(n={}){return new N({window:this.window,adb:this.adb,deviceId:this.device.deviceId,formFactor:this.device.formFactor,timer:this.timer}).verify(n)}}var Ht={rawCoordinateGesture:{changeExpected:!1},selectorResolvedGesture:{changeExpected:!1,resolvesTargetFromRead:!0},noTreeResolution:{usesObservationForResolution:!1,changeExpected:!1},textEdit:{usesObservationForResolution:!1,changeExpected:!1,skipUiStability:!0},appLaunch:{changeExpected:!1,skipPreviousObserve:!0,deferPostActionScreenshot:!0}},wt={immediate:100,brief:500,gesture:800,navigation:2000,systemUi:3000,lifecycle:5000,longGesture:8000,urlDispatch:12000};
3
+ export{Yy,N4,dQ,Yl,Zq,lQ,F4,Bu,Qq,Xx,uQ,zd,wF,ac,Jy,Zx,VA,eV,Qx,De,Ht,wt};
4
+
5
+ //# debugId=7BB6675D4FC9BC7064756E2164756E21
@@ -0,0 +1,4 @@
1
+ // @bun
2
+ import{Vl}from"./chunk-kbjq0qvb.js";import"./chunk-4xd6zs3y.js";import"./chunk-bn64x5z5.js";import"./chunk-4fgdhcwx.js";import"./chunk-6d3mmqxt.js";import"./chunk-sns0c35v.js";import"./chunk-h3n4adc6.js";import"./chunk-32jpxz2y.js";import"./chunk-79q5xsdc.js";import"./chunk-ggtd5x5a.js";import"./chunk-z8t0v07j.js";import"./chunk-mf9spd4g.js";export{Vl as SwipeOn};
3
+
4
+ //# debugId=491B424F37A74AEC64756E2164756E21
@@ -0,0 +1,5 @@
1
+ // @bun
2
+ import{i,l,e}from"./chunk-z8t0v07j.js";import{Py,QP,eA,Ay}from"./chunk-nwm2pq5v.js";var g=1e4,R$=1e4,y={getConfig:Py,resolveMode:QP,apply:eA,isEnabled:Ay};class h{intervalHandle=null;lastAppliedModes=new Map;inFlightApplies=new Map;pendingClaims=new Map;pending=null;timer;dependencies;stopped=!1;constructor(n=i,t=y){this.timer=n,this.dependencies=t}start(){if(this.intervalHandle)return;this.stopped=!1,this.intervalHandle=this.timer.setInterval(()=>{this.trigger()},g),this.trigger()}setScope(n){this.scope=n}scope;isEnabled(){return(this.dependencies.isEnabled??Ay)()&&(this.scope?.isEnabled?.()??!0)}async syncDevice(n){if(this.stopped||!this.isEnabled()||n.platform!=="android")return;try{let t=await this.dependencies.getConfig(n.sessionKey);if(!d(t)||this.stopped)return;let p=await this.dependencies.resolveMode(t);if(this.stopped)return;let a=this.inFlightApplies.get(n.deviceId);if(a){this.retryClaimAfter(a,n);return}await this.applyToDevice(n,p,t,(r)=>d(r)&&A(r,t))}catch(t){e.warn(`[Appearance] Failed to apply appearance on claim to ${n.deviceId}: ${t}`)}}retryClaimAfter(n,t){let p=this.pendingClaims.has(t.deviceId);if(this.pendingClaims.set(t.deviceId,t),p)return;let a=()=>{let r=this.pendingClaims.get(t.deviceId);if(this.pendingClaims.delete(t.deviceId),r&&!this.stopped)this.syncDevice(r)};n.then(a,a)}async stop(){if(this.stopped=!0,this.intervalHandle)this.timer.clearInterval(this.intervalHandle),this.intervalHandle=null;await this.pending,this.lastAppliedModes.clear()}async trigger(){if(this.stopped)return;if(!this.isEnabled())return;if(this.pending)return this.pending;return this.pending=this.tick().catch((n)=>{e.warn(`[Appearance] Host sync tick failed: ${n}`)}).finally(()=>{this.pending=null}),this.pending}async tick(){let n=this.scope?.getTargets()??this.ownTargets();if(this.stopped)return;let t=new Map;for(let p of n){if(this.stopped)return;try{let a=await this.dependencies.getConfig(p.sessionKey);if(this.stopped)return;if(!a.syncWithHost){this.lastAppliedModes.delete(p.deviceId);continue}let r=`${a.syncWithHost}:${a.defaultMode}`,s=t.get(r);if(!s)s=this.dependencies.resolveMode(a),t.set(r,s);let c=await s;if(this.stopped)return;if(this.isAlreadyApplied(p,c))continue;await this.applyToDevice(p,c,a,u(a))}catch(a){e.warn(`[Appearance] Failed to apply host sync mode to ${p.deviceId}: ${a}`)}}}async applyToDevice(n,t,p,a){if(!this.isEnabled())return;if(this.inFlightApplies.has(n.deviceId)){e.debug(`[Appearance] Skipping ${n.deviceId}: appearance apply still in flight`);return}let r=!1,s=this.applyIfStillOwed(n,t,a);if(this.inFlightApplies.set(n.deviceId,s),s.then(()=>{this.inFlightApplies.delete(n.deviceId)},(f)=>{if(this.inFlightApplies.delete(n.deviceId),r)e.warn(`[Appearance] Apply failed after deadline for ${n.deviceId}`,f)}),await l(s,{timer:this.timer,timeoutMs:this.dependencies.applyDeadlineMs??R$,label:`Appearance apply for ${n.deviceId}`,onTimeout:()=>{r=!0}})&&!this.stopped)this.lastAppliedModes.set(n.deviceId,{mode:t,incarnation:n.incarnation})}async applyIfStillOwed(n,t,p){if(this.scope?.beforeApply&&!this.skipReason(n))await this.scope.beforeApply(n);let a=this.skipReason(n);if(!a){let r=await this.dependencies.getConfig(n.sessionKey);a=this.skipReason(n)??(p(r)?void 0:"its holder's appearance config changed")}if(a)return e.debug(`[Appearance] Skipping ${n.deviceId}: ${a} before the apply`),!1;return await this.dependencies.apply(n,t),!0}skipReason(n){if(this.stopped)return"the scheduler stopped";if(!this.isEnabled())return"appearance sync was switched off";return this.isHeldBySameSession(n)?void 0:"its holder changed"}isHeldBySameSession(n){let t=(this.scope?.getTargets()??this.ownTargets()).find((p)=>p.deviceId===n.deviceId);return t!==void 0&&t.sessionKey===n.sessionKey}isAlreadyApplied(n,t){let p=this.lastAppliedModes.get(n.deviceId);return p?.mode===t&&(p.incarnation===void 0||n.incarnation===void 0||p.incarnation===n.incarnation)}ownTargets(){return this.dependencies.getTargets?.()??[]}}function d(n){return n.syncWithHost||n.applyOnConnect}function A(n,t){return n.syncWithHost===t.syncWithHost&&n.defaultMode===t.defaultMode}function u(n){return(t)=>t.syncWithHost&&t.defaultMode===n.defaultMode}var o=new h;function w2(n){if(n)o.setScope(n);o.start()}async function R2(){await o.stop()}async function P2(){await o.trigger()}async function A2(n){await o.syncDevice(n)}
3
+ export{R$,w2,R2,P2,A2};
4
+
5
+ //# debugId=12720799AF96618B64756E2164756E21
@@ -0,0 +1,4 @@
1
+ // @bun
2
+ import{S$}from"./chunk-r8z9pfve.js";import"./chunk-32jpxz2y.js";import"./chunk-z8t0v07j.js";import"./chunk-mf9spd4g.js";export{S$ as DefaultDatabaseInitializer};
3
+
4
+ //# debugId=DDB6700469574F9E64756E2164756E21
@@ -0,0 +1,15 @@
1
+ // @bun
2
+ import{Cr,v,tn,M,Zt,Qt,_t,G,we,ek,na,Br,gs,k3,Zv,ar,Ore,_o,_}from"./chunk-h3n4adc6.js";import{Jl,YA,yo,pn,Qy,PV,wa,Uc}from"./chunk-6d3mmqxt.js";import{i,Qm,nr,e}from"./chunk-z8t0v07j.js";import{r,t}from"./chunk-9rkfyt6q.js";import{Lt,O,vt}from"./chunk-2v7tw1nj.js";var oe=O(function(dn,Le){var Me=vt("util"),se=vt("stream"),L=Le.exports=function(){se.call(this),this._buffers=[],this._buffered=0,this._reads=[],this._paused=!1,this._encoding="utf8",this.writable=!0};Me.inherits(L,se);L.prototype.read=function(n,s){this._reads.push({length:Math.abs(n),allowLess:n<0,func:s}),process.nextTick(function(){if(this._process(),this._paused&&this._reads&&this._reads.length>0)this._paused=!1,this.emit("drain")}.bind(this))};L.prototype.write=function(n,s){if(!this.writable)return this.emit("error",Error("Stream not writable")),!1;let o;if(Buffer.isBuffer(n))o=n;else o=Buffer.from(n,s||this._encoding);if(this._buffers.push(o),this._buffered+=o.length,this._process(),this._reads&&this._reads.length===0)this._paused=!0;return this.writable&&!this._paused};L.prototype.end=function(n,s){if(n)this.write(n,s);if(this.writable=!1,!this._buffers)return;if(this._buffers.length===0)this._end();else this._buffers.push(null),this._process()};L.prototype.destroySoon=L.prototype.end;L.prototype._end=function(){if(this._reads.length>0)this.emit("error",Error("Unexpected end of input"));this.destroy()};L.prototype.destroy=function(){if(!this._buffers)return;this.writable=!1,this._reads=null,this._buffers=null,this.emit("close")};L.prototype._processReadAllowingLess=function(n){this._reads.shift();let s=this._buffers[0];if(s.length>n.length)this._buffered-=n.length,this._buffers[0]=s.slice(n.length),n.func.call(this,s.slice(0,n.length));else this._buffered-=s.length,this._buffers.shift(),n.func.call(this,s)};L.prototype._processRead=function(n){this._reads.shift();let s=0,o=0,a=Buffer.alloc(n.length);while(s<n.length){let l=this._buffers[o++],c=Math.min(l.length,n.length-s);if(l.copy(a,s,0,c),s+=c,c!==l.length)this._buffers[--o]=l.slice(c)}if(o>0)this._buffers.splice(0,o);this._buffered-=n.length,n.func.call(this,a)};L.prototype._process=function(){try{while(this._buffered>0&&this._reads&&this._reads.length>0){let n=this._reads[0];if(n.allowLess)this._processReadAllowingLess(n);else if(this._buffered>=n.length)this._processRead(n);else break}if(this._buffers&&!this.writable)this._end()}catch(n){this.emit("error",n)}}});var ae=O(function(hr){var D=[{x:[0],y:[0]},{x:[4],y:[0]},{x:[0,4],y:[4]},{x:[2,6],y:[0,4]},{x:[0,2,4,6],y:[2,6]},{x:[1,3,5,7],y:[0,2,4,6]},{x:[0,1,2,3,4,5,6,7],y:[1,3,5,7]}];hr.getImagePasses=function(n,s){let o=[],a=n%8,l=s%8,c=(n-a)/8,h=(s-l)/8;for(let u=0;u<D.length;u++){let f=D[u],d=c*f.x.length,p=h*f.y.length;for(let g=0;g<f.x.length;g++)if(f.x[g]<a)d++;else break;for(let g=0;g<f.y.length;g++)if(f.y[g]<l)p++;else break;if(d>0&&p>0)o.push({width:d,height:p,index:u})}return o};hr.getInterlaceIterator=function(n){return function(s,o,a){let l=s%D[a].x.length,c=(s-l)/D[a].x.length*8+D[a].x[l],h=o%D[a].y.length,u=(o-h)/D[a].y.length*8+D[a].y[h];return c*4+u*n*4}}});var le=O(function(gn,Fe){Fe.exports=function(s,o,a){let l=s+o-a,c=Math.abs(l-s),h=Math.abs(l-o),u=Math.abs(l-a);if(c<=h&&c<=u)return s;if(h<=u)return o;return a}});var ce=O(function(bn,Ue){var Ne=ae(),dr=le();function De(n,s,o){let a=n*s;if(o!==8)a=Math.ceil(a/(8/o));return a}var q=Ue.exports=function(n,s){let{width:o,height:a,interlace:l,bpp:c,depth:h}=n;if(this.read=s.read,this.write=s.write,this.complete=s.complete,this._imageIndex=0,this._images=[],l){let u=Ne.getImagePasses(o,a);for(let f=0;f<u.length;f++)this._images.push({byteWidth:De(u[f].width,c,h),height:u[f].height,lineIndex:0})}else this._images.push({byteWidth:De(o,c,h),height:a,lineIndex:0});if(h===8)this._xComparison=c;else if(h===16)this._xComparison=c*2;else this._xComparison=1};q.prototype.start=function(){this.read(this._images[this._imageIndex].byteWidth+1,this._reverseFilterLine.bind(this))};q.prototype._unFilterType1=function(n,s,o){let a=this._xComparison,l=a-1;for(let c=0;c<o;c++){let h=n[1+c],u=c>l?s[c-a]:0;s[c]=h+u}};q.prototype._unFilterType2=function(n,s,o){let a=this._lastLine;for(let l=0;l<o;l++){let c=n[1+l],h=a?a[l]:0;s[l]=c+h}};q.prototype._unFilterType3=function(n,s,o){let a=this._xComparison,l=a-1,c=this._lastLine;for(let h=0;h<o;h++){let u=n[1+h],f=c?c[h]:0,d=h>l?s[h-a]:0,p=Math.floor((d+f)/2);s[h]=u+p}};q.prototype._unFilterType4=function(n,s,o){let a=this._xComparison,l=a-1,c=this._lastLine;for(let h=0;h<o;h++){let u=n[1+h],f=c?c[h]:0,d=h>l?s[h-a]:0,p=h>l&&c?c[h-a]:0,g=dr(d,f,p);s[h]=u+g}};q.prototype._reverseFilterLine=function(n){let s=n[0],o,a=this._images[this._imageIndex],l=a.byteWidth;if(s===0)o=n.slice(1,l+1);else switch(o=Buffer.alloc(l),s){case 1:this._unFilterType1(n,o,l);break;case 2:this._unFilterType2(n,o,l);break;case 3:this._unFilterType3(n,o,l);break;case 4:this._unFilterType4(n,o,l);break;default:throw Error("Unrecognised filter type - "+s)}if(this.write(o),a.lineIndex++,a.lineIndex>=a.height)this._lastLine=null,this._imageIndex++,a=this._images[this._imageIndex];else this._lastLine=o;if(a)this.read(a.byteWidth+1,this._reverseFilterLine.bind(this));else this._lastLine=null,this.complete()}});var ze=O(function(wn,$e){var Ve=vt("util"),he=oe(),pr=ce(),mr=$e.exports=function(n){he.call(this);let s=[],o=this;this._filter=new pr(n,{read:this.read.bind(this),write:function(a){s.push(a)},complete:function(){o.emit("complete",Buffer.concat(s))}}),this._filter.start()};Ve.inherits(mr,he)});var W=O(function(yn,He){He.exports={PNG_SIGNATURE:[137,80,78,71,13,10,26,10],TYPE_IHDR:1229472850,TYPE_IEND:1229278788,TYPE_IDAT:1229209940,TYPE_PLTE:1347179589,TYPE_tRNS:1951551059,TYPE_gAMA:1732332865,COLORTYPE_GRAYSCALE:0,COLORTYPE_PALETTE:1,COLORTYPE_COLOR:2,COLORTYPE_ALPHA:4,COLORTYPE_PALETTE_COLOR:3,COLORTYPE_COLOR_ALPHA:6,COLORTYPE_TO_BPP_MAP:{0:1,2:3,3:1,4:2,6:4},GAMMA_DIVISION:1e5}});var de=O(function(Sn,qe){var ue=[];(function(){for(let n=0;n<256;n++){let s=n;for(let o=0;o<8;o++)if(s&1)s=3988292384^s>>>1;else s=s>>>1;ue[n]=s}})();var fe=qe.exports=function(){this._crc=-1};fe.prototype.write=function(n){for(let s=0;s<n.length;s++)this._crc=ue[(this._crc^n[s])&255]^this._crc>>>8;return!0};fe.prototype.crc32=function(){return this._crc^-1};fe.crc32=function(n){let s=-1;for(let o=0;o<n.length;o++)s=ue[(s^n[o])&255]^s>>>8;return s^-1}});var pe=O(function(_n,We){var w=W(),gr=de(),I=We.exports=function(n,s){this._options=n,n.checkCRC=n.checkCRC!==!1,this._hasIHDR=!1,this._hasIEND=!1,this._emittedHeadersFinished=!1,this._palette=[],this._colorType=0,this._chunks={},this._chunks[w.TYPE_IHDR]=this._handleIHDR.bind(this),this._chunks[w.TYPE_IEND]=this._handleIEND.bind(this),this._chunks[w.TYPE_IDAT]=this._handleIDAT.bind(this),this._chunks[w.TYPE_PLTE]=this._handlePLTE.bind(this),this._chunks[w.TYPE_tRNS]=this._handleTRNS.bind(this),this._chunks[w.TYPE_gAMA]=this._handleGAMA.bind(this),this.read=s.read,this.error=s.error,this.metadata=s.metadata,this.gamma=s.gamma,this.transColor=s.transColor,this.palette=s.palette,this.parsed=s.parsed,this.inflateData=s.inflateData,this.finished=s.finished,this.simpleTransparency=s.simpleTransparency,this.headersFinished=s.headersFinished||function(){}};I.prototype.start=function(){this.read(w.PNG_SIGNATURE.length,this._parseSignature.bind(this))};I.prototype._parseSignature=function(n){let s=w.PNG_SIGNATURE;for(let o=0;o<s.length;o++)if(n[o]!==s[o]){this.error(Error("Invalid file signature"));return}this.read(8,this._parseChunkBegin.bind(this))};I.prototype._parseChunkBegin=function(n){let s=n.readUInt32BE(0),o=n.readUInt32BE(4),a="";for(let c=4;c<8;c++)a+=String.fromCharCode(n[c]);let l=Boolean(n[4]&32);if(!this._hasIHDR&&o!==w.TYPE_IHDR){this.error(Error("Expected IHDR on beggining"));return}if(this._crc=new gr,this._crc.write(Buffer.from(a)),this._chunks[o])return this._chunks[o](s);if(!l){this.error(Error("Unsupported critical chunk type "+a));return}this.read(s+4,this._skipChunk.bind(this))};I.prototype._skipChunk=function(){this.read(8,this._parseChunkBegin.bind(this))};I.prototype._handleChunkEnd=function(){this.read(4,this._parseChunkEnd.bind(this))};I.prototype._parseChunkEnd=function(n){let s=n.readInt32BE(0),o=this._crc.crc32();if(this._options.checkCRC&&o!==s){this.error(Error("Crc error - "+s+" - "+o));return}if(!this._hasIEND)this.read(8,this._parseChunkBegin.bind(this))};I.prototype._handleIHDR=function(n){this.read(n,this._parseIHDR.bind(this))};I.prototype._parseIHDR=function(n){this._crc.write(n);let s=n.readUInt32BE(0),o=n.readUInt32BE(4),a=n[8],l=n[9],c=n[10],h=n[11],u=n[12];if(a!==8&&a!==4&&a!==2&&a!==1&&a!==16){this.error(Error("Unsupported bit depth "+a));return}if(!(l in w.COLORTYPE_TO_BPP_MAP)){this.error(Error("Unsupported color type"));return}if(c!==0){this.error(Error("Unsupported compression method"));return}if(h!==0){this.error(Error("Unsupported filter method"));return}if(u!==0&&u!==1){this.error(Error("Unsupported interlace method"));return}this._colorType=l;let f=w.COLORTYPE_TO_BPP_MAP[this._colorType];this._hasIHDR=!0,this.metadata({width:s,height:o,depth:a,interlace:Boolean(u),palette:Boolean(l&w.COLORTYPE_PALETTE),color:Boolean(l&w.COLORTYPE_COLOR),alpha:Boolean(l&w.COLORTYPE_ALPHA),bpp:f,colorType:l}),this._handleChunkEnd()};I.prototype._handlePLTE=function(n){this.read(n,this._parsePLTE.bind(this))};I.prototype._parsePLTE=function(n){this._crc.write(n);let s=Math.floor(n.length/3);for(let o=0;o<s;o++)this._palette.push([n[o*3],n[o*3+1],n[o*3+2],255]);this.palette(this._palette),this._handleChunkEnd()};I.prototype._handleTRNS=function(n){this.simpleTransparency(),this.read(n,this._parseTRNS.bind(this))};I.prototype._parseTRNS=function(n){if(this._crc.write(n),this._colorType===w.COLORTYPE_PALETTE_COLOR){if(this._palette.length===0){this.error(Error("Transparency chunk must be after palette"));return}if(n.length>this._palette.length){this.error(Error("More transparent colors than palette size"));return}for(let s=0;s<n.length;s++)this._palette[s][3]=n[s];this.palette(this._palette)}if(this._colorType===w.COLORTYPE_GRAYSCALE)this.transColor([n.readUInt16BE(0)]);if(this._colorType===w.COLORTYPE_COLOR)this.transColor([n.readUInt16BE(0),n.readUInt16BE(2),n.readUInt16BE(4)]);this._handleChunkEnd()};I.prototype._handleGAMA=function(n){this.read(n,this._parseGAMA.bind(this))};I.prototype._parseGAMA=function(n){this._crc.write(n),this.gamma(n.readUInt32BE(0)/w.GAMMA_DIVISION),this._handleChunkEnd()};I.prototype._handleIDAT=function(n){if(!this._emittedHeadersFinished)this._emittedHeadersFinished=!0,this.headersFinished();this.read(-n,this._parseIDAT.bind(this,n))};I.prototype._parseIDAT=function(n,s){if(this._crc.write(s),this._colorType===w.COLORTYPE_PALETTE_COLOR&&this._palette.length===0)throw Error("Expected palette not found");this.inflateData(s);let o=n-s.length;if(o>0)this._handleIDAT(o);else this._handleChunkEnd()};I.prototype._handleIEND=function(n){this.read(n,this._parseIEND.bind(this))};I.prototype._parseIEND=function(n){if(this._crc.write(n),this._hasIEND=!0,this._handleChunkEnd(),this.finished)this.finished()}});var me=O(function(Er){var Z=ae(),br=[function(){},function(n,s,o,a){if(a===s.length)throw Error("Ran out of data");let l=s[a];n[o]=l,n[o+1]=l,n[o+2]=l,n[o+3]=255},function(n,s,o,a){if(a+1>=s.length)throw Error("Ran out of data");let l=s[a];n[o]=l,n[o+1]=l,n[o+2]=l,n[o+3]=s[a+1]},function(n,s,o,a){if(a+2>=s.length)throw Error("Ran out of data");n[o]=s[a],n[o+1]=s[a+1],n[o+2]=s[a+2],n[o+3]=255},function(n,s,o,a){if(a+3>=s.length)throw Error("Ran out of data");n[o]=s[a],n[o+1]=s[a+1],n[o+2]=s[a+2],n[o+3]=s[a+3]}],wr=[function(){},function(n,s,o,a){let l=s[0];n[o]=l,n[o+1]=l,n[o+2]=l,n[o+3]=a},function(n,s,o){let a=s[0];n[o]=a,n[o+1]=a,n[o+2]=a,n[o+3]=s[1]},function(n,s,o,a){n[o]=s[0],n[o+1]=s[1],n[o+2]=s[2],n[o+3]=a},function(n,s,o){n[o]=s[0],n[o+1]=s[1],n[o+2]=s[2],n[o+3]=s[3]}];function yr(n,s){let o=[],a=0;function l(){if(a===n.length)throw Error("Ran out of data");let c=n[a];a++;let h,u,f,d,p,g,m,b;switch(s){default:throw Error("unrecognised depth");case 16:m=n[a],a++,o.push((c<<8)+m);break;case 4:m=c&15,b=c>>4,o.push(b,m);break;case 2:p=c&3,g=c>>2&3,m=c>>4&3,b=c>>6&3,o.push(b,m,g,p);break;case 1:h=c&1,u=c>>1&1,f=c>>2&1,d=c>>3&1,p=c>>4&1,g=c>>5&1,m=c>>6&1,b=c>>7&1,o.push(b,m,g,p,d,f,u,h);break}}return{get:function(c){while(o.length<c)l();let h=o.slice(0,c);return o=o.slice(c),h},resetAfterLine:function(){o.length=0},end:function(){if(a!==n.length)throw Error("extra data found")}}}function Sr(n,s,o,a,l,c){let{width:h,height:u,index:f}=n;for(let d=0;d<u;d++)for(let p=0;p<h;p++){let g=o(p,d,f);br[a](s,l,g,c),c+=a}return c}function _r(n,s,o,a,l,c){let{width:h,height:u,index:f}=n;for(let d=0;d<u;d++){for(let p=0;p<h;p++){let g=l.get(a),m=o(p,d,f);wr[a](s,g,m,c)}l.resetAfterLine()}}Er.dataToBitMap=function(n,s){let{width:o,height:a,depth:l,bpp:c,interlace:h}=s,u;if(l!==8)u=yr(n,l);let f;if(l<=8)f=Buffer.alloc(o*a*4);else f=new Uint16Array(o*a*4);let d=Math.pow(2,l)-1,p=0,g,m;if(h)g=Z.getImagePasses(o,a),m=Z.getInterlaceIterator(o,a);else{let b=0;m=function(){let S=b;return b+=4,S},g=[{width:o,height:a}]}for(let b=0;b<g.length;b++)if(l===8)p=Sr(g[b],f,m,c,n,p);else _r(g[b],f,m,c,u,d);if(l===8){if(p!==n.length)throw Error("extra data found")}else u.end();return f}});var ge=O(function(Tn,Ye){function kr(n,s,o,a,l){let c=0;for(let h=0;h<a;h++)for(let u=0;u<o;u++){let f=l[n[c]];if(!f)throw Error("index "+n[c]+" not in palette");for(let d=0;d<4;d++)s[c+d]=f[d];c+=4}}function Ir(n,s,o,a,l){let c=0;for(let h=0;h<a;h++)for(let u=0;u<o;u++){let f=!1;if(l.length===1){if(l[0]===n[c])f=!0}else if(l[0]===n[c]&&l[1]===n[c+1]&&l[2]===n[c+2])f=!0;if(f)for(let d=0;d<4;d++)s[c+d]=0;c+=4}}function xr(n,s,o,a,l){let c=255,h=Math.pow(2,l)-1,u=0;for(let f=0;f<a;f++)for(let d=0;d<o;d++){for(let p=0;p<4;p++)s[u+p]=Math.floor(n[u+p]*c/h+0.5);u+=4}}Ye.exports=function(n,s,o=!1){let{depth:a,width:l,height:c,colorType:h,transColor:u,palette:f}=s,d=n;if(h===3)kr(n,d,l,c,f);else{if(u)Ir(n,d,l,c,u);if(a!==8&&!o){if(a===16)d=Buffer.alloc(l*c*4);xr(n,d,l,c,a)}}return d}});var Xe=O(function(Cn,Ke){var Ge=vt("util"),Y=vt("zlib"),be=oe(),Or=ze(),vr=pe(),je=me(),Ar=ge(),F=Ke.exports=function(n){be.call(this),this._parser=new vr(n,{read:this.read.bind(this),error:this._handleError.bind(this),metadata:this._handleMetaData.bind(this),gamma:this.emit.bind(this,"gamma"),palette:this._handlePalette.bind(this),transColor:this._handleTransColor.bind(this),finished:this._finished.bind(this),inflateData:this._inflateData.bind(this),simpleTransparency:this._simpleTransparency.bind(this),headersFinished:this._headersFinished.bind(this)}),this._options=n,this.writable=!0,this._parser.start()};Ge.inherits(F,be);F.prototype._handleError=function(n){if(this.emit("error",n),this.writable=!1,this.destroy(),this._inflate&&this._inflate.destroy)this._inflate.destroy();if(this._filter)this._filter.destroy(),this._filter.on("error",function(){});this.errord=!0};F.prototype._inflateData=function(n){if(!this._inflate)if(this._bitmapInfo.interlace)this._inflate=Y.createInflate(),this._inflate.on("error",this.emit.bind(this,"error")),this._filter.on("complete",this._complete.bind(this)),this._inflate.pipe(this._filter);else{let o=((this._bitmapInfo.width*this._bitmapInfo.bpp*this._bitmapInfo.depth+7>>3)+1)*this._bitmapInfo.height,a=Math.max(o,Y.Z_MIN_CHUNK);this._inflate=Y.createInflate({chunkSize:a});let l=o,c=this.emit.bind(this,"error");this._inflate.on("error",function(u){if(!l)return;c(u)}),this._filter.on("complete",this._complete.bind(this));let h=this._filter.write.bind(this._filter);this._inflate.on("data",function(u){if(!l)return;if(u.length>l)u=u.slice(0,l);l-=u.length,h(u)}),this._inflate.on("end",this._filter.end.bind(this._filter))}this._inflate.write(n)};F.prototype._handleMetaData=function(n){this._metaData=n,this._bitmapInfo=Object.create(n),this._filter=new Or(this._bitmapInfo)};F.prototype._handleTransColor=function(n){this._bitmapInfo.transColor=n};F.prototype._handlePalette=function(n){this._bitmapInfo.palette=n};F.prototype._simpleTransparency=function(){this._metaData.alpha=!0};F.prototype._headersFinished=function(){this.emit("metadata",this._metaData)};F.prototype._finished=function(){if(this.errord)return;if(!this._inflate)this.emit("error","No Inflate block");else this._inflate.end()};F.prototype._complete=function(n){if(this.errord)return;let s;try{let o=je.dataToBitMap(n,this._bitmapInfo);s=Ar(o,this._bitmapInfo,this._options.skipRescale),o=null}catch(o){this._handleError(o);return}this.emit("parsed",s)}});var Je=O(function(kn,Ze){var k=W();Ze.exports=function(n,s,o,a){let l=[k.COLORTYPE_COLOR_ALPHA,k.COLORTYPE_ALPHA].indexOf(a.colorType)!==-1;if(a.colorType===a.inputColorType){let S=function(){let C=new ArrayBuffer(2);return new DataView(C).setInt16(0,256,!0),new Int16Array(C)[0]!==256}();if(a.bitDepth===8||a.bitDepth===16&&S)return n}let c=a.bitDepth!==16?n:new Uint16Array(n.buffer),h=255,u=k.COLORTYPE_TO_BPP_MAP[a.inputColorType];if(u===4&&!a.inputHasAlpha)u=3;let f=k.COLORTYPE_TO_BPP_MAP[a.colorType];if(a.bitDepth===16)h=65535,f*=2;let d=Buffer.alloc(s*o*f),p=0,g=0,m=a.bgColor||{};if(m.red===void 0)m.red=h;if(m.green===void 0)m.green=h;if(m.blue===void 0)m.blue=h;function b(){let S,C,y,T=h;switch(a.inputColorType){case k.COLORTYPE_COLOR_ALPHA:T=c[p+3],S=c[p],C=c[p+1],y=c[p+2];break;case k.COLORTYPE_COLOR:S=c[p],C=c[p+1],y=c[p+2];break;case k.COLORTYPE_ALPHA:T=c[p+1],S=c[p],C=S,y=S;break;case k.COLORTYPE_GRAYSCALE:S=c[p],C=S,y=S;break;default:throw Error("input color type:"+a.inputColorType+" is not supported at present")}if(a.inputHasAlpha){if(!l)T/=h,S=Math.min(Math.max(Math.round((1-T)*m.red+T*S),0),h),C=Math.min(Math.max(Math.round((1-T)*m.green+T*C),0),h),y=Math.min(Math.max(Math.round((1-T)*m.blue+T*y),0),h)}return{red:S,green:C,blue:y,alpha:T}}for(let S=0;S<o;S++)for(let C=0;C<s;C++){let y=b(c,p);switch(a.colorType){case k.COLORTYPE_COLOR_ALPHA:case k.COLORTYPE_COLOR:if(a.bitDepth===8){if(d[g]=y.red,d[g+1]=y.green,d[g+2]=y.blue,l)d[g+3]=y.alpha}else if(d.writeUInt16BE(y.red,g),d.writeUInt16BE(y.green,g+2),d.writeUInt16BE(y.blue,g+4),l)d.writeUInt16BE(y.alpha,g+6);break;case k.COLORTYPE_ALPHA:case k.COLORTYPE_GRAYSCALE:{let T=(y.red+y.green+y.blue)/3;if(a.bitDepth===8){if(d[g]=T,l)d[g+1]=y.alpha}else if(d.writeUInt16BE(T,g),l)d.writeUInt16BE(y.alpha,g+2);break}default:throw Error("unrecognised color Type "+a.colorType)}p+=u,g+=f}return d}});var tt=O(function(In,et){var Qe=le();function Rr(n,s,o,a,l){for(let c=0;c<o;c++)a[l+c]=n[s+c]}function Pr(n,s,o){let a=0,l=s+o;for(let c=s;c<l;c++)a+=Math.abs(n[c]);return a}function Mr(n,s,o,a,l,c){for(let h=0;h<o;h++){let u=h>=c?n[s+h-c]:0,f=n[s+h]-u;a[l+h]=f}}function Lr(n,s,o,a){let l=0;for(let c=0;c<o;c++){let h=c>=a?n[s+c-a]:0,u=n[s+c]-h;l+=Math.abs(u)}return l}function Fr(n,s,o,a,l){for(let c=0;c<o;c++){let h=s>0?n[s+c-o]:0,u=n[s+c]-h;a[l+c]=u}}function Dr(n,s,o){let a=0,l=s+o;for(let c=s;c<l;c++){let h=s>0?n[c-o]:0,u=n[c]-h;a+=Math.abs(u)}return a}function Nr(n,s,o,a,l,c){for(let h=0;h<o;h++){let u=h>=c?n[s+h-c]:0,f=s>0?n[s+h-o]:0,d=n[s+h]-(u+f>>1);a[l+h]=d}}function Ur(n,s,o,a){let l=0;for(let c=0;c<o;c++){let h=c>=a?n[s+c-a]:0,u=s>0?n[s+c-o]:0,f=n[s+c]-(h+u>>1);l+=Math.abs(f)}return l}function Vr(n,s,o,a,l,c){for(let h=0;h<o;h++){let u=h>=c?n[s+h-c]:0,f=s>0?n[s+h-o]:0,d=s>0&&h>=c?n[s+h-(o+c)]:0,p=n[s+h]-Qe(u,f,d);a[l+h]=p}}function $r(n,s,o,a){let l=0;for(let c=0;c<o;c++){let h=c>=a?n[s+c-a]:0,u=s>0?n[s+c-o]:0,f=s>0&&c>=a?n[s+c-(o+a)]:0,d=n[s+c]-Qe(h,u,f);l+=Math.abs(d)}return l}var zr={0:Rr,1:Mr,2:Fr,3:Nr,4:Vr},Hr={0:Pr,1:Lr,2:Dr,3:Ur,4:$r};et.exports=function(n,s,o,a,l){let c;if(!("filterType"in a)||a.filterType===-1)c=[0,1,2,3,4];else if(typeof a.filterType==="number")c=[a.filterType];else throw Error("unrecognised filter types");if(a.bitDepth===16)l*=2;let h=s*l,u=0,f=0,d=Buffer.alloc((h+1)*o),p=c[0];for(let g=0;g<o;g++){if(c.length>1){let m=1/0;for(let b=0;b<c.length;b++){let S=Hr[c[b]](n,f,h,l);if(S<m)p=c[b],m=S}}d[u]=p,u++,zr[p](n,f,h,d,u,l),u+=h,f+=h}return d}});var ye=O(function(xn,nt){var E=W(),rt=de(),qr=Je(),Wr=tt(),it=vt("zlib"),N=nt.exports=function(n){if(this._options=n,n.deflateChunkSize=n.deflateChunkSize||32768,n.deflateLevel=n.deflateLevel!=null?n.deflateLevel:9,n.deflateStrategy=n.deflateStrategy!=null?n.deflateStrategy:3,n.inputHasAlpha=n.inputHasAlpha!=null?n.inputHasAlpha:!0,n.deflateFactory=n.deflateFactory||it.createDeflate,n.bitDepth=n.bitDepth||8,n.colorType=typeof n.colorType==="number"?n.colorType:E.COLORTYPE_COLOR_ALPHA,n.inputColorType=typeof n.inputColorType==="number"?n.inputColorType:E.COLORTYPE_COLOR_ALPHA,[E.COLORTYPE_GRAYSCALE,E.COLORTYPE_COLOR,E.COLORTYPE_COLOR_ALPHA,E.COLORTYPE_ALPHA].indexOf(n.colorType)===-1)throw Error("option color type:"+n.colorType+" is not supported at present");if([E.COLORTYPE_GRAYSCALE,E.COLORTYPE_COLOR,E.COLORTYPE_COLOR_ALPHA,E.COLORTYPE_ALPHA].indexOf(n.inputColorType)===-1)throw Error("option input color type:"+n.inputColorType+" is not supported at present");if(n.bitDepth!==8&&n.bitDepth!==16)throw Error("option bit depth:"+n.bitDepth+" is not supported at present")};N.prototype.getDeflateOptions=function(){return{chunkSize:this._options.deflateChunkSize,level:this._options.deflateLevel,strategy:this._options.deflateStrategy}};N.prototype.createDeflate=function(){return this._options.deflateFactory(this.getDeflateOptions())};N.prototype.filterData=function(n,s,o){let a=qr(n,s,o,this._options),l=E.COLORTYPE_TO_BPP_MAP[this._options.colorType];return Wr(a,s,o,this._options,l)};N.prototype._packChunk=function(n,s){let o=s?s.length:0,a=Buffer.alloc(o+12);if(a.writeUInt32BE(o,0),a.writeUInt32BE(n,4),s)s.copy(a,8);return a.writeInt32BE(rt.crc32(a.slice(4,a.length-4)),a.length-4),a};N.prototype.packGAMA=function(n){let s=Buffer.alloc(4);return s.writeUInt32BE(Math.floor(n*E.GAMMA_DIVISION),0),this._packChunk(E.TYPE_gAMA,s)};N.prototype.packIHDR=function(n,s){let o=Buffer.alloc(13);return o.writeUInt32BE(n,0),o.writeUInt32BE(s,4),o[8]=this._options.bitDepth,o[9]=this._options.colorType,o[10]=0,o[11]=0,o[12]=0,this._packChunk(E.TYPE_IHDR,o)};N.prototype.packIDAT=function(n){return this._packChunk(E.TYPE_IDAT,n)};N.prototype.packIEND=function(){return this._packChunk(E.TYPE_IEND,null)}});var ct=O(function(On,lt){var st=vt("util"),Se=vt("stream"),ot=W(),Yr=ye(),at=lt.exports=function(n){Se.call(this);let s=n||{};this._packer=new Yr(s),this._deflate=this._packer.createDeflate(),this.readable=!0};st.inherits(at,Se);at.prototype.pack=function(n,s,o,a){if(this.emit("data",Buffer.from(ot.PNG_SIGNATURE)),this.emit("data",this._packer.packIHDR(s,o)),a)this.emit("data",this._packer.packGAMA(a));let l=this._packer.filterData(n,s,o);this._deflate.on("error",this.emit.bind(this,"error")),this._deflate.on("data",function(c){this.emit("data",this._packer.packIDAT(c))}.bind(this)),this._deflate.on("end",function(){this.emit("data",this._packer.packIEND()),this.emit("end")}.bind(this)),this._deflate.end(l)}});var gt=O(function(j,mt){var ht=vt("assert").ok,P=vt("zlib"),dt=vt("util"),ut=vt("buffer").kMaxLength;function V(n){if(!(this instanceof V))return new V(n);if(n&&n.chunkSize<P.Z_MIN_CHUNK)n.chunkSize=P.Z_MIN_CHUNK;if(P.Inflate.call(this,n),this._offset=this._offset===void 0?this._outOffset:this._offset,this._buffer=this._buffer||this._outBuffer,n&&n.maxLength!=null)this._maxLength=n.maxLength}function Gr(n){return new V(n)}function ft(n,s){if(s)process.nextTick(s);if(!n._handle)return;n._handle.close(),n._handle=null}V.prototype._processChunk=function(n,s,o){if(typeof o==="function")return P.Inflate._processChunk.call(this,n,s,o);let a=this,l=n&&n.length,c=this._chunkSize-this._offset,h=this._maxLength,u=0,f=[],d=0,p;this.on("error",function(S){p=S});function g(S,C){if(a._hadError)return;let y=c-C;if(ht(y>=0,"have should not go down"),y>0){let T=a._buffer.slice(a._offset,a._offset+y);if(a._offset+=y,T.length>h)T=T.slice(0,h);if(f.push(T),d+=T.length,h-=T.length,h===0)return!1}if(C===0||a._offset>=a._chunkSize)c=a._chunkSize,a._offset=0,a._buffer=Buffer.allocUnsafe(a._chunkSize);if(C===0)return u+=l-S,l=S,!0;return!1}ht(this._handle,"zlib binding closed");let m;do m=this._handle.writeSync(s,n,u,l,this._buffer,this._offset,c),m=m||this._writeState;while(!this._hadError&&g(m[0],m[1]));if(this._hadError)throw p;if(d>=ut)throw ft(this),RangeError("Cannot create final Buffer. It would be larger than 0x"+ut.toString(16)+" bytes");let b=Buffer.concat(f,d);return ft(this),b};dt.inherits(V,P.Inflate);function jr(n,s){if(typeof s==="string")s=Buffer.from(s);if(!(s instanceof Buffer))throw TypeError("Not a string or buffer");let o=n._finishFlushFlag;if(o==null)o=P.Z_FINISH;return n._processChunk(s,o)}function pt(n,s){return jr(new V(s),n)}mt.exports=j=pt;j.Inflate=V;j.createInflate=Gr;j.inflateSync=pt});var _e=O(function(vn,wt){var bt=wt.exports=function(n){this._buffer=n,this._reads=[]};bt.prototype.read=function(n,s){this._reads.push({length:Math.abs(n),allowLess:n<0,func:s})};bt.prototype.process=function(){while(this._reads.length>0&&this._buffer.length){let n=this._reads[0];if(this._buffer.length&&(this._buffer.length>=n.length||n.allowLess)){this._reads.shift();let s=this._buffer;this._buffer=s.slice(n.length),n.func.call(this,s.slice(0,n.length))}else break}if(this._reads.length>0)throw Error("There are some read requests waitng on finished stream");if(this._buffer.length>0)throw Error("unrecognised content at end of stream")}});var yt=O(function(Zr){var Kr=_e(),Xr=ce();Zr.process=function(n,s){let o=[],a=new Kr(n);return new Xr(s,{read:a.read.bind(a),write:function(c){o.push(c)},complete:function(){}}).start(),a.process(),Buffer.concat(o)}});var kt=O(function(Rn,Ct){var St=!0,J=vt("zlib"),Qr=gt();if(!J.deflateSync)St=!1;var ei=_e(),Et=yt(),ti=pe(),Tt=me(),ri=ge();Ct.exports=function(n,s){if(!St)throw Error("To use the sync capability of this library in old node versions, please pin pngjs to v2.3.0");let o;function a(R){o=R}let l;function c(R){l=R}function h(R){l.transColor=R}function u(R){l.palette=R}function f(){l.alpha=!0}let d;function p(R){d=R}let g=[];function m(R){g.push(R)}let b=new ei(n);if(new ti(s,{read:b.read.bind(b),error:a,metadata:c,gamma:p,palette:u,transColor:h,inflateData:m,simpleTransparency:f}).start(),b.process(),o)throw o;let C=Buffer.concat(g);g.length=0;let y;if(l.interlace)y=J.inflateSync(C);else{let H=((l.width*l.bpp*l.depth+7>>3)+1)*l.height;y=Qr(C,{chunkSize:H,maxLength:H})}if(C=null,!y||!y.length)throw Error("bad png - invalid inflate data response");let T=Et.process(y,l);C=null;let U=Tt.dataToBitMap(T,l);T=null;let re=ri(U,l,s.skipRescale);return l.data=re,l.gamma=d||0,l}});var At=O(function(Pn,Ot){var It=!0,Q=vt("zlib");if(!Q.deflateSync)It=!1;var xt=W(),ii=ye();Ot.exports=function(n,s){if(!It)throw Error("To use the sync capability of this library in old node versions, please pin pngjs to v2.3.0");let a=new ii(s||{}),l=[];if(l.push(Buffer.from(xt.PNG_SIGNATURE)),l.push(a.packIHDR(n.width,n.height)),n.gamma)l.push(a.packGAMA(n.gamma));let c=a.filterData(n.data,n.width,n.height),h=Q.deflateSync(c,a.getDeflateOptions());if(c=null,!h||!h.length)throw Error("bad png - invalid compressed data response");return l.push(a.packIDAT(h)),l.push(a.packIEND()),Buffer.concat(l)}});var Rt=O(function(oi){var ni=kt(),si=At();oi.read=function(n,s){return ni(n,s||{})};oi.write=function(n,s){return si(n,s)}});var b0=O(function(fi){var Pt=vt("util"),Ee=vt("stream"),ci=Xe(),hi=ct(),ui=Rt(),A=fi.PNG=function(n){if(Ee.call(this),n=n||{},this.width=n.width|0,this.height=n.height|0,this.data=this.width>0&&this.height>0?Buffer.alloc(4*this.width*this.height):null,n.fill&&this.data)this.data.fill(0);this.gamma=0,this.readable=this.writable=!0,this._parser=new ci(n),this._parser.on("error",this.emit.bind(this,"error")),this._parser.on("close",this._handleClose.bind(this)),this._parser.on("metadata",this._metadata.bind(this)),this._parser.on("gamma",this._gamma.bind(this)),this._parser.on("parsed",function(s){this.data=s,this.emit("parsed",s)}.bind(this)),this._packer=new hi(n),this._packer.on("data",this.emit.bind(this,"data")),this._packer.on("end",this.emit.bind(this,"end")),this._parser.on("close",this._handleClose.bind(this)),this._packer.on("error",this.emit.bind(this,"error"))};Pt.inherits(A,Ee);A.sync=ui;A.prototype.pack=function(){if(!this.data||!this.data.length)return this.emit("error","No data provided"),this;return process.nextTick(function(){this._packer.pack(this.data,this.width,this.height,this.gamma)}.bind(this)),this};A.prototype.parse=function(n,s){if(s){let o,a;o=function(l){this.removeListener("error",a),this.data=l,s(null,this)}.bind(this),a=function(l){this.removeListener("parsed",o),s(l,null)}.bind(this),this.once("parsed",o),this.once("error",a)}return this.end(n),this};A.prototype.write=function(n){return this._parser.write(n),!0};A.prototype.end=function(n){this._parser.end(n)};A.prototype._metadata=function(n){this.width=n.width,this.height=n.height,this.emit("metadata",n)};A.prototype._gamma=function(n){this.gamma=n};A.prototype._handleClose=function(){if(!this._parser.writable&&!this._packer.readable)this.emit("close")};A.bitblt=function(n,s,o,a,l,c,h,u){if(o|=0,a|=0,l|=0,c|=0,h|=0,u|=0,o>n.width||a>n.height||o+l>n.width||a+c>n.height)throw Error("bitblt reading outside image");if(h>s.width||u>s.height||h+l>s.width||u+c>s.height)throw Error("bitblt writing outside image");for(let f=0;f<c;f++)n.data.copy(s.data,(u+f)*s.width+h<<2,(a+f)*n.width+o<<2,(a+f)*n.width+o+l<<2)};A.prototype.bitblt=function(n,s,o,a,l,c,h){return A.bitblt(this,n,s,o,a,l,c,h),this};A.adjustGamma=function(n){if(n.gamma){for(let s=0;s<n.height;s++)for(let o=0;o<n.width;o++){let a=n.width*s+o<<2;for(let l=0;l<3;l++){let c=n.data[a+l]/255;c=Math.pow(c,0.45454545454545453/n.gamma),n.data[a+l]=Math.round(c*255)}}n.gamma=0}};A.prototype.adjustGamma=function(){A.adjustGamma(this)}});var Dt={up:"down",down:"up",left:"right",right:"left"},Nt=(n)=>{let{direction:s,gestureType:o}=n;if(!s)return{error:"direction is required"};if(!o||o==="swipeFingerTowardsDirection")return{direction:s,message:`Swiping ${s} (finger gesture)`};return{direction:Dt[s],message:`Scrolling ${s} to reveal content ${s==="up"?"above":s==="down"?"below":s==="left"?"from left":"from right"}`}},Mc=(n)=>Nt(n);class Nc{parser;constructor(n=new G){this.parser=n}extract(n){if(!n?.hierarchy)return;let s=[],o,a=[],l=n.windows?.filter((h)=>h.hierarchy)??[];if(this.parser.traverseNode(n.hierarchy,(h,u)=>{let f=this.parser.extractNodeProperties(h),d=this.getAttribute(f,["resource-id","resourceId"]);if(d&&d.startsWith("navigation.")&&d.endsWith("Destination"))o=d.replace("navigation.","");if(this.getAttribute(f,["selected"])==="true"){let p=this.extractSelectedElement(h,f,d);if(p)s.push(p)}if(l.length===0)this.collectModalStack(a,f,u)}),l.length>0)this.collectWindowModals(a,l);let c=this.normalizeModalStack(a);if(s.length===0&&!o&&c.length===0)return;return{selectedElements:s,destinationId:o,modalStack:c.length>0?c:void 0}}extractSelectedElement(n,s,o){let a={},l=this.getAttribute(s,["text"]),c=this.getAttribute(s,["content-desc","contentDesc"]);if(l)a.text=l;if(o)a.resourceId=o;if(c)a.contentDesc=c;if(!a.text&&n.node){let h=this.findTextInChildren(n.node);if(h)a.text=h}return a.text||a.resourceId||a.contentDesc?a:void 0}collectWindowModals(n,s){for(let[o,a]of s.entries()){let l=a.id??void 0,c=a.type!==void 0?String(a.type):void 0,h=a.windowLayer??o;this.parser.traverseNode(a.hierarchy,(u,f)=>{let d=this.parser.extractNodeProperties(u);this.collectModalStack(n,d,h+f,{windowId:l,windowType:c})})}}extractFromObservation(n){if(!n?.viewHierarchy)return;let s=this.extract(n.viewHierarchy),o=s?.selectedElements??[];if(o.length>0){let l=this.applySelectedState(o,{method:"accessibility",confidence:1,reason:"selected attribute present in view hierarchy"});return{...s,selectedElements:l}}let a=n.selectedElements??[];if(a.length>0){if(s)return{...s,selectedElements:a};return{selectedElements:a}}return s}applySelectedState(n,s){return n.map((o)=>({...o,selectedState:o.selectedState??s}))}findTextInChildren(n){if(Array.isArray(n))for(let s of n){let o=this.parser.extractNodeProperties(s),a=this.getAttribute(o,["text"]);if(a)return a;if(!s.node)continue;let l=this.findTextInChildren(s.node);if(l)return l}else if(n&&typeof n==="object"){let s=this.parser.extractNodeProperties(n),o=this.getAttribute(s,["text"]);if(o)return o;if(n.node)return this.findTextInChildren(n.node)}return}getAttribute(n,s){for(let o of s){let a=n[o];if(typeof a==="string"&&a!=="")return a}return}collectModalStack(n,s,o,a){let l=this.getAttribute(s,["class","className"]);if(!l)return;let c=this.classifyModalType(l);if(!c)return;let h=this.getModalIdentifier(s,l),u=this.getWindowId(s,a?.windowId,c,{modalId:h,className:l}),f=this.getWindowType(s,a?.windowType);n.push({type:c,identifier:h,layer:o,windowId:u,windowType:f})}getWindowId(n,s,o,{modalId:a,className:l}){let c=this.getAttribute(n,["window-id","windowId","window_id"]),h=c?Number(c):NaN;if(Number.isFinite(h))return h;if(s!==void 0)return s;let u=`${o}:${a??l}`;return this.hashToId(u)}getWindowType(n,s){return this.getAttribute(n,["window-type","windowType","window_type"])??s}classifyModalType(n){let s=n.toLowerCase();if(s.includes("alert")||s.includes("dialog"))return"dialog";if(s.includes("actionsheet")||s.includes("sheet"))return"bottomsheet";if(s.includes("popover"))return"popup";if(s.includes("menu"))return"menu";if(s.includes("modal")||s.includes("presentation"))return"overlay";return null}getModalIdentifier(n,s){return this.getAttribute(n,["resource-id","resourceId","content-desc","contentDesc","text"])??s}hashToId(n){let s=0;for(let o=0;o<n.length;o+=1)s=s*31+n.charCodeAt(o)>>>0;return s}normalizeModalStack(n){if(n.length===0)return[];let s=new Map;for(let o of n){let a=o.identifier??`${o.type}-${o.layer}`;if(!s.has(a))s.set(a,o)}return Array.from(s.values()).sort((o,a)=>o.layer-a.layer).map((o,a)=>({...o,layer:a}))}static createScrollPosition(n){if(!n.lookFor)return;let s=Mc(n);if(!s.direction)return;let o={targetElement:{text:n.lookFor.text,resourceId:n.lookFor.elementId},direction:s.direction};if(n.container)o.container={text:n.container.text,resourceId:n.container.elementId};if(n.speed)o.speed=n.speed;return o}}function Wl(n){throw new t(`${n} is not supported by the watchOS runner; use tap, directional swipe, rotateCrown or home.`)}var Ut=0.4,Vt=30000,$t="rotateCrown changed nothing";function zt(n,s){if(!(n instanceof wa)||!n.message.startsWith($t)||Math.abs(s)>=1)return n;return new wa(`${n.message} A delta of ${s} is ${Math.abs(s)} of one crown revolution and may be smaller than one step of the focused control; if it is not at its limit, try a larger delta.`,n.errorCode)}async function v7(n,s,o){if(n.platform!=="watchos")throw new t("rotateCrown requires a watchOS device; target an Apple Watch session.");let{delta:a,velocity:l=1}=s;if(typeof a!=="number"||!Number.isFinite(a)||a===0)throw new t("rotateCrown delta must be a finite non-zero number.");if(typeof l!=="number"||!Number.isFinite(l)||l<=0)throw new t("rotateCrown velocity must be a finite number greater than zero.");o?.throwIfAborted();try{await yo.require(n.deviceId).request({type:"crown",delta:a,velocity:l},o,{timeoutMs:Vt})}catch(c){throw zt(c,a)}return{success:!0,delta:a,velocity:l}}function Fy(n,s){if(n==="watchos")Wl(s)}function X(n,s){let o=Object.entries(n).filter(([a,l])=>l!==void 0&&(l!==!1||a==="ensureChecked")&&!s.includes(a));if(o.length)Wl(`watchOS options ${o.map(([a])=>a).join(", ")}`)}async function xe(n,s){let o=YA(await n.hierarchy(s)),a=new G().flattenViewHierarchy(o).map((c)=>c.element),l=a.filter((c)=>{let{left:h,top:u,right:f,bottom:d}=c.bounds;return f>h&&d>u&&h>=0&&u>=0&&f<=o.screenWidth&&d<=o.screenHeight});return{all:a,available:l}}function Oe(n,s){return(s.elementId!==void 0||s.text!==void 0)&&(s.elementId===void 0||n["resource-id"]===s.elementId||n["view-id"]===s.elementId)&&(s.text===void 0||n.text===s.text)}function Ht(n){let s=new Set;return n.filter((o)=>{let{left:a,top:l,right:c,bottom:h}=o.bounds,u=`${o["resource-id"]??o["view-id"]}|${o.class}|${a},${l},${c},${h}`;if(s.has(u))return!1;return s.add(u),!0})}function qt(n,s){let o=n.filter((a)=>Oe(a,s));return s.elementId!==void 0?Ht(o):o}function Wt(n,s){let o=(a)=>["XCUIElementType(45)","XCUIElementType(49)","XCUIElementType(50)"].includes(a.class??"");return s?n.toSorted((a,l)=>Number(o(l))-Number(o(a))):[...n]}async function hq(n,s,o,a=!1){if(s.action!=="tap")Wl(s.action);if(X(s,["action","elementId","text","index"]),s.index!==void 0&&(!Number.isInteger(s.index)||s.index<0))throw new t("watchOS tap index must be a non-negative integer.");o?.throwIfAborted();let l=yo.require(n),{all:c,available:h}=await xe(l,o),f=Wt(qt(h,s),s.text!==void 0&&a)[s.index??0];if(!f)throw new t("No watch element matched; observe and check the identifier or exact text.");let{left:d,top:p,right:g,bottom:m}=f.bounds,b=(d+g)/2,S=(p+m)/2;return await l.request(f["resource-id"]&&c.filter((C)=>C["resource-id"]===f["resource-id"]).length===1?{type:"tap",identifier:f["resource-id"]}:{type:"tap",x:b,y:S},o),{success:!0,action:"tap",element:f}}async function b7(n,s,o){if(s.action!==void 0&&s.action!=="tap")Wl(s.action);if(X(s,["action","x","y","coordinateSpace"]),s.coordinateSpace!==void 0&&s.coordinateSpace!=="absolute")Wl("non-absolute coordinates");if(typeof s.x!=="number"||typeof s.y!=="number"||!Number.isFinite(s.x)||!Number.isFinite(s.y)||s.x<0||s.y<0)throw new t("watchOS tap requires finite non-negative x/y in XCTest points.");return o?.throwIfAborted(),await yo.require(n).request({type:"tap",x:s.x,y:s.y},o),{success:!0,x:s.x,y:s.y,action:"tap"}}function Yt(n){if(X(n,["direction","gestureType","lookFor","autoTarget"]),n.lookFor)X(n.lookFor,["text","elementId","maxSwipes"]);let s=n.lookFor?n.lookFor.maxSwipes??10:1;if(!Number.isInteger(s)||s<0||s>100)throw new t("watchOS maxSwipes must be an integer from 0 to 100.");return s}function Gt(n,s){return s?{type:"swipe",direction:n,distance:Ut}:{type:"swipe",direction:n}}async function S7(n,s,o){let a=Yt(s),l={up:"down",down:"up",left:"right",right:"left"},c=s.gestureType==="scrollTowardsDirection"?l[s.direction]:s.direction;if(!Object.hasOwn(l,c))throw new t("Invalid watch swipe direction.");o?.throwIfAborted();let h=yo.require(n),u=0,f;for(;;){if(s.lookFor)f=(await xe(h,o)).available.find((d)=>Oe(d,s.lookFor));if(f||u>=a)break;await h.request(Gt(c,!!s.lookFor),o),u++}return{success:s.lookFor===void 0||!!f,...s.lookFor&&!f?{error:"No watch element matched within the swipe limit; observe before trying again."}:{},targetType:"screen",x1:0,y1:0,x2:0,y2:0,duration:0,durationIgnored:!0,warning:"watchOS performs a directional swipe; stroke coordinates and duration are unavailable.",...s.lookFor?{found:!!f,element:f,scrollIterations:u}:{}}}async function w7(n,s,o){if(s.toLowerCase()!=="home")Wl(`press ${s}`);return o?.throwIfAborted(),await yo.require(n).request({type:"home"},o),{success:!0,button:s,keyCode:0}}var jt=5000;function ve(n,s){throw new t(`The app's SDK web-view bridge rejected the ${s} (${n}). Re-observe and retry; XCTest does not stand in for this result, because the page may have changed.`)}function Kt(n,s){if(ek(n),n.result?.status==="accepted")return{backend:"sdk"};if(n.result)return ve(n.result.reason??n.result.status,s);if(n.failure==="bridge_unavailable"||n.unsupported)return{backend:"xctest",fallbackReason:"unavailable"};return ve(n.failure??n.error??"no reply",s)}function Ae(n,s){return n==="tap"?{click:{snapshotId:s.snapshotId,elementId:s.elementId}}:null}async function fA(n,s,o,{verb:a,signal:l}){if(!n)return{backend:"xctest",fallbackReason:"unavailable"};let c=await n.requestSdkWebActionForIos(s.webViewId,o,{timeoutMs:jt,signal:l});return Kt(c,a)}var G6=5000,Xt=new Set(["unsupported_action"]);function Jt(n,s,o){switch(n.action){case"tap":return{tap:{observationIdentity:o,elementId:s}};case"longPress":return{longPress:{observationIdentity:o,elementId:s,durationMs:Math.max(0,Math.round(n.longPressDurationMs??500))}};default:return null}}function er(n){return"longPress"in n?Br(n.longPress.durationMs):G6}function Re(n,s){throw new t(`The app's SDK observation bridge rejected the ${s} (${n}). Re-observe and retry; XCTest does not stand in for this result, because the element may have changed.`)}function XI(n,s){if(ek(n),n.result?.status==="accepted")return{backend:"sdk",nextObservationIdentity:n.result.nextObservationIdentity};if(n.result){let o=n.result.reason??n.result.status;return Xt.has(o)?{backend:"xctest",fallbackReason:"unsupported"}:Re(o,s)}if(n.failure==="bridge_unavailable"||n.unsupported)return{backend:"xctest",fallbackReason:"unavailable"};return Re(n.failure??n.error??"no reply",s)}function tr(n){let s=n.enabled??(()=>M.isIosSdkObservationBridgeEnabled());return{async tap(o){let a=PV(o.element);if(a&&s()&&o.action!=="focus"){let f=Ae(o.action,a);return f?fA(n.webClient?.()??null,a,f,{verb:"click",signal:o.signal}):{backend:"xctest",fallbackReason:"unsupported"}}let l=Qy(o.element);if(!l||!s()||o.action==="focus")return null;let c=Jt(o,l.elementId,l.observationIdentity);if(!c)return{backend:"xctest",fallbackReason:"unsupported"};let h=n.client();if(!h)return{backend:"xctest",fallbackReason:"unavailable"};let u=await h.requestSdkActionForIos(c,{timeoutMs:er(c),signal:o.signal});return XI(u,"tap")}}}function R7(n){return tr({client:()=>_.getExistingInstance(n.deviceId),webClient:()=>_.getExistingInstance(n.deviceId)})}async function v0(n,s,o){if(!Jl())return;if(!n)return{searchCriteria:s,nearMisses:[],totalElementsChecked:0};try{let a=await(o??pn(n)).capture({freshness:"fresh",searchRaw:n.platform==="android"&&M.isRawElementSearchEnabled()}),l=new ar,c=s.container?.text?{...s.container,match:"contains"}:s.container,h=l.resolve({id:String(a.receivedAt),nodes:a.nodes},{elementId:s.resourceId,text:s.text,container:c,match:"contains"},{action:"tap"}),u=c?l.resolve({id:String(a.receivedAt),nodes:a.nodes},{container:c},{action:"inspect"}).candidates:a.nodes,f=new Set([...h.candidates,...h.matches.flatMap(({node:m,sourceNodes:b})=>[m,...b??[]])]),d=s.resourceId??s.text??"",p=new Zv,g=u.filter((m)=>m.element&&!f.has(m)).flatMap((m)=>Object.entries(s.resourceId?{"resource-id":m.nativeId}:m.textSources).filter(([,b])=>b&&p.partialTextMatch(b,d)).map(([b,S])=>({element:m.element,property:b,value:S,reason:"Similar but did not match the selected mode"}))).slice(0,10);return{searchCriteria:s,nearMisses:g.length?g:void 0,totalElementsChecked:u.length}}catch(a){return e.warn("Could not build element search debug context",a),{searchCriteria:s,nearMisses:[],totalElementsChecked:0}}}var rr=Uc("vision",()=>import("./chunk-c9tyfg4j.js"));class ie{module;client;constructor(n=rr){this.module=n}async analyzeUIElement(n,s,o){if(this.client===void 0){let{ClaudeVisionClient:a}=await this.module.load();this.client??=new a}return await this.client.analyzeUIElement(n,s,o)}}var ir=64;class ne{config;claudeClient=null;resultCache;timer;checksums;constructor(n,s=i,o,a=new tn){if(this.config=n,this.timer=s,this.checksums=a,this.resultCache=new Map,o)this.claudeClient=o;else if(n.provider==="claude")this.claudeClient=new ie}async analyzeAndSuggest(n,s,o){if(!this.config.enabled)throw Error("Vision fallback is not enabled");let a=this.config.cacheResults?await this.generateCacheKey(n,o):null;if(a){let c=this.getCachedResult(a);if(c)return e.debug("Vision fallback: using cached result"),c}if(sr(this.config.provider),!this.claudeClient)throw Error("Claude client not initialized");e.debug("Vision fallback: analyzing with Claude");let l=await this.claudeClient.analyzeUIElement(n,o,s);if(l.costUsd>this.config.maxCostUsd)e.warn(`Vision fallback cost ($${l.costUsd.toFixed(4)}) exceeds max ($${this.config.maxCostUsd})`);if(e.debug(`Vision fallback complete: confidence=${l.confidence}, cost=$${l.costUsd.toFixed(4)}, time=${l.durationMs}ms`),a)this.cacheResult(a,l);return l}getCachedResult(n){let s=this.resultCache.get(n);if(!s)return null;if((this.timer.now()-s.timestamp)/60000>this.config.cacheTtlMinutes)return this.resultCache.delete(n),null;return s.result}cacheResult(n,s){this.evictExpired(),this.resultCache.set(n,{result:s,timestamp:this.timer.now()}),this.evictOverflow()}evictExpired(){let n=this.timer.now();for(let[s,o]of this.resultCache)if((n-o.timestamp)/60000>this.config.cacheTtlMinutes)this.resultCache.delete(s)}evictOverflow(){while(this.resultCache.size>ir){let n=this.resultCache.keys().next();if(n.done)return;this.resultCache.delete(n.value)}}async generateCacheKey(n,s){let o=Cr(s);return`${await this.fingerprintScreenshot(n)}:${o}`}async fingerprintScreenshot(n){try{let{checksum:s}=await this.checksums.computeFileSha256(n);return s}catch(s){return e.debug(`Vision fallback: could not fingerprint ${n}, using path as key: ${s}`),n}}clearCache(){this.resultCache.clear()}getCacheStats(){return{size:this.resultCache.size,keys:Array.from(this.resultCache.keys())}}}function sr(n){if(n==="claude")return n;throw Error(`Unsupported vision provider: ${String(n)}`)}var Kp={enabled:!1,provider:"claude",confidenceThreshold:"high",maxCostUsd:1,cacheResults:!0,cacheTtlMinutes:60};var or=(n)=>new ne(n),lr=8;class Pe{instances=new Map;createFallback;constructor(n=or){this.createFallback=n}get(n){let s=Cr(n),o=this.instances.get(s);if(o)return o;let a=this.createFallback(n);this.instances.set(s,a);while(this.instances.size>lr){let l=this.instances.keys().next();if(l.done)break;this.instances.delete(l.value)}return a}clear(){this.instances.clear()}get size(){return this.instances.size}}var cr=new Pe;function Be(n){return cr.get(n)}async function Gp(n,s,o,a){let{visionConfig:l,baseError:c,signal:h,visionAnalyzer:u}=a;if(!l.enabled)return c;try{let f=await n.capture(h);if(!f)return e.error("Failed to capture screenshot for vision fallback"),c;let p=await(u??Be(l)).analyzeAndSuggest(f,s,o);if(p.confidence==="high"&&p.navigationSteps&&p.navigationSteps.length>0)return`Element not found, but AI suggests these steps:
3
+ ${p.navigationSteps.map((m,b)=>`${b+1}. ${m.description}`).join(`
4
+ `)}
5
+
6
+ (Cost: $${p.costUsd.toFixed(4)}, Confidence: ${p.confidence})`;if(p.alternativeSelectors&&p.alternativeSelectors.length>0)return`Element not found. AI suggests trying:
7
+ ${p.alternativeSelectors.map((m)=>`- ${m.type}: "${m.value}" (${m.reasoning})`).join(`
8
+ `)}
9
+
10
+ (Cost: $${p.costUsd.toFixed(4)}, Confidence: ${p.confidence})`;return`${c}. ${p.reason||"No clear path found."}
11
+
12
+ (Cost: $${p.costUsd.toFixed(4)}, Confidence: ${p.confidence})`}catch(f){return e.error("Vision fallback failed:",f),c}}var Te=Lt(b0());async function di(){let{default:n}=await import("./chunk-5d706gmr.js");return n}function pi(n){return{timer:n.timer??i,backend:n.backend??gs()}}class x{static PNG_HEADER=Buffer.from([137,80,78,71,13,10,26,10]);static isPngBuffer(n){if(n.length<8)return!1;return n.subarray(0,8).equals(x.PNG_HEADER)}static async convertToPng(n,s=gs()){try{return await s.execute(n,{operations:[],encoding:{mime:"image/png"}})}catch(o){throw Error(`Failed to convert image to PNG: ${o.message}`)}}static async getImageDimensions(n,s=gs()){if(x.isPngBuffer(n)&&n.length>=24)return{width:n.readUInt32BE(16),height:n.readUInt32BE(20)};try{let{width:o,height:a}=await s.metadata(n);return{width:o,height:a}}catch(o){throw Error(`Failed to get image dimensions: ${o.message}`)}}static async resizeImageIfNeeded(n,s,o,a=gs()){let{width:l,height:c}=await x.getImageDimensions(n,a);if(l===s&&c===o)return n;e.debug(`Resizing image from ${l}x${c} to ${s}x${o}`);try{return await a.execute(n,{operations:[{type:"resize",width:s,height:o,maintainAspectRatio:!1,mode:"nearest"}],encoding:{mime:"image/png"}})}catch(h){throw Error(`Failed to resize image: ${h.message}`)}}static getComparisonDimensions(n,s,o){let a=o?Math.min(n.width,s.width,400):Math.min(n.width,s.width),l=o?Math.min(n.height,s.height,600):Math.min(n.height,s.height);return{width:a,height:l}}static dimensionsMatch(n,s,o){return n.width===s&&n.height===o}static async compareImages(n,s,{threshold:o=0.1,fastMode:a=!1,deps:l={}}={}){let{timer:c,backend:h}=pi(l),u=c.now();e.debug(`Starting image comparison with threshold ${o}${a?" (fast mode)":""}`);try{let f=x.isPngBuffer(n)?n:await x.convertToPng(n,h),d=x.isPngBuffer(s)?s:await x.convertToPng(s,h),p=await x.getImageDimensions(f,h),g=await x.getImageDimensions(d,h);e.debug(`Image 1 dimensions: ${p.width}x${p.height}`),e.debug(`Image 2 dimensions: ${g.width}x${g.height}`);let{width:m,height:b}=x.getComparisonDimensions(p,g,a);if(!x.dimensionsMatch(p,m,b))f=await x.resizeImageIfNeeded(f,m,b,h);if(!x.dimensionsMatch(g,m,b))d=await x.resizeImageIfNeeded(d,m,b,h);let S=Te.PNG.sync.read(f),C=Te.PNG.sync.read(d),{width:y,height:T}=S,U=y*T;e.debug(`Comparing images: ${y}x${T} (${U} pixels)`);let re=a?Math.min(o*1.5,0.2):o,H=(await di())(S.data,C.data,void 0,y,T,{threshold:re,includeAA:!1}),Ie=(U-H)/U*100,Ft=c.now()-u;return e.debug(`Image comparison completed in ${Ft}ms: ${H}/${U} different pixels (${Ie.toFixed(2)}% similar)`),{compared:!0,similarity:Ie,pixelDifference:H,totalPixels:U}}catch(f){let d=c.now()-u,p=r(f);return e.warn(`Image comparison failed after ${d}ms: ${p}`,f),{compared:!1,error:p}}}}import te from"path";var z=8;class ee{static async generatePerceptualHash(n,s=gs()){try{let o=await s.rawPixels(n),a=z*z,l=Array(a),c=0;for(let f=0;f<z;f++){let d=Math.floor(f*o.height/z);for(let p=0;p<z;p++){let g=Math.floor(p*o.width/z),m=(d*o.width+g)*4,b=Math.trunc(0.2126*o.data[m]+0.7152*o.data[m+1]+0.0722*o.data[m+2]);l[f*z+p]=b,c+=b}}let h=c/a,u="";for(let f=0;f<a;f++)u+=l[f]>h?"1":"0";return u}catch(o){return e.warn(`Failed to generate perceptual hash: ${o.message}`),""}}static calculateHammingDistance(n,s){if(n.length!==s.length)return Math.max(n.length,s.length);let o=0;for(let a=0;a<n.length;a++)if(n[a]!==s[a])o++;return o}static getPerceptualSimilarity(n,s){let o=ee.calculateHammingDistance(n,s),a=Math.max(n.length,s.length);if(a===0)return 100;return(a-o)/a*100}}class B{static screenshotCache=new Map;static MAX_CACHE_ENTRIES=50;static CACHE_TTL_MS=600000;static async getCachedScreenshot(n,s=i){let o=te.normalize(n),a=s.now(),l=B.screenshotCache.get(o);if(l&&a-l.lastAccess<B.CACHE_TTL_MS)return l.lastAccess=a,e.debug(`Screenshot cache hit: ${te.basename(n)}`),{buffer:l.buffer,hash:l.hash};e.debug(`Screenshot cache miss: ${te.basename(n)}`);let c=await Qm(n),h=await ee.generatePerceptualHash(c);return B.addToCache(o,c,h,a),{buffer:c,hash:h}}static addToCache(n,s,o,a){if(B.screenshotCache.size>=B.MAX_CACHE_ENTRIES){let l=Array.from(B.screenshotCache.entries());l.sort((c,h)=>c[1].lastAccess-h[1].lastAccess);for(let c=0;c<10&&c<l.length;c++)B.screenshotCache.delete(l[c][0]);e.debug(`Evicted ${Math.min(10,l.length)} old screenshot cache entries`)}B.screenshotCache.set(n,{buffer:s,hash:o,lastAccess:a})}static clearCache(){B.screenshotCache.clear()}static async getScreenshotFiles(n){try{if(!await na(n))return e.debug(`Cache directory does not exist: ${n}`),[];let o=(await nr(n)).filter((a)=>Ore(a)).map((a)=>te.join(n,a));return e.debug(`Found ${o.length} screenshot files in ${n}`),o}catch(s){return e.warn(`Failed to get screenshot files from ${n}: ${s.message}`),[]}}}class K{static async getImageDimensions(n){return x.getImageDimensions(n)}static async compareImages(n,s,o=0.1,a=!1){return x.compareImages(n,s,{threshold:o,fastMode:a})}static async getCachedScreenshot(n){return B.getCachedScreenshot(n)}}class Bt{async getCachedScreenshot(n){return K.getCachedScreenshot(n)}async getImageDimensions(n){return K.getImageDimensions(n)}async compareImages(n,s,o,a){return K.compareImages(n,s,o,a)}}var Mt=new Bt;var mi={minDifferencePercent:1,minElementSizePx:4,pixelmatchThreshold:0.1,confidenceScale:5},gi=0.75;function bi(n){return n?.screenChanged===!0&&(n.basis==="screenIdentity changed"||n.basis==="activeWindow changed")}function Ce(n,s){return!n||n===s}function wi(n,s){let o=_t(n);if(!s||o<=0)return!1;let a=Qt(n,s);return a!==null&&_t(a)/o>=gi}class ke{screenshotUtils;imageUtils;config;constructor(n={}){this.screenshotUtils=n.screenshotUtils??Mt,this.imageUtils=n.imageUtils??new k3,this.config={...mi,...n.config}}async detectSelectedElements(n){let s=n.currentObservation;if(!s?.viewHierarchy)return[];let o=new Nc().extract(s.viewHierarchy);if(o?.selectedElements?.length){let a=this.applySelectedState(o.selectedElements,{method:"accessibility",confidence:1,reason:"selected attribute present in view hierarchy"});return e.info(`[SELECTION_STATE] Using accessibility selected state (${a.length} element(s))`),a}return this.detectVisualFallback(n,s)}async detectVisualFallback(n,s){let{tappedElement:o,beforeScreenshotPath:a,afterScreenshotPath:l}=n;if(!o)return e.debug("[SELECTION_STATE] Visual fallback skipped: no tapped element provided"),[];if(!a||!l)return e.debug("[SELECTION_STATE] Visual fallback skipped: missing before/after screenshots"),[];let c=this.buildSelectedElement(o);if(!c)return e.debug("[SELECTION_STATE] Visual fallback skipped: tapped element lacks identifiers"),[];let h=this.visualFallbackSkipReason(c,o.bounds,n.tapEffect,s.viewHierarchy);if(h)return e.debug(`[SELECTION_STATE] Visual fallback skipped: ${h}`),[];let u=await this.detectVisualSelection(o.bounds,a,l,{beforeScreenSize:n.previousObservation?.screenSize,afterScreenSize:s.screenSize});if(!u)return[];let f={method:"visual",confidence:u.confidence,reason:u.reason};return e.info(`[SELECTION_STATE] Using visual fallback for ${this.describeElement(c)} (diff=${u.differencePercent.toFixed(2)}%, confidence=${u.confidence})`),[{...c,selectedState:f}]}visualFallbackSkipReason(n,s,o,a){if(bi(o))return`tap navigated (${o?.basis})`;if(!this.isStillPresent(n,s,a))return`${this.describeElement(n)} is not in the post-tap hierarchy`;return null}applySelectedState(n,s){return n.map((o)=>({...o,selectedState:o.selectedState??s}))}buildSelectedElement(n){let s={text:n.text,resourceId:n["resource-id"],contentDesc:n["content-desc"]};if(!s.text&&!s.resourceId&&!s.contentDesc)return null;return s}isStillPresent(n,s,o){if(!o)return!1;return new we().project(Zt(o)??o).some(({properties:l,bounds:c})=>Ce(n.text,l.text)&&Ce(n.resourceId,l["resource-id"])&&Ce(n.contentDesc,l["content-desc"])&&wi(s,c))}describeElement(n){return n.text||n.resourceId||n.contentDesc||"unknown element"}async detectVisualSelection(n,s,o,{beforeScreenSize:a,afterScreenSize:l}={}){try{let c=await this.screenshotUtils.getCachedScreenshot(s),h=await this.screenshotUtils.getCachedScreenshot(o),u=await this.screenshotUtils.getImageDimensions(c.buffer),f=await this.screenshotUtils.getImageDimensions(h.buffer);if(u.width!==f.width||u.height!==f.height)return e.debug(`[SELECTION_STATE] Visual fallback skipped: screenshot size changed ${u.width}x${u.height} -> ${f.width}x${f.height}`),null;let d=await this.cropElementRegion(c.buffer,n,a,u),p=await this.cropElementRegion(h.buffer,n,l,f);if(!d||!p)return e.debug("[SELECTION_STATE] Visual fallback skipped: invalid element bounds for cropping"),null;let g=await this.screenshotUtils.compareImages(d,p,this.config.pixelmatchThreshold,!1);if(!g.compared)return e.warn(`[SELECTION_STATE] Visual fallback skipped: ${g.error}`),null;let m=Math.max(0,100-g.similarity);if(m<this.config.minDifferencePercent)return e.debug(`[SELECTION_STATE] Visual fallback skipped: diff ${m.toFixed(2)}% < threshold ${this.config.minDifferencePercent}%`),null;let b=this.computeConfidence(m);return{differencePercent:m,confidence:b,reason:`visual diff ${m.toFixed(2)}% >= ${this.config.minDifferencePercent}%`}}catch(c){return e.warn(`[SELECTION_STATE] Visual fallback failed: ${r(c)}`,c),null}}async cropElementRegion(n,s,o,a){let l=this.normalizeBounds(s,o,a);if(!l)return null;return this.imageUtils.crop(n,l.width,l.height,{x:l.left,y:l.top})}normalizeBounds(n,s,o){if(o.width<=0||o.height<=0)return null;let a=s?.width?o.width/s.width:1,l=s?.height?o.height/s.height:1,c=Math.max(0,Math.floor(n.left*a)),h=Math.max(0,Math.floor(n.top*l)),u=Math.min(o.width,Math.ceil(n.right*a)),f=Math.min(o.height,Math.ceil(n.bottom*l)),d=u-c,p=f-h;if(d<this.config.minElementSizePx||p<this.config.minElementSizePx)return null;return{left:c,top:h,width:d,height:p}}computeConfidence(n){let s=Math.min(1,Math.max(0,n/this.config.confidenceScale));return Number(s.toFixed(2))}}class Ou{device;adbFactory;constructor(n,s=v){this.device=n,this.adbFactory=s}async capture(n){let o=await new _o(this.device,{adbFactory:this.adbFactory}).execute({format:"png"},n);if(!o.success||!o.path)return null;return o.path}}class Y6{detector;screenshotCapturer;isUiPerfModeEnabled;constructor(n){this.detector=n.detector??new ke,this.screenshotCapturer=n.screenshotCapturer,this.isUiPerfModeEnabled=n.isUiPerfModeEnabled??(()=>M.isUiPerfModeEnabled())}async prepare(n){let{observation:s,element:o,action:a,signal:l}=n;if(!s?.viewHierarchy||!o)return null;if(!this.isUiPerfModeEnabled())return e.debug(`[SELECTION_STATE] Skip selection capture (${a}): ui-perf-mode disabled`),null;if(!this.hasIdentifier(o))return e.debug(`[SELECTION_STATE] Skip selection capture (${a}): element lacks identifier`),null;if(!this.isSelectionCandidate(o))return e.debug(`[SELECTION_STATE] Skip selection capture (${a}): element not selectable`),null;if(new Nc().extract(s.viewHierarchy)?.selectedElements?.length)return e.info(`[SELECTION_STATE] Skip visual capture (${a}): accessibility selected state available`),null;let h=await this.screenshotCapturer.capture(l);if(!h)return e.warn(`[SELECTION_STATE] Failed to capture pre-action screenshot (${a})`),null;return{beforeScreenshotPath:h,action:a}}async finalize(n){let{selectionState:s,currentObservation:o,previousObservation:a,element:l,effect:c,action:h,signal:u}=n;if(!s||!o||!l)return[];let f=await this.screenshotCapturer.capture(u);if(!f)return e.warn(`[SELECTION_STATE] Failed to capture post-action screenshot (${h})`),[];let d={currentObservation:o,previousObservation:a,tappedElement:l,tapEffect:c,beforeScreenshotPath:s.beforeScreenshotPath,afterScreenshotPath:f};return this.detector.detectSelectedElements(d)}hasIdentifier(n){return Boolean(n.text||n["resource-id"]||n["content-desc"])}isSelectionCandidate(n){let s=n.clickable===!0||n.clickable==="true",o=n.checkable===!0||n.checkable==="true";return s||o}}function zl(n,s){if(!s)return n;return{...n,warnings:[...n.warnings??[],s]}}
13
+ export{Mc,Nc,Wl,v7,Fy,hq,b7,S7,w7,fA,G6,XI,R7,v0,Kp,Gp,b0,Ou,Y6,zl};
14
+
15
+ //# debugId=4F43F822C6C153BE64756E2164756E21
@@ -0,0 +1,4 @@
1
+ // @bun
2
+ import{aoe}from"./chunk-2v7tw1nj.js";var r=async()=>{let{bootstrapEnvironment:e}=await import("./chunk-zkdjwtc1.js");return{bootstrapEnvironment:()=>e(),resolveVersion:async()=>{let{getSettledMcpServerVersion:o}=await import("./chunk-09442h7v.js");return o()},log:(o)=>console.log(o),exit:(o)=>process.exit(o)}};async function s(e,o){let t=o??await r();t.bootstrapEnvironment();let n=aoe(e,await t.resolveVersion());t.log(n),t.exit(0)}export{s as runVersionEntrypoint};
3
+
4
+ //# debugId=2F56EE36EC8C099064756E2164756E21
@@ -0,0 +1,4 @@
1
+ // @bun
2
+ import{ev,bo}from"./chunk-0w1spptt.js";import"./chunk-sns0c35v.js";import"./chunk-h3n4adc6.js";import"./chunk-32jpxz2y.js";import"./chunk-79q5xsdc.js";import"./chunk-ggtd5x5a.js";import"./chunk-z8t0v07j.js";import"./chunk-mf9spd4g.js";export{bo as Keyboard,ev as KeyboardOpenIndeterminateError};
3
+
4
+ //# debugId=578E8130E9F58FBC64756E2164756E21
@@ -0,0 +1,4 @@
1
+ // @bun
2
+ import{Mq}from"./chunk-jdqvcq0a.js";export{Mq as default};
3
+
4
+ //# debugId=0CD9643C067403A764756E2164756E21
@@ -0,0 +1,5 @@
1
+ // @bun
2
+ import{i}from"./chunk-z8t0v07j.js";import{Dt,jV,vn,bn,FT}from"./chunk-h3n4adc6.js";import{hK,fJ}from"./chunk-ympy4fdz.js";var a={getConfig:hK,updateConfig:fJ};class t extends FT{constructor(r=Dt(jV),n=i,o=a,d=bn("videoRecording config/set")){super({socketPath:r,timer:n,serverName:"VideoRecording",responseType:"video_recording_response",evictedKey:"evictedRecordingIds",methodLabel:"video recording",getConfig:o.getConfig,updateConfig:async(c)=>{let{config:g,evictedRecordingIds:s}=await o.updateConfig(c);return{config:g,evictedItems:s}},authenticator:d})}}var e=new vn;function s2(){return e.instance?.getSocketPath()??Dt(jV)}async function a2(){await e.start(()=>new t)}async function c2(){await e.stop()}
3
+ export{s2,a2,c2};
4
+
5
+ //# debugId=B8A176ACBA5D5E0964756E2164756E21
@@ -0,0 +1,4 @@
1
+ // @bun
2
+ class s{inner;onclose;onerror;onmessage;held=[];heldErrors=[];innerStarted=!1;attached=!1;closedEarly=!1;constructor(e){this.inner=e}async startEarly(){if(this.innerStarted)return;this.innerStarted=!0,this.inner.onmessage=(e,r)=>{if(this.attached&&this.onmessage)this.onmessage(e,r);else this.held.push({message:e,extra:r})},this.inner.onerror=(e)=>{if(this.attached&&this.onerror)this.onerror(e);else this.heldErrors.push(e)},this.inner.onclose=()=>{if(this.attached)this.onclose?.();else this.closedEarly=!0},await this.inner.start()}async start(){await this.startEarly(),this.attached=!0;for(let e of this.heldErrors.splice(0))this.onerror?.(e);for(let{message:e,extra:r}of this.held.splice(0))this.onmessage?.(e,r);if(this.closedEarly)this.onclose?.()}send(e,r){return this.inner.send(e,r)}close(){return this.inner.close()}get sessionId(){return this.inner.sessionId}setProtocolVersion(e){this.inner.setProtocolVersion?.(e)}}export{s as EarlyStartTransport};
3
+
4
+ //# debugId=C1FACA12130DC96064756E2164756E21
@@ -0,0 +1,4 @@
1
+ // @bun
2
+ import{Lc,Gx}from"./chunk-pm06b05d.js";import"./chunk-bn64x5z5.js";import"./chunk-0e4gm1kj.js";import"./chunk-4fgdhcwx.js";import"./chunk-6d3mmqxt.js";import"./chunk-sns0c35v.js";import"./chunk-h3n4adc6.js";import"./chunk-32jpxz2y.js";import"./chunk-79q5xsdc.js";import"./chunk-ggtd5x5a.js";import"./chunk-z8t0v07j.js";import"./chunk-mf9spd4g.js";export{Gx as TapAtCoordinate,Lc as resolveTapAtCoordinates};
3
+
4
+ //# debugId=84BB84EA37C5D17064756E2164756E21