blob: 01b1fb27c62af27efe64ed6769803c353df9fd3a [file] [log] [blame]
Tyler Scottf08ab962015-06-30 16:31:29 -06001//{@ @todo: this need to be configured before the document load
Tyler Scott3c17d5f2015-06-23 17:49:29 -06002var catalog = "/catalog/myUniqueName";
Tyler Scotta1ac69d2015-07-02 17:42:03 -06003var config = {
Tyler Scott087aef72015-07-14 14:11:59 -06004 host: "atmos-csu.research-lan.colostate.edu",
Tyler Scott3c17d5f2015-06-23 17:49:29 -06005 port: 9696
Tyler Scotta1ac69d2015-07-02 17:42:03 -06006};
Tyler Scott3c17d5f2015-06-23 17:49:29 -06007
8// @}
9
Tyler Scotta1ac69d2015-07-02 17:42:03 -060010var atmos = {}; //Comment this out if you don't want debug access.
11
12//Run when the document loads.
13$(function () {
Tyler Scott7d076e22015-07-06 19:21:50 -060014
15 //remove "atmos =" if you don't want debug access
Tyler Scotta1ac69d2015-07-02 17:42:03 -060016 atmos = new Atmos(catalog, config);
Tyler Scottf65b7102015-06-30 18:40:14 -060017
Tyler Scott3c17d5f2015-06-23 17:49:29 -060018});
19
Tyler Scott7d076e22015-07-06 19:21:50 -060020/*
Tyler Scotte815d3e2015-07-09 16:56:17 -060021
Tyler Scott7d076e22015-07-06 19:21:50 -060022*/
23
Tyler Scotte815d3e2015-07-09 16:56:17 -060024/**
25 * Atmos
26 * @version 2.0
27 *
28 * Configures an Atmos object. This manages the atmos interface.
29 *
30 * @constructor
31 * @param {string} catalog - NDN path
32 * @param {Object} config - Object of configuration options for a Face.
33 */
Tyler Scott7d076e22015-07-06 19:21:50 -060034function Atmos(catalog, config){
35 "use strict";
36 //Internal variables.
37 this.results = []
38 this.resultCount = 0;
39 this.page = 1;
40 this.totalPages = 1;
41 this.selectedSearch = {};
42 this.dropdown = [];
43 this.state = {};
44 this.currentViewIndex = 0;
45
Tyler Scotte815d3e2015-07-09 16:56:17 -060046 this.catalog = catalog;
47
Tyler Scott7d076e22015-07-06 19:21:50 -060048 this.face = new Face(config);
49 this.categories = $('#side-menu');
50 this.resultTable = $('#resultTable');
Tyler Scotte815d3e2015-07-09 16:56:17 -060051 this.filters = $('#filters');
Tyler Scott7d076e22015-07-06 19:21:50 -060052
53 var scope = this;
54
55 this.resultTable.on('click', '.interest-button', function(){
56 var button = $(this);
57
Tyler Scott087aef72015-07-14 14:11:59 -060058 if (button.is(':disabled')){
59 console.warn("Attempt to request again!");
60 }
61
Tyler Scott7d076e22015-07-06 19:21:50 -060062 var name = button.parent().prev().text();
63 var interest = new Interest(new Name('/retrieve' + name));
Tyler Scott087aef72015-07-14 14:11:59 -060064 scope.face.expressInterest(interest, function(){}, function(){});
65
66 button.text("Requested!")
67 .removeClass('btn-primary')
68 .addClass('btn-default')
69 .addClass('disabled')
70 .prop('disabled', true);
Tyler Scott7d076e22015-07-06 19:21:50 -060071
72 });
73
74 $.getJSON("search_catagories.json").done(function (data) {
75 $.each(data, function (pageSection, contents) {
76 if (pageSection == "SearchCatagories") {
77 $.each(contents, function (search, searchOptions) {
78 var e = $('<li><a href="#">' + search.replace(/\_/g, " ") + '</a><ul class="subnav nav nav-pills nav-stacked"></ul></li>');
79
80 var sub = e.find('ul.subnav');
81 $.each(searchOptions, function(index, name){
82 var item = $('<li><a href="#">' + name + '</a></li>');
83 sub.append(item);
84 item.click(function(){
Tyler Scott575c61b2015-07-13 13:42:16 -060085 scope.addFilter(name, search);
Tyler Scott7d076e22015-07-06 19:21:50 -060086 });
87 });
88
89 //Toggle the menus.
90 e.click(function(){
91 scope.categories.find('.subnav').slideUp();
92 var t = $(this).find('.subnav');
93 if ( !t.is(':visible')){
94 t.slideDown().triggerHandler('focus'); //Cancel other animations and slide down.
95 }
96 });
97
98 scope.categories.append(e);
99 });
100 }
101 });
102 });
103
104 $('#searchBar').submit(function(e){
105 e.preventDefault();
Tyler Scotte815d3e2015-07-09 16:56:17 -0600106 console.log("Search started!", $('#search'));
Tyler Scott7d076e22015-07-06 19:21:50 -0600107 })
108
109}
110
111Atmos.prototype.onData = function(data) {
112 var payloadStr = data.content.toString().split("\n")[0];
113
114 var queryResults = JSON.parse(payloadStr);
115
116 var scope = this;
117
Tyler Scott087aef72015-07-14 14:11:59 -0600118 //TODO Fix paging.
119
120 $.each(queryResults, function (queryResult, field) {
Tyler Scott7d076e22015-07-06 19:21:50 -0600121
122 if (queryResult == "next") {
123 scope.populateAutocomplete(field);
124 }
125
126 $.each(field, function (entryCount, name) {
127 scope.results.push(name);
128 });
129 });
130
131 // Calculating the current page and the view
132 this.totalPages = Math.ceil(this.resultCount / 20);
133 this.populateResults(0);
134}
135
136Atmos.prototype.query = function(prefix, parameters, callback, pipeline) {
137 this.results = [];
138 this.dropdown = [];
139 this.resultTable.empty();
140 this.resultTable.append('<tr><th colspan="2">Results</th></tr>');
141
142 var queryPrefix = new Name(prefix);
143 queryPrefix.append("query");
144
145 var jsonString = JSON.stringify(parameters);
146 queryPrefix.append(jsonString);
147
148 this.state = {
149 prefix: new Name(prefix),
150 userOnData: callback,
151 outstanding: {},
152 nextSegment: 0,
Tyler Scott575c61b2015-07-13 13:42:16 -0600153 parameters: jsonString
Tyler Scott7d076e22015-07-06 19:21:50 -0600154 };
155
156 /*if (state.hasOwnProperty("version")) {
157 console.log("state already has version");
158 }*/
159
160 var queryInterest = new Interest(queryPrefix);
161 queryInterest.setInterestLifetimeMilliseconds(10000);
162
163 var scope = this;
164
165 this.face.expressInterest(queryInterest,
Tyler Scotte815d3e2015-07-09 16:56:17 -0600166 function(interest, data){
167 scope.onQueryData(interest, data);
168 }, function(interest){
169 scope.onQueryTimeout(interest);
Tyler Scott7d076e22015-07-06 19:21:50 -0600170 }
171 );
172
173 this.state["outstanding"][queryInterest.getName().toUri()] = 0;
174}
175
Tyler Scotte815d3e2015-07-09 16:56:17 -0600176/**
177 * @deprecated
178 * Use applyFilters/addFilters as appropriate.
179 */
Tyler Scott7d076e22015-07-06 19:21:50 -0600180Atmos.prototype.submitCatalogSearch = function(field) {
Tyler Scotte815d3e2015-07-09 16:56:17 -0600181 console.warn("Use of deprecated function submitCatalogSearch! (Use applyFilters/addFilters as appropriate)");
Tyler Scott7d076e22015-07-06 19:21:50 -0600182}
183
184Atmos.prototype.expressNextInterest = function() {
Tyler Scott3c17d5f2015-06-23 17:49:29 -0600185 // @todo pipelines
Tyler Scotte815d3e2015-07-09 16:56:17 -0600186 var nextName = new Name(this.state["results"]);
187 nextName.appendSegment(this.state["nextSegment"]);
Tyler Scott3c17d5f2015-06-23 17:49:29 -0600188
189 var nextInterest = new Interest(nextName);
190 nextInterest.setInterestLifetimeMilliseconds(10000);
191
Tyler Scott7d076e22015-07-06 19:21:50 -0600192 var scope = this;
Tyler Scott3c17d5f2015-06-23 17:49:29 -0600193
Tyler Scott7d076e22015-07-06 19:21:50 -0600194 this.face.expressInterest(nextInterest,
Tyler Scotte815d3e2015-07-09 16:56:17 -0600195 function(interest, data){
196 scope.onQueryResultsData(interest, data);
Tyler Scott7d076e22015-07-06 19:21:50 -0600197 },
Tyler Scotte815d3e2015-07-09 16:56:17 -0600198 function(interest){
199 scope.onQueryResultsTimeout(interest);
Tyler Scott7d076e22015-07-06 19:21:50 -0600200 });
201
202 this.state["nextSegment"] ++;
203 this.state["outstanding"][nextName.toUri()] = 0;
Tyler Scott3c17d5f2015-06-23 17:49:29 -0600204}
205
Tyler Scott7d076e22015-07-06 19:21:50 -0600206Atmos.prototype.onQueryData = function(interest, data) {
Tyler Scott3c17d5f2015-06-23 17:49:29 -0600207 var name = data.getName();
208
Tyler Scott7d076e22015-07-06 19:21:50 -0600209 delete this.state["outstanding"][interest.getName().toUri()];
Tyler Scott3c17d5f2015-06-23 17:49:29 -0600210
Tyler Scott7d076e22015-07-06 19:21:50 -0600211 this.state["version"] = name.get(this.state["prefix"].size() + 2).toVersion();
Tyler Scott3c17d5f2015-06-23 17:49:29 -0600212
Tyler Scott575c61b2015-07-13 13:42:16 -0600213 this.state["results"] = new Name(this.state["prefix"]).append("query-results").append(this.state['parameters']).appendVersion(this.state["version"]);
Tyler Scott3c17d5f2015-06-23 17:49:29 -0600214
Tyler Scott7d076e22015-07-06 19:21:50 -0600215 this.expressNextInterest();
Tyler Scott3c17d5f2015-06-23 17:49:29 -0600216}
217
Tyler Scott7d076e22015-07-06 19:21:50 -0600218Atmos.prototype.onQueryResultsData = function(interest, data) {
Tyler Scott3c17d5f2015-06-23 17:49:29 -0600219 var name = data.getName();
Tyler Scott7d076e22015-07-06 19:21:50 -0600220 delete this.state["outstanding"][interest.getName().toUri()];
Tyler Scottf08ab962015-06-30 16:31:29 -0600221 if (!name.get(-1).equals(data.getMetaInfo().getFinalBlockId())) {
Tyler Scott7d076e22015-07-06 19:21:50 -0600222 this.expressNextInterest();
Tyler Scottf08ab962015-06-30 16:31:29 -0600223 } //else {
224 //alert("found final block");
225 //}
Tyler Scott3c17d5f2015-06-23 17:49:29 -0600226
Tyler Scott7d076e22015-07-06 19:21:50 -0600227 this.state["userOnData"](data);
Tyler Scott3c17d5f2015-06-23 17:49:29 -0600228}
229
Tyler Scott7d076e22015-07-06 19:21:50 -0600230Atmos.prototype.onQueryTimeout = function(interest) {
Tyler Scott3c17d5f2015-06-23 17:49:29 -0600231 var uri = interest.getName().toUri();
Tyler Scott7d076e22015-07-06 19:21:50 -0600232 if (this.state["outstanding"][uri] < 1) {
233 this.state["outstanding"][uri] ++;
234 var scope = this;
235 this.face.expressInterest(interest,
Tyler Scott575c61b2015-07-13 13:42:16 -0600236 function(interest, data){
237 scope.onQueryData(interest, data);
Tyler Scott7d076e22015-07-06 19:21:50 -0600238 },
Tyler Scott575c61b2015-07-13 13:42:16 -0600239 function(interest){
240 scope.onQueryTimeout(interest);
Tyler Scott7d076e22015-07-06 19:21:50 -0600241 });
Tyler Scott3c17d5f2015-06-23 17:49:29 -0600242 } else {
Tyler Scott7d076e22015-07-06 19:21:50 -0600243 delete this.state["outstanding"][uri];
Tyler Scott3c17d5f2015-06-23 17:49:29 -0600244
245 // We modify the autocomplete box here because we need to know
246 // we have all of the entries first. Fairly hacky.
Tyler Scott7d076e22015-07-06 19:21:50 -0600247 /* TODO FIXME
248 var autocompleteFullName = this.autocompleteText.value;
249 for (var i = 0; i < dropdown.length; ++i) {
250 if (this.dropdown[i].substr(0, dropdown[i].length - 1).toUpperCase === this.autocompleteText.value.toUpperCase || dropdown.length == 1) {
251 autocompleteText.value = dropdown[i];
252 }
253 }
254 */
255 }
256}
257
258Atmos.prototype.onQueryResultsTimeout = function(interest) {
259 var uri = interest.getName().toUri();
260 if (this.state["outstanding"][uri] < 1) {
261 this.state["outstanding"][uri] ++;
262 var scope = this;
263 this.face.expressInterest(interest,
264 function(){
265 scope.onQueryResultsData.apply(scope, arguments);
266 },
267 function(){
268 scope.onQueryResultsTimeout.apply(scope, arguments);
269 });
270 } else {
271 delete this.state["outstanding"][uri];
272 // We modify the autocomplete box here because we need to know
273 // we have all of the entries first. Fairly hacky.
274 /* TODO FIXME
Tyler Scott3c17d5f2015-06-23 17:49:29 -0600275 var autocompleteFullName = autocompleteText.value;
276 for (var i = 0; i < dropdown.length; ++i) {
277 if (dropdown[i].substr(0, dropdown[i].length - 1).toUpperCase === autocompleteText.value.toUpperCase || dropdown.length == 1) {
278 autocompleteText.value = dropdown[i];
279 }
280 }
Tyler Scott7d076e22015-07-06 19:21:50 -0600281 */
Tyler Scott3c17d5f2015-06-23 17:49:29 -0600282 }
283}
284
Tyler Scott7d076e22015-07-06 19:21:50 -0600285Atmos.prototype.populateResults = function(startIndex) {
286 this.resultTable.empty();
287 this.resultTable.append('<tr><th colspan="2">Results</th></tr>');
288
289
290 for (var i = startIndex; i < startIndex + 20 && i < this.results.length; ++i) {
Tyler Scott087aef72015-07-14 14:11:59 -0600291 this.resultTable.append('<tr><td>' + this.results[i]
292 + '</td><td><button class="interest-button btn btn-primary btn-xs">Retrieve</button></td></tr>');
Tyler Scott7d076e22015-07-06 19:21:50 -0600293 }
294
295 if (this.results.length <= 20) {
296 this.page = 1;
Tyler Scott3c17d5f2015-06-23 17:49:29 -0600297 } else {
Tyler Scott7d076e22015-07-06 19:21:50 -0600298 this.page = startIndex / 20 + 1;
Tyler Scott3c17d5f2015-06-23 17:49:29 -0600299 }
300
Tyler Scott7d076e22015-07-06 19:21:50 -0600301 this.totalPages = Math.ceil(this.results.length / 20);
Tyler Scott3c17d5f2015-06-23 17:49:29 -0600302
Tyler Scott7d076e22015-07-06 19:21:50 -0600303 //TODO Fix the page to fit the theme.
Tyler Scott3c17d5f2015-06-23 17:49:29 -0600304 var currentPage = $(".page");
305 currentPage.empty();
Tyler Scott7d076e22015-07-06 19:21:50 -0600306 if (this.page != 1) {
Tyler Scott3c17d5f2015-06-23 17:49:29 -0600307 currentPage.append('<a href="#" onclick="getPage(this.id);" id="<"><</a>');
308 }
309 // This section of code creates the paging for the results.
310 // To prevent it from having a 1000+ pages, it will only show the 5 pages before/after
311 // the current page and the total pages (expect users not to really jump around a lot).
Tyler Scott7d076e22015-07-06 19:21:50 -0600312 for (var i = 1; i <= this.totalPages; ++i) {
313 if (i == 1 || i == this.totalPages // Min or max
314 || (i <= this.page && i + 5 >= this.page) // in our current page range
315 || (i >= this.page && i - 5 <= this.page)) { // in our current page range
316 if (i != this.page) {
Tyler Scottf08ab962015-06-30 16:31:29 -0600317 currentPage.append(' <a href="#" onclick="getPage(' + i + ');">' + i + '</a>')
Tyler Scott7d076e22015-07-06 19:21:50 -0600318 if (i == 1 && this.page > i + 5) {
Tyler Scott3c17d5f2015-06-23 17:49:29 -0600319 currentPage.append(' ... ');
320 }
321 } else {
322 currentPage.append(' ' + i);
323 }
324 } else { // Need to skip ahead
Tyler Scott087aef72015-07-14 14:11:59 -0600325 if (i == this.page + 6) {
Tyler Scott3c17d5f2015-06-23 17:49:29 -0600326 currentPage.append(' ... ');
327
Tyler Scottf08ab962015-06-30 16:31:29 -0600328 currentPage.append(' <a href="#" onclick="getPage(this.id);" id=">">></a>')
Tyler Scott7d076e22015-07-06 19:21:50 -0600329 i = this.totalPages - 1;
Tyler Scott3c17d5f2015-06-23 17:49:29 -0600330 }
331 }
332 }
Tyler Scott7d076e22015-07-06 19:21:50 -0600333 currentPage.append(' ' + this.results.length + ' results');
Tyler Scott3c17d5f2015-06-23 17:49:29 -0600334}
335
Tyler Scott7d076e22015-07-06 19:21:50 -0600336Atmos.prototype.getPage = function(clickedPage) {
Tyler Scott3c17d5f2015-06-23 17:49:29 -0600337 console.log(clickedPage);
338
339 var nextPage = clickedPage;
340 if (clickedPage === "<") {
Tyler Scott7d076e22015-07-06 19:21:50 -0600341 nextPage = this.page - 5;
Tyler Scott3c17d5f2015-06-23 17:49:29 -0600342 } else if (clickedPage === ">") {
343 console.log("> enabled");
344
Tyler Scott7d076e22015-07-06 19:21:50 -0600345 nextPage = this.page + 5;
Tyler Scott3c17d5f2015-06-23 17:49:29 -0600346 }
347
348 nextPage--; // Need to adjust for starting at 0
349
350 if (nextPage < 0 ) {
351 nextPage = 0;
352 console.log("0 enabled");
Tyler Scott7d076e22015-07-06 19:21:50 -0600353 } else if (nextPage > this.totalPages - 1) {
354 nextPage = this.totalPages - 1;
Tyler Scott3c17d5f2015-06-23 17:49:29 -0600355 console.log("total enabled");
356 }
357
Tyler Scott7d076e22015-07-06 19:21:50 -0600358 this.populateResults(nextPage * 20);
Tyler Scott3c17d5f2015-06-23 17:49:29 -0600359 return false;
360}
361
Tyler Scott7d076e22015-07-06 19:21:50 -0600362
363Atmos.prototype.submitAutoComplete = function() {
364 /* FIXME TODO
Tyler Scott3c17d5f2015-06-23 17:49:29 -0600365 if (autocompleteText.value.length > 0) {
366 var selection = autocompleteText.value;
367 $.each(dropdown, function (i, dropdownEntry) {
368 if (dropdownEntry.substr(0, dropdownEntry.length - 1) == selection) {
369 selection = dropdownEntry;
370 }
371 });
372
373 selectedSearch["?"] = selection;
374 query(catalog, selectedSearch, onData, 1);
375 delete selectedSearch["?"];
376 }
Tyler Scott7d076e22015-07-06 19:21:50 -0600377 */
Tyler Scott3c17d5f2015-06-23 17:49:29 -0600378}
379
Tyler Scott7d076e22015-07-06 19:21:50 -0600380Atmos.prototype.populateAutocomplete = function(fields) {
381 /* FIXME TODO
Tyler Scott3c17d5f2015-06-23 17:49:29 -0600382 var isAutocompleteFullName = (autocompleteText.value.charAt(autocompleteText.value.length - 1) === "/");
383 var autocompleteFullName = autocompleteText.value;
384 for (var i = 0; i < fields.length; ++i) {
385 var fieldFullName = fields[i];
386 var entry = autocompleteFullName;
387 var skipahead = "";
388
389 if (isAutocompleteFullName) {
390 skipahead = fieldFullName.substr(autocompleteText.value.length, fieldFullName.length);
391 } else {
392 if (fieldFullName.charAt(autocompleteText.value.length) === "/") {
393 entry += "/";
394 skipahead = fieldFullName.substr(autocompleteText.value.length + 1, fieldFullName.length);
395 } else {
396 skipahead = fieldFullName.substr(autocompleteText.value.length, fieldFullName.length);
397 }
398 }
399 if (skipahead.indexOf("/") != -1) {
400 entry += skipahead.substr(0, skipahead.indexOf("/") + 1);
401 } else {
402 entry += skipahead;
403 }
404
405 var added = false;
406 for (var j = 0; j < dropdown.length && !added; ++j) {
407 if (dropdown[j] === entry) {
408 added = true;
409 } else if (dropdown[j] > entry) {
410 dropdown.splice(j, 0, entry);
411 added = true;
412 }
413 }
414 if (!added) {
415 dropdown.push(entry);
416 }
417
418 }
419 $("#autocompleteText").autocomplete({
420 source: dropdown
421 });
Tyler Scott7d076e22015-07-06 19:21:50 -0600422 */
Tyler Scott3c17d5f2015-06-23 17:49:29 -0600423}
424
Tyler Scotte815d3e2015-07-09 16:56:17 -0600425/**
426 * Adds a filter to the list of filters.
Tyler Scott087aef72015-07-14 14:11:59 -0600427 * If a filter is already added, it will be removed instead.
Tyler Scotte815d3e2015-07-09 16:56:17 -0600428 *
429 * @param {string} filter
430 */
Tyler Scott575c61b2015-07-13 13:42:16 -0600431Atmos.prototype.addFilter = function(name, category){
Tyler Scotte815d3e2015-07-09 16:56:17 -0600432 var existing = this.filters.find('span:contains(' + name + ')');
433 if (existing.length){
434 //If the category is clicked twice, then we delete it.
435 existing.remove();
436 this.applyFilters();
437
438 } else {
439
440 var filter = $('<span class="label label-default"></span>');
Tyler Scott575c61b2015-07-13 13:42:16 -0600441 filter.text(category + ':' + name);
Tyler Scotte815d3e2015-07-09 16:56:17 -0600442
443 this.filters.append(filter);
444
445 this.applyFilters();
446
447 var scope = this;
448 filter.click(function(){
449 $(this).remove();
450 scope.applyFilters();
451 });
452
453 }
454
455}
456
457Atmos.prototype.applyFilters = function(){
Tyler Scott575c61b2015-07-13 13:42:16 -0600458 var filters = this.filters.children().toArray().reduce(function(prev, current){
459 var data = $(current).text().split(/:/);
460 prev[data[0]] = data[1];
461 return prev;
462 }, {});
Tyler Scotte815d3e2015-07-09 16:56:17 -0600463 console.log('Collected filters:', filters);
Tyler Scott087aef72015-07-14 14:11:59 -0600464 var scope = this;
Tyler Scotte815d3e2015-07-09 16:56:17 -0600465 this.query(this.catalog, filters, function(data){
466 scope.onData(data);
467 }, 1);
468}
469
470/**
471 * @deprecated
472 * Use addFilter instead.
473 */
474Atmos.prototype.populateCurrentSelections = function() {
475 console.warn("Use of deprecated function populateCurrentSelections! (Use addFilter instead)");
476 /*
Tyler Scott3c17d5f2015-06-23 17:49:29 -0600477 var currentSelection = $(".currentSelections");
478 currentSelection.empty();
479
480 currentSelection.append("<p>Filtering on:");
481
Tyler Scott7d076e22015-07-06 19:21:50 -0600482 var scope = this;
483
484 $.each(this.selectedSearch, function (searchMenuCatagory, selection) {
485 var e = $('<a href="#">[X] ' + searchMenuCatagory + ":" + selection + '</a>');
486 e.onclick(function(){
487 var searchFilter = $(this).text();
488
489 var search = "";
490 for (var j = 0; j < searchFilter.length; ++j) {
491 search += searchFilter[j] + " ";
492 }
493 console.log("Split values: '" + search + "'");
494
495 delete this.selectedSearch[searchFilter[0]];
496 this.query(catalog, selectedSearch, onData, 1);
497 populateCurrentSelections();
498 });
499 currentSelection.append(e);
Tyler Scott3c17d5f2015-06-23 17:49:29 -0600500 });
501
502 currentSelection.append("</p>");
Tyler Scotte815d3e2015-07-09 16:56:17 -0600503 */
Tyler Scott3c17d5f2015-06-23 17:49:29 -0600504}