timothy@apple.com | 27b08c9 | 2013-06-11 19:16:26 +0000 | [diff] [blame] | 1 | /* |
burg@cs.washington.edu | 53f4d96 | 2015-08-05 18:12:35 +0000 | [diff] [blame] | 2 | * Copyright (C) 2010, 2013-2015 Apple Inc. All rights reserved. |
timothy@apple.com | 27b08c9 | 2013-06-11 19:16:26 +0000 | [diff] [blame] | 3 | * |
| 4 | * Redistribution and use in source and binary forms, with or without |
| 5 | * modification, are permitted provided that the following conditions |
| 6 | * are met: |
| 7 | * 1. Redistributions of source code must retain the above copyright |
| 8 | * notice, this list of conditions and the following disclaimer. |
| 9 | * 2. Redistributions in binary form must reproduce the above copyright |
| 10 | * notice, this list of conditions and the following disclaimer in the |
| 11 | * documentation and/or other materials provided with the distribution. |
| 12 | * |
| 13 | * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' |
| 14 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, |
| 15 | * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR |
| 16 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS |
| 17 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR |
| 18 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF |
| 19 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS |
| 20 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN |
| 21 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) |
| 22 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF |
| 23 | * THE POSSIBILITY OF SUCH DAMAGE. |
| 24 | */ |
| 25 | |
drousso@apple.com | 0b21e4c | 2017-08-02 03:09:57 +0000 | [diff] [blame] | 26 | WI.ApplicationCacheFrameContentView = class ApplicationCacheFrameContentView extends WI.ContentView |
timothy@apple.com | 27b08c9 | 2013-06-11 19:16:26 +0000 | [diff] [blame] | 27 | { |
burg@cs.washington.edu | 53f4d96 | 2015-08-05 18:12:35 +0000 | [diff] [blame] | 28 | constructor(representedObject) |
| 29 | { |
drousso@apple.com | 0b21e4c | 2017-08-02 03:09:57 +0000 | [diff] [blame] | 30 | console.assert(representedObject instanceof WI.ApplicationCacheFrame); |
timothy@apple.com | 27b08c9 | 2013-06-11 19:16:26 +0000 | [diff] [blame] | 31 | |
burg@cs.washington.edu | 53f4d96 | 2015-08-05 18:12:35 +0000 | [diff] [blame] | 32 | super(representedObject); |
timothy@apple.com | 27b08c9 | 2013-06-11 19:16:26 +0000 | [diff] [blame] | 33 | |
commit-queue@webkit.org | 03e2068 | 2016-03-08 23:02:55 +0000 | [diff] [blame] | 34 | this.element.classList.add("application-cache-frame"); |
timothy@apple.com | 27b08c9 | 2013-06-11 19:16:26 +0000 | [diff] [blame] | 35 | |
burg@cs.washington.edu | 53f4d96 | 2015-08-05 18:12:35 +0000 | [diff] [blame] | 36 | this._frame = representedObject.frame; |
timothy@apple.com | 27b08c9 | 2013-06-11 19:16:26 +0000 | [diff] [blame] | 37 | |
drousso@apple.com | 0b21e4c | 2017-08-02 03:09:57 +0000 | [diff] [blame] | 38 | this._emptyView = WI.createMessageTextView(WI.UIString("No Application Cache information available"), false); |
burg@cs.washington.edu | 53f4d96 | 2015-08-05 18:12:35 +0000 | [diff] [blame] | 39 | this._emptyView.classList.add("hidden"); |
| 40 | this.element.appendChild(this._emptyView); |
timothy@apple.com | 27b08c9 | 2013-06-11 19:16:26 +0000 | [diff] [blame] | 41 | |
burg@cs.washington.edu | 53f4d96 | 2015-08-05 18:12:35 +0000 | [diff] [blame] | 42 | this._markDirty(); |
commit-queue@webkit.org | 10c778d | 2013-10-10 23:20:56 +0000 | [diff] [blame] | 43 | |
burg@cs.washington.edu | 53f4d96 | 2015-08-05 18:12:35 +0000 | [diff] [blame] | 44 | var status = representedObject.status; |
| 45 | this.updateStatus(status); |
timothy@apple.com | 27b08c9 | 2013-06-11 19:16:26 +0000 | [diff] [blame] | 46 | |
drousso@apple.com | 0b21e4c | 2017-08-02 03:09:57 +0000 | [diff] [blame] | 47 | WI.applicationCacheManager.addEventListener(WI.ApplicationCacheManager.Event.FrameManifestStatusChanged, this._updateStatus, this); |
burg@cs.washington.edu | 53f4d96 | 2015-08-05 18:12:35 +0000 | [diff] [blame] | 48 | } |
timothy@apple.com | 27b08c9 | 2013-06-11 19:16:26 +0000 | [diff] [blame] | 49 | |
burg@cs.washington.edu | 53f4d96 | 2015-08-05 18:12:35 +0000 | [diff] [blame] | 50 | shown() |
timothy@apple.com | 27b08c9 | 2013-06-11 19:16:26 +0000 | [diff] [blame] | 51 | { |
commit-queue@webkit.org | 46dbc44 | 2016-10-29 01:17:43 +0000 | [diff] [blame] | 52 | super.shown(); |
| 53 | |
timothy@apple.com | 27b08c9 | 2013-06-11 19:16:26 +0000 | [diff] [blame] | 54 | this._maybeUpdate(); |
burg@cs.washington.edu | 53f4d96 | 2015-08-05 18:12:35 +0000 | [diff] [blame] | 55 | } |
timothy@apple.com | 27b08c9 | 2013-06-11 19:16:26 +0000 | [diff] [blame] | 56 | |
burg@cs.washington.edu | 53f4d96 | 2015-08-05 18:12:35 +0000 | [diff] [blame] | 57 | closed() |
timothy@apple.com | 27b08c9 | 2013-06-11 19:16:26 +0000 | [diff] [blame] | 58 | { |
drousso@apple.com | 0b21e4c | 2017-08-02 03:09:57 +0000 | [diff] [blame] | 59 | WI.applicationCacheManager.removeEventListener(null, null, this); |
commit-queue@webkit.org | 46dbc44 | 2016-10-29 01:17:43 +0000 | [diff] [blame] | 60 | |
| 61 | super.closed(); |
burg@cs.washington.edu | 53f4d96 | 2015-08-05 18:12:35 +0000 | [diff] [blame] | 62 | } |
timothy@apple.com | 27b08c9 | 2013-06-11 19:16:26 +0000 | [diff] [blame] | 63 | |
burg@cs.washington.edu | 53f4d96 | 2015-08-05 18:12:35 +0000 | [diff] [blame] | 64 | saveToCookie(cookie) |
commit-queue@webkit.org | 10c778d | 2013-10-10 23:20:56 +0000 | [diff] [blame] | 65 | { |
drousso@apple.com | 0b21e4c | 2017-08-02 03:09:57 +0000 | [diff] [blame] | 66 | cookie.type = WI.ContentViewCookieType.ApplicationCache; |
commit-queue@webkit.org | 10c778d | 2013-10-10 23:20:56 +0000 | [diff] [blame] | 67 | cookie.frame = this.representedObject.frame.url; |
| 68 | cookie.manifest = this.representedObject.manifest.manifestURL; |
burg@cs.washington.edu | 53f4d96 | 2015-08-05 18:12:35 +0000 | [diff] [blame] | 69 | } |
commit-queue@webkit.org | 10c778d | 2013-10-10 23:20:56 +0000 | [diff] [blame] | 70 | |
timothy@apple.com | 27b08c9 | 2013-06-11 19:16:26 +0000 | [diff] [blame] | 71 | get scrollableElements() |
| 72 | { |
| 73 | if (!this._dataGrid) |
| 74 | return []; |
| 75 | return [this._dataGrid.scrollContainer]; |
burg@cs.washington.edu | 53f4d96 | 2015-08-05 18:12:35 +0000 | [diff] [blame] | 76 | } |
timothy@apple.com | 27b08c9 | 2013-06-11 19:16:26 +0000 | [diff] [blame] | 77 | |
burg@cs.washington.edu | 53f4d96 | 2015-08-05 18:12:35 +0000 | [diff] [blame] | 78 | _maybeUpdate() |
timothy@apple.com | 27b08c9 | 2013-06-11 19:16:26 +0000 | [diff] [blame] | 79 | { |
| 80 | if (!this.visible || !this._viewDirty) |
| 81 | return; |
commit-queue@webkit.org | 10c778d | 2013-10-10 23:20:56 +0000 | [diff] [blame] | 82 | |
timothy@apple.com | 27b08c9 | 2013-06-11 19:16:26 +0000 | [diff] [blame] | 83 | this._update(); |
| 84 | this._viewDirty = false; |
burg@cs.washington.edu | 53f4d96 | 2015-08-05 18:12:35 +0000 | [diff] [blame] | 85 | } |
timothy@apple.com | 27b08c9 | 2013-06-11 19:16:26 +0000 | [diff] [blame] | 86 | |
burg@cs.washington.edu | 53f4d96 | 2015-08-05 18:12:35 +0000 | [diff] [blame] | 87 | _markDirty() |
timothy@apple.com | 27b08c9 | 2013-06-11 19:16:26 +0000 | [diff] [blame] | 88 | { |
| 89 | this._viewDirty = true; |
burg@cs.washington.edu | 53f4d96 | 2015-08-05 18:12:35 +0000 | [diff] [blame] | 90 | } |
timothy@apple.com | 27b08c9 | 2013-06-11 19:16:26 +0000 | [diff] [blame] | 91 | |
burg@cs.washington.edu | 53f4d96 | 2015-08-05 18:12:35 +0000 | [diff] [blame] | 92 | _updateStatus(event) |
timothy@apple.com | 27b08c9 | 2013-06-11 19:16:26 +0000 | [diff] [blame] | 93 | { |
| 94 | var frameManifest = event.data.frameManifest; |
| 95 | if (frameManifest !== this.representedObject) |
| 96 | return; |
commit-queue@webkit.org | 10c778d | 2013-10-10 23:20:56 +0000 | [diff] [blame] | 97 | |
drousso@apple.com | 0b21e4c | 2017-08-02 03:09:57 +0000 | [diff] [blame] | 98 | console.assert(frameManifest instanceof WI.ApplicationCacheFrame); |
commit-queue@webkit.org | 10c778d | 2013-10-10 23:20:56 +0000 | [diff] [blame] | 99 | |
timothy@apple.com | 27b08c9 | 2013-06-11 19:16:26 +0000 | [diff] [blame] | 100 | this.updateStatus(frameManifest.status); |
burg@cs.washington.edu | 53f4d96 | 2015-08-05 18:12:35 +0000 | [diff] [blame] | 101 | } |
timothy@apple.com | 27b08c9 | 2013-06-11 19:16:26 +0000 | [diff] [blame] | 102 | |
burg@cs.washington.edu | 53f4d96 | 2015-08-05 18:12:35 +0000 | [diff] [blame] | 103 | updateStatus(status) |
timothy@apple.com | 27b08c9 | 2013-06-11 19:16:26 +0000 | [diff] [blame] | 104 | { |
| 105 | var oldStatus = this._status; |
| 106 | this._status = status; |
commit-queue@webkit.org | 10c778d | 2013-10-10 23:20:56 +0000 | [diff] [blame] | 107 | |
drousso@apple.com | 0b21e4c | 2017-08-02 03:09:57 +0000 | [diff] [blame] | 108 | if (this.visible && this._status === WI.ApplicationCacheManager.Status.Idle && (oldStatus === WI.ApplicationCacheManager.Status.UpdateReady || !this._resources)) |
timothy@apple.com | 27b08c9 | 2013-06-11 19:16:26 +0000 | [diff] [blame] | 109 | this._markDirty(); |
| 110 | |
| 111 | this._maybeUpdate(); |
burg@cs.washington.edu | 53f4d96 | 2015-08-05 18:12:35 +0000 | [diff] [blame] | 112 | } |
timothy@apple.com | 27b08c9 | 2013-06-11 19:16:26 +0000 | [diff] [blame] | 113 | |
burg@cs.washington.edu | 53f4d96 | 2015-08-05 18:12:35 +0000 | [diff] [blame] | 114 | _update() |
timothy@apple.com | 27b08c9 | 2013-06-11 19:16:26 +0000 | [diff] [blame] | 115 | { |
drousso@apple.com | 0b21e4c | 2017-08-02 03:09:57 +0000 | [diff] [blame] | 116 | WI.applicationCacheManager.requestApplicationCache(this._frame, this._updateCallback.bind(this)); |
burg@cs.washington.edu | 53f4d96 | 2015-08-05 18:12:35 +0000 | [diff] [blame] | 117 | } |
timothy@apple.com | 27b08c9 | 2013-06-11 19:16:26 +0000 | [diff] [blame] | 118 | |
burg@cs.washington.edu | 53f4d96 | 2015-08-05 18:12:35 +0000 | [diff] [blame] | 119 | _updateCallback(applicationCache) |
timothy@apple.com | 27b08c9 | 2013-06-11 19:16:26 +0000 | [diff] [blame] | 120 | { |
| 121 | if (!applicationCache || !applicationCache.manifestURL) { |
| 122 | delete this._manifest; |
| 123 | delete this._creationTime; |
| 124 | delete this._updateTime; |
| 125 | delete this._size; |
| 126 | delete this._resources; |
commit-queue@webkit.org | 10c778d | 2013-10-10 23:20:56 +0000 | [diff] [blame] | 127 | |
timothy@apple.com | 27b08c9 | 2013-06-11 19:16:26 +0000 | [diff] [blame] | 128 | this._emptyView.classList.remove("hidden"); |
commit-queue@webkit.org | 10c778d | 2013-10-10 23:20:56 +0000 | [diff] [blame] | 129 | |
timothy@apple.com | 27b08c9 | 2013-06-11 19:16:26 +0000 | [diff] [blame] | 130 | if (this._dataGrid) |
| 131 | this._dataGrid.element.classList.add("hidden"); |
| 132 | return; |
| 133 | } |
| 134 | |
| 135 | // FIXME: are these variables needed anywhere else? |
| 136 | this._manifest = applicationCache.manifestURL; |
| 137 | this._creationTime = applicationCache.creationTime; |
| 138 | this._updateTime = applicationCache.updateTime; |
| 139 | this._size = applicationCache.size; |
| 140 | this._resources = applicationCache.resources; |
| 141 | |
| 142 | if (!this._dataGrid) |
| 143 | this._createDataGrid(); |
| 144 | |
| 145 | this._populateDataGrid(); |
| 146 | this._dataGrid.autoSizeColumns(20, 80); |
| 147 | this._dataGrid.element.classList.remove("hidden"); |
commit-queue@webkit.org | 10c778d | 2013-10-10 23:20:56 +0000 | [diff] [blame] | 148 | |
timothy@apple.com | 27b08c9 | 2013-06-11 19:16:26 +0000 | [diff] [blame] | 149 | this._emptyView.classList.add("hidden"); |
burg@cs.washington.edu | 53f4d96 | 2015-08-05 18:12:35 +0000 | [diff] [blame] | 150 | } |
timothy@apple.com | 27b08c9 | 2013-06-11 19:16:26 +0000 | [diff] [blame] | 151 | |
burg@cs.washington.edu | 53f4d96 | 2015-08-05 18:12:35 +0000 | [diff] [blame] | 152 | _createDataGrid() |
timothy@apple.com | 27b08c9 | 2013-06-11 19:16:26 +0000 | [diff] [blame] | 153 | { |
bburg@apple.com | 9d5954b | 2014-03-12 18:18:29 +0000 | [diff] [blame] | 154 | var columns = {url: {}, type: {}, size: {}}; |
| 155 | |
drousso@apple.com | 0b21e4c | 2017-08-02 03:09:57 +0000 | [diff] [blame] | 156 | columns.url.title = WI.UIString("Resource"); |
bburg@apple.com | 9d5954b | 2014-03-12 18:18:29 +0000 | [diff] [blame] | 157 | columns.url.sortable = true; |
| 158 | |
drousso@apple.com | 0b21e4c | 2017-08-02 03:09:57 +0000 | [diff] [blame] | 159 | columns.type.title = WI.UIString("Type"); |
bburg@apple.com | 9d5954b | 2014-03-12 18:18:29 +0000 | [diff] [blame] | 160 | columns.type.sortable = true; |
| 161 | |
drousso@apple.com | 0b21e4c | 2017-08-02 03:09:57 +0000 | [diff] [blame] | 162 | columns.size.title = WI.UIString("Size"); |
bburg@apple.com | 9d5954b | 2014-03-12 18:18:29 +0000 | [diff] [blame] | 163 | columns.size.aligned = "right"; |
| 164 | columns.size.sortable = true; |
| 165 | |
drousso@apple.com | 0b21e4c | 2017-08-02 03:09:57 +0000 | [diff] [blame] | 166 | this._dataGrid = new WI.DataGrid(columns); |
| 167 | this._dataGrid.addEventListener(WI.DataGrid.Event.SortChanged, this._sortDataGrid, this); |
bburg@apple.com | 9d5954b | 2014-03-12 18:18:29 +0000 | [diff] [blame] | 168 | |
mattbaker@apple.com | 503ed07 | 2016-06-16 19:39:10 +0000 | [diff] [blame] | 169 | this._dataGrid.sortColumnIdentifier = "url"; |
drousso@apple.com | 0b21e4c | 2017-08-02 03:09:57 +0000 | [diff] [blame] | 170 | this._dataGrid.sortOrder = WI.DataGrid.SortOrder.Ascending; |
mattbaker@apple.com | 503ed07 | 2016-06-16 19:39:10 +0000 | [diff] [blame] | 171 | this._dataGrid.createSettings("application-cache-frame-content-view"); |
bburg@apple.com | 9d5954b | 2014-03-12 18:18:29 +0000 | [diff] [blame] | 172 | |
mattbaker@apple.com | 45467e6 | 2015-11-06 00:03:59 +0000 | [diff] [blame] | 173 | this.addSubview(this._dataGrid); |
timothy@apple.com | 27b08c9 | 2013-06-11 19:16:26 +0000 | [diff] [blame] | 174 | this._dataGrid.updateLayout(); |
burg@cs.washington.edu | 53f4d96 | 2015-08-05 18:12:35 +0000 | [diff] [blame] | 175 | } |
bburg@apple.com | 9d5954b | 2014-03-12 18:18:29 +0000 | [diff] [blame] | 176 | |
burg@cs.washington.edu | 53f4d96 | 2015-08-05 18:12:35 +0000 | [diff] [blame] | 177 | _sortDataGrid() |
bburg@apple.com | 9d5954b | 2014-03-12 18:18:29 +0000 | [diff] [blame] | 178 | { |
| 179 | function numberCompare(columnIdentifier, nodeA, nodeB) |
| 180 | { |
bburg@apple.com | 9d5954b | 2014-03-12 18:18:29 +0000 | [diff] [blame] | 181 | return nodeA.data[columnIdentifier] - nodeB.data[columnIdentifier]; |
| 182 | } |
| 183 | function localeCompare(columnIdentifier, nodeA, nodeB) |
| 184 | { |
drousso@apple.com | 2719818 | 2017-06-30 21:47:05 +0000 | [diff] [blame] | 185 | return (nodeA.data[columnIdentifier] + "").extendedLocaleCompare(nodeB.data[columnIdentifier] + ""); |
bburg@apple.com | 9d5954b | 2014-03-12 18:18:29 +0000 | [diff] [blame] | 186 | } |
| 187 | |
| 188 | var comparator; |
| 189 | switch (this._dataGrid.sortColumnIdentifier) { |
| 190 | case "type": comparator = localeCompare.bind(this, "type"); break; |
commit-queue@webkit.org | 5cd8e26 | 2017-09-13 23:46:44 +0000 | [diff] [blame] | 191 | case "size": comparator = numberCompare.bind(this, "sizeNumber"); break; |
bburg@apple.com | 9d5954b | 2014-03-12 18:18:29 +0000 | [diff] [blame] | 192 | case "url": |
joepeck@webkit.org | 15c7399 | 2016-09-05 05:02:38 +0000 | [diff] [blame] | 193 | default: comparator = localeCompare.bind(this, "url"); break; |
bburg@apple.com | 9d5954b | 2014-03-12 18:18:29 +0000 | [diff] [blame] | 194 | } |
| 195 | |
| 196 | this._dataGrid.sortNodes(comparator); |
burg@cs.washington.edu | 53f4d96 | 2015-08-05 18:12:35 +0000 | [diff] [blame] | 197 | } |
timothy@apple.com | 27b08c9 | 2013-06-11 19:16:26 +0000 | [diff] [blame] | 198 | |
burg@cs.washington.edu | 53f4d96 | 2015-08-05 18:12:35 +0000 | [diff] [blame] | 199 | _populateDataGrid() |
timothy@apple.com | 27b08c9 | 2013-06-11 19:16:26 +0000 | [diff] [blame] | 200 | { |
timothy@apple.com | 27b08c9 | 2013-06-11 19:16:26 +0000 | [diff] [blame] | 201 | this._dataGrid.removeChildren(); |
| 202 | |
bburg@apple.com | 9d5954b | 2014-03-12 18:18:29 +0000 | [diff] [blame] | 203 | for (var resource of this._resources) { |
| 204 | var data = { |
| 205 | url: resource.url, |
| 206 | type: resource.type, |
commit-queue@webkit.org | 5cd8e26 | 2017-09-13 23:46:44 +0000 | [diff] [blame] | 207 | size: Number.bytesToString(resource.size), |
| 208 | sizeNumber: resource.size, |
bburg@apple.com | 9d5954b | 2014-03-12 18:18:29 +0000 | [diff] [blame] | 209 | }; |
drousso@apple.com | 0b21e4c | 2017-08-02 03:09:57 +0000 | [diff] [blame] | 210 | var node = new WI.DataGridNode(data); |
timothy@apple.com | 27b08c9 | 2013-06-11 19:16:26 +0000 | [diff] [blame] | 211 | this._dataGrid.appendChild(node); |
timothy@apple.com | 27b08c9 | 2013-06-11 19:16:26 +0000 | [diff] [blame] | 212 | } |
burg@cs.washington.edu | 53f4d96 | 2015-08-05 18:12:35 +0000 | [diff] [blame] | 213 | } |
timothy@apple.com | 27b08c9 | 2013-06-11 19:16:26 +0000 | [diff] [blame] | 214 | |
burg@cs.washington.edu | 53f4d96 | 2015-08-05 18:12:35 +0000 | [diff] [blame] | 215 | _deleteButtonClicked(event) |
timothy@apple.com | 27b08c9 | 2013-06-11 19:16:26 +0000 | [diff] [blame] | 216 | { |
| 217 | if (!this._dataGrid || !this._dataGrid.selectedNode) |
| 218 | return; |
| 219 | |
| 220 | // FIXME: Delete Button semantics are not yet defined. (Delete a single, or all?) |
| 221 | this._deleteCallback(this._dataGrid.selectedNode); |
burg@cs.washington.edu | 53f4d96 | 2015-08-05 18:12:35 +0000 | [diff] [blame] | 222 | } |
timothy@apple.com | 27b08c9 | 2013-06-11 19:16:26 +0000 | [diff] [blame] | 223 | |
burg@cs.washington.edu | 53f4d96 | 2015-08-05 18:12:35 +0000 | [diff] [blame] | 224 | _deleteCallback(node) |
timothy@apple.com | 27b08c9 | 2013-06-11 19:16:26 +0000 | [diff] [blame] | 225 | { |
| 226 | // FIXME: Should we delete a single (selected) resource or all resources? |
| 227 | // InspectorBackend.deleteCachedResource(...) |
| 228 | // this._update(); |
| 229 | } |
burg@cs.washington.edu | 53f4d96 | 2015-08-05 18:12:35 +0000 | [diff] [blame] | 230 | }; |