less copy protection, more size visualization
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
 
 
 

782 行
23 KiB

  1. let selected = null;
  2. let selectedEntity = null;
  3. let entityIndex = 0;
  4. let clicked = null;
  5. let dragging = false;
  6. let clickTimeout = null;
  7. let dragOffsetX = null;
  8. let dragOffsetY = null;
  9. let altHeld = false;
  10. const unitChoices = {
  11. length: [
  12. "meters",
  13. "kilometers",
  14. "feet",
  15. "miles",
  16. ],
  17. area: [
  18. "cm^2",
  19. "meters^2"
  20. ],
  21. mass: [
  22. "kilograms"
  23. ]
  24. }
  25. const config = {
  26. height: math.unit(1500, "meters"),
  27. minLineSize: 50,
  28. maxLineSize: 250,
  29. autoFit: false
  30. }
  31. const availableEntities = {
  32. }
  33. const entities = {
  34. }
  35. function constrainRel(coords) {
  36. return {
  37. x: Math.min(Math.max(coords.x, 0), 1),
  38. y: Math.min(Math.max(coords.y, 0), 1)
  39. }
  40. }
  41. function snapRel(coords) {
  42. return constrainRel({
  43. x: coords.x,
  44. y: altHeld ? coords.y : (Math.abs(coords.y - 1) < 0.05 ? 1 : coords.y)
  45. });
  46. }
  47. function adjustAbs(coords, oldHeight, newHeight) {
  48. return { x: coords.x, y: 1 + (coords.y - 1) * math.divide(oldHeight, newHeight) };
  49. }
  50. function rel2abs(coords) {
  51. const canvasWidth = document.querySelector("#display").clientWidth - 100;
  52. const canvasHeight = document.querySelector("#display").clientHeight - 50;
  53. return { x: coords.x * canvasWidth + 50, y: coords.y * canvasHeight };
  54. }
  55. function abs2rel(coords) {
  56. const canvasWidth = document.querySelector("#display").clientWidth - 100;
  57. const canvasHeight = document.querySelector("#display").clientHeight - 50;
  58. return { x: (coords.x - 50) / canvasWidth, y: coords.y / canvasHeight };
  59. }
  60. function updateEntityElement(entity, element) {
  61. const position = rel2abs({ x: element.dataset.x, y: element.dataset.y });
  62. const view = element.dataset.view;
  63. element.style.left = position.x + "px";
  64. element.style.top = position.y + "px";
  65. const canvasHeight = document.querySelector("#display").clientHeight;
  66. const pixels = math.divide(entity.views[view].height, config.height) * (canvasHeight - 100);
  67. element.style.setProperty("--height", pixels + "px");
  68. element.querySelector(".entity-name").innerText = entity.name;
  69. const bottomName = document.querySelector("#bottom-name-" + element.dataset.key);
  70. let entX = document.querySelector("#entities").getBoundingClientRect().x;
  71. bottomName.style.left = position.x + entX + "px";
  72. bottomName.style.top = "95vh";
  73. bottomName.innerText = entity.name;
  74. }
  75. function updateSizes() {
  76. drawScale();
  77. Object.entries(entities).forEach(([key, entity]) => {
  78. const element = document.querySelector("#entity-" + key);
  79. updateEntityElement(entity, element);
  80. });
  81. }
  82. function drawScale() {
  83. function drawTicks(/** @type {CanvasRenderingContext2D} */ ctx, pixelsPer, heightPer) {
  84. let total = heightPer.clone();
  85. total.value = 0;
  86. for (let y = ctx.canvas.clientHeight - 50; y >= 50; y -= pixelsPer) {
  87. drawTick(ctx, 50, y, total);
  88. total = math.add(total, heightPer);
  89. }
  90. }
  91. function drawTick(/** @type {CanvasRenderingContext2D} */ ctx, x, y, value) {
  92. const oldStroke = ctx.strokeStyle;
  93. const oldFill = ctx.fillStyle;
  94. ctx.beginPath();
  95. ctx.moveTo(x, y);
  96. ctx.lineTo(x + 20, y);
  97. ctx.strokeStyle = "#000000";
  98. ctx.stroke();
  99. ctx.beginPath();
  100. ctx.moveTo(x + 20, y);
  101. ctx.lineTo(ctx.canvas.clientWidth - 70, y);
  102. ctx.strokeStyle = "#aaaaaa";
  103. ctx.stroke();
  104. ctx.beginPath();
  105. ctx.moveTo(ctx.canvas.clientWidth - 70, y);
  106. ctx.lineTo(ctx.canvas.clientWidth - 50, y);
  107. ctx.strokeStyle = "#000000";
  108. ctx.stroke();
  109. const oldFont = ctx.font;
  110. ctx.font = 'normal 24pt coda';
  111. ctx.fillStyle = "#dddddd";
  112. ctx.beginPath();
  113. ctx.fillText(value.format({ precision: 3 }), x + 20, y + 35);
  114. ctx.font = oldFont;
  115. ctx.strokeStyle = oldStroke;
  116. ctx.fillStyle = oldFill;
  117. }
  118. const canvas = document.querySelector("#display");
  119. /** @type {CanvasRenderingContext2D} */
  120. const ctx = canvas.getContext("2d");
  121. let pixelsPer = (ctx.canvas.clientHeight - 100) / config.height.value;
  122. let heightPer = config.height.clone();
  123. heightPer.value = 1;
  124. if (pixelsPer < config.minLineSize) {
  125. heightPer.value /= pixelsPer / config.minLineSize;
  126. pixelsPer = config.minLineSize;
  127. }
  128. if (pixelsPer > config.maxLineSize) {
  129. heightPer.value /= pixelsPer / config.maxLineSize;
  130. pixelsPer = config.maxLineSize;
  131. }
  132. ctx.clearRect(0, 0, canvas.width, canvas.height);
  133. ctx.scale(1, 1);
  134. ctx.canvas.width = canvas.clientWidth;
  135. ctx.canvas.height = canvas.clientHeight;
  136. ctx.beginPath();
  137. ctx.moveTo(50, 50);
  138. ctx.lineTo(50, ctx.canvas.clientHeight - 50);
  139. ctx.stroke();
  140. ctx.beginPath();
  141. ctx.moveTo(ctx.canvas.clientWidth - 50, 50);
  142. ctx.lineTo(ctx.canvas.clientWidth - 50, ctx.canvas.clientHeight - 50);
  143. ctx.stroke();
  144. drawTicks(ctx, pixelsPer, heightPer);
  145. }
  146. function makeEntity(name, author, views) {
  147. const entityTemplate = {
  148. name: name,
  149. author: author,
  150. scale: 1,
  151. views: views,
  152. init: function () {
  153. Object.entries(this.views).forEach(([viewKey, view]) => {
  154. view.parent = this;
  155. if (this.defaultView === undefined) {
  156. this.defaultView = viewKey;
  157. }
  158. Object.entries(view.attributes).forEach(([key, val]) => {
  159. Object.defineProperty(
  160. view,
  161. key,
  162. {
  163. get: function () {
  164. return math.multiply(Math.pow(this.parent.scale, this.attributes[key].power), this.attributes[key].base);
  165. },
  166. set: function (value) {
  167. const newScale = Math.pow(math.divide(value, this.attributes[key].base), 1 / this.attributes[key].power);
  168. this.parent.scale = newScale;
  169. }
  170. }
  171. )
  172. });
  173. });
  174. delete this.init;
  175. return this;
  176. }
  177. }.init();
  178. return entityTemplate;
  179. }
  180. function clickDown(target, x, y) {
  181. clicked = target;
  182. const rect = target.getBoundingClientRect();
  183. let entX = document.querySelector("#entities").getBoundingClientRect().x;
  184. let entY = document.querySelector("#entities").getBoundingClientRect().y;
  185. dragOffsetX = x - rect.left + entX;
  186. dragOffsetY = y - rect.top + entY;
  187. clickTimeout = setTimeout(() => { dragging = true }, 200)
  188. }
  189. // could we make this actually detect the menu area?
  190. function hoveringInDeleteArea(e) {
  191. return e.clientY < document.body.clientHeight / 10;
  192. }
  193. function clickUp(e) {
  194. clearTimeout(clickTimeout);
  195. if (clicked) {
  196. if (dragging) {
  197. dragging = false;
  198. if (hoveringInDeleteArea(e)) {
  199. removeEntity(clicked);
  200. document.querySelector("#menubar").classList.remove("hover-delete");
  201. }
  202. } else {
  203. select(clicked);
  204. }
  205. clicked = null;
  206. }
  207. }
  208. function deselect() {
  209. if (selected) {
  210. selected.classList.remove("selected");
  211. }
  212. selected = null;
  213. clearViewList();
  214. clearEntityOptions();
  215. clearViewOptions();
  216. }
  217. function select(target) {
  218. deselect();
  219. selected = target;
  220. selectedEntity = entities[target.dataset.key];
  221. selected.classList.add("selected");
  222. configViewList(selectedEntity, target.dataset.view);
  223. configEntityOptions(selectedEntity, target.dataset.view);
  224. configViewOptions(selectedEntity, target.dataset.view);
  225. }
  226. function configViewList(entity, selectedView) {
  227. const list = document.querySelector("#entity-view");
  228. list.innerHTML = "";
  229. list.style.display = "block";
  230. Object.keys(entity.views).forEach(view => {
  231. const option = document.createElement("option");
  232. option.innerText = entity.views[view].name;
  233. option.value = view;
  234. if (view === selectedView) {
  235. option.selected = true;
  236. }
  237. list.appendChild(option);
  238. });
  239. }
  240. function clearViewList() {
  241. const list = document.querySelector("#entity-view");
  242. list.innerHTML = "";
  243. list.style.display = "none";
  244. }
  245. function updateWorldOptions(entity, view) {
  246. const heightInput = document.querySelector("#options-height-value");
  247. const heightSelect = document.querySelector("#options-height-unit");
  248. const converted = config.height.to(heightSelect.value);
  249. heightInput.value = math.round(converted.value, 3);
  250. }
  251. function configEntityOptions(entity, view) {
  252. const holder = document.querySelector("#options-entity");
  253. holder.innerHTML = "";
  254. const scaleLabel = document.createElement("div");
  255. scaleLabel.classList.add("options-label");
  256. scaleLabel.innerText = "Scale";
  257. const scaleRow = document.createElement("div");
  258. scaleRow.classList.add("options-row");
  259. const scaleInput = document.createElement("input");
  260. scaleInput.classList.add("options-field-numeric");
  261. scaleInput.id = "options-entity-scale";
  262. scaleInput.addEventListener("input", e => {
  263. entity.scale = e.target.value;
  264. if (config.autoFit) {
  265. fitWorld();
  266. }
  267. updateSizes();
  268. updateEntityOptions(entity, view);
  269. updateViewOptions(entity, view);
  270. });
  271. scaleInput.setAttribute("min", 1);
  272. scaleInput.setAttribute("type", "number");
  273. scaleInput.value = entity.scale;
  274. scaleRow.appendChild(scaleInput);
  275. holder.appendChild(scaleLabel);
  276. holder.appendChild(scaleRow);
  277. const nameLabel = document.createElement("div");
  278. nameLabel.classList.add("options-label");
  279. nameLabel.innerText = "Name";
  280. const nameRow = document.createElement("div");
  281. nameRow.classList.add("options-row");
  282. const nameInput = document.createElement("input");
  283. nameInput.classList.add("options-field-text");
  284. nameInput.value = entity.name;
  285. nameInput.addEventListener("input", e => {
  286. entity.name = e.target.value;
  287. updateSizes();
  288. })
  289. nameRow.appendChild(nameInput);
  290. holder.appendChild(nameLabel);
  291. holder.appendChild(nameRow);
  292. }
  293. function updateEntityOptions(entity, view) {
  294. const scaleInput = document.querySelector("#options-entity-scale");
  295. scaleInput.value = entity.scale;
  296. }
  297. function clearEntityOptions() {
  298. const holder = document.querySelector("#options-entity");
  299. holder.innerHTML = "";
  300. }
  301. function configViewOptions(entity, view) {
  302. const holder = document.querySelector("#options-view");
  303. holder.innerHTML = "";
  304. Object.entries(entity.views[view].attributes).forEach(([key, val]) => {
  305. const label = document.createElement("div");
  306. label.classList.add("options-label");
  307. label.innerText = val.name;
  308. holder.appendChild(label);
  309. const row = document.createElement("div");
  310. row.classList.add("options-row");
  311. holder.appendChild(row);
  312. const input = document.createElement("input");
  313. input.classList.add("options-field-numeric");
  314. input.id = "options-view-" + key + "-input";
  315. input.setAttribute("type", "number");
  316. input.setAttribute("min", 1);
  317. input.value = entity.views[view][key].value;
  318. const select = document.createElement("select");
  319. select.id = "options-view-" + key + "-select"
  320. unitChoices[val.type].forEach(name => {
  321. const option = document.createElement("option");
  322. option.innerText = name;
  323. select.appendChild(option);
  324. });
  325. input.addEventListener("input", e => {
  326. entity.views[view][key] = math.unit(input.value, select.value);
  327. if (config.autoFit) {
  328. fitWorld();
  329. }
  330. updateSizes();
  331. updateEntityOptions(entity, view);
  332. updateViewOptions(entity, view, key);
  333. });
  334. select.addEventListener("input", e => {
  335. entity.views[view][key] = math.unit(input.value, select.value);
  336. if (config.autoFit) {
  337. fitWorld();
  338. }
  339. updateSizes();
  340. updateEntityOptions(entity, view);
  341. updateViewOptions(entity, view, key);
  342. });
  343. row.appendChild(input);
  344. row.appendChild(select);
  345. });
  346. }
  347. function updateViewOptions(entity, view, changed) {
  348. Object.entries(entity.views[view].attributes).forEach(([key, val]) => {
  349. if (key != changed) {
  350. const input = document.querySelector("#options-view-" + key + "-input");
  351. const select = document.querySelector("#options-view-" + key + "-select");
  352. const currentUnit = select.value;
  353. const convertedAmount = entity.views[view][key].to(currentUnit);
  354. input.value = math.round(convertedAmount.value, 5);
  355. }
  356. });
  357. }
  358. function clearViewOptions() {
  359. const holder = document.querySelector("#options-view");
  360. holder.innerHTML = "";
  361. }
  362. // this is a crime against humanity, and also stolen from
  363. // stack overflow
  364. // https://stackoverflow.com/questions/38487569/click-through-png-image-only-if-clicked-coordinate-is-transparent
  365. const testCanvas = document.createElement("canvas");
  366. testCanvas.id = "test-canvas";
  367. const testCtx = testCanvas.getContext("2d");
  368. function testClick(event) {
  369. const target = event.target;
  370. // Get click coordinates
  371. var x = event.clientX - target.getBoundingClientRect().x,
  372. y = event.clientY - target.getBoundingClientRect().y,
  373. w = testCtx.canvas.width = target.width,
  374. h = testCtx.canvas.height = target.height,
  375. alpha;
  376. // Draw image to canvas
  377. // and read Alpha channel value
  378. testCtx.drawImage(target, 0, 0, w, h);
  379. alpha = testCtx.getImageData(x, y, 1, 1).data[3]; // [0]R [1]G [2]B [3]A
  380. // If pixel is transparent,
  381. // retrieve the element underneath and trigger it's click event
  382. if (alpha === 0) {
  383. const oldDisplay = target.style.display;
  384. target.style.display = "none";
  385. const newTarget = document.elementFromPoint(event.clientX, event.clientY);
  386. newTarget.dispatchEvent(new MouseEvent(event.type, {
  387. "clientX": event.clientX,
  388. "clientY": event.clientY
  389. }));
  390. target.style.display = oldDisplay;
  391. } else {
  392. clickDown(target.parentElement, event.clientX, event.clientY);
  393. }
  394. }
  395. function arrangeEntities(order) {
  396. let x = 0.1;
  397. order.forEach(key => {
  398. document.querySelector("#entity-" + key).dataset.x = x;
  399. x += 0.8 / order.length
  400. });
  401. updateSizes();
  402. }
  403. function removeAllEntities() {
  404. Object.keys(entities).forEach(key => {
  405. removeEntity(document.querySelector("#entity-" + key));
  406. });
  407. }
  408. function removeEntity(element) {
  409. delete entities[element.dataset.key];
  410. const bottomName = document.querySelector("#bottom-name-" + element.dataset.key);
  411. bottomName.parentElement.removeChild(bottomName);
  412. element.parentElement.removeChild(element);
  413. }
  414. function displayEntity(entity, view, x, y) {
  415. const box = document.createElement("div");
  416. box.classList.add("entity-box");
  417. const img = document.createElement("img");
  418. img.classList.add("entity-image");
  419. const nameTag = document.createElement("div");
  420. nameTag.classList.add("entity-name");
  421. nameTag.innerText = entity.name;
  422. box.appendChild(img);
  423. box.appendChild(nameTag);
  424. const image = entity.views[view].image;
  425. img.src = image.source;
  426. if (image.bottom) {
  427. img.style.setProperty("--offset", ((-1 + image.bottom) * 100) + "%")
  428. }
  429. box.dataset.x = x;
  430. box.dataset.y = y;
  431. img.addEventListener("mousedown", e => { testClick(e); e.stopPropagation() });
  432. img.addEventListener("touchstart", e => {
  433. const fakeEvent = {
  434. target: e.target,
  435. clientX: e.touches[0].clientX,
  436. clientY: e.touches[0].clientY
  437. };
  438. testClick(fakeEvent);
  439. });
  440. box.id = "entity-" + entityIndex;
  441. box.dataset.key = entityIndex;
  442. box.dataset.view = view;
  443. entities[entityIndex] = entity;
  444. entity.index = entityIndex;
  445. const world = document.querySelector("#entities");
  446. world.appendChild(box);
  447. const bottomName = document.createElement("div");
  448. bottomName.classList.add("bottom-name");
  449. bottomName.id = "bottom-name-" + entityIndex;
  450. bottomName.innerText = entity.name;
  451. bottomName.addEventListener("click", () => select(box));
  452. world.appendChild(bottomName);
  453. entityIndex += 1;
  454. updateEntityElement(entity, box);
  455. if (config.autoFit) {
  456. fitWorld();
  457. }
  458. }
  459. document.addEventListener("DOMContentLoaded", () => {
  460. const stuff = [makeFen].concat(makeBuildings().map(x => x.constructor))
  461. let x = 0.2;
  462. stuff.forEach(entity => {
  463. displayEntity(entity(), entity().defaultView, x, 1);
  464. x += 0.7 / stuff.length;
  465. })
  466. window.addEventListener("wheel", e => {
  467. const dir = e.deltaY < 0 ? 0.9 : 1.1;
  468. config.height = math.multiply(config.height, dir);
  469. updateSizes();
  470. updateWorldOptions();
  471. })
  472. document.querySelector("body").appendChild(testCtx.canvas);
  473. updateSizes();
  474. document.querySelector("#options-height-value").addEventListener("input", e => {
  475. updateWorldHeight();
  476. })
  477. document.querySelector("#options-height-unit").addEventListener("input", e => {
  478. updateWorldHeight();
  479. })
  480. world.addEventListener("mousedown", e => deselect());
  481. document.addEventListener("mouseup", e => clickUp(e));
  482. document.addEventListener("touchend", e => {
  483. const fakeEvent = {
  484. target: e.target,
  485. clientX: e.changedTouches[0].clientX,
  486. clientY: e.changedTouches[0].clientY
  487. };
  488. clickUp(fakeEvent);
  489. });
  490. document.querySelector("#entity-view").addEventListener("input", e => {
  491. selected.dataset.view = e.target.value
  492. const image = entities[selected.dataset.key].views[e.target.value].image
  493. selected.querySelector(".entity-image").src = image.source;
  494. if (image.bottom) {
  495. selected.querySelector(".entity-image").style.setProperty("--offset", ((-1 + image.bottom) * 100) + "%")
  496. }
  497. updateSizes();
  498. updateEntityOptions(entities[selected.dataset.key], e.target.value);
  499. updateViewOptions(entities[selected.dataset.key], e.target.value);
  500. });
  501. clearViewList();
  502. document.querySelector("#menu-clear").addEventListener("click", e => {
  503. removeAllEntities();
  504. });
  505. document.querySelector("#menu-order-height").addEventListener("click", e => {
  506. const order = Object.keys(entities).sort((a, b) => {
  507. const entA = entities[a];
  508. const entB = entities[b];
  509. const viewA = document.querySelector("#entity-" + a).dataset.view;
  510. const viewB = document.querySelector("#entity-" + b).dataset.view;
  511. const heightA = entA.views[viewA].height.to("meter").value;
  512. const heightB = entB.views[viewB].height.to("meter").value;
  513. return heightA - heightB;
  514. });
  515. arrangeEntities(order);
  516. });
  517. document.querySelector("#options-world-fit").addEventListener("click", fitWorld);
  518. document.querySelector("#options-world-autofit").addEventListener("input", e => {
  519. config.autoFit = e.target.value;
  520. if (config.autoFit) {
  521. fitWorld();
  522. }
  523. });
  524. document.addEventListener("keydown", e => {
  525. console.log(e)
  526. if (e.key == "Delete" || e.key == "Backspace") {
  527. if (selected) {
  528. removeEntity(selected);
  529. selected = null;
  530. }
  531. }
  532. })
  533. prepareEntities();
  534. });
  535. function prepareEntities() {
  536. availableEntities["buildings"] = makeBuildings();
  537. availableEntities["characters"] = makeCharacters();
  538. const holder = document.querySelector("#spawners");
  539. Object.entries(availableEntities).forEach(([category, entityList]) => {
  540. const select = document.createElement("select");
  541. select.id = "create-entity-" + category;
  542. for (let i = 0; i < entityList.length; i++) {
  543. const entity = entityList[i];
  544. const option = document.createElement("option");
  545. option.value = i;
  546. option.innerText = entity.name;
  547. select.appendChild(option);
  548. };
  549. const button = document.createElement("button");
  550. button.innerText = "Create " + category;
  551. button.addEventListener("click", e => {
  552. const newEntity = entityList[select.value].constructor()
  553. displayEntity(newEntity, newEntity.defaultView, 0.5, 1);
  554. });
  555. holder.appendChild(select);
  556. holder.appendChild(button);
  557. });
  558. }
  559. window.addEventListener("resize", () => {
  560. updateSizes();
  561. })
  562. document.addEventListener("mousemove", (e) => {
  563. if (clicked) {
  564. const position = snapRel(abs2rel({ x: e.clientX - dragOffsetX, y: e.clientY - dragOffsetY }));
  565. clicked.dataset.x = position.x;
  566. clicked.dataset.y = position.y;
  567. updateEntityElement(entities[clicked.dataset.key], clicked);
  568. if (hoveringInDeleteArea(e)) {
  569. document.querySelector("#menubar").classList.add("hover-delete");
  570. } else {
  571. document.querySelector("#menubar").classList.remove("hover-delete");
  572. }
  573. }
  574. });
  575. document.addEventListener("touchmove", (e) => {
  576. if (clicked) {
  577. e.preventDefault();
  578. let x = e.touches[0].clientX;
  579. let y = e.touches[0].clientY;
  580. const position = snapRel(abs2rel({ x: x - dragOffsetX, y: y - dragOffsetY }));
  581. clicked.dataset.x = position.x;
  582. clicked.dataset.y = position.y;
  583. updateEntityElement(entities[clicked.dataset.key], clicked);
  584. // what a hack
  585. // I should centralize this 'fake event' creation...
  586. if (hoveringInDeleteArea({ clientY: y })) {
  587. document.querySelector("#menubar").classList.add("hover-delete");
  588. } else {
  589. document.querySelector("#menubar").classList.remove("hover-delete");
  590. }
  591. }
  592. }, { passive: false });
  593. function fitWorld() {
  594. let max = math.unit(0, "meter");
  595. Object.entries(entities).forEach(([key, entity]) => {
  596. const view = document.querySelector("#entity-" + key).dataset.view;
  597. max = math.max(max, entity.views[view].height);
  598. });
  599. setWorldHeight(config.height, math.multiply(max, 1.1));
  600. }
  601. function updateWorldHeight() {
  602. const value = Math.max(1, document.querySelector("#options-height-value").value);
  603. const unit = document.querySelector("#options-height-unit").value;
  604. const oldHeight = config.height;
  605. setWorldHeight(oldHeight, math.unit(value, unit));
  606. }
  607. function setWorldHeight(oldHeight, newHeight) {
  608. config.height = newHeight;
  609. Object.entries(entities).forEach(([key, entity]) => {
  610. const element = document.querySelector("#entity-" + key);
  611. const newPosition = adjustAbs({ x: element.dataset.x, y: element.dataset.y }, oldHeight, config.height);
  612. element.dataset.x = newPosition.x;
  613. element.dataset.y = newPosition.y;
  614. });
  615. updateSizes();
  616. }