concerto_frontend_vue 0.0.7 → 0.0.9

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ccdf1620c1fb183f74d395344eb81a85a2cbdfc8
4
- data.tar.gz: f49f83f1e972ebe2a0ee2284334ff6abb41e6d0d
3
+ metadata.gz: 20d305f904be47a4fa0df58fe9555a9900c2a768
4
+ data.tar.gz: '080681cd6d144d3f555c71e6a032fc3b5ae2c25b'
5
5
  SHA512:
6
- metadata.gz: c869141040f79f6436d10547a30ecdcbd44afdb922aac2b57c5d40bc8eb807bbbde24cf775e84d9a4784b05f86c2d36432884607597de142c4d089566119283e
7
- data.tar.gz: b18e0fde10475bc35e0a9f8b69e9ba3f63716f76c571a16420bcc221e1e9f80b57dd57384db13fec947609c3b1a744b5e8ce2ba3f82b3bb01ea358740a31774b
6
+ metadata.gz: 9cfc71274234dde1d097be7072f74f4f94070ce6382c6e0268ce754f8db3d09301a4c491c0dd657a3245307a54a5d8b613118f0d7ced5c09bc444589b067ceef
7
+ data.tar.gz: 4179a18798b84d79be7aca98570cbac3814be4993f113a1081fa4e0150a1af43145ff4319d0244309183de875170e483634f68f658279823d99b818c3313d81d
@@ -63,7 +63,7 @@
63
63
  /******/
64
64
  /******/ var hotApplyOnUpdate = true;
65
65
  /******/ // eslint-disable-next-line no-unused-vars
66
- /******/ var hotCurrentHash = "1d6b15a47bc75a00026a";
66
+ /******/ var hotCurrentHash = "6eab254e41448167f364";
67
67
  /******/ var hotRequestTimeout = 10000;
68
68
  /******/ var hotCurrentModuleData = {};
69
69
  /******/ var hotCurrentChildModule;
@@ -1150,7 +1150,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n//\n//\n//\n//\n/* harmony de
1150
1150
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
1151
1151
 
1152
1152
  "use strict";
