hackmate-cli 1.0.0

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 (314) hide show
  1. package/README.md +420 -0
  2. package/dist/api.d.ts +3 -0
  3. package/dist/api.d.ts.map +1 -0
  4. package/dist/api.js +14 -0
  5. package/dist/api.js.map +1 -0
  6. package/dist/cli.d.ts +3 -0
  7. package/dist/cli.d.ts.map +1 -0
  8. package/dist/cli.js +172 -0
  9. package/dist/cli.js.map +1 -0
  10. package/dist/commands/ComingSoon.d.ts +7 -0
  11. package/dist/commands/ComingSoon.d.ts.map +1 -0
  12. package/dist/commands/ComingSoon.js +4 -0
  13. package/dist/commands/ComingSoon.js.map +1 -0
  14. package/dist/commands/Config.d.ts +8 -0
  15. package/dist/commands/Config.d.ts.map +1 -0
  16. package/dist/commands/Config.js +42 -0
  17. package/dist/commands/Config.js.map +1 -0
  18. package/dist/commands/DataExport.d.ts +2 -0
  19. package/dist/commands/DataExport.d.ts.map +1 -0
  20. package/dist/commands/DataExport.js +49 -0
  21. package/dist/commands/DataExport.js.map +1 -0
  22. package/dist/commands/Discover.d.ts +2 -0
  23. package/dist/commands/Discover.d.ts.map +1 -0
  24. package/dist/commands/Discover.js +93 -0
  25. package/dist/commands/Discover.js.map +1 -0
  26. package/dist/commands/MatchList.d.ts +2 -0
  27. package/dist/commands/MatchList.d.ts.map +1 -0
  28. package/dist/commands/MatchList.js +118 -0
  29. package/dist/commands/MatchList.js.map +1 -0
  30. package/dist/commands/Presence.d.ts +7 -0
  31. package/dist/commands/Presence.d.ts.map +1 -0
  32. package/dist/commands/Presence.js +52 -0
  33. package/dist/commands/Presence.js.map +1 -0
  34. package/dist/commands/Privacy.d.ts +2 -0
  35. package/dist/commands/Privacy.d.ts.map +1 -0
  36. package/dist/commands/Privacy.js +38 -0
  37. package/dist/commands/Privacy.js.map +1 -0
  38. package/dist/commands/Settings.d.ts +2 -0
  39. package/dist/commands/Settings.d.ts.map +1 -0
  40. package/dist/commands/Settings.js +38 -0
  41. package/dist/commands/Settings.js.map +1 -0
  42. package/dist/commands/Stats.d.ts +2 -0
  43. package/dist/commands/Stats.d.ts.map +1 -0
  44. package/dist/commands/Stats.js +38 -0
  45. package/dist/commands/Stats.js.map +1 -0
  46. package/dist/commands/admin/admin.logic.d.ts +12 -0
  47. package/dist/commands/admin/admin.logic.d.ts.map +1 -0
  48. package/dist/commands/admin/admin.logic.js +41 -0
  49. package/dist/commands/admin/admin.logic.js.map +1 -0
  50. package/dist/commands/admin/admin.screen.d.ts +10 -0
  51. package/dist/commands/admin/admin.screen.d.ts.map +1 -0
  52. package/dist/commands/admin/admin.screen.js +19 -0
  53. package/dist/commands/admin/admin.screen.js.map +1 -0
  54. package/dist/commands/admin/index.d.ts +8 -0
  55. package/dist/commands/admin/index.d.ts.map +1 -0
  56. package/dist/commands/admin/index.js +8 -0
  57. package/dist/commands/admin/index.js.map +1 -0
  58. package/dist/commands/auth/Logout.d.ts +2 -0
  59. package/dist/commands/auth/Logout.d.ts.map +1 -0
  60. package/dist/commands/auth/Logout.js +15 -0
  61. package/dist/commands/auth/Logout.js.map +1 -0
  62. package/dist/commands/auth/Verify.d.ts +2 -0
  63. package/dist/commands/auth/Verify.d.ts.map +1 -0
  64. package/dist/commands/auth/Verify.js +16 -0
  65. package/dist/commands/auth/Verify.js.map +1 -0
  66. package/dist/commands/auth/auth.logic.d.ts +31 -0
  67. package/dist/commands/auth/auth.logic.d.ts.map +1 -0
  68. package/dist/commands/auth/auth.logic.js +147 -0
  69. package/dist/commands/auth/auth.logic.js.map +1 -0
  70. package/dist/commands/auth/index.d.ts +3 -0
  71. package/dist/commands/auth/index.d.ts.map +1 -0
  72. package/dist/commands/auth/index.js +17 -0
  73. package/dist/commands/auth/index.js.map +1 -0
  74. package/dist/commands/auth/login.screen.d.ts +15 -0
  75. package/dist/commands/auth/login.screen.d.ts.map +1 -0
  76. package/dist/commands/auth/login.screen.js +10 -0
  77. package/dist/commands/auth/login.screen.js.map +1 -0
  78. package/dist/commands/auth/signup.screen.d.ts +23 -0
  79. package/dist/commands/auth/signup.screen.d.ts.map +1 -0
  80. package/dist/commands/auth/signup.screen.js +13 -0
  81. package/dist/commands/auth/signup.screen.js.map +1 -0
  82. package/dist/commands/auth/verify.logic.d.ts +11 -0
  83. package/dist/commands/auth/verify.logic.d.ts.map +1 -0
  84. package/dist/commands/auth/verify.logic.js +56 -0
  85. package/dist/commands/auth/verify.logic.js.map +1 -0
  86. package/dist/commands/chat/ChatList.d.ts +2 -0
  87. package/dist/commands/chat/ChatList.d.ts.map +1 -0
  88. package/dist/commands/chat/ChatList.js +63 -0
  89. package/dist/commands/chat/ChatList.js.map +1 -0
  90. package/dist/commands/chat/chat.logic.d.ts +15 -0
  91. package/dist/commands/chat/chat.logic.d.ts.map +1 -0
  92. package/dist/commands/chat/chat.logic.js +139 -0
  93. package/dist/commands/chat/chat.logic.js.map +1 -0
  94. package/dist/commands/chat/chat.screen.d.ts +12 -0
  95. package/dist/commands/chat/chat.screen.d.ts.map +1 -0
  96. package/dist/commands/chat/chat.screen.js +12 -0
  97. package/dist/commands/chat/chat.screen.js.map +1 -0
  98. package/dist/commands/chat/index.d.ts +8 -0
  99. package/dist/commands/chat/index.d.ts.map +1 -0
  100. package/dist/commands/chat/index.js +9 -0
  101. package/dist/commands/chat/index.js.map +1 -0
  102. package/dist/commands/group/group.logic.d.ts +26 -0
  103. package/dist/commands/group/group.logic.d.ts.map +1 -0
  104. package/dist/commands/group/group.logic.js +73 -0
  105. package/dist/commands/group/group.logic.js.map +1 -0
  106. package/dist/commands/group/group.screen.d.ts +19 -0
  107. package/dist/commands/group/group.screen.d.ts.map +1 -0
  108. package/dist/commands/group/group.screen.js +22 -0
  109. package/dist/commands/group/group.screen.js.map +1 -0
  110. package/dist/commands/group/index.d.ts +9 -0
  111. package/dist/commands/group/index.d.ts.map +1 -0
  112. package/dist/commands/group/index.js +8 -0
  113. package/dist/commands/group/index.js.map +1 -0
  114. package/dist/commands/network/index.d.ts +8 -0
  115. package/dist/commands/network/index.d.ts.map +1 -0
  116. package/dist/commands/network/index.js +8 -0
  117. package/dist/commands/network/index.js.map +1 -0
  118. package/dist/commands/network/network.logic.d.ts +12 -0
  119. package/dist/commands/network/network.logic.d.ts.map +1 -0
  120. package/dist/commands/network/network.logic.js +69 -0
  121. package/dist/commands/network/network.logic.js.map +1 -0
  122. package/dist/commands/network/network.screen.d.ts +10 -0
  123. package/dist/commands/network/network.screen.d.ts.map +1 -0
  124. package/dist/commands/network/network.screen.js +17 -0
  125. package/dist/commands/network/network.screen.js.map +1 -0
  126. package/dist/commands/notification/index.d.ts +7 -0
  127. package/dist/commands/notification/index.d.ts.map +1 -0
  128. package/dist/commands/notification/index.js +8 -0
  129. package/dist/commands/notification/index.js.map +1 -0
  130. package/dist/commands/notification/notification.logic.d.ts +11 -0
  131. package/dist/commands/notification/notification.logic.d.ts.map +1 -0
  132. package/dist/commands/notification/notification.logic.js +33 -0
  133. package/dist/commands/notification/notification.logic.js.map +1 -0
  134. package/dist/commands/notification/notification.screen.d.ts +10 -0
  135. package/dist/commands/notification/notification.screen.d.ts.map +1 -0
  136. package/dist/commands/notification/notification.screen.js +13 -0
  137. package/dist/commands/notification/notification.screen.js.map +1 -0
  138. package/dist/commands/profile/index.d.ts +6 -0
  139. package/dist/commands/profile/index.d.ts.map +1 -0
  140. package/dist/commands/profile/index.js +14 -0
  141. package/dist/commands/profile/index.js.map +1 -0
  142. package/dist/commands/profile/profile-edit.screen.d.ts +12 -0
  143. package/dist/commands/profile/profile-edit.screen.d.ts.map +1 -0
  144. package/dist/commands/profile/profile-edit.screen.js +66 -0
  145. package/dist/commands/profile/profile-edit.screen.js.map +1 -0
  146. package/dist/commands/profile/profile-view.screen.d.ts +10 -0
  147. package/dist/commands/profile/profile-view.screen.d.ts.map +1 -0
  148. package/dist/commands/profile/profile-view.screen.js +12 -0
  149. package/dist/commands/profile/profile-view.screen.js.map +1 -0
  150. package/dist/commands/profile/profile.logic.d.ts +42 -0
  151. package/dist/commands/profile/profile.logic.d.ts.map +1 -0
  152. package/dist/commands/profile/profile.logic.js +74 -0
  153. package/dist/commands/profile/profile.logic.js.map +1 -0
  154. package/dist/commands/project/index.d.ts +9 -0
  155. package/dist/commands/project/index.d.ts.map +1 -0
  156. package/dist/commands/project/index.js +8 -0
  157. package/dist/commands/project/index.js.map +1 -0
  158. package/dist/commands/project/project.logic.d.ts +29 -0
  159. package/dist/commands/project/project.logic.d.ts.map +1 -0
  160. package/dist/commands/project/project.logic.js +92 -0
  161. package/dist/commands/project/project.logic.js.map +1 -0
  162. package/dist/commands/project/project.screen.d.ts +22 -0
  163. package/dist/commands/project/project.screen.d.ts.map +1 -0
  164. package/dist/commands/project/project.screen.js +27 -0
  165. package/dist/commands/project/project.screen.js.map +1 -0
  166. package/dist/commands/stubs/index.d.ts +9 -0
  167. package/dist/commands/stubs/index.d.ts.map +1 -0
  168. package/dist/commands/stubs/index.js +24 -0
  169. package/dist/commands/stubs/index.js.map +1 -0
  170. package/dist/config.d.ts +14 -0
  171. package/dist/config.d.ts.map +1 -0
  172. package/dist/config.js +29 -0
  173. package/dist/config.js.map +1 -0
  174. package/dist/context/AuthContext.d.ts +18 -0
  175. package/dist/context/AuthContext.d.ts.map +1 -0
  176. package/dist/context/AuthContext.js +49 -0
  177. package/dist/context/AuthContext.js.map +1 -0
  178. package/dist/context/SocketContext.d.ts +12 -0
  179. package/dist/context/SocketContext.d.ts.map +1 -0
  180. package/dist/context/SocketContext.js +44 -0
  181. package/dist/context/SocketContext.js.map +1 -0
  182. package/dist/context/index.d.ts +7 -0
  183. package/dist/context/index.d.ts.map +1 -0
  184. package/dist/context/index.js +9 -0
  185. package/dist/context/index.js.map +1 -0
  186. package/dist/features/admin/components/admin.screen.d.ts +10 -0
  187. package/dist/features/admin/components/admin.screen.d.ts.map +1 -0
  188. package/dist/features/admin/components/admin.screen.js +19 -0
  189. package/dist/features/admin/components/admin.screen.js.map +1 -0
  190. package/dist/features/admin/components/index.d.ts +8 -0
  191. package/dist/features/admin/components/index.d.ts.map +1 -0
  192. package/dist/features/admin/components/index.js +8 -0
  193. package/dist/features/admin/components/index.js.map +1 -0
  194. package/dist/features/admin/hooks/useAdmin.d.ts +12 -0
  195. package/dist/features/admin/hooks/useAdmin.d.ts.map +1 -0
  196. package/dist/features/admin/hooks/useAdmin.js +46 -0
  197. package/dist/features/admin/hooks/useAdmin.js.map +1 -0
  198. package/dist/features/admin/index.d.ts +3 -0
  199. package/dist/features/admin/index.d.ts.map +1 -0
  200. package/dist/features/admin/index.js +3 -0
  201. package/dist/features/admin/index.js.map +1 -0
  202. package/dist/features/chat/components/ChatList.d.ts +2 -0
  203. package/dist/features/chat/components/ChatList.d.ts.map +1 -0
  204. package/dist/features/chat/components/ChatList.js +63 -0
  205. package/dist/features/chat/components/ChatList.js.map +1 -0
  206. package/dist/features/chat/components/chat.screen.d.ts +12 -0
  207. package/dist/features/chat/components/chat.screen.d.ts.map +1 -0
  208. package/dist/features/chat/components/chat.screen.js +12 -0
  209. package/dist/features/chat/components/chat.screen.js.map +1 -0
  210. package/dist/features/chat/components/index.d.ts +9 -0
  211. package/dist/features/chat/components/index.d.ts.map +1 -0
  212. package/dist/features/chat/components/index.js +9 -0
  213. package/dist/features/chat/components/index.js.map +1 -0
  214. package/dist/features/chat/hooks/useChat.d.ts +15 -0
  215. package/dist/features/chat/hooks/useChat.d.ts.map +1 -0
  216. package/dist/features/chat/hooks/useChat.js +150 -0
  217. package/dist/features/chat/hooks/useChat.js.map +1 -0
  218. package/dist/features/chat/index.d.ts +4 -0
  219. package/dist/features/chat/index.d.ts.map +1 -0
  220. package/dist/features/chat/index.js +4 -0
  221. package/dist/features/chat/index.js.map +1 -0
  222. package/dist/features/group/components/group.screen.d.ts +19 -0
  223. package/dist/features/group/components/group.screen.d.ts.map +1 -0
  224. package/dist/features/group/components/group.screen.js +22 -0
  225. package/dist/features/group/components/group.screen.js.map +1 -0
  226. package/dist/features/group/components/index.d.ts +9 -0
  227. package/dist/features/group/components/index.d.ts.map +1 -0
  228. package/dist/features/group/components/index.js +8 -0
  229. package/dist/features/group/components/index.js.map +1 -0
  230. package/dist/features/group/hooks/useGroup.d.ts +26 -0
  231. package/dist/features/group/hooks/useGroup.d.ts.map +1 -0
  232. package/dist/features/group/hooks/useGroup.js +78 -0
  233. package/dist/features/group/hooks/useGroup.js.map +1 -0
  234. package/dist/features/group/index.d.ts +3 -0
  235. package/dist/features/group/index.d.ts.map +1 -0
  236. package/dist/features/group/index.js +3 -0
  237. package/dist/features/group/index.js.map +1 -0
  238. package/dist/features/network/components/UnfriendByUsername.d.ts +7 -0
  239. package/dist/features/network/components/UnfriendByUsername.d.ts.map +1 -0
  240. package/dist/features/network/components/UnfriendByUsername.js +40 -0
  241. package/dist/features/network/components/UnfriendByUsername.js.map +1 -0
  242. package/dist/features/network/components/index.d.ts +8 -0
  243. package/dist/features/network/components/index.d.ts.map +1 -0
  244. package/dist/features/network/components/index.js +9 -0
  245. package/dist/features/network/components/index.js.map +1 -0
  246. package/dist/features/network/components/network.screen.d.ts +10 -0
  247. package/dist/features/network/components/network.screen.d.ts.map +1 -0
  248. package/dist/features/network/components/network.screen.js +17 -0
  249. package/dist/features/network/components/network.screen.js.map +1 -0
  250. package/dist/features/network/hooks/useNetwork.d.ts +12 -0
  251. package/dist/features/network/hooks/useNetwork.d.ts.map +1 -0
  252. package/dist/features/network/hooks/useNetwork.js +74 -0
  253. package/dist/features/network/hooks/useNetwork.js.map +1 -0
  254. package/dist/features/network/hooks/useUnfriend.d.ts +7 -0
  255. package/dist/features/network/hooks/useUnfriend.d.ts.map +1 -0
  256. package/dist/features/network/hooks/useUnfriend.js +24 -0
  257. package/dist/features/network/hooks/useUnfriend.js.map +1 -0
  258. package/dist/features/network/index.d.ts +4 -0
  259. package/dist/features/network/index.d.ts.map +1 -0
  260. package/dist/features/network/index.js +4 -0
  261. package/dist/features/network/index.js.map +1 -0
  262. package/dist/features/notification/components/index.d.ts +7 -0
  263. package/dist/features/notification/components/index.d.ts.map +1 -0
  264. package/dist/features/notification/components/index.js +8 -0
  265. package/dist/features/notification/components/index.js.map +1 -0
  266. package/dist/features/notification/components/notification.screen.d.ts +10 -0
  267. package/dist/features/notification/components/notification.screen.d.ts.map +1 -0
  268. package/dist/features/notification/components/notification.screen.js +13 -0
  269. package/dist/features/notification/components/notification.screen.js.map +1 -0
  270. package/dist/features/notification/hooks/useNotification.d.ts +11 -0
  271. package/dist/features/notification/hooks/useNotification.d.ts.map +1 -0
  272. package/dist/features/notification/hooks/useNotification.js +38 -0
  273. package/dist/features/notification/hooks/useNotification.js.map +1 -0
  274. package/dist/features/notification/index.d.ts +3 -0
  275. package/dist/features/notification/index.d.ts.map +1 -0
  276. package/dist/features/notification/index.js +3 -0
  277. package/dist/features/notification/index.js.map +1 -0
  278. package/dist/features/profile/components/index.d.ts +6 -0
  279. package/dist/features/profile/components/index.d.ts.map +1 -0
  280. package/dist/features/profile/components/index.js +13 -0
  281. package/dist/features/profile/components/index.js.map +1 -0
  282. package/dist/features/profile/components/profile-edit.screen.d.ts +14 -0
  283. package/dist/features/profile/components/profile-edit.screen.d.ts.map +1 -0
  284. package/dist/features/profile/components/profile-edit.screen.js +182 -0
  285. package/dist/features/profile/components/profile-edit.screen.js.map +1 -0
  286. package/dist/features/profile/components/profile-view.screen.d.ts +10 -0
  287. package/dist/features/profile/components/profile-view.screen.d.ts.map +1 -0
  288. package/dist/features/profile/components/profile-view.screen.js +13 -0
  289. package/dist/features/profile/components/profile-view.screen.js.map +1 -0
  290. package/dist/features/profile/hooks/useProfile.d.ts +17 -0
  291. package/dist/features/profile/hooks/useProfile.d.ts.map +1 -0
  292. package/dist/features/profile/hooks/useProfile.js +148 -0
  293. package/dist/features/profile/hooks/useProfile.js.map +1 -0
  294. package/dist/features/profile/index.d.ts +3 -0
  295. package/dist/features/profile/index.d.ts.map +1 -0
  296. package/dist/features/profile/index.js +3 -0
  297. package/dist/features/profile/index.js.map +1 -0
  298. package/dist/features/project/components/index.d.ts +9 -0
  299. package/dist/features/project/components/index.d.ts.map +1 -0
  300. package/dist/features/project/components/index.js +8 -0
  301. package/dist/features/project/components/index.js.map +1 -0
  302. package/dist/features/project/components/project.screen.d.ts +22 -0
  303. package/dist/features/project/components/project.screen.d.ts.map +1 -0
  304. package/dist/features/project/components/project.screen.js +27 -0
  305. package/dist/features/project/components/project.screen.js.map +1 -0
  306. package/dist/features/project/hooks/useProject.d.ts +29 -0
  307. package/dist/features/project/hooks/useProject.d.ts.map +1 -0
  308. package/dist/features/project/hooks/useProject.js +97 -0
  309. package/dist/features/project/hooks/useProject.js.map +1 -0
  310. package/dist/features/project/index.d.ts +3 -0
  311. package/dist/features/project/index.d.ts.map +1 -0
  312. package/dist/features/project/index.js +3 -0
  313. package/dist/features/project/index.js.map +1 -0
  314. package/package.json +58 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"network.logic.js","sourceRoot":"","sources":["../../../src/commands/network/network.logic.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAC5C,OAAO,EAAE,MAAM,EAAE,MAAM,KAAK,CAAC;AAC7B,OAAO,GAAG,MAAM,cAAc,CAAC;AAC/B,OAAO,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AAOjD,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,MAAM,EAAwB,EAAE,EAAE;IACjF,MAAM,EAAE,IAAI,EAAE,GAAG,MAAM,EAAE,CAAC;IAC1B,MAAM,EAAE,eAAe,EAAE,GAAG,OAAO,EAAE,CAAC;IACtC,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,GAAG,QAAQ,CAAM,IAAI,CAAC,CAAC;IAC5C,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,QAAQ,CAAgB,IAAI,CAAC,CAAC;IACxD,MAAM,CAAC,OAAO,EAAE,UAAU,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C,CAAC,CAAC;IAEtC,OAAO;QACH,MAAM;QACN,IAAI;QACJ,KAAK;QACL,OAAO;KACV,CAAC;AACN,CAAC,CAAC"}
@@ -0,0 +1,10 @@
1
+ import React from 'react';
2
+ interface NetworkScreenProps {
3
+ action: string;
4
+ data: any;
5
+ error: string | null;
6
+ loading: boolean;
7
+ }
8
+ export declare const NetworkScreen: React.FC<NetworkScreenProps>;
9
+ export {};
10
+ //# sourceMappingURL=network.screen.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"network.screen.d.ts","sourceRoot":"","sources":["../../../src/commands/network/network.screen.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,UAAU,kBAAkB;IACxB,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,GAAG,CAAC;IACV,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,OAAO,EAAE,OAAO,CAAC;CACpB;AAED,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CAoCtD,CAAC"}
@@ -0,0 +1,17 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { Text, Box } from 'ink';
3
+ export const NetworkScreen = ({ action, data, error, loading }) => {
4
+ if (loading)
5
+ return _jsx(Text, { children: "Loading network..." });
6
+ if (error)
7
+ return _jsxs(Text, { color: "red", children: ["Error: ", error] });
8
+ if (action === 'list') {
9
+ return (_jsxs(Box, { flexDirection: "column", padding: 1, borderStyle: "round", borderColor: "blue", children: [_jsxs(Text, { bold: true, children: ["My Friends (", data?.length || 0, ")"] }), data?.length === 0 && _jsx(Text, { italic: true, color: "gray", children: "No friends yet. Use 'hackmate network add' to connect!" }), Array.isArray(data) && data.map((f) => (_jsxs(Text, { children: ["\u2022 ", f.username, " (", f.email, ")"] }, f._id)))] }));
10
+ }
11
+ if (action === 'requests') {
12
+ return (_jsxs(Box, { flexDirection: "column", padding: 1, borderStyle: "round", borderColor: "yellow", children: [_jsxs(Text, { bold: true, children: ["Pending Requests (", data?.length || 0, ")"] }), data?.length === 0 && _jsx(Text, { italic: true, color: "gray", children: "No pending requests." }), Array.isArray(data) && data.map((r) => (_jsxs(Text, { children: ["\u2022 From: ", _jsx(Text, { bold: true, color: "yellow", children: r.senderId.username }), " (at ", new Date(r.createdAt).toLocaleDateString(), ")"] }, r._id)))] }));
13
+ }
14
+ // Success message for actions
15
+ return (_jsx(Box, { padding: 1, children: _jsxs(Text, { color: "green", children: ["\u2705 ", data?.message] }) }));
16
+ };
17
+ //# sourceMappingURL=network.screen.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"network.screen.js","sourceRoot":"","sources":["../../../src/commands/network/network.screen.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAShC,MAAM,CAAC,MAAM,aAAa,GAAiC,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,EAAE;IAC5F,IAAI,OAAO;QAAE,OAAO,KAAC,IAAI,qCAA0B,CAAC;IACpD,IAAI,KAAK;QAAE,OAAO,MAAC,IAAI,IAAC,KAAK,EAAC,KAAK,wBAAS,KAAK,IAAQ,CAAC;IAE1D,IAAI,MAAM,KAAK,MAAM,EAAE,CAAC;QACpB,OAAO,CACH,MAAC,GAAG,IAAC,aAAa,EAAC,QAAQ,EAAC,OAAO,EAAE,CAAC,EAAE,WAAW,EAAC,OAAO,EAAC,WAAW,EAAC,MAAM,aAC1E,MAAC,IAAI,IAAC,IAAI,mCAAc,IAAI,EAAE,MAAM,IAAI,CAAC,SAAS,EACjD,IAAI,EAAE,MAAM,KAAK,CAAC,IAAI,KAAC,IAAI,IAAC,MAAM,QAAC,KAAK,EAAC,MAAM,uEAA8D,EAC7G,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,IAAI,CAAC,GAAG,CAAC,CAAC,CAAM,EAAE,EAAE,CAAC,CACzC,MAAC,IAAI,0BAAgB,CAAC,CAAC,QAAQ,QAAI,CAAC,CAAC,KAAK,UAA/B,CAAC,CAAC,GAAG,CAAmC,CACtD,CAAC,IACA,CACT,CAAC;IACN,CAAC;IAED,IAAI,MAAM,KAAK,UAAU,EAAE,CAAC;QACxB,OAAO,CACH,MAAC,GAAG,IAAC,aAAa,EAAC,QAAQ,EAAC,OAAO,EAAE,CAAC,EAAE,WAAW,EAAC,OAAO,EAAC,WAAW,EAAC,QAAQ,aAC5E,MAAC,IAAI,IAAC,IAAI,yCAAoB,IAAI,EAAE,MAAM,IAAI,CAAC,SAAS,EACvD,IAAI,EAAE,MAAM,KAAK,CAAC,IAAI,KAAC,IAAI,IAAC,MAAM,QAAC,KAAK,EAAC,MAAM,qCAA4B,EAC3E,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,IAAI,CAAC,GAAG,CAAC,CAAC,CAAM,EAAE,EAAE,CAAC,CACzC,MAAC,IAAI,gCACO,KAAC,IAAI,IAAC,IAAI,QAAC,KAAK,EAAC,QAAQ,YAAE,CAAC,CAAC,QAAQ,CAAC,QAAQ,GAAQ,WAAM,IAAI,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,kBAAkB,EAAE,UADvG,CAAC,CAAC,GAAG,CAET,CACV,CAAC,IACA,CACT,CAAC;IACN,CAAC;IAED,8BAA8B;IAC9B,OAAO,CACH,KAAC,GAAG,IAAC,OAAO,EAAE,CAAC,YACX,MAAC,IAAI,IAAC,KAAK,EAAC,OAAO,wBAAI,IAAI,EAAE,OAAO,IAAQ,GAC1C,CACT,CAAC;AACN,CAAC,CAAC"}
@@ -0,0 +1,7 @@
1
+ import React from 'react';
2
+ interface NotificationProps {
3
+ action?: 'list';
4
+ }
5
+ export declare const Notification: React.FC<NotificationProps>;
6
+ export {};
7
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/commands/notification/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,UAAU,iBAAiB;IACvB,MAAM,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,iBAAiB,CAGpD,CAAC"}
@@ -0,0 +1,8 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { useNotificationLogic } from './notification.logic.js';
3
+ import { NotificationScreen } from './notification.screen.js';
4
+ export const Notification = (props) => {
5
+ const logic = useNotificationLogic(props);
6
+ return _jsx(NotificationScreen, { ...logic });
7
+ };
8
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/commands/notification/index.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAC/D,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAM9D,MAAM,CAAC,MAAM,YAAY,GAAgC,CAAC,KAAK,EAAE,EAAE;IAC/D,MAAM,KAAK,GAAG,oBAAoB,CAAC,KAAK,CAAC,CAAC;IAC1C,OAAO,KAAC,kBAAkB,OAAK,KAAK,GAAI,CAAC;AAC7C,CAAC,CAAC"}
@@ -0,0 +1,11 @@
1
+ interface UseNotificationLogicProps {
2
+ action?: 'list';
3
+ }
4
+ export declare const useNotificationLogic: ({ action }: UseNotificationLogicProps) => {
5
+ action: "list";
6
+ data: any;
7
+ error: string | null;
8
+ loading: boolean;
9
+ };
10
+ export {};
11
+ //# sourceMappingURL=notification.logic.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"notification.logic.d.ts","sourceRoot":"","sources":["../../../src/commands/notification/notification.logic.ts"],"names":[],"mappings":"AAIA,UAAU,yBAAyB;IAC/B,MAAM,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,eAAO,MAAM,oBAAoB,GAAI,YAAqB,yBAAyB;;;;;CA4BlF,CAAC"}
@@ -0,0 +1,33 @@
1
+ import { useState, useEffect } from 'react';
2
+ import { useApp } from 'ink';
3
+ import api from '../../api.js';
4
+ export const useNotificationLogic = ({ action = 'list' }) => {
5
+ const { exit } = useApp();
6
+ const [data, setData] = useState(null);
7
+ const [error, setError] = useState(null);
8
+ const [loading, setLoading] = useState(true);
9
+ useEffect(() => {
10
+ const run = async () => {
11
+ try {
12
+ if (action === 'list') {
13
+ const res = await api.get('/notifications');
14
+ setData(res.data);
15
+ }
16
+ }
17
+ catch (err) {
18
+ setError(err.response?.data?.message || err.message || 'Error');
19
+ }
20
+ finally {
21
+ setLoading(false);
22
+ }
23
+ };
24
+ run();
25
+ }, [action]);
26
+ return {
27
+ action,
28
+ data,
29
+ error,
30
+ loading
31
+ };
32
+ };
33
+ //# sourceMappingURL=notification.logic.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"notification.logic.js","sourceRoot":"","sources":["../../../src/commands/notification/notification.logic.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAC5C,OAAO,EAAE,MAAM,EAAE,MAAM,KAAK,CAAC;AAC7B,OAAO,GAAG,MAAM,cAAc,CAAC;AAM/B,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,EAAE,MAAM,GAAG,MAAM,EAA6B,EAAE,EAAE;IACnF,MAAM,EAAE,IAAI,EAAE,GAAG,MAAM,EAAE,CAAC;IAC1B,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,GAAG,QAAQ,CAAM,IAAI,CAAC,CAAC;IAC5C,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,QAAQ,CAAgB,IAAI,CAAC,CAAC;IACxD,MAAM,CAAC,OAAO,EAAE,UAAU,CAAC,GAAG,QAAQ,CAAC,IAAI,CAAC,CAAC;IAE7C,SAAS,CAAC,GAAG,EAAE;QACX,MAAM,GAAG,GAAG,KAAK,IAAI,EAAE;YACnB,IAAI,CAAC;gBACD,IAAI,MAAM,KAAK,MAAM,EAAE,CAAC;oBACpB,MAAM,GAAG,GAAG,MAAM,GAAG,CAAC,GAAG,CAAC,gBAAgB,CAAC,CAAC;oBAC5C,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;gBACtB,CAAC;YACL,CAAC;YAAC,OAAO,GAAQ,EAAE,CAAC;gBAChB,QAAQ,CAAC,GAAG,CAAC,QAAQ,EAAE,IAAI,EAAE,OAAO,IAAI,GAAG,CAAC,OAAO,IAAI,OAAO,CAAC,CAAC;YACpE,CAAC;oBAAS,CAAC;gBACP,UAAU,CAAC,KAAK,CAAC,CAAC;YACtB,CAAC;QACL,CAAC,CAAC;QACF,GAAG,EAAE,CAAC;IACV,CAAC,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC;IAEb,OAAO;QACH,MAAM;QACN,IAAI;QACJ,KAAK;QACL,OAAO;KACV,CAAC;AACN,CAAC,CAAC"}
@@ -0,0 +1,10 @@
1
+ import React from 'react';
2
+ interface NotificationScreenProps {
3
+ action: string;
4
+ data: any;
5
+ error: string | null;
6
+ loading: boolean;
7
+ }
8
+ export declare const NotificationScreen: React.FC<NotificationScreenProps>;
9
+ export {};
10
+ //# sourceMappingURL=notification.screen.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"notification.screen.d.ts","sourceRoot":"","sources":["../../../src/commands/notification/notification.screen.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,UAAU,uBAAuB;IAC7B,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,GAAG,CAAC;IACV,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,OAAO,EAAE,OAAO,CAAC;CACpB;AAED,eAAO,MAAM,kBAAkB,EAAE,KAAK,CAAC,EAAE,CAAC,uBAAuB,CAsBhE,CAAC"}
@@ -0,0 +1,13 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { Text, Box } from 'ink';
3
+ export const NotificationScreen = ({ action, data, error, loading }) => {
4
+ if (loading)
5
+ return _jsx(Text, { children: "Loading..." });
6
+ if (error)
7
+ return _jsxs(Text, { color: "red", children: ["Error: ", error] });
8
+ if (action === 'list') {
9
+ return (_jsxs(Box, { flexDirection: "column", padding: 1, borderStyle: "round", borderColor: "yellow", children: [_jsx(Text, { bold: true, children: "\uD83D\uDD14 Notifications" }), Array.isArray(data) && data.length === 0 && _jsx(Text, { italic: true, color: "gray", children: "No notifications." }), Array.isArray(data) && data.map((n) => (_jsxs(Box, { flexDirection: "column", marginY: 1, children: [_jsxs(Text, { bold: !n.read, color: n.read ? 'gray' : 'white', children: [n.read ? '' : '• ', " ", n.content] }), _jsx(Text, { color: "gray", italic: true, children: new Date(n.createdAt).toLocaleString() })] }, n._id)))] }));
10
+ }
11
+ return _jsx(Text, { children: "Notification System" });
12
+ };
13
+ //# sourceMappingURL=notification.screen.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"notification.screen.js","sourceRoot":"","sources":["../../../src/commands/notification/notification.screen.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAShC,MAAM,CAAC,MAAM,kBAAkB,GAAsC,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,EAAE;IACtG,IAAI,OAAO;QAAE,OAAO,KAAC,IAAI,6BAAkB,CAAC;IAC5C,IAAI,KAAK;QAAE,OAAO,MAAC,IAAI,IAAC,KAAK,EAAC,KAAK,wBAAS,KAAK,IAAQ,CAAC;IAE1D,IAAI,MAAM,KAAK,MAAM,EAAE,CAAC;QACpB,OAAO,CACH,MAAC,GAAG,IAAC,aAAa,EAAC,QAAQ,EAAC,OAAO,EAAE,CAAC,EAAE,WAAW,EAAC,OAAO,EAAC,WAAW,EAAC,QAAQ,aAC5E,KAAC,IAAI,IAAC,IAAI,iDAAwB,EACjC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC,IAAI,KAAC,IAAI,IAAC,MAAM,QAAC,KAAK,EAAC,MAAM,kCAAyB,EAC9F,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,IAAI,CAAC,GAAG,CAAC,CAAC,CAAM,EAAE,EAAE,CAAC,CACzC,MAAC,GAAG,IAAa,aAAa,EAAC,QAAQ,EAAC,OAAO,EAAE,CAAC,aAC9C,MAAC,IAAI,IAAC,IAAI,EAAE,CAAC,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,aAChD,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,OAAG,CAAC,CAAC,OAAO,IAC5B,EACP,KAAC,IAAI,IAAC,KAAK,EAAC,MAAM,EAAC,MAAM,kBAAE,IAAI,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,cAAc,EAAE,GAAQ,KAJnE,CAAC,CAAC,GAAG,CAKT,CACT,CAAC,IACA,CACT,CAAC;IACN,CAAC;IAED,OAAO,KAAC,IAAI,sCAA2B,CAAC;AAC5C,CAAC,CAAC"}
@@ -0,0 +1,6 @@
1
+ import React from 'react';
2
+ export declare const ProfileView: React.FC<{
3
+ username?: string;
4
+ }>;
5
+ export declare const ProfileEdit: () => import("react/jsx-runtime").JSX.Element;
6
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/commands/profile/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAK1B,eAAO,MAAM,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC;IAAE,QAAQ,CAAC,EAAE,MAAM,CAAA;CAAE,CAIvD,CAAC;AAEF,eAAO,MAAM,WAAW,+CAGvB,CAAC"}
@@ -0,0 +1,14 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { useProfileViewLogic, useProfileEditLogic } from './profile.logic.js';
3
+ import { ProfileViewScreen } from './profile-view.screen.js';
4
+ import { ProfileEditScreen } from './profile-edit.screen.js';
5
+ export const ProfileView = ({ username }) => {
6
+ // Logic needs to be updated to accept username too, but let's pass it for now
7
+ const logic = useProfileViewLogic(username);
8
+ return _jsx(ProfileViewScreen, { ...logic });
9
+ };
10
+ export const ProfileEdit = () => {
11
+ const logic = useProfileEditLogic();
12
+ return _jsx(ProfileEditScreen, { ...logic });
13
+ };
14
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/commands/profile/index.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAC9E,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAC7D,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAE7D,MAAM,CAAC,MAAM,WAAW,GAAoC,CAAC,EAAE,QAAQ,EAAE,EAAE,EAAE;IACzE,8EAA8E;IAC9E,MAAM,KAAK,GAAG,mBAAmB,CAAC,QAAQ,CAAC,CAAC;IAC5C,OAAO,KAAC,iBAAiB,OAAK,KAAK,GAAI,CAAC;AAC5C,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,WAAW,GAAG,GAAG,EAAE;IAC5B,MAAM,KAAK,GAAG,mBAAmB,EAAE,CAAC;IACpC,OAAO,KAAC,iBAAiB,OAAK,KAAK,GAAI,CAAC;AAC5C,CAAC,CAAC"}
@@ -0,0 +1,12 @@
1
+ import React from 'react';
2
+ interface ProfileEditScreenProps {
3
+ step: number;
4
+ setStep: (step: number) => void;
5
+ profile: any;
6
+ setProfile: (profile: any) => void;
7
+ loading: boolean;
8
+ handleSubmit: () => void;
9
+ }
10
+ export declare const ProfileEditScreen: React.FC<ProfileEditScreenProps>;
11
+ export {};
12
+ //# sourceMappingURL=profile-edit.screen.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"profile-edit.screen.d.ts","sourceRoot":"","sources":["../../../src/commands/profile/profile-edit.screen.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAK1B,UAAU,sBAAsB;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAChC,OAAO,EAAE,GAAG,CAAC;IACb,UAAU,EAAE,CAAC,OAAO,EAAE,GAAG,KAAK,IAAI,CAAC;IACnC,OAAO,EAAE,OAAO,CAAC;IACjB,YAAY,EAAE,MAAM,IAAI,CAAC;CAC5B;AASD,eAAO,MAAM,iBAAiB,EAAE,KAAK,CAAC,EAAE,CAAC,sBAAsB,CAuI9D,CAAC"}
@@ -0,0 +1,66 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { Text, Box } from 'ink';
3
+ import TextInput from 'ink-text-input';
4
+ import SelectInput from 'ink-select-input';
5
+ const INTENT_ITEMS = [
6
+ { label: 'Startup', value: 'startup' },
7
+ { label: 'Collab', value: 'collab' },
8
+ { label: 'Friends', value: 'friends' },
9
+ { label: 'Mentorship', value: 'mentorship' },
10
+ ];
11
+ export const ProfileEditScreen = ({ step, setStep, profile, setProfile, loading, handleSubmit }) => {
12
+ if (loading)
13
+ return _jsx(Text, { children: "Saving..." });
14
+ const steps = [
15
+ {
16
+ label: 'Main Intent',
17
+ component: (_jsx(SelectInput, { items: INTENT_ITEMS, onSelect: (item) => {
18
+ setProfile({ ...profile, intent: item.value });
19
+ setStep(step + 1);
20
+ } })),
21
+ },
22
+ {
23
+ label: 'Bio (One liner)',
24
+ component: (_jsx(TextInput, { value: profile.bio, onChange: (val) => setProfile({ ...profile, bio: val }), onSubmit: () => setStep(step + 1) })),
25
+ },
26
+ {
27
+ label: 'Age',
28
+ component: (_jsx(TextInput, { value: String(profile.age || ''), onChange: (val) => setProfile({ ...profile, age: val ? parseInt(val) : undefined }), onSubmit: () => setStep(step + 1) })),
29
+ },
30
+ {
31
+ label: 'Gender (male/female/other)',
32
+ component: (_jsx(TextInput, { value: profile.gender || '', onChange: (val) => setProfile({ ...profile, gender: val }), onSubmit: () => setStep(step + 1) })),
33
+ },
34
+ {
35
+ label: 'Company / College',
36
+ component: (_jsx(TextInput, { value: profile.company || '', onChange: (val) => setProfile({ ...profile, company: val }), onSubmit: () => setStep(step + 1) })),
37
+ },
38
+ {
39
+ label: 'Tech Stack (comma separated)',
40
+ component: (_jsx(TextInput, { value: profile.stack, onChange: (val) => setProfile({ ...profile, stack: val }), onSubmit: () => setStep(step + 1) })),
41
+ },
42
+ {
43
+ label: 'Interests (comma separated)',
44
+ component: (_jsx(TextInput, { value: profile.interests || '', onChange: (val) => setProfile({ ...profile, interests: val }), onSubmit: () => setStep(step + 1) })),
45
+ },
46
+ {
47
+ label: 'Location',
48
+ component: (_jsx(TextInput, { value: profile.location, onChange: (val) => setProfile({ ...profile, location: val }), onSubmit: () => setStep(step + 1) })),
49
+ },
50
+ {
51
+ label: 'GitHub Username',
52
+ component: (_jsx(TextInput, { value: profile.github, onChange: (val) => setProfile({ ...profile, github: val }), onSubmit: () => setStep(step + 1) })),
53
+ },
54
+ {
55
+ label: 'LinkedIn URL',
56
+ component: (_jsx(TextInput, { value: profile.linkedin || '', onChange: (val) => setProfile({ ...profile, linkedin: val }), onSubmit: () => setStep(step + 1) })),
57
+ },
58
+ {
59
+ label: 'Twitter URL',
60
+ component: (_jsx(TextInput, { value: profile.twitter || '', onChange: (val) => setProfile({ ...profile, twitter: val }), onSubmit: handleSubmit })),
61
+ },
62
+ ];
63
+ const currentStep = steps[step];
64
+ return (_jsxs(Box, { flexDirection: "column", padding: 1, children: [_jsx(Text, { color: "yellow", bold: true, children: " Edit Profile " }), _jsxs(Box, { marginY: 1, children: [_jsxs(Text, { bold: true, children: [" ", currentStep.label, ": "] }), currentStep.component] }), _jsxs(Text, { color: "gray", children: ["Step ", step + 1, " of ", steps.length] })] }));
65
+ };
66
+ //# sourceMappingURL=profile-edit.screen.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"profile-edit.screen.js","sourceRoot":"","sources":["../../../src/commands/profile/profile-edit.screen.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAChC,OAAO,SAAS,MAAM,gBAAgB,CAAC;AACvC,OAAO,WAAW,MAAM,kBAAkB,CAAC;AAW3C,MAAM,YAAY,GAAG;IACjB,EAAE,KAAK,EAAE,SAAS,EAAE,KAAK,EAAE,SAAS,EAAE;IACtC,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,QAAQ,EAAE;IACpC,EAAE,KAAK,EAAE,SAAS,EAAE,KAAK,EAAE,SAAS,EAAE;IACtC,EAAE,KAAK,EAAE,YAAY,EAAE,KAAK,EAAE,YAAY,EAAE;CAC/C,CAAC;AAEF,MAAM,CAAC,MAAM,iBAAiB,GAAqC,CAAC,EAChE,IAAI,EAAE,OAAO,EACb,OAAO,EAAE,UAAU,EACnB,OAAO,EACP,YAAY,EACf,EAAE,EAAE;IACD,IAAI,OAAO;QAAE,OAAO,KAAC,IAAI,4BAAiB,CAAC;IAE3C,MAAM,KAAK,GAAG;QACV;YACI,KAAK,EAAE,aAAa;YACpB,SAAS,EAAE,CACP,KAAC,WAAW,IACR,KAAK,EAAE,YAAY,EACnB,QAAQ,EAAE,CAAC,IAAI,EAAE,EAAE;oBACf,UAAU,CAAC,EAAE,GAAG,OAAO,EAAE,MAAM,EAAE,IAAI,CAAC,KAAK,EAAE,CAAC,CAAC;oBAC/C,OAAO,CAAC,IAAI,GAAG,CAAC,CAAC,CAAC;gBACtB,CAAC,GACH,CACL;SACJ;QACD;YACI,KAAK,EAAE,iBAAiB;YAC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boolean;
5
+ error: string | null;
6
+ user: any;
7
+ }
8
+ export declare const ProfileViewScreen: React.FC<ProfileViewScreenProps>;
9
+ export {};
10
+ //# sourceMappingURL=profile-view.screen.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"profile-view.screen.d.ts","sourceRoot":"","sources":["../../../src/commands/profile/profile-view.screen.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,UAAU,sBAAsB;IAC5B,OAAO,EAAE,GAAG,CAAC;IACb,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,IAAI,EAAE,GAAG,CAAC;CACb;AAED,eAAO,MAAM,iBAAiB,EAAE,KAAK,CAAC,EAAE,CAAC,sBAAsB,CAwB9D,CAAC"}
@@ -0,0 +1,12 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { Text, Box } from 'ink';
3
+ export const ProfileViewScreen = ({ profile, loading, error, user }) => {
4
+ if (loading)
5
+ return _jsx(Text, { children: "Loading profile..." });
6
+ if (error)
7
+ return _jsxs(Text, { color: "red", children: ["Error: ", error] });
8
+ if (!profile)
9
+ return _jsxs(Text, { children: ["No profile found for @", user?.username, ". Run \"hackmate profile edit\" to create one."] });
10
+ return (_jsxs(Box, { flexDirection: "column", padding: 1, borderStyle: "round", borderColor: "cyan", children: [_jsxs(Text, { bold: true, color: "cyan", children: [" @", profile?.user?.username || user?.username, " "] }), _jsx(Text, { children: "\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500" }), _jsxs(Text, { children: ["Intent: ", _jsx(Text, { color: "green", children: profile.intent })] }), _jsxs(Text, { children: ["Bio: ", profile.bio || 'N/A'] }), _jsxs(Text, { children: ["Age: ", profile.age || 'N/A', " | Gender: ", profile.gender || 'N/A'] }), _jsxs(Text, { children: ["Company/College: ", profile.company || 'N/A'] }), _jsxs(Text, { children: ["Stack: ", profile.stack?.join(', ') || 'N/A'] }), _jsxs(Text, { children: ["Interests: ", profile.interests?.join(', ') || 'N/A'] }), _jsxs(Text, { children: ["Location: ", profile.location || 'N/A'] }), _jsx(Text, { children: "\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500" }), _jsx(Text, { bold: true, children: "Socials:" }), _jsxs(Text, { children: ["GitHub: ", profile.github || 'N/A'] }), _jsxs(Text, { children: ["LinkedIn: ", profile.linkedin || 'N/A'] }), _jsxs(Text, { children: ["Twitter: ", profile.twitter || 'N/A'] }), _jsxs(Text, { children: ["Website: ", profile.website || 'N/A'] })] }));
11
+ };
12
+ //# sourceMappingURL=profile-view.screen.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"profile-view.screen.js","sourceRoot":"","sources":["../../../src/commands/profile/profile-view.screen.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAShC,MAAM,CAAC,MAAM,iBAAiB,GAAqC,CAAC,EAAE,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE,EAAE;IACrG,IAAI,OAAO;QAAE,OAAO,KAAC,IAAI,qCAA0B,CAAC;IACpD,IAAI,KAAK;QAAE,OAAO,MAAC,IAAI,IAAC,KAAK,EAAC,KAAK,wBAAS,KAAK,IAAQ,CAAC;IAC1D,IAAI,CAAC,OAAO;QAAE,OAAO,MAAC,IAAI,yCAAwB,IAAI,EAAE,QAAQ,sDAAoD,CAAC;IAErH,OAAO,CACH,MAAC,GAAG,IAAC,aAAa,EAAC,QAAQ,EAAC,OAAO,EAAE,CAAC,EAAE,WAAW,EAAC,OAAO,EAAC,WAAW,EAAC,MAAM,aAC1E,MAAC,IAAI,IAAC,IAAI,QAAC,KAAK,EAAC,MAAM,mBAAI,OAAO,EAAE,IAAI,EAAE,QAAQ,IAAI,IAAI,EAAE,QAAQ,SAAS,EAC7E,KAAC,IAAI,6GAAuB,EAC5B,MAAC,IAAI,2BAAS,KAAC,IAAI,IAAC,KAAK,EAAC,OAAO,YAAE,OAAO,CAAC,MAAM,GAAQ,IAAO,EAChE,MAAC,IAAI,wBAAO,OAAO,CAAC,GAAG,IAAI,KAAK,IAAQ,EACxC,MAAC,IAAI,wBAAO,OAAO,CAAC,GAAG,IAAI,KAAK,iBAAa,OAAO,CAAC,MAAM,IAAI,KAAK,IAAQ,EAC5E,MAAC,IAAI,oCAAmB,OAAO,CAAC,OAAO,IAAI,KAAK,IAAQ,EACxD,MAAC,IAAI,0BAAS,OAAO,CAAC,KAAK,EAAE,IAAI,CAAC,IAAI,CAAC,IAAI,KAAK,IAAQ,EACxD,MAAC,IAAI,8BAAa,OAAO,CAAC,SAAS,EAAE,IAAI,CAAC,IAAI,CAAC,IAAI,KAAK,IAAQ,EAChE,MAAC,IAAI,6BAAY,OAAO,CAAC,QAAQ,IAAI,KAAK,IAAQ,EAClD,KAAC,IAAI,6GAAuB,EAC5B,KAAC,IAAI,IAAC,IAAI,+BAAgB,EAC1B,MAAC,IAAI,2BAAU,OAAO,CAAC,MAAM,IAAI,KAAK,IAAQ,EAC9C,MAAC,IAAI,6BAAY,OAAO,CAAC,QAAQ,IAAI,KAAK,IAAQ,EAClD,MAAC,IAAI,4BAAW,OAAO,CAAC,OAAO,IAAI,KAAK,IAAQ,EAChD,MAAC,IAAI,4BAAW,OAAO,CAAC,OAAO,IAAI,KAAK,IAAQ,IAC9C,CACT,CAAC;AACN,CAAC,CAAC"}
@@ -0,0 +1,42 @@
1
+ export declare const useProfileViewLogic: (targetUsername?: string) => {
2
+ profile: any;
3
+ loading: boolean;
4
+ error: string | null;
5
+ user: {
6
+ username: string;
7
+ id: string;
8
+ } | undefined;
9
+ };
10
+ export declare const useProfileEditLogic: () => {
11
+ step: number;
12
+ setStep: import("react").Dispatch<import("react").SetStateAction<number>>;
13
+ profile: {
14
+ bio: string;
15
+ intent: string;
16
+ stack: string;
17
+ location: string;
18
+ github: string;
19
+ age?: number;
20
+ gender?: "male" | "female" | "other";
21
+ company?: string;
22
+ interests?: string;
23
+ linkedin?: string;
24
+ twitter?: string;
25
+ };
26
+ setProfile: import("react").Dispatch<import("react").SetStateAction<{
27
+ bio: string;
28
+ intent: string;
29
+ stack: string;
30
+ location: string;
31
+ github: string;
32
+ age?: number;
33
+ gender?: "male" | "female" | "other";
34
+ company?: string;
35
+ interests?: string;
36
+ linkedin?: string;
37
+ twitter?: string;
38
+ }>>;
39
+ loading: boolean;
40
+ handleSubmit: () => Promise<void>;
41
+ };
42
+ //# sourceMappingURL=profile.logic.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"profile.logic.d.ts","sourceRoot":"","sources":["../../../src/commands/profile/profile.logic.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,mBAAmB,GAAI,iBAAiB,MAAM;;;;;;;;CA+B1D,CAAC;AAEF,eAAO,MAAM,mBAAmB;;;;aAInB,MAAM;gBACH,MAAM;eACP,MAAM;kBACH,MAAM;gBACR,MAAM;cACR,MAAM;iBACH,MAAM,GAAG,QAAQ,GAAG,OAAO;kBAC1B,MAAM;oBACJ,MAAM;mBACP,MAAM;kBACP,MAAM;;;aAVX,MAAM;gBACH,MAAM;eACP,MAAM;kBACH,MAAM;gBACR,MAAM;cACR,MAAM;iBACH,MAAM,GAAG,QAAQ,GAAG,OAAO;kBAC1B,MAAM;oBACJ,MAAM;mBACP,MAAM;kBACP,MAAM;;;;CAoCvB,CAAC"}
@@ -0,0 +1,74 @@
1
+ import { useState, useEffect } from 'react';
2
+ import { useApp } from 'ink';
3
+ import api from '../../api.js';
4
+ import { getUser } from '../../config.js';
5
+ export const useProfileViewLogic = (targetUsername) => {
6
+ const { exit } = useApp();
7
+ const [profile, setProfile] = useState(null);
8
+ const [loading, setLoading] = useState(true);
9
+ const [error, setError] = useState(null);
10
+ const user = getUser();
11
+ useEffect(() => {
12
+ const fetchProfile = async () => {
13
+ try {
14
+ const endpoint = targetUsername ? `/profile/${targetUsername}` : '/profile';
15
+ const { data } = await api.get(endpoint);
16
+ setProfile(data);
17
+ // Auto-exit after a short delay to allow render
18
+ setTimeout(() => exit(), 100);
19
+ }
20
+ catch (err) {
21
+ setError(err.response?.data?.message || 'Failed to fetch profile');
22
+ setTimeout(() => exit(), 100);
23
+ }
24
+ finally {
25
+ setLoading(false);
26
+ }
27
+ };
28
+ fetchProfile();
29
+ }, [targetUsername]);
30
+ return {
31
+ profile,
32
+ loading,
33
+ error,
34
+ user
35
+ };
36
+ };
37
+ export const useProfileEditLogic = () => {
38
+ const { exit } = useApp();
39
+ const [step, setStep] = useState(0);
40
+ const [profile, setProfile] = useState({
41
+ bio: '',
42
+ intent: 'collab',
43
+ stack: '',
44
+ location: '',
45
+ github: '',
46
+ });
47
+ const [loading, setLoading] = useState(false);
48
+ useEffect(() => {
49
+ // Fetch existing profile to populate defaults (optional, skipping for speed MVp)
50
+ }, []);
51
+ const handleSubmit = async () => {
52
+ setLoading(true);
53
+ try {
54
+ await api.put('/profile', {
55
+ ...profile,
56
+ stack: profile.stack.split(',').map((s) => s.trim()),
57
+ interests: profile.interests?.split(',').map((s) => s.trim()),
58
+ });
59
+ console.log('✅ Profile updated!');
60
+ exit();
61
+ }
62
+ catch (err) {
63
+ console.error('❌ Update failed:', err.response?.data?.message || err.message);
64
+ exit();
65
+ }
66
+ };
67
+ return {
68
+ step, setStep,
69
+ profile, setProfile,
70
+ loading,
71
+ handleSubmit
72
+ };
73
+ };
74
+ //# sourceMappingURL=profile.logic.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"profile.logic.js","sourceRoot":"","sources":["../../../src/commands/profile/profile.logic.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAC5C,OAAO,EAAE,MAAM,EAAE,MAAM,KAAK,CAAC;AAC7B,OAAO,GAAG,MAAM,cAAc,CAAC;AAC/B,OAAO,EAA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AAE,GAAG,CAAC,QAAQ,EAAE,IAAI,EAAE,OAAO,IAAI,GAAG,CAAC,OAAO,CAAC,CAAC;YAC9E,IAAI,EAAE,CAAC;QACX,CAAC;IACL,CAAC,CAAC;IAEF,OAAO;QACH,IAAI,EAAE,OAAO;QACb,OAAO,EAAE,UAAU;QACnB,OAAO;QACP,YAAY;KACf,CAAC;AACN,CAAC,CAAC"}
@@ -0,0 +1,9 @@
1
+ import React from 'react';
2
+ interface ProjectProps {
3
+ action?: 'list' | 'create' | 'view' | 'apply' | 'accept';
4
+ id?: string;
5
+ extraArg?: string;
6
+ }
7
+ export declare const Project: React.FC<ProjectProps>;
8
+ export {};
9
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/commands/project/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,UAAU,YAAY;IAClB,MAAM,CAAC,EAAE,MAAM,GAAG,QAAQ,GAAG,MAAM,GAAG,OAAO,GAAG,QAAQ,CAAC;IACzD,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,QAAQ,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,eAAO,MAAM,OAAO,EAAE,KAAK,CAAC,EAAE,CAAC,YAAY,CAG1C,CAAC"}
@@ -0,0 +1,8 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { useProjectLogic } from './project.logic.js';
3
+ import { ProjectScreen } from './project.screen.js';
4
+ export const Project = (props) => {
5
+ const logic = useProjectLogic(props);
6
+ return _jsx(ProjectScreen, { ...logic });
7
+ };
8
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/commands/project/index.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAQpD,MAAM,CAAC,MAAM,OAAO,GAA2B,CAAC,KAAK,EAAE,EAAE;IACrD,MAAM,KAAK,GAAG,eAAe,CAAC,KAAK,CAAC,CAAC;IACrC,OAAO,KAAC,aAAa,OAAK,KAAK,GAAI,CAAC;AACxC,CAAC,CAAC"}
@@ -0,0 +1,29 @@
1
+ interface UseProjectLogicProps {
2
+ action?: 'list' | 'create' | 'view' | 'apply' | 'accept';
3
+ id?: string;
4
+ extraArg?: string;
5
+ }
6
+ export declare const useProjectLogic: ({ action, id, extraArg }: UseProjectLogicProps) => {
7
+ action: "list" | "view" | "accept" | "create" | "apply";
8
+ data: any;
9
+ error: string | null;
10
+ loading: boolean;
11
+ formStep: number;
12
+ setFormStep: import("react").Dispatch<import("react").SetStateAction<number>>;
13
+ formData: {
14
+ title: string;
15
+ description: string;
16
+ skills: string;
17
+ };
18
+ setFormData: import("react").Dispatch<import("react").SetStateAction<{
19
+ title: string;
20
+ description: string;
21
+ skills: string;
22
+ }>>;
23
+ message: string;
24
+ setMessage: import("react").Dispatch<import("react").SetStateAction<string>>;
25
+ handleCreateSubmit: () => Promise<void>;
26
+ handleApplySubmit: () => Promise<void>;
27
+ };
28
+ export {};
29
+ //# sourceMappingURL=project.logic.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"project.logic.d.ts","sourceRoot":"","sources":["../../../src/commands/project/project.logic.ts"],"names":[],"mappings":"AAKA,UAAU,oBAAoB;IAC1B,MAAM,CAAC,EAAE,MAAM,GAAG,QAAQ,GAAG,MAAM,GAAG,OAAO,GAAG,QAAQ,CAAC;IACzD,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,QAAQ,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,eAAO,MAAM,eAAe,GAAI,0BAAmC,oBAAoB;;;;;;;;;;;;;;;;;;;;;CAoFtF,CAAC"}
@@ -0,0 +1,92 @@
1
+ import { useState, useEffect } from 'react';
2
+ import { useApp } from 'ink';
3
+ import api from '../../api.js';
4
+ import { useAuth } from '../../context/index.js';
5
+ export const useProjectLogic = ({ action = 'list', id, extraArg }) => {
6
+ const { exit } = useApp();
7
+ const { isAuthenticated } = useAuth();
8
+ const [data, setData] = useState(null);
9
+ const [error, setError] = useState(null);
10
+ const [loading, setLoading] = useState(true);
11
+ // Form state for create
12
+ const [formStep, setFormStep] = useState(0);
13
+ const [formData, setFormData] = useState({ title: '', description: '', skills: '' });
14
+ // Input state for apply message
15
+ const [message, setMessage] = useState('');
16
+ useEffect(() => {
17
+ const run = async () => {
18
+ if (!isAuthenticated)
19
+ return;
20
+ try {
21
+ if (action === 'list') {
22
+ const res = await api.get('/project');
23
+ setData(res.data);
24
+ setLoading(false);
25
+ }
26
+ else if (action === 'view' && id) {
27
+ const res = await api.get(`/project/${id}`);
28
+ setData(res.data);
29
+ setLoading(false);
30
+ }
31
+ else if (action === 'accept' && id && extraArg) {
32
+ await api.post(`/project/${id}/accept`, { applicantId: extraArg });
33
+ setData({ message: 'Applicant accepted!' });
34
+ setLoading(false);
35
+ }
36
+ // create and apply handle their own loading via interactions
37
+ if (action === 'create' || action === 'apply') {
38
+ setLoading(false);
39
+ }
40
+ }
41
+ catch (err) {
42
+ setError(err.response?.data?.message || err.message || 'Operation failed');
43
+ setLoading(false);
44
+ }
45
+ };
46
+ run();
47
+ }, [action, id, extraArg, isAuthenticated]);
48
+ const handleCreateSubmit = async () => {
49
+ setLoading(true);
50
+ try {
51
+ await api.post('/project', {
52
+ ...formData,
53
+ skills: formData.skills.split(',').map(s => s.trim())
54
+ });
55
+ setData({ message: 'Project created successfully!' });
56
+ }
57
+ catch (err) {
58
+ setError(err.response?.data?.message || 'Failed to create project');
59
+ }
60
+ finally {
61
+ setLoading(false);
62
+ }
63
+ };
64
+ const handleApplySubmit = async () => {
65
+ setLoading(true);
66
+ try {
67
+ await api.post(`/project/${id}/apply`, { message });
68
+ setData({ message: 'Application sent successfully!' });
69
+ }
70
+ catch (err) {
71
+ setError(err.response?.data?.message || 'Failed to apply');
72
+ }
73
+ finally {
74
+ setLoading(false);
75
+ }
76
+ };
77
+ return {
78
+ action,
79
+ data,
80
+ error,
81
+ loading,
82
+ formStep,
83
+ setFormStep,
84
+ formData,
85
+ setFormData,
86
+ message,
87
+ setMessage,
88
+ handleCreateSubmit,
89
+ handleApplySubmit
90
+ };
91
+ };
92
+ //# sourceMappingURL=project.logic.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"project.logic.js","sourceRoot":"","sources":["../../../src/commands/project/project.logic.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAC5C,OAAO,EAAE,MAAM,EAAE,MAAM,KAAK,CAAC;AAC7B,OAAO,GAAG,MAAM,cAAc,CAAC;AAC/B,OAAO,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AAQjD,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,EAAE,EAAE,QAAQ,EAAwB,EAAE,EAAE;IACvF,MAAM,EAAE,IAAI,EAAE,GAAG,MAAM,EAAE,CAAC;IAC1B,MAAM,EAAE,eAAe,EAAE,GAAG,OAAO,EAAE,CAAC;IACtC,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,GAAG,QAAQ,CAAM,IAAI,CAAC,CAAC;IAC5C,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,QAAQ,CAAgB,IAAI,CAAC,CAAC;IACxD,MAAM,CAAC,OAAO,EAAE,UAAU,CAAC,GAAG,QAAQ,CAAC,IAAI,CAAC,CAAC;IAE7C,wBAAwB;IACxB,MAAM,CAAC,QAAQ,EAAE,WAAW,CAAC,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAC;IAC5C,MAAM,CAAC,QAAQ,EAAE,WAAW,CAAC,GAAG,QAAQ,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,WAAW,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC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