dev3000 0.0.95 → 0.0.96

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 (276) hide show
  1. package/dist/dev-environment.d.ts.map +1 -1
  2. package/dist/dev-environment.js +8 -16
  3. package/dist/dev-environment.js.map +1 -1
  4. package/mcp-server/.next/BUILD_ID +1 -1
  5. package/mcp-server/.next/build-manifest.json +8 -10
  6. package/mcp-server/.next/fallback-build-manifest.json +3 -5
  7. package/mcp-server/.next/images-manifest.json +8 -2
  8. package/mcp-server/.next/next-minimal-server.js.nft.json +1 -1
  9. package/mcp-server/.next/next-server.js.nft.json +1 -1
  10. package/mcp-server/.next/prerender-manifest.json +3 -3
  11. package/mcp-server/.next/required-server-files.json +21 -20
  12. package/mcp-server/.next/server/app/_global-error/page/build-manifest.json +5 -5
  13. package/mcp-server/.next/server/app/_global-error/page.js +8 -8
  14. package/mcp-server/.next/server/app/_global-error/page.js.nft.json +1 -1
  15. package/mcp-server/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
  16. package/mcp-server/.next/server/app/_global-error.html +2 -2
  17. package/mcp-server/.next/server/app/_global-error.meta +6 -1
  18. package/mcp-server/.next/server/app/_global-error.rsc +11 -13
  19. package/mcp-server/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +5 -0
  20. package/mcp-server/.next/server/app/_global-error.segments/_index.segment.rsc +4 -0
  21. package/mcp-server/.next/server/app/_global-error.segments/_tree.segment.rsc +7 -0
  22. package/mcp-server/.next/server/app/_not-found/page/build-manifest.json +5 -5
  23. package/mcp-server/.next/server/app/_not-found/page.js +10 -10
  24. package/mcp-server/.next/server/app/_not-found/page.js.nft.json +1 -1
  25. package/mcp-server/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  26. package/mcp-server/.next/server/app/_not-found.html +1 -1
  27. package/mcp-server/.next/server/app/_not-found.meta +7 -1
  28. package/mcp-server/.next/server/app/_not-found.rsc +12 -14
  29. package/mcp-server/.next/server/app/_not-found.segments/_index.segment.rsc +5 -0
  30. package/mcp-server/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +5 -0
  31. package/mcp-server/.next/server/app/_not-found.segments/_not-found.segment.rsc +4 -0
  32. package/mcp-server/.next/server/app/_not-found.segments/_tree.segment.rsc +8 -0
  33. package/mcp-server/.next/server/app/api/jank/[session]/route.js +6 -6
  34. package/mcp-server/.next/server/app/api/jank/[session]/route.js.nft.json +1 -1
  35. package/mcp-server/.next/server/app/api/logs/append/route.js +4 -4
  36. package/mcp-server/.next/server/app/api/logs/append/route.js.nft.json +1 -1
  37. package/mcp-server/.next/server/app/api/logs/head/route.js +4 -4
  38. package/mcp-server/.next/server/app/api/logs/head/route.js.nft.json +1 -1
  39. package/mcp-server/.next/server/app/api/logs/list/route.js +4 -4
  40. package/mcp-server/.next/server/app/api/logs/list/route.js.nft.json +1 -1
  41. package/mcp-server/.next/server/app/api/logs/rotate/route.js +5 -5
  42. package/mcp-server/.next/server/app/api/logs/rotate/route.js.nft.json +1 -1
  43. package/mcp-server/.next/server/app/api/logs/stream/route.js +4 -4
  44. package/mcp-server/.next/server/app/api/logs/stream/route.js.nft.json +1 -1
  45. package/mcp-server/.next/server/app/api/logs/tail/route.js +4 -4
  46. package/mcp-server/.next/server/app/api/logs/tail/route.js.nft.json +1 -1
  47. package/mcp-server/.next/server/app/api/orchestrator/route.js +5 -5
  48. package/mcp-server/.next/server/app/api/orchestrator/route.js.nft.json +1 -1
  49. package/mcp-server/.next/server/app/api/screenshots/[filename]/route.js +5 -5
  50. package/mcp-server/.next/server/app/api/screenshots/[filename]/route.js.nft.json +1 -1
  51. package/mcp-server/.next/server/app/api/screenshots/list/route.js +5 -5
  52. package/mcp-server/.next/server/app/api/screenshots/list/route.js.nft.json +1 -1
  53. package/mcp-server/.next/server/app/api/tools/route.js +5 -5
  54. package/mcp-server/.next/server/app/api/tools/route.js.nft.json +1 -1
  55. package/mcp-server/.next/server/app/index.html +1 -1
  56. package/mcp-server/.next/server/app/index.meta +7 -2
  57. package/mcp-server/.next/server/app/index.rsc +14 -16
  58. package/mcp-server/.next/server/app/index.segments/__PAGE__.segment.rsc +9 -0
  59. package/mcp-server/.next/server/app/index.segments/_index.segment.rsc +5 -0
  60. package/mcp-server/.next/server/app/index.segments/_tree.segment.rsc +8 -0
  61. package/mcp-server/.next/server/app/logs/page/build-manifest.json +5 -5
  62. package/mcp-server/.next/server/app/logs/page.js +13 -13
  63. package/mcp-server/.next/server/app/logs/page.js.nft.json +1 -1
  64. package/mcp-server/.next/server/app/logs/page_client-reference-manifest.js +1 -1
  65. package/mcp-server/.next/server/app/mcp/route.js +4 -4
  66. package/mcp-server/.next/server/app/mcp/route.js.nft.json +1 -1
  67. package/mcp-server/.next/server/app/page/build-manifest.json +5 -5
  68. package/mcp-server/.next/server/app/page.js +12 -12
  69. package/mcp-server/.next/server/app/page.js.nft.json +1 -1
  70. package/mcp-server/.next/server/app/page_client-reference-manifest.js +1 -1
  71. package/mcp-server/.next/server/app/video/[session]/page/build-manifest.json +5 -5
  72. package/mcp-server/.next/server/app/video/[session]/page.js +12 -12
  73. package/mcp-server/.next/server/app/video/[session]/page.js.nft.json +1 -1
  74. package/mcp-server/.next/server/app/video/[session]/page_client-reference-manifest.js +1 -1
  75. package/mcp-server/.next/server/chunks/962f0_next_80b90dc3._.js +17 -0
  76. package/mcp-server/.next/server/chunks/962f0_next_80b90dc3._.js.map +1 -0
  77. package/mcp-server/.next/server/chunks/962f0_next_dist_esm_build_templates_app-route_fbcab413.js +3 -0
  78. package/mcp-server/.next/server/chunks/962f0_next_dist_esm_build_templates_app-route_fbcab413.js.map +1 -0
  79. package/mcp-server/.next/server/chunks/[root-of-the-server]__05e1e17a._.js +11 -0
  80. package/mcp-server/.next/server/chunks/[root-of-the-server]__05e1e17a._.js.map +1 -0
  81. package/mcp-server/.next/server/chunks/[root-of-the-server]__0f1f904c._.js +4 -0
  82. package/mcp-server/.next/server/chunks/[root-of-the-server]__0f1f904c._.js.map +1 -0
  83. package/mcp-server/.next/server/chunks/[root-of-the-server]__37cbcfad._.js +3 -0
  84. package/mcp-server/.next/server/chunks/[root-of-the-server]__3899cb0e._.js +3 -0
  85. package/mcp-server/.next/server/chunks/{[root-of-the-server]__cc81580c._.js.map → [root-of-the-server]__3899cb0e._.js.map} +1 -1
  86. package/mcp-server/.next/server/chunks/[root-of-the-server]__40003a13._.js +3 -0
  87. package/mcp-server/.next/server/chunks/[root-of-the-server]__40003a13._.js.map +1 -0
  88. package/mcp-server/.next/server/chunks/[root-of-the-server]__4e52a647._.js +3 -0
  89. package/mcp-server/.next/server/chunks/[root-of-the-server]__4e52a647._.js.map +1 -0
  90. package/mcp-server/.next/server/chunks/[root-of-the-server]__746ebd24._.js +3 -0
  91. package/mcp-server/.next/server/chunks/[root-of-the-server]__746ebd24._.js.map +1 -0
  92. package/mcp-server/.next/server/chunks/[root-of-the-server]__7820f710._.js +7 -0
  93. package/mcp-server/.next/server/chunks/[root-of-the-server]__7820f710._.js.map +1 -0
  94. package/mcp-server/.next/server/chunks/[root-of-the-server]__8caade4f._.js +17 -0
  95. package/mcp-server/.next/server/chunks/[root-of-the-server]__8caade4f._.js.map +1 -0
  96. package/mcp-server/.next/server/chunks/[root-of-the-server]__94037b23._.js +2 -2
  97. package/mcp-server/.next/server/chunks/[root-of-the-server]__94037b23._.js.map +1 -1
  98. package/mcp-server/.next/server/chunks/[root-of-the-server]__9a45c8f9._.js +1 -1
  99. package/mcp-server/.next/server/chunks/[root-of-the-server]__9a45c8f9._.js.map +1 -1
  100. package/mcp-server/.next/server/chunks/[root-of-the-server]__ae49815f._.js +2 -2
  101. package/mcp-server/.next/server/chunks/[root-of-the-server]__ae49815f._.js.map +1 -1
  102. package/mcp-server/.next/server/chunks/[root-of-the-server]__be04c8ec._.js +3 -0
  103. package/mcp-server/.next/server/chunks/[root-of-the-server]__be04c8ec._.js.map +1 -0
  104. package/mcp-server/.next/server/chunks/[root-of-the-server]__cc74dbef._.js +2 -2
  105. package/mcp-server/.next/server/chunks/[root-of-the-server]__cc74dbef._.js.map +1 -1
  106. package/mcp-server/.next/server/chunks/[root-of-the-server]__d8c4b7af._.js +3 -0
  107. package/mcp-server/.next/server/chunks/[root-of-the-server]__d8c4b7af._.js.map +1 -0
  108. package/mcp-server/.next/server/chunks/[root-of-the-server]__db4dce5b._.js +3 -0
  109. package/mcp-server/.next/server/chunks/[root-of-the-server]__db4dce5b._.js.map +1 -0
  110. package/mcp-server/.next/server/chunks/[root-of-the-server]__e1a64519._.js +1 -1
  111. package/mcp-server/.next/server/chunks/[root-of-the-server]__e1a64519._.js.map +1 -1
  112. package/mcp-server/.next/server/chunks/[root-of-the-server]__e305b486._.js +3 -0
  113. package/mcp-server/.next/server/chunks/[root-of-the-server]__e305b486._.js.map +1 -0
  114. package/mcp-server/.next/server/chunks/[turbopack]_runtime.js +1 -1
  115. package/mcp-server/.next/server/chunks/[turbopack]_runtime.js.map +1 -1
  116. package/mcp-server/.next/server/chunks/ssr/962f0_next_dist_0ff128f8._.js +6 -0
  117. package/mcp-server/.next/server/chunks/ssr/962f0_next_dist_0ff128f8._.js.map +1 -0
  118. package/mcp-server/.next/server/chunks/ssr/962f0_next_dist_431de271._.js +3 -0
  119. package/mcp-server/.next/server/chunks/ssr/962f0_next_dist_431de271._.js.map +1 -0
  120. package/mcp-server/.next/server/chunks/ssr/962f0_next_dist_7f9577da._.js +24 -0
  121. package/mcp-server/.next/server/chunks/ssr/962f0_next_dist_7f9577da._.js.map +1 -0
  122. package/mcp-server/.next/server/chunks/ssr/962f0_next_dist_a28dc041._.js +3 -0
  123. package/mcp-server/.next/server/chunks/ssr/962f0_next_dist_a28dc041._.js.map +1 -0
  124. package/mcp-server/.next/server/chunks/ssr/962f0_next_dist_a8de8a6b._.js +4 -0
  125. package/mcp-server/.next/server/chunks/ssr/962f0_next_dist_a8de8a6b._.js.map +1 -0
  126. package/mcp-server/.next/server/chunks/ssr/962f0_next_dist_client_components_0633a613._.js +3 -0
  127. package/mcp-server/.next/server/chunks/ssr/{d1d76_next_dist_client_components_6557bb14._.js.map → 962f0_next_dist_client_components_0633a613._.js.map} +1 -1
  128. package/mcp-server/.next/server/chunks/ssr/{d1d76_next_dist_client_components_builtin_forbidden_c162dd05.js → 962f0_next_dist_client_components_builtin_forbidden_828a4c7b.js} +2 -2
  129. package/mcp-server/.next/server/chunks/ssr/{d1d76_next_dist_client_components_builtin_forbidden_c162dd05.js.map → 962f0_next_dist_client_components_builtin_forbidden_828a4c7b.js.map} +1 -1
  130. package/mcp-server/.next/server/chunks/ssr/962f0_next_dist_client_components_builtin_global-error_c9f9f74f.js +3 -0
  131. package/mcp-server/.next/server/chunks/ssr/{d1d76_next_dist_client_components_builtin_global-error_3d982957.js.map → 962f0_next_dist_client_components_builtin_global-error_c9f9f74f.js.map} +1 -1
  132. package/mcp-server/.next/server/chunks/ssr/{d1d76_next_dist_client_components_builtin_unauthorized_e4f02ffd.js → 962f0_next_dist_client_components_builtin_unauthorized_0a08bab6.js} +2 -2
  133. package/mcp-server/.next/server/chunks/ssr/{d1d76_next_dist_client_components_builtin_unauthorized_e4f02ffd.js.map → 962f0_next_dist_client_components_builtin_unauthorized_0a08bab6.js.map} +1 -1
  134. package/mcp-server/.next/server/chunks/ssr/962f0_next_dist_esm_build_templates_app-page_077a704a.js +4 -0
  135. package/mcp-server/.next/server/chunks/ssr/962f0_next_dist_esm_build_templates_app-page_077a704a.js.map +1 -0
  136. package/mcp-server/.next/server/chunks/ssr/[root-of-the-server]__00b0a236._.js +3 -0
  137. package/mcp-server/.next/server/chunks/ssr/{[root-of-the-server]__61c905ce._.js.map → [root-of-the-server]__00b0a236._.js.map} +1 -1
  138. package/mcp-server/.next/server/chunks/ssr/[root-of-the-server]__1c9d4256._.js +3 -0
  139. package/mcp-server/.next/server/chunks/ssr/{[root-of-the-server]__9f07837d._.js.map → [root-of-the-server]__1c9d4256._.js.map} +1 -1
  140. package/mcp-server/.next/server/chunks/ssr/[root-of-the-server]__28056c4f._.js +3 -0
  141. package/mcp-server/.next/server/chunks/ssr/{[root-of-the-server]__cf030fda._.js.map → [root-of-the-server]__28056c4f._.js.map} +1 -1
  142. package/mcp-server/.next/server/chunks/ssr/{[root-of-the-server]__a4bb31a6._.js → [root-of-the-server]__295a5dca._.js} +2 -2
  143. package/mcp-server/.next/server/chunks/ssr/{[root-of-the-server]__a4bb31a6._.js.map → [root-of-the-server]__295a5dca._.js.map} +1 -1
  144. package/mcp-server/.next/server/chunks/ssr/[root-of-the-server]__2c3254f5._.js +3 -0
  145. package/mcp-server/.next/server/chunks/ssr/[root-of-the-server]__4e8e802a._.js +3 -0
  146. package/mcp-server/.next/server/chunks/ssr/[root-of-the-server]__4e8e802a._.js.map +1 -0
  147. package/mcp-server/.next/server/chunks/ssr/[root-of-the-server]__712e3fd9._.js +4 -0
  148. package/mcp-server/.next/server/chunks/ssr/{[root-of-the-server]__db74836a._.js.map → [root-of-the-server]__712e3fd9._.js.map} +1 -1
  149. package/mcp-server/.next/server/chunks/ssr/[root-of-the-server]__7a510847._.js +3 -0
  150. package/mcp-server/.next/server/chunks/ssr/{[root-of-the-server]__9bc632fa._.js.map → [root-of-the-server]__7a510847._.js.map} +1 -1
  151. package/mcp-server/.next/server/chunks/ssr/[root-of-the-server]__93844002._.js +3 -0
  152. package/mcp-server/.next/server/chunks/ssr/{[root-of-the-server]__fc10c8f1._.js.map → [root-of-the-server]__93844002._.js.map} +1 -1
  153. package/mcp-server/.next/server/chunks/ssr/[root-of-the-server]__9fa75557._.js +3 -0
  154. package/mcp-server/.next/server/chunks/ssr/{[root-of-the-server]__05689c01._.js.map → [root-of-the-server]__9fa75557._.js.map} +1 -1
  155. package/mcp-server/.next/server/chunks/ssr/[root-of-the-server]__d545d815._.js +3 -0
  156. package/mcp-server/.next/server/chunks/ssr/{[root-of-the-server]__aed64cd3._.js.map → [root-of-the-server]__d545d815._.js.map} +1 -1
  157. package/mcp-server/.next/server/chunks/ssr/[turbopack]_runtime.js +1 -1
  158. package/mcp-server/.next/server/chunks/ssr/[turbopack]_runtime.js.map +1 -1
  159. package/mcp-server/.next/server/chunks/ssr/_2485ac42._.js +4 -0
  160. package/mcp-server/.next/server/chunks/ssr/_2485ac42._.js.map +1 -0
  161. package/mcp-server/.next/server/chunks/ssr/_7665d4b6._.js +8 -0
  162. package/mcp-server/.next/server/chunks/ssr/_7665d4b6._.js.map +1 -0
  163. package/mcp-server/.next/server/chunks/ssr/_85b0bb0e._.js +4 -0
  164. package/mcp-server/.next/server/chunks/ssr/_85b0bb0e._.js.map +1 -0
  165. package/mcp-server/.next/server/chunks/ssr/_ab0d4e66._.js +4 -0
  166. package/mcp-server/.next/server/chunks/ssr/_ab0d4e66._.js.map +1 -0
  167. package/mcp-server/.next/server/chunks/ssr/_f8d18179._.js +8 -0
  168. package/mcp-server/.next/server/chunks/ssr/_f8d18179._.js.map +1 -0
  169. package/mcp-server/.next/server/chunks/ssr/mcp-server_app_layout_tsx_afa41767._.js +1 -1
  170. package/mcp-server/.next/server/chunks/ssr/mcp-server_app_page_tsx_9fc46577._.js +1 -1
  171. package/mcp-server/.next/server/chunks/ssr/mcp-server_app_page_tsx_9fc46577._.js.map +1 -1
  172. package/mcp-server/.next/server/chunks/ssr/mcp-server_components_dark-mode-toggle_tsx_f31dd15d._.js +1 -1
  173. package/mcp-server/.next/server/chunks/ssr/mcp-server_components_dark-mode-toggle_tsx_f31dd15d._.js.map +1 -1
  174. package/mcp-server/.next/server/chunks/ssr/node_modules__pnpm_c4e917e2._.js +5 -0
  175. package/mcp-server/.next/server/chunks/ssr/node_modules__pnpm_c4e917e2._.js.map +1 -0
  176. package/mcp-server/.next/server/middleware-build-manifest.js +6 -8
  177. package/mcp-server/.next/server/server-reference-manifest.js +1 -1
  178. package/mcp-server/.next/server/server-reference-manifest.json +1 -1
  179. package/mcp-server/.next/static/chunks/05266f8dc7f39515.js +1 -0
  180. package/mcp-server/.next/static/chunks/254fc038b458fc24.js +1 -0
  181. package/mcp-server/.next/static/chunks/47dfa4a59a973c81.js +3 -0
  182. package/mcp-server/.next/static/chunks/523922d638939c73.js +3 -0
  183. package/mcp-server/.next/static/chunks/65304580f587f083.js +4 -0
  184. package/mcp-server/.next/static/chunks/6ceb8223d9b0e885.js +1 -0
  185. package/mcp-server/.next/static/chunks/8ed7fe711322c4f9.css +1 -0
  186. package/mcp-server/.next/static/chunks/9d92c8368f54bcf4.js +1 -0
  187. package/mcp-server/.next/static/chunks/c5e14dcc4f8e1b05.js +20 -0
  188. package/mcp-server/.next/static/chunks/cf974972e06aaa61.js +3 -0
  189. package/mcp-server/.next/static/chunks/{711519b5a2e53fc8.js → e161f5ca5017b065.js} +1 -1
  190. package/mcp-server/.next/static/chunks/f4943fd29d67839f.js +1 -0
  191. package/mcp-server/.next/static/chunks/turbopack-d86fbc741b623284.js +3 -0
  192. package/mcp-server/next.config.mjs +2 -1
  193. package/mcp-server/tsconfig.json +1 -1
  194. package/package.json +4 -4
  195. package/mcp-server/.next/server/chunks/[root-of-the-server]__013bbeea._.js +0 -7
  196. package/mcp-server/.next/server/chunks/[root-of-the-server]__013bbeea._.js.map +0 -1
  197. package/mcp-server/.next/server/chunks/[root-of-the-server]__05e38acd._.js +0 -3
  198. package/mcp-server/.next/server/chunks/[root-of-the-server]__05e38acd._.js.map +0 -1
  199. package/mcp-server/.next/server/chunks/[root-of-the-server]__2056c8b5._.js +0 -3
  200. package/mcp-server/.next/server/chunks/[root-of-the-server]__2056c8b5._.js.map +0 -1
  201. package/mcp-server/.next/server/chunks/[root-of-the-server]__3130ceec._.js +0 -3
  202. package/mcp-server/.next/server/chunks/[root-of-the-server]__3130ceec._.js.map +0 -1
  203. package/mcp-server/.next/server/chunks/[root-of-the-server]__5114419d._.js +0 -3
  204. package/mcp-server/.next/server/chunks/[root-of-the-server]__5114419d._.js.map +0 -1
  205. package/mcp-server/.next/server/chunks/[root-of-the-server]__5248c9ff._.js +0 -3
  206. package/mcp-server/.next/server/chunks/[root-of-the-server]__73645708._.js +0 -11
  207. package/mcp-server/.next/server/chunks/[root-of-the-server]__73645708._.js.map +0 -1
  208. package/mcp-server/.next/server/chunks/[root-of-the-server]__8fc8f497._.js +0 -4
  209. package/mcp-server/.next/server/chunks/[root-of-the-server]__8fc8f497._.js.map +0 -1
  210. package/mcp-server/.next/server/chunks/[root-of-the-server]__9c489027._.js +0 -3
  211. package/mcp-server/.next/server/chunks/[root-of-the-server]__9c489027._.js.map +0 -1
  212. package/mcp-server/.next/server/chunks/[root-of-the-server]__a004a307._.js +0 -3
  213. package/mcp-server/.next/server/chunks/[root-of-the-server]__a004a307._.js.map +0 -1
  214. package/mcp-server/.next/server/chunks/[root-of-the-server]__cc81580c._.js +0 -3
  215. package/mcp-server/.next/server/chunks/[root-of-the-server]__d200fe4a._.js +0 -3
  216. package/mcp-server/.next/server/chunks/[root-of-the-server]__d200fe4a._.js.map +0 -1
  217. package/mcp-server/.next/server/chunks/[root-of-the-server]__dc0b0022._.js +0 -17
  218. package/mcp-server/.next/server/chunks/[root-of-the-server]__dc0b0022._.js.map +0 -1
  219. package/mcp-server/.next/server/chunks/d1d76_next_09a9e080._.js +0 -17
  220. package/mcp-server/.next/server/chunks/d1d76_next_09a9e080._.js.map +0 -1
  221. package/mcp-server/.next/server/chunks/d1d76_next_dist_esm_build_templates_app-route_820fc951.js +0 -3
  222. package/mcp-server/.next/server/chunks/d1d76_next_dist_esm_build_templates_app-route_820fc951.js.map +0 -1
  223. package/mcp-server/.next/server/chunks/ssr/[root-of-the-server]__02a8c992._.js +0 -3
  224. package/mcp-server/.next/server/chunks/ssr/[root-of-the-server]__05689c01._.js +0 -3
  225. package/mcp-server/.next/server/chunks/ssr/[root-of-the-server]__61c905ce._.js +0 -3
  226. package/mcp-server/.next/server/chunks/ssr/[root-of-the-server]__8863b0f6._.js +0 -3
  227. package/mcp-server/.next/server/chunks/ssr/[root-of-the-server]__8863b0f6._.js.map +0 -1
  228. package/mcp-server/.next/server/chunks/ssr/[root-of-the-server]__9bc632fa._.js +0 -3
  229. package/mcp-server/.next/server/chunks/ssr/[root-of-the-server]__9f07837d._.js +0 -3
  230. package/mcp-server/.next/server/chunks/ssr/[root-of-the-server]__aed64cd3._.js +0 -3
  231. package/mcp-server/.next/server/chunks/ssr/[root-of-the-server]__cf030fda._.js +0 -3
  232. package/mcp-server/.next/server/chunks/ssr/[root-of-the-server]__db74836a._.js +0 -3
  233. package/mcp-server/.next/server/chunks/ssr/[root-of-the-server]__fc10c8f1._.js +0 -3
  234. package/mcp-server/.next/server/chunks/ssr/_0b8335fc._.js +0 -8
  235. package/mcp-server/.next/server/chunks/ssr/_0b8335fc._.js.map +0 -1
  236. package/mcp-server/.next/server/chunks/ssr/_6129d8ec._.js +0 -4
  237. package/mcp-server/.next/server/chunks/ssr/_6129d8ec._.js.map +0 -1
  238. package/mcp-server/.next/server/chunks/ssr/_74bf5366._.js +0 -8
  239. package/mcp-server/.next/server/chunks/ssr/_74bf5366._.js.map +0 -1
  240. package/mcp-server/.next/server/chunks/ssr/_7d3d2f5f._.js +0 -4
  241. package/mcp-server/.next/server/chunks/ssr/_7d3d2f5f._.js.map +0 -1
  242. package/mcp-server/.next/server/chunks/ssr/_e4aa8f16._.js +0 -4
  243. package/mcp-server/.next/server/chunks/ssr/_e4aa8f16._.js.map +0 -1
  244. package/mcp-server/.next/server/chunks/ssr/d1d76_next_dist_032c5c2e._.js +0 -3
  245. package/mcp-server/.next/server/chunks/ssr/d1d76_next_dist_032c5c2e._.js.map +0 -1
  246. package/mcp-server/.next/server/chunks/ssr/d1d76_next_dist_08b22e19._.js +0 -3
  247. package/mcp-server/.next/server/chunks/ssr/d1d76_next_dist_08b22e19._.js.map +0 -1
  248. package/mcp-server/.next/server/chunks/ssr/d1d76_next_dist_369453b3._.js +0 -6
  249. package/mcp-server/.next/server/chunks/ssr/d1d76_next_dist_369453b3._.js.map +0 -1
  250. package/mcp-server/.next/server/chunks/ssr/d1d76_next_dist_ad253fdc._.js +0 -4
  251. package/mcp-server/.next/server/chunks/ssr/d1d76_next_dist_ad253fdc._.js.map +0 -1
  252. package/mcp-server/.next/server/chunks/ssr/d1d76_next_dist_b9509b36._.js +0 -6
  253. package/mcp-server/.next/server/chunks/ssr/d1d76_next_dist_b9509b36._.js.map +0 -1
  254. package/mcp-server/.next/server/chunks/ssr/d1d76_next_dist_client_components_6557bb14._.js +0 -3
  255. package/mcp-server/.next/server/chunks/ssr/d1d76_next_dist_client_components_builtin_global-error_3d982957.js +0 -3
  256. package/mcp-server/.next/server/chunks/ssr/d1d76_next_dist_esm_build_templates_app-page_134a93a5.js +0 -4
  257. package/mcp-server/.next/server/chunks/ssr/d1d76_next_dist_esm_build_templates_app-page_134a93a5.js.map +0 -1
  258. package/mcp-server/.next/server/chunks/ssr/node_modules__pnpm_3d10aa72._.js +0 -3
  259. package/mcp-server/.next/server/chunks/ssr/node_modules__pnpm_3d10aa72._.js.map +0 -1
  260. package/mcp-server/.next/static/chunks/1d2676338b51bbcf.js +0 -1
  261. package/mcp-server/.next/static/chunks/312a4c1c7f6436ef.js +0 -1
  262. package/mcp-server/.next/static/chunks/4b6eda65c6f5aada.js +0 -1
  263. package/mcp-server/.next/static/chunks/526448e84b58822c.js +0 -1
  264. package/mcp-server/.next/static/chunks/7abbb9a17b62c1fa.js +0 -1
  265. package/mcp-server/.next/static/chunks/8364b81221aabb64.js +0 -1
  266. package/mcp-server/.next/static/chunks/a42830291751fe48.js +0 -1
  267. package/mcp-server/.next/static/chunks/addab50e23821c6c.js +0 -1
  268. package/mcp-server/.next/static/chunks/bb2e6ac36794beea.css +0 -1
  269. package/mcp-server/.next/static/chunks/c578923146856601.js +0 -1
  270. package/mcp-server/.next/static/chunks/f08166f7946c2e06.js +0 -1
  271. package/mcp-server/.next/static/chunks/turbopack-22a9e2c19fd12b04.js +0 -3
  272. /package/mcp-server/.next/server/chunks/{[root-of-the-server]__5248c9ff._.js.map → [root-of-the-server]__37cbcfad._.js.map} +0 -0
  273. /package/mcp-server/.next/server/chunks/ssr/{[root-of-the-server]__02a8c992._.js.map → [root-of-the-server]__2c3254f5._.js.map} +0 -0
  274. /package/mcp-server/.next/static/{-TtqAPrTs-tn08AeRdCVu → IjjcEdBSrakBEegq2HWWk}/_buildManifest.js +0 -0
  275. /package/mcp-server/.next/static/{-TtqAPrTs-tn08AeRdCVu → IjjcEdBSrakBEegq2HWWk}/_clientMiddlewareManifest.json +0 -0
  276. /package/mcp-server/.next/static/{-TtqAPrTs-tn08AeRdCVu → IjjcEdBSrakBEegq2HWWk}/_ssgManifest.js +0 -0
