From e01dd805090f844aecccfa00da2cc23cadfd8427 Mon Sep 17 00:00:00 2001 From: Alexander Danilov Date: Sun, 30 Jun 2019 00:37:05 +0300 Subject: [PATCH 01/15] Ractive is replaced by Vuejs --- ATTRIBUTION.md | 1 + app/popup/popup.css | 5 +- app/popup/popup.html | 104 +- app/popup/popup.js | 367 +- app/popup/ractive.js | 9 - app/vue.js | 11944 +++++++++++++++++++++++++++++++++++++++++ app/vue.min.js | 6 + 7 files changed, 12148 insertions(+), 288 deletions(-) delete mode 100644 app/popup/ractive.js create mode 100644 app/vue.js create mode 100644 app/vue.min.js diff --git a/ATTRIBUTION.md b/ATTRIBUTION.md index 269bf6e..abbd2ce 100644 --- a/ATTRIBUTION.md +++ b/ATTRIBUTION.md @@ -2,3 +2,4 @@ - [highlight.js; BSD License](https://github.com/highlightjs/highlight.js) - [MaterialIcons; Apache License 2.0](https://github.com/google/material-design-icons/issues/786#issuecomment-487055009) +- [Vue.js; MIT License](https://vuejs.org/) ([v2.6.10](https://github.com/vuejs/vue/archive/v2.6.10.zip)) \ No newline at end of file diff --git a/app/popup/popup.css b/app/popup/popup.css index d7223e1..7f0c4b3 100644 --- a/app/popup/popup.css +++ b/app/popup/popup.css @@ -323,9 +323,6 @@ h2:first-letter { .local-server__input__err { color: var(--state-off); } -.local-server__input:first-child { - margin-right: 5px; -} /* * message @@ -343,7 +340,7 @@ h2:first-letter { transition: bottom 0.3s ease-in-out; z-index: 10; } -.message.open { +.message.opened { bottom: 0; } diff --git a/app/popup/popup.html b/app/popup/popup.html index 5bd45a0..76c47be 100644 --- a/app/popup/popup.html +++ b/app/popup/popup.html @@ -10,19 +10,17 @@ -
- - +
{{ message.text }}
+ - + diff --git a/app/popup/popup.js b/app/popup/popup.js index 2c6617c..36aba60 100644 --- a/app/popup/popup.js +++ b/app/popup/popup.js @@ -1,7 +1,7 @@ let updateChannelsData = { - release: {name: 'Release', value: 'release', checked: true}, - test: {name: 'Test builds', value: 'test', checked: false}, - local: {name: 'Local server', value: 'local', checked: false} + release: {name: 'Release', value: 'release'}, + test: {name: 'Test builds', value: 'test',}, + local: {name: 'Local server', value: 'local'} }; let updateIntervalsData = [ {name: 'Every 6 Hours', value: '6'}, @@ -9,194 +9,143 @@ let updateIntervalsData = [ {name: 'Every Day', value: '24'}, {name: 'Every Week', value: '168'} ]; -let updateChannel = 'release'; -let ractive = new Ractive({ - target: '#target-ractive', - template: '#template-ractive', +let app = new Vue({ + el: '#app', data: { + 'IITC_is_enabled': true, 'categories': {}, 'plugins': {}, - 'updateChannel': updateChannel, + 'updateChannel': 'release', 'updateChannels': updateChannelsData, 'updateIntervals': updateIntervalsData, - 'category_name': '' + 'release_update_check_interval': 24, + 'test_update_check_interval': 24, + 'external_update_check_interval': 24, + 'category_name': '', + 'message': {'opened': false, 'text': ''}, + 'showProgressbar': false, + 'localServerHost': '127.0.0.1:8000', + 'localServerStatus': '' + }, + methods: { + 'objIsEmpty': function (obj) { + return ((typeof obj !== 'object') || (Object.keys(obj).length === 0)) + }, + 'openIITC': function () { + chrome.tabs.query({active: true, currentWindow: true}, function(tabs) { + chrome.runtime.sendMessage({'type': "requestOpenIntel", 'tab': tabs[0].id}); + window.close(); + }) + }, + 'toggleIITC': function (event) { + let checkedValue = this.IITC_is_enabled; + chrome.tabs.query({active: true, currentWindow: true}, function(tabs) { + chrome.runtime.sendMessage({'type': "toggleIITC", 'value': checkedValue}); + }) + }, + 'openLink': function (url) { + chrome.tabs.create({ url: url }); + window.close(); + }, + 'back': function () { + document.body.id = "main-menu"; + }, + 'openOptions': function () { + document.body.id = "options"; + checkStatusLocalServer(this.localServerHost); + }, + 'openCategory': function (category_name) { + document.body.id = "plugins"; + this.category_name = category_name; + + let plugins = this.categories[category_name]['plugins']; + Object.keys(plugins).forEach(function(id) { + plugins[id]['icon'] = (plugins[id]['status'] === 'user') ? 'close' : 'toggle_' + plugins[id]['status']; + }); + // Hack to reset the list of plugins. + // Otherwise, duplicate plugins (observed when switching from category UserScripts) are moved to top of the list. + this.plugins = {}; + this.plugins = plugins; + }, + 'managePlugin': function (plugin_id, plugin_category, status) { + let action = null; + if (status === 'on') { + action = "off"; + } else { + action = "on"; + } + this.plugins[plugin_id].status = action; + this.plugins[plugin_id].icon = 'toggle_'+action; + showMessage("Changes will be applied after rebooting Intel"); + chrome.runtime.sendMessage({'type': "managePlugin", 'id': plugin_id, 'category': plugin_category, 'action': action}); + }, + 'deletePlugin': function (plugin_id, plugin_category) { + delete this.plugins[plugin_id]; + showMessage("Changes will be applied after rebooting Intel"); + chrome.runtime.sendMessage({'type': "managePlugin", 'id': plugin_id, 'category': plugin_category, 'action': "delete"}); + }, + 'openSupportUrl': function (event) { + this.openLink(event); + }, + 'savePlugin': function (id) { + chrome.storage.local.get([this.updateChannel+"_plugins_user"], (data) => { + let plugin = data[this.updateChannel+"_plugins_user"][id]; + saveJS(plugin['code'], plugin['filename']); + }); + }, + 'changeUpdateChannel': function (event) { + let updateChannel = event.target.value; + chrome.storage.local.set({ + 'update_channel': updateChannel + }); + showMessage("Update in progress…"); + }, + 'changeUpdateCheckInterval': function (type) { + let key = type+'_update_check_interval'; + + let setData = {}; + setData[key] = this[key]; + + chrome.storage.local.set(setData, () => { + chrome.runtime.sendMessage({'type': (type === 'external') ? "externalUpdate" : "safeUpdate"}); + showMessage("Changes were applied"); + }); + }, + 'forceUpdate': function () { + chrome.runtime.sendMessage({'type': "forceFullUpdate"}); + showMessage("Update in progress…"); + }, + 'changeLocalServer': function () { + let host = event.target.value; + if (checkStatusLocalServer(host)) { + chrome.storage.local.set({ + 'local_server_host': "http://" + host + }, function () { + if (this.updateChannel === 'local') { + this.forceUpdate(); + } + }); + } + } } }); let message_timeout_id = null; function showMessage(msg) { - let block = document.getElementById("message"); - block.innerText = msg; - block.classList.add("open"); + app.$data.message.text = msg; + app.$data.message.opened = true; + clearTimeout(message_timeout_id); message_timeout_id = setTimeout(function(){ - block.classList.remove("open"); + app.$data.message.opened = false; }, 3000); } -ractive.on({ - 'openIITC': function (event) { - event.original.preventDefault(); - chrome.tabs.query({active: true, currentWindow: true}, function(tabs) { - chrome.runtime.sendMessage({'type': "requestOpenIntel", 'tab': tabs[0].id}); - window.close(); - }) - }, - 'toggleIITC': function (event) { - var checkedValue = document.querySelector('#toggleIITC').checked; - chrome.tabs.query({active: true, currentWindow: true}, function(tabs) { - chrome.runtime.sendMessage({'type': "toggleIITC", 'value': checkedValue}); - }) - }, - 'open-link': function (event) { - chrome.tabs.create({ - url: event.node.getAttribute( 'data-href' ) - }); - window.close(); - }, - 'back': function (event) { - document.body.id = "main-menu"; - }, - 'open-options': function (event) { - document.body.id = "options"; - checkStatusLocalServer(); - }, - 'open-category': function (event) { - document.body.id = "plugins"; - let category_name = event.node.getElementsByTagName("span")[0].innerHTML; - ractive.set('category_name', category_name); - - let plugins = ractive.get('categories')[category_name]['plugins']; - Object.keys(plugins).forEach(function(id) { - if (plugins[id]['status'] === 'user') { - plugins[id]['icon'] = 'close'; - } else { - plugins[id]['icon'] = 'toggle_' + plugins[id]['status']; - } - }); - // Hack to reset the list of plugins. - // Otherwise, duplicate plugins (observed when switching from category UserScripts) are moved to top of the list. - ractive.set('plugins', {}); - ractive.set('plugins', plugins); - }, - 'manage-plugin': function (event) { - let plugin_id = event.node.getAttribute( 'data-id' ); - let plugin_category = event.node.getAttribute( 'data-category' ); - let status = event.node.getElementsByClassName("element__action")[0].textContent; - - if (event.node.getAttribute( 'data-prevent' ) === 'true') { - event.node.setAttribute( 'data-prevent', 'false' ); - return; - } - - let action = null; - if (status === 'toggle_on') { - action = "off"; - event.node.classList.remove("on"); - event.node.classList.add('off'); - event.node.getElementsByClassName("element__action")[0].textContent = 'toggle_off'; - } else if (status === 'toggle_off') { - action = "on"; - event.node.classList.remove("off"); - event.node.classList.add('on'); - event.node.getElementsByClassName("element__action")[0].textContent = 'toggle_on'; - } else if (status === 'close') { - action = "delete"; - event.node.classList.remove("user"); - event.node.classList.add('off'); - if (event.node.getElementsByClassName("element__user")[0]) { - event.node.getElementsByClassName("element__user")[0].remove(); - } else { - event.node.remove(); - } - event.node.getElementsByClassName("element__action")[0].textContent = 'toggle_off'; - } - showMessage("Changes will be applied after rebooting Intel"); - chrome.runtime.sendMessage({'type': "managePlugin", 'id': plugin_id, 'category': plugin_category, 'action': action}); - }, - 'delete-plugin': function (event) { - event.node.parentNode.getElementsByClassName("element__action")[0].textContent = 'close'; - }, - 'open-support-url': function (event) { - event.node.parentNode.setAttribute( 'data-prevent', 'true' ); - ractive.fire('open-link', event); - }, - 'save-plugin': function (event) { - event.node.parentNode.setAttribute( 'data-prevent', 'true' ); - let id = event.node.parentNode.getAttribute( 'data-id' ); - chrome.storage.local.get([updateChannel+"_plugins_user"], function(data) { - let plugin = data[updateChannel+"_plugins_user"][id]; - saveJS(plugin['code'], plugin['filename']); - }); - }, - 'change-update-channel': function (event) { - updateChannel = event.node.value; - chrome.storage.local.set({ - 'update_channel': updateChannel - }, function () { - chrome.runtime.sendMessage({'type': "forceFullUpdate"}); - ractive.set('updateChannel', updateChannel); - }); - showMessage("Update in progress…"); - }, - 'change-release-update-check-interval': function (event) { - let val = event.node.value; - chrome.storage.local.set({ - 'release_update_check_interval': val - }, function() { - chrome.runtime.sendMessage({'type': "safeUpdate"}); - showMessage("Changes were applied"); - }); - }, - 'change-test-update-check-interval': function (event) { - let val = event.node.value; - chrome.storage.local.set({ - 'test_update_check_interval': val - }, function() { - chrome.runtime.sendMessage({'type': "safeUpdate"}); - showMessage("Changes were applied"); - }); - }, - 'change-external-update-check-interval': function (event) { - let val = event.node.value; - chrome.storage.local.set({ - 'external_update_check_interval': val - }, function() { - chrome.runtime.sendMessage({'type': "externalUpdate"}); - showMessage("Changes were applied"); - }); - }, - 'force_update': function (event) { - chrome.runtime.sendMessage({'type': "forceFullUpdate"}); - showMessage("Update in progress…"); - }, - 'input-local-server': function () { - checkStatusLocalServer(); - }, - 'change-local-server': function () { - let host = document.getElementById("local-server__input__host").value; - let channel = document.getElementById("local-server__input__channel").value; - chrome.storage.local.set({ - 'local_server_host': "http://"+host, - 'local_server_channel': channel - }, function() { - if (updateChannel === 'local') { - ractive.fire("force_update"); - } - }); - } -}); - chrome.runtime.onMessage.addListener(function(request) { switch (request.type) { case "showProgressbar": - let element = document.getElementById("progressbar"); - if (request.value) { - element.classList.add("active"); - } else { - element.classList.remove("active"); - } + app.$data.showProgressbar = request.value; break; case "showMessage": showMessage(request.message); @@ -209,37 +158,33 @@ chrome.storage.local.get([ "IITC_is_enabled", "update_channel", "local_server_host", - "local_server_channel", "release_plugins", "test_plugins", "local_plugins", "release_update_check_interval", "test_update_check_interval", "external_update_check_interval" ], function(data) { if (data.update_channel) { - updateChannelsData.release.checked = (data.update_channel === 'release'); - updateChannelsData.test.checked = (data.update_channel === 'test'); - updateChannelsData.local.checked = (data.update_channel === 'local'); - ractive.set('updateChannels', updateChannelsData); - updateChannel = data.update_channel; + app.$data.updateChannel = data.update_channel; } - ractive.set('updateChannel', updateChannel); // initialize categories - ractive.set('categories', data[updateChannel+'_plugins']); + app.$data.categories = data[app.$data.updateChannel+'_plugins']; // initialize toggleIITC let status = data.IITC_is_enabled; if (status === false) { - document.querySelector('#toggleIITC').checked = false + app.$data.IITC_is_enabled = false } ['release', 'test', 'external'].forEach(function(channel) { let update_check_interval = data[channel+'_update_check_interval']; - if (!update_check_interval) update_check_interval = 24; - document.getElementById(channel+"_update_check_interval").value = update_check_interval; + if (update_check_interval) { + app.$data[channel+"_update_check_interval"] = update_check_interval; + } }); - if (data.local_server_host) document.getElementById("local-server__input__host").value = data.local_server_host.replace("http://", ""); - if (data.local_server_channel) document.getElementById("local-server__input__channel").value = data.local_server_channel; + if (data.local_server_host) { + app.$data.localServerHost = data.local_server_host.replace("http://", ""); + } }); @@ -253,9 +198,18 @@ chrome.storage.onChanged.addListener(function(changes, namespace) { // namespace, // storageChange.oldValue, // storageChange.newValue); - if (key === updateChannel+"_plugins") { - ractive.set('categories', {}); - ractive.set('categories', storageChange.newValue); + if (key === app.$data.updateChannel+"_plugins") { + app.$data.categories = {}; + app.$data.categories = storageChange.newValue; + let category_name = app.$data.category_name + if (category_name !== '') { + let plugins = app.$data.categories[category_name].plugins; + Object.keys(plugins).forEach(function(id) { + plugins[id]['title'] = ((category_name === 'UserScripts') ? plugins[id]['icon'] : '') + plugins[id]['desc']; + plugins[id]['icon'] = (plugins[id]['status'] === 'user') ? 'close' : 'toggle_' + plugins[id]['status']; + }); + app.$data.plugins = plugins; + } } } @@ -275,35 +229,16 @@ const saveJS = (function () { }; }()); -function checkStatusLocalServer() { - let host = document.getElementById("local-server__input__host").value; - let channel = document.getElementById("local-server__input__channel").value; - - document.getElementById("local-server__input__host").classList.remove("local-server__input__ok"); - document.getElementById("local-server__input__host").classList.add("local-server__input__err"); - document.getElementById("local-server__input__channel").classList.remove("local-server__input__ok"); - document.getElementById("local-server__input__channel").classList.add("local-server__input__err"); - - let xhr1 = new XMLHttpRequest(); - xhr1.open("GET", "http://" + host, true); - xhr1.timeout = 1000; - xhr1.onreadystatechange = function() { - if (xhr1.readyState === 4 && xhr1.status === 200) { - document.getElementById("local-server__input__host").classList.remove("local-server__input__err"); - document.getElementById("local-server__input__host").classList.add("local-server__input__ok"); - } - }; - xhr1.send(null); - +function checkStatusLocalServer(host) { + app.$data.localServerStatus = 'err'; - let xhr2 = new XMLHttpRequest(); - xhr2.open("GET", "http://" + host + "/" + channel + ".json", true); - xhr2.timeout = 1000; - xhr2.onreadystatechange = function() { - if (xhr2.readyState === 4 && xhr2.status === 200) { - document.getElementById("local-server__input__channel").classList.remove("local-server__input__err"); - document.getElementById("local-server__input__channel").classList.add("local-server__input__ok"); + let xhr = new XMLHttpRequest(); + xhr.open("GET", "http://" + host, true); + xhr.timeout = 1000; + xhr.onreadystatechange = function() { + if (xhr.readyState === 4 && xhr.status === 200) { + app.$data.localServerStatus = 'ok'; } }; - xhr2.send(null); + xhr.send(null); } \ No newline at end of file diff --git a/app/popup/ractive.js b/app/popup/ractive.js deleted file mode 100644 index 07f7409..0000000 --- a/app/popup/ractive.js +++ /dev/null @@ -1,9 +0,0 @@ -!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):function(){var n=t.Ractive,i=e();t.Ractive=i,i.noConflict=function(){return t.Ractive=n,i}}()}(this,function(){"use strict";function t(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function e(e){for(var n=[],i=arguments.length-1;i-->0;)n[i]=arguments[i+1];for(var r=0;r0;)e[n]=arguments[n+1];throw t=d(t,e),new Error(t)}function m(){Va.DEBUG&&io.apply(null,arguments)}function v(t){for(var e=[],n=arguments.length-1;n-->0;)e[n]=arguments[n+1];t=d(t,e),ro(t,e)}function g(t){for(var e=[],n=arguments.length-1;n-->0;)e[n]=arguments[n+1];t=d(t,e),uo[t]||(uo[t]=!0,ro(t,e))}function y(){Va.DEBUG&&v.apply(null,arguments)}function b(){Va.DEBUG&&g.apply(null,arguments)}function w(t,e,n){var i=x(t,e,n);return i?i[t][n]:null}function x(t,e,n){for(;e;){if(n in e[t])return e;if(e.isolated)return null;e=e.parent}}function k(t,e,n,i){if(t===e)return null;if(i){var r=w("interpolators",n,i);if(r)return r(t,e)||null;p(po(i,"interpolator"))}return mo.number(t,e)||mo.array(t,e)||mo.object(t,e)||null}function _(t){return h(t)?t.replace(yo,"\\$&"):t}function E(t){return t?t.replace(vo,".$1"):""}function A(t){var e,n=[];for(t=E(t);e=go.exec(t);){var i=e.index+e[1].length;n.push(t.substr(0,i)),t=t.substr(i+1)}return n.push(t),n}function C(t){return h(t)?t.replace(bo,"$1$2"):t}function S(t,e){var n=t.indexOf(e);-1===n&&t.push(e)}function O(t,e){for(var n=0,i=t.length;i>n;n++)if(t[n]==e)return!0;return!1}function j(t,e){var n;if(!Da(t)||!Da(e))return!1;if(t.length!==e.length)return!1;for(n=t.length;n--;)if(t[n]!==e[n])return!1;return!0}function N(t){return h(t)?[t]:c(t)?[]:t}function T(t){return t[t.length-1]}function V(t,e){if(t){var n=t.indexOf(e);-1!==n&&t.splice(n,1)}}function M(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];for(var n=t.concat.apply([],t),i=n.length;i--;){var r=n.indexOf(n[i]);~r&&i>r&&n.splice(i,1)}return n}function P(t){for(var e=[],n=t.length;n--;)e[n]=t[n];return e}function I(t,e){for(var n=t.length,i=0;n>i;i++){var r=e(t[i]);if(r)return r}}function R(t,e,n){var i=t,r=e;n&&(i=i.map(n),r=r.map(n));var s=i.length,a={},o=0,u=i.map(function(t){var e,n=o;do{if(e=r.indexOf(t,n),-1===e)return-1;n=e+1}while(a[e]===!0&&s>n);return e===o&&(o+=1),a[e]=!0,e}),h=u.oldLen=i.length;if(u.newLen=r.length,h===u.newLen){var l=0;for(l;h>l&&u[l]===l;l++);l===h&&(u.same=!0)}return u}function B(t,e){if(!/this/.test(t.toString()))return t;var n=wo.call(t,e);for(var i in t)n[i]=t[i];return n}function K(t,e,n){return n&&u(e)&&t.parent&&t.parent.isRoot?(t.boundValue||(t.boundValue=B(e._r_unbound||e,t.parent.ractive)),t.boundValue):e}function L(t){t.updateFromBindings(!0)}function D(t){for(var e=t.length;e--;)if(t[e].bound){var n=t[e].owner;if(n){var i="checked"===n.name?n.node.checked:n.node.value;return{value:i}}}}function F(t){if(t){var e=xo[t];xo[t]=[];for(var n=e.length;n--;)e[n]();var i=ko[t];for(ko[t]=[],n=i.length;n--;)i[n].model.register(i[n].item)}else F("early"),F("mark")}function z(t,e,n,i){t.shuffling=!0;for(var r=e.length;r--;){var s=e[r];r!==s&&r in t.childByKey&&t.childByKey[r].rebind(~s?t.joinKey(s):void 0,t.childByKey[r],!i)}var a=t.source().length!==t.source().value.length;for(t.links.forEach(function(t){return t.shuffle(e)}),n||F("early"),r=t.deps.length;r--;)t.deps[r].shuffle&&t.deps[r].shuffle(e);t[n?"marked":"mark"](),n||F("mark"),a&&t.notifyUpstream(),t.shuffling=!1}function U(t,e){e!==t.dataModel&&(e&&e.viewmodel&&e.viewmodel.isRoot&&t.childByKey.data?(t.childByKey.data.link(e.viewmodel,"data"),t.dataModel=e):t.dataModel&&(t.childByKey.data.unlink(),t.dataModel=!0))}function $(){So.push(Co=[])}function q(){var t=So.pop();return Co=So[So.length-1],t}function H(t){Co&&Co.push(t)}function Z(t){t.bind()}function W(t){t.cancel()}function G(t){t.destroyed()}function Q(t){t.handleChange()}function Y(t){t.mark()}function J(t){t.mark(!0)}function X(t){t.marked()}function tt(t){t.markedAll()}function et(t){t.render()}function nt(t){t.shuffled()}function it(t){t.teardown()}function rt(t){t.unbind()}function st(t){t.unrender()}function at(t){t.update()}function ot(t){return t.toString()}function ut(t){return t.toString(!0)}function ht(t,e,n,i){var r=t.r||t;if(!r||!h(r))return e;if("."===r||"@"===r[0]||(e||n).isKey||(e||n).isKeypath)return e;var s=r.split("/"),a=A(s[s.length-1]),o=a[a.length-1],u=e||n;u&&1===a.length&&o!==u.key&&i&&(a=lt(o,i)||a);for(var l=a.length,c=!0,f=!1;u&&l--;)u.shuffling&&(f=!0),a[l]!=u.key&&(c=!1),u=u.parent;return!e&&c&&f?n:e&&!c&&f?n:e}function lt(t,e){for(;e;){var n=e.aliases;if(n&&n[t]){for(var i=(e.owner.iterations?e.owner:e).owner.template.z,r=0;rt?t:159>=t?Lu[t-128]:55296>t?t:57343>=t?Hu:65535>=t?t:Fu?t>=65536&&131071>=t?t:t>=131072&&196607>=t?t:Hu:Hu:Hu}function xt(t){var e;return(e=t.matchPattern(Gu))?{t:eu,v:e}:null}function kt(t){var e=t.remaining();return"true"===e.substr(0,4)?(t.pos+=4,{t:su,v:"true"}):"false"===e.substr(0,5)?(t.pos+=5,{t:su,v:"false"}):null}function _t(t){return function(e){for(var n,i='"',r=!1;!r;)n=e.matchPattern(Qu)||e.matchPattern(Yu)||e.matchString(t),n?i+='"'===n?'\\"':"\\'"===n?"'":n:(n=e.matchPattern(Ju),n?i+="\\u"+("000"+n.charCodeAt(1).toString(16)).slice(-4):r=!0);return i+='"',JSON.parse(i)}}function Et(t){var e=t.pos,n=t.matchString("'")||t.matchString('"');if(n){var i=("'"===n?Xu:th)(t);return t.matchString(n)?{t:nu,v:i}:(t.pos=e,null)}return null}function At(t){return JSON.parse('"'+t.replace(nh,Ct)+'"')}function Ct(t){switch(t){case"\n":return"\\n";case"\r":return"\\r";case" ":return"\\t";case"\b":return"\\b";case"\f":return"\\f"}}function St(t){if(!t.matchString("`"))return null;for(var e,n="",i=!1,r=[];!i;)if(e=t.matchPattern(eh)||t.matchPattern(Yu)||t.matchString("$")||t.matchString('"'))if('"'===e)n+='\\"';else if("\\`"===e)n+="`";else if("$"===e)if(t.matchString("{")){r.push({t:nu,v:At(n)}),n="",t.sp();var s=Dt(t);s||t.error("Expected valid expression"),r.push({t:du,x:s}),t.sp(),t.matchString("}")||t.error("Expected closing '}' after interpolated expression")}else n+="$";else n+=e;else e=t.matchPattern(Ju),e?n+="\\u"+("000"+e.charCodeAt(1).toString(16)).slice(-4):i=!0;if(n.length&&r.push({t:nu,v:At(n)}),t.matchString("`")||t.error("Expected closing '`'"),1===r.length)return r[0];for(var a,o=r.pop();a=r.pop();)o={t:mu,s:"+",o:[a,o]};return{t:du,x:o}}function Ot(t){var e;return(e=Et(t))?oh.test(e.v)?e.v:'"'+e.v.replace(/"/g,'\\"')+'"':(e=xt(t))?e.v:(e=t.matchPattern(ih))?e:null}function jt(t){var e,n=t.pos;t.sp();var i="'"!==t.nextChar()&&'"'!==t.nextChar();i&&(e=t.matchPattern(rh));var r=e?Dt(t):Ot(t);if(null===r)return t.pos=n,null;if(t.sp(),i&&(","===t.nextChar()||"}"===t.nextChar())){e||ih.test(r)||t.error("Expected a valid reference, but found '"+r+"' instead.");var s={t:uu,k:r,v:{t:hu,n:r}};return e&&(s.p=!0),s}if(!t.matchString(":"))return t.pos=n,null;t.sp();var a=Dt(t);return null===a?(t.pos=n,null):{t:uu,k:r,v:a}}function Nt(t){var e=t.pos,n=jt(t);if(null===n)return null;var i=[n];if(t.matchString(",")){var r=Nt(t);return r?i.concat(r):(t.pos=e,null)}return i}function Tt(t){var e=t.pos;if(t.sp(),!t.matchString("{"))return t.pos=e,null;var n=Nt(t);return t.sp(),t.matchString("}")?{t:ru,m:n}:(t.pos=e,null)}function Vt(t){var e=t.pos;if(t.sp(),!t.matchString("["))return t.pos=e,null;var n=Ft(t,!0);return t.matchString("]")?{t:iu,m:n}:(t.pos=e,null)}function Mt(t){return xt(t)||kt(t)||Et(t)||St(t)||Tt(t)||Vt(t)||mt(t)}function Pt(t){var e,n,i,r,s,a=t.pos;e=t.matchPattern(lh)||"",n=!e&&t.relaxedNames&&t.matchPattern(ah)||t.matchPattern(sh);var o=e.length+(n&&n.length||0);if("@."===e&&(e="@",n=n?"this."+n:"this"),!n&&e&&(n=e,e=""),!n)return null;if("@"===e)if(ch.test(n))if(n.indexOf("event")&&n.indexOf("node")||t.inEvent){if(~n.indexOf("context"))return t.pos=t.pos-(n.length-7),{t:du,x:{t:hu,n:"@context"}}}else t.error("@event and @node are only valid references within an event directive");else t.error("Unrecognized special reference @"+n);if(!e&&!t.relaxedNames&&hh.test(n))return t.pos=a,null;if(!e&&uh.test(n))return i=uh.exec(n)[0],t.pos=a+i.length,{t:ou,v:i};if(r=(e||"")+E(n),t.matchString("("))if(s=r.lastIndexOf("."),-1!==s&&"]"!==n[n.length-1])if(0===s)r=".",t.pos=a;else{var u=r.length;r=r.substr(0,s),t.pos=a+(o-(u-s))}else t.pos-=1;return{t:hu,n:r.replace(/^this\./,"./").replace(/^this$/,".")}}function It(t){if(!t.matchString("("))return null;t.sp();var e=Dt(t);return e||t.error(Zu),t.sp(),t.matchString(")")||t.error(Wu),{t:du,x:e}}function Rt(t){return Mt(t)||Pt(t)||It(t)}function Bt(t){if(t.strictRefinement||t.sp(),t.matchString(".")){t.sp();var e=t.matchPattern(ih);if(e)return{t:lu,n:e};t.error("Expected a property name")}if(t.matchString("[")){t.sp();var n=Dt(t);return n||t.error(Zu),t.sp(),t.matchString("]")||t.error("Expected ']'"),{t:lu,x:n}}return null}function Kt(t){var e=Rt(t);if(!e)return null;for(;e;){var n=Bt(t);if(n)e={t:cu,x:e,r:n};else{if(!t.matchString("("))break;t.sp();var i=Ft(t,!0);t.sp(),t.matchString(")")||t.error(Wu),e={t:vu,x:e},i&&(e.o=i)}}return e}function Lt(t){var e=vh(t);if(!e)return null;var n=t.pos;if(t.sp(),!t.matchString("?"))return t.pos=n,e;t.sp();var i=Dt(t);i||t.error(Zu),t.sp(),t.matchString(":")||t.error('Expected ":"'),t.sp();var r=Dt(t);return r||t.error(Zu),{t:pu,o:[e,i,r]}}function Dt(t){if(t.allowExpressions===!1){var e=Pt(t);return t.sp(),e}return Lt(t)}function Ft(t,e){var n,i=[],r=t.pos;do{t.sp(),e&&(n=t.matchPattern(rh));var s=Dt(t);if(null===s&&i.length)t.error(Zu);else if(null===s)return t.pos=r,null;n&&(s.p=!0),i.push(s),t.sp()}while(t.matchString(","));return i}function zt(t,e){var n=t.pos,i=Dt(t);if(!i){var r=t.matchPattern(/^(\w+)/);return r?{t:hu,n:r}:null}for(var s=0;s=0;n--)e.push("x$"+n);return e.length?"(function(){var "+e.join(",")+";return("+t+");})()":t}function n(t){if(h(t))return t;switch(t.t){case su:case ou:case eu:case au:return t.v;case nu:return JSON.stringify(String(t.v));case iu:return t.m&&$t(t.m)?"[].concat("+r(t.m,"[","]",n)+")":"["+(t.m?t.m.map(n).join(","):"")+"]";case ru:return t.m&&$t(t.m)?"Object.assign({},"+r(t.m,"{","}",i)+")":"{"+(t.m?t.m.map(function(t){return t.k+":"+n(t.v)}).join(","):"")+"}";case fu:return("typeof"===t.s?"typeof ":t.s)+n(t.o);case mu:return n(t.o[0])+("in"===t.s.substr(0,2)?" "+t.s+" ":t.s)+n(t.o[1]);case vu:if(t.o&&$t(t.o)){var e=a++;return"(x$"+e+"="+n(t.x)+").apply(x$"+e+","+n({t:iu,m:t.o})+")"}return n(t.x)+"("+(t.o?t.o.map(n).join(","):"")+")";case du:return"("+n(t.x)+")";case cu:return n(t.x)+n(t.r);case lu:return t.n?"."+t.n:"["+n(t.x)+"]";case pu:return n(t.o[0])+"?"+n(t.o[1])+":"+n(t.o[2]);case hu:return"_"+s.indexOf(t.n);default:throw new Error("Expected legal JavaScript")}}function i(t){return t.p?n(t.k):t.k+":"+n(t.v)}function r(t,e,n,i){var r=t.reduce(function(t,r){return r.p?t.str+=""+(t.open?n+",":t.str.length?",":"")+i(r):t.str+=""+(t.str.length?t.open?",":","+e:e)+i(r),t.open=!r.p,t},{open:!1,str:""});return r.open&&(r.str+=n),r.str}var s,a=0;qt(t,s=[]);var o=n(t);return{r:s,s:e(o)}}function $t(t){for(var e=0;er&&(i=r);return i\s]/.test(t.nextChar())||t.error("Expected `=`, `/`, `>` or whitespace"),t.sp(),!t.matchString("="))return t.pos=e,null;t.sp();var n=t.pos,i=t.sectionDepth,r=Xt(t,"'")||Xt(t,'"')||Jt(t);return null===r&&t.error("Expected valid attribute value"),t.sectionDepth!==i&&(t.pos=n,t.error("An attribute value must contain as many opening section tags as closing section tags")),r.length?1===r.length&&h(r[0])?yt(r[0]):r:""}function Yt(t){var e,n,i=t.pos;if(e=t.matchPattern(Ah),!e)return null;var r=e,s=t.tags.map(function(t){return t.open});return-1!==(n=gt(r,s))&&(e=e.substr(0,n),t.pos=i+e.length),e}function Jt(t){t.inAttribute=!0;for(var e=[],n=re(t)||Yt(t);n;)e.push(n),n=re(t)||Yt(t);return e.length?(t.inAttribute=!1,e):null}function Xt(t,e){var n=t.pos;if(!t.matchString(e))return null;t.inAttribute=e;for(var i=[],r=re(t)||te(t,e);null!==r;)i.push(r),r=re(t)||te(t,e);return t.matchString(e)?(t.inAttribute=!1,i):(t.pos=n,null)}function te(t,e){var n=t.remaining(),i=t.tags.map(function(t){return t.open});i.push(e);var r=gt(n,i);return-1===r&&t.error("Quoted attribute value must have a closing quote"),r?(t.pos+=r,n.substr(0,r)):null}function ee(t){var e,n,i=Gt(t,!1);if(!i)return null;if(n=Eh[i.n])i.t=n.t,n.v&&(i.v=n.v),delete i.n,t.sp(),"="===t.nextChar()&&(i.f=Qt(t));else if(e=xh.exec(i.n))i.n=e[1],i.t=Su,ie(t,i);else if(e=kh.exec(i.n))i.n=e[1],i.t=Ou,ie(t,i),i.v="in-out"===e[2]?"t0":"in"===e[2]?"t1":"t2";else if(e=bh.exec(i.n))i.n=Wt(e[1]),i.t=Cu,t.matchString("(")&&(i.a=Ut({t:iu,m:Ft(t)}),t.matchString(")")||t.error("Expected closing ')'")),t.inEvent=!0,ne(t,i)?wh.test(i.f)&&(t.pos-=i.f.length,t.error("Cannot use reserved event names (change, reset, teardown, update, construct, config, init, render, unrender, complete, detach, insert, destruct, attachchild, detachchild)")):ie(t,i,!0),t.inEvent=!1;else if(e=_h.exec(i.n)){var r="bind"===e[2];i.n=r?e[3]:e[1],i.t=Zo,ie(t,i,!1,!0),!i.f&&r&&(i.f=[{t:Bo,r:e[3]}])}else{t.sp();var s="="===t.nextChar()?Qt(t):null;if(i.f=null!=s?s:i.f,t.sanitizeEventAttributes&&yh.test(i.n))return{exclude:!0};i.f=i.f||(""===i.f?"":0),i.t=Zo}return i}function ne(t,e){var n=t.pos;t.matchString("=")||t.error("Missing required directive arguments");var i=t.matchString("'")||t.matchString('"');t.sp();var r=t.matchPattern(Ch);if(void 0!==r)if(i){if(t.sp(),t.matchString(i))return(e.f=r)||!0;t.pos=n}else{if(t.matchPattern(Sh))return(e.f=r)||!0;t.pos=n}else t.pos=n}function ie(t,e,n,i){if(void 0===n&&(n=!1),void 0===i&&(i=!1),t.sp(),!t.matchString("="))return void(n&&t.error("Missing required directive arguments"));t.sp();var r=t.matchString('"')||t.matchString("'"),s=t.spreadArgs;t.spreadArgs=!0,t.inUnquotedAttribute=!r;var a=i?zt(t,[r||" ","/",">"]):{m:Ft(t),t:iu};if(t.inUnquotedAttribute=!1,t.spreadArgs=s,r&&(t.sp(),t.matchString(r)!==r&&t.error("Expected matching quote '"+r+"'")),i){var o={t:Bo};Ht(a,o),e.f=[o]}else e.f=Ut(a)}function re(t){var e,n;if(t.interpolate[t.inside]===!1)return null;for(n=0;n")||t.matchString("yield"),r={t:">"===i?Uo:Qo};if(!i)return null;if(t.sp(),">"===i||!(n=t.matchString("with"))){t.relaxedNames=t.strictRefinement=!0;var s=Dt(t);if(t.relaxedNames=t.strictRefinement=!1,!s&&">"===i)return null;s&&(Ht(s,r),t.sp(),">"!==i&&(n=t.matchString("with")))}if(t.sp(),n||">"===i){if(n=ue(t),n&&n.length)r.z=n;else{var a=Dt(t);a&&(r.c={},Ht(a,r.c)),t.matchString(",")&&(n=ue(t),n&&n.length&&(r.z=n))}">"===i||r.c||r.z||t.error("Expected a context or one or more aliases")}return t.sp(),t.matchString(e.close)||t.error("Expected closing delimiter '"+e.close+"'"),r}function ce(t,e){if(!t.matchString("!"))return null;var n=t.remaining().indexOf(e.close);return-1!==n?(t.pos+=n+e.close.length,{t:$o}):void 0}function fe(t,e){var n,i,r=t.pos;try{n=zt(t,[e.close])}catch(s){i=s}if(!n){if("!"===t.str.charAt(r))return t.pos=r,null;if(i)throw i}if(!t.matchString(e.close)&&(t.error("Expected closing delimiter '"+e.close+"' after reference"),!n)){if("!"===t.nextChar())return null;t.error("Expected expression or legal reference")}var a={t:Bo};return Ht(n,a),a}function de(t,e){var n=t.pos;if(!t.matchString(e.open))return null;if(t.sp(),!t.matchString("/"))return t.pos=n,null;t.sp();var i=t.remaining(),r=i.indexOf(e.close);if(-1!==r){var s={t:Fo,r:i.substr(0,r).split(" ")[0]};return t.pos+=r,t.matchString(e.close)||t.error("Expected closing delimiter '"+e.close+"'"),s}return t.pos=n,null}function pe(t,e,n){var i=t.pos;if(!t.matchString(e.open))return null;if(!t.matchPattern(Vh[n]))return t.pos=i,null;var r={t:Mh[n]};if("elseif"===n)r.x=Dt(t);else if("catch"===n||"then"===n){var s=t.matchPattern(ih);s&&(r.n=s)}return t.matchString(e.close)||t.error("Expected closing delimiter '"+e.close+"'"),r}function me(t,e){var n,i,r,s,a,o,u,h,l,c,f,d,p,m=!1,v=t.pos;if(t.matchString("^")){if(t.matchString("^/"))return t.pos=v,null;i={t:Lo,f:[],n:yu}}else{if(!t.matchString("#"))return null;i={t:Lo,f:[]},t.matchString("partial")&&(t.pos=v-t.standardDelimiters[0].length,t.error("Partial definitions can only be at the top level of the template, or immediately inside components")),(o=t.matchString("await"))?(c=o,i.t=tu):(o=t.matchPattern(Bh))&&(c=o,i.n=Ph[o])}if(t.sp(),"with"===o){var g=ue(t);g&&(m=!0,i.z=g,i.t=Xo)}else if("each"===o){var y=he(t);y&&(i.z=[{n:y.n,x:{r:"."}}],n=y.x)}if(!m){if(n||(n=Dt(t)),n||t.error("Expected expression"),"each"===o&&t.matchString(",")){var b=ue(t);b&&(i.z&&b.unshift(i.z[0]),i.z=b)}if("each"!==o&&o||!(l=t.matchPattern(Ih)))"await"===o&&t.matchString("then")&&(t.sp(),f=!0,p=t.matchPattern(ih),p||(p=!0));else{var w;(w=t.matchPattern(Rh))?i.i=l+","+w:i.i=l}!o&&n.n&&(c=n.n)}t.sp(),t.matchString(e.close)||t.error("Expected closing delimiter '"+e.close+"'"),t.sectionDepth+=1,s=i.f;var x;do if(x=t.pos,r=de(t,e))c&&r.r!==c&&(o?(t.pos=x,t.error("Expected "+e.open+"/"+c+e.close)):r.r&&t.warn("Expected "+e.open+"/"+c+e.close+" but found "+e.open+"/"+r.r+e.close)),t.sectionDepth-=1,h=!0;else if(!m&&((r=pe(t,e,"elseif"))||(r=pe(t,e,"else"))||"await"===o&&((r=pe(t,e,"then"))||(r=pe(t,e,"catch"))))){if(i.n===yu&&t.error("{{else}} not allowed in {{#unless}}"),a&&(r.t===ku?t.error("there can only be one {{else}} block, at the end of a section"):r.t===_u&&t.error("illegal {{elseif...}} after {{else}}")),!u&&(p||!f)&&!d)if("await"===o){var k={f:s};i.f=[k],p?(k.t=Eu,p!==!0&&(k.n=p)):k.t=Lo}else u=[];var _={t:Lo,f:s=[]};r.t===ku?("await"===o?(i.f.push(_),_.t=ku):(_.n=yu,u.push(_)),a=!0):r.t===_u?(_.n=gu,Ht(r.x,_),u.push(_)):r.t===Eu?(a&&t.error("{{then}} block must appear before any {{else}} block"),d&&t.error("{{then}} block must appear before any {{catch}} block"),f&&t.error("there can only be one {{then}} block per {{#await}}"),_.t=Eu,f=!0,r.n&&(_.n=r.n),i.f.push(_)):r.t===Au&&(a&&t.error("{{catch}} block must appear before any {{else}} block"),d&&t.error("there can only be one {{catch}} block per {{#await}}"),_.t=Au,d=!0,_.n=r.n,i.f.push(_))}else{if(r=t.read(sl),!r)break;s.push(r)}while(!h);if(u&&(i.l=u),m||Ht(n,i),"await"===o&&(p||!f)&&!d&&!a){var E={f:i.f};i.f=[E],p?(E.t=Eu,p!==!0&&(E.n=p)):E.t=Lo}return i.f.length||delete i.f,i}function ve(t){var e=t.pos;if(t.textOnlyMode||!t.matchString(Kh))return null;var n=t.remaining(),i=n.indexOf(Lh);-1===i&&t.error("Illegal HTML - expected closing comment sequence ('-->')");var r=n.substr(0,i);t.pos+=i+3;var s={t:$o,c:r};return t.includeLinePositions&&(s.q=t.getLinePos(e)),s}function ge(t){var e,n,i,r,s;for(e=1;e/),p;if(f=t.matchString("#"))t.sp(),p.t=Ho,p.n=t.matchPattern(Gh);else if(p.t=zo,p.e=t.matchPattern(Wh),!p.e)return null;for(Qh.test(t.nextChar())||t.error("Illegal tag name"),t.sp(),t.inTag=!0;e=re(t);)e!==!1&&(p.m||(p.m=[]),p.m.push(e)),t.sp();if(t.inTag=!1,t.sp(),t.matchString("/")&&(n=!0),!t.matchString(">"))return null;var m=(p.e||p.n).toLowerCase(),v=t.preserveWhitespace;if(!n&&(f||!Bu[p.e.toLowerCase()])){f||(t.elementStack.push(m),m in t.interpolate&&(t.inside=m)),i=[],r=Ia(null);do{if(u=t.pos,l=t.remaining(),!l){if("script"===t.inside){o=!0;break}t.error("Missing end "+(t.elementStack.length>1?"tags":"tag")+" ("+t.elementStack.reverse().map(function(t){return""}).join("")+")")}if(f||Ae(m,l))if(!f&&(c=ke(t))){o=!0;var g=c.e.toLowerCase();if(g!==m&&(t.pos=u,!~t.elementStack.indexOf(g))){var y="Unexpected closing tag";Bu[g.toLowerCase()]&&(y+=" (<"+g+"> is a void element - it cannot contain children)"),t.error(y)}}else if(f&&Ce(t,p.n))o=!0;else{var b={open:t.standardDelimiters[0],close:t.standardDelimiters[1]};de(t,b)||Se(t,b)?(o=!0,t.pos=u):(a=t.read(al))?(r[a.n]&&(t.pos=u,t.error("Duplicate partial definition")),xe(a.f,t.stripComments,v,!v,!v,t.whiteSpaceElements),r[a.n]=a.f,s=!0):(a=t.read(sl))?i.push(a):o=!0}else o=!0}while(!o);i.length&&(p.f=i),s&&(p.p=r),t.elementStack.pop()}if(t.inside=null,t.sanitizeElements&&-1!==t.sanitizeElements.indexOf(m))return Jh;if(p.m&&"input"!==m&&"select"!==m&&"textarea"!==m&&"option"!==m){for(var w,x,k,_,E,A=p.m,C=0;C")?!0:(t.pos=n,null)):(t.pos=n,null)):null}function Se(t,e){var n=t.pos;if(t.matchString(e.open))return t.matchPattern(tl)?!0:void(t.pos=n)}function Oe(t){var e,n,i,r=t.remaining();return t.textOnlyMode?(n=t.tags.map(function(t){return t.open}),n=n.concat(t.tags.map(function(t){return"\\"+t.open})),e=gt(r,n)):(i=t.inside?"","`"):t.inAttribute?n.push(t.inAttribute):n.push(i),e=gt(r,n))),e?(-1===e&&(e=r.length),t.pos+=e,t.inside&&"textarea"!==t.inside||t.textOnlyMode?r.substr(0,e):yt(r.substr(0,e))):null}function je(t){var e,n,i=t.pos,r=t.standardDelimiters;if(!t.matchString(r[0]))return null;if(!t.matchPattern(el))return t.pos=i,null;var s=t.matchPattern(/^[a-zA-Z_$][a-zA-Z_$0-9\-\/]*/);s||t.error("expected legal partial name"),t.sp(),t.matchString(r[1])||t.error("Expected closing delimiter '"+r[1]+"'");var a=[],o=r[0],u=r[1];do(e=de(t,{open:o,close:u}))?("partial"!==e.r&&t.error("Expected "+o+"/partial"+u),n=!0):(e=t.read(sl),e||t.error("Expected "+o+"/partial"+u),a.push(e));while(!n);return{t:Yo,n:s,f:a}}function Ne(t){for(var e=[],n=Ia(null),i=!1,r=t.preserveWhitespace;t.pos0&&u(w.joinAll)&&(w=w.joinAll(l)),w;e.context&&!e.aliases&&(_=1),(e.componentParent||!e.parent&&e.ractive.component)&&!e.ractive.isolated?(e=e.componentParent||e.ractive.component.up,x=!0):e=e.parent}var E=i.ractive;return E.resolveInstanceMembers&&"data"!==c&&c in E?E.viewmodel.getRactiveModel().joinKey(c).joinAll(l):(k&&y("'"+n+"' is ambiguous and did not resolve."),b.joinKey(c).joinAll(l))}}function Ye(t){return t&&(!t.ractive.isolated&&t.componentParent||t.parent)}function Je(t){for(var e,n=t;!n.isIteration&&(e=Ye(n));)n=e;return n.isIteration&&n}function Xe(t){for(var e=t;e;){if(e.owner.handle)return e.owner.handle;e=Ye(e)}}function tn(t){throw new Error("An index or key reference ("+t+") cannot have child properties")}function en(t){for(var e=[],n=arguments.length-1;n-->0;)e[n]=arguments[n+1];var i=t.fragment||t._fakeFragment||(t._fakeFragment=new Tl(t));return i.getContext.apply(i,e)}function nn(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];return this.ctx||(this.ctx=new Nl.Context(this)),t.unshift(Ia(this.ctx)),Pa.apply(null,t)}function rn(t){for(var e=t;e&&!e.context;)e=e.parent;return e?e:t&&t.ractive.fragment}function sn(t,e){var n=Ml,i=e&&e.deep,r=e&&e.shuffle,s=yl.start();e&&"keep"in e&&(Ml=e.keep);for(var a=t.length;a--;){var o=t[a][0],u=t[a][1],h=t[a][2];if(!o)throw yl.end(),new Error("Failed to set invalid keypath '"+h+"'");if(i)un(o,u);else if(r){var l=u,f=o.get();if(l||(l=f),c(f))o.set(l);else{if(!Da(f)||!Da(l))throw yl.end(),new Error("You cannot merge an array with a non-array");var d=hn(r);o.merge(l,d)}}else o.set(u)}return yl.end(),Ml=n,s}function an(t,e,n,i){if(!n&&("."===e[0]||"^"===e[1]))return y("Attempted to set a relative keypath from a non-relative context. You can use a context object to set relative keypaths."),[];var r=A(e),s=n||t.viewmodel;return Pl.test(e)?s.findMatches(r):s===t.viewmodel?!t.component||t.isolated||s.has(r[0])||"@"===e[0]||!e[0]||i?[s.joinAll(r)]:[Qe(t.fragment||new Tl(t),e)]:[s.joinAll(r)]}function on(e,n,i,r){var a=[];if(s(n)){var o=function(i){t(n,i)&&a.push.apply(a,an(e,i,null,r).map(function(t){return[t,n[i],i]}))};for(var u in n)o(u)}else a.push.apply(a,an(e,n,null,r).map(function(t){return[t,i,n]}));return a}function un(e,n){var i=e.get(!1,Il);if(null==i||!o(n))return e.set(n);if(!o(i))return e.set(n);for(var r in n)t(n,r)&&un(e.joinKey(r),n[r])}function hn(t){if(t===!0)return null;if(u(t))return t;if(h(t))return Rl[t]||(Rl[t]=function(e){return e[t]});throw new Error("If supplied, options.compare must be a string, function, or true")}function ln(t,e,n,i){if(!h(e)||!r(n))throw new Error("Bad arguments");var s=on(t,e,n,i&&i.isolated);return sn(s.map(function(t){var e=t[0],n=t[1],i=e.get();if(!r(n)||!r(i))throw new Error(Bl);return[e,i+n]}))}function cn(t,e,n){var i=l(e)?e:1,r=o(e)?e:n;return ln(this,t,i,r)}function fn(t){var e=Promise.resolve(t);return Ra(e,"stop",{value:f}),e}function dn(t,e){t=t||{};var n;return t.easing&&(n=u(t.easing)?t.easing:e.easing[t.easing]),{easing:n||Kl,duration:"duration"in t?t.duration:400,complete:t.complete||f,step:t.step||f,interpolator:t.interpolator}}function pn(t,e,n,r){r=dn(r,t);var s=e.get();if(i(s,n))return r.complete(r.to),fn(n);var a=k(s,n,t,r.interpolator);return a?e.animate(s,n,r,a):(yl.start(),e.set(n),yl.end(),fn(n))}function mn(t,e,n){if(o(t)){var i=Ka(t);throw new Error("ractive.animate(...) no longer supports objects. Instead of ractive.animate({\n "+i.map(function(e){return"'"+e+"': "+t[e]}).join("\n ")+"\n}, {...}), do\n\n"+i.map(function(e){return"ractive.animate('"+e+"', "+t[e]+", {...});"}).join("\n")+"\n")}return pn(this,this.viewmodel.joinAll(A(t)),e,n)}function vn(t,e){t.event&&t._eventQueue.push(t.event),t.event=e}function gn(t){t._eventQueue.length?t.event=t._eventQueue.pop():t.event=null}function yn(t,e){var n=e?Ll:Dl;if(n[t])return n[t];var i=t.split("."),r=[],s=!1;e&&(i.unshift("this"),s=!0);for(var a=Math.pow(2,i.length)-(e?1:0),o=0;a>o;o++){for(var u=[],h=0;h>h?"*":i[h]);r.unshift(u.join("."))}return s&&(i.length>2?r.push.apply(r,yn(t,!1)):(r.push("*"),r.push(t))),n[t]=r,r}function bn(t,e,n,i){if(void 0===i&&(i=[]),e){n.name=e,i.unshift(n);var r=t._nsSubs?yn(e,!0):["*",e];return wn(t,r,n,i,!0)}}function wn(t,e,n,i,r){void 0===r&&(r=!1);var s=!0;if(r||t._nsSubs){vn(t,n);for(var a=e.length;a--;)e[a]in t._subs&&(s=xn(t,t._subs[e[a]],n,i)&&s);gn(t)}if(t.parent&&s){if(r&&t.component){var o=t.component.name+"."+e[e.length-1];e=yn(o,!1),n&&!n.component&&(n.component=t)}s=wn(t.parent,e,n,i)}return s}function xn(t,e,n,i){var r=null,s=!1;e=e.slice();for(var a=0,o=e.length;o>a;a+=1)e[a].off||e[a].handler.apply(t,i)!==!1||(s=!0);return n&&s&&(r=n.event)&&(r.preventDefault&&r.preventDefault(),r.stopPropagation&&r.stopPropagation()),!s}function kn(t,e){return t[e._guid]||(t[e._guid]=[])}function _n(t,e){var n=kn(t.queue,e);for(t.hook.fire(e);n.length;)_n(t,n.shift());delete t.queue[e._guid]}function En(t,e){void 0===e&&(e=null);var n=[];return An(t,e,n),n}function An(t,e,n){t.isAnchor?e&&t.name!==e||n.push(t):t.items?t.items.forEach(function(t){return An(t,e,n)}):t.iterations?t.iterations.forEach(function(t){return An(t,e,n)}):t.fragment&&!t.component&&An(t.fragment,e,n)}function Cn(t,e){void 0===e&&(e=null);var n=En(t.fragment,e),i={},r=t._children.byName;n.forEach(function(t){var e=t.name;e in i||(i[e]=0);var n=i[e],s=(r[e]||[])[n];s&&s.lastBound!==t&&(s.lastBound&&s.lastBound.removeChild(s),t.addChild(s)),i[e]++})}function Sn(t){t.instance.fragment.rendered&&(t.shouldDestroy=!0,t.instance.unrender()),t.instance.el=null}function On(t,e){void 0===e&&(e={});var n,i=this._children;if(t.parent&&t.parent!==this)throw new Error("Instance "+t._guid+" is already attached to a different instance "+t.parent._guid+". Please detach it from the other instance using detachChild first.");if(t.parent)throw new Error("Instance "+t._guid+" is already attached to this instance.");var r={instance:t,ractive:this,name:e.name||t.constructor.name||"Ractive",target:e.target||!1,bubble:jn,findNextNode:Nn};if(r.nameOption=e.name,r.target){var s;(s=i.byName[r.target])||(s=[],this.set("@this.children.byName."+r.target,s)),n=e.prepend?0:void 0!==e.insertAt?e.insertAt:s.length}else r.up=this.fragment,r.external=!0;t.parent=this,t.root=this.root,t.component=r,i.push(r);var a=yl.start(),o=t.viewmodel.getRactiveModel();return o.joinKey("parent",{lastLink:!1}).link(this.viewmodel.getRactiveModel()),o.joinKey("root",{lastLink:!1}).link(this.root.viewmodel.getRactiveModel()),$l.attachchild.fire(t),r.target?(Sn(r),this.splice("@this.children.byName."+r.target,n,0,r),Cn(this,r.target)):t.isolated||t.viewmodel.attached(this.fragment),yl.end(),a.ractive=t,a.then(function(){return t})}function jn(){yl.addFragment(this.instance.fragment)}function Nn(){return this.anchor?this.anchor.findNextNode():void 0}function Tn(t,e){this.computed[t]=e,(h(e)||u(e))&&(e=this.computed[t]={get:e});var n=A(t);if(!~t.indexOf("*")){var i=n.pop();return this.viewmodel.joinAll(n).compute(i,e)}e.pattern=new RegExp("^"+n.map(function(t){return t.replace(/\*\*/g,"(.+)").replace(/\*/g,"((?:\\\\.|[^\\.])+)")}).join("\\.")+"$")}function Vn(t,e){var n=yl.start(),i=Tn.call(this,t,e);if(i){var r=A(t);1!==r.length||i.isReadonly||i.set(this.viewmodel.value[r[0]]);var s=r.reduce(function(t,e){return t&&t.childByKey[e]},this.viewmodel);s&&(s.rebind(i,s,!1),s.parent&&delete s.parent.childByKey[s.key],F())}return yl.end(),n}function Mn(){return this.isDetached?this.el:(this.el&&V(this.el.__ractive_instances__,this),this.el=this.fragment.detach(),this.isDetached=!0,$l.detach.fire(this),this.el)}function Pn(t){for(var e,n,i=this._children,r=i.length;r--;)if(i[r].instance===t){n=r,e=i[r];break}if(!e||t.parent!==this)throw new Error("Instance "+t._guid+" is not attached to this instance.");var s=yl.start();e.anchor&&e.anchor.removeChild(e),t.isolated||t.viewmodel.detached(),i.splice(n,1),e.target&&(this.splice("@this.children.byName."+e.target,i.byName[e.target].indexOf(e),1),Cn(this,e.target));var a=t.viewmodel.getRactiveModel();return a.joinKey("parent",{lastLink:!1}).unlink(),a.joinKey("root",{lastLink:!1}).link(a),t.root=t,t.parent=null,t.component=null,$l.detachchild.fire(t),yl.end(),s.ractive=t,s.then(function(){return t})}function In(t,e){var n=this;if(void 0===e&&(e={}),!this.rendered)throw new Error("Cannot call ractive.find('"+t+"') unless instance is rendered to the DOM");var i=this.fragment.find(t,e);if(i)return i;if(e.remote)for(var r=0;ru;u+=1)i.push(u);for(;o>u;u+=1)i.push(-1);for(;t>u;u+=1)i.push(u+s);return 0!==s?i.touchedFrom=r[0]:i.touchedFrom=t,i}function Un(t,e,n){switch(e){case"splice":for(void 0!==n[0]&&n[0]<0&&(n[0]=t+Math.max(n[0],-t)),c(n[0])&&(n[0]=0);n.length<2;)n.push(t-n[0]);return l(n[1])||(n[1]=t-n[0]),n[1]=Math.min(n[1],t-n[0]),n;case"sort":case"reverse":return null;case"pop":return t?[t-1,1]:[0,0];case"push":return[t,0].concat(n);case"shift":return[0,t?1:0];case"unshift":return[0,0].concat(n)}}function $n(t){function e(t){for(var e=[],i=arguments.length-1;i-->0;)e[i]=arguments[i+1];return n(this.viewmodel.joinAll(A(t)),e)}function n(e,n){var i=e.get();if(!Da(i)){if(c(i)){i=[];var r=ql[t].apply(i,n),s=yl.start().then(function(){return r});return e.set(i),yl.end(),s}throw new Error("shuffle array method "+t+" called on non-array at "+e.getKeypath())}var a=zn(i.length,t,n),o=ql[t].apply(i,n),u=yl.start().then(function(){return o});return u.result=o,a?e.shuffle?e.shuffle(a):e.mark():e.set(o),yl.end(),u}return{path:e,model:n}}function qn(t,e,n){e.parent&&e.parent.wrapper&&e.parent.adapt();var i=yl.start();return e.mark(n&&n.force),e.notifyUpstream(),yl.end(),$l.update.fire(t,e),i}function Hn(t,e){var n,i;return h(t)?(i=A(t),n=e):n=t,qn(this,i?this.viewmodel.joinAll(i):this.viewmodel,n)}function Zn(e,n,i){var r=[];if(s(n))for(var a in n)t(n,a)&&r.push([Wn(e,a).model,n[a]]);else r.push([Wn(e,n).model,i]);return r}function Wn(t,e){var n=t.fragment;return h(e)?{model:Qe(n,e),instance:n.ractive}:{model:n.findContext(),instance:e}}function Gn(t,e){return t.events&&t.events.find&&t.events.find(function(t){return~t.template.n.indexOf(e)})}function Qn(t){for(var e=[],n=arguments.length-1;n-->0;)e[n]=arguments[n+1];var i;if(e[0]instanceof tc){var r=e.shift();i=Ia(r),Pa(i,r)}else i=!o(e[0])||null!==e[0]&&e[0].constructor!==Object?tc.forRactive(this):tc.forRactive(this,e.shift());return bn(this,t,i,e)}function Yn(t,e){if(!h(t))return this.viewmodel.get(!0,t);var n,i=A(t),r=i[0];return this.viewmodel.has(r)||this.component&&!this.isolated&&(n=Qe(this.fragment||new Tl(this),r)),n=this.viewmodel.joinAll(i),n.get(!0,e)}function Jn(t){h(t)&&fc&&(t=fc.call(document,t));var e;if(t){if(t._ractive)return t._ractive.proxy.getContext();if(!(e=t.__ractive_instances__))return Jn(t.parentNode);if(1===e.length)return en(e[0])}}function Xn(t,e){return t?(h(t)&&(t=this.find(t,e)),Jn(t)):en(this)}function ti(){return Ua.createDocumentFragment()}function ei(t){var e;if(t&&"boolean"!=typeof t){if(!za||!Ua||!t)return null;if(t.nodeType)return t;if(h(t)){if(e=Ua.getElementById(t),!e&&Ua.querySelector)try{e=Ua.querySelector(t)}catch(n){}if(e&&e.nodeType)return e}return t[0]&&t[0].nodeType?t[0]:null}}function ni(t){return t&&"unknown"!=typeof t.parentNode&&t.parentNode&&t.parentNode.removeChild(t),t}function ii(t){return null==t||l(t)&&isNaN(t)||!t.toString?"":""+t}function ri(t){return ii(t).replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'")}function si(t,e){if(!this.fragment.rendered)throw new Error("The API has changed - you must call `ractive.render(target[, anchor])` to render your Ractive instance. Once rendered you can use `ractive.insert()`.");if(t=ei(t),e=ei(e)||null,!t)throw new Error("You must specify a valid target to insert into");t.insertBefore(this.detach(),e),this.el=t,(t.__ractive_instances__||(t.__ractive_instances__=[])).push(this),this.isDetached=!1,ai(this)}function ai(t){$l.insert.fire(t),t.findAllComponents("*").forEach(function(t){ai(t.instance)})}function oi(t,e,n){var i,r=n&&(n.ractive||n.instance)||this,s=A(t);!r.viewmodel.has(s[0])&&r.component&&(i=Qe(r.component.up,s[0]),i=i.joinAll(s.slice(1)));var a=i||r.viewmodel.joinAll(s),o=this.viewmodel.joinAll(A(e),{lastLink:!1});if(ui(a,o)||ui(o,a))throw new Error("A keypath cannot be linked to itself.");var u=yl.start();return o.link(a,n&&n.keypath||t),yl.end(),u}function ui(t,e){for(var n=e;n;){if(n===t||n.owner===t)return!0;n=n.target||n.parent}}function hi(t,e){var n=e&&t.model?t.model.get():t.newValue;t.oldValue=t.oldFn?t.oldFn.call(t.oldContext,void 0,n,t.keypath):n}function li(t,e,n){var i=t.oldValues;t.oldFn?(n||(t.oldValues={}),Ka(e).forEach(function(n){var r=[i[n],e[n],n],s=t.pattern.exec(n);s&&r.push.apply(r,s.slice(1)),t.oldValues[n]=t.oldFn.apply(t.oldContext,r)})):n?Ka(e).forEach(function(t){return i[t]=e[t]}):t.oldValues=e}function ci(){return-1}function fi(t,e,n){var i,r,a=this,o=[];s(t)?(i=t,r=e||{}):u(t)?(i={"":t},r=e||{}):(i={},i[t]=e,r=n||{});var h=!1;return Ka(i).forEach(function(t){var e=i[t],n=function(){for(var t=[],n=arguments.length;n--;)t[n]=arguments[n];return h?void 0:e.apply(this,t)},s=t.split(" ");s.length>1&&(s=s.filter(function(t){return t})),s.forEach(function(t){r.keypath=t;var e=di(a,t,n,r);e&&o.push(e)})}),this._observers.push.apply(this._observers,o),{cancel:function(){return o.forEach(function(t){return t.cancel()})},isSilenced:function(){return h},silence:function(){return h=!0},resume:function(){return h=!1}}}function di(t,e,n,i){var r=A(e),s=r.indexOf("*");~s||(s=r.indexOf("**")),i.fragment=i.fragment||t.fragment;var a;if(i.fragment?~r[0].indexOf(".*")?(a=i.fragment.findContext(),s=0,r[0]=r[0].slice(1)):a=0===s?i.fragment.findContext():Qe(i.fragment,r[0]):a=t.viewmodel.joinKey(r[0]),a||(a=t.viewmodel.joinKey(r[0])),~s){var o=r.indexOf("**");return~o&&(o+1!==r.length||~r.indexOf("*"))?void b("Recursive observers may only specify a single '**' at the end of the path."):(a=a.joinAll(r.slice(1,s)),new _c(t,a,r.slice(s),n,i))}return a=a.joinAll(r.slice(1)),i.array?new Ac(t,a,n,i):new wc(t,a,n,i)}function pi(t,e,n){return s(t)||u(t)?(n=Pa(e||{},Sc),this.observe(t,n)):(n=Pa(n||{},Sc),this.observe(t,e,n))}function mi(t,e){var n=this;if(t){var i=t.split(" ").map(Oc).filter(jc);i.forEach(function(t){var i=n._subs[t];if(i&&e){var r=i.find(function(t){return t.callback===e});r&&(V(i,r),r.off=!0,t.indexOf(".")&&n._nsSubs--)}else i&&(t.indexOf(".")&&(n._nsSubs-=i.length),i.length=0)})}else this._subs={};return this}function vi(e,n){var i=this,r=o(e)?e:{};h(e)&&(r[e]=n);var s=!1,a=[],u=function(e){var n=r[e],o=function(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];return s?void 0:n.apply(this,t)},u={callback:n,handler:o};if(t(r,e)){var h=e.split(" ").map(Oc).filter(jc);h.forEach(function(t){(i._subs[t]||(i._subs[t]=[])).push(u),t.indexOf(".")&&i._nsSubs++,a.push([t,u])})}};for(var l in r)u(l);return{cancel:function(){return a.forEach(function(t){return i.off(t[0],t[1].callback)})},isSilenced:function(){return s},silence:function(){return s=!0},resume:function(){return s=!1}}}function gi(t,e){var n=this.on(t,function(){e.apply(this,arguments),n.cancel()});return n}function yi(t,e){void 0===e&&(e={});var n=A(t);if(this.viewmodel.has(n[0])){var i=this.viewmodel.joinAll(n);if(!i.isLink)return;for(;(i=i.target)&&e.canonical!==!1&&i.isLink;);if(i)return{ractive:i.root.ractive,keypath:i.getKeypath()}}}function bi(t){Mc.push(t),Pc=!0}function wi(t){var e=ki();e&&(t||Pc)&&(Rc?e.styleSheet.cssText=xi(null):e.innerHTML=xi(null),Pc=!1)}function xi(t){var e=t?Mc.filter(function(e){return~t.indexOf(e.id)}):Mc;return e.forEach(function(t){return t.applied=!0}),e.reduce(function(t,e){return""+(t?t+"\n\n/* {"+e.id+"} */\n"+e.styles:"")},Vc)}function ki(){return Ua&&!Ic&&(Ic=Ua.createElement("style"),Ic.type="text/css",Ic.setAttribute("data-ractive-css",""),Ua.getElementsByTagName("head")[0].appendChild(Ic),Rc=!!Ic.styleSheet),Ic}function _i(t,e,n){void 0===n&&(n=[]);var i=[],r=function(t){return t.replace(Dc,function(t,e){return i[e]})};return t=t.replace(Lc,function(t){return"\x00"+(i.push(t)-1)}).replace(Kc,""),n.forEach(function(e){t=t.replace(e,function(t){return"\x00"+(i.push(t)-1)})}),e(t,r)}function Ei(t){return t.trim()}function Ai(t){return t.str}function Ci(t,e){for(var n,i=[];n=qc.exec(t);)i.push({str:n[0],base:n[1],modifiers:n[2]});for(var r=i.map(Ai),s=[],a=i.length;a--;){var o=r.slice(),u=i[a];o[a]=u.base+e+u.modifiers||"";var h=r.slice();h[a]=e+" "+h[a],s.push(o.join(" "),h.join(" "))}return s.join(", ")}function Si(t,e){var n,i='[data-ractive-css~="{'+e+'}"]';return n=Zc.test(t)?t.replace(Zc,i):_i(t,function(t,e){return t=t.replace(zc,"$&").replace(Fc,function(t,e){if(Hc.test(e))return t;var n=e.split(",").map(Ei),r=n.map(function(t){return Ci(t,i)}).join(", ")+" ";return t.replace(e,r)}).replace(Uc,""),e(t)},[$c])}function Oi(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)}function ji(){return Oi()+Oi()+"-"+Oi()+"-"+Oi()+"-"+Oi()+"-"+Oi()+Oi()+Oi()}function Ni(t,e,n){var i=o(t)?e:n,r=this._cssModel;r.locked=!0;var s=sn(on({viewmodel:r},t,e,!0),i);r.locked=!1;var a=yl.start();return this.extensions.forEach(function(t){var e=t._cssModel;e.mark(),e.downstreamChanged("",1)}),yl.end(),Ti(this,!i||i.apply!==!1),s.then(function(){return a})}function Ti(t,e){var n=Vi(t),i=t.extensions.map(function(t){return Ti(t,!1)}).reduce(function(t,e){return e||t},!1);if(e&&(n||i)){var r=t._cssDef;(!r||r&&r.applied)&&wi(!0)}return n||i}function Vi(t){var e=t.css;if(u(e)){var n=t._cssDef,i=Pi(t,e),r=n.transform?Si(i,n.id):i;if(n.styles!==r)return n.styles=r,!0}}function Mi(t){for(var e=t,n=[];e;)e.prototype.cssId&&n.push(e.prototype.cssId),e=e.Parent;return n}function Pi(t,e){if(h(e))return e;var n=t.cssData,i=t._cssModel,r=function(t){return i.joinAll(A(t)).get()};r.__proto__=n;var s=e.call(t,r);return h(s)?s:""}function Ii(t,e,n){var i=t.css===!0?"":h(t.css)&&!Gc.test(t.css)?ei(t.css)||t.css:t.css,r=i,s=t.cssId||ji();o(i)?(i="textContent"in i?i.textContent:i.innerHTML,r=i):u(i)&&(r=i,i=Pi(e,i));var a={transform:"noCSSTransform"in t?!t.noCSSTransform:!t.noCssTransform};Ra(e,"_cssDef",{configurable:!0,value:a}),Ra(e,"css",{get:function(){return r},set:function(t){r=t;var n=Pi(e,r),i=a.styles;a.styles=a.transform?Si(n,s):n,a.applied&&i!==a.styles&&wi(!0)}}),a.styles=a.transform?Si(i,s):i,a.id=n.cssId=s,e._cssIds.push(s),bi(e._cssDef)}function Ri(t){t&&t.constructor!==Object&&(u(t)||(o(t)?y("If supplied, options.data should be a plain JavaScript object - using a non-POJO as the root object may work, but is discouraged"):p("data option must be an object or a function, `"+t+"` is not valid")))}function Bi(){return{}}function Ki(t,e){Ri(e);var n=u(t);e||n||(e=Bi);var i=u(e);return n||i?function(){var r=i?Li(e,this):e,s=n?Li(t,this):t;return Di(r,s)}:Di(e,t)}function Li(t,e){var n=t.call(e);if(n)return o(n)||p("Data function must return an object"),n.constructor!==Object&&b("Data function returned something other than a plain JavaScript object. This might work, but is strongly discouraged"),n}function Di(t,e){if(t&&e){for(var n in e)n in t||(t[n]=e[n]);return t}return t||e}function Fi(t){var e=t._config.template;if(e&&e.fn){var n=zi(t,e.fn);return n!==e.result?(e.result=n,n):void 0}}function zi(t,e){return e.call(t,{fromId:dl.fromId,isParsed:dl.isParsed,parse:function(e,n){return void 0===n&&(n=dl.getParseOptions(t)),dl.parse(e,n)}})}function Ui(t,e){return h(t)?t=$i(t,e):(qi(t),dt(t)),t}function $i(t,e){return"#"===t[0]&&(t=dl.fromId(t)),dl.parseFor(t,e)}function qi(t){if(void 0==t)throw new Error("The template cannot be "+t+".");if(!l(t.v))throw new Error("The template parser was passed a non-string template, but the template doesn't have a version. Make sure you're passing in the template you think you are.");if(t.v!==To)throw new Error("Mismatched template version (expected "+To+", got "+t.v+") Please ensure you are using the latest version of Ractive.js in your build process as well as in your app")}function Hi(e,n,i){if(n)for(var r in n)(i||!t(e,r))&&(e[r]=n[r])}function Zi(t,e,n){function i(){var t=Wi(i._parent,e),r="_super"in this,s=this._super;this._super=t;var a=n.apply(this,arguments);return r?this._super=s:delete this._super,a}return/_super/.test(n)?(i._parent=t,i._method=n,i):n}function Wi(t,e){if(e in t){var n=t[e];return u(n)?n:function(){return n}}return f}function Gi(t,e,n){return"options."+t+" has been deprecated in favour of options."+e+"."+(n?" You cannot specify both options, please use options."+e+".":"")}function Qi(t,e,n){if(e in t){if(n in t)throw new Error(Gi(e,n,!0));y(Gi(e,n)),t[n]=t[e]}}function Yi(t){Qi(t,"beforeInit","onconstruct"),Qi(t,"init","onrender"),Qi(t,"complete","oncomplete"),Qi(t,"eventDefinitions","events"),Da(t.adaptors)&&Qi(t,"adaptors","adapt")}function Ji(e,n,i,r,s){Yi(r);for(var a in r)if(t(uf,a)){var o=r[a];"el"!==a&&u(o)?y(a+" is a Ractive option that does not expect a function and will be ignored","init"===e?i:null):i[a]=o}if(i.append&&i.enhance)throw new Error("Cannot use append and enhance at the same time");rf.forEach(function(t){t[e](n,i,r,s)}),Bc[e](n,i,r,s),Jc[e](n,i,r,s),Qc[e](n,i,r,s),Xi(n.prototype,i,r)}function Xi(e,n,i){for(var r in i)if(!hf[r]&&t(i,r)){var s=i[r];u(s)&&((r in Dp||"on"===r.slice(0,2)&&r.slice(2)in $l&&r in n)&&!cf.test(s.toString())&&y("Overriding Ractive prototype function '"+r+"' without calling the '"+cf+"' method can be very dangerous."),s=Zi(e,r,s)),n[r]=s}}function tr(t){var e={};return t.forEach(function(t){return e[t]=!0}),e}function er(t){return h(t)?_i(t,function(t,e){return t.split(";").filter(function(t){return!!t.trim()}).map(e).reduce(function(t,e){var n=e.indexOf(":"),i=e.substr(0,n).trim();return t[i]=e.substr(n+1).trim(),t},{})}):{}}function nr(t){for(var e=t.split(mf),n=e.length;n--;)e[n]||e.splice(n,1);return e}function ir(t){var e=t.element,n=t.name;if("value"===n){if(t.interpolator&&(t.interpolator.bound=!0),"select"===e.name&&"value"===n)return e.getAttribute("multiple")?rr:sr;if("textarea"===e.name)return hr;if(null!=e.getAttribute("contenteditable"))return ar;if("input"===e.name){var i=e.getAttribute("type");if("file"===i)return f;if("radio"===i&&e.binding&&"name"===e.binding.attribute.name)return or;if(~vf.indexOf(i))return hr}return ur}var r=e.node;if(t.isTwoway&&"name"===n){if("radio"===r.type)return lr;if("checkbox"===r.type)return cr}if("style"===n)return fr;if(0===n.indexOf("style-"))return dr;if("class"===n&&(!r.namespaceURI||r.namespaceURI===dc))return pr;if(0===n.indexOf("class-"))return mr;if(t.isBoolean){var s=e.getAttribute("type");return!t.interpolator||"checked"!==n||"checkbox"!==s&&"radio"!==s||(t.interpolator.bound=!0),vr}return t.namespace&&t.namespace!==t.node.namespaceURI?yr:gr}function rr(t){var e=this.getValue();Da(e)||(e=[e]);var n=this.node.options,i=n.length;if(t)for(;i--;)n[i].selected=!1;else for(;i--;){var r=n[i],s=r._ractive?r._ractive.value:r.value;r.selected=O(e,s)}}function sr(t){var e=this.getValue();if(!this.locked){this.node._ractive.value=e;var n=this.node.options,i=n.length,r=!1;if(t)for(;i--;)n[i].selected=!1;else for(;i--;){var s=n[i],a=s._ractive?s._ractive.value:s.value;if(s.disabled&&s.selected&&(r=!0),a==e)return void(s.selected=!0)}r||(this.node.selectedIndex=-1)}}function ar(t){var e=this.getValue();this.locked||(t?this.node.innerHTML="":this.node.innerHTML=c(e)?"":e)}function or(t){var e=this.node,n=e.checked,i=this.getValue();return t?e.checked=!1:(e.value=this.node._ractive.value=i,e.checked=this.element.compare(i,this.element.getAttribute("name")),void(n&&!e.checked&&this.element.binding&&this.element.binding.rendered&&this.element.binding.group.model.set(this.element.binding.group.getValue())))}function ur(t){if(!this.locked)if(t)this.node.removeAttribute("value"),this.node.value=this.node._ractive.value=null;else{var e=this.getValue();this.node.value=this.node._ractive.value=e,this.node.setAttribute("value",ii(e))}}function hr(t){if(!this.locked)if(t)this.node._ractive.value="",this.node.removeAttribute("value");else{var e=this.getValue();this.node._ractive.value=e;var n=ii(e);this.node.value!==n&&(this.node.value=n),this.node.setAttribute("value",n)}}function lr(t){t?this.node.checked=!1:this.node.checked=this.element.compare(this.getValue(),this.element.binding.getValue())}function cr(t){var e=this,n=e.element,i=e.node,r=n.binding,s=this.getValue(),a=n.getAttribute("value");if(Da(s)){for(var o=s.length;o--;)if(n.compare(a,s[o]))return void(r.isChecked=i.checked=!0);r.isChecked=i.checked=!1}else r.isChecked=i.checked=n.compare(s,a)}function fr(t){for(var e=t?{}:er(this.getValue()||""),n=this.node.style,i=Ka(e),r=this.previous||[],s=0;s")&&P(yf.childNodes[0].attributes):[]}function xr(t,e){for(var n=t.length;n--;)if(t[n].name===e.name)return!1;return!0}function kr(t,e){for(var n="xmlns:"+e;t;){if(t.hasAttribute&&t.hasAttribute(n))return t.getAttribute(n);t=t.parentNode}return bc[e]}function _r(){return kf}function Er(t,e,n){0===e?t.value=!0:"true"===e?t.value=!0:"false"===e||"0"===e?t.value=!1:t.value=e;var i=t.element[t.flag];return t.element[t.flag]=t.value,n&&!t.element.attributes.binding&&i!==t.value&&t.element.recreateTwowayBinding(),t.value}function Ar(t){ff.call(this,t)}function Cr(){var t=this;return this.torndown?(y("ractive.teardown() was called on a Ractive instance that was already torn down"),Promise.resolve()):(this.shouldDestroy=!0,Sr(this,function(){return t.fragment.rendered?t.unrender():Promise.resolve()}))}function Sr(t,e){t.torndown=!0,t.fragment.unbind(),t._observers.slice().forEach(W),t.el&&t.el.__ractive_instances__&&V(t.el.__ractive_instances__,t);var n=e();return $l.teardown.fire(t),n.then(function(){$l.destruct.fire(t),t.viewmodel.teardown()}),n}function Or(t,e){if(t.applyValue=function(t){this.parent.value[e]=t,t&&t.viewmodel?(this.link(t.viewmodel.getRactiveModel(),e),this._link.markedAll()):(this.link(Ia(Oo),e),this._link.markedAll())},"root"===e){var n=t.mark;t.mark=function(t){this._marking||(this._marking=!0,n.apply(this,t),this._marking=!1)}}return t.applyValue(t.parent.ractive[e],e),t._link.set=function(e){return t.applyValue(e)},t._link.applyValue=function(e){return t.applyValue(e)},t._link}function jr(t,e){t._link&&t._link.implicit&&t._link.isDetached()&&t.attach(e);for(var n in t.childByKey)if(t.value)if(n in t.value)jr(t.childByKey[n],e);else if(!t.childByKey[n]._link||t.childByKey[n]._link.isDetached()){ -var i=Qe(e,n);i&&t.childByKey[n].link(i,n,{implicit:!0})}}function Nr(t){t._link&&t._link.implicit&&t.unlink();for(var e in t.childByKey)Nr(t.childByKey[e])}function Tr(t,e,i){var r=(t.constructor["_"+i]||[]).concat(n(e[i]||[])),s="on"===i?"once":i+"Once";r.forEach(function(e){var n=e[0],r=e[1];u(r)?t[i](n,r):o(r)&&u(r.handler)&&t[r.once?s:i](n,r.handler,Ia(r))})}function Vr(e,n){Va.DEBUG&&so(),Pr(e),Ir(e),Tr(e,n,"on"),!t(n,"delegate")&&e.parent&&e.parent.delegate!==e.delegate&&(e.delegate=!1),Da(n.use)&&e.use.apply(e,n.use.filter(function(t){return t.construct})),$l.construct.fire(e,n),n.onconstruct&&n.onconstruct.call(e,en(e),n);for(var i=jf.length;i--;){var r=jf[i];e[r]=Pa(Ia(e.constructor[r]||null),n[r])}for(i=Nf.length;i--;){var s=Nf[i];e[s]=Pa(Ia(e.constructor.prototype[s]),n[s])}e._attributePartial&&(e.partials["extra-attributes"]=e._attributePartial,delete e._attributePartial);var a=new Of({adapt:Mr(e,e.adapt,n),data:Yc.init(e.constructor,e,n),ractive:e});e.adapt=a.adaptors,e.viewmodel=a;for(var o in e.computed)Tn.call(e,o,e.computed[o])}function Mr(t,e,n){function i(e){return h(e)&&(e=w("adaptors",t,e),e||p(po(e,"adaptor"))),e}e=e.map(i);var r=N(n.adapt).map(i),s=[e,r];return t.parent&&!t.isolated&&s.push(t.parent.viewmodel.adaptors),M.apply(null,s)}function Pr(t){t._guid="r-"+Tf++,t._subs=Ia(null),t._nsSubs=0,t._config={},t.event=null,t._eventQueue=[],t._observers=[],t._children=[],t._children.byName={},t.children=t._children,t.component||(t.root=t,t.parent=t.container=null)}function Ir(t){var e=t.component,n=t.constructor.attributes;if(n&&e){var i=e.template,r=i.m?i.m.slice():[],s=r.filter(function(t){return t.t===Zo}).map(function(t){return t.n});n.required.forEach(function(t){~s.indexOf(t)||y("Component '"+e.name+"' requires attribute '"+t+"' to be provided")});for(var a=n.optional.concat(n.required),o=[],u=r.length;u--;){var h=r[u];h.t!==Zo||~a.indexOf(h.n)?n.mapAll||h.t!==Su&&h.t!==Ou&&h.t!==ju||o.unshift(r.splice(u,1)[0]):n.mapAll?o.unshift({t:Zo,n:h.n,f:[{t:Bo,r:"~/"+h.n}]}):o.unshift(r.splice(u,1)[0])}o.length&&(e.template={t:i.t,e:i.e,f:i.f,m:r,p:i.p}),t._attributePartial=o}}function Rr(t){this.item&&this.removeChild(this.item);var e=t.instance;t.anchor=this,t.up=this.up,t.name=t.nameOption||this.name,this.name=t.name,e.isolated||e.viewmodel.attached(this.up),this.rendered&&Kr(this,t)}function Br(t){this.item===t&&(Lr(this,t),this.name=this.template.n)}function Kr(t,e){if(t.rendered){e.shouldDestroy=!1,e.up=t.up,t.item=e,t.instance=e.instance;var n=t.up.findNextNode(t);e.instance.fragment.rendered&&e.instance.unrender(),e.partials=e.instance.partials,e.instance.partials=Pa(Ia(e.partials),e.partials,t._partials),e.instance.fragment.unbind(!0),e.instance.fragment.componentParent=t.up,e.instance.fragment.bind(e.instance.viewmodel),t.attributes.forEach(Z),t.eventHandlers.forEach(Z),t.attributes.forEach(et),t.eventHandlers.forEach(et);var i=t.up.findParentNode();ta(e.instance,i,i.contains(n)?n:null,t.occupants),e.lastBound!==t&&(e.lastBound=t)}}function Lr(t,e){t.rendered&&(e.shouldDestroy=!0,e.instance.unrender(),t.eventHandlers.forEach(st),t.attributes.forEach(st),t.eventHandlers.forEach(rt),t.attributes.forEach(rt),e.instance.el=e.instance.anchor=null,e.instance.fragment.componentParent=null,e.up=null,e.anchor=null,t.item=null,t.instance=null)}function Dr(){var t=Mf;Mf=[],t.forEach(Cn)}function Fr(t,e,n,i){void 0===i&&(i={}),e&&e.f&&e.f.s&&(t.fn=ft(e.f.s,e.f.r.length),i.register===!0&&(t.models=zr(t,e,n,i)))}function zr(t,e,n,i){return void 0===i&&(i={}),e.f.r.map(function(e,r){var s;return i.specialRef&&(s=i.specialRef(e,r))?s:(s=Qe(n,e),i.register===!0&&s.register(t),s)})}function Ur(t,e){e&&e.f&&e.f.s&&(t.models&&t.models.forEach(function(e){e&&e.unregister&&e.unregister(t)}),t.models=null)}function $r(){this._ractive.binding.handleChange()}function qr(t,e,n){var i=t+"-bindingGroup";return e[i]||(e[i]=new zf(i,e,n))}function Hr(){var t=this,e=this.bindings.filter(function(t){return t.node&&t.node.checked}).map(function(t){return t.element.getAttribute("value")}),n=[];return e.forEach(function(e){t.bindings[0].arrayContains(n,e)||n.push(e)}),n}function Zr(){$r.call(this);var t=this._ractive.binding.model.get();this.value=void 0==t?"":t}function Wr(t){var e;return function(){var n=this;e&&clearTimeout(e),e=setTimeout(function(){var t=n._ractive.binding;t.rendered&&$r.call(n),e=null},t)}}function Gr(t){return t.selectedOptions?P(t.selectedOptions):t.options?P(t.options).filter(function(t){return t.selected}):[]}function Qr(t){return Yf[t]||(Yf[t]=[])}function Yr(){var t=this.bindings.filter(function(t){return t.node.checked});return t.length>0?t[0].element.getAttribute("value"):void 0}function Jr(t){return t&&t.template.f&&1===t.template.f.length&&!t.template.f[0].s?t.template.f[0].t===Bo?!0:(t.template.f[0].t===Ko&&y("It is not possible create a binding using a triple mustache."),!1):!1}function Xr(t){var e=t.name,n=t.attributeByName;if("input"===e||"textarea"===e||"select"===e||n.contenteditable){var i=Jr(n.value),r=Jr(n.contenteditable),s=t.getAttribute("contenteditable");if((s||r)&&i)return Hf;if("input"===e){var a=t.getAttribute("type");if("radio"===a){var o=Jr(n.name),u=Jr(n.checked);return o&&u?(y("A radio input can have two-way binding on its name attribute, or its checked attribute - not both",{ractive:t.root}),Xf):o?Xf:u?Jf:null}if("checkbox"===a){var h=Jr(n.name),l=Jr(n.checked);return h&&l?Ff:h?qf:l?Ff:null}return"file"===a&&i?Wf:"number"===a&&i?Qf:"range"===a&&i?Qf:i?Zf:null}return"select"===e&&i?t.getAttribute("multiple")?Gf:td:"textarea"===e&&i?Zf:null}}function ts(t){var e=t.attributeByName.name;return"radio"===t.getAttribute("type")&&(e||{}).interpolator&&t.getAttribute("value")===e.interpolator.model.get()}function es(t){var e=t.toString();return e?" "+e:""}function ns(t){var e=t.getAttribute("xmlns");if(e)return e;if("svg"===t.name)return mc;var n=t.parent;return n?"foreignobject"===n.name?dc:n.node.namespaceURI:t.ractive.el.namespaceURI}function is(t){for(var e,n=t.type,i=t.currentTarget,r=i._ractive&&i._ractive.proxy,s=t.target,a=!0;a&&s&&s!==i;){var o=s._ractive&&s._ractive.proxy;if(o&&o.up.delegate===r&&rs(t,s,i)&&(e=o.listeners&&o.listeners[n]))for(var u=e.length,h=0;u>h;h++)a=e[h].call(s,t)!==!1&&a;s=s.parentNode||s.correspondingUseElement}return a}function rs(t,e,n){if(id&&t instanceof id)for(var i=e;i&&i!==n;){if(i.disabled)return!1;i=i.parentNode||i.correspondingUseElement}return!0}function ss(t){var e,n=this,i=this._ractive.proxy;if(i.listeners&&(e=i.listeners[t.type]))for(var r=e.length,s=0;r>s;s++)e[s].call(n,t)}function as(){var t=this._ractive.proxy;yl.start(),t.formBindings.forEach(os),yl.end()}function os(t){t.model.set(t.resetValue)}function us(t,e,n,i){if(n){var r=n[0];if(r&&3===r.nodeType){var s=r.nodeValue.indexOf(i);n.shift(),0===s?r.nodeValue.length!==i.length&&n.unshift(r.splitText(i.length)):r.nodeValue=i}else r=t.node=Ua.createTextNode(i),n[0]?e.insertBefore(r,n[0]):e.appendChild(r);t.node=r}else t.node||(t.node=Ua.createTextNode(i)),e.appendChild(t.node)}function hs(t){t.deps.length||t.refs||t.links.length||t.teardown()}function ls(t){t.base&&t.base.unregister(t.proxy),t.models&&t.models.forEach(function(e){e.unregister&&e.unregister(t)})}function cs(t){var e,n,i=t.deps.length;for(e=0;i>e;e++)n=t.deps[e],n.pathChanged&&n.pathChanged(),n.fragment&&n.fragment.pathModel&&n.fragment.pathModel.applyValue(t.getKeypath());for(i=t.children.length,e=0;i>e;e++)cs(t.children[e])}function fs(t,e){return e.r?Qe(t,e.r):e.x?new wd(t,e.x):e.rx?new _d(t,e.rx):void 0}function ds(t){Cd.call(this,t)}function ps(t){t.sp();var e=Ot(t);if(!e)return null;var n={key:e};if(t.sp(),!t.matchString(":"))return null;t.sp();var i=t.read();return i?(n.value=i.v,n):null}function ms(t,e){var n=new Rd(t,{values:e});return n.result}function vs(t){var e=t.template.f,n=t.element.instance.viewmodel,i=n.value;if(1===e.length&&e[0].t===Bo){var r=fs(t.up,e[0]),s=r.get(!1);e[0].s?!o(s)||e[0].x?n.joinKey(A(t.name)).set(s):y("Cannot copy non-computed object value from static mapping '"+t.name+"'"):(t.model=r,t.link=n.createLink(t.name,r,e[0].r,{mapping:!0}),c(s)&&!r.isReadonly&&t.name in i&&r.set(i[t.name])),r!==t.model&&r.unregister()}else t.boundFragment=new Vp({owner:t,template:e}).bind(),t.model=n.joinKey(A(t.name)),t.model.set(t.boundFragment.valueOf()),t.boundFragment.bubble=function(){Vp.prototype.bubble.call(t.boundFragment),yl.scheduleTask(function(){t.boundFragment.update(),t.model.set(t.boundFragment.valueOf())})}}function gs(t,n,i){var r=ys(t,n,i||{});if(r)return r;if(r=dl.fromId(n,{noThrow:!0})){var s=dl.parseFor(r,t);return s.p&&e(t.partials,s.p),t.partials[n]=s.t}}function ys(e,n,i){var r=xs(n,i.owner);if(r)return r;var s=x("partials",e,n);if(s){r=s.partials[n];var a;if(u(r)){if(a=r,a.styleSet)return a;a=r.bind(s),a.isOwner=t(s.partials,n),r=a.call(e,dl)}if(!r&&""!==r)return void y(fo,n,"partial","partial",{ractive:e});if(!dl.isParsed(r)){var o=dl.parseFor(r,s);o.p&&y("Partials ({{>%s}}) cannot contain nested inline partials",n,{ractive:e});var h=a?s:bs(s,n);h.partials[n]=r=o.t}return a&&(r._fn=a),r.v?r.t:r}}function bs(e,n){return t(e.partials,n)?e:ws(e.constructor,n)}function ws(e,n){return e?t(e.partials,n)?e:ws(e.Parent,n):void 0}function xs(e,n){if(n){if(n.template&&n.template.p&&!Da(n.template.p)&&t(n.template.p,e))return n.template.p[e];if(n.up&&n.up.owner)return xs(e,n.up.owner)}}function ks(t){ds.call(this,t);var e=t.template;e.t===Qo?this.yielder=1:e.t===zo&&(this.type=Uo,this.macro=t.macro)}function _s(t,e){t.partial=t.last=e,Es(t);var n={owner:t,template:t.partial};t.yielder&&(n.ractive=t.container.parent),t.fn&&(n.cssIds=t.fn._cssIds),t.fragment=new Vp(n)}function Es(t){t.template.c&&(t.partial=[{t:Lo,n:wu,f:t.partial,z:t.template.z}],Pa(t.partial[0],t.template.c),t.yielder&&(t.partial[0].y=t))}function As(t,e,n){var i=e;return Da(i)?t.partial=i:i&&o(i)?Da(i.t)?t.partial=i.t:h(i.template)&&(t.partial=js(i.template,i.template,t.ractive).t):u(i)&&i.styleSet?(t.fn=i,t.fragment&&(t.fragment.cssIds=i._cssIds)):null!=i&&(i=gs(t.ractive,""+i,t.containerFragment||t.up),i?(t.name=e,i.styleSet?(t.fn=i,t.fragment&&(t.fragment.cssIds=i._cssIds)):t.partial=i):n?t.partial=js(""+e,""+e,t.ractive).t:t.name=e),t.partial}function Cs(t){if(As(this,t,!0),!this.initing){if(this.dirtyTemplate=!0,this.fnTemplate=this.partial,!this.updating){var e=yl.start();return this.bubble(),yl.end(),e}this.bubble(),yl.promise()}}function Ss(t,e){var n=this.fragment.aliases||(this.fragment.aliases={});e?n[e]=this._data.joinAll(A(t)):n[t]=this._data}function Os(e){var n=e.fn,i=e.fragment,r=e.template=Pa({},e.template),s=e.handle=i.getContext({proxy:e,aliasLocal:Ss,name:e.template.e||e.name,attributes:{},setTemplate:Cs.bind(e),template:r,macro:n});if(r.p||(r.p={}),r.p=s.partials=Pa({},r.p),t(r.p,"content")||(r.p.content=r.f||[]),Da(n.attributes)){e._attrs={};var a=function(){this.dirty=!0,e.dirtyAttrs=!0,e.bubble()};if(Da(r.m)){var o=r.m;r.p[Dd]=r.m=o.filter(function(t){return!~n.attributes.indexOf(t.n)}),o.filter(function(t){return~n.attributes.indexOf(t.n)}).forEach(function(t){var n=new Vp({template:t.f,owner:e});n.bubble=a,n.findFirstNode=f,e._attrs[t.n]=n})}else r.p[Dd]=[]}else r.p[Dd]=r.m;e._attrs&&(Ka(e._attrs).forEach(function(t){e._attrs[t].bind()}),e.refreshAttrs()),e.initing=1,e.proxy=n.call(e.ractive,s,s.attributes)||{},e.partial||(e.partial=[]),e.fnTemplate=e.partial,e.initing=0,Es(e),i.resetTemplate(e.partial)}function js(t,e,n){var i;try{i=dl.parse(e,dl.getParseOptions(n))}catch(r){y("Could not parse partial from expression '"+t+"'\n"+r.message)}return i||{t:[]}}function Ns(t){var e,n,i=t;t:for(;i;){for(n=0;!n&&i;){if(i.owner.type===zo&&(n=i.owner),i.owner.ractive&&i.owner.ractive.delegate===!1)break t;i=i.parent||i.componentParent}if(n.delegate===!1)break t;for(e=n.delegate||n;i&&!i.iterations;){if(i.owner.ractive&&i.owner.ractive.delegate===!1)break t;i=i.parent||i.componentParent}}return e}function Ts(t,e,n,i){var r=t.context?Ms(t,e,n):void 0;e.key=n,e.index=i,e.context=r,t.source&&(e.lastValue=r&&r.get()),e.idxModel&&e.idxModel.applyValue(i),e.keyModel&&e.keyModel.applyValue(n),e.pathModel&&(e.pathModel.context=r,e.pathModel.applyValue(r.getKeypath())),e.rootModel&&(e.rootModel.context=r,e.rootModel.applyValue(r.getKeypath(e.ractive.root)));var s=e.aliases;t.aliases&&t.aliases.forEach(function(t){"."===t.x.r?s[t.n]=r:"@index"===t.x.r?s[t.n]=e.getIndex():"@key"===t.x.r?s[t.n]=e.getKey():"@keypath"===t.x.r?s[t.n]=e.getKeypath():"@rootpath"===t.x.r&&(s[t.n]=e.getKeypath(!0))})}function Vs(t,e){var n=t.context.get()||[];return e===!0?n.slice():n.map(function(t){return e.reduce(function(t,e){return t&&t[e]},t)})}function Ms(t,e,n){if(t.source){var i,r=t.source.model.get();if(r.indexOf&&~(i=r.indexOf(t.context.joinKey(n).get())))return t.source.model.joinKey(i)}return t.context.joinKey(n)}function Ps(t){return!t||Da(t)&&0===t.length||s(t)&&0===Ka(t).length}function Is(t,e){return e||Da(t)?bu:a(t)?xu:c(t)?null:gu}function Rs(t,e){var n=(t.containerFragment||t.up).findNextNode(t);if(n){var i=ti();e.render(i),n.parentNode.insertBefore(i,n)}else e.render(t.up.findParentNode())}function Bs(){Yd=!Ua[Jd]}function Ks(){Yd=!1}function Ls(){Yd=!0}function Ds(t){return t?(op.test(t)&&(t="-"+t),t.replace(/[A-Z]/g,function(t){return"-"+t.toLowerCase()})):""}function Fs(e,n,i){for(var r=n;r;){if(t(r,e)&&(c(i)||i?r.rendering:r.unrendering))return r[e];r=r.component&&r.component.ractive}return n[e]}function zs(t,e){var n=[];if(null==t||""===t)return n;var i,r,s;Ap&&(r=Cp[e.tagName])?(i=Us("DIV"),i.innerHTML=r[0]+t+r[1],i=i.querySelector(".x"),"SELECT"===i.tagName&&(s=i.options[i.selectedIndex])):e.namespaceURI===mc?(i=Us("DIV"),i.innerHTML=''+t+"",i=i.querySelector(".x")):"TEXTAREA"===e.tagName?(i=ic("div"),"undefined"!=typeof i.textContent?i.textContent=t:i.innerHTML=t):(i=Us(e.tagName),i.innerHTML=t,"SELECT"===i.tagName&&(s=i.options[i.selectedIndex]));for(var a;a=i.firstChild;)n.push(a),i.removeChild(a);var o;if("SELECT"===e.tagName)for(o=n.length;o--;)n[o]!==s&&(n[o].selected=!1);return n}function Us(t){return Sp[t]||(Sp[t]=ic(t))}function $s(e,n){var i,r=x("components",e,n);if(r&&(i=r.components[n],i&&!i.isInstance))if(i["default"]&&i["default"].isInstance)i=i["default"];else if(!i.then&&u(i)){var s=i.bind(r);if(s.isOwner=t(r.components,n),i=s(),!i)return void y(fo,n,"component","component",{ractive:e});h(i)&&(i=$s(e,i)),i._fn=s,r.components[n]=i}return i}function qs(t,e){var n=e.template.p||{},i=e.template.e,r=Pa({},e,{template:{t:zo,e:i},macro:function(r){r.setTemplate(n["async-loading"]||[]),t.then(function(t){e.up.ractive.components[i]=t,n["async-loaded"]?(r.partials.component=[e.template],r.setTemplate(n["async-loaded"])):r.setTemplate([e.template])},function(t){n["async-failed"]?(r.aliasLocal("error","error"),r.set("@local.error",t),r.setTemplate(n["async-failed"])):r.setTemplate([])})}});return new ks(r)}function Hs(t,e,n){var i=t.f.find(function(t){return t.t===e});return i?i.n?[{t:19,n:54,f:i.f||[],z:[{n:i.n,x:{r:"__await."+n}}]}]:i.f||[]:[]}function Zs(t){var e=t.template,n=Hs(e,Eu,"value"),i=Hs(e,Au,"error"),r=Hs(e,Lo),s=Hs(e,ku),a=Pa({},t,{template:{t:zo,m:[{t:Zo,n:"for",f:[{t:Bo,r:e.r,rx:e.rx,x:e.x}]}]},macro:function(t,e){function a(e){e["for"]&&u(e["for"].then)?(t.setTemplate(r),e["for"].then(function(e){t.set("@local.value",e),t.setTemplate(n)},function(e){t.set("@local.error",e),t.setTemplate(i)})):c(e["for"])?t.setTemplate(s):(t.set("@local.value",e["for"]),t.setTemplate(n))}return t.aliasLocal("__await"),a(e),{update:a}}});return a.macro.attributes=["for"],new ks(a)}function Ws(t){if(h(t.template))return new Gd(t);var e,n,i=t.template.t;if(i===zo){if(n=t.template.e,e=x("partials",t.up.ractive,n),e&&(e=e.partials[n],e.styleSet))return t.macro=e,new ks(t);if(e=$s(t.up.ractive,n)){if(u(e.then))return qs(e,t);if(u(e))return new Vf(t,e)}return new(e=Tp[n.toLowerCase()]||nd)(t)}var r;if(i===Zo){var s=t.owner;(!s||s.type!==Ho&&s.type!==Go&&s.type!==zo)&&(s=Fn(t.up)),t.element=s,r=s.type===Go||s.type===Ho?Bd:_f}else r=Np[i];if(!r)throw new Error("Unrecognised item type "+i);return new r(t)}function Gs(t,e,n,i){return void 0===i&&(i=0),t.map(function(t){if(t.type===Ro)return t.template;if(t.fragment)return t.fragment.iterations?t.fragment.iterations.map(function(t){return Gs(t.items,e,n,i)}).join(""):Gs(t.fragment.items,e,n,i);var r=n+"-"+i++,s=t.model||t.newModel;return e[r]=s?s.wrapper?s.wrapperValue:s.get():void 0,"${"+r+"}"}).join("")}function Qs(t,e,n){void 0===n&&(n={});for(var i=0;i-1){i=!0;break}return i&&($l.unrender.fire(this),this.fragment.resetTemplate(this.template),$l.render.fire(this),$l.complete.fire(this)),yl.end(),$l.reset.fire(this,t),e}function ia(t,e,n,i){t.forEach(function(t){if(t.type===Uo&&(t.refName===e||t.name===e))return t.inAttribute=n,void i.push(t);if(t.fragment)ia(t.fragment.iterations||t.fragment.items,e,n,i);else if(Da(t.items))ia(t.items,e,n,i);else if(t.type===Go&&t.instance){if(t.instance.partials[e])return;ia(t.instance.fragment.items,e,n,i)}t.type===zo&&Da(t.attributes)&&ia(t.attributes,e,!0,i)})}function ra(t,e){var n=[];ia(this.fragment.items,t,!1,n);var i=yl.start();return this.partials[t]=e,n.forEach(Q),yl.end(),i}function sa(t){Jc.init(null,this,{template:t});var e=this.transitionsEnabled;this.transitionsEnabled=!1;var n=this.component;n&&(n.shouldDestroy=!0),this.unrender(),n&&(n.shouldDestroy=!1);var i=yl.start();this.fragment.unbind().unrender(!0),this.fragment=new Vp({template:this.template,root:this,owner:this});var r=ti();return this.fragment.bind(this.viewmodel).render(r),n&&!n.external?this.fragment.findParentNode().insertBefore(r,n.findNextNode()):this.el.insertBefore(r,this.anchor),yl.end(),this.transitionsEnabled=e,i}function aa(t,e,n){var i=this,r=o(t)?e:n;return sn(on(i,t,e,r&&r.isolated),r)}function oa(t,e,n){var i=l(e)?-e:-1,r=o(e)?e:n;return ln(this,t,i,r)}function ua(t,e){if(!h(t))throw new TypeError(co);return sn(an(this,t,null,e&&e.isolated).map(function(t){return[t,!t.get()]}),e)}function ha(){var t=[this.cssId].concat(this.findAllComponents().map(function(t){return t.cssId})),e=Ka(t.reduce(function(t,e){return t[e]=!0,t},{}));return xi(e)}function la(){return this.fragment.toString(!0)}function ca(){return this.fragment.toString(!1)}function fa(t,e,n){e instanceof HTMLElement||s(e)&&(n=e),e=e||this.event.node,e&&e._ractive||p("No node was supplied for transition "+t),n=n||{};var i=e._ractive.proxy,r=new kp({owner:i,up:i.up,name:t,params:n});r.bind();var a=yl.start();return yl.registerTransition(r),yl.end(),a.then(function(){return r.unbind()}),a}function da(t){var e=yl.start();return this.viewmodel.joinAll(A(t),{lastLink:!1}).unlink(),yl.end(),e}function pa(){if(!this.fragment.rendered)return y("ractive.unrender() was called on a Ractive instance that was not rendered"),Promise.resolve();this.unrendering=!0;var t=yl.start();$l.unrendering.fire(this);var e=!this.component||(this.component.anchor||{}).shouldDestroy||this.component.shouldDestroy||this.shouldDestroy;return this.fragment.unrender(e),e&&(this.destroyed=!0),V(this.el.__ractive_instances__,this),$l.unrender.fire(this),yl.end(),this.unrendering=!1,t}function ma(t,e){var n=yl.start();return t?this.viewmodel.joinAll(A(t)).updateFromBindings(e!==!1):this.viewmodel.updateFromBindings(!0),yl.end(),n}function va(){for(var t=this,e=[],n=arguments.length;n--;)e[n]=arguments[n];return e.forEach(function(e){e({proto:t,Ractive:t.constructor.Ractive,instance:t})}),this}function ga(t){return t&&t instanceof this}function ya(t,e){return this._cssModel.joinAll(A(t)).get(!0,e)}function ba(t,e){if(Fp.find(function(e){return e.id===t}))throw new Error("Extra styles with the id '"+t+"' have already been added.");Fp.push({id:t,css:e}),this.css||Object.defineProperty(this,"css",{configurable:!1,writable:!1,value:wa}),this._cssDef||(Object.defineProperty(this,"_cssDef",{configurable:!0,writable:!1,value:{transform:!1,id:"Ractive.addStyle"}}),bi(this._cssDef)),Vi(this),wi(!0)}function wa(t){return Fp.map(function(e){return"\n/* ---- extra style "+e.id+" */\n"+(u(e.css)?e.css(t):e.css)}).join("")}function xa(t){return!!Fp.find(function(e){return e.id===t})}function ka(t,e,n){var i=o(t)?e:n,r=Ol;return sn(on({viewmodel:r},t,e,!0),i)}function _a(t,e){return Ol.joinAll(A(t)).get(!0,e)}function Ea(){for(var t=this,e=[],n=arguments.length;n--;)e[n]=arguments[n];return e.forEach(function(e){u(e)&&e({proto:t.prototype,Ractive:t.Ractive,instance:t})}),this}function Aa(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];return t.length?t.reduce(Sa,this):Sa(this)}function Ca(t,e){return void 0===e&&(e={}),Sa(this,e,t)}function Sa(t,e,i){void 0===e&&(e={});var r,s=u(i)&&i;if(e.prototype instanceof Va)throw new Error("Ractive no longer supports multiple inheritance.");if(s){if(!(s.prototype instanceof t))throw new Error("Only classes that inherit the appropriate prototype may be used with extend");if(!zp.test(s.toString()))throw new Error("Only classes that call super in their constructor may be used with extend");r=s.prototype}else s=function(t){return this instanceof s?(Vr(this,t||{}),void Js(this,t||{},{})):new s(t)},r=Ia(t.prototype),r.constructor=s,s.prototype=r;if(Ba(s,{defaults:{value:r},extend:{value:Aa,writable:!0,configurable:!0},extendWith:{value:Ca,writable:!0,configurable:!0},extensions:{value:[]},use:{value:Ea},isInstance:{value:ga},Parent:{value:t},Ractive:{value:Va},styleGet:{value:ya.bind(s),configurable:!0},styleSet:{value:Ni.bind(s),configurable:!0}}),sf.extend(t,r,e,s),s._on=(t._on||[]).concat(n(e.on)),s._observe=(t._observe||[]).concat(n(e.observe)),t.extensions.push(s),e.attributes){var a;a=Da(e.attributes)?{optional:e.attributes,required:[]}:e.attributes,Da(a.required)||(a.required=[]),Da(a.optional)||(a.optional=[]),s.attributes=a}return Yc.extend(t,r,e,s),Ra(s,"helpers",{writable:!0,value:r.helpers}),Da(e.use)&&s.use.apply(s,e.use),s}function Oa(t,e){if(!u(t))throw new Error("The macro must be a function");return Pa(t,e),Ba(t,{extensions:{value:[]},_cssIds:{value:[]},cssData:{value:Pa(Ia(this.cssData),t.cssData||{})},styleGet:{value:ya.bind(t)},styleSet:{value:Ni.bind(t)}}),Ra(t,"_cssModel",{value:new Wc(t)}),t.css&&Ii(t,t,t),this.extensions.push(t),t}function ja(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];return t.map(_).join(".")}function Na(t){return A(t).map(C)}function Ta(t,e,n){return w(e,n,t)}function Va(t){return this instanceof Va?(Vr(this,t||{}),void Js(this,t||{},{})):new Va(t)}Object.assign||(Object.assign=function(t){for(var e=[],n=arguments.length-1;n-->0;)e[n]=arguments[n+1];if(null==t)throw new TypeError("Cannot convert undefined or null to object");for(var i=Object(t),r=e.length,s=0;r>s;s++){var a=e[s];for(var o in a)Object.prototype.hasOwnProperty.call(a,o)&&(i[o]=a[o])}return i});var Ma=Object,Pa=Ma.assign,Ia=Ma.create,Ra=Ma.defineProperty,Ba=Ma.defineProperties,Ka=Ma.keys,La=Object.prototype.toString,Da=Array.isArray;if(Array.prototype.find||Ra(Array.prototype,"find",{value:function(e,n){if(null===this||c(this))throw new TypeError("Array.prototype.find called on null or undefined");if(!u(e))throw new TypeError(e+" is not a function");for(var i=Object(this),r=i.length>>>0,s=0;r>s;s++)if(t(i,s)&&e.call(n,i[s],s,i))return i[s];return void 0},configurable:!0,writable:!0}),"undefined"!=typeof window&&window.Node&&window.Node.prototype&&!window.Node.prototype.contains&&(Node.prototype.contains=function(t){var e=this;if(!t)throw new TypeError("node required");do if(e===t)return!0;while(t=t&&t.parentNode);return!1}),"undefined"!=typeof window&&window.performance&&!window.performance.now){window.performance=window.performance||{};var Fa=Date.now();window.performance.now=function(){return Date.now()-Fa}}var za="undefined"!=typeof window?window:null,Ua=za?document:null,$a=!!Ua,qa="undefined"!=typeof global?global:za,Ha="undefined"!=typeof console&&u(console.warn)&&u(console.warn.apply),Za=Ua?Ua.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure","1.1"):!1,Wa=["o","ms","moz","webkit"];if(!qa.Promise){var Ga={},Qa={},Ya={},Ja=qa.Promise=function(t){var e,n,i=[],r=[],s=Ga,a=function(t){return function(a){s===Ga&&(e=a,s=t,n=to(s===Qa?i:r,e),Xa(n))}},o=a(Qa),h=a(Ya);try{t(o,h)}catch(l){h(l)}return{then:function(t,e){var a=new Ja(function(o,h){var l=function(t,e,n){u(t)?e.push(function(e){try{eo(a,t(e),o,h)}catch(n){h(n)}}):e.push(n)};l(t,i,o),l(e,r,h),s!==Ga&&Xa(n)});return a},"catch":function(t){return this.then(null,t)},"finally":function(t){return this.then(function(e){return t(),e},function(e){throw t(),e})}}};Ja.all=function(t){return new Ja(function(e,n){var i,r,s=[];if(!t.length)return void e(s);var a=function(t,r){t&&u(t.then)?t.then(function(t){s[r]=t,--i||e(s)},n):(s[r]=t,--i||e(s))};for(i=r=t.length;r--;)a(t[r],r)})},Ja.race=function(t){return new Ja(function(e,n){function i(t){s&&(s=!1,e(t))}function r(t){s&&(s=!1,n(t))}for(var s=!0,a=0;a "+t);var s;(s=n.node||i.fragment&&i.fragment.rendered&&i.find("*"))&&e.push(s)}}console.warn.apply(console,["%cRactive.js: %c"+t,"color: rgb(114, 157, 52);","color: rgb(85, 85, 85);"].concat(e))},io=function(){console.log.apply(console,arguments)}}else ro=io=so=f;var co="Bad arguments",fo='A function was specified for "%s" %s, but no %s was returned',po=function(t,e){return'Missing "'+t+'" '+e+" plugin. You may need to download a plugin via http://ractive.js.org/integrations/#"+e+"s"},mo={number:function(t,e){if(!r(t)||!r(e))return null;t=+t,e=+e;var n=e-t;return n?function(e){return t+e*n}:function(){return t}},array:function(t,e){var n,i;if(!Da(t)||!Da(e))return null;var r=[],s=[];for(i=n=Math.min(t.length,e.length);i--;)s[i]=k(t[i],e[i]);for(i=n;in;n+=1)s();return e},Ao.getKeypath=function(t){if(t!==this.ractive&&this._link)return this._link.target.getKeypath(t);if(!this.keypath){var e=this.parent&&this.parent.getKeypath(t);this.keypath=e?this.parent.getKeypath(t)+"."+_(this.key):_(this.key)}return this.keypath},Ao.getValueChildren=function(t){var e,n=this;Da(t)?(e=[],"length"in this&&this.length!==t.length&&e.push(this.joinKey("length")),t.forEach(function(t,i){e.push(n.joinKey(i))})):s(t)||u(t)?e=Ka(t).map(function(t){return n.joinKey(t)}):null!=t&&(e=[]);var i=this.computed;return i&&e.push.apply(e,Ka(i).map(function(t){return n.joinKey(t)})),e},Ao.getVirtual=function(t){var e=this,n=this.get(t,{virtual:!1});if(s(n)){for(var i=Da(n)?[]:Ia(null),r=Ka(n),a=r.length;a--;){var o=e.childByKey[r[a]];o?o._link?i[r[a]]=o._link.getVirtual():i[r[a]]=o.getVirtual():i[r[a]]=n[r[a]]}for(a=this.children.length;a--;){var u=e.children[a];u.key in i||!u._link||(i[u.key]=u._link.getVirtual())}if(this.computed)for(r=Ka(this.computed),a=r.length;a--;)i[r[a]]=e.computed[r[a]].get();return i}return n},Ao.has=function(t){var e=this;if(this._link)return this._link.has(t);var n=this.get(!1,_o);if(!n)return!1;if(t=C(t),(u(n)||s(n))&&t in n)return!0;var i=this.computed;return i&&t in this.computed?!0:(i=this.root.ractive&&this.root.ractive.computed,i&&Ka(i).forEach(function(t){return i[t].pattern&&i[t].pattern.test(e.getKeypath())?!0:void 0}),!1)},Ao.joinAll=function(t,e){for(var n=this,i=0;ie;e+=1)if(i.pos=r,n=t[e](i))return n;return null},getContextMessage:function(t,e){var n=this.getLinePos(t),i=n[0],r=n[1];if(-1===this.options.contextLines)return[i,r,e+" at line "+i+" character "+r];var s=this.lines[i-1],a="",o="";if(this.options.contextLines){var u=i-1-this.options.contextLines<0?0:i-1-this.options.contextLines;a=this.lines.slice(u,i-1-u).join("\n").replace(/\t/g," "),o=this.lines.slice(i,i+this.options.contextLines).join("\n").replace(/\t/g," "),a&&(a+="\n"),o&&(o="\n"+o)}var h=0,l=a+s.replace(/\t/g,function(t,e){return r>e&&(h+=1)," "})+"\n"+new Array(r+h).join(" ")+"^----"+o;return[i,r,e+" at line "+i+" character "+r+":\n"+l]},getLinePos:function(t){for(var e=this,n=0,i=0;t>=this.lineEnds[n];)i=e.lineEnds[n],n+=1;var r=t-i;return[n+1,r+1,t]},error:function qp(t){var e=this.getContextMessage(this.pos,t),n=e[0],i=e[1],r=e[2],qp=new Mo(r);throw qp.line=n,qp.character=i,qp.shortMessage=t,qp},matchString:function(t){return this.str.substr(this.pos,t.length)===t?(this.pos+=t.length,t):void 0},matchPattern:function(t){var e;return(e=t.exec(this.remaining()))?(this.pos+=e[0].length,e[1]||e[0]):void 0},sp:function(){this.matchPattern(Vo)},remaining:function(){return this.str.substring(this.pos)},nextChar:function(){return this.str.charAt(this.pos)},warn:function(t){var e=this.getContextMessage(this.pos,t)[2];y(e)}},Po.extend=function(e){var n=this,i=function(t,e){Po.call(this,t,e)};i.prototype=Ia(n.prototype);for(var r in e)t(e,r)&&(i.prototype[r]=e[r]);return i.extend=Po.extend,i};var Io,Ro=1,Bo=2,Ko=3,Lo=4,Do=5,Fo=6,zo=7,Uo=8,$o=9,qo=10,Ho=11,Zo=13,Wo=14,Go=15,Qo=16,Yo=17,Jo=18,Xo=19,tu=55,eu=20,nu=21,iu=22,ru=23,su=24,au=25,ou=26,uu=27,hu=30,lu=31,cu=32,fu=33,du=34,pu=35,mu=36,vu=40,gu=50,yu=51,bu=52,wu=53,xu=54,ku=60,_u=61,Eu=62,Au=63,Cu=70,Su=71,Ou=72,ju=73,Nu=74,Tu=/^[^\s=]+/,Vu=/^\s+/,Mu=/^(\/(?:[^\n\r\u2028\u2029\/\\[]|\\.|\[(?:[^\n\r\u2028\u2029\]\\]|\\.)*])+\/(?:([gimuy])(?![a-z]*\2))*(?![a-zA-Z_$0-9]))/,Pu=/[-\/\\^$*+?.()|[\]{}]/g,Iu={},Ru={allowfullscreen:1,async:1,autofocus:1,autoplay:1,checked:1,compact:1,controls:1,declare:1,"default":1,defaultchecked:1,defaultmuted:1,defaultselected:1,defer:1,disabled:1,enabled:1,formnovalidate:1,hidden:1,indeterminate:1,inert:1,ismap:1,itemscope:1,loop:1,multiple:1,muted:1,nohref:1,noresize:1,noshade:1,novalidate:1,nowrap:1,open:1,pauseonexit:1,readonly:1,required:1,reversed:1,scoped:1,seamless:1,selected:1,sortable:1,translate:1,truespeed:1,typemustmatch:1,visible:1},Bu={area:1,base:1,br:1,col:1,command:1,doctype:1,embed:1,hr:1,img:1,input:1,keygen:1,link:1,meta:1,param:1,source:1,track:1,wbr:1},Ku={quot:34,amp:38,apos:39,lt:60,gt:62,nbsp:160,iexcl:161,cent:162,pound:163,curren:164,yen:165,brvbar:166,sect:167,uml:168,copy:169,ordf:170,laquo:171,not:172,shy:173,reg:174,macr:175,deg:176,plusmn:177,sup2:178,sup3:179,acute:180,micro:181,para:182,middot:183,cedil:184,sup1:185,ordm:186,raquo:187,frac14:188,frac12:189,frac34:190,iquest:191,Agrave:192,Aacute:193,Acirc:194,Atilde:195,Auml:196,Aring:197,AElig:198,Ccedil:199,Egrave:200,Eacute:201,Ecirc:202,Euml:203,Igrave:204,Iacute:205,Icirc:206,Iuml:207,ETH:208,Ntilde:209,Ograve:210,Oacute:211,Ocirc:212,Otilde:213,Ouml:214,times:215,Oslash:216,Ugrave:217,Uacute:218,Ucirc:219,Uuml:220,Yacute:221,THORN:222,szlig:223,agrave:224,aacute:225,acirc:226,atilde:227,auml:228,aring:229,aelig:230,ccedil:231,egrave:232,eacute:233,ecirc:234,euml:235,igrave:236,iacute:237,icirc:238,iuml:239,eth:240,ntilde:241,ograve:242,oacute:243,ocirc:244,otilde:245,ouml:246,divide:247,oslash:248,ugrave:249,uacute:250,ucirc:251,uuml:252,yacute:253,thorn:254,yuml:255,OElig:338,oelig:339,Scaron:352,scaron:353,Yuml:376,fnof:402,circ:710,tilde:732,Alpha:913,Beta:914,Gamma:915,Delta:916,Epsilon:917,Zeta:918,Eta:919,Theta:920,Iota:921,Kappa:922,Lambda:923,Mu:924,Nu:925,Xi:926,Omicron:927,Pi:928,Rho:929,Sigma:931,Tau:932,Upsilon:933,Phi:934,Chi:935,Psi:936,Omega:937,alpha:945,beta:946,gamma:947,delta:948,epsilon:949,zeta:950,eta:951,theta:952,iota:953,kappa:954,lambda:955,mu:956,nu:957,xi:958,omicron:959,pi:960,rho:961,sigmaf:962,sigma:963,tau:964,upsilon:965,phi:966,chi:967,psi:968,omega:969,thetasym:977,upsih:978,piv:982,ensp:8194,emsp:8195,thinsp:8201,zwnj:8204,zwj:8205,lrm:8206,rlm:8207,ndash:8211,mdash:8212,lsquo:8216,rsquo:8217,sbquo:8218,ldquo:8220,rdquo:8221,bdquo:8222,dagger:8224,Dagger:8225,bull:8226,hellip:8230,permil:8240,prime:8242,Prime:8243,lsaquo:8249,rsaquo:8250,oline:8254,frasl:8260,euro:8364,image:8465,weierp:8472,real:8476,trade:8482,alefsym:8501,larr:8592,uarr:8593,rarr:8594,darr:8595,harr:8596,crarr:8629,lArr:8656,uArr:8657,rArr:8658,dArr:8659,hArr:8660,forall:8704,part:8706,exist:8707,empty:8709,nabla:8711,isin:8712,notin:8713,ni:8715,prod:8719,sum:8721,minus:8722,lowast:8727,radic:8730,prop:8733,infin:8734,ang:8736,and:8743,or:8744,cap:8745,cup:8746,"int":8747,there4:8756,sim:8764,cong:8773,asymp:8776,ne:8800,equiv:8801,le:8804,ge:8805,sub:8834,sup:8835,nsub:8836,sube:8838,supe:8839,oplus:8853,otimes:8855,perp:8869,sdot:8901,lceil:8968,rceil:8969,lfloor:8970,rfloor:8971,lang:9001,rang:9002,loz:9674,spades:9824,clubs:9827,hearts:9829,diams:9830},Lu=[8364,129,8218,402,8222,8230,8224,8225,710,8240,352,8249,338,141,381,143,144,8216,8217,8220,8221,8226,8211,8212,732,8482,353,8250,339,157,382,376],Du=new RegExp("&(#?(?:x[\\w\\d]+|\\d+|"+Ka(Ku).join("|")+"));?","g"),Fu=u(String.fromCodePoint),zu=Fu?String.fromCodePoint:String.fromCharCode,Uu=//g,qu=/&/g,Hu=65533,Zu="Expected a JavaScript expression",Wu="Expected closing paren",Gu=/^(?:[+-]?)0*(?:(?:(?:[1-9]\d*)?\.\d+)|(?:(?:0|[1-9]\d*)\.)|(?:0|[1-9]\d*))(?:[eE][+-]?\d+)?/,Qu=/^(?=.)[^"'\\]+?(?:(?!.)|(?=["'\\]))/,Yu=/^\\(?:[`'"\\bfnrt]|0(?![0-9])|x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|(?=.)[^ux0-9])/,Ju=/^\\(?:\r\n|[\u000A\u000D\u2028\u2029])/,Xu=_t('"'),th=_t("'"),eh=/^[^`"\\\$]+?(?:(?=[`"\\\$]))/,nh=/[\r\n\t\b\f]/g,ih=/^[a-zA-Z_$][a-zA-Z_$0-9]*/,rh=/^\s*\.{3}/,sh=/^(?:[a-zA-Z$_0-9]|\\\.)+(?:(?:\.(?:[a-zA-Z$_0-9]|\\\.)+)|(?:\[[0-9]+\]))*/,ah=/^[a-zA-Z_$][-\/a-zA-Z_$0-9]*(?:\.(?:[a-zA-Z_$][-\/a-zA-Z_$0-9]*))*/,oh=/^[a-zA-Z_$][a-zA-Z_$0-9]*$/,uh=/^(?:Array|console|Date|RegExp|decodeURIComponent|decodeURI|encodeURIComponent|encodeURI|isFinite|isNaN|parseFloat|parseInt|JSON|Math|NaN|undefined|null|Object|Number|String|Boolean)\b/,hh=/^(?:break|case|catch|continue|debugger|default|delete|do|else|finally|for|function|if|in|instanceof|new|return|switch|throw|try|typeof|var|void|while|with)$/,lh=/^(?:\@\.|\@|~\/|(?:\^\^\/(?:\^\^\/)*(?:\.\.\/)*)|(?:\.\.\/)+|\.\/(?:\.\.\/)*|\.)/,ch=/^(key|index|keypath|rootpath|this|global|shared|context|event|node|local|style|helpers|last|macro)/,fh=function(t,e){return function(n){var i;return(i=e(n))?i:n.matchString(t)?(n.sp(),i=Dt(n),i||n.error(Zu),{s:t,o:i,t:fu}):null}};!function(){var t,e,n,i,r="! ~ + - typeof".split(" ");for(i=Kt,t=0,e=r.length;e>t;t+=1)n=fh(r[t],i),i=n;Io=i}();var dh,ph=Io,mh=function(t,e){return function(n){if(n.inUnquotedAttribute&&(">"===t||"/"===t))return e(n);var i,r,s;if(r=e(n),!r)return null;for(;;){if(i=n.pos,n.sp(),!n.matchString(t))return n.pos=i,r;if("in"===t&&/[a-zA-Z_$0-9]/.test(n.remaining().charAt(0)))return n.pos=i,r;if(n.sp(),s=e(n),!s)return n.pos=i,r;r={t:mu,s:t,o:[r,s]}}}};!function(){var t,e,n,i,r="* / % + - << >> >>> < <= > >= in instanceof == != === !== & ^ | && ||".split(" ");for(i=ph,t=0,e=r.length;e>t;t+=1)n=mh(r[t],i),i=n;dh=i}();var vh=dh,gh=/^[^\s"'>\/=(]+/,yh=/^on/,bh=/^on-([a-zA-Z\*\.$_]((?:[a-zA-Z\*\.$_0-9\-]|\\-)+))$/,wh=/^(?:change|reset|teardown|update|construct|config|init|render|complete|unrender|detach|insert|destruct|attachchild|detachchild)$/,xh=/^as-([a-z-A-Z][-a-zA-Z_0-9]*)$/,kh=/^([a-zA-Z](?:(?!-in-out)[-a-zA-Z_0-9])*)-(in|out|in-out)$/,_h=/^((bind|class)-(([-a-zA-Z0-9_])+))$/,Eh={lazy:{t:ju,v:"l"},twoway:{t:ju,v:"t"},"no-delegation":{t:Nu}},Ah=/^[^\s"'=<>\/`]+/,Ch=/^[^\s"'=<>@\[\]()]*/,Sh=/^\s+/,Oh=/\\/g,jh={t:qo,exclude:!0},Nh=/^(?:[a-zA-Z$_0-9]|\\\.)+(?:(?:(?:[a-zA-Z$_0-9]|\\\.)+)|(?:\[[0-9]+\]))*/,Th=/^as/i,Vh={"else":/^\s*else\s*/,elseif:/^\s*elseif\s+/,then:/^\s*then\s*/,"catch":/^\s*catch\s*/},Mh={"else":ku,elseif:_u,then:Eu,"catch":Au},Ph={each:bu,"if":gu,"with":xu,unless:yu},Ih=/^\s*:\s*([a-zA-Z_$][a-zA-Z_$0-9]*)/,Rh=/^\s*,\s*([a-zA-Z_$][a-zA-Z_$0-9]*)/,Bh=new RegExp("^("+Ka(Ph).join("|")+")\\b"),Kh="",Dh=/^[ \t\f\r\n]*\r?\n/,Fh=/\r?\n[ \t\f\r\n]*$/,zh=/[ \t\f\r\n]+/g,Uh=/^[ \t\f\r\n]+/,$h=/[ \t\f\r\n]+$/,qh=/^(?:\r\n|\r|\n)/,Hh=/(?:\r\n|\r|\n)$/,Zh=/^([a-zA-Z]{1,}:?[a-zA-Z0-9\-]*)\s*\>/,Wh=/^[a-zA-Z]{1,}:?[a-zA-Z0-9\-]*/,Gh=/^[a-zA-Z_$][-a-zA-Z0-9_$]*/,Qh=/^[\s\n\/>]/,Yh=/;\s*$/,Jh={exclude:!0},Xh={li:["li"],dt:["dt","dd"],dd:["dt","dd"],p:"address article aside blockquote div dl fieldset footer form h1 h2 h3 h4 h5 h6 header hgroup hr main menu nav ol p pre section table ul".split(" "),rt:["rt","rp"],rp:["rt","rp"],optgroup:["optgroup"],option:["option","optgroup"],thead:["tbody","tfoot"],tbody:["tbody","tfoot"],tfoot:["tbody"],tr:["tr","tbody"],td:["td","th","tr"],th:["td","th","tr"]},tl=/^\s*(elseif|else|then|catch)\s*/,el=/^\s*#\s*partial\s+/,nl={},il=[le,oe,me,fe,ce],rl=[ae],sl=[re,ve,Ee,Oe],al=[je],ol={pre:1,script:1,style:1,textarea:1},ul={textarea:!0,script:!0,style:!0,template:!0},hl=Po.extend({init:function(t,e){var n=e.tripleDelimiters||nl.defaults.tripleDelimiters,i=e.staticDelimiters||nl.defaults.staticDelimiters,r=e.staticTripleDelimiters||nl.defaults.staticTripleDelimiters;this.standardDelimiters=e.delimiters||nl.defaults.delimiters,this.tags=[{isStatic:!1,isTriple:!1,open:this.standardDelimiters[0],close:this.standardDelimiters[1],readers:il},{isStatic:!1,isTriple:!0,open:n[0],close:n[1],readers:rl},{isStatic:!0,isTriple:!1,open:i[0],close:i[1],readers:il},{isStatic:!0,isTriple:!0,open:r[0],close:r[1],readers:rl}],this.contextLines=e.contextLines||nl.defaults.contextLines,this.sortMustacheTags(),this.sectionDepth=0,this.elementStack=[],this.interpolate=Pa({},ul,nl.defaults.interpolate,e.interpolate),e.sanitize===!0&&(e.sanitize={elements:"applet base basefont body frame frameset head html isindex link meta noframes noscript object param script style title".split(" "),eventAttributes:!0}),this.stripComments=e.stripComments!==!1,this.preserveWhitespace=o(e.preserveWhitespace)?!1:e.preserveWhitespace,this.sanitizeElements=e.sanitize&&e.sanitize.elements,this.sanitizeEventAttributes=e.sanitize&&e.sanitize.eventAttributes,this.includeLinePositions=e.includeLinePositions,this.textOnlyMode=e.textOnlyMode,this.csp=e.csp,this.allowExpressions=e.allowExpressions,e.expression&&(this.converters=[Dt]),e.attributes&&(this.inTag=!0),this.whiteSpaceElements=Pa({},e.preserveWhitespace,ol)},postProcess:function(t,e){var n=t[0];if(e.expression){var i=Ut(n);return i.e=ct(i.s,i.r.length),i}if(!t.length)return{t:[],v:To};if(this.sectionDepth>0&&this.error("A section was left open"),xe(n.t,this.stripComments,this.preserveWhitespace,!this.preserveWhitespace,!this.preserveWhitespace,this.whiteSpaceElements),this.csp!==!1){var r={};Te(n.t,r),Te(n.p||{},r),Ka(r).length&&(n.e=r)}return n},converters:[Ne],sortMustacheTags:function(){this.tags.sort(function(t,e){return e.open.length-t.open.length})}}),ll=["delimiters","tripleDelimiters","staticDelimiters","staticTripleDelimiters","csp","interpolate","preserveWhitespace","sanitize","stripComments","contextLines","allowExpressions","attributes"],cl="Either preparse or use a ractive runtime source that includes the parser. ",fl="Either include a version of Ractive that can parse or convert your computation strings to functions.",dl={fromId:function(t,e){if(!Ua){if(e&&e.noThrow)return;throw new Error("Cannot retrieve template #"+t+" as Ractive is not running in a browser.")}t&&(t=t.replace(/^#/,""));var n;if(!(n=Ua.getElementById(t))){if(e&&e.noThrow)return;throw new Error("Could not find template element with id #"+t)}if("SCRIPT"!==n.tagName.toUpperCase()){if(e&&e.noThrow)return;throw new Error("Template element with id #"+t+", must be a + diff --git a/app/popup/popup.js b/app/popup/popup.js index 36aba60..57bbb36 100644 --- a/app/popup/popup.js +++ b/app/popup/popup.js @@ -38,11 +38,9 @@ let app = new Vue({ window.close(); }) }, - 'toggleIITC': function (event) { + 'toggleIITC': function () { let checkedValue = this.IITC_is_enabled; - chrome.tabs.query({active: true, currentWindow: true}, function(tabs) { - chrome.runtime.sendMessage({'type': "toggleIITC", 'value': checkedValue}); - }) + chrome.runtime.sendMessage({'type': "toggleIITC", 'value': checkedValue}); }, 'openLink': function (url) { chrome.tabs.create({ url: url }); @@ -58,35 +56,26 @@ let app = new Vue({ 'openCategory': function (category_name) { document.body.id = "plugins"; this.category_name = category_name; - - let plugins = this.categories[category_name]['plugins']; - Object.keys(plugins).forEach(function(id) { - plugins[id]['icon'] = (plugins[id]['status'] === 'user') ? 'close' : 'toggle_' + plugins[id]['status']; - }); - // Hack to reset the list of plugins. - // Otherwise, duplicate plugins (observed when switching from category UserScripts) are moved to top of the list. - this.plugins = {}; - this.plugins = plugins; + this.plugins = this.categories[category_name]['plugins']; }, - 'managePlugin': function (plugin_id, plugin_category, status) { - let action = null; - if (status === 'on') { - action = "off"; - } else { - action = "on"; - } + 'pluginTitle': function (plugin) { + return ((this.category_name === 'UserScripts') ? '[v'+plugin['version']+'] ' : '') + plugin['desc']; + }, + 'pluginIcon': function (plugin) { + return (plugin['status'] === 'user') ? 'close' : 'toggle_' + plugin['status']; + }, + 'managePlugin': function (plugin_id, status) { + let action = (status === "on") ? "off" : "on"; + this.plugins[plugin_id].status = action; this.plugins[plugin_id].icon = 'toggle_'+action; showMessage("Changes will be applied after rebooting Intel"); - chrome.runtime.sendMessage({'type': "managePlugin", 'id': plugin_id, 'category': plugin_category, 'action': action}); + chrome.runtime.sendMessage({'type': "managePlugin", 'id': plugin_id, 'category': this.plugin_category, 'action': action}); }, - 'deletePlugin': function (plugin_id, plugin_category) { + 'deletePlugin': function (plugin_id) { delete this.plugins[plugin_id]; showMessage("Changes will be applied after rebooting Intel"); - chrome.runtime.sendMessage({'type': "managePlugin", 'id': plugin_id, 'category': plugin_category, 'action': "delete"}); - }, - 'openSupportUrl': function (event) { - this.openLink(event); + chrome.runtime.sendMessage({'type': "managePlugin", 'id': plugin_id, 'category': this.plugin_category, 'action': "delete"}); }, 'savePlugin': function (id) { chrome.storage.local.get([this.updateChannel+"_plugins_user"], (data) => { @@ -99,11 +88,10 @@ let app = new Vue({ chrome.storage.local.set({ 'update_channel': updateChannel }); - showMessage("Update in progress…"); + showMessage("Update in progress…"+updateChannel); }, 'changeUpdateCheckInterval': function (type) { let key = type+'_update_check_interval'; - let setData = {}; setData[key] = this[key]; @@ -116,14 +104,14 @@ let app = new Vue({ chrome.runtime.sendMessage({'type': "forceFullUpdate"}); showMessage("Update in progress…"); }, - 'changeLocalServer': function () { + 'changeLocalServer': async function () { let host = event.target.value; - if (checkStatusLocalServer(host)) { + if (await checkStatusLocalServer(host)) { chrome.storage.local.set({ 'local_server_host': "http://" + host }, function () { if (this.updateChannel === 'local') { - this.forceUpdate(); + this.forceUpdate() } }); } @@ -188,30 +176,16 @@ chrome.storage.local.get([ }); - chrome.storage.onChanged.addListener(function(changes, namespace) { for (let key in changes) { - let storageChange = changes[key]; - // console.log('Storage key "%s" in namespace "%s" changed. ' + - // 'Old value was "%s", new value is "%s".', - // key, - // namespace, - // storageChange.oldValue, - // storageChange.newValue); if (key === app.$data.updateChannel+"_plugins") { app.$data.categories = {}; - app.$data.categories = storageChange.newValue; - let category_name = app.$data.category_name + app.$data.categories = changes[key].newValue; + let category_name = app.$data.category_name; if (category_name !== '') { - let plugins = app.$data.categories[category_name].plugins; - Object.keys(plugins).forEach(function(id) { - plugins[id]['title'] = ((category_name === 'UserScripts') ? plugins[id]['icon'] : '') + plugins[id]['desc']; - plugins[id]['icon'] = (plugins[id]['status'] === 'user') ? 'close' : 'toggle_' + plugins[id]['status']; - }); - app.$data.plugins = plugins; + app.$data.plugins = app.$data.categories[category_name].plugins; } } - } }); @@ -227,18 +201,4 @@ const saveJS = (function () { a.click(); window.URL.revokeObjectURL(url); }; -}()); - -function checkStatusLocalServer(host) { - app.$data.localServerStatus = 'err'; - - let xhr = new XMLHttpRequest(); - xhr.open("GET", "http://" + host, true); - xhr.timeout = 1000; - xhr.onreadystatechange = function() { - if (xhr.readyState === 4 && xhr.status === 200) { - app.$data.localServerStatus = 'ok'; - } - }; - xhr.send(null); -} \ No newline at end of file +}()); \ No newline at end of file diff --git a/scripts/helpers.js b/scripts/helpers.js index b58eeea..cbd1397 100644 --- a/scripts/helpers.js +++ b/scripts/helpers.js @@ -60,4 +60,23 @@ function preparationUserScript(plugin, name) { return 'var GM_info = {"script": {"version": "'+plugin['version']+'",' + '"name": "'+name+'",' + '"description": "'+plugin['desc']+'"}}; '+plugin['code']+'; true' -} \ No newline at end of file +} + +const checkStatusLocalServer = (host) => new Promise(resolve => { + app.$data.localServerStatus = 'err'; + + let xhr = new XMLHttpRequest(); + xhr.open("GET", "http://"+host+"/meta.json", true); + xhr.timeout = 1000; + xhr.onreadystatechange = function() { + if (xhr.readyState === 4) { + if (xhr.status === 200) { + app.$data.localServerStatus = 'ok'; + resolve(true) + } else { + resolve(false) + } + } + }; + xhr.send(null); +}); \ No newline at end of file From 3ded4793f9b792a18a7af490a05479c04c9ef134 Mon Sep 17 00:00:00 2001 From: Alexander Danilov Date: Sun, 30 Jun 2019 17:57:30 +0300 Subject: [PATCH 03/15] Fix initialization IITC in tabs on start browser --- scripts/background.js | 3 --- 1 file changed, 3 deletions(-) diff --git a/scripts/background.js b/scripts/background.js index 5b8bbbe..99fe358 100644 --- a/scripts/background.js +++ b/scripts/background.js @@ -106,9 +106,6 @@ async function onUpdatedListener(tabId, status) { } } console.log('tab is active: ', active); - if (active) { - //chrome.pageAction.show(tabId); - } else return false; if (status.status === 'complete') { if (isIngressUrl(url)) { From 3ed6b427b29dc893519c80eb6bf4ca41de58e09f Mon Sep 17 00:00:00 2001 From: Alexander Danilov Date: Sun, 30 Jun 2019 18:28:30 +0300 Subject: [PATCH 04/15] Fix select update channel --- app/popup/popup.css | 6 +++--- app/popup/popup.js | 6 ++++-- scripts/updater.js | 7 +++++-- 3 files changed, 12 insertions(+), 7 deletions(-) diff --git a/app/popup/popup.css b/app/popup/popup.css index 7f0c4b3..5ba7748 100644 --- a/app/popup/popup.css +++ b/app/popup/popup.css @@ -389,17 +389,17 @@ h2:first-letter { background-color: #222; } 50%, 100% { - background-color: #333; + background-color: #444; } } @keyframes preloader-front { 0% { width: 0; - background-color: #333; + background-color: #444; } 49.9999% { width: 100%; - background-color: #333; + background-color: #444; } 50% { width: 0; diff --git a/app/popup/popup.js b/app/popup/popup.js index 57bbb36..01507ef 100644 --- a/app/popup/popup.js +++ b/app/popup/popup.js @@ -87,8 +87,10 @@ let app = new Vue({ let updateChannel = event.target.value; chrome.storage.local.set({ 'update_channel': updateChannel - }); - showMessage("Update in progress…"+updateChannel); + }, () => { + this.forceUpdate() + }); + showMessage("Update in progress…"); }, 'changeUpdateCheckInterval': function (type) { let key = type+'_update_check_interval'; diff --git a/scripts/updater.js b/scripts/updater.js index 6c87566..859bd06 100644 --- a/scripts/updater.js +++ b/scripts/updater.js @@ -68,9 +68,12 @@ const save = (options) => new Promise(resolve => { const ajaxGetWithProgress = (url, parseJSON) => new Promise(async resolve => { - showProgress(true); + let progressIntervalId = setInterval(function() { showProgress(true) }, 300); let response = await ajaxGet(url, parseJSON); - if (response) showProgress(false); + if (response) { + clearInterval(progressIntervalId); + showProgress(false); + } resolve(response); }); From 53d836a9daa7cc91ce2b5c6119c60311add8d9e6 Mon Sep 17 00:00:00 2001 From: Alexander Danilov Date: Sun, 30 Jun 2019 19:17:24 +0300 Subject: [PATCH 05/15] Enabling plugins without reloading the page #9 --- app/popup/popup.js | 4 ++-- scripts/background.js | 24 +++++++++++++++--------- scripts/defaults.js | 4 +++- scripts/updater.js | 4 ++++ 4 files changed, 24 insertions(+), 12 deletions(-) diff --git a/app/popup/popup.js b/app/popup/popup.js index 01507ef..f859963 100644 --- a/app/popup/popup.js +++ b/app/popup/popup.js @@ -70,12 +70,12 @@ let app = new Vue({ this.plugins[plugin_id].status = action; this.plugins[plugin_id].icon = 'toggle_'+action; showMessage("Changes will be applied after rebooting Intel"); - chrome.runtime.sendMessage({'type': "managePlugin", 'id': plugin_id, 'category': this.plugin_category, 'action': action}); + chrome.runtime.sendMessage({'type': "managePlugin", 'id': plugin_id, 'category': this.category_name, 'action': action}); }, 'deletePlugin': function (plugin_id) { delete this.plugins[plugin_id]; showMessage("Changes will be applied after rebooting Intel"); - chrome.runtime.sendMessage({'type': "managePlugin", 'id': plugin_id, 'category': this.plugin_category, 'action': "delete"}); + chrome.runtime.sendMessage({'type': "managePlugin", 'id': plugin_id, 'category': this.category_name, 'action': "delete"}); }, 'savePlugin': function (id) { chrome.storage.local.get([this.updateChannel+"_plugins_user"], (data) => { diff --git a/scripts/background.js b/scripts/background.js index 99fe358..631fe3a 100644 --- a/scripts/background.js +++ b/scripts/background.js @@ -109,6 +109,7 @@ async function onUpdatedListener(tabId, status) { if (status.status === 'complete') { if (isIngressUrl(url)) { + loaded_plugins = []; console.log('detected intel.ingress.com/intel page on active tab %d', tabId); console.log('requested iitc launch'); console.log('initializing iitc'); @@ -173,7 +174,7 @@ function initialize(tabId) { file: './scripts/pre.js' }, () => { let inject_iitc_code = preparationUserScript({'version': iitc_version, 'code': iitc_code}); - loadJS(tabId, "document_end", inject_iitc_code, function () { + loadJS(tabId, "document_end", "ingress-intel-total-conversion@jonatkins", inject_iitc_code, function () { activeIITCTab = tabId; }); @@ -182,9 +183,7 @@ function initialize(tabId) { Object.keys(plugins_local).forEach(function(id) { let plugin = plugins_local[id]; if (plugin['status'] === 'on') { - loadJS(tabId, "document_end", preparationUserScript(plugin, id), function () { - console.info('plugin %s loaded', id); - }); + loadJS(tabId, "document_end", id, preparationUserScript(plugin, id)); } }); } @@ -194,9 +193,7 @@ function initialize(tabId) { Object.keys(plugins_user).forEach(function(id) { let plugin = plugins_user[id]; if (plugin['status'] === 'on') { - loadJS(tabId, "document_end", preparationUserScript(plugin, id), function () { - console.info('userscript %s loaded', id); - }); + loadJS(tabId, "document_end", id, preparationUserScript(plugin, id)); } }); } @@ -210,8 +207,16 @@ function initialize(tabId) { } -function loadJS(tabId, runAt, code, callback) { - if(!tabId) { console.log('no tabId!'); return} +function loadJS(tabId, runAt, id, code, callback) { + if (!tabId) { console.log('no tabId!'); return } + + if (loaded_plugins.includes(id)) { + console.info('Plugin %s is already loaded. Skip', id); + return + } else { + loaded_plugins.push(id); + } + callback = (typeof callback == 'function' ? callback : false); chrome.tabs.executeScript(tabId, { @@ -221,6 +226,7 @@ function loadJS(tabId, runAt, code, callback) { if(chrome.runtime.lastError) { console.log(chrome.runtime.lastError.message); } + console.info('plugin %s loaded', id); if (callback) callback(); }); diff --git a/scripts/defaults.js b/scripts/defaults.js index b62d23d..177c1f2 100644 --- a/scripts/defaults.js +++ b/scripts/defaults.js @@ -4,4 +4,6 @@ let local_server_host = "http://127.0.0.1:8000"; let local_server_channel = "local"; let network_host = iitc_host; -let network_channel = updateChannel; \ No newline at end of file +let network_channel = updateChannel; + +let loaded_plugins = []; \ No newline at end of file diff --git a/scripts/updater.js b/scripts/updater.js index 859bd06..10182c3 100644 --- a/scripts/updater.js +++ b/scripts/updater.js @@ -315,6 +315,8 @@ function managePlugin(id, category, action) { plugins_local[id]['status'] = 'on'; } + loadJS(activeIITCTab, "document_end", id, preparationUserScript(plugins_local[id], id)); + await save({ 'plugins': plugins, 'plugins_local': plugins_local, @@ -341,6 +343,8 @@ function managePlugin(id, category, action) { 'code': response }; + loadJS(activeIITCTab, "document_end", id, preparationUserScript(plugins_local[id], id)); + await save({ 'plugins': plugins, 'plugins_local': plugins_local From 6d09ae7cfc77eb2b5c06ca54dc1808464cfbb57c Mon Sep 17 00:00:00 2001 From: Alexander Danilov Date: Sun, 30 Jun 2019 19:28:22 +0300 Subject: [PATCH 06/15] Update highlightjs --- ATTRIBUTION.md | 2 +- app/jsview/highlightjs/highlight.pack.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ATTRIBUTION.md b/ATTRIBUTION.md index abbd2ce..074223a 100644 --- a/ATTRIBUTION.md +++ b/ATTRIBUTION.md @@ -1,5 +1,5 @@ This project is licensed under the permissive [MIT License](LICENSE). Parts imported from other projects remain under their respective licenses: -- [highlight.js; BSD License](https://github.com/highlightjs/highlight.js) +- [highlight.js; BSD License](https://github.com/highlightjs/highlight.js) ([v9.15.8](https://github.com/highlightjs/highlight.js/archive/9.15.8.zip), build `node tools/build.js javascript`) - [MaterialIcons; Apache License 2.0](https://github.com/google/material-design-icons/issues/786#issuecomment-487055009) - [Vue.js; MIT License](https://vuejs.org/) ([v2.6.10](https://github.com/vuejs/vue/archive/v2.6.10.zip)) \ No newline at end of file diff --git a/app/jsview/highlightjs/highlight.pack.js b/app/jsview/highlightjs/highlight.pack.js index e1a5c27..97f487c 100644 --- a/app/jsview/highlightjs/highlight.pack.js +++ b/app/jsview/highlightjs/highlight.pack.js @@ -1,2 +1,2 @@ -/*! highlight.js v9.15.6 | BSD3 License | git.io/hljslicense */ -!function(e){var n="object"==typeof window&&window||"object"==typeof self&&self;"undefined"!=typeof exports?e(exports):n&&(n.hljs=e({}),"function"==typeof define&&define.amd&&define([],function(){return n.hljs}))}(function(a){var E=[],u=Object.keys,N={},g={},n=/^(no-?highlight|plain|text)$/i,R=/\blang(?:uage)?-([\w-]+)\b/i,t=/((^(<[^>]+>|\t|)+|(?:\n)))/gm,r={case_insensitive:"cI",lexemes:"l",contains:"c",keywords:"k",subLanguage:"sL",className:"cN",begin:"b",beginKeywords:"bK",end:"e",endsWithParent:"eW",illegal:"i",excludeBegin:"eB",excludeEnd:"eE",returnBegin:"rB",returnEnd:"rE",relevance:"r",variants:"v",IDENT_RE:"IR",UNDERSCORE_IDENT_RE:"UIR",NUMBER_RE:"NR",C_NUMBER_RE:"CNR",BINARY_NUMBER_RE:"BNR",RE_STARTERS_RE:"RSR",BACKSLASH_ESCAPE:"BE",APOS_STRING_MODE:"ASM",QUOTE_STRING_MODE:"QSM",PHRASAL_WORDS_MODE:"PWM",C_LINE_COMMENT_MODE:"CLCM",C_BLOCK_COMMENT_MODE:"CBCM",HASH_COMMENT_MODE:"HCM",NUMBER_MODE:"NM",C_NUMBER_MODE:"CNM",BINARY_NUMBER_MODE:"BNM",CSS_NUMBER_MODE:"CSSNM",REGEXP_MODE:"RM",TITLE_MODE:"TM",UNDERSCORE_TITLE_MODE:"UTM",COMMENT:"C",beginRe:"bR",endRe:"eR",illegalRe:"iR",lexemesRe:"lR",terminators:"t",terminator_end:"tE"},b="",h={classPrefix:"hljs-",tabReplace:null,useBR:!1,languages:void 0};function _(e){return e.replace(/&/g,"&").replace(//g,">")}function d(e){return e.nodeName.toLowerCase()}function v(e,n){var t=e&&e.exec(n);return t&&0===t.index}function p(e){return n.test(e)}function l(e){var n,t={},r=Array.prototype.slice.call(arguments,1);for(n in e)t[n]=e[n];return r.forEach(function(e){for(n in e)t[n]=e[n]}),t}function M(e){var a=[];return function e(n,t){for(var r=n.firstChild;r;r=r.nextSibling)3===r.nodeType?t+=r.nodeValue.length:1===r.nodeType&&(a.push({event:"start",offset:t,node:r}),t=e(r,t),d(r).match(/br|hr|img|input/)||a.push({event:"stop",offset:t,node:r}));return t}(e,0),a}function i(e){if(r&&!e.langApiRestored){for(var n in e.langApiRestored=!0,r)e[n]&&(e[r[n]]=e[n]);(e.c||[]).concat(e.v||[]).forEach(i)}}function m(c){function s(e){return e&&e.source||e}function o(e,n){return new RegExp(s(e),"m"+(c.cI?"i":"")+(n?"g":""))}!function n(t,e){if(!t.compiled){if(t.compiled=!0,t.k=t.k||t.bK,t.k){var r={},a=function(t,e){c.cI&&(e=e.toLowerCase()),e.split(" ").forEach(function(e){var n=e.split("|");r[n[0]]=[t,n[1]?Number(n[1]):1]})};"string"==typeof t.k?a("keyword",t.k):u(t.k).forEach(function(e){a(e,t.k[e])}),t.k=r}t.lR=o(t.l||/\w+/,!0),e&&(t.bK&&(t.b="\\b("+t.bK.split(" ").join("|")+")\\b"),t.b||(t.b=/\B|\b/),t.bR=o(t.b),t.endSameAsBegin&&(t.e=t.b),t.e||t.eW||(t.e=/\B|\b/),t.e&&(t.eR=o(t.e)),t.tE=s(t.e)||"",t.eW&&e.tE&&(t.tE+=(t.e?"|":"")+e.tE)),t.i&&(t.iR=o(t.i)),null==t.r&&(t.r=1),t.c||(t.c=[]),t.c=Array.prototype.concat.apply([],t.c.map(function(e){return(n="self"===e?t:e).v&&!n.cached_variants&&(n.cached_variants=n.v.map(function(e){return l(n,{v:null},e)})),n.cached_variants||n.eW&&[l(n)]||[n];var n})),t.c.forEach(function(e){n(e,t)}),t.starts&&n(t.starts,e);var i=t.c.map(function(e){return e.bK?"\\.?(?:"+e.b+")\\.?":e.b}).concat([t.tE,t.i]).map(s).filter(Boolean);t.t=i.length?o(function(e,n){for(var t=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./,r=0,a="",i=0;i')+n+(t?"":b)}function s(){g+=null!=E.sL?function(){var e="string"==typeof E.sL;if(e&&!N[E.sL])return _(R);var n=e?C(E.sL,R,!0,i[E.sL]):O(R,E.sL.length?E.sL:void 0);return 0")+'"');return R+=n,n.length||1}var f=S(e);if(!f)throw new Error('Unknown language: "'+e+'"');m(f);var a,E=t||f,i={},g="";for(a=E;a!==f;a=a.parent)a.cN&&(g=u(a.cN,"",!0)+g);var R="",d=0;try{for(var c,p,M=0;E.t.lastIndex=M,c=E.t.exec(n);)p=r(n.substring(M,c.index),c[0]),M=c.index+p;for(r(n.substr(M)),a=E;a.parent;a=a.parent)a.cN&&(g+=b);return{r:d,value:g,language:e,top:E}}catch(e){if(e.message&&-1!==e.message.indexOf("Illegal"))return{r:0,value:_(n)};throw e}}function O(t,e){e=e||h.languages||u(N);var r={r:0,value:_(t)},a=r;return e.filter(S).filter(s).forEach(function(e){var n=C(e,t,!1);n.language=e,n.r>a.r&&(a=n),n.r>r.r&&(a=r,r=n)}),a.language&&(r.second_best=a),r}function B(e){return h.tabReplace||h.useBR?e.replace(t,function(e,n){return h.useBR&&"\n"===e?"
":h.tabReplace?n.replace(/\t/g,h.tabReplace):""}):e}function c(e){var n,t,r,a,i,c,o,u,s,l,f=function(e){var n,t,r,a,i=e.className+" ";if(i+=e.parentNode?e.parentNode.className:"",t=R.exec(i))return S(t[1])?t[1]:"no-highlight";for(n=0,r=(i=i.split(/\s+/)).length;n/g,"\n"):n=e,i=n.textContent,r=f?C(f,i,!0):O(i),(t=M(n)).length&&((a=document.createElementNS("http://www.w3.org/1999/xhtml","div")).innerHTML=r.value,r.value=function(e,n,t){var r=0,a="",i=[];function c(){return e.length&&n.length?e[0].offset!==n[0].offset?e[0].offset"}function u(e){a+=""}function s(e){("start"===e.event?o:u)(e.node)}for(;e.length||n.length;){var l=c();if(a+=_(t.substring(r,l[0].offset)),r=l[0].offset,l===e){for(i.reverse().forEach(u);s(l.splice(0,1)[0]),(l=c())===e&&l.length&&l[0].offset===r;);i.reverse().forEach(o)}else"start"===l[0].event?i.push(l[0].node):i.pop(),s(l.splice(0,1)[0])}return a+_(t.substr(r))}(t,M(a),i)),r.value=B(r.value),e.innerHTML=r.value,e.className=(c=e.className,o=f,u=r.language,s=o?g[o]:u,l=[c.trim()],c.match(/\bhljs\b/)||l.push("hljs"),-1===c.indexOf(s)&&l.push(s),l.join(" ").trim()),e.result={language:r.language,re:r.r},r.second_best&&(e.second_best={language:r.second_best.language,re:r.second_best.r}))}function o(){if(!o.called){o.called=!0;var e=document.querySelectorAll("pre code");E.forEach.call(e,c)}}function S(e){return e=(e||"").toLowerCase(),N[e]||N[g[e]]}function s(e){var n=S(e);return n&&!n.disableAutodetect}return a.highlight=C,a.highlightAuto=O,a.fixMarkup=B,a.highlightBlock=c,a.configure=function(e){h=l(h,e)},a.initHighlighting=o,a.initHighlightingOnLoad=function(){addEventListener("DOMContentLoaded",o,!1),addEventListener("load",o,!1)},a.registerLanguage=function(n,e){var t=N[n]=e(a);i(t),t.aliases&&t.aliases.forEach(function(e){g[e]=n})},a.listLanguages=function(){return u(N)},a.getLanguage=S,a.autoDetection=s,a.inherit=l,a.IR=a.IDENT_RE="[a-zA-Z]\\w*",a.UIR=a.UNDERSCORE_IDENT_RE="[a-zA-Z_]\\w*",a.NR=a.NUMBER_RE="\\b\\d+(\\.\\d+)?",a.CNR=a.C_NUMBER_RE="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",a.BNR=a.BINARY_NUMBER_RE="\\b(0b[01]+)",a.RSR=a.RE_STARTERS_RE="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",a.BE=a.BACKSLASH_ESCAPE={b:"\\\\[\\s\\S]",r:0},a.ASM=a.APOS_STRING_MODE={cN:"string",b:"'",e:"'",i:"\\n",c:[a.BE]},a.QSM=a.QUOTE_STRING_MODE={cN:"string",b:'"',e:'"',i:"\\n",c:[a.BE]},a.PWM=a.PHRASAL_WORDS_MODE={b:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/},a.C=a.COMMENT=function(e,n,t){var r=a.inherit({cN:"comment",b:e,e:n,c:[]},t||{});return r.c.push(a.PWM),r.c.push({cN:"doctag",b:"(?:TODO|FIXME|NOTE|BUG|XXX):",r:0}),r},a.CLCM=a.C_LINE_COMMENT_MODE=a.C("//","$"),a.CBCM=a.C_BLOCK_COMMENT_MODE=a.C("/\\*","\\*/"),a.HCM=a.HASH_COMMENT_MODE=a.C("#","$"),a.NM=a.NUMBER_MODE={cN:"number",b:a.NR,r:0},a.CNM=a.C_NUMBER_MODE={cN:"number",b:a.CNR,r:0},a.BNM=a.BINARY_NUMBER_MODE={cN:"number",b:a.BNR,r:0},a.CSSNM=a.CSS_NUMBER_MODE={cN:"number",b:a.NR+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",r:0},a.RM=a.REGEXP_MODE={cN:"regexp",b:/\//,e:/\/[gimuy]*/,i:/\n/,c:[a.BE,{b:/\[/,e:/\]/,r:0,c:[a.BE]}]},a.TM=a.TITLE_MODE={cN:"title",b:a.IR,r:0},a.UTM=a.UNDERSCORE_TITLE_MODE={cN:"title",b:a.UIR,r:0},a.METHOD_GUARD={b:"\\.\\s*"+a.UIR,r:0},a});hljs.registerLanguage("javascript",function(e){var r="[A-Za-z$_][0-9A-Za-z$_]*",t={keyword:"in of if for while finally var new function do return void else break catch instanceof with throw case default try this switch continue typeof delete let yield const export super debugger as async await static import from as",literal:"true false null undefined NaN Infinity",built_in:"eval isFinite isNaN parseFloat parseInt decodeURI decodeURIComponent encodeURI encodeURIComponent escape unescape Object Function Boolean Error EvalError InternalError RangeError ReferenceError StopIteration SyntaxError TypeError URIError Number Math Date String RegExp Array Float32Array Float64Array Int16Array Int32Array Int8Array Uint16Array Uint32Array Uint8Array Uint8ClampedArray ArrayBuffer DataView JSON Intl arguments require module console window document Symbol Set Map WeakSet WeakMap Proxy Reflect Promise"},a={cN:"number",v:[{b:"\\b(0[bB][01]+)"},{b:"\\b(0[oO][0-7]+)"},{b:e.CNR}],r:0},n={cN:"subst",b:"\\$\\{",e:"\\}",k:t,c:[]},c={cN:"string",b:"`",e:"`",c:[e.BE,n]};n.c=[e.ASM,e.QSM,c,a,e.RM];var s=n.c.concat([e.CBCM,e.CLCM]);return{aliases:["js","jsx"],k:t,c:[{cN:"meta",r:10,b:/^\s*['"]use (strict|asm)['"]/},{cN:"meta",b:/^#!/,e:/$/},e.ASM,e.QSM,c,e.CLCM,e.CBCM,a,{b:/[{,]\s*/,r:0,c:[{b:r+"\\s*:",rB:!0,r:0,c:[{cN:"attr",b:r,r:0}]}]},{b:"("+e.RSR+"|\\b(case|return|throw)\\b)\\s*",k:"return throw case",c:[e.CLCM,e.CBCM,e.RM,{cN:"function",b:"(\\(.*?\\)|"+r+")\\s*=>",rB:!0,e:"\\s*=>",c:[{cN:"params",v:[{b:r},{b:/\(\s*\)/},{b:/\(/,e:/\)/,eB:!0,eE:!0,k:t,c:s}]}]},{b://,sL:"xml",c:[{b:/<\w+\s*\/>/,skip:!0},{b:/<\w+/,e:/(\/\w+|\w+\/)>/,skip:!0,c:[{b:/<\w+\s*\/>/,skip:!0},"self"]}]}],r:0},{cN:"function",bK:"function",e:/\{/,eE:!0,c:[e.inherit(e.TM,{b:r}),{cN:"params",b:/\(/,e:/\)/,eB:!0,eE:!0,c:s}],i:/\[|%/},{b:/\$[(.]/},e.METHOD_GUARD,{cN:"class",bK:"class",e:/[{;=]/,eE:!0,i:/[:"\[\]]/,c:[{bK:"extends"},e.UTM]},{bK:"constructor get set",e:/\{/,eE:!0}],i:/#(?!!)/}}); \ No newline at end of file +/*! highlight.js v9.15.8 | BSD3 License | git.io/hljslicense */ +!function(e){var n="object"==typeof window&&window||"object"==typeof self&&self;"undefined"!=typeof exports?e(exports):n&&(n.hljs=e({}),"function"==typeof define&&define.amd&&define([],function(){return n.hljs}))}(function(a){var E=[],s=Object.keys,N={},g={},n=/^(no-?highlight|plain|text)$/i,R=/\blang(?:uage)?-([\w-]+)\b/i,r=/((^(<[^>]+>|\t|)+|(?:\n)))/gm,t={case_insensitive:"cI",lexemes:"l",contains:"c",keywords:"k",subLanguage:"sL",className:"cN",begin:"b",beginKeywords:"bK",end:"e",endsWithParent:"eW",illegal:"i",excludeBegin:"eB",excludeEnd:"eE",returnBegin:"rB",returnEnd:"rE",relevance:"r",variants:"v",IDENT_RE:"IR",UNDERSCORE_IDENT_RE:"UIR",NUMBER_RE:"NR",C_NUMBER_RE:"CNR",BINARY_NUMBER_RE:"BNR",RE_STARTERS_RE:"RSR",BACKSLASH_ESCAPE:"BE",APOS_STRING_MODE:"ASM",QUOTE_STRING_MODE:"QSM",PHRASAL_WORDS_MODE:"PWM",C_LINE_COMMENT_MODE:"CLCM",C_BLOCK_COMMENT_MODE:"CBCM",HASH_COMMENT_MODE:"HCM",NUMBER_MODE:"NM",C_NUMBER_MODE:"CNM",BINARY_NUMBER_MODE:"BNM",CSS_NUMBER_MODE:"CSSNM",REGEXP_MODE:"RM",TITLE_MODE:"TM",UNDERSCORE_TITLE_MODE:"UTM",COMMENT:"C",beginRe:"bR",endRe:"eR",illegalRe:"iR",lexemesRe:"lR",terminators:"t",terminator_end:"tE"},M="",h={classPrefix:"hljs-",tabReplace:null,useBR:!1,languages:void 0};function _(e){return e.replace(/&/g,"&").replace(//g,">")}function b(e){return e.nodeName.toLowerCase()}function v(e,n){var r=e&&e.exec(n);return r&&0===r.index}function d(e){return n.test(e)}function l(e){var n,r={},t=Array.prototype.slice.call(arguments,1);for(n in e)r[n]=e[n];return t.forEach(function(e){for(n in e)r[n]=e[n]}),r}function p(e){var a=[];return function e(n,r){for(var t=n.firstChild;t;t=t.nextSibling)3===t.nodeType?r+=t.nodeValue.length:1===t.nodeType&&(a.push({event:"start",offset:r,node:t}),r=e(t,r),b(t).match(/br|hr|img|input/)||a.push({event:"stop",offset:r,node:t}));return r}(e,0),a}function i(e){if(t&&!e.langApiRestored){for(var n in e.langApiRestored=!0,t)e[n]&&(e[t[n]]=e[n]);(e.c||[]).concat(e.v||[]).forEach(i)}}function m(c){function u(e){return e&&e.source||e}function o(e,n){return new RegExp(u(e),"m"+(c.cI?"i":"")+(n?"g":""))}!function n(r,e){if(!r.compiled){if(r.compiled=!0,r.k=r.k||r.bK,r.k){var t={},a=function(r,e){c.cI&&(e=e.toLowerCase()),e.split(" ").forEach(function(e){var n=e.split("|");t[n[0]]=[r,n[1]?Number(n[1]):1]})};"string"==typeof r.k?a("keyword",r.k):s(r.k).forEach(function(e){a(e,r.k[e])}),r.k=t}r.lR=o(r.l||/\w+/,!0),e&&(r.bK&&(r.b="\\b("+r.bK.split(" ").join("|")+")\\b"),r.b||(r.b=/\B|\b/),r.bR=o(r.b),r.endSameAsBegin&&(r.e=r.b),r.e||r.eW||(r.e=/\B|\b/),r.e&&(r.eR=o(r.e)),r.tE=u(r.e)||"",r.eW&&e.tE&&(r.tE+=(r.e?"|":"")+e.tE)),r.i&&(r.iR=o(r.i)),null==r.r&&(r.r=1),r.c||(r.c=[]),r.c=Array.prototype.concat.apply([],r.c.map(function(e){return(n="self"===e?r:e).v&&!n.cached_variants&&(n.cached_variants=n.v.map(function(e){return l(n,{v:null},e)})),n.cached_variants||n.eW&&[l(n)]||[n];var n})),r.c.forEach(function(e){n(e,r)}),r.starts&&n(r.starts,e);var i=r.c.map(function(e){return e.bK?"\\.?(?:"+e.b+")\\.?":e.b}).concat([r.tE,r.i]).map(u).filter(Boolean);r.t=i.length?o(function(e,n){for(var r=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./,t=0,a="",i=0;i')+n+(r?"":M):n}function u(){g+=null!=E.sL?function(){var e="string"==typeof E.sL;if(e&&!N[E.sL])return _(R);var n=e?C(E.sL,R,!0,i[E.sL]):B(R,E.sL.length?E.sL:void 0);return 0")+'"');return R+=n,n.length||1}var f=S(e);if(!f)throw new Error('Unknown language: "'+e+'"');m(f);var a,E=r||f,i={},g="";for(a=E;a!==f;a=a.parent)a.cN&&(g=s(a.cN,"",!0)+g);var R="",b=0;try{for(var c,d,p=0;E.t.lastIndex=p,c=E.t.exec(n);)d=t(n.substring(p,c.index),c[0]),p=c.index+d;for(t(n.substr(p)),a=E;a.parent;a=a.parent)a.cN&&(g+=M);return{r:b,value:g,language:e,top:E}}catch(e){if(e.message&&-1!==e.message.indexOf("Illegal"))return{r:0,value:_(n)};throw e}}function B(r,e){e=e||h.languages||s(N);var t={r:0,value:_(r)},a=t;return e.filter(S).filter(u).forEach(function(e){var n=C(e,r,!1);n.language=e,n.r>a.r&&(a=n),n.r>t.r&&(a=t,t=n)}),a.language&&(t.second_best=a),t}function O(e){return h.tabReplace||h.useBR?e.replace(r,function(e,n){return h.useBR&&"\n"===e?"
":h.tabReplace?n.replace(/\t/g,h.tabReplace):""}):e}function c(e){var n,r,t,a,i,c,o,s,u,l,f=function(e){var n,r,t,a,i=e.className+" ";if(i+=e.parentNode?e.parentNode.className:"",r=R.exec(i))return S(r[1])?r[1]:"no-highlight";for(n=0,t=(i=i.split(/\s+/)).length;n/g,"\n"):n=e,i=n.textContent,t=f?C(f,i,!0):B(i),(r=p(n)).length&&((a=document.createElementNS("http://www.w3.org/1999/xhtml","div")).innerHTML=t.value,t.value=function(e,n,r){var t=0,a="",i=[];function c(){return e.length&&n.length?e[0].offset!==n[0].offset?e[0].offset"}function s(e){a+=""}function u(e){("start"===e.event?o:s)(e.node)}for(;e.length||n.length;){var l=c();if(a+=_(r.substring(t,l[0].offset)),t=l[0].offset,l===e){for(i.reverse().forEach(s);u(l.splice(0,1)[0]),(l=c())===e&&l.length&&l[0].offset===t;);i.reverse().forEach(o)}else"start"===l[0].event?i.push(l[0].node):i.pop(),u(l.splice(0,1)[0])}return a+_(r.substr(t))}(r,p(a),i)),t.value=O(t.value),e.innerHTML=t.value,e.className=(c=e.className,o=f,s=t.language,u=o?g[o]:s,l=[c.trim()],c.match(/\bhljs\b/)||l.push("hljs"),-1===c.indexOf(u)&&l.push(u),l.join(" ").trim()),e.result={language:t.language,re:t.r},t.second_best&&(e.second_best={language:t.second_best.language,re:t.second_best.r}))}function o(){if(!o.called){o.called=!0;var e=document.querySelectorAll("pre code");E.forEach.call(e,c)}}function S(e){return e=(e||"").toLowerCase(),N[e]||N[g[e]]}function u(e){var n=S(e);return n&&!n.disableAutodetect}return a.highlight=C,a.highlightAuto=B,a.fixMarkup=O,a.highlightBlock=c,a.configure=function(e){h=l(h,e)},a.initHighlighting=o,a.initHighlightingOnLoad=function(){addEventListener("DOMContentLoaded",o,!1),addEventListener("load",o,!1)},a.registerLanguage=function(n,e){var r=N[n]=e(a);i(r),r.aliases&&r.aliases.forEach(function(e){g[e]=n})},a.listLanguages=function(){return s(N)},a.getLanguage=S,a.autoDetection=u,a.inherit=l,a.IR=a.IDENT_RE="[a-zA-Z]\\w*",a.UIR=a.UNDERSCORE_IDENT_RE="[a-zA-Z_]\\w*",a.NR=a.NUMBER_RE="\\b\\d+(\\.\\d+)?",a.CNR=a.C_NUMBER_RE="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",a.BNR=a.BINARY_NUMBER_RE="\\b(0b[01]+)",a.RSR=a.RE_STARTERS_RE="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",a.BE=a.BACKSLASH_ESCAPE={b:"\\\\[\\s\\S]",r:0},a.ASM=a.APOS_STRING_MODE={cN:"string",b:"'",e:"'",i:"\\n",c:[a.BE]},a.QSM=a.QUOTE_STRING_MODE={cN:"string",b:'"',e:'"',i:"\\n",c:[a.BE]},a.PWM=a.PHRASAL_WORDS_MODE={b:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/},a.C=a.COMMENT=function(e,n,r){var t=a.inherit({cN:"comment",b:e,e:n,c:[]},r||{});return t.c.push(a.PWM),t.c.push({cN:"doctag",b:"(?:TODO|FIXME|NOTE|BUG|XXX):",r:0}),t},a.CLCM=a.C_LINE_COMMENT_MODE=a.C("//","$"),a.CBCM=a.C_BLOCK_COMMENT_MODE=a.C("/\\*","\\*/"),a.HCM=a.HASH_COMMENT_MODE=a.C("#","$"),a.NM=a.NUMBER_MODE={cN:"number",b:a.NR,r:0},a.CNM=a.C_NUMBER_MODE={cN:"number",b:a.CNR,r:0},a.BNM=a.BINARY_NUMBER_MODE={cN:"number",b:a.BNR,r:0},a.CSSNM=a.CSS_NUMBER_MODE={cN:"number",b:a.NR+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",r:0},a.RM=a.REGEXP_MODE={cN:"regexp",b:/\//,e:/\/[gimuy]*/,i:/\n/,c:[a.BE,{b:/\[/,e:/\]/,r:0,c:[a.BE]}]},a.TM=a.TITLE_MODE={cN:"title",b:a.IR,r:0},a.UTM=a.UNDERSCORE_TITLE_MODE={cN:"title",b:a.UIR,r:0},a.METHOD_GUARD={b:"\\.\\s*"+a.UIR,r:0},a.registerLanguage("javascript",function(e){var n="[A-Za-z$_][0-9A-Za-z$_]*",r={keyword:"in of if for while finally var new function do return void else break catch instanceof with throw case default try this switch continue typeof delete let yield const export super debugger as async await static import from as",literal:"true false null undefined NaN Infinity",built_in:"eval isFinite isNaN parseFloat parseInt decodeURI decodeURIComponent encodeURI encodeURIComponent escape unescape Object Function Boolean Error EvalError InternalError RangeError ReferenceError StopIteration SyntaxError TypeError URIError Number Math Date String RegExp Array Float32Array Float64Array Int16Array Int32Array Int8Array Uint16Array Uint32Array Uint8Array Uint8ClampedArray ArrayBuffer DataView JSON Intl arguments require module console window document Symbol Set Map WeakSet WeakMap Proxy Reflect Promise"},t={cN:"number",v:[{b:"\\b(0[bB][01]+)"},{b:"\\b(0[oO][0-7]+)"},{b:e.CNR}],r:0},a={cN:"subst",b:"\\$\\{",e:"\\}",k:r,c:[]},i={cN:"string",b:"`",e:"`",c:[e.BE,a]};a.c=[e.ASM,e.QSM,i,t,e.RM];var c=a.c.concat([e.CBCM,e.CLCM]);return{aliases:["js","jsx"],k:r,c:[{cN:"meta",r:10,b:/^\s*['"]use (strict|asm)['"]/},{cN:"meta",b:/^#!/,e:/$/},e.ASM,e.QSM,i,e.CLCM,e.CBCM,t,{b:/[{,]\s*/,r:0,c:[{b:n+"\\s*:",rB:!0,r:0,c:[{cN:"attr",b:n,r:0}]}]},{b:"("+e.RSR+"|\\b(case|return|throw)\\b)\\s*",k:"return throw case",c:[e.CLCM,e.CBCM,e.RM,{cN:"function",b:"(\\(.*?\\)|"+n+")\\s*=>",rB:!0,e:"\\s*=>",c:[{cN:"params",v:[{b:n},{b:/\(\s*\)/},{b:/\(/,e:/\)/,eB:!0,eE:!0,k:r,c:c}]}]},{cN:"",b:/\s/,e:/\s*/,skip:!0},{b://,sL:"xml",c:[{b:/<[A-Za-z0-9\\._:-]+\s*\/>/,skip:!0},{b:/<[A-Za-z0-9\\._:-]+/,e:/(\/[A-Za-z0-9\\._:-]+|[A-Za-z0-9\\._:-]+\/)>/,skip:!0,c:[{b:/<[A-Za-z0-9\\._:-]+\s*\/>/,skip:!0},"self"]}]}],r:0},{cN:"function",bK:"function",e:/\{/,eE:!0,c:[e.inherit(e.TM,{b:n}),{cN:"params",b:/\(/,e:/\)/,eB:!0,eE:!0,c:c}],i:/\[|%/},{b:/\$[(.]/},e.METHOD_GUARD,{cN:"class",bK:"class",e:/[{;=]/,eE:!0,i:/[:"\[\]]/,c:[{bK:"extends"},e.UTM]},{bK:"constructor get set",e:/\{/,eE:!0}],i:/#(?!!)/}}),a}); \ No newline at end of file From f65479db447c445d7ca66c5d1cf783b8d6c5377a Mon Sep 17 00:00:00 2001 From: Alexander Danilov Date: Sun, 30 Jun 2019 19:54:50 +0300 Subject: [PATCH 07/15] Update icon --- assets/images/128/icon.png | Bin 6043 -> 16779 bytes assets/images/48/icon.png | Bin 2335 -> 11611 bytes assets/images/96/icon.png | Bin 4542 -> 14820 bytes 3 files changed, 0 insertions(+), 0 deletions(-) diff --git a/assets/images/128/icon.png b/assets/images/128/icon.png index da48971635ae612ac44b8cc54ddad94409665255..17f6b954441dc060e253bb794066c7512fb67b01 100644 GIT binary patch literal 16779 zcmV)WK(4=uP) zaB^>EX>4U6ba`-PAZ2)IW&i+q+O3>vk{mg5h5zFeIs*3PI9Sbe107%ALuA&*V$Y0B z%_ggul@W;m+~4AG(Cq*D?_>Up|5|F^#8hf-Ia~gVEjHizrrPJf=c}{v{`uvl`}c3J zn~xuOUJ85-&tLO?y}$E%`n;gT*X!f^>!!@ted_B*uOGZ`81%`WZ(i@KuNwvbyzX9q zH|=#@k6#|=_1n9T$9O*M$KPXNGFIY#!5hDW3zk2tJ|!@M&_d^H=FbrHrstK&-+D+P z|2}u-@{c)sz3$TQb9ZOx>xkUvCx81v_CDIL|9zRe zb5=cPKTp?VW~Q=vJ=FVA?svR#FqPq6miblqo%p`oUyWatN1UwKVl@Z9rg6=AX8XA4 zmh0}geZNj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eKJDN}c!0TF81xwj-j@3Tr=Kl)2V@|W)eZ-ixbTn=GW+g@34x?os zuIJ8QI|CwKtxjhO{q={q?2>H}>Fn3LkF~qw)~S$beYXw(@qa*0dJ&5XO6HCyU17F% z){vzo@ZWv?EpKljg`N38h3{zp6{-$*m;uIEF#wkxQK!}vU#W_EP}6AC(^1t0ElqOB zwq0PEhijeU$|USo=ZeDmy#Pq+V)af~binDCVduY<#^78pQVv3;00000NkvXXu0mjf+`?m# diff --git a/assets/images/96/icon.png b/assets/images/96/icon.png index 4ff1b95a724919450ee1b05d27b766ce9823e389..8f2976edc73b2e88db4f333c6c240256b83a808f 100644 GIT binary patch literal 14820 zcmV zaB^>EX>4U6ba`-PAZ2)IW&i+q+O3>vavZUer2pd-a|GlkD^7|vc z|M9x{{J`^4;B$B{*zfy0ucu!Zl=!|re!gzXeD71=8@)gHx?#|hJzu=0M+MToN zIs2JikC~Oq=AG2nRPI;2aj=x(UY7YN{7ZaY?nmRJGR29-7SWnJHB9yWkSVP6RQPY_Mfr1``mV)H(lk)%kfU{ zxS8XMKR(RgUi_bYd~S4(T-P~UKWoLfynLEr$a4ChcVPl|-Zf2keeZ|)<~R16VFMOS zcbO{_>~=i27|H$et#Iuecwe&7yzcJGdT+oI@$AH4T)+Z0yO3OVws>EhV;w8@>5SZm z=m!>XDf#8h!8Rdej8nay%{9f{_xj|Ymw^@xkqDZCX$TjL6=TAGO04)$Pa#E=xnyBfFQLSeN-m|;(n_zP#+qubrPkVNZ@vW}EVbNv zIPs*DPdW9p(?3>wt@_hy?l;T*XREo_YO+|o?<>Eo#>=IA-NFe@l5B>>d~{g6$O1UD zm(6T-F?v}}HnYtW6v<;Xmt>sfWHBrlxAW<^kL`Y0?mybir1;;moBx;Pj7<0c!*WKZ zdoA~;-Tq>=)o(@#*FcIwt*H$MVB-zDc3-=4(*N^kMqvjrf|uBJz$2y-v2U!+HRj4+ z#anf&x?P$}2k5GPY|9&WOQnRg=PHA++I4jt!6#crH*FtRPwZG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|838-$NBqm)5~bw?gRrPJFN>l z_XP&sv}-J^4VTYYH}Vi15l^i|FGsxA*`H*Er)k@aHQ%MKt=uNQ-ADzh>WZZGDAORt zzJ^*e){Q(Qi7YC1PbXnJEZe{4k{|ay1V6o><0MfqPKJ?V5nyT4`GKaEs`DKG(Qm1c zN!c5*h1;2-ueSHhQ zXreBVawmuj0EcY9@40^XI1B3cr)h*#Cg*gDInSs3?dMM!cD2-l=_^N&Jq8%?-P7E* zzf{pdUya+##%LQtXanua8o^jhpFKB1MO^`o=Vg|=Oq?@_u$yR!QKOj&6~#5M`iCHb zQ$tS(N>N!J_q8>?%t3NfR{obh=J_QUV>JL+4gjkG;8Tf6jLt+sfp<{}4IyxZ0D2DU zoT{Ox>f*iC@df1yM6rcQ%tUi#&H(@bd%Uk`aO!!d zQseW+*Kv6g*~pTYgB}A6V>J{==U@MHDQ)=<=^~R3XyCxQYgVO&@4{a`$`|W^0aZ^778U2Pfn)Y@$fCIR`ZG=jzCB3bU(1008t&G^YNt{kwZi c+awPE1EojP4Hle|pa1{>07*qoM6N<$f+Gr$(*OVf From d3f56efeadad541e45902ce066194e4dc4efbd1f Mon Sep 17 00:00:00 2001 From: Alexander Danilov Date: Mon, 1 Jul 2019 00:32:26 +0300 Subject: [PATCH 08/15] Localization for popup --- _locales/en/messages.json | 85 ++++++++++++++++++++++++++++++++++++++- _locales/ru/messages.json | 81 +++++++++++++++++++++++++++++++++++++ app/popup/popup.css | 22 +++++++++- app/popup/popup.html | 38 ++++++++--------- app/popup/popup.js | 28 +++++++------ scripts/helpers.js | 4 ++ 6 files changed, 224 insertions(+), 34 deletions(-) diff --git a/_locales/en/messages.json b/_locales/en/messages.json index 2fb28ec..70fc0d8 100644 --- a/_locales/en/messages.json +++ b/_locales/en/messages.json @@ -1,11 +1,11 @@ { "extName": { "message": "IITC-Button", - "description": "Main title on the Chrome Web Store" + "description": "Name of the extension" }, "extDescription": { "message": "Launch IITC for Ingress Intel with ease.", - "description": "Short description on the Chrome Web Store" + "description": "Description of the extension" }, "lang": { "message": "en" @@ -13,5 +13,86 @@ "titleDefault": { "message": "Open Intel", "description": "Title for the button at the application panel" + }, + "needRebootIntel": { + "message": "Changes will be applied after rebooting Intel" + }, + "updateInProgress": { + "message": "Update in progress…" + }, + "changesApplied": { + "message": "Changes were applied" + }, + "noData": { + "message": "No data" + }, + "addExternalPlugin": { + "message": "Add external plugin" + }, + "iitcHomePage": { + "message": "IITC-CE Home page" + }, + "iitcTelegram": { + "message": "IITC-CE Telegram channel" + }, + "iitcGithub": { + "message": "IITC-CE GitHub repository" + }, + "iitcButtonOptions": { + "message": "IITC-CE Button options" + }, + "updateNow": { + "message": "update now" + }, + "choosingUpdateChannel": { + "message": "Choosing a IITC-CE update channel" + }, + "release": { + "message": "Release" + }, + "testBuilds": { + "message": "Test builds" + }, + "localServer": { + "message": "Local server" + }, + "updateFrequency": { + "message": "IITC-CE checks for updates" + }, + "updateExternalFrequency": { + "message": "External plugins checks for updates" + }, + "every6hours": { + "message": "Every 6 Hours" + }, + "every12hours": { + "message": "Every 12 Hours" + }, + "everyDay": { + "message": "Every Day" + }, + "everyWeek": { + "message": "Every Week" + }, + "anyChannel": { + "message": "Any channel:" + }, + "badgeExternal": { + "message": "external" + }, + "localServerURL": { + "message": "Local server address" + }, + "placeholderLocalServer": { + "message": "127.0.0.1" + }, + "openSupport": { + "message": "Open support page:" + }, + "pluginSave": { + "message": "Save" + }, + "pluginDelete": { + "message": "Удалить" } } \ No newline at end of file diff --git a/_locales/ru/messages.json b/_locales/ru/messages.json index 802019b..9d2a2d7 100644 --- a/_locales/ru/messages.json +++ b/_locales/ru/messages.json @@ -10,5 +10,86 @@ }, "titleDefault": { "message": "Открыть Intel" + }, + "needRebootIntel": { + "message": "Применится после перезагрузки Intel" + }, + "updateInProgress": { + "message": "Происходит обновление…" + }, + "changesApplied": { + "message": "Изменения применены" + }, + "noData": { + "message": "Нет данных" + }, + "addExternalPlugin": { + "message": "Добавить сторонний плагин" + }, + "iitcHomePage": { + "message": "IITC-CE Сайт" + }, + "iitcTelegram": { + "message": "IITC-CE Telegram канал" + }, + "iitcGithub": { + "message": "IITC-CE GitHub репозиторий" + }, + "iitcButtonOptions": { + "message": "Настройки IITC-Кнопки" + }, + "updateNow": { + "message": "обновить сейчас" + }, + "choosingUpdateChannel": { + "message": "Канал обновлений IITC-CE" + }, + "release": { + "message": "Релиз" + }, + "testBuilds": { + "message": "Тестовые сборки" + }, + "localServer": { + "message": "Локальный сервер" + }, + "updateFrequency": { + "message": "Проверка обновлений IITC-CE" + }, + "updateExternalFrequency": { + "message": "Проверка обновлений сторонних плагинов" + }, + "every6hours": { + "message": "Каждые 6 часов" + }, + "every12hours": { + "message": "Каждые 12 часов" + }, + "everyDay": { + "message": "Каждый день" + }, + "everyWeek": { + "message": "Каждую неделю" + }, + "anyChannel": { + "message": "Все каналы:" + }, + "badgeExternal": { + "message": "сторонний" + }, + "localServerURL": { + "message": "Адрес локального сервера" + }, + "placeholderLocalServer": { + "message": "127.0.0.1" + }, + "openSupport": { + "message": "Открыть страницу поддержки:" + }, + "pluginSave": { + "message": "Сохранить" + }, + "pluginDelete": { + "message": "Удалить" } } \ No newline at end of file diff --git a/app/popup/popup.css b/app/popup/popup.css index 5ba7748..f0250b4 100644 --- a/app/popup/popup.css +++ b/app/popup/popup.css @@ -1,6 +1,6 @@ body { cursor: default; - min-width: 300px; + min-width: 325px; min-height: 546px; overflow: hidden; margin: 0; @@ -301,6 +301,16 @@ h2:first-letter { } .update-check__label { padding-right: 5px; + line-height: 11px; + text-align: right; +} +.update-check__label-wrapper { + display: flex; + justify-content: right; + align-items: center; + width: 30%; + float: left; + height: 30px; } /* @@ -337,9 +347,19 @@ h2:first-letter { padding: 0 10px 0 10px; color: var(--color-white); font-weight: 400; + white-space: nowrap; transition: bottom 0.3s ease-in-out; z-index: 10; } +#message::after { + content: ''; + position: absolute; + right: 0; + top: 0; + width: 40px; + height: 100%; + background: linear-gradient(to right, #3333, #333 100%); +} .message.opened { bottom: 0; } diff --git a/app/popup/popup.html b/app/popup/popup.html index 0495563..6f06c90 100644 --- a/app/popup/popup.html +++ b/app/popup/popup.html @@ -35,24 +35,24 @@ keyboard_arrow_right

- No data + {{ i18n('noData') }}
-
addAdd external plugins
+
add{{ i18n('addExternalPlugin') }}
-
linkIITC-CE Home page
-
announcementIITC-CE Telegram channel
-
developer_boardIITC-CE GitHub repository
+
link{{ i18n('iitcHomePage') }}
+
announcement{{ i18n('iitcTelegram') }}
+
developer_board{{ i18n('iitcGithub') }}
- keyboard_arrow_leftIITC-CE Button options
update now
+ keyboard_arrow_left{{ i18n('iitcButtonOptions') }}
{{ i18n('updateNow') }}
-

Choosing a IITC-CE update channel

+

{{ i18n('choosingUpdateChannel') }}

@@ -60,17 +60,17 @@

Choosing a IITC-CE update channel

-

IITC-CE checks for updates

+

{{ i18n('updateFrequency') }}

- Release: +
{{ i18n('release') }}:
- Test builds: +
{{ i18n('testBuilds') }}:
@@ -80,11 +80,11 @@

IITC-CE checks for updates

-

External plugins checks for updates

+

{{ i18n('updateExternalFrequency') }}

- Any: +
{{ i18n('anyChannel') }}
@@ -94,9 +94,9 @@

External plugins checks for updates

-

Local server address

+

{{ i18n('localServerURL') }}

- +
@@ -108,15 +108,15 @@

Local server address

{{ plugin.name }} - custom + {{ i18n('badgeExternal') }} {{ pluginIcon(plugin) }}
-
No data
+
{{ i18n('noData') }}
diff --git a/app/popup/popup.js b/app/popup/popup.js index f859963..45b3834 100644 --- a/app/popup/popup.js +++ b/app/popup/popup.js @@ -1,13 +1,13 @@ let updateChannelsData = { - release: {name: 'Release', value: 'release'}, - test: {name: 'Test builds', value: 'test',}, - local: {name: 'Local server', value: 'local'} + release: {name: i18n('release'), value: 'release'}, + test: {name: i18n('testBuilds'), value: 'test',}, + local: {name: i18n('localServer'), value: 'local'} }; let updateIntervalsData = [ - {name: 'Every 6 Hours', value: '6'}, - {name: 'Every 12 Hours', value: '12'}, - {name: 'Every Day', value: '24'}, - {name: 'Every Week', value: '168'} + {name: i18n('every6hours'), value: '6'}, + {name: i18n('every12hours'), value: '12'}, + {name: i18n('everyDay'), value: '24'}, + {name: i18n('everyWeek'), value: '168'} ]; let app = new Vue({ @@ -69,12 +69,12 @@ let app = new Vue({ this.plugins[plugin_id].status = action; this.plugins[plugin_id].icon = 'toggle_'+action; - showMessage("Changes will be applied after rebooting Intel"); + showMessage(this.i18n("needRebootIntel")); chrome.runtime.sendMessage({'type': "managePlugin", 'id': plugin_id, 'category': this.category_name, 'action': action}); }, 'deletePlugin': function (plugin_id) { delete this.plugins[plugin_id]; - showMessage("Changes will be applied after rebooting Intel"); + showMessage(this.i18n("needRebootIntel")); chrome.runtime.sendMessage({'type': "managePlugin", 'id': plugin_id, 'category': this.category_name, 'action': "delete"}); }, 'savePlugin': function (id) { @@ -90,7 +90,7 @@ let app = new Vue({ }, () => { this.forceUpdate() }); - showMessage("Update in progress…"); + showMessage(this.i18n("updateInProgress")); }, 'changeUpdateCheckInterval': function (type) { let key = type+'_update_check_interval'; @@ -99,12 +99,12 @@ let app = new Vue({ chrome.storage.local.set(setData, () => { chrome.runtime.sendMessage({'type': (type === 'external') ? "externalUpdate" : "safeUpdate"}); - showMessage("Changes were applied"); + showMessage(this.i18n("changesApplied")); }); }, 'forceUpdate': function () { chrome.runtime.sendMessage({'type': "forceFullUpdate"}); - showMessage("Update in progress…"); + showMessage(this.i18n("updateInProgress")); }, 'changeLocalServer': async function () { let host = event.target.value; @@ -117,7 +117,11 @@ let app = new Vue({ } }); } + }, + 'i18n': (msg, arg) => { + return i18n(msg, arg) } + } }); diff --git a/scripts/helpers.js b/scripts/helpers.js index cbd1397..1c76008 100644 --- a/scripts/helpers.js +++ b/scripts/helpers.js @@ -1,3 +1,7 @@ +function i18n(msg, arg) { + return chrome.i18n.getMessage(msg, arg) +} + function parse_meta(code) { let meta = code.split('\n'); From 97dcabff60ccc34ecb67024b41bd4e0eebf8c2d3 Mon Sep 17 00:00:00 2001 From: Alexander Danilov Date: Tue, 2 Jul 2019 23:53:24 +0300 Subject: [PATCH 09/15] Added incorrectly not added vuejs library --- app/vue-i18n.js | 1871 +++++++++++++++++++++++++++++++++++++++++++ app/vue-i18n.min.js | 6 + 2 files changed, 1877 insertions(+) create mode 100644 app/vue-i18n.js create mode 100644 app/vue-i18n.min.js diff --git a/app/vue-i18n.js b/app/vue-i18n.js new file mode 100644 index 0000000..bf0535d --- /dev/null +++ b/app/vue-i18n.js @@ -0,0 +1,1871 @@ +/*! + * vue-i18n v8.11.1 + * (c) 2019 kazuya kawaguchi + * Released under the MIT License. + */ +(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() : + typeof define === 'function' && define.amd ? define(factory) : + (global.VueI18n = factory()); +}(this, (function () { 'use strict'; + + /* */ + + /** + * constants + */ + + var numberFormatKeys = [ + 'style', + 'currency', + 'currencyDisplay', + 'useGrouping', + 'minimumIntegerDigits', + 'minimumFractionDigits', + 'maximumFractionDigits', + 'minimumSignificantDigits', + 'maximumSignificantDigits', + 'localeMatcher', + 'formatMatcher' + ]; + + /** + * utilities + */ + + function warn (msg, err) { + if (typeof console !== 'undefined') { + console.warn('[vue-i18n] ' + msg); + /* istanbul ignore if */ + if (err) { + console.warn(err.stack); + } + } + } + + function error (msg, err) { + if (typeof console !== 'undefined') { + console.error('[vue-i18n] ' + msg); + /* istanbul ignore if */ + if (err) { + console.error(err.stack); + } + } + } + + function isObject (obj) { + return obj !== null && typeof obj === 'object' + } + + var toString = Object.prototype.toString; + var OBJECT_STRING = '[object Object]'; + function isPlainObject (obj) { + return toString.call(obj) === OBJECT_STRING + } + + function isNull (val) { + return val === null || val === undefined + } + + function parseArgs () { + var args = [], len = arguments.length; + while ( len-- ) args[ len ] = arguments[ len ]; + + var locale = null; + var params = null; + if (args.length === 1) { + if (isObject(args[0]) || Array.isArray(args[0])) { + params = args[0]; + } else if (typeof args[0] === 'string') { + locale = args[0]; + } + } else if (args.length === 2) { + if (typeof args[0] === 'string') { + locale = args[0]; + } + /* istanbul ignore if */ + if (isObject(args[1]) || Array.isArray(args[1])) { + params = args[1]; + } + } + + return { locale: locale, params: params } + } + + function looseClone (obj) { + return JSON.parse(JSON.stringify(obj)) + } + + function remove (arr, item) { + if (arr.length) { + var index = arr.indexOf(item); + if (index > -1) { + return arr.splice(index, 1) + } + } + } + + var hasOwnProperty = Object.prototype.hasOwnProperty; + function hasOwn (obj, key) { + return hasOwnProperty.call(obj, key) + } + + function merge (target) { + var arguments$1 = arguments; + + var output = Object(target); + for (var i = 1; i < arguments.length; i++) { + var source = arguments$1[i]; + if (source !== undefined && source !== null) { + var key = (void 0); + for (key in source) { + if (hasOwn(source, key)) { + if (isObject(source[key])) { + output[key] = merge(output[key], source[key]); + } else { + output[key] = source[key]; + } + } + } + } + } + return output + } + + function looseEqual (a, b) { + if (a === b) { return true } + var isObjectA = isObject(a); + var isObjectB = isObject(b); + if (isObjectA && isObjectB) { + try { + var isArrayA = Array.isArray(a); + var isArrayB = Array.isArray(b); + if (isArrayA && isArrayB) { + return a.length === b.length && a.every(function (e, i) { + return looseEqual(e, b[i]) + }) + } else if (!isArrayA && !isArrayB) { + var keysA = Object.keys(a); + var keysB = Object.keys(b); + return keysA.length === keysB.length && keysA.every(function (key) { + return looseEqual(a[key], b[key]) + }) + } else { + /* istanbul ignore next */ + return false + } + } catch (e) { + /* istanbul ignore next */ + return false + } + } else if (!isObjectA && !isObjectB) { + return String(a) === String(b) + } else { + return false + } + } + + /* */ + + function extend (Vue) { + if (!Vue.prototype.hasOwnProperty('$i18n')) { + // $FlowFixMe + Object.defineProperty(Vue.prototype, '$i18n', { + get: function get () { return this._i18n } + }); + } + + Vue.prototype.$t = function (key) { + var values = [], len = arguments.length - 1; + while ( len-- > 0 ) values[ len ] = arguments[ len + 1 ]; + + var i18n = this.$i18n; + return i18n._t.apply(i18n, [ key, i18n.locale, i18n._getMessages(), this ].concat( values )) + }; + + Vue.prototype.$tc = function (key, choice) { + var values = [], len = arguments.length - 2; + while ( len-- > 0 ) values[ len ] = arguments[ len + 2 ]; + + var i18n = this.$i18n; + return i18n._tc.apply(i18n, [ key, i18n.locale, i18n._getMessages(), this, choice ].concat( values )) + }; + + Vue.prototype.$te = function (key, locale) { + var i18n = this.$i18n; + return i18n._te(key, i18n.locale, i18n._getMessages(), locale) + }; + + Vue.prototype.$d = function (value) { + var ref; + + var args = [], len = arguments.length - 1; + while ( len-- > 0 ) args[ len ] = arguments[ len + 1 ]; + return (ref = this.$i18n).d.apply(ref, [ value ].concat( args )) + }; + + Vue.prototype.$n = function (value) { + var ref; + + var args = [], len = arguments.length - 1; + while ( len-- > 0 ) args[ len ] = arguments[ len + 1 ]; + return (ref = this.$i18n).n.apply(ref, [ value ].concat( args )) + }; + } + + /* */ + + var mixin = { + beforeCreate: function beforeCreate () { + var options = this.$options; + options.i18n = options.i18n || (options.__i18n ? {} : null); + + if (options.i18n) { + if (options.i18n instanceof VueI18n) { + // init locale messages via custom blocks + if (options.__i18n) { + try { + var localeMessages = {}; + options.__i18n.forEach(function (resource) { + localeMessages = merge(localeMessages, JSON.parse(resource)); + }); + Object.keys(localeMessages).forEach(function (locale) { + options.i18n.mergeLocaleMessage(locale, localeMessages[locale]); + }); + } catch (e) { + { + warn("Cannot parse locale messages via custom blocks.", e); + } + } + } + this._i18n = options.i18n; + this._i18nWatcher = this._i18n.watchI18nData(); + this._i18n.subscribeDataChanging(this); + this._subscribing = true; + } else if (isPlainObject(options.i18n)) { + // component local i18n + if (this.$root && this.$root.$i18n && this.$root.$i18n instanceof VueI18n) { + options.i18n.root = this.$root; + options.i18n.formatter = this.$root.$i18n.formatter; + options.i18n.fallbackLocale = this.$root.$i18n.fallbackLocale; + options.i18n.silentTranslationWarn = this.$root.$i18n.silentTranslationWarn; + options.i18n.silentFallbackWarn = this.$root.$i18n.silentFallbackWarn; + options.i18n.pluralizationRules = this.$root.$i18n.pluralizationRules; + options.i18n.preserveDirectiveContent = this.$root.$i18n.preserveDirectiveContent; + } + + // init locale messages via custom blocks + if (options.__i18n) { + try { + var localeMessages$1 = {}; + options.__i18n.forEach(function (resource) { + localeMessages$1 = merge(localeMessages$1, JSON.parse(resource)); + }); + options.i18n.messages = localeMessages$1; + } catch (e) { + { + warn("Cannot parse locale messages via custom blocks.", e); + } + } + } + + this._i18n = new VueI18n(options.i18n); + this._i18nWatcher = this._i18n.watchI18nData(); + this._i18n.subscribeDataChanging(this); + this._subscribing = true; + + if (options.i18n.sync === undefined || !!options.i18n.sync) { + this._localeWatcher = this.$i18n.watchLocale(); + } + } else { + { + warn("Cannot be interpreted 'i18n' option."); + } + } + } else if (this.$root && this.$root.$i18n && this.$root.$i18n instanceof VueI18n) { + // root i18n + this._i18n = this.$root.$i18n; + this._i18n.subscribeDataChanging(this); + this._subscribing = true; + } else if (options.parent && options.parent.$i18n && options.parent.$i18n instanceof VueI18n) { + // parent i18n + this._i18n = options.parent.$i18n; + this._i18n.subscribeDataChanging(this); + this._subscribing = true; + } + }, + + beforeDestroy: function beforeDestroy () { + if (!this._i18n) { return } + + var self = this; + this.$nextTick(function () { + if (self._subscribing) { + self._i18n.unsubscribeDataChanging(self); + delete self._subscribing; + } + + if (self._i18nWatcher) { + self._i18nWatcher(); + self._i18n.destroyVM(); + delete self._i18nWatcher; + } + + if (self._localeWatcher) { + self._localeWatcher(); + delete self._localeWatcher; + } + + self._i18n = null; + }); + } + }; + + /* */ + + var interpolationComponent = { + name: 'i18n', + functional: true, + props: { + tag: { + type: String, + default: 'span' + }, + path: { + type: String, + required: true + }, + locale: { + type: String + }, + places: { + type: [Array, Object] + } + }, + render: function render (h, ref) { + var props = ref.props; + var data = ref.data; + var children = ref.children; + var parent = ref.parent; + + var i18n = parent.$i18n; + + children = (children || []).filter(function (child) { + return child.tag || (child.text = child.text.trim()) + }); + + if (!i18n) { + { + warn('Cannot find VueI18n instance!'); + } + return children + } + + var path = props.path; + var locale = props.locale; + + var params = {}; + var places = props.places || {}; + + var hasPlaces = Array.isArray(places) + ? places.length > 0 + : Object.keys(places).length > 0; + + var everyPlace = children.every(function (child) { + if (child.data && child.data.attrs) { + var place = child.data.attrs.place; + return (typeof place !== 'undefined') && place !== '' + } + }); + + if (hasPlaces && children.length > 0 && !everyPlace) { + warn('If places prop is set, all child elements must have place prop set.'); + } + + if (Array.isArray(places)) { + places.forEach(function (el, i) { + params[i] = el; + }); + } else { + Object.keys(places).forEach(function (key) { + params[key] = places[key]; + }); + } + + children.forEach(function (child, i) { + var key = everyPlace + ? ("" + (child.data.attrs.place)) + : ("" + i); + params[key] = child; + }); + + return h(props.tag, data, i18n.i(path, locale, params)) + } + }; + + /* */ + + var numberComponent = { + name: 'i18n-n', + functional: true, + props: { + tag: { + type: String, + default: 'span' + }, + value: { + type: Number, + required: true + }, + format: { + type: [String, Object] + }, + locale: { + type: String + } + }, + render: function render (h, ref) { + var props = ref.props; + var parent = ref.parent; + var data = ref.data; + + var i18n = parent.$i18n; + + if (!i18n) { + { + warn('Cannot find VueI18n instance!'); + } + return null + } + + var key = null; + var options = null; + + if (typeof props.format === 'string') { + key = props.format; + } else if (isObject(props.format)) { + if (props.format.key) { + key = props.format.key; + } + + // Filter out number format options only + options = Object.keys(props.format).reduce(function (acc, prop) { + var obj; + + if (numberFormatKeys.includes(prop)) { + return Object.assign({}, acc, ( obj = {}, obj[prop] = props.format[prop], obj )) + } + return acc + }, null); + } + + var locale = props.locale || i18n.locale; + var parts = i18n._ntp(props.value, locale, key, options); + + var values = parts.map(function (part, index) { + var obj; + + var slot = data.scopedSlots && data.scopedSlots[part.type]; + return slot ? slot(( obj = {}, obj[part.type] = part.value, obj.index = index, obj.parts = parts, obj )) : part.value + }); + + return h(props.tag, { + attrs: data.attrs, + 'class': data['class'], + staticClass: data.staticClass + }, values) + } + }; + + /* */ + + function bind (el, binding, vnode) { + if (!assert(el, vnode)) { return } + + t(el, binding, vnode); + } + + function update (el, binding, vnode, oldVNode) { + if (!assert(el, vnode)) { return } + + var i18n = vnode.context.$i18n; + if (localeEqual(el, vnode) && + (looseEqual(binding.value, binding.oldValue) && + looseEqual(el._localeMessage, i18n.getLocaleMessage(i18n.locale)))) { return } + + t(el, binding, vnode); + } + + function unbind (el, binding, vnode, oldVNode) { + var vm = vnode.context; + if (!vm) { + warn('Vue instance does not exists in VNode context'); + return + } + + var i18n = vnode.context.$i18n || {}; + if (!binding.modifiers.preserve && !i18n.preserveDirectiveContent) { + el.textContent = ''; + } + el._vt = undefined; + delete el['_vt']; + el._locale = undefined; + delete el['_locale']; + el._localeMessage = undefined; + delete el['_localeMessage']; + } + + function assert (el, vnode) { + var vm = vnode.context; + if (!vm) { + warn('Vue instance does not exists in VNode context'); + return false + } + + if (!vm.$i18n) { + warn('VueI18n instance does not exists in Vue instance'); + return false + } + + return true + } + + function localeEqual (el, vnode) { + var vm = vnode.context; + return el._locale === vm.$i18n.locale + } + + function t (el, binding, vnode) { + var ref$1, ref$2; + + var value = binding.value; + + var ref = parseValue(value); + var path = ref.path; + var locale = ref.locale; + var args = ref.args; + var choice = ref.choice; + if (!path && !locale && !args) { + warn('value type not supported'); + return + } + + if (!path) { + warn('`path` is required in v-t directive'); + return + } + + var vm = vnode.context; + if (choice) { + el._vt = el.textContent = (ref$1 = vm.$i18n).tc.apply(ref$1, [ path, choice ].concat( makeParams(locale, args) )); + } else { + el._vt = el.textContent = (ref$2 = vm.$i18n).t.apply(ref$2, [ path ].concat( makeParams(locale, args) )); + } + el._locale = vm.$i18n.locale; + el._localeMessage = vm.$i18n.getLocaleMessage(vm.$i18n.locale); + } + + function parseValue (value) { + var path; + var locale; + var args; + var choice; + + if (typeof value === 'string') { + path = value; + } else if (isPlainObject(value)) { + path = value.path; + locale = value.locale; + args = value.args; + choice = value.choice; + } + + return { path: path, locale: locale, args: args, choice: choice } + } + + function makeParams (locale, args) { + var params = []; + + locale && params.push(locale); + if (args && (Array.isArray(args) || isPlainObject(args))) { + params.push(args); + } + + return params + } + + var Vue; + + function install (_Vue) { + /* istanbul ignore if */ + if (install.installed && _Vue === Vue) { + warn('already installed.'); + return + } + install.installed = true; + + Vue = _Vue; + + var version = (Vue.version && Number(Vue.version.split('.')[0])) || -1; + /* istanbul ignore if */ + if (version < 2) { + warn(("vue-i18n (" + (install.version) + ") need to use Vue 2.0 or later (Vue: " + (Vue.version) + ").")); + return + } + + extend(Vue); + Vue.mixin(mixin); + Vue.directive('t', { bind: bind, update: update, unbind: unbind }); + Vue.component(interpolationComponent.name, interpolationComponent); + Vue.component(numberComponent.name, numberComponent); + + // use simple mergeStrategies to prevent i18n instance lose '__proto__' + var strats = Vue.config.optionMergeStrategies; + strats.i18n = function (parentVal, childVal) { + return childVal === undefined + ? parentVal + : childVal + }; + } + + /* */ + + var BaseFormatter = function BaseFormatter () { + this._caches = Object.create(null); + }; + + BaseFormatter.prototype.interpolate = function interpolate (message, values) { + if (!values) { + return [message] + } + var tokens = this._caches[message]; + if (!tokens) { + tokens = parse(message); + this._caches[message] = tokens; + } + return compile(tokens, values) + }; + + + + var RE_TOKEN_LIST_VALUE = /^(?:\d)+/; + var RE_TOKEN_NAMED_VALUE = /^(?:\w)+/; + + function parse (format) { + var tokens = []; + var position = 0; + + var text = ''; + while (position < format.length) { + var char = format[position++]; + if (char === '{') { + if (text) { + tokens.push({ type: 'text', value: text }); + } + + text = ''; + var sub = ''; + char = format[position++]; + while (char !== undefined && char !== '}') { + sub += char; + char = format[position++]; + } + var isClosed = char === '}'; + + var type = RE_TOKEN_LIST_VALUE.test(sub) + ? 'list' + : isClosed && RE_TOKEN_NAMED_VALUE.test(sub) + ? 'named' + : 'unknown'; + tokens.push({ value: sub, type: type }); + } else if (char === '%') { + // when found rails i18n syntax, skip text capture + if (format[(position)] !== '{') { + text += char; + } + } else { + text += char; + } + } + + text && tokens.push({ type: 'text', value: text }); + + return tokens + } + + function compile (tokens, values) { + var compiled = []; + var index = 0; + + var mode = Array.isArray(values) + ? 'list' + : isObject(values) + ? 'named' + : 'unknown'; + if (mode === 'unknown') { return compiled } + + while (index < tokens.length) { + var token = tokens[index]; + switch (token.type) { + case 'text': + compiled.push(token.value); + break + case 'list': + compiled.push(values[parseInt(token.value, 10)]); + break + case 'named': + if (mode === 'named') { + compiled.push((values)[token.value]); + } else { + { + warn(("Type of token '" + (token.type) + "' and format of value '" + mode + "' don't match!")); + } + } + break + case 'unknown': + { + warn("Detect 'unknown' type of token!"); + } + break + } + index++; + } + + return compiled + } + + /* */ + + /** + * Path parser + * - Inspired: + * Vue.js Path parser + */ + + // actions + var APPEND = 0; + var PUSH = 1; + var INC_SUB_PATH_DEPTH = 2; + var PUSH_SUB_PATH = 3; + + // states + var BEFORE_PATH = 0; + var IN_PATH = 1; + var BEFORE_IDENT = 2; + var IN_IDENT = 3; + var IN_SUB_PATH = 4; + var IN_SINGLE_QUOTE = 5; + var IN_DOUBLE_QUOTE = 6; + var AFTER_PATH = 7; + var ERROR = 8; + + var pathStateMachine = []; + + pathStateMachine[BEFORE_PATH] = { + 'ws': [BEFORE_PATH], + 'ident': [IN_IDENT, APPEND], + '[': [IN_SUB_PATH], + 'eof': [AFTER_PATH] + }; + + pathStateMachine[IN_PATH] = { + 'ws': [IN_PATH], + '.': [BEFORE_IDENT], + '[': [IN_SUB_PATH], + 'eof': [AFTER_PATH] + }; + + pathStateMachine[BEFORE_IDENT] = { + 'ws': [BEFORE_IDENT], + 'ident': [IN_IDENT, APPEND], + '0': [IN_IDENT, APPEND], + 'number': [IN_IDENT, APPEND] + }; + + pathStateMachine[IN_IDENT] = { + 'ident': [IN_IDENT, APPEND], + '0': [IN_IDENT, APPEND], + 'number': [IN_IDENT, APPEND], + 'ws': [IN_PATH, PUSH], + '.': [BEFORE_IDENT, PUSH], + '[': [IN_SUB_PATH, PUSH], + 'eof': [AFTER_PATH, PUSH] + }; + + pathStateMachine[IN_SUB_PATH] = { + "'": [IN_SINGLE_QUOTE, APPEND], + '"': [IN_DOUBLE_QUOTE, APPEND], + '[': [IN_SUB_PATH, INC_SUB_PATH_DEPTH], + ']': [IN_PATH, PUSH_SUB_PATH], + 'eof': ERROR, + 'else': [IN_SUB_PATH, APPEND] + }; + + pathStateMachine[IN_SINGLE_QUOTE] = { + "'": [IN_SUB_PATH, APPEND], + 'eof': ERROR, + 'else': [IN_SINGLE_QUOTE, APPEND] + }; + + pathStateMachine[IN_DOUBLE_QUOTE] = { + '"': [IN_SUB_PATH, APPEND], + 'eof': ERROR, + 'else': [IN_DOUBLE_QUOTE, APPEND] + }; + + /** + * Check if an expression is a literal value. + */ + + var literalValueRE = /^\s?(?:true|false|-?[\d.]+|'[^']*'|"[^"]*")\s?$/; + function isLiteral (exp) { + return literalValueRE.test(exp) + } + + /** + * Strip quotes from a string + */ + + function stripQuotes (str) { + var a = str.charCodeAt(0); + var b = str.charCodeAt(str.length - 1); + return a === b && (a === 0x22 || a === 0x27) + ? str.slice(1, -1) + : str + } + + /** + * Determine the type of a character in a keypath. + */ + + function getPathCharType (ch) { + if (ch === undefined || ch === null) { return 'eof' } + + var code = ch.charCodeAt(0); + + switch (code) { + case 0x5B: // [ + case 0x5D: // ] + case 0x2E: // . + case 0x22: // " + case 0x27: // ' + return ch + + case 0x5F: // _ + case 0x24: // $ + case 0x2D: // - + return 'ident' + + case 0x09: // Tab + case 0x0A: // Newline + case 0x0D: // Return + case 0xA0: // No-break space + case 0xFEFF: // Byte Order Mark + case 0x2028: // Line Separator + case 0x2029: // Paragraph Separator + return 'ws' + } + + return 'ident' + } + + /** + * Format a subPath, return its plain form if it is + * a literal string or number. Otherwise prepend the + * dynamic indicator (*). + */ + + function formatSubPath (path) { + var trimmed = path.trim(); + // invalid leading 0 + if (path.charAt(0) === '0' && isNaN(path)) { return false } + + return isLiteral(trimmed) ? stripQuotes(trimmed) : '*' + trimmed + } + + /** + * Parse a string path into an array of segments + */ + + function parse$1 (path) { + var keys = []; + var index = -1; + var mode = BEFORE_PATH; + var subPathDepth = 0; + var c; + var key; + var newChar; + var type; + var transition; + var action; + var typeMap; + var actions = []; + + actions[PUSH] = function () { + if (key !== undefined) { + keys.push(key); + key = undefined; + } + }; + + actions[APPEND] = function () { + if (key === undefined) { + key = newChar; + } else { + key += newChar; + } + }; + + actions[INC_SUB_PATH_DEPTH] = function () { + actions[APPEND](); + subPathDepth++; + }; + + actions[PUSH_SUB_PATH] = function () { + if (subPathDepth > 0) { + subPathDepth--; + mode = IN_SUB_PATH; + actions[APPEND](); + } else { + subPathDepth = 0; + key = formatSubPath(key); + if (key === false) { + return false + } else { + actions[PUSH](); + } + } + }; + + function maybeUnescapeQuote () { + var nextChar = path[index + 1]; + if ((mode === IN_SINGLE_QUOTE && nextChar === "'") || + (mode === IN_DOUBLE_QUOTE && nextChar === '"')) { + index++; + newChar = '\\' + nextChar; + actions[APPEND](); + return true + } + } + + while (mode !== null) { + index++; + c = path[index]; + + if (c === '\\' && maybeUnescapeQuote()) { + continue + } + + type = getPathCharType(c); + typeMap = pathStateMachine[mode]; + transition = typeMap[type] || typeMap['else'] || ERROR; + + if (transition === ERROR) { + return // parse error + } + + mode = transition[0]; + action = actions[transition[1]]; + if (action) { + newChar = transition[2]; + newChar = newChar === undefined + ? c + : newChar; + if (action() === false) { + return + } + } + + if (mode === AFTER_PATH) { + return keys + } + } + } + + + + + + var I18nPath = function I18nPath () { + this._cache = Object.create(null); + }; + + /** + * External parse that check for a cache hit first + */ + I18nPath.prototype.parsePath = function parsePath (path) { + var hit = this._cache[path]; + if (!hit) { + hit = parse$1(path); + if (hit) { + this._cache[path] = hit; + } + } + return hit || [] + }; + + /** + * Get path value from path string + */ + I18nPath.prototype.getPathValue = function getPathValue (obj, path) { + if (!isObject(obj)) { return null } + + var paths = this.parsePath(path); + if (paths.length === 0) { + return null + } else { + var length = paths.length; + var last = obj; + var i = 0; + while (i < length) { + var value = last[paths[i]]; + if (value === undefined) { + return null + } + last = value; + i++; + } + + return last + } + }; + + /* */ + + + + var htmlTagMatcher = /<\/?[\w\s="/.':;#-\/]+>/; + var linkKeyMatcher = /(?:@(?:\.[a-z]+)?:(?:[\w\-_|.]+|\([\w\-_|.]+\)))/g; + var linkKeyPrefixMatcher = /^@(?:\.([a-z]+))?:/; + var bracketsMatcher = /[()]/g; + var formatters = { + 'upper': function (str) { return str.toLocaleUpperCase(); }, + 'lower': function (str) { return str.toLocaleLowerCase(); } + }; + + var defaultFormatter = new BaseFormatter(); + + var VueI18n = function VueI18n (options) { + var this$1 = this; + if ( options === void 0 ) options = {}; + + // Auto install if it is not done yet and `window` has `Vue`. + // To allow users to avoid auto-installation in some cases, + // this code should be placed here. See #290 + /* istanbul ignore if */ + if (!Vue && typeof window !== 'undefined' && window.Vue) { + install(window.Vue); + } + + var locale = options.locale || 'en-US'; + var fallbackLocale = options.fallbackLocale || 'en-US'; + var messages = options.messages || {}; + var dateTimeFormats = options.dateTimeFormats || {}; + var numberFormats = options.numberFormats || {}; + + this._vm = null; + this._formatter = options.formatter || defaultFormatter; + this._missing = options.missing || null; + this._root = options.root || null; + this._sync = options.sync === undefined ? true : !!options.sync; + this._fallbackRoot = options.fallbackRoot === undefined + ? true + : !!options.fallbackRoot; + this._silentTranslationWarn = options.silentTranslationWarn === undefined + ? false + : !!options.silentTranslationWarn; + this._silentFallbackWarn = options.silentFallbackWarn === undefined + ? false + : !!options.silentFallbackWarn; + this._dateTimeFormatters = {}; + this._numberFormatters = {}; + this._path = new I18nPath(); + this._dataListeners = []; + this._preserveDirectiveContent = options.preserveDirectiveContent === undefined + ? false + : !!options.preserveDirectiveContent; + this.pluralizationRules = options.pluralizationRules || {}; + this._warnHtmlInMessage = options.warnHtmlInMessage || 'off'; + + this._exist = function (message, key) { + if (!message || !key) { return false } + if (!isNull(this$1._path.getPathValue(message, key))) { return true } + // fallback for flat key + if (message[key]) { return true } + return false + }; + + if (this._warnHtmlInMessage === 'warn' || this._warnHtmlInMessage === 'error') { + Object.keys(messages).forEach(function (locale) { + this$1._checkLocaleMessage(locale, this$1._warnHtmlInMessage, messages[locale]); + }); + } + + this._initVM({ + locale: locale, + fallbackLocale: fallbackLocale, + messages: messages, + dateTimeFormats: dateTimeFormats, + numberFormats: numberFormats + }); + }; + + var prototypeAccessors = { vm: { configurable: true },messages: { configurable: true },dateTimeFormats: { configurable: true },numberFormats: { configurable: true },availableLocales: { configurable: true },locale: { configurable: true },fallbackLocale: { configurable: true },missing: { configurable: true },formatter: { configurable: true },silentTranslationWarn: { configurable: true },silentFallbackWarn: { configurable: true },preserveDirectiveContent: { configurable: true },warnHtmlInMessage: { configurable: true } }; + + VueI18n.prototype._checkLocaleMessage = function _checkLocaleMessage (locale, level, message) { + var paths = []; + + var fn = function (level, locale, message, paths) { + if (isPlainObject(message)) { + Object.keys(message).forEach(function (key) { + var val = message[key]; + if (isPlainObject(val)) { + paths.push(key); + paths.push('.'); + fn(level, locale, val, paths); + paths.pop(); + paths.pop(); + } else { + paths.push(key); + fn(level, locale, val, paths); + paths.pop(); + } + }); + } else if (Array.isArray(message)) { + message.forEach(function (item, index) { + if (isPlainObject(item)) { + paths.push(("[" + index + "]")); + paths.push('.'); + fn(level, locale, item, paths); + paths.pop(); + paths.pop(); + } else { + paths.push(("[" + index + "]")); + fn(level, locale, item, paths); + paths.pop(); + } + }); + } else if (typeof message === 'string') { + var ret = htmlTagMatcher.test(message); + if (ret) { + var msg = "Detected HTML in message '" + message + "' of keypath '" + (paths.join('')) + "' at '" + locale + "'. Consider component interpolation with '' to avoid XSS. See https://bit.ly/2ZqJzkp"; + if (level === 'warn') { + warn(msg); + } else if (level === 'error') { + error(msg); + } + } + } + }; + + fn(level, locale, message, paths); + }; + + VueI18n.prototype._initVM = function _initVM (data) { + var silent = Vue.config.silent; + Vue.config.silent = true; + this._vm = new Vue({ data: data }); + Vue.config.silent = silent; + }; + + VueI18n.prototype.destroyVM = function destroyVM () { + this._vm.$destroy(); + }; + + VueI18n.prototype.subscribeDataChanging = function subscribeDataChanging (vm) { + this._dataListeners.push(vm); + }; + + VueI18n.prototype.unsubscribeDataChanging = function unsubscribeDataChanging (vm) { + remove(this._dataListeners, vm); + }; + + VueI18n.prototype.watchI18nData = function watchI18nData () { + var self = this; + return this._vm.$watch('$data', function () { + var i = self._dataListeners.length; + while (i--) { + Vue.nextTick(function () { + self._dataListeners[i] && self._dataListeners[i].$forceUpdate(); + }); + } + }, { deep: true }) + }; + + VueI18n.prototype.watchLocale = function watchLocale () { + /* istanbul ignore if */ + if (!this._sync || !this._root) { return null } + var target = this._vm; + return this._root.$i18n.vm.$watch('locale', function (val) { + target.$set(target, 'locale', val); + target.$forceUpdate(); + }, { immediate: true }) + }; + + prototypeAccessors.vm.get = function () { return this._vm }; + + prototypeAccessors.messages.get = function () { return looseClone(this._getMessages()) }; + prototypeAccessors.dateTimeFormats.get = function () { return looseClone(this._getDateTimeFormats()) }; + prototypeAccessors.numberFormats.get = function () { return looseClone(this._getNumberFormats()) }; + prototypeAccessors.availableLocales.get = function () { return Object.keys(this.messages).sort() }; + + prototypeAccessors.locale.get = function () { return this._vm.locale }; + prototypeAccessors.locale.set = function (locale) { + this._vm.$set(this._vm, 'locale', locale); + }; + + prototypeAccessors.fallbackLocale.get = function () { return this._vm.fallbackLocale }; + prototypeAccessors.fallbackLocale.set = function (locale) { + this._vm.$set(this._vm, 'fallbackLocale', locale); + }; + + prototypeAccessors.missing.get = function () { return this._missing }; + prototypeAccessors.missing.set = function (handler) { this._missing = handler; }; + + prototypeAccessors.formatter.get = function () { return this._formatter }; + prototypeAccessors.formatter.set = function (formatter) { this._formatter = formatter; }; + + prototypeAccessors.silentTranslationWarn.get = function () { return this._silentTranslationWarn }; + prototypeAccessors.silentTranslationWarn.set = function (silent) { this._silentTranslationWarn = silent; }; + + prototypeAccessors.silentFallbackWarn.get = function () { return this._silentFallbackWarn }; + prototypeAccessors.silentFallbackWarn.set = function (silent) { this._silentFallbackWarn = silent; }; + + prototypeAccessors.preserveDirectiveContent.get = function () { return this._preserveDirectiveContent }; + prototypeAccessors.preserveDirectiveContent.set = function (preserve) { this._preserveDirectiveContent = preserve; }; + + prototypeAccessors.warnHtmlInMessage.get = function () { return this._warnHtmlInMessage }; + prototypeAccessors.warnHtmlInMessage.set = function (level) { + var this$1 = this; + + var orgLevel = this._warnHtmlInMessage; + this._warnHtmlInMessage = level; + if (orgLevel !== level && (level === 'warn' || level === 'error')) { + var messages = this._getMessages(); + Object.keys(messages).forEach(function (locale) { + this$1._checkLocaleMessage(locale, this$1._warnHtmlInMessage, messages[locale]); + }); + } + }; + + VueI18n.prototype._getMessages = function _getMessages () { return this._vm.messages }; + VueI18n.prototype._getDateTimeFormats = function _getDateTimeFormats () { return this._vm.dateTimeFormats }; + VueI18n.prototype._getNumberFormats = function _getNumberFormats () { return this._vm.numberFormats }; + + VueI18n.prototype._warnDefault = function _warnDefault (locale, key, result, vm, values) { + if (!isNull(result)) { return result } + if (this._missing) { + var missingRet = this._missing.apply(null, [locale, key, vm, values]); + if (typeof missingRet === 'string') { + return missingRet + } + } else { + if (!this._silentTranslationWarn) { + warn( + "Cannot translate the value of keypath '" + key + "'. " + + 'Use the value of keypath as default.' + ); + } + } + return key + }; + + VueI18n.prototype._isFallbackRoot = function _isFallbackRoot (val) { + return !val && !isNull(this._root) && this._fallbackRoot + }; + + VueI18n.prototype._isSilentFallback = function _isSilentFallback (locale) { + return this._silentFallbackWarn && (this._isFallbackRoot() || locale !== this.fallbackLocale) + }; + + VueI18n.prototype._interpolate = function _interpolate ( + locale, + message, + key, + host, + interpolateMode, + values, + visitedLinkStack + ) { + if (!message) { return null } + + var pathRet = this._path.getPathValue(message, key); + if (Array.isArray(pathRet) || isPlainObject(pathRet)) { return pathRet } + + var ret; + if (isNull(pathRet)) { + /* istanbul ignore else */ + if (isPlainObject(message)) { + ret = message[key]; + if (typeof ret !== 'string') { + if (!this._silentTranslationWarn && !this._isSilentFallback(locale)) { + warn(("Value of key '" + key + "' is not a string!")); + } + return null + } + } else { + return null + } + } else { + /* istanbul ignore else */ + if (typeof pathRet === 'string') { + ret = pathRet; + } else { + if (!this._silentTranslationWarn && !this._isSilentFallback(locale)) { + warn(("Value of key '" + key + "' is not a string!")); + } + return null + } + } + + // Check for the existence of links within the translated string + if (ret.indexOf('@:') >= 0 || ret.indexOf('@.') >= 0) { + ret = this._link(locale, message, ret, host, 'raw', values, visitedLinkStack); + } + + return this._render(ret, interpolateMode, values, key) + }; + + VueI18n.prototype._link = function _link ( + locale, + message, + str, + host, + interpolateMode, + values, + visitedLinkStack + ) { + var ret = str; + + // Match all the links within the local + // We are going to replace each of + // them with its translation + var matches = ret.match(linkKeyMatcher); + for (var idx in matches) { + // ie compatible: filter custom array + // prototype method + if (!matches.hasOwnProperty(idx)) { + continue + } + var link = matches[idx]; + var linkKeyPrefixMatches = link.match(linkKeyPrefixMatcher); + var linkPrefix = linkKeyPrefixMatches[0]; + var formatterName = linkKeyPrefixMatches[1]; + + // Remove the leading @:, @.case: and the brackets + var linkPlaceholder = link.replace(linkPrefix, '').replace(bracketsMatcher, ''); + + if (visitedLinkStack.includes(linkPlaceholder)) { + { + warn(("Circular reference found. \"" + link + "\" is already visited in the chain of " + (visitedLinkStack.reverse().join(' <- ')))); + } + return ret + } + visitedLinkStack.push(linkPlaceholder); + + // Translate the link + var translated = this._interpolate( + locale, message, linkPlaceholder, host, + interpolateMode === 'raw' ? 'string' : interpolateMode, + interpolateMode === 'raw' ? undefined : values, + visitedLinkStack + ); + + if (this._isFallbackRoot(translated)) { + if (!this._silentTranslationWarn) { + warn(("Fall back to translate the link placeholder '" + linkPlaceholder + "' with root locale.")); + } + /* istanbul ignore if */ + if (!this._root) { throw Error('unexpected error') } + var root = this._root.$i18n; + translated = root._translate( + root._getMessages(), root.locale, root.fallbackLocale, + linkPlaceholder, host, interpolateMode, values + ); + } + translated = this._warnDefault( + locale, linkPlaceholder, translated, host, + Array.isArray(values) ? values : [values] + ); + if (formatters.hasOwnProperty(formatterName)) { + translated = formatters[formatterName](translated); + } + + visitedLinkStack.pop(); + + // Replace the link with the translated + ret = !translated ? ret : ret.replace(link, translated); + } + + return ret + }; + + VueI18n.prototype._render = function _render (message, interpolateMode, values, path) { + var ret = this._formatter.interpolate(message, values, path); + + // If the custom formatter refuses to work - apply the default one + if (!ret) { + ret = defaultFormatter.interpolate(message, values, path); + } + + // if interpolateMode is **not** 'string' ('row'), + // return the compiled data (e.g. ['foo', VNode, 'bar']) with formatter + return interpolateMode === 'string' ? ret.join('') : ret + }; + + VueI18n.prototype._translate = function _translate ( + messages, + locale, + fallback, + key, + host, + interpolateMode, + args + ) { + var res = + this._interpolate(locale, messages[locale], key, host, interpolateMode, args, [key]); + if (!isNull(res)) { return res } + + res = this._interpolate(fallback, messages[fallback], key, host, interpolateMode, args, [key]); + if (!isNull(res)) { + if (!this._silentTranslationWarn && !this._silentFallbackWarn) { + warn(("Fall back to translate the keypath '" + key + "' with '" + fallback + "' locale.")); + } + return res + } else { + return null + } + }; + + VueI18n.prototype._t = function _t (key, _locale, messages, host) { + var ref; + + var values = [], len = arguments.length - 4; + while ( len-- > 0 ) values[ len ] = arguments[ len + 4 ]; + if (!key) { return '' } + + var parsedArgs = parseArgs.apply(void 0, values); + var locale = parsedArgs.locale || _locale; + + var ret = this._translate( + messages, locale, this.fallbackLocale, key, + host, 'string', parsedArgs.params + ); + if (this._isFallbackRoot(ret)) { + if (!this._silentTranslationWarn && !this._silentFallbackWarn) { + warn(("Fall back to translate the keypath '" + key + "' with root locale.")); + } + /* istanbul ignore if */ + if (!this._root) { throw Error('unexpected error') } + return (ref = this._root).$t.apply(ref, [ key ].concat( values )) + } else { + return this._warnDefault(locale, key, ret, host, values) + } + }; + + VueI18n.prototype.t = function t (key) { + var ref; + + var values = [], len = arguments.length - 1; + while ( len-- > 0 ) values[ len ] = arguments[ len + 1 ]; + return (ref = this)._t.apply(ref, [ key, this.locale, this._getMessages(), null ].concat( values )) + }; + + VueI18n.prototype._i = function _i (key, locale, messages, host, values) { + var ret = + this._translate(messages, locale, this.fallbackLocale, key, host, 'raw', values); + if (this._isFallbackRoot(ret)) { + if (!this._silentTranslationWarn) { + warn(("Fall back to interpolate the keypath '" + key + "' with root locale.")); + } + if (!this._root) { throw Error('unexpected error') } + return this._root.$i18n.i(key, locale, values) + } else { + return this._warnDefault(locale, key, ret, host, [values]) + } + }; + + VueI18n.prototype.i = function i (key, locale, values) { + /* istanbul ignore if */ + if (!key) { return '' } + + if (typeof locale !== 'string') { + locale = this.locale; + } + + return this._i(key, locale, this._getMessages(), null, values) + }; + + VueI18n.prototype._tc = function _tc ( + key, + _locale, + messages, + host, + choice + ) { + var ref; + + var values = [], len = arguments.length - 5; + while ( len-- > 0 ) values[ len ] = arguments[ len + 5 ]; + if (!key) { return '' } + if (choice === undefined) { + choice = 1; + } + + var predefined = { 'count': choice, 'n': choice }; + var parsedArgs = parseArgs.apply(void 0, values); + parsedArgs.params = Object.assign(predefined, parsedArgs.params); + values = parsedArgs.locale === null ? [parsedArgs.params] : [parsedArgs.locale, parsedArgs.params]; + return this.fetchChoice((ref = this)._t.apply(ref, [ key, _locale, messages, host ].concat( values )), choice) + }; + + VueI18n.prototype.fetchChoice = function fetchChoice (message, choice) { + /* istanbul ignore if */ + if (!message && typeof message !== 'string') { return null } + var choices = message.split('|'); + + choice = this.getChoiceIndex(choice, choices.length); + if (!choices[choice]) { return message } + return choices[choice].trim() + }; + + /** + * @param choice {number} a choice index given by the input to $tc: `$tc('path.to.rule', choiceIndex)` + * @param choicesLength {number} an overall amount of available choices + * @returns a final choice index + */ + VueI18n.prototype.getChoiceIndex = function getChoiceIndex (choice, choicesLength) { + // Default (old) getChoiceIndex implementation - english-compatible + var defaultImpl = function (_choice, _choicesLength) { + _choice = Math.abs(_choice); + + if (_choicesLength === 2) { + return _choice + ? _choice > 1 + ? 1 + : 0 + : 1 + } + + return _choice ? Math.min(_choice, 2) : 0 + }; + + if (this.locale in this.pluralizationRules) { + return this.pluralizationRules[this.locale].apply(this, [choice, choicesLength]) + } else { + return defaultImpl(choice, choicesLength) + } + }; + + VueI18n.prototype.tc = function tc (key, choice) { + var ref; + + var values = [], len = arguments.length - 2; + while ( len-- > 0 ) values[ len ] = arguments[ len + 2 ]; + return (ref = this)._tc.apply(ref, [ key, this.locale, this._getMessages(), null, choice ].concat( values )) + }; + + VueI18n.prototype._te = function _te (key, locale, messages) { + var args = [], len = arguments.length - 3; + while ( len-- > 0 ) args[ len ] = arguments[ len + 3 ]; + + var _locale = parseArgs.apply(void 0, args).locale || locale; + return this._exist(messages[_locale], key) + }; + + VueI18n.prototype.te = function te (key, locale) { + return this._te(key, this.locale, this._getMessages(), locale) + }; + + VueI18n.prototype.getLocaleMessage = function getLocaleMessage (locale) { + return looseClone(this._vm.messages[locale] || {}) + }; + + VueI18n.prototype.setLocaleMessage = function setLocaleMessage (locale, message) { + if (this._warnHtmlInMessage === 'warn' || this._warnHtmlInMessage === 'error') { + this._checkLocaleMessage(locale, this._warnHtmlInMessage, message); + if (this._warnHtmlInMessage === 'error') { return } + } + this._vm.$set(this._vm.messages, locale, message); + }; + + VueI18n.prototype.mergeLocaleMessage = function mergeLocaleMessage (locale, message) { + if (this._warnHtmlInMessage === 'warn' || this._warnHtmlInMessage === 'error') { + this._checkLocaleMessage(locale, this._warnHtmlInMessage, message); + if (this._warnHtmlInMessage === 'error') { return } + } + this._vm.$set(this._vm.messages, locale, merge(this._vm.messages[locale] || {}, message)); + }; + + VueI18n.prototype.getDateTimeFormat = function getDateTimeFormat (locale) { + return looseClone(this._vm.dateTimeFormats[locale] || {}) + }; + + VueI18n.prototype.setDateTimeFormat = function setDateTimeFormat (locale, format) { + this._vm.$set(this._vm.dateTimeFormats, locale, format); + }; + + VueI18n.prototype.mergeDateTimeFormat = function mergeDateTimeFormat (locale, format) { + this._vm.$set(this._vm.dateTimeFormats, locale, merge(this._vm.dateTimeFormats[locale] || {}, format)); + }; + + VueI18n.prototype._localizeDateTime = function _localizeDateTime ( + value, + locale, + fallback, + dateTimeFormats, + key + ) { + var _locale = locale; + var formats = dateTimeFormats[_locale]; + + // fallback locale + if (isNull(formats) || isNull(formats[key])) { + if (!this._silentTranslationWarn) { + warn(("Fall back to '" + fallback + "' datetime formats from '" + locale + " datetime formats.")); + } + _locale = fallback; + formats = dateTimeFormats[_locale]; + } + + if (isNull(formats) || isNull(formats[key])) { + return null + } else { + var format = formats[key]; + var id = _locale + "__" + key; + var formatter = this._dateTimeFormatters[id]; + if (!formatter) { + formatter = this._dateTimeFormatters[id] = new Intl.DateTimeFormat(_locale, format); + } + return formatter.format(value) + } + }; + + VueI18n.prototype._d = function _d (value, locale, key) { + /* istanbul ignore if */ + if (!VueI18n.availabilities.dateTimeFormat) { + warn('Cannot format a Date value due to not supported Intl.DateTimeFormat.'); + return '' + } + + if (!key) { + return new Intl.DateTimeFormat(locale).format(value) + } + + var ret = + this._localizeDateTime(value, locale, this.fallbackLocale, this._getDateTimeFormats(), key); + if (this._isFallbackRoot(ret)) { + if (!this._silentTranslationWarn) { + warn(("Fall back to datetime localization of root: key '" + key + "' .")); + } + /* istanbul ignore if */ + if (!this._root) { throw Error('unexpected error') } + return this._root.$i18n.d(value, key, locale) + } else { + return ret || '' + } + }; + + VueI18n.prototype.d = function d (value) { + var args = [], len = arguments.length - 1; + while ( len-- > 0 ) args[ len ] = arguments[ len + 1 ]; + + var locale = this.locale; + var key = null; + + if (args.length === 1) { + if (typeof args[0] === 'string') { + key = args[0]; + } else if (isObject(args[0])) { + if (args[0].locale) { + locale = args[0].locale; + } + if (args[0].key) { + key = args[0].key; + } + } + } else if (args.length === 2) { + if (typeof args[0] === 'string') { + key = args[0]; + } + if (typeof args[1] === 'string') { + locale = args[1]; + } + } + + return this._d(value, locale, key) + }; + + VueI18n.prototype.getNumberFormat = function getNumberFormat (locale) { + return looseClone(this._vm.numberFormats[locale] || {}) + }; + + VueI18n.prototype.setNumberFormat = function setNumberFormat (locale, format) { + this._vm.$set(this._vm.numberFormats, locale, format); + }; + + VueI18n.prototype.mergeNumberFormat = function mergeNumberFormat (locale, format) { + this._vm.$set(this._vm.numberFormats, locale, merge(this._vm.numberFormats[locale] || {}, format)); + }; + + VueI18n.prototype._getNumberFormatter = function _getNumberFormatter ( + value, + locale, + fallback, + numberFormats, + key, + options + ) { + var _locale = locale; + var formats = numberFormats[_locale]; + + // fallback locale + if (isNull(formats) || isNull(formats[key])) { + if (!this._silentTranslationWarn) { + warn(("Fall back to '" + fallback + "' number formats from '" + locale + " number formats.")); + } + _locale = fallback; + formats = numberFormats[_locale]; + } + + if (isNull(formats) || isNull(formats[key])) { + return null + } else { + var format = formats[key]; + + var formatter; + if (options) { + // If options specified - create one time number formatter + formatter = new Intl.NumberFormat(_locale, Object.assign({}, format, options)); + } else { + var id = _locale + "__" + key; + formatter = this._numberFormatters[id]; + if (!formatter) { + formatter = this._numberFormatters[id] = new Intl.NumberFormat(_locale, format); + } + } + return formatter + } + }; + + VueI18n.prototype._n = function _n (value, locale, key, options) { + /* istanbul ignore if */ + if (!VueI18n.availabilities.numberFormat) { + { + warn('Cannot format a Number value due to not supported Intl.NumberFormat.'); + } + return '' + } + + if (!key) { + var nf = !options ? new Intl.NumberFormat(locale) : new Intl.NumberFormat(locale, options); + return nf.format(value) + } + + var formatter = this._getNumberFormatter(value, locale, this.fallbackLocale, this._getNumberFormats(), key, options); + var ret = formatter && formatter.format(value); + if (this._isFallbackRoot(ret)) { + if (!this._silentTranslationWarn) { + warn(("Fall back to number localization of root: key '" + key + "' .")); + } + /* istanbul ignore if */ + if (!this._root) { throw Error('unexpected error') } + return this._root.$i18n.n(value, Object.assign({}, { key: key, locale: locale }, options)) + } else { + return ret || '' + } + }; + + VueI18n.prototype.n = function n (value) { + var args = [], len = arguments.length - 1; + while ( len-- > 0 ) args[ len ] = arguments[ len + 1 ]; + + var locale = this.locale; + var key = null; + var options = null; + + if (args.length === 1) { + if (typeof args[0] === 'string') { + key = args[0]; + } else if (isObject(args[0])) { + if (args[0].locale) { + locale = args[0].locale; + } + if (args[0].key) { + key = args[0].key; + } + + // Filter out number format options only + options = Object.keys(args[0]).reduce(function (acc, key) { + var obj; + + if (numberFormatKeys.includes(key)) { + return Object.assign({}, acc, ( obj = {}, obj[key] = args[0][key], obj )) + } + return acc + }, null); + } + } else if (args.length === 2) { + if (typeof args[0] === 'string') { + key = args[0]; + } + if (typeof args[1] === 'string') { + locale = args[1]; + } + } + + return this._n(value, locale, key, options) + }; + + VueI18n.prototype._ntp = function _ntp (value, locale, key, options) { + /* istanbul ignore if */ + if (!VueI18n.availabilities.numberFormat) { + { + warn('Cannot format to parts a Number value due to not supported Intl.NumberFormat.'); + } + return [] + } + + if (!key) { + var nf = !options ? new Intl.NumberFormat(locale) : new Intl.NumberFormat(locale, options); + return nf.formatToParts(value) + } + + var formatter = this._getNumberFormatter(value, locale, this.fallbackLocale, this._getNumberFormats(), key, options); + var ret = formatter && formatter.formatToParts(value); + if (this._isFallbackRoot(ret)) { + if (!this._silentTranslationWarn) { + warn(("Fall back to format number to parts of root: key '" + key + "' .")); + } + /* istanbul ignore if */ + if (!this._root) { throw Error('unexpected error') } + return this._root.$i18n._ntp(value, locale, key, options) + } else { + return ret || [] + } + }; + + Object.defineProperties( VueI18n.prototype, prototypeAccessors ); + + var availabilities; + // $FlowFixMe + Object.defineProperty(VueI18n, 'availabilities', { + get: function get () { + if (!availabilities) { + var intlDefined = typeof Intl !== 'undefined'; + availabilities = { + dateTimeFormat: intlDefined && typeof Intl.DateTimeFormat !== 'undefined', + numberFormat: intlDefined && typeof Intl.NumberFormat !== 'undefined' + }; + } + + return availabilities + } + }); + + VueI18n.install = install; + VueI18n.version = '8.11.1'; + + return VueI18n; + +}))); diff --git a/app/vue-i18n.min.js b/app/vue-i18n.min.js new file mode 100644 index 0000000..d7af519 --- /dev/null +++ b/app/vue-i18n.min.js @@ -0,0 +1,6 @@ +/*! + * vue-i18n v8.11.1 + * (c) 2019 kazuya kawaguchi + * Released under the MIT License. + */ +var t,e;t=this,e=function(){"use strict";var t=["style","currency","currencyDisplay","useGrouping","minimumIntegerDigits","minimumFractionDigits","maximumFractionDigits","minimumSignificantDigits","maximumSignificantDigits","localeMatcher","formatMatcher"];function e(t,e){"undefined"!=typeof console&&(console.warn("[vue-i18n] "+t),e&&console.warn(e.stack))}function n(t){return null!==t&&"object"==typeof t}var r=Object.prototype.toString,i="[object Object]";function a(t){return r.call(t)===i}function o(t){return null==t}function s(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];var r=null,i=null;return 1===t.length?n(t[0])||Array.isArray(t[0])?i=t[0]:"string"==typeof t[0]&&(r=t[0]):2===t.length&&("string"==typeof t[0]&&(r=t[0]),(n(t[1])||Array.isArray(t[1]))&&(i=t[1])),{locale:r,params:i}}function l(t){return JSON.parse(JSON.stringify(t))}var c=Object.prototype.hasOwnProperty;function u(t,e){return c.call(t,e)}function f(t){for(var e=arguments,r=Object(t),i=1;i0;)e[n]=arguments[n+1];var r=this.$i18n;return r._t.apply(r,[t,r.locale,r._getMessages(),this].concat(e))},t.prototype.$tc=function(t,e){for(var n=[],r=arguments.length-2;r-- >0;)n[r]=arguments[r+2];var i=this.$i18n;return i._tc.apply(i,[t,i.locale,i._getMessages(),this,e].concat(n))},t.prototype.$te=function(t,e){var n=this.$i18n;return n._te(t,n.locale,n._getMessages(),e)},t.prototype.$d=function(t){for(var e,n=[],r=arguments.length-1;r-- >0;)n[r]=arguments[r+1];return(e=this.$i18n).d.apply(e,[t].concat(n))},t.prototype.$n=function(t){for(var e,n=[],r=arguments.length-1;r-- >0;)n[r]=arguments[r+1];return(e=this.$i18n).n.apply(e,[t].concat(n))}}(p),p.mixin(m),p.directive("t",{bind:v,update:y,unbind:b}),p.component(g.name,g),p.component(_.name,_),p.config.optionMergeStrategies.i18n=function(t,e){return void 0===e?t:e}}var F=function(){this._caches=Object.create(null)};F.prototype.interpolate=function(t,e){if(!e)return[t];var r=this._caches[t];return r||(r=function(t){var e=[],n=0,r="";for(;n0)f--,u=C,h[L]();else{if(f=0,!1===(n=V(n)))return!1;h[I]()}};null!==u;)if("\\"!==(e=t[++c])||!p()){if(i=R(e),(a=(s=S[u])[i]||s.else||N)===N)return;if(u=a[0],(o=h[a[1]])&&(r=void 0===(r=a[2])?e:r,!1===o()))return;if(u===A)return l}}(t))&&(this._cache[t]=e),e||[]},E.prototype.getPathValue=function(t,e){if(!n(t))return null;var r=this.parsePath(e);if(0===r.length)return null;for(var i=r.length,a=t,o=0;o/,J=/(?:@(?:\.[a-z]+)?:(?:[\w\-_|.]+|\([\w\-_|.]+\)))/g,U=/^@(?:\.([a-z]+))?:/,q=/[()]/g,G={upper:function(t){return t.toLocaleUpperCase()},lower:function(t){return t.toLocaleLowerCase()}},X=new F,Z=function(t){var e=this;void 0===t&&(t={}),!p&&"undefined"!=typeof window&&window.Vue&&k(window.Vue);var n=t.locale||"en-US",r=t.fallbackLocale||"en-US",i=t.messages||{},a=t.dateTimeFormats||{},s=t.numberFormats||{};this._vm=null,this._formatter=t.formatter||X,this._missing=t.missing||null,this._root=t.root||null,this._sync=void 0===t.sync||!!t.sync,this._fallbackRoot=void 0===t.fallbackRoot||!!t.fallbackRoot,this._silentTranslationWarn=void 0!==t.silentTranslationWarn&&!!t.silentTranslationWarn,this._silentFallbackWarn=void 0!==t.silentFallbackWarn&&!!t.silentFallbackWarn,this._dateTimeFormatters={},this._numberFormatters={},this._path=new E,this._dataListeners=[],this._preserveDirectiveContent=void 0!==t.preserveDirectiveContent&&!!t.preserveDirectiveContent,this.pluralizationRules=t.pluralizationRules||{},this._warnHtmlInMessage=t.warnHtmlInMessage||"off",this._exist=function(t,n){return!(!t||!n)&&(!o(e._path.getPathValue(t,n))||!!t[n])},"warn"!==this._warnHtmlInMessage&&"error"!==this._warnHtmlInMessage||Object.keys(i).forEach(function(t){e._checkLocaleMessage(t,e._warnHtmlInMessage,i[t])}),this._initVM({locale:n,fallbackLocale:r,messages:i,dateTimeFormats:a,numberFormats:s})},B={vm:{configurable:!0},messages:{configurable:!0},dateTimeFormats:{configurable:!0},numberFormats:{configurable:!0},availableLocales:{configurable:!0},locale:{configurable:!0},fallbackLocale:{configurable:!0},missing:{configurable:!0},formatter:{configurable:!0},silentTranslationWarn:{configurable:!0},silentFallbackWarn:{configurable:!0},preserveDirectiveContent:{configurable:!0},warnHtmlInMessage:{configurable:!0}};return Z.prototype._checkLocaleMessage=function(t,n,r){var i=function(t,n,r,o){if(a(r))Object.keys(r).forEach(function(e){var s=r[e];a(s)?(o.push(e),o.push("."),i(t,n,s,o),o.pop(),o.pop()):(o.push(e),i(t,n,s,o),o.pop())});else if(Array.isArray(r))r.forEach(function(e,r){a(e)?(o.push("["+r+"]"),o.push("."),i(t,n,e,o),o.pop(),o.pop()):(o.push("["+r+"]"),i(t,n,e,o),o.pop())});else if("string"==typeof r){if(z.test(r)){var s="Detected HTML in message '"+r+"' of keypath '"+o.join("")+"' at '"+n+"'. Consider component interpolation with '' to avoid XSS. See https://bit.ly/2ZqJzkp";"warn"===t?e(s):"error"===t&&function(t,e){"undefined"!=typeof console&&(console.error("[vue-i18n] "+t),e&&console.error(e.stack))}(s)}}};i(n,t,r,[])},Z.prototype._initVM=function(t){var e=p.config.silent;p.config.silent=!0,this._vm=new p({data:t}),p.config.silent=e},Z.prototype.destroyVM=function(){this._vm.$destroy()},Z.prototype.subscribeDataChanging=function(t){this._dataListeners.push(t)},Z.prototype.unsubscribeDataChanging=function(t){!function(t,e){if(t.length){var n=t.indexOf(e);if(n>-1)t.splice(n,1)}}(this._dataListeners,t)},Z.prototype.watchI18nData=function(){var t=this;return this._vm.$watch("$data",function(){for(var e=t._dataListeners.length;e--;)p.nextTick(function(){t._dataListeners[e]&&t._dataListeners[e].$forceUpdate()})},{deep:!0})},Z.prototype.watchLocale=function(){if(!this._sync||!this._root)return null;var t=this._vm;return this._root.$i18n.vm.$watch("locale",function(e){t.$set(t,"locale",e),t.$forceUpdate()},{immediate:!0})},B.vm.get=function(){return this._vm},B.messages.get=function(){return l(this._getMessages())},B.dateTimeFormats.get=function(){return l(this._getDateTimeFormats())},B.numberFormats.get=function(){return l(this._getNumberFormats())},B.availableLocales.get=function(){return Object.keys(this.messages).sort()},B.locale.get=function(){return this._vm.locale},B.locale.set=function(t){this._vm.$set(this._vm,"locale",t)},B.fallbackLocale.get=function(){return this._vm.fallbackLocale},B.fallbackLocale.set=function(t){this._vm.$set(this._vm,"fallbackLocale",t)},B.missing.get=function(){return this._missing},B.missing.set=function(t){this._missing=t},B.formatter.get=function(){return this._formatter},B.formatter.set=function(t){this._formatter=t},B.silentTranslationWarn.get=function(){return this._silentTranslationWarn},B.silentTranslationWarn.set=function(t){this._silentTranslationWarn=t},B.silentFallbackWarn.get=function(){return this._silentFallbackWarn},B.silentFallbackWarn.set=function(t){this._silentFallbackWarn=t},B.preserveDirectiveContent.get=function(){return this._preserveDirectiveContent},B.preserveDirectiveContent.set=function(t){this._preserveDirectiveContent=t},B.warnHtmlInMessage.get=function(){return this._warnHtmlInMessage},B.warnHtmlInMessage.set=function(t){var e=this,n=this._warnHtmlInMessage;if(this._warnHtmlInMessage=t,n!==t&&("warn"===t||"error"===t)){var r=this._getMessages();Object.keys(r).forEach(function(t){e._checkLocaleMessage(t,e._warnHtmlInMessage,r[t])})}},Z.prototype._getMessages=function(){return this._vm.messages},Z.prototype._getDateTimeFormats=function(){return this._vm.dateTimeFormats},Z.prototype._getNumberFormats=function(){return this._vm.numberFormats},Z.prototype._warnDefault=function(t,e,n,r,i){if(!o(n))return n;if(this._missing){var a=this._missing.apply(null,[t,e,r,i]);if("string"==typeof a)return a}return e},Z.prototype._isFallbackRoot=function(t){return!t&&!o(this._root)&&this._fallbackRoot},Z.prototype._isSilentFallback=function(t){return this._silentFallbackWarn&&(this._isFallbackRoot()||t!==this.fallbackLocale)},Z.prototype._interpolate=function(t,e,n,r,i,s,l){if(!e)return null;var c,u=this._path.getPathValue(e,n);if(Array.isArray(u)||a(u))return u;if(o(u)){if(!a(e))return null;if("string"!=typeof(c=e[n]))return null}else{if("string"!=typeof u)return null;c=u}return(c.indexOf("@:")>=0||c.indexOf("@.")>=0)&&(c=this._link(t,e,c,r,"raw",s,l)),this._render(c,i,s,n)},Z.prototype._link=function(t,e,n,r,i,a,o){var s=n,l=s.match(J);for(var c in l)if(l.hasOwnProperty(c)){var u=l[c],f=u.match(U),h=f[0],p=f[1],m=u.replace(h,"").replace(q,"");if(o.includes(m))return s;o.push(m);var g=this._interpolate(t,e,m,r,"raw"===i?"string":i,"raw"===i?void 0:a,o);if(this._isFallbackRoot(g)){if(!this._root)throw Error("unexpected error");var _=this._root.$i18n;g=_._translate(_._getMessages(),_.locale,_.fallbackLocale,m,r,i,a)}g=this._warnDefault(t,m,g,r,Array.isArray(a)?a:[a]),G.hasOwnProperty(p)&&(g=G[p](g)),o.pop(),s=g?s.replace(u,g):s}return s},Z.prototype._render=function(t,e,n,r){var i=this._formatter.interpolate(t,n,r);return i||(i=X.interpolate(t,n,r)),"string"===e?i.join(""):i},Z.prototype._translate=function(t,e,n,r,i,a,s){var l=this._interpolate(e,t[e],r,i,a,s,[r]);return o(l)&&o(l=this._interpolate(n,t[n],r,i,a,s,[r]))?null:l},Z.prototype._t=function(t,e,n,r){for(var i,a=[],o=arguments.length-4;o-- >0;)a[o]=arguments[o+4];if(!t)return"";var l=s.apply(void 0,a),c=l.locale||e,u=this._translate(n,c,this.fallbackLocale,t,r,"string",l.params);if(this._isFallbackRoot(u)){if(!this._root)throw Error("unexpected error");return(i=this._root).$t.apply(i,[t].concat(a))}return this._warnDefault(c,t,u,r,a)},Z.prototype.t=function(t){for(var e,n=[],r=arguments.length-1;r-- >0;)n[r]=arguments[r+1];return(e=this)._t.apply(e,[t,this.locale,this._getMessages(),null].concat(n))},Z.prototype._i=function(t,e,n,r,i){var a=this._translate(n,e,this.fallbackLocale,t,r,"raw",i);if(this._isFallbackRoot(a)){if(!this._root)throw Error("unexpected error");return this._root.$i18n.i(t,e,i)}return this._warnDefault(e,t,a,r,[i])},Z.prototype.i=function(t,e,n){return t?("string"!=typeof e&&(e=this.locale),this._i(t,e,this._getMessages(),null,n)):""},Z.prototype._tc=function(t,e,n,r,i){for(var a,o=[],l=arguments.length-5;l-- >0;)o[l]=arguments[l+5];if(!t)return"";void 0===i&&(i=1);var c={count:i,n:i},u=s.apply(void 0,o);return u.params=Object.assign(c,u.params),o=null===u.locale?[u.params]:[u.locale,u.params],this.fetchChoice((a=this)._t.apply(a,[t,e,n,r].concat(o)),i)},Z.prototype.fetchChoice=function(t,e){if(!t&&"string"!=typeof t)return null;var n=t.split("|");return n[e=this.getChoiceIndex(e,n.length)]?n[e].trim():t},Z.prototype.getChoiceIndex=function(t,e){var n,r;return this.locale in this.pluralizationRules?this.pluralizationRules[this.locale].apply(this,[t,e]):(n=t,r=e,n=Math.abs(n),2===r?n?n>1?1:0:1:n?Math.min(n,2):0)},Z.prototype.tc=function(t,e){for(var n,r=[],i=arguments.length-2;i-- >0;)r[i]=arguments[i+2];return(n=this)._tc.apply(n,[t,this.locale,this._getMessages(),null,e].concat(r))},Z.prototype._te=function(t,e,n){for(var r=[],i=arguments.length-3;i-- >0;)r[i]=arguments[i+3];var a=s.apply(void 0,r).locale||e;return this._exist(n[a],t)},Z.prototype.te=function(t,e){return this._te(t,this.locale,this._getMessages(),e)},Z.prototype.getLocaleMessage=function(t){return l(this._vm.messages[t]||{})},Z.prototype.setLocaleMessage=function(t,e){("warn"!==this._warnHtmlInMessage&&"error"!==this._warnHtmlInMessage||(this._checkLocaleMessage(t,this._warnHtmlInMessage,e),"error"!==this._warnHtmlInMessage))&&this._vm.$set(this._vm.messages,t,e)},Z.prototype.mergeLocaleMessage=function(t,e){("warn"!==this._warnHtmlInMessage&&"error"!==this._warnHtmlInMessage||(this._checkLocaleMessage(t,this._warnHtmlInMessage,e),"error"!==this._warnHtmlInMessage))&&this._vm.$set(this._vm.messages,t,f(this._vm.messages[t]||{},e))},Z.prototype.getDateTimeFormat=function(t){return l(this._vm.dateTimeFormats[t]||{})},Z.prototype.setDateTimeFormat=function(t,e){this._vm.$set(this._vm.dateTimeFormats,t,e)},Z.prototype.mergeDateTimeFormat=function(t,e){this._vm.$set(this._vm.dateTimeFormats,t,f(this._vm.dateTimeFormats[t]||{},e))},Z.prototype._localizeDateTime=function(t,e,n,r,i){var a=e,s=r[a];if((o(s)||o(s[i]))&&(s=r[a=n]),o(s)||o(s[i]))return null;var l=s[i],c=a+"__"+i,u=this._dateTimeFormatters[c];return u||(u=this._dateTimeFormatters[c]=new Intl.DateTimeFormat(a,l)),u.format(t)},Z.prototype._d=function(t,e,n){if(!n)return new Intl.DateTimeFormat(e).format(t);var r=this._localizeDateTime(t,e,this.fallbackLocale,this._getDateTimeFormats(),n);if(this._isFallbackRoot(r)){if(!this._root)throw Error("unexpected error");return this._root.$i18n.d(t,n,e)}return r||""},Z.prototype.d=function(t){for(var e=[],r=arguments.length-1;r-- >0;)e[r]=arguments[r+1];var i=this.locale,a=null;return 1===e.length?"string"==typeof e[0]?a=e[0]:n(e[0])&&(e[0].locale&&(i=e[0].locale),e[0].key&&(a=e[0].key)):2===e.length&&("string"==typeof e[0]&&(a=e[0]),"string"==typeof e[1]&&(i=e[1])),this._d(t,i,a)},Z.prototype.getNumberFormat=function(t){return l(this._vm.numberFormats[t]||{})},Z.prototype.setNumberFormat=function(t,e){this._vm.$set(this._vm.numberFormats,t,e)},Z.prototype.mergeNumberFormat=function(t,e){this._vm.$set(this._vm.numberFormats,t,f(this._vm.numberFormats[t]||{},e))},Z.prototype._getNumberFormatter=function(t,e,n,r,i,a){var s=e,l=r[s];if((o(l)||o(l[i]))&&(l=r[s=n]),o(l)||o(l[i]))return null;var c,u=l[i];if(a)c=new Intl.NumberFormat(s,Object.assign({},u,a));else{var f=s+"__"+i;(c=this._numberFormatters[f])||(c=this._numberFormatters[f]=new Intl.NumberFormat(s,u))}return c},Z.prototype._n=function(t,e,n,r){if(!Z.availabilities.numberFormat)return"";if(!n)return(r?new Intl.NumberFormat(e,r):new Intl.NumberFormat(e)).format(t);var i=this._getNumberFormatter(t,e,this.fallbackLocale,this._getNumberFormats(),n,r),a=i&&i.format(t);if(this._isFallbackRoot(a)){if(!this._root)throw Error("unexpected error");return this._root.$i18n.n(t,Object.assign({},{key:n,locale:e},r))}return a||""},Z.prototype.n=function(e){for(var r=[],i=arguments.length-1;i-- >0;)r[i]=arguments[i+1];var a=this.locale,o=null,s=null;return 1===r.length?"string"==typeof r[0]?o=r[0]:n(r[0])&&(r[0].locale&&(a=r[0].locale),r[0].key&&(o=r[0].key),s=Object.keys(r[0]).reduce(function(e,n){var i;return t.includes(n)?Object.assign({},e,((i={})[n]=r[0][n],i)):e},null)):2===r.length&&("string"==typeof r[0]&&(o=r[0]),"string"==typeof r[1]&&(a=r[1])),this._n(e,a,o,s)},Z.prototype._ntp=function(t,e,n,r){if(!Z.availabilities.numberFormat)return[];if(!n)return(r?new Intl.NumberFormat(e,r):new Intl.NumberFormat(e)).formatToParts(t);var i=this._getNumberFormatter(t,e,this.fallbackLocale,this._getNumberFormats(),n,r),a=i&&i.formatToParts(t);if(this._isFallbackRoot(a)){if(!this._root)throw Error("unexpected error");return this._root.$i18n._ntp(t,e,n,r)}return a||[]},Object.defineProperties(Z.prototype,B),Object.defineProperty(Z,"availabilities",{get:function(){if(!P){var t="undefined"!=typeof Intl;P={dateTimeFormat:t&&void 0!==Intl.DateTimeFormat,numberFormat:t&&void 0!==Intl.NumberFormat}}return P}}),Z.install=k,Z.version="8.11.1",Z},"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.VueI18n=e(); \ No newline at end of file From 2f178a1231761e9661c5e9b726a60b4f1ea8c747 Mon Sep 17 00:00:00 2001 From: Alexander Danilov Date: Wed, 3 Jul 2019 00:12:46 +0300 Subject: [PATCH 10/15] Localization for extension pages --- _locales/en/messages.json | 50 ++++++++++++++++++++++++++++++++++++++- _locales/ru/messages.json | 48 +++++++++++++++++++++++++++++++++++++ app/jsview/jsview.css | 5 +++- app/jsview/jsview.js | 11 ++++++--- app/jsview/main.html | 4 ++-- app/main/choose_file.js | 21 ++++++++++------ app/main/main.html | 6 ++--- app/popup/popup.html | 36 ++++++++++++++-------------- app/popup/popup.js | 28 +++++++++++----------- scripts/helpers.js | 2 +- 10 files changed, 161 insertions(+), 50 deletions(-) diff --git a/_locales/en/messages.json b/_locales/en/messages.json index 70fc0d8..09e9a3a 100644 --- a/_locales/en/messages.json +++ b/_locales/en/messages.json @@ -93,6 +93,54 @@ "message": "Save" }, "pluginDelete": { - "message": "Удалить" + "message": "Delete" + }, + "notValidUserScript": { + "message": "$PLUGIN_NAME$ is not a valid UserScript.", + "placeholders": { + "plugin_name": { + "content": "$1", + "example": "awesome-plugin.user.js" + } + } + }, + "addedUserScript": { + "message": "$PLUGIN_NAME$ has been added to the External category.", + "placeholders": { + "plugin_name": { + "content": "$1", + "example": "awesome-plugin.user.js" + } + } + }, + "addressNotAvailable": { + "message": "Address is not available" + }, + "errorReadingFile": { + "message": "An error occurred while reading $PLUGIN_NAME$ file.", + "placeholders": { + "plugin_name": { + "content": "$1", + "example": "awesome-plugin.user.js" + } + } + }, + "or": { + "message": "or" + }, + "dropJSHereOrClick": { + "message": "Drop .js files here or click to upload." + }, + "willBeOverwrittenByNewPlugin": { + "message": "Plugin with the same ID will be overwritten by the new plugin." + }, + "clickInstallPlugin": { + "message": "This is a IITC plugin. Click install to start using it." + }, + "install": { + "message": "Install" + }, + "loading": { + "message": "Loading…" } } \ No newline at end of file diff --git a/_locales/ru/messages.json b/_locales/ru/messages.json index 9d2a2d7..da889a7 100644 --- a/_locales/ru/messages.json +++ b/_locales/ru/messages.json @@ -91,5 +91,53 @@ }, "pluginDelete": { "message": "Удалить" + }, + "notValidUserScript": { + "message": "$PLUGIN_NAME$ не является валидным пользовательским скриптом.", + "placeholders": { + "plugin_name": { + "content": "$1", + "example": "awesome-plugin.user.js" + } + } + }, + "addedUserScript": { + "message": "$PLUGIN_NAME$ добавлен в категорию Сторонние.", + "placeholders": { + "plugin_name": { + "content": "$1", + "example": "awesome-plugin.user.js" + } + } + }, + "addressNotAvailable": { + "message": "Адрес недоступен" + }, + "errorReadingFile": { + "message": "Произошла ошибка при чтении файла $PLUGIN_NAME$.", + "placeholders": { + "plugin_name": { + "content": "$1", + "example": "awesome-plugin.user.js" + } + } + }, + "or": { + "message": "или" + }, + "dropJSHereOrClick": { + "message": "Выберите .js файл или переместите его сюда." + }, + "willBeOverwrittenByNewPlugin": { + "message": "При совпадении ID плагин будет перезаписан новым." + }, + "clickInstallPlugin": { + "message": "Это плагин IITC. Установите, чтобы начать использовать." + }, + "install": { + "message": "Установить" + }, + "loading": { + "message": "Загрузка…" } } \ No newline at end of file diff --git a/app/jsview/jsview.css b/app/jsview/jsview.css index b69cc6b..5bcdbd4 100644 --- a/app/jsview/jsview.css +++ b/app/jsview/jsview.css @@ -26,7 +26,7 @@ h3 { #addUserScript { padding: 1.8em; margin: auto; - width: 600px; + width: 620px; height: 68px; font-size: 18px; transition: opacity .1s linear; @@ -34,6 +34,9 @@ h3 { #addUserScript.hide { opacity: 0; } +#addUserScript .col { + padding-right: 10px; +} pre { margin: 1em; diff --git a/app/jsview/jsview.js b/app/jsview/jsview.js index 790b778..8a117da 100644 --- a/app/jsview/jsview.js +++ b/app/jsview/jsview.js @@ -1,5 +1,5 @@ function escapeHtml(text) { - var map = { + let map = { '&': '&', '<': '<', '>': '>', @@ -11,6 +11,11 @@ function escapeHtml(text) { } document.addEventListener('DOMContentLoaded', async function(){ + document.title = _('extName'); + document.getElementById('clickInstallPlugin').innerText = _('clickInstallPlugin'); + document.getElementById('install').innerText = _('install'); + document.getElementById('code').innerText = _('loading'); + let url = new URL(window.location.href).searchParams.get("url"); let code = await ajaxGet(url); @@ -28,7 +33,7 @@ document.addEventListener('DOMContentLoaded', async function(){ const btn_install = document.getElementById("install"); btn_install.addEventListener("click", function () { - let message = filename + " has been added to the UserScripts category.\n"; + let message = _("addedUserScript", filename)+"\n"; meta['filename'] = filename; let script = [{'meta': meta, 'code': code}]; @@ -39,6 +44,6 @@ document.addEventListener('DOMContentLoaded', async function(){ } } else { - alert('Address is not available'); + document.getElementById('code').innerText = _('addressNotAvailable'); } }); \ No newline at end of file diff --git a/app/jsview/main.html b/app/jsview/main.html index 0893045..1e1694a 100644 --- a/app/jsview/main.html +++ b/app/jsview/main.html @@ -12,12 +12,12 @@

- This is a IITC plugin. Click install to start using it. + This is a IITC plugin. Click install to start using it.
Install
-
Loading...
+
Loading…
diff --git a/app/main/choose_file.js b/app/main/choose_file.js index be66954..9a70ef8 100644 --- a/app/main/choose_file.js +++ b/app/main/choose_file.js @@ -32,9 +32,9 @@ async function loadByUrl() { let filename = url.substr(url.lastIndexOf("/")+1); if (meta === {} || meta['id'] === undefined) { - message += filename+" is not a valid UserScript.\n"; + message += _("notValidUserScript", filename)+"\n"; } else { - message += filename+" has been added to the UserScripts category.\n"; + message += _("addedUserScript", filename)+"\n"; meta['filename'] = filename; scripts.push({'meta': meta, 'code': code}) } @@ -42,7 +42,7 @@ async function loadByUrl() { alert(message); chrome.runtime.sendMessage({'type': "addUserScripts", 'scripts': scripts}); } else { - alert('Address is not available'); + alert(_("addressNotAvailable")); } url_input.value = ''; url_button.classList.add('active'); @@ -75,14 +75,14 @@ const processingFile = async (fileList) => { const meta = parse_meta(code); if (meta === {} || meta['id'] === undefined) { - message += file['name']+" is not a valid UserScript.\n"; + message += _("notValidUserScript", file['name'])+"\n"; } else { - message += meta['name']+" has been added to the UserScripts category.\n"; + message += _("addedUserScript", meta['name'])+"\n"; meta['filename'] = file['name']; scripts.push({'meta': meta, 'code': code}) } } catch (e) { - message += "An error occurred while reading "+file['name']+" file.\n"; + message += _("errorReadingFile", file['name'])+"\n"; } } @@ -116,4 +116,11 @@ function dragenter(e) { function dragover(e) { e.stopPropagation(); e.preventDefault(); -} \ No newline at end of file +} + +window.addEventListener('DOMContentLoaded', function() { + document.title = _('extName'); + document.getElementById('or').innerText = _('or'); + document.getElementById('dropJSHereOrClick').innerHTML = _('dropJSHereOrClick'); + document.getElementById('willBeOverwrittenByNewPlugin').innerText = _('willBeOverwrittenByNewPlugin'); +}) \ No newline at end of file diff --git a/app/main/main.html b/app/main/main.html index a1fd7d4..0245d62 100644 --- a/app/main/main.html +++ b/app/main/main.html @@ -19,11 +19,11 @@ -

— or —

+

or

- Drop .js files here or click to upload. - UserScript with the same ID will be overwritten by the new UserScript. + Drop .js files here or click to upload. + Plugin with the same ID will be overwritten by the new plugin.
diff --git a/app/popup/popup.html b/app/popup/popup.html index 6f06c90..a7cc7a8 100644 --- a/app/popup/popup.html +++ b/app/popup/popup.html @@ -35,24 +35,24 @@ keyboard_arrow_right
- {{ i18n('noData') }} + {{ _('noData') }}
-
add{{ i18n('addExternalPlugin') }}
+
add{{ _('addExternalPlugin') }}
-
link{{ i18n('iitcHomePage') }}
-
announcement{{ i18n('iitcTelegram') }}
-
developer_board{{ i18n('iitcGithub') }}
+
link{{ _('iitcHomePage') }}
+
announcement{{ _('iitcTelegram') }}
+
developer_board{{ _('iitcGithub') }}
- keyboard_arrow_left{{ i18n('iitcButtonOptions') }}
{{ i18n('updateNow') }}
+ keyboard_arrow_left{{ _('iitcButtonOptions') }}
{{ _('updateNow') }}
-

{{ i18n('choosingUpdateChannel') }}

+

{{ _('choosingUpdateChannel') }}

@@ -60,17 +60,17 @@

{{ i18n('choosingUpdateChannel') }}

-

{{ i18n('updateFrequency') }}

+

{{ _('updateFrequency') }}

-
{{ i18n('release') }}:
+
{{ _('release') }}:
-
{{ i18n('testBuilds') }}:
+
{{ _('testBuilds') }}:
@@ -80,11 +80,11 @@

{{ i18n('updateFrequency') }}

-

{{ i18n('updateExternalFrequency') }}

+

{{ _('updateExternalFrequency') }}

-
{{ i18n('anyChannel') }}
+
{{ _('anyChannel') }}
@@ -94,9 +94,9 @@

{{ i18n('updateExternalFrequency') }}

-

{{ i18n('localServerURL') }}

+

{{ _('localServerURL') }}

- +
@@ -108,15 +108,15 @@

{{ i18n('localServerURL') }}

{{ plugin.name }} - {{ i18n('badgeExternal') }} + {{ _('badgeExternal') }} {{ pluginIcon(plugin) }}
-
{{ i18n('noData') }}
+
{{ _('noData') }}
diff --git a/app/popup/popup.js b/app/popup/popup.js index 45b3834..1eae9fc 100644 --- a/app/popup/popup.js +++ b/app/popup/popup.js @@ -1,13 +1,13 @@ let updateChannelsData = { - release: {name: i18n('release'), value: 'release'}, - test: {name: i18n('testBuilds'), value: 'test',}, - local: {name: i18n('localServer'), value: 'local'} + release: {name: _('release'), value: 'release'}, + test: {name: _('testBuilds'), value: 'test',}, + local: {name: _('localServer'), value: 'local'} }; let updateIntervalsData = [ - {name: i18n('every6hours'), value: '6'}, - {name: i18n('every12hours'), value: '12'}, - {name: i18n('everyDay'), value: '24'}, - {name: i18n('everyWeek'), value: '168'} + {name: _('every6hours'), value: '6'}, + {name: _('every12hours'), value: '12'}, + {name: _('everyDay'), value: '24'}, + {name: _('everyWeek'), value: '168'} ]; let app = new Vue({ @@ -69,12 +69,12 @@ let app = new Vue({ this.plugins[plugin_id].status = action; this.plugins[plugin_id].icon = 'toggle_'+action; - showMessage(this.i18n("needRebootIntel")); + showMessage(this._("needRebootIntel")); chrome.runtime.sendMessage({'type': "managePlugin", 'id': plugin_id, 'category': this.category_name, 'action': action}); }, 'deletePlugin': function (plugin_id) { delete this.plugins[plugin_id]; - showMessage(this.i18n("needRebootIntel")); + showMessage(this._("needRebootIntel")); chrome.runtime.sendMessage({'type': "managePlugin", 'id': plugin_id, 'category': this.category_name, 'action': "delete"}); }, 'savePlugin': function (id) { @@ -90,7 +90,7 @@ let app = new Vue({ }, () => { this.forceUpdate() }); - showMessage(this.i18n("updateInProgress")); + showMessage(this._("updateInProgress")); }, 'changeUpdateCheckInterval': function (type) { let key = type+'_update_check_interval'; @@ -99,12 +99,12 @@ let app = new Vue({ chrome.storage.local.set(setData, () => { chrome.runtime.sendMessage({'type': (type === 'external') ? "externalUpdate" : "safeUpdate"}); - showMessage(this.i18n("changesApplied")); + showMessage(this._("changesApplied")); }); }, 'forceUpdate': function () { chrome.runtime.sendMessage({'type': "forceFullUpdate"}); - showMessage(this.i18n("updateInProgress")); + showMessage(this._("updateInProgress")); }, 'changeLocalServer': async function () { let host = event.target.value; @@ -118,8 +118,8 @@ let app = new Vue({ }); } }, - 'i18n': (msg, arg) => { - return i18n(msg, arg) + '_': (msg, arg) => { + return _(msg, arg) } } diff --git a/scripts/helpers.js b/scripts/helpers.js index 1c76008..45f5608 100644 --- a/scripts/helpers.js +++ b/scripts/helpers.js @@ -1,4 +1,4 @@ -function i18n(msg, arg) { +function _(msg, arg) { return chrome.i18n.getMessage(msg, arg) } From 6e0fc598e4ac967804cd0c69461288679672feb3 Mon Sep 17 00:00:00 2001 From: Alexander Danilov Date: Wed, 3 Jul 2019 19:28:05 +0300 Subject: [PATCH 11/15] Update for new location of meta files --- app/popup/popup.html | 4 +- app/popup/popup.js | 28 +++++----- scripts/background.js | 16 +++--- scripts/defaults.js | 13 +++-- scripts/helpers.js | 3 +- scripts/updater.js | 115 ++++++++++++++++-------------------------- 6 files changed, 74 insertions(+), 105 deletions(-) diff --git a/app/popup/popup.html b/app/popup/popup.html index a7cc7a8..78473c5 100644 --- a/app/popup/popup.html +++ b/app/popup/popup.html @@ -29,7 +29,7 @@
-
+
{{ cat.name }} {{ cat.count_plugins_active }} / {{ cat.count_plugins }} keyboard_arrow_right @@ -54,7 +54,7 @@

{{ _('choosingUpdateChannel') }}

- +

diff --git a/app/popup/popup.js b/app/popup/popup.js index 1eae9fc..3ecd71d 100644 --- a/app/popup/popup.js +++ b/app/popup/popup.js @@ -16,7 +16,7 @@ let app = new Vue({ 'IITC_is_enabled': true, 'categories': {}, 'plugins': {}, - 'updateChannel': 'release', + 'channel': 'release', 'updateChannels': updateChannelsData, 'updateIntervals': updateIntervalsData, 'release_update_check_interval': 24, @@ -59,7 +59,7 @@ let app = new Vue({ this.plugins = this.categories[category_name]['plugins']; }, 'pluginTitle': function (plugin) { - return ((this.category_name === 'UserScripts') ? '[v'+plugin['version']+'] ' : '') + plugin['desc']; + return ((this.category_name === 'UserScripts') ? '[v'+plugin['version']+'] ' : '') + plugin['description']; }, 'pluginIcon': function (plugin) { return (plugin['status'] === 'user') ? 'close' : 'toggle_' + plugin['status']; @@ -78,15 +78,15 @@ let app = new Vue({ chrome.runtime.sendMessage({'type': "managePlugin", 'id': plugin_id, 'category': this.category_name, 'action': "delete"}); }, 'savePlugin': function (id) { - chrome.storage.local.get([this.updateChannel+"_plugins_user"], (data) => { - let plugin = data[this.updateChannel+"_plugins_user"][id]; + chrome.storage.local.get([this.channel+"_plugins_user"], (data) => { + let plugin = data[this.channel+"_plugins_user"][id]; saveJS(plugin['code'], plugin['filename']); }); }, 'changeUpdateChannel': function (event) { - let updateChannel = event.target.value; + let channel = event.target.value; chrome.storage.local.set({ - 'update_channel': updateChannel + 'channel': channel }, () => { this.forceUpdate() }); @@ -110,9 +110,9 @@ let app = new Vue({ let host = event.target.value; if (await checkStatusLocalServer(host)) { chrome.storage.local.set({ - 'local_server_host': "http://" + host + 'local_server_host': host }, function () { - if (this.updateChannel === 'local') { + if (this.channel === 'local') { this.forceUpdate() } }); @@ -150,18 +150,18 @@ chrome.runtime.onMessage.addListener(function(request) { chrome.storage.local.get([ "IITC_is_enabled", - "update_channel", + "channel", "local_server_host", "release_plugins", "test_plugins", "local_plugins", "release_update_check_interval", "test_update_check_interval", "external_update_check_interval" ], function(data) { - if (data.update_channel) { - app.$data.updateChannel = data.update_channel; + if (data.channel) { + app.$data.channel = data.channel; } // initialize categories - app.$data.categories = data[app.$data.updateChannel+'_plugins']; + app.$data.categories = data[app.$data.channel+'_plugins']; // initialize toggleIITC let status = data.IITC_is_enabled; @@ -177,14 +177,14 @@ chrome.storage.local.get([ }); if (data.local_server_host) { - app.$data.localServerHost = data.local_server_host.replace("http://", ""); + app.$data.localServerHost = data.local_server_host; } }); chrome.storage.onChanged.addListener(function(changes, namespace) { for (let key in changes) { - if (key === app.$data.updateChannel+"_plugins") { + if (key === app.$data.channel+"_plugins") { app.$data.categories = {}; app.$data.categories = changes[key].newValue; let category_name = app.$data.category_name; diff --git a/scripts/background.js b/scripts/background.js index 631fe3a..62b26bb 100644 --- a/scripts/background.js +++ b/scripts/background.js @@ -12,10 +12,10 @@ onRemoved.addListener(onRemovedListener); chrome.runtime.onMessage.addListener(function(request) { switch (request.type) { case "requestOpenIntel": - onRequestOpenIntel(request.tab); + onRequestOpenIntel(request.tab).finally(); break; case "toggleIITC": - onToggleIITC(request.value); + onToggleIITC(request.value).finally(); break; } }); @@ -155,18 +155,18 @@ function initialize(tabId) { chrome.storage.local.get([ "IITC_is_enabled", - "update_channel", + "channel", "release_iitc_code", "test_iitc_code", "local_iitc_code", "release_iitc_version", "test_iitc_version", "local_iitc_version", "release_plugins_local", "test_plugins_local", "local_plugins_local", "release_plugins_user", "test_plugins_user", "local_plugins_user" ], function(data) { - if (data.update_channel) updateChannel = data.update_channel; + if (data.channel) channel = data.channel; let status = data['IITC_is_enabled']; - let iitc_code = data[updateChannel+'_iitc_code'] - let iitc_version = data[updateChannel+'_iitc_version']; + let iitc_code = data[channel+'_iitc_code'] + let iitc_version = data[channel+'_iitc_version']; if ((status === undefined || status === true) && iitc_code !== undefined) { chrome.tabs.executeScript(tabId, { @@ -178,7 +178,7 @@ function initialize(tabId) { activeIITCTab = tabId; }); - let plugins_local = data[updateChannel+'_plugins_local']; + let plugins_local = data[channel+'_plugins_local']; if (plugins_local !== undefined) { Object.keys(plugins_local).forEach(function(id) { let plugin = plugins_local[id]; @@ -188,7 +188,7 @@ function initialize(tabId) { }); } - let plugins_user = data[updateChannel+'_plugins_user']; + let plugins_user = data[channel+'_plugins_user']; if (plugins_user !== undefined) { Object.keys(plugins_user).forEach(function(id) { let plugin = plugins_user[id]; diff --git a/scripts/defaults.js b/scripts/defaults.js index 177c1f2..c4cde0f 100644 --- a/scripts/defaults.js +++ b/scripts/defaults.js @@ -1,9 +1,8 @@ -let updateChannel = 'release'; -let iitc_host = "https://iitc.modos189.ru"; -let local_server_host = "http://127.0.0.1:8000"; -let local_server_channel = "local"; - -let network_host = iitc_host; -let network_channel = updateChannel; +let channel = 'release'; +let network_o_host = { + 'release': "https://iitc.modos189.ru/build/release", + 'test': "https://iitc.modos189.ru/build/test", + 'local': "http://127.0.0.1:8000" +} let loaded_plugins = []; \ No newline at end of file diff --git a/scripts/helpers.js b/scripts/helpers.js index 45f5608..cc45b50 100644 --- a/scripts/helpers.js +++ b/scripts/helpers.js @@ -24,7 +24,6 @@ function parse_meta(code) { let value = sp.slice(2).join(" "); if (["name", "id", "version", "description", "updateURL", "downloadURL", "supportURL"].indexOf(key) !== -1) { if (data[key]) continue; - if (key === "description") key = "desc"; if (key === "name") { value = value.replace("IITC plugin: ", "").replace("IITC Plugin: ", ""); } @@ -63,7 +62,7 @@ function preparationUserScript(plugin, name) { return 'var GM_info = {"script": {"version": "'+plugin['version']+'",' + '"name": "'+name+'",' + - '"description": "'+plugin['desc']+'"}}; '+plugin['code']+'; true' + '"description": "'+plugin['description']+'"}}; '+plugin['code']+'; true' } const checkStatusLocalServer = (host) => new Promise(resolve => { diff --git a/scripts/updater.js b/scripts/updater.js index 10182c3..d01a227 100644 --- a/scripts/updater.js +++ b/scripts/updater.js @@ -30,6 +30,7 @@ Object.prototype.sortByKey = function(key){ return result; }; +let progressIntervalId = null; let update_timeout_id = null; let external_update_timeout_id = null; checkUpdates(); @@ -57,8 +58,8 @@ const save = (options) => new Promise(resolve => { let data = {}; Object.keys(options).forEach(function (key) { if (['iitc_version', 'iitc_code', 'plugins', 'plugins_local', 'plugins_user'].indexOf(key) !== -1) { - console.log('save '+updateChannel+'_'+key); - data[updateChannel+'_'+key] = options[key]; + console.log('save '+channel+'_'+key); + data[channel+'_'+key] = options[key]; } else { data[key] = options[key]; } @@ -68,7 +69,7 @@ const save = (options) => new Promise(resolve => { const ajaxGetWithProgress = (url, parseJSON) => new Promise(async resolve => { - let progressIntervalId = setInterval(function() { showProgress(true) }, 300); + progressIntervalId = setInterval(function() { showProgress(true) }, 300); let response = await ajaxGet(url, parseJSON); if (response) { clearInterval(progressIntervalId); @@ -87,10 +88,9 @@ function showProgress(value) { function checkUpdates(force, retry) { chrome.storage.local.get([ - "update_channel", + "channel", "last_check_update", "local_server_host", - "local_server_channel", "release_update_check_interval", "test_update_check_interval", "local_update_check_interval", "release_iitc_version", "test_iitc_version", "local_iitc_version", "release_plugins", "test_plugins", "local_plugins", @@ -98,34 +98,28 @@ function checkUpdates(force, retry) { "release_plugins_user", "test_plugins_user", "local_plugins_user" ], async function(local) { - if (local.update_channel) updateChannel = local.update_channel; - if (local.local_server_host) local_server_host = local.local_server_host; - if (local.local_server_channel) local_server_channel = local.local_server_channel; + if (local.channel) channel = local.channel; + if (local.local_server_host) network_o_host['local'] = "http://" + local.local_server_host; - if (updateChannel === 'local') { - network_host = local_server_host; - network_channel = local_server_channel; - } else { - network_host = iitc_host; - network_channel = updateChannel; - } - - let update_check_interval = local[updateChannel+'_update_check_interval']*60*60; + let update_check_interval = local[channel+'_update_check_interval']*60*60; if (!update_check_interval) update_check_interval = 24*60*60; - if (updateChannel === 'local') update_check_interval = 5; // check every 5 seconds + if (channel === 'local') update_check_interval = 5; // check every 5 seconds - if (retry === undefined) retry = 0; + if (retry === undefined) { + clearTimeout(update_timeout_id); update_timeout_id = null; + retry = 0; + } - if (local[updateChannel+'_iitc_version'] === undefined || local.last_check_update === undefined || updateChannel === 'local') { + if (local[channel+'_iitc_version'] === undefined || local.last_check_update === undefined || channel === 'local') { clearTimeout(update_timeout_id); update_timeout_id = null; await downloadMeta(local); } else { let time_delta = Math.floor(Date.now() / 1000)-update_check_interval-local.last_check_update; if (time_delta >= 0 || force) { clearTimeout(update_timeout_id); update_timeout_id = null; - let response = await ajaxGetWithProgress(network_host+"/updates.json", true); + let response = await ajaxGetWithProgress(network_o_host[channel]+"/.build-timestamp"); if (response) { - if (response[network_channel] !== local[updateChannel+'_iitc_version'] || force) { + if (response[network_o_host[channel]] !== local[channel+'_iitc_version'] || force) { await downloadMeta(local); } } else { @@ -152,14 +146,14 @@ function checkUpdates(force, retry) { } async function downloadMeta(local) { - let response = await ajaxGetWithProgress(network_host+"/"+network_channel+".json", true); - if (response === undefined) return; + let response = await ajaxGetWithProgress(network_o_host[channel]+"/meta.json", true); + if (!response) return; - let plugins = response[network_channel+'_plugins']; - let plugins_local = local[updateChannel+'_plugins_local']; - let plugins_user = local[updateChannel+'_plugins_user']; + let plugins = response['categories']; + let plugins_local = local[channel+'_plugins_local']; + let plugins_user = local[channel+'_plugins_user']; - let iitc_code = await ajaxGetWithProgress(network_host+"/build/"+network_channel+"/total-conversion-build.user.js", false); + let iitc_code = await ajaxGetWithProgress(network_o_host[channel]+"/total-conversion-build.user.js", false); if (iitc_code) { await save({ 'iitc_code': iitc_code @@ -170,7 +164,7 @@ async function downloadMeta(local) { plugins = rebuildingCategoriesPlugins(plugins, plugins_local, plugins_user); await save({ - 'iitc_version': response[network_channel+'_iitc_version'], + 'iitc_version': response['iitc_version'], 'plugins': plugins, 'plugins_local': plugins_local, 'plugins_user': plugins_user @@ -179,25 +173,13 @@ async function downloadMeta(local) { function checkExternalUpdates(force) { chrome.storage.local.get([ - "update_channel", - "local_server_host", - "local_server_channel", + "channel", "last_check_external_update", "external_update_check_interval", - "release_plugins_user", "test_plugins_user" + "release_plugins_user", "test_plugins_user", "local_plugins_user" ], async function(local){ - if (local.update_channel) updateChannel = local.update_channel; - if (local.local_server_host) local_server_host = local.local_server_host; - if (local.local_server_channel) local_server_channel = local.local_server_channel; - - if (updateChannel === 'local') { - network_host = local_server_host; - network_channel = local_server_channel; - } else { - network_host = iitc_host; - network_channel = updateChannel; - } + if (local.channel) channel = local.channel; let update_check_interval = local['external_update_check_interval']*60*60; if (!update_check_interval) { @@ -224,7 +206,7 @@ function checkExternalUpdates(force) { } async function updateExternalPlugins(local) { - let plugins_user = local[updateChannel+'_plugins_user']; + let plugins_user = local[channel+'_plugins_user']; if (plugins_user) { let exist_updates = false; let hash = "?"+Date.now(); @@ -244,12 +226,8 @@ async function updateExternalPlugins(local) { let response_code = await ajaxGetWithProgress(plugin['updateURL']+hash, false); if (response_code) { exist_updates = true; + plugins_user[id] = meta; plugins_user[id]['code'] = response_code; - ['name", "id", "version", "description", "updateURL", "downloadURL", "supportURL'].forEach(function(key) { - if (meta[key]) { - plugins_user[id][key] = meta[key]; - } - }); } } } @@ -284,7 +262,7 @@ async function updateLocalPlugins(plugins, plugins_local) { }); if (filename && keep) { - let code = await ajaxGetWithProgress(network_host+"/build/" + network_channel + "/plugins/" + filename, false); + let code = await ajaxGetWithProgress(network_o_host[channel]+"/plugins/" + filename, false); if (code) plugins_local[id]['code'] = code; } else { delete plugins_local[id]; @@ -295,10 +273,10 @@ async function updateLocalPlugins(plugins, plugins_local) { } function managePlugin(id, category, action) { - chrome.storage.local.get([updateChannel+"_plugins", updateChannel+"_plugins_local", updateChannel+"_plugins_user"], async function(local) { - let plugins = local[updateChannel+'_plugins']; - let plugins_local = local[updateChannel+'_plugins_local']; - let plugins_user = local[updateChannel+'_plugins_user']; + chrome.storage.local.get([channel+"_plugins", channel+"_plugins_local", channel+"_plugins_user"], async function(local) { + let plugins = local[channel+'_plugins']; + let plugins_local = local[channel+'_plugins_local']; + let plugins_user = local[channel+'_plugins_user']; if (action === 'on') { if (category !== "UserScripts" && plugins_local !== undefined && plugins_local[id] !== undefined || @@ -327,21 +305,14 @@ function managePlugin(id, category, action) { if (plugins_local === undefined) { plugins_local = {}; } - let filename = plugins[category]['plugins'][id]['filename']; - let version = plugins[category]['plugins'][id]['version']; - let desc = plugins[category]['plugins'][id]['desc']; - let response = await ajaxGetWithProgress(network_host+"/build/"+network_channel+"/plugins/"+filename, false); + let response = await ajaxGetWithProgress(network_o_host[channel]+"/plugins/"+filename, false); if (response) { plugins[category]['plugins'][id]['status'] = 'on'; plugins[category]['count_plugins_active'] += 1; - plugins_local[id] = { - 'version': version, - 'desc': desc, - 'category': category, - 'filename': filename, - 'status': 'on', - 'code': response - }; + plugins_local[id] = plugins[category]['plugins'][id]; + plugins_local[id]['category'] = category; + plugins_local[id]['status'] = 'on'; + plugins_local[id]['code'] = response; loadJS(activeIITCTab, "document_end", id, preparationUserScript(plugins_local[id], id)); @@ -402,10 +373,10 @@ function managePlugin(id, category, action) { } function addUserScripts(scripts) { - chrome.storage.local.get([updateChannel+"_plugins", updateChannel+"_plugins_local", updateChannel+"_plugins_user"], async function(local) { - let plugins = local[updateChannel + '_plugins']; - let plugins_local = local[updateChannel + '_plugins_local']; - let plugins_user = local[updateChannel + '_plugins_user']; + chrome.storage.local.get([channel+"_plugins", channel+"_plugins_local", channel+"_plugins_user"], async function(local) { + let plugins = local[channel + '_plugins']; + let plugins_local = local[channel + '_plugins_local']; + let plugins_user = local[channel + '_plugins_user']; if (plugins_local === undefined) plugins_local = {}; if (plugins_user === undefined) plugins_user = {}; @@ -441,7 +412,7 @@ function rebuildingCategoriesPlugins(raw_plugins, plugins_local, plugins_user) { if (plugins_user_length) { data['UserScripts'] = { 'name': 'UserScripts', - 'desc': '', + 'description': '', 'plugins': {}, 'count_plugins': 0, 'count_plugins_active': 0, From 83d0679a03e37d692d29b0b635fbdcd09d9b72b4 Mon Sep 17 00:00:00 2001 From: Alexander Danilov Date: Wed, 3 Jul 2019 19:31:23 +0300 Subject: [PATCH 12/15] Rename 'UserScripts' category to 'External' --- app/popup/popup.html | 2 +- app/popup/popup.js | 2 +- scripts/updater.js | 36 ++++++++++++++++++------------------ 3 files changed, 20 insertions(+), 20 deletions(-) diff --git a/app/popup/popup.html b/app/popup/popup.html index 78473c5..fd59f4a 100644 --- a/app/popup/popup.html +++ b/app/popup/popup.html @@ -109,7 +109,7 @@

{{ _('localServerURL') }}

{{ plugin.name }} {{ _('badgeExternal') }} -