1153
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core_js_modules_es6_function_name__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core-js/modules/es6.function.name */ \"./node_modules/core-js/modules/es6.function.name.js\");\n/* harmony import */ var core_js_modules_es6_function_name__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es6_function_name__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var core_js_modules_es6_object_keys__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! core-js/modules/es6.object.keys */ \"./node_modules/core-js/modules/es6.object.keys.js\");\n/* harmony import */ var core_js_modules_es6_object_keys__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es6_object_keys__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var core_js_modules_web_dom_iterable__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! core-js/modules/web.dom.iterable */ \"./node_modules/core-js/modules/web.dom.iterable.js\");\n/* harmony import */ var core_js_modules_web_dom_iterable__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_web_dom_iterable__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var core_js_modules_es6_number_constructor__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! core-js/modules/es6.number.constructor */ \"./node_modules/core-js/modules/es6.number.constructor.js\");\n/* harmony import */ var core_js_modules_es6_number_constructor__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es6_number_constructor__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var axios__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! axios */ \"./node_modules/axios/index.js\");\n/* harmony import */ var axios__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(axios__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../utils */ \"./src/utils.js\");\n/* harmony import */ var _ConcertoClientTime__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./ConcertoClientTime */ \"./src/components/ConcertoClientTime.vue\");\n/* harmony import */ var _ConcertoEmpty__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./ConcertoEmpty */ \"./src/components/ConcertoEmpty.vue\");\n/* harmony import */ var _ConcertoGraphic__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./ConcertoGraphic */ \"./src/components/ConcertoGraphic.vue\");\n/* harmony import */ var _ConcertoHtmlText__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./ConcertoHtmlText */ \"./src/components/ConcertoHtmlText.vue\");\n/* harmony import */ var _ConcertoIframe__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./ConcertoIframe */ \"./src/components/ConcertoIframe.vue\");\n/* harmony import */ var _ConcertoRemoteVideo__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./ConcertoRemoteVideo */ \"./src/components/ConcertoRemoteVideo.vue\");\n/* harmony import */ var _ConcertoTicker__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./ConcertoTicker */ \"./src/components/ConcertoTicker.vue\");\n\n\n\n\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n\n/* eslint no-console: 0 */\n\n\n\n\n\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n name: 'ConcertoField',\n props: {\n baseUrl: String,\n debug: Boolean,\n field: Object,\n frontendKey: String,\n locale: String,\n screenId: Number,\n timezone: String\n },\n data: function data() {\n return {\n contentQueue: [],\n contentErrorCount: 0,\n contentType: null,\n currentContent: null,\n debouncedScheduleNextContent: null,\n lastUpdated: 0,\n status: ''\n };\n },\n components: {\n // the \"canned\" content\n ConcertoClientTime: _ConcertoClientTime__WEBPACK_IMPORTED_MODULE_6__[\"default\"],\n ConcertoEmpty: _ConcertoEmpty__WEBPACK_IMPORTED_MODULE_7__[\"default\"],\n ConcertoGraphic: _ConcertoGraphic__WEBPACK_IMPORTED_MODULE_8__[\"default\"],\n ConcertoHtmlText: _ConcertoHtmlText__WEBPACK_IMPORTED_MODULE_9__[\"default\"],\n ConcertoIframe: _ConcertoIframe__WEBPACK_IMPORTED_MODULE_10__[\"default\"],\n ConcertoRemoteVideo: _ConcertoRemoteVideo__WEBPACK_IMPORTED_MODULE_11__[\"default\"],\n ConcertoTicker: _ConcertoTicker__WEBPACK_IMPORTED_MODULE_12__[\"default\"]\n },\n computed: {\n debugFieldTitle: function debugFieldTitle() {\n var _this = this;\n\n var info = [];\n\n if (this.field) {\n if (this.field.style) {\n info.push('style: ' + this.field.style);\n }\n\n Object.keys(this.field.config).forEach(function (key) {\n return info.push(key + ': ' + _this.field.config[key]);\n });\n }\n\n return info.join(' \\n ');\n },\n clearContentWhenEmpty: function clearContentWhenEmpty() {\n // find out if this field should clear the last content when it is empty (default to true)\n var clearContent = this.field.config['screens_clear_last_content'];\n\n if (clearContent == null || typeof clearContent == 'undefined') {\n clearContent = true;\n }\n\n return clearContent;\n },\n duration: function duration() {\n if (this.currentContent && this.currentContent.length !== 0) {\n return this.currentContent[0].duration;\n }\n\n return '';\n },\n emptyContent: function emptyContent() {\n return {\n duration: 10,\n id: Date.now(),\n name: 'Empty Content - Waiting',\n type: 'Empty',\n render_details: {}\n };\n },\n inInfo: function inInfo() {\n var info = '';\n if (this.field && this.field.config && this.field.config.entry_transition) info = this.field.config.entry_transition + ' - ';\n return info;\n },\n outInfo: function outInfo() {\n var info = '';\n if (this.field && this.field.config && this.field.config.exit_transition) info = ' - ' + this.field.config.exit_transition;\n return info;\n },\n suppressRepeatingContent: function suppressRepeatingContent() {\n // find out if we should display repeat content (default to false)\n var repeatContent = this.field.config['repeat_content'] && this.field.config['repeat_content'] === 'Reload';\n return !repeatContent;\n },\n transitionIn: function transitionIn() {\n // default to fade in\n var transition = 'animated fadeIn'; // map old settings to new settings\n\n if (this.field.config && this.field.config.entry_transition) {\n switch (this.field.config.entry_transition) {\n case 'fade-in-animation':\n transition = 'animated fadeIn';\n break;\n\n case 'scale-up-animation':\n transition = 'animated zoomIn';\n break;\n\n case 'slide-left-animation':\n case 'slide-from-right-animation':\n transition = 'animated slideInRight';\n break;\n\n case 'slide-right-animation':\n case 'slide-from-left-animation':\n transition = 'animated slideInLeft';\n break;\n\n case 'slide-down-animation':\n transition = 'animated slideInDown';\n break;\n\n case 'slide-up-animation':\n transition = 'animated slideInUp';\n break;\n\n default:\n transition = this.field.config.entry_transition;\n break;\n }\n }\n\n return transition;\n },\n transitionOut: function transitionOut() {\n // default to fade out\n var transition = 'animated fadeOut'; // map old settings to new settings\n\n if (this.field.config && this.field.config.exit_transition) {\n switch (this.field.config.exit_transition) {\n case 'fade-out-animation':\n transition = 'animated fadeOut';\n break;\n\n case 'scale-down-animation':\n transition = 'animated zoomOut';\n break;\n\n case 'slide-left-animation':\n case 'slide-from-right-animation':\n transition = 'animated slideOutLeft';\n break;\n\n case 'slide-right-animation':\n case 'slide-from-left-animation':\n transition = 'animated slideOutRight';\n break;\n\n case 'slide-up-animation':\n transition = 'animated slideOutUp';\n break;\n\n case 'slide-down-animation':\n transition = 'animated slideOutDown';\n break;\n\n default:\n transition = this.field.config.exit_transition;\n break;\n }\n }\n\n return transition;\n }\n },\n mounted: function mounted() {\n this.fetchContent(); //this.loadNextContent()\n },\n methods: {\n concertoTicked: function concertoTicked() {\n if (this.debug) {\n this.decrementDuration();\n }\n },\n decrementDuration: function decrementDuration() {\n if (this.currentContent && this.currentContent.length > 0 && this.currentContent[0].duration > 0) {\n this.currentContent[0].duration--;\n }\n },\n // allows user to click through content\n forceNextContent: function forceNextContent() {\n if (this.debouncedScheduleNextContent) {\n this.debouncedScheduleNextContent.flush();\n } else {\n this.scheduleNextContent(1);\n }\n },\n // check for frontend key mismatch (which simply means the server wants us to reload the screen)\n // but we will delegate that to the screen component\n isSameFrontendKey: function isSameFrontendKey(key) {\n if (this.frontendKey && key && key !== this.frontendKey) {\n console.debug('different frontend-key detected');\n this.$emit('frontend-key-changed');\n return false;\n }\n\n return true;\n },\n fetchContent: function fetchContent() {\n var _this2 = this;\n\n // console.debug(Date(), this.field.id, this.field.name, 'fetching content')\n this.status = 'fetching content';\n var url = _utils__WEBPACK_IMPORTED_MODULE_5__[\"default\"].prefixWithBase(\"/frontend/\" + this.screenId + \"/fields/\" + this.field.id + \"/contents.json\", this.baseUrl);\n return axios__WEBPACK_IMPORTED_MODULE_4___default.a.get(url).then(function (response) {\n var data = response.data;\n var key = response.headers['x-concerto-frontend-setup-key']; // only process the contents if the frontend key is the same otherwise the screen is going to reload the page anyway so dont bother\n\n if (_this2.isSameFrontendKey(key)) {\n // since there really is no data for the Time field, mock up an entry\n if (_this2.field.name === \"Time\") {\n _this2.status = _this2.timezone || 'No timezone specified';\n _this2.status += ', ' + (_this2.locale || 'No locale specified');\n data = [{\n 'duration': 15,\n 'id': Date.now(),\n // must be differing so each item is treated as new content\n 'name': 'System Time',\n 'type': 'ClientTime',\n 'render_details': {\n 'timezone': _this2.timezone,\n 'locale': _this2.locale\n }\n }];\n }\n\n if (data === null || data.length === 0) {\n _this2.status = 'no content returned, trying again in 10 seconds';\n data = [_this2.emptyContent];\n }\n } // console.debug(this.field.id, this.field.name, 'data', data)\n // add it to the queue\n\n\n Array.prototype.push.apply(_this2.contentQueue, data); // dont wait to show it if we are currently not showing anything\n\n if ((!_this2.currentContent || _this2.currentContent.type == 'Empty') && _this2.contentQueue.length >= 1) {\n _this2.scheduleNextContent(1);\n }\n\n return data;\n }).catch(function (error) {\n _this2.status = \"An error has occurred \" + error.message;\n var data = [{\n 'duration': 10,\n 'id': Date.now(),\n // must be differing so each item is treated as new content\n 'name': 'Error',\n 'type': 'HtmlText',\n 'render_details': {\n data: 'An error has occurred - ' + error.message\n }\n }]; // an error ocurred, so tell the screen to reload -- it has a nicer error msg\n\n _this2.$emit('frontend-key-changed');\n\n return data;\n });\n },\n\n /**\n * Schedule an attempt to load the next piece of content for this field.\n *\n * @function scheduleNextContent\n * @param {Number} msToWait Number of milliseconds to wait.\n */\n scheduleNextContent: function scheduleNextContent(msToWait) {\n var _this3 = this;\n\n if (this.debouncedScheduleNextContent) {\n console.debug(this.field.id, this.field.name, 'ignoring schedule next content request since already pending');\n return;\n } // keep track of our debounced function so we can flush it later if needed, but if we've been called already\n // then clear our track so we dont try and flush it later.\n\n\n this.debouncedScheduleNextContent = _utils__WEBPACK_IMPORTED_MODULE_5__[\"default\"].debounce(function () {\n _this3.debouncedScheduleNextContent = null;\n\n _this3.loadNextContent();\n }, msToWait);\n this.debouncedScheduleNextContent();\n },\n\n /**\n * Load a piece of content based on the content data.\n *\n * @function loadContent\n * @param {Object} contentData\n * @returns {Boolean} Return true if the content started loading OK.\n */\n loadContent: function loadContent(contentData) {\n if (!contentData) {\n this.status = 'Missing contentData';\n console.error(this.field.id, this.field.name, 'invalid contentData');\n return false;\n }\n\n var simpleContentData = {\n title: contentData.name,\n contentId: contentData.id,\n duration: contentData.duration,\n config: this.field.config,\n baseUrl: this.baseUrl,\n type: contentData.type,\n fieldHeight: this.$el.offsetHeight,\n fieldWidth: this.$el.offsetWidth\n }; // Flatten render_details\n\n Object.keys(contentData.render_details).forEach(function (key) {\n simpleContentData[key] = contentData.render_details[key];\n });\n this.contentType = 'Concerto' + contentData.type;\n this.currentContent = [simpleContentData]; // console.debug('scheduling next content load for ', simpleContentData.duration * 1000)\n\n this.scheduleNextContent(simpleContentData.duration * 1000);\n return true;\n },\n loadNextContent: function loadNextContent() {\n var newContent = this.contentQueue.shift(); // If we got nothing from the queue or it is empty then fetch more, but continue on (since we might\n // have grabbed the last item from the queue and still need to show it).\n\n if (!newContent || this.contentQueue.length < 1) {\n // console.debug(this.field.id, this.field.name, 'queue is empty now so fetching more')\n this.fetchContent();\n }\n\n if (!newContent) {\n // This happens when we empty the queue and the fetchContent routine hasn't completed yet.\n // There was no content in the queue, try again in a few seconds.\n this.scheduleNextContent(10 * 1000);\n return false;\n } // If we have a current item and the new item is the same, then if we are supposed to suppress it, skip the new item.\n // This does not apply to RemoteVideo content since that should restart the video.\n\n\n if (this.currentContent && this.currentContent.length > 0 && this.currentContent[0].contentId === newContent.id && this.suppressRepeatingContent && newContent['type'] !== 'RemoteVideo') {\n this.status = 'skipping same piece of content: ' + newContent.id + ' - ' + newContent.name; // console.debug(Date(), this.field.id, this.field.name, this.status, this.contentQueue.length)\n // if there is more stuff in the queue, then go right to the next item, otherwise, we dont want to thrash if we only have one item on the feed,\n // peek in the queue and see if it is filled with the same\n\n var delay = 1;\n\n if (this.contentQueue.length == 0 || this.contentQueue.length == 1 && this.contentQueue[0].id === newContent.id) {\n // console.debug('showing repeat content anyway since it appears to be the only item')\n this.currentContent[0].duration = newContent.duration;\n delay = newContent.duration * 1000;\n }\n\n this.scheduleNextContent(delay);\n return true;\n } // If we have a current item, but the new item is empty AND the field is supposed to leave the last item shown, then skip the new item\n // and check for a new item in 10 seconds-- not the items duration again since we are already beyond that.\n\n\n if (this.currentContent && this.currentContent.length > 0 && newContent.type === 'Empty' && !this.clearContentWhenEmpty) {\n this.status = 'leaving last piece of content, trying again in 10 seconds';\n console.debug(this.field.id, this.field.name, this.status);\n this.scheduleNextContent(10 * 1000);\n return true;\n }\n\n if (!this.loadContent(newContent)) {\n // The content failed to load.\n console.log(this.field.id, this.field.name, 'Unable to load ' + newContent.type + ' content');\n this.contentErrorCount++; // Allow the field to retry 5 times quickly.\n\n if (this.contentErrorCount <= 5) {\n // Move on to the next content -- instead of calling recursively, use the scheduler\n // this.loadNextContent();\n if (this.debouncedScheduleNextContent !== null) {\n // if there is a pending call then do it now\n this.debouncedScheduleNextContent.flush();\n } else {\n this.scheduleNextContent(10 * 1000);\n this.status = 'Retrying ' + this.contentErrorCount + ' in 10 seconds.';\n console.debug(this.field.id, this.field.name, this.status);\n }\n } else {\n // try again in half minute increments up to ten minutes since we are having problems fetching data\n var retryDuration = Math.min((this.contentErrorCount - 1) * 30, 1200);\n this.status = 'Retrying ' + this.contentErrorCount + ' in ' + retryDuration + ' seconds.';\n console.debug(this.field.id, this.field.name, this.status);\n this.scheduleNextContent(retryDuration * 1000);\n }\n\n return false;\n } else {\n // The content loaded sucessfully.\n this.contentErrorCount = 0;\n this.lastUpdated = Date.now();\n this.status = 'Content ' + this.currentContent[0].contentId + ' - ' + this.currentContent[0].title;\n return true;\n }\n }\n }\n});//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvY2FjaGUtbG9hZGVyL2Rpc3QvY2pzLmpzPyEuL25vZGVfbW9kdWxlcy9iYWJlbC1sb2FkZXIvbGliL2luZGV4LmpzIS4vbm9kZV9tb2R1bGVzL2NhY2hlLWxvYWRlci9kaXN0L2Nqcy5qcz8hLi9ub2RlX21vZHVsZXMvdnVlLWxvYWRlci9saWIvaW5kZXguanM/IS4vc3JjL2NvbXBvbmVudHMvQ29uY2VydG9GaWVsZC52dWU/dnVlJnR5cGU9c2NyaXB0Jmxhbmc9anMmLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vL0NvbmNlcnRvRmllbGQudnVlP2I0NjUiXSwic291cmNlc0NvbnRlbnQiOlsiPHRlbXBsYXRlPlxuICA8ZGl2IGNsYXNzPVwiY29uY2VydG8tZmllbGRcIlxuICAgIDpmaWVsZC1pZD1cImZpZWxkLmlkXCJcbiAgICA6ZmllbGQtbmFtZT1cImZpZWxkLm5hbWVcIlxuICAgIEBjbGljaz1cImZvcmNlTmV4dENvbnRlbnRcIlxuICAgIEBjb25jZXJ0b3RpY2s9XCJjb25jZXJ0b1RpY2tlZFwiXG4gID5cbiAgICA8ZGl2IHYtaWY9XCJkZWJ1Z1wiIGNsYXNzPVwiZGVidWctZmllbGRcIiA6dGl0bGU9XCJkZWJ1Z0ZpZWxkVGl0bGVcIj5GaWVsZCB7e2ZpZWxkLmlkIH19IC0ge3tmaWVsZC5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F0aW9uOiBmdW5jdGlvbigpIHtcbiAgICAgICAgaWYgKHRoaXMuY3VycmVudENvbnRlbnQgJiYgdGhpcy5jdXJyZW50Q29udGVudC5sZW5ndGggIT09IDApIHtcbiAgICAgICAgICByZXR1cm4gdGhpcy5jdXJyZW50Q29udGVudFswXS5kdXJhdGlvblxuICAgICAgICB9XG4gICAgICAgIHJldHVybiAnJ1xuICAgICAgfSxcbiAgICAgIGVtcHR5Q29udGVudDogZnVuY3Rpb24oKSB7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgZHVyYXRpb246IDEwLFxuICAgICAgICAgIGlkOiBEYXRlLm5vdygpLFxuICAgICAgICAgIG5hbWU6ICdFbXB0eSBDb250ZW50IC0gV2FpdGluZycsXG4gICAgICAgICAgdHlwZTogJ0VtcHR5JyxcbiAgICAgICAgICByZW5kZXJfZGV0YWlsczoge31cbiAgICAgICAgfVxuICAgICAgfSxcbiAgICAgIGluSW5mbygpIHtcbiAgICAgICAgbGV0IGluZm8gPSAnJ1xuICAgICAgICBpZiAodGhpcy5maWVsZCAmJiB0aGlzLmZpZWxkLmNvbmZpZyAmJiB0aGlzLmZpZWxkLmNvbmZpZy5lbnRyeV90cmFuc2l0aW9uKVxuICAgICAgICAgIGluZm8gPSB0aGlzLmZpZWxkLmNvbmZpZy5lbnRyeV90cmFuc2l0aW9uICsgJyAtICdcbiAgICAgICAgcmV0dXJuIGluZm9cbiAgICAgIH0sXG4gICAgICBvdXRJbmZvKCkge1xuICAgICAgICBsZXQgaW5mbyA9ICcnXG4gICAgICAgIGlmICh0aGlzLmZpZWxkICYmIHRoaXMuZmllbGQuY29uZmlnICYmIHRoaXMuZmllbGQuY29uZmlnLmV4aXRfdHJhbnNpdGlvbilcbiAgICAgICAgICBpbmZvID0gJyAtICcgKyB0aGlzLmZpZWxkLmNvbmZpZy5leGl0X3RyYW5zaXRpb25cbiAgICAgICAgcmV0dXJuIGluZm9cbiAgICAgIH0sXG4gICAgICBzdXBwcmVzc1JlcGVhdGluZ0NvbnRlbnQoKSB7XG4gICAgICAgIC8vIGZpbmQgb3V0IGlmIHdlIHNob3VsZCBkaXNwbGF5IHJlcGVhdCBjb250ZW50IChkZWZhdWx0IHRvIGZhbHNlKVxuICAgICAgICBsZXQgcmVwZWF0Q29udGVudCA9IHRoaXMuZmllbGQuY29uZmlnWydyZXBlYXRfY29udGVudCddICYmIHRoaXMuZmllbGQuY29uZmlnWydyZXBlYXRfY29udGVudCddID09PSAnUmVsb2FkJ1xuICAgICAgICByZXR1cm4gIXJlcGVhdENvbnRlbnRcbiAgICAgIH0sXG4gICAgICB0cmFuc2l0aW9uSW46IGZ1bmN0aW9uICgpIHtcbiAgICAgICAgLy8gZGVmYXVsdCB0byBmYWRlIGluXG4gICAgICAgIGxldCB0cmFuc2l0aW9uID0gJ2FuaW1hdGVkIGZhZGVJbidcbiAgICAgICAgLy8gbWFwIG9sZCBzZXR0aW5ncyB0byBuZXcgc2V0dGluZ3NcblxuICAgICAgICBpZiAodGhpcy5maWVsZC5jb25maWcgJiYgdGhpcy5maWVsZC5jb25maWcuZW50cnlfdHJhbnNpdGlvbikge1xuICAgICAgICAgIHN3aXRjaCAodGhpcy5maWVsZC5jb25maWcuZW50cnlfdHJhbnNpdGlvbikge1xuICAgICAgICAgICAgY2FzZSAnZmFkZS1pbi1hbmltYXRpb24nOlxuICAgICAgICAgICAgICB0cmFuc2l0aW9uID0gJ2FuaW1hdGVkIGZhZGVJbidcbiAgICAgICAgICAgICAgYnJlYWtcbiAgICAgICAgICAgIGNhc2UgJ3NjYWxlLXVwLWFuaW1hdGlvbic6XG4gICAgICAgICAgICAgIHRyYW5zaXRpb24gPSAnYW5pbWF0ZWQgem9vbUluJ1xuICAgICAgICAgICAgICBicmVha1xuICAgICAgICAgICAgY2FzZSAnc2xpZGUtbGVmdC1hbmltYXRpb24nOlxuICAgICAgICAgICAgY2FzZSAnc2xpZGUtZnJvbS1yaWdodC1hbmltYXRpb24nOlxuICAgICAgICAgICAgICB0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xuICAgICAgICAgIHN3aXRjaCAodGhpcy5maWVsZC5jb25maWcuZXhpdF90cmFuc2l0aW9uKSB7XG4gICAgICAgICAgICBjYXNlICdmYWRlLW91dC1hbmltYXRpb24nOlxuICAgICAgICAgICAgICB0cmFuc2l0aW9uID0gJ2FuaW1hdGVkIGZhZGVPdXQnXG4gICAgICAgICAgICAgIGJyZWFrXG4gICAgICAgICAgICBjYXNlICdzY2FsZS1kb3duLWFuaW1hdGlvbic6XG4gICAgICAgICAgICAgIHRyYW5zaXRpb24gPSAnYW5pbWF0ZWQgem9vbU91dCdcbiAgICAgICAgICAgICAgYnJlYWtcbiAgICAgICAgICAgIGNhc2UgJ3NsaWRlLWxlZnQtYW5pbWF0aW9uJzpcbiAgICAgICAgICAgIGNhc2UgJ3NsaWRlLWZyb20tcmlnaHQtYW5pbWF0aW9uJzpcbiAgICAgICAgICAgICAgdHJhbnNpdGlvbiA9ICdhbmltYXRlZCBzbGlkZU91dExlZnQnXG4gICAgICAgICAgICAgIGJyZWFrXG4gICAgICAgICAgICBjYXNlICdzbGlkZS1yaWdodC1hbmltYXRpb24nOlxuICAgICAgICAgICAgY2FzZSAnc2xpZGUtZnJvbS1sZWZ0LWFuaW1hdGlvbic6XG4gICAgICAgICAgICAgIHRyYW5zaXRpb24gPSAnYW5pbWF0ZWQgc2xpZGVPdXRSaWdodCdcbiAgICAgICAgICAgICAgYnJlYWtcbiAgICAgICAgICAgIGNhc2UgJ3NsaWRlLXVwLWFuaW1hdGlvbic6XG4gICAgICAgICAgICAgIHRyYW5zaXRpb24gPSAnYW5pbWF0ZWQgc2xpZGVPdXRVcCdcbiAgICAgICAgICAgICAgYnJlYWtcbiAgICAgICAgICAgIGNhc2UgJ3NsaWRlLWRvd24tYW5pbWF0aW9uJzpcbiAgICAgICAgICAgICAgdHJhbnNpdGlvbiA9ICdhbmltYXRlZCBzbGlkZU91dERvd24nXG4gICAgICAgICAgICAgIGJyZWFrXG4gICAgICAgICAgICBkZWZhdWx0OlxuICAgICAgICAgICAgICB0cmFuc2l0aW9uID0gdGhpcy5maWVsZC5jb25maWcuZXhpdF90cmFuc2l0aW9uXG4gICAgICAgICAgICAgIGJyZWFrXG4gICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIHJldHVybiB0cmFuc2l0aW9uXG4gICAgICB9XG4gICAgfSxcbiAgICBtb3VudGVkOiBmdW5jdGlvbigpIHtcbiAgICAgIHRoaXMuZmV0Y2hDb250ZW50KClcbiAgICAgIC8vdGhpcy5sb2FkTmV4dENvbnRlbnQoKVxuICAgIH0sXG4gICAgbWV0aG9kczoge1xuICAgICAgY29uY2VydG9UaWNrZWQoKSB7XG4gICAgICAgIGlmICh0aGlzLmRlYnVnKSB7XG4gICAgICAgICAgdGhpcy5kZWNyZW1lbnREdXJhdGlvbigpXG4gICAgICAgIH1cbiAgICAgIH0sXG5cbiAgICAgIGRlY3JlbWVudER1cmF0aW9uKCkge1xuICAgICAgICBpZiAodGhpcy5jdXJyZW50Q29udGVudCAmJiB0aGlzLmN1cnJlbnRDb250ZW50Lmxlbmd0aCA+IDAgJiYgdGhpcy5jdXJyZW50Q29udGVudFswXS5kdXJhdGlvbiA+IDApIHtcbiAgICAgICAgICB0aGlzLmN1cnJlbnRDb250ZW50WzBdLmR1cmF0aW9uLS1cbiAgICAgICAgfVxuICAgICAgfSxcblxuICAgICAgLy8gYWxsb3dzIHVzZXIgdG8gY2xpY2sgdGhyb3VnaCBjb250ZW50XG4gICAgICBmb3JjZU5leHRDb250ZW50KCkge1xuICAgICAgICBpZiAodGhpcy5kZWJvdW5jZWRTY2hlZHVsZU5leHRDb250ZW50KSB7XG4gICAgICAgICAgdGhpcy5kZWJvdW5jZWRTY2hlZHVsZU5leHRDb250ZW50LmZsdXNoKClcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICB0aGlzLnNjaGVkdWxlTmV4dENvbnRlbnQoMSlcbiAgICAgICAgfVxuICAgICAgfSxcblxuICAgICAgLy8gY2hlY2sgZm9yI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jYWxlJzogdGhpcy5sb2NhbGV9XG4gICAgICAgICAgICAgICAgfV1cbiAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgIGlmIChkYXRhID09PSBudWxsIHx8IGRhdGEubGVuZ3RoID09PSAwKSB7XG4gICAgICAgICAgICAgICAgdGhpcy5zdGF0dXMgPSAnbm8gY29udGVudCByZXR1cm5lZCwgdHJ5aW5nIGFnYWluIGluIDEwIHNlY29uZHMnXG4gICAgICAgICAgICAgICAgZGF0YSA9IFsgdGhpcy5lbXB0eUNvbnRlbnQgXTtcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAvLyBjb25zb2xlLmRlYnVnKHRoaXMuZmllbGQuaWQsIHRoaXMuZmllbGQubmFtZSwgJ2RhdGEnLCBkYXRhKVxuICAgICAgICAgICAgLy8gYWRkIGl0IHRvIHRoZSBxdWV1ZVxuICAgICAgICAgICAgQXJyYXkucHJvdG90eXBlLnB1c2guYXBwbHkodGhpcy5jb250ZW50UXVldWUsIGRhdGEpO1xuICAgICAgICAgICAgLy8gZG9udCB3YWl0IHRvIHNob3cgaXQgaWYgd2UgYXJlIGN1cnJlbnRseSBub3Qgc2hvd2luZyBhbnl0aGluZ1xuICAgICAgICAgICAgaWYgKCghdGhpcy5jdXJyZW50Q29udGVudCB8fCB0aGlzLmN1cnJlbnRDb250ZW50LnR5cGUgPT0gJ0VtcHR5JykgJiYgdGhpcy5jb250ZW50UXVldWUubGVuZ3RoID49IDEpIHtcbiAgICAgICAgICAgICAgdGhpcy5zY2hlZHVsZU5leHRDb250ZW50KDEpO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICByZXR1cm4gZGF0YVxuICAgICAgICAgIH0pXG4gICAgICAgICAgLmNhdGNoKChlcnJvcikgPT4ge1xuICAgICAgICAgICAgdGhpcy5zdGF0dXMgPSBcIkFuIGVycm9yIGhhcyBvY2N1cnJlZCBcIiArIGVycm9yLm1lc3NhZ2VcbiAgICAgICA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RGF0YSkge1xuICAgICAgICAgIHRoaXMuc3RhdHVzID0gJ01pc3NpbmcgY29udGVudERhdGEnXG4gICAgICAgICAgY29uc29sZS5lcnJvcih0aGlzLmZpZWxkLmlkLCB0aGlzLmZpZWxkLm5hbWUsICdpbnZhbGlkIGNvbnRlbnREYXRhJylcbiAgICAgICAgICByZXR1cm4gZmFsc2U7XG4gICAgICAgIH1cblxuICAgICAgICBsZXQgc2ltcGxlQ29udGVudERhdGEgPSB7XG4gICAgICAgICAgdGl0bGU6IGNvbnRlbnREYXRhLm5hbWUsXG4gICAgICAgICAgY29udGVudElkOiBjb250ZW50RGF0YS5pZCxcbiAgICAgICAgICBkdXJhdGlvbjogY29udGVudERhdGEuZHVyYXRpb24sXG4gICAgICAgICAgY29uZmlnOiB0aGlzLmZpZWxkLmNvbmZpZyxcbiAgICAgICAgICBiYXNlVXJsOiB0aGlzLmJhc2VVcmwsXG4gICAgICAgICAgdHlwZTogY29udGVudERhdGEudHlwZSxcbiAgICAgICAgICBmaWVsZEhlaWdodDogdGhpcy4kZWwub2Zmc2V0SGVpZ2h0LFxuICAgICAgICAgIGZpZWxkV2lkdGg6IHRoaXMuJGVsLm9mZnNldFdpZHRoXG4gICAgICAgIH07XG5cbiAgICAgICAgLy8gRmxhdHRlbiByZW5kZXJfZGV0YWlsc1xuICAgICAgICBPYmplY3Qua2V5cyhjb250ZW50RGF0YS5yZW5kZXJfZGV0YWlscykuZm9yRWFjaChmdW5jdGlvbihrZXkpIHtcbiAgICAgICAgICBzaW1wbGVDb250ZW50RGF0YVtrZXldID0gY29udGVudERhdGEucmVuZGVyX2RldGFpbHNba2V5XTtcbiAgICAgICAgfSk7XG5cbiAgICAgICAgdGhpcy5jb250ZW50VHlwZSA9ICdDb25jZXJ0bycgKyBjb250ZW50RGF0YS50eXBlO1xuICAgICAgICB0aGlzLmN1cnJlbnRDb250ZW50ID0gW3NpbXBsZUNvbnRlbnREYXRhXTtcblxuICAgICAgICAvLyBjb25zb2xlLmRl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QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBR0E7QUFDQTtBQUNBO0FBREE7QUFDQTtBQUVBO0FBQ0E7QUFDQTtBQUFBO0FBQ0E7QUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFBQTtBQUNBO0FBQ0E7QUFHQTtBQUNBO0FBQ0E7QUFEQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFFQTtBQWhPQTtBQTNKQSIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./node_modules/cache-loader/dist/cjs.js?!./node_modules/babel-loader/lib/index.js!./node_modules/cache-loader/dist/cjs.js?!./node_modules/vue-loader/lib/index.js?!./src/components/ConcertoField.vue?vue&type=script&lang=js&\n");
1153
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core_js_modules_es6_function_name__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core-js/modules/es6.function.name */ \"./node_modules/core-js/modules/es6.function.name.js\");\n/* harmony import */ var core_js_modules_es6_function_name__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es6_function_name__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var core_js_modules_es6_object_keys__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! core-js/modules/es6.object.keys */ \"./node_modules/core-js/modules/es6.object.keys.js\");\n/* harmony import */ var core_js_modules_es6_object_keys__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es6_object_keys__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var core_js_modules_web_dom_iterable__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! core-js/modules/web.dom.iterable */ \"./node_modules/core-js/modules/web.dom.iterable.js\");\n/* harmony import */ var core_js_modules_web_dom_iterable__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_web_dom_iterable__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var core_js_modules_es6_number_constructor__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! core-js/modules/es6.number.constructor */ \"./node_modules/core-js/modules/es6.number.constructor.js\");\n/* harmony import */ var core_js_modules_es6_number_constructor__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es6_number_constructor__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var axios__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! axios */ \"./node_modules/axios/index.js\");\n/* harmony import */ var axios__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(axios__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../utils */ \"./src/utils.js\");\n/* harmony import */ var _ConcertoClientTime__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./ConcertoClientTime */ \"./src/components/ConcertoClientTime.vue\");\n/* harmony import */ var _ConcertoEmpty__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./ConcertoEmpty */ \"./src/components/ConcertoEmpty.vue\");\n/* harmony import */ var _ConcertoGraphic__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./ConcertoGraphic */ \"./src/components/ConcertoGraphic.vue\");\n/* harmony import */ var _ConcertoHtmlText__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./ConcertoHtmlText */ \"./src/components/ConcertoHtmlText.vue\");\n/* harmony import */ var _ConcertoIframe__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./ConcertoIframe */ \"./src/components/ConcertoIframe.vue\");\n/* harmony import */ var _ConcertoRemoteVideo__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./ConcertoRemoteVideo */ \"./src/components/ConcertoRemoteVideo.vue\");\n/* harmony import */ var _ConcertoTicker__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./ConcertoTicker */ \"./src/components/ConcertoTicker.vue\");\n\n\n\n\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n\n/* eslint no-console: 0 */\n\n\n\n\n\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n name: 'ConcertoField',\n props: {\n baseUrl: String,\n debug: Boolean,\n field: Object,\n frontendKey: String,\n locale: String,\n screenId: Number,\n timezone: String\n },\n data: function data() {\n return {\n contentQueue: [],\n contentErrorCount: 0,\n contentType: null,\n currentContent: null,\n debouncedScheduleNextContent: null,\n lastUpdated: 0,\n status: ''\n };\n },\n components: {\n // the \"canned\" content\n ConcertoClientTime: _ConcertoClientTime__WEBPACK_IMPORTED_MODULE_6__[\"default\"],\n ConcertoEmpty: _ConcertoEmpty__WEBPACK_IMPORTED_MODULE_7__[\"default\"],\n ConcertoGraphic: _ConcertoGraphic__WEBPACK_IMPORTED_MODULE_8__[\"default\"],\n ConcertoHtmlText: _ConcertoHtmlText__WEBPACK_IMPORTED_MODULE_9__[\"default\"],\n ConcertoIframe: _ConcertoIframe__WEBPACK_IMPORTED_MODULE_10__[\"default\"],\n ConcertoRemoteVideo: _ConcertoRemoteVideo__WEBPACK_IMPORTED_MODULE_11__[\"default\"],\n ConcertoTicker: _ConcertoTicker__WEBPACK_IMPORTED_MODULE_12__[\"default\"]\n },\n computed: {\n debugFieldTitle: function debugFieldTitle() {\n var _this = this;\n\n var info = [];\n\n if (this.field) {\n if (this.field.style) {\n info.push('style: ' + this.field.style);\n }\n\n Object.keys(this.field.config).forEach(function (key) {\n return info.push(key + ': ' + _this.field.config[key]);\n });\n }\n\n return info.join(' \\n ');\n },\n clearContentWhenEmpty: function clearContentWhenEmpty() {\n // find out if this field should clear the last content when it is empty (default to true)\n var clearContent = this.field.config['screens_clear_last_content'];\n\n if (clearContent == null || typeof clearContent == 'undefined') {\n clearContent = true;\n }\n\n return clearContent;\n },\n duration: function duration() {\n if (this.currentContent && this.currentContent.length !== 0) {\n return this.currentContent[0].duration;\n }\n\n return '';\n },\n emptyContent: function emptyContent() {\n return {\n duration: 10,\n id: Date.now(),\n name: 'Empty Content - Waiting',\n type: 'Empty',\n render_details: {}\n };\n },\n inInfo: function inInfo() {\n var info = '';\n if (this.field && this.field.config && this.field.config.entry_transition) info = this.field.config.entry_transition + ' - ';\n return info;\n },\n outInfo: function outInfo() {\n var info = '';\n if (this.field && this.field.config && this.field.config.exit_transition) info = ' - ' + this.field.config.exit_transition;\n return info;\n },\n suppressRepeatingContent: function suppressRepeatingContent() {\n // find out if we should display repeat content (default to false)\n var repeatContent = this.field.config['repeat_content'] && this.field.config['repeat_content'] === 'Reload';\n return !repeatContent;\n },\n transitionIn: function transitionIn() {\n // default to fade in\n var transition = 'animated fadeIn'; // map old settings to new settings\n\n if (this.field.config && this.field.config.entry_transition) {\n switch (this.field.config.entry_transition) {\n case 'fade-in-animation':\n transition = 'animated fadeIn';\n break;\n\n case 'scale-up-animation':\n transition = 'animated zoomIn';\n break;\n\n case 'slide-left-animation':\n case 'slide-from-right-animation':\n transition = 'animated slideInRight';\n break;\n\n case 'slide-right-animation':\n case 'slide-from-left-animation':\n transition = 'animated slideInLeft';\n break;\n\n case 'slide-down-animation':\n transition = 'animated slideInDown';\n break;\n\n case 'slide-up-animation':\n transition = 'animated slideInUp';\n break;\n\n default:\n transition = this.field.config.entry_transition;\n break;\n }\n }\n\n return transition;\n },\n transitionOut: function transitionOut() {\n // default to fade out\n var transition = 'animated fadeOut'; // map old settings to new settings\n\n if (this.field.config && this.field.config.exit_transition) {\n switch (this.field.config.exit_transition) {\n case 'fade-out-animation':\n transition = 'animated fadeOut';\n break;\n\n case 'scale-down-animation':\n transition = 'animated zoomOut';\n break;\n\n case 'slide-left-animation':\n case 'slide-from-right-animation':\n transition = 'animated slideOutLeft';\n break;\n\n case 'slide-right-animation':\n case 'slide-from-left-animation':\n transition = 'animated slideOutRight';\n break;\n\n case 'slide-up-animation':\n transition = 'animated slideOutUp';\n break;\n\n case 'slide-down-animation':\n transition = 'animated slideOutDown';\n break;\n\n default:\n transition = this.field.config.exit_transition;\n break;\n }\n }\n\n return transition;\n }\n },\n mounted: function mounted() {\n this.fetchContent(); //this.loadNextContent()\n },\n methods: {\n concertoTicked: function concertoTicked() {\n if (this.debug) {\n this.decrementDuration();\n }\n },\n decrementDuration: function decrementDuration() {\n if (this.currentContent && this.currentContent.length > 0 && this.currentContent[0].duration > 0) {\n this.currentContent[0].duration--;\n }\n },\n // allows user to click through content\n forceNextContent: function forceNextContent() {\n if (this.debouncedScheduleNextContent) {\n this.debouncedScheduleNextContent.flush();\n } else {\n this.scheduleNextContent(1);\n }\n },\n // check for frontend key mismatch (which simply means the server wants us to reload the screen)\n // but we will delegate that to the screen component\n isSameFrontendKey: function isSameFrontendKey(key) {\n if (this.frontendKey && key && key !== this.frontendKey) {\n console.debug('different frontend-key detected');\n this.$emit('frontend-key-changed');\n return false;\n }\n\n return true;\n },\n fetchContent: function fetchContent() {\n var _this2 = this;\n\n // console.debug(Date(), this.field.id, this.field.name, 'fetching content')\n this.status = 'fetching content'; // send the field's container's dimensions to the server just in case it wants to use them\n\n var width = this.$el.parentElement.clientWidth;\n var height = this.$el.parentElement.clientHeight;\n var url = _utils__WEBPACK_IMPORTED_MODULE_5__[\"default\"].prefixWithBase(\"/frontend/\" + this.screenId + \"/fields/\" + this.field.id + \"/contents.json?width=\" + width + '&height=' + height, this.baseUrl);\n return axios__WEBPACK_IMPORTED_MODULE_4___default.a.get(url).then(function (response) {\n var data = response.data;\n var key = response.headers['x-concerto-frontend-setup-key']; // only process the contents if the frontend key is the same otherwise the screen is going to reload the page anyway so dont bother\n\n if (_this2.isSameFrontendKey(key)) {\n // since there really is no data for the Time field, mock up an entry\n if (_this2.field.name === \"Time\") {\n _this2.status = _this2.timezone || 'No timezone specified';\n _this2.status += ', ' + (_this2.locale || 'No locale specified');\n data = [{\n 'duration': 15,\n 'id': Date.now(),\n // must be differing so each item is treated as new content\n 'name': 'System Time',\n 'type': 'ClientTime',\n 'render_details': {\n 'timezone': _this2.timezone,\n 'locale': _this2.locale\n }\n }];\n }\n\n if (data === null || data.length === 0) {\n _this2.status = 'no content returned, trying again in 10 seconds';\n data = [_this2.emptyContent];\n }\n } // console.debug(this.field.id, this.field.name, 'data', data)\n // add it to the queue\n\n\n Array.prototype.push.apply(_this2.contentQueue, data); // dont wait to show it if we are currently not showing anything\n\n if ((!_this2.currentContent || _this2.currentContent.type == 'Empty') && _this2.contentQueue.length >= 1) {\n _this2.scheduleNextContent(1);\n }\n\n return data;\n }).catch(function (error) {\n _this2.status = \"An error has occurred \" + error.message;\n var data = [{\n 'duration': 10,\n 'id': Date.now(),\n // must be differing so each item is treated as new content\n 'name': 'Error',\n 'type': 'HtmlText',\n 'render_details': {\n data: 'An error has occurred - ' + error.message\n }\n }]; // an error ocurred, so tell the screen to reload -- it has a nicer error msg\n\n _this2.$emit('frontend-key-changed');\n\n return data;\n });\n },\n\n /**\n * Schedule an attempt to load the next piece of content for this field.\n *\n * @function scheduleNextContent\n * @param {Number} msToWait Number of milliseconds to wait.\n */\n scheduleNextContent: function scheduleNextContent(msToWait) {\n var _this3 = this;\n\n if (this.debouncedScheduleNextContent) {\n console.debug(this.field.id, this.field.name, 'ignoring schedule next content request since already pending');\n return;\n } // keep track of our debounced function so we can flush it later if needed, but if we've been called already\n // then clear our track so we dont try and flush it later.\n\n\n this.debouncedScheduleNextContent = _utils__WEBPACK_IMPORTED_MODULE_5__[\"default\"].debounce(function () {\n _this3.debouncedScheduleNextContent = null;\n\n _this3.loadNextContent();\n }, msToWait);\n this.debouncedScheduleNextContent();\n },\n\n /**\n * Load a piece of content based on the content data.\n *\n * @function loadContent\n * @param {Object} contentData\n * @returns {Boolean} Return true if the content started loading OK.\n */\n loadContent: function loadContent(contentData) {\n if (!contentData) {\n this.status = 'Missing contentData';\n console.error(this.field.id, this.field.name, 'invalid contentData');\n return false;\n }\n\n var simpleContentData = {\n title: contentData.name,\n contentId: contentData.id,\n duration: contentData.duration,\n config: this.field.config,\n baseUrl: this.baseUrl,\n type: contentData.type,\n fieldHeight: this.$el.offsetHeight,\n fieldWidth: this.$el.offsetWidth\n }; // Flatten render_details\n\n Object.keys(contentData.render_details).forEach(function (key) {\n simpleContentData[key] = contentData.render_details[key];\n });\n this.contentType = 'Concerto' + contentData.type;\n this.currentContent = [simpleContentData]; // console.debug('scheduling next content load for ', simpleContentData.duration * 1000)\n\n this.scheduleNextContent(simpleContentData.duration * 1000);\n return true;\n },\n loadNextContent: function loadNextContent() {\n var newContent = this.contentQueue.shift(); // If we got nothing from the queue or it is empty then fetch more, but continue on (since we might\n // have grabbed the last item from the queue and still need to show it).\n\n if (!newContent || this.contentQueue.length < 1) {\n // console.debug(this.field.id, this.field.name, 'queue is empty now so fetching more')\n this.fetchContent();\n }\n\n if (!newContent) {\n // This happens when we empty the queue and the fetchContent routine hasn't completed yet.\n // There was no content in the queue, try again in a few seconds.\n this.scheduleNextContent(10 * 1000);\n return false;\n } // If we have a current item and the new item is the same, then if we are supposed to suppress it, skip the new item.\n // This does not apply to RemoteVideo content since that should restart the video.\n\n\n if (this.currentContent && this.currentContent.length > 0 && this.currentContent[0].contentId === newContent.id && this.suppressRepeatingContent && newContent['type'] !== 'RemoteVideo') {\n this.status = 'skipping same piece of content: ' + newContent.id + ' - ' + newContent.name; // console.debug(Date(), this.field.id, this.field.name, this.status, this.contentQueue.length)\n // if there is more stuff in the queue, then go right to the next item, otherwise, we dont want to thrash if we only have one item on the feed,\n // peek in the queue and see if it is filled with the same\n\n var delay = 1;\n\n if (this.contentQueue.length == 0 || this.contentQueue.length == 1 && this.contentQueue[0].id === newContent.id) {\n // console.debug('showing repeat content anyway since it appears to be the only item')\n this.currentContent[0].duration = newContent.duration;\n delay = newContent.duration * 1000;\n }\n\n this.scheduleNextContent(delay);\n return true;\n } // If we have a current item, but the new item is empty AND the field is supposed to leave the last item shown, then skip the new item\n // and check for a new item in 10 seconds-- not the items duration again since we are already beyond that.\n\n\n if (this.currentContent && this.currentContent.length > 0 && newContent.type === 'Empty' && !this.clearContentWhenEmpty) {\n this.status = 'leaving last piece of content, trying again in 10 seconds';\n console.debug(this.field.id, this.field.name, this.status);\n this.scheduleNextContent(10 * 1000);\n return true;\n }\n\n if (!this.loadContent(newContent)) {\n // The content failed to load.\n console.log(this.field.id, this.field.name, 'Unable to load ' + newContent.type + ' content');\n this.contentErrorCount++; // Allow the field to retry 5 times quickly.\n\n if (this.contentErrorCount <= 5) {\n // Move on to the next content -- instead of calling recursively, use the scheduler\n // this.loadNextContent();\n if (this.debouncedScheduleNextContent !== null) {\n // if there is a pending call then do it now\n this.debouncedScheduleNextContent.flush();\n } else {\n this.scheduleNextContent(10 * 1000);\n this.status = 'Retrying ' + this.contentErrorCount + ' in 10 seconds.';\n console.debug(this.field.id, this.field.name, this.status);\n }\n } else {\n // try again in half minute increments up to ten minutes since we are having problems fetching data\n var retryDuration = Math.min((this.contentErrorCount - 1) * 30, 1200);\n this.status = 'Retrying ' + this.contentErrorCount + ' in ' + retryDuration + ' seconds.';\n console.debug(this.field.id, this.field.name, this.status);\n this.scheduleNextContent(retryDuration * 1000);\n }\n\n return false;\n } else {\n // The content loaded sucessfully.\n this.contentErrorCount = 0;\n this.lastUpdated = Date.now();\n this.status = 'Content ' + this.currentContent[0].contentId + ' - ' + this.currentContent[0].title;\n return true;\n }\n }\n }\n});//# sourceURL=[module]\n//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ICBpZiAodGhpcy5maWVsZCkge1xuICAgICAgICAgIGlmICh0aGlzLmZpZWxkLnN0eWxlKSB7XG4gICAgICAgICAgICBpbmZvLnB1c2goJ3N0eWxlOiAnICsgdGhpcy5maWVsZC5zdHlsZSlcbiAgICAgICAgICB9XG4gICAgICAgICAgT2JqZWN0LmtleXModGhpcy5maWVsZC5jb25maWcpLmZvckVhY2goa2V5ID0+IGluZm8ucHVzaChrZXkgKyAnOiAnICsgdGhpcy5maWVsZC5jb25maWdba2V5XSkpXG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIGluZm8uam9pbignIFxcbiAnKTtcbiAgICAgIH0sXG4gICAgICBjbGVhckNvbnRlbnRXaGVuRW1wdHkoKSB7XG4gICAgICAgIC8vIGZpbmQgb3V0IGlmIHRoaXMgZmllbGQgc2hvdWxkIGNsZWFyIHRoZSBsYXN0IGNvbnRlbnQgd2hlbiBpdCBpcyBlbXB0eSAoZGVmYXVsdCB0byB0cnVlKVxuICAgICAgICBsZXQgY2xlYXJDb250ZW50ID0gdGhpcy5maWVsZC5jb25maWdbJ3NjcmVlbnNfY2xlYXJfbGFzdF9jb250ZW50J11cbiAgICAgICAgaWYgKGNsZWFyQ29udGVudCA9PSBudWxsIHx8IHR5cGVvZiBjbGVhckNvbnRlbnQgPT0gJ3VuZGVmaW5lZCcpIHtcbiAgICAgICAgICBjbGVhckNvbnRlbnQgPSB0cnVlXG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIGNsZWFyQ29udGVudFxuICAgICAgfSxcbiAgICAgIGR1cmF0aW9uOiBmdW5jdGlvbigpIHtcbiAgICAgICAgaWYgKHRoaXMuY3VycmVudENvbnRlbnQgJiYgdGhpcy5jdXJyZW50Q29udGVudC5sZW5ndGggIT09IDApIHtcbiAgICAgICAgICByZXR1cm4gdGhpcy5jdXJyZW50Q29udGVudFswXS5kdXJhdGlvblxuICAgICAgICB9XG4gICAgICAgIHJldHVybiAnJ1xuICAgICAgfSxcbiAgICAgIGVtcHR5Q29udGVudDogZnVuY3Rpb24oKSB7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgZHVyYXRpb246IDEwLFxuICAgICAgICAgIGlkOiBEYXRlLm5vdygpLFxuICAgICAgICAgIG5hbWU6ICdFbXB0eSBDb250ZW50IC0gV2FpdGluZycsXG4gICAgICAgICAgdHlwZTogJ0VtcHR5JyxcbiAgICAgICAgICByZW5kZXJfZGV0YWlsczoge31cbiAgICAgICAgfVxuICAgICAgfSxcbiAgICAgIGluSW5mbygpIHtcbiAgICAgICAgbGV0IGluZm8gPSAnJ1xuICAgICAgICBpZiAodGhpcy5maWVsZCAmJiB0aGlzLmZpZWxkLmNvbmZpZyAmJiB0aGlzLmZpZWxkLmNvbmZpZy5lbnRyeV90cmFuc2l0aW9uKVxuICAgICAgICAgIGluZm8gPSB0aGlzLmZpZWxkLmNvbmZpZy5lbnRyeV90cmFuc2l0aW9uICsgJyAtICdcbiAgICAgICAgcmV0dXJuIGluZm9cbiAgICAgIH0sXG4gICAgICBvdXRJbmZvKCkge1xuICAgICAgICBsZXQgaW5mbyA9ICcnXG4gICAgICAgIGlmICh0aGlzLmZpZWxkICYmIHRoaXMuZmllbGQuY29uZmlnICYmIHRoaXMuZmllbGQuY29uZmlnLmV4aXRfdHJhbnNpdGlvbilcbiAgICAgICAgICBpbmZvID0gJyAtICcgKyB0aGlzLmZpZWxkLmNvbmZpZy5leGl0X3RyYW5zaXRpb25cbiAgICAgICAgcmV0dXJuIGluZm9cbiAgICAgIH0sXG4gICAgICBzdXBwcmVzc1JlcGVhdGluZ0NvbnRlbnQoKSB7XG4gICAgICAgIC8vIGZpbmQgb3V0IGlmIHdlIHNob3VsZCBkaXNwbGF5IHJlcGVhdCBjb250ZW50IChkZWZhdWx0IHRvIGZhbHNlKVxuICAgICAgICBsZXQgcmVwZWF0Q29udGVudCA9IHRoaXMuZmllbGQuY29uZmlnWydyZXBlYXRfY29udGVudCddICYmIHRoaXMuZmllbGQuY29uZmlnWydyZXBlYXRfY29udGVudCddID09PSAnUmVsb2FkJ1xuICAgICAgICByZXR1cm4gIXJlcGVhdENvbnRlbnRcbiAgICAgIH0sXG4gICAgICB0cmFuc2l0aW9uSW46IGZ1bmN0aW9uICgpIHtcbiAgICAgICAgLy8gZGVmYXVsdCB0byBmYWRlIGluXG4gICAgICAgIGxldCB0cmFuc2l0aW9uID0gJ2FuaW1hdGVkIGZhZGVJbidcbiAgICAgICAgLy8gbWFwIG9sZCBzZXR0aW5ncyB0byBuZXcgc2V0dGluZ3NcblxuICAgICAgICBpZiAodGhpcy5maWVsZC5jb25maWcgJiYgdGhpcy5maWVsZC5jb25maWcuZW50cnlfdHJhbnNpdGlvbikge1xuICAgICAgICAgIHN3aXRjaCAodGhpcy5maWVsZC5jb25maWcuZW50cnlfdHJhbnNpdGlvbikge1xuICAgICAgICAgICAgY2FzZSAnZmFkZS1pbi1hbmltYXRpb24nOlxuICAgICAgICAgICAgICB0cmFuc2l0aW9uID0gJ2FuaW1hdGVkIGZhZGVJbidcbiAgICAgICAgICAgICAgYnJlYWtcbiAgICAgICAgICAgIGNhc2UgJ3NjYWxlLXVwLWFuaW1hdGlvbic6XG4gICAgICAgICAgICAgIHRyYW5zaXRpb24gPSAnYW5pbWF0ZWQgem9vbUluJ1xuICAgICAgICAgICAgICBicmVha1xuICAgICAgICAgICAgY2FzZSAnc2xpZGUtbGVmdC1hbmltYXRpb24nOlxuICAgICAgICAgICAgY2FzZSAnc2xpZGUtZnJvbS1yaWdodC1hbmltYXRpb24nOlxuICAgICAgICAgICAgICB0cmFuc2l0aW9uID0gJ2FuaW1hdGVkIHNsaWRlSW5SaWdodCdcbiAgICAgICAgICAgICAgYnJlYWtcbiAgICAgICAgICAgIGNhc2UgJ3NsaWRlLXJpZ2h0LWFuaW1hdGlvbic6XG4gICAgICAgICAgICBjYXNlICdzbGlkZS1mcm9tLWxlZnQtYW5pbWF0aW9uJzpcbiAgICAgICAgICAgICAgdHJhbnNpdGlvbiA9ICdhbmltYXRlZCBzbGlkZUluTGVmdCdcbiAgICAgICAgICAgICAgYnJlYWtcbiAgICAgICAgICAgIGNhc2UgJ3NsaWRlLWRvd24tYW5pbWF0aW9uJzpcbiAgICAgICAgICAgICAgdHJhbnNpdGlvbiA9ICdhbmltYXRlZCBzbGlkZUluRG93bidcbiAgICAgICAgICAgICAgYnJlYWtcbiAgICAgICAgICAgIGNhc2UgJ3NsaWRlLXVwLWFuaW1hdGlvbic6XG4gICAgICAgICAgICAgIHRyYW5zaXRpb24gPSAnYW5pbWF0ZWQgc2xpZGVJblVwJ1xuICAgICAgICAgICAgICBicmVha1xuICAgICAgICAgICAgZGVmYXVsdDpcbiAgICAgICAgICAgICAgdHJhbnNpdGlvbiA9IHRoaXMuZmllbGQuY29uZmlnLmVudHJ5X3RyYW5zaXRpb25cbiAgICAgICAgICAgICAgYnJlYWtcbiAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIHRyYW5zaXRpb25cbiAgICAgIH0sXG4gICAgICB0cmFuc2l0aW9uT3V0OiBmdW5jdGlvbiAoKSB7XG4gICAgICAgIC8vIGRlZmF1bHQgdG8gZmFkZSBvdXRcbiAgICAgICAgbGV0IHRyYW5zaXRpb24gPSAnYW5pbWF0ZWQgZmFkZU91dCdcbiAgICAgICAgLy8gbWFwIG9sZCBzZXR0aW5ncyB0byBuZXcgc2V0dGluZ3NcbiAgICAgICAgaWYgKHRoaXMuZmllbGQuY29uZmlnICYmIHRoaXMuZmllbGQuY29uZmlnLmV4aXRfdHJhbnNpdGlvbikge1xuICAgICAgICAgIHN3aXRjaCAodGhpcy5maWVsZC5jb25maWcuZXhpdF90cmFuc2l0aW9uKSB7XG4gICAgICAgICAgICBjYXNlICdmYWRlLW91dC1hbmltYXRpb24nOlxuICAgICAgICAgICAgICB0cmFuc2l0aW9uID0gJ2FuaW1hdGVkIGZhZGVPdXQnXG4gICAgICAgICAgICAgIGJyZWFrXG4gICAgICAgICAgICBjYXNlICdzY2FsZS1kb3duLWFuaW1hdGlvbic6XG4gICAgICAgICAgICAgIHRyYW5zaXRpb24gPSAnYW5pbWF0ZWQgem9vbU91dCdcbiAgICAgICAgICAgICAgYnJlYWtcbiAgICAgICAgICAgIGNhc2UgJ3NsaWRlLWxlZnQtYW5pbWF0aW9uJzpcbiAgICAgICAgICAgIGNhc2UgJ3NsaWRlLWZyb20tcmlnaHQtYW5pbWF0aW9uJzpcbiAgICAgICAgICAgICAgdHJhbnNpdGlvbiA9ICdhbmltYXRlZCBzbGlkZU91dExlZnQnXG4gICAgICAgICAgICAgIGJyZWFrXG4gICAgICAgICAgICBjYXNlICdzbGlkZS1yaWdodC1hbmltYXRpb24nOlxuICAgICAgICAgICAgY2FzZSAnc2xpZGUtZnJvbS1sZWZ0LWFuaW1hdGlvbic6XG4gICAgICAgICAgICAgIHRyYW5zaXRpb24gPSAnYW5pbWF0ZWQgc2xpZGVPdXRSaWdodCdcbiAgICAgICAgICAgICAgYnJlYWtcbiAgICAgICAgICAgIGNhc2UgJ3NsaWRlLXVwLWFuaW1hdGlvbic6XG4gICAgICAgICAgICAgIHRyYW5zaXRpb24gPSAnYW5pbWF0ZWQgc2xpZGVPdXRVcCdcbiAgICAgICAgICAgICAgYnJlYWtcbiAgICAgICAgICAgIGNhc2UgJ3NsaWRlLWRvd24tYW5pbWF0aW9uJzpcbiAgICAgICAgICAgICAgdHJhbnNpdGlvbiA9ICdhbmltYXRlZCBzbGlkZU91dERvd24nXG4gICAgICAgICAgICAgIGJyZWFrXG4gICAgICAgICAgICBkZWZhdWx0OlxuICAgICAgICAgICAgICB0cmFuc2l0aW9uID0gdGhpcy5maWVsZC5jb25maWcuZXhpdF90cmFuc2l0aW9uXG4gICAgICAgICAgICAgIGJyZWFrXG4gICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIHJldHVybiB0cmFuc2l0aW9uXG4gICAgICB9XG4gICAgfSxcbiAgICBtb3VudGVkOiBmdW5jdGlvbigpIHtcbiAgICAgIHRoaXMuZmV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saWVudFRpbWUnLFxuICAgICAgICAgICAgICAgICAgJ3JlbmRlcl9kZXRhaWxzJzogeyd0aW1lem9uZSc6IHRoaXMudGltZXpvbmUsICdsb2NhbGUnOiB0aGlzLmxvY2FsZX1cbiAgICAgICAgICAgICAgICB9XVxuICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgaWYgKGRhdGEgPT09IG51bGwgfHwgZGF0YS5sZW5ndGggPT09IDApIHtcbiAgICAgICAgICAgICAgICB0aGlzLnN0YXR1cyA9ICdubyBjb250ZW50IHJldHVybmVkLCB0cnlpbmcgYWdhaW4gaW4gMTAgc2Vjb25kcydcbiAgICAgICAgICAgICAgICBkYXRhID0gWyB0aGlzLmVtcHR5Q29udGVudCBdO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIC8vIGNvbnNvbGUuZGVidWcodGhpcy5maWVsZC5pZCwgdGhpcy5maWVsZC5uYW1lLCAnZGF0YScsIGRhdGEpXG4gICAgICAgICAgICAvLyBhZGQgaXQgdG8gdGhlIHF1ZXVlXG4gICAgICAgICAgICBBcnJheS5wcm90b3R5cGUucHVzaC5hcHBseSh0aGlzLmNvbnRlbnRRdWV1ZSwgZGF0YSk7XG4gICAgICAgICAgICAvLyBkb250IHdhaXQgdG8gc2hvdyBpdCBpZiB3ZSBhcmUgY3VycmVudGx5IG5vdCBzaG93aW5nIGFueXRoaW5nXG4gICAgICAgICAgICBpZiAoKCF0aGlzLmN1cnJlbnRDb250ZW50IHx8IHRoaXMuY3VycmVudENvbnRlbnQudHlwZSA9PSAnRW1wdHknKSAmJiB0aGlzLmNvbnRlbnRRdWV1ZS5sZW5ndGggPj0gMSkge1xuICAgICAgICAgICAgICB0aGlzLnNjaGVkdWxlTmV4dENvbnRlbnQoMSk7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIHJldHVybiBkYXRhXG4gICAgICAgICAgfSlcbiAgICAgICAgICAuY2F0Y2goKGVycm9yKSA9Pi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BzdGFydGVkIGxvYWRpbmcgT0suXG4gICAgICAgKi9cbiAgICAgIGxvYWRDb250ZW50IChjb250ZW50RGF0YSkge1xuICAgICAgICBpZiAoIWNvbnRlbnREYXRhKSB7XG4gICAgICAgICAgdGhpcy5zdGF0dXMgPSAnTWlzc2luZyBjb250ZW50RGF0YSdcbiAgICAgICAgICBjb25zb2xlLmVycm9yKHRoaXMuZmllbGQuaWQsIHRoaXMuZmllbGQubmFtZSwgJ2ludmFsaWQgY29udGVudERhdGEnKVxuICAgICAgICAgIHJldHVybiBmYWxzZTtcbiAgICAgICAgfVxuXG4gICAgICAgIGxldCBzaW1wbGVDb250ZW50RGF0YSA9IHtcbiAgICAgICAgICB0aXRsZTogY29udGVudERhdGEubmFtZSxcbiAgICAgICAgICBjb250ZW50SWQ6IGNvbnRlbnREYXRhLmlkLFxuICAgICAgICAgIGR1cmF0aW9uOiBjb250ZW50RGF0YS5kdXJhdGlvbixcbiAgICAgICAgICBjb25maWc6IHRoaXMuZmllbGQuY29uZmlnLFxuICAgICAgICAgIGJhc2VVcmw6IHRoaXMuYmFzZVVybCxcbiAgICAgICAgICB0eXBlOiBjb250ZW50RGF0YS50eXBlLFxuICAgICAgICAgIGZpZWxkSGVpZ2h0OiB0aGlzLiRlbC5vZmZzZXRIZWlnaHQsXG4gICAgICAgICAgZmllbGRXaWR0aDogdGhpcy4kZWwub2Zmc2V0V2lkdGhcbiAgICAgICAgfTtcblxuICAgICAgICAvLyBGbGF0dGVuIHJlbmRlcl9kZXRhaWxzXG4gICAgICAgIE9iamVjdC5rZXlzKGNvbnRlbnREYXRhLnJlbmRlcl9kZXRhaWxzKS5mb3JFYWNoKGZ1bmN0aW9uKGtleSkge1xuICAgICAgICAgIHNpbXBsZUNvbnRlbnREYXRhW2tleV0gPSBjb250ZW50RGF0YS5yZW5kZXJfZGV0YWlsc1trZXldO1xuICAgICAgICB9KTtcblxuICAgICAgICB0aGlzLmNvbnRlbnRUeXBlID0gJ0NvbmNlcnRvJy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YgKHRoaXMuY29udGVudEVycm9yQ291bnQgPD0gNSkge1xuICAgICAgICAgICAgLy8gTW92ZSBvbiB0byB0aGUgbmV4dCBjb250ZW50IC0tIGluc3RlYWQgb2YgY2FsbGluZyByZWN1cnNpdmVseSwgdXNlIHRoZSBzY2hlZHVsZXJcbiAgICAgICAgICAgIC8vIHRoaXMubG9hZE5leHRDb250ZW50KCk7XG4gICAgICAgICAgICBpZiAodGhpcy5kZWJvdW5jZWRTY2hlZHVsZU5leHRDb250ZW50ICE9PSBudWxsKSB7XG4gICAgICAgICAgICAgIC8vIGlmIHRoZXJlIGlzIGEgcGVuZGluZyBjYWxsIHRoZW4gZG8gaXQgbm93XG4gICAgICAgICAgICAgIHRoaXMuZGVib3VuY2VkU2NoZWR1bGVOZXh0Q29udGVudC5mbHVzaCgpXG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICB0aGlzLnNjaGVkdWxlTmV4dENvbnRlbnQoMTAgKiAxMDAwKTtcbiAgICAgICAgICAgICAgdGhpcy5zdGF0dXMgPSAnUmV0cnlpbmcgJyArIHRoaXMuY29udGVudEVycm9yQ291bnQgKyAnIGluIDEwIHNlY29uZHMuJ1xuICAgICAgICAgICAgICBjb25zb2xlLmRlYnVnKHRoaXMuZmllbGQuaWQsIHRoaXMuZmllbGQubmFtZSwgdGhpcy5zdGF0dXMpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAvLyB0cnkgYWdhaW4gaW4gaGFsZiBtaW51dGUgaW5jcmVtZW50cyB1cCB0byB0ZW4gbWludXRlcyBzaW5jZSB3ZSBhcmUgaGF2aW5nIHByb2JsZW1zIGZldGNoaW5nIGRhdGFcbiAgICAgICAgICAgIGxldCByZXRyeUR1cmF0aW9uID0gTWF0aC5taW4oKHRoaXMuY29udGVudEVycm9yQ291bnQgLSAxKSAqIDMwLCAxMjAwKTtcbiAgICAgICAgICAgIHRoaXMuc3RhdHVzID0gJ1JldH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UFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQVJBO0FBQ0E7QUFXQTtBQUNBO0FBQ0E7QUFFQTtBQUNBO0FBQ0E7QUFFQTtBQUNBO0FBQ0E7QUFHQTtBQUNBO0FBR0E7QUFDQTtBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFHQTtBQUNBO0FBQ0E7QUFEQTtBQUNBO0FBRUE7QUFDQTtBQUNBO0FBQUE7QUFDQTtBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUFBO0FBQ0E7QUFDQTtBQUdBO0FBQ0E7QUFDQTtBQURBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUVBO0FBbk9BO0FBM0pBIiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///./node_modules/cache-loader/dist/cjs.js?!./node_modules/babel-loader/lib/index.js!./node_modules/cache-loader/dist/cjs.js?!./node_modules/vue-loader/lib/index.js?!./src/components/ConcertoField.vue?vue&type=script&lang=js&\n");
1154
1154
 
1155
1155
  /***/ }),
1156
1156
 
@@ -1210,7 +1210,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core
1210
1210
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
1211
1211
 
1212
1212
  "use strict";
1213
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core_js_modules_es6_object_keys__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core-js/modules/es6.object.keys */ \"./node_modules/core-js/modules/es6.object.keys.js\");\n/* harmony import */ var core_js_modules_es6_object_keys__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es6_object_keys__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var core_js_modules_web_dom_iterable__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! core-js/modules/web.dom.iterable */ \"./node_modules/core-js/modules/web.dom.iterable.js\");\n/* harmony import */ var core_js_modules_web_dom_iterable__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_web_dom_iterable__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var axios__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! axios */ \"./node_modules/axios/index.js\");\n/* harmony import */ var axios__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(axios__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../utils */ \"./src/utils.js\");\n/* harmony import */ var _ConcertoField_vue__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./ConcertoField.vue */ \"./src/components/ConcertoField.vue\");\n\n\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n\n/* eslint no-console: 0 */\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n name: 'ConcertoScreen',\n components: {\n ConcertoField: _ConcertoField_vue__WEBPACK_IMPORTED_MODULE_4__[\"default\"]\n },\n data: function data() {\n return {\n setup: null,\n setupKey: null,\n status: null\n };\n },\n props: {\n debug: Boolean,\n screen: Object\n },\n computed: {\n backgroundImage: function backgroundImage() {\n var style = '';\n\n if (this.setup && this.setup.template && this.setup.template.path) {\n var url = _utils__WEBPACK_IMPORTED_MODULE_3__[\"default\"].prefixWithBase(this.setup.template.path, this.screen.baseUrl);\n style = \"background-image: url('\" + url + \"');\";\n }\n\n return style;\n },\n templateElementId: function templateElementId() {\n return 'template_' + this.setup.template.id;\n }\n },\n created: function created() {\n var _this = this;\n\n // trigger an event on the fields every second so they can update their debug duration label\n setInterval(function () {\n _this.$el.querySelectorAll('.concerto-field').forEach(function (el) {\n var ev = new Event('concertotick');\n el.dispatchEvent(ev);\n });\n }, 1000);\n },\n mounted: function mounted() {\n this.fetchSetup();\n },\n methods: {\n fieldInfo: function fieldInfo(position) {\n var field = {\n style: position.style\n };\n Object.keys(position.field).forEach(function (key) {\n field[key] = position.field[key];\n });\n return field;\n },\n fetchSetup: function fetchSetup() {\n var _this2 = this;\n\n this.status = \"fetching screen configuration...\";\n var url = this.screen.baseUrl + '/frontend/' + this.screen.id + '/setup.json';\n return axios__WEBPACK_IMPORTED_MODULE_2___default.a.get(url).then(function (response) {\n _this2.setup = response.data;\n _this2.setupKey = response.headers['x-concerto-frontend-setup-key'];\n _this2.status = null; // force the observer to resolve\n // console.debug('data', JSON.parse(JSON.stringify(this.setup)), 'key', this.setupKey)\n\n /* load the css if any */\n\n if (_this2.setup.template.css_path && _this2.setup.template.css_path != \"\") {\n var css_link = document.createElement(\"link\");\n css_link.type = \"text/css\";\n css_link.rel = \"stylesheet\";\n css_link.href = _utils__WEBPACK_IMPORTED_MODULE_3__[\"default\"].prefixWithBase(_this2.setup.template.css_path, _this2.screen.baseUrl);\n document.head.appendChild(css_link);\n }\n }).catch(function (error) {\n _this2.status = 'An error has ocurred - ' + error.message;\n console.error(_this2.status); // try again in 15 seconds, via event loop so we dont nest calls\n\n setTimeout(_this2.fetchSetup, 15 * 1000);\n });\n },\n frontendKeyChanged: function frontendKeyChanged() {\n console.debug('got notified that the frontend key has changed!');\n document.location.reload();\n },\n positionElementId: function positionElementId(position) {\n return 'position_' + position.id;\n },\n positionStyle: function positionStyle(position) {\n var style = \"left: \" + (position.left * 100).toFixed(2) + \"%; \" + \"top: \" + (position.top * 100).toFixed(2) + \"%; \" + \"width: \" + ((position.right - position.left) * 100).toFixed(2) + \"%; \" + \"height: \" + ((position.bottom - position.top) * 100).toFixed(2) + \"%;\";\n return style;\n }\n }\n});//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvY2FjaGUtbG9hZGVyL2Rpc3QvY2pzLmpzPyEuL25vZGVfbW9kdWxlcy9iYWJlbC1sb2FkZXIvbGliL2luZGV4LmpzIS4vbm9kZV9tb2R1bGVzL2NhY2hlLWxvYWRlci9kaXN0L2Nqcy5qcz8hLi9ub2RlX21vZHVsZXMvdnVlLWxvYWRlci9saWIvaW5kZXguanM/IS4vc3JjL2NvbXBvbmVudHMvQ29uY2VydG9TY3JlZW4udnVlP3Z1ZSZ0eXBlPXNjcmlwdCZsYW5nPWpzJi5qcyIsInNvdXJjZXMiOlsid2VicGFjazovLy9Db25jZXJ0b1NjcmVlbi52dWU/Y2RhMSJdLCJzb3VyY2VzQ29udGVudCI6WyI8dGVtcGxhdGU+XG4gIDxkaXYgY2xhc3M9XCJjb25jZXJ0by1zY3JlZW5cIiA6Y2xhc3M9XCJ7ZGVidWc6IGRlYnVnLCBwcmV2aWV3OiBzY3JlZW4uaXNQcmV2aWV3fVwiPlxuICAgIDxkaXYgdi1pZj1cImRlYnVnICYmIHNldHVwXCIgY2xhc3M9XCJkZWJ1Zy1zY3JlZW5cIj5TY3JlZW4ge3tzZXR1cC5pZH19IC0ge3tzZXR1cC5uYW1lfX08L2Rpdj5cbiAgICA8ZGl2IHYtaWY9XCJzZXR1cCAmJiBzZXR1cC50ZW1wbGF0ZVwiIDppZD1cInRlbXBsYXRlRWxlbWVudElkXCIgY2xhc3M9XCJjb25jZXJ0by10ZW1wbGF0ZVwiIDpzdHlsZT1cImJhY2tncm91bmRJbWFnZVwiPlxuICAgICAgPGRpdiB2LWlmPVwiZGV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dXAoKSB7XG4gICAgICAgIHRoaXMuc3RhdHVzID0gXCJmZXRjaGluZyBzY3JlZW4gY29uZmlndXJhdGlvbi4uLlwiXG4gICAgICAgIGxldCB1cmwgPSB0aGlzLnNjcmVlbi5iYXNlVXJsICsgJy9mcm9udGVuZC8nICsgdGhpcy5zY3JlZW4uaWQgKyAnL3NldHVwLmpzb24nXG4gICAgICAgIHJldHVybiBheGlvcy5nZXQodXJsKVxuICAgICAgICAgIC50aGVuKChyZXNwb25zZSkgPT4ge1xuICAgICAgICAgICAgdGhpcy5zZXR1cCA9IHJlc3BvbnNlLmRhdGFcbiAgICAgICAgICAgIHRoaXMuc2V0dXBLZXkgPSByZXNwb25zZS5oZWFkZXJzWyd4LWNvbmNlcnRvLWZyb250ZW5kLXNldHVwLWtleSddXG4gICAgICAgICAgICB0aGlzLnN0YXR1cyA9IG51bGxcbiAgICAgICAgICAgIC8vIGZvcmNlIHRoZSBvYnNlcnZlciB0byByZXNvbHZlXG4gICAgICAgICAgICAvLyBjb25zb2xlLmRlYnVnKCdkYXRhJywgSlNPTi5wYXJzZShKU09OLnN0cmluZ2lmeSh0aGlzLnNldHVwKSksICdrZXknLCB0aGlzLnNldHVwS2V5KVxuXG4gICAgICAgICAgICAvKiBsb2FkIHRoZSBjc3MgaWYgYW55ICovXG4gICAgICAgICAgICBpZiAodGhpcy5zZXR1cC50ZW1wbGF0ZS5jc3NfcGF0aCAmJiB0aGlzLnNldHVwLnRlbXBsYXRlLmNzc19wYXRoICE9IFwiXCIpIHtcbiAgICAgICAgICAgICAgbGV0IGNzc19saW5rID0gZG9jdW1lbnQuY3JlYXRlRWxlbWVudChcImxpbmtcIik7XG4gICAgICAgICAgICAgIGNzc19saW5rLnR5cGUgPSBcInRleHQvY3NzXCI7XG4gICAgICAgICAgICAgIGNzc19saW5rLnJlbCA9IFwic3R5bGVzaGVldFwiO1xuICAgICAgICAgICAgICBjc3NfbGluay5ocmVmID0gdXRpbHMucHJlZml4V2l0aEJhc2UodG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7QUFDQTtBQUNBO0FBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFYQTtBQWFBO0FBQUE7QUFDQTtBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFFQTtBQUNBO0FBQ0E7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQURBO0FBR0E7QUFDQTtBQUNBO0FBRUE7QUFDQTtBQUVBO0FBQUE7QUFDQTtBQUFBO0FBQ0E7QUFDQTtBQUVBO0FBQ0E7QUFDQTtBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUlBO0FBQ0E7QUFwREE7QUEzQ0EiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./node_modules/cache-loader/dist/cjs.js?!./node_modules/babel-loader/lib/index.js!./node_modules/cache-loader/dist/cjs.js?!./node_modules/vue-loader/lib/index.js?!./src/components/ConcertoScreen.vue?vue&type=script&lang=js&\n");
1213
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core_js_modules_es6_object_keys__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core-js/modules/es6.object.keys */ \"./node_modules/core-js/modules/es6.object.keys.js\");\n/* harmony import */ var core_js_modules_es6_object_keys__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es6_object_keys__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var core_js_modules_web_dom_iterable__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! core-js/modules/web.dom.iterable */ \"./node_modules/core-js/modules/web.dom.iterable.js\");\n/* harmony import */ var core_js_modules_web_dom_iterable__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_web_dom_iterable__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var axios__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! axios */ \"./node_modules/axios/index.js\");\n/* harmony import */ var axios__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(axios__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../utils */ \"./src/utils.js\");\n/* harmony import */ var _ConcertoField_vue__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./ConcertoField.vue */ \"./src/components/ConcertoField.vue\");\n\n\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n\n/* eslint no-console: 0 */\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n name: 'ConcertoScreen',\n components: {\n ConcertoField: _ConcertoField_vue__WEBPACK_IMPORTED_MODULE_4__[\"default\"]\n },\n data: function data() {\n return {\n setup: null,\n setupKey: null,\n status: null\n };\n },\n props: {\n debug: Boolean,\n screen: Object\n },\n computed: {\n backgroundImage: function backgroundImage() {\n var style = '';\n\n if (this.setup && this.setup.template && this.setup.template.path) {\n var url = _utils__WEBPACK_IMPORTED_MODULE_3__[\"default\"].prefixWithBase(this.setup.template.path, this.screen.baseUrl);\n style = \"background-image: url('\" + url + \"');\";\n }\n\n return style;\n },\n templateElementId: function templateElementId() {\n return 'template_' + this.setup.template.id;\n }\n },\n created: function created() {\n var _this = this;\n\n // trigger an event on the fields every second so they can update their debug duration label\n setInterval(function () {\n _this.$el.querySelectorAll('.concerto-field').forEach(function (el) {\n var ev = new Event('concertotick');\n el.dispatchEvent(ev);\n });\n }, 1000);\n },\n mounted: function mounted() {\n this.fetchSetup();\n },\n methods: {\n fieldInfo: function fieldInfo(position) {\n var field = {\n style: position.style\n };\n Object.keys(position.field).forEach(function (key) {\n field[key] = position.field[key];\n });\n return field;\n },\n fetchSetup: function fetchSetup() {\n var _this2 = this;\n\n this.status = \"fetching screen configuration...\"; // send the \"screen's\" resolution\n\n var width = this.$el.clientWidth;\n var height = this.$el.clientHeight;\n var url = this.screen.baseUrl + '/frontend/' + this.screen.id + '/setup.json?width=' + width + '&height=' + height;\n return axios__WEBPACK_IMPORTED_MODULE_2___default.a.get(url).then(function (response) {\n _this2.setup = response.data;\n _this2.setupKey = response.headers['x-concerto-frontend-setup-key'];\n _this2.status = null; // force the observer to resolve\n // console.debug('data', JSON.parse(JSON.stringify(this.setup)), 'key', this.setupKey)\n\n /* load the css if any */\n\n if (_this2.setup.template.css_path && _this2.setup.template.css_path != \"\") {\n var css_link = document.createElement(\"link\");\n css_link.type = \"text/css\";\n css_link.rel = \"stylesheet\";\n css_link.href = _utils__WEBPACK_IMPORTED_MODULE_3__[\"default\"].prefixWithBase(_this2.setup.template.css_path, _this2.screen.baseUrl);\n document.head.appendChild(css_link);\n }\n }).catch(function (error) {\n _this2.status = 'An error has ocurred - ' + error.message;\n console.error(_this2.status); // try again in 15 seconds, via event loop so we dont nest calls\n\n setTimeout(_this2.fetchSetup, 15 * 1000);\n });\n },\n frontendKeyChanged: function frontendKeyChanged() {\n console.debug('got notified that the frontend key has changed!');\n document.location.reload();\n },\n positionElementId: function positionElementId(position) {\n return 'position_' + position.id;\n },\n positionStyle: function positionStyle(position) {\n var style = \"left: \" + (position.left * 100).toFixed(2) + \"%; \" + \"top: \" + (position.top * 100).toFixed(2) + \"%; \" + \"width: \" + ((position.right - position.left) * 100).toFixed(2) + \"%; \" + \"height: \" + ((position.bottom - position.top) * 100).toFixed(2) + \"%;\";\n return style;\n }\n }\n});//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXM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0E7QUFGQTtBQUlBO0FBQ0E7QUFDQTtBQUNBO0FBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFYQTtBQWFBO0FBQUE7QUFDQTtBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFFQTtBQUNBO0FBQ0E7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQURBO0FBR0E7QUFDQTtBQUNBO0FBRUE7QUFDQTtBQUVBO0FBQUE7QUFDQTtBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUVBO0FBQ0E7QUFDQTtBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUlBO0FBQ0E7QUF2REE7QUEzQ0EiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./node_modules/cache-loader/dist/cjs.js?!./node_modules/babel-loader/lib/index.js!./node_modules/cache-loader/dist/cjs.js?!./node_modules/vue-loader/lib/index.js?!./src/components/ConcertoScreen.vue?vue&type=script&lang=js&\n");
1214
1214
 
