You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

MainWindow.xaml.cs 34 kB

2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6. using System.Windows;
  7. using System.Windows.Controls;
  8. using System.Windows.Data;
  9. using System.Windows.Documents;
  10. using System.Windows.Input;
  11. using System.Windows.Media;
  12. using System.Windows.Media.Imaging;
  13. using System.Windows.Navigation;
  14. using System.Windows.Shapes;
  15. using System.Diagnostics;
  16. using System.Windows.Threading;
  17. using Grpc.Core;
  18. using Protobuf;
  19. // 目前MainWindow还未复现的功能:
  20. // errordisplayer
  21. // private void ReactToCommandline(),
  22. // private void Playback(string fileName, double pbSpeed = 2.0)
  23. // 绘图函数private void DrawLaser(Point source, double theta, double range,double Width)//三个参数分别为攻击者的位置,攻击方位角(窗口坐标)和攻击半径
  24. // private void Attack(object sender,RoutedEventArgs e)
  25. // 交互:private void ClickToSetMode(object sender, RoutedEventArgs e)
  26. // private void KeyBoardControl(object sender, KeyEventArgs e)
  27. // private void Bonus()
  28. namespace Client
  29. {
  30. /// <summary>
  31. /// Interaction logic for MainWindow.xaml
  32. /// </summary>
  33. public partial class MainWindow : Window
  34. {
  35. public MainWindow()
  36. {
  37. unitHeight = unitWidth = unit = 13;
  38. bonusflag = true;
  39. timer = new DispatcherTimer {
  40. Interval = new TimeSpan(50000) // 每50ms刷新一次
  41. };
  42. timer.Tick += new EventHandler(Refresh); // 定时器初始化
  43. InitializeComponent();
  44. timer.Start();
  45. SetStatusBar();
  46. isClientStocked = true;
  47. isPlaybackMode = false;
  48. drawPicLock = new();
  49. listOfProp = new List<MessageOfProp>();
  50. listOfHuman = new List<MessageOfHuman>();
  51. listOfButcher = new List<MessageOfButcher>();
  52. WindowStartupLocation = WindowStartupLocation.CenterScreen;
  53. comInfo[0] = "127.0.0.1";
  54. comInfo[1] = "8888";
  55. comInfo[2] = "1";
  56. comInfo[3] = "1";
  57. comInfo[4] = "1";
  58. ConnectToServer(comInfo);
  59. OnReceive();
  60. // ReactToCommandline();
  61. }
  62. private void SetStatusBar()
  63. {
  64. StatusBarsOfSurvivor = new StatusBarOfSurvivor[4];
  65. StatusBarsOfHunter = new StatusBarOfHunter(MainGrid, 3, 0);
  66. StatusBarsOfCircumstance = new StatusBarOfCircumstance(MainGrid, 1, 0);
  67. for (int i = 4; i < 8; i++)
  68. {
  69. StatusBarsOfSurvivor[i - 4] = new(MainGrid, i / 2 + 2, i % 2);
  70. }
  71. }
  72. // 连接Server,comInfo[]的格式:0-ip 1- port 2-playerID 3-playerType 4-human/butcherType
  73. private void ConnectToServer(string[] comInfo)
  74. {
  75. if (!isPlaybackMode)
  76. {
  77. if (comInfo.Length != 5)
  78. throw new Exception("注册信息有误!");
  79. playerID = Convert.ToInt64(comInfo[2]);
  80. Connect.Background = Brushes.Gray;
  81. string connect = new string(comInfo[0]);
  82. connect += ':';
  83. connect += comInfo[1];
  84. Channel channel = new Channel(connect, ChannelCredentials.Insecure);
  85. client = new AvailableService.AvailableServiceClient(channel);
  86. // 没判断连没连上
  87. PlayerMsg playerMsg = new PlayerMsg();
  88. playerMsg.PlayerId = playerID;
  89. playerType = Convert.ToInt64(comInfo[3]) switch {
  90. 0 => PlayerType.NullPlayerType,
  91. 1 => PlayerType.HumanPlayer,
  92. 2 => PlayerType.ButcherPlayer,
  93. };
  94. playerMsg.PlayerType = playerType;
  95. if (playerType == PlayerType.HumanPlayer)
  96. {
  97. switch (Convert.ToInt64(comInfo[4]))
  98. {
  99. case 0:
  100. playerMsg.HumanType = HumanType.NullHumanType;
  101. break;
  102. case 1:
  103. playerMsg.HumanType = HumanType._1;
  104. break;
  105. case 2:
  106. playerMsg.HumanType = HumanType._2;
  107. break;
  108. case 3:
  109. playerMsg.HumanType = HumanType._3;
  110. break;
  111. case 4:
  112. playerMsg.HumanType = HumanType._4;
  113. break;
  114. default:
  115. break;
  116. }
  117. }
  118. else if (playerType == PlayerType.ButcherPlayer)
  119. {
  120. switch (Convert.ToInt64(comInfo[4]))
  121. {
  122. case 0:
  123. playerMsg.ButcherType = ButcherType.NullButcherType;
  124. break;
  125. case 1:
  126. playerMsg.ButcherType = ButcherType._1;
  127. break;
  128. case 2:
  129. playerMsg.ButcherType = ButcherType._2;
  130. break;
  131. case 3:
  132. playerMsg.ButcherType = ButcherType._3;
  133. break;
  134. case 4:
  135. playerMsg.ButcherType = ButcherType._4;
  136. break;
  137. default:
  138. break;
  139. }
  140. }
  141. responseStream = client.AddPlayer(playerMsg);
  142. Connect.Background = Brushes.Transparent;
  143. isClientStocked = false;
  144. PorC.Content = "⏸";
  145. // 建立连接的同时加入人物
  146. }
  147. }
  148. // 绘制道具
  149. private void DrawProp(MessageOfProp data, string text)
  150. {
  151. TextBox icon = new() {
  152. FontSize = 10,
  153. Width = 20,
  154. Height = 20,
  155. Text = text,
  156. HorizontalAlignment = HorizontalAlignment.Left,
  157. VerticalAlignment = VerticalAlignment.Top,
  158. Margin = new Thickness(data.Y * unitWidth / 1000.0 - unitWidth / 2, data.X * unitHeight / 1000.0 - unitHeight / 2, 0, 0),
  159. Background = Brushes.Transparent,
  160. BorderBrush = Brushes.Transparent,
  161. IsReadOnly = true
  162. };
  163. UpperLayerOfMap.Children.Add(icon);
  164. }
  165. // 获得地图信息
  166. private void GetMap(MessageOfMap obj)
  167. {
  168. int[,] map = new int[50, 50];
  169. try
  170. {
  171. for (int i = 0; i < 50; i++)
  172. {
  173. for (int j = 0; j < 50; j++)
  174. {
  175. map[i, j] = Convert.ToInt32(obj.Row[i].Col[j]);
  176. }
  177. }
  178. }
  179. catch
  180. {
  181. mapFlag = false;
  182. }
  183. finally
  184. {
  185. defaultMap = map;
  186. mapFlag = true;
  187. }
  188. }
  189. private void ZoomMap()
  190. {
  191. for (int i = 0; i < 50; i++)
  192. {
  193. for (int j = 0; j < 50; j++)
  194. {
  195. if (mapPatches[i, j] != null)
  196. {
  197. mapPatches[i, j].Width = UpperLayerOfMap.ActualWidth / 50;
  198. mapPatches[i, j].Height = UpperLayerOfMap.ActualHeight / 50;
  199. mapPatches[i, j].HorizontalAlignment = HorizontalAlignment.Left;
  200. mapPatches[i, j].VerticalAlignment = VerticalAlignment.Top;
  201. mapPatches[i, j].Margin = new Thickness(UpperLayerOfMap.ActualWidth / 50 * j, UpperLayerOfMap.ActualHeight / 50 * i, 0, 0);
  202. }
  203. }
  204. }
  205. }
  206. private void DrawMap()
  207. {
  208. for (int i = 0; i < defaultMap.GetLength(0); i++)
  209. {
  210. for (int j = 0; j < defaultMap.GetLength(1); j++)
  211. {
  212. mapPatches[i, j] = new() {
  213. Width = unitWidth,
  214. Height = unitHeight,
  215. HorizontalAlignment = HorizontalAlignment.Left,
  216. VerticalAlignment = VerticalAlignment.Top,
  217. Margin = new Thickness(Width * (j), Height * (i), 0, 0)
  218. };
  219. // mapPatches[i, j].SetValue(Canvas.LeftProperty, (double)(Width / 65.5 * j));
  220. // mapPatches[i, j].SetValue(Canvas.TopProperty, (double)(Height / 56.5 * i)); // 用zoommap进行修改
  221. switch (defaultMap[i, j])
  222. {
  223. case 1:
  224. mapPatches[i, j].Fill = Brushes.Brown;
  225. mapPatches[i, j].Stroke = Brushes.Brown;
  226. break;
  227. case 2:
  228. case 3:
  229. case 4:
  230. mapPatches[i, j].Fill = Brushes.Green;
  231. mapPatches[i, j].Stroke = Brushes.Green;
  232. break;
  233. case 5:
  234. case 6:
  235. case 7:
  236. case 8:
  237. case 9:
  238. case 10:
  239. case 11:
  240. case 12:
  241. mapPatches[i, j].Fill = Brushes.Yellow;
  242. mapPatches[i, j].Stroke = Brushes.Yellow;
  243. break;
  244. case 13:
  245. mapPatches[i, j].Fill = Brushes.LightPink;
  246. mapPatches[i, j].Stroke = Brushes.LightPink;
  247. break;
  248. default:
  249. break;
  250. }
  251. UnderLayerOfMap.Children.Add(mapPatches[i, j]);
  252. }
  253. }
  254. hasDrawed = true;
  255. }
  256. private async void OnReceive() // log未更新,switch1,2更新log
  257. {
  258. while (await responseStream.ResponseStream.MoveNext())
  259. {
  260. lock (drawPicLock) // 加锁是必要的,画图操作和接收信息操作不能同时进行,否则画图时foreach会有bug
  261. {
  262. listOfHuman.Clear();
  263. listOfButcher.Clear();
  264. listOfProp.Clear();
  265. MessageToClient content = responseStream.ResponseStream.Current;
  266. switch (content.GameState)
  267. {
  268. case GameState.GameStart:
  269. foreach (var obj in content.HumanMessage)
  270. {
  271. listOfHuman.Add(obj);
  272. }
  273. foreach (var obj in content.ButcherMessage)
  274. {
  275. listOfButcher.Add(obj);
  276. }
  277. foreach (var obj in content.PropMessage)
  278. {
  279. listOfProp.Add(obj);
  280. }
  281. GetMap(content.MapMessage);
  282. break;
  283. case GameState.GameRunning:
  284. foreach (var obj in content.HumanMessage)
  285. {
  286. listOfHuman.Add(obj);
  287. }
  288. foreach (var obj in content.ButcherMessage)
  289. {
  290. listOfButcher.Add(obj);
  291. }
  292. foreach (var obj in content.PropMessage)
  293. {
  294. listOfProp.Add(obj);
  295. }
  296. if (!mapFlag)
  297. GetMap(content.MapMessage);
  298. break;
  299. case GameState.GameEnd:
  300. foreach (var obj in content.HumanMessage)
  301. {
  302. listOfHuman.Add(obj);
  303. }
  304. foreach (var obj in content.ButcherMessage)
  305. {
  306. listOfButcher.Add(obj);
  307. }
  308. foreach (var obj in content.PropMessage)
  309. {
  310. listOfProp.Add(obj);
  311. }
  312. break;
  313. }
  314. }
  315. }
  316. }
  317. private bool CanSee(MessageOfHuman msg)
  318. {
  319. if (msg.State == HumanState.Dead)
  320. return false;
  321. // if (playerID >= 2022 || teamID >= 2022)
  322. // return true;
  323. // if (myInfo != null)
  324. //{
  325. // if (myInfo.MessageOfCharacter.Guid == msg.Guid) // 自己能看见自己
  326. // return true;
  327. // }
  328. if (msg.Place == PlaceType.Grass || msg.Place == PlaceType.Gate || msg.Place == PlaceType.HiddenGate)
  329. return false;
  330. if (msg.Place == PlaceType.Land || msg.Place == PlaceType.Machine)
  331. return true;
  332. // if (myInfo != null)
  333. //{
  334. // if (msg.Place != myInfo.MessageOfCharacter.Place)
  335. // return false;
  336. // }
  337. return true;
  338. }
  339. private bool CanSee(MessageOfButcher msg)
  340. {
  341. // if (playerID >= 2022 || teamID >= 2022)
  342. // return true;
  343. // if (myInfo != null)
  344. //{
  345. // if (myInfo.MessageOfCharacter.Guid == msg.Guid) // 自己能看见自己
  346. // return true;
  347. // }
  348. if (msg.Place == PlaceType.Grass || msg.Place == PlaceType.Gate || msg.Place == PlaceType.HiddenGate)
  349. return false;
  350. if (msg.Place == PlaceType.Land || msg.Place == PlaceType.Machine)
  351. return true;
  352. // if (myInfo != null)
  353. //{
  354. // if (msg.Place != myInfo.MessageOfCharacter.Place)
  355. // return false;
  356. // }
  357. return true;
  358. }
  359. private bool CanSee(MessageOfProp msg)
  360. {
  361. if (msg.Place == PlaceType.Land)
  362. return true;
  363. // if (myInfo != null)
  364. //{
  365. // if (msg.Place != myInfo.MessageOfCharacter.Place)
  366. // return false;
  367. // }
  368. return true;
  369. }
  370. private void Refresh(object? sender, EventArgs e)
  371. {
  372. // Bonus();
  373. if (WindowState == WindowState.Maximized)
  374. MaxButton.Content = "❐";
  375. else
  376. MaxButton.Content = "🗖";
  377. if (StatusBarsOfSurvivor != null)
  378. for (int i = 4; i < 8; i++)
  379. {
  380. StatusBarsOfSurvivor[i - 4].SetFontSize(12 * UpperLayerOfMap.ActualHeight / 650);
  381. }
  382. if (StatusBarsOfHunter != null)
  383. StatusBarsOfHunter.SetFontSize(12 * UpperLayerOfMap.ActualHeight / 650);
  384. if (StatusBarsOfCircumstance != null)
  385. StatusBarsOfCircumstance.SetFontSize(12 * UpperLayerOfMap.ActualHeight / 650);
  386. // 完成窗口信息更新
  387. if (!isClientStocked)
  388. {
  389. unit = Math.Sqrt(UpperLayerOfMap.ActualHeight * UpperLayerOfMap.ActualWidth) / 50;
  390. unitHeight = UpperLayerOfMap.ActualHeight / 50;
  391. unitWidth = UpperLayerOfMap.ActualWidth / 50;
  392. try
  393. {
  394. // if (log != null)
  395. //{
  396. // string temp = "";
  397. // for (int i = 0; i < dataDict[GameObjType.Character].Count; i++)
  398. // {
  399. // temp += Convert.ToString(dataDict[GameObjType.Character][i].MessageOfCharacter.TeamID) + "\n";
  400. // }
  401. // log.Content = temp;
  402. // }
  403. UpperLayerOfMap.Children.Clear();
  404. // if ((communicator == null || !communicator.Client.IsConnected) && !isPlaybackMode)
  405. //{
  406. // UnderLayerOfMap.Children.Clear();
  407. // throw new Exception("Client is unconnected.");
  408. // }
  409. // else
  410. //{
  411. lock (drawPicLock) // 加锁是必要的,画图操作和接收信息操作不能同时进行
  412. {
  413. if (!hasDrawed && mapFlag)
  414. DrawMap();
  415. foreach (var data in listOfHuman)
  416. {
  417. StatusBarsOfSurvivor[data.PlayerId].SetValue(data);
  418. if (CanSee(data))
  419. {
  420. Ellipse icon = new() {
  421. Width = unitWidth,
  422. Height = unitHeight,
  423. HorizontalAlignment = HorizontalAlignment.Left,
  424. VerticalAlignment = VerticalAlignment.Top,
  425. Margin = new Thickness(data.Y * unitWidth / 1000.0 - unitWidth / 2, data.X * unitHeight / 1000.0 - unitHeight / 2, 0, 0),
  426. Fill = Brushes.BlueViolet,
  427. };
  428. UpperLayerOfMap.Children.Add(icon);
  429. }
  430. }
  431. foreach (var data in listOfButcher)
  432. {
  433. if (CanSee(data))
  434. {
  435. Ellipse icon = new() {
  436. Width = 10,
  437. Height = 10,
  438. HorizontalAlignment = HorizontalAlignment.Left,
  439. VerticalAlignment = VerticalAlignment.Top,
  440. Margin = new Thickness(data.Y * unitWidth / 1000.0 - unitWidth / 2, data.X * unitHeight / 1000.0 - unitHeight / 2, 0, 0),
  441. Fill = Brushes.Black,
  442. };
  443. UpperLayerOfMap.Children.Add(icon);
  444. }
  445. }
  446. foreach (var data in listOfProp)
  447. {
  448. if (CanSee(data))
  449. {
  450. switch (data.Type)
  451. {
  452. case PropType.Ptype1:
  453. DrawProp(data, "🔧");
  454. break;
  455. case PropType.Ptype2:
  456. DrawProp(data, "🛡");
  457. break;
  458. case PropType.Ptype3:
  459. DrawProp(data, "♥");
  460. break;
  461. case PropType.Ptype4:
  462. DrawProp(data, "⛸");
  463. break;
  464. default:
  465. DrawProp(data, "");
  466. break;
  467. }
  468. }
  469. }
  470. //}
  471. ZoomMap();
  472. }
  473. }
  474. catch (Exception exc)
  475. {
  476. // ErrorDisplayer error = new("发生错误。以下是系统报告\n" + exc.ToString());
  477. // error.Show();
  478. isClientStocked = true;
  479. PorC.Content = "▶";
  480. }
  481. }
  482. counter++;
  483. }
  484. // 之后需要修改,现在只具有修改按钮形状的功能,并不能实现暂停/继续
  485. private void ClickToPauseOrContinue(object sender, RoutedEventArgs e)
  486. {
  487. if (!isClientStocked)
  488. {
  489. isClientStocked = true;
  490. PorC.Content = "▶";
  491. }
  492. else
  493. {
  494. isClientStocked = false;
  495. PorC.Content = "⏸";
  496. }
  497. }
  498. // 未复现
  499. private void ClickToConnect(object sender, RoutedEventArgs e)
  500. {
  501. }
  502. // 窗口最大化、关闭、最小化、拖拽
  503. private void ClickToMaxmize(object sender, RoutedEventArgs e)
  504. {
  505. if (WindowState != WindowState.Maximized)
  506. WindowState = WindowState.Maximized;
  507. else
  508. WindowState = WindowState.Normal;
  509. }
  510. private void ClickToClose(object sender, RoutedEventArgs e)
  511. {
  512. Application.Current.Shutdown();
  513. }
  514. private void ClickToMinimize(object sender, RoutedEventArgs e)
  515. {
  516. WindowState = WindowState.Minimized;
  517. }
  518. private void DragWindow(object sender, RoutedEventArgs e)
  519. {
  520. DragMove();
  521. }
  522. // 寻求帮助、访问EESAST(部分功能未复原)
  523. private void ClickForHelp(object sender, RoutedEventArgs e)
  524. {
  525. PleaseWait();
  526. }
  527. private void ClickToVisitEESAST(object sender, RoutedEventArgs e)
  528. {
  529. try
  530. {
  531. _ = Process.Start("C:\\Program Files (x86)\\Microsoft\\Edge\\Application\\msedge.exe", "https://eesast.com");
  532. }
  533. catch (Exception exc)
  534. {
  535. // ErrorDisplayer error = new("发生错误。以下是系统报告\n" + exc.ToString());
  536. // error.Show();
  537. }
  538. }
  539. // 配置连接(未复原)、我的AI(THUAI5未实现)、获取更新、天梯信息(可能需要网站协助)
  540. private void ClickToSetConnect(object sender, RoutedEventArgs e)
  541. {
  542. // ConnectRegister crg = new();
  543. // crg.Show();
  544. }
  545. private void ClickToEnterVS(object sender, RoutedEventArgs e)
  546. {
  547. // try
  548. //{
  549. // if (!File.Exists("VSRoute.txt"))
  550. // {
  551. // File.Create("VSRoute.txt");
  552. // Exception ex = new("没有路径存储文件,已为您创建。请将VS路径输入该文件,并重新操作。");
  553. // throw ex;
  554. // }//创建路径文件
  555. // using StreamReader sr = new("VSRoute.txt");
  556. // _ = Process.Start(sr.ReadLine());
  557. // }
  558. // catch (Exception exc)
  559. //{
  560. // ErrorDisplayer error = new("发生错误。以下是系统报告:\n" + exc.ToString());
  561. // error.Show();
  562. // }
  563. PleaseWait();
  564. }
  565. private void ClickForUpdate(object sender, RoutedEventArgs e)
  566. {
  567. PleaseWait();
  568. }
  569. private void ClickToCheckLadder(object sender, RoutedEventArgs e)
  570. {
  571. PleaseWait();
  572. }
  573. // 敬请期待函数
  574. private void PleaseWait()
  575. {
  576. try
  577. {
  578. throw new Exception("敬请期待");
  579. }
  580. catch (Exception exc)
  581. {
  582. // ErrorDisplayer error = new(exc.Message);
  583. // error.Show();
  584. }
  585. }
  586. // 以下为Mainwindow自定义属性
  587. private readonly DispatcherTimer timer; // 定时器
  588. private long counter; // 预留的取时间变量
  589. AvailableService.AvailableServiceClient client;
  590. AsyncServerStreamingCall<MessageToClient>? responseStream;
  591. private StatusBarOfSurvivor[] StatusBarsOfSurvivor;
  592. private StatusBarOfHunter StatusBarsOfHunter;
  593. private StatusBarOfCircumstance StatusBarsOfCircumstance;
  594. private bool isClientStocked;
  595. private bool isPlaybackMode;
  596. private long playerID;
  597. private PlayerType playerType;
  598. private double unit;
  599. private double unitHeight;
  600. private double unitWidth;
  601. private readonly Rectangle[,] mapPatches = new Rectangle[50, 50];
  602. private List<MessageOfProp> listOfProp;
  603. private List<MessageOfHuman> listOfHuman;
  604. private List<MessageOfButcher> listOfButcher;
  605. private object drawPicLock = new object();
  606. private bool bonusflag;
  607. private bool mapFlag = false;
  608. private bool hasDrawed = false;
  609. public int[,] defaultMap = new int[,] {
  610. { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 },
  611. { 1, 0,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