@@ -0,0 +1,3 @@
1
+ module.exports=[18622,(e,t,r)=>{t.exports=e.x("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js",()=>require("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js"))},56704,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-async-storage.external.js",()=>require("next/dist/server/app-render/work-async-storage.external.js"))},32319,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-unit-async-storage.external.js",()=>require("next/dist/server/app-render/work-unit-async-storage.external.js"))},70406,(e,t,r)=>{t.exports=e.x("next/dist/compiled/@opentelemetry/api",()=>require("next/dist/compiled/@opentelemetry/api"))},14747,(e,t,r)=>{t.exports=e.x("path",()=>require("path"))},93695,(e,t,r)=>{t.exports=e.x("next/dist/shared/lib/no-fallback-error.external.js",()=>require("next/dist/shared/lib/no-fallback-error.external.js"))},22734,(e,t,r)=>{t.exports=e.x("fs",()=>require("fs"))},32518,e=>{"use strict";var t=e.i(12e3),r=e.i(32560),n=e.i(76834),a=e.i(74423),s=e.i(39932),o=e.i(18271),i=e.i(39350),l=e.i(69635),d=e.i(58154),u=e.i(98378),p=e.i(2818),c=e.i(65015),h=e.i(62177),m=e.i(46523),x=e.i(96843),R=e.i(97497),v=e.i(93695);e.i(2239);var g=e.i(13167),f=e.i(22734),E=e.i(14747);async function w(e){try{let e=process.env.LOG_FILE_PATH||"/var/log/dev3000/dev3000.log";if(!(0,f.existsSync)(e))return Response.json({error:"Current log file not found"},{status:404});let t=(0,E.dirname)(e),r=(0,E.basename)(e),n=r.match(/^dev3000-(.+?)-\d{4}-\d{2}-\d{2}T/),a=n?n[1]:"unknown",s=[];try{let e=(0,f.readdirSync)(t).filter(e=>e.startsWith(`dev3000-${a}-`)&&e.endsWith(".log")).map(e=>{let n=(0,E.join)(t,e),a=(0,f.statSync)(n),s=e.match(/(\d{4}-\d{2}-\d{2}T[\d-]+Z)/),o=s?s[1].replace(/-/g,":"):"";return{name:e,path:n,timestamp:o,size:a.size,mtime:a.mtime,isCurrent:e===r}}).sort((e,t)=>t.mtime.getTime()-e.mtime.getTime());s.push(...e)}catch(e){console.warn("Could not read log directory:",e)}return Response.json({files:s,currentFile:e,projectName:a})}catch(t){let e={error:t instanceof Error?t.message:"Unknown error"};return Response.json(e,{status:500})}}e.s(["GET",()=>w],15e3);var y=e.i(15e3);let C=new t.AppRouteRouteModule({definition:{kind:r.RouteKind.APP_ROUTE,page:"/api/logs/list/route",pathname:"/api/logs/list",filename:"route",bundlePath:""},distDir:".next",relativeProjectDir:"",resolvedPagePath:"[project]/mcp-server/app/api/logs/list/route.ts",nextConfigOutput:"",userland:y}),{workAsyncStorage:A,workUnitAsyncStorage:T,serverHooks:b}=C;function q(){return(0,n.patchFetch)({workAsyncStorage:A,workUnitAsyncStorage:T})}async function N(e,t,n){var f;C.isDev&&(0,a.addRequestMeta)(e,"devRequestTimingInternalsEnd",process.hrtime.bigint());let E="/api/logs/list/route";E=E.replace(/\/index$/,"")||"/";let w=await C.prepare(e,t,{srcPage:E,multiZoneDraftMode:!1});if(!w)return t.statusCode=400,t.end("Bad Request"),null==n.waitUntil||n.waitUntil.call(n,Promise.resolve()),null;let{buildId:y,params:A,nextConfig:T,isDraftMode:b,prerenderManifest:q,routerServerContext:N,isOnDemandRevalidate:P,revalidateOnlyGenerated:S,resolvedPathname:O,clientReferenceManifest:_,serverActionsManifest:k}=w,M=(0,l.normalizeAppPath)(E),j=!!(q.dynamicRoutes[M]||q.routes[O]);if(j&&!b){let e=!!q.routes[O],t=q.dynamicRoutes[M];if(t&&!1===t.fallback&&!e)throw new v.NoFallbackError}let H=null;!j||C.isDev||b||(H="/index"===(H=O)?"/":H);let U=!0===C.isDev||!j,I=j&&!U;k&&_&&(0,o.setReferenceManifestsSingleton)({page:E,clientReferenceManifest:_,serverActionsManifest:k,serverModuleMap:(0,i.createServerModuleMap)({serverActionsManifest:k})});let D=e.method||"GET",F=(0,s.getTracer)(),$=F.getActiveScopeSpan(),K={params:A,prerenderManifest:q,renderOpts:{experimental:{cacheComponents:!!T.experimental.cacheComponents,authInterrupts:!!T.experimental.authInterrupts},supportsDynamicResponse:U,incrementalCache:(0,a.getRequestMeta)(e,"incrementalCache"),cacheLifeProfiles:null==(f=T.experimental)?void 0:f.cacheLife,waitUntil:n.waitUntil,onClose:e=>{t.on("close",e)},onAfterTaskError:void 0,onInstrumentationRequestError:(t,r,n)=>C.onRequestError(e,t,n,N)},sharedContext:{buildId:y}},L=new d.NodeNextRequest(e),B=new d.NodeNextResponse(t),G=u.NextRequestAdapter.fromNodeNextRequest(L,(0,u.signalFromNodeResponse)(t));try{let o=async e=>C.handle(G,K).finally(()=>{if(!e)return;e.setAttributes({"http.status_code":t.statusCode,"next.rsc":!1});let r=F.getRootSpanAttributes();if(!r)return;if(r.get("next.span_type")!==p.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${r.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let n=r.get("next.route");if(n){let t=`${D} ${n}`;e.setAttributes({"next.route":n,"http.route":n,"next.span_name":t}),e.updateName(t)}else e.updateName(`${D} ${E}`)}),i=async s=>{var i,l;let d=async({previousCacheEntry:r})=>{try{if(!(0,a.getRequestMeta)(e,"minimalMode")&&P&&S&&!r)return t.statusCode=404,t.setHeader("x-nextjs-cache","REVALIDATED"),t.end("This page could not be found"),null;let i=await o(s);e.fetchMetrics=K.renderOpts.fetchMetrics;let l=K.renderOpts.pendingWaitUntil;l&&n.waitUntil&&(n.waitUntil(l),l=void 0);let d=K.renderOpts.collectedTags;if(!j)return await (0,h.sendResponse)(L,B,i,K.renderOpts.pendingWaitUntil),null;{let e=await i.blob(),t=(0,m.toNodeOutgoingHttpHeaders)(i.headers);d&&(t[R.NEXT_CACHE_TAGS_HEADER]=d),!t["content-type"]&&e.type&&(t["content-type"]=e.type);let r=void 0!==K.renderOpts.collectedRevalidate&&!(K.renderOpts.collectedRevalidate>=R.INFINITE_CACHE)&&K.renderOpts.collectedRevalidate,n=void 0===K.renderOpts.collectedExpire||K.renderOpts.collectedExpire>=R.INFINITE_CACHE?void 0:K.renderOpts.collectedExpire;return{value:{kind:g.CachedRouteKind.APP_ROUTE,status:i.status,body:Buffer.from(await e.arrayBuffer()),headers:t},cacheControl:{revalidate:r,expire:n}}}}catch(t){throw(null==r?void 0:r.isStale)&&await C.onRequestError(e,t,{routerKind:"App Router",routePath:E,routeType:"route",revalidateReason:(0,c.getRevalidateReason)({isStaticGeneration:I,isOnDemandRevalidate:P})},N),t}},u=await C.handleResponse({req:e,nextConfig:T,cacheKey:H,routeKind:r.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:q,isRoutePPREnabled:!1,isOnDemandRevalidate:P,revalidateOnlyGenerated:S,responseGenerator:d,waitUntil:n.waitUntil});if(!j)return null;if((null==u||null==(i=u.value)?void 0:i.kind)!==g.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==u||null==(l=u.value)?void 0:l.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});(0,a.getRequestMeta)(e,"minimalMode")||t.setHeader("x-nextjs-cache",P?"REVALIDATED":u.isMiss?"MISS":u.isStale?"STALE":"HIT"),b&&t.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let p=(0,m.fromNodeOutgoingHttpHeaders)(u.value.headers);return(0,a.getRequestMeta)(e,"minimalMode")&&j||p.delete(R.NEXT_CACHE_TAGS_HEADER),!u.cacheControl||t.getHeader("Cache-Control")||p.get("Cache-Control")||p.set("Cache-Control",(0,x.getCacheControlHeader)(u.cacheControl)),await (0,h.sendResponse)(L,B,new Response(u.value.body,{headers:p,status:u.value.status||200})),null};$?await i($):await F.withPropagatedContext(e.headers,()=>F.trace(p.BaseServerSpan.handleRequest,{spanName:`${D} ${E}`,kind:s.SpanKind.SERVER,attributes:{"http.method":D,"http.target":e.url}},i))}catch(t){if(t instanceof v.NoFallbackError||await C.onRequestError(e,t,{routerKind:"App Router",routePath:M,routeType:"route",revalidateReason:(0,c.getRevalidateReason)({isStaticGeneration:I,isOnDemandRevalidate:P})}),j)throw t;return await (0,h.sendResponse)(L,B,new Response(null,{status:500})),null}}e.s(["handler",()=>N,"patchFetch",()=>q,"routeModule",()=>C,"serverHooks",()=>b,"workAsyncStorage",()=>A,"workUnitAsyncStorage",()=>T],32518)}];
2
+
3
+ //# sourceMappingURL=%5Broot-of-the-server%5D__d8c4b7af._.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["turbopack:///[project]/mcp-server/app/api/logs/list/route.ts","turbopack:///[project]/node_modules/.pnpm/next@16.0.0-canary.10_babel-plugin-react-compiler@19.1.0-rc.3_react-dom@19.1.1_react@19.1.1__react@19.1.1/node_modules/next/dist/esm/build/templates/app-route.js"],"sourcesContent":["import { existsSync, readdirSync, statSync } from \"fs\"\nimport type { NextRequest } from \"next/server\"\nimport { basename, dirname, join } from \"path\"\nimport type { LogFile, LogListError, LogListResponse } from \"@/types\"\n\nexport async function GET(_request: NextRequest): Promise<Response> {\n try {\n const currentLogPath = process.env.LOG_FILE_PATH || \"/var/log/dev3000/dev3000.log\"\n\n if (!existsSync(currentLogPath)) {\n const errorResponse: LogListError = { error: \"Current log file not found\" }\n return Response.json(errorResponse, { status: 404 })\n }\n\n // Get the directory containing the current log\n const logDir = dirname(currentLogPath)\n const currentLogName = basename(currentLogPath)\n\n // Extract project name from current log filename\n // Format: dev3000-{projectName}-{timestamp}.log\n const projectMatch = currentLogName.match(/^dev3000-(.+?)-\\d{4}-\\d{2}-\\d{2}T/)\n const projectName = projectMatch ? projectMatch[1] : \"unknown\"\n\n // Find all log files for this project\n const files: LogFile[] = []\n\n try {\n const dirContents = readdirSync(logDir)\n const logFiles = dirContents\n .filter((file) => file.startsWith(`dev3000-${projectName}-`) && file.endsWith(\".log\"))\n .map((file) => {\n const filePath = join(logDir, file)\n const stats = statSync(filePath)\n\n // Extract timestamp from filename\n const timestampMatch = file.match(/(\\d{4}-\\d{2}-\\d{2}T[\\d-]+Z)/)\n const timestamp = timestampMatch ? timestampMatch[1].replace(/-/g, \":\") : \"\"\n\n return {\n name: file,\n path: filePath,\n timestamp,\n size: stats.size,\n mtime: stats.mtime,\n isCurrent: file === currentLogName\n }\n })\n .sort((a, b) => b.mtime.getTime() - a.mtime.getTime()) // Most recent first\n\n files.push(...logFiles)\n } catch (error) {\n console.warn(\"Could not read log directory:\", error)\n }\n\n const response: LogListResponse = {\n files,\n currentFile: currentLogPath,\n projectName\n }\n\n return Response.json(response)\n } catch (error) {\n const errorResponse: LogListError = {\n error: error instanceof Error ? error.message : \"Unknown error\"\n }\n return Response.json(errorResponse, { status: 500 })\n }\n}\n","import { AppRouteRouteModule } from \"next/dist/esm/server/route-modules/app-route/module.compiled\";\nimport { RouteKind } from \"next/dist/esm/server/route-kind\";\nimport { patchFetch as _patchFetch } from \"next/dist/esm/server/lib/patch-fetch\";\nimport { addRequestMeta, getRequestMeta } from \"next/dist/esm/server/request-meta\";\nimport { getTracer, SpanKind } from \"next/dist/esm/server/lib/trace/tracer\";\nimport { setReferenceManifestsSingleton } from \"next/dist/esm/server/app-render/encryption-utils\";\nimport { createServerModuleMap } from \"next/dist/esm/server/app-render/action-utils\";\nimport { normalizeAppPath } from \"next/dist/esm/shared/lib/router/utils/app-paths\";\nimport { NodeNextRequest, NodeNextResponse } from \"next/dist/esm/server/base-http/node\";\nimport { NextRequestAdapter, signalFromNodeResponse } from \"next/dist/esm/server/web/spec-extension/adapters/next-request\";\nimport { BaseServerSpan } from \"next/dist/esm/server/lib/trace/constants\";\nimport { getRevalidateReason } from \"next/dist/esm/server/instrumentation/utils\";\nimport { sendResponse } from \"next/dist/esm/server/send-response\";\nimport { fromNodeOutgoingHttpHeaders, toNodeOutgoingHttpHeaders } from \"next/dist/esm/server/web/utils\";\nimport { getCacheControlHeader } from \"next/dist/esm/server/lib/cache-control\";\nimport { INFINITE_CACHE, NEXT_CACHE_TAGS_HEADER } from \"next/dist/esm/lib/constants\";\nimport { NoFallbackError } from \"next/dist/esm/shared/lib/no-fallback-error.external\";\nimport { CachedRouteKind } from \"next/dist/esm/server/response-cache\";\nimport * as userland from \"INNER_APP_ROUTE\";\n// We inject the nextConfigOutput here so that we can use them in the route\n// module.\nconst nextConfigOutput = \"\"\nconst routeModule = new AppRouteRouteModule({\n definition: {\n kind: RouteKind.APP_ROUTE,\n page: \"/api/logs/list/route\",\n pathname: \"/api/logs/list\",\n filename: \"route\",\n bundlePath: \"\"\n },\n distDir: process.env.__NEXT_RELATIVE_DIST_DIR || '',\n relativeProjectDir: process.env.__NEXT_RELATIVE_PROJECT_DIR || '',\n resolvedPagePath: \"[project]/mcp-server/app/api/logs/list/route.ts\",\n nextConfigOutput,\n userland\n});\n// Pull out the exports that we need to expose from the module. This should\n// be eliminated when we've moved the other routes to the new format. These\n// are used to hook into the route.\nconst { workAsyncStorage, workUnitAsyncStorage, serverHooks } = routeModule;\nfunction patchFetch() {\n return _patchFetch({\n workAsyncStorage,\n workUnitAsyncStorage\n });\n}\nexport { routeModule, workAsyncStorage, workUnitAsyncStorage, serverHooks, patchFetch, };\nexport async function handler(req, res, ctx) {\n var _nextConfig_experimental;\n if (routeModule.isDev) {\n addRequestMeta(req, 'devRequestTimingInternalsEnd', process.hrtime.bigint());\n }\n let srcPage = \"/api/logs/list/route\";\n // turbopack doesn't normalize `/index` in the page name\n // so we need to to process dynamic routes properly\n // TODO: fix turbopack providing differing value from webpack\n if (process.env.TURBOPACK) {\n srcPage = srcPage.replace(/\\/index$/, '') || '/';\n } else if (srcPage === '/index') {\n // we always normalize /index specifically\n srcPage = '/';\n }\n const multiZoneDraftMode = process.env.__NEXT_MULTI_ZONE_DRAFT_MODE;\n const prepareResult = await routeModule.prepare(req, res, {\n srcPage,\n multiZoneDraftMode\n });\n if (!prepareResult) {\n res.statusCode = 400;\n res.end('Bad Request');\n ctx.waitUntil == null ? void 0 : ctx.waitUntil.call(ctx, Promise.resolve());\n return null;\n }\n const { buildId, params, nextConfig, isDraftMode, prerenderManifest, routerServerContext, isOnDemandRevalidate, revalidateOnlyGenerated, resolvedPathname, clientReferenceManifest, serverActionsManifest } = prepareResult;\n const normalizedSrcPage = normalizeAppPath(srcPage);\n let isIsr = Boolean(prerenderManifest.dynamicRoutes[normalizedSrcPage] || prerenderManifest.routes[resolvedPathname]);\n if (isIsr && !isDraftMode) {\n const isPrerendered = Boolean(prerenderManifest.routes[resolvedPathname]);\n const prerenderInfo = prerenderManifest.dynamicRoutes[normalizedSrcPage];\n if (prerenderInfo) {\n if (prerenderInfo.fallback === false && !isPrerendered) {\n throw new NoFallbackError();\n }\n }\n }\n let cacheKey = null;\n if (isIsr && !routeModule.isDev && !isDraftMode) {\n cacheKey = resolvedPathname;\n // ensure /index and / is normalized to one key\n cacheKey = cacheKey === '/index' ? '/' : cacheKey;\n }\n const supportsDynamicResponse = // If we're in development, we always support dynamic HTML\n routeModule.isDev === true || // If this is not SSG or does not have static paths, then it supports\n // dynamic HTML.\n !isIsr;\n // This is a revalidation request if the request is for a static\n // page and it is not being resumed from a postponed render and\n // it is not a dynamic RSC request then it is a revalidation\n // request.\n const isStaticGeneration = isIsr && !supportsDynamicResponse;\n // Before rendering (which initializes component tree modules), we have to\n // set the reference manifests to our global store so Server Action's\n // encryption util can access to them at the top level of the page module.\n if (serverActionsManifest && clientReferenceManifest) {\n setReferenceManifestsSingleton({\n page: srcPage,\n clientReferenceManifest,\n serverActionsManifest,\n serverModuleMap: createServerModuleMap({\n serverActionsManifest\n })\n });\n }\n const method = req.method || 'GET';\n const tracer = getTracer();\n const activeSpan = tracer.getActiveScopeSpan();\n const context = {\n params,\n prerenderManifest,\n renderOpts: {\n experimental: {\n cacheComponents: Boolean(nextConfig.experimental.cacheComponents),\n authInterrupts: Boolean(nextConfig.experimental.authInterrupts)\n },\n supportsDynamicResponse,\n incrementalCache: getRequestMeta(req, 'incrementalCache'),\n cacheLifeProfiles: (_nextConfig_experimental = nextConfig.experimental) == null ? void 0 : _nextConfig_experimental.cacheLife,\n waitUntil: ctx.waitUntil,\n onClose: (cb)=>{\n res.on('close', cb);\n },\n onAfterTaskError: undefined,\n onInstrumentationRequestError: (error, _request, errorContext)=>routeModule.onRequestError(req, error, errorContext, routerServerContext)\n },\n sharedContext: {\n buildId\n }\n };\n const nodeNextReq = new NodeNextRequest(req);\n const nodeNextRes = new NodeNextResponse(res);\n const nextReq = NextRequestAdapter.fromNodeNextRequest(nodeNextReq, signalFromNodeResponse(res));\n try {\n const invokeRouteModule = async (span)=>{\n return routeModule.handle(nextReq, context).finally(()=>{\n if (!span) return;\n span.setAttributes({\n 'http.status_code': res.statusCode,\n 'next.rsc': false\n });\n const rootSpanAttributes = tracer.getRootSpanAttributes();\n // We were unable to get attributes, probably OTEL is not enabled\n if (!rootSpanAttributes) {\n return;\n }\n if (rootSpanAttributes.get('next.span_type') !== BaseServerSpan.handleRequest) {\n console.warn(`Unexpected root span type '${rootSpanAttributes.get('next.span_type')}'. Please report this Next.js issue https://github.com/vercel/next.js`);\n return;\n }\n const route = rootSpanAttributes.get('next.route');\n if (route) {\n const name = `${method} ${route}`;\n span.setAttributes({\n 'next.route': route,\n 'http.route': route,\n 'next.span_name': name\n });\n span.updateName(name);\n } else {\n span.updateName(`${method} ${srcPage}`);\n }\n });\n };\n const handleResponse = async (currentSpan)=>{\n var _cacheEntry_value;\n const responseGenerator = async ({ previousCacheEntry })=>{\n try {\n if (!getRequestMeta(req, 'minimalMode') && isOnDemandRevalidate && revalidateOnlyGenerated && !previousCacheEntry) {\n res.statusCode = 404;\n // on-demand revalidate always sets this header\n res.setHeader('x-nextjs-cache', 'REVALIDATED');\n res.end('This page could not be found');\n return null;\n }\n const response = await invokeRouteModule(currentSpan);\n req.fetchMetrics = context.renderOpts.fetchMetrics;\n let pendingWaitUntil = context.renderOpts.pendingWaitUntil;\n // Attempt using provided waitUntil if available\n // if it's not we fallback to sendResponse's handling\n if (pendingWaitUntil) {\n if (ctx.waitUntil) {\n ctx.waitUntil(pendingWaitUntil);\n pendingWaitUntil = undefined;\n }\n }\n const cacheTags = context.renderOpts.collectedTags;\n // If the request is for a static response, we can cache it so long\n // as it's not edge.\n if (isIsr) {\n const blob = await response.blob();\n // Copy the headers from the response.\n const headers = toNodeOutgoingHttpHeaders(response.headers);\n if (cacheTags) {\n headers[NEXT_CACHE_TAGS_HEADER] = cacheTags;\n }\n if (!headers['content-type'] && blob.type) {\n headers['content-type'] = blob.type;\n }\n const revalidate = typeof context.renderOpts.collectedRevalidate === 'undefined' || context.renderOpts.collectedRevalidate >= INFINITE_CACHE ? false : context.renderOpts.collectedRevalidate;\n const expire = typeof context.renderOpts.collectedExpire === 'undefined' || context.renderOpts.collectedExpire >= INFINITE_CACHE ? undefined : context.renderOpts.collectedExpire;\n // Create the cache entry for the response.\n const cacheEntry = {\n value: {\n kind: CachedRouteKind.APP_ROUTE,\n status: response.status,\n body: Buffer.from(await blob.arrayBuffer()),\n headers\n },\n cacheControl: {\n revalidate,\n expire\n }\n };\n return cacheEntry;\n } else {\n // send response without caching if not ISR\n await sendResponse(nodeNextReq, nodeNextRes, response, context.renderOpts.pendingWaitUntil);\n return null;\n }\n } catch (err) {\n // if this is a background revalidate we need to report\n // the request error here as it won't be bubbled\n if (previousCacheEntry == null ? void 0 : previousCacheEntry.isStale) {\n await routeModule.onRequestError(req, err, {\n routerKind: 'App Router',\n routePath: srcPage,\n routeType: 'route',\n revalidateReason: getRevalidateReason({\n isStaticGeneration,\n isOnDemandRevalidate\n })\n }, routerServerContext);\n }\n throw err;\n }\n };\n const cacheEntry = await routeModule.handleResponse({\n req,\n nextConfig,\n cacheKey,\n routeKind: RouteKind.APP_ROUTE,\n isFallback: false,\n prerenderManifest,\n isRoutePPREnabled: false,\n isOnDemandRevalidate,\n revalidateOnlyGenerated,\n responseGenerator,\n waitUntil: ctx.waitUntil\n });\n // we don't create a cacheEntry for ISR\n if (!isIsr) {\n return null;\n }\n if ((cacheEntry == null ? void 0 : (_cacheEntry_value = cacheEntry.value) == null ? void 0 : _cacheEntry_value.kind) !== CachedRouteKind.APP_ROUTE) {\n var _cacheEntry_value1;\n throw Object.defineProperty(new Error(`Invariant: app-route received invalid cache entry ${cacheEntry == null ? void 0 : (_cacheEntry_value1 = cacheEntry.value) == null ? void 0 : _cacheEntry_value1.kind}`), \"__NEXT_ERROR_CODE\", {\n value: \"E701\",\n enumerable: false,\n configurable: true\n });\n }\n if (!getRequestMeta(req, 'minimalMode')) {\n res.setHeader('x-nextjs-cache', isOnDemandRevalidate ? 'REVALIDATED' : cacheEntry.isMiss ? 'MISS' : cacheEntry.isStale ? 'STALE' : 'HIT');\n }\n // Draft mode should never be cached\n if (isDraftMode) {\n res.setHeader('Cache-Control', 'private, no-cache, no-store, max-age=0, must-revalidate');\n }\n const headers = fromNodeOutgoingHttpHeaders(cacheEntry.value.headers);\n if (!(getRequestMeta(req, 'minimalMode') && isIsr)) {\n headers.delete(NEXT_CACHE_TAGS_HEADER);\n }\n // If cache control is already set on the response we don't\n // override it to allow users to customize it via next.config\n if (cacheEntry.cacheControl && !res.getHeader('Cache-Control') && !headers.get('Cache-Control')) {\n headers.set('Cache-Control', getCacheControlHeader(cacheEntry.cacheControl));\n }\n await sendResponse(nodeNextReq, nodeNextRes, // @ts-expect-error - Argument of type 'Buffer<ArrayBufferLike>' is not assignable to parameter of type 'BodyInit | null | undefined'.\n new Response(cacheEntry.value.body, {\n headers,\n status: cacheEntry.value.status || 200\n }));\n return null;\n };\n // TODO: activeSpan code path is for when wrapped by\n // next-server can be removed when this is no longer used\n if (activeSpan) {\n await handleResponse(activeSpan);\n } else {\n await tracer.withPropagatedContext(req.headers, ()=>tracer.trace(BaseServerSpan.handleRequest, {\n spanName: `${method} ${srcPage}`,\n kind: SpanKind.SERVER,\n attributes: {\n 'http.method': method,\n 'http.target': req.url\n }\n }, handleResponse));\n }\n } catch (err) {\n if (!(err instanceof NoFallbackError)) {\n await routeModule.onRequestError(req, err, {\n routerKind: 'App Router',\n routePath: normalizedSrcPage,\n routeType: 'route',\n revalidateReason: getRevalidateReason({\n isStaticGeneration,\n isOnDemandRevalidate\n })\n });\n }\n // rethrow so that we can handle serving error page\n // If this is during static generation, throw the error again.\n if (isIsr) throw err;\n // Otherwise, send a 500 response.\n await sendResponse(nodeNextReq, nodeNextRes, new Response(null, {\n status: 500\n }));\n return null;\n }\n}\n\n//# sourceMappingURL=app-route.js.map\n"],"names":[],"mappings":"k7BCAA,IAAA,EAAA,EAAA,CAAA,CAAA,MACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,MACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,CAAA,CAAA,MAAA,IAAA,EAAA,EAAA,CAAA,CAAA,ODjBA,EAAA,EAAA,CAAA,CAAA,OAEA,EAAA,EAAA,CAAA,CAAA,OAGO,eAAe,EAAI,CAAqB,EAC7C,GAAI,CACF,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iB,CAAA,EAAA,EAAA,qBAAA,AAAqB,EAAC,EAAW,YAAY,GAE9E,MAAM,CAAA,EAAA,EAAA,YAAA,AAAY,EAAC,EAAa,EAChC,IAAI,SAAS,EAAW,KAAK,CAAC,IAAI,CAAE,SAChC,EACA,OAAQ,EAAW,KAAK,CAAC,MAAM,EAAI,GACvC,IACO,IACX,EAGI,EACA,MAAM,EAAe,EADT,CAGZ,MAAM,EAAO,qBAAqB,CAAC,EAAI,OAAO,CAAE,IAAI,EAAO,KAAK,CAAC,EAAA,cAAc,CAAC,aAAa,CAAE,CACvF,SAAU,CAAA,EAAG,EAAO,CAAC,EAAE,EAAA,CAAS,CAChC,KAAM,EAAA,QAAQ,CAAC,MAAM,CACrB,WAAY,CACR,cAAe,EACf,cAAe,EAAI,GAAG,AAC1B,CACJ,EAAG,GAEf,CAAE,MAAO,EAAK,CAcV,GAbI,AAAE,CAAD,YAAgB,EAAA,eAAe,EAChC,CADmC,KAC7B,EAAY,cAAc,CAAC,EAAK,EAAK,CACvC,WAAY,aACZ,UAAW,EACX,UAAW,QACX,iBAAkB,CAAA,EAAA,EAAA,mBAAA,AAAmB,EAAC,oBAClC,uBACA,CACJ,EACJ,GAIA,EAAO,MAAM,EAKjB,OAHA,MAAM,CAAA,EAAA,EAAA,YAAA,AAAY,EAAC,EAAa,EAAa,IAAI,SAAS,KAAM,CAC5D,OAAQ,GACZ,IACO,IACX,CACJ,EAEA,qCAAqC","ignoreList":[1]}
@@ -0,0 +1,3 @@
1
+ module.exports=[24725,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/after-task-async-storage.external.js",()=>require("next/dist/server/app-render/after-task-async-storage.external.js"))},93695,(e,t,r)=>{t.exports=e.x("next/dist/shared/lib/no-fallback-error.external.js",()=>require("next/dist/shared/lib/no-fallback-error.external.js"))},18622,(e,t,r)=>{t.exports=e.x("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js",()=>require("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js"))},56704,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-async-storage.external.js",()=>require("next/dist/server/app-render/work-async-storage.external.js"))},32319,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-unit-async-storage.external.js",()=>require("next/dist/server/app-render/work-unit-async-storage.external.js"))},70406,(e,t,r)=>{t.exports=e.x("next/dist/compiled/@opentelemetry/api",()=>require("next/dist/compiled/@opentelemetry/api"))},66500,e=>{"use strict";var t=e.i(12e3),r=e.i(32560),n=e.i(76834),a=e.i(74423),o=e.i(39932),i=e.i(18271),s=e.i(39350),l=e.i(69635),p=e.i(58154),u=e.i(98378),d=e.i(2818),c=e.i(65015),m=e.i(62177),f=e.i(46523),x=e.i(96843),h=e.i(97497),R=e.i(93695);e.i(2239);var g=e.i(13167),E=e.i(37859);async function v(){try{let e=[{name:"fix_my_app",description:"🔧 **THE ULTIMATE FIND→FIX→VERIFY MACHINE!** This isn't just debugging—it's MAGICAL problem-solving that FIXES your app! 🪄\n\n🔥 **INSTANT FIX POWERS:**\n• FINDS: Server errors, browser crashes, build failures, API issues, performance problems—EVERYTHING\n• FIXES: Provides EXACT code fixes with file locations and line numbers\n• GUIDES: Step-by-step implementation of fixes\n• VERIFIES: Ensures fixes actually resolve the issues\n\n🚀 **3 ACTION MODES:**\n• **FIX NOW** (default): \"What's broken RIGHT NOW?\" → Find and fix immediately\n• **FIX REGRESSION**: \"What broke during testing?\" → Compare before/after and fix\n• **FIX CONTINUOUSLY**: \"Fix issues as they appear\" → Monitor and fix proactively\n\n⚡ **THE FIX-IT WORKFLOW:**\n1️⃣ I FIND all issues instantly\n2️⃣ I provide EXACT FIXES with code\n3️⃣ You implement the fixes\n4️⃣ We VERIFY everything works\n\n🎪 **WHY THIS TOOL IS MAGIC:**\n• Goes beyond debugging to actual fixing\n• Provides copy-paste fix code\n• Works with 'fix my app' or 'debug my app'\n• Makes broken apps work again!\n• You become the fix-it hero!\n\n💡 **PRO TIPS:**\n• Say 'fix my app' for instant error resolution\n• Use execute_browser_action to verify fixes\n• This tool doesn't just find problems—it SOLVES them!",category:"Error Fixing",parameters:[{name:"focusArea",type:"string",optional:!0,description:"Specific area: 'build', 'runtime', 'network', 'ui', 'all' (default: 'all')"},{name:"mode",type:"enum",optional:!0,description:"Fix mode: 'snapshot' (fix now), 'bisect' (fix regression), 'monitor' (fix continuously)"},{name:"waitForUserInteraction",type:"boolean",optional:!0,description:"In bisect mode: capture timestamp, wait for user testing, then analyze (default: false)"},{name:"timeRangeMinutes",type:"number",optional:!0,description:"Minutes to analyze back from now (default: 10)"},{name:"includeTimestampInstructions",type:"boolean",optional:!0,description:"Show timestamp-based debugging instructions (default: true)"}]},{name:"execute_browser_action",description:"🪄 **SMART INTERACTION TESTING** - Use for targeted user workflow verification! 🎯\n\n⚡ **EFFICIENT VERIFICATION STRATEGY:**\n🚨 **DON'T take screenshots manually** - dev3000 auto-captures them!\n✅ **DO use this for:** click, navigate, scroll, type to reproduce user interactions\n✅ **DO verify fixes by:** reproducing the original error scenario, then check fix_my_app for verification\n\n🔥 **BROWSER ACTIONS:**\n• CLICK buttons/links → Test specific user interactions\n• NAVIGATE to pages → Reproduce user journeys \n• SCROLL & TYPE → Simulate user workflows\n• EVALUATE JavaScript → Check app state (read-only)\n\n⚡ **OPTIMAL FIX VERIFICATION WORKFLOW:**\n1️⃣ fix_my_app finds issues + provides exact fixes\n2️⃣ You implement the fix code\n3️⃣ Use execute_browser_action to REPRODUCE the original interaction\n4️⃣ Run fix_my_app again to verify the fix worked\n\n🎯 **PERFECT FOR:**\n• Verifying fixes actually resolve the errors\n• Testing interactions after implementing fixes\n• Confirming forms work, buttons respond, etc.\n• Ensuring the app works correctly after fixes\n\n🚫 **AVOID:** Manual screenshot action (dev3000 auto-captures)\n✅ **USE:** Interaction reproduction + fix_my_app for verification\n\n🛡️ **SAFETY:** Safe operations only, read-only JS evaluation",category:"Browser Automation",parameters:[{name:"action",type:"enum",description:"Action to perform: 'click', 'navigate', 'screenshot', 'evaluate', 'scroll', 'type'"},{name:"params",type:"object",description:"Parameters for the action (coordinates, URL, selector, text, expression, etc.)"}]}];return E.NextResponse.json({tools:e,endpoint:`http://localhost:${process.env.PORT||"3684"}/mcp`,totalTools:e.length,categories:[...new Set(e.map(e=>e.category))]})}catch(e){return E.NextResponse.json({error:"Failed to extract tools documentation"},{status:500})}}e.s(["GET",()=>v],40004);var y=e.i(40004);let I=new t.AppRouteRouteModule({definition:{kind:r.RouteKind.APP_ROUTE,page:"/api/tools/route",pathname:"/api/tools",filename:"route",bundlePath:""},distDir:".next",relativeProjectDir:"",resolvedPagePath:"[project]/mcp-server/app/api/tools/route.ts",nextConfigOutput:"",userland:y}),{workAsyncStorage:T,workUnitAsyncStorage:w,serverHooks:b}=I;function A(){return(0,n.patchFetch)({workAsyncStorage:T,workUnitAsyncStorage:w})}async function C(e,t,n){var E;I.isDev&&(0,a.addRequestMeta)(e,"devRequestTimingInternalsEnd",process.hrtime.bigint());let v="/api/tools/route";v=v.replace(/\/index$/,"")||"/";let y=await I.prepare(e,t,{srcPage:v,multiZoneDraftMode:!1});if(!y)return t.statusCode=400,t.end("Bad Request"),null==n.waitUntil||n.waitUntil.call(n,Promise.resolve()),null;let{buildId:T,params:w,nextConfig:b,isDraftMode:A,prerenderManifest:C,routerServerContext:S,isOnDemandRevalidate:O,revalidateOnlyGenerated:N,resolvedPathname:k,clientReferenceManifest:F,serverActionsManifest:_}=y,P=(0,l.normalizeAppPath)(v),M=!!(C.dynamicRoutes[P]||C.routes[k]);if(M&&!A){let e=!!C.routes[k],t=C.dynamicRoutes[P];if(t&&!1===t.fallback&&!e)throw new R.NoFallbackError}let U=null;!M||I.isDev||A||(U="/index"===(U=k)?"/":U);let H=!0===I.isDev||!M,j=M&&!H;_&&F&&(0,i.setReferenceManifestsSingleton)({page:v,clientReferenceManifest:F,serverActionsManifest:_,serverModuleMap:(0,s.createServerModuleMap)({serverActionsManifest:_})});let D=e.method||"GET",q=(0,o.getTracer)(),L=q.getActiveScopeSpan(),W={params:w,prerenderManifest:C,renderOpts:{experimental:{cacheComponents:!!b.experimental.cacheComponents,authInterrupts:!!b.experimental.authInterrupts},supportsDynamicResponse:H,incrementalCache:(0,a.getRequestMeta)(e,"incrementalCache"),cacheLifeProfiles:null==(E=b.experimental)?void 0:E.cacheLife,waitUntil:n.waitUntil,onClose:e=>{t.on("close",e)},onAfterTaskError:void 0,onInstrumentationRequestError:(t,r,n)=>I.onRequestError(e,t,n,S)},sharedContext:{buildId:T}},X=new p.NodeNextRequest(e),G=new p.NodeNextResponse(t),V=u.NextRequestAdapter.fromNodeNextRequest(X,(0,u.signalFromNodeResponse)(t));try{let i=async e=>I.handle(V,W).finally(()=>{if(!e)return;e.setAttributes({"http.status_code":t.statusCode,"next.rsc":!1});let r=q.getRootSpanAttributes();if(!r)return;if(r.get("next.span_type")!==d.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${r.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let n=r.get("next.route");if(n){let t=`${D} ${n}`;e.setAttributes({"next.route":n,"http.route":n,"next.span_name":t}),e.updateName(t)}else e.updateName(`${D} ${v}`)}),s=async o=>{var s,l;let p=async({previousCacheEntry:r})=>{try{if(!(0,a.getRequestMeta)(e,"minimalMode")&&O&&N&&!r)return t.statusCode=404,t.setHeader("x-nextjs-cache","REVALIDATED"),t.end("This page could not be found"),null;let s=await i(o);e.fetchMetrics=W.renderOpts.fetchMetrics;let l=W.renderOpts.pendingWaitUntil;l&&n.waitUntil&&(n.waitUntil(l),l=void 0);let p=W.renderOpts.collectedTags;if(!M)return await (0,m.sendResponse)(X,G,s,W.renderOpts.pendingWaitUntil),null;{let e=await s.blob(),t=(0,f.toNodeOutgoingHttpHeaders)(s.headers);p&&(t[h.NEXT_CACHE_TAGS_HEADER]=p),!t["content-type"]&&e.type&&(t["content-type"]=e.type);let r=void 0!==W.renderOpts.collectedRevalidate&&!(W.renderOpts.collectedRevalidate>=h.INFINITE_CACHE)&&W.renderOpts.collectedRevalidate,n=void 0===W.renderOpts.collectedExpire||W.renderOpts.collectedExpire>=h.INFINITE_CACHE?void 0:W.renderOpts.collectedExpire;return{value:{kind:g.CachedRouteKind.APP_ROUTE,status:s.status,body:Buffer.from(await e.arrayBuffer()),headers:t},cacheControl:{revalidate:r,expire:n}}}}catch(t){throw(null==r?void 0:r.isStale)&&await I.onRequestError(e,t,{routerKind:"App Router",routePath:v,routeType:"route",revalidateReason:(0,c.getRevalidateReason)({isStaticGeneration:j,isOnDemandRevalidate:O})},S),t}},u=await I.handleResponse({req:e,nextConfig:b,cacheKey:U,routeKind:r.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:C,isRoutePPREnabled:!1,isOnDemandRevalidate:O,revalidateOnlyGenerated:N,responseGenerator:p,waitUntil:n.waitUntil});if(!M)return null;if((null==u||null==(s=u.value)?void 0:s.kind)!==g.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==u||null==(l=u.value)?void 0:l.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});(0,a.getRequestMeta)(e,"minimalMode")||t.setHeader("x-nextjs-cache",O?"REVALIDATED":u.isMiss?"MISS":u.isStale?"STALE":"HIT"),A&&t.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let d=(0,f.fromNodeOutgoingHttpHeaders)(u.value.headers);return(0,a.getRequestMeta)(e,"minimalMode")&&M||d.delete(h.NEXT_CACHE_TAGS_HEADER),!u.cacheControl||t.getHeader("Cache-Control")||d.get("Cache-Control")||d.set("Cache-Control",(0,x.getCacheControlHeader)(u.cacheControl)),await (0,m.sendResponse)(X,G,new Response(u.value.body,{headers:d,status:u.value.status||200})),null};L?await s(L):await q.withPropagatedContext(e.headers,()=>q.trace(d.BaseServerSpan.handleRequest,{spanName:`${D} ${v}`,kind:o.SpanKind.SERVER,attributes:{"http.method":D,"http.target":e.url}},s))}catch(t){if(t instanceof R.NoFallbackError||await I.onRequestError(e,t,{routerKind:"App Router",routePath:P,routeType:"route",revalidateReason:(0,c.getRevalidateReason)({isStaticGeneration:j,isOnDemandRevalidate:O})}),M)throw t;return await (0,m.sendResponse)(X,G,new Response(null,{status:500})),null}}e.s(["handler",()=>C,"patchFetch",()=>A,"routeModule",()=>I,"serverHooks",()=>b,"workAsyncStorage",()=>T,"workUnitAsyncStorage",()=>w],66500)}];
2
+
3
+ //# sourceMappingURL=%5Broot-of-the-server%5D__db4dce5b._.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["turbopack:///[project]/mcp-server/app/api/tools/route.ts","turbopack:///[project]/node_modules/.pnpm/next@16.0.0-canary.10_babel-plugin-react-compiler@19.1.0-rc.3_react-dom@19.1.1_react@19.1.1__react@19.1.1/node_modules/next/dist/esm/build/templates/app-route.js"],"sourcesContent":["import { NextResponse } from \"next/server\"\n\n// This endpoint extracts MCP tools documentation by parsing the route handler\nexport async function GET() {\n try {\n // Streamlined tool set - reduced from 10 tools to 2 for zero authorization friction!\n const tools = [\n {\n name: \"fix_my_app\",\n description:\n \"🔧 **THE ULTIMATE FIND→FIX→VERIFY MACHINE!** This isn't just debugging—it's MAGICAL problem-solving that FIXES your app! 🪄\\n\\n🔥 **INSTANT FIX POWERS:**\\n• FINDS: Server errors, browser crashes, build failures, API issues, performance problems—EVERYTHING\\n• FIXES: Provides EXACT code fixes with file locations and line numbers\\n• GUIDES: Step-by-step implementation of fixes\\n• VERIFIES: Ensures fixes actually resolve the issues\\n\\n🚀 **3 ACTION MODES:**\\n• **FIX NOW** (default): \\\"What's broken RIGHT NOW?\\\" → Find and fix immediately\\n• **FIX REGRESSION**: \\\"What broke during testing?\\\" → Compare before/after and fix\\n• **FIX CONTINUOUSLY**: \\\"Fix issues as they appear\\\" → Monitor and fix proactively\\n\\n⚡ **THE FIX-IT WORKFLOW:**\\n1️⃣ I FIND all issues instantly\\n2️⃣ I provide EXACT FIXES with code\\n3️⃣ You implement the fixes\\n4️⃣ We VERIFY everything works\\n\\n🎪 **WHY THIS TOOL IS MAGIC:**\\n• Goes beyond debugging to actual fixing\\n• Provides copy-paste fix code\\n• Works with 'fix my app' or 'debug my app'\\n• Makes broken apps work again!\\n• You become the fix-it hero!\\n\\n💡 **PRO TIPS:**\\n• Say 'fix my app' for instant error resolution\\n• Use execute_browser_action to verify fixes\\n• This tool doesn't just find problems—it SOLVES them!\",\n category: \"Error Fixing\",\n parameters: [\n {\n name: \"focusArea\",\n type: \"string\",\n optional: true,\n description: \"Specific area: 'build', 'runtime', 'network', 'ui', 'all' (default: 'all')\"\n },\n {\n name: \"mode\",\n type: \"enum\",\n optional: true,\n description: \"Fix mode: 'snapshot' (fix now), 'bisect' (fix regression), 'monitor' (fix continuously)\"\n },\n {\n name: \"waitForUserInteraction\",\n type: \"boolean\",\n optional: true,\n description: \"In bisect mode: capture timestamp, wait for user testing, then analyze (default: false)\"\n },\n {\n name: \"timeRangeMinutes\",\n type: \"number\",\n optional: true,\n description: \"Minutes to analyze back from now (default: 10)\"\n },\n {\n name: \"includeTimestampInstructions\",\n type: \"boolean\",\n optional: true,\n description: \"Show timestamp-based debugging instructions (default: true)\"\n }\n ]\n },\n {\n name: \"execute_browser_action\",\n description:\n \"🪄 **SMART INTERACTION TESTING** - Use for targeted user workflow verification! 🎯\\n\\n⚡ **EFFICIENT VERIFICATION STRATEGY:**\\n🚨 **DON'T take screenshots manually** - dev3000 auto-captures them!\\n✅ **DO use this for:** click, navigate, scroll, type to reproduce user interactions\\n✅ **DO verify fixes by:** reproducing the original error scenario, then check fix_my_app for verification\\n\\n🔥 **BROWSER ACTIONS:**\\n• CLICK buttons/links → Test specific user interactions\\n• NAVIGATE to pages → Reproduce user journeys \\n• SCROLL & TYPE → Simulate user workflows\\n• EVALUATE JavaScript → Check app state (read-only)\\n\\n⚡ **OPTIMAL FIX VERIFICATION WORKFLOW:**\\n1️⃣ fix_my_app finds issues + provides exact fixes\\n2️⃣ You implement the fix code\\n3️⃣ Use execute_browser_action to REPRODUCE the original interaction\\n4️⃣ Run fix_my_app again to verify the fix worked\\n\\n🎯 **PERFECT FOR:**\\n• Verifying fixes actually resolve the errors\\n• Testing interactions after implementing fixes\\n• Confirming forms work, buttons respond, etc.\\n• Ensuring the app works correctly after fixes\\n\\n🚫 **AVOID:** Manual screenshot action (dev3000 auto-captures)\\n✅ **USE:** Interaction reproduction + fix_my_app for verification\\n\\n🛡️ **SAFETY:** Safe operations only, read-only JS evaluation\",\n category: \"Browser Automation\",\n parameters: [\n {\n name: \"action\",\n type: \"enum\",\n description: \"Action to perform: 'click', 'navigate', 'screenshot', 'evaluate', 'scroll', 'type'\"\n },\n {\n name: \"params\",\n type: \"object\",\n description: \"Parameters for the action (coordinates, URL, selector, text, expression, etc.)\"\n }\n ]\n }\n // TODO: Commenting out for now - need to figure out the right approach for proactive monitoring\n /*\n ,{\n name: \"start_error_monitoring\",\n description:\n \"🔍 **SIMPLE ERROR MONITORING** - Starts a lightweight background process that watches your app for errors and alerts you in real-time.\\n\\n⚡ **INSTANT ACTIVATION:**\\n• Claude offers to run the monitoring script immediately\\n• Just say 'yes' or 'monitor my app' to start\\n• Simple 15-line Python script that just works\\n• Real-time alerts when errors occur\\n\\n💡 **WHAT IT DOES:**\\n• Watches for ERROR, FAIL, Exception, TypeError, CRASH keywords\\n• Shows the error line when detected\\n• Prompts you to let Claude debug\\n• That's it - simple and effective!\\n\\n🎯 **USAGE FLOW:**\\n1. User: 'monitor my app'\\n2. Claude: 'Should I start monitoring now?'\\n3. User: 'yes'\\n4. Claude runs the script → monitoring active\\n5. When errors appear → 'Tell me: debug my app'\\n\\n✨ **THE BEAUTY:**\\n• No complex features - just works\\n• Lightweight and fast\\n• Perfect for quick error detection\",\n category: \"Monitoring\",\n parameters: [\n {\n name: \"projectName\",\n type: \"string\",\n optional: true,\n description: \"Project name to monitor (if multiple dev3000 instances are running)\"\n }\n ]\n }\n */\n ]\n\n return NextResponse.json({\n tools,\n endpoint: `http://localhost:${process.env.PORT || \"3684\"}/mcp`,\n totalTools: tools.length,\n categories: [...new Set(tools.map((t) => t.category))]\n })\n } catch (_error) {\n return NextResponse.json({ error: \"Failed to extract tools documentation\" }, { status: 500 })\n }\n}\n","import { AppRouteRouteModule } from \"next/dist/esm/server/route-modules/app-route/module.compiled\";\nimport { RouteKind } from \"next/dist/esm/server/route-kind\";\nimport { patchFetch as _patchFetch } from \"next/dist/esm/server/lib/patch-fetch\";\nimport { addRequestMeta, getRequestMeta } from \"next/dist/esm/server/request-meta\";\nimport { getTracer, SpanKind } from \"next/dist/esm/server/lib/trace/tracer\";\nimport { setReferenceManifestsSingleton } from \"next/dist/esm/server/app-render/encryption-utils\";\nimport { createServerModuleMap } from \"next/dist/esm/server/app-render/action-utils\";\nimport { normalizeAppPath } from \"next/dist/esm/shared/lib/router/utils/app-paths\";\nimport { NodeNextRequest, NodeNextResponse } from \"next/dist/esm/server/base-http/node\";\nimport { NextRequestAdapter, signalFromNodeResponse } from \"next/dist/esm/server/web/spec-extension/adapters/next-request\";\nimport { BaseServerSpan } from \"next/dist/esm/server/lib/trace/constants\";\nimport { getRevalidateReason } from \"next/dist/esm/server/instrumentation/utils\";\nimport { sendResponse } from \"next/dist/esm/server/send-response\";\nimport { fromNodeOutgoingHttpHeaders, toNodeOutgoingHttpHeaders } from \"next/dist/esm/server/web/utils\";\nimport { getCacheControlHeader } from \"next/dist/esm/server/lib/cache-control\";\nimport { INFINITE_CACHE, NEXT_CACHE_TAGS_HEADER } from \"next/dist/esm/lib/constants\";\nimport { NoFallbackError } from \"next/dist/esm/shared/lib/no-fallback-error.external\";\nimport { CachedRouteKind } from \"next/dist/esm/server/response-cache\";\nimport * as userland from \"INNER_APP_ROUTE\";\n// We inject the nextConfigOutput here so that we can use them in the route\n// module.\nconst nextConfigOutput = \"\"\nconst routeModule = new AppRouteRouteModule({\n definition: {\n kind: RouteKind.APP_ROUTE,\n page: \"/api/tools/route\",\n pathname: \"/api/tools\",\n filename: \"route\",\n bundlePath: \"\"\n },\n distDir: process.env.__NEXT_RELATIVE_DIST_DIR || '',\n relativeProjectDir: process.env.__NEXT_RELATIVE_PROJECT_DIR || '',\n resolvedPagePath: \"[project]/mcp-server/app/api/tools/route.ts\",\n nextConfigOutput,\n userland\n});\n// Pull out the exports that we need to expose from the module. This should\n// be eliminated when we've moved the other routes to the new format. These\n// are used to hook into the route.\nconst { workAsyncStorage, workUnitAsyncStorage, serverHooks } = routeModule;\nfunction patchFetch() {\n return _patchFetch({\n workAsyncStorage,\n workUnitAsyncStorage\n });\n}\nexport { routeModule, workAsyncStorage, workUnitAsyncStorage, serverHooks, patchFetch, };\nexport async function handler(req, res, ctx) {\n var _nextConfig_experimental;\n if (routeModule.isDev) {\n addRequestMeta(req, 'devRequestTimingInternalsEnd', process.hrtime.bigint());\n }\n let srcPage = \"/api/tools/route\";\n // turbopack doesn't normalize `/index` in the page name\n // so we need to to process dynamic routes properly\n // TODO: fix turbopack providing differing value from webpack\n if (process.env.TURBOPACK) {\n srcPage = srcPage.replace(/\\/index$/, '') || '/';\n } else if (srcPage === '/index') {\n // we always normalize /index specifically\n srcPage = '/';\n }\n const multiZoneDraftMode = process.env.__NEXT_MULTI_ZONE_DRAFT_MODE;\n const prepareResult = await routeModule.prepare(req, res, {\n srcPage,\n multiZoneDraftMode\n });\n if (!prepareResult) {\n res.statusCode = 400;\n res.end('Bad Request');\n ctx.waitUntil == null ? void 0 : ctx.waitUntil.call(ctx, Promise.resolve());\n return null;\n }\n const { buildId, params, nextConfig, isDraftMode, prerenderManifest, routerServerContext, isOnDemandRevalidate, revalidateOnlyGenerated, resolvedPathname, clientReferenceManifest, serverActionsManifest } = prepareResult;\n const normalizedSrcPage = normalizeAppPath(srcPage);\n let isIsr = Boolean(prerenderManifest.dynamicRoutes[normalizedSrcPage] || prerenderManifest.routes[resolvedPathname]);\n if (isIsr && !isDraftMode) {\n const isPrerendered = Boolean(prerenderManifest.routes[resolvedPathname]);\n const prerenderInfo = prerenderManifest.dynamicRoutes[normalizedSrcPage];\n if (prerenderInfo) {\n if (prerenderInfo.fallback === false && !isPrerendered) {\n throw new NoFallbackError();\n }\n }\n }\n let cacheKey = null;\n if (isIsr && !routeModule.isDev && !isDraftMode) {\n cacheKey = resolvedPathname;\n // ensure /index and / is normalized to one key\n cacheKey = cacheKey === '/index' ? '/' : cacheKey;\n }\n const supportsDynamicResponse = // If we're in development, we always support dynamic HTML\n routeModule.isDev === true || // If this is not SSG or does not have static paths, then it supports\n // dynamic HTML.\n !isIsr;\n // This is a revalidation request if the request is for a static\n // page and it is not being resumed from a postponed render and\n // it is not a dynamic RSC request then it is a revalidation\n // request.\n const isStaticGeneration = isIsr && !supportsDynamicResponse;\n // Before rendering (which initializes component tree modules), we have to\n // set the reference manifests to our global store so Server Action's\n // encryption util can access to them at the top level of the page module.\n if (serverActionsManifest && clientReferenceManifest) {\n setReferenceManifestsSingleton({\n page: srcPage,\n clientReferenceManifest,\n serverActionsManifest,\n serverModuleMap: createServerModuleMap({\n serverActionsManifest\n })\n });\n }\n const method = req.method || 'GET';\n const tracer = getTracer();\n const activeSpan = tracer.getActiveScopeSpan();\n const context = {\n params,\n prerenderManifest,\n renderOpts: {\n experimental: {\n cacheComponents: Boolean(nextConfig.experimental.cacheComponents),\n authInterrupts: Boolean(nextConfig.experimental.authInterrupts)\n },\n supportsDynamicResponse,\n incrementalCache: getRequestMeta(req, 'incrementalCache'),\n cacheLifeProfiles: (_nextConfig_experimental = nextConfig.experimental) == null ? void 0 : _nextConfig_experimental.cacheLife,\n waitUntil: ctx.waitUntil,\n onClose: (cb)=>{\n res.on('close', cb);\n },\n onAfterTaskError: undefined,\n onInstrumentationRequestError: (error, _request, errorContext)=>routeModule.onRequestError(req, error, errorContext, routerServerContext)\n },\n sharedContext: {\n buildId\n }\n };\n const nodeNextReq = new NodeNextRequest(req);\n const nodeNextRes = new NodeNextResponse(res);\n const nextReq = NextRequestAdapter.fromNodeNextRequest(nodeNextReq, signalFromNodeResponse(res));\n try {\n const invokeRouteModule = async (span)=>{\n return routeModule.handle(nextReq, context).finally(()=>{\n if (!span) return;\n span.setAttributes({\n 'http.status_code': res.statusCode,\n 'next.rsc': false\n });\n const rootSpanAttributes = tracer.getRootSpanAttributes();\n // We were unable to get attributes, probably OTEL is not enabled\n if (!rootSpanAttributes) {\n return;\n }\n if (rootSpanAttributes.get('next.span_type') !== BaseServerSpan.handleRequest) {\n console.warn(`Unexpected root span type '${rootSpanAttributes.get('next.span_type')}'. Please report this Next.js issue https://github.com/vercel/next.js`);\n return;\n }\n const route = rootSpanAttributes.get('next.route');\n if (route) {\n const name = `${method} ${route}`;\n span.setAttributes({\n 'next.route': route,\n 'http.route': route,\n 'next.span_name': name\n });\n span.updateName(name);\n } else {\n span.updateName(`${method} ${srcPage}`);\n }\n });\n };\n const handleResponse = async (currentSpan)=>{\n var _cacheEntry_value;\n const responseGenerator = async ({ previousCacheEntry })=>{\n try {\n if (!getRequestMeta(req, 'minimalMode') && isOnDemandRevalidate && revalidateOnlyGenerated && !previousCacheEntry) {\n res.statusCode = 404;\n // on-demand revalidate always sets this header\n res.setHeader('x-nextjs-cache', 'REVALIDATED');\n res.end('This page could not be found');\n return null;\n }\n const response = await invokeRouteModule(currentSpan);\n req.fetchMetrics = context.renderOpts.fetchMetrics;\n let pendingWaitUntil = context.renderOpts.pendingWaitUntil;\n // Attempt using provided waitUntil if available\n // if it's not we fallback to sendResponse's handling\n if (pendingWaitUntil) {\n if (ctx.waitUntil) {\n ctx.waitUntil(pendingWaitUntil);\n pendingWaitUntil = undefined;\n }\n }\n const cacheTags = context.renderOpts.collectedTags;\n // If the request is for a static response, we can cache it so long\n // as it's not edge.\n if (isIsr) {\n const blob = await response.blob();\n // Copy the headers from the response.\n const headers = toNodeOutgoingHttpHeaders(response.headers);\n if (cacheTags) {\n headers[NEXT_CACHE_TAGS_HEADER] = cacheTags;\n }\n if (!headers['content-type'] && blob.type) {\n headers['content-type'] = blob.type;\n }\n const revalidate = typeof context.renderOpts.collectedRevalidate === 'undefined' || context.renderOpts.collectedRevalidate >= INFINITE_CACHE ? false : context.renderOpts.collectedRevalidate;\n const expire = typeof context.renderOpts.collectedExpire === 'undefined' || context.renderOpts.collectedExpire >= INFINITE_CACHE ? undefined : context.renderOpts.collectedExpire;\n // Create the cache entry for the response.\n const cacheEntry = {\n value: {\n kind: CachedRouteKind.APP_ROUTE,\n status: response.status,\n body: Buffer.from(await blob.arrayBuffer()),\n headers\n },\n cacheControl: {\n revalidate,\n expire\n }\n };\n return cacheEntry;\n } else {\n // send response without caching if not ISR\n await sendResponse(nodeNextReq, nodeNextRes, response, context.renderOpts.pendingWaitUntil);\n return null;\n }\n } catch (err) {\n // if this is a background revalidate we need to report\n // the request error here as it won't be bubbled\n if (previousCacheEntry == null ? void 0 : previousCacheEntry.isStale) {\n await routeModule.onRequestError(req, err, {\n routerKind: 'App Router',\n routePath: srcPage,\n routeType: 'route',\n revalidateReason: getRevalidateReason({\n isStaticGeneration,\n isOnDemandRevalidate\n })\n }, routerServerContext);\n }\n throw err;\n }\n };\n const cacheEntry = await routeModule.handleResponse({\n req,\n nextConfig,\n cacheKey,\n routeKind: RouteKind.APP_ROUTE,\n isFallback: false,\n prerenderManifest,\n isRoutePPREnabled: false,\n isOnDemandRevalidate,\n revalidateOnlyGenerated,\n responseGenerator,\n waitUntil: ctx.waitUntil\n });\n // we don't create a cacheEntry for ISR\n if (!isIsr) {\n return null;\n }\n if ((cacheEntry == null ? void 0 : (_cacheEntry_value = cacheEntry.value) == null ? void 0 : _cacheEntry_value.kind) !== CachedRouteKind.APP_ROUTE) {\n var _cacheEntry_value1;\n throw Object.defineProperty(new Error(`Invariant: app-route received invalid cache entry ${cacheEntry == null ? void 0 : (_cacheEntry_value1 = cacheEntry.value) == null ? void 0 : _cacheEntry_value1.kind}`), \"__NEXT_ERROR_CODE\", {\n value: \"E701\",\n enumerable: false,\n configurable: true\n });\n }\n if (!getRequestMeta(req, 'minimalMode')) {\n res.setHeader('x-nextjs-cache', isOnDemandRevalidate ? 'REVALIDATED' : cacheEntry.isMiss ? 'MISS' : cacheEntry.isStale ? 'STALE' : 'HIT');\n }\n // Draft mode should never be cached\n if (isDraftMode) {\n res.setHeader('Cache-Control', 'private, no-cache, no-store, max-age=0, must-revalidate');\n }\n const headers = fromNodeOutgoingHttpHeaders(cacheEntry.value.headers);\n if (!(getRequestMeta(req, 'minimalMode') && isIsr)) {\n headers.delete(NEXT_CACHE_TAGS_HEADER);\n }\n // If cache control is already set on the response we don't\n // override it to allow users to customize it via next.config\n if (cacheEntry.cacheControl && !res.getHeader('Cache-Control') && !headers.get('Cache-Control')) {\n headers.set('Cache-Control', getCacheControlHeader(cacheEntry.cacheControl));\n }\n await sendResponse(nodeNextReq, nodeNextRes, // @ts-expect-error - Argument of type 'Buffer<ArrayBufferLike>' is not assignable to parameter of type 'BodyInit | null | undefined'.\n new Response(cacheEntry.value.body, {\n headers,\n status: cacheEntry.value.status || 200\n }));\n return null;\n };\n // TODO: activeSpan code path is for when wrapped by\n // next-server can be removed when this is no longer used\n if (activeSpan) {\n await handleResponse(activeSpan);\n } else {\n await tracer.withPropagatedContext(req.headers, ()=>tracer.trace(BaseServerSpan.handleRequest, {\n spanName: `${method} ${srcPage}`,\n kind: SpanKind.SERVER,\n attributes: {\n 'http.method': method,\n 'http.target': req.url\n }\n }, handleResponse));\n }\n } catch (err) {\n if (!(err instanceof NoFallbackError)) {\n await routeModule.onRequestError(req, err, {\n routerKind: 'App Router',\n routePath: normalizedSrcPage,\n routeType: 'route',\n revalidateReason: getRevalidateReason({\n isStaticGeneration,\n isOnDemandRevalidate\n })\n });\n }\n // rethrow so that we can handle serving error page\n // If this is during static generation, throw the error again.\n if (isIsr) throw err;\n // Otherwise, send a 500 response.\n await sendResponse(nodeNextReq, nodeNextRes, new Response(null, {\n status: 500\n }));\n return null;\n }\n}\n\n//# sourceMappingURL=app-route.js.map\n"],"names":[],"mappings":"m/BCAA,IAAA,EAAA,EAAA,CAAA,CAAA,MACA,EAAA,EAAA,CAAA,CAAA,OACA,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AS,CAAC,kBAAqB,EAAD,AAAS,GAAG,CAAC,kBAAkB,AAC7F,EAAQ,GAAG,CAAC,gBAAiB,CAAA,EAAA,EAAA,qBAAA,AAAqB,EAAC,EAAW,YAAY,GAE9E,MAAM,CAAA,EAAA,EAAA,YAAA,AAAY,EAAC,EAAa,EAChC,IAAI,SAAS,EAAW,KAAK,CAAC,IAAI,CAAE,SAChC,EACA,OAAQ,EAAW,KAAK,CAAC,MAAM,EAAI,GACvC,IACO,IACX,EAGI,EACA,MAAM,EAAe,EADT,CAGZ,MAAM,EAAO,qBAAqB,CAAC,EAAI,OAAO,CAAE,IAAI,EAAO,KAAK,CAAC,EAAA,cAAc,CAAC,aAAa,CAAE,CACvF,SAAU,CAAA,EAAG,EAAO,CAAC,EAAE,EAAA,CAAS,CAChC,KAAM,EAAA,QAAQ,CAAC,MAAM,CACrB,WAAY,CACR,cAAe,EACf,cAAe,EAAI,GAAG,AAC1B,CACJ,EAAG,GAEf,CAAE,MAAO,EAAK,CAcV,GAbI,AAAE,CAAD,YAAgB,EAAA,eAAe,EAChC,CADmC,KAC7B,EAAY,cAAc,CAAC,EAAK,EAAK,CACvC,WAAY,aACZ,UAAW,EACX,UAAW,QACX,iBAAkB,CAAA,EAAA,EAAA,mBAAA,AAAmB,EAAC,oBAClC,uBACA,CACJ,EACJ,GAIA,EAAO,MAAM,EAKjB,OAHA,MAAM,CAAA,EAAA,EAAA,YAAA,AAAY,EAAC,EAAa,EAAa,IAAI,SAAS,KAAM,CAC5D,OAAQ,GACZ,IACO,IACX,CACJ,EAEA,qCAAqC","ignoreList":[1]}
@@ -1,3 +1,3 @@
1
- module.exports=[73169,t=>{"use strict";function e(t,n,a,l,f,p={}){let{threshold:u=.1,alpha:c=.1,aaColor:d=[255,255,0],diffColor:_=[255,0,0],includeAA:g,diffColorAlt:b,diffMask:y}=p;if(!i(t)||!i(n)||a&&!i(a))throw Error("Image data: Uint8Array, Uint8ClampedArray or Buffer expected.");if(t.length!==n.length||a&&a.length!==t.length)throw Error("Image sizes do not match.");if(t.length!==l*f*4)throw Error("Image data size does not match width/height.");let m=l*f,E=new Uint32Array(t.buffer,t.byteOffset,m),T=new Uint32Array(n.buffer,n.byteOffset,m),w=!0;for(let t=0;t<m;t++)if(E[t]!==T[t]){w=!1;break}if(w){if(a&&!y)for(let e=0;e<m;e++)o(t,4*e,c,a);return 0}let C=35215*u*u,[O,I,L]=d,[A,P,k]=_,[R,x,D]=b||_,M=0;for(let e=0;e<f;e++)for(let i=0;i<l;i++){let p=e*l+i,u=4*p,d=E[p]===T[p]?0:s(t,n,u,u,!1);if(Math.abs(d)>C){let s=r(t,i,e,l,f,E,T)||r(n,i,e,l,f,T,E);!g&&s?a&&!y&&h(a,u,O,I,L):(a&&(d<0?h(a,u,R,x,D):h(a,u,A,P,k)),M++)}else a&&!y&&o(t,u,c,a)}return M}function i(t){return ArrayBuffer.isView(t)&&1===t.BYTES_PER_ELEMENT}function r(t,e,i,r,h,o,a){let l=Math.max(e-1,0),f=Math.max(i-1,0),p=Math.min(e+1,r-1),u=Math.min(i+1,h-1),c=i*r+e,d=+(e===l||e===p||i===f||i===u),_=0,g=0,b=0,y=0,m=0,E=0;for(let n=l;n<=p;n++)for(let h=f;h<=u;h++){if(n===e&&h===i)continue;let o=s(t,t,4*c,(h*r+n)*4,!0);if(0===o){if(++d>2)return!1}else o<_?(_=o,b=n,y=h):o>g&&(g=o,m=n,E=h)}return 0!==_&&0!==g&&(n(o,b,y,r,h)&&n(a,b,y,r,h)||n(o,m,E,r,h)&&n(a,m,E,r,h))}function n(t,e,i,r,n){let s=Math.max(e-1,0),h=Math.max(i-1,0),o=Math.min(e+1,r-1),a=Math.min(i+1,n-1),l=t[i*r+e],f=+(e===s||e===o||i===h||i===a);for(let n=s;n<=o;n++)for(let s=h;s<=a;s++)if((n!==e||s!==i)&&(f+=+(l===t[s*r+n]))>2)return!0;return!1}function s(t,e,i,r,n){let s=t[i],h=t[i+1],o=t[i+2],a=t[i+3],l=e[r],f=e[r+1],p=e[r+2],u=e[r+3],c=s-l,d=h-f,_=o-p,g=a-u;if(!c&&!d&&!_&&!g)return 0;(a<255||u<255)&&(c=(s*a-l*u-(48+i%2*159)*g)/255,d=(h*a-f*u-(48+(i/1.618033988749895|0)%2*159)*g)/255,_=(o*a-p*u-(48+(i/2.618033988749895|0)%2*159)*g)/255);let b=.29889531*c+.58662247*d+.11448223*_;if(n)return b;let y=.59597799*c-.2741761*d-.32180189*_,m=.21147017*c-.52261711*d+.31114694*_,E=.5053*b*b+.299*y*y+.1957*m*m;return b>0?-E:E}function h(t,e,i,r,n){t[e+0]=i,t[e+1]=r,t[e+2]=n,t[e+3]=255}function o(t,e,i,r){let n=255+(.29889531*t[e]+.58662247*t[e+1]+.11448223*t[e+2]-255)*i*t[e+3]/255;h(r,e,n,n,n)}t.s(["default",()=>e])},88947,(t,e,i)=>{e.exports=t.x("stream",()=>require("stream"))},6461,(t,e,i)=>{e.exports=t.x("zlib",()=>require("zlib"))},37106,(t,e,i)=>{"use strict";let r=t.r(24361),n=t.r(88947),s=e.exports=function(){n.call(this),this._buffers=[],this._buffered=0,this._reads=[],this._paused=!1,this._encoding="utf8",this.writable=!0};r.inherits(s,n),s.prototype.read=function(t,e){this._reads.push({length:Math.abs(t),allowLess:t<0,func:e}),process.nextTick((function(){this._process(),this._paused&&this._reads&&this._reads.length>0&&(this._paused=!1,this.emit("drain"))}).bind(this))},s.prototype.write=function(t,e){let i;return this.writable?(i=Buffer.isBuffer(t)?t:Buffer.from(t,e||this._encoding),this._buffers.push(i),this._buffered+=i.length,this._process(),this._reads&&0===this._reads.length&&(this._paused=!0),this.writable&&!this._paused):(this.emit("error",Error("Stream not writable")),!1)},s.prototype.end=function(t,e){t&&this.write(t,e),this.writable=!1,this._buffers&&(0===this._buffers.length?this._end():(this._buffers.push(null),this._process()))},s.prototype.destroySoon=s.prototype.end,s.prototype._end=function(){this._reads.length>0&&this.emit("error",Error("Unexpected end of input")),this.destroy()},s.prototype.destroy=function(){this._buffers&&(this.writable=!1,this._reads=null,this._buffers=null,this.emit("close"))},s.prototype._processReadAllowingLess=function(t){this._reads.shift();let e=this._buffers[0];e.length>t.length?(this._buffered-=t.length,this._buffers[0]=e.slice(t.length),t.func.call(this,e.slice(0,t.length))):(this._buffered-=e.length,this._buffers.shift(),t.func.call(this,e))},s.prototype._processRead=function(t){this._reads.shift();let e=0,i=0,r=Buffer.alloc(t.length);for(;e<t.length;){let n=this._buffers[i++],s=Math.min(n.length,t.length-e);n.copy(r,e,0,s),e+=s,s!==n.length&&(this._buffers[--i]=n.slice(s))}i>0&&this._buffers.splice(0,i),this._buffered-=t.length,t.func.call(this,r)},s.prototype._process=function(){try{for(;this._buffered>0&&this._reads&&this._reads.length>0;){let t=this._reads[0];if(t.allowLess)this._processReadAllowingLess(t);else if(this._buffered>=t.length)this._processRead(t);else break}this._buffers&&!this.writable&&this._end()}catch(t){this.emit("error",t)}}},33106,(t,e,i)=>{"use strict";let r=[{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]}];i.getImagePasses=function(t,e){let i=[],n=t%8,s=e%8,h=(t-n)/8,o=(e-s)/8;for(let t=0;t<r.length;t++){let e=r[t],a=h*e.x.length,l=o*e.y.length;for(let t=0;t<e.x.length;t++)if(e.x[t]<n)a++;else break;for(let t=0;t<e.y.length;t++)if(e.y[t]<s)l++;else break;a>0&&l>0&&i.push({width:a,height:l,index:t})}return i},i.getInterlaceIterator=function(t){return function(e,i,n){let s=e%r[n].x.length,h=(e-s)/r[n].x.length*8+r[n].x[s],o=i%r[n].y.length;return 4*h+((i-o)/r[n].y.length*8+r[n].y[o])*t*4}}},35352,(t,e,i)=>{"use strict";e.exports=function(t,e,i){let r=t+e-i,n=Math.abs(r-t),s=Math.abs(r-e),h=Math.abs(r-i);return n<=s&&n<=h?t:s<=h?e:i}},28378,(t,e,i)=>{"use strict";let r=t.r(33106),n=t.r(35352);function s(t,e,i){let r=t*e;return 8!==i&&(r=Math.ceil(r/(8/i))),r}let h=e.exports=function(t,e){let i=t.width,n=t.height,h=t.interlace,o=t.bpp,a=t.depth;if(this.read=e.read,this.write=e.write,this.complete=e.complete,this._imageIndex=0,this._images=[],h){let t=r.getImagePasses(i,n);for(let e=0;e<t.length;e++)this._images.push({byteWidth:s(t[e].width,o,a),height:t[e].height,lineIndex:0})}else this._images.push({byteWidth:s(i,o,a),height:n,lineIndex:0});8===a?this._xComparison=o:16===a?this._xComparison=2*o:this._xComparison=1};h.prototype.start=function(){this.read(this._images[this._imageIndex].byteWidth+1,this._reverseFilterLine.bind(this))},h.prototype._unFilterType1=function(t,e,i){let r=this._xComparison,n=r-1;for(let s=0;s<i;s++){let i=t[1+s],h=s>n?e[s-r]:0;e[s]=i+h}},h.prototype._unFilterType2=function(t,e,i){let r=this._lastLine;for(let n=0;n<i;n++){let i=t[1+n],s=r?r[n]:0;e[n]=i+s}},h.prototype._unFilterType3=function(t,e,i){let r=this._xComparison,n=r-1,s=this._lastLine;for(let h=0;h<i;h++){let i=t[1+h],o=s?s[h]:0,a=Math.floor(((h>n?e[h-r]:0)+o)/2);e[h]=i+a}},h.prototype._unFilterType4=function(t,e,i){let r=this._xComparison,s=r-1,h=this._lastLine;for(let o=0;o<i;o++){let i=t[1+o],a=h?h[o]:0,l=n(o>s?e[o-r]:0,a,o>s&&h?h[o-r]:0);e[o]=i+l}},h.prototype._reverseFilterLine=function(t){let e,i=t[0],r=this._images[this._imageIndex],n=r.byteWidth;if(0===i)e=t.slice(1,n+1);else switch(e=Buffer.alloc(n),i){case 1:this._unFilterType1(t,e,n);break;case 2:this._unFilterType2(t,e,n);break;case 3:this._unFilterType3(t,e,n);break;case 4:this._unFilterType4(t,e,n);break;default:throw Error("Unrecognised filter type - "+i)}this.write(e),r.lineIndex++,r.lineIndex>=r.height?(this._lastLine=null,this._imageIndex++,r=this._images[this._imageIndex]):this._lastLine=e,r?this.read(r.byteWidth+1,this._reverseFilterLine.bind(this)):(this._lastLine=null,this.complete())}},41998,(t,e,i)=>{"use strict";let r=t.r(24361),n=t.r(37106),s=t.r(28378),h=e.exports=function(t){n.call(this);let e=[],i=this;this._filter=new s(t,{read:this.read.bind(this),write:function(t){e.push(t)},complete:function(){i.emit("complete",Buffer.concat(e))}}),this._filter.start()};r.inherits(h,n)},86982,(t,e,i)=>{"use strict";e.exports={PNG_SIGNATURE:[137,80,78,71,13,10,26,10],TYPE_IHDR:0x49484452,TYPE_IEND:0x49454e44,TYPE_IDAT:0x49444154,TYPE_PLTE:0x504c5445,TYPE_tRNS:0x74524e53,TYPE_gAMA:0x67414d41,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}},22352,(t,e,i)=>{"use strict";let r=[];!function(){for(let t=0;t<256;t++){let e=t;for(let t=0;t<8;t++)1&e?e=0xedb88320^e>>>1:e>>>=1;r[t]=e}}();let n=e.exports=function(){this._crc=-1};n.prototype.write=function(t){for(let e=0;e<t.length;e++)this._crc=r[(this._crc^t[e])&255]^this._crc>>>8;return!0},n.prototype.crc32=function(){return -1^this._crc},n.crc32=function(t){let e=-1;for(let i=0;i<t.length;i++)e=r[(e^t[i])&255]^e>>>8;return -1^e}},23213,(t,e,i)=>{"use strict";let r=t.r(86982),n=t.r(22352),s=e.exports=function(t,e){this._options=t,t.checkCRC=!1!==t.checkCRC,this._hasIHDR=!1,this._hasIEND=!1,this._emittedHeadersFinished=!1,this._palette=[],this._colorType=0,this._chunks={},this._chunks[r.TYPE_IHDR]=this._handleIHDR.bind(this),this._chunks[r.TYPE_IEND]=this._handleIEND.bind(this),this._chunks[r.TYPE_IDAT]=this._handleIDAT.bind(this),this._chunks[r.TYPE_PLTE]=this._handlePLTE.bind(this),this._chunks[r.TYPE_tRNS]=this._handleTRNS.bind(this),this._chunks[r.TYPE_gAMA]=this._handleGAMA.bind(this),this.read=e.read,this.error=e.error,this.metadata=e.metadata,this.gamma=e.gamma,this.transColor=e.transColor,this.palette=e.palette,this.parsed=e.parsed,this.inflateData=e.inflateData,this.finished=e.finished,this.simpleTransparency=e.simpleTransparency,this.headersFinished=e.headersFinished||function(){}};s.prototype.start=function(){this.read(r.PNG_SIGNATURE.length,this._parseSignature.bind(this))},s.prototype._parseSignature=function(t){let e=r.PNG_SIGNATURE;for(let i=0;i<e.length;i++)if(t[i]!==e[i])return void this.error(Error("Invalid file signature"));this.read(8,this._parseChunkBegin.bind(this))},s.prototype._parseChunkBegin=function(t){let e=t.readUInt32BE(0),i=t.readUInt32BE(4),s="";for(let e=4;e<8;e++)s+=String.fromCharCode(t[e]);let h=!!(32&t[4]);return this._hasIHDR||i===r.TYPE_IHDR?(this._crc=new n,this._crc.write(Buffer.from(s)),this._chunks[i])?this._chunks[i](e):h?void this.read(e+4,this._skipChunk.bind(this)):void this.error(Error("Unsupported critical chunk type "+s)):void this.error(Error("Expected IHDR on beggining"))},s.prototype._skipChunk=function(){this.read(8,this._parseChunkBegin.bind(this))},s.prototype._handleChunkEnd=function(){this.read(4,this._parseChunkEnd.bind(this))},s.prototype._parseChunkEnd=function(t){let e=t.readInt32BE(0),i=this._crc.crc32();if(this._options.checkCRC&&i!==e)return void this.error(Error("Crc error - "+e+" - "+i));this._hasIEND||this.read(8,this._parseChunkBegin.bind(this))},s.prototype._handleIHDR=function(t){this.read(t,this._parseIHDR.bind(this))},s.prototype._parseIHDR=function(t){this._crc.write(t);let e=t.readUInt32BE(0),i=t.readUInt32BE(4),n=t[8],s=t[9],h=t[10],o=t[11],a=t[12];if(8!==n&&4!==n&&2!==n&&1!==n&&16!==n)return void this.error(Error("Unsupported bit depth "+n));if(!(s in r.COLORTYPE_TO_BPP_MAP))return void this.error(Error("Unsupported color type"));if(0!==h)return void this.error(Error("Unsupported compression method"));if(0!==o)return void this.error(Error("Unsupported filter method"));if(0!==a&&1!==a)return void this.error(Error("Unsupported interlace method"));this._colorType=s;let l=r.COLORTYPE_TO_BPP_MAP[this._colorType];this._hasIHDR=!0,this.metadata({width:e,height:i,depth:n,interlace:!!a,palette:!!(s&r.COLORTYPE_PALETTE),color:!!(s&r.COLORTYPE_COLOR),alpha:!!(s&r.COLORTYPE_ALPHA),bpp:l,colorType:s}),this._handleChunkEnd()},s.prototype._handlePLTE=function(t){this.read(t,this._parsePLTE.bind(this))},s.prototype._parsePLTE=function(t){this._crc.write(t);let e=Math.floor(t.length/3);for(let i=0;i<e;i++)this._palette.push([t[3*i],t[3*i+1],t[3*i+2],255]);this.palette(this._palette),this._handleChunkEnd()},s.prototype._handleTRNS=function(t){this.simpleTransparency(),this.read(t,this._parseTRNS.bind(this))},s.prototype._parseTRNS=function(t){if(this._crc.write(t),this._colorType===r.COLORTYPE_PALETTE_COLOR){if(0===this._palette.length)return void this.error(Error("Transparency chunk must be after palette"));if(t.length>this._palette.length)return void this.error(Error("More transparent colors than palette size"));for(let e=0;e<t.length;e++)this._palette[e][3]=t[e];this.palette(this._palette)}this._colorType===r.COLORTYPE_GRAYSCALE&&this.transColor([t.readUInt16BE(0)]),this._colorType===r.COLORTYPE_COLOR&&this.transColor([t.readUInt16BE(0),t.readUInt16BE(2),t.readUInt16BE(4)]),this._handleChunkEnd()},s.prototype._handleGAMA=function(t){this.read(t,this._parseGAMA.bind(this))},s.prototype._parseGAMA=function(t){this._crc.write(t),this.gamma(t.readUInt32BE(0)/r.GAMMA_DIVISION),this._handleChunkEnd()},s.prototype._handleIDAT=function(t){this._emittedHeadersFinished||(this._emittedHeadersFinished=!0,this.headersFinished()),this.read(-t,this._parseIDAT.bind(this,t))},s.prototype._parseIDAT=function(t,e){if(this._crc.write(e),this._colorType===r.COLORTYPE_PALETTE_COLOR&&0===this._palette.length)throw Error("Expected palette not found");this.inflateData(e);let i=t-e.length;i>0?this._handleIDAT(i):this._handleChunkEnd()},s.prototype._handleIEND=function(t){this.read(t,this._parseIEND.bind(this))},s.prototype._parseIEND=function(t){this._crc.write(t),this._hasIEND=!0,this._handleChunkEnd(),this.finished&&this.finished()}},74047,(t,e,i)=>{"use strict";let r=t.r(33106),n=[function(){},function(t,e,i,r){if(r===e.length)throw Error("Ran out of data");let n=e[r];t[i]=n,t[i+1]=n,t[i+2]=n,t[i+3]=255},function(t,e,i,r){if(r+1>=e.length)throw Error("Ran out of data");let n=e[r];t[i]=n,t[i+1]=n,t[i+2]=n,t[i+3]=e[r+1]},function(t,e,i,r){if(r+2>=e.length)throw Error("Ran out of data");t[i]=e[r],t[i+1]=e[r+1],t[i+2]=e[r+2],t[i+3]=255},function(t,e,i,r){if(r+3>=e.length)throw Error("Ran out of data");t[i]=e[r],t[i+1]=e[r+1],t[i+2]=e[r+2],t[i+3]=e[r+3]}],s=[function(){},function(t,e,i,r){let n=e[0];t[i]=n,t[i+1]=n,t[i+2]=n,t[i+3]=r},function(t,e,i){let r=e[0];t[i]=r,t[i+1]=r,t[i+2]=r,t[i+3]=e[1]},function(t,e,i,r){t[i]=e[0],t[i+1]=e[1],t[i+2]=e[2],t[i+3]=r},function(t,e,i){t[i]=e[0],t[i+1]=e[1],t[i+2]=e[2],t[i+3]=e[3]}];i.dataToBitMap=function(t,e){let i,h,o,a,l,f,p=e.width,u=e.height,c=e.depth,d=e.bpp,_=e.interlace;8!==c&&(i=[],h=0,o={get:function(e){for(;i.length<e;)!function(){let e,r,n,s;if(h===t.length)throw Error("Ran out of data");let o=t[h];switch(h++,c){default:throw Error("unrecognised depth");case 16:n=t[h],h++,i.push((o<<8)+n);break;case 4:n=15&o,s=o>>4,i.push(s,n);break;case 2:e=3&o,r=o>>2&3,n=o>>4&3,s=o>>6&3,i.push(s,n,r,e);break;case 1:e=o>>4&1,r=o>>5&1,n=o>>6&1,s=o>>7&1,i.push(s,n,r,e,o>>3&1,o>>2&1,o>>1&1,1&o)}}();let r=i.slice(0,e);return i=i.slice(e),r},resetAfterLine:function(){i.length=0},end:function(){if(h!==t.length)throw Error("extra data found")}}),a=c<=8?Buffer.alloc(p*u*4):new Uint16Array(p*u*4);let g=Math.pow(2,c)-1,b=0;if(_)l=r.getImagePasses(p,u),f=r.getInterlaceIterator(p,u);else{let t=0;f=function(){let e=t;return t+=4,e},l=[{width:p,height:u}]}for(let e=0;e<l.length;e++)8===c?b=function(t,e,i,r,s,h){let o=t.width,a=t.height,l=t.index;for(let t=0;t<a;t++)for(let a=0;a<o;a++){let o=i(a,t,l);n[r](e,s,o,h),h+=r}return h}(l[e],a,f,d,t,b):function(t,e,i,r,n,h){let o=t.width,a=t.height,l=t.index;for(let t=0;t<a;t++){for(let a=0;a<o;a++){let o=n.get(r),f=i(a,t,l);s[r](e,o,f,h)}n.resetAfterLine()}}(l[e],a,f,d,o,g);if(8===c){if(b!==t.length)throw Error("extra data found")}else o.end();return a}},37829,(t,e,i)=>{"use strict";e.exports=function(t,e,i=!1){let r=e.depth,n=e.width,s=e.height,h=e.colorType,o=e.transColor,a=e.palette,l=t;return 3===h?!function(t,e,i,r,n){let s=0;for(let h=0;h<r;h++)for(let r=0;r<i;r++){let i=n[t[s]];if(!i)throw Error("index "+t[s]+" not in palette");for(let t=0;t<4;t++)e[s+t]=i[t];s+=4}}(t,l,n,s,a):(o&&function(t,e,i,r,n){let s=0;for(let h=0;h<r;h++)for(let r=0;r<i;r++){let i=!1;if(1===n.length?n[0]===t[s]&&(i=!0):n[0]===t[s]&&n[1]===t[s+1]&&n[2]===t[s+2]&&(i=!0),i)for(let t=0;t<4;t++)e[s+t]=0;s+=4}}(t,l,n,s,o),8===r||i||(16===r&&(l=Buffer.alloc(n*s*4)),!function(t,e,i,r,n){let s=Math.pow(2,n)-1,h=0;for(let n=0;n<r;n++)for(let r=0;r<i;r++){for(let i=0;i<4;i++)e[h+i]=Math.floor(255*t[h+i]/s+.5);h+=4}}(t,l,n,s,r))),l}},6183,(t,e,i)=>{"use strict";let r=t.r(24361),n=t.r(6461),s=t.r(37106),h=t.r(41998),o=t.r(23213),a=t.r(74047),l=t.r(37829),f=e.exports=function(t){s.call(this),this._parser=new o(t,{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=t,this.writable=!0,this._parser.start()};r.inherits(f,s),f.prototype._handleError=function(t){this.emit("error",t),this.writable=!1,this.destroy(),this._inflate&&this._inflate.destroy&&this._inflate.destroy(),this._filter&&(this._filter.destroy(),this._filter.on("error",function(){})),this.errord=!0},f.prototype._inflateData=function(t){if(!this._inflate)if(this._bitmapInfo.interlace)this._inflate=n.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 t=((this._bitmapInfo.width*this._bitmapInfo.bpp*this._bitmapInfo.depth+7>>3)+1)*this._bitmapInfo.height,e=Math.max(t,n.Z_MIN_CHUNK);this._inflate=n.createInflate({chunkSize:e});let i=t,r=this.emit.bind(this,"error");this._inflate.on("error",function(t){i&&r(t)}),this._filter.on("complete",this._complete.bind(this));let s=this._filter.write.bind(this._filter);this._inflate.on("data",function(t){i&&(t.length>i&&(t=t.slice(0,i)),i-=t.length,s(t))}),this._inflate.on("end",this._filter.end.bind(this._filter))}this._inflate.write(t)},f.prototype._handleMetaData=function(t){this._metaData=t,this._bitmapInfo=Object.create(t),this._filter=new h(this._bitmapInfo)},f.prototype._handleTransColor=function(t){this._bitmapInfo.transColor=t},f.prototype._handlePalette=function(t){this._bitmapInfo.palette=t},f.prototype._simpleTransparency=function(){this._metaData.alpha=!0},f.prototype._headersFinished=function(){this.emit("metadata",this._metaData)},f.prototype._finished=function(){this.errord||(this._inflate?this._inflate.end():this.emit("error","No Inflate block"))},f.prototype._complete=function(t){let e;if(!this.errord){try{let i=a.dataToBitMap(t,this._bitmapInfo);e=l(i,this._bitmapInfo,this._options.skipRescale),i=null}catch(t){this._handleError(t);return}this.emit("parsed",e)}}},55920,(t,e,i)=>{"use strict";let r=t.r(86982);e.exports=function(t,e,i,n){let s=-1!==[r.COLORTYPE_COLOR_ALPHA,r.COLORTYPE_ALPHA].indexOf(n.colorType);if(n.colorType===n.inputColorType){let e,i=(new DataView(e=new ArrayBuffer(2)).setInt16(0,256,!0),256!==new Int16Array(e)[0]);if(8===n.bitDepth||16===n.bitDepth&&i)return t}let h=16!==n.bitDepth?t:new Uint16Array(t.buffer),o=255,a=r.COLORTYPE_TO_BPP_MAP[n.inputColorType];4!==a||n.inputHasAlpha||(a=3);let l=r.COLORTYPE_TO_BPP_MAP[n.colorType];16===n.bitDepth&&(o=65535,l*=2);let f=Buffer.alloc(e*i*l),p=0,u=0,c=n.bgColor||{};void 0===c.red&&(c.red=o),void 0===c.green&&(c.green=o),void 0===c.blue&&(c.blue=o);for(let t=0;t<i;t++)for(let t=0;t<e;t++){let t=function(){let t,e,i,a=o;switch(n.inputColorType){case r.COLORTYPE_COLOR_ALPHA:a=h[p+3],t=h[p],e=h[p+1],i=h[p+2];break;case r.COLORTYPE_COLOR:t=h[p],e=h[p+1],i=h[p+2];break;case r.COLORTYPE_ALPHA:a=h[p+1],e=t=h[p],i=t;break;case r.COLORTYPE_GRAYSCALE:e=t=h[p],i=t;break;default:throw Error("input color type:"+n.inputColorType+" is not supported at present")}return n.inputHasAlpha&&!s&&(a/=o,t=Math.min(Math.max(Math.round((1-a)*c.red+a*t),0),o),e=Math.min(Math.max(Math.round((1-a)*c.green+a*e),0),o),i=Math.min(Math.max(Math.round((1-a)*c.blue+a*i),0),o)),{red:t,green:e,blue:i,alpha:a}}(h,p);switch(n.colorType){case r.COLORTYPE_COLOR_ALPHA:case r.COLORTYPE_COLOR:8===n.bitDepth?(f[u]=t.red,f[u+1]=t.green,f[u+2]=t.blue,s&&(f[u+3]=t.alpha)):(f.writeUInt16BE(t.red,u),f.writeUInt16BE(t.green,u+2),f.writeUInt16BE(t.blue,u+4),s&&f.writeUInt16BE(t.alpha,u+6));break;case r.COLORTYPE_ALPHA:case r.COLORTYPE_GRAYSCALE:{let e=(t.red+t.green+t.blue)/3;8===n.bitDepth?(f[u]=e,s&&(f[u+1]=t.alpha)):(f.writeUInt16BE(e,u),s&&f.writeUInt16BE(t.alpha,u+2));break}default:throw Error("unrecognised color Type "+n.colorType)}p+=a,u+=l}return f}},50796,(t,e,i)=>{"use strict";let r=t.r(35352),n={0:function(t,e,i,r,n){for(let s=0;s<i;s++)r[n+s]=t[e+s]},1:function(t,e,i,r,n,s){for(let h=0;h<i;h++){let i=h>=s?t[e+h-s]:0,o=t[e+h]-i;r[n+h]=o}},2:function(t,e,i,r,n){for(let s=0;s<i;s++){let h=e>0?t[e+s-i]:0,o=t[e+s]-h;r[n+s]=o}},3:function(t,e,i,r,n,s){for(let h=0;h<i;h++){let o=h>=s?t[e+h-s]:0,a=e>0?t[e+h-i]:0,l=t[e+h]-(o+a>>1);r[n+h]=l}},4:function(t,e,i,n,s,h){for(let o=0;o<i;o++){let a=o>=h?t[e+o-h]:0,l=e>0?t[e+o-i]:0,f=e>0&&o>=h?t[e+o-(i+h)]:0,p=t[e+o]-r(a,l,f);n[s+o]=p}}},s={0:function(t,e,i){let r=0,n=e+i;for(let i=e;i<n;i++)r+=Math.abs(t[i]);return r},1:function(t,e,i,r){let n=0;for(let s=0;s<i;s++){let i=s>=r?t[e+s-r]:0;n+=Math.abs(t[e+s]-i)}return n},2:function(t,e,i){let r=0,n=e+i;for(let s=e;s<n;s++){let n=e>0?t[s-i]:0;r+=Math.abs(t[s]-n)}return r},3:function(t,e,i,r){let n=0;for(let s=0;s<i;s++){let h=s>=r?t[e+s-r]:0,o=e>0?t[e+s-i]:0;n+=Math.abs(t[e+s]-(h+o>>1))}return n},4:function(t,e,i,n){let s=0;for(let h=0;h<i;h++){let o=h>=n?t[e+h-n]:0,a=e>0?t[e+h-i]:0,l=e>0&&h>=n?t[e+h-(i+n)]:0;s+=Math.abs(t[e+h]-r(o,a,l))}return s}};e.exports=function(t,e,i,r,h){let o;if("filterType"in r&&-1!==r.filterType)if("number"==typeof r.filterType)o=[r.filterType];else throw Error("unrecognised filter types");else o=[0,1,2,3,4];16===r.bitDepth&&(h*=2);let a=e*h,l=0,f=0,p=Buffer.alloc((a+1)*i),u=o[0];for(let e=0;e<i;e++){if(o.length>1){let e=1/0;for(let i=0;i<o.length;i++){let r=s[o[i]](t,f,a,h);r<e&&(u=o[i],e=r)}}p[l]=u,l++,n[u](t,f,a,p,l,h),l+=a,f+=a}return p}},59029,(t,e,i)=>{"use strict";let r=t.r(86982),n=t.r(22352),s=t.r(55920),h=t.r(50796),o=t.r(6461),a=e.exports=function(t){if(this._options=t,t.deflateChunkSize=t.deflateChunkSize||32768,t.deflateLevel=null!=t.deflateLevel?t.deflateLevel:9,t.deflateStrategy=null!=t.deflateStrategy?t.deflateStrategy:3,t.inputHasAlpha=null==t.inputHasAlpha||t.inputHasAlpha,t.deflateFactory=t.deflateFactory||o.createDeflate,t.bitDepth=t.bitDepth||8,t.colorType="number"==typeof t.colorType?t.colorType:r.COLORTYPE_COLOR_ALPHA,t.inputColorType="number"==typeof t.inputColorType?t.inputColorType:r.COLORTYPE_COLOR_ALPHA,-1===[r.COLORTYPE_GRAYSCALE,r.COLORTYPE_COLOR,r.COLORTYPE_COLOR_ALPHA,r.COLORTYPE_ALPHA].indexOf(t.colorType))throw Error("option color type:"+t.colorType+" is not supported at present");if(-1===[r.COLORTYPE_GRAYSCALE,r.COLORTYPE_COLOR,r.COLORTYPE_COLOR_ALPHA,r.COLORTYPE_ALPHA].indexOf(t.inputColorType))throw Error("option input color type:"+t.inputColorType+" is not supported at present");if(8!==t.bitDepth&&16!==t.bitDepth)throw Error("option bit depth:"+t.bitDepth+" is not supported at present")};a.prototype.getDeflateOptions=function(){return{chunkSize:this._options.deflateChunkSize,level:this._options.deflateLevel,strategy:this._options.deflateStrategy}},a.prototype.createDeflate=function(){return this._options.deflateFactory(this.getDeflateOptions())},a.prototype.filterData=function(t,e,i){let n=s(t,e,i,this._options),o=r.COLORTYPE_TO_BPP_MAP[this._options.colorType];return h(n,e,i,this._options,o)},a.prototype._packChunk=function(t,e){let i=e?e.length:0,r=Buffer.alloc(i+12);return r.writeUInt32BE(i,0),r.writeUInt32BE(t,4),e&&e.copy(r,8),r.writeInt32BE(n.crc32(r.slice(4,r.length-4)),r.length-4),r},a.prototype.packGAMA=function(t){let e=Buffer.alloc(4);return e.writeUInt32BE(Math.floor(t*r.GAMMA_DIVISION),0),this._packChunk(r.TYPE_gAMA,e)},a.prototype.packIHDR=function(t,e){let i=Buffer.alloc(13);return i.writeUInt32BE(t,0),i.writeUInt32BE(e,4),i[8]=this._options.bitDepth,i[9]=this._options.colorType,i[10]=0,i[11]=0,i[12]=0,this._packChunk(r.TYPE_IHDR,i)},a.prototype.packIDAT=function(t){return this._packChunk(r.TYPE_IDAT,t)},a.prototype.packIEND=function(){return this._packChunk(r.TYPE_IEND,null)}},49152,(t,e,i)=>{"use strict";let r=t.r(24361),n=t.r(88947),s=t.r(86982),h=t.r(59029),o=e.exports=function(t){n.call(this),this._packer=new h(t||{}),this._deflate=this._packer.createDeflate(),this.readable=!0};r.inherits(o,n),o.prototype.pack=function(t,e,i,r){this.emit("data",Buffer.from(s.PNG_SIGNATURE)),this.emit("data",this._packer.packIHDR(e,i)),r&&this.emit("data",this._packer.packGAMA(r));let n=this._packer.filterData(t,e,i);this._deflate.on("error",this.emit.bind(this,"error")),this._deflate.on("data",(function(t){this.emit("data",this._packer.packIDAT(t))}).bind(this)),this._deflate.on("end",(function(){this.emit("data",this._packer.packIEND()),this.emit("end")}).bind(this)),this._deflate.end(n)}},49719,(t,e,i)=>{e.exports=t.x("assert",()=>require("assert"))},874,(t,e,i)=>{e.exports=t.x("buffer",()=>require("buffer"))},26190,(t,e,i)=>{"use strict";let r=t.r(49719).ok,n=t.r(6461),s=t.r(24361),h=t.r(874).kMaxLength;function o(t){if(!(this instanceof o))return new o(t);t&&t.chunkSize<n.Z_MIN_CHUNK&&(t.chunkSize=n.Z_MIN_CHUNK),n.Inflate.call(this,t),this._offset=void 0===this._offset?this._outOffset:this._offset,this._buffer=this._buffer||this._outBuffer,t&&null!=t.maxLength&&(this._maxLength=t.maxLength)}function a(t,e){e&&process.nextTick(e),t._handle&&(t._handle.close(),t._handle=null)}function l(t,e){var i=new o(e),r=t;if("string"==typeof r&&(r=Buffer.from(r)),!(r instanceof Buffer))throw TypeError("Not a string or buffer");let s=i._finishFlushFlag;return null==s&&(s=n.Z_FINISH),i._processChunk(r,s)}o.prototype._processChunk=function(t,e,i){let s,o;if("function"==typeof i)return n.Inflate._processChunk.call(this,t,e,i);let l=this,f=t&&t.length,p=this._chunkSize-this._offset,u=this._maxLength,c=0,d=[],_=0;this.on("error",function(t){s=t}),r(this._handle,"zlib binding closed");do o=(o=this._handle.writeSync(e,t,c,f,this._buffer,this._offset,p))||this._writeState;while(!this._hadError&&function(t,e){if(l._hadError)return;let i=p-e;if(r(i>=0,"have should not go down"),i>0){let t=l._buffer.slice(l._offset,l._offset+i);if(l._offset+=i,t.length>u&&(t=t.slice(0,u)),d.push(t),_+=t.length,0==(u-=t.length))return!1}return(0===e||l._offset>=l._chunkSize)&&(p=l._chunkSize,l._offset=0,l._buffer=Buffer.allocUnsafe(l._chunkSize)),0===e&&(c+=f-t,f=t,!0)}(o[0],o[1]))if(this._hadError)throw s;if(_>=h)throw a(this),RangeError("Cannot create final Buffer. It would be larger than 0x"+h.toString(16)+" bytes");let g=Buffer.concat(d,_);return a(this),g},s.inherits(o,n.Inflate),e.exports=i=l,i.Inflate=o,i.createInflate=function(t){return new o(t)},i.inflateSync=l},75886,(t,e,i)=>{"use strict";let r=e.exports=function(t){this._buffer=t,this._reads=[]};r.prototype.read=function(t,e){this._reads.push({length:Math.abs(t),allowLess:t<0,func:e})},r.prototype.process=function(){for(;this._reads.length>0&&this._buffer.length;){let t=this._reads[0];if(this._buffer.length&&(this._buffer.length>=t.length||t.allowLess)){this._reads.shift();let e=this._buffer;this._buffer=e.slice(t.length),t.func.call(this,e.slice(0,t.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")}},36511,(t,e,i)=>{"use strict";let r=t.r(75886),n=t.r(28378);i.process=function(t,e){let i=[],s=new r(t);return new n(e,{read:s.read.bind(s),write:function(t){i.push(t)},complete:function(){}}).start(),s.process(),Buffer.concat(i)}},2291,(t,e,i)=>{"use strict";let r=!0,n=t.r(6461),s=t.r(26190);n.deflateSync||(r=!1);let h=t.r(75886),o=t.r(36511),a=t.r(23213),l=t.r(74047),f=t.r(37829);e.exports=function(t,e){let i,p,u,c;if(!r)throw Error("To use the sync capability of this library in old node versions, please pin pngjs to v2.3.0");let d=[],_=new h(t);if(new a(e,{read:_.read.bind(_),error:function(t){i=t},metadata:function(t){p=t},gamma:function(t){u=t},palette:function(t){p.palette=t},transColor:function(t){p.transColor=t},inflateData:function(t){d.push(t)},simpleTransparency:function(){p.alpha=!0}}).start(),_.process(),i)throw i;let g=Buffer.concat(d);if(d.length=0,p.interlace)c=n.inflateSync(g);else{let t=((p.width*p.bpp*p.depth+7>>3)+1)*p.height;c=s(g,{chunkSize:t,maxLength:t})}if(g=null,!c||!c.length)throw Error("bad png - invalid inflate data response");let b=o.process(c,p);g=null;let y=l.dataToBitMap(b,p);b=null;let m=f(y,p,e.skipRescale);return p.data=m,p.gamma=u||0,p}},69762,(t,e,i)=>{"use strict";let r=!0,n=t.r(6461);n.deflateSync||(r=!1);let s=t.r(86982),h=t.r(59029);e.exports=function(t,e){if(!r)throw Error("To use the sync capability of this library in old node versions, please pin pngjs to v2.3.0");let i=new h(e||{}),o=[];o.push(Buffer.from(s.PNG_SIGNATURE)),o.push(i.packIHDR(t.width,t.height)),t.gamma&&o.push(i.packGAMA(t.gamma));let a=i.filterData(t.data,t.width,t.height),l=n.deflateSync(a,i.getDeflateOptions());if(a=null,!l||!l.length)throw Error("bad png - invalid compressed data response");return o.push(i.packIDAT(l)),o.push(i.packIEND()),Buffer.concat(o)}},93079,(t,e,i)=>{"use strict";let r=t.r(2291),n=t.r(69762);i.read=function(t,e){return r(t,e||{})},i.write=function(t,e){return n(t,e)}},60801,(t,e,i)=>{"use strict";let r=t.r(24361),n=t.r(88947),s=t.r(6183),h=t.r(49152),o=t.r(93079),a=i.PNG=function(t){n.call(this),t=t||{},this.width=0|t.width,this.height=0|t.height,this.data=this.width>0&&this.height>0?Buffer.alloc(4*this.width*this.height):null,t.fill&&this.data&&this.data.fill(0),this.gamma=0,this.readable=this.writable=!0,this._parser=new s(t),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(t){this.data=t,this.emit("parsed",t)}).bind(this)),this._packer=new h(t),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"))};r.inherits(a,n),a.sync=o,a.prototype.pack=function(){return this.data&&this.data.length?process.nextTick((function(){this._packer.pack(this.data,this.width,this.height,this.gamma)}).bind(this)):this.emit("error","No data provided"),this},a.prototype.parse=function(t,e){if(e){let t,i;t=(function(t){this.removeListener("error",i),this.data=t,e(null,this)}).bind(this),i=(function(i){this.removeListener("parsed",t),e(i,null)}).bind(this),this.once("parsed",t),this.once("error",i)}return this.end(t),this},a.prototype.write=function(t){return this._parser.write(t),!0},a.prototype.end=function(t){this._parser.end(t)},a.prototype._metadata=function(t){this.width=t.width,this.height=t.height,this.emit("metadata",t)},a.prototype._gamma=function(t){this.gamma=t},a.prototype._handleClose=function(){this._parser.writable||this._packer.readable||this.emit("close")},a.bitblt=function(t,e,i,r,n,s,h,o){if(r|=0,n|=0,s|=0,h|=0,o|=0,(i|=0)>t.width||r>t.height||i+n>t.width||r+s>t.height)throw Error("bitblt reading outside image");if(h>e.width||o>e.height||h+n>e.width||o+s>e.height)throw Error("bitblt writing outside image");for(let a=0;a<s;a++)t.data.copy(e.data,(o+a)*e.width+h<<2,(r+a)*t.width+i<<2,(r+a)*t.width+i+n<<2)},a.prototype.bitblt=function(t,e,i,r,n,s,h){return a.bitblt(this,t,e,i,r,n,s,h),this},a.adjustGamma=function(t){if(t.gamma){for(let e=0;e<t.height;e++)for(let i=0;i<t.width;i++){let r=t.width*e+i<<2;for(let e=0;e<3;e++){let i=t.data[r+e]/255;i=Math.pow(i,1/2.2/t.gamma),t.data[r+e]=Math.round(255*i)}}t.gamma=0}},a.prototype.adjustGamma=function(){a.adjustGamma(this)}}];
1
+ module.exports=[73169,t=>{"use strict";function e(t,n,a,l,f,p={}){let{threshold:u=.1,alpha:c=.1,aaColor:d=[255,255,0],diffColor:_=[255,0,0],includeAA:g,diffColorAlt:b,diffMask:y}=p;if(!i(t)||!i(n)||a&&!i(a))throw Error("Image data: Uint8Array, Uint8ClampedArray or Buffer expected.");if(t.length!==n.length||a&&a.length!==t.length)throw Error("Image sizes do not match.");if(t.length!==l*f*4)throw Error("Image data size does not match width/height.");let m=l*f,E=new Uint32Array(t.buffer,t.byteOffset,m),T=new Uint32Array(n.buffer,n.byteOffset,m),w=!0;for(let t=0;t<m;t++)if(E[t]!==T[t]){w=!1;break}if(w){if(a&&!y)for(let e=0;e<m;e++)o(t,4*e,c,a);return 0}let C=35215*u*u,[O,I,L]=d,[A,P,k]=_,[R,x,D]=b||_,M=0;for(let e=0;e<f;e++)for(let i=0;i<l;i++){let p=e*l+i,u=4*p,d=E[p]===T[p]?0:s(t,n,u,u,!1);if(Math.abs(d)>C){let s=r(t,i,e,l,f,E,T)||r(n,i,e,l,f,T,E);!g&&s?a&&!y&&h(a,u,O,I,L):(a&&(d<0?h(a,u,R,x,D):h(a,u,A,P,k)),M++)}else a&&!y&&o(t,u,c,a)}return M}function i(t){return ArrayBuffer.isView(t)&&1===t.BYTES_PER_ELEMENT}function r(t,e,i,r,h,o,a){let l=Math.max(e-1,0),f=Math.max(i-1,0),p=Math.min(e+1,r-1),u=Math.min(i+1,h-1),c=i*r+e,d=+(e===l||e===p||i===f||i===u),_=0,g=0,b=0,y=0,m=0,E=0;for(let n=l;n<=p;n++)for(let h=f;h<=u;h++){if(n===e&&h===i)continue;let o=s(t,t,4*c,(h*r+n)*4,!0);if(0===o){if(++d>2)return!1}else o<_?(_=o,b=n,y=h):o>g&&(g=o,m=n,E=h)}return 0!==_&&0!==g&&(n(o,b,y,r,h)&&n(a,b,y,r,h)||n(o,m,E,r,h)&&n(a,m,E,r,h))}function n(t,e,i,r,n){let s=Math.max(e-1,0),h=Math.max(i-1,0),o=Math.min(e+1,r-1),a=Math.min(i+1,n-1),l=t[i*r+e],f=+(e===s||e===o||i===h||i===a);for(let n=s;n<=o;n++)for(let s=h;s<=a;s++)if((n!==e||s!==i)&&(f+=+(l===t[s*r+n]))>2)return!0;return!1}function s(t,e,i,r,n){let s=t[i],h=t[i+1],o=t[i+2],a=t[i+3],l=e[r],f=e[r+1],p=e[r+2],u=e[r+3],c=s-l,d=h-f,_=o-p,g=a-u;if(!c&&!d&&!_&&!g)return 0;(a<255||u<255)&&(c=(s*a-l*u-(48+i%2*159)*g)/255,d=(h*a-f*u-(48+(i/1.618033988749895|0)%2*159)*g)/255,_=(o*a-p*u-(48+(i/2.618033988749895|0)%2*159)*g)/255);let b=.29889531*c+.58662247*d+.11448223*_;if(n)return b;let y=.59597799*c-.2741761*d-.32180189*_,m=.21147017*c-.52261711*d+.31114694*_,E=.5053*b*b+.299*y*y+.1957*m*m;return b>0?-E:E}function h(t,e,i,r,n){t[e+0]=i,t[e+1]=r,t[e+2]=n,t[e+3]=255}function o(t,e,i,r){let n=255+(.29889531*t[e]+.58662247*t[e+1]+.11448223*t[e+2]-255)*i*t[e+3]/255;h(r,e,n,n,n)}t.s(["default",()=>e])},88947,(t,e,i)=>{e.exports=t.x("stream",()=>require("stream"))},6461,(t,e,i)=>{e.exports=t.x("zlib",()=>require("zlib"))},37106,(t,e,i)=>{"use strict";let r=t.r(24361),n=t.r(88947),s=e.exports=function(){n.call(this),this._buffers=[],this._buffered=0,this._reads=[],this._paused=!1,this._encoding="utf8",this.writable=!0};r.inherits(s,n),s.prototype.read=function(t,e){this._reads.push({length:Math.abs(t),allowLess:t<0,func:e}),process.nextTick((function(){this._process(),this._paused&&this._reads&&this._reads.length>0&&(this._paused=!1,this.emit("drain"))}).bind(this))},s.prototype.write=function(t,e){let i;return this.writable?(i=Buffer.isBuffer(t)?t:Buffer.from(t,e||this._encoding),this._buffers.push(i),this._buffered+=i.length,this._process(),this._reads&&0===this._reads.length&&(this._paused=!0),this.writable&&!this._paused):(this.emit("error",Error("Stream not writable")),!1)},s.prototype.end=function(t,e){t&&this.write(t,e),this.writable=!1,this._buffers&&(0===this._buffers.length?this._end():(this._buffers.push(null),this._process()))},s.prototype.destroySoon=s.prototype.end,s.prototype._end=function(){this._reads.length>0&&this.emit("error",Error("Unexpected end of input")),this.destroy()},s.prototype.destroy=function(){this._buffers&&(this.writable=!1,this._reads=null,this._buffers=null,this.emit("close"))},s.prototype._processReadAllowingLess=function(t){this._reads.shift();let e=this._buffers[0];e.length>t.length?(this._buffered-=t.length,this._buffers[0]=e.slice(t.length),t.func.call(this,e.slice(0,t.length))):(this._buffered-=e.length,this._buffers.shift(),t.func.call(this,e))},s.prototype._processRead=function(t){this._reads.shift();let e=0,i=0,r=Buffer.alloc(t.length);for(;e<t.length;){let n=this._buffers[i++],s=Math.min(n.length,t.length-e);n.copy(r,e,0,s),e+=s,s!==n.length&&(this._buffers[--i]=n.slice(s))}i>0&&this._buffers.splice(0,i),this._buffered-=t.length,t.func.call(this,r)},s.prototype._process=function(){try{for(;this._buffered>0&&this._reads&&this._reads.length>0;){let t=this._reads[0];if(t.allowLess)this._processReadAllowingLess(t);else if(this._buffered>=t.length)this._processRead(t);else break}this._buffers&&!this.writable&&this._end()}catch(t){this.emit("error",t)}}},33106,(t,e,i)=>{"use strict";let r=[{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]}];i.getImagePasses=function(t,e){let i=[],n=t%8,s=e%8,h=(t-n)/8,o=(e-s)/8;for(let t=0;t<r.length;t++){let e=r[t],a=h*e.x.length,l=o*e.y.length;for(let t=0;t<e.x.length;t++)if(e.x[t]<n)a++;else break;for(let t=0;t<e.y.length;t++)if(e.y[t]<s)l++;else break;a>0&&l>0&&i.push({width:a,height:l,index:t})}return i},i.getInterlaceIterator=function(t){return function(e,i,n){let s=e%r[n].x.length,h=(e-s)/r[n].x.length*8+r[n].x[s],o=i%r[n].y.length;return 4*h+((i-o)/r[n].y.length*8+r[n].y[o])*t*4}}},35352,(t,e,i)=>{"use strict";e.exports=function(t,e,i){let r=t+e-i,n=Math.abs(r-t),s=Math.abs(r-e),h=Math.abs(r-i);return n<=s&&n<=h?t:s<=h?e:i}},28378,(t,e,i)=>{"use strict";let r=t.r(33106),n=t.r(35352);function s(t,e,i){let r=t*e;return 8!==i&&(r=Math.ceil(r/(8/i))),r}let h=e.exports=function(t,e){let i=t.width,n=t.height,h=t.interlace,o=t.bpp,a=t.depth;if(this.read=e.read,this.write=e.write,this.complete=e.complete,this._imageIndex=0,this._images=[],h){let t=r.getImagePasses(i,n);for(let e=0;e<t.length;e++)this._images.push({byteWidth:s(t[e].width,o,a),height:t[e].height,lineIndex:0})}else this._images.push({byteWidth:s(i,o,a),height:n,lineIndex:0});8===a?this._xComparison=o:16===a?this._xComparison=2*o:this._xComparison=1};h.prototype.start=function(){this.read(this._images[this._imageIndex].byteWidth+1,this._reverseFilterLine.bind(this))},h.prototype._unFilterType1=function(t,e,i){let r=this._xComparison,n=r-1;for(let s=0;s<i;s++){let i=t[1+s],h=s>n?e[s-r]:0;e[s]=i+h}},h.prototype._unFilterType2=function(t,e,i){let r=this._lastLine;for(let n=0;n<i;n++){let i=t[1+n],s=r?r[n]:0;e[n]=i+s}},h.prototype._unFilterType3=function(t,e,i){let r=this._xComparison,n=r-1,s=this._lastLine;for(let h=0;h<i;h++){let i=t[1+h],o=s?s[h]:0,a=Math.floor(((h>n?e[h-r]:0)+o)/2);e[h]=i+a}},h.prototype._unFilterType4=function(t,e,i){let r=this._xComparison,s=r-1,h=this._lastLine;for(let o=0;o<i;o++){let i=t[1+o],a=h?h[o]:0,l=n(o>s?e[o-r]:0,a,o>s&&h?h[o-r]:0);e[o]=i+l}},h.prototype._reverseFilterLine=function(t){let e,i=t[0],r=this._images[this._imageIndex],n=r.byteWidth;if(0===i)e=t.slice(1,n+1);else switch(e=Buffer.alloc(n),i){case 1:this._unFilterType1(t,e,n);break;case 2:this._unFilterType2(t,e,n);break;case 3:this._unFilterType3(t,e,n);break;case 4:this._unFilterType4(t,e,n);break;default:throw Error("Unrecognised filter type - "+i)}this.write(e),r.lineIndex++,r.lineIndex>=r.height?(this._lastLine=null,this._imageIndex++,r=this._images[this._imageIndex]):this._lastLine=e,r?this.read(r.byteWidth+1,this._reverseFilterLine.bind(this)):(this._lastLine=null,this.complete())}},41998,(t,e,i)=>{"use strict";let r=t.r(24361),n=t.r(37106),s=t.r(28378),h=e.exports=function(t){n.call(this);let e=[],i=this;this._filter=new s(t,{read:this.read.bind(this),write:function(t){e.push(t)},complete:function(){i.emit("complete",Buffer.concat(e))}}),this._filter.start()};r.inherits(h,n)},86982,(t,e,i)=>{"use strict";e.exports={PNG_SIGNATURE:[137,80,78,71,13,10,26,10],TYPE_IHDR:0x49484452,TYPE_IEND:0x49454e44,TYPE_IDAT:0x49444154,TYPE_PLTE:0x504c5445,TYPE_tRNS:0x74524e53,TYPE_gAMA:0x67414d41,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}},22352,(t,e,i)=>{"use strict";let r=[];for(let t=0;t<256;t++){let e=t;for(let t=0;t<8;t++)1&e?e=0xedb88320^e>>>1:e>>>=1;r[t]=e}let n=e.exports=function(){this._crc=-1};n.prototype.write=function(t){for(let e=0;e<t.length;e++)this._crc=r[(this._crc^t[e])&255]^this._crc>>>8;return!0},n.prototype.crc32=function(){return -1^this._crc},n.crc32=function(t){let e=-1;for(let i=0;i<t.length;i++)e=r[(e^t[i])&255]^e>>>8;return -1^e}},23213,(t,e,i)=>{"use strict";let r=t.r(86982),n=t.r(22352),s=e.exports=function(t,e){this._options=t,t.checkCRC=!1!==t.checkCRC,this._hasIHDR=!1,this._hasIEND=!1,this._emittedHeadersFinished=!1,this._palette=[],this._colorType=0,this._chunks={},this._chunks[r.TYPE_IHDR]=this._handleIHDR.bind(this),this._chunks[r.TYPE_IEND]=this._handleIEND.bind(this),this._chunks[r.TYPE_IDAT]=this._handleIDAT.bind(this),this._chunks[r.TYPE_PLTE]=this._handlePLTE.bind(this),this._chunks[r.TYPE_tRNS]=this._handleTRNS.bind(this),this._chunks[r.TYPE_gAMA]=this._handleGAMA.bind(this),this.read=e.read,this.error=e.error,this.metadata=e.metadata,this.gamma=e.gamma,this.transColor=e.transColor,this.palette=e.palette,this.parsed=e.parsed,this.inflateData=e.inflateData,this.finished=e.finished,this.simpleTransparency=e.simpleTransparency,this.headersFinished=e.headersFinished||function(){}};s.prototype.start=function(){this.read(r.PNG_SIGNATURE.length,this._parseSignature.bind(this))},s.prototype._parseSignature=function(t){let e=r.PNG_SIGNATURE;for(let i=0;i<e.length;i++)if(t[i]!==e[i])return void this.error(Error("Invalid file signature"));this.read(8,this._parseChunkBegin.bind(this))},s.prototype._parseChunkBegin=function(t){let e=t.readUInt32BE(0),i=t.readUInt32BE(4),s="";for(let e=4;e<8;e++)s+=String.fromCharCode(t[e]);let h=!!(32&t[4]);return this._hasIHDR||i===r.TYPE_IHDR?(this._crc=new n,this._crc.write(Buffer.from(s)),this._chunks[i])?this._chunks[i](e):h?void this.read(e+4,this._skipChunk.bind(this)):void this.error(Error("Unsupported critical chunk type "+s)):void this.error(Error("Expected IHDR on beggining"))},s.prototype._skipChunk=function(){this.read(8,this._parseChunkBegin.bind(this))},s.prototype._handleChunkEnd=function(){this.read(4,this._parseChunkEnd.bind(this))},s.prototype._parseChunkEnd=function(t){let e=t.readInt32BE(0),i=this._crc.crc32();this._options.checkCRC&&i!==e?this.error(Error("Crc error - "+e+" - "+i)):this._hasIEND||this.read(8,this._parseChunkBegin.bind(this))},s.prototype._handleIHDR=function(t){this.read(t,this._parseIHDR.bind(this))},s.prototype._parseIHDR=function(t){this._crc.write(t);let e=t.readUInt32BE(0),i=t.readUInt32BE(4),n=t[8],s=t[9],h=t[10],o=t[11],a=t[12];if(8!==n&&4!==n&&2!==n&&1!==n&&16!==n)return void this.error(Error("Unsupported bit depth "+n));if(!(s in r.COLORTYPE_TO_BPP_MAP))return void this.error(Error("Unsupported color type"));if(0!==h)return void this.error(Error("Unsupported compression method"));if(0!==o)return void this.error(Error("Unsupported filter method"));if(0!==a&&1!==a)return void this.error(Error("Unsupported interlace method"));this._colorType=s;let l=r.COLORTYPE_TO_BPP_MAP[this._colorType];this._hasIHDR=!0,this.metadata({width:e,height:i,depth:n,interlace:!!a,palette:!!(s&r.COLORTYPE_PALETTE),color:!!(s&r.COLORTYPE_COLOR),alpha:!!(s&r.COLORTYPE_ALPHA),bpp:l,colorType:s}),this._handleChunkEnd()},s.prototype._handlePLTE=function(t){this.read(t,this._parsePLTE.bind(this))},s.prototype._parsePLTE=function(t){this._crc.write(t);let e=Math.floor(t.length/3);for(let i=0;i<e;i++)this._palette.push([t[3*i],t[3*i+1],t[3*i+2],255]);this.palette(this._palette),this._handleChunkEnd()},s.prototype._handleTRNS=function(t){this.simpleTransparency(),this.read(t,this._parseTRNS.bind(this))},s.prototype._parseTRNS=function(t){if(this._crc.write(t),this._colorType===r.COLORTYPE_PALETTE_COLOR){if(0===this._palette.length)return void this.error(Error("Transparency chunk must be after palette"));if(t.length>this._palette.length)return void this.error(Error("More transparent colors than palette size"));for(let e=0;e<t.length;e++)this._palette[e][3]=t[e];this.palette(this._palette)}this._colorType===r.COLORTYPE_GRAYSCALE&&this.transColor([t.readUInt16BE(0)]),this._colorType===r.COLORTYPE_COLOR&&this.transColor([t.readUInt16BE(0),t.readUInt16BE(2),t.readUInt16BE(4)]),this._handleChunkEnd()},s.prototype._handleGAMA=function(t){this.read(t,this._parseGAMA.bind(this))},s.prototype._parseGAMA=function(t){this._crc.write(t),this.gamma(t.readUInt32BE(0)/r.GAMMA_DIVISION),this._handleChunkEnd()},s.prototype._handleIDAT=function(t){this._emittedHeadersFinished||(this._emittedHeadersFinished=!0,this.headersFinished()),this.read(-t,this._parseIDAT.bind(this,t))},s.prototype._parseIDAT=function(t,e){if(this._crc.write(e),this._colorType===r.COLORTYPE_PALETTE_COLOR&&0===this._palette.length)throw Error("Expected palette not found");this.inflateData(e);let i=t-e.length;i>0?this._handleIDAT(i):this._handleChunkEnd()},s.prototype._handleIEND=function(t){this.read(t,this._parseIEND.bind(this))},s.prototype._parseIEND=function(t){this._crc.write(t),this._hasIEND=!0,this._handleChunkEnd(),this.finished&&this.finished()}},74047,(t,e,i)=>{"use strict";let r=t.r(33106),n=[function(){},function(t,e,i,r){if(r===e.length)throw Error("Ran out of data");let n=e[r];t[i]=n,t[i+1]=n,t[i+2]=n,t[i+3]=255},function(t,e,i,r){if(r+1>=e.length)throw Error("Ran out of data");let n=e[r];t[i]=n,t[i+1]=n,t[i+2]=n,t[i+3]=e[r+1]},function(t,e,i,r){if(r+2>=e.length)throw Error("Ran out of data");t[i]=e[r],t[i+1]=e[r+1],t[i+2]=e[r+2],t[i+3]=255},function(t,e,i,r){if(r+3>=e.length)throw Error("Ran out of data");t[i]=e[r],t[i+1]=e[r+1],t[i+2]=e[r+2],t[i+3]=e[r+3]}],s=[function(){},function(t,e,i,r){let n=e[0];t[i]=n,t[i+1]=n,t[i+2]=n,t[i+3]=r},function(t,e,i){let r=e[0];t[i]=r,t[i+1]=r,t[i+2]=r,t[i+3]=e[1]},function(t,e,i,r){t[i]=e[0],t[i+1]=e[1],t[i+2]=e[2],t[i+3]=r},function(t,e,i){t[i]=e[0],t[i+1]=e[1],t[i+2]=e[2],t[i+3]=e[3]}];i.dataToBitMap=function(t,e){let i,h,o,a,l,f,p=e.width,u=e.height,c=e.depth,d=e.bpp,_=e.interlace;8!==c&&(i=[],h=0,o={get:function(e){for(;i.length<e;)!function(){let e,r,n,s;if(h===t.length)throw Error("Ran out of data");let o=t[h];switch(h++,c){default:throw Error("unrecognised depth");case 16:n=t[h],h++,i.push((o<<8)+n);break;case 4:n=15&o,s=o>>4,i.push(s,n);break;case 2:e=3&o,r=o>>2&3,n=o>>4&3,s=o>>6&3,i.push(s,n,r,e);break;case 1:e=o>>4&1,r=o>>5&1,n=o>>6&1,s=o>>7&1,i.push(s,n,r,e,o>>3&1,o>>2&1,o>>1&1,1&o)}}();let r=i.slice(0,e);return i=i.slice(e),r},resetAfterLine:function(){i.length=0},end:function(){if(h!==t.length)throw Error("extra data found")}}),a=c<=8?Buffer.alloc(p*u*4):new Uint16Array(p*u*4);let g=Math.pow(2,c)-1,b=0;if(_)l=r.getImagePasses(p,u),f=r.getInterlaceIterator(p,u);else{let t=0;f=function(){let e=t;return t+=4,e},l=[{width:p,height:u}]}for(let e=0;e<l.length;e++)8===c?b=function(t,e,i,r,s,h){let o=t.width,a=t.height,l=t.index;for(let t=0;t<a;t++)for(let a=0;a<o;a++){let o=i(a,t,l);n[r](e,s,o,h),h+=r}return h}(l[e],a,f,d,t,b):function(t,e,i,r,n,h){let o=t.width,a=t.height,l=t.index;for(let t=0;t<a;t++){for(let a=0;a<o;a++){let o=n.get(r),f=i(a,t,l);s[r](e,o,f,h)}n.resetAfterLine()}}(l[e],a,f,d,o,g);if(8===c){if(b!==t.length)throw Error("extra data found")}else o.end();return a}},37829,(t,e,i)=>{"use strict";e.exports=function(t,e,i=!1){let r=e.depth,n=e.width,s=e.height,h=e.colorType,o=e.transColor,a=e.palette,l=t;return 3===h?!function(t,e,i,r,n){let s=0;for(let h=0;h<r;h++)for(let r=0;r<i;r++){let i=n[t[s]];if(!i)throw Error("index "+t[s]+" not in palette");for(let t=0;t<4;t++)e[s+t]=i[t];s+=4}}(t,l,n,s,a):(o&&function(t,e,i,r,n){let s=0;for(let h=0;h<r;h++)for(let r=0;r<i;r++){let i=!1;if(1===n.length?n[0]===t[s]&&(i=!0):n[0]===t[s]&&n[1]===t[s+1]&&n[2]===t[s+2]&&(i=!0),i)for(let t=0;t<4;t++)e[s+t]=0;s+=4}}(t,l,n,s,o),8===r||i||(16===r&&(l=Buffer.alloc(n*s*4)),!function(t,e,i,r,n){let s=Math.pow(2,n)-1,h=0;for(let n=0;n<r;n++)for(let r=0;r<i;r++){for(let i=0;i<4;i++)e[h+i]=Math.floor(255*t[h+i]/s+.5);h+=4}}(t,l,n,s,r))),l}},6183,(t,e,i)=>{"use strict";let r=t.r(24361),n=t.r(6461),s=t.r(37106),h=t.r(41998),o=t.r(23213),a=t.r(74047),l=t.r(37829),f=e.exports=function(t){s.call(this),this._parser=new o(t,{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=t,this.writable=!0,this._parser.start()};r.inherits(f,s),f.prototype._handleError=function(t){this.emit("error",t),this.writable=!1,this.destroy(),this._inflate&&this._inflate.destroy&&this._inflate.destroy(),this._filter&&(this._filter.destroy(),this._filter.on("error",function(){})),this.errord=!0},f.prototype._inflateData=function(t){if(!this._inflate)if(this._bitmapInfo.interlace)this._inflate=n.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 t=((this._bitmapInfo.width*this._bitmapInfo.bpp*this._bitmapInfo.depth+7>>3)+1)*this._bitmapInfo.height,e=Math.max(t,n.Z_MIN_CHUNK);this._inflate=n.createInflate({chunkSize:e});let i=t,r=this.emit.bind(this,"error");this._inflate.on("error",function(t){i&&r(t)}),this._filter.on("complete",this._complete.bind(this));let s=this._filter.write.bind(this._filter);this._inflate.on("data",function(t){i&&(t.length>i&&(t=t.slice(0,i)),i-=t.length,s(t))}),this._inflate.on("end",this._filter.end.bind(this._filter))}this._inflate.write(t)},f.prototype._handleMetaData=function(t){this._metaData=t,this._bitmapInfo=Object.create(t),this._filter=new h(this._bitmapInfo)},f.prototype._handleTransColor=function(t){this._bitmapInfo.transColor=t},f.prototype._handlePalette=function(t){this._bitmapInfo.palette=t},f.prototype._simpleTransparency=function(){this._metaData.alpha=!0},f.prototype._headersFinished=function(){this.emit("metadata",this._metaData)},f.prototype._finished=function(){this.errord||(this._inflate?this._inflate.end():this.emit("error","No Inflate block"))},f.prototype._complete=function(t){let e;if(!this.errord){try{let i=a.dataToBitMap(t,this._bitmapInfo);e=l(i,this._bitmapInfo,this._options.skipRescale),i=null}catch(t){this._handleError(t);return}this.emit("parsed",e)}}},55920,(t,e,i)=>{"use strict";let r=t.r(86982);e.exports=function(t,e,i,n){let s=-1!==[r.COLORTYPE_COLOR_ALPHA,r.COLORTYPE_ALPHA].indexOf(n.colorType);if(n.colorType===n.inputColorType){let e,i=(new DataView(e=new ArrayBuffer(2)).setInt16(0,256,!0),256!==new Int16Array(e)[0]);if(8===n.bitDepth||16===n.bitDepth&&i)return t}let h=16!==n.bitDepth?t:new Uint16Array(t.buffer),o=255,a=r.COLORTYPE_TO_BPP_MAP[n.inputColorType];4!==a||n.inputHasAlpha||(a=3);let l=r.COLORTYPE_TO_BPP_MAP[n.colorType];16===n.bitDepth&&(o=65535,l*=2);let f=Buffer.alloc(e*i*l),p=0,u=0,c=n.bgColor||{};void 0===c.red&&(c.red=o),void 0===c.green&&(c.green=o),void 0===c.blue&&(c.blue=o);for(let t=0;t<i;t++)for(let t=0;t<e;t++){let t=function(){let t,e,i,a=o;switch(n.inputColorType){case r.COLORTYPE_COLOR_ALPHA:a=h[p+3],t=h[p],e=h[p+1],i=h[p+2];break;case r.COLORTYPE_COLOR:t=h[p],e=h[p+1],i=h[p+2];break;case r.COLORTYPE_ALPHA:a=h[p+1],e=t=h[p],i=t;break;case r.COLORTYPE_GRAYSCALE:e=t=h[p],i=t;break;default:throw Error("input color type:"+n.inputColorType+" is not supported at present")}return n.inputHasAlpha&&!s&&(a/=o,t=Math.min(Math.max(Math.round((1-a)*c.red+a*t),0),o),e=Math.min(Math.max(Math.round((1-a)*c.green+a*e),0),o),i=Math.min(Math.max(Math.round((1-a)*c.blue+a*i),0),o)),{red:t,green:e,blue:i,alpha:a}}(h,p);switch(n.colorType){case r.COLORTYPE_COLOR_ALPHA:case r.COLORTYPE_COLOR:8===n.bitDepth?(f[u]=t.red,f[u+1]=t.green,f[u+2]=t.blue,s&&(f[u+3]=t.alpha)):(f.writeUInt16BE(t.red,u),f.writeUInt16BE(t.green,u+2),f.writeUInt16BE(t.blue,u+4),s&&f.writeUInt16BE(t.alpha,u+6));break;case r.COLORTYPE_ALPHA:case r.COLORTYPE_GRAYSCALE:{let e=(t.red+t.green+t.blue)/3;8===n.bitDepth?(f[u]=e,s&&(f[u+1]=t.alpha)):(f.writeUInt16BE(e,u),s&&f.writeUInt16BE(t.alpha,u+2));break}default:throw Error("unrecognised color Type "+n.colorType)}p+=a,u+=l}return f}},50796,(t,e,i)=>{"use strict";let r=t.r(35352),n={0:function(t,e,i,r,n){for(let s=0;s<i;s++)r[n+s]=t[e+s]},1:function(t,e,i,r,n,s){for(let h=0;h<i;h++){let i=h>=s?t[e+h-s]:0,o=t[e+h]-i;r[n+h]=o}},2:function(t,e,i,r,n){for(let s=0;s<i;s++){let h=e>0?t[e+s-i]:0,o=t[e+s]-h;r[n+s]=o}},3:function(t,e,i,r,n,s){for(let h=0;h<i;h++){let o=h>=s?t[e+h-s]:0,a=e>0?t[e+h-i]:0,l=t[e+h]-(o+a>>1);r[n+h]=l}},4:function(t,e,i,n,s,h){for(let o=0;o<i;o++){let a=o>=h?t[e+o-h]:0,l=e>0?t[e+o-i]:0,f=e>0&&o>=h?t[e+o-(i+h)]:0,p=t[e+o]-r(a,l,f);n[s+o]=p}}},s={0:function(t,e,i){let r=0,n=e+i;for(let i=e;i<n;i++)r+=Math.abs(t[i]);return r},1:function(t,e,i,r){let n=0;for(let s=0;s<i;s++){let i=s>=r?t[e+s-r]:0;n+=Math.abs(t[e+s]-i)}return n},2:function(t,e,i){let r=0,n=e+i;for(let s=e;s<n;s++){let n=e>0?t[s-i]:0;r+=Math.abs(t[s]-n)}return r},3:function(t,e,i,r){let n=0;for(let s=0;s<i;s++){let h=s>=r?t[e+s-r]:0,o=e>0?t[e+s-i]:0;n+=Math.abs(t[e+s]-(h+o>>1))}return n},4:function(t,e,i,n){let s=0;for(let h=0;h<i;h++){let o=h>=n?t[e+h-n]:0,a=e>0?t[e+h-i]:0,l=e>0&&h>=n?t[e+h-(i+n)]:0;s+=Math.abs(t[e+h]-r(o,a,l))}return s}};e.exports=function(t,e,i,r,h){let o;if("filterType"in r&&-1!==r.filterType)if("number"==typeof r.filterType)o=[r.filterType];else throw Error("unrecognised filter types");else o=[0,1,2,3,4];16===r.bitDepth&&(h*=2);let a=e*h,l=0,f=0,p=Buffer.alloc((a+1)*i),u=o[0];for(let e=0;e<i;e++){if(o.length>1){let e=1/0;for(let i=0;i<o.length;i++){let r=s[o[i]](t,f,a,h);r<e&&(u=o[i],e=r)}}p[l]=u,l++,n[u](t,f,a,p,l,h),l+=a,f+=a}return p}},59029,(t,e,i)=>{"use strict";let r=t.r(86982),n=t.r(22352),s=t.r(55920),h=t.r(50796),o=t.r(6461),a=e.exports=function(t){if(this._options=t,t.deflateChunkSize=t.deflateChunkSize||32768,t.deflateLevel=null!=t.deflateLevel?t.deflateLevel:9,t.deflateStrategy=null!=t.deflateStrategy?t.deflateStrategy:3,t.inputHasAlpha=null==t.inputHasAlpha||t.inputHasAlpha,t.deflateFactory=t.deflateFactory||o.createDeflate,t.bitDepth=t.bitDepth||8,t.colorType="number"==typeof t.colorType?t.colorType:r.COLORTYPE_COLOR_ALPHA,t.inputColorType="number"==typeof t.inputColorType?t.inputColorType:r.COLORTYPE_COLOR_ALPHA,-1===[r.COLORTYPE_GRAYSCALE,r.COLORTYPE_COLOR,r.COLORTYPE_COLOR_ALPHA,r.COLORTYPE_ALPHA].indexOf(t.colorType))throw Error("option color type:"+t.colorType+" is not supported at present");if(-1===[r.COLORTYPE_GRAYSCALE,r.COLORTYPE_COLOR,r.COLORTYPE_COLOR_ALPHA,r.COLORTYPE_ALPHA].indexOf(t.inputColorType))throw Error("option input color type:"+t.inputColorType+" is not supported at present");if(8!==t.bitDepth&&16!==t.bitDepth)throw Error("option bit depth:"+t.bitDepth+" is not supported at present")};a.prototype.getDeflateOptions=function(){return{chunkSize:this._options.deflateChunkSize,level:this._options.deflateLevel,strategy:this._options.deflateStrategy}},a.prototype.createDeflate=function(){return this._options.deflateFactory(this.getDeflateOptions())},a.prototype.filterData=function(t,e,i){let n=s(t,e,i,this._options),o=r.COLORTYPE_TO_BPP_MAP[this._options.colorType];return h(n,e,i,this._options,o)},a.prototype._packChunk=function(t,e){let i=e?e.length:0,r=Buffer.alloc(i+12);return r.writeUInt32BE(i,0),r.writeUInt32BE(t,4),e&&e.copy(r,8),r.writeInt32BE(n.crc32(r.slice(4,r.length-4)),r.length-4),r},a.prototype.packGAMA=function(t){let e=Buffer.alloc(4);return e.writeUInt32BE(Math.floor(t*r.GAMMA_DIVISION),0),this._packChunk(r.TYPE_gAMA,e)},a.prototype.packIHDR=function(t,e){let i=Buffer.alloc(13);return i.writeUInt32BE(t,0),i.writeUInt32BE(e,4),i[8]=this._options.bitDepth,i[9]=this._options.colorType,i[10]=0,i[11]=0,i[12]=0,this._packChunk(r.TYPE_IHDR,i)},a.prototype.packIDAT=function(t){return this._packChunk(r.TYPE_IDAT,t)},a.prototype.packIEND=function(){return this._packChunk(r.TYPE_IEND,null)}},49152,(t,e,i)=>{"use strict";let r=t.r(24361),n=t.r(88947),s=t.r(86982),h=t.r(59029),o=e.exports=function(t){n.call(this),this._packer=new h(t||{}),this._deflate=this._packer.createDeflate(),this.readable=!0};r.inherits(o,n),o.prototype.pack=function(t,e,i,r){this.emit("data",Buffer.from(s.PNG_SIGNATURE)),this.emit("data",this._packer.packIHDR(e,i)),r&&this.emit("data",this._packer.packGAMA(r));let n=this._packer.filterData(t,e,i);this._deflate.on("error",this.emit.bind(this,"error")),this._deflate.on("data",(function(t){this.emit("data",this._packer.packIDAT(t))}).bind(this)),this._deflate.on("end",(function(){this.emit("data",this._packer.packIEND()),this.emit("end")}).bind(this)),this._deflate.end(n)}},49719,(t,e,i)=>{e.exports=t.x("assert",()=>require("assert"))},874,(t,e,i)=>{e.exports=t.x("buffer",()=>require("buffer"))},26190,(t,e,i)=>{"use strict";let r=t.r(49719).ok,n=t.r(6461),s=t.r(24361),h=t.r(874).kMaxLength;function o(t){if(!(this instanceof o))return new o(t);t&&t.chunkSize<n.Z_MIN_CHUNK&&(t.chunkSize=n.Z_MIN_CHUNK),n.Inflate.call(this,t),this._offset=void 0===this._offset?this._outOffset:this._offset,this._buffer=this._buffer||this._outBuffer,t&&null!=t.maxLength&&(this._maxLength=t.maxLength)}function a(t,e){e&&process.nextTick(e),t._handle&&(t._handle.close(),t._handle=null)}function l(t,e){var i=new o(e),r=t;if("string"==typeof r&&(r=Buffer.from(r)),!(r instanceof Buffer))throw TypeError("Not a string or buffer");let s=i._finishFlushFlag;return null==s&&(s=n.Z_FINISH),i._processChunk(r,s)}o.prototype._processChunk=function(t,e,i){let s,o;if("function"==typeof i)return n.Inflate._processChunk.call(this,t,e,i);let l=this,f=t&&t.length,p=this._chunkSize-this._offset,u=this._maxLength,c=0,d=[],_=0;this.on("error",function(t){s=t}),r(this._handle,"zlib binding closed");do o=(o=this._handle.writeSync(e,t,c,f,this._buffer,this._offset,p))||this._writeState;while(!this._hadError&&function(t,e){if(l._hadError)return;let i=p-e;if(r(i>=0,"have should not go down"),i>0){let t=l._buffer.slice(l._offset,l._offset+i);if(l._offset+=i,t.length>u&&(t=t.slice(0,u)),d.push(t),_+=t.length,0==(u-=t.length))return!1}return(0===e||l._offset>=l._chunkSize)&&(p=l._chunkSize,l._offset=0,l._buffer=Buffer.allocUnsafe(l._chunkSize)),0===e&&(c+=f-t,f=t,!0)}(o[0],o[1]))if(this._hadError)throw s;if(_>=h)throw a(this),RangeError("Cannot create final Buffer. It would be larger than 0x"+h.toString(16)+" bytes");let g=Buffer.concat(d,_);return a(this),g},s.inherits(o,n.Inflate),e.exports=i=l,i.Inflate=o,i.createInflate=function(t){return new o(t)},i.inflateSync=l},75886,(t,e,i)=>{"use strict";let r=e.exports=function(t){this._buffer=t,this._reads=[]};r.prototype.read=function(t,e){this._reads.push({length:Math.abs(t),allowLess:t<0,func:e})},r.prototype.process=function(){for(;this._reads.length>0&&this._buffer.length;){let t=this._reads[0];if(this._buffer.length&&(this._buffer.length>=t.length||t.allowLess)){this._reads.shift();let e=this._buffer;this._buffer=e.slice(t.length),t.func.call(this,e.slice(0,t.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")}},36511,(t,e,i)=>{"use strict";let r=t.r(75886),n=t.r(28378);i.process=function(t,e){let i=[],s=new r(t);return new n(e,{read:s.read.bind(s),write:function(t){i.push(t)},complete:function(){}}).start(),s.process(),Buffer.concat(i)}},2291,(t,e,i)=>{"use strict";let r=!0,n=t.r(6461),s=t.r(26190);n.deflateSync||(r=!1);let h=t.r(75886),o=t.r(36511),a=t.r(23213),l=t.r(74047),f=t.r(37829);e.exports=function(t,e){let i,p,u,c;if(!r)throw Error("To use the sync capability of this library in old node versions, please pin pngjs to v2.3.0");let d=[],_=new h(t);if(new a(e,{read:_.read.bind(_),error:function(t){i=t},metadata:function(t){p=t},gamma:function(t){u=t},palette:function(t){p.palette=t},transColor:function(t){p.transColor=t},inflateData:function(t){d.push(t)},simpleTransparency:function(){p.alpha=!0}}).start(),_.process(),i)throw i;let g=Buffer.concat(d);if(d.length=0,p.interlace)c=n.inflateSync(g);else{let t=((p.width*p.bpp*p.depth+7>>3)+1)*p.height;c=s(g,{chunkSize:t,maxLength:t})}if(g=null,!c||!c.length)throw Error("bad png - invalid inflate data response");let b=o.process(c,p);g=null;let y=l.dataToBitMap(b,p);b=null;let m=f(y,p,e.skipRescale);return p.data=m,p.gamma=u||0,p}},69762,(t,e,i)=>{"use strict";let r=!0,n=t.r(6461);n.deflateSync||(r=!1);let s=t.r(86982),h=t.r(59029);e.exports=function(t,e){if(!r)throw Error("To use the sync capability of this library in old node versions, please pin pngjs to v2.3.0");let i=new h(e||{}),o=[];o.push(Buffer.from(s.PNG_SIGNATURE)),o.push(i.packIHDR(t.width,t.height)),t.gamma&&o.push(i.packGAMA(t.gamma));let a=i.filterData(t.data,t.width,t.height),l=n.deflateSync(a,i.getDeflateOptions());if(a=null,!l||!l.length)throw Error("bad png - invalid compressed data response");return o.push(i.packIDAT(l)),o.push(i.packIEND()),Buffer.concat(o)}},93079,(t,e,i)=>{"use strict";let r=t.r(2291),n=t.r(69762);i.read=function(t,e){return r(t,e||{})},i.write=function(t,e){return n(t,e)}},92453,(t,e,i)=>{"use strict";let r=t.r(24361),n=t.r(88947),s=t.r(6183),h=t.r(49152),o=t.r(93079),a=i.PNG=function(t){n.call(this),t=t||{},this.width=0|t.width,this.height=0|t.height,this.data=this.width>0&&this.height>0?Buffer.alloc(4*this.width*this.height):null,t.fill&&this.data&&this.data.fill(0),this.gamma=0,this.readable=this.writable=!0,this._parser=new s(t),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(t){this.data=t,this.emit("parsed",t)}).bind(this)),this._packer=new h(t),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"))};r.inherits(a,n),a.sync=o,a.prototype.pack=function(){return this.data&&this.data.length?process.nextTick((function(){this._packer.pack(this.data,this.width,this.height,this.gamma)}).bind(this)):this.emit("error","No data provided"),this},a.prototype.parse=function(t,e){if(e){let t,i;t=(function(t){this.removeListener("error",i),this.data=t,e(null,this)}).bind(this),i=(function(i){this.removeListener("parsed",t),e(i,null)}).bind(this),this.once("parsed",t),this.once("error",i)}return this.end(t),this},a.prototype.write=function(t){return this._parser.write(t),!0},a.prototype.end=function(t){this._parser.end(t)},a.prototype._metadata=function(t){this.width=t.width,this.height=t.height,this.emit("metadata",t)},a.prototype._gamma=function(t){this.gamma=t},a.prototype._handleClose=function(){this._parser.writable||this._packer.readable||this.emit("close")},a.bitblt=function(t,e,i,r,n,s,h,o){if(r|=0,n|=0,s|=0,h|=0,o|=0,(i|=0)>t.width||r>t.height||i+n>t.width||r+s>t.height)throw Error("bitblt reading outside image");if(h>e.width||o>e.height||h+n>e.width||o+s>e.height)throw Error("bitblt writing outside image");for(let a=0;a<s;a++)t.data.copy(e.data,(o+a)*e.width+h<<2,(r+a)*t.width+i<<2,(r+a)*t.width+i+n<<2)},a.prototype.bitblt=function(t,e,i,r,n,s,h){return a.bitblt(this,t,e,i,r,n,s,h),this},a.adjustGamma=function(t){if(t.gamma){for(let e=0;e<t.height;e++)for(let i=0;i<t.width;i++){let r=t.width*e+i<<2;for(let e=0;e<3;e++){let i=t.data[r+e]/255;i=Math.pow(i,1/2.2/t.gamma),t.data[r+e]=Math.round(255*i)}}t.gamma=0}},a.prototype.adjustGamma=function(){a.adjustGamma(this)}}];
2
2
 
3
3
  //# sourceMappingURL=%5Broot-of-the-server%5D__e1a64519._.js.map