1215
1215
  /***/ }),
1216
1216
 
@@ -2398,7 +2398,7 @@ eval("exports = module.exports = __webpack_require__(/*! ../../node_modules/css-
2398
2398
  /*! no static exports found */
2399
2399
  /***/ (function(module, exports, __webpack_require__) {
2400
2400
 
2401
- eval("exports = module.exports = __webpack_require__(/*! ../../node_modules/css-loader/lib/css-base.js */ \"./node_modules/css-loader/lib/css-base.js\")(false);\n// imports\n\n\n// module\nexports.push([module.i, \"\\n.debug-screen, .debug-screen-status, .debug-template, .debug-position, .debug-field, .debug-field-status, .debug-field-duration {\\n position: absolute;\\n font-family: 'Franklin Gothic Medium', 'Arial Narrow', Arial, sans-serif;\\n top: 0;\\n right: 0;\\n font-size: .6em;\\n padding: .25em 1em;\\n z-index: 1000;\\n background-color: lightgray;\\n opacity: .5;\\n display: inline;\\n font-weight: bold;\\n}\\n.debug-screen, .debug-position {\\n left: 0;\\n right: unset;\\n border-bottom-right-radius: .5em;\\n}\\n.debug-field, .debug-template {\\n border-bottom-left-radius: .5em;\\n}\\n.debug-field-duration {\\n left: unset;\\n top: unset;\\n bottom: 0;\\n right: 0;\\n display: block;\\n overflow: auto;\\n border-top-left-radius: .5em;\\n}\\n.debug-field-status {\\n left: 0;\\n top: unset;\\n bottom: 0;\\n right: unset;\\n display: block;\\n overflow: auto;\\n border-top-right-radius: .5em;\\n}\\n.debug-screen-status {\\n padding: 0;\\n font-size:2em;\\n opacity: 1;\\n display: -webkit-box;\\n display: -ms-flexbox;\\n display: flex;\\n -webkit-box-orient: vertical;\\n -webkit-box-direction: normal;\\n -ms-flex-direction: column;\\n flex-direction: column;\\n -webkit-box-align: center;\\n -ms-flex-align: center;\\n align-items: center;\\n -webkit-box-pack: center;\\n -ms-flex-pack: center;\\n justify-content: center;\\n height: 100%;\\n width: 100%;\\n background-color: black;\\n color: #222;\\n}\\n.debug-screen-status small {\\n font-size: .5em;\\n font-style: italic;\\n}\\ndiv[class^=\\\"debug-\\\"]:hover {\\n opacity: 1;\\n z-index: 2000;\\n}\\n.concerto-screen {\\n display: block;\\n position: relative;\\n width: 100%;\\n height: 100%;\\n cursor: none;\\n}\\n.concerto-screen.preview, .concerto-screen.debug {\\n cursor: auto;\\n}\\n.concerto-position {\\n position: absolute;\\n overflow: hidden;\\n}\\n.debug .concerto-position {\\n border: dashed 1px gray;\\n}\\n.concerto-template {\\n width: 100%;\\n height: 100%;\\n background-size: 100% 100%;\\n background-repeat: no-repeat;\\n}\\n\", \"\"]);\n\n// exports\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base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0aW9uIHtcXG4gIHBvc2l0aW9uOiBhYnNvbHV0ZTtcXG4gIG92ZXJmbG93OiBoaWRkZW47XFxufVxcbi5kZWJ1ZyAuY29uY2VydG8tcG9zaXRpb24ge1xcbiAgYm9yZGVyOiBkYXNoZWQgMXB4IGdyYXk7XFxufVxcbi5jb25jZXJ0by10ZW1wbGF0ZSB7XFxuICB3aWR0aDogMTAwJTtcXG4gIGhlaWdodDogMTAwJTtcXG4gIGJhY2tncm91bmQtc2l6ZTogMTAwJSAxMDAlO1xcbiAgYmFja2dyb3VuZC1yZXBlYXQ6IG5vLXJlcGVhdDtcXG59XFxuXCIsIFwiXCJdKTtcblxuLy8gZXhwb3J0c1xuIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./node_modules/css-loader/index.js?!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/src/index.js?!./node_modules/cache-loader/dist/cjs.js?!./node_modules/vue-loader/lib/index.js?!./src/components/ConcertoScreen.vue?vue&type=style&index=0&lang=css&\n");
2401
+ eval("exports = module.exports = __webpack_require__(/*! ../../node_modules/css-loader/lib/css-base.js */ \"./node_modules/css-loader/lib/css-base.js\")(false);\n// imports\n\n\n// module\nexports.push([module.i, \"\\n.debug-screen, .debug-screen-status, .debug-template, .debug-position, .debug-field, .debug-field-status, .debug-field-duration {\\n position: absolute;\\n font-family: 'Franklin Gothic Medium', 'Arial Narrow', Arial, sans-serif;\\n top: 0;\\n right: 0;\\n font-size: .6em;\\n padding: .25em 1em;\\n z-index: 1000;\\n background-color: lightgray;\\n opacity: .5;\\n display: inline;\\n font-weight: bold;\\n}\\n.debug-screen, .debug-position {\\n left: 0;\\n right: unset;\\n border-bottom-right-radius: .5em;\\n}\\n.debug-field, .debug-template {\\n border-bottom-left-radius: .5em;\\n}\\n.debug-field-duration {\\n left: unset;\\n top: unset;\\n bottom: 0;\\n right: 0;\\n display: block;\\n overflow: auto;\\n border-top-left-radius: .5em;\\n}\\n.debug-field-status {\\n left: 0;\\n top: unset;\\n bottom: 0;\\n right: unset;\\n display: block;\\n overflow: auto;\\n border-top-right-radius: .5em;\\n}\\n.debug-screen-status {\\n padding: 0;\\n font-size:2em;\\n opacity: 1;\\n display: -webkit-box;\\n display: -ms-flexbox;\\n display: flex;\\n -webkit-box-orient: vertical;\\n -webkit-box-direction: normal;\\n -ms-flex-direction: column;\\n flex-direction: column;\\n -webkit-box-align: center;\\n -ms-flex-align: center;\\n align-items: center;\\n -webkit-box-pack: center;\\n -ms-flex-pack: center;\\n justify-content: center;\\n height: 100%;\\n width: 100%;\\n background-color: black;\\n color: #222;\\n}\\n.debug-screen-status small {\\n font-size: .5em;\\n font-style: italic;\\n}\\ndiv[class^=\\\"debug-\\\"]:hover {\\n opacity: 1;\\n z-index: 2000;\\n}\\n.concerto-screen {\\n display: block;\\n position: relative;\\n width: 100%;\\n height: 100%;\\n cursor: none;\\n overflow: hidden; /* no scrollbars */\\n}\\n.concerto-screen.preview, .concerto-screen.debug {\\n cursor: auto;\\n}\\n.concerto-position {\\n position: absolute;\\n overflow: hidden;\\n}\\n.debug .concerto-position {\\n border: dashed 1px gray;\\n}\\n.concerto-template {\\n width: 100%;\\n height: 100%;\\n background-size: 100% 100%;\\n background-repeat: no-repeat;\\n}\\n\", \"\"]);\n\n// exports\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvY3NzLWxvYWRlci9pbmRleC5qcz8hLi9ub2RlX21vZHVsZXMvdnVlLWxvYWRlci9saWIvbG9hZGVycy9zdHlsZVBvc3RMb2FkZXIuanMhLi9ub2RlX21vZHVsZXMvcG9zdGNzcy1sb2FkZXIvc3JjL2luZGV4LmpzPyEuL25vZGVfbW9kdWxlcy9jYWNoZS1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GF0ZSB7XFxuICB3aWR0aDogMTAwJTtcXG4gIGhlaWdodDogMTAwJTtcXG4gIGJhY2tncm91bmQtc2l6ZTogMTAwJSAxMDAlO1xcbiAgYmFja2dyb3VuZC1yZXBlYXQ6IG5vLXJlcGVhdDtcXG59XFxuXCIsIFwiXCJdKTtcblxuLy8gZXhwb3J0c1xuIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./node_modules/css-loader/index.js?!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/src/index.js?!./node_modules/cache-loader/dist/cjs.js?!./node_modules/vue-loader/lib/index.js?!./src/components/ConcertoScreen.vue?vue&type=style&index=0&lang=css&\n");
2402
2402
 
2403
2403
  /***/ }),
2404
2404
 
@@ -1,3 +1,3 @@
1
1
  module ConcertoFrontendVue
2
- VERSION = "0.0.7"
2
+ VERSION = "0.0.9"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: concerto_frontend_vue
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.7
4
+ version: 0.0.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Marvin Frederickson
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-09-26 00:00:00.000000000 Z
11
+ date: 2019-09-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails