Created
October 7, 2018 02:47
-
-
Save nylen/d67705faaa47ac2bf93f7d059660b183 to your computer and use it in GitHub Desktop.
This file has been truncated, but you can view the full file.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff -ur build-unminified/wp-admin/js/code-editor.min.js build-branch-unminified/wp-admin/js/code-editor.min.js | |
| --- build-unminified/wp-admin/js/code-editor.min.js 2018-10-06 21:45:40.354682051 -0500 | |
| +++ build-branch-unminified/wp-admin/js/code-editor.min.js 2018-10-06 21:42:42.693357446 -0500 | |
| @@ -26,10 +26,9 @@ | |
| }), b.on("blur", d), b.on("startCompletion", function() { | |
| b.off("blur", d) | |
| }), b.on("endCompletion", function() { | |
| - var a = 500; | |
| b.on("blur", d), _.delay(function() { | |
| b.state.focused || d() | |
| - }, a) | |
| + }, 500) | |
| }), a(document.body).on("mousedown", function(c) { | |
| !b.state.focused || a.contains(b.display.wrapper, c.target) || a(c.target).hasClass("CodeMirror-hint") || d() | |
| }) | |
| @@ -40,9 +39,8 @@ | |
| b.on("blur", function() { | |
| d.data("next-tab-blurs", !1) | |
| }), b.on("keydown", function(a, e) { | |
| - var f = 9, | |
| - g = 27; | |
| - return g === e.keyCode ? void d.data("next-tab-blurs", !0) : void(f === e.keyCode && d.data("next-tab-blurs") && (e.shiftKey ? c.onTabPrevious(b, e) : c.onTabNext(b, e), d.data("next-tab-blurs", !1), e.preventDefault())) | |
| + if (27 === e.keyCode) return void d.data("next-tab-blurs", !0); | |
| + 9 === e.keyCode && d.data("next-tab-blurs") && (e.shiftKey ? c.onTabPrevious(b, e) : c.onTabNext(b, e), d.data("next-tab-blurs", !1), e.preventDefault()) | |
| }) | |
| } | |
| b.codeEditor.defaultSettings = { | |
| diff -ur build-unminified/wp-admin/js/color-picker.min.js build-branch-unminified/wp-admin/js/color-picker.min.js | |
| --- build-unminified/wp-admin/js/color-picker.min.js 2018-10-06 21:45:41.762692550 -0500 | |
| +++ build-branch-unminified/wp-admin/js/color-picker.min.js 2018-10-06 21:42:44.837373430 -0500 | |
| @@ -1,10 +1,5 @@ | |
| ! function(a, b) { | |
| - var c, d = '<button type="button" class="button wp-color-result" aria-expanded="false"><span class="wp-color-result-text"></span></button>', | |
| - e = '<div class="wp-picker-holder" />', | |
| - f = '<div class="wp-picker-container" />', | |
| - g = '<input type="button" class="button button-small" />', | |
| - h = "<label></label>", | |
| - i = '<span class="screen-reader-text"></span>'; | |
| + var c; | |
| c = { | |
| options: { | |
| defaultColor: !1, | |
| @@ -37,9 +32,9 @@ | |
| var b = this, | |
| c = b.element; | |
| if (a.extend(b.options, c.data()), "hue" === b.options.type) return b._createHueOnly(); | |
| - b.close = a.proxy(b.close, b), b.initialValue = c.val(), c.addClass("wp-color-picker"), c.parent("label").length || (c.wrap(h), b.wrappingLabelText = a(i).insertBefore(c).text(wpColorPickerL10n.defaultLabel)), b.wrappingLabel = c.parent(), b.wrappingLabel.wrap(f), b.wrap = b.wrappingLabel.parent(), b.toggler = a(d).insertBefore(b.wrappingLabel).css({ | |
| + b.close = a.proxy(b.close, b), b.initialValue = c.val(), c.addClass("wp-color-picker"), c.parent("label").length || (c.wrap("<label></label>"), b.wrappingLabelText = a('<span class="screen-reader-text"></span>').insertBefore(c).text(wpColorPickerL10n.defaultLabel)), b.wrappingLabel = c.parent(), b.wrappingLabel.wrap('<div class="wp-picker-container" />'), b.wrap = b.wrappingLabel.parent(), b.toggler = a('<button type="button" class="button wp-color-result" aria-expanded="false"><span class="wp-color-result-text"></span></button>').insertBefore(b.wrappingLabel).css({ | |
| backgroundColor: b.initialValue | |
| - }), b.toggler.find(".wp-color-result-text").text(wpColorPickerL10n.pick), b.pickerContainer = a(e).insertAfter(b.wrappingLabel), b.button = a(g), b.options.defaultColor ? b.button.addClass("wp-picker-default").val(wpColorPickerL10n.defaultString).attr("aria-label", wpColorPickerL10n.defaultAriaLabel) : b.button.addClass("wp-picker-clear").val(wpColorPickerL10n.clear).attr("aria-label", wpColorPickerL10n.clearAriaLabel), b.wrappingLabel.wrap('<span class="wp-picker-input-wrap hidden" />').after(b.button), b.inputWrapper = c.closest(".wp-picker-input-wrap"), c.iris({ | |
| + }), b.toggler.find(".wp-color-result-text").text(wpColorPickerL10n.pick), b.pickerContainer = a('<div class="wp-picker-holder" />').insertAfter(b.wrappingLabel), b.button = a('<input type="button" class="button button-small" />'), b.options.defaultColor ? b.button.addClass("wp-picker-default").val(wpColorPickerL10n.defaultString).attr("aria-label", wpColorPickerL10n.defaultAriaLabel) : b.button.addClass("wp-picker-clear").val(wpColorPickerL10n.clear).attr("aria-label", wpColorPickerL10n.clearAriaLabel), b.wrappingLabel.wrap('<span class="wp-picker-input-wrap hidden" />').after(b.button), b.inputWrapper = c.closest(".wp-picker-input-wrap"), c.iris({ | |
| target: b.pickerContainer, | |
| hide: b.options.hide, | |
| width: b.options.width, | |
| @@ -75,10 +70,12 @@ | |
| this.element.iris("toggle"), this.inputWrapper.addClass("hidden"), this.wrap.removeClass("wp-picker-active"), this.toggler.removeClass("wp-picker-open").attr("aria-expanded", "false"), a("body").off("click.wpcolorpicker", this.close) | |
| }, | |
| color: function(a) { | |
| - return a === b ? this.element.iris("option", "color") : void this.element.iris("option", "color", a) | |
| + if (void 0 === a) return this.element.iris("option", "color"); | |
| + this.element.iris("option", "color", a) | |
| }, | |
| defaultColor: function(a) { | |
| - return a === b ? this.options.defaultColor : void(this.options.defaultColor = a) | |
| + if (void 0 === a) return this.options.defaultColor; | |
| + this.options.defaultColor = a | |
| } | |
| }, a.widget("wp.wpColorPicker", c) | |
| }(jQuery); | |
| \ No newline at end of file | |
| diff -ur build-unminified/wp-admin/js/comment.min.js build-branch-unminified/wp-admin/js/comment.min.js | |
| --- build-unminified/wp-admin/js/comment.min.js 2018-10-06 21:45:39.998679397 -0500 | |
| +++ build-branch-unminified/wp-admin/js/comment.min.js 2018-10-06 21:42:42.245354106 -0500 | |
| @@ -18,6 +18,7 @@ | |
| j = a("#hh").val(), | |
| k = a("#mn").val(), | |
| l = new Date(g, h - 1, i, j, k); | |
| - return d.preventDefault(), l.getFullYear() != g || 1 + l.getMonth() != h || l.getDate() != i || l.getMinutes() != k ? void e.addClass("form-invalid") : (e.removeClass("form-invalid"), c.html(commentL10n.submittedOn + " <b>" + commentL10n.dateFormat.replace("%1$s", a('option[value="' + h + '"]', "#mm").attr("data-text")).replace("%2$s", parseInt(i, 10)).replace("%3$s", g).replace("%4$s", ("00" + j).slice(-2)).replace("%5$s", ("00" + k).slice(-2)) + "</b> "), f.show().focus(), void b.slideUp("fast")) | |
| + if (d.preventDefault(), l.getFullYear() != g || 1 + l.getMonth() != h || l.getDate() != i || l.getMinutes() != k) return void e.addClass("form-invalid"); | |
| + e.removeClass("form-invalid"), c.html(commentL10n.submittedOn + " <b>" + commentL10n.dateFormat.replace("%1$s", a('option[value="' + h + '"]', "#mm").attr("data-text")).replace("%2$s", parseInt(i, 10)).replace("%3$s", g).replace("%4$s", ("00" + j).slice(-2)).replace("%5$s", ("00" + k).slice(-2)) + "</b> "), f.show().focus(), b.slideUp("fast") | |
| }) | |
| }); | |
| \ No newline at end of file | |
| diff -ur build-unminified/wp-admin/js/common.min.js build-branch-unminified/wp-admin/js/common.min.js | |
| --- build-unminified/wp-admin/js/common.min.js 2018-10-06 21:45:38.398667466 -0500 | |
| +++ build-branch-unminified/wp-admin/js/common.min.js 2018-10-06 21:42:40.617341970 -0500 | |
| @@ -92,7 +92,8 @@ | |
| } | |
| }, a(".contextual-help-tabs").delegate("a", "click", function(b) { | |
| var c, d = a(this); | |
| - return b.preventDefault(), !d.is(".active a") && (a(".contextual-help-tabs .active").removeClass("active"), d.parent("li").addClass("active"), c = a(d.attr("href")), a(".help-tab-content").not(c).removeClass("active").hide(), void c.addClass("active").show()) | |
| + if (b.preventDefault(), d.is(".active a")) return !1; | |
| + a(".contextual-help-tabs .active").removeClass("active"), d.parent("li").addClass("active"), c = a(d.attr("href")), a(".help-tab-content").not(c).removeClass("active").hide(), c.addClass("active").show() | |
| }); | |
| var h = !1, | |
| i = a("#permalink_structure"), | |
| @@ -119,7 +120,8 @@ | |
| f = i[0].selectionEnd, | |
| g = a(this).text().trim(), | |
| j = a(this).attr("data-added"); | |
| - return -1 !== c.indexOf(g) ? (c = c.replace(g + "/", ""), i.val("/" === c ? "" : c), a("#custom_selection_updated").text(j), void d(a(this))) : (h || 0 !== e || 0 !== f || (e = f = c.length), k.prop("checked", !0), "/" !== c.substr(0, e).substr(-1) && (g = "/" + g), "/" !== c.substr(f, 1) && (g += "/"), i.val(c.substr(0, e) + g + c.substr(f)), a("#custom_selection_updated").text(j), d(a(this)), void(h && i[0].setSelectionRange && (b = (c.substr(0, e) + g).length, i[0].setSelectionRange(b, b), i.focus()))) | |
| + if (-1 !== c.indexOf(g)) return c = c.replace(g + "/", ""), i.val("/" === c ? "" : c), a("#custom_selection_updated").text(j), void d(a(this)); | |
| + h || 0 !== e || 0 !== f || (e = f = c.length), k.prop("checked", !0), "/" !== c.substr(0, e).substr(-1) && (g = "/" + g), "/" !== c.substr(f, 1) && (g += "/"), i.val(c.substr(0, e) + g + c.substr(f)), a("#custom_selection_updated").text(j), d(a(this)), h && i[0].setSelectionRange && (b = (c.substr(0, e) + g).length, i[0].setSelectionRange(b, b), i.focus()) | |
| }), e.ready(function() { | |
| function c() { | |
| var b = a("a.wp-has-current-submenu"); | |
| @@ -228,7 +230,7 @@ | |
| z = a("input.current-page"), | |
| A = z.val(), | |
| B = /iPhone|iPad|iPod/.test(navigator.userAgent), | |
| - C = navigator.userAgent.indexOf("Android") !== -1, | |
| + C = -1 !== navigator.userAgent.indexOf("Android"), | |
| D = a(document.documentElement).hasClass("ie8"), | |
| E = a("#adminmenuwrap"), | |
| F = a("#wpwrap"), | |
| @@ -326,7 +328,7 @@ | |
| c = h.selectionStart, d = h.selectionEnd, e = h.value, document.selection ? (h.focus(), g = document.selection.createRange(), g.text = "\t") : c >= 0 && (f = this.scrollTop, h.value = e.substring(0, c).concat("\t", e.substring(d)), h.selectionStart = h.selectionEnd = c + 1, this.scrollTop = f), b.stopPropagation && b.stopPropagation(), b.preventDefault && b.preventDefault() | |
| } | |
| }), z.length && z.closest("form").submit(function() { | |
| - a('select[name="action"]').val() == -1 && a('select[name="action2"]').val() == -1 && z.val() == A && z.val("1") | |
| + -1 == a('select[name="action"]').val() && -1 == a('select[name="action2"]').val() && z.val() == A && z.val("1") | |
| }), a('.search-box input[type="search"], .search-box input[type="submit"]').mousedown(function() { | |
| a('select[name^="action"]').val("-1") | |
| }), a("#contextual-help-link, #show-settings-link").on("focus.scroll-into-view", function(a) { | |
| @@ -354,8 +356,7 @@ | |
| }), G.on("click.wp-responsive", "li.wp-has-submenu > a", function(b) { | |
| G.data("wp-responsive") && (a(this).parent("li").toggleClass("selected"), b.preventDefault()) | |
| }), c.trigger(), e.on("wp-window-resized.wp-responsive", a.proxy(this.trigger, this)), f.on("load.wp-responsive", function() { | |
| - var a = navigator.userAgent.indexOf("AppleWebKit/") > -1 ? f.width() : b.innerWidth; | |
| - a <= 782 && c.disableSortables() | |
| + (navigator.userAgent.indexOf("AppleWebKit/") > -1 ? f.width() : b.innerWidth) <= 782 && c.disableSortables() | |
| }) | |
| }, | |
| activate: function() { | |
| diff -ur build-unminified/wp-admin/js/custom-background.min.js build-branch-unminified/wp-admin/js/custom-background.min.js | |
| --- build-unminified/wp-admin/js/custom-background.min.js 2018-10-06 21:45:41.650691715 -0500 | |
| +++ build-branch-unminified/wp-admin/js/custom-background.min.js 2018-10-06 21:42:44.713372506 -0500 | |
| @@ -18,7 +18,8 @@ | |
| c.css("background-attachment", a(this).is(":checked") ? "scroll" : "fixed") | |
| }), a("#choose-from-library-link").click(function(c) { | |
| var d = a(this); | |
| - return c.preventDefault(), b ? void b.open() : (b = wp.media.frames.customBackground = wp.media({ | |
| + if (c.preventDefault(), b) return void b.open(); | |
| + b = wp.media.frames.customBackground = wp.media({ | |
| title: d.data("choose"), | |
| library: { | |
| type: "image" | |
| @@ -36,7 +37,7 @@ | |
| }).done(function() { | |
| window.location.reload() | |
| }) | |
| - }), void b.open()) | |
| + }), b.open() | |
| }) | |
| }) | |
| }(jQuery); | |
| \ No newline at end of file | |
| diff -ur build-unminified/wp-admin/js/customize-controls.min.js build-branch-unminified/wp-admin/js/customize-controls.min.js | |
| --- build-unminified/wp-admin/js/customize-controls.min.js 2018-10-06 21:45:42.014694429 -0500 | |
| +++ build-branch-unminified/wp-admin/js/customize-controls.min.js 2018-10-06 21:42:45.093375339 -0500 | |
| @@ -33,8 +33,7 @@ | |
| return "string" == typeof a ? (c = a, d = b) : (c = a.code, d = a), e.has(c) || (e._addedIncrement += 1, e._addedOrder[c] = e._addedIncrement), f.Values.prototype.add.call(e, c, d) | |
| }, | |
| remove: function(a) { | |
| - var b = this; | |
| - return delete b._addedOrder[a], f.Values.prototype.remove.call(this, a) | |
| + return delete this._addedOrder[a], f.Values.prototype.remove.call(this, a) | |
| }, | |
| get: function(a) { | |
| var b, c, d, e = this; | |
| @@ -165,30 +164,28 @@ | |
| }, f.utils.isKeydownButNotEnterEvent = function(a) { | |
| return "keydown" === a.type && 13 !== a.which | |
| }, f.utils.areElementListsEqual = function(a, c) { | |
| - var d = a.length === c.length && -1 === _.indexOf(_.map(_.zip(a, c), function(a) { | |
| + return a.length === c.length && -1 === _.indexOf(_.map(_.zip(a, c), function(a) { | |
| return b(a[0]).is(a[1]) | |
| - }), !1); | |
| - return d | |
| + }), !1) | |
| }, f.utils.highlightButton = function(a, b) { | |
| function c() { | |
| - f = !0 | |
| + e = !0 | |
| } | |
| - var d, e = "button-see-me", | |
| - f = !1; | |
| + var d, e = !1; | |
| return d = _.extend({ | |
| delay: 0, | |
| focusTarget: a | |
| }, b), d.focusTarget.on("focusin", c), setTimeout(function() { | |
| - d.focusTarget.off("focusin", c), f || (a.addClass(e), a.one("animationend", function() { | |
| - a.removeClass(e) | |
| + d.focusTarget.off("focusin", c), e || (a.addClass("button-see-me"), a.one("animationend", function() { | |
| + a.removeClass("button-see-me") | |
| })) | |
| }, d.delay), c | |
| }, f.utils.getCurrentTimestamp = function() { | |
| var a, b, c; | |
| return b = _.now(), a = new Date(f.settings.initialServerDate.replace(/-/g, "/")), c = b - f.settings.initialClientTimestamp, c += f.settings.initialClientTimestamp - f.settings.initialServerTimestamp, a.setTime(a.getTime() + c), a.getTime() | |
| }, f.utils.getRemainingTime = function(a) { | |
| - var b, c, d = 1e3; | |
| - return c = a instanceof Date ? a.getTime() : "string" == typeof a ? new Date(a.replace(/-/g, "/")).getTime() : a, b = c - f.utils.getCurrentTimestamp(), b = Math.ceil(b / d) | |
| + var b, c; | |
| + return c = a instanceof Date ? a.getTime() : "string" == typeof a ? new Date(a.replace(/-/g, "/")).getTime() : a, b = c - f.utils.getCurrentTimestamp(), b = Math.ceil(b / 1e3) | |
| }, e = function() { | |
| var a, b, c; | |
| return a = document.createElement("div"), b = { | |
| @@ -235,8 +232,7 @@ | |
| }), f.utils.bubbleChildValueChanges(e, ["priority", "active"]), e.priority.set(e.params.priority), e.active.set(e.params.active), e.expanded.set(!1) | |
| }, | |
| getNotificationsContainerElement: function() { | |
| - var a = this; | |
| - return a.contentContainer.find(".customize-control-notifications-container:first") | |
| + return this.contentContainer.find(".customize-control-notifications-container:first") | |
| }, | |
| setupNotifications: function() { | |
| var a, b = this; | |
| @@ -258,18 +254,19 @@ | |
| onChangeActive: function(a, c) { | |
| var d, e, g = this, | |
| h = g.headContainer; | |
| - return c.unchanged ? void(c.completeCallback && c.completeCallback()) : (d = "resolved" === f.previewer.deferred.active.state() ? c.duration : 0, g.extended(f.Panel) && (f.panel.each(function(a) { | |
| + if (c.unchanged) return void(c.completeCallback && c.completeCallback()); | |
| + d = "resolved" === f.previewer.deferred.active.state() ? c.duration : 0, g.extended(f.Panel) && (f.panel.each(function(a) { | |
| a !== g && a.expanded() && (e = a, d = 0) | |
| }), a || _.each(g.sections(), function(a) { | |
| a.collapse({ | |
| duration: 0 | |
| }) | |
| - })), void(b.contains(document, h.get(0)) ? a ? h.slideDown(d, c.completeCallback) : g.expanded() ? g.collapse({ | |
| + })), b.contains(document, h.get(0)) ? a ? h.slideDown(d, c.completeCallback) : g.expanded() ? g.collapse({ | |
| duration: d, | |
| completeCallback: function() { | |
| h.slideUp(d, c.completeCallback) | |
| } | |
| - }) : h.slideUp(d, c.completeCallback) : (h.toggle(a), c.completeCallback && c.completeCallback()))) | |
| + }) : h.slideUp(d, c.completeCallback) : (h.toggle(a), c.completeCallback && c.completeCallback()) | |
| }, | |
| _toggleActive: function(a, b) { | |
| var c = this; | |
| @@ -509,10 +506,11 @@ | |
| } | |
| var d = this, | |
| e = d.contentContainer.closest(".customize-themes-full-container"); | |
| - return b.unchanged ? void(b.completeCallback && b.completeCallback()) : void(a ? d.panel() && f.panel.has(d.panel()) ? f.panel(d.panel()).expand({ | |
| + if (b.unchanged) return void(b.completeCallback && b.completeCallback()); | |
| + a ? d.panel() && f.panel.has(d.panel()) ? f.panel(d.panel()).expand({ | |
| duration: b.duration, | |
| completeCallback: c | |
| - }) : c() : (d.contentContainer.removeClass("current-section"), d.headerContainer.find(".filter-details").slideUp(180), e.off("scroll"), b.completeCallback && b.completeCallback())) | |
| + }) : c() : (d.contentContainer.removeClass("current-section"), d.headerContainer.find(".filter-details").slideUp(180), e.off("scroll"), b.completeCallback && b.completeCallback()) | |
| }, | |
| getContent: function() { | |
| return this.container.find(".control-section-content") | |
| @@ -527,12 +525,13 @@ | |
| page: b | |
| }, "remote" === d.params.filter_type && (a.search = d.term, a.tags = d.tags), d.headContainer.closest(".wp-full-overlay").addClass("loading"), d.loading = !0, d.container.find(".no-themes").hide(), c = wp.ajax.post("customize_load_themes", a), c.done(function(a) { | |
| var c = a.themes; | |
| - return "" !== d.nextTerm || "" !== d.nextTags ? (d.nextTerm && (d.term = d.nextTerm), d.nextTags && (d.tags = d.nextTags), d.nextTerm = "", d.nextTags = "", d.loading = !1, void d.loadThemes()) : (0 !== c.length ? (d.loadControls(c, b), 1 === b && (_.each(d.controls().slice(0, 3), function(a) { | |
| + if ("" !== d.nextTerm || "" !== d.nextTags) return d.nextTerm && (d.term = d.nextTerm), d.nextTags && (d.tags = d.nextTags), d.nextTerm = "", d.nextTags = "", d.loading = !1, void d.loadThemes(); | |
| + 0 !== c.length ? (d.loadControls(c, b), 1 === b && (_.each(d.controls().slice(0, 3), function(a) { | |
| var b, c = a.params.theme.screenshot[0]; | |
| c && (b = new Image, b.src = c) | |
| - }), "local" !== d.params.filter_type && wp.a11y.speak(f.settings.l10n.themeSearchResults.replace("%d", a.info.results))), _.delay(d.renderScreenshots, 100), ("local" === d.params.filter_type || 100 > c.length) && (d.fullyLoaded = !0)) : 0 === d.loaded ? (d.container.find(".no-themes").show(), wp.a11y.speak(d.container.find(".no-themes").text())) : d.fullyLoaded = !0, "local" === d.params.filter_type ? d.updateCount() : d.updateCount(a.info.results), d.container.find(".unexpected-error").hide(), d.headContainer.closest(".wp-full-overlay").removeClass("loading"), void(d.loading = !1)) | |
| + }), "local" !== d.params.filter_type && wp.a11y.speak(f.settings.l10n.themeSearchResults.replace("%d", a.info.results))), _.delay(d.renderScreenshots, 100), ("local" === d.params.filter_type || 100 > c.length) && (d.fullyLoaded = !0)) : 0 === d.loaded ? (d.container.find(".no-themes").show(), wp.a11y.speak(d.container.find(".no-themes").text())) : d.fullyLoaded = !0, "local" === d.params.filter_type ? d.updateCount() : d.updateCount(a.info.results), d.container.find(".unexpected-error").hide(), d.headContainer.closest(".wp-full-overlay").removeClass("loading"), d.loading = !1 | |
| }), c.fail(function(a) { | |
| - "undefined" == typeof a ? (d.container.find(".unexpected-error").show(), wp.a11y.speak(d.container.find(".unexpected-error").text())) : "undefined" != typeof console && console.error && console.error(a), d.headContainer.closest(".wp-full-overlay").removeClass("loading"), d.loading = !1 | |
| + void 0 === a ? (d.container.find(".unexpected-error").show(), wp.a11y.speak(d.container.find(".unexpected-error").text())) : "undefined" != typeof console && console.error && console.error(a), d.headContainer.closest(".wp-full-overlay").removeClass("loading"), d.loading = !1 | |
| })) | |
| }, | |
| loadControls: function(a, b) { | |
| @@ -559,7 +558,7 @@ | |
| g = f.section.has("wporg_themes") && "remote" !== e.params.filter_type ? ".no-themes-local" : ".no-themes", | |
| h = e.controls(); | |
| e.loading || (b = a.toLowerCase().trim().replace(/-/g, " ").split(" "), _.each(h, function(a) { | |
| - d = a.filter(b), d && (c += 1) | |
| + (d = a.filter(b)) && (c += 1) | |
| }), 0 === c ? (e.container.find(g).show(), wp.a11y.speak(e.container.find(g).text())) : e.container.find(g).hide(), e.renderScreenshots(), f.reflowPaneContents(), e.updateCountDebounced(c)) | |
| }, | |
| checkTerm: function(a) { | |
| @@ -616,7 +615,7 @@ | |
| }, | |
| getNextTheme: function() { | |
| var a, b, c, d, e = this; | |
| - return a = f.control(e.params.action + "_theme_" + e.currentTheme), c = e.controls(), d = _.indexOf(c, a), -1 !== d && (b = c[d + 1], !!b && b.params.theme) | |
| + return a = f.control(e.params.action + "_theme_" + e.currentTheme), c = e.controls(), -1 !== (d = _.indexOf(c, a)) && (!!(b = c[d + 1]) && b.params.theme) | |
| }, | |
| previousTheme: function() { | |
| var a = this; | |
| @@ -626,7 +625,7 @@ | |
| }, | |
| getPreviousTheme: function() { | |
| var a, b, c, d, e = this; | |
| - return a = f.control(e.params.action + "_theme_" + e.currentTheme), c = e.controls(), d = _.indexOf(c, a), -1 !== d && (b = c[d - 1], !!b && b.params.theme) | |
| + return a = f.control(e.params.action + "_theme_" + e.currentTheme), c = e.controls(), -1 !== (d = _.indexOf(c, a)) && (!!(b = c[d - 1]) && b.params.theme) | |
| }, | |
| updateLimits: function() { | |
| this.getNextTheme() || this.overlay.find(".right").addClass("disabled"), this.getPreviousTheme() || this.overlay.find(".left").addClass("disabled") | |
| @@ -636,15 +635,13 @@ | |
| }, | |
| showDetails: function(a, b) { | |
| function c() { | |
| - return !g.canSwitchTheme(a.id) | |
| + return !e.canSwitchTheme(a.id) | |
| } | |
| - | |
| - function d() { | |
| + var d = this, | |
| + e = f.panel("themes"); | |
| + d.currentTheme = a.id, d.overlay.html(d.template(a)).fadeIn("fast").focus(), d.overlay.find("button.preview, button.preview-theme").toggleClass("disabled", c()), d.overlay.find("button.theme-install").toggleClass("disabled", function() { | |
| return c() || !1 === f.settings.theme._canInstall || !0 === f.settings.theme._filesystemCredentialsNeeded | |
| - } | |
| - var e = this, | |
| - g = f.panel("themes"); | |
| - e.currentTheme = a.id, e.overlay.html(e.template(a)).fadeIn("fast").focus(), e.overlay.find("button.preview, button.preview-theme").toggleClass("disabled", c()), e.overlay.find("button.theme-install").toggleClass("disabled", d()), e.$body.addClass("modal-open"), e.containFocus(e.overlay), e.updateLimits(), wp.a11y.speak(f.settings.l10n.announceThemeDetails.replace("%s", a.name)), b && b() | |
| + }()), d.$body.addClass("modal-open"), d.containFocus(d.overlay), d.updateLimits(), wp.a11y.speak(f.settings.l10n.announceThemeDetails.replace("%s", a.name)), b && b() | |
| }, | |
| closeDetails: function() { | |
| var a = this; | |
| @@ -735,24 +732,25 @@ | |
| j = e.find(".customize-panel-back"), | |
| k = d.sections(); | |
| a && !e.hasClass("current-panel") ? (f.section.each(function(a) { | |
| - d.id !== a.panel() && a.collapse({ | |
| - duration: 0 | |
| - }) | |
| - }), f.panel.each(function(a) { | |
| - d !== a && a.collapse({ | |
| - duration: 0 | |
| - }); | |
| - }), d.params.autoExpandSoleSection && 1 === k.length && k[0].active.get() ? (e.addClass("current-panel skip-transition"), g.addClass("in-sub-panel"), k[0].expand({ | |
| - completeCallback: b.completeCallback | |
| - })) : (d._animateChangeExpanded(function() { | |
| - i.attr("tabindex", "-1"), j.attr("tabindex", "0"), j.focus(), e.css("top", ""), h.scrollTop(0), b.completeCallback && b.completeCallback() | |
| - }), e.addClass("current-panel"), g.addClass("in-sub-panel")), f.state("expandedPanel").set(d)) : !a && e.hasClass("current-panel") && (c = e.hasClass("skip-transition"), c ? e.removeClass("skip-transition") : d._animateChangeExpanded(function() { | |
| + d.id !== a.panel() && a.collapse({ | |
| + duration: 0 | |
| + }) | |
| + }), f.panel.each(function(a) { | |
| + d !== a && a.collapse({ | |
| + duration: 0 | |
| + }) | |
| + }), | |
| + d.params.autoExpandSoleSection && 1 === k.length && k[0].active.get() ? (e.addClass("current-panel skip-transition"), g.addClass("in-sub-panel"), k[0].expand({ | |
| + completeCallback: b.completeCallback | |
| + })) : (d._animateChangeExpanded(function() { | |
| + i.attr("tabindex", "-1"), j.attr("tabindex", "0"), j.focus(), e.css("top", ""), h.scrollTop(0), b.completeCallback && b.completeCallback() | |
| + }), e.addClass("current-panel"), g.addClass("in-sub-panel")), f.state("expandedPanel").set(d)) : !a && e.hasClass("current-panel") && (c = e.hasClass("skip-transition"), c ? e.removeClass("skip-transition") : d._animateChangeExpanded(function() { | |
| i.attr("tabindex", "0"), j.attr("tabindex", "-1"), i.focus(), e.css("top", ""), b.completeCallback && b.completeCallback() | |
| }), g.removeClass("in-sub-panel"), e.removeClass("current-panel"), d === f.state("expandedPanel").get() && f.state("expandedPanel").set(!1)) | |
| }, | |
| renderContent: function() { | |
| var a, c = this; | |
| - a = 0 !== b("#tmpl-" + c.templateSelector + "-content").length ? wp.template(c.templateSelector + "-content") : wp.template("customize-panel-default-content"), a && c.headContainer && c.contentContainer.html(a(_.extend({ | |
| + (a = 0 !== b("#tmpl-" + c.templateSelector + "-content").length ? wp.template(c.templateSelector + "-content") : wp.template("customize-panel-default-content")) && c.headContainer && c.contentContainer.html(a(_.extend({ | |
| id: c.id | |
| }, c.params))) | |
| } | |
| @@ -791,11 +789,12 @@ | |
| onChangeExpanded: function(a, b) { | |
| var c, d, e = this, | |
| g = !1; | |
| - return f.Panel.prototype.onChangeExpanded.apply(this, [a, b]), b.unchanged ? void(b.completeCallback && b.completeCallback()) : (c = e.headContainer.closest(".wp-full-overlay"), void(a ? (c.addClass("in-themes-panel").delay(200).find(".customize-themes-full-container").addClass("animate"), _.delay(function() { | |
| + if (f.Panel.prototype.onChangeExpanded.apply(this, [a, b]), b.unchanged) return void(b.completeCallback && b.completeCallback()); | |
| + c = e.headContainer.closest(".wp-full-overlay"), a ? (c.addClass("in-themes-panel").delay(200).find(".customize-themes-full-container").addClass("animate"), _.delay(function() { | |
| c.addClass("themes-panel-expanded") | |
| }, 200), 600 < window.innerWidth && (d = e.sections(), _.each(d, function(a) { | |
| a.expanded() && (g = !0) | |
| - }), !g && d.length > 0 && d[0].expand())) : c.removeClass("in-themes-panel themes-panel-expanded").find(".customize-themes-full-container").removeClass("animate"))) | |
| + }), !g && d.length > 0 && d[0].expand())) : c.removeClass("in-themes-panel themes-panel-expanded").find(".customize-themes-full-container").removeClass("animate") | |
| }, | |
| installTheme: function(a) { | |
| var c, d, e, g = this, | |
| @@ -983,7 +982,7 @@ | |
| renderNotifications: function() { | |
| var a, c, d = this, | |
| e = !1; | |
| - "undefined" != typeof console && console.warn && console.warn("[DEPRECATED] wp.customize.Control.prototype.renderNotifications() is deprecated in favor of instantating a wp.customize.Notifications and calling its render() method."), a = d.getNotificationsContainerElement(), a && a.length && (c = [], d.notifications.each(function(a) { | |
| + "undefined" != typeof console && console.warn && console.warn("[DEPRECATED] wp.customize.Control.prototype.renderNotifications() is deprecated in favor of instantating a wp.customize.Notifications and calling its render() method."), (a = d.getNotificationsContainerElement()) && a.length && (c = [], d.notifications.each(function(a) { | |
| c.push(a), "error" === a.type && (e = !0) | |
| }), 0 === c.length ? a.stop().slideUp("fast") : a.stop().slideDown("fast", null, function() { | |
| b(this).css("height", "auto") | |
| @@ -997,7 +996,8 @@ | |
| }, | |
| focus: d, | |
| onChangeActive: function(a, c) { | |
| - return c.unchanged ? void(c.completeCallback && c.completeCallback()) : void(b.contains(document, this.container[0]) ? a ? this.container.slideDown(c.duration, c.completeCallback) : this.container.slideUp(c.duration, c.completeCallback) : (this.container.toggle(a), c.completeCallback && c.completeCallback())) | |
| + if (c.unchanged) return void(c.completeCallback && c.completeCallback()); | |
| + b.contains(document, this.container[0]) ? a ? this.container.slideDown(c.duration, c.completeCallback) : this.container.slideUp(c.duration, c.completeCallback) : (this.container.toggle(a), c.completeCallback && c.completeCallback()) | |
| }, | |
| toggle: function(a) { | |
| return this.onChangeActive(a, this.defaultActiveArguments) | |
| @@ -1021,7 +1021,7 @@ | |
| }, | |
| renderContent: function() { | |
| var a, b, c, d, e = this; | |
| - b = ["button", "checkbox", "date", "datetime-local", "email", "month", "number", "password", "radio", "range", "search", "select", "tel", "time", "text", "textarea", "week", "url"], c = e.templateSelector, c === "customize-control-" + e.params.type + "-content" && _.contains(b, e.params.type) && !document.getElementById("tmpl-" + c) && 0 === e.container.children().length && (c = "customize-control-default-content"), document.getElementById("tmpl-" + c) && (a = wp.template(c), a && e.container && e.container.html(a(e.params))), e.notifications.container = e.getNotificationsContainerElement(), d = e.section(), (!d || f.section.has(d) && f.section(d).expanded()) && e.notifications.render() | |
| + b = ["button", "checkbox", "date", "datetime-local", "email", "month", "number", "password", "radio", "range", "search", "select", "tel", "time", "text", "textarea", "week", "url"], c = e.templateSelector, c === "customize-control-" + e.params.type + "-content" && _.contains(b, e.params.type) && !document.getElementById("tmpl-" + c) && 0 === e.container.children().length && (c = "customize-control-default-content"), document.getElementById("tmpl-" + c) && (a = wp.template(c)) && e.container && e.container.html(a(e.params)), e.notifications.container = e.getNotificationsContainerElement(), (!(d = e.section()) || f.section.has(d) && f.section(d).expanded()) && e.notifications.render() | |
| }, | |
| addNewPage: function() { | |
| var a, c, d, e, g, h, i = this; | |
| @@ -1212,7 +1212,7 @@ | |
| y1: d, | |
| x2: k + c, | |
| y2: l + d | |
| - }, h === !1 && g === !1 && (e.aspectRatio = k + ":" + l), !0 === h && (delete e.minHeight, e.maxWidth = i), !0 === g && (delete e.minWidth, e.maxHeight = j), e | |
| + }, !1 === h && !1 === g && (e.aspectRatio = k + ":" + l), !0 === h && (delete e.minHeight, e.maxWidth = i), !0 === g && (delete e.minWidth, e.maxHeight = j), e | |
| }, | |
| mustBeCropped: function(a, b, c, d, e, f) { | |
| return (!0 !== a || !0 !== b) && ((!0 !== a || d !== f) && ((!0 !== b || c !== e) && ((c !== e || d !== f) && !(e <= c)))) | |
| @@ -1328,7 +1328,7 @@ | |
| y1: 0, | |
| x2: j, | |
| y2: k | |
| - }, m === !1 && l === !1 && (i.aspectRatio = j + ":" + k), m === !1 && (i.maxHeight = k), l === !1 && (i.maxWidth = j), i | |
| + }, !1 === m && !1 === l && (i.aspectRatio = j + ":" + k), !1 === m && (i.maxHeight = k), !1 === l && (i.maxWidth = j), i | |
| }, | |
| openMedia: function(a) { | |
| var b = _wpMediaViewsL10n; | |
| @@ -1399,7 +1399,7 @@ | |
| e.touchDrag = !0 | |
| }), e.container.on("click keydown touchend", ".theme", function(a) { | |
| var c; | |
| - if (!f.utils.isKeydownButNotEnterEvent(a)) return e.touchDrag === !0 ? e.touchDrag = !1 : void(b(a.target).is(".theme-actions .button, .update-theme") || (a.preventDefault(), c = f.section(e.section()), c.showDetails(e.params.theme, function() { | |
| + if (!f.utils.isKeydownButNotEnterEvent(a)) return !0 === e.touchDrag ? e.touchDrag = !1 : void(b(a.target).is(".theme-actions .button, .update-theme") || (a.preventDefault(), c = f.section(e.section()), c.showDetails(e.params.theme, function() { | |
| f.settings.theme._filesystemCredentialsNeeded && c.overlay.find(".theme-actions .delete-theme").remove() | |
| }))) | |
| }), e.container.on("render-screenshot", function() { | |
| @@ -1438,14 +1438,15 @@ | |
| }, | |
| ready: function() { | |
| var a = this; | |
| - return a.section() ? void f.section(a.section(), function(b) { | |
| + if (!a.section()) return void a.initEditor(); | |
| + f.section(a.section(), function(b) { | |
| b.deferred.embedded.done(function() { | |
| var c; | |
| b.expanded() ? a.initEditor() : (c = function(d) { | |
| d && (a.initEditor(), b.expanded.unbind(c)) | |
| }, b.expanded.bind(c)) | |
| }) | |
| - }) : void a.initEditor() | |
| + }) | |
| }, | |
| initEditor: function() { | |
| var a, b = this, | |
| @@ -1484,8 +1485,7 @@ | |
| }), d.setting.bind(function(a) { | |
| f || d.editor.codemirror.setValue(a) | |
| }), d.editor.codemirror.on("keydown", function(a, b) { | |
| - var c = 27; | |
| - c === b.keyCode && b.stopPropagation() | |
| + 27 === b.keyCode && b.stopPropagation() | |
| }), d.deferred.codemirror.resolveWith(d, [d.editor.codemirror]) | |
| }, | |
| onTabNext: function() { | |
| @@ -1510,10 +1510,9 @@ | |
| b.on("blur", function() { | |
| b.data("next-tab-blurs", !1) | |
| }), b.on("keydown", function(a) { | |
| - var d, e, f, g = 9, | |
| - h = 27; | |
| - return h === a.keyCode ? void(b.data("next-tab-blurs") || (b.data("next-tab-blurs", !0), a.stopPropagation())) : void(g !== a.keyCode || a.ctrlKey || a.altKey || a.shiftKey || b.data("next-tab-blurs") || (d = c.selectionStart, | |
| - e = c.selectionEnd, f = c.value, d >= 0 && (c.value = f.substring(0, d).concat("\t", f.substring(e)), b.selectionStart = c.selectionEnd = d + 1), a.stopPropagation(), a.preventDefault())) | |
| + var d, e, f; | |
| + if (27 === a.keyCode) return void(b.data("next-tab-blurs") || (b.data("next-tab-blurs", !0), a.stopPropagation())); | |
| + 9 !== a.keyCode || a.ctrlKey || a.altKey || a.shiftKey || b.data("next-tab-blurs") || (d = c.selectionStart, e = c.selectionEnd, f = c.value, d >= 0 && (c.value = f.substring(0, d).concat("\t", f.substring(e)), b.selectionStart = c.selectionEnd = d + 1), a.stopPropagation(), a.preventDefault()) | |
| }), a.deferred.codemirror.rejectWith(a) | |
| } | |
| }), f.DateTimeControl = f.Control.extend({ | |
| @@ -1536,8 +1535,7 @@ | |
| }) | |
| }, | |
| parseDateTime: function(a) { | |
| - var b, c, d = this, | |
| - e = 12; | |
| + var b, c, d = this; | |
| return a && (b = a.match(/^(\d\d\d\d)-(\d\d)-(\d\d)(?: (\d\d):(\d\d)(?::(\d\d))?)?$/)), b ? (b.shift(), c = { | |
| year: b.shift(), | |
| month: b.shift(), | |
| @@ -1545,7 +1543,7 @@ | |
| hour: b.shift() || "00", | |
| minute: b.shift() || "00", | |
| second: b.shift() || "00" | |
| - }, d.params.includeTime && d.params.twelveHourFormat && (c.hour = parseInt(c.hour, 10), c.meridian = c.hour >= e ? "pm" : "am", c.hour = c.hour % e ? String(c.hour % e) : String(e), delete c.second), c) : null | |
| + }, d.params.includeTime && d.params.twelveHourFormat && (c.hour = parseInt(c.hour, 10), c.meridian = c.hour >= 12 ? "pm" : "am", c.hour = c.hour % 12 ? String(c.hour % 12) : String(12), delete c.second), c) : null | |
| }, | |
| validateInputs: function() { | |
| var a, b, c = this; | |
| @@ -1580,8 +1578,8 @@ | |
| return 0 < f.utils.getRemainingTime(a.convertInputDateToString()) | |
| }, | |
| convertHourToTwentyFourHourFormat: function(a, b) { | |
| - var c, d, e = 12; | |
| - return d = parseInt(a, 10), isNaN(d) ? "" : (c = "pm" === b && d < e ? d + e : "am" === b && e === d ? d - e : d, String(c)) | |
| + var c, d; | |
| + return d = parseInt(a, 10), isNaN(d) ? "" : (c = "pm" === b && d < 12 ? d + 12 : "am" === b && 12 === d ? d - 12 : d, String(c)) | |
| }, | |
| populateDateInputs: function() { | |
| var a, b = this; | |
| @@ -1685,9 +1683,10 @@ | |
| }, | |
| login: function(a) { | |
| var c, d = this; | |
| - return c = function() { | |
| - a.rejectWith(d, ["logged out"]) | |
| - }, this.triedLogin ? c() : void b.get(f.settings.url.ajax, { | |
| + if (c = function() { | |
| + a.rejectWith(d, ["logged out"]) | |
| + }, this.triedLogin) return c(); | |
| + b.get(f.settings.url.ajax, { | |
| action: "logged-in" | |
| }).fail(c).done(function(e) { | |
| var g; | |
| @@ -1757,8 +1756,7 @@ | |
| control: a.activeControls | |
| }, _(b).each(function(a, b) { | |
| f[b].each(function(c, d) { | |
| - var e = _.isUndefined(f.settings[b + "s"][d]); | |
| - e && _.isUndefined(a[d]) || (a[d] ? c.activate() : c.deactivate()) | |
| + _.isUndefined(f.settings[b + "s"][d]) && _.isUndefined(a[d]) || (a[d] ? c.activate() : c.deactivate()) | |
| }) | |
| }), a.settingValidities && f._handleSettingValidities({ | |
| settingValidities: a.settingValidities, | |
| @@ -1875,7 +1873,7 @@ | |
| var b, c = {}; | |
| return _.each(_.unique(a), function(a) { | |
| var d = f(a); | |
| - d && (b = d.findControls(), b && b.length > 0 && (c[a] = b)) | |
| + d && (b = d.findControls()) && b.length > 0 && (c[a] = b) | |
| }), c | |
| }, f.reflowPaneContents = _.bind(function() { | |
| var a, c, d, e = [], | |
| @@ -1954,7 +1952,7 @@ | |
| function c() { | |
| r && (r(), r = null) | |
| } | |
| - var d, e, g, h, l, m, n, o, p, q, r, s = 1e3; | |
| + var d, e, g, h, l, m, n, o, p, q, r; | |
| e = new f.Control("trash_changeset", { | |
| type: "button", | |
| section: a.id, | |
| @@ -1980,7 +1978,8 @@ | |
| b.preventDefault(), a.expanded.set(!a.expanded.get()) | |
| }), a.expanded.bind(function(a) { | |
| var d; | |
| - return k.attr("aria-expanded", String(a)), k.toggleClass("active", a), a ? void c() : (d = f.state("changesetStatus").get(), "" !== d && "auto-draft" !== d || (d = "publish"), void(f.state("selectedChangesetStatus").get() !== d ? b() : "future" === f.state("selectedChangesetStatus").get() && f.state("selectedChangesetDate").get() !== f.state("changesetDate").get() && b())) | |
| + if (k.attr("aria-expanded", String(a)), k.toggleClass("active", a), a) return void c(); | |
| + d = f.state("changesetStatus").get(), "" !== d && "auto-draft" !== d || (d = "publish"), f.state("selectedChangesetStatus").get() !== d ? b() : "future" === f.state("selectedChangesetStatus").get() && f.state("selectedChangesetDate").get() !== f.state("changesetDate").get() && b() | |
| }), l = new f.Control("changeset_status", { | |
| priority: 10, | |
| type: "radio", | |
| @@ -2005,7 +2004,7 @@ | |
| a && !p ? p = setInterval(function() { | |
| var a = f.utils.getRemainingTime(f.state("changesetDate").get()); | |
| f.state("remainingTimeToPublish").set(a), a <= 0 && (clearInterval(p), p = 0, o()) | |
| - }, s) : !a && p && (clearInterval(p), p = 0) | |
| + }, 1e3) : !a && p && (clearInterval(p), p = 0) | |
| }, f.state("changesetDate").bind(q), f.state("selectedChangesetDate").bind(q), f.state("changesetStatus").bind(q), f.state("selectedChangesetStatus").bind(q), q(), m.active.validate = function() { | |
| return "future" === f.state("selectedChangesetStatus").get() | |
| }, n = function(a) { | |
| @@ -2058,17 +2057,24 @@ | |
| p = []; | |
| return a && a.status && (j = a.status), f.state("saving").get() && (i.reject("already_saving"), i.promise()), f.state("saving").set(!0), g = function() { | |
| var e, g, l = {}, | |
| - q = f._latestRevision, | |
| - r = "client_side_error"; | |
| - return f.bind("change", d), f.notifications.remove(r), f.each(function(a) { | |
| - a.notifications.each(function(b) { | |
| - "error" !== b.type || b.fromServer || (n.push(a.id), l[a.id] || (l[a.id] = {}), l[a.id][b.code] = b) | |
| - }) | |
| - }), f.control.each(function(a) { | |
| - (!a.setting || !a.setting.id && a.active.get()) && a.notifications.each(function(b) { | |
| - "error" === b.type && p.push([a]) | |
| - }) | |
| - }), o = _.union(p, _.values(f.findControlsForSettings(n))), _.isEmpty(o) ? (g = b.extend(h.query({ | |
| + q = f._latestRevision; | |
| + if (f.bind("change", d), f.notifications.remove("client_side_error"), f.each(function(a) { | |
| + a.notifications.each(function(b) { | |
| + "error" !== b.type || b.fromServer || (n.push(a.id), l[a.id] || (l[a.id] = {}), l[a.id][b.code] = b) | |
| + }) | |
| + }), f.control.each(function(a) { | |
| + (!a.setting || !a.setting.id && a.active.get()) && a.notifications.each(function(b) { | |
| + "error" === b.type && p.push([a]) | |
| + }) | |
| + }), o = _.union(p, _.values(f.findControlsForSettings(n))), !_.isEmpty(o)) return o[0][0].focus(), f.unbind("change", d), n.length && f.notifications.add(new f.Notification("client_side_error", { | |
| + message: (1 === n.length ? f.l10n.saveBlockedError.singular : f.l10n.saveBlockedError.plural).replace(/%s/g, String(n.length)), | |
| + type: "error", | |
| + dismissible: !0, | |
| + saveFailure: !0 | |
| + })), i.rejectWith(h, [{ | |
| + setting_invalidities: l | |
| + }]), f.state("saving").set(!1), i.promise(); | |
| + g = b.extend(h.query({ | |
| excludeCustomizedSaved: !1 | |
| }), { | |
| nonce: h.nonce.save, | |
| @@ -2094,21 +2100,14 @@ | |
| settingValidities: a.setting_validities, | |
| focusInvalidControl: !0 | |
| }), i.rejectWith(h, [a]), f.trigger("error", a), "changeset_already_published" === a.code && a.next_changeset_uuid && (f.settings.changeset.uuid = a.next_changeset_uuid, f.state("changesetStatus").set(""), f.settings.changeset.branching && c.send("changeset-uuid", f.settings.changeset.uuid), f.previewer.send("changeset-uuid", f.settings.changeset.uuid)) | |
| - }), void e.done(function(a) { | |
| + }), e.done(function(a) { | |
| h.send("saved", a), f.state("changesetStatus").set(a.changeset_status), a.changeset_date && f.state("changesetDate").set(a.changeset_date), "publish" === a.changeset_status && (f.each(function(a) { | |
| a._dirty && (_.isUndefined(f._latestSettingRevisions[a.id]) || f._latestSettingRevisions[a.id] <= q) && (a._dirty = !1) | |
| }), f.state("changesetStatus").set(""), f.settings.changeset.uuid = a.next_changeset_uuid, f.settings.changeset.branching && c.send("changeset-uuid", f.settings.changeset.uuid)), f._lastSavedRevision = Math.max(q, f._lastSavedRevision), a.setting_validities && f._handleSettingValidities({ | |
| settingValidities: a.setting_validities, | |
| focusInvalidControl: !0 | |
| }), i.resolveWith(h, [a]), f.trigger("saved", a), _.isEmpty(m) || f.state("saved").set(!1) | |
| - })) : (o[0][0].focus(), f.unbind("change", d), n.length && f.notifications.add(new f.Notification(r, { | |
| - message: (1 === n.length ? f.l10n.saveBlockedError.singular : f.l10n.saveBlockedError.plural).replace(/%s/g, String(n.length)), | |
| - type: "error", | |
| - dismissible: !0, | |
| - saveFailure: !0 | |
| - })), i.rejectWith(h, [{ | |
| - setting_invalidities: l | |
| - }]), f.state("saving").set(!1), i.promise()) | |
| + }) | |
| }, 0 === l() ? g() : (e = function() { | |
| 0 === l() && (f.state.unbind("change", e), g()) | |
| }, f.state.bind("change", e)), i.promise() | |
| @@ -2240,10 +2239,11 @@ | |
| if (!d.changeset_uuid) return; | |
| delete d.changeset_uuid | |
| } | |
| - c.search = b.param(d), history.replaceState({}, document.title, c.href) | |
| + c.search = b.param(d), | |
| + history.replaceState({}, document.title, c.href) | |
| } | |
| }, f.settings.changeset.branching && q.bind(function(a) { | |
| - c("" !== a && "publish" !== a && "trash" !== a); | |
| + c("" !== a && "publish" !== a && "trash" !== a) | |
| }) | |
| }(f.state), | |
| function() { | |
| @@ -2315,43 +2315,39 @@ | |
| return a = document.createElement("a"), a.href = location.href, c = f.utils.parseQueryString(a.search.substr(1)), f.settings.changeset.latestAutoDraftUuid ? c.changeset_uuid = f.settings.changeset.latestAutoDraftUuid : c.customize_autosaved = "on", c["return"] = f.settings.url["return"], a.search = b.param(c), a.href | |
| } | |
| - function c(a) { | |
| - var c, d = document.createElement("a"), | |
| - e = 0; | |
| - d.href = location.href, c = f.utils.parseQueryString(d.search.substr(1)), _.each(a, function(a) { | |
| - "undefined" != typeof c[a] && (e += 1, delete c[a]) | |
| - }), 0 !== e && (d.search = b.param(c), history.replaceState({}, document.title, d.href)) | |
| - } | |
| - | |
| - function d() { | |
| - h || (wp.ajax.post("customize_dismiss_autosave_or_lock", { | |
| + function c() { | |
| + e || (wp.ajax.post("customize_dismiss_autosave_or_lock", { | |
| wp_customize: "on", | |
| customize_theme: f.settings.theme.stylesheet, | |
| customize_changeset_uuid: f.settings.changeset.uuid, | |
| nonce: f.settings.nonce.dismiss_autosave_or_lock, | |
| dismiss_autosave: !0 | |
| - }), h = !0) | |
| + }), e = !0) | |
| } | |
| - | |
| - function e() { | |
| - var b, c = "autosave_available"; | |
| - f.notifications.add(new f.Notification(c, { | |
| + var d = [], | |
| + e = !1; | |
| + f.settings.changeset.autosaved && (f.state("saved").set(!1), d.push("customize_autosaved")), f.settings.changeset.branching || f.settings.changeset.status && "auto-draft" !== f.settings.changeset.status || d.push("changeset_uuid"), d.length > 0 && function(a) { | |
| + var c, d = document.createElement("a"), | |
| + e = 0; | |
| + d.href = location.href, c = f.utils.parseQueryString(d.search.substr(1)), _.each(a, function(a) { | |
| + "undefined" != typeof c[a] && (e += 1, delete c[a]) | |
| + }), 0 !== e && (d.search = b.param(c), history.replaceState({}, document.title, d.href)) | |
| + }(d), (f.settings.changeset.latestAutoDraftUuid || f.settings.changeset.hasAutosaveRevision) && function() { | |
| + var b, d = "autosave_available"; | |
| + f.notifications.add(new f.Notification(d, { | |
| message: f.l10n.autosaveNotice, | |
| type: "warning", | |
| dismissible: !0, | |
| render: function() { | |
| - var b, c = f.Notification.prototype.render.call(this); | |
| - return b = c.find("a"), b.prop("href", a()), b.on("click", function(b) { | |
| + var b, d = f.Notification.prototype.render.call(this); | |
| + return b = d.find("a"), b.prop("href", a()), b.on("click", function(b) { | |
| b.preventDefault(), location.replace(a()) | |
| - }), c.find(".notice-dismiss").on("click", d), c | |
| + }), d.find(".notice-dismiss").on("click", c), d | |
| } | |
| })), b = function() { | |
| - d(), f.notifications.remove(c), f.unbind("change", b), f.state("changesetStatus").unbind(b) | |
| + c(), f.notifications.remove(d), f.unbind("change", b), f.state("changesetStatus").unbind(b) | |
| }, f.bind("change", b), f.state("changesetStatus").bind(b) | |
| - } | |
| - var g = [], | |
| - h = !1; | |
| - f.settings.changeset.autosaved && (f.state("saved").set(!1), g.push("customize_autosaved")), f.settings.changeset.branching || f.settings.changeset.status && "auto-draft" !== f.settings.changeset.status || g.push("changeset_uuid"), g.length > 0 && c(g), (f.settings.changeset.latestAutoDraftUuid || f.settings.changeset.hasAutosaveRevision) && e() | |
| + }() | |
| }(), f.previewer.previewUrl() ? f.previewer.refresh() : f.previewer.previewUrl(f.settings.url.home), i.click(function(a) { | |
| f.previewer.save(), a.preventDefault() | |
| }).keydown(function(a) { | |
| @@ -2425,9 +2421,8 @@ | |
| g = parseInt(d.css("top"), 10), | |
| h = d.hasClass("maybe-sticky"), | |
| i = d.hasClass("is-sticky"), | |
| - k = d.hasClass("is-in-view"), | |
| - l = -1 === c; | |
| - if (!l) return i && (g = b, d.removeClass("is-sticky").css({ | |
| + k = d.hasClass("is-in-view"); | |
| + if (-1 !== c) return i && (g = b, d.removeClass("is-sticky").css({ | |
| top: g + "px", | |
| width: "" | |
| })), void(k && b > g + f && (d.removeClass("is-in-view"), e.css("padding-top", ""))); | |
| @@ -2623,9 +2618,8 @@ | |
| }(), f.control("header_video", function(a) { | |
| a.deferred.embedded.done(function() { | |
| var b = function() { | |
| - var b = f.section(a.section()), | |
| - c = "video_header_not_available"; | |
| - b && (a.active.get() ? b.notifications.remove(c) : b.notifications.add(new f.Notification(c, { | |
| + var b = f.section(a.section()); | |
| + b && (a.active.get() ? b.notifications.remove("video_header_not_available") : b.notifications.add(new f.Notification("video_header_not_available", { | |
| type: "info", | |
| message: f.l10n.videoHeaderNotice | |
| }))) | |
| diff -ur build-unminified/wp-admin/js/customize-nav-menus.min.js build-branch-unminified/wp-admin/js/customize-nav-menus.min.js | |
| --- build-unminified/wp-admin/js/customize-nav-menus.min.js 2018-10-06 21:45:41.550690969 -0500 | |
| +++ build-branch-unminified/wp-admin/js/customize-nav-menus.min.js 2018-10-06 21:42:44.569371432 -0500 | |
| @@ -6,7 +6,7 @@ | |
| } | |
| function e(b) { | |
| - return b = b || "", b = c("<div>").text(b).html(), b = c.trim(b), b || a.Menus.data.l10n.unnamed | |
| + return b = b || "", b = c("<div>").text(b).html(), (b = c.trim(b)) || a.Menus.data.l10n.unnamed | |
| } | |
| wpNavMenu.originalInit = wpNavMenu.init, wpNavMenu.options.menuItemDepthPerLevel = 20, wpNavMenu.options.sortableItems = "> .customize-control-nav_menu_item", wpNavMenu.options.targetTolerance = 10, wpNavMenu.init = function() { | |
| this.jQueryExtensions() | |
| @@ -158,9 +158,10 @@ | |
| }), h = b.ajax.post("load-available-menu-items-customizer", g), h.done(function(b) { | |
| var c; | |
| _.each(b.items, function(b, d) { | |
| - return 0 === b.length ? (0 === j.pages[d] && l[d].find(".accordion-section-title").addClass("cannot-expand").removeClass("loading").find(".accordion-section-title > button").prop("tabIndex", -1), void(j.pages[d] = -1)) : ("post_type:page" !== d || l[d].hasClass("open") || l[d].find(".accordion-section-title > button").click(), b = new a.Menus.AvailableItemCollection(b), j.collection.add(b.models), c = l[d].find(".available-menu-items-list"), b.each(function(a) { | |
| + if (0 === b.length) return 0 === j.pages[d] && l[d].find(".accordion-section-title").addClass("cannot-expand").removeClass("loading").find(".accordion-section-title > button").prop("tabIndex", -1), void(j.pages[d] = -1); | |
| + "post_type:page" !== d || l[d].hasClass("open") || l[d].find(".accordion-section-title > button").click(), b = new a.Menus.AvailableItemCollection(b), j.collection.add(b.models), c = l[d].find(".available-menu-items-list"), b.each(function(a) { | |
| c.append(i(a.attributes)) | |
| - }), void(j.pages[d] += 1)) | |
| + }), j.pages[d] += 1 | |
| }) | |
| }), h.fail(function(a) { | |
| "undefined" != typeof console && console.error && console.error(a) | |
| @@ -172,7 +173,7 @@ | |
| }, | |
| itemSectionHeight: function() { | |
| var a, b, c, d, e; | |
| - c = window.innerHeight, a = this.$el.find(".accordion-section:not( #available-menu-items-search ) .accordion-section-content"), b = this.$el.find('.accordion-section:not( #available-menu-items-search ) .available-menu-items-list:not(":only-child")'), d = 46 * (1 + a.length) + 14, e = c - d, 120 < e && 290 > e && (a.css("max-height", e), b.css("max-height", e - 60)) | |
| + c = window.innerHeight, a = this.$el.find(".accordion-section:not( #available-menu-items-search ) .accordion-section-content"), b = this.$el.find('.accordion-section:not( #available-menu-items-search ) .available-menu-items-list:not(":only-child")'), d = 46 * (1 + a.length) + 14, 120 < (e = c - d) && 290 > e && (a.css("max-height", e), b.css("max-height", e - 60)) | |
| }, | |
| select: function(a) { | |
| this.selected = c(a), this.selected.siblings(".menu-item-tpl").removeClass("selected"), this.selected.addClass("selected") | |
| @@ -185,9 +186,9 @@ | |
| }, | |
| submit: function(a) { | |
| var b, d; | |
| - a || (a = this.selected), a && this.currentMenuControl && (this.select(a), b = c(this.selected).data("menu-item-id"), d = this.collection.findWhere({ | |
| + a || (a = this.selected), a && this.currentMenuControl && (this.select(a), b = c(this.selected).data("menu-item-id"), (d = this.collection.findWhere({ | |
| id: b | |
| - }), d && (this.currentMenuControl.addItemToMenu(d.attributes), c(a).find(".menu-item-handle").addClass("item-added"))) | |
| + })) && (this.currentMenuControl.addItemToMenu(d.attributes), c(a).find(".menu-item-handle").addClass("item-added"))) | |
| }, | |
| _submitLink: function(a) { | |
| "keypress" === a.type && 13 !== a.which || this.submitLink() | |
| @@ -371,15 +372,14 @@ | |
| settings: { | |
| "default": k.id | |
| } | |
| - }), a.control.add(i), i.active.set(!0)), e = k.id + "[delete]", j = a.control(e), j || (j = new a.Control(e, { | |
| + }), a.control.add(i), i.active.set(!0)), e = k.id + "[delete]", (j = a.control(e)) || (j = new a.Control(e, { | |
| section: k.id, | |
| priority: 1001, | |
| templateId: "nav-menu-delete-button" | |
| }), a.control.add(j.id, j), j.active.set(!0), j.deferred.embedded.done(function() { | |
| j.container.find("button").on("click", function() { | |
| - var b = k.params.menu_id, | |
| - c = a.Menus.getMenuControl(b); | |
| - c.setting.set(!1) | |
| + var b = k.params.menu_id; | |
| + a.Menus.getMenuControl(b).setting.set(!1) | |
| }) | |
| })) | |
| }, | |
| @@ -473,7 +473,7 @@ | |
| priority: 1, | |
| menu_id: "", | |
| isCreating: !0 | |
| - }), a.control.add(c, f), f.active.set(!0)), d = h.id + "[submit]", g = a.control(d), g || (g = new a.Control(d, { | |
| + }), a.control.add(c, f), f.active.set(!0)), d = h.id + "[submit]", (g = a.control(d)) || (g = new a.Control(d, { | |
| section: h.id, | |
| priority: 1, | |
| templateId: "nav-menu-submit-new-button" | |
| @@ -484,14 +484,15 @@ | |
| f = e.contentContainer, | |
| g = f.find(".menu-name-field").first(), | |
| h = g.val(); | |
| - return h ? (d = a.Menus.createNavMenu(h), g.val(""), g.removeClass("invalid"), f.find(".assigned-menu-location input[type=checkbox]").each(function() { | |
| + if (!h) return g.addClass("invalid"), void g.focus(); | |
| + d = a.Menus.createNavMenu(h), g.val(""), g.removeClass("invalid"), f.find(".assigned-menu-location input[type=checkbox]").each(function() { | |
| var b, e = c(this); | |
| e.prop("checked") && (b = a("nav_menu_locations[" + e.data("location-id") + "]"), b.set(d.params.menu_id), e.prop("checked", !1)) | |
| - }), b.a11y.speak(a.Menus.data.l10n.menuAdded), void d.focus({ | |
| + }), b.a11y.speak(a.Menus.data.l10n.menuAdded), d.focus({ | |
| completeCallback: function() { | |
| d.highlightNewItemButton() | |
| } | |
| - })) : (g.addClass("invalid"), void g.focus()) | |
| + }) | |
| }, | |
| selectDefaultLocation: function(b) { | |
| var c = a.control(this.id + "[locations]"), | |
| @@ -536,14 +537,14 @@ | |
| var b = e.expandedArgumentsQueue.shift(); | |
| b = c.extend({}, e.defaultExpandedArguments, b), e.onChangeExpanded(a, b) | |
| }), a.Control.prototype.initialize.call(e, b, d), e.active.validate = function() { | |
| - var b, c = a.section(e.section()); | |
| - return b = !!c && c.active() | |
| + var b = a.section(e.section()); | |
| + return !!b && b.active() | |
| } | |
| }, | |
| embed: function() { | |
| var b, c = this, | |
| d = c.section(); | |
| - d && (b = a.section(d), (b && b.expanded() || a.settings.autofocus.control === c.id) && c.actuallyEmbed()) | |
| + d && ((b = a.section(d)) && b.expanded() || a.settings.autofocus.control === c.id) && c.actuallyEmbed() | |
| }, | |
| actuallyEmbed: function() { | |
| var a = this; | |
| @@ -659,17 +660,18 @@ | |
| this.collapse(a) | |
| }, | |
| toggleForm: function(a, b) { | |
| - "undefined" == typeof a && (a = !this.expanded()), a ? this.expand(b) : this.collapse(b) | |
| + void 0 === a && (a = !this.expanded()), a ? this.expand(b) : this.collapse(b) | |
| }, | |
| onChangeExpanded: function(b, c) { | |
| var d, e, f, g = this; | |
| - return d = this.container, e = d.find(".menu-item-settings:first"), "undefined" == typeof b && (b = !e.is(":visible")), e.is(":visible") === b ? void(c && c.completeCallback && c.completeCallback()) : void(b ? (a.control.each(function(a) { | |
| + if (d = this.container, e = d.find(".menu-item-settings:first"), void 0 === b && (b = !e.is(":visible")), e.is(":visible") === b) return void(c && c.completeCallback && c.completeCallback()); | |
| + b ? (a.control.each(function(a) { | |
| g.params.type === a.params.type && g !== a && a.collapseForm() | |
| }), f = function() { | |
| d.removeClass("menu-item-edit-inactive").addClass("menu-item-edit-active"), g.container.trigger("expanded"), c && c.completeCallback && c.completeCallback() | |
| }, d.find(".item-edit").attr("aria-expanded", "true"), e.slideDown("fast", f), g.container.trigger("expand")) : (f = function() { | |
| d.addClass("menu-item-edit-inactive").removeClass("menu-item-edit-active"), g.container.trigger("collapsed"), c && c.completeCallback && c.completeCallback() | |
| - }, g.container.trigger("collapse"), d.find(".item-edit").attr("aria-expanded", "false"), e.slideUp("fast", f))) | |
| + }, g.container.trigger("collapse"), d.find(".item-edit").attr("aria-expanded", "false"), e.slideUp("fast", f)) | |
| }, | |
| focus: function(b) { | |
| b = b || {}; | |
| @@ -706,7 +708,7 @@ | |
| a.setting().menu_item_parent === f.menu_item_parent && g.push(a.setting) | |
| }), g.sort(function(a, b) { | |
| return a().position - b().position | |
| - }), d = _.indexOf(g, e.setting), -1 === d) throw new Error("Expected setting to be among siblings."); | |
| + }), -1 === (d = _.indexOf(g, e.setting))) throw new Error("Expected setting to be among siblings."); | |
| 0 === d && a < 0 || d === g.length - 1 && a > 0 || (b = g[d + a], b && b.set(c.extend(_.clone(b()), { | |
| position: f.position | |
| })), f.position += a, e.setting.set(f)) | |
| @@ -721,7 +723,7 @@ | |
| a.setting().menu_item_parent === h.menu_item_parent && i.push(a) | |
| }), i.sort(function(a, b) { | |
| return a.setting().position - b.setting().position | |
| - }), d = _.indexOf(i, g), -1 === d) throw new Error("Expected control to be among siblings."); | |
| + }), -1 === (d = _.indexOf(i, g))) throw new Error("Expected control to be among siblings."); | |
| if (-1 === b) { | |
| if (!h.menu_item_parent) return; | |
| f = a.control("nav_menu_item[" + h.menu_item_parent + "]"), _(i).chain().slice(d).each(function(a, b) { | |
| @@ -731,7 +733,7 @@ | |
| })) | |
| }), _(g.getMenuControl().getMenuItemControls()).each(function(a) { | |
| var b, d; | |
| - d = a.setting().menu_item_parent === f.setting().menu_item_parent && a.setting().position > f.setting().position, d && (b = _.clone(a.setting()), a.setting.set(c.extend(b, { | |
| + (d = a.setting().menu_item_parent === f.setting().menu_item_parent && a.setting().position > f.setting().position) && (b = _.clone(a.setting()), a.setting.set(c.extend(b, { | |
| position: b.position + 1 | |
| }))) | |
| }), h.position = f.setting().position + 1, h.menu_item_parent = f.setting().menu_item_parent, g.setting.set(h) | |
| @@ -775,10 +777,11 @@ | |
| b && c && c() ? d.find(".theme-location-set").show().find("span").text(e(c().name)) : d.find(".theme-location-set").hide() | |
| }; | |
| j(h.get() === b.params.menu_id), f.on("change", function() { | |
| - k(this.checked) | |
| - }), h.bind(function(a) { | |
| - j(a === b.params.menu_id), l(a) | |
| - }), l(h.get()) | |
| + k(this.checked) | |
| + }), | |
| + h.bind(function(a) { | |
| + j(a === b.params.menu_id), l(a) | |
| + }), l(h.get()) | |
| }) | |
| }, | |
| setSelections: function(a) { | |
| @@ -792,8 +795,8 @@ | |
| var b = this, | |
| c = b.setting(); | |
| b.active.validate = function() { | |
| - var c, d = a.section(b.section()); | |
| - return c = !!d && d.active() | |
| + var c = a.section(b.section()); | |
| + return !!c && c.active() | |
| }, b.autoAddElement = new a.Element(b.container.find("input[type=checkbox].auto_add")), b.autoAddElement.bind(function(a) { | |
| var c = b.setting(); | |
| c && c.name !== a && (c = _.clone(c), c.auto_add = a, b.setting.set(c)) | |
| @@ -809,8 +812,7 @@ | |
| j = g.setting(); | |
| if ("undefined" == typeof this.params.menu_id) throw new Error("params.menu_id was not defined"); | |
| g.active.validate = function() { | |
| - var a; | |
| - return a = !!h && h.active() | |
| + return !!h && h.active() | |
| }, g.$controlSection = h.headContainer, g.$sectionContent = g.container.closest(".accordion-section-content"), this._setupModel(), a.section(g.section(), function(a) { | |
| a.deferred.initSortables.done(function(a) { | |
| g._setupSortable(a) | |
| @@ -828,8 +830,7 @@ | |
| var f; | |
| !1 === d ? b._handleDeletion() : (f = e(d.name), a.control.each(function(b) { | |
| if (b.extended(a.controlConstructor.widget_form) && "nav_menu" === b.params.widget_id_base) { | |
| - var d = b.container.find("select"); | |
| - d.find("option[value=" + String(c) + "]").text(f) | |
| + b.container.find("select").find("option[value=" + String(c) + "]").text(f) | |
| } | |
| })) | |
| }) | |
| @@ -847,7 +848,7 @@ | |
| f = 10; | |
| c.isSorting = !1, c.$sectionContent.scrollLeft(0), _.each(b, function(b) { | |
| var c, e, f; | |
| - f = b.match(/^customize-control-nav_menu_item-(-?\d+)$/, ""), f && (c = parseInt(f[1], 10), e = a.control("nav_menu_item[" + String(c) + "]"), e && d.push(e)) | |
| + (f = b.match(/^customize-control-nav_menu_item-(-?\d+)$/, "")) && (c = parseInt(f[1], 10), (e = a.control("nav_menu_item[" + String(c) + "]")) && d.push(e)) | |
| }), _.each(d, function(a) { | |
| if (!1 !== a.setting()) { | |
| var b = _.clone(a.setting()); | |
| @@ -907,7 +908,7 @@ | |
| var d = this.container.find(".add-new-menu-item"), | |
| e = this.container.find(".reorder-toggle"), | |
| f = this.$sectionContent.find(".item-title"); | |
| - c = Boolean(c), c !== this.$sectionContent.hasClass("reordering") && (this.isReordering = c, this.$sectionContent.toggleClass("reordering", c), this.$sectionContent.sortable(this.isReordering ? "disable" : "enable"), this.isReordering ? (d.attr({ | |
| + (c = Boolean(c)) !== this.$sectionContent.hasClass("reordering") && (this.isReordering = c, this.$sectionContent.toggleClass("reordering", c), this.$sectionContent.sortable(this.isReordering ? "disable" : "enable"), this.isReordering ? (d.attr({ | |
| tabindex: "-1", | |
| "aria-hidden": "true" | |
| }), e.attr("aria-label", a.Menus.data.l10n.reorderLabelOff), b.a11y.speak(a.Menus.data.l10n.reorderModeOn), f.attr("aria-hidden", "false")) : (d.removeAttr("tabindex aria-hidden"), e.attr("aria-label", a.Menus.data.l10n.reorderLabelOn), b.a11y.speak(a.Menus.data.l10n.reorderModeOff), f.attr("aria-hidden", "true")), c && _(this.getMenuItemControls()).each(function(a) { | |
| @@ -999,7 +1000,8 @@ | |
| e = d.container.closest(".accordion-section-new-menu"), | |
| f = e.find(".menu-name-field").first(), | |
| g = f.val(); | |
| - return g ? (c = a.Menus.createNavMenu(g), f.val(""), f.removeClass("invalid"), b.a11y.speak(a.Menus.data.l10n.menuAdded), void c.focus()) : (f.addClass("invalid"), void f.focus()) | |
| + if (!g) return f.addClass("invalid"), void f.focus(); | |
| + c = a.Menus.createNavMenu(g), f.val(""), f.removeClass("invalid"), b.a11y.speak(a.Menus.data.l10n.menuAdded), c.focus() | |
| } | |
| }), c.extend(a.controlConstructor, { | |
| nav_menu_location: a.Menus.MenuLocationControl, | |
| @@ -1032,7 +1034,7 @@ | |
| if (!d.term_id) throw new Error("Expected term_id"); | |
| if (f = "nav_menu[" + String(d.previous_term_id) + "]", !a.has(f)) throw new Error("Expected setting to exist: " + f); | |
| if (i = a(f), !a.section.has(f)) throw new Error("Expected control to exist: " + f); | |
| - if (m = a.section(f), l = i.get(), !l) throw new Error("Did not expect setting to be empty (deleted)."); | |
| + if (m = a.section(f), !(l = i.get())) throw new Error("Did not expect setting to be empty (deleted)."); | |
| l = c.extend(_.clone(l), d.saved_value), e[d.previous_term_id] = d.term_id, g = "nav_menu[" + String(d.term_id) + "]", j = a.create(g, g, l, { | |
| type: "nav_menu", | |
| transport: a.Menus.data.settingTransport, | |
| @@ -1070,7 +1072,7 @@ | |
| if (!b.post_id) throw new Error("Expected post_id"); | |
| if (c = "nav_menu_item[" + String(b.previous_post_id) + "]", !a.has(c)) throw new Error("Expected setting to exist: " + c); | |
| if (g = a(c), !a.control.has(c)) throw new Error("Expected control to exist: " + c); | |
| - if (j = a.control(c), i = g.get(), !i) throw new Error("Did not expect setting to be empty (deleted)."); | |
| + if (j = a.control(c), !(i = g.get())) throw new Error("Did not expect setting to be empty (deleted)."); | |
| if (i = _.clone(i), i.menu_item_parent < 0) { | |
| if (!f[i.menu_item_parent]) throw new Error("inserted ID for menu_item_parent not available"); | |
| i.menu_item_parent = f[i.menu_item_parent] | |
| diff -ur build-unminified/wp-admin/js/customize-widgets.min.js build-branch-unminified/wp-admin/js/customize-widgets.min.js | |
| --- build-unminified/wp-admin/js/customize-widgets.min.js 2018-10-06 21:45:43.774707553 -0500 | |
| +++ build-branch-unminified/wp-admin/js/customize-widgets.min.js 2018-10-06 21:42:47.617394156 -0500 | |
| @@ -115,9 +115,9 @@ | |
| }, | |
| submit: function(a) { | |
| var c, d, e; | |
| - a || (a = this.selected), a && this.currentSidebarControl && (this.select(a), c = b(this.selected).data("widget-id"), d = this.collection.findWhere({ | |
| + a || (a = this.selected), a && this.currentSidebarControl && (this.select(a), c = b(this.selected).data("widget-id"), (d = this.collection.findWhere({ | |
| id: c | |
| - }), d && (e = this.currentSidebarControl.addWidget(d.get("id_base")), e && e.focus(), this.close())) | |
| + })) && (e = this.currentSidebarControl.addWidget(d.get("id_base")), e && e.focus(), this.close())) | |
| }, | |
| open: function(a) { | |
| this.currentSidebarControl = a, _(this.currentSidebarControl.getWidgetFormControls()).each(function(a) { | |
| @@ -139,9 +139,10 @@ | |
| k = this.$el.find("> .widget-tpl:visible:last"), | |
| l = b(a.target).is(this.$search), | |
| m = b(a.target).is(".widget-tpl:visible:last"); | |
| - return e || f ? (e ? l ? i = j : this.selected && 0 !== this.selected.nextAll(".widget-tpl:visible").length && (i = this.selected.nextAll(".widget-tpl:visible:first")) : f && (l ? i = k : this.selected && 0 !== this.selected.prevAll(".widget-tpl:visible").length && (i = this.selected.prevAll(".widget-tpl:visible:first"))), this.select(i), void(i ? i.focus() : this.$search.focus())) : void(c && !this.$search.val() || (c ? this.submit() : d && this.close({ | |
| + if (e || f) return e ? l ? i = j : this.selected && 0 !== this.selected.nextAll(".widget-tpl:visible").length && (i = this.selected.nextAll(".widget-tpl:visible:first")) : f && (l ? i = k : this.selected && 0 !== this.selected.prevAll(".widget-tpl:visible").length && (i = this.selected.prevAll(".widget-tpl:visible:first"))), this.select(i), void(i ? i.focus() : this.$search.focus()); | |
| + c && !this.$search.val() || (c ? this.submit() : d && this.close({ | |
| returnFocus: !0 | |
| - }), this.currentSidebarControl && g && (h && l || !h && m) && (this.currentSidebarControl.container.find(".add-new-widget").focus(), a.preventDefault()))) | |
| + }), this.currentSidebarControl && g && (h && l || !h && m) && (this.currentSidebarControl.container.find(".add-new-widget").focus(), a.preventDefault())) | |
| } | |
| }), g.Widgets.formSyncHandlers = { | |
| rss: function(a, c, d) { | |
| @@ -211,9 +212,7 @@ | |
| _setupControlToggle: function() { | |
| var a, b = this; | |
| this.container.find(".widget-top").on("click", function(a) { | |
| - a.preventDefault(); | |
| - var c = b.getSidebarWidgetsControl(); | |
| - c.isReordering || b.expanded(!b.expanded()) | |
| + a.preventDefault(), b.getSidebarWidgetsControl().isReordering || b.expanded(!b.expanded()) | |
| }), a = this.container.find(".widget-control-close"), a.on("click", function(a) { | |
| a.preventDefault(), b.collapse(), b.container.find(".widget-top .widget-action:first").focus() | |
| }) | |
| @@ -290,7 +289,7 @@ | |
| i.container.removeClass("previewer-loading") | |
| }), g.previewer.bind("widget-updated", function(a) { | |
| a === i.params.widget_id && i.container.removeClass("previewer-loading") | |
| - }), h = g.Widgets.formSyncHandlers[this.params.widget_id_base], h && b(document).on("widget-synced", function(b, c) { | |
| + }), (h = g.Widgets.formSyncHandlers[this.params.widget_id_base]) && b(document).on("widget-synced", function(b, c) { | |
| a.is(c) && h.apply(document, arguments) | |
| }) | |
| }, | |
| @@ -304,7 +303,7 @@ | |
| var b; | |
| b = c.container.next().is(".customize-control-widget_form") ? c.container.next().find(".widget-action:first") : c.container.prev().is(".customize-control-widget_form") ? c.container.prev().find(".widget-action:first") : c.container.next(".customize-control-sidebar_widgets").find(".add-new-widget:first"), c.container.slideUp(function() { | |
| var a, d, e = g.Widgets.getSidebarWidgetControlContainingWidget(c.params.widget_id); | |
| - e && (a = e.setting().slice(), d = _.indexOf(a, c.params.widget_id), -1 !== d && (a.splice(d, 1), e.setting(a), b.focus())) | |
| + e && (a = e.setting().slice(), -1 !== (d = _.indexOf(a, c.params.widget_id)) && (a.splice(d, 1), e.setting(a), b.focus())) | |
| }) | |
| }), b = function() { | |
| a.text(f.removeBtnLabel), a.attr("title", f.removeBtnTooltip) | |
| @@ -314,11 +313,10 @@ | |
| return b(a).find(":input[name]") | |
| }, | |
| _getInputsSignature: function(a) { | |
| - var c = _(a).map(function(a) { | |
| + return _(a).map(function(a) { | |
| var c, d = b(a); | |
| return c = d.is(":checkbox, :radio") ? [d.attr("id"), d.attr("name"), d.prop("value")] : [d.attr("id"), d.attr("name")], c.join(",") | |
| - }); | |
| - return c.join(";") | |
| + }).join(";") | |
| }, | |
| _getInputState: function(a) { | |
| return a = b(a), a.is(":radio, :checkbox") ? a.prop("checked") : a.is("select[multiple]") ? a.find("option:selected").map(function() { | |
| @@ -353,7 +351,7 @@ | |
| })) : "-1" === a ? void g.previewer.cheatin() : void(a.success ? (k = b("<div>" + a.data.form + "</div>"), l = q._getInputs(k), n = q._getInputsSignature(m) === q._getInputsSignature(l), n && !q.liveUpdateMode && (q.liveUpdateMode = !0, q.container.removeClass("widget-form-disabled"), q.container.find('input[name="savewidget"]').hide()), n && q.liveUpdateMode ? (m.each(function(a) { | |
| var d, e, f, g = b(this), | |
| h = b(l[a]); | |
| - d = g.data("state" + j), e = q._getInputState(h), g.data("sanitized", e), f = !_.isEqual(d, e) && (c.ignoreActiveElement || !g.is(document.activeElement)), f && q._setInputState(g, e) | |
| + d = g.data("state" + j), e = q._getInputState(h), g.data("sanitized", e), (f = !_.isEqual(d, e) && (c.ignoreActiveElement || !g.is(document.activeElement))) && q._setInputState(g, e) | |
| }), b(document).trigger("widget-synced", [h, a.data.form])) : q.liveUpdateMode ? (q.liveUpdateMode = !1, q.container.find('input[name="savewidget"]').show(), o = !0) : (i.html(a.data.form), q.container.removeClass("widget-form-disabled"), b(document).trigger("widget-updated", [h])), p = !o && !_(q.setting()).isEqual(a.data.instance), p ? (q.isWidgetUpdating = !0, q.setting(a.data.instance), q.isWidgetUpdating = !1) : q.container.removeClass("previewer-loading"), e && e.call(q, null, { | |
| noChange: !p, | |
| ajaxFinished: !0 | |
| @@ -379,13 +377,14 @@ | |
| this.collapse() | |
| }, | |
| toggleForm: function(a) { | |
| - "undefined" == typeof a && (a = !this.expanded()), this.expanded(a) | |
| + void 0 === a && (a = !this.expanded()), this.expanded(a) | |
| }, | |
| onChangeExpanded: function(a, b) { | |
| var c, d, e, f, h, i, j = this; | |
| - return j.embedWidgetControl(), a && j.embedWidgetContent(), b.unchanged ? void(a && g.Control.prototype.expand.call(j, { | |
| + if (j.embedWidgetControl(), a && j.embedWidgetContent(), b.unchanged) return void(a && g.Control.prototype.expand.call(j, { | |
| completeCallback: b.completeCallback | |
| - })) : (c = this.container.find("div.widget:first"), d = c.find(".widget-inside:first"), i = this.container.find(".widget-top button.widget-action"), h = function() { | |
| + })); | |
| + c = this.container.find("div.widget:first"), d = c.find(".widget-inside:first"), i = this.container.find(".widget-top button.widget-action"), h = function() { | |
| g.control.each(function(a) { | |
| j.params.type === a.params.type && j !== a && a.collapse() | |
| }), e = function() { | |
| @@ -393,7 +392,7 @@ | |
| }, b.completeCallback && (f = e, e = function() { | |
| f(), b.completeCallback() | |
| }), j.params.is_wide ? d.fadeIn(b.duration, e) : d.slideDown(b.duration, e), j.container.trigger("expand"), j.container.addClass("expanding") | |
| - }, void(a ? g.section.has(j.section()) ? g.section(j.section()).expand({ | |
| + }, a ? g.section.has(j.section()) ? g.section(j.section()).expand({ | |
| completeCallback: h | |
| }) : h() : (e = function() { | |
| j.container.removeClass("collapsing"), j.container.removeClass("expanded"), c.removeClass("open"), i.attr("aria-expanded", "false"), j.container.trigger("collapsed") | |
| @@ -404,11 +403,11 @@ | |
| width: "", | |
| margin: "" | |
| }), e() | |
| - })))) | |
| + })) | |
| }, | |
| getWidgetSidebarPosition: function() { | |
| var a, b; | |
| - if (a = this.getSidebarWidgetsControl().setting(), b = _.indexOf(a, this.params.widget_id), b !== -1) return b | |
| + if (a = this.getSidebarWidgetsControl().setting(), -1 !== (b = _.indexOf(a, this.params.widget_id))) return b | |
| }, | |
| moveUp: function() { | |
| this._moveWidgetByOne(-1) | |
| @@ -422,7 +421,7 @@ | |
| }, | |
| toggleWidgetMoveArea: function(a) { | |
| var c, d = this; | |
| - c = this.container.find(".move-widget-area"), "undefined" == typeof a && (a = !c.hasClass("active")), a && (c.find(".selected").removeClass("selected"), c.find("li").filter(function() { | |
| + c = this.container.find(".move-widget-area"), void 0 === a && (a = !c.hasClass("active")), a && (c.find(".selected").removeClass("selected"), c.find("li").filter(function() { | |
| return b(this).data("id") === d.params.sidebar_id | |
| }).addClass("selected"), this.container.find(".move-widget-btn").prop("disabled", !0)), c.toggleClass("active", a) | |
| }, | |
| @@ -462,8 +461,7 @@ | |
| }) | |
| }, | |
| isContextuallyActive: function() { | |
| - var a = this; | |
| - return a.active() | |
| + return this.active() | |
| } | |
| }), g.Widgets.SidebarSection = g.Section.extend({ | |
| ready: function() { | |
| @@ -489,9 +487,7 @@ | |
| var c = g.Widgets.getWidgetFormControlForWidget(b); | |
| return c || (c = a.addWidget(b)), c | |
| }), f.sort(function(a, b) { | |
| - var d = _.indexOf(c, a.params.widget_id), | |
| - e = _.indexOf(c, b.params.widget_id); | |
| - return d - e | |
| + return _.indexOf(c, a.params.widget_id) - _.indexOf(c, b.params.widget_id) | |
| }), i = 0, _(f).each(function(b) { | |
| b.priority(i), b.section(a.section()), i += 1 | |
| }), a.priority(i), a._applyCardinalOrderClassNames(), _(f).each(function(b) { | |
| @@ -504,9 +500,9 @@ | |
| var d, e = b(); | |
| d = _.indexOf(e, c), -1 !== d && (k = !0) | |
| } | |
| - }), k || (e = g.Widgets.getWidgetFormControlForWidget(c), f = e && b.contains(document, e.container[0]) && !b.contains(a.$sectionContent[0], e.container[0]), e && !f && (g.control.remove(e.id), e.container.remove()), g.Widgets.savedWidgetIds[c] && (h = g.value("sidebars_widgets[wp_inactive_widgets]")().slice(), h.push(c), g.value("sidebars_widgets[wp_inactive_widgets]")(_(h).unique())), i = d(c).id_base, j = g.Widgets.availableWidgets.findWhere({ | |
| + }), k || (e = g.Widgets.getWidgetFormControlForWidget(c), f = e && b.contains(document, e.container[0]) && !b.contains(a.$sectionContent[0], e.container[0]), e && !f && (g.control.remove(e.id), e.container.remove()), g.Widgets.savedWidgetIds[c] && (h = g.value("sidebars_widgets[wp_inactive_widgets]")().slice(), h.push(c), g.value("sidebars_widgets[wp_inactive_widgets]")(_(h).unique())), i = d(c).id_base, (j = g.Widgets.availableWidgets.findWhere({ | |
| id_base: i | |
| - }), j && !j.get("is_multi") && j.set("is_disabled", !1)) | |
| + })) && !j.get("is_multi") && j.set("is_disabled", !1)) | |
| }) | |
| }) | |
| }) | |
| @@ -528,8 +524,7 @@ | |
| }), this.$controlSection.find(".accordion-section-title").droppable({ | |
| accept: ".customize-control-widget_form", | |
| over: function() { | |
| - var b = g.section(a.section.get()); | |
| - b.expand({ | |
| + g.section(a.section.get()).expand({ | |
| allowMultiple: !0, | |
| completeCallback: function() { | |
| g.section.each(function(a) { | |
| @@ -551,18 +546,19 @@ | |
| }, | |
| _applyCardinalOrderClassNames: function() { | |
| var a = []; | |
| - return _.each(this.setting(), function(b) { | |
| - var c = g.Widgets.getWidgetFormControlForWidget(b); | |
| - c && a.push(c) | |
| - }), 0 === a.length || 1 === g.Widgets.registeredSidebars.length && a.length <= 1 ? void this.container.find(".reorder-toggle").hide() : (this.container.find(".reorder-toggle").show(), b(a).each(function() { | |
| + if (_.each(this.setting(), function(b) { | |
| + var c = g.Widgets.getWidgetFormControlForWidget(b); | |
| + c && a.push(c) | |
| + }), 0 === a.length || 1 === g.Widgets.registeredSidebars.length && a.length <= 1) return void this.container.find(".reorder-toggle").hide(); | |
| + this.container.find(".reorder-toggle").show(), b(a).each(function() { | |
| b(this.container).removeClass("first-widget").removeClass("last-widget").find(".move-widget-down, .move-widget-up").prop("tabIndex", 0) | |
| - }), _.first(a).container.addClass("first-widget").find(".move-widget-up").prop("tabIndex", -1), void _.last(a).container.addClass("last-widget").find(".move-widget-down").prop("tabIndex", -1)) | |
| + }), _.first(a).container.addClass("first-widget").find(".move-widget-up").prop("tabIndex", -1), _.last(a).container.addClass("last-widget").find(".move-widget-down").prop("tabIndex", -1) | |
| }, | |
| toggleReordering: function(b) { | |
| var c = this.$sectionContent.find(".add-new-widget"), | |
| d = this.container.find(".reorder-toggle"), | |
| e = this.$sectionContent.find(".widget-title"); | |
| - b = Boolean(b), b !== this.$sectionContent.hasClass("reordering") && (this.isReordering = b, this.$sectionContent.toggleClass("reordering", b), b ? (_(this.getWidgetFormControls()).each(function(a) { | |
| + (b = Boolean(b)) !== this.$sectionContent.hasClass("reordering") && (this.isReordering = b, this.$sectionContent.toggleClass("reordering", b), b ? (_(this.getWidgetFormControls()).each(function(a) { | |
| a.collapse() | |
| }), c.attr({ | |
| tabindex: "-1", | |
| @@ -579,31 +575,30 @@ | |
| }, | |
| addWidget: function(a) { | |
| var c, e, f, h, i, j, k, l, m, n, o = this, | |
| - p = "widget_form", | |
| - q = d(a), | |
| - r = q.number, | |
| - s = q.id_base, | |
| - t = g.Widgets.availableWidgets.findWhere({ | |
| - id_base: s | |
| + p = d(a), | |
| + q = p.number, | |
| + r = p.id_base, | |
| + s = g.Widgets.availableWidgets.findWhere({ | |
| + id_base: r | |
| }); | |
| - return !!t && (!(r && !t.get("is_multi")) && (t.get("is_multi") && !r && (t.set("multi_number", t.get("multi_number") + 1), r = t.get("multi_number")), c = b.trim(b("#widget-tpl-" + t.get("id")).html()), t.get("is_multi") ? c = c.replace(/<[^<>]+>/g, function(a) { | |
| - return a.replace(/__i__|%i%/g, r) | |
| - }) : t.set("is_disabled", !0), e = b(c), f = b("<li/>").addClass("customize-control").addClass("customize-control-" + p).append(e), f.find("> .widget-icon").remove(), t.get("is_multi") && (f.find('input[name="widget_number"]').val(r), f.find('input[name="multi_number"]').val(r)), a = f.find('[name="widget-id"]').val(), f.hide(), i = "widget_" + t.get("id_base"), t.get("is_multi") && (i += "[" + r + "]"), f.attr("id", "customize-control-" + i.replace(/\]/g, "").replace(/\[/g, "-")), j = g.has(i), j || (m = { | |
| - transport: g.Widgets.data.selectiveRefreshableWidgets[t.get("id_base")] ? "postMessage" : "refresh", | |
| + return !!s && (!(q && !s.get("is_multi")) && (s.get("is_multi") && !q && (s.set("multi_number", s.get("multi_number") + 1), q = s.get("multi_number")), c = b.trim(b("#widget-tpl-" + s.get("id")).html()), s.get("is_multi") ? c = c.replace(/<[^<>]+>/g, function(a) { | |
| + return a.replace(/__i__|%i%/g, q) | |
| + }) : s.set("is_disabled", !0), e = b(c), f = b("<li/>").addClass("customize-control").addClass("customize-control-widget_form").append(e), f.find("> .widget-icon").remove(), s.get("is_multi") && (f.find('input[name="widget_number"]').val(q), f.find('input[name="multi_number"]').val(q)), a = f.find('[name="widget-id"]').val(), f.hide(), i = "widget_" + s.get("id_base"), s.get("is_multi") && (i += "[" + q + "]"), f.attr("id", "customize-control-" + i.replace(/\]/g, "").replace(/\[/g, "-")), j = g.has(i), j || (m = { | |
| + transport: g.Widgets.data.selectiveRefreshableWidgets[s.get("id_base")] ? "postMessage" : "refresh", | |
| previewer: this.setting.previewer | |
| - }, n = g.create(i, i, "", m), n.set({})), h = g.controlConstructor[p], k = new h(i, { | |
| + }, n = g.create(i, i, "", m), n.set({})), h = g.controlConstructor.widget_form, k = new h(i, { | |
| settings: { | |
| "default": i | |
| }, | |
| content: f, | |
| sidebar_id: o.params.sidebar_id, | |
| widget_id: a, | |
| - widget_id_base: t.get("id_base"), | |
| - type: p, | |
| + widget_id_base: s.get("id_base"), | |
| + type: "widget_form", | |
| is_new: !j, | |
| - width: t.get("width"), | |
| - height: t.get("height"), | |
| - is_wide: t.get("is_wide") | |
| + width: s.get("width"), | |
| + height: s.get("height"), | |
| + is_wide: s.get("is_wide") | |
| }), g.control.add(k), g.each(function(b) { | |
| if (b.id !== o.setting.id && 0 === b.id.indexOf("sidebars_widgets[")) { | |
| var c = b().slice(), | |
| @@ -644,12 +639,12 @@ | |
| }), b | |
| }, b(document).on("widget-added", function(a, b) { | |
| var e, f, h, i; | |
| - e = d(b.find("> .widget-inside > .form > .widget-id").val()), "nav_menu" === e.id_base && (f = g.control("widget_nav_menu[" + String(e.number) + "]"), f && (h = b.find('select[name*="nav_menu"]'), i = b.find(".edit-selected-nav-menu > button"), 0 !== h.length && 0 !== i.length && (h.on("change", function() { | |
| + e = d(b.find("> .widget-inside > .form > .widget-id").val()), "nav_menu" === e.id_base && (f = g.control("widget_nav_menu[" + String(e.number) + "]")) && (h = b.find('select[name*="nav_menu"]'), i = b.find(".edit-selected-nav-menu > button"), 0 !== h.length && 0 !== i.length && (h.on("change", function() { | |
| g.section.has("nav_menu[" + h.val() + "]") ? i.parent().show() : i.parent().hide() | |
| }), i.on("click", function() { | |
| var a = g.section("nav_menu[" + h.val() + "]"); | |
| a && c(a, f) | |
| - })))) | |
| + }))) | |
| }) | |
| } | |
| }(window.wp, jQuery); | |
| \ No newline at end of file | |
| diff -ur build-unminified/wp-admin/js/dashboard.min.js build-branch-unminified/wp-admin/js/dashboard.min.js | |
| --- build-unminified/wp-admin/js/dashboard.min.js 2018-10-06 21:45:38.874671015 -0500 | |
| +++ build-branch-unminified/wp-admin/js/dashboard.min.js 2018-10-06 21:42:41.101345578 -0500 | |
| @@ -49,7 +49,7 @@ | |
| }) | |
| }, 500 * b)) | |
| } | |
| - b ? (b = b.toString(), a.inArray(b, ajaxWidgets) !== -1 && c(0, b)) : a.each(ajaxWidgets, c) | |
| + b ? (b = b.toString(), -1 !== a.inArray(b, ajaxWidgets) && c(0, b)) : a.each(ajaxWidgets, c) | |
| }, ajaxPopulateWidgets(), postboxes.add_postbox_toggles(pagenow, { | |
| pbshow: ajaxPopulateWidgets | |
| }), quickPressLoad = function() { | |
| diff -ur build-unminified/wp-admin/js/edit-comments.min.js build-branch-unminified/wp-admin/js/edit-comments.min.js | |
| --- build-unminified/wp-admin/js/edit-comments.min.js 2018-10-06 21:45:42.154695473 -0500 | |
| +++ build-branch-unminified/wp-admin/js/edit-comments.min.js 2018-10-06 21:42:45.373377426 -0500 | |
| @@ -39,7 +39,7 @@ | |
| } | |
| }, g = function(d) { | |
| var e, f, g, h; | |
| - j = j || new RegExp(adminCommentsL10n.docTitleCommentsCount.replace("%s", "\\([0-9" + thousandsSeparator + "]+\\)") + "?"), i = i || a("<div />"), e = k, h = j.exec(document.title), h ? (h = h[0], i.html(h), g = b(i) + d) : (i.html(0), g = d), g >= 1 ? (c(i, g), f = j.exec(document.title), f && (e = document.title.replace(f[0], adminCommentsL10n.docTitleCommentsCount.replace("%s", i.text()) + " "))) : (f = j.exec(e), f && (e = e.replace(f[0], adminCommentsL10n.docTitleComments))), document.title = e | |
| + j = j || new RegExp(adminCommentsL10n.docTitleCommentsCount.replace("%s", "\\([0-9" + thousandsSeparator + "]+\\)") + "?"), i = i || a("<div />"), e = k, h = j.exec(document.title), h ? (h = h[0], i.html(h), g = b(i) + d) : (i.html(0), g = d), g >= 1 ? (c(i, g), (f = j.exec(document.title)) && (e = document.title.replace(f[0], adminCommentsL10n.docTitleCommentsCount.replace("%s", i.text()) + " "))) : (f = j.exec(e)) && (e = e.replace(f[0], adminCommentsL10n.docTitleComments)), document.title = e | |
| }, e = function(d, e) { | |
| var f, h, i = ".post-com-count-" + e, | |
| j = "comment-count-no-pending", | |
| @@ -67,7 +67,7 @@ | |
| }, k = function(b, d) { | |
| var e, f, h, j, k, l, m, n = !1, | |
| o = a(b.target).attr("data-wp-lists"); | |
| - return b.data._total = c.val() || 0, b.data._per_page = g.val() || 0, b.data._page = i.val() || 0, b.data._url = document.location.href, b.data.comment_status = a('input[name="comment_status"]', "#comments-form").val(), o.indexOf(":trash=1") != -1 ? n = "trash" : o.indexOf(":spam=1") != -1 && (n = "spam"), n && (f = o.replace(/.*?comment-([0-9]+).*/, "$1"), h = a("#comment-" + f), e = a("#" + n + "-undo-holder").html(), h.find(".check-column :checkbox").prop("checked", !1), h.siblings("#replyrow").length && commentReply.cid == f && commentReply.close(), h.is("tr") ? (j = h.children(":visible").length, m = a(".author strong", h).text(), k = a('<tr id="undo-' + f + '" class="undo un' + n + '" style="display:none;"><td colspan="' + j + '">' + e + "</td></tr>")) : (m = a(".comment-author", h).text(), k = a('<div id="undo-' + f + '" style="display:none;" class="undo un' + n + '">' + e + "</div>")), h.before(k), a("strong", "#undo-" + f).text(m), l = a(".undo a", "#undo-" + f), l.attr("href", "comment.php?action=un" + n + "comment&c=" + f + "&_wpnonce=" + b.data._ajax_nonce), l.attr("data-wp-lists", "delete:the-comment-list:comment-" + f + "::un" + n + "=1"), l.attr("class", "vim-z vim-destructive"), a(".avatar", h).first().clone().prependTo("#undo-" + f + " ." + n + "-undo-inside"), l.click(function(b) { | |
| + return b.data._total = c.val() || 0, b.data._per_page = g.val() || 0, b.data._page = i.val() || 0, b.data._url = document.location.href, b.data.comment_status = a('input[name="comment_status"]', "#comments-form").val(), -1 != o.indexOf(":trash=1") ? n = "trash" : -1 != o.indexOf(":spam=1") && (n = "spam"), n && (f = o.replace(/.*?comment-([0-9]+).*/, "$1"), h = a("#comment-" + f), e = a("#" + n + "-undo-holder").html(), h.find(".check-column :checkbox").prop("checked", !1), h.siblings("#replyrow").length && commentReply.cid == f && commentReply.close(), h.is("tr") ? (j = h.children(":visible").length, m = a(".author strong", h).text(), k = a('<tr id="undo-' + f + '" class="undo un' + n + '" style="display:none;"><td colspan="' + j + '">' + e + "</td></tr>")) : (m = a(".comment-author", h).text(), k = a('<div id="undo-' + f + '" style="display:none;" class="undo un' + n + '">' + e + "</div>")), h.before(k), a("strong", "#undo-" + f).text(m), l = a(".undo a", "#undo-" + f), l.attr("href", "comment.php?action=un" + n + "comment&c=" + f + "&_wpnonce=" + b.data._ajax_nonce), l.attr("data-wp-lists", "delete:the-comment-list:comment-" + f + "::un" + n + "=1"), l.attr("class", "vim-z vim-destructive"), a(".avatar", h).first().clone().prependTo("#undo-" + f + " ." + n + "-undo-inside"), l.click(function(b) { | |
| b.preventDefault(), b.stopPropagation(), d.wpList.del(this), a("#undo-" + f).css({ | |
| backgroundColor: "#ceb" | |
| }).fadeOut(350, function() { | |
| @@ -120,8 +120,7 @@ | |
| addColor: "none" | |
| }).bind("wpListDelEnd", function(b, c) { | |
| var d = a(c.target).attr("data-wp-lists"), | |
| - e = c.element.replace(/[^0-9]+/g, ""); | |
| - d.indexOf(":trash=1") == -1 && d.indexOf(":spam=1") == -1 || a("#undo-" + e).fadeIn(300, function() { | |
| + e = c.element.replace(/[^0-9]+/g, ""); - 1 == d.indexOf(":trash=1") && -1 == d.indexOf(":spam=1") || a("#undo-" + e).fadeIn(300, function() { | |
| a(this).show() | |
| }) | |
| }) | |
| @@ -183,9 +182,8 @@ | |
| }, 600), !1) | |
| }, | |
| send: function() { | |
| - var b = {}, | |
| - c = a("#replysubmit .error-notice"); | |
| - return c.addClass("hidden"), a("#replysubmit .spinner").addClass("is-active"), a("#replyrow input").not(":button").each(function() { | |
| + var b = {}; | |
| + return a("#replysubmit .error-notice").addClass("hidden"), a("#replysubmit .spinner").addClass("is-active"), a("#replyrow input").not(":button").each(function() { | |
| var c = a(this); | |
| b[c.attr("name")] = c.val() | |
| }), b.content = a("#replycontent").val(), b.id = b.comment_post_ID, b.comments_listing = this.comments_listing, b.p = a('[name="p"]').val(), a("#comment-" + a("#comment_ID").val()).hasClass("unapproved") && (b.approve_parent = 1), a.ajax({ | |
| @@ -280,7 +278,7 @@ | |
| b.preventDefault(); | |
| var c = a(this), | |
| d = "replyto"; | |
| - "undefined" != typeof c.data("action") && (d = c.data("action")), commentReply.open(c.data("commentId"), c.data("postId"), d) | |
| + void 0 !== c.data("action") && (d = c.data("action")), commentReply.open(c.data("commentId"), c.data("postId"), d) | |
| }) | |
| }) | |
| }(jQuery); | |
| \ No newline at end of file | |
| diff -ur build-unminified/wp-admin/js/editor-expand.min.js build-branch-unminified/wp-admin/js/editor-expand.min.js | |
| --- build-unminified/wp-admin/js/editor-expand.min.js 2018-10-06 21:45:39.758677607 -0500 | |
| +++ build-branch-unminified/wp-admin/js/editor-expand.min.js 2018-10-06 21:42:41.989352198 -0500 | |
| @@ -34,65 +34,64 @@ | |
| H = o && !o.isHidden(), | |
| N = Q, | |
| R = E.offset().top, | |
| - U = 1, | |
| - V = r.width(); | |
| + U = r.width(); | |
| !G && T.windowHeight || h(), H || "resize" !== y || c(), H ? (f = t, i = u, n = T.visualTopHeight) : (f = v, i = w, n = T.textTopHeight), (H || f.length) && (m = f.parent().offset().top, p = i.offset().top, q = i.outerHeight(), l = H ? Q + n : Q + 20, l = q > l + 5, l ? ((!I || G) && x >= m - T.toolsHeight - T.adminBarHeight && x <= m - T.toolsHeight - T.adminBarHeight + q - N ? (I = !0, s.css({ | |
| position: "fixed", | |
| top: T.adminBarHeight, | |
| - width: V | |
| + width: U | |
| }), H && A.length && A.css({ | |
| position: "fixed", | |
| top: T.adminBarHeight + T.toolsHeight, | |
| - width: V - 2 * U - (H ? 0 : f.outerWidth() - f.width()) | |
| + width: U - 2 - (H ? 0 : f.outerWidth() - f.width()) | |
| }), f.css({ | |
| position: "fixed", | |
| top: T.adminBarHeight + T.toolsHeight + T.menuBarHeight, | |
| - width: V - 2 * U - (H ? 0 : f.outerWidth() - f.width()) | |
| + width: U - 2 - (H ? 0 : f.outerWidth() - f.width()) | |
| })) : (I || G) && (x <= m - T.toolsHeight - T.adminBarHeight ? (I = !1, s.css({ | |
| position: "absolute", | |
| top: 0, | |
| - width: V | |
| + width: U | |
| }), H && A.length && A.css({ | |
| position: "absolute", | |
| top: 0, | |
| - width: V - 2 * U | |
| + width: U - 2 | |
| }), f.css({ | |
| position: "absolute", | |
| top: T.menuBarHeight, | |
| - width: V - 2 * U - (H ? 0 : f.outerWidth() - f.width()) | |
| + width: U - 2 - (H ? 0 : f.outerWidth() - f.width()) | |
| })) : x >= m - T.toolsHeight - T.adminBarHeight + q - N && (I = !1, s.css({ | |
| position: "absolute", | |
| top: q - N, | |
| - width: V | |
| + width: U | |
| }), H && A.length && A.css({ | |
| position: "absolute", | |
| top: q - N, | |
| - width: V - 2 * U | |
| + width: U - 2 | |
| }), f.css({ | |
| position: "absolute", | |
| top: q - N + T.menuBarHeight, | |
| - width: V - 2 * U - (H ? 0 : f.outerWidth() - f.width()) | |
| - }))), (!J || G && S) && x + T.windowHeight <= p + q + T.bottomHeight + T.statusBarHeight + U ? b && b.deltaHeight > 0 && b.deltaHeight < 100 ? a.scrollBy(0, b.deltaHeight) : H && S && (J = !0, B.css({ | |
| + width: U - 2 - (H ? 0 : f.outerWidth() - f.width()) | |
| + }))), (!J || G && S) && x + T.windowHeight <= p + q + T.bottomHeight + T.statusBarHeight + 1 ? b && b.deltaHeight > 0 && b.deltaHeight < 100 ? a.scrollBy(0, b.deltaHeight) : H && S && (J = !0, B.css({ | |
| position: "fixed", | |
| bottom: T.bottomHeight, | |
| visibility: "", | |
| - width: V - 2 * U | |
| + width: U - 2 | |
| }), z.css({ | |
| position: "fixed", | |
| bottom: 0, | |
| - width: V | |
| - })) : (!S && J || (J || G) && x + T.windowHeight > p + q + T.bottomHeight + T.statusBarHeight - U) && (J = !1, B.attr("style", S ? "" : "visibility: hidden;"), z.attr("style", ""))) : G && (s.css({ | |
| + width: U | |
| + })) : (!S && J || (J || G) && x + T.windowHeight > p + q + T.bottomHeight + T.statusBarHeight - 1) && (J = !1, B.attr("style", S ? "" : "visibility: hidden;"), z.attr("style", ""))) : G && (s.css({ | |
| position: "absolute", | |
| top: 0, | |
| - width: V | |
| + width: U | |
| }), H && A.length && A.css({ | |
| position: "absolute", | |
| top: 0, | |
| - width: V - 2 * U | |
| + width: U - 2 | |
| }), f.css({ | |
| position: "absolute", | |
| top: T.menuBarHeight, | |
| - width: V - 2 * U - (H ? 0 : f.outerWidth() - f.width()) | |
| + width: U - 2 - (H ? 0 : f.outerWidth() - f.width()) | |
| }), B.attr("style", S ? "" : "visibility: hidden;"), z.attr("style", "")), D.width() < 300 && T.windowWidth > 600 && e.height() > C.height() + R + 120 && T.windowHeight < q ? (T.sideSortablesHeight + O + P > T.windowHeight || K || L ? x + O <= R ? (C.attr("style", ""), K = L = !1) : x > M ? K ? (K = !1, j = C.offset().top - T.adminBarHeight, k = g.offset().top, k < j + T.sideSortablesHeight + P && (j = k - T.sideSortablesHeight - 12), C.css({ | |
| position: "absolute", | |
| top: j, | |
| @@ -195,7 +194,7 @@ | |
| var b = a.scrollX || document.documentElement.scrollLeft, | |
| c = a.scrollY || document.documentElement.scrollTop, | |
| d = parseInt(x.style.height, 10); | |
| - x.style.height = Q + "px", x.scrollHeight > Q && (x.style.height = x.scrollHeight + "px"), "undefined" != typeof b && a.scrollTo(b, c), x.scrollHeight < d && i() | |
| + x.style.height = Q + "px", x.scrollHeight > Q && (x.style.height = x.scrollHeight + "px"), void 0 !== b && a.scrollTo(b, c), x.scrollHeight < d && i() | |
| }, 300); | |
| e.on("tinymce-editor-init.editor-expand", function(e, f) { | |
| function g() { | |
| @@ -217,9 +216,8 @@ | |
| } | |
| function j(b) { | |
| - var c, d, e, h, i = g(), | |
| - j = 50; | |
| - i && (c = i.top + f.iframeElement.getBoundingClientRect().top, d = c + i.height, c -= j, d += j, e = T.adminBarHeight + T.toolsHeight + T.menuBarHeight + T.visualTopHeight, h = T.windowHeight - (S ? T.bottomHeight + T.statusBarHeight : 0), h - e < i.height || (c < e && (b === s.UP || b === s.LEFT || b === s.BACKSPACE) ? a.scrollTo(a.pageXOffset, c + a.pageYOffset - e) : d > h && a.scrollTo(a.pageXOffset, d + a.pageYOffset - h))) | |
| + var c, d, e, h, i = g(); | |
| + i && (c = i.top + f.iframeElement.getBoundingClientRect().top, d = c + i.height, c -= 50, d += 50, e = T.adminBarHeight + T.toolsHeight + T.menuBarHeight + T.visualTopHeight, (h = T.windowHeight - (S ? T.bottomHeight + T.statusBarHeight : 0)) - e < i.height || (c < e && (b === s.UP || b === s.LEFT || b === s.BACKSPACE) ? a.scrollTo(a.pageXOffset, c + a.pageYOffset - e) : d > h && a.scrollTo(a.pageXOffset, d + a.pageYOffset - h))) | |
| } | |
| function l(a) { | |
| @@ -294,7 +292,8 @@ | |
| function o(b) { | |
| var e, f = b && b.keyCode; | |
| - return a.navigator.platform && (e = a.navigator.platform.indexOf("Mac") > -1), 27 === f || 87 === f && b.altKey && (!e && b.shiftKey || e && b.ctrlKey) ? void p(b) : void(b && (b.metaKey || b.ctrlKey && !b.altKey || b.altKey && b.shiftKey || f && (f <= 47 && 8 !== f && 13 !== f && 32 !== f && 46 !== f || f >= 91 && f <= 93 || f >= 112 && f <= 135 || f >= 144 && f <= 150 || f >= 224)) || (w || (w = !0, clearTimeout(F), F = setTimeout(function() { | |
| + if (a.navigator.platform && (e = a.navigator.platform.indexOf("Mac") > -1), 27 === f || 87 === f && b.altKey && (!e && b.shiftKey || e && b.ctrlKey)) return void p(b); | |
| + b && (b.metaKey || b.ctrlKey && !b.altKey || b.altKey && b.shiftKey || f && (f <= 47 && 8 !== f && 13 !== f && 32 !== f && 46 !== f || f >= 91 && f <= 93 || f >= 112 && f <= 135 || f >= 144 && f <= 150 || f >= 224)) || (w || (w = !0, clearTimeout(F), F = setTimeout(function() { | |
| M.show() | |
| }, 600), J.css("z-index", 9998), M.on("mouseenter.focus", function() { | |
| c(), d.on("scroll.focus", function() { | |
| @@ -315,13 +314,13 @@ | |
| A = c, B = d | |
| }).on("touchstart.focus", function(a) { | |
| a.preventDefault(), p() | |
| - }), J.off("mouseenter.focus"), E && (clearTimeout(E), E = null), H.addClass("focus-on").removeClass("focus-off")), r(), t())) | |
| + }), J.off("mouseenter.focus"), E && (clearTimeout(E), E = null), H.addClass("focus-on").removeClass("focus-off")), r(), t()) | |
| } | |
| function p(a) { | |
| w && (w = !1, clearTimeout(F), F = setTimeout(function() { | |
| M.hide() | |
| - }, 200), J.css("z-index", ""), M.off("mouseenter.focus mouseleave.focus mousemove.focus touchstart.focus"), "undefined" == typeof a && J.on("mouseenter.focus", function() { | |
| + }, 200), J.css("z-index", ""), M.off("mouseenter.focus mouseleave.focus mousemove.focus touchstart.focus"), void 0 === a && J.on("mouseenter.focus", function() { | |
| (b.contains(J.get(0), document.activeElement) || G) && o() | |
| }), E = setTimeout(function() { | |
| E = null, J.off("mouseenter.focus") | |
| @@ -428,7 +427,7 @@ | |
| })) | |
| }), e.on("quicktags-init", function(a, c) { | |
| var d; | |
| - c.settings.buttons && ("," + c.settings.buttons + ",").indexOf(",dfw,") !== -1 && (d = b("#" + c.name + "_dfw"), b(document).on("dfw-activate", function() { | |
| + c.settings.buttons && -1 !== ("," + c.settings.buttons + ",").indexOf(",dfw,") && (d = b("#" + c.name + "_dfw"), b(document).on("dfw-activate", function() { | |
| d.prop("disabled", !1) | |
| }).on("dfw-deactivate", function() { | |
| d.prop("disabled", !0) | |
| diff -ur build-unminified/wp-admin/js/editor.min.js build-branch-unminified/wp-admin/js/editor.min.js | |
| --- build-unminified/wp-admin/js/editor.min.js 2018-10-06 21:45:39.022672119 -0500 | |
| +++ build-branch-unminified/wp-admin/js/editor.min.js 2018-10-06 21:42:41.249346681 -0500 | |
| @@ -24,11 +24,11 @@ | |
| if (g && !g.isHidden()) return !1; | |
| "undefined" != typeof window.QTags && window.QTags.closeAllTags(a), c = parseInt(j.style.height, 10) || 0; | |
| var k = !1; | |
| - k = g ? g.getParam("wp_keep_scroll_position") : window.tinyMCEPreInit.mceInit[a] && window.tinyMCEPreInit.mceInit[a].wp_keep_scroll_position, k && l(i), g ? (g.show(), !w.Env.iOS && c && (e = d(g), c = c - e + 14, c > 50 && c < 5e3 && g.theme.resizeTo(null, c)), g.getParam("wp_keep_scroll_position") && m(g)) : w.init(window.tinyMCEPreInit.mceInit[a]), h.removeClass("html-active").addClass("tmce-active"), i.attr("aria-hidden", !0), window.setUserSetting("editor", "tinymce") | |
| + k = g ? g.getParam("wp_keep_scroll_position") : window.tinyMCEPreInit.mceInit[a] && window.tinyMCEPreInit.mceInit[a].wp_keep_scroll_position, k && l(i), g ? (g.show(), !w.Env.iOS && c && (e = d(g), (c = c - e + 14) > 50 && c < 5e3 && g.theme.resizeTo(null, c)), g.getParam("wp_keep_scroll_position") && m(g)) : w.init(window.tinyMCEPreInit.mceInit[a]), h.removeClass("html-active").addClass("tmce-active"), i.attr("aria-hidden", !0), window.setUserSetting("editor", "tinymce") | |
| } else if ("html" === b) { | |
| if (g && g.isHidden()) return !1; | |
| if (g) { | |
| - w.Env.iOS || (f = g.iframeElement, c = f ? parseInt(f.style.height, 10) : 0, c && (e = d(g), c = c + e - 14, c > 50 && c < 5e3 && (j.style.height = c + "px"))); | |
| + w.Env.iOS || (f = g.iframeElement, (c = f ? parseInt(f.style.height, 10) : 0) && (e = d(g), (c = c + e - 14) > 50 && c < 5e3 && (j.style.height = c + "px"))); | |
| var n = null; | |
| g.getParam("wp_keep_scroll_position") && (n = q(g)), g.hide(), n && r(g, n) | |
| } else i.css({ | |
| @@ -40,19 +40,17 @@ | |
| } | |
| function f(a, b) { | |
| - var c = a.lastIndexOf("<", b - 1), | |
| - d = a.lastIndexOf(">", b); | |
| - if (c > d || ">" === a.substr(b, 1)) { | |
| - var e = a.substr(c), | |
| - f = e.match(/<\s*(\/)?(\w+)/); | |
| - if (!f) return null; | |
| - var g = f[2], | |
| - h = e.indexOf(">"); | |
| + var c = a.lastIndexOf("<", b - 1); | |
| + if (c > a.lastIndexOf(">", b) || ">" === a.substr(b, 1)) { | |
| + var d = a.substr(c), | |
| + e = d.match(/<\s*(\/)?(\w+)/); | |
| + if (!e) return null; | |
| + var f = e[2]; | |
| return { | |
| ltPos: c, | |
| - gtPos: c + h + 1, | |
| - tagType: g, | |
| - isClosingTag: !!f[1] | |
| + gtPos: c + d.indexOf(">") + 1, | |
| + tagType: f, | |
| + isClosingTag: !!e[1] | |
| } | |
| } | |
| return null | |
| @@ -70,8 +68,7 @@ | |
| c = []; | |
| if (b) | |
| for (var d = 0; d < b.length; d++) { | |
| - var e = b[d].replace(/^\[+/g, ""); | |
| - c.indexOf(e) === -1 && c.push(e) | |
| + var e = b[d].replace(/^\[+/g, ""); - 1 === c.indexOf(e) && c.push(e) | |
| } | |
| return c | |
| } | |
| @@ -107,7 +104,7 @@ | |
| width: 0, | |
| overflow: "hidden", | |
| "line-height": 0 | |
| - }).html(b ? b : "") | |
| + }).html(b || "") | |
| } | |
| function k(a, b) { | |
| @@ -115,7 +112,7 @@ | |
| d = b.cursorStart, | |
| e = b.cursorEnd, | |
| h = f(a, d); | |
| - h && (d = c.indexOf(h.tagType) !== -1 ? h.ltPos : h.gtPos); | |
| + h && (d = -1 !== c.indexOf(h.tagType) ? h.ltPos : h.gtPos); | |
| var i = f(a, e); | |
| i && (e = i.gtPos); | |
| var j = g(a, d); | |
| @@ -141,9 +138,7 @@ | |
| h = null, | |
| i = j(x, "").attr("data-mce-type", "bookmark"); | |
| if ("range" === g) { | |
| - var l = b.value.slice(e, f), | |
| - m = i.clone().addClass("mce_SELRES_end"); | |
| - h = [l, m[0].outerHTML].join("") | |
| + h = [b.value.slice(e, f), i.clone().addClass("mce_SELRES_end")[0].outerHTML].join("") | |
| } | |
| b.value = [b.value.slice(0, e), i.clone().addClass("mce_SELRES_start")[0].outerHTML, h, b.value.slice(f)].join("") | |
| } | |
| @@ -212,9 +207,8 @@ | |
| u = q[0].length, | |
| v = null; | |
| if (r) { | |
| - q[0].indexOf("data-mce-object-selection") !== -1 && (u -= q[1].length); | |
| - var w = r.index; | |
| - r[0].indexOf("data-mce-object-selection") !== -1 && (w -= r[1].length), v = w - u | |
| + -1 !== q[0].indexOf("data-mce-object-selection") && (u -= q[1].length); | |
| + var w = r.index; - 1 !== r[0].indexOf("data-mce-object-selection") && (w -= r[1].length), v = w - u | |
| } | |
| return { | |
| start: t, | |
| @@ -241,15 +235,15 @@ | |
| e = !1, | |
| f = !1, | |
| g = []; | |
| - return a ? (a.indexOf("<script") === -1 && a.indexOf("<style") === -1 || (a = a.replace(/<(script|style)[^>]*>[\s\S]*?<\/\1>/g, function(a) { | |
| + return a ? (-1 === a.indexOf("<script") && -1 === a.indexOf("<style") || (a = a.replace(/<(script|style)[^>]*>[\s\S]*?<\/\1>/g, function(a) { | |
| return g.push(a), "<wp-preserve>" | |
| - })), a.indexOf("<pre") !== -1 && (e = !0, a = a.replace(/<pre[^>]*>[\s\S]+?<\/pre>/g, function(a) { | |
| + })), -1 !== a.indexOf("<pre") && (e = !0, a = a.replace(/<pre[^>]*>[\s\S]+?<\/pre>/g, function(a) { | |
| return a = a.replace(/<br ?\/?>(\r\n|\n)?/g, "<wp-line-break>"), a = a.replace(/<\/?p( [^>]*)?>(\r\n|\n)?/g, "<wp-line-break>"), a.replace(/\r?\n/g, "<wp-line-break>") | |
| - })), a.indexOf("[caption") !== -1 && (f = !0, a = a.replace(/\[caption[\s\S]+?\[\/caption\]/g, function(a) { | |
| + })), -1 !== a.indexOf("[caption") && (f = !0, a = a.replace(/\[caption[\s\S]+?\[\/caption\]/g, function(a) { | |
| return a.replace(/<br([^>]*)>/g, "<wp-temp-br$1>").replace(/[\r\n\t]+/, "") | |
| })), a = a.replace(new RegExp("\\s*</(" + c + ")>\\s*", "g"), "</$1>\n"), a = a.replace(new RegExp("\\s*<((?:" + c + ")(?: [^>]*)?)>", "g"), "\n<$1>"), a = a.replace(/(<p [^>]+>.*?)<\/p>/g, "$1</p#>"), a = a.replace(/<div( [^>]*)?>\s*<p>/gi, "<div$1>\n\n"), a = a.replace(/\s*<p>/gi, ""), a = a.replace(/\s*<\/p>\s*/gi, "\n\n"), a = a.replace(/\n[\s\u00a0]+\n/g, "\n\n"), a = a.replace(/(\s*)<br ?\/?>\s*/gi, function(a, b) { | |
| - return b && b.indexOf("\n") !== -1 ? "\n\n" : "\n" | |
| - }), a = a.replace(/\s*<div/g, "\n<div"), a = a.replace(/<\/div>\s*/g, "</div>\n"), a = a.replace(/\s*\[caption([^\[]+)\[\/caption\]\s*/gi, "\n\n[caption$1[/caption]\n\n"), a = a.replace(/caption\]\n\n+\[caption/g, "caption]\n\n[caption"), a = a.replace(new RegExp("\\s*<((?:" + d + ")(?: [^>]*)?)\\s*>", "g"), "\n<$1>"), a = a.replace(new RegExp("\\s*</(" + d + ")>\\s*", "g"), "</$1>\n"), a = a.replace(/<((li|dt|dd)[^>]*)>/g, " \t<$1>"), a.indexOf("<option") !== -1 && (a = a.replace(/\s*<option/g, "\n<option"), a = a.replace(/\s*<\/select>/g, "\n</select>")), a.indexOf("<hr") !== -1 && (a = a.replace(/\s*<hr( [^>]*)?>\s*/g, "\n\n<hr$1>\n\n")), a.indexOf("<object") !== -1 && (a = a.replace(/<object[\s\S]+?<\/object>/g, function(a) { | |
| + return b && -1 !== b.indexOf("\n") ? "\n\n" : "\n" | |
| + }), a = a.replace(/\s*<div/g, "\n<div"), a = a.replace(/<\/div>\s*/g, "</div>\n"), a = a.replace(/\s*\[caption([^\[]+)\[\/caption\]\s*/gi, "\n\n[caption$1[/caption]\n\n"), a = a.replace(/caption\]\n\n+\[caption/g, "caption]\n\n[caption"), a = a.replace(new RegExp("\\s*<((?:" + d + ")(?: [^>]*)?)\\s*>", "g"), "\n<$1>"), a = a.replace(new RegExp("\\s*</(" + d + ")>\\s*", "g"), "</$1>\n"), a = a.replace(/<((li|dt|dd)[^>]*)>/g, " \t<$1>"), -1 !== a.indexOf("<option") && (a = a.replace(/\s*<option/g, "\n<option"), a = a.replace(/\s*<\/select>/g, "\n</select>")), -1 !== a.indexOf("<hr") && (a = a.replace(/\s*<hr( [^>]*)?>\s*/g, "\n\n<hr$1>\n\n")), -1 !== a.indexOf("<object") && (a = a.replace(/<object[\s\S]+?<\/object>/g, function(a) { | |
| return a.replace(/[\r\n]+/g, "") | |
| })), a = a.replace(/<\/p#>/g, "</p>\n"), a = a.replace(/\s*(<p [^>]+>[\s\S]*?<\/p>)/g, "\n$1"), a = a.replace(/^\s+/, ""), a = a.replace(/[\s\u00a0]+$/, ""), e && (a = a.replace(/<wp-line-break>/g, "\n")), f && (a = a.replace(/<wp-temp-br([^>]*)>/g, "<br$1>")), g.length && (a = a.replace(/<wp-preserve>/g, function() { | |
| return g.shift() | |
| @@ -260,13 +254,13 @@ | |
| var b = !1, | |
| c = !1, | |
| d = "table|thead|tfoot|caption|col|colgroup|tbody|tr|td|th|div|dl|dd|dt|ul|ol|li|pre|form|map|area|blockquote|address|math|style|p|h[1-6]|hr|fieldset|legend|section|article|aside|hgroup|header|footer|nav|figure|figcaption|details|menu|summary"; | |
| - return a = a.replace(/\r\n|\r/g, "\n"), a.indexOf("<object") !== -1 && (a = a.replace(/<object[\s\S]+?<\/object>/g, function(a) { | |
| + return a = a.replace(/\r\n|\r/g, "\n"), -1 !== a.indexOf("<object") && (a = a.replace(/<object[\s\S]+?<\/object>/g, function(a) { | |
| return a.replace(/\n+/g, "") | |
| })), a = a.replace(/<[^<>]+>/g, function(a) { | |
| return a.replace(/[\n\t ]+/g, " ") | |
| - }), a.indexOf("<pre") === -1 && a.indexOf("<script") === -1 || (b = !0, a = a.replace(/<(pre|script)[^>]*>[\s\S]*?<\/\1>/g, function(a) { | |
| + }), -1 === a.indexOf("<pre") && -1 === a.indexOf("<script") || (b = !0, a = a.replace(/<(pre|script)[^>]*>[\s\S]*?<\/\1>/g, function(a) { | |
| return a.replace(/\n/g, "<wp-line-break>") | |
| - })), a.indexOf("<figcaption") !== -1 && (a = a.replace(/\s*(<figcaption[^>]*>)/g, "$1"), a = a.replace(/<\/figcaption>\s*/g, "</figcaption>")), a.indexOf("[caption") !== -1 && (c = !0, a = a.replace(/\[caption[\s\S]+?\[\/caption\]/g, function(a) { | |
| + })), -1 !== a.indexOf("<figcaption") && (a = a.replace(/\s*(<figcaption[^>]*>)/g, "$1"), a = a.replace(/<\/figcaption>\s*/g, "</figcaption>")), -1 !== a.indexOf("[caption") && (c = !0, a = a.replace(/\[caption[\s\S]+?\[\/caption\]/g, function(a) { | |
| return a = a.replace(/<br([^>]*)>/g, "<wp-temp-br$1>"), a = a.replace(/<[^<>]+>/g, function(a) { | |
| return a.replace(/[\n\t ]+/, " ") | |
| }), a.replace(/\s*\n\s*/g, "<wp-temp-br />") | |
| @@ -340,9 +334,9 @@ | |
| } | |
| }, b.editor.remove = function(b) { | |
| var c, d, e = a("#wp-" + b + "-wrap"); | |
| - window.tinymce && (c = window.tinymce.get(b), c && (c.isHidden() || c.save(), c.remove())), window.quicktags && (d = window.QTags.getInstance(b), d && d.remove()), e.length && (e.after(a("#" + b)), e.remove()) | |
| + window.tinymce && (c = window.tinymce.get(b)) && (c.isHidden() || c.save(), c.remove()), window.quicktags && (d = window.QTags.getInstance(b)) && d.remove(), e.length && (e.after(a("#" + b)), e.remove()) | |
| }, b.editor.getContent = function(b) { | |
| var c; | |
| - if (a && b) return window.tinymce && (c = window.tinymce.get(b), c && !c.isHidden() && c.save()), a("#" + b).val() | |
| + if (a && b) return window.tinymce && (c = window.tinymce.get(b)) && !c.isHidden() && c.save(), a("#" + b).val() | |
| } | |
| }(window.jQuery, window.wp); | |
| \ No newline at end of file | |
| diff -ur build-unminified/wp-admin/js/gallery.min.js build-branch-unminified/wp-admin/js/gallery.min.js | |
| --- build-unminified/wp-admin/js/gallery.min.js 2018-10-06 21:45:37.614661620 -0500 | |
| +++ build-branch-unminified/wp-admin/js/gallery.min.js 2018-10-06 21:42:39.789335796 -0500 | |
| @@ -78,7 +78,8 @@ | |
| var a, b = this, | |
| c = b.editor, | |
| d = ""; | |
| - return b.mcemode && b.is_update ? void("IMG" === b.el.nodeName && (d = c.dom.decode(c.dom.getAttrib(b.el, "title")), d = d.replace(/\s*(order|link|columns|orderby)=['"]([^'"]+)['"]/gi, ""), d += b.getSettings(), c.dom.setAttrib(b.el, "title", d), b.getWin().tb_remove())) : (a = "[gallery" + b.getSettings() + "]", void b.getWin().send_to_editor(a)) | |
| + if (!b.mcemode || !b.is_update) return a = "[gallery" + b.getSettings() + "]", void b.getWin().send_to_editor(a); | |
| + "IMG" === b.el.nodeName && (d = c.dom.decode(c.dom.getAttrib(b.el, "title")), d = d.replace(/\s*(order|link|columns|orderby)=['"]([^'"]+)['"]/gi, ""), d += b.getSettings(), c.dom.setAttrib(b.el, "title", d), b.getWin().tb_remove()) | |
| }, | |
| getSettings: function() { | |
| var a = this.I, | |
| diff -ur build-unminified/wp-admin/js/image-edit.min.js build-branch-unminified/wp-admin/js/image-edit.min.js | |
| --- build-unminified/wp-admin/js/image-edit.min.js 2018-10-06 21:45:41.358689538 -0500 | |
| +++ build-branch-unminified/wp-admin/js/image-edit.min.js 2018-10-06 21:42:44.261369136 -0500 | |
| @@ -50,7 +50,7 @@ | |
| var d, e, f, g, h = a("#imgedit-history-" + b).val(), | |
| i = []; | |
| if ("" !== h) { | |
| - if (h = JSON.parse(h), d = this.intval(a("#imgedit-undone-" + b).val()), d > 0) | |
| + if (h = JSON.parse(h), (d = this.intval(a("#imgedit-undone-" + b).val())) > 0) | |
| for (; d > 0;) h.pop(), d--; | |
| if (c) { | |
| if (!h.length) return this.hold.w = this.hold.ow, this.hold.h = this.hold.oh, ""; | |
| @@ -85,7 +85,7 @@ | |
| }, function(d) { | |
| var f, h, i, j = a("#imgedit-crop-" + c), | |
| k = b; | |
| - "" !== d.data.history && (i = JSON.parse(d.data.history), i[i.length - 1].hasOwnProperty("c") && (k.setDisabled(a("#image-undo-" + c), !0), a("#image-undo-" + c).focus())), j.empty().append(g), f = Math.max(k.hold.w, k.hold.h), h = Math.max(a(g).width(), a(g).height()), k.hold.sizer = f > h ? h / f : 1, k.initCrop(c, g, j), k.setCropSelection(c, 0), "undefined" != typeof e && null !== e && e(), a("#imgedit-history-" + c).val() && "0" === a("#imgedit-undone-" + c).val() ? a("input.imgedit-submit-btn", "#imgedit-panel-" + c).removeAttr("disabled") : a("input.imgedit-submit-btn", "#imgedit-panel-" + c).prop("disabled", !0), k.toggleEditor(c, 0) | |
| + "" !== d.data.history && (i = JSON.parse(d.data.history), i[i.length - 1].hasOwnProperty("c") && (k.setDisabled(a("#image-undo-" + c), !0), a("#image-undo-" + c).focus())), j.empty().append(g), f = Math.max(k.hold.w, k.hold.h), h = Math.max(a(g).width(), a(g).height()), k.hold.sizer = f > h ? h / f : 1, k.initCrop(c, g, j), k.setCropSelection(c, 0), void 0 !== e && null !== e && e(), a("#imgedit-history-" + c).val() && "0" === a("#imgedit-undone-" + c).val() ? a("input.imgedit-submit-btn", "#imgedit-panel-" + c).removeAttr("disabled") : a("input.imgedit-submit-btn", "#imgedit-panel-" + c).prop("disabled", !0), k.toggleEditor(c, 0) | |
| }).on("error", function() { | |
| a("#imgedit-crop-" + c).empty().append('<div class="error"><p>' + imageEditL10n.error + "</p></div>"), h.toggleEditor(c, 0) | |
| }).attr("src", ajaxurl + "?" + a.param(f)) | |
| @@ -114,7 +114,8 @@ | |
| var e, f = this.getTarget(c), | |
| g = this.filterHistory(c, 0), | |
| h = this; | |
| - return "" !== g && (this.toggleEditor(c, 1), e = { | |
| + if ("" === g) return !1; | |
| + this.toggleEditor(c, 1), e = { | |
| action: "image-editor", | |
| _ajax_nonce: d, | |
| postid: c, | |
| @@ -122,32 +123,33 @@ | |
| target: f, | |
| context: a("#image-edit-context").length ? a("#image-edit-context").val() : null, | |
| "do": "save" | |
| - }, void a.post(ajaxurl, e, function(d) { | |
| + }, a.post(ajaxurl, e, function(d) { | |
| var e = JSON.parse(d); | |
| - return e.error ? (a("#imgedit-response-" + c).html('<div class="error"><p>' + e.error + "</p></div>"), void b.close(c)) : (e.fw && e.fh && a("#media-dims-" + c).html(e.fw + " × " + e.fh), e.thumbnail && a(".thumbnail", "#thumbnail-head-" + c).attr("src", "" + e.thumbnail), e.msg && a("#imgedit-response-" + c).html('<div class="updated"><p>' + e.msg + "</p></div>"), void(h._view ? h._view.save() : b.close(c))) | |
| - })) | |
| + if (e.error) return a("#imgedit-response-" + c).html('<div class="error"><p>' + e.error + "</p></div>"), void b.close(c); | |
| + e.fw && e.fh && a("#media-dims-" + c).html(e.fw + " × " + e.fh), e.thumbnail && a(".thumbnail", "#thumbnail-head-" + c).attr("src", "" + e.thumbnail), e.msg && a("#imgedit-response-" + c).html('<div class="updated"><p>' + e.msg + "</p></div>"), h._view ? h._view.save() : b.close(c) | |
| + }) | |
| }, | |
| open: function(c, d, e) { | |
| this._view = e; | |
| - var f, g, h = a("#image-editor-" + c), | |
| - i = a("#media-head-" + c), | |
| - j = a("#imgedit-open-btn-" + c), | |
| - k = j.siblings(".spinner"); | |
| - if (!j.hasClass("button-activated")) return k.addClass("is-active"), g = { | |
| + var f, g = a("#image-editor-" + c), | |
| + h = a("#media-head-" + c), | |
| + i = a("#imgedit-open-btn-" + c), | |
| + j = i.siblings(".spinner"); | |
| + if (!i.hasClass("button-activated")) return j.addClass("is-active"), f = { | |
| action: "image-editor", | |
| _ajax_nonce: d, | |
| postid: c, | |
| "do": "open" | |
| - }, f = a.ajax({ | |
| + }, a.ajax({ | |
| url: ajaxurl, | |
| type: "post", | |
| - data: g, | |
| + data: f, | |
| beforeSend: function() { | |
| - j.addClass("button-activated") | |
| + i.addClass("button-activated") | |
| } | |
| }).done(function(a) { | |
| - h.html(a), i.fadeOut("fast", function() { | |
| - h.fadeIn("fast"), j.removeClass("button-activated"), k.removeClass("is-active") | |
| + g.html(a), h.fadeOut("fast", function() { | |
| + g.fadeIn("fast"), i.removeClass("button-activated"), j.removeClass("is-active") | |
| }), b.init(c) | |
| }) | |
| }, | |
| @@ -189,25 +191,26 @@ | |
| }, | |
| setCropSelection: function(b, c) { | |
| var d; | |
| - return c = c || 0, !c || c.width < 3 && c.height < 3 ? (this.setDisabled(a(".imgedit-crop", "#imgedit-panel-" + b), 0), this.setDisabled(a("#imgedit-crop-sel-" + b), 0), a("#imgedit-sel-width-" + b).val(""), a("#imgedit-sel-height-" + b).val(""), a("#imgedit-selection-" + b).val(""), !1) : (d = { | |
| + if (!(c = c || 0) || c.width < 3 && c.height < 3) return this.setDisabled(a(".imgedit-crop", "#imgedit-panel-" + b), 0), this.setDisabled(a("#imgedit-crop-sel-" + b), 0), a("#imgedit-sel-width-" + b).val(""), a("#imgedit-sel-height-" + b).val(""), a("#imgedit-selection-" + b).val(""), !1; | |
| + d = { | |
| x: c.x1, | |
| y: c.y1, | |
| w: c.width, | |
| h: c.height | |
| - }, this.setDisabled(a(".imgedit-crop", "#imgedit-panel-" + b), 1), void a("#imgedit-selection-" + b).val(JSON.stringify(d))) | |
| + }, this.setDisabled(a(".imgedit-crop", "#imgedit-panel-" + b), 1), a("#imgedit-selection-" + b).val(JSON.stringify(d)) | |
| }, | |
| close: function(b, c) { | |
| - return c = c || !1, (!c || !this.notsaved(b)) && (this.iasapi = {}, this.hold = {}, void(this._view ? this._view.back() : a("#image-editor-" + b).fadeOut("fast", function() { | |
| + if ((c = c || !1) && this.notsaved(b)) return !1; | |
| + this.iasapi = {}, this.hold = {}, this._view ? this._view.back() : a("#image-editor-" + b).fadeOut("fast", function() { | |
| a("#media-head-" + b).fadeIn("fast", function() { | |
| a("#imgedit-open-btn-" + b).focus() | |
| }), a(this).empty() | |
| - }))) | |
| + }) | |
| }, | |
| notsaved: function(b) { | |
| var c = a("#imgedit-history-" + b).val(), | |
| - d = "" !== c ? JSON.parse(c) : [], | |
| - e = this.intval(a("#imgedit-undone-" + b).val()); | |
| - return e < d.length && !confirm(a("#imgedit-leaving-" + b).html()) | |
| + d = "" !== c ? JSON.parse(c) : []; | |
| + return this.intval(a("#imgedit-undone-" + b).val()) < d.length && !confirm(a("#imgedit-leaving-" + b).html()) | |
| }, | |
| addStep: function(b, c, d) { | |
| for (var e = this, f = a("#imgedit-history-" + c), g = "" !== f.val() ? JSON.parse(f.val()) : [], h = a("#imgedit-undone-" + c), i = e.intval(h.val()); i > 0;) g.pop(), i--; | |
| @@ -216,7 +219,8 @@ | |
| }) | |
| }, | |
| rotate: function(b, c, d, e) { | |
| - return !a(e).hasClass("disabled") && void this.addStep({ | |
| + if (a(e).hasClass("disabled")) return !1; | |
| + this.addStep({ | |
| r: { | |
| r: b, | |
| fw: this.hold.h, | |
| @@ -225,7 +229,8 @@ | |
| }, c, d) | |
| }, | |
| flip: function(b, c, d, e) { | |
| - return !a(e).hasClass("disabled") && void this.addStep({ | |
| + if (a(e).hasClass("disabled")) return !1; | |
| + this.addStep({ | |
| f: { | |
| f: b, | |
| fw: this.hold.w, | |
| @@ -237,9 +242,10 @@ | |
| var e = a("#imgedit-selection-" + b).val(), | |
| f = this.intval(a("#imgedit-sel-width-" + b).val()), | |
| g = this.intval(a("#imgedit-sel-height-" + b).val()); | |
| - return !a(d).hasClass("disabled") && "" !== e && (e = JSON.parse(e), void(e.w > 0 && e.h > 0 && f > 0 && g > 0 && (e.fw = f, e.fh = g, this.addStep({ | |
| + if (a(d).hasClass("disabled") || "" === e) return !1; | |
| + e = JSON.parse(e), e.w > 0 && e.h > 0 && f > 0 && g > 0 && (e.fw = f, e.fh = g, this.addStep({ | |
| c: e | |
| - }, b, c)))) | |
| + }, b, c)) | |
| }, | |
| undo: function(b, c) { | |
| var d = this, | |
| diff -ur build-unminified/wp-admin/js/inline-edit-post.min.js build-branch-unminified/wp-admin/js/inline-edit-post.min.js | |
| --- build-unminified/wp-admin/js/inline-edit-post.min.js 2018-10-06 21:45:39.274673998 -0500 | |
| +++ build-branch-unminified/wp-admin/js/inline-edit-post.min.js 2018-10-06 21:42:41.509348619 -0500 | |
| @@ -36,20 +36,21 @@ | |
| var b = "", | |
| c = this.type, | |
| d = !0; | |
| - return this.revert(), a("#bulk-edit td").attr("colspan", a("th:visible, td:visible", ".widefat:first thead").length), a("table.widefat tbody").prepend(a("#bulk-edit")).prepend('<tr class="hidden"></tr>'), a("#bulk-edit").addClass("inline-editor").show(), a('tbody th.check-column input[type="checkbox"]').each(function() { | |
| - if (a(this).prop("checked")) { | |
| - d = !1; | |
| - var c, e = a(this).val(); | |
| - c = a("#inline_" + e + " .post_title").html() || inlineEditL10n.notitle, b += '<div id="ttle' + e + '"><a id="_' + e + '" class="ntdelbutton" title="' + inlineEditL10n.ntdeltitle + '">X</a>' + c + "</div>" | |
| - } | |
| - }), d ? this.revert() : (a("#bulk-titles").html(b), a("#bulk-titles a").click(function() { | |
| + if (this.revert(), a("#bulk-edit td").attr("colspan", a("th:visible, td:visible", ".widefat:first thead").length), a("table.widefat tbody").prepend(a("#bulk-edit")).prepend('<tr class="hidden"></tr>'), a("#bulk-edit").addClass("inline-editor").show(), a('tbody th.check-column input[type="checkbox"]').each(function() { | |
| + if (a(this).prop("checked")) { | |
| + d = !1; | |
| + var c, e = a(this).val(); | |
| + c = a("#inline_" + e + " .post_title").html() || inlineEditL10n.notitle, b += '<div id="ttle' + e + '"><a id="_' + e + '" class="ntdelbutton" title="' + inlineEditL10n.ntdeltitle + '">X</a>' + c + "</div>" | |
| + } | |
| + }), d) return this.revert(); | |
| + a("#bulk-titles").html(b), a("#bulk-titles a").click(function() { | |
| var b = a(this).attr("id").substr(1); | |
| a('table.widefat input[value="' + b + '"]').prop("checked", !1), a("#ttle" + b).remove() | |
| }), "post" === c && a("tr.inline-editor textarea[data-wp-taxonomy]").each(function(b, c) { | |
| a(c).autocomplete("instance") || a(c).wpTagsSuggest() | |
| - }), void a("html, body").animate({ | |
| + }), a("html, body").animate({ | |
| scrollTop: 0 | |
| - }, "fast")) | |
| + }, "fast") | |
| }, | |
| edit: function(b) { | |
| var c, d, e, f, g, h, i, j, k, l, m, n = this, | |
| @@ -115,6 +116,6 @@ | |
| b.id && d.push(b.id) | |
| }), d.length && (c["wp-check-locked-posts"] = d) | |
| }).ready(function() { | |
| - "undefined" != typeof b && b.heartbeat && b.heartbeat.interval(15) | |
| + void 0 !== b && b.heartbeat && b.heartbeat.interval(15) | |
| }) | |
| }(jQuery, window.wp); | |
| \ No newline at end of file | |
| diff -ur build-unminified/wp-admin/js/link.min.js build-branch-unminified/wp-admin/js/link.min.js | |
| --- build-unminified/wp-admin/js/link.min.js 2018-10-06 21:45:38.038664782 -0500 | |
| +++ build-branch-unminified/wp-admin/js/link.min.js 2018-10-06 21:42:40.233339107 -0500 | |
| @@ -17,13 +17,12 @@ | |
| } | |
| }, d = function(b, d) { | |
| a(d.what + " response_data", b).each(function() { | |
| - var b = a(a(this).text()); | |
| - b.find("label").each(function() { | |
| - var b, d = a(this), | |
| - e = d.find("input").val(), | |
| - f = d.find("input")[0].id, | |
| - g = a.trim(d.text()); | |
| - a("#" + f).change(c), b = a('<option value="' + parseInt(e, 10) + '"></option>').text(g) | |
| + a(a(this).text()).find("label").each(function() { | |
| + var b = a(this), | |
| + d = b.find("input").val(), | |
| + e = b.find("input")[0].id, | |
| + f = a.trim(b.text()); | |
| + a("#" + e).change(c), a('<option value="' + parseInt(d, 10) + '"></option>').text(f) | |
| }) | |
| }) | |
| }, a("#categorychecklist").wpList({ | |
| diff -ur build-unminified/wp-admin/js/nav-menu.min.js build-branch-unminified/wp-admin/js/nav-menu.min.js | |
| --- build-unminified/wp-admin/js/nav-menu.min.js 2018-10-06 21:45:40.770685153 -0500 | |
| +++ build-branch-unminified/wp-admin/js/nav-menu.min.js 2018-10-06 21:42:43.521363619 -0500 | |
| @@ -8,8 +8,8 @@ | |
| sortableItems: "> *", | |
| targetTolerance: 0 | |
| }, | |
| - menuList: void 0, | |
| - targetList: void 0, | |
| + menuList: undefined, | |
| + targetList: undefined, | |
| menusChanged: !1, | |
| isRTL: !("undefined" == typeof isRtl || !isRtl), | |
| negateIfRTL: "undefined" != typeof isRtl && isRtl ? -1 : 1, | |
| @@ -89,14 +89,15 @@ | |
| e = {}, | |
| f = menus.oneThemeLocationNoMenus && 0 === d.find(".tabs-panel-active .categorychecklist li input:checked").length ? d.find('#page-all li input[type="checkbox"]') : d.find(".tabs-panel-active .categorychecklist li input:checked"), | |
| g = /menu-item\[([^\]]*)/; | |
| - return c = c || b.addMenuItemToBottom, !!f.length && (d.find(".button-controls .spinner").addClass("is-active"), a(f).each(function() { | |
| + if (c = c || b.addMenuItemToBottom, !f.length) return !1; | |
| + d.find(".button-controls .spinner").addClass("is-active"), a(f).each(function() { | |
| var d = a(this), | |
| f = g.exec(d.attr("name")), | |
| h = "undefined" == typeof f[1] ? 0 : parseInt(f[1], 10); | |
| this.className && -1 != this.className.indexOf("add-to-top") && (c = b.addMenuItemToTop), e[h] = d.closest("li").getItemData("add-menu-item", h) | |
| - }), void b.addItemToMenu(e, c, function() { | |
| + }), b.addItemToMenu(e, c, function() { | |
| f.removeAttr("checked"), d.find(".button-controls .spinner").removeClass("is-active") | |
| - })) | |
| + }) | |
| }) | |
| }, | |
| getItemData: function(a, b) { | |
| @@ -173,7 +174,7 @@ | |
| }), c.on("click", ".menus-move", function() { | |
| var c = a(this), | |
| d = c.data("dir"); | |
| - "undefined" != typeof d && b.moveMenuItem(a(this).parents("li.menu-item").find("a.item-edit"), d) | |
| + void 0 !== d && b.moveMenuItem(a(this).parents("li.menu-item").find("a.item-edit"), d) | |
| }) | |
| }, | |
| refreshAdvancedAccessibilityOfItem: function(b) { | |
| @@ -258,55 +259,53 @@ | |
| initSortables: function() { | |
| function c(a) { | |
| var c; | |
| - j = a.placeholder.prev(".menu-item"), k = a.placeholder.next(".menu-item"), j[0] == a.item[0] && (j = j.prev(".menu-item")), k[0] == a.item[0] && (k = k.next(".menu-item")), l = j.length ? j.offset().top + j.height() : 0, m = k.length ? k.offset().top + k.height() / 3 : 0, h = k.length ? k.menuItemDepth() : 0, i = j.length ? (c = j.menuItemDepth() + 1) > b.options.globalMaxDepth ? b.options.globalMaxDepth : c : 0 | |
| + i = a.placeholder.prev(".menu-item"), j = a.placeholder.next(".menu-item"), i[0] == a.item[0] && (i = i.prev(".menu-item")), j[0] == a.item[0] && (j = j.next(".menu-item")), k = i.length ? i.offset().top + i.height() : 0, l = j.length ? j.offset().top + j.height() / 3 : 0, g = j.length ? j.menuItemDepth() : 0, h = i.length ? (c = i.menuItemDepth() + 1) > b.options.globalMaxDepth ? b.options.globalMaxDepth : c : 0 | |
| } | |
| function d(a, b) { | |
| - a.placeholder.updateDepthClass(b, q), q = b | |
| - } | |
| - | |
| - function e() { | |
| - if (!s[0].className) return 0; | |
| - var a = s[0].className.match(/menu-max-depth-(\d+)/); | |
| - return a && a[1] ? parseInt(a[1], 10) : 0 | |
| + a.placeholder.updateDepthClass(b, p), p = b | |
| } | |
| - function f(c) { | |
| - var d, e = t; | |
| + function e(c) { | |
| + var d, e = s; | |
| if (0 !== c) { | |
| - if (c > 0) d = p + c, d > t && (e = d); | |
| - else if (c < 0 && p == t) | |
| + if (c > 0)(d = o + c) > s && (e = d); | |
| + else if (c < 0 && o == s) | |
| for (; !a(".menu-item-depth-" + e, b.menuList).length && e > 0;) e--; | |
| - s.removeClass("menu-max-depth-" + t).addClass("menu-max-depth-" + e), t = e | |
| + r.removeClass("menu-max-depth-" + s).addClass("menu-max-depth-" + e), s = e | |
| } | |
| } | |
| - var g, h, i, j, k, l, m, n, o, p, q = 0, | |
| - r = b.menuList.offset().left, | |
| - s = a("body"), | |
| - t = e(); | |
| - 0 !== a("#menu-to-edit li").length && a(".drag-instructions").show(), r += b.isRTL ? b.menuList.width() : 0, b.menuList.sortable({ | |
| + var f, g, h, i, j, k, l, m, n, o, p = 0, | |
| + q = b.menuList.offset().left, | |
| + r = a("body"), | |
| + s = function() { | |
| + if (!r[0].className) return 0; | |
| + var a = r[0].className.match(/menu-max-depth-(\d+)/); | |
| + return a && a[1] ? parseInt(a[1], 10) : 0 | |
| + }(); | |
| + 0 !== a("#menu-to-edit li").length && a(".drag-instructions").show(), q += b.isRTL ? b.menuList.width() : 0, b.menuList.sortable({ | |
| handle: ".menu-item-handle", | |
| placeholder: "sortable-placeholder", | |
| items: b.options.sortableItems, | |
| - start: function(e, f) { | |
| + start: function(e, g) { | |
| var h, i, j, k, l; | |
| - b.isRTL && (f.item[0].style.right = "auto"), o = f.item.children(".menu-item-transport"), g = f.item.menuItemDepth(), d(f, g), j = f.item.next()[0] == f.placeholder[0] ? f.item.next() : f.item, k = j.childMenuItems(), o.append(k), h = o.outerHeight(), h += h > 0 ? 1 * f.placeholder.css("margin-top").slice(0, -2) : 0, h += f.helper.outerHeight(), n = h, h -= 2, f.placeholder.height(h), p = g, k.each(function() { | |
| + b.isRTL && (g.item[0].style.right = "auto"), n = g.item.children(".menu-item-transport"), f = g.item.menuItemDepth(), d(g, f), j = g.item.next()[0] == g.placeholder[0] ? g.item.next() : g.item, k = j.childMenuItems(), n.append(k), h = n.outerHeight(), h += h > 0 ? 1 * g.placeholder.css("margin-top").slice(0, -2) : 0, h += g.helper.outerHeight(), m = h, h -= 2, g.placeholder.height(h), o = f, k.each(function() { | |
| var b = a(this).menuItemDepth(); | |
| - p = b > p ? b : p | |
| - }), i = f.helper.find(".menu-item-handle").outerWidth(), i += b.depthToPx(p - g), i -= 2, f.placeholder.width(i), l = f.placeholder.next(".menu-item"), l.css("margin-top", n + "px"), f.placeholder.detach(), a(this).sortable("refresh"), f.item.after(f.placeholder), l.css("margin-top", 0), c(f) | |
| + o = b > o ? b : o | |
| + }), i = g.helper.find(".menu-item-handle").outerWidth(), i += b.depthToPx(o - f), i -= 2, g.placeholder.width(i), l = g.placeholder.next(".menu-item"), l.css("margin-top", m + "px"), g.placeholder.detach(), a(this).sortable("refresh"), g.item.after(g.placeholder), l.css("margin-top", 0), c(g) | |
| }, | |
| stop: function(a, c) { | |
| - var d, e, h = q - g; | |
| - d = o.children().insertAfter(c.item), e = c.item.find(".item-title .is-submenu"), 0 < q ? e.show() : e.hide(), 0 !== h && (c.item.updateDepthClass(q), d.shiftDepthClass(h), f(h)), b.registerChange(), c.item.updateParentMenuItemDBId(), c.item[0].style.top = 0, b.isRTL && (c.item[0].style.left = "auto", c.item[0].style.right = 0), b.refreshKeyboardAccessibility(), b.refreshAdvancedAccessibility() | |
| + var d, g, h = p - f; | |
| + d = n.children().insertAfter(c.item), g = c.item.find(".item-title .is-submenu"), 0 < p ? g.show() : g.hide(), 0 !== h && (c.item.updateDepthClass(p), d.shiftDepthClass(h), e(h)), b.registerChange(), c.item.updateParentMenuItemDBId(), c.item[0].style.top = 0, b.isRTL && (c.item[0].style.left = "auto", c.item[0].style.right = 0), b.refreshKeyboardAccessibility(), b.refreshAdvancedAccessibility() | |
| }, | |
| change: function(a, d) { | |
| - d.placeholder.parent().hasClass("menu") || (j.length ? j.after(d.placeholder) : b.menuList.prepend(d.placeholder)), c(d) | |
| + d.placeholder.parent().hasClass("menu") || (i.length ? i.after(d.placeholder) : b.menuList.prepend(d.placeholder)), c(d) | |
| }, | |
| sort: function(e, f) { | |
| - var g = f.helper.offset(), | |
| - j = b.isRTL ? g.left + f.helper.width() : g.left, | |
| - o = b.negateIfRTL * b.pxToDepth(j - r); | |
| - o > i || g.top < l - b.options.targetTolerance ? o = i : o < h && (o = h), o != q && d(f, o), m && g.top + n > m && (k.after(f.placeholder), c(f), a(this).sortable("refreshPositions")) | |
| + var i = f.helper.offset(), | |
| + n = b.isRTL ? i.left + f.helper.width() : i.left, | |
| + o = b.negateIfRTL * b.pxToDepth(n - q); | |
| + o > h || i.top < k - b.options.targetTolerance ? o = h : o < g && (o = g), o != p && d(f, o), l && i.top + m > l && (j.after(f.placeholder), c(f), a(this).sortable("refreshPositions")) | |
| } | |
| }) | |
| }, | |
| @@ -363,14 +362,13 @@ | |
| }) | |
| }, | |
| updateQuickSearchResults: function(c) { | |
| - var d, e, f = 2, | |
| - g = c.val(); | |
| - g.length < f || b.lastSearch == g || (b.lastSearch = g, d = c.parents(".tabs-panel"), e = { | |
| + var d, e, f = c.val(); | |
| + f.length < 2 || b.lastSearch == f || (b.lastSearch = f, d = c.parents(".tabs-panel"), e = { | |
| action: "menu-quick-search", | |
| "response-format": "markup", | |
| menu: a("#menu").val(), | |
| "menu-settings-column-nonce": a("#menu-settings-column-nonce").val(), | |
| - q: g, | |
| + q: f, | |
| type: c.attr("name") | |
| }, a(".spinner", d).addClass("is-active"), a.post(ajaxurl, e, function(a) { | |
| b.processQuickSearchQueryResponse(a, e, d) | |
| @@ -379,9 +377,10 @@ | |
| addCustomLink: function(c) { | |
| var d = a("#custom-menu-item-url").val(), | |
| e = a("#custom-menu-item-name").val(); | |
| - return c = c || b.addMenuItemToBottom, "" === d || "http://" == d ? (a("#customlinkdiv").addClass("form-invalid"), !1) : (a(".customlinkdiv .spinner").addClass("is-active"), void this.addLinkToMenu(d, e, c, function() { | |
| + if (c = c || b.addMenuItemToBottom, "" === d || "http://" == d) return a("#customlinkdiv").addClass("form-invalid"), !1; | |
| + a(".customlinkdiv .spinner").addClass("is-active"), this.addLinkToMenu(d, e, c, function() { | |
| a(".customlinkdiv .spinner").removeClass("is-active"), a("#custom-menu-item-name").val("").blur(), a("#custom-menu-item-url").val("http://") | |
| - })) | |
| + }) | |
| }, | |
| addLinkToMenu: function(a, c, d, e) { | |
| d = d || b.addMenuItemToBottom, e = e || function() {}, b.addItemToMenu({ | |
| @@ -428,7 +427,7 @@ | |
| var d, e, f, g, h = a(c.target); | |
| if (h.hasClass("nav-tab-link")) e = h.data("type"), f = h.parents(".accordion-section-content").first(), a("input", f).removeAttr("checked"), a(".tabs-panel-active", f).removeClass("tabs-panel-active").addClass("tabs-panel-inactive"), a("#" + e, f).removeClass("tabs-panel-inactive").addClass("tabs-panel-active"), a(".tabs", f).removeClass("tabs"), h.parent().addClass("tabs"), a(".quick-search", f).focus(), f.find(".tabs-panel-active .menu-item-title").length ? f.removeClass("has-no-menu-item") : f.addClass("has-no-menu-item"), c.preventDefault(); | |
| else if (h.hasClass("select-all")) { | |
| - if (d = /#(.*)$/.exec(c.target.href), d && d[1]) return g = a("#" + d[1] + " .tabs-panel-active .menu-item-title input"), g.length === g.filter(":checked").length ? g.removeAttr("checked") : g.prop("checked", !0), !1 | |
| + if ((d = /#(.*)$/.exec(c.target.href)) && d[1]) return g = a("#" + d[1] + " .tabs-panel-active .menu-item-title input"), g.length === g.filter(":checked").length ? g.removeAttr("checked") : g.prop("checked", !0), !1 | |
| } else if (h.hasClass("submit-add-to-menu")) return b.registerChange(), c.target.id && "submit-customlinkdiv" == c.target.id ? b.addCustomLink(b.addMenuItemToBottom) : c.target.id && -1 != c.target.id.indexOf("submit-") && a("#" + c.target.id.replace(/submit-/, "")).addSelectedToMenu(b.addMenuItemToBottom), !1 | |
| }), a("#nav-menu-meta").on("click", "a.page-numbers", function() { | |
| var b = a(this).closest(".inside"); | |
| @@ -442,9 +441,8 @@ | |
| if (e && e[1] && (c = a("#" + e[1]), d = c.parent(), 0 !== d.length)) return d.hasClass("menu-item-edit-inactive") ? (c.data("menu-item-data") || c.data("menu-item-data", c.getItemData()), c.slideDown("fast"), d.removeClass("menu-item-edit-inactive").addClass("menu-item-edit-active")) : (c.slideUp("fast"), d.removeClass("menu-item-edit-active").addClass("menu-item-edit-inactive")), !1 | |
| }, | |
| eventOnClickCancelLink: function(b) { | |
| - var c = a(b).closest(".menu-item-settings"), | |
| - d = a(b).closest(".menu-item"); | |
| - return d.removeClass("menu-item-edit-active").addClass("menu-item-edit-inactive"), c.setItemData(c.data("menu-item-data")).hide(), !1 | |
| + var c = a(b).closest(".menu-item-settings"); | |
| + return a(b).closest(".menu-item").removeClass("menu-item-edit-active").addClass("menu-item-edit-inactive"), c.setItemData(c.data("menu-item-data")).hide(), !1 | |
| }, | |
| eventOnClickMenuSave: function() { | |
| var c = "", | |
| @@ -469,12 +467,13 @@ | |
| j = /menu-item[(\[^]\]*/, | |
| k = a("<div>").html(b).find("li"), | |
| l = d.closest(".accordion-section-content"); | |
| - return k.length ? (k.each(function() { | |
| - if (g = a(this), e = j.exec(g.html()), e && e[1]) { | |
| + if (!k.length) return a(".categorychecklist", d).html("<li><p>" + navMenuL10n.noResultsFound + "</p></li>"), a(".spinner", d).removeClass("is-active"), void l.addClass("has-no-menu-item"); | |
| + k.each(function() { | |
| + if (g = a(this), (e = j.exec(g.html())) && e[1]) { | |
| for (f = e[1]; i.elements["menu-item[" + f + "][menu-item-type]"] || h[f];) f--; | |
| h[f] = !0, f != e[1] && g.html(g.html().replace(new RegExp("menu-item\\[" + e[1] + "\\]", "g"), "menu-item[" + f + "]")) | |
| } | |
| - }), a(".categorychecklist", d).html(k), a(".spinner", d).removeClass("is-active"), void l.removeClass("has-no-menu-item")) : (a(".categorychecklist", d).html("<li><p>" + navMenuL10n.noResultsFound + "</p></li>"), a(".spinner", d).removeClass("is-active"), void l.addClass("has-no-menu-item")) | |
| + }), a(".categorychecklist", d).html(k), a(".spinner", d).removeClass("is-active"), l.removeClass("has-no-menu-item") | |
| }, | |
| removeMenuItem: function(c) { | |
| var d = c.childMenuItems(); | |
| diff -ur build-unminified/wp-admin/js/password-strength-meter.min.js build-branch-unminified/wp-admin/js/password-strength-meter.min.js | |
| --- build-unminified/wp-admin/js/password-strength-meter.min.js 2018-10-06 21:45:38.250666363 -0500 | |
| +++ build-branch-unminified/wp-admin/js/password-strength-meter.min.js 2018-10-06 21:42:40.461340806 -0500 | |
| @@ -3,10 +3,7 @@ | |
| ! function(a) { | |
| wp.passwordStrength = { | |
| meter: function(b, c, d) { | |
| - if (a.isArray(c) || (c = [c.toString()]), b != d && d && d.length > 0) return 5; | |
| - if ("undefined" == typeof window.zxcvbn) return -1; | |
| - var e = zxcvbn(b, c); | |
| - return e.score | |
| + return a.isArray(c) || (c = [c.toString()]), b != d && d && d.length > 0 ? 5 : "undefined" == typeof window.zxcvbn ? -1 : zxcvbn(b, c).score | |
| }, | |
| userInputBlacklist: function() { | |
| var b, c, d, e, f = [], | |
| diff -ur build-unminified/wp-admin/js/postbox.min.js build-branch-unminified/wp-admin/js/postbox.min.js | |
| --- build-unminified/wp-admin/js/postbox.min.js 2018-10-06 21:45:39.138672984 -0500 | |
| +++ build-branch-unminified/wp-admin/js/postbox.min.js 2018-10-06 21:42:41.385347695 -0500 | |
| @@ -46,7 +46,8 @@ | |
| opacity: .65, | |
| stop: function() { | |
| var b = a(this); | |
| - return b.find("#dashboard_browser_nag").is(":visible") && "dashboard_browser_nag" != this.firstChild.id ? void b.sortable("cancel") : void postboxes.save_order(c) | |
| + if (b.find("#dashboard_browser_nag").is(":visible") && "dashboard_browser_nag" != this.firstChild.id) return void b.sortable("cancel"); | |
| + postboxes.save_order(c) | |
| }, | |
| receive: function(c, d) { | |
| "dashboard_browser_nag" == d.item[0].id && a(d.sender).sortable("cancel"), postboxes._mark_area(), b.trigger("postbox-moved", d.item) | |
| diff -ur build-unminified/wp-admin/js/post.min.js build-branch-unminified/wp-admin/js/post.min.js | |
| --- build-unminified/wp-admin/js/post.min.js 2018-10-06 21:45:38.654669375 -0500 | |
| +++ build-branch-unminified/wp-admin/js/post.min.js 2018-10-06 21:42:40.861343788 -0500 | |
| @@ -93,7 +93,8 @@ | |
| return this.alt | |
| }), o = o.html(), i.html(l), d = a("#editable-post-name"), e = d.html(), m.html('<button type="button" class="save button button-small">' + postL10n.ok + '</button> <button type="button" class="cancel button-link">' + postL10n.cancel + "</button>"), m.children(".save").click(function() { | |
| var b = d.children("input").val(); | |
| - return b == a("#editable-post-name-full").text() ? void m.children(".cancel").click() : void a.post(ajaxurl, { | |
| + if (b == a("#editable-post-name-full").text()) return void m.children(".cancel").click(); | |
| + a.post(ajaxurl, { | |
| action: "sample-permalink", | |
| post_id: k, | |
| new_slug: b, | |
| @@ -124,7 +125,7 @@ | |
| n = a("#post-visibility-select"), | |
| o = a("#timestampdiv"), | |
| p = a("#post-status-select"), | |
| - q = !!window.navigator.platform && window.navigator.platform.indexOf("Mac") !== -1; | |
| + q = !!window.navigator.platform && -1 !== window.navigator.platform.indexOf("Mac"); | |
| if (postboxes.add_postbox_toggles(pagenow), window.name = "", a("#post-lock-dialog .notification-dialog").on("keydown", function(b) { | |
| if (9 == b.which) { | |
| var c = a(b.target); | |
| @@ -132,7 +133,8 @@ | |
| } | |
| }).filter(":visible").find(".wp-tab-first").focus(), wp.heartbeat && a("#post-lock-dialog").length && wp.heartbeat.interval(15), e = l.find(":submit, a.submitdelete, #post-preview").on("click.edit-post", function(b) { | |
| var c = a(this); | |
| - return c.hasClass("disabled") ? void b.preventDefault() : void(c.hasClass("submitdelete") || c.is("#post-preview") || a("form#post").off("submit.edit-post").on("submit.edit-post", function(b) { | |
| + if (c.hasClass("disabled")) return void b.preventDefault(); | |
| + c.hasClass("submitdelete") || c.is("#post-preview") || a("form#post").off("submit.edit-post").on("submit.edit-post", function(b) { | |
| if (!b.isDefaultPrevented()) { | |
| if (wp.autosave && wp.autosave.server.suspend(), "undefined" != typeof commentReply) { | |
| if (!commentReply.discardCommentChanges()) return !1; | |
| @@ -140,20 +142,20 @@ | |
| } | |
| m = !1, a(window).off("beforeunload.edit-post"), e.addClass("disabled"), "publish" === c.attr("id") ? l.find("#major-publishing-actions .spinner").addClass("is-active") : l.find("#minor-publishing .spinner").addClass("is-active") | |
| } | |
| - })) | |
| + }) | |
| }), a("#post-preview").on("click.post-preview", function(b) { | |
| var c = a(this), | |
| d = a("form#post"), | |
| e = a("input#wp-preview"), | |
| f = c.attr("target") || "wp-preview", | |
| g = navigator.userAgent.toLowerCase(); | |
| - b.preventDefault(), c.hasClass("disabled") || (wp.autosave && wp.autosave.server.tempBlockSave(), e.val("dopreview"), d.attr("target", f).submit().attr("target", ""), g.indexOf("safari") !== -1 && g.indexOf("chrome") === -1 && d.attr("action", function(a, b) { | |
| + b.preventDefault(), c.hasClass("disabled") || (wp.autosave && wp.autosave.server.tempBlockSave(), e.val("dopreview"), d.attr("target", f).submit().attr("target", ""), -1 !== g.indexOf("safari") && -1 === g.indexOf("chrome") && d.attr("action", function(a, b) { | |
| return b + "?t=" + (new Date).getTime() | |
| }), e.val("")) | |
| }), a("#title").on("keydown.editor-focus", function(a) { | |
| var b; | |
| if (9 === a.keyCode && !a.ctrlKey && !a.altKey && !a.shiftKey) { | |
| - if (b = "undefined" != typeof tinymce && tinymce.get("content"), b && !b.isHidden()) b.focus(); | |
| + if ((b = "undefined" != typeof tinymce && tinymce.get("content")) && !b.isHidden()) b.focus(); | |
| else { | |
| if (!i.length) return; | |
| i.focus() | |
| @@ -307,7 +309,8 @@ | |
| } | |
| var d, e, f, g = a("#post-status-info"), | |
| h = a("#postdivrich"); | |
| - return !i.length || "ontouchstart" in window ? void a("#content-resize-handle").hide() : void g.on("mousedown.wp-editor-resize", function(g) { | |
| + if (!i.length || "ontouchstart" in window) return void a("#content-resize-handle").hide(); | |
| + g.on("mousedown.wp-editor-resize", function(g) { | |
| "undefined" != typeof tinymce && (d = tinymce.get("content")), d && !d.isHidden() ? (f = !0, e = a("#content_ifr").height() - g.pageY) : (f = !1, e = i.height() - g.pageY, i.blur()), j.on("mousemove.wp-editor-resize", b).on("mouseup.wp-editor-resize mouseleave.wp-editor-resize", c), g.preventDefault() | |
| }).on("mouseup.wp-editor-resize", c) | |
| }(), "undefined" != typeof tinymce && (a("#post-formats-select input.post-format").on("change.set-editor-class", function() { | |
| @@ -315,7 +318,7 @@ | |
| d && a(this).prop("checked") && (b = tinymce.get("content")) && (c = b.getBody(), c.className = c.className.replace(/\bpost-format-[^ ]+/, ""), b.dom.addClass(c, "post-format-0" == d ? "post-format-standard" : d), a(document).trigger("editor-classchange")) | |
| }), a("#page_template").on("change.set-editor-class", function() { | |
| var b, c, d = a(this).val() || ""; | |
| - d = d.substr(d.lastIndexOf("/") + 1, d.length).replace(/\.php$/, "").replace(/\./g, "-"), d && (b = tinymce.get("content")) && (c = b.getBody(), c.className = c.className.replace(/\bpage-template-[^ ]+/, ""), b.dom.addClass(c, "page-template-" + d), a(document).trigger("editor-classchange")) | |
| + (d = d.substr(d.lastIndexOf("/") + 1, d.length).replace(/\.php$/, "").replace(/\./g, "-")) && (b = tinymce.get("content")) && (c = b.getBody(), c.className = c.className.replace(/\bpage-template-[^ ]+/, ""), b.dom.addClass(c, "page-template-" + d), a(document).trigger("editor-classchange")) | |
| })), i.on("keydown.wp-autosave", function(a) { | |
| if (83 === a.which) { | |
| if (a.shiftKey || a.altKey || q && (!a.metaKey || a.ctrlKey) || !q && !a.ctrlKey) return; | |
| @@ -324,7 +327,7 @@ | |
| }), "auto-draft" === a("#original_post_status").val() && window.history.replaceState) { | |
| var r; | |
| a("#publish").on("click", function() { | |
| - r = window.location.href, r += r.indexOf("?") !== -1 ? "&" : "?", r += "wp-post-new-reload=true", window.history.replaceState(null, null, r) | |
| + r = window.location.href, r += -1 !== r.indexOf("?") ? "&" : "?", r += "wp-post-new-reload=true", window.history.replaceState(null, null, r) | |
| }) | |
| } | |
| }), | |
| diff -ur build-unminified/wp-admin/js/revisions.min.js build-branch-unminified/wp-admin/js/revisions.min.js | |
| --- build-unminified/wp-admin/js/revisions.min.js 2018-10-06 21:45:39.902678681 -0500 | |
| +++ build-branch-unminified/wp-admin/js/revisions.min.js 2018-10-06 21:42:42.137353302 -0500 | |
| @@ -113,11 +113,11 @@ | |
| }, | |
| next: function(a) { | |
| var b = this.indexOf(a); | |
| - if (b !== -1 && b !== this.length - 1) return this.at(b + 1) | |
| + if (-1 !== b && b !== this.length - 1) return this.at(b + 1) | |
| }, | |
| prev: function(a) { | |
| var b = this.indexOf(a); | |
| - if (b !== -1 && 0 !== b) return this.at(b - 1) | |
| + if (-1 !== b && 0 !== b) return this.at(b - 1) | |
| } | |
| }), b.model.Field = Backbone.Model.extend({}), b.model.Fields = Backbone.Collection.extend({ | |
| model: b.model.Field | |
| @@ -417,9 +417,8 @@ | |
| }) | |
| }, | |
| render: function() { | |
| - var a, b, c, d, e = {}, | |
| - f = this.model.revisions.indexOf(this.model.get("revision")) + 1; | |
| - d = f / this.model.revisions.length > .5, isRtl ? (b = d ? "left" : "right", c = d ? "leftPlusWidth" : b) : (b = d ? "right" : "left", c = d ? "rightPlusWidth" : b), a = "right" === b ? "left" : "right", wp.Backbone.View.prototype.render.apply(this, arguments), e[b] = this.model.get("offset")[c] + "px", e[a] = "", this.$el.toggleClass("flipped", d).css(e) | |
| + var a, b, c, d, e = {}; | |
| + d = (this.model.revisions.indexOf(this.model.get("revision")) + 1) / this.model.revisions.length > .5, isRtl ? (b = d ? "left" : "right", c = d ? "leftPlusWidth" : b) : (b = d ? "right" : "left", c = d ? "rightPlusWidth" : b), a = "right" === b ? "left" : "right", wp.Backbone.View.prototype.render.apply(this, arguments), e[b] = this.model.get("offset")[c] + "px", e[a] = "", this.$el.toggleClass("flipped", d).css(e) | |
| }, | |
| visible: function() { | |
| return this.model.get("scrubbing") || this.model.get("hovering") | |
| @@ -460,11 +459,10 @@ | |
| }, | |
| disabledButtonCheck: function() { | |
| var b = this.model.revisions.length - 1, | |
| - c = 0, | |
| - d = a(".revisions-next .button"), | |
| - e = a(".revisions-previous .button"), | |
| - f = this.model.revisions.indexOf(this.model.get("to")); | |
| - d.prop("disabled", b === f), e.prop("disabled", c === f) | |
| + c = a(".revisions-next .button"), | |
| + d = a(".revisions-previous .button"), | |
| + e = this.model.revisions.indexOf(this.model.get("to")); | |
| + c.prop("disabled", b === e), d.prop("disabled", 0 === e) | |
| } | |
| }), b.view.Slider = wp.Backbone.View.extend({ | |
| className: "wp-slider", | |
| @@ -542,7 +540,7 @@ | |
| } | |
| } else c = { | |
| to: this.model.revisions.at(this.getPosition(b.value)) | |
| - }, this.getPosition(b.value) > 0 ? c.from = this.model.revisions.at(this.getPosition(b.value) - 1) : c.from = void 0; | |
| + }, this.getPosition(b.value) > 0 ? c.from = this.model.revisions.at(this.getPosition(b.value) - 1) : c.from = undefined; | |
| d = this.model.revisions.at(this.getPosition(b.value)), this.model.get("scrubbing") && (c.hoveredRevision = d), this.model.set(c) | |
| }, | |
| stop: function() { | |
| @@ -575,8 +573,7 @@ | |
| }) | |
| }, | |
| handleRoute: function(a, b) { | |
| - var c = _.isUndefined(b); | |
| - c || (b = this.model.revisions.get(a), a = this.model.revisions.prev(b), b = b ? b.id : 0, a = a ? a.id : 0) | |
| + _.isUndefined(b) || (b = this.model.revisions.get(a), a = this.model.revisions.prev(b), b = b ? b.id : 0, a = a ? a.id : 0) | |
| } | |
| }), b.init = function() { | |
| var a; | |
| diff -ur build-unminified/wp-admin/js/svg-painter.min.js build-branch-unminified/wp-admin/js/svg-painter.min.js | |
| --- build-unminified/wp-admin/js/svg-painter.min.js 2018-10-06 21:45:40.238681186 -0500 | |
| +++ build-branch-unminified/wp-admin/js/svg-painter.min.js 2018-10-06 21:42:42.489355926 -0500 | |
| @@ -22,13 +22,15 @@ | |
| } | |
| function c(c) { | |
| - return e || a(), c = b(c, !1, i, f, 8, 6), c + "====".slice(c.length % 4 || 4) | |
| + return e || a(), (c = b(c, !1, i, f, 8, 6)) + "====".slice(c.length % 4 || 4) | |
| } | |
| function d(c) { | |
| var d; | |
| e || a(), c = c.replace(/[^A-Za-z0-9\+\/\=]/g, ""), c = String(c).split("="), d = c.length; | |
| - do --d, c[d] = b(c[d], !0, h, g, 6, 8); while (d > 0); | |
| + do { | |
| + --d, c[d] = b(c[d], !0, h, g, 6, 8) | |
| + } while (d > 0); | |
| return c = c.join("") | |
| } | |
| var e, f = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", | |
| @@ -45,13 +47,13 @@ | |
| g = this, e = a("#adminmenu .wp-menu-image, #wpadminbar .ab-item"), this.setColors(), this.findElements(), this.paint() | |
| }, | |
| setColors: function(a) { | |
| - "undefined" == typeof a && "undefined" != typeof b._wpColorScheme && (a = b._wpColorScheme), a && a.icons && a.icons.base && a.icons.current && a.icons.focus && (h = a.icons) | |
| + void 0 === a && "undefined" != typeof b._wpColorScheme && (a = b._wpColorScheme), a && a.icons && a.icons.base && a.icons.current && a.icons.focus && (h = a.icons) | |
| }, | |
| findElements: function() { | |
| e.each(function() { | |
| var b = a(this), | |
| c = b.css("background-image"); | |
| - c && c.indexOf("data:image/svg+xml;base64") != -1 && i.push(b) | |
| + c && -1 != c.indexOf("data:image/svg+xml;base64") && i.push(b) | |
| }) | |
| }, | |
| paint: function() { | |
| @@ -68,9 +70,9 @@ | |
| }, | |
| paintElement: function(a, c) { | |
| var d, e, g; | |
| - if (c && h.hasOwnProperty(c) && (g = h[c], g.match(/^(#[0-9a-f]{3}|#[0-9a-f]{6})$/i) && (d = a.data("wp-ui-svg-" + g), "none" !== d))) { | |
| + if (c && h.hasOwnProperty(c) && (g = h[c], g.match(/^(#[0-9a-f]{3}|#[0-9a-f]{6})$/i) && "none" !== (d = a.data("wp-ui-svg-" + g)))) { | |
| if (!d) { | |
| - if (e = a.css("background-image").match(/.+data:image\/svg\+xml;base64,([A-Za-z0-9\+\/\=]+)/), !e || !e[1]) return void a.data("wp-ui-svg-" + g, "none"); | |
| + if (!(e = a.css("background-image").match(/.+data:image\/svg\+xml;base64,([A-Za-z0-9\+\/\=]+)/)) || !e[1]) return void a.data("wp-ui-svg-" + g, "none"); | |
| try { | |
| d = "atob" in b ? b.atob(e[1]) : f.atob(e[1]) | |
| } catch (i) {} | |
| diff -ur build-unminified/wp-admin/js/tags-box.min.js build-branch-unminified/wp-admin/js/tags-box.min.js | |
| --- build-unminified/wp-admin/js/tags-box.min.js 2018-10-06 21:45:38.758670150 -0500 | |
| +++ build-branch-unminified/wp-admin/js/tags-box.min.js 2018-10-06 21:42:40.973344624 -0500 | |
| @@ -4,7 +4,7 @@ | |
| array_unique_noempty = function(b) { | |
| var c = []; | |
| return a.each(b, function(b, d) { | |
| - d = a.trim(d), d && a.inArray(d, c) === -1 && c.push(d) | |
| + (d = a.trim(d)) && -1 === a.inArray(d, c) && c.push(d) | |
| }), c | |
| }, tagBox = { | |
| clean: function(a) { | |
| @@ -18,7 +18,7 @@ | |
| h = g.val().split(b), | |
| i = []; | |
| return delete h[e], a.each(h, function(b, c) { | |
| - c = a.trim(c), c && i.push(c) | |
| + (c = a.trim(c)) && i.push(c) | |
| }), g.val(this.clean(i.join(b))), this.quickClicks(f), !1 | |
| }, | |
| quickClicks: function(c) { | |
| @@ -27,7 +27,7 @@ | |
| h = a(c).attr("id"); | |
| f.length && (e = f.prop("disabled"), d = f.val().split(b), g.empty(), a.each(d, function(b, c) { | |
| var d, f; | |
| - c = a.trim(c), c && (d = a("<li />").text(c), e || (f = a('<button type="button" id="' + h + "-check-num-" + b + '" class="ntdelbutton"><span class="remove-tag-icon" aria-hidden="true"></span><span class="screen-reader-text">' + window.tagsSuggestL10n.removeTerm + " " + d.html() + "</span></button>"), f.on("click keypress", function(b) { | |
| + (c = a.trim(c)) && (d = a("<li />").text(c), e || (f = a('<button type="button" id="' + h + "-check-num-" + b + '" class="ntdelbutton"><span class="remove-tag-icon" aria-hidden="true"></span><span class="screen-reader-text">' + window.tagsSuggestL10n.removeTerm + " " + d.html() + "</span></button>"), f.on("click keypress", function(b) { | |
| "click" !== b.type && 13 !== b.keyCode && 32 !== b.keyCode || (13 !== b.keyCode && 32 !== b.keyCode || a(this).closest(".tagsdiv").find("input.newtag").focus(), tagBox.userAction = "remove", tagBox.parseTags(this)) | |
| }), d.prepend(" ").prepend(f)), g.append(d)) | |
| }), tagBox.screenReadersMessage()) | |
| @@ -35,7 +35,7 @@ | |
| flushTags: function(c, d, e) { | |
| var f, g, h, i = a(".the-tags", c), | |
| j = a("input.newtag", c); | |
| - return d = d || !1, h = d ? a(d).text() : j.val(), "undefined" != typeof h && "" !== h && (f = i.val(), g = f ? f + b + h : h, g = this.clean(g), g = array_unique_noempty(g.split(b)).join(b), i.val(g), this.quickClicks(c), d || j.val(""), "undefined" == typeof e && j.focus(), !1) | |
| + return d = d || !1, void 0 !== (h = d ? a(d).text() : j.val()) && "" !== h && (f = i.val(), g = f ? f + b + h : h, g = this.clean(g), g = array_unique_noempty(g.split(b)).join(b), i.val(g), this.quickClicks(c), d || j.val(""), void 0 === e && j.focus(), !1) | |
| }, | |
| get: function(b) { | |
| var c = b.substr(b.indexOf("-") + 1); | |
| diff -ur build-unminified/wp-admin/js/tags.min.js build-branch-unminified/wp-admin/js/tags.min.js | |
| --- build-unminified/wp-admin/js/tags.min.js 2018-10-06 21:45:40.882685988 -0500 | |
| +++ build-branch-unminified/wp-admin/js/tags.min.js 2018-10-06 21:42:43.649364573 -0500 | |
| @@ -10,13 +10,12 @@ | |
| }), d.children().css("backgroundColor", "#f33")), !1 | |
| }), a("#edittag").on("click", ".delete", function(a) { | |
| if ("undefined" == typeof showNotice) return !0; | |
| - var b = showNotice.warn(); | |
| - b || a.preventDefault() | |
| + showNotice.warn() || a.preventDefault() | |
| }), a("#submit").click(function() { | |
| var b = a(this).parents("form"); | |
| return !!validateForm(b) && (a.post(ajaxurl, a("#addtag").serialize(), function(c) { | |
| var d, e, f, g, h; | |
| - if (a("#ajax-response").empty(), d = wpAjax.parseAjaxResponse(c, "ajax-response"), d && !d.errors) { | |
| + if (a("#ajax-response").empty(), (d = wpAjax.parseAjaxResponse(c, "ajax-response")) && !d.errors) { | |
| if (e = b.find("select#parent").val(), e > 0 && a("#tag-" + e).length > 0 ? a(".tags #tag-" + e).after(d.responses[0].supplemental.noparents) : a(".tags").prepend(d.responses[0].supplemental.parents), a(".tags .no-items").remove(), b.find("select#parent")) { | |
| for (f = d.responses[1].supplemental, g = "", h = 0; h < d.responses[1].position; h++) g += " "; | |
| b.find("select#parent option:selected").after('<option value="' + f.term_id + '">' + g + f.name + "</option>") | |
| diff -ur build-unminified/wp-admin/js/tags-suggest.min.js build-branch-unminified/wp-admin/js/tags-suggest.min.js | |
| --- build-unminified/wp-admin/js/tags-suggest.min.js 2018-10-06 21:45:37.930663977 -0500 | |
| +++ build-branch-unminified/wp-admin/js/tags-suggest.min.js 2018-10-06 21:42:40.105338153 -0500 | |
| @@ -16,7 +16,8 @@ | |
| return delete f.taxonomy, f = a.extend({ | |
| source: function(b, e) { | |
| var f; | |
| - return h === b.term ? void e(g) : (f = c(b.term), a.get(window.ajaxurl, { | |
| + if (h === b.term) return void e(g); | |
| + f = c(b.term), a.get(window.ajaxurl, { | |
| action: "ajax-tag-search", | |
| tax: j, | |
| q: f | |
| @@ -35,7 +36,7 @@ | |
| } | |
| g = c, e(c) | |
| } else e(c) | |
| - }), void(h = b.term)) | |
| + }), h = b.term | |
| }, | |
| focus: function(a, b) { | |
| i.attr("aria-activedescendant", "wp-tags-autocomplete-" + b.item.id), a.preventDefault() | |
| @@ -72,8 +73,7 @@ | |
| "aria-expanded": "false", | |
| "aria-owns": i.autocomplete("widget").attr("id") | |
| }).on("focus", function() { | |
| - var a = b(i.val()).pop(); | |
| - a && i.autocomplete("search") | |
| + b(i.val()).pop() && i.autocomplete("search") | |
| }).autocomplete("widget").addClass("wp-tags-autocomplete").attr("role", "listbox").removeAttr("tabindex").on("menufocus", function(a, b) { | |
| b.item.attr("aria-selected", "true") | |
| }).on("menublur", function() { | |
| diff -ur build-unminified/wp-admin/js/theme.min.js build-branch-unminified/wp-admin/js/theme.min.js | |
| --- build-unminified/wp-admin/js/theme.min.js 2018-10-06 21:45:42.306696606 -0500 | |
| +++ build-branch-unminified/wp-admin/js/theme.min.js 2018-10-06 21:42:45.581378977 -0500 | |
| @@ -13,8 +13,7 @@ | |
| template: wp.template | |
| }), c.Model = Backbone.Model.extend({ | |
| initialize: function() { | |
| - var a; | |
| - _.indexOf(c.data.installedThemes, this.get("slug")) !== -1 && this.set({ | |
| + var a; - 1 !== _.indexOf(c.data.installedThemes, this.get("slug")) && this.set({ | |
| installed: !0 | |
| }), this.set({ | |
| id: this.get("slug") || this.get("id") | |
| @@ -153,22 +152,24 @@ | |
| }, | |
| expand: function(b) { | |
| var d = this; | |
| - if (b = b || window.event, "keydown" !== b.type || 13 === b.which || 32 === b.which) return this.touchDrag === !0 ? this.touchDrag = !1 : void(a(b.target).is(".theme-actions a") || a(b.target).is(".theme-actions a, .update-message, .button-link, .notice-dismiss") || (c.focusedTheme = this.$el, this.trigger("theme:expand", d.model.cid))) | |
| + if (b = b || window.event, "keydown" !== b.type || 13 === b.which || 32 === b.which) return !0 === this.touchDrag ? this.touchDrag = !1 : void(a(b.target).is(".theme-actions a") || a(b.target).is(".theme-actions a, .update-message, .button-link, .notice-dismiss") || (c.focusedTheme = this.$el, this.trigger("theme:expand", d.model.cid))) | |
| }, | |
| preventExpand: function() { | |
| this.touchDrag = !0 | |
| }, | |
| preview: function(b) { | |
| var d, e, f = this; | |
| - return b = b || window.event, this.touchDrag === !0 ? this.touchDrag = !1 : void(a(b.target).not(".install-theme-preview").parents(".theme-actions").length || "keydown" === b.type && 13 !== b.which && 32 !== b.which || "keydown" === b.type && 13 !== b.which && a(":focus").hasClass("button") || (b.preventDefault(), b = b || window.event, c.focusedTheme = this.$el, c.preview = e = new c.view.Preview({ | |
| + if (b = b || window.event, !0 === this.touchDrag) return this.touchDrag = !1; | |
| + a(b.target).not(".install-theme-preview").parents(".theme-actions").length || "keydown" === b.type && 13 !== b.which && 32 !== b.which || "keydown" === b.type && 13 !== b.which && a(":focus").hasClass("button") || (b.preventDefault(), b = b || window.event, c.focusedTheme = this.$el, c.preview = e = new c.view.Preview({ | |
| model: this.model | |
| }), e.render(), this.setNavButtonsState(), 1 === this.model.collection.length ? e.$el.addClass("no-navigation") : e.$el.removeClass("no-navigation"), a("div.wrap").append(e.el), this.listenTo(e, "theme:next", function() { | |
| - return d = f.model, _.isUndefined(f.current) || (d = f.current), f.current = f.model.collection.at(f.model.collection.indexOf(d) + 1), _.isUndefined(f.current) ? (f.options.parent.parent.trigger("theme:end"), f.current = d) : (e.model = f.current, e.render(), this.setNavButtonsState(), void a(".next-theme").focus()) | |
| + if (d = f.model, _.isUndefined(f.current) || (d = f.current), f.current = f.model.collection.at(f.model.collection.indexOf(d) + 1), _.isUndefined(f.current)) return f.options.parent.parent.trigger("theme:end"), f.current = d; | |
| + e.model = f.current, e.render(), this.setNavButtonsState(), a(".next-theme").focus() | |
| }).listenTo(e, "theme:previous", function() { | |
| d = f.model, 0 !== f.model.collection.indexOf(f.current) && (_.isUndefined(f.current) || (d = f.current), f.current = f.model.collection.at(f.model.collection.indexOf(d) - 1), _.isUndefined(f.current) || (e.model = f.current, e.render(), this.setNavButtonsState(), a(".previous-theme").focus())) | |
| }), this.listenTo(e, "preview:close", function() { | |
| f.current = f.model | |
| - }))) | |
| + })) | |
| }, | |
| setNavButtonsState: function() { | |
| var b = a(".theme-install-overlay"), | |
| @@ -367,18 +368,19 @@ | |
| }, | |
| renderThemes: function(b) { | |
| var e = this; | |
| - return e.instance = e.collection.paginate(b), 0 === e.instance.size() ? void this.parent.trigger("theme:end") : (!c.isInstall && b >= 1 && a(".add-new-theme").remove(), e.instance.each(function(a) { | |
| + if (e.instance = e.collection.paginate(b), 0 === e.instance.size()) return void this.parent.trigger("theme:end"); | |
| + !c.isInstall && b >= 1 && a(".add-new-theme").remove(), e.instance.each(function(a) { | |
| e.theme = new c.view.Theme({ | |
| model: a, | |
| parent: e | |
| }), e.theme.render(), e.$el.append(e.theme.el), e.listenTo(e.theme, "theme:expand", e.expand, e) | |
| - }), !c.isInstall && c.data.settings.canInstall && this.$el.append('<div class="theme add-new-theme"><a href="' + c.data.settings.installURI + '"><div class="theme-screenshot"><span></span></div><h2 class="theme-name">' + d.addNew + "</h2></a></div>"), void this.parent.page++) | |
| + }), !c.isInstall && c.data.settings.canInstall && this.$el.append('<div class="theme add-new-theme"><a href="' + c.data.settings.installURI + '"><div class="theme-screenshot"><span></span></div><h2 class="theme-name">' + d.addNew + "</h2></a></div>"), this.parent.page++ | |
| }, | |
| currentTheme: function() { | |
| var a, b = this; | |
| - a = b.collection.findWhere({ | |
| + (a = b.collection.findWhere({ | |
| active: !0 | |
| - }), a && (b.collection.remove(a), b.collection.add(a, { | |
| + })) && (b.collection.remove(a), b.collection.add(a, { | |
| at: 0 | |
| })) | |
| }, | |
| @@ -397,11 +399,11 @@ | |
| }, | |
| next: function(a) { | |
| var b, c, d = this; | |
| - b = d.collection.get(a[0]), c = d.collection.at(d.collection.indexOf(b) + 1), void 0 !== c && (this.overlay.closeOverlay(), d.theme.trigger("theme:expand", c.cid)) | |
| + b = d.collection.get(a[0]), (c = d.collection.at(d.collection.indexOf(b) + 1)) !== undefined && (this.overlay.closeOverlay(), d.theme.trigger("theme:expand", c.cid)) | |
| }, | |
| previous: function(a) { | |
| var b, c, d = this; | |
| - b = d.collection.get(a[0]), c = d.collection.at(d.collection.indexOf(b) - 1), void 0 !== c && (this.overlay.closeOverlay(), d.theme.trigger("theme:expand", c.cid)) | |
| + b = d.collection.get(a[0]), (c = d.collection.at(d.collection.indexOf(b) - 1)) !== undefined && (this.overlay.closeOverlay(), d.theme.trigger("theme:expand", c.cid)) | |
| }, | |
| announceSearchResults: function(a) { | |
| 0 === a ? wp.a11y.speak(d.noThemesFound) : wp.a11y.speak(d.themesFound.replace("%d", a)) | |
| @@ -557,9 +559,10 @@ | |
| tag: e | |
| }, | |
| g = a(".filtered-by .tags"); | |
| - return b && b.preventDefault(), e ? (a("body").addClass("filters-applied"), a(".filter-links li > a.current").removeClass("current").removeAttr("aria-current"), g.empty(), _.each(e, function(b) { | |
| + if (b && b.preventDefault(), !e) return void wp.a11y.speak(d.selectFeatureFilter); | |
| + a("body").addClass("filters-applied"), a(".filter-links li > a.current").removeClass("current").removeAttr("aria-current"), g.empty(), _.each(e, function(b) { | |
| c = a('label[for="filter-id-' + b + '"]').text(), g.append('<span class="tag">' + c + "</span>") | |
| - }), void this.collection.query(f)) : void wp.a11y.speak(d.selectFeatureFilter) | |
| + }), this.collection.query(f) | |
| }, | |
| saveUsername: function(b) { | |
| var c = a("#wporg-username-input").val(), | |
| @@ -597,7 +600,8 @@ | |
| moreFilters: function(b) { | |
| var d = a("body"), | |
| e = a(".drawer-toggle"); | |
| - return b.preventDefault(), d.hasClass("filters-applied") ? this.backToFilters() : (this.clearSearch(), c.router.navigate(c.router.baseUrl("")), d.toggleClass("show-filters"), void e.attr("aria-expanded", d.hasClass("show-filters"))) | |
| + if (b.preventDefault(), d.hasClass("filters-applied")) return this.backToFilters(); | |
| + this.clearSearch(), c.router.navigate(c.router.baseUrl("")), d.toggleClass("show-filters"), e.attr("aria-expanded", d.hasClass("show-filters")) | |
| }, | |
| clearFilters: function(b) { | |
| var c = a(".filter-group").find(":checkbox"), | |
| diff -ur build-unminified/wp-admin/js/theme-plugin-editor.min.js build-branch-unminified/wp-admin/js/theme-plugin-editor.min.js | |
| --- build-unminified/wp-admin/js/theme-plugin-editor.min.js 2018-10-06 21:45:40.126680351 -0500 | |
| +++ build-branch-unminified/wp-admin/js/theme-plugin-editor.min.js 2018-10-06 21:42:42.377355091 -0500 | |
| @@ -19,7 +19,7 @@ | |
| b.form = c, d && a.extend(b, d), b.noticeTemplate = wp.template("wp-file-editor-notice"), b.noticesContainer = b.form.find(".editor-notices"), b.submitButton = b.form.find(":input[name=submit]"), b.spinner = b.form.find(".submit .spinner"), b.form.on("submit", b.submit), b.textarea = b.form.find("#newcontent"), b.textarea.on("change", b.onChange), b.warning = a(".file-editor-warning"), b.warning.length > 0 && b.showWarning(), !1 !== b.codeEditor && _.defer(function() { | |
| b.initCodeEditor() | |
| }), a(b.initFileBrowser), a(window).on("beforeunload", function() { | |
| - if (b.dirty) return b.l10n.saveAlert | |
| + return b.dirty ? b.l10n.saveAlert : undefined | |
| }) | |
| }, b.showWarning = function() { | |
| var c = b.warning.find(".file-editor-warning-message").text(); | |
| @@ -100,8 +100,7 @@ | |
| }, b.initFileBrowser = function() { | |
| var b = a("#templateside"); | |
| b.find('[role="group"]').parent().attr("aria-expanded", !1), b.find(".notice").parents("[aria-expanded]").attr("aria-expanded", !0), b.find('[role="tree"]').each(function() { | |
| - var a = new c(this); | |
| - a.init() | |
| + new c(this).init() | |
| }), b.find(".current-file:first").each(function() { | |
| this.scrollIntoViewIfNeeded ? this.scrollIntoViewIfNeeded() : this.scrollIntoView(!1) | |
| }) | |
| @@ -232,7 +231,7 @@ | |
| } | |
| }, a.prototype.collapseTreeitem = function(a) { | |
| var b = !1; | |
| - b = a.isExpanded() ? a : a.groupTreeitem, b && (b.domNode.setAttribute("aria-expanded", !1), this.updateVisibleTreeitems(), this.setFocusToItem(b)) | |
| + (b = a.isExpanded() ? a : a.groupTreeitem) && (b.domNode.setAttribute("aria-expanded", !1), this.updateVisibleTreeitems(), this.setFocusToItem(b)) | |
| }, a.prototype.updateVisibleTreeitems = function() { | |
| this.firstTreeitem = this.treeitems[0]; | |
| for (var a = 0; a < this.treeitems.length; a++) { | |
| @@ -243,7 +242,7 @@ | |
| } | |
| }, a.prototype.setFocusByFirstCharacter = function(a, b) { | |
| var c, d; | |
| - b = b.toLowerCase(), c = this.treeitems.indexOf(a) + 1, c === this.treeitems.length && (c = 0), d = this.getIndexFirstChars(c, b), d === -1 && (d = this.getIndexFirstChars(0, b)), d > -1 && this.setFocusToItem(this.treeitems[d]) | |
| + b = b.toLowerCase(), c = this.treeitems.indexOf(a) + 1, c === this.treeitems.length && (c = 0), d = this.getIndexFirstChars(c, b), -1 === d && (d = this.getIndexFirstChars(0, b)), d > -1 && this.setFocusToItem(this.treeitems[d]) | |
| }, a.prototype.getIndexFirstChars = function(a, b) { | |
| for (var c = a; c < this.firstChars.length; c++) | |
| if (this.treeitems[c].isVisible && b === this.firstChars[c]) return c; | |
| diff -ur build-unminified/wp-admin/js/updates.min.js build-branch-unminified/wp-admin/js/updates.min.js | |
| --- build-unminified/wp-admin/js/updates.min.js 2018-10-06 21:45:40.618684019 -0500 | |
| +++ build-branch-unminified/wp-admin/js/updates.min.js 2018-10-06 21:42:43.249361591 -0500 | |
| @@ -13,7 +13,7 @@ | |
| }, | |
| fsNonce: "", | |
| available: !1 | |
| - }, b.updates.ajaxLocked = !1, b.updates.adminNotice = b.template("wp-updates-admin-notice"), b.updates.queue = [], b.updates.$elToReturnFocusToFromCredentialsModal = void 0, b.updates.addAdminNotice = function(c) { | |
| + }, b.updates.ajaxLocked = !1, b.updates.adminNotice = b.template("wp-updates-admin-notice"), b.updates.queue = [], b.updates.$elToReturnFocusToFromCredentialsModal = undefined, b.updates.addAdminNotice = function(c) { | |
| var e, f = a(c.selector); | |
| delete c.selector, e = b.updates.adminNotice(c), f.length || (f = a("#" + c.id)), f.length ? f.replaceWith(e) : "customize" === pagenow ? a(".customize-themes-notifications").append(e) : a(".wrap").find("> h1").after(e), d.trigger("wp-updates-notice-added") | |
| }, b.updates.ajax = function(c, d) { | |
| @@ -307,7 +307,7 @@ | |
| a("#ssh-keys").toggleClass("hidden", "ssh" !== a(this).val()) | |
| }).change(), d.on("credential-modal-cancel", function(c, d) { | |
| var e, f, g = a(".updating-message"); | |
| - "import" === pagenow ? g.removeClass("updating-message") : "plugins" === pagenow || "plugins-network" === pagenow ? "update-plugin" === d.action ? e = a('tr[data-plugin="' + d.data.plugin + '"]').find(".update-message") : "delete-plugin" === d.action && (e = a('[data-plugin="' + d.data.plugin + '"]').find(".row-actions a.delete")) : "themes" === pagenow || "themes-network" === pagenow ? "update-theme" === d.action ? e = a('[data-slug="' + d.data.slug + '"]').find(".update-message") : "delete-theme" === d.action && "themes-network" === pagenow ? e = a('[data-slug="' + d.data.slug + '"]').find(".row-actions a.delete") : "delete-theme" === d.action && "themes" === pagenow && (e = a(".theme-actions .delete-theme")) : e = g, e && e.hasClass("updating-message") && (f = e.data("originaltext"), "undefined" == typeof f && (f = a("<p>").html(e.find("p").data("originaltext"))), e.removeClass("updating-message").html(f), "plugin-install" !== pagenow && "plugin-install-network" !== pagenow || ("update-plugin" === d.action ? e.attr("aria-label", b.updates.l10n.pluginUpdateNowLabel.replace("%s", e.data("name"))) : "install-plugin" === d.action && e.attr("aria-label", b.updates.l10n.pluginInstallNowLabel.replace("%s", e.data("name"))))), b.a11y.speak(b.updates.l10n.updateCancel, "polite") | |
| + "import" === pagenow ? g.removeClass("updating-message") : "plugins" === pagenow || "plugins-network" === pagenow ? "update-plugin" === d.action ? e = a('tr[data-plugin="' + d.data.plugin + '"]').find(".update-message") : "delete-plugin" === d.action && (e = a('[data-plugin="' + d.data.plugin + '"]').find(".row-actions a.delete")) : "themes" === pagenow || "themes-network" === pagenow ? "update-theme" === d.action ? e = a('[data-slug="' + d.data.slug + '"]').find(".update-message") : "delete-theme" === d.action && "themes-network" === pagenow ? e = a('[data-slug="' + d.data.slug + '"]').find(".row-actions a.delete") : "delete-theme" === d.action && "themes" === pagenow && (e = a(".theme-actions .delete-theme")) : e = g, e && e.hasClass("updating-message") && (f = e.data("originaltext"), void 0 === f && (f = a("<p>").html(e.find("p").data("originaltext"))), e.removeClass("updating-message").html(f), "plugin-install" !== pagenow && "plugin-install-network" !== pagenow || ("update-plugin" === d.action ? e.attr("aria-label", b.updates.l10n.pluginUpdateNowLabel.replace("%s", e.data("name"))) : "install-plugin" === d.action && e.attr("aria-label", b.updates.l10n.pluginInstallNowLabel.replace("%s", e.data("name"))))), b.a11y.speak(b.updates.l10n.updateCancel, "polite") | |
| }), f.on("click", "[data-plugin] .update-link", function(c) { | |
| var d = a(c.target), | |
| e = d.parents("tr"); | |
| @@ -324,8 +324,7 @@ | |
| }), e.on("click", ".install-now", function(c) { | |
| var e = a(c.target); | |
| c.preventDefault(), e.hasClass("updating-message") || e.hasClass("button-disabled") || (b.updates.shouldRequestFilesystemCredentials && !b.updates.ajaxLocked && (b.updates.requestFilesystemCredentials(c), d.on("credential-modal-cancel", function() { | |
| - var c = a(".install-now.updating-message"); | |
| - c.removeClass("updating-message").text(b.updates.l10n.installNow), b.a11y.speak(b.updates.l10n.updateCancel, "polite") | |
| + a(".install-now.updating-message").removeClass("updating-message").text(b.updates.l10n.installNow), b.a11y.speak(b.updates.l10n.updateCancel, "polite") | |
| })), b.updates.installPlugin({ | |
| slug: e.data("slug") | |
| })) | |
| @@ -395,13 +394,14 @@ | |
| b.updates.maybeRequestFilesystemCredentials(c), c.preventDefault(), f.find('.manage-column [type="checkbox"]').prop("checked", !1), d.trigger("wp-" + e + "-bulk-" + h, i), i.each(function(c, d) { | |
| var e = a(d), | |
| f = e.parents("tr"); | |
| - return "update-selected" !== h || f.hasClass("update") && !f.find("notice-error").length ? void b.updates.queue.push({ | |
| + if ("update-selected" === h && (!f.hasClass("update") || f.find("notice-error").length)) return void e.prop("checked", !1); | |
| + b.updates.queue.push({ | |
| action: g, | |
| data: { | |
| plugin: f.data("plugin"), | |
| slug: f.data("slug") | |
| } | |
| - }) : void e.prop("checked", !1) | |
| + }) | |
| }), d.on("wp-plugin-update-success wp-plugin-update-error wp-theme-update-success wp-theme-update-error", function(c, d) { | |
| var e, f, g = a('[data-slug="' + d.slug + '"]'); | |
| "wp-" + d.update + "-update-success" === c.type ? j++ : (f = d.pluginName ? d.pluginName : g.find(".column-primary strong").text(), k++, l.push(f + ": " + d.errorMessage)), g.find('input[name="checked[]"]:checked').prop("checked", !1), b.updates.adminNotice = b.template("wp-bulk-updates-admin-notice"), b.updates.addAdminNotice({ | |
| @@ -422,13 +422,13 @@ | |
| }), j.length && j.attr("aria-describedby", "live-search-desc"), j.on("keyup input", _.debounce(function(c, d) { | |
| var f, g, h = a(".plugin-install-search"); | |
| f = { | |
| - _ajax_nonce: b.updates.ajaxNonce, | |
| - s: c.target.value, | |
| - tab: "search", | |
| - type: a("#typeselector").val(), | |
| - pagenow: pagenow | |
| - }, g = location.href.split("?")[0] + "?" + a.param(_.omit(f, ["_ajax_nonce", "pagenow"])), "keyup" === c.type && 27 === c.which && (c.target.value = ""), b.updates.searchTerm === f.s && "typechange" !== d || (e.empty(), | |
| - b.updates.searchTerm = f.s, window.history && window.history.replaceState && window.history.replaceState(null, "", g), h.length || (h = a('<li class="plugin-install-search" />').append(a("<a />", { | |
| + _ajax_nonce: b.updates.ajaxNonce, | |
| + s: c.target.value, | |
| + tab: "search", | |
| + type: a("#typeselector").val(), | |
| + pagenow: pagenow | |
| + }, g = location.href.split("?")[0] + "?" + a.param(_.omit(f, ["_ajax_nonce", "pagenow"])), "keyup" === c.type && 27 === c.which && (c.target.value = ""), | |
| + b.updates.searchTerm === f.s && "typechange" !== d || (e.empty(), b.updates.searchTerm = f.s, window.history && window.history.replaceState && window.history.replaceState(null, "", g), h.length || (h = a('<li class="plugin-install-search" />').append(a("<a />", { | |
| "class": "current", | |
| href: g, | |
| text: b.updates.l10n.searchResultsLabel | |
| diff -ur build-unminified/wp-admin/js/user-profile.min.js build-branch-unminified/wp-admin/js/user-profile.min.js | |
| --- build-unminified/wp-admin/js/user-profile.min.js 2018-10-06 21:45:38.154665647 -0500 | |
| +++ build-branch-unminified/wp-admin/js/user-profile.min.js 2018-10-06 21:42:40.353340002 -0500 | |
| @@ -1,6 +1,7 @@ | |
| ! function(a) { | |
| function b() { | |
| - return "function" != typeof zxcvbn ? void setTimeout(b, 50) : (k.val() ? (g(), h()) : (k.val(k.data("pw")), k.trigger("pwupdate"), h()), 1 !== parseInt(q.data("start-masked"), 10) ? j.addClass("show-password") : q.trigger("click"), void a("#pw-weak-text-label").html(userProfileL10n.warnWeak)) | |
| + if ("function" != typeof zxcvbn) return void setTimeout(b, 50); | |
| + k.val() ? (g(), h()) : (k.val(k.data("pw")), k.trigger("pwupdate"), h()), 1 !== parseInt(q.data("start-masked"), 10) ? j.addClass("show-password") : q.trigger("click"), a("#pw-weak-text-label").html(userProfileL10n.warnWeak) | |
| } | |
| function c() { | |
| @@ -53,9 +54,9 @@ | |
| } | |
| function g() { | |
| - var b, c = a("#pass1").val(); | |
| - if (a("#pass-strength-result").removeClass("short bad good strong"), !c) return void a("#pass-strength-result").html(" "); | |
| - switch (b = wp.passwordStrength.meter(c, wp.passwordStrength.userInputBlacklist(), c)) { | |
| + var b = a("#pass1").val(); | |
| + if (a("#pass-strength-result").removeClass("short bad good strong"), !b) return void a("#pass-strength-result").html(" "); | |
| + switch (wp.passwordStrength.meter(b, wp.passwordStrength.userInputBlacklist(), b)) { | |
| case -1: | |
| a("#pass-strength-result").addClass("bad").html(pwsL10n.unknown); | |
| break; | |
| @@ -100,7 +101,7 @@ | |
| }), a.each(c, function(d, e) { | |
| if (e) { | |
| var f = e.replace(/<\/?[a-z][^>]*>/gi, ""); | |
| - c[d].length && a.inArray(f, b) === -1 && (b.push(f), a("<option />", { | |
| + c[d].length && -1 === a.inArray(f, b) && (b.push(f), a("<option />", { | |
| text: f | |
| }).appendTo(h)) | |
| } | |
| diff -ur build-unminified/wp-admin/js/user-suggest.min.js build-branch-unminified/wp-admin/js/user-suggest.min.js | |
| --- build-unminified/wp-admin/js/user-suggest.min.js 2018-10-06 21:45:40.462682856 -0500 | |
| +++ build-branch-unminified/wp-admin/js/user-suggest.min.js 2018-10-06 21:42:42.921359146 -0500 | |
| @@ -6,8 +6,8 @@ | |
| }; | |
| "undefined" != typeof isRtl && isRtl && (c.my = "right top", c.at = "right bottom"), a(".wp-suggest-user").each(function() { | |
| var d = a(this), | |
| - e = "undefined" != typeof d.data("autocompleteType") ? d.data("autocompleteType") : "add", | |
| - f = "undefined" != typeof d.data("autocompleteField") ? d.data("autocompleteField") : "user_login"; | |
| + e = void 0 !== d.data("autocompleteType") ? d.data("autocompleteType") : "add", | |
| + f = void 0 !== d.data("autocompleteField") ? d.data("autocompleteField") : "user_login"; | |
| d.autocomplete({ | |
| source: ajaxurl + "?action=autocomplete-user&autocomplete_type=" + e + "&autocomplete_field=" + f + b, | |
| delay: 500, | |
| diff -ur build-unminified/wp-admin/js/widgets/custom-html-widgets.min.js build-branch-unminified/wp-admin/js/widgets/custom-html-widgets.min.js | |
| --- build-unminified/wp-admin/js/widgets/custom-html-widgets.min.js 2018-10-06 21:45:42.538698336 -0500 | |
| +++ build-branch-unminified/wp-admin/js/widgets/custom-html-widgets.min.js 2018-10-06 21:42:45.801380617 -0500 | |
| @@ -49,8 +49,7 @@ | |
| d.fields.title.focus() | |
| }, | |
| onTabNext: function() { | |
| - var a = d.syncContainer.add(d.syncContainer.parent().find(".widget-position, .widget-control-actions")).find(":tabbable"); | |
| - a.first().focus() | |
| + d.syncContainer.add(d.syncContainer.parent().find(".widget-position, .widget-control-actions")).find(":tabbable").first().focus() | |
| }, | |
| onChangeLintingErrors: function(a) { | |
| d.currentErrorAnnotations = a | |
| @@ -73,17 +72,16 @@ | |
| }), d.editor.codemirror.on("blur", function() { | |
| d.contentUpdateBypassed && d.syncContainer.find(".sync-input.content").trigger("change") | |
| }), wp.customize && d.editor.codemirror.on("keydown", function(a, b) { | |
| - var c = 27; | |
| - c === b.keyCode && b.stopPropagation() | |
| + 27 === b.keyCode && b.stopPropagation() | |
| })) | |
| } | |
| }), b.widgetControls = {}, b.handleWidgetAdded = function(c, d) { | |
| - var e, f, g, h, i, j, k, l = 50; | |
| + var e, f, g, h, i, j, k; | |
| e = d.find("> .widget-inside > .form, > .widget-inside > form"), f = e.find("> .id_base").val(), -1 !== b.idBases.indexOf(f) && (h = e.find(".widget-id").val(), b.widgetControls[h] || (j = a("<div></div>"), k = d.find(".widget-content:first"), k.before(j), g = new b.CustomHtmlWidgetControl({ | |
| el: j, | |
| syncContainer: k | |
| }), b.widgetControls[h] = g, (i = function() { | |
| - (wp.customize ? d.parent().hasClass("expanded") : d.hasClass("open")) ? g.initializeEditor(): setTimeout(i, l) | |
| + (wp.customize ? d.parent().hasClass("expanded") : d.hasClass("open")) ? g.initializeEditor(): setTimeout(i, 50) | |
| })())) | |
| }, b.setupAccessibleMode = function() { | |
| var c, d, e, f, g; | |
| @@ -93,7 +91,7 @@ | |
| }), e.initializeEditor())) | |
| }, b.handleWidgetUpdated = function(a, c) { | |
| var d, e, f, g; | |
| - d = c.find("> .widget-inside > .form, > .widget-inside > form"), g = d.find("> .id_base").val(), -1 !== b.idBases.indexOf(g) && (e = d.find("> .widget-id").val(), f = b.widgetControls[e], f && f.updateFields()) | |
| + d = c.find("> .widget-inside > .form, > .widget-inside > form"), g = d.find("> .id_base").val(), -1 !== b.idBases.indexOf(g) && (e = d.find("> .widget-id").val(), (f = b.widgetControls[e]) && f.updateFields()) | |
| }, b.init = function(c) { | |
| var d = a(document); | |
| _.extend(b.codeEditorSettings, c), d.on("widget-added", b.handleWidgetAdded), d.on("widget-synced widget-updated", b.handleWidgetUpdated), a(function() { | |
| diff -ur build-unminified/wp-admin/js/widgets/media-gallery-widget.min.js build-branch-unminified/wp-admin/js/widgets/media-gallery-widget.min.js | |
| --- build-unminified/wp-admin/js/widgets/media-gallery-widget.min.js 2018-10-06 21:45:43.230703496 -0500 | |
| +++ build-branch-unminified/wp-admin/js/widgets/media-gallery-widget.min.js 2018-10-06 21:42:46.713387416 -0500 | |
| @@ -72,7 +72,7 @@ | |
| state: "gallery-edit" | |
| }), wp.media.frame = b, b.on("update", function(a) { | |
| var c, d = b.state(); | |
| - c = a || d.get("selection"), c && (c.gallery && e.model.set(e.mapMediaToModelProps(c.gallery.toJSON())), e.selectedAttachments.reset(c.models), e.model.set({ | |
| + (c = a || d.get("selection")) && (c.gallery && e.model.set(e.mapMediaToModelProps(c.gallery.toJSON())), e.selectedAttachments.reset(c.models), e.model.set({ | |
| ids: _.pluck(c.models, "id") | |
| })) | |
| }), b.$el.addClass("media-widget"), b.open(), a && a.on("destroy", e.handleAttachmentDestroy) | |
| @@ -92,7 +92,7 @@ | |
| state: "gallery" | |
| }), wp.media.frame = b, b.on("update", function(a) { | |
| var c, d = b.state(); | |
| - c = a || d.get("selection"), c && (c.gallery && e.model.set(e.mapMediaToModelProps(c.gallery.toJSON())), e.selectedAttachments.reset(c.models), e.model.set({ | |
| + (c = a || d.get("selection")) && (c.gallery && e.model.set(e.mapMediaToModelProps(c.gallery.toJSON())), e.selectedAttachments.reset(c.models), e.model.set({ | |
| ids: _.pluck(c.models, "id") | |
| })) | |
| }), b.$el.addClass("media-widget"), b.open(), a && a.on("destroy", e.handleAttachmentDestroy), b.$el.find(":focusable:first").focus() | |
| diff -ur build-unminified/wp-admin/js/widgets/media-widgets.min.js build-branch-unminified/wp-admin/js/widgets/media-widgets.min.js | |
| --- build-unminified/wp-admin/js/widgets/media-widgets.min.js 2018-10-06 21:45:43.122702691 -0500 | |
| +++ build-branch-unminified/wp-admin/js/widgets/media-widgets.min.js 2018-10-06 21:42:46.589386492 -0500 | |
| @@ -31,17 +31,19 @@ | |
| }, | |
| updateoEmbed: function() { | |
| var a, b = this; | |
| - return (a = b.model.get("url")) ? (a.match(/^(http|https):\/\/.+\//) || (b.controller.$el.find("#embed-url-field").addClass("invalid"), b.setAddToWidgetButtonDisabled(!0)), void wp.media.view.EmbedLink.prototype.updateoEmbed.call(b)) : (b.setErrorNotice(""), void b.setAddToWidgetButtonDisabled(!0)) | |
| + if (!(a = b.model.get("url"))) return b.setErrorNotice(""), void b.setAddToWidgetButtonDisabled(!0); | |
| + a.match(/^(http|https):\/\/.+\//) || (b.controller.$el.find("#embed-url-field").addClass("invalid"), b.setAddToWidgetButtonDisabled(!0)), wp.media.view.EmbedLink.prototype.updateoEmbed.call(b) | |
| }, | |
| fetch: function() { | |
| var a, b, c, d, e, f, g, h = this; | |
| - return e = h.model.get("url"), h.dfd && "pending" === h.dfd.state() && h.dfd.abort(), a = function(a) { | |
| - h.renderoEmbed({ | |
| - data: { | |
| - body: a | |
| - } | |
| - }), h.controller.$el.find("#embed-url-field").removeClass("invalid"), h.setErrorNotice(""), h.setAddToWidgetButtonDisabled(!1) | |
| - }, d = document.createElement("a"), d.href = e, (b = d.pathname.toLowerCase().match(/\.(\w+)$/)) ? (c = b[1], void(wp.media.view.settings.embedMimes[c] ? 0 !== wp.media.view.settings.embedMimes[c].indexOf(h.controller.options.mimeType) ? h.renderFail() : a("<!--success-->") : h.renderFail())) : (f = /https?:\/\/www\.youtube\.com\/embed\/([^\/]+)/, g = f.exec(e), g && (e = "https://www.youtube.com/watch?v=" + g[1], h.model.attributes.url = e), h.dfd = wp.apiRequest({ | |
| + if (e = h.model.get("url"), h.dfd && "pending" === h.dfd.state() && h.dfd.abort(), a = function(a) { | |
| + h.renderoEmbed({ | |
| + data: { | |
| + body: a | |
| + } | |
| + }), h.controller.$el.find("#embed-url-field").removeClass("invalid"), h.setErrorNotice(""), h.setAddToWidgetButtonDisabled(!1) | |
| + }, d = document.createElement("a"), d.href = e, b = d.pathname.toLowerCase().match(/\.(\w+)$/)) return c = b[1], void(wp.media.view.settings.embedMimes[c] ? 0 !== wp.media.view.settings.embedMimes[c].indexOf(h.controller.options.mimeType) ? h.renderFail() : a("\x3c!--success--\x3e") : h.renderFail()); | |
| + f = /https?:\/\/www\.youtube\.com\/embed\/([^\/]+)/, g = f.exec(e), g && (e = "https://www.youtube.com/watch?v=" + g[1], h.model.attributes.url = e), h.dfd = wp.apiRequest({ | |
| url: wp.media.view.settings.oEmbedProxyUrl, | |
| data: { | |
| url: e, | |
| @@ -53,8 +55,9 @@ | |
| dataType: "json", | |
| context: h | |
| }), h.dfd.done(function(b) { | |
| - return h.controller.options.mimeType !== b.type ? void h.renderFail() : void a(b.html) | |
| - }), void h.dfd.fail(_.bind(h.renderFail, h))) | |
| + if (h.controller.options.mimeType !== b.type) return void h.renderFail(); | |
| + a(b.html) | |
| + }), h.dfd.fail(_.bind(h.renderFail, h)) | |
| }, | |
| renderFail: function() { | |
| var a = this; | |
| @@ -259,7 +262,7 @@ | |
| }), _.each(a, function(a, b) { | |
| var f = d[b] || b; | |
| c.model.schema[f] && (e[f] = a) | |
| - }), "custom" === a.size && (e.width = a.customWidth, e.height = a.customHeight), "post" === a.link ? e.link_url = a.postUrl || a.linkUrl : "file" === a.link && (e.link_url = a.url), !a.attachment_id && a.id && (e.attachment_id = a.id), a.url && (b = a.url.replace(/#.*$/, "").replace(/\?.*$/, "").split(".").pop().toLowerCase(), b in c.model.schema && (e[b] = a.url)), _.omit(e, "title") | |
| + }), "custom" === a.size && (e.width = a.customWidth, e.height = a.customHeight), "post" === a.link ? e.link_url = a.postUrl || a.linkUrl : "file" === a.link && (e.link_url = a.url), !a.attachment_id && a.id && (e.attachment_id = a.id), a.url && (b = a.url.replace(/#.*$/, "").replace(/\?.*$/, "").split(".").pop().toLowerCase()) in c.model.schema && (e[b] = a.url), _.omit(e, "title") | |
| }, | |
| mapModelToMediaFrameProps: function(a) { | |
| var b = this, | |
| @@ -305,11 +308,12 @@ | |
| var d, e, f, g = this; | |
| return null === a ? g : ("object" == typeof a ? (d = a, e = b) : (d = {}, d[a] = b, e = c), f = {}, _.each(d, function(a, b) { | |
| var c; | |
| - return g.schema[b] ? (c = g.schema[b].type, void("array" === c ? (f[b] = a, _.isArray(f[b]) || (f[b] = f[b].split(/,/)), g.schema[b].items && "integer" === g.schema[b].items.type && (f[b] = _.filter(_.map(f[b], function(a) { | |
| + if (!g.schema[b]) return void(f[b] = a); | |
| + c = g.schema[b].type, "array" === c ? (f[b] = a, _.isArray(f[b]) || (f[b] = f[b].split(/,/)), g.schema[b].items && "integer" === g.schema[b].items.type && (f[b] = _.filter(_.map(f[b], function(a) { | |
| return parseInt(a, 10) | |
| }, function(a) { | |
| return "number" == typeof a | |
| - })))) : "integer" === c ? f[b] = parseInt(a, 10) : "boolean" === c ? f[b] = !(!a || "0" === a || "false" === a) : f[b] = a)) : void(f[b] = a) | |
| + })))) : f[b] = "integer" === c ? parseInt(a, 10) : "boolean" === c ? !(!a || "0" === a || "false" === a) : a | |
| }), Backbone.Model.prototype.set.call(this, f, e)) | |
| }, | |
| getEmbedResetProps: function() { | |
| @@ -320,8 +324,8 @@ | |
| }), b.modelCollection = new(Backbone.Collection.extend({ | |
| model: b.MediaWidgetModel | |
| })), b.widgetControls = {}, b.handleWidgetAdded = function(c, d) { | |
| - var e, f, g, h, i, j, k, l, m, n, o, p = 50; | |
| - g = d.find("> .widget-inside > .form, > .widget-inside > form"), h = g.find("> .id_base").val(), n = g.find("> .widget-id").val(), b.widgetControls[n] || (i = b.controlConstructors[h], i && (j = b.modelConstructors[h] || b.MediaWidgetModel, e = a("<div></div>"), f = d.find(".widget-content:first"), f.before(e), k = {}, f.find(".media-widget-instance-property").each(function() { | |
| + var e, f, g, h, i, j, k, l, m, n, o; | |
| + g = d.find("> .widget-inside > .form, > .widget-inside > form"), h = g.find("> .id_base").val(), n = g.find("> .widget-id").val(), b.widgetControls[n] || (i = b.controlConstructors[h]) && (j = b.modelConstructors[h] || b.MediaWidgetModel, e = a("<div></div>"), f = d.find(".widget-content:first"), f.before(e), k = {}, f.find(".media-widget-instance-property").each(function() { | |
| var b = a(this); | |
| k[b.data("property")] = b.val() | |
| }), k.widget_id = n, m = new j(k), l = new i({ | |
| @@ -329,11 +333,11 @@ | |
| syncContainer: f, | |
| model: m | |
| }), o = function() { | |
| - d.hasClass("open") ? l.render() : setTimeout(o, p) | |
| - }, o(), b.modelCollection.add([m]), b.widgetControls[m.get("widget_id")] = l)) | |
| + d.hasClass("open") ? l.render() : setTimeout(o, 50) | |
| + }, o(), b.modelCollection.add([m]), b.widgetControls[m.get("widget_id")] = l) | |
| }, b.setupAccessibleMode = function() { | |
| var c, d, e, f, g, h, i, j, k; | |
| - c = a(".editwidget > form"), 0 !== c.length && (e = c.find("> .widget-control-actions > .id_base").val(), g = b.controlConstructors[e], g && (d = c.find("> .widget-control-actions > .widget-id").val(), h = b.modelConstructors[e] || b.MediaWidgetModel, j = a("<div></div>"), k = c.find("> .widget-inside"), k.before(j), i = {}, k.find(".media-widget-instance-property").each(function() { | |
| + c = a(".editwidget > form"), 0 !== c.length && (e = c.find("> .widget-control-actions > .id_base").val(), (g = b.controlConstructors[e]) && (d = c.find("> .widget-control-actions > .widget-id").val(), h = b.modelConstructors[e] || b.MediaWidgetModel, j = a("<div></div>"), k = c.find("> .widget-inside"), k.before(j), i = {}, k.find(".media-widget-instance-property").each(function() { | |
| var b = a(this); | |
| i[b.data("property")] = b.val() | |
| }), i.widget_id = d, f = new g({ | |
| @@ -343,7 +347,7 @@ | |
| }), b.modelCollection.add([f.model]), b.widgetControls[f.model.get("widget_id")] = f, f.render())) | |
| }, b.handleWidgetUpdated = function(c, d) { | |
| var e, f, g, h, i = {}; | |
| - e = d.find("> .widget-inside > .form, > .widget-inside > form"), g = e.find("> .widget-id").val(), h = b.widgetControls[g], h && (f = e.find("> .widget-content"), f.find(".media-widget-instance-property").each(function() { | |
| + e = d.find("> .widget-inside > .form, > .widget-inside > form"), g = e.find("> .widget-id").val(), (h = b.widgetControls[g]) && (f = e.find("> .widget-content"), f.find(".media-widget-instance-property").each(function() { | |
| var b = a(this).data("property"); | |
| i[b] = a(this).val() | |
| }), h.stopListening(h.model, "change", h.syncModelToInputs), h.model.set(i), h.listenTo(h.model, "change", h.syncModelToInputs)) | |
| diff -ur build-unminified/wp-admin/js/widgets/text-widgets.min.js build-branch-unminified/wp-admin/js/widgets/text-widgets.min.js | |
| --- build-unminified/wp-admin/js/widgets/text-widgets.min.js 2018-10-06 21:45:42.762700006 -0500 | |
| +++ build-branch-unminified/wp-admin/js/widgets/text-widgets.min.js 2018-10-06 21:42:46.145383181 -0500 | |
| @@ -65,7 +65,7 @@ | |
| b.show(), b.find(".close").focus(), wp.a11y.speak(b.find("h3, p").map(function() { | |
| return a(this).text() | |
| }).get().join("\n\n")) | |
| - }, e = window.tinymce.get(d), !e) throw new Error("Failed to initialize editor"); | |
| + }, !(e = window.tinymce.get(d))) throw new Error("Failed to initialize editor"); | |
| g = function() { | |
| a(e.getWin()).on("unload", function() { | |
| _.defer(c) | |
| @@ -94,21 +94,20 @@ | |
| j = !1, | |
| k = !1; | |
| e = h.fields.text, d = e.attr("id"), g = e.val(), f = function() { | |
| - var a = 300; | |
| h.editor.isDirty() && (wp.customize && wp.customize.state && (wp.customize.state("processing").set(wp.customize.state("processing").get() + 1), _.delay(function() { | |
| wp.customize.state("processing").set(wp.customize.state("processing").get() - 1) | |
| - }, a)), h.editor.isHidden() || h.editor.save()), k && g !== e.val() && (e.trigger("change"), k = !1, g = e.val()) | |
| + }, 300)), h.editor.isHidden() || h.editor.save()), k && g !== e.val() && (e.trigger("change"), k = !1, g = e.val()) | |
| }, h.syncContainer.closest(".widget").find("[name=savewidget]:first").on("click", function() { | |
| f() | |
| }), c() | |
| } | |
| }), b.widgetControls = {}, b.handleWidgetAdded = function(c, d) { | |
| - var e, f, g, h, i, j, k, l = 50; | |
| + var e, f, g, h, i, j, k; | |
| e = d.find("> .widget-inside > .form, > .widget-inside > form"), f = e.find("> .id_base").val(), -1 !== b.idBases.indexOf(f) && (h = e.find(".widget-id").val(), b.widgetControls[h] || e.find(".visual").val() && (j = a("<div></div>"), k = d.find(".widget-content:first"), k.before(j), g = new b.TextWidgetControl({ | |
| el: j, | |
| syncContainer: k | |
| }), b.widgetControls[h] = g, (i = function() { | |
| - d.hasClass("open") ? g.initializeEditor() : setTimeout(i, l) | |
| + d.hasClass("open") ? g.initializeEditor() : setTimeout(i, 50) | |
| })())) | |
| }, b.setupAccessibleMode = function() { | |
| var c, d, e, f, g; | |
| @@ -118,7 +117,7 @@ | |
| }), e.initializeEditor())) | |
| }, b.handleWidgetUpdated = function(a, c) { | |
| var d, e, f, g; | |
| - d = c.find("> .widget-inside > .form, > .widget-inside > form"), g = d.find("> .id_base").val(), -1 !== b.idBases.indexOf(g) && (e = d.find("> .widget-id").val(), f = b.widgetControls[e], f && f.updateFields()) | |
| + d = c.find("> .widget-inside > .form, > .widget-inside > form"), g = d.find("> .id_base").val(), -1 !== b.idBases.indexOf(g) && (e = d.find("> .widget-id").val(), (f = b.widgetControls[e]) && f.updateFields()) | |
| }, b.init = function() { | |
| var c = a(document); | |
| c.on("widget-added", b.handleWidgetAdded), c.on("widget-synced widget-updated", b.handleWidgetUpdated), a(function() { | |
| diff -ur build-unminified/wp-admin/js/widgets.min.js build-branch-unminified/wp-admin/js/widgets.min.js | |
| --- build-unminified/wp-admin/js/widgets.min.js 2018-10-06 21:45:41.210688434 -0500 | |
| +++ build-branch-unminified/wp-admin/js/widgets.min.js 2018-10-06 21:42:44.113368033 -0500 | |
| @@ -94,9 +94,10 @@ | |
| stop: function(e, f) { | |
| var g, h, i, j, k, l, m = f.item, | |
| n = d; | |
| - return wpWidgets.hoveredSidebar = null, m.hasClass("deleting") ? (wpWidgets.save(m, 1, 0, 1), void m.remove()) : (g = m.find("input.add_new").val(), h = m.find("input.multi_number").val(), m.attr("style", "").removeClass("ui-draggable"), d = "", g && ("multi" === g ? (m.html(m.html().replace(/<[^<>]+>/g, function(a) { | |
| + if (wpWidgets.hoveredSidebar = null, m.hasClass("deleting")) return wpWidgets.save(m, 1, 0, 1), void m.remove(); | |
| + g = m.find("input.add_new").val(), h = m.find("input.multi_number").val(), m.attr("style", "").removeClass("ui-draggable"), d = "", g && ("multi" === g ? (m.html(m.html().replace(/<[^<>]+>/g, function(a) { | |
| return a.replace(/__i__|%i%/g, h) | |
| - })), m.attr("id", n.replace("__i__", h)), h++, a("div#" + n).find("input.multi_number").val(h)) : "single" === g && (m.attr("id", "new-" + n), c = "div#" + n), wpWidgets.save(m, 0, 0, 1), m.find("input.add_new").val(""), b.trigger("widget-added", [m])), i = m.parent(), i.parent().hasClass("closed") && (i.parent().removeClass("closed").find(".handlediv").attr("aria-expanded", "true"), j = i.children(".widget"), j.length > 1 && (k = j.get(0), l = m.get(0), k.id && l.id && k.id !== l.id && a(k).before(m))), void(g ? m.find(".widget-action").trigger("click") : wpWidgets.saveOrder(i.attr("id")))) | |
| + })), m.attr("id", n.replace("__i__", h)), h++, a("div#" + n).find("input.multi_number").val(h)) : "single" === g && (m.attr("id", "new-" + n), c = "div#" + n), wpWidgets.save(m, 0, 0, 1), m.find("input.add_new").val(""), b.trigger("widget-added", [m])), i = m.parent(), i.parent().hasClass("closed") && (i.parent().removeClass("closed").find(".handlediv").attr("aria-expanded", "true"), j = i.children(".widget"), j.length > 1 && (k = j.get(0), l = m.get(0), k.id && l.id && k.id !== l.id && a(k).before(m))), g ? m.find(".widget-action").trigger("click") : wpWidgets.saveOrder(i.attr("id")) | |
| }, | |
| activate: function() { | |
| a(this).parent().addClass("widget-hover") | |
| @@ -106,9 +107,10 @@ | |
| }, | |
| receive: function(b, c) { | |
| var d = a(c.sender); | |
| - return this.id.indexOf("orphaned_widgets") > -1 ? void d.sortable("cancel") : void(d.attr("id").indexOf("orphaned_widgets") > -1 && !d.children(".widget").length && d.parents(".orphan-sidebar").slideUp(400, function() { | |
| + if (this.id.indexOf("orphaned_widgets") > -1) return void d.sortable("cancel"); | |
| + d.attr("id").indexOf("orphaned_widgets") > -1 && !d.children(".widget").length && d.parents(".orphan-sidebar").slideUp(400, function() { | |
| a(this).remove() | |
| - })) | |
| + }) | |
| } | |
| }).sortable("option", "connectWith", "div.widgets-sortables"), a("#available-widgets").droppable({ | |
| tolerance: "pointer", | |
| diff -ur build-unminified/wp-admin/js/word-count.min.js build-branch-unminified/wp-admin/js/word-count.min.js | |
| --- build-unminified/wp-admin/js/word-count.min.js 2018-10-06 21:45:39.518675817 -0500 | |
| +++ build-branch-unminified/wp-admin/js/word-count.min.js 2018-10-06 21:42:41.729350260 -0500 | |
| @@ -3,7 +3,7 @@ | |
| var b, c; | |
| if (a) | |
| for (b in a) a.hasOwnProperty(b) && (this.settings[b] = a[b]); | |
| - c = this.settings.l10n.shortcodes, c && c.length && (this.settings.shortcodesRegExp = new RegExp("\\[\\/?(?:" + c.join("|") + ")[^\\]]*?\\]", "g")) | |
| + (c = this.settings.l10n.shortcodes) && c.length && (this.settings.shortcodesRegExp = new RegExp("\\[\\/?(?:" + c.join("|") + ")[^\\]]*?\\]", "g")) | |
| } | |
| a.prototype.settings = { | |
| HTMLRegExp: /<\/?[a-z][^>]*?>/gi, | |
| @@ -19,6 +19,6 @@ | |
| l10n: window.wordCountL10n || {} | |
| }, a.prototype.count = function(a, b) { | |
| var c = 0; | |
| - return b = b || this.settings.l10n.type, "characters_excluding_spaces" !== b && "characters_including_spaces" !== b && (b = "words"), a && (a += "\n", a = a.replace(this.settings.HTMLRegExp, "\n"), a = a.replace(this.settings.HTMLcommentRegExp, ""), this.settings.shortcodesRegExp && (a = a.replace(this.settings.shortcodesRegExp, "\n")), a = a.replace(this.settings.spaceRegExp, " "), "words" === b ? (a = a.replace(this.settings.HTMLEntityRegExp, ""), a = a.replace(this.settings.connectorRegExp, " "), a = a.replace(this.settings.removeRegExp, "")) : (a = a.replace(this.settings.HTMLEntityRegExp, "a"), a = a.replace(this.settings.astralRegExp, "a")), a = a.match(this.settings[b + "RegExp"]), a && (c = a.length)), c | |
| + return b = b || this.settings.l10n.type, "characters_excluding_spaces" !== b && "characters_including_spaces" !== b && (b = "words"), a && (a += "\n", a = a.replace(this.settings.HTMLRegExp, "\n"), a = a.replace(this.settings.HTMLcommentRegExp, ""), this.settings.shortcodesRegExp && (a = a.replace(this.settings.shortcodesRegExp, "\n")), a = a.replace(this.settings.spaceRegExp, " "), "words" === b ? (a = a.replace(this.settings.HTMLEntityRegExp, ""), a = a.replace(this.settings.connectorRegExp, " "), a = a.replace(this.settings.removeRegExp, "")) : (a = a.replace(this.settings.HTMLEntityRegExp, "a"), a = a.replace(this.settings.astralRegExp, "a")), (a = a.match(this.settings[b + "RegExp"])) && (c = a.length)), c | |
| }, window.wp = window.wp || {}, window.wp.utils = window.wp.utils || {}, window.wp.utils.WordCounter = a | |
| }(); | |
| \ No newline at end of file | |
| diff -ur build-unminified/wp-admin/js/xfn.min.js build-branch-unminified/wp-admin/js/xfn.min.js | |
| --- build-unminified/wp-admin/js/xfn.min.js 2018-10-06 21:45:43.622706419 -0500 | |
| +++ build-branch-unminified/wp-admin/js/xfn.min.js 2018-10-06 21:42:47.409392605 -0500 | |
| @@ -27,7 +27,7 @@ | |
| var e = window.privacyToolsL10n || {}; | |
| a(".export-personal-data-handle").click(function(f) { | |
| function g(a) { | |
| - b(k, "export-personal-data-success"), "undefined" != typeof a ? window.location = a : p || h(e.noExportFile) | |
| + b(k, "export-personal-data-success"), void 0 !== a ? window.location = a : p || h(e.noExportFile) | |
| } | |
| function h(a) { | |
| @@ -48,7 +48,8 @@ | |
| method: "post" | |
| }).done(function(a) { | |
| var d = a.data; | |
| - return a.success ? void(d.done ? b < o ? setTimeout(i(b + 1, 1)) : g(d.url) : setTimeout(i(b, c + 1))) : void h(a.data) | |
| + if (!a.success) return void h(a.data); | |
| + d.done ? b < o ? setTimeout(i(b + 1, 1)) : g(d.url) : setTimeout(i(b, c + 1)) | |
| }).fail(function(a, b, c) { | |
| h(c) | |
| }) | |
| @@ -63,9 +64,8 @@ | |
| f.preventDefault(), f.stopPropagation(), k.blur(), c(l), b(k, "export-personal-data-processing"), i(1, 1) | |
| }), a(".remove-personal-data-handle").click(function(f) { | |
| function g() { | |
| - var a = e.noDataFound, | |
| - c = "notice-success"; | |
| - b(k, "remove-personal-data-idle"), !1 === p ? !1 === q ? a = e.noDataFound : (a = e.noneRemoved, c = "notice-warning") : !1 === q ? a = e.foundAndRemoved : (a = e.someNotRemoved, c = "notice-warning"), d(l, "notice-success", a, r) | |
| + var a = e.noDataFound; | |
| + b(k, "remove-personal-data-idle"), !1 === p ? !1 === q ? a = e.noDataFound : a = e.noneRemoved : !1 === q ? a = e.foundAndRemoved : a = e.someNotRemoved, d(l, "notice-success", a, r) | |
| } | |
| function h() { | |
| @@ -85,7 +85,8 @@ | |
| method: "post" | |
| }).done(function(a) { | |
| var d = a.data; | |
| - return a.success ? (d.items_removed && (p = p || d.items_removed), d.items_retained && (q = q || d.items_retained), d.messages && (r = r.concat(d.messages)), void(d.done ? b < o ? setTimeout(i(b + 1, 1)) : g() : setTimeout(i(b, c + 1)))) : void h() | |
| + if (!a.success) return void h(); | |
| + d.items_removed && (p = p || d.items_removed), d.items_retained && (q = q || d.items_retained), d.messages && (r = r.concat(d.messages)), d.done ? b < o ? setTimeout(i(b + 1, 1)) : g() : setTimeout(i(b, c + 1)) | |
| }).fail(function() { | |
| h() | |
| }) | |
| diff -ur build-unminified/wp-includes/embed.php build-branch-unminified/wp-includes/embed.php | |
| --- build-unminified/wp-includes/embed.php 2018-10-06 21:45:02.910402853 -0500 | |
| +++ build-branch-unminified/wp-includes/embed.php 2018-10-06 21:42:04.773074755 -0500 | |
| @@ -450,7 +450,7 @@ | |
| * and edit wp-embed.js directly. | |
| */ | |
| $output .=<<<JS | |
| - !function(a,b){"use strict";function c(){if(!e){e=!0;var a,c,d,f,g=-1!==navigator.appVersion.indexOf("MSIE 10"),h=!!navigator.userAgent.match(/Trident.*rv:11\./),i=b.querySelectorAll("iframe.wp-embedded-content");for(c=0;c<i.length;c++){if(d=i[c],!d.getAttribute("data-secret"))f=Math.random().toString(36).substr(2,10),d.src+="#?secret="+f,d.setAttribute("data-secret",f);if(g||h)a=d.cloneNode(!0),a.removeAttribute("security"),d.parentNode.replaceChild(a,d)}}}var d=!1,e=!1;if(b.querySelector)if(a.addEventListener)d=!0;if(a.wp=a.wp||{},!a.wp.receiveEmbedMessage)if(a.wp.receiveEmbedMessage=function(c){var d=c.data;if(d.secret||d.message||d.value)if(!/[^a-zA-Z0-9]/.test(d.secret)){var e,f,g,h,i,j=b.querySelectorAll('iframe[data-secret="'+d.secret+'"]'),k=b.querySelectorAll('blockquote[data-secret="'+d.secret+'"]');for(e=0;e<k.length;e++)k[e].style.display="none";for(e=0;e<j.length;e++)if(f=j[e],c.source===f.contentWindow){if(f.removeAttribute("style"),"height"===d.message){if(g=parseInt(d.value,10),g>1e3)g=1e3;else if(~~g<200)g=200;f.height=g}if("link"===d.message)if(h=b.createElement("a"),i=b.createElement("a"),h.href=f.getAttribute("src"),i.href=d.value,i.host===h.host)if(b.activeElement===f)a.top.location.href=d.value}else;}},d)a.addEventListener("message",a.wp.receiveEmbedMessage,!1),b.addEventListener("DOMContentLoaded",c,!1),a.addEventListener("load",c,!1)}(window,document); | |
| + !function(a,b){"use strict";function c(){if(!e){e=!0;var a,c,d,f,g=-1!==navigator.appVersion.indexOf("MSIE 10"),h=!!navigator.userAgent.match(/Trident.*rv:11\./),i=b.querySelectorAll("iframe.wp-embedded-content");for(c=0;c<i.length;c++){if(d=i[c],!d.getAttribute("data-secret"))f=Math.random().toString(36).substr(2,10),d.src+="#?secret="+f,d.setAttribute("data-secret",f);if(g||h)a=d.cloneNode(!0),a.removeAttribute("security"),d.parentNode.replaceChild(a,d)}}}var d=!1,e=!1;if(b.querySelector)if(a.addEventListener)d=!0;if(a.wp=a.wp||{},!a.wp.receiveEmbedMessage)if(a.wp.receiveEmbedMessage=function(c){var d=c.data;if(d.secret||d.message||d.value)if(!/[^a-zA-Z0-9]/.test(d.secret)){var e,f,g,h,i,j=b.querySelectorAll('iframe[data-secret="'+d.secret+'"]'),k=b.querySelectorAll('blockquote[data-secret="'+d.secret+'"]');for(e=0;e<k.length;e++)k[e].style.display="none";for(e=0;e<j.length;e++)if(f=j[e],c.source===f.contentWindow){if(f.removeAttribute("style"),"height"===d.message){if((g=parseInt(d.value,10))>1e3)g=1e3;else if(~~g<200)g=200;f.height=g}if("link"===d.message)if(h=b.createElement("a"),i=b.createElement("a"),h.href=f.getAttribute("src"),i.href=d.value,i.host===h.host)if(b.activeElement===f)a.top.location.href=d.value}}},d)a.addEventListener("message",a.wp.receiveEmbedMessage,!1),b.addEventListener("DOMContentLoaded",c,!1),a.addEventListener("load",c,!1)}(window,document); | |
| JS; | |
| } | |
| $output .= "\n//--><!]]>"; | |
| @@ -918,7 +918,7 @@ | |
| * and edit wp-embed-template.js directly. | |
| */ | |
| ?> | |
| - !function(a,b){"use strict";function c(b,c){a.parent.postMessage({message:b,value:c,secret:g},"*")}function d(){function d(){l.className=l.className.replace("hidden",""),b.querySelector('.wp-embed-share-tab-button [aria-selected="true"]').focus()}function e(){l.className+=" hidden",b.querySelector(".wp-embed-share-dialog-open").focus()}function f(a){var c=b.querySelector('.wp-embed-share-tab-button [aria-selected="true"]');c.setAttribute("aria-selected","false"),b.querySelector("#"+c.getAttribute("aria-controls")).setAttribute("aria-hidden","true"),a.target.setAttribute("aria-selected","true"),b.querySelector("#"+a.target.getAttribute("aria-controls")).setAttribute("aria-hidden","false")}function g(a){var c,d,e=a.target,f=e.parentElement.previousElementSibling,g=e.parentElement.nextElementSibling;if(37===a.keyCode)c=f;else{if(39!==a.keyCode)return!1;c=g}"rtl"===b.documentElement.getAttribute("dir")&&(c=c===f?g:f),c&&(d=c.firstElementChild,e.setAttribute("tabindex","-1"),e.setAttribute("aria-selected",!1),b.querySelector("#"+e.getAttribute("aria-controls")).setAttribute("aria-hidden","true"),d.setAttribute("tabindex","0"),d.setAttribute("aria-selected","true"),d.focus(),b.querySelector("#"+d.getAttribute("aria-controls")).setAttribute("aria-hidden","false"))}function h(a){var c=b.querySelector('.wp-embed-share-tab-button [aria-selected="true"]');n!==a.target||a.shiftKey?c===a.target&&a.shiftKey&&(n.focus(),a.preventDefault()):(c.focus(),a.preventDefault())}function i(a){var b,d=a.target;b=d.hasAttribute("href")?d.getAttribute("href"):d.parentElement.getAttribute("href"),b&&(c("link",b),a.preventDefault())}if(!k){k=!0;var j,l=b.querySelector(".wp-embed-share-dialog"),m=b.querySelector(".wp-embed-share-dialog-open"),n=b.querySelector(".wp-embed-share-dialog-close"),o=b.querySelectorAll(".wp-embed-share-input"),p=b.querySelectorAll(".wp-embed-share-tab-button button"),q=b.querySelector(".wp-embed-featured-image img");if(o)for(j=0;j<o.length;j++)o[j].addEventListener("click",function(a){a.target.select()});if(m&&m.addEventListener("click",function(){d()}),n&&n.addEventListener("click",function(){e()}),p)for(j=0;j<p.length;j++)p[j].addEventListener("click",f),p[j].addEventListener("keydown",g);b.addEventListener("keydown",function(a){27===a.keyCode&&-1===l.className.indexOf("hidden")?e():9===a.keyCode&&h(a)},!1),a.self!==a.top&&(c("height",Math.ceil(b.body.getBoundingClientRect().height)),q&&q.addEventListener("load",function(){c("height",Math.ceil(b.body.getBoundingClientRect().height))}),b.addEventListener("click",i))}}function e(){a.self!==a.top&&(clearTimeout(i),i=setTimeout(function(){c("height",Math.ceil(b.body.getBoundingClientRect().height))},100))}function f(){a.self===a.top||g||(g=a.location.hash.replace(/.*secret=([\d\w]{10}).*/,"$1"),clearTimeout(h),h=setTimeout(function(){f()},100))}var g,h,i,j=b.querySelector&&a.addEventListener,k=!1;j&&(f(),b.documentElement.className=b.documentElement.className.replace(/\bno-js\b/,"")+" js",b.addEventListener("DOMContentLoaded",d,!1),a.addEventListener("load",d,!1),a.addEventListener("resize",e,!1))}(window,document); | |
| + !function(a,b){"use strict";function c(b,c){a.parent.postMessage({message:b,value:c,secret:g},"*")}function d(){function d(){l.className=l.className.replace("hidden",""),b.querySelector('.wp-embed-share-tab-button [aria-selected="true"]').focus()}function e(){l.className+=" hidden",b.querySelector(".wp-embed-share-dialog-open").focus()}function f(a){var c=b.querySelector('.wp-embed-share-tab-button [aria-selected="true"]');c.setAttribute("aria-selected","false"),b.querySelector("#"+c.getAttribute("aria-controls")).setAttribute("aria-hidden","true"),a.target.setAttribute("aria-selected","true"),b.querySelector("#"+a.target.getAttribute("aria-controls")).setAttribute("aria-hidden","false")}function g(a){var c,d,e=a.target,f=e.parentElement.previousElementSibling,g=e.parentElement.nextElementSibling;if(37===a.keyCode)c=f;else{if(39!==a.keyCode)return!1;c=g}"rtl"===b.documentElement.getAttribute("dir")&&(c=c===f?g:f),c&&(d=c.firstElementChild,e.setAttribute("tabindex","-1"),e.setAttribute("aria-selected",!1),b.querySelector("#"+e.getAttribute("aria-controls")).setAttribute("aria-hidden","true"),d.setAttribute("tabindex","0"),d.setAttribute("aria-selected","true"),d.focus(),b.querySelector("#"+d.getAttribute("aria-controls")).setAttribute("aria-hidden","false"))}function h(a){var c=b.querySelector('.wp-embed-share-tab-button [aria-selected="true"]');n!==a.target||a.shiftKey?c===a.target&&a.shiftKey&&(n.focus(),a.preventDefault()):(c.focus(),a.preventDefault())}function i(a){var b,d=a.target;(b=d.hasAttribute("href")?d.getAttribute("href"):d.parentElement.getAttribute("href"))&&(c("link",b),a.preventDefault())}if(!k){k=!0;var j,l=b.querySelector(".wp-embed-share-dialog"),m=b.querySelector(".wp-embed-share-dialog-open"),n=b.querySelector(".wp-embed-share-dialog-close"),o=b.querySelectorAll(".wp-embed-share-input"),p=b.querySelectorAll(".wp-embed-share-tab-button button"),q=b.querySelector(".wp-embed-featured-image img");if(o)for(j=0;j<o.length;j++)o[j].addEventListener("click",function(a){a.target.select()});if(m&&m.addEventListener("click",function(){d()}),n&&n.addEventListener("click",function(){e()}),p)for(j=0;j<p.length;j++)p[j].addEventListener("click",f),p[j].addEventListener("keydown",g);b.addEventListener("keydown",function(a){27===a.keyCode&&-1===l.className.indexOf("hidden")?e():9===a.keyCode&&h(a)},!1),a.self!==a.top&&(c("height",Math.ceil(b.body.getBoundingClientRect().height)),q&&q.addEventListener("load",function(){c("height",Math.ceil(b.body.getBoundingClientRect().height))}),b.addEventListener("click",i))}}function e(){a.self!==a.top&&(clearTimeout(i),i=setTimeout(function(){c("height",Math.ceil(b.body.getBoundingClientRect().height))},100))}function f(){a.self===a.top||g||(g=a.location.hash.replace(/.*secret=([\d\w]{10}).*/,"$1"),clearTimeout(h),h=setTimeout(function(){f()},100))}var g,h,i,j=b.querySelector&&a.addEventListener,k=!1;j&&(f(),b.documentElement.className=b.documentElement.className.replace(/\bno-js\b/,"")+" js",b.addEventListener("DOMContentLoaded",d,!1),a.addEventListener("load",d,!1),a.addEventListener("resize",e,!1))}(window,document); | |
| <?php | |
| } | |
| ?> | |
| diff -ur build-unminified/wp-includes/formatting.php build-branch-unminified/wp-includes/formatting.php | |
| --- build-unminified/wp-includes/formatting.php 2018-10-06 21:45:02.906402824 -0500 | |
| +++ build-branch-unminified/wp-includes/formatting.php 2018-10-06 21:42:04.773074755 -0500 | |
| @@ -5098,7 +5098,7 @@ | |
| ?> | |
| <script type="text/javascript"> | |
| window._wpemojiSettings = <?php echo wp_json_encode( $settings ); ?>; | |
| - !function(a,b,c){function d(a,b){var c=String.fromCharCode;l.clearRect(0,0,k.width,k.height),l.fillText(c.apply(this,a),0,0);var d=k.toDataURL();l.clearRect(0,0,k.width,k.height),l.fillText(c.apply(this,b),0,0);var e=k.toDataURL();return d===e}function e(a){var b;if(!l||!l.fillText)return!1;switch(l.textBaseline="top",l.font="600 32px Arial",a){case"flag":return!(b=d([55356,56826,55356,56819],[55356,56826,8203,55356,56819]))&&(b=d([55356,57332,56128,56423,56128,56418,56128,56421,56128,56430,56128,56423,56128,56447],[55356,57332,8203,56128,56423,8203,56128,56418,8203,56128,56421,8203,56128,56430,8203,56128,56423,8203,56128,56447]),!b);case"emoji":return b=d([55358,56760,9792,65039],[55358,56760,8203,9792,65039]),!b}return!1}function f(a){var c=b.createElement("script");c.src=a,c.defer=c.type="text/javascript",b.getElementsByTagName("head")[0].appendChild(c)}var g,h,i,j,k=b.createElement("canvas"),l=k.getContext&&k.getContext("2d");for(j=Array("flag","emoji"),c.supports={everything:!0,everythingExceptFlag:!0},i=0;i<j.length;i++)c.supports[j[i]]=e(j[i]),c.supports.everything=c.supports.everything&&c.supports[j[i]],"flag"!==j[i]&&(c.supports.everythingExceptFlag=c.supports.everythingExceptFlag&&c.supports[j[i]]);c.supports.everythingExceptFlag=c.supports.everythingExceptFlag&&!c.supports.flag,c.DOMReady=!1,c.readyCallback=function(){c.DOMReady=!0},c.supports.everything||(h=function(){c.readyCallback()},b.addEventListener?(b.addEventListener("DOMContentLoaded",h,!1),a.addEventListener("load",h,!1)):(a.attachEvent("onload",h),b.attachEvent("onreadystatechange",function(){"complete"===b.readyState&&c.readyCallback()})),g=c.source||{},g.concatemoji?f(g.concatemoji):g.wpemoji&&g.twemoji&&(f(g.twemoji),f(g.wpemoji)))}(window,document,window._wpemojiSettings); | |
| + !function(a,b,c){function d(a,b){var c=String.fromCharCode;k.clearRect(0,0,j.width,j.height),k.fillText(c.apply(this,a),0,0);var d=j.toDataURL();return k.clearRect(0,0,j.width,j.height),k.fillText(c.apply(this,b),0,0),d===j.toDataURL()}function e(a){var c=b.createElement("script");c.src=a,c.defer=c.type="text/javascript",b.getElementsByTagName("head")[0].appendChild(c)}var f,g,h,i,j=b.createElement("canvas"),k=j.getContext&&j.getContext("2d");for(i=Array("flag","emoji"),c.supports={everything:!0,everythingExceptFlag:!0},h=0;h<i.length;h++)c.supports[i[h]]=function(a){if(!k||!k.fillText)return!1;switch(k.textBaseline="top",k.font="600 32px Arial",a){case"flag":return!d([55356,56826,55356,56819],[55356,56826,8203,55356,56819])&&!d([55356,57332,56128,56423,56128,56418,56128,56421,56128,56430,56128,56423,56128,56447],[55356,57332,8203,56128,56423,8203,56128,56418,8203,56128,56421,8203,56128,56430,8203,56128,56423,8203,56128,56447]);case"emoji":return!d([55358,56760,9792,65039],[55358,56760,8203,9792,65039])}return!1}(i[h]),c.supports.everything=c.supports.everything&&c.supports[i[h]],"flag"!==i[h]&&(c.supports.everythingExceptFlag=c.supports.everythingExceptFlag&&c.supports[i[h]]);c.supports.everythingExceptFlag=c.supports.everythingExceptFlag&&!c.supports.flag,c.DOMReady=!1,c.readyCallback=function(){c.DOMReady=!0},c.supports.everything||(g=function(){c.readyCallback()},b.addEventListener?(b.addEventListener("DOMContentLoaded",g,!1),a.addEventListener("load",g,!1)):(a.attachEvent("onload",g),b.attachEvent("onreadystatechange",function(){"complete"===b.readyState&&c.readyCallback()})),f=c.source||{},f.concatemoji?e(f.concatemoji):f.wpemoji&&f.twemoji&&(e(f.twemoji),e(f.wpemoji)))}(window,document,window._wpemojiSettings); | |
| </script> | |
| <?php | |
| } | |
| diff -ur build-unminified/wp-includes/js/admin-bar.min.js build-branch-unminified/wp-includes/js/admin-bar.min.js | |
| --- build-unminified/wp-includes/js/admin-bar.min.js 2018-10-06 21:45:18.118516249 -0500 | |
| +++ build-branch-unminified/wp-includes/js/admin-bar.min.js 2018-10-06 21:42:18.801179332 -0500 | |
| @@ -1,4 +1,4 @@ | |
| -"undefined" != typeof jQuery ? ("undefined" == typeof jQuery.fn.hoverIntent && ! function(a) { | |
| +"undefined" != typeof jQuery ? ("undefined" == typeof jQuery.fn.hoverIntent && function(a) { | |
| a.fn.hoverIntent = function(b, c, d) { | |
| var e = { | |
| interval: 100, | |
| @@ -90,7 +90,7 @@ | |
| }, "fast"), b.preventDefault()) | |
| }), a(".screen-reader-shortcut").keydown(function(b) { | |
| var c, d; | |
| - 13 == b.which && (c = a(this).attr("href"), d = navigator.userAgent.toLowerCase(), d.indexOf("applewebkit") != -1 && c && "#" == c.charAt(0) && setTimeout(function() { | |
| + 13 == b.which && (c = a(this).attr("href"), d = navigator.userAgent.toLowerCase(), -1 != d.indexOf("applewebkit") && c && "#" == c.charAt(0) && setTimeout(function() { | |
| a(c).focus() | |
| }, 100)) | |
| }), a("#adminbar-search").on({ | |
| @@ -102,10 +102,10 @@ | |
| } | |
| }), "sessionStorage" in window && a("#wp-admin-bar-logout a").click(function() { | |
| try { | |
| - for (var a in sessionStorage) a.indexOf("wp-autosave-") != -1 && sessionStorage.removeItem(a) | |
| + for (var a in sessionStorage) - 1 != a.indexOf("wp-autosave-") && sessionStorage.removeItem(a) | |
| } catch (b) {} | |
| - }), navigator.userAgent && document.body.className.indexOf("no-font-face") === -1 && /Android (1.0|1.1|1.5|1.6|2.0|2.1)|Nokia|Opera Mini|w(eb)?OSBrowser|webOS|UCWEB|Windows Phone OS 7|XBLWP7|ZuneWP7|MSIE 7/.test(navigator.userAgent) && (document.body.className += " no-font-face") | |
| -})) : ! function(a, b) { | |
| + }), navigator.userAgent && -1 === document.body.className.indexOf("no-font-face") && /Android (1.0|1.1|1.5|1.6|2.0|2.1)|Nokia|Opera Mini|w(eb)?OSBrowser|webOS|UCWEB|Windows Phone OS 7|XBLWP7|ZuneWP7|MSIE 7/.test(navigator.userAgent) && (document.body.className += " no-font-face") | |
| +})) : function(a, b) { | |
| var c, d = function(a, b, c) { | |
| a.addEventListener ? a.addEventListener(b, c, !1) : a.attachEvent && a.attachEvent("on" + b, function() { | |
| return c.call(a, window.event) | |
| @@ -121,15 +121,15 @@ | |
| }, | |
| i = function(b) { | |
| for (var d, i, j, k, l, m, n = [], o = 0; b && b != c && b != a;) "LI" == b.nodeName.toUpperCase() && (n[n.length] = b, i = h(b), i && clearTimeout(i), b.className = b.className ? b.className.replace(e, "") + " hover" : "hover", k = b), b = b.parentNode; | |
| - if (k && k.parentNode && (l = k.parentNode, l && "UL" == l.nodeName.toUpperCase())) | |
| - for (d = l.childNodes.length; d--;) m = l.childNodes[d], m != k && (m.className = m.className ? m.className.replace(g, "") : ""); | |
| + if (k && k.parentNode && (l = k.parentNode) && "UL" == l.nodeName.toUpperCase()) | |
| + for (d = l.childNodes.length; d--;)(m = l.childNodes[d]) != k && (m.className = m.className ? m.className.replace(g, "") : ""); | |
| for (d = f.length; d--;) { | |
| for (j = !1, o = n.length; o--;) n[o] == f[d][1] && (j = !0); | |
| j || (f[d][1].className = f[d][1].className ? f[d][1].className.replace(e, "") : "") | |
| } | |
| }, | |
| j = function(b) { | |
| - for (; b && b != c && b != a;) "LI" == b.nodeName.toUpperCase() && ! function(a) { | |
| + for (; b && b != c && b != a;) "LI" == b.nodeName.toUpperCase() && function(a) { | |
| var b = setTimeout(function() { | |
| a.className = a.className ? a.className.replace(e, "") : "" | |
| }, 500); | |
| @@ -152,7 +152,7 @@ | |
| }, | |
| l = function(a) { | |
| var b, c, d, e, f, g; | |
| - if (!("wpadminbar" != a.id && "wp-admin-bar-top-secondary" != a.id || (b = window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop || 0, b < 1))) | |
| + if (!("wpadminbar" != a.id && "wp-admin-bar-top-secondary" != a.id || (b = window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop || 0) < 1)) | |
| for (g = b > 800 ? 130 : 100, c = Math.min(12, Math.round(b / g)), d = b > 800 ? Math.round(b / 30) : Math.round(b / 20), e = [], f = 0; b;) b -= d, b < 0 && (b = 0), e.push(b), setTimeout(function() { | |
| window.scrollTo(0, e.shift()) | |
| }, f * c), f++ | |
| @@ -166,8 +166,8 @@ | |
| l(a.target || a.srcElement) | |
| }), d(document.getElementById("wp-admin-bar-logout"), "click", function() { | |
| if ("sessionStorage" in window) try { | |
| - for (var a in sessionStorage) a.indexOf("wp-autosave-") != -1 && sessionStorage.removeItem(a) | |
| + for (var a in sessionStorage) - 1 != a.indexOf("wp-autosave-") && sessionStorage.removeItem(a) | |
| } catch (b) {} | |
| - })), b.location.hash && b.scrollBy(0, -32), navigator.userAgent && document.body.className.indexOf("no-font-face") === -1 && /Android (1.0|1.1|1.5|1.6|2.0|2.1)|Nokia|Opera Mini|w(eb)?OSBrowser|webOS|UCWEB|Windows Phone OS 7|XBLWP7|ZuneWP7|MSIE 7/.test(navigator.userAgent) && (document.body.className += " no-font-face") | |
| + })), b.location.hash && b.scrollBy(0, -32), navigator.userAgent && -1 === document.body.className.indexOf("no-font-face") && /Android (1.0|1.1|1.5|1.6|2.0|2.1)|Nokia|Opera Mini|w(eb)?OSBrowser|webOS|UCWEB|Windows Phone OS 7|XBLWP7|ZuneWP7|MSIE 7/.test(navigator.userAgent) && (document.body.className += " no-font-face") | |
| }) | |
| }(document, window); | |
| \ No newline at end of file | |
| diff -ur build-unminified/wp-includes/js/autosave.min.js build-branch-unminified/wp-includes/js/autosave.min.js | |
| --- build-unminified/wp-includes/js/autosave.min.js 2018-10-06 21:45:18.954522482 -0500 | |
| +++ build-branch-unminified/wp-includes/js/autosave.min.js 2018-10-06 21:42:19.621185444 -0500 | |
| @@ -2,12 +2,12 @@ | |
| return !0 | |
| }, | |
| function(a, b) { | |
| - function c() { | |
| + b.wp = b.wp || {}, b.wp.autosave = function() { | |
| function c(b) { | |
| var c, d, e, f = (new Date).getTime(), | |
| h = [], | |
| - i = g(); | |
| - return i && i.isDirty() && !i.isHidden() && f - 3e3 > k && (i.save(), k = f), e = { | |
| + j = g(); | |
| + return j && j.isDirty() && !j.isHidden() && f - 3e3 > i && (j.save(), i = f), e = { | |
| post_id: a("#post_ID").val() || 0, | |
| post_type: a("#post_type").val() || "", | |
| post_author: a("#post_author").val() || "", | |
| @@ -24,202 +24,197 @@ | |
| } | |
| function e() { | |
| - l.trigger("autosave-disable-buttons"), setTimeout(f, 5e3) | |
| + j.trigger("autosave-disable-buttons"), setTimeout(f, 5e3) | |
| } | |
| function f() { | |
| - l.trigger("autosave-enable-buttons") | |
| + j.trigger("autosave-enable-buttons") | |
| } | |
| function g() { | |
| return "undefined" != typeof tinymce && tinymce.get("content") | |
| } | |
| - | |
| - function h() { | |
| - function e() { | |
| - var a = Math.random().toString(), | |
| - c = !1; | |
| - try { | |
| - b.sessionStorage.setItem("wp-test", a), c = b.sessionStorage.getItem("wp-test") === a, b.sessionStorage.removeItem("wp-test") | |
| - } catch (d) {} | |
| - return v = c, c | |
| - } | |
| - | |
| - function f() { | |
| - var a = !1; | |
| - return v && t && (a = sessionStorage.getItem("wp-autosave-" + t), a = a ? JSON.parse(a) : {}), a | |
| - } | |
| - | |
| - function h(a) { | |
| - var b; | |
| - return !(!v || !t) && (b = "wp-autosave-" + t, sessionStorage.setItem(b, JSON.stringify(a)), null !== sessionStorage.getItem(b)) | |
| - } | |
| - | |
| - function i() { | |
| - var a = f(); | |
| - return !(!a || !u) && (a["post_" + u] || !1) | |
| - } | |
| - | |
| - function k(a) { | |
| - var b = f(); | |
| - if (!b || !u) return !1; | |
| - if (a) b["post_" + u] = a; | |
| - else { | |
| - if (!b.hasOwnProperty("post_" + u)) return !1; | |
| - delete b["post_" + u] | |
| - } | |
| - return h(b) | |
| - } | |
| - | |
| - function m() { | |
| - y = !0 | |
| - } | |
| - | |
| - function n() { | |
| - y = !1 | |
| - } | |
| - | |
| - function o(b) { | |
| - var e, f, g = !1; | |
| - return !(y || !v) && (b ? (e = i() || {}, a.extend(e, b)) : e = c("local"), f = d(e), "undefined" == typeof x && (x = j), f !== x && (e.save_time = (new Date).getTime(), e.status = a("#post_status").val() || "", g = k(e), g && (x = f), g)) | |
| - } | |
| - | |
| - function p() { | |
| - u = a("#post_ID").val() || 0, a("#wp-content-wrap").hasClass("tmce-active") ? l.on("tinymce-editor-init.autosave", function() { | |
| - b.setTimeout(function() { | |
| - r() | |
| - }, 1500) | |
| - }) : r(), w = b.setInterval(o, 15e3), a("form#post").on("submit.autosave-local", function() { | |
| - var c = g(), | |
| - d = a("#post_ID").val() || 0; | |
| - c && !c.isHidden() ? c.on("submit", function() { | |
| - o({ | |
| - post_title: a("#title").val() || "", | |
| - content: a("#content").val() || "", | |
| - excerpt: a("#excerpt").val() || "" | |
| - }) | |
| - }) : o({ | |
| - post_title: a("#title").val() || "", | |
| - content: a("#content").val() || "", | |
| - excerpt: a("#excerpt").val() || "" | |
| - }); | |
| - var e = "https:" === b.location.protocol; | |
| - wpCookies.set("wp-saving-post", d + "-check", 86400, !1, !1, e) | |
| - }) | |
| - } | |
| - | |
| - function q(a, b) { | |
| - function c(a) { | |
| - return a.toString().replace(/[\x20\t\r\n\f]+/g, "") | |
| - } | |
| - return c(a || "") === c(b || "") | |
| - } | |
| - | |
| - function r() { | |
| - var b, c, d, e, f = i(), | |
| - g = wpCookies.get("wp-saving-post"), | |
| - h = a("#has-newer-autosave").parent(".notice"), | |
| - j = a(".wp-header-end"); | |
| - return g === u + "-saved" ? (wpCookies.remove("wp-saving-post"), void k(!1)) : void(f && (b = a("#content").val() || "", c = a("#title").val() || "", d = a("#excerpt").val() || "", q(b, f.content) && q(c, f.post_title) && q(d, f.excerpt) || (j.length || (j = a(".wrap h1, .wrap h2").first()), e = a("#local-storage-notice").insertAfter(j).addClass("notice-warning"), h.length ? h.slideUp(150, function() { | |
| - e.slideDown(150) | |
| - }) : e.slideDown(200), e.find(".restore-backup").on("click.autosave-local", function() { | |
| - s(f), e.fadeTo(250, 0, function() { | |
| - e.slideUp(150) | |
| - }) | |
| - })))) | |
| - } | |
| - | |
| - function s(b) { | |
| - var c; | |
| - return !!b && (x = d(b), a("#title").val() !== b.post_title && a("#title").focus().val(b.post_title || ""), a("#excerpt").val(b.excerpt || ""), c = g(), c && !c.isHidden() && "undefined" != typeof switchEditors ? (c.settings.wpautop && b.content && (b.content = switchEditors.wpautop(b.content)), c.undoManager.transact(function() { | |
| - c.setContent(b.content || ""), c.nodeChanged() | |
| - })) : (a("#content-html").click(), a("#content").focus(), document.execCommand("selectAll"), document.execCommand("insertText", !1, b.content || "")), !0) | |
| - } | |
| - var t, u, v, w, x, y = !1; | |
| - return t = "undefined" != typeof b.autosaveL10n && b.autosaveL10n.blog_id, e() && t && (a("#content").length || a("#excerpt").length) && l.ready(p), { | |
| - hasStorage: v, | |
| - getSavedPostData: i, | |
| - save: o, | |
| - suspend: m, | |
| - resume: n | |
| - } | |
| - } | |
| - | |
| - function i() { | |
| - function g() { | |
| - q = !0, b.clearTimeout(r), r = b.setTimeout(function() { | |
| - q = !1 | |
| - }, 1e4) | |
| - } | |
| - | |
| - function h() { | |
| - v = !0 | |
| - } | |
| - | |
| - function i() { | |
| - v = !1 | |
| - } | |
| - | |
| - function k(b) { | |
| - p(), q = !1, t = s, s = "", l.trigger("after-autosave", [b]), f(), b.success && a("#auto_draft").val("") | |
| - } | |
| - | |
| - function m() { | |
| - u = 0, wp.heartbeat.connectNow() | |
| - } | |
| - | |
| - function n() { | |
| - return d() !== j | |
| - } | |
| - | |
| - function o() { | |
| - var f, h; | |
| - return !(v || q || !b.autosave()) && (!((new Date).getTime() < u) && (f = c(), h = d(f), "undefined" == typeof t && (t = j), h !== t && (s = h, g(), e(), l.trigger("wpcountwords", [f.content]).trigger("before-autosave", [f]), f._wpnonce = a("#_wpnonce").val() || "", f))) | |
| - } | |
| - | |
| - function p() { | |
| - u = (new Date).getTime() + 1e3 * autosaveL10n.autosaveInterval || 6e4 | |
| - } | |
| - var q, r, s, t, u = 0, | |
| - v = !1; | |
| - return l.on("heartbeat-send.autosave", function(a, b) { | |
| - var c = o(); | |
| - c && (b.wp_autosave = c) | |
| - }).on("heartbeat-tick.autosave", function(a, b) { | |
| - b.wp_autosave && k(b.wp_autosave) | |
| - }).on("heartbeat-connection-lost.autosave", function(b, c, d) { | |
| - if ("timeout" === c || 603 === d) { | |
| - var f = a("#lost-connection-notice"); | |
| - wp.autosave.local.hasStorage || f.find(".hide-if-no-sessionstorage").hide(), f.show(), e() | |
| - } | |
| - }).on("heartbeat-connection-restored.autosave", function() { | |
| - a("#lost-connection-notice").hide(), f() | |
| - }).ready(function() { | |
| - p() | |
| - }), { | |
| - tempBlockSave: g, | |
| - triggerSave: m, | |
| - postChanged: n, | |
| - suspend: h, | |
| - resume: i | |
| - } | |
| - } | |
| - var j, k = 0, | |
| - l = a(document); | |
| - return l.on("tinymce-editor-init.autosave", function(a, c) { | |
| + var h, i = 0, | |
| + j = a(document); | |
| + return j.on("tinymce-editor-init.autosave", function(a, c) { | |
| "content" === c.id && b.setTimeout(function() { | |
| - c.save(), j = d() | |
| + c.save(), h = d() | |
| }, 1e3) | |
| }).ready(function() { | |
| - j = d() | |
| + h = d() | |
| }), { | |
| getPostData: c, | |
| getCompareString: d, | |
| disableButtons: e, | |
| enableButtons: f, | |
| - local: h(), | |
| - server: i() | |
| + local: function() { | |
| + function e() { | |
| + var a = !1; | |
| + return u && s && (a = sessionStorage.getItem("wp-autosave-" + s), a = a ? JSON.parse(a) : {}), a | |
| + } | |
| + | |
| + function f(a) { | |
| + var b; | |
| + return !(!u || !s) && (b = "wp-autosave-" + s, sessionStorage.setItem(b, JSON.stringify(a)), null !== sessionStorage.getItem(b)) | |
| + } | |
| + | |
| + function i() { | |
| + var a = e(); | |
| + return !(!a || !t) && (a["post_" + t] || !1) | |
| + } | |
| + | |
| + function k(a) { | |
| + var b = e(); | |
| + if (!b || !t) return !1; | |
| + if (a) b["post_" + t] = a; | |
| + else { | |
| + if (!b.hasOwnProperty("post_" + t)) return !1; | |
| + delete b["post_" + t] | |
| + } | |
| + return f(b) | |
| + } | |
| + | |
| + function l() { | |
| + x = !0 | |
| + } | |
| + | |
| + function m() { | |
| + x = !1 | |
| + } | |
| + | |
| + function n(b) { | |
| + var e, f, g = !1; | |
| + return !(x || !u) && (b ? (e = i() || {}, a.extend(e, b)) : e = c("local"), f = d(e), void 0 === w && (w = h), f !== w && (e.save_time = (new Date).getTime(), e.status = a("#post_status").val() || "", g = k(e), g && (w = f), g)) | |
| + } | |
| + | |
| + function o() { | |
| + t = a("#post_ID").val() || 0, a("#wp-content-wrap").hasClass("tmce-active") ? j.on("tinymce-editor-init.autosave", function() { | |
| + b.setTimeout(function() { | |
| + q() | |
| + }, 1500) | |
| + }) : q(), v = b.setInterval(n, 15e3), a("form#post").on("submit.autosave-local", function() { | |
| + var c = g(), | |
| + d = a("#post_ID").val() || 0; | |
| + c && !c.isHidden() ? c.on("submit", function() { | |
| + n({ | |
| + post_title: a("#title").val() || "", | |
| + content: a("#content").val() || "", | |
| + excerpt: a("#excerpt").val() || "" | |
| + }) | |
| + }) : n({ | |
| + post_title: a("#title").val() || "", | |
| + content: a("#content").val() || "", | |
| + excerpt: a("#excerpt").val() || "" | |
| + }); | |
| + var e = "https:" === b.location.protocol; | |
| + wpCookies.set("wp-saving-post", d + "-check", 86400, !1, !1, e) | |
| + }) | |
| + } | |
| + | |
| + function p(a, b) { | |
| + function c(a) { | |
| + return a.toString().replace(/[\x20\t\r\n\f]+/g, "") | |
| + } | |
| + return c(a || "") === c(b || "") | |
| + } | |
| + | |
| + function q() { | |
| + var b, c, d, e, f = i(), | |
| + g = wpCookies.get("wp-saving-post"), | |
| + h = a("#has-newer-autosave").parent(".notice"), | |
| + j = a(".wp-header-end"); | |
| + if (g === t + "-saved") return wpCookies.remove("wp-saving-post"), void k(!1); | |
| + f && (b = a("#content").val() || "", c = a("#title").val() || "", d = a("#excerpt").val() || "", p(b, f.content) && p(c, f.post_title) && p(d, f.excerpt) || (j.length || (j = a(".wrap h1, .wrap h2").first()), e = a("#local-storage-notice").insertAfter(j).addClass("notice-warning"), h.length ? h.slideUp(150, function() { | |
| + e.slideDown(150) | |
| + }) : e.slideDown(200), e.find(".restore-backup").on("click.autosave-local", function() { | |
| + r(f), e.fadeTo(250, 0, function() { | |
| + e.slideUp(150) | |
| + }) | |
| + }))) | |
| + } | |
| + | |
| + function r(b) { | |
| + var c; | |
| + return !!b && (w = d(b), a("#title").val() !== b.post_title && a("#title").focus().val(b.post_title || ""), a("#excerpt").val(b.excerpt || ""), c = g(), c && !c.isHidden() && "undefined" != typeof switchEditors ? (c.settings.wpautop && b.content && (b.content = switchEditors.wpautop(b.content)), c.undoManager.transact(function() { | |
| + c.setContent(b.content || ""), c.nodeChanged() | |
| + })) : (a("#content-html").click(), a("#content").focus(), document.execCommand("selectAll"), document.execCommand("insertText", !1, b.content || "")), !0) | |
| + } | |
| + var s, t, u, v, w, x = !1; | |
| + return s = "undefined" != typeof b.autosaveL10n && b.autosaveL10n.blog_id, | |
| + function() { | |
| + var a = Math.random().toString(), | |
| + c = !1; | |
| + try { | |
| + b.sessionStorage.setItem("wp-test", a), c = b.sessionStorage.getItem("wp-test") === a, b.sessionStorage.removeItem("wp-test") | |
| + } catch (d) {} | |
| + return u = c, c | |
| + }() && s && (a("#content").length || a("#excerpt").length) && j.ready(o), { | |
| + hasStorage: u, | |
| + getSavedPostData: i, | |
| + save: n, | |
| + suspend: l, | |
| + resume: m | |
| + } | |
| + }(), | |
| + server: function() { | |
| + function g() { | |
| + q = !0, b.clearTimeout(r), r = b.setTimeout(function() { | |
| + q = !1 | |
| + }, 1e4) | |
| + } | |
| + | |
| + function i() { | |
| + v = !0 | |
| + } | |
| + | |
| + function k() { | |
| + v = !1 | |
| + } | |
| + | |
| + function l(b) { | |
| + p(), q = !1, t = s, s = "", j.trigger("after-autosave", [b]), f(), b.success && a("#auto_draft").val("") | |
| + } | |
| + | |
| + function m() { | |
| + u = 0, wp.heartbeat.connectNow() | |
| + } | |
| + | |
| + function n() { | |
| + return d() !== h | |
| + } | |
| + | |
| + function o() { | |
| + var f, i; | |
| + return !(v || q || !b.autosave()) && (!((new Date).getTime() < u) && (f = c(), i = d(f), void 0 === t && (t = h), i !== t && (s = i, g(), e(), j.trigger("wpcountwords", [f.content]).trigger("before-autosave", [f]), f._wpnonce = a("#_wpnonce").val() || "", f))) | |
| + } | |
| + | |
| + function p() { | |
| + u = (new Date).getTime() + 1e3 * autosaveL10n.autosaveInterval || 6e4 | |
| + } | |
| + var q, r, s, t, u = 0, | |
| + v = !1; | |
| + return j.on("heartbeat-send.autosave", function(a, b) { | |
| + var c = o(); | |
| + c && (b.wp_autosave = c) | |
| + }).on("heartbeat-tick.autosave", function(a, b) { | |
| + b.wp_autosave && l(b.wp_autosave) | |
| + }).on("heartbeat-connection-lost.autosave", function(b, c, d) { | |
| + if ("timeout" === c || 603 === d) { | |
| + var f = a("#lost-connection-notice"); | |
| + wp.autosave.local.hasStorage || f.find(".hide-if-no-sessionstorage").hide(), f.show(), e() | |
| + } | |
| + }).on("heartbeat-connection-restored.autosave", function() { | |
| + a("#lost-connection-notice").hide(), f() | |
| + }).ready(function() { | |
| + p() | |
| + }), { | |
| + tempBlockSave: g, | |
| + triggerSave: m, | |
| + postChanged: n, | |
| + suspend: i, | |
| + resume: k | |
| + } | |
| + }() | |
| } | |
| - } | |
| - b.wp = b.wp || {}, b.wp.autosave = c() | |
| + }() | |
| }(jQuery, window); | |
| \ No newline at end of file | |
| diff -ur build-unminified/wp-includes/js/colorpicker.min.js build-branch-unminified/wp-includes/js/colorpicker.min.js | |
| --- build-unminified/wp-includes/js/colorpicker.min.js 2018-10-06 21:45:18.594519798 -0500 | |
| +++ build-branch-unminified/wp-includes/js/colorpicker.min.js 2018-10-06 21:42:19.257182731 -0500 | |
| @@ -159,11 +159,13 @@ | |
| } | |
| function pickColor(a) { | |
| - return null == ColorPicker_targetInput ? void alert("Target Input is null, which means you either didn't use the 'select' function or you have no defined your own 'pickColor' function to handle the picked color!") : void(ColorPicker_targetInput.value = a) | |
| + if (null == ColorPicker_targetInput) return void alert("Target Input is null, which means you either didn't use the 'select' function or you have no defined your own 'pickColor' function to handle the picked color!"); | |
| + ColorPicker_targetInput.value = a | |
| } | |
| function ColorPicker_select(a, b) { | |
| - return "text" != a.type && "hidden" != a.type && "textarea" != a.type ? (alert("colorpicker.select: Input object passed is not a valid form input object"), void(window.ColorPicker_targetInput = null)) : (window.ColorPicker_targetInput = a, void this.show(b)) | |
| + if ("text" != a.type && "hidden" != a.type && "textarea" != a.type) return alert("colorpicker.select: Input object passed is not a valid form input object"), void(window.ColorPicker_targetInput = null); | |
| + window.ColorPicker_targetInput = a, this.show(b) | |
| } | |
| function ColorPicker_highlightColor(a) { | |
| @@ -197,9 +199,8 @@ | |
| g += '<td style="background-color: ' + d[j] + ';"><a href="javascript:void()" onclick="' + h + "ColorPicker_pickColor('" + d[j] + "'," + h + "window.popupWindowObjects[" + c.index + ']);return false;" ' + k + "> </a></td>", (j + 1 >= e || (j + 1) % f == 0) && (g += "</tr>") | |
| } | |
| if (document.getElementById) { | |
| - var l = Math.floor(f / 2), | |
| - m = f = l; | |
| - g += "<tr><td colspan='" + l + "' style='background-color: #FFF;' ID='colorPickerSelectedColor'> </td><td colspan='" + m + "' style='text-align: center;' id='colorPickerSelectedColorValue'>#FFFFFF</td></tr>" | |
| + var l = Math.floor(f / 2); | |
| + g += "<tr><td colspan='" + l + "' style='background-color: #FFF;' ID='colorPickerSelectedColor'> </td><td colspan='" + (f = l) + "' style='text-align: center;' id='colorPickerSelectedColorValue'>#FFFFFF</td></tr>" | |
| } | |
| return g += "</table>", a && (g += "</span></body></html>"), c.populate(g + "\n"), c.offsetY = 25, c.autoHide(), c | |
| } | |
| diff -ur build-unminified/wp-includes/js/customize-base.min.js build-branch-unminified/wp-includes/js/customize-base.min.js | |
| --- build-unminified/wp-includes/js/customize-base.min.js 2018-10-06 21:45:37.106657832 -0500 | |
| +++ build-branch-unminified/wp-includes/js/customize-base.min.js 2018-10-06 21:42:39.273331950 -0500 | |
| @@ -5,8 +5,7 @@ | |
| c = function() {}, d = function(a, d, e) { | |
| var f; | |
| return f = d && d.hasOwnProperty("constructor") ? d.constructor : function() { | |
| - var b = a.apply(this, arguments); | |
| - return b | |
| + return a.apply(this, arguments) | |
| }, b.extend(f, a), c.prototype = a.prototype, f.prototype = new c, d && b.extend(f.prototype, d), e && b.extend(f, e), f.prototype.constructor = f, f.__super__ = a.prototype, f | |
| }, e.Class = function(a, c, d) { | |
| var f, g = arguments; | |
| @@ -46,7 +45,7 @@ | |
| }, | |
| set: function(a) { | |
| var b = this._value; | |
| - return a = this._setter.apply(this, arguments), a = this.validate(a), null === a || _.isEqual(b, a) ? this : (this._value = a, this._dirty = !0, this.callbacks.fireWith(this, [a, b]), this) | |
| + return a = this._setter.apply(this, arguments), null === (a = this.validate(a)) || _.isEqual(b, a) ? this : (this._value = a, this._dirty = !0, this.callbacks.fireWith(this, [a, b]), this) | |
| }, | |
| _setter: function(a) { | |
| return a | |
| @@ -118,7 +117,7 @@ | |
| return this.add(a, new this.defaultConstructor(e.Class.applicator, f.call(arguments, 1))) | |
| }, | |
| each: function(a, c) { | |
| - c = "undefined" == typeof c ? this : c, b.each(this._value, function(b, d) { | |
| + c = void 0 === c ? this : c, b.each(this._value, function(b, d) { | |
| a.call(c, d, b) | |
| }) | |
| }, | |
| @@ -136,9 +135,10 @@ | |
| var e = b.map(c, function(b) { | |
| return a(b) | |
| }); | |
| - return e.length !== c.length ? void a.when.apply(a, c).done(function() { | |
| + if (e.length !== c.length) return void a.when.apply(a, c).done(function() { | |
| d.resolveWith(a, e) | |
| - }) : void d.resolveWith(a, e) | |
| + }); | |
| + d.resolveWith(a, e) | |
| }), d.promise() | |
| }, | |
| _change: function() { | |
| @@ -197,7 +197,7 @@ | |
| return b.href = a, b.protocol + "//" + b.host.replace(/:(80|443)$/, "") | |
| }), this.add("targetWindow", null), this.targetWindow.set = function(a) { | |
| var b = this._value; | |
| - return a = this._setter.apply(this, arguments), a = this.validate(a), null === a || b === a ? this : (this._value = a, this._dirty = !0, this.callbacks.fireWith(this, [a, b]), this) | |
| + return a = this._setter.apply(this, arguments), null === (a = this.validate(a)) || b === a ? this : (this._value = a, this._dirty = !0, this.callbacks.fireWith(this, [a, b]), this) | |
| }, this.targetWindow(a.targetWindow || d), this.receive = b.proxy(this.receive, this), this.receive.guid = b.guid++, b(window).on("message", this.receive) | |
| }, | |
| destroy: function() { | |
| @@ -205,11 +205,11 @@ | |
| }, | |
| receive: function(a) { | |
| var b; | |
| - a = a.originalEvent, this.targetWindow && this.targetWindow() && (this.origin() && a.origin !== this.origin() || "string" == typeof a.data && "{" === a.data[0] && (b = JSON.parse(a.data), b && b.id && "undefined" != typeof b.data && ((b.channel || this.channel()) && this.channel() !== b.channel || this.trigger(b.id, b.data)))) | |
| + a = a.originalEvent, this.targetWindow && this.targetWindow() && (this.origin() && a.origin !== this.origin() || "string" == typeof a.data && "{" === a.data[0] && (b = JSON.parse(a.data)) && b.id && "undefined" != typeof b.data && ((b.channel || this.channel()) && this.channel() !== b.channel || this.trigger(b.id, b.data))) | |
| }, | |
| send: function(a, b) { | |
| var c; | |
| - b = "undefined" == typeof b ? null : b, this.url() && this.targetWindow() && (c = { | |
| + b = void 0 === b ? null : b, this.url() && this.targetWindow() && (c = { | |
| id: a, | |
| data: b | |
| }, this.channel() && (c.channel = this.channel()), this.targetWindow().postMessage(JSON.stringify(c), this.origin())) | |
| diff -ur build-unminified/wp-includes/js/customize-loader.min.js build-branch-unminified/wp-includes/js/customize-loader.min.js | |
| --- build-unminified/wp-includes/js/customize-loader.min.js 2018-10-06 21:45:36.442652881 -0500 | |
| +++ build-branch-unminified/wp-includes/js/customize-loader.min.js 2018-10-06 21:42:38.637327209 -0500 | |
| @@ -3,7 +3,7 @@ | |
| var c, d = wp.customize; | |
| b.extend(b.support, { | |
| history: !(!window.history || !history.pushState), | |
| - hashchange: "onhashchange" in window && (void 0 === document.documentMode || document.documentMode > 7) | |
| + hashchange: "onhashchange" in window && (document.documentMode === undefined || document.documentMode > 7) | |
| }), c = b.extend({}, d.Events, { | |
| initialize: function() { | |
| this.body = b(document.body), c.settings && b.support.postMessage && (b.support.cors || !c.settings.isCrossDomain) && (this.window = b(window), this.element = b('<div id="customize-container" />').appendTo(this.body), this.bind("open", this.overlay.show), this.bind("close", this.overlay.hide), b("#wpbody").on("click", ".load-customize", function(a) { | |
| diff -ur build-unminified/wp-includes/js/customize-models.min.js build-branch-unminified/wp-includes/js/customize-models.min.js | |
| --- build-unminified/wp-includes/js/customize-models.min.js 2018-10-06 21:45:35.842648407 -0500 | |
| +++ build-branch-unminified/wp-includes/js/customize-models.min.js 2018-10-06 21:42:38.021322616 -0500 | |
| @@ -35,7 +35,7 @@ | |
| }, | |
| importImage: function() { | |
| var a = this.get("header"); | |
| - void 0 !== a.attachment_id && b.ajax.post("custom-header-add", { | |
| + a.attachment_id !== undefined && b.ajax.post("custom-header-add", { | |
| nonce: _wpCustomizeHeader.nonces.add, | |
| wp_customize: "on", | |
| theme: c.settings.theme.stylesheet, | |
| @@ -43,7 +43,7 @@ | |
| }) | |
| }, | |
| shouldBeCropped: function() { | |
| - return (this.get("themeFlexWidth") !== !0 || this.get("themeFlexHeight") !== !0) && ((this.get("themeFlexWidth") !== !0 || this.get("themeHeight") !== this.get("imageHeight")) && ((this.get("themeFlexHeight") !== !0 || this.get("themeWidth") !== this.get("imageWidth")) && ((this.get("themeWidth") !== this.get("imageWidth") || this.get("themeHeight") !== this.get("imageHeight")) && !(this.get("imageWidth") <= this.get("themeWidth"))))) | |
| + return (!0 !== this.get("themeFlexWidth") || !0 !== this.get("themeFlexHeight")) && ((!0 !== this.get("themeFlexWidth") || this.get("themeHeight") !== this.get("imageHeight")) && ((!0 !== this.get("themeFlexHeight") || this.get("themeWidth") !== this.get("imageWidth")) && ((this.get("themeWidth") !== this.get("imageWidth") || this.get("themeHeight") !== this.get("imageHeight")) && !(this.get("imageWidth") <= this.get("themeWidth"))))) | |
| } | |
| }), c.HeaderTool.ChoiceList = Backbone.Collection.extend({ | |
| model: c.HeaderTool.ImageModel, | |
| @@ -67,7 +67,7 @@ | |
| var b, c = a.get("header").attachment_id || !1; | |
| c && (b = this.find(function(b) { | |
| return b.cid !== a.cid && b.get("header").attachment_id === c | |
| - }), b && this.remove(b)) | |
| + })) && this.remove(b) | |
| }, | |
| maybeAddRandomChoice: function() { | |
| 1 === this.size() && this.addRandomChoice() | |
| diff -ur build-unminified/wp-includes/js/customize-preview.min.js build-branch-unminified/wp-includes/js/customize-preview.min.js | |
| --- build-unminified/wp-includes/js/customize-preview.min.js 2018-10-06 21:45:36.702654820 -0500 | |
| +++ build-branch-unminified/wp-includes/js/customize-preview.min.js 2018-10-06 21:42:38.881329027 -0500 | |
| @@ -40,39 +40,39 @@ | |
| })) | |
| }, | |
| handleLinkClick: function(a) { | |
| - var c, e, f = this; | |
| - if (c = b(a.target).closest("a"), !_.isUndefined(c.attr("href")) && (e = "#" === c.attr("href").substr(0, 1), !e && /^https?:$/.test(c.prop("protocol")))) { | |
| + var c, e = this; | |
| + if (c = b(a.target).closest("a"), !_.isUndefined(c.attr("href")) && !("#" === c.attr("href").substr(0, 1)) && /^https?:$/.test(c.prop("protocol"))) { | |
| if (!d.isLinkPreviewable(c[0])) return wp.a11y.speak(d.settings.l10n.linkUnpreviewable), void a.preventDefault(); | |
| - a.preventDefault(), a.shiftKey || f.send("url", c.prop("href")) | |
| + a.preventDefault(), a.shiftKey || e.send("url", c.prop("href")) | |
| } | |
| }, | |
| handleFormSubmit: function(a) { | |
| var c, e, f = this; | |
| - return c = document.createElement("a"), e = b(a.target), c.href = e.prop("action"), "GET" === e.prop("method").toUpperCase() && d.isLinkPreviewable(c) ? (a.isDefaultPrevented() || (c.search.length > 1 && (c.search += "&"), c.search += e.serialize(), f.send("url", c.href)), void a.preventDefault()) : (wp.a11y.speak(d.settings.l10n.formUnpreviewable), void a.preventDefault()) | |
| + if (c = document.createElement("a"), e = b(a.target), c.href = e.prop("action"), "GET" !== e.prop("method").toUpperCase() || !d.isLinkPreviewable(c)) return wp.a11y.speak(d.settings.l10n.formUnpreviewable), void a.preventDefault(); | |
| + a.isDefaultPrevented() || (c.search.length > 1 && (c.search += "&"), c.search += e.serialize(), f.send("url", c.href)), a.preventDefault() | |
| } | |
| }), d.addLinkPreviewing = function() { | |
| - var a = "a[href], area"; | |
| - b(document.body).find(a).each(function() { | |
| + b(document.body).find("a[href], area").each(function() { | |
| d.prepareLinkPreview(this) | |
| - }), "undefined" != typeof MutationObserver ? (d.mutationObserver = new MutationObserver(function(c) { | |
| - _.each(c, function(c) { | |
| - b(c.target).find(a).each(function() { | |
| + }), "undefined" != typeof MutationObserver ? (d.mutationObserver = new MutationObserver(function(a) { | |
| + _.each(a, function(a) { | |
| + b(a.target).find("a[href], area").each(function() { | |
| d.prepareLinkPreview(this) | |
| }) | |
| }) | |
| }), d.mutationObserver.observe(document.documentElement, { | |
| childList: !0, | |
| subtree: !0 | |
| - })) : b(document.documentElement).on("click focus mouseover", a, function() { | |
| + })) : b(document.documentElement).on("click focus mouseover", "a[href], area", function() { | |
| d.prepareLinkPreview(this) | |
| }) | |
| }, d.isLinkPreviewable = function(a, b) { | |
| - var c, e, f, g; | |
| - return f = _.extend({}, { | |
| + var c, e, f; | |
| + return e = _.extend({}, { | |
| allowAdminAjax: !1 | |
| - }, b || {}), "javascript:" === a.protocol || ("https:" === a.protocol || "http:" === a.protocol) && (g = a.host.replace(/:(80|443)$/, ""), e = document.createElement("a"), c = !_.isUndefined(_.find(d.settings.url.allowed, function(b) { | |
| - return e.href = b, e.protocol === a.protocol && e.host.replace(/:(80|443)$/, "") === g && 0 === a.pathname.indexOf(e.pathname.replace(/\/$/, "")) | |
| - })), !!c && (!/\/wp-(login|signup)\.php$/.test(a.pathname) && (/\/wp-admin\/admin-ajax\.php$/.test(a.pathname) ? f.allowAdminAjax : !/\/wp-(admin|includes|content)(\/|$)/.test(a.pathname)))) | |
| + }, b || {}), "javascript:" === a.protocol || ("https:" === a.protocol || "http:" === a.protocol) && (f = a.host.replace(/:(80|443)$/, ""), c = document.createElement("a"), !!!_.isUndefined(_.find(d.settings.url.allowed, function(b) { | |
| + return c.href = b, c.protocol === a.protocol && c.host.replace(/:(80|443)$/, "") === f && 0 === a.pathname.indexOf(c.pathname.replace(/\/$/, "")) | |
| + })) && (!/\/wp-(login|signup)\.php$/.test(a.pathname) && (/\/wp-admin\/admin-ajax\.php$/.test(a.pathname) ? e.allowAdminAjax : !/\/wp-(admin|includes|content)(\/|$)/.test(a.pathname)))) | |
| }, d.prepareLinkPreview = function(a) { | |
| var c, e = b(a); | |
| if (!e.closest("#wpadminbar").length && "#" !== e.attr("href").substr(0, 1) && /^https?:$/.test(a.protocol) && (d.settings.channel && "https" === d.preview.scheme.get() && "http:" === a.protocol && -1 !== d.settings.url.allowedHosts.indexOf(a.host) && (a.protocol = "https:"), !e.hasClass("wp-playlist-caption"))) { | |
| @@ -106,14 +106,15 @@ | |
| })) | |
| }, d.prepareFormPreview = function(a) { | |
| var c, e = {}; | |
| - return a.action || (a.action = location.href), c = document.createElement("a"), c.href = a.action, d.settings.channel && "https" === d.preview.scheme.get() && "http:" === c.protocol && -1 !== d.settings.url.allowedHosts.indexOf(c.host) && (c.protocol = "https:", a.action = c.href), "GET" === a.method.toUpperCase() && d.isLinkPreviewable(c) ? (b(a).removeClass("customize-unpreviewable"), e.customize_changeset_uuid = d.settings.changeset.uuid, d.settings.changeset.autosaved && (e.customize_autosaved = "on"), d.settings.theme.active || (e.customize_theme = d.settings.theme.stylesheet), d.settings.channel && (e.customize_messenger_channel = d.settings.channel), _.each(e, function(c, d) { | |
| + if (a.action || (a.action = location.href), c = document.createElement("a"), c.href = a.action, d.settings.channel && "https" === d.preview.scheme.get() && "http:" === c.protocol && -1 !== d.settings.url.allowedHosts.indexOf(c.host) && (c.protocol = "https:", a.action = c.href), "GET" !== a.method.toUpperCase() || !d.isLinkPreviewable(c)) return void(d.settings.channel && b(a).addClass("customize-unpreviewable")); | |
| + b(a).removeClass("customize-unpreviewable"), e.customize_changeset_uuid = d.settings.changeset.uuid, d.settings.changeset.autosaved && (e.customize_autosaved = "on"), d.settings.theme.active || (e.customize_theme = d.settings.theme.stylesheet), d.settings.channel && (e.customize_messenger_channel = d.settings.channel), _.each(e, function(c, d) { | |
| var e = b(a).find('input[name="' + d + '"]'); | |
| e.length ? e.val(c) : b(a).prepend(b("<input>", { | |
| type: "hidden", | |
| name: d, | |
| value: c | |
| })) | |
| - }), void(d.settings.channel && (a.target = "_self"))) : void(d.settings.channel && b(a).addClass("customize-unpreviewable")) | |
| + }), d.settings.channel && (a.target = "_self") | |
| }, d.keepAliveCurrentUrl = function() { | |
| var a = location.pathname, | |
| c = location.search.substr(1), | |
| @@ -121,7 +122,8 @@ | |
| f = ["customize_theme", "customize_changeset_uuid", "customize_messenger_channel", "customize_autosaved"]; | |
| return function() { | |
| var g, h; | |
| - return c === location.search.substr(1) && a === location.pathname ? void d.preview.send("keep-alive") : (g = document.createElement("a"), null === e && (g.search = c, e = d.utils.parseQueryString(c), _.each(f, function(a) { | |
| + if (c === location.search.substr(1) && a === location.pathname) return void d.preview.send("keep-alive"); | |
| + g = document.createElement("a"), null === e && (g.search = c, e = d.utils.parseQueryString(c), _.each(f, function(a) { | |
| delete e[a] | |
| })), g.href = location.href, h = d.utils.parseQueryString(g.search.substr(1)), _.each(f, function(a) { | |
| delete h[a] | |
| @@ -131,7 +133,7 @@ | |
| activeSections: d.settings.activeSections, | |
| activeControls: d.settings.activeControls, | |
| settingValidities: d.settings.settingValidities | |
| - })), e = h, c = location.search.substr(1), void(a = location.pathname)) | |
| + })), e = h, c = location.search.substr(1), a = location.pathname | |
| } | |
| }(), d.settingPreviewHandlers = { | |
| custom_logo: function(a) { | |
| @@ -163,8 +165,7 @@ | |
| var c = d(b); | |
| c && (c._dirty = !0) | |
| }), d.preview.bind("setting", function(a) { | |
| - var b = !0; | |
| - c.apply(null, a.concat(b)) | |
| + c.apply(null, a.concat(!0)) | |
| }), d.preview.bind("sync", function(a) { | |
| a.settings && a["settings-modified-while-loading"] && _.each(_.keys(a.settings), function(b) { | |
| d.has(b) && !a["settings-modified-while-loading"][b] && delete a.settings[b] | |
| diff -ur build-unminified/wp-includes/js/customize-preview-nav-menus.min.js build-branch-unminified/wp-includes/js/customize-preview-nav-menus.min.js | |
| --- build-unminified/wp-includes/js/customize-preview-nav-menus.min.js 2018-10-06 21:45:20.606534800 -0500 | |
| +++ build-branch-unminified/wp-includes/js/customize-preview-nav-menus.min.js 2018-10-06 21:42:21.273197760 -0500 | |
| @@ -26,7 +26,7 @@ | |
| }, d.selectiveRefresh && (e.NavMenuInstancePartial = d.selectiveRefresh.Partial.extend({ | |
| initialize: function(a, c) { | |
| var e, f, g = this; | |
| - if (e = a.match(/^nav_menu_instance\[([0-9a-f]{32})]$/), !e) throw new Error("Illegal id for nav_menu_instance partial. The key corresponds with the args HMAC."); | |
| + if (!(e = a.match(/^nav_menu_instance\[([0-9a-f]{32})]$/))) throw new Error("Illegal id for nav_menu_instance partial. The key corresponds with the args HMAC."); | |
| if (f = e[1], c = c || {}, c.params = b.extend({ | |
| selector: '[data-customize-partial-id="' + a + '"]', | |
| navMenuArgs: c.constructingContainerContext || {}, | |
| @@ -36,7 +36,7 @@ | |
| }, | |
| isRelatedSetting: function(a, c, e) { | |
| var f, g, h, i, j, k, l = this; | |
| - if (b.isString(a) && (a = d(a)), h = /^nav_menu_item\[/.test(a.id), h && b.isObject(c) && b.isObject(e) && (i = b.clone(c), j = b.clone(e), delete i.type_label, delete j.type_label, "https" === d.preview.scheme.get() && (k = document.createElement("a"), k.href = i.url, k.protocol = "https:", i.url = k.href, k.href = j.url, k.protocol = "https:", j.url = k.href), c.title && (delete j.original_title, delete i.original_title), b.isEqual(j, i))) return !1; | |
| + if (b.isString(a) && (a = d(a)), (h = /^nav_menu_item\[/.test(a.id)) && b.isObject(c) && b.isObject(e) && (i = b.clone(c), j = b.clone(e), delete i.type_label, delete j.type_label, "https" === d.preview.scheme.get() && (k = document.createElement("a"), k.href = i.url, k.protocol = "https:", i.url = k.href, k.href = j.url, k.protocol = "https:", j.url = k.href), c.title && (delete j.original_title, delete i.original_title), b.isEqual(j, i))) return !1; | |
| if (l.params.navMenuArgs.theme_location) { | |
| if ("nav_menu_locations[" + l.params.navMenuArgs.theme_location + "]" === a.id) return !0; | |
| f = d("nav_menu_locations[" + l.params.navMenuArgs.theme_location + "]") | |
| @@ -66,7 +66,7 @@ | |
| }), !!b.findWhere(c, a) && (d.selectiveRefresh.requestFullRefresh(), !0) | |
| }, e.bindSettingListener = function(a, b) { | |
| var c; | |
| - return b = b || {}, (c = a.id.match(/^nav_menu\[(-?\d+)]$/)) ? (a._navMenuId = parseInt(c[1], 10), a.bind(this.onChangeNavMenuSetting), b.fire && this.onChangeNavMenuSetting.call(a, a(), !1), !0) : (c = a.id.match(/^nav_menu_item\[(-?\d+)]$/)) ? (a._navMenuItemId = parseInt(c[1], 10), a.bind(this.onChangeNavMenuItemSetting), b.fire && this.onChangeNavMenuItemSetting.call(a, a(), !1), !0) : (c = a.id.match(/^nav_menu_locations\[(.+?)]/), !!c && (a._navMenuThemeLocation = c[1], a.bind(this.onChangeNavMenuLocationsSetting), b.fire && this.onChangeNavMenuLocationsSetting.call(a, a(), !1), !0)) | |
| + return b = b || {}, (c = a.id.match(/^nav_menu\[(-?\d+)]$/)) ? (a._navMenuId = parseInt(c[1], 10), a.bind(this.onChangeNavMenuSetting), b.fire && this.onChangeNavMenuSetting.call(a, a(), !1), !0) : (c = a.id.match(/^nav_menu_item\[(-?\d+)]$/)) ? (a._navMenuItemId = parseInt(c[1], 10), a.bind(this.onChangeNavMenuItemSetting), b.fire && this.onChangeNavMenuItemSetting.call(a, a(), !1), !0) : !!(c = a.id.match(/^nav_menu_locations\[(.+?)]/)) && (a._navMenuThemeLocation = c[1], a.bind(this.onChangeNavMenuLocationsSetting), b.fire && this.onChangeNavMenuLocationsSetting.call(a, a(), !1), !0) | |
| }, e.unbindSettingListener = function(a) { | |
| a.unbind(this.onChangeNavMenuSetting), a.unbind(this.onChangeNavMenuItemSetting), a.unbind(this.onChangeNavMenuLocationsSetting) | |
| }, e.onChangeNavMenuSetting = function() { | |
| @@ -80,19 +80,18 @@ | |
| }) | |
| }, e.onChangeNavMenuItemSetting = function(a, b) { | |
| var c, f = a || b; | |
| - c = d("nav_menu[" + String(f.nav_menu_term_id) + "]"), c && e.onChangeNavMenuSetting.call(c) | |
| + (c = d("nav_menu[" + String(f.nav_menu_term_id) + "]")) && e.onChangeNavMenuSetting.call(c) | |
| }, e.onChangeNavMenuLocationsSetting = function() { | |
| var a, c = this; | |
| e.handleUnplacedNavMenuInstances({ | |
| theme_location: c._navMenuThemeLocation | |
| - }), a = !!b.findWhere(b.values(e.data.navMenuInstanceArgs), { | |
| + }), (a = !!b.findWhere(b.values(e.data.navMenuInstanceArgs), { | |
| theme_location: c._navMenuThemeLocation | |
| - }), a || d.selectiveRefresh.requestFullRefresh() | |
| + })) || d.selectiveRefresh.requestFullRefresh() | |
| }), e.highlightControls = function() { | |
| - var b = ".menu-item"; | |
| - d.settings.channel && a(document).on("click", b, function(b) { | |
| + d.settings.channel && a(document).on("click", ".menu-item", function(b) { | |
| var c; | |
| - b.shiftKey && (c = a(this).attr("class").match(/(?:^|\s)menu-item-(-?\d+)(?:\s|$)/), c && (b.preventDefault(), b.stopPropagation(), d.preview.send("focus-nav-menu-item-control", parseInt(c[1], 10)))) | |
| + b.shiftKey && (c = a(this).attr("class").match(/(?:^|\s)menu-item-(-?\d+)(?:\s|$)/)) && (b.preventDefault(), b.stopPropagation(), d.preview.send("focus-nav-menu-item-control", parseInt(c[1], 10))) | |
| }) | |
| }, d.bind("preview-ready", function() { | |
| e.init() | |
| diff -ur build-unminified/wp-includes/js/customize-preview-widgets.min.js build-branch-unminified/wp-includes/js/customize-preview-widgets.min.js | |
| --- build-unminified/wp-includes/js/customize-preview-widgets.min.js 2018-10-06 21:45:36.974656848 -0500 | |
| +++ build-branch-unminified/wp-includes/js/customize-preview-widgets.min.js 2018-10-06 21:42:39.141330966 -0500 | |
| @@ -22,7 +22,7 @@ | |
| }, e.WidgetPartial = d.selectiveRefresh.Partial.extend({ | |
| initialize: function(a, c) { | |
| var f, g = this; | |
| - if (f = a.match(/^widget\[(.+)]$/), !f) throw new Error("Illegal id for widget partial."); | |
| + if (!(f = a.match(/^widget\[(.+)]$/))) throw new Error("Illegal id for widget partial."); | |
| g.widgetId = f[1], g.widgetIdParts = e.parseWidgetId(g.widgetId), c = c || {}, c.params = b.extend({ | |
| settings: [e.getWidgetSettingId(g.widgetId)], | |
| containerInclusive: !0 | |
| @@ -39,7 +39,7 @@ | |
| }), e.SidebarPartial = d.selectiveRefresh.Partial.extend({ | |
| initialize: function(a, c) { | |
| var e, f = this; | |
| - if (e = a.match(/^sidebar\[(.+)]$/), !e) throw new Error("Illegal id for sidebar partial."); | |
| + if (!(e = a.match(/^sidebar\[(.+)]$/))) throw new Error("Illegal id for sidebar partial."); | |
| if (f.sidebarId = e[1], c = c || {}, c.params = b.extend({ | |
| settings: ["sidebars_widgets[" + f.sidebarId + "]"] | |
| }, c.params || {}), d.selectiveRefresh.Partial.prototype.initialize.call(f, a, c), !f.params.sidebarArgs) throw new Error("The sidebarArgs param was not provided."); | |
| @@ -50,11 +50,10 @@ | |
| b.each(a.settings(), function(c) { | |
| d(c).bind(b.bind(a.handleSettingChange, a)) | |
| }), d.selectiveRefresh.bind("partial-content-rendered", function(c) { | |
| - var f = c.partial.extended(e.WidgetPartial) && -1 !== b.indexOf(a.getWidgetIds(), c.partial.widgetId); | |
| - f && d.selectiveRefresh.trigger("sidebar-updated", a) | |
| + c.partial.extended(e.WidgetPartial) && -1 !== b.indexOf(a.getWidgetIds(), c.partial.widgetId) && d.selectiveRefresh.trigger("sidebar-updated", a) | |
| }), d.bind("change", function(c) { | |
| var d, f; | |
| - f = e.parseWidgetSettingId(c.id), f && (d = f.idBase, f.number && (d += "-" + String(f.number)), -1 !== b.indexOf(a.getWidgetIds(), d) && a.ensureWidgetPlacementContainers(d)) | |
| + (f = e.parseWidgetSettingId(c.id)) && (d = f.idBase, f.number && (d += "-" + String(f.number)), -1 !== b.indexOf(a.getWidgetIds(), d) && a.ensureWidgetPlacementContainers(d)) | |
| }) | |
| }, | |
| findDynamicSidebarBoundaryNodes: function() { | |
| @@ -64,7 +63,7 @@ | |
| b.each(f, function(f) { | |
| var g; | |
| if (8 === f.nodeType) { | |
| - if (g = f.nodeValue.match(a), !g || g[2] !== d.sidebarId) return; | |
| + if (!(g = f.nodeValue.match(a)) || g[2] !== d.sidebarId) return; | |
| b.isUndefined(e[g[3]]) && (e[g[3]] = { | |
| before: null, | |
| after: null, | |
| @@ -90,7 +89,7 @@ | |
| }, | |
| getWidgetIds: function() { | |
| var a, c, e = this; | |
| - if (a = e.settings()[0], !a) throw new Error("Missing associated setting."); | |
| + if (!(a = e.settings()[0])) throw new Error("Missing associated setting."); | |
| if (!d.has(a)) throw new Error("Setting does not exist."); | |
| if (c = d(a).get(), !b.isArray(c)) throw new Error("Expected setting to be array of widget IDs"); | |
| return c.slice(0) | |
| @@ -126,29 +125,29 @@ | |
| params: {} | |
| })), b.each(g.placements(), function(d) { | |
| var e, i; | |
| - e = b.find(f.placements(), function(a) { | |
| + (e = b.find(f.placements(), function(a) { | |
| return a.context.sidebar_instance_number === d.context.instanceNumber | |
| - }), e || (i = a(g.params.sidebarArgs.before_widget.replace(/%1\$s/g, c).replace(/%2\$s/g, "widget") + g.params.sidebarArgs.after_widget), i[0] && (i.attr("data-customize-partial-id", f.id), i.attr("data-customize-partial-type", "widget"), i.attr("data-customize-widget-id", c), i.data("customize-partial-placement-context", { | |
| + })) || (i = a(g.params.sidebarArgs.before_widget.replace(/%1\$s/g, c).replace(/%2\$s/g, "widget") + g.params.sidebarArgs.after_widget), i[0] && (i.attr("data-customize-partial-id", f.id), i.attr("data-customize-partial-type", "widget"), i.attr("data-customize-widget-id", c), i.data("customize-partial-placement-context", { | |
| sidebar_id: g.sidebarId, | |
| sidebar_instance_number: d.context.instanceNumber | |
| }), d.endNode.parentNode.insertBefore(i[0], d.endNode), h = !0)) | |
| }), d.selectiveRefresh.partial.add(f), h && g.reflowWidgets(), f | |
| }, | |
| handleSettingChange: function(a, c) { | |
| - var f, g, h, i = this, | |
| - j = []; | |
| - return (f = c.length > 0 && 0 === a.length || a.length > 0 && 0 === c.length) ? void i.fallback() : (g = b.difference(c, a), b.each(g, function(a) { | |
| + var f, g, h = this, | |
| + i = []; | |
| + if (c.length > 0 && 0 === a.length || a.length > 0 && 0 === c.length) return void h.fallback(); | |
| + f = b.difference(c, a), b.each(f, function(a) { | |
| var c = d.selectiveRefresh.partial("widget[" + a + "]"); | |
| c && b.each(c.placements(), function(a) { | |
| - var b = a.context.sidebar_id === i.sidebarId || a.context.sidebar_args && a.context.sidebar_args.id === i.sidebarId; | |
| - b && a.container.remove() | |
| + (a.context.sidebar_id === h.sidebarId || a.context.sidebar_args && a.context.sidebar_args.id === h.sidebarId) && a.container.remove() | |
| }), delete e.renderedWidgets[a] | |
| - }), h = b.difference(a, c), b.each(h, function(a) { | |
| - var b = i.ensureWidgetPlacementContainers(a); | |
| - j.push(b), e.renderedWidgets[a] = !0 | |
| - }), b.each(j, function(a) { | |
| + }), g = b.difference(a, c), b.each(g, function(a) { | |
| + var b = h.ensureWidgetPlacementContainers(a); | |
| + i.push(b), e.renderedWidgets[a] = !0 | |
| + }), b.each(i, function(a) { | |
| a.refresh() | |
| - }), void d.selectiveRefresh.trigger("sidebar-updated", i)) | |
| + }), d.selectiveRefresh.trigger("sidebar-updated", h) | |
| }, | |
| refresh: function() { | |
| var c = this, | |
| @@ -162,7 +161,7 @@ | |
| }), d.selectiveRefresh.partialConstructor.sidebar = e.SidebarPartial, d.selectiveRefresh.partialConstructor.widget = e.WidgetPartial, e.addPartials = function() { | |
| b.each(e.registeredSidebars, function(a) { | |
| var b, c = "sidebar[" + a.id + "]"; | |
| - b = d.selectiveRefresh.partial(c), b || (b = new e.SidebarPartial(c, { | |
| + (b = d.selectiveRefresh.partial(c)) || (b = new e.SidebarPartial(c, { | |
| params: { | |
| sidebarArgs: a | |
| } | |
| @@ -172,7 +171,7 @@ | |
| var b = this; | |
| a.each(b.registeredSidebars, function(c, d) { | |
| var e, f, g, h = [d.before_widget, d.before_title, d.after_title, d.after_widget].join(""); | |
| - e = a(h), f = e.prop("tagName") || "", g = e.prop("className") || "", g && (g = g.replace(/\S*%[12]\$s\S*/g, ""), g = g.replace(/^\s+|\s+$/g, ""), g && (f += "." + g.split(/\s+/).join(".")), b.widgetSelectors.push(f)) | |
| + e = a(h), f = e.prop("tagName") || "", (g = e.prop("className") || "") && (g = g.replace(/\S*%[12]\$s\S*/g, ""), g = g.replace(/^\s+|\s+$/g, ""), g && (f += "." + g.split(/\s+/).join(".")), b.widgetSelectors.push(f)) | |
| }) | |
| }, e.highlightWidget = function(b) { | |
| var c = a(document.body), | |
| diff -ur build-unminified/wp-includes/js/customize-selective-refresh.min.js build-branch-unminified/wp-includes/js/customize-selective-refresh.min.js | |
| --- build-unminified/wp-includes/js/customize-selective-refresh.min.js 2018-10-06 21:45:34.234636417 -0500 | |
| +++ build-branch-unminified/wp-includes/js/customize-selective-refresh.min.js 2018-10-06 21:42:36.993314953 -0500 | |
| @@ -49,8 +49,8 @@ | |
| d.prepend(c), d.is(":visible") && "none" !== d.css("display") || c.addClass("customize-partial-edit-shortcut-hidden") | |
| }, | |
| getEditShortcutClassName: function() { | |
| - var a, b = this; | |
| - return a = b.id.replace(/]/g, "").replace(/\[/g, "-"), "customize-partial-edit-shortcut-" + a | |
| + var a = this; | |
| + return "customize-partial-edit-shortcut-" + a.id.replace(/]/g, "").replace(/\[/g, "-") | |
| }, | |
| getEditShortcutTitle: function() { | |
| var a = this, | |
| @@ -59,7 +59,6 @@ | |
| case "widget": | |
| return b.clickEditWidget; | |
| case "blogname": | |
| - return b.clickEditTitle; | |
| case "blogdescription": | |
| return b.clickEditTitle; | |
| case "nav_menu": | |
| @@ -146,8 +145,7 @@ | |
| return document.write = c.orginalDocumentWrite, c.orginalDocumentWrite = null, f.createEditShortcutForPlacement(b), b.container.removeClass("customize-partial-refreshing"), b.container.data("customize-partial-content-rendered", !0), wp.mediaelement && wp.mediaelement.initialize(), wp.playlist && wp.playlist.initialize(), c.trigger("partial-content-rendered", b), !0 | |
| }, | |
| fallback: function() { | |
| - var a = this; | |
| - a.params.fallbackRefresh && c.requestFullRefresh() | |
| + this.params.fallbackRefresh && c.requestFullRefresh() | |
| } | |
| }), c.Placement = e = b.Class.extend({ | |
| partial: null, | |
| @@ -216,7 +214,7 @@ | |
| triggerRendered: !0 | |
| }, d || {}), f = b.find("[data-customize-partial-id]"), b.is("[data-customize-partial-id]") && (f = f.add(b)), f.each(function() { | |
| var b, f, g, h, i, j, k = a(this); | |
| - g = k.data("customize-partial-id"), g && (j = k.data("customize-partial-placement-context") || {}, b = c.partial(g), b || (i = k.data("customize-partial-options") || {}, i.constructingContainerContext = k.data("customize-partial-placement-context") || {}, h = c.partialConstructor[k.data("customize-partial-type")] || c.Partial, b = new h(g, i), c.partial.add(b)), d.triggerRendered && !k.data("customize-partial-content-rendered") && (f = new e({ | |
| + (g = k.data("customize-partial-id")) && (j = k.data("customize-partial-placement-context") || {}, b = c.partial(g), b || (i = k.data("customize-partial-options") || {}, i.constructingContainerContext = k.data("customize-partial-placement-context") || {}, h = c.partialConstructor[k.data("customize-partial-type")] || c.Partial, b = new h(g, i), c.partial.add(b)), d.triggerRendered && !k.data("customize-partial-content-rendered") && (f = new e({ | |
| partial: b, | |
| context: j, | |
| container: k | |
| diff -ur build-unminified/wp-includes/js/heartbeat.min.js build-branch-unminified/wp-includes/js/heartbeat.min.js | |
| --- build-unminified/wp-includes/js/heartbeat.min.js 2018-10-06 21:45:21.026537932 -0500 | |
| +++ build-branch-unminified/wp-includes/js/heartbeat.min.js 2018-10-06 21:42:21.697200921 -0500 | |
| @@ -1,21 +1,10 @@ | |
| ! function(a, b, c) { | |
| var d = function() { | |
| function d() { | |
| - var c, d, f, h; | |
| - "string" == typeof b.pagenow && (z.screenId = b.pagenow), "string" == typeof b.ajaxurl && (z.url = b.ajaxurl), "object" == typeof b.heartbeatSettings && (c = b.heartbeatSettings, !z.url && c.ajaxurl && (z.url = c.ajaxurl), c.interval && (z.mainInterval = c.interval, z.mainInterval < 15 ? z.mainInterval = 15 : z.mainInterval > 120 && (z.mainInterval = 120)), c.minimalInterval && (c.minimalInterval = parseInt(c.minimalInterval, 10), z.minimalInterval = c.minimalInterval > 0 && c.minimalInterval <= 600 ? 1e3 * c.minimalInterval : 0), z.minimalInterval && z.mainInterval < z.minimalInterval && (z.mainInterval = z.minimalInterval), z.screenId || (z.screenId = c.screenId || "front"), "disable" === c.suspension && (z.suspendEnabled = !1)), z.mainInterval = 1e3 * z.mainInterval, z.originalInterval = z.mainInterval, "undefined" != typeof document.hidden ? (d = "hidden", h = "visibilitychange", f = "visibilityState") : "undefined" != typeof document.msHidden ? (d = "msHidden", h = "msvisibilitychange", f = "msVisibilityState") : "undefined" != typeof document.webkitHidden && (d = "webkitHidden", h = "webkitvisibilitychange", f = "webkitVisibilityState"), d && (document[d] && (z.hasFocus = !1), y.on(h + ".wp-heartbeat", function() { | |
| - "hidden" === document[f] ? (l(), b.clearInterval(z.checkFocusTimer)) : (m(), document.hasFocus && (z.checkFocusTimer = b.setInterval(g, 1e4))) | |
| - })), document.hasFocus && (z.checkFocusTimer = b.setInterval(g, 1e4)), a(b).on("unload.wp-heartbeat", function() { | |
| - z.suspend = !0, z.xhr && 4 !== z.xhr.readyState && z.xhr.abort() | |
| - }), b.setInterval(o, 3e4), y.ready(function() { | |
| - z.lastTick = e(), k() | |
| - }) | |
| - } | |
| - | |
| - function e() { | |
| return (new Date).getTime() | |
| } | |
| - function f(a) { | |
| + function e(a) { | |
| var c, d = a.src; | |
| if (d && /^https?:\/\//.test(d) && (c = b.location.origin ? b.location.origin : b.location.protocol + "//" + b.location.host, 0 !== d.indexOf(c))) return !1; | |
| try { | |
| @@ -24,11 +13,11 @@ | |
| return !1 | |
| } | |
| - function g() { | |
| - z.hasFocus && !document.hasFocus() ? l() : !z.hasFocus && document.hasFocus() && m() | |
| + function f() { | |
| + y.hasFocus && !document.hasFocus() ? k() : !y.hasFocus && document.hasFocus() && l() | |
| } | |
| - function h(a, b) { | |
| + function g(a, b) { | |
| var c; | |
| if (a) { | |
| switch (a) { | |
| @@ -38,99 +27,100 @@ | |
| c = !0; | |
| break; | |
| case "error": | |
| - if (503 === b && z.hasConnected) { | |
| + if (503 === b && y.hasConnected) { | |
| c = !0; | |
| break | |
| } | |
| case "parsererror": | |
| case "empty": | |
| case "unknown": | |
| - z.errorcount++, z.errorcount > 2 && z.hasConnected && (c = !0) | |
| + y.errorcount++, y.errorcount > 2 && y.hasConnected && (c = !0) | |
| } | |
| - c && !q() && (z.connectionError = !0, y.trigger("heartbeat-connection-lost", [a, b])) | |
| + c && !p() && (y.connectionError = !0, x.trigger("heartbeat-connection-lost", [a, b])) | |
| } | |
| } | |
| - function i() { | |
| - z.hasConnected = !0, q() && (z.errorcount = 0, z.connectionError = !1, y.trigger("heartbeat-connection-restored")) | |
| + function h() { | |
| + y.hasConnected = !0, p() && (y.errorcount = 0, y.connectionError = !1, x.trigger("heartbeat-connection-restored")) | |
| } | |
| - function j() { | |
| - var c, d; | |
| - z.connecting || z.suspend || (z.lastTick = e(), d = a.extend({}, z.queue), z.queue = {}, y.trigger("heartbeat-send", [d]), c = { | |
| - data: d, | |
| - interval: z.tempInterval ? z.tempInterval / 1e3 : z.mainInterval / 1e3, | |
| + function i() { | |
| + var c, e; | |
| + y.connecting || y.suspend || (y.lastTick = d(), e = a.extend({}, y.queue), y.queue = {}, x.trigger("heartbeat-send", [e]), c = { | |
| + data: e, | |
| + interval: y.tempInterval ? y.tempInterval / 1e3 : y.mainInterval / 1e3, | |
| _nonce: "object" == typeof b.heartbeatSettings ? b.heartbeatSettings.nonce : "", | |
| action: "heartbeat", | |
| - screen_id: z.screenId, | |
| - has_focus: z.hasFocus | |
| - }, "customize" === z.screenId && (c.wp_customize = "on"), z.connecting = !0, z.xhr = a.ajax({ | |
| - url: z.url, | |
| + screen_id: y.screenId, | |
| + has_focus: y.hasFocus | |
| + }, "customize" === y.screenId && (c.wp_customize = "on"), y.connecting = !0, y.xhr = a.ajax({ | |
| + url: y.url, | |
| type: "post", | |
| timeout: 3e4, | |
| data: c, | |
| dataType: "json" | |
| }).always(function() { | |
| - z.connecting = !1, k() | |
| + y.connecting = !1, j() | |
| }).done(function(a, b, c) { | |
| var d; | |
| - return a ? (i(), a.nonces_expired && y.trigger("heartbeat-nonces-expired"), a.heartbeat_interval && (d = a.heartbeat_interval, delete a.heartbeat_interval), y.trigger("heartbeat-tick", [a, b, c]), void(d && t(d))) : void h("empty") | |
| + if (!a) return void g("empty"); | |
| + h(), a.nonces_expired && x.trigger("heartbeat-nonces-expired"), a.heartbeat_interval && (d = a.heartbeat_interval, delete a.heartbeat_interval), x.trigger("heartbeat-tick", [a, b, c]), d && s(d) | |
| }).fail(function(a, b, c) { | |
| - h(b || "unknown", a.status), y.trigger("heartbeat-error", [a, b, c]) | |
| + g(b || "unknown", a.status), x.trigger("heartbeat-error", [a, b, c]) | |
| })) | |
| } | |
| + function j() { | |
| + var a = d() - y.lastTick, | |
| + c = y.mainInterval; | |
| + y.suspend || (y.hasFocus ? y.countdown > 0 && y.tempInterval && (c = y.tempInterval, --y.countdown < 1 && (y.tempInterval = 0)) : c = 12e4, y.minimalInterval && c < y.minimalInterval && (c = y.minimalInterval), b.clearTimeout(y.beatTimer), a < c ? y.beatTimer = b.setTimeout(function() { | |
| + i() | |
| + }, c - a) : i()) | |
| + } | |
| + | |
| function k() { | |
| - var a = e() - z.lastTick, | |
| - c = z.mainInterval; | |
| - z.suspend || (z.hasFocus ? z.countdown > 0 && z.tempInterval && (c = z.tempInterval, z.countdown--, z.countdown < 1 && (z.tempInterval = 0)) : c = 12e4, z.minimalInterval && c < z.minimalInterval && (c = z.minimalInterval), b.clearTimeout(z.beatTimer), a < c ? z.beatTimer = b.setTimeout(function() { | |
| - j() | |
| - }, c - a) : j()) | |
| + y.hasFocus = !1 | |
| } | |
| function l() { | |
| - z.hasFocus = !1 | |
| + y.userActivity = d(), y.suspend = !1, y.hasFocus || (y.hasFocus = !0, j()) | |
| } | |
| function m() { | |
| - z.userActivity = e(), z.suspend = !1, z.hasFocus || (z.hasFocus = !0, k()) | |
| + y.userActivityEvents = !1, x.off(".wp-heartbeat-active"), a("iframe").each(function(b, c) { | |
| + e(c) && a(c.contentWindow).off(".wp-heartbeat-active") | |
| + }), l() | |
| } | |
| function n() { | |
| - z.userActivityEvents = !1, y.off(".wp-heartbeat-active"), a("iframe").each(function(b, c) { | |
| - f(c) && a(c.contentWindow).off(".wp-heartbeat-active") | |
| - }), m() | |
| + var b = y.userActivity ? d() - y.userActivity : 0; | |
| + b > 3e5 && y.hasFocus && k(), (y.suspendEnabled && b > 6e5 || b > 36e5) && (y.suspend = !0), y.userActivityEvents || (x.on("mouseover.wp-heartbeat-active keyup.wp-heartbeat-active touchend.wp-heartbeat-active", function() { | |
| + m() | |
| + }), a("iframe").each(function(b, c) { | |
| + e(c) && a(c.contentWindow).on("mouseover.wp-heartbeat-active keyup.wp-heartbeat-active touchend.wp-heartbeat-active", function() { | |
| + m() | |
| + }) | |
| + }), y.userActivityEvents = !0) | |
| } | |
| function o() { | |
| - var b = z.userActivity ? e() - z.userActivity : 0; | |
| - b > 3e5 && z.hasFocus && l(), (z.suspendEnabled && b > 6e5 || b > 36e5) && (z.suspend = !0), z.userActivityEvents || (y.on("mouseover.wp-heartbeat-active keyup.wp-heartbeat-active touchend.wp-heartbeat-active", function() { | |
| - n() | |
| - }), a("iframe").each(function(b, c) { | |
| - f(c) && a(c.contentWindow).on("mouseover.wp-heartbeat-active keyup.wp-heartbeat-active touchend.wp-heartbeat-active", function() { | |
| - n() | |
| - }) | |
| - }), z.userActivityEvents = !0) | |
| + return y.hasFocus | |
| } | |
| function p() { | |
| - return z.hasFocus | |
| + return y.connectionError | |
| } | |
| function q() { | |
| - return z.connectionError | |
| + y.lastTick = 0, j() | |
| } | |
| function r() { | |
| - z.lastTick = 0, k() | |
| - } | |
| - | |
| - function s() { | |
| - z.suspendEnabled = !1 | |
| + y.suspendEnabled = !1 | |
| } | |
| - function t(a, b) { | |
| - var c, d = z.tempInterval ? z.tempInterval : z.mainInterval; | |
| + function s(a, b) { | |
| + var c, d = y.tempInterval ? y.tempInterval : y.mainInterval; | |
| if (a) { | |
| switch (a) { | |
| case "fast": | |
| @@ -150,32 +140,32 @@ | |
| c = 12e4; | |
| break; | |
| case "long-polling": | |
| - return z.mainInterval = 0, 0; | |
| + return y.mainInterval = 0, 0; | |
| default: | |
| - c = z.originalInterval | |
| + c = y.originalInterval | |
| } | |
| - z.minimalInterval && c < z.minimalInterval && (c = z.minimalInterval), 5e3 === c ? (b = parseInt(b, 10) || 30, b = b < 1 || b > 30 ? 30 : b, z.countdown = b, z.tempInterval = c) : (z.countdown = 0, z.tempInterval = 0, z.mainInterval = c), c !== d && k() | |
| + y.minimalInterval && c < y.minimalInterval && (c = y.minimalInterval), 5e3 === c ? (b = parseInt(b, 10) || 30, b = b < 1 || b > 30 ? 30 : b, y.countdown = b, y.tempInterval = c) : (y.countdown = 0, y.tempInterval = 0, y.mainInterval = c), c !== d && j() | |
| } | |
| - return z.tempInterval ? z.tempInterval / 1e3 : z.mainInterval / 1e3 | |
| + return y.tempInterval ? y.tempInterval / 1e3 : y.mainInterval / 1e3 | |
| } | |
| - function u(a, b, c) { | |
| - return !!a && ((!c || !this.isQueued(a)) && (z.queue[a] = b, !0)) | |
| + function t(a, b, c) { | |
| + return !!a && ((!c || !this.isQueued(a)) && (y.queue[a] = b, !0)) | |
| } | |
| - function v(a) { | |
| - if (a) return z.queue.hasOwnProperty(a) | |
| + function u(a) { | |
| + if (a) return y.queue.hasOwnProperty(a) | |
| } | |
| - function w(a) { | |
| - a && delete z.queue[a] | |
| + function v(a) { | |
| + a && delete y.queue[a] | |
| } | |
| - function x(a) { | |
| - if (a) return this.isQueued(a) ? z.queue[a] : c | |
| + function w(a) { | |
| + if (a) return this.isQueued(a) ? y.queue[a] : c | |
| } | |
| - var y = a(document), | |
| - z = { | |
| + var x = a(document), | |
| + y = { | |
| suspend: !1, | |
| suspendEnabled: !0, | |
| screenId: "", | |
| @@ -197,16 +187,25 @@ | |
| checkFocusTimer: 0, | |
| beatTimer: 0 | |
| }; | |
| - return d(), { | |
| - hasFocus: p, | |
| - connectNow: r, | |
| - disableSuspend: s, | |
| - interval: t, | |
| - hasConnectionError: q, | |
| - enqueue: u, | |
| - dequeue: w, | |
| - isQueued: v, | |
| - getQueuedItem: x | |
| + return function() { | |
| + var c, e, g, h; | |
| + "string" == typeof b.pagenow && (y.screenId = b.pagenow), "string" == typeof b.ajaxurl && (y.url = b.ajaxurl), "object" == typeof b.heartbeatSettings && (c = b.heartbeatSettings, !y.url && c.ajaxurl && (y.url = c.ajaxurl), c.interval && (y.mainInterval = c.interval, y.mainInterval < 15 ? y.mainInterval = 15 : y.mainInterval > 120 && (y.mainInterval = 120)), c.minimalInterval && (c.minimalInterval = parseInt(c.minimalInterval, 10), y.minimalInterval = c.minimalInterval > 0 && c.minimalInterval <= 600 ? 1e3 * c.minimalInterval : 0), y.minimalInterval && y.mainInterval < y.minimalInterval && (y.mainInterval = y.minimalInterval), y.screenId || (y.screenId = c.screenId || "front"), "disable" === c.suspension && (y.suspendEnabled = !1)), y.mainInterval = 1e3 * y.mainInterval, y.originalInterval = y.mainInterval, "undefined" != typeof document.hidden ? (e = "hidden", h = "visibilitychange", g = "visibilityState") : "undefined" != typeof document.msHidden ? (e = "msHidden", h = "msvisibilitychange", g = "msVisibilityState") : "undefined" != typeof document.webkitHidden && (e = "webkitHidden", h = "webkitvisibilitychange", g = "webkitVisibilityState"), e && (document[e] && (y.hasFocus = !1), x.on(h + ".wp-heartbeat", function() { | |
| + "hidden" === document[g] ? (k(), b.clearInterval(y.checkFocusTimer)) : (l(), document.hasFocus && (y.checkFocusTimer = b.setInterval(f, 1e4))) | |
| + })), document.hasFocus && (y.checkFocusTimer = b.setInterval(f, 1e4)), a(b).on("unload.wp-heartbeat", function() { | |
| + y.suspend = !0, y.xhr && 4 !== y.xhr.readyState && y.xhr.abort() | |
| + }), b.setInterval(n, 3e4), x.ready(function() { | |
| + y.lastTick = d(), j() | |
| + }) | |
| + }(), { | |
| + hasFocus: o, | |
| + connectNow: q, | |
| + disableSuspend: r, | |
| + interval: s, | |
| + hasConnectionError: p, | |
| + enqueue: t, | |
| + dequeue: v, | |
| + isQueued: u, | |
| + getQueuedItem: w | |
| } | |
| }; | |
| b.wp = b.wp || {}, b.wp.heartbeat = new d | |
| diff -ur build-unminified/wp-includes/js/hoverIntent.min.js build-branch-unminified/wp-includes/js/hoverIntent.min.js | |
| --- build-unminified/wp-includes/js/hoverIntent.min.js 2018-10-06 21:45:27.078583058 -0500 | |
| +++ build-branch-unminified/wp-includes/js/hoverIntent.min.js 2018-10-06 21:42:28.617252509 -0500 | |
| @@ -18,9 +18,10 @@ | |
| f = a.pageX, g = a.pageY | |
| }, | |
| k = function(b, c) { | |
| - return c.hoverIntent_t = clearTimeout(c.hoverIntent_t), Math.sqrt((h - f) * (h - f) + (i - g) * (i - g)) < e.sensitivity ? (a(c).off("mousemove.hoverIntent", j), c.hoverIntent_s = !0, e.over.apply(c, [b])) : (h = f, i = g, c.hoverIntent_t = setTimeout(function() { | |
| + if (c.hoverIntent_t = clearTimeout(c.hoverIntent_t), Math.sqrt((h - f) * (h - f) + (i - g) * (i - g)) < e.sensitivity) return a(c).off("mousemove.hoverIntent", j), c.hoverIntent_s = !0, e.over.apply(c, [b]); | |
| + h = f, i = g, c.hoverIntent_t = setTimeout(function() { | |
| k(b, c) | |
| - }, e.interval), void 0) | |
| + }, e.interval) | |
| }, | |
| l = function(a, b) { | |
| return b.hoverIntent_t = clearTimeout(b.hoverIntent_t), b.hoverIntent_s = !1, e.out.apply(b, [a]) | |
| diff -ur build-unminified/wp-includes/js/imagesloaded.min.js build-branch-unminified/wp-includes/js/imagesloaded.min.js | |
| --- build-unminified/wp-includes/js/imagesloaded.min.js 2018-10-06 21:45:37.502660785 -0500 | |
| +++ build-branch-unminified/wp-includes/js/imagesloaded.min.js 2018-10-06 21:42:39.689335051 -0500 | |
| @@ -51,7 +51,7 @@ | |
| return this | |
| }, d.removeListener = function(a, c) { | |
| var d, e, f = this.getListenersAsObject(a); | |
| - for (e in f) f.hasOwnProperty(e) && (d = b(f[e], c), -1 !== d && f[e].splice(d, 1)); | |
| + for (e in f) f.hasOwnProperty(e) && -1 !== (d = b(f[e], c)) && f[e].splice(d, 1); | |
| return this | |
| }, d.off = c("removeListener"), d.addListeners = function(a, b) { | |
| return this.manipulateListeners(!1, a, b) | |
| @@ -74,10 +74,10 @@ | |
| else delete this._events; | |
| return this | |
| }, d.removeAllListeners = c("removeEvent"), d.emitEvent = function(a, b) { | |
| - var c, d, e, f, g = this.getListenersAsObject(a); | |
| - for (e in g) | |
| - if (g.hasOwnProperty(e)) | |
| - for (d = g[e].length; d--;) c = g[e][d], c.once === !0 && this.removeListener(a, c.listener), f = c.listener.apply(this, b || []), f === this._getOnceReturnValue() && this.removeListener(a, c.listener); | |
| + var c, d, e, f = this.getListenersAsObject(a); | |
| + for (e in f) | |
| + if (f.hasOwnProperty(e)) | |
| + for (d = f[e].length; d--;) c = f[e][d], !0 === c.once && this.removeListener(a, c.listener), c.listener.apply(this, b || []) === this._getOnceReturnValue() && this.removeListener(a, c.listener); | |
| return this | |
| }, d.trigger = c("emitEvent"), d.emit = function(a) { | |
| var b = Array.prototype.slice.call(arguments, 1); | |
| @@ -179,7 +179,7 @@ | |
| this.addElementImages(b) | |
| } | |
| }, g.prototype.addElementImages = function(a) { | |
| - "IMG" == a.nodeName && this.addImage(a), this.options.background === !0 && this.addElementBackgroundImages(a); | |
| + "IMG" == a.nodeName && this.addImage(a), !0 === this.options.background && this.addElementBackgroundImages(a); | |
| var b = a.nodeType; | |
| if (b && m[b]) { | |
| for (var c = a.querySelectorAll("img"), d = 0; d < c.length; d++) { | |
| @@ -236,8 +236,7 @@ | |
| this.jqDeferred[b](this) | |
| } | |
| }, h.prototype = new b, h.prototype.check = function() { | |
| - var a = this.getIsImageComplete(); | |
| - return a ? void this.confirm(0 !== this.img.naturalWidth, "naturalWidth") : (this.proxyImage = new Image, c.bind(this.proxyImage, "load", this), c.bind(this.proxyImage, "error", this), c.bind(this.img, "load", this), c.bind(this.img, "error", this), void(this.proxyImage.src = this.img.src)) | |
| + return this.getIsImageComplete() ? void this.confirm(0 !== this.img.naturalWidth, "naturalWidth") : (this.proxyImage = new Image, c.bind(this.proxyImage, "load", this), c.bind(this.proxyImage, "error", this), c.bind(this.img, "load", this), c.bind(this.img, "error", this), void(this.proxyImage.src = this.img.src)) | |
| }, h.prototype.getIsImageComplete = function() { | |
| return this.img.complete && void 0 !== this.img.naturalWidth | |
| }, h.prototype.confirm = function(a, b) { | |
| @@ -252,17 +251,14 @@ | |
| }, h.prototype.unbindEvents = function() { | |
| c.unbind(this.proxyImage, "load", this), c.unbind(this.proxyImage, "error", this), c.unbind(this.img, "load", this), c.unbind(this.img, "error", this) | |
| }, i.prototype = new h, i.prototype.check = function() { | |
| - c.bind(this.img, "load", this), c.bind(this.img, "error", this), this.img.src = this.url; | |
| - var a = this.getIsImageComplete(); | |
| - a && (this.confirm(0 !== this.img.naturalWidth, "naturalWidth"), this.unbindEvents()) | |
| + c.bind(this.img, "load", this), c.bind(this.img, "error", this), this.img.src = this.url, this.getIsImageComplete() && (this.confirm(0 !== this.img.naturalWidth, "naturalWidth"), this.unbindEvents()) | |
| }, i.prototype.unbindEvents = function() { | |
| c.unbind(this.img, "load", this), c.unbind(this.img, "error", this) | |
| }, i.prototype.confirm = function(a, b) { | |
| this.isLoaded = a, this.emit("progress", this, this.element, b) | |
| }, g.makeJQueryPlugin = function(b) { | |
| - b = b || a.jQuery, b && (j = b, j.fn.imagesLoaded = function(a, b) { | |
| - var c = new g(this, a, b); | |
| - return c.jqDeferred.promise(j(this)) | |
| + (b = b || a.jQuery) && (j = b, j.fn.imagesLoaded = function(a, b) { | |
| + return new g(this, a, b).jqDeferred.promise(j(this)) | |
| }) | |
| }, g.makeJQueryPlugin(), g | |
| }); | |
| \ No newline at end of file | |
| diff -ur build-unminified/wp-includes/js/jquery/ui/accordion.min.js build-branch-unminified/wp-includes/js/jquery/ui/accordion.min.js | |
| --- build-unminified/wp-includes/js/jquery/ui/accordion.min.js 2018-10-06 21:45:33.206628752 -0500 | |
| +++ build-branch-unminified/wp-includes/js/jquery/ui/accordion.min.js 2018-10-06 21:42:35.957307229 -0500 | |
| @@ -43,7 +43,7 @@ | |
| }, | |
| _create: function() { | |
| var b = this.options; | |
| - this.prevShow = this.prevHide = a(), this.element.addClass("ui-accordion ui-widget ui-helper-reset").attr("role", "tablist"), b.collapsible || b.active !== !1 && null != b.active || (b.active = 0), this._processPanels(), b.active < 0 && (b.active += this.headers.length), this._refresh() | |
| + this.prevShow = this.prevHide = a(), this.element.addClass("ui-accordion ui-widget ui-helper-reset").attr("role", "tablist"), b.collapsible || !1 !== b.active && null != b.active || (b.active = 0), this._processPanels(), b.active < 0 && (b.active += this.headers.length), this._refresh() | |
| }, | |
| _getCreateEventData: function() { | |
| return { | |
| @@ -63,7 +63,8 @@ | |
| this.element.removeClass("ui-accordion ui-widget ui-helper-reset").removeAttr("role"), this.headers.removeClass("ui-accordion-header ui-accordion-header-active ui-state-default ui-corner-all ui-state-active ui-state-disabled ui-corner-top").removeAttr("role").removeAttr("aria-expanded").removeAttr("aria-selected").removeAttr("aria-controls").removeAttr("tabIndex").removeUniqueId(), this._destroyIcons(), a = this.headers.next().removeClass("ui-helper-reset ui-widget-content ui-corner-bottom ui-accordion-content ui-accordion-content-active ui-state-disabled").css("display", "").removeAttr("role").removeAttr("aria-hidden").removeAttr("aria-labelledby").removeUniqueId(), "content" !== this.options.heightStyle && a.css("height", "") | |
| }, | |
| _setOption: function(a, b) { | |
| - return "active" === a ? void this._activate(b) : ("event" === a && (this.options.event && this._off(this.headers, this.options.event), this._setupEvents(b)), this._super(a, b), "collapsible" !== a || b || this.options.active !== !1 || this._activate(0), "icons" === a && (this._destroyIcons(), b && this._createIcons()), void("disabled" === a && (this.element.toggleClass("ui-state-disabled", !!b).attr("aria-disabled", b), this.headers.add(this.headers.next()).toggleClass("ui-state-disabled", !!b)))) | |
| + if ("active" === a) return void this._activate(b); | |
| + "event" === a && (this.options.event && this._off(this.headers, this.options.event), this._setupEvents(b)), this._super(a, b), "collapsible" !== a || b || !1 !== this.options.active || this._activate(0), "icons" === a && (this._destroyIcons(), b && this._createIcons()), "disabled" === a && (this.element.toggleClass("ui-state-disabled", !!b).attr("aria-disabled", b), this.headers.add(this.headers.next()).toggleClass("ui-state-disabled", !!b)) | |
| }, | |
| _keydown: function(b) { | |
| if (!b.altKey && !b.ctrlKey) { | |
| @@ -98,7 +99,7 @@ | |
| }, | |
| refresh: function() { | |
| var b = this.options; | |
| - this._processPanels(), b.active === !1 && b.collapsible === !0 || !this.headers.length ? (b.active = !1, this.active = a()) : b.active === !1 ? this._activate(0) : this.active.length && !a.contains(this.element[0], this.active[0]) ? this.headers.length === this.headers.find(".ui-state-disabled").length ? (b.active = !1, this.active = a()) : this._activate(Math.max(0, b.active - 1)) : b.active = this.headers.index(this.active), this._destroyIcons(), this._refresh() | |
| + this._processPanels(), !1 === b.active && !0 === b.collapsible || !this.headers.length ? (b.active = !1, this.active = a()) : !1 === b.active ? this._activate(0) : this.active.length && !a.contains(this.element[0], this.active[0]) ? this.headers.length === this.headers.find(".ui-state-disabled").length ? (b.active = !1, this.active = a()) : this._activate(Math.max(0, b.active - 1)) : b.active = this.headers.index(this.active), this._destroyIcons(), this._refresh() | |
| }, | |
| _processPanels: function() { | |
| var a = this.headers, | |
| @@ -174,7 +175,7 @@ | |
| newHeader: g ? a() : e, | |
| newPanel: h | |
| }; | |
| - b.preventDefault(), f && !c.collapsible || this._trigger("beforeActivate", b, j) === !1 || (c.active = !g && this.headers.index(e), this.active = f ? a() : e, this._toggle(j), d.removeClass("ui-accordion-header-active ui-state-active"), c.icons && d.children(".ui-accordion-header-icon").removeClass(c.icons.activeHeader).addClass(c.icons.header), f || (e.removeClass("ui-corner-all").addClass("ui-accordion-header-active ui-state-active ui-corner-top"), c.icons && e.children(".ui-accordion-header-icon").removeClass(c.icons.header).addClass(c.icons.activeHeader), e.next().addClass("ui-accordion-content-active"))) | |
| + b.preventDefault(), f && !c.collapsible || !1 === this._trigger("beforeActivate", b, j) || (c.active = !g && this.headers.index(e), this.active = f ? a() : e, this._toggle(j), d.removeClass("ui-accordion-header-active ui-state-active"), c.icons && d.children(".ui-accordion-header-icon").removeClass(c.icons.activeHeader).addClass(c.icons.header), f || (e.removeClass("ui-corner-all").addClass("ui-accordion-header-active ui-state-active ui-corner-top"), c.icons && e.children(".ui-accordion-header-icon").removeClass(c.icons.header).addClass(c.icons.activeHeader), e.next().addClass("ui-accordion-content-active"))) | |
| }, | |
| _toggle: function(b) { | |
| var c = b.newPanel, | |
| diff -ur build-unminified/wp-includes/js/jquery/ui/autocomplete.min.js build-branch-unminified/wp-includes/js/jquery/ui/autocomplete.min.js | |
| --- build-unminified/wp-includes/js/jquery/ui/autocomplete.min.js 2018-10-06 21:45:30.658609753 -0500 | |
| +++ build-branch-unminified/wp-includes/js/jquery/ui/autocomplete.min.js 2018-10-06 21:42:32.785283582 -0500 | |
| @@ -90,13 +90,15 @@ | |
| } | |
| }, | |
| input: function(a) { | |
| - return d ? (d = !1, void a.preventDefault()) : void this._searchTimeout(a) | |
| + if (d) return d = !1, void a.preventDefault(); | |
| + this._searchTimeout(a) | |
| }, | |
| focus: function() { | |
| this.selectedItem = null, this.previous = this._value() | |
| }, | |
| blur: function(a) { | |
| - return this.cancelBlur ? void delete this.cancelBlur : (clearTimeout(this.searching), this.close(a), void this._change(a)) | |
| + if (this.cancelBlur) return void delete this.cancelBlur; | |
| + clearTimeout(this.searching), this.close(a), this._change(a) | |
| } | |
| }), this._initSource(), this.menu = a("<ul>").addClass("ui-autocomplete ui-front").appendTo(this._appendTo()).menu({ | |
| role: null | |
| @@ -115,11 +117,12 @@ | |
| }, | |
| menufocus: function(b, c) { | |
| var d, e; | |
| - return this.isNewMenu && (this.isNewMenu = !1, b.originalEvent && /^mouse/.test(b.originalEvent.type)) ? (this.menu.blur(), void this.document.one("mousemove", function() { | |
| + if (this.isNewMenu && (this.isNewMenu = !1, b.originalEvent && /^mouse/.test(b.originalEvent.type))) return this.menu.blur(), void this.document.one("mousemove", function() { | |
| a(b.target).trigger(b.originalEvent) | |
| - })) : (e = c.item.data("ui-autocomplete-item"), !1 !== this._trigger("focus", b, { | |
| + }); | |
| + e = c.item.data("ui-autocomplete-item"), !1 !== this._trigger("focus", b, { | |
| item: e | |
| - }) && b.originalEvent && /^key/.test(b.originalEvent.type) && this._value(e.value), d = c.item.attr("aria-label") || e.value, void(d && a.trim(d).length && (this.liveRegion.children().hide(), a("<div>").text(d).appendTo(this.liveRegion)))) | |
| + }) && b.originalEvent && /^key/.test(b.originalEvent.type) && this._value(e.value), (d = c.item.attr("aria-label") || e.value) && a.trim(d).length && (this.liveRegion.children().hide(), a("<div>").text(d).appendTo(this.liveRegion)) | |
| }, | |
| menuselect: function(a, b) { | |
| var c = b.item.data("ui-autocomplete-item"), | |
| @@ -177,7 +180,7 @@ | |
| }, this.options.delay) | |
| }, | |
| search: function(a, b) { | |
| - return a = null != a ? a : this._value(), this.term = this._value(), a.length < this.options.minLength ? this.close(b) : this._trigger("search", b) !== !1 ? this._search(a) : void 0 | |
| + return a = null != a ? a : this._value(), this.term = this._value(), a.length < this.options.minLength ? this.close(b) : !1 !== this._trigger("search", b) ? this._search(a) : void 0 | |
| }, | |
| _search: function(a) { | |
| this.pending++, this.element.addClass("ui-autocomplete-loading"), this.cancelSearch = !1, this.source({ | |
| @@ -187,7 +190,7 @@ | |
| _response: function() { | |
| var b = ++this.requestIndex; | |
| return a.proxy(function(a) { | |
| - b === this.requestIndex && this.__response(a), this.pending--, this.pending || this.element.removeClass("ui-autocomplete-loading") | |
| + b === this.requestIndex && this.__response(a), --this.pending || this.element.removeClass("ui-autocomplete-loading") | |
| }, this) | |
| }, | |
| __response: function(a) { | |
| diff -ur build-unminified/wp-includes/js/jquery/ui/button.min.js build-branch-unminified/wp-includes/js/jquery/ui/button.min.js | |
| --- build-unminified/wp-includes/js/jquery/ui/button.min.js 2018-10-06 21:45:31.234614048 -0500 | |
| +++ build-branch-unminified/wp-includes/js/jquery/ui/button.min.js 2018-10-06 21:42:33.685290291 -0500 | |
| @@ -70,13 +70,16 @@ | |
| return a(this).button("widget")[0] | |
| }).removeClass("ui-state-active").attr("aria-pressed", "false") | |
| }) : (this.buttonElement.bind("mousedown" + this.eventNamespace, function() { | |
| - return !g.disabled && (a(this).addClass("ui-state-active"), b = this, void d.document.one("mouseup", function() { | |
| + if (g.disabled) return !1; | |
| + a(this).addClass("ui-state-active"), b = this, d.document.one("mouseup", function() { | |
| b = null | |
| - })) | |
| + }) | |
| }).bind("mouseup" + this.eventNamespace, function() { | |
| - return !g.disabled && void a(this).removeClass("ui-state-active") | |
| + if (g.disabled) return !1; | |
| + a(this).removeClass("ui-state-active") | |
| }).bind("keydown" + this.eventNamespace, function(b) { | |
| - return !g.disabled && void(b.keyCode !== a.ui.keyCode.SPACE && b.keyCode !== a.ui.keyCode.ENTER || a(this).addClass("ui-state-active")) | |
| + if (g.disabled) return !1; | |
| + b.keyCode !== a.ui.keyCode.SPACE && b.keyCode !== a.ui.keyCode.ENTER || a(this).addClass("ui-state-active") | |
| }).bind("keyup" + this.eventNamespace + " blur" + this.eventNamespace, function() { | |
| a(this).removeClass("ui-state-active") | |
| }), this.buttonElement.is("a") && this.buttonElement.keyup(function(b) { | |
| @@ -94,7 +97,8 @@ | |
| this.element.removeClass("ui-helper-hidden-accessible"), this.buttonElement.removeClass(c + " ui-state-active " + d).removeAttr("role").removeAttr("aria-pressed").html(this.buttonElement.find(".ui-button-text").html()), this.hasTitle || this.buttonElement.removeAttr("title") | |
| }, | |
| _setOption: function(a, b) { | |
| - return this._super(a, b), "disabled" === a ? (this.widget().toggleClass("ui-state-disabled", !!b), this.element.prop("disabled", !!b), void(b && ("checkbox" === this.type || "radio" === this.type ? this.buttonElement.removeClass("ui-state-focus") : this.buttonElement.removeClass("ui-state-focus ui-state-active")))) : void this._resetButton() | |
| + if (this._super(a, b), "disabled" === a) return this.widget().toggleClass("ui-state-disabled", !!b), this.element.prop("disabled", !!b), void(b && ("checkbox" === this.type || "radio" === this.type ? this.buttonElement.removeClass("ui-state-focus") : this.buttonElement.removeClass("ui-state-focus ui-state-active"))); | |
| + this._resetButton() | |
| }, | |
| refresh: function() { | |
| var b = this.element.is("input, button") ? this.element.is(":disabled") : this.element.hasClass("ui-button-disabled"); | |
| diff -ur build-unminified/wp-includes/js/jquery/ui/core.min.js build-branch-unminified/wp-includes/js/jquery/ui/core.min.js | |
| --- build-unminified/wp-includes/js/jquery/ui/core.min.js 2018-10-06 21:45:30.886611453 -0500 | |
| +++ build-branch-unminified/wp-includes/js/jquery/ui/core.min.js 2018-10-06 21:42:33.057285610 -0500 | |
| @@ -13,7 +13,7 @@ | |
| }(function(a) { | |
| function b(b, d) { | |
| var e, f, g, h = b.nodeName.toLowerCase(); | |
| - return "area" === h ? (e = b.parentNode, f = e.name, !(!b.href || !f || "map" !== e.nodeName.toLowerCase()) && (g = a("img[usemap='#" + f + "']")[0], !!g && c(g))) : (/^(input|select|textarea|button|object)$/.test(h) ? !b.disabled : "a" === h ? b.href || d : d) && c(b) | |
| + return "area" === h ? (e = b.parentNode, f = e.name, !(!b.href || !f || "map" !== e.nodeName.toLowerCase()) && (!!(g = a("img[usemap='#" + f + "']")[0]) && c(g))) : (/^(input|select|textarea|button|object)$/.test(h) ? !b.disabled : "a" === h ? b.href || d : d) && c(b) | |
| } | |
| function c(b) { | |
| @@ -96,7 +96,7 @@ | |
| outerHeight: a.fn.outerHeight | |
| }; | |
| a.fn["inner" + c] = function(b) { | |
| - return void 0 === b ? g["inner" + c].call(this) : this.each(function() { | |
| + return b === undefined ? g["inner" + c].call(this) : this.each(function() { | |
| a(this).css(f, d(this, b) + "px") | |
| }) | |
| }, a.fn["outer" + c] = function(b, e) { | |
| @@ -133,10 +133,10 @@ | |
| return this.unbind(".ui-disableSelection") | |
| }, | |
| zIndex: function(b) { | |
| - if (void 0 !== b) return this.css("zIndex", b); | |
| + if (b !== undefined) return this.css("zIndex", b); | |
| if (this.length) | |
| for (var c, d, e = a(this[0]); e.length && e[0] !== document;) { | |
| - if (c = e.css("position"), ("absolute" === c || "relative" === c || "fixed" === c) && (d = parseInt(e.css("zIndex"), 10), !isNaN(d) && 0 !== d)) return d; | |
| + if (("absolute" === (c = e.css("position")) || "relative" === c || "fixed" === c) && (d = parseInt(e.css("zIndex"), 10), !isNaN(d) && 0 !== d)) return d; | |
| e = e.parent() | |
| } | |
| return 0 | |
| diff -ur build-unminified/wp-includes/js/jquery/ui/datepicker.min.js build-branch-unminified/wp-includes/js/jquery/ui/datepicker.min.js | |
| --- build-unminified/wp-includes/js/jquery/ui/datepicker.min.js 2018-10-06 21:45:29.034597644 -0500 | |
| +++ build-branch-unminified/wp-includes/js/jquery/ui/datepicker.min.js 2018-10-06 21:42:30.833269029 -0500 | |
| @@ -13,7 +13,7 @@ | |
| }(function(a) { | |
| function b(a) { | |
| for (var b, c; a.length && a[0] !== document;) { | |
| - if (b = a.css("position"), ("absolute" === b || "relative" === b || "fixed" === b) && (c = parseInt(a.css("zIndex"), 10), !isNaN(c) && 0 !== c)) return c; | |
| + if (("absolute" === (b = a.css("position")) || "relative" === b || "fixed" === b) && (c = parseInt(a.css("zIndex"), 10), !isNaN(c) && 0 !== c)) return c; | |
| a = a.parent() | |
| } | |
| return 0 | |
| @@ -80,12 +80,12 @@ | |
| function d(b) { | |
| var c = "button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a"; | |
| return b.delegate(c, "mouseout", function() { | |
| - a(this).removeClass("ui-state-hover"), this.className.indexOf("ui-datepicker-prev") !== -1 && a(this).removeClass("ui-datepicker-prev-hover"), this.className.indexOf("ui-datepicker-next") !== -1 && a(this).removeClass("ui-datepicker-next-hover") | |
| + a(this).removeClass("ui-state-hover"), -1 !== this.className.indexOf("ui-datepicker-prev") && a(this).removeClass("ui-datepicker-prev-hover"), -1 !== this.className.indexOf("ui-datepicker-next") && a(this).removeClass("ui-datepicker-next-hover") | |
| }).delegate(c, "mouseover", e) | |
| } | |
| function e() { | |
| - a.datepicker._isDisabledDatepicker(g.inline ? g.dpDiv.parent()[0] : g.input[0]) || (a(this).parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover"), a(this).addClass("ui-state-hover"), this.className.indexOf("ui-datepicker-prev") !== -1 && a(this).addClass("ui-datepicker-prev-hover"), this.className.indexOf("ui-datepicker-next") !== -1 && a(this).addClass("ui-datepicker-next-hover")) | |
| + a.datepicker._isDisabledDatepicker(g.inline ? g.dpDiv.parent()[0] : g.input[0]) || (a(this).parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover"), a(this).addClass("ui-state-hover"), -1 !== this.className.indexOf("ui-datepicker-prev") && a(this).addClass("ui-datepicker-prev-hover"), -1 !== this.className.indexOf("ui-datepicker-next") && a(this).addClass("ui-datepicker-next-hover")) | |
| } | |
| function f(b, c) { | |
| @@ -113,9 +113,8 @@ | |
| d = b.nodeName.toLowerCase(), e = "div" === d || "span" === d, b.id || (this.uuid += 1, b.id = "dp" + this.uuid), f = this._newInst(a(b), e), f.settings = a.extend({}, c || {}), "input" === d ? this._connectDatepicker(b, f) : e && this._inlineDatepicker(b, f) | |
| }, | |
| _newInst: function(b, c) { | |
| - var e = b[0].id.replace(/([^A-Za-z0-9_\-])/g, "\\\\$1"); | |
| return { | |
| - id: e, | |
| + id: b[0].id.replace(/([^A-Za-z0-9_\-])/g, "\\\\$1"), | |
| input: b, | |
| selectedDay: 0, | |
| selectedMonth: 0, | |
| @@ -207,7 +206,8 @@ | |
| }, | |
| _optionDatepicker: function(b, c, d) { | |
| var e, g, h, i, j = this._getInst(b); | |
| - return 2 === arguments.length && "string" == typeof c ? "defaults" === c ? a.extend({}, a.datepicker._defaults) : j ? "all" === c ? a.extend({}, j.settings) : this._get(j, c) : null : (e = c || {}, "string" == typeof c && (e = {}, e[c] = d), void(j && (this._curInst === j && this._hideDatepicker(), g = this._getDateDatepicker(b, !0), h = this._getMinMaxDate(j, "min"), i = this._getMinMaxDate(j, "max"), f(j.settings, e), null !== h && void 0 !== e.dateFormat && void 0 === e.minDate && (j.settings.minDate = this._formatDate(j, h)), null !== i && void 0 !== e.dateFormat && void 0 === e.maxDate && (j.settings.maxDate = this._formatDate(j, i)), "disabled" in e && (e.disabled ? this._disableDatepicker(b) : this._enableDatepicker(b)), this._attachments(a(b), j), this._autoSize(j), this._setDate(j, g), this._updateAlternate(j), this._updateDatepicker(j)))) | |
| + if (2 === arguments.length && "string" == typeof c) return "defaults" === c ? a.extend({}, a.datepicker._defaults) : j ? "all" === c ? a.extend({}, j.settings) : this._get(j, c) : null; | |
| + e = c || {}, "string" == typeof c && (e = {}, e[c] = d), j && (this._curInst === j && this._hideDatepicker(), g = this._getDateDatepicker(b, !0), h = this._getMinMaxDate(j, "min"), i = this._getMinMaxDate(j, "max"), f(j.settings, e), null !== h && e.dateFormat !== undefined && e.minDate === undefined && (j.settings.minDate = this._formatDate(j, h)), null !== i && e.dateFormat !== undefined && e.maxDate === undefined && (j.settings.maxDate = this._formatDate(j, i)), "disabled" in e && (e.disabled ? this._disableDatepicker(b) : this._enableDatepicker(b)), this._attachments(a(b), j), this._autoSize(j), this._setDate(j, g), this._updateAlternate(j), this._updateDatepicker(j)) | |
| }, | |
| _changeDatepicker: function(a, b, c) { | |
| this._optionDatepicker(a, b, c) | |
| @@ -280,8 +280,8 @@ | |
| _showDatepicker: function(c) { | |
| if (c = c.target || c, "input" !== c.nodeName.toLowerCase() && (c = a("input", c.parentNode)[0]), !a.datepicker._isDisabledDatepicker(c) && a.datepicker._lastInput !== c) { | |
| var d, e, g, h, i, j, k; | |
| - d = a.datepicker._getInst(c), a.datepicker._curInst && a.datepicker._curInst !== d && (a.datepicker._curInst.dpDiv.stop(!0, !0), d && a.datepicker._datepickerShowing && a.datepicker._hideDatepicker(a.datepicker._curInst.input[0])), e = a.datepicker._get(d, "beforeShow"), g = e ? e.apply(c, [c, d]) : {}, g !== !1 && (f(d.settings, g), d.lastVal = null, a.datepicker._lastInput = c, a.datepicker._setDateFromField(d), a.datepicker._inDialog && (c.value = ""), a.datepicker._pos || (a.datepicker._pos = a.datepicker._findPos(c), a.datepicker._pos[1] += c.offsetHeight), h = !1, a(c).parents().each(function() { | |
| - return h |= "fixed" === a(this).css("position"), !h | |
| + d = a.datepicker._getInst(c), a.datepicker._curInst && a.datepicker._curInst !== d && (a.datepicker._curInst.dpDiv.stop(!0, !0), d && a.datepicker._datepickerShowing && a.datepicker._hideDatepicker(a.datepicker._curInst.input[0])), e = a.datepicker._get(d, "beforeShow"), g = e ? e.apply(c, [c, d]) : {}, !1 !== g && (f(d.settings, g), d.lastVal = null, a.datepicker._lastInput = c, a.datepicker._setDateFromField(d), a.datepicker._inDialog && (c.value = ""), a.datepicker._pos || (a.datepicker._pos = a.datepicker._findPos(c), a.datepicker._pos[1] += c.offsetHeight), h = !1, a(c).parents().each(function() { | |
| + return !(h |= "fixed" === a(this).css("position")) | |
| }), i = { | |
| left: a.datepicker._pos[0], | |
| top: a.datepicker._pos[1] | |
| @@ -301,9 +301,8 @@ | |
| this.maxRows = 4, g = b, b.dpDiv.empty().append(this._generateHTML(b)), this._attachHandlers(b); | |
| var c, d = this._getNumberOfMonths(b), | |
| f = d[1], | |
| - h = 17, | |
| - i = b.dpDiv.find("." + this._dayOverClass + " a"); | |
| - i.length > 0 && e.apply(i.get(0)), b.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width(""), f > 1 && b.dpDiv.addClass("ui-datepicker-multi-" + f).css("width", h * f + "em"), b.dpDiv[(1 !== d[0] || 1 !== d[1] ? "add" : "remove") + "Class"]("ui-datepicker-multi"), b.dpDiv[(this._get(b, "isRTL") ? "add" : "remove") + "Class"]("ui-datepicker-rtl"), b === a.datepicker._curInst && a.datepicker._datepickerShowing && a.datepicker._shouldFocusInput(b) && b.input.focus(), b.yearshtml && (c = b.yearshtml, setTimeout(function() { | |
| + h = b.dpDiv.find("." + this._dayOverClass + " a"); | |
| + h.length > 0 && e.apply(h.get(0)), b.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width(""), f > 1 && b.dpDiv.addClass("ui-datepicker-multi-" + f).css("width", 17 * f + "em"), b.dpDiv[(1 !== d[0] || 1 !== d[1] ? "add" : "remove") + "Class"]("ui-datepicker-multi"), b.dpDiv[(this._get(b, "isRTL") ? "add" : "remove") + "Class"]("ui-datepicker-rtl"), b === a.datepicker._curInst && a.datepicker._datepickerShowing && a.datepicker._shouldFocusInput(b) && b.input.focus(), b.yearshtml && (c = b.yearshtml, setTimeout(function() { | |
| c === b.yearshtml && b.yearshtml && b.dpDiv.find("select.ui-datepicker-year:first").replaceWith(b.yearshtml), c = b.yearshtml = null | |
| }, 0)) | |
| }, | |
| @@ -387,7 +386,7 @@ | |
| }, | |
| parseDate: function(b, c, d) { | |
| if (null == b || null == c) throw "Invalid arguments"; | |
| - if (c = "object" == typeof c ? c.toString() : c + "", "" === c) return null; | |
| + if ("" === (c = "object" == typeof c ? c.toString() : c + "")) return null; | |
| var e, f, g, h, i = 0, | |
| j = (d ? d.shortYearCutoff : null) || this._defaults.shortYearCutoff, | |
| k = "string" != typeof j ? j : (new Date).getFullYear() % 100 + parseInt(j, 10), | |
| @@ -425,7 +424,7 @@ | |
| if (a.each(g, function(a, b) { | |
| var d = b[1]; | |
| if (c.substr(i, d.length).toLowerCase() === d.toLowerCase()) return f = b[0], i += d.length, !1 | |
| - }), f !== -1) return f + 1; | |
| + }), -1 !== f) return f + 1; | |
| throw "Unknown name at position " + i | |
| }, | |
| x = function() { | |
| @@ -466,7 +465,7 @@ | |
| x() | |
| } | |
| if (i < c.length && (g = c.substr(i), !/^\s+/.test(g))) throw "Extra/unparsed characters found in date: " + g; | |
| - if (p === -1 ? p = (new Date).getFullYear() : p < 100 && (p += (new Date).getFullYear() - (new Date).getFullYear() % 100 + (p <= k ? 0 : -100)), s > -1) | |
| + if (-1 === p ? p = (new Date).getFullYear() : p < 100 && (p += (new Date).getFullYear() - (new Date).getFullYear() % 100 + (p <= k ? 0 : -100)), s > -1) | |
| for (q = 1, r = s;;) { | |
| if (f = this._getDaysInMonth(p, q - 1), r <= f) break; | |
| q++, r -= f | |
| @@ -572,7 +571,7 @@ | |
| return c | |
| }, | |
| _get: function(a, b) { | |
| - return void 0 !== a.settings[b] ? a.settings[b] : this._defaults[b] | |
| + return a.settings[b] !== undefined ? a.settings[b] : this._defaults[b] | |
| }, | |
| _setDateFromField: function(a, b) { | |
| if (a.input.val() !== a.lastVal) { | |
| @@ -593,38 +592,36 @@ | |
| return this._restrictMinMax(a, this._determineDate(a, this._get(a, "defaultDate"), new Date)) | |
| }, | |
| _determineDate: function(b, c, d) { | |
| - var e = function(a) { | |
| - var b = new Date; | |
| - return b.setDate(b.getDate() + a), b | |
| - }, | |
| - f = function(c) { | |
| - try { | |
| - return a.datepicker.parseDate(a.datepicker._get(b, "dateFormat"), c, a.datepicker._getFormatConfig(b)) | |
| - } catch (d) {} | |
| - for (var e = (c.toLowerCase().match(/^c/) ? a.datepicker._getDate(b) : null) || new Date, f = e.getFullYear(), g = e.getMonth(), h = e.getDate(), i = /([+\-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g, j = i.exec(c); j;) { | |
| - switch (j[2] || "d") { | |
| - case "d": | |
| - case "D": | |
| - h += parseInt(j[1], 10); | |
| - break; | |
| - case "w": | |
| - case "W": | |
| - h += 7 * parseInt(j[1], 10); | |
| - break; | |
| - case "m": | |
| - case "M": | |
| - g += parseInt(j[1], 10), h = Math.min(h, a.datepicker._getDaysInMonth(f, g)); | |
| - break; | |
| - case "y": | |
| - case "Y": | |
| - f += parseInt(j[1], 10), h = Math.min(h, a.datepicker._getDaysInMonth(f, g)) | |
| - } | |
| - j = i.exec(c) | |
| + var e = null == c || "" === c ? d : "string" == typeof c ? function(c) { | |
| + try { | |
| + return a.datepicker.parseDate(a.datepicker._get(b, "dateFormat"), c, a.datepicker._getFormatConfig(b)) | |
| + } catch (j) {} | |
| + for (var d = (c.toLowerCase().match(/^c/) ? a.datepicker._getDate(b) : null) || new Date, e = d.getFullYear(), f = d.getMonth(), g = d.getDate(), h = /([+\-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g, i = h.exec(c); i;) { | |
| + switch (i[2] || "d") { | |
| + case "d": | |
| + case "D": | |
| + g += parseInt(i[1], 10); | |
| + break; | |
| + case "w": | |
| + case "W": | |
| + g += 7 * parseInt(i[1], 10); | |
| + break; | |
| + case "m": | |
| + case "M": | |
| + f += parseInt(i[1], 10), g = Math.min(g, a.datepicker._getDaysInMonth(e, f)); | |
| + break; | |
| + case "y": | |
| + case "Y": | |
| + e += parseInt(i[1], 10), g = Math.min(g, a.datepicker._getDaysInMonth(e, f)) | |
| } | |
| - return new Date(f, g, h) | |
| - }, | |
| - g = null == c || "" === c ? d : "string" == typeof c ? f(c) : "number" == typeof c ? isNaN(c) ? d : e(c) : new Date(c.getTime()); | |
| - return g = g && "Invalid Date" === g.toString() ? d : g, g && (g.setHours(0), g.setMinutes(0), g.setSeconds(0), g.setMilliseconds(0)), this._daylightSavingAdjust(g) | |
| + i = h.exec(c) | |
| + } | |
| + return new Date(e, f, g) | |
| + }(c) : "number" == typeof c ? isNaN(c) ? d : function(a) { | |
| + var b = new Date; | |
| + return b.setDate(b.getDate() + a), b | |
| + }(c) : new Date(c.getTime()); | |
| + return e = e && "Invalid Date" === e.toString() ? d : e, e && (e.setHours(0), e.setMinutes(0), e.setSeconds(0), e.setMilliseconds(0)), this._daylightSavingAdjust(e) | |
| }, | |
| _daylightSavingAdjust: function(a) { | |
| return a ? (a.setHours(a.getHours() > 12 ? a.getHours() + 2 : 0), a) : null | |
| @@ -637,8 +634,7 @@ | |
| a.selectedDay = a.currentDay = g.getDate(), a.drawMonth = a.selectedMonth = a.currentMonth = g.getMonth(), a.drawYear = a.selectedYear = a.currentYear = g.getFullYear(), e === a.selectedMonth && f === a.selectedYear || c || this._notifyChange(a), this._adjustInstDate(a), a.input && a.input.val(d ? "" : this._formatDate(a)) | |
| }, | |
| _getDate: function(a) { | |
| - var b = !a.currentYear || a.input && "" === a.input.val() ? null : this._daylightSavingAdjust(new Date(a.currentYear, a.currentMonth, a.currentDay)); | |
| - return b | |
| + return !a.currentYear || a.input && "" === a.input.val() ? null : this._daylightSavingAdjust(new Date(a.currentYear, a.currentMonth, a.currentDay)) | |
| }, | |
| _attachHandlers: function(b) { | |
| var c = this._get(b, "stepMonths"), | |
| @@ -687,7 +683,7 @@ | |
| _ = a.drawMonth - V, | |
| aa = a.drawYear; | |
| if (_ < 0 && (_ += 12, aa--), $) | |
| - for (b = this._daylightSavingAdjust(new Date($.getFullYear(), $.getMonth() - U[0] * U[1] + 1, $.getDate())), b = Z && b < Z ? Z : b; this._daylightSavingAdjust(new Date(aa, _, 1)) > b;) _--, _ < 0 && (_ = 11, aa--); | |
| + for (b = this._daylightSavingAdjust(new Date($.getFullYear(), $.getMonth() - U[0] * U[1] + 1, $.getDate())), b = Z && b < Z ? Z : b; this._daylightSavingAdjust(new Date(aa, _, 1)) > b;) --_ < 0 && (_ = 11, aa--); | |
| for (a.drawMonth = _, a.drawYear = aa, c = this._get(a, "prevText"), c = T ? this.formatDate(c, this._daylightSavingAdjust(new Date(aa, _ - W, 1)), this._getFormatConfig(a)) : c, d = this._canAdjustMonth(a, -1, aa, _) ? "<a class='ui-datepicker-prev ui-corner-all' data-handler='prev' data-event='click' title='" + c + "'><span class='ui-icon ui-icon-circle-triangle-" + (Q ? "e" : "w") + "'>" + c + "</span></a>" : S ? "" : "<a class='ui-datepicker-prev ui-corner-all ui-state-disabled' title='" + c + "'><span class='ui-icon ui-icon-circle-triangle-" + (Q ? "e" : "w") + "'>" + c + "</span></a>", e = this._get(a, "nextText"), e = T ? this.formatDate(e, this._daylightSavingAdjust(new Date(aa, _ + W, 1)), this._getFormatConfig(a)) : e, f = this._canAdjustMonth(a, 1, aa, _) ? "<a class='ui-datepicker-next ui-corner-all' data-handler='next' data-event='click' title='" + e + "'><span class='ui-icon ui-icon-circle-triangle-" + (Q ? "w" : "e") + "'>" + e + "</span></a>" : S ? "" : "<a class='ui-datepicker-next ui-corner-all ui-state-disabled' title='" + e + "'><span class='ui-icon ui-icon-circle-triangle-" + (Q ? "w" : "e") + "'>" + e + "</span></a>", g = this._get(a, "currentText"), h = this._get(a, "gotoCurrent") && a.currentDay ? Y : P, g = T ? this.formatDate(g, h, this._getFormatConfig(a)) : g, i = a.inline ? "" : "<button type='button' class='ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all' data-handler='hide' data-event='click'>" + this._get(a, "closeText") + "</button>", j = R ? "<div class='ui-datepicker-buttonpane ui-widget-content'>" + (Q ? i : "") + (this._isInRange(a, h) ? "<button type='button' class='ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all' data-handler='today' data-event='click'>" + g + "</button>" : "") + (Q ? "" : i) + "</div>" : "", k = parseInt(this._get(a, "firstDay"), 10), k = isNaN(k) ? 0 : k, l = this._get(a, "showWeek"), m = this._get(a, "dayNames"), n = this._get(a, "dayNamesMin"), o = this._get(a, "monthNames"), p = this._get(a, "monthNamesShort"), q = this._get(a, "beforeShowDay"), r = this._get(a, "showOtherMonths"), s = this._get(a, "selectOtherMonths"), t = this._getDefaultDate(a), u = "", w = 0; w < U[0]; w++) { | |
| for (x = "", this.maxRows = 4, y = 0; y < U[1]; y++) { | |
| if (z = this._daylightSavingAdjust(new Date(aa, _, a.selectedDay)), A = " ui-corner-all", B = "", X) { | |
| diff -ur build-unminified/wp-includes/js/jquery/ui/dialog.min.js build-branch-unminified/wp-includes/js/jquery/ui/dialog.min.js | |
| --- build-unminified/wp-includes/js/jquery/ui/dialog.min.js 2018-10-06 21:45:33.350629826 -0500 | |
| +++ build-branch-unminified/wp-includes/js/jquery/ui/dialog.min.js 2018-10-06 21:42:36.089308213 -0500 | |
| @@ -98,7 +98,7 @@ | |
| enable: a.noop, | |
| close: function(b) { | |
| var c, d = this; | |
| - if (this._isOpen && this._trigger("beforeClose", b) !== !1) { | |
| + if (this._isOpen && !1 !== this._trigger("beforeClose", b)) { | |
| if (this._isOpen = !1, this._focusedElement = null, this._destroyOverlay(), this._untrackInstance(), !this.opener.filter(":focusable").focus().length) try { | |
| c = this.document[0].activeElement, c && "body" !== c.nodeName.toLowerCase() && a(c).blur() | |
| } catch (e) {} | |
| @@ -123,9 +123,10 @@ | |
| }, | |
| open: function() { | |
| var b = this; | |
| - return this._isOpen ? void(this._moveToTop() && this._focusTabbable()) : (this._isOpen = !0, this.opener = a(this.document[0].activeElement), this._size(), this._position(), this._createOverlay(), this._moveToTop(null, !0), this.overlay && this.overlay.css("z-index", this.uiDialog.css("z-index") - 1), this._show(this.uiDialog, this.options.show, function() { | |
| + if (this._isOpen) return void(this._moveToTop() && this._focusTabbable()); | |
| + this._isOpen = !0, this.opener = a(this.document[0].activeElement), this._size(), this._position(), this._createOverlay(), this._moveToTop(null, !0), this.overlay && this.overlay.css("z-index", this.uiDialog.css("z-index") - 1), this._show(this.uiDialog, this.options.show, function() { | |
| b._focusTabbable(), b._trigger("focus") | |
| - }), this._makeFocusTarget(), void this._trigger("open")) | |
| + }), this._makeFocusTarget(), this._trigger("open") | |
| }, | |
| _focusTabbable: function() { | |
| var a = this._focusedElement; | |
| @@ -133,9 +134,8 @@ | |
| }, | |
| _keepFocus: function(b) { | |
| function c() { | |
| - var b = this.document[0].activeElement, | |
| - c = this.uiDialog[0] === b || a.contains(this.uiDialog[0], b); | |
| - c || this._focusTabbable() | |
| + var b = this.document[0].activeElement; | |
| + this.uiDialog[0] === b || a.contains(this.uiDialog[0], b) || this._focusTabbable() | |
| } | |
| b.preventDefault(), c.call(this), this._delay(c) | |
| }, | |
| @@ -193,7 +193,8 @@ | |
| _createButtons: function() { | |
| var b = this, | |
| c = this.options.buttons; | |
| - return this.uiDialogButtonPane.remove(), this.uiButtonSet.empty(), a.isEmptyObject(c) || a.isArray(c) && !c.length ? void this.uiDialog.removeClass("ui-dialog-buttons") : (a.each(c, function(c, d) { | |
| + if (this.uiDialogButtonPane.remove(), this.uiButtonSet.empty(), a.isEmptyObject(c) || a.isArray(c) && !c.length) return void this.uiDialog.removeClass("ui-dialog-buttons"); | |
| + a.each(c, function(c, d) { | |
| var e, f; | |
| d = a.isFunction(d) ? { | |
| click: d, | |
| @@ -206,7 +207,7 @@ | |
| icons: d.icons, | |
| text: d.showText | |
| }, delete d.icons, delete d.showText, a("<button></button>", d).button(f).appendTo(b.uiButtonSet) | |
| - }), this.uiDialog.addClass("ui-dialog-buttons"), void this.uiDialogButtonPane.appendTo(this.uiDialog)) | |
| + }), this.uiDialog.addClass("ui-dialog-buttons"), this.uiDialogButtonPane.appendTo(this.uiDialog) | |
| }, | |
| _makeDraggable: function() { | |
| function b(a) { | |
| @@ -291,8 +292,7 @@ | |
| }, | |
| _untrackInstance: function() { | |
| var b = this._trackingInstances(), | |
| - c = a.inArray(this, b); | |
| - c !== -1 && b.splice(c, 1) | |
| + c = a.inArray(this, b); - 1 !== c && b.splice(c, 1) | |
| }, | |
| _trackingInstances: function() { | |
| var a = this.document.data("ui-dialog-instances"); | |
| @@ -318,7 +318,7 @@ | |
| var c, d, e = this.uiDialog; | |
| "dialogClass" === a && e.removeClass(this.options.dialogClass).addClass(b), "disabled" !== a && (this._super(a, b), "appendTo" === a && this.uiDialog.appendTo(this._appendTo()), "buttons" === a && this._createButtons(), "closeText" === a && this.uiDialogTitlebarClose.button({ | |
| label: "" + b | |
| - }), "draggable" === a && (c = e.is(":data(ui-draggable)"), c && !b && e.draggable("destroy"), !c && b && this._makeDraggable()), "position" === a && this._position(), "resizable" === a && (d = e.is(":data(ui-resizable)"), d && !b && e.resizable("destroy"), d && "string" == typeof b && e.resizable("option", "handles", b), d || b === !1 || this._makeResizable()), "title" === a && this._title(this.uiDialogTitlebar.find(".ui-dialog-title"))) | |
| + }), "draggable" === a && (c = e.is(":data(ui-draggable)"), c && !b && e.draggable("destroy"), !c && b && this._makeDraggable()), "position" === a && this._position(), "resizable" === a && (d = e.is(":data(ui-resizable)"), d && !b && e.resizable("destroy"), d && "string" == typeof b && e.resizable("option", "handles", b), d || !1 === b || this._makeResizable()), "title" === a && this._title(this.uiDialogTitlebar.find(".ui-dialog-title"))) | |
| }, | |
| _size: function() { | |
| var a, b, c, d = this.options; | |
| diff -ur build-unminified/wp-includes/js/jquery/ui/draggable.min.js build-branch-unminified/wp-includes/js/jquery/ui/draggable.min.js | |
| --- build-unminified/wp-includes/js/jquery/ui/draggable.min.js 2018-10-06 21:45:29.678602445 -0500 | |
| +++ build-branch-unminified/wp-includes/js/jquery/ui/draggable.min.js 2018-10-06 21:42:31.673275292 -0500 | |
| @@ -50,11 +50,12 @@ | |
| this._super(a, b), "handle" === a && (this._removeHandleClassName(), this._setHandleClassName()) | |
| }, | |
| _destroy: function() { | |
| - return (this.helper || this.element).is(".ui-draggable-dragging") ? void(this.destroyOnClear = !0) : (this.element.removeClass("ui-draggable ui-draggable-dragging ui-draggable-disabled"), this._removeHandleClassName(), void this._mouseDestroy()) | |
| + if ((this.helper || this.element).is(".ui-draggable-dragging")) return void(this.destroyOnClear = !0); | |
| + this.element.removeClass("ui-draggable ui-draggable-dragging ui-draggable-disabled"), this._removeHandleClassName(), this._mouseDestroy() | |
| }, | |
| _mouseCapture: function(b) { | |
| var c = this.options; | |
| - return this._blurActiveElement(b), !(this.helper || c.disabled || a(b.target).closest(".ui-resizable-handle").length > 0) && (this.handle = this._getHandle(b), !!this.handle && (this._blockFrames(c.iframeFix === !0 ? "iframe" : c.iframeFix), !0)) | |
| + return this._blurActiveElement(b), !(this.helper || c.disabled || a(b.target).closest(".ui-resizable-handle").length > 0) && (this.handle = this._getHandle(b), !!this.handle && (this._blockFrames(!0 === c.iframeFix ? "iframe" : c.iframeFix), !0)) | |
| }, | |
| _blockFrames: function(b) { | |
| this.iframeBlocks = this.document.find(b).map(function() { | |
| @@ -75,7 +76,7 @@ | |
| var c = this.options; | |
| return this.helper = this._createHelper(b), this.helper.addClass("ui-draggable-dragging"), this._cacheHelperProportions(), a.ui.ddmanager && (a.ui.ddmanager.current = this), this._cacheMargins(), this.cssPosition = this.helper.css("position"), this.scrollParent = this.helper.scrollParent(!0), this.offsetParent = this.helper.offsetParent(), this.hasFixedAncestor = this.helper.parents().filter(function() { | |
| return "fixed" === a(this).css("position") | |
| - }).length > 0, this.positionAbs = this.element.offset(), this._refreshOffsets(b), this.originalPosition = this.position = this._generatePosition(b, !1), this.originalPageX = b.pageX, this.originalPageY = b.pageY, c.cursorAt && this._adjustOffsetFromHelper(c.cursorAt), this._setContainment(), this._trigger("start", b) === !1 ? (this._clear(), !1) : (this._cacheHelperProportions(), a.ui.ddmanager && !c.dropBehaviour && a.ui.ddmanager.prepareOffsets(this, b), this._normalizeRightBottom(), this._mouseDrag(b, !0), a.ui.ddmanager && a.ui.ddmanager.dragStart(this, b), !0) | |
| + }).length > 0, this.positionAbs = this.element.offset(), this._refreshOffsets(b), this.originalPosition = this.position = this._generatePosition(b, !1), this.originalPageX = b.pageX, this.originalPageY = b.pageY, c.cursorAt && this._adjustOffsetFromHelper(c.cursorAt), this._setContainment(), !1 === this._trigger("start", b) ? (this._clear(), !1) : (this._cacheHelperProportions(), a.ui.ddmanager && !c.dropBehaviour && a.ui.ddmanager.prepareOffsets(this, b), this._normalizeRightBottom(), this._mouseDrag(b, !0), a.ui.ddmanager && a.ui.ddmanager.dragStart(this, b), !0) | |
| }, | |
| _refreshOffsets: function(a) { | |
| this.offset = { | |
| @@ -92,7 +93,7 @@ | |
| _mouseDrag: function(b, c) { | |
| if (this.hasFixedAncestor && (this.offset.parent = this._getParentOffset()), this.position = this._generatePosition(b, !0), this.positionAbs = this._convertPositionTo("absolute"), !c) { | |
| var d = this._uiHash(); | |
| - if (this._trigger("drag", b, d) === !1) return this._mouseUp({}), !1; | |
| + if (!1 === this._trigger("drag", b, d)) return this._mouseUp({}), !1; | |
| this.position = d.position | |
| } | |
| return this.helper[0].style.left = this.position.left + "px", this.helper[0].style.top = this.position.top + "px", a.ui.ddmanager && a.ui.ddmanager.drag(this, b), !1 | |
| @@ -100,9 +101,9 @@ | |
| _mouseStop: function(b) { | |
| var c = this, | |
| d = !1; | |
| - return a.ui.ddmanager && !this.options.dropBehaviour && (d = a.ui.ddmanager.drop(this, b)), this.dropped && (d = this.dropped, this.dropped = !1), "invalid" === this.options.revert && !d || "valid" === this.options.revert && d || this.options.revert === !0 || a.isFunction(this.options.revert) && this.options.revert.call(this.element, d) ? a(this.helper).animate(this.originalPosition, parseInt(this.options.revertDuration, 10), function() { | |
| - c._trigger("stop", b) !== !1 && c._clear() | |
| - }) : this._trigger("stop", b) !== !1 && this._clear(), !1 | |
| + return a.ui.ddmanager && !this.options.dropBehaviour && (d = a.ui.ddmanager.drop(this, b)), this.dropped && (d = this.dropped, this.dropped = !1), "invalid" === this.options.revert && !d || "valid" === this.options.revert && d || !0 === this.options.revert || a.isFunction(this.options.revert) && this.options.revert.call(this.element, d) ? a(this.helper).animate(this.originalPosition, parseInt(this.options.revertDuration, 10), function() { | |
| + !1 !== c._trigger("stop", b) && c._clear() | |
| + }) : !1 !== this._trigger("stop", b) && this._clear(), !1 | |
| }, | |
| _mouseUp: function(b) { | |
| return this._unblockFrames(), a.ui.ddmanager && a.ui.ddmanager.dragStop(this, b), this.handleElement.is(b.target) && this.element.focus(), a.ui.mouse.prototype._mouseUp.call(this, b) | |
| @@ -177,7 +178,7 @@ | |
| _setContainment: function() { | |
| var b, c, d, e = this.options, | |
| f = this.document[0]; | |
| - return this.relativeContainer = null, e.containment ? "window" === e.containment ? void(this.containment = [a(window).scrollLeft() - this.offset.relative.left - this.offset.parent.left, a(window).scrollTop() - this.offset.relative.top - this.offset.parent.top, a(window).scrollLeft() + a(window).width() - this.helperProportions.width - this.margins.left, a(window).scrollTop() + (a(window).height() || f.body.parentNode.scrollHeight) - this.helperProportions.height - this.margins.top]) : "document" === e.containment ? void(this.containment = [0, 0, a(f).width() - this.helperProportions.width - this.margins.left, (a(f).height() || f.body.parentNode.scrollHeight) - this.helperProportions.height - this.margins.top]) : e.containment.constructor === Array ? void(this.containment = e.containment) : ("parent" === e.containment && (e.containment = this.helper[0].parentNode), c = a(e.containment), d = c[0], void(d && (b = /(scroll|auto)/.test(c.css("overflow")), this.containment = [(parseInt(c.css("borderLeftWidth"), 10) || 0) + (parseInt(c.css("paddingLeft"), 10) || 0), (parseInt(c.css("borderTopWidth"), 10) || 0) + (parseInt(c.css("paddingTop"), 10) || 0), (b ? Math.max(d.scrollWidth, d.offsetWidth) : d.offsetWidth) - (parseInt(c.css("borderRightWidth"), 10) || 0) - (parseInt(c.css("paddingRight"), 10) || 0) - this.helperProportions.width - this.margins.left - this.margins.right, (b ? Math.max(d.scrollHeight, d.offsetHeight) : d.offsetHeight) - (parseInt(c.css("borderBottomWidth"), 10) || 0) - (parseInt(c.css("paddingBottom"), 10) || 0) - this.helperProportions.height - this.margins.top - this.margins.bottom], this.relativeContainer = c))) : void(this.containment = null) | |
| + return this.relativeContainer = null, e.containment ? "window" === e.containment ? void(this.containment = [a(window).scrollLeft() - this.offset.relative.left - this.offset.parent.left, a(window).scrollTop() - this.offset.relative.top - this.offset.parent.top, a(window).scrollLeft() + a(window).width() - this.helperProportions.width - this.margins.left, a(window).scrollTop() + (a(window).height() || f.body.parentNode.scrollHeight) - this.helperProportions.height - this.margins.top]) : "document" === e.containment ? void(this.containment = [0, 0, a(f).width() - this.helperProportions.width - this.margins.left, (a(f).height() || f.body.parentNode.scrollHeight) - this.helperProportions.height - this.margins.top]) : e.containment.constructor === Array ? void(this.containment = e.containment) : ("parent" === e.containment && (e.containment = this.helper[0].parentNode), c = a(e.containment), void((d = c[0]) && (b = /(scroll|auto)/.test(c.css("overflow")), this.containment = [(parseInt(c.css("borderLeftWidth"), 10) || 0) + (parseInt(c.css("paddingLeft"), 10) || 0), (parseInt(c.css("borderTopWidth"), 10) || 0) + (parseInt(c.css("paddingTop"), 10) || 0), (b ? Math.max(d.scrollWidth, d.offsetWidth) : d.offsetWidth) - (parseInt(c.css("borderRightWidth"), 10) || 0) - (parseInt(c.css("paddingRight"), 10) || 0) - this.helperProportions.width - this.margins.left - this.margins.right, (b ? Math.max(d.scrollHeight, d.offsetHeight) : d.offsetHeight) - (parseInt(c.css("borderBottomWidth"), 10) || 0) - (parseInt(c.css("paddingBottom"), 10) || 0) - this.helperProportions.height - this.margins.top - this.margins.bottom], this.relativeContainer = c))) : void(this.containment = null) | |
| }, | |
| _convertPositionTo: function(a, b) { | |
| b || (b = this.position); | |
| @@ -286,7 +287,7 @@ | |
| f = !1, | |
| g = d.scrollParentNotHidden[0], | |
| h = d.document[0]; | |
| - g !== h && "HTML" !== g.tagName ? (e.axis && "x" === e.axis || (d.overflowOffset.top + g.offsetHeight - b.pageY < e.scrollSensitivity ? g.scrollTop = f = g.scrollTop + e.scrollSpeed : b.pageY - d.overflowOffset.top < e.scrollSensitivity && (g.scrollTop = f = g.scrollTop - e.scrollSpeed)), e.axis && "y" === e.axis || (d.overflowOffset.left + g.offsetWidth - b.pageX < e.scrollSensitivity ? g.scrollLeft = f = g.scrollLeft + e.scrollSpeed : b.pageX - d.overflowOffset.left < e.scrollSensitivity && (g.scrollLeft = f = g.scrollLeft - e.scrollSpeed))) : (e.axis && "x" === e.axis || (b.pageY - a(h).scrollTop() < e.scrollSensitivity ? f = a(h).scrollTop(a(h).scrollTop() - e.scrollSpeed) : a(window).height() - (b.pageY - a(h).scrollTop()) < e.scrollSensitivity && (f = a(h).scrollTop(a(h).scrollTop() + e.scrollSpeed))), e.axis && "y" === e.axis || (b.pageX - a(h).scrollLeft() < e.scrollSensitivity ? f = a(h).scrollLeft(a(h).scrollLeft() - e.scrollSpeed) : a(window).width() - (b.pageX - a(h).scrollLeft()) < e.scrollSensitivity && (f = a(h).scrollLeft(a(h).scrollLeft() + e.scrollSpeed)))), f !== !1 && a.ui.ddmanager && !e.dropBehaviour && a.ui.ddmanager.prepareOffsets(d, b) | |
| + g !== h && "HTML" !== g.tagName ? (e.axis && "x" === e.axis || (d.overflowOffset.top + g.offsetHeight - b.pageY < e.scrollSensitivity ? g.scrollTop = f = g.scrollTop + e.scrollSpeed : b.pageY - d.overflowOffset.top < e.scrollSensitivity && (g.scrollTop = f = g.scrollTop - e.scrollSpeed)), e.axis && "y" === e.axis || (d.overflowOffset.left + g.offsetWidth - b.pageX < e.scrollSensitivity ? g.scrollLeft = f = g.scrollLeft + e.scrollSpeed : b.pageX - d.overflowOffset.left < e.scrollSensitivity && (g.scrollLeft = f = g.scrollLeft - e.scrollSpeed))) : (e.axis && "x" === e.axis || (b.pageY - a(h).scrollTop() < e.scrollSensitivity ? f = a(h).scrollTop(a(h).scrollTop() - e.scrollSpeed) : a(window).height() - (b.pageY - a(h).scrollTop()) < e.scrollSensitivity && (f = a(h).scrollTop(a(h).scrollTop() + e.scrollSpeed))), e.axis && "y" === e.axis || (b.pageX - a(h).scrollLeft() < e.scrollSensitivity ? f = a(h).scrollLeft(a(h).scrollLeft() - e.scrollSpeed) : a(window).width() - (b.pageX - a(h).scrollLeft()) < e.scrollSensitivity && (f = a(h).scrollLeft(a(h).scrollLeft() + e.scrollSpeed)))), !1 !== f && a.ui.ddmanager && !e.dropBehaviour && a.ui.ddmanager.prepareOffsets(d, b) | |
| } | |
| }), a.ui.plugin.add("draggable", "snap", { | |
| start: function(b, c, d) { | |
| diff -ur build-unminified/wp-includes/js/jquery/ui/droppable.min.js build-branch-unminified/wp-includes/js/jquery/ui/droppable.min.js | |
| --- build-unminified/wp-includes/js/jquery/ui/droppable.min.js 2018-10-06 21:45:32.330622220 -0500 | |
| +++ build-branch-unminified/wp-includes/js/jquery/ui/droppable.min.js 2018-10-06 21:42:35.089300759 -0500 | |
| @@ -34,10 +34,11 @@ | |
| this.isover = !1, this.isout = !0, this.accept = a.isFunction(d) ? d : function(a) { | |
| return a.is(d) | |
| }, this.proportions = function() { | |
| - return arguments.length ? void(b = arguments[0]) : b ? b : b = { | |
| + if (!arguments.length) return b || (b = { | |
| width: this.element[0].offsetWidth, | |
| height: this.element[0].offsetHeight | |
| - } | |
| + }); | |
| + b = arguments[0] | |
| }, this._addToManager(c.scope), c.addClasses && this.element.addClass("ui-droppable") | |
| }, | |
| _addToManager: function(b) { | |
| diff -ur build-unminified/wp-includes/js/jquery/ui/effect.min.js build-branch-unminified/wp-includes/js/jquery/ui/effect.min.js | |
| --- build-unminified/wp-includes/js/jquery/ui/effect.min.js 2018-10-06 21:45:32.962626932 -0500 | |
| +++ build-branch-unminified/wp-includes/js/jquery/ui/effect.min.js 2018-10-06 21:42:35.729305529 -0500 | |
| @@ -11,8 +11,7 @@ | |
| ! function(a) { | |
| "function" == typeof define && define.amd ? define(["jquery"], a) : a(jQuery) | |
| }(function(a) { | |
| - var b = "ui-effects-", | |
| - c = a; | |
| + var b = a; | |
| /*! | |
| * jQuery Color Animations v2.1.2 | |
| * https://github.com/jquery/jquery-color | |
| @@ -28,27 +27,26 @@ | |
| }, | |
| function(a, b) { | |
| function c(a, b, c) { | |
| - var d = l[b.type] || {}; | |
| + var d = k[b.type] || {}; | |
| return null == a ? c || !b.def ? null : b.def : (a = d.floor ? ~~a : parseFloat(a), isNaN(a) ? b.def : d.mod ? (a + d.mod) % d.mod : 0 > a ? 0 : d.max < a ? d.max : a) | |
| } | |
| function d(b) { | |
| - var c = j(), | |
| + var c = i(), | |
| d = c._rgba = []; | |
| - return b = b.toLowerCase(), o(i, function(a, e) { | |
| + return b = b.toLowerCase(), n(h, function(a, e) { | |
| var f, g = e.re.exec(b), | |
| h = g && e.parse(g), | |
| i = e.space || "rgba"; | |
| - if (h) return f = c[i](h), c[k[i].cache] = f[k[i].cache], d = c._rgba = f._rgba, !1 | |
| + if (h) return f = c[i](h), c[j[i].cache] = f[j[i].cache], d = c._rgba = f._rgba, !1 | |
| }), d.length ? ("0,0,0,0" === d.join() && a.extend(d, f.transparent), c) : f[b] | |
| } | |
| function e(a, b, c) { | |
| return c = (c + 1) % 1, 6 * c < 1 ? a + (b - a) * c * 6 : 2 * c < 1 ? b : 3 * c < 2 ? a + (b - a) * (2 / 3 - c) * 6 : a | |
| } | |
| - var f, g = "backgroundColor borderBottomColor borderLeftColor borderRightColor borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor", | |
| - h = /^([\-+])=\s*(\d+\.?\d*)/, | |
| - i = [{ | |
| + var f, g = /^([\-+])=\s*(\d+\.?\d*)/, | |
| + h = [{ | |
| re: /rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/, | |
| parse: function(a) { | |
| return [a[1], a[2], a[3], a[4]] | |
| @@ -75,10 +73,10 @@ | |
| return [a[1], a[2] / 100, a[3] / 100, a[4]] | |
| } | |
| }], | |
| - j = a.Color = function(b, c, d, e) { | |
| + i = a.Color = function(b, c, d, e) { | |
| return new a.Color.fn.parse(b, c, d, e) | |
| }, | |
| - k = { | |
| + j = { | |
| rgba: { | |
| props: { | |
| red: { | |
| @@ -112,7 +110,7 @@ | |
| } | |
| } | |
| }, | |
| - l = { | |
| + k = { | |
| "byte": { | |
| floor: !0, | |
| max: 255 | |
| @@ -125,44 +123,44 @@ | |
| floor: !0 | |
| } | |
| }, | |
| - m = j.support = {}, | |
| - n = a("<p>")[0], | |
| - o = a.each; | |
| - n.style.cssText = "background-color:rgba(1,1,1,.5)", m.rgba = n.style.backgroundColor.indexOf("rgba") > -1, o(k, function(a, b) { | |
| + l = i.support = {}, | |
| + m = a("<p>")[0], | |
| + n = a.each; | |
| + m.style.cssText = "background-color:rgba(1,1,1,.5)", l.rgba = m.style.backgroundColor.indexOf("rgba") > -1, n(j, function(a, b) { | |
| b.cache = "_" + a, b.props.alpha = { | |
| idx: 3, | |
| type: "percent", | |
| def: 1 | |
| } | |
| - }), j.fn = a.extend(j.prototype, { | |
| - parse: function(e, g, h, i) { | |
| - if (e === b) return this._rgba = [null, null, null, null], this; | |
| - (e.jquery || e.nodeType) && (e = a(e).css(g), g = b); | |
| - var l = this, | |
| - m = a.type(e), | |
| - n = this._rgba = []; | |
| - return g !== b && (e = [e, g, h, i], m = "array"), "string" === m ? this.parse(d(e) || f._default) : "array" === m ? (o(k.rgba.props, function(a, b) { | |
| - n[b.idx] = c(e[b.idx], b) | |
| - }), this) : "object" === m ? (e instanceof j ? o(k, function(a, b) { | |
| - e[b.cache] && (l[b.cache] = e[b.cache].slice()) | |
| - }) : o(k, function(b, d) { | |
| - var f = d.cache; | |
| - o(d.props, function(a, b) { | |
| - if (!l[f] && d.to) { | |
| - if ("alpha" === a || null == e[a]) return; | |
| - l[f] = d.to(l._rgba) | |
| + }), i.fn = a.extend(i.prototype, { | |
| + parse: function(b, e, g, h) { | |
| + if (void 0 === b) return this._rgba = [null, null, null, null], this; | |
| + (b.jquery || b.nodeType) && (b = a(b).css(e), e = void 0); | |
| + var k = this, | |
| + l = a.type(b), | |
| + m = this._rgba = []; | |
| + return void 0 !== e && (b = [b, e, g, h], l = "array"), "string" === l ? this.parse(d(b) || f._default) : "array" === l ? (n(j.rgba.props, function(a, d) { | |
| + m[d.idx] = c(b[d.idx], d) | |
| + }), this) : "object" === l ? (b instanceof i ? n(j, function(a, c) { | |
| + b[c.cache] && (k[c.cache] = b[c.cache].slice()) | |
| + }) : n(j, function(d, e) { | |
| + var f = e.cache; | |
| + n(e.props, function(a, d) { | |
| + if (!k[f] && e.to) { | |
| + if ("alpha" === a || null == b[a]) return; | |
| + k[f] = e.to(k._rgba) | |
| } | |
| - l[f][b.idx] = c(e[a], b, !0) | |
| - }), l[f] && a.inArray(null, l[f].slice(0, 3)) < 0 && (l[f][3] = 1, d.from && (l._rgba = d.from(l[f]))) | |
| + k[f][d.idx] = c(b[a], d, !0) | |
| + }), k[f] && a.inArray(null, k[f].slice(0, 3)) < 0 && (k[f][3] = 1, e.from && (k._rgba = e.from(k[f]))) | |
| }), this) : void 0 | |
| }, | |
| is: function(a) { | |
| - var b = j(a), | |
| + var b = i(a), | |
| c = !0, | |
| d = this; | |
| - return o(k, function(a, e) { | |
| + return n(j, function(a, e) { | |
| var f, g = b[e.cache]; | |
| - return g && (f = d[e.cache] || e.to && e.to(d._rgba) || [], o(e.props, function(a, b) { | |
| + return g && (f = d[e.cache] || e.to && e.to(d._rgba) || [], n(e.props, function(a, b) { | |
| if (null != g[b.idx]) return c = g[b.idx] === f[b.idx] | |
| })), c | |
| }), c | |
| @@ -170,31 +168,31 @@ | |
| _space: function() { | |
| var a = [], | |
| b = this; | |
| - return o(k, function(c, d) { | |
| + return n(j, function(c, d) { | |
| b[d.cache] && a.push(c) | |
| }), a.pop() | |
| }, | |
| transition: function(a, b) { | |
| - var d = j(a), | |
| + var d = i(a), | |
| e = d._space(), | |
| - f = k[e], | |
| - g = 0 === this.alpha() ? j("transparent") : this, | |
| + f = j[e], | |
| + g = 0 === this.alpha() ? i("transparent") : this, | |
| h = g[f.cache] || f.to(g._rgba), | |
| - i = h.slice(); | |
| - return d = d[f.cache], o(f.props, function(a, e) { | |
| + l = h.slice(); | |
| + return d = d[f.cache], n(f.props, function(a, e) { | |
| var f = e.idx, | |
| g = h[f], | |
| - j = d[f], | |
| - k = l[e.type] || {}; | |
| - null !== j && (null === g ? i[f] = j : (k.mod && (j - g > k.mod / 2 ? g += k.mod : g - j > k.mod / 2 && (g -= k.mod)), i[f] = c((j - g) * b + g, e))) | |
| - }), this[e](i) | |
| + i = d[f], | |
| + j = k[e.type] || {}; | |
| + null !== i && (null === g ? l[f] = i : (j.mod && (i - g > j.mod / 2 ? g += j.mod : g - i > j.mod / 2 && (g -= j.mod)), l[f] = c((i - g) * b + g, e))) | |
| + }), this[e](l) | |
| }, | |
| blend: function(b) { | |
| if (1 === this._rgba[3]) return this; | |
| var c = this._rgba.slice(), | |
| d = c.pop(), | |
| - e = j(b)._rgba; | |
| - return j(a.map(c, function(a, b) { | |
| + e = i(b)._rgba; | |
| + return i(a.map(c, function(a, b) { | |
| return (1 - d) * e[b] + d * a | |
| })) | |
| }, | |
| @@ -222,7 +220,7 @@ | |
| toString: function() { | |
| return 0 === this._rgba[3] ? "transparent" : this.toRgbaString() | |
| } | |
| - }), j.fn.parse.prototype = j.fn, k.hsla.to = function(a) { | |
| + }), i.fn.parse.prototype = i.fn, j.hsla.to = function(a) { | |
| if (null == a[0] || null == a[1] || null == a[2]) return [null, null, null, a[3]]; | |
| var b, c, d = a[0] / 255, | |
| e = a[1] / 255, | |
| @@ -234,7 +232,7 @@ | |
| k = h + i, | |
| l = .5 * k; | |
| return b = i === h ? 0 : d === h ? 60 * (e - f) / j + 360 : e === h ? 60 * (f - d) / j + 120 : 60 * (d - e) / j + 240, c = 0 === j ? 0 : l <= .5 ? j / k : j / (2 - k), [Math.round(b) % 360, c, l, null == g ? 1 : g] | |
| - }, k.hsla.from = function(a) { | |
| + }, j.hsla.from = function(a) { | |
| if (null == a[0] || null == a[1] || null == a[2]) return [null, null, null, a[3]]; | |
| var b = a[0] / 360, | |
| c = a[1], | |
| @@ -243,57 +241,57 @@ | |
| g = d <= .5 ? d * (1 + c) : d + c - d * c, | |
| h = 2 * d - g; | |
| return [Math.round(255 * e(h, g, b + 1 / 3)), Math.round(255 * e(h, g, b)), Math.round(255 * e(h, g, b - 1 / 3)), f] | |
| - }, o(k, function(d, e) { | |
| - var f = e.props, | |
| - g = e.cache, | |
| - i = e.to, | |
| - k = e.from; | |
| - j.fn[d] = function(d) { | |
| - if (i && !this[g] && (this[g] = i(this._rgba)), d === b) return this[g].slice(); | |
| - var e, h = a.type(d), | |
| - l = "array" === h || "object" === h ? d : arguments, | |
| - m = this[g].slice(); | |
| - return o(f, function(a, b) { | |
| - var d = l["object" === h ? a : b.idx]; | |
| - null == d && (d = m[b.idx]), m[b.idx] = c(d, b) | |
| - }), k ? (e = j(k(m)), e[g] = m, e) : j(m) | |
| - }, o(f, function(b, c) { | |
| - j.fn[b] || (j.fn[b] = function(e) { | |
| - var f, g = a.type(e), | |
| - i = "alpha" === b ? this._hsla ? "hsla" : "rgba" : d, | |
| + }, n(j, function(b, d) { | |
| + var e = d.props, | |
| + f = d.cache, | |
| + h = d.to, | |
| + j = d.from; | |
| + i.fn[b] = function(b) { | |
| + if (h && !this[f] && (this[f] = h(this._rgba)), void 0 === b) return this[f].slice(); | |
| + var d, g = a.type(b), | |
| + k = "array" === g || "object" === g ? b : arguments, | |
| + l = this[f].slice(); | |
| + return n(e, function(a, b) { | |
| + var d = k["object" === g ? a : b.idx]; | |
| + null == d && (d = l[b.idx]), l[b.idx] = c(d, b) | |
| + }), j ? (d = i(j(l)), d[f] = l, d) : i(l) | |
| + }, n(e, function(c, d) { | |
| + i.fn[c] || (i.fn[c] = function(e) { | |
| + var f, h = a.type(e), | |
| + i = "alpha" === c ? this._hsla ? "hsla" : "rgba" : b, | |
| j = this[i](), | |
| - k = j[c.idx]; | |
| - return "undefined" === g ? k : ("function" === g && (e = e.call(this, k), g = a.type(e)), null == e && c.empty ? this : ("string" === g && (f = h.exec(e), f && (e = k + parseFloat(f[2]) * ("+" === f[1] ? 1 : -1))), j[c.idx] = e, this[i](j))) | |
| + k = j[d.idx]; | |
| + return "undefined" === h ? k : ("function" === h && (e = e.call(this, k), h = a.type(e)), null == e && d.empty ? this : ("string" === h && (f = g.exec(e)) && (e = k + parseFloat(f[2]) * ("+" === f[1] ? 1 : -1)), j[d.idx] = e, this[i](j))) | |
| }) | |
| }) | |
| - }), j.hook = function(b) { | |
| + }), i.hook = function(b) { | |
| var c = b.split(" "); | |
| - o(c, function(b, c) { | |
| + n(c, function(b, c) { | |
| a.cssHooks[c] = { | |
| set: function(b, e) { | |
| var f, g, h = ""; | |
| if ("transparent" !== e && ("string" !== a.type(e) || (f = d(e)))) { | |
| - if (e = j(f || e), !m.rgba && 1 !== e._rgba[3]) { | |
| + if (e = i(f || e), !l.rgba && 1 !== e._rgba[3]) { | |
| for (g = "backgroundColor" === c ? b.parentNode : b; | |
| ("" === h || "transparent" === h) && g && g.style;) try { | |
| h = a.css(g, "backgroundColor"), g = g.parentNode | |
| - } catch (i) {} | |
| + } catch (j) {} | |
| e = e.blend(h && "transparent" !== h ? h : "_default") | |
| } | |
| e = e.toRgbaString() | |
| } | |
| try { | |
| b.style[c] = e | |
| - } catch (i) {} | |
| + } catch (j) {} | |
| } | |
| }, a.fx.step[c] = function(b) { | |
| - b.colorInit || (b.start = j(b.elem, c), b.end = j(b.end), b.colorInit = !0), a.cssHooks[c].set(b.elem, b.start.transition(b.end, b.pos)) | |
| + b.colorInit || (b.start = i(b.elem, c), b.end = i(b.end), b.colorInit = !0), a.cssHooks[c].set(b.elem, b.start.transition(b.end, b.pos)) | |
| } | |
| }) | |
| - }, j.hook(g), a.cssHooks.borderColor = { | |
| + }, i.hook("backgroundColor borderBottomColor borderLeftColor borderRightColor borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor"), a.cssHooks.borderColor = { | |
| expand: function(a) { | |
| var b = {}; | |
| - return o(["Top", "Right", "Bottom", "Left"], function(c, d) { | |
| + return n(["Top", "Right", "Bottom", "Left"], function(c, d) { | |
| b["border" + d + "Color"] = a | |
| }), b | |
| } | |
| @@ -317,9 +315,9 @@ | |
| transparent: [null, null, null, 0], | |
| _default: "#ffffff" | |
| } | |
| - }(c), | |
| + }(b), | |
| function() { | |
| - function b(b) { | |
| + function c(b) { | |
| var c, d, e = b.ownerDocument.defaultView ? b.ownerDocument.defaultView.getComputedStyle(b, null) : b.currentStyle, | |
| f = {}; | |
| if (e && e.length && e[0] && e[e[0]]) | |
| @@ -346,30 +344,29 @@ | |
| margin: 1, | |
| padding: 1 | |
| }; | |
| - a.each(["borderLeftStyle", "borderRightStyle", "borderBottomStyle", "borderTopStyle"], function(b, d) { | |
| + a.each(["borderLeftStyle", "borderRightStyle", "borderBottomStyle", "borderTopStyle"], function(c, d) { | |
| a.fx.step[d] = function(a) { | |
| - ("none" !== a.end && !a.setAttr || 1 === a.pos && !a.setAttr) && (c.style(a.elem, d, a.end), a.setAttr = !0) | |
| + ("none" !== a.end && !a.setAttr || 1 === a.pos && !a.setAttr) && (b.style(a.elem, d, a.end), a.setAttr = !0) | |
| } | |
| }), a.fn.addBack || (a.fn.addBack = function(a) { | |
| return this.add(null == a ? this.prevObject : this.prevObject.filter(a)) | |
| - }), a.effects.animateClass = function(c, f, g, h) { | |
| + }), a.effects.animateClass = function(b, f, g, h) { | |
| var i = a.speed(f, g, h); | |
| return this.queue(function() { | |
| var f, g = a(this), | |
| h = g.attr("class") || "", | |
| j = i.children ? g.find("*").addBack() : g; | |
| j = j.map(function() { | |
| - var c = a(this); | |
| return { | |
| - el: c, | |
| - start: b(this) | |
| + el: a(this), | |
| + start: c(this) | |
| } | |
| }), f = function() { | |
| - a.each(e, function(a, b) { | |
| - c[b] && g[b + "Class"](c[b]) | |
| + a.each(e, function(a, c) { | |
| + b[c] && g[c + "Class"](b[c]) | |
| }) | |
| }, f(), j = j.map(function() { | |
| - return this.end = b(this.el[0]), this.diff = d(this.start, this.end), this | |
| + return this.end = c(this.el[0]), this.diff = d(this.start, this.end), this | |
| }), g.attr("class", h), j = j.map(function() { | |
| var b = this, | |
| c = a.Deferred(), | |
| @@ -406,7 +403,7 @@ | |
| }(a.fn.removeClass), | |
| toggleClass: function(b) { | |
| return function(c, d, e, f, g) { | |
| - return "boolean" == typeof d || void 0 === d ? e ? a.effects.animateClass.call(this, d ? { | |
| + return "boolean" == typeof d || d === undefined ? e ? a.effects.animateClass.call(this, d ? { | |
| add: c | |
| } : { | |
| remove: c | |
| @@ -424,23 +421,23 @@ | |
| }) | |
| }(), | |
| function() { | |
| - function c(b, c, d, e) { | |
| + function b(b, c, d, e) { | |
| return a.isPlainObject(b) && (c = b, b = b.effect), b = { | |
| effect: b | |
| }, null == c && (c = {}), a.isFunction(c) && (e = c, d = null, c = {}), ("number" == typeof c || a.fx.speeds[c]) && (e = d, d = c, c = {}), a.isFunction(d) && (e = d, d = null), c && a.extend(b, c), d = d || c.duration, b.duration = a.fx.off ? 0 : "number" == typeof d ? d : d in a.fx.speeds ? a.fx.speeds[d] : a.fx.speeds._default, b.complete = e || c.complete, b | |
| } | |
| - function d(b) { | |
| + function c(b) { | |
| return !(b && "number" != typeof b && !a.fx.speeds[b]) || ("string" == typeof b && !a.effects.effect[b] || (!!a.isFunction(b) || "object" == typeof b && !b.effect)) | |
| } | |
| a.extend(a.effects, { | |
| version: "1.11.4", | |
| - save: function(a, c) { | |
| - for (var d = 0; d < c.length; d++) null !== c[d] && a.data(b + c[d], a[0].style[c[d]]) | |
| + save: function(a, b) { | |
| + for (var c = 0; c < b.length; c++) null !== b[c] && a.data("ui-effects-" + b[c], a[0].style[b[c]]) | |
| }, | |
| - restore: function(a, c) { | |
| - var d, e; | |
| - for (e = 0; e < c.length; e++) null !== c[e] && (d = a.data(b + c[e]), void 0 === d && (d = ""), a.css(c[e], d)) | |
| + restore: function(a, b) { | |
| + var c, d; | |
| + for (d = 0; d < b.length; d++) null !== b[d] && (c = a.data("ui-effects-" + b[d]), c === undefined && (c = ""), a.css(b[d], c)) | |
| }, | |
| setMode: function(a, b) { | |
| return "toggle" === b && (b = a.is(":hidden") ? "show" : "hide"), b | |
| @@ -531,7 +528,7 @@ | |
| } | |
| }), a.fn.extend({ | |
| effect: function() { | |
| - function b(b) { | |
| + function c(b) { | |
| function c() { | |
| a.isFunction(f) && f.call(e[0]), a.isFunction(b) && b() | |
| } | |
| @@ -540,32 +537,32 @@ | |
| h = d.mode; | |
| (e.is(":hidden") ? "hide" === h : "show" === h) ? (e[h](), c()) : g.call(e[0], d, c) | |
| } | |
| - var d = c.apply(this, arguments), | |
| + var d = b.apply(this, arguments), | |
| e = d.mode, | |
| f = d.queue, | |
| g = a.effects.effect[d.effect]; | |
| return a.fx.off || !g ? e ? this[e](d.duration, d.complete) : this.each(function() { | |
| d.complete && d.complete.call(this) | |
| - }) : f === !1 ? this.each(b) : this.queue(f || "fx", b) | |
| + }) : !1 === f ? this.each(c) : this.queue(f || "fx", c) | |
| }, | |
| show: function(a) { | |
| - return function(b) { | |
| - if (d(b)) return a.apply(this, arguments); | |
| - var e = c.apply(this, arguments); | |
| + return function(d) { | |
| + if (c(d)) return a.apply(this, arguments); | |
| + var e = b.apply(this, arguments); | |
| return e.mode = "show", this.effect.call(this, e) | |
| } | |
| }(a.fn.show), | |
| hide: function(a) { | |
| - return function(b) { | |
| - if (d(b)) return a.apply(this, arguments); | |
| - var e = c.apply(this, arguments); | |
| + return function(d) { | |
| + if (c(d)) return a.apply(this, arguments); | |
| + var e = b.apply(this, arguments); | |
| return e.mode = "hide", this.effect.call(this, e) | |
| } | |
| }(a.fn.hide), | |
| toggle: function(a) { | |
| - return function(b) { | |
| - if (d(b) || "boolean" == typeof b) return a.apply(this, arguments); | |
| - var e = c.apply(this, arguments); | |
| + return function(d) { | |
| + if (c(d) || "boolean" == typeof d) return a.apply(this, arguments); | |
| + var e = b.apply(this, arguments); | |
| return e.mode = "toggle", this.effect.call(this, e) | |
| } | |
| }(a.fn.toggle), | |
| @@ -605,7 +602,7 @@ | |
| a.easing["easeIn" + b] = c, a.easing["easeOut" + b] = function(a) { | |
| return 1 - c(1 - a) | |
| }, a.easing["easeInOut" + b] = function(a) { | |
| - return a < .5 ? c(2 * a) / 2 : 1 - c(a * -2 + 2) / 2 | |
| + return a < .5 ? c(2 * a) / 2 : 1 - c(-2 * a + 2) / 2 | |
| } | |
| }) | |
| }(), a.effects | |
| diff -ur build-unminified/wp-includes/js/jquery/ui/menu.min.js build-branch-unminified/wp-includes/js/jquery/ui/menu.min.js | |
| --- build-unminified/wp-includes/js/jquery/ui/menu.min.js 2018-10-06 21:45:29.526601312 -0500 | |
| +++ build-branch-unminified/wp-includes/js/jquery/ui/menu.min.js 2018-10-06 21:42:31.309272578 -0500 | |
| @@ -107,7 +107,7 @@ | |
| this.collapse(b); | |
| break; | |
| default: | |
| - g = !1, d = this.previousFilter || "", e = String.fromCharCode(b.keyCode), f = !1, clearTimeout(this.filterTimer), e === d ? f = !0 : e = d + e, c = this._filterMenuItems(e), c = f && c.index(this.active.next()) !== -1 ? this.active.nextAll(".ui-menu-item") : c, c.length || (e = String.fromCharCode(b.keyCode), c = this._filterMenuItems(e)), c.length ? (this.focus(b, c), this.previousFilter = e, this.filterTimer = this._delay(function() { | |
| + g = !1, d = this.previousFilter || "", e = String.fromCharCode(b.keyCode), f = !1, clearTimeout(this.filterTimer), e === d ? f = !0 : e = d + e, c = this._filterMenuItems(e), c = f && -1 !== c.index(this.active.next()) ? this.active.nextAll(".ui-menu-item") : c, c.length || (e = String.fromCharCode(b.keyCode), c = this._filterMenuItems(e)), c.length ? (this.focus(b, c), this.previousFilter = e, this.filterTimer = this._delay(function() { | |
| delete this.previousFilter | |
| }, 1e3)) : delete this.previousFilter | |
| } | |
| @@ -216,15 +216,17 @@ | |
| }, | |
| nextPage: function(b) { | |
| var c, d, e; | |
| - return this.active ? void(this.isLastItem() || (this._hasScroll() ? (d = this.active.offset().top, e = this.element.height(), this.active.nextAll(".ui-menu-item").each(function() { | |
| + if (!this.active) return void this.next(b); | |
| + this.isLastItem() || (this._hasScroll() ? (d = this.active.offset().top, e = this.element.height(), this.active.nextAll(".ui-menu-item").each(function() { | |
| return c = a(this), c.offset().top - d - e < 0 | |
| - }), this.focus(b, c)) : this.focus(b, this.activeMenu.find(this.options.items)[this.active ? "last" : "first"]()))) : void this.next(b) | |
| + }), this.focus(b, c)) : this.focus(b, this.activeMenu.find(this.options.items)[this.active ? "last" : "first"]())) | |
| }, | |
| previousPage: function(b) { | |
| var c, d, e; | |
| - return this.active ? void(this.isFirstItem() || (this._hasScroll() ? (d = this.active.offset().top, e = this.element.height(), this.active.prevAll(".ui-menu-item").each(function() { | |
| + if (!this.active) return void this.next(b); | |
| + this.isFirstItem() || (this._hasScroll() ? (d = this.active.offset().top, e = this.element.height(), this.active.prevAll(".ui-menu-item").each(function() { | |
| return c = a(this), c.offset().top - d + e > 0 | |
| - }), this.focus(b, c)) : this.focus(b, this.activeMenu.find(this.options.items).first()))) : void this.next(b) | |
| + }), this.focus(b, c)) : this.focus(b, this.activeMenu.find(this.options.items).first())) | |
| }, | |
| _hasScroll: function() { | |
| return this.element.outerHeight() < this.element.prop("scrollHeight") | |
| diff -ur build-unminified/wp-includes/js/jquery/ui/mouse.min.js build-branch-unminified/wp-includes/js/jquery/ui/mouse.min.js | |
| --- build-unminified/wp-includes/js/jquery/ui/mouse.min.js 2018-10-06 21:45:32.574624039 -0500 | |
| +++ build-branch-unminified/wp-includes/js/jquery/ui/mouse.min.js 2018-10-06 21:42:35.345302667 -0500 | |
| @@ -40,7 +40,7 @@ | |
| f = !("string" != typeof this.options.cancel || !c.target.nodeName) && a(c.target).closest(this.options.cancel).length; | |
| return !(e && !f && this._mouseCapture(c)) || (this.mouseDelayMet = !this.options.delay, this.mouseDelayMet || (this._mouseDelayTimer = setTimeout(function() { | |
| d.mouseDelayMet = !0 | |
| - }, this.options.delay)), this._mouseDistanceMet(c) && this._mouseDelayMet(c) && (this._mouseStarted = this._mouseStart(c) !== !1, !this._mouseStarted) ? (c.preventDefault(), !0) : (!0 === a.data(c.target, this.widgetName + ".preventClickEvent") && a.removeData(c.target, this.widgetName + ".preventClickEvent"), this._mouseMoveDelegate = function(a) { | |
| + }, this.options.delay)), this._mouseDistanceMet(c) && this._mouseDelayMet(c) && (this._mouseStarted = !1 !== this._mouseStart(c), !this._mouseStarted) ? (c.preventDefault(), !0) : (!0 === a.data(c.target, this.widgetName + ".preventClickEvent") && a.removeData(c.target, this.widgetName + ".preventClickEvent"), this._mouseMoveDelegate = function(a) { | |
| return d._mouseMove(a) | |
| }, this._mouseUpDelegate = function(a) { | |
| return d._mouseUp(a) | |
| @@ -52,7 +52,7 @@ | |
| if (a.ui.ie && (!document.documentMode || document.documentMode < 9) && !b.button) return this._mouseUp(b); | |
| if (!b.which) return this._mouseUp(b) | |
| } | |
| - return (b.which || b.button) && (this._mouseMoved = !0), this._mouseStarted ? (this._mouseDrag(b), b.preventDefault()) : (this._mouseDistanceMet(b) && this._mouseDelayMet(b) && (this._mouseStarted = this._mouseStart(this._mouseDownEvent, b) !== !1, this._mouseStarted ? this._mouseDrag(b) : this._mouseUp(b)), !this._mouseStarted) | |
| + return (b.which || b.button) && (this._mouseMoved = !0), this._mouseStarted ? (this._mouseDrag(b), b.preventDefault()) : (this._mouseDistanceMet(b) && this._mouseDelayMet(b) && (this._mouseStarted = !1 !== this._mouseStart(this._mouseDownEvent, b), this._mouseStarted ? this._mouseDrag(b) : this._mouseUp(b)), !this._mouseStarted) | |
| }, | |
| _mouseUp: function(c) { | |
| return this.document.unbind("mousemove." + this.widgetName, this._mouseMoveDelegate).unbind("mouseup." + this.widgetName, this._mouseUpDelegate), this._mouseStarted && (this._mouseStarted = !1, c.target === this._mouseDownEvent.target && a.data(c.target, this.widgetName + ".preventClickEvent", !0), this._mouseStop(c)), b = !1, !1 | |
| diff -ur build-unminified/wp-includes/js/jquery/ui/position.min.js build-branch-unminified/wp-includes/js/jquery/ui/position.min.js | |
| --- build-unminified/wp-includes/js/jquery/ui/position.min.js 2018-10-06 21:45:31.970619536 -0500 | |
| +++ build-branch-unminified/wp-includes/js/jquery/ui/position.min.js 2018-10-06 21:42:34.737298134 -0500 | |
| @@ -61,7 +61,7 @@ | |
| o = a.fn.position; | |
| a.position = { | |
| scrollbarWidth: function() { | |
| - if (void 0 !== e) return e; | |
| + if (e !== undefined) return e; | |
| var b, c, d = a("<div style='display:block;position:absolute;width:50px;height:50px;overflow:hidden;'><div style='height:100px;width:auto;'></div></div>"), | |
| f = d.children()[0]; | |
| return a("body").append(d), b = f.offsetWidth, d.css("overflow", "scroll"), c = f.offsetWidth, b === c && (c = d[0].clientWidth), d.remove(), e = b - c | |
| @@ -69,10 +69,9 @@ | |
| getScrollInfo: function(b) { | |
| var c = b.isWindow || b.isDocument ? "" : b.element.css("overflow-x"), | |
| d = b.isWindow || b.isDocument ? "" : b.element.css("overflow-y"), | |
| - e = "scroll" === c || "auto" === c && b.width < b.element[0].scrollWidth, | |
| - f = "scroll" === d || "auto" === d && b.height < b.element[0].scrollHeight; | |
| + e = "scroll" === c || "auto" === c && b.width < b.element[0].scrollWidth; | |
| return { | |
| - width: f ? a.position.scrollbarWidth() : 0, | |
| + width: "scroll" === d || "auto" === d && b.height < b.element[0].scrollHeight ? a.position.scrollbarWidth() : 0, | |
| height: e ? a.position.scrollbarWidth() : 0 | |
| } | |
| }, | |
| @@ -170,7 +169,7 @@ | |
| h = a.left - b.collisionPosition.marginLeft, | |
| i = e - h, | |
| j = h + b.collisionWidth - f - e; | |
| - b.collisionWidth > f ? i > 0 && j <= 0 ? (c = a.left + i + b.collisionWidth - f - e, a.left += i - c) : j > 0 && i <= 0 ? a.left = e : i > j ? a.left = e + f - b.collisionWidth : a.left = e : i > 0 ? a.left += i : j > 0 ? a.left -= j : a.left = g(a.left - h, a.left) | |
| + b.collisionWidth > f ? i > 0 && j <= 0 ? (c = a.left + i + b.collisionWidth - f - e, a.left += i - c) : a.left = j > 0 && i <= 0 ? e : i > j ? e + f - b.collisionWidth : e : i > 0 ? a.left += i : j > 0 ? a.left -= j : a.left = g(a.left - h, a.left) | |
| }, | |
| top: function(a, b) { | |
| var c, d = b.within, | |
| @@ -179,7 +178,7 @@ | |
| h = a.top - b.collisionPosition.marginTop, | |
| i = e - h, | |
| j = h + b.collisionHeight - f - e; | |
| - b.collisionHeight > f ? i > 0 && j <= 0 ? (c = a.top + i + b.collisionHeight - f - e, a.top += i - c) : j > 0 && i <= 0 ? a.top = e : i > j ? a.top = e + f - b.collisionHeight : a.top = e : i > 0 ? a.top += i : j > 0 ? a.top -= j : a.top = g(a.top - h, a.top) | |
| + b.collisionHeight > f ? i > 0 && j <= 0 ? (c = a.top + i + b.collisionHeight - f - e, a.top += i - c) : a.top = j > 0 && i <= 0 ? e : i > j ? e + f - b.collisionHeight : e : i > 0 ? a.top += i : j > 0 ? a.top -= j : a.top = g(a.top - h, a.top) | |
| } | |
| }, | |
| flip: { | |
| @@ -194,7 +193,7 @@ | |
| m = "left" === b.my[0] ? -b.elemWidth : "right" === b.my[0] ? b.elemWidth : 0, | |
| n = "left" === b.at[0] ? b.targetWidth : "right" === b.at[0] ? -b.targetWidth : 0, | |
| o = -2 * b.offset[0]; | |
| - k < 0 ? (c = a.left + m + n + o + b.collisionWidth - g - f, (c < 0 || c < h(k)) && (a.left += m + n + o)) : l > 0 && (d = a.left - b.collisionPosition.marginLeft + m + n + o - i, (d > 0 || h(d) < l) && (a.left += m + n + o)) | |
| + k < 0 ? ((c = a.left + m + n + o + b.collisionWidth - g - f) < 0 || c < h(k)) && (a.left += m + n + o) : l > 0 && ((d = a.left - b.collisionPosition.marginLeft + m + n + o - i) > 0 || h(d) < l) && (a.left += m + n + o) | |
| }, | |
| top: function(a, b) { | |
| var c, d, e = b.within, | |
| @@ -208,7 +207,7 @@ | |
| n = m ? -b.elemHeight : "bottom" === b.my[1] ? b.elemHeight : 0, | |
| o = "top" === b.at[1] ? b.targetHeight : "bottom" === b.at[1] ? -b.targetHeight : 0, | |
| p = -2 * b.offset[1]; | |
| - k < 0 ? (d = a.top + n + o + p + b.collisionHeight - g - f, (d < 0 || d < h(k)) && (a.top += n + o + p)) : l > 0 && (c = a.top - b.collisionPosition.marginTop + n + o + p - i, (c > 0 || h(c) < l) && (a.top += n + o + p)) | |
| + k < 0 ? ((d = a.top + n + o + p + b.collisionHeight - g - f) < 0 || d < h(k)) && (a.top += n + o + p) : l > 0 && ((c = a.top - b.collisionPosition.marginTop + n + o + p - i) > 0 || h(c) < l) && (a.top += n + o + p) | |
| } | |
| }, | |
| flipfit: { | |
| diff -ur build-unminified/wp-includes/js/jquery/ui/progressbar.min.js build-branch-unminified/wp-includes/js/jquery/ui/progressbar.min.js | |
| --- build-unminified/wp-includes/js/jquery/ui/progressbar.min.js 2018-10-06 21:45:31.846618611 -0500 | |
| +++ build-branch-unminified/wp-includes/js/jquery/ui/progressbar.min.js 2018-10-06 21:42:34.609297180 -0500 | |
| @@ -30,10 +30,11 @@ | |
| this.element.removeClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").removeAttr("role").removeAttr("aria-valuemin").removeAttr("aria-valuemax").removeAttr("aria-valuenow"), this.valueDiv.remove() | |
| }, | |
| value: function(a) { | |
| - return void 0 === a ? this.options.value : (this.options.value = this._constrainedValue(a), void this._refreshValue()) | |
| + if (a === undefined) return this.options.value; | |
| + this.options.value = this._constrainedValue(a), this._refreshValue() | |
| }, | |
| _constrainedValue: function(a) { | |
| - return void 0 === a && (a = this.options.value), this.indeterminate = a === !1, "number" != typeof a && (a = 0), !this.indeterminate && Math.min(this.options.max, Math.max(this.min, a)) | |
| + return a === undefined && (a = this.options.value), this.indeterminate = !1 === a, "number" != typeof a && (a = 0), !this.indeterminate && Math.min(this.options.max, Math.max(this.min, a)) | |
| }, | |
| _setOptions: function(a) { | |
| var b = a.value; | |
| diff -ur build-unminified/wp-includes/js/jquery/ui/resizable.min.js build-branch-unminified/wp-includes/js/jquery/ui/resizable.min.js | |
| --- build-unminified/wp-includes/js/jquery/ui/resizable.min.js 2018-10-06 21:45:30.194606293 -0500 | |
| +++ build-branch-unminified/wp-includes/js/jquery/ui/resizable.min.js 2018-10-06 21:42:32.269279735 -0500 | |
| @@ -120,7 +120,7 @@ | |
| }, | |
| _mouseCapture: function(b) { | |
| var c, d, e = !1; | |
| - for (c in this.handles) d = a(this.handles[c])[0], (d === b.target || a.contains(d, b.target)) && (e = !0); | |
| + for (c in this.handles)((d = a(this.handles[c])[0]) === b.target || a.contains(d, b.target)) && (e = !0); | |
| return !this.options.disabled && e | |
| }, | |
| _mouseStart: function(b) { | |
| @@ -189,9 +189,9 @@ | |
| var b, c, d, e, f, g = this.options; | |
| f = { | |
| minWidth: this._isNumber(g.minWidth) ? g.minWidth : 0, | |
| - maxWidth: this._isNumber(g.maxWidth) ? g.maxWidth : 1 / 0, | |
| + maxWidth: this._isNumber(g.maxWidth) ? g.maxWidth : Infinity, | |
| minHeight: this._isNumber(g.minHeight) ? g.minHeight : 0, | |
| - maxHeight: this._isNumber(g.maxHeight) ? g.maxHeight : 1 / 0 | |
| + maxHeight: this._isNumber(g.maxHeight) ? g.maxHeight : Infinity | |
| }, (this._aspectRatio || a) && (b = f.minHeight * this.aspectRatio, d = f.minWidth / this.aspectRatio, c = f.maxHeight * this.aspectRatio, e = f.maxWidth / this.aspectRatio, b > f.minWidth && (f.minWidth = b), d > f.minHeight && (f.minHeight = d), c < f.maxWidth && (f.maxWidth = c), e < f.maxHeight && (f.maxHeight = e)), this._vBoundaries = f | |
| }, | |
| _updateCache: function(a) { | |
| @@ -249,18 +249,16 @@ | |
| } | |
| }, | |
| w: function(a, b) { | |
| - var c = this.originalSize, | |
| - d = this.originalPosition; | |
| + var c = this.originalSize; | |
| return { | |
| - left: d.left + b, | |
| + left: this.originalPosition.left + b, | |
| width: c.width - b | |
| } | |
| }, | |
| n: function(a, b, c) { | |
| - var d = this.originalSize, | |
| - e = this.originalPosition; | |
| + var d = this.originalSize; | |
| return { | |
| - top: e.top + c, | |
| + top: this.originalPosition.top + c, | |
| height: d.height - c | |
| } | |
| }, | |
| diff -ur build-unminified/wp-includes/js/jquery/ui/slider.min.js build-branch-unminified/wp-includes/js/jquery/ui/slider.min.js | |
| --- build-unminified/wp-includes/js/jquery/ui/slider.min.js 2018-10-06 21:45:32.466623234 -0500 | |
| +++ build-branch-unminified/wp-includes/js/jquery/ui/slider.min.js 2018-10-06 21:42:35.221301742 -0500 | |
| @@ -39,17 +39,16 @@ | |
| _createHandles: function() { | |
| var b, c, d = this.options, | |
| e = this.element.find(".ui-slider-handle").addClass("ui-state-default ui-corner-all"), | |
| - f = "<span class='ui-slider-handle ui-state-default ui-corner-all' tabindex='0'></span>", | |
| - g = []; | |
| - for (c = d.values && d.values.length || 1, e.length > c && (e.slice(c).remove(), e = e.slice(0, c)), b = e.length; b < c; b++) g.push(f); | |
| - this.handles = e.add(a(g.join("")).appendTo(this.element)), this.handle = this.handles.eq(0), this.handles.each(function(b) { | |
| + f = []; | |
| + for (c = d.values && d.values.length || 1, e.length > c && (e.slice(c).remove(), e = e.slice(0, c)), b = e.length; b < c; b++) f.push("<span class='ui-slider-handle ui-state-default ui-corner-all' tabindex='0'></span>"); | |
| + this.handles = e.add(a(f.join("")).appendTo(this.element)), this.handle = this.handles.eq(0), this.handles.each(function(b) { | |
| a(this).data("ui-slider-handle-index", b) | |
| }) | |
| }, | |
| _createRange: function() { | |
| var b = this.options, | |
| c = ""; | |
| - b.range ? (b.range === !0 && (b.values ? b.values.length && 2 !== b.values.length ? b.values = [b.values[0], b.values[0]] : a.isArray(b.values) && (b.values = b.values.slice(0)) : b.values = [this._valueMin(), this._valueMin()]), this.range && this.range.length ? this.range.removeClass("ui-slider-range-min ui-slider-range-max").css({ | |
| + b.range ? (!0 === b.range && (b.values ? b.values.length && 2 !== b.values.length ? b.values = [b.values[0], b.values[0]] : a.isArray(b.values) && (b.values = b.values.slice(0)) : b.values = [this._valueMin(), this._valueMin()]), this.range && this.range.length ? this.range.removeClass("ui-slider-range-min ui-slider-range-max").css({ | |
| left: "", | |
| bottom: "" | |
| }) : (this.range = a("<div></div>").appendTo(this.element), c = "ui-slider-range ui-widget-header ui-corner-all"), this.range.addClass(c + ("min" === b.range || "max" === b.range ? " ui-slider-range-" + b.range : ""))) : (this.range && this.range.remove(), this.range = null) | |
| @@ -61,23 +60,23 @@ | |
| this.handles.remove(), this.range && this.range.remove(), this.element.removeClass("ui-slider ui-slider-horizontal ui-slider-vertical ui-widget ui-widget-content ui-corner-all"), this._mouseDestroy() | |
| }, | |
| _mouseCapture: function(b) { | |
| - var c, d, e, f, g, h, i, j, k = this, | |
| - l = this.options; | |
| - return !l.disabled && (this.elementSize = { | |
| + var c, d, e, f, g, h, i, j = this, | |
| + k = this.options; | |
| + return !k.disabled && (this.elementSize = { | |
| width: this.element.outerWidth(), | |
| height: this.element.outerHeight() | |
| }, this.elementOffset = this.element.offset(), c = { | |
| x: b.pageX, | |
| y: b.pageY | |
| }, d = this._normValueFromMouse(c), e = this._valueMax() - this._valueMin() + 1, this.handles.each(function(b) { | |
| - var c = Math.abs(d - k.values(b)); | |
| - (e > c || e === c && (b === k._lastChangedValue || k.values(b) === l.min)) && (e = c, f = a(this), g = b) | |
| - }), h = this._start(b, g), h !== !1 && (this._mouseSliding = !0, this._handleIndex = g, f.addClass("ui-state-active").focus(), i = f.offset(), j = !a(b.target).parents().addBack().is(".ui-slider-handle"), this._clickOffset = j ? { | |
| + var c = Math.abs(d - j.values(b)); | |
| + (e > c || e === c && (b === j._lastChangedValue || j.values(b) === k.min)) && (e = c, f = a(this), g = b) | |
| + }), !1 !== this._start(b, g) && (this._mouseSliding = !0, this._handleIndex = g, f.addClass("ui-state-active").focus(), h = f.offset(), i = !a(b.target).parents().addBack().is(".ui-slider-handle"), this._clickOffset = i ? { | |
| left: 0, | |
| top: 0 | |
| } : { | |
| - left: b.pageX - i.left - f.width() / 2, | |
| - top: b.pageY - i.top - f.height() / 2 - (parseInt(f.css("borderTopWidth"), 10) || 0) - (parseInt(f.css("borderBottomWidth"), 10) || 0) + (parseInt(f.css("marginTop"), 10) || 0) | |
| + left: b.pageX - h.left - f.width() / 2, | |
| + top: b.pageY - h.top - f.height() / 2 - (parseInt(f.css("borderTopWidth"), 10) || 0) - (parseInt(f.css("borderBottomWidth"), 10) || 0) + (parseInt(f.css("marginTop"), 10) || 0) | |
| }, this.handles.hasClass("ui-state-hover") || this._slide(b, g, d), this._animateOff = !0, !0)) | |
| }, | |
| _mouseStart: function() { | |
| @@ -110,14 +109,14 @@ | |
| }, | |
| _slide: function(a, b, c) { | |
| var d, e, f; | |
| - this.options.values && this.options.values.length ? (d = this.values(b ? 0 : 1), 2 === this.options.values.length && this.options.range === !0 && (0 === b && c > d || 1 === b && c < d) && (c = d), c !== this.values(b) && (e = this.values(), e[b] = c, f = this._trigger("slide", a, { | |
| + this.options.values && this.options.values.length ? (d = this.values(b ? 0 : 1), 2 === this.options.values.length && !0 === this.options.range && (0 === b && c > d || 1 === b && c < d) && (c = d), c !== this.values(b) && (e = this.values(), e[b] = c, f = this._trigger("slide", a, { | |
| handle: this.handles[b], | |
| value: c, | |
| values: e | |
| - }), d = this.values(b ? 0 : 1), f !== !1 && this.values(b, c))) : c !== this.value() && (f = this._trigger("slide", a, { | |
| + }), d = this.values(b ? 0 : 1), !1 !== f && this.values(b, c))) : c !== this.value() && !1 !== (f = this._trigger("slide", a, { | |
| handle: this.handles[b], | |
| value: c | |
| - }), f !== !1 && this.value(c)) | |
| + })) && this.value(c) | |
| }, | |
| _stop: function(a, b) { | |
| var c = { | |
| @@ -148,7 +147,7 @@ | |
| }, | |
| _setOption: function(b, c) { | |
| var d, e = 0; | |
| - switch ("range" === b && this.options.range === !0 && ("min" === c ? (this.options.value = this._values(0), this.options.values = null) : "max" === c && (this.options.value = this._values(this.options.values.length - 1), this.options.values = null)), a.isArray(this.options.values) && (e = this.options.values.length), "disabled" === b && this.element.toggleClass("ui-state-disabled", !!c), this._super(b, c), b) { | |
| + switch ("range" === b && !0 === this.options.range && ("min" === c ? (this.options.value = this._values(0), this.options.values = null) : "max" === c && (this.options.value = this._values(this.options.values.length - 1), this.options.values = null)), a.isArray(this.options.values) && (e = this.options.values.length), "disabled" === b && this.element.toggleClass("ui-state-disabled", !!c), this._super(b, c), b) { | |
| case "orientation": | |
| this._detectOrientation(), this.element.removeClass("ui-slider-horizontal ui-slider-vertical").addClass("ui-slider-" + this.orientation), this._refreshValue(), this.handles.css("horizontal" === c ? "bottom" : "left", ""); | |
| break; | |
| @@ -192,9 +191,8 @@ | |
| _calculateNewMax: function() { | |
| var a = this.options.max, | |
| b = this._valueMin(), | |
| - c = this.options.step, | |
| - d = Math.floor(+(a - b).toFixed(this._precision()) / c) * c; | |
| - a = d + b, this.max = parseFloat(a.toFixed(this._precision())) | |
| + c = this.options.step; | |
| + a = Math.floor(+(a - b).toFixed(this._precision()) / c) * c + b, this.max = parseFloat(a.toFixed(this._precision())) | |
| }, | |
| _precision: function() { | |
| var a = this._precisionOf(this.options.step); | |
| @@ -203,7 +201,7 @@ | |
| _precisionOf: function(a) { | |
| var b = a.toString(), | |
| c = b.indexOf("."); | |
| - return c === -1 ? 0 : b.length - c - 1 | |
| + return -1 === c ? 0 : b.length - c - 1 | |
| }, | |
| _valueMin: function() { | |
| return this.options.min | |
| @@ -218,7 +216,7 @@ | |
| j = !this._animateOff && h.animate, | |
| k = {}; | |
| this.options.values && this.options.values.length ? this.handles.each(function(d) { | |
| - c = (i.values(d) - i._valueMin()) / (i._valueMax() - i._valueMin()) * 100, k["horizontal" === i.orientation ? "left" : "bottom"] = c + "%", a(this).stop(1, 1)[j ? "animate" : "css"](k, h.animate), i.options.range === !0 && ("horizontal" === i.orientation ? (0 === d && i.range.stop(1, 1)[j ? "animate" : "css"]({ | |
| + c = (i.values(d) - i._valueMin()) / (i._valueMax() - i._valueMin()) * 100, k["horizontal" === i.orientation ? "left" : "bottom"] = c + "%", a(this).stop(1, 1)[j ? "animate" : "css"](k, h.animate), !0 === i.options.range && ("horizontal" === i.orientation ? (0 === d && i.range.stop(1, 1)[j ? "animate" : "css"]({ | |
| left: c + "%" | |
| }, h.animate), 1 === d && i.range[j ? "animate" : "css"]({ | |
| width: c - b + "%" | |
| @@ -251,7 +249,7 @@ | |
| }, | |
| _handleEvents: { | |
| keydown: function(b) { | |
| - var c, d, e, f, g = a(b.target).data("ui-slider-handle-index"); | |
| + var c, d, e, f = a(b.target).data("ui-slider-handle-index"); | |
| switch (b.keyCode) { | |
| case a.ui.keyCode.HOME: | |
| case a.ui.keyCode.END: | |
| @@ -261,32 +259,32 @@ | |
| case a.ui.keyCode.RIGHT: | |
| case a.ui.keyCode.DOWN: | |
| case a.ui.keyCode.LEFT: | |
| - if (b.preventDefault(), !this._keySliding && (this._keySliding = !0, a(b.target).addClass("ui-state-active"), c = this._start(b, g), c === !1)) return | |
| + if (b.preventDefault(), !this._keySliding && (this._keySliding = !0, a(b.target).addClass("ui-state-active"), !1 === this._start(b, f))) return | |
| } | |
| - switch (f = this.options.step, d = e = this.options.values && this.options.values.length ? this.values(g) : this.value(), b.keyCode) { | |
| + switch (e = this.options.step, c = d = this.options.values && this.options.values.length ? this.values(f) : this.value(), b.keyCode) { | |
| case a.ui.keyCode.HOME: | |
| - e = this._valueMin(); | |
| + d = this._valueMin(); | |
| break; | |
| case a.ui.keyCode.END: | |
| - e = this._valueMax(); | |
| + d = this._valueMax(); | |
| break; | |
| case a.ui.keyCode.PAGE_UP: | |
| - e = this._trimAlignValue(d + (this._valueMax() - this._valueMin()) / this.numPages); | |
| + d = this._trimAlignValue(c + (this._valueMax() - this._valueMin()) / this.numPages); | |
| break; | |
| case a.ui.keyCode.PAGE_DOWN: | |
| - e = this._trimAlignValue(d - (this._valueMax() - this._valueMin()) / this.numPages); | |
| + d = this._trimAlignValue(c - (this._valueMax() - this._valueMin()) / this.numPages); | |
| break; | |
| case a.ui.keyCode.UP: | |
| case a.ui.keyCode.RIGHT: | |
| - if (d === this._valueMax()) return; | |
| - e = this._trimAlignValue(d + f); | |
| + if (c === this._valueMax()) return; | |
| + d = this._trimAlignValue(c + e); | |
| break; | |
| case a.ui.keyCode.DOWN: | |
| case a.ui.keyCode.LEFT: | |
| - if (d === this._valueMin()) return; | |
| - e = this._trimAlignValue(d - f) | |
| + if (c === this._valueMin()) return; | |
| + d = this._trimAlignValue(c - e) | |
| } | |
| - this._slide(b, g, e) | |
| + this._slide(b, f, d) | |
| }, | |
| keyup: function(b) { | |
| var c = a(b.target).data("ui-slider-handle-index"); | |
| diff -ur build-unminified/wp-includes/js/jquery/ui/sortable.min.js build-branch-unminified/wp-includes/js/jquery/ui/sortable.min.js | |
| --- build-unminified/wp-includes/js/jquery/ui/sortable.min.js 2018-10-06 21:45:31.410615360 -0500 | |
| +++ build-branch-unminified/wp-includes/js/jquery/ui/sortable.min.js 2018-10-06 21:42:34.105293422 -0500 | |
| @@ -105,8 +105,8 @@ | |
| _mouseDrag: function(b) { | |
| var c, d, e, f, g = this.options, | |
| h = !1; | |
| - for (this.position = this._generatePosition(b), this.positionAbs = this._convertPositionTo("absolute"), this.lastPositionAbs || (this.lastPositionAbs = this.positionAbs), this.options.scroll && (this.scrollParent[0] !== this.document[0] && "HTML" !== this.scrollParent[0].tagName ? (this.overflowOffset.top + this.scrollParent[0].offsetHeight - b.pageY < g.scrollSensitivity ? this.scrollParent[0].scrollTop = h = this.scrollParent[0].scrollTop + g.scrollSpeed : b.pageY - this.overflowOffset.top < g.scrollSensitivity && (this.scrollParent[0].scrollTop = h = this.scrollParent[0].scrollTop - g.scrollSpeed), this.overflowOffset.left + this.scrollParent[0].offsetWidth - b.pageX < g.scrollSensitivity ? this.scrollParent[0].scrollLeft = h = this.scrollParent[0].scrollLeft + g.scrollSpeed : b.pageX - this.overflowOffset.left < g.scrollSensitivity && (this.scrollParent[0].scrollLeft = h = this.scrollParent[0].scrollLeft - g.scrollSpeed)) : (b.pageY - this.document.scrollTop() < g.scrollSensitivity ? h = this.document.scrollTop(this.document.scrollTop() - g.scrollSpeed) : this.window.height() - (b.pageY - this.document.scrollTop()) < g.scrollSensitivity && (h = this.document.scrollTop(this.document.scrollTop() + g.scrollSpeed)), b.pageX - this.document.scrollLeft() < g.scrollSensitivity ? h = this.document.scrollLeft(this.document.scrollLeft() - g.scrollSpeed) : this.window.width() - (b.pageX - this.document.scrollLeft()) < g.scrollSensitivity && (h = this.document.scrollLeft(this.document.scrollLeft() + g.scrollSpeed))), h !== !1 && a.ui.ddmanager && !g.dropBehaviour && a.ui.ddmanager.prepareOffsets(this, b)), this.positionAbs = this._convertPositionTo("absolute"), this.options.axis && "y" === this.options.axis || (this.helper[0].style.left = this.position.left + "px"), this.options.axis && "x" === this.options.axis || (this.helper[0].style.top = this.position.top + "px"), c = this.items.length - 1; c >= 0; c--) | |
| - if (d = this.items[c], e = d.item[0], f = this._intersectsWithPointer(d), f && d.instance === this.currentContainer && !(e === this.currentItem[0] || this.placeholder[1 === f ? "next" : "prev"]()[0] === e || a.contains(this.placeholder[0], e) || "semi-dynamic" === this.options.type && a.contains(this.element[0], e))) { | |
| + for (this.position = this._generatePosition(b), this.positionAbs = this._convertPositionTo("absolute"), this.lastPositionAbs || (this.lastPositionAbs = this.positionAbs), this.options.scroll && (this.scrollParent[0] !== this.document[0] && "HTML" !== this.scrollParent[0].tagName ? (this.overflowOffset.top + this.scrollParent[0].offsetHeight - b.pageY < g.scrollSensitivity ? this.scrollParent[0].scrollTop = h = this.scrollParent[0].scrollTop + g.scrollSpeed : b.pageY - this.overflowOffset.top < g.scrollSensitivity && (this.scrollParent[0].scrollTop = h = this.scrollParent[0].scrollTop - g.scrollSpeed), this.overflowOffset.left + this.scrollParent[0].offsetWidth - b.pageX < g.scrollSensitivity ? this.scrollParent[0].scrollLeft = h = this.scrollParent[0].scrollLeft + g.scrollSpeed : b.pageX - this.overflowOffset.left < g.scrollSensitivity && (this.scrollParent[0].scrollLeft = h = this.scrollParent[0].scrollLeft - g.scrollSpeed)) : (b.pageY - this.document.scrollTop() < g.scrollSensitivity ? h = this.document.scrollTop(this.document.scrollTop() - g.scrollSpeed) : this.window.height() - (b.pageY - this.document.scrollTop()) < g.scrollSensitivity && (h = this.document.scrollTop(this.document.scrollTop() + g.scrollSpeed)), b.pageX - this.document.scrollLeft() < g.scrollSensitivity ? h = this.document.scrollLeft(this.document.scrollLeft() - g.scrollSpeed) : this.window.width() - (b.pageX - this.document.scrollLeft()) < g.scrollSensitivity && (h = this.document.scrollLeft(this.document.scrollLeft() + g.scrollSpeed))), !1 !== h && a.ui.ddmanager && !g.dropBehaviour && a.ui.ddmanager.prepareOffsets(this, b)), this.positionAbs = this._convertPositionTo("absolute"), this.options.axis && "y" === this.options.axis || (this.helper[0].style.left = this.position.left + "px"), this.options.axis && "x" === this.options.axis || (this.helper[0].style.top = this.position.top + "px"), c = this.items.length - 1; c >= 0; c--) | |
| + if (d = this.items[c], e = d.item[0], (f = this._intersectsWithPointer(d)) && d.instance === this.currentContainer && !(e === this.currentItem[0] || this.placeholder[1 === f ? "next" : "prev"]()[0] === e || a.contains(this.placeholder[0], e) || "semi-dynamic" === this.options.type && a.contains(this.element[0], e))) { | |
| if (this.direction = 1 === f ? "down" : "up", "pointer" !== this.options.tolerance && !this._intersectsWithSides(d)) break; | |
| this._rearrange(b, d), this._trigger("change", b, this._uiHash()); | |
| break | |
| @@ -210,7 +210,7 @@ | |
| j = this._connectWith(); | |
| if (j && b) | |
| for (d = j.length - 1; d >= 0; d--) | |
| - for (f = a(j[d], this.document[0]), e = f.length - 1; e >= 0; e--) g = a.data(f[e], this.widgetFullName), g && g !== this && !g.options.disabled && i.push([a.isFunction(g.options.items) ? g.options.items.call(g.element) : a(g.options.items, g.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"), g]); | |
| + for (f = a(j[d], this.document[0]), e = f.length - 1; e >= 0; e--)(g = a.data(f[e], this.widgetFullName)) && g !== this && !g.options.disabled && i.push([a.isFunction(g.options.items) ? g.options.items.call(g.element) : a(g.options.items, g.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"), g]); | |
| for (i.push([a.isFunction(this.options.items) ? this.options.items.call(this.element, null, { | |
| options: this.options, | |
| item: this.currentItem | |
| @@ -236,7 +236,7 @@ | |
| m = this._connectWith(); | |
| if (m && this.ready) | |
| for (c = m.length - 1; c >= 0; c--) | |
| - for (e = a(m[c], this.document[0]), d = e.length - 1; d >= 0; d--) f = a.data(e[d], this.widgetFullName), f && f !== this && !f.options.disabled && (l.push([a.isFunction(f.options.items) ? f.options.items.call(f.element[0], b, { | |
| + for (e = a(m[c], this.document[0]), d = e.length - 1; d >= 0; d--)(f = a.data(e[d], this.widgetFullName)) && f !== this && !f.options.disabled && (l.push([a.isFunction(f.options.items) ? f.options.items.call(f.element[0], b, { | |
| item: this.currentItem | |
| }) : a(f.options.items, f.element), f]), this.containers.push(f)); | |
| for (c = l.length - 1; c >= 0; c--) | |
| @@ -415,7 +415,7 @@ | |
| return this.fromOutside = !1, !this.cancelHelperRemoval | |
| }, | |
| _trigger: function() { | |
| - a.Widget.prototype._trigger.apply(this, arguments) === !1 && this.cancel() | |
| + !1 === a.Widget.prototype._trigger.apply(this, arguments) && this.cancel() | |
| }, | |
| _uiHash: function(b) { | |
| var c = b || this; | |
| diff -ur build-unminified/wp-includes/js/jquery/ui/spinner.min.js build-branch-unminified/wp-includes/js/jquery/ui/spinner.min.js | |
| --- build-unminified/wp-includes/js/jquery/ui/spinner.min.js 2018-10-06 21:45:32.206621296 -0500 | |
| +++ build-branch-unminified/wp-includes/js/jquery/ui/spinner.min.js 2018-10-06 21:42:34.961299804 -0500 | |
| @@ -50,7 +50,7 @@ | |
| c = this.element; | |
| return a.each(["min", "max", "step"], function(a, d) { | |
| var e = c.attr(d); | |
| - void 0 !== e && e.length && (b[d] = e) | |
| + e !== undefined && e.length && (b[d] = e) | |
| }), b | |
| }, | |
| _events: { | |
| @@ -62,7 +62,8 @@ | |
| this.previous = this.element.val() | |
| }, | |
| blur: function(a) { | |
| - return this.cancelBlur ? void delete this.cancelBlur : (this._stop(), this._refresh(), void(this.previous !== this.element.val() && this._trigger("change", a))) | |
| + if (this.cancelBlur) return void delete this.cancelBlur; | |
| + this._stop(), this._refresh(), this.previous !== this.element.val() && this._trigger("change", a) | |
| }, | |
| mousewheel: function(a, b) { | |
| if (b) { | |
| @@ -74,19 +75,18 @@ | |
| }, | |
| "mousedown .ui-spinner-button": function(b) { | |
| function c() { | |
| - var a = this.element[0] === this.document[0].activeElement; | |
| - a || (this.element.focus(), this.previous = d, this._delay(function() { | |
| + this.element[0] === this.document[0].activeElement || (this.element.focus(), this.previous = d, this._delay(function() { | |
| this.previous = d | |
| })) | |
| } | |
| var d; | |
| d = this.element[0] === this.document[0].activeElement ? this.previous : this.element.val(), b.preventDefault(), c.call(this), this.cancelBlur = !0, this._delay(function() { | |
| delete this.cancelBlur, c.call(this) | |
| - }), this._start(b) !== !1 && this._repeat(null, a(b.currentTarget).hasClass("ui-spinner-up") ? 1 : -1, b) | |
| + }), !1 !== this._start(b) && this._repeat(null, a(b.currentTarget).hasClass("ui-spinner-up") ? 1 : -1, b) | |
| }, | |
| "mouseup .ui-spinner-button": "_stop", | |
| "mouseenter .ui-spinner-button": function(b) { | |
| - if (a(b.currentTarget).hasClass("ui-state-active")) return this._start(b) !== !1 && void this._repeat(null, a(b.currentTarget).hasClass("ui-spinner-up") ? 1 : -1, b) | |
| + if (a(b.currentTarget).hasClass("ui-state-active")) return !1 !== this._start(b) && void this._repeat(null, a(b.currentTarget).hasClass("ui-spinner-up") ? 1 : -1, b) | |
| }, | |
| "mouseleave .ui-spinner-button": "_stop" | |
| }, | |
| @@ -116,7 +116,7 @@ | |
| return "<a class='ui-spinner-button ui-spinner-up ui-corner-tr'><span class='ui-icon " + this.options.icons.up + "'>▲</span></a><a class='ui-spinner-button ui-spinner-down ui-corner-br'><span class='ui-icon " + this.options.icons.down + "'>▼</span></a>" | |
| }, | |
| _start: function(a) { | |
| - return !(!this.spinning && this._trigger("start", a) === !1) && (this.counter || (this.counter = 1), this.spinning = !0, !0) | |
| + return !(!this.spinning && !1 === this._trigger("start", a)) && (this.counter || (this.counter = 1), this.spinning = !0, !0) | |
| }, | |
| _repeat: function(a, b, c) { | |
| a = a || 500, clearTimeout(this.timer), this.timer = this._delay(function() { | |
| @@ -125,9 +125,9 @@ | |
| }, | |
| _spin: function(a, b) { | |
| var c = this.value() || 0; | |
| - this.counter || (this.counter = 1), c = this._adjustValue(c + a * this._increment(this.counter)), this.spinning && this._trigger("spin", b, { | |
| + this.counter || (this.counter = 1), c = this._adjustValue(c + a * this._increment(this.counter)), this.spinning && !1 === this._trigger("spin", b, { | |
| value: c | |
| - }) === !1 || (this._value(c), this.counter++) | |
| + }) || (this._value(c), this.counter++) | |
| }, | |
| _increment: function(b) { | |
| var c = this.options.incremental; | |
| @@ -140,7 +140,7 @@ | |
| _precisionOf: function(a) { | |
| var b = a.toString(), | |
| c = b.indexOf("."); | |
| - return c === -1 ? 0 : b.length - c - 1 | |
| + return -1 === c ? 0 : b.length - c - 1 | |
| }, | |
| _adjustValue: function(a) { | |
| var b, c, d = this.options; | |
| @@ -178,7 +178,7 @@ | |
| }, | |
| _value: function(a, b) { | |
| var c; | |
| - "" !== a && (c = this._parse(a), null !== c && (b || (c = this._adjustValue(c)), a = this._format(c))), this.element.val(a), this._refresh() | |
| + "" !== a && null !== (c = this._parse(a)) && (b || (c = this._adjustValue(c)), a = this._format(c)), this.element.val(a), this._refresh() | |
| }, | |
| _destroy: function() { | |
| this.element.removeClass("ui-spinner-input").prop("disabled", !1).removeAttr("autocomplete").removeAttr("role").removeAttr("aria-valuemin").removeAttr("aria-valuemax").removeAttr("aria-valuenow"), this.uiSpinner.replaceWith(this.element) | |
| @@ -202,7 +202,8 @@ | |
| this._stepDown((a || 1) * this.options.page) | |
| }), | |
| value: function(a) { | |
| - return arguments.length ? void b(this._value).call(this, a) : this._parse(this.element.val()) | |
| + if (!arguments.length) return this._parse(this.element.val()); | |
| + b(this._value).call(this, a) | |
| }, | |
| widget: function() { | |
| return this.uiSpinner | |
| diff -ur build-unminified/wp-includes/js/jquery/ui/tabs.min.js build-branch-unminified/wp-includes/js/jquery/ui/tabs.min.js | |
| --- build-unminified/wp-includes/js/jquery/ui/tabs.min.js 2018-10-06 21:45:30.038605130 -0500 | |
| +++ build-branch-unminified/wp-includes/js/jquery/ui/tabs.min.js 2018-10-06 21:42:32.105278512 -0500 | |
| @@ -45,7 +45,7 @@ | |
| c = this.options; | |
| this.running = !1, this.element.addClass("ui-tabs ui-widget ui-widget-content ui-corner-all").toggleClass("ui-tabs-collapsible", c.collapsible), this._processTabs(), c.active = this._initialActive(), a.isArray(c.disabled) && (c.disabled = a.unique(c.disabled.concat(a.map(this.tabs.filter(".ui-state-disabled"), function(a) { | |
| return b.tabs.index(a) | |
| - }))).sort()), this.options.active !== !1 && this.anchors.length ? this.active = this._findActive(c.active) : this.active = a(), this._refresh(), this.active.length && this.load(c.active) | |
| + }))).sort()), !1 !== this.options.active && this.anchors.length ? this.active = this._findActive(c.active) : this.active = a(), this._refresh(), this.active.length && this.load(c.active) | |
| }, | |
| _initialActive: function() { | |
| var b = this.options.active, | |
| @@ -53,7 +53,7 @@ | |
| d = location.hash.substring(1); | |
| return null === b && (d && this.tabs.each(function(c, e) { | |
| if (a(e).attr("aria-controls") === d) return b = c, !1 | |
| - }), null === b && (b = this.tabs.index(this.tabs.filter(".ui-tabs-active"))), null !== b && b !== -1 || (b = !!this.tabs.length && 0)), b !== !1 && (b = this.tabs.index(this.tabs.eq(b)), b === -1 && (b = !c && 0)), !c && b === !1 && this.anchors.length && (b = 0), b | |
| + }), null === b && (b = this.tabs.index(this.tabs.filter(".ui-tabs-active"))), null !== b && -1 !== b || (b = !!this.tabs.length && 0)), !1 !== b && -1 === (b = this.tabs.index(this.tabs.eq(b))) && (b = !c && 0), !c && !1 === b && this.anchors.length && (b = 0), b | |
| }, | |
| _getCreateEventData: function() { | |
| return { | |
| @@ -100,17 +100,16 @@ | |
| return b.altKey && b.keyCode === a.ui.keyCode.PAGE_UP ? (this._activate(this._focusNextTab(this.options.active - 1, !1)), !0) : b.altKey && b.keyCode === a.ui.keyCode.PAGE_DOWN ? (this._activate(this._focusNextTab(this.options.active + 1, !0)), !0) : void 0 | |
| }, | |
| _findNextTab: function(b, c) { | |
| - function d() { | |
| - return b > e && (b = 0), b < 0 && (b = e), b | |
| - } | |
| - for (var e = this.tabs.length - 1; a.inArray(d(), this.options.disabled) !== -1;) b = c ? b + 1 : b - 1; | |
| + for (var d = this.tabs.length - 1; - 1 !== a.inArray(function() { | |
| + return b > d && (b = 0), b < 0 && (b = d), b | |
| + }(), this.options.disabled);) b = c ? b + 1 : b - 1; | |
| return b | |
| }, | |
| _focusNextTab: function(a, b) { | |
| return a = this._findNextTab(a, b), this.tabs.eq(a).focus(), a | |
| }, | |
| _setOption: function(a, b) { | |
| - return "active" === a ? void this._activate(b) : "disabled" === a ? void this._setupDisabled(b) : (this._super(a, b), "collapsible" === a && (this.element.toggleClass("ui-tabs-collapsible", b), b || this.options.active !== !1 || this._activate(0)), "event" === a && this._setupEvents(b), void("heightStyle" === a && this._setupHeightStyle(b))) | |
| + return "active" === a ? void this._activate(b) : "disabled" === a ? void this._setupDisabled(b) : (this._super(a, b), "collapsible" === a && (this.element.toggleClass("ui-tabs-collapsible", b), b || !1 !== this.options.active || this._activate(0)), "event" === a && this._setupEvents(b), void("heightStyle" === a && this._setupHeightStyle(b))) | |
| }, | |
| _sanitizeSelector: function(a) { | |
| return a ? a.replace(/[!"$%&'()*+,.\/:;<=>?@\[\]\^`{|}~]/g, "\\$&") : "" | |
| @@ -120,7 +119,7 @@ | |
| c = this.tablist.children(":has(a[href])"); | |
| b.disabled = a.map(c.filter(".ui-state-disabled"), function(a) { | |
| return c.index(a) | |
| - }), this._processTabs(), b.active !== !1 && this.anchors.length ? this.active.length && !a.contains(this.tablist[0], this.active[0]) ? this.tabs.length === b.disabled.length ? (b.active = !1, this.active = a()) : this._activate(this._findNextTab(Math.max(0, b.active - 1), !1)) : b.active = this.tabs.index(this.active) : (b.active = !1, this.active = a()), this._refresh() | |
| + }), this._processTabs(), !1 !== b.active && this.anchors.length ? this.active.length && !a.contains(this.tablist[0], this.active[0]) ? this.tabs.length === b.disabled.length ? (b.active = !1, this.active = a()) : this._activate(this._findNextTab(Math.max(0, b.active - 1), !1)) : b.active = this.tabs.index(this.active) : (b.active = !1, this.active = a()), this._refresh() | |
| }, | |
| _refresh: function() { | |
| this._setupDisabled(this.options.disabled), this._setupEvents(this.options.event), this._setupHeightStyle(this.options.heightStyle), this.tabs.not(this.active).attr({ | |
| @@ -172,7 +171,7 @@ | |
| }, | |
| _setupDisabled: function(b) { | |
| a.isArray(b) && (b.length ? b.length === this.anchors.length && (b = !0) : b = !1); | |
| - for (var c, d = 0; c = this.tabs[d]; d++) b === !0 || a.inArray(d, b) !== -1 ? a(c).addClass("ui-state-disabled").attr("aria-disabled", "true") : a(c).removeClass("ui-state-disabled").removeAttr("aria-disabled"); | |
| + for (var c, d = 0; c = this.tabs[d]; d++) !0 === b || -1 !== a.inArray(d, b) ? a(c).addClass("ui-state-disabled").attr("aria-disabled", "true") : a(c).removeClass("ui-state-disabled").removeAttr("aria-disabled"); | |
| this.options.disabled = b | |
| }, | |
| _setupEvents: function(b) { | |
| @@ -218,7 +217,7 @@ | |
| newTab: h ? a() : f, | |
| newPanel: i | |
| }; | |
| - b.preventDefault(), f.hasClass("ui-state-disabled") || f.hasClass("ui-tabs-loading") || this.running || g && !c.collapsible || this._trigger("beforeActivate", b, k) === !1 || (c.active = !h && this.tabs.index(f), this.active = g ? a() : f, this.xhr && this.xhr.abort(), j.length || i.length || a.error("jQuery UI Tabs: Mismatching fragment identifier."), i.length && this.load(this.tabs.index(f), b), this._toggle(b, k)) | |
| + b.preventDefault(), f.hasClass("ui-state-disabled") || f.hasClass("ui-tabs-loading") || this.running || g && !c.collapsible || !1 === this._trigger("beforeActivate", b, k) || (c.active = !h && this.tabs.index(f), this.active = g ? a() : f, this.xhr && this.xhr.abort(), j.length || i.length || a.error("jQuery UI Tabs: Mismatching fragment identifier."), i.length && this.load(this.tabs.index(f), b), this._toggle(b, k)) | |
| }, | |
| _toggle: function(b, c) { | |
| function d() { | |
| @@ -253,7 +252,7 @@ | |
| })) | |
| }, | |
| _findActive: function(b) { | |
| - return b === !1 ? a() : this.tabs.eq(b) | |
| + return !1 === b ? a() : this.tabs.eq(b) | |
| }, | |
| _getIndex: function(a) { | |
| return "string" == typeof a && (a = this.anchors.index(this.anchors.filter("[href$='" + a + "']"))), a | |
| @@ -269,7 +268,7 @@ | |
| }, | |
| enable: function(b) { | |
| var c = this.options.disabled; | |
| - c !== !1 && (void 0 === b ? c = !1 : (b = this._getIndex(b), c = a.isArray(c) ? a.map(c, function(a) { | |
| + !1 !== c && (b === undefined ? c = !1 : (b = this._getIndex(b), c = a.isArray(c) ? a.map(c, function(a) { | |
| return a !== b ? a : null | |
| }) : a.map(this.tabs, function(a, c) { | |
| return c !== b ? c : null | |
| @@ -277,10 +276,10 @@ | |
| }, | |
| disable: function(b) { | |
| var c = this.options.disabled; | |
| - if (c !== !0) { | |
| - if (void 0 === b) c = !0; | |
| + if (!0 !== c) { | |
| + if (b === undefined) c = !0; | |
| else { | |
| - if (b = this._getIndex(b), a.inArray(b, c) !== -1) return; | |
| + if (b = this._getIndex(b), -1 !== a.inArray(b, c)) return; | |
| c = a.isArray(c) ? a.merge([b], c).sort() : [b] | |
| } | |
| this._setupDisabled(c) | |
| diff -ur build-unminified/wp-includes/js/jquery/ui/tooltip.min.js build-branch-unminified/wp-includes/js/jquery/ui/tooltip.min.js | |
| --- build-unminified/wp-includes/js/jquery/ui/tooltip.min.js 2018-10-06 21:45:31.006612347 -0500 | |
| +++ build-branch-unminified/wp-includes/js/jquery/ui/tooltip.min.js 2018-10-06 21:42:33.193286623 -0500 | |
| @@ -38,8 +38,7 @@ | |
| _removeDescribedBy: function(b) { | |
| var c = b.data("ui-tooltip-id"), | |
| d = (b.attr("aria-describedby") || "").split(/\s+/), | |
| - e = a.inArray(c, d); | |
| - e !== -1 && d.splice(e, 1), b.removeData("ui-tooltip-id"), d = a.trim(d.join(" ")), d ? b.attr("aria-describedby", d) : b.removeAttr("aria-describedby") | |
| + e = a.inArray(c, d); - 1 !== e && d.splice(e, 1), b.removeData("ui-tooltip-id"), d = a.trim(d.join(" ")), d ? b.attr("aria-describedby", d) : b.removeAttr("aria-describedby") | |
| }, | |
| _create: function() { | |
| this._on({ | |
| @@ -53,9 +52,10 @@ | |
| }, | |
| _setOption: function(b, c) { | |
| var d = this; | |
| - return "disabled" === b ? (this[c ? "_disable" : "_enable"](), void(this.options[b] = c)) : (this._super(b, c), void("content" === b && a.each(this.tooltips, function(a, b) { | |
| + if ("disabled" === b) return this[c ? "_disable" : "_enable"](), void(this.options[b] = c); | |
| + this._super(b, c), "content" === b && a.each(this.tooltips, function(a, b) { | |
| d._updateContent(b.element) | |
| - }))) | |
| + }) | |
| }, | |
| _disable: function() { | |
| var b = this; | |
| @@ -88,11 +88,12 @@ | |
| var c, d = this.options.content, | |
| e = this, | |
| f = b ? b.type : null; | |
| - return "string" == typeof d ? this._open(b, a, d) : (c = d.call(a[0], function(c) { | |
| + if ("string" == typeof d) return this._open(b, a, d); | |
| + (c = d.call(a[0], function(c) { | |
| e._delay(function() { | |
| a.data("ui-tooltip-open") && (b && (b.type = f), this._open(b, a, c)) | |
| }) | |
| - }), void(c && this._open(b, a, c))) | |
| + })) && this._open(b, a, c) | |
| }, | |
| _open: function(b, c, d) { | |
| function e(a) { | |
| @@ -128,13 +129,14 @@ | |
| var c, d = this, | |
| e = a(b ? b.currentTarget : this.element), | |
| f = this._find(e); | |
| - return f ? (c = f.tooltip, void(f.closing || (clearInterval(this.delayedShow), e.data("ui-tooltip-title") && !e.attr("title") && e.attr("title", e.data("ui-tooltip-title")), this._removeDescribedBy(e), f.hiding = !0, c.stop(!0), this._hide(c, this.options.hide, function() { | |
| + if (!f) return void e.removeData("ui-tooltip-open"); | |
| + c = f.tooltip, f.closing || (clearInterval(this.delayedShow), e.data("ui-tooltip-title") && !e.attr("title") && e.attr("title", e.data("ui-tooltip-title")), this._removeDescribedBy(e), f.hiding = !0, c.stop(!0), this._hide(c, this.options.hide, function() { | |
| d._removeTooltip(a(this)) | |
| }), e.removeData("ui-tooltip-open"), this._off(e, "mouseleave focusout keyup"), e[0] !== this.element[0] && this._off(e, "remove"), this._off(this.document, "mousemove"), b && "mouseleave" === b.type && a.each(this.parents, function(b, c) { | |
| a(c.element).attr("title", c.title), delete d.parents[b] | |
| }), f.closing = !0, this._trigger("close", b, { | |
| tooltip: c | |
| - }), f.hiding || (f.closing = !1)))) : void e.removeData("ui-tooltip-open") | |
| + }), f.hiding || (f.closing = !1)) | |
| }, | |
| _tooltip: function(b) { | |
| var c = a("<div>").attr("role", "tooltip").addClass("ui-tooltip ui-widget ui-corner-all ui-widget-content " + (this.options.tooltipClass || "")), | |
| diff -ur build-unminified/wp-includes/js/jquery/ui/widget.min.js build-branch-unminified/wp-includes/js/jquery/ui/widget.min.js | |
| --- build-unminified/wp-includes/js/jquery/ui/widget.min.js 2018-10-06 21:45:29.390600298 -0500 | |
| +++ build-branch-unminified/wp-includes/js/jquery/ui/widget.min.js 2018-10-06 21:42:31.173271564 -0500 | |
| @@ -27,13 +27,15 @@ | |
| return b = b.split(".")[1], e = j + "-" + b, d || (d = c, c = a.Widget), a.expr[":"][e.toLowerCase()] = function(b) { | |
| return !!a.data(b, e) | |
| }, a[j] = a[j] || {}, f = a[j][b], g = a[j][b] = function(a, b) { | |
| - return this._createWidget ? void(arguments.length && this._createWidget(a, b)) : new g(a, b) | |
| + if (!this._createWidget) return new g(a, b); | |
| + arguments.length && this._createWidget(a, b) | |
| }, a.extend(g, f, { | |
| version: d.version, | |
| _proto: a.extend({}, d), | |
| _childConstructors: [] | |
| }), h = new c, h.options = a.widget.extend({}, h.options), a.each(d, function(b, d) { | |
| - return a.isFunction(d) ? void(i[b] = function() { | |
| + if (!a.isFunction(d)) return void(i[b] = d); | |
| + i[b] = function() { | |
| var a = function() { | |
| return c.prototype[b].apply(this, arguments) | |
| }, | |
| @@ -45,7 +47,7 @@ | |
| f = this._superApply; | |
| return this._super = a, this._superApply = e, b = d.apply(this, arguments), this._super = c, this._superApply = f, b | |
| } | |
| - }()) : void(i[b] = d) | |
| + }() | |
| }), g.prototype = a.widget.extend(h, { | |
| widgetEventPrefix: f ? h.widgetEventPrefix || b : b | |
| }, i, { | |
| @@ -59,7 +61,7 @@ | |
| }), delete f._childConstructors) : c._childConstructors.push(g), a.widget.bridge(b, g), g | |
| }, a.widget.extend = function(b) { | |
| for (var d, e, f = c.call(arguments, 1), g = 0, h = f.length; g < h; g++) | |
| - for (d in f[g]) e = f[g][d], f[g].hasOwnProperty(d) && void 0 !== e && (a.isPlainObject(e) ? b[d] = a.isPlainObject(b[d]) ? a.widget.extend({}, b[d], e) : a.widget.extend({}, e) : b[d] = e); | |
| + for (d in f[g]) e = f[g][d], f[g].hasOwnProperty(d) && e !== undefined && (a.isPlainObject(e) ? b[d] = a.isPlainObject(b[d]) ? a.widget.extend({}, b[d], e) : a.widget.extend({}, e) : b[d] = e); | |
| return b | |
| }, a.widget.bridge = function(b, d) { | |
| var e = d.prototype.widgetFullName || b; | |
| @@ -69,7 +71,7 @@ | |
| i = this; | |
| return g ? this.each(function() { | |
| var c, d = a.data(this, e); | |
| - return "instance" === f ? (i = d, !1) : d ? a.isFunction(d[f]) && "_" !== f.charAt(0) ? (c = d[f].apply(d, h), c !== d && void 0 !== c ? (i = c && c.jquery ? i.pushStack(c.get()) : c, !1) : void 0) : a.error("no such method '" + f + "' for " + b + " widget instance") : a.error("cannot call methods on " + b + " prior to initialization; attempted to call method '" + f + "'") | |
| + return "instance" === f ? (i = d, !1) : d ? a.isFunction(d[f]) && "_" !== f.charAt(0) ? (c = d[f].apply(d, h), c !== d && c !== undefined ? (i = c && c.jquery ? i.pushStack(c.get()) : c, !1) : void 0) : a.error("no such method '" + f + "' for " + b + " widget instance") : a.error("cannot call methods on " + b + " prior to initialization; attempted to call method '" + f + "'") | |
| }) : (h.length && (f = a.widget.extend.apply(null, [f].concat(h))), this.each(function() { | |
| var b = a.data(this, e); | |
| b ? (b.option(f || {}), b._init && b._init()) : a.data(this, e, new d(f, this)) | |
| @@ -107,10 +109,10 @@ | |
| if ("string" == typeof b) | |
| if (g = {}, d = b.split("."), b = d.shift(), d.length) { | |
| for (e = g[b] = a.widget.extend({}, this.options[b]), f = 0; f < d.length - 1; f++) e[d[f]] = e[d[f]] || {}, e = e[d[f]]; | |
| - if (b = d.pop(), 1 === arguments.length) return void 0 === e[b] ? null : e[b]; | |
| + if (b = d.pop(), 1 === arguments.length) return e[b] === undefined ? null : e[b]; | |
| e[b] = c | |
| } else { | |
| - if (1 === arguments.length) return void 0 === this.options[b] ? null : this.options[b]; | |
| + if (1 === arguments.length) return this.options[b] === undefined ? null : this.options[b]; | |
| g[b] = c | |
| } return this._setOptions(g), this | |
| }, | |
| @@ -136,7 +138,7 @@ | |
| var e, f = this; | |
| "boolean" != typeof b && (d = c, c = b, b = !1), d ? (c = e = a(c), this.bindings = this.bindings.add(c)) : (d = c, c = this.element, e = this.widget()), a.each(d, function(d, g) { | |
| function h() { | |
| - if (b || f.options.disabled !== !0 && !a(this).hasClass("ui-state-disabled")) return ("string" == typeof g ? f[g] : g).apply(f, arguments) | |
| + if (b || !0 !== f.options.disabled && !a(this).hasClass("ui-state-disabled")) return ("string" == typeof g ? f[g] : g).apply(f, arguments) | |
| } | |
| "string" != typeof g && (h.guid = g.guid = g.guid || h.guid || a.guid++); | |
| var i = d.match(/^([\w:-]*)\s*(.*)$/), | |
| @@ -179,7 +181,7 @@ | |
| var e, f, g = this.options[b]; | |
| if (d = d || {}, c = a.Event(c), c.type = (b === this.widgetEventPrefix ? b : this.widgetEventPrefix + b).toLowerCase(), c.target = this.element[0], f = c.originalEvent) | |
| for (e in f) e in c || (c[e] = f[e]); | |
| - return this.element.trigger(c, d), !(a.isFunction(g) && g.apply(this.element[0], [c].concat(d)) === !1 || c.isDefaultPrevented()) | |
| + return this.element.trigger(c, d), !(a.isFunction(g) && !1 === g.apply(this.element[0], [c].concat(d)) || c.isDefaultPrevented()) | |
| } | |
| }, a.each({ | |
| show: "fadeIn", | |
| @@ -189,7 +191,7 @@ | |
| "string" == typeof e && (e = { | |
| effect: e | |
| }); | |
| - var g, h = e ? e === !0 || "number" == typeof e ? c : e.effect || c : b; | |
| + var g, h = e ? !0 === e || "number" == typeof e ? c : e.effect || c : b; | |
| e = e || {}, "number" == typeof e && (e = { | |
| duration: e | |
| }), g = !a.isEmptyObject(e), e.complete = f, e.delay && d.delay(e.delay), g && a.effects && a.effects.effect[h] ? d[b](e) : h !== b && d[h] ? d[h](e.duration, e.easing, f) : d.queue(function(c) { | |
| diff -ur build-unminified/wp-includes/js/json2.min.js build-branch-unminified/wp-includes/js/json2.min.js | |
| --- build-unminified/wp-includes/js/json2.min.js 2018-10-06 21:45:37.382659890 -0500 | |
| +++ build-branch-unminified/wp-includes/js/json2.min.js 2018-10-06 21:42:39.565334127 -0500 | |
| @@ -35,9 +35,9 @@ | |
| return e = 0 === g.length ? "[]" : gap ? "[\n" + gap + g.join(",\n" + gap) + "\n" + h + "]" : "[" + g.join(",") + "]", gap = h, e | |
| } | |
| if (rep && "object" == typeof rep) | |
| - for (f = rep.length, c = 0; c < f; c += 1) "string" == typeof rep[c] && (d = rep[c], e = str(d, i), e && g.push(quote(d) + (gap ? ": " : ":") + e)); | |
| + for (f = rep.length, c = 0; c < f; c += 1) "string" == typeof rep[c] && (d = rep[c], (e = str(d, i)) && g.push(quote(d) + (gap ? ": " : ":") + e)); | |
| else | |
| - for (d in i) Object.prototype.hasOwnProperty.call(i, d) && (e = str(d, i), e && g.push(quote(d) + (gap ? ": " : ":") + e)); | |
| + for (d in i) Object.prototype.hasOwnProperty.call(i, d) && (e = str(d, i)) && g.push(quote(d) + (gap ? ": " : ":") + e); | |
| return e = 0 === g.length ? "{}" : gap ? "{\n" + gap + g.join(",\n" + gap) + "\n" + h + "}" : "{" + g.join(",") + "}", gap = h, e | |
| } | |
| } | |
| @@ -72,7 +72,7 @@ | |
| function walk(a, b) { | |
| var c, d, e = a[b]; | |
| if (e && "object" == typeof e) | |
| - for (c in e) Object.prototype.hasOwnProperty.call(e, c) && (d = walk(e, c), void 0 !== d ? e[c] = d : delete e[c]); | |
| + for (c in e) Object.prototype.hasOwnProperty.call(e, c) && (d = walk(e, c), d !== undefined ? e[c] = d : delete e[c]); | |
| return reviver.call(a, b, e) | |
| } | |
| var j; | |
| diff -ur build-unminified/wp-includes/js/mce-view.min.js build-branch-unminified/wp-includes/js/mce-view.min.js | |
| --- build-unminified/wp-includes/js/mce-view.min.js 2018-10-06 21:45:34.518638535 -0500 | |
| +++ build-branch-unminified/wp-includes/js/mce-view.min.js 2018-10-06 21:42:37.269317010 -0500 | |
| @@ -42,7 +42,7 @@ | |
| }, | |
| createInstance: function(a, b, c, d) { | |
| var e, g, h = this.get(a); | |
| - return b.indexOf("[") !== -1 && b.indexOf("]") !== -1 && (b = b.replace(/\[[^\]]+\]/g, function(a) { | |
| + return -1 !== b.indexOf("[") && -1 !== b.indexOf("]") && (b = b.replace(/\[[^\]]+\]/g, function(a) { | |
| return a.replace(/[\r\n]/g, "") | |
| })), !d && (g = this.getInstance(b)) ? g : (e = encodeURIComponent(b), c = _.extend(c || {}, { | |
| text: b, | |
| @@ -105,7 +105,7 @@ | |
| var e = this; | |
| d(c.getBody()).find('[data-wpview-text="' + e.encodedText + '"]').filter(function() { | |
| var a; | |
| - return null == b || (a = d(this).data("rendered") === !0, b ? a : !a) | |
| + return null == b || (a = !0 === d(this).data("rendered"), b ? a : !a) | |
| }).each(function() { | |
| a.call(e, c, this, this) | |
| }) | |
| @@ -122,9 +122,10 @@ | |
| replaceMarkers: function() { | |
| this.getMarkers(function(a, b) { | |
| var c, e = b === a.selection.getNode(); | |
| - return this.loader || d(b).text() === tinymce.DOM.decode(this.text) ? (c = a.$('<div class="wpview wpview-wrap" data-wpview-text="' + this.encodedText + '" data-wpview-type="' + this.type + '" contenteditable="false"></div>'), a.$(b).replaceWith(c), void(e && setTimeout(function() { | |
| + if (!this.loader && d(b).text() !== tinymce.DOM.decode(this.text)) return void a.dom.setAttrib(b, "data-wpview-marker", null); | |
| + c = a.$('<div class="wpview wpview-wrap" data-wpview-text="' + this.encodedText + '" data-wpview-type="' + this.type + '" contenteditable="false"></div>'), a.$(b).replaceWith(c), e && setTimeout(function() { | |
| a.selection.select(c[0]), a.selection.collapse() | |
| - }))) : void a.dom.setAttrib(b, "data-wpview-marker", null) | |
| + }) | |
| }) | |
| }, | |
| removeMarkers: function() { | |
| @@ -133,8 +134,8 @@ | |
| }) | |
| }, | |
| setContent: function(a, b, c) { | |
| - _.isObject(a) && (a.sandbox || a.head || a.body.indexOf("<script") !== -1) ? this.setIframes(a.head || "", a.body, b, c) : _.isString(a) && a.indexOf("<script") !== -1 ? this.setIframes("", a, b, c) : this.getNodes(function(c, d) { | |
| - a = a.body || a, a.indexOf("<iframe") !== -1 && (a += '<span class="mce-shim"></span>'), c.undoManager.transact(function() { | |
| + _.isObject(a) && (a.sandbox || a.head || -1 !== a.body.indexOf("<script")) ? this.setIframes(a.head || "", a.body, b, c) : _.isString(a) && -1 !== a.indexOf("<script") ? this.setIframes("", a, b, c) : this.getNodes(function(c, d) { | |
| + a = a.body || a, -1 !== a.indexOf("<iframe") && (a += '<span class="mce-shim"></span>'), c.undoManager.transact(function() { | |
| d.innerHTML = "", d.appendChild(_.isString(a) ? c.dom.createFragment(a) : a), c.dom.add(d, "span", { | |
| "class": "wpview-end" | |
| }) | |
| @@ -143,7 +144,7 @@ | |
| }, | |
| setIframes: function(c, e, f, g) { | |
| var h = this; | |
| - if (e.indexOf("[") !== -1 && e.indexOf("]") !== -1) { | |
| + if (-1 !== e.indexOf("[") && -1 !== e.indexOf("]")) { | |
| var i = new RegExp("\\[\\/?(?:" + a.mceViewL10n.shortcodes.join("|") + ")[^\\]]*?\\]", "g"); | |
| e = e.replace(i, function(a) { | |
| return a.replace(/</g, "<").replace(/>/g, ">") | |
| @@ -173,7 +174,7 @@ | |
| u = a.getBody().className || "", | |
| v = a.getDoc().getElementsByTagName("head")[0]; | |
| if (tinymce.each(s.$('link[rel="stylesheet"]', v), function(a) { | |
| - a.href && a.href.indexOf("skins/lightgray/content.min.css") === -1 && a.href.indexOf("skins/wordpress/wp-content.css") === -1 && (t += s.getOuterHTML(a)) | |
| + a.href && -1 === a.href.indexOf("skins/lightgray/content.min.css") && -1 === a.href.indexOf("skins/wordpress/wp-content.css") && (t += s.getOuterHTML(a)) | |
| }), h.iframeHeight && s.add(g, "span", { | |
| "data-mce-bogus": 1, | |
| style: { | |
| @@ -238,7 +239,7 @@ | |
| function(a, b, c, d) { | |
| function e(b) { | |
| var c = {}; | |
| - return a.tinymce ? !b || b.indexOf("<") === -1 && b.indexOf(">") === -1 ? b : (j = j || new a.tinymce.html.Schema(c), k = k || new a.tinymce.html.DomParser(c, j), l = l || new a.tinymce.html.Serializer(c, j), l.serialize(k.parse(b, { | |
| + return a.tinymce ? !b || -1 === b.indexOf("<") && -1 === b.indexOf(">") ? b : (j = j || new a.tinymce.html.Schema(c), k = k || new a.tinymce.html.DomParser(c, j), l = l || new a.tinymce.html.Serializer(c, j), l.serialize(k.parse(b, { | |
| forced_root_block: !1 | |
| }))) : b.replace(/<[^>]+>/g, "") | |
| } | |
| diff -ur build-unminified/wp-includes/js/media-audiovideo.min.js build-branch-unminified/wp-includes/js/media-audiovideo.min.js | |
| --- build-unminified/wp-includes/js/media-audiovideo.min.js 2018-10-06 21:45:28.622594571 -0500 | |
| +++ build-branch-unminified/wp-includes/js/media-audiovideo.min.js 2018-10-06 21:42:30.429266018 -0500 | |
| @@ -9,7 +9,7 @@ | |
| return a[d].call(e.exports, e, e.exports, b), e.l = !0, e.exports | |
| } | |
| var c = {}; | |
| - return b.m = a, b.c = c, b.d = function(a, c, d) { | |
| + b.m = a, b.c = c, b.d = function(a, c, d) { | |
| b.o(a, c) || Object.defineProperty(a, c, { | |
| configurable: !1, | |
| enumerable: !0, | |
| @@ -74,11 +74,11 @@ | |
| width: 400 | |
| }, | |
| edit: function(a) { | |
| - var b, c = wp.shortcode.next("audio", a).shortcode; | |
| - return b = wp.media({ | |
| + var b = wp.shortcode.next("audio", a).shortcode; | |
| + return wp.media({ | |
| frame: "audio", | |
| state: "audio-details", | |
| - metadata: _.defaults(c.attrs.named, this.defaults) | |
| + metadata: _.defaults(b.attrs.named, this.defaults) | |
| }) | |
| }, | |
| shortcode: function(a) { | |
| @@ -105,11 +105,11 @@ | |
| height: 360 | |
| }, | |
| edit: function(a) { | |
| - var b, c, d = wp.shortcode.next("video", a).shortcode; | |
| - return c = d.attrs.named, c.content = d.content, b = wp.media({ | |
| + var b, c = wp.shortcode.next("video", a).shortcode; | |
| + return b = c.attrs.named, b.content = c.content, wp.media({ | |
| frame: "video", | |
| state: "video-details", | |
| - metadata: _.defaults(c, this.defaults) | |
| + metadata: _.defaults(b, this.defaults) | |
| }) | |
| }, | |
| shortcode: function(a) { | |
| diff -ur build-unminified/wp-includes/js/media-editor.min.js build-branch-unminified/wp-includes/js/media-editor.min.js | |
| --- build-unminified/wp-includes/js/media-editor.min.js 2018-10-06 21:45:26.390577929 -0500 | |
| +++ build-branch-unminified/wp-includes/js/media-editor.min.js 2018-10-06 21:42:27.917247291 -0500 | |
| @@ -34,8 +34,8 @@ | |
| return wp.media.string._audioVideo("video", a, b) | |
| }, | |
| _audioVideo: function(a, c, d) { | |
| - var e, f, g; | |
| - return c = wp.media.string.props(c, d), "embed" !== c.link ? wp.media.string.link(c) : (e = {}, "video" === a && (d.image && -1 === d.image.src.indexOf(d.icon) && (e.poster = d.image.src), d.width && (e.width = d.width), d.height && (e.height = d.height)), g = d.filename.split(".").pop(), b.contains(wp.media.view.settings.embedExts, g) ? (e[g] = d.url, f = wp.shortcode.string({ | |
| + var e, f; | |
| + return c = wp.media.string.props(c, d), "embed" !== c.link ? wp.media.string.link(c) : (e = {}, "video" === a && (d.image && -1 === d.image.src.indexOf(d.icon) && (e.poster = d.image.src), d.width && (e.width = d.width), d.height && (e.height = d.height)), f = d.filename.split(".").pop(), b.contains(wp.media.view.settings.embedExts, f) ? (e[f] = d.url, wp.shortcode.string({ | |
| tag: a, | |
| attrs: e | |
| })) : wp.media.string.link(c)) | |
| @@ -66,11 +66,11 @@ | |
| height: "" | |
| }, | |
| edit: function(a, c) { | |
| - var d, e, f = {}; | |
| - return c ? f.url = a.replace(/<[^>]+>/g, "") : (e = wp.shortcode.next("embed", a).shortcode, f = b.defaults(e.attrs.named, this.defaults), e.content && (f.url = e.content)), d = wp.media({ | |
| + var d, e = {}; | |
| + return c ? e.url = a.replace(/<[^>]+>/g, "") : (d = wp.shortcode.next("embed", a).shortcode, e = b.defaults(d.attrs.named, this.defaults), d.content && (e.url = d.content)), wp.media({ | |
| frame: "post", | |
| state: "embed", | |
| - metadata: f | |
| + metadata: e | |
| }) | |
| }, | |
| shortcode: function(a) { | |
| @@ -91,7 +91,7 @@ | |
| var d, e, f, g, h = a.string(), | |
| i = c[h], | |
| j = this; | |
| - return delete c[h], i ? i : (d = b.defaults(a.attrs.named, this.defaults), e = b.pick(d, "orderby", "order"), e.type = this.type, e.perPage = -1, void 0 !== d.orderby && (d._orderByField = d.orderby), "rand" === d.orderby && (d._orderbyRandom = !0), d.orderby && !/^menu_order(?: ID)?$/i.test(d.orderby) || (e.orderby = "menuOrder"), d.ids ? (e.post__in = d.ids.split(","), e.orderby = "post__in") : d.include && (e.post__in = d.include.split(",")), d.exclude && (e.post__not_in = d.exclude.split(",")), e.post__in || (e.uploadedTo = d.id), g = b.omit(d, "id", "ids", "include", "exclude", "orderby", "order"), b.each(this.defaults, function(a, b) { | |
| + return delete c[h], i || (d = b.defaults(a.attrs.named, this.defaults), e = b.pick(d, "orderby", "order"), e.type = this.type, e.perPage = -1, undefined !== d.orderby && (d._orderByField = d.orderby), "rand" === d.orderby && (d._orderbyRandom = !0), d.orderby && !/^menu_order(?: ID)?$/i.test(d.orderby) || (e.orderby = "menuOrder"), d.ids ? (e.post__in = d.ids.split(","), e.orderby = "post__in") : d.include && (e.post__in = d.include.split(",")), d.exclude && (e.post__not_in = d.exclude.split(",")), e.post__in || (e.uploadedTo = d.id), g = b.omit(d, "id", "ids", "include", "exclude", "orderby", "order"), b.each(this.defaults, function(a, b) { | |
| g[b] = j.coerce(g, b) | |
| }), f = wp.media.query(e), f[this.tag] = new Backbone.Model(g), f) | |
| }, | |
| @@ -165,7 +165,8 @@ | |
| thumbnail_id: c.post.featuredImageId, | |
| _wpnonce: c.post.nonce | |
| }).done(function(b) { | |
| - return "0" == b ? void window.alert(window.setPostThumbnailL10n.error) : void a(".inside", "#postimagediv").html(b) | |
| + if ("0" == b) return void window.alert(window.setPostThumbnailL10n.error); | |
| + a(".inside", "#postimagediv").html(b) | |
| }) | |
| }, | |
| remove: function() { | |
| @@ -213,14 +214,14 @@ | |
| }, | |
| add: function(d, e) { | |
| var f = this.get(d); | |
| - return f ? f : (f = c[d] = wp.media(b.defaults(e || {}, { | |
| + return f || (f = c[d] = wp.media(b.defaults(e || {}, { | |
| frame: "post", | |
| state: "insert", | |
| title: wp.media.view.l10n.addMedia, | |
| multiple: !0 | |
| })), f.on("insert", function(c) { | |
| var d = f.state(); | |
| - c = c || d.get("selection"), c && a.when.apply(a, c.map(function(a) { | |
| + (c = c || d.get("selection")) && a.when.apply(a, c.map(function(a) { | |
| var b = d.display(a).toJSON(); | |
| return this.send.attachment(b, a.toJSON()) | |
| }, this)).done(function() { | |
| @@ -250,7 +251,7 @@ | |
| }, this), f.state("featured-image").on("select", wp.media.featuredImage.select), f.setState(f.options.state), f) | |
| }, | |
| id: function(a) { | |
| - return a ? a : (a = window.wpActiveEditor, a || b.isUndefined(window.tinymce) || !tinymce.activeEditor || (a = tinymce.activeEditor.id), a = a || "") | |
| + return a || (a = window.wpActiveEditor, a || b.isUndefined(window.tinymce) || !tinymce.activeEditor || (a = tinymce.activeEditor.id), a = a || "") | |
| }, | |
| get: function(a) { | |
| return a = this.id(a), c[a] | |
| diff -ur build-unminified/wp-includes/js/mediaelement/mediaelement-migrate.min.js build-branch-unminified/wp-includes/js/mediaelement/mediaelement-migrate.min.js | |
| --- build-unminified/wp-includes/js/mediaelement/mediaelement-migrate.min.js 2018-10-06 21:45:22.406548222 -0500 | |
| +++ build-branch-unminified/wp-includes/js/mediaelement/mediaelement-migrate.min.js 2018-10-06 21:42:22.653208048 -0500 | |
| @@ -1,9 +1,9 @@ | |
| ! function(a, b) { | |
| - void 0 === mejs.plugins && (mejs.plugins = {}, mejs.plugins.silverlight = [], mejs.plugins.silverlight.push({ | |
| + mejs.plugins === undefined && (mejs.plugins = {}, mejs.plugins.silverlight = [], mejs.plugins.silverlight.push({ | |
| types: [] | |
| })), mejs.HtmlMediaElementShim = mejs.HtmlMediaElementShim || { | |
| getTypeFromFile: mejs.Utils.getTypeFromFile | |
| - }, void 0 === mejs.MediaFeatures && (mejs.MediaFeatures = mejs.Features), void 0 === mejs.Utility && (mejs.Utility = mejs.Utils); | |
| + }, mejs.MediaFeatures === undefined && (mejs.MediaFeatures = mejs.Features), mejs.Utility === undefined && (mejs.Utility = mejs.Utils); | |
| var c = MediaElementPlayer.prototype.init; | |
| MediaElementPlayer.prototype.init = function() { | |
| this.options.classPrefix = "mejs-", this.$media = this.$node = b(this.node), c.call(this) | |
| @@ -12,12 +12,12 @@ | |
| MediaElementPlayer.prototype._meReady = function() { | |
| this.container = b(this.container), this.controls = b(this.controls), this.layers = b(this.layers), d.apply(this, arguments) | |
| }, MediaElementPlayer.prototype.getElement = function(a) { | |
| - return void 0 !== b && a instanceof b ? a[0] : a | |
| + return b !== undefined && a instanceof b ? a[0] : a | |
| }, MediaElementPlayer.prototype.buildfeatures = function(a, c, d, e) { | |
| for (var f = ["playpause", "current", "progress", "duration", "tracks", "volume", "fullscreen"], g = 0, h = this.options.features.length; g < h; g++) { | |
| var i = this.options.features[g]; | |
| if (this["build" + i]) try { | |
| - f.indexOf(i) === -1 ? this["build" + i](a, b(c), b(d), e) : this["build" + i](a, c, d, e) | |
| + -1 === f.indexOf(i) ? this["build" + i](a, b(c), b(d), e) : this["build" + i](a, c, d, e) | |
| } catch (j) { | |
| console.error("error building " + i, j) | |
| } | |
| diff -ur build-unminified/wp-includes/js/mediaelement/wp-playlist.min.js build-branch-unminified/wp-includes/js/mediaelement/wp-playlist.min.js | |
| --- build-unminified/wp-includes/js/mediaelement/wp-playlist.min.js 2018-10-06 21:45:22.046545538 -0500 | |
| +++ build-branch-unminified/wp-includes/js/mediaelement/wp-playlist.min.js 2018-10-06 21:42:22.305205453 -0500 | |
| @@ -26,8 +26,8 @@ | |
| this.renderCurrent(), this.mejs.setSrc(this.playerNode.attr("src")), this.mejs.load(), this.mejs.play() | |
| }, | |
| renderCurrent: function() { | |
| - var a, b = "wp-includes/images/media/video.png"; | |
| - "video" === this.data.type ? (this.data.images && this.current.get("image") && -1 === this.current.get("image").src.indexOf(b) && this.playerNode.attr("poster", this.current.get("image").src), a = this.current.get("dimensions").resized, this.playerNode.attr(a)) : (this.data.images || this.current.set("image", !1), this.currentNode.html(this.currentTemplate(this.current.toJSON()))) | |
| + var a; | |
| + "video" === this.data.type ? (this.data.images && this.current.get("image") && -1 === this.current.get("image").src.indexOf("wp-includes/images/media/video.png") && this.playerNode.attr("poster", this.current.get("image").src), a = this.current.get("dimensions").resized, this.playerNode.attr(a)) : (this.data.images || this.current.set("image", !1), this.currentNode.html(this.currentTemplate(this.current.toJSON()))) | |
| }, | |
| renderTracks: function() { | |
| var b = this, | |
| diff -ur build-unminified/wp-includes/js/media-grid.min.js build-branch-unminified/wp-includes/js/media-grid.min.js | |
| --- build-unminified/wp-includes/js/media-grid.min.js 2018-10-06 21:45:34.382637521 -0500 | |
| +++ build-branch-unminified/wp-includes/js/media-grid.min.js 2018-10-06 21:42:37.133315996 -0500 | |
| @@ -9,7 +9,7 @@ | |
| return a[d].call(e.exports, e, e.exports, b), e.l = !0, e.exports | |
| } | |
| var c = {}; | |
| - return b.m = a, b.c = c, b.d = function(a, c, d) { | |
| + b.m = a, b.c = c, b.d = function(a, c, d) { | |
| b.o(a, c) || Object.defineProperty(a, c, { | |
| configurable: !1, | |
| enumerable: !0, | |
| diff -ur build-unminified/wp-includes/js/media-models.min.js build-branch-unminified/wp-includes/js/media-models.min.js | |
| --- build-unminified/wp-includes/js/media-models.min.js 2018-10-06 21:45:36.854655954 -0500 | |
| +++ build-branch-unminified/wp-includes/js/media-models.min.js 2018-10-06 21:42:39.021330071 -0500 | |
| @@ -9,7 +9,7 @@ | |
| return a[d].call(e.exports, e, e.exports, b), e.l = !0, e.exports | |
| } | |
| var c = {}; | |
| - return b.m = a, b.c = c, b.d = function(a, c, d) { | |
| + b.m = a, b.c = c, b.d = function(a, c, d) { | |
| b.o(a, c) || Object.defineProperty(a, c, { | |
| configurable: !1, | |
| enumerable: !0, | |
| @@ -116,12 +116,10 @@ | |
| } | |
| }, { | |
| create: function(a) { | |
| - var b = wp.media.model.Attachments; | |
| - return b.all.push(a) | |
| + return wp.media.model.Attachments.all.push(a) | |
| }, | |
| get: _.memoize(function(a, b) { | |
| - var c = wp.media.model.Attachments; | |
| - return c.all.push(b || { | |
| + return wp.media.model.Attachments.all.push(b || { | |
| id: a | |
| }) | |
| }) | |
| @@ -144,7 +142,7 @@ | |
| }, | |
| _changeFilteredProps: function(a) { | |
| if (!this.props.get("query")) { | |
| - var b = _.chain(a.changed).map(function(b, d) { | |
| + _.chain(a.changed).map(function(b, d) { | |
| var e = c.filters[d], | |
| f = a.get(d); | |
| if (e) { | |
| @@ -155,8 +153,7 @@ | |
| } | |
| return !0 | |
| } | |
| - }, this).any().value(); | |
| - b && (this._source || (this._source = new c(this.models)), this.reset(this._source.filter(this.validator, this))) | |
| + }, this).any().value() && (this._source || (this._source = new c(this.models)), this.reset(this._source.filter(this.validator, this))) | |
| } | |
| }, | |
| validateDestroyed: !1, | |
| @@ -252,11 +249,11 @@ | |
| }, this) | |
| }, | |
| type: function(a) { | |
| - var b, c, d = this.props.get("type"), | |
| - e = a.toJSON(); | |
| - return !(d && (!_.isArray(d) || d.length)) || (b = e.mime || e.file && e.file.type || "", c = _.isArray(d) ? _.find(d, function(a) { | |
| + var b, c = this.props.get("type"), | |
| + d = a.toJSON(); | |
| + return !(c && (!_.isArray(c) || c.length)) || (b = d.mime || d.file && d.file.type || "", _.isArray(c) ? _.find(c, function(a) { | |
| return -1 !== b.indexOf(a) | |
| - }) : -1 !== b.indexOf(d)) | |
| + }) : -1 !== b.indexOf(c)) | |
| }, | |
| uploadedTo: function(a) { | |
| var b = this.props.get("uploadedTo"); | |
| @@ -361,7 +358,8 @@ | |
| }, | |
| setLinkTypeFromUrl: function() { | |
| var a, b = this.get("linkUrl"); | |
| - return b ? (a = "custom", this.attachment ? this.attachment.get("url") === b ? a = "file" : this.attachment.get("link") === b && (a = "post") : this.get("url") === b && (a = "file"), void this.set("link", a)) : void this.set("link", "none") | |
| + if (!b) return void this.set("link", "none"); | |
| + a = "custom", this.attachment ? this.attachment.get("url") === b ? a = "file" : this.attachment.get("link") === b && (a = "post") : this.get("url") === b && (a = "file"), this.set("link", a) | |
| }, | |
| updateLinkUrl: function() { | |
| var a, b = this.get("link"); | |
| @@ -385,7 +383,8 @@ | |
| }, | |
| setAspectRatio: function() { | |
| var a; | |
| - return this.attachment && this.attachment.get("sizes") && (a = this.attachment.get("sizes").full) ? void this.set("aspectRatio", a.width / a.height) : void this.set("aspectRatio", this.get("customWidth") / this.get("customHeight")) | |
| + if (this.attachment && this.attachment.get("sizes") && (a = this.attachment.get("sizes").full)) return void this.set("aspectRatio", a.width / a.height); | |
| + this.set("aspectRatio", this.get("customWidth") / this.get("customHeight")) | |
| } | |
| }); | |
| a.exports = c | |
| diff -ur build-unminified/wp-includes/js/media-views.min.js build-branch-unminified/wp-includes/js/media-views.min.js | |
| --- build-unminified/wp-includes/js/media-views.min.js 2018-10-06 21:45:36.078650167 -0500 | |
| +++ build-branch-unminified/wp-includes/js/media-views.min.js 2018-10-06 21:42:38.269324465 -0500 | |
| @@ -9,7 +9,7 @@ | |
| return a[d].call(e.exports, e, e.exports, b), e.l = !0, e.exports | |
| } | |
| var c = {}; | |
| - return b.m = a, b.c = c, b.d = function(a, c, d) { | |
| + b.m = a, b.c = c, b.d = function(a, c, d) { | |
| b.o(a, c) || Object.defineProperty(a, c, { | |
| configurable: !1, | |
| enumerable: !0, | |
| @@ -36,9 +36,9 @@ | |
| OTransition: "oTransitionEnd otransitionend", | |
| transition: "transitionend" | |
| }; | |
| - return a = _.find(_.keys(c), function(a) { | |
| + return (a = _.find(_.keys(c), function(a) { | |
| return !_.isUndefined(b[a]) | |
| - }), a && { | |
| + })) && { | |
| end: c[a] | |
| } | |
| }(), e.events = _.extend({}, Backbone.Events), e.transition = function(a, b) { | |
| @@ -123,12 +123,12 @@ | |
| _router: function() { | |
| var a, b = this.frame.router, | |
| c = this.get("router"); | |
| - this.frame.$el.toggleClass("hide-router", !c), c && (this.frame.router.render(c), a = b.get(), a && a.select && a.select(this.frame.content.mode())) | |
| + this.frame.$el.toggleClass("hide-router", !c), c && (this.frame.router.render(c), (a = b.get()) && a.select && a.select(this.frame.content.mode())) | |
| }, | |
| _menu: function() { | |
| var a, b = this.frame.menu, | |
| c = this.get("menu"); | |
| - this.frame.$el.toggleClass("hide-menu", !c), c && (b.mode(c), a = b.get(), a && a.select && a.select(this.id)) | |
| + this.frame.$el.toggleClass("hide-menu", !c), c && (b.mode(c), (a = b.get()) && a.select && a.select(this.id)) | |
| }, | |
| _updateMenu: function() { | |
| var a = this.previous("menu"), | |
| @@ -237,8 +237,7 @@ | |
| this.active && !a.length && c && !c.get(d) && this.frame.content.render(this.get("content")) | |
| }, | |
| uploading: function(a) { | |
| - var b = this.frame.content; | |
| - "upload" === b.mode() && this.frame.content.mode("browse"), this.get("autoSelect") && (this.get("selection").add(a), this.frame.trigger("library:selection:add")) | |
| + "upload" === this.frame.content.mode() && this.frame.content.mode("browse"), this.get("autoSelect") && (this.get("selection").add(a), this.frame.trigger("library:selection:add")) | |
| }, | |
| saveContentMode: function() { | |
| if ("browse" === this.get("router")) { | |
| @@ -296,8 +295,7 @@ | |
| this.get("library") || this.set("library", new wp.media.model.Selection), this.get("AttachmentView") || this.set("AttachmentView", wp.media.view.Attachment.EditLibrary), d.prototype.initialize.apply(this, arguments) | |
| }, | |
| activate: function() { | |
| - var a = this.get("library"); | |
| - a.props.set("type", "image"), this.get("library").observe(wp.Uploader.queue), this.frame.on("content:render:browse", this.gallerySettings, this), d.prototype.activate.apply(this, arguments) | |
| + this.get("library").props.set("type", "image"), this.get("library").observe(wp.Uploader.queue), this.frame.on("content:render:browse", this.gallerySettings, this), d.prototype.activate.apply(this, arguments) | |
| }, | |
| deactivate: function() { | |
| this.get("library").unobserve(wp.Uploader.queue), this.frame.off("content:render:browse", this.gallerySettings, this), d.prototype.deactivate.apply(this, arguments) | |
| @@ -375,8 +373,7 @@ | |
| "video" === this.get("type") && (a = "video-" + a), this.set("id", a + "-edit"), this.set("toolbar", a + "-edit"), this.get("library") || this.set("library", new wp.media.model.Selection), this.get("AttachmentView") || this.set("AttachmentView", wp.media.view.Attachment.EditLibrary), d.prototype.initialize.apply(this, arguments) | |
| }, | |
| activate: function() { | |
| - var a = this.get("library"); | |
| - a.props.set("type", this.get("type")), this.get("library").observe(wp.Uploader.queue), this.frame.on("content:render:browse", this.renderSettings, this), d.prototype.activate.apply(this, arguments) | |
| + this.get("library").props.set("type", this.get("type")), this.get("library").observe(wp.Uploader.queue), this.frame.on("content:render:browse", this.renderSettings, this), d.prototype.activate.apply(this, arguments) | |
| }, | |
| deactivate: function() { | |
| this.get("library").unobserve(wp.Uploader.queue), this.frame.off("content:render:browse", this.renderSettings, this), d.prototype.deactivate.apply(this, arguments) | |
| @@ -1081,7 +1078,7 @@ | |
| var a, b; | |
| d.prototype.bindHandlers.apply(this, arguments), this.on("activate", this.activate, this), b = _.find(this.counts, function(a) { | |
| return 0 === a.count | |
| - }), "undefined" != typeof b && this.listenTo(wp.media.model.Attachments.all, "change:type", this.mediaTypeCounts), this.on("menu:create:gallery", this.createMenu, this), this.on("menu:create:playlist", this.createMenu, this), this.on("menu:create:video-playlist", this.createMenu, this), this.on("toolbar:create:main-insert", this.createToolbar, this), this.on("toolbar:create:main-gallery", this.createToolbar, this), this.on("toolbar:create:main-playlist", this.createToolbar, this), this.on("toolbar:create:main-video-playlist", this.createToolbar, this), this.on("toolbar:create:featured-image", this.featuredImageToolbar, this), this.on("toolbar:create:main-embed", this.mainEmbedToolbar, this), a = { | |
| + }), void 0 !== b && this.listenTo(wp.media.model.Attachments.all, "change:type", this.mediaTypeCounts), this.on("menu:create:gallery", this.createMenu, this), this.on("menu:create:playlist", this.createMenu, this), this.on("menu:create:video-playlist", this.createMenu, this), this.on("toolbar:create:main-insert", this.createToolbar, this), this.on("toolbar:create:main-gallery", this.createToolbar, this), this.on("toolbar:create:main-playlist", this.createToolbar, this), this.on("toolbar:create:main-video-playlist", this.createToolbar, this), this.on("toolbar:create:featured-image", this.featuredImageToolbar, this), this.on("toolbar:create:main-embed", this.mainEmbedToolbar, this), a = { | |
| menu: { | |
| "default": "mainMenu", | |
| gallery: "galleryMenu", | |
| @@ -1359,9 +1356,8 @@ | |
| }, | |
| click: function() { | |
| var a = this.controller, | |
| - b = a.state(), | |
| - c = a.state("gallery-edit"); | |
| - c.get("library").add(b.get("selection").models), b.trigger("reset"), a.setState("gallery-edit") | |
| + b = a.state(); | |
| + a.state("gallery-edit").get("library").add(b.get("selection").models), b.trigger("reset"), a.setState("gallery-edit") | |
| } | |
| } | |
| } | |
| @@ -1401,9 +1397,8 @@ | |
| }, | |
| click: function() { | |
| var a = this.controller, | |
| - b = a.state(), | |
| - c = a.state("playlist-edit"); | |
| - c.get("library").add(b.get("selection").models), b.trigger("reset"), a.setState("playlist-edit") | |
| + b = a.state(); | |
| + a.state("playlist-edit").get("library").add(b.get("selection").models), b.trigger("reset"), a.setState("playlist-edit") | |
| } | |
| } | |
| } | |
| @@ -1444,9 +1439,8 @@ | |
| }, | |
| click: function() { | |
| var a = this.controller, | |
| - b = a.state(), | |
| - c = a.state("video-playlist-edit"); | |
| - c.get("library").add(b.get("selection").models), b.trigger("reset"), a.setState("video-playlist-edit") | |
| + b = a.state(); | |
| + a.state("video-playlist-edit").get("library").add(b.get("selection").models), b.trigger("reset"), a.setState("video-playlist-edit") | |
| } | |
| } | |
| } | |
| @@ -1699,7 +1693,7 @@ | |
| return a = "draggable" in b || "ondragstart" in b && "ondrop" in b, a = a && !!(window.File && window.FileList && window.FileReader) | |
| }, | |
| isDraggingFile: function(a) { | |
| - return null !== this.draggingFile ? this.draggingFile : !_.isUndefined(a.originalEvent) && !_.isUndefined(a.originalEvent.dataTransfer) && (this.draggingFile = _.indexOf(a.originalEvent.dataTransfer.types, "Files") > -1 && _.indexOf(a.originalEvent.dataTransfer.types, "text/plain") === -1, this.draggingFile) | |
| + return null !== this.draggingFile ? this.draggingFile : !_.isUndefined(a.originalEvent) && !_.isUndefined(a.originalEvent.dataTransfer) && (this.draggingFile = _.indexOf(a.originalEvent.dataTransfer.types, "Files") > -1 && -1 === _.indexOf(a.originalEvent.dataTransfer.types, "text/plain"), this.draggingFile) | |
| }, | |
| refresh: function(a) { | |
| var b; | |
| @@ -1898,7 +1892,7 @@ | |
| var d = a.options.requires, | |
| e = !1; | |
| c && c.models && (e = _.some(c.models, function(a) { | |
| - return a.get("uploading") === !0 | |
| + return !0 === a.get("uploading") | |
| })), d.selection && c && !c.length ? e = !0 : d.library && b && !b.length && (e = !0), a.model.set("disabled", e) | |
| } | |
| }) | |
| @@ -2151,11 +2145,10 @@ | |
| }, | |
| buttons: {}, | |
| initialize: function() { | |
| - var a = this.options.selection, | |
| - b = _.defaults(this.options, { | |
| - rerenderOnModelChange: !0 | |
| - }); | |
| - b.rerenderOnModelChange ? this.listenTo(this.model, "change", this.render) : this.listenTo(this.model, "change:percent", this.progress), this.listenTo(this.model, "change:title", this._syncTitle), this.listenTo(this.model, "change:caption", this._syncCaption), this.listenTo(this.model, "change:artist", this._syncArtist), this.listenTo(this.model, "change:album", this._syncAlbum), this.listenTo(this.model, "add", this.select), this.listenTo(this.model, "remove", this.deselect), a && (a.on("reset", this.updateSelect, this), this.listenTo(this.model, "selection:single selection:unsingle", this.details), this.details(this.model, this.controller.state().get("selection"))), this.listenTo(this.controller, "attachment:compat:waiting attachment:compat:ready", this.updateSave) | |
| + var a = this.options.selection; | |
| + _.defaults(this.options, { | |
| + rerenderOnModelChange: !0 | |
| + }).rerenderOnModelChange ? this.listenTo(this.model, "change", this.render) : this.listenTo(this.model, "change:percent", this.progress), this.listenTo(this.model, "change:title", this._syncTitle), this.listenTo(this.model, "change:caption", this._syncCaption), this.listenTo(this.model, "change:artist", this._syncArtist), this.listenTo(this.model, "change:album", this._syncAlbum), this.listenTo(this.model, "add", this.select), this.listenTo(this.model, "remove", this.deselect), a && (a.on("reset", this.updateSelect, this), this.listenTo(this.model, "selection:single selection:unsingle", this.details), this.details(this.model, this.controller.state().get("selection"))), this.listenTo(this.controller, "attachment:compat:waiting attachment:compat:ready", this.updateSave) | |
| }, | |
| dispose: function() { | |
| var a = this.options.selection; | |
| @@ -2204,9 +2197,10 @@ | |
| h = this.model, | |
| i = a && a.method; | |
| if (g) { | |
| - if (b = g.single(), i = _.isUndefined(i) ? g.multiple : i, "between" === i && b && g.multiple) { | |
| + if (b = g.single(), "between" === (i = _.isUndefined(i) ? g.multiple : i) && b && g.multiple) { | |
| if (b === h) return; | |
| - return d = f.indexOf(b), e = f.indexOf(this.model), c = d < e ? f.models.slice(d, e + 1) : f.models.slice(e, d + 1), g.add(c), void g.single(h) | |
| + return d = f.indexOf(b), | |
| + e = f.indexOf(this.model), c = d < e ? f.models.slice(d, e + 1) : f.models.slice(e, d + 1), g.add(c), void g.single(h) | |
| } | |
| if ("toggle" === i) return g[this.selected() ? "remove" : "add"](h), void g.single(h); | |
| if ("add" === i) return g.add(h), void g.single(h); | |
| @@ -2348,7 +2342,7 @@ | |
| c = this.columns, | |
| d = b.filter(":focus").index(), | |
| e = d + 1 <= c ? 1 : Math.ceil((d + 1) / c); | |
| - if (d !== -1) { | |
| + if (-1 !== d) { | |
| if (37 === a.keyCode) { | |
| if (0 === d) return; | |
| b.eq(d - 1).focus() | |
| @@ -2480,10 +2474,9 @@ | |
| b = "all", | |
| c = a.toJSON(); | |
| _.find(this.filters, function(a, d) { | |
| - var e = _.all(a.props, function(a, b) { | |
| - return a === (_.isUndefined(c[b]) ? null : c[b]) | |
| - }); | |
| - if (e) return b = d | |
| + if (_.all(a.props, function(a, b) { | |
| + return a === (_.isUndefined(c[b]) ? null : c[b]) | |
| + })) return b = d | |
| }), this.$el.val(b) | |
| } | |
| }), a.exports = c | |
| @@ -2713,9 +2706,10 @@ | |
| c = this.controller.state().get("selection"), | |
| d = this.controller.state().get("library"); | |
| c.length && (e || window.confirm(f.warnBulkDelete)) && (e && "trash" !== c.at(0).get("status") && !window.confirm(f.warnBulkTrash) || (c.each(function(c) { | |
| - return c.get("nonces")["delete"] ? void(e && "trash" === c.get("status") ? (c.set("status", "inherit"), a.push(c.save()), b.push(c)) : e ? (c.set("status", "trash"), a.push(c.save()), b.push(c)) : c.destroy({ | |
| + if (!c.get("nonces")["delete"]) return void b.push(c); | |
| + e && "trash" === c.get("status") ? (c.set("status", "inherit"), a.push(c.save()), b.push(c)) : e ? (c.set("status", "trash"), a.push(c.save()), b.push(c)) : c.destroy({ | |
| wait: !0 | |
| - })) : void b.push(c) | |
| + }) | |
| }), a.length ? (c.remove(b), g.when.apply(null, a).then(_.bind(function() { | |
| d._requery(!0), this.controller.trigger("selection:action:done") | |
| }, this))) : this.controller.trigger("selection:action:done"))) | |
| @@ -2732,7 +2726,8 @@ | |
| b = [], | |
| c = this.controller.state().get("selection"); | |
| c.length && window.confirm(f.warnBulkDelete) && (c.each(function(c) { | |
| - return c.get("nonces")["delete"] ? void b.push(c) : void a.push(c) | |
| + if (!c.get("nonces")["delete"]) return void a.push(c); | |
| + b.push(c) | |
| }), a.length && c.remove(a), b.length && g.when.apply(null, b.map(function(a) { | |
| return a.destroy() | |
| })).then(_.bind(function() { | |
| @@ -2960,7 +2955,8 @@ | |
| var a = this.model.get("link"), | |
| b = this.$(".link-to-custom"), | |
| c = this.options.attachment; | |
| - return "none" === a || "embed" === a || !c && "custom" !== a ? void b.addClass("hidden") : (c && ("post" === a ? b.val(c.get("link")) : "file" === a ? b.val(c.get("url")) : this.model.get("linkUrl") || b.val("http://"), b.prop("readonly", "custom" !== a)), b.removeClass("hidden"), void(!wp.media.isTouchDevice && b.is(":visible") && b.focus()[0].select())) | |
| + if ("none" === a || "embed" === a || !c && "custom" !== a) return void b.addClass("hidden"); | |
| + c && ("post" === a ? b.val(c.get("link")) : "file" === a ? b.val(c.get("url")) : this.model.get("linkUrl") || b.val("http://"), b.prop("readonly", "custom" !== a)), b.removeClass("hidden"), !wp.media.isTouchDevice && b.is(":visible") && b.focus()[0].select() | |
| } | |
| }), a.exports = c | |
| }, function(a, b) { | |
| @@ -3131,8 +3127,7 @@ | |
| }, this), 500) | |
| }, | |
| render: function() { | |
| - var a = this.$input; | |
| - if (!a.is(":focus")) return this.input.value = this.model.get("url") || "http://", d.prototype.render.apply(this, arguments), this | |
| + if (!this.$input.is(":focus")) return this.input.value = this.model.get("url") || "http://", d.prototype.render.apply(this, arguments), this | |
| }, | |
| ready: function() { | |
| wp.media.isTouchDevice || this.focus() | |
| @@ -3248,19 +3243,20 @@ | |
| onCustomSize: function(a) { | |
| var b, c = e(a.target).data("setting"), | |
| d = e(a.target).val(); | |
| - return !/^\d+/.test(d) || parseInt(d, 10) < 1 ? void a.preventDefault() : void("customWidth" === c ? (b = Math.round(1 / this.model.get("aspectRatio") * d), this.model.set("customHeight", b, { | |
| - silent: !0 | |
| - }), this.$('[data-setting="customHeight"]').val(b)) : (b = Math.round(this.model.get("aspectRatio") * d), | |
| - this.model.set("customWidth", b, { | |
| + if (!/^\d+/.test(d) || parseInt(d, 10) < 1) return void a.preventDefault(); | |
| + "customWidth" === c ? (b = Math.round(1 / this.model.get("aspectRatio") * d), this.model.set("customHeight", b, { | |
| silent: !0 | |
| - }), this.$('[data-setting="customWidth"]').val(b))) | |
| + }), | |
| + this.$('[data-setting="customHeight"]').val(b)) : (b = Math.round(this.model.get("aspectRatio") * d), this.model.set("customWidth", b, { | |
| + silent: !0 | |
| + }), this.$('[data-setting="customWidth"]').val(b)) | |
| }, | |
| onToggleAdvanced: function(a) { | |
| a.preventDefault(), this.toggleAdvanced() | |
| }, | |
| toggleAdvanced: function(a) { | |
| var b, c = this.$el.find(".advanced-section"); | |
| - c.hasClass("advanced-visible") || a === !1 ? (c.removeClass("advanced-visible"), c.find(".advanced-settings").addClass("hidden"), b = "hide") : (c.addClass("advanced-visible"), c.find(".advanced-settings").removeClass("hidden"), b = "show"), window.setUserSetting("advImgDetails", b) | |
| + c.hasClass("advanced-visible") || !1 === a ? (c.removeClass("advanced-visible"), c.find(".advanced-settings").addClass("hidden"), b = "hide") : (c.addClass("advanced-visible"), c.find(".advanced-settings").removeClass("hidden"), b = "show"), window.setUserSetting("advImgDetails", b) | |
| }, | |
| editAttachment: function(a) { | |
| var b = this.controller.states.get("edit-image"); | |
| @@ -3305,7 +3301,7 @@ | |
| }) | |
| }), this.parent.children().on("mouseup touchend", function() { | |
| a.setOptions({ | |
| - aspectRatio: !!b && b | |
| + aspectRatio: b || !1 | |
| }) | |
| }) | |
| } | |
| @@ -3384,8 +3380,7 @@ | |
| return this.model.toJSON() | |
| }, | |
| loadEditor: function() { | |
| - var a = this.editor.open(this.model.get("id"), this.model.get("nonces").edit, this); | |
| - a.done(_.bind(this.focus, this)) | |
| + this.editor.open(this.model.get("id"), this.model.get("nonces").edit, this).done(_.bind(this.focus, this)) | |
| }, | |
| focus: function() { | |
| this.$(".imgedit-submit .button").eq(0).focus() | |
| diff -ur build-unminified/wp-includes/js/plupload/handlers.min.js build-branch-unminified/wp-includes/js/plupload/handlers.min.js | |
| --- build-unminified/wp-includes/js/plupload/handlers.min.js 2018-10-06 21:45:20.238532056 -0500 | |
| +++ build-branch-unminified/wp-includes/js/plupload/handlers.min.js 2018-10-06 21:42:20.893194927 -0500 | |
| @@ -18,9 +18,7 @@ | |
| } | |
| function fileUploading(a, b) { | |
| - var c = 104857600, | |
| - d = parseInt(a.settings.max_file_size, 10); | |
| - d > c && b.size > c && setTimeout(function() { | |
| + parseInt(a.settings.max_file_size, 10) > 104857600 && b.size > 104857600 && setTimeout(function() { | |
| b.status < 3 && 0 === b.loaded && (wpFileError(b, pluploadL10n.big_upload_failed.replace("%1$s", '<a class="uploader-html" href="#">').replace("%2$s", "</a>")), a.stop(), a.removeFile(b), a.start()) | |
| }, 1e4) | |
| } | |
| @@ -32,7 +30,8 @@ | |
| function uploadSuccess(a, b) { | |
| var c = jQuery("#media-item-" + a.id); | |
| - return b = b.replace(/^<pre>(\d+)<\/pre>$/, "$1"), b.match(/media-upload-error|error-div/) ? void c.html(b) : (jQuery(".percent", c).html(pluploadL10n.crunching), prepareMediaItem(a, b), updateMediaForm(), void(post_id && c.hasClass("child-of-" + post_id) && jQuery("#attachments-count").text(1 * jQuery("#attachments-count").text() + 1))) | |
| + if (b = b.replace(/^<pre>(\d+)<\/pre>$/, "$1"), b.match(/media-upload-error|error-div/)) return void c.html(b); | |
| + jQuery(".percent", c).html(pluploadL10n.crunching), prepareMediaItem(a, b), updateMediaForm(), post_id && c.hasClass("child-of-" + post_id) && jQuery("#attachments-count").text(1 * jQuery("#attachments-count").text() + 1) | |
| } | |
| function setResize(a) { | |
| @@ -114,9 +113,8 @@ | |
| function itemAjaxError(a, b) { | |
| var c = jQuery("#media-item-" + a), | |
| - d = c.find(".filename").text(), | |
| - e = c.data("last-err"); | |
| - e != a && c.html('<div class="error-div"><a class="dismiss" href="#">' + pluploadL10n.dismiss + "</a><strong>" + pluploadL10n.error_uploading.replace("%s", jQuery.trim(d)) + "</strong> " + b + "</div>").data("last-err", a) | |
| + d = c.find(".filename").text(); | |
| + c.data("last-err") != a && c.html('<div class="error-div"><a class="dismiss" href="#">' + pluploadL10n.dismiss + "</a><strong>" + pluploadL10n.error_uploading.replace("%s", jQuery.trim(d)) + "</strong> " + b + "</div>").data("last-err", a) | |
| } | |
| function deleteSuccess(a) { | |
| @@ -142,7 +140,7 @@ | |
| } | |
| function uploadError(a, b, c, d) { | |
| - var e, f = 104857600; | |
| + var e; | |
| switch (b) { | |
| case plupload.FAILED: | |
| wpFileError(a, pluploadL10n.upload_failed); | |
| @@ -166,7 +164,7 @@ | |
| wpQueueError(pluploadL10n.upload_failed); | |
| break; | |
| case plupload.IO_ERROR: | |
| - e = parseInt(d.settings.filters.max_file_size, 10), e > f && a.size > f ? wpFileError(a, pluploadL10n.big_upload_failed.replace("%1$s", '<a class="uploader-html" href="#">').replace("%2$s", "</a>")) : wpQueueError(pluploadL10n.io_error); | |
| + e = parseInt(d.settings.filters.max_file_size, 10), e > 104857600 && a.size > 104857600 ? wpFileError(a, pluploadL10n.big_upload_failed.replace("%1$s", '<a class="uploader-html" href="#">').replace("%2$s", "</a>")) : wpQueueError(pluploadL10n.io_error); | |
| break; | |
| case plupload.HTTP_ERROR: | |
| wpQueueError(pluploadL10n.http_error); | |
| @@ -198,7 +196,7 @@ | |
| jQuery(document).ready(function(a) { | |
| a(".media-upload-form").bind("click.uploader", function(b) { | |
| var c, d, e = a(b.target); | |
| - e.is('input[type="radio"]') ? (c = e.closest("tr"), c.hasClass("align") ? setUserSetting("align", e.val()) : c.hasClass("image-size") && setUserSetting("imgsize", e.val())) : e.is("button.button") ? (d = b.target.className || "", d = d.match(/url([^ '"]+)/), d && d[1] && (setUserSetting("urlbutton", d[1]), e.siblings(".urlfield").val(e.data("link-url")))) : e.is("a.dismiss") ? e.parents(".media-item").fadeOut(200, function() { | |
| + e.is('input[type="radio"]') ? (c = e.closest("tr"), c.hasClass("align") ? setUserSetting("align", e.val()) : c.hasClass("image-size") && setUserSetting("imgsize", e.val())) : e.is("button.button") ? (d = b.target.className || "", (d = d.match(/url([^ '"]+)/)) && d[1] && (setUserSetting("urlbutton", d[1]), e.siblings(".urlfield").val(e.data("link-url")))) : e.is("a.dismiss") ? e.parents(".media-item").fadeOut(200, function() { | |
| a(this).remove() | |
| }) : e.is(".upload-flash-bypass a") || e.is("a.uploader-html") ? (a("#media-items, p.submit, span.big-file-warning").css("display", "none"), switchUploader(0), b.preventDefault()) : e.is(".upload-html-bypass a") ? (a("#media-items, p.submit, span.big-file-warning").css("display", ""), switchUploader(1), b.preventDefault()) : e.is("a.describe-toggle-on") ? (e.parent().addClass("open"), e.siblings(".slidetoggle").fadeIn(250, function() { | |
| var b, c, d = a(window).scrollTop(), | |
| @@ -210,8 +208,7 @@ | |
| e.parent().removeClass("open") | |
| }), b.preventDefault()) | |
| }), uploader_init = function() { | |
| - var b = navigator.userAgent.indexOf("Trident/") != -1 || navigator.userAgent.indexOf("MSIE ") != -1; | |
| - b || "flash" !== plupload.predictRuntime(wpUploaderInit) || wpUploaderInit.required_features && wpUploaderInit.required_features.hasOwnProperty("send_binary_string") || (wpUploaderInit.required_features = wpUploaderInit.required_features || {}, wpUploaderInit.required_features.send_binary_string = !0), uploader = new plupload.Uploader(wpUploaderInit), a("#image_resize").bind("change", function() { | |
| + -1 != navigator.userAgent.indexOf("Trident/") || -1 != navigator.userAgent.indexOf("MSIE ") || "flash" !== plupload.predictRuntime(wpUploaderInit) || wpUploaderInit.required_features && wpUploaderInit.required_features.hasOwnProperty("send_binary_string") || (wpUploaderInit.required_features = wpUploaderInit.required_features || {}, wpUploaderInit.required_features.send_binary_string = !0), uploader = new plupload.Uploader(wpUploaderInit), a("#image_resize").bind("change", function() { | |
| var b = a(this).prop("checked"); | |
| setResize(b), b ? setUserSetting("upload_resize", "1") : deleteUserSetting("upload_resize") | |
| }), uploader.bind("Init", function(b) { | |
| diff -ur build-unminified/wp-includes/js/plupload/moxie.min.js build-branch-unminified/wp-includes/js/plupload/moxie.min.js | |
| --- build-unminified/wp-includes/js/plupload/moxie.min.js 2018-10-06 21:45:20.118531161 -0500 | |
| +++ build-branch-unminified/wp-includes/js/plupload/moxie.min.js 2018-10-06 21:42:20.769194002 -0500 | |
| @@ -3,8 +3,8 @@ | |
| "use strict"; | |
| function c(a, b) { | |
| - for (var c, d = [], f = 0; f < a.length; ++f) { | |
| - if (c = g[a[f]] || e(a[f]), !c) throw "module definition dependecy not found: " + a[f]; | |
| + for (var c, d = [], g = 0; g < a.length; ++g) { | |
| + if (!(c = f[a[g]] || e(a[g]))) throw "module definition dependecy not found: " + a[g]; | |
| d.push(c) | |
| } | |
| b.apply(null, d) | |
| @@ -15,7 +15,7 @@ | |
| if (d === b) throw "invalid module definition, dependencies must be specified"; | |
| if (e === b) throw "invalid module definition, definition function must be specified"; | |
| c(d, function() { | |
| - g[a] = e.apply(null, arguments) | |
| + f[a] = e.apply(null, arguments) | |
| }) | |
| } | |
| @@ -26,407 +26,391 @@ | |
| } | |
| return c | |
| } | |
| - | |
| - function f(c) { | |
| - for (var d = 0; d < c.length; d++) { | |
| - for (var e = a, f = c[d], h = f.split(/[.\/]/), i = 0; i < h.length - 1; ++i) e[h[i]] === b && (e[h[i]] = {}), e = e[h[i]]; | |
| - e[h[h.length - 1]] = g[f] | |
| - } | |
| - } | |
| - var g = {}; | |
| + var f = {}; | |
| d("moxie/core/utils/Basic", [], function() { | |
| - var a = function(a) { | |
| - var b; | |
| - return a === b ? "undefined" : null === a ? "null" : a.nodeType ? "node" : {}.toString.call(a).match(/\s([a-z|A-Z]+)/)[1].toLowerCase() | |
| - }, | |
| - b = function(d) { | |
| - var e; | |
| - return c(arguments, function(f, h) { | |
| - h > 0 && c(f, function(c, f) { | |
| - c !== e && (a(d[f]) === a(c) && ~g(a(c), ["array", "object"]) ? b(d[f], c) : d[f] = c) | |
| - }) | |
| - }), d | |
| - }, | |
| - c = function(b, c) { | |
| - var d, e, f; | |
| - if (b) | |
| - if ("number" === a(b.length)) { | |
| - for (f = 0, d = b.length; f < d; f++) | |
| - if (c(b[f], f) === !1) return | |
| - } else if ("object" === a(b)) | |
| - for (e in b) | |
| - if (b.hasOwnProperty(e) && c(b[e], e) === !1) return | |
| - }, | |
| - d = function(b) { | |
| - var c; | |
| - if (!b || "object" !== a(b)) return !0; | |
| - for (c in b) return !1; | |
| - return !0 | |
| - }, | |
| - e = function(b, c) { | |
| - function d(e) { | |
| - "function" === a(b[e]) && b[e](function(a) { | |
| - ++e < f && !a ? d(e) : c(a) | |
| - }) | |
| - } | |
| - var e = 0, | |
| - f = b.length; | |
| - "function" !== a(c) && (c = function() {}), b && b.length || c(), d(e) | |
| - }, | |
| - f = function(a, b) { | |
| - var d = 0, | |
| - e = a.length, | |
| - f = new Array(e); | |
| - c(a, function(a, c) { | |
| - a(function(a) { | |
| - if (a) return b(a); | |
| - var g = [].slice.call(arguments); | |
| - g.shift(), f[c] = g, d++, d === e && (f.unshift(null), b.apply(this, f)) | |
| - }) | |
| - }) | |
| - }, | |
| - g = function(a, b) { | |
| - if (b) { | |
| - if (Array.prototype.indexOf) return Array.prototype.indexOf.call(b, a); | |
| - for (var c = 0, d = b.length; c < d; c++) | |
| - if (b[c] === a) return c | |
| - } | |
| - return -1 | |
| - }, | |
| - h = function(b, c) { | |
| - var d = []; | |
| - "array" !== a(b) && (b = [b]), "array" !== a(c) && (c = [c]); | |
| - for (var e in b) g(b[e], c) === -1 && d.push(b[e]); | |
| - return !!d.length && d | |
| - }, | |
| - i = function(a, b) { | |
| - var d = []; | |
| - return c(a, function(a) { | |
| - g(a, b) !== -1 && d.push(a) | |
| - }), d.length ? d : null | |
| - }, | |
| - j = function(a) { | |
| - var b, c = []; | |
| - for (b = 0; b < a.length; b++) c[b] = a[b]; | |
| - return c | |
| - }, | |
| - k = function() { | |
| - var a = 0; | |
| - return function(b) { | |
| - var c, d = (new Date).getTime().toString(32); | |
| - for (c = 0; c < 5; c++) d += Math.floor(65535 * Math.random()).toString(32); | |
| - return (b || "o_") + d + (a++).toString(32) | |
| - } | |
| - }(), | |
| - l = function(a) { | |
| - return a ? String.prototype.trim ? String.prototype.trim.call(a) : a.toString().replace(/^\s*/, "").replace(/\s*$/, "") : a | |
| - }, | |
| - m = function(a) { | |
| - if ("string" != typeof a) return a; | |
| - var b, c = { | |
| - t: 1099511627776, | |
| - g: 1073741824, | |
| - m: 1048576, | |
| - k: 1024 | |
| - }; | |
| - return a = /^([0-9\.]+)([tmgk]?)$/.exec(a.toLowerCase().replace(/[^0-9\.tmkg]/g, "")), b = a[2], a = +a[1], c.hasOwnProperty(b) && (a *= c[b]), Math.floor(a) | |
| - }, | |
| - n = function(b) { | |
| - var c = [].slice.call(arguments, 1); | |
| - return b.replace(/%[a-z]/g, function() { | |
| - var b = c.shift(); | |
| - return "undefined" !== a(b) ? b : "" | |
| - }) | |
| - }; | |
| - return { | |
| - guid: k, | |
| - typeOf: a, | |
| - extend: b, | |
| - each: c, | |
| - isEmptyObj: d, | |
| - inSeries: e, | |
| - inParallel: f, | |
| - inArray: g, | |
| - arrayDiff: h, | |
| - arrayIntersect: i, | |
| - toArray: j, | |
| - trim: l, | |
| - sprintf: n, | |
| - parseSizeStr: m | |
| - } | |
| - }), d("moxie/core/utils/Env", ["moxie/core/utils/Basic"], function(a) { | |
| - function b(a, b, c) { | |
| - var d = 0, | |
| - e = 0, | |
| - f = 0, | |
| - g = { | |
| - dev: -6, | |
| - alpha: -5, | |
| - a: -5, | |
| - beta: -4, | |
| - b: -4, | |
| - RC: -3, | |
| - rc: -3, | |
| - "#": -2, | |
| - p: 1, | |
| - pl: 1 | |
| + var a = function(a) { | |
| + return void 0 === a ? "undefined" : null === a ? "null" : a.nodeType ? "node" : {}.toString.call(a).match(/\s([a-z|A-Z]+)/)[1].toLowerCase() | |
| + }, | |
| + b = function(d) { | |
| + return c(arguments, function(e, f) { | |
| + f > 0 && c(e, function(c, e) { | |
| + void 0 !== c && (a(d[e]) === a(c) && ~g(a(c), ["array", "object"]) ? b(d[e], c) : d[e] = c) | |
| + }) | |
| + }), d | |
| + }, | |
| + c = function(b, c) { | |
| + var d, e, f; | |
| + if (b) | |
| + if ("number" === a(b.length)) { | |
| + for (f = 0, d = b.length; f < d; f++) | |
| + if (!1 === c(b[f], f)) return | |
| + } else if ("object" === a(b)) | |
| + for (e in b) | |
| + if (b.hasOwnProperty(e) && !1 === c(b[e], e)) return | |
| + }, | |
| + d = function(b) { | |
| + var c; | |
| + if (!b || "object" !== a(b)) return !0; | |
| + for (c in b) return !1; | |
| + return !0 | |
| + }, | |
| + e = function(b, c) { | |
| + function d(f) { | |
| + "function" === a(b[f]) && b[f](function(a) { | |
| + ++f < e && !a ? d(f) : c(a) | |
| + }) | |
| + } | |
| + var e = b.length; | |
| + "function" !== a(c) && (c = function() {}), b && b.length || c(), d(0) | |
| }, | |
| - h = function(a) { | |
| - return a = ("" + a).replace(/[_\-+]/g, "."), a = a.replace(/([^.\d]+)/g, ".$1.").replace(/\.{2,}/g, "."), a.length ? a.split(".") : [-8] | |
| + f = function(a, b) { | |
| + var d = 0, | |
| + e = a.length, | |
| + f = new Array(e); | |
| + c(a, function(a, c) { | |
| + a(function(a) { | |
| + if (a) return b(a); | |
| + var g = [].slice.call(arguments); | |
| + g.shift(), f[c] = g, ++d === e && (f.unshift(null), b.apply(this, f)) | |
| + }) | |
| + }) | |
| }, | |
| - i = function(a) { | |
| - return a ? isNaN(a) ? g[a] || -7 : parseInt(a, 10) : 0 | |
| + g = function(a, b) { | |
| + if (b) { | |
| + if (Array.prototype.indexOf) return Array.prototype.indexOf.call(b, a); | |
| + for (var c = 0, d = b.length; c < d; c++) | |
| + if (b[c] === a) return c | |
| + } | |
| + return -1 | |
| + }, | |
| + h = function(b, c) { | |
| + var d = []; | |
| + "array" !== a(b) && (b = [b]), "array" !== a(c) && (c = [c]); | |
| + for (var e in b) - 1 === g(b[e], c) && d.push(b[e]); | |
| + return !!d.length && d | |
| + }, | |
| + i = function(a, b) { | |
| + var d = []; | |
| + return c(a, function(a) { | |
| + -1 !== g(a, b) && d.push(a) | |
| + }), d.length ? d : null | |
| + }, | |
| + j = function(a) { | |
| + var b, c = []; | |
| + for (b = 0; b < a.length; b++) c[b] = a[b]; | |
| + return c | |
| + }, | |
| + k = function() { | |
| + var a = 0; | |
| + return function(b) { | |
| + var c, d = (new Date).getTime().toString(32); | |
| + for (c = 0; c < 5; c++) d += Math.floor(65535 * Math.random()).toString(32); | |
| + return (b || "o_") + d + (a++).toString(32) | |
| + } | |
| + }(), | |
| + l = function(a) { | |
| + return a ? String.prototype.trim ? String.prototype.trim.call(a) : a.toString().replace(/^\s*/, "").replace(/\s*$/, "") : a | |
| + }, | |
| + m = function(a) { | |
| + if ("string" != typeof a) return a; | |
| + var b, c = { | |
| + t: 1099511627776, | |
| + g: 1073741824, | |
| + m: 1048576, | |
| + k: 1024 | |
| + }; | |
| + return a = /^([0-9\.]+)([tmgk]?)$/.exec(a.toLowerCase().replace(/[^0-9\.tmkg]/g, "")), b = a[2], a = +a[1], c.hasOwnProperty(b) && (a *= c[b]), Math.floor(a) | |
| }; | |
| - for (a = h(a), b = h(b), e = Math.max(a.length, b.length), d = 0; d < e; d++) | |
| - if (a[d] != b[d]) { | |
| - if (a[d] = i(a[d]), b[d] = i(b[d]), a[d] < b[d]) { | |
| - f = -1; | |
| - break | |
| - } | |
| - if (a[d] > b[d]) { | |
| - f = 1; | |
| - break | |
| - } | |
| - } if (!c) return f; | |
| - switch (c) { | |
| - case ">": | |
| - case "gt": | |
| - return f > 0; | |
| - case ">=": | |
| - case "ge": | |
| - return f >= 0; | |
| - case "<=": | |
| - case "le": | |
| - return f <= 0; | |
| - case "==": | |
| - case "=": | |
| - case "eq": | |
| - return 0 === f; | |
| - case "<>": | |
| - case "!=": | |
| - case "ne": | |
| - return 0 !== f; | |
| - case "": | |
| - case "<": | |
| - case "lt": | |
| - return f < 0; | |
| - default: | |
| - return null | |
| + return { | |
| + guid: k, | |
| + typeOf: a, | |
| + extend: b, | |
| + each: c, | |
| + isEmptyObj: d, | |
| + inSeries: e, | |
| + inParallel: f, | |
| + inArray: g, | |
| + arrayDiff: h, | |
| + arrayIntersect: i, | |
| + toArray: j, | |
| + trim: l, | |
| + sprintf: function(b) { | |
| + var c = [].slice.call(arguments, 1); | |
| + return b.replace(/%[a-z]/g, function() { | |
| + var b = c.shift(); | |
| + return "undefined" !== a(b) ? b : "" | |
| + }) | |
| + }, | |
| + parseSizeStr: m | |
| } | |
| - } | |
| - var c = function(a) { | |
| - var b = "", | |
| - c = "?", | |
| - d = "function", | |
| - e = "undefined", | |
| - f = "object", | |
| - g = "name", | |
| - h = "version", | |
| - i = { | |
| - has: function(a, b) { | |
| - return b.toLowerCase().indexOf(a.toLowerCase()) !== -1 | |
| - }, | |
| - lowerize: function(a) { | |
| - return a.toLowerCase() | |
| - } | |
| - }, | |
| - j = { | |
| - rgx: function() { | |
| - for (var b, c, g, h, i, j, k, l = 0, m = arguments; l < m.length; l += 2) { | |
| - var n = m[l], | |
| - o = m[l + 1]; | |
| - if (typeof b === e) { | |
| - b = {}; | |
| - for (h in o) i = o[h], typeof i === f ? b[i[0]] = a : b[i] = a | |
| - } | |
| - for (c = g = 0; c < n.length; c++) | |
| - if (j = n[c].exec(this.getUA())) { | |
| - for (h = 0; h < o.length; h++) k = j[++g], i = o[h], typeof i === f && i.length > 0 ? 2 == i.length ? typeof i[1] == d ? b[i[0]] = i[1].call(this, k) : b[i[0]] = i[1] : 3 == i.length ? typeof i[1] !== d || i[1].exec && i[1].test ? b[i[0]] = k ? k.replace(i[1], i[2]) : a : b[i[0]] = k ? i[1].call(this, k, i[2]) : a : 4 == i.length && (b[i[0]] = k ? i[3].call(this, k.replace(i[1], i[2])) : a) : b[i] = k ? k : a; | |
| - break | |
| - } if (j) break | |
| - } | |
| - return b | |
| - }, | |
| - str: function(b, d) { | |
| - for (var e in d) | |
| - if (typeof d[e] === f && d[e].length > 0) { | |
| - for (var g = 0; g < d[e].length; g++) | |
| - if (i.has(d[e][g], b)) return e === c ? a : e | |
| - } else if (i.has(d[e], b)) return e === c ? a : e; | |
| - return b | |
| - } | |
| + }), d("moxie/core/utils/Env", ["moxie/core/utils/Basic"], function(a) { | |
| + function b(a, b, c) { | |
| + var d = 0, | |
| + e = 0, | |
| + f = 0, | |
| + g = { | |
| + dev: -6, | |
| + alpha: -5, | |
| + a: -5, | |
| + beta: -4, | |
| + b: -4, | |
| + RC: -3, | |
| + rc: -3, | |
| + "#": -2, | |
| + p: 1, | |
| + pl: 1 | |
| }, | |
| - k = { | |
| - browser: { | |
| - oldsafari: { | |
| - major: { | |
| - 1: ["/8", "/1", "/3"], | |
| - 2: "/4", | |
| - "?": "/" | |
| - }, | |
| - version: { | |
| - "1.0": "/8", | |
| - 1.2: "/1", | |
| - 1.3: "/3", | |
| - "2.0": "/412", | |
| - "2.0.2": "/416", | |
| - "2.0.3": "/417", | |
| - "2.0.4": "/419", | |
| - "?": "/" | |
| - } | |
| + h = function(a) { | |
| + return a = ("" + a).replace(/[_\-+]/g, "."), a = a.replace(/([^.\d]+)/g, ".$1.").replace(/\.{2,}/g, "."), a.length ? a.split(".") : [-8] | |
| + }, | |
| + i = function(a) { | |
| + return a ? isNaN(a) ? g[a] || -7 : parseInt(a, 10) : 0 | |
| + }; | |
| + for (a = h(a), b = h(b), e = Math.max(a.length, b.length), d = 0; d < e; d++) | |
| + if (a[d] != b[d]) { | |
| + if (a[d] = i(a[d]), b[d] = i(b[d]), a[d] < b[d]) { | |
| + f = -1; | |
| + break | |
| + } | |
| + if (a[d] > b[d]) { | |
| + f = 1; | |
| + break | |
| + } | |
| + } if (!c) return f; | |
| + switch (c) { | |
| + case ">": | |
| + case "gt": | |
| + return f > 0; | |
| + case ">=": | |
| + case "ge": | |
| + return f >= 0; | |
| + case "<=": | |
| + case "le": | |
| + return f <= 0; | |
| + case "==": | |
| + case "=": | |
| + case "eq": | |
| + return 0 === f; | |
| + case "<>": | |
| + case "!=": | |
| + case "ne": | |
| + return 0 !== f; | |
| + case "": | |
| + case "<": | |
| + case "lt": | |
| + return f < 0; | |
| + default: | |
| + return null | |
| + } | |
| + } | |
| + var c = function(a) { | |
| + var b = "name", | |
| + c = "version", | |
| + d = { | |
| + has: function(a, b) { | |
| + return -1 !== b.toLowerCase().indexOf(a.toLowerCase()) | |
| + }, | |
| + lowerize: function(a) { | |
| + return a.toLowerCase() | |
| } | |
| }, | |
| - device: { | |
| - sprint: { | |
| - model: { | |
| - "Evo Shift 4G": "7373KT" | |
| - }, | |
| - vendor: { | |
| - HTC: "APA", | |
| - Sprint: "Sprint" | |
| + e = { | |
| + rgx: function() { | |
| + for (var a, b, c, d, e, f, g, h = 0, i = arguments; h < i.length; h += 2) { | |
| + var j = i[h], | |
| + k = i[h + 1]; | |
| + if (void 0 === a) { | |
| + a = {}; | |
| + for (d in k) e = k[d], "object" == typeof e ? a[e[0]] = void 0 : a[e] = void 0 | |
| + } | |
| + for (b = c = 0; b < j.length; b++) | |
| + if (f = j[b].exec(this.getUA())) { | |
| + for (d = 0; d < k.length; d++) g = f[++c], e = k[d], "object" == typeof e && e.length > 0 ? 2 == e.length ? "function" == typeof e[1] ? a[e[0]] = e[1].call(this, g) : a[e[0]] = e[1] : 3 == e.length ? "function" != typeof e[1] || e[1].exec && e[1].test ? a[e[0]] = g ? g.replace(e[1], e[2]) : void 0 : a[e[0]] = g ? e[1].call(this, g, e[2]) : void 0 : 4 == e.length && (a[e[0]] = g ? e[3].call(this, g.replace(e[1], e[2])) : void 0) : a[e] = g || void 0; | |
| + break | |
| + } if (f) break | |
| } | |
| + return a | |
| + }, | |
| + str: function(a, b) { | |
| + for (var c in b) | |
| + if ("object" == typeof b[c] && b[c].length > 0) { | |
| + for (var e = 0; e < b[c].length; e++) | |
| + if (d.has(b[c][e], a)) return "?" === c ? void 0 : c | |
| + } else if (d.has(b[c], a)) return "?" === c ? void 0 : c; | |
| + return a | |
| } | |
| }, | |
| - os: { | |
| - windows: { | |
| - version: { | |
| - ME: "4.90", | |
| - "NT 3.11": "NT3.51", | |
| - "NT 4.0": "NT4.0", | |
| - 2000: "NT 5.0", | |
| - XP: ["NT 5.1", "NT 5.2"], | |
| - Vista: "NT 6.0", | |
| - 7: "NT 6.1", | |
| - 8: "NT 6.2", | |
| - 8.1: "NT 6.3", | |
| - RT: "ARM" | |
| + f = { | |
| + browser: { | |
| + oldsafari: { | |
| + major: { | |
| + 1: ["/8", "/1", "/3"], | |
| + 2: "/4", | |
| + "?": "/" | |
| + }, | |
| + version: { | |
| + "1.0": "/8", | |
| + 1.2: "/1", | |
| + 1.3: "/3", | |
| + "2.0": "/412", | |
| + "2.0.2": "/416", | |
| + "2.0.3": "/417", | |
| + "2.0.4": "/419", | |
| + "?": "/" | |
| + } | |
| + } | |
| + }, | |
| + device: { | |
| + sprint: { | |
| + model: { | |
| + "Evo Shift 4G": "7373KT" | |
| + }, | |
| + vendor: { | |
| + HTC: "APA", | |
| + Sprint: "Sprint" | |
| + } | |
| + } | |
| + }, | |
| + os: { | |
| + windows: { | |
| + version: { | |
| + ME: "4.90", | |
| + "NT 3.11": "NT3.51", | |
| + "NT 4.0": "NT4.0", | |
| + 2000: "NT 5.0", | |
| + XP: ["NT 5.1", "NT 5.2"], | |
| + Vista: "NT 6.0", | |
| + 7: "NT 6.1", | |
| + 8: "NT 6.2", | |
| + 8.1: "NT 6.3", | |
| + RT: "ARM" | |
| + } | |
| } | |
| } | |
| - } | |
| - }, | |
| - l = { | |
| - browser: [ | |
| - [/(opera\smini)\/([\w\.-]+)/i, /(opera\s[mobiletab]+).+version\/([\w\.-]+)/i, /(opera).+version\/([\w\.]+)/i, /(opera)[\/\s]+([\w\.]+)/i], | |
| - [g, h], | |
| - [/\s(opr)\/([\w\.]+)/i], | |
| - [ | |
| - [g, "Opera"], h | |
| - ], | |
| - [/(kindle)\/([\w\.]+)/i, /(lunascape|maxthon|netfront|jasmine|blazer)[\/\s]?([\w\.]+)*/i, /(avant\s|iemobile|slim|baidu)(?:browser)?[\/\s]?([\w\.]*)/i, /(?:ms|\()(ie)\s([\w\.]+)/i, /(rekonq)\/([\w\.]+)*/i, /(chromium|flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi)\/([\w\.-]+)/i], | |
| - [g, h], | |
| - [/(trident).+rv[:\s]([\w\.]+).+like\sgecko/i], | |
| - [ | |
| - [g, "IE"], h | |
| - ], | |
| - [/(edge)\/((\d+)?[\w\.]+)/i], | |
| - [g, h], | |
| - [/(yabrowser)\/([\w\.]+)/i], | |
| - [ | |
| - [g, "Yandex"], h | |
| - ], | |
| - [/(comodo_dragon)\/([\w\.]+)/i], | |
| - [ | |
| - [g, /_/g, " "], h | |
| - ], | |
| - [/(chrome|omniweb|arora|[tizenoka]{5}\s?browser)\/v?([\w\.]+)/i, /(uc\s?browser|qqbrowser)[\/\s]?([\w\.]+)/i], | |
| - [g, h], | |
| - [/(dolfin)\/([\w\.]+)/i], | |
| - [ | |
| - [g, "Dolphin"], h | |
| - ], | |
| - [/((?:android.+)crmo|crios)\/([\w\.]+)/i], | |
| - [ | |
| - [g, "Chrome"], h | |
| - ], | |
| - [/XiaoMi\/MiuiBrowser\/([\w\.]+)/i], | |
| - [h, [g, "MIUI Browser"]], | |
| - [/android.+version\/([\w\.]+)\s+(?:mobile\s?safari|safari)/i], | |
| - [h, [g, "Android Browser"]], | |
| - [/FBAV\/([\w\.]+);/i], | |
| - [h, [g, "Facebook"]], | |
| - [/version\/([\w\.]+).+?mobile\/\w+\s(safari)/i], | |
| - [h, [g, "Mobile Safari"]], | |
| - [/version\/([\w\.]+).+?(mobile\s?safari|safari)/i], | |
| - [h, g], | |
| - [/webkit.+?(mobile\s?safari|safari)(\/[\w\.]+)/i], | |
| - [g, [h, j.str, k.browser.oldsafari.version]], | |
| - [/(konqueror)\/([\w\.]+)/i, /(webkit|khtml)\/([\w\.]+)/i], | |
| - [g, h], | |
| - [/(navigator|netscape)\/([\w\.-]+)/i], | |
| - [ | |
| - [g, "Netscape"], h | |
| - ], | |
| - [/(swiftfox)/i, /(icedragon|iceweasel|camino|chimera|fennec|maemo\sbrowser|minimo|conkeror)[\/\s]?([\w\.\+]+)/i, /(firefox|seamonkey|k-meleon|icecat|iceape|firebird|phoenix)\/([\w\.-]+)/i, /(mozilla)\/([\w\.]+).+rv\:.+gecko\/\d+/i, /(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf)[\/\s]?([\w\.]+)/i, /(links)\s\(([\w\.]+)/i, /(gobrowser)\/?([\w\.]+)*/i, /(ice\s?browser)\/v?([\w\._]+)/i, /(mosaic)[\/\s]([\w\.]+)/i], | |
| - [g, h] | |
| - ], | |
| - engine: [ | |
| - [/windows.+\sedge\/([\w\.]+)/i], | |
| - [h, [g, "EdgeHTML"]], | |
| - [/(presto)\/([\w\.]+)/i, /(webkit|trident|netfront|netsurf|amaya|lynx|w3m)\/([\w\.]+)/i, /(khtml|tasman|links)[\/\s]\(?([\w\.]+)/i, /(icab)[\/\s]([23]\.[\d\.]+)/i], | |
| - [g, h], | |
| - [/rv\:([\w\.]+).*(gecko)/i], | |
| - [h, g] | |
| - ], | |
| - os: [ | |
| - [/microsoft\s(windows)\s(vista|xp)/i], | |
| - [g, h], | |
| - [/(windows)\snt\s6\.2;\s(arm)/i, /(windows\sphone(?:\sos)*|windows\smobile|windows)[\s\/]?([ntce\d\.\s]+\w)/i], | |
| - [g, [h, j.str, k.os.windows.version]], | |
| - [/(win(?=3|9|n)|win\s9x\s)([nt\d\.]+)/i], | |
| - [ | |
| - [g, "Windows"], | |
| - [h, j.str, k.os.windows.version] | |
| - ], | |
| - [/\((bb)(10);/i], | |
| - [ | |
| - [g, "BlackBerry"], h | |
| - ], | |
| - [/(blackberry)\w*\/?([\w\.]+)*/i, /(tizen)[\/\s]([\w\.]+)/i, /(android|webos|palm\os|qnx|bada|rim\stablet\sos|meego|contiki)[\/\s-]?([\w\.]+)*/i, /linux;.+(sailfish);/i], | |
| - [g, h], | |
| - [/(symbian\s?os|symbos|s60(?=;))[\/\s-]?([\w\.]+)*/i], | |
| - [ | |
| - [g, "Symbian"], h | |
| - ], | |
| - [/\((series40);/i], | |
| - [g], | |
| - [/mozilla.+\(mobile;.+gecko.+firefox/i], | |
| - [ | |
| - [g, "Firefox OS"], h | |
| - ], | |
| - [/(nintendo|playstation)\s([wids3portablevu]+)/i, /(mint)[\/\s\(]?(\w+)*/i, /(mageia|vectorlinux)[;\s]/i, /(joli|[kxln]?ubuntu|debian|[open]*suse|gentoo|arch|slackware|fedora|mandriva|centos|pclinuxos|redhat|zenwalk|linpus)[\/\s-]?([\w\.-]+)*/i, /(hurd|linux)\s?([\w\.]+)*/i, /(gnu)\s?([\w\.]+)*/i], | |
| - [g, h], | |
| - [/(cros)\s[\w]+\s([\w\.]+\w)/i], | |
| - [ | |
| - [g, "Chromium OS"], h | |
| - ], | |
| - [/(sunos)\s?([\w\.]+\d)*/i], | |
| - [ | |
| - [g, "Solaris"], h | |
| - ], | |
| - [/\s([frentopc-]{0,4}bsd|dragonfly)\s?([\w\.]+)*/i], | |
| - [g, h], | |
| - [/(ip[honead]+)(?:.*os\s*([\w]+)*\slike\smac|;\sopera)/i], | |
| - [ | |
| - [g, "iOS"], | |
| - [h, /_/g, "."] | |
| + }, | |
| + g = { | |
| + browser: [ | |
| + [/(opera\smini)\/([\w\.-]+)/i, /(opera\s[mobiletab]+).+version\/([\w\.-]+)/i, /(opera).+version\/([\w\.]+)/i, /(opera)[\/\s]+([\w\.]+)/i], | |
| + [b, c], | |
| + [/\s(opr)\/([\w\.]+)/i], | |
| + [ | |
| + [b, "Opera"], c | |
| + ], | |
| + [/(kindle)\/([\w\.]+)/i, /(lunascape|maxthon|netfront|jasmine|blazer)[\/\s]?([\w\.]+)*/i, /(avant\s|iemobile|slim|baidu)(?:browser)?[\/\s]?([\w\.]*)/i, /(?:ms|\()(ie)\s([\w\.]+)/i, /(rekonq)\/([\w\.]+)*/i, /(chromium|flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi)\/([\w\.-]+)/i], | |
| + [b, c], | |
| + [/(trident).+rv[:\s]([\w\.]+).+like\sgecko/i], | |
| + [ | |
| + [b, "IE"], c | |
| + ], | |
| + [/(edge)\/((\d+)?[\w\.]+)/i], | |
| + [b, c], | |
| + [/(yabrowser)\/([\w\.]+)/i], | |
| + [ | |
| + [b, "Yandex"], c | |
| + ], | |
| + [/(comodo_dragon)\/([\w\.]+)/i], | |
| + [ | |
| + [b, /_/g, " "], c | |
| + ], | |
| + [/(chrome|omniweb|arora|[tizenoka]{5}\s?browser)\/v?([\w\.]+)/i, /(uc\s?browser|qqbrowser)[\/\s]?([\w\.]+)/i], | |
| + [b, c], | |
| + [/(dolfin)\/([\w\.]+)/i], | |
| + [ | |
| + [b, "Dolphin"], c | |
| + ], | |
| + [/((?:android.+)crmo|crios)\/([\w\.]+)/i], | |
| + [ | |
| + [b, "Chrome"], c | |
| + ], | |
| + [/XiaoMi\/MiuiBrowser\/([\w\.]+)/i], | |
| + [c, [b, "MIUI Browser"]], | |
| + [/android.+version\/([\w\.]+)\s+(?:mobile\s?safari|safari)/i], | |
| + [c, [b, "Android Browser"]], | |
| + [/FBAV\/([\w\.]+);/i], | |
| + [c, [b, "Facebook"]], | |
| + [/version\/([\w\.]+).+?mobile\/\w+\s(safari)/i], | |
| + [c, [b, "Mobile Safari"]], | |
| + [/version\/([\w\.]+).+?(mobile\s?safari|safari)/i], | |
| + [c, b], | |
| + [/webkit.+?(mobile\s?safari|safari)(\/[\w\.]+)/i], | |
| + [b, [c, e.str, f.browser.oldsafari.version]], | |
| + [/(konqueror)\/([\w\.]+)/i, /(webkit|khtml)\/([\w\.]+)/i], | |
| + [b, c], | |
| + [/(navigator|netscape)\/([\w\.-]+)/i], | |
| + [ | |
| + [b, "Netscape"], c | |
| + ], | |
| + [/(swiftfox)/i, /(icedragon|iceweasel|camino|chimera|fennec|maemo\sbrowser|minimo|conkeror)[\/\s]?([\w\.\+]+)/i, /(firefox|seamonkey|k-meleon|icecat|iceape|firebird|phoenix)\/([\w\.-]+)/i, /(mozilla)\/([\w\.]+).+rv\:.+gecko\/\d+/i, /(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf)[\/\s]?([\w\.]+)/i, /(links)\s\(([\w\.]+)/i, /(gobrowser)\/?([\w\.]+)*/i, /(ice\s?browser)\/v?([\w\._]+)/i, /(mosaic)[\/\s]([\w\.]+)/i], | |
| + [b, c] | |
| ], | |
| - [/(mac\sos\sx)\s?([\w\s\.]+\w)*/i, /(macintosh|mac(?=_powerpc)\s)/i], | |
| - [ | |
| - [g, "Mac OS"], | |
| - [h, /_/g, "."] | |
| + engine: [ | |
| + [/windows.+\sedge\/([\w\.]+)/i], | |
| + [c, [b, "EdgeHTML"]], | |
| + [/(presto)\/([\w\.]+)/i, /(webkit|trident|netfront|netsurf|amaya|lynx|w3m)\/([\w\.]+)/i, /(khtml|tasman|links)[\/\s]\(?([\w\.]+)/i, /(icab)[\/\s]([23]\.[\d\.]+)/i], | |
| + [b, c], | |
| + [/rv\:([\w\.]+).*(gecko)/i], | |
| + [c, b] | |
| ], | |
| - [/((?:open)?solaris)[\/\s-]?([\w\.]+)*/i, /(haiku)\s(\w+)/i, /(aix)\s((\d)(?=\.|\)|\s)[\w\.]*)*/i, /(plan\s9|minix|beos|os\/2|amigaos|morphos|risc\sos|openvms)/i, /(unix)\s?([\w\.]+)*/i], | |
| - [g, h] | |
| - ] | |
| - }, | |
| - m = function(a) { | |
| - var c = a || (window && window.navigator && window.navigator.userAgent ? window.navigator.userAgent : b); | |
| + os: [ | |
| + [/microsoft\s(windows)\s(vista|xp)/i], | |
| + [b, c], | |
| + [/(windows)\snt\s6\.2;\s(arm)/i, /(windows\sphone(?:\sos)*|windows\smobile|windows)[\s\/]?([ntce\d\.\s]+\w)/i], | |
| + [b, [c, e.str, f.os.windows.version]], | |
| + [/(win(?=3|9|n)|win\s9x\s)([nt\d\.]+)/i], | |
| + [ | |
| + [b, "Windows"], | |
| + [c, e.str, f.os.windows.version] | |
| + ], | |
| + [/\((bb)(10);/i], | |
| + [ | |
| + [b, "BlackBerry"], c | |
| + ], | |
| + [/(blackberry)\w*\/?([\w\.]+)*/i, /(tizen)[\/\s]([\w\.]+)/i, /(android|webos|palm\os|qnx|bada|rim\stablet\sos|meego|contiki)[\/\s-]?([\w\.]+)*/i, /linux;.+(sailfish);/i], | |
| + [b, c], | |
| + [/(symbian\s?os|symbos|s60(?=;))[\/\s-]?([\w\.]+)*/i], | |
| + [ | |
| + [b, "Symbian"], c | |
| + ], | |
| + [/\((series40);/i], | |
| + [b], | |
| + [/mozilla.+\(mobile;.+gecko.+firefox/i], | |
| + [ | |
| + [b, "Firefox OS"], c | |
| + ], | |
| + [/(nintendo|playstation)\s([wids3portablevu]+)/i, /(mint)[\/\s\(]?(\w+)*/i, /(mageia|vectorlinux)[;\s]/i, /(joli|[kxln]?ubuntu|debian|[open]*suse|gentoo|arch|slackware|fedora|mandriva|centos|pclinuxos|redhat|zenwalk|linpus)[\/\s-]?([\w\.-]+)*/i, /(hurd|linux)\s?([\w\.]+)*/i, /(gnu)\s?([\w\.]+)*/i], | |
| + [b, c], | |
| + [/(cros)\s[\w]+\s([\w\.]+\w)/i], | |
| + [ | |
| + [b, "Chromium OS"], c | |
| + ], | |
| + [/(sunos)\s?([\w\.]+\d)*/i], | |
| + [ | |
| + [b, "Solaris"], c | |
| + ], | |
| + [/\s([frentopc-]{0,4}bsd|dragonfly)\s?([\w\.]+)*/i], | |
| + [b, c], | |
| + [/(ip[honead]+)(?:.*os\s*([\w]+)*\slike\smac|;\sopera)/i], | |
| + [ | |
| + [b, "iOS"], | |
| + [c, /_/g, "."] | |
| + ], | |
| + [/(mac\sos\sx)\s?([\w\s\.]+\w)*/i, /(macintosh|mac(?=_powerpc)\s)/i], | |
| + [ | |
| + [b, "Mac OS"], | |
| + [c, /_/g, "."] | |
| + ], | |
| + [/((?:open)?solaris)[\/\s-]?([\w\.]+)*/i, /(haiku)\s(\w+)/i, /(aix)\s((\d)(?=\.|\)|\s)[\w\.]*)*/i, /(plan\s9|minix|beos|os\/2|amigaos|morphos|risc\sos|openvms)/i, /(unix)\s?([\w\.]+)*/i], | |
| + [b, c] | |
| + ] | |
| + }; | |
| + return function(a) { | |
| + var b = a || (window && window.navigator && window.navigator.userAgent ? window.navigator.userAgent : ""); | |
| this.getBrowser = function() { | |
| - return j.rgx.apply(this, l.browser) | |
| + return e.rgx.apply(this, g.browser) | |
| }, this.getEngine = function() { | |
| - return j.rgx.apply(this, l.engine) | |
| + return e.rgx.apply(this, g.engine) | |
| }, this.getOS = function() { | |
| - return j.rgx.apply(this, l.os) | |
| + return e.rgx.apply(this, g.os) | |
| }, this.getResult = function() { | |
| return { | |
| ua: this.getUA(), | |
| @@ -435,105 +419,100 @@ | |
| os: this.getOS() | |
| } | |
| }, this.getUA = function() { | |
| - return c | |
| + return b | |
| }, this.setUA = function(a) { | |
| - return c = a, this | |
| - }, this.setUA(c) | |
| - }; | |
| - return m | |
| - }(), | |
| - d = function() { | |
| - var b = { | |
| - define_property: function() { | |
| - return !1 | |
| - }(), | |
| - create_canvas: function() { | |
| - var a = document.createElement("canvas"); | |
| - return !(!a.getContext || !a.getContext("2d")) | |
| - }(), | |
| - return_response_type: function(b) { | |
| - try { | |
| - if (a.inArray(b, ["", "text", "document"]) !== -1) return !0; | |
| - if (window.XMLHttpRequest) { | |
| - var c = new XMLHttpRequest; | |
| - if (c.open("get", "/"), "responseType" in c) return c.responseType = b, c.responseType === b | |
| - } | |
| - } catch (d) {} | |
| - return !1 | |
| - }, | |
| - use_data_uri: function() { | |
| - var a = new Image; | |
| - return a.onload = function() { | |
| - b.use_data_uri = 1 === a.width && 1 === a.height | |
| - }, setTimeout(function() { | |
| - a.src = "data:image/gif;base64,R0lGODlhAQABAIAAAP8AAAAAACH5BAAAAAAALAAAAAABAAEAAAICRAEAOw==" | |
| - }, 1), !1 | |
| - }(), | |
| - use_data_uri_over32kb: function() { | |
| - return b.use_data_uri && ("IE" !== f.browser || f.version >= 9) | |
| - }, | |
| - use_data_uri_of: function(a) { | |
| - return b.use_data_uri && a < 33e3 || b.use_data_uri_over32kb() | |
| - }, | |
| - use_fileinput: function() { | |
| - if (navigator.userAgent.match(/(Android (1.0|1.1|1.5|1.6|2.0|2.1))|(Windows Phone (OS 7|8.0))|(XBLWP)|(ZuneWP)|(w(eb)?OSBrowser)|(webOS)|(Kindle\/(1.0|2.0|2.5|3.0))/)) return !1; | |
| - var a = document.createElement("input"); | |
| - return a.setAttribute("type", "file"), !a.disabled | |
| + return b = a, this | |
| + }, this.setUA(b) | |
| } | |
| + }(), | |
| + d = function() { | |
| + var b = { | |
| + define_property: !1, | |
| + create_canvas: function() { | |
| + var a = document.createElement("canvas"); | |
| + return !(!a.getContext || !a.getContext("2d")) | |
| + }(), | |
| + return_response_type: function(b) { | |
| + try { | |
| + if (-1 !== a.inArray(b, ["", "text", "document"])) return !0; | |
| + if (window.XMLHttpRequest) { | |
| + var c = new XMLHttpRequest; | |
| + if (c.open("get", "/"), "responseType" in c) return c.responseType = b, c.responseType === b | |
| + } | |
| + } catch (d) {} | |
| + return !1 | |
| + }, | |
| + use_data_uri: function() { | |
| + var a = new Image; | |
| + return a.onload = function() { | |
| + b.use_data_uri = 1 === a.width && 1 === a.height | |
| + }, setTimeout(function() { | |
| + a.src = "data:image/gif;base64,R0lGODlhAQABAIAAAP8AAAAAACH5BAAAAAAALAAAAAABAAEAAAICRAEAOw==" | |
| + }, 1), !1 | |
| + }(), | |
| + use_data_uri_over32kb: function() { | |
| + return b.use_data_uri && ("IE" !== f.browser || f.version >= 9) | |
| + }, | |
| + use_data_uri_of: function(a) { | |
| + return b.use_data_uri && a < 33e3 || b.use_data_uri_over32kb() | |
| + }, | |
| + use_fileinput: function() { | |
| + if (navigator.userAgent.match(/(Android (1.0|1.1|1.5|1.6|2.0|2.1))|(Windows Phone (OS 7|8.0))|(XBLWP)|(ZuneWP)|(w(eb)?OSBrowser)|(webOS)|(Kindle\/(1.0|2.0|2.5|3.0))/)) return !1; | |
| + var a = document.createElement("input"); | |
| + return a.setAttribute("type", "file"), !a.disabled | |
| + } | |
| + }; | |
| + return function(c) { | |
| + var d = [].slice.call(arguments); | |
| + return d.shift(), "function" === a.typeOf(b[c]) ? b[c].apply(this, d) : !!b[c] | |
| + } | |
| + }(), | |
| + e = (new c).getResult(), | |
| + f = { | |
| + can: d, | |
| + uaParser: c, | |
| + browser: e.browser.name, | |
| + version: e.browser.version, | |
| + os: e.os.name, | |
| + osVersion: e.os.version, | |
| + verComp: b, | |
| + global_event_dispatcher: "moxie.core.EventTarget.instance.dispatchEvent" | |
| }; | |
| - return function(c) { | |
| - var d = [].slice.call(arguments); | |
| - return d.shift(), "function" === a.typeOf(b[c]) ? b[c].apply(this, d) : !!b[c] | |
| - } | |
| - }(), | |
| - e = (new c).getResult(), | |
| - f = { | |
| - can: d, | |
| - uaParser: c, | |
| - browser: e.browser.name, | |
| - version: e.browser.version, | |
| - os: e.os.name, | |
| - osVersion: e.os.version, | |
| - verComp: b, | |
| - global_event_dispatcher: "moxie.core.EventTarget.instance.dispatchEvent" | |
| - }; | |
| - return f.OS = f.os, MXI_DEBUG && (f.debug = { | |
| - runtime: !0, | |
| - events: !1 | |
| - }, f.log = function() { | |
| - function b(a) { | |
| - d.appendChild(document.createTextNode(a + "\n")) | |
| - } | |
| - var c = arguments[0]; | |
| - if ("string" === a.typeOf(c) && (c = a.sprintf.apply(this, arguments)), window && window.console && window.console.log) window.console.log(c); | |
| - else if (document) { | |
| - var d = document.getElementById("moxie-console"); | |
| - d || (d = document.createElement("pre"), d.id = "moxie-console", document.body.appendChild(d)), a.inArray(a.typeOf(c), ["object", "array"]) !== -1 ? b(c) : d.appendChild(document.createTextNode(c + "\n")) | |
| - } | |
| - }), f | |
| - }), d("moxie/core/I18n", ["moxie/core/utils/Basic"], function(a) { | |
| - var b = {}; | |
| - return { | |
| - addI18n: function(c) { | |
| - return a.extend(b, c) | |
| - }, | |
| - translate: function(a) { | |
| - return b[a] || a | |
| - }, | |
| - _: function(a) { | |
| - return this.translate(a) | |
| - }, | |
| - sprintf: function(b) { | |
| - var c = [].slice.call(arguments, 1); | |
| - return b.replace(/%[a-z]/g, function() { | |
| - var b = c.shift(); | |
| - return "undefined" !== a.typeOf(b) ? b : "" | |
| - }) | |
| + return f.OS = f.os, MXI_DEBUG && (f.debug = { | |
| + runtime: !0, | |
| + events: !1 | |
| + }, f.log = function() { | |
| + var b = arguments[0]; | |
| + if ("string" === a.typeOf(b) && (b = a.sprintf.apply(this, arguments)), window && window.console && window.console.log) window.console.log(b); | |
| + else if (document) { | |
| + var c = document.getElementById("moxie-console"); | |
| + c || (c = document.createElement("pre"), c.id = "moxie-console", document.body.appendChild(c)), -1 !== a.inArray(a.typeOf(b), ["object", "array"]) ? function(a) { | |
| + c.appendChild(document.createTextNode(a + "\n")) | |
| + }(b) : c.appendChild(document.createTextNode(b + "\n")) | |
| + } | |
| + }), f | |
| + }), d("moxie/core/I18n", ["moxie/core/utils/Basic"], function(a) { | |
| + var b = {}; | |
| + return { | |
| + addI18n: function(c) { | |
| + return a.extend(b, c) | |
| + }, | |
| + translate: function(a) { | |
| + return b[a] || a | |
| + }, | |
| + _: function(a) { | |
| + return this.translate(a) | |
| + }, | |
| + sprintf: function(b) { | |
| + var c = [].slice.call(arguments, 1); | |
| + return b.replace(/%[a-z]/g, function() { | |
| + var b = c.shift(); | |
| + return "undefined" !== a.typeOf(b) ? b : "" | |
| + }) | |
| + } | |
| } | |
| - } | |
| - }), d("moxie/core/utils/Mime", ["moxie/core/utils/Basic", "moxie/core/I18n"], function(a, b) { | |
| - var c = "application/msword,doc dot,application/pdf,pdf,application/pgp-signature,pgp,application/postscript,ps ai eps,application/rtf,rtf,application/vnd.ms-excel,xls xlb,application/vnd.ms-powerpoint,ppt pps pot,application/zip,zip,application/x-shockwave-flash,swf swfl,application/vnd.openxmlformats-officedocument.wordprocessingml.document,docx,application/vnd.openxmlformats-officedocument.wordprocessingml.template,dotx,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,xlsx,application/vnd.openxmlformats-officedocument.presentationml.presentation,pptx,application/vnd.openxmlformats-officedocument.presentationml.template,potx,application/vnd.openxmlformats-officedocument.presentationml.slideshow,ppsx,application/x-javascript,js,application/json,json,audio/mpeg,mp3 mpga mpega mp2,audio/x-wav,wav,audio/x-m4a,m4a,audio/ogg,oga ogg,audio/aiff,aiff aif,audio/flac,flac,audio/aac,aac,audio/ac3,ac3,audio/x-ms-wma,wma,image/bmp,bmp,image/gif,gif,image/jpeg,jpg jpeg jpe,image/photoshop,psd,image/png,png,image/svg+xml,svg svgz,image/tiff,tiff tif,text/plain,asc txt text diff log,text/html,htm html xhtml,text/css,css,text/csv,csv,text/rtf,rtf,video/mpeg,mpeg mpg mpe m2v,video/quicktime,qt mov,video/mp4,mp4,video/x-m4v,m4v,video/x-flv,flv,video/x-ms-wmv,wmv,video/avi,avi,video/webm,webm,video/3gpp,3gpp 3gp,video/3gpp2,3g2,video/vnd.rn-realvideo,rv,video/ogg,ogv,video/x-matroska,mkv,application/vnd.oasis.opendocument.formula-template,otf,application/octet-stream,exe", | |
| - d = { | |
| + }), d("moxie/core/utils/Mime", ["moxie/core/utils/Basic", "moxie/core/I18n"], function(a, b) { | |
| + var c = { | |
| mimes: {}, | |
| extensions: {}, | |
| addMimeType: function(a) { | |
| @@ -549,7 +528,7 @@ | |
| for (e = 0; e < b.length; e++) | |
| for (d = b[e].extensions.split(/\s*,\s*/), f = 0; f < d.length; f++) { | |
| if ("*" === d[f]) return []; | |
| - if (g = h.mimes[d[f]], g && a.inArray(g, i) === -1 && i.push(g), c && /^\w+$/.test(d[f])) i.push("." + d[f]); | |
| + if (g = h.mimes[d[f]], g && -1 === a.inArray(g, i) && i.push(g), c && /^\w+$/.test(d[f])) i.push("." + d[f]); | |
| else if (!g) return [] | |
| } | |
| return i | |
| @@ -581,669 +560,665 @@ | |
| return this.mimes[this.getFileExtension(a)] || "" | |
| } | |
| }; | |
| - return d.addMimeType(c), d | |
| - }), d("moxie/core/utils/Dom", ["moxie/core/utils/Env"], function(a) { | |
| - var b = function(a) { | |
| - return "string" != typeof a ? a : document.getElementById(a) | |
| - }, | |
| - c = function(a, b) { | |
| - if (!a.className) return !1; | |
| - var c = new RegExp("(^|\\s+)" + b + "(\\s+|$)"); | |
| - return c.test(a.className) | |
| - }, | |
| - d = function(a, b) { | |
| - c(a, b) || (a.className = a.className ? a.className.replace(/\s+$/, "") + " " + b : b) | |
| - }, | |
| - e = function(a, b) { | |
| - if (a.className) { | |
| - var c = new RegExp("(^|\\s+)" + b + "(\\s+|$)"); | |
| - a.className = a.className.replace(c, function(a, b, c) { | |
| - return " " === b && " " === c ? " " : "" | |
| - }) | |
| - } | |
| - }, | |
| - f = function(a, b) { | |
| - return a.currentStyle ? a.currentStyle[b] : window.getComputedStyle ? window.getComputedStyle(a, null)[b] : void 0 | |
| - }, | |
| - g = function(b, c) { | |
| - function d(a) { | |
| - var b, c, d = 0, | |
| - e = 0; | |
| - return a && (c = a.getBoundingClientRect(), b = "CSS1Compat" === j.compatMode ? j.documentElement : j.body, d = c.left + b.scrollLeft, e = c.top + b.scrollTop), { | |
| - x: d, | |
| - y: e | |
| - } | |
| - } | |
| - var e, f, g, h = 0, | |
| - i = 0, | |
| - j = document; | |
| - if (b = b, c = c || j.body, b && b.getBoundingClientRect && "IE" === a.browser && (!j.documentMode || j.documentMode < 8)) return f = d(b), g = d(c), { | |
| - x: f.x - g.x, | |
| - y: f.y - g.y | |
| - }; | |
| - for (e = b; e && e != c && e.nodeType;) h += e.offsetLeft || 0, i += e.offsetTop || 0, e = e.offsetParent; | |
| - for (e = b.parentNode; e && e != c && e.nodeType;) h -= e.scrollLeft || 0, i -= e.scrollTop || 0, e = e.parentNode; | |
| - return { | |
| - x: h, | |
| - y: i | |
| - } | |
| - }, | |
| - h = function(a) { | |
| - return { | |
| - w: a.offsetWidth || a.clientWidth, | |
| - h: a.offsetHeight || a.clientHeight | |
| - } | |
| - }; | |
| - return { | |
| - get: b, | |
| - hasClass: c, | |
| - addClass: d, | |
| - removeClass: e, | |
| - getStyle: f, | |
| - getPos: g, | |
| - getSize: h | |
| - } | |
| - }), d("moxie/core/Exceptions", ["moxie/core/utils/Basic"], function(a) { | |
| - function b(a, b) { | |
| - var c; | |
| - for (c in a) | |
| - if (a[c] === b) return c; | |
| - return null | |
| - } | |
| - return { | |
| - RuntimeError: function() { | |
| - function c(a) { | |
| - this.code = a, this.name = b(d, a), this.message = this.name + ": RuntimeError " + this.code | |
| - } | |
| - var d = { | |
| - NOT_INIT_ERR: 1, | |
| - NOT_SUPPORTED_ERR: 9, | |
| - JS_ERR: 4 | |
| - }; | |
| - return a.extend(c, d), c.prototype = Error.prototype, c | |
| - }(), | |
| - OperationNotAllowedException: function() { | |
| - function b(a) { | |
| - this.code = a, this.name = "OperationNotAllowedException" | |
| - } | |
| - return a.extend(b, { | |
| - NOT_ALLOWED_ERR: 1 | |
| - }), b.prototype = Error.prototype, b | |
| - }(), | |
| - ImageError: function() { | |
| - function c(a) { | |
| - this.code = a, this.name = b(d, a), this.message = this.name + ": ImageError " + this.code | |
| - } | |
| - var d = { | |
| - WRONG_FORMAT: 1, | |
| - MAX_RESOLUTION_ERR: 2, | |
| - INVALID_META_ERR: 3 | |
| - }; | |
| - return a.extend(c, d), c.prototype = Error.prototype, c | |
| - }(), | |
| - FileException: function() { | |
| - function c(a) { | |
| - this.code = a, this.name = b(d, a), this.message = this.name + ": FileException " + this.code | |
| - } | |
| - var d = { | |
| - NOT_FOUND_ERR: 1, | |
| - SECURITY_ERR: 2, | |
| - ABORT_ERR: 3, | |
| - NOT_READABLE_ERR: 4, | |
| - ENCODING_ERR: 5, | |
| - NO_MODIFICATION_ALLOWED_ERR: 6, | |
| - INVALID_STATE_ERR: 7, | |
| - SYNTAX_ERR: 8 | |
| - }; | |
| - return a.extend(c, d), c.prototype = Error.prototype, c | |
| - }(), | |
| - DOMException: function() { | |
| - function c(a) { | |
| - this.code = a, this.name = b(d, a), this.message = this.name + ": DOMException " + this.code | |
| - } | |
| - var d = { | |
| - INDEX_SIZE_ERR: 1, | |
| - DOMSTRING_SIZE_ERR: 2, | |
| - HIERARCHY_REQUEST_ERR: 3, | |
| - WRONG_DOCUMENT_ERR: 4, | |
| - INVALID_CHARACTER_ERR: 5, | |
| - NO_DATA_ALLOWED_ERR: 6, | |
| - NO_MODIFICATION_ALLOWED_ERR: 7, | |
| - NOT_FOUND_ERR: 8, | |
| - NOT_SUPPORTED_ERR: 9, | |
| - INUSE_ATTRIBUTE_ERR: 10, | |
| - INVALID_STATE_ERR: 11, | |
| - SYNTAX_ERR: 12, | |
| - INVALID_MODIFICATION_ERR: 13, | |
| - NAMESPACE_ERR: 14, | |
| - INVALID_ACCESS_ERR: 15, | |
| - VALIDATION_ERR: 16, | |
| - TYPE_MISMATCH_ERR: 17, | |
| - SECURITY_ERR: 18, | |
| - NETWORK_ERR: 19, | |
| - ABORT_ERR: 20, | |
| - URL_MISMATCH_ERR: 21, | |
| - QUOTA_EXCEEDED_ERR: 22, | |
| - TIMEOUT_ERR: 23, | |
| - INVALID_NODE_TYPE_ERR: 24, | |
| - DATA_CLONE_ERR: 25 | |
| - }; | |
| - return a.extend(c, d), c.prototype = Error.prototype, c | |
| - }(), | |
| - EventException: function() { | |
| - function b(a) { | |
| - this.code = a, this.name = "EventException" | |
| - } | |
| - return a.extend(b, { | |
| - UNSPECIFIED_EVENT_TYPE_ERR: 0 | |
| - }), b.prototype = Error.prototype, b | |
| - }() | |
| - } | |
| - }), d("moxie/core/EventTarget", ["moxie/core/utils/Env", "moxie/core/Exceptions", "moxie/core/utils/Basic"], function(a, b, c) { | |
| - function d() { | |
| - var d = {}; | |
| - c.extend(this, { | |
| - uid: null, | |
| - init: function() { | |
| - this.uid || (this.uid = c.guid("uid_")) | |
| - }, | |
| - addEventListener: function(a, b, e, f) { | |
| - var g, h = this; | |
| - return this.hasOwnProperty("uid") || (this.uid = c.guid("uid_")), a = c.trim(a), /\s/.test(a) ? void c.each(a.split(/\s+/), function(a) { | |
| - h.addEventListener(a, b, e, f) | |
| - }) : (a = a.toLowerCase(), e = parseInt(e, 10) || 0, g = d[this.uid] && d[this.uid][a] || [], g.push({ | |
| - fn: b, | |
| - priority: e, | |
| - scope: f || this | |
| - }), d[this.uid] || (d[this.uid] = {}), void(d[this.uid][a] = g)) | |
| - }, | |
| - hasEventListener: function(a) { | |
| - var b = a ? d[this.uid] && d[this.uid][a] : d[this.uid]; | |
| - return !!b && b | |
| - }, | |
| - removeEventListener: function(a, b) { | |
| - a = a.toLowerCase(); | |
| - var e, f = d[this.uid] && d[this.uid][a]; | |
| - if (f) { | |
| - if (b) { | |
| - for (e = f.length - 1; e >= 0; e--) | |
| - if (f[e].fn === b) { | |
| - f.splice(e, 1); | |
| - break | |
| - } | |
| - } else f = []; | |
| - f.length || (delete d[this.uid][a], c.isEmptyObj(d[this.uid]) && delete d[this.uid]) | |
| - } | |
| - }, | |
| - removeAllEventListeners: function() { | |
| - d[this.uid] && delete d[this.uid] | |
| + return c.addMimeType("application/msword,doc dot,application/pdf,pdf,application/pgp-signature,pgp,application/postscript,ps ai eps,application/rtf,rtf,application/vnd.ms-excel,xls xlb,application/vnd.ms-powerpoint,ppt pps pot,application/zip,zip,application/x-shockwave-flash,swf swfl,application/vnd.openxmlformats-officedocument.wordprocessingml.document,docx,application/vnd.openxmlformats-officedocument.wordprocessingml.template,dotx,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,xlsx,application/vnd.openxmlformats-officedocument.presentationml.presentation,pptx,application/vnd.openxmlformats-officedocument.presentationml.template,potx,application/vnd.openxmlformats-officedocument.presentationml.slideshow,ppsx,application/x-javascript,js,application/json,json,audio/mpeg,mp3 mpga mpega mp2,audio/x-wav,wav,audio/x-m4a,m4a,audio/ogg,oga ogg,audio/aiff,aiff aif,audio/flac,flac,audio/aac,aac,audio/ac3,ac3,audio/x-ms-wma,wma,image/bmp,bmp,image/gif,gif,image/jpeg,jpg jpeg jpe,image/photoshop,psd,image/png,png,image/svg+xml,svg svgz,image/tiff,tiff tif,text/plain,asc txt text diff log,text/html,htm html xhtml,text/css,css,text/csv,csv,text/rtf,rtf,video/mpeg,mpeg mpg mpe m2v,video/quicktime,qt mov,video/mp4,mp4,video/x-m4v,m4v,video/x-flv,flv,video/x-ms-wmv,wmv,video/avi,avi,video/webm,webm,video/3gpp,3gpp 3gp,video/3gpp2,3g2,video/vnd.rn-realvideo,rv,video/ogg,ogv,video/x-matroska,mkv,application/vnd.oasis.opendocument.formula-template,otf,application/octet-stream,exe"), c | |
| + }), d("moxie/core/utils/Dom", ["moxie/core/utils/Env"], function(a) { | |
| + var b = function(a) { | |
| + return "string" != typeof a ? a : document.getElementById(a) | |
| }, | |
| - dispatchEvent: function(e) { | |
| - var f, g, h, i, j, k = {}, | |
| - l = !0; | |
| - if ("string" !== c.typeOf(e)) { | |
| - if (i = e, "string" !== c.typeOf(i.type)) throw new b.EventException(b.EventException.UNSPECIFIED_EVENT_TYPE_ERR); | |
| - e = i.type, i.total !== j && i.loaded !== j && (k.total = i.total, k.loaded = i.loaded), k.async = i.async || !1 | |
| - } | |
| - if (e.indexOf("::") !== -1 ? ! function(a) { | |
| - f = a[0], e = a[1] | |
| - }(e.split("::")) : f = this.uid, e = e.toLowerCase(), g = d[f] && d[f][e]) { | |
| - g.sort(function(a, b) { | |
| - return b.priority - a.priority | |
| - }), h = [].slice.call(arguments), h.shift(), k.type = e, h.unshift(k), MXI_DEBUG && a.debug.events && a.log("Event '%s' fired on %u", k.type, f); | |
| - var m = []; | |
| - c.each(g, function(a) { | |
| - h[0].target = a.scope, k.async ? m.push(function(b) { | |
| - setTimeout(function() { | |
| - b(a.fn.apply(a.scope, h) === !1) | |
| - }, 1) | |
| - }) : m.push(function(b) { | |
| - b(a.fn.apply(a.scope, h) === !1) | |
| - }) | |
| - }), m.length && c.inSeries(m, function(a) { | |
| - l = !a | |
| + c = function(a, b) { | |
| + return !!a.className && new RegExp("(^|\\s+)" + b + "(\\s+|$)").test(a.className) | |
| + }; | |
| + return { | |
| + get: b, | |
| + hasClass: c, | |
| + addClass: function(a, b) { | |
| + c(a, b) || (a.className = a.className ? a.className.replace(/\s+$/, "") + " " + b : b) | |
| + }, | |
| + removeClass: function(a, b) { | |
| + if (a.className) { | |
| + var c = new RegExp("(^|\\s+)" + b + "(\\s+|$)"); | |
| + a.className = a.className.replace(c, function(a, b, c) { | |
| + return " " === b && " " === c ? " " : "" | |
| }) | |
| } | |
| - return l | |
| }, | |
| - bind: function() { | |
| - this.addEventListener.apply(this, arguments) | |
| + getStyle: function(a, b) { | |
| + return a.currentStyle ? a.currentStyle[b] : window.getComputedStyle ? window.getComputedStyle(a, null)[b] : void 0 | |
| }, | |
| - unbind: function() { | |
| - this.removeEventListener.apply(this, arguments) | |
| - }, | |
| - unbindAll: function() { | |
| - this.removeAllEventListeners.apply(this, arguments) | |
| - }, | |
| - trigger: function() { | |
| - return this.dispatchEvent.apply(this, arguments) | |
| + getPos: function(b, c) { | |
| + function d(a) { | |
| + var b, c, d = 0, | |
| + e = 0; | |
| + return a && (c = a.getBoundingClientRect(), b = "CSS1Compat" === j.compatMode ? j.documentElement : j.body, d = c.left + b.scrollLeft, e = c.top + b.scrollTop), { | |
| + x: d, | |
| + y: e | |
| + } | |
| + } | |
| + var e, f, g, h = 0, | |
| + i = 0, | |
| + j = document; | |
| + if (b = b, c = c || j.body, b && b.getBoundingClientRect && "IE" === a.browser && (!j.documentMode || j.documentMode < 8)) return f = d(b), g = d(c), { | |
| + x: f.x - g.x, | |
| + y: f.y - g.y | |
| + }; | |
| + for (e = b; e && e != c && e.nodeType;) h += e.offsetLeft || 0, i += e.offsetTop || 0, e = e.offsetParent; | |
| + for (e = b.parentNode; e && e != c && e.nodeType;) h -= e.scrollLeft || 0, i -= e.scrollTop || 0, e = e.parentNode; | |
| + return { | |
| + x: h, | |
| + y: i | |
| + } | |
| }, | |
| - handleEventProps: function(a) { | |
| - var b = this; | |
| - this.bind(a.join(" "), function(a) { | |
| - var b = "on" + a.type.toLowerCase(); | |
| - "function" === c.typeOf(this[b]) && this[b].apply(this, arguments) | |
| - }), c.each(a, function(a) { | |
| - a = "on" + a.toLowerCase(a), "undefined" === c.typeOf(b[a]) && (b[a] = null) | |
| - }) | |
| - } | |
| - }) | |
| - } | |
| - return d.instance = new d, d | |
| - }), d("moxie/runtime/Runtime", ["moxie/core/utils/Env", "moxie/core/utils/Basic", "moxie/core/utils/Dom", "moxie/core/EventTarget"], function(a, b, c, d) { | |
| - function e(d, f, h, i, j) { | |
| - var k, l = this, | |
| - m = b.guid(f + "_"), | |
| - n = j || "browser"; | |
| - d = d || {}, g[m] = this, h = b.extend({ | |
| - access_binary: !1, | |
| - access_image_binary: !1, | |
| - display_media: !1, | |
| - do_cors: !1, | |
| - drag_and_drop: !1, | |
| - filter_by_extension: !0, | |
| - resize_image: !1, | |
| - report_upload_progress: !1, | |
| - return_response_headers: !1, | |
| - return_response_type: !1, | |
| - return_status_code: !0, | |
| - send_custom_headers: !1, | |
| - select_file: !1, | |
| - select_folder: !1, | |
| - select_multiple: !0, | |
| - send_binary_string: !1, | |
| - send_browser_cookies: !0, | |
| - send_multipart: !0, | |
| - slice_blob: !1, | |
| - stream_upload: !1, | |
| - summon_file_dialog: !1, | |
| - upload_filesize: !0, | |
| - use_http_method: !0 | |
| - }, h), d.preferred_caps && (n = e.getMode(i, d.preferred_caps, n)), MXI_DEBUG && a.debug.runtime && a.log("\tdefault mode: %s", n), k = function() { | |
| - var a = {}; | |
| - return { | |
| - exec: function(b, c, d, e) { | |
| - if (k[c] && (a[b] || (a[b] = { | |
| - context: this, | |
| - instance: new k[c] | |
| - }), a[b].instance[d])) return a[b].instance[d].apply(this, e) | |
| - }, | |
| - removeInstance: function(b) { | |
| - delete a[b] | |
| - }, | |
| - removeAllInstances: function() { | |
| - var c = this; | |
| - b.each(a, function(a, d) { | |
| - "function" === b.typeOf(a.instance.destroy) && a.instance.destroy.call(a.context), c.removeInstance(d) | |
| - }) | |
| + getSize: function(a) { | |
| + return { | |
| + w: a.offsetWidth || a.clientWidth, | |
| + h: a.offsetHeight || a.clientHeight | |
| } | |
| } | |
| - }(), b.extend(this, { | |
| - initialized: !1, | |
| - uid: m, | |
| - type: f, | |
| - mode: e.getMode(i, d.required_caps, n), | |
| - shimid: m + "_container", | |
| - clients: 0, | |
| - options: d, | |
| - can: function(a, c) { | |
| - var d = arguments[2] || h; | |
| - if ("string" === b.typeOf(a) && "undefined" === b.typeOf(c) && (a = e.parseCaps(a)), "object" === b.typeOf(a)) { | |
| - for (var f in a) | |
| - if (!this.can(f, a[f], d)) return !1; | |
| - return !0 | |
| - } | |
| - return "function" === b.typeOf(d[a]) ? d[a].call(this, c) : c === d[a] | |
| - }, | |
| - getShimContainer: function() { | |
| - var a, d = c.get(this.shimid); | |
| - return d || (a = this.options.container ? c.get(this.options.container) : document.body, d = document.createElement("div"), d.id = this.shimid, d.className = "moxie-shim moxie-shim-" + this.type, b.extend(d.style, { | |
| - position: "absolute", | |
| - top: "0px", | |
| - left: "0px", | |
| - width: "1px", | |
| - height: "1px", | |
| - overflow: "hidden" | |
| - }), a.appendChild(d), a = null), d | |
| - }, | |
| - getShim: function() { | |
| - return k | |
| - }, | |
| - shimExec: function(a, b) { | |
| - var c = [].slice.call(arguments, 2); | |
| - return l.getShim().exec.call(this, this.uid, a, b, c) | |
| - }, | |
| - exec: function(a, b) { | |
| - var c = [].slice.call(arguments, 2); | |
| - return l[a] && l[a][b] ? l[a][b].apply(this, c) : l.shimExec.apply(this, arguments) | |
| - }, | |
| - destroy: function() { | |
| - if (l) { | |
| - var a = c.get(this.shimid); | |
| - a && a.parentNode.removeChild(a), k && k.removeAllInstances(), this.unbindAll(), delete g[this.uid], this.uid = null, m = l = k = a = null | |
| + } | |
| + }), d("moxie/core/Exceptions", ["moxie/core/utils/Basic"], function(a) { | |
| + function b(a, b) { | |
| + var c; | |
| + for (c in a) | |
| + if (a[c] === b) return c; | |
| + return null | |
| + } | |
| + return { | |
| + RuntimeError: function() { | |
| + function c(a) { | |
| + this.code = a, this.name = b(d, a), this.message = this.name + ": RuntimeError " + this.code | |
| } | |
| - } | |
| - }), this.mode && d.required_caps && !this.can(d.required_caps) && (this.mode = !1) | |
| - } | |
| - var f = {}, | |
| - g = {}; | |
| - return e.order = "html5,html4", e.getRuntime = function(a) { | |
| - return !!g[a] && g[a] | |
| - }, e.addConstructor = function(a, b) { | |
| - b.prototype = d.instance, f[a] = b | |
| - }, e.getConstructor = function(a) { | |
| - return f[a] || null | |
| - }, e.getInfo = function(a) { | |
| - var b = e.getRuntime(a); | |
| - return b ? { | |
| - uid: b.uid, | |
| - type: b.type, | |
| - mode: b.mode, | |
| - can: function() { | |
| - return b.can.apply(b, arguments) | |
| - } | |
| - } : null | |
| - }, e.parseCaps = function(a) { | |
| - var c = {}; | |
| - return "string" !== b.typeOf(a) ? a || {} : (b.each(a.split(","), function(a) { | |
| - c[a] = !0 | |
| - }), c) | |
| - }, e.can = function(a, b) { | |
| - var c, d, f = e.getConstructor(a); | |
| - return !!f && (c = new f({ | |
| - required_caps: b | |
| - }), d = c.mode, c.destroy(), !!d) | |
| - }, e.thatCan = function(a, b) { | |
| - var c = (b || e.order).split(/\s*,\s*/); | |
| - for (var d in c) | |
| - if (e.can(c[d], a)) return c[d]; | |
| - return null | |
| - }, e.getMode = function(c, d, e) { | |
| - var f = null; | |
| - if ("undefined" === b.typeOf(e) && (e = "browser"), d && !b.isEmptyObj(c)) { | |
| - if (b.each(d, function(d, e) { | |
| - if (c.hasOwnProperty(e)) { | |
| - var g = c[e](d); | |
| - if ("string" == typeof g && (g = [g]), f) { | |
| - if (!(f = b.arrayIntersect(f, g))) return MXI_DEBUG && a.debug.runtime && a.log("\t\t%c: %v (conflicting mode requested: %s)", e, d, g), f = !1 | |
| - } else f = g | |
| - } | |
| - MXI_DEBUG && a.debug.runtime && a.log("\t\t%c: %v (compatible modes: %s)", e, d, f) | |
| - }), f) return b.inArray(e, f) !== -1 ? e : f[0]; | |
| - if (f === !1) return !1 | |
| - } | |
| - return e | |
| - }, e.capTrue = function() { | |
| - return !0 | |
| - }, e.capFalse = function() { | |
| - return !1 | |
| - }, e.capTest = function(a) { | |
| - return function() { | |
| - return !!a | |
| + var d = { | |
| + NOT_INIT_ERR: 1, | |
| + NOT_SUPPORTED_ERR: 9, | |
| + JS_ERR: 4 | |
| + }; | |
| + return a.extend(c, d), c.prototype = Error.prototype, c | |
| + }(), | |
| + OperationNotAllowedException: function() { | |
| + function b(a) { | |
| + this.code = a, this.name = "OperationNotAllowedException" | |
| + } | |
| + return a.extend(b, { | |
| + NOT_ALLOWED_ERR: 1 | |
| + }), b.prototype = Error.prototype, b | |
| + }(), | |
| + ImageError: function() { | |
| + function c(a) { | |
| + this.code = a, this.name = b(d, a), this.message = this.name + ": ImageError " + this.code | |
| + } | |
| + var d = { | |
| + WRONG_FORMAT: 1, | |
| + MAX_RESOLUTION_ERR: 2, | |
| + INVALID_META_ERR: 3 | |
| + }; | |
| + return a.extend(c, d), c.prototype = Error.prototype, c | |
| + }(), | |
| + FileException: function() { | |
| + function c(a) { | |
| + this.code = a, this.name = b(d, a), this.message = this.name + ": FileException " + this.code | |
| + } | |
| + var d = { | |
| + NOT_FOUND_ERR: 1, | |
| + SECURITY_ERR: 2, | |
| + ABORT_ERR: 3, | |
| + NOT_READABLE_ERR: 4, | |
| + ENCODING_ERR: 5, | |
| + NO_MODIFICATION_ALLOWED_ERR: 6, | |
| + INVALID_STATE_ERR: 7, | |
| + SYNTAX_ERR: 8 | |
| + }; | |
| + return a.extend(c, d), c.prototype = Error.prototype, c | |
| + }(), | |
| + DOMException: function() { | |
| + function c(a) { | |
| + this.code = a, this.name = b(d, a), this.message = this.name + ": DOMException " + this.code | |
| + } | |
| + var d = { | |
| + INDEX_SIZE_ERR: 1, | |
| + DOMSTRING_SIZE_ERR: 2, | |
| + HIERARCHY_REQUEST_ERR: 3, | |
| + WRONG_DOCUMENT_ERR: 4, | |
| + INVALID_CHARACTER_ERR: 5, | |
| + NO_DATA_ALLOWED_ERR: 6, | |
| + NO_MODIFICATION_ALLOWED_ERR: 7, | |
| + NOT_FOUND_ERR: 8, | |
| + NOT_SUPPORTED_ERR: 9, | |
| + INUSE_ATTRIBUTE_ERR: 10, | |
| + INVALID_STATE_ERR: 11, | |
| + SYNTAX_ERR: 12, | |
| + INVALID_MODIFICATION_ERR: 13, | |
| + NAMESPACE_ERR: 14, | |
| + INVALID_ACCESS_ERR: 15, | |
| + VALIDATION_ERR: 16, | |
| + TYPE_MISMATCH_ERR: 17, | |
| + SECURITY_ERR: 18, | |
| + NETWORK_ERR: 19, | |
| + ABORT_ERR: 20, | |
| + URL_MISMATCH_ERR: 21, | |
| + QUOTA_EXCEEDED_ERR: 22, | |
| + TIMEOUT_ERR: 23, | |
| + INVALID_NODE_TYPE_ERR: 24, | |
| + DATA_CLONE_ERR: 25 | |
| + }; | |
| + return a.extend(c, d), c.prototype = Error.prototype, c | |
| + }(), | |
| + EventException: function() { | |
| + function b(a) { | |
| + this.code = a, this.name = "EventException" | |
| + } | |
| + return a.extend(b, { | |
| + UNSPECIFIED_EVENT_TYPE_ERR: 0 | |
| + }), b.prototype = Error.prototype, b | |
| + }() | |
| } | |
| - }, e | |
| - }), d("moxie/runtime/RuntimeClient", ["moxie/core/utils/Env", "moxie/core/Exceptions", "moxie/core/utils/Basic", "moxie/runtime/Runtime"], function(a, b, c, d) { | |
| - return function() { | |
| - var e; | |
| - c.extend(this, { | |
| - connectRuntime: function(f) { | |
| - function g(c) { | |
| - var h, j; | |
| - return c.length ? (h = c.shift().toLowerCase(), (j = d.getConstructor(h)) ? (MXI_DEBUG && a.debug.runtime && (a.log("Trying runtime: %s", h), a.log(f)), e = new j(f), e.bind("Init", function() { | |
| - e.initialized = !0, MXI_DEBUG && a.debug.runtime && a.log("Runtime '%s' initialized", e.type), setTimeout(function() { | |
| - e.clients++, i.trigger("RuntimeInit", e) | |
| - }, 1) | |
| - }), e.bind("Error", function() { | |
| - MXI_DEBUG && a.debug.runtime && a.log("Runtime '%s' failed to initialize", e.type), e.destroy(), g(c) | |
| - }), MXI_DEBUG && a.debug.runtime && a.log("\tselected mode: %s", e.mode), e.mode ? void e.init() : void e.trigger("Error")) : void g(c)) : (i.trigger("RuntimeError", new b.RuntimeError(b.RuntimeError.NOT_INIT_ERR)), void(e = null)) | |
| - } | |
| - var h, i = this; | |
| - if ("string" === c.typeOf(f) ? h = f : "string" === c.typeOf(f.ruid) && (h = f.ruid), h) { | |
| - if (e = d.getRuntime(h)) return e.clients++, e; | |
| - throw new b.RuntimeError(b.RuntimeError.NOT_INIT_ERR) | |
| - } | |
| - g((f.runtime_order || d.order).split(/\s*,\s*/)) | |
| - }, | |
| - disconnectRuntime: function() { | |
| - e && --e.clients <= 0 && e.destroy(), e = null | |
| - }, | |
| - getRuntime: function() { | |
| - return e && e.uid ? e : e = null | |
| - }, | |
| - exec: function() { | |
| - return e ? e.exec.apply(this, arguments) : null | |
| - } | |
| - }) | |
| - } | |
| - }), d("moxie/file/FileInput", ["moxie/core/utils/Basic", "moxie/core/utils/Env", "moxie/core/utils/Mime", "moxie/core/utils/Dom", "moxie/core/Exceptions", "moxie/core/EventTarget", "moxie/core/I18n", "moxie/runtime/Runtime", "moxie/runtime/RuntimeClient"], function(a, b, c, d, e, f, g, h, i) { | |
| - function j(f) { | |
| - MXI_DEBUG && b.log("Instantiating FileInput..."); | |
| - var j, l, m, n = this; | |
| - if (a.inArray(a.typeOf(f), ["string", "node"]) !== -1 && (f = { | |
| - browse_button: f | |
| - }), l = d.get(f.browse_button), !l) throw new e.DOMException(e.DOMException.NOT_FOUND_ERR); | |
| - m = { | |
| - accept: [{ | |
| - title: g.translate("All Files"), | |
| - extensions: "*" | |
| - }], | |
| - name: "file", | |
| - multiple: !1, | |
| - required_caps: !1, | |
| - container: l.parentNode || document.body | |
| - }, f = a.extend({}, m, f), "string" == typeof f.required_caps && (f.required_caps = h.parseCaps(f.required_caps)), "string" == typeof f.accept && (f.accept = c.mimes2extList(f.accept)), j = d.get(f.container), j || (j = document.body), "static" === d.getStyle(j, "position") && (j.style.position = "relative"), j = l = null, i.call(n), a.extend(n, { | |
| - uid: a.guid("uid_"), | |
| - ruid: null, | |
| - shimid: null, | |
| - files: null, | |
| - init: function() { | |
| - n.bind("RuntimeInit", function(b, c) { | |
| - n.ruid = c.uid, n.shimid = c.shimid, n.bind("Ready", function() { | |
| - n.trigger("Refresh") | |
| - }, 999), n.bind("Refresh", function() { | |
| - var b, e, g, h; | |
| - g = d.get(f.browse_button), h = d.get(c.shimid), g && (b = d.getPos(g, d.get(f.container)), e = d.getSize(g), h && a.extend(h.style, { | |
| - top: b.y + "px", | |
| - left: b.x + "px", | |
| - width: e.w + "px", | |
| - height: e.h + "px" | |
| - })), h = g = null | |
| - }), c.exec.call(n, "FileInput", "init", f) | |
| - }), n.connectRuntime(a.extend({}, f, { | |
| - required_caps: { | |
| - select_file: !0 | |
| + }), d("moxie/core/EventTarget", ["moxie/core/utils/Env", "moxie/core/Exceptions", "moxie/core/utils/Basic"], function(a, b, c) { | |
| + function d() { | |
| + var d = {}; | |
| + c.extend(this, { | |
| + uid: null, | |
| + init: function() { | |
| + this.uid || (this.uid = c.guid("uid_")) | |
| + }, | |
| + addEventListener: function(a, b, e, f) { | |
| + var g, h = this; | |
| + if (this.hasOwnProperty("uid") || (this.uid = c.guid("uid_")), a = c.trim(a), /\s/.test(a)) return void c.each(a.split(/\s+/), function(a) { | |
| + h.addEventListener(a, b, e, f) | |
| + }); | |
| + a = a.toLowerCase(), e = parseInt(e, 10) || 0, g = d[this.uid] && d[this.uid][a] || [], g.push({ | |
| + fn: b, | |
| + priority: e, | |
| + scope: f || this | |
| + }), d[this.uid] || (d[this.uid] = {}), d[this.uid][a] = g | |
| + }, | |
| + hasEventListener: function(a) { | |
| + var b = a ? d[this.uid] && d[this.uid][a] : d[this.uid]; | |
| + return b || !1 | |
| + }, | |
| + removeEventListener: function(a, b) { | |
| + a = a.toLowerCase(); | |
| + var e, f = d[this.uid] && d[this.uid][a]; | |
| + if (f) { | |
| + if (b) { | |
| + for (e = f.length - 1; e >= 0; e--) | |
| + if (f[e].fn === b) { | |
| + f.splice(e, 1); | |
| + break | |
| + } | |
| + } else f = []; | |
| + f.length || (delete d[this.uid][a], c.isEmptyObj(d[this.uid]) && delete d[this.uid]) | |
| + } | |
| + }, | |
| + removeAllEventListeners: function() { | |
| + d[this.uid] && delete d[this.uid] | |
| + }, | |
| + dispatchEvent: function(e) { | |
| + var f, g, h, i, j = {}, | |
| + k = !0; | |
| + if ("string" !== c.typeOf(e)) { | |
| + if (i = e, "string" !== c.typeOf(i.type)) throw new b.EventException(b.EventException.UNSPECIFIED_EVENT_TYPE_ERR); | |
| + e = i.type, void 0 !== i.total && void 0 !== i.loaded && (j.total = i.total, j.loaded = i.loaded), j.async = i.async || !1 | |
| + } | |
| + if (-1 !== e.indexOf("::") ? function(a) { | |
| + f = a[0], e = a[1] | |
| + }(e.split("::")) : f = this.uid, e = e.toLowerCase(), g = d[f] && d[f][e]) { | |
| + g.sort(function(a, b) { | |
| + return b.priority - a.priority | |
| + }), h = [].slice.call(arguments), h.shift(), j.type = e, h.unshift(j), MXI_DEBUG && a.debug.events && a.log("Event '%s' fired on %u", j.type, f); | |
| + var l = []; | |
| + c.each(g, function(a) { | |
| + h[0].target = a.scope, j.async ? l.push(function(b) { | |
| + setTimeout(function() { | |
| + b(!1 === a.fn.apply(a.scope, h)) | |
| + }, 1) | |
| + }) : l.push(function(b) { | |
| + b(!1 === a.fn.apply(a.scope, h)) | |
| + }) | |
| + }), l.length && c.inSeries(l, function(a) { | |
| + k = !a | |
| + }) | |
| } | |
| - })) | |
| - }, | |
| - disable: function(b) { | |
| - var c = this.getRuntime(); | |
| - c && c.exec.call(this, "FileInput", "disable", "undefined" === a.typeOf(b) || b) | |
| - }, | |
| - refresh: function() { | |
| - n.trigger("Refresh") | |
| - }, | |
| - destroy: function() { | |
| - var b = this.getRuntime(); | |
| - b && (b.exec.call(this, "FileInput", "destroy"), this.disconnectRuntime()), "array" === a.typeOf(this.files) && a.each(this.files, function(a) { | |
| - a.destroy() | |
| - }), this.files = null, this.unbindAll() | |
| - } | |
| - }), this.handleEventProps(k) | |
| - } | |
| - var k = ["ready", "change", "cancel", "mouseenter", "mouseleave", "mousedown", "mouseup"]; | |
| - return j.prototype = f.instance, j | |
| - }), d("moxie/core/utils/Encode", [], function() { | |
| - var a = function(a) { | |
| - return unescape(encodeURIComponent(a)) | |
| - }, | |
| - b = function(a) { | |
| - return decodeURIComponent(escape(a)) | |
| - }, | |
| - c = function(a, c) { | |
| - if ("function" == typeof window.atob) return c ? b(window.atob(a)) : window.atob(a); | |
| - var d, e, f, g, h, i, j, k, l = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=", | |
| - m = 0, | |
| - n = 0, | |
| - o = "", | |
| - p = []; | |
| - if (!a) return a; | |
| - a += ""; | |
| - do g = l.indexOf(a.charAt(m++)), h = l.indexOf(a.charAt(m++)), i = l.indexOf(a.charAt(m++)), j = l.indexOf(a.charAt(m++)), k = g << 18 | h << 12 | i << 6 | j, d = k >> 16 & 255, e = k >> 8 & 255, f = 255 & k, 64 == i ? p[n++] = String.fromCharCode(d) : 64 == j ? p[n++] = String.fromCharCode(d, e) : p[n++] = String.fromCharCode(d, e, f); while (m < a.length); | |
| - return o = p.join(""), c ? b(o) : o | |
| - }, | |
| - d = function(b, c) { | |
| - if (c && (b = a(b)), "function" == typeof window.btoa) return window.btoa(b); | |
| - var d, e, f, g, h, i, j, k, l = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=", | |
| - m = 0, | |
| - n = 0, | |
| - o = "", | |
| - p = []; | |
| - if (!b) return b; | |
| - do d = b.charCodeAt(m++), e = b.charCodeAt(m++), f = b.charCodeAt(m++), k = d << 16 | e << 8 | f, g = k >> 18 & 63, h = k >> 12 & 63, i = k >> 6 & 63, j = 63 & k, p[n++] = l.charAt(g) + l.charAt(h) + l.charAt(i) + l.charAt(j); while (m < b.length); | |
| - o = p.join(""); | |
| - var q = b.length % 3; | |
| - return (q ? o.slice(0, q - 3) : o) + "===".slice(q || 3) | |
| - }; | |
| - return { | |
| - utf8_encode: a, | |
| - utf8_decode: b, | |
| - atob: c, | |
| - btoa: d | |
| - } | |
| - }), d("moxie/file/Blob", ["moxie/core/utils/Basic", "moxie/core/utils/Encode", "moxie/runtime/RuntimeClient"], function(a, b, c) { | |
| - function d(f, g) { | |
| - function h(b, c, f) { | |
| - var g, h = e[this.uid]; | |
| - return "string" === a.typeOf(h) && h.length ? (g = new d(null, { | |
| - type: f, | |
| - size: c - b | |
| - }), g.detach(h.substr(b, g.size)), g) : null | |
| + return k | |
| + }, | |
| + bind: function() { | |
| + this.addEventListener.apply(this, arguments) | |
| + }, | |
| + unbind: function() { | |
| + this.removeEventListener.apply(this, arguments) | |
| + }, | |
| + unbindAll: function() { | |
| + this.removeAllEventListeners.apply(this, arguments) | |
| + }, | |
| + trigger: function() { | |
| + return this.dispatchEvent.apply(this, arguments) | |
| + }, | |
| + handleEventProps: function(a) { | |
| + var b = this; | |
| + this.bind(a.join(" "), function(a) { | |
| + var b = "on" + a.type.toLowerCase(); | |
| + "function" === c.typeOf(this[b]) && this[b].apply(this, arguments) | |
| + }), c.each(a, function(a) { | |
| + a = "on" + a.toLowerCase(a), "undefined" === c.typeOf(b[a]) && (b[a] = null) | |
| + }) | |
| + } | |
| + }) | |
| } | |
| - c.call(this), f && this.connectRuntime(f), g ? "string" === a.typeOf(g) && (g = { | |
| - data: g | |
| - }) : g = {}, a.extend(this, { | |
| - uid: g.uid || a.guid("uid_"), | |
| - ruid: f, | |
| - size: g.size || 0, | |
| - type: g.type || "", | |
| - slice: function(a, b, c) { | |
| - return this.isDetached() ? h.apply(this, arguments) : this.getRuntime().exec.call(this, "Blob", "slice", this.getSource(), a, b, c) | |
| - }, | |
| - getSource: function() { | |
| - return e[this.uid] ? e[this.uid] : null | |
| - }, | |
| - detach: function(a) { | |
| - if (this.ruid && (this.getRuntime().exec.call(this, "Blob", "destroy"), this.disconnectRuntime(), this.ruid = null), a = a || "", "data:" == a.substr(0, 5)) { | |
| - var c = a.indexOf(";base64,"); | |
| - this.type = a.substring(5, c), a = b.atob(a.substring(c + 8)) | |
| - } | |
| - this.size = a.length, e[this.uid] = a | |
| - }, | |
| - isDetached: function() { | |
| - return !this.ruid && "string" === a.typeOf(e[this.uid]) | |
| - }, | |
| - destroy: function() { | |
| - this.detach(), delete e[this.uid] | |
| + return d.instance = new d, d | |
| + }), d("moxie/runtime/Runtime", ["moxie/core/utils/Env", "moxie/core/utils/Basic", "moxie/core/utils/Dom", "moxie/core/EventTarget"], function(a, b, c, d) { | |
| + function e(d, f, h, i, j) { | |
| + var k, l = this, | |
| + m = b.guid(f + "_"), | |
| + n = j || "browser"; | |
| + d = d || {}, g[m] = this, h = b.extend({ | |
| + access_binary: !1, | |
| + access_image_binary: !1, | |
| + display_media: !1, | |
| + do_cors: !1, | |
| + drag_and_drop: !1, | |
| + filter_by_extension: !0, | |
| + resize_image: !1, | |
| + report_upload_progress: !1, | |
| + return_response_headers: !1, | |
| + return_response_type: !1, | |
| + return_status_code: !0, | |
| + send_custom_headers: !1, | |
| + select_file: !1, | |
| + select_folder: !1, | |
| + select_multiple: !0, | |
| + send_binary_string: !1, | |
| + send_browser_cookies: !0, | |
| + send_multipart: !0, | |
| + slice_blob: !1, | |
| + stream_upload: !1, | |
| + summon_file_dialog: !1, | |
| + upload_filesize: !0, | |
| + use_http_method: !0 | |
| + }, h), d.preferred_caps && (n = e.getMode(i, d.preferred_caps, n)), MXI_DEBUG && a.debug.runtime && a.log("\tdefault mode: %s", n), k = function() { | |
| + var a = {}; | |
| + return { | |
| + exec: function(b, c, d, e) { | |
| + if (k[c] && (a[b] || (a[b] = { | |
| + context: this, | |
| + instance: new k[c] | |
| + }), a[b].instance[d])) return a[b].instance[d].apply(this, e) | |
| + }, | |
| + removeInstance: function(b) { | |
| + delete a[b] | |
| + }, | |
| + removeAllInstances: function() { | |
| + var c = this; | |
| + b.each(a, function(a, d) { | |
| + "function" === b.typeOf(a.instance.destroy) && a.instance.destroy.call(a.context), c.removeInstance(d) | |
| + }) | |
| + } | |
| + } | |
| + }(), b.extend(this, { | |
| + initialized: !1, | |
| + uid: m, | |
| + type: f, | |
| + mode: e.getMode(i, d.required_caps, n), | |
| + shimid: m + "_container", | |
| + clients: 0, | |
| + options: d, | |
| + can: function(a, c) { | |
| + var d = arguments[2] || h; | |
| + if ("string" === b.typeOf(a) && "undefined" === b.typeOf(c) && (a = e.parseCaps(a)), "object" === b.typeOf(a)) { | |
| + for (var f in a) | |
| + if (!this.can(f, a[f], d)) return !1; | |
| + return !0 | |
| + } | |
| + return "function" === b.typeOf(d[a]) ? d[a].call(this, c) : c === d[a] | |
| + }, | |
| + getShimContainer: function() { | |
| + var a, d = c.get(this.shimid); | |
| + return d || (a = this.options.container ? c.get(this.options.container) : document.body, d = document.createElement("div"), d.id = this.shimid, d.className = "moxie-shim moxie-shim-" + this.type, b.extend(d.style, { | |
| + position: "absolute", | |
| + top: "0px", | |
| + left: "0px", | |
| + width: "1px", | |
| + height: "1px", | |
| + overflow: "hidden" | |
| + }), a.appendChild(d), a = null), d | |
| + }, | |
| + getShim: function() { | |
| + return k | |
| + }, | |
| + shimExec: function(a, b) { | |
| + var c = [].slice.call(arguments, 2); | |
| + return l.getShim().exec.call(this, this.uid, a, b, c) | |
| + }, | |
| + exec: function(a, b) { | |
| + var c = [].slice.call(arguments, 2); | |
| + return l[a] && l[a][b] ? l[a][b].apply(this, c) : l.shimExec.apply(this, arguments) | |
| + }, | |
| + destroy: function() { | |
| + if (l) { | |
| + var a = c.get(this.shimid); | |
| + a && a.parentNode.removeChild(a), k && k.removeAllInstances(), this.unbindAll(), delete g[this.uid], this.uid = null, m = l = k = a = null | |
| + } | |
| + } | |
| + }), this.mode && d.required_caps && !this.can(d.required_caps) && (this.mode = !1) | |
| + } | |
| + var f = {}, | |
| + g = {}; | |
| + return e.order = "html5,html4", e.getRuntime = function(a) { | |
| + return !!g[a] && g[a] | |
| + }, e.addConstructor = function(a, b) { | |
| + b.prototype = d.instance, f[a] = b | |
| + }, e.getConstructor = function(a) { | |
| + return f[a] || null | |
| + }, e.getInfo = function(a) { | |
| + var b = e.getRuntime(a); | |
| + return b ? { | |
| + uid: b.uid, | |
| + type: b.type, | |
| + mode: b.mode, | |
| + can: function() { | |
| + return b.can.apply(b, arguments) | |
| + } | |
| + } : null | |
| + }, e.parseCaps = function(a) { | |
| + var c = {}; | |
| + return "string" !== b.typeOf(a) ? a || {} : (b.each(a.split(","), function(a) { | |
| + c[a] = !0 | |
| + }), c) | |
| + }, e.can = function(a, b) { | |
| + var c, d, f = e.getConstructor(a); | |
| + return !!f && (c = new f({ | |
| + required_caps: b | |
| + }), d = c.mode, c.destroy(), !!d) | |
| + }, e.thatCan = function(a, b) { | |
| + var c = (b || e.order).split(/\s*,\s*/); | |
| + for (var d in c) | |
| + if (e.can(c[d], a)) return c[d]; | |
| + return null | |
| + }, e.getMode = function(c, d, e) { | |
| + var f = null; | |
| + if ("undefined" === b.typeOf(e) && (e = "browser"), d && !b.isEmptyObj(c)) { | |
| + if (b.each(d, function(d, e) { | |
| + if (c.hasOwnProperty(e)) { | |
| + var g = c[e](d); | |
| + if ("string" == typeof g && (g = [g]), f) { | |
| + if (!(f = b.arrayIntersect(f, g))) return MXI_DEBUG && a.debug.runtime && a.log("\t\t%c: %v (conflicting mode requested: %s)", e, d, g), f = !1 | |
| + } else f = g | |
| + } | |
| + MXI_DEBUG && a.debug.runtime && a.log("\t\t%c: %v (compatible modes: %s)", e, d, f) | |
| + }), f) return -1 !== b.inArray(e, f) ? e : f[0]; | |
| + if (!1 === f) return !1 | |
| } | |
| - }), g.data ? this.detach(g.data) : e[this.uid] = g | |
| - } | |
| - var e = {}; | |
| - return d | |
| - }), d("moxie/file/File", ["moxie/core/utils/Basic", "moxie/core/utils/Mime", "moxie/file/Blob"], function(a, b, c) { | |
| - function d(d, e) { | |
| - e || (e = {}), c.apply(this, arguments), this.type || (this.type = b.getFileMime(e.name)); | |
| - var f; | |
| - if (e.name) f = e.name.replace(/\\/g, "/"), f = f.substr(f.lastIndexOf("/") + 1); | |
| - else if (this.type) { | |
| - var g = this.type.split("/")[0]; | |
| - f = a.guid(("" !== g ? g : "file") + "_"), b.extensions[this.type] && (f += "." + b.extensions[this.type][0]) | |
| - } | |
| - a.extend(this, { | |
| - name: f || a.guid("file_"), | |
| - relativePath: "", | |
| - lastModifiedDate: e.lastModifiedDate || (new Date).toLocaleString() | |
| - }) | |
| - } | |
| - return d.prototype = c.prototype, d | |
| - }), d("moxie/file/FileDrop", ["moxie/core/I18n", "moxie/core/utils/Dom", "moxie/core/Exceptions", "moxie/core/utils/Basic", "moxie/core/utils/Env", "moxie/file/File", "moxie/runtime/RuntimeClient", "moxie/core/EventTarget", "moxie/core/utils/Mime"], function(a, b, c, d, e, f, g, h, i) { | |
| - function j(c) { | |
| - MXI_DEBUG && e.log("Instantiating FileDrop..."); | |
| - var f, h = this; | |
| - "string" == typeof c && (c = { | |
| - drop_zone: c | |
| - }), f = { | |
| - accept: [{ | |
| - title: a.translate("All Files"), | |
| - extensions: "*" | |
| - }], | |
| - required_caps: { | |
| - drag_and_drop: !0 | |
| - } | |
| - }, c = "object" == typeof c ? d.extend({}, f, c) : f, c.container = b.get(c.drop_zone) || document.body, "static" === b.getStyle(c.container, "position") && (c.container.style.position = "relative"), "string" == typeof c.accept && (c.accept = i.mimes2extList(c.accept)), g.call(h), d.extend(h, { | |
| - uid: d.guid("uid_"), | |
| - ruid: null, | |
| - files: null, | |
| - init: function() { | |
| - h.bind("RuntimeInit", function(a, b) { | |
| - h.ruid = b.uid, b.exec.call(h, "FileDrop", "init", c), h.dispatchEvent("ready") | |
| - }), h.connectRuntime(c) | |
| - }, | |
| - destroy: function() { | |
| - var a = this.getRuntime(); | |
| - a && (a.exec.call(this, "FileDrop", "destroy"), this.disconnectRuntime()), this.files = null, this.unbindAll() | |
| + return e | |
| + }, e.capTrue = function() { | |
| + return !0 | |
| + }, e.capFalse = function() { | |
| + return !1 | |
| + }, e.capTest = function(a) { | |
| + return function() { | |
| + return !!a | |
| } | |
| - }), this.handleEventProps(k) | |
| - } | |
| - var k = ["ready", "dragenter", "dragleave", "drop", "error"]; | |
| - return j.prototype = h.instance, j | |
| - }), d("moxie/file/FileReader", ["moxie/core/utils/Basic", "moxie/core/utils/Encode", "moxie/core/Exceptions", "moxie/core/EventTarget", "moxie/file/Blob", "moxie/runtime/RuntimeClient"], function(a, b, c, d, e, f) { | |
| - function g() { | |
| - function d(a, d) { | |
| - if (this.trigger("loadstart"), this.readyState === g.LOADING) return this.trigger("error", new c.DOMException(c.DOMException.INVALID_STATE_ERR)), void this.trigger("loadend"); | |
| - if (!(d instanceof e)) return this.trigger("error", new c.DOMException(c.DOMException.NOT_FOUND_ERR)), void this.trigger("loadend"); | |
| - if (this.result = null, this.readyState = g.LOADING, d.isDetached()) { | |
| - var f = d.getSource(); | |
| - switch (a) { | |
| - case "readAsText": | |
| - case "readAsBinaryString": | |
| - this.result = f; | |
| - break; | |
| - case "readAsDataURL": | |
| - this.result = "data:" + d.type + ";base64," + b.btoa(f) | |
| + }, e | |
| + }), d("moxie/runtime/RuntimeClient", ["moxie/core/utils/Env", "moxie/core/Exceptions", "moxie/core/utils/Basic", "moxie/runtime/Runtime"], function(a, b, c, d) { | |
| + return function() { | |
| + var e; | |
| + c.extend(this, { | |
| + connectRuntime: function(f) { | |
| + function g(c) { | |
| + var h, j; | |
| + return c.length ? (h = c.shift().toLowerCase(), (j = d.getConstructor(h)) ? (MXI_DEBUG && a.debug.runtime && (a.log("Trying runtime: %s", h), a.log(f)), e = new j(f), e.bind("Init", function() { | |
| + e.initialized = !0, MXI_DEBUG && a.debug.runtime && a.log("Runtime '%s' initialized", e.type), setTimeout(function() { | |
| + e.clients++, i.trigger("RuntimeInit", e) | |
| + }, 1) | |
| + }), e.bind("Error", function() { | |
| + MXI_DEBUG && a.debug.runtime && a.log("Runtime '%s' failed to initialize", e.type), e.destroy(), g(c) | |
| + }), MXI_DEBUG && a.debug.runtime && a.log("\tselected mode: %s", e.mode), e.mode ? void e.init() : void e.trigger("Error")) : void g(c)) : (i.trigger("RuntimeError", new b.RuntimeError(b.RuntimeError.NOT_INIT_ERR)), void(e = null)) | |
| + } | |
| + var h, i = this; | |
| + if ("string" === c.typeOf(f) ? h = f : "string" === c.typeOf(f.ruid) && (h = f.ruid), h) { | |
| + if (e = d.getRuntime(h)) return e.clients++, e; | |
| + throw new b.RuntimeError(b.RuntimeError.NOT_INIT_ERR) | |
| + } | |
| + g((f.runtime_order || d.order).split(/\s*,\s*/)) | |
| + }, | |
| + disconnectRuntime: function() { | |
| + e && --e.clients <= 0 && e.destroy(), e = null | |
| + }, | |
| + getRuntime: function() { | |
| + return e && e.uid ? e : e = null | |
| + }, | |
| + exec: function() { | |
| + return e ? e.exec.apply(this, arguments) : null | |
| } | |
| - this.readyState = g.DONE, this.trigger("load"), this.trigger("loadend") | |
| - } else this.connectRuntime(d.ruid), this.exec("FileReader", "read", a, d); | |
| + }) | |
| } | |
| - f.call(this), a.extend(this, { | |
| - uid: a.guid("uid_"), | |
| - readyState: g.EMPTY, | |
| - result: null, | |
| - error: null, | |
| - readAsBinaryString: function(a) { | |
| - d.call(this, "readAsBinaryString", a) | |
| - }, | |
| - readAsDataURL: function(a) { | |
| - d.call(this, "readAsDataURL", a) | |
| - }, | |
| - readAsText: function(a) { | |
| - d.call(this, "readAsText", a) | |
| - }, | |
| - abort: function() { | |
| - this.result = null, a.inArray(this.readyState, [g.EMPTY, g.DONE]) === -1 && (this.readyState === g.LOADING && (this.readyState = g.DONE), this.exec("FileReader", "abort"), this.trigger("abort"), this.trigger("loadend")) | |
| - }, | |
| - destroy: function() { | |
| - this.abort(), this.exec("FileReader", "destroy"), this.disconnectRuntime(), this.unbindAll() | |
| - } | |
| - }), this.handleEventProps(h), this.bind("Error", function(a, b) { | |
| - this.readyState = g.DONE, this.error = b | |
| - }, 999), this.bind("Load", function(a) { | |
| - this.readyState = g.DONE | |
| - }, 999) | |
| - } | |
| - var h = ["loadstart", "progress", "load", "abort", "error", "loadend"]; | |
| - return g.EMPTY = 0, g.LOADING = 1, g.DONE = 2, g.prototype = d.instance, g | |
| - }), d("moxie/core/utils/Url", [], function() { | |
| - var a = function(b, c) { | |
| + }), d("moxie/file/FileInput", ["moxie/core/utils/Basic", "moxie/core/utils/Env", "moxie/core/utils/Mime", "moxie/core/utils/Dom", "moxie/core/Exceptions", "moxie/core/EventTarget", "moxie/core/I18n", "moxie/runtime/Runtime", "moxie/runtime/RuntimeClient"], function(a, b, c, d, e, f, g, h, i) { | |
| + function j(f) { | |
| + MXI_DEBUG && b.log("Instantiating FileInput..."); | |
| + var j, l, m, n = this; | |
| + if (-1 !== a.inArray(a.typeOf(f), ["string", "node"]) && (f = { | |
| + browse_button: f | |
| + }), !(l = d.get(f.browse_button))) throw new e.DOMException(e.DOMException.NOT_FOUND_ERR); | |
| + m = { | |
| + accept: [{ | |
| + title: g.translate("All Files"), | |
| + extensions: "*" | |
| + }], | |
| + name: "file", | |
| + multiple: !1, | |
| + required_caps: !1, | |
| + container: l.parentNode || document.body | |
| + }, f = a.extend({}, m, f), "string" == typeof f.required_caps && (f.required_caps = h.parseCaps(f.required_caps)), "string" == typeof f.accept && (f.accept = c.mimes2extList(f.accept)), j = d.get(f.container), j || (j = document.body), "static" === d.getStyle(j, "position") && (j.style.position = "relative"), j = l = null, i.call(n), a.extend(n, { | |
| + uid: a.guid("uid_"), | |
| + ruid: null, | |
| + shimid: null, | |
| + files: null, | |
| + init: function() { | |
| + n.bind("RuntimeInit", function(b, c) { | |
| + n.ruid = c.uid, n.shimid = c.shimid, n.bind("Ready", function() { | |
| + n.trigger("Refresh") | |
| + }, 999), n.bind("Refresh", function() { | |
| + var b, e, g, h; | |
| + g = d.get(f.browse_button), h = d.get(c.shimid), g && (b = d.getPos(g, d.get(f.container)), e = d.getSize(g), h && a.extend(h.style, { | |
| + top: b.y + "px", | |
| + left: b.x + "px", | |
| + width: e.w + "px", | |
| + height: e.h + "px" | |
| + })), h = g = null | |
| + }), c.exec.call(n, "FileInput", "init", f) | |
| + }), n.connectRuntime(a.extend({}, f, { | |
| + required_caps: { | |
| + select_file: !0 | |
| + } | |
| + })) | |
| + }, | |
| + disable: function(b) { | |
| + var c = this.getRuntime(); | |
| + c && c.exec.call(this, "FileInput", "disable", "undefined" === a.typeOf(b) || b) | |
| + }, | |
| + refresh: function() { | |
| + n.trigger("Refresh") | |
| + }, | |
| + destroy: function() { | |
| + var b = this.getRuntime(); | |
| + b && (b.exec.call(this, "FileInput", "destroy"), this.disconnectRuntime()), "array" === a.typeOf(this.files) && a.each(this.files, function(a) { | |
| + a.destroy() | |
| + }), this.files = null, this.unbindAll() | |
| + } | |
| + }), this.handleEventProps(k) | |
| + } | |
| + var k = ["ready", "change", "cancel", "mouseenter", "mouseleave", "mousedown", "mouseup"]; | |
| + return j.prototype = f.instance, j | |
| + }), d("moxie/core/utils/Encode", [], function() { | |
| + var a = function(a) { | |
| + return unescape(encodeURIComponent(a)) | |
| + }, | |
| + b = function(a) { | |
| + return decodeURIComponent(escape(a)) | |
| + }; | |
| + return { | |
| + utf8_encode: a, | |
| + utf8_decode: b, | |
| + atob: function(a, c) { | |
| + if ("function" == typeof window.atob) return c ? b(window.atob(a)) : window.atob(a); | |
| + var d, e, f, g, h, i, j, k, l = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=", | |
| + m = 0, | |
| + n = 0, | |
| + o = "", | |
| + p = []; | |
| + if (!a) return a; | |
| + a += ""; | |
| + do { | |
| + g = l.indexOf(a.charAt(m++)), h = l.indexOf(a.charAt(m++)), i = l.indexOf(a.charAt(m++)), j = l.indexOf(a.charAt(m++)), k = g << 18 | h << 12 | i << 6 | j, d = k >> 16 & 255, e = k >> 8 & 255, f = 255 & k, p[n++] = 64 == i ? String.fromCharCode(d) : 64 == j ? String.fromCharCode(d, e) : String.fromCharCode(d, e, f) | |
| + } while (m < a.length); | |
| + return o = p.join(""), c ? b(o) : o | |
| + }, | |
| + btoa: function(b, c) { | |
| + if (c && (b = a(b)), "function" == typeof window.btoa) return window.btoa(b); | |
| + var d, e, f, g, h, i, j, k, l = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=", | |
| + m = 0, | |
| + n = 0, | |
| + o = "", | |
| + p = []; | |
| + if (!b) return b; | |
| + do { | |
| + d = b.charCodeAt(m++), e = b.charCodeAt(m++), f = b.charCodeAt(m++), k = d << 16 | e << 8 | f, g = k >> 18 & 63, h = k >> 12 & 63, i = k >> 6 & 63, j = 63 & k, p[n++] = l.charAt(g) + l.charAt(h) + l.charAt(i) + l.charAt(j) | |
| + } while (m < b.length); | |
| + o = p.join(""); | |
| + var q = b.length % 3; | |
| + return (q ? o.slice(0, q - 3) : o) + "===".slice(q || 3) | |
| + } | |
| + } | |
| + }), d("moxie/file/Blob", ["moxie/core/utils/Basic", "moxie/core/utils/Encode", "moxie/runtime/RuntimeClient"], function(a, b, c) { | |
| + function d(f, g) { | |
| + function h(b, c, f) { | |
| + var g, h = e[this.uid]; | |
| + return "string" === a.typeOf(h) && h.length ? (g = new d(null, { | |
| + type: f, | |
| + size: c - b | |
| + }), g.detach(h.substr(b, g.size)), g) : null | |
| + } | |
| + c.call(this), f && this.connectRuntime(f), g ? "string" === a.typeOf(g) && (g = { | |
| + data: g | |
| + }) : g = {}, a.extend(this, { | |
| + uid: g.uid || a.guid("uid_"), | |
| + ruid: f, | |
| + size: g.size || 0, | |
| + type: g.type || "", | |
| + slice: function(a, b, c) { | |
| + return this.isDetached() ? h.apply(this, arguments) : this.getRuntime().exec.call(this, "Blob", "slice", this.getSource(), a, b, c) | |
| + }, | |
| + getSource: function() { | |
| + return e[this.uid] ? e[this.uid] : null | |
| + }, | |
| + detach: function(a) { | |
| + if (this.ruid && (this.getRuntime().exec.call(this, "Blob", "destroy"), this.disconnectRuntime(), this.ruid = null), a = a || "", "data:" == a.substr(0, 5)) { | |
| + var c = a.indexOf(";base64,"); | |
| + this.type = a.substring(5, c), a = b.atob(a.substring(c + 8)) | |
| + } | |
| + this.size = a.length, e[this.uid] = a | |
| + }, | |
| + isDetached: function() { | |
| + return !this.ruid && "string" === a.typeOf(e[this.uid]) | |
| + }, | |
| + destroy: function() { | |
| + this.detach(), delete e[this.uid] | |
| + } | |
| + }), g.data ? this.detach(g.data) : e[this.uid] = g | |
| + } | |
| + var e = {}; | |
| + return d | |
| + }), d("moxie/file/File", ["moxie/core/utils/Basic", "moxie/core/utils/Mime", "moxie/file/Blob"], function(a, b, c) { | |
| + function d(d, e) { | |
| + e || (e = {}), c.apply(this, arguments), this.type || (this.type = b.getFileMime(e.name)); | |
| + var f; | |
| + if (e.name) f = e.name.replace(/\\/g, "/"), f = f.substr(f.lastIndexOf("/") + 1); | |
| + else if (this.type) { | |
| + var g = this.type.split("/")[0]; | |
| + f = a.guid(("" !== g ? g : "file") + "_"), b.extensions[this.type] && (f += "." + b.extensions[this.type][0]) | |
| + } | |
| + a.extend(this, { | |
| + name: f || a.guid("file_"), | |
| + relativePath: "", | |
| + lastModifiedDate: e.lastModifiedDate || (new Date).toLocaleString() | |
| + }) | |
| + } | |
| + return d.prototype = c.prototype, d | |
| + }), d("moxie/file/FileDrop", ["moxie/core/I18n", "moxie/core/utils/Dom", "moxie/core/Exceptions", "moxie/core/utils/Basic", "moxie/core/utils/Env", "moxie/file/File", "moxie/runtime/RuntimeClient", "moxie/core/EventTarget", "moxie/core/utils/Mime"], function(a, b, c, d, e, f, g, h, i) { | |
| + function j(c) { | |
| + MXI_DEBUG && e.log("Instantiating FileDrop..."); | |
| + var f, h = this; | |
| + "string" == typeof c && (c = { | |
| + drop_zone: c | |
| + }), f = { | |
| + accept: [{ | |
| + title: a.translate("All Files"), | |
| + extensions: "*" | |
| + }], | |
| + required_caps: { | |
| + drag_and_drop: !0 | |
| + } | |
| + }, c = "object" == typeof c ? d.extend({}, f, c) : f, c.container = b.get(c.drop_zone) || document.body, "static" === b.getStyle(c.container, "position") && (c.container.style.position = "relative"), "string" == typeof c.accept && (c.accept = i.mimes2extList(c.accept)), g.call(h), d.extend(h, { | |
| + uid: d.guid("uid_"), | |
| + ruid: null, | |
| + files: null, | |
| + init: function() { | |
| + h.bind("RuntimeInit", function(a, b) { | |
| + h.ruid = b.uid, b.exec.call(h, "FileDrop", "init", c), h.dispatchEvent("ready") | |
| + }), h.connectRuntime(c) | |
| + }, | |
| + destroy: function() { | |
| + var a = this.getRuntime(); | |
| + a && (a.exec.call(this, "FileDrop", "destroy"), this.disconnectRuntime()), this.files = null, this.unbindAll() | |
| + } | |
| + }), this.handleEventProps(k) | |
| + } | |
| + var k = ["ready", "dragenter", "dragleave", "drop", "error"]; | |
| + return j.prototype = h.instance, j | |
| + }), d("moxie/file/FileReader", ["moxie/core/utils/Basic", "moxie/core/utils/Encode", "moxie/core/Exceptions", "moxie/core/EventTarget", "moxie/file/Blob", "moxie/runtime/RuntimeClient"], function(a, b, c, d, e, f) { | |
| + function g() { | |
| + function d(a, d) { | |
| + if (this.trigger("loadstart"), this.readyState === g.LOADING) return this.trigger("error", new c.DOMException(c.DOMException.INVALID_STATE_ERR)), void this.trigger("loadend"); | |
| + if (!(d instanceof e)) return this.trigger("error", new c.DOMException(c.DOMException.NOT_FOUND_ERR)), void this.trigger("loadend"); | |
| + if (this.result = null, this.readyState = g.LOADING, d.isDetached()) { | |
| + var f = d.getSource(); | |
| + switch (a) { | |
| + case "readAsText": | |
| + case "readAsBinaryString": | |
| + this.result = f; | |
| + break; | |
| + case "readAsDataURL": | |
| + this.result = "data:" + d.type + ";base64," + b.btoa(f) | |
| + } | |
| + this.readyState = g.DONE, this.trigger("load"), this.trigger("loadend") | |
| + } else this.connectRuntime(d.ruid), this.exec("FileReader", "read", a, d) | |
| + } | |
| + f.call(this), a.extend(this, { | |
| + uid: a.guid("uid_"), | |
| + readyState: g.EMPTY, | |
| + result: null, | |
| + error: null, | |
| + readAsBinaryString: function(a) { | |
| + d.call(this, "readAsBinaryString", a) | |
| + }, | |
| + readAsDataURL: function(a) { | |
| + d.call(this, "readAsDataURL", a) | |
| + }, | |
| + readAsText: function(a) { | |
| + d.call(this, "readAsText", a) | |
| + }, | |
| + abort: function() { | |
| + this.result = null, -1 === a.inArray(this.readyState, [g.EMPTY, g.DONE]) && (this.readyState === g.LOADING && (this.readyState = g.DONE), this.exec("FileReader", "abort"), this.trigger("abort"), this.trigger("loadend")) | |
| + }, | |
| + destroy: function() { | |
| + this.abort(), this.exec("FileReader", "destroy"), this.disconnectRuntime(), this.unbindAll() | |
| + } | |
| + }), this.handleEventProps(h), this.bind("Error", function(a, b) { | |
| + this.readyState = g.DONE, this.error = b | |
| + }, 999), this.bind("Load", function(a) { | |
| + this.readyState = g.DONE | |
| + }, 999) | |
| + } | |
| + var h = ["loadstart", "progress", "load", "abort", "error", "loadend"]; | |
| + return g.EMPTY = 0, g.LOADING = 1, g.DONE = 2, g.prototype = d.instance, g | |
| + }), d("moxie/core/utils/Url", [], function() { | |
| + var a = function(b, c) { | |
| for (var d = ["source", "scheme", "authority", "userInfo", "user", "pass", "host", "port", "relative", "path", "directory", "file", "query", "fragment"], e = d.length, f = { | |
| http: 80, | |
| https: 443 | |
| @@ -1254,1998 +1229,1997 @@ | |
| /^[^\/]/.test(g.path) && (j = c.path, j = /\/[^\/]*\.[^\/]*$/.test(j) ? j.replace(/\/[^\/]+$/, "/") : j.replace(/\/?$/, "/")), g.path = j + (g.path || "") | |
| } | |
| return g.port || (g.port = f[g.scheme] || 80), g.port = parseInt(g.port, 10), g.path || (g.path = "/"), delete g.source, g | |
| - }, | |
| - b = function(b) { | |
| - var c = { | |
| - http: 80, | |
| - https: 443 | |
| - }, | |
| - d = "object" == typeof b ? b : a(b); | |
| - return d.scheme + "://" + d.host + (d.port !== c[d.scheme] ? ":" + d.port : "") + d.path + (d.query ? d.query : "") | |
| - }, | |
| - c = function(b) { | |
| - function c(a) { | |
| - return [a.scheme, a.host, a.port].join("/") | |
| - } | |
| - return "string" == typeof b && (b = a(b)), c(a()) === c(b) | |
| }; | |
| - return { | |
| - parseUrl: a, | |
| - resolveUrl: b, | |
| - hasSameOrigin: c | |
| - } | |
| - }), d("moxie/runtime/RuntimeTarget", ["moxie/core/utils/Basic", "moxie/runtime/RuntimeClient", "moxie/core/EventTarget"], function(a, b, c) { | |
| - function d() { | |
| - this.uid = a.guid("uid_"), b.call(this), this.destroy = function() { | |
| - this.disconnectRuntime(), this.unbindAll() | |
| - } | |
| - } | |
| - return d.prototype = c.instance, d | |
| - }), d("moxie/file/FileReaderSync", ["moxie/core/utils/Basic", "moxie/runtime/RuntimeClient", "moxie/core/utils/Encode"], function(a, b, c) { | |
| - return function() { | |
| - function d(a, b) { | |
| - if (!b.isDetached()) { | |
| - var d = this.connectRuntime(b.ruid).exec.call(this, "FileReaderSync", "read", a, b); | |
| - return this.disconnectRuntime(), d | |
| - } | |
| - var e = b.getSource(); | |
| - switch (a) { | |
| - case "readAsBinaryString": | |
| - return e; | |
| - case "readAsDataURL": | |
| - return "data:" + b.type + ";base64," + c.btoa(e); | |
| - case "readAsText": | |
| - for (var f = "", g = 0, h = e.length; g < h; g++) f += String.fromCharCode(e[g]); | |
| - return f | |
| - } | |
| - } | |
| - b.call(this), a.extend(this, { | |
| - uid: a.guid("uid_"), | |
| - readAsBinaryString: function(a) { | |
| - return d.call(this, "readAsBinaryString", a) | |
| - }, | |
| - readAsDataURL: function(a) { | |
| - return d.call(this, "readAsDataURL", a) | |
| - }, | |
| - readAsText: function(a) { | |
| - return d.call(this, "readAsText", a) | |
| - } | |
| - }) | |
| - } | |
| - }), d("moxie/xhr/FormData", ["moxie/core/Exceptions", "moxie/core/utils/Basic", "moxie/file/Blob"], function(a, b, c) { | |
| - function d() { | |
| - var a, d = []; | |
| - b.extend(this, { | |
| - append: function(e, f) { | |
| - var g = this, | |
| - h = b.typeOf(f); | |
| - f instanceof c ? a = { | |
| - name: e, | |
| - value: f | |
| - } : "array" === h ? (e += "[]", b.each(f, function(a) { | |
| - g.append(e, a) | |
| - })) : "object" === h ? b.each(f, function(a, b) { | |
| - g.append(e + "[" + b + "]", a) | |
| - }) : "null" === h || "undefined" === h || "number" === h && isNaN(f) ? g.append(e, "false") : d.push({ | |
| - name: e, | |
| - value: f.toString() | |
| - }) | |
| - }, | |
| - hasBlob: function() { | |
| - return !!this.getBlob() | |
| - }, | |
| - getBlob: function() { | |
| - return a && a.value || null | |
| - }, | |
| - getBlobName: function() { | |
| - return a && a.name || null | |
| - }, | |
| - each: function(c) { | |
| - b.each(d, function(a) { | |
| - c(a.value, a.name) | |
| - }), a && c(a.value, a.name) | |
| + return { | |
| + parseUrl: a, | |
| + resolveUrl: function(b) { | |
| + var c = { | |
| + http: 80, | |
| + https: 443 | |
| + }, | |
| + d = "object" == typeof b ? b : a(b); | |
| + return d.scheme + "://" + d.host + (d.port !== c[d.scheme] ? ":" + d.port : "") + d.path + (d.query ? d.query : "") | |
| }, | |
| - destroy: function() { | |
| - a = null, d = [] | |
| + hasSameOrigin: function(b) { | |
| + function c(a) { | |
| + return [a.scheme, a.host, a.port].join("/") | |
| + } | |
| + return "string" == typeof b && (b = a(b)), c(a()) === c(b) | |
| } | |
| - }) | |
| - } | |
| - return d | |
| - }), d("moxie/xhr/XMLHttpRequest", ["moxie/core/utils/Basic", "moxie/core/Exceptions", "moxie/core/EventTarget", "moxie/core/utils/Encode", "moxie/core/utils/Url", "moxie/runtime/Runtime", "moxie/runtime/RuntimeTarget", "moxie/file/Blob", "moxie/file/FileReaderSync", "moxie/xhr/FormData", "moxie/core/utils/Env", "moxie/core/utils/Mime"], function(a, b, c, d, e, f, g, h, i, j, k, l) { | |
| - function m() { | |
| - this.uid = a.guid("uid_") | |
| - } | |
| - | |
| - function n() { | |
| - function c(a, b) { | |
| - if (A.hasOwnProperty(a)) return 1 === arguments.length ? k.can("define_property") ? A[a] : z[a] : void(k.can("define_property") ? A[a] = b : z[a] = b) | |
| } | |
| - | |
| - function i(b) { | |
| - function d() { | |
| - x && (x.destroy(), x = null), h.dispatchEvent("loadend"), h = null | |
| + }), d("moxie/runtime/RuntimeTarget", ["moxie/core/utils/Basic", "moxie/runtime/RuntimeClient", "moxie/core/EventTarget"], function(a, b, c) { | |
| + function d() { | |
| + this.uid = a.guid("uid_"), b.call(this), this.destroy = function() { | |
| + this.disconnectRuntime(), this.unbindAll() | |
| } | |
| - | |
| - function e(e) { | |
| - x.bind("LoadStart", function(a) { | |
| - c("readyState", n.LOADING), h.dispatchEvent("readystatechange"), h.dispatchEvent(a), H && h.upload.dispatchEvent(a) | |
| - }), x.bind("Progress", function(a) { | |
| - c("readyState") !== n.LOADING && (c("readyState", n.LOADING), h.dispatchEvent("readystatechange")), h.dispatchEvent(a) | |
| - }), x.bind("UploadProgress", function(a) { | |
| - H && h.upload.dispatchEvent({ | |
| - type: "progress", | |
| - lengthComputable: !1, | |
| - total: a.total, | |
| - loaded: a.loaded | |
| - }) | |
| - }), x.bind("Load", function(b) { | |
| - c("readyState", n.DONE), c("status", Number(e.exec.call(x, "XMLHttpRequest", "getStatus") || 0)), c("statusText", o[c("status")] || ""), c("response", e.exec.call(x, "XMLHttpRequest", "getResponse", c("responseType"))), ~a.inArray(c("responseType"), ["text", ""]) ? c("responseText", c("response")) : "document" === c("responseType") && c("responseXML", c("response")), O = e.exec.call(x, "XMLHttpRequest", "getAllResponseHeaders"), h.dispatchEvent("readystatechange"), c("status") > 0 ? (H && h.upload.dispatchEvent(b), h.dispatchEvent(b)) : (J = !0, h.dispatchEvent("error")), d() | |
| - }), x.bind("Abort", function(a) { | |
| - h.dispatchEvent(a), d() | |
| - }), x.bind("Error", function(a) { | |
| - J = !0, c("readyState", n.DONE), h.dispatchEvent("readystatechange"), I = !0, h.dispatchEvent(a), d() | |
| - }), e.exec.call(x, "XMLHttpRequest", "send", { | |
| - url: r, | |
| - method: s, | |
| - async: B, | |
| - user: t, | |
| - password: u, | |
| - headers: C, | |
| - mimeType: E, | |
| - encoding: D, | |
| - responseType: h.responseType, | |
| - withCredentials: h.withCredentials, | |
| - options: N | |
| - }, b) | |
| - } | |
| - var h = this; | |
| - v = (new Date).getTime(), x = new g, "string" == typeof N.required_caps && (N.required_caps = f.parseCaps(N.required_caps)), N.required_caps = a.extend({}, N.required_caps, { | |
| - return_response_type: h.responseType | |
| - }), b instanceof j && (N.required_caps.send_multipart = !0), a.isEmptyObj(C) || (N.required_caps.send_custom_headers = !0), K || (N.required_caps.do_cors = !0), N.ruid ? e(x.connectRuntime(N)) : (x.bind("RuntimeInit", function(a, b) { | |
| - e(b) | |
| - }), x.bind("RuntimeError", function(a, b) { | |
| - h.dispatchEvent("RuntimeError", b) | |
| - }), x.connectRuntime(N)) | |
| - } | |
| - | |
| - function q() { | |
| - c("responseText", ""), c("responseXML", null), c("response", null), c("status", 0), c("statusText", ""), v = w = null | |
| - } | |
| - var r, s, t, u, v, w, x, y, z = this, | |
| - A = { | |
| - timeout: 0, | |
| - readyState: n.UNSENT, | |
| - withCredentials: !1, | |
| - status: 0, | |
| - statusText: "", | |
| - responseType: "", | |
| - responseXML: null, | |
| - responseText: null, | |
| - response: null | |
| - }, | |
| - B = !0, | |
| - C = {}, | |
| - D = null, | |
| - E = null, | |
| - F = !1, | |
| - G = !1, | |
| - H = !1, | |
| - I = !1, | |
| - J = !1, | |
| - K = !1, | |
| - L = null, | |
| - M = null, | |
| - N = {}, | |
| - O = ""; | |
| - a.extend(this, A, { | |
| - uid: a.guid("uid_"), | |
| - upload: new m, | |
| - open: function(f, g, h, i, j) { | |
| - var k; | |
| - if (!f || !g) throw new b.DOMException(b.DOMException.SYNTAX_ERR); | |
| - if (/[\u0100-\uffff]/.test(f) || d.utf8_encode(f) !== f) throw new b.DOMException(b.DOMException.SYNTAX_ERR); | |
| - if (~a.inArray(f.toUpperCase(), ["CONNECT", "DELETE", "GET", "HEAD", "OPTIONS", "POST", "PUT", "TRACE", "TRACK"]) && (s = f.toUpperCase()), ~a.inArray(s, ["CONNECT", "TRACE", "TRACK"])) throw new b.DOMException(b.DOMException.SECURITY_ERR); | |
| - if (g = d.utf8_encode(g), k = e.parseUrl(g), K = e.hasSameOrigin(k), r = e.resolveUrl(g), (i || j) && !K) throw new b.DOMException(b.DOMException.INVALID_ACCESS_ERR); | |
| - if (t = i || k.user, u = j || k.pass, B = h || !0, B === !1 && (c("timeout") || c("withCredentials") || "" !== c("responseType"))) throw new b.DOMException(b.DOMException.INVALID_ACCESS_ERR); | |
| - F = !B, G = !1, C = {}, q.call(this), c("readyState", n.OPENED), this.dispatchEvent("readystatechange") | |
| - }, | |
| - setRequestHeader: function(e, f) { | |
| - var g = ["accept-charset", "accept-encoding", "access-control-request-headers", "access-control-request-method", "connection", "content-length", "cookie", "cookie2", "content-transfer-encoding", "date", "expect", "host", "keep-alive", "origin", "referer", "te", "trailer", "transfer-encoding", "upgrade", "user-agent", "via"]; | |
| - if (c("readyState") !== n.OPENED || G) throw new b.DOMException(b.DOMException.INVALID_STATE_ERR); | |
| - if (/[\u0100-\uffff]/.test(e) || d.utf8_encode(e) !== e) throw new b.DOMException(b.DOMException.SYNTAX_ERR); | |
| - return e = a.trim(e).toLowerCase(), !~a.inArray(e, g) && !/^(proxy\-|sec\-)/.test(e) && (C[e] ? C[e] += ", " + f : C[e] = f, !0) | |
| - }, | |
| - getAllResponseHeaders: function() { | |
| - return O || "" | |
| - }, | |
| - getResponseHeader: function(b) { | |
| - return b = b.toLowerCase(), J || ~a.inArray(b, ["set-cookie", "set-cookie2"]) ? null : O && "" !== O && (y || (y = {}, a.each(O.split(/\r\n/), function(b) { | |
| - var c = b.split(/:\s+/); | |
| - 2 === c.length && (c[0] = a.trim(c[0]), y[c[0].toLowerCase()] = { | |
| - header: c[0], | |
| - value: a.trim(c[1]) | |
| - }) | |
| - })), y.hasOwnProperty(b)) ? y[b].header + ": " + y[b].value : null | |
| - }, | |
| - overrideMimeType: function(d) { | |
| - var e, f; | |
| - if (~a.inArray(c("readyState"), [n.LOADING, n.DONE])) throw new b.DOMException(b.DOMException.INVALID_STATE_ERR); | |
| - if (d = a.trim(d.toLowerCase()), /;/.test(d) && (e = d.match(/^([^;]+)(?:;\scharset\=)?(.*)$/)) && (d = e[1], e[2] && (f = e[2])), !l.mimes[d]) throw new b.DOMException(b.DOMException.SYNTAX_ERR); | |
| - L = d, M = f | |
| - }, | |
| - send: function(c, e) { | |
| - if (N = "string" === a.typeOf(e) ? { | |
| - ruid: e | |
| - } : e ? e : {}, this.readyState !== n.OPENED || G) throw new b.DOMException(b.DOMException.INVALID_STATE_ERR); | |
| - if (c instanceof h) N.ruid = c.ruid, E = c.type || "application/octet-stream"; | |
| - else if (c instanceof j) { | |
| - if (c.hasBlob()) { | |
| - var f = c.getBlob(); | |
| - N.ruid = f.ruid, E = f.type || "application/octet-stream" | |
| - } | |
| - } else "string" == typeof c && (D = "UTF-8", E = "text/plain;charset=UTF-8", c = d.utf8_encode(c)); | |
| - this.withCredentials || (this.withCredentials = N.required_caps && N.required_caps.send_browser_cookies && !K), H = !F && this.upload.hasEventListener(), J = !1, I = !c, F || (G = !0), i.call(this, c) | |
| - }, | |
| - abort: function() { | |
| - if (J = !0, F = !1, ~a.inArray(c("readyState"), [n.UNSENT, n.OPENED, n.DONE])) c("readyState", n.UNSENT); | |
| - else { | |
| - if (c("readyState", n.DONE), G = !1, !x) throw new b.DOMException(b.DOMException.INVALID_STATE_ERR); | |
| - x.getRuntime().exec.call(x, "XMLHttpRequest", "abort", I), I = !0 | |
| + } | |
| + return d.prototype = c.instance, d | |
| + }), d("moxie/file/FileReaderSync", ["moxie/core/utils/Basic", "moxie/runtime/RuntimeClient", "moxie/core/utils/Encode"], function(a, b, c) { | |
| + return function() { | |
| + function d(a, b) { | |
| + if (!b.isDetached()) { | |
| + var d = this.connectRuntime(b.ruid).exec.call(this, "FileReaderSync", "read", a, b); | |
| + return this.disconnectRuntime(), d | |
| + } | |
| + var e = b.getSource(); | |
| + switch (a) { | |
| + case "readAsBinaryString": | |
| + return e; | |
| + case "readAsDataURL": | |
| + return "data:" + b.type + ";base64," + c.btoa(e); | |
| + case "readAsText": | |
| + for (var f = "", g = 0, h = e.length; g < h; g++) f += String.fromCharCode(e[g]); | |
| + return f | |
| } | |
| - }, | |
| - destroy: function() { | |
| - x && ("function" === a.typeOf(x.destroy) && x.destroy(), x = null), this.unbindAll(), this.upload && (this.upload.unbindAll(), this.upload = null) | |
| } | |
| - }), this.handleEventProps(p.concat(["readystatechange"])), this.upload.handleEventProps(p) | |
| - } | |
| - var o = { | |
| - 100: "Continue", | |
| - 101: "Switching Protocols", | |
| - 102: "Processing", | |
| - 200: "OK", | |
| - 201: "Created", | |
| - 202: "Accepted", | |
| - 203: "Non-Authoritative Information", | |
| - 204: "No Content", | |
| - 205: "Reset Content", | |
| - 206: "Partial Content", | |
| - 207: "Multi-Status", | |
| - 226: "IM Used", | |
| - 300: "Multiple Choices", | |
| - 301: "Moved Permanently", | |
| - 302: "Found", | |
| - 303: "See Other", | |
| - 304: "Not Modified", | |
| - 305: "Use Proxy", | |
| - 306: "Reserved", | |
| - 307: "Temporary Redirect", | |
| - 400: "Bad Request", | |
| - 401: "Unauthorized", | |
| - 402: "Payment Required", | |
| - 403: "Forbidden", | |
| - 404: "Not Found", | |
| - 405: "Method Not Allowed", | |
| - 406: "Not Acceptable", | |
| - 407: "Proxy Authentication Required", | |
| - 408: "Request Timeout", | |
| - 409: "Conflict", | |
| - 410: "Gone", | |
| - 411: "Length Required", | |
| - 412: "Precondition Failed", | |
| - 413: "Request Entity Too Large", | |
| - 414: "Request-URI Too Long", | |
| - 415: "Unsupported Media Type", | |
| - 416: "Requested Range Not Satisfiable", | |
| - 417: "Expectation Failed", | |
| - 422: "Unprocessable Entity", | |
| - 423: "Locked", | |
| - 424: "Failed Dependency", | |
| - 426: "Upgrade Required", | |
| - 500: "Internal Server Error", | |
| - 501: "Not Implemented", | |
| - 502: "Bad Gateway", | |
| - 503: "Service Unavailable", | |
| - 504: "Gateway Timeout", | |
| - 505: "HTTP Version Not Supported", | |
| - 506: "Variant Also Negotiates", | |
| - 507: "Insufficient Storage", | |
| - 510: "Not Extended" | |
| - }; | |
| - m.prototype = c.instance; | |
| - var p = ["loadstart", "progress", "abort", "error", "load", "timeout", "loadend"]; | |
| - return n.UNSENT = 0, n.OPENED = 1, n.HEADERS_RECEIVED = 2, n.LOADING = 3, n.DONE = 4, n.prototype = c.instance, n | |
| - }), d("moxie/runtime/Transporter", ["moxie/core/utils/Basic", "moxie/core/utils/Encode", "moxie/runtime/RuntimeClient", "moxie/core/EventTarget"], function(a, b, c, d) { | |
| - function e() { | |
| - function d() { | |
| - k = l = 0, j = this.result = null | |
| - } | |
| - | |
| - function f(b, c) { | |
| - var d = this; | |
| - i = c, d.bind("TransportingProgress", function(b) { | |
| - l = b.loaded, l < k && a.inArray(d.state, [e.IDLE, e.DONE]) === -1 && g.call(d) | |
| - }, 999), d.bind("TransportingComplete", function() { | |
| - l = k, d.state = e.DONE, j = null, d.result = i.exec.call(d, "Transporter", "getAsBlob", b || "") | |
| - }, 999), d.state = e.BUSY, d.trigger("TransportingStarted"), g.call(d) | |
| + b.call(this), a.extend(this, { | |
| + uid: a.guid("uid_"), | |
| + readAsBinaryString: function(a) { | |
| + return d.call(this, "readAsBinaryString", a) | |
| + }, | |
| + readAsDataURL: function(a) { | |
| + return d.call(this, "readAsDataURL", a) | |
| + }, | |
| + readAsText: function(a) { | |
| + return d.call(this, "readAsText", a) | |
| + } | |
| + }) | |
| } | |
| - | |
| - function g() { | |
| - var a, c = this, | |
| - d = k - l; | |
| - m > d && (m = d), a = b.btoa(j.substr(l, m)), i.exec.call(c, "Transporter", "receive", a, k) | |
| - } | |
| - var h, i, j, k, l, m; | |
| - c.call(this), a.extend(this, { | |
| - uid: a.guid("uid_"), | |
| - state: e.IDLE, | |
| - result: null, | |
| - transport: function(b, c, e) { | |
| - var g = this; | |
| - if (e = a.extend({ | |
| - chunk_size: 204798 | |
| - }, e), (h = e.chunk_size % 3) && (e.chunk_size += 3 - h), m = e.chunk_size, d.call(this), j = b, k = b.length, "string" === a.typeOf(e) || e.ruid) f.call(g, c, this.connectRuntime(e)); | |
| - else { | |
| - var i = function(a, b) { | |
| - g.unbind("RuntimeInit", i), f.call(g, c, b) | |
| - }; | |
| - this.bind("RuntimeInit", i), this.connectRuntime(e) | |
| + }), d("moxie/xhr/FormData", ["moxie/core/Exceptions", "moxie/core/utils/Basic", "moxie/file/Blob"], function(a, b, c) { | |
| + function d() { | |
| + var a, d = []; | |
| + b.extend(this, { | |
| + append: function(e, f) { | |
| + var g = this, | |
| + h = b.typeOf(f); | |
| + f instanceof c ? a = { | |
| + name: e, | |
| + value: f | |
| + } : "array" === h ? (e += "[]", b.each(f, function(a) { | |
| + g.append(e, a) | |
| + })) : "object" === h ? b.each(f, function(a, b) { | |
| + g.append(e + "[" + b + "]", a) | |
| + }) : "null" === h || "undefined" === h || "number" === h && isNaN(f) ? g.append(e, "false") : d.push({ | |
| + name: e, | |
| + value: f.toString() | |
| + }) | |
| + }, | |
| + hasBlob: function() { | |
| + return !!this.getBlob() | |
| + }, | |
| + getBlob: function() { | |
| + return a && a.value || null | |
| + }, | |
| + getBlobName: function() { | |
| + return a && a.name || null | |
| + }, | |
| + each: function(c) { | |
| + b.each(d, function(a) { | |
| + c(a.value, a.name) | |
| + }), a && c(a.value, a.name) | |
| + }, | |
| + destroy: function() { | |
| + a = null, d = [] | |
| } | |
| - }, | |
| - abort: function() { | |
| - var a = this; | |
| - a.state = e.IDLE, i && (i.exec.call(a, "Transporter", "clear"), a.trigger("TransportingAborted")), d.call(a) | |
| - }, | |
| - destroy: function() { | |
| - this.unbindAll(), i = null, this.disconnectRuntime(), d.call(this) | |
| - } | |
| - }) | |
| - } | |
| - return e.IDLE = 0, e.BUSY = 1, e.DONE = 2, e.prototype = d.instance, e | |
| - }), d("moxie/image/Image", ["moxie/core/utils/Basic", "moxie/core/utils/Dom", "moxie/core/Exceptions", "moxie/file/FileReaderSync", "moxie/xhr/XMLHttpRequest", "moxie/runtime/Runtime", "moxie/runtime/RuntimeClient", "moxie/runtime/Transporter", "moxie/core/utils/Env", "moxie/core/EventTarget", "moxie/file/Blob", "moxie/file/File", "moxie/core/utils/Encode"], function(a, b, c, d, e, f, g, h, i, j, k, l, m) { | |
| - function n() { | |
| - function d(a) { | |
| - a || (a = this.exec("Image", "getInfo")), this.size = a.size, this.width = a.width, this.height = a.height, this.type = a.type, this.meta = a.meta, "" === this.name && (this.name = a.name) | |
| + }) | |
| } | |
| - | |
| - function j(b) { | |
| - var d = a.typeOf(b); | |
| - try { | |
| - if (b instanceof n) { | |
| - if (!b.size) throw new c.DOMException(c.DOMException.INVALID_STATE_ERR); | |
| - p.apply(this, arguments) | |
| - } else if (b instanceof k) { | |
| - if (!~a.inArray(b.type, ["image/jpeg", "image/png"])) throw new c.ImageError(c.ImageError.WRONG_FORMAT); | |
| - q.apply(this, arguments) | |
| - } else if (a.inArray(d, ["blob", "file"]) !== -1) j.call(this, new l(null, b), arguments[1]); | |
| - else if ("string" === d) "data:" === b.substr(0, 5) ? j.call(this, new k(null, { | |
| - data: b | |
| - }), arguments[1]) : r.apply(this, arguments); | |
| - else { | |
| - if ("node" !== d || "img" !== b.nodeName.toLowerCase()) throw new c.DOMException(c.DOMException.TYPE_MISMATCH_ERR); | |
| - j.call(this, b.src, arguments[1]) | |
| + return d | |
| + }), d("moxie/xhr/XMLHttpRequest", ["moxie/core/utils/Basic", "moxie/core/Exceptions", "moxie/core/EventTarget", "moxie/core/utils/Encode", "moxie/core/utils/Url", "moxie/runtime/Runtime", "moxie/runtime/RuntimeTarget", "moxie/file/Blob", "moxie/file/FileReaderSync", "moxie/xhr/FormData", "moxie/core/utils/Env", "moxie/core/utils/Mime"], function(a, b, c, d, e, f, g, h, i, j, k, l) { | |
| + function m() { | |
| + this.uid = a.guid("uid_") | |
| + } | |
| + | |
| + function n() { | |
| + function c(a, b) { | |
| + if (A.hasOwnProperty(a)) return 1 === arguments.length ? k.can("define_property") ? A[a] : z[a] : void(k.can("define_property") ? A[a] = b : z[a] = b) | |
| + } | |
| + | |
| + function i(b) { | |
| + function d() { | |
| + x && (x.destroy(), x = null), h.dispatchEvent("loadend"), h = null | |
| + } | |
| + | |
| + function e(e) { | |
| + x.bind("LoadStart", function(a) { | |
| + c("readyState", n.LOADING), h.dispatchEvent("readystatechange"), h.dispatchEvent(a), H && h.upload.dispatchEvent(a) | |
| + }), x.bind("Progress", function(a) { | |
| + c("readyState") !== n.LOADING && (c("readyState", n.LOADING), h.dispatchEvent("readystatechange")), h.dispatchEvent(a) | |
| + }), x.bind("UploadProgress", function(a) { | |
| + H && h.upload.dispatchEvent({ | |
| + type: "progress", | |
| + lengthComputable: !1, | |
| + total: a.total, | |
| + loaded: a.loaded | |
| + }) | |
| + }), x.bind("Load", function(b) { | |
| + c("readyState", n.DONE), c("status", Number(e.exec.call(x, "XMLHttpRequest", "getStatus") || 0)), c("statusText", o[c("status")] || ""), c("response", e.exec.call(x, "XMLHttpRequest", "getResponse", c("responseType"))), ~a.inArray(c("responseType"), ["text", ""]) ? c("responseText", c("response")) : "document" === c("responseType") && c("responseXML", c("response")), O = e.exec.call(x, "XMLHttpRequest", "getAllResponseHeaders"), h.dispatchEvent("readystatechange"), c("status") > 0 ? (H && h.upload.dispatchEvent(b), h.dispatchEvent(b)) : (J = !0, h.dispatchEvent("error")), d() | |
| + }), x.bind("Abort", function(a) { | |
| + h.dispatchEvent(a), d() | |
| + }), x.bind("Error", function(a) { | |
| + J = !0, c("readyState", n.DONE), h.dispatchEvent("readystatechange"), I = !0, h.dispatchEvent(a), d() | |
| + }), e.exec.call(x, "XMLHttpRequest", "send", { | |
| + url: r, | |
| + method: s, | |
| + async: B, | |
| + user: t, | |
| + password: u, | |
| + headers: C, | |
| + mimeType: E, | |
| + encoding: D, | |
| + responseType: h.responseType, | |
| + withCredentials: h.withCredentials, | |
| + options: N | |
| + }, b) | |
| + } | |
| + var h = this; | |
| + v = (new Date).getTime(), x = new g, "string" == typeof N.required_caps && (N.required_caps = f.parseCaps(N.required_caps)), N.required_caps = a.extend({}, N.required_caps, { | |
| + return_response_type: h.responseType | |
| + }), b instanceof j && (N.required_caps.send_multipart = !0), a.isEmptyObj(C) || (N.required_caps.send_custom_headers = !0), K || (N.required_caps.do_cors = !0), N.ruid ? e(x.connectRuntime(N)) : (x.bind("RuntimeInit", function(a, b) { | |
| + e(b) | |
| + }), x.bind("RuntimeError", function(a, b) { | |
| + h.dispatchEvent("RuntimeError", b) | |
| + }), x.connectRuntime(N)) | |
| + } | |
| + | |
| + function q() { | |
| + c("responseText", ""), c("responseXML", null), c("response", null), c("status", 0), c("statusText", ""), v = w = null | |
| + } | |
| + var r, s, t, u, v, w, x, y, z = this, | |
| + A = { | |
| + timeout: 0, | |
| + readyState: n.UNSENT, | |
| + withCredentials: !1, | |
| + status: 0, | |
| + statusText: "", | |
| + responseType: "", | |
| + responseXML: null, | |
| + responseText: null, | |
| + response: null | |
| + }, | |
| + B = !0, | |
| + C = {}, | |
| + D = null, | |
| + E = null, | |
| + F = !1, | |
| + G = !1, | |
| + H = !1, | |
| + I = !1, | |
| + J = !1, | |
| + K = !1, | |
| + L = null, | |
| + M = null, | |
| + N = {}, | |
| + O = ""; | |
| + a.extend(this, A, { | |
| + uid: a.guid("uid_"), | |
| + upload: new m, | |
| + open: function(f, g, h, i, j) { | |
| + var k; | |
| + if (!f || !g) throw new b.DOMException(b.DOMException.SYNTAX_ERR); | |
| + if (/[\u0100-\uffff]/.test(f) || d.utf8_encode(f) !== f) throw new b.DOMException(b.DOMException.SYNTAX_ERR); | |
| + if (~a.inArray(f.toUpperCase(), ["CONNECT", "DELETE", "GET", "HEAD", "OPTIONS", "POST", "PUT", "TRACE", "TRACK"]) && (s = f.toUpperCase()), ~a.inArray(s, ["CONNECT", "TRACE", "TRACK"])) throw new b.DOMException(b.DOMException.SECURITY_ERR); | |
| + if (g = d.utf8_encode(g), k = e.parseUrl(g), K = e.hasSameOrigin(k), r = e.resolveUrl(g), (i || j) && !K) throw new b.DOMException(b.DOMException.INVALID_ACCESS_ERR); | |
| + if (t = i || k.user, u = j || k.pass, !1 === (B = h || !0) && (c("timeout") || c("withCredentials") || "" !== c("responseType"))) throw new b.DOMException(b.DOMException.INVALID_ACCESS_ERR); | |
| + F = !B, G = !1, C = {}, q.call(this), c("readyState", n.OPENED), this.dispatchEvent("readystatechange") | |
| + }, | |
| + setRequestHeader: function(e, f) { | |
| + var g = ["accept-charset", "accept-encoding", "access-control-request-headers", "access-control-request-method", "connection", "content-length", "cookie", "cookie2", "content-transfer-encoding", "date", "expect", "host", "keep-alive", "origin", "referer", "te", "trailer", "transfer-encoding", "upgrade", "user-agent", "via"]; | |
| + if (c("readyState") !== n.OPENED || G) throw new b.DOMException(b.DOMException.INVALID_STATE_ERR); | |
| + if (/[\u0100-\uffff]/.test(e) || d.utf8_encode(e) !== e) throw new b.DOMException(b.DOMException.SYNTAX_ERR); | |
| + return e = a.trim(e).toLowerCase(), !~a.inArray(e, g) && !/^(proxy\-|sec\-)/.test(e) && (C[e] ? C[e] += ", " + f : C[e] = f, !0) | |
| + }, | |
| + getAllResponseHeaders: function() { | |
| + return O || "" | |
| + }, | |
| + getResponseHeader: function(b) { | |
| + return b = b.toLowerCase(), J || ~a.inArray(b, ["set-cookie", "set-cookie2"]) ? null : O && "" !== O && (y || (y = {}, a.each(O.split(/\r\n/), function(b) { | |
| + var c = b.split(/:\s+/); | |
| + 2 === c.length && (c[0] = a.trim(c[0]), y[c[0].toLowerCase()] = { | |
| + header: c[0], | |
| + value: a.trim(c[1]) | |
| + }) | |
| + })), y.hasOwnProperty(b)) ? y[b].header + ": " + y[b].value : null | |
| + }, | |
| + overrideMimeType: function(d) { | |
| + var e, f; | |
| + if (~a.inArray(c("readyState"), [n.LOADING, n.DONE])) throw new b.DOMException(b.DOMException.INVALID_STATE_ERR); | |
| + if (d = a.trim(d.toLowerCase()), /;/.test(d) && (e = d.match(/^([^;]+)(?:;\scharset\=)?(.*)$/)) && (d = e[1], e[2] && (f = e[2])), !l.mimes[d]) throw new b.DOMException(b.DOMException.SYNTAX_ERR); | |
| + L = d, M = f | |
| + }, | |
| + send: function(c, e) { | |
| + if (N = "string" === a.typeOf(e) ? { | |
| + ruid: e | |
| + } : e || {}, this.readyState !== n.OPENED || G) throw new b.DOMException(b.DOMException.INVALID_STATE_ERR); | |
| + if (c instanceof h) N.ruid = c.ruid, E = c.type || "application/octet-stream"; | |
| + else if (c instanceof j) { | |
| + if (c.hasBlob()) { | |
| + var f = c.getBlob(); | |
| + N.ruid = f.ruid, E = f.type || "application/octet-stream" | |
| + } | |
| + } else "string" == typeof c && (D = "UTF-8", E = "text/plain;charset=UTF-8", c = d.utf8_encode(c)); | |
| + this.withCredentials || (this.withCredentials = N.required_caps && N.required_caps.send_browser_cookies && !K), H = !F && this.upload.hasEventListener(), J = !1, I = !c, F || (G = !0), i.call(this, c) | |
| + }, | |
| + abort: function() { | |
| + if (J = !0, F = !1, ~a.inArray(c("readyState"), [n.UNSENT, n.OPENED, n.DONE])) c("readyState", n.UNSENT); | |
| + else { | |
| + if (c("readyState", n.DONE), G = !1, !x) throw new b.DOMException(b.DOMException.INVALID_STATE_ERR); | |
| + x.getRuntime().exec.call(x, "XMLHttpRequest", "abort", I), I = !0 | |
| + } | |
| + }, | |
| + destroy: function() { | |
| + x && ("function" === a.typeOf(x.destroy) && x.destroy(), x = null), this.unbindAll(), this.upload && (this.upload.unbindAll(), this.upload = null) | |
| } | |
| - } catch (e) { | |
| - this.trigger("error", e.code) | |
| - } | |
| + }), this.handleEventProps(p.concat(["readystatechange"])), this.upload.handleEventProps(p) | |
| } | |
| + var o = { | |
| + 100: "Continue", | |
| + 101: "Switching Protocols", | |
| + 102: "Processing", | |
| + 200: "OK", | |
| + 201: "Created", | |
| + 202: "Accepted", | |
| + 203: "Non-Authoritative Information", | |
| + 204: "No Content", | |
| + 205: "Reset Content", | |
| + 206: "Partial Content", | |
| + 207: "Multi-Status", | |
| + 226: "IM Used", | |
| + 300: "Multiple Choices", | |
| + 301: "Moved Permanently", | |
| + 302: "Found", | |
| + 303: "See Other", | |
| + 304: "Not Modified", | |
| + 305: "Use Proxy", | |
| + 306: "Reserved", | |
| + 307: "Temporary Redirect", | |
| + 400: "Bad Request", | |
| + 401: "Unauthorized", | |
| + 402: "Payment Required", | |
| + 403: "Forbidden", | |
| + 404: "Not Found", | |
| + 405: "Method Not Allowed", | |
| + 406: "Not Acceptable", | |
| + 407: "Proxy Authentication Required", | |
| + 408: "Request Timeout", | |
| + 409: "Conflict", | |
| + 410: "Gone", | |
| + 411: "Length Required", | |
| + 412: "Precondition Failed", | |
| + 413: "Request Entity Too Large", | |
| + 414: "Request-URI Too Long", | |
| + 415: "Unsupported Media Type", | |
| + 416: "Requested Range Not Satisfiable", | |
| + 417: "Expectation Failed", | |
| + 422: "Unprocessable Entity", | |
| + 423: "Locked", | |
| + 424: "Failed Dependency", | |
| + 426: "Upgrade Required", | |
| + 500: "Internal Server Error", | |
| + 501: "Not Implemented", | |
| + 502: "Bad Gateway", | |
| + 503: "Service Unavailable", | |
| + 504: "Gateway Timeout", | |
| + 505: "HTTP Version Not Supported", | |
| + 506: "Variant Also Negotiates", | |
| + 507: "Insufficient Storage", | |
| + 510: "Not Extended" | |
| + }; | |
| + m.prototype = c.instance; | |
| + var p = ["loadstart", "progress", "abort", "error", "load", "timeout", "loadend"]; | |
| + return n.UNSENT = 0, n.OPENED = 1, n.HEADERS_RECEIVED = 2, n.LOADING = 3, n.DONE = 4, n.prototype = c.instance, n | |
| + }), d("moxie/runtime/Transporter", ["moxie/core/utils/Basic", "moxie/core/utils/Encode", "moxie/runtime/RuntimeClient", "moxie/core/EventTarget"], function(a, b, c, d) { | |
| + function e() { | |
| + function d() { | |
| + k = l = 0, j = this.result = null | |
| + } | |
| - function p(b, c) { | |
| - var d = this.connectRuntime(b.ruid); | |
| - this.ruid = d.uid, d.exec.call(this, "Image", "loadFromImage", b, "undefined" === a.typeOf(c) || c) | |
| + function f(b, c) { | |
| + var d = this; | |
| + i = c, d.bind("TransportingProgress", function(b) { | |
| + (l = b.loaded) < k && -1 === a.inArray(d.state, [e.IDLE, e.DONE]) && g.call(d) | |
| + }, 999), d.bind("TransportingComplete", function() { | |
| + l = k, d.state = e.DONE, j = null, d.result = i.exec.call(d, "Transporter", "getAsBlob", b || "") | |
| + }, 999), d.state = e.BUSY, d.trigger("TransportingStarted"), g.call(d) | |
| + } | |
| + | |
| + function g() { | |
| + var a, c = this, | |
| + d = k - l; | |
| + m > d && (m = d), a = b.btoa(j.substr(l, m)), i.exec.call(c, "Transporter", "receive", a, k) | |
| + } | |
| + var h, i, j, k, l, m; | |
| + c.call(this), a.extend(this, { | |
| + uid: a.guid("uid_"), | |
| + state: e.IDLE, | |
| + result: null, | |
| + transport: function(b, c, e) { | |
| + var g = this; | |
| + if (e = a.extend({ | |
| + chunk_size: 204798 | |
| + }, e), (h = e.chunk_size % 3) && (e.chunk_size += 3 - h), m = e.chunk_size, d.call(this), j = b, k = b.length, "string" === a.typeOf(e) || e.ruid) f.call(g, c, this.connectRuntime(e)); | |
| + else { | |
| + var i = function(a, b) { | |
| + g.unbind("RuntimeInit", i), f.call(g, c, b) | |
| + }; | |
| + this.bind("RuntimeInit", i), this.connectRuntime(e) | |
| + } | |
| + }, | |
| + abort: function() { | |
| + var a = this; | |
| + a.state = e.IDLE, i && (i.exec.call(a, "Transporter", "clear"), a.trigger("TransportingAborted")), d.call(a) | |
| + }, | |
| + destroy: function() { | |
| + this.unbindAll(), i = null, this.disconnectRuntime(), d.call(this) | |
| + } | |
| + }) | |
| } | |
| - | |
| - function q(b, c) { | |
| + return e.IDLE = 0, e.BUSY = 1, e.DONE = 2, e.prototype = d.instance, e | |
| + }), d("moxie/image/Image", ["moxie/core/utils/Basic", "moxie/core/utils/Dom", "moxie/core/Exceptions", "moxie/file/FileReaderSync", "moxie/xhr/XMLHttpRequest", "moxie/runtime/Runtime", "moxie/runtime/RuntimeClient", "moxie/runtime/Transporter", "moxie/core/utils/Env", "moxie/core/EventTarget", "moxie/file/Blob", "moxie/file/File", "moxie/core/utils/Encode"], function(a, b, c, d, e, f, g, h, i, j, k, l, m) { | |
| + function n() { | |
| function d(a) { | |
| - e.ruid = a.uid, a.exec.call(e, "Image", "loadFromBlob", b) | |
| + a || (a = this.exec("Image", "getInfo")), this.size = a.size, this.width = a.width, this.height = a.height, this.type = a.type, this.meta = a.meta, "" === this.name && (this.name = a.name) | |
| } | |
| - var e = this; | |
| - e.name = b.name || "", b.isDetached() ? (this.bind("RuntimeInit", function(a, b) { | |
| - d(b) | |
| - }), c && "string" == typeof c.required_caps && (c.required_caps = f.parseCaps(c.required_caps)), this.connectRuntime(a.extend({ | |
| - required_caps: { | |
| - access_image_binary: !0, | |
| - resize_image: !0 | |
| - } | |
| - }, c))) : d(this.connectRuntime(b.ruid)) | |
| - } | |
| - function r(a, b) { | |
| - var c, d = this; | |
| - c = new e, c.open("get", a), c.responseType = "blob", c.onprogress = function(a) { | |
| - d.trigger(a) | |
| - }, c.onload = function() { | |
| - q.call(d, c.response, !0) | |
| - }, c.onerror = function(a) { | |
| - d.trigger(a) | |
| - }, c.onloadend = function() { | |
| - c.destroy() | |
| - }, c.bind("RuntimeError", function(a, b) { | |
| - d.trigger("RuntimeError", b) | |
| - }), c.send(null, b) | |
| - } | |
| - g.call(this), a.extend(this, { | |
| - uid: a.guid("uid_"), | |
| - ruid: null, | |
| - name: "", | |
| - size: 0, | |
| - width: 0, | |
| - height: 0, | |
| - type: "", | |
| - meta: {}, | |
| - clone: function() { | |
| - this.load.apply(this, arguments) | |
| - }, | |
| - load: function() { | |
| - j.apply(this, arguments) | |
| - }, | |
| - downsize: function(b) { | |
| - var d = { | |
| - width: this.width, | |
| - height: this.height, | |
| - type: this.type || "image/jpeg", | |
| - quality: 90, | |
| - crop: !1, | |
| - preserveHeaders: !0, | |
| - resample: !1 | |
| - }; | |
| - b = "object" == typeof b ? a.extend(d, b) : a.extend(d, { | |
| - width: arguments[0], | |
| - height: arguments[1], | |
| - crop: arguments[2], | |
| - preserveHeaders: arguments[3] | |
| - }); | |
| + function j(b) { | |
| + var d = a.typeOf(b); | |
| try { | |
| - if (!this.size) throw new c.DOMException(c.DOMException.INVALID_STATE_ERR); | |
| - if (this.width > n.MAX_RESIZE_WIDTH || this.height > n.MAX_RESIZE_HEIGHT) throw new c.ImageError(c.ImageError.MAX_RESOLUTION_ERR); | |
| - this.exec("Image", "downsize", b.width, b.height, b.crop, b.preserveHeaders) | |
| + if (b instanceof n) { | |
| + if (!b.size) throw new c.DOMException(c.DOMException.INVALID_STATE_ERR); | |
| + p.apply(this, arguments) | |
| + } else if (b instanceof k) { | |
| + if (!~a.inArray(b.type, ["image/jpeg", "image/png"])) throw new c.ImageError(c.ImageError.WRONG_FORMAT); | |
| + q.apply(this, arguments) | |
| + } else if (-1 !== a.inArray(d, ["blob", "file"])) j.call(this, new l(null, b), arguments[1]); | |
| + else if ("string" === d) "data:" === b.substr(0, 5) ? j.call(this, new k(null, { | |
| + data: b | |
| + }), arguments[1]) : r.apply(this, arguments); | |
| + else { | |
| + if ("node" !== d || "img" !== b.nodeName.toLowerCase()) throw new c.DOMException(c.DOMException.TYPE_MISMATCH_ERR); | |
| + j.call(this, b.src, arguments[1]) | |
| + } | |
| } catch (e) { | |
| this.trigger("error", e.code) | |
| } | |
| - }, | |
| - crop: function(a, b, c) { | |
| - this.downsize(a, b, !0, c) | |
| - }, | |
| - getAsCanvas: function() { | |
| - if (!i.can("create_canvas")) throw new c.RuntimeError(c.RuntimeError.NOT_SUPPORTED_ERR); | |
| - var a = this.connectRuntime(this.ruid); | |
| - return a.exec.call(this, "Image", "getAsCanvas") | |
| - }, | |
| - getAsBlob: function(a, b) { | |
| - if (!this.size) throw new c.DOMException(c.DOMException.INVALID_STATE_ERR); | |
| - return this.exec("Image", "getAsBlob", a || "image/jpeg", b || 90) | |
| - }, | |
| - getAsDataURL: function(a, b) { | |
| - if (!this.size) throw new c.DOMException(c.DOMException.INVALID_STATE_ERR); | |
| - return this.exec("Image", "getAsDataURL", a || "image/jpeg", b || 90) | |
| - }, | |
| - getAsBinaryString: function(a, b) { | |
| - var c = this.getAsDataURL(a, b); | |
| - return m.atob(c.substring(c.indexOf("base64,") + 7)) | |
| - }, | |
| - embed: function(d, e) { | |
| - function f(b, e) { | |
| - var f = this; | |
| - if (i.can("create_canvas")) { | |
| - var k = f.getAsCanvas(); | |
| - if (k) return d.appendChild(k), k = null, f.destroy(), void j.trigger("embedded") | |
| - } | |
| - var l = f.getAsDataURL(b, e); | |
| - if (!l) throw new c.ImageError(c.ImageError.WRONG_FORMAT); | |
| - if (i.can("use_data_uri_of", l.length)) d.innerHTML = '<img src="' + l + '" width="' + f.width + '" height="' + f.height + '" />', f.destroy(), j.trigger("embedded"); | |
| - else { | |
| - var n = new h; | |
| - n.bind("TransportingComplete", function() { | |
| - g = j.connectRuntime(this.result.ruid), j.bind("Embedded", function() { | |
| - a.extend(g.getShimContainer().style, { | |
| - top: "0px", | |
| - left: "0px", | |
| - width: f.width + "px", | |
| - height: f.height + "px" | |
| - }), g = null | |
| - }, 999), g.exec.call(j, "ImageView", "display", this.result.uid, width, height), f.destroy() | |
| - }), n.transport(m.atob(l.substring(l.indexOf("base64,") + 7)), b, { | |
| - required_caps: { | |
| - display_media: !0 | |
| - }, | |
| - runtime_order: "flash,silverlight", | |
| - container: d | |
| - }) | |
| + } | |
| + | |
| + function p(b, c) { | |
| + var d = this.connectRuntime(b.ruid); | |
| + this.ruid = d.uid, d.exec.call(this, "Image", "loadFromImage", b, "undefined" === a.typeOf(c) || c) | |
| + } | |
| + | |
| + function q(b, c) { | |
| + function d(a) { | |
| + e.ruid = a.uid, a.exec.call(e, "Image", "loadFromBlob", b) | |
| + } | |
| + var e = this; | |
| + e.name = b.name || "", b.isDetached() ? (this.bind("RuntimeInit", function(a, b) { | |
| + d(b) | |
| + }), c && "string" == typeof c.required_caps && (c.required_caps = f.parseCaps(c.required_caps)), this.connectRuntime(a.extend({ | |
| + required_caps: { | |
| + access_image_binary: !0, | |
| + resize_image: !0 | |
| + } | |
| + }, c))) : d(this.connectRuntime(b.ruid)) | |
| + } | |
| + | |
| + function r(a, b) { | |
| + var c, d = this; | |
| + c = new e, c.open("get", a), c.responseType = "blob", c.onprogress = function(a) { | |
| + d.trigger(a) | |
| + }, c.onload = function() { | |
| + q.call(d, c.response, !0) | |
| + }, c.onerror = function(a) { | |
| + d.trigger(a) | |
| + }, c.onloadend = function() { | |
| + c.destroy() | |
| + }, c.bind("RuntimeError", function(a, b) { | |
| + d.trigger("RuntimeError", b) | |
| + }), c.send(null, b) | |
| + } | |
| + g.call(this), a.extend(this, { | |
| + uid: a.guid("uid_"), | |
| + ruid: null, | |
| + name: "", | |
| + size: 0, | |
| + width: 0, | |
| + height: 0, | |
| + type: "", | |
| + meta: {}, | |
| + clone: function() { | |
| + this.load.apply(this, arguments) | |
| + }, | |
| + load: function() { | |
| + j.apply(this, arguments) | |
| + }, | |
| + downsize: function(b) { | |
| + var d = { | |
| + width: this.width, | |
| + height: this.height, | |
| + type: this.type || "image/jpeg", | |
| + quality: 90, | |
| + crop: !1, | |
| + preserveHeaders: !0, | |
| + resample: !1 | |
| + }; | |
| + b = "object" == typeof b ? a.extend(d, b) : a.extend(d, { | |
| + width: arguments[0], | |
| + height: arguments[1], | |
| + crop: arguments[2], | |
| + preserveHeaders: arguments[3] | |
| + }); | |
| + try { | |
| + if (!this.size) throw new c.DOMException(c.DOMException.INVALID_STATE_ERR); | |
| + if (this.width > n.MAX_RESIZE_WIDTH || this.height > n.MAX_RESIZE_HEIGHT) throw new c.ImageError(c.ImageError.MAX_RESOLUTION_ERR); | |
| + this.exec("Image", "downsize", b.width, b.height, b.crop, b.preserveHeaders) | |
| + } catch (e) { | |
| + this.trigger("error", e.code) | |
| } | |
| - } | |
| - var g, j = this; | |
| - e = a.extend({ | |
| - width: this.width, | |
| - height: this.height, | |
| - type: this.type || "image/jpeg", | |
| - quality: 90 | |
| - }, e || {}); | |
| - try { | |
| - if (!(d = b.get(d))) throw new c.DOMException(c.DOMException.INVALID_NODE_TYPE_ERR); | |
| - if (!this.size) throw new c.DOMException(c.DOMException.INVALID_STATE_ERR); | |
| - this.width > n.MAX_RESIZE_WIDTH || this.height > n.MAX_RESIZE_HEIGHT; | |
| - var k = new n; | |
| - return k.bind("Resize", function() { | |
| - f.call(this, e.type, e.quality) | |
| - }), k.bind("Load", function() { | |
| - k.downsize(e) | |
| - }), this.meta.thumb && this.meta.thumb.width >= e.width && this.meta.thumb.height >= e.height ? k.load(this.meta.thumb.data) : k.clone(this, !1), k | |
| - } catch (l) { | |
| - this.trigger("error", l.code) | |
| - } | |
| - }, | |
| - destroy: function() { | |
| - this.ruid && (this.getRuntime().exec.call(this, "Image", "destroy"), this.disconnectRuntime()), this.unbindAll() | |
| - } | |
| - }), this.handleEventProps(o), this.bind("Load Resize", function() { | |
| - d.call(this) | |
| - }, 999) | |
| - } | |
| - var o = ["progress", "load", "error", "resize", "embedded"]; | |
| - return n.MAX_RESIZE_WIDTH = 8192, n.MAX_RESIZE_HEIGHT = 8192, n.prototype = j.instance, n | |
| - }), d("moxie/runtime/html5/Runtime", ["moxie/core/utils/Basic", "moxie/core/Exceptions", "moxie/runtime/Runtime", "moxie/core/utils/Env"], function(a, b, c, d) { | |
| - function e(b) { | |
| - var e = this, | |
| - h = c.capTest, | |
| - i = c.capTrue, | |
| - j = a.extend({ | |
| - access_binary: h(window.FileReader || window.File && window.File.getAsDataURL), | |
| - access_image_binary: function() { | |
| - return e.can("access_binary") && !!g.Image | |
| - }, | |
| - display_media: h(d.can("create_canvas") || d.can("use_data_uri_over32kb")), | |
| - do_cors: h(window.XMLHttpRequest && "withCredentials" in new XMLHttpRequest), | |
| - drag_and_drop: h(function() { | |
| - var a = document.createElement("div"); | |
| - return ("draggable" in a || "ondragstart" in a && "ondrop" in a) && ("IE" !== d.browser || d.verComp(d.version, 9, ">")) | |
| - }()), | |
| - filter_by_extension: h(function() { | |
| - return "Chrome" === d.browser && d.verComp(d.version, 28, ">=") || "IE" === d.browser && d.verComp(d.version, 10, ">=") || "Safari" === d.browser && d.verComp(d.version, 7, ">=") | |
| - }()), | |
| - return_response_headers: i, | |
| - return_response_type: function(a) { | |
| - return !("json" !== a || !window.JSON) || d.can("return_response_type", a) | |
| - }, | |
| - return_status_code: i, | |
| - report_upload_progress: h(window.XMLHttpRequest && (new XMLHttpRequest).upload), | |
| - resize_image: function() { | |
| - return e.can("access_binary") && d.can("create_canvas") | |
| - }, | |
| - select_file: function() { | |
| - return d.can("use_fileinput") && window.File | |
| - }, | |
| - select_folder: function() { | |
| - return e.can("select_file") && "Chrome" === d.browser && d.verComp(d.version, 21, ">=") | |
| }, | |
| - select_multiple: function() { | |
| - return e.can("select_file") && !("Safari" === d.browser && "Windows" === d.os) && !("iOS" === d.os && d.verComp(d.osVersion, "7.0.0", ">") && d.verComp(d.osVersion, "8.0.0", "<")) | |
| + crop: function(a, b, c) { | |
| + this.downsize(a, b, !0, c) | |
| }, | |
| - send_binary_string: h(window.XMLHttpRequest && ((new XMLHttpRequest).sendAsBinary || window.Uint8Array && window.ArrayBuffer)), | |
| - send_custom_headers: h(window.XMLHttpRequest), | |
| - send_multipart: function() { | |
| - return !!(window.XMLHttpRequest && (new XMLHttpRequest).upload && window.FormData) || e.can("send_binary_string") | |
| + getAsCanvas: function() { | |
| + if (!i.can("create_canvas")) throw new c.RuntimeError(c.RuntimeError.NOT_SUPPORTED_ERR); | |
| + return this.connectRuntime(this.ruid).exec.call(this, "Image", "getAsCanvas") | |
| }, | |
| - slice_blob: h(window.File && (File.prototype.mozSlice || File.prototype.webkitSlice || File.prototype.slice)), | |
| - stream_upload: function() { | |
| - return e.can("slice_blob") && e.can("send_multipart") | |
| + getAsBlob: function(a, b) { | |
| + if (!this.size) throw new c.DOMException(c.DOMException.INVALID_STATE_ERR); | |
| + return this.exec("Image", "getAsBlob", a || "image/jpeg", b || 90) | |
| }, | |
| - summon_file_dialog: function() { | |
| - return e.can("select_file") && ("Firefox" === d.browser && d.verComp(d.version, 4, ">=") || "Opera" === d.browser && d.verComp(d.version, 12, ">=") || "IE" === d.browser && d.verComp(d.version, 10, ">=") || !!~a.inArray(d.browser, ["Chrome", "Safari"])) | |
| + getAsDataURL: function(a, b) { | |
| + if (!this.size) throw new c.DOMException(c.DOMException.INVALID_STATE_ERR); | |
| + return this.exec("Image", "getAsDataURL", a || "image/jpeg", b || 90) | |
| }, | |
| - upload_filesize: i | |
| - }, arguments[2]); | |
| - c.call(this, b, arguments[1] || f, j), a.extend(this, { | |
| - init: function() { | |
| - this.trigger("Init") | |
| - }, | |
| - destroy: function(a) { | |
| - return function() { | |
| - a.call(e), a = e = null | |
| - } | |
| - }(this.destroy) | |
| - }), a.extend(this.getShim(), g) | |
| - } | |
| - var f = "html5", | |
| - g = {}; | |
| - return c.addConstructor(f, e), g | |
| - }), d("moxie/core/utils/Events", ["moxie/core/utils/Basic"], function(a) { | |
| - function b() { | |
| - this.returnValue = !1 | |
| - } | |
| - | |
| - function c() { | |
| - this.cancelBubble = !0 | |
| - } | |
| - var d = {}, | |
| - e = "moxie_" + a.guid(), | |
| - f = function(f, g, h, i) { | |
| - var j, k; | |
| - g = g.toLowerCase(), f.addEventListener ? (j = h, f.addEventListener(g, j, !1)) : f.attachEvent && (j = function() { | |
| - var a = window.event; | |
| - a.target || (a.target = a.srcElement), a.preventDefault = b, a.stopPropagation = c, h(a) | |
| - }, f.attachEvent("on" + g, j)), f[e] || (f[e] = a.guid()), d.hasOwnProperty(f[e]) || (d[f[e]] = {}), k = d[f[e]], k.hasOwnProperty(g) || (k[g] = []), k[g].push({ | |
| - func: j, | |
| - orig: h, | |
| - key: i | |
| - }) | |
| - }, | |
| - g = function(b, c, f) { | |
| - var g, h; | |
| - if (c = c.toLowerCase(), b[e] && d[b[e]] && d[b[e]][c]) { | |
| - g = d[b[e]][c]; | |
| - for (var i = g.length - 1; i >= 0 && (g[i].orig !== f && g[i].key !== f || (b.removeEventListener ? b.removeEventListener(c, g[i].func, !1) : b.detachEvent && b.detachEvent("on" + c, g[i].func), g[i].orig = null, g[i].func = null, g.splice(i, 1), f === h)); i--); | |
| - if (g.length || delete d[b[e]][c], a.isEmptyObj(d[b[e]])) { | |
| - delete d[b[e]]; | |
| + getAsBinaryString: function(a, b) { | |
| + var c = this.getAsDataURL(a, b); | |
| + return m.atob(c.substring(c.indexOf("base64,") + 7)) | |
| + }, | |
| + embed: function(d, e) { | |
| + function f(b, e) { | |
| + var f = this; | |
| + if (i.can("create_canvas")) { | |
| + var k = f.getAsCanvas(); | |
| + if (k) return d.appendChild(k), k = null, f.destroy(), void j.trigger("embedded") | |
| + } | |
| + var l = f.getAsDataURL(b, e); | |
| + if (!l) throw new c.ImageError(c.ImageError.WRONG_FORMAT); | |
| + if (i.can("use_data_uri_of", l.length)) d.innerHTML = '<img src="' + l + '" width="' + f.width + '" height="' + f.height + '" />', f.destroy(), j.trigger("embedded"); | |
| + else { | |
| + var n = new h; | |
| + n.bind("TransportingComplete", function() { | |
| + g = j.connectRuntime(this.result.ruid), j.bind("Embedded", function() { | |
| + a.extend(g.getShimContainer().style, { | |
| + top: "0px", | |
| + left: "0px", | |
| + width: f.width + "px", | |
| + height: f.height + "px" | |
| + }), g = null | |
| + }, 999), g.exec.call(j, "ImageView", "display", this.result.uid, width, height), f.destroy() | |
| + }), n.transport(m.atob(l.substring(l.indexOf("base64,") + 7)), b, { | |
| + required_caps: { | |
| + display_media: !0 | |
| + }, | |
| + runtime_order: "flash,silverlight", | |
| + container: d | |
| + }) | |
| + } | |
| + } | |
| + var g, j = this; | |
| + e = a.extend({ | |
| + width: this.width, | |
| + height: this.height, | |
| + type: this.type || "image/jpeg", | |
| + quality: 90 | |
| + }, e || {}); | |
| try { | |
| - delete b[e] | |
| - } catch (j) { | |
| - b[e] = h | |
| + if (!(d = b.get(d))) throw new c.DOMException(c.DOMException.INVALID_NODE_TYPE_ERR); | |
| + if (!this.size) throw new c.DOMException(c.DOMException.INVALID_STATE_ERR); | |
| + this.width > n.MAX_RESIZE_WIDTH || (this.height, n.MAX_RESIZE_HEIGHT); | |
| + var k = new n; | |
| + return k.bind("Resize", function() { | |
| + f.call(this, e.type, e.quality) | |
| + }), k.bind("Load", function() { | |
| + k.downsize(e) | |
| + }), this.meta.thumb && this.meta.thumb.width >= e.width && this.meta.thumb.height >= e.height ? k.load(this.meta.thumb.data) : k.clone(this, !1), k | |
| + } catch (l) { | |
| + this.trigger("error", l.code) | |
| + } | |
| + }, | |
| + destroy: function() { | |
| + this.ruid && (this.getRuntime().exec.call(this, "Image", "destroy"), this.disconnectRuntime()), this.unbindAll() | |
| + } | |
| + }), this.handleEventProps(o), this.bind("Load Resize", function() { | |
| + d.call(this) | |
| + }, 999) | |
| + } | |
| + var o = ["progress", "load", "error", "resize", "embedded"]; | |
| + return n.MAX_RESIZE_WIDTH = 8192, n.MAX_RESIZE_HEIGHT = 8192, n.prototype = j.instance, n | |
| + }), d("moxie/runtime/html5/Runtime", ["moxie/core/utils/Basic", "moxie/core/Exceptions", "moxie/runtime/Runtime", "moxie/core/utils/Env"], function(a, b, c, d) { | |
| + function e(b) { | |
| + var e = this, | |
| + h = c.capTest, | |
| + i = c.capTrue, | |
| + j = a.extend({ | |
| + access_binary: h(window.FileReader || window.File && window.File.getAsDataURL), | |
| + access_image_binary: function() { | |
| + return e.can("access_binary") && !!g.Image | |
| + }, | |
| + display_media: h(d.can("create_canvas") || d.can("use_data_uri_over32kb")), | |
| + do_cors: h(window.XMLHttpRequest && "withCredentials" in new XMLHttpRequest), | |
| + drag_and_drop: h(function() { | |
| + var a = document.createElement("div"); | |
| + return ("draggable" in a || "ondragstart" in a && "ondrop" in a) && ("IE" !== d.browser || d.verComp(d.version, 9, ">")) | |
| + }()), | |
| + filter_by_extension: h(function() { | |
| + return "Chrome" === d.browser && d.verComp(d.version, 28, ">=") || "IE" === d.browser && d.verComp(d.version, 10, ">=") || "Safari" === d.browser && d.verComp(d.version, 7, ">=") | |
| + }()), | |
| + return_response_headers: i, | |
| + return_response_type: function(a) { | |
| + return !("json" !== a || !window.JSON) || d.can("return_response_type", a) | |
| + }, | |
| + return_status_code: i, | |
| + report_upload_progress: h(window.XMLHttpRequest && (new XMLHttpRequest).upload), | |
| + resize_image: function() { | |
| + return e.can("access_binary") && d.can("create_canvas") | |
| + }, | |
| + select_file: function() { | |
| + return d.can("use_fileinput") && window.File | |
| + }, | |
| + select_folder: function() { | |
| + return e.can("select_file") && "Chrome" === d.browser && d.verComp(d.version, 21, ">=") | |
| + }, | |
| + select_multiple: function() { | |
| + return e.can("select_file") && !("Safari" === d.browser && "Windows" === d.os) && !("iOS" === d.os && d.verComp(d.osVersion, "7.0.0", ">") && d.verComp(d.osVersion, "8.0.0", "<")) | |
| + }, | |
| + send_binary_string: h(window.XMLHttpRequest && ((new XMLHttpRequest).sendAsBinary || window.Uint8Array && window.ArrayBuffer)), | |
| + send_custom_headers: h(window.XMLHttpRequest), | |
| + send_multipart: function() { | |
| + return !!(window.XMLHttpRequest && (new XMLHttpRequest).upload && window.FormData) || e.can("send_binary_string") | |
| + }, | |
| + slice_blob: h(window.File && (File.prototype.mozSlice || File.prototype.webkitSlice || File.prototype.slice)), | |
| + stream_upload: function() { | |
| + return e.can("slice_blob") && e.can("send_multipart") | |
| + }, | |
| + summon_file_dialog: function() { | |
| + return e.can("select_file") && ("Firefox" === d.browser && d.verComp(d.version, 4, ">=") || "Opera" === d.browser && d.verComp(d.version, 12, ">=") || "IE" === d.browser && d.verComp(d.version, 10, ">=") || !!~a.inArray(d.browser, ["Chrome", "Safari"])) | |
| + }, | |
| + upload_filesize: i | |
| + }, arguments[2]); | |
| + c.call(this, b, arguments[1] || f, j), a.extend(this, { | |
| + init: function() { | |
| + this.trigger("Init") | |
| + }, | |
| + destroy: function(a) { | |
| + return function() { | |
| + a.call(e), a = e = null | |
| + } | |
| + }(this.destroy) | |
| + }), a.extend(this.getShim(), g) | |
| + } | |
| + var f = "html5", | |
| + g = {}; | |
| + return c.addConstructor(f, e), g | |
| + }), d("moxie/core/utils/Events", ["moxie/core/utils/Basic"], function(a) { | |
| + function b() { | |
| + this.returnValue = !1 | |
| + } | |
| + | |
| + function c() { | |
| + this.cancelBubble = !0 | |
| + } | |
| + var d = {}, | |
| + e = "moxie_" + a.guid(), | |
| + f = function(f, g, h, i) { | |
| + var j, k; | |
| + g = g.toLowerCase(), f.addEventListener ? (j = h, f.addEventListener(g, j, !1)) : f.attachEvent && (j = function() { | |
| + var a = window.event; | |
| + a.target || (a.target = a.srcElement), a.preventDefault = b, a.stopPropagation = c, h(a) | |
| + }, f.attachEvent("on" + g, j)), f[e] || (f[e] = a.guid()), d.hasOwnProperty(f[e]) || (d[f[e]] = {}), k = d[f[e]], k.hasOwnProperty(g) || (k[g] = []), k[g].push({ | |
| + func: j, | |
| + orig: h, | |
| + key: i | |
| + }) | |
| + }, | |
| + g = function(b, c, f) { | |
| + var g; | |
| + if (c = c.toLowerCase(), b[e] && d[b[e]] && d[b[e]][c]) { | |
| + g = d[b[e]][c]; | |
| + for (var h = g.length - 1; h >= 0 && (g[h].orig !== f && g[h].key !== f || (b.removeEventListener ? b.removeEventListener(c, g[h].func, !1) : b.detachEvent && b.detachEvent("on" + c, g[h].func), g[h].orig = null, g[h].func = null, g.splice(h, 1), void 0 === f)); h--); | |
| + if (g.length || delete d[b[e]][c], a.isEmptyObj(d[b[e]])) { | |
| + delete d[b[e]]; | |
| + try { | |
| + delete b[e] | |
| + } catch (i) { | |
| + b[e] = void 0 | |
| + } | |
| } | |
| } | |
| + }; | |
| + return { | |
| + addEvent: f, | |
| + removeEvent: g, | |
| + removeAllEvents: function(b, c) { | |
| + b && b[e] && a.each(d[b[e]], function(a, d) { | |
| + g(b, d, c) | |
| + }) | |
| } | |
| - }, | |
| - h = function(b, c) { | |
| - b && b[e] && a.each(d[b[e]], function(a, d) { | |
| - g(b, d, c) | |
| + } | |
| + }), d("moxie/runtime/html5/file/FileInput", ["moxie/runtime/html5/Runtime", "moxie/file/File", "moxie/core/utils/Basic", "moxie/core/utils/Dom", "moxie/core/utils/Events", "moxie/core/utils/Mime", "moxie/core/utils/Env"], function(a, b, c, d, e, f, g) { | |
| + function h() { | |
| + var a; | |
| + c.extend(this, { | |
| + init: function(h) { | |
| + var i, j, k, l, m, n, o = this, | |
| + p = o.getRuntime(); | |
| + a = h, k = a.accept.mimes || f.extList2mimes(a.accept, p.can("filter_by_extension")), j = p.getShimContainer(), j.innerHTML = '<input id="' + p.uid + '" type="file" style="font-size:999px;opacity:0;"' + (a.multiple && p.can("select_multiple") ? "multiple" : "") + (a.directory && p.can("select_folder") ? "webkitdirectory directory" : "") + (k ? ' accept="' + k.join(",") + '"' : "") + " />", i = d.get(p.uid), c.extend(i.style, { | |
| + position: "absolute", | |
| + top: 0, | |
| + left: 0, | |
| + width: "100%", | |
| + height: "100%" | |
| + }), l = d.get(a.browse_button), p.can("summon_file_dialog") && ("static" === d.getStyle(l, "position") && (l.style.position = "relative"), m = parseInt(d.getStyle(l, "z-index"), 10) || 1, l.style.zIndex = m, j.style.zIndex = m - 1, e.addEvent(l, "click", function(a) { | |
| + var b = d.get(p.uid); | |
| + b && !b.disabled && b.click(), a.preventDefault() | |
| + }, o.uid)), n = p.can("summon_file_dialog") ? l : j, e.addEvent(n, "mouseover", function() { | |
| + o.trigger("mouseenter") | |
| + }, o.uid), e.addEvent(n, "mouseout", function() { | |
| + o.trigger("mouseleave") | |
| + }, o.uid), e.addEvent(n, "mousedown", function() { | |
| + o.trigger("mousedown") | |
| + }, o.uid), e.addEvent(d.get(a.container), "mouseup", function() { | |
| + o.trigger("mouseup") | |
| + }, o.uid), i.onchange = function q(d) { | |
| + if (o.files = [], c.each(this.files, function(c) { | |
| + var d = ""; | |
| + if (a.directory && "." == c.name) return !0; | |
| + c.webkitRelativePath && (d = "/" + c.webkitRelativePath.replace(/^\//, "")), c = new b(p.uid, c), c.relativePath = d, o.files.push(c) | |
| + }), "IE" !== g.browser && "IEMobile" !== g.browser) this.value = ""; | |
| + else { | |
| + var e = this.cloneNode(!0); | |
| + this.parentNode.replaceChild(e, this), e.onchange = q | |
| + } | |
| + o.files.length && o.trigger("change") | |
| + }, o.trigger({ | |
| + type: "ready", | |
| + async: !0 | |
| + }), j = null | |
| + }, | |
| + disable: function(a) { | |
| + var b, c = this.getRuntime(); | |
| + (b = d.get(c.uid)) && (b.disabled = !!a) | |
| + }, | |
| + destroy: function() { | |
| + var b = this.getRuntime(), | |
| + c = b.getShim(), | |
| + f = b.getShimContainer(); | |
| + e.removeAllEvents(f, this.uid), e.removeAllEvents(a && d.get(a.container), this.uid), e.removeAllEvents(a && d.get(a.browse_button), this.uid), f && (f.innerHTML = ""), c.removeInstance(this.uid), a = f = c = null | |
| + } | |
| }) | |
| - }; | |
| - return { | |
| - addEvent: f, | |
| - removeEvent: g, | |
| - removeAllEvents: h | |
| - } | |
| - }), d("moxie/runtime/html5/file/FileInput", ["moxie/runtime/html5/Runtime", "moxie/file/File", "moxie/core/utils/Basic", "moxie/core/utils/Dom", "moxie/core/utils/Events", "moxie/core/utils/Mime", "moxie/core/utils/Env"], function(a, b, c, d, e, f, g) { | |
| - function h() { | |
| - var a; | |
| - c.extend(this, { | |
| - init: function(h) { | |
| - var i, j, k, l, m, n, o = this, | |
| - p = o.getRuntime(); | |
| - a = h, k = a.accept.mimes || f.extList2mimes(a.accept, p.can("filter_by_extension")), j = p.getShimContainer(), j.innerHTML = '<input id="' + p.uid + '" type="file" style="font-size:999px;opacity:0;"' + (a.multiple && p.can("select_multiple") ? "multiple" : "") + (a.directory && p.can("select_folder") ? "webkitdirectory directory" : "") + (k ? ' accept="' + k.join(",") + '"' : "") + " />", i = d.get(p.uid), c.extend(i.style, { | |
| - position: "absolute", | |
| - top: 0, | |
| - left: 0, | |
| - width: "100%", | |
| - height: "100%" | |
| - }), l = d.get(a.browse_button), p.can("summon_file_dialog") && ("static" === d.getStyle(l, "position") && (l.style.position = "relative"), m = parseInt(d.getStyle(l, "z-index"), 10) || 1, l.style.zIndex = m, j.style.zIndex = m - 1, e.addEvent(l, "click", function(a) { | |
| - var b = d.get(p.uid); | |
| - b && !b.disabled && b.click(), a.preventDefault() | |
| - }, o.uid)), n = p.can("summon_file_dialog") ? l : j, e.addEvent(n, "mouseover", function() { | |
| - o.trigger("mouseenter") | |
| - }, o.uid), e.addEvent(n, "mouseout", function() { | |
| - o.trigger("mouseleave") | |
| - }, o.uid), e.addEvent(n, "mousedown", function() { | |
| - o.trigger("mousedown") | |
| - }, o.uid), e.addEvent(d.get(a.container), "mouseup", function() { | |
| - o.trigger("mouseup") | |
| - }, o.uid), i.onchange = function q(d) { | |
| - if (o.files = [], c.each(this.files, function(c) { | |
| - var d = ""; | |
| - return !(!a.directory || "." != c.name) || (c.webkitRelativePath && (d = "/" + c.webkitRelativePath.replace(/^\//, "")), c = new b(p.uid, c), c.relativePath = d, void o.files.push(c)) | |
| - }), "IE" !== g.browser && "IEMobile" !== g.browser) this.value = ""; | |
| - else { | |
| - var e = this.cloneNode(!0); | |
| - this.parentNode.replaceChild(e, this), e.onchange = q | |
| - } | |
| - o.files.length && o.trigger("change") | |
| - }, o.trigger({ | |
| - type: "ready", | |
| - async: !0 | |
| - }), j = null | |
| - }, | |
| - disable: function(a) { | |
| - var b, c = this.getRuntime(); | |
| - (b = d.get(c.uid)) && (b.disabled = !!a) | |
| - }, | |
| - destroy: function() { | |
| - var b = this.getRuntime(), | |
| - c = b.getShim(), | |
| - f = b.getShimContainer(); | |
| - e.removeAllEvents(f, this.uid), e.removeAllEvents(a && d.get(a.container), this.uid), e.removeAllEvents(a && d.get(a.browse_button), this.uid), f && (f.innerHTML = ""), c.removeInstance(this.uid), a = f = c = null | |
| + } | |
| + return a.FileInput = h | |
| + }), d("moxie/runtime/html5/file/Blob", ["moxie/runtime/html5/Runtime", "moxie/file/Blob"], function(a, b) { | |
| + function c() { | |
| + function a(a, b, c) { | |
| + var d; | |
| + if (!window.File.prototype.slice) return (d = window.File.prototype.webkitSlice || window.File.prototype.mozSlice) ? d.call(a, b, c) : null; | |
| + try { | |
| + return a.slice(), a.slice(b, c) | |
| + } catch (e) { | |
| + return a.slice(b, c - b) | |
| + } | |
| } | |
| - }) | |
| - } | |
| - return a.FileInput = h | |
| - }), d("moxie/runtime/html5/file/Blob", ["moxie/runtime/html5/Runtime", "moxie/file/Blob"], function(a, b) { | |
| - function c() { | |
| - function a(a, b, c) { | |
| - var d; | |
| - if (!window.File.prototype.slice) return (d = window.File.prototype.webkitSlice || window.File.prototype.mozSlice) ? d.call(a, b, c) : null; | |
| - try { | |
| - return a.slice(), a.slice(b, c) | |
| - } catch (e) { | |
| - return a.slice(b, c - b) | |
| + this.slice = function() { | |
| + return new b(this.getRuntime().uid, a.apply(this, arguments)) | |
| } | |
| } | |
| - this.slice = function() { | |
| - return new b(this.getRuntime().uid, a.apply(this, arguments)) | |
| - } | |
| - } | |
| - return a.Blob = c | |
| - }), d("moxie/runtime/html5/file/FileDrop", ["moxie/runtime/html5/Runtime", "moxie/file/File", "moxie/core/utils/Basic", "moxie/core/utils/Dom", "moxie/core/utils/Events", "moxie/core/utils/Mime"], function(a, b, c, d, e, f) { | |
| - function g() { | |
| - function a(a) { | |
| - if (!a.dataTransfer || !a.dataTransfer.types) return !1; | |
| - var b = c.toArray(a.dataTransfer.types || []); | |
| - return c.inArray("Files", b) !== -1 || c.inArray("public.file-url", b) !== -1 || c.inArray("application/x-moz-file", b) !== -1 | |
| - } | |
| + return a.Blob = c | |
| + }), d("moxie/runtime/html5/file/FileDrop", ["moxie/runtime/html5/Runtime", "moxie/file/File", "moxie/core/utils/Basic", "moxie/core/utils/Dom", "moxie/core/utils/Events", "moxie/core/utils/Mime"], function(a, b, c, d, e, f) { | |
| + function g() { | |
| + function a(a) { | |
| + if (!a.dataTransfer || !a.dataTransfer.types) return !1; | |
| + var b = c.toArray(a.dataTransfer.types || []); | |
| + return -1 !== c.inArray("Files", b) || -1 !== c.inArray("public.file-url", b) || -1 !== c.inArray("application/x-moz-file", b) | |
| + } | |
| - function g(a, c) { | |
| - if (i(a)) { | |
| - var d = new b(o, a); | |
| - d.relativePath = c || "", p.push(d) | |
| + function g(a, c) { | |
| + if (i(a)) { | |
| + var d = new b(o, a); | |
| + d.relativePath = c || "", p.push(d) | |
| + } | |
| } | |
| - } | |
| - function h(a) { | |
| - for (var b = [], d = 0; d < a.length; d++)[].push.apply(b, a[d].extensions.split(/\s*,\s*/)); | |
| - return c.inArray("*", b) === -1 ? b : [] | |
| - } | |
| + function h(a) { | |
| + for (var b = [], d = 0; d < a.length; d++)[].push.apply(b, a[d].extensions.split(/\s*,\s*/)); | |
| + return -1 === c.inArray("*", b) ? b : [] | |
| + } | |
| - function i(a) { | |
| - if (!q.length) return !0; | |
| - var b = f.getFileExtension(a.name); | |
| - return !b || c.inArray(b, q) !== -1 | |
| - } | |
| + function i(a) { | |
| + if (!q.length) return !0; | |
| + var b = f.getFileExtension(a.name); | |
| + return !b || -1 !== c.inArray(b, q) | |
| + } | |
| - function j(a, b) { | |
| - var d = []; | |
| - c.each(a, function(a) { | |
| - var b = a.webkitGetAsEntry(); | |
| - b && (b.isFile ? g(a.getAsFile(), b.fullPath) : d.push(b)) | |
| - }), d.length ? k(d, b) : b() | |
| - } | |
| + function j(a, b) { | |
| + var d = []; | |
| + c.each(a, function(a) { | |
| + var b = a.webkitGetAsEntry(); | |
| + b && (b.isFile ? g(a.getAsFile(), b.fullPath) : d.push(b)) | |
| + }), d.length ? k(d, b) : b() | |
| + } | |
| - function k(a, b) { | |
| - var d = []; | |
| - c.each(a, function(a) { | |
| - d.push(function(b) { | |
| - l(a, b) | |
| + function k(a, b) { | |
| + var d = []; | |
| + c.each(a, function(a) { | |
| + d.push(function(b) { | |
| + l(a, b) | |
| + }) | |
| + }), c.inSeries(d, function() { | |
| + b() | |
| }) | |
| - }), c.inSeries(d, function() { | |
| - b() | |
| - }) | |
| - } | |
| + } | |
| - function l(a, b) { | |
| - a.isFile ? a.file(function(c) { | |
| - g(c, a.fullPath), b() | |
| - }, function() { | |
| - b() | |
| - }) : a.isDirectory ? m(a, b) : b() | |
| - } | |
| - | |
| - function m(a, b) { | |
| - function c(a) { | |
| - e.readEntries(function(b) { | |
| - b.length ? ([].push.apply(d, b), c(a)) : a() | |
| - }, a) | |
| - } | |
| - var d = [], | |
| - e = a.createReader(); | |
| - c(function() { | |
| - k(d, b) | |
| + function l(a, b) { | |
| + a.isFile ? a.file(function(c) { | |
| + g(c, a.fullPath), b() | |
| + }, function() { | |
| + b() | |
| + }) : a.isDirectory ? m(a, b) : b() | |
| + } | |
| + | |
| + function m(a, b) { | |
| + function c(a) { | |
| + e.readEntries(function(b) { | |
| + b.length ? ([].push.apply(d, b), c(a)) : a() | |
| + }, a) | |
| + } | |
| + var d = [], | |
| + e = a.createReader(); | |
| + c(function() { | |
| + k(d, b) | |
| + }) | |
| + } | |
| + var n, o, p = [], | |
| + q = []; | |
| + c.extend(this, { | |
| + init: function(b) { | |
| + var d, f = this; | |
| + n = b, o = f.ruid, q = h(n.accept), d = n.container, e.addEvent(d, "dragover", function(b) { | |
| + a(b) && (b.preventDefault(), b.dataTransfer.dropEffect = "copy") | |
| + }, f.uid), e.addEvent(d, "drop", function(b) { | |
| + a(b) && (b.preventDefault(), p = [], b.dataTransfer.items && b.dataTransfer.items[0].webkitGetAsEntry ? j(b.dataTransfer.items, function() { | |
| + f.files = p, f.trigger("drop") | |
| + }) : (c.each(b.dataTransfer.files, function(a) { | |
| + g(a) | |
| + }), f.files = p, f.trigger("drop"))) | |
| + }, f.uid), e.addEvent(d, "dragenter", function(a) { | |
| + f.trigger("dragenter") | |
| + }, f.uid), e.addEvent(d, "dragleave", function(a) { | |
| + f.trigger("dragleave") | |
| + }, f.uid) | |
| + }, | |
| + destroy: function() { | |
| + e.removeAllEvents(n && d.get(n.container), this.uid), o = p = q = n = null | |
| + } | |
| }) | |
| } | |
| - var n, o, p = [], | |
| - q = []; | |
| - c.extend(this, { | |
| - init: function(b) { | |
| - var d, f = this; | |
| - n = b, o = f.ruid, q = h(n.accept), d = n.container, e.addEvent(d, "dragover", function(b) { | |
| - a(b) && (b.preventDefault(), b.dataTransfer.dropEffect = "copy") | |
| - }, f.uid), e.addEvent(d, "drop", function(b) { | |
| - a(b) && (b.preventDefault(), p = [], b.dataTransfer.items && b.dataTransfer.items[0].webkitGetAsEntry ? j(b.dataTransfer.items, function() { | |
| - f.files = p, f.trigger("drop") | |
| - }) : (c.each(b.dataTransfer.files, function(a) { | |
| - g(a) | |
| - }), f.files = p, f.trigger("drop"))) | |
| - }, f.uid), e.addEvent(d, "dragenter", function(a) { | |
| - f.trigger("dragenter") | |
| - }, f.uid), e.addEvent(d, "dragleave", function(a) { | |
| - f.trigger("dragleave") | |
| - }, f.uid) | |
| - }, | |
| - destroy: function() { | |
| - e.removeAllEvents(n && d.get(n.container), this.uid), o = p = q = n = null | |
| - } | |
| - }) | |
| - } | |
| - return a.FileDrop = g | |
| - }), d("moxie/runtime/html5/file/FileReader", ["moxie/runtime/html5/Runtime", "moxie/core/utils/Encode", "moxie/core/utils/Basic"], function(a, b, c) { | |
| - function d() { | |
| - function a(a) { | |
| - return b.atob(a.substring(a.indexOf("base64,") + 7)) | |
| - } | |
| - var d, e = !1; | |
| - c.extend(this, { | |
| - read: function(b, f) { | |
| - var g = this; | |
| - g.result = "", d = new window.FileReader, d.addEventListener("progress", function(a) { | |
| - g.trigger(a) | |
| - }), d.addEventListener("load", function(b) { | |
| - g.result = e ? a(d.result) : d.result, g.trigger(b) | |
| - }), d.addEventListener("error", function(a) { | |
| - g.trigger(a, d.error) | |
| - }), d.addEventListener("loadend", function(a) { | |
| - d = null, g.trigger(a) | |
| - }), "function" === c.typeOf(d[b]) ? (e = !1, d[b](f.getSource())) : "readAsBinaryString" === b && (e = !0, d.readAsDataURL(f.getSource())) | |
| - }, | |
| - abort: function() { | |
| - d && d.abort() | |
| - }, | |
| - destroy: function() { | |
| - d = null | |
| + return a.FileDrop = g | |
| + }), d("moxie/runtime/html5/file/FileReader", ["moxie/runtime/html5/Runtime", "moxie/core/utils/Encode", "moxie/core/utils/Basic"], function(a, b, c) { | |
| + function d() { | |
| + function a(a) { | |
| + return b.atob(a.substring(a.indexOf("base64,") + 7)) | |
| } | |
| - }) | |
| - } | |
| - return a.FileReader = d | |
| - }), d("moxie/runtime/html5/xhr/XMLHttpRequest", ["moxie/runtime/html5/Runtime", "moxie/core/utils/Basic", "moxie/core/utils/Mime", "moxie/core/utils/Url", "moxie/file/File", "moxie/file/Blob", "moxie/xhr/FormData", "moxie/core/Exceptions", "moxie/core/utils/Env"], function(a, b, c, d, e, f, g, h, i) { | |
| - function j() { | |
| - function a(a, b) { | |
| - var c, d, e = this; | |
| - c = b.getBlob().getSource(), d = new window.FileReader, d.onload = function() { | |
| - b.append(b.getBlobName(), new f(null, { | |
| - type: c.type, | |
| - data: d.result | |
| - })), o.send.call(e, a, b) | |
| - }, d.readAsBinaryString(c) | |
| + var d, e = !1; | |
| + c.extend(this, { | |
| + read: function(b, f) { | |
| + var g = this; | |
| + g.result = "", d = new window.FileReader, d.addEventListener("progress", function(a) { | |
| + g.trigger(a) | |
| + }), d.addEventListener("load", function(b) { | |
| + g.result = e ? a(d.result) : d.result, g.trigger(b) | |
| + }), d.addEventListener("error", function(a) { | |
| + g.trigger(a, d.error) | |
| + }), d.addEventListener("loadend", function(a) { | |
| + d = null, g.trigger(a) | |
| + }), "function" === c.typeOf(d[b]) ? (e = !1, d[b](f.getSource())) : "readAsBinaryString" === b && (e = !0, d.readAsDataURL(f.getSource())) | |
| + }, | |
| + abort: function() { | |
| + d && d.abort() | |
| + }, | |
| + destroy: function() { | |
| + d = null | |
| + } | |
| + }) | |
| } | |
| - | |
| + return a.FileReader = d | |
| + }), d("moxie/runtime/html5/xhr/XMLHttpRequest", ["moxie/runtime/html5/Runtime", "moxie/core/utils/Basic", "moxie/core/utils/Mime", "moxie/core/utils/Url", "moxie/file/File", "moxie/file/Blob", "moxie/xhr/FormData", "moxie/core/Exceptions", "moxie/core/utils/Env"], function(a, b, c, d, e, f, g, h, i) { | |
| function j() { | |
| - return !window.XMLHttpRequest || "IE" === i.browser && i.verComp(i.version, 8, "<") ? function() { | |
| - for (var a = ["Msxml2.XMLHTTP.6.0", "Microsoft.XMLHTTP"], b = 0; b < a.length; b++) try { | |
| - return new ActiveXObject(a[b]) | |
| - } catch (c) {} | |
| - }() : new window.XMLHttpRequest | |
| + function a(a, b) { | |
| + var c, d, e = this; | |
| + c = b.getBlob().getSource(), d = new window.FileReader, d.onload = function() { | |
| + b.append(b.getBlobName(), new f(null, { | |
| + type: c.type, | |
| + data: d.result | |
| + })), o.send.call(e, a, b) | |
| + }, d.readAsBinaryString(c) | |
| + } | |
| + | |
| + function j() { | |
| + return !window.XMLHttpRequest || "IE" === i.browser && i.verComp(i.version, 8, "<") ? function() { | |
| + for (var a = ["Msxml2.XMLHTTP.6.0", "Microsoft.XMLHTTP"], b = 0; b < a.length; b++) try { | |
| + return new ActiveXObject(a[b]) | |
| + } catch (c) {} | |
| + }() : new window.XMLHttpRequest | |
| + } | |
| + | |
| + function k(a) { | |
| + var b = a.responseXML, | |
| + c = a.responseText; | |
| + return "IE" === i.browser && c && b && !b.documentElement && /[^\/]+\/[^\+]+\+xml/.test(a.getResponseHeader("Content-Type")) && (b = new window.ActiveXObject("Microsoft.XMLDOM"), b.async = !1, b.validateOnParse = !1, b.loadXML(c)), b && ("IE" === i.browser && 0 !== b.parseError || !b.documentElement || "parsererror" === b.documentElement.tagName) ? null : b | |
| + } | |
| + | |
| + function l(a) { | |
| + var b = "----moxieboundary" + (new Date).getTime(), | |
| + c = "\r\n", | |
| + d = ""; | |
| + if (!this.getRuntime().can("send_binary_string")) throw new h.RuntimeError(h.RuntimeError.NOT_SUPPORTED_ERR); | |
| + return m.setRequestHeader("Content-Type", "multipart/form-data; boundary=" + b), a.each(function(a, e) { | |
| + d += a instanceof f ? "--" + b + c + 'Content-Disposition: form-data; name="' + e + '"; filename="' + unescape(encodeURIComponent(a.name || "blob")) + '"' + c + "Content-Type: " + (a.type || "application/octet-stream") + c + c + a.getSource() + c : "--" + b + c + 'Content-Disposition: form-data; name="' + e + '"' + c + c + unescape(encodeURIComponent(a)) + c | |
| + }), d += "--" + b + "--" + c | |
| + } | |
| + var m, n, o = this; | |
| + b.extend(this, { | |
| + send: function(c, e) { | |
| + var h = this, | |
| + k = "Mozilla" === i.browser && i.verComp(i.version, 4, ">=") && i.verComp(i.version, 7, "<"), | |
| + o = "Android Browser" === i.browser, | |
| + p = !1; | |
| + if (n = c.url.replace(/^.+?\/([\w\-\.]+)$/, "$1").toLowerCase(), m = j(), m.open(c.method, c.url, c.async, c.user, c.password), e instanceof f) e.isDetached() && (p = !0), e = e.getSource(); | |
| + else if (e instanceof g) { | |
| + if (e.hasBlob()) | |
| + if (e.getBlob().isDetached()) e = l.call(h, e), p = !0; | |
| + else if ((k || o) && "blob" === b.typeOf(e.getBlob().getSource()) && window.FileReader) return void a.call(h, c, e); | |
| + if (e instanceof g) { | |
| + var q = new window.FormData; | |
| + e.each(function(a, b) { | |
| + a instanceof f ? q.append(b, a.getSource()) : q.append(b, a) | |
| + }), e = q | |
| + } | |
| + } | |
| + m.upload ? (c.withCredentials && (m.withCredentials = !0), m.addEventListener("load", function(a) { | |
| + h.trigger(a) | |
| + }), m.addEventListener("error", function(a) { | |
| + h.trigger(a) | |
| + }), m.addEventListener("progress", function(a) { | |
| + h.trigger(a) | |
| + }), m.upload.addEventListener("progress", function(a) { | |
| + h.trigger({ | |
| + type: "UploadProgress", | |
| + loaded: a.loaded, | |
| + total: a.total | |
| + }) | |
| + })) : m.onreadystatechange = function() { | |
| + switch (m.readyState) { | |
| + case 1: | |
| + case 2: | |
| + break; | |
| + case 3: | |
| + var a, b; | |
| + try { | |
| + d.hasSameOrigin(c.url) && (a = m.getResponseHeader("Content-Length") || 0), m.responseText && (b = m.responseText.length) | |
| + } catch (e) { | |
| + a = b = 0 | |
| + } | |
| + h.trigger({ | |
| + type: "progress", | |
| + lengthComputable: !!a, | |
| + total: parseInt(a, 10), | |
| + loaded: b | |
| + }); | |
| + break; | |
| + case 4: | |
| + m.onreadystatechange = function() {}, 0 === m.status ? h.trigger("error") : h.trigger("load") | |
| + } | |
| + }, b.isEmptyObj(c.headers) || b.each(c.headers, function(a, b) { | |
| + m.setRequestHeader(b, a) | |
| + }), "" !== c.responseType && "responseType" in m && ("json" !== c.responseType || i.can("return_response_type", "json") ? m.responseType = c.responseType : m.responseType = "text"), p ? m.sendAsBinary ? m.sendAsBinary(e) : function() { | |
| + for (var a = new Uint8Array(e.length), b = 0; b < e.length; b++) a[b] = 255 & e.charCodeAt(b); | |
| + m.send(a.buffer) | |
| + }() : m.send(e), h.trigger("loadstart") | |
| + }, | |
| + getStatus: function() { | |
| + try { | |
| + if (m) return m.status | |
| + } catch (a) {} | |
| + return 0 | |
| + }, | |
| + getResponse: function(a) { | |
| + var b = this.getRuntime(); | |
| + try { | |
| + switch (a) { | |
| + case "blob": | |
| + var d = new e(b.uid, m.response), | |
| + f = m.getResponseHeader("Content-Disposition"); | |
| + if (f) { | |
| + var g = f.match(/filename=([\'\"'])([^\1]+)\1/); | |
| + g && (n = g[2]) | |
| + } | |
| + return d.name = n, d.type || (d.type = c.getFileMime(n)), d; | |
| + case "json": | |
| + return i.can("return_response_type", "json") ? m.response : 200 === m.status && window.JSON ? JSON.parse(m.responseText) : null; | |
| + case "document": | |
| + return k(m); | |
| + default: | |
| + return "" !== m.responseText ? m.responseText : null | |
| + } | |
| + } catch (h) { | |
| + return null | |
| + } | |
| + }, | |
| + getAllResponseHeaders: function() { | |
| + try { | |
| + return m.getAllResponseHeaders() | |
| + } catch (a) {} | |
| + return "" | |
| + }, | |
| + abort: function() { | |
| + m && m.abort() | |
| + }, | |
| + destroy: function() { | |
| + o = n = null | |
| + } | |
| + }) | |
| + } | |
| + return a.XMLHttpRequest = j | |
| + }), d("moxie/runtime/html5/utils/BinaryReader", ["moxie/core/utils/Basic"], function(a) { | |
| + function b(a) { | |
| + a instanceof ArrayBuffer ? c.apply(this, arguments) : d.apply(this, arguments) | |
| } | |
| - function k(a) { | |
| - var b = a.responseXML, | |
| - c = a.responseText; | |
| - return "IE" === i.browser && c && b && !b.documentElement && /[^\/]+\/[^\+]+\+xml/.test(a.getResponseHeader("Content-Type")) && (b = new window.ActiveXObject("Microsoft.XMLDOM"), b.async = !1, b.validateOnParse = !1, b.loadXML(c)), b && ("IE" === i.browser && 0 !== b.parseError || !b.documentElement || "parsererror" === b.documentElement.tagName) ? null : b | |
| - } | |
| - | |
| - function l(a) { | |
| - var b = "----moxieboundary" + (new Date).getTime(), | |
| - c = "--", | |
| - d = "\r\n", | |
| - e = "", | |
| - g = this.getRuntime(); | |
| - if (!g.can("send_binary_string")) throw new h.RuntimeError(h.RuntimeError.NOT_SUPPORTED_ERR); | |
| - return m.setRequestHeader("Content-Type", "multipart/form-data; boundary=" + b), a.each(function(a, g) { | |
| - e += a instanceof f ? c + b + d + 'Content-Disposition: form-data; name="' + g + '"; filename="' + unescape(encodeURIComponent(a.name || "blob")) + '"' + d + "Content-Type: " + (a.type || "application/octet-stream") + d + d + a.getSource() + d : c + b + d + 'Content-Disposition: form-data; name="' + g + '"' + d + d + unescape(encodeURIComponent(a)) + d | |
| - }), e += c + b + c + d | |
| - } | |
| - var m, n, o = this; | |
| - b.extend(this, { | |
| - send: function(c, e) { | |
| - var h = this, | |
| - k = "Mozilla" === i.browser && i.verComp(i.version, 4, ">=") && i.verComp(i.version, 7, "<"), | |
| - o = "Android Browser" === i.browser, | |
| - p = !1; | |
| - if (n = c.url.replace(/^.+?\/([\w\-\.]+)$/, "$1").toLowerCase(), m = j(), m.open(c.method, c.url, c.async, c.user, c.password), e instanceof f) e.isDetached() && (p = !0), e = e.getSource(); | |
| - else if (e instanceof g) { | |
| - if (e.hasBlob()) | |
| - if (e.getBlob().isDetached()) e = l.call(h, e), p = !0; | |
| - else if ((k || o) && "blob" === b.typeOf(e.getBlob().getSource()) && window.FileReader) return void a.call(h, c, e); | |
| - if (e instanceof g) { | |
| - var q = new window.FormData; | |
| - e.each(function(a, b) { | |
| - a instanceof f ? q.append(b, a.getSource()) : q.append(b, a) | |
| - }), e = q | |
| - } | |
| - } | |
| - m.upload ? (c.withCredentials && (m.withCredentials = !0), m.addEventListener("load", function(a) { | |
| - h.trigger(a) | |
| - }), m.addEventListener("error", function(a) { | |
| - h.trigger(a) | |
| - }), m.addEventListener("progress", function(a) { | |
| - h.trigger(a) | |
| - }), m.upload.addEventListener("progress", function(a) { | |
| - h.trigger({ | |
| - type: "UploadProgress", | |
| - loaded: a.loaded, | |
| - total: a.total | |
| - }) | |
| - })) : m.onreadystatechange = function() { | |
| - switch (m.readyState) { | |
| - case 1: | |
| - break; | |
| + function c(b) { | |
| + var c = new DataView(b); | |
| + a.extend(this, { | |
| + readByteAt: function(a) { | |
| + return c.getUint8(a) | |
| + }, | |
| + writeByteAt: function(a, b) { | |
| + c.setUint8(a, b) | |
| + }, | |
| + SEGMENT: function(a, d, e) { | |
| + switch (arguments.length) { | |
| case 2: | |
| - break; | |
| + return b.slice(a, a + d); | |
| + case 1: | |
| + return b.slice(a); | |
| case 3: | |
| - var a, b; | |
| - try { | |
| - d.hasSameOrigin(c.url) && (a = m.getResponseHeader("Content-Length") || 0), m.responseText && (b = m.responseText.length) | |
| - } catch (e) { | |
| - a = b = 0 | |
| + if (null === e && (e = new ArrayBuffer), e instanceof ArrayBuffer) { | |
| + var f = new Uint8Array(this.length() - d + e.byteLength); | |
| + a > 0 && f.set(new Uint8Array(b.slice(0, a)), 0), f.set(new Uint8Array(e), a), f.set(new Uint8Array(b.slice(a + d)), a + e.byteLength), this.clear(), b = f.buffer, c = new DataView(b); | |
| + break | |
| } | |
| - h.trigger({ | |
| - type: "progress", | |
| - lengthComputable: !!a, | |
| - total: parseInt(a, 10), | |
| - loaded: b | |
| - }); | |
| - break; | |
| - case 4: | |
| - m.onreadystatechange = function() {}, 0 === m.status ? h.trigger("error") : h.trigger("load") | |
| + default: | |
| + return b | |
| } | |
| - }, b.isEmptyObj(c.headers) || b.each(c.headers, function(a, b) { | |
| - m.setRequestHeader(b, a) | |
| - }), "" !== c.responseType && "responseType" in m && ("json" !== c.responseType || i.can("return_response_type", "json") ? m.responseType = c.responseType : m.responseType = "text"), p ? m.sendAsBinary ? m.sendAsBinary(e) : ! function() { | |
| - for (var a = new Uint8Array(e.length), b = 0; b < e.length; b++) a[b] = 255 & e.charCodeAt(b); | |
| - m.send(a.buffer) | |
| - }() : m.send(e), h.trigger("loadstart") | |
| - }, | |
| - getStatus: function() { | |
| - try { | |
| - if (m) return m.status | |
| - } catch (a) {} | |
| - return 0 | |
| - }, | |
| - getResponse: function(a) { | |
| - var b = this.getRuntime(); | |
| - try { | |
| - switch (a) { | |
| - case "blob": | |
| - var d = new e(b.uid, m.response), | |
| - f = m.getResponseHeader("Content-Disposition"); | |
| - if (f) { | |
| - var g = f.match(/filename=([\'\"'])([^\1]+)\1/); | |
| - g && (n = g[2]) | |
| - } | |
| - return d.name = n, d.type || (d.type = c.getFileMime(n)), d; | |
| - case "json": | |
| - return i.can("return_response_type", "json") ? m.response : 200 === m.status && window.JSON ? JSON.parse(m.responseText) : null; | |
| - case "document": | |
| - return k(m); | |
| + }, | |
| + length: function() { | |
| + return b ? b.byteLength : 0 | |
| + }, | |
| + clear: function() { | |
| + c = b = null | |
| + } | |
| + }) | |
| + } | |
| + | |
| + function d(b) { | |
| + function c(a, c, d) { | |
| + d = 3 === arguments.length ? d : b.length - c - 1, b = b.substr(0, c) + a + b.substr(d + c) | |
| + } | |
| + a.extend(this, { | |
| + readByteAt: function(a) { | |
| + return b.charCodeAt(a) | |
| + }, | |
| + writeByteAt: function(a, b) { | |
| + c(String.fromCharCode(b), a, 1) | |
| + }, | |
| + SEGMENT: function(a, d, e) { | |
| + switch (arguments.length) { | |
| + case 1: | |
| + return b.substr(a); | |
| + case 2: | |
| + return b.substr(a, d); | |
| + case 3: | |
| + c(null !== e ? e : "", a, d); | |
| + break; | |
| default: | |
| - return "" !== m.responseText ? m.responseText : null | |
| + return b | |
| } | |
| - } catch (h) { | |
| - return null | |
| + }, | |
| + length: function() { | |
| + return b ? b.length : 0 | |
| + }, | |
| + clear: function() { | |
| + b = null | |
| + } | |
| + }) | |
| + } | |
| + return a.extend(b.prototype, { | |
| + littleEndian: !1, | |
| + read: function(a, b) { | |
| + var c, d, e; | |
| + if (a + b > this.length()) throw new Error("You are trying to read outside the source boundaries."); | |
| + for (d = this.littleEndian ? 0 : -8 * (b - 1), e = 0, c = 0; e < b; e++) c |= this.readByteAt(a + e) << Math.abs(d + 8 * e); | |
| + return c | |
| + }, | |
| + write: function(a, b, c) { | |
| + var d, e; | |
| + if (a > this.length()) throw new Error("You are trying to write outside the source boundaries."); | |
| + for (d = this.littleEndian ? 0 : -8 * (c - 1), e = 0; e < c; e++) this.writeByteAt(a + e, b >> Math.abs(d + 8 * e) & 255) | |
| + }, | |
| + BYTE: function(a) { | |
| + return this.read(a, 1) | |
| + }, | |
| + SHORT: function(a) { | |
| + return this.read(a, 2) | |
| + }, | |
| + LONG: function(a) { | |
| + return this.read(a, 4) | |
| + }, | |
| + SLONG: function(a) { | |
| + var b = this.read(a, 4); | |
| + return b > 2147483647 ? b - 4294967296 : b | |
| + }, | |
| + CHAR: function(a) { | |
| + return String.fromCharCode(this.read(a, 1)) | |
| + }, | |
| + STRING: function(a, b) { | |
| + return this.asArray("CHAR", a, b).join("") | |
| + }, | |
| + asArray: function(a, b, c) { | |
| + for (var d = [], e = 0; e < c; e++) d[e] = this[a](b + e); | |
| + return d | |
| + } | |
| + }), b | |
| + }), d("moxie/runtime/html5/image/JPEGHeaders", ["moxie/runtime/html5/utils/BinaryReader", "moxie/core/Exceptions"], function(a, b) { | |
| + return function c(d) { | |
| + var e, f, g, h = [], | |
| + i = 0; | |
| + if (e = new a(d), 65496 !== e.SHORT(0)) throw e.clear(), new b.ImageError(b.ImageError.WRONG_FORMAT); | |
| + for (f = 2; f <= e.length();) | |
| + if ((g = e.SHORT(f)) >= 65488 && g <= 65495) f += 2; | |
| + else { | |
| + if (65498 === g || 65497 === g) break; | |
| + i = e.SHORT(f + 2) + 2, g >= 65505 && g <= 65519 && h.push({ | |
| + hex: g, | |
| + name: "APP" + (15 & g), | |
| + start: f, | |
| + length: i, | |
| + segment: e.SEGMENT(f, i) | |
| + }), f += i | |
| + } return e.clear(), { | |
| + headers: h, | |
| + restore: function(b) { | |
| + var c, d, e; | |
| + for (e = new a(b), f = 65504 == e.SHORT(2) ? 4 + e.SHORT(4) : 2, d = 0, c = h.length; d < c; d++) e.SEGMENT(f, 0, h[d].segment), f += h[d].length; | |
| + return b = e.SEGMENT(), e.clear(), b | |
| + }, | |
| + strip: function(b) { | |
| + var d, e, f, g; | |
| + for (f = new c(b), e = f.headers, f.purge(), d = new a(b), g = e.length; g--;) d.SEGMENT(e[g].start, e[g].length, ""); | |
| + return b = d.SEGMENT(), d.clear(), b | |
| + }, | |
| + get: function(a) { | |
| + for (var b = [], c = 0, d = h.length; c < d; c++) h[c].name === a.toUpperCase() && b.push(h[c].segment); | |
| + return b | |
| + }, | |
| + set: function(a, b) { | |
| + var c, d, e, f = []; | |
| + for ("string" == typeof b ? f.push(b) : f = b, c = d = 0, e = h.length; c < e && (h[c].name === a.toUpperCase() && (h[c].segment = f[d], h[c].length = f[d].length, d++), !(d >= f.length)); c++); | |
| + }, | |
| + purge: function() { | |
| + this.headers = h = [] | |
| } | |
| - }, | |
| - getAllResponseHeaders: function() { | |
| - try { | |
| - return m.getAllResponseHeaders() | |
| - } catch (a) {} | |
| - return "" | |
| - }, | |
| - abort: function() { | |
| - m && m.abort() | |
| - }, | |
| - destroy: function() { | |
| - o = n = null | |
| } | |
| - }) | |
| - } | |
| - return a.XMLHttpRequest = j | |
| - }), d("moxie/runtime/html5/utils/BinaryReader", ["moxie/core/utils/Basic"], function(a) { | |
| - function b(a) { | |
| - a instanceof ArrayBuffer ? c.apply(this, arguments) : d.apply(this, arguments) | |
| - } | |
| + } | |
| + }), d("moxie/runtime/html5/image/ExifParser", ["moxie/core/utils/Basic", "moxie/runtime/html5/utils/BinaryReader", "moxie/core/Exceptions"], function(a, c, d) { | |
| + function e(f) { | |
| + function g(c, e) { | |
| + var f, g, h, i, j, m, n, o, p = this, | |
| + q = [], | |
| + r = {}, | |
| + s = { | |
| + 1: "BYTE", | |
| + 7: "UNDEFINED", | |
| + 2: "ASCII", | |
| + 3: "SHORT", | |
| + 4: "LONG", | |
| + 5: "RATIONAL", | |
| + 9: "SLONG", | |
| + 10: "SRATIONAL" | |
| + }, | |
| + t = { | |
| + BYTE: 1, | |
| + UNDEFINED: 1, | |
| + ASCII: 1, | |
| + SHORT: 2, | |
| + LONG: 4, | |
| + RATIONAL: 8, | |
| + SLONG: 4, | |
| + SRATIONAL: 8 | |
| + }; | |
| + for (f = p.SHORT(c), g = 0; g < f; g++) | |
| + if (q = [], n = c + 2 + 12 * g, (h = e[p.SHORT(n)]) !== b) { | |
| + if (i = s[p.SHORT(n += 2)], j = p.LONG(n += 2), !(m = t[i])) throw new d.ImageError(d.ImageError.INVALID_META_ERR); | |
| + if (n += 4, m * j > 4 && (n = p.LONG(n) + l.tiffHeader), n + m * j >= this.length()) throw new d.ImageError(d.ImageError.INVALID_META_ERR); | |
| + "ASCII" !== i ? (q = p.asArray(i, n, j), o = 1 == j ? q[0] : q, k.hasOwnProperty(h) && "object" != typeof o ? r[h] = k[h][o] : r[h] = o) : r[h] = a.trim(p.STRING(n, j).replace(/\0$/, "")) | |
| + } return r | |
| + } | |
| - function c(b) { | |
| - var c = new DataView(b); | |
| - a.extend(this, { | |
| - readByteAt: function(a) { | |
| - return c.getUint8(a) | |
| - }, | |
| - writeByteAt: function(a, b) { | |
| - c.setUint8(a, b) | |
| - }, | |
| - SEGMENT: function(a, d, e) { | |
| - switch (arguments.length) { | |
| - case 2: | |
| - return b.slice(a, a + d); | |
| - case 1: | |
| - return b.slice(a); | |
| - case 3: | |
| - if (null === e && (e = new ArrayBuffer), e instanceof ArrayBuffer) { | |
| - var f = new Uint8Array(this.length() - d + e.byteLength); | |
| - a > 0 && f.set(new Uint8Array(b.slice(0, a)), 0), f.set(new Uint8Array(e), a), f.set(new Uint8Array(b.slice(a + d)), a + e.byteLength), this.clear(), b = f.buffer, c = new DataView(b); | |
| + function h(a, b, c) { | |
| + var d, e, f, g = 0; | |
| + if ("string" == typeof b) { | |
| + var h = j[a.toLowerCase()]; | |
| + for (var i in h) | |
| + if (h[i] === b) { | |
| + b = i; | |
| break | |
| } | |
| - default: | |
| - return b | |
| } | |
| - }, | |
| - length: function() { | |
| - return b ? b.byteLength : 0 | |
| - }, | |
| - clear: function() { | |
| - c = b = null | |
| + d = l[a.toLowerCase() + "IFD"], e = this.SHORT(d); | |
| + for (var k = 0; k < e; k++) | |
| + if (f = d + 12 * k + 2, this.SHORT(f) == b) { | |
| + g = f + 8; | |
| + break | |
| + } if (!g) return !1; | |
| + try { | |
| + this.write(g, c, 4) | |
| + } catch (m) { | |
| + return !1 | |
| + } | |
| + return !0 | |
| } | |
| - }) | |
| - } | |
| - | |
| - function d(b) { | |
| - function c(a, c, d) { | |
| - d = 3 === arguments.length ? d : b.length - c - 1, b = b.substr(0, c) + a + b.substr(d + c) | |
| - } | |
| - a.extend(this, { | |
| - readByteAt: function(a) { | |
| - return b.charCodeAt(a) | |
| - }, | |
| - writeByteAt: function(a, b) { | |
| - c(String.fromCharCode(b), a, 1) | |
| - }, | |
| - SEGMENT: function(a, d, e) { | |
| - switch (arguments.length) { | |
| - case 1: | |
| - return b.substr(a); | |
| - case 2: | |
| - return b.substr(a, d); | |
| - case 3: | |
| - c(null !== e ? e : "", a, d); | |
| - break; | |
| - default: | |
| + var i, j, k, l, m, n; | |
| + if (c.call(this, f), j = { | |
| + tiff: { | |
| + 274: "Orientation", | |
| + 270: "ImageDescription", | |
| + 271: "Make", | |
| + 272: "Model", | |
| + 305: "Software", | |
| + 34665: "ExifIFDPointer", | |
| + 34853: "GPSInfoIFDPointer" | |
| + }, | |
| + exif: { | |
| + 36864: "ExifVersion", | |
| + 40961: "ColorSpace", | |
| + 40962: "PixelXDimension", | |
| + 40963: "PixelYDimension", | |
| + 36867: "DateTimeOriginal", | |
| + 33434: "ExposureTime", | |
| + 33437: "FNumber", | |
| + 34855: "ISOSpeedRatings", | |
| + 37377: "ShutterSpeedValue", | |
| + 37378: "ApertureValue", | |
| + 37383: "MeteringMode", | |
| + 37384: "LightSource", | |
| + 37385: "Flash", | |
| + 37386: "FocalLength", | |
| + 41986: "ExposureMode", | |
| + 41987: "WhiteBalance", | |
| + 41990: "SceneCaptureType", | |
| + 41988: "DigitalZoomRatio", | |
| + 41992: "Contrast", | |
| + 41993: "Saturation", | |
| + 41994: "Sharpness" | |
| + }, | |
| + gps: { | |
| + 0: "GPSVersionID", | |
| + 1: "GPSLatitudeRef", | |
| + 2: "GPSLatitude", | |
| + 3: "GPSLongitudeRef", | |
| + 4: "GPSLongitude" | |
| + }, | |
| + thumb: { | |
| + 513: "JPEGInterchangeFormat", | |
| + 514: "JPEGInterchangeFormatLength" | |
| + } | |
| + }, k = { | |
| + ColorSpace: { | |
| + 1: "sRGB", | |
| + 0: "Uncalibrated" | |
| + }, | |
| + MeteringMode: { | |
| + 0: "Unknown", | |
| + 1: "Average", | |
| + 2: "CenterWeightedAverage", | |
| + 3: "Spot", | |
| + 4: "MultiSpot", | |
| + 5: "Pattern", | |
| + 6: "Partial", | |
| + 255: "Other" | |
| + }, | |
| + LightSource: { | |
| + 1: "Daylight", | |
| + 2: "Fliorescent", | |
| + 3: "Tungsten", | |
| + 4: "Flash", | |
| + 9: "Fine weather", | |
| + 10: "Cloudy weather", | |
| + 11: "Shade", | |
| + 12: "Daylight fluorescent (D 5700 - 7100K)", | |
| + 13: "Day white fluorescent (N 4600 -5400K)", | |
| + 14: "Cool white fluorescent (W 3900 - 4500K)", | |
| + 15: "White fluorescent (WW 3200 - 3700K)", | |
| + 17: "Standard light A", | |
| + 18: "Standard light B", | |
| + 19: "Standard light C", | |
| + 20: "D55", | |
| + 21: "D65", | |
| + 22: "D75", | |
| + 23: "D50", | |
| + 24: "ISO studio tungsten", | |
| + 255: "Other" | |
| + }, | |
| + Flash: { | |
| + 0: "Flash did not fire", | |
| + 1: "Flash fired", | |
| + 5: "Strobe return light not detected", | |
| + 7: "Strobe return light detected", | |
| + 9: "Flash fired, compulsory flash mode", | |
| + 13: "Flash fired, compulsory flash mode, return light not detected", | |
| + 15: "Flash fired, compulsory flash mode, return light detected", | |
| + 16: "Flash did not fire, compulsory flash mode", | |
| + 24: "Flash did not fire, auto mode", | |
| + 25: "Flash fired, auto mode", | |
| + 29: "Flash fired, auto mode, return light not detected", | |
| + 31: "Flash fired, auto mode, return light detected", | |
| + 32: "No flash function", | |
| + 65: "Flash fired, red-eye reduction mode", | |
| + 69: "Flash fired, red-eye reduction mode, return light not detected", | |
| + 71: "Flash fired, red-eye reduction mode, return light detected", | |
| + 73: "Flash fired, compulsory flash mode, red-eye reduction mode", | |
| + 77: "Flash fired, compulsory flash mode, red-eye reduction mode, return light not detected", | |
| + 79: "Flash fired, compulsory flash mode, red-eye reduction mode, return light detected", | |
| + 89: "Flash fired, auto mode, red-eye reduction mode", | |
| + 93: "Flash fired, auto mode, return light not detected, red-eye reduction mode", | |
| + 95: "Flash fired, auto mode, return light detected, red-eye reduction mode" | |
| + }, | |
| + ExposureMode: { | |
| + 0: "Auto exposure", | |
| + 1: "Manual exposure", | |
| + 2: "Auto bracket" | |
| + }, | |
| + WhiteBalance: { | |
| + 0: "Auto white balance", | |
| + 1: "Manual white balance" | |
| + }, | |
| + SceneCaptureType: { | |
| + 0: "Standard", | |
| + 1: "Landscape", | |
| + 2: "Portrait", | |
| + 3: "Night scene" | |
| + }, | |
| + Contrast: { | |
| + 0: "Normal", | |
| + 1: "Soft", | |
| + 2: "Hard" | |
| + }, | |
| + Saturation: { | |
| + 0: "Normal", | |
| + 1: "Low saturation", | |
| + 2: "High saturation" | |
| + }, | |
| + Sharpness: { | |
| + 0: "Normal", | |
| + 1: "Soft", | |
| + 2: "Hard" | |
| + }, | |
| + GPSLatitudeRef: { | |
| + N: "North latitude", | |
| + S: "South latitude" | |
| + }, | |
| + GPSLongitudeRef: { | |
| + E: "East longitude", | |
| + W: "West longitude" | |
| + } | |
| + }, l = { | |
| + tiffHeader: 10 | |
| + }, m = l.tiffHeader, i = { | |
| + clear: this.clear | |
| + }, a.extend(this, { | |
| + read: function() { | |
| + try { | |
| + return e.prototype.read.apply(this, arguments) | |
| + } catch (a) { | |
| + throw new d.ImageError(d.ImageError.INVALID_META_ERR) | |
| + } | |
| + }, | |
| + write: function() { | |
| + try { | |
| + return e.prototype.write.apply(this, arguments) | |
| + } catch (a) { | |
| + throw new d.ImageError(d.ImageError.INVALID_META_ERR) | |
| + } | |
| + }, | |
| + UNDEFINED: function() { | |
| + return this.BYTE.apply(this, arguments) | |
| + }, | |
| + RATIONAL: function(a) { | |
| + return this.LONG(a) / this.LONG(a + 4) | |
| + }, | |
| + SRATIONAL: function(a) { | |
| + return this.SLONG(a) / this.SLONG(a + 4) | |
| + }, | |
| + ASCII: function(a) { | |
| + return this.CHAR(a) | |
| + }, | |
| + TIFF: function() { | |
| + return n || null | |
| + }, | |
| + EXIF: function() { | |
| + var b = null; | |
| + if (l.exifIFD) { | |
| + try { | |
| + b = g.call(this, l.exifIFD, j.exif) | |
| + } catch (e) { | |
| + return null | |
| + } | |
| + if (b.ExifVersion && "array" === a.typeOf(b.ExifVersion)) { | |
| + for (var c = 0, d = ""; c < b.ExifVersion.length; c++) d += String.fromCharCode(b.ExifVersion[c]); | |
| + b.ExifVersion = d | |
| + } | |
| + } | |
| return b | |
| + }, | |
| + GPS: function() { | |
| + var b = null; | |
| + if (l.gpsIFD) { | |
| + try { | |
| + b = g.call(this, l.gpsIFD, j.gps) | |
| + } catch (c) { | |
| + return null | |
| + } | |
| + b.GPSVersionID && "array" === a.typeOf(b.GPSVersionID) && (b.GPSVersionID = b.GPSVersionID.join(".")) | |
| + } | |
| + return b | |
| + }, | |
| + thumb: function() { | |
| + if (l.IFD1) try { | |
| + var a = g.call(this, l.IFD1, j.thumb); | |
| + if ("JPEGInterchangeFormat" in a) return this.SEGMENT(l.tiffHeader + a.JPEGInterchangeFormat, a.JPEGInterchangeFormatLength) | |
| + } catch (b) {} | |
| + return null | |
| + }, | |
| + setExif: function(a, b) { | |
| + return ("PixelXDimension" === a || "PixelYDimension" === a) && h.call(this, "exif", a, b) | |
| + }, | |
| + clear: function() { | |
| + i.clear(), f = j = k = n = l = i = null | |
| + } | |
| + }), 65505 !== this.SHORT(0) || "EXIF\0" !== this.STRING(4, 5).toUpperCase()) throw new d.ImageError(d.ImageError.INVALID_META_ERR); | |
| + if (this.littleEndian = 18761 == this.SHORT(m), 42 !== this.SHORT(m += 2)) throw new d.ImageError(d.ImageError.INVALID_META_ERR); | |
| + l.IFD0 = l.tiffHeader + this.LONG(m += 2), n = g.call(this, l.IFD0, j.tiff), "ExifIFDPointer" in n && (l.exifIFD = l.tiffHeader + n.ExifIFDPointer, delete n.ExifIFDPointer), "GPSInfoIFDPointer" in n && (l.gpsIFD = l.tiffHeader + n.GPSInfoIFDPointer, delete n.GPSInfoIFDPointer), a.isEmptyObj(n) && (n = null); | |
| + var o = this.LONG(l.IFD0 + 12 * this.SHORT(l.IFD0) + 2); | |
| + o && (l.IFD1 = l.tiffHeader + o) | |
| + } | |
| + return e.prototype = c.prototype, e | |
| + }), d("moxie/runtime/html5/image/JPEG", ["moxie/core/utils/Basic", "moxie/core/Exceptions", "moxie/runtime/html5/image/JPEGHeaders", "moxie/runtime/html5/utils/BinaryReader", "moxie/runtime/html5/image/ExifParser"], function(a, b, c, d, e) { | |
| + function f(f) { | |
| + function g(a) { | |
| + var b, c, d = 0; | |
| + for (a || (a = i); d <= a.length();) { | |
| + if ((b = a.SHORT(d += 2)) >= 65472 && b <= 65475) return d += 5, { | |
| + height: a.SHORT(d), | |
| + width: a.SHORT(d += 2) | |
| + }; | |
| + c = a.SHORT(d += 2), d += c - 2 | |
| } | |
| - }, | |
| - length: function() { | |
| - return b ? b.length : 0 | |
| - }, | |
| - clear: function() { | |
| - b = null | |
| - } | |
| - }) | |
| - } | |
| - return a.extend(b.prototype, { | |
| - littleEndian: !1, | |
| - read: function(a, b) { | |
| - var c, d, e; | |
| - if (a + b > this.length()) throw new Error("You are trying to read outside the source boundaries."); | |
| - for (d = this.littleEndian ? 0 : -8 * (b - 1), e = 0, c = 0; e < b; e++) c |= this.readByteAt(a + e) << Math.abs(d + 8 * e); | |
| - return c | |
| - }, | |
| - write: function(a, b, c) { | |
| - var d, e; | |
| - if (a > this.length()) throw new Error("You are trying to write outside the source boundaries."); | |
| - for (d = this.littleEndian ? 0 : -8 * (c - 1), e = 0; e < c; e++) this.writeByteAt(a + e, b >> Math.abs(d + 8 * e) & 255) | |
| - }, | |
| - BYTE: function(a) { | |
| - return this.read(a, 1) | |
| - }, | |
| - SHORT: function(a) { | |
| - return this.read(a, 2) | |
| - }, | |
| - LONG: function(a) { | |
| - return this.read(a, 4) | |
| - }, | |
| - SLONG: function(a) { | |
| - var b = this.read(a, 4); | |
| - return b > 2147483647 ? b - 4294967296 : b | |
| - }, | |
| - CHAR: function(a) { | |
| - return String.fromCharCode(this.read(a, 1)) | |
| - }, | |
| - STRING: function(a, b) { | |
| - return this.asArray("CHAR", a, b).join("") | |
| - }, | |
| - asArray: function(a, b, c) { | |
| - for (var d = [], e = 0; e < c; e++) d[e] = this[a](b + e); | |
| - return d | |
| - } | |
| - }), b | |
| - }), d("moxie/runtime/html5/image/JPEGHeaders", ["moxie/runtime/html5/utils/BinaryReader", "moxie/core/Exceptions"], function(a, b) { | |
| - return function c(d) { | |
| - var e, f, g, h = [], | |
| - i = 0; | |
| - if (e = new a(d), 65496 !== e.SHORT(0)) throw e.clear(), new b.ImageError(b.ImageError.WRONG_FORMAT); | |
| - for (f = 2; f <= e.length();) | |
| - if (g = e.SHORT(f), g >= 65488 && g <= 65495) f += 2; | |
| - else { | |
| - if (65498 === g || 65497 === g) break; | |
| - i = e.SHORT(f + 2) + 2, g >= 65505 && g <= 65519 && h.push({ | |
| - hex: g, | |
| - name: "APP" + (15 & g), | |
| - start: f, | |
| - length: i, | |
| - segment: e.SEGMENT(f, i) | |
| - }), f += i | |
| - } return e.clear(), { | |
| - headers: h, | |
| - restore: function(b) { | |
| - var c, d, e; | |
| - for (e = new a(b), f = 65504 == e.SHORT(2) ? 4 + e.SHORT(4) : 2, d = 0, c = h.length; d < c; d++) e.SEGMENT(f, 0, h[d].segment), f += h[d].length; | |
| - return b = e.SEGMENT(), e.clear(), b | |
| - }, | |
| - strip: function(b) { | |
| - var d, e, f, g; | |
| - for (f = new c(b), e = f.headers, f.purge(), d = new a(b), g = e.length; g--;) d.SEGMENT(e[g].start, e[g].length, ""); | |
| - return b = d.SEGMENT(), d.clear(), b | |
| - }, | |
| - get: function(a) { | |
| - for (var b = [], c = 0, d = h.length; c < d; c++) h[c].name === a.toUpperCase() && b.push(h[c].segment); | |
| - return b | |
| - }, | |
| - set: function(a, b) { | |
| - var c, d, e, f = []; | |
| - for ("string" == typeof b ? f.push(b) : f = b, c = d = 0, e = h.length; c < e && (h[c].name === a.toUpperCase() && (h[c].segment = f[d], h[c].length = f[d].length, d++), !(d >= f.length)); c++); | |
| - }, | |
| - purge: function() { | |
| - this.headers = h = [] | |
| + return null | |
| } | |
| - } | |
| - } | |
| - }), d("moxie/runtime/html5/image/ExifParser", ["moxie/core/utils/Basic", "moxie/runtime/html5/utils/BinaryReader", "moxie/core/Exceptions"], function(a, c, d) { | |
| - function e(f) { | |
| - function g(c, e) { | |
| - var f, g, h, i, j, m, n, o, p = this, | |
| - q = [], | |
| - r = {}, | |
| - s = { | |
| - 1: "BYTE", | |
| - 7: "UNDEFINED", | |
| - 2: "ASCII", | |
| - 3: "SHORT", | |
| - 4: "LONG", | |
| - 5: "RATIONAL", | |
| - 9: "SLONG", | |
| - 10: "SRATIONAL" | |
| - }, | |
| - t = { | |
| - BYTE: 1, | |
| - UNDEFINED: 1, | |
| - ASCII: 1, | |
| - SHORT: 2, | |
| - LONG: 4, | |
| - RATIONAL: 8, | |
| - SLONG: 4, | |
| - SRATIONAL: 8 | |
| - }; | |
| - for (f = p.SHORT(c), g = 0; g < f; g++) | |
| - if (q = [], n = c + 2 + 12 * g, h = e[p.SHORT(n)], h !== b) { | |
| - if (i = s[p.SHORT(n += 2)], j = p.LONG(n += 2), m = t[i], !m) throw new d.ImageError(d.ImageError.INVALID_META_ERR); | |
| - if (n += 4, m * j > 4 && (n = p.LONG(n) + l.tiffHeader), n + m * j >= this.length()) throw new d.ImageError(d.ImageError.INVALID_META_ERR); | |
| - "ASCII" !== i ? (q = p.asArray(i, n, j), o = 1 == j ? q[0] : q, k.hasOwnProperty(h) && "object" != typeof o ? r[h] = k[h][o] : r[h] = o) : r[h] = a.trim(p.STRING(n, j).replace(/\0$/, "")) | |
| - } return r | |
| - } | |
| - function h(a, b, c) { | |
| - var d, e, f, g = 0; | |
| - if ("string" == typeof b) { | |
| - var h = j[a.toLowerCase()]; | |
| - for (var i in h) | |
| - if (h[i] === b) { | |
| - b = i; | |
| - break | |
| - } | |
| + function h() { | |
| + k && j && i && (k.clear(), j.purge(), i.clear(), l = j = k = i = null) | |
| } | |
| - d = l[a.toLowerCase() + "IFD"], e = this.SHORT(d); | |
| - for (var k = 0; k < e; k++) | |
| - if (f = d + 12 * k + 2, this.SHORT(f) == b) { | |
| - g = f + 8; | |
| - break | |
| - } if (!g) return !1; | |
| + var i, j, k, l; | |
| + if (i = new d(f), 65496 !== i.SHORT(0)) throw new b.ImageError(b.ImageError.WRONG_FORMAT); | |
| + j = new c(f); | |
| try { | |
| - this.write(g, c, 4) | |
| - } catch (m) { | |
| - return !1 | |
| - } | |
| - return !0 | |
| - } | |
| - var i, j, k, l, m, n; | |
| - if (c.call(this, f), j = { | |
| - tiff: { | |
| - 274: "Orientation", | |
| - 270: "ImageDescription", | |
| - 271: "Make", | |
| - 272: "Model", | |
| - 305: "Software", | |
| - 34665: "ExifIFDPointer", | |
| - 34853: "GPSInfoIFDPointer" | |
| - }, | |
| - exif: { | |
| - 36864: "ExifVersion", | |
| - 40961: "ColorSpace", | |
| - 40962: "PixelXDimension", | |
| - 40963: "PixelYDimension", | |
| - 36867: "DateTimeOriginal", | |
| - 33434: "ExposureTime", | |
| - 33437: "FNumber", | |
| - 34855: "ISOSpeedRatings", | |
| - 37377: "ShutterSpeedValue", | |
| - 37378: "ApertureValue", | |
| - 37383: "MeteringMode", | |
| - 37384: "LightSource", | |
| - 37385: "Flash", | |
| - 37386: "FocalLength", | |
| - 41986: "ExposureMode", | |
| - 41987: "WhiteBalance", | |
| - 41990: "SceneCaptureType", | |
| - 41988: "DigitalZoomRatio", | |
| - 41992: "Contrast", | |
| - 41993: "Saturation", | |
| - 41994: "Sharpness" | |
| - }, | |
| - gps: { | |
| - 0: "GPSVersionID", | |
| - 1: "GPSLatitudeRef", | |
| - 2: "GPSLatitude", | |
| - 3: "GPSLongitudeRef", | |
| - 4: "GPSLongitude" | |
| - }, | |
| - thumb: { | |
| - 513: "JPEGInterchangeFormat", | |
| - 514: "JPEGInterchangeFormatLength" | |
| - } | |
| - }, k = { | |
| - ColorSpace: { | |
| - 1: "sRGB", | |
| - 0: "Uncalibrated" | |
| - }, | |
| - MeteringMode: { | |
| - 0: "Unknown", | |
| - 1: "Average", | |
| - 2: "CenterWeightedAverage", | |
| - 3: "Spot", | |
| - 4: "MultiSpot", | |
| - 5: "Pattern", | |
| - 6: "Partial", | |
| - 255: "Other" | |
| - }, | |
| - LightSource: { | |
| - 1: "Daylight", | |
| - 2: "Fliorescent", | |
| - 3: "Tungsten", | |
| - 4: "Flash", | |
| - 9: "Fine weather", | |
| - 10: "Cloudy weather", | |
| - 11: "Shade", | |
| - 12: "Daylight fluorescent (D 5700 - 7100K)", | |
| - 13: "Day white fluorescent (N 4600 -5400K)", | |
| - 14: "Cool white fluorescent (W 3900 - 4500K)", | |
| - 15: "White fluorescent (WW 3200 - 3700K)", | |
| - 17: "Standard light A", | |
| - 18: "Standard light B", | |
| - 19: "Standard light C", | |
| - 20: "D55", | |
| - 21: "D65", | |
| - 22: "D75", | |
| - 23: "D50", | |
| - 24: "ISO studio tungsten", | |
| - 255: "Other" | |
| - }, | |
| - Flash: { | |
| - 0: "Flash did not fire", | |
| - 1: "Flash fired", | |
| - 5: "Strobe return light not detected", | |
| - 7: "Strobe return light detected", | |
| - 9: "Flash fired, compulsory flash mode", | |
| - 13: "Flash fired, compulsory flash mode, return light not detected", | |
| - 15: "Flash fired, compulsory flash mode, return light detected", | |
| - 16: "Flash did not fire, compulsory flash mode", | |
| - 24: "Flash did not fire, auto mode", | |
| - 25: "Flash fired, auto mode", | |
| - 29: "Flash fired, auto mode, return light not detected", | |
| - 31: "Flash fired, auto mode, return light detected", | |
| - 32: "No flash function", | |
| - 65: "Flash fired, red-eye reduction mode", | |
| - 69: "Flash fired, red-eye reduction mode, return light not detected", | |
| - 71: "Flash fired, red-eye reduction mode, return light detected", | |
| - 73: "Flash fired, compulsory flash mode, red-eye reduction mode", | |
| - 77: "Flash fired, compulsory flash mode, red-eye reduction mode, return light not detected", | |
| - 79: "Flash fired, compulsory flash mode, red-eye reduction mode, return light detected", | |
| - 89: "Flash fired, auto mode, red-eye reduction mode", | |
| - 93: "Flash fired, auto mode, return light not detected, red-eye reduction mode", | |
| - 95: "Flash fired, auto mode, return light detected, red-eye reduction mode" | |
| - }, | |
| - ExposureMode: { | |
| - 0: "Auto exposure", | |
| - 1: "Manual exposure", | |
| - 2: "Auto bracket" | |
| - }, | |
| - WhiteBalance: { | |
| - 0: "Auto white balance", | |
| - 1: "Manual white balance" | |
| - }, | |
| - SceneCaptureType: { | |
| - 0: "Standard", | |
| - 1: "Landscape", | |
| - 2: "Portrait", | |
| - 3: "Night scene" | |
| - }, | |
| - Contrast: { | |
| - 0: "Normal", | |
| - 1: "Soft", | |
| - 2: "Hard" | |
| - }, | |
| - Saturation: { | |
| - 0: "Normal", | |
| - 1: "Low saturation", | |
| - 2: "High saturation" | |
| - }, | |
| - Sharpness: { | |
| - 0: "Normal", | |
| - 1: "Soft", | |
| - 2: "Hard" | |
| - }, | |
| - GPSLatitudeRef: { | |
| - N: "North latitude", | |
| - S: "South latitude" | |
| - }, | |
| - GPSLongitudeRef: { | |
| - E: "East longitude", | |
| - W: "West longitude" | |
| - } | |
| - }, l = { | |
| - tiffHeader: 10 | |
| - }, m = l.tiffHeader, i = { | |
| - clear: this.clear | |
| - }, a.extend(this, { | |
| - read: function() { | |
| - try { | |
| - return e.prototype.read.apply(this, arguments) | |
| - } catch (a) { | |
| - throw new d.ImageError(d.ImageError.INVALID_META_ERR) | |
| - } | |
| - }, | |
| - write: function() { | |
| - try { | |
| - return e.prototype.write.apply(this, arguments) | |
| - } catch (a) { | |
| - throw new d.ImageError(d.ImageError.INVALID_META_ERR) | |
| - } | |
| - }, | |
| - UNDEFINED: function() { | |
| - return this.BYTE.apply(this, arguments) | |
| - }, | |
| - RATIONAL: function(a) { | |
| - return this.LONG(a) / this.LONG(a + 4) | |
| - }, | |
| - SRATIONAL: function(a) { | |
| - return this.SLONG(a) / this.SLONG(a + 4) | |
| - }, | |
| - ASCII: function(a) { | |
| - return this.CHAR(a) | |
| + k = new e(j.get("app1")[0]) | |
| + } catch (m) {} | |
| + l = g.call(this), a.extend(this, { | |
| + type: "image/jpeg", | |
| + size: i.length(), | |
| + width: l && l.width || 0, | |
| + height: l && l.height || 0, | |
| + setExif: function(b, c) { | |
| + if (!k) return !1; | |
| + "object" === a.typeOf(b) ? a.each(b, function(a, b) { | |
| + k.setExif(b, a) | |
| + }) : k.setExif(b, c), j.set("app1", k.SEGMENT()) | |
| }, | |
| - TIFF: function() { | |
| - return n || null | |
| + writeHeaders: function() { | |
| + return arguments.length ? j.restore(arguments[0]) : j.restore(f) | |
| }, | |
| - EXIF: function() { | |
| - var b = null; | |
| - if (l.exifIFD) { | |
| - try { | |
| - b = g.call(this, l.exifIFD, j.exif) | |
| - } catch (c) { | |
| - return null | |
| - } | |
| - if (b.ExifVersion && "array" === a.typeOf(b.ExifVersion)) { | |
| - for (var d = 0, e = ""; d < b.ExifVersion.length; d++) e += String.fromCharCode(b.ExifVersion[d]); | |
| - b.ExifVersion = e | |
| - } | |
| - } | |
| - return b | |
| - }, | |
| - GPS: function() { | |
| - var b = null; | |
| - if (l.gpsIFD) { | |
| - try { | |
| - b = g.call(this, l.gpsIFD, j.gps) | |
| - } catch (c) { | |
| - return null | |
| - } | |
| - b.GPSVersionID && "array" === a.typeOf(b.GPSVersionID) && (b.GPSVersionID = b.GPSVersionID.join(".")) | |
| - } | |
| - return b | |
| + stripHeaders: function(a) { | |
| + return j.strip(a) | |
| }, | |
| + purge: function() { | |
| + h.call(this) | |
| + } | |
| + }), k && (this.meta = { | |
| + tiff: k.TIFF(), | |
| + exif: k.EXIF(), | |
| + gps: k.GPS(), | |
| thumb: function() { | |
| - if (l.IFD1) try { | |
| - var a = g.call(this, l.IFD1, j.thumb); | |
| - if ("JPEGInterchangeFormat" in a) return this.SEGMENT(l.tiffHeader + a.JPEGInterchangeFormat, a.JPEGInterchangeFormatLength) | |
| - } catch (b) {} | |
| - return null | |
| + var a, b, c = k.thumb(); | |
| + return c && (a = new d(c), b = g(a), a.clear(), b) ? (b.data = c, b) : null | |
| + }() | |
| + }) | |
| + } | |
| + return f | |
| + }), d("moxie/runtime/html5/image/PNG", ["moxie/core/Exceptions", "moxie/core/utils/Basic", "moxie/runtime/html5/utils/BinaryReader"], function(a, b, c) { | |
| + function d(d) { | |
| + function e() { | |
| + var a, b; | |
| + return a = g.call(this, 8), "IHDR" == a.type ? (b = a.start, { | |
| + width: h.LONG(b), | |
| + height: h.LONG(b += 4) | |
| + }) : null | |
| + } | |
| + | |
| + function f() { | |
| + h && (h.clear(), d = k = i = j = h = null) | |
| + } | |
| + | |
| + function g(a) { | |
| + var b, c, d, e; | |
| + return b = h.LONG(a), c = h.STRING(a += 4, 4), d = a += 4, e = h.LONG(a + b), { | |
| + length: b, | |
| + type: c, | |
| + start: d, | |
| + CRC: e | |
| + } | |
| + } | |
| + var h, i, j, k; | |
| + h = new c(d), | |
| + function() { | |
| + var b = 0, | |
| + c = 0, | |
| + d = [35152, 20039, 3338, 6666]; | |
| + for (c = 0; c < d.length; c++, b += 2) | |
| + if (d[c] != h.SHORT(b)) throw new a.ImageError(a.ImageError.WRONG_FORMAT) | |
| + }(), k = e.call(this), b.extend(this, { | |
| + type: "image/png", | |
| + size: h.length(), | |
| + width: k.width, | |
| + height: k.height, | |
| + purge: function() { | |
| + f.call(this) | |
| + } | |
| + }), f.call(this) | |
| + } | |
| + return d | |
| + }), d("moxie/runtime/html5/image/ImageInfo", ["moxie/core/utils/Basic", "moxie/core/Exceptions", "moxie/runtime/html5/image/JPEG", "moxie/runtime/html5/image/PNG"], function(a, b, c, d) { | |
| + return function(e) { | |
| + var f, g = [c, d]; | |
| + f = function() { | |
| + for (var a = 0; a < g.length; a++) try { | |
| + return new g[a](e) | |
| + } catch (c) {} | |
| + throw new b.ImageError(b.ImageError.WRONG_FORMAT) | |
| + }(), a.extend(this, { | |
| + type: "", | |
| + size: 0, | |
| + width: 0, | |
| + height: 0, | |
| + setExif: function() {}, | |
| + writeHeaders: function(a) { | |
| + return a | |
| }, | |
| - setExif: function(a, b) { | |
| - return ("PixelXDimension" === a || "PixelYDimension" === a) && h.call(this, "exif", a, b) | |
| + stripHeaders: function(a) { | |
| + return a | |
| }, | |
| - clear: function() { | |
| - i.clear(), f = j = k = n = l = i = null | |
| + purge: function() { | |
| + e = null | |
| } | |
| - }), 65505 !== this.SHORT(0) || "EXIF\0" !== this.STRING(4, 5).toUpperCase()) throw new d.ImageError(d.ImageError.INVALID_META_ERR); | |
| - if (this.littleEndian = 18761 == this.SHORT(m), 42 !== this.SHORT(m += 2)) throw new d.ImageError(d.ImageError.INVALID_META_ERR); | |
| - l.IFD0 = l.tiffHeader + this.LONG(m += 2), n = g.call(this, l.IFD0, j.tiff), "ExifIFDPointer" in n && (l.exifIFD = l.tiffHeader + n.ExifIFDPointer, delete n.ExifIFDPointer), "GPSInfoIFDPointer" in n && (l.gpsIFD = l.tiffHeader + n.GPSInfoIFDPointer, delete n.GPSInfoIFDPointer), a.isEmptyObj(n) && (n = null); | |
| - var o = this.LONG(l.IFD0 + 12 * this.SHORT(l.IFD0) + 2); | |
| - o && (l.IFD1 = l.tiffHeader + o) | |
| - } | |
| - return e.prototype = c.prototype, e | |
| - }), d("moxie/runtime/html5/image/JPEG", ["moxie/core/utils/Basic", "moxie/core/Exceptions", "moxie/runtime/html5/image/JPEGHeaders", "moxie/runtime/html5/utils/BinaryReader", "moxie/runtime/html5/image/ExifParser"], function(a, b, c, d, e) { | |
| - function f(f) { | |
| - function g(a) { | |
| - var b, c, d = 0; | |
| - for (a || (a = j); d <= a.length();) { | |
| - if (b = a.SHORT(d += 2), b >= 65472 && b <= 65475) return d += 5, { | |
| - height: a.SHORT(d), | |
| - width: a.SHORT(d += 2) | |
| - }; | |
| - c = a.SHORT(d += 2), d += c - 2 | |
| + }), a.extend(this, f), this.purge = function() { | |
| + f.purge(), f = null | |
| } | |
| - return null | |
| - } | |
| - | |
| - function h() { | |
| - var a, b, c = l.thumb(); | |
| - return c && (a = new d(c), b = g(a), a.clear(), b) ? (b.data = c, b) : null | |
| } | |
| - | |
| - function i() { | |
| - l && k && j && (l.clear(), k.purge(), j.clear(), m = k = l = j = null) | |
| - } | |
| - var j, k, l, m; | |
| - if (j = new d(f), 65496 !== j.SHORT(0)) throw new b.ImageError(b.ImageError.WRONG_FORMAT); | |
| - k = new c(f); | |
| - try { | |
| - l = new e(k.get("app1")[0]) | |
| - } catch (n) {} | |
| - m = g.call(this), a.extend(this, { | |
| - type: "image/jpeg", | |
| - size: j.length(), | |
| - width: m && m.width || 0, | |
| - height: m && m.height || 0, | |
| - setExif: function(b, c) { | |
| - return !!l && ("object" === a.typeOf(b) ? a.each(b, function(a, b) { | |
| - l.setExif(b, a) | |
| - }) : l.setExif(b, c), void k.set("app1", l.SEGMENT())) | |
| - }, | |
| - writeHeaders: function() { | |
| - return arguments.length ? k.restore(arguments[0]) : k.restore(f) | |
| - }, | |
| - stripHeaders: function(a) { | |
| - return k.strip(a) | |
| - }, | |
| - purge: function() { | |
| - i.call(this) | |
| - } | |
| - }), l && (this.meta = { | |
| - tiff: l.TIFF(), | |
| - exif: l.EXIF(), | |
| - gps: l.GPS(), | |
| - thumb: h() | |
| - }) | |
| - } | |
| - return f | |
| - }), d("moxie/runtime/html5/image/PNG", ["moxie/core/Exceptions", "moxie/core/utils/Basic", "moxie/runtime/html5/utils/BinaryReader"], function(a, b, c) { | |
| - function d(d) { | |
| - function e() { | |
| - var a, b; | |
| - return a = g.call(this, 8), "IHDR" == a.type ? (b = a.start, { | |
| - width: h.LONG(b), | |
| - height: h.LONG(b += 4) | |
| - }) : null | |
| - } | |
| - | |
| - function f() { | |
| - h && (h.clear(), d = k = i = j = h = null) | |
| - } | |
| - | |
| - function g(a) { | |
| - var b, c, d, e; | |
| - return b = h.LONG(a), c = h.STRING(a += 4, 4), d = a += 4, e = h.LONG(a + b), { | |
| - length: b, | |
| - type: c, | |
| - start: d, | |
| - CRC: e | |
| - } | |
| - } | |
| - var h, i, j, k; | |
| - h = new c(d), | |
| - function() { | |
| - var b = 0, | |
| - c = 0, | |
| - d = [35152, 20039, 3338, 6666]; | |
| - for (c = 0; c < d.length; c++, b += 2) | |
| - if (d[c] != h.SHORT(b)) throw new a.ImageError(a.ImageError.WRONG_FORMAT) | |
| - }(), k = e.call(this), b.extend(this, { | |
| - type: "image/png", | |
| - size: h.length(), | |
| - width: k.width, | |
| - height: k.height, | |
| - purge: function() { | |
| - f.call(this) | |
| + }), d("moxie/runtime/html5/image/MegaPixel", [], function() { | |
| + function a(a, d, e) { | |
| + var f = a.naturalWidth, | |
| + g = a.naturalHeight, | |
| + h = e.width, | |
| + i = e.height, | |
| + j = e.x || 0, | |
| + k = e.y || 0, | |
| + l = d.getContext("2d"); | |
| + b(a) && (f /= 2, g /= 2); | |
| + var m = 1024, | |
| + n = document.createElement("canvas"); | |
| + n.width = n.height = m; | |
| + for (var o = n.getContext("2d"), p = c(a, f, g), q = 0; q < g;) { | |
| + for (var r = q + m > g ? g - q : m, s = 0; s < f;) { | |
| + var t = s + m > f ? f - s : m; | |
| + o.clearRect(0, 0, m, m), o.drawImage(a, -s, -q); | |
| + var u = s * h / f + j << 0, | |
| + v = Math.ceil(t * h / f), | |
| + w = q * i / g / p + k << 0, | |
| + x = Math.ceil(r * i / g / p); | |
| + l.drawImage(n, 0, 0, t, r, u, w, v, x), s += m | |
| } | |
| - }), f.call(this) | |
| - } | |
| - return d | |
| - }), d("moxie/runtime/html5/image/ImageInfo", ["moxie/core/utils/Basic", "moxie/core/Exceptions", "moxie/runtime/html5/image/JPEG", "moxie/runtime/html5/image/PNG"], function(a, b, c, d) { | |
| - return function(e) { | |
| - var f, g = [c, d]; | |
| - f = function() { | |
| - for (var a = 0; a < g.length; a++) try { | |
| - return new g[a](e) | |
| - } catch (c) {} | |
| - throw new b.ImageError(b.ImageError.WRONG_FORMAT) | |
| - }(), a.extend(this, { | |
| - type: "", | |
| - size: 0, | |
| - width: 0, | |
| - height: 0, | |
| - setExif: function() {}, | |
| - writeHeaders: function(a) { | |
| - return a | |
| - }, | |
| - stripHeaders: function(a) { | |
| - return a | |
| - }, | |
| - purge: function() { | |
| - e = null | |
| + q += m | |
| } | |
| - }), a.extend(this, f), this.purge = function() { | |
| - f.purge(), f = null | |
| + n = o = null | |
| } | |
| - } | |
| - }), d("moxie/runtime/html5/image/MegaPixel", [], function() { | |
| - function a(a, d, e) { | |
| - var f = a.naturalWidth, | |
| - g = a.naturalHeight, | |
| - h = e.width, | |
| - i = e.height, | |
| - j = e.x || 0, | |
| - k = e.y || 0, | |
| - l = d.getContext("2d"); | |
| - b(a) && (f /= 2, g /= 2); | |
| - var m = 1024, | |
| - n = document.createElement("canvas"); | |
| - n.width = n.height = m; | |
| - for (var o = n.getContext("2d"), p = c(a, f, g), q = 0; q < g;) { | |
| - for (var r = q + m > g ? g - q : m, s = 0; s < f;) { | |
| - var t = s + m > f ? f - s : m; | |
| - o.clearRect(0, 0, m, m), o.drawImage(a, -s, -q); | |
| - var u = s * h / f + j << 0, | |
| - v = Math.ceil(t * h / f), | |
| - w = q * i / g / p + k << 0, | |
| - x = Math.ceil(r * i / g / p); | |
| - l.drawImage(n, 0, 0, t, r, u, w, v, x), s += m | |
| + | |
| + function b(a) { | |
| + var b = a.naturalWidth; | |
| + if (b * a.naturalHeight > 1048576) { | |
| + var c = document.createElement("canvas"); | |
| + c.width = c.height = 1; | |
| + var d = c.getContext("2d"); | |
| + return d.drawImage(a, 1 - b, 0), 0 === d.getImageData(0, 0, 1, 1).data[3] | |
| } | |
| - q += m | |
| + return !1 | |
| } | |
| - n = o = null | |
| - } | |
| - function b(a) { | |
| - var b = a.naturalWidth, | |
| - c = a.naturalHeight; | |
| - if (b * c > 1048576) { | |
| + function c(a, b, c) { | |
| var d = document.createElement("canvas"); | |
| - d.width = d.height = 1; | |
| + d.width = 1, d.height = c; | |
| var e = d.getContext("2d"); | |
| - return e.drawImage(a, -b + 1, 0), 0 === e.getImageData(0, 0, 1, 1).data[3] | |
| - } | |
| - return !1 | |
| - } | |
| - | |
| - function c(a, b, c) { | |
| - var d = document.createElement("canvas"); | |
| - d.width = 1, d.height = c; | |
| - var e = d.getContext("2d"); | |
| - e.drawImage(a, 0, 0); | |
| - for (var f = e.getImageData(0, 0, 1, c).data, g = 0, h = c, i = c; i > g;) { | |
| - var j = f[4 * (i - 1) + 3]; | |
| - 0 === j ? h = i : g = i, i = h + g >> 1 | |
| - } | |
| - d = null; | |
| - var k = i / c; | |
| - return 0 === k ? 1 : k | |
| - } | |
| - return { | |
| - isSubsampled: b, | |
| - renderTo: a | |
| - } | |
| - }), d("moxie/runtime/html5/image/Image", ["moxie/runtime/html5/Runtime", "moxie/core/utils/Basic", "moxie/core/Exceptions", "moxie/core/utils/Encode", "moxie/file/Blob", "moxie/file/File", "moxie/runtime/html5/image/ImageInfo", "moxie/runtime/html5/image/MegaPixel", "moxie/core/utils/Mime", "moxie/core/utils/Env"], function(a, b, c, d, e, f, g, h, i, j) { | |
| - function k() { | |
| - function a() { | |
| - if (!u && !s) throw new c.ImageError(c.DOMException.INVALID_STATE_ERR); | |
| - return u || s | |
| - } | |
| - | |
| - function k(a) { | |
| - return d.atob(a.substring(a.indexOf("base64,") + 7)) | |
| - } | |
| - | |
| - function l(a, b) { | |
| - return "data:" + (b || "") + ";base64," + d.btoa(a) | |
| - } | |
| - | |
| - function m(a) { | |
| - var b = this; | |
| - s = new Image, s.onerror = function() { | |
| - r.call(this), b.trigger("error", c.ImageError.WRONG_FORMAT) | |
| - }, s.onload = function() { | |
| - b.trigger("load") | |
| - }, s.src = "data:" == a.substr(0, 5) ? a : l(a, w.type) | |
| + e.drawImage(a, 0, 0); | |
| + for (var f = e.getImageData(0, 0, 1, c).data, g = 0, h = c, i = c; i > g;) { | |
| + 0 === f[4 * (i - 1) + 3] ? h = i : g = i, i = h + g >> 1 | |
| + } | |
| + d = null; | |
| + var j = i / c; | |
| + return 0 === j ? 1 : j | |
| } | |
| - | |
| - function n(a, b) { | |
| - var d, e = this; | |
| - return window.FileReader ? (d = new FileReader, d.onload = function() { | |
| - b(this.result) | |
| - }, d.onerror = function() { | |
| - e.trigger("error", c.ImageError.WRONG_FORMAT) | |
| - }, d.readAsDataURL(a), void 0) : b(a.getAsDataURL()) | |
| + return { | |
| + isSubsampled: b, | |
| + renderTo: a | |
| } | |
| - | |
| - function o(c, d, e, f) { | |
| - var g, h, i, j, k, l = this, | |
| - m = 0, | |
| - n = 0; | |
| - if (z = f, k = this.meta && this.meta.tiff && this.meta.tiff.Orientation || 1, b.inArray(k, [5, 6, 7, 8]) !== -1) { | |
| - var o = c; | |
| - c = d, d = o | |
| + }), d("moxie/runtime/html5/image/Image", ["moxie/runtime/html5/Runtime", "moxie/core/utils/Basic", "moxie/core/Exceptions", "moxie/core/utils/Encode", "moxie/file/Blob", "moxie/file/File", "moxie/runtime/html5/image/ImageInfo", "moxie/runtime/html5/image/MegaPixel", "moxie/core/utils/Mime", "moxie/core/utils/Env"], function(a, b, c, d, e, f, g, h, i, j) { | |
| + function k() { | |
| + function a() { | |
| + if (!u && !s) throw new c.ImageError(c.DOMException.INVALID_STATE_ERR); | |
| + return u || s | |
| } | |
| - return h = a(), e ? (c = Math.min(c, h.width), d = Math.min(d, h.height), g = Math.max(c / h.width, d / h.height)) : g = Math.min(c / h.width, d / h.height), g > 1 && !e && f ? void this.trigger("Resize") : (u || (u = document.createElement("canvas")), i = Math.round(h.width * g), j = Math.round(h.height * g), e ? (u.width = c, u.height = d, i > c && (m = Math.round((i - c) / 2)), j > d && (n = Math.round((j - d) / 2))) : (u.width = i, u.height = j), z || q(u.width, u.height, k), p.call(this, h, u, -m, -n, i, j), this.width = u.width, this.height = u.height, y = !0, void l.trigger("Resize")) | |
| - } | |
| - function p(a, b, c, d, e, f) { | |
| - if ("iOS" === j.OS) h.renderTo(a, b, { | |
| - width: e, | |
| - height: f, | |
| - x: c, | |
| - y: d | |
| - }); | |
| - else { | |
| - var g = b.getContext("2d"); | |
| - g.drawImage(a, c, d, e, f) | |
| + function k(a) { | |
| + return d.atob(a.substring(a.indexOf("base64,") + 7)) | |
| } | |
| - } | |
| - function q(a, b, c) { | |
| - switch (c) { | |
| - case 5: | |
| - case 6: | |
| - case 7: | |
| - case 8: | |
| - u.width = b, u.height = a; | |
| - break; | |
| - default: | |
| - u.width = a, u.height = b | |
| + function l(a, b) { | |
| + return "data:" + (b || "") + ";base64," + d.btoa(a) | |
| } | |
| - var d = u.getContext("2d"); | |
| - switch (c) { | |
| - case 2: | |
| - d.translate(a, 0), d.scale(-1, 1); | |
| - break; | |
| - case 3: | |
| - d.translate(a, b), d.rotate(Math.PI); | |
| - break; | |
| - case 4: | |
| - d.translate(0, b), d.scale(1, -1); | |
| - break; | |
| - case 5: | |
| - d.rotate(.5 * Math.PI), d.scale(1, -1); | |
| - break; | |
| - case 6: | |
| - d.rotate(.5 * Math.PI), d.translate(0, -b); | |
| - break; | |
| - case 7: | |
| - d.rotate(.5 * Math.PI), d.translate(a, -b), d.scale(-1, 1); | |
| - break; | |
| - case 8: | |
| - d.rotate(-.5 * Math.PI), d.translate(-a, 0) | |
| - } | |
| - } | |
| - function r() { | |
| - t && (t.purge(), t = null), v = s = u = w = null, y = !1 | |
| - } | |
| - var s, t, u, v, w, x = this, | |
| - y = !1, | |
| - z = !0; | |
| - b.extend(this, { | |
| - loadFromBlob: function(a) { | |
| - var b = this, | |
| - d = b.getRuntime(), | |
| - e = !(arguments.length > 1) || arguments[1]; | |
| - if (!d.can("access_binary")) throw new c.RuntimeError(c.RuntimeError.NOT_SUPPORTED_ERR); | |
| - return w = a, a.isDetached() ? (v = a.getSource(), void m.call(this, v)) : void n.call(this, a.getSource(), function(a) { | |
| - e && (v = k(a)), m.call(b, a) | |
| - }) | |
| - }, | |
| - loadFromImage: function(a, b) { | |
| - this.meta = a.meta, w = new f(null, { | |
| - name: a.name, | |
| - size: a.size, | |
| - type: a.type | |
| - }), m.call(this, b ? v = a.getAsBinaryString() : a.getAsDataURL()) | |
| - }, | |
| - getInfo: function() { | |
| - var b, c = this.getRuntime(); | |
| - return !t && v && c.can("access_image_binary") && (t = new g(v)), b = { | |
| - width: a().width || 0, | |
| - height: a().height || 0, | |
| - type: w.type || i.getFileMime(w.name), | |
| - size: v && v.length || w.size || 0, | |
| - name: w.name || "", | |
| - meta: t && t.meta || this.meta || {} | |
| - }, !b.meta || !b.meta.thumb || b.meta.thumb.data instanceof e || (b.meta.thumb.data = new e(null, { | |
| - type: "image/jpeg", | |
| - data: b.meta.thumb.data | |
| - })), b | |
| - }, | |
| - downsize: function() { | |
| - o.apply(this, arguments) | |
| - }, | |
| - getAsCanvas: function() { | |
| - return u && (u.id = this.uid + "_canvas"), u | |
| - }, | |
| - getAsBlob: function(a, b) { | |
| - return a !== this.type && o.call(this, this.width, this.height, !1), new f(null, { | |
| - name: w.name || "", | |
| - type: a, | |
| - data: x.getAsBinaryString.call(this, a, b) | |
| - }) | |
| - }, | |
| - getAsDataURL: function(a) { | |
| - var b = arguments[1] || 90; | |
| - if (!y) return s.src; | |
| - if ("image/jpeg" !== a) return u.toDataURL("image/png"); | |
| - try { | |
| - return u.toDataURL("image/jpeg", b / 100) | |
| - } catch (c) { | |
| - return u.toDataURL("image/jpeg") | |
| - } | |
| - }, | |
| - getAsBinaryString: function(a, b) { | |
| - if (!y) return v || (v = k(x.getAsDataURL(a, b))), v; | |
| - if ("image/jpeg" !== a) v = k(x.getAsDataURL(a, b)); | |
| + function m(a) { | |
| + var b = this; | |
| + s = new Image, s.onerror = function() { | |
| + r.call(this), b.trigger("error", c.ImageError.WRONG_FORMAT) | |
| + }, s.onload = function() { | |
| + b.trigger("load") | |
| + }, s.src = "data:" == a.substr(0, 5) ? a : l(a, w.type) | |
| + } | |
| + | |
| + function n(a, b) { | |
| + var d, e = this; | |
| + if (!window.FileReader) return b(a.getAsDataURL()); | |
| + d = new FileReader, d.onload = function() { | |
| + b(this.result) | |
| + }, d.onerror = function() { | |
| + e.trigger("error", c.ImageError.WRONG_FORMAT) | |
| + }, d.readAsDataURL(a) | |
| + } | |
| + | |
| + function o(c, d, e, f) { | |
| + var g, h, i, j, k, l = this, | |
| + m = 0, | |
| + n = 0; | |
| + if (z = f, k = this.meta && this.meta.tiff && this.meta.tiff.Orientation || 1, -1 !== b.inArray(k, [5, 6, 7, 8])) { | |
| + var o = c; | |
| + c = d, d = o | |
| + } | |
| + if (h = a(), e ? (c = Math.min(c, h.width), d = Math.min(d, h.height), g = Math.max(c / h.width, d / h.height)) : g = Math.min(c / h.width, d / h.height), g > 1 && !e && f) return void this.trigger("Resize"); | |
| + u || (u = document.createElement("canvas")), i = Math.round(h.width * g), j = Math.round(h.height * g), e ? (u.width = c, u.height = d, i > c && (m = Math.round((i - c) / 2)), j > d && (n = Math.round((j - d) / 2))) : (u.width = i, u.height = j), z || q(u.width, u.height, k), p.call(this, h, u, -m, -n, i, j), this.width = u.width, this.height = u.height, y = !0, l.trigger("Resize") | |
| + } | |
| + | |
| + function p(a, b, c, d, e, f) { | |
| + if ("iOS" === j.OS) h.renderTo(a, b, { | |
| + width: e, | |
| + height: f, | |
| + x: c, | |
| + y: d | |
| + }); | |
| else { | |
| - var c; | |
| - b || (b = 90); | |
| - try { | |
| - c = u.toDataURL("image/jpeg", b / 100) | |
| - } catch (d) { | |
| - c = u.toDataURL("image/jpeg") | |
| - } | |
| - v = k(c), t && (v = t.stripHeaders(v), z && (t.meta && t.meta.exif && t.setExif({ | |
| - PixelXDimension: this.width, | |
| - PixelYDimension: this.height | |
| - }), v = t.writeHeaders(v)), t.purge(), t = null) | |
| + b.getContext("2d").drawImage(a, c, d, e, f) | |
| } | |
| - return y = !1, v | |
| - }, | |
| - destroy: function() { | |
| - x = null, r.call(this), this.getRuntime().getShim().removeInstance(this.uid) | |
| } | |
| - }) | |
| - } | |
| - return a.Image = k | |
| - }), d("moxie/runtime/flash/Runtime", [], function() { | |
| - return {} | |
| - }), d("moxie/runtime/silverlight/Runtime", [], function() { | |
| - return {} | |
| - }), d("moxie/runtime/html4/Runtime", ["moxie/core/utils/Basic", "moxie/core/Exceptions", "moxie/runtime/Runtime", "moxie/core/utils/Env"], function(a, b, c, d) { | |
| - function e(b) { | |
| - var e = this, | |
| - h = c.capTest, | |
| - i = c.capTrue; | |
| - c.call(this, b, f, { | |
| - access_binary: h(window.FileReader || window.File && File.getAsDataURL), | |
| - access_image_binary: !1, | |
| - display_media: h(g.Image && (d.can("create_canvas") || d.can("use_data_uri_over32kb"))), | |
| - do_cors: !1, | |
| - drag_and_drop: !1, | |
| - filter_by_extension: h(function() { | |
| - return "Chrome" === d.browser && d.verComp(d.version, 28, ">=") || "IE" === d.browser && d.verComp(d.version, 10, ">=") || "Safari" === d.browser && d.verComp(d.version, 7, ">=") | |
| - }()), | |
| - resize_image: function() { | |
| - return g.Image && e.can("access_binary") && d.can("create_canvas") | |
| - }, | |
| - report_upload_progress: !1, | |
| - return_response_headers: !1, | |
| - return_response_type: function(b) { | |
| - return !("json" !== b || !window.JSON) || !!~a.inArray(b, ["text", "document", ""]) | |
| - }, | |
| - return_status_code: function(b) { | |
| - return !a.arrayDiff(b, [200, 404]) | |
| - }, | |
| - select_file: function() { | |
| - return d.can("use_fileinput") | |
| - }, | |
| - select_multiple: !1, | |
| - send_binary_string: !1, | |
| - send_custom_headers: !1, | |
| - send_multipart: !0, | |
| - slice_blob: !1, | |
| - stream_upload: function() { | |
| - return e.can("select_file") | |
| - }, | |
| - summon_file_dialog: function() { | |
| - return e.can("select_file") && ("Firefox" === d.browser && d.verComp(d.version, 4, ">=") || "Opera" === d.browser && d.verComp(d.version, 12, ">=") || "IE" === d.browser && d.verComp(d.version, 10, ">=") || !!~a.inArray(d.browser, ["Chrome", "Safari"])) | |
| - }, | |
| - upload_filesize: i, | |
| - use_http_method: function(b) { | |
| - return !a.arrayDiff(b, ["GET", "POST"]) | |
| - } | |
| - }), a.extend(this, { | |
| - init: function() { | |
| - this.trigger("Init") | |
| - }, | |
| - destroy: function(a) { | |
| - return function() { | |
| - a.call(e), a = e = null | |
| + | |
| + function q(a, b, c) { | |
| + switch (c) { | |
| + case 5: | |
| + case 6: | |
| + case 7: | |
| + case 8: | |
| + u.width = b, u.height = a; | |
| + break; | |
| + default: | |
| + u.width = a, u.height = b | |
| } | |
| - }(this.destroy) | |
| - }), a.extend(this.getShim(), g) | |
| - } | |
| - var f = "html4", | |
| - g = {}; | |
| - return c.addConstructor(f, e), g | |
| - }), d("moxie/runtime/html4/file/FileInput", ["moxie/runtime/html4/Runtime", "moxie/file/File", "moxie/core/utils/Basic", "moxie/core/utils/Dom", "moxie/core/utils/Events", "moxie/core/utils/Mime", "moxie/core/utils/Env"], function(a, b, c, d, e, f, g) { | |
| - function h() { | |
| - function a() { | |
| - var f, k, l, m, n, o, p = this, | |
| - q = p.getRuntime(); | |
| - o = c.guid("uid_"), f = q.getShimContainer(), h && (l = d.get(h + "_form"), l && c.extend(l.style, { | |
| - top: "100%" | |
| - })), m = document.createElement("form"), m.setAttribute("id", o + "_form"), m.setAttribute("method", "post"), m.setAttribute("enctype", "multipart/form-data"), m.setAttribute("encoding", "multipart/form-data"), c.extend(m.style, { | |
| - overflow: "hidden", | |
| - position: "absolute", | |
| - top: 0, | |
| - left: 0, | |
| - width: "100%", | |
| - height: "100%" | |
| - }), n = document.createElement("input"), n.setAttribute("id", o), n.setAttribute("type", "file"), n.setAttribute("name", i.name || "Filedata"), n.setAttribute("accept", j.join(",")), c.extend(n.style, { | |
| - fontSize: "999px", | |
| - opacity: 0 | |
| - }), m.appendChild(n), f.appendChild(m), c.extend(n.style, { | |
| - position: "absolute", | |
| - top: 0, | |
| - left: 0, | |
| - width: "100%", | |
| - height: "100%" | |
| - }), "IE" === g.browser && g.verComp(g.version, 10, "<") && c.extend(n.style, { | |
| - filter: "progid:DXImageTransform.Microsoft.Alpha(opacity=0)" | |
| - }), n.onchange = function() { | |
| - var c; | |
| - if (this.value) { | |
| - if (this.files) { | |
| - if (c = this.files[0], 0 === c.size) return void m.parentNode.removeChild(m) | |
| - } else c = { | |
| - name: this.value | |
| - }; | |
| - c = new b(q.uid, c), this.onchange = function() {}, a.call(p), p.files = [c], n.setAttribute("id", c.uid), m.setAttribute("id", c.uid + "_form"), p.trigger("change"), n = m = null | |
| + var d = u.getContext("2d"); | |
| + switch (c) { | |
| + case 2: | |
| + d.translate(a, 0), d.scale(-1, 1); | |
| + break; | |
| + case 3: | |
| + d.translate(a, b), d.rotate(Math.PI); | |
| + break; | |
| + case 4: | |
| + d.translate(0, b), d.scale(1, -1); | |
| + break; | |
| + case 5: | |
| + d.rotate(.5 * Math.PI), d.scale(1, -1); | |
| + break; | |
| + case 6: | |
| + d.rotate(.5 * Math.PI), d.translate(0, -b); | |
| + break; | |
| + case 7: | |
| + d.rotate(.5 * Math.PI), d.translate(a, -b), d.scale(-1, 1); | |
| + break; | |
| + case 8: | |
| + d.rotate(-.5 * Math.PI), d.translate(-a, 0) | |
| } | |
| - }, q.can("summon_file_dialog") && (k = d.get(i.browse_button), e.removeEvent(k, "click", p.uid), e.addEvent(k, "click", function(a) { | |
| - n && !n.disabled && n.click(), a.preventDefault() | |
| - }, p.uid)), h = o, f = l = k = null | |
| - } | |
| - var h, i, j = []; | |
| - c.extend(this, { | |
| - init: function(b) { | |
| - var c, g = this, | |
| - h = g.getRuntime(); | |
| - i = b, j = b.accept.mimes || f.extList2mimes(b.accept, h.can("filter_by_extension")), c = h.getShimContainer(), | |
| - function() { | |
| - var a, f, i; | |
| - a = d.get(b.browse_button), h.can("summon_file_dialog") && ("static" === d.getStyle(a, "position") && (a.style.position = "relative"), f = parseInt(d.getStyle(a, "z-index"), 10) || 1, a.style.zIndex = f, c.style.zIndex = f - 1), i = h.can("summon_file_dialog") ? a : c, e.addEvent(i, "mouseover", function() { | |
| - g.trigger("mouseenter") | |
| - }, g.uid), e.addEvent(i, "mouseout", function() { | |
| - g.trigger("mouseleave") | |
| - }, g.uid), e.addEvent(i, "mousedown", function() { | |
| - g.trigger("mousedown") | |
| - }, g.uid), e.addEvent(d.get(b.container), "mouseup", function() { | |
| - g.trigger("mouseup") | |
| - }, g.uid), a = null | |
| - }(), a.call(this), c = null, g.trigger({ | |
| - type: "ready", | |
| - async: !0 | |
| - }) | |
| - }, | |
| - disable: function(a) { | |
| - var b; | |
| - (b = d.get(h)) && (b.disabled = !!a) | |
| - }, | |
| - destroy: function() { | |
| - var a = this.getRuntime(), | |
| - b = a.getShim(), | |
| - c = a.getShimContainer(); | |
| - e.removeAllEvents(c, this.uid), e.removeAllEvents(i && d.get(i.container), this.uid), e.removeAllEvents(i && d.get(i.browse_button), this.uid), c && (c.innerHTML = ""), b.removeInstance(this.uid), h = j = i = c = b = null | |
| } | |
| - }) | |
| - } | |
| - return a.FileInput = h | |
| - }), d("moxie/runtime/html4/file/FileReader", ["moxie/runtime/html4/Runtime", "moxie/runtime/html5/file/FileReader"], function(a, b) { | |
| - return a.FileReader = b | |
| - }), d("moxie/runtime/html4/xhr/XMLHttpRequest", ["moxie/runtime/html4/Runtime", "moxie/core/utils/Basic", "moxie/core/utils/Dom", "moxie/core/utils/Url", "moxie/core/Exceptions", "moxie/core/utils/Events", "moxie/file/Blob", "moxie/xhr/FormData"], function(a, b, c, d, e, f, g, h) { | |
| - function i() { | |
| - function a(a) { | |
| - var b, d, e, g, h = this, | |
| - i = !1; | |
| - if (k) { | |
| - if (b = k.id.replace(/_iframe$/, ""), d = c.get(b + "_form")) { | |
| - for (e = d.getElementsByTagName("input"), g = e.length; g--;) switch (e[g].getAttribute("type")) { | |
| - case "hidden": | |
| - e[g].parentNode.removeChild(e[g]); | |
| - break; | |
| - case "file": | |
| - i = !0 | |
| + | |
| + function r() { | |
| + t && (t.purge(), t = null), v = s = u = w = null, y = !1 | |
| + } | |
| + var s, t, u, v, w, x = this, | |
| + y = !1, | |
| + z = !0; | |
| + b.extend(this, { | |
| + loadFromBlob: function(a) { | |
| + var b = this, | |
| + d = b.getRuntime(), | |
| + e = !(arguments.length > 1) || arguments[1]; | |
| + if (!d.can("access_binary")) throw new c.RuntimeError(c.RuntimeError.NOT_SUPPORTED_ERR); | |
| + if (w = a, a.isDetached()) return v = a.getSource(), void m.call(this, v); | |
| + n.call(this, a.getSource(), function(a) { | |
| + e && (v = k(a)), m.call(b, a) | |
| + }) | |
| + }, | |
| + loadFromImage: function(a, b) { | |
| + this.meta = a.meta, w = new f(null, { | |
| + name: a.name, | |
| + size: a.size, | |
| + type: a.type | |
| + }), m.call(this, b ? v = a.getAsBinaryString() : a.getAsDataURL()) | |
| + }, | |
| + getInfo: function() { | |
| + var b, c = this.getRuntime(); | |
| + return !t && v && c.can("access_image_binary") && (t = new g(v)), b = { | |
| + width: a().width || 0, | |
| + height: a().height || 0, | |
| + type: w.type || i.getFileMime(w.name), | |
| + size: v && v.length || w.size || 0, | |
| + name: w.name || "", | |
| + meta: t && t.meta || this.meta || {} | |
| + }, !b.meta || !b.meta.thumb || b.meta.thumb.data instanceof e || (b.meta.thumb.data = new e(null, { | |
| + type: "image/jpeg", | |
| + data: b.meta.thumb.data | |
| + })), b | |
| + }, | |
| + downsize: function() { | |
| + o.apply(this, arguments) | |
| + }, | |
| + getAsCanvas: function() { | |
| + return u && (u.id = this.uid + "_canvas"), u | |
| + }, | |
| + getAsBlob: function(a, b) { | |
| + return a !== this.type && o.call(this, this.width, this.height, !1), new f(null, { | |
| + name: w.name || "", | |
| + type: a, | |
| + data: x.getAsBinaryString.call(this, a, b) | |
| + }) | |
| + }, | |
| + getAsDataURL: function(a) { | |
| + var b = arguments[1] || 90; | |
| + if (!y) return s.src; | |
| + if ("image/jpeg" !== a) return u.toDataURL("image/png"); | |
| + try { | |
| + return u.toDataURL("image/jpeg", b / 100) | |
| + } catch (c) { | |
| + return u.toDataURL("image/jpeg") | |
| } | |
| - e = [], i || d.parentNode.removeChild(d), d = null | |
| - } | |
| - setTimeout(function() { | |
| - f.removeEvent(k, "load", h.uid), k.parentNode && k.parentNode.removeChild(k); | |
| - var b = h.getRuntime().getShimContainer(); | |
| - b.children.length || b.parentNode.removeChild(b), b = k = null, a() | |
| - }, 1) | |
| - } | |
| - } | |
| - var i, j, k; | |
| - b.extend(this, { | |
| - send: function(l, m) { | |
| - function n() { | |
| - var c = t.getShimContainer() || document.body, | |
| - e = document.createElement("div"); | |
| - e.innerHTML = '<iframe id="' + o + '_iframe" name="' + o + '_iframe" src="javascript:""" style="display:none"></iframe>', k = e.firstChild, c.appendChild(k), f.addEvent(k, "load", function() { | |
| + }, | |
| + getAsBinaryString: function(a, b) { | |
| + if (!y) return v || (v = k(x.getAsDataURL(a, b))), v; | |
| + if ("image/jpeg" !== a) v = k(x.getAsDataURL(a, b)); | |
| + else { | |
| var c; | |
| + b || (b = 90); | |
| try { | |
| - c = k.contentWindow.document || k.contentDocument || window.frames[k.id].document, /^4(0[0-9]|1[0-7]|2[2346])\s/.test(c.title) ? i = c.title.replace(/^(\d+).*$/, "$1") : (i = 200, j = b.trim(c.body.innerHTML), s.trigger({ | |
| - type: "progress", | |
| - loaded: j.length, | |
| - total: j.length | |
| - }), r && s.trigger({ | |
| - type: "uploadprogress", | |
| - loaded: r.size || 1025, | |
| - total: r.size || 1025 | |
| - })) | |
| - } catch (e) { | |
| - if (!d.hasSameOrigin(l.url)) return void a.call(s, function() { | |
| - s.trigger("error") | |
| - }); | |
| - i = 404 | |
| + c = u.toDataURL("image/jpeg", b / 100) | |
| + } catch (d) { | |
| + c = u.toDataURL("image/jpeg") | |
| } | |
| - a.call(s, function() { | |
| - s.trigger("load") | |
| + v = k(c), t && (v = t.stripHeaders(v), z && (t.meta && t.meta.exif && t.setExif({ | |
| + PixelXDimension: this.width, | |
| + PixelYDimension: this.height | |
| + }), v = t.writeHeaders(v)), t.purge(), t = null) | |
| + } | |
| + return y = !1, v | |
| + }, | |
| + destroy: function() { | |
| + x = null, r.call(this), this.getRuntime().getShim().removeInstance(this.uid) | |
| + } | |
| + }) | |
| + } | |
| + return a.Image = k | |
| + }), d("moxie/runtime/flash/Runtime", [], function() { | |
| + return {} | |
| + }), d("moxie/runtime/silverlight/Runtime", [], function() { | |
| + return {} | |
| + }), d("moxie/runtime/html4/Runtime", ["moxie/core/utils/Basic", "moxie/core/Exceptions", "moxie/runtime/Runtime", "moxie/core/utils/Env"], function(a, b, c, d) { | |
| + function e(b) { | |
| + var e = this, | |
| + h = c.capTest, | |
| + i = c.capTrue; | |
| + c.call(this, b, f, { | |
| + access_binary: h(window.FileReader || window.File && File.getAsDataURL), | |
| + access_image_binary: !1, | |
| + display_media: h(g.Image && (d.can("create_canvas") || d.can("use_data_uri_over32kb"))), | |
| + do_cors: !1, | |
| + drag_and_drop: !1, | |
| + filter_by_extension: h(function() { | |
| + return "Chrome" === d.browser && d.verComp(d.version, 28, ">=") || "IE" === d.browser && d.verComp(d.version, 10, ">=") || "Safari" === d.browser && d.verComp(d.version, 7, ">=") | |
| + }()), | |
| + resize_image: function() { | |
| + return g.Image && e.can("access_binary") && d.can("create_canvas") | |
| + }, | |
| + report_upload_progress: !1, | |
| + return_response_headers: !1, | |
| + return_response_type: function(b) { | |
| + return !("json" !== b || !window.JSON) || !!~a.inArray(b, ["text", "document", ""]) | |
| + }, | |
| + return_status_code: function(b) { | |
| + return !a.arrayDiff(b, [200, 404]) | |
| + }, | |
| + select_file: function() { | |
| + return d.can("use_fileinput") | |
| + }, | |
| + select_multiple: !1, | |
| + send_binary_string: !1, | |
| + send_custom_headers: !1, | |
| + send_multipart: !0, | |
| + slice_blob: !1, | |
| + stream_upload: function() { | |
| + return e.can("select_file") | |
| + }, | |
| + summon_file_dialog: function() { | |
| + return e.can("select_file") && ("Firefox" === d.browser && d.verComp(d.version, 4, ">=") || "Opera" === d.browser && d.verComp(d.version, 12, ">=") || "IE" === d.browser && d.verComp(d.version, 10, ">=") || !!~a.inArray(d.browser, ["Chrome", "Safari"])) | |
| + }, | |
| + upload_filesize: i, | |
| + use_http_method: function(b) { | |
| + return !a.arrayDiff(b, ["GET", "POST"]) | |
| + } | |
| + }), a.extend(this, { | |
| + init: function() { | |
| + this.trigger("Init") | |
| + }, | |
| + destroy: function(a) { | |
| + return function() { | |
| + a.call(e), a = e = null | |
| + } | |
| + }(this.destroy) | |
| + }), a.extend(this.getShim(), g) | |
| + } | |
| + var f = "html4", | |
| + g = {}; | |
| + return c.addConstructor(f, e), g | |
| + }), d("moxie/runtime/html4/file/FileInput", ["moxie/runtime/html4/Runtime", "moxie/file/File", "moxie/core/utils/Basic", "moxie/core/utils/Dom", "moxie/core/utils/Events", "moxie/core/utils/Mime", "moxie/core/utils/Env"], function(a, b, c, d, e, f, g) { | |
| + function h() { | |
| + function a() { | |
| + var f, k, l, m, n, o, p = this, | |
| + q = p.getRuntime(); | |
| + o = c.guid("uid_"), f = q.getShimContainer(), h && (l = d.get(h + "_form")) && c.extend(l.style, { | |
| + top: "100%" | |
| + }), m = document.createElement("form"), m.setAttribute("id", o + "_form"), m.setAttribute("method", "post"), m.setAttribute("enctype", "multipart/form-data"), m.setAttribute("encoding", "multipart/form-data"), c.extend(m.style, { | |
| + overflow: "hidden", | |
| + position: "absolute", | |
| + top: 0, | |
| + left: 0, | |
| + width: "100%", | |
| + height: "100%" | |
| + }), n = document.createElement("input"), n.setAttribute("id", o), n.setAttribute("type", "file"), n.setAttribute("name", i.name || "Filedata"), n.setAttribute("accept", j.join(",")), c.extend(n.style, { | |
| + fontSize: "999px", | |
| + opacity: 0 | |
| + }), m.appendChild(n), f.appendChild(m), c.extend(n.style, { | |
| + position: "absolute", | |
| + top: 0, | |
| + left: 0, | |
| + width: "100%", | |
| + height: "100%" | |
| + }), "IE" === g.browser && g.verComp(g.version, 10, "<") && c.extend(n.style, { | |
| + filter: "progid:DXImageTransform.Microsoft.Alpha(opacity=0)" | |
| + }), n.onchange = function() { | |
| + var c; | |
| + if (this.value) { | |
| + if (this.files) { | |
| + if (c = this.files[0], 0 === c.size) return void m.parentNode.removeChild(m) | |
| + } else c = { | |
| + name: this.value | |
| + }; | |
| + c = new b(q.uid, c), this.onchange = function() {}, a.call(p), p.files = [c], n.setAttribute("id", c.uid), m.setAttribute("id", c.uid + "_form"), p.trigger("change"), n = m = null | |
| + } | |
| + }, q.can("summon_file_dialog") && (k = d.get(i.browse_button), e.removeEvent(k, "click", p.uid), e.addEvent(k, "click", function(a) { | |
| + n && !n.disabled && n.click(), a.preventDefault() | |
| + }, p.uid)), h = o, f = l = k = null | |
| + } | |
| + var h, i, j = []; | |
| + c.extend(this, { | |
| + init: function(b) { | |
| + var c, g = this, | |
| + h = g.getRuntime(); | |
| + i = b, j = b.accept.mimes || f.extList2mimes(b.accept, h.can("filter_by_extension")), c = h.getShimContainer(), | |
| + function() { | |
| + var a, f, i; | |
| + a = d.get(b.browse_button), h.can("summon_file_dialog") && ("static" === d.getStyle(a, "position") && (a.style.position = "relative"), f = parseInt(d.getStyle(a, "z-index"), 10) || 1, a.style.zIndex = f, c.style.zIndex = f - 1), i = h.can("summon_file_dialog") ? a : c, e.addEvent(i, "mouseover", function() { | |
| + g.trigger("mouseenter") | |
| + }, g.uid), e.addEvent(i, "mouseout", function() { | |
| + g.trigger("mouseleave") | |
| + }, g.uid), e.addEvent(i, "mousedown", function() { | |
| + g.trigger("mousedown") | |
| + }, g.uid), e.addEvent(d.get(b.container), "mouseup", function() { | |
| + g.trigger("mouseup") | |
| + }, g.uid), a = null | |
| + }(), a.call(this), c = null, g.trigger({ | |
| + type: "ready", | |
| + async: !0 | |
| }) | |
| - }, s.uid) | |
| + }, | |
| + disable: function(a) { | |
| + var b; | |
| + (b = d.get(h)) && (b.disabled = !!a) | |
| + }, | |
| + destroy: function() { | |
| + var a = this.getRuntime(), | |
| + b = a.getShim(), | |
| + c = a.getShimContainer(); | |
| + e.removeAllEvents(c, this.uid), e.removeAllEvents(i && d.get(i.container), this.uid), e.removeAllEvents(i && d.get(i.browse_button), this.uid), c && (c.innerHTML = ""), b.removeInstance(this.uid), h = j = i = c = b = null | |
| } | |
| - var o, p, q, r, s = this, | |
| - t = s.getRuntime(); | |
| - if (i = j = null, m instanceof h && m.hasBlob()) { | |
| - if (r = m.getBlob(), o = r.uid, q = c.get(o), p = c.get(o + "_form"), !p) throw new e.DOMException(e.DOMException.NOT_FOUND_ERR) | |
| - } else o = b.guid("uid_"), p = document.createElement("form"), p.setAttribute("id", o + "_form"), p.setAttribute("method", l.method), p.setAttribute("enctype", "multipart/form-data"), p.setAttribute("encoding", "multipart/form-data"), t.getShimContainer().appendChild(p); | |
| - p.setAttribute("target", o + "_iframe"), m instanceof h && m.each(function(a, c) { | |
| - if (a instanceof g) q && q.setAttribute("name", c); | |
| - else { | |
| - var d = document.createElement("input"); | |
| - b.extend(d, { | |
| - type: "hidden", | |
| - name: c, | |
| - value: a | |
| - }), q ? p.insertBefore(d, q) : p.appendChild(d) | |
| + }) | |
| + } | |
| + return a.FileInput = h | |
| + }), d("moxie/runtime/html4/file/FileReader", ["moxie/runtime/html4/Runtime", "moxie/runtime/html5/file/FileReader"], function(a, b) { | |
| + return a.FileReader = b | |
| + }), d("moxie/runtime/html4/xhr/XMLHttpRequest", ["moxie/runtime/html4/Runtime", "moxie/core/utils/Basic", "moxie/core/utils/Dom", "moxie/core/utils/Url", "moxie/core/Exceptions", "moxie/core/utils/Events", "moxie/file/Blob", "moxie/xhr/FormData"], function(a, b, c, d, e, f, g, h) { | |
| + function i() { | |
| + function a(a) { | |
| + var b, d, e, g, h = this, | |
| + i = !1; | |
| + if (k) { | |
| + if (b = k.id.replace(/_iframe$/, ""), d = c.get(b + "_form")) { | |
| + for (e = d.getElementsByTagName("input"), g = e.length; g--;) switch (e[g].getAttribute("type")) { | |
| + case "hidden": | |
| + e[g].parentNode.removeChild(e[g]); | |
| + break; | |
| + case "file": | |
| + i = !0 | |
| + } | |
| + e = [], i || d.parentNode.removeChild(d), d = null | |
| } | |
| - }), p.setAttribute("action", l.url), n(), p.submit(), s.trigger("loadstart") | |
| - }, | |
| - getStatus: function() { | |
| - return i | |
| - }, | |
| - getResponse: function(a) { | |
| - if ("json" === a && "string" === b.typeOf(j) && window.JSON) try { | |
| - return JSON.parse(j.replace(/^\s*<pre[^>]*>/, "").replace(/<\/pre>\s*$/, "")) | |
| - } catch (c) { | |
| - return null | |
| + setTimeout(function() { | |
| + f.removeEvent(k, "load", h.uid), k.parentNode && k.parentNode.removeChild(k); | |
| + var b = h.getRuntime().getShimContainer(); | |
| + b.children.length || b.parentNode.removeChild(b), b = k = null, a() | |
| + }, 1) | |
| + } | |
| + } | |
| + var i, j, k; | |
| + b.extend(this, { | |
| + send: function(l, m) { | |
| + var n, o, p, q, r = this, | |
| + s = r.getRuntime(); | |
| + if (i = j = null, m instanceof h && m.hasBlob()) { | |
| + if (q = m.getBlob(), n = q.uid, p = c.get(n), !(o = c.get(n + "_form"))) throw new e.DOMException(e.DOMException.NOT_FOUND_ERR) | |
| + } else n = b.guid("uid_"), o = document.createElement("form"), o.setAttribute("id", n + "_form"), o.setAttribute("method", l.method), o.setAttribute("enctype", "multipart/form-data"), o.setAttribute("encoding", "multipart/form-data"), s.getShimContainer().appendChild(o); | |
| + o.setAttribute("target", n + "_iframe"), m instanceof h && m.each(function(a, c) { | |
| + if (a instanceof g) p && p.setAttribute("name", c); | |
| + else { | |
| + var d = document.createElement("input"); | |
| + b.extend(d, { | |
| + type: "hidden", | |
| + name: c, | |
| + value: a | |
| + }), p ? o.insertBefore(d, p) : o.appendChild(d) | |
| + } | |
| + }), o.setAttribute("action", l.url), | |
| + function() { | |
| + var c = s.getShimContainer() || document.body, | |
| + e = document.createElement("div"); | |
| + e.innerHTML = '<iframe id="' + n + '_iframe" name="' + n + '_iframe" src="javascript:""" style="display:none"></iframe>', k = e.firstChild, c.appendChild(k), f.addEvent(k, "load", function() { | |
| + var c; | |
| + try { | |
| + c = k.contentWindow.document || k.contentDocument || window.frames[k.id].document, /^4(0[0-9]|1[0-7]|2[2346])\s/.test(c.title) ? i = c.title.replace(/^(\d+).*$/, "$1") : (i = 200, j = b.trim(c.body.innerHTML), r.trigger({ | |
| + type: "progress", | |
| + loaded: j.length, | |
| + total: j.length | |
| + }), q && r.trigger({ | |
| + type: "uploadprogress", | |
| + loaded: q.size || 1025, | |
| + total: q.size || 1025 | |
| + })) | |
| + } catch (e) { | |
| + if (!d.hasSameOrigin(l.url)) return void a.call(r, function() { | |
| + r.trigger("error") | |
| + }); | |
| + i = 404 | |
| + } | |
| + a.call(r, function() { | |
| + r.trigger("load") | |
| + }) | |
| + }, r.uid) | |
| + }(), o.submit(), r.trigger("loadstart") | |
| + }, | |
| + getStatus: function() { | |
| + return i | |
| + }, | |
| + getResponse: function(a) { | |
| + if ("json" === a && "string" === b.typeOf(j) && window.JSON) try { | |
| + return JSON.parse(j.replace(/^\s*<pre[^>]*>/, "").replace(/<\/pre>\s*$/, "")) | |
| + } catch (c) { | |
| + return null | |
| + } | |
| + return j | |
| + }, | |
| + abort: function() { | |
| + var b = this; | |
| + k && k.contentWindow && (k.contentWindow.stop ? k.contentWindow.stop() : k.contentWindow.document.execCommand ? k.contentWindow.document.execCommand("Stop") : k.src = "about:blank"), a.call(this, function() { | |
| + b.dispatchEvent("abort") | |
| + }) | |
| } | |
| - return j | |
| - }, | |
| - abort: function() { | |
| - var b = this; | |
| - k && k.contentWindow && (k.contentWindow.stop ? k.contentWindow.stop() : k.contentWindow.document.execCommand ? k.contentWindow.document.execCommand("Stop") : k.src = "about:blank"), a.call(this, function() { | |
| - b.dispatchEvent("abort") | |
| - }) | |
| - } | |
| - }) | |
| - } | |
| - return a.XMLHttpRequest = i | |
| - }), d("moxie/runtime/html4/image/Image", ["moxie/runtime/html4/Runtime", "moxie/runtime/html5/image/Image"], function(a, b) { | |
| - return a.Image = b | |
| - }), f(["moxie/core/utils/Basic", "moxie/core/utils/Env", "moxie/core/I18n", "moxie/core/utils/Mime", "moxie/core/utils/Dom", "moxie/core/Exceptions", "moxie/core/EventTarget", "moxie/runtime/Runtime", "moxie/runtime/RuntimeClient", "moxie/file/FileInput", "moxie/core/utils/Encode", "moxie/file/Blob", "moxie/file/File", "moxie/file/FileDrop", "moxie/file/FileReader", "moxie/core/utils/Url", "moxie/runtime/RuntimeTarget", "moxie/file/FileReaderSync", "moxie/xhr/FormData", "moxie/xhr/XMLHttpRequest", "moxie/runtime/Transporter", "moxie/image/Image", "moxie/core/utils/Events"]) | |
| + }) | |
| + } | |
| + return a.XMLHttpRequest = i | |
| + }), d("moxie/runtime/html4/image/Image", ["moxie/runtime/html4/Runtime", "moxie/runtime/html5/image/Image"], function(a, b) { | |
| + return a.Image = b | |
| + }), | |
| + function(c) { | |
| + for (var d = 0; d < c.length; d++) { | |
| + for (var e = a, g = c[d], h = g.split(/[.\/]/), i = 0; i < h.length - 1; ++i) e[h[i]] === b && (e[h[i]] = {}), e = e[h[i]]; | |
| + e[h[h.length - 1]] = f[g] | |
| + } | |
| + }(["moxie/core/utils/Basic", "moxie/core/utils/Env", "moxie/core/I18n", "moxie/core/utils/Mime", "moxie/core/utils/Dom", "moxie/core/Exceptions", "moxie/core/EventTarget", "moxie/runtime/Runtime", "moxie/runtime/RuntimeClient", "moxie/file/FileInput", "moxie/core/utils/Encode", "moxie/file/Blob", "moxie/file/File", "moxie/file/FileDrop", "moxie/file/FileReader", "moxie/core/utils/Url", "moxie/runtime/RuntimeTarget", "moxie/file/FileReaderSync", "moxie/xhr/FormData", "moxie/xhr/XMLHttpRequest", "moxie/runtime/Transporter", "moxie/image/Image", "moxie/core/utils/Events"]) | |
| }(this), | |
| function(a) { | |
| "use strict"; | |
| var b = {}, | |
| c = a.moxie.core.utils.Basic.inArray; | |
| - return function d(a) { | |
| + (function d(a) { | |
| var e, f; | |
| for (e in a) f = typeof a[e], "object" !== f || ~c(e, ["Exceptions", "Env", "Mime"]) ? "function" === f && (b[e] = a[e]) : d(a[e]) | |
| - }(a.moxie), b.Env = a.moxie.core.utils.Env, b.Mime = a.moxie.core.utils.Mime, b.Exceptions = a.moxie.core.Exceptions, a.mOxie = b, a.o || (a.o = b), b | |
| + })(a.moxie), b.Env = a.moxie.core.utils.Env, b.Mime = a.moxie.core.utils.Mime, b.Exceptions = a.moxie.core.Exceptions, a.mOxie = b, a.o || (a.o = b) | |
| }(this); | |
| \ No newline at end of file | |
| diff -ur build-unminified/wp-includes/js/plupload/plupload.min.js build-branch-unminified/wp-includes/js/plupload/plupload.min.js | |
| --- build-unminified/wp-includes/js/plupload/plupload.min.js 2018-10-06 21:45:20.394533220 -0500 | |
| +++ build-branch-unminified/wp-includes/js/plupload/plupload.min.js 2018-10-06 21:42:21.053196120 -0500 | |
| @@ -22,7 +22,7 @@ | |
| b(a, !0) | |
| }) : "object" == typeof c ? g.each(c, function(a, c) { | |
| b(c, a) | |
| - }) : c === !0 && (a.chunk_size > 0 && (d.slice_blob = !0), !a.resize.enabled && a.multipart || (d.send_binary_string = !0), g.each(a, function(a, c) { | |
| + }) : !0 === c && (a.chunk_size > 0 && (d.slice_blob = !0), !a.resize.enabled && a.multipart || (d.send_binary_string = !0), g.each(a, function(a, c) { | |
| b(c, !!a, !0) | |
| })), a.runtimes = "html5,html4", d | |
| } | |
| @@ -55,7 +55,7 @@ | |
| getAll: function(a) { | |
| var b, c = []; | |
| "array" !== g.typeOf(a) && (a = [a]); | |
| - for (var d = a.length; d--;) b = g.get(a[d]), b && c.push(b); | |
| + for (var d = a.length; d--;)(b = g.get(a[d])) && c.push(b); | |
| return c.length ? c : null | |
| }, | |
| get: b.get, | |
| @@ -122,8 +122,7 @@ | |
| file: b | |
| }), c(!1)) : c(!0) | |
| }), g.addFileFilter("max_file_size", function(a, b, c) { | |
| - var d; | |
| - a = g.parseSize(a), b.size !== d && a && b.size > a ? (this.trigger("Error", { | |
| + a = g.parseSize(a), void 0 !== b.size && a && b.size > a ? (this.trigger("Error", { | |
| code: g.FILE_SIZE_ERROR, | |
| message: g.translate("File size error."), | |
| file: b | |
| @@ -239,7 +238,8 @@ | |
| var f = new b.Image; | |
| try { | |
| f.onload = function() { | |
| - return d.width > this.width && d.height > this.height && d.quality === c && d.preserve_headers && !d.crop ? (this.destroy(), e(a)) : void f.downsize(d.width, d.height, d.crop, d.preserve_headers) | |
| + if (d.width > this.width && d.height > this.height && d.quality === c && d.preserve_headers && !d.crop) return this.destroy(), e(a); | |
| + f.downsize(d.width, d.height, d.crop, d.preserve_headers) | |
| }, f.onresize = function() { | |
| e(this.getAsBlob(a.type, d.quality)), this.destroy() | |
| }, f.onerror = function() { | |
| @@ -340,17 +340,18 @@ | |
| c.status === g.UPLOADING && a.state !== g.STOPPED && (a.settings.send_file_name && (q.name = c.target_name || c.name), j && m.chunks && h.size > j ? (p = Math.min(j, h.size - n), l = h.slice(n, n + p)) : (p = h.size, l = h), j && m.chunks && (a.settings.send_chunk_number ? (q.chunk = Math.ceil(n / j), q.chunks = Math.ceil(h.size / j)) : (q.offset = n, q.total = h.size)), B = new b.XMLHttpRequest, B.upload && (B.upload.onprogress = function(b) { | |
| c.loaded = Math.min(c.size, n + b.loaded), a.trigger("UploadProgress", c) | |
| }), B.onload = function() { | |
| - return B.status >= 400 ? void d() : (k = a.settings.max_retries, p < h.size ? (l.destroy(), n += p, c.loaded = Math.min(n, h.size), a.trigger("ChunkUploaded", c, { | |
| + if (B.status >= 400) return void d(); | |
| + k = a.settings.max_retries, p < h.size ? (l.destroy(), n += p, c.loaded = Math.min(n, h.size), a.trigger("ChunkUploaded", c, { | |
| offset: c.loaded, | |
| total: h.size, | |
| response: B.responseText, | |
| status: B.status, | |
| responseHeaders: B.getAllResponseHeaders() | |
| - }), "Android Browser" === b.Env.browser && a.trigger("UploadProgress", c)) : c.loaded = c.size, l = o = null, void(!n || n >= h.size ? (c.size != c.origSize && (h.destroy(), h = null), a.trigger("UploadProgress", c), c.status = g.DONE, a.trigger("FileUploaded", c, { | |
| + }), "Android Browser" === b.Env.browser && a.trigger("UploadProgress", c)) : c.loaded = c.size, l = o = null, !n || n >= h.size ? (c.size != c.origSize && (h.destroy(), h = null), a.trigger("UploadProgress", c), c.status = g.DONE, a.trigger("FileUploaded", c, { | |
| response: B.responseText, | |
| status: B.status, | |
| responseHeaders: B.getAllResponseHeaders() | |
| - })) : e(f, 1))) | |
| + })) : e(f, 1) | |
| }, B.onerror = function() { | |
| d() | |
| }, B.onloadend = function() { | |
| @@ -525,7 +526,7 @@ | |
| d(a, function(c) { | |
| c || (D.push(a), m.push(a), j.trigger("FileFiltered", a)), e(b, 1) | |
| }) | |
| - })) : b.inArray(f, ["file", "blob"]) !== -1 ? h(new b.File(null, a)) : "node" === f && "filelist" === b.typeOf(a.files) ? b.each(a.files, h) : "array" === f && (c = null, b.each(a, h)) | |
| + })) : -1 !== b.inArray(f, ["file", "blob"]) ? h(new b.File(null, a)) : "node" === f && "filelist" === b.typeOf(a.files) ? b.each(a.files, h) : "array" === f && (c = null, b.each(a, h)) | |
| } | |
| var i, j = this, | |
| l = [], | |
| @@ -554,7 +555,7 @@ | |
| return b.priority - a.priority | |
| }), c = [].slice.call(arguments), c.shift(), c.unshift(this); | |
| for (var d = 0; d < b.length; d++) | |
| - if (b[d].fn.apply(b[d].scope, c) === !1) return !1 | |
| + if (!1 === b[d].fn.apply(b[d].scope, c)) return !1 | |
| } | |
| return !0 | |
| }, | |
| @@ -579,7 +580,7 @@ | |
| lastModifiedDate: a.lastModifiedDate || (new Date).toLocaleString(), | |
| getNative: function() { | |
| var a = this.getSource().getSource(); | |
| - return b.inArray(b.typeOf(a), ["blob", "file"]) !== -1 ? a : null | |
| + return -1 !== b.inArray(b.typeOf(a), ["blob", "file"]) ? a : null | |
| }, | |
| getSource: function() { | |
| return c[this.id] ? c[this.id] : null | |
| diff -ur build-unminified/wp-includes/js/plupload/wp-plupload.min.js build-branch-unminified/wp-includes/js/plupload/wp-plupload.min.js | |
| --- build-unminified/wp-includes/js/plupload/wp-plupload.min.js 2018-10-06 21:45:19.874529343 -0500 | |
| +++ build-branch-unminified/wp-includes/js/plupload/wp-plupload.min.js 2018-10-06 21:42:20.529192213 -0500 | |
| @@ -3,7 +3,7 @@ | |
| var c; | |
| "undefined" != typeof _wpPluploadSettings && (c = function(a) { | |
| var d, e, f = this, | |
| - g = navigator.userAgent.indexOf("Trident/") != -1 || navigator.userAgent.indexOf("MSIE ") != -1, | |
| + g = -1 != navigator.userAgent.indexOf("Trident/") || -1 != navigator.userAgent.indexOf("MSIE "), | |
| h = { | |
| container: "container", | |
| browser: "browse_button", | |
| @@ -89,7 +89,8 @@ | |
| } | |
| }, b.extend(c.prototype, { | |
| param: function(a, c) { | |
| - return 1 === arguments.length && "string" == typeof a ? this.uploader.settings.multipart_params[a] : void(arguments.length > 1 ? this.uploader.settings.multipart_params[a] = c : b.extend(this.uploader.settings.multipart_params, a)) | |
| + if (1 === arguments.length && "string" == typeof a) return this.uploader.settings.multipart_params[a]; | |
| + arguments.length > 1 ? this.uploader.settings.multipart_params[a] = c : b.extend(this.uploader.settings.multipart_params, a) | |
| }, | |
| init: function() {}, | |
| error: function() {}, | |
| diff -ur build-unminified/wp-includes/js/quicktags.min.js build-branch-unminified/wp-includes/js/quicktags.min.js | |
| --- build-unminified/wp-includes/js/quicktags.min.js 2018-10-06 21:45:26.530578972 -0500 | |
| +++ build-branch-unminified/wp-includes/js/quicktags.min.js 2018-10-06 21:42:28.057248334 -0500 | |
| @@ -61,7 +61,8 @@ | |
| j = a.id, | |
| k = document.getElementById(j), | |
| l = "qt_" + j; | |
| - return !(!j || !k) && (i.name = l, i.id = j, i.canvas = k, i.settings = a, "content" !== j || "string" != typeof adminpage || "post-new-php" !== adminpage && "post-php" !== adminpage ? f = l + "_toolbar" : (edCanvas = k, f = "ed_toolbar"), d = document.getElementById(f), d || (d = document.createElement("div"), d.id = f, d.className = "quicktags-toolbar"), k.parentNode.insertBefore(d, k), i.toolbar = d, e = function(a) { | |
| + if (!j || !k) return !1; | |
| + i.name = l, i.id = j, i.canvas = k, i.settings = a, "content" !== j || "string" != typeof adminpage || "post-new-php" !== adminpage && "post-php" !== adminpage ? f = l + "_toolbar" : (edCanvas = k, f = "ed_toolbar"), d = document.getElementById(f), d || (d = document.createElement("div"), d.id = f, d.className = "quicktags-toolbar"), k.parentNode.insertBefore(d, k), i.toolbar = d, e = function(a) { | |
| a = a || window.event; | |
| var b, c = a.target || a.srcElement, | |
| d = c.clientWidth || c.offsetWidth; | |
| @@ -78,15 +79,15 @@ | |
| }) | |
| }, i.remove = function() { | |
| delete b.instances[j], d && d.parentNode && d.parentNode.removeChild(d) | |
| - }, b.instances[j] = i, void i.init()) | |
| + }, b.instances[j] = i, i.init() | |
| }, b.instances = {}, b.getInstance = function(a) { | |
| return b.instances[a] | |
| }, b._buttonsInit = function(a) { | |
| function c(a) { | |
| - var c, e, f, g, h, i, j, k, l, m = ",strong,em,link,block,del,ins,img,ul,ol,li,code,more,close,"; | |
| - i = d.instances[a], c = i.canvas, e = i.name, f = i.settings, h = "", g = {}, l = "", f.buttons && (l = "," + f.buttons + ","); | |
| - for (k in edButtons) edButtons[k] && (j = edButtons[k].id, l && m.indexOf("," + j + ",") !== -1 && l.indexOf("," + j + ",") === -1 || edButtons[k].instance && edButtons[k].instance !== a || (g[j] = edButtons[k], edButtons[k].html && (h += edButtons[k].html(e + "_")))); | |
| - l && l.indexOf(",dfw,") !== -1 && (g.dfw = new b.DFWButton, h += g.dfw.html(e + "_")), "rtl" === document.getElementsByTagName("html")[0].dir && (g.textdirection = new b.TextDirectionButton, h += g.textdirection.html(e + "_")), i.toolbar.innerHTML = h, i.theButtons = g, "undefined" != typeof jQuery && jQuery(document).triggerHandler("quicktags-init", [i]) | |
| + var c, e, f, g, h, i, j, k, l = ",strong,em,link,block,del,ins,img,ul,ol,li,code,more,close,"; | |
| + h = d.instances[a], h.canvas, c = h.name, e = h.settings, g = "", f = {}, k = "", e.buttons && (k = "," + e.buttons + ","); | |
| + for (j in edButtons) edButtons[j] && (i = edButtons[j].id, k && -1 !== l.indexOf("," + i + ",") && -1 === k.indexOf("," + i + ",") || edButtons[j].instance && edButtons[j].instance !== a || (f[i] = edButtons[j], edButtons[j].html && (g += edButtons[j].html(c + "_")))); | |
| + k && -1 !== k.indexOf(",dfw,") && (f.dfw = new b.DFWButton, g += f.dfw.html(c + "_")), "rtl" === document.getElementsByTagName("html")[0].dir && (f.textdirection = new b.TextDirectionButton, g += f.textdirection.html(c + "_")), h.toolbar.innerHTML = g, h.theButtons = f, "undefined" != typeof jQuery && jQuery(document).triggerHandler("quicktags-init", [h]) | |
| } | |
| var d = this; | |
| if (a) c(a); | |
| @@ -101,7 +102,7 @@ | |
| if ("string" != typeof d) return; | |
| k = new b.TagButton(a, c, d, e, f, g, i, j) | |
| } | |
| - if (h === -1) return k; | |
| + if (-1 === h) return k; | |
| if (h > 0) { | |
| for (; | |
| "undefined" != typeof edButtons[h];) h++; | |
| @@ -128,20 +129,20 @@ | |
| b.openTags || (b.openTags = []), this.tagEnd && (b.openTags.push(this.id), a.value = "/" + a.value, this.attr.ariaLabelClose && a.setAttribute("aria-label", this.attr.ariaLabelClose)) | |
| }, b.TagButton.prototype.closeTag = function(a, b) { | |
| var c = this.isOpen(b); | |
| - c !== !1 && b.openTags.splice(c, 1), a.value = this.display, this.attr.ariaLabel && a.setAttribute("aria-label", this.attr.ariaLabel) | |
| + !1 !== c && b.openTags.splice(c, 1), a.value = this.display, this.attr.ariaLabel && a.setAttribute("aria-label", this.attr.ariaLabel) | |
| }, b.TagButton.prototype.isOpen = function(a) { | |
| var b = this, | |
| c = 0, | |
| d = !1; | |
| if (a.openTags) | |
| - for (; d === !1 && c < a.openTags.length;) d = a.openTags[c] === b.id && c, c++; | |
| + for (; !1 === d && c < a.openTags.length;) d = a.openTags[c] === b.id && c, c++; | |
| else d = !1; | |
| return d | |
| }, b.TagButton.prototype.callback = function(a, b, c) { | |
| var d, e, f, g, h, i, j, k, l, m = this, | |
| n = b.value, | |
| o = n ? m.tagEnd : ""; | |
| - document.selection ? (b.focus(), k = document.selection.createRange(), k.text.length > 0 ? m.tagEnd ? k.text = m.tagStart + k.text + o : k.text = k.text + m.tagStart : m.tagEnd ? m.isOpen(c) === !1 ? (k.text = m.tagStart, m.openTag(a, c)) : (k.text = o, m.closeTag(a, c)) : k.text = m.tagStart, b.focus()) : b.selectionStart || 0 === b.selectionStart ? (d = b.selectionStart, e = b.selectionEnd, d < e && "\n" === n.charAt(e - 1) && (e -= 1), f = e, g = b.scrollTop, h = n.substring(0, d), i = n.substring(e, n.length), j = n.substring(d, e), d !== e ? m.tagEnd ? (b.value = h + m.tagStart + j + o + i, f += m.tagStart.length + o.length) : (b.value = h + j + m.tagStart + i, f += m.tagStart.length) : m.tagEnd ? m.isOpen(c) === !1 ? (b.value = h + m.tagStart + i, m.openTag(a, c), f = d + m.tagStart.length) : (b.value = h + o + i, f = d + o.length, m.closeTag(a, c)) : (b.value = h + m.tagStart + i, f = d + m.tagStart.length), b.selectionStart = f, b.selectionEnd = f, b.scrollTop = g, b.focus()) : (o ? m.isOpen(c) !== !1 ? (b.value += m.tagStart, m.openTag(a, c)) : (b.value += o, m.closeTag(a, c)) : b.value += m.tagStart, b.focus()), document.createEvent ? (l = document.createEvent("HTMLEvents"), l.initEvent("change", !1, !0), b.dispatchEvent(l)) : b.fireEvent && b.fireEvent("onchange") | |
| + document.selection ? (b.focus(), k = document.selection.createRange(), k.text.length > 0 ? m.tagEnd ? k.text = m.tagStart + k.text + o : k.text = k.text + m.tagStart : m.tagEnd ? !1 === m.isOpen(c) ? (k.text = m.tagStart, m.openTag(a, c)) : (k.text = o, m.closeTag(a, c)) : k.text = m.tagStart, b.focus()) : b.selectionStart || 0 === b.selectionStart ? (d = b.selectionStart, e = b.selectionEnd, d < e && "\n" === n.charAt(e - 1) && (e -= 1), f = e, g = b.scrollTop, h = n.substring(0, d), i = n.substring(e, n.length), j = n.substring(d, e), d !== e ? m.tagEnd ? (b.value = h + m.tagStart + j + o + i, f += m.tagStart.length + o.length) : (b.value = h + j + m.tagStart + i, f += m.tagStart.length) : m.tagEnd ? !1 === m.isOpen(c) ? (b.value = h + m.tagStart + i, m.openTag(a, c), f = d + m.tagStart.length) : (b.value = h + o + i, f = d + o.length, m.closeTag(a, c)) : (b.value = h + m.tagStart + i, f = d + m.tagStart.length), b.selectionStart = f, b.selectionEnd = f, b.scrollTop = g, b.focus()) : (o ? !1 !== m.isOpen(c) ? (b.value += m.tagStart, m.openTag(a, c)) : (b.value += o, m.closeTag(a, c)) : b.value += m.tagStart, b.focus()), document.createEvent ? (l = document.createEvent("HTMLEvents"), l.initEvent("change", !1, !0), b.dispatchEvent(l)) : b.fireEvent && b.fireEvent("onchange") | |
| }, b.SpellButton = function() {}, b.CloseButton = function() { | |
| b.Button.call(this, "close", quicktagsL10n.closeTags, "", quicktagsL10n.closeAllOpenTags) | |
| }, b.CloseButton.prototype = new b.Button, b._close = function(a, b, c) { | |
| @@ -158,7 +159,8 @@ | |
| b.TagButton.call(this, "link", "link", "", "</a>", "", "", "", a) | |
| }, b.LinkButton.prototype = new b.TagButton, b.LinkButton.prototype.callback = function(a, c, d, e) { | |
| var f, g = this; | |
| - return "undefined" != typeof wpLink ? void wpLink.open(d.id) : (e || (e = "http://"), void(g.isOpen(d) === !1 ? (f = prompt(quicktagsL10n.enterURL, e), f && (g.tagStart = '<a href="' + f + '">', b.TagButton.prototype.callback.call(g, a, c, d))) : b.TagButton.prototype.callback.call(g, a, c, d))) | |
| + if ("undefined" != typeof wpLink) return void wpLink.open(d.id); | |
| + e || (e = "http://"), !1 === g.isOpen(d) ? (f = prompt(quicktagsL10n.enterURL, e)) && (g.tagStart = '<a href="' + f + '">', b.TagButton.prototype.callback.call(g, a, c, d)) : b.TagButton.prototype.callback.call(g, a, c, d) | |
| }, b.ImgButton = function() { | |
| var a = { | |
| ariaLabel: quicktagsL10n.image | |
| @@ -206,7 +208,7 @@ | |
| }), edButtons[110] = new b.TagButton("code", "code", "<code>", "</code>", "", "", "", { | |
| ariaLabel: quicktagsL10n.code, | |
| ariaLabelClose: quicktagsL10n.codeClose | |
| - }), edButtons[120] = new b.TagButton("more", "more", "<!--more-->\n\n", "", "", "", "", { | |
| + }), edButtons[120] = new b.TagButton("more", "more", "\x3c!--more--\x3e\n\n", "", "", "", "", { | |
| ariaLabel: quicktagsL10n.more | |
| }), edButtons[140] = new b.CloseButton | |
| }(); | |
| \ No newline at end of file | |
| diff -ur build-unminified/wp-includes/js/shortcode.min.js build-branch-unminified/wp-includes/js/shortcode.min.js | |
| --- build-unminified/wp-includes/js/shortcode.min.js 2018-10-06 21:45:18.834521588 -0500 | |
| +++ build-branch-unminified/wp-includes/js/shortcode.min.js 2018-10-06 21:42:19.485184430 -0500 | |
| @@ -59,7 +59,7 @@ | |
| string: function() { | |
| var a = "[" + this.tag; | |
| return _.each(this.attrs.numeric, function(b) { | |
| - a += /\s/.test(b) ? ' "' + b + '"' : " " + b | |
| + /\s/.test(b) ? a += ' "' + b + '"' : a += " " + b | |
| }), _.each(this.attrs.named, function(b, c) { | |
| a += " " + c + '="' + b + '"' | |
| }), "single" === this.type ? a + "]" : "self-closing" === this.type ? a + " /]" : (a += "]", this.content && (a += this.content), a + "[/" + this.tag + "]") | |
| @@ -79,7 +79,7 @@ | |
| c = a.content || ""; | |
| return _.each(a.attrs, function(a, c) { | |
| b += " " + c, _.isBoolean(a) && (a = a ? "true" : "false"), b += '="' + a + '"' | |
| - }), a.single ? b + " />" : (b += ">", b += _.isObject(c) ? wp.html.string(c) : c, b + "</" + a.tag + ">") | |
| + }), a.single ? b + " />" : (b += ">", (b += _.isObject(c) ? wp.html.string(c) : c) + "</" + a.tag + ">") | |
| } | |
| }) | |
| }(); | |
| \ No newline at end of file | |
| diff -ur build-unminified/wp-includes/js/tinymce/plugins/wordpress/plugin.min.js build-branch-unminified/wp-includes/js/tinymce/plugins/wordpress/plugin.min.js | |
| --- build-unminified/wp-includes/js/tinymce/plugins/wordpress/plugin.min.js 2018-10-06 21:45:24.098560838 -0500 | |
| +++ build-branch-unminified/wp-includes/js/tinymce/plugins/wordpress/plugin.min.js 2018-10-06 21:42:25.613230114 -0500 | |
| @@ -28,9 +28,9 @@ | |
| window.wpActiveEditor = b.id | |
| }), b.on("BeforeSetContent", function(b) { | |
| var c; | |
| - b.content && (b.content.indexOf("<!--more") !== -1 && (c = i("Read more..."), b.content = b.content.replace(/<!--more(.*?)-->/g, function(b, d) { | |
| + b.content && (-1 !== b.content.indexOf("\x3c!--more") && (c = i("Read more..."), b.content = b.content.replace(/<!--more(.*?)-->/g, function(b, d) { | |
| return '<img src="' + a.Env.transparentSrc + '" data-wp-more="more" data-wp-more-text="' + d + '" class="wp-more-tag mce-wp-more" alt="" title="' + c + '" data-mce-resize="false" data-mce-placeholder="1" />' | |
| - })), b.content.indexOf("<!--nextpage-->") !== -1 && (c = i("Page break"), b.content = b.content.replace(/<!--nextpage-->/g, '<img src="' + a.Env.transparentSrc + '" data-wp-more="nextpage" class="wp-more-tag mce-wp-nextpage" alt="" title="' + c + '" data-mce-resize="false" data-mce-placeholder="1" />')), b.load && "raw" !== b.format && (l ? b.content = k.editor.autop(b.content) : b.content = b.content.replace(/-->\s+<!--/g, "--><!--")), b.content.indexOf("<script") === -1 && b.content.indexOf("<style") === -1 || (b.content = b.content.replace(/<(script|style)[^>]*>[\s\S]*?<\/\1>/g, function(b, c) { | |
| + })), -1 !== b.content.indexOf("\x3c!--nextpage--\x3e") && (c = i("Page break"), b.content = b.content.replace(/<!--nextpage-->/g, '<img src="' + a.Env.transparentSrc + '" data-wp-more="nextpage" class="wp-more-tag mce-wp-nextpage" alt="" title="' + c + '" data-mce-resize="false" data-mce-placeholder="1" />')), b.load && "raw" !== b.format && (b.content = l ? k.editor.autop(b.content) : b.content.replace(/-->\s+<!--/g, "--\x3e\x3c!--")), -1 === b.content.indexOf("<script") && -1 === b.content.indexOf("<style") || (b.content = b.content.replace(/<(script|style)[^>]*>[\s\S]*?<\/\1>/g, function(b, c) { | |
| return '<img src="' + a.Env.transparentSrc + '" data-wp-preserve="' + encodeURIComponent(b) + '" data-mce-resize="false" data-mce-placeholder="1" class="mce-object" width="20" height="20" alt="<' + c + '>" title="<' + c + '>" />' | |
| }))) | |
| }), b.on("setcontent", function() { | |
| @@ -43,7 +43,7 @@ | |
| }), b.on("PostProcess", function(a) { | |
| a.get && (a.content = a.content.replace(/<img[^>]+>/g, function(a) { | |
| var b, c, d = ""; | |
| - return a.indexOf('data-wp-more="more"') !== -1 ? ((b = a.match(/data-wp-more-text="([^"]+)"/)) && (d = b[1]), c = "<!--more" + d + "-->") : a.indexOf('data-wp-more="nextpage"') !== -1 ? c = "<!--nextpage-->" : a.indexOf("data-wp-preserve") !== -1 && (b = a.match(/ data-wp-preserve="([^"]+)"/)) && (c = decodeURIComponent(b[1])), c || a | |
| + return -1 !== a.indexOf('data-wp-more="more"') ? ((b = a.match(/data-wp-more-text="([^"]+)"/)) && (d = b[1]), c = "\x3c!--more" + d + "--\x3e") : -1 !== a.indexOf('data-wp-more="nextpage"') ? c = "\x3c!--nextpage--\x3e" : -1 !== a.indexOf("data-wp-preserve") && (b = a.match(/ data-wp-preserve="([^"]+)"/)) && (c = decodeURIComponent(b[1])), c || a | |
| })) | |
| }), b.on("ResolveName", function(a) { | |
| var c; | |
| @@ -53,9 +53,10 @@ | |
| h = b.dom, | |
| j = b.selection.getNode(), | |
| k = b.getBody(); | |
| - return c = c || "more", g += " mce-wp-" + c, f = "more" === c ? "Read more..." : "Next page", f = i(f), e = '<img src="' + a.Env.transparentSrc + '" alt="" title="' + f + '" class="' + g + '" data-wp-more="' + c + '" data-mce-resize="false" data-mce-placeholder="1" />', j === k || "P" === j.nodeName && j.parentNode === k ? void b.insertContent(e) : (d = h.getParent(j, function(a) { | |
| + if (c = c || "more", g += " mce-wp-" + c, f = "more" === c ? "Read more..." : "Next page", f = i(f), e = '<img src="' + a.Env.transparentSrc + '" alt="" title="' + f + '" class="' + g + '" data-wp-more="' + c + '" data-mce-resize="false" data-mce-placeholder="1" />', j === k || "P" === j.nodeName && j.parentNode === k) return void b.insertContent(e); | |
| + (d = h.getParent(j, function(a) { | |
| return !(!a.parentNode || a.parentNode !== k) | |
| - }, b.getBody()), void(d && ("P" === d.nodeName ? d.appendChild(h.create("p", null, e).firstChild) : h.insertAfter(h.create("p", null, e), d), b.nodeChanged()))) | |
| + }, b.getBody())) && ("P" === d.nodeName ? d.appendChild(h.create("p", null, e).firstChild) : h.insertAfter(h.create("p", null, e), d), b.nodeChanged()) | |
| }), b.addCommand("WP_Code", function() { | |
| b.formatter.toggle("code") | |
| }), b.addCommand("WP_Page", function() { | |
| @@ -79,8 +80,7 @@ | |
| q = 0, | |
| r = b.settings.wp_shortcut_labels; | |
| r && (h(r, function(a, b) { | |
| - var d; | |
| - a.indexOf("meta") !== -1 ? (p++, d = a.replace("meta", "").toLowerCase(), d && (n[d] = b, p % 2 === 0 && (l.push(c(n, 2)), n = {}))) : a.indexOf("access") !== -1 && (q++, d = a.replace("access", "").toLowerCase(), d && (o[d] = b, q % 2 === 0 && (m.push(c(o, 2)), o = {}))) | |
| + var d; - 1 !== a.indexOf("meta") ? (p++, (d = a.replace("meta", "").toLowerCase()) && (n[d] = b, p % 2 == 0 && (l.push(c(n, 2)), n = {}))) : -1 !== a.indexOf("access") && (q++, (d = a.replace("access", "").toLowerCase()) && (o[d] = b, q % 2 == 0 && (m.push(c(o, 2)), o = {}))) | |
| }), p % 2 > 0 && l.push(c(n, 2)), q % 2 > 0 && m.push(c(o, 2)), d = [i("Letter"), i("Action"), i("Letter"), i("Action")], d = "<tr><th>" + d.join("</th><th>") + "</th></tr>", e = '<div class="wp-editor-help">', e = e + "<h2>" + i("Default shortcuts,") + " " + k + '</h2><table class="wp-help-th-center fixed">' + d + l.join("") + "</table><h2>" + i("Additional shortcuts,") + " " + j + '</h2><table class="wp-help-th-center fixed">' + d + m.join("") + "</table>", b.plugins.wptextpattern && (!a.Env.ie || a.Env.ie > 8) && (e = e + "<h2>" + i("When starting a new paragraph with one of these formatting shortcuts followed by a space, the formatting will be applied automatically. Press Backspace or Escape to undo.") + '</h2><table class="wp-help-th-center fixed">' + c({ | |
| "*": "Bullet list", | |
| "1.": "Numbered list" | |
| @@ -201,10 +201,10 @@ | |
| }) | |
| } | |
| }), b.on("SaveContent", function(a) { | |
| - return !b.inline && b.isHidden() ? void(a.content = a.element.value) : (a.content = a.content.replace(/<p>(?:<br ?\/?>|\u00a0|\uFEFF| )*<\/p>/g, "<p> </p>"), void(l ? a.content = k.editor.removep(a.content) : a.content = a.content.replace(/-->\s*<!-- wp:/g, "-->\n\n<!-- wp:"))) | |
| + if (!b.inline && b.isHidden()) return void(a.content = a.element.value); | |
| + a.content = a.content.replace(/<p>(?:<br ?\/?>|\u00a0|\uFEFF| )*<\/p>/g, "<p> </p>"), a.content = l ? k.editor.removep(a.content) : a.content.replace(/-->\s*<!-- wp:/g, "--\x3e\n\n\x3c!-- wp:") | |
| }), b.on("preInit", function() { | |
| - var c = "@[id|accesskey|class|dir|lang|style|tabindex|title|contenteditable|draggable|dropzone|hidden|spellcheck|translate],i,b,script[src|async|defer|type|charset|crossorigin|integrity]"; | |
| - b.schema.addValidElements(c), a.Env.iOS && (b.settings.height = 300), h({ | |
| + b.schema.addValidElements("@[id|accesskey|class|dir|lang|style|tabindex|title|contenteditable|draggable|dropzone|hidden|spellcheck|translate],i,b,script[src|async|defer|type|charset|crossorigin|integrity]"), a.Env.iOS && (b.settings.height = 300), h({ | |
| c: "JustifyCenter", | |
| r: "JustifyRight", | |
| l: "JustifyLeft", | |
| @@ -225,7 +225,7 @@ | |
| k && k.autosave && k.autosave.server.triggerSave() | |
| }), window.getUserSetting("editor_plain_text_paste_warning") > 1 && (b.settings.paste_plaintext_inform = !1), a.Env.mac && a.$(b.iframeElement).attr("title", i("Rich Text Area. Press Control-Option-H for help.")) | |
| }), b.on("PastePlainTextToggle", function(a) { | |
| - if (a.state === !0) { | |
| + if (!0 === a.state) { | |
| var b = parseInt(window.getUserSetting("editor_plain_text_paste_warning"), 10) || 0; | |
| b < 2 && window.setUserSetting("editor_plain_text_paste_warning", ++b) | |
| } | |
| @@ -250,21 +250,20 @@ | |
| r = n.clientHeight, | |
| s = f.getBoundingClientRect(), | |
| t = (s.left + s.right) / 2, | |
| - u = 5, | |
| - v = r + u, | |
| - w = p ? p.getBoundingClientRect().bottom : 0, | |
| - x = j ? j.getBoundingClientRect().bottom : 0, | |
| - y = k ? i - k.getBoundingClientRect().top : 0, | |
| - z = l ? i - l.getBoundingClientRect().top : 0, | |
| - A = Math.max(0, w, x, m.top), | |
| - B = Math.max(0, y, z, i - m.bottom), | |
| - C = s.top + m.top - A, | |
| - D = i - m.top - s.bottom - B, | |
| - E = i - A - B, | |
| - F = "", | |
| - G = 0, | |
| - H = 0; | |
| - return C >= E || D >= E ? (this.scrolling = !0, this.hide(), this.scrolling = !1, this) : (a.Env.iOS && "IMG" === f.nodeName && (G = 54, H = 46), this.bottom ? D >= v ? (F = " mce-arrow-up", b = s.bottom + m.top + e - H) : C >= v && (F = " mce-arrow-down", b = s.top + m.top + e - r + G) : C >= v ? (F = " mce-arrow-down", b = s.top + m.top + e - r + G) : D >= v && E / 2 > s.bottom + m.top - A && (F = " mce-arrow-up", b = s.bottom + m.top + e - H), "undefined" == typeof b && (b = e + A + u + H), c = t - o / 2 + m.left + d, s.left < 0 || s.right > m.width ? c = m.left + d + (m.width - o) / 2 : o >= h ? (F += " mce-arrow-full", c = 0) : c < 0 && s.left + o > h || c + o > h && s.right - o < 0 ? c = (h - o) / 2 : c < m.left + d ? (F += " mce-arrow-left", c = s.left + m.left + d) : c + o > m.width + m.left + d && (F += " mce-arrow-right", c = s.right - o + m.left + d), a.Env.iOS && "IMG" === f.nodeName && (F = F.replace(/ ?mce-arrow-(up|down)/g, "")), n.className = n.className.replace(/ ?mce-arrow-[\w]+/g, "") + F, g.setStyles(n, { | |
| + u = r + 5, | |
| + v = p ? p.getBoundingClientRect().bottom : 0, | |
| + w = j ? j.getBoundingClientRect().bottom : 0, | |
| + x = k ? i - k.getBoundingClientRect().top : 0, | |
| + y = l ? i - l.getBoundingClientRect().top : 0, | |
| + z = Math.max(0, v, w, m.top), | |
| + A = Math.max(0, x, y, i - m.bottom), | |
| + B = s.top + m.top - z, | |
| + C = i - m.top - s.bottom - A, | |
| + D = i - z - A, | |
| + E = "", | |
| + F = 0, | |
| + G = 0; | |
| + return B >= D || C >= D ? (this.scrolling = !0, this.hide(), this.scrolling = !1, this) : (a.Env.iOS && "IMG" === f.nodeName && (F = 54, G = 46), this.bottom ? C >= u ? (E = " mce-arrow-up", b = s.bottom + m.top + e - G) : B >= u && (E = " mce-arrow-down", b = s.top + m.top + e - r + F) : B >= u ? (E = " mce-arrow-down", b = s.top + m.top + e - r + F) : C >= u && D / 2 > s.bottom + m.top - z && (E = " mce-arrow-up", b = s.bottom + m.top + e - G), void 0 === b && (b = e + z + 5 + G), c = t - o / 2 + m.left + d, s.left < 0 || s.right > m.width ? c = m.left + d + (m.width - o) / 2 : o >= h ? (E += " mce-arrow-full", c = 0) : c < 0 && s.left + o > h || c + o > h && s.right - o < 0 ? c = (h - o) / 2 : c < m.left + d ? (E += " mce-arrow-left", c = s.left + m.left + d) : c + o > m.width + m.left + d && (E += " mce-arrow-right", c = s.right - o + m.left + d), a.Env.iOS && "IMG" === f.nodeName && (E = E.replace(/ ?mce-arrow-(up|down)/g, "")), n.className = n.className.replace(/ ?mce-arrow-[\w]+/g, "") + E, g.setStyles(n, { | |
| left: c, | |
| top: b | |
| }), this) | |
| @@ -274,10 +273,10 @@ | |
| function c() { | |
| var c = b.selection; | |
| "bullist" === d && c.selectorChanged("ul > li", function(b, c) { | |
| - for (var d, e = c.parents.length; e-- && (d = c.parents[e].nodeName, "OL" !== d && "UL" != d);); | |
| + for (var d, e = c.parents.length; e-- && "OL" !== (d = c.parents[e].nodeName) && "UL" != d;); | |
| a.active(b && "UL" === d) | |
| }), "numlist" === d && c.selectorChanged("ol > li", function(b, c) { | |
| - for (var d, e = c.parents.length; e-- && (d = c.parents[e].nodeName, "OL" !== d && "UL" !== d);); | |
| + for (var d, e = c.parents.length; e-- && "OL" !== (d = c.parents[e].nodeName) && "UL" !== d;); | |
| a.active(b && "OL" === d) | |
| }), a.settings.stateSelector && c.selectorChanged(a.settings.stateSelector, function(b) { | |
| a.active(b) | |
| @@ -327,7 +326,7 @@ | |
| r = b.rtl && /Chrome/.test(navigator.userAgent); | |
| o && (j = a.$(".mce-toolbar-grp", o)[0], k = a.$(".mce-statusbar", o)[0]), "content" === b.id && (l = document.getElementById("post-status-info")), b.shortcuts.add("alt+119", "", function() { | |
| var a; | |
| - e && (a = e.find("toolbar")[0], a && a.focus(!0)) | |
| + e && (a = e.find("toolbar")[0]) && a.focus(!0) | |
| }), b.on("nodechange", function(a) { | |
| var c = b.selection.isCollapsed(), | |
| d = { | |
| diff -ur build-unminified/wp-includes/js/tinymce/plugins/wpdialogs/plugin.min.js build-branch-unminified/wp-includes/js/tinymce/plugins/wpdialogs/plugin.min.js | |
| --- build-unminified/wp-includes/js/tinymce/plugins/wpdialogs/plugin.min.js 2018-10-06 21:45:22.738550697 -0500 | |
| +++ build-branch-unminified/wp-includes/js/tinymce/plugins/wpdialogs/plugin.min.js 2018-10-06 21:42:23.305212908 -0500 | |
| @@ -1,5 +1,6 @@ | |
| tinymce.WPWindowManager = tinymce.InlineWindowManager = function(a) { | |
| - return this.wp ? this : (this.wp = {}, this.parent = a.windowManager, this.editor = a, tinymce.extend(this, this.parent), this.open = function(b, c) { | |
| + if (this.wp) return this; | |
| + this.wp = {}, this.parent = a.windowManager, this.editor = a, tinymce.extend(this, this.parent), this.open = function(b, c) { | |
| var d, e = this, | |
| f = this.wp; | |
| if (!b.wpDialog) return this.parent.open.apply(this, arguments); | |
| @@ -16,9 +17,10 @@ | |
| e.wp.$element && (e.wp = {}) | |
| })) | |
| } | |
| - }, void(this.close = function() { | |
| - return this.wp.features && this.wp.features.wpDialog ? void this.wp.$element.wpdialog("close") : this.parent.close.apply(this, arguments) | |
| - })) | |
| + }, this.close = function() { | |
| + if (!this.wp.features || !this.wp.features.wpDialog) return this.parent.close.apply(this, arguments); | |
| + this.wp.$element.wpdialog("close") | |
| + } | |
| }, tinymce.PluginManager.add("wpdialogs", function(a) { | |
| a.on("init", function() { | |
| a.windowManager = new tinymce.WPWindowManager(a) | |
| diff -ur build-unminified/wp-includes/js/tinymce/plugins/wpeditimage/plugin.min.js build-branch-unminified/wp-includes/js/tinymce/plugins/wpeditimage/plugin.min.js | |
| --- build-unminified/wp-includes/js/tinymce/plugins/wpeditimage/plugin.min.js 2018-10-06 21:45:24.970567341 -0500 | |
| +++ build-branch-unminified/wp-includes/js/tinymce/plugins/wpeditimage/plugin.min.js 2018-10-06 21:42:26.469236496 -0500 | |
| @@ -18,12 +18,12 @@ | |
| function e(a) { | |
| return a.replace(/(?:<div [^>]+mceTemp[^>]+>)?\s*(<dl [^>]+wp-caption[^>]+>[\s\S]+?<\/dl>)\s*(?:<\/div>)?/g, function(a, b) { | |
| var c = ""; | |
| - return b.indexOf("<img ") === -1 || b.indexOf("</p>") !== -1 ? b.replace(/<d[ldt]( [^>]+)?>/g, "").replace(/<\/d[ldt]>/g, "") : (c = b.replace(/\s*<dl ([^>]+)>\s*<dt [^>]+>([\s\S]+?)<\/dt>\s*<dd [^>]+>([\s\S]*?)<\/dd>\s*<\/dl>\s*/gi, function(a, b, c, d) { | |
| + return -1 === b.indexOf("<img ") || -1 !== b.indexOf("</p>") ? b.replace(/<d[ldt]( [^>]+)?>/g, "").replace(/<\/d[ldt]>/g, "") : (c = b.replace(/\s*<dl ([^>]+)>\s*<dt [^>]+>([\s\S]+?)<\/dt>\s*<dd [^>]+>([\s\S]*?)<\/dd>\s*<\/dl>\s*/gi, function(a, b, c, d) { | |
| var e, f, g, h; | |
| return h = c.match(/width="([0-9]*)"/), h = h && h[1] ? h[1] : "", f = b.match(/class="([^"]*)"/), f = f && f[1] ? f[1] : "", g = f.match(/align[a-z]+/i) || "alignnone", h && d ? (e = b.match(/id="([^"]*)"/), e = e && e[1] ? e[1] : "", f = f.replace(/wp-caption ?|align[a-z]+ ?/gi, ""), f && (f = ' class="' + f + '"'), d = d.replace(/\r\n|\r/g, "\n").replace(/<[a-zA-Z0-9]+( [^<>]+)?>/g, function(a) { | |
| return a.replace(/[\r\n\t]+/, " ") | |
| }), d = d.replace(/\s*\n\s*/g, "<br />"), '[caption id="' + e + '" align="' + g + '" width="' + h + '"' + f + "]" + c + " " + d + "[/caption]") : ("alignnone" !== g[0] && (c = c.replace(/><img/, ' class="' + g[0] + '"><img')), c) | |
| - }), c.indexOf("[caption") === -1 && (c = b.replace(/[\s\S]*?((?:<a [^>]+>)?<img [^>]+>(?:<\/a>)?)(<p>[\s\S]*<\/p>)?[\s\S]*/gi, "<p>$1</p>$2")), c) | |
| + }), -1 === c.indexOf("[caption") && (c = b.replace(/[\s\S]*?((?:<a [^>]+>)?<img [^>]+>(?:<\/a>)?)(<p>[\s\S]*<\/p>)?[\s\S]*/gi, "<p>$1</p>$2")), c) | |
| }) | |
| } | |
| @@ -55,7 +55,7 @@ | |
| } | |
| function h(b) { | |
| - return !b || b.indexOf("<") === -1 && b.indexOf(">") === -1 ? b : (m || (m = new tinymce.html.Serializer({}, a.schema)), m.serialize(a.parser.parse(b, { | |
| + return !b || -1 === b.indexOf("<") && -1 === b.indexOf(">") ? b : (m || (m = new tinymce.html.Serializer({}, a.schema)), m.serialize(a.parser.parse(b, { | |
| forced_root_block: !1 | |
| }))) | |
| } | |
| @@ -79,7 +79,7 @@ | |
| style: "width: " + s + "px" | |
| }), n = y.select(".wp-caption-dd", m), n.length && y.setHTML(n[0], c.caption)) : (p = p ? 'id="' + p + '" ' : "", i = "<dl " + p + 'class="' + e + '" style="width: ' + s + 'px"><dt class="wp-caption-dt"></dt><dd class="wp-caption-dd">' + c.caption + "</dd></dl>", k = y.create("div", { | |
| "class": "mceTemp" | |
| - }, i), (j = y.getParent(f, "p")) ? j.parentNode.insertBefore(k, j) : f.parentNode.insertBefore(k, f), a.$(k).find("dt.wp-caption-dt").append(f), j && y.isEmpty(j) && y.remove(j))) : m && (j = y.create("p"), m.parentNode.insertBefore(j, m), j.appendChild(f), y.remove(m)), v = a.$(b), w = v.attr("srcset"), x = v.attr("src"), w && x && (x = x.replace(/[?#].*/, ""), w.indexOf(x) === -1 && v.attr("srcset", null).attr("sizes", null)), wp.media.events && wp.media.events.trigger("editor:image-update", { | |
| + }, i), (j = y.getParent(f, "p")) ? j.parentNode.insertBefore(k, j) : f.parentNode.insertBefore(k, f), a.$(k).find("dt.wp-caption-dt").append(f), j && y.isEmpty(j) && y.remove(j))) : m && (j = y.create("p"), m.parentNode.insertBefore(j, m), j.appendChild(f), y.remove(m)), v = a.$(b), w = v.attr("srcset"), x = v.attr("src"), w && x && (x = x.replace(/[?#].*/, ""), -1 === w.indexOf(x) && v.attr("srcset", null).attr("sizes", null)), wp.media.events && wp.media.events.trigger("editor:image-update", { | |
| editor: a, | |
| metadata: c, | |
| image: b | |
| @@ -88,7 +88,8 @@ | |
| function j(b) { | |
| var c, d, e; | |
| - return "undefined" != typeof wp && wp.media ? (e = f(b), wp.media.events.trigger("editor:image-edit", { | |
| + if ("undefined" == typeof wp || !wp.media) return void a.execCommand("mceImage"); | |
| + e = f(b), wp.media.events.trigger("editor:image-edit", { | |
| editor: a, | |
| metadata: e, | |
| image: b | |
| @@ -104,7 +105,7 @@ | |
| }), c.detach() | |
| }, c.state("image-details").on("update", d), c.state("replace-image").on("replace", d), c.on("close", function() { | |
| a.focus(), c.detach() | |
| - }), void c.open()) : void a.execCommand("mceImage") | |
| + }), c.open() | |
| } | |
| function k(b) { | |
| @@ -172,7 +173,7 @@ | |
| var c = b.target; | |
| "IMG" === c.nodeName && a.undoManager.transact(function() { | |
| var d, e, f = a.dom; | |
| - c.className = c.className.replace(/\bsize-[^ ]+/, ""), (d = f.getParent(c, ".wp-caption")) && (e = b.width || f.getAttrib(c, "width"), e && (e = parseInt(e, 10), a.getParam("wpeditimage_html5_captions") || (e += 10), f.setStyle(d, "width", e + "px"))) | |
| + c.className = c.className.replace(/\bsize-[^ ]+/, ""), (d = f.getParent(c, ".wp-caption")) && (e = b.width || f.getAttrib(c, "width")) && (e = parseInt(e, 10), a.getParam("wpeditimage_html5_captions") || (e += 10), f.setStyle(d, "width", e + "px")) | |
| }) | |
| }), a.on("pastePostProcess", function(b) { | |
| a.dom.getParent(a.selection.getNode(), "dd.wp-caption-dd") && (a.$("img, audio, video, object, embed, iframe, script, style", b.node).remove(), a.$("*", b.node).each(function(b, c) { | |
| @@ -202,7 +203,7 @@ | |
| h = b.keyCode, | |
| i = a.dom, | |
| j = tinymce.util.VK; | |
| - if (h === j.ENTER) c = g.getNode(), d = i.getParent(c, "div.mceTemp"), d && (i.events.cancel(b), tinymce.each(i.select("dt, dd", d), function(a) { | |
| + if (h === j.ENTER) c = g.getNode(), (d = i.getParent(c, "div.mceTemp")) && (i.events.cancel(b), tinymce.each(i.select("dt, dd", d), function(a) { | |
| i.isEmpty(a) && i.remove(a) | |
| }), f = tinymce.Env.ie && tinymce.Env.ie < 11 ? "" : '<br data-mce-bogus="1" />', e = i.create("p", null, f), "DD" === c.nodeName ? i.insertAfter(e, d) : d.parentNode.insertBefore(e, d), a.nodeChanged(), g.setCursorLocation(e, 0)); | |
| else if ((h === j.DELETE || h === j.BACKSPACE) && (c = g.getNode(), "DIV" === c.nodeName && i.hasClass(c, "mceTemp") ? d = c : "IMG" !== c.nodeName && "DT" !== c.nodeName && "A" !== c.nodeName || (d = i.getParent(c, "div.mceTemp")), d)) return i.events.cancel(b), k(c), !1 | |
| @@ -223,7 +224,7 @@ | |
| var b; | |
| a.on("dragstart", function() { | |
| var c = a.selection.getNode(); | |
| - "IMG" === c.nodeName && (b = a.dom.getParent(c, ".mceTemp"), b || "A" !== c.parentNode.nodeName || g(c.parentNode) || (b = c.parentNode)) | |
| + "IMG" === c.nodeName && ((b = a.dom.getParent(c, ".mceTemp")) || "A" !== c.parentNode.nodeName || g(c.parentNode) || (b = c.parentNode)) | |
| }), a.on("drop", function(c) { | |
| var d = a.dom, | |
| e = tinymce.dom.RangeUtils.getCaretRangeFromPoint(c.clientX, c.clientY, a.getDoc()); | |
| diff -ur build-unminified/wp-includes/js/tinymce/plugins/wplink/plugin.min.js build-branch-unminified/wp-includes/js/tinymce/plugins/wplink/plugin.min.js | |
| --- build-unminified/wp-includes/js/tinymce/plugins/wplink/plugin.min.js 2018-10-06 21:45:23.494556335 -0500 | |
| +++ build-branch-unminified/wp-includes/js/tinymce/plugins/wplink/plugin.min.js 2018-10-06 21:42:24.901224806 -0500 | |
| @@ -6,7 +6,7 @@ | |
| }, | |
| setURL: function(b) { | |
| var c, d; | |
| - this.url !== b && (this.url = b, b = window.decodeURIComponent(b), b = b.replace(/^(?:https?:)?\/\/(?:www\.)?/, ""), (c = b.indexOf("?")) !== -1 && (b = b.slice(0, c)), (c = b.indexOf("#")) !== -1 && (b = b.slice(0, c)), b = b.replace(/(?:index)?\.html$/, ""), "/" === b.charAt(b.length - 1) && (b = b.slice(0, -1)), "" === b && (b = this.url), b.length > 40 && (c = b.indexOf("/")) !== -1 && (d = b.lastIndexOf("/")) !== -1 && d !== c && (c + b.length - d < 40 && (d = -(40 - (c + 1))), b = b.slice(0, c + 1) + "\u2026" + b.slice(d)), a.$(this.getEl().firstChild).attr("href", this.url).text(b)) | |
| + this.url !== b && (this.url = b, b = window.decodeURIComponent(b), b = b.replace(/^(?:https?:)?\/\/(?:www\.)?/, ""), -1 !== (c = b.indexOf("?")) && (b = b.slice(0, c)), -1 !== (c = b.indexOf("#")) && (b = b.slice(0, c)), b = b.replace(/(?:index)?\.html$/, ""), "/" === b.charAt(b.length - 1) && (b = b.slice(0, -1)), "" === b && (b = this.url), b.length > 40 && -1 !== (c = b.indexOf("/")) && -1 !== (d = b.lastIndexOf("/")) && d !== c && (c + b.length - d < 40 && (d = -(40 - (c + 1))), b = b.slice(0, c + 1) + "\u2026" + b.slice(d)), a.$(this.getEl().firstChild).attr("href", this.url).text(b)) | |
| } | |
| })), a.ui.Factory.add("WPLinkInput", a.ui.Control.extend({ | |
| renderHtml: function() { | |
| @@ -32,7 +32,7 @@ | |
| e = b.dom.getParent(d, "a[href]"); | |
| return e || (c = b.selection.getContent({ | |
| format: "raw" | |
| - }), c && c.indexOf("</a>") !== -1 && (a = c.match(/href="([^">]+)"/), a && a[1] && (e = b.$('a[href="' + a[1] + '"]', d)[0]), e && b.selection.select(e))), e | |
| + })) && -1 !== c.indexOf("</a>") && (a = c.match(/href="([^">]+)"/), a && a[1] && (e = b.$('a[href="' + a[1] + '"]', d)[0]), e && b.selection.select(e)), e | |
| } | |
| function d() { | |
| @@ -44,14 +44,14 @@ | |
| function e(a, b) { | |
| return a.replace(/(<a [^>]+>)([\s\S]*?)<\/a>/g, function(a, c, d) { | |
| - return c.indexOf(' href="_wp_link_placeholder"') > -1 ? d : (b && (c = c.replace(/ data-wplink-edit="true"/g, "")), c = c.replace(/ data-wplink-url-error="true"/g, ""), c + d + "</a>") | |
| + return c.indexOf(' href="_wp_link_placeholder"') > -1 ? d : (b && (c = c.replace(/ data-wplink-edit="true"/g, "")), (c = c.replace(/ data-wplink-url-error="true"/g, "")) + d + "</a>") | |
| }) | |
| } | |
| function f(a) { | |
| var c = b.$(a), | |
| d = c.attr("href"); | |
| - d && "undefined" != typeof n && (s = !1, !/^http/i.test(d) || p.test(d) && q.test(d) ? c.removeAttr("data-wplink-url-error") : (s = !0, c.attr("data-wplink-url-error", "true"), r(b.translate("Warning: the link has been inserted but may have errors. Please test it."), "assertive"))) | |
| + d && void 0 !== n && (s = !1, !/^http/i.test(d) || p.test(d) && q.test(d) ? c.removeAttr("data-wplink-url-error") : (s = !0, c.attr("data-wplink-url-error", "true"), r(b.translate("Warning: the link has been inserted but may have errors. Please test it."), "assertive"))) | |
| } | |
| var g, h, i, j, k, l, m, n = window.jQuery, | |
| o = /^(mailto:)?[a-z0-9._%+-]+@[a-z0-9][a-z0-9.-]*\.[a-z]{2,63}$/i, | |
| @@ -74,11 +74,12 @@ | |
| }) | |
| } | |
| }), b.addCommand("WP_Link", function() { | |
| - return a.Env.ie && a.Env.ie < 10 && "undefined" != typeof window.wpLink ? void window.wpLink.open(b.id) : (k = c(), h.tempHide = !1, void(k ? b.dom.setAttribs(k, { | |
| + if (a.Env.ie && a.Env.ie < 10 && "undefined" != typeof window.wpLink) return void window.wpLink.open(b.id); | |
| + k = c(), h.tempHide = !1, k ? b.dom.setAttribs(k, { | |
| "data-wplink-edit": !0 | |
| }) : (d(), b.execCommand("mceInsertLink", !1, { | |
| href: "_wp_link_placeholder" | |
| - }), k = b.$('a[href="_wp_link_placeholder"]')[0], b.nodeChanged()))) | |
| + }), k = b.$('a[href="_wp_link_placeholder"]')[0], b.nodeChanged()) | |
| }), b.addCommand("wp_link_apply", function() { | |
| if (!h.scrolling) { | |
| var c, d; | |
| @@ -141,7 +142,7 @@ | |
| c.removeAttr("aria-activedescendant") | |
| }).autocomplete({ | |
| source: function(a, b) { | |
| - return e === a.term ? void b(d) : /^https?:/.test(a.term) || a.term.indexOf(".") !== -1 ? b() : (n.post(window.ajaxurl, { | |
| + return e === a.term ? void b(d) : /^https?:/.test(a.term) || -1 !== a.term.indexOf(".") ? b() : (n.post(window.ajaxurl, { | |
| action: "wp-link-ajax", | |
| page: 1, | |
| search: a.term, | |
| @@ -194,7 +195,8 @@ | |
| } | |
| }), b.on("wptoolbar", function(a) { | |
| var c, d, e, f = b.dom.getParent(a.element, "a"); | |
| - return "undefined" != typeof window.wpLink && window.wpLink.modalOpen ? void(h.tempHide = !0) : (h.tempHide = !1, void(f ? (c = b.$(f), d = c.attr("href"), e = c.attr("data-wplink-edit"), "_wp_link_placeholder" === d || e ? ("_wp_link_placeholder" === d || j.getURL() || j.setURL(d), a.element = f, a.toolbar = h) : d && !c.find("img").length && (i.setURL(d), a.element = f, a.toolbar = g, "true" === c.attr("data-wplink-url-error") ? g.$el.find(".wp-link-preview a").addClass("wplink-url-error") : (g.$el.find(".wp-link-preview a").removeClass("wplink-url-error"), s = !1))) : h.visible() && b.execCommand("wp_link_cancel"))) | |
| + if ("undefined" != typeof window.wpLink && window.wpLink.modalOpen) return void(h.tempHide = !0); | |
| + h.tempHide = !1, f ? (c = b.$(f), d = c.attr("href"), e = c.attr("data-wplink-edit"), "_wp_link_placeholder" === d || e ? ("_wp_link_placeholder" === d || j.getURL() || j.setURL(d), a.element = f, a.toolbar = h) : d && !c.find("img").length && (i.setURL(d), a.element = f, a.toolbar = g, "true" === c.attr("data-wplink-url-error") ? g.$el.find(".wp-link-preview a").addClass("wplink-url-error") : (g.$el.find(".wp-link-preview a").removeClass("wplink-url-error"), s = !1))) : h.visible() && b.execCommand("wp_link_cancel") | |
| }), b.addButton("wp_link_edit", { | |
| tooltip: "Edit|button", | |
| icon: "dashicon dashicons-edit", | |
| diff -ur build-unminified/wp-includes/js/tinymce/plugins/wptextpattern/plugin.min.js build-branch-unminified/wp-includes/js/tinymce/plugins/wptextpattern/plugin.min.js | |
| --- build-unminified/wp-includes/js/tinymce/plugins/wptextpattern/plugin.min.js 2018-10-06 21:45:22.850551533 -0500 | |
| +++ build-branch-unminified/wp-includes/js/tinymce/plugins/wptextpattern/plugin.min.js 2018-10-06 21:42:23.557214787 -0500 | |
| @@ -23,14 +23,14 @@ | |
| if (!(e && /\S/.test(j) && (/\s/.test(k) || j === d) || new RegExp("^[\\s" + c(d) + "]+$").test(n.slice(e, f)))) return g = a, !1 | |
| } | |
| } | |
| - }), g && (h = d.formatter.get(g.format), h && h[0].inline && (d.undoManager.add(), d.undoManager.transact(function() { | |
| + }), g && (h = d.formatter.get(g.format)) && h[0].inline && (d.undoManager.add(), d.undoManager.transact(function() { | |
| l.insertData(m, "\ufeff"), l = l.splitText(e), i = l.splitText(m - e), l.deleteData(0, g.delimiter.length), l.deleteData(l.data.length - g.delimiter.length, g.delimiter.length), d.formatter.apply(g.format, {}, l), d.selection.setCursorLocation(i, 1) | |
| }), b(function() { | |
| j = "space", d.once("selectionchange", function() { | |
| var a; | |
| - i && (a = i.data.indexOf("\ufeff"), a !== -1 && i.deleteData(a, a + 1)) | |
| + i && -1 !== (a = i.data.indexOf("\ufeff")) && i.deleteData(a, a + 1) | |
| }) | |
| - }))) | |
| + })) | |
| } | |
| } | |
| @@ -74,7 +74,7 @@ | |
| } | |
| e && (l === k && a.trim(c) === e.start || d.once("keyup", function() { | |
| d.undoManager.add(), d.undoManager.transact(function() { | |
| - e.format ? (d.formatter.apply(e.format, {}, l), l.replaceData(0, l.data.length, i(l.data.slice(e.start.length)))) : e.element && (g = l.parentNode && l.parentNode.parentNode, g && g.replaceChild(document.createElement(e.element), l.parentNode)) | |
| + e.format ? (d.formatter.apply(e.format, {}, l), l.replaceData(0, l.data.length, i(l.data.slice(e.start.length)))) : e.element && (g = l.parentNode && l.parentNode.parentNode) && g.replaceChild(document.createElement(e.element), l.parentNode) | |
| }), b(function() { | |
| j = "enter" | |
| }) | |
| diff -ur build-unminified/wp-includes/js/tinymce/plugins/wpview/plugin.min.js build-branch-unminified/wp-includes/js/tinymce/plugins/wpview/plugin.min.js | |
| --- build-unminified/wp-includes/js/tinymce/plugins/wpview/plugin.min.js 2018-10-06 21:45:22.630549892 -0500 | |
| +++ build-branch-unminified/wp-includes/js/tinymce/plugins/wpview/plugin.min.js 2018-10-06 21:42:23.081211239 -0500 | |
| @@ -30,8 +30,8 @@ | |
| }), c.on("beforesetcontent", function(a) { | |
| var d; | |
| if (a.selection || b.mce.views.unbind(), a.content) { | |
| - if (!a.load && (d = c.selection.getNode(), d && d !== c.getBody() && /^\s*https?:\/\/\S+\s*$/i.test(a.content))) { | |
| - if (d = c.dom.getParent(d, "p"), !d || !/^[\s\uFEFF\u00A0]*$/.test(c.$(d).text() || "")) return; | |
| + if (!a.load && (d = c.selection.getNode()) && d !== c.getBody() && /^\s*https?:\/\/\S+\s*$/i.test(a.content)) { | |
| + if (!(d = c.dom.getParent(d, "p")) || !/^[\s\uFEFF\u00A0]*$/.test(c.$(d).text() || "")) return; | |
| d.innerHTML = "" | |
| } | |
| a.content = b.mce.views.setMarkers(a.content, c) | |
| Binary files build-unminified/wp-includes/js/tinymce/wp-tinymce.js.gz and build-branch-unminified/wp-includes/js/tinymce/wp-tinymce.js.gz differ | |
| diff -ur build-unminified/wp-includes/js/twemoji.min.js build-branch-unminified/wp-includes/js/twemoji.min.js | |
| --- build-unminified/wp-includes/js/twemoji.min.js 2018-10-06 21:45:28.498593647 -0500 | |
| +++ build-branch-unminified/wp-includes/js/twemoji.min.js 2018-10-06 21:42:30.281264914 -0500 | |
| @@ -44,7 +44,7 @@ | |
| i = c.callback(h, c); | |
| if (i) { | |
| g = "<img ".concat('class="', c.className, '" ', 'draggable="false" ', 'alt="', a, '"', ' src="', i, '"'), d = c.attributes(a, h); | |
| - for (f in d) d.hasOwnProperty(f) && 0 !== f.indexOf("on") && g.indexOf(" " + f + "=") === -1 && (g = g.concat(" ", f, '="', b(d[f]), '"')); | |
| + for (f in d) d.hasOwnProperty(f) && 0 !== f.indexOf("on") && -1 === g.indexOf(" " + f + "=") && (g = g.concat(" ", f, '="', b(d[f]), '"')); | |
| g = g.concat("/>") | |
| } | |
| return g | |
| diff -ur build-unminified/wp-includes/js/tw-sack.min.js build-branch-unminified/wp-includes/js/tw-sack.min.js | |
| --- build-unminified/wp-includes/js/tw-sack.min.js 2018-10-06 21:45:18.466518844 -0500 | |
| +++ build-branch-unminified/wp-includes/js/tw-sack.min.js 2018-10-06 21:42:19.125181746 -0500 | |
| @@ -19,13 +19,14 @@ | |
| }, this.setVar = function(a, b) { | |
| this.vars[a] = Array(b, !1) | |
| }, this.encVar = function(a, b, c) { | |
| - return 1 == c ? Array(encodeURIComponent(a), encodeURIComponent(b)) : void(this.vars[encodeURIComponent(a)] = Array(encodeURIComponent(b), !0)) | |
| + if (1 == c) return Array(encodeURIComponent(a), encodeURIComponent(b)); | |
| + this.vars[encodeURIComponent(a)] = Array(encodeURIComponent(b), !0) | |
| }, this.processURLString = function(a, b) { | |
| for (encoded = encodeURIComponent(this.argumentSeparator), regexp = new RegExp(this.argumentSeparator + "|" + encoded), varArray = a.split(regexp), i = 0; i < varArray.length; i++) urlVars = varArray[i].split("="), 1 == b ? this.encVar(urlVars[0], urlVars[1]) : this.setVar(urlVars[0], urlVars[1]) | |
| }, this.createURLString = function(a) { | |
| this.encodeURIString && this.URLString.length && this.processURLString(this.URLString, !0), a && (this.URLString.length ? this.URLString += this.argumentSeparator + a : this.URLString = a), this.setVar("rndval", (new Date).getTime()), urlstringtemp = new Array; | |
| for (key in this.vars) 0 == this.vars[key][1] && 1 == this.encodeURIString && (encoded = this.encVar(key, this.vars[key][0], !0), delete this.vars[key], this.vars[encoded[0]] = Array(encoded[1], !0), key = encoded[0]), urlstringtemp[urlstringtemp.length] = key + "=" + this.vars[key][0]; | |
| - a ? this.URLString += this.argumentSeparator + urlstringtemp.join(this.argumentSeparator) : this.URLString += urlstringtemp.join(this.argumentSeparator) | |
| + this.URLString += a ? this.argumentSeparator + urlstringtemp.join(this.argumentSeparator) : urlstringtemp.join(this.argumentSeparator) | |
| }, this.runResponse = function() { | |
| eval(this.response) | |
| }, this.runAJAX = function(a) { | |
| diff -ur build-unminified/wp-includes/js/utils.min.js build-branch-unminified/wp-includes/js/utils.min.js | |
| --- build-unminified/wp-includes/js/utils.min.js 2018-10-06 21:45:26.858581418 -0500 | |
| +++ build-branch-unminified/wp-includes/js/utils.min.js 2018-10-06 21:42:28.397250869 -0500 | |
| @@ -1,6 +1,6 @@ | |
| function getUserSetting(a, b) { | |
| var c = getAllUserSettings(); | |
| - return c.hasOwnProperty(a) ? c[a] : "undefined" != typeof b ? b : "" | |
| + return c.hasOwnProperty(a) ? c[a] : void 0 !== b ? b : "" | |
| } | |
| function setUserSetting(a, b, c) { | |
| @@ -25,10 +25,10 @@ | |
| if (!a) return 0; | |
| if (c = c || a, "undefined" != typeof a.length) { | |
| for (d = 0, e = a.length; d < e; d++) | |
| - if (b.call(c, a[d], d, a) === !1) return 0 | |
| + if (!1 === b.call(c, a[d], d, a)) return 0 | |
| } else | |
| for (d in a) | |
| - if (a.hasOwnProperty(d) && b.call(c, a[d], d, a) === !1) return 0; | |
| + if (a.hasOwnProperty(d) && !1 === b.call(c, a[d], d, a)) return 0; | |
| return 1 | |
| }, | |
| getHash: function(a) { | |
| @@ -47,10 +47,10 @@ | |
| var b, c, d = document.cookie, | |
| e = a + "="; | |
| if (d) { | |
| - if (c = d.indexOf("; " + e), c === -1) { | |
| - if (c = d.indexOf(e), 0 !== c) return null | |
| + if (-1 === (c = d.indexOf("; " + e))) { | |
| + if (0 !== (c = d.indexOf(e))) return null | |
| } else c += 2; | |
| - return b = d.indexOf(";", c), b === -1 && (b = d.length), decodeURIComponent(d.substring(c + e.length, b)) | |
| + return b = d.indexOf(";", c), -1 === b && (b = d.length), decodeURIComponent(d.substring(c + e.length, b)) | |
| } | |
| }, | |
| set: function(a, b, c, d, e, f) { | |
| diff -ur build-unminified/wp-includes/js/wp-api.min.js build-branch-unminified/wp-includes/js/wp-api.min.js | |
| --- build-unminified/wp-includes/js/wp-api.min.js 2018-10-06 21:45:19.594527255 -0500 | |
| +++ build-branch-unminified/wp-includes/js/wp-api.min.js 2018-10-06 21:42:20.245190096 -0500 | |
| @@ -22,13 +22,13 @@ | |
| }, Date.prototype.toISOString = function() { | |
| return this.getUTCFullYear() + "-" + c(this.getUTCMonth() + 1) + "-" + c(this.getUTCDate()) + "T" + c(this.getUTCHours()) + ":" + c(this.getUTCMinutes()) + ":" + c(this.getUTCSeconds()) + "." + String((this.getUTCMilliseconds() / 1e3).toFixed(3)).slice(2, 5) + "Z" | |
| }), wp.api.utils.parseISO8601 = function(a) { | |
| - var c, d, e, f, g = 0, | |
| - h = [1, 4, 5, 6, 7, 10, 11]; | |
| - if (d = /^(\d{4}|[+\-]\d{6})(?:-(\d{2})(?:-(\d{2}))?)?(?:T(\d{2}):(\d{2})(?::(\d{2})(?:\.(\d{3}))?)?(?:(Z)|([+\-])(\d{2})(?::(\d{2}))?)?)?$/.exec(a)) { | |
| - for (e = 0; f = h[e]; ++e) d[f] = +d[f] || 0; | |
| - d[2] = (+d[2] || 1) - 1, d[3] = +d[3] || 1, "Z" !== d[8] && b !== d[9] && (g = 60 * d[10] + d[11], "+" === d[9] && (g = 0 - g)), c = Date.UTC(d[1], d[2], d[3], d[4], d[5] + g, d[6], d[7]) | |
| - } else c = Date.parse ? Date.parse(a) : NaN; | |
| - return c | |
| + var b, c, d, e, f = 0, | |
| + g = [1, 4, 5, 6, 7, 10, 11]; | |
| + if (c = /^(\d{4}|[+\-]\d{6})(?:-(\d{2})(?:-(\d{2}))?)?(?:T(\d{2}):(\d{2})(?::(\d{2})(?:\.(\d{3}))?)?(?:(Z)|([+\-])(\d{2})(?::(\d{2}))?)?)?$/.exec(a)) { | |
| + for (d = 0; e = g[d]; ++d) c[e] = +c[e] || 0; | |
| + c[2] = (+c[2] || 1) - 1, c[3] = +c[3] || 1, "Z" !== c[8] && void 0 !== c[9] && (f = 60 * c[10] + c[11], "+" === c[9] && (f = 0 - f)), b = Date.UTC(c[1], c[2], c[3], c[4], c[5] + f, c[6], c[7]) | |
| + } else b = Date.parse ? Date.parse(a) : NaN; | |
| + return b | |
| }, wp.api.utils.getRootUrl = function() { | |
| return a.location.origin ? a.location.origin + "/" : a.location.protocol + "/" + a.location.host + "/" | |
| }, wp.api.utils.capitalize = function(a) { | |
| @@ -55,7 +55,8 @@ | |
| f = { | |
| setDate: function(a, b) { | |
| var c = b || "date"; | |
| - return !(_.indexOf(e, c) < 0) && void this.set(c, a.toISOString()) | |
| + if (_.indexOf(e, c) < 0) return !1; | |
| + this.set(c, a.toISOString()) | |
| }, | |
| getDate: function(a) { | |
| var b = a || "date", | |
| @@ -100,8 +101,7 @@ | |
| }, | |
| j = { | |
| getMeta: function(a) { | |
| - var b = this.get("meta"); | |
| - return b[a] | |
| + return this.get("meta")[a] | |
| }, | |
| getMetas: function() { | |
| return this.get("meta") | |
| @@ -133,7 +133,8 @@ | |
| setTags: function(a) { | |
| var b, c, d = this, | |
| e = []; | |
| - return !_.isString(a) && void(_.isArray(a) ? (b = new wp.api.collections.Tags, b.fetch({ | |
| + if (_.isString(a)) return !1; | |
| + _.isArray(a) ? (b = new wp.api.collections.Tags, b.fetch({ | |
| data: { | |
| per_page: 100 | |
| }, | |
| @@ -144,7 +145,7 @@ | |
| })), c.set("parent_post", d.get("id")), e.push(c) | |
| }), a = new wp.api.collections.Tags(e), d.setTagsWithCollection(a) | |
| } | |
| - })) : this.setTagsWithCollection(a)) | |
| + })) : this.setTagsWithCollection(a) | |
| }, | |
| setTagsWithCollection: function(a) { | |
| return this.set("tags", a.pluck("id")), this.save() | |
| @@ -163,7 +164,8 @@ | |
| setCategories: function(a) { | |
| var b, c, d = this, | |
| e = []; | |
| - return !_.isString(a) && void(_.isArray(a) ? (b = new wp.api.collections.Categories, b.fetch({ | |
| + if (_.isString(a)) return !1; | |
| + _.isArray(a) ? (b = new wp.api.collections.Categories, b.fetch({ | |
| data: { | |
| per_page: 100 | |
| }, | |
| @@ -174,7 +176,7 @@ | |
| })), c.set("parent_post", d.get("id")), e.push(c) | |
| }), a = new wp.api.collections.Categories(e), d.setCategoriesWithCollection(a) | |
| } | |
| - })) : this.setCategoriesWithCollection(a)) | |
| + })) : this.setCategoriesWithCollection(a) | |
| }, | |
| setCategoriesWithCollection: function(a) { | |
| return this.set("categories", a.pluck("id")), this.save() | |
| @@ -235,7 +237,7 @@ | |
| }(), | |
| function() { | |
| "use strict"; | |
| - window.wpApiSettings || {}; | |
| + window.wpApiSettings; | |
| wp.api.WPApiBaseCollection = Backbone.Collection.extend({ | |
| initialize: function(a, b) { | |
| this.state = { | |
| diff -ur build-unminified/wp-includes/js/wp-custom-header.min.js build-branch-unminified/wp-includes/js/wp-custom-header.min.js | |
| --- build-unminified/wp-includes/js/wp-custom-header.min.js 2018-10-06 21:45:27.190583894 -0500 | |
| +++ build-branch-unminified/wp-includes/js/wp-custom-header.min.js 2018-10-06 21:42:28.729253344 -0500 | |
| @@ -59,8 +59,7 @@ | |
| } | |
| }, e.extend = function(a) { | |
| function b() { | |
| - var a = e.apply(this, arguments); | |
| - return a | |
| + return e.apply(this, arguments) | |
| } | |
| var c; | |
| b.prototype = Object.create(e.prototype), b.prototype.constructor = b; | |
| @@ -68,8 +67,7 @@ | |
| return b | |
| }, f = e.extend({ | |
| test: function(a) { | |
| - var b = document.createElement("video"); | |
| - return b.canPlayType(a.mimeType) | |
| + return document.createElement("video").canPlayType(a.mimeType) | |
| }, | |
| ready: function() { | |
| var a = this, | |
| diff -ur build-unminified/wp-includes/js/wp-embed.min.js build-branch-unminified/wp-includes/js/wp-embed.min.js | |
| --- build-unminified/wp-includes/js/wp-embed.min.js 2018-10-06 21:45:18.354518009 -0500 | |
| +++ build-branch-unminified/wp-includes/js/wp-embed.min.js 2018-10-06 21:42:19.025181001 -0500 | |
| @@ -28,14 +28,14 @@ | |
| for (e = 0; e < j.length; e++) | |
| if (f = j[e], c.source === f.contentWindow) { | |
| if (f.removeAttribute("style"), "height" === d.message) { | |
| - if (g = parseInt(d.value, 10), g > 1e3) g = 1e3; | |
| + if ((g = parseInt(d.value, 10)) > 1e3) g = 1e3; | |
| else if (~~g < 200) g = 200; | |
| f.height = g | |
| } | |
| if ("link" === d.message) | |
| if (h = b.createElement("a"), i = b.createElement("a"), h.href = f.getAttribute("src"), i.href = d.value, i.host === h.host) | |
| if (b.activeElement === f) a.top.location.href = d.value | |
| - } else; | |
| + } | |
| } | |
| }, d) a.addEventListener("message", a.wp.receiveEmbedMessage, !1), b.addEventListener("DOMContentLoaded", c, !1), a.addEventListener("load", c, !1) | |
| }(window, document); | |
| \ No newline at end of file | |
| diff -ur build-unminified/wp-includes/js/wp-embed-template.min.js build-branch-unminified/wp-includes/js/wp-embed-template.min.js | |
| --- build-unminified/wp-includes/js/wp-embed-template.min.js 2018-10-06 21:45:18.714520693 -0500 | |
| +++ build-branch-unminified/wp-includes/js/wp-embed-template.min.js 2018-10-06 21:42:19.377183626 -0500 | |
| @@ -42,7 +42,7 @@ | |
| function i(a) { | |
| var b, d = a.target; | |
| - b = d.hasAttribute("href") ? d.getAttribute("href") : d.parentElement.getAttribute("href"), b && (c("link", b), a.preventDefault()) | |
| + (b = d.hasAttribute("href") ? d.getAttribute("href") : d.parentElement.getAttribute("href")) && (c("link", b), a.preventDefault()) | |
| } | |
| if (!k) { | |
| k = !0; | |
| diff -ur build-unminified/wp-includes/js/wp-emoji-loader.min.js build-branch-unminified/wp-includes/js/wp-emoji-loader.min.js | |
| --- build-unminified/wp-includes/js/wp-emoji-loader.min.js 2018-10-06 21:45:19.058523258 -0500 | |
| +++ build-branch-unminified/wp-includes/js/wp-emoji-loader.min.js 2018-10-06 21:42:19.729186250 -0500 | |
| @@ -1,40 +1,35 @@ | |
| ! function(a, b, c) { | |
| function d(a, b) { | |
| var c = String.fromCharCode; | |
| - l.clearRect(0, 0, k.width, k.height), l.fillText(c.apply(this, a), 0, 0); | |
| - var d = k.toDataURL(); | |
| - l.clearRect(0, 0, k.width, k.height), l.fillText(c.apply(this, b), 0, 0); | |
| - var e = k.toDataURL(); | |
| - return d === e | |
| + k.clearRect(0, 0, j.width, j.height), k.fillText(c.apply(this, a), 0, 0); | |
| + var d = j.toDataURL(); | |
| + return k.clearRect(0, 0, j.width, j.height), k.fillText(c.apply(this, b), 0, 0), d === j.toDataURL() | |
| } | |
| function e(a) { | |
| - var b; | |
| - if (!l || !l.fillText) return !1; | |
| - switch (l.textBaseline = "top", l.font = "600 32px Arial", a) { | |
| - case "flag": | |
| - return !(b = d([55356, 56826, 55356, 56819], [55356, 56826, 8203, 55356, 56819])) && (b = d([55356, 57332, 56128, 56423, 56128, 56418, 56128, 56421, 56128, 56430, 56128, 56423, 56128, 56447], [55356, 57332, 8203, 56128, 56423, 8203, 56128, 56418, 8203, 56128, 56421, 8203, 56128, 56430, 8203, 56128, 56423, 8203, 56128, 56447]), !b); | |
| - case "emoji": | |
| - return b = d([55358, 56760, 9792, 65039], [55358, 56760, 8203, 9792, 65039]), !b | |
| - } | |
| - return !1 | |
| - } | |
| - | |
| - function f(a) { | |
| var c = b.createElement("script"); | |
| c.src = a, c.defer = c.type = "text/javascript", b.getElementsByTagName("head")[0].appendChild(c) | |
| } | |
| - var g, h, i, j, k = b.createElement("canvas"), | |
| - l = k.getContext && k.getContext("2d"); | |
| - for (j = Array("flag", "emoji"), c.supports = { | |
| + var f, g, h, i, j = b.createElement("canvas"), | |
| + k = j.getContext && j.getContext("2d"); | |
| + for (i = Array("flag", "emoji"), c.supports = { | |
| everything: !0, | |
| everythingExceptFlag: !0 | |
| - }, i = 0; i < j.length; i++) c.supports[j[i]] = e(j[i]), c.supports.everything = c.supports.everything && c.supports[j[i]], "flag" !== j[i] && (c.supports.everythingExceptFlag = c.supports.everythingExceptFlag && c.supports[j[i]]); | |
| + }, h = 0; h < i.length; h++) c.supports[i[h]] = function(a) { | |
| + if (!k || !k.fillText) return !1; | |
| + switch (k.textBaseline = "top", k.font = "600 32px Arial", a) { | |
| + case "flag": | |
| + return !d([55356, 56826, 55356, 56819], [55356, 56826, 8203, 55356, 56819]) && !d([55356, 57332, 56128, 56423, 56128, 56418, 56128, 56421, 56128, 56430, 56128, 56423, 56128, 56447], [55356, 57332, 8203, 56128, 56423, 8203, 56128, 56418, 8203, 56128, 56421, 8203, 56128, 56430, 8203, 56128, 56423, 8203, 56128, 56447]); | |
| + case "emoji": | |
| + return !d([55358, 56760, 9792, 65039], [55358, 56760, 8203, 9792, 65039]) | |
| + } | |
| + return !1 | |
| + }(i[h]), c.supports.everything = c.supports.everything && c.supports[i[h]], "flag" !== i[h] && (c.supports.everythingExceptFlag = c.supports.everythingExceptFlag && c.supports[i[h]]); | |
| c.supports.everythingExceptFlag = c.supports.everythingExceptFlag && !c.supports.flag, c.DOMReady = !1, c.readyCallback = function() { | |
| c.DOMReady = !0 | |
| - }, c.supports.everything || (h = function() { | |
| + }, c.supports.everything || (g = function() { | |
| c.readyCallback() | |
| - }, b.addEventListener ? (b.addEventListener("DOMContentLoaded", h, !1), a.addEventListener("load", h, !1)) : (a.attachEvent("onload", h), b.attachEvent("onreadystatechange", function() { | |
| + }, b.addEventListener ? (b.addEventListener("DOMContentLoaded", g, !1), a.addEventListener("load", g, !1)) : (a.attachEvent("onload", g), b.attachEvent("onreadystatechange", function() { | |
| "complete" === b.readyState && c.readyCallback() | |
| - })), g = c.source || {}, g.concatemoji ? f(g.concatemoji) : g.wpemoji && g.twemoji && (f(g.twemoji), f(g.wpemoji))) | |
| + })), f = c.source || {}, f.concatemoji ? e(f.concatemoji) : f.wpemoji && f.twemoji && (e(f.twemoji), e(f.wpemoji))) | |
| }(window, document, window._wpemojiSettings); | |
| \ No newline at end of file | |
| diff -ur build-unminified/wp-includes/js/wp-emoji.min.js build-branch-unminified/wp-includes/js/wp-emoji.min.js | |
| --- build-unminified/wp-includes/js/wp-emoji.min.js 2018-10-06 21:45:18.230517084 -0500 | |
| +++ build-branch-unminified/wp-includes/js/wp-emoji.min.js 2018-10-06 21:42:18.913180166 -0500 | |
| @@ -12,14 +12,14 @@ | |
| } | |
| g = a.twemoji, k = !0, i && new i(function(a) { | |
| for (var b, c, d, g, h = a.length; h--;) { | |
| - if (b = a[h].addedNodes, c = a[h].removedNodes, d = b.length, 1 === d && 1 === c.length && 3 === b[0].nodeType && "IMG" === c[0].nodeName && b[0].data === c[0].alt && "load-failed" === c[0].getAttribute("data-error")) return; | |
| + if (b = a[h].addedNodes, c = a[h].removedNodes, 1 === (d = b.length) && 1 === c.length && 3 === b[0].nodeType && "IMG" === c[0].nodeName && b[0].data === c[0].alt && "load-failed" === c[0].getAttribute("data-error")) return; | |
| for (; d--;) { | |
| if (g = b[d], 3 === g.nodeType) { | |
| if (!g.parentNode) continue; | |
| if (m) | |
| for (; g.nextSibling && 3 === g.nextSibling.nodeType;) g.nodeValue = g.nodeValue + g.nextSibling.nodeValue, g.parentNode.removeChild(g.nextSibling); | |
| g = g.parentNode | |
| - }!g || 1 !== g.nodeType || g.className && "string" == typeof g.className && g.className.indexOf("wp-exclude-emoji") !== -1 || e(g.textContent) && f(g) | |
| + }!g || 1 !== g.nodeType || g.className && "string" == typeof g.className && -1 !== g.className.indexOf("wp-exclude-emoji") || e(g.textContent) && f(g) | |
| } | |
| } | |
| }).observe(j.body, { | |
| diff -ur build-unminified/wp-includes/js/wp-emoji-release.min.js build-branch-unminified/wp-includes/js/wp-emoji-release.min.js | |
| --- build-unminified/wp-includes/js/wp-emoji-release.min.js 2018-10-06 21:45:36.326652016 -0500 | |
| +++ build-branch-unminified/wp-includes/js/wp-emoji-release.min.js 2018-10-06 21:42:38.525326373 -0500 | |
| @@ -45,7 +45,7 @@ | |
| i = c.callback(h, c); | |
| if (i) { | |
| g = "<img ".concat('class="', c.className, '" ', 'draggable="false" ', 'alt="', a, '"', ' src="', i, '"'), d = c.attributes(a, h); | |
| - for (f in d) d.hasOwnProperty(f) && 0 !== f.indexOf("on") && g.indexOf(" " + f + "=") === -1 && (g = g.concat(" ", f, '="', b(d[f]), '"')); | |
| + for (f in d) d.hasOwnProperty(f) && 0 !== f.indexOf("on") && -1 === g.indexOf(" " + f + "=") && (g = g.concat(" ", f, '="', b(d[f]), '"')); | |
| g = g.concat("/>") | |
| } | |
| return g | |
| @@ -143,14 +143,14 @@ | |
| } | |
| g = a.twemoji, k = !0, i && new i(function(a) { | |
| for (var b, c, d, g, h = a.length; h--;) { | |
| - if (b = a[h].addedNodes, c = a[h].removedNodes, d = b.length, 1 === d && 1 === c.length && 3 === b[0].nodeType && "IMG" === c[0].nodeName && b[0].data === c[0].alt && "load-failed" === c[0].getAttribute("data-error")) return; | |
| + if (b = a[h].addedNodes, c = a[h].removedNodes, 1 === (d = b.length) && 1 === c.length && 3 === b[0].nodeType && "IMG" === c[0].nodeName && b[0].data === c[0].alt && "load-failed" === c[0].getAttribute("data-error")) return; | |
| for (; d--;) { | |
| if (g = b[d], 3 === g.nodeType) { | |
| if (!g.parentNode) continue; | |
| if (m) | |
| for (; g.nextSibling && 3 === g.nextSibling.nodeType;) g.nodeValue = g.nodeValue + g.nextSibling.nodeValue, g.parentNode.removeChild(g.nextSibling); | |
| g = g.parentNode | |
| - }!g || 1 !== g.nodeType || g.className && "string" == typeof g.className && g.className.indexOf("wp-exclude-emoji") !== -1 || e(g.textContent) && f(g) | |
| + }!g || 1 !== g.nodeType || g.className && "string" == typeof g.className && -1 !== g.className.indexOf("wp-exclude-emoji") || e(g.textContent) && f(g) | |
| } | |
| } | |
| }).observe(j.body, { | |
| diff -ur build-unminified/wp-includes/js/wplink.min.js build-branch-unminified/wp-includes/js/wplink.min.js | |
| --- build-unminified/wp-includes/js/wplink.min.js 2018-10-06 21:45:20.742535815 -0500 | |
| +++ build-branch-unminified/wp-includes/js/wplink.min.js 2018-10-06 21:42:21.417198833 -0500 | |
| @@ -45,14 +45,13 @@ | |
| return e && !e.isHidden() | |
| }, | |
| refresh: function(a, b) { | |
| - var c = ""; | |
| - n.search.refresh(), n.recent.refresh(), wpLink.isMCE() ? wpLink.mceRefresh(a, b) : (m.wrap.hasClass("has-text-field") || m.wrap.addClass("has-text-field"), document.selection ? c = document.selection.createRange().text || b || "" : "undefined" != typeof this.textarea.selectionStart && this.textarea.selectionStart !== this.textarea.selectionEnd && (b = this.textarea.value.substring(this.textarea.selectionStart, this.textarea.selectionEnd) || b || ""), m.text.val(b), wpLink.setDefaultValues()), o ? m.url.focus().blur() : window.setTimeout(function() { | |
| + n.search.refresh(), n.recent.refresh(), wpLink.isMCE() ? wpLink.mceRefresh(a, b) : (m.wrap.hasClass("has-text-field") || m.wrap.addClass("has-text-field"), document.selection ? document.selection.createRange().text || b || "" : "undefined" != typeof this.textarea.selectionStart && this.textarea.selectionStart !== this.textarea.selectionEnd && (b = this.textarea.value.substring(this.textarea.selectionStart, this.textarea.selectionEnd) || b || ""), m.text.val(b), wpLink.setDefaultValues()), o ? m.url.focus().blur() : window.setTimeout(function() { | |
| m.url[0].select(), m.url.focus() | |
| }), n.recent.ul.children().length || n.recent.ajax(), i = m.url.val().replace(/^http:\/\//, "") | |
| }, | |
| hasSelectedText: function(a) { | |
| var b, c, d, f = e.selection.getContent(); | |
| - if (/</.test(f) && (!/^<a [^>]+>[^<]+<\/a>$/.test(f) || f.indexOf("href=") === -1)) return !1; | |
| + if (/</.test(f) && (!/^<a [^>]+>[^<]+<\/a>$/.test(f) || -1 === f.indexOf("href="))) return !1; | |
| if (a) { | |
| if (c = a.childNodes, 0 === c.length) return !1; | |
| for (d = c.length - 1; d >= 0; d--) | |
| @@ -96,12 +95,13 @@ | |
| mceUpdate: function() { | |
| var f, g, h, i, j = wpLink.getAttrs(), | |
| k = document.createElement("a"); | |
| - return k.href = j.href, "javascript:" !== k.protocol && "data:" !== k.protocol || (j.href = ""), j.href ? (f = e.$(d()), e.undoManager.transact(function() { | |
| + if (k.href = j.href, "javascript:" !== k.protocol && "data:" !== k.protocol || (j.href = ""), !j.href) return e.execCommand("unlink"), void wpLink.close(); | |
| + f = e.$(d()), e.undoManager.transact(function() { | |
| f.length || (e.execCommand("mceInsertLink", !1, { | |
| href: "_wp_link_placeholder", | |
| "data-wp-temp-link": 1 | |
| }), f = e.$('a[data-wp-temp-link="1"]').removeAttr("data-wp-temp-link"), h = a.trim(f.text())), f.length ? (m.wrap.hasClass("has-text-field") && (g = m.text.val(), g ? f.text(g) : h || f.text(j.href)), j["data-wplink-edit"] = null, j["data-mce-href"] = null, f.attr(j)) : e.execCommand("unlink") | |
| - }), wpLink.close("noReset"), e.focus(), f.length && (i = f.parent("#_mce_caret"), i.length && i.before(f.removeAttr("data-mce-bogus")), e.selection.select(f[0]), e.selection.collapse(), e.plugins.wplink && e.plugins.wplink.checkLink(f[0])), e.nodeChanged(), void c.a11y.speak(b.linkInserted)) : (e.execCommand("unlink"), void wpLink.close()) | |
| + }), wpLink.close("noReset"), e.focus(), f.length && (i = f.parent("#_mce_caret"), i.length && i.before(f.removeAttr("data-mce-bogus")), e.selection.select(f[0]), e.selection.collapse(), e.plugins.wplink && e.plugins.wplink.checkLink(f[0])), e.nodeChanged(), c.a11y.speak(b.linkInserted) | |
| }, | |
| updateFields: function(a, b) { | |
| m.url.val(b.children(".item-permalink").val()) | |
| @@ -139,9 +139,11 @@ | |
| delayedCallback: function(a, b) { | |
| var c, d, e, f; | |
| return b ? (setTimeout(function() { | |
| - return d ? a.apply(f, e) : void(c = !0) | |
| + if (d) return a.apply(f, e); | |
| + c = !0 | |
| }, b), function() { | |
| - return c ? a.apply(this, arguments) : (e = arguments, f = this, void(d = !0)) | |
| + if (c) return a.apply(this, arguments); | |
| + e = arguments, f = this, d = !0 | |
| }) : a | |
| } | |
| }, g = function(b, c) { | |
| diff -ur build-unminified/wp-includes/js/wp-pointer.min.js build-branch-unminified/wp-includes/js/wp-pointer.min.js | |
| --- build-unminified/wp-includes/js/wp-pointer.min.js 2018-10-06 21:45:19.282524928 -0500 | |
| +++ build-branch-unminified/wp-includes/js/wp-pointer.min.js 2018-10-06 21:42: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment