TranslatePress – Translate Multilingual sites - Version 1.5.1

Version Description

  • Added maximum possible size to srcset for translated images
  • Added compatibility with Query Monitor plugin
  • Better handling of licenses when pro addons are active
  • Improved descriptions in settings page and other places
  • Added filter to allow translation of href as an exception
  • Fixed translation blocks not working on live in some edge cases
  • Fixed translation block created in secondary language not working when strings were already translated
  • Fixed JS error when dynamic translation is disabled by filter
  • Fixed translating dynamic strings in Editor when viewing as Logged out
  • Fixed page titles containing special characters not being translated
  • Fixed title attribute not being translated
  • Fixed certain custom WooCommerce permalinks not working on translated products
  • Fixed pencil icon not showing for WooCommerce product images in Shop page on certain themes
  • Fixed modifying wp_mail headers when we didn't have to
Download this release

Release Info

Developer madalin.ungureanu
Plugin Icon 128x128 TranslatePress – Translate Multilingual sites
Version 1.5.1
Comparing to
See all releases

Code changes from version 1.5.0 to 1.5.1

assets/js/trp-editor.js CHANGED
@@ -667,7 +667,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n//\n//\n//\n//\n//\n//\n//\n/
667
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
668
 
669
  "use strict";
670
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../utils */ \"./assets/src/js/utils.js\");\n/* harmony import */ var axios__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! axios */ \"./node_modules/axios/index.js\");\n/* harmony import */ var axios__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(axios__WEBPACK_IMPORTED_MODULE_1__);\n//\n//\n//\n//\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n props: ['dictionary', 'settings', 'iframe', 'dataAttributes', 'mergeRules', 'ajax_url', 'nonces', 'mergeData', 'editorStrings'],\n data: function data() {\n return {\n hoveredStringId: '',\n hoveredStringSelector: '',\n hoveredTarget: '',\n counter: 0\n };\n },\n methods: {\n showPencilIcon: function showPencilIcon(element) {\n if (!this.dictionary || this.dictionary.length < 1) return;\n var self = this;\n var target = element.target;\n var relatedNode, relatedNodeAttr, position, stringSelector, stringId, mergeOrSplit; //for these tag names we need to insert our HTML before the element and not inside of it\n //@TODO: add/research more\n\n var beforePosition = ['IMG', 'INPUT', 'TEXTAREA'];\n if (self.hoveredTarget != '' && target.isSameNode(self.hoveredTarget)) return; //if other icons are showing, remove them\n\n self.removePencilIcon(); //remove highlight class\n\n self.removeHighlight(false); //figure out where to insert extra HTML\n\n if (beforePosition.includes(target.tagName)) position = 'beforebegin';else position = 'afterbegin'; //insert button HTML\n\n target.insertAdjacentHTML(position, this.getTrpSpan()); //inserted node\n\n var trpSpan = self.iframe.getElementsByTagName('trp-span')[0];\n if (!trpSpan) return; //get node info based on where we inserted our button\n\n if (position == 'afterbegin') relatedNode = trpSpan.parentNode;else relatedNode = trpSpan.nextElementSibling; //edit string button\n\n var editButton = this.iframe.querySelector('trp-edit');\n var foundNonGettext = false;\n self.dataAttributes.forEach(function (baseSelector) {\n self.$parent.prepareSelectorStrings(baseSelector).forEach(function (selector) {\n relatedNodeAttr = relatedNode.getAttribute(selector);\n\n if (relatedNodeAttr) {\n stringId = relatedNodeAttr;\n stringSelector = selector;\n\n if (!stringSelector.includes('data-trpgettextoriginal')) {\n // includes at least one data-base-selector that is not gettext. Useful for determining edit pencil color\n foundNonGettext = true;\n }\n }\n });\n });\n self.hoveredStringSelector = stringSelector;\n self.hoveredStringId = stringId;\n self.hoveredTarget = target; // show green edit pencil\n\n if (foundNonGettext) {\n editButton.classList.remove('trp-gettext-pencil');\n } else {\n editButton.classList.add('trp-gettext-pencil');\n } //figure out if split or merge is available\n\n\n mergeOrSplit = self.checkMergeOrSplit(target); //fit inside view\n\n self.fitPencilIconInsideView(trpSpan, target, mergeOrSplit);\n\n if (!self.mergeData.includes(stringId)) {\n editButton.style.display = 'inline-block'; //add class to highlight text\n\n if (!target.classList.contains('trp-highlight')) target.className += ' trp-highlight';\n } //merge or split event listeners\n\n\n if (mergeOrSplit != 'none' && !self.mergeData.includes(stringId)) {\n var button = this.iframe.querySelector('trp-' + mergeOrSplit);\n button.style.display = 'inline-block'; //setup event listeners for merge and split\n\n if (mergeOrSplit == 'split') button.addEventListener('click', self.splitHandler);else if (mergeOrSplit == 'merge') button.addEventListener('click', self.mergeHandler);\n }\n\n editButton.addEventListener('click', self.editHandler);\n },\n editHandler: function editHandler(event) {\n event.preventDefault();\n event.stopPropagation();\n if (this.$parent.mergingString) this.removeHighlight(true);\n this.$parent.mergeData = [];\n this.$parent.selectedString = this.$parent.getStringIndex(this.hoveredStringSelector, this.hoveredStringId);\n this.$parent.translationNotLoadedYet = this.$parent.selectedString === null;\n jQuery('#trp-string-categories').select2('close');\n },\n splitHandler: function splitHandler(event) {\n event.preventDefault();\n event.stopPropagation();\n this.$parent.mergingString = false;\n var split = confirm(this.editorStrings.split_confirmation);\n if (split === false) return;\n var strings = [];\n var hoveredStringIndex = this.$parent.getStringIndex(this.hoveredStringSelector, this.hoveredStringId);\n strings.push(this.dictionary[hoveredStringIndex].original);\n var data = new FormData();\n data.append('action', 'trp_split_translation_block');\n data.append('security', this.nonces['splittbnonce']);\n data.append('strings', JSON.stringify(strings));\n var self = this;\n axios__WEBPACK_IMPORTED_MODULE_1___default.a.post(this.ajax_url, data).then(function (response) {\n window.location.reload();\n })[\"catch\"](function (error) {\n console.log(error);\n });\n },\n mergeHandler: function mergeHandler(event) {\n event.preventDefault();\n event.stopPropagation();\n var self = this;\n var parent,\n isDeprecated = null,\n deprecatedString = null,\n stringId;\n self.$parent.mergingString = true; //remove classes\n\n var previouslyHighlighted = this.iframe.getElementsByClassName('trp-create-translation-block');\n\n if (previouslyHighlighted.length > 0) {\n var i;\n\n for (i = 0; i < previouslyHighlighted.length; i++) {\n previouslyHighlighted[i].classList.remove('trp-highlight');\n previouslyHighlighted[i].classList.remove('trp-create-translation-block');\n }\n }\n\n parent = self.hoveredTarget.closest(self.mergeRules.top_parents); //remove highlight classes from children\n\n parent.querySelectorAll('.trp-highlight').forEach(function (node) {\n node.classList.remove('trp-highlight');\n }); //determine the strings that are being prepared for merging (no gettext)\n\n self.$parent.mergeData = [];\n parent.querySelectorAll('[data-trp-translate-id]').forEach(function (node) {\n stringId = node.getAttribute('data-trp-translate-id');\n if (stringId) self.$parent.mergeData.push(stringId);\n }); //check if we have existing translations for this block\n\n isDeprecated = parent.getAttribute('data-trp-translate-id-deprecated');\n if (isDeprecated) deprecatedString = self.$parent.getStringIndex('data-trp-translate-id', isDeprecated);\n parent.setAttribute('data-trp-translate-id', 'trp_creating_translation_block');\n parent.className += ' trp-highlight trp-create-translation-block'; //create a placeholder string for the dictionary\n\n var dummyString = {\n type: 'regular',\n attribute: '',\n block_type: '1',\n dbID: 'create_translation_block' + this.counter,\n original: self.stripEditorData(parent),\n selector: 'data-trp-translate-id',\n translationsArray: {}\n };\n this.counter++;\n var dummyTranslations = {};\n var defaultLanguage = this.settings['default-language']; //populate translationsArray\n\n self.settings['translation-languages'].forEach(function (languageCode) {\n if (languageCode != defaultLanguage) {\n dummyTranslations = {\n block_type: '1',\n id: languageCode,\n status: '0',\n translated: '' //populate existing translations\n\n };\n\n if (deprecatedString) {\n dummyTranslations.translated = self.dictionary[deprecatedString].translationsArray[languageCode].translated;\n dummyTranslations.editedTranslation = self.dictionary[deprecatedString].translationsArray[languageCode].translated;\n }\n\n dummyString.translationsArray[languageCode] = dummyTranslations;\n }\n }); //add item to dictionary and set selectedString as the index\n\n self.$parent.selectedString = self.dictionary.push(dummyString) - 1;\n },\n removePencilIcon: function removePencilIcon() {\n var icons = this.iframe.querySelectorAll('trp-span');\n\n if (icons.length > 0) {\n icons.forEach(function (icon) {\n icon.remove();\n });\n }\n },\n checkMergeOrSplit: function checkMergeOrSplit(target) {\n if (!this.mergeRules || !this.mergeRules.self_object_type || !this.mergeRules.top_parents) return 'none';\n var hoveredStringIndex = this.$parent.getStringIndex(this.hoveredStringSelector, this.hoveredStringId);\n if (!hoveredStringIndex) hoveredStringIndex = this.$parent.selectedString;\n if (typeof this.dictionary[hoveredStringIndex] != 'undefined' && this.dictionary[hoveredStringIndex].block_type == 1) return 'split';\n var self = this;\n var parentNode, childNodes, incompatibleSiblings;\n var action = 'none'; //check if target is the correct object type\n\n this.mergeRules.self_object_type.forEach(function (thisObjectType) {\n if (target.tagName.toLowerCase() == thisObjectType) {\n //get parent based on merge rules\n parentNode = target.closest(self.mergeRules.top_parents);\n\n if (parentNode != null) {\n //get childrens that are of the correct type based on parent,\n self.mergeRules.self_object_type.forEach(function (selfObjectType) {\n childNodes = parentNode.querySelectorAll(selfObjectType);\n\n if (childNodes.length > 1) {\n //check if between the children we have incompatible siblings (gettext or dynamic strings)\n incompatibleSiblings = parentNode.querySelectorAll(self.mergeRules.incompatible_siblings);\n if (incompatibleSiblings.length == 0) action = 'merge';\n }\n });\n }\n }\n });\n return action;\n },\n stripEditorData: function stripEditorData(target) {\n var copy = target.cloneNode(true);\n var self = this;\n var buttons = copy.querySelector('trp-span');\n if (buttons) buttons.remove();\n copy.querySelectorAll('translate-press, trp-wrap, trp-highlight').forEach(function (node) {\n _utils__WEBPACK_IMPORTED_MODULE_0__[\"default\"].unwrap(node);\n });\n var attributesToReplace = ['href', 'target'];\n attributesToReplace.forEach(function (attribute) {\n copy.querySelectorAll('[data-trp-original-' + attribute + ']').forEach(function (node) {\n var dataTrpOriginalAttribute = 'data-trp-original-' + attribute;\n node.setAttribute(attribute, node.getAttribute(dataTrpOriginalAttribute));\n node.removeAttribute(dataTrpOriginalAttribute);\n });\n });\n var node;\n var otherAttributes = ['data-trp-placeholder', 'data-trp-unpreviewable'];\n var attributesToRemove = otherAttributes.concat(self.$parent.prepareSelectorStrings('data-trp-translate-id'), self.$parent.prepareSelectorStrings('data-trp-node-group'), self.$parent.prepareSelectorStrings('data-trp-node-description'));\n attributesToRemove.forEach(function (attribute) {\n copy.querySelectorAll('[' + attribute + ']').forEach(function (node) {\n node.removeAttribute(attribute);\n });\n });\n return copy.innerHTML;\n },\n removeHighlight: function removeHighlight() {\n var removeFromBlocks = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;\n var previouslyHighlighted = this.iframe.getElementsByClassName('trp-highlight');\n\n if (previouslyHighlighted.length > 0) {\n var i;\n\n for (i = 0; i < previouslyHighlighted.length; i++) {\n if (removeFromBlocks) previouslyHighlighted[i].classList.remove('trp-highlight');else if (!removeFromBlocks && !previouslyHighlighted[i].classList.contains('trp-create-translation-block')) previouslyHighlighted[i].classList.remove('trp-highlight');\n }\n }\n\n return true;\n },\n fitPencilIconInsideView: function fitPencilIconInsideView(pencil, target, mergeOrSplit) {\n var rect = target.getBoundingClientRect(); // target.classList.contains('slick-slide-image') is a fix for elementor image slider to display pencil icon\n\n if (rect.left < 35 || target.tagName === 'IMG' && target.classList.contains('slick-slide-image')) {\n var margin;\n if (mergeOrSplit != 'none') margin = 60;else margin = 30;\n pencil.setAttribute('style', 'margin-left: ' + margin + 'px !important');\n }\n },\n getTrpSpan: function getTrpSpan() {\n return '<trp-span><trp-merge title=\"' + this.editorStrings.merge + '\" class=\"trp-icon trp-merge dashicons dashicons-arrow-up-alt\"></trp-merge><trp-split title=\"' + this.editorStrings.split + '\" class=\"trp-icon trp-split dashicons dashicons-arrow-down-alt\"></trp-split><trp-edit title=\"' + this.editorStrings.edit + '\" class=\"trp-icon trp-edit-translation dashicons dashicons-edit\"></trp-edit></trp-span>';\n }\n }\n});//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vYXNzZXRzL3NyYy9qcy9jb21wb25lbnRzL2hvdmVyLWFjdGlvbnMudnVlPzg3MjMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7QUFLQTtBQUNBO0FBRUE7QUFDQSxVQUNBLFlBREEsRUFFQSxVQUZBLEVBR0EsUUFIQSxFQUlBLGdCQUpBLEVBS0EsWUFMQSxFQU1BLFVBTkEsRUFPQSxRQ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cy9zcmMvanMvY29tcG9uZW50cy9ob3Zlci1hY3Rpb25zLnZ1ZT92dWUmdHlwZT1zY3JpcHQmbGFuZz1qcyYuanMiLCJzb3VyY2VzQ29udGVudCI6WyI8dGVtcGxhdGU+XHJcbiAgICA8ZGl2IGlkPVwidHJwLXNwYW4gdHJwLWFjdGlvbnNcIj48L2Rpdj5cclxuPC90ZW1wbGF0ZT5cclxuXHJcbjxzY3JpcHQ+XHJcbiAgICBpbXBvcnQgdXRpbHMgZnJvbSAnLi4vdXRpbHMnXHJcbiAgICBpbXBvcnQgYXhpb3MgZnJvbSAnYXhpb3MnXHJcblxyXG4gICAgZXhwb3J0IGRlZmF1bHR7XHJcbiAgICAgICAgcHJvcHM6W1xyXG4gICAgICAgICAgICAnZGljdGlvbmFyeScsXHJcbiAgICAgICAgICAgICdzZXR0aW5ncycsXHJcbiAgICAgICAgICAgICdpZnJhbWUnLFxyXG4gICAgICAgICAgICAnZGF0YUF0dHJpYnV0ZXMnLFxyXG4gICAgICAgICAgICAnbWVyZ2VSdWxlcycsXHJcbiAgICAgICAgICAgICdhamF4X3VybCcsXHJcbiAgICAgICAgICAgICdub25jZXMnLFxyXG4gICAgICAgICAgICAnbWVyZ2VEYXRhJyxcclxuICAgICAgICAgICAgJ2VkaXRvclN0cmluZ3MnXHJcbiAgICAgICAgXSxcclxuICAgICAgICBkYXRhKCl7XHJcbiAgICAgICAgICAgIHJldHVybntcclxuICAgICAgICAgICAgICAgIGhvdmVyZWRTdHJpbmdJZCAgICAgICA6ICcnLFxyXG4gICAgICAgICAgICAgICAgaG92ZXJlZFN0cmluZ1NlbGVjdG9yIDogJycsXHJcbiAgICAgICAgICAgICAgICBob3ZlcmVkVGFyZ2V0ICAgICAgICAgOiAnJyxcclxuICAgICAgICAgICAgICAgIGNvdW50ZXIgICAgICAgICAgICAgICA6IDBcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH0sXHJcbiAgICAgICAgbWV0aG9kczp7XHJcbiAgICAgICAgICA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AgICAgICAgICAgICAgc2VsZi5yZW1vdmVIaWdobGlnaHQoIGZhbHNlIClcclxuXHJcbiAgICAgICAgICAgICAgICAvL2ZpZ3VyZSBvdXQgd2hlcmUgdG8gaW5zZXJ0IGV4dHJhIEhUTUxcclxuICAgICAgICAgICAgICAgIGlmKCBiZWZvcmVQb3NpdGlvbi5pbmNsdWRlcyggdGFyZ2V0LnRhZ05hbWUgKSApXHJcbiAgICAgICAgICAgICAgICAgICAgcG9zaXRpb24gPSAnYmVmb3JlYmVnaW4nXHJcbiAgICAgICAgICAgICAgICBlbHNlXHJcbiAgICAgICAgICAgICAgICAgICAgcG9zaXRpb24gPSAnYWZ0ZXJiZWdpbidcclxuXHJcbiAgICAgICAgICAgICAgICAvL2luc2VydCBidXR0b24gSFRNTFxyXG4gICAgICAgICAgICAgICAgdGFyZ2V0Lmluc2VydEFkamFjZW50SFRNTCggcG9zaXRpb24sIHRoaXMuZ2V0VHJwU3BhbigpIClcclxuXHJcbiAgICAgICAgICAgICAgICAvL2luc2VydGVkIG5vZGVcclxuICAgICAgICAgICAgICAgIGxldCB0cnBTcGFuID0gc2VsZi5pZnJhbWUuZ2V0RWxlbWVudHNCeVRhZ05hbWUoICd0cnAtc3BhbicgKVswXVxyXG5cclxuICAgICAgICAgICAgICAgIGlmKCAhdHJwU3BhbiApXHJcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuXHJcblxyXG4gICAgICAgICAgICAgICAgLy9nZXQgbm9kZSBpbmZvIGJhc2VkIG9uIHdoZXJlIHdlIGluc2VydGVkIG91ciBidXR0b25cclxuICAgICAgICAgICAgICAgIGlmKCBwb3NpdGlvbiA9PSAnYWZ0ZXJiZWdpbicgKVxyXG4gICAgICAgICAgICAgICAgICAgIHJlbGF0ZWROb2RlID0gdHJwU3Bhbi5wYXJlbnROb2RlXHJcbiAgICAgICAgICAgICAgICBlbHNlXHJcbiAgICAgICAgICAgICAgICAgICAgcmVsYXRlZE5vZGUgPSB0cnBTcGFuLm5leHRFbGVtZW50U2libGluZ1xyXG5cclxuICAgICAgICAgICAgICAgIC8vZWRpdCBzdHJpbmcgYnV0dG9uXHJcbiAgICAgICAgICAgICAgICBsZXQgZWRpdEJ1dHRvbiA9IHRoaXMuaWZyYW1lLnF1ZXJ5U2VsZWN0b3IoICd0cnAtZWRpdCcgKVxyXG4gICAgICAgICAgICAgICAgbGV0IGZvdW5kTm9uR2V0dGV4dCA9IGZhbHNlXHJcblxyXG4gICAgICAgICAgICAgICAgc2VsZi5kYXRhQXR0cmlidXRlcy5mb3JFYWNoKCBmdW5jdGlvbiggYmFzZVNlbGVjdG9yICkge1xyXG5cclxuICAgICAgICAgICAgICAgICAgICBzZWxmLiRwYXJlbnQucHJlcGFyZVNlbGVjdG9yU3RyaW5ncyggYmFzZVNlbGVjdG9yICkuZm9yRWFjaCggZnVuY3Rpb24oIHNlbGVjdG9yICkge1xyXG5cclxuICAgICAgICAgICAgICAgICAgICAgICAgcmVsYXRlZE5vZGVBdHRyID0gcmVsYXRlZE5vZGUuZ2V0QXR0cmlidXRlKCBzZWxlY3RvciApXHJcblxyXG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoIHJlbGF0ZWROb2RlQXR0ciApIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN0cmluZ0lkID0gcmVsYXRlZE5vZGVBdHRyXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBzdHJpbmdTZWxlY3RvciA9IHNlbGVjdG9yXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoICEgc3RyaW5nU2VsZWN0b3IuaW5jbHVkZXMoICdkYXRhLXRycGdldHRleHRvcmlnaW5hbCcgKSApe1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIGluY2x1ZGVzIGF0IGxlYXN0IG9uZSBkYXRhLWJhc2Utc2VsZWN0b3IgdGhhdCBpcyBub3QgZ2V0dGV4dC4gVXNlZnVsIGZvciBkZXRlcm1pbmluZyBlZGl0IHBlbmNpbCBjb2xvclxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZvdW5kTm9uR2V0dGV4dCA9IHRydWVcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgIH0pXHJcbiAgICAgICAgICAgICAgICB9KVxyXG5cclxuICAgICAgICAgICAgICAgIHNlbGYuaG92ZXJlZFN0cmluZ1NlbGVjdG9yID0gc3RyaW5nU2VsZWN0b3JcclxuICAgICAgICAgICAgICAgIHNlbGYuaG92ZXJlZFN0cmluZ0lkICAgICAgID0gc3RyaW5nSWRcclxuICAgICAgICAgICAgICAgIHNlbGYuaG92ZXJlZFRhcmdldCAgICAgICAgID0gdGFyZ2V0XHJcblxyXG4gICAgICAgICAgICAgICAgLy8gc2hvdyBncmVlbiBlZGl0IHBlbmNpbFxyXG4gICAgICAgICAgICAgICAgaWYgKCBmb3VuZE5vbkdldHRleHQgKXtcclxuICAgICAgICAgICAgICAgICAgICBlZGl0QnV0dG9uLmNsYXNzTGlzdC5yZW1vdmUoICd0cnAtZ2V0dGV4dC1wZW5jaWwnIClcclxuICAgICAgICAgICAgICAgIH1lbHNle1xyXG4gICAgICAgICAgICAgICAgICAgIGVkaXRCdXR0b24uY2xhc3NMaXN0LmFkZCggJ3RycC1nZXR0ZXh0LXBlbmNpbCcgKVxyXG4gICAgICAgICAgICAgICAgfVxyXG5cclxuICAgICAgICAgICAgICAgIC8vZmlndXJlIG91dCBpZiBzcGxpdCBvciBtZXJnZSBpcyBhdmFpbGFibGVcclxuICAgICAgICAgICAgICAgIG1lcmdlT3JTcGxpdCA9IHNlbGYuY2hlY2tNZXJnZU9yU3BsaXQoIHRhcmdldCApXHJcblxyXG4gICAgICAgICAgICAgICAgLy9maXQgaW5zaWRlIHZpZXdcclxuICAgICAgICAgICAgICAgIHNlbGYuZml0UGVuY2lsSWNvbkluc2lkZVZpZXcoIHRycFNwY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c3RlbmVyKCAnY2xpY2snLCBzZWxmLnNwbGl0SGFuZGxlciApXHJcbiAgICAgICAgICAgICAgICAgICAgZWxzZSBpZiggbWVyZ2VPclNwbGl0ID09ICdtZXJnZScgKVxyXG4gICAgICAgICAgICAgICAgICAgICAgICBidXR0b24uYWRkRXZlbnRMaXN0ZW5lciggJ2NsaWNrJywgc2VsZi5tZXJnZUhhbmRsZXIgKVxyXG4gICAgICAgICAgICAgICAgfVxyXG5cclxuICAgICAgICAgICAgICAgIGVkaXRCdXR0b24uYWRkRXZlbnRMaXN0ZW5lciggJ2NsaWNrJywgc2VsZi5lZGl0SGFuZGxlciApXHJcbiAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgIGVkaXRIYW5kbGVyKCBldmVudCApe1xyXG4gICAgICAgICAgICAgICAgZXZlbnQucHJldmVudERlZmF1bHQoKVxyXG4gICAgICAgICAgICAgICAgZXZlbnQuc3RvcFByb3BhZ2F0aW9uKClcclxuXHJcbiAgICAgICAgICAgICAgICBpZiggdGhpcy4kcGFyZW50Lm1lcmdpbmdTdHJpbmcgKVxyXG4gICAgICAgICAgICAgICAgICAgIHRoaXMucmVtb3ZlSGlnaGxpZ2h0KCB0cnVlIClcclxuXHJcbiAgICAgICAgICAgICAgICB0aGlzLiRwYXJlbnQubWVyZ2VEYXRhICAgICAgPSBbXVxyXG5cclxuICAgICAgICAgICAgICAgIHRoaXMuJHBhcmVudC5zZWxlY3RlZFN0cmluZyA9IHRoaXMuJHBhcmVudC5nZXRTdHJpbmdJbmRleCggdGhpcy5ob3ZlcmVkU3RyaW5nU2VsZWN0b3IsIHRoaXMuaG92ZXJlZFN0cmluZ0lkIClcclxuXHJcbiAgICAgICAgICAgICAgICB0aGlzLiRwYXJlbnQudHJhbnNsYXRpb25Ob3RMb2FkZWRZZXQgID0gKCB0aGlzLiRwYXJlbnQuc2VsZWN0ZWRTdHJpbmcgPT09IG51bGwgKVxyXG5cclxuICAgICAgICAgICAgICAgIGpRdWVyeSggJyN0cnAtc3RyaW5nLWNhdGVnb3JpZXMnICkuc2VsZWN0MiggJ2Nsb3NlJyApXHJcbiAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgIHNwbGl0SGFuZGxlciggZXZlbnQgKSB7XHJcbiAgICAgICAgICAgICAgICBldmVudC5wcmV2ZW50RGVmYXVsdCgpXHJcbiAgICAgICAgICAgICAgICBldmVudC5zdG9wUHJvcGFnYXRpb24oKVxyXG4gICAgICAgICAgICAgICAgdGhpcy4kcGFyZW50Lm1lcmdpbmdTdHJpbmcgPSBmYWxzZVxyXG5cclxuICAgICAgICAgICAgICAgIGxldCBzcGxpdCA9IGNvbmZpcm0oIHRoaXMuZWRpdG9yU3RyaW5ncy5zcGxpdF9jb25maXJtYXRpb24gKVxyXG5cclxuICAgICAgICAgICAgICAgIGlmKCBzcGxpdCA9PT0gZmFsc2UgKVxyXG4gICAgICAgICAgICAgICAgICAgIHJldHVyblxyXG5cclxuICAgICAgICAgICAgICAgIGxldCBzdHJpbmdzID0gW11cclxuICAgICAgICAgICAgICAgIGxldCBob3ZlcmVkU3RyaW5nSW5kZXggPSB0aGlzLiRwYXJlbnQuZ2V0U3RyaW5nSW5kZXgoIHRoaXMuaG92ZXJlZFN0cmluZ1NlbGVjdG9yLCB0aGlzLmhvdmVyZWRTdHJpbmdJZCApXHJcbiAgICAgICAgICAgICAgICBzdHJpbmdzLnB1c2goIHRoaXMuZGljdGlvbmFyeVsgaG92ZXJlZFN0cmluZ0luZGV4IF0ub3JpZ2luYWwgKVxyXG5cclxuICAgICAgICAgICAgICAgIGxldCBkYXRhID0gbmV3IEZvcm1EYXRhKClcclxuICAgICAgICAgICAgICAgICAgICBkYXRhLmFwcGVuZCggJ2FjdGlvbicsICd0cnBfc3BsaXRfdHJhbnNsYXRpb25fYmxvY2snIClcclxuICAgICAgICAgICAgICAgICAgICBkYXRhLmFwcGVuZCggJ3NlY3VyaXR5JywgdGhpcy5ub25jZXNbJ3NwbGl0dGJub25jZSddIClcclxuICAgICAgICAgICAgICAgICAgICBkYXRhLmFwcGVuZCggJ3N0cmluZ3MnLCBKU09OLnN0cmluZ2lmeSggc3RyaW5ncyApIClcclxuXHJcbiAgICAgICAgICAgICAgICBsZXQgc2VsZiA9IHRoaXNcclxuXHJcbiAgICAgICAgICAgICAgICBheGlvcy5wb3N0KHRoaXMuYWpheF91cmwsIGRhdGEpXHJcbiAgICAgICAgICAgICAgICAgICAgLnRoZW4oZnVuY3Rpb24gKHJlc3BvbnNlKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHdpbmRvdy5sb2NhdGlvbi5yZWxvYWQoKVxyXG4gICAgICAgICAgICAgICAgICAgIH0pXHJcbiAgICAgICAgICAgICAgICAgICAgLmNhdGNoKGZ1bmN0aW9uIChlcnJvcikge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBjb25zb2xlLmxvZyhlcnJvcik7XHJcbiAgICAgICAgICAgICAgICAgICAgfSk7XHJcbiAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgIG1lcmdlSGFuZGxlciggZXZlbnQgKSB7XHJcbiAgICAgICAgICAgICAgICBldmVudC5wcmV2ZW50RGVmYXVsdCgpXHJcbiAgICAgICAgICAgICAgICBldmVudC5zdG9wUHJvcGFnYXRpb24oKVxyXG5cclxuICAgICAgICAgICAgICAgIGxldCBzZWxmID0gdGhpc1xyXG4gICAgICAgICAgICAgICAgbGV0IHBhcmVudCwgaXNEZXByZWNhdGVkID0gbnVsbCwgZGVwcmVjYXRlZFN0cmluZyA9IG51bGwsIHN0cmluZ0lkXHJcblxyXG4gICAgICAgICAgICAgICAgc2VsZi4kcGFyZW50Lm1lcmdpbmdTdHJpbmcgPSB0cnVlXHJcblxyXG4gICAgICAgICAgICAgICAgLy9yZW1vdmUgY2xhc3Nlc1xyXG4gICAgICAgICAgICAgICAgbGV0IHByZXZpb3VzbHlIaWdobGlnaHRlZCA9IHRoaXMuaWZyYW1lLmdldEVsZW1lbnRzQnlDbGFzc05hbWUoICd0cnAtY3JlYXRlLXRyYW5zbGF0aW9uLWJsb2NrJyApXHJcblxyXG4gICAgICAgICAgICAgICAgaWYoIHByZXZpb3VzbHlIaWdobGlnaHRlZC5sZW5ndGggPiAwICkge1xyXG4gICAgICAgICAgICAgICAgICAgIGxldCBpXHJcblxyXG4gICAgICAgICAgICAgICAgICAgIGZvciAoIGkgPSAwOyBpIDwgcHJldmlvdXNseUhpZ2hsaWdodGVkLmxlbmd0aDsgaSsrICkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBwcmV2aW91c2x5SGlnaGxpZ2h0ZWRbaV0uY2xhc3NMaXN0LnJlbW92ZSggJ3RycC1oaWdobGlnaHQnIClcclxuICAgICAgICAgICAgICAgICAgICAgICAgcHJldmlvdXNseUhpZ2hsaWdodGVkW2ldLmNsYXNzTGlzdC5yZW1vdmUoICd0cnAtY3JlYXRlLXRyYW5zbGF0aW9uLWJsb2NrJyApXHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgfVxyXG5cclxuICAgICAgICAgICAgICAgIHBhcmVudCA9IHNlbGYuaG92ZXJlZFRhcmdldC5jbG9zZXN0KCBzZWxmLm1lcmdlUnVsZXMudG9wX3BhcmVudHMgKVxyXG5cclxuICAgICAgICAgICAgICAgIC8vcmVtb3ZlIGhpZ2hsaWdodCBjbGFzc2VzIGZyb20gY2hpbGRyZW5cclxuICAgICAgICAgICAgICAgIHBhcmVudC5xdWVyeVNlbGVjdG9yQWxsKCAnLnRycC1oaWdobGlnaHQnICkuZm9yRWFjaCggZnVuY3Rpb24obm9kZSkge1xyXG4gICAgICAgICAgICAgICAgICAgIG5vZGUuY2xhc3NMaXN0LnJlbW92ZSggJ3RycC1oaWdobGlnaHQnIClcclxuICAgICAgICAgICAgICAgIH0pXHJcblxyXG4gICAgICAgICAgICAgICAgLy9kZXRlcm1pbmUgdGhlIHN0cmluZ3MgdGhhdCBhcmUgYmVpbmcgcHJlcGFyZWQgZm9yIG1lcmdpbmcgKG5vIGdldHRleHQpXHJcbiAgICAgICAgICAgICAgICBzZWxmLiRwYXJlbnQubWVyZ2VEYXRhID0gW11cclxuXHJcbiAgICAgICAgICAgICAgICBwYXJlbnQucXVlcnlTZWxlY3RvckFsbCggJ1tkYXRhLXRycC10cmFuc2xhdGUtaWRdJyApLmZvckVhY2goIGZ1bmN0aW9uKCBub2RlICkge1xyXG4gICAgICAgICAgICAgICAgICAgIHN0cmluZ0lkID0gbm9kZS5nZXRBdHRyaWJ1dGUoICdkYXRhLXRycC10cmFuc2xhdGUtaWQnIClcclxuXHJcbiAgICAgICAgICAgICAgICAgICAgaWYgKCBzdHJpbmdJZCApXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHNlbGYuJHBhcmVudC5tZXJnZURhdGEucHVzaCggc3RyaW5nSWQgKVxyXG4gICAgICAgICAgICAgICAgfSlcclxuXHJcbiAgICAgICAgICAgICAgICAvL2NoZWNrIGlmIHdlIGhhdmUgZXhpc3RpbmcgdHJhbnNsYXRpb25zIGZvciB0aGlzIGJsb2NrXHJcbiAgICAgICAgICAgICAgICBpc0RlcHJlY2F0ZWQgPSBwYXJlbnQuZ2V0QXR0cmlidXRlKCAnZGF0YS10cnAtdHJhbnNsYXRlLWlkLWRlcHJlY2F0ZWQnIClcclxuXHJcbiAgICAgICAgICAgICAgICBpZiggaXNEZXByZWNhdGVkIClcclxuICAgICAgICAgICAgICAgICAgICBkZXByZWNhdGVkU3RyaW5nID0gc2VsZi4kcGFyZW50LmdldFN0cmluZ0luZGV4KCAnZGF0YS10cnAtdHJhbnNsYXRlLWlkJywgaXNEZXByZWNhdGVkIClcclxuXHJcbiAgICAgICAgICAgICAgICBwYXJlbnQuc2V0QXR0cmlidXRlKCAnZGF0YS10cnAtdHJhbnNsYXRlLWlkJywgJ3RycF9jcmVhdGluZ190cmFuc2xhdGlvbl9ibG9jaycgKVxyXG5cclxuICAgICAgICAgICAgICAgIHBhcmVudC5jbGFzc05hbWUgKz0gJyB0cnAtaGlnaGxpZ2h0IHRycC1jcmVhdGUtdHJhbnNsYXRpb24tYmxvY2snXHJcblxyXG4gICAgICAgICAgICAgICAgLy9jcmVhdGUgYSBwbGFjZWhvbGRlciBzdHJpbmcgZm9yIHRoZSBkaWN0aW9uYXJ5XHJcbiAgICAgICAgICAgICAgICBsZXQgZHVtbXlTdHJpbmcgPSB7XHJcbiAgICAgICAgICAgICAgICAgICAgdHlwZSAgICAgICAgICAgICAgOiAncmVndWxhcicsXHJcbiAgICAgICAgICAgICAgICAgICAgYXR0cmlidXRlICAgICAgICAgOiAnJyxcclxuICAgICAgICAgICAgICAgICAgICBibG9ja190eXBlICAgICAgICA6ICcxJyxcclxuICAgICAgICAgICAgICAgICAgICBkYklEICAgICAgICAgICAgICA6ICdjcmVhdGVfdHJhbnNsYXRpb25fYmxvY2snICsgdGhpcy5jb3VudGVyLFxyXG4gICAgICAgICAgICAgICAgICAgIG9yaWdpbmFsICAgICAgICAgIDogc2VsZi5zdHJpcEVkaXRvckRhdGEoIHBhcmVudCApLFxyXG4gICAgICAgICAgICAgICAgICAgIHNlbGVjdG9yICAgICAgICAgIDogJ2RhdGEtdHJwLXRyYW5zbGF0ZS1pZCcsXHJcbiAgICAgICAgICAgICAgICAgICAgdHJhbnNsYXRpb25zQXJyYXkgOiB7fVxyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgdGhpcy5jb3VudGVyKytcclxuXHJcbiAgICAgICAgICAgICAgICBsZXQgZHVtbXlUcmFuc2xhdGlvbnMgPSB7fVxyXG5cclxuICAgICAgICAgICAgICAgIGxldCBkZWZhdWx0TGFuZ3VhZ2UgPSB0aGlzLnNldHRpbmdzWydkZWZhdWx0LWxhbmd1YWdlJ11cclxuXHJcbiAgICAgICAgICAgICAgICAvL3BvcHVsYXRlIHRyYW5zbGF0aW9uc0FycmF5XHJcbiAgICAgICAgICAgICAgICBzZWxmLnNldHRpbmdzWyd0cmFuc2xhdGlvbi1sYW5ndWFnZXMnXS5mb3JFYWNoKCBmdW5jdGlvbiggbGFuZ3VhZ2VDb2RlICApe1xyXG4gICAgICAgICAgICAgICAgICAgIGlmKCBsYW5ndWFnZUNvZGUgIT0gZGVmYXVsdExhbmd1YWdlICkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBkdW1teVRyYW5zbGF0aW9ucyA9IHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJsb2NrX3R5cGUgOiAnMScsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZCAgICAgICAgIDogbGFuZ3VhZ2VDb2RlLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgc3RhdHVzICAgICA6ICcwJyxcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRyYW5zbGF0ZWQgOiAnJ1xyXG4gICAgICAgICAgICAgICAgICAgICAgICB9XHJcblxyXG4gICAgICAgICAgICAgICAgICAgICAgICAvL3BvcHVsYXRlIGV4aXN0aW5nIHRyYW5zbGF0aW9uc1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBpZiggZGVwcmVjYXRlZFN0cmluZyApIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGR1bW15VHJhbnNsYXRpb25zLnRyYW5zbGF0ZWQgICAgICAgID0gc2VsZi5kaWN0aW9uYXJ5W2RlcHJlY2F0ZWRTdHJpbmddLnRyYW5zbGF0aW9uc0FycmF5W2xhbmd1YWdlQ29kZV0udHJhbnNsYXRlZFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZHVtbXlUcmFuc2xhdGlvbnMuZWRpdGVkVHJhbnNsYXRpb24gPSBzZWxmLmRpY3Rpb25hcnlbZGVwcmVjYXRlZFN0cmluZ10udHJhbnNsYXRpb25zQXJyYXlbbGFuZ3VhZ2VDb2RlXS50cmFuc2xhdGVkXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cclxuXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGR1bW15U3RyaW5nLnRyYW5zbGF0aW9uc0FycmF5W2xhbmd1YWdlQ29kZV0gPSBkdW1teVRyYW5zbGF0aW9uc1xyXG4gICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIH0pXHJcblxyXG4gICAgICAgICAgICAgICAgLy9hZGQgaXRlbSB0byBkaWN0aW9uYXJ5IGFuZCBzZXQgc2VsZWN0ZWRTdHJpbmcgYXMgdGhlIGluZGV4XHJcbiAgICAgICAgICAgICAgICBzZWxmLiRwYXJlbnQuc2VsZWN0ZWRTdHJpbmcgPSBzZWxmLmRpY3Rpb25hcnkucHVzaCggZHVtbXlTdHJpbmcgKSAtIDFcclxuXHJcbiAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgIHJlbW92ZVBlbmNpbEljb24oKXtcclxuICAgICAgICAgICAgICAgIGxldCBpY29ucyA9IHRoaXMuaWZyYW1lLnF1ZXJ5U2VsZWN0b3JBbGwoICd0cnAtc3BhbicgKVxyXG5cclxuICAgICAgICAgICAgICAgIGlmICggaWNvbnMubGVuZ3RoID4gMCApIHtcclxuICAgICAgICAgICAgICAgICAgICBpY29ucy5mb3JFYWNoKCBmdW5jdGlvbiggaWNvbiApIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgaWNvbi5yZW1vdmUoKVxyXG4gICAgICAgICAgICAgICAgICAgIH0pXHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgIGNoZWNrTWVyZ2VPclNwbGl0KCB0YXJnZXQgKXtcclxuICAgICAgICAgICAgICAgIGlmKCAhdGhpcy5tZXJnZVJ1bGVzIHx8ICF0aGlzLm1lcmdlUnVsZXMuc2VsZl9vYmplY3RfdHlwZSB8fCAhdGhpcy5tZXJnZVJ1bGVzLnRvcF9wYXJlbnRzIClcclxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ25vbmUnXHJcblxyXG4gICAgICAgICAgICAgICAgbGV0IGhvdmVyZWRTdHJpbmdJbmRleCA9IHRoaXMuJHBhcmVudC5nZXRTdHJpbmdJbmRleCggdGhpcy5ob3ZlcmVkU3RyaW5nU2VsZWN0b3IsIHRoaXMuaG92ZXJlZFN0cmluZ0lkIClcclxuICAgICAgICAgICAgICAgIGlmKCAhaG92ZXJlZFN0cmluZ0luZGV4IClcclxuICAgICAgICAgICAgICAgICAgICBob3ZlcmVkU3RyaW5nSW5kZXggPSB0aGlzLiRwYXJlbnQuc2VsZWN0ZWRTdHJpbmdcclxuXHJcbiAgICAgICAgICAgICAgICBpZiggdHlwZW9mIHRoaXMuZGljdGlvbmFyeVtob3ZlcmVkU3RyaW5nSW5kZXhdICE9ICd1bmRlZmluZWQnICYmIHRoaXMuZGljdGlvbmFyeVtob3ZlcmVkU3RyaW5nSW5kZXhdLmJsb2NrX3R5cGUgPT0gMSApXHJcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuICdzcGxpdCdcclxuXHJcbiAgICAgICAgICAgICAgICBsZXQgc2VsZiA9IHRoaXNcclxuICAgICAgICAgICAgICAgIGxldCBwYXJlbnROb2RlLCBjaGlsZE5vZGVzLCBpbmNvbXBhdGlibGVTaWJsaW5nc1xyXG5cclxuICAgICAgICAgICAgICAgIGxldCBhY3Rpb24gPSAnbm9uZSdcclxuXHJcbiAgICAgICAgICAgICAgICAvL2NoZWNrIGlmIHRhcmdldCBpcyB0aGUgY29ycmVjdCBvYmplY3QgdHlwZVxyXG4gICAgICAgICAgICAgICAgdGhpcy5tZXJnZVJ1bGVzLnNlbGZfb2JqZWN0X3R5cGUuZm9yRWFjaCggZnVuY3Rpb24oIHRoaXNPYmplY3RUeXBlICkge1xyXG5cclxuICAgICAgICAgICAgICAgICAgICBpZiggdGFyZ2V0LnRhZ05hbWUudG9Mb3dlckNhc2UoKSA9PSB0aGlzT2JqZWN0VHlwZSApIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgLy9nZXQgcGFyZW50IGJhc2VkIG9uIG1lcmdlIHJ1bGVzXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHBhcmVudE5vZGUgPSB0YXJnZXQuY2xvc2VzdCggc2VsZi5tZXJnZVJ1bGVzLnRvcF9wYXJlbnRzIClcclxuXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmKCBwYXJlbnROb2RlICE9IG51bGwgKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvL2dldCBjaGlsZHJlbnMgdGhhdCBhcmUgb2YgdGhlIGNvcnJlY3QgdHlwZSBiYXNlZCBvbiBwYXJlbnQsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBzZWxmLm1lcmdlUnVsZXMuc2VsZl9vYmplY3RfdHlwZS5mb3JFYWNoKCBmdW5jdGlvbiggc2VsZk9iamVjdFR5cGUgKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY2hpbGROb2RlcyA9IHBhcmVudE5vZGUucXVlcnlTZWxlY3RvckFsbCggc2VsZk9iamVjdFR5cGUgKVxyXG5cclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiggY2hpbGROb2Rlcy5sZW5ndGggPiAxICkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvL2NoZWNrIGlmIGJldHdlZW4gdGhlIGNoaWxkcmVuIHdlIGhhdmUgaW5jb21wYXRpYmxlIHNpYmxpbmdzIChnZXR0ZXh0IG9yIGR5bmFtaWMgc3RyaW5ncylcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaW5jb21wYXRpYmxlU2libGluZ3MgPSBwYXJlbnROb2RlLnF1ZXJ5U2VsZWN0b3JBbGwoIHNlbGYubWVyZ2VSdWxlcy5pbmNvbXBhdGlibGVfc2libGluZ3MgKVxyXG5cclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKCBpbmNvbXBhdGlibGVTaWJsaW5ncy5sZW5ndGggPT0gMCApXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhY3Rpb24gPSAnbWVyZ2UnXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSlcclxuICAgICAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIH0pXHJcblxyXG4gICAgICAgICAgICAgICAgcmV0dXJuIGFjdGlvblxyXG4gICAgICAgICAgICB9LFxyXG4gICAgICAgICAgICBzdHJpcEVkaXRvckRhdGEoIHRhcmdldCApe1xyXG4gICAgICAgICAgICAgICAgbGV0IGNvcHkgPSB0YXJnZXQuY2xvbmVOb2RlKCB0cnVlIClcclxuICAgICAgICAgICAgICAgIGxldCBzZWxmID0gdGhpc1xyXG5cclxuICAgICAgICAgICAgICAgIGxldCBidXR0b25zID0gY29weS5xdWVyeVNlbGVjdG9yKCAndHJwLXNwYW4nIClcclxuXHJcbiAgICAgICAgICAgICAgICBpZiggYnV0dG9ucyApXHJcbiAgICAgICAgICAgICAgICAgICAgYnV0dG9ucy5yZW1vdmUoKVxyXG5cclxuICAgICAgICAgICAgICAgIGNvcHkucXVlcnlTZWxlY3RvckFsbCggJ3RyYW5zbGF0ZS1wcmVzcywgdHJwLXdyYXAsIHRycC1oaWdobGlnaHQnICkuZm9yRWFjaCggZnVuY3Rpb24oIG5vZGUgKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgdXRpbHMudW53cmFwKCBub2RlIClcclxuICAgICAgICAgICAgICAgIH0pXHJcblxyXG4gICAgICAgICAgICAgICAgbGV0IGF0dHJpYnV0ZXNUb1JlcGxhY2UgPSBbICdocmVmJywgJ3RhcmdldCcgXVxyXG5cclxuICAgICAgICAgICAgICAgIGF0dHJpYnV0ZXNUb1JlcGxhY2UuZm9yRWFjaCggZnVuY3Rpb24oIGF0dHJpYnV0ZSApIHtcclxuICAgICAgICAgICAgICAgICAgICBjb3B5LnF1ZXJ5U2VsZWN0b3JBbGwoICdb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jdGlvbiggYXR0cmlidXRlICkge1xyXG4gICAgICAgICAgICAgICAgICAgIGNvcHkucXVlcnlTZWxlY3RvckFsbCggJ1snICsgYXR0cmlidXRlICsgJ10nICkuZm9yRWFjaCggZnVuY3Rpb24oIG5vZGUgKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIG5vZGUucmVtb3ZlQXR0cmlidXRlKCBhdHRyaWJ1dGUgKVxyXG4gICAgICAgICAgICAgICAgICAgIH0pXHJcbiAgICAgICAgICAgICAgICB9KVxyXG5cclxuICAgICAgICAgICAgICAgIHJldHVybiBjb3B5LmlubmVySFRNTFxyXG5cclxuICAgICAgICAgICAgfSxcclxuICAgICAgICAgICAgcmVtb3ZlSGlnaGxpZ2h0KCByZW1vdmVGcm9tQmxvY2tzID0gdHJ1ZSApe1xyXG4gICAgICAgICAgICAgICAgbGV0IHByZXZpb3VzbHlIaWdobGlnaHRlZCA9IHRoaXMuaWZyYW1lLmdldEVsZW1lbnRzQnlDbGFzc05hbWUoICd0cnAtaGlnaGxpZ2h0JyApXHJcblxyXG4gICAgICAgICAgICAgICAgaWYoIHByZXZpb3VzbHlIaWdobGlnaHRlZC5sZW5ndGggPiAwICkge1xyXG4gICAgICAgICAgICAgICAgICAgIGxldCBpXHJcblxyXG4gICAgICAgICAgICAgICAgICAgIGZvciAoIGkgPSAwOyBpIDwgcHJldmlvdXNseUhpZ2hsaWdodGVkLmxlbmd0aDsgaSsrICkge1xyXG5cclxuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKCByZW1vdmVGcm9tQmxvY2tzIClcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHByZXZpb3VzbHlIaWdobGlnaHRlZFtpXS5jbGFzc0xpc3QucmVtb3ZlKCAndHJwLWhpZ2hsaWdodCcgKVxyXG4gICAgICAgICAgICAgICAgICAgICAgICBlbHNlIGlmICggIXJlbW92ZUZyb21CbG9ja3MgJiYgIXByZXZpb3VzbHlIaWdobGlnaHRlZFtpXS5jbGFzc0xpc3QuY29udGFpbnMoICd0cnAtY3JlYXRlLXRyYW5zbGF0aW9uLWJsb2NrJyApIClcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHByZXZpb3VzbHlIaWdobGlnaHRlZFtpXS5jbGFzc0xpc3QucmVtb3ZlKCAndHJwLWhpZ2hsaWdodCcgKVxyXG4gICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIH1cclxuXHJcbiAgICAgICAgICAgICAgICByZXR1cm4gdHJ1ZVxyXG4gICAgICAgICAgICB9LFxyXG4gICAgICAgICAgICBmaXRQZW5jaWxJY29uSW5zaWRlVmlldyggcGVuY2lsLCB0YXJnZXQsIG1lcmdlT3JTcGxpdCApe1xyXG4gICAgICAgICAgICAgICAgbGV0IHJlY3QgPSB0YXJnZXQuZ2V0Qm91bmRpbmdDbGllbnRSZWN0KClcclxuICAgICAgICAgICAgICAgIC8vICB0YXJnZXQuY2xhc3NMaXN0LmNvbnRhaW5zKCdzbGljay1zbGlkZS1pbWFnZScpIGlzIGEgZml4IGZvciBlbGVtZW50b3IgaW1hZ2Ugc2xpZGVyIHRvIGRpc3BsYXkgcGVuY2lsIGljb25cclxuICAgICAgICAgICAgICAgIGlmKCByZWN0LmxlZnQgPCAzNSB8fCAoIHRhcmdldC50YWdOYW1lID09PSAnSU1HJyAmJiB0YXJnZXQuY2xhc3NMaXN0LmNvbnRhaW5zKCdzbGljay1zbGlkZS1pbWFnZScpICkgKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgbGV0IG1hcmdpblxyXG5cclxuICAgICAgICAgICAgICAgICAgICBpZiggbWVyZ2VPclNwbGl0ICE9ICdub25lJyApXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIG1hcmdpbiA9IDYwXHJcbiAgICAgICAgICAgICAgICAgICAgZWxzZVxyXG4gICAgICAgICAgICAgICAgICAgICAgICBtYXJnaW4gPSAzMFxyXG5cclxuICAgICAgICAgICAgICAgICAgICBwZW5jaWwuc2V0QXR0cmlidXRlKCAnc3R5bGUnLCAnbWFyZ2luLWxlZnQ6ICcgKyBtYXJnaW4gKyAncHggIWltcG9ydGFudCcgKVxyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICB9LFxyXG4gICAgICAgICAgICBnZXRUcnBTcGFuKCkge1xyXG4gICAgICAgICAgICAgICAgcmV0dXJuICc8dHJwLXNwYW4+PHRycC1tZXJnZSB0aXRsZT1cIicrIHRoaXMuZWRpdG9yU3RyaW5ncy5tZXJnZSArJ1wiIGNsYXNzPVwidHJwLWljb24gdHJwLW1lcmdlIGRhc2hpY29ucyBkYXNoaWNvbnMtYXJyb3ctdXAtYWx0XCI+PC90cnAtbWVyZ2U+PHRycC1zcGxpdCB0aXRsZT1cIicrIHRoaXMuZWRpdG9yU3RyaW5ncy5zcGxpdCArJ1wiIGNsYXNzPVwidHJwLWljb24gdHJwLXNwbGl0IGRhc2hpY29ucyBkYXNoaWNvbnMtYXJyb3ctZG93bi1hbHRcIj48L3RycC1zcGxpdD48dHJwLWVkaXQgdGl0bGU9XCInKyB0aGlzLmVkaXRvclN0cmluZ3MuZWRpdCArJ1wiIGNsYXNzPVwidHJwLWljb24gdHJwLWVkaXQtdHJhbnNsYXRpb24gZGFzaGljb25zIGRhc2hpY29ucy1lZGl0XCI+PC90cnAtZWRpdD48L3RycC1zcGFuPidcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH1cclxuICAgIH1cclxuPC9zY3JpcHQ+XHJcbiJdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./node_modules/babel-loader/lib/index.js?!./node_modules/vue-loader/lib/index.js?!./assets/src/js/components/hover-actions.vue?vue&type=script&lang=js&\n");
671
 
672
  /***/ }),
673
 
@@ -715,7 +715,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var he__
715
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
716
 
717
  "use strict";
718
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var select2_dist_js_select2_min_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! select2/dist/js/select2.min.js */ \"./node_modules/select2/dist/js/select2.min.js\");\n/* harmony import */ var select2_dist_js_select2_min_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(select2_dist_js_select2_min_js__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./utils */ \"./assets/src/js/utils.js\");\n/* harmony import */ var axios__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! axios */ \"./node_modules/axios/index.js\");\n/* harmony import */ var axios__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(axios__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _components_language_boxes_vue__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./components/language-boxes.vue */ \"./assets/src/js/components/language-boxes.vue\");\n/* harmony import */ var _components_save_translations_vue__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./components/save-translations.vue */ \"./assets/src/js/components/save-translations.vue\");\n/* harmony import */ var _components_hover_actions_vue__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./components/hover-actions.vue */ \"./assets/src/js/components/hover-actions.vue\");\n/* harmony import */ var _components_extra_content_vue__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./components/extra-content.vue */ \"./assets/src/js/components/extra-content.vue\");\n/* harmony import */ var he__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! he */ \"./node_modules/he/he.js\");\n/* harmony import */ var he__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(he__WEBPACK_IMPORTED_MODULE_7__);\nfunction _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread(); }\n\nfunction _nonIterableSpread() { throw new TypeError(\"Invalid attempt to spread non-iterable instance\"); }\n\nfunction _iterableToArray(iter) { if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === \"[object Arguments]\") return Array.from(iter); }\n\nfunction _arrayWithoutHoles(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } }\n\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n\n\n\n\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n props: ['trp_settings', 'language_names', 'ordered_secondary_languages', 'current_language', 'on_screen_language', 'view_as_roles', 'url_to_load', 'string_selectors', 'data_attributes', 'ajax_url', 'editor_nonces', 'string_group_order', 'merge_rules', 'localized_text', 'paid_version', 'flags_path'],\n components: {\n languageBoxes: _components_language_boxes_vue__WEBPACK_IMPORTED_MODULE_3__[\"default\"],\n saveTranslations: _components_save_translations_vue__WEBPACK_IMPORTED_MODULE_4__[\"default\"],\n hoverActions: _components_hover_actions_vue__WEBPACK_IMPORTED_MODULE_5__[\"default\"],\n extraContent: _components_extra_content_vue__WEBPACK_IMPORTED_MODULE_6__[\"default\"]\n },\n data: function data() {\n return {\n //props\n settings: JSON.parse(this.trp_settings),\n languageNames: JSON.parse(this.language_names),\n orderedSecondaryLanguages: JSON.parse(this.ordered_secondary_languages),\n roles: JSON.parse(this.view_as_roles),\n nonces: JSON.parse(this.editor_nonces),\n stringGroupOrder: JSON.parse(this.string_group_order),\n selectors: JSON.parse(this.string_selectors),\n dataAttributes: JSON.parse(this.data_attributes),\n mergeRules: JSON.parse(this.merge_rules),\n editorStrings: JSON.parse(this.localized_text),\n flagsPath: JSON.parse(this.flags_path),\n //data\n currentLanguage: this.current_language,\n onScreenLanguage: this.on_screen_language,\n currentURL: this.url_to_load,\n urlToLoad: this.url_to_load,\n iframe: '',\n dictionary: [],\n selectedString: null,\n selectedIndexesArray: [],\n detectedSelectorAndId: [],\n stringGroups: [],\n mergingString: false,\n mergeData: [],\n showChangesUnsavedMessage: false,\n viewAs: '',\n loading_strings: 0,\n translationNotLoadedYet: false\n };\n },\n created: function created() {\n this.settings['default-language-name'] = this.languageNames[this.settings['default-language']]; //set default value for the View As select\n\n var params = _utils__WEBPACK_IMPORTED_MODULE_1__[\"default\"].getUrlParameters(this.currentURL);\n if (Object.keys(params).length > 1 && params['trp-view-as']) this.viewAs = params['trp-view-as'];else this.viewAs = 'current_user';\n },\n mounted: function mounted() {\n this.addKeyboardShortcutsListener();\n var self = this; // initialize select2\n\n jQuery('#trp-language-select, #trp-view-as-select').select2({\n width: '100%'\n }); //init strings dropdown\n\n this.stringsDropdownLoading(); // show overlay when select is opened\n\n jQuery('#trp-language-select, #trp-string-categories').on('select2:open', function () {\n jQuery('#trp_select2_overlay').fadeIn('100');\n }).on('select2:close', function () {\n jQuery('#trp_select2_overlay').hide();\n }).on('select2:opening', function (e) {\n /* when we have unsaved changes prevent the strings dropdown from opening so we do not have a disconnect between the textareas and the dropdown */\n if (self.hasUnsavedChanges()) {\n e.preventDefault();\n }\n }); // resize sidebar and consequently the iframe\n\n var previewContainer = jQuery('#trp-preview');\n var total_width = jQuery(window).width();\n jQuery('#trp-controls').resizable({\n start: function start() {\n previewContainer.toggle();\n },\n stop: function stop() {\n previewContainer.toggle();\n },\n handles: 'e',\n minWidth: 285,\n maxWidth: total_width - 20\n }).bind(\"resize\", this.resizeIframe); // resize iframe when resizing window\n\n jQuery(window).resize(function () {\n self.resizeIframe();\n });\n },\n watch: {\n currentLanguage: function currentLanguage(_currentLanguage) {\n var self = this; //grab the correct URL from the iFrame\n\n var newURL = this.iframe.querySelector('link[hreflang=\"' + _currentLanguage.replace('_', '-') + '\"]').getAttribute('href');\n this.currentURL = newURL;\n this.iframe.location = newURL; //reset vue props\n\n this.selectedString = '';\n this.selectedIndexesArray = []; //set strings dropdown to loading state\n\n jQuery('#trp-string-categories').val('').trigger('change');\n this.stringsDropdownLoading();\n this.onScreenLanguage = _currentLanguage;\n\n if (this.settings['default-language'] == this.currentLanguage && this.settings['translation-languages'].length > 1) {\n this.settings['translation-languages'].some(function (language) {\n if (language != self.settings['default-language']) {\n // return the first language not default\n self.onScreenLanguage = language;\n return true;\n }\n });\n }\n },\n currentURL: function currentURL(newUrl, oldUrl) {\n window.history.replaceState(null, null, this.parentURL(newUrl));\n },\n viewAs: function viewAs(role) {\n if (!this.currentURL || !this.iframe) return;\n var url = this.cleanURL(this.currentURL);\n url = _utils__WEBPACK_IMPORTED_MODULE_1__[\"default\"].updateUrlParameter(url, 'trp-edit-translation', 'preview');\n\n if (role == 'current_user') {\n this.iframe.location = url;\n return;\n } //if nonce not available, an update to the Browse as Other Roles add-on is required\n\n\n if (!this.nonces[role]) {\n alert(this.editorStrings.bor_update_notice);\n return;\n }\n\n url = _utils__WEBPACK_IMPORTED_MODULE_1__[\"default\"].updateUrlParameter(url, 'trp-view-as', role);\n url = _utils__WEBPACK_IMPORTED_MODULE_1__[\"default\"].updateUrlParameter(url, 'trp-view-as-nonce', this.nonces[role]);\n this.iframe.location = url;\n },\n selectedString: function selectedString(selectedStringArrayIndex, oldString) {\n if (this.hasUnsavedChanges() || !selectedStringArrayIndex && selectedStringArrayIndex !== 0) return;\n jQuery('#trp-string-categories').val(selectedStringArrayIndex !== null ? selectedStringArrayIndex : '').trigger('change');\n var selectedString = this.dictionary[selectedStringArrayIndex];\n if (!selectedString) return;\n var currentNode = this.iframe.querySelector(\"[\" + selectedString.selector + \"='\" + selectedString.dbID + \"']\");\n var selectedIndexesArray = []; //when merging we do not have a valid current node, so we just add the fake id\n\n if (currentNode) {\n var self = this;\n var selectors = self.getAllSelectors();\n var nodes = [];\n nodes.push(currentNode);\n\n if (currentNode.tagName != \"A\") {\n // include the anchor's translatable attributes\n var anchorParent = currentNode.closest('a');\n\n if (anchorParent != null) {\n nodes.push(anchorParent);\n }\n }\n\n if (currentNode.tagName == \"A\" && currentNode.children.length > 0) {\n // include all the translatable attributes inside the anchor\n var childrenArray = _toConsumableArray(currentNode.children);\n\n childrenArray.forEach(function (child) {\n nodes.push(child);\n });\n }\n\n nodes.forEach(function (node) {\n selectors.forEach(function (selector) {\n var stringId = node.getAttribute(selector);\n\n if (stringId) {\n var found = false;\n var i;\n\n for (i = 0; i < selectedIndexesArray.length; i++) {\n if (typeof self.dictionary[selectedIndexesArray[i]] !== 'undefined' && self.dictionary[selectedIndexesArray[i]].dbID !== 'undefined' && self.dictionary[selectedIndexesArray[i]].dbID === stringId) {\n found = true;\n break;\n }\n }\n\n if (!found) {\n selectedIndexesArray.push(self.getStringIndex(selector, stringId));\n }\n }\n });\n });\n } else selectedIndexesArray.push(selectedStringArrayIndex);\n\n this.selectedIndexesArray = selectedIndexesArray;\n }\n },\n computed: {\n closeURL: function closeURL() {\n return this.cleanURL(this.currentURL);\n }\n },\n methods: {\n iFrameLoaded: function iFrameLoaded() {\n var self = this;\n var iframeElement = document.querySelector('#trp-preview-iframe');\n this.iframe = iframeElement.contentDocument || iframeElement.contentWindow.document; //sync iFrame URL with parent\n\n if (this.currentURL != this.iframe.URL) this.currentURL = this.iframe.URL; //hide iFrame loader\n\n this.iframeLoader('hide');\n self.detectedSelectorAndId = [];\n self.dictionary = [];\n this.scanIframeForStrings();\n window.addEventListener('trp_iframe_page_updated', this.scanIframeForStrings); //event that is fired when the iFrame is navigated\n\n iframeElement.contentWindow.onbeforeunload = function () {\n self.iframeLoader('show');\n self.selectedString = null;\n self.selectedIndexesArray = [];\n self.translationNotLoadedYet = false;\n self.stringsDropdownLoading();\n };\n },\n scanIframeForStrings: function scanIframeForStrings() {\n this.scanForSelector('data-trp-translate-id', 'regular', this.onScreenLanguage);\n this.scanForSelector('data-trpgettextoriginal', 'gettext', this.currentLanguage);\n this.scanForSelector('data-trp-post-slug', 'postslug', this.currentLanguage);\n },\n scanForSelector: function scanForSelector(baseSelector, typeSlug, languageOfIds) {\n this.loading_strings++;\n var self = this;\n var selectors = this.prepareSelectorStrings(baseSelector);\n\n var nodes = _toConsumableArray(this.iframe.querySelectorAll('[' + selectors.join('],[') + ']'));\n\n var stringIdsArray = [],\n nodeData = [],\n nodeEntries = [];\n nodes.forEach(function (node) {\n nodeEntries = self.getNodeInfo(node, baseSelector);\n nodeEntries.forEach(function (entry) {\n // this check ensures that we don't create duplicates when rescanning after ajax complete\n if (!self.alreadyDetected(entry.selector, entry.dbID)) {\n stringIdsArray.push(entry.dbID);\n nodeData.push(entry);\n }\n });\n self.setupEventListener(node);\n }); //unique ids only\n\n stringIdsArray = _toConsumableArray(new Set(stringIdsArray));\n\n if (stringIdsArray.length > 0) {\n var data = new FormData();\n data.append('action', 'trp_get_translations_' + typeSlug);\n data.append('all_languages', 'true');\n data.append('security', this.nonces['gettranslationsnonce' + typeSlug]);\n data.append('language', languageOfIds);\n data.append('string_ids', JSON.stringify(stringIdsArray));\n axios__WEBPACK_IMPORTED_MODULE_2___default.a.post(this.ajax_url, data).then(function (response) {\n self.loading_strings--;\n self.addToDictionary(response.data, nodeData);\n })[\"catch\"](function (error) {\n console.log(error);\n });\n } else {\n self.loading_strings--;\n }\n },\n alreadyDetected: function alreadyDetected(selector, dbId) {\n var combined = selector + '=' + dbId;\n\n if (_utils__WEBPACK_IMPORTED_MODULE_1__[\"default\"].arrayContainsItem(this.detectedSelectorAndId, combined)) {\n return true;\n } else {\n this.detectedSelectorAndId.push(combined);\n return false;\n }\n },\n setupEventListener: function setupEventListener(node) {\n if (node.tagName == 'A' && !node.hasAttribute('data-trpgettextoriginal')) return false;\n var self = this;\n node.addEventListener('mouseenter', self.$refs.hoverActions.showPencilIcon);\n },\n addToDictionary: function addToDictionary(responseData) {\n var nodeInfo = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;\n var self = this;\n\n if (responseData != null) {\n if (nodeInfo) {\n nodeInfo.forEach(function (infoRow, index) {\n responseData.some(function (responseDataRow) {\n if (infoRow.dbID == responseDataRow.dbID) {\n //bring block_type to the top level object\n if (responseDataRow.type != 'gettext' && typeof responseDataRow.block_type == 'undefined') {\n var firstLanguage = self.orderedSecondaryLanguages[0];\n if (typeof responseDataRow.translationsArray[firstLanguage].block_type != 'undefined') responseDataRow.block_type = responseDataRow.translationsArray[firstLanguage].block_type;\n }\n\n nodeInfo[index] = Object.assign({}, responseDataRow, infoRow);\n return true; // a sort of break\n }\n });\n });\n } else {\n nodeInfo = responseData;\n }\n\n this.stringGroups = this.addToStringGroups(nodeInfo);\n this.dictionary = this.dictionary.concat(nodeInfo);\n this.initStringsDropdown();\n }\n },\n addToStringGroups: function addToStringGroups(strings) {\n // see what node groups are found\n var foundStringGroups = this.stringGroups;\n strings.forEach(function (string) {\n if (foundStringGroups.indexOf(string.group) === -1 && (typeof string.blockType === 'undefined' || string.blockType !== '2')) {\n foundStringGroups.push(string.group);\n }\n }); // put the node groups in the order that we want, according to the prop this.stringGroupOrder\n\n var orderedStringGroups = [];\n\n if (this.editorStrings.seo_update_notice != 'seo_pack_update_not_needed') {\n orderedStringGroups.push(this.editorStrings.seo_update_notice);\n }\n\n this.stringGroupOrder.forEach(function (group) {\n if (foundStringGroups.indexOf(group) !== -1) {\n orderedStringGroups.push(group);\n }\n }); // if there were any other string groups that were not in the prop, add them at the end.\n\n foundStringGroups.forEach(function (group) {\n if (orderedStringGroups.indexOf(group) === -1) {\n orderedStringGroups.push(group);\n }\n });\n return orderedStringGroups;\n },\n getStringIndex: function getStringIndex(selector, dbID) {\n var found = null;\n this.dictionary.some(function (string, index) {\n if (string.dbID == dbID && string.selector == selector) {\n found = index;\n return true;\n }\n });\n return found;\n },\n getNodeInfo: function getNodeInfo(node) {\n var baseSelector = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';\n var stringId;\n var nodeData = [];\n var selectors = this.prepareSelectorStrings(baseSelector);\n selectors.forEach(function (selector) {\n stringId = node.getAttribute(selector);\n\n if (stringId) {\n var nodeAttribute = selector.replace(baseSelector, '');\n var nodeGroup = node.getAttribute('data-trp-node-group' + nodeAttribute);\n var nodeDescription = node.getAttribute('data-trp-node-description' + nodeAttribute);\n var entry = {\n dbID: stringId,\n selector: selector,\n attribute: nodeAttribute.substr(1) // substr(1) is used to trim prefixing line - ex. -alt will result in alt (no line)\n\n };\n if (nodeGroup) entry.group = nodeGroup;\n if (nodeDescription) entry.description = nodeDescription;\n nodeData.push(entry);\n }\n });\n return nodeData;\n },\n getAllSelectors: function getAllSelectors() {\n var selectors = [];\n var self = this;\n this.dataAttributes.forEach(function (dataAttribute) {\n selectors = selectors.concat(self.prepareSelectorStrings(dataAttribute));\n });\n return selectors;\n },\n prepareSelectorStrings: function prepareSelectorStrings(baseNameSelector) {\n var parsed_selectors = [];\n this.selectors.forEach(function (selectorSuffix, index) {\n parsed_selectors.push(baseNameSelector + selectorSuffix);\n });\n return parsed_selectors;\n },\n parentURL: function parentURL(url) {\n return url.replace('trp-edit-translation=preview', 'trp-edit-translation=true');\n },\n cleanURL: function cleanURL(url) {\n //make removeUrlParameter recursive and only call it once with all the parameters that\n //need to stripped ?\n url = _utils__WEBPACK_IMPORTED_MODULE_1__[\"default\"].removeUrlParameter(url, 'lang');\n url = _utils__WEBPACK_IMPORTED_MODULE_1__[\"default\"].removeUrlParameter(url, 'trp-view-as');\n url = _utils__WEBPACK_IMPORTED_MODULE_1__[\"default\"].removeUrlParameter(url, 'trp-view-as-nonce');\n url = _utils__WEBPACK_IMPORTED_MODULE_1__[\"default\"].removeUrlParameter(url, 'trp-edit-translation');\n return url;\n },\n showString: function showString(string, type) {\n if (typeof string.blockType !== 'undefined' && string.blockType === '2') {\n // don't show deprecated translation blocks in the dropdown\n return false;\n }\n\n if (type === this.editorStrings.images && typeof string.attribute != 'undefined' && string.attribute == 'src') return true;\n if (typeof string.attribute !== 'undefined' && (string.attribute == 'href' || string.attribute == 'src')) return false;\n if (string.group === type) return true;\n return false;\n },\n initStringsDropdown: function initStringsDropdown() {\n var self = this;\n\n if (!this.isStringsDropdownOpen()) {\n jQuery('#trp-string-categories').select2('destroy');\n jQuery('#trp-string-categories').select2({\n placeholder: self.editorStrings.select_string,\n templateResult: function templateResult(option) {\n var original = he__WEBPACK_IMPORTED_MODULE_7___default.a.decode(option.text.substring(0, 90)) + (option.text.length <= 90 ? '' : '...');\n var description = option.title ? '(' + option.title + ')' : '';\n return jQuery('<div>' + original + '</div><div class=\"string-selector-description\">' + description + '</div>');\n },\n width: '100%'\n }).prop('disabled', false);\n jQuery('#trp_select2_overlay').hide();\n }\n },\n stringsDropdownLoading: function stringsDropdownLoading() {\n jQuery('#trp-string-categories').select2({\n placeholder: this.editorStrings.strings_loading,\n width: '100%'\n }).prop('disabled', true);\n },\n processOptionName: function processOptionName(name, type) {\n if (type == 'Images') return _utils__WEBPACK_IMPORTED_MODULE_1__[\"default\"].getFilename(name);\n return _utils__WEBPACK_IMPORTED_MODULE_1__[\"default\"].escapeHtml(name);\n },\n isStringsDropdownOpen: function isStringsDropdownOpen() {\n return jQuery('#trp-string-categories').select2('isOpen');\n },\n hasUnsavedChanges: function hasUnsavedChanges() {\n var unsavedChanges = false;\n var self = this;\n\n if (this.selectedIndexesArray.length > 0) {\n this.selectedIndexesArray.forEach(function (selectedIndex) {\n self.settings['translation-languages'].forEach(function (languageCode) {\n if (self.dictionary[selectedIndex] && self.dictionary[selectedIndex].translationsArray[languageCode] && self.dictionary[selectedIndex].translationsArray[languageCode].translated !== self.dictionary[selectedIndex].translationsArray[languageCode].editedTranslation) {\n unsavedChanges = true;\n }\n });\n });\n }\n\n this.showChangesUnsavedMessage = unsavedChanges;\n return unsavedChanges;\n },\n iframeLoader: function iframeLoader(status) {\n var loader = document.getElementById('trp-preview-loader');\n if (status == 'show') loader.style.display = 'flex';else if (status == 'hide') loader.style.display = 'none';\n },\n previousString: function previousString() {\n var currentValue = document.getElementById('trp-string-categories').value;\n var newValue = +currentValue - 1;\n\n while (newValue >= 0 && document.querySelectorAll('#trp-string-categories option[value=\"' + newValue + '\"]').length === 0) {\n newValue--;\n }\n\n if (newValue < 0) return;\n this.selectedString = newValue.toString();\n },\n nextString: function nextString() {\n var currentValue = document.getElementById('trp-string-categories').value,\n newValue = 0;\n if (currentValue != '') newValue = +currentValue + 1;\n\n while (newValue < this.dictionary.length && document.querySelectorAll('#trp-string-categories option[value=\"' + newValue + '\"]').length === 0) {\n newValue++;\n }\n\n if (newValue >= this.dictionary.length) {\n return;\n }\n\n this.selectedString = newValue.toString();\n },\n addKeyboardShortcutsListener: function addKeyboardShortcutsListener() {\n document.addEventListener(\"keydown\", function (e) {\n if ((window.navigator.platform.match(\"Mac\") ? e.metaKey : e.ctrlKey) && e.altKey) {\n // CTRL + ALT + right arrow\n if (e.keyCode === 39) {\n e.preventDefault();\n window.dispatchEvent(new Event('trp_trigger_next_string_event'));\n } else {\n // CTRL + ALT + left arrow\n if (e.keyCode === 37) {\n e.preventDefault();\n window.dispatchEvent(new Event('trp_trigger_previous_string_event'));\n }\n }\n }\n }, false);\n window.addEventListener('trp_trigger_next_string_event', this.nextString);\n window.addEventListener('trp_trigger_previous_string_event', this.previousString);\n },\n resizeIframe: function resizeIframe(event, ui) {\n var total_width = jQuery(window).width();\n var width = jQuery('#trp-controls').width();\n\n if (width > total_width) {\n width = total_width;\n controls.css('width', width);\n }\n\n var previewContainer = jQuery('#trp-preview');\n previewContainer.css('right', width);\n previewContainer.css('left', width - 348);\n previewContainer.css('width', total_width - width);\n }\n },\n //add support for v-model in select2\n directives: {\n select2: {\n inserted: function inserted(el) {\n jQuery(el).on('select2:select', function () {\n var event = new Event('change', {\n bubbles: true,\n cancelable: true\n });\n el.dispatchEvent(event);\n });\n jQuery(el).on('select2:unselect', function () {\n var event = new Event('change', {\n bubbles: true,\n cancelable: true\n });\n el.dispatchEvent(event);\n });\n }\n }\n }\n});//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vYXNzZXRzL3NyYy9qcy9lZGl0b3IudnVlP2E3NjUiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7O0FBdUhBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFFQTtBQUNBLFVBQ0EsY0FEQSxFQUVBLGdCQUZBLEVBR0EsNkJBSEEsRUFJQSxrQkFKQSxFQUtBLG9CQUxBLEVBTUEsZUFOQSxFQU9BLGFBUEEsRUFRQSxrQkFSQSxFQVNBLGlCQVRBLEVBVUEsVUFWQSxFQVdBLGVBWEEsRUFZQSxvQkFaQSxFQWFBLGFBYkEsRUFjQSxnQkFkQSxFQWVBLGNBZkEsRUFnQkEsWUFoQkEsQ0FEQTtBQW1CQTtBQUNBLHlGQURBO0FBRUEsK0ZBRkE7QUFHQSx1RkFIQTtBQUlBO0FBSkEsR0FuQkE7QUF5QkEsTUF6QkEsa0JBeUJBO0FBQ0E7QUFDQTtBQUNBLDZDQUZBO0FBR0Esb0RBSEE7QUFJQSw2RUFKQTtBQUtBLDJDQUxBO0FBTUEsNENBTkE7QUFPQSw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HMtY2xvc2VcIiA6aHJlZj1cImNsb3NlVVJMXCIgOnRpdGxlPVwiZWRpdG9yU3RyaW5ncy5jbG9zZVwiPjwvYT5cclxuICAgICAgICAgICAgICAgICAgICA8ZGl2IGlkPVwidHJwLXNhdmUtYW5kLWxvYWRlci1zcGlubmVyXCI+XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIDxzcGFuIGNsYXNzPVwidHJwLWFqYXgtbG9hZGVyXCIgdi1zaG93PVwibG9hZGluZ19zdHJpbmdzID4gMFwiIGlkPVwidHJwLXN0cmluZy1zYXZlZC1hamF4LWxvYWRlclwiPlxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgPGRpdiBjbGFzcz1cInRycC1zcGlubmVyXCI+PC9kaXY+XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIDwvc3Bhbj5cclxuICAgICAgICAgICAgICAgICAgICAgICAgPHNhdmUtdHJhbnNsYXRpb25zXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOnNlbGVjdGVkSW5kZXhlc0FycmF5PVwic2VsZWN0ZWRJbmRleGVzQXJyYXlcIlxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDpkaWN0aW9uYXJ5PVwiZGljdGlvbmFyeVwiXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOnNldHRpbmdzPVwic2V0dGluZ3NcIlxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDpub25jZXM9XCJub25jZXNcIlxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDphamF4X3VybD1cImFqYXhfdXJsXCJcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA6Y3VycmVudExhbmd1YWdlPVwiY3VycmVudExhbmd1YWdlXCJcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA6b25TY3JlZW5MYW5ndWFnZT1cIm9uU2NyZWVuTGFuZ3VhZ2VcIlxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDppZnJhbWU9XCJpZnJhbWVcIlxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDpjdXJyZW50VVJMPVwiY3VycmVudFVSTFwiXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOm1lcmdpbmdTdHJpbmc9XCJtZXJnaW5nU3RyaW5nXCJcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA6bWVyZ2VEYXRhPVwibWVyZ2VEYXRhXCJcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBAdHJhbnNsYXRpb25zLXNhdmVkPVwic2hvd0NoYW5nZXNVbnNhdmVkTWVzc2FnZSA9IGZhbHNlXCJcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA6ZWRpdG9yU3RyaW5ncz1cImVkaXRvclN0cmluZ3NcIlxyXG4gICAgICAgICAgICAgICAgICAgICAgICA+XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIDwvc2F2ZS10cmFuc2xhdGlvbnM+XHJcbiAgICAgICAgICAgICAgICAgICAgPC9kaXY+XHJcbiAgICAgICAgICAgICAgICA8L2Rpdj5cclxuXHJcbiAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzPVwidHJwLWNvbnRyb2xzLXNlY3Rpb25cIj5cclxuXHJcbiAgICAgICAgICAgICAgICAgICAgPGRpdiBjbGFzcz1cInRycC1jb250cm9scy1zZWN0aW9uLWNvbnRlbnRcIj5cclxuICAgICAgICAgICAgICAgICAgICAgICAgPGRpdiBpZD1cInRycC1sYW5ndWFnZS1zd2l0Y2hcIj5cclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxzZWxlY3QgaWQ9XCJ0cnAtbGFuZ3VhZ2Utc2VsZWN0XCIgbmFtZT1cImxhbmdcIiB2LW1vZGVsPVwiY3VycmVudExhbmd1YWdlXCIgdi1zZWxlY3QyPlxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxvcHRpb24gdi1mb3I9XCIobGFuZywgbGFuZ0luZGV4KSBpbiBsYW5ndWFnZU5hbWVzXCIgOnZhbHVlPVwibGFuZ0luZGV4XCI+e3tsYW5nfX08L29wdGlvbj5cclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIDwvc2VsZWN0PlxyXG4gICAgICAgICAgICAgICAgICAgICAgICA8L2Rpdj5cclxuXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIDxkaXYgaWQ9XCJ0cnAtc3RyaW5nLWxpc3RcIj5cclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxzZWxlY3QgaWQ9XCJ0cnAtc3RyaW5nLWNhdGVnb3JpZXNcIiB2LW1vZGVsPVwic2VsZWN0ZWRTdHJpbmdcIiB2LXNlbGVjdDI+XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPG9wdGdyb3VwIHYtZm9yPVwiKGdyb3VwKSBpbiBzdHJpbmdHcm91cHNcIiA6bGFiZWw9XCJncm91cFwiPlxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8b3B0aW9uIHYtZm9yPVwiKHN0cmluZywgaW5kZXgpIGluIGRpY3Rpb25hcnlcIiA6dmFsdWU9XCJpbmRleFwiIHYtaWY9XCJzaG93U3RyaW5nKCBzdHJpbmcsIGdyb3VwIClcIiA6dGl0bGU9XCJzdHJpbmcuZGVzY3JpcHRpb25cIiA6ZGF0YS1kYXRhYmFzZS1pZD1cInN0cmluZy5kYklEXCIgOmRhdGEtZ3JvdXA9XCJzdHJpbmcuZ3JvdXBcIj57eyBwcm9jZXNzT3B0aW9uTmFtZSggc3RyaW5nLm9yaWdpbmFsLCBncm91cCApIH19PC9vcHRpb24+XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPC9vcHRncm91cD5cclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIDwvc2VsZWN0PlxyXG4gICAgICAgICAgICAgICAgICAgICAgICA8L2Rpdj5cclxuXHJcbiAgIC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gICAgICAgICAgPG9wdGlvbiB2LWZvcj1cIihyb2xlLCByb2xlSW5kZXgpIGluIHJvbGVzXCIgOnZhbHVlPVwicm9sZVwiIDpkaXNhYmxlZD1cIiFyb2xlXCIgOnRpdGxlPVwiIXJvbGUgPyBlZGl0b3JTdHJpbmdzLnZpZXdfYXNfcHJvIDogJydcIj57e3JvbGVJbmRleH19PC9vcHRpb24+XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICA8L3NlbGVjdD5cclxuICAgICAgICAgICAgICAgICAgICAgICAgPC9kaXY+XHJcbiAgICAgICAgICAgICAgICAgICAgPC9kaXY+XHJcblxyXG4gICAgICAgICAgICAgICAgPC9kaXY+XHJcblxyXG4gICAgICAgICAgICAgICAgPGRpdiBjbGFzcz1cInRycC1jb250cm9scy1zZWN0aW9uXCIgdi1zaG93PVwic2VsZWN0ZWRTdHJpbmcgIT09IG51bGxcIj5cclxuICAgICAgICAgICAgICAgICAgICA8bGFuZ3VhZ2UtYm94ZXNcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIDpzZWxlY3RlZEluZGV4ZXNBcnJheT1cInNlbGVjdGVkSW5kZXhlc0FycmF5XCJcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIDpkaWN0aW9uYXJ5PVwiZGljdGlvbmFyeVwiXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICA6Y3VycmVudExhbmd1YWdlPVwiY3VycmVudExhbmd1YWdlXCJcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIDpvblNjcmVlbkxhbmd1YWdlPVwib25TY3JlZW5MYW5ndWFnZVwiXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICA6bGFuZ3VhZ2VOYW1lcz1cImxhbmd1YWdlTmFtZXNcIlxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgOnNldHRpbmdzPVwic2V0dGluZ3NcIlxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgOnNob3dDaGFuZ2VzVW5zYXZlZE1lc3NhZ2U9XCJzaG93Q2hhbmdlc1Vuc2F2ZWRNZXNzYWdlXCJcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIEBkaXNjYXJkZWQtY2hhbmdlcz1cImhhc1Vuc2F2ZWRDaGFuZ2VzKClcIlxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgOmVkaXRvclN0cmluZ3M9XCJlZGl0b3JTdHJpbmdzXCJcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIDpmbGFnc1BhdGg9XCJmbGFnc1BhdGhcIlxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgOmlmcmFtZT1cImlmcmFtZVwiXHJcbiAgICAgICAgICAgICAgICAgICAgPlxyXG4gICAgICAgICAgICAgICAgICAgIDwvbGFuZ3VhZ2UtYm94ZXM+XHJcbiAgICAgICAgICAgICAgICA8L2Rpdj5cclxuXHJcbiAgICAgICAgICAgICAgICA8ZXh0cmEtY29udGVudCA6bGFuZ3VhZ2VOYW1lcz1cImxhbmd1YWdlTmFtZXNcIiA6ZWRpdG9yU3RyaW5ncz1cImVkaXRvclN0cmluZ3NcIiA6cGFpZFZlcnNpb249XCJwYWlkX3ZlcnNpb25cIj48L2V4dHJhLWNvbnRlbnQ+XHJcblxyXG4gICAgICAgICAgICAgICAgPGRpdiBjbGFzcz1cInRycC1jb250cm9scy1zZWN0aW9uXCIgdi1zaG93PVwidHJhbnNsYXRpb25Ob3RMb2FkZWRZZXRcIj5cclxuICAgICAgICAgICAgICAgICAgICA8ZGl2IGlkPVwidHJwLXRyYW5zbGF0aW9uLW5vdC1yZWFkeS1zZWN0aW9uXCIgY2xhc3M9XCJ0cnAtY29udHJvbHMtc2VjdGlvbi1jb250ZW50XCI+XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIDxwIHYtaHRtbD1cImVkaXRvclN0cmluZ3MudHJhbnNsYXRpb25fbm90X2xvYWRlZF95ZXRcIj48L3A+XHJcbiAgICAgICAgICAgICAgICAgICAgPC9kaXY+XHJcbiAgICAgICAgICAgICAgICA8L2Rpdj5cclxuICAgICAgICAgICAgPC9kaXY+XHJcblxyXG4gICAgICAgICAgICA8ZGl2IGlkPVwidHJwX3NlbGVjdDJfb3ZlcmxheVwiPjwvZGl2PlxyXG5cclxuICAgICAgICAgICAgPGhvdmVyLWFjdGlvbnNcclxuICAgICAgICAgICAgICAgIHJlZj1cImhvdmVyQWN0aW9uc1wiXHJcbiAgICAgICAgICAgICAgICA6ZGljdGlvbmFyeT1cImRpY3Rpb25hcnlcIlxyXG4gICAgICAgICAgICAgICAgOnNldHRpbmdzPVwic2V0dGluZ3NcIlxyXG4gICAgICAgICAgICAgICAgOmlmcmFtZT1cImlmcmFtZVwiXHJcbiAgICAgICAgICAgICAgICA6ZGF0YUF0dHJpYnV0ZXM9XCJkYXRhQXR0cmlidXRlc1wiXHJcbiAgICAgICAgICAgICAgICA6bWVyZ2VSdWxlcz1cIm1lcmdlUnVsZXNcIlxyXG4gICAgICAgICAgICAgICAgOm5vbmNlcz1cIm5vbmNlc1wiXHJcbiAgICAgICAgICAgICAgICA6YWpheF91cmw9XCJhamF4X3VybFwiXHJcbiAgICAgICAgICAgICAgICA6bWVyZ2VEYXRhPVwibWVyZ2VEYXRhXCJcclxuICAgICAgICAgICAgICAgIDplZGl0b3JTdHJpbmdzPVwiZWRpdG9yU3RyaW5nc1wiXHJcbiAgICAgICAgICAgID5cclxuICAgICAgICAgICAgPC9ob3Zlci1hY3Rpb25zPlxyXG4gICAgICAgIDwvZGl2PlxyXG5cclxuICAgICAgICA8ZGl2IGlkPVwidHJwLXByZXZpZXdcIj5cclxuICAgICAgICAgICAgPGlmcmFtZSBpZD1cInRycC1wcmV2aWV3LWlmcmFtZVwiIDpzcmM9XCJ1cmxUb0xvYWRcIiB2LW9uOmxvYWQ9XCJpRnJhbWVMb2FkZWRcIj48L2lmcmFtZT5cclxuXHJcbiAgICAgICAgICAgIDxkaXYgaWQ9XCJ0cnAtcHJldmlldy1sb2FkZXJcIj5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gICAgICAgICAgICAgICBmcm9tICdoZSdcclxuXHJcbiAgICBleHBvcnQgZGVmYXVsdCB7XHJcbiAgICAgICAgcHJvcHM6IFtcclxuICAgICAgICAgICAgJ3RycF9zZXR0aW5ncycsXHJcbiAgICAgICAgICAgICdsYW5ndWFnZV9uYW1lcycsXHJcbiAgICAgICAgICAgICdvcmRlcmVkX3NlY29uZGFyeV9sYW5ndWFnZXMnLFxyXG4gICAgICAgICAgICAnY3VycmVudF9sYW5ndWFnZScsXHJcbiAgICAgICAgICAgICdvbl9zY3JlZW5fbGFuZ3VhZ2UnLFxyXG4gICAgICAgICAgICAndmlld19hc19yb2xlcycsXHJcbiAgICAgICAgICAgICd1cmxfdG9fbG9hZCcsXHJcbiAgICAgICAgICAgICdzdHJpbmdfc2VsZWN0b3JzJyxcclxuICAgICAgICAgICAgJ2RhdGFfYXR0cmlidXRlcycsXHJcbiAgICAgICAgICAgICdhamF4X3VybCcsXHJcbiAgICAgICAgICAgICdlZGl0b3Jfbm9uY2VzJyxcclxuICAgICAgICAgICAgJ3N0cmluZ19ncm91cF9vcmRlcicsXHJcbiAgICAgICAgICAgICdtZXJnZV9ydWxlcycsXHJcbiAgICAgICAgICAgICdsb2NhbGl6ZWRfdGV4dCcsXHJcbiAgICAgICAgICAgICdwYWlkX3ZlcnNpb24nLFxyXG4gICAgICAgICAgICAnZmxhZ3NfcGF0aCdcclxuICAgICAgICBdLFxyXG4gICAgICAgIGNvbXBvbmVudHM6e1xyXG4gICAgICAgICAgICBsYW5ndWFnZUJveGVzLFxyXG4gICAgICAgICAgICBzYXZlVHJhbnNsYXRpb25zLFxyXG4gICAgICAgICAgICBob3ZlckFjdGlvbnMsXHJcbiAgICAgICAgICAgIGV4dHJhQ29udGVudFxyXG4gICAgICAgIH0sXHJcbiAgICAgICAgZGF0YSgpe1xyXG4gICAgICAgICAgICByZXR1cm4ge1xyXG4gICAgICAgICAgICAgICAgLy9wcm9wc1xyXG4gICAgICAgICAgICAgICAgc2V0dGluZ3MgICAgICAgICAgICAgICAgICA6IEpTT04ucGFyc2UoIHRoaXMudHJwX3NldHRpbmdzICksXHJcbiAgICAgICAgICAgICAgICBsYW5ndWFnZU5hbWVzICAgICAgICAgICAgIDogSlNPTi5wYXJzZSggdGhpcy5sYW5ndWFnZV9uYW1lcyApLFxyXG4gICAgICAgICAgICAgICAgb3JkZXJlZFNlY29uZGFyeUxhbmd1YWdlcyA6IEpTT04ucGFyc2UoIHRoaXMub3JkZXJlZF9zZWNvbmRhcnlfbGFuZ3VhZ2VzICksXHJcbiAgICAgICAgICAgICAgICByb2xlcyAgICAgICAgICAgICAgICAgICAgIDogSlNPTi5wYXJzZSggdGhpcy52aWV3X2FzX3JvbGVzICksXHJcbiAgICAgICAgICAgICAgICBub25jZXMgICAgICAgICAgICAgICAgICAgIDogSlNPTi5wYXJzZSggdGhpcy5lZGl0b3Jfbm9uY2VzKSxcclxuICAgICAgICAgICAgICAgIHN0cmluZ0dyb3VwT3JkZXIgICAgICAgICAgOiBKU09OLnBhcnNlKCB0aGlzLnN0cmluZ19ncm91cF9vcmRlciksXHJcbiAgICAgICAgICAgICAgICBzZWxlY3RvcnMgICAgICAgICAgICAgICAgIDogSlNPTi5wYXJzZSggdGhpcy5zdHJpbmdfc2VsZWN0b3JzICksXHJcbiAgICAgICAgICAgICAgICBkYXRhQXR0cmlidXRlcyAgICAgICAgICAgIDogSlNPTi5wYXJzZSggdGhpcy5kYXRhX2F0dHJpYnV0ZXMgKSxcclxuICAgICAgICAgICAgICAgIG1lcmdlUnVsZXMgICAgICAgICAgICAgICAgOiBKU09OLnBhcnNlKCB0aGlzLm1lcmdlX3J1bGVzICksXHJcbiAgICAgICAgICAgICAgICBlZGl0b3JTdHJpbmdzICAgICAgICAgICAgIDogSlNPTi5wYXJzZSggdGhpcy5sb2NhbGl6ZWRfdGV4dCApLFxyXG4gICAgICAgICAgICAgICAgZmxhZ3NQYXRoICAgICAgICAgICAgICAgICA6IEpTT04ucGFyc2UoIHRoaXMuZmxhZ3NfcGF0aCApLFxyXG4gICAgICAgICAgICAgICAgLy9kYXRhXHJcbiAgICAgICAgICAgICAgICBjdXJyZW50TGFuZ3VhZ2UgICAgICAgICAgIDogdGhpcy5jdXJyZW50X2xhbmd1YWdlLFxyXG4gICAgICAgICAgICAgICAgb25TY3JlZW5MYW5ndWFnZSAgICAgICAgICA6IHRoaXMub25fc2NyZWVuX2xhbmd1YWdlLFxyXG4gICAgICAgICAgICAgICAgY3VycmVudFVSTCAgICAgICAgICAgICAgICA6IHRoaXMudXJsX3RvX2xvYWQsXHJcbiAgICAgICAgICAgICAgICB1cmxUb0xvYWQgICAgICAgICAgICAgICAgIDogdGhpcy51cmxfdG9fbG9hZCxcclxuICAgICAgICAgICAgICAgIGlmcmFtZSAgICAgICAgICAgICAgICAgICAgOiAnJyxcclxuICAgICAgICAgICAgICAgIGRpY3Rpb25hcnkgICAgICAgICAgICAgICAgOiBbXSxcclxuICAgICAgICAgICAgICAgIHNlbGVjdGVkU3RyaW5nICAgICAgICAgICAgOiBudWxsLFxyXG4gICAgICAgICAgICAgICAgc2VsZWN0ZWRJbmRleGVzQXJyYXkgICAgICA6IFtdLFxyXG4gICAgICAgICAgICAgICAgZGV0ZWN0ZWRTZWxlY3RvckFuZElkICAgICA6IFtdLFxyXG4gICAgICAgICAgICAgICAgc3RyaW5nR3JvdXBzICAgICAgICAgICAgICA6IFtdLFxyXG4gICAgICAgICAgICAgICAgbWVyZ2luZ1N0cmluZyAgICAgICAgICAgICA6IGZhbHNlLFxyXG4gICAgICAgICAgICAgICAgbWVyZ2VEYXRhICAgICAgICAgICAgICAgICA6IFtdLFxyXG4gICAgICAgICAgICAgICAgc2hvd0NoYW5nZXNVbnNhdmVkTWVzc2FnZSA6IGZhbHNlLFxyXG4gICAgICAgICAgICAgICAgdmlld0FzICAgICAgICAgICAgICAgICAgICA6ICcnLFxyXG4gICAgICAgICAgICAgICAgbG9hZGluZ19zdHJpbmdzICAgICAgICAgICA6IDAsXHJcbiAgICAgICAgICAgICAgICB0cmFuc2xhdGlvbk5vdExvYWRlZFlldCAgIDogZmFsc2UsXHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9LFxyXG4gICAgICAgIGNyZWF0ZWQoKXtcclxuICAgICAgICAgICAgdGhpcy5zZXR0aW5nc1snZGVmYXVsdC1sYW5ndWFnZS1uYW1lJ10gPSB0aGlzLmxhbmd1YWdlTmFtZXNbIHRoaXMuc2V0dGluZ3NbJ2RlZmF1bHQtbGFuZ3VhZ2UnXSBdXHJcblxyXG4gICAgICAgICAgICAvL3NldCBkZWZhdWx0IHZhbHVlIGZvciB0aGUgVmlldyBBcyBzZWxlY3RcclxuICAgICAgICAgICAgbGV0IHBhcmFtcyA9IHV0aWxzLmdldFVybFBhcmFtZXRlcnMoIHRoaXMuY3VycmVudFVSTCApXHJcblxyXG4gICAgICAgICAgICBpZiggT2JqZWN0LmtleXMocGFyYW1zKS5sZW5ndGggPiAxICYmIHBhcmFtc1sndHJwLXZpZXctYXMnXSApXHJcbiAgICAgICAgICAgICAgICB0aGlzLnZpZXdBcyA9IHBhcmFtc1sndHJwLXZpZXctYXMnXVxyXG4gICAgICAgICAgICBlbHNlXHJcbiAgICAgICAgICAgICAgICB0aGlzLnZpZXdBcyA9ICdjdXJyZW50X3VzZXInXHJcbiAgICAgICAgfSxcclxuICAgICAgICBtb3VudGVkKCl7XHJcbiAgICAgICAgICAgIHRoaXMuYWRkS2V5Ym9hcmRTaG9ydGN1dHNMaXN0ZW5lcigpXHJcbiAgICAgICAgICAgIGxldCBzZWxmID0gdGhpc1xyXG4gICAgICAgICAgICAvLyBpbml0aWFsaXplIHNlbGVjdDJcclxuICAgICAgICAgICAgalF1ZXJ5KCAnI3RycC1sYW5ndWFnZS1zZWxlY3QsICN0cnAtdmlldy1hcy1zZWxlY3QnICkuc2VsZWN0MiggeyB3aWR0aCA6ICcxMDAlJyB9KVxyXG5cclxuICAgICAgICAgICAgLy9pbml0IHN0cmluZ3MgZHJvcGRvd25cclxuICAgICAgICAgICAgdGhpcy5zdHJpbmdzRHJvcGRvd25Mb2FkaW5nKClcclxuXHJcbiAgICAgICAgICAgIC8vIHNob3cgb3ZlcmxheSB3aGVuIHNlbGVjdCBpcyBvcGVuZWRcclxuICAgICAgICAgICAgalF1ZXJ5KCAnI3RycC1sYW5ndWFnZS1zZWxlY3QsICN0cnAtc3RyaW5nLWNhdGVnb3JpZXMnICkub24oICdzZWxlY3QyOm9wZW4nLCBmdW5jdGlvbigpIHtcclxuICAgICAgICAgICAgICAgIGpRdWVyeSggJyN0cnBfc2VsZWN0Ml9vdmVybGF5JyApLmZhZGVJbiggJzEwMCcgKVxyXG4gICAgICAgICAgICB9KS5vbiggJ3NlbGVjdDI6Y2xvc2UnLCBmdW5jdGlvbigpIHtcclxuICAgICAgICAgICAgICAgIGpRdWVyeSggJyN0cnBfc2VsZWN0Ml9vdmVybGF5JyApLmhpZGUoKVxyXG4gICAgICAgICAgICB9KS5vbiggJ3NlbGVjdDI6b3BlbmluZycsIGZ1bmN0aW9uKGUpIHtcclxuICAgICAgICAgICAgICAgIC8qIHdoZW4gd2UgaGF2ZSB1bnNhdmVkIGNoYW5nZXMgcHJldmVudCB0aGUgc3RyaW5ncyBkcm9wZG93biBmcm9tIG9wZW5pbmcgc28gd2UgZG8gbm90IGhhdmUgYSBkaXNjb25uZWN0IGJldHdlZW4gdGhlIHRleHRhcmVhcyBhbmQgdGhlIGRyb3Bkb3duICovXHJcbiAgICAgICAgICAgICAgICBpZiAoc2VsZi5oYXNVbnNhdmVkQ2hhbmdlcygpKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgZS5wcmV2ZW50RGVmYXVsdCgpXHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIH0pXHJcblxyXG4gICAgICAgICAgICAvLyByZXNpemUgc2lkZWJhciBhbmQgY29uc2VxdWVudGx5IHRoZSBpZnJhbWVcclxuICAgICAgICAgICAgbGV0IHByZXZpZXdDb250YWluZXIgPSBqUXVlcnkoICcjdHJwLXByZXZpZXcnICk7XHJcbiAgICAgICAgICAgIGxldCB0b3RhbF93aWR0aCA9IGpRdWVyeSh3aW5kb3cpLndpZHRoKCk7XHJcbiAgICAgICAgICAgIGpRdWVyeSggJyN0cnAtY29udHJvbHMnICkucmVzaXphYmxlKHtcclxuICAgICAgICAgICAgICAgIHN0YXJ0OiBmdW5jdGlvbiggKSB7IHByZXZpZXdDb250YWluZXIudG9nZ2xlKCk7IH0sXHJcbiAgICAgICAgICAgICAgICBzdG9wOiBmdW5jdGlvbiggKSB7IHByZXZpZXdDb250YWluZXIudG9nZ2xlKCk7IH0sXHJcbiAgICAgICAgICAgICAgICBoYW5kbGVzOiAnZScsXHJcbiAgICAgICAgICAgICAgICBtaW5XaWR0aDogMjg1LFxyXG4gICAgICAgICAgICAgICAgbWF4V2lkdGg6IHRvdGFsX3dpZHRoIC0gMjBcclxuICAgICAgICAgICAgfSkuYmluZCggXCJyZXNpemVcIiwgdGhpcy5yZXNpemVJZnJhbWUgKTtcclxuXHJcbiAgICAgICAgICAgIC8vIHJlc2l6ZSBpZnJhbWUgd2hlbiByZXNpemluZyB3aW5kb3dcclxuICAgICAgICAgICAgalF1ZXJ5KCB3aW5kb3cgKS5yZXNpemUoZnVuY3Rpb24gKCkge1xyXG4gICAgICAgICAgICAgICAgc2VsZi5yZXNpemVJZnJhbWUoKTtcclxuICAgICAgICAgICAgfSk7XHJcbiAgICAgICAgfSxcclxuICAgICAgICB3YXRjaDoge1xyXG4gICAgICAgICAgICBjdXJyZW50TGFuZ3VhZ2U6IGZ1bmN0aW9uKCBjdXJyZW50TGFuZ3VhZ2UgKSB7XHJcbiAgICAgICAgICAgICAgICBsZXQgc2VsZiA9IHRoaXNcclxuICAgICAgICAgICAgICAgIC8vZ3JhYiB0aGUgY29ycmVjdCBVUkwgZnJvbSB0aGUgaUZyYW1lXHJcbiAgICAgICAgICAgICAgICBsZXQgbmV3VVJMID0gdGhpcy5pZnJhbWUucXVlcnlTZ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AgICAgICAgICAgIGlmICggbGFuZ3VhZ2UgIT0gc2VsZi5zZXR0aW5nc1snZGVmYXVsdC1sYW5ndWFnZSddICl7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyByZXR1cm4gdGhlIGZpcnN0IGxhbmd1YWdlIG5vdCBkZWZhdWx0XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBzZWxmLm9uU2NyZWVuTGFuZ3VhZ2UgPSBsYW5ndWFnZVxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHRydWVcclxuICAgICAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgIH0pXHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgIGN1cnJlbnRVUkw6IGZ1bmN0aW9uICggbmV3VXJsLCBvbGRVcmwgKSB7XHJcbiAgICAgICAgICAgICAgICB3aW5kb3cuaGlzdG9yeS5yZXBsYWNlU3RhdGUoIG51bGwsIG51bGwsIHRoaXMucGFyZW50VVJMKCBuZXdVcmwgKSApXHJcbiAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgIHZpZXdBczogZnVuY3Rpb24oIHJvbGUgKSB7XHJcbiAgICAgICAgICAgICAgICBpZiggIXRoaXMuY3VycmVudFVSTCB8fCAhdGhpcy5pZnJhbWUgKVxyXG4gICAgICAgICAgICAgICAgICAgIHJldHVyblxyXG5cclxuICAgICAgICAgICAgICAgIGxldCB1cmwgPSB0aGlzLmNsZWFuVVJMKCB0aGlzLmN1cnJlbnRVUkwgKVxyXG5cclxuICAgICAgICAgICAgICAgIHVybCA9IHV0aWxzLnVwZGF0ZVVybFBhcmFtZXRlciggdXJsLCAndHJwLWVkaXQtdHJhbnNsYXRpb24nLCAncHJldmlldycgKVxyXG5cclxuICAgICAgICAgICAgICAgIGlmKCByb2xlID09ICdjdXJyZW50X3VzZXInICkge1xyXG4gICAgICAgICAgICAgICAgICAgIHRoaXMuaWZyYW1lLmxvY2F0aW9uID0gdXJsXHJcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuXHJcbiAgICAgICAgICAgICAgICB9XHJcblxyXG4gICAgICAgICAgICAgICAgLy9pZiBub25jZSBub3QgYXZhaWxhYmxlLCBhbiB1cGRhdGUgdG8gdGhlIEJyb3dzZSBhcyBPdGhlciBSb2xlcyBhZGQtb24gaXMgcmVxdWlyZWRcclxuICAgICAgICAgICAgICAgIGlmKCAhdGhpcy5ub25jZXNbcm9sZV0gKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgYWxlcnQoIHRoaXMuZWRpdG9yU3RyaW5ncy5ib3JfdXBkYXRlX25vdGljZSApXHJcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuXHJcbiAgICAgICAgICAgICAgICB9XHJcblxyXG4gICAgICAgICAgICAgICAgdXJsID0gdXRpbHMudXBkYXRlVXJsUGFyYW1ldGVyKCB1cmwsICd0cnAtdmlldy1hcycsIHJvbGUgKVxyXG4gICAgICAgICAgICAgICAgdXJsID0gdXRpbHMudXBkYXRlVXJsUGFyYW1ldGVyKCB1cmwsICd0cnAtdmlldy1hcy1ub25jZScsIHRoaXMubm9uY2VzW3JvbGVdIClcclxuXHJcbiAgICAgICAgICAgICAgICB0aGlzLmlmcmFtZS5sb2NhdGlvbiA9IHVybFxyXG4gICAgICAgICAgICB9LFxyXG4gICAgICAgICAgICBzZWxlY3RlZFN0cmluZzogZnVuY3Rpb24gKCBzZWxlY3RlZFN0cmluZ0FycmF5SW5kZXgsIG9sZFN0cmluZyApe1xyXG5cclxuICAgICAgICAgICAgICAgIGlmKCB0aGlzLmhhc1Vuc2F2ZWRDaGFuZ2VzKCkgfHwgKCAhc2VsZWN0ZWRTdHJpbmdBcnJheUluZGV4ICYmIHNlbGVjdGVkU3RyaW5nQXJyYXlJbmRleCAhPT0gMCApIClcclxuICAgICAgICAgICAgICAgICAgICByZXR1cm5cclxuXHJcbiAgICAgICAgICAgICAgICBqUXVlcnkoICcjdHJwLXN0cmluZy1jYXRlZ29yaWVzJyApLnZhbCggc2VsZWN0ZWRTdHJpbmdBcnJheUluZGV4ICE9PSBudWxsID8gc2VsZWN0ZWRTdHJpbmdBcnJheUluZGV4IDogJycgKS50cmlnZ2VyKCAnY2hhbmdlJyApXHJcblxyXG4gICAgICAgICAgICAgICAgbGV0IHNlbGVjdGVkU3RyaW5nICAgICAgID0gdGhpcy5kaWN0aW9uYXJ5W3NlbGVjdGVkU3RyaW5nQXJyYXlJbmRleF1cclxuXHJcbiAgICAgICAgICAgICAgICBpZiggIXNlbGVjdGVkU3RyaW5nIClcclxuICAgICAgICAgICAgICAgICAgICByZXR1cm5cclxuXHJcbiAgICAgICAgICAgICAgICBsZXQgY3VycmVudE5vZGUgICAgICAgICAgPSB0aGlzLmlmcmFtZS5xdWVyeVNlbGVjdG9yKCBcIltcIiArIHNlbGVjdGVkU3RyaW5nLnNlbGVjdG9yICsgXCI9J1wiICsgc2VsZWN0ZWRTdHJpbmcuZGJJRCArIFwiJ11cIilcclxuICAgICAgICAgICAgICAgIGxldCBzZWxlY3RlZEluZGV4ZXNBcnJheSA9IFtdXHJcblxyXG4gICAgICAgICAgICAgICAgLy93aGVuIG1lcmdpbmcgd2UgZG8gbm90IGhhdmUgYSB2YWxpZCBjdXJyZW50IG5vZGUsIHNvIHdlIGp1c3QgYWRkIHRoZSBmYWtlIGlkXHJcbiAgICAgICAgICAgICAgICBpZiggY3VycmVudE5vZGUgKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgbGV0IHNlbGYgPSB0aGlzXHJcbiAgICAgICAgICAgICAgICAgICAgbGV0IHNlbGVjdG9ycyA9IHNlbGYuZ2V0QWxsU2VsZWN0b3JzKClcclxuICAgICAgICAgICAgICAgICAgICBsZXQgbm9kZXMgPSBbXVxyXG5cclxuICAgICAgICAgICAgICAgICAgICBub2Rlcy5wdXNoKCBjdXJyZW50Tm9kZSApXHJcblxyXG4gICAgICAgICAgICAgICAgICAgIGlmICggY3VycmVudE5vZGUudGFnTmFtZSAhPSBcIkFcIiApe1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAvLyBpbmNsdWRlIHRoZSBhbmNob3IncyB0cmFuc2xhdGFibGUgYXR0cmlidXRlc1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBsZXQgYW5jaG9yUGFyZW50ICA9IGN1cnJlbnROb2RlLmNsb3Nlc3QoJ2EnKVxyXG4gICAgICAgICAgICAgICAgICAgICAgICBpZiggIGFuY2hvclBhcmVudCAhPSBudWxsICkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbm9kZXMucHVzaChhbmNob3JQYXJlbnQpXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgICAgICB9XHJcblxyXG4gICAgICAgICAgICAgICAgICAgIGlmICggY3VycmVudE5vZGUudGFnTmFtZSA9PSBcIkFcIiAmJiBjdXJyZW50Tm9kZS5jaGlsZHJlbi5sZW5ndGggPiAwICl7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIC8vIGluY2x1ZGUgYWxsIHRoZSB0cmFuc2xhdGFibGUgYXR0cmlidXRlcyBpbnNpZGUgdGhlIGFuY2hvclxyXG4gICAgICAgICAgICAgICAgICAgICAgICBsZXQgY2hpbGRyZW5BcnJheSA9IFsgLi4uY3VycmVudE5vZGUuY2hpbGRyZW4gXTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgY2hpbGRyZW5BcnJheS5mb3JFYWNoKCBmdW5jdGlvbiAoIGNoaWxkICkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbm9kZXMucHVzaChjaGlsZClcclxuICAgICAgICAgICAgICAgICAgICAgICAgfSlcclxuXHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG5cclxuICAgICAgICAgICAgICAgICAgICBub2Rlcy5mb3JFYWNoKCBmdW5jdGlvbiggbm9kZSApIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgc2VsZWN0b3JzLmZvckVhY2goZnVuY3Rpb24gKHNlbGVjdG9yKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgc3RyaW5nSWQgPSBub2RlLmdldEF0dHJpYnV0ZShzZWxlY3RvcilcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChzdHJpbmdJZCkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBmb3VuZCA9IGZhbHNlXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGlcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBmb3IoIGkgPSAwOyBpIDwgc2VsZWN0ZWRJbmRleGVzQXJyYXkubGVuZ3RoOyBpKysgKXtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKCB0eXBlb2Ygc2VsZi5kaWN0aW9uYXJ5W3NlbGVjdGVkSW5kZXhlc0FycmF5W2ldXSAhPT0gJ3VuZGVmaW5lZCcgJiYgc2VsZi5kaWN0aW9uYXJ5W3NlbGVjdGVkSW5kZXhlc0FycmF5W2ldXS5kYklEICE9PSAndW5kZWZpbmVkJyAmJiBzZWxmLmRpY3Rpb25hcnlbc2VsZWN0ZWRJbmRleGVzQXJyYXlbaV1dLmRiSUQgPT09IHN0cmluZ0lkICl7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBmb3VuZCA9IHRydWVcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICggISBmb3VuZCApIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc2VsZWN0ZWRJbmRleGVzQXJyYXkucHVzaChzZWxmLmdldFN0cmluZ0luZGV4KHNlbGVjdG9yLCBzdHJpbmdJZCkpXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgICAgICB9KVxyXG4gICAgICAgICAgICAgICAgICAgIH0pXHJcbiAgICAgICAgICAgICAgICB9IGVsc2VcclxuICAgICAgICAgICAgICAgICAgICBzZWxlY3RlZEluZGV4ZXNBcnJheS5wdXNoKCBzZWxlY3RlZFN0cmluZ0FycmF5SW5kZXggKVxyXG5cclxuICAgICAgICAgICAgICAgIHRoaXMuc2VsZWN0ZWRJbmRleGVzQXJyYXkgPSBzZWxlY3RlZEluZGV4ZXNBcnJheVxyXG4gICAgICAgICAgICB9LFxyXG4gICAgICAgIH0sXHJcbiAgICAgICAgY29tcHV0ZWQ6IHtcclxuICAgICAgICAgICAgY2xvc2VVUkw6IGZ1bmN0aW9uKCkge1xyXG4gICAgICAgICAgICAgICAgcmV0dXJuIHRoaXMuY2xlYW5VUkwoIHRoaXMuY3VycmVudFVSTCApXHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9LFxyXG4gICAgICAgIG1ldGhvZHM6IHtcclxuICAgICAgICAgICAgaUZyYW1lTG9hZGVkKCl7XHJcbiAgICAgICAgICAgICAgICBsZXQgc2VsZiA9IHRoaXNcclxuICAgICAgICAgICAgICAgIGxldCBpZnJhbWVFbGVtZW50ID0gZG9jdW1lbnQucXVlcnlTZWxlY3RvcignI3RycC1wcmV2aWV3LWlmcmFtZScpXHJcblxyXG4gICAgICAgICAgICAgICAgdGhpcy5pZnJhbWUgPSBpZnJhbWVFbGVtZW50LmNvbnRlbnREb2N1bWVudCB8fCBpZnJhbWVFbGVtZW50LmNvbnRlbnRXaW5kb3cuZG9jdW1lbnRcclxuXHJcbiAgICAgICAgICAgICAgICAvL3N5bmMgaUZyYW1lIFVSTCB3aXRoIHBhcmVudFxyXG4gICAgICAgICAgICAgICAgaWYgKCB0aGlzLmN1cnJlbnRVUkwgIT0gdGhpcy5pZnJhbWUuVVJMIClcclxuICAgICAgICAgICAgICAgICAgICB0aGlzLmN1cnJlbnRVUkwgPSB0aGlzLmlmcmFtZS5VUkxcclxuXHJcbiAgICAgICAgICAgICAgICAvL2hpZGUgaUZyYW1lIGxvYWRlclxyXG4gICAgICAgICAgICAgICAgdGhpcy5pZnJhbWVMb2FkZXIoICdoaWRlJyApXHJcblxyXG4gICAgICAgICAgICAgICAgc2VsZi5kZXRlY3RlZFNlbGVjdG9yQW5kSWQgPSBbXVxyXG4gICAgICAgICAgICAgICAgc2VsZi5kaWN0aW9uYXJ5ICAgICAgICAgICAgPSBbXVxyXG4gICAgICAgICAgICAgICAgdGhpcy5zY2FuSWZyYW1lRm9yU3RyaW5ncygpXHJcblxyXG4gICAgICAgICAgICAgICAgd2luZG93LmFkZEV2ZW50TGlzdGVuZXIoICd0cnBfaWZyYW1lX3BhZ2VfdXBkYXRlZCcsIHRoaXMuc2NhbklmcmFtZUZvclN0cmluZ3MgKVxyXG5cclxuICAgICAgICAgICAgICAgIC8vZXZlbnQgdGhhdCBpcyBmaXJlZCB3aGVuIHRoZSBpRnJhbWUgaXMgbmF2aWdhdGVkXHJcbiAgICAgICAgICAgICAgICBpZnJhbWVFbGVtZW50LmNvbnRlbnRXaW5kb3cub25iZWZvcmV1bmxvYWQgPSBmdW5jdGlvbigpIHtcclxuICAgICAgICAgICAgICAgICAgICBzZWxmLmlmcmFtZUxvYWRlciggJ3Nob3cnIClcclxuXHJcbiAgICAgICAgICAgICAgICAgICAgc2VsZi5zZWxlY3RlZFN0cmluZyA9IG51bGxcclxuICAgICAgICAgICAgICAgICAgICBzZWxmLnNlbGVjdGVkSW5kZXhlc0FycmF5ID0gW11cclxuICAgICAgICAgICAgICAgICAgICBzZWxmLnRyYW5zbGF0aW9uTm90TG9hZGVkWWV0ID0gZmFsc2VcclxuXHJcbiAgICAgICAgICAgICAgICAgICAgc2VsZi5zdHJpbmdzRHJvcGRvd25Mb2FkaW5nKClcclxuICAgICAgICAgICAgICAgIH1cclxuXHJcbiAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgIHNjYW5JZnJhbWVGb3JTdHJpbmdzKCl7XHJcbiAgICAgICAgICAgICAgICB0aGlzLnNjYW5Gb3JTZWxlY3RvciggJ2RhdGEtdHJwLXRyYW5zbGF0ZS1pZCcsICdyZWd1bGFyJywgdGhpcy5vblNjcmVlbkxhbmd1YWdlIClcclxuICAgICAgICAgICAgICAgIHRoaXMuc2NhbkZvclNlbGVjdG9yKCAnZGF0YS10cnBnZXR0ZXh0b3JpZ2luYWwnLCAnZ2V0dGV4dCcsIHRoaXMuY3VycmVudExhbmd1YWdlIClcclxuICAgICAgICAgICAgICAgIHRoaXMuc2NhbkZvclNlbGVjdG9yKCAnZGF0YS10cnAtcG9zdC1zbHVnJywgJ3Bvc3RzbHVnJywgdGhpcy5jdXJyZW50TGFuZ3VhZ2UgKVxyXG4gICAgICAgICAgICB9LFxyXG4gICAgICAgICAgICBzY2FuRm9yU2VsZWN0b3IoIGJhc2VTZWxlY3RvciwgdHlwZVNsdWcsIGxhbmd1YWdlT2ZJZHMgKXtcclxuICAgICAgICAgICAgICAgIHRoaXMubG9hZGluZ19zdHJpbmdzKytcclxuICAgICAgICAgICAgICAgIGxldCBzZWxmICAgICAgICAgICA9IHRoaXNcclxuICAgICAgICAgICAgICAgIGxldCBzZWxlY3RvcnMgICAgICA9IHRoaXMucHJlcGFyZVNlbGVjdG9yU3RyaW5ncyggYmFzZVNlbGVjdG9yIClcclxuICAgICAgICAgICAgICAgIGxldCBub2RlcyAgICAgICAgICA9IFsuLi50aGlzLmlmcmFtZS5xdWVyeVNlbGVjdG9yQWxsKCAnWycgKyBzZWxlY3RvcnMuam9pbignXSxbJykgKyAnXScgKV1cclxuICAgICAgICAgICAgICAgIGxldCBzdHJpbmdJZHNBcnJheSA9IFtdLCBub2RlRGF0YSA9IFtdLCBub2RlRW50cmllcyA9IFtdXHJcblxyXG4gICAgICAgICAgICAgICAgbm9kZXMuZm9yRWFjaCggZnVuY3Rpb24gKCBub2RlICl7XHJcbiAgICAgICAgICAgICAgICAgICAgbm9kZUVudHJpZXMgPSBzZWxmLmdldE5vZGVJbmZvKCBub2RlLCBiYXNlU2VsZWN0b3IgKVxyXG5cclxuICAgICAgICAgICAgICAgICAgICBub2RlRW50cmllcy5mb3JFYWNoKCBmdW5jdGlvbiggZW50cnkgKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIC8vIHRoaXMgY2hlY2sgZW5zdXJlcyB0aGF0IHdlIGRvbid0IGNyZWF0ZSBkdXBsaWNhdGVzIHdoZW4gcmVzY2FubmluZyBhZnRlciBhamF4IGNvbXBsZXRlXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmICggIXNlbGYuYWxyZWFkeURldGVjdGVkKCBlbnRyeS5zZWxlY3RvciwgZW50cnkuZGJJRCApICkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgc3RyaW5nSWRzQXJyYXkucHVzaChlbnRyeS5kYklEKVxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbm9kZURhdGEucHVzaChlbnRyeSlcclxuICAgICAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgIH0pXHJcblxyXG4gICAgICAgICAgICAgICAgICAgIHNlbGYuc2V0dXBFdmVudExpc3RlbmVyKCBub2RlIClcclxuICAgICAgICAgICAgICAgIH0pXHJcblxyXG4gICAgICAgICAgICAgICAgLy91bmlxdWUgaWRzIG9ubHlcclxuICAgICAgICAgICAgICAgIHN0cmluZ0lkc0FycmF5ID0gWy4uLm5ldyBTZXQoc3RyaW5nSWRzQXJyYXkpXVxyXG4gICAgICAgICAgICAgICAgaWYgKCBzdHJpbmdJZHNBcnJheS5sZW5ndGggPiAwICkge1xyXG4gICAgICAgICAgICAgICAgICAgIGxldCBkYXRhID0gbmV3IEZvcm1EYXRhKClcclxuICAgICAgICAgICAgICAgICAgICBkYXRhLmFwcGVuZCgnYWN0aW9uJyAgICAgICAsICd0cnBfZ2V0X3RyYW5zbGF0aW9uc18nICsgdHlwZVNsdWcpXHJcbiAgICAgICAgICAgICAgICAgICAgZGF0YS5hcHBlbmQoJ2FsbF9sYW5ndWFnZXMnLCAndHJ1ZScpXHJcbiAgICAgICAgICAgICAgICAgICAgZGF0YS5hcHBlbmQoJ3NlY3VyaXR5JyAgICAgLCB0aGlzLm5vbmNlc1snZ2V0dHJhbnNsYXRpb25zbm9uY2UnICsgdHlwZVNsdWddKVxyXG4gICAgICAgICAgICAgICAgICAgIGRhdGEuYXBwZW5kKCdsYW5ndWFnZScgICAgICwgbGFuZ3VhZ2VPZklkcylcclxuICAgICAgICAgICAgICAgICAgICBkYXRhLmFwcGVuZCgnc3RyaW5nX2lkcycgICAsIEpTT04uc3RyaW5naWZ5KHN0cmluZ0lkc0FycmF5KSlcclxuXHJcbiAgICAgICAgICAgICAgICAgICAgYXhpb3MucG9zdCh0aGlzLmFqYXhfdXJsLCBkYXRhKVxyXG4gICAgICAgICAgICAgICAgICAgICAgICAudGhlbihmdW5jdGlvbiAocmVzcG9uc2UpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNlbGYubG9hZGluZ19zdHJpbmdzLS1cclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNlbGYuYWRkVG9EaWN0aW9uYXJ5KHJlc3BvbnNlLmRhdGEsIG5vZGVEYXRhKVxyXG4gICAgICAgICAgICAgICAgICAgICAgICB9KVxyXG4gICAgICAgICAgICAgICAgICAgICAgICAuY2F0Y2goZnVuY3Rpb24gKGVycm9yKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25zb2xlLmxvZyhlcnJvcik7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIH0pO1xyXG4gICAgICAgICAgICAgICAgfWVsc2V7XHJcbiAgICAgICAgICAgICAgICAgICAgc2VsZi5sb2FkaW5nX3N0cmluZ3MtLVxyXG4gICAgICAgICAgICAgICAgfVxyXG5cclxuICAgICAgICAgICAgfSxcclxuICAgICAgICAgICAgYWxyZWFkeURldGVjdGVkKCBzZWxlY3RvciwgZGJJZCApe1xyXG4gICAgICAgICAgICAgICAgbGV0IGNvbWJpbmVkID0gc2VsZWN0b3IgKyAnPScgKyBkYklkXHJcbiAgICAgICAgICAgICAgICBpZiAoIHV0aWxzLmFycmF5Q29udGFpbnNJdGVtKCB0aGlzLmRldGVjdGVkU2VsZWN0b3JBbmRJZCwgY29tYmluZWQgKSApIHtcclxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gdHJ1ZVxyXG4gICAgICAgICAgICAgICAgfWVsc2Uge1xyXG4gICAgICAgICAgICAgICAgICAgIHRoaXMuZGV0ZWN0ZWRTZWxlY3RvckFuZElkLnB1c2goY29tYmluZWQpXHJcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGZhbHNlXHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgIHNldHVwRXZlbnRMaXN0ZW5lciggbm9kZSApe1xyXG4gICAgICAgICAgICAgICAgaWYgKCBub2RlLnRhZ05hbWUgPT0gJ0EnICYmICFub2RlLmhhc0F0dHJpYnV0ZSggJ2RhdGEtdHJwZ2V0dGV4dG9yaWdpbmFsJyApIClcclxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gZmFsc2VcclxuXHJcbiAgICAgICAgICAgICAgICBsZXQgc2VsZiA9IHRoaXNcclxuXHJcbiAgICAgICAgICAgICAgICBub2RlLmFkZEV2ZW50TGlzdGVuZXIoICdtb3VzZWVudGVyJywgc2VsZi4kcmVmcy5ob3ZlckFjdGlvbnMuc2hvd1BlbmNpbEljb24gKVxyXG4gICAgICAgICAgICB9LFxyXG4gICAgICAgICAgICBhZGRUb0RpY3Rpb25hcnkoIHJlc3BvbnNlRGF0YSwgbm9kZUluZm8gPSBudWxsICl7XHJcbiAgICAgICAgICAgICAgICBsZXQgc2VsZiA9IHRoaXNcclxuXHJcbiAgICAgICAgICAgICAgICBpZiAoIHJlc3BvbnNlRGF0YSAhPSBudWxsICkge1xyXG4gICAgICAgICAgICAgICAgICAgIGlmICggbm9kZUluZm8gKXtcclxuICAgICAgICAgICAgICAgICAgICAgICAgbm9kZUluZm8uZm9yRWFjaChmdW5jdGlvbiAoIGluZm9Sb3csIGluZGV4ICl7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXNwb25zZURhdGEuc29tZSggZnVuY3Rpb24gKCByZXNwb25zZURhdGFSb3cgKSB7XHJcblxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICggaW5mb1Jvdy5kYklEID09IHJlc3BvbnNlRGF0YVJvdy5kYklEICkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvL2JyaW5nIGJsb2NrX3R5cGUgdG8gdGhlIHRvcCBsZXZlbCBvYmplY3RcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKCByZXNwb25zZURhdGFSb3cudHlwZSAhPSAnZ2V0dGV4dCcgJiYgdHlwZW9mIHJlc3BvbnNlRGF0YVJvdy5ibG9ja190eXBlID09ICd1bmRlZmluZWQnICkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGZpcnN0TGFuZ3VhZ2UgPSBzZWxmLm9yZGVyZWRTZWNvbmRhcnlMYW5ndWFnZXNbMF1cclxuXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoIHR5cGVvZiByZXNwb25zZURhdGFSb3cudHJhbnNsYXRpb25zQXJyYXlbZmlyc3RMYW5ndWFnZV0uYmxvY2tfdHlwZSAhPSAndW5kZWZpbmVkJyApXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVzcG9uc2VEYXRhUm93LmJsb2NrX3R5cGUgPSByZXNwb25zZURhdGFSb3cudHJhbnNsYXRpb25zQXJyYXlbZmlyc3RMYW5ndWFnZV0uYmxvY2tfdHlwZVxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XHJcblxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBub2RlSW5mb1tpbmRleF0gPSBPYmplY3QuYXNzaWduKCB7fSwgcmVzcG9uc2VEYXRhUm93LCBpbmZvUm93IClcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHRydWUgLy8gYSBzb3J0IG9mIGJyZWFrXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSlcclxuICAgICAgICAgICAgICAgICAgICAgICAgfSlcclxuICAgICAgICAgICAgICAgICAgICB9ZWxzZXtcclxuICAgICAgICAgICAgICAgICAgICAgICAgbm9kZUluZm8gPSByZXNwb25zZURhdGFcclxuICAgICAgICAgICAgICAgICAgICB9XHJcblxyXG4gICAgICAgICAgICAgICAgICAgIHRoaXMuc3RyaW5nR3JvdXBzID0gdGhpcy5hZGRUb1N0cmluZ0dyb3Vwcyggbm9kZUluZm8gKVxyXG4gICAgICAgICAgICAgICAgICAgIHRoaXMuZGljdGlvbmFyeSA9IHRoaXMuZGljdGlvbmFyeS5jb25jYXQoIG5vZGVJbmZvIClcclxuXHJcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5pbml0U3RyaW5nc0Ryb3Bkb3duKClcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgfSxcclxuICAgICAgICAgICAgYWRkVG9TdHJpbmdHcm91cHMoIHN0cmluZ3MgKXtcclxuXHJcbiAgICAgICAgICAgICAgICAvLyBzZWUgd2hhdCBub2RlIGdyb3VwcyBhcmUgZm91bmRcclxuICAgICAgICAgICAgICAgIGxldCBmb3VuZFN0cmluZ0dyb3VwcyA9IHRoaXMuc3RyaW5nR3JvdXBzO1xyXG4gICAgICAgICAgICAgICAgc3RyaW5ncy5mb3JFYWNoKCBmdW5jdGlvbiAoIHN0cmluZyApIHtcclxuICAgICAgICAgICAgICAgICAgICBpZiAoIGZvdW5kU3RyaW5nR3JvdXBzLmluZGV4T2YoIHN0cmluZy5ncm91cCApID09PSAtMSAmJiAoICggdHlwZW9mIHN0cmluZy5ibG9ja1R5cGUgPT09ICd1bmRlZmluZWQnICkgfHwgc3RyaW5nLmJsb2NrVHlwZSAhPT0gJzInICkgKXtcclxuICAgICAgICAgICAgICAgICAgICAgICAgZm91bmRTdHJpbmdHcm91cHMucHVzaCggc3RyaW5nLmdyb3VwIClcclxuICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICB9KVxyXG5cclxuICAgICAgICAgICAgICAgIC8vIHB1dCB0aGUgbm9kZSBncm91cHMgaW4gdGhlIG9yZGVyIHRoYXQgd2Ugd2FudCwgYWNjb3JkaW5nIHRvIHRoZSBwcm9wIHRoaXMuc3RyaW5nR3JvdXBPcmRlclxyXG4gICAgICAgICAgICAgICAgbGV0IG9yZGVyZWRTdHJpbmdHcm91cHMgPSBbXTtcclxuXHJcbiAgICAgICAgICAgICAgICBpZiAoIHRoaXMuZWRpdG9yU3RyaW5ncy5zZW9fdXBkYXRlX25vdGljZSAhPSAnc2VvX3BhY2tfdXBkYXRlX25vdF9uZWVkZWQnICl7XHJcbiAgICAgICAgICAgICAgICAgICAgb3JkZXJlZFN0cmluZ0dyb3Vwcy5wdXNoKCB0aGlzLmVkaXRvclN0cmluZ3Muc2VvX3VwZGF0ZV9ub3RpY2UgKTtcclxuICAgICAgICAgICAgICAgIH1cclxuXHJcbiAgICAgICAgICAgICAgICB0aGlzLnN0cmluZ0dyb3VwT3JkZXIuZm9yRWFjaCggZnVuY3Rpb24oIGdyb3VwICl7XHJcbiAgICAgICAgICAgICAgICAgICAgaWYgKCBmb3VuZFN0cmluZ0dyb3Vwcy5pbmRleE9mKCBncm91cCApICE9PSAtMSApe1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBvcmRlcmVkU3RyaW5nR3JvdXBzLnB1c2goIGdyb3VwIClcclxuICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICB9KVxyXG5cclxuICAgICAgICAgICAgICAgIC8vIGlmIHRoZXJlIHdlcmUgYW55IG90aGVyIHN0cmluZyBncm91cHMgdGhhdCB3ZXJlIG5vdCBpbiB0aGUgcHJvcCwgYWRkIHRoZW0gYXQgdGhlIGVuZC5cclxuICAgICAgICAgICAgICAgIGZvdW5kU3RyaW5nR3JvdXBzLmZvckVhY2goIGZ1bmN0aW9uIChncm91cCkge1xyXG4gICAgICAgICAgICAgICAgICAgIGlmICggb3JkZXJlZFN0cmluZ0dyb3Vwcy5pbmRleE9mKCBncm91cCApID09PSAtMSApe1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBvcmRlcmVkU3RyaW5nR3JvdXBzLnB1c2goZ3JvdXApO1xyXG4gICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIH0pXHJcblxyXG4gICAgICAgICAgICAgICAgcmV0dXJuIG9yZGVyZWRTdHJpbmdHcm91cHM7XHJcbiAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgIGdldFN0cmluZ0luZGV4KCBzZWxlY3RvciwgZGJJRCApe1xyXG4gICAgICAgICAgICAgICAgbGV0IGZvdW5kID0gbnVsbFxyXG5cclxuICAgICAgICAgICAgICAgIHRoaXMuZGljdGlvbmFyeS5zb21lKGZ1bmN0aW9uICggc3RyaW5nLCBpbmRleCApIHtcclxuICAgICAgICAgICAgICAgICAgICBpZiAoIHN0cmluZy5kYklEID09IGRiSUQgJiYgc3RyaW5nLnNlbGVjdG9yID09IHNlbGVjdG9yICl7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGZvdW5kID0gaW5kZXhcclxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHRydWVcclxuICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICB9KVxyXG5cclxuICAgICAgICAgICAgICAgIHJldHVybiBmb3VuZFxyXG4gICAgICAgICAgICB9LFxyXG4gICAgICAgICAgICBnZXROb2RlSW5mbyggbm9kZSwgYmFzZVNlbGVjdG9yID0gJycgKXtcclxuICAgICAgICAgICAgICAgIGxldCBzdHJpbmdJZFxyXG4gICAgICAgICAgICAgICAgbGV0IG5vZGVEYXRhICA9IFtdXHJcbiAgICAgICAgICAgICAgICBsZXQgc2VsZWN0b3JzID0gdGhpcy5wcmVwYXJlU2VsZWN0b3JTdHJpbmdzKCBiYXNlU2VsZWN0b3IgKVxyXG5cclxuICAgICAgICAgICAgICAgIHNlbGVjdG9ycy5mb3JFYWNoKCBmdW5jdGlvbiAoIHNlbGVjdG9yICkge1xyXG5cclxuICAgICAgICAgICAgICAgICAgICBzdHJpbmdJZCA9IG5vZGUuZ2V0QXR0cmlidXRlKCBzZWxlY3RvciApXHJcblxyXG4gICAgICAgICAgICAgICAgICAgIGlmICggc3RyaW5nSWQgKSB7XHJcblxyXG4gICAgICAgICAgICAgICAgICAgICAgICBsZXQgbm9kZUF0dHJpYnV0ZSAgID0gc2VsZWN0b3IucmVwbGFjZSggYmFzZVNlbGVjdG9yLCAnJyApXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGxldCBub2RlR3JvdXAgICAgICAgPSBub2RlLmdldEF0dHJpYnV0ZSggJ2RhdGEtdHJwLW5vZGUtZ3JvdXAnICsgbm9kZUF0dHJpYnV0ZSApXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGxldCBub2RlRGVzY3JpcHRpb24gPSBub2RlLmdldEF0dHJpYnV0ZSggJ2RhdGEtdHJwLW5vZGUtZGVzY3JpcHRpb24nICsgbm9kZUF0dHJpYnV0ZSApXHJcblxyXG4gICAgICAgICAgICAgICAgICAgICAgICBsZXQgZW50cnkgPSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBkYklEICAgICAgOiBzdHJpbmdJZCxcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNlbGVjdG9yICA6IHNlbGVjdG9yLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYXR0cmlidXRlIDogbm9kZUF0dHJpYnV0ZS5zdWJzdHIoMSksIC8vIHN1YnN0cigxKSBpcyB1c2VkIHRvIHRyaW0gcHJlZml4aW5nIGxpbmUgLSBleC4gLWFsdCB3aWxsIHJlc3VsdCBpbiBhbHQgKG5vIGxpbmUpXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cclxuXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmICggbm9kZUdyb3VwIClcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGVudHJ5Lmdyb3VwID0gbm9kZUdyb3VwXHJcblxyXG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoIG5vZGVEZXNjcmlwdGlvbiApXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBlbnRyeS5kZXNjcmlwdGlvbiA9IG5vZGVEZXNjcmlwdGlvblxyXG5cclxuICAgICAgICAgICAgICAgICAgICAgICAgbm9kZURhdGEucHVzaCggZW50cnkgKVxyXG4gICAgICAgICAgICAgICAgICAgIH1cclxuXHJcbiAgICAgICAgICAgICAgICB9KVxyXG5cclxuICAgICAgICAgICAgICAgIHJldHVybiBub2RlRGF0YVxyXG4gICAgICAgICAgICB9LFxyXG4gICAgICAgICAgICBnZXRBbGxTZWxlY3RvcnMoKXtcclxuICAgICAgICAgICAgICAgIGxldCBzZWxlY3RvcnMgPSBbXVxyXG4gICAgICAgICAgICAgICAgbGV0IHNlbGYgICAgICA9IHRoaXNcclxuXHJcbiAgICAgICAgICAgICAgICB0aGlzLmRhdGFBdHRyaWJ1dGVzLmZvckVhY2goIGZ1bmN0aW9uICggZGF0YUF0dHJpYnV0ZSApe1xyXG4gICAgICAgICAgICAgICAgICAgIHNlbGVjdG9ycyA9IHNlbGVjdG9ycy5jb25jYXQoIHNlbGYucHJlcGFyZVNlbGVjdG9yU3RyaW5ncyggZGF0YUF0dHJpYnV0ZSApIClcclxuICAgICAgICAgICAgICAgIH0pXHJcblxyXG4gICAgICAgICAgICAgICAgcmV0dXJuIHNlbGVjdG9yc1xyXG4gICAgICAgICAgICB9LFxyXG4gICAgICAgICAgICBwcmVwYXJlU2VsZWN0b3JTdHJpbmdzKCBiYXNlTmFtZVNlbGVjdG9yICl7XHJcbiAgICAgICAgICAgICAgICBsZXQgcGFyc2VkX3NlbGVjdG9ycyA9IFtdXHJcblxyXG4gICAgICAgICAgICAgICAgdGhpcy5zZWxlY3RvcnMuZm9yRWFjaCggZnVuY3Rpb24gKCBzZWxlY3RvclN1ZmZpeCwgaW5kZXggKXtcclxuICAgICAgICAgICAgICAgICAgICBwYXJzZWRfc2VsZWN0b3JzLnB1c2goIGJhc2VOYW1lU2VsZWN0b3IgKyBzZWxlY3RvclN1ZmZpeCAgKVxyXG4gICAgICAgICAgICAgICAgfSlcclxuXHJcbiAgICAgICAgICAgICAgICByZXR1cm4gcGFyc2VkX3NlbGVjdG9yc1xyXG4gICAgICAgICAgICB9LFxyXG4gICAgICAgICAgICBwYXJlbnRVUkwoIHVybCApe1xyXG4gICAgICAgICAgICAgICAgcmV0dXJuIHVybC5yZXBsYWNlKCAndHJwLWVkaXQtdHJhbnNsYXRpb249cHJldmlldycsICd0cnAtZWRpdC10cmFuc2xhdGlvbj10cnVlJyApXHJcbiAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgIGNsZWFuVVJMKCB1cmwgKXtcclxuICAgICAgICAgICAgICAgIC8vbWFrZSByZW1vdmVVcmxQYXJhbWV0ZXIgcmVjdXJzaXZlIGFuZCBvbmx5IGNhbGwgaXQgb25jZSB3aXRoIGFsbCB0aGUgcGFyYW1ldGVycyB0aGF0XHJcbiAgICAgICAgICAgICAgICAvL25lZWQgdG8gc3RyaXBwZWQgP1xyXG4gICAgICAgICAgICAgICAgdXJsID0gdXRpbHMucmVtb3ZlVXJsUGFyYW1ld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2hyZWYnIHx8IHN0cmluZy5hdHRyaWJ1dGUgPT0gJ3NyYycgKSApXHJcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGZhbHNlXHJcblxyXG4gICAgICAgICAgICAgICAgaWYgKCBzdHJpbmcuZ3JvdXAgPT09IHR5cGUgKVxyXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiB0cnVlXHJcblxyXG4gICAgICAgICAgICAgICAgcmV0dXJuIGZhbHNlXHJcbiAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgIGluaXRTdHJpbmdzRHJvcGRvd24oKXtcclxuICAgICAgICAgICAgICAgIGxldCBzZWxmID0gdGhpc1xyXG5cclxuICAgICAgICAgICAgICAgIGlmICggIXRoaXMuaXNTdHJpbmdzRHJvcGRvd25PcGVuKCkgKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgalF1ZXJ5KCAnI3RycC1zdHJpbmctY2F0ZWdvcmllcycgKS5zZWxlY3QyKCAnZGVzdHJveScgKVxyXG5cclxuICAgICAgICAgICAgICAgICAgICBqUXVlcnkoICcjdHJwLXN0cmluZy1jYXRlZ29yaWVzJyApLnNlbGVjdDIoIHsgcGxhY2Vob2xkZXIgOiBzZWxmLmVkaXRvclN0cmluZ3Muc2VsZWN0X3N0cmluZywgdGVtcGxhdGVSZXN1bHQ6IGZ1bmN0aW9uKG9wdGlvbil7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGxldCBvcmlnaW5hbCAgICA9IGhlLmRlY29kZSggb3B0aW9uLnRleHQuc3Vic3RyaW5nKDAsIDkwKSApICsgKCAoIG9wdGlvbi50ZXh0Lmxlbmd0aCA8PSA5MCkgPyAnJyA6ICcuLi4nIClcclxuICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGRlc2NyaXB0aW9uID0gKCBvcHRpb24udGl0bGUgKSA/ICAnKCcgKyBvcHRpb24udGl0bGUgKyAnKScgOiAnJ1xyXG5cclxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuI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cclxuICAgICAgICAgICAgfSxcclxuICAgICAgICAgICAgaGFzVW5zYXZlZENoYW5nZXMoKXtcclxuICAgICAgICAgICAgICAgIGxldCB1bnNhdmVkQ2hhbmdlcyA9IGZhbHNlXHJcbiAgICAgICAgICAgICAgICBsZXQgc2VsZiA9IHRoaXNcclxuICAgICAgICAgICAgICAgIGlmICggdGhpcy5zZWxlY3RlZEluZGV4ZXNBcnJheS5sZW5ndGggPiAwICkge1xyXG4gICAgICAgICAgICAgICAgICAgIHRoaXMuc2VsZWN0ZWRJbmRleGVzQXJyYXkuZm9yRWFjaChmdW5jdGlvbiAoc2VsZWN0ZWRJbmRleCkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBzZWxmLnNldHRpbmdzWyd0cmFuc2xhdGlvbi1sYW5ndWFnZXMnXS5mb3JFYWNoKGZ1bmN0aW9uIChsYW5ndWFnZUNvZGUpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChzZWxmLmRpY3Rpb25hcnlbc2VsZWN0ZWRJbmRleF0gJiZcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzZWxmLmRpY3Rpb25hcnlbc2VsZWN0ZWRJbmRleF0udHJhbnNsYXRpb25zQXJyYXlbbGFuZ3VhZ2VDb2RlXSAmJlxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChzZWxmLmRpY3Rpb25hcnlbc2VsZWN0ZWRJbmRleF0udHJhbnNsYXRpb25zQXJyYXlbbGFuZ3VhZ2VDb2RlXS50cmFuc2xhdGVkICE9PSBzZWxmLmRpY3Rpb25hcnlbc2VsZWN0ZWRJbmRleF0udHJhbnNsYXRpb25zQXJyYXlbbGFuZ3VhZ2VDb2RlXS5lZGl0ZWRUcmFuc2xhdGlvbikpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1bnNhdmVkQ2hhbmdlcyA9IHRydWVcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgICAgICAgICAgfSlcclxuICAgICAgICAgICAgICAgICAgICB9KVxyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgdGhpcy5zaG93Q2hhbmdlc1Vuc2F2ZWRNZXNzYWdlID0gdW5zYXZlZENoYW5nZXNcclxuXHJcbiAgICAgICAgICAgICAgICByZXR1cm4gdW5zYXZlZENoYW5nZXNcclxuICAgICAgICAgICAgfSxcclxuICAgICAgICAgICAgaWZyYW1lTG9hZGVyKCBzdGF0dXMgKSB7XHJcbiAgICAgICAgICAgICAgICBsZXQgbG9hZGVyID0gZG9jdW1lbnQuZ2V0RWxlbWVudEJ5SWQoICd0cnAtcHJldmlldy1sb2FkZXInIClcclxuXHJcbiAgICAgICAgICAgICAgICBpZiggc3RhdHVzID09ICdzaG93JyApXHJcbiAgICAgICAgICAgICAgICAgICAgbG9hZGVyLnN0eWxlLmRpc3BsYXkgPSAnZmxleCdcclxuICAgICAgICAgICAgICAgIGVsc2UgaWYoIHN0YXR1cyA9PSAnaGlkZScgKVxyXG4gICAgICAgICAgICAgICAgICAgIGxvYWRlci5zdHlsZS5kaXNwbGF5ID0gJ25vbmUnXHJcbiAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgIHByZXZpb3VzU3RyaW5nKCl7XHJcbiAgICAgICAgICAgICAgICBsZXQgY3VycmVudFZhbHVlID0gZG9jdW1lbnQuZ2V0RWxlbWVudEJ5SWQoJ3RycC1zdHJpbmctY2F0ZWdvcmllcycpLnZhbHVlXHJcblxyXG4gICAgICAgICAgICAgICAgbGV0IG5ld1ZhbHVlID0gK2N1cnJlbnRWYWx1ZSAtIDFcclxuXHJcbiAgICAgICAgICAgICAgICB3aGlsZSggbmV3VmFsdWUgPj0gMCAmJiBkb2N1bWVudC5xdWVyeVNlbGVjdG9yQWxsKCcjdHJwLXN0cmluZy1jYXRlZ29yaWVzIG9wdGlvblt2YWx1ZT1cIicgKyBuZXdWYWx1ZSArICdcIl0nKS5sZW5ndGggPT09IDAgKXtcclxuICAgICAgICAgICAgICAgICAgICBuZXdWYWx1ZS0tO1xyXG4gICAgICAgICAgICAgICAgfVxyXG5cclxuICAgICAgICAgICAgICAgIGlmKCBuZXdWYWx1ZSA8IDAgKVxyXG4gICAgICAgICAgICAgICAgICAgIHJldHVyblxyXG5cclxuICAgICAgICAgICAgICAgIHRoaXMuc2VsZWN0ZWRTdHJpbmcgPSBuZXdWYWx1ZS50b1N0cmluZygpXHJcbiAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgIG5leHRTdHJpbmcoKXtcclxuICAgICAgICAgICAgICAgIGxldCBjdXJyZW50VmFsdWUgPSBkb2N1bWVudC5nZXRFbGVtZW50QnlJZCgndHJwLXN0cmluZy1jYXRlZ29yaWVzJykudmFsdWUsIG5ld1ZhbHVlID0gMFxyXG5cclxuICAgICAgICAgICAgICAgIGlmKCBjdXJyZW50VmFsdWUgIT0gJycgKVxyXG4gICAgICAgICAgICAgICAgICAgIG5ld1ZhbHVlID0gK2N1cnJlbnRWYWx1ZSArIDFcclxuXHJcbiAgICAgICAgICAgICAgICB3aGlsZSggbmV3VmFsdWUgPCB0aGlzLmRpY3Rpb25hcnkubGVuZ3RoICYmIGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3JBbGwoJyN0cnAtc3RyaW5nLWNhdGVnb3JpZXMgb3B0aW9uW3ZhbHVlPVwiJyArIG5ld1ZhbHVlICsgJ1wiXScpLmxlbmd0aCA9PT0gMCApe1xyXG4gICAgICAgICAgICAgICAgICAgIG5ld1ZhbHVlKys7XHJcbiAgICAgICAgICAgICAgICB9XHJcblxyXG4gICAgICAgICAgICAgICAgaWYgKCBuZXdWYWx1ZSA+PSB0aGlzLmRpY3Rpb25hcnkubGVuZ3RoICl7XHJcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuXHJcbiAgICAgICAgICAgICAgICB9XHJcblxyXG4gICAgICAgICAgICAgICAgdGhpcy5zZWxlY3RlZFN0cmluZyA9IG5ld1ZhbHVlLnRvU3RyaW5nKClcclxuICAgICAgICAgICAgfSxcclxuICAgICAgICAgICAgYWRkS2V5Ym9hcmRTaG9ydGN1dHNMaXN0ZW5lcigpe1xyXG4gICAgICAgICAgICAgICAgZG9jdW1lbnQuYWRkRXZlbnRMaXN0ZW5lcihcImtleWRvd25cIiwgZnVuY3Rpb24oZSkge1xyXG4gICAgICAgICAgICAgICAgICAgIGlmICgod2luZG93Lm5hdmlnYXRvci5wbGF0Zm9ybS5tYXRjaChcIk1hY1wiKSA/IGUubWV0YUtleSA6IGUuY3RybEtleSkgJiYgZS5hbHRLZXkgKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIC8vIENUUkwgKyBBTFQgKyByaWdodCBhcnJvd1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBpZiggZS5rZXlDb2RlID09PSAzOSApe1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZS5wcmV2ZW50RGVmYXVsdCgpO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgd2luZG93LmRpc3BhdGNoRXZlbnQoIG5ldyBFdmVudCggJ3RycF90cmlnZ2VyX25leHRfc3RyaW5nX2V2ZW50JyApICk7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIH1lbHNle1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gQ1RSTCArIEFMVCArIGxlZnQgYXJyb3dcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKCBlLmtleUNvZGUgPT09IDM3ICkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGUucHJldmVudERlZmF1bHQoKTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB3aW5kb3cuZGlzcGF0Y2hFdmVudCggbmV3IEV2ZW50KCAndHJwX3RyaWdnZXJfcHJldmlvdXNfc3RyaW5nX2V2ZW50JyApICk7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICB9LCBmYWxzZSk7XHJcblxyXG4gICAgICAgICAgICAgICAgd2luZG93LmFkZEV2ZW50TGlzdGVuZXIoICd0cnBfdHJpZ2dlcl9uZXh0X3N0cmluZ19ldmVudCcsIHRoaXMubmV4dFN0cmluZyApXHJcbiAgICAgICAgICAgICAgICB3aW5kb3cuYWRkRXZlbnRMaXN0ZW5lciggJ3RycF90cmlnZ2VyX3ByZXZpb3VzX3N0cmluZ19ldmVudCcsIHRoaXMucHJldmlvdXNTdHJpbmcgKVxyXG4gICAgICAgICAgICB9LFxyXG4gICAgICAgICAgICByZXNpemVJZnJhbWUgKGV2ZW50LCB1aSkge1xyXG4gICAgICAgICAgICAgICAgbGV0IHRvdGFsX3dpZHRoID0galF1ZXJ5KHdpbmRvdykud2lkdGgoKTtcclxuICAgICAgICAgICAgICAgIGxldCB3aWR0aCA9IGpRdWVyeSggJyN0cnAtY29udHJvbHMnICkud2lkdGgoKTtcclxuXHJcbiAgICAgICAgICAgICAgICBpZih3aWR0aCA+IHRvdGFsX3dpZHRoKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgd2lkdGggPSB0b3RhbF93aWR0aDtcclxuICAgICAgICAgICAgICAgICAgICBjb250cm9scy5jc3MoJ3dpZHRoJywgd2lkdGgpO1xyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgbGV0IHByZXZpZXdDb250YWluZXIgPSBqUXVlcnkoICcjdHJwLXByZXZpZXcnICk7XHJcbiAgICAgICAgICAgICAgICBwcmV2aWV3Q29udGFpbmVyLmNzcygncmlnaHQnLCB3aWR0aCApO1xyXG4gICAgICAgICAgICAgICAgcHJldmlld0NvbnRhaW5lci5jc3MoJ2xlZnQnLCAoIHdpZHRoIC0gMzQ4ICkgKTtcclxuICAgICAgICAgICAgICAgIHByZXZpZXdDb250YWluZXIuY3NzKCd3aWR0aCcsICh0b3RhbF93aWR0aCAtIHdpZHRoKSk7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9LFxyXG4gICAgICAgIC8vYWRkIHN1cHBvcnQgZm9yIHYtbW9kZWwgaW4gc2VsZWN0MlxyXG4gICAgICAgIGRpcmVjdGl2ZXM6IHtcclxuICAgICAgICAgICAgc2VsZWN0Mjoge1xyXG4gICAgICAgICAgICAgICAgaW5zZXJ0ZWQoZWwpIHtcclxuICAgICAgICAgICAgICAgICAgICBqUXVlcnkoZWwpLm9uKCdzZWxlY3QyOnNlbGVjdCcsICgpID0+IHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgY29uc3QgZXZlbnQgPSBuZXcgRXZlbnQoJ2NoYW5nZScsIHsgYnViYmxlczogdHJ1ZSwgY2FuY2VsYWJsZTogdHJ1ZSB9KVxyXG4gICAgICAgICAgICAgICAgICAgICAgICBlbC5kaXNwYXRjaEV2ZW50KGV2ZW50KVxyXG4gICAgICAgICAgICAgICAgICAgIH0pXHJcblxyXG4gICAgICAgICAgICAgICAgICAgIGpRdWVyeShlbCkub24oJ3NlbGVjdDI6dW5zZWxlY3QnLCAoKSA9PiB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IGV2ZW50ID0gbmV3IEV2ZW50KCdjaGFuZ2UnLCB7IGJ1YmJsZXM6IHRydWUsIGNhbmNlbGFibGU6IHRydWUgfSlcclxuICAgICAgICAgICAgICAgICAgICAgICAgZWwuZGlzcGF0Y2hFdmVudChldmVudClcclxuICAgICAgICAgICAgICAgICAgICB9KVxyXG4gICAgICAgICAgICAgICAgfSxcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH1cclxuICAgIH1cclxuPC9zY3JpcHQ+XHJcbiJdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./node_modules/babel-loader/lib/index.js?!./node_modules/vue-loader/lib/index.js?!./assets/src/js/editor.vue?vue&type=script&lang=js&\n");
719
 
720
  /***/ }),
721
 
@@ -853,7 +853,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) *
853
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
854
 
855
  "use strict";
856
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"render\", function() { return render; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"staticRenderFns\", function() { return staticRenderFns; });\nvar render = function() {\n var _vm = this\n var _h = _vm.$createElement\n var _c = _vm._self._c || _h\n return _c(\"div\", { attrs: { id: \"trp-editor\" } }, [\n _c(\n \"div\",\n { attrs: { id: \"trp-controls\" } },\n [\n _c(\n \"div\",\n { staticClass: \"trp-controls-container\" },\n [\n _c(\"div\", { attrs: { id: \"trp-close-save\" } }, [\n _c(\"a\", {\n attrs: {\n id: \"trp-controls-close\",\n href: _vm.closeURL,\n title: _vm.editorStrings.close\n }\n }),\n _vm._v(\" \"),\n _c(\n \"div\",\n { attrs: { id: \"trp-save-and-loader-spinner\" } },\n [\n _c(\n \"span\",\n {\n directives: [\n {\n name: \"show\",\n rawName: \"v-show\",\n value: _vm.loading_strings > 0,\n expression: \"loading_strings > 0\"\n }\n ],\n staticClass: \"trp-ajax-loader\",\n attrs: { id: \"trp-string-saved-ajax-loader\" }\n },\n [_c(\"div\", { staticClass: \"trp-spinner\" })]\n ),\n _vm._v(\" \"),\n _c(\"save-translations\", {\n attrs: {\n selectedIndexesArray: _vm.selectedIndexesArray,\n dictionary: _vm.dictionary,\n settings: _vm.settings,\n nonces: _vm.nonces,\n ajax_url: _vm.ajax_url,\n currentLanguage: _vm.currentLanguage,\n onScreenLanguage: _vm.onScreenLanguage,\n iframe: _vm.iframe,\n currentURL: _vm.currentURL,\n mergingString: _vm.mergingString,\n mergeData: _vm.mergeData,\n editorStrings: _vm.editorStrings\n },\n on: {\n \"translations-saved\": function($event) {\n _vm.showChangesUnsavedMessage = false\n }\n }\n })\n ],\n 1\n )\n ]),\n _vm._v(\" \"),\n _c(\"div\", { staticClass: \"trp-controls-section\" }, [\n _c(\"div\", { staticClass: \"trp-controls-section-content\" }, [\n _c(\"div\", { attrs: { id: \"trp-language-switch\" } }, [\n _c(\n \"select\",\n {\n directives: [\n {\n name: \"model\",\n rawName: \"v-model\",\n value: _vm.currentLanguage,\n expression: \"currentLanguage\"\n },\n { name: \"select2\", rawName: \"v-select2\" }\n ],\n attrs: { id: \"trp-language-select\", name: \"lang\" },\n on: {\n change: function($event) {\n var $$selectedVal = Array.prototype.filter\n .call($event.target.options, function(o) {\n return o.selected\n })\n .map(function(o) {\n var val = \"_value\" in o ? o._value : o.value\n return val\n })\n _vm.currentLanguage = $event.target.multiple\n ? $$selectedVal\n : $$selectedVal[0]\n }\n }\n },\n _vm._l(_vm.languageNames, function(lang, langIndex) {\n return _c(\"option\", { domProps: { value: langIndex } }, [\n _vm._v(_vm._s(lang))\n ])\n }),\n 0\n )\n ]),\n _vm._v(\" \"),\n _c(\"div\", { attrs: { id: \"trp-string-list\" } }, [\n _c(\n \"select\",\n {\n directives: [\n {\n name: \"model\",\n rawName: \"v-model\",\n value: _vm.selectedString,\n expression: \"selectedString\"\n },\n { name: \"select2\", rawName: \"v-select2\" }\n ],\n attrs: { id: \"trp-string-categories\" },\n on: {\n change: function($event) {\n var $$selectedVal = Array.prototype.filter\n .call($event.target.options, function(o) {\n return o.selected\n })\n .map(function(o) {\n var val = \"_value\" in o ? o._value : o.value\n return val\n })\n _vm.selectedString = $event.target.multiple\n ? $$selectedVal\n : $$selectedVal[0]\n }\n }\n },\n _vm._l(_vm.stringGroups, function(group) {\n return _c(\n \"optgroup\",\n { attrs: { label: group } },\n _vm._l(_vm.dictionary, function(string, index) {\n return _vm.showString(string, group)\n ? _c(\n \"option\",\n {\n attrs: {\n title: string.description,\n \"data-database-id\": string.dbID,\n \"data-group\": string.group\n },\n domProps: { value: index }\n },\n [\n _vm._v(\n _vm._s(\n _vm.processOptionName(\n string.original,\n group\n )\n )\n )\n ]\n )\n : _vm._e()\n }),\n 0\n )\n }),\n 0\n )\n ]),\n _vm._v(\" \"),\n _c(\"div\", { attrs: { id: \"trp-next-previous\" } }, [\n _c(\n \"button\",\n {\n staticClass: \"trp-next-previous-buttons\",\n attrs: {\n type: \"button\",\n id: \"trp-previous\",\n title: _vm.editorStrings.previous_title_attr\n },\n on: {\n click: function($event) {\n _vm.previousString()\n }\n }\n },\n [\n _c(\"span\", [_vm._v(\"«\")]),\n _vm._v(\" \" + _vm._s(_vm.editorStrings.previous))\n ]\n ),\n _vm._v(\" \"),\n _c(\n \"button\",\n {\n staticClass: \"trp-next-previous-buttons\",\n attrs: {\n type: \"button\",\n id: \"trp-next\",\n title: _vm.editorStrings.next_title_attr\n },\n on: {\n click: function($event) {\n _vm.nextString()\n }\n }\n },\n [\n _vm._v(_vm._s(_vm.editorStrings.next) + \" \"),\n _c(\"span\", [_vm._v(\"»\")])\n ]\n )\n ]),\n _vm._v(\" \"),\n _c(\"div\", { attrs: { id: \"trp-view-as\" } }, [\n _c(\"div\", { attrs: { id: \"trp-view-as-description\" } }, [\n _vm._v(_vm._s(_vm.editorStrings.view_as))\n ]),\n _vm._v(\" \"),\n _c(\n \"select\",\n {\n directives: [\n {\n name: \"model\",\n rawName: \"v-model\",\n value: _vm.viewAs,\n expression: \"viewAs\"\n },\n { name: \"select2\", rawName: \"v-select2\" }\n ],\n attrs: { id: \"trp-view-as-select\" },\n on: {\n change: function($event) {\n var $$selectedVal = Array.prototype.filter\n .call($event.target.options, function(o) {\n return o.selected\n })\n .map(function(o) {\n var val = \"_value\" in o ? o._value : o.value\n return val\n })\n _vm.viewAs = $event.target.multiple\n ? $$selectedVal\n : $$selectedVal[0]\n }\n }\n },\n _vm._l(_vm.roles, function(role, roleIndex) {\n return _c(\n \"option\",\n {\n attrs: {\n disabled: !role,\n title: !role ? _vm.editorStrings.view_as_pro : \"\"\n },\n domProps: { value: role }\n },\n [_vm._v(_vm._s(roleIndex))]\n )\n }),\n 0\n )\n ])\n ])\n ]),\n _vm._v(\" \"),\n _c(\n \"div\",\n {\n directives: [\n {\n name: \"show\",\n rawName: \"v-show\",\n value: _vm.selectedString !== null,\n expression: \"selectedString !== null\"\n }\n ],\n staticClass: \"trp-controls-section\"\n },\n [\n _c(\"language-boxes\", {\n attrs: {\n selectedIndexesArray: _vm.selectedIndexesArray,\n dictionary: _vm.dictionary,\n currentLanguage: _vm.currentLanguage,\n onScreenLanguage: _vm.onScreenLanguage,\n languageNames: _vm.languageNames,\n settings: _vm.settings,\n showChangesUnsavedMessage: _vm.showChangesUnsavedMessage,\n editorStrings: _vm.editorStrings,\n flagsPath: _vm.flagsPath,\n iframe: _vm.iframe\n },\n on: {\n \"discarded-changes\": function($event) {\n _vm.hasUnsavedChanges()\n }\n }\n })\n ],\n 1\n ),\n _vm._v(\" \"),\n _c(\"extra-content\", {\n attrs: {\n languageNames: _vm.languageNames,\n editorStrings: _vm.editorStrings,\n paidVersion: _vm.paid_version\n }\n }),\n _vm._v(\" \"),\n _c(\n \"div\",\n {\n directives: [\n {\n name: \"show\",\n rawName: \"v-show\",\n value: _vm.translationNotLoadedYet,\n expression: \"translationNotLoadedYet\"\n }\n ],\n staticClass: \"trp-controls-section\"\n },\n [\n _c(\n \"div\",\n {\n staticClass: \"trp-controls-section-content\",\n attrs: { id: \"trp-translation-not-ready-section\" }\n },\n [\n _c(\"p\", {\n domProps: {\n innerHTML: _vm._s(\n _vm.editorStrings.translation_not_loaded_yet\n )\n }\n })\n ]\n )\n ]\n )\n ],\n 1\n ),\n _vm._v(\" \"),\n _c(\"div\", { attrs: { id: \"trp_select2_overlay\" } }),\n _vm._v(\" \"),\n _c(\"hover-actions\", {\n ref: \"hoverActions\",\n attrs: {\n dictionary: _vm.dictionary,\n settings: _vm.settings,\n iframe: _vm.iframe,\n dataAttributes: _vm.dataAttributes,\n mergeRules: _vm.mergeRules,\n nonces: _vm.nonces,\n ajax_url: _vm.ajax_url,\n mergeData: _vm.mergeData,\n editorStrings: _vm.editorStrings\n }\n })\n ],\n 1\n ),\n _vm._v(\" \"),\n _c(\"div\", { attrs: { id: \"trp-preview\" } }, [\n _c(\"iframe\", {\n attrs: { id: \"trp-preview-iframe\", src: _vm.urlToLoad },\n on: { load: _vm.iFrameLoaded }\n }),\n _vm._v(\" \"),\n _c(\"div\", { attrs: { id: \"trp-preview-loader\" } }, [\n _c(\n \"svg\",\n {\n staticClass: \"trp-loader\",\n attrs: {\n width: \"65px\",\n height: \"65px\",\n viewBox: \"0 0 66 66\",\n xmlns: \"http://www.w3.org/2000/svg\"\n }\n },\n [\n _c(\"circle\", {\n staticClass: \"trp-circle\",\n attrs: {\n fill: \"none\",\n \"stroke-width\": \"6\",\n \"stroke-linecap\": \"round\",\n cx: \"33\",\n cy: \"33\",\n r: \"30\"\n }\n })\n ]\n )\n ])\n ])\n ])\n}\nvar staticRenderFns = []\nrender._withStripped = true\n\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9hc3NldHMvc3JjL2pzL2VkaXRvci52dWU/NTEwNiJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTtBQUFBO0FBQUE7QUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLG9CQUFvQixTQUFTLG1CQUFtQixFQUFFO0FBQ2xEO0FBQ0E7QUFDQSxPQUFPLFNBQVMscUJBQXFCLEVBQUU7QUFDdkM7QUFDQTtBQUNBO0FBQ0EsV0FBVyx3Q0FBd0M7QUFDbkQ7QUFDQSx1QkFBdUIsU0FBUyx1QkFBdUIsRUFBRTtBQUN6RDtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSxlQUFlO0FBQ2Y7QUFDQTtBQUNBO0FBQ0EsaUJBQWlCLFNBQVMsb0NBQW9DLEVBQUU7QUFDaEU7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUF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gICAgIFwiZGl2XCIsXG4gICAgICAgICAgeyBzdGF0aWNDbGFzczogXCJ0cnAtY29udHJvbHMtY29udGFpbmVyXCIgfSxcbiAgICAgICAgICBbXG4gICAgICAgICAgICBfYyhcImRpdlwiLCB7IGF0dHJzOiB7IGlkOiBcInRycC1jbG9zZS1zYXZlXCIgfSB9LCBbXG4gICAgICAgICAgICAgIF9jKFwiYVwiLCB7XG4gICAgICAgICAgICAgICAgYXR0cnM6IHtcbiAgICAgICAgICAgICAgICAgIGlkOiBcInRycC1jb250cm9scy1jbG9zZVwiLFxuICAgICAgICAgICAgICAgICAgaHJlZjogX3ZtLmNsb3NlVVJMLFxuICAgICAgICAgICAgICAgICAgdGl0bGU6IF92bS5lZGl0b3JTdHJpbmdzLmNsb3NlXG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICB9KSxcbiAgICAgICAgICAgICAgX3ZtLl92KFwiIFwiKSxcbiAgICAgICAgICAgICAgX2MoXG4gICAgICAgICAgICAgICAgXCJkaXZcIixcbiAgICAgICAgICAgICAgICB7IGF0dHJzOiB7IGlkOiBcInRycC1zYXZlLWFuZC1sb2FkZXItc3Bpbm5lclwiIH0gfSxcbiAgICAgICAgICAgICAgICBbXG4gICAgICAgICAgICAgICAgICBfYyhcbiAgICAgICAgICAgICAgICAgICAgXCJzcGFuXCIsXG4gICAgICAgICAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICAgICAgICBkaXJlY3RpdmVzOiBbXG4gICAgICAgICAgICAgICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgIG5hbWU6IFwic2hvd1wiLFxuICAgICAgICAgICAgICAgICAgICAgICAgICByYXdOYW1lOiBcInYtc2hvd1wiLFxuICAgICAgICAgICAgICAgICAgICAgICAgICB2YWx1ZTogX3ZtLmxvYWRpbmdfc3RyaW5ncyA+IDAsXG4gICAgICAgICAgICAgICAgICAgICAgICAgIGV4cHJlc3Npb246IFwibG9hZGluZ19zdHJpbmdzID4gMFwiXG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgXSxcbiAgICAgICAgICAgICAgICAgICAgICBzdGF0aWNDbGFzczogXCJ0cnAtYWpheC1sb2FkZXJcIixcbiAgICAgICAgICAgICAgICAgICAgICBhdHRyczogeyBpZDogXCJ0cnAtc3RyaW5nLXNhdmVkLWFqYXgtbG9hZGVyXCIgfVxuICAgICAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgICAgICBbX2MoXCJkaXZcIiwgeyBzdGF0aWNDbGFzczogXCJ0cnAtc3Bpbm5lclwiIH0pXVxuICAgICAgICAgICAgICAgICAgKSxcbiAgICAgICAgICAgICAgICAgIF92bS5fdihcIiBcIiksXG4gICAgICAgICAgICAgICAgICBfYyhcInNhdmUtdHJhbnNsYXRpb25zXCIsIHtcbiAgICAgICAgICAgICAgICAgICAgYXR0cnM6IHtcbiAgICAgICAgICAgICAgICAgICAgICBzZWxlY3RlZEluZGV4ZXNBcnJheTogX3ZtLnNlbGVjdGVkSW5kZXhlc0FycmF5LFxuICAgICAgICAgICAgICAgICAgICAgIGRpY3Rpb25hcnk6IF92bS5kaWN0aW9uYXJ5LFxuICAgICAgICAgICAgICAgICAgICAgIHNldHRpbmdzOiBfdm0uc2V0dGluZ3MsXG4gICAgICAgICAgICAgICAgICAgICAgbm9uY2VzOiBfdm0ubm9uY2VzLFxuICAgICAgICAgICAgICAgICAgICAgIGFqYXhfdXJsOiBfdm0uYWpheF91cmwsXG4gICAgICAgICAgICAgICAgICAgICAgY3VycmVudExhbmd1YWdlOiBfdm0uY3VycmVudExhbmd1YWdlLFxuICAgICAgICAgICAgICAgICAgICAgIG9uU2NyZWVuTGFuZ3VhZ2U6IF92bS5vblNjcmVlbkxhbmd1YWdlLFxuICAgICAgICAgICAgICAgICAgICAgIGlmcmFtZTogX3ZtLmlmcmFtZSxcbiAgICAgICAgICAgICAgICAgICAgICBjdXJyZW50VVJMOiBfdm0uY3VycmVudFVSTCxcbiAgICAgICAgICAgICAgICAgICAgICBtZXJnaW5nU3RyaW5nOiBfdm0ubWVyZ2luZ1N0cmluZyxcbiAgICAgICAgICAgICAgICAgICAgICBtZXJnZURhdGE6IF92bS5tZXJnZURhdGEsXG4gICAgICAgICAgICAgICAgICAgICAgZWRpdG9yU3RyaW5nczogX3ZtLmVkaXRvclN0cmluZ3NcbiAgICAgICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICAgICAgb246IHtcbiAgICAgICAgICAgICAgICAgICAgICBcInRyYW5zbGF0aW9ucy1zYXZlZFwiOiBmdW5jdGlvbigkZXZlbnQpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIF92bS5zaG93Q2hhbmdlc1Vuc2F2ZWRNZXNzYWdlID0gZmFsc2VcbiAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgIH0pXG4gICAgICAgICAgICAgICAgXSxcbiAgICAgICAgICAgICAgICAxXG4gICAgICAgICAgICAgIClcbiAgICAgICAgICAgIF0pLFxuICAgICAgICAgICAgX3ZtLl92KFwiIFwiKSxcbiAgICAgICAgICAgIF9jKFwiZGl2XCIsIHsgc3RhdGljQ2xhc3M6IFwidHJwLWNvbnRyb2xzLXNlY3Rpb25cIiB9LCBbXG4gICAgICAgICAgICAgIF9jKFwiZGl2XCIsIHsgc3RhdGljQ2xhc3M6IFwidHJwLWNvbnRyb2xzLXNlY3Rpb24tY29udGVudFwiIH0sIFtcbiAgICAgICAgICAgICAgICBfYyhcImRpdlwiLCB7IGF0dHJzOiB7IGlkOiBcInRycC1sYW5ndWFnZS1zd2l0Y2hcIiB9IH0sIFtcbiAgICAgICAgICAgICAgICAgIF9jKFxuICAgICAgICAgICAgICAgICAgICBcInNlbGVjdFwiLFxuICAgICAgICAgICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgICAgICAgZGlyZWN0aXZlczogW1xuICAgICAgICAgICAgICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgICAgICAgICAgICBuYW1lOiBcIm1vZGVsXCIsXG4gICAgICAgICAgICAgICAgICAgICAgICAgIHJhd05hbWU6IFwidi1tb2RlbFwiLFxuICAgICAgICAgICAgICAgICAgICAgICAgICB2YWx1ZTogX3ZtLmN1cnJlbnRMYW5ndWFnZSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgZXhwcmVzc2lvbjogXCJjdXJyZW50TGFuZ3VhZ2VcIlxuICAgICAgICAgICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICAgICAgICAgIHsgbmFtZTogXCJzZWxlY3QyXCIsIHJhd05hbWU6IFwidi1zZWxlY3QyXCIgfVxuICAgICAgICAgICAgICAgICAgICAgIF0sXG4gICAgICAgICAgICAgICAgICAgICAgYXR0cnM6IHsgaWQ6IFwidHJwLWxhbmd1YWdlLXNlbGVjdFwiLCBuYW1lOiBcImxhbmdcIiB9LFxuICAgICAgICAgICAgICAgICAgICAgIG9uOiB7XG4gICAgICAgICAgICAgICAgICAgICAgICBjaGFuZ2U6IGZ1bmN0aW9uKCRldmVudCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICB2YXIgJCRzZWxlY3RlZFZhbCA9IEFycmF5LnByb3RvdHlwZS5maWx0ZXJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAuY2FsbCgkZXZlbnQudGFyZ2V0Lm9wdGlvbnMsIGZ1bmN0aW9uKG8pIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBvLnNlbGVjdGVkXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSlcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAubWFwKGZ1bmN0aW9uKG8pIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhciB2YWwgPSBcIl92YWx1ZVwiIGluIG8gPyBvLl92YWx1ZSA6IG8udmFsdWVcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiB2YWxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KVxuICAgICAgICAgICAgICAgICAgICAgICAgICBfdm0uY3VycmVudExhbmd1YWdlID0gJGV2ZW50LnRhcmdldC5tdWx0aXBsZVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgID8gJCRzZWxlY3RlZFZhbFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIDogJCRzZWxlY3RlZFZhbFswXVxuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICAgICAgX3ZtLl9sKF92bS5sYW5ndWFnZU5hbWVzLCBmdW5jdGlvbihsYW5nLCBsYW5nSW5kZXgpIHtcbiAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gX2MoXCJvcHRpb25cIiwgeyBkb21Qcm9wczogeyB2YWx1ZTogbGFuZ0luZGV4IH0gfSwgW1xuICAgICAgICAgICAgICAgICAgICAgICAgX3ZtLl92KF92bS5fcyhsYW5nKSlcbiAgICAgICAgICAgICAgICAgICAgICBdKVxuICAgICAgICAgICAgICAgICAgICB9KSxcbiAgICAgICAgICAgICAgICAgICAgMFxuICAgICAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgICAgIF0pLFxuICAgICAgICAgICAgICAgIF92bS5fdihcIiBcIiksXG4gICAgICAgICAgICAgICAgX2MoXCJkaXZcIiwgeyBhdHRyczogeyBpZDogXCJ0cnAtc3RyaW5nLWxpc3RcIiB9IH0sIFtcbiAgICAgICAgICAgICAgICAgIF9jKFxuICAgICAgICAgICAgICAgICAgICBcInNlbGVjdFwiLFxuICAgICAgICAgICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgICAgICAgZGlyZWN0aXZlczogW1xuICAgICAgICAgICAgICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgICAgICAgICAgICBuYW1lOiBcIm1vZGVsXCIsXG4gICAgICAgICAgICAgICAgICAgICAgICAgIHJhd05hbWU6IFwidi1tb2RlbFwiLFxuICAgICAgICAgICAgICAgICAgICAgICAgICB2YWx1ZTogX3ZtLnNlbGVjdGVkU3RyaW5nLFxuICAgICAgICAgICAgICAgICAgICAgICAgICBleHByZXNzaW9uOiBcInNlbGVjdGVkU3RyaW5nXCJcbiAgICAgICAgICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgICAgICAgICAgICB7IG5hbWU6IFwic2VsZWN0MlwiLCByYXdOYW1lOiBcInYtc2VsZWN0MlwiIH1cbiAgICAgICAgICAgICAgICAgICAgICBdLFxuICAgICAgICAgICAgICAgICAgICAgIGF0dHJzOiB7IGlkOiBcInRycC1zdHJpbmctY2F0ZWdvcmllc1wiIH0sXG4gICAgICAgICAgICAgICAgICAgICAgb246IHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGNoYW5nZTogZnVuY3Rpb24oJGV2ZW50KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgIHZhciAkJHNlbGVjdGVkVmFsID0gQXJyYXkucHJvdG90eXBlLmZpbHRlclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIC5jYWxsKCRldmVudC50YXJnZXQub3B0aW9ucywgZnVuY3Rpb24obykge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIG8uc2VsZWN0ZWRcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIC5tYXAoZnVuY3Rpb24obykge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFyIHZhbCA9IFwiX3ZhbHVlXCIgaW4gbyA/IG8uX3ZhbHVlIDogby52YWx1ZVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHZhbFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pXG4gICAgICAgICAgICAgICAgICAgICAgICAgIF92bS5zZWxlY3RlZFN0cmluZyA9ICRldmVudC50YXJnZXQubXVsdGlwbGVcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICA/ICQkc2VsZWN0ZWRWYWxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICA6ICQkc2VsZWN0ZWRWYWxbMF1cbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgICAgICAgIF92bS5fbChfdm0uc3RyaW5nR3JvdXBzLCBmdW5jdGlvbihncm91cCkge1xuICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBfYyhcbiAgICAgICAgICAgICAgICAgICAgICAgIFwib3B0Z3JvdXBcIixcbiAgICAgICAgICAgICAgICAgICAgICAgIHsgYXR0cnM6IHsgbGFiZWw6IGdyb3VwIH0gfSxcbiAgICAgICAgICAgICAgICAgICAgICAgIF92bS5fbChfdm0uZGljdGlvbmFyeSwgZnVuY3Rpb24oc3RyaW5nLCBpbmRleCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gX3ZtLnNob3dTdHJpbmcoc3RyaW5nLCBncm91cClcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICA/IF9jKFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcIm9wdGlvblwiLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYXR0cnM6IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlOiBzdHJpbmcuZGVzY3JpcHRpb24sXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcImRhdGEtZGF0YWJhc2UtaWRcIjogc3RyaW5nLmRiSUQsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcImRhdGEtZ3JvdXBcIjogc3RyaW5nLmdyb3VwXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkb21Qcm9wczogeyB2YWx1ZTogaW5kZXggfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBbXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgX3ZtLl92KFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgX3ZtLl9zKFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBfdm0ucHJvY2Vzc09wdGlvbk5hbWUoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc3RyaW5nLm9yaWdpbmFsLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGdyb3VwXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIClcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIClcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICApXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIF1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIClcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICA6IF92bS5fZSgpXG4gICAgICAgICAgICAgICAgICAgICAgICB9KSxcbiAgICAgICAgICAgICAgICAgICAgICAgIDBcbiAgICAgICAgICAgICAgICAgICAgICApXG4gICAgICAgICAgICAgICAgICAgIH0pLFxuICAgICAgICAgICAgICAgICAgICAwXG4gICAgICAgICAgICAgICAgICApXG4gICAgICAgICAgICAgICAgXSksXG4gICAgICAgICAgICAgICAgX3ZtLl92KFwiIFwiKSxcbiAgICAgICAgICAgICAgICBfYyhcImRpdlwiLCB7IGF0dHJzOiB7IGlkOiBcInRycC1uZXh0LXByZXZpb3VzXCIgfSB9LCBbXG4gICAgICAgICAgICAgICAgICBfYyhcbiAgICAgICAgICAgICAgICAgICAgXCJidXR0b25cIixcbiAgICAgICAgICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgICAgICAgIHN0YXRpY0NsYXNzOiBcInRycC1uZXh0LXByZXZpb3VzLWJ1dHRvbnNcIixcbiAgICAgICAgICAgICAgICAgICAgICBhdHRyczoge1xuICAgICAgICAgICAgICAgICAgICAgICAgdHlwZTogXCJidXR0b25cIixcbiAgICAgICAgICAgICAgICAgICAgICAgIGlkOiBcInRycC1wcmV2aW91c1wiLFxuICAgICAgICAgICAgICAgICAgICAgICAgdGl0bGU6IF92bS5lZGl0b3JTdHJpbmdzLnByZXZpb3VzX3RpdGxlX2F0dHJcbiAgICAgICAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgICAgICAgIG9uOiB7XG4gICAgICAgICAgICAgICAgICAgICAgICBjbGljazogZnVuY3Rpb24oJGV2ZW50KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgIF92bS5wcmV2aW91c1N0cmluZygpXG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgICAgICBbXG4gICAgICAgICAgICAgICAgICAgICAgX2MoXCJzcGFuXCIsIFtfdm0uX3YoXCLCq1wiKV0pLFxuICAgICAgICAgICAgICAgICAgICAgIF92bS5fdihcIiBcIiArIF92bS5fcyhfdm0uZWRpdG9yU3RyaW5ncy5wcmV2aW91cykpXG4gICAgICAgICAgICAgICAgICAgIF1cbiAgICAgICAgICAgICAgICAgICksXG4gICAgICAgICAgICAgICAgICBfdm0uX3YoXCIgXCIpLFxuICAgICAgICAgICAgICAgICAgX2MoXG4gICAgICAgICAgICAgICAgICAgIFwiYnV0dG9uXCIsXG4gICAgICAgICAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICAgICAgICBzdGF0aWNDbGFzczogXCJ0cnAtbmV4dC1wcmV2aW91cy1idXR0b25zXCIsXG4gICAgICAgICAgICAgICAgICAgICAgYXR0cnM6IHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHR5cGU6IFwiYnV0dG9uXCIsXG4gICAgICAgICAgICAgICAgICAgICAgICBpZDogXCJ0cnAtbmV4dFwiLFxuICAgICAgICAgICAgICAgICAgICAgICAgdGl0bGU6IF92bS5lZGl0b3JTdHJpbmdzLm5leHRfdGl0bGVfYXR0clxuICAgICAgICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgICAgICAgICAgb246IHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGNsaWNrOiBmdW5jdGlvbigkZXZlbnQpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgX3ZtLm5leHRTdHJpbmcoKVxuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICAgICAgW1xuICAgICAgICAgICAgICAgICAgICAgIF92bS5fdihfdm0uX3MoX3ZtLmVkaXRvclN0cmluZ3MubmV4dCkgKyBcIiBcIiksXG4gICAgICAgICAgICAgICAgICAgICAgX2MoXCJzcGFuXCIsIFtfdm0uX3YoXCLCu1wiKV0pXG4gICAgICAgICAgICAgICAgICAgIF1cbiAgICAgICAgICAgICAgICAgIClcbiAgICAgICAgICAgICAgICBdKSxcbiAgICAgICAgICAgICAgICBfdm0uX3YoXCIgXCIpLFxuICAgICAgICAgICAgICAgIF9jKFwiZGl2XCIsIHsgYXR0cnM6IHsgaWQ6IFwidHJwLXZpZXctYXNcIiB9IH0sIFtcbiAgICAgICAgICAgICAgICAgIF9jKFwiZGl2XCIsIHsgYXR0cnM6IHsgaWQ6IFwidHJwLXZpZXctYXMtZGVzY3JpcHRpb25cIiB9IH0sIFtcbiAgICAgICAgICAgICAgICAgICAgX3ZtLl92KF92bS5fcyhfdm0uZWRpdG9yU3RyaW5ncy52aWV3X2FzKSlcbiAgICAgICAgICAgICAgICAgIF0pLFxuICAgICAgICAgICAgICAgICAgX3ZtLl92KFwiIFwiKSxcbiAgICAgICAgICAgICAgICAgIF9jKFxuICAgICAgICAgICAgICAgICAgICBcInNlbGVjdFwiLFxuICAgICAgICAgICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgICAgICAgZGlyZWN0aXZlczogW1xuICAgICAgICAgICAgICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgICAgICAgICAgICBuYW1lOiBcIm1vZGVsXCIsXG4gICAgICAgICAgICAgICAgICAgICAgICAgIHJhd05hbWU6IFwidi1tb2RlbFwiLFxuICAgICAgICAgICAgICAgICAgICAgICAgICB2YWx1ZTogX3ZtLnZpZXdBcyxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgZXhwcmVzc2lvbjogXCJ2aWV3QXNcIlxuICAgICAgICAgICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICAgICAgICAgIHsgbmFtZTogXCJzZWxlY3QyXCIsIHJhd05hbWU6IFwidi1zZWxlY3QyXCIgfVxuICAgICAgICAgICAgICAgICAgICAgIF0sXG4gICAgICAgICAgICAgICAgICAgICAgYXR0cnM6IHsgaWQ6IFwidHJwLXZpZXctYXMtc2VsZWN0XCIgfSxcbiAgICAgICAgICAgICAgICAgICAgICBvbjoge1xuICAgICAgICAgICAgICAgICAgICAgICAgY2hhbmdlOiBmdW5jdGlvbigkZXZlbnQpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgdmFyICQkc2VsZWN0ZWRWYWwgPSBBcnJheS5wcm90b3R5cGUuZmlsdGVyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgLmNhbGwoJGV2ZW50LnRhcmdldC5vcHRpb25zLCBmdW5jdGlvbihvKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gby5zZWxlY3RlZFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgLm1hcChmdW5jdGlvbihvKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YXIgdmFsID0gXCJfdmFsdWVcIiBpbiBvID8gby5fdmFsdWUgOiBvLnZhbHVlXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gdmFsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSlcbiAgICAgICAgICAgICAgICAgICAgICAgICAgX3ZtLnZpZXdBcyA9ICRldmVudC50YXJnZXQubXVsdGlwbGVcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICA/ICQkc2VsZWN0ZWRWYWxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICA6ICQkc2VsZWN0ZWRWYWxbMF1cbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgICAgICAgIF92bS5fbChfdm0ucm9sZXMsIGZ1bmN0aW9uKHJvbGUsIHJvbGVJbmRleCkge1xuICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBfYyhcbiAgICAgICAgICAgICAgICAgICAgICAgIFwib3B0aW9uXCIsXG4gICAgICAgICAgICAgICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgIGF0dHJzOiB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZGlzYWJsZWQ6ICFyb2xlLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlOiAhcm9sZSA/IF92bS5lZGl0b3JTdHJpbmdzLnZpZXdfYXNfcHJvIDogXCJcIlxuICAgICAgICAgICAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgICAgICAgICAgICBkb21Qcm9wczogeyB2YWx1ZTogcm9sZSB9XG4gICAgICAgICAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgICAgICAgICAgW192bS5fdihfdm0uX3Mocm9sZUluZGV4KSldXG4gICAgICAgICAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgICAgICAgICB9KSxcbiAgICAgICAgICAgICAgICAgICAgMFxuICAgICAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgICAgIF0pXG4gICAgICAgICAgICAgIF0pXG4gICAgICAgICAgICBdKSxcbiAgICAgICAgICAgIF92bS5fdihcIiBcIiksXG4gICAgICAgICAgICBfYyhcbiAgICAgICAgICAgICAgXCJkaXZcIixcbiAgICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgIGRpcmVjdGl2ZXM6IFtcbiAgICAgICAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICAgICAgbmFtZTogXCJzaG93XCIsXG4gICAgICAgICAgICAgICAgICAgIHJhd05hbWU6IFwidi1zaG93XCIsXG4gICAgICAgICAgICAgICAgICAgIHZhbHVlOiBfdm0uc2VsZWN0ZWRTdHJpbmcgIT09IG51bGwsXG4gICAgICAgICAgICAgICAgICAgIGV4cHJlc3Npb246IFwic2VsZWN0ZWRTdHJpbmcgIT09IG51bGxcIlxuICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIF0sXG4gICAgICAgICAgICAgICAgc3RhdGljQ2xhc3M6IFwidHJwLWNvbnRyb2xzLXNlY3Rpb25cIlxuICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICBbXG4gICAgICAgICAgICAgICAgX2MoXCJsYW5ndWFnZS1ib3hlc1wiLCB7XG4gICAgICAgICAgICAgICAgICBhdHRyczoge1xuICAgICAgICAgICAgICAgICAgICBzZWxlY3RlZEluZGV4ZXNBcnJheTogX3ZtLnNlbGVjdGVkSW5kZXhlc0FycmF5LFxuICAgICAgICAgICAgICAgICAgICBkaWN0aW9uYXJ5OiBfdm0uZGljdGlvbmFyeSxcbiAgICAgICAgICAgICAgICAgICAgY3VycmVudExhbmd1YWdlOiBfdm0uY3VycmVudExhbmd1YWdlLFxuICAgICAgICAgICAgICAgICAgICBvblNjcmVlbkxhbmd1YWdlOiBfdm0ub25TY3JlZW5MYW5ndWFnZSxcbiAgICAgICAgICAgICAgICAgICAgbGFuZ3VhZ2VOYW1lczogX3ZtLmxhbmd1YWdlTmFtZXMsXG4gICAgICAgICAgICAgICAgICAgIHNldHRpbmdzOiBfdm0uc2V0dGluZ3MsXG4gICAgICAgICAgICAgICAgICAgIHNob3dDaGFuZ2VzVW5zYXZlZE1lc3NhZ2U6IF92bS5zaG93Q2hhbmdlc1Vuc2F2ZWRNZXNzYWdlLFxuICAgICAgICAgICAgICAgICAgICBlZGl0b3JTdHJpbmdzOiBfdm0uZWRpdG9yU3RyaW5ncyxcbiAgICAgICAgICAgICAgICAgICAgZmxhZ3NQYXRoOiBfdm0uZmxhZ3NQYXRoLFxuICAgICAgICAgICAgICAgICAgICBpZnJhbWU6IF92bS5pZnJhbWVcbiAgICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgICAgICBvbjoge1xuICAgICAgICAgICAgICAgICAgICBcImRpc2NhcmRlZC1jaGFuZ2VzXCI6IGZ1bmN0aW9uKCRldmVudCkge1xuICAgICAgICAgICAgICAgICAgICAgIF92bS5oYXNVbnNhdmVkQ2hhbmdlcygpXG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9KVxuICAgICAgICAgICAgICBdLFxuICAgICAgICAgICAgICAxXG4gICAgICAgICAgICApLFxuICAgICAgICAgICAgX3ZtLl92KFwiIFwiKSxcbiAgICAgICAgICAgIF9jKFwiZXh0cmEtY29udGVudFwiLCB7XG4gICAgICAgICAgICAgIGF0dHJzOiB7XG4gICAgICAgICAgICAgICAgbGFuZ3VhZ2VOYW1lczogX3ZtLmxhbmd1YWdlTmFtZXMsXG4gICAgICAgICAgICAgICAgZWRpdG9yU3RyaW5nczogX3ZtLmVkaXRvclN0cmluZ3MsXG4gICAgICAgICAgICAgICAgcGFpZFZlcnNpb246IF92bS5wYWlkX3ZlcnNpb25cbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSksXG4gICAgICAgICAgICBfdm0uX3YoXCIgXCIpLFxuICAgICAgICAgICAgX2MoXG4gICAgICAgICAgICAgIFwiZGl2XCIsXG4gICAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICBkaXJlY3RpdmVzOiBbXG4gICAgICAgICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgICAgIG5hbWU6IFwic2hvd1wiLFxuICAgICAgICAgICAgICAgICAgICByYXdOYW1lOiBcInYtc2hvd1wiLFxuICAgICAgICAgICAgICAgICAgICB2YWx1ZTogX3ZtLnRyYW5zbGF0aW9uTm90TG9hZGVkWWV0LFxuICAgICAgICAgICAgICAgICAgICBleHByZXNzaW9uOiBcInRyYW5zbGF0aW9uTm90TG9hZGVkWWV0XCJcbiAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBdLFxuICAgICAgICAgICAgICAgIHN0YXRpY0NsYXNzOiBcInRycC1jb250cm9scy1zZWN0aW9uXCJcbiAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgW1xuICAgICAgICAgICAgICAgIF9jKFxuICAgICAgICAgICAgICAgICAgXCJkaXZcIixcbiAgICAgICAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICAgICAgc3RhdGljQ2xhc3M6IFwidHJwLWNvbnRyb2xzLXNlY3Rpb24tY29udGVudFwiLFxuICAgICAgICAgICAgICAgICAgICBhdHRyczogeyBpZDogXCJ0cnAtdHJhbnNsYXRpb24tbm90LXJlYWR5LXNlY3Rpb25cIiB9XG4gICAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgICAgW1xuICAgICAgICAgICAgICAgICAgICBfYyhcInBcIiwge1xuICAgICAgICAgICAgICAgICAgICAgIGRvbVByb3BzOiB7XG4gICAgICAgICAgICAgICAgICAgICAgICBpbm5lckhUTUw6IF92bS5fcyhcbiAgICAgICAgICAgICAgICAgICAgICAgICAgX3ZtLmVkaXRvclN0cmluZ3MudHJhbnNsYXRpb25fbm90X2xvYWRlZF95ZXRcbiAgICAgICAgICAgICAgICAgICAgICAgIClcbiAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIH0pXG4gICAgICAgICAgICAgICAgICBdXG4gICAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgICBdXG4gICAgICAgICAgICApXG4gICAgICAgICAgXSxcbiAgICAgICAgICAxXG4gICAgICAgICksXG4gICAgICAgIF92bS5fdihcIiBcIiksXG4gICAgICAgIF9jKFwiZGl2XCIsIHsgYXR0cnM6IHsgaWQ6IFwidHJwX3NlbGVjdDJfb3ZlcmxheVwiIH0gfSksXG4gICAgICAgIF92bS5fdihcIiBcIiksXG4gICAgICAgIF9jKFwiaG92ZXItYWN0aW9uc1wiLCB7XG4gICAgICAgICAgcmVmOiBcImhvdmVyQWN0aW9uc1wiLFxuICAgICAgICAgIGF0dHJzOiB7XG4gICAgICAgICAgICBkaWN0aW9uYXJ5OiBfdm0uZGljdGlvbmFyeSxcbiAgICAgICAgICAgIHNldHRpbmdzOiBfdm0uc2V0dGluZ3MsXG4gICAgICAgICAgICBpZnJhbWU6IF92bS5pZnJhbWUsXG4gICAgICAgICAgICBkYXRhQXR0cmlidXRlczogX3ZtLmRhdGFBdHRyaWJ1dGVzLFxuICAgICAgICAgICAgbWVyZ2VSdWxlczogX3ZtLm1lcmdlUnVsZXMsXG4gICAgICAgICAgICBub25jZXM6IF92bS5ub25jZXMsXG4gICAgICAgICAgICBhamF4X3VybDogX3ZtLmFqYXhfdXJsLFxuICAgICAgICAgICAgbWVyZ2VEYXRhOiBfdm0ubWVyZ2VEYXRhLFxuICAgICAgICAgICAgZWRpdG9yU3RyaW5nczogX3ZtLmVkaXRvclN0cmluZ3NcbiAgICAgICAgICB9XG4gICAgICAgIH0pXG4gICAgICBdLFxuICAgICAgMVxuICAgICksXG4gICAgX3ZtLl92KFwiIFwiKSxcbiAgICBfYyhcImRpdlwiLCB7IGF0dHJzOiB7IGlkOiBcInRycC1wcmV2aWV3XCIgfSB9LCBbXG4gICAgICBfYyhcImlmcmFtZVwiLCB7XG4gICAgICAgIGF0dHJzOiB7IGlkOiBcInRycC1wcmV2aWV3LWlmcmFtZVwiLCBzcmM6IF92bS51cmxUb0xvYWQgfSxcbiAgICAgICAgb246IHsgbG9hZDogX3ZtLmlGcmFtZUxvYWRlZCB9XG4gICAgICB9KSxcbiAgICAgIF92bS5fdihcIiBcIiksXG4gICAgICBfYyhcImRpdlwiLCB7IGF0dHJzOiB7IGlkOiBcInRycC1wcmV2aWV3LWxvYWRlclwiIH0gfSwgW1xuICAgICAgICBfYyhcbiAgICAgICAgICBcInN2Z1wiLFxuICAgICAgICAgIHtcbiAgICAgICAgICAgIHN0YXRpY0NsYXNzOiBcInRycC1sb2FkZXJcIixcbiAgICAgICAgICAgIGF0dHJzOiB7XG4gICAgICAgICAgICAgIHdpZHRoOiBcIjY1cHhcIixcbiAgICAgICAgICAgICAgaGVpZ2h0OiBcIjY1cHhcIixcbiAgICAgICAgICAgICAgdmlld0JveDogXCIwIDAgNjYgNjZcIixcbiAgICAgICAgICAgICAgeG1sbnM6IFwiaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmdcIlxuICAgICAgICAgICAgfVxuICAgICAgICAgIH0sXG4gICAgICAgICAgW1xuICAgICAgICAgICAgX2MoXCJjaXJjbGVcIiwge1xuICAgICAgICAgICAgICBzdGF0aWNDbGFzczogXCJ0cnAtY2lyY2xlXCIsXG4gICAgICAgICAgICAgIGF0dHJzOiB7XG4gICAgICAgICAgICAgICAgZmlsbDogXCJub25lXCIsXG4gICAgICAgICAgICAgICAgXCJzdHJva2Utd2lkdGhcIjogXCI2XCIsXG4gICAgICAgICAgICAgICAgXCJzdHJva2UtbGluZWNhcFwiOiBcInJvdW5kXCIsXG4gICAgICAgICAgICAgICAgY3g6IFwiMzNcIixcbiAgICAgICAgICAgICAgICBjeTogXCIzM1wiLFxuICAgICAgICAgICAgICAgIHI6IFwiMzBcIlxuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9KVxuICAgICAgICAgIF1cbiAgICAgICAgKVxuICAgICAgXSlcbiAgICBdKVxuICBdKVxufVxudmFyIHN0YXRpY1JlbmRlckZucyA9IFtdXG5yZW5kZXIuX3dpdGhTdHJpcHBlZCA9IHRydWVcblxuZXhwb3J0IHsgcmVuZGVyLCBzdGF0aWNSZW5kZXJGbnMgfSJdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./node_modules/vue-loader/lib/loaders/templateLoader.js?!./node_modules/vue-loader/lib/index.js?!./assets/src/js/editor.vue?vue&type=template&id=b046e8ec&\n");
857
 
858
  /***/ }),
859
 
667
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
668
 
669
  "use strict";
670
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../utils */ \"./assets/src/js/utils.js\");\n/* harmony import */ var axios__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! axios */ \"./node_modules/axios/index.js\");\n/* harmony import */ var axios__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(axios__WEBPACK_IMPORTED_MODULE_1__);\n//\n//\n//\n//\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n props: ['dictionary', 'settings', 'iframe', 'dataAttributes', 'mergeRules', 'ajax_url', 'nonces', 'mergeData', 'editorStrings', 'currentLanguage'],\n data: function data() {\n return {\n hoveredStringId: '',\n hoveredStringSelector: '',\n hoveredTarget: '',\n counter: 0\n };\n },\n methods: {\n showPencilIcon: function showPencilIcon(element) {\n if (!this.dictionary || this.dictionary.length < 1) return;\n var self = this;\n var target = element.target;\n var relatedNode, relatedNodeAttr, position, stringSelector, stringId, mergeOrSplit; //for these tag names we need to insert our HTML before the element and not inside of it\n //@TODO: add/research more\n\n var beforePosition = ['IMG', 'INPUT', 'TEXTAREA'];\n if (self.hoveredTarget != '' && target.isSameNode(self.hoveredTarget)) return; //if other icons are showing, remove them\n\n self.removePencilIcon(); //remove highlight class\n\n self.removeHighlight(false); //figure out where to insert extra HTML\n\n if (beforePosition.includes(target.tagName)) position = 'beforebegin';else position = 'afterbegin'; //insert button HTML\n\n target.insertAdjacentHTML(position, this.getTrpSpan()); //inserted node\n\n var trpSpan = self.iframe.getElementsByTagName('trp-span')[0];\n if (!trpSpan) return; //get node info based on where we inserted our button\n\n if (position == 'afterbegin') relatedNode = trpSpan.parentNode;else relatedNode = trpSpan.nextElementSibling; //edit string button\n\n var editButton = this.iframe.querySelector('trp-edit');\n var foundNonGettext = false;\n self.dataAttributes.forEach(function (baseSelector) {\n self.$parent.prepareSelectorStrings(baseSelector).forEach(function (selector) {\n relatedNodeAttr = relatedNode.getAttribute(selector);\n\n if (relatedNodeAttr) {\n stringId = relatedNodeAttr;\n stringSelector = selector;\n\n if (!stringSelector.includes('data-trpgettextoriginal')) {\n // includes at least one data-base-selector that is not gettext. Useful for determining edit pencil color\n foundNonGettext = true;\n }\n }\n });\n });\n self.hoveredStringSelector = stringSelector;\n self.hoveredStringId = stringId;\n self.hoveredTarget = target; // show green edit pencil\n\n if (foundNonGettext) {\n editButton.classList.remove('trp-gettext-pencil');\n } else {\n editButton.classList.add('trp-gettext-pencil');\n } //figure out if split or merge is available\n\n\n mergeOrSplit = self.checkMergeOrSplit(target); //fit inside view\n\n self.fitPencilIconInsideView(trpSpan, target, mergeOrSplit);\n\n if (!self.mergeData.includes(stringId)) {\n editButton.style.display = 'inline-block'; //add class to highlight text\n\n if (!target.classList.contains('trp-highlight')) target.className += ' trp-highlight';\n } //merge or split event listeners\n\n\n if (mergeOrSplit != 'none' && !self.mergeData.includes(stringId)) {\n var button = this.iframe.querySelector('trp-' + mergeOrSplit);\n button.style.display = 'inline-block'; //setup event listeners for merge and split\n\n if (mergeOrSplit == 'split') button.addEventListener('click', self.splitHandler);else if (mergeOrSplit == 'merge') button.addEventListener('click', self.mergeHandler);\n }\n\n editButton.addEventListener('click', self.editHandler);\n },\n editHandler: function editHandler(event) {\n event.preventDefault();\n event.stopPropagation();\n if (this.$parent.mergingString) this.removeHighlight(true);\n this.$parent.mergeData = [];\n this.$parent.selectedString = this.$parent.getStringIndex(this.hoveredStringSelector, this.hoveredStringId);\n this.$parent.translationNotLoadedYet = this.$parent.selectedString === null;\n jQuery('#trp-string-categories').select2('close');\n },\n splitHandler: function splitHandler(event) {\n event.preventDefault();\n event.stopPropagation();\n this.$parent.mergingString = false;\n var split = confirm(this.editorStrings.split_confirmation);\n if (split === false) return;\n var strings = [];\n var hoveredStringIndex = this.$parent.getStringIndex(this.hoveredStringSelector, this.hoveredStringId);\n strings.push(this.dictionary[hoveredStringIndex].original);\n var data = new FormData();\n data.append('action', 'trp_split_translation_block');\n data.append('security', this.nonces['splittbnonce']);\n data.append('strings', JSON.stringify(strings));\n var self = this;\n axios__WEBPACK_IMPORTED_MODULE_1___default.a.post(this.ajax_url, data).then(function (response) {\n window.location.reload();\n })[\"catch\"](function (error) {\n console.log(error);\n });\n },\n mergeHandler: function mergeHandler(event) {\n event.preventDefault();\n event.stopPropagation();\n var self = this;\n var parent,\n isDeprecated = null,\n deprecatedString = null,\n stringId;\n self.$parent.mergingString = true; //remove classes\n\n var previouslyHighlighted = this.iframe.getElementsByClassName('trp-create-translation-block');\n\n if (previouslyHighlighted.length > 0) {\n var i;\n\n for (i = 0; i < previouslyHighlighted.length; i++) {\n previouslyHighlighted[i].classList.remove('trp-highlight');\n previouslyHighlighted[i].classList.remove('trp-create-translation-block');\n }\n }\n\n parent = self.hoveredTarget.closest(self.mergeRules.top_parents); //remove highlight classes from children\n\n parent.querySelectorAll('.trp-highlight').forEach(function (node) {\n node.classList.remove('trp-highlight');\n }); //determine the strings that are being prepared for merging (no gettext)\n\n self.$parent.mergeData = [];\n parent.querySelectorAll('[data-trp-translate-id]').forEach(function (node) {\n stringId = node.getAttribute('data-trp-translate-id');\n if (stringId) self.$parent.mergeData.push(stringId);\n }); //check if we have existing translations for this block\n\n isDeprecated = parent.getAttribute('data-trp-translate-id-deprecated');\n if (isDeprecated) deprecatedString = self.$parent.getStringIndex('data-trp-translate-id', isDeprecated);\n parent.setAttribute('data-trp-translate-id', 'trp_creating_translation_block');\n parent.className += ' trp-highlight trp-create-translation-block'; //create a placeholder string for the dictionary\n\n var dummyString = {\n type: 'regular',\n attribute: '',\n block_type: '1',\n dbID: 'create_translation_block' + this.counter,\n original: self.stripEditorData(parent),\n selector: 'data-trp-translate-id',\n translationsArray: {}\n };\n this.counter++;\n var dummyTranslations = {};\n var defaultLanguage = this.settings['default-language']; //populate translationsArray\n\n self.settings['translation-languages'].forEach(function (languageCode) {\n if (languageCode != defaultLanguage) {\n dummyTranslations = {\n block_type: '1',\n id: languageCode,\n status: '0',\n translated: '' //populate existing translations\n\n };\n\n if (deprecatedString) {\n dummyTranslations.translated = self.dictionary[deprecatedString].translationsArray[languageCode].translated;\n dummyTranslations.editedTranslation = self.dictionary[deprecatedString].translationsArray[languageCode].translated;\n }\n\n dummyString.translationsArray[languageCode] = dummyTranslations;\n }\n }); //add item to dictionary and set selectedString as the index\n\n self.$parent.selectedString = self.dictionary.push(dummyString) - 1;\n },\n removePencilIcon: function removePencilIcon() {\n var icons = this.iframe.querySelectorAll('trp-span');\n\n if (icons.length > 0) {\n icons.forEach(function (icon) {\n icon.remove();\n });\n }\n },\n checkMergeOrSplit: function checkMergeOrSplit(target) {\n if (!this.mergeRules || !this.mergeRules.self_object_type || !this.mergeRules.top_parents) return 'none';\n var hoveredStringIndex = this.$parent.getStringIndex(this.hoveredStringSelector, this.hoveredStringId);\n if (!hoveredStringIndex) hoveredStringIndex = this.$parent.selectedString;\n if (typeof this.dictionary[hoveredStringIndex] != 'undefined' && this.dictionary[hoveredStringIndex].block_type == 1) return 'split';\n var self = this;\n var parentNode, childNodes, incompatibleSiblings;\n var action = 'none'; //check if target is the correct object type\n\n this.mergeRules.self_object_type.forEach(function (thisObjectType) {\n if (target.tagName.toLowerCase() == thisObjectType) {\n //get parent based on merge rules\n parentNode = target.closest(self.mergeRules.top_parents);\n\n if (parentNode != null) {\n //get childrens that are of the correct type based on parent,\n self.mergeRules.self_object_type.forEach(function (selfObjectType) {\n childNodes = parentNode.querySelectorAll(selfObjectType);\n\n if (childNodes.length > 1) {\n //check if between the children we have incompatible siblings (gettext or dynamic strings)\n incompatibleSiblings = parentNode.querySelectorAll(self.mergeRules.incompatible_siblings);\n if (incompatibleSiblings.length == 0) action = 'merge';\n }\n });\n }\n }\n });\n return action;\n },\n stripEditorData: function stripEditorData(target) {\n var copy = target.cloneNode(true);\n var self = this;\n var buttons = copy.querySelector('trp-span');\n if (buttons) buttons.remove();\n /** In case we are in secondary language and the strings that will be merged are already translated,\n * we must use the originals of these strings instead of what is in the preview iframe HTML page at this point\n */\n\n if (this.settings['default-language'] != this.currentLanguage) {\n copy.querySelectorAll('[data-trp-translate-id]').forEach(function (node) {\n var stringId = node.getAttribute('data-trp-translate-id');\n var index = self.$parent.getStringIndex('data-trp-translate-id', stringId);\n\n if (self.dictionary[index].translationsArray[self.currentLanguage] && self.dictionary[index].translationsArray[self.currentLanguage].status != 0) {\n node.innerHTML = node.innerText.replace(self.dictionary[index].translationsArray[self.currentLanguage].translated, self.dictionary[index].original);\n }\n });\n }\n\n copy.querySelectorAll('translate-press, trp-wrap, trp-highlight').forEach(function (node) {\n _utils__WEBPACK_IMPORTED_MODULE_0__[\"default\"].unwrap(node);\n });\n var attributesToReplace = ['href', 'target'];\n attributesToReplace.forEach(function (attribute) {\n copy.querySelectorAll('[data-trp-original-' + attribute + ']').forEach(function (node) {\n var dataTrpOriginalAttribute = 'data-trp-original-' + attribute;\n node.setAttribute(attribute, node.getAttribute(dataTrpOriginalAttribute));\n node.removeAttribute(dataTrpOriginalAttribute);\n });\n });\n var node;\n var otherAttributes = ['data-trp-placeholder', 'data-trp-unpreviewable'];\n var attributesToRemove = otherAttributes.concat(self.$parent.prepareSelectorStrings('data-trp-translate-id'), self.$parent.prepareSelectorStrings('data-trp-node-group'), self.$parent.prepareSelectorStrings('data-trp-node-description'));\n attributesToRemove.forEach(function (attribute) {\n copy.querySelectorAll('[' + attribute + ']').forEach(function (node) {\n node.removeAttribute(attribute);\n });\n });\n return copy.innerHTML;\n },\n removeHighlight: function removeHighlight() {\n var removeFromBlocks = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;\n var previouslyHighlighted = this.iframe.getElementsByClassName('trp-highlight');\n\n if (previouslyHighlighted.length > 0) {\n var i;\n\n for (i = 0; i < previouslyHighlighted.length; i++) {\n if (removeFromBlocks) previouslyHighlighted[i].classList.remove('trp-highlight');else if (!removeFromBlocks && !previouslyHighlighted[i].classList.contains('trp-create-translation-block')) previouslyHighlighted[i].classList.remove('trp-highlight');\n }\n }\n\n return true;\n },\n fitPencilIconInsideView: function fitPencilIconInsideView(pencil, target, mergeOrSplit) {\n // 'slick-slide-image' is a fix for elementor image slider to display pencil icon\n // 'attachment-woocommerce_thumbnail' - is a fix for WooCommerce product images on shop page (Hestia theme and others)\n // 'woocommerce-placeholder' - is a fix for WooCommerce product placeholder image on shop page (Hestia theme and others)\n var forcePencilDisplayClasses = ['slick-slide-image', 'attachment-woocommerce_thumbnail', 'woocommerce-placeholder'];\n var forcePencilDisplay = false;\n\n if (target.tagName === 'IMG') {\n var i;\n\n for (i = 0; i < forcePencilDisplayClasses.length; i++) {\n if (target.classList.contains(forcePencilDisplayClasses[i])) {\n forcePencilDisplay = true;\n break;\n }\n }\n }\n\n var rect = target.getBoundingClientRect();\n\n if (forcePencilDisplay || rect.left < 35) {\n var margin;\n if (mergeOrSplit != 'none') margin = 60;else margin = 30;\n pencil.setAttribute('style', 'margin-left: ' + margin + 'px !important');\n }\n },\n getTrpSpan: function getTrpSpan() {\n return '<trp-span><trp-merge title=\"' + this.editorStrings.merge + '\" class=\"trp-icon trp-merge dashicons dashicons-arrow-up-alt\"></trp-merge><trp-split title=\"' + this.editorStrings.split + '\" class=\"trp-icon trp-split dashicons dashicons-arrow-down-alt\"></trp-split><trp-edit title=\"' + this.editorStrings.edit + '\" class=\"trp-icon trp-edit-translation dashicons dashicons-edit\"></trp-edit></trp-span>';\n }\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zJyxcclxuICAgICAgICAgICAgJ21lcmdlUnVsZXMnLFxyXG4gICAgICAgICAgICAnYWpheF91cmwnLFxyXG4gICAgICAgICAgICAnbm9uY2VzJyxcclxuICAgICAgICAgICAgJ21lcmdlRGF0YScsXHJcbiAgICAgICAgICAgICdlZGl0b3JTdHJpbmdzJyxcclxuICAgICAgICAgICAgJ2N1cnJlbnRMYW5ndWFnZSdcclxuICAgICAgICBdLFxyXG4gICAgICAgIGRhdGEoKXtcclxuICAgICAgICAgICAgcmV0dXJue1xyXG4gICAgICAgICAgICAgICAgaG92ZXJlZFN0cmluZ0lkICAgICAgIDogJycsXHJcbiAgICAgICAgICAgICAgICBob3ZlcmVkU3RyaW5nU2VsZWN0b3IgOiAnJyxcclxuICAgICAgICAgICAgICAgIGhvdmVyZWRUYXJnZXQgICAgICAgICA6ICcnLFxyXG4gICAgICAgICAgICAgICAgY291bnRlciAgICAgICAgICAgICAgIDogMFxyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfSxcclxuICAgICAgICBtZXRob2RzOntcclxuICAgICAgICAgICAgc2hvd1BlbmNpbEljb24oIGVsZW1lbnQgKXtcclxuICAgICAgICAgICAgICAgIGlmKCAhdGhpcy5kaWN0aW9uYXJ5IHx8IHRoaXMuZGljdGlvbmFyeS5sZW5ndGggPCAxIClcclxuICAgICAgICAgICAgICAgICAgICByZXR1cm5cclxuXHJcbiAgICAgICAgICAgICAgICBsZXQgc2VsZiA9IHRoaXNcclxuICAgICAgICAgICAgICAgIGxldCB0YXJnZXQgPSBlbGVtZW50LnRhcmdldFxyXG4gICAgICAgICAgICAgICAgbGV0IHJlbGF0ZWROb2RlLCByZWxhdGVkTm9kZUF0dHIsIHBvc2l0aW9uLCBzdHJpbmdTZWxlY3Rvciwgc3RyaW5nSWQsIG1lcmdlT3JTcGxpdFxyXG5cclxuICAgICAgICAgICAgICAgIC8vZm9yIHRoZXNlIHRhZyBuYW1lcyB3ZSBuZWVkIHRvIGluc2VydCBvdXIgSFRNTCBiZWZvcmUgdGhlIGVsZW1lbnQgYW5kIG5vdCBpbnNpZGUgb2YgaXRcclxuICAgICAgICAgICAgICAgIC8vQFRPRE86IGFkZC9yZXNlYXJjaCBtb3JlXHJcbiAgICAgICAgICAgICAgICBsZXQgYmVmb3JlUG9zaXRpb24gPSBbICdJTUcnLCAnSU5QVVQnLCAnVEVYVEFSRUEnIF1cclxuXHJcbiAgICAgICAgICAgICAgICBpZiggc2VsZi5ob3ZlcmVkVGFyZ2V0ICE9ICcnICYmIHRhcmdldC5pc1NhbWVOb2RlKCBzZWxmLmhvdmVyZWRUYXJnZXQgKSApXHJcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuXHJcblxyXG4gICAgICAgICAgICAgICAgLy9pZiBvdGhlciBpY29ucyBhcmUgc2hvd2luZywgcmVtb3ZlIHRoZW1cclxuICAgICAgICAgICAgICAgIHNlbGYucmVtb3ZlUGVuY2lsSWNvbigpXHJcblxyXG4gICAgICAgICAgICAgICAgLy9yZW1vdmUgaGlnaGxpZ2h0IGNsYXNzXHJcbiAgICAgICAgICAgICAgICBzZWxmLnJlbW92ZUhpZ2hsaWdodCggZmFsc2UgKVxyXG5cclxuICAgICAgICAgICAgICAgIC8vZmlndXJlIG91dCB3aGVyZSB0byBpbnNlcnQgZXh0cmEgSFRNTFxyXG4gICAgICAgICAgICAgICAgaWYoIGJlZm9yZVBvc2l0aW9uLmluY2x1ZGVzKCB0YXJnZXQudGFnTmFtZSApIClcclxuICAgICAgICAgICAgICAgICAgICBwb3NpdGlvbiA9ICdiZWZvcmViZWdpbidcclxuICAgICAgICAgICAgICAgIGVsc2VcclxuICAgICAgICAgICAgICAgICAgICBwb3NpdGlvbiA9ICdhZnRlcmJlZ2luJ1xyXG5cclxuICAgICAgICAgICAgICAgIC8vaW5zZXJ0IGJ1dHRvbiBIVE1MXHJcbiAgICAgICAgICAgICAgICB0YXJnZXQuaW5zZXJ0QWRqYWNlbnRIVE1MKCBwb3NpdGlvbiwgdGhpcy5nZXRUcnBTcGFuKCkgKVxyXG5cclxuICAgICAgICAgICAgICAgIC8vaW5zZXJ0ZWQgbm9kZVxyXG4gICAgICAgICAgICAgICAgbGV0IHRycFNwYW4gPSBzZWxmLmlmcmFtZS5nZXRFbGVtZW50c0J5VGFnTmFtZSggJ3RycC1zcGFuJyApWzBdXHJcblxyXG4gICAgICAgICAgICAgICAgaWYoICF0cnBTcGFuIClcclxuICAgICAgICAgICAgICAgICAgICByZXR1cm5cclxuXHJcbiAgICAgICAgICAgICAgICAvL2dldCBub2RlIGluZm8gYmFzZWQgb24gd2hlcmUgd2UgaW5zZXJ0ZWQgb3VyIGJ1dHRvblxyXG4gICAgICAgICAgICAgICAgaWYoIHBvc2l0aW9uID09ICdhZnRlcmJlZ2luJyApXHJcbiAgICAgICAgICAgICAgICAgICAgcmVsYXRlZE5vZGUgPSB0cnBTcGFuLnBhcmVudE5vZGVcclxuICAgICAgICAgICAgICAgIGVsc2VcclxuICAgICAgICAgICAgICAgICAgICByZWxhdGVkTm9kZSA9IHRycFNwYW4ubmV4dEVsZW1lbnRTaWJsaW5nXHJcblxyXG4gICAgICAgICAgICAgICAgLy9lZGl0IHN0cmluZyBidXR0b25cclxuICAgICAgICAgICAgICAgIGxldCBlZGl0QnV0dG9uID0gdGhpcy5pZnJhbWUucXVlcnlTZWxlY3RvciggJ3RycC1lZGl0JyApXHJcbiAgICAgICAgICAgICAgICBsZXQgZm91bmROb25HZXR0ZXh0ID0gZmFsc2VcclxuXHJcbiAgICAgICAgICAgICAgICBzZWxmLmRhdGFBdHRyaWJ1dGVzLmZvckVhY2goIGZ1bmN0aW9uKCBiYXNlU2VsZWN0b3IgKSB7XHJcblxyXG4gICAgICAgICAgICAgICAgICAgIHNlbGYuJHBhcmVudC5wcmVwYXJlU2VsZWN0b3JTdHJpbmdzKCBiYXNlU2VsZWN0b3IgKS5mb3JFYWNoKCBmdW5jdGlvbiggc2VsZWN0b3IgKSB7XHJcblxyXG4gICAgICAgICAgICAgICAgICAgICAgICByZWxhdGVkTm9kZUF0dHIgPSByZWxhdGVkTm9kZS5nZXRBdHRyaWJ1dGUoIHNlbGVjdG9yIClcclxuXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmICggcmVsYXRlZE5vZGVBdHRyICkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgc3RyaW5nSWQgPSByZWxhdGVkTm9kZUF0dHJcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN0cmluZ1NlbGVjdG9yID0gc2VsZWN0b3JcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICggISBzdHJpbmdTZWxlY3Rvci5pbmNsdWRlcyggJ2RhdGEtdHJwZ2V0dGV4dG9yaWdpbmFsJyApICl7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gaW5jbHVkZXMgYXQgbGVhc3Qgb25lIGRhdGEtYmFzZS1zZWxlY3RvciB0aGF0IGlzIG5vdCBnZXR0ZXh0LiBVc2VmdWwgZm9yIGRldGVybWluaW5nIGVkaXQgcGVuY2lsIGNvbG9yXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZm91bmROb25HZXR0ZXh0ID0gdHJ1ZVxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICAgICAgfSlcclxuICAgICAgICAgICAgICAgIH0pXHJcblxyXG4gICAgICAgICAgICAgICAgc2VsZi5ob3ZlcmVkU3RyaW5nU2VsZWN0b3IgPSBzdHJpbmdTZWxlY3RvclxyXG4gICAgICAgICAgICAgICAgc2VsZi5ob3ZlcmVkU3RyaW5nSWQgICAgICAgPSBzdHJpbmdJZFxyXG4gICAgICAgICAgICAgICAgc2VsZi5ob3ZlcmVkVGFyZ2V0ICAgICAgICAgPSB0YXJnZXRcclxuXHJcbiAgICAgICAgICAgICAgICAvLyBzaG93IGdyZWVuIGVkaXQgcGVuY2lsXHJcbiAgICAgICAgICAgICAgICBpZiAoIGZvdW5kTm9uR2V0dGV4dCApe1xyXG4gICAgICAgICAgICAgICAgICAgIGVkaXRCdXR0b24uY2xhc3NMaXN0LnJlbW92ZSggJ3RycC1nZXR0ZXh0LXBlbmNpbCcgKVxyXG4gICAgICAgICAgICAgICAgfWVsc2V7XHJcbiAgICAgICAgICAgICAgICAgICAgZWRpdEJ1dHRvbi5jbGFzc0xpc3QuYWRkKCAndHJwLWdldHRleHQtcGVuY2lsJyApXHJcbiAgICAgICAgICAgICAgICB9XHJcblxyXG4gICAgICAgICAgICAgICAgLy9maWd1cmUgb3V0IGlmIHNwbGl0IG9yIG1lcmdlIGlzIGF2YWlsYWJsZVxyXG4gICAgICAgICAgICAgICAgbWVyZ2VPclNwbGl0ID0gc2VsZi5jaGVja01lcmdlT3JTcGxpdCggdGFyZ2V0IClcclxuXHJcbiAgICAgICAgICAgICAgICAvL2ZpdCBpbnNpZGUgdmlld1xyXG4gICAgICAgICAgICAgICAgc2VsZi5maXRQZW5jaWxJY29uSW5zaWRlVmlldyggdHJwU3BhbiwgdGFyZ2V0LCBtZXJnZU9yU3BsaXQgKVxyXG5cclxuICAgICAgICAgICAgICAgIGlmKCAhc2VsZi5tZXJnZURhdGEuaW5jbHVkZXMoIHN0cmluZ0lkICkgKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgZWRpdEJ1dHRvbi5zdHlsZS5kaXNwbGF5ID0gJ2lubGluZS1ibG9jaydcclxuXHJcbiAgICAgICAgICAgICAgICAgICAgLy9hZGQgY2xhc3MgdG8gaGlnaGxpZ2h0IHRleHRcclxuICAgICAgICAgICAgICAgICAgICBpZiggIXRhcmdldC5jbGFzc0xpc3QuY29udGFpbnMoICd0cnAtaGlnaGxpZ2h0JyApIClcclxuICAgICAgICAgICAgICAgICAgICAgICAgdGFyZ2V0LmNsYXNzTmFtZSArPSAnIHRycC1oaWdobGlnaHQnXHJcbiAgICAgICAgICAgICAgICB9XHJcblxyXG4gICAgICAgICAgICAgICAgLy9tZXJnZSBvciBzcGxpdCBldmVudCBsaXN0ZW5lcnNcclxuICAgICAgICAgICAgICAgIGlmKCBtZXJnZU9yU3BsaXQgIT0gJ25vbmUnICYmICFzZWxmLm1lcmdlRGF0YS5pbmNsdWRlcyggc3RyaW5nSWQgKSApIHtcclxuICAgICAgICAgICAgICAgICAgICBsZXQgYnV0dG9uID0gdGhpcy5pZnJhbWUucXVlcnlTZWxlY3RvciggJ3RycC0nICsgbWVyZ2VPclNwbGl0IClcclxuXHJcbiAgICAgICAgICAgICAgICAgICAgYnV0dG9uLnN0eWxlLmRpc3BsYXkgPSAnaW5saW5lLWJsb2NrJ1xyXG5cclxuICAgICAgICAgICAgICAgICAgICAvL3NldHVwIGV2ZW50IGxpc3RlbmVycyBmb3IgbWVyZ2UgYW5kIHNwbGl0XHJcbiAgICAgICAgICAgICAgICAgICAgaWYoIG1lcmdlT3JTcGxpdCA9PSAnc3BsaXQnIClcclxuICAgICAgICAgICAgICAgICAgICAgICAgYnV0dG9uLmFkZEV2ZW50TGlzdGVuZXIoICdjbGljaycsIHNlbGYuc3BsaXRIYW5kbGVyIClcclxuICAgICAgICAgICAgICAgICAgICBlbHNlIGlmKCBtZXJnZU9yU3BsaXQgPT0gJ21lcmdlJyApXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGJ1dHRvbi5hZGRFdmVudExpc3RlbmVyKCAnY2xpY2snLCBzZWxmLm1lcmdlSGFuZGxlciApXHJcbiAgICAgICAgICAgICAgICB9XHJcblxyXG4gICAgICAgICAgICAgICAgZWRpdEJ1dHRvbi5hZGRFdmVudExpc3RlbmVyKCAnY2xpY2snLCBzZWxmLmVkaXRIYW5kbGVyIClcclxuICAgICAgICAgICAgfSxcclxuICAgICAgICAgICAgZWRpdEhhbmRsZXIoIGV2ZW50ICl7XHJcbiAgICAgICAgICAgICAgICBldmVudC5wcmV2ZW50RGVmYXVsdCgpXHJcbiAgICAgICAgICAgICAgICBldmVudC5zdG9wUHJvcGFnYXRpb24oKVxyXG5cclxuICAgICAgICAgICAgICAgIGlmKCB0aGlzLiRwYXJlbnQubWVyZ2luZ1N0cmluZyApXHJcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5yZW1vdmVIaWdobGlnaHQoIHRydWUgKVxyXG5cclxuICAgICAgICAgICAgICAgIHRoaXMuJHBhcmVudC5tZXJnZURhdGEgICAgICA9IFtdXHJcblxyXG4gICAgICAgICAgICAgICAgdGhpcy4kcGFyZW50LnNlbGVjdGVkU3RyaW5nID0gdGhpcy4kcGFyZW50LmdldFN0cmluZ0luZGV4KCB0aGlzLmhvdmVyZWRTdHJpbmdTZWxlY3RvciwgdGhpcy5ob3ZlcmVkU3RyaW5nSWQgKVxyXG5cclxuICAgICAgICAgICAgICAgIHRoaXMuJHBhcmVudC50cmFuc2xhdGlvbk5vdExvYWRlZFlldCAgPSAoIHRoaXMuJHBhcmVudC5zZWxlY3RlZFN0cmluZyA9PT0gbnVsbCApXHJcblxyXG4gICAgICAgICAgICAgICAgalF1ZXJ5KCAnI3RycC1zdHJpbmctY2F0ZWdvcmllcycgKS5zZWxlY3QyKCAnY2xvc2UnIClcclxuICAgICAgICAgICAgfSxcclxuICAgICAgICAgICAgc3BsaXRIYW5kbGVyKCBldmVudCApIHtcclxuICAgICAgICAgICAgICAgIGV2ZW50LnByZXZlbnREZWZhdWx0KClcclxuICAgICAgICAgICAgICAgIGV2ZW50LnN0b3BQcm9wYWdhdGlvbigpXHJcbiAgICAgICAgICAgICAgICB0aGlzLiRwYXJlbnQubWVyZ2luZ1N0cmluZyA9IGZhbHNlXHJcblxyXG4gICAgICAgICAgICAgICAgbGV0IHNwbGl0ID0gY29uZmlybSggdGhpcy5lZGl0b3JTdHJpbmdzLnNwbGl0X2NvbmZpcm1hdGlvbiApXHJcblxyXG4gICAgICAgICAgICAgICAgaWYoIHNwbGl0ID09PSBmYWxzZSApXHJcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuXHJcblxyXG4gICAgICAgICAgICAgICAgbGV0IHN0cmluZ3MgPSBbXVxyXG4gICAgICAgICAgICAgICAgbGV0IGhvdmVyZWRTdHJpbmdJbmRleCA9IHRoaXMuJHBhcmVudC5nZXRTdHJpbmdJbmRleCggdGhpcy5ob3ZlcmVkU3RyaW5nU2VsZWN0b3IsIHRoaXMuaG92ZXJlZFN0cmluZ0lkIClcclxuICAgICAgICAgICAgICAgIHN0cmluZ3MucHVzaCggdGhpcy5kaWN0aW9uYXJ5WyBob3ZlcmVkU3RyaW5nSW5kZXggXS5vcmlnaW5hbCApXHJcblxyXG4gICAgICAgICAgICAgICAgbGV0IGRhdGEgPSBuZXcgRm9ybURhdGEoKVxyXG4gICAgICAgICAgICAgICAgICAgIGRhdGEuYXBwZW5kKCAnYWN0aW9uJywgJ3RycF9zcGxpdF90cmFuc2xhdGlvbl9ibG9jaycgKVxyXG4gICAgICAgICAgICAgICAgICAgIGRhdGEuYXBwZW5kKCAnc2VjdXJpdHknLCB0aGlzLm5vbmNlc1snc3BsaXR0Ym5vbmNlJ10gKVxyXG4gICAgICAgICAgICAgICAgICAgIGRhdGEuYXBwZW5kKCAnc3RyaW5ncycsIEpTT04uc3RyaW5naWZ5KCBzdHJpbmdzICkgKVxyXG5cclxuICAgICAgICAgICAgICAgIGxldCBzZWxmID0gdGhpc1xyXG5cclxuICAgICAgICAgICAgICAgIGF4aW9zLnBvc3QodGhpcy5hamF4X3VybCwgZGF0YSlcclxuICAgICAgICAgICAgICAgICAgICAudGhlbihmdW5jdGlvbiAocmVzcG9uc2UpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgd2luZG93LmxvY2F0aW9uLnJlbG9hZCgpXHJcbiAgICAgICAgICAgICAgICAgICAgfSlcclxuICAgICAgICAgICAgICAgICAgICAuY2F0Y2goZnVuY3Rpb24gKGVycm9yKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnNvbGUubG9nKGVycm9yKTtcclxuICAgICAgICAgICAgICAgICAgICB9KTtcclxuICAgICAgICAgICAgfSxcclxuICAgICAgICAgICAgbWVyZ2VIYW5kbGVyKCBldmVudCApIHtcclxuICAgICAgICAgICAgICAgIGV2ZW50LnByZXZlbnREZWZhdWx0KClcclxuICAgICAgICAgICAgICAgIGV2ZW50LnN0b3BQcm9wYWdhdGlvbigpXHJcblxyXG4gICAgICAgICAgICAgICAgbGV0IHNlbGYgPSB0aGlzXHJcbiAgICAgICAgICAgICAgICBsZXQgcGFyZW50LCBpc0RlcHJlY2F0ZWQgPSBudWxsLCBkZXByZWNhdGVkU3RyaW5nID0gbnVsbCwgc3RyaW5nSWRcclxuXHJcbiAgICAgICAgICAgICAgICBzZWxmLiRwYXJlbnQubWVyZ2luZ1N0cmluZyA9IHRydWVcclxuXHJcbiAgICAgICAgICAgICAgICAvL3JlbW92ZSBjbGFzc2VzXHJcbiAgICAgICAgICAgICAgICBsZXQgcHJldmlvdXNseUhpZ2hsaWdodGVkID0gdGhpcy5pZnJhbWUuZ2V0RWxlbWVudHNCeUNsYXNzTmFtZSggJ3RycC1jcmVhdGUtdHJhbnNsYXRpb24tYmxvY2snIClcclxuXHJcbiAgICAgICAgICAgICAgICBpZiggcHJldmlvdXNseUhpZ2hsaWdodGVkLmxlbmd0aCA+IDAgKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgbGV0IGlcclxuXHJcbiAgICAgICAgICAgICAgICAgICAgZm9yICggaSA9IDA7IGkgPCBwcmV2aW91c2x5SGlnaGxpZ2h0ZWQubGVuZ3RoOyBpKysgKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHByZXZpb3VzbHlIaWdobGlnaHRlZFtpXS5jbGFzc0xpc3QucmVtb3ZlKCAndHJwLWhpZ2hsaWdodCcgKVxyXG4gICAgICAgICAgICAgICAgICAgICAgICBwcmV2aW91c2x5SGlnaGxpZ2h0ZWRbaV0uY2xhc3NMaXN0LnJlbW92ZSggJ3RycC1jcmVhdGUtdHJhbnNsYXRpb24tYmxvY2snIClcclxuICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICB9XHJcblxyXG4gICAgICAgICAgICAgICAgcGFyZW50ID0gc2VsZi5ob3ZlcmVkVGFyZ2V0LmNsb3Nlc3QoIHNlbGYubWVyZ2VSdWxlcy50b3BfcGFyZW50cyApXHJcblxyXG4gICAgICAgICAgICAgICAgLy9yZW1vdmUgaGlnaGxpZ2h0IGNsYXNzZXMgZnJvbSBjaGlsZHJlblxyXG4gICAgICAgICAgICAgICAgcGFyZW50LnF1ZXJ5U2VsZWN0b3JBbGwoICcudHJwLWhpZ2hsaWdodCcgKS5mb3JFYWNoKCBmdW5jdGlvbihub2RlKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgbm9kZS5jbGFzc0xpc3QucmVtb3ZlKCAndHJwLWhpZ2hsaWdodCcgKVxyXG4gICAgICAgICAgICAgICAgfSlcclxuXHJcbiAgICAgICAgICAgICAgICAvL2RldGVybWluZSB0aGUgc3RyaW5ncyB0aGF0IGFyZSBiZWluZyBwcmVwYXJlZCBmb3IgbWVyZ2luZyAobm8gZ2V0dGV4dClcclxuICAgICAgICAgICAgICAgIHNlbGYuJHBhcmVudC5tZXJnZURhdGEgPSBbXVxyXG5cclxuICAgICAgICAgICAgICAgIHBhcmVudC5xdWVyeVNlbGVjdG9yQWxsKCAnW2RhdGEtdHJwLXRyYW5zbGF0ZS1pZF0nICkuZm9yRWFjaCggZnVuY3Rpb24oIG5vZGUgKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgc3RyaW5nSWQgPSBub2RlLmdldEF0dHJpYnV0ZSggJ2RhdGEtdHJwLXRyYW5zbGF0ZS1pZCcgKVxyXG5cclxuICAgICAgICAgICAgICAgICAgICBpZiAoIHN0cmluZ0lkIClcclxuICAgICAgICAgICAgICAgICAgICAgICAgc2VsZi4kcGFyZW50Lm1lcmdlRGF0YS5wdXNoKCBzdHJpbmdJZCApXHJcbiAgICAgICAgICAgICAgICB9KVxyXG5cclxuICAgICAgICAgICAgICAgIC8vY2hl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AgICAgICAgICAgICAgb3JpZ2luYWwgICAgICAgICAgOiBzZWxmLnN0cmlwRWRpdG9yRGF0YSggcGFyZW50ICksXHJcbiAgICAgICAgICAgICAgICAgICAgc2VsZWN0b3IgICAgICAgICAgOiAnZGF0YS10cnAtdHJhbnNsYXRlLWlkJyxcclxuICAgICAgICAgICAgICAgICAgICB0cmFuc2xhdGlvbnNBcnJheSA6IHt9XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICB0aGlzLmNvdW50ZXIrK1xyXG5cclxuICAgICAgICAgICAgICAgIGxldCBkdW1teVRyYW5zbGF0aW9ucyA9IHt9XHJcblxyXG4gICAgICAgICAgICAgICAgbGV0IGRlZmF1bHRMYW5ndWFnZSA9IHRoaXMuc2V0dGluZ3NbJ2RlZmF1bHQtbGFuZ3VhZ2UnXVxyXG5cclxuICAgICAgICAgICAgICAgIC8vcG9wdWxhdGUgdHJhbnNsYXRpb25zQXJyYXlcclxuICAgICAgICAgICAgICAgIHNlbGYuc2V0dGluZ3NbJ3RyYW5zbGF0aW9uLWxhbmd1YWdlcyddLmZvckVhY2goIGZ1bmN0aW9uKCBsYW5ndWFnZUNvZGUgICl7XHJcbiAgICAgICAgICAgICAgICAgICAgaWYoIGxhbmd1YWdlQ29kZSAhPSBkZWZhdWx0TGFuZ3VhZ2UgKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGR1bW15VHJhbnNsYXRpb25zID0ge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYmxvY2tfdHlwZSA6ICcxJyxcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlkICAgICAgICAgOiBsYW5ndWFnZUNvZGUsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBzdGF0dXMgICAgIDogJzAnLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdHJhbnNsYXRlZCA6ICcnXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cclxuXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIC8vcG9wdWxhdGUgZXhpc3RpbmcgdHJhbnNsYXRpb25zXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmKCBkZXByZWNhdGVkU3RyaW5nICkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZHVtbXlUcmFuc2xhdGlvbnMudHJhbnNsYXRlZCAgICAgICAgPSBzZWxmLmRpY3Rpb25hcnlbZGVwcmVjYXRlZFN0cmluZ10udHJhbnNsYXRpb25zQXJyYXlbbGFuZ3VhZ2VDb2RlXS50cmFuc2xhdGVkXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBkdW1teVRyYW5zbGF0aW9ucy5lZGl0ZWRUcmFuc2xhdGlvbiA9IHNlbGYuZGljdGlvbmFyeVtkZXByZWNhdGVkU3RyaW5nXS50cmFuc2xhdGlvbnNBcnJheVtsYW5ndWFnZUNvZGVdLnRyYW5zbGF0ZWRcclxuICAgICAgICAgICAgICAgICAgICAgICAgfVxyXG5cclxuICAgICAgICAgICAgICAgICAgICAgICAgZHVtbXlTdHJpbmcudHJhbnNsYXRpb25zQXJyYXlbbGFuZ3VhZ2VDb2RlXSA9IGR1bW15VHJhbnNsYXRpb25zXHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgfSlcclxuXHJcbiAgICAgICAgICAgICAgICAvL2FkZCBpdGVtIHRvIGRpY3Rpb25hcnkgYW5kIHNldCBzZWxlY3RlZFN0cmluZyBhcyB0aGUgaW5kZXhcclxuICAgICAgICAgICAgICAgIHNlbGYuJHBhcmVudC5zZWxlY3RlZFN0cmluZyA9IHNlbGYuZGljdGlvbmFyeS5wdXNoKCBkdW1teVN0cmluZyApIC0gMVxyXG5cclxuICAgICAgICAgICAgfSxcclxuICAgICAgICAgICAgcmVtb3ZlUGVuY2lsSWNvbigpe1xyXG4gICAgICAgICAgICAgICAgbGV0IGljb25zID0gdGhpcy5pZnJhbWUucXVlcnlTZWxlY3RvckFsbCggJ3RycC1zcGFuJyApXHJcblxyXG4gICAgICAgICAgICAgICAgaWYgKCBpY29ucy5sZW5ndGggPiAwICkge1xyXG4gICAgICAgICAgICAgICAgICAgIGljb25zLmZvckVhY2goIGZ1bmN0aW9uKCBpY29uICkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBpY29uLnJlbW92ZSgpXHJcbiAgICAgICAgICAgICAgICAgICAgfSlcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgfSxcclxuICAgICAgICAgICAgY2hlY2tNZXJnZU9yU3BsaXQoIHRhcmdldCApe1xyXG4gICAgICAgICAgICAgICAgaWYoICF0aGlzLm1lcmdlUnVsZXMgfHwgIXRoaXMubWVyZ2VSdWxlcy5zZWxmX29iamVjdF90eXBlIHx8ICF0aGlzLm1lcmdlUnVsZXMudG9wX3BhcmVudHMgKVxyXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiAnbm9uZSdcclxuXHJcbiAgICAgICAgICAgICAgICBsZXQgaG92ZXJlZFN0cmluZ0luZGV4ID0gdGhpcy4kcGFyZW50LmdldFN0cmluZ0luZGV4KCB0aGlzLmhvdmVyZWRTdHJpbmdTZWxlY3RvciwgdGhpcy5ob3ZlcmVkU3RyaW5nSWQgKVxyXG4gICAgICAgICAgICAgICAgaWYoICFob3ZlcmVkU3RyaW5nSW5kZXggKVxyXG4gICAgICAgICAgICAgICAgICAgIGhvdmVyZWRTdHJpbmdJbmRleCA9IHRoaXMuJHBhcmVudC5zZWxlY3RlZFN0cmluZ1xyXG5cclxuICAgICAgICAgICAgICAgIGlmKCB0eXBlb2YgdGhpcy5kaWN0aW9uYXJ5W2hvdmVyZWRTdHJpbmdJbmRleF0gIT0gJ3VuZGVmaW5lZCcgJiYgdGhpcy5kaWN0aW9uYXJ5W2hvdmVyZWRTdHJpbmdJbmRleF0uYmxvY2tfdHlwZSA9PSAxIClcclxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ3NwbGl0J1xyXG5cclxuICAgICAgICAgICAgICAgIGxldCBzZWxmID0gdGhpc1xyXG4gICAgICAgICAgICAgICAgbGV0IHBhcmVudE5vZGUsIGNoaWxkTm9kZXMsIGluY29tcGF0aWJsZVNpYmxpbmdzXHJcblxyXG4gICAgICAgICAgICAgICAgbGV0IGFjdGlvbiA9ICdub25lJ1xyXG5cclxuICAgICAgICAgICAgICAgIC8vY2hlY2sgaWYgdGFyZ2V0IGlzIHRoZSBjb3JyZWN0IG9iamVjdCB0eXBlXHJcbiAgICAgICAgICAgICAgICB0aGlzLm1lcmdlUnVsZXMuc2VsZl9vYmplY3RfdHlwZS5mb3JFYWNoKCBmdW5jdGlvbiggdGhpc09iamVjdFR5cGUgKSB7XHJcblxyXG4gICAgICAgICAgICAgICAgICAgIGlmKCB0YXJnZXQudGFnTmFtZS50b0xvd2VyQ2FzZSgpID09IHRoaXNPYmplY3RUeXBlICkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAvL2dldCBwYXJlbnQgYmFzZWQgb24gbWVyZ2UgcnVsZXNcclxuICAgICAgICAgICAgICAgICAgICAgICAgcGFyZW50Tm9kZSA9IHRhcmdldC5jbG9zZXN0KCBzZWxmLm1lcmdlUnVsZXMudG9wX3BhcmVudHMgKVxyXG5cclxuICAgICAgICAgICAgICAgICAgICAgICAgaWYoIHBhcmVudE5vZGUgIT0gbnVsbCApIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vZ2V0IGNoaWxkcmVucyB0aGF0IGFyZSBvZiB0aGUgY29ycmVjdCB0eXBlIGJhc2VkIG9uIHBhcmVudCxcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNlbGYubWVyZ2VSdWxlcy5zZWxmX29iamVjdF90eXBlLmZvckVhY2goIGZ1bmN0aW9uKCBzZWxmT2JqZWN0VHlwZSApIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjaGlsZE5vZGVzID0gcGFyZW50Tm9kZS5xdWVyeVNlbGVjdG9yQWxsKCBzZWxmT2JqZWN0VHlwZSApXHJcblxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKCBjaGlsZE5vZGVzLmxlbmd0aCA+IDEgKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vY2hlY2sgaWYgYmV0d2VlbiB0aGUgY2hpbGRyZW4gd2UgaGF2ZSBpbmNvbXBhdGlibGUgc2libGluZ3MgKGdldHRleHQgb3IgZHluYW1pYyBzdHJpbmdzKVxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpbmNvbXBhdGlibGVTaWJsaW5ncyA9IHBhcmVudE5vZGUucXVlcnlTZWxlY3RvckFsbCggc2VsZi5tZXJnZVJ1bGVzLmluY29tcGF0aWJsZV9zaWJsaW5ncyApXHJcblxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoIGluY29tcGF0aWJsZVNpYmxpbmdzLmxlbmd0aCA9PSAwIClcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFjdGlvbiA9ICdtZXJnZSdcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KVxyXG4gICAgICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgfSlcclxuXHJcbiAgICAgICAgICAgICAgICByZXR1cm4gYWN0aW9uXHJcbiAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgIHN0cmlwRWRpdG9yRGF0YSggdGFyZ2V0ICl7XHJcbiAgICAgICAgICAgICAgICBsZXQgY29weSA9IHRhcmdldC5jbG9uZU5vZGUoIHRydWUgKVxyXG4gICAgICAgICAgICAgICAgbGV0IHNlbGYgPSB0aGlzXHJcblxyXG4gICAgICAgICAgICAgICAgbGV0IGJ1dHRvbnMgPSBjb3B5LnF1ZXJ5U2VsZWN0b3I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mJiBzZWxmLmRpY3Rpb25hcnlbaW5kZXhdLnRyYW5zbGF0aW9uc0FycmF5W3NlbGYuY3VycmVudExhbmd1YWdlXS5zdGF0dXMgIT0gMCApIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIG5vZGUuaW5uZXJIVE1MID0gbm9kZS5pbm5lclRleHQucmVwbGFjZSggc2VsZi5kaWN0aW9uYXJ5W2luZGV4XS50cmFuc2xhdGlvbnNBcnJheVtzZWxmLmN1cnJlbnRMYW5ndWFnZV0udHJhbnNsYXRlZCwgc2VsZi5kaWN0aW9uYXJ5W2luZGV4XS5vcmlnaW5hbCApXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgICAgICB9KVxyXG4gICAgICAgICAgICAgICAgfVxyXG5cclxuICAgICAgICAgICAgICAgIGNvcHkucXVlcnlTZWxlY3RvckFsbCggJ3RyYW5zbGF0ZS1wcmVzcywgdHJwLXdyYXAsIHRycC1oaWdobGlnaHQnICkuZm9yRWFjaCggZnVuY3Rpb24oIG5vZGUgKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgdXRpbHMudW53cmFwKCBub2RlIClcclxuICAgICAgICAgICAgICAgIH0pXHJcblxyXG4gICAgICAgICAgICAgICAgbGV0IGF0dHJpYnV0ZXNUb1JlcGxhY2UgPSBbICdocmVmJywgJ3RhcmdldCcgXVxyXG5cclxuICAgICAgICAgICAgICAgIGF0dHJpYnV0ZXNUb1JlcGxhY2UuZm9yRWFjaCggZnVuY3Rpb24oIGF0dHJpYnV0ZSApIHtcclxuICAgICAgICAgICAgICAgICAgICBjb3B5LnF1ZXJ5U2VsZWN0b3JBbGwoICdbZGF0YS10cnAtb3JpZ2luYWwtJyArIGF0dHJpYnV0ZSArICddJyApLmZvckVhY2goIGZ1bmN0aW9uKCBub2RlICkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBsZXQgZGF0YVRycE9yaWdpbmFsQXR0cmlidXRlID0gJ2RhdGEtdHJ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AgICAgICAgIG5vZGUucmVtb3ZlQXR0cmlidXRlKCBhdHRyaWJ1dGUgKVxyXG4gICAgICAgICAgICAgICAgICAgIH0pXHJcbiAgICAgICAgICAgICAgICB9KVxyXG5cclxuICAgICAgICAgICAgICAgIHJldHVybiBjb3B5LmlubmVySFRNTFxyXG5cclxuICAgICAgICAgICAgfSxcclxuICAgICAgICAgICAgcmVtb3ZlSGlnaGxpZ2h0KCByZW1vdmVGcm9tQmxvY2tzID0gdHJ1ZSApe1xyXG4gICAgICAgICAgICAgICAgbGV0IHByZXZpb3VzbHlIaWdobGlnaHRlZCA9IHRoaXMuaWZyYW1lLmdldEVsZW1lbnRzQnlDbGFzc05hbWUoICd0cnAtaGlnaGxpZ2h0JyApXHJcblxyXG4gICAgICAgICAgICAgICAgaWYoIHByZXZpb3VzbHlIaWdobGlnaHRlZC5sZW5ndGggPiAwICkge1xyXG4gICAgICAgICAgICAgICAgICAgIGxldCBpXHJcblxyXG4gICAgICAgICAgICAgICAgICAgIGZvciAoIGkgPSAwOyBpIDwgcHJldmlvdXNseUhpZ2hsaWdodGVkLmxlbmd0aDsgaSsrICkge1xyXG5cclxuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKCByZW1vdmVGcm9tQmxvY2tzIClcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHByZXZpb3VzbHlIaWdobGlnaHRlZFtpXS5jbGFzc0xpc3QucmVtb3ZlKCAndHJwLWhpZ2hsaWdodCcgKVxyXG4gICAgICAgICAgICAgICAgICAgICAgICBlbHNlIGlmICggIXJlbW92ZUZyb21CbG9ja3MgJiYgIXByZXZpb3VzbHlIaWdobGlnaHRlZFtpXS5jbGFzc0xpc3QuY29udGFpbnMoICd0cnAtY3JlYXRlLXRyYW5zbGF0aW9uLWJsb2NrJyApIClcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHByZXZpb3VzbHlIaWdobGlnaHRlZFtpXS5jbGFzc0xpc3QucmVtb3ZlKCAndHJwLWhpZ2hsaWdodCcgKVxyXG4gICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIH1cclxuXHJcbiAgICAgICAgICAgICAgICByZXR1cm4gdHJ1ZVxyXG4gICAgICAgICAgICB9LFxyXG4gICAgICAgICAgICBmaXRQZW5jaWxJY29uSW5zaWRlVmlldyggcGVuY2lsLCB0YXJnZXQsIG1lcmdlT3JTcGxpdCApe1xyXG4gICAgICAgICAgICAgICAgLy8gJ3NsaWNrLXNsaWRlLWltYWdlJyBpcyBhIGZpeCBmb3IgZWxlbWVudG9yIGltYWdlIHNsaWRlciB0byBkaXNwbGF5IHBlbmNpbCBpY29uXHJcbiAgICAgICAgICAgICAgICAvLyAnYXR0YWNobWVudC13b29jb21tZXJjZV90aHVtYm5haWwnIC0gaXMgYSBmaXggZm9yIFdvb0NvbW1lcmNlIHByb2R1Y3QgaW1hZ2VzIG9uIHNob3AgcGFnZSAoSGVzdGlhIHRoZW1lIGFuZCBvdGhlcnMpXHJcbiAgICAgICAgICAgICAgICAvLyAnd29vY29tbWVyY2UtcGxhY2Vob2xkZXInIC0gaXMgYSBmaXggZm9yIFdvb0NvbW1lcmNlIHByb2R1Y3QgcGxhY2Vob2xkZXIgaW1hZ2Ugb24gc2hvcCBwYWdlIChIZXN0aWEgdGhlbWUgYW5kIG90aGVycylcclxuICAgICAgICAgICAgICAgIGxldCBmb3JjZVBlbmNpbERpc3BsYXlDbGFzc2VzID0gWydzbGljay1zbGlkZS1pbWFnZScsICdhdHRhY2htZW50LXdvb2NvbW1lcmNlX3RodW1ibmFpbCcsICd3b29jb21tZXJjZS1wbGFjZWhvbGRlciddXHJcbiAgICAgICAgICAgICAgICBsZXQgZm9yY2VQZW5jaWxEaXNwbGF5ID0gZmFsc2VcclxuICAgICAgICAgICAgICAgIGlmICggdGFyZ2V0LnRhZ05hbWUgPT09ICdJTUcnICl7XHJcbiAgICAgICAgICAgICAgICAgICAgbGV0IGlcclxuICAgICAgICAgICAgICAgICAgICBmb3IgKCBpID0gMDsgaSA8IGZvcmNlUGVuY2lsRGlzcGxheUNsYXNzZXMubGVuZ3RoOyBpKysgKXtcclxuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKCB0YXJnZXQuY2xhc3NMaXN0LmNvbnRhaW5zKCBmb3JjZVBlbmNpbERpc3BsYXlDbGFzc2VzW2ldICkgKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBmb3JjZVBlbmNpbERpc3BsYXkgPSB0cnVlXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcclxuICAgICAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIH1cclxuXHJcbiAgICAgICAgICAgICAgICBsZXQgcmVjdCA9IHRhcmdldC5nZXRCb3VuZGluZ0NsaWVudFJlY3QoKVxyXG4gICAgICAgICAgICAgICAgaWYoIGZvcmNlUGVuY2lsRGlzcGxheSB8fCByZWN0LmxlZnQgPCAzNSApIHtcclxuICAgICAgICAgICAgICAgICAgICBsZXQgbWFyZ2luXHJcblxyXG4gICAgICAgICAgICAgICAgICAgIGlmKCBtZXJnZU9yU3BsaXQgIT0gJ25vbmUnIClcclxuICAgICAgICAgICAgICAgICAgICAgICAgbWFyZ2luID0gNjBcclxuICAgICAgICAgICAgICAgICAgICBlbHNlXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIG1hcmdpbiA9IDMwXHJcblxyXG4gICAgICAgICAgICAgICAgICAgIHBlbmNpbC5zZXRBdHRyaWJ1dGUoICdzdHlsZScsICdtYXJnaW4tbGVmdDogJyArIG1hcmdpbiArICdweCAhaW1wb3J0YW50JyApXHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgIGdldFRycFNwYW4oKSB7XHJcbiAgICAgICAgICAgICAgICByZXR1cm4gJzx0cnAtc3Bhbj48dHJwLW1lcmdlIHRpdGxlPVwiJysgdGhpcy5lZGl0b3JTdHJpbmdzLm1lcmdlICsnXCIgY2xhc3M9XCJ0cnAtaWNvbiB0cnAtbWVyZ2UgZGFzaGljb25zIGRhc2hpY29ucy1hcnJvdy11cC1hbHRcIj48L3RycC1tZXJnZT48dHJwLXNwbGl0IHRpdGxlPVwiJysgdGhpcy5lZGl0b3JTdHJpbmdzLnNwbGl0ICsnXCIgY2xhc3M9XCJ0cnAtaWNvbiB0cnAtc3BsaXQgZGFzaGljb25zIGRhc2hpY29ucy1hcnJvdy1kb3duLWFsdFwiPjwvdHJwLXNwbGl0Pjx0cnAtZWRpdCB0aXRsZT1cIicrIHRoaXMuZWRpdG9yU3RyaW5ncy5lZGl0ICsnXCIgY2xhc3M9XCJ0cnAtaWNvbiB0cnAtZWRpdC10cmFuc2xhdGlvbiBkYXNoaWNvbnMgZGFzaGljb25zLWVkaXRcIj48L3RycC1lZGl0PjwvdHJwLXNwYW4+J1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfVxyXG4gICAgfVxyXG48L3NjcmlwdD5cclxuIl0sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./node_modules/babel-loader/lib/index.js?!./node_modules/vue-loader/lib/index.js?!./assets/src/js/components/hover-actions.vue?vue&type=script&lang=js&\n");
671
 
672
  /***/ }),
673
 
715
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
716
 
717
  "use strict";
718
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var select2_dist_js_select2_min_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! select2/dist/js/select2.min.js */ \"./node_modules/select2/dist/js/select2.min.js\");\n/* harmony import */ var select2_dist_js_select2_min_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(select2_dist_js_select2_min_js__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./utils */ \"./assets/src/js/utils.js\");\n/* harmony import */ var axios__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! axios */ \"./node_modules/axios/index.js\");\n/* harmony import */ var axios__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(axios__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _components_language_boxes_vue__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./components/language-boxes.vue */ \"./assets/src/js/components/language-boxes.vue\");\n/* harmony import */ var _components_save_translations_vue__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./components/save-translations.vue */ \"./assets/src/js/components/save-translations.vue\");\n/* harmony import */ var _components_hover_actions_vue__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./components/hover-actions.vue */ \"./assets/src/js/components/hover-actions.vue\");\n/* harmony import */ var _components_extra_content_vue__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./components/extra-content.vue */ \"./assets/src/js/components/extra-content.vue\");\n/* harmony import */ var he__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! he */ \"./node_modules/he/he.js\");\n/* harmony import */ var he__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(he__WEBPACK_IMPORTED_MODULE_7__);\nfunction _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread(); }\n\nfunction _nonIterableSpread() { throw new TypeError(\"Invalid attempt to spread non-iterable instance\"); }\n\nfunction _iterableToArray(iter) { if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === \"[object Arguments]\") return Array.from(iter); }\n\nfunction _arrayWithoutHoles(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } }\n\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n\n\n\n\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n props: ['trp_settings', 'language_names', 'ordered_secondary_languages', 'current_language', 'on_screen_language', 'view_as_roles', 'url_to_load', 'string_selectors', 'data_attributes', 'ajax_url', 'editor_nonces', 'string_group_order', 'merge_rules', 'localized_text', 'paid_version', 'flags_path'],\n components: {\n languageBoxes: _components_language_boxes_vue__WEBPACK_IMPORTED_MODULE_3__[\"default\"],\n saveTranslations: _components_save_translations_vue__WEBPACK_IMPORTED_MODULE_4__[\"default\"],\n hoverActions: _components_hover_actions_vue__WEBPACK_IMPORTED_MODULE_5__[\"default\"],\n extraContent: _components_extra_content_vue__WEBPACK_IMPORTED_MODULE_6__[\"default\"]\n },\n data: function data() {\n return {\n //props\n settings: JSON.parse(this.trp_settings),\n languageNames: JSON.parse(this.language_names),\n orderedSecondaryLanguages: JSON.parse(this.ordered_secondary_languages),\n roles: JSON.parse(this.view_as_roles),\n nonces: JSON.parse(this.editor_nonces),\n stringGroupOrder: JSON.parse(this.string_group_order),\n selectors: JSON.parse(this.string_selectors),\n dataAttributes: JSON.parse(this.data_attributes),\n mergeRules: JSON.parse(this.merge_rules),\n editorStrings: JSON.parse(this.localized_text),\n flagsPath: JSON.parse(this.flags_path),\n //data\n currentLanguage: this.current_language,\n onScreenLanguage: this.on_screen_language,\n currentURL: this.url_to_load,\n urlToLoad: this.url_to_load,\n iframe: '',\n dictionary: [],\n selectedString: null,\n selectedIndexesArray: [],\n detectedSelectorAndId: [],\n stringGroups: [],\n mergingString: false,\n mergeData: [],\n showChangesUnsavedMessage: false,\n viewAs: '',\n loading_strings: 0,\n translationNotLoadedYet: false\n };\n },\n created: function created() {\n this.settings['default-language-name'] = this.languageNames[this.settings['default-language']]; //set default value for the View As select\n\n var params = _utils__WEBPACK_IMPORTED_MODULE_1__[\"default\"].getUrlParameters(this.currentURL);\n if (Object.keys(params).length > 1 && params['trp-view-as']) this.viewAs = params['trp-view-as'];else this.viewAs = 'current_user';\n },\n mounted: function mounted() {\n this.addKeyboardShortcutsListener();\n var self = this; // initialize select2\n\n jQuery('#trp-language-select, #trp-view-as-select').select2({\n width: '100%'\n }); //init strings dropdown\n\n this.stringsDropdownLoading(); // show overlay when select is opened\n\n jQuery('#trp-language-select, #trp-string-categories').on('select2:open', function () {\n jQuery('#trp_select2_overlay').fadeIn('100');\n }).on('select2:close', function () {\n jQuery('#trp_select2_overlay').hide();\n }).on('select2:opening', function (e) {\n /* when we have unsaved changes prevent the strings dropdown from opening so we do not have a disconnect between the textareas and the dropdown */\n if (self.hasUnsavedChanges()) {\n e.preventDefault();\n }\n }); // resize sidebar and consequently the iframe\n\n var previewContainer = jQuery('#trp-preview');\n var total_width = jQuery(window).width();\n jQuery('#trp-controls').resizable({\n start: function start() {\n previewContainer.toggle();\n },\n stop: function stop() {\n previewContainer.toggle();\n },\n handles: 'e',\n minWidth: 285,\n maxWidth: total_width - 20\n }).bind(\"resize\", this.resizeIframe); // resize iframe when resizing window\n\n jQuery(window).resize(function () {\n self.resizeIframe();\n });\n },\n watch: {\n currentLanguage: function currentLanguage(_currentLanguage) {\n var self = this; //grab the correct URL from the iFrame\n\n var newURL = this.iframe.querySelector('link[hreflang=\"' + _currentLanguage.replace('_', '-') + '\"]').getAttribute('href');\n this.currentURL = newURL;\n this.iframe.location = newURL; //reset vue props\n\n this.selectedString = '';\n this.selectedIndexesArray = []; //set strings dropdown to loading state\n\n jQuery('#trp-string-categories').val('').trigger('change');\n this.stringsDropdownLoading();\n this.onScreenLanguage = _currentLanguage;\n\n if (this.settings['default-language'] == this.currentLanguage && this.settings['translation-languages'].length > 1) {\n this.settings['translation-languages'].some(function (language) {\n if (language != self.settings['default-language']) {\n // return the first language not default\n self.onScreenLanguage = language;\n return true;\n }\n });\n }\n },\n currentURL: function currentURL(newUrl, oldUrl) {\n window.history.replaceState(null, null, this.parentURL(newUrl));\n },\n viewAs: function viewAs(role) {\n if (!this.currentURL || !this.iframe) return;\n var url = this.cleanURL(this.currentURL);\n url = _utils__WEBPACK_IMPORTED_MODULE_1__[\"default\"].updateUrlParameter(url, 'trp-edit-translation', 'preview');\n\n if (role == 'current_user') {\n this.iframe.location = url;\n return;\n } //if nonce not available, an update to the Browse as Other Roles add-on is required\n\n\n if (!this.nonces[role]) {\n alert(this.editorStrings.bor_update_notice);\n return;\n }\n\n url = _utils__WEBPACK_IMPORTED_MODULE_1__[\"default\"].updateUrlParameter(url, 'trp-view-as', role);\n url = _utils__WEBPACK_IMPORTED_MODULE_1__[\"default\"].updateUrlParameter(url, 'trp-view-as-nonce', this.nonces[role]);\n this.iframe.location = url;\n },\n selectedString: function selectedString(selectedStringArrayIndex, oldString) {\n if (this.hasUnsavedChanges() || !selectedStringArrayIndex && selectedStringArrayIndex !== 0) return;\n jQuery('#trp-string-categories').val(selectedStringArrayIndex !== null ? selectedStringArrayIndex : '').trigger('change');\n var selectedString = this.dictionary[selectedStringArrayIndex];\n if (!selectedString) return;\n var currentNode = this.iframe.querySelector(\"[\" + selectedString.selector + \"='\" + selectedString.dbID + \"']\");\n var selectedIndexesArray = []; //when merging we do not have a valid current node, so we just add the fake id\n\n if (currentNode) {\n var self = this;\n var selectors = self.getAllSelectors();\n var nodes = [];\n nodes.push(currentNode);\n\n if (currentNode.tagName != \"A\") {\n // include the anchor's translatable attributes\n var anchorParent = currentNode.closest('a');\n\n if (anchorParent != null) {\n nodes.push(anchorParent);\n }\n }\n\n if (currentNode.tagName == \"A\" && currentNode.children.length > 0) {\n // include all the translatable attributes inside the anchor\n var childrenArray = _toConsumableArray(currentNode.children);\n\n childrenArray.forEach(function (child) {\n nodes.push(child);\n });\n }\n\n nodes.forEach(function (node) {\n selectors.forEach(function (selector) {\n var stringId = node.getAttribute(selector);\n\n if (stringId) {\n var found = false;\n var i;\n\n for (i = 0; i < selectedIndexesArray.length; i++) {\n if (typeof self.dictionary[selectedIndexesArray[i]] !== 'undefined' && self.dictionary[selectedIndexesArray[i]].dbID !== 'undefined' && self.dictionary[selectedIndexesArray[i]].dbID === stringId) {\n found = true;\n break;\n }\n }\n\n if (!found) {\n selectedIndexesArray.push(self.getStringIndex(selector, stringId));\n }\n }\n });\n });\n } else selectedIndexesArray.push(selectedStringArrayIndex);\n\n this.selectedIndexesArray = selectedIndexesArray;\n }\n },\n computed: {\n closeURL: function closeURL() {\n return this.cleanURL(this.currentURL);\n }\n },\n methods: {\n iFrameLoaded: function iFrameLoaded() {\n var self = this;\n var iframeElement = document.querySelector('#trp-preview-iframe');\n this.iframe = iframeElement.contentDocument || iframeElement.contentWindow.document; //sync iFrame URL with parent\n\n if (this.currentURL != this.iframe.URL) this.currentURL = this.iframe.URL; //hide iFrame loader\n\n this.iframeLoader('hide');\n self.detectedSelectorAndId = [];\n self.dictionary = [];\n this.scanIframeForStrings();\n window.addEventListener('trp_iframe_page_updated', this.scanIframeForStrings); //event that is fired when the iFrame is navigated\n\n iframeElement.contentWindow.onbeforeunload = function () {\n self.iframeLoader('show');\n self.selectedString = null;\n self.selectedIndexesArray = [];\n self.translationNotLoadedYet = false;\n self.stringsDropdownLoading();\n };\n },\n scanIframeForStrings: function scanIframeForStrings() {\n this.scanForSelector('data-trp-translate-id', 'regular', this.onScreenLanguage);\n this.scanForSelector('data-trpgettextoriginal', 'gettext', this.currentLanguage);\n this.scanForSelector('data-trp-post-slug', 'postslug', this.currentLanguage);\n },\n scanForSelector: function scanForSelector(baseSelector, typeSlug, languageOfIds) {\n this.loading_strings++;\n var self = this;\n var selectors = this.prepareSelectorStrings(baseSelector);\n\n var nodes = _toConsumableArray(this.iframe.querySelectorAll('[' + selectors.join('],[') + ']'));\n\n var stringIdsArray = [],\n nodeData = [],\n nodeEntries = [];\n nodes.forEach(function (node) {\n nodeEntries = self.getNodeInfo(node, baseSelector);\n nodeEntries.forEach(function (entry) {\n // this check ensures that we don't create duplicates when rescanning after ajax complete\n if (!self.alreadyDetected(entry.selector, entry.dbID)) {\n stringIdsArray.push(entry.dbID);\n nodeData.push(entry);\n }\n });\n self.setupEventListener(node);\n }); //unique ids only\n\n stringIdsArray = _toConsumableArray(new Set(stringIdsArray));\n\n if (stringIdsArray.length > 0) {\n var data = new FormData();\n data.append('action', 'trp_get_translations_' + typeSlug);\n data.append('all_languages', 'true');\n data.append('security', this.nonces['gettranslationsnonce' + typeSlug]);\n data.append('language', languageOfIds);\n data.append('string_ids', JSON.stringify(stringIdsArray));\n axios__WEBPACK_IMPORTED_MODULE_2___default.a.post(this.ajax_url, data).then(function (response) {\n self.loading_strings--;\n self.addToDictionary(response.data, nodeData);\n })[\"catch\"](function (error) {\n console.log(error);\n });\n } else {\n self.loading_strings--;\n }\n },\n alreadyDetected: function alreadyDetected(selector, dbId) {\n var combined = selector + '=' + dbId;\n\n if (_utils__WEBPACK_IMPORTED_MODULE_1__[\"default\"].arrayContainsItem(this.detectedSelectorAndId, combined)) {\n return true;\n } else {\n this.detectedSelectorAndId.push(combined);\n return false;\n }\n },\n setupEventListener: function setupEventListener(node) {\n if (node.tagName == 'A' && !node.hasAttribute('data-trpgettextoriginal')) return false;\n var self = this;\n node.addEventListener('mouseenter', self.$refs.hoverActions.showPencilIcon);\n },\n addToDictionary: function addToDictionary(responseData) {\n var nodeInfo = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;\n var self = this;\n\n if (responseData != null) {\n if (nodeInfo) {\n nodeInfo.forEach(function (infoRow, index) {\n responseData.some(function (responseDataRow) {\n if (infoRow.dbID == responseDataRow.dbID) {\n //bring block_type to the top level object\n if (responseDataRow.type != 'gettext' && typeof responseDataRow.block_type == 'undefined') {\n var firstLanguage = self.orderedSecondaryLanguages[0];\n if (typeof responseDataRow.translationsArray[firstLanguage].block_type != 'undefined') responseDataRow.block_type = responseDataRow.translationsArray[firstLanguage].block_type;\n }\n\n nodeInfo[index] = Object.assign({}, responseDataRow, infoRow);\n return true; // a sort of break\n }\n });\n });\n } else {\n nodeInfo = responseData;\n }\n\n this.stringGroups = this.addToStringGroups(nodeInfo);\n this.dictionary = this.dictionary.concat(nodeInfo);\n this.initStringsDropdown();\n }\n },\n addToStringGroups: function addToStringGroups(strings) {\n // see what node groups are found\n var foundStringGroups = this.stringGroups;\n strings.forEach(function (string) {\n if (foundStringGroups.indexOf(string.group) === -1 && (typeof string.blockType === 'undefined' || string.blockType !== '2')) {\n foundStringGroups.push(string.group);\n }\n }); // put the node groups in the order that we want, according to the prop this.stringGroupOrder\n\n var orderedStringGroups = [];\n\n if (this.editorStrings.seo_update_notice != 'seo_pack_update_not_needed') {\n orderedStringGroups.push(this.editorStrings.seo_update_notice);\n }\n\n this.stringGroupOrder.forEach(function (group) {\n if (foundStringGroups.indexOf(group) !== -1) {\n orderedStringGroups.push(group);\n }\n }); // if there were any other string groups that were not in the prop, add them at the end.\n\n foundStringGroups.forEach(function (group) {\n if (orderedStringGroups.indexOf(group) === -1) {\n orderedStringGroups.push(group);\n }\n });\n return orderedStringGroups;\n },\n getStringIndex: function getStringIndex(selector, dbID) {\n var found = null;\n this.dictionary.some(function (string, index) {\n if (string.dbID == dbID && string.selector == selector) {\n found = index;\n return true;\n }\n });\n return found;\n },\n getNodeInfo: function getNodeInfo(node) {\n var baseSelector = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';\n var stringId;\n var nodeData = [];\n var selectors = this.prepareSelectorStrings(baseSelector);\n selectors.forEach(function (selector) {\n stringId = node.getAttribute(selector);\n\n if (stringId) {\n var nodeAttribute = selector.replace(baseSelector, '');\n var nodeGroup = node.getAttribute('data-trp-node-group' + nodeAttribute);\n var nodeDescription = node.getAttribute('data-trp-node-description' + nodeAttribute);\n var entry = {\n dbID: stringId,\n selector: selector,\n attribute: nodeAttribute.substr(1) // substr(1) is used to trim prefixing line - ex. -alt will result in alt (no line)\n\n };\n if (nodeGroup) entry.group = nodeGroup;\n if (nodeDescription) entry.description = nodeDescription;\n nodeData.push(entry);\n }\n });\n return nodeData;\n },\n getAllSelectors: function getAllSelectors() {\n var selectors = [];\n var self = this;\n this.dataAttributes.forEach(function (dataAttribute) {\n selectors = selectors.concat(self.prepareSelectorStrings(dataAttribute));\n });\n return selectors;\n },\n prepareSelectorStrings: function prepareSelectorStrings(baseNameSelector) {\n var parsed_selectors = [];\n this.selectors.forEach(function (selectorSuffix, index) {\n parsed_selectors.push(baseNameSelector + selectorSuffix);\n });\n return parsed_selectors;\n },\n parentURL: function parentURL(url) {\n return url.replace('trp-edit-translation=preview', 'trp-edit-translation=true');\n },\n cleanURL: function cleanURL(url) {\n //make removeUrlParameter recursive and only call it once with all the parameters that\n //need to stripped ?\n url = _utils__WEBPACK_IMPORTED_MODULE_1__[\"default\"].removeUrlParameter(url, 'lang');\n url = _utils__WEBPACK_IMPORTED_MODULE_1__[\"default\"].removeUrlParameter(url, 'trp-view-as');\n url = _utils__WEBPACK_IMPORTED_MODULE_1__[\"default\"].removeUrlParameter(url, 'trp-view-as-nonce');\n url = _utils__WEBPACK_IMPORTED_MODULE_1__[\"default\"].removeUrlParameter(url, 'trp-edit-translation');\n return url;\n },\n showString: function showString(string, type) {\n if (typeof string.blockType !== 'undefined' && string.blockType === '2') {\n // don't show deprecated translation blocks in the dropdown\n return false;\n }\n\n if (type === this.editorStrings.images && typeof string.attribute != 'undefined' && string.attribute == 'src') return true;\n if (typeof string.attribute !== 'undefined' && (string.attribute == 'href' || string.attribute == 'src')) return false;\n if (string.group === type) return true;\n return false;\n },\n initStringsDropdown: function initStringsDropdown() {\n var self = this;\n\n if (!this.isStringsDropdownOpen()) {\n jQuery('#trp-string-categories').select2('destroy');\n jQuery('#trp-string-categories').select2({\n placeholder: self.editorStrings.select_string,\n templateResult: function templateResult(option) {\n var original = he__WEBPACK_IMPORTED_MODULE_7___default.a.decode(option.text.substring(0, 90)) + (option.text.length <= 90 ? '' : '...');\n var description = option.title ? '(' + option.title + ')' : '';\n return jQuery('<div>' + original + '</div><div class=\"string-selector-description\">' + description + '</div>');\n },\n width: '100%'\n }).prop('disabled', false);\n jQuery('#trp_select2_overlay').hide();\n }\n },\n stringsDropdownLoading: function stringsDropdownLoading() {\n jQuery('#trp-string-categories').select2({\n placeholder: this.editorStrings.strings_loading,\n width: '100%'\n }).prop('disabled', true);\n },\n processOptionName: function processOptionName(name, type) {\n if (type == 'Images') return _utils__WEBPACK_IMPORTED_MODULE_1__[\"default\"].getFilename(name);\n return _utils__WEBPACK_IMPORTED_MODULE_1__[\"default\"].escapeHtml(name);\n },\n isStringsDropdownOpen: function isStringsDropdownOpen() {\n return jQuery('#trp-string-categories').select2('isOpen');\n },\n hasUnsavedChanges: function hasUnsavedChanges() {\n var unsavedChanges = false;\n var self = this;\n\n if (this.selectedIndexesArray.length > 0) {\n this.selectedIndexesArray.forEach(function (selectedIndex) {\n self.settings['translation-languages'].forEach(function (languageCode) {\n if (self.dictionary[selectedIndex] && self.dictionary[selectedIndex].translationsArray[languageCode] && self.dictionary[selectedIndex].translationsArray[languageCode].translated !== self.dictionary[selectedIndex].translationsArray[languageCode].editedTranslation) {\n unsavedChanges = true;\n }\n });\n });\n }\n\n this.showChangesUnsavedMessage = unsavedChanges;\n return unsavedChanges;\n },\n iframeLoader: function iframeLoader(status) {\n var loader = document.getElementById('trp-preview-loader');\n if (status == 'show') loader.style.display = 'flex';else if (status == 'hide') loader.style.display = 'none';\n },\n previousString: function previousString() {\n var currentValue = document.getElementById('trp-string-categories').value;\n var newValue = +currentValue - 1;\n\n while (newValue >= 0 && document.querySelectorAll('#trp-string-categories option[value=\"' + newValue + '\"]').length === 0) {\n newValue--;\n }\n\n if (newValue < 0) return;\n this.selectedString = newValue.toString();\n },\n nextString: function nextString() {\n var currentValue = document.getElementById('trp-string-categories').value,\n newValue = 0;\n if (currentValue != '') newValue = +currentValue + 1;\n\n while (newValue < this.dictionary.length && document.querySelectorAll('#trp-string-categories option[value=\"' + newValue + '\"]').length === 0) {\n newValue++;\n }\n\n if (newValue >= this.dictionary.length) {\n return;\n }\n\n this.selectedString = newValue.toString();\n },\n addKeyboardShortcutsListener: function addKeyboardShortcutsListener() {\n document.addEventListener(\"keydown\", function (e) {\n if ((window.navigator.platform.match(\"Mac\") ? e.metaKey : e.ctrlKey) && e.altKey) {\n // CTRL + ALT + right arrow\n if (e.keyCode === 39) {\n e.preventDefault();\n window.dispatchEvent(new Event('trp_trigger_next_string_event'));\n } else {\n // CTRL + ALT + left arrow\n if (e.keyCode === 37) {\n e.preventDefault();\n window.dispatchEvent(new Event('trp_trigger_previous_string_event'));\n }\n }\n }\n }, false);\n window.addEventListener('trp_trigger_next_string_event', this.nextString);\n window.addEventListener('trp_trigger_previous_string_event', this.previousString);\n },\n resizeIframe: function resizeIframe(event, ui) {\n var total_width = jQuery(window).width();\n var width = jQuery('#trp-controls').width();\n\n if (width > total_width) {\n width = total_width;\n controls.css('width', width);\n }\n\n var previewContainer = jQuery('#trp-preview');\n previewContainer.css('right', width);\n previewContainer.css('left', width - 348);\n previewContainer.css('width', total_width - width);\n }\n },\n //add support for v-model in select2\n directives: {\n select2: {\n inserted: function inserted(el) {\n jQuery(el).on('select2:select', function () {\n var event = new Event('change', {\n bubbles: true,\n cancelable: true\n });\n el.dispatchEvent(event);\n });\n jQuery(el).on('select2:unselect', function () {\n var event = new Event('change', {\n bubbles: true,\n cancelable: true\n });\n el.dispatchEvent(event);\n });\n }\n }\n }\n});//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vYXNzZXRzL3NyYy9qcy9lZGl0b3IudnVlP2E3NjUiXSwibm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FkZXJcIj5cclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxkaXYgY2xhc3M9XCJ0cnAtc3Bpbm5lclwiPjwvZGl2PlxyXG4gICAgICAgICAgICAgICAgICAgICAgICA8L3NwYW4+XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIDxzYXZlLXRyYW5zbGF0aW9uc1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDpzZWxlY3RlZEluZGV4ZXNBcnJheT1cInNlbGVjdGVkSW5kZXhlc0FycmF5XCJcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA6ZGljdGlvbmFyeT1cImRpY3Rpb25hcnlcIlxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDpzZXR0aW5ncz1cInNldHRpbmdzXCJcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA6bm9uY2VzPVwibm9uY2VzXCJcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA6YWpheF91cmw9XCJhamF4X3VybFwiXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOmN1cnJlbnRMYW5ndWFnZT1cImN1cnJlbnRMYW5ndWFnZVwiXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOm9uU2NyZWVuTGFuZ3VhZ2U9XCJvblNjcmVlbkxhbmd1YWdlXCJcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA6aWZyYW1lPVwiaWZyYW1lXCJcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA6Y3VycmVudFVSTD1cImN1cnJlbnRVUkxcIlxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDptZXJnaW5nU3RyaW5nPVwibWVyZ2luZ1N0cmluZ1wiXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOm1lcmdlRGF0YT1cIm1lcmdlRGF0YVwiXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgQHRyYW5zbGF0aW9ucy1zYXZlZD1cInNob3dDaGFuZ2VzVW5zYXZlZE1lc3NhZ2UgPSBmYWxzZVwiXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOmVkaXRvclN0cmluZ3M9XCJlZGl0b3JTdHJpbmdzXCJcclxuICAgICAgICAgICAgICAgICAgICAgICAgPlxyXG4gICAgICAgICAgICAgICAgICAgICAgICA8L3NhdmUtdHJhbnNsYXRpb25zPlxyXG4gICAgICAgICAgICAgICAgICAgIDwvZGl2PlxyXG4gICAgICAgICAgICAgICAgPC9kaXY+XHJcblxyXG4gICAgICAgICAgICAgICAgPGRpdiBjbGFzcz1cInRycC1jb250cm9scy1zZWN0aW9uXCI+XHJcblxyXG4gICAgICAgICAgICAgICAgICAgIDxkaXYgY2xhc3M9XCJ0cnAtY29udHJvbHMtc2VjdGlvbi1jb250ZW50XCI+XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIDxkaXYgaWQ9XCJ0cnAtbGFuZ3VhZ2Utc3dpdGNoXCI+XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICA8c2VsZWN0IGlkPVwidHJwLWxhbmd1YWdlLXNlbGVjdFwiIG5hbWU9XCJsYW5nXCIgdi1tb2RlbD1cImN1cnJlbnRMYW5ndWFnZVwiIHYtc2VsZWN0Mj5cclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8b3B0aW9uIHYtZm9yPVwiKGxhbmcsIGxhbmdJbmRleCkgaW4gbGFuZ3VhZ2VOYW1lc1wiIDp2YWx1ZT1cImxhbmdJbmRleFwiPnt7bGFuZ319PC9vcHRpb24+XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICA8L3NlbGVjdD5cclxuICAgICAgICAgICAgICAgICAgICAgICAgPC9kaXY+XHJcblxyXG4gICAgICAgICAgICAgICAgICAgICAgICA8ZGl2IGlkPVwidHJwLXN0cmluZy1saXN0XCI+XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICA8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4mbGFxdW87PC9zcGFuPiB7eyBlZGl0b3JTdHJpbmdzLnByZXZpb3VzIH19PC9idXR0b24+XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICA8YnV0dG9uIHR5cGU9XCJidXR0b25cIiBpZD1cInRycC1uZXh0XCIgY2xhc3M9XCJ0cnAtbmV4dC1wcmV2aW91cy1idXR0b25zXCIgdi1vbjpjbGljaz1cIm5leHRTdHJpbmcoKVwiIDp0aXRsZT1cImVkaXRvclN0cmluZ3MubmV4dF90aXRsZV9hdHRyXCI+e3sgZWRpdG9yU3RyaW5ncy5uZXh0IH19IDxzcGFuPiZyYXF1bzs8L3NwYW4+PC9idXR0b24+XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIDwvZGl2PlxyXG5cclxuICAgICAgICAgICAgICAgICAgICAgICAgPGRpdiBpZD1cInRycC12aWV3LWFzXCI+XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICA8ZGl2IGlkPVwidHJwLXZpZXctYXMtZGVzY3JpcHRpb25cIj57eyBlZGl0b3JTdHJpbmdzLnZpZXdfYXMgfX08L2Rpdj5cclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxzZWxlY3QgaWQ9XCJ0cnAtdmlldy1hcy1zZWxlY3RcIiB2LW1vZGVsPVwidmlld0FzXCIgdi1zZWxlY3QyPlxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxvcHRpb24gdi1mb3I9XCIocm9sZSwgcm9sZUluZGV4KSBpbiByb2xlc1wiIDp2YWx1ZT1cInJvbGVcIiA6ZGlzYWJsZWQ9XCIhcm9sZVwiIDp0aXRsZT1cIiFyb2xlID8gZWRpdG9yU3RyaW5ncy52aWV3X2FzX3BybyA6ICcnXCI+e3tyb2xlSW5kZXh9fTwvb3B0aW9uPlxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgPC9zZWxlY3Q+XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIDwvZGl2PlxyXG4gICAgICAgICAgICAgICAgICAgIDwvZGl2PlxyXG5cclxuICAgICAgICAgICAgICAgIDwvZGl2PlxyXG5cclxuICAgICAgICAgICAgICAgIDxkaXYgY2xhc3M9XCJ0cnAtY29udHJvbHMtc2VjdGlvblwiIHYtc2hvdz1cInNlbGVjdGVkU3RyaW5nICE9PSBudWxsXCI+XHJcbiAgICAgICAgICAgICAgICAgICAgPGxhbmd1YWdlLWJveGVzXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICA6c2VsZWN0ZWRJbmRleGVzQXJyYXk9XCJzZWxlY3RlZEluZGV4ZXNBcnJheVwiXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICA6ZGljdGlvbmFyeT1cImRpY3Rpb25hcnlcIlxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgOmN1cnJlbnRMYW5ndWFnZT1cImN1cnJlbnRMYW5ndWFnZVwiXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICA6b25TY3JlZW5MYW5ndWFnZT1cIm9uU2NyZWVuTGFuZ3VhZ2VcIlxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgOmxhbmd1YWdlTmFtZXM9XCJsYW5ndWFnZU5hbWVzXCJcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIDpzZXR0aW5ncz1cInNldHRpbmdzXCJcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIDpzaG93Q2hhbmdlc1Vuc2F2ZWRNZXNzYWdlPVwic2hvd0NoYW5nZXNVbnNhdmVkTWVzc2FnZVwiXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBAZGlzY2FyZGVkLWNoYW5nZXM9XCJoYXNVbnNhdmVkQ2hhbmdlcygpXCJcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIDplZGl0b3JTdHJpbmdzPVwiZWRpdG9yU3RyaW5nc1wiXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICA6ZmxhZ3NQYXRoPVwiZmxhZ3NQYXRoXCJcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIDppZnJhbWU9XCJpZnJhbWVcIlxyXG4gICAgICAgICAgICAgICAgICAgID5cclxuICAgICAgICAgICAgICAgICAgICA8L2xhbmd1YWdlLWJveGVzPlxyXG4gICAgICAgICAgICAgICAgPC9kaXY+XHJcblxyXG4gICAgICAgICAgICAgICAgPGV4dHJhLWNvbnRlbnQgOmxhbmd1YWdlTmFtZXM9XCJsYW5ndWFnZU5hbWVzXCIgOmVkaXRvclN0cmluZ3M9XCJlZGl0b3JTdHJpbmdzXCIgOnBhaWRWZXJzaW9uPVwicGFpZF92ZXJzaW9uXCI+PC9leHRyYS1jb250ZW50PlxyXG5cclxuICAgICAgICAgICAgICAgIDxkaXYgY2xhc3M9XCJ0cnAtY29udHJvbHMtc2VjdGlvblwiIHYtc2hvdz1cInRyYW5zbGF0aW9uTm90TG9hZGVkWWV0XCI+XHJcbiAgICAgICAgICAgICAgICAgICAgPGRpdiBpZD1cInRycC10cmFuc2xhdGlvbi1ub3QtcmVhZHktc2VjdGlvblwiIGNsYXNzPVwidHJwLWNvbnRyb2xzLXNlY3Rpb24tY29udGVudFwiPlxyXG4gICAgICAgICAgICAgICAgICAgICAgICA8cCB2LWh0bWw9XCJlZGl0b3JTdHJpbmdzLnRyYW5zbGF0aW9uX25vdF9sb2FkZWRfeWV0XCI+PC9wPlxyXG4gICAgICAgICAgICAgICAgICAgIDwvZGl2PlxyXG4gICAgICAgICAgICAgICAgPC9kaXY+XHJcbiAgICAgICAgICAgIDwvZGl2PlxyXG5cclxuICAgICAgICAgICAgPGRpdiBpZD1cInRycF9zZWxlY3QyX292ZXJsYXlcIj48L2Rpdj5cclxuXHJcbiAgICAgICAgICAgIDxob3Zlci1hY3Rpb25zXHJcbiAgICAgICAgICAgICAgICByZWY9XCJob3ZlckFjdGlvbnNcIlxyXG4gICAgICAgICAgICAgICAgOmRpY3Rpb25hcnk9XCJkaWN0aW9uYXJ5XCJcclxuICAgICAgICAgICAgICAgIDpz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AgICAnY3VycmVudF9sYW5ndWFnZScsXHJcbiAgICAgICAgICAgICdvbl9zY3JlZW5fbGFuZ3VhZ2UnLFxyXG4gICAgICAgICAgICAndmlld19hc19yb2xlcycsXHJcbiAgICAgICAgICAgICd1cmxfdG9fbG9hZCcsXHJcbiAgICAgICAgICAgICdzdHJpbmdfc2VsZWN0b3JzJyxcclxuICAgICAgICAgICAgJ2RhdGFfYXR0cmlidXRlcycsXHJcbiAgICAgICAgICAgICdhamF4X3VybCcsXHJcbiAgICAgICAgICAgICdlZGl0b3Jfbm9uY2VzJyxcclxuICAgICAgICAgICAgJ3N0cmluZ19ncm91cF9vcmRlcicsXHJcbiAgICAgICAgICAgICdtZXJnZV9ydWxlcycsXHJcbiAgICAgICAgICAgICdsb2NhbGl6ZWRfdGV4dCcsXHJcbiAgICAgICAgICAgICdwYWlkX3ZlcnNpb24nLFxyXG4gICAgICAgICAgICAnZmxhZ3NfcGF0aCdcclxuICAgICAgICBdLFxyXG4gICAgICAgIGNvbXBvbmVudHM6e1xyXG4gICAgICAgICAgICBsYW5ndWFnZUJveGVzLFxyXG4gICAgICAgICAgICBzYXZlVHJhbnNsYXRpb25zLFxyXG4gICAgICAgICAgICBob3ZlckFjdGlvbnMsXHJcbiAgICAgICAgICAgIGV4dHJhQ29udGVudFxyXG4gICAgICAgIH0sXHJcbiAgICAgICAgZGF0YSgpe1xyXG4gICAgICAgICAgICByZXR1cm4ge1xyXG4gICAgICAgICAgICAgICAgLy9wcm9wc1xyXG4gICAgICAgICAgICAgICAgc2V0dGluZ3MgICAgICAgICAgICAgICAgICA6IEpTT04ucGFyc2UoIHRoaXMudHJwX3NldHRpbmdzICksXHJcbiAgICAgICAgICAgICAgICBsYW5ndWFnZU5hbWVzICAgICAgICAgICAgIDogSlNPTi5wYXJzZSggdGhpcy5sYW5ndWFnZV9uYW1lcyApLFxyXG4gICAgICAgICAgICAgICAgb3JkZXJlZFNlY29uZGFyeUxhbmd1YWdlcyA6IEpTT04ucGFyc2UoIHRoaXMub3JkZXJlZF9zZWNvbmRhcnlfbGFuZ3VhZ2VzICksXHJcbiAgICAgICAgICAgICAgICByb2xlcyAgICAgICAgICAgICAgICAgICAgIDogSlNPTi5wYXJzZSggdGhpcy52aWV3X2FzX3JvbGVzICksXHJcbiAgICAgICAgICAgICAgICBub25jZXMgICAgICAgICAgICAgICAgICAgIDogSlNPTi5wYXJzZSggdGhpcy5lZGl0b3Jfbm9uY2VzKSxcclxuICAgICAgICAgICAgICAgIHN0cmluZ0dyb3VwT3JkZXIgICAgICAgICAgOiBKU09OLnBhcnNlKCB0aGlzLnN0cmluZ19ncm91cF9vcmRlciksXHJcbiAgICAgICAgICAgICAgICBzZWxlY3RvcnMgICAgICAgICAgICAgICAgIDogSlNPTi5wYXJzZSggdGhpcy5zdHJpbmdfc2VsZWN0b3JzICksXHJcbiAgICAgICAgICAgICAgICBkYXRhQXR0cmlidXRlcyAgICAgICAgICAgIDogSlNPTi5wYXJzZSggdGhpcy5kYXRhX2F0dHJpYnV0ZXMgKSxcclxuICAgICAgICAgICAgICAgIG1lcmdlUnVsZXMgICAgICAgICAgICAgICAgOiBKU09OLnBhcnNlKCB0aGlzLm1lcmdlX3J1bGVzICksXHJcbiAgICAgICAgICAgICAgICBlZGl0b3JTdHJpbmdzICAgICAgICAgICAgIDogSlNPTi5wYXJzZSggdGhpcy5sb2NhbGl6ZWRfdGV4dCApLFxyXG4gICAgICAgICAgICAgICAgZmxhZ3NQYXRoICAgICAgICAgICAgICAgICA6IEpTT04ucGFyc2UoIHRoaXMuZmxhZ3NfcGF0aCApLFxyXG4gICAgICAgICAgICAgICAgLy9kYXRhXHJcbiAgICAgICAgICAgICAgICBjdXJyZW50TGFuZ3VhZ2UgICAgICAgICAgIDogdGhpcy5jdXJyZW50X2xhbmd1YWdlLFxyXG4gICAgICAgICAgICAgICAgb25TY3JlZW5MYW5ndWFnZSAgICAgICAgICA6IHRoaXMub25fc2NyZWVuX2xhbmd1YWdlLFxyXG4gICAgICAgICAgICAgICAgY3VycmVudFVSTCAgICAgICAgICAgICAgICA6IHRoaXMudXJsX3RvX2xvYWQsXHJcbiAgICAgICAgICAgICAgICB1cmxUb0xvYWQgICAgICAgICAgICAgICAgIDogdGhpcy51cmxfdG9fbG9hZCxcclxuICAgICAgICAgICAgICAgIGlmcmFtZSAgICAgICAgICAgICAgICAgICAgOiAnJyxcclxuICAgICAgICAgICAgICAgIGRpY3Rpb25hcnkgICAgICAgICAgICAgICAgOiBbXSxcclxuICAgICAgICAgICAgICAgIHNlbGVjdGVkU3RyaW5nICAgICAgICAgICAgOiBudWxsLFxyXG4gICAgICAgICAgICAgICAgc2VsZWN0ZWRJbmRleGVzQXJyYXkgICAgICA6IFtdLFxyXG4gICAgICAgICAgICAgICAgZGV0ZWN0ZWRTZWxlY3RvckFuZElkICAgICA6IFtdLFxyXG4gICAgICAgICAgICAgICAgc3RyaW5nR3JvdXBzICAgICAgICAgICAgICA6IFtdLFxyXG4gICAgICAgICAgICAgICAgbWVyZ2luZ1N0cmluZyAgICAgICAgICAgICA6IGZhbHNlLFxyXG4gICAgICAgICAgICAgICAgbWVyZ2VEYXRhICAgICAgICAgICAgICAgICA6IFtdLFxyXG4gICAgICAgICAgICAgICAgc2hvd0NoYW5nZXNVbnNhdmVkTWVzc2FnZSA6IGZhbHNlLFxyXG4gICAgICAgICAgICAgICAgdmlld0FzICAgICAgICAgICAgICAgICAgICA6ICcnLFxyXG4gICAgICAgICAgICAgICAgbG9hZGluZ19zdHJpbmdzICAgICAgICAgICA6IDAsXHJcbiAgICAgICAgICAgICAgICB0cmFuc2xhdGlvbk5vdExvYWRlZFlldCAgIDogZmFsc2UsXHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9LFxyXG4gICAgICAgIGNyZWF0ZWQoKXtcclxuICAgICAgICAgICAgdGhpcy5zZXR0aW5nc1snZGVmYXVsdC1sYW5ndWFnZS1uYW1lJ10gPSB0aGlzLmxhbmd1YWdlTmFtZXNbIHRoaXMuc2V0dGluZ3NbJ2RlZmF1bHQtbGFuZ3VhZ2UnXSBdXHJcblxyXG4gICAgICAgICAgICAvL3NldCBkZWZhdWx0IHZhbHVlIGZvciB0aGUgVmlldyBBcyBzZWxlY3RcclxuICAgICAgICAgICAgbGV0IHBhcmFtcyA9IHV0aWxzLmdldFVybFBhcmFtZXRlcnMoIHRoaXMuY3VycmVudFVSTCApXHJcblxyXG4gICAgICAgICAgICBpZiggT2JqZWN0LmtleXMocGFyYW1zKS5sZW5ndGggPiAxICYmIHBhcmFtc1sndHJwLXZpZXctYXMnXSApXHJcbiAgICAgICAgICAgICAgICB0aGlzLnZpZXdBcyA9IHBhcmFtc1sndHJwLXZpZXctYXMnXVxyXG4gICAgICAgICAgICBlbHNlXHJcbiAgICAgICAgICAgICAgICB0aGlzLnZpZXdBcyA9ICdjdXJyZW50X3VzZXInXHJcbiAgICAgICAgfSxcclxuICAgICAgICBtb3VudGVkKCl7XHJcbiAgICAgICAgICAgIHRoaXMuYWRkS2V5Ym9hcmRTaG9ydGN1dHNMaXN0ZW5lcigpXHJcbiAgICAgICAgICAgIGxldCBzZWxmID0gdGhpc1xyXG4gICAgICAgICAgICAvLyBpbml0aWFsaXplIHNlbGVjdDJcclxuICAgICAgICAgICAgalF1ZXJ5KCAnI3RycC1sYW5ndWFnZS1zZWxlY3QsICN0cnAtdmlldy1hcy1zZWxlY3QnICkuc2VsZWN0MiggeyB3aWR0aCA6ICcxMDAlJyB9KVxyXG5cclxuICAgICAgICAgICAgLy9pbml0IHN0cmluZ3MgZHJvcGRvd25cclxuICAgICAgICAgICAgdGhpcy5zdHJpbmdzRHJvcGRvd25Mb2FkaW5nKClcclxuXHJcbiAgICAgICAgICAgIC8vIHNob3cgb3ZlcmxheSB3aGVuIHNlbGVjdCBpcyBvcGVuZWRcclxuICAgICAgICAgICAgalF1ZXJ5KCAnI3RycC1sYW5ndWFnZS1zZWxlY3QsICN0cnAtc3RyaW5nLWNhdGVnb3JpZXMnICkub24oICdzZWxlY3QyOm9wZW4nLCBmdW5jdGlvbigpIHtcclxuICAgICAgICAgICAgICAgIGpRdWVyeSggJyN0cnBfc2VsZWN0Ml9vdmVybGF5JyApLmZhZGVJbiggJzEwMCcgKVxyXG4gICAgICAgICAgICB9KS5vbiggJ3NlbGVjdDI6Y2xvc2UnLCBmdW5jdGlvbigpIHtcclxuICAgICAgICAgICAgICAgIGpRdWVyeSggJyN0cnBfc2VsZWN0Ml9vdmVybGF5JyApLmhpZGUoKVxyXG4gICAgICAgICAgICB9KS5vbiggJ3NlbGVjdDI6b3BlbmluZycsIGZ1bmN0aW9uKGUpIHtcclxuICAgICAgICAgICAgICAgIC8qIHdoZW4gd2UgaGF2ZSB1bnNhdmVkIGNoYW5nZXMgcHJldmVudCB0aGUgc3RyaW5ncyBkcm9wZG93biBmcm9tIG9wZW5pbmcgc28gd2UgZG8gbm90IGhhdmUgYSBkaXNjb25uZWN0IGJldHdlZW4gdGhlIHRleHRhcmVhcyBhbmQgdGhlIGRyb3Bkb3duICovXHJcbiAgICAgICAgICAgICAgICBpZiAoc2VsZi5oYXNVbnNhdmVkQ2hhbmdlcygpKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgZS5wcmV2ZW50RGVmYXVsdCgpXHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIH0pXHJcblxyXG4gICAgICAgICAgICAvLyByZXNpemUgc2lkZWJhciBhbmQgY29uc2VxdWVudGx5IHRoZSBpZnJhbWVcclxuICAgICAgICAgICAgbGV0IHByZXZpZXdDb250YWluZXIgPSBqUXVlcnkoICcjdHJwLXByZXZpZXcnICk7XHJcbiAgICAgICAgICAgIGxldCB0b3RhbF93aWR0aCA9IGpRdWVyeSh3aW5kb3cpLndpZHRoKCk7XHJcbiAgICAgICAgICAgIGpRdWVyeSggJyN0cnAtY29udHJvbHMnICkucmVzaXphYmxlKHtcclxuICAgICAgICAgICAgICAgIHN0YXJ0OiBmdW5jdGlvbiggKSB7IHByZXZpZXdDb250YWluZXIudG9nZ2xlKCk7IH0sXHJcbiAgICAgICAgICAgICAgICBzdG9wOiBmdW5jdGlvbiggKSB7IHByZXZpZXdDb250YWluZXIudG9nZ2xlKCk7IH0sXHJcbiAgICAgICAgICAgICAgICBoYW5kbGVzOiAnZScsXHJcbiAgICAgICAgICAgICAgICBtaW5XaWR0aDogMjg1LFxyXG4gICAgICAgICAgICAgICAgbWF4V2lkdGg6IHRvdGFsX3dpZHRoIC0gMjBcclxuICAgICAgICAgICAgfSkuYmluZCggXCJyZXNpemVcIiwgdGhpcy5yZXNpemVJZnJhbWUgKTtcclxuXHJcbiAgICAgICAgICAgIC8vIHJlc2l6ZSBpZnJhbWUgd2hlbiByZXNpemluZyB3aW5kb3dcclxuICAgICAgICAgICAgalF1ZXJ5KCB3aW5kb3cgKS5yZXNpemUoZnVuY3Rpb24gKCkge1xyXG4gICAgICAgICAgICAgICAgc2VsZi5yZXNpemVJZnJhbWUoKTtcclxuICAgICAgICAgICAgfSk7XHJcbiAgICAgICAgfSxcclxuICAgICAgICB3YXRjaDoge1xyXG4gICAgICAgICAgICBjdXJyZW50TGFuZ3VhZ2U6IGZ1bmN0aW9uKCBjdXJyZW50TGFuZ3VhZ2UgKSB7XHJcbiAgICAgICAgICAgICAgICBsZXQgc2VsZiA9IHRoaXNcclxuICAgICAgICAgICAgICAgIC8vZ3JhYiB0aGUgY29ycmVjdCBVUkwgZnJvbSB0aGUgaUZyYW1lXHJcbiAgICAgICAgICAgICAgICBsZXQgbmV3VVJMID0gdGhpcy5pZnJhbWUucXVlcnlTZWxlY3RvciggJ2xpbmtbaHJlZmxhbmc9XCInICsgY3VycmVudExhbmd1YWdlLnJlcGxhY2UoICdfJywgJy0nICkgKydcIl0nICkuZ2V0QXR0cmlidXRlKCdocmVmJylcclxuXHJcbiAgICAgICAgICAgICAgICB0aGlzLmN1cnJlbnRVUkwgICAgICAgICAgID0gbmV3VVJMXHJcbiAgICAgICAgICAgICAgICB0aGlzLmlmcmFtZS5sb2NhdGlvbi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UgPSBsYW5ndWFnZVxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHRydWVcclxuICAgICAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgIH0pXHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgIGN1cnJlbnRVUkw6IGZ1bmN0aW9uICggbmV3VXJsLCBvbGRVcmwgKSB7XHJcbiAgICAgICAgICAgICAgICB3aW5kb3cuaGlzdG9yeS5yZXBsYWNlU3RhdGUoIG51bGwsIG51bGwsIHRoaXMucGFyZW50VVJMKCBuZXdVcmwgKSApXHJcbiAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgIHZpZXdBczogZnVuY3Rpb24oIHJvbGUgKSB7XHJcbiAgICAgICAgICAgICAgICBpZiggIXRoaXMuY3VycmVudFVSTCB8fCAhdGhpcy5pZnJhbWUgKVxyXG4gICAgICAgICAgICAgICAgICAgIHJldHVyblxyXG5cclxuICAgICAgICAgICAgICAgIGxldCB1cmwgPSB0aGlzLmNsZWFuVVJMKCB0aGlzLmN1cnJlbnRVUkwgKVxyXG5cclxuICAgICAgICAgICAgICAgIHVybCA9IHV0aWxzLnVwZGF0ZVVybFBhcmFtZXRlciggdXJsLCAndHJwLWVkaXQtdHJhbnNsYXRpb24nLCAncHJldmlldycgKVxyXG5cclxuICAgICAgICAgICAgICAgIGlmKCByb2xlID09ICdjdXJyZW50X3VzZXInICkge1xyXG4gICAgICAgICAgICAgICAgICAgIHRoaXMuaWZyYW1lLmxvY2F0aW9uID0gdXJsXHJcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuXHJcbiAgICAgICAgICAgICAgICB9XHJcblxyXG4gICAgICAgICAgICAgICAgLy9pZiBub25jZSBub3QgYXZhaWxhYmxlLCBhbiB1cGRhdGUgdG8gdGhlIEJyb3dzZSBhcyBPdGhlciBSb2xlcyBhZGQtb24gaXMgcmVxdWlyZWRcclxuICAgICAgICAgICAgICAgIGlmKCAhdGhpcy5ub25jZXNbcm9sZV0gKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgYWxlcnQoIHRoaXMuZWRpdG9yU3RyaW5ncy5ib3JfdXBkYXRlX25vdGljZSApXHJcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuXHJcbiAgICAgICAgICAgICAgICB9XHJcblxyXG4gICAgICAgICAgICAgICAgdXJsID0gdXRpbHMudXBkYXRlVXJsUGFyYW1ldGVyKCB1cmwsICd0cnAtdmlldy1hcycsIHJvbGUgKVxyXG4gICAgICAgICAgICAgICAgdXJsID0gdXRpbHMudXBkYXRlVXJsUGFyYW1ldGVyKCB1cmwsICd0cnAtdmlldy1hcy1ub25jZScsIHRoaXMubm9uY2VzW3JvbGVdIClcclxuXHJcbiAgICAgICAgICAgICAgICB0aGlzLmlmcmFtZS5sb2NhdGlvbiA9IHVybFxyXG4gICAgICAgICAgICB9LFxyXG4gICAgICAgICAgICBzZWxlY3RlZFN0cmluZzogZnVuY3Rpb24gKCBzZWxlY3RlZFN0cmluZ0FycmF5SW5kZXgsIG9sZFN0cmluZyApe1xyXG5cclxuICAgICAgICAgICAgICAgIGlmKCB0aGlzLmhhc1Vuc2F2ZWRDaGFuZ2VzKCkgfHwgKCAhc2VsZWN0ZWRTdHJpbmdBcnJheUluZGV4ICYmIHNlbGVjdGVkU3RyaW5nQXJyYXlJbmRleCAhPT0gMCApIClcclxuICAgICAgICAgICAgICAgICAgICByZXR1cm5cclxuXHJcbiAgICAgICAgICAgICAgICBqUXVlcnkoICcjdHJwLXN0cmluZy1jYXRlZ29yaWVzJyApLnZhbCggc2VsZWN0ZWRTdHJpbmdBcnJheUluZGV4ICE9PSBudWxsID8gc2VsZWN0ZWRTdHJpbmdBcnJheUluZGV4IDogJycgKS50cmlnZ2VyKCAnY2hhbmdlJyApXHJcblxyXG4gICAgICAgICAgICAgICAgbGV0IHNlbGVjdGVkU3RyaW5nICAgICAgID0gdGhpcy5kaWN0aW9uYXJ5W3NlbGVjdGVkU3RyaW5nQXJyYXlJbmRleF1cclxuXHJcbiAgICAgICAgICAgICAgICBpZiggIXNlbGVjdGVkU3RyaW5nIClcclxuICAgICAgICAgICAgICAgICAgICByZXR1cm5cclxuXHJcbiAgICAgICAgICAgICAgICBsZXQgY3VycmVudE5vZGUgICAgICAgICAgPSB0aGlzLmlmcmFtZS5xdWVyeVNlbGVjdG9yKCBcIltcIiArIHNlbGVjdGVkU3RyaW5nLnNlbGVjdG9yICsgXCI9J1wiICsgc2VsZWN0ZWRTdHJpbmcuZGJJRCArIFwiJ11cIilcclxuICAgICAgICAgICAgICAgIGxldCBzZWxlY3RlZEluZGV4ZXNBcnJheSA9IFtdXHJcblxyXG4gICAgICAgICAgICAgICAgLy93aGVuIG1lcmdpbmcgd2UgZG8gbm90IGhhdmUgYSB2YWxpZCBjdXJyZW50IG5vZGUsIHNvIHdlIGp1c3QgYWRkIHRoZSBmYWtlIGlkXHJcbiAgICAgICAgICAgICAgICBpZiggY3VycmVudE5vZGUgKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgbGV0IHNlbGYgPSB0aGlzXHJcbiAgICAgICAgICAgICAgICAgICAgbGV0IHNlbGVjdG9ycyA9IHNlbGYuZ2V0QWxsU2VsZWN0b3JzKClcclxuICAgICAgICAgICAgICAgICAgICBsZXQgbm9kZXMgPSBbXVxyXG5cclxuICAgICAgICAgICAgICAgICAgICBub2Rlcy5wdXNoKCBjdXJyZW50Tm9kZSApXHJcblxyXG4gICAgICAgICAgICAgICAgICAgIGlmICggY3VycmVudE5vZGUudGFnTmFtZSAhPSBcIkFcIiApe1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAvLyBpbmNsdWRlIHRoZSBhbmNob3IncyB0cmFuc2xhdGFibGUgYXR0cmlidXRlc1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBsZXQgYW5jaG9yUGFyZW50ICA9IGN1cnJlbnROb2RlLmNsb3Nlc3QoJ2EnKVxyXG4gICAgICAgICAgICAgICAgICAgICAgICBpZiggIGFuY2hvclBhcmVudCAhPSBudWxsICkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbm9kZXMucHVzaChhbmNob3JQYXJlbnQpXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgICAgICB9XHJcblxyXG4gICAgICAgICAgICAgICAgICAgIGlmICggY3VycmVudE5vZGUudGFnTmFtZSA9PSBcIkFcIiAmJiBjdXJyZW50Tm9kZS5jaGlsZHJlbi5sZW5ndGggPiAwICl7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIC8vIGluY2x1ZGUgYWxsIHRoZSB0cmFuc2xhdGFibGUgYXR0cmlidXRlcyBpbnNpZGUgdGhlIGFuY2hvclxyXG4gICAgICAgICAgICAgICAgICAgICAgICBsZXQgY2hpbGRyZW5BcnJheSA9IFsgLi4uY3VycmVudE5vZGUuY2hpbGRyZW4gXTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgY2hpbGRyZW5BcnJheS5mb3JFYWNoKCBmdW5jdGlvbiAoIGNoaWxkICkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbm9kZXMucHVzaChjaGlsZClcclxuICAgICAgICAgICAgICAgICAgICAgICAgfSlcclxuXHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG5cclxuICAgICAgICAgICAgICAgICAgICBub2Rlcy5mb3JFYWNoKCBmdW5jdGlvbiggbm9kZSApIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgc2VsZWN0b3JzLmZvckVhY2goZnVuY3Rpb24gKHNlbGVjdG9yKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgc3RyaW5nSWQgPSBub2RlLmdldEF0dHJpYnV0ZShzZWxlY3RvcilcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChzdHJpbmdJZCkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBmb3VuZCA9IGZhbHNlXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGlcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBmb3IoIGkgPSAwOyBpIDwgc2VsZWN0ZWRJbmRleGVzQXJyYXkubGVuZ3RoOyBpKysgKXtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKCB0eXBlb2Ygc2VsZi5kaWN0aW9uYXJ5W3NlbGVjdGVkSW5kZXhlc0FycmF5W2ldXSAhPT0gJ3VuZGVmaW5lZCcgJiYgc2VsZi5kaWN0aW9uYXJ5W3NlbGVjdGVkSW5kZXhlc0FycmF5W2ldXS5kYklEICE9PSAndW5kZWZpbmVkJyAmJiBzZWxmLmRpY3Rpb25hcnlbc2VsZWN0ZWRJbmRleGVzQXJyYXlbaV1dLmRiSUQgPT09IHN0cmluZ0lkICl7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBmb3VuZCA9IHRydWVcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICggISBmb3VuZCApIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc2VsZWN0ZWRJbmRleGVzQXJyYXkucHVzaChzZWxmLmdldFN0cmluZ0luZGV4KHNlbGVjdG9yLCBzdHJpbmdJZCkpXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgICAgICB9KVxyXG4gICAgICAgICAgICAgICAgICAgIH0pXHJcbiAgICAgICAgICAgICAgICB9IGVsc2VcclxuICAgICAgICAgICAgICAgICAgICBzZWxlY3RlZEluZGV4ZXNBcnJheS5wdXNoKCBzZWxlY3RlZFN0cmluZ0FycmF5SW5kZXggKVxyXG5cclxuICAgICAgICAgICAgICAgIHRoaXMuc2VsZWN0ZWRJbmRleGVzQXJyYXkgPSBzZWxlY3RlZEluZGV4ZXNBcnJheVxyXG4gICAgICAgICAgICB9LFxyXG4gICAgICAgIH0sXHJcbiAgICAgICAgY29tcHV0ZWQ6IHtcclxuICAgICAgICAgICAgY2xvc2VVUkw6IGZ1bmN0aW9uKCkge1xyXG4gICAgICAgICAgICAgICAgcmV0dXJuIHRoaXMuY2xlYW5VUkwoIHRoaXMuY3VycmVudFVSTCApXHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9LFxyXG4gICAgICAgIG1ldGhvZHM6IHtcclxuICAgICAgICAgICAgaUZyYW1lTG9hZGVkKCl7XHJcbiAgICAgICAgICAgICAgICBsZXQgc2VsZiA9IHRoaXNcclxuICAgICAgICAgICAgICAgIGxldCBpZnJhbWVFbGVtZW50ID0gZG9jdW1lbnQucXVlcnlTZWxlY3RvcignI3RycC1wcmV2aWV3LWlmcmFtZScpXHJcblxyXG4gICAgICAgICAgICAgICAgdGhpcy5pZnJhbWUgPSBpZnJhbWVFbGVtZW50LmNvbnRlbnREb2N1bWVudCB8fCBpZnJhbWVFbGVtZW50LmNvbnRlbnRXaW5kb3cuZG9jdW1lbnRcclxuXHJcbiAgICAgICAgICAgICAgICAvL3N5bmMgaUZyYW1lIFVSTCB3aXRoIHBhcmVudFxyXG4gICAgICAgICAgICAgICAgaWYgKCB0aGlzLmN1cnJlbnRVUkwgIT0gdGhpcy5pZnJhbWUuVVJMIClcclxuICAgICAgICAgICAgICAgICAgICB0aGlzLmN1cnJlbnRVUkwgPSB0aGlzLmlmcmFtZS5VUkxcclxuXHJcbiAgICAgICAgICAgICAgICAvL2hpZGUgaUZyYW1lIGxvYWRlclxyXG4gICAgICAgICAgICAgICAgdGhpcy5pZnJhbWVMb2FkZXIoICdoaWRlJyApXHJcblxyXG4gICAgICAgICAgICAgICAgc2VsZi5kZXRlY3RlZFNlbGVjdG9yQW5kSWQgPSBbXVxyXG4gICAgICAgICAgICAgICAgc2VsZi5kaWN0aW9uYXJ5ICAgICAgICAgICAgPSBbXVxyXG4gICAgICAgICAgICAgICAgdGhpcy5zY2FuSWZyYW1lRm9yU3RyaW5ncygpXHJcblxyXG4gICAgICAgICAgICAgICAgd2luZG93LmFkZEV2ZW50TGlzdGVuZXIoICd0cnBfaWZyYW1lX3BhZ2VfdXBkYXRlZCcsIHRoaXMuc2NhbklmcmFtZUZvclN0cmluZ3MgKVxyXG5cclxuICAgICAgICAgICAgICAgIC8vZXZlbnQgdGhhdCBpcyBmaXJlZCB3aGVuIHRoZSBpRnJhbWUgaXMgbmF2aWdhdGVkXHJcbiAgICAgICAgICAgICAgICBpZnJhbWVFbGVtZW50LmNvbnRlbnRXaW5kb3cub25iZWZvcmV1bmxvYWQgPSBmdW5jdGlvbigpIHtcclxuICAgICAgICAgICAgICAgICAgICBzZWxmLmlmcmFtZUxvYWRlciggJ3Nob3cnIClcclxuXHJcbiAgICAgICAgICAgICAgICAgICAgc2VsZi5zZWxlY3RlZFN0cmluZyA9IG51bGxcclxuICAgICAgICAgICAgICAgICAgICBzZWxmLnNlbGVjdGVkSW5kZXhlc0FycmF5ID0gW11cclxuICAgICAgICAgICAgICAgICAgICBzZWxmLnRyYW5zbGF0aW9uTm90TG9hZGVkWWV0ID0gZmFsc2VcclxuXHJcbiAgICAgICAgICAgICAgICAgICAgc2VsZi5zdHJpbmdzRHJvcGRvd25Mb2FkaW5nKClcclxuICAgICAgICAgICAgICAgIH1cclxuXHJcbiAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgIHNjYW5JZnJhbWVGb3JTdHJpbmdzKCl7XHJcbiAgICAgICAgICAgICAgICB0aGlzLnNjYW5Gb3JTZWxlY3RvciggJ2RhdGEtdHJwLXRyYW5zbGF0ZS1pZCcsICdyZWd1bGFyJywgdGhpcy5vblNjcmVlbkxhbmd1YWdlIClcclxuICAgICAgICAgICAgICAgIHRoaXMuc2NhbkZvclNlbGVjdG9yKCAnZGF0YS10cnBnZXR0ZXh0b3JpZ2luYWwnLCAnZ2V0dGV4dCcsIHRoaXMuY3VycmVudExhbmd1YWdlIClcclxuICAgICAgICAgICAgICAgIHRoaXMuc2NhbkZvclNlbGVjdG9yKCAnZGF0YS10cnAtcG9zdC1zbHVnJywgJ3Bvc3RzbHVnJywgdGhpcy5jdXJyZW50TGFuZ3VhZ2UgKVxyXG4gICAgICAgICAgICB9LFxyXG4gICAgICAgICAgICBzY2FuRm9yU2VsZWN0b3IoIGJhc2VTZWxlY3RvciwgdHlwZVNsdWcsIGxhbmd1YWdlT2ZJZHMgKXtcclxuICAgICAgICAgICAgICAgIHRoaXMubG9hZGluZ19zdHJpbmdzKytcclxuICAgICAgICAgICAgICAgIGxldCBzZWxmICAgICAgICAgICA9IHRoaXNcclxuICAgICAgICAgICAgICAgIGxldCBzZWxlY3RvcnMgICAgICA9IHRoaXMucHJlcGFyZVNlbGVjdG9yU3RyaW5ncyggYmFzZVNlbGVjdG9yIClcclxuICAgICAgICAgICAgICAgIGxldCBub2RlcyAgICAgICAgICA9IFsuLi50aGlzLmlmcmFtZS5xdWVyeVNlbGVjdG9yQWxsKCAnWycgKyBzZWxlY3RvcnMuam9pbignXSxbJykgKyAnXScgKV1cclxuICAgICAgICAgICAgICAgIGxldCBzdHJpbmdJZHNBcnJheSA9IFtdLCBub2RlRGF0YSA9IFtdLCBub2RlRW50cmllcyA9IFtdXHJcblxyXG4gICAgICAgICAgICAgICAgbm9kZXMuZm9yRWFjaCggZnVuY3Rpb24gKCBub2RlICl7XHJcbiAgICAgICAgICAgICAgICAgICAgbm9kZUVudHJpZXMgPSBzZWxmLmdldE5vZGVJbmZvKCBub2RlLCBiYXNlU2VsZWN0b3IgKVxyXG5cclxuICAgICAgICAgICAgICAgICAgICBub2RlRW50cmllcy5mb3JFYWNoKCBmdW5jdGlvbiggZW50cnkgKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIC8vIHRoaXMgY2hlY2sgZW5zdXJlcyB0aGF0IHdlIGRvbid0IGNyZWF0ZSBkdXBsaWNhdGVzIHdoZW4gcmVzY2FubmluZyBhZnRlciBhamF4IGNvbXBsZXRlXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmICggIXNlbGYuYWxyZWFkeURldGVjdGVkKCBlbnRyeS5zZWxlY3RvciwgZW50cnkuZGJJRCApICkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgc3RyaW5nSWRzQXJyYXkucHVzaChlbnRyeS5kYklEKVxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbm9kZURhdGEucHVzaChlbnRyeSlcclxuICAgICAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgIH0pXHJcblxyXG4gICAgICAgICAgICAgICAgICAgIHNlbGYuc2V0dXBFdmVudExpc3RlbmVyKCBub2RlIClcclxuICAgICAgICAgICAgICAgIH0pXHJcblxyXG4gICAgICAgICAgICAgICAgLy91bmlxdWUgaWRzIG9ubHlcclxuICAgICAgICAgICAgICAgIHN0cmluZ0lkc0FycmF5ID0gWy4uLm5ldyBTZXQoc3RyaW5nSWRzQXJyYXkpXVxyXG4gICAgICAgICAgICAgICAgaWYgKCBzdHJpbmdJZHNBcnJheS5sZW5ndGggPiAwICkge1xyXG4gICAgICAgICAgICAgICAgICAgIGxldCBkYXRhID0gbmV3IEZvcm1EYXRhKClcclxuICAgICAgICAgICAgICAgICAgICBkYXRhLmFwcGVuZCgnYWN0aW9uJyAgICAgICAsICd0cnBfZ2V0X3RyYW5zbGF0aW9uc18nICsgdHlwZVNsdWcpXHJcbiAgICAgICAgICAgICAgICAgICAgZGF0YS5hcHBlbmQoJ2FsbF9sYW5ndWFnZXMnLCAndHJ1ZScpXHJcbiAgICAgICAgICAgICAgICAgICAgZGF0YS5hcHBlbmQoJ3NlY3VyaXR5JyAgICAgLCB0aGlzLm5vbmNlc1snZ2V0dHJhbnNsYXRpb25zbm9uY2UnICsgdHlwZVNsdWddKVxyXG4gICAgICAgICAgICAgICAgICAgIGRhdGEuYXBwZW5kKCdsYW5ndWFnZScgICAgICwgbGFuZ3VhZ2VPZklkcylcclxuICAgICAgICAgICAgICAgICAgICBkYXRhLmFwcGVuZCgnc3RyaW5nX2lkcycgICAsIEpTT04uc3RyaW5naWZ5KHN0cmluZ0lkc0FycmF5KSlcclxuXHJcbiAgICAgICAgICAgICAgICAgICAgYXhpb3MucG9zdCh0aGlzLmFqYXhfdXJsLCBkYXRhKVxyXG4gICAgICAgICAgICAgICAgICAgICAgICAudGhlbihmdW5jdGlvbiAocmVzcG9uc2UpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNlbGYubG9hZGluZ19zdHJpbmdzLS1cclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNlbGYuYWRkVG9EaWN0aW9uYXJ5KHJlc3BvbnNlLmRhdGEsIG5vZGVEYXRhKVxyXG4gICAgICAgICAgICAgICAgICAgICAgICB9KVxyXG4gICAgICAgICAgICAgICAgICAgICAgICAuY2F0Y2goZnVuY3Rpb24gKGVycm9yKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25zb2xlLmxvZyhlcnJvcik7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIH0pO1xyXG4gICAgICAgICAgICAgICAgfWVsc2V7XHJcbiAgICAgICAgICAgICAgICAgICAgc2VsZi5sb2FkaW5nX3N0cmluZ3MtLVxyXG4gICAgICAgICAgICAgICAgfVxyXG5cclxuICAgICAgICAgICAgfSxcclxuICAgICAgICAgICAgYWxyZWFkeURldGVjdGVkKCBzZWxlY3RvciwgZGJJZCApe1xyXG4gICAgICAgICAgICAgICAgbGV0IGNvbWJpbmVkID0gc2VsZWN0b3IgKyAnPScgKyBkYklkXHJcbiAgICAgICAgICAgICAgICBpZiAoIHV0aWxzLmFycmF5Q29udGFpbnNJdGVtKCB0aGlzLmRldGVjdGVkU2VsZWN0b3JBbmRJZCwgY29tYmluZWQgKSApIHtcclxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gdHJ1ZVxyXG4gICAgICAgICAgICAgICAgfWVsc2Uge1xyXG4gICAgICAgICAgICAgICAgICAgIHRoaXMuZGV0ZWN0ZWRTZWxlY3RvckFuZElkLnB1c2goY29tYmluZWQpXHJcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGZhbHNlXHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgIHNldHVwRXZlbnRMaXN0ZW5lciggbm9kZSApe1xyXG4gICAgICAgICAgICAgICAgaWYgKCBub2RlLnRhZ05hbWUgPT0gJ0EnICYmICFub2RlLmhhc0F0dHJpYnV0ZSggJ2RhdGEtdHJwZ2V0dGV4dG9yaWdpbmFsJyApIClcclxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gZmFsc2VcclxuXHJcbiAgICAgICAgICAgICAgICBsZXQgc2VsZiA9IHRoaXNcclxuXHJcbiAgICAgICAgICAgICAgICBub2RlLmFkZEV2ZW50TGlzdGVuZXIoICdtb3VzZWVudGVyJywgc2VsZi4kcmVmcy5ob3ZlckFjdGlvbnMuc2hvd1BlbmNpbEljb24gKVxyXG4gICAgICAgICAgICB9LFxyXG4gICAgICAgICAgICBhZGRUb0RpY3Rpb25hcnkoIHJlc3BvbnNlRGF0YSwgbm9kZUluZm8gPSBudWxsICl7XHJcbiAgICAgICAgICAgICAgICBsZXQgc2VsZiA9IHRoaXNcclxuXHJcbiAgICAgICAgICAgICAgICBpZiAoIHJlc3BvbnNlRGF0YSAhPSBudWxsICkge1xyXG4gICAgICAgICAgICAgICAgICAgIGlmICggbm9kZUluZm8gKXtcclxuICAgICAgICAgICAgICAgICAgICAgICAgbm9kZUluZm8uZm9yRWFjaChmdW5jdGlvbiAoIGluZm9Sb3csIGluZGV4ICl7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXNwb25zZURhdGEuc29tZSggZnVuY3Rpb24gKCByZXNwb25zZURhdGFSb3cgKSB7XHJcblxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICggaW5mb1Jvdy5kYklEID09IHJlc3BvbnNlRGF0YVJvdy5kYklEICkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvL2JyaW5nIGJsb2NrX3R5cGUgdG8gdGhlIHRvcCBsZXZlbCBvYmplY3RcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKCByZXNwb25zZURhdGFSb3cudHlwZSAhPSAnZ2V0dGV4dCcgJiYgdHlwZW9mIHJlc3BvbnNlRGF0YVJvdy5ibG9ja190eXBlID09ICd1bmRlZmluZWQnICkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGZpcnN0TGFuZ3VhZ2UgPSBzZWxmLm9yZGVyZWRTZWNvbmRhcnlMYW5ndWFnZXNbMF1cclxuXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoIHR5cGVvZiByZXNwb25zZURhdGFSb3cudHJhbnNsYXRpb25zQXJyYXlbZmlyc3RMYW5ndWFnZV0uYmxvY2tfdHlwZSAhPSAndW5kZWZpbmVkJyApXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVzcG9uc2VEYXRhUm93LmJsb2NrX3R5cGUgPSByZXNwb25zZURhdGFSb3cudHJhbnNsYXRpb25zQXJyYXlbZmlyc3RMYW5ndWFnZV0uYmxvY2tfdHlwZVxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XHJcblxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBub2RlSW5mb1tpbmRleF0gPSBPYmplY3QuYXNzaWduKCB7fSwgcmVzcG9uc2VEYXRhUm93LCBpbmZvUm93IClcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHRydWUgLy8gYSBzb3J0IG9mIGJyZWFrXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSlcclxuICAgICAgICAgICAgICAgICAgICAgICAgfSlcclxuICAgICAgICAgICAgICAgICAgICB9ZWxzZXtcclxuICAgICAgICAgICAgICAgICAgICAgICAgbm9kZUluZm8gPSByZXNwb25zZURhdGFcclxuICAgICAgICAgICAgICAgICAgICB9XHJcblxyXG4gICAgICAgICAgICAgICAgICAgIHRoaXMuc3RyaW5nR3JvdXBzID0gdGhpcy5hZGRUb1N0cmluZ0dyb3Vwcyggbm9kZUluZm8gKVxyXG4gICAgICAgICAgICAgICAgICAgIHRoaXMuZGljdGlvbmFyeSA9IHRoaXMuZGljdGlvbmFyeS5jb25jYXQoIG5vZGVJbmZvIClcclxuXHJcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5pbml0U3RyaW5nc0Ryb3Bkb3duKClcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgfSxcclxuICAgICAgICAgICAgYWRkVG9TdHJpbmdHcm91cHMoIHN0cmluZ3MgKXtcclxuXHJcbiAgICAgICAgICAgICAgICAvLyBzZWUgd2hhdCBub2RlIGdyb3VwcyBhcmUgZm91bmRcclxuICAgICAgICAgICAgICAgIGxldCBmb3VuZFN0cmluZ0dyb3VwcyA9IHRoaXMuc3RyaW5nR3JvdXBzO1xyXG4gICAgICAgICAgICAgICAgc3RyaW5ncy5mb3JFYWNoKCBmdW5jdGlvbiAoIHN0cmluZyApIHtcclxuICAgICAgICAgICAgICAgICAgICBpZiAoIGZvdW5kU3RyaW5nR3JvdXBzLmluZGV4T2YoIHN0cmluZy5ncm91cCApID09PSAtMSAmJiAoICggdHlwZW9mIHN0cmluZy5ibG9ja1R5cGUgPT09ICd1bmRlZmluZWQnICkgfHwgc3RyaW5nLmJsb2NrVHlwZSAhPT0gJzInICkgKXtcclxuICAgICAgICAgICAgICAgICAgICAgICAgZm91bmRTdHJpbmdHcm91cHMucHVzaCggc3RyaW5nLmdyb3VwIClcclxuICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICB9KVxyXG5cclxuICAgICAgICAgICAgICAgIC8vIHB1dCB0aGUgbm9kZSBncm91cHMgaW4gdGhlIG9yZGVyIHRoYXQgd2Ugd2FudCwgYWNjb3JkaW5nIHRvIHRoZSBwcm9wIHRoaXMuc3RyaW5nR3JvdXBPcmRlclxyXG4gICAgICAgICAgICAgICAgbGV0IG9yZGVyZWRTdHJpbmdHcm91cHMgPSBbXTtcclxuXHJcbiAgICAgICAgICAgICAgICBpZiAoIHRoaXMuZWRpdG9yU3RyaW5ncy5zZW9fdXBkYXRlX25vdGljZSAhPSAnc2VvX3BhY2tfdXBkYXRlX25vdF9uZWVkZWQnICl7XHJcbiAgICAgICAgICAgICAgICAgICAgb3JkZXJlZFN0cmluZ0dyb3Vwcy5wdXNoKCB0aGlzLmVkaXRvclN0cmluZ3Muc2VvX3VwZGF0ZV9ub3RpY2UgKTtcclxuICAgICAgICAgICAgICAgIH1cclxuXHJcbiAgICAgICAgICAgICAgICB0aGlzLnN0cmluZ0dyb3VwT3JkZXIuZm9yRWFjaCggZnVuY3Rpb24oIGdyb3VwICl7XHJcbiAgICAgICAgICAgICAgICAgICAgaWYgKCBmb3VuZFN0cmluZ0dyb3Vwcy5pbmRleE9mKCBncm91cCApICE9PSAtMSApe1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBvcmRlcmVkU3RyaW5nR3JvdXBzLnB1c2goIGdyb3VwIClcclxuICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICB9KVxyXG5cclxuICAgICAgICAgICAgICAgIC8vIGlmIHRoZXJlIHdlcmUgYW55IG90aGVyIHN0cmluZyBncm91cHMgdGhhdCB3ZXJlIG5vdCBpbiB0aGUgcHJvcCwgYWRkIHRoZW0gYXQgdGhlIGVuZC5cclxuICAgICAgICAgICAgICAgIGZvdW5kU3RyaW5nR3JvdXBzLmZvckVhY2goIGZ1bmN0aW9uIChncm91cCkge1xyXG4gICAgICAgICAgICAgICAgICAgIGlmICggb3JkZXJlZFN0cmluZ0dyb3Vwcy5pbmRleE9mKCBncm91cCApID09PSAtMSApe1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBvcmRlcmVkU3RyaW5nR3JvdXBzLnB1c2goZ3JvdXApO1xyXG4gICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIH0pXHJcblxyXG4gICAgICAgICAgICAgICAgcmV0dXJuIG9yZGVyZWRTdHJpbmdHcm91cHM7XHJcbiAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgIGdldFN0cmluZ0luZGV4KCBzZWxlY3RvciwgZGJJRCApe1xyXG4gICAgICAgICAgICAgICAgbGV0IGZvdW5kID0gbnVsbFxyXG5cclxuICAgICAgICAgICAgICAgIHRoaXMuZGljdGlvbmFyeS5zb21lKGZ1bmN0aW9uICggc3RyaW5nLCBpbmRleCApIHtcclxuICAgICAgICAgICAgICAgICAgICBpZiAoIHN0cmluZy5kYklEID09IGRiSUQgJiYgc3RyaW5nLnNlbGVjdG9yID09IHNlbGVjdG9yICl7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGZvdW5kID0gaW5kZXhcclxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHRydWVcclxuICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICB9KVxyXG5cclxuICAgICAgICAgICAgICAgIHJldHVybiBmb3VuZFxyXG4gICAgICAgICAgICB9LFxyXG4gICAgICAgICAgICBnZXROb2RlSW5mbyggbm9kZSwgYmFzZVNlbGVjdG9yID0gJycgKXtcclxuICAgICAgICAgICAgICAgIGxldCBzdHJpbmdJZFxyXG4gICAgICAgICAgICAgICAgbGV0IG5vZGVEYXRhICA9IFtdXHJcbiAgICAgICAgICAgICAgICBsZXQgc2VsZWN0b3JzID0gdGhpcy5wcmVwYXJlU2VsZWN0b3JTdHJpbmdzKCBiYXNlU2VsZWN0b3IgKVxyXG5cclxuICAgICAgICAgICAgICAgIHNlbGVjdG9ycy5mb3JFYWNoKCBmdW5jdGlvbiAoIHNlbGVjdG9yICkge1xyXG5cclxuICAgICAgICAgICAgICAgICAgICBzdHJpbmdJZCA9IG5vZGUuZ2V0QXR0cmlidXRlKCBzZWxlY3RvciApXHJcblxyXG4gICAgICAgICAgICAgICAgICAgIGlmICggc3RyaW5nSWQgKSB7XHJcblxyXG4gICAgICAgICAgICAgICAgICAgICAgICBsZXQgbm9kZUF0dHJpYnV0ZSAgID0gc2VsZWN0b3IucmVwbGFjZSggYmFzZVNlbGVjdG9yLCAnJyApXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGxldCBub2RlR3JvdXAgICAgICAgPSBub2RlLmdldEF0dHJpYnV0ZSggJ2RhdGEtdHJwLW5vZGUtZ3JvdXAnICsgbm9kZUF0dHJpYnV0ZSApXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGxldCBub2RlRGVzY3JpcHRpb24gPSBub2RlLmdldEF0dHJpYnV0ZSggJ2RhdGEtdHJwLW5vZGUtZGVzY3JpcHRpb24nICsgbm9kZUF0dHJpYnV0ZSApXHJcblxyXG4gICAgICAgICAgICAgICAgICAgICAgICBsZXQgZW50cnkgPSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBkYklEICAgICAgOiBzdHJpbmdJZCxcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNlbGVjdG9yICA6IHNlbGVjdG9yLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYXR0cmlidXRlIDogbm9kZUF0dHJpYnV0ZS5zdWJzdHIoMSksIC8vIHN1YnN0cigxKSBpcyB1c2VkIHRvIHRyaW0gcHJlZml4aW5nIGxpbmUgLSBleC4gLWFsdCB3aWxsIHJlc3VsdCBpbiBhbHQgKG5vIGxpbmUpXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cclxuXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmICggbm9kZUdyb3VwIClcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGVudHJ5Lmdyb3VwID0gbm9kZUdyb3VwXHJcblxyXG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoIG5vZGVEZXNjcmlwdGlvbiApXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBlbnRyeS5kZXNjcmlwdGlvbiA9IG5vZGVEZXNjcmlwdGlvblxyXG5cclxuICAgICAgICAgICAgICAgICAgICAgICAgbm9kZURhdGEucHVzaCggZW50cnkgKVxyXG4gICAgICAgICAgICAgICAgICAgIH1cclxuXHJcbiAgICAgICAgICAgICAgICB9KVxyXG5cclxuICAgICAgICAgICAgICAgIHJldHVybiBub2RlRGF0YVxyXG4gICAgICAgICAgICB9LFxyXG4gICAgICAgICAgICBnZXRBbGxTZWxlY3RvcnMoKXtcclxuICAgICAgICAgICAgICAgIGxldCBzZWxlY3RvcnMgPSBbXVxyXG4gICAgICAgICAgICAgICAgbGV0IHNlbGYgICAgICA9IHRoaXNcclxuXHJcbiAgICAgICAgICAgICAgICB0aGlzLmRhdGFBdHRyaWJ1dGVzLmZvckVhY2goIGZ1bmN0aW9uICggZGF0YUF0dHJpYnV0ZSApe1xyXG4gICAgICAgICAgICAgICAgICAgIHNlbGVjdG9ycyA9IHNlbGVjdG9ycy5jb25jYXQoIHNlbGYucHJlcGFyZVNlbGVjdG9yU3RyaW5ncyggZGF0YUF0dHJpYnV0ZSApIClcclxuICAgICAgICAgICAgICAgIH0pXHJcblxyXG4gICAgICAgICAgICAgICAgcmV0dXJuIHNlbGVjdG9yc1xyXG4gICAgICAgICAgICB9LFxyXG4gICAgICAgICAgICBwcmVwYXJlU2VsZWN0b3JTdHJpbmdzKCBiYXNlTmFtZVNlbGVjdG9yICl7XHJcbiAgICAgICAgICAgICAgICBsZXQgcGFyc2VkX3NlbGVjdG9ycyA9IFtdXHJcblxyXG4gICAgICAgICAgICAgICAgdGhpcy5zZWxlY3RvcnMuZm9yRWFjaCggZnVuY3Rpb24gKCBzZWxlY3RvclN1ZmZpeCwgaW5kZXggKXtcclxuICAgICAgICAgICAgICAgICAgICBwYXJzZWRfc2VsZWN0b3JzLnB1c2goIGJhc2VOYW1lU2VsZWN0b3IgKyBzZWxlY3RvclN1ZmZpeCAgKVxyXG4gICAgICAgICAgICAgICAgfSlcclxuXHJcbiAgICAgICAgICAgICAgICByZXR1cm4gcGFyc2VkX3NlbGVjdG9yc1xyXG4gICAgICAgICAgICB9LFxyXG4gICAgICAgICAgICBwYXJlbnRVUkwoIHVybCApe1xyXG4gICAgICAgICAgICAgICAgcmV0dXJuIHVybC5yZXBsYWNlKCAndHJwLWVkaXQtdHJhbnNsYXRpb249cHJldmlldycsICd0cnAtZWRpdC10cmFuc2xhdGlvbj10cnVlJyApXHJcbiAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgIGNsZWFuVVJMKCB1cmwgKXtcclxuICAgICAgICAgICAgICAgIC8vbWFrZSByZW1vdmVVcmxQYXJhbWV0ZXIgcmVjdXJzaXZlIGFuZCBvbmx5IGNhbGwgaXQgb25jZSB3aXRoIGFsbCB0aGUgcGFyYW1ldGVycyB0aGF0XHJcbiAgICAgICAgICAgICAgICAvL25lZWQgdG8gc3RyaXBwZWQgP1xyXG4gICAgICAgICAgICAgICAgdXJsID0gdXRpbHMucmVtb3ZlVXJsUGFyYW1ldGVyKCB1cmwsICdsYW5nJyApXHJcbiAgICAgICAgICAgICAgICB1cmwgPSB1dGlscy5yZW1vdmVVcmxQYXJhbWV0ZXIoIHVybCwgJ3RycC12aWV3LWFzJyApXHJcbiAgICAgICAgICAgICAgICB1cmwgPSB1dGlscy5yZW1vdmVVcmxQYXJhbWV0ZXIoIHVybCwgJ3RycC12aWV3LWFzLW5vbmNlJyApXHJcbiAgICAgICAgICAgICAgICB1c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yXG4gICAgICAgICAgICAgICAgICAgIGpRdWVyeSggJyN0cnBfc2VsZWN0Ml9vdmVybGF5JyApLmhpZGUoKVxyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICB9LFxyXG4gICAgICAgICAgICBzdHJpbmdzRHJvcGRvd25Mb2FkaW5nKCl7XHJcbiAgICAgICAgICAgICAgICBqUXVlcnkoICcjdHJwLXN0cmluZy1jYXRlZ29yaWVzJyApLnNlbGVjdDIoIHsgcGxhY2Vob2xkZXIgOiB0aGlzLmVkaXRvclN0cmluZ3Muc3RyaW5nc19sb2FkaW5nLCB3aWR0aCA6ICcxMDAlJyB9ICkucHJvcCggJ2Rpc2FibGVkJywgdHJ1ZSApXHJcbiAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgIHByb2Nlc3NPcHRpb25OYW1lKCBuYW1lLCB0eXBlICl7XHJcbiAgICAgICAgICAgICAgICBpZiAoIHR5cGUgPT0gJ0ltYWdlcycgKVxyXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiB1dGlscy5nZXRGaWxlbmFtZSggbmFtZSApXHJcblxyXG4gICAgICAgICAgICAgICAgcmV0dXJuIHV0aWxzLmVzY2FwZUh0bWwoIG5hbWUgKVxyXG4gICAgICAgICAgICB9LFxyXG4gICAgICAgICAgICBpc1N0cmluZ3NEcm9wZG93bk9wZW4oKXtcclxuICAgICAgICAgICAgICAgIHJldHVybiBqUXVlcnkoICcjdHJwLXN0cmluZy1jYXRlZ29yaWVzJyApLnNlbGVjdDIoICdpc09wZW4nIClcclxuICAgICAgICAgICAgfSxcclxuICAgICAgICAgICAgaGFzVW5zYXZlZENoYW5nZXMoKXtcclxuICAgICAgICAgICAgICAgIGxldCB1bnNhdmVkQ2hhbmdlcyA9IGZhbHNlXHJcbiAgICAgICAgICAgICAgICBsZXQgc2VsZiA9IHRoaXNcclxuICAgICAgICAgICAgICAgIGlmICggdGhpcy5zZWxlY3RlZEluZGV4ZXNBcnJheS5sZW5ndGggPiAwICkge1xyXG4gICAgICAgICAgICAgICAgICAgIHRoaXMuc2VsZWN0ZWRJbmRleGVzQXJyYXkuZm9yRWFjaChmdW5jdGlvbiAoc2VsZWN0ZWRJbmRleCkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBzZWxmLnNldHRpbmdzWyd0cmFuc2xhdGlvbi1sYW5ndWFnZXMnXS5mb3JFYWNoKGZ1bmN0aW9uIChsYW5ndWFnZUNvZGUpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChzZWxmLmRpY3Rpb25hcnlbc2VsZWN0ZWRJbmRleF0gJiZcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzZWxmLmRpY3Rpb25hcnlbc2VsZWN0ZWRJbmRleF0udHJhbnNsYXRpb25zQXJyYXlbbGFuZ3VhZ2VDb2RlXSAmJlxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChzZWxmLmRpY3Rpb25hcnlbc2VsZWN0ZWRJbmRleF0udHJhbnNsYXRpb25zQXJyYXlbbGFuZ3VhZ2VDb2RlXS50cmFuc2xhdGVkICE9PSBzZWxmLmRpY3Rpb25hcnlbc2VsZWN0ZWRJbmRleF0udHJhbnNsYXRpb25zQXJyYXlbbGFuZ3VhZ2VDb2RlXS5lZGl0ZWRUcmFuc2xhdGlvbikpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1bnNhdmVkQ2hhbmdlcyA9IHRydWVcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgICAgICAgICAgfSlcclxuICAgICAgICAgICAgICAgICAgICB9KVxyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgdGhpcy5zaG93Q2hhbmdlc1Vuc2F2ZWRNZXNzYWdlID0gdW5zYXZlZENoYW5nZXNcclxuXHJcbiAgICAgICAgICAgICAgICByZXR1cm4gdW5zYXZlZENoYW5nZXNcclxuICAgICAgICAgICAgfSxcclxuICAgICAgICAgICAgaWZyYW1lTG9hZGVyKCBzdGF0dXMgKSB7XHJcbiAgICAgICAgICAgICAgICBsZXQgbG9hZGVyID0gZG9jdW1lbnQuZ2V0RWxlbWVudEJ5SWQoICd0cnAtcHJldmlldy1sb2FkZXInIClcclxuXHJcbiAgICAgICAgICAgICAgICBpZiggc3RhdHVzID09ICdzaG93JyApXHJcbiAgICAgICAgICAgICAgICAgICAgbG9hZGVyLnN0eWxlLmRpc3BsYXkgPSAnZmxleCdcclxuICAgICAgICAgICAgICAgIGVsc2UgaWYoIHN0YXR1cyA9PSAnaGlkZScgKVxyXG4gICAgICAgICAgICAgICAgICAgIGxvYWRlci5zdHlsZS5kaXNwbGF5ID0gJ25vbmUnXHJcbiAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgIHByZXZpb3VzU3RyaW5nKCl7XHJcbiAgICAgICAgICAgICAgICBsZXQgY3VycmVudFZhbHVlID0gZG9jdW1lbnQuZ2V0RWxlbWVudEJ5SWQoJ3RycC1zdHJpbmctY2F0ZWdvcmllcycpLnZhbHVlXHJcblxyXG4gICAgICAgICAgICAgICAgbGV0IG5ld1ZhbHVlID0gK2N1cnJlbnRWYWx1ZSAtIDFcclxuXHJcbiAgICAgICAgICAgICAgICB3aGlsZSggbmV3VmFsdWUgPj0gMCAmJiBkb2N1bWVudC5xdWVyeVNlbGVjdG9yQWxsKCcjdHJwLXN0cmluZy1jYXRlZ29yaWVzIG9wdGlvblt2YWx1ZT1cIicgKyBuZXdWYWx1ZSArICdcIl0nKS5sZW5ndGggPT09IDAgKXtcclxuICAgICAgICAgICAgICAgICAgICBuZXdWYWx1ZS0tO1xyXG4gICAgICAgICAgICAgICAgfVxyXG5cclxuICAgICAgICAgICAgICAgIGlmKCBuZXdWYWx1ZSA8IDAgKVxyXG4gICAgICAgICAgICAgICAgICAgIHJldHVyblxyXG5cclxuICAgICAgICAgICAgICAgIHRoaXMuc2VsZWN0ZWRTdHJpbmcgPSBuZXdWYWx1ZS50b1N0cmluZygpXHJcbiAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgIG5leHRTdHJpbmcoKXtcclxuICAgICAgICAgICAgICAgIGxldCBjdXJyZW50VmFsdWUgPSBkb2N1bWVudC5nZXRFbGVtZW50QnlJZCgndHJwLXN0cmluZy1jYXRlZ29yaWVzJykudmFsdWUsIG5ld1ZhbHVlID0gMFxyXG5cclxuICAgICAgICAgICAgICAgIGlmKCBjdXJyZW50VmFsdWUgIT0gJycgKVxyXG4gICAgICAgICAgICAgICAgICAgIG5ld1ZhbHVlID0gK2N1cnJlbnRWYWx1ZSArIDFcclxuXHJcbiAgICAgICAgICAgICAgICB3aGlsZSggbmV3VmFsdWUgPCB0aGlzLmRpY3Rpb25hcnkubGVuZ3RoICYmIGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3JBbGwoJyN0cnAtc3RyaW5nLWNhdGVnb3JpZXMgb3B0aW9uW3ZhbHVlPVwiJyArIG5ld1ZhbHVlICsgJ1wiXScpLmxlbmd0aCA9PT0gMCApe1xyXG4gICAgICAgICAgICAgICAgICAgIG5ld1ZhbHVlKys7XHJcbiAgICAgICAgICAgICAgICB9XHJcblxyXG4gICAgICAgICAgICAgICAgaWYgKCBuZXdWYWx1ZSA+PSB0aGlzLmRpY3Rpb25hcnkubGVuZ3RoICl7XHJcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuXHJcbiAgICAgICAgICAgICAgICB9XHJcblxyXG4gICAgICAgICAgICAgICAgdGhpcy5zZWxlY3RlZFN0cmluZyA9IG5ld1ZhbHVlLnRvU3RyaW5nKClcclxuICAgICAgICAgICAgfSxcclxuICAgICAgICAgICAgYWRkS2V5Ym9hcmRTaG9ydGN1dHNMaXN0ZW5lcigpe1xyXG4gICAgICAgICAgICAgICAgZG9jdW1lbnQuYWRkRXZlbnRMaXN0ZW5lcihcImtleWRvd25cIiwgZnVuY3Rpb24oZSkge1xyXG4gICAgICAgICAgICAgICAgICAgIGlmICgod2luZG93Lm5hdmlnYXRvci5wbGF0Zm9ybS5tYXRjaChcIk1hY1wiKSA/IGUubWV0YUtleSA6IGUuY3RybEtleSkgJiYgZS5hbHRLZXkgKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIC8vIENUUkwgKyBBTFQgKyByaWdodCBhcnJvd1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBpZiggZS5rZXlDb2RlID09PSAzOSApe1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZS5wcmV2ZW50RGVmYXVsdCgpO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgd2luZG93LmRpc3BhdGNoRXZlbnQoIG5ldyBFdmVudCggJ3RycF90cmlnZ2VyX25leHRfc3RyaW5nX2V2ZW50JyApICk7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIH1lbHNle1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gQ1RSTCArIEFMVCArIGxlZnQgYXJyb3dcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKCBlLmtleUNvZGUgPT09IDM3ICkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGUucHJldmVudERlZmF1bHQoKTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB3aW5kb3cuZGlzcGF0Y2hFdmVudCggbmV3IEV2ZW50KCAndHJwX3RyaWdnZXJfcHJldmlvdXNfc3RyaW5nX2V2ZW50JyApICk7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICB9LCBmYWxzZSk7XHJcblxyXG4gICAgICAgICAgICAgICAgd2luZG93LmFkZEV2ZW50TGlzdGVuZXIoICd0cnBfdHJpZ2dlcl9uZXh0X3N0cmluZ19ldmVudCcsIHRoaXMubmV4dFN0cmluZyApXHJcbiAgICAgICAgICAgICAgICB3aW5kb3cuYWRkRXZlbnRMaXN0ZW5lciggJ3RycF90cmlnZ2VyX3ByZXZpb3VzX3N0cmluZ19ldmVudCcsIHRoaXMucHJldmlvdXNTdHJpbmcgKVxyXG4gICAgICAgICAgICB9LFxyXG4gICAgICAgICAgICByZXNpemVJZnJhbWUgKGV2ZW50LCB1aSkge1xyXG4gICAgICAgICAgICAgICAgbGV0IHRvdGFsX3dpZHRoID0galF1ZXJ5KHdpbmRvdykud2lkdGgoKTtcclxuICAgICAgICAgICAgICAgIGxldCB3aWR0aCA9IGpRdWVyeSggJyN0cnAtY29udHJvbHMnICkud2lkdGgoKTtcclxuXHJcbiAgICAgICAgICAgICAgICBpZih3aWR0aCA+IHRvdGFsX3dpZHRoKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgd2lkdGggPSB0b3RhbF93aWR0aDtcclxuICAgICAgICAgICAgICAgICAgICBjb250cm9scy5jc3MoJ3dpZHRoJywgd2lkdGgpO1xyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgbGV0IHByZXZpZXdDb250YWluZXIgPSBqUXVlcnkoICcjdHJwLXByZXZpZXcnICk7XHJcbiAgICAgICAgICAgICAgICBwcmV2aWV3Q29udGFpbmVyLmNzcygncmlnaHQnLCB3aWR0aCApO1xyXG4gICAgICAgICAgICAgICAgcHJldmlld0NvbnRhaW5lci5jc3MoJ2xlZnQnLCAoIHdpZHRoIC0gMzQ4ICkgKTtcclxuICAgICAgICAgICAgICAgIHByZXZpZXdDb250YWluZXIuY3NzKCd3aWR0aCcsICh0b3RhbF93aWR0aCAtIHdpZHRoKSk7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9LFxyXG4gICAgICAgIC8vYWRkIHN1cHBvcnQgZm9yIHYtbW9kZWwgaW4gc2VsZWN0MlxyXG4gICAgICAgIGRpcmVjdGl2ZXM6IHtcclxuICAgICAgICAgICAgc2VsZWN0Mjoge1xyXG4gICAgICAgICAgICAgICAgaW5zZXJ0ZWQoZWwpIHtcclxuICAgICAgICAgICAgICAgICAgICBqUXVlcnkoZWwpLm9uKCdzZWxlY3QyOnNlbGVjdCcsICgpID0+IHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgY29uc3QgZXZlbnQgPSBuZXcgRXZlbnQoJ2NoYW5nZScsIHsgYnViYmxlczogdHJ1ZSwgY2FuY2VsYWJsZTogdHJ1ZSB9KVxyXG4gICAgICAgICAgICAgICAgICAgICAgICBlbC5kaXNwYXRjaEV2ZW50KGV2ZW50KVxyXG4gICAgICAgICAgICAgICAgICAgIH0pXHJcblxyXG4gICAgICAgICAgICAgICAgICAgIGpRdWVyeShlbCkub24oJ3NlbGVjdDI6dW5zZWxlY3QnLCAoKSA9PiB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IGV2ZW50ID0gbmV3IEV2ZW50KCdjaGFuZ2UnLCB7IGJ1YmJsZXM6IHRydWUsIGNhbmNlbGFibGU6IHRydWUgfSlcclxuICAgICAgICAgICAgICAgICAgICAgICAgZWwuZGlzcGF0Y2hFdmVudChldmVudClcclxuICAgICAgICAgICAgICAgICAgICB9KVxyXG4gICAgICAgICAgICAgICAgfSxcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH1cclxuICAgIH1cclxuPC9zY3JpcHQ+XHJcbiJdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./node_modules/babel-loader/lib/index.js?!./node_modules/vue-loader/lib/index.js?!./assets/src/js/editor.vue?vue&type=script&lang=js&\n");
719
 
720
  /***/ }),
721
 
853
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
854
 
855
  "use strict";
856
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"render\", function() { return render; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"staticRenderFns\", function() { return staticRenderFns; });\nvar render = function() {\n var _vm = this\n var _h = _vm.$createElement\n var _c = _vm._self._c || _h\n return _c(\"div\", { attrs: { id: \"trp-editor\" } }, [\n _c(\n \"div\",\n { attrs: { id: \"trp-controls\" } },\n [\n _c(\n \"div\",\n { staticClass: \"trp-controls-container\" },\n [\n _c(\"div\", { attrs: { id: \"trp-close-save\" } }, [\n _c(\"a\", {\n attrs: {\n id: \"trp-controls-close\",\n href: _vm.closeURL,\n title: _vm.editorStrings.close\n }\n }),\n _vm._v(\" \"),\n _c(\n \"div\",\n { attrs: { id: \"trp-save-and-loader-spinner\" } },\n [\n _c(\n \"span\",\n {\n directives: [\n {\n name: \"show\",\n rawName: \"v-show\",\n value: _vm.loading_strings > 0,\n expression: \"loading_strings > 0\"\n }\n ],\n staticClass: \"trp-ajax-loader\",\n attrs: { id: \"trp-string-saved-ajax-loader\" }\n },\n [_c(\"div\", { staticClass: \"trp-spinner\" })]\n ),\n _vm._v(\" \"),\n _c(\"save-translations\", {\n attrs: {\n selectedIndexesArray: _vm.selectedIndexesArray,\n dictionary: _vm.dictionary,\n settings: _vm.settings,\n nonces: _vm.nonces,\n ajax_url: _vm.ajax_url,\n currentLanguage: _vm.currentLanguage,\n onScreenLanguage: _vm.onScreenLanguage,\n iframe: _vm.iframe,\n currentURL: _vm.currentURL,\n mergingString: _vm.mergingString,\n mergeData: _vm.mergeData,\n editorStrings: _vm.editorStrings\n },\n on: {\n \"translations-saved\": function($event) {\n _vm.showChangesUnsavedMessage = false\n }\n }\n })\n ],\n 1\n )\n ]),\n _vm._v(\" \"),\n _c(\"div\", { staticClass: \"trp-controls-section\" }, [\n _c(\"div\", { staticClass: \"trp-controls-section-content\" }, [\n _c(\"div\", { attrs: { id: \"trp-language-switch\" } }, [\n _c(\n \"select\",\n {\n directives: [\n {\n name: \"model\",\n rawName: \"v-model\",\n value: _vm.currentLanguage,\n expression: \"currentLanguage\"\n },\n { name: \"select2\", rawName: \"v-select2\" }\n ],\n attrs: { id: \"trp-language-select\", name: \"lang\" },\n on: {\n change: function($event) {\n var $$selectedVal = Array.prototype.filter\n .call($event.target.options, function(o) {\n return o.selected\n })\n .map(function(o) {\n var val = \"_value\" in o ? o._value : o.value\n return val\n })\n _vm.currentLanguage = $event.target.multiple\n ? $$selectedVal\n : $$selectedVal[0]\n }\n }\n },\n _vm._l(_vm.languageNames, function(lang, langIndex) {\n return _c(\"option\", { domProps: { value: langIndex } }, [\n _vm._v(_vm._s(lang))\n ])\n }),\n 0\n )\n ]),\n _vm._v(\" \"),\n _c(\"div\", { attrs: { id: \"trp-string-list\" } }, [\n _c(\n \"select\",\n {\n directives: [\n {\n name: \"model\",\n rawName: \"v-model\",\n value: _vm.selectedString,\n expression: \"selectedString\"\n },\n { name: \"select2\", rawName: \"v-select2\" }\n ],\n attrs: { id: \"trp-string-categories\" },\n on: {\n change: function($event) {\n var $$selectedVal = Array.prototype.filter\n .call($event.target.options, function(o) {\n return o.selected\n })\n .map(function(o) {\n var val = \"_value\" in o ? o._value : o.value\n return val\n })\n _vm.selectedString = $event.target.multiple\n ? $$selectedVal\n : $$selectedVal[0]\n }\n }\n },\n _vm._l(_vm.stringGroups, function(group) {\n return _c(\n \"optgroup\",\n { attrs: { label: group } },\n _vm._l(_vm.dictionary, function(string, index) {\n return _vm.showString(string, group)\n ? _c(\n \"option\",\n {\n attrs: {\n title: string.description,\n \"data-database-id\": string.dbID,\n \"data-group\": string.group\n },\n domProps: { value: index }\n },\n [\n _vm._v(\n _vm._s(\n _vm.processOptionName(\n string.original,\n group\n )\n )\n )\n ]\n )\n : _vm._e()\n }),\n 0\n )\n }),\n 0\n )\n ]),\n _vm._v(\" \"),\n _c(\"div\", { attrs: { id: \"trp-next-previous\" } }, [\n _c(\n \"button\",\n {\n staticClass: \"trp-next-previous-buttons\",\n attrs: {\n type: \"button\",\n id: \"trp-previous\",\n title: _vm.editorStrings.previous_title_attr\n },\n on: {\n click: function($event) {\n _vm.previousString()\n }\n }\n },\n [\n _c(\"span\", [_vm._v(\"«\")]),\n _vm._v(\" \" + _vm._s(_vm.editorStrings.previous))\n ]\n ),\n _vm._v(\" \"),\n _c(\n \"button\",\n {\n staticClass: \"trp-next-previous-buttons\",\n attrs: {\n type: \"button\",\n id: \"trp-next\",\n title: _vm.editorStrings.next_title_attr\n },\n on: {\n click: function($event) {\n _vm.nextString()\n }\n }\n },\n [\n _vm._v(_vm._s(_vm.editorStrings.next) + \" \"),\n _c(\"span\", [_vm._v(\"»\")])\n ]\n )\n ]),\n _vm._v(\" \"),\n _c(\"div\", { attrs: { id: \"trp-view-as\" } }, [\n _c(\"div\", { attrs: { id: \"trp-view-as-description\" } }, [\n _vm._v(_vm._s(_vm.editorStrings.view_as))\n ]),\n _vm._v(\" \"),\n _c(\n \"select\",\n {\n directives: [\n {\n name: \"model\",\n rawName: \"v-model\",\n value: _vm.viewAs,\n expression: \"viewAs\"\n },\n { name: \"select2\", rawName: \"v-select2\" }\n ],\n attrs: { id: \"trp-view-as-select\" },\n on: {\n change: function($event) {\n var $$selectedVal = Array.prototype.filter\n .call($event.target.options, function(o) {\n return o.selected\n })\n .map(function(o) {\n var val = \"_value\" in o ? o._value : o.value\n return val\n })\n _vm.viewAs = $event.target.multiple\n ? $$selectedVal\n : $$selectedVal[0]\n }\n }\n },\n _vm._l(_vm.roles, function(role, roleIndex) {\n return _c(\n \"option\",\n {\n attrs: {\n disabled: !role,\n title: !role ? _vm.editorStrings.view_as_pro : \"\"\n },\n domProps: { value: role }\n },\n [_vm._v(_vm._s(roleIndex))]\n )\n }),\n 0\n )\n ])\n ])\n ]),\n _vm._v(\" \"),\n _c(\n \"div\",\n {\n directives: [\n {\n name: \"show\",\n rawName: \"v-show\",\n value: _vm.selectedString !== null,\n expression: \"selectedString !== null\"\n }\n ],\n staticClass: \"trp-controls-section\"\n },\n [\n _c(\"language-boxes\", {\n attrs: {\n selectedIndexesArray: _vm.selectedIndexesArray,\n dictionary: _vm.dictionary,\n currentLanguage: _vm.currentLanguage,\n onScreenLanguage: _vm.onScreenLanguage,\n languageNames: _vm.languageNames,\n settings: _vm.settings,\n showChangesUnsavedMessage: _vm.showChangesUnsavedMessage,\n editorStrings: _vm.editorStrings,\n flagsPath: _vm.flagsPath,\n iframe: _vm.iframe\n },\n on: {\n \"discarded-changes\": function($event) {\n _vm.hasUnsavedChanges()\n }\n }\n })\n ],\n 1\n ),\n _vm._v(\" \"),\n _c(\"extra-content\", {\n attrs: {\n languageNames: _vm.languageNames,\n editorStrings: _vm.editorStrings,\n paidVersion: _vm.paid_version\n }\n }),\n _vm._v(\" \"),\n _c(\n \"div\",\n {\n directives: [\n {\n name: \"show\",\n rawName: \"v-show\",\n value: _vm.translationNotLoadedYet,\n expression: \"translationNotLoadedYet\"\n }\n ],\n staticClass: \"trp-controls-section\"\n },\n [\n _c(\n \"div\",\n {\n staticClass: \"trp-controls-section-content\",\n attrs: { id: \"trp-translation-not-ready-section\" }\n },\n [\n _c(\"p\", {\n domProps: {\n innerHTML: _vm._s(\n _vm.editorStrings.translation_not_loaded_yet\n )\n }\n })\n ]\n )\n ]\n )\n ],\n 1\n ),\n _vm._v(\" \"),\n _c(\"div\", { attrs: { id: \"trp_select2_overlay\" } }),\n _vm._v(\" \"),\n _c(\"hover-actions\", {\n ref: \"hoverActions\",\n attrs: {\n dictionary: _vm.dictionary,\n settings: _vm.settings,\n iframe: _vm.iframe,\n dataAttributes: _vm.dataAttributes,\n mergeRules: _vm.mergeRules,\n nonces: _vm.nonces,\n ajax_url: _vm.ajax_url,\n mergeData: _vm.mergeData,\n editorStrings: _vm.editorStrings,\n currentLanguage: _vm.currentLanguage\n }\n })\n ],\n 1\n ),\n _vm._v(\" \"),\n _c(\"div\", { attrs: { id: \"trp-preview\" } }, [\n _c(\"iframe\", {\n attrs: { id: \"trp-preview-iframe\", src: _vm.urlToLoad },\n on: { load: _vm.iFrameLoaded }\n }),\n _vm._v(\" \"),\n _c(\"div\", { attrs: { id: \"trp-preview-loader\" } }, [\n _c(\n \"svg\",\n {\n staticClass: \"trp-loader\",\n attrs: {\n width: \"65px\",\n height: \"65px\",\n viewBox: \"0 0 66 66\",\n xmlns: \"http://www.w3.org/2000/svg\"\n }\n },\n [\n _c(\"circle\", {\n staticClass: \"trp-circle\",\n attrs: {\n fill: \"none\",\n \"stroke-width\": \"6\",\n \"stroke-linecap\": \"round\",\n cx: \"33\",\n cy: \"33\",\n r: \"30\"\n }\n })\n ]\n )\n ])\n ])\n ])\n}\nvar staticRenderFns = []\nrender._withStripped = true\n\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9hc3NldHMvc3JjL2pzL2VkaXRvci52dWU/NTEwNiJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTtBQUFBO0FBQUE7QUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLG9CQUFvQixTQUFTLG1CQUFtQixFQUFFO0FBQ2xEO0FBQ0E7QUFDQSxPQUFPLFNBQVMscUJBQXFCLEVBQUU7QUFDdkM7QUFDQTtBQUNBO0FBQ0EsV0FBVyx3Q0FBd0M7QUFDbkQ7QUFDQSx1QkFBdUIsU0FBUyx1QkFBdUIsRUFBRTtBQUN6RDtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSxlQUFlO0FBQ2Y7QUFDQTtBQUNBO0FBQ0EsaUJBQWlCLFNBQVMsb0NBQW9DLEVBQUU7QUFDaEU7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSw4QkFBOEI7QUFDOUIscUJBQXFCO0FBQ3JCLGdDQUFnQyw2QkFBNkI7QUFDN0Q7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSxxQkFBcUI7QUFDckI7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLG1CQUFtQjtB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gICAgICAgICAgaWQ6IFwidHJwLWNvbnRyb2xzLWNsb3NlXCIsXG4gICAgICAgICAgICAgICAgICBocmVmOiBfdm0uY2xvc2VVUkwsXG4gICAgICAgICAgICAgICAgICB0aXRsZTogX3ZtLmVkaXRvclN0cmluZ3MuY2xvc2VcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgIH0pLFxuICAgICAgICAgICAgICBfdm0uX3YoXCIgXCIpLFxuICAgICAgICAgICAgICBfYyhcbiAgICAgICAgICAgICAgICBcImRpdlwiLFxuICAgICAgICAgICAgICAgIHsgYXR0cnM6IHsgaWQ6IFwidHJwLXNhdmUtYW5kLWxvYWRlci1zcGlubmVyXCIgfSB9LFxuICAgICAgICAgICAgICAgIFtcbiAgICAgICAgICAgICAgICAgIF9jKFxuICAgICAgICAgICAgICAgICAgICBcInNwYW5cIixcbiAgICAgICAgICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgICAgICAgIGRpcmVjdGl2ZXM6IFtcbiAgICAgICAgICAgICAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgbmFtZTogXCJzaG93XCIsXG4gICAgICAgICAgICAgICAgICAgICAgICAgIHJhd05hbWU6IFwidi1zaG93XCIsXG4gICAgICAgICAgICAgICAgICAgICAgICAgIHZhbHVlOiBfdm0ubG9hZGluZ19zdHJpbmdzID4gMCxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgZXhwcmVzc2lvbjogXCJsb2FkaW5nX3N0cmluZ3MgPiAwXCJcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICBdLFxuICAgICAgICAgICAgICAgICAgICAgIHN0YXRpY0NsYXNzOiBcInRycC1hamF4LWxvYWRlclwiLFxuICAgICAgICAgICAgICAgICAgICAgIGF0dHJzOiB7IGlkOiBcInRycC1zdHJpbmctc2F2ZWQtYWpheC1sb2FkZXJcIiB9XG4gICAgICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgICAgICAgIFtfYyhcImRpdlwiLCB7IHN0YXRpY0NsYXNzOiBcInRycC1zcGlubmVyXCIgfSldXG4gICAgICAgICAgICAgICAgICApLFxuICAgICAgICAgICAgICAgICAgX3ZtLl92KFwiIFwiKSxcbiAgICAgICAgICAgICAgICAgIF9jKFwic2F2ZS10cmFuc2xhdGlvbnNcIiwge1xuICAgICAgICAgICAgICAgICAgICBhdHRyczoge1xuICAgICAgICAgICAgICAgICAgICAgIHNlbGVjdGVkSW5kZXhlc0FycmF5OiBfdm0uc2VsZWN0ZWRJbmRleGVzQXJyYXksXG4gICAgICAgICAgICAgICAgICAgICAgZGljdGlvbmFyeTogX3ZtLmRpY3Rpb25hcnksXG4gICAgICAgICAgICAgICAgICAgICAgc2V0dGluZ3M6IF92bS5zZXR0aW5ncyxcbiAgICAgICAgICAgICAgICAgICAgICBub25jZXM6IF92bS5ub25jZXMsXG4gICAgICAgICAgICAgICAgICAgICAgYWpheF91cmw6IF92bS5hamF4X3VybCxcbiAgICAgICAgICAgICAgICAgICAgICBjdXJyZW50TGFuZ3VhZ2U6IF92bS5jdXJyZW50TGFuZ3VhZ2UsXG4gICAgICAgICAgICAgICAgICAgICAgb25TY3JlZW5MYW5ndWFnZTogX3ZtLm9uU2NyZWVuTGFuZ3VhZ2UsXG4gICAgICAgICAgICAgICAgICAgICAgaWZyYW1lOiBfdm0uaWZyYW1lLFxuICAgICAgICAgICAgICAgICAgICAgIGN1cnJlbnRVUkw6IF92bS5jdXJyZW50VVJMLFxuICAgICAgICAgICAgICAgICAgICAgIG1lcmdpbmdTdHJpbmc6IF92bS5tZXJnaW5nU3RyaW5nLFxuICAgICAgICAgICAgICAgICAgICAgIG1lcmdlRGF0YTogX3ZtLm1lcmdlRGF0YSxcbiAgICAgICAgICAgICAgICAgICAgICBlZGl0b3JTdHJpbmdzOiBfdm0uZWRpdG9yU3RyaW5nc1xuICAgICAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgICAgICBvbjoge1xuICAgICAgICAgICAgICAgICAgICAgIFwidHJhbnNsYXRpb25zLXNhdmVkXCI6IGZ1bmN0aW9uKCRldmVudCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgX3ZtLnNob3dDaGFuZ2VzVW5zYXZlZE1lc3NhZ2UgPSBmYWxzZVxuICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgfSlcbiAgICAgICAgICAgICAgICBdLFxuICAgICAgICAgICAgICAgIDFcbiAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgXSksXG4gICAgICAgICAgICBfdm0uX3YoXCIgXCIpLFxuICAgICAgICAgICAgX2MoXCJkaXZcIiwgeyBzdGF0aWNDbGFzczogXCJ0cnAtY29udHJvbHMtc2VjdGlvblwiIH0sIFtcbiAgICAgICAgICAgICAgX2MoXCJkaXZcIiwgeyBzdGF0aWNDbGFzczogXCJ0cnAtY29udHJvbHMtc2VjdGlvbi1jb250ZW50XCIgfSwgW1xuICAgICAgICAgICAgICAgIF9jKFwiZGl2XCIsIHsgYXR0cnM6IHsgaWQ6IFwidHJwLWxhbmd1YWdlLXN3aXRjaFwiIH0gfSwgW1xuICAgICAgICAgICAgICAgICAgX2MoXG4gICAgICAgICAgICAgICAgICAgIFwic2VsZWN0XCIsXG4gICAgICAgICAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICAgICAgICBkaXJlY3RpdmVzOiBbXG4gICAgICAgICAgICAgICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgIG5hbWU6IFwibW9kZWxcIixcbiAgICAgICAgICAgICAgICAgICAgICAgICAgcmF3TmFtZTogXCJ2LW1vZGVsXCIsXG4gICAgICAgICAgICAgICAgICAgICAgICAgIHZhbHVlOiBfdm0uY3VycmVudExhbmd1YWdlLFxuICAgICAgICAgICAgICAgICAgICAgICAgICBleHByZXNzaW9uOiBcImN1cnJlbnRMYW5ndWFnZVwiXG4gICAgICAgICAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgICAgICAgICAgeyBuYW1lOiBcInNlbGVjdDJcIiwgcmF3TmFtZTogXCJ2LXNlbGVjdDJcIiB9XG4gICAgICAgICAgICAgICAgICAgICAgXSxcbiAgICAgICAgICAgICAgICAgICAgICBhdHRyczogeyBpZDogXCJ0cnAtbGFuZ3VhZ2Utc2VsZWN0XCIsIG5hbWU6IFwibGFuZ1wiIH0sXG4gICAgICAgICAgICAgICAgICAgICAgb246IHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGNoYW5nZTogZnVuY3Rpb24oJGV2ZW50KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgIHZhciAkJHNlbGVjdGVkVmFsID0gQXJyYXkucHJvdG90eXBlLmZpbHRlclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIC5jYWxsKCRldmVudC50YXJnZXQub3B0aW9ucywgZnVuY3Rpb24obykge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIG8uc2VsZWN0ZWRcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIC5tYXAoZnVuY3Rpb24obykge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFyIHZhbCA9IFwiX3ZhbHVlXCIgaW4gbyA/IG8uX3ZhbHVlIDogby52YWx1ZVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHZhbFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pXG4gICAgICAgICAgICAgICAgICAgICAgICAgIF92bS5jdXJyZW50TGFuZ3VhZ2UgPSAkZXZlbnQudGFyZ2V0Lm11bHRpcGxlXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgPyAkJHNlbGVjdGVkVmFsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgOiAkJHNlbGVjdGVkVmFsWzBdXG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgICAgICBfdm0uX2woX3ZtLmxhbmd1YWdlTmFtZXMsIGZ1bmN0aW9uKGxhbmcsIGxhbmdJbmRleCkge1xuICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBfYyhcIm9wdGlvblwiLCB7IGRvbVByb3BzOiB7IHZhbHVlOiBsYW5nSW5kZXggfSB9LCBbXG4gICAgICAgICAgICAgICAgICAgICAgICBfdm0uX3YoX3ZtLl9zKGxhbmcpKVxuICAgICAgICAgICAgICAgICAgICAgIF0pXG4gICAgICAgICAgICAgICAgICAgIH0pLFxuICAgICAgICAgICAgICAgICAgICAwXG4gICAgICAgICAgICAgICAgICApXG4gICAgICAgICAgICAgICAgXSksXG4gICAgICAgICAgICAgICAgX3ZtLl92KFwiIFwiKSxcbiAgICAgICAgICAgICAgICBfYyhcImRpdlwiLCB7IGF0dHJzOiB7IGlkOiBcInRycC1zdHJpbmctbGlzdFwiIH0gfSwgW1xuICAgICAgICAgICAgICAgICAgX2MoXG4gICAgICAgICAgICAgICAgICAgIFwic2VsZWN0XCIsXG4gICAgICAgICAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICAgICAgICBkaXJlY3RpdmVzOiBbXG4gICAgICAgICAgICAgICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgIG5hbWU6IFwibW9kZWxcIixcbiAgICAgICAgICAgICAgICAgICAgICAgICAgcmF3TmFtZTogXCJ2LW1vZGVsXCIsXG4gICAgICAgICAgICAgICAgICAgICAgICAgIHZhbHVlOiBfdm0uc2VsZWN0ZWRTdHJpbmcsXG4gICAgICAgICAgICAgICAgICAgICAgICAgIGV4cHJlc3Npb246IFwic2VsZWN0ZWRTdHJpbmdcIlxuICAgICAgICAgICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICAgICAgICAgIHsgbmFtZTogXCJzZWxlY3QyXCIsIHJhd05hbWU6IFwidi1zZWxlY3QyXCIgfVxuICAgICAgICAgICAgICAgICAgICAgIF0sXG4gICAgICAgICAgICAgICAgICAgICAgYXR0cnM6IHsgaWQ6IFwidHJwLXN0cmluZy1jYXRlZ29yaWVzXCIgfSxcbiAgICAgICAgICAgICAgICAgICAgICBvbjoge1xuICAgICAgICAgICAgICAgICAgICAgICAgY2hhbmdlOiBmdW5jdGlvbigkZXZlbnQpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgdmFyICQkc2VsZWN0ZWRWYWwgPSBBcnJheS5wcm90b3R5cGUuZmlsdGVyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgLmNhbGwoJGV2ZW50LnRhcmdldC5vcHRpb25zLCBmdW5jdGlvbihvKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gby5zZWxlY3RlZFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgLm1hcChmdW5jdGlvbihvKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YXIgdmFsID0gXCJfdmFsdWVcIiBpbiBvID8gby5fdmFsdWUgOiBvLnZhbHVlXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gdmFsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSlcbiAgICAgICAgICAgICAgICAgICAgICAgICAgX3ZtLnNlbGVjdGVkU3RyaW5nID0gJGV2ZW50LnRhcmdldC5tdWx0aXBsZVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgID8gJCRzZWxlY3RlZFZhbFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIDogJCRzZWxlY3RlZFZhbFswXVxuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICAgICAgX3ZtLl9sKF92bS5zdHJpbmdHcm91cHMsIGZ1bmN0aW9uKGdyb3VwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIF9jKFxuICAgICAgICAgICAgICAgICAgICAgICAgXCJvcHRncm91cFwiLFxuICAgICAgICAgICAgICAgICAgICAgICAgeyBhdHRyczogeyBsYWJlbDogZ3JvdXAgfSB9LFxuICAgICAgICAgICAgICAgICAgICAgICAgX3ZtLl9sKF92bS5kaWN0aW9uYXJ5LCBmdW5jdGlvbihzdHJpbmcsIGluZGV4KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBfdm0uc2hvd1N0cmluZyhzdHJpbmcsIGdyb3VwKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgID8gX2MoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwib3B0aW9uXCIsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhdHRyczoge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGl0bGU6IHN0cmluZy5kZXNjcmlwdGlvbixcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwiZGF0YS1kYXRhYmFzZS1pZFwiOiBzdHJpbmcuZGJJRCxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwiZGF0YS1ncm91cFwiOiBzdHJpbmcuZ3JvdXBcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRvbVByb3BzOiB7IHZhbHVlOiBpbmRleCB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBfdm0uX3YoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBfdm0uX3MoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIF92bS5wcm9jZXNzT3B0aW9uTmFtZShcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzdHJpbmcub3JpZ2luYWwsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZ3JvdXBcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIClcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIDogX3ZtLl9lKClcbiAgICAgICAgICAgICAgICAgICAgICAgIH0pLFxuICAgICAgICAgICAgICAgICAgICAgICAgMFxuICAgICAgICAgICAgICAgICAgICAgIClcbiAgICAgICAgICAgICAgICAgICAgfSksXG4gICAgICAgICAgICAgICAgICAgIDBcbiAgICAgICAgICAgICAgICAgIClcbiAgICAgICAgICAgICAgICBdKSxcbiAgICAgICAgICAgICAgICBfdm0uX3YoXCIgXCIpLFxuICAgICAgICAgICAgICAgIF9jKFwiZGl2XCIsIHsgYXR0cnM6IHsgaWQ6IFwidHJwLW5leHQtcHJldmlvdXNcIiB9IH0sIFtcbiAgICAgICAgICAgICAgICAgIF9jKFxuICAgICAgICAgICAgICAgICAgICBcImJ1dHRvblwiLFxuICAgICAgICAgICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgICAgICAgc3RhdGljQ2xhc3M6IFwidHJwLW5leHQtcHJldmlvdXMtYnV0dG9uc1wiLFxuICAgICAgICAgICAgICAgICAgICAgIGF0dHJzOiB7XG4gICAgICAgICAgICAgICAgICAgICAgICB0eXBlOiBcImJ1dHRvblwiLFxuICAgICAgICAgICAgICAgICAgICAgICAgaWQ6IFwidHJwLXByZXZpb3VzXCIsXG4gICAgICAgICAgICAgICAgICAgICAgICB0aXRsZTogX3ZtLmVkaXRvclN0cmluZ3MucHJldmlvdXNfdGl0bGVfYXR0clxuICAgICAgICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgICAgICAgICAgb246IHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGNsaWNrOiBmdW5jdGlvbigkZXZlbnQpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgX3ZtLnByZXZpb3VzU3RyaW5nKClcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgICAgICAgIFtcbiAgICAgICAgICAgICAgICAgICAgICBfYyhcInNwYW5cIiwgW192bS5fdihcIsKrXCIpXSksXG4gICAgICAgICAgICAgICAgICAgICAgX3ZtLl92KFwiIFwiICsgX3ZtLl9zKF92bS5lZGl0b3JTdHJpbmdzLnByZXZpb3VzKSlcbiAgICAgICAgICAgICAgICAgICAgXVxuICAgICAgICAgICAgICAgICAgKSxcbiAgICAgICAgICAgICAgICAgIF92bS5fdihcIiBcIiksXG4gICAgICAgICAgICAgICAgICBfYyhcbiAgICAgICAgICAgICAgICAgICAgXCJidXR0b25cIixcbiAgICAgICAgICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgICAgICAgIHN0YXRpY0NsYXNzOiBcInRycC1uZXh0LXByZXZpb3VzLWJ1dHRvbnNcIixcbiAgICAgICAgICAgICAgICAgICAgICBhdHRyczoge1xuICAgICAgICAgICAgICAgICAgICAgICAgdHlwZTogXCJidXR0b25cIixcbiAgICAgICAgICAgICAgICAgICAgICAgIGlkOiBcInRycC1uZXh0XCIsXG4gICAgICAgICAgICAgICAgICAgICAgICB0aXRsZTogX3ZtLmVkaXRvclN0cmluZ3MubmV4dF90aXRsZV9hdHRyXG4gICAgICAgICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICAgICAgICBvbjoge1xuICAgICAgICAgICAgICAgICAgICAgICAgY2xpY2s6IGZ1bmN0aW9uKCRldmVudCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICBfdm0ubmV4dFN0cmluZygpXG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgICAgICBbXG4gICAgICAgICAgICAgICAgICAgICAgX3ZtLl92KF92bS5fcyhfdm0uZWRpdG9yU3RyaW5ncy5uZXh0KSArIFwiIFwiKSxcbiAgICAgICAgICAgICAgICAgICAgICBfYyhcInNwYW5cIiwgW192bS5fdihcIsK7XCIpXSlcbiAgICAgICAgICAgICAgICAgICAgXVxuICAgICAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgICAgIF0pLFxuICAgICAgICAgICAgICAgIF92bS5fdihcIiBcIiksXG4gICAgICAgICAgICAgICAgX2MoXCJkaXZcIiwgeyBhdHRyczogeyBpZDogXCJ0cnAtdmlldy1hc1wiIH0gfSwgW1xuICAgICAgICAgICAgICAgICAgX2MoXCJkaXZcIiwgeyBhdHRyczogeyBpZDogXCJ0cnAtdmlldy1hcy1kZXNjcmlwdGlvblwiIH0gfSwgW1xuICAgICAgICAgICAgICAgICAgICBfdm0uX3YoX3ZtLl9zKF92bS5lZGl0b3JTdHJpbmdzLnZpZXdfYXMpKVxuICAgICAgICAgICAgICAgICAgXSksXG4gICAgICAgICAgICAgICAgICBfdm0uX3YoXCIgXCIpLFxuICAgICAgICAgICAgICAgICAgX2MoXG4gICAgICAgICAgICAgICAgICAgIFwic2VsZWN0XCIsXG4gICAgICAgICAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICAgICAgICBkaXJlY3RpdmVzOiBbXG4gICAgICAgICAgICAgICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgIG5hbWU6IFwibW9kZWxcIixcbiAgICAgICAgICAgICAgICAgICAgICAgICAgcmF3TmFtZTogXCJ2LW1vZGVsXCIsXG4gICAgICAgICAgICAgICAgICAgICAgICAgIHZhbHVlOiBfdm0udmlld0FzLFxuICAgICAgICAgICAgICAgICAgICAgICAgICBleHByZXNzaW9uOiBcInZpZXdBc1wiXG4gICAgICAgICAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgICAgICAgICAgeyBuYW1lOiBcInNlbGVjdDJcIiwgcmF3TmFtZTogXCJ2LXNlbGVjdDJcIiB9XG4gICAgICAgICAgICAgICAgICAgICAgXSxcbiAgICAgICAgICAgICAgICAgICAgICBhdHRyczogeyBpZDogXCJ0cnAtdmlldy1hcy1zZWxlY3RcIiB9LFxuICAgICAgICAgICAgICAgICAgICAgIG9uOiB7XG4gICAgICAgICAgICAgICAgICAgICAgICBjaGFuZ2U6IGZ1bmN0aW9uKCRldmVudCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICB2YXIgJCRzZWxlY3RlZFZhbCA9IEFycmF5LnByb3RvdHlwZS5maWx0ZXJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAuY2FsbCgkZXZlbnQudGFyZ2V0Lm9wdGlvbnMsIGZ1bmN0aW9uKG8pIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBvLnNlbGVjdGVkXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSlcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAubWFwKGZ1bmN0aW9uKG8pIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhciB2YWwgPSBcIl92YWx1ZVwiIGluIG8gPyBvLl92YWx1ZSA6IG8udmFsdWVcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiB2YWxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KVxuICAgICAgICAgICAgICAgICAgICAgICAgICBfdm0udmlld0FzID0gJGV2ZW50LnRhcmdldC5tdWx0aXBsZVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgID8gJCRzZWxlY3RlZFZhbFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIDogJCRzZWxlY3RlZFZhbFswXVxuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICAgICAgX3ZtLl9sKF92bS5yb2xlcywgZnVuY3Rpb24ocm9sZSwgcm9sZUluZGV4KSB7XG4gICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIF9jKFxuICAgICAgICAgICAgICAgICAgICAgICAgXCJvcHRpb25cIixcbiAgICAgICAgICAgICAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgYXR0cnM6IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBkaXNhYmxlZDogIXJvbGUsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdGl0bGU6ICFyb2xlID8gX3ZtLmVkaXRvclN0cmluZ3Mudmlld19hc19wcm8gOiBcIlwiXG4gICAgICAgICAgICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgICAgICAgICAgICAgIGRvbVByb3BzOiB7IHZhbHVlOiByb2xlIH1cbiAgICAgICAgICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgICAgICAgICAgICBbX3ZtLl92KF92bS5fcyhyb2xlSW5kZXgpKV1cbiAgICAgICAgICAgICAgICAgICAgICApXG4gICAgICAgICAgICAgICAgICAgIH0pLFxuICAgICAgICAgICAgICAgICAgICAwXG4gICAgICAgICAgICAgICAgICApXG4gICAgICAgICAgICAgICAgXSlcbiAgICAgICAgICAgICAgXSlcbiAgICAgICAgICAgIF0pLFxuICAgICAgICAgICAgX3ZtLl92KFwiIFwiKSxcbiAgICAgICAgICAgIF9jKFxuICAgICAgICAgICAgICBcImRpdlwiLFxuICAgICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgZGlyZWN0aXZlczogW1xuICAgICAgICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgICAgICBuYW1lOiBcInNob3dcIixcbiAgICAgICAgICAgICAgICAgICAgcmF3TmFtZTogXCJ2LXNob3dcIixcbiAgICAgICAgICAgICAgICAgICAgdmFsdWU6IF92bS5zZWxlY3RlZFN0cmluZyAhPT0gbnVsbCxcbiAgICAgICAgICAgICAgICAgICAgZXhwcmVzc2lvbjogXCJzZWxlY3RlZFN0cmluZyAhPT0gbnVsbFwiXG4gICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgXSxcbiAgICAgICAgICAgICAgICBzdGF0aWNDbGFzczogXCJ0cnAtY29udHJvbHMtc2VjdGlvblwiXG4gICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgIFtcbiAgICAgICAgICAgICAgICBfYyhcImxhbmd1YWdlLWJveGVzXCIsIHtcbiAgICAgICAgICAgICAgICAgIGF0dHJzOiB7XG4gICAgICAgICAgICAgICAgICAgIHNlbGVjdGVkSW5kZXhlc0FycmF5OiBfdm0uc2VsZWN0ZWRJbmRleGVzQXJyYXksXG4gICAgICAgICAgICAgICAgICAgIGRpY3Rpb25hcnk6IF92bS5kaWN0aW9uYXJ5LFxuICAgICAgICAgICAgICAgICAgICBjdXJyZW50TGFuZ3VhZ2U6IF92bS5jdXJyZW50TGFuZ3VhZ2UsXG4gICAgICAgICAgICAgICAgICAgIG9uU2NyZWVuTGFuZ3VhZ2U6IF92bS5vblNjcmVlbkxhbmd1YWdlLFxuICAgICAgICAgICAgICAgICAgICBsYW5ndWFnZU5hbWVzOiBfdm0ubGFuZ3VhZ2VOYW1lcyxcbiAgICAgICAgICAgICAgICAgICAgc2V0dGluZ3M6IF92bS5zZXR0aW5ncyxcbiAgICAgICAgICAgICAgICAgICAgc2hvd0NoYW5nZXNVbnNhdmVkTWVzc2FnZTogX3ZtLnNob3dDaGFuZ2VzVW5zYXZlZE1lc3NhZ2UsXG4gICAgICAgICAgICAgICAgICAgIGVkaXRvclN0cmluZ3M6IF92bS5lZGl0b3JTdHJpbmdzLFxuICAgICAgICAgICAgICAgICAgICBmbGFnc1BhdGg6IF92bS5mbGFnc1BhdGgsXG4gICAgICAgICAgICAgICAgICAgIGlmcmFtZTogX3ZtLmlmcmFtZVxuICAgICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICAgIG9uOiB7XG4gICAgICAgICAgICAgICAgICAgIFwiZGlzY2FyZGVkLWNoYW5nZXNcIjogZnVuY3Rpb24oJGV2ZW50KSB7XG4gICAgICAgICAgICAgICAgICAgICAgX3ZtLmhhc1Vuc2F2ZWRDaGFuZ2VzKClcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH0pXG4gICAgICAgICAgICAgIF0sXG4gICAgICAgICAgICAgIDFcbiAgICAgICAgICAgICksXG4gICAgICAgICAgICBfdm0uX3YoXCIgXCIpLFxuICAgICAgICAgICAgX2MoXCJleHRyYS1jb250ZW50XCIsIHtcbiAgICAgICAgICAgICAgYXR0cnM6IHtcbiAgICAgICAgICAgICAgICBsYW5ndWFnZU5hbWVzOiBfdm0ubGFuZ3VhZ2VOYW1lcyxcbiAgICAgICAgICAgICAgICBlZGl0b3JTdHJpbmdzOiBfdm0uZWRpdG9yU3RyaW5ncyxcbiAgICAgICAgICAgICAgICBwYWlkVmVyc2lvbjogX3ZtLnBhaWRfdmVyc2lvblxuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9KSxcbiAgICAgICAgICAgIF92bS5fdihcIiBcIiksXG4gICAgICAgICAgICBfYyhcbiAgICAgICAgICAgICAgXCJkaXZcIixcbiAgICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgIGRpcmVjdGl2ZXM6IFtcbiAgICAgICAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICAgICAgbmFtZTogXCJzaG93XCIsXG4gICAgICAgICAgICAgICAgICAgIHJhd05hbWU6IFwidi1zaG93XCIsXG4gICAgICAgICAgICAgICAgICAgIHZhbHVlOiBfdm0udHJhbnNsYXRpb25Ob3RMb2FkZWRZZXQsXG4gICAgICAgICAgICAgICAgICAgIGV4cHJlc3Npb246IFwidHJhbnNsYXRpb25Ob3RMb2FkZWRZZXRcIlxuICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIF0sXG4gICAgICAgICAgICAgICAgc3RhdGljQ2xhc3M6IFwidHJwLWNvbnRyb2xzLXNlY3Rpb25cIlxuICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICBbXG4gICAgICAgICAgICAgICAgX2MoXG4gICAgICAgICAgICAgICAgICBcImRpdlwiLFxuICAgICAgICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgICAgICBzdGF0aWNDbGFzczogXCJ0cnAtY29udHJvbHMtc2VjdGlvbi1jb250ZW50XCIsXG4gICAgICAgICAgICAgICAgICAgIGF0dHJzOiB7IGlkOiBcInRycC10cmFuc2xhdGlvbi1ub3QtcmVhZHktc2VjdGlvblwiIH1cbiAgICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgICAgICBbXG4gICAgICAgICAgICAgICAgICAgIF9jKFwicFwiLCB7XG4gICAgICAgICAgICAgICAgICAgICAgZG9tUHJvcHM6IHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlubmVySFRNTDogX3ZtLl9zKFxuICAgICAgICAgICAgICAgICAgICAgICAgICBfdm0uZWRpdG9yU3RyaW5ncy50cmFuc2xhdGlvbl9ub3RfbG9hZGVkX3lldFxuICAgICAgICAgICAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgfSlcbiAgICAgICAgICAgICAgICAgIF1cbiAgICAgICAgICAgICAgICApXG4gICAgICAgICAgICAgIF1cbiAgICAgICAgICAgIClcbiAgICAgICAgICBdLFxuICAgICAgICAgIDFcbiAgICAgICAgKSxcbiAgICAgICAgX3ZtLl92KFwiIFwiKSxcbiAgICAgICAgX2MoXCJkaXZcIiwgeyBhdHRyczogeyBpZDogXCJ0cnBfc2VsZWN0Ml9v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cbiAgICAgIF9jKFwiZGl2XCIsIHsgYXR0cnM6IHsgaWQ6IFwidHJwLXByZXZpZXctbG9hZGVyXCIgfSB9LCBbXG4gICAgICAgIF9jKFxuICAgICAgICAgIFwic3ZnXCIsXG4gICAgICAgICAge1xuICAgICAgICAgICAgc3RhdGljQ2xhc3M6IFwidHJwLWxvYWRlclwiLFxuICAgICAgICAgICAgYXR0cnM6IHtcbiAgICAgICAgICAgICAgd2lkdGg6IFwiNjVweFwiLFxuICAgICAgICAgICAgICBoZWlnaHQ6IFwiNjVweFwiLFxuICAgICAgICAgICAgICB2aWV3Qm94OiBcIjAgMCA2NiA2NlwiLFxuICAgICAgICAgICAgICB4bWxuczogXCJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2Z1wiXG4gICAgICAgICAgICB9XG4gICAgICAgICAgfSxcbiAgICAgICAgICBbXG4gICAgICAgICAgICBfYyhcImNpcmNsZVwiLCB7XG4gICAgICAgICAgICAgIHN0YXRpY0NsYXNzOiBcInRycC1jaXJjbGVcIixcbiAgICAgICAgICAgICAgYXR0cnM6IHtcbiAgICAgICAgICAgICAgICBmaWxsOiBcIm5vbmVcIixcbiAgICAgICAgICAgICAgICBcInN0cm9rZS13aWR0aFwiOiBcIjZcIixcbiAgICAgICAgICAgICAgICBcInN0cm9rZS1saW5lY2FwXCI6IFwicm91bmRcIixcbiAgICAgICAgICAgICAgICBjeDogXCIzM1wiLFxuICAgICAgICAgICAgICAgIGN5OiBcIjMzXCIsXG4gICAgICAgICAgICAgICAgcjogXCIzMFwiXG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0pXG4gICAgICAgICAgXVxuICAgICAgICApXG4gICAgICBdKVxuICAgIF0pXG4gIF0pXG59XG52YXIgc3RhdGljUmVuZGVyRm5zID0gW11cbnJlbmRlci5fd2l0aFN0cmlwcGVkID0gdHJ1ZVxuXG5leHBvcnQgeyByZW5kZXIsIHN0YXRpY1JlbmRlckZucyB9Il0sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./node_modules/vue-loader/lib/loaders/templateLoader.js?!./node_modules/vue-loader/lib/index.js?!./assets/src/js/editor.vue?vue&type=template&id=b046e8ec&\n");
857
 
858
  /***/ }),
859
 
assets/js/trp-iframe-preview-script.js CHANGED
@@ -9,10 +9,10 @@ function TRP_Iframe_Preview(){
9
  * Add GET preview parameter for links and forms.
10
  */
11
  this.initialize = function() {
12
- if( !trpTranslator )
13
- return;
 
14
 
15
- trpTranslator.pause_observer();
16
  jQuery('a').each(function () {
17
  // target parent brakes from the iframe so we're changing to self.
18
  // We cannot remove it because we need it in Translation blocks
@@ -46,7 +46,9 @@ function TRP_Iframe_Preview(){
46
  });
47
 
48
  addKeyboardShortcutsListener();
49
- trpTranslator.resume_observer();
 
 
50
  };
51
 
52
  function addKeyboardShortcutsListener(){
9
  * Add GET preview parameter for links and forms.
10
  */
11
  this.initialize = function() {
12
+ if( typeof trpTranslator !== 'undefined' ) {
13
+ trpTranslator.pause_observer();
14
+ }
15
 
 
16
  jQuery('a').each(function () {
17
  // target parent brakes from the iframe so we're changing to self.
18
  // We cannot remove it because we need it in Translation blocks
46
  });
47
 
48
  addKeyboardShortcutsListener();
49
+ if( typeof trpTranslator !== 'undefined' ) {
50
+ trpTranslator.resume_observer();
51
+ }
52
  };
53
 
54
  function addKeyboardShortcutsListener(){
assets/js/trp-translate-dom-changes.js CHANGED
@@ -387,6 +387,9 @@ function TRP_Translator(){
387
  */
388
  this.initialize = function() {
389
  this.is_editor = (typeof window.parent.tpEditorApp !== 'undefined' )
 
 
 
390
 
391
  current_language = trp_data.trp_current_language;
392
  original_language = trp_data.trp_original_language;
387
  */
388
  this.initialize = function() {
389
  this.is_editor = (typeof window.parent.tpEditorApp !== 'undefined' )
390
+ if ( this.is_editor ) {
391
+ trp_data['gettranslationsnonceregular'] = window.parent.trp_dynamic_nonce;
392
+ }
393
 
394
  current_language = trp_data.trp_current_language;
395
  original_language = trp_data.trp_original_language;
class-translate-press.php CHANGED
@@ -46,7 +46,7 @@ class TRP_Translate_Press{
46
  define( 'TRP_PLUGIN_URL', plugin_dir_url( __FILE__ ) );
47
  define( 'TRP_PLUGIN_BASE', plugin_basename( __DIR__ . '/index.php' ) );
48
  define( 'TRP_PLUGIN_SLUG', 'translatepress-multilingual' );
49
- define( 'TRP_PLUGIN_VERSION', '1.5.0' );
50
 
51
  wp_cache_add_non_persistent_groups(array('trp'));
52
 
46
  define( 'TRP_PLUGIN_URL', plugin_dir_url( __FILE__ ) );
47
  define( 'TRP_PLUGIN_BASE', plugin_basename( __DIR__ . '/index.php' ) );
48
  define( 'TRP_PLUGIN_SLUG', 'translatepress-multilingual' );
49
+ define( 'TRP_PLUGIN_VERSION', '1.5.1' );
50
 
51
  wp_cache_add_non_persistent_groups(array('trp'));
52
 
includes/class-edd-sl-plugin-updater.php CHANGED
@@ -613,6 +613,11 @@ class TRP_Plugin_Updater{
613
 
614
  }
615
  }
 
 
 
 
 
616
 
617
  return $transient_data;
618
  }
613
 
614
  }
615
  }
616
+ else{
617
+ //we need to throw a notice if we have a pro addon active and no license entered
618
+ $license_information_for_all_addons['invalid'][] = (object) array( 'error' => 'missing' );
619
+ $this->update_option('trp_license_details', $license_information_for_all_addons);
620
+ }
621
 
622
  return $transient_data;
623
  }
includes/class-plugin-notices.php CHANGED
@@ -322,7 +322,7 @@ class TRP_Trigger_Plugin_Notifications{
322
  $notification_id = 'trp_new_add_on_invoices';
323
 
324
  $message = '<img style="float: left; margin: 10px 12px 10px 0; max-width: 80px;" src="' . TRP_PLUGIN_URL . 'assets/images/get_param_addon.jpg" />';
325
- $message .= '<p style="margin-top: 16px;padding-right:30px;">' . sprintf( __('You are not using a permalink structure! Please <a href="%s">enable</a> one or install our <a href="%s">"Language by GET parameter"</a> addon so TranslatePress can function properly.', 'translatepress-multilingual' ), admin_url('options-permalink.php'),admin_url('admin.php?page=trp_addons_page#language-by-get-parameter') ) . '</p>';
326
  //make sure to use the trp_dismiss_admin_notification arg
327
  $message .= '<a href="' . add_query_arg(array('trp_dismiss_admin_notification' => $notification_id)) . '" type="button" class="notice-dismiss"><span class="screen-reader-text">' . __('Dismiss this notice.', 'translatepress-multilingual') . '</span></a>';
328
 
@@ -343,9 +343,9 @@ class TRP_Trigger_Plugin_Notifications{
343
  $notification_id = 'trp_invalid_license';
344
  $message = '<p style="padding-right:30px;">';
345
  if( $license_detail->error == 'missing' )
346
- $message .= sprintf( __('<p>Your <strong>TranslatePress</strong> serial number is invalid or missing. <br/>Please %1$sregister your copy%2$s to receive access to automatic updates and support. Need a license key? %3$sPurchase one now%4$s</p>' , 'translatepress-multilingual' ), "<a href='". admin_url('/admin.php?page=trp_license_key') ."'>", "</a>", "<a href='https://translatepress.com/pricing/?utm_source=TP&utm_medium=dashboard&utm_campaign=TP-SN-Purchase' target='_blank' class='button-primary'>", "</a>" );
347
  elseif($license_detail->error == 'expired')
348
- $message .= sprintf( __('<p>Your <strong>TranslatePress</strong> license has expired. <br/>Please %1$sRenew Your Licence%2$s to continue receiving access to product downloads, automatic updates and support. %3$sRenew now %4$s</p>' , 'translatepress-multilingual' ), "<a href='https://www.translatepress.com/account/?utm_source=TP&utm_medium=dashboard&utm_campaign=TP-Renewal' target='_blank'>", "</a>", "<a href='https://www.translatepress.com/account/?utm_source=TP&utm_medium=dashboard&utm_campaign=TP-Renewal' target='_blank' class='button-primary'>", "</a>" );
349
  $message .= '</p>';
350
 
351
  if( !$notifications->is_plugin_page() ) {
322
  $notification_id = 'trp_new_add_on_invoices';
323
 
324
  $message = '<img style="float: left; margin: 10px 12px 10px 0; max-width: 80px;" src="' . TRP_PLUGIN_URL . 'assets/images/get_param_addon.jpg" />';
325
+ $message .= '<p style="margin-top: 16px;padding-right:30px;">' . sprintf( __('You are not using a permalink structure! Please <a href="%s">enable</a> one or install our <a href="%s">"Language by GET parameter"</a> addon, so that TranslatePress can function properly.', 'translatepress-multilingual' ), admin_url('options-permalink.php'),admin_url('admin.php?page=trp_addons_page#language-by-get-parameter') ) . '</p>';
326
  //make sure to use the trp_dismiss_admin_notification arg
327
  $message .= '<a href="' . add_query_arg(array('trp_dismiss_admin_notification' => $notification_id)) . '" type="button" class="notice-dismiss"><span class="screen-reader-text">' . __('Dismiss this notice.', 'translatepress-multilingual') . '</span></a>';
328
 
343
  $notification_id = 'trp_invalid_license';
344
  $message = '<p style="padding-right:30px;">';
345
  if( $license_detail->error == 'missing' )
346
+ $message .= '<p>'. sprintf( __('Your <strong>TranslatePress</strong> serial number is invalid or missing. <br/>Please %1$sregister your copy%2$s to receive access to automatic updates and support. Need a license key? %3$sPurchase one now%4$s' , 'translatepress-multilingual' ), "<a href='". admin_url('/admin.php?page=trp_license_key') ."'>", "</a>", "<a href='https://translatepress.com/pricing/?utm_source=TP&utm_medium=dashboard&utm_campaign=TP-SN-Purchase' target='_blank' class='button-primary'>", "</a>" ).'</p>';
347
  elseif($license_detail->error == 'expired')
348
+ $message .= '<p>'. sprintf( __('Your <strong>TranslatePress</strong> license has expired. <br/>Please %1$sRenew Your Licence%2$s to continue receiving access to product downloads, automatic updates and support. %3$sRenew now %4$s' , 'translatepress-multilingual' ), "<a href='https://www.translatepress.com/account/?utm_source=TP&utm_medium=dashboard&utm_campaign=TP-Renewal' target='_blank'>", "</a>", "<a href='https://www.translatepress.com/account/?utm_source=TP&utm_medium=dashboard&utm_campaign=TP-Renewal' target='_blank' class='button-primary'>", "</a>" ). '</p>';
349
  $message .= '</p>';
350
 
351
  if( !$notifications->is_plugin_page() ) {
includes/class-settings.php CHANGED
@@ -304,7 +304,7 @@ class TRP_Settings{
304
  }
305
  $all_language_codes = $this->trp_languages->get_all_language_codes();
306
  $iso_codes = $this->trp_languages->get_iso_codes( $all_language_codes, false );
307
- wp_localize_script( 'trp-settings-script', 'trp_url_slugs_info', array( 'iso_codes' => $iso_codes, 'error_message_duplicate_slugs' => __( 'Error! Duplicate Url slug values.', 'translatepress-multilingual' ) ) );
308
 
309
  wp_enqueue_script( 'trp-select2-lib-js', TRP_PLUGIN_URL . 'assets/lib/select2-lib/dist/js/select2.min.js', array( 'jquery' ), TRP_PLUGIN_VERSION );
310
  wp_enqueue_style( 'trp-select2-lib-css', TRP_PLUGIN_URL . 'assets/lib/select2-lib/dist/css/select2.min.css', array(), TRP_PLUGIN_VERSION );
304
  }
305
  $all_language_codes = $this->trp_languages->get_all_language_codes();
306
  $iso_codes = $this->trp_languages->get_iso_codes( $all_language_codes, false );
307
+ wp_localize_script( 'trp-settings-script', 'trp_url_slugs_info', array( 'iso_codes' => $iso_codes, 'error_message_duplicate_slugs' => __( 'Error! Duplicate URL slug values.', 'translatepress-multilingual' ) ) );
308
 
309
  wp_enqueue_script( 'trp-select2-lib-js', TRP_PLUGIN_URL . 'assets/lib/select2-lib/dist/js/select2.min.js', array( 'jquery' ), TRP_PLUGIN_VERSION );
310
  wp_enqueue_style( 'trp-select2-lib-css', TRP_PLUGIN_URL . 'assets/lib/select2-lib/dist/css/select2.min.css', array(), TRP_PLUGIN_VERSION );
includes/class-translation-manager.php CHANGED
@@ -121,7 +121,7 @@ class TRP_Translation_Manager{
121
  'discard_all_title_attr' => esc_attr__( 'Discard all changes. Shortcut: CTRL(⌘) + ALT + Z', 'translatepress-multilingual' ),
122
  'discard_individual_changes_title_attribute' => esc_attr__( 'Discard changes to this text box. To discard changes to all text boxes use shortcut: CTRL(⌘) + ALT + Z', 'translatepress-multilingual' ),
123
 
124
- 'split_confirmation' => esc_js( __( 'Are you sure you want to split this phrase into smaller pieces?', 'translatepress-multilingual' ) ),
125
  'translation_not_loaded_yet' => wp_kses( __( 'This string is not ready for translation yet. <br>Try again in a moment...', 'translatepress-multilingual'), array( 'br' => array() ) ),
126
 
127
  'bor_update_notice' => esc_js( __( 'For this option to work, please update the Browse as other role add-on to the latest version.', 'translatepress-multilingual' ) ),
@@ -130,15 +130,15 @@ class TRP_Translation_Manager{
130
  //Notice when the user has not defined a secondary language
131
  'extra_lang_row1' => wp_kses( sprintf( __( 'You can add a new language from <a href="%s">Settings->TranslatePress</a>', 'translatepress-multilingual' ), esc_url( admin_url( 'options-general.php?page=translate-press' ) ) ), array( 'a' => ['href' => []] ) ),
132
  'extra_lang_row2' => wp_kses( __( 'However, you can still use TranslatePress to <strong style="background: #f5fb9d;">modify gettext strings</strong> available in your page.', 'translatepress-multilingual' ), array( 'strong' => ['style' => [] ] )),
133
- 'extra_lang_row3' => esc_html__( 'Strings that are user created can not be modified, only those from themes and plugins.', 'translatepress-multilingual' ),
134
  //Pro version upselling
135
  'extra_upsell_title' => esc_html__( 'Extra Translation Features', 'translatepress-multilingual' ),
136
  'extra_upsell_row1' => esc_html__( 'Support for 221 Extra Languages', 'translatepress-multilingual' ),
137
  'extra_upsell_row2' => esc_html__( 'Yoast SEO support', 'translatepress-multilingual' ),
138
  'extra_upsell_row3' => esc_html__( 'Translate SEO Title, Description, Slug', 'translatepress-multilingual' ),
139
- 'extra_upsell_row4' => esc_html__( 'Publish only when translation is done', 'translatepress-multilingual' ),
140
  'extra_upsell_row5' => esc_html__( 'Translate by Browsing as User Role', 'translatepress-multilingual' ),
141
- 'extra_upsell_row6' => esc_html__( 'Different Menus Items per Language', 'translatepress-multilingual' ),
142
  'extra_upsell_row7' => esc_html__( 'Automatic User Language Detection', 'translatepress-multilingual' ),
143
  'extra_upsell_row8' => esc_html__( 'Supported By Real People', 'translatepress-multilingual' ),
144
  'extra_upsell_button' => wp_kses( sprintf( '<a class="button-primary" target="_blank" href="%s">%s</a>', esc_url( trp_add_affiliate_id_to_link( 'https://translatepress.com/pricing/?utm_source=wpbackend&utm_medium=clientsite&utm_content=tpeditor&utm_campaign=tpfree' ) ), __( 'Find Out More', 'translatepress-multilingual' ) ), array( 'a' => ['class'=> [] , 'target'=> [],'href'=> []] ) )
@@ -152,7 +152,7 @@ class TRP_Translation_Manager{
152
  'stringlist' => esc_html__( 'String List', 'translatepress-multilingual' ),
153
  'gettextstrings' => esc_html__( 'Gettext Strings', 'translatepress-multilingual' ),
154
  'images' => esc_html__( 'Images', 'translatepress-multilingual' ),
155
- 'dynamicstrings' => esc_html__( 'Dynamic Added Strings', 'translatepress-multilingual' ),
156
  );
157
  return apply_filters( 'trp_string_groups', $string_groups );
158
  }
@@ -191,6 +191,11 @@ class TRP_Translation_Manager{
191
  wp_print_media_templates();
192
  restore_current_locale();
193
 
 
 
 
 
 
194
  $scripts_to_print = apply_filters( 'trp-scripts-for-editor', array( 'jquery', 'jquery-ui-core', 'jquery-effects-core', 'jquery-ui-resizable', 'trp-editor' ) );
195
  $styles_to_print = apply_filters( 'trp-styles-for-editor', array( 'dashicons', 'trp-editor-style','media-views', 'imgareaselect' /*'wp-admin', 'common', 'site-icon', 'buttons'*/ ) );
196
  wp_print_scripts( $scripts_to_print );
121
  'discard_all_title_attr' => esc_attr__( 'Discard all changes. Shortcut: CTRL(⌘) + ALT + Z', 'translatepress-multilingual' ),
122
  'discard_individual_changes_title_attribute' => esc_attr__( 'Discard changes to this text box. To discard changes to all text boxes use shortcut: CTRL(⌘) + ALT + Z', 'translatepress-multilingual' ),
123
 
124
+ 'split_confirmation' => esc_js( __( 'Are you sure you want to split this phrase into smaller parts?', 'translatepress-multilingual' ) ),
125
  'translation_not_loaded_yet' => wp_kses( __( 'This string is not ready for translation yet. <br>Try again in a moment...', 'translatepress-multilingual'), array( 'br' => array() ) ),
126
 
127
  'bor_update_notice' => esc_js( __( 'For this option to work, please update the Browse as other role add-on to the latest version.', 'translatepress-multilingual' ) ),
130
  //Notice when the user has not defined a secondary language
131
  'extra_lang_row1' => wp_kses( sprintf( __( 'You can add a new language from <a href="%s">Settings->TranslatePress</a>', 'translatepress-multilingual' ), esc_url( admin_url( 'options-general.php?page=translate-press' ) ) ), array( 'a' => ['href' => []] ) ),
132
  'extra_lang_row2' => wp_kses( __( 'However, you can still use TranslatePress to <strong style="background: #f5fb9d;">modify gettext strings</strong> available in your page.', 'translatepress-multilingual' ), array( 'strong' => ['style' => [] ] )),
133
+ 'extra_lang_row3' => esc_html__( 'Strings that are user-created cannot be modified, only those from themes and plugins.', 'translatepress-multilingual' ),
134
  //Pro version upselling
135
  'extra_upsell_title' => esc_html__( 'Extra Translation Features', 'translatepress-multilingual' ),
136
  'extra_upsell_row1' => esc_html__( 'Support for 221 Extra Languages', 'translatepress-multilingual' ),
137
  'extra_upsell_row2' => esc_html__( 'Yoast SEO support', 'translatepress-multilingual' ),
138
  'extra_upsell_row3' => esc_html__( 'Translate SEO Title, Description, Slug', 'translatepress-multilingual' ),
139
+ 'extra_upsell_row4' => esc_html__( 'Publish only when translation is complete', 'translatepress-multilingual' ),
140
  'extra_upsell_row5' => esc_html__( 'Translate by Browsing as User Role', 'translatepress-multilingual' ),
141
+ 'extra_upsell_row6' => esc_html__( 'Different Menu Items for each Language', 'translatepress-multilingual' ),
142
  'extra_upsell_row7' => esc_html__( 'Automatic User Language Detection', 'translatepress-multilingual' ),
143
  'extra_upsell_row8' => esc_html__( 'Supported By Real People', 'translatepress-multilingual' ),
144
  'extra_upsell_button' => wp_kses( sprintf( '<a class="button-primary" target="_blank" href="%s">%s</a>', esc_url( trp_add_affiliate_id_to_link( 'https://translatepress.com/pricing/?utm_source=wpbackend&utm_medium=clientsite&utm_content=tpeditor&utm_campaign=tpfree' ) ), __( 'Find Out More', 'translatepress-multilingual' ) ), array( 'a' => ['class'=> [] , 'target'=> [],'href'=> []] ) )
152
  'stringlist' => esc_html__( 'String List', 'translatepress-multilingual' ),
153
  'gettextstrings' => esc_html__( 'Gettext Strings', 'translatepress-multilingual' ),
154
  'images' => esc_html__( 'Images', 'translatepress-multilingual' ),
155
+ 'dynamicstrings' => esc_html__( 'Dynamically Added Strings', 'translatepress-multilingual' ),
156
  );
157
  return apply_filters( 'trp_string_groups', $string_groups );
158
  }
191
  wp_print_media_templates();
192
  restore_current_locale();
193
 
194
+ // Necessary for translate-dom-changes to have a nonce as the same user as the Editor.
195
+ // The Preview iframe (which loads translate-dom-changes script) can load as logged out which sets an different nonce
196
+ $nonces = $this->editor_nonces();
197
+ wp_add_inline_script('trp-editor', 'var trp_dynamic_nonce = "' . $nonces['gettranslationsnonceregular'] . '";');
198
+
199
  $scripts_to_print = apply_filters( 'trp-scripts-for-editor', array( 'jquery', 'jquery-ui-core', 'jquery-effects-core', 'jquery-ui-resizable', 'trp-editor' ) );
200
  $styles_to_print = apply_filters( 'trp-styles-for-editor', array( 'dashicons', 'trp-editor-style','media-views', 'imgareaselect' /*'wp-admin', 'common', 'site-icon', 'buttons'*/ ) );
201
  wp_print_scripts( $scripts_to_print );
includes/class-translation-render.php CHANGED
@@ -210,7 +210,7 @@ class TRP_Translation_Render{
210
  * @return string
211
  */
212
  public function trim_translation_block( $string ){
213
- return preg_replace('/\s+/', ' ', strip_tags( html_entity_decode( htmlspecialchars_decode( trp_full_trim( $string ), ENT_QUOTES ) ) ));
214
  }
215
 
216
  /**
@@ -586,7 +586,9 @@ class TRP_Translation_Render{
586
  $current_node_accessor_selector = $node_accessor['accessor'];
587
  $trimmed_string = trp_full_trim($row->$current_node_accessor_selector);
588
  if ( $current_node_accessor_selector === 'href' ) {
589
- $trimmed_string = ( $this->is_external_link( $trimmed_string, $home_url ) || $this->url_converter->url_is_file( $trimmed_string ) ) ? $trimmed_string : '';
 
 
590
  }
591
 
592
  if( $trimmed_string!=""
@@ -594,7 +596,8 @@ class TRP_Translation_Render{
594
  && !preg_match('/^\d+%$/',$trimmed_string)
595
  && !$this->has_ancestor_attribute( $row, $no_translate_attribute )
596
  && !$this->has_ancestor_attribute( $row, $no_translate_attribute . '-' . $current_node_accessor_selector )
597
- && !$this->has_ancestor_class( $row, 'translation-block') )
 
598
  {
599
  $entity_decoded_trimmed_string = html_entity_decode( $trimmed_string );
600
  array_push( $translateable_strings, $entity_decoded_trimmed_string );
@@ -630,18 +633,13 @@ class TRP_Translation_Render{
630
  if ( $translation_available && isset( $current_node_accessor ) && ! ( $preview_mode && ( $this->settings['default-language'] == $TRP_LANGUAGE ) ) ) {
631
 
632
  $translateable_string = $translateable_strings[$i];
633
- $alternate_translateable_string = htmlentities($translateable_strings[$i]);
634
 
635
  if ( $current_node_accessor[ 'attribute' ] ){
636
- if ( strpos ( $nodes[$i]['node']->getAttribute( $accessor ), $translateable_string ) === false ){
637
- $translateable_string = $alternate_translateable_string;
638
- }
639
  $nodes[$i]['node']->setAttribute( $accessor, str_replace( $translateable_string, esc_attr( $translated_strings[$i] ), $nodes[$i]['node']->getAttribute( $accessor ) ) );
640
  do_action( 'trp_set_translation_for_attribute', $nodes[$i]['node'], $accessor, $translated_strings[$i] );
641
  }else{
642
- if ( strpos ( $nodes[$i]['node']->$accessor, $translateable_string ) === false ){
643
- $translateable_string = $alternate_translateable_string;
644
- }
645
  $nodes[$i]['node']->$accessor = str_replace( $translateable_string, $translated_strings[$i], $nodes[$i]['node']->$accessor );
646
  }
647
 
@@ -748,6 +746,24 @@ class TRP_Translation_Render{
748
  return apply_filters( 'trp_translated_html', $final_html, $TRP_LANGUAGE, $language_code );
749
  }
750
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
751
  /*
752
  * Update other image attributes (srcset) with the translated image
753
  *
@@ -758,7 +774,13 @@ class TRP_Translation_Render{
758
  if ( $node->getAttribute( 'srcset' ) ) {
759
  $attachment_id = attachment_url_to_postid( $translated_string );
760
  if ( $attachment_id ) {
761
- $translated_srcset = wp_get_attachment_image_srcset( $attachment_id );
 
 
 
 
 
 
762
  if ( $translated_srcset ) {
763
  $node->setAttribute( 'srcset', $translated_srcset );
764
  } else {
@@ -1117,12 +1139,12 @@ class TRP_Translation_Render{
1117
  'attribute' => true
1118
  ),
1119
  'placeholder' => array(
1120
- 'selector' => 'input[type=\'text\'][placeholder],input[type=\'password\'][placeholder],input[type=\'search\'][placeholder],input[type=\'email\'][placeholder],input[placeholder]:not([type]),textarea[placeholder]',
1121
  'accessor' => 'placeholder',
1122
  'attribute' => true
1123
  ),
1124
  'title' => array(
1125
- 'selector' => '[title]:not(link)',
1126
  'accessor' => 'title',
1127
  'attribute' => true
1128
  ),
@@ -1247,15 +1269,19 @@ class TRP_Translation_Render{
1247
  * @return array
1248
  */
1249
  public function wp_mail_filter( $args ){
1250
- $trp_wp_mail = array(
1251
- 'to' => $args['to'],
1252
- 'subject' => $this->translate_page( do_shortcode( $args['subject'] ) ),
1253
- 'message' => $this->translate_page( do_shortcode( $args['message'] ) ),
1254
- 'headers' => $args['headers'],
1255
- 'attachments' => $args['attachments'],
1256
- );
 
 
 
 
1257
 
1258
- return $trp_wp_mail;
1259
  }
1260
 
1261
  /**
210
  * @return string
211
  */
212
  public function trim_translation_block( $string ){
213
+ return preg_replace('/\s+/', ' ', wp_strip_all_tags ( html_entity_decode( htmlspecialchars_decode( trp_full_trim( $string ), ENT_QUOTES ) ) ));
214
  }
215
 
216
  /**
586
  $current_node_accessor_selector = $node_accessor['accessor'];
587
  $trimmed_string = trp_full_trim($row->$current_node_accessor_selector);
588
  if ( $current_node_accessor_selector === 'href' ) {
589
+ $translate_href = ( $this->is_external_link( $trimmed_string, $home_url ) || $this->url_converter->url_is_file( $trimmed_string ) );
590
+ $translate_href = apply_filters( 'trp_translate_this_href', $translate_href, $row, $TRP_LANGUAGE );
591
+ $trimmed_string = ( $translate_href ) ? $trimmed_string : '';
592
  }
593
 
594
  if( $trimmed_string!=""
596
  && !preg_match('/^\d+%$/',$trimmed_string)
597
  && !$this->has_ancestor_attribute( $row, $no_translate_attribute )
598
  && !$this->has_ancestor_attribute( $row, $no_translate_attribute . '-' . $current_node_accessor_selector )
599
+ && !$this->has_ancestor_class( $row, 'translation-block')
600
+ && $row->tag != 'link' )
601
  {
602
  $entity_decoded_trimmed_string = html_entity_decode( $trimmed_string );
603
  array_push( $translateable_strings, $entity_decoded_trimmed_string );
633
  if ( $translation_available && isset( $current_node_accessor ) && ! ( $preview_mode && ( $this->settings['default-language'] == $TRP_LANGUAGE ) ) ) {
634
 
635
  $translateable_string = $translateable_strings[$i];
 
636
 
637
  if ( $current_node_accessor[ 'attribute' ] ){
638
+ $translateable_string = $this->maybe_correct_translatable_string( $translateable_string, $nodes[$i]['node']->getAttribute( $accessor ) );
 
 
639
  $nodes[$i]['node']->setAttribute( $accessor, str_replace( $translateable_string, esc_attr( $translated_strings[$i] ), $nodes[$i]['node']->getAttribute( $accessor ) ) );
640
  do_action( 'trp_set_translation_for_attribute', $nodes[$i]['node'], $accessor, $translated_strings[$i] );
641
  }else{
642
+ $translateable_string = $this->maybe_correct_translatable_string( $translateable_string, $nodes[$i]['node']->$accessor );
 
 
643
  $nodes[$i]['node']->$accessor = str_replace( $translateable_string, $translated_strings[$i], $nodes[$i]['node']->$accessor );
644
  }
645
 
746
  return apply_filters( 'trp_translated_html', $final_html, $TRP_LANGUAGE, $language_code );
747
  }
748
 
749
+ /*
750
+ * Adjust translatable string so that it must match the content of the node value
751
+ *
752
+ * We use str_replace method in order to preserve any existent spacing before or after the string.
753
+ * If the encoding of the node is not the same as the translatable string then the string won't match so try applying htmlentities.
754
+ * If that doesn't work either, just forget about any possible before and after spaces.
755
+ *
756
+ */
757
+ public function maybe_correct_translatable_string( $translatable_string, $node_value ){
758
+ if ( strpos ( $node_value, $translatable_string ) === false ){
759
+ $translatable_string = htmlentities( $translatable_string );
760
+ if ( strpos ( $node_value, $translatable_string ) === false ){
761
+ $translatable_string = $node_value;
762
+ }
763
+ }
764
+ return $translatable_string;
765
+ }
766
+
767
  /*
768
  * Update other image attributes (srcset) with the translated image
769
  *
774
  if ( $node->getAttribute( 'srcset' ) ) {
775
  $attachment_id = attachment_url_to_postid( $translated_string );
776
  if ( $attachment_id ) {
777
+ $translated_srcset = null;
778
+ if ( function_exists( 'wp_get_attachment_image_srcset' ) ) {
779
+ // get width of the image in order, to set the largest possible size for srcset
780
+ $meta_data = wp_get_attachment_metadata( $attachment_id );
781
+ $width = ( $meta_data && isset( $meta_data['width'] ) ) ? $meta_data['width'] : 'large';
782
+ $translated_srcset = wp_get_attachment_image_srcset( $attachment_id, $width );
783
+ }
784
  if ( $translated_srcset ) {
785
  $node->setAttribute( 'srcset', $translated_srcset );
786
  } else {
1139
  'attribute' => true
1140
  ),
1141
  'placeholder' => array(
1142
+ 'selector' => 'input[placeholder],textarea[placeholder]',
1143
  'accessor' => 'placeholder',
1144
  'attribute' => true
1145
  ),
1146
  'title' => array(
1147
+ 'selector' => '[title]',
1148
  'accessor' => 'title',
1149
  'attribute' => true
1150
  ),
1269
  * @return array
1270
  */
1271
  public function wp_mail_filter( $args ){
1272
+ if (!is_array($args)){
1273
+ return $args;
1274
+ }
1275
+
1276
+ if(array_key_exists('subject', $args)){
1277
+ $args['subject'] = $this->translate_page( do_shortcode( $args['subject'] ) );
1278
+ }
1279
+
1280
+ if(array_key_exists('message', $args)){
1281
+ $args['message'] = $this->translate_page( do_shortcode( $args['message'] ) );
1282
+ }
1283
 
1284
+ return $args;
1285
  }
1286
 
1287
  /**
includes/class-upgrade.php CHANGED
@@ -117,7 +117,7 @@ class TRP_Upgrade {
117
  // maybe change notice color to blue #28B1FF
118
  $html = '<div id="message" class="updated">';
119
  $html .= '<p><strong>' . esc_html__( 'TranslatePress data update', 'translatepress-multilingual' ) . '</strong> &#8211; ' . esc_html__( 'We need to update your translations database to the latest version.', 'translatepress-multilingual' ) . '</p>';
120
- $html .= '<p class="submit"><a href="' . esc_url( $url ) . '" onclick="return confirm( \'' . __( 'IMPORTANT: It is strongly recommended to backup the database first!\nAre you sure you want to continue?', 'translatepress-multilingual' ) . '\');" class="button-primary">' . esc_html__( 'Run the updater', 'translatepress-multilingual' ) . '</a></p>';
121
  $html .= '</div>';
122
  echo $html;
123
  }
@@ -153,7 +153,7 @@ class TRP_Upgrade {
153
  }
154
  }
155
  if ( empty ( $_REQUEST['trp_updb_action'] ) ){
156
- $back_to_settings_button = '<p><a href="' . site_url('wp-admin/options-general.php?page=translate-press') . '"> <input type="button" value="' . __('Back to TranslatePress Settings page', 'translatepress-multilingual' ) . '" class="button-primary"></a></p>';
157
  // finished successfully
158
  echo json_encode( array(
159
  'trp_update_completed' => 'yes',
@@ -246,7 +246,7 @@ class TRP_Upgrade {
246
  }
247
 
248
  public function stop_and_print_error( $error_message ){
249
- $back_to_settings_button = '<p><a href="' . site_url('wp-admin/options-general.php?page=translate-press') . '"> <input type="button" value="' . __('Back to TranslatePress Settings page', 'translatepress-multilingual' ) . '" class="button-primary"></a></p>';
250
  $query_arguments = array(
251
  'trp_update_completed' => 'yes',
252
  'progress_message' => '<p><strong>' . $error_message . '</strong></strong></p>' . $back_to_settings_button
@@ -332,12 +332,12 @@ class TRP_Upgrade {
332
  }
333
  if ( $_GET['trp_rm_duplicates'] === 'done' ){
334
  // iteration finished
335
- echo esc_html__('Done.', 'translatepress-multilingual' ) . '<br><br><a href="' . esc_url( site_url('wp-admin/options-general.php?page=translate-press') ) . '"> <input type="button" value="' . esc_attr__('Back to TranslatePress Settings page', 'translatepress-multilingual' ) . '" class="button-primary"></a>';
336
  return;
337
  }
338
  $nonce = wp_verify_nonce( $_GET['trp_rm_nonce'], 'tpremoveduplicaterows' );
339
  if ( $nonce === false ){
340
- echo esc_html__('Invalid nonce.', 'translatepress-multilingual' ) . '<br><br><a href="' . esc_url( site_url('wp-admin/options-general.php?page=translate-press') ) . '"> <input type="button" value="' . esc_attr__('Back to TranslatePress Settings page', 'translatepress-multilingual' ) . '" class="button-primary"></a>';
341
  return;
342
  }
343
 
117
  // maybe change notice color to blue #28B1FF
118
  $html = '<div id="message" class="updated">';
119
  $html .= '<p><strong>' . esc_html__( 'TranslatePress data update', 'translatepress-multilingual' ) . '</strong> &#8211; ' . esc_html__( 'We need to update your translations database to the latest version.', 'translatepress-multilingual' ) . '</p>';
120
+ $html .= '<p class="submit"><a href="' . esc_url( $url ) . '" onclick="return confirm( \'' . __( 'IMPORTANT: It is strongly recommended to first backup the database!\nAre you sure you want to continue?', 'translatepress-multilingual' ) . '\');" class="button-primary">' . esc_html__( 'Run the updater', 'translatepress-multilingual' ) . '</a></p>';
121
  $html .= '</div>';
122
  echo $html;
123
  }
153
  }
154
  }
155
  if ( empty ( $_REQUEST['trp_updb_action'] ) ){
156
+ $back_to_settings_button = '<p><a href="' . site_url('wp-admin/options-general.php?page=translate-press') . '"> <input type="button" value="' . __('Back to TranslatePress Settings', 'translatepress-multilingual' ) . '" class="button-primary"></a></p>';
157
  // finished successfully
158
  echo json_encode( array(
159
  'trp_update_completed' => 'yes',
246
  }
247
 
248
  public function stop_and_print_error( $error_message ){
249
+ $back_to_settings_button = '<p><a href="' . site_url('wp-admin/options-general.php?page=translate-press') . '"> <input type="button" value="' . __('Back to TranslatePress Settings', 'translatepress-multilingual' ) . '" class="button-primary"></a></p>';
250
  $query_arguments = array(
251
  'trp_update_completed' => 'yes',
252
  'progress_message' => '<p><strong>' . $error_message . '</strong></strong></p>' . $back_to_settings_button
332
  }
333
  if ( $_GET['trp_rm_duplicates'] === 'done' ){
334
  // iteration finished
335
+ echo esc_html__('Done.', 'translatepress-multilingual' ) . '<br><br><a href="' . esc_url( site_url('wp-admin/options-general.php?page=translate-press') ) . '"> <input type="button" value="' . esc_attr__('Back to TranslatePress Settings', 'translatepress-multilingual' ) . '" class="button-primary"></a>';
336
  return;
337
  }
338
  $nonce = wp_verify_nonce( $_GET['trp_rm_nonce'], 'tpremoveduplicaterows' );
339
  if ( $nonce === false ){
340
+ echo esc_html__('Invalid nonce.', 'translatepress-multilingual' ) . '<br><br><a href="' . esc_url( site_url('wp-admin/options-general.php?page=translate-press') ) . '"> <input type="button" value="' . esc_attr__('Back to TranslatePress Settings', 'translatepress-multilingual' ) . '" class="button-primary"></a>';
341
  return;
342
  }
343
 
includes/class-url-converter.php CHANGED
@@ -587,6 +587,11 @@ class TRP_Url_Converter {
587
  if( $TRP_LANGUAGE != $this->settings['default-language'] ) {
588
  if( trim($value['product_base'], '/') === trp_x( 'product', 'slug', 'woocommerce', $this->settings['default-language'] ) ){
589
  $value['product_base'] = '';
 
 
 
 
 
590
  }
591
 
592
  if( trim($value['category_base'], '/') === trp_x( 'product-category', 'slug', 'woocommerce', $this->settings['default-language'] ) ){
587
  if( $TRP_LANGUAGE != $this->settings['default-language'] ) {
588
  if( trim($value['product_base'], '/') === trp_x( 'product', 'slug', 'woocommerce', $this->settings['default-language'] ) ){
589
  $value['product_base'] = '';
590
+ }else{
591
+ // if the custom base permalink starts with product, WooCommerce will translate it when on other languages
592
+ if ( substr( $value['product_base'], 0, strlen('/product/' ) ) === '/product/' ) {
593
+ $value['product_base'] = substr_replace( $value['product_base'], '/' . trp_x( 'product', 'slug', 'woocommerce', $TRP_LANGUAGE ) . '/', 0, strlen('/product/' ) );
594
+ }
595
  }
596
 
597
  if( trim($value['category_base'], '/') === trp_x( 'product-category', 'slug', 'woocommerce', $this->settings['default-language'] ) ){
includes/functions.php CHANGED
@@ -699,3 +699,54 @@ function trp_woo_wrap_variation($name, $product, $title_base, $title_suffix){
699
  $separator = '<span> - </span>';
700
  return $title_suffix ? $title_base . $separator . $title_suffix : $title_base;
701
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
699
  $separator = '<span> - </span>';
700
  return $title_suffix ? $title_base . $separator . $title_suffix : $title_base;
701
  }
702
+
703
+
704
+ /**
705
+ * Compatibility with Query Monitor
706
+ *
707
+ * Remove their HTML and reappend it after translate_page function finishes
708
+ */
709
+ add_filter('trp_before_translate_content', 'trp_qm_strip_query_monitor_html', 10, 1 );
710
+ function trp_qm_strip_query_monitor_html( $output ) {
711
+
712
+ $query_monitor = apply_filters( 'trp_query_monitor_begining_string', '<!-- Begin Query Monitor output -->' );
713
+ $pos = strpos( $output, $query_monitor );
714
+
715
+ if ( $pos !== false ){
716
+ global $trp_query_monitor_string;
717
+ $trp_query_monitor_string = substr( $output, $pos );
718
+ $output = substr( $output, 0, $pos );
719
+
720
+ }
721
+
722
+ return $output;
723
+ }
724
+
725
+ add_filter( 'trp_translated_html', 'trp_qm_reappend_query_monitor_html', 10, 1 );
726
+ function trp_qm_reappend_query_monitor_html( $final_html ){
727
+ global $trp_query_monitor_string;
728
+
729
+ if ( isset( $trp_query_monitor_string ) && !empty( $trp_query_monitor_string ) ){
730
+ $final_html .= $trp_query_monitor_string;
731
+ }
732
+
733
+ return $final_html;
734
+ }
735
+
736
+ // trpgettext tags don't get escaped because they add <small> tags through a regex.
737
+ add_filter( 'qm/output/title', 'trp_qm_strip_gettext', 100);
738
+ function trp_qm_strip_gettext( $data ){
739
+ if ( is_array( $data ) ) {
740
+ foreach( $data as $key => $value ){
741
+ $data[$key] = trp_qm_strip_gettext($value);
742
+ }
743
+ }else {
744
+ // remove small tags
745
+ $data = preg_replace('(<(\/)?small>)', '', $data);
746
+ // strip gettext (not needed, they are just numbers shown in admin bar anyway)
747
+ $data = TRP_Translation_Manager::strip_gettext_tags( $data );
748
+ // add small tags back the same way they do it in the filter 'qm/output/title'
749
+ $data = preg_replace( '#\s?([^0-9,\.]+)#', '<small>$1</small>', $data );
750
+ }
751
+ return $data;
752
+ }
index.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: TranslatePress - Multilingual
4
  Plugin URI: https://translatepress.com/
5
  Description: Experience a better way of translating your WordPress site, with full support for WooCommerce and site builders.
6
- Version: 1.5.0
7
  Author: Cozmoslabs, Razvan Mocanu, Madalin Ungureanu, Cristophor Hurduban
8
  Author URI: https://cozmoslabs.com/
9
  Text Domain: translatepress-multilingual
@@ -59,5 +59,5 @@ function trp_run_translatepress_hooks(){
59
  }
60
 
61
  function trp_translatepress_disabled_notice(){
62
- echo '<div class="notice notice-error"><p>' . wp_kses( __( '<strong>TranslatePress</strong> requires at least PHP version 5.6.20+ to run. It is the <a href="https://wordpress.org/about/requirements/">minimum requirement of the latest WordPress version</a>. Please contact your server administrator to update your PHP version.','translatepress-multilingual' ), array( 'a' => array( 'href' => array() ), 'strong' => array() ) ) . '</p></div>';
63
  }
3
  Plugin Name: TranslatePress - Multilingual
4
  Plugin URI: https://translatepress.com/
5
  Description: Experience a better way of translating your WordPress site, with full support for WooCommerce and site builders.
6
+ Version: 1.5.1
7
  Author: Cozmoslabs, Razvan Mocanu, Madalin Ungureanu, Cristophor Hurduban
8
  Author URI: https://cozmoslabs.com/
9
  Text Domain: translatepress-multilingual
59
  }
60
 
61
  function trp_translatepress_disabled_notice(){
62
+ echo '<div class="notice notice-error"><p>' . wp_kses( sprintf( __( '<strong>TranslatePress</strong> requires at least PHP version 5.6.20+ to run. It is the <a href="%s">minimum requirement of the latest WordPress version</a>. Please contact your server administrator to update your PHP version.','translatepress-multilingual' ), 'https://wordpress.org/about/requirements/' ), array( 'a' => array( 'href' => array() ), 'strong' => array() ) ) . '</p></div>';
63
  }
languages/translatepress-multilingual.catalog.php CHANGED
@@ -1,13 +1,9 @@
1
  <?php __("", "translatepress-multilingual"); ?>
2
- <?php __("Error! Duplicate Url slug values.", "translatepress-multilingual"); ?>
3
- <?php __("Limit this menu item to the following languages", "translatepress-multilingual"); ?>
4
- <?php __("All Languages", "translatepress-multilingual"); ?>
5
- <?php __("The Yoast SEO Sitemaps will now contain the default language slug: example.com/en/sitemap_index.xml <br/> This works perfectly, just take it into account when you submit the sitemap to Google.", "translatepress-multilingual"); ?>
6
  <?php __("First by browser language, then IP address (recommended)", "translatepress-multilingual"); ?>
7
- <?php __("First by IP address, then browser language", "translatepress-multilingual"); ?>
8
  <?php __("Only by browser language", "translatepress-multilingual"); ?>
9
  <?php __("Only by IP address", "translatepress-multilingual"); ?>
10
- <?php __("<div class=\"warning\">WARNING. Cannot determine your language preference based on your current IP.<br>This is most likely because the website is on a local environment.</div>", "translatepress-multilingual"); ?>
11
  <?php __("TranslatePress Settings", "translatepress-multilingual"); ?>
12
  <?php __("License Key", "translatepress-multilingual"); ?>
13
  <?php __("Enter your license key.", "translatepress-multilingual"); ?>
@@ -15,6 +11,8 @@
15
  <?php __("Deactivate License", "translatepress-multilingual"); ?>
16
  <?php __("Method of language detection", "translatepress-multilingual"); ?>
17
  <?php __("Select how the language should be detected for first time visitors.<br>The visitor's last displayed language will be remembered through cookies.", "translatepress-multilingual"); ?>
 
 
18
  <?php __("Language", "translatepress-multilingual"); ?>
19
  <?php __("Code", "translatepress-multilingual"); ?>
20
  <?php __("Slug", "translatepress-multilingual"); ?>
@@ -24,6 +22,9 @@
24
  <?php __("Choose...", "translatepress-multilingual"); ?>
25
  <?php __("Add", "translatepress-multilingual"); ?>
26
  <?php __("Select the languages you wish to make your website available in.", "translatepress-multilingual"); ?>
 
 
 
27
  <?php __("An error occurred, please try again.", "translatepress-multilingual"); ?>
28
  <?php __("Your license key expired on %s.", "translatepress-multilingual"); ?>
29
  <?php __("Your license key has been disabled.", "translatepress-multilingual"); ?>
@@ -32,12 +33,13 @@
32
  <?php __("This appears to be an invalid license key for %s.", "translatepress-multilingual"); ?>
33
  <?php __("Your license key has reached its activation limit.", "translatepress-multilingual"); ?>
34
  <?php __("You have successfully activated your license", "translatepress-multilingual"); ?>
35
- <?php __("You are not using a permalink structure! Please <a href=\"%s\">enable</a> one or install our <a href=\"%s\">\"Language by GET parameter\"</a> addon so TranslatePress can function properly.", "translatepress-multilingual"); ?>
 
36
  <?php __("Dismiss this notice.", "translatepress-multilingual"); ?>
37
- <?php __("<p>Your <strong>TranslatePress</strong> serial number is invalid or missing. <br/>Please %1$sregister your copy%2$s to receive access to automatic updates and support. Need a license key? %3$sPurchase one now%4$s</p>", "translatepress-multilingual"); ?>
38
- <?php __("<p>Your <strong>TranslatePress</strong> license has expired. <br/>Please %1$sRenew Your Licence%2$s to continue receiving access to product downloads, automatic updates and support. %3$sRenew now %4$s</p>", "translatepress-multilingual"); ?>
39
  <?php __("Your <strong>TranslatePress</strong> license will expire on %1$s. Please %2$sRenew Your Licence%3$s to continue receiving access to product downloads, automatic updates and support.", "translatepress-multilingual"); ?>
40
- <?php __("Redirect users to their preferred language based on their browser language or IP address using our new <a href=\"https://translatepress.com/docs/addons/automatic-user-language-detection/\" >Automatic User Language Detection Add-on</a>.", "translatepress-multilingual"); ?>
41
  <?php __("Full Language Names", "translatepress-multilingual"); ?>
42
  <?php __("Short Language Names", "translatepress-multilingual"); ?>
43
  <?php __("Flags with Full Language Names", "translatepress-multilingual"); ?>
@@ -50,14 +52,63 @@
50
  <?php __("License", "translatepress-multilingual"); ?>
51
  <?php __("Settings", "translatepress-multilingual"); ?>
52
  <?php __("Pro Features", "translatepress-multilingual"); ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
53
  <?php __("Translate", "translatepress-multilingual"); ?>
54
  <?php __("Translate entire block element", "translatepress-multilingual"); ?>
55
  <?php __("Split block to translate strings individually", "translatepress-multilingual"); ?>
56
- <?php __("Translation block", "translatepress-multilingual"); ?>
57
- <?php __("Are you sure you want to split this phrase into smaller pieces?", "translatepress-multilingual"); ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
58
  <?php __("Meta Information", "translatepress-multilingual"); ?>
59
  <?php __("String List", "translatepress-multilingual"); ?>
60
- <?php __("Dynamic Added Strings", "translatepress-multilingual"); ?>
 
 
61
  <?php __("Translate Page", "translatepress-multilingual"); ?>
62
  <?php __("Security check", "translatepress-multilingual"); ?>
63
  <?php __("<strong>Warning:</strong> Some strings have possibly incorrectly encoded characters. This may result in breaking the queries, rendering the page untranslated in live mode. Consider revising the following strings or their method of outputting.", "translatepress-multilingual"); ?>
@@ -67,15 +118,14 @@
67
  <?php __("OG Description", "translatepress-multilingual"); ?>
68
  <?php __("Twitter Title", "translatepress-multilingual"); ?>
69
  <?php __("Twitter Description", "translatepress-multilingual"); ?>
70
- <?php __("Post Slug", "translatepress-multilingual"); ?>
71
  <?php __("Page Title", "translatepress-multilingual"); ?>
72
  <?php __("TranslatePress data update", "translatepress-multilingual"); ?>
73
  <?php __("We need to update your translations database to the latest version.", "translatepress-multilingual"); ?>
74
- <?php __("IMPORTANT: It is strongly recommended to backup the database first!\nAre you sure you want to continue?", "translatepress-multilingual"); ?>
75
  <?php __("Run the updater", "translatepress-multilingual"); ?>
76
  <?php __("Update aborted! Your user account doesn't have the capability to perform database updates.", "translatepress-multilingual"); ?>
77
  <?php __("Update aborted! Invalid nonce.", "translatepress-multilingual"); ?>
78
- <?php __("Back to TranslatePress Settings page", "translatepress-multilingual"); ?>
79
  <?php __("Successfully updated database!", "translatepress-multilingual"); ?>
80
  <?php __("Updating database to version %s+", "translatepress-multilingual"); ?>
81
  <?php __("Processing table for language %s...", "translatepress-multilingual"); ?>
@@ -89,6 +139,20 @@
89
  <?php __("If the page does not redirect automatically", "translatepress-multilingual"); ?>
90
  <?php __("click here", "translatepress-multilingual"); ?>
91
  <?php __("<strong>TranslatePress</strong> requires <strong><a href=\"http://php.net/manual/en/book.mbstring.php\">Multibyte String PHP library</a></strong>. Please contact your server administrator to install it on your server.", "translatepress-multilingual"); ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
92
  <?php __("Active on this site", "translatepress-multilingual"); ?>
93
  <?php __("Your license is invalid", "translatepress-multilingual"); ?>
94
  <?php __("If you do not have any of the <a href=\"%s\">Advanced or Pro Addons</a> activated you do not need a license key", "translatepress-multilingual"); ?>
@@ -96,7 +160,7 @@
96
  <?php __("To add <strong>more then two languages</strong> and support for SEO Title, Description, Slug and more check out <a href=\"%s\" class=\"button button-primary\" target=\"_blank\" title=\"TranslatePress Pro\">TranslatePress PRO</a>", "translatepress-multilingual"); ?>
97
  <?php __("Not only you are getting extra features and premium support, you also help fund the future development of TranslatePress.", "translatepress-multilingual"); ?>
98
  <?php __("Default Language", "translatepress-multilingual"); ?>
99
- <?php __("Select the original language your website was written in. ", "translatepress-multilingual"); ?>
100
  <?php __("WARNING. Changing the default language will invalidate existing translations.", "translatepress-multilingual"); ?>
101
  <?php __("Even changing from en_US to en_GB, because they are treated as two different languages.", "translatepress-multilingual"); ?>
102
  <?php __("In most cases changing the default flag is all it is needed: ", "translatepress-multilingual"); ?>
@@ -104,9 +168,9 @@
104
  <?php __("Native language name", "translatepress-multilingual"); ?>
105
  <?php __("No", "translatepress-multilingual"); ?>
106
  <?php __("Yes", "translatepress-multilingual"); ?>
107
- <?php __("Select Yes if you want languages to display in their native names. Otherwise, they will be displayed in English.", "translatepress-multilingual"); ?>
108
- <?php __("Use subdirectory for default language", "translatepress-multilingual"); ?>
109
- <?php __("Select Yes if you want to add the subdirectory in the url for the default language.</br>By selecting Yes, the default language seen by website visitors will become the first one in the \"All Languages\" list.", "translatepress-multilingual"); ?>
110
  <?php __("Force language in custom links", "translatepress-multilingual"); ?>
111
  <?php __("Select Yes if you want to force custom links without language encoding to keep the currently selected language.", "translatepress-multilingual"); ?>
112
  <?php __("Google Translate", "translatepress-multilingual"); ?>
@@ -114,55 +178,28 @@
114
  <?php __("Google Translate API Key", "translatepress-multilingual"); ?>
115
  <?php __("Test API key", "translatepress-multilingual"); ?>
116
  <?php __("Visit <a href=\"https://cloud.google.com/docs/authentication/api-keys\" target=\"_blank\">this link</a> to see how you can set up an API key, <strong>control API costs</strong> and set HTTP referrer restrictions.", "translatepress-multilingual"); ?>
117
- <?php __("<br>Your HTTP referrer is: %s", "translatepress-multilingual"); ?>
118
  <?php __("Language Switcher", "translatepress-multilingual"); ?>
119
  <?php __("Shortcode ", "translatepress-multilingual"); ?>
120
  <?php __("Use shortcode on any page or widget.", "translatepress-multilingual"); ?>
121
  <?php __("Menu item", "translatepress-multilingual"); ?>
122
- <?php __("Go to %1$s Appearance -> Menus%2$s to add Language Switcher Languages in any menu.", "translatepress-multilingual"); ?>
123
  <?php __("Learn more in our documentation.", "translatepress-multilingual"); ?>
124
  <?php __("Floating language selection", "translatepress-multilingual"); ?>
125
- <?php __("Have a floating dropdown following the user on every page.", "translatepress-multilingual"); ?>
126
  <?php __("Google API Key from settings page:", "translatepress-multilingual"); ?>
127
  <?php __("HTTP Referrer:", "translatepress-multilingual"); ?>
128
  <?php __("Use this HTTP Referrer if you want to restrict usage of the API from Google Dashboard.", "translatepress-multilingual"); ?>
129
  <?php __("Response:", "translatepress-multilingual"); ?>
130
  <?php __("Response Body:", "translatepress-multilingual"); ?>
131
  <?php __("Entire Response From wp_remote_get():", "translatepress-multilingual"); ?>
132
- <?php __("Saved!", "translatepress-multilingual"); ?>
133
- <?php __("Save translation", "translatepress-multilingual"); ?>
134
- <?php __("Select string to translate...", "translatepress-multilingual"); ?>
135
- <?php __("Gettext strings", "translatepress-multilingual"); ?>
136
- <?php __("Previous", "translatepress-multilingual"); ?>
137
- <?php __("Next", "translatepress-multilingual"); ?>
138
- <?php __("View as", "translatepress-multilingual"); ?>
139
  <?php __("Current User", "translatepress-multilingual"); ?>
140
  <?php __("Logged Out", "translatepress-multilingual"); ?>
141
- <?php __("Available in our Pro Versions", "translatepress-multilingual"); ?>
142
- <?php __("You have unsaved changes!", "translatepress-multilingual"); ?>
143
- <?php __("Original String", "translatepress-multilingual"); ?>
144
- <?php __("To %s", "translatepress-multilingual"); ?>
145
- <?php __("From %s", "translatepress-multilingual"); ?>
146
- <?php __("Discard changes", "translatepress-multilingual"); ?>
147
- <?php __("Other languages", "translatepress-multilingual"); ?>
148
- <?php __("You can add a new language from <a href=\"%s\">Settings->TranslatePress</a>", "translatepress-multilingual"); ?>
149
- <?php __("However, you can still use TranslatePress to <strong style=\"background: #f5fb9d;\">modify gettext strings</strong> available in your page.", "translatepress-multilingual"); ?>
150
- <?php __("Strings that are user created can't be modified, only those from themes and plugins.", "translatepress-multilingual"); ?>
151
- <?php __("Extra Translation Features", "translatepress-multilingual"); ?>
152
- <?php __("Support for 221 Extra Languages", "translatepress-multilingual"); ?>
153
- <?php __("Yoast SEO support", "translatepress-multilingual"); ?>
154
- <?php __("Translate SEO Title, Description, Slug", "translatepress-multilingual"); ?>
155
- <?php __("Create Translator Accounts", "translatepress-multilingual"); ?>
156
- <?php __("Publish only when translation is done", "translatepress-multilingual"); ?>
157
- <?php __("Translate by Browsing as User Role", "translatepress-multilingual"); ?>
158
- <?php __("Different Menus Items per Language", "translatepress-multilingual"); ?>
159
- <?php __("Automatic User Language Detection", "translatepress-multilingual"); ?>
160
- <?php __("Supported By Real People", "translatepress-multilingual"); ?>
161
- <?php __("Find Out More", "translatepress-multilingual"); ?>
162
  <?php __("Remove duplicate rows from TranslatePress tables", "translatepress-multilingual"); ?>
163
- <?php __("<strong>IMPORTANT NOTE: Before performing this action it is strongly recommended to backup the database first.</strong><br><br>This feature can be used to cleanup duplicate entries in TranslatePress trp_dictionary tables. Such duplicates can appear in exceptional situations of unexpected behavior.", "translatepress-multilingual"); ?>
 
164
  <?php __("Batch size", "translatepress-multilingual"); ?>
165
- <?php __("The number of rows to check at once.<br>Choosing a smaller number helps solve the 502 error \"Page took too long to respond\" on large databases.<br>May take several minutes depending on the database size.", "translatepress-multilingual"); ?>
166
  <?php __("Remove duplicate rows", "translatepress-multilingual"); ?>
167
  <?php __("TranslatePress Database Updater", "translatepress-multilingual"); ?>
168
  <?php __("Updating TranslatePress tables", "translatepress-multilingual"); ?>
1
  <?php __("", "translatepress-multilingual"); ?>
 
 
 
 
2
  <?php __("First by browser language, then IP address (recommended)", "translatepress-multilingual"); ?>
3
+ <?php __("First by IP address, then by browser language", "translatepress-multilingual"); ?>
4
  <?php __("Only by browser language", "translatepress-multilingual"); ?>
5
  <?php __("Only by IP address", "translatepress-multilingual"); ?>
6
+ <?php __("WARNING. Cannot determine your language preference based on your current IP.<br>This is most likely because the website is on a local environment.", "translatepress-multilingual"); ?>
7
  <?php __("TranslatePress Settings", "translatepress-multilingual"); ?>
8
  <?php __("License Key", "translatepress-multilingual"); ?>
9
  <?php __("Enter your license key.", "translatepress-multilingual"); ?>
11
  <?php __("Deactivate License", "translatepress-multilingual"); ?>
12
  <?php __("Method of language detection", "translatepress-multilingual"); ?>
13
  <?php __("Select how the language should be detected for first time visitors.<br>The visitor's last displayed language will be remembered through cookies.", "translatepress-multilingual"); ?>
14
+ <?php __("Error! Duplicate URL slug values.", "translatepress-multilingual"); ?>
15
+ <?php __("All Languages", "translatepress-multilingual"); ?>
16
  <?php __("Language", "translatepress-multilingual"); ?>
17
  <?php __("Code", "translatepress-multilingual"); ?>
18
  <?php __("Slug", "translatepress-multilingual"); ?>
22
  <?php __("Choose...", "translatepress-multilingual"); ?>
23
  <?php __("Add", "translatepress-multilingual"); ?>
24
  <?php __("Select the languages you wish to make your website available in.", "translatepress-multilingual"); ?>
25
+ <?php __("Limit this menu item to the following languages", "translatepress-multilingual"); ?>
26
+ <?php __("The Yoast SEO Sitemaps will now contain the default language slug: example.com/en/sitemap_index.xml <br/> This works perfectly, just take it into account when submitting the sitemap to Google.", "translatepress-multilingual"); ?>
27
+ <?php __("Post Slug", "translatepress-multilingual"); ?>
28
  <?php __("An error occurred, please try again.", "translatepress-multilingual"); ?>
29
  <?php __("Your license key expired on %s.", "translatepress-multilingual"); ?>
30
  <?php __("Your license key has been disabled.", "translatepress-multilingual"); ?>
33
  <?php __("This appears to be an invalid license key for %s.", "translatepress-multilingual"); ?>
34
  <?php __("Your license key has reached its activation limit.", "translatepress-multilingual"); ?>
35
  <?php __("You have successfully activated your license", "translatepress-multilingual"); ?>
36
+ <?php __("Others", "translatepress-multilingual"); ?>
37
+ <?php __("You are not using a permalink structure! Please <a href=\"%s\">enable</a> one or install our <a href=\"%s\">\"Language by GET parameter\"</a> addon, so that TranslatePress can function properly.", "translatepress-multilingual"); ?>
38
  <?php __("Dismiss this notice.", "translatepress-multilingual"); ?>
39
+ <?php __("Your <strong>TranslatePress</strong> serial number is invalid or missing. <br/>Please %1$sregister your copy%2$s to receive access to automatic updates and support. Need a license key? %3$sPurchase one now%4$s", "translatepress-multilingual"); ?>
40
+ <?php __("Your <strong>TranslatePress</strong> license has expired. <br/>Please %1$sRenew Your Licence%2$s to continue receiving access to product downloads, automatic updates and support. %3$sRenew now %4$s", "translatepress-multilingual"); ?>
41
  <?php __("Your <strong>TranslatePress</strong> license will expire on %1$s. Please %2$sRenew Your Licence%3$s to continue receiving access to product downloads, automatic updates and support.", "translatepress-multilingual"); ?>
42
+ <?php __("NEW: Display different images based on language. Find out <a href=\"https://translatepress.com/docs/image-translation/\" >how to translate images, sliders and more</a> from the TranslatePress editor.", "translatepress-multilingual"); ?>
43
  <?php __("Full Language Names", "translatepress-multilingual"); ?>
44
  <?php __("Short Language Names", "translatepress-multilingual"); ?>
45
  <?php __("Flags with Full Language Names", "translatepress-multilingual"); ?>
52
  <?php __("License", "translatepress-multilingual"); ?>
53
  <?php __("Settings", "translatepress-multilingual"); ?>
54
  <?php __("Pro Features", "translatepress-multilingual"); ?>
55
+ <?php __("Image source", "translatepress-multilingual"); ?>
56
+ <?php __("Alt attribute", "translatepress-multilingual"); ?>
57
+ <?php __("Title attribute", "translatepress-multilingual"); ?>
58
+ <?php __("Anchor link", "translatepress-multilingual"); ?>
59
+ <?php __("Placeholder attribute", "translatepress-multilingual"); ?>
60
+ <?php __("Submit attribute", "translatepress-multilingual"); ?>
61
+ <?php __("Text", "translatepress-multilingual"); ?>
62
+ <?php __("Saved", "translatepress-multilingual"); ?>
63
+ <?php __("Save translation", "translatepress-multilingual"); ?>
64
+ <?php __("Saving translation...", "translatepress-multilingual"); ?>
65
+ <?php __("You have unsaved changes!", "translatepress-multilingual"); ?>
66
+ <?php __("Discard changes", "translatepress-multilingual"); ?>
67
+ <?php __("Discard All", "translatepress-multilingual"); ?>
68
+ <?php __("Loading Strings...", "translatepress-multilingual"); ?>
69
+ <?php __("Select string to translate...", "translatepress-multilingual"); ?>
70
+ <?php __("Close Editor", "translatepress-multilingual"); ?>
71
+ <?php __("From", "translatepress-multilingual"); ?>
72
+ <?php __("To", "translatepress-multilingual"); ?>
73
+ <?php __("Next", "translatepress-multilingual"); ?>
74
+ <?php __("Previous", "translatepress-multilingual"); ?>
75
+ <?php __("Add Media", "translatepress-multilingual"); ?>
76
+ <?php __("Other languages", "translatepress-multilingual"); ?>
77
+ <?php __("View As", "translatepress-multilingual"); ?>
78
+ <?php __("Available in our Pro Versions", "translatepress-multilingual"); ?>
79
+ <?php __("Select or Upload Media", "translatepress-multilingual"); ?>
80
+ <?php __("Use this media", "translatepress-multilingual"); ?>
81
  <?php __("Translate", "translatepress-multilingual"); ?>
82
  <?php __("Translate entire block element", "translatepress-multilingual"); ?>
83
  <?php __("Split block to translate strings individually", "translatepress-multilingual"); ?>
84
+ <?php __("Save changes to translation. Shortcut: CTRL(⌘) + S", "translatepress-multilingual"); ?>
85
+ <?php __("Navigate to next string in dropdown list. Shortcut: CTRL(⌘) + ALT + Right Arrow", "translatepress-multilingual"); ?>
86
+ <?php __("Navigate to previous string in dropdown list. Shortcut: CTRL(⌘) + ALT + Left Arrow", "translatepress-multilingual"); ?>
87
+ <?php __("Discard all changes. Shortcut: CTRL(⌘) + ALT + Z", "translatepress-multilingual"); ?>
88
+ <?php __("Discard changes to this text box. To discard changes to all text boxes use shortcut: CTRL(⌘) + ALT + Z", "translatepress-multilingual"); ?>
89
+ <?php __("Are you sure you want to split this phrase into smaller parts?", "translatepress-multilingual"); ?>
90
+ <?php __("This string is not ready for translation yet. <br>Try again in a moment...", "translatepress-multilingual"); ?>
91
+ <?php __("For this option to work, please update the Browse as other role add-on to the latest version.", "translatepress-multilingual"); ?>
92
+ <?php __("To translate slugs, please update the SEO Pack add-on to the latest version.", "translatepress-multilingual"); ?>
93
+ <?php __("You can add a new language from <a href=\"%s\">Settings->TranslatePress</a>", "translatepress-multilingual"); ?>
94
+ <?php __("However, you can still use TranslatePress to <strong style=\"background: #f5fb9d;\">modify gettext strings</strong> available in your page.", "translatepress-multilingual"); ?>
95
+ <?php __("Strings that are user-created cannot be modified, only those from themes and plugins.", "translatepress-multilingual"); ?>
96
+ <?php __("Extra Translation Features", "translatepress-multilingual"); ?>
97
+ <?php __("Support for 221 Extra Languages", "translatepress-multilingual"); ?>
98
+ <?php __("Yoast SEO support", "translatepress-multilingual"); ?>
99
+ <?php __("Translate SEO Title, Description, Slug", "translatepress-multilingual"); ?>
100
+ <?php __("Publish only when translation is complete", "translatepress-multilingual"); ?>
101
+ <?php __("Translate by Browsing as User Role", "translatepress-multilingual"); ?>
102
+ <?php __("Different Menu Items for each Language", "translatepress-multilingual"); ?>
103
+ <?php __("Automatic User Language Detection", "translatepress-multilingual"); ?>
104
+ <?php __("Supported By Real People", "translatepress-multilingual"); ?>
105
+ <?php __("Find Out More", "translatepress-multilingual"); ?>
106
+ <?php __("Slugs", "translatepress-multilingual"); ?>
107
  <?php __("Meta Information", "translatepress-multilingual"); ?>
108
  <?php __("String List", "translatepress-multilingual"); ?>
109
+ <?php __("Gettext Strings", "translatepress-multilingual"); ?>
110
+ <?php __("Images", "translatepress-multilingual"); ?>
111
+ <?php __("Dynamically Added Strings", "translatepress-multilingual"); ?>
112
  <?php __("Translate Page", "translatepress-multilingual"); ?>
113
  <?php __("Security check", "translatepress-multilingual"); ?>
114
  <?php __("<strong>Warning:</strong> Some strings have possibly incorrectly encoded characters. This may result in breaking the queries, rendering the page untranslated in live mode. Consider revising the following strings or their method of outputting.", "translatepress-multilingual"); ?>
118
  <?php __("OG Description", "translatepress-multilingual"); ?>
119
  <?php __("Twitter Title", "translatepress-multilingual"); ?>
120
  <?php __("Twitter Description", "translatepress-multilingual"); ?>
 
121
  <?php __("Page Title", "translatepress-multilingual"); ?>
122
  <?php __("TranslatePress data update", "translatepress-multilingual"); ?>
123
  <?php __("We need to update your translations database to the latest version.", "translatepress-multilingual"); ?>
124
+ <?php __("IMPORTANT: It is strongly recommended to first backup the database!\nAre you sure you want to continue?", "translatepress-multilingual"); ?>
125
  <?php __("Run the updater", "translatepress-multilingual"); ?>
126
  <?php __("Update aborted! Your user account doesn't have the capability to perform database updates.", "translatepress-multilingual"); ?>
127
  <?php __("Update aborted! Invalid nonce.", "translatepress-multilingual"); ?>
128
+ <?php __("Back to TranslatePress Settings", "translatepress-multilingual"); ?>
129
  <?php __("Successfully updated database!", "translatepress-multilingual"); ?>
130
  <?php __("Updating database to version %s+", "translatepress-multilingual"); ?>
131
  <?php __("Processing table for language %s...", "translatepress-multilingual"); ?>
139
  <?php __("If the page does not redirect automatically", "translatepress-multilingual"); ?>
140
  <?php __("click here", "translatepress-multilingual"); ?>
141
  <?php __("<strong>TranslatePress</strong> requires <strong><a href=\"http://php.net/manual/en/book.mbstring.php\">Multibyte String PHP library</a></strong>. Please contact your server administrator to install it on your server.", "translatepress-multilingual"); ?>
142
+ <?php __("<strong>TranslatePress</strong> requires at least PHP version 5.6.20+ to run. It is the <a href=\"%s\">minimum requirement of the latest WordPress version</a>. Please contact your server administrator to update your PHP version.", "translatepress-multilingual"); ?>
143
+ <?php __("Advanced Addons", "translatepress-multilingual"); ?>
144
+ <?php __("These addons extend your translation plugin and are available in the Developer, Business and Personal plans.", "translatepress-multilingual"); ?>
145
+ <?php __("SEO support for page slug, page title, description and facebook and twitter social graph information. </br> The HTML lang attribute is properly set.", "translatepress-multilingual"); ?>
146
+ <?php __("Add as many languages as you need for your project to go global.<br>Publish your language only when all your translations are done.", "translatepress-multilingual"); ?>
147
+ <?php __("Pro Addons", "translatepress-multilingual"); ?>
148
+ <?php __("These addons extend your translation plugin and are available in the Business and Developer plans.", "translatepress-multilingual"); ?>
149
+ <?php __("Automatically redirects new visitors to their preferred language based on browser settings or IP address</br> and remembers the last visited language.", "translatepress-multilingual"); ?>
150
+ <?php __("Create translator accounts for new users or allow existing users <br/>that are not administrators to translate your website.", "translatepress-multilingual"); ?>
151
+ <?php __("Navigate your website just like a particular user role would. <br/>Really useful for dynamic content or hidden content that appears for particular users.", "translatepress-multilingual"); ?>
152
+ <?php __("Configure different menu items for different languages.", "translatepress-multilingual"); ?>
153
+ <?php __("Free Addons", "translatepress-multilingual"); ?>
154
+ <?php __("Extend your translation plugin with these free addons.", "translatepress-multilingual"); ?>
155
+ <?php __("Use GET parameter to encode language in the url, replacing the language directory. </br> Your urls will look like this: www.example.com?lang=en", "translatepress-multilingual"); ?>
156
  <?php __("Active on this site", "translatepress-multilingual"); ?>
157
  <?php __("Your license is invalid", "translatepress-multilingual"); ?>
158
  <?php __("If you do not have any of the <a href=\"%s\">Advanced or Pro Addons</a> activated you do not need a license key", "translatepress-multilingual"); ?>
160
  <?php __("To add <strong>more then two languages</strong> and support for SEO Title, Description, Slug and more check out <a href=\"%s\" class=\"button button-primary\" target=\"_blank\" title=\"TranslatePress Pro\">TranslatePress PRO</a>", "translatepress-multilingual"); ?>
161
  <?php __("Not only you are getting extra features and premium support, you also help fund the future development of TranslatePress.", "translatepress-multilingual"); ?>
162
  <?php __("Default Language", "translatepress-multilingual"); ?>
163
+ <?php __("Select the original language of your content.", "translatepress-multilingual"); ?>
164
  <?php __("WARNING. Changing the default language will invalidate existing translations.", "translatepress-multilingual"); ?>
165
  <?php __("Even changing from en_US to en_GB, because they are treated as two different languages.", "translatepress-multilingual"); ?>
166
  <?php __("In most cases changing the default flag is all it is needed: ", "translatepress-multilingual"); ?>
168
  <?php __("Native language name", "translatepress-multilingual"); ?>
169
  <?php __("No", "translatepress-multilingual"); ?>
170
  <?php __("Yes", "translatepress-multilingual"); ?>
171
+ <?php __("Select Yes if you want to display languages in their native names. Otherwise, languages will be displayed in English.", "translatepress-multilingual"); ?>
172
+ <?php __("Use a subdirectory for the default language", "translatepress-multilingual"); ?>
173
+ <?php __("Select Yes if you want to add the subdirectory in the URL for the default language.</br>By selecting Yes, the default language seen by website visitors will become the first one in the \"All Languages\" list.", "translatepress-multilingual"); ?>
174
  <?php __("Force language in custom links", "translatepress-multilingual"); ?>
175
  <?php __("Select Yes if you want to force custom links without language encoding to keep the currently selected language.", "translatepress-multilingual"); ?>
176
  <?php __("Google Translate", "translatepress-multilingual"); ?>
178
  <?php __("Google Translate API Key", "translatepress-multilingual"); ?>
179
  <?php __("Test API key", "translatepress-multilingual"); ?>
180
  <?php __("Visit <a href=\"https://cloud.google.com/docs/authentication/api-keys\" target=\"_blank\">this link</a> to see how you can set up an API key, <strong>control API costs</strong> and set HTTP referrer restrictions.", "translatepress-multilingual"); ?>
181
+ <?php __("Your HTTP referrer is: %s", "translatepress-multilingual"); ?>
182
  <?php __("Language Switcher", "translatepress-multilingual"); ?>
183
  <?php __("Shortcode ", "translatepress-multilingual"); ?>
184
  <?php __("Use shortcode on any page or widget.", "translatepress-multilingual"); ?>
185
  <?php __("Menu item", "translatepress-multilingual"); ?>
186
+ <?php __("Go to %1$s Appearance -> Menus%2$s to add languages to the Language Switcher in any menu.", "translatepress-multilingual"); ?>
187
  <?php __("Learn more in our documentation.", "translatepress-multilingual"); ?>
188
  <?php __("Floating language selection", "translatepress-multilingual"); ?>
189
+ <?php __("Add a floating dropdown that follows the user on every page.", "translatepress-multilingual"); ?>
190
  <?php __("Google API Key from settings page:", "translatepress-multilingual"); ?>
191
  <?php __("HTTP Referrer:", "translatepress-multilingual"); ?>
192
  <?php __("Use this HTTP Referrer if you want to restrict usage of the API from Google Dashboard.", "translatepress-multilingual"); ?>
193
  <?php __("Response:", "translatepress-multilingual"); ?>
194
  <?php __("Response Body:", "translatepress-multilingual"); ?>
195
  <?php __("Entire Response From wp_remote_get():", "translatepress-multilingual"); ?>
 
 
 
 
 
 
 
196
  <?php __("Current User", "translatepress-multilingual"); ?>
197
  <?php __("Logged Out", "translatepress-multilingual"); ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
198
  <?php __("Remove duplicate rows from TranslatePress tables", "translatepress-multilingual"); ?>
199
+ <?php __("<strong>IMPORTANT NOTE: Before performing this action it is strongly recommended to first backup the database.</strong><br><br>This feature can be used to cleanup duplicate entries in TranslatePress trp_dictionary tables. Such duplicates can appear in exceptional situations of unexpected behavior.", "translatepress-multilingual"); ?>
200
+ <?php __("IMPORTANT: It is strongly recommended to first backup the database!!\nAre you sure you want to continue?", "translatepress-multilingual"); ?>
201
  <?php __("Batch size", "translatepress-multilingual"); ?>
202
+ <?php __("The number of rows to check at once.<br>Choosing a smaller number helps solve the 504 error \"Page took too long to respond\" on large databases.<br>May take several minutes depending on the database size.", "translatepress-multilingual"); ?>
203
  <?php __("Remove duplicate rows", "translatepress-multilingual"); ?>
204
  <?php __("TranslatePress Database Updater", "translatepress-multilingual"); ?>
205
  <?php __("Updating TranslatePress tables", "translatepress-multilingual"); ?>
languages/translatepress-multilingual.pot CHANGED
@@ -13,70 +13,62 @@ msgstr ""
13
  "X-Poedit-SourceCharset: UTF-8\n"
14
  "Plural-Forms: nplurals=2; plural=(n != 1);\n"
15
 
16
- #: ../tp-add-on-extra-languages/class-extra-languages.php:57, ../translatepress/includes/class-settings.php:307
17
- msgid "Error! Duplicate Url slug values."
18
- msgstr ""
19
-
20
- #: ../tp-add-on-navigation-based-on-language/class-navigation-based-on-language.php:71
21
- msgid "Limit this menu item to the following languages"
22
- msgstr ""
23
-
24
- #: ../tp-add-on-navigation-based-on-language/class-navigation-based-on-language.php:77, ../tp-add-on-extra-languages/partials/language-selector-pro.php:2, ../translatepress/partials/main-settings-language-selector.php:2
25
- msgid "All Languages"
26
- msgstr ""
27
-
28
- #: class-seo-pack.php:171
29
- msgid "The Yoast SEO Sitemaps will now contain the default language slug: example.com/en/sitemap_index.xml <br/> This works perfectly, just take it into account when you submit the sitemap to Google."
30
- msgstr ""
31
-
32
- #: ../tp-add-on-automatic-language-detection/includes/class-ald-settings.php:37
33
  msgid "First by browser language, then IP address (recommended)"
34
  msgstr ""
35
 
36
- #: ../tp-add-on-automatic-language-detection/includes/class-ald-settings.php:38
37
- msgid "First by IP address, then browser language"
38
  msgstr ""
39
 
40
- #: ../tp-add-on-automatic-language-detection/includes/class-ald-settings.php:39
41
  msgid "Only by browser language"
42
  msgstr ""
43
 
44
- #: ../tp-add-on-automatic-language-detection/includes/class-ald-settings.php:40
45
  msgid "Only by IP address"
46
  msgstr ""
47
 
48
- #: ../tp-add-on-automatic-language-detection/includes/class-ald-settings.php:110
49
- msgid "<div class=\"warning\">WARNING. Cannot determine your language preference based on your current IP.<br>This is most likely because the website is on a local environment.</div>"
50
  msgstr ""
51
 
52
- #: ../tp-add-on-automatic-language-detection/partials/license-settings-page.php:4, ../tp-add-on-browse-as-other-roles/partials/license-settings-page.php:4, ../tp-add-on-extra-languages/partials/license-settings-page.php:4, partials/license-settings-page.php:4, ../translatepress/partials/addons-settings-page.php:3, ../translatepress/partials/license-settings-page.php:8, ../translatepress/partials/license-settings-page.php:46, ../translatepress/partials/main-settings-page.php:5, ../translatepress/partials/test-google-key-settings-page.php:10, ../translatepress/partials/trp-remove-duplicate-rows.php:3, ../trp-add-on-translator-accounts-add-on/partials/license-settings-page.php:4
53
  msgid "TranslatePress Settings"
54
  msgstr ""
55
 
56
- #: ../tp-add-on-automatic-language-detection/partials/license-settings-page.php:10, ../tp-add-on-browse-as-other-roles/partials/license-settings-page.php:10, ../tp-add-on-extra-languages/partials/license-settings-page.php:10, partials/license-settings-page.php:10, ../translatepress/partials/license-settings-page.php:14, ../trp-add-on-translator-accounts-add-on/partials/license-settings-page.php:10
57
  msgid "License Key"
58
  msgstr ""
59
 
60
- #: ../tp-add-on-automatic-language-detection/partials/license-settings-page.php:15, ../tp-add-on-browse-as-other-roles/partials/license-settings-page.php:15, ../tp-add-on-extra-languages/partials/license-settings-page.php:15, partials/license-settings-page.php:15, ../translatepress/partials/license-settings-page.php:38, ../trp-add-on-translator-accounts-add-on/partials/license-settings-page.php:15
61
  msgid "Enter your license key."
62
  msgstr ""
63
 
64
- #: ../tp-add-on-automatic-language-detection/partials/license-settings-page.php:22, ../tp-add-on-automatic-language-detection/partials/license-settings-page.php:31, ../tp-add-on-browse-as-other-roles/partials/license-settings-page.php:22, ../tp-add-on-browse-as-other-roles/partials/license-settings-page.php:31, ../tp-add-on-extra-languages/partials/license-settings-page.php:22, ../tp-add-on-extra-languages/partials/license-settings-page.php:31, partials/license-settings-page.php:22, partials/license-settings-page.php:31, ../translatepress/partials/license-settings-page.php:32, ../trp-add-on-translator-accounts-add-on/partials/license-settings-page.php:22, ../trp-add-on-translator-accounts-add-on/partials/license-settings-page.php:31
65
  msgid "Activate License"
66
  msgstr ""
67
 
68
- #: ../tp-add-on-automatic-language-detection/partials/license-settings-page.php:28, ../tp-add-on-browse-as-other-roles/partials/license-settings-page.php:28, ../tp-add-on-extra-languages/partials/license-settings-page.php:28, partials/license-settings-page.php:28, ../translatepress/partials/license-settings-page.php:22, ../trp-add-on-translator-accounts-add-on/partials/license-settings-page.php:28
69
  msgid "Deactivate License"
70
  msgstr ""
71
 
72
- #: ../tp-add-on-automatic-language-detection/partials/settings-option.php:2
73
  msgid "Method of language detection"
74
  msgstr ""
75
 
76
- #: ../tp-add-on-automatic-language-detection/partials/settings-option.php:14
77
  msgid "Select how the language should be detected for first time visitors.<br>The visitor's last displayed language will be remembered through cookies."
78
  msgstr ""
79
 
 
 
 
 
 
 
 
 
80
  #: ../tp-add-on-extra-languages/partials/language-selector-pro.php:7, ../translatepress/partials/main-settings-language-selector.php:7
81
  msgid "Language"
82
  msgstr ""
@@ -113,40 +105,56 @@ msgstr ""
113
  msgid "Select the languages you wish to make your website available in."
114
  msgstr ""
115
 
116
- #: ../translatepress/includes/class-edd-sl-plugin-updater.php:676, ../translatepress/includes/class-edd-sl-plugin-updater.php:708, ../translatepress/includes/class-edd-sl-plugin-updater.php:779
 
 
 
 
 
 
 
 
 
 
 
 
117
  msgid "An error occurred, please try again."
118
  msgstr ""
119
 
120
- #: ../translatepress/includes/class-edd-sl-plugin-updater.php:687
121
  msgid "Your license key expired on %s."
122
  msgstr ""
123
 
124
- #: ../translatepress/includes/class-edd-sl-plugin-updater.php:692
125
  msgid "Your license key has been disabled."
126
  msgstr ""
127
 
128
- #: ../translatepress/includes/class-edd-sl-plugin-updater.php:695
129
  msgid "Invalid license."
130
  msgstr ""
131
 
132
- #: ../translatepress/includes/class-edd-sl-plugin-updater.php:699
133
  msgid "Your license is not active for this URL."
134
  msgstr ""
135
 
136
- #: ../translatepress/includes/class-edd-sl-plugin-updater.php:702
137
  msgid "This appears to be an invalid license key for %s."
138
  msgstr ""
139
 
140
- #: ../translatepress/includes/class-edd-sl-plugin-updater.php:705
141
  msgid "Your license key has reached its activation limit."
142
  msgstr ""
143
 
144
- #: ../translatepress/includes/class-edd-sl-plugin-updater.php:739
145
  msgid "You have successfully activated your license"
146
  msgstr ""
147
 
 
 
 
 
148
  #: ../translatepress/includes/class-plugin-notices.php:325
149
- msgid "You are not using a permalink structure! Please <a href=\"%s\">enable</a> one or install our <a href=\"%s\">\"Language by GET parameter\"</a> addon so TranslatePress can function properly."
150
  msgstr ""
151
 
152
  #: ../translatepress/includes/class-plugin-notices.php:327, ../translatepress/includes/class-plugin-notices.php:353, ../translatepress/includes/class-plugin-notices.php:372, ../translatepress/includes/class-plugin-notices.php:386
@@ -154,11 +162,11 @@ msgid "Dismiss this notice."
154
  msgstr ""
155
 
156
  #: ../translatepress/includes/class-plugin-notices.php:346
157
- msgid "<p>Your <strong>TranslatePress</strong> serial number is invalid or missing. <br/>Please %1$sregister your copy%2$s to receive access to automatic updates and support. Need a license key? %3$sPurchase one now%4$s</p>"
158
  msgstr ""
159
 
160
  #: ../translatepress/includes/class-plugin-notices.php:348
161
- msgid "<p>Your <strong>TranslatePress</strong> license has expired. <br/>Please %1$sRenew Your Licence%2$s to continue receiving access to product downloads, automatic updates and support. %3$sRenew now %4$s</p>"
162
  msgstr ""
163
 
164
  #: ../translatepress/includes/class-plugin-notices.php:368
@@ -166,7 +174,7 @@ msgid "Your <strong>TranslatePress</strong> license will expire on %1$s. Please
166
  msgstr ""
167
 
168
  #: ../translatepress/includes/class-plugin-notices.php:384
169
- msgid "Redirect users to their preferred language based on their browser language or IP address using our new <a href=\"https://translatepress.com/docs/addons/automatic-user-language-detection/\" >Automatic User Language Detection Add-on</a>."
170
  msgstr ""
171
 
172
  #: ../translatepress/includes/class-settings.php:26
@@ -197,7 +205,7 @@ msgstr ""
197
  msgid "General"
198
  msgstr ""
199
 
200
- #: ../translatepress/includes/class-settings.php:389, ../translatepress/includes/class-translation-manager.php:618
201
  msgid "Translate Site"
202
  msgstr ""
203
 
@@ -209,7 +217,7 @@ msgstr ""
209
  msgid "License"
210
  msgstr ""
211
 
212
- #: ../translatepress/includes/class-settings.php:429, ../translatepress/includes/class-translation-manager.php:649
213
  msgid "Settings"
214
  msgstr ""
215
 
@@ -217,79 +225,271 @@ msgstr ""
217
  msgid "Pro Features"
218
  msgstr ""
219
 
220
- #: ../translatepress/includes/class-translation-manager.php:79
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
221
  msgid "Translate"
222
  msgstr ""
223
 
224
- #: ../translatepress/includes/class-translation-manager.php:80
225
  msgid "Translate entire block element"
226
  msgstr ""
227
 
228
- #: ../translatepress/includes/class-translation-manager.php:81
229
  msgid "Split block to translate strings individually"
230
  msgstr ""
231
 
232
- #: ../translatepress/includes/class-translation-manager.php:82
233
- msgid "Translation block"
234
  msgstr ""
235
 
236
- #: ../translatepress/includes/class-translation-manager.php:83
237
- msgid "Are you sure you want to split this phrase into smaller pieces?"
238
  msgstr ""
239
 
240
- #: ../translatepress/includes/class-translation-manager.php:84
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
241
  msgid "Meta Information"
242
  msgstr ""
243
 
244
- #: ../translatepress/includes/class-translation-manager.php:85
245
  msgid "String List"
246
  msgstr ""
247
 
248
- #: ../translatepress/includes/class-translation-manager.php:86
249
- msgid "Dynamic Added Strings"
 
 
 
 
 
 
 
 
250
  msgstr ""
251
 
252
- #: ../translatepress/includes/class-translation-manager.php:630
253
  msgid "Translate Page"
254
  msgstr ""
255
 
256
- #: ../translatepress/includes/class-translation-manager.php:1325
257
  msgid "Security check"
258
  msgstr ""
259
 
260
- #: ../translatepress/includes/class-translation-manager.php:1399
261
  msgid "<strong>Warning:</strong> Some strings have possibly incorrectly encoded characters. This may result in breaking the queries, rendering the page untranslated in live mode. Consider revising the following strings or their method of outputting."
262
  msgstr ""
263
 
264
- #: ../translatepress/includes/class-translation-render.php:144
265
  msgid "Description"
266
  msgstr ""
267
 
268
- #: ../translatepress/includes/class-translation-render.php:150
269
  msgid "OG Title"
270
  msgstr ""
271
 
272
- #: ../translatepress/includes/class-translation-render.php:156
273
  msgid "OG Site Name"
274
  msgstr ""
275
 
276
- #: ../translatepress/includes/class-translation-render.php:162
277
  msgid "OG Description"
278
  msgstr ""
279
 
280
- #: ../translatepress/includes/class-translation-render.php:168
281
  msgid "Twitter Title"
282
  msgstr ""
283
 
284
- #: ../translatepress/includes/class-translation-render.php:174
285
  msgid "Twitter Description"
286
  msgstr ""
287
 
288
- #: ../translatepress/includes/class-translation-render.php:180
289
- msgid "Post Slug"
290
- msgstr ""
291
-
292
- #: ../translatepress/includes/class-translation-render.php:184
293
  msgid "Page Title"
294
  msgstr ""
295
 
@@ -301,10 +501,8 @@ msgstr ""
301
  msgid "We need to update your translations database to the latest version."
302
  msgstr ""
303
 
304
- #: ../translatepress/includes/class-upgrade.php:120, ../translatepress/partials/trp-remove-duplicate-rows.php:12
305
- msgid ""
306
- "IMPORTANT: It is strongly recommended to backup the database first!\n"
307
- "Are you sure you want to continue?"
308
  msgstr ""
309
 
310
  #: ../translatepress/includes/class-upgrade.php:120
@@ -320,7 +518,7 @@ msgid "Update aborted! Invalid nonce."
320
  msgstr ""
321
 
322
  #: ../translatepress/includes/class-upgrade.php:156, ../translatepress/includes/class-upgrade.php:249, ../translatepress/includes/class-upgrade.php:335, ../translatepress/includes/class-upgrade.php:340
323
- msgid "Back to TranslatePress Settings page"
324
  msgstr ""
325
 
326
  #: ../translatepress/includes/class-upgrade.php:160
@@ -371,10 +569,66 @@ msgstr ""
371
  msgid "click here"
372
  msgstr ""
373
 
374
- #: ../translatepress/includes/functions.php:258
375
  msgid "<strong>TranslatePress</strong> requires <strong><a href=\"http://php.net/manual/en/book.mbstring.php\">Multibyte String PHP library</a></strong>. Please contact your server administrator to install it on your server."
376
  msgstr ""
377
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
378
  #: ../translatepress/partials/license-settings-page.php:25
379
  msgid "Active on this site"
380
  msgstr ""
@@ -404,7 +658,7 @@ msgid "Default Language"
404
  msgstr ""
405
 
406
  #: ../translatepress/partials/main-settings-page.php:21
407
- msgid "Select the original language your website was written in. "
408
  msgstr ""
409
 
410
  #: ../translatepress/partials/main-settings-page.php:25
@@ -436,15 +690,15 @@ msgid "Yes"
436
  msgstr ""
437
 
438
  #: ../translatepress/partials/main-settings-page.php:44
439
- msgid "Select Yes if you want languages to display in their native names. Otherwise, they will be displayed in English."
440
  msgstr ""
441
 
442
  #: ../translatepress/partials/main-settings-page.php:50
443
- msgid "Use subdirectory for default language"
444
  msgstr ""
445
 
446
  #: ../translatepress/partials/main-settings-page.php:57
447
- msgid "Select Yes if you want to add the subdirectory in the url for the default language.</br>By selecting Yes, the default language seen by website visitors will become the first one in the \"All Languages\" list."
448
  msgstr ""
449
 
450
  #: ../translatepress/partials/main-settings-page.php:63
@@ -476,7 +730,7 @@ msgid "Visit <a href=\"https://cloud.google.com/docs/authentication/api-keys\" t
476
  msgstr ""
477
 
478
  #: ../translatepress/partials/main-settings-page.php:95
479
- msgid "<br>Your HTTP referrer is: %s"
480
  msgstr ""
481
 
482
  #: ../translatepress/partials/main-settings-page.php:102
@@ -496,7 +750,7 @@ msgid "Menu item"
496
  msgstr ""
497
 
498
  #: ../translatepress/partials/main-settings-page.php:122
499
- msgid "Go to %1$s Appearance -> Menus%2$s to add Language Switcher Languages in any menu."
500
  msgstr ""
501
 
502
  #: ../translatepress/partials/main-settings-page.php:123
@@ -508,7 +762,7 @@ msgid "Floating language selection"
508
  msgstr ""
509
 
510
  #: ../translatepress/partials/main-settings-page.php:132
511
- msgid "Have a floating dropdown following the user on every page."
512
  msgstr ""
513
 
514
  #: ../translatepress/partials/test-google-key-settings-page.php:15
@@ -535,132 +789,24 @@ msgstr ""
535
  msgid "Entire Response From wp_remote_get():"
536
  msgstr ""
537
 
538
- #: ../translatepress/partials/translation-manager.php:47
539
- msgid "Saved!"
540
- msgstr ""
541
-
542
- #: ../translatepress/partials/translation-manager.php:51
543
- msgid "Save translation"
544
- msgstr ""
545
-
546
- #: ../translatepress/partials/translation-manager.php:66
547
- msgid "Select string to translate..."
548
- msgstr ""
549
-
550
- #: ../translatepress/partials/translation-manager.php:69
551
- msgid "Gettext strings"
552
- msgstr ""
553
-
554
- #: ../translatepress/partials/translation-manager.php:74
555
- msgid "Previous"
556
- msgstr ""
557
-
558
- #: ../translatepress/partials/translation-manager.php:75
559
- msgid "Next"
560
- msgstr ""
561
-
562
- #: ../translatepress/partials/translation-manager.php:79
563
- msgid "View as"
564
- msgstr ""
565
-
566
- #: ../translatepress/partials/translation-manager.php:82
567
  msgid "Current User"
568
  msgstr ""
569
 
570
- #: ../translatepress/partials/translation-manager.php:82
571
  msgid "Logged Out"
572
  msgstr ""
573
 
574
- #: ../translatepress/partials/translation-manager.php:93
575
- msgid "Available in our Pro Versions"
576
- msgstr ""
577
-
578
- #: ../translatepress/partials/translation-manager.php:107
579
- msgid "You have unsaved changes!"
580
- msgstr ""
581
-
582
- #: ../translatepress/partials/translation-manager.php:112
583
- msgid "Original String"
584
- msgstr ""
585
-
586
- #: ../translatepress/partials/translation-manager.php:118, ../translatepress/partials/translation-manager.php:127
587
- msgid "To %s"
588
- msgstr ""
589
-
590
- #: ../translatepress/partials/translation-manager.php:118, ../translatepress/partials/translation-manager.php:119
591
- msgid "From %s"
592
- msgstr ""
593
-
594
- #: ../translatepress/partials/translation-manager.php:122, ../translatepress/partials/translation-manager.php:129
595
- msgid "Discard changes"
596
- msgstr ""
597
-
598
- #: ../translatepress/partials/translation-manager.php:132
599
- msgid "Other languages"
600
- msgstr ""
601
-
602
- #: ../translatepress/partials/translation-manager.php:146
603
- msgid "You can add a new language from <a href=\"%s\">Settings->TranslatePress</a>"
604
- msgstr ""
605
-
606
- #: ../translatepress/partials/translation-manager.php:147
607
- msgid "However, you can still use TranslatePress to <strong style=\"background: #f5fb9d;\">modify gettext strings</strong> available in your page."
608
- msgstr ""
609
-
610
- #: ../translatepress/partials/translation-manager.php:148
611
- msgid "Strings that are user created can't be modified, only those from themes and plugins."
612
- msgstr ""
613
-
614
- #: ../translatepress/partials/translation-manager.php:159
615
- msgid "Extra Translation Features"
616
- msgstr ""
617
-
618
- #: ../translatepress/partials/translation-manager.php:161
619
- msgid "Support for 221 Extra Languages"
620
- msgstr ""
621
-
622
- #: ../translatepress/partials/translation-manager.php:162
623
- msgid "Yoast SEO support"
624
- msgstr ""
625
-
626
- #: ../translatepress/partials/translation-manager.php:163
627
- msgid "Translate SEO Title, Description, Slug"
628
- msgstr ""
629
-
630
- #: ../translatepress/partials/translation-manager.php:164
631
- msgid "Create Translator Accounts"
632
- msgstr ""
633
-
634
- #: ../translatepress/partials/translation-manager.php:165
635
- msgid "Publish only when translation is done"
636
- msgstr ""
637
-
638
- #: ../translatepress/partials/translation-manager.php:166
639
- msgid "Translate by Browsing as User Role"
640
- msgstr ""
641
-
642
- #: ../translatepress/partials/translation-manager.php:167
643
- msgid "Different Menus Items per Language"
644
- msgstr ""
645
-
646
- #: ../translatepress/partials/translation-manager.php:168
647
- msgid "Automatic User Language Detection"
648
- msgstr ""
649
-
650
- #: ../translatepress/partials/translation-manager.php:170
651
- msgid "Supported By Real People"
652
- msgstr ""
653
-
654
- #: ../translatepress/partials/translation-manager.php:171
655
- msgid "Find Out More"
656
- msgstr ""
657
-
658
  #: ../translatepress/partials/trp-remove-duplicate-rows.php:7
659
  msgid "Remove duplicate rows from TranslatePress tables"
660
  msgstr ""
661
 
662
  #: ../translatepress/partials/trp-remove-duplicate-rows.php:10
663
- msgid "<strong>IMPORTANT NOTE: Before performing this action it is strongly recommended to backup the database first.</strong><br><br>This feature can be used to cleanup duplicate entries in TranslatePress trp_dictionary tables. Such duplicates can appear in exceptional situations of unexpected behavior."
 
 
 
 
664
  msgstr ""
665
 
666
  #: ../translatepress/partials/trp-remove-duplicate-rows.php:15
@@ -668,7 +814,7 @@ msgid "Batch size"
668
  msgstr ""
669
 
670
  #: ../translatepress/partials/trp-remove-duplicate-rows.php:19
671
- msgid "The number of rows to check at once.<br>Choosing a smaller number helps solve the 502 error \"Page took too long to respond\" on large databases.<br>May take several minutes depending on the database size."
672
  msgstr ""
673
 
674
  #: ../translatepress/partials/trp-remove-duplicate-rows.php:28
13
  "X-Poedit-SourceCharset: UTF-8\n"
14
  "Plural-Forms: nplurals=2; plural=(n != 1);\n"
15
 
16
+ #: includes/class-ald-settings.php:37
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
17
  msgid "First by browser language, then IP address (recommended)"
18
  msgstr ""
19
 
20
+ #: includes/class-ald-settings.php:38
21
+ msgid "First by IP address, then by browser language"
22
  msgstr ""
23
 
24
+ #: includes/class-ald-settings.php:39
25
  msgid "Only by browser language"
26
  msgstr ""
27
 
28
+ #: includes/class-ald-settings.php:40
29
  msgid "Only by IP address"
30
  msgstr ""
31
 
32
+ #: includes/class-ald-settings.php:110
33
+ msgid "WARNING. Cannot determine your language preference based on your current IP.<br>This is most likely because the website is on a local environment."
34
  msgstr ""
35
 
36
+ #: partials/license-settings-page.php:4, ../tp-add-on-browse-as-other-roles/partials/license-settings-page.php:4, ../tp-add-on-extra-languages/partials/license-settings-page.php:4, ../tp-add-on-seo-pack/partials/license-settings-page.php:4, ../translatepress/partials/addons-settings-page.php:3, ../translatepress/partials/license-settings-page.php:8, ../translatepress/partials/license-settings-page.php:46, ../translatepress/partials/main-settings-page.php:5, ../translatepress/partials/test-google-key-settings-page.php:10, ../translatepress/partials/trp-remove-duplicate-rows.php:3, ../trp-add-on-translator-accounts-add-on/partials/license-settings-page.php:4
37
  msgid "TranslatePress Settings"
38
  msgstr ""
39
 
40
+ #: partials/license-settings-page.php:10, ../tp-add-on-browse-as-other-roles/partials/license-settings-page.php:10, ../tp-add-on-extra-languages/partials/license-settings-page.php:10, ../tp-add-on-seo-pack/partials/license-settings-page.php:10, ../translatepress/partials/license-settings-page.php:14, ../trp-add-on-translator-accounts-add-on/partials/license-settings-page.php:10
41
  msgid "License Key"
42
  msgstr ""
43
 
44
+ #: partials/license-settings-page.php:15, ../tp-add-on-browse-as-other-roles/partials/license-settings-page.php:15, ../tp-add-on-extra-languages/partials/license-settings-page.php:15, ../tp-add-on-seo-pack/partials/license-settings-page.php:15, ../translatepress/partials/license-settings-page.php:38, ../trp-add-on-translator-accounts-add-on/partials/license-settings-page.php:15
45
  msgid "Enter your license key."
46
  msgstr ""
47
 
48
+ #: partials/license-settings-page.php:22, partials/license-settings-page.php:31, ../tp-add-on-browse-as-other-roles/partials/license-settings-page.php:22, ../tp-add-on-browse-as-other-roles/partials/license-settings-page.php:31, ../tp-add-on-extra-languages/partials/license-settings-page.php:22, ../tp-add-on-extra-languages/partials/license-settings-page.php:31, ../tp-add-on-seo-pack/partials/license-settings-page.php:22, ../tp-add-on-seo-pack/partials/license-settings-page.php:31, ../translatepress/partials/license-settings-page.php:32, ../trp-add-on-translator-accounts-add-on/partials/license-settings-page.php:22, ../trp-add-on-translator-accounts-add-on/partials/license-settings-page.php:31
49
  msgid "Activate License"
50
  msgstr ""
51
 
52
+ #: partials/license-settings-page.php:28, ../tp-add-on-browse-as-other-roles/partials/license-settings-page.php:28, ../tp-add-on-extra-languages/partials/license-settings-page.php:28, ../tp-add-on-seo-pack/partials/license-settings-page.php:28, ../translatepress/partials/license-settings-page.php:22, ../trp-add-on-translator-accounts-add-on/partials/license-settings-page.php:28
53
  msgid "Deactivate License"
54
  msgstr ""
55
 
56
+ #: partials/settings-option.php:2
57
  msgid "Method of language detection"
58
  msgstr ""
59
 
60
+ #: partials/settings-option.php:14
61
  msgid "Select how the language should be detected for first time visitors.<br>The visitor's last displayed language will be remembered through cookies."
62
  msgstr ""
63
 
64
+ #: ../tp-add-on-extra-languages/class-extra-languages.php:57, ../translatepress/includes/class-settings.php:307
65
+ msgid "Error! Duplicate URL slug values."
66
+ msgstr ""
67
+
68
+ #: ../tp-add-on-extra-languages/partials/language-selector-pro.php:2, ../tp-add-on-navigation-based-on-language/class-navigation-based-on-language.php:77, ../translatepress/partials/main-settings-language-selector.php:2
69
+ msgid "All Languages"
70
+ msgstr ""
71
+
72
  #: ../tp-add-on-extra-languages/partials/language-selector-pro.php:7, ../translatepress/partials/main-settings-language-selector.php:7
73
  msgid "Language"
74
  msgstr ""
105
  msgid "Select the languages you wish to make your website available in."
106
  msgstr ""
107
 
108
+ #: ../tp-add-on-navigation-based-on-language/class-navigation-based-on-language.php:71
109
+ msgid "Limit this menu item to the following languages"
110
+ msgstr ""
111
+
112
+ #: ../tp-add-on-seo-pack/class-seo-pack.php:143
113
+ msgid "The Yoast SEO Sitemaps will now contain the default language slug: example.com/en/sitemap_index.xml <br/> This works perfectly, just take it into account when submitting the sitemap to Google."
114
+ msgstr ""
115
+
116
+ #: ../tp-add-on-seo-pack/includes/class-slug-manager.php:32
117
+ msgid "Post Slug"
118
+ msgstr ""
119
+
120
+ #: ../translatepress/includes/class-edd-sl-plugin-updater.php:681, ../translatepress/includes/class-edd-sl-plugin-updater.php:713, ../translatepress/includes/class-edd-sl-plugin-updater.php:784
121
  msgid "An error occurred, please try again."
122
  msgstr ""
123
 
124
+ #: ../translatepress/includes/class-edd-sl-plugin-updater.php:692
125
  msgid "Your license key expired on %s."
126
  msgstr ""
127
 
128
+ #: ../translatepress/includes/class-edd-sl-plugin-updater.php:697
129
  msgid "Your license key has been disabled."
130
  msgstr ""
131
 
132
+ #: ../translatepress/includes/class-edd-sl-plugin-updater.php:700
133
  msgid "Invalid license."
134
  msgstr ""
135
 
136
+ #: ../translatepress/includes/class-edd-sl-plugin-updater.php:704
137
  msgid "Your license is not active for this URL."
138
  msgstr ""
139
 
140
+ #: ../translatepress/includes/class-edd-sl-plugin-updater.php:707
141
  msgid "This appears to be an invalid license key for %s."
142
  msgstr ""
143
 
144
+ #: ../translatepress/includes/class-edd-sl-plugin-updater.php:710
145
  msgid "Your license key has reached its activation limit."
146
  msgstr ""
147
 
148
+ #: ../translatepress/includes/class-edd-sl-plugin-updater.php:744
149
  msgid "You have successfully activated your license"
150
  msgstr ""
151
 
152
+ #: ../translatepress/includes/class-editor-api-regular-strings.php:48
153
+ msgid "Others"
154
+ msgstr ""
155
+
156
  #: ../translatepress/includes/class-plugin-notices.php:325
157
+ msgid "You are not using a permalink structure! Please <a href=\"%s\">enable</a> one or install our <a href=\"%s\">\"Language by GET parameter\"</a> addon, so that TranslatePress can function properly."
158
  msgstr ""
159
 
160
  #: ../translatepress/includes/class-plugin-notices.php:327, ../translatepress/includes/class-plugin-notices.php:353, ../translatepress/includes/class-plugin-notices.php:372, ../translatepress/includes/class-plugin-notices.php:386
162
  msgstr ""
163
 
164
  #: ../translatepress/includes/class-plugin-notices.php:346
165
+ msgid "Your <strong>TranslatePress</strong> serial number is invalid or missing. <br/>Please %1$sregister your copy%2$s to receive access to automatic updates and support. Need a license key? %3$sPurchase one now%4$s"
166
  msgstr ""
167
 
168
  #: ../translatepress/includes/class-plugin-notices.php:348
169
+ msgid "Your <strong>TranslatePress</strong> license has expired. <br/>Please %1$sRenew Your Licence%2$s to continue receiving access to product downloads, automatic updates and support. %3$sRenew now %4$s"
170
  msgstr ""
171
 
172
  #: ../translatepress/includes/class-plugin-notices.php:368
174
  msgstr ""
175
 
176
  #: ../translatepress/includes/class-plugin-notices.php:384
177
+ msgid "NEW: Display different images based on language. Find out <a href=\"https://translatepress.com/docs/image-translation/\" >how to translate images, sliders and more</a> from the TranslatePress editor."
178
  msgstr ""
179
 
180
  #: ../translatepress/includes/class-settings.php:26
205
  msgid "General"
206
  msgstr ""
207
 
208
+ #: ../translatepress/includes/class-settings.php:389, ../translatepress/includes/class-translation-manager.php:234
209
  msgid "Translate Site"
210
  msgstr ""
211
 
217
  msgid "License"
218
  msgstr ""
219
 
220
+ #: ../translatepress/includes/class-settings.php:429, ../translatepress/includes/class-translation-manager.php:265
221
  msgid "Settings"
222
  msgstr ""
223
 
225
  msgid "Pro Features"
226
  msgstr ""
227
 
228
+ #: ../translatepress/includes/class-translation-manager.php:84
229
+ msgid "Image source"
230
+ msgstr ""
231
+
232
+ #: ../translatepress/includes/class-translation-manager.php:85
233
+ msgid "Alt attribute"
234
+ msgstr ""
235
+
236
+ #: ../translatepress/includes/class-translation-manager.php:86
237
+ msgid "Title attribute"
238
+ msgstr ""
239
+
240
+ #: ../translatepress/includes/class-translation-manager.php:87
241
+ msgid "Anchor link"
242
+ msgstr ""
243
+
244
+ #: ../translatepress/includes/class-translation-manager.php:88
245
+ msgid "Placeholder attribute"
246
+ msgstr ""
247
+
248
+ #: ../translatepress/includes/class-translation-manager.php:89
249
+ msgid "Submit attribute"
250
+ msgstr ""
251
+
252
+ #: ../translatepress/includes/class-translation-manager.php:90
253
+ msgid "Text"
254
+ msgstr ""
255
+
256
+ #: ../translatepress/includes/class-translation-manager.php:92
257
+ msgid "Saved"
258
+ msgstr ""
259
+
260
+ #: ../translatepress/includes/class-translation-manager.php:93
261
+ msgid "Save translation"
262
+ msgstr ""
263
+
264
+ #: ../translatepress/includes/class-translation-manager.php:94
265
+ msgid "Saving translation..."
266
+ msgstr ""
267
+
268
+ #: ../translatepress/includes/class-translation-manager.php:95
269
+ msgid "You have unsaved changes!"
270
+ msgstr ""
271
+
272
+ #: ../translatepress/includes/class-translation-manager.php:96
273
+ msgid "Discard changes"
274
+ msgstr ""
275
+
276
+ #: ../translatepress/includes/class-translation-manager.php:97
277
+ msgid "Discard All"
278
+ msgstr ""
279
+
280
+ #: ../translatepress/includes/class-translation-manager.php:98
281
+ msgid "Loading Strings..."
282
+ msgstr ""
283
+
284
+ #: ../translatepress/includes/class-translation-manager.php:99
285
+ msgid "Select string to translate..."
286
+ msgstr ""
287
+
288
+ #: ../translatepress/includes/class-translation-manager.php:100
289
+ msgid "Close Editor"
290
+ msgstr ""
291
+
292
+ #: ../translatepress/includes/class-translation-manager.php:101
293
+ msgid "From"
294
+ msgstr ""
295
+
296
+ #: ../translatepress/includes/class-translation-manager.php:102
297
+ msgid "To"
298
+ msgstr ""
299
+
300
+ #: ../translatepress/includes/class-translation-manager.php:103
301
+ msgid "Next"
302
+ msgstr ""
303
+
304
+ #: ../translatepress/includes/class-translation-manager.php:104
305
+ msgid "Previous"
306
+ msgstr ""
307
+
308
+ #: ../translatepress/includes/class-translation-manager.php:105
309
+ msgid "Add Media"
310
+ msgstr ""
311
+
312
+ #: ../translatepress/includes/class-translation-manager.php:106
313
+ msgid "Other languages"
314
+ msgstr ""
315
+
316
+ #: ../translatepress/includes/class-translation-manager.php:107
317
+ msgid "View As"
318
+ msgstr ""
319
+
320
+ #: ../translatepress/includes/class-translation-manager.php:108
321
+ msgid "Available in our Pro Versions"
322
+ msgstr ""
323
+
324
+ #: ../translatepress/includes/class-translation-manager.php:111
325
+ msgid "Select or Upload Media"
326
+ msgstr ""
327
+
328
+ #: ../translatepress/includes/class-translation-manager.php:112
329
+ msgid "Use this media"
330
+ msgstr ""
331
+
332
+ #: ../translatepress/includes/class-translation-manager.php:115
333
  msgid "Translate"
334
  msgstr ""
335
 
336
+ #: ../translatepress/includes/class-translation-manager.php:116
337
  msgid "Translate entire block element"
338
  msgstr ""
339
 
340
+ #: ../translatepress/includes/class-translation-manager.php:117
341
  msgid "Split block to translate strings individually"
342
  msgstr ""
343
 
344
+ #: ../translatepress/includes/class-translation-manager.php:118
345
+ msgid "Save changes to translation. Shortcut: CTRL(⌘) + S"
346
  msgstr ""
347
 
348
+ #: ../translatepress/includes/class-translation-manager.php:119
349
+ msgid "Navigate to next string in dropdown list. Shortcut: CTRL(⌘) + ALT + Right Arrow"
350
  msgstr ""
351
 
352
+ #: ../translatepress/includes/class-translation-manager.php:120
353
+ msgid "Navigate to previous string in dropdown list. Shortcut: CTRL(⌘) + ALT + Left Arrow"
354
+ msgstr ""
355
+
356
+ #: ../translatepress/includes/class-translation-manager.php:121
357
+ msgid "Discard all changes. Shortcut: CTRL(⌘) + ALT + Z"
358
+ msgstr ""
359
+
360
+ #: ../translatepress/includes/class-translation-manager.php:122
361
+ msgid "Discard changes to this text box. To discard changes to all text boxes use shortcut: CTRL(⌘) + ALT + Z"
362
+ msgstr ""
363
+
364
+ #: ../translatepress/includes/class-translation-manager.php:124
365
+ msgid "Are you sure you want to split this phrase into smaller parts?"
366
+ msgstr ""
367
+
368
+ #: ../translatepress/includes/class-translation-manager.php:125
369
+ msgid "This string is not ready for translation yet. <br>Try again in a moment..."
370
+ msgstr ""
371
+
372
+ #: ../translatepress/includes/class-translation-manager.php:127
373
+ msgid "For this option to work, please update the Browse as other role add-on to the latest version."
374
+ msgstr ""
375
+
376
+ #: ../translatepress/includes/class-translation-manager.php:128
377
+ msgid "To translate slugs, please update the SEO Pack add-on to the latest version."
378
+ msgstr ""
379
+
380
+ #: ../translatepress/includes/class-translation-manager.php:131
381
+ msgid "You can add a new language from <a href=\"%s\">Settings->TranslatePress</a>"
382
+ msgstr ""
383
+
384
+ #: ../translatepress/includes/class-translation-manager.php:132
385
+ msgid "However, you can still use TranslatePress to <strong style=\"background: #f5fb9d;\">modify gettext strings</strong> available in your page."
386
+ msgstr ""
387
+
388
+ #: ../translatepress/includes/class-translation-manager.php:133
389
+ msgid "Strings that are user-created cannot be modified, only those from themes and plugins."
390
+ msgstr ""
391
+
392
+ #: ../translatepress/includes/class-translation-manager.php:135
393
+ msgid "Extra Translation Features"
394
+ msgstr ""
395
+
396
+ #: ../translatepress/includes/class-translation-manager.php:136
397
+ msgid "Support for 221 Extra Languages"
398
+ msgstr ""
399
+
400
+ #: ../translatepress/includes/class-translation-manager.php:137
401
+ msgid "Yoast SEO support"
402
+ msgstr ""
403
+
404
+ #: ../translatepress/includes/class-translation-manager.php:138
405
+ msgid "Translate SEO Title, Description, Slug"
406
+ msgstr ""
407
+
408
+ #: ../translatepress/includes/class-translation-manager.php:139
409
+ msgid "Publish only when translation is complete"
410
+ msgstr ""
411
+
412
+ #: ../translatepress/includes/class-translation-manager.php:140
413
+ msgid "Translate by Browsing as User Role"
414
+ msgstr ""
415
+
416
+ #: ../translatepress/includes/class-translation-manager.php:141
417
+ msgid "Different Menu Items for each Language"
418
+ msgstr ""
419
+
420
+ #: ../translatepress/includes/class-translation-manager.php:142
421
+ msgid "Automatic User Language Detection"
422
+ msgstr ""
423
+
424
+ #: ../translatepress/includes/class-translation-manager.php:143
425
+ msgid "Supported By Real People"
426
+ msgstr ""
427
+
428
+ #: ../translatepress/includes/class-translation-manager.php:144
429
+ msgid "Find Out More"
430
+ msgstr ""
431
+
432
+ #: ../translatepress/includes/class-translation-manager.php:150
433
+ msgid "Slugs"
434
+ msgstr ""
435
+
436
+ #: ../translatepress/includes/class-translation-manager.php:151
437
  msgid "Meta Information"
438
  msgstr ""
439
 
440
+ #: ../translatepress/includes/class-translation-manager.php:152
441
  msgid "String List"
442
  msgstr ""
443
 
444
+ #: ../translatepress/includes/class-translation-manager.php:153
445
+ msgid "Gettext Strings"
446
+ msgstr ""
447
+
448
+ #: ../translatepress/includes/class-translation-manager.php:154
449
+ msgid "Images"
450
+ msgstr ""
451
+
452
+ #: ../translatepress/includes/class-translation-manager.php:155
453
+ msgid "Dynamically Added Strings"
454
  msgstr ""
455
 
456
+ #: ../translatepress/includes/class-translation-manager.php:246
457
  msgid "Translate Page"
458
  msgstr ""
459
 
460
+ #: ../translatepress/includes/class-translation-manager.php:941
461
  msgid "Security check"
462
  msgstr ""
463
 
464
+ #: ../translatepress/includes/class-translation-manager.php:1015
465
  msgid "<strong>Warning:</strong> Some strings have possibly incorrectly encoded characters. This may result in breaking the queries, rendering the page untranslated in live mode. Consider revising the following strings or their method of outputting."
466
  msgstr ""
467
 
468
+ #: ../translatepress/includes/class-translation-render.php:145
469
  msgid "Description"
470
  msgstr ""
471
 
472
+ #: ../translatepress/includes/class-translation-render.php:151
473
  msgid "OG Title"
474
  msgstr ""
475
 
476
+ #: ../translatepress/includes/class-translation-render.php:157
477
  msgid "OG Site Name"
478
  msgstr ""
479
 
480
+ #: ../translatepress/includes/class-translation-render.php:163
481
  msgid "OG Description"
482
  msgstr ""
483
 
484
+ #: ../translatepress/includes/class-translation-render.php:169
485
  msgid "Twitter Title"
486
  msgstr ""
487
 
488
+ #: ../translatepress/includes/class-translation-render.php:175
489
  msgid "Twitter Description"
490
  msgstr ""
491
 
492
+ #: ../translatepress/includes/class-translation-render.php:179
 
 
 
 
493
  msgid "Page Title"
494
  msgstr ""
495
 
501
  msgid "We need to update your translations database to the latest version."
502
  msgstr ""
503
 
504
+ #: ../translatepress/includes/class-upgrade.php:120
505
+ msgid "IMPORTANT: It is strongly recommended to first backup the database!\nAre you sure you want to continue?"
 
 
506
  msgstr ""
507
 
508
  #: ../translatepress/includes/class-upgrade.php:120
518
  msgstr ""
519
 
520
  #: ../translatepress/includes/class-upgrade.php:156, ../translatepress/includes/class-upgrade.php:249, ../translatepress/includes/class-upgrade.php:335, ../translatepress/includes/class-upgrade.php:340
521
+ msgid "Back to TranslatePress Settings"
522
  msgstr ""
523
 
524
  #: ../translatepress/includes/class-upgrade.php:160
569
  msgid "click here"
570
  msgstr ""
571
 
572
+ #: ../translatepress/includes/functions.php:220
573
  msgid "<strong>TranslatePress</strong> requires <strong><a href=\"http://php.net/manual/en/book.mbstring.php\">Multibyte String PHP library</a></strong>. Please contact your server administrator to install it on your server."
574
  msgstr ""
575
 
576
+ #: ../translatepress/index.php:62
577
+ msgid "<strong>TranslatePress</strong> requires at least PHP version 5.6.20+ to run. It is the <a href=\"%s\">minimum requirement of the latest WordPress version</a>. Please contact your server administrator to update your PHP version."
578
+ msgstr ""
579
+
580
+ #: ../translatepress/partials/addons-settings-page.php:8
581
+ msgid "Advanced Addons"
582
+ msgstr ""
583
+
584
+ #: ../translatepress/partials/addons-settings-page.php:9
585
+ msgid "These addons extend your translation plugin and are available in the Developer, Business and Personal plans."
586
+ msgstr ""
587
+
588
+ #: ../translatepress/partials/addons-settings-page.php:17
589
+ msgid "SEO support for page slug, page title, description and facebook and twitter social graph information. </br> The HTML lang attribute is properly set."
590
+ msgstr ""
591
+
592
+ #: ../translatepress/partials/addons-settings-page.php:25
593
+ msgid "Add as many languages as you need for your project to go global.<br>Publish your language only when all your translations are done."
594
+ msgstr ""
595
+
596
+ #: ../translatepress/partials/addons-settings-page.php:31
597
+ msgid "Pro Addons"
598
+ msgstr ""
599
+
600
+ #: ../translatepress/partials/addons-settings-page.php:32
601
+ msgid "These addons extend your translation plugin and are available in the Business and Developer plans."
602
+ msgstr ""
603
+
604
+ #: ../translatepress/partials/addons-settings-page.php:40
605
+ msgid "Automatically redirects new visitors to their preferred language based on browser settings or IP address</br> and remembers the last visited language."
606
+ msgstr ""
607
+
608
+ #: ../translatepress/partials/addons-settings-page.php:48
609
+ msgid "Create translator accounts for new users or allow existing users <br/>that are not administrators to translate your website."
610
+ msgstr ""
611
+
612
+ #: ../translatepress/partials/addons-settings-page.php:56
613
+ msgid "Navigate your website just like a particular user role would. <br/>Really useful for dynamic content or hidden content that appears for particular users."
614
+ msgstr ""
615
+
616
+ #: ../translatepress/partials/addons-settings-page.php:64
617
+ msgid "Configure different menu items for different languages."
618
+ msgstr ""
619
+
620
+ #: ../translatepress/partials/addons-settings-page.php:70
621
+ msgid "Free Addons"
622
+ msgstr ""
623
+
624
+ #: ../translatepress/partials/addons-settings-page.php:71
625
+ msgid "Extend your translation plugin with these free addons."
626
+ msgstr ""
627
+
628
+ #: ../translatepress/partials/addons-settings-page.php:79
629
+ msgid "Use GET parameter to encode language in the url, replacing the language directory. </br> Your urls will look like this: www.example.com?lang=en"
630
+ msgstr ""
631
+
632
  #: ../translatepress/partials/license-settings-page.php:25
633
  msgid "Active on this site"
634
  msgstr ""
658
  msgstr ""
659
 
660
  #: ../translatepress/partials/main-settings-page.php:21
661
+ msgid "Select the original language of your content."
662
  msgstr ""
663
 
664
  #: ../translatepress/partials/main-settings-page.php:25
690
  msgstr ""
691
 
692
  #: ../translatepress/partials/main-settings-page.php:44
693
+ msgid "Select Yes if you want to display languages in their native names. Otherwise, languages will be displayed in English."
694
  msgstr ""
695
 
696
  #: ../translatepress/partials/main-settings-page.php:50
697
+ msgid "Use a subdirectory for the default language"
698
  msgstr ""
699
 
700
  #: ../translatepress/partials/main-settings-page.php:57
701
+ msgid "Select Yes if you want to add the subdirectory in the URL for the default language.</br>By selecting Yes, the default language seen by website visitors will become the first one in the \"All Languages\" list."
702
  msgstr ""
703
 
704
  #: ../translatepress/partials/main-settings-page.php:63
730
  msgstr ""
731
 
732
  #: ../translatepress/partials/main-settings-page.php:95
733
+ msgid "Your HTTP referrer is: %s"
734
  msgstr ""
735
 
736
  #: ../translatepress/partials/main-settings-page.php:102
750
  msgstr ""
751
 
752
  #: ../translatepress/partials/main-settings-page.php:122
753
+ msgid "Go to %1$s Appearance -> Menus%2$s to add languages to the Language Switcher in any menu."
754
  msgstr ""
755
 
756
  #: ../translatepress/partials/main-settings-page.php:123
762
  msgstr ""
763
 
764
  #: ../translatepress/partials/main-settings-page.php:132
765
+ msgid "Add a floating dropdown that follows the user on every page."
766
  msgstr ""
767
 
768
  #: ../translatepress/partials/test-google-key-settings-page.php:15
789
  msgid "Entire Response From wp_remote_get():"
790
  msgstr ""
791
 
792
+ #: ../translatepress/partials/translation-manager.php:38
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
793
  msgid "Current User"
794
  msgstr ""
795
 
796
+ #: ../translatepress/partials/translation-manager.php:39
797
  msgid "Logged Out"
798
  msgstr ""
799
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
800
  #: ../translatepress/partials/trp-remove-duplicate-rows.php:7
801
  msgid "Remove duplicate rows from TranslatePress tables"
802
  msgstr ""
803
 
804
  #: ../translatepress/partials/trp-remove-duplicate-rows.php:10
805
+ msgid "<strong>IMPORTANT NOTE: Before performing this action it is strongly recommended to first backup the database.</strong><br><br>This feature can be used to cleanup duplicate entries in TranslatePress trp_dictionary tables. Such duplicates can appear in exceptional situations of unexpected behavior."
806
+ msgstr ""
807
+
808
+ #: ../translatepress/partials/trp-remove-duplicate-rows.php:12
809
+ msgid "IMPORTANT: It is strongly recommended to first backup the database!!\nAre you sure you want to continue?"
810
  msgstr ""
811
 
812
  #: ../translatepress/partials/trp-remove-duplicate-rows.php:15
814
  msgstr ""
815
 
816
  #: ../translatepress/partials/trp-remove-duplicate-rows.php:19
817
+ msgid "The number of rows to check at once.<br>Choosing a smaller number helps solve the 504 error \"Page took too long to respond\" on large databases.<br>May take several minutes depending on the database size."
818
  msgstr ""
819
 
820
  #: ../translatepress/partials/trp-remove-duplicate-rows.php:28
partials/addons-settings-page.php CHANGED
@@ -5,8 +5,8 @@
5
 
6
  <div class="grid feat-header">
7
  <div class="grid-cell">
8
- <h2>Advanced Addons</h2>
9
- <p>These addons extend your translation plugin and are available in the Developer, Business and Personal plans.</p>
10
  </div>
11
  </div>
12
 
@@ -14,7 +14,7 @@
14
  <div class="grid-cell" style="overflow:hidden;">
15
  <a href="https://translatepress.com/pricing/" target="_blank"><img src="<?php echo esc_url( plugins_url('../assets/images/seo_icon_translatepress.png', __FILE__) ) ?>" alt="SEO" style="float: left; margin: 0 1.5rem 1.5rem 0;"></a>
16
  <h3><a href=" <?php echo trp_add_affiliate_id_to_link('https://translatepress.com/pricing/?utm_source=wpbackend&utm_medium=clientsite&utm_content=addons_tab&utm_campaign=tpfree') ?> " target="_blank"> SEO Pack</a></h3>
17
- <p>SEO support for page slug, page title, description and facebook and twitter social graph information. </br> The HTML lang attribute is properly set.</p>
18
  </div>
19
  </div>
20
 
@@ -22,15 +22,15 @@
22
  <div class="grid-cell" style="overflow:hidden;">
23
  <a href="https://translatepress.com/pricing/" target="_blank"><img src="<?php echo esc_url( plugins_url('../assets/images/multiple_lang_icon.png', __FILE__) ) ?>" alt="Multiple Languages" style="float: left; margin: 0 1.5rem 1.5rem 0;"></a>
24
  <h3><a href=" <?php echo trp_add_affiliate_id_to_link('https://translatepress.com/pricing/?utm_source=wpbackend&utm_medium=clientsite&utm_content=addons_tab&utm_campaign=tpfree') ?> " target="_blank"> Multiple Languages</a></h3>
25
- <p>Add as many languages as you need for your project to go global.<br>
26
- Publish your language only when all your translations are done. </p>
27
  </div>
28
  </div>
29
 
30
  <div class="grid feat-header">
31
  <div class="grid-cell">
32
- <h2>Pro Addons</h2>
33
- <p>These addons extend your translation plugin and are available in the Business and Developer plans.</p>
34
  </div>
35
  </div>
36
 
@@ -38,7 +38,7 @@
38
  <div class="grid-cell" style="overflow:hidden;">
39
  <a href="https://translatepress.com/pricing/" target="_blank"><img src="<?php echo esc_url( plugins_url('../assets/images/auto-detect-language-add-on.png', __FILE__) ) ?>" alt="Automatic User Language Detection" style="float: left; margin: 0 1.5rem 1.5rem 0;"></a>
40
  <h3><a href=" <?php echo trp_add_affiliate_id_to_link('https://translatepress.com/pricing/?utm_source=wpbackend&utm_medium=clientsite&utm_content=addons_tab&utm_campaign=tpfree') ?> " target="_blank"> Automatic User Language Detection</a></h3>
41
- <p>Automatically redirects new visitors to their preferred language based on browser settings or IP address</br> and remembers the last visited language.</p>
42
  </div>
43
  </div>
44
 
@@ -46,7 +46,7 @@
46
  <div class="grid-cell" style="overflow:hidden;">
47
  <a href="https://translatepress.com/pricing/" target="_blank"><img src="<?php echo esc_url( plugins_url('../assets/images/translator-accounts-addon.png', __FILE__) ) ?>" alt="Translator Account" style="float: left; margin: 0 1.5rem 1.5rem 0;"></a>
48
  <h3><a href=" <?php echo trp_add_affiliate_id_to_link('https://translatepress.com/pricing/?utm_source=wpbackend&utm_medium=clientsite&utm_content=addons_tab&utm_campaign=tpfree') ?> " target="_blank"> Translator Accounts</a></h3>
49
- <p>Create translator accounts for new users or allow existing users <br/>that are not administrators to translate your website.</p>
50
  </div>
51
  </div>
52
 
@@ -54,7 +54,7 @@
54
  <div class="grid-cell" style="overflow:hidden;">
55
  <a href="https://translatepress.com/pricing/" target="_blank"><img src="<?php echo esc_url( plugins_url('../assets/images/view-as-addon.png', __FILE__) ) ?>" alt="Browse As User Role" style="float: left; margin: 0 1.5rem 1.5rem 0;"></a>
56
  <h3><a href=" <?php echo trp_add_affiliate_id_to_link('https://translatepress.com/pricing/?utm_source=wpbackend&utm_medium=clientsite&utm_content=addons_tab&utm_campaign=tpfree') ?> " target="_blank"> Browse As User Role</a></h3>
57
- <p>Navigate your website just like a particular user role would. <br/>Really useful for dynamic content or hidden content that appears for particular users.</p>
58
  </div>
59
  </div>
60
 
@@ -62,14 +62,14 @@
62
  <div class="grid-cell" style="overflow:hidden;">
63
  <a href="https://translatepress.com/pricing/" target="_blank"><img src="<?php echo esc_url( plugins_url('../assets/images/menu_based_on_lang.png', __FILE__) ) ?>" alt="Navigation Based on Language" style="float: left; margin: 0 1.5rem 1.5rem 0;"></a>
64
  <h3><a href=" <?php echo trp_add_affiliate_id_to_link('https://translatepress.com/pricing/?utm_source=wpbackend&utm_medium=clientsite&utm_content=addons_tab&utm_campaign=tpfree') ?> " target="_blank"> Navigation Based on Language</a></h3>
65
- <p>Configure different menu items for different languages.</p>
66
  </div>
67
  </div>
68
 
69
  <div class="grid feat-header">
70
  <div class="grid-cell">
71
- <h2>Free Addons</h2>
72
- <p>Extend your translation plugin with these free addons.</p>
73
  </div>
74
  </div>
75
 
@@ -77,7 +77,7 @@
77
  <div class="grid-cell" style="overflow:hidden;">
78
  <a href="https://translatepress.com/docs/addons/language-get-parameter/" target="_blank"><img src="<?php echo esc_url( plugins_url('../assets/images/get_param_addon.jpg', __FILE__) ) ?>" alt="Language by GET parameter" style="float: left; margin: 0 1.5rem 1.5rem 0;"></a>
79
  <h3 id="language-by-get-parameter"><a href=" <?php echo trp_add_affiliate_id_to_link('https://translatepress.com/pricing/?utm_source=wpbackend&utm_medium=clientsite&utm_content=addons_tab&utm_campaign=tpfree') ?> " target="_blank"> Language by GET parameter </a></h3>
80
- <p>Use GET parameter to encode language in the url, replacing the language directory. </br> Your urls will look like this: www.example.com?lang=en</p>
81
  </div>
82
  </div>
83
  </div>
5
 
6
  <div class="grid feat-header">
7
  <div class="grid-cell">
8
+ <h2><?php _e( 'Advanced Addons', 'translatepress-multilingual' );?></h2>
9
+ <p><?php _e( 'These addons extend your translation plugin and are available in the Developer, Business and Personal plans.', 'translatepress-multilingual' );?></p>
10
  </div>
11
  </div>
12
 
14
  <div class="grid-cell" style="overflow:hidden;">
15
  <a href="https://translatepress.com/pricing/" target="_blank"><img src="<?php echo esc_url( plugins_url('../assets/images/seo_icon_translatepress.png', __FILE__) ) ?>" alt="SEO" style="float: left; margin: 0 1.5rem 1.5rem 0;"></a>
16
  <h3><a href=" <?php echo trp_add_affiliate_id_to_link('https://translatepress.com/pricing/?utm_source=wpbackend&utm_medium=clientsite&utm_content=addons_tab&utm_campaign=tpfree') ?> " target="_blank"> SEO Pack</a></h3>
17
+ <p><?php _e( 'SEO support for page slug, page title, description and facebook and twitter social graph information. </br> The HTML lang attribute is properly set.', 'translatepress-multilingual' );?></p>
18
  </div>
19
  </div>
20
 
22
  <div class="grid-cell" style="overflow:hidden;">
23
  <a href="https://translatepress.com/pricing/" target="_blank"><img src="<?php echo esc_url( plugins_url('../assets/images/multiple_lang_icon.png', __FILE__) ) ?>" alt="Multiple Languages" style="float: left; margin: 0 1.5rem 1.5rem 0;"></a>
24
  <h3><a href=" <?php echo trp_add_affiliate_id_to_link('https://translatepress.com/pricing/?utm_source=wpbackend&utm_medium=clientsite&utm_content=addons_tab&utm_campaign=tpfree') ?> " target="_blank"> Multiple Languages</a></h3>
25
+ <p><?php _e( 'Add as many languages as you need for your project to go global.<br>
26
+ Publish your language only when all your translations are done.', 'translatepress-multilingual' );?> </p>
27
  </div>
28
  </div>
29
 
30
  <div class="grid feat-header">
31
  <div class="grid-cell">
32
+ <h2><?php _e( 'Pro Addons', 'translatepress-multilingual' );?></h2>
33
+ <p><?php _e( 'These addons extend your translation plugin and are available in the Business and Developer plans.', 'translatepress-multilingual' );?></p>
34
  </div>
35
  </div>
36
 
38
  <div class="grid-cell" style="overflow:hidden;">
39
  <a href="https://translatepress.com/pricing/" target="_blank"><img src="<?php echo esc_url( plugins_url('../assets/images/auto-detect-language-add-on.png', __FILE__) ) ?>" alt="Automatic User Language Detection" style="float: left; margin: 0 1.5rem 1.5rem 0;"></a>
40
  <h3><a href=" <?php echo trp_add_affiliate_id_to_link('https://translatepress.com/pricing/?utm_source=wpbackend&utm_medium=clientsite&utm_content=addons_tab&utm_campaign=tpfree') ?> " target="_blank"> Automatic User Language Detection</a></h3>
41
+ <p><?php _e( 'Automatically redirects new visitors to their preferred language based on browser settings or IP address</br> and remembers the last visited language.', 'translatepress-multilingual' );?></p>
42
  </div>
43
  </div>
44
 
46
  <div class="grid-cell" style="overflow:hidden;">
47
  <a href="https://translatepress.com/pricing/" target="_blank"><img src="<?php echo esc_url( plugins_url('../assets/images/translator-accounts-addon.png', __FILE__) ) ?>" alt="Translator Account" style="float: left; margin: 0 1.5rem 1.5rem 0;"></a>
48
  <h3><a href=" <?php echo trp_add_affiliate_id_to_link('https://translatepress.com/pricing/?utm_source=wpbackend&utm_medium=clientsite&utm_content=addons_tab&utm_campaign=tpfree') ?> " target="_blank"> Translator Accounts</a></h3>
49
+ <p><?php _e( 'Create translator accounts for new users or allow existing users <br/>that are not administrators to translate your website.', 'translatepress-multilingual' );?></p>
50
  </div>
51
  </div>
52
 
54
  <div class="grid-cell" style="overflow:hidden;">
55
  <a href="https://translatepress.com/pricing/" target="_blank"><img src="<?php echo esc_url( plugins_url('../assets/images/view-as-addon.png', __FILE__) ) ?>" alt="Browse As User Role" style="float: left; margin: 0 1.5rem 1.5rem 0;"></a>
56
  <h3><a href=" <?php echo trp_add_affiliate_id_to_link('https://translatepress.com/pricing/?utm_source=wpbackend&utm_medium=clientsite&utm_content=addons_tab&utm_campaign=tpfree') ?> " target="_blank"> Browse As User Role</a></h3>
57
+ <p><?php _e( 'Navigate your website just like a particular user role would. <br/>Really useful for dynamic content or hidden content that appears for particular users.', 'translatepress-multilingual' );?></p>
58
  </div>
59
  </div>
60
 
62
  <div class="grid-cell" style="overflow:hidden;">
63
  <a href="https://translatepress.com/pricing/" target="_blank"><img src="<?php echo esc_url( plugins_url('../assets/images/menu_based_on_lang.png', __FILE__) ) ?>" alt="Navigation Based on Language" style="float: left; margin: 0 1.5rem 1.5rem 0;"></a>
64
  <h3><a href=" <?php echo trp_add_affiliate_id_to_link('https://translatepress.com/pricing/?utm_source=wpbackend&utm_medium=clientsite&utm_content=addons_tab&utm_campaign=tpfree') ?> " target="_blank"> Navigation Based on Language</a></h3>
65
+ <p><?php _e( 'Configure different menu items for different languages.', 'translatepress-multilingual' );?></p>
66
  </div>
67
  </div>
68
 
69
  <div class="grid feat-header">
70
  <div class="grid-cell">
71
+ <h2><?php _e( 'Free Addons', 'translatepress-multilingual' );?></h2>
72
+ <p><?php _e( 'Extend your translation plugin with these free addons.', 'translatepress-multilingual' );?></p>
73
  </div>
74
  </div>
75
 
77
  <div class="grid-cell" style="overflow:hidden;">
78
  <a href="https://translatepress.com/docs/addons/language-get-parameter/" target="_blank"><img src="<?php echo esc_url( plugins_url('../assets/images/get_param_addon.jpg', __FILE__) ) ?>" alt="Language by GET parameter" style="float: left; margin: 0 1.5rem 1.5rem 0;"></a>
79
  <h3 id="language-by-get-parameter"><a href=" <?php echo trp_add_affiliate_id_to_link('https://translatepress.com/pricing/?utm_source=wpbackend&utm_medium=clientsite&utm_content=addons_tab&utm_campaign=tpfree') ?> " target="_blank"> Language by GET parameter </a></h3>
80
+ <p><?php _e( 'Use GET parameter to encode language in the url, replacing the language directory. </br> Your urls will look like this: www.example.com?lang=en', 'translatepress-multilingual' );?></p>
81
  </div>
82
  </div>
83
  </div>
partials/main-settings-page.php CHANGED
@@ -18,7 +18,7 @@
18
  <?php }?>
19
  </select>
20
  <p class="description">
21
- <?php esc_html_e( 'Select the original language your website was written in. ', 'translatepress-multilingual' ); ?>
22
  </p>
23
 
24
  <p class="warning" style="display: none;" >
@@ -41,20 +41,20 @@
41
  <option value="native_name" <?php selected( $this->settings['native_or_english_name'], 'native_name' ); ?>><?php esc_html_e( 'Yes', 'translatepress-multilingual') ?></option>
42
  </select>
43
  <p class="description">
44
- <?php esc_html_e( 'Select Yes if you want languages to display in their native names. Otherwise, they will be displayed in English.', 'translatepress-multilingual' ); ?>
45
  </p>
46
  </td>
47
  </tr>
48
 
49
  <tr>
50
- <th scope="row"><?php esc_html_e( 'Use subdirectory for default language', 'translatepress-multilingual' ); ?> </th>
51
  <td>
52
  <select id="trp-subdirectory-for-default-language" name="trp_settings[add-subdirectory-to-default-language]" class="trp-select">
53
  <option value="no" <?php selected( $this->settings['add-subdirectory-to-default-language'], 'no' ); ?>><?php esc_html_e( 'No', 'translatepress-multilingual') ?></option>
54
  <option value="yes" <?php selected( $this->settings['add-subdirectory-to-default-language'], 'yes' ); ?>><?php esc_html_e( 'Yes', 'translatepress-multilingual') ?></option>
55
  </select>
56
  <p class="description">
57
- <?php echo wp_kses ( __( 'Select Yes if you want to add the subdirectory in the url for the default language.</br>By selecting Yes, the default language seen by website visitors will become the first one in the "All Languages" list.', 'translatepress-multilingual' ), array( 'br' => array() ) ); ?>
58
  </p>
59
  </td>
60
  </tr>
@@ -119,7 +119,7 @@
119
  <?php
120
  $link_start = '<a href="' . esc_url( admin_url( 'nav-menus.php' ) ) .'">';
121
  $link_end = '</a>';
122
- printf( wp_kses( __( 'Go to %1$s Appearance -> Menus%2$s to add Language Switcher Languages in any menu.', 'translatepress-multilingual' ), [ 'a' => [ 'href' => [] ] ] ), $link_start, $link_end ); ?>
123
  <a href="https://translatepress.com/docs/settings/#language-switcher"><?php esc_html_e( 'Learn more in our documentation.', 'translatepress-multilingual' ); ?></a>
124
  </p>
125
  </div>
@@ -129,7 +129,7 @@
129
  <?php $this->output_language_switcher_select( 'floater-options', $this->settings['floater-options'] ); ?>
130
  </div>
131
  <p class="description">
132
- <?php esc_html_e( 'Have a floating dropdown following the user on every page.', 'translatepress-multilingual' ); ?>
133
  </p>
134
  </div>
135
  </td>
18
  <?php }?>
19
  </select>
20
  <p class="description">
21
+ <?php esc_html_e( 'Select the original language of your content.', 'translatepress-multilingual' ); ?>
22
  </p>
23
 
24
  <p class="warning" style="display: none;" >
41
  <option value="native_name" <?php selected( $this->settings['native_or_english_name'], 'native_name' ); ?>><?php esc_html_e( 'Yes', 'translatepress-multilingual') ?></option>
42
  </select>
43
  <p class="description">
44
+ <?php esc_html_e( 'Select Yes if you want to display languages in their native names. Otherwise, languages will be displayed in English.', 'translatepress-multilingual' ); ?>
45
  </p>
46
  </td>
47
  </tr>
48
 
49
  <tr>
50
+ <th scope="row"><?php esc_html_e( 'Use a subdirectory for the default language', 'translatepress-multilingual' ); ?> </th>
51
  <td>
52
  <select id="trp-subdirectory-for-default-language" name="trp_settings[add-subdirectory-to-default-language]" class="trp-select">
53
  <option value="no" <?php selected( $this->settings['add-subdirectory-to-default-language'], 'no' ); ?>><?php esc_html_e( 'No', 'translatepress-multilingual') ?></option>
54
  <option value="yes" <?php selected( $this->settings['add-subdirectory-to-default-language'], 'yes' ); ?>><?php esc_html_e( 'Yes', 'translatepress-multilingual') ?></option>
55
  </select>
56
  <p class="description">
57
+ <?php echo wp_kses ( __( 'Select Yes if you want to add the subdirectory in the URL for the default language.</br>By selecting Yes, the default language seen by website visitors will become the first one in the "All Languages" list.', 'translatepress-multilingual' ), array( 'br' => array() ) ); ?>
58
  </p>
59
  </td>
60
  </tr>
119
  <?php
120
  $link_start = '<a href="' . esc_url( admin_url( 'nav-menus.php' ) ) .'">';
121
  $link_end = '</a>';
122
+ printf( wp_kses( __( 'Go to %1$s Appearance -> Menus%2$s to add languages to the Language Switcher in any menu.', 'translatepress-multilingual' ), [ 'a' => [ 'href' => [] ] ] ), $link_start, $link_end ); ?>
123
  <a href="https://translatepress.com/docs/settings/#language-switcher"><?php esc_html_e( 'Learn more in our documentation.', 'translatepress-multilingual' ); ?></a>
124
  </p>
125
  </div>
129
  <?php $this->output_language_switcher_select( 'floater-options', $this->settings['floater-options'] ); ?>
130
  </div>
131
  <p class="description">
132
+ <?php esc_html_e( 'Add a floating dropdown that follows the user on every page.', 'translatepress-multilingual' ); ?>
133
  </p>
134
  </div>
135
  </td>
partials/trp-remove-duplicate-rows.php CHANGED
@@ -7,16 +7,16 @@
7
  <h2><?php esc_html_e('Remove duplicate rows from TranslatePress tables', 'translatepress-multilingual' );?> </h2>
8
  <?php if ( empty( $_GET['trp_rm_duplicates'] ) ){ ?>
9
  <div>
10
- <?php esc_html_e( '<strong>IMPORTANT NOTE: Before performing this action it is strongly recommended to backup the database first.</strong><br><br>This feature can be used to cleanup duplicate entries in TranslatePress trp_dictionary tables. Such duplicates can appear in exceptional situations of unexpected behavior.', 'translatepress-multilingual' )?>
11
  </div>
12
- <form onsubmit="return confirm('<?php echo esc_js( __( 'IMPORTANT: It is strongly recommended to backup the database first!\nAre you sure you want to continue?', 'translatepress-multilingual' ) ); ?>');">
13
  <table class="form-table">
14
  <tr>
15
  <th scope="row"><?php esc_html_e( 'Batch size', 'translatepress-multilingual' ); ?></th>
16
  <td>
17
  <input name="trp_rm_batch_size" type="number" value="10000" step="100" min="100">
18
  <p>
19
- <i><?php esc_html_e( 'The number of rows to check at once.<br>Choosing a smaller number helps solve the 502 error "Page took too long to respond" on large databases.<br>May take several minutes depending on the database size.', 'translatepress-multilingual' ); ?></i>
20
  </p>
21
  </td>
22
  </tr>
7
  <h2><?php esc_html_e('Remove duplicate rows from TranslatePress tables', 'translatepress-multilingual' );?> </h2>
8
  <?php if ( empty( $_GET['trp_rm_duplicates'] ) ){ ?>
9
  <div>
10
+ <?php esc_html_e( '<strong>IMPORTANT NOTE: Before performing this action it is strongly recommended to first backup the database.</strong><br><br>This feature can be used to cleanup duplicate entries in TranslatePress trp_dictionary tables. Such duplicates can appear in exceptional situations of unexpected behavior.', 'translatepress-multilingual' )?>
11
  </div>
12
+ <form onsubmit="return confirm('<?php echo esc_js( __( 'IMPORTANT: It is strongly recommended to first backup the database!!\nAre you sure you want to continue?', 'translatepress-multilingual' ) ); ?>');">
13
  <table class="form-table">
14
  <tr>
15
  <th scope="row"><?php esc_html_e( 'Batch size', 'translatepress-multilingual' ); ?></th>
16
  <td>
17
  <input name="trp_rm_batch_size" type="number" value="10000" step="100" min="100">
18
  <p>
19
+ <i><?php esc_html_e( 'The number of rows to check at once.<br>Choosing a smaller number helps solve the 504 error "Page took too long to respond" on large databases.<br>May take several minutes depending on the database size.', 'translatepress-multilingual' ); ?></i>
20
  </p>
21
  </td>
22
  </tr>
readme.txt CHANGED
@@ -1,501 +1,555 @@
1
- === TranslatePress - Translate Multilingual sites ===
2
- Contributors: cozmoslabs, razvan.mo, madalin.ungureanu, cristophor
3
- Donate link: https://www.translatepress.com/
4
- Tags: translate, translation, multilingual, automatic translation, bilingual, front-end translation, google translate, language
5
- Requires at least: 3.1.0
6
- Tested up to: 5.2.2
7
- Requires PHP: 5.6.20
8
- Stable tag: 1.5.0
9
- License: GPLv2 or later
10
- License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
-
12
- Easily translate your entire site directly from the front-end and go multilingual, with full support for WooCommerce, complex themes and site builders. Integrates with Google Translate.
13
-
14
- == Description ==
15
-
16
- **Experience a better way to translate your WordPress site and go multilingual, directly from the front-end using a friendly user interface.**
17
-
18
- TranslatePress is a [WordPress translation plugin](https://translatepress.com/?utm_source=wp.org&utm_medium=tp-description-page&utm_campaign=TPFree) that anyone can use.
19
-
20
- The interface allows you to easily translate the entire page at once, including output from shortcodes, forms and page builders. It also works out of the box with WooCommerce.
21
-
22
- Built the WordPress way, TranslatePress - Multilingual is a GPL and self hosted translation plugin, meaning you'll own all your translations, forever. It's the fastest way to create a bilingual or multilingual site.
23
-
24
- https://www.youtube.com/watch?v=pUlYisvBm8g
25
-
26
- == Multilingual & Translation Features ==
27
-
28
- * Translate all your website content directly from the front-end, in a friendly user interface (translation displayed in real-time).
29
- * Fully compatible with all themes and plugins
30
- * Live preview of your translated pages, as you edit your translations.
31
- * [Image translation](https://translatepress.com/docs/image-translation/?utm_source=wp.org&utm_medium=tp-description-page&utm_campaign=TPFree) support, allowing you to [translate images, sliders and other media](https://translatepress.com/translate-images-in-wordpress/?utm_source=wp.org&utm_medium=tp-description-page&utm_campaign=TPFree).
32
- * Support for both manual and automatic translation (via Google Translate)
33
- * Ability to [translate dynamic strings](https://translatepress.com/translate-dynamic-strings-wordpress/?utm_source=wp.org&utm_medium=tp-description-page&utm_campaign=TPFree) (gettext) added by WordPress, plugins and themes.
34
- * Integrates with Google Translate, allowing you to set up Automatic Translation using your own Google API key.
35
- * Translate larger html blocks by merging strings into translation blocks.
36
- * Select specific html blocks for translation using the css class **translation-block**. `<p class="translation-block">Translate <em>everything</em> inside</p>`
37
- * Place language switchers anywhere using shortcode **[language-switcher]**, WP menu item or as a floating dropdown.
38
- * Editorial control allowing you to publish your language only when all your translations are done
39
- * Conditional display content shortcode based on language [trp_language language="en_US"] English content only [/trp_language]
40
- * Possibility to [edit gettext strings](https://translatepress.com/edit-plugin-strings/?utm_source=wp.org&utm_medium=tp-description-page&utm_campaign=TPFree) from themes and plugins from english to english, without adding another language. Basically a string-replace functionality.
41
- * Translation Block feature in which you can translate multiple html elements together
42
- * Native **Gutenberg** support, so you can easily [translate Gutenberg blocks](https://translatepress.com/translate-gutenberg-blocks-in-wordpress/?utm_source=wp.org&utm_medium=tp-description-page&utm_campaign=TPFree)
43
- * Out of the box [WooCommerce](https://translatepress.com/translate-woocommerce-products-translatepress/?utm_source=wp.org&utm_medium=tp-description-page&utm_campaign=TPFree) compatibility
44
-
45
- Note: this WordPress translation plugin uses the Google Translation API to translate the strings on your site. This feature can be enabled or disabled according to your preferences.
46
-
47
- Users with administrator rights have access to the following translate settings:
48
-
49
- * select default language of the website and one translation language, for bilingual sites
50
- * choose whether language switcher should display languages in their native names or English name
51
- * force custom links to open in current language
52
- * enable or disable url subdirectory for the default language
53
- * enable automatic translation via Google Translate
54
-
55
- == Powerful Translation Add-ons ==
56
-
57
- TranslatePress - Multilingual has a range of [premium Add-ons](https://translatepress.com/?utm_source=wp.org&utm_medium=tp-description-page&utm_campaign=TPFree) that allow you to extend the power of the WordPress translation plugin:
58
-
59
- **Pro Add-ons** (available in the [premium versions](https://translatepress.com/pricing/?utm_source=wp.org&utm_medium=tp-description-page&utm_campaign=TPFree) only)
60
-
61
- * [Extra Languages](https://translatepress.com/docs/addons/seo-pack/?utm_source=wp.org&utm_medium=tp-description-page&utm_campaign=TPFree) - allows you to add an unlimited number of translation languages, with the possibility to publish languages later after you complete the translation
62
- * [SEO Pack](https://translatepress.com/docs/addons/multiple-languages/?utm_source=wp.org&utm_medium=tp-description-page&utm_campaign=TPFree) - allows you to translate meta information (like page title, description, url slug, image alt tag, Twitter and Facebook Social Graph tags & more) for boosting your multilingual SEO and increase traffic
63
- * [Translator Accounts](https://translatepress.com/docs/addons/translator-accounts/?utm_source=wp.org&utm_medium=tp-description-page&utm_campaign=TPFree) - create or allow existing users to translate the site without admin rights
64
- * [Browse as User Role](https://translatepress.com/docs/addons/browse-as-role/?utm_source=wp.org&utm_medium=tp-description-page&utm_campaign=TPFree) - view and translate content that is visible only to a particular user role
65
- * [Navigation Based on Language](https://translatepress.com/docs/addons/navigate-based-language/?utm_source=wp.org&utm_medium=tp-description-page&utm_campaign=TPFree) - configure and display different menu items for different languages
66
- * [Automatic User Language Detection](https://translatepress.com/docs/addons/automatic-user-language-detection/?utm_source=wp.org&utm_medium=tp-description-page&utm_campaign=TPFree) - redirect first time visitors to their preferred language based on their browser settings or IP address
67
-
68
- **Free Add-ons**
69
-
70
- * [Language by GET parameter](https://translatepress.com/docs/addons/language-get-parameter/?utm_source=wp.org&utm_medium=tp-description-page&utm_campaign=TPFree) - enables the language in the URL to be encoded as a GET Parameter
71
-
72
- **Keyboard Shortcuts**
73
-
74
- * **CTRL ( ⌘ ) + S** – Save translation for the currently editing strings
75
- * **CTRL ( ⌘ ) + ALT + Z** – Discard all changes for the currently editing strings
76
- * **CTRL ( ⌘ ) + ALT + →** (Right Arrow) – Navigate to next string to translate
77
- * **CTRL ( ⌘ ) + ALT + ←** (Left Arrow) – Navigate to previous string to translate
78
-
79
- = Website =
80
-
81
- [translatepress.com](https://translatepress.com/?utm_source=wp.org&utm_medium=tp-description-page&utm_campaign=TPFree)
82
-
83
- = Documentation =
84
-
85
- [Visit TranslatePress WordPress Translation plugin documentation page](https://translatepress.com/docs/translatepress/?utm_source=wp.org&utm_medium=tp-description-page&utm_campaign=TPFree)
86
-
87
- = Add-ons =
88
-
89
- [Add-ons](https://translatepress.com/docs/translatepress/?utm_source=wp.org&utm_medium=tp-description-page&utm_campaign=TPFree)
90
-
91
- = Demo Site =
92
-
93
- You can test out TranslatePress - Multilingual plugin by [visiting our demo site](https://demo.translatepress.com/)
94
-
95
- == Installation ==
96
-
97
- 1. Upload the translatepress folder to the '/wp-content/plugins/' directory
98
- 2. Activate the plugin through the 'Plugins' menu in WordPress
99
- 3. Go to Settings -> TranslatePress and choose a translation language.
100
- 4. Open the front-end translation editor from the admin bar to translate your site.
101
-
102
- == Frequently Asked Questions ==
103
-
104
- = Where are my translations stored? =
105
-
106
- All the translation are stored locally in your server's database.
107
-
108
- = What types of content can I translate? =
109
-
110
- TranslatePress - Multilingual plugin works out of the box with WooCommerce, custom post types, complex themes and site builders, so you'll be able to translate any type of content.
111
-
112
- = How is it different from other multilingual & translation plugins like WPML or Polylang? =
113
-
114
- TranslatePress is easier to use and more intuitive altogether. No more switching between the editor, string translation interfaces or badly translated plugins. You can now translate the full page content directly from the front-end. This makes TranslatePress a great alternative to plugins like Polylang and WPML.
115
-
116
- = How do I start to translate my WordPress site? =
117
-
118
- After installing the plugin, select your secondary language and click "Translate Site" to start translating your entire site exactly as it looks in the front-end.
119
-
120
- = Will it slow down my website? =
121
-
122
- TranslatePress will have little impact on your site speed. For more details see [Top WordPress Translation Plugins Compared Based on Page Load Time](https://translatepress.com/top-wordpress-translation-plugins-compared-based-on-page-load-time/?utm_source=wp.org&utm_medium=tp-description-page&utm_campaign=TPFree)
123
-
124
- = Does it work with WooCommerce? =
125
-
126
- Yes, TranslatePress works out of the box with WooCommerce. You can use it to [translate WooCommerce products](https://translatepress.com/translate-woocommerce-products-translatepress/?utm_source=wp.org&utm_medium=tp-description-page&utm_campaign=TPFree) and build a multilingual store.
127
-
128
- = Where can I find out more information? =
129
-
130
- For more information please check out [TranslatePress - Multilingual plugin documentation](https://translatepress.com/docs/translatepress/?utm_source=wp.org&utm_medium=tp-description-page&utm_campaign=TPFree).
131
-
132
-
133
- == Screenshots ==
134
- 1. TranslatePress front-end visual translation editor in action
135
- 2. Front-end translation editor used to translate the entire page content
136
- 3. How to translate a Dynamic String (gettext) using TranslatePress - Multilingual
137
- 4. Translate WooCommerce Products using TranslatePress - Multilingual
138
- 5. Translate Images and Image Sliders
139
- 6. Settings Page for TranslatePress - Multilingual
140
- 7. Floating Language Switcher added by TranslatePress - Multilingual
141
- 8. Menu Language Switcher
142
-
143
-
144
- == Changelog ==
145
- = 1.5.0 =
146
- * Fixed some dynamic images not showing up in translated pages.
147
-
148
- = 1.4.9 =
149
- * Fixed incompatibility with custom code for changing flags
150
- * Fixed some pages not being translated due to incorrectly encoded character
151
- * Fixed some images missing when automatic translation is on
152
-
153
- = 1.4.8 =
154
- * Added support for translating images
155
- * Added support for translating title attribute
156
- * Added support for translating href pointing to internal files and href pointing to any external links
157
- * Added support for translating attributes modified dynamically through JS
158
- * Added support for translating multiple attributes on the same node
159
- * Added support for translating nodes containing mixt of gettext and user-inputted strings
160
- * Added notification and disabled TP for servers not running minimum PHP version 5.6.20
161
- * Refactored and improved Translation Editor user interface
162
- * Added Keyboard shortcuts: CTRL + S (save), CTRL + ALT + Z (discard all changes), CTRL + ALT + LEFT (previous string), CTRL + ALT + RIGHT (next string)
163
- * Fixed issues with translation blocks not working on some instances
164
- * Security improvements
165
-
166
- = 1.4.7 =
167
- * Fixed a php error in previous commit
168
-
169
- = 1.4.6 =
170
- * Fixed a js compatibility error with mootools.js
171
- * Modified how the license page works and added plugin notifications
172
- * Allow compatibility fix for Translation Editor on certain environments
173
- * Fixed Safari bug with links when WooCommerce active
174
-
175
- = 1.4.5 =
176
- * Performance improvements
177
- * Fixed an issue that was causing empty strings to get inserted in the database
178
- * Improvements to detecting dynamic js strings earlier
179
- * Fixes some urls for sitemap
180
- * We now check if str_get_html is successful to avoid fatal error
181
- * Fixed regular string loaded by ajax not detected in translation editor
182
- * We now allow translating WooCommerce product base name separately from selected variations
183
- * Fixed WooCommerce cart details not being translated when changing language
184
- * Fixed Automatic Google Translation on languages not published yet
185
- * Fixed Translation Editor not working in default language when no translation language is published yet
186
- * Fixed gettext wrapping characters showing up in WooCommerce Shipping taxes metabox on Order pages
187
-
188
- = 1.4.4 =
189
- * Added more filters
190
- * Make sure we do not insert empty strings in the gettext translation table
191
- * Added support for Affiliate tracking
192
-
193
- = 1.4.3 =
194
- * Fixed an issue with the Language by Get Parameter add-on
195
- * Added compatibility with WooCommerce PDF invoice and WooCommerce's order notes.
196
- * Added stop_translating_page and before_running_hooks hooks.
197
- * Refactored hooks-loader to easily remove hook
198
-
199
- = 1.4.2 =
200
- * Fixes the issue with not being able to publish pages when Use subdirectory for default language is set to yes and Gutenberg is installed
201
- * Fixed an issue with Elementor and Use subdirectory for default language set to yes
202
- * Fixed an issue with Yoast Premium and Use subdirectory for default language set to yes
203
- * Fixed missing spaces in translations for original gettext strings with untrimmed spaces
204
-
205
- = 1.4.1 =
206
- * Added PHP 7.3 support
207
- * Performance improvements
208
-
209
- = 1.4.0 =
210
- * Added Enfold compatibility by increasing the template_include hook priority
211
- * Add the costa rica flag
212
- * Speed improvements by optimizing the full_trim function
213
- * Added compatibility for WooCommerce Invoices plugins
214
- * Fixed querying for dynamic strings in Translation Editor not bringing up translations for all languages
215
- * Fixed notice when gettext table is empty
216
- * Added function to display strings with bad encoding in Translation Editor
217
-
218
-
219
- = 1.3.9 =
220
- * Fixed some issues with url translations
221
- * Speed improvements
222
- * Add Javanese flag
223
- * Fixed issue with trimming dynamic strings in our own ajax calls
224
-
225
- = 1.3.8 =
226
- * Speed improvements
227
- * Remove notices from Editor when we don't have translation languages
228
- * Fixed notices with referrer in translator machine
229
- * Fixed issues with urls in other languages
230
- * Fix issue of nested gettext resulting in unwanted characters
231
- * Strip gettext tags from urls run through sanitize_title and esc_url
232
- * Set caching calls non-persistent. Doesn't work with object caching otherwise
233
- * Set lang attribute in html tag all the time including when on default language
234
- * Refactored the way we translate json
235
- * Fixed issue with Woocommerce ajax calls
236
-
237
- = 1.3.7 =
238
- * Fixed an issue with Woocommerce and redirects when the default language is not English
239
- * Speed improvements
240
- * Fix relative url without a trailingslash not getting a proper link back
241
- * Add ?trp=edit-translation=preview to ajax loaded content. Also add it to all dynamic content.
242
- * Added language code column in settings
243
- * Removed async false from JS translate-dom-changes
244
-
245
- = 1.3.6 =
246
- * Refactored the get_url_for_language() function which should fix a lot of problems with links
247
- * Speed improvements
248
- * Fixed translation block icon when creating a new block
249
- * Fixed issues with trp tags leftovers in html
250
- * Fixed issues with gettext strings that weren't detected correctly
251
- * Add support for relative url's
252
- * Added warning in settings about controlling costs of Google API
253
- * Changed API key field description. Added feature to show/hide API key field based on Google Translate Active Yes/No
254
- * Fixed Translated-dom-changes string not translated through trp-ajax.
255
- * Fixed 400 errors in google translate API
256
-
257
- = 1.3.5 =
258
- * Fixed translation problems introduced in the last two versions
259
- * Added a console message when trp-ajax request uses fall back to admin ajax for debugging purposes.
260
-
261
- = 1.3.4 =
262
- * Fixed issue with options in select tag that couldn't be translated
263
- * Fixed force language in custom links
264
- * Fixed Woocommerce links fpr products or categories that were added by the user manually in a page
265
- * Added Settings link to the list of links displayed on Plugins page
266
- * Fixed issue with Kazakhstan flag
267
-
268
- = 1.3.3 =
269
- * Fixed issue with Woocommerce ajax strings that were broken in editor on default language in some cases
270
- * Speed improvements
271
-
272
- = 1.3.2 =
273
- * Speed improvements
274
- * Add support for the Ginger EU Cookie Law plugin
275
- * Add support for data-no-dynamic-translation attribute that skips dynamic strings from being translated by dom changes detector
276
- * Fixed Edit Pencil icon css in Translation Editor for some sites
277
- * Refactored the way we add trp-gettext tag. This should have a lot of benefits in compatibility with other plugins
278
- * Optimized block translation detection
279
- * Added caching to trp_x function when reading external .mo files
280
- * Fixed issue with translatepress icon css that was broken on wpforms forms
281
- * Added secret page for removing duplicate rows from database: wp-admin/admin.php?page=trp_remove_duplicate_rows
282
-
283
- = 1.3.1 =
284
- * Fixed Woocommerce translation of permalinks
285
- * Added support for remove_accents to be based on default language when called from the sanitize_title function
286
- * Added support for translating JSON found in custom ajax request
287
- * Added better REST compatibility
288
- * Added compatibility for Peepso plugin
289
- * Fixed TranslatePress roken link to google translate set up api key on settings page
290
- * Corrected flags for Arabic and Bengali languages
291
- * Fixed issue with multiple slashes being added when the URL had extra get parameters
292
-
293
- = 1.3.0 =
294
- * Added support for word trim when the default language is japanese, chinese or thai.
295
- * Exluded wp_trim_words funtion from our gettext filter to prevent som issues
296
- * Fixed an issue with gettext inside attributes that passed through the wp_kses function.
297
- * Fixed issues with the Customizer
298
- * Added padding to the language switcher image so we don't conflict with themes that add extra padding to images inside links
299
- * We no longer remove \r \n \t from the translation
300
- * Fixed issue with title attribute that contained html
301
- * Added a filter to all href attributes detected on our translation page
302
- * Added a notice to inform admins of the missing mbstring php library
303
- * We now send all error logs to debug.log
304
- * Added cite and blockquote as top_parents for merge rule on Translation blocks
305
- * Fixed nonce accidentally being passed through internationalized function
306
-
307
- = 1.2.9 =
308
- * Rearranged and renamed some languages in the options dropdown
309
- * Fixed flag of Khmer language
310
- * Added Automatic Language Detection notice and included it on add-ons page
311
- * Fixed an issue with WooCommerce checkout and Stripe Gateway
312
- * Fixed issues with some improper responses from the WP Remote API functions
313
- * Fixed minor issues with ajax
314
-
315
- = 1.2.8 =
316
- * Added a lot of hooks in the translation manager interface so other people can insert new content there.
317
- * We now take into account the presence of www or lack of it in custom links that might be local
318
- * We now make sure we're not changing the locale in the backend if the language order is different.
319
- * Fixed issue with incorrect language adding in the backend that caused notices in the front-end
320
- * Removed obsolete function add_cookie
321
- * Fixed trailingslashit over get_permalink in url-converter
322
- * Removed adding cookie from php. Fixed enqueue_styles on license and add-ons tabs. Removed deprecated function.
323
-
324
- = 1.2.7 =
325
- * Added a warning when changing the default language that it will invalidate their existing translations
326
- * Fixed incorrect detection of the form action language parameter
327
- * Improved compatibility with themes and plugins that use object buffering
328
- * Fixed some issues with image urls
329
-
330
- = 1.2.6 =
331
- * Refactored determining language, redirecting and cookie adding
332
- * Removed leftover trp-gettext tags when WooCommerce is active on some pages
333
- * Fixed get_url_for_language function that was having problems in some cases.
334
-
335
- = 1.2.5 =
336
- * Fixed DOM changes script not being enqueued anymore
337
-
338
- = 1.2.4 =
339
- * Refactor the shortcode language switcher so it's now HTML similar to the floater
340
- * Added link to Appearance -> menus in TranslatePress settings page
341
- * Fixed language redirect with permalinks so custom parameters are passed correctly back to the url
342
- * Do not load dynamic string translation for IE11 and older
343
-
344
- = 1.2.3 =
345
- * Fixed back-end css style not being targeted only for TranslatePress Settings page
346
- * Add filter to not remove detected dynamic strings until the ajax is finished
347
- * Fixed data-no-translation not taken into account in some cases of Dynamic strings
348
- * Fixed translated slug not being included in url sometimes
349
- * Fixed issue with gettext string on non visible html attr that prevented other attr from being translated
350
- * Fixed bug with translating dom changes not working for complex HTML hierarchy
351
- * Corrected flag for Afrikaans.
352
- * Fixed compatibility issues with older jQuery versions
353
-
354
- = 1.2.2 =
355
- * Added Translation Block feature in which you can translate multiple html elements together
356
- * Improvement: make it possible for the SEO Addon to automatically translate page slugs using Google Translate
357
- * Fix: using the shortcode language switcher added #trpprocessurl to the end of the url
358
- * Fix: changing languages from a secondary language gave 404 page when the page slug was translated
359
- * Fix: submitting a form from one page to another directed the user to the default language. Now if Force Custom Language Links is enabled the user gets directed to the correct url
360
-
361
- = 1.2.1 =
362
- * Extra css for the floater images so they don't brake the line in certain themes
363
- * Fixed compatibility issue with Woocommerce cart widget
364
- * Fix: use the siteurl when the homeurl is empty to detect the language
365
-
366
- = 1.2.0 =
367
- * Fix wptexturize changing characters in secondary languages
368
- * Mini refactoring of the url_is_file() function
369
- * Refactor get_url_for_language() to not use the global var
370
- * We no longer add the language path to links to actual files on the server
371
-
372
- = 1.1.9 =
373
- * Fix widget language switcher to take into account the new hreflang
374
-
375
- = 1.1.8 =
376
- * Fixed bug with Strings List appearing also in Dynamic Strings List. Also fixed bug with duplicate dynamic strings not having a pencil icon because of missing jquery_object.
377
- * Fixed Woocommerce session storage compatibility
378
- * Fixed language floater not opening on iPhone.
379
- * Fixed issue with normal text nodes that were inside an element that had an atribute with gettext and did not get translated
380
- * Replaced _ with - in hreflang and filter it
381
- * Make force language to custom links set to yes as a default
382
- * Remove intensive functions from inside two loops so they only happen once we detect something in js
383
- * Decode html characters in mutation observed strings and removed stripslashes from trp-ajax.php to fix some strings added with js not being translated
384
-
385
- = 1.1.7 =
386
- * Compatibility fix with Elementor Page Builder
387
- * Added translation .pot file
388
- * Add proper encoding for mysqli connection in our trp-ajax.php file so we fixed some translation
389
- * Fixed infinite loop related to mutation observer on javascript strings by not re-adding detected strings again if they are similar to existing ones
390
- * Aligned text from add-ons tab.
391
-
392
- = 1.1.6 =
393
- * Added support for translating Contact Form 7 alert messages
394
- * Fixed issue with some strings containing special characters not being translated (i.e. "¿¡")
395
- * Fixed bug with switching languages in Editor when viewing as Logged out
396
- * Fixed issue with broken homepage links in some themes
397
- * Added support for RTL languages in translation editor
398
-
399
- = 1.1.5 =
400
- * Added support for translation blocks using the css class .translation-block.
401
- * Added possibility to choose a different language as default language seen by website visitors.
402
- * Updated add-ons settings page with the missing add-ons, added Language by GET parameter addon
403
- * Fixed issue with the [language-switcher] in a post or page that broke saving the page when Yoast SEO plugin is active
404
- * Added a plugin notification class and a notification for pretty permalinks
405
- * Added WooCommerce compatibility tag
406
- * Small css improvements
407
-
408
- = 1.1.4 =
409
- * Filter to allow adding new language: 'trp_wp_languages'
410
- * Fixed issue with get_permalink() in ajax calls that was not returning the propper language
411
- * Adapted code to allow language based on a GET parameter
412
- * Fix some issues with language switcher and custom queries as well as take into account if subdirectory for default language is on
413
- * Fixed issue with js translation that was trimming numbers and other characters from strings when it shouldn't
414
-
415
- = 1.1.3 =
416
- * Fix issue where the language switcher didn't work for BuddyPress pages
417
- * Fixed issue with CDATA in post content that was breaking the translation
418
- * Added a filter that can be activated and that tries to fix invalid html: trp_try_fixing_invalid_html
419
-
420
- = 1.1.2 =
421
- * We now make sure that all forms when submitted redirect to the correct language
422
- * Fixed an issue with missing slash from language switcher
423
- * Fixed an issue where we were not redirecting to the correct url slug when switching languages
424
- * Fixed a possible notice inside the get_language_names function
425
- * Fixed html breaking because of unescaped quotes in translated meta content
426
- * Removed a special character from the full_trim function that was causing some strings to not be selectable for translation
427
-
428
- = 1.1.1 =
429
- * Fixed js error with startsWith method not being supported in IE
430
- * Removed unnecessary files from select2 lib
431
- * Improved the way we rewrite urls to remove certain bugs
432
-
433
- = 1.1.0 =
434
- * Implemented View As "Logged out user" functionality so you can translate strings that show only for logged out users
435
- * Allow slug edit for default language
436
- * Fixed an issue with the dropdown of translation strings when there were unsaved changes and the dropdown disconected from the textarea
437
- * Prevent translate editor icon pencil to exit the translation iframe
438
- * Fixed translating via the next/prev buttons that reset the position in the translation string list
439
- * Refactor the way we are generating the language url for the language switcher when we don't have a variable available
440
-
441
- = 1.0.9 =
442
- * We now flush permalinks when saving the settings page to avoid getting 404 and 500 errors
443
- * Added the current language as a class on the body tag. Ex: translatepress-en_US
444
- * Small readme changes
445
-
446
- = 1.0.8 =
447
- * We now allow HTML in normal strings translations.
448
- * Changed the way we get the default language permalinks in Woocommerce rewrites
449
- * Fixed issues with date_i18n function
450
- * Fixed a warning generated when there are no rewrite rules
451
- * Fixed dynamic strings not updating the translation dropdown list.
452
- * Fixed issues with hidden space characters that were breaking some translations
453
- * Make sure we don't loose the trp-edit-translation=preview from url after a WordPress redirect
454
-
455
- = 1.0.7 =
456
- * Fixed a small bug in js regarding the translation editor sidebar with
457
- * Fixed Language Switcher for Woocommerce product categories and product tags going to 404 pages
458
- * Fixed issues with Woocommerce and permalinks when the default language was not english
459
- * Excluded more functions from getting gettext wraps
460
-
461
- = 1.0.6 =
462
- * Added filter on capabilities to allow other roles to edit translations:'trp_translating_capability'
463
- * Don't show php errors and notices when we are storing strings in the database
464
- * Fixed issues with attributes that contain json content, for instance in woocommerce variations
465
- * We no longer wrap gettext inside the wptexturize function
466
- * We no longer wrap gettexts that appear in the bloginfo function
467
-
468
- = 1.0.5 =
469
- * Added possibility to edit gettext strings from themes and plugins from english to english, without adding another language. Basically, string-replace functionality.
470
- * We now can translate text input placeholders
471
- * We have a way of translating emails using the conditional language shortcode [trp_language language="en_US"] English only content [/trp_language]
472
- * Fixed issues with some elements that contained new lines and \u00a0 at the start of the strings
473
-
474
- = 1.0.4 =
475
- * Fixed issues with the pencil select icon in the translation editor not showing up in certain cases on the button element
476
- * Fixed issues with the pencil select icon in the translation editor not showing up in certain cases because of overflow hidden
477
- * Fixed a issue that was sometimes causing javascript errors with certain plugins
478
-
479
- = 1.0.3 =
480
- * Added a conditional language shortcode: [trp_language language="en_US"] English only content [/trp_language]
481
- * Create link to test out Google API key.
482
- * Improvements to Woocommerce compatibility
483
- * Fixed json_encode error that was causing js errors
484
- * Changed 'template_include' hook priority to improve compatibility with some themes
485
-
486
- = 1.0.2 =
487
- * Translation interface improvements
488
- * Fixed issues with strings loaded with ajax
489
- * Added an addon page
490
- * Fixed bug with gettext node accidentally wrapping another string too.
491
-
492
- = 1.0.1 =
493
- * Fixed incorrect blog prefix name for Multisite subsites on admin_bar gettext hook.
494
- * Fixed Translate Page admin bar button sometimes not having the correct url for entering TP Editor Mode
495
- * Skipped dynamic strings that have only numbers and special characters.
496
- * Fixed order of categories in Editor dropdown. (Meta Information, String List..)
497
- * Fixed JS error Uncaught Error: Syntax error, unrecognized expression
498
-
499
- = 1.0.0 =
500
- * Initial release.
501
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ === TranslatePress - Translate Multilingual sites ===
2
+ Contributors: cozmoslabs, razvan.mo, madalin.ungureanu, cristophor
3
+ Donate link: https://www.translatepress.com/
4
+ Tags: translate, translation, multilingual, automatic translation, bilingual, front-end translation, google translate, language
5
+ Requires at least: 3.1.0
6
+ Tested up to: 5.2.2
7
+ Requires PHP: 5.6.20
8
+ Stable tag: 1.5.1
9
+ License: GPLv2 or later
10
+ License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
+
12
+ Easily translate your entire site directly from the front-end and go multilingual, with full support for WooCommerce, complex themes and site builders. Integrates with Google Translate.
13
+
14
+ == Description ==
15
+
16
+ **Experience a better way to translate your WordPress site and go multilingual, directly from the front-end using a friendly user interface.**
17
+
18
+ TranslatePress is a [WordPress translation plugin](https://translatepress.com/?utm_source=wp.org&utm_medium=tp-description-page&utm_campaign=TPFree) that anyone can use.
19
+
20
+ The interface allows you to easily translate the entire page at once, including output from shortcodes, forms and page builders. It also works out of the box with WooCommerce.
21
+
22
+ Built the WordPress way, TranslatePress - Multilingual is a GPL and self hosted translation plugin, meaning you'll own all your translations, forever. It's the fastest way to create a bilingual or multilingual site.
23
+
24
+ https://www.youtube.com/watch?v=pUlYisvBm8g
25
+
26
+ == Multilingual & Translation Features ==
27
+
28
+ * Translate all your website content directly from the front-end, in a friendly user interface (translation displayed in real-time).
29
+ * Fully compatible with all themes and plugins
30
+ * Live preview of your translated pages, as you edit your translations.
31
+ * [Image translation](https://translatepress.com/docs/image-translation/?utm_source=wp.org&utm_medium=tp-description-page&utm_campaign=TPFree) support, allowing you to [translate images, sliders and other media](https://translatepress.com/translate-images-in-wordpress/?utm_source=wp.org&utm_medium=tp-description-page&utm_campaign=TPFree).
32
+ * Support for both manual and automatic translation (via Google Translate)
33
+ * Ability to [translate dynamic strings](https://translatepress.com/translate-dynamic-strings-wordpress/?utm_source=wp.org&utm_medium=tp-description-page&utm_campaign=TPFree) (gettext) added by WordPress, plugins and themes.
34
+ * Integrates with Google Translate, allowing you to set up Automatic Translation using your own Google API key.
35
+ * Translate larger html blocks by merging strings into translation blocks.
36
+ * Select specific html blocks for translation using the css class **translation-block**. `<p class="translation-block">Translate <em>everything</em> inside</p>`
37
+ * Place language switchers anywhere using shortcode **[language-switcher]**, WP menu item or as a floating dropdown.
38
+ * Editorial control allowing you to publish your language only when all your translations are done
39
+ * Conditional display content shortcode based on language [trp_language language="en_US"] English content only [/trp_language]
40
+ * Possibility to [edit gettext strings](https://translatepress.com/edit-plugin-strings/?utm_source=wp.org&utm_medium=tp-description-page&utm_campaign=TPFree) from themes and plugins from english to english, without adding another language. Basically a string-replace functionality.
41
+ * Translation Block feature in which you can translate multiple html elements together
42
+ * Native **Gutenberg** support, so you can easily [translate Gutenberg blocks](https://translatepress.com/translate-gutenberg-blocks-in-wordpress/?utm_source=wp.org&utm_medium=tp-description-page&utm_campaign=TPFree)
43
+ * Out of the box [WooCommerce](https://translatepress.com/translate-woocommerce-products-translatepress/?utm_source=wp.org&utm_medium=tp-description-page&utm_campaign=TPFree) compatibility
44
+
45
+ Note: this WordPress translation plugin uses the Google Translation API to translate the strings on your site. This feature can be enabled or disabled according to your preferences.
46
+
47
+ Users with administrator rights have access to the following translate settings:
48
+
49
+ * select default language of the website and one translation language, for bilingual sites
50
+ * choose whether language switcher should display languages in their native names or English name
51
+ * force custom links to open in current language
52
+ * enable or disable url subdirectory for the default language
53
+ * enable automatic translation via Google Translate
54
+
55
+ == Powerful Translation Add-ons ==
56
+
57
+ TranslatePress - Multilingual has a range of [premium Add-ons](https://translatepress.com/?utm_source=wp.org&utm_medium=tp-description-page&utm_campaign=TPFree) that allow you to extend the power of the WordPress translation plugin:
58
+
59
+ **Pro Add-ons** (available in the [premium versions](https://translatepress.com/pricing/?utm_source=wp.org&utm_medium=tp-description-page&utm_campaign=TPFree) only)
60
+
61
+ * [Extra Languages](https://translatepress.com/docs/addons/seo-pack/?utm_source=wp.org&utm_medium=tp-description-page&utm_campaign=TPFree) - allows you to add an unlimited number of translation languages, with the possibility to publish languages later after you complete the translation
62
+ * [SEO Pack](https://translatepress.com/docs/addons/multiple-languages/?utm_source=wp.org&utm_medium=tp-description-page&utm_campaign=TPFree) - allows you to translate meta information (like page title, description, url slug, image alt tag, Twitter and Facebook Social Graph tags & more) for boosting your multilingual SEO and increase traffic
63
+ * [Translator Accounts](https://translatepress.com/docs/addons/translator-accounts/?utm_source=wp.org&utm_medium=tp-description-page&utm_campaign=TPFree) - create or allow existing users to translate the site without admin rights
64
+ * [Browse as User Role](https://translatepress.com/docs/addons/browse-as-role/?utm_source=wp.org&utm_medium=tp-description-page&utm_campaign=TPFree) - view and translate content that is visible only to a particular user role
65
+ * [Navigation Based on Language](https://translatepress.com/docs/addons/navigate-based-language/?utm_source=wp.org&utm_medium=tp-description-page&utm_campaign=TPFree) - configure and display different menu items for different languages
66
+ * [Automatic User Language Detection](https://translatepress.com/docs/addons/automatic-user-language-detection/?utm_source=wp.org&utm_medium=tp-description-page&utm_campaign=TPFree) - redirect first time visitors to their preferred language based on their browser settings or IP address
67
+
68
+ **Free Add-ons**
69
+
70
+ * [Language by GET parameter](https://translatepress.com/docs/addons/language-get-parameter/?utm_source=wp.org&utm_medium=tp-description-page&utm_campaign=TPFree) - enables the language in the URL to be encoded as a GET Parameter
71
+
72
+ **Keyboard Shortcuts**
73
+
74
+ * **CTRL ( ⌘ ) + S** – Save translation for the currently editing strings
75
+ * **CTRL ( ⌘ ) + ALT + Z** – Discard all changes for the currently editing strings
76
+ * **CTRL ( ⌘ ) + ALT + →** (Right Arrow) – Navigate to next string to translate
77
+ * **CTRL ( ⌘ ) + ALT + ←** (Left Arrow) – Navigate to previous string to translate
78
+
79
+ = Website =
80
+
81
+ [translatepress.com](https://translatepress.com/?utm_source=wp.org&utm_medium=tp-description-page&utm_campaign=TPFree)
82
+
83
+ = Documentation =
84
+
85
+ [Visit TranslatePress WordPress Translation plugin documentation page](https://translatepress.com/docs/translatepress/?utm_source=wp.org&utm_medium=tp-description-page&utm_campaign=TPFree)
86
+
87
+ = Add-ons =
88
+
89
+ [Add-ons](https://translatepress.com/docs/translatepress/?utm_source=wp.org&utm_medium=tp-description-page&utm_campaign=TPFree)
90
+
91
+ = Demo Site =
92
+
93
+ You can test out TranslatePress - Multilingual plugin by [visiting our demo site](https://demo.translatepress.com/)
94
+
95
+ == Installation ==
96
+
97
+ 1. Upload the translatepress folder to the '/wp-content/plugins/' directory
98
+ 2. Activate the plugin through the 'Plugins' menu in WordPress
99
+ 3. Go to Settings -> TranslatePress and choose a translation language.
100
+ 4. Open the front-end translation editor from the admin bar to translate your site.
101
+
102
+ == Frequently Asked Questions ==
103
+
104
+ = Where are my translations stored? =
105
+
106
+ All the translation are stored locally in your server's database.
107
+
108
+ = What types of content can I translate? =
109
+
110
+ TranslatePress - Multilingual plugin works out of the box with WooCommerce, custom post types, complex themes and site builders, so you'll be able to translate any type of content.
111
+
112
+ = How is it different from other multilingual & translation plugins like WPML or Polylang? =
113
+
114
+ TranslatePress is easier to use and more intuitive altogether. No more switching between the editor, string translation interfaces or badly translated plugins. You can now translate the full page content directly from the front-end. This makes TranslatePress a great alternative to plugins like Polylang and WPML.
115
+
116
+ = How do I start to translate my WordPress site? =
117
+
118
+ After installing the plugin, select your secondary language and click "Translate Site" to start translating your entire site exactly as it looks in the front-end.
119
+
120
+ = Will it slow down my website? =
121
+
122
+ TranslatePress will have little impact on your site speed. For more details see [Top WordPress Translation Plugins Compared Based on Page Load Time](https://translatepress.com/top-wordpress-translation-plugins-compared-based-on-page-load-time/?utm_source=wp.org&utm_medium=tp-description-page&utm_campaign=TPFree)
123
+
124
+ = Does it work with WooCommerce? =
125
+
126
+ Yes, TranslatePress works out of the box with WooCommerce. You can use it to [translate WooCommerce products](https://translatepress.com/translate-woocommerce-products-translatepress/?utm_source=wp.org&utm_medium=tp-description-page&utm_campaign=TPFree) and build a multilingual store.
127
+
128
+ = Where can I find out more information? =
129
+
130
+ For more information please check out [TranslatePress - Multilingual plugin documentation](https://translatepress.com/docs/translatepress/?utm_source=wp.org&utm_medium=tp-description-page&utm_campaign=TPFree).
131
+
132
+
133
+ == Screenshots ==
134
+ 1. TranslatePress front-end visual translation editor in action
135
+ 2. Front-end translation editor used to translate the entire page content
136
+ 3. How to translate a Dynamic String (gettext) using TranslatePress - Multilingual
137
+ 4. Translate WooCommerce Products using TranslatePress - Multilingual
138
+ 5. Translate Images and Image Sliders
139
+ 6. Settings Page for TranslatePress - Multilingual
140
+ 7. Floating Language Switcher added by TranslatePress - Multilingual
141
+ 8. Menu Language Switcher
142
+
143
+
144
+ == Changelog ==
145
+ = 1.5.1 =
146
+ * Added maximum possible size to srcset for translated images
147
+ * Added compatibility with Query Monitor plugin
148
+ * Better handling of licenses when pro addons are active
149
+ * Improved descriptions in settings page and other places
150
+ * Added filter to allow translation of href as an exception
151
+ * Fixed translation blocks not working on live in some edge cases
152
+ * Fixed translation block created in secondary language not working when strings were already translated
153
+ * Fixed JS error when dynamic translation is disabled by filter
154
+ * Fixed translating dynamic strings in Editor when viewing as Logged out
155
+ * Fixed page titles containing special characters not being translated
156
+ * Fixed title attribute not being translated
157
+ * Fixed certain custom WooCommerce permalinks not working on translated products
158
+ * Fixed pencil icon not showing for WooCommerce product images in Shop page on certain themes
159
+ * Fixed modifying wp_mail headers when we didn't have to
160
+
161
+ = 1.5.0 =
162
+ * Fixed some dynamic images not showing up in translated pages.
163
+
164
+ = 1.4.9 =
165
+ * Fixed incompatibility with custom code for changing flags
166
+ * Fixed some pages not being translated due to incorrectly encoded character
167
+ * Fixed some images missing when automatic translation is on
168
+
169
+ = 1.4.8 =
170
+ * Added support for translating images
171
+ * Added support for translating title attribute
172
+ * Added support for translating href pointing to internal files and href pointing to any external links
173
+ * Added support for translating attributes modified dynamically through JS
174
+ * Added support for translating multiple attributes on the same node
175
+ * Added support for translating nodes containing mixt of gettext and user-inputted strings
176
+ * Added notification and disabled TP for servers not running minimum PHP version 5.6.20
177
+ * Refactored and improved Translation Editor user interface
178
+ * Added Keyboard shortcuts: CTRL + S (save), CTRL + ALT + Z (discard all changes), CTRL + ALT + LEFT (previous string), CTRL + ALT + RIGHT (next string)
179
+ * Fixed issues with translation blocks not working on some instances
180
+ * Security improvements
181
+
182
+ = 1.4.7 =
183
+ * Fixed a php error in previous commit
184
+
185
+ = 1.4.6 =
186
+ * Fixed a js compatibility error with mootools.js
187
+ * Modified how the license page works and added plugin notifications
188
+ * Allow compatibility fix for Translation Editor on certain environments
189
+ * Fixed Safari bug with links when WooCommerce active
190
+
191
+ = 1.4.5 =
192
+ * Performance improvements
193
+ * Fixed an issue that was causing empty strings to get inserted in the database
194
+ * Improvements to detecting dynamic js strings earlier
195
+ * Fixes some urls for sitemap
196
+ * We now check if str_get_html is successful to avoid fatal error
197
+ * Fixed regular string loaded by ajax not detected in translation editor
198
+ * We now allow translating WooCommerce product base name separately from selected variations
199
+ * Fixed WooCommerce cart details not being translated when changing language
200
+ * Fixed Automatic Google Translation on languages not published yet
201
+ * Fixed Translation Editor not working in default language when no translation language is published yet
202
+ * Fixed gettext wrapping characters showing up in WooCommerce Shipping taxes metabox on Order pages
203
+
204
+ = 1.4.4 =
205
+ * Added more filters
206
+ * Make sure we do not insert empty strings in the gettext translation table
207
+ * Added support for Affiliate tracking
208
+
209
+ = 1.4.3 =
210
+ * Fixed an issue with the Language by Get Parameter add-on
211
+ * Added compatibility with WooCommerce PDF invoice and WooCommerce's order notes.
212
+ * Added stop_translating_page and before_running_hooks hooks.
213
+ * Refactored hooks-loader to easily remove hook
214
+
215
+ = 1.4.2 =
216
+ * Fixes the issue with not being able to publish pages when Use subdirectory for default language is set to yes and Gutenberg is installed
217
+ * Fixed an issue with Elementor and Use subdirectory for default language set to yes
218
+ * Fixed an issue with Yoast Premium and Use subdirectory for default language set to yes
219
+ * Fixed missing spaces in translations for original gettext strings with untrimmed spaces
220
+
221
+ = 1.4.1 =
222
+ * Added PHP 7.3 support
223
+ * Performance improvements
224
+
225
+ = 1.4.0 =
226
+ * Added Enfold compatibility by increasing the template_include hook priority
227
+ * Add the costa rica flag
228
+ * Speed improvements by optimizing the full_trim function
229
+ * Added compatibility for WooCommerce Invoices plugins
230
+ * Fixed querying for dynamic strings in Translation Editor not bringing up translations for all languages
231
+ * Fixed notice when gettext table is empty
232
+ * Added function to display strings with bad encoding in Translation Editor
233
+
234
+
235
+ = 1.3.9 =
236
+ * Fixed some issues with url translations
237
+ * Speed improvements
238
+ * Add Javanese flag
239
+ * Fixed issue with trimming dynamic strings in our own ajax calls
240
+
241
+ = 1.3.8 =
242
+ * Speed improvements
243
+ * Remove notices from Editor when we don't have translation languages
244
+ * Fixed notices with referrer in translator machine
245
+ * Fixed issues with urls in other languages
246
+ * Fix issue of nested gettext resulting in unwanted characters
247
+ * Strip gettext tags from urls run through sanitize_title and esc_url
248
+ * Set caching calls non-persistent. Doesn't work with object caching otherwise
249
+ * Set lang attribute in html tag all the time including when on default language
250
+ * Refactored the way we translate json
251
+ * Fixed issue with Woocommerce ajax calls
252
+
253
+ = 1.3.7 =
254
+ * Fixed an issue with Woocommerce and redirects when the default language is not English
255
+ * Speed improvements
256
+ * Fix relative url without a trailingslash not getting a proper link back
257
+ * Add ?trp=edit-translation=preview to ajax loaded content. Also add it to all dynamic content.
258
+ * Added language code column in settings
259
+ * Removed async false from JS translate-dom-changes
260
+
261
+ = 1.3.6 =
262
+ * Refactored the get_url_for_language() function which should fix a lot of problems with links
263
+ * Speed improvements
264
+ * Fixed translation block icon when creating a new block
265
+ * Fixed issues with trp tags leftovers in html
266
+ * Fixed issues with gettext strings that weren't detected correctly
267
+ * Add support for relative url's
268
+ * Added warning in settings about controlling costs of Google API
269
+ * Changed API key field description. Added feature to show/hide API key field based on Google Translate Active Yes/No
270
+ * Fixed Translated-dom-changes string not translated through trp-ajax.
271
+ * Fixed 400 errors in google translate API
272
+
273
+ = 1.3.5 =
274
+ * Fixed translation problems introduced in the last two versions
275
+ * Added a console message when trp-ajax request uses fall back to admin ajax for debugging purposes.
276
+
277
+ = 1.3.4 =
278
+ * Fixed issue with options in select tag that couldn't be translated
279
+ * Fixed force language in custom links
280
+ * Fixed Woocommerce links fpr products or categories that were added by the user manually in a page
281
+ * Added Settings link to the list of links displayed on Plugins page
282
+ * Fixed issue with Kazakhstan flag
283
+
284
+ = 1.3.3 =
285
+ * Fixed issue with Woocommerce ajax strings that were broken in editor on default language in some cases
286
+ * Speed improvements
287
+
288
+ = 1.3.2 =
289
+ * Speed improvements
290
+ * Add support for the Ginger EU Cookie Law plugin
291
+ * Add support for data-no-dynamic-translation attribute that skips dynamic strings from being translated by dom changes detector
292
+ * Fixed Edit Pencil icon css in Translation Editor for some sites
293
+ * Refactored the way we add trp-gettext tag. This should have a lot of benefits in compatibility with other plugins
294
+ * Optimized block translation detection
295
+ * Added caching to trp_x function when reading external .mo files
296
+ * Fixed issue with translatepress icon css that was broken on wpforms forms
297
+ * Added secret page for removing duplicate rows from database: wp-admin/admin.php?page=trp_remove_duplicate_rows
298
+
299
+ = 1.3.1 =
300
+ * Fixed Woocommerce translation of permalinks
301
+ * Added support for remove_accents to be based on default language when called from the sanitize_title function
302
+ * Added support for translating JSON found in custom ajax request
303
+ * Added better REST compatibility
304
+ * Added compatibility for Peepso plugin
305
+ * Fixed TranslatePress roken link to google translate set up api key on settings page
306
+ * Corrected flags for Arabic and Bengali languages
307
+ * Fixed issue with multiple slashes being added when the URL had extra get parameters
308
+
309
+ = 1.3.0 =
310
+ * Added support for word trim when the default language is japanese, chinese or thai.
311
+ * Exluded wp_trim_words funtion from our gettext filter to prevent som issues
312
+ * Fixed an issue with gettext inside attributes that passed through the wp_kses function.
313
+ * Fixed issues with the Customizer
314
+ * Added padding to the language switcher image so we don't conflict with themes that add extra padding to images inside links
315
+ * We no longer remove \r \n \t from the translation
316
+ * Fixed issue with title attribute that contained html
317
+ * Added a filter to all href attributes detected on our translation page
318
+ * Added a notice to inform admins of the missing mbstring php library
319
+ * We now send all error logs to debug.log
320
+ * Added cite and blockquote as top_parents for merge rule on Translation blocks
321
+ * Fixed nonce accidentally being passed through internationalized function
322
+
323
+ = 1.2.9 =
324
+ * Rearranged and renamed some languages in the options dropdown
325
+ * Fixed flag of Khmer language
326
+ * Added Automatic Language Detection notice and included it on add-ons page
327
+ * Fixed an issue with WooCommerce checkout and Stripe Gateway
328
+ * Fixed issues with some improper responses from the WP Remote API functions
329
+ * Fixed minor issues with ajax
330
+
331
+ = 1.2.8 =
332
+ * Added a lot of hooks in the translation manager interface so other people can insert new content there.
333
+ * We now take into account the presence of www or lack of it in custom links that might be local
334
+ * We now make sure we're not changing the locale in the backend if the language order is different.
335
+ * Fixed issue with incorrect language adding in the backend that caused notices in the front-end
336
+ * Removed obsolete function add_cookie
337
+ * Fixed trailingslashit over get_permalink in url-converter
338
+ * Removed adding cookie from php. Fixed enqueue_styles on license and add-ons tabs. Removed deprecated function.
339
+
340
+ = 1.2.7 =
341
+ * Added a warning when changing the default language that it will invalidate their existing translations
342
+ * Fixed incorrect detection of the form action language parameter
343
+ * Improved compatibility with themes and plugins that use object buffering
344
+ * Fixed some issues with image urls
345
+
346
+ = 1.2.6 =
347
+ * Refactored determining language, redirecting and cookie adding
348
+ * Removed leftover trp-gettext tags when WooCommerce is active on some pages
349
+ * Fixed get_url_for_language function that was having problems in some cases.
350
+
351
+ = 1.2.5 =
352
+ * Fixed DOM changes script not being enqueued anymore
353
+
354
+ = 1.2.4 =
355
+ * Refactor the shortcode language switcher so it's now HTML similar to the floater
356
+ * Added link to Appearance -> menus in TranslatePress settings page
357
+ * Fixed language redirect with permalinks so custom parameters are passed correctly back to the url
358
+ * Do not load dynamic string translation for IE11 and older
359
+
360
+ = 1.2.3 =
361
+ * Fixed back-end css style not being targeted only for TranslatePress Settings page
362
+ * Add filter to not remove detected dynamic strings until the ajax is finished
363
+ * Fixed data-no-translation not taken into account in some cases of Dynamic strings
364
+ * Fixed translated slug not being included in url sometimes
365
+ * Fixed issue with gettext string on non visible html attr that prevented other attr from being translated
366
+ * Fixed bug with translating dom changes not working for complex HTML hierarchy
367
+ * Corrected flag for Afrikaans.
368
+ * Fixed compatibility issues with older jQuery versions
369
+
370
+ = 1.2.2 =
371
+ * Added Translation Block feature in which you can translate multiple html elements together
372
+ * Improvement: make it possible for the SEO Addon to automatically translate page slugs using Google Translate
373
+ * Fix: using the shortcode language switcher added #trpprocessurl to the end of the url
374
+ * Fix: changing languages from a secondary language gave 404 page when the page slug was translated
375
+ * Fix: submitting a form from one page to another directed the user to the default language. Now if Force Custom Language Links is enabled the user gets directed to the correct url
376
+
377
+ = 1.2.1 =
378
+ * Extra css for the floater images so they don't brake the line in certain themes
379
+ * Fixed compatibility issue with Woocommerce cart widget
380
+ * Fix: use the siteurl when the homeurl is empty to detect the language
381
+
382
+ = 1.2.0 =
383
+ * Fix wptexturize changing characters in secondary languages
384
+ * Mini refactoring of the url_is_file() function
385
+ * Refactor get_url_for_language() to not use the global var
386
+ * We no longer add the language path to links to actual files on the server
387
+
388
+ = 1.1.9 =
389
+ * Fix widget language switcher to take into account the new hreflang
390
+
391
+ = 1.1.8 =
392
+ * Fixed bug with Strings List appearing also in Dynamic Strings List. Also fixed bug with duplicate dynamic strings not having a pencil icon because of missing jquery_object.
393
+ * Fixed Woocommerce session storage compatibility
394
+ * Fixed language floater not opening on iPhone.
395
+ * Fixed issue with normal text nodes that were inside an element that had an atribute with gettext and did not get translated
396
+ * Replaced _ with - in hreflang and filter it
397
+ * Make force language to custom links set to yes as a default
398
+ * Remove intensive functions from inside two loops so they only happen once we detect something in js
399
+ * Decode html characters in mutation observed strings and removed stripslashes from trp-ajax.php to fix some strings added with js not being translated
400
+
401
+ = 1.1.7 =
402
+ * Compatibility fix with Elementor Page Builder
403
+ * Added translation .pot file
404
+ * Add proper encoding for mysqli connection in our trp-ajax.php file so we fixed some translation
405
+ * Fixed infinite loop related to mutation observer on javascript strings by not re-adding detected strings again if they are similar to existing ones
406
+ * Aligned text from add-ons tab.
407
+
408
+ = 1.1.6 =
409
+ * Added support for translating Contact Form 7 alert messages
410
+ * Fixed issue with some strings containing special characters not being translated (i.e. "¿¡")
411
+ * Fixed bug with switching languages in Editor when viewing as Logged out
412
+ * Fixed issue with broken homepage links in some themes
413
+ * Added support for RTL languages in translation editor
414
+
415
+ = 1.1.5 =
416
+ * Added support for translation blocks using the css class .translation-block.
417
+ * Added possibility to choose a different language as default language seen by website visitors.
418
+ * Updated add-ons settings page with the missing add-ons, added Language by GET parameter addon
419
+ * Fixed issue with the [language-switcher] in a post or page that broke saving the page when Yoast SEO plugin is active
420
+ * Added a plugin notification class and a notification for pretty permalinks
421
+ * Added WooCommerce compatibility tag
422
+ * Small css improvements
423
+
424
+ = 1.1.4 =
425
+ * Filter to allow adding new language: 'trp_wp_languages'
426
+ * Fixed issue with get_permalink() in ajax calls that was not returning the propper language
427
+ * Adapted code to allow language based on a GET parameter
428
+ * Fix some issues with language switcher and custom queries as well as take into account if subdirectory for default language is on
429
+ * Fixed issue with js translation that was trimming numbers and other characters from strings when it shouldn't
430
+
431
+ = 1.1.3 =
432
+ * Fix issue where the language switcher didn't work for BuddyPress pages
433
+ * Fixed issue with CDATA in post content that was breaking the translation
434
+ * Added a filter that can be activated and that tries to fix invalid html: trp_try_fixing_invalid_html
435
+
436
+ = 1.1.2 =
437
+ * We now make sure that all forms when submitted redirect to the correct language
438
+ * Fixed an issue with missing slash from language switcher
439
+ * Fixed an issue where we were not redirecting to the correct url slug when switching languages
440
+ * Fixed a possible notice inside the get_language_names function
441
+ * Fixed html breaking because of unescaped quotes in translated meta content
442
+ * Removed a special character from the full_trim function that was causing some strings to not be selectable for translation
443
+
444
+ = 1.1.1 =
445
+ * Fixed js error with startsWith method not being supported in IE
446
+ * Removed unnecessary files from select2 lib
447
+ * Improved the way we rewrite urls to remove certain bugs
448
+
449
+ = 1.1.0 =
450
+ * Implemented View As "Logged out user" functionality so you can translate strings that show only for logged out users
451
+ * Allow slug edit for default language
452
+ * Fixed an issue with the dropdown of translation strings when there were unsaved changes and the dropdown disconected from the textarea
453
+ * Prevent translate editor icon pencil to exit the translation iframe
454
+ * Fixed translating via the next/prev buttons that reset the position in the translation string list
455
+ * Refactor the way we are generating the language url for the language switcher when we don't have a variable available
456
+
457
+ = 1.0.9 =
458
+ * We now flush permalinks when saving the settings page to avoid getting 404 and 500 errors
459
+ * Added the current language as a class on the body tag. Ex: translatepress-en_US
460
+ * Small readme changes
461
+
462
+ = 1.0.8 =
463
+ * We now allow HTML in normal strings translations.
464
+ * Changed the way we get the default language permalinks in Woocommerce rewrites
465
+ * Fixed issues with date_i18n function
466
+ * Fixed a warning generated when there are no rewrite rules
467
+ * Fixed dynamic strings not updating the translation dropdown list.
468
+ * Fixed issues with hidden space characters that were breaking some translations
469
+ * Make sure we don't loose the trp-edit-translation=preview from url after a WordPress redirect
470
+
471
+ = 1.0.7 =
472
+ * Fixed a small bug in js regarding the translation editor sidebar with
473
+ * Fixed Language Switcher for Woocommerce product categories and product tags going to 404 pages
474
+ * Fixed issues with Woocommerce and permalinks when the default language was not english
475
+ * Excluded more functions from getting gettext wraps
476
+
477
+ = 1.0.6 =
478
+ * Added filter on capabilities to allow other roles to edit translations:'trp_translating_capability'
479
+ * Don't show php errors and notices when we are storing strings in the database
480
+ * Fixed issues with attributes that contain json content, for instance in woocommerce variations
481
+ * We no longer wrap gettext inside the wptexturize function
482
+ * We no longer wrap gettexts that appear in the bloginfo function
483
+
484
+ = 1.0.5 =
485
+ * Added possibility to edit gettext strings from themes and plugins from english to english, without adding another language. Basically, string-replace functionality.
486
+ * We now can translate text input placeholders
487
+ * We have a way of translating emails using the conditional language shortcode [trp_language language="en_US"] English only content [/trp_language]
488
+ * Fixed issues with some elements that contained new lines and \u00a0 at the start of the strings
489
+
490
+ = 1.0.4 =
491
+ * Fixed issues with the pencil select icon in the translation editor not showing up in certain cases on the button element
492
+ * Fixed issues with the pencil select icon in the translation editor not showing up in certain cases because of overflow hidden
493
+ * Fixed a issue that was sometimes causing javascript errors with certain plugins
494
+
495
+ = 1.0.3 =
496
+ * Added a conditional language shortcode: [trp_language language="en_US"] English only content [/trp_language]
497
+ * Create link to test out Google API key.
498
+ * Improvements to Woocommerce compatibility
499
+ * Fixed json_encode error that was causing js errors
500
+ * Changed 'template_include' hook priority to improve compatibility with some themes
501
+
502
+ = 1.0.2 =
503
+ * Translation interface improvements
504
+ * Fixed issues with strings loaded with ajax
505
+ * Added an addon page
506
+ * Fixed bug with gettext node accidentally wrapping another string too.
507
+
508
+ = 1.0.1 =
509
+ * Fixed incorrect blog prefix name for Multisite subsites on admin_bar gettext hook.
510
+ * Fixed Translate Page admin bar button sometimes not having the correct url for entering TP Editor Mode
511
+ * Skipped dynamic strings that have only numbers and special characters.
512
+ * Fixed order of categories in Editor dropdown. (Meta Information, String List..)
513
+ * Fixed JS error Uncaught Error: Syntax error, unrecognized expression
514
+
515
+ = 1.0.0 =
516
+ * Initial release.
517
+
518
+
519
+
520
+ 1.5.1
521
+ d213c69 Fixed previous commit on placeholder
522
+ db1c2ef Merged in iss6118 (pull request #225)
523
+ 3e4bf1c Fixed placeholder attribute not being translated for inputs
524
+ a74a536 Merged in iss6112 (pull request #224)
525
+ 7f322d7 Use wp_strip_all_tags instead of strip_tags for trimming translation blocks
526
+ 4d0f6ee internationalized the account page
527
+ bb2d4cf Merged in iss6076 (pull request #223)
528
+ b70c061 Add filter to allow translation of href as an exception. Fixed trpTranslator in iframe not adding GET preview paramater when dynamic detection is disabled
529
+ 418e26d Merge branch 'master' of bitbucket.org:cozmoslabs/translatepress
530
+ 8fc9eb6 modified some strgings
531
+ 5abc297 Merged in iss6084 (pull request #222)
532
+ c330958 Fiexd variable trpTranslator is undefined when dynamic detection is turned off by filter
533
+ 6c41e99 Merged in iss6083 (pull request #221)
534
+ 9ac9a0d Updated comment
535
+ 4980236 Fixed translate-dom-changes not working in Editor when viewing as logged out
536
+ b4d1049 Merged in iss6088 (pull request #220)
537
+ a466ddf modify just the subject and message is they exist in wp_mail filter with translatepress
538
+ e8b9d1a Merged in iss6029 (pull request #219)
539
+ 344fbd5 Fixed custom WooCommerce permalinks not working on translated products
540
+ dcc6dac Merged in iss6059 (pull request #218)
541
+ a53dc2b Fixed page title not being translated in live mode
542
+ 17c40b9 removed an unwanted file and small readme changes
543
+ 0e06384 update readme.txt to include image translation
544
+ 0be0f51 Merged in iss6048 (pull request #217)
545
+ d964287 Fix pencil icon not showing for WooCommerce product images in Shop page on Hestia
546
+ 3bc9c2a Merged in iss6051 (pull request #216)
547
+ 9a0bcb3 Fixed title not being translated
548
+ 07b0a77 Merged in iss6002 (pull request #215)
549
+ 7f69260 Added compatibility with Query Monitor
550
+ ea400a3 Merged in iss6003 (pull request #214)
551
+ 160c1a4 Fixed Translation block created in secondary language didn't work when strings are already translated
552
+ e15f6cd Merge branch 'master' of bitbucket.org:cozmoslabs/translatepress
553
+ 10ab44e handle the case in which the user did not enter a licence but has active pro addons for license notices
554
+ 1db7f92 Merged in iss6016 (pull request #213)
555
+ 9490c54 Added maximum possible sizes to srcset of translated images