plugin.php 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548
  1. <?php
  2. // PLUGIN INFORMATION
  3. $GLOBALS['plugins']['PHP Mailer'] = array( // Plugin Name
  4. 'name' => 'PHP Mailer', // Plugin Name
  5. 'author' => 'PHP Mailer', // Who wrote the plugin
  6. 'category' => 'Mail', // One to Two Word Description
  7. 'link' => 'https://github.com/PHPMailer/PHPMailer', // Link to plugin info
  8. 'license' => 'personal,business', // License Type use , for multiple
  9. 'idPrefix' => 'PHPMAILER', // html element id prefix
  10. 'configPrefix' => 'PHPMAILER', // config file prefix for array items without the hyphen
  11. 'version' => '1.0.0', // SemVer of plugin
  12. 'image' => 'api/plugins/php-mailer/logo.png', // 1:1 non transparent image for plugin
  13. 'settings' => true, // does plugin need a settings modal?
  14. 'bind' => true, // use default bind to make settings page - true or false
  15. 'api' => 'api/v2/plugins/php-mailer/settings', // api route for settings page
  16. 'homepage' => false // Is plugin for use on homepage? true or false
  17. );
  18. class PhpMailer extends Organizr
  19. {
  20. public function _phpMailerPluginGetEmails()
  21. {
  22. $type = null;
  23. if ($this->config['authBackend']) {
  24. if ($this->config['authBackend'] == 'plex') {
  25. $type = 'plex';
  26. }
  27. }
  28. if ($type == 'plex') {
  29. $emails = array_merge($this->userList('plex')['both'], $this->_phpMailerPluginGetOrgUsers());
  30. } elseif ($type == 'emby') {
  31. $emails = $this->_phpMailerPluginGetOrgUsers();
  32. } else {
  33. $emails = $this->_phpMailerPluginGetOrgUsers();
  34. }
  35. return $emails;
  36. }
  37. public function _phpMailerPluginGetOrgUsers()
  38. {
  39. $return = null;
  40. $result = $this->getAllUsers(true);
  41. if (is_array($result) || is_object($result)) {
  42. foreach ($result['users'] as $k => $v) {
  43. $return[$v['username']] = $v['email'];
  44. }
  45. return ($return) ?? false;
  46. }
  47. }
  48. public function _phpMailerPluginGetTemplates()
  49. {
  50. foreach (glob(dirname(__DIR__, 2) . DIRECTORY_SEPARATOR . 'plugins' . DIRECTORY_SEPARATOR . 'php-mailer' . DIRECTORY_SEPARATOR . 'misc' . DIRECTORY_SEPARATOR . 'emailTemplates' . DIRECTORY_SEPARATOR . "*.php") as $filename) {
  51. $templates[] = array(
  52. 'name' => preg_replace('/\\.[^.\\s]{3,4}$/', '', basename($filename)),
  53. 'value' => preg_replace('/\\.[^.\\s]{3,4}$/', '', basename($filename))
  54. );
  55. }
  56. return $templates;
  57. }
  58. public function _phpMailerPluginEmailTemplate($emailTemplate)
  59. {
  60. $variables = [
  61. '{user}' => $emailTemplate['user'],
  62. '{domain}' => $this->getServerPath(true),
  63. '{password}' => $emailTemplate['password'],
  64. '{inviteCode}' => $emailTemplate['inviteCode'],
  65. '{fullDomain}' => $this->getServerPath(true),
  66. '{title}' => $this->config['title'],
  67. ];
  68. $emailTemplate['body'] = strtr($emailTemplate['body'], $variables);
  69. $emailTemplate['subject'] = strtr($emailTemplate['subject'], $variables);
  70. return $emailTemplate;
  71. }
  72. public function _phpMailerPluginBuildEmail($email)
  73. {
  74. /** @noinspection PhpUnusedLocalVariableInspection */
  75. $subject = (isset($email['subject'])) ? $email['subject'] : 'Message from Server';
  76. $body = (isset($email['body'])) ? $email['body'] : 'Message Error Occurred';
  77. $type = (isset($email['type'])) ? $email['type'] : 'No Type';
  78. switch ($type) {
  79. case 'invite':
  80. $extra = 'invite';
  81. break;
  82. case 'reset':
  83. $extra = 'reset';
  84. break;
  85. default:
  86. $extra = null;
  87. break;
  88. }
  89. include('misc/emailTemplates/' . $this->config['PHPMAILER-template'] . '.php');
  90. return $email;
  91. }
  92. public function _phpMailerPluginAdminSendEmail($array)
  93. {
  94. if ($this->config['PHPMAILER-enabled']) {
  95. $emailTemplate = array(
  96. 'type' => 'admin',
  97. 'body' => $array['body'],
  98. 'subject' => $array['subject'],
  99. 'user' => null,
  100. 'password' => null,
  101. 'inviteCode' => null,
  102. );
  103. $emailTemplate = $this->_phpMailerPluginEmailTemplate($emailTemplate);
  104. $sendEmail = array(
  105. 'bcc' => $array['bcc'],
  106. 'subject' => $emailTemplate['subject'],
  107. 'body' => $this->_phpMailerPluginBuildEmail($emailTemplate),
  108. );
  109. $response = $this->_phpMailerPluginSendEmail($sendEmail);
  110. if ($response == true) {
  111. $msg = ($this->config['PHPMAILER-debugTesting']) ? $this->config['phpmOriginalDebug'] : 'Email sent';
  112. $this->setAPIResponse('success', $msg, 200);
  113. } else {
  114. $this->setAPIResponse('error', $response, 409);
  115. return false;
  116. }
  117. return true;
  118. } else {
  119. $this->setAPIResponse('error', 'PHP-Mailer is not enabled', 409);
  120. return false;
  121. }
  122. return false;
  123. }
  124. public function _phpMailerPluginGetDebug($str, $level)
  125. {
  126. $this->config['phpmOriginalDebug'] = $this->config['phpmOriginalDebug'] . $str;
  127. return $this->config['phpmOriginalDebug'];
  128. }
  129. public function _phpMailerPluginSendTestEmail()
  130. {
  131. $emailTemplate = array(
  132. 'type' => 'test',
  133. 'body' => 'This is just a test email.',
  134. 'subject' => 'Test E-Mail',
  135. 'user' => null,
  136. 'password' => null,
  137. 'inviteCode' => null,
  138. );
  139. $emailTemplate = $this->_phpMailerPluginEmailTemplate($emailTemplate);
  140. $this->config['phpmOriginalDebug'] = '|||DEBUG|||';
  141. try {
  142. $mail = new PHPMailer\PHPMailer\PHPMailer(true);
  143. $mail->SMTPDebug = 2;
  144. $mail->isSMTP();
  145. $mail->Debugoutput = function ($str, $level) {
  146. $this->_phpMailerPluginGetDebug($str, $level);
  147. };
  148. $mail->Host = $this->config['PHPMAILER-smtpHost'];
  149. $mail->Port = $this->config['PHPMAILER-smtpHostPort'];
  150. if ($this->config['PHPMAILER-smtpHostType'] !== 'n/a') {
  151. $mail->SMTPSecure = $this->config['PHPMAILER-smtpHostType'];
  152. }
  153. $mail->SMTPAuth = $this->config['PHPMAILER-smtpHostAuth'];
  154. $mail->Username = $this->config['PHPMAILER-smtpHostUsername'];
  155. $mail->Password = $this->decrypt($this->config['PHPMAILER-smtpHostPassword']);
  156. $mail->SMTPOptions = array(
  157. 'ssl' => [
  158. 'verify_peer' => $this->config['PHPMAILER-verifyCert'],
  159. 'verify_depth' => 3,
  160. 'allow_self_signed' => true,
  161. 'peer_name' => $this->config['PHPMAILER-smtpHost'],
  162. 'cafile' => $this->getCert(),
  163. ],
  164. );
  165. $mail->setFrom($this->config['PHPMAILER-smtpHostSenderEmail'], $this->config['PHPMAILER-smtpHostSenderName']);
  166. $mail->addReplyTo($this->config['PHPMAILER-smtpHostSenderEmail'], $this->config['PHPMAILER-smtpHostSenderName']);
  167. $mail->isHTML(true);
  168. $mail->addAddress($this->user['email'], $this->user['username']);
  169. $mail->Subject = $emailTemplate['subject'];
  170. $mail->Body = $this->_phpMailerPluginBuildEmail($emailTemplate);
  171. $mail->send();
  172. $this->setLoggerChannel('Email')->info('E-Mail Test Sent');
  173. $msg = ($this->config['PHPMAILER-debugTesting']) ? $this->config['phpmOriginalDebug'] : 'Email sent';
  174. $this->setAPIResponse('success', $msg, 200);
  175. return true;
  176. } catch (PHPMailer\PHPMailer\Exception $e) {
  177. $this->setLoggerChannel('Email')->error($e);
  178. $this->setResponse(500, $e->getMessage(), $this->config['phpmOriginalDebug']);
  179. return false;
  180. }
  181. return false;
  182. }
  183. public function _phpMailerPluginSendEmail($emailInfo)
  184. {
  185. $to = isset($emailInfo['to']) ? $emailInfo['to'] : null;
  186. $cc = isset($emailInfo['cc']) ? $emailInfo['cc'] : null;
  187. $bcc = isset($emailInfo['bcc']) ? $emailInfo['bcc'] : null;
  188. $subject = isset($emailInfo['subject']) ? $emailInfo['subject'] : null;
  189. $body = isset($emailInfo['body']) ? $emailInfo['body'] : null;
  190. $username = isset($emailInfo['user']) ? $emailInfo['user'] : 'Organizr User';
  191. $data = [
  192. 'to' => $to,
  193. 'cc' => $cc,
  194. 'bcc' => $bcc,
  195. 'subject' => $subject,
  196. 'body' => $body,
  197. 'username' => $username,
  198. ];
  199. try {
  200. $mail = new PHPMailer\PHPMailer\PHPMailer(true);
  201. $mail->isSMTP();
  202. //$mail->SMTPDebug = 3;
  203. $mail->Host = $this->config['PHPMAILER-smtpHost'];
  204. $mail->Port = $this->config['PHPMAILER-smtpHostPort'];
  205. if ($this->config['PHPMAILER-smtpHostType'] !== 'n/a') {
  206. $mail->SMTPSecure = $this->config['PHPMAILER-smtpHostType'];
  207. }
  208. $mail->SMTPAuth = $this->config['PHPMAILER-smtpHostAuth'];
  209. $mail->Username = $this->config['PHPMAILER-smtpHostUsername'];
  210. $mail->Password = $this->decrypt($this->config['PHPMAILER-smtpHostPassword']);
  211. $mail->SMTPOptions = array(
  212. 'ssl' => [
  213. 'verify_peer' => $this->config['PHPMAILER-verifyCert'],
  214. 'verify_depth' => 3,
  215. 'allow_self_signed' => true,
  216. 'peer_name' => $this->config['PHPMAILER-smtpHost'],
  217. 'cafile' => $this->getCert(),
  218. ],
  219. );
  220. $mail->setFrom($this->config['PHPMAILER-smtpHostSenderEmail'], $this->config['PHPMAILER-smtpHostSenderName']);
  221. $mail->addReplyTo($this->config['PHPMAILER-smtpHostSenderEmail'], $this->config['PHPMAILER-smtpHostSenderName']);
  222. $mail->isHTML(true);
  223. if ($to) {
  224. $mail->addAddress($to, $username);
  225. }
  226. if ($cc) {
  227. $mail->addCC($cc);
  228. }
  229. if ($bcc) {
  230. if (strpos($bcc, ',') === false) {
  231. $mail->addBCC($bcc);
  232. } else {
  233. $allEmails = explode(",", $bcc);
  234. foreach ($allEmails as $gotEmail) {
  235. $mail->addBCC($gotEmail);
  236. }
  237. }
  238. }
  239. $mail->Subject = $subject;
  240. $mail->Body = $body;
  241. $mail->send();
  242. return true;
  243. } catch (PHPMailer\PHPMailer\Exception $e) {
  244. $this->setLoggerChannel('Email')->error($e, $data);
  245. return false;
  246. }
  247. }
  248. /* GET PHPMAILER SETTINGS */
  249. public function _phpMailerPluginGetSettings()
  250. {
  251. return [
  252. 'Host' => [
  253. [
  254. 'type' => 'input',
  255. 'name' => 'PHPMAILER-smtpHost',
  256. 'label' => 'SMTP Host',
  257. 'value' => $this->config['PHPMAILER-smtpHost']
  258. ],
  259. [
  260. 'type' => 'input',
  261. 'name' => 'PHPMAILER-smtpHostPort',
  262. 'label' => 'SMTP Port',
  263. 'value' => $this->config['PHPMAILER-smtpHostPort']
  264. ]
  265. ],
  266. 'Authentication' => [
  267. [
  268. 'type' => 'input',
  269. 'name' => 'PHPMAILER-smtpHostUsername',
  270. 'label' => 'Username',
  271. 'value' => $this->config['PHPMAILER-smtpHostUsername']
  272. ],
  273. [
  274. 'type' => 'password',
  275. 'name' => 'PHPMAILER-smtpHostPassword',
  276. 'label' => 'Password',
  277. 'value' => $this->config['PHPMAILER-smtpHostPassword']
  278. ],
  279. [
  280. 'type' => 'switch',
  281. 'name' => 'PHPMAILER-smtpHostAuth',
  282. 'label' => 'Authentication',
  283. 'value' => $this->config['PHPMAILER-smtpHostAuth']
  284. ],
  285. [
  286. 'type' => 'select',
  287. 'name' => 'PHPMAILER-smtpHostType',
  288. 'label' => 'Authentication Type',
  289. 'value' => $this->config['PHPMAILER-smtpHostType'],
  290. 'options' => [
  291. [
  292. 'name' => 'tls',
  293. 'value' => 'tls'
  294. ],
  295. [
  296. 'name' => 'ssl',
  297. 'value' => 'ssl'
  298. ],
  299. [
  300. 'name' => 'off',
  301. 'value' => 'n/a'
  302. ]
  303. ]
  304. ],
  305. [
  306. 'type' => 'switch',
  307. 'name' => 'PHPMAILER-verifyCert',
  308. 'label' => 'Verify Certificate',
  309. 'value' => $this->config['PHPMAILER-verifyCert']
  310. ],
  311. ],
  312. 'Sender Information' => [
  313. [
  314. 'type' => 'input',
  315. 'name' => 'PHPMAILER-smtpHostSenderName',
  316. 'label' => 'Sender Name',
  317. 'value' => $this->config['PHPMAILER-smtpHostSenderName']
  318. ],
  319. [
  320. 'type' => 'input',
  321. 'name' => 'PHPMAILER-smtpHostSenderEmail',
  322. 'label' => 'Sender Email',
  323. 'value' => $this->config['PHPMAILER-smtpHostSenderEmail'],
  324. 'placeholder' => 'i.e. same as username'
  325. ]
  326. ],
  327. 'Test & Options' => [
  328. [
  329. 'type' => 'button',
  330. 'label' => 'Send Test',
  331. 'class' => 'phpmSendTestEmail',
  332. 'icon' => 'fa fa-paper-plane',
  333. 'text' => 'Send'
  334. ],
  335. [
  336. 'type' => 'switch',
  337. 'name' => 'PHPMAILER-debugTesting',
  338. 'label' => 'Enable Debug Output on Email Test',
  339. 'value' => $this->config['PHPMAILER-debugTesting'],
  340. ],
  341. [
  342. 'type' => 'input',
  343. 'name' => 'PHPMAILER-domain',
  344. 'label' => 'Domain Link Override',
  345. 'value' => $this->config['PHPMAILER-domain'],
  346. 'placeholder' => 'https://domain.com/',
  347. ],
  348. [
  349. 'type' => 'select',
  350. 'name' => 'PHPMAILER-template',
  351. 'label' => 'Theme',
  352. 'value' => $this->config['PHPMAILER-template'],
  353. 'options' => $this->_phpMailerPluginGetTemplates()
  354. ],
  355. [
  356. 'type' => 'input',
  357. 'name' => 'PHPMAILER-logo',
  358. 'label' => 'WAN Logo URL',
  359. 'value' => $this->config['PHPMAILER-logo'],
  360. 'placeholder' => 'Full URL',
  361. ],
  362. [
  363. 'type' => 'switch',
  364. 'name' => 'PHPMAILER-emailTemplateRegisterUserEnabled',
  365. 'label' => 'Send Welcome E-Mail',
  366. 'value' => $this->config['PHPMAILER-emailTemplateRegisterUserEnabled'],
  367. ],
  368. ],
  369. 'Templates' => [
  370. [
  371. 'type' => 'accordion',
  372. 'label' => 'Edit Template',
  373. 'id' => 'customEmailTemplates',
  374. 'override' => 12,
  375. 'options' => [
  376. [
  377. 'id' => 'PHPMAILER-emailTemplateRegisterUserForm',
  378. 'header' => 'New Registration',
  379. 'body' => [
  380. [
  381. 'type' => 'input',
  382. 'name' => 'PHPMAILER-emailTemplateRegisterUserSubject',
  383. 'smallLabel' => 'Subject',
  384. 'value' => $this->config['PHPMAILER-emailTemplateRegisterUserSubject'],
  385. ],
  386. [
  387. 'type' => 'textbox',
  388. 'name' => 'PHPMAILER-emailTemplateRegisterUser',
  389. 'smallLabel' => 'Body',
  390. 'value' => $this->config['PHPMAILER-emailTemplateRegisterUser'],
  391. 'attr' => 'rows="10"',
  392. ]
  393. ]
  394. ],
  395. [
  396. 'id' => 'PHPMAILER-emailTemplateResetPasswordForm',
  397. 'header' => 'Reset Password',
  398. 'body' => [
  399. [
  400. 'type' => 'input',
  401. 'name' => 'PHPMAILER-emailTemplateResetSubject',
  402. 'smallLabel' => 'Subject',
  403. 'value' => $this->config['PHPMAILER-emailTemplateResetSubject'],
  404. ],
  405. [
  406. 'type' => 'textbox',
  407. 'name' => 'PHPMAILER-emailTemplateReset',
  408. 'smallLabel' => 'Body',
  409. 'value' => $this->config['PHPMAILER-emailTemplateReset'],
  410. 'attr' => 'rows="10"',
  411. ]
  412. ]
  413. ],
  414. [
  415. 'id' => 'PHPMAILER-emailTemplateInviteUserForm',
  416. 'header' => 'Invite User',
  417. 'body' => [
  418. [
  419. 'type' => 'input',
  420. 'name' => 'PHPMAILER-emailTemplateInviteUserSubject',
  421. 'smallLabel' => 'Subject',
  422. 'value' => $this->config['PHPMAILER-emailTemplateInviteUserSubject'],
  423. ],
  424. [
  425. 'type' => 'textbox',
  426. 'name' => 'PHPMAILER-emailTemplateInviteUser',
  427. 'smallLabel' => 'Body',
  428. 'value' => $this->config['PHPMAILER-emailTemplateInviteUser'],
  429. 'attr' => 'rows="10"',
  430. ]
  431. ]
  432. ],
  433. [
  434. 'id' => 'PHPMAILER-emailTemplateCustom-include-OneForm',
  435. 'header' => $this->config['PHPMAILER-emailTemplateCustom-include-OneName'],
  436. 'body' => [
  437. [
  438. 'type' => 'input',
  439. 'name' => 'PHPMAILER-emailTemplateCustom-include-OneName',
  440. 'smallLabel' => 'Name',
  441. 'value' => $this->config['PHPMAILER-emailTemplateCustom-include-OneName'],
  442. ],
  443. [
  444. 'type' => 'input',
  445. 'name' => 'PHPMAILER-emailTemplateCustom-include-OneSubject',
  446. 'smallLabel' => 'Subject',
  447. 'value' => $this->config['PHPMAILER-emailTemplateCustom-include-OneSubject'],
  448. ],
  449. [
  450. 'type' => 'textbox',
  451. 'name' => 'PHPMAILER-emailTemplateCustom-include-One',
  452. 'smallLabel' => 'Body',
  453. 'value' => $this->config['PHPMAILER-emailTemplateCustom-include-One'],
  454. 'attr' => 'rows="10"',
  455. ]
  456. ]
  457. ],
  458. [
  459. 'id' => 'PHPMAILER-emailTemplateCustom-include-TwoForm',
  460. 'header' => $this->config['PHPMAILER-emailTemplateCustom-include-TwoName'],
  461. 'body' => [
  462. [
  463. 'type' => 'input',
  464. 'name' => 'PHPMAILER-emailTemplateCustom-include-TwoName',
  465. 'smallLabel' => 'Name',
  466. 'value' => $this->config['PHPMAILER-emailTemplateCustom-include-TwoName'],
  467. ],
  468. [
  469. 'type' => 'input',
  470. 'name' => 'PHPMAILER-emailTemplateCustom-include-TwoSubject',
  471. 'smallLabel' => 'Subject',
  472. 'value' => $this->config['PHPMAILER-emailTemplateCustom-include-TwoSubject'],
  473. ],
  474. [
  475. 'type' => 'textbox',
  476. 'name' => 'PHPMAILER-emailTemplateCustom-include-Two',
  477. 'smallLabel' => 'Body',
  478. 'value' => $this->config['PHPMAILER-emailTemplateCustom-include-Two'],
  479. 'attr' => 'rows="10"',
  480. ]
  481. ]
  482. ],
  483. [
  484. 'id' => 'PHPMAILER-emailTemplateCustom-include-ThreeForm',
  485. 'header' => $this->config['PHPMAILER-emailTemplateCustom-include-ThreeName'],
  486. 'body' => [
  487. [
  488. 'type' => 'input',
  489. 'name' => 'PHPMAILER-emailTemplateCustom-include-ThreeName',
  490. 'smallLabel' => 'Name',
  491. 'value' => $this->config['PHPMAILER-emailTemplateCustom-include-ThreeName'],
  492. ],
  493. [
  494. 'type' => 'input',
  495. 'name' => 'PHPMAILER-emailTemplateCustom-include-ThreeSubject',
  496. 'smallLabel' => 'Subject',
  497. 'value' => $this->config['PHPMAILER-emailTemplateCustom-include-ThreeSubject'],
  498. ],
  499. [
  500. 'type' => 'textbox',
  501. 'name' => 'PHPMAILER-emailTemplateCustom-include-Three',
  502. 'smallLabel' => 'Body',
  503. 'value' => $this->config['PHPMAILER-emailTemplateCustom-include-Three'],
  504. 'attr' => 'rows="10"',
  505. ]
  506. ]
  507. ],
  508. [
  509. 'id' => 'PHPMAILER-emailTemplateCustom-include-FourForm',
  510. 'header' => $this->config['PHPMAILER-emailTemplateCustom-include-FourName'],
  511. 'body' => [
  512. [
  513. 'type' => 'input',
  514. 'name' => 'PHPMAILER-emailTemplateCustom-include-FourName',
  515. 'smallLabel' => 'Name',
  516. 'value' => $this->config['PHPMAILER-emailTemplateCustom-include-FourName'],
  517. ],
  518. [
  519. 'type' => 'input',
  520. 'name' => 'PHPMAILER-emailTemplateCustom-include-FourSubject',
  521. 'smallLabel' => 'Subject',
  522. 'value' => $this->config['PHPMAILER-emailTemplateCustom-include-FourSubject'],
  523. ],
  524. [
  525. 'type' => 'textbox',
  526. 'name' => 'PHPMAILER-emailTemplateCustom-include-Four',
  527. 'smallLabel' => 'Body',
  528. 'value' => $this->config['PHPMAILER-emailTemplateCustom-include-Four'],
  529. 'attr' => 'rows="10"',
  530. ]
  531. ]
  532. ],
  533. ]
  534. ]
  535. ]
  536. ];
  537. }
  538. }