4
0

app.js 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702
  1. // OnClick attaches a listener to the elements that match the selector.
  2. function onClick(selector, callback, noPreventDefault) {
  3. document.querySelectorAll(selector).forEach((element) => {
  4. element.onclick = (event) => {
  5. if (!noPreventDefault) {
  6. event.preventDefault();
  7. }
  8. callback(event);
  9. };
  10. });
  11. }
  12. function onAuxClick(selector, callback, noPreventDefault) {
  13. document.querySelectorAll(selector).forEach((element) => {
  14. element.onauxclick = (event) => {
  15. if (!noPreventDefault) {
  16. event.preventDefault();
  17. }
  18. callback(event);
  19. };
  20. });
  21. }
  22. // make logo element as button on mobile layout
  23. function checkMenuToggleModeByLayout() {
  24. const logoElement = document.querySelector(".logo");
  25. if (!logoElement) return;
  26. const homePageLinkElement = document.querySelector(".logo > a");
  27. if (document.documentElement.clientWidth < 620) {
  28. const navMenuElement = document.getElementById("header-menu");
  29. const navMenuElementIsExpanded = navMenuElement.classList.contains("js-menu-show");
  30. const logoToggleButtonLabel = logoElement.getAttribute("data-toggle-button-label");
  31. logoElement.setAttribute("role", "button");
  32. logoElement.setAttribute("tabindex", "0");
  33. logoElement.setAttribute("aria-label", logoToggleButtonLabel);
  34. logoElement.setAttribute("aria-expanded", navMenuElementIsExpanded?"true":"false");
  35. homePageLinkElement.setAttribute("tabindex", "-1");
  36. } else {
  37. logoElement.removeAttribute("role");
  38. logoElement.removeAttribute("tabindex");
  39. logoElement.removeAttribute("aria-expanded");
  40. logoElement.removeAttribute("aria-label");
  41. homePageLinkElement.removeAttribute("tabindex");
  42. }
  43. }
  44. function fixVoiceOverDetailsSummaryBug() {
  45. document.querySelectorAll("details").forEach((details) => {
  46. const summaryElement = details.querySelector("summary");
  47. summaryElement.setAttribute("role", "button");
  48. summaryElement.setAttribute("aria-expanded", details.open? "true": "false");
  49. details.addEventListener("toggle", () => {
  50. summaryElement.setAttribute("aria-expanded", details.open? "true": "false");
  51. });
  52. });
  53. }
  54. // Show and hide the main menu on mobile devices.
  55. function toggleMainMenu(event) {
  56. if (event.type === "keydown" && !(event.key === "Enter" || event.key === " ")) {
  57. return;
  58. }
  59. if (event.currentTarget.getAttribute("role")) {
  60. event.preventDefault();
  61. }
  62. const menu = document.querySelector(".header nav ul");
  63. const menuToggleButton = document.querySelector(".logo");
  64. if (menu.classList.contains("js-menu-show")) {
  65. menu.classList.remove("js-menu-show");
  66. menuToggleButton.setAttribute("aria-expanded", false);
  67. } else {
  68. menu.classList.add("js-menu-show");
  69. menuToggleButton.setAttribute("aria-expanded", true);
  70. }
  71. }
  72. // Handle click events for the main menu (<li> and <a>).
  73. function onClickMainMenuListItem(event) {
  74. const element = event.target;
  75. if (element.tagName === "A") {
  76. window.location.href = element.getAttribute("href");
  77. } else {
  78. window.location.href = element.querySelector("a").getAttribute("href");
  79. }
  80. }
  81. // Change the button label when the page is loading.
  82. function handleSubmitButtons() {
  83. document.querySelectorAll("form").forEach((element) => {
  84. element.onsubmit = () => {
  85. const button = element.querySelector("button");
  86. if (button) {
  87. button.textContent = button.dataset.labelLoading;
  88. button.disabled = true;
  89. }
  90. };
  91. });
  92. }
  93. // Show modal dialog with the list of keyboard shortcuts.
  94. function showKeyboardShortcuts() {
  95. const template = document.getElementById("keyboard-shortcuts");
  96. if (template !== null) {
  97. ModalHandler.open(template.content, "dialog-title");
  98. }
  99. }
  100. // Mark as read visible items of the current page.
  101. function markPageAsRead() {
  102. const items = DomHelper.getVisibleElements(".items .item");
  103. const entryIDs = [];
  104. items.forEach((element) => {
  105. element.classList.add("item-status-read");
  106. entryIDs.push(parseInt(element.dataset.id, 10));
  107. });
  108. if (entryIDs.length > 0) {
  109. updateEntriesStatus(entryIDs, "read", () => {
  110. // Make sure the Ajax request reach the server before we reload the page.
  111. const element = document.querySelector(":is(a, button)[data-action=markPageAsRead]");
  112. let showOnlyUnread = false;
  113. if (element) {
  114. showOnlyUnread = element.dataset.showOnlyUnread || false;
  115. }
  116. if (showOnlyUnread) {
  117. window.location.href = window.location.href;
  118. } else {
  119. goToPage("next", true);
  120. }
  121. });
  122. }
  123. }
  124. /**
  125. * Handle entry status changes from the list view and entry view.
  126. * Focus the next or the previous entry if it exists.
  127. * @param {string} item Item to focus: "previous" or "next".
  128. * @param {Element} element
  129. * @param {boolean} setToRead
  130. */
  131. function handleEntryStatus(item, element, setToRead) {
  132. const toasting = !element;
  133. const currentEntry = findEntry(element);
  134. if (currentEntry) {
  135. if (!setToRead || currentEntry.querySelector(":is(a, button)[data-toggle-status]").dataset.value == "unread") {
  136. toggleEntryStatus(currentEntry, toasting);
  137. }
  138. if (isListView() && currentEntry.classList.contains('current-item')) {
  139. switch (item) {
  140. case "previous":
  141. goToListItem(-1);
  142. break;
  143. case "next":
  144. goToListItem(1);
  145. break;
  146. }
  147. }
  148. }
  149. }
  150. // Change the entry status to the opposite value.
  151. function toggleEntryStatus(element, toasting) {
  152. const entryID = parseInt(element.dataset.id, 10);
  153. const link = element.querySelector(":is(a, button)[data-toggle-status]");
  154. const currentStatus = link.dataset.value;
  155. const newStatus = currentStatus === "read" ? "unread" : "read";
  156. link.querySelector("span").textContent = link.dataset.labelLoading;
  157. updateEntriesStatus([entryID], newStatus, () => {
  158. let iconElement, label;
  159. if (currentStatus === "read") {
  160. iconElement = document.querySelector("template#icon-read");
  161. label = link.dataset.labelRead;
  162. if (toasting) {
  163. showToast(link.dataset.toastUnread, iconElement);
  164. }
  165. } else {
  166. iconElement = document.querySelector("template#icon-unread");
  167. label = link.dataset.labelUnread;
  168. if (toasting) {
  169. showToast(link.dataset.toastRead, iconElement);
  170. }
  171. }
  172. link.innerHTML = iconElement.innerHTML + '<span class="icon-label">' + label + '</span>';
  173. link.dataset.value = newStatus;
  174. if (element.classList.contains("item-status-" + currentStatus)) {
  175. element.classList.remove("item-status-" + currentStatus);
  176. element.classList.add("item-status-" + newStatus);
  177. }
  178. });
  179. }
  180. // Mark a single entry as read.
  181. function markEntryAsRead(element) {
  182. if (element.classList.contains("item-status-unread")) {
  183. element.classList.remove("item-status-unread");
  184. element.classList.add("item-status-read");
  185. const entryID = parseInt(element.dataset.id, 10);
  186. updateEntriesStatus([entryID], "read");
  187. }
  188. }
  189. // Send the Ajax request to refresh all feeds in the background
  190. function handleRefreshAllFeeds() {
  191. const url = document.body.dataset.refreshAllFeedsUrl;
  192. if (url) {
  193. window.location.href = url;
  194. }
  195. }
  196. // Send the Ajax request to change entries statuses.
  197. function updateEntriesStatus(entryIDs, status, callback) {
  198. const url = document.body.dataset.entriesStatusUrl;
  199. const request = new RequestBuilder(url);
  200. request.withBody({ entry_ids: entryIDs, status: status });
  201. request.withCallback((resp) => {
  202. resp.json().then(count => {
  203. if (callback) {
  204. callback(resp);
  205. }
  206. if (status === "read") {
  207. decrementUnreadCounter(count);
  208. } else {
  209. incrementUnreadCounter(count);
  210. }
  211. });
  212. });
  213. request.execute();
  214. }
  215. // Handle save entry from list view and entry view.
  216. function handleSaveEntry(element) {
  217. const toasting = !element;
  218. const currentEntry = findEntry(element);
  219. if (currentEntry) {
  220. saveEntry(currentEntry.querySelector(":is(a, button)[data-save-entry]"), toasting);
  221. }
  222. }
  223. // Send the Ajax request to save an entry.
  224. function saveEntry(element, toasting) {
  225. if (!element || element.dataset.completed) {
  226. return;
  227. }
  228. element.innerHTML = '<span class="icon-label">' + element.dataset.labelLoading + '</span>';
  229. const request = new RequestBuilder(element.dataset.saveUrl);
  230. request.withCallback(() => {
  231. element.innerHTML = '<span class="icon-label">' + element.dataset.labelDone + '</span>';
  232. element.dataset.completed = true;
  233. if (toasting) {
  234. const iconElement = document.querySelector("template#icon-save");
  235. showToast(element.dataset.toastDone, iconElement);
  236. }
  237. });
  238. request.execute();
  239. }
  240. // Handle bookmark from the list view and entry view.
  241. function handleBookmark(element) {
  242. const toasting = !element;
  243. const currentEntry = findEntry(element);
  244. if (currentEntry) {
  245. toggleBookmark(currentEntry, toasting);
  246. }
  247. }
  248. // Send the Ajax request and change the icon when bookmarking an entry.
  249. function toggleBookmark(parentElement, toasting) {
  250. const element = parentElement.querySelector(":is(a, button)[data-toggle-bookmark]");
  251. if (!element) {
  252. return;
  253. }
  254. element.innerHTML = '<span class="icon-label">' + element.dataset.labelLoading + '</span>';
  255. const request = new RequestBuilder(element.dataset.bookmarkUrl);
  256. request.withCallback(() => {
  257. const currentStarStatus = element.dataset.value;
  258. const newStarStatus = currentStarStatus === "star" ? "unstar" : "star";
  259. let iconElement, label;
  260. if (currentStarStatus === "star") {
  261. iconElement = document.querySelector("template#icon-star");
  262. label = element.dataset.labelStar;
  263. if (toasting) {
  264. showToast(element.dataset.toastUnstar, iconElement);
  265. }
  266. } else {
  267. iconElement = document.querySelector("template#icon-unstar");
  268. label = element.dataset.labelUnstar;
  269. if (toasting) {
  270. showToast(element.dataset.toastStar, iconElement);
  271. }
  272. }
  273. element.innerHTML = iconElement.innerHTML + '<span class="icon-label">' + label + '</span>';
  274. element.dataset.value = newStarStatus;
  275. });
  276. request.execute();
  277. }
  278. // Send the Ajax request to download the original web page.
  279. function handleFetchOriginalContent() {
  280. if (isListView()) {
  281. return;
  282. }
  283. const element = document.querySelector(":is(a, button)[data-fetch-content-entry]");
  284. if (!element) {
  285. return;
  286. }
  287. const previousElement = element.cloneNode(true);
  288. element.innerHTML = '<span class="icon-label">' + element.dataset.labelLoading + '</span>';
  289. const request = new RequestBuilder(element.dataset.fetchContentUrl);
  290. request.withCallback((response) => {
  291. element.textContent = '';
  292. element.appendChild(previousElement);
  293. response.json().then((data) => {
  294. if (data.hasOwnProperty("content") && data.hasOwnProperty("reading_time")) {
  295. document.querySelector(".entry-content").innerHTML = data.content;
  296. const entryReadingtimeElement = document.querySelector(".entry-reading-time");
  297. if (entryReadingtimeElement) {
  298. entryReadingtimeElement.innerHTML = data.reading_time;
  299. }
  300. }
  301. });
  302. });
  303. request.execute();
  304. }
  305. function openOriginalLink(openLinkInCurrentTab) {
  306. const entryLink = document.querySelector(".entry h1 a");
  307. if (entryLink !== null) {
  308. if (openLinkInCurrentTab) {
  309. window.location.href = entryLink.getAttribute("href");
  310. } else {
  311. DomHelper.openNewTab(entryLink.getAttribute("href"));
  312. }
  313. return;
  314. }
  315. const currentItemOriginalLink = document.querySelector(".current-item :is(a, button)[data-original-link]");
  316. if (currentItemOriginalLink !== null) {
  317. DomHelper.openNewTab(currentItemOriginalLink.getAttribute("href"));
  318. const currentItem = document.querySelector(".current-item");
  319. // If we are not on the list of starred items, move to the next item
  320. if (document.location.href != document.querySelector(':is(a, button)[data-page=starred]').href) {
  321. goToListItem(1);
  322. }
  323. markEntryAsRead(currentItem);
  324. }
  325. }
  326. function openCommentLink(openLinkInCurrentTab) {
  327. if (!isListView()) {
  328. const entryLink = document.querySelector(":is(a, button)[data-comments-link]");
  329. if (entryLink !== null) {
  330. if (openLinkInCurrentTab) {
  331. window.location.href = entryLink.getAttribute("href");
  332. } else {
  333. DomHelper.openNewTab(entryLink.getAttribute("href"));
  334. }
  335. return;
  336. }
  337. } else {
  338. const currentItemCommentsLink = document.querySelector(".current-item :is(a, button)[data-comments-link]");
  339. if (currentItemCommentsLink !== null) {
  340. DomHelper.openNewTab(currentItemCommentsLink.getAttribute("href"));
  341. }
  342. }
  343. }
  344. function openSelectedItem() {
  345. const currentItemLink = document.querySelector(".current-item .item-title a");
  346. if (currentItemLink !== null) {
  347. window.location.href = currentItemLink.getAttribute("href");
  348. }
  349. }
  350. function unsubscribeFromFeed() {
  351. const unsubscribeLinks = document.querySelectorAll("[data-action=remove-feed]");
  352. if (unsubscribeLinks.length === 1) {
  353. const unsubscribeLink = unsubscribeLinks[0];
  354. const request = new RequestBuilder(unsubscribeLink.dataset.url);
  355. request.withCallback(() => {
  356. if (unsubscribeLink.dataset.redirectUrl) {
  357. window.location.href = unsubscribeLink.dataset.redirectUrl;
  358. } else {
  359. window.location.reload();
  360. }
  361. });
  362. request.execute();
  363. }
  364. }
  365. /**
  366. * @param {string} page Page to redirect to.
  367. * @param {boolean} fallbackSelf Refresh actual page if the page is not found.
  368. */
  369. function goToPage(page, fallbackSelf) {
  370. const element = document.querySelector(":is(a, button)[data-page=" + page + "]");
  371. if (element) {
  372. document.location.href = element.href;
  373. } else if (fallbackSelf) {
  374. window.location.reload();
  375. }
  376. }
  377. function goToPrevious() {
  378. if (isListView()) {
  379. goToListItem(-1);
  380. } else {
  381. goToPage("previous");
  382. }
  383. }
  384. function goToNext() {
  385. if (isListView()) {
  386. goToListItem(1);
  387. } else {
  388. goToPage("next");
  389. }
  390. }
  391. function goToFeedOrFeeds() {
  392. if (isEntry()) {
  393. goToFeed();
  394. } else {
  395. goToPage('feeds');
  396. }
  397. }
  398. function goToFeed() {
  399. if (isEntry()) {
  400. const feedAnchor = document.querySelector("span.entry-website a");
  401. if (feedAnchor !== null) {
  402. window.location.href = feedAnchor.href;
  403. }
  404. } else {
  405. const currentItemFeed = document.querySelector(".current-item :is(a, button)[data-feed-link]");
  406. if (currentItemFeed !== null) {
  407. window.location.href = currentItemFeed.getAttribute("href");
  408. }
  409. }
  410. }
  411. /**
  412. * @param {number} offset How many items to jump for focus.
  413. */
  414. function goToListItem(offset) {
  415. const items = DomHelper.getVisibleElements(".items .item");
  416. if (items.length === 0) {
  417. return;
  418. }
  419. if (document.querySelector(".current-item") === null) {
  420. items[0].classList.add("current-item");
  421. items[0].focus();
  422. return;
  423. }
  424. for (let i = 0; i < items.length; i++) {
  425. if (items[i].classList.contains("current-item")) {
  426. items[i].classList.remove("current-item");
  427. const index = (i + offset + items.length) % items.length;
  428. const item = items[index];
  429. item.classList.add("current-item");
  430. DomHelper.scrollPageTo(item);
  431. item.focus();
  432. break;
  433. }
  434. }
  435. }
  436. function scrollToCurrentItem() {
  437. const currentItem = document.querySelector(".current-item");
  438. if (currentItem !== null) {
  439. DomHelper.scrollPageTo(currentItem, true);
  440. }
  441. }
  442. function decrementUnreadCounter(n) {
  443. updateUnreadCounterValue((current) => {
  444. return current - n;
  445. });
  446. }
  447. function incrementUnreadCounter(n) {
  448. updateUnreadCounterValue((current) => {
  449. return current + n;
  450. });
  451. }
  452. function updateUnreadCounterValue(callback) {
  453. document.querySelectorAll("span.unread-counter").forEach((element) => {
  454. const oldValue = parseInt(element.textContent, 10);
  455. element.innerHTML = callback(oldValue);
  456. });
  457. if (window.location.href.endsWith('/unread')) {
  458. const oldValue = parseInt(document.title.split('(')[1], 10);
  459. const newValue = callback(oldValue);
  460. document.title = document.title.replace(
  461. /(.*?)\(\d+\)(.*?)/,
  462. function (match, prefix, suffix, offset, string) {
  463. return prefix + '(' + newValue + ')' + suffix;
  464. }
  465. );
  466. }
  467. }
  468. function isEntry() {
  469. return document.querySelector("section.entry") !== null;
  470. }
  471. function isListView() {
  472. return document.querySelector(".items") !== null;
  473. }
  474. function findEntry(element) {
  475. if (isListView()) {
  476. if (element) {
  477. return element.closest(".item");
  478. }
  479. return document.querySelector(".current-item");
  480. }
  481. return document.querySelector(".entry");
  482. }
  483. function handleConfirmationMessage(linkElement, callback) {
  484. if (linkElement.tagName != 'A' && linkElement.tagName != "BUTTON") {
  485. linkElement = linkElement.parentNode;
  486. }
  487. linkElement.style.display = "none";
  488. const containerElement = linkElement.parentNode;
  489. const questionElement = document.createElement("span");
  490. function createLoadingElement() {
  491. const loadingElement = document.createElement("span");
  492. loadingElement.className = "loading";
  493. loadingElement.appendChild(document.createTextNode(linkElement.dataset.labelLoading));
  494. questionElement.remove();
  495. containerElement.appendChild(loadingElement);
  496. }
  497. const yesElement = document.createElement("button");
  498. yesElement.appendChild(document.createTextNode(linkElement.dataset.labelYes));
  499. yesElement.onclick = (event) => {
  500. event.preventDefault();
  501. createLoadingElement();
  502. callback(linkElement.dataset.url, linkElement.dataset.redirectUrl);
  503. };
  504. const noElement = document.createElement("button");
  505. noElement.appendChild(document.createTextNode(linkElement.dataset.labelNo));
  506. noElement.onclick = (event) => {
  507. event.preventDefault();
  508. const noActionUrl = linkElement.dataset.noActionUrl;
  509. if (noActionUrl) {
  510. createLoadingElement();
  511. callback(noActionUrl, linkElement.dataset.redirectUrl);
  512. } else {
  513. linkElement.style.display = "inline";
  514. questionElement.remove();
  515. }
  516. };
  517. questionElement.className = "confirm";
  518. questionElement.appendChild(document.createTextNode(linkElement.dataset.labelQuestion + " "));
  519. questionElement.appendChild(yesElement);
  520. questionElement.appendChild(document.createTextNode(", "));
  521. questionElement.appendChild(noElement);
  522. containerElement.appendChild(questionElement);
  523. }
  524. function showToast(label, iconElement) {
  525. if (!label || !iconElement) {
  526. return;
  527. }
  528. const toastMsgElement = document.getElementById("toast-msg");
  529. if (toastMsgElement) {
  530. toastMsgElement.innerHTML = iconElement.innerHTML + '<span class="icon-label">' + label + '</span>';
  531. const toastElementWrapper = document.getElementById("toast-wrapper");
  532. if (toastElementWrapper) {
  533. toastElementWrapper.classList.remove('toast-animate');
  534. setTimeout(function () {
  535. toastElementWrapper.classList.add('toast-animate');
  536. }, 100);
  537. }
  538. }
  539. }
  540. /** Navigate to the new subscription page. */
  541. function goToAddSubscription() {
  542. window.location.href = document.body.dataset.addSubscriptionUrl;
  543. }
  544. /**
  545. * save player position to allow to resume playback later
  546. * @param {Element} playerElement
  547. */
  548. function handlePlayerProgressionSave(playerElement) {
  549. const currentPositionInSeconds = Math.floor(playerElement.currentTime); // we do not need a precise value
  550. const lastKnownPositionInSeconds = parseInt(playerElement.dataset.lastPosition, 10);
  551. const recordInterval = 10;
  552. // we limit the number of update to only one by interval. Otherwise, we would have multiple update per seconds
  553. if (currentPositionInSeconds >= (lastKnownPositionInSeconds + recordInterval) ||
  554. currentPositionInSeconds <= (lastKnownPositionInSeconds - recordInterval)
  555. ) {
  556. playerElement.dataset.lastPosition = currentPositionInSeconds.toString();
  557. const request = new RequestBuilder(playerElement.dataset.saveUrl);
  558. request.withBody({ progression: currentPositionInSeconds });
  559. request.execute();
  560. }
  561. }
  562. /**
  563. * handle new share entires and already shared entries
  564. */
  565. function handleShare() {
  566. const link = document.querySelector(':is(a, button)[data-share-status]');
  567. const title = document.querySelector("body > main > section > header > h1 > a");
  568. if (link.dataset.shareStatus === "shared") {
  569. checkShareAPI(title, link.href);
  570. }
  571. if (link.dataset.shareStatus === "share") {
  572. const request = new RequestBuilder(link.href);
  573. request.withCallback((r) => {
  574. checkShareAPI(title, r.url);
  575. });
  576. request.withHttpMethod("GET");
  577. request.execute();
  578. }
  579. }
  580. /**
  581. * wrapper for Web Share API
  582. */
  583. function checkShareAPI(title, url) {
  584. if (!navigator.canShare) {
  585. console.error("Your browser doesn't support the Web Share API.");
  586. window.location = url;
  587. return;
  588. }
  589. try {
  590. navigator.share({
  591. title: title,
  592. url: url
  593. });
  594. window.location.reload();
  595. } catch (err) {
  596. console.error(err);
  597. window.location.reload();
  598. }
  599. }
  600. function getCsrfToken() {
  601. const element = document.querySelector("body[data-csrf-token]");
  602. if (element !== null) {
  603. return element.dataset.csrfToken;
  604. }
  605. return "";
  606. }