Update WP and plugins
This commit is contained in:
parent
10a4713229
commit
1fb77fc4ff
864 changed files with 101724 additions and 78262 deletions
|
@ -1,3 +1,7 @@
|
|||
/**
|
||||
* @output wp-includes/js/admin-bar.js
|
||||
*/
|
||||
|
||||
/* jshint loopfunc: true */
|
||||
// use jQuery and hoverIntent if loaded
|
||||
if ( typeof(jQuery) != 'undefined' ) {
|
||||
|
@ -10,12 +14,33 @@ if ( typeof(jQuery) != 'undefined' ) {
|
|||
jQuery(document).ready(function($){
|
||||
var adminbar = $('#wpadminbar'), refresh, touchOpen, touchClose, disableHoverIntent = false;
|
||||
|
||||
refresh = function(i, el){ // force the browser to refresh the tabbing index
|
||||
/**
|
||||
* Forces the browser to refresh the tabbing index.
|
||||
*
|
||||
* @since 3.3.0
|
||||
*
|
||||
* @param {number} i The index of the HTML element to remove the tab index
|
||||
* from. This parameter is necessary because we use this
|
||||
* function in .each calls.
|
||||
* @param {HTMLElement} el The HTML element to remove the tab index from.
|
||||
*
|
||||
* @return {void}
|
||||
*/
|
||||
refresh = function(i, el){
|
||||
var node = $(el), tab = node.attr('tabindex');
|
||||
if ( tab )
|
||||
node.attr('tabindex', '0').attr('tabindex', tab);
|
||||
};
|
||||
|
||||
/**
|
||||
* Adds or removes the hover class on touch.
|
||||
*
|
||||
* @since 3.5.0
|
||||
*
|
||||
* @param {boolean} unbind If true removes the wp-mobile-hover class.
|
||||
*
|
||||
* @return {void}
|
||||
*/
|
||||
touchOpen = function(unbind) {
|
||||
adminbar.find('li.menupop').on('click.wp-mobile-hover', function(e) {
|
||||
var el = $(this);
|
||||
|
@ -43,6 +68,13 @@ if ( typeof(jQuery) != 'undefined' ) {
|
|||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* Removes the hover class if clicked or touched outside the admin bar.
|
||||
*
|
||||
* @since 3.5.0
|
||||
*
|
||||
* @return {void}
|
||||
*/
|
||||
touchClose = function() {
|
||||
var mobileEvent = /Mobile\/.+Safari/.test(navigator.userAgent) ? 'touchstart' : 'click';
|
||||
// close any open drop-downs when the click/touch is not on the toolbar
|
||||
|
@ -54,6 +86,8 @@ if ( typeof(jQuery) != 'undefined' ) {
|
|||
|
||||
adminbar.removeClass('nojq').removeClass('nojs');
|
||||
|
||||
// If clicked on the adminbar add the hoverclass, if clicked outside it remove
|
||||
// it.
|
||||
if ( 'ontouchstart' in window ) {
|
||||
adminbar.on('touchstart', function(){
|
||||
touchOpen(true);
|
||||
|
@ -65,6 +99,7 @@ if ( typeof(jQuery) != 'undefined' ) {
|
|||
touchClose();
|
||||
}
|
||||
|
||||
// Adds or removes the hover class based on the hover intent.
|
||||
adminbar.find('li.menupop').hoverIntent({
|
||||
over: function() {
|
||||
if ( disableHoverIntent )
|
||||
|
@ -83,9 +118,21 @@ if ( typeof(jQuery) != 'undefined' ) {
|
|||
interval: 100
|
||||
});
|
||||
|
||||
// Prevents the toolbar from covering up content when a hash is present in the
|
||||
// URL.
|
||||
if ( window.location.hash )
|
||||
window.scrollBy( 0, -32 );
|
||||
|
||||
/**
|
||||
* Handles the selected state of the Shortlink link.
|
||||
*
|
||||
* When the input is visible the link should be selected, when the input is
|
||||
* unfocused the link should be unselected.
|
||||
*
|
||||
* @param {Object} e The click event.
|
||||
*
|
||||
* @return {void}
|
||||
**/
|
||||
$('#wp-admin-bar-get-shortlink').click(function(e){
|
||||
e.preventDefault();
|
||||
$(this).addClass('selected').children('.shortlink-input').blur(function(){
|
||||
|
@ -93,7 +140,18 @@ if ( typeof(jQuery) != 'undefined' ) {
|
|||
}).focus().select();
|
||||
});
|
||||
|
||||
/**
|
||||
* Removes the hoverclass if the enter key is pressed.
|
||||
*
|
||||
* Makes sure the tab index is refreshed by refreshing each ab-item
|
||||
* and its children.
|
||||
*
|
||||
* @param {Object} e The keydown event.
|
||||
*
|
||||
* @return {void}
|
||||
*/
|
||||
$('#wpadminbar li.menupop > .ab-item').bind('keydown.adminbar', function(e){
|
||||
// Key code 13 is the enter key.
|
||||
if ( e.which != 13 )
|
||||
return;
|
||||
|
||||
|
@ -116,7 +174,18 @@ if ( typeof(jQuery) != 'undefined' ) {
|
|||
target.siblings('.ab-sub-wrapper').find('.ab-item').each(refresh);
|
||||
}).each(refresh);
|
||||
|
||||
/**
|
||||
* Removes the hover class when the escape key is pressed.
|
||||
*
|
||||
* Makes sure the tab index is refreshed by refreshing each ab-item
|
||||
* and its children.
|
||||
*
|
||||
* @param {Object} e The keydown event.
|
||||
*
|
||||
* @return {void}
|
||||
*/
|
||||
$('#wpadminbar .ab-item').bind('keydown.adminbar', function(e){
|
||||
// Key code 27 is the escape key.
|
||||
if ( e.which != 27 )
|
||||
return;
|
||||
|
||||
|
@ -129,6 +198,13 @@ if ( typeof(jQuery) != 'undefined' ) {
|
|||
target.siblings('.ab-sub-wrapper').find('.ab-item').each(refresh);
|
||||
});
|
||||
|
||||
/**
|
||||
* Scrolls to top of page by clicking the adminbar.
|
||||
*
|
||||
* @param {Object} e The click event.
|
||||
*
|
||||
* @return {void}
|
||||
*/
|
||||
adminbar.click( function(e) {
|
||||
if ( e.target.id != 'wpadminbar' && e.target.id != 'wp-admin-bar-top-secondary' ) {
|
||||
return;
|
||||
|
@ -139,7 +215,15 @@ if ( typeof(jQuery) != 'undefined' ) {
|
|||
e.preventDefault();
|
||||
});
|
||||
|
||||
// fix focus bug in WebKit
|
||||
/**
|
||||
* Sets the focus on an element with a href attribute.
|
||||
*
|
||||
* The timeout is used to fix a focus bug in WebKit.
|
||||
*
|
||||
* @param {Object} e The keydown event.
|
||||
*
|
||||
* @return {void}
|
||||
*/
|
||||
$('.screen-reader-shortcut').keydown( function(e) {
|
||||
var id, ua;
|
||||
|
||||
|
@ -158,15 +242,29 @@ if ( typeof(jQuery) != 'undefined' ) {
|
|||
});
|
||||
|
||||
$( '#adminbar-search' ).on({
|
||||
/**
|
||||
* Adds the adminbar-focused class on focus.
|
||||
*
|
||||
* @return {void}
|
||||
*/
|
||||
focus: function() {
|
||||
$( '#adminbarsearch' ).addClass( 'adminbar-focused' );
|
||||
/**
|
||||
* Removes the adminbar-focused class on blur.
|
||||
*
|
||||
* @return {void}
|
||||
*/
|
||||
}, blur: function() {
|
||||
$( '#adminbarsearch' ).removeClass( 'adminbar-focused' );
|
||||
}
|
||||
} );
|
||||
|
||||
// Empty sessionStorage on logging out
|
||||
if ( 'sessionStorage' in window ) {
|
||||
/**
|
||||
* Empties sessionStorage on logging out.
|
||||
*
|
||||
* @return {void}
|
||||
*/
|
||||
$('#wp-admin-bar-logout a').click( function() {
|
||||
try {
|
||||
for ( var key in sessionStorage ) {
|
||||
|
@ -184,19 +282,47 @@ if ( typeof(jQuery) != 'undefined' ) {
|
|||
}
|
||||
});
|
||||
} else {
|
||||
/**
|
||||
* Wrapper function for the adminbar that's used if jQuery isn't available.
|
||||
*
|
||||
* @param {Object} d The document object.
|
||||
* @param {Object} w The window object.
|
||||
*
|
||||
* @return {void}
|
||||
*/
|
||||
(function(d, w) {
|
||||
/**
|
||||
* Adds an event listener to an object.
|
||||
*
|
||||
* @since 3.1.0
|
||||
*
|
||||
* @param {Object} obj The object to add the event listener to.
|
||||
* @param {string} type The type of event.
|
||||
* @param {function} fn The function to bind to the event listener.
|
||||
*
|
||||
* @return {void}
|
||||
*/
|
||||
var addEvent = function( obj, type, fn ) {
|
||||
if ( obj.addEventListener )
|
||||
obj.addEventListener(type, fn, false);
|
||||
else if ( obj.attachEvent )
|
||||
obj.attachEvent('on' + type, function() { return fn.call(obj, window.event);});
|
||||
if ( obj && typeof obj.addEventListener === 'function' ) {
|
||||
obj.addEventListener( type, fn, false );
|
||||
} else if ( obj && typeof obj.attachEvent === 'function' ) {
|
||||
obj.attachEvent( 'on' + type, function() {
|
||||
return fn.call( obj, window.event );
|
||||
} );
|
||||
}
|
||||
},
|
||||
|
||||
aB, hc = new RegExp('\\bhover\\b', 'g'), q = [],
|
||||
rselected = new RegExp('\\bselected\\b', 'g'),
|
||||
|
||||
/**
|
||||
* Get the timeout ID of the given element
|
||||
* Gets the timeout ID of the given element.
|
||||
*
|
||||
* @since 3.1.0
|
||||
*
|
||||
* @param {HTMLElement} el The HTML element.
|
||||
*
|
||||
* @return {number|boolean} The ID value of the timer that is set or false.
|
||||
*/
|
||||
getTOID = function(el) {
|
||||
var i = q.length;
|
||||
|
@ -207,11 +333,21 @@ if ( typeof(jQuery) != 'undefined' ) {
|
|||
return false;
|
||||
},
|
||||
|
||||
/**
|
||||
* Adds the hoverclass to menu items.
|
||||
*
|
||||
* @since 3.1.0
|
||||
*
|
||||
* @param {HTMLElement} t The HTML element.
|
||||
*
|
||||
* @return {void}
|
||||
*/
|
||||
addHoverClass = function(t) {
|
||||
var i, id, inA, hovering, ul, li,
|
||||
ancestors = [],
|
||||
ancestorLength = 0;
|
||||
|
||||
// aB is adminbar. d is document.
|
||||
while ( t && t != aB && t != d ) {
|
||||
if ( 'LI' == t.nodeName.toUpperCase() ) {
|
||||
ancestors[ ancestors.length ] = t;
|
||||
|
@ -224,7 +360,7 @@ if ( typeof(jQuery) != 'undefined' ) {
|
|||
t = t.parentNode;
|
||||
}
|
||||
|
||||
// Remove any selected classes.
|
||||
// Removes any selected classes.
|
||||
if ( hovering && hovering.parentNode ) {
|
||||
ul = hovering.parentNode;
|
||||
if ( ul && 'UL' == ul.nodeName.toUpperCase() ) {
|
||||
|
@ -237,7 +373,7 @@ if ( typeof(jQuery) != 'undefined' ) {
|
|||
}
|
||||
}
|
||||
|
||||
/* remove the hover class for any objects not in the immediate element's ancestry */
|
||||
// Removes the hover class for any objects not in the immediate element's ancestry.
|
||||
i = q.length;
|
||||
while ( i-- ) {
|
||||
inA = false;
|
||||
|
@ -252,6 +388,15 @@ if ( typeof(jQuery) != 'undefined' ) {
|
|||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Removes the hoverclass from menu items.
|
||||
*
|
||||
* @since 3.1.0
|
||||
*
|
||||
* @param {HTMLElement} t The HTML element.
|
||||
*
|
||||
* @return {void}
|
||||
*/
|
||||
removeHoverClass = function(t) {
|
||||
while ( t && t != aB && t != d ) {
|
||||
if ( 'LI' == t.nodeName.toUpperCase() ) {
|
||||
|
@ -266,6 +411,15 @@ if ( typeof(jQuery) != 'undefined' ) {
|
|||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Handles the click on the Shortlink link in the adminbar.
|
||||
*
|
||||
* @since 3.1.0
|
||||
*
|
||||
* @param {Object} e The click event.
|
||||
*
|
||||
* @return {boolean} Returns false to prevent default click behavior.
|
||||
*/
|
||||
clickShortlink = function(e) {
|
||||
var i, l, node,
|
||||
t = e.target || e.srcElement;
|
||||
|
@ -304,6 +458,15 @@ if ( typeof(jQuery) != 'undefined' ) {
|
|||
return false;
|
||||
},
|
||||
|
||||
/**
|
||||
* Scrolls to the top of the page.
|
||||
*
|
||||
* @since 3.4.0
|
||||
*
|
||||
* @param {HTMLElement} t The HTML element.
|
||||
*
|
||||
* @return {void}
|
||||
*/
|
||||
scrollToTop = function(t) {
|
||||
var distance, speed, step, steps, timer, speed_step;
|
||||
|
||||
|
|
2
wp-includes/js/admin-bar.min.js
vendored
2
wp-includes/js/admin-bar.min.js
vendored
File diff suppressed because one or more lines are too long
|
@ -9,6 +9,7 @@
|
|||
* - Allows specifying only an endpoint namespace/path instead of a full URL.
|
||||
*
|
||||
* @since 4.9.0
|
||||
* @output wp-includes/js/api-request.js
|
||||
*/
|
||||
|
||||
( function( $ ) {
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
/**
|
||||
* @output wp-includes/js/autosave.js
|
||||
*/
|
||||
|
||||
/* global tinymce, wpCookies, autosaveL10n, switchEditors */
|
||||
// Back-compat
|
||||
window.autosave = function() {
|
||||
|
@ -5,7 +9,7 @@ window.autosave = function() {
|
|||
};
|
||||
|
||||
/**
|
||||
* @summary Adds autosave to the window object on dom ready.
|
||||
* Adds autosave to the window object on dom ready.
|
||||
*
|
||||
* @since 3.9.0
|
||||
*
|
||||
|
@ -15,7 +19,7 @@ window.autosave = function() {
|
|||
*/
|
||||
( function( $, window ) {
|
||||
/**
|
||||
* @summary Auto saves the post.
|
||||
* Auto saves the post.
|
||||
*
|
||||
* @since 3.9.0
|
||||
*
|
||||
|
@ -36,7 +40,7 @@ window.autosave = function() {
|
|||
$document = $(document);
|
||||
|
||||
/**
|
||||
* @summary Returns the data saved in both local and remote autosave.
|
||||
* Returns the data saved in both local and remote autosave.
|
||||
*
|
||||
* @since 3.9.0
|
||||
*
|
||||
|
@ -99,9 +103,8 @@ window.autosave = function() {
|
|||
}
|
||||
|
||||
/**
|
||||
* @summary Concatenates the title, content and excerpt.
|
||||
*
|
||||
* This is used to track changes when auto-saving.
|
||||
* Concatenates the title, content and excerpt. This is used to track changes
|
||||
* when auto-saving.
|
||||
*
|
||||
* @since 3.9.0
|
||||
*
|
||||
|
@ -118,7 +121,7 @@ window.autosave = function() {
|
|||
}
|
||||
|
||||
/**
|
||||
* @summary Disables save buttons.
|
||||
* Disables save buttons.
|
||||
*
|
||||
* @since 3.9.0
|
||||
*
|
||||
|
@ -132,7 +135,7 @@ window.autosave = function() {
|
|||
}
|
||||
|
||||
/**
|
||||
* @summary Enables save buttons.
|
||||
* Enables save buttons.
|
||||
*
|
||||
* @since 3.9.0
|
||||
*
|
||||
|
@ -143,7 +146,7 @@ window.autosave = function() {
|
|||
}
|
||||
|
||||
/**
|
||||
* @summary Gets the content editor.
|
||||
* Gets the content editor.
|
||||
*
|
||||
* @since 4.6.0
|
||||
*
|
||||
|
@ -155,7 +158,7 @@ window.autosave = function() {
|
|||
}
|
||||
|
||||
/**
|
||||
* @summary Autosave in localStorage.
|
||||
* Autosave in localStorage.
|
||||
*
|
||||
* @since 3.9.0
|
||||
*
|
||||
|
@ -176,7 +179,7 @@ window.autosave = function() {
|
|||
isSuspended = false;
|
||||
|
||||
/**
|
||||
* @summary Checks if the browser supports sessionStorage and it's not disabled.
|
||||
* Checks if the browser supports sessionStorage and it's not disabled.
|
||||
*
|
||||
* @since 3.9.0
|
||||
*
|
||||
|
@ -197,7 +200,7 @@ window.autosave = function() {
|
|||
}
|
||||
|
||||
/**
|
||||
* @summary Initializes the local storage.
|
||||
* Initializes the local storage.
|
||||
*
|
||||
* @since 3.9.0
|
||||
*
|
||||
|
@ -221,9 +224,8 @@ window.autosave = function() {
|
|||
}
|
||||
|
||||
/**
|
||||
* @summary Sets the storage for this blog.
|
||||
*
|
||||
* Confirms that the data was saved successfully.
|
||||
* Sets the storage for this blog. Confirms that the data was saved
|
||||
* successfully.
|
||||
*
|
||||
* @since 3.9.0
|
||||
*
|
||||
|
@ -242,7 +244,7 @@ window.autosave = function() {
|
|||
}
|
||||
|
||||
/**
|
||||
* @summary Gets the saved post data for the current post.
|
||||
* Gets the saved post data for the current post.
|
||||
*
|
||||
* @since 3.9.0
|
||||
*
|
||||
|
@ -259,7 +261,7 @@ window.autosave = function() {
|
|||
}
|
||||
|
||||
/**
|
||||
* @summary Sets (save or delete) post data in the storage.
|
||||
* Sets (save or delete) post data in the storage.
|
||||
*
|
||||
* If stored_data evaluates to 'false' the storage key for the current post will be removed.
|
||||
*
|
||||
|
@ -288,7 +290,7 @@ window.autosave = function() {
|
|||
}
|
||||
|
||||
/**
|
||||
* @summary Sets isSuspended to true.
|
||||
* Sets isSuspended to true.
|
||||
*
|
||||
* @since 3.9.0
|
||||
*
|
||||
|
@ -299,7 +301,7 @@ window.autosave = function() {
|
|||
}
|
||||
|
||||
/**
|
||||
* @summary Sets isSuspended to false.
|
||||
* Sets isSuspended to false.
|
||||
*
|
||||
* @since 3.9.0
|
||||
*
|
||||
|
@ -310,7 +312,7 @@ window.autosave = function() {
|
|||
}
|
||||
|
||||
/**
|
||||
* @summary Saves post data for the current post.
|
||||
* Saves post data for the current post.
|
||||
*
|
||||
* Runs on a 15 sec. interval, saves when there are differences in the post title or content.
|
||||
* When the optional data is provided, updates the last saved post data.
|
||||
|
@ -359,7 +361,7 @@ window.autosave = function() {
|
|||
}
|
||||
|
||||
/**
|
||||
* @summary Initializes the auto save function.
|
||||
* Initializes the auto save function.
|
||||
*
|
||||
* Checks whether the editor is active or not to use the editor events
|
||||
* to autosave, or uses the values from the elements to autosave.
|
||||
|
@ -419,9 +421,7 @@ window.autosave = function() {
|
|||
}
|
||||
|
||||
/**
|
||||
* @summary Compares 2 strings.
|
||||
*
|
||||
* Removes whitespaces in the strings before comparing them.
|
||||
* Compares 2 strings. Removes whitespaces in the strings before comparing them.
|
||||
*
|
||||
* @since 3.9.0
|
||||
*
|
||||
|
@ -438,8 +438,8 @@ window.autosave = function() {
|
|||
}
|
||||
|
||||
/**
|
||||
* @summary Checks if the saved data for the current post (if any) is different
|
||||
* than the loaded post data on the screen.
|
||||
* Checks if the saved data for the current post (if any) is different than the
|
||||
* loaded post data on the screen.
|
||||
*
|
||||
* Shows a standard message letting the user restore the post data if different.
|
||||
*
|
||||
|
@ -507,7 +507,7 @@ window.autosave = function() {
|
|||
}
|
||||
|
||||
/**
|
||||
* @summary Restores the current title, content and excerpt from postData.
|
||||
* Restores the current title, content and excerpt from postData.
|
||||
*
|
||||
* @since 3.9.0
|
||||
*
|
||||
|
@ -575,7 +575,7 @@ window.autosave = function() {
|
|||
}
|
||||
|
||||
/**
|
||||
* @summary Auto saves the post on the server.
|
||||
* Auto saves the post on the server.
|
||||
*
|
||||
* @since 3.9.0
|
||||
*
|
||||
|
@ -596,7 +596,7 @@ window.autosave = function() {
|
|||
|
||||
|
||||
/**
|
||||
* @summary Blocks saving for the next 10 seconds.
|
||||
* Blocks saving for the next 10 seconds.
|
||||
*
|
||||
* @since 3.9.0
|
||||
*
|
||||
|
@ -612,7 +612,7 @@ window.autosave = function() {
|
|||
}
|
||||
|
||||
/**
|
||||
* @summary Sets isSuspended to true.
|
||||
* Sets isSuspended to true.
|
||||
*
|
||||
* @since 3.9.0
|
||||
*
|
||||
|
@ -623,7 +623,7 @@ window.autosave = function() {
|
|||
}
|
||||
|
||||
/**
|
||||
* @summary Sets isSuspended to false.
|
||||
* Sets isSuspended to false.
|
||||
*
|
||||
* @since 3.9.0
|
||||
*
|
||||
|
@ -634,7 +634,7 @@ window.autosave = function() {
|
|||
}
|
||||
|
||||
/**
|
||||
* @summary Triggers the autosave with the post data.
|
||||
* Triggers the autosave with the post data.
|
||||
*
|
||||
* @since 3.9.0
|
||||
*
|
||||
|
@ -658,7 +658,7 @@ window.autosave = function() {
|
|||
}
|
||||
|
||||
/**
|
||||
* @summary Saves immediately.
|
||||
* Saves immediately.
|
||||
*
|
||||
* Resets the timing and tells heartbeat to connect now.
|
||||
*
|
||||
|
@ -672,7 +672,7 @@ window.autosave = function() {
|
|||
}
|
||||
|
||||
/**
|
||||
* @summary Checks if the post content in the textarea has changed since page load.
|
||||
* Checks if the post content in the textarea has changed since page load.
|
||||
*
|
||||
* This also happens when TinyMCE is active and editor.save() is triggered by
|
||||
* wp.autosave.getPostData().
|
||||
|
@ -686,7 +686,7 @@ window.autosave = function() {
|
|||
}
|
||||
|
||||
/**
|
||||
* @summary Checks if the post can be saved or not.
|
||||
* Checks if the post can be saved or not.
|
||||
*
|
||||
* If the post hasn't changed or it cannot be updated,
|
||||
* because the autosave is blocked or suspended, the function returns false.
|
||||
|
@ -733,7 +733,7 @@ window.autosave = function() {
|
|||
}
|
||||
|
||||
/**
|
||||
* @summary Sets the next run, based on the autosave interval.
|
||||
* Sets the next run, based on the autosave interval.
|
||||
*
|
||||
* @private
|
||||
*
|
||||
|
@ -746,7 +746,7 @@ window.autosave = function() {
|
|||
}
|
||||
|
||||
/**
|
||||
* @summary Sets the autosaveData on the autosave heartbeat.
|
||||
* Sets the autosaveData on the autosave heartbeat.
|
||||
*
|
||||
* @since 3.9.0
|
||||
*
|
||||
|
@ -760,8 +760,8 @@ window.autosave = function() {
|
|||
}
|
||||
|
||||
/**
|
||||
* @summary Triggers the autosave of the post with the autosave data
|
||||
* on the autosave heartbeat.
|
||||
* Triggers the autosave of the post with the autosave data on the autosave
|
||||
* heartbeat.
|
||||
*
|
||||
* @since 3.9.0
|
||||
*
|
||||
|
@ -772,7 +772,7 @@ window.autosave = function() {
|
|||
response( data.wp_autosave );
|
||||
}
|
||||
/**
|
||||
* @summary Disables buttons and throws a notice when the connection is lost.
|
||||
* Disables buttons and throws a notice when the connection is lost.
|
||||
*
|
||||
* @since 3.9.0
|
||||
*
|
||||
|
@ -793,7 +793,7 @@ window.autosave = function() {
|
|||
}
|
||||
|
||||
/**
|
||||
* @summary Enables buttons when the connection is restored.
|
||||
* Enables buttons when the connection is restored.
|
||||
*
|
||||
* @since 3.9.0
|
||||
*
|
||||
|
@ -816,7 +816,7 @@ window.autosave = function() {
|
|||
}
|
||||
|
||||
/**
|
||||
* @summary Sets the autosave time out.
|
||||
* Sets the autosave time out.
|
||||
*
|
||||
* Wait for TinyMCE to initialize plus 1 second. for any external css to finish loading,
|
||||
* then save to the textarea before setting initialCompareString.
|
||||
|
|
1920
wp-includes/js/backbone.js
Normal file
1920
wp-includes/js/backbone.js
Normal file
File diff suppressed because it is too large
Load diff
2
wp-includes/js/backbone.min.js
vendored
2
wp-includes/js/backbone.min.js
vendored
File diff suppressed because one or more lines are too long
|
@ -6697,48 +6697,4 @@ return /******/ (function(modules) { // webpackBootstrap
|
|||
/***/ }
|
||||
/******/ ])
|
||||
});
|
||||
;
|
||||
|
||||
// JSHINT has some GPL Compatability issues, so we are faking it out and using esprima for validation
|
||||
// Based on https://github.com/jquery/esprima/blob/gh-pages/demo/validate.js which is MIT licensed
|
||||
|
||||
var fakeJSHINT = new function() {
|
||||
var syntax, errors;
|
||||
var that = this;
|
||||
this.data = [];
|
||||
this.convertError = function( error ){
|
||||
return {
|
||||
line: error.lineNumber,
|
||||
character: error.column,
|
||||
reason: error.description,
|
||||
code: 'E'
|
||||
};
|
||||
};
|
||||
this.parse = function( code ){
|
||||
try {
|
||||
syntax = window.esprima.parse(code, { tolerant: true, loc: true });
|
||||
errors = syntax.errors;
|
||||
if ( errors.length > 0 ) {
|
||||
for ( var i = 0; i < errors.length; i++) {
|
||||
var error = errors[i];
|
||||
that.data.push( that.convertError( error ) );
|
||||
}
|
||||
} else {
|
||||
that.data = [];
|
||||
}
|
||||
} catch (e) {
|
||||
that.data.push( that.convertError( e ) );
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
window.JSHINT = function( text ){
|
||||
fakeJSHINT.parse( text );
|
||||
};
|
||||
window.JSHINT.data = function(){
|
||||
return {
|
||||
errors: fakeJSHINT.data
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
;
|
43
wp-includes/js/codemirror/fakejshint.js
Normal file
43
wp-includes/js/codemirror/fakejshint.js
Normal file
|
@ -0,0 +1,43 @@
|
|||
// JSHINT has some GPL Compatability issues, so we are faking it out and using esprima for validation
|
||||
// Based on https://github.com/jquery/esprima/blob/gh-pages/demo/validate.js which is MIT licensed
|
||||
|
||||
var fakeJSHINT = new function() {
|
||||
var syntax, errors;
|
||||
var that = this;
|
||||
this.data = [];
|
||||
this.convertError = function( error ){
|
||||
return {
|
||||
line: error.lineNumber,
|
||||
character: error.column,
|
||||
reason: error.description,
|
||||
code: 'E'
|
||||
};
|
||||
};
|
||||
this.parse = function( code ){
|
||||
try {
|
||||
syntax = window.esprima.parse(code, { tolerant: true, loc: true });
|
||||
errors = syntax.errors;
|
||||
if ( errors.length > 0 ) {
|
||||
for ( var i = 0; i < errors.length; i++) {
|
||||
var error = errors[i];
|
||||
that.data.push( that.convertError( error ) );
|
||||
}
|
||||
} else {
|
||||
that.data = [];
|
||||
}
|
||||
} catch (e) {
|
||||
that.data.push( that.convertError( e ) );
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
window.JSHINT = function( text ){
|
||||
fakeJSHINT.parse( text );
|
||||
};
|
||||
window.JSHINT.data = function(){
|
||||
return {
|
||||
errors: fakeJSHINT.data
|
||||
};
|
||||
};
|
||||
|
||||
|
|
@ -1,90 +1,330 @@
|
|||
/**
|
||||
* @summary Handles the addition of the comment form.
|
||||
* Handles the addition of the comment form.
|
||||
*
|
||||
* @since 2.7.0
|
||||
* @output wp-includes/js/comment-reply.js
|
||||
*
|
||||
* @namespace addComment
|
||||
*
|
||||
* @type {Object}
|
||||
*/
|
||||
var addComment = {
|
||||
/**
|
||||
* @summary Retrieves the elements corresponding to the given IDs.
|
||||
*
|
||||
* @since 2.7.0
|
||||
*
|
||||
* @param {string} commId The comment ID.
|
||||
* @param {string} parentId The parent ID.
|
||||
* @param {string} respondId The respond ID.
|
||||
* @param {string} postId The post ID.
|
||||
* @returns {boolean} Always returns false.
|
||||
*/
|
||||
moveForm: function( commId, parentId, respondId, postId ) {
|
||||
var div, element, style, cssHidden,
|
||||
t = this,
|
||||
comm = t.I( commId ),
|
||||
respond = t.I( respondId ),
|
||||
cancel = t.I( 'cancel-comment-reply-link' ),
|
||||
parent = t.I( 'comment_parent' ),
|
||||
post = t.I( 'comment_post_ID' ),
|
||||
commentForm = respond.getElementsByTagName( 'form' )[0];
|
||||
window.addComment = ( function( window ) {
|
||||
// Avoid scope lookups on commonly used variables.
|
||||
var document = window.document;
|
||||
|
||||
if ( ! comm || ! respond || ! cancel || ! parent || ! commentForm ) {
|
||||
// Settings.
|
||||
var config = {
|
||||
commentReplyClass : 'comment-reply-link',
|
||||
cancelReplyId : 'cancel-comment-reply-link',
|
||||
commentFormId : 'commentform',
|
||||
temporaryFormId : 'wp-temp-form-div',
|
||||
parentIdFieldId : 'comment_parent',
|
||||
postIdFieldId : 'comment_post_ID'
|
||||
};
|
||||
|
||||
// Cross browser MutationObserver.
|
||||
var MutationObserver = window.MutationObserver || window.WebKitMutationObserver || window.MozMutationObserver;
|
||||
|
||||
// Check browser cuts the mustard.
|
||||
var cutsTheMustard = 'querySelector' in document && 'addEventListener' in window;
|
||||
|
||||
/*
|
||||
* Check browser supports dataset.
|
||||
* !! sets the variable to true if the property exists.
|
||||
*/
|
||||
var supportsDataset = !! document.documentElement.dataset;
|
||||
|
||||
// For holding the cancel element.
|
||||
var cancelElement;
|
||||
|
||||
// For holding the comment form element.
|
||||
var commentFormElement;
|
||||
|
||||
// The respond element.
|
||||
var respondElement;
|
||||
|
||||
// The mutation observer.
|
||||
var observer;
|
||||
|
||||
if ( cutsTheMustard && document.readyState !== 'loading' ) {
|
||||
ready();
|
||||
} else if ( cutsTheMustard ) {
|
||||
window.addEventListener( 'DOMContentLoaded', ready, false );
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets up object variables after the DOM is ready.
|
||||
*
|
||||
* @since 5.1.1
|
||||
*/
|
||||
function ready() {
|
||||
// Initialise the events.
|
||||
init();
|
||||
|
||||
// Set up a MutationObserver to check for comments loaded late.
|
||||
observeChanges();
|
||||
}
|
||||
|
||||
/**
|
||||
* Add events to links classed .comment-reply-link.
|
||||
*
|
||||
* Searches the context for reply links and adds the JavaScript events
|
||||
* required to move the comment form. To allow for lazy loading of
|
||||
* comments this method is exposed as window.commentReply.init().
|
||||
*
|
||||
* @since 5.1.0
|
||||
*
|
||||
* @memberOf addComment
|
||||
*
|
||||
* @param {HTMLElement} context The parent DOM element to search for links.
|
||||
*/
|
||||
function init( context ) {
|
||||
if ( ! cutsTheMustard ) {
|
||||
return;
|
||||
}
|
||||
|
||||
t.respondId = respondId;
|
||||
postId = postId || false;
|
||||
// Get required elements.
|
||||
cancelElement = getElementById( config.cancelReplyId );
|
||||
commentFormElement = getElementById( config.commentFormId );
|
||||
|
||||
if ( ! t.I( 'wp-temp-form-div' ) ) {
|
||||
div = document.createElement( 'div' );
|
||||
div.id = 'wp-temp-form-div';
|
||||
div.style.display = 'none';
|
||||
respond.parentNode.insertBefore( div, respond );
|
||||
// No cancel element, no replies.
|
||||
if ( ! cancelElement ) {
|
||||
return;
|
||||
}
|
||||
|
||||
comm.parentNode.insertBefore( respond, comm.nextSibling );
|
||||
if ( post && postId ) {
|
||||
post.value = postId;
|
||||
}
|
||||
parent.value = parentId;
|
||||
cancel.style.display = '';
|
||||
cancelElement.addEventListener( 'touchstart', cancelEvent );
|
||||
cancelElement.addEventListener( 'click', cancelEvent );
|
||||
|
||||
/**
|
||||
* @summary Puts back the comment, hides the cancel button and removes the onclick event.
|
||||
*
|
||||
* @returns {boolean} Always returns false.
|
||||
var links = replyLinks( context );
|
||||
var element;
|
||||
|
||||
for ( var i = 0, l = links.length; i < l; i++ ) {
|
||||
element = links[i];
|
||||
|
||||
element.addEventListener( 'touchstart', clickEvent );
|
||||
element.addEventListener( 'click', clickEvent );
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Return all links classed .comment-reply-link.
|
||||
*
|
||||
* @since 5.1.0
|
||||
*
|
||||
* @param {HTMLElement} context The parent DOM element to search for links.
|
||||
*
|
||||
* @return {HTMLCollection|NodeList|Array}
|
||||
*/
|
||||
function replyLinks( context ) {
|
||||
var selectorClass = config.commentReplyClass;
|
||||
var allReplyLinks;
|
||||
|
||||
// childNodes is a handy check to ensure the context is a HTMLElement.
|
||||
if ( ! context || ! context.childNodes ) {
|
||||
context = document;
|
||||
}
|
||||
|
||||
if ( document.getElementsByClassName ) {
|
||||
// Fastest.
|
||||
allReplyLinks = context.getElementsByClassName( selectorClass );
|
||||
}
|
||||
else {
|
||||
// Fast.
|
||||
allReplyLinks = context.querySelectorAll( '.' + selectorClass );
|
||||
}
|
||||
|
||||
return allReplyLinks;
|
||||
}
|
||||
|
||||
/**
|
||||
* Cancel event handler.
|
||||
*
|
||||
* @since 5.1.0
|
||||
*
|
||||
* @param {Event} event The calling event.
|
||||
*/
|
||||
function cancelEvent( event ) {
|
||||
var cancelLink = this;
|
||||
var temporaryFormId = config.temporaryFormId;
|
||||
var temporaryElement = getElementById( temporaryFormId );
|
||||
|
||||
if ( ! temporaryElement || ! respondElement ) {
|
||||
// Conditions for cancel link fail.
|
||||
return;
|
||||
}
|
||||
|
||||
getElementById( config.parentIdFieldId ).value = '0';
|
||||
|
||||
// Move the respond form back in place of the temporary element.
|
||||
temporaryElement.parentNode.replaceChild( respondElement ,temporaryElement );
|
||||
cancelLink.style.display = 'none';
|
||||
event.preventDefault();
|
||||
}
|
||||
|
||||
/**
|
||||
* Click event handler.
|
||||
*
|
||||
* @since 5.1.0
|
||||
*
|
||||
* @param {Event} event The calling event.
|
||||
*/
|
||||
function clickEvent( event ) {
|
||||
var replyLink = this,
|
||||
commId = getDataAttribute( replyLink, 'belowelement'),
|
||||
parentId = getDataAttribute( replyLink, 'commentid' ),
|
||||
respondId = getDataAttribute( replyLink, 'respondelement'),
|
||||
postId = getDataAttribute( replyLink, 'postid'),
|
||||
follow;
|
||||
|
||||
if ( ! commId || ! parentId || ! respondId || ! postId ) {
|
||||
/*
|
||||
* Theme or plugin defines own link via custom `wp_list_comments()` callback
|
||||
* and calls `moveForm()` either directly or via a custom event hook.
|
||||
*/
|
||||
return;
|
||||
}
|
||||
|
||||
/*
|
||||
* Third party comments systems can hook into this function via the global scope,
|
||||
* therefore the click event needs to reference the global scope.
|
||||
*/
|
||||
cancel.onclick = function() {
|
||||
var t = addComment,
|
||||
temp = t.I( 'wp-temp-form-div' ),
|
||||
respond = t.I( t.respondId );
|
||||
follow = window.addComment.moveForm(commId, parentId, respondId, postId);
|
||||
if ( false === follow ) {
|
||||
event.preventDefault();
|
||||
}
|
||||
}
|
||||
|
||||
if ( ! temp || ! respond ) {
|
||||
/**
|
||||
* Creates a mutation observer to check for newly inserted comments.
|
||||
*
|
||||
* @since 5.1.0
|
||||
*/
|
||||
function observeChanges() {
|
||||
if ( ! MutationObserver ) {
|
||||
return;
|
||||
}
|
||||
|
||||
var observerOptions = {
|
||||
childList: true,
|
||||
subTree: true
|
||||
};
|
||||
|
||||
observer = new MutationObserver( handleChanges );
|
||||
observer.observe( document.body, observerOptions );
|
||||
}
|
||||
|
||||
/**
|
||||
* Handles DOM changes, calling init() if any new nodes are added.
|
||||
*
|
||||
* @since 5.1.0
|
||||
*
|
||||
* @param {Array} mutationRecords Array of MutationRecord objects.
|
||||
*/
|
||||
function handleChanges( mutationRecords ) {
|
||||
var i = mutationRecords.length;
|
||||
|
||||
while ( i-- ) {
|
||||
// Call init() once if any record in this set adds nodes.
|
||||
if ( mutationRecords[ i ].addedNodes.length ) {
|
||||
init();
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
t.I( 'comment_parent' ).value = '0';
|
||||
temp.parentNode.insertBefore( respond, temp );
|
||||
temp.parentNode.removeChild( temp );
|
||||
this.style.display = 'none';
|
||||
this.onclick = null;
|
||||
/**
|
||||
* Backward compatible getter of data-* attribute.
|
||||
*
|
||||
* Uses element.dataset if it exists, otherwise uses getAttribute.
|
||||
*
|
||||
* @since 5.1.0
|
||||
*
|
||||
* @param {HTMLElement} Element DOM element with the attribute.
|
||||
* @param {String} Attribute the attribute to get.
|
||||
*
|
||||
* @return {String}
|
||||
*/
|
||||
function getDataAttribute( element, attribute ) {
|
||||
if ( supportsDataset ) {
|
||||
return element.dataset[attribute];
|
||||
}
|
||||
else {
|
||||
return element.getAttribute( 'data-' + attribute );
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get element by ID.
|
||||
*
|
||||
* Local alias for document.getElementById.
|
||||
*
|
||||
* @since 5.1.0
|
||||
*
|
||||
* @param {HTMLElement} The requested element.
|
||||
*/
|
||||
function getElementById( elementId ) {
|
||||
return document.getElementById( elementId );
|
||||
}
|
||||
|
||||
/**
|
||||
* Moves the reply form from its current position to the reply location.
|
||||
*
|
||||
* @since 2.7.0
|
||||
*
|
||||
* @memberOf addComment
|
||||
*
|
||||
* @param {String} addBelowId HTML ID of element the form follows.
|
||||
* @param {String} commentId Database ID of comment being replied to.
|
||||
* @param {String} respondId HTML ID of 'respond' element.
|
||||
* @param {String} postId Database ID of the post.
|
||||
*/
|
||||
function moveForm( addBelowId, commentId, respondId, postId ) {
|
||||
// Get elements based on their IDs.
|
||||
var addBelowElement = getElementById( addBelowId );
|
||||
respondElement = getElementById( respondId );
|
||||
|
||||
// Get the hidden fields.
|
||||
var parentIdField = getElementById( config.parentIdFieldId );
|
||||
var postIdField = getElementById( config.postIdFieldId );
|
||||
var element, cssHidden, style;
|
||||
|
||||
if ( ! addBelowElement || ! respondElement || ! parentIdField ) {
|
||||
// Missing key elements, fail.
|
||||
return;
|
||||
}
|
||||
|
||||
addPlaceHolder( respondElement );
|
||||
|
||||
// Set the value of the post.
|
||||
if ( postId && postIdField ) {
|
||||
postIdField.value = postId;
|
||||
}
|
||||
|
||||
parentIdField.value = commentId;
|
||||
|
||||
cancelElement.style.display = '';
|
||||
addBelowElement.parentNode.insertBefore( respondElement, addBelowElement.nextSibling );
|
||||
|
||||
/*
|
||||
* This is for backward compatibility with third party commenting systems
|
||||
* hooking into the event using older techniques.
|
||||
*/
|
||||
cancelElement.onclick = function(){
|
||||
return false;
|
||||
};
|
||||
|
||||
/*
|
||||
* Sets initial focus to the first form focusable element.
|
||||
* Uses try/catch just to avoid errors in IE 7- which return visibility
|
||||
* 'inherit' when the visibility value is inherited from an ancestor.
|
||||
*/
|
||||
// Focus on the first field in the comment form.
|
||||
try {
|
||||
for ( var i = 0; i < commentForm.elements.length; i++ ) {
|
||||
element = commentForm.elements[i];
|
||||
for ( var i = 0; i < commentFormElement.elements.length; i++ ) {
|
||||
element = commentFormElement.elements[i];
|
||||
cssHidden = false;
|
||||
|
||||
// Modern browsers.
|
||||
// Get elements computed style.
|
||||
if ( 'getComputedStyle' in window ) {
|
||||
// Modern browsers.
|
||||
style = window.getComputedStyle( element );
|
||||
// IE 8.
|
||||
} else if ( document.documentElement.currentStyle ) {
|
||||
// IE 8.
|
||||
style = element.currentStyle;
|
||||
}
|
||||
|
||||
|
@ -107,21 +347,45 @@ var addComment = {
|
|||
// Stop after the first focusable element.
|
||||
break;
|
||||
}
|
||||
}
|
||||
catch(e) {
|
||||
|
||||
} catch( er ) {}
|
||||
}
|
||||
|
||||
/*
|
||||
* false is returned for backward compatibility with third party commenting systems
|
||||
* hooking into this function.
|
||||
*/
|
||||
return false;
|
||||
},
|
||||
}
|
||||
|
||||
/**
|
||||
* @summary Returns the object corresponding to the given ID.
|
||||
* Add placeholder element.
|
||||
*
|
||||
* Places a place holder element above the #respond element for
|
||||
* the form to be returned to if needs be.
|
||||
*
|
||||
* @since 2.7.0
|
||||
*
|
||||
* @param {string} id The ID.
|
||||
* @returns {Element} The element belonging to the ID.
|
||||
* @param {HTMLelement} respondElement the #respond element holding comment form.
|
||||
*/
|
||||
I: function( id ) {
|
||||
return document.getElementById( id );
|
||||
function addPlaceHolder( respondElement ) {
|
||||
var temporaryFormId = config.temporaryFormId;
|
||||
var temporaryElement = getElementById( temporaryFormId );
|
||||
|
||||
if ( temporaryElement ) {
|
||||
// The element already exists, no need to recreate.
|
||||
return;
|
||||
}
|
||||
|
||||
temporaryElement = document.createElement( 'div' );
|
||||
temporaryElement.id = temporaryFormId;
|
||||
temporaryElement.style.display = 'none';
|
||||
respondElement.parentNode.insertBefore( temporaryElement, respondElement );
|
||||
}
|
||||
};
|
||||
|
||||
return {
|
||||
init: init,
|
||||
moveForm: moveForm
|
||||
};
|
||||
})( window );
|
||||
|
|
2
wp-includes/js/comment-reply.min.js
vendored
2
wp-includes/js/comment-reply.min.js
vendored
|
@ -1 +1 @@
|
|||
var addComment={moveForm:function(a,b,c,d){var e,f,g,h,i=this,j=i.I(a),k=i.I(c),l=i.I("cancel-comment-reply-link"),m=i.I("comment_parent"),n=i.I("comment_post_ID"),o=k.getElementsByTagName("form")[0];if(j&&k&&l&&m&&o){i.respondId=c,d=d||!1,i.I("wp-temp-form-div")||(e=document.createElement("div"),e.id="wp-temp-form-div",e.style.display="none",k.parentNode.insertBefore(e,k)),j.parentNode.insertBefore(k,j.nextSibling),n&&d&&(n.value=d),m.value=b,l.style.display="",l.onclick=function(){var a=addComment,b=a.I("wp-temp-form-div"),c=a.I(a.respondId);if(b&&c)return a.I("comment_parent").value="0",b.parentNode.insertBefore(c,b),b.parentNode.removeChild(b),this.style.display="none",this.onclick=null,!1};try{for(var p=0;p<o.elements.length;p++)if(f=o.elements[p],h=!1,"getComputedStyle"in window?g=window.getComputedStyle(f):document.documentElement.currentStyle&&(g=f.currentStyle),(f.offsetWidth<=0&&f.offsetHeight<=0||"hidden"===g.visibility)&&(h=!0),"hidden"!==f.type&&!f.disabled&&!h){f.focus();break}}catch(q){}return!1}},I:function(a){return document.getElementById(a)}};
|
||||
window.addComment=function(a){function b(){c(),g()}function c(a){if(t&&(m=j(r.cancelReplyId),n=j(r.commentFormId),m)){m.addEventListener("touchstart",e),m.addEventListener("click",e);for(var b,c=d(a),g=0,h=c.length;g<h;g++)b=c[g],b.addEventListener("touchstart",f),b.addEventListener("click",f)}}function d(a){var b,c=r.commentReplyClass;return a&&a.childNodes||(a=q),b=q.getElementsByClassName?a.getElementsByClassName(c):a.querySelectorAll("."+c)}function e(a){var b=this,c=r.temporaryFormId,d=j(c);d&&o&&(j(r.parentIdFieldId).value="0",d.parentNode.replaceChild(o,d),b.style.display="none",a.preventDefault())}function f(b){var c,d=this,e=i(d,"belowelement"),f=i(d,"commentid"),g=i(d,"respondelement"),h=i(d,"postid");e&&f&&g&&h&&(c=a.addComment.moveForm(e,f,g,h),!1===c&&b.preventDefault())}function g(){if(s){var a={childList:!0,subTree:!0};p=new s(h),p.observe(q.body,a)}}function h(a){for(var b=a.length;b--;)if(a[b].addedNodes.length)return void c()}function i(a,b){return u?a.dataset[b]:a.getAttribute("data-"+b)}function j(a){return q.getElementById(a)}function k(b,c,d,e){var f=j(b);o=j(d);var g,h,i,k=j(r.parentIdFieldId),p=j(r.postIdFieldId);if(f&&o&&k){l(o),e&&p&&(p.value=e),k.value=c,m.style.display="",f.parentNode.insertBefore(o,f.nextSibling),m.onclick=function(){return!1};try{for(var s=0;s<n.elements.length;s++)if(g=n.elements[s],h=!1,"getComputedStyle"in a?i=a.getComputedStyle(g):q.documentElement.currentStyle&&(i=g.currentStyle),(g.offsetWidth<=0&&g.offsetHeight<=0||"hidden"===i.visibility)&&(h=!0),"hidden"!==g.type&&!g.disabled&&!h){g.focus();break}}catch(t){}return!1}}function l(a){var b=r.temporaryFormId,c=j(b);c||(c=q.createElement("div"),c.id=b,c.style.display="none",a.parentNode.insertBefore(c,a))}var m,n,o,p,q=a.document,r={commentReplyClass:"comment-reply-link",cancelReplyId:"cancel-comment-reply-link",commentFormId:"commentform",temporaryFormId:"wp-temp-form-div",parentIdFieldId:"comment_parent",postIdFieldId:"comment_post_ID"},s=a.MutationObserver||a.WebKitMutationObserver||a.MozMutationObserver,t="querySelector"in q&&"addEventListener"in a,u=!!q.documentElement.dataset;return t&&"loading"!==q.readyState?b():t&&a.addEventListener("DOMContentLoaded",b,!1),{init:c,moveForm:k}}(window);
|
|
@ -1,3 +1,7 @@
|
|||
/**
|
||||
* @output wp-includes/js/customize-base.js
|
||||
*/
|
||||
|
||||
/** @namespace wp */
|
||||
window.wp = window.wp || {};
|
||||
|
||||
|
@ -908,7 +912,7 @@ window.wp = window.wp || {};
|
|||
/**
|
||||
* Get all customize settings.
|
||||
*
|
||||
* @memberOf wp.customize
|
||||
* @alias wp.customize.get
|
||||
*
|
||||
* @return {object}
|
||||
*/
|
||||
|
@ -934,7 +938,8 @@ window.wp = window.wp || {};
|
|||
*
|
||||
* @since 4.7.0
|
||||
* @access public
|
||||
* @memberOf wp.customize.utils
|
||||
*
|
||||
* @alias wp.customize.utils.parseQueryString
|
||||
*
|
||||
* @param {string} queryString Query string.
|
||||
* @returns {object} Parsed query string.
|
||||
|
|
|
@ -1,4 +1,9 @@
|
|||
/**
|
||||
* @output wp-includes/js/customize-loader.js
|
||||
*/
|
||||
|
||||
/* global _wpCustomizeLoaderSettings */
|
||||
|
||||
/**
|
||||
* Expose a public API that allows the customizer to be
|
||||
* loaded on any page.
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
/**
|
||||
* @output wp-includes/js/customize-models.js
|
||||
*/
|
||||
|
||||
/* global _wpCustomizeHeader */
|
||||
(function( $, wp ) {
|
||||
var api = wp.customize;
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
/**
|
||||
* @output wp-includes/js/customize-preview-nav-menus.js
|
||||
*/
|
||||
|
||||
/* global _wpCustomizePreviewNavMenusExports */
|
||||
|
||||
/** @namespace wp.customize.navMenusPreview */
|
||||
|
|
|
@ -1,6 +1,23 @@
|
|||
/**
|
||||
* @output wp-includes/js/customize-preview-widgets.js
|
||||
*/
|
||||
|
||||
/* global _wpWidgetCustomizerPreviewSettings */
|
||||
|
||||
/** @namespace wp.customize.widgetsPreview */
|
||||
/**
|
||||
* Handles the initialization, refreshing and rendering of widget partials and sidebar widgets.
|
||||
*
|
||||
* @since 4.5.0
|
||||
*
|
||||
* @namespace wp.customize.widgetsPreview
|
||||
*
|
||||
* @param {jQuery} $ The jQuery object.
|
||||
* @param {Object} _ The utilities library.
|
||||
* @param {Object} wp Current WordPress environment instance.
|
||||
* @param {Object} api Information from the API.
|
||||
*
|
||||
* @returns {Object} Widget-related variables.
|
||||
*/
|
||||
wp.customize.widgetsPreview = wp.customize.WidgetCustomizerPreview = (function( $, _, wp, api ) {
|
||||
|
||||
var self;
|
||||
|
@ -19,9 +36,13 @@ wp.customize.widgetsPreview = wp.customize.WidgetCustomizerPreview = (function(
|
|||
};
|
||||
|
||||
/**
|
||||
* Init widgets preview.
|
||||
* Initializes the widgets preview.
|
||||
*
|
||||
* @since 4.5.0
|
||||
*
|
||||
* @memberOf wp.customize.widgetsPreview
|
||||
*
|
||||
* @returns {void}
|
||||
*/
|
||||
self.init = function() {
|
||||
var self = this;
|
||||
|
@ -59,25 +80,23 @@ wp.customize.widgetsPreview = wp.customize.WidgetCustomizerPreview = (function(
|
|||
} );
|
||||
};
|
||||
|
||||
/**
|
||||
* Partial representing a widget instance.
|
||||
*
|
||||
* @memberOf wp.customize.widgetsPreview
|
||||
* @alias wp.customize.widgetsPreview.WidgetPartial
|
||||
*
|
||||
* @class
|
||||
* @augments wp.customize.selectiveRefresh.Partial
|
||||
* @since 4.5.0
|
||||
*/
|
||||
self.WidgetPartial = api.selectiveRefresh.Partial.extend(/** @lends wp.customize.widgetsPreview.WidgetPartial.prototype */{
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
* Represents a partial widget instance.
|
||||
*
|
||||
* @since 4.5.0
|
||||
* @param {string} id - Partial ID.
|
||||
* @param {Object} options
|
||||
* @param {Object} options.params
|
||||
*
|
||||
* @constructs
|
||||
* @augments wp.customize.selectiveRefresh.Partial
|
||||
*
|
||||
* @alias wp.customize.widgetsPreview.WidgetPartial
|
||||
* @memberOf wp.customize.widgetsPreview
|
||||
*
|
||||
* @param {string} id The partial's ID.
|
||||
* @param {Object} options Options used to initialize the partial's
|
||||
* instance.
|
||||
* @param {Object} options.params The options parameters.
|
||||
*/
|
||||
initialize: function( id, options ) {
|
||||
var partial = this, matches;
|
||||
|
@ -101,9 +120,11 @@ wp.customize.widgetsPreview = wp.customize.WidgetCustomizerPreview = (function(
|
|||
},
|
||||
|
||||
/**
|
||||
* Refresh widget partial.
|
||||
* Refreshes the widget partial.
|
||||
*
|
||||
* @returns {Promise}
|
||||
* @since 4.5.0
|
||||
*
|
||||
* @returns {Promise|void} Either a promise postponing the refresh, or void.
|
||||
*/
|
||||
refresh: function() {
|
||||
var partial = this, refreshDeferred;
|
||||
|
@ -118,10 +139,14 @@ wp.customize.widgetsPreview = wp.customize.WidgetCustomizerPreview = (function(
|
|||
},
|
||||
|
||||
/**
|
||||
* Send widget-updated message to parent so spinner will get removed from widget control.
|
||||
* Sends the widget-updated message to the parent so the spinner will get
|
||||
* removed from the widget control.
|
||||
*
|
||||
* @inheritdoc
|
||||
* @param {wp.customize.selectiveRefresh.Placement} placement
|
||||
* @inheritDoc
|
||||
* @param {wp.customize.selectiveRefresh.Placement} placement The placement
|
||||
* function.
|
||||
*
|
||||
* @returns {void}
|
||||
*/
|
||||
renderContent: function( placement ) {
|
||||
var partial = this;
|
||||
|
@ -132,25 +157,22 @@ wp.customize.widgetsPreview = wp.customize.WidgetCustomizerPreview = (function(
|
|||
}
|
||||
});
|
||||
|
||||
/**
|
||||
* Partial representing a widget area.
|
||||
*
|
||||
* @memberOf wp.customize.widgetsPreview
|
||||
* @alias wp.customize.widgetsPreview.SidebarPartial
|
||||
*
|
||||
* @class
|
||||
* @augments wp.customize.selectiveRefresh.Partial
|
||||
* @since 4.5.0
|
||||
*/
|
||||
self.SidebarPartial = api.selectiveRefresh.Partial.extend(/** @lends wp.customize.widgetsPreview.SidebarPartial.prototype */{
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
* Represents a partial widget area.
|
||||
*
|
||||
* @since 4.5.0
|
||||
* @param {string} id - Partial ID.
|
||||
* @param {Object} options
|
||||
* @param {Object} options.params
|
||||
*
|
||||
* @class
|
||||
* @augments wp.customize.selectiveRefresh.Partial
|
||||
*
|
||||
* @memberOf wp.customize.widgetsPreview
|
||||
* @alias wp.customize.widgetsPreview.SidebarPartial
|
||||
*
|
||||
* @param {string} id The partial's ID.
|
||||
* @param {Object} options Options used to initialize the partial's instance.
|
||||
* @param {Object} options.params The options parameters.
|
||||
*/
|
||||
initialize: function( id, options ) {
|
||||
var partial = this, matches;
|
||||
|
@ -179,9 +201,11 @@ wp.customize.widgetsPreview = wp.customize.WidgetCustomizerPreview = (function(
|
|||
},
|
||||
|
||||
/**
|
||||
* Set up the partial.
|
||||
* Sets up the partial.
|
||||
*
|
||||
* @since 4.5.0
|
||||
*
|
||||
* @returns {void}
|
||||
*/
|
||||
ready: function() {
|
||||
var sidebarPartial = this;
|
||||
|
@ -220,12 +244,16 @@ wp.customize.widgetsPreview = wp.customize.WidgetCustomizerPreview = (function(
|
|||
},
|
||||
|
||||
/**
|
||||
* Get the before/after boundary nodes for all instances of this sidebar (usually one).
|
||||
* Gets the before/after boundary nodes for all instances of this sidebar
|
||||
* (usually one).
|
||||
*
|
||||
* Note that TreeWalker is not implemented in IE8.
|
||||
*
|
||||
* @since 4.5.0
|
||||
*
|
||||
* @returns {Array.<{before: Comment, after: Comment, instanceNumber: number}>}
|
||||
* An array with an object for each sidebar instance, containing the
|
||||
* node before and after the sidebar instance and its instance number.
|
||||
*/
|
||||
findDynamicSidebarBoundaryNodes: function() {
|
||||
var partial = this, regExp, boundaryNodes = {}, recursiveCommentTraversal;
|
||||
|
@ -261,10 +289,12 @@ wp.customize.widgetsPreview = wp.customize.WidgetCustomizerPreview = (function(
|
|||
},
|
||||
|
||||
/**
|
||||
* Get the placements for this partial.
|
||||
* Gets the placements for this partial.
|
||||
*
|
||||
* @since 4.5.0
|
||||
* @returns {Array}
|
||||
*
|
||||
* @returns {Array} An array containing placement objects for each of the
|
||||
* dynamic sidebar boundary nodes.
|
||||
*/
|
||||
placements: function() {
|
||||
var partial = this;
|
||||
|
@ -286,7 +316,11 @@ wp.customize.widgetsPreview = wp.customize.WidgetCustomizerPreview = (function(
|
|||
*
|
||||
* @since 4.5.0
|
||||
*
|
||||
* @returns {Array}
|
||||
* @throws {Error} If there's no settingId.
|
||||
* @throws {Error} If the setting doesn't exist in the API.
|
||||
* @throws {Error} If the API doesn't pass an array of widget ids.
|
||||
*
|
||||
* @returns {Array} A shallow copy of the array containing widget IDs.
|
||||
*/
|
||||
getWidgetIds: function() {
|
||||
var sidebarPartial = this, settingId, widgetIds;
|
||||
|
@ -305,11 +339,13 @@ wp.customize.widgetsPreview = wp.customize.WidgetCustomizerPreview = (function(
|
|||
},
|
||||
|
||||
/**
|
||||
* Reflow widgets in the sidebar, ensuring they have the proper position in the DOM.
|
||||
* Reflows widgets in the sidebar, ensuring they have the proper position in the
|
||||
* DOM.
|
||||
*
|
||||
* @since 4.5.0
|
||||
*
|
||||
* @return {Array.<wp.customize.selectiveRefresh.Placement>} List of placements that were reflowed.
|
||||
* @returns {Array.<wp.customize.selectiveRefresh.Placement>} List of placements
|
||||
* that were reflowed.
|
||||
*/
|
||||
reflowWidgets: function() {
|
||||
var sidebarPartial = this, sidebarPlacements, widgetIds, widgetPartials, sortedSidebarContainers = [];
|
||||
|
@ -369,12 +405,14 @@ wp.customize.widgetsPreview = wp.customize.WidgetCustomizerPreview = (function(
|
|||
},
|
||||
|
||||
/**
|
||||
* Make sure there is a widget instance container in this sidebar for the given widget ID.
|
||||
* Makes sure there is a widget instance container in this sidebar for the given
|
||||
* widget ID.
|
||||
*
|
||||
* @since 4.5.0
|
||||
*
|
||||
* @param {string} widgetId
|
||||
* @returns {wp.customize.selectiveRefresh.Partial} Widget instance partial.
|
||||
* @param {string} widgetId The widget ID.
|
||||
*
|
||||
* @returns {wp.customize.selectiveRefresh.Partial} The widget instance partial.
|
||||
*/
|
||||
ensureWidgetPlacementContainers: function( widgetId ) {
|
||||
var sidebarPartial = this, widgetPartial, wasInserted = false, partialId = 'widget[' + widgetId + ']';
|
||||
|
@ -435,12 +473,14 @@ wp.customize.widgetsPreview = wp.customize.WidgetCustomizerPreview = (function(
|
|||
},
|
||||
|
||||
/**
|
||||
* Handle change to the sidebars_widgets[] setting.
|
||||
* Handles changes to the sidebars_widgets[] setting.
|
||||
*
|
||||
* @since 4.5.0
|
||||
*
|
||||
* @param {Array} newWidgetIds New widget ids.
|
||||
* @param {Array} oldWidgetIds Old widget ids.
|
||||
* @param {Array} newWidgetIds New widget IDs.
|
||||
* @param {Array} oldWidgetIds Old widget IDs.
|
||||
*
|
||||
* @returns {void}
|
||||
*/
|
||||
handleSettingChange: function( newWidgetIds, oldWidgetIds ) {
|
||||
var sidebarPartial = this, needsRefresh, widgetsRemoved, widgetsAdded, addedWidgetPartials = [];
|
||||
|
@ -488,9 +528,14 @@ wp.customize.widgetsPreview = wp.customize.WidgetCustomizerPreview = (function(
|
|||
},
|
||||
|
||||
/**
|
||||
* Note that the meat is handled in handleSettingChange because it has the context of which widgets were removed.
|
||||
* Refreshes the sidebar partial.
|
||||
*
|
||||
* Note that the meat is handled in handleSettingChange because it has the
|
||||
* context of which widgets were removed.
|
||||
*
|
||||
* @since 4.5.0
|
||||
*
|
||||
* @returns {Promise} A promise postponing the refresh.
|
||||
*/
|
||||
refresh: function() {
|
||||
var partial = this, deferred = $.Deferred();
|
||||
|
@ -516,9 +561,11 @@ wp.customize.widgetsPreview = wp.customize.WidgetCustomizerPreview = (function(
|
|||
api.selectiveRefresh.partialConstructor.widget = self.WidgetPartial;
|
||||
|
||||
/**
|
||||
* Add partials for the registered widget areas (sidebars).
|
||||
* Adds partials for the registered widget areas (sidebars).
|
||||
*
|
||||
* @since 4.5.0
|
||||
*
|
||||
* @returns {void}
|
||||
*/
|
||||
self.addPartials = function() {
|
||||
_.each( self.registeredSidebars, function( registeredSidebar ) {
|
||||
|
@ -536,11 +583,14 @@ wp.customize.widgetsPreview = wp.customize.WidgetCustomizerPreview = (function(
|
|||
};
|
||||
|
||||
/**
|
||||
* Calculate the selector for the sidebar's widgets based on the registered sidebar's info.
|
||||
* Calculates the selector for the sidebar's widgets based on the registered
|
||||
* sidebar's info.
|
||||
*
|
||||
* @memberOf wp.customize.widgetsPreview
|
||||
*
|
||||
* @since 3.9.0
|
||||
*
|
||||
* @returns {void}
|
||||
*/
|
||||
self.buildWidgetSelectors = function() {
|
||||
var self = this;
|
||||
|
@ -576,12 +626,14 @@ wp.customize.widgetsPreview = wp.customize.WidgetCustomizerPreview = (function(
|
|||
};
|
||||
|
||||
/**
|
||||
* Highlight the widget on widget updates or widget control mouse overs.
|
||||
* Highlights the widget on widget updates or widget control mouse overs.
|
||||
*
|
||||
* @memberOf wp.customize.widgetsPreview
|
||||
*
|
||||
* @since 3.9.0
|
||||
* @param {string} widgetId ID of the widget.
|
||||
*
|
||||
* @returns {void}
|
||||
*/
|
||||
self.highlightWidget = function( widgetId ) {
|
||||
var $body = $( document.body ),
|
||||
|
@ -596,12 +648,14 @@ wp.customize.widgetsPreview = wp.customize.WidgetCustomizerPreview = (function(
|
|||
};
|
||||
|
||||
/**
|
||||
* Show a title and highlight widgets on hover. On shift+clicking
|
||||
* focus the widget control.
|
||||
* Shows a title and highlights widgets on hover. On shift+clicking focuses the
|
||||
* widget control.
|
||||
*
|
||||
* @memberOf wp.customize.widgetsPreview
|
||||
*
|
||||
* @since 3.9.0
|
||||
*
|
||||
* @returns {void}
|
||||
*/
|
||||
self.highlightControls = function() {
|
||||
var self = this,
|
||||
|
@ -613,7 +667,7 @@ wp.customize.widgetsPreview = wp.customize.WidgetCustomizerPreview = (function(
|
|||
}
|
||||
|
||||
$( selector ).attr( 'title', this.l10n.widgetTooltip );
|
||||
|
||||
// Highlights widget when entering the widget editor.
|
||||
$( document ).on( 'mouseenter', selector, function() {
|
||||
self.preview.send( 'highlight-widget-control', $( this ).prop( 'id' ) );
|
||||
});
|
||||
|
@ -630,14 +684,16 @@ wp.customize.widgetsPreview = wp.customize.WidgetCustomizerPreview = (function(
|
|||
};
|
||||
|
||||
/**
|
||||
* Parse a widget ID.
|
||||
* Parses a widget ID.
|
||||
*
|
||||
* @memberOf wp.customize.widgetsPreview
|
||||
*
|
||||
* @since 4.5.0
|
||||
*
|
||||
* @param {string} widgetId Widget ID.
|
||||
* @returns {{idBase: string, number: number|null}}
|
||||
* @param {string} widgetId The widget ID.
|
||||
*
|
||||
* @returns {{idBase: string, number: number|null}} An object containing the
|
||||
* idBase and number of the parsed widget ID.
|
||||
*/
|
||||
self.parseWidgetId = function( widgetId ) {
|
||||
var matches, parsed = {
|
||||
|
@ -657,14 +713,17 @@ wp.customize.widgetsPreview = wp.customize.WidgetCustomizerPreview = (function(
|
|||
};
|
||||
|
||||
/**
|
||||
* Parse a widget setting ID.
|
||||
* Parses a widget setting ID.
|
||||
*
|
||||
* @memberOf wp.customize.widgetsPreview
|
||||
*
|
||||
* @since 4.5.0
|
||||
*
|
||||
* @param {string} settingId Widget setting ID.
|
||||
* @returns {{idBase: string, number: number|null}|null}
|
||||
*
|
||||
* @returns {{idBase: string, number: number|null}|null} Either an object
|
||||
* containing the idBase and number of the parsed widget setting ID, or
|
||||
* null.
|
||||
*/
|
||||
self.parseWidgetSettingId = function( settingId ) {
|
||||
var matches, parsed = {
|
||||
|
@ -684,14 +743,15 @@ wp.customize.widgetsPreview = wp.customize.WidgetCustomizerPreview = (function(
|
|||
};
|
||||
|
||||
/**
|
||||
* Convert a widget ID into a Customizer setting ID.
|
||||
* Converts a widget ID into a Customizer setting ID.
|
||||
*
|
||||
* @memberOf wp.customize.widgetsPreview
|
||||
*
|
||||
* @since 4.5.0
|
||||
*
|
||||
* @param {string} widgetId Widget ID.
|
||||
* @returns {string} settingId Setting ID.
|
||||
* @param {string} widgetId The widget ID.
|
||||
*
|
||||
* @returns {string} The setting ID.
|
||||
*/
|
||||
self.getWidgetSettingId = function( widgetId ) {
|
||||
var parsed = this.parseWidgetId( widgetId ), settingId;
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
/*
|
||||
* Script run inside a Customizer preview frame.
|
||||
*
|
||||
* @output wp-includes/js/customize-preview.js
|
||||
*/
|
||||
(function( exports, $ ){
|
||||
var api = wp.customize,
|
||||
|
@ -235,7 +237,7 @@
|
|||
* @returns {void}
|
||||
*/
|
||||
api.addLinkPreviewing = function addLinkPreviewing() {
|
||||
var linkSelectors = 'a[href], area';
|
||||
var linkSelectors = 'a[href], area[href]';
|
||||
|
||||
// Inject links into initial document.
|
||||
$( document.body ).find( linkSelectors ).each( function() {
|
||||
|
@ -335,6 +337,11 @@
|
|||
api.prepareLinkPreview = function prepareLinkPreview( element ) {
|
||||
var queryParams, $element = $( element );
|
||||
|
||||
// Skip elements with no href attribute. Check first to avoid more expensive checks down the road
|
||||
if ( ! element.hasAttribute( 'href' ) ) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Skip links in admin bar.
|
||||
if ( $element.closest( '#wpadminbar' ).length ) {
|
||||
return;
|
||||
|
@ -377,11 +384,6 @@
|
|||
queryParams.customize_messenger_channel = api.settings.channel;
|
||||
}
|
||||
element.search = $.param( queryParams );
|
||||
|
||||
// Prevent links from breaking out of preview iframe.
|
||||
if ( api.settings.channel ) {
|
||||
element.target = '_self';
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -779,7 +781,7 @@
|
|||
api.settings.changeset.uuid = uuid;
|
||||
|
||||
// Update UUIDs in links and forms.
|
||||
$( document.body ).find( 'a[href], area' ).each( function() {
|
||||
$( document.body ).find( 'a[href], area[href]' ).each( function() {
|
||||
api.prepareLinkPreview( this );
|
||||
} );
|
||||
$( document.body ).find( 'form' ).each( function() {
|
||||
|
@ -813,7 +815,7 @@
|
|||
|
||||
api.settings.changeset.autosaved = true; // Start deferring to any autosave once changeset is updated.
|
||||
|
||||
$( document.body ).find( 'a[href], area' ).each( function() {
|
||||
$( document.body ).find( 'a[href], area[href]' ).each( function() {
|
||||
api.prepareLinkPreview( this );
|
||||
} );
|
||||
$( document.body ).find( 'form' ).each( function() {
|
||||
|
|
2
wp-includes/js/customize-preview.min.js
vendored
2
wp-includes/js/customize-preview.min.js
vendored
File diff suppressed because one or more lines are too long
|
@ -1,3 +1,7 @@
|
|||
/**
|
||||
* @output wp-includes/js/customize-selective-refresh.js
|
||||
*/
|
||||
|
||||
/* global jQuery, JSON, _customizePartialRefreshExports, console */
|
||||
|
||||
/** @namespace wp.customize.selectiveRefresh */
|
||||
|
@ -245,7 +249,7 @@ wp.customize.selectiveRefresh = ( function( $, api ) {
|
|||
},
|
||||
|
||||
/**
|
||||
* Find all placements for this partial int he document.
|
||||
* Find all placements for this partial in the document.
|
||||
*
|
||||
* @since 4.5.0
|
||||
*
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
/**
|
||||
* @output wp-includes/js/customize-views.js
|
||||
*/
|
||||
|
||||
(function( $, wp, _ ) {
|
||||
|
||||
if ( ! wp || ! wp.customize ) { return; }
|
||||
|
|
4
wp-includes/js/dist/a11y.js
vendored
4
wp-includes/js/dist/a11y.js
vendored
|
@ -82,7 +82,7 @@ this["wp"] = this["wp"] || {}; this["wp"]["a11y"] =
|
|||
/******/
|
||||
/******/
|
||||
/******/ // Load entry module and return exports
|
||||
/******/ return __webpack_require__(__webpack_require__.s = 324);
|
||||
/******/ return __webpack_require__(__webpack_require__.s = 325);
|
||||
/******/ })
|
||||
/************************************************************************/
|
||||
/******/ ({
|
||||
|
@ -94,7 +94,7 @@ this["wp"] = this["wp"] || {}; this["wp"]["a11y"] =
|
|||
|
||||
/***/ }),
|
||||
|
||||
/***/ 324:
|
||||
/***/ 325:
|
||||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||||
|
||||
"use strict";
|
||||
|
|
2
wp-includes/js/dist/a11y.min.js
vendored
2
wp-includes/js/dist/a11y.min.js
vendored
|
@ -1 +1 @@
|
|||
this.wp=this.wp||{},this.wp.a11y=function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=324)}({182:function(e,t){!function(){e.exports=this.wp.domReady}()},324:function(e,t,n){"use strict";n.r(t);var r=function(e){e=e||"polite";var t=document.createElement("div");return t.id="a11y-speak-"+e,t.className="a11y-speak-region",t.setAttribute("style","position: absolute;margin: -1px;padding: 0;height: 1px;width: 1px;overflow: hidden;clip: rect(1px, 1px, 1px, 1px);-webkit-clip-path: inset(50%);clip-path: inset(50%);border: 0;word-wrap: normal !important;"),t.setAttribute("aria-live",e),t.setAttribute("aria-relevant","additions text"),t.setAttribute("aria-atomic","true"),document.querySelector("body").appendChild(t),t},o=function(){for(var e=document.querySelectorAll(".a11y-speak-region"),t=0;t<e.length;t++)e[t].textContent=""},i=n(182),a=n.n(i),u="",l=function(e){return e=e.replace(/<[^<>]+>/g," "),u===e&&(e+=" "),u=e,e};n.d(t,"setup",function(){return p}),n.d(t,"speak",function(){return c});var p=function(){var e=document.getElementById("a11y-speak-polite"),t=document.getElementById("a11y-speak-assertive");null===e&&(e=r("polite")),null===t&&(t=r("assertive"))};a()(p);var c=function(e,t){o(),e=l(e);var n=document.getElementById("a11y-speak-polite"),r=document.getElementById("a11y-speak-assertive");r&&"assertive"===t?r.textContent=e:n&&(n.textContent=e)}}});
|
||||
this.wp=this.wp||{},this.wp.a11y=function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=325)}({182:function(e,t){!function(){e.exports=this.wp.domReady}()},325:function(e,t,n){"use strict";n.r(t);var r=function(e){e=e||"polite";var t=document.createElement("div");return t.id="a11y-speak-"+e,t.className="a11y-speak-region",t.setAttribute("style","position: absolute;margin: -1px;padding: 0;height: 1px;width: 1px;overflow: hidden;clip: rect(1px, 1px, 1px, 1px);-webkit-clip-path: inset(50%);clip-path: inset(50%);border: 0;word-wrap: normal !important;"),t.setAttribute("aria-live",e),t.setAttribute("aria-relevant","additions text"),t.setAttribute("aria-atomic","true"),document.querySelector("body").appendChild(t),t},o=function(){for(var e=document.querySelectorAll(".a11y-speak-region"),t=0;t<e.length;t++)e[t].textContent=""},i=n(182),a=n.n(i),u="",l=function(e){return e=e.replace(/<[^<>]+>/g," "),u===e&&(e+=" "),u=e,e};n.d(t,"setup",function(){return p}),n.d(t,"speak",function(){return c});var p=function(){var e=document.getElementById("a11y-speak-polite"),t=document.getElementById("a11y-speak-assertive");null===e&&(e=r("polite")),null===t&&(t=r("assertive"))};a()(p);var c=function(e,t){o(),e=l(e);var n=document.getElementById("a11y-speak-polite"),r=document.getElementById("a11y-speak-assertive");r&&"assertive"===t?r.textContent=e:n&&(n.textContent=e)}}});
|
4
wp-includes/js/dist/annotations.js
vendored
4
wp-includes/js/dist/annotations.js
vendored
|
@ -82,7 +82,7 @@ this["wp"] = this["wp"] || {}; this["wp"]["annotations"] =
|
|||
/******/
|
||||
/******/
|
||||
/******/ // Load entry module and return exports
|
||||
/******/ return __webpack_require__(__webpack_require__.s = 314);
|
||||
/******/ return __webpack_require__(__webpack_require__.s = 316);
|
||||
/******/ })
|
||||
/************************************************************************/
|
||||
/******/ ({
|
||||
|
@ -496,7 +496,7 @@ function isShallowEqual( a, b, fromIndex ) {
|
|||
|
||||
/***/ }),
|
||||
|
||||
/***/ 314:
|
||||
/***/ 316:
|
||||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||||
|
||||
"use strict";
|
||||
|
|
2
wp-includes/js/dist/annotations.min.js
vendored
2
wp-includes/js/dist/annotations.min.js
vendored
File diff suppressed because one or more lines are too long
169
wp-includes/js/dist/block-library.js
vendored
169
wp-includes/js/dist/block-library.js
vendored
|
@ -82,7 +82,7 @@ this["wp"] = this["wp"] || {}; this["wp"]["blockLibrary"] =
|
|||
/******/
|
||||
/******/
|
||||
/******/ // Load entry module and return exports
|
||||
/******/ return __webpack_require__(__webpack_require__.s = 305);
|
||||
/******/ return __webpack_require__(__webpack_require__.s = 306);
|
||||
/******/ })
|
||||
/************************************************************************/
|
||||
/******/ ({
|
||||
|
@ -117,7 +117,7 @@ function _classCallCheck(instance, Constructor) {
|
|||
/***/ 100:
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
/* WEBPACK VAR INJECTION */(function(module, global) {var __WEBPACK_AMD_DEFINE_RESULT__;/*! https://mths.be/punycode v1.3.2 by @mathias */
|
||||
/* WEBPACK VAR INJECTION */(function(module, global) {var __WEBPACK_AMD_DEFINE_RESULT__;/*! https://mths.be/punycode v1.4.1 by @mathias */
|
||||
;(function(root) {
|
||||
|
||||
/** Detect free variables */
|
||||
|
@ -183,7 +183,7 @@ function _classCallCheck(instance, Constructor) {
|
|||
* @returns {Error} Throws a `RangeError` with the applicable error message.
|
||||
*/
|
||||
function error(type) {
|
||||
throw RangeError(errors[type]);
|
||||
throw new RangeError(errors[type]);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -330,7 +330,7 @@ function _classCallCheck(instance, Constructor) {
|
|||
|
||||
/**
|
||||
* Bias adaptation function as per section 3.4 of RFC 3492.
|
||||
* http://tools.ietf.org/html/rfc3492#section-3.4
|
||||
* https://tools.ietf.org/html/rfc3492#section-3.4
|
||||
* @private
|
||||
*/
|
||||
function adapt(delta, numPoints, firstTime) {
|
||||
|
@ -605,7 +605,7 @@ function _classCallCheck(instance, Constructor) {
|
|||
* @memberOf punycode
|
||||
* @type String
|
||||
*/
|
||||
'version': '1.3.2',
|
||||
'version': '1.4.1',
|
||||
/**
|
||||
* An object of methods to convert from JavaScript's internal character
|
||||
* representation (UCS-2) to Unicode code points, and back.
|
||||
|
@ -988,6 +988,13 @@ function _defineProperty(obj, key, value) {
|
|||
/***/ }),
|
||||
|
||||
/***/ 16:
|
||||
/***/ (function(module, exports) {
|
||||
|
||||
(function() { module.exports = this["wp"]["keycodes"]; }());
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 17:
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*!
|
||||
|
@ -1043,13 +1050,6 @@ var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*!
|
|||
}());
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 17:
|
||||
/***/ (function(module, exports) {
|
||||
|
||||
(function() { module.exports = this["wp"]["keycodes"]; }());
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 18:
|
||||
|
@ -1268,7 +1268,7 @@ function _assertThisInitialized(self) {
|
|||
|
||||
/***/ }),
|
||||
|
||||
/***/ 305:
|
||||
/***/ 306:
|
||||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||||
|
||||
"use strict";
|
||||
|
@ -1440,7 +1440,7 @@ var objectSpread = __webpack_require__(8);
|
|||
var external_this_wp_element_ = __webpack_require__(0);
|
||||
|
||||
// EXTERNAL MODULE: ./node_modules/classnames/index.js
|
||||
var classnames = __webpack_require__(16);
|
||||
var classnames = __webpack_require__(17);
|
||||
var classnames_default = /*#__PURE__*/__webpack_require__.n(classnames);
|
||||
|
||||
// EXTERNAL MODULE: external "lodash"
|
||||
|
@ -2235,6 +2235,24 @@ var others = [{
|
|||
description: Object(external_this_wp_i18n_["__"])('Embed CollegeHumor content.')
|
||||
},
|
||||
patterns: [/^https?:\/\/(www\.)?collegehumor\.com\/.+/i]
|
||||
}, {
|
||||
name: 'core-embed/crowdsignal',
|
||||
settings: {
|
||||
title: 'Crowdsignal',
|
||||
icon: embedContentIcon,
|
||||
keywords: ['polldaddy'],
|
||||
transform: [{
|
||||
type: 'block',
|
||||
blocks: ['core-embed/polldaddy'],
|
||||
transform: function transform(content) {
|
||||
return Object(external_this_wp_blocks_["createBlock"])('core-embed/crowdsignal', {
|
||||
content: content
|
||||
});
|
||||
}
|
||||
}],
|
||||
description: Object(external_this_wp_i18n_["__"])('Embed Crowdsignal (formerly Polldaddy) content.')
|
||||
},
|
||||
patterns: [/^https?:\/\/((.+\.)?polldaddy\.com|poll\.fm|.+\.survey\.fm)\/.+/i]
|
||||
}, {
|
||||
name: 'core-embed/dailymotion',
|
||||
settings: {
|
||||
|
@ -2309,13 +2327,17 @@ var others = [{
|
|||
},
|
||||
patterns: [/^http:\/\/g?i*\.photobucket\.com\/.+/i]
|
||||
}, {
|
||||
// Deprecated in favour of the core-embed/crowdsignal block
|
||||
name: 'core-embed/polldaddy',
|
||||
settings: {
|
||||
title: 'Polldaddy',
|
||||
icon: embedContentIcon,
|
||||
description: Object(external_this_wp_i18n_["__"])('Embed Polldaddy content.')
|
||||
description: Object(external_this_wp_i18n_["__"])('Embed Polldaddy content.'),
|
||||
supports: {
|
||||
inserter: false
|
||||
}
|
||||
},
|
||||
patterns: [/^https?:\/\/(www\.)?polldaddy\.com\/.+/i]
|
||||
patterns: []
|
||||
}, {
|
||||
name: 'core-embed/reddit',
|
||||
settings: {
|
||||
|
@ -2882,9 +2904,12 @@ function (_Component) {
|
|||
Object(createClass["a" /* default */])(ImageEdit, [{
|
||||
key: "componentDidMount",
|
||||
value: function componentDidMount() {
|
||||
var _this2 = this;
|
||||
|
||||
var _this$props = this.props,
|
||||
attributes = _this$props.attributes,
|
||||
setAttributes = _this$props.setAttributes;
|
||||
setAttributes = _this$props.setAttributes,
|
||||
noticeOperations = _this$props.noticeOperations;
|
||||
var id = attributes.id,
|
||||
_attributes$url = attributes.url,
|
||||
url = _attributes$url === void 0 ? '' : _attributes$url;
|
||||
|
@ -2901,7 +2926,14 @@ function (_Component) {
|
|||
|
||||
setAttributes(edit_pickRelevantMediaFiles(image));
|
||||
},
|
||||
allowedTypes: ALLOWED_MEDIA_TYPES
|
||||
allowedTypes: ALLOWED_MEDIA_TYPES,
|
||||
onError: function onError(message) {
|
||||
noticeOperations.createErrorNotice(message);
|
||||
|
||||
_this2.setState({
|
||||
isEditing: true
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
@ -3109,12 +3141,12 @@ function (_Component) {
|
|||
}, {
|
||||
key: "updateDimensions",
|
||||
value: function updateDimensions() {
|
||||
var _this2 = this;
|
||||
var _this3 = this;
|
||||
|
||||
var width = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : undefined;
|
||||
var height = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : undefined;
|
||||
return function () {
|
||||
_this2.props.setAttributes({
|
||||
_this3.props.setAttributes({
|
||||
width: width,
|
||||
height: height
|
||||
});
|
||||
|
@ -3177,7 +3209,7 @@ function (_Component) {
|
|||
}, {
|
||||
key: "render",
|
||||
value: function render() {
|
||||
var _this3 = this;
|
||||
var _this4 = this;
|
||||
|
||||
var isEditing = this.state.isEditing;
|
||||
var _this$props3 = this.props,
|
||||
|
@ -3269,13 +3301,13 @@ function (_Component) {
|
|||
}, Object(external_this_wp_element_["createElement"])(external_this_wp_components_["TextareaControl"], {
|
||||
label: Object(external_this_wp_i18n_["__"])('Alt Text (Alternative Text)'),
|
||||
value: alt,
|
||||
onChange: _this3.updateAlt,
|
||||
onChange: _this4.updateAlt,
|
||||
help: Object(external_this_wp_i18n_["__"])('Alternative text describes your image to people who can’t see it. Add a short description with its key details.')
|
||||
}), !Object(external_lodash_["isEmpty"])(imageSizeOptions) && Object(external_this_wp_element_["createElement"])(external_this_wp_components_["SelectControl"], {
|
||||
label: Object(external_this_wp_i18n_["__"])('Image Size'),
|
||||
value: url,
|
||||
options: imageSizeOptions,
|
||||
onChange: _this3.updateImageURL
|
||||
onChange: _this4.updateImageURL
|
||||
}), isResizable && Object(external_this_wp_element_["createElement"])("div", {
|
||||
className: "block-library-image__dimensions"
|
||||
}, Object(external_this_wp_element_["createElement"])("p", {
|
||||
|
@ -3289,7 +3321,7 @@ function (_Component) {
|
|||
value: width !== undefined ? width : '',
|
||||
placeholder: imageWidth,
|
||||
min: 1,
|
||||
onChange: _this3.updateWidth
|
||||
onChange: _this4.updateWidth
|
||||
}), Object(external_this_wp_element_["createElement"])(external_this_wp_components_["TextControl"], {
|
||||
type: "number",
|
||||
className: "block-library-image__dimensions__height",
|
||||
|
@ -3297,7 +3329,7 @@ function (_Component) {
|
|||
value: height !== undefined ? height : '',
|
||||
placeholder: imageHeight,
|
||||
min: 1,
|
||||
onChange: _this3.updateHeight
|
||||
onChange: _this4.updateHeight
|
||||
})), Object(external_this_wp_element_["createElement"])("div", {
|
||||
className: "block-library-image__dimensions__row"
|
||||
}, Object(external_this_wp_element_["createElement"])(external_this_wp_components_["ButtonGroup"], {
|
||||
|
@ -3311,36 +3343,36 @@ function (_Component) {
|
|||
isSmall: true,
|
||||
isPrimary: isCurrent,
|
||||
"aria-pressed": isCurrent,
|
||||
onClick: _this3.updateDimensions(scaledWidth, scaledHeight)
|
||||
onClick: _this4.updateDimensions(scaledWidth, scaledHeight)
|
||||
}, scale, "%");
|
||||
})), Object(external_this_wp_element_["createElement"])(external_this_wp_components_["Button"], {
|
||||
isSmall: true,
|
||||
onClick: _this3.updateDimensions()
|
||||
onClick: _this4.updateDimensions()
|
||||
}, Object(external_this_wp_i18n_["__"])('Reset'))))), Object(external_this_wp_element_["createElement"])(external_this_wp_components_["PanelBody"], {
|
||||
title: Object(external_this_wp_i18n_["__"])('Link Settings')
|
||||
}, Object(external_this_wp_element_["createElement"])(external_this_wp_components_["SelectControl"], {
|
||||
label: Object(external_this_wp_i18n_["__"])('Link To'),
|
||||
value: linkDestination,
|
||||
options: _this3.getLinkDestinationOptions(),
|
||||
onChange: _this3.onSetLinkDestination
|
||||
options: _this4.getLinkDestinationOptions(),
|
||||
onChange: _this4.onSetLinkDestination
|
||||
}), linkDestination !== LINK_DESTINATION_NONE && Object(external_this_wp_element_["createElement"])(external_this_wp_element_["Fragment"], null, Object(external_this_wp_element_["createElement"])(external_this_wp_components_["TextControl"], {
|
||||
label: Object(external_this_wp_i18n_["__"])('Link URL'),
|
||||
value: href || '',
|
||||
onChange: _this3.onSetCustomHref,
|
||||
onChange: _this4.onSetCustomHref,
|
||||
placeholder: !isLinkURLInputReadOnly ? 'https://' : undefined,
|
||||
readOnly: isLinkURLInputReadOnly
|
||||
}), Object(external_this_wp_element_["createElement"])(external_this_wp_components_["ToggleControl"], {
|
||||
label: Object(external_this_wp_i18n_["__"])('Open in New Tab'),
|
||||
onChange: _this3.onSetNewTab,
|
||||
onChange: _this4.onSetNewTab,
|
||||
checked: linkTarget === '_blank'
|
||||
}), Object(external_this_wp_element_["createElement"])(external_this_wp_components_["TextControl"], {
|
||||
label: Object(external_this_wp_i18n_["__"])('Link CSS Class'),
|
||||
value: linkClass || '',
|
||||
onChange: _this3.onSetLinkClass
|
||||
onChange: _this4.onSetLinkClass
|
||||
}), Object(external_this_wp_element_["createElement"])(external_this_wp_components_["TextControl"], {
|
||||
label: Object(external_this_wp_i18n_["__"])('Link Rel'),
|
||||
value: rel || '',
|
||||
onChange: _this3.onSetLinkRel
|
||||
onChange: _this4.onSetLinkRel
|
||||
}))));
|
||||
}; // Disable reason: Each block can be selected by clicking on it
|
||||
|
||||
|
@ -3358,7 +3390,7 @@ function (_Component) {
|
|||
imageWidth = sizes.imageWidth,
|
||||
imageHeight = sizes.imageHeight;
|
||||
|
||||
var filename = _this3.getFilename(url);
|
||||
var filename = _this4.getFilename(url);
|
||||
|
||||
var defaultedAlt;
|
||||
|
||||
|
@ -3377,9 +3409,9 @@ function (_Component) {
|
|||
Object(external_this_wp_element_["createElement"])(external_this_wp_element_["Fragment"], null, Object(external_this_wp_element_["createElement"])("img", {
|
||||
src: url,
|
||||
alt: defaultedAlt,
|
||||
onClick: _this3.onImageClick,
|
||||
onClick: _this4.onImageClick,
|
||||
onError: function onError() {
|
||||
return _this3.onImageError(url);
|
||||
return _this4.onImageError(url);
|
||||
}
|
||||
}), Object(external_this_wp_blob_["isBlobURL"])(url) && Object(external_this_wp_element_["createElement"])(external_this_wp_components_["Spinner"], null))
|
||||
/* eslint-enable jsx-a11y/no-noninteractive-element-interactions */
|
||||
|
@ -4636,7 +4668,7 @@ var quote_settings = {
|
|||
};
|
||||
|
||||
// EXTERNAL MODULE: external {"this":["wp","keycodes"]}
|
||||
var external_this_wp_keycodes_ = __webpack_require__(17);
|
||||
var external_this_wp_keycodes_ = __webpack_require__(16);
|
||||
|
||||
// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/gallery/gallery-image.js
|
||||
|
||||
|
@ -5276,34 +5308,34 @@ var gallery_settings = {
|
|||
isMultiBlock: true,
|
||||
blocks: ['core/image'],
|
||||
transform: function transform(attributes) {
|
||||
// Init the align attribute from the first item which may be either the placeholder or an image.
|
||||
var align = attributes[0].align; // Loop through all the images and check if they have the same align.
|
||||
|
||||
align = Object(external_lodash_["every"])(attributes, ['align', align]) ? align : undefined;
|
||||
var validImages = Object(external_lodash_["filter"])(attributes, function (_ref) {
|
||||
var id = _ref.id,
|
||||
url = _ref.url;
|
||||
return id && url;
|
||||
});
|
||||
|
||||
if (validImages.length > 0) {
|
||||
return Object(external_this_wp_blocks_["createBlock"])('core/gallery', {
|
||||
images: validImages.map(function (_ref2) {
|
||||
var id = _ref2.id,
|
||||
url = _ref2.url,
|
||||
alt = _ref2.alt,
|
||||
caption = _ref2.caption;
|
||||
return {
|
||||
id: id,
|
||||
url: url,
|
||||
alt: alt,
|
||||
caption: caption
|
||||
};
|
||||
}),
|
||||
ids: validImages.map(function (_ref3) {
|
||||
var id = _ref3.id;
|
||||
return id;
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
return Object(external_this_wp_blocks_["createBlock"])('core/gallery');
|
||||
return Object(external_this_wp_blocks_["createBlock"])('core/gallery', {
|
||||
images: validImages.map(function (_ref2) {
|
||||
var id = _ref2.id,
|
||||
url = _ref2.url,
|
||||
alt = _ref2.alt,
|
||||
caption = _ref2.caption;
|
||||
return {
|
||||
id: id,
|
||||
url: url,
|
||||
alt: alt,
|
||||
caption: caption
|
||||
};
|
||||
}),
|
||||
ids: validImages.map(function (_ref3) {
|
||||
var id = _ref3.id;
|
||||
return id;
|
||||
}),
|
||||
align: align
|
||||
});
|
||||
}
|
||||
}, {
|
||||
type: 'shortcode',
|
||||
|
@ -5378,7 +5410,8 @@ var gallery_settings = {
|
|||
type: 'block',
|
||||
blocks: ['core/image'],
|
||||
transform: function transform(_ref8) {
|
||||
var images = _ref8.images;
|
||||
var images = _ref8.images,
|
||||
align = _ref8.align;
|
||||
|
||||
if (images.length > 0) {
|
||||
return images.map(function (_ref9) {
|
||||
|
@ -5390,12 +5423,15 @@ var gallery_settings = {
|
|||
id: id,
|
||||
url: url,
|
||||
alt: alt,
|
||||
caption: caption
|
||||
caption: caption,
|
||||
align: align
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
return Object(external_this_wp_blocks_["createBlock"])('core/image');
|
||||
return Object(external_this_wp_blocks_["createBlock"])('core/image', {
|
||||
align: align
|
||||
});
|
||||
}
|
||||
}]
|
||||
},
|
||||
|
@ -7794,7 +7830,7 @@ var embed_preview_EmbedPreview = function EmbedPreview(props) {
|
|||
href: url
|
||||
}, url)), Object(external_this_wp_element_["createElement"])("p", {
|
||||
className: "components-placeholder__error"
|
||||
}, Object(external_this_wp_i18n_["__"])('Previews for this are unavailable in the editor, sorry!'))) : embedWrapper, (!external_this_wp_editor_["RichText"].isEmpty(caption) || isSelected) && Object(external_this_wp_element_["createElement"])(external_this_wp_editor_["RichText"], {
|
||||
}, Object(external_this_wp_i18n_["__"])('Sorry, we cannot preview this embedded content in the editor.'))) : embedWrapper, (!external_this_wp_editor_["RichText"].isEmpty(caption) || isSelected) && Object(external_this_wp_element_["createElement"])(external_this_wp_editor_["RichText"], {
|
||||
tagName: "figcaption",
|
||||
placeholder: Object(external_this_wp_i18n_["__"])('Write caption…'),
|
||||
value: caption,
|
||||
|
@ -8580,7 +8616,8 @@ function (_Component) {
|
|||
text: href,
|
||||
className: "".concat(className, "__copy-url-button"),
|
||||
onCopy: this.confirmCopyURL,
|
||||
onFinishCopy: this.resetCopyConfirmation
|
||||
onFinishCopy: this.resetCopyConfirmation,
|
||||
disabled: Object(external_this_wp_blob_["isBlobURL"])(href)
|
||||
}, showCopyConfirmation ? Object(external_this_wp_i18n_["__"])('Copied!') : Object(external_this_wp_i18n_["__"])('Copy URL'))));
|
||||
}
|
||||
}]);
|
||||
|
@ -14038,7 +14075,7 @@ g = (function() {
|
|||
|
||||
try {
|
||||
// This works if eval is allowed (see CSP)
|
||||
g = g || Function("return this")() || (1, eval)("this");
|
||||
g = g || new Function("return this")();
|
||||
} catch (e) {
|
||||
// This works if the window reference is available
|
||||
if (typeof window === "object") g = window;
|
||||
|
|
6
wp-includes/js/dist/block-library.min.js
vendored
6
wp-includes/js/dist/block-library.min.js
vendored
File diff suppressed because one or more lines are too long
4
wp-includes/js/dist/blocks.js
vendored
4
wp-includes/js/dist/blocks.js
vendored
|
@ -82,7 +82,7 @@ this["wp"] = this["wp"] || {}; this["wp"]["blocks"] =
|
|||
/******/
|
||||
/******/
|
||||
/******/ // Load entry module and return exports
|
||||
/******/ return __webpack_require__(__webpack_require__.s = 306);
|
||||
/******/ return __webpack_require__(__webpack_require__.s = 308);
|
||||
/******/ })
|
||||
/************************************************************************/
|
||||
/******/ ({
|
||||
|
@ -5421,7 +5421,7 @@ function _slicedToArray(arr, i) {
|
|||
|
||||
/***/ }),
|
||||
|
||||
/***/ 306:
|
||||
/***/ 308:
|
||||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||||
|
||||
"use strict";
|
||||
|
|
4
wp-includes/js/dist/blocks.min.js
vendored
4
wp-includes/js/dist/blocks.min.js
vendored
File diff suppressed because one or more lines are too long
314
wp-includes/js/dist/components.js
vendored
314
wp-includes/js/dist/components.js
vendored
File diff suppressed because it is too large
Load diff
6
wp-includes/js/dist/components.min.js
vendored
6
wp-includes/js/dist/components.min.js
vendored
File diff suppressed because one or more lines are too long
4
wp-includes/js/dist/compose.js
vendored
4
wp-includes/js/dist/compose.js
vendored
|
@ -82,7 +82,7 @@ this["wp"] = this["wp"] || {}; this["wp"]["compose"] =
|
|||
/******/
|
||||
/******/
|
||||
/******/ // Load entry module and return exports
|
||||
/******/ return __webpack_require__(__webpack_require__.s = 313);
|
||||
/******/ return __webpack_require__(__webpack_require__.s = 314);
|
||||
/******/ })
|
||||
/************************************************************************/
|
||||
/******/ ({
|
||||
|
@ -244,7 +244,7 @@ function _assertThisInitialized(self) {
|
|||
|
||||
/***/ }),
|
||||
|
||||
/***/ 313:
|
||||
/***/ 314:
|
||||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||||
|
||||
"use strict";
|
||||
|
|
2
wp-includes/js/dist/compose.min.js
vendored
2
wp-includes/js/dist/compose.min.js
vendored
File diff suppressed because one or more lines are too long
570
wp-includes/js/dist/core-data.js
vendored
570
wp-includes/js/dist/core-data.js
vendored
|
@ -82,7 +82,7 @@ this["wp"] = this["wp"] || {}; this["wp"]["coreData"] =
|
|||
/******/
|
||||
/******/
|
||||
/******/ // Load entry module and return exports
|
||||
/******/ return __webpack_require__(__webpack_require__.s = 309);
|
||||
/******/ return __webpack_require__(__webpack_require__.s = 310);
|
||||
/******/ })
|
||||
/************************************************************************/
|
||||
/******/ ({
|
||||
|
@ -242,7 +242,289 @@ function _slicedToArray(arr, i) {
|
|||
|
||||
/***/ }),
|
||||
|
||||
/***/ 309:
|
||||
/***/ 31:
|
||||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||||
|
||||
"use strict";
|
||||
|
||||
|
||||
var LEAF_KEY, hasWeakMap;
|
||||
|
||||
/**
|
||||
* Arbitrary value used as key for referencing cache object in WeakMap tree.
|
||||
*
|
||||
* @type {Object}
|
||||
*/
|
||||
LEAF_KEY = {};
|
||||
|
||||
/**
|
||||
* Whether environment supports WeakMap.
|
||||
*
|
||||
* @type {boolean}
|
||||
*/
|
||||
hasWeakMap = typeof WeakMap !== 'undefined';
|
||||
|
||||
/**
|
||||
* Returns the first argument as the sole entry in an array.
|
||||
*
|
||||
* @param {*} value Value to return.
|
||||
*
|
||||
* @return {Array} Value returned as entry in array.
|
||||
*/
|
||||
function arrayOf( value ) {
|
||||
return [ value ];
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns true if the value passed is object-like, or false otherwise. A value
|
||||
* is object-like if it can support property assignment, e.g. object or array.
|
||||
*
|
||||
* @param {*} value Value to test.
|
||||
*
|
||||
* @return {boolean} Whether value is object-like.
|
||||
*/
|
||||
function isObjectLike( value ) {
|
||||
return !! value && 'object' === typeof value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates and returns a new cache object.
|
||||
*
|
||||
* @return {Object} Cache object.
|
||||
*/
|
||||
function createCache() {
|
||||
var cache = {
|
||||
clear: function() {
|
||||
cache.head = null;
|
||||
},
|
||||
};
|
||||
|
||||
return cache;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns true if entries within the two arrays are strictly equal by
|
||||
* reference from a starting index.
|
||||
*
|
||||
* @param {Array} a First array.
|
||||
* @param {Array} b Second array.
|
||||
* @param {number} fromIndex Index from which to start comparison.
|
||||
*
|
||||
* @return {boolean} Whether arrays are shallowly equal.
|
||||
*/
|
||||
function isShallowEqual( a, b, fromIndex ) {
|
||||
var i;
|
||||
|
||||
if ( a.length !== b.length ) {
|
||||
return false;
|
||||
}
|
||||
|
||||
for ( i = fromIndex; i < a.length; i++ ) {
|
||||
if ( a[ i ] !== b[ i ] ) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a memoized selector function. The getDependants function argument is
|
||||
* called before the memoized selector and is expected to return an immutable
|
||||
* reference or array of references on which the selector depends for computing
|
||||
* its own return value. The memoize cache is preserved only as long as those
|
||||
* dependant references remain the same. If getDependants returns a different
|
||||
* reference(s), the cache is cleared and the selector value regenerated.
|
||||
*
|
||||
* @param {Function} selector Selector function.
|
||||
* @param {Function} getDependants Dependant getter returning an immutable
|
||||
* reference or array of reference used in
|
||||
* cache bust consideration.
|
||||
*
|
||||
* @return {Function} Memoized selector.
|
||||
*/
|
||||
/* harmony default export */ __webpack_exports__["a"] = (function( selector, getDependants ) {
|
||||
var rootCache, getCache;
|
||||
|
||||
// Use object source as dependant if getter not provided
|
||||
if ( ! getDependants ) {
|
||||
getDependants = arrayOf;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the root cache. If WeakMap is supported, this is assigned to the
|
||||
* root WeakMap cache set, otherwise it is a shared instance of the default
|
||||
* cache object.
|
||||
*
|
||||
* @return {(WeakMap|Object)} Root cache object.
|
||||
*/
|
||||
function getRootCache() {
|
||||
return rootCache;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the cache for a given dependants array. When possible, a WeakMap
|
||||
* will be used to create a unique cache for each set of dependants. This
|
||||
* is feasible due to the nature of WeakMap in allowing garbage collection
|
||||
* to occur on entries where the key object is no longer referenced. Since
|
||||
* WeakMap requires the key to be an object, this is only possible when the
|
||||
* dependant is object-like. The root cache is created as a hierarchy where
|
||||
* each top-level key is the first entry in a dependants set, the value a
|
||||
* WeakMap where each key is the next dependant, and so on. This continues
|
||||
* so long as the dependants are object-like. If no dependants are object-
|
||||
* like, then the cache is shared across all invocations.
|
||||
*
|
||||
* @see isObjectLike
|
||||
*
|
||||
* @param {Array} dependants Selector dependants.
|
||||
*
|
||||
* @return {Object} Cache object.
|
||||
*/
|
||||
function getWeakMapCache( dependants ) {
|
||||
var caches = rootCache,
|
||||
isUniqueByDependants = true,
|
||||
i, dependant, map, cache;
|
||||
|
||||
for ( i = 0; i < dependants.length; i++ ) {
|
||||
dependant = dependants[ i ];
|
||||
|
||||
// Can only compose WeakMap from object-like key.
|
||||
if ( ! isObjectLike( dependant ) ) {
|
||||
isUniqueByDependants = false;
|
||||
break;
|
||||
}
|
||||
|
||||
// Does current segment of cache already have a WeakMap?
|
||||
if ( caches.has( dependant ) ) {
|
||||
// Traverse into nested WeakMap.
|
||||
caches = caches.get( dependant );
|
||||
} else {
|
||||
// Create, set, and traverse into a new one.
|
||||
map = new WeakMap();
|
||||
caches.set( dependant, map );
|
||||
caches = map;
|
||||
}
|
||||
}
|
||||
|
||||
// We use an arbitrary (but consistent) object as key for the last item
|
||||
// in the WeakMap to serve as our running cache.
|
||||
if ( ! caches.has( LEAF_KEY ) ) {
|
||||
cache = createCache();
|
||||
cache.isUniqueByDependants = isUniqueByDependants;
|
||||
caches.set( LEAF_KEY, cache );
|
||||
}
|
||||
|
||||
return caches.get( LEAF_KEY );
|
||||
}
|
||||
|
||||
// Assign cache handler by availability of WeakMap
|
||||
getCache = hasWeakMap ? getWeakMapCache : getRootCache;
|
||||
|
||||
/**
|
||||
* Resets root memoization cache.
|
||||
*/
|
||||
function clear() {
|
||||
rootCache = hasWeakMap ? new WeakMap() : createCache();
|
||||
}
|
||||
|
||||
// eslint-disable-next-line jsdoc/check-param-names
|
||||
/**
|
||||
* The augmented selector call, considering first whether dependants have
|
||||
* changed before passing it to underlying memoize function.
|
||||
*
|
||||
* @param {Object} source Source object for derivation.
|
||||
* @param {...*} extraArgs Additional arguments to pass to selector.
|
||||
*
|
||||
* @return {*} Selector result.
|
||||
*/
|
||||
function callSelector( /* source, ...extraArgs */ ) {
|
||||
var len = arguments.length,
|
||||
cache, node, i, args, dependants;
|
||||
|
||||
// Create copy of arguments (avoid leaking deoptimization).
|
||||
args = new Array( len );
|
||||
for ( i = 0; i < len; i++ ) {
|
||||
args[ i ] = arguments[ i ];
|
||||
}
|
||||
|
||||
dependants = getDependants.apply( null, args );
|
||||
cache = getCache( dependants );
|
||||
|
||||
// If not guaranteed uniqueness by dependants (primitive type or lack
|
||||
// of WeakMap support), shallow compare against last dependants and, if
|
||||
// references have changed, destroy cache to recalculate result.
|
||||
if ( ! cache.isUniqueByDependants ) {
|
||||
if ( cache.lastDependants && ! isShallowEqual( dependants, cache.lastDependants, 0 ) ) {
|
||||
cache.clear();
|
||||
}
|
||||
|
||||
cache.lastDependants = dependants;
|
||||
}
|
||||
|
||||
node = cache.head;
|
||||
while ( node ) {
|
||||
// Check whether node arguments match arguments
|
||||
if ( ! isShallowEqual( node.args, args, 1 ) ) {
|
||||
node = node.next;
|
||||
continue;
|
||||
}
|
||||
|
||||
// At this point we can assume we've found a match
|
||||
|
||||
// Surface matched node to head if not already
|
||||
if ( node !== cache.head ) {
|
||||
// Adjust siblings to point to each other.
|
||||
node.prev.next = node.next;
|
||||
if ( node.next ) {
|
||||
node.next.prev = node.prev;
|
||||
}
|
||||
|
||||
node.next = cache.head;
|
||||
node.prev = null;
|
||||
cache.head.prev = node;
|
||||
cache.head = node;
|
||||
}
|
||||
|
||||
// Return immediately
|
||||
return node.val;
|
||||
}
|
||||
|
||||
// No cached value found. Continue to insertion phase:
|
||||
|
||||
node = {
|
||||
// Generate the result from original function
|
||||
val: selector.apply( null, args ),
|
||||
};
|
||||
|
||||
// Avoid including the source object in the cache.
|
||||
args[ 0 ] = null;
|
||||
node.args = args;
|
||||
|
||||
// Don't need to check whether node is already head, since it would
|
||||
// have been returned above already if it was
|
||||
|
||||
// Shift existing head down list
|
||||
if ( cache.head ) {
|
||||
cache.head.prev = node;
|
||||
node.next = cache.head;
|
||||
}
|
||||
|
||||
cache.head = node;
|
||||
|
||||
return node.val;
|
||||
}
|
||||
|
||||
callSelector.getDependants = getDependants;
|
||||
callSelector.clear = clear;
|
||||
clear();
|
||||
|
||||
return callSelector;
|
||||
});
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 310:
|
||||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||||
|
||||
"use strict";
|
||||
|
@ -2025,288 +2307,6 @@ Object(external_this_wp_data_["registerStore"])(REDUCER_KEY, {
|
|||
});
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 31:
|
||||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||||
|
||||
"use strict";
|
||||
|
||||
|
||||
var LEAF_KEY, hasWeakMap;
|
||||
|
||||
/**
|
||||
* Arbitrary value used as key for referencing cache object in WeakMap tree.
|
||||
*
|
||||
* @type {Object}
|
||||
*/
|
||||
LEAF_KEY = {};
|
||||
|
||||
/**
|
||||
* Whether environment supports WeakMap.
|
||||
*
|
||||
* @type {boolean}
|
||||
*/
|
||||
hasWeakMap = typeof WeakMap !== 'undefined';
|
||||
|
||||
/**
|
||||
* Returns the first argument as the sole entry in an array.
|
||||
*
|
||||
* @param {*} value Value to return.
|
||||
*
|
||||
* @return {Array} Value returned as entry in array.
|
||||
*/
|
||||
function arrayOf( value ) {
|
||||
return [ value ];
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns true if the value passed is object-like, or false otherwise. A value
|
||||
* is object-like if it can support property assignment, e.g. object or array.
|
||||
*
|
||||
* @param {*} value Value to test.
|
||||
*
|
||||
* @return {boolean} Whether value is object-like.
|
||||
*/
|
||||
function isObjectLike( value ) {
|
||||
return !! value && 'object' === typeof value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates and returns a new cache object.
|
||||
*
|
||||
* @return {Object} Cache object.
|
||||
*/
|
||||
function createCache() {
|
||||
var cache = {
|
||||
clear: function() {
|
||||
cache.head = null;
|
||||
},
|
||||
};
|
||||
|
||||
return cache;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns true if entries within the two arrays are strictly equal by
|
||||
* reference from a starting index.
|
||||
*
|
||||
* @param {Array} a First array.
|
||||
* @param {Array} b Second array.
|
||||
* @param {number} fromIndex Index from which to start comparison.
|
||||
*
|
||||
* @return {boolean} Whether arrays are shallowly equal.
|
||||
*/
|
||||
function isShallowEqual( a, b, fromIndex ) {
|
||||
var i;
|
||||
|
||||
if ( a.length !== b.length ) {
|
||||
return false;
|
||||
}
|
||||
|
||||
for ( i = fromIndex; i < a.length; i++ ) {
|
||||
if ( a[ i ] !== b[ i ] ) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a memoized selector function. The getDependants function argument is
|
||||
* called before the memoized selector and is expected to return an immutable
|
||||
* reference or array of references on which the selector depends for computing
|
||||
* its own return value. The memoize cache is preserved only as long as those
|
||||
* dependant references remain the same. If getDependants returns a different
|
||||
* reference(s), the cache is cleared and the selector value regenerated.
|
||||
*
|
||||
* @param {Function} selector Selector function.
|
||||
* @param {Function} getDependants Dependant getter returning an immutable
|
||||
* reference or array of reference used in
|
||||
* cache bust consideration.
|
||||
*
|
||||
* @return {Function} Memoized selector.
|
||||
*/
|
||||
/* harmony default export */ __webpack_exports__["a"] = (function( selector, getDependants ) {
|
||||
var rootCache, getCache;
|
||||
|
||||
// Use object source as dependant if getter not provided
|
||||
if ( ! getDependants ) {
|
||||
getDependants = arrayOf;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the root cache. If WeakMap is supported, this is assigned to the
|
||||
* root WeakMap cache set, otherwise it is a shared instance of the default
|
||||
* cache object.
|
||||
*
|
||||
* @return {(WeakMap|Object)} Root cache object.
|
||||
*/
|
||||
function getRootCache() {
|
||||
return rootCache;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the cache for a given dependants array. When possible, a WeakMap
|
||||
* will be used to create a unique cache for each set of dependants. This
|
||||
* is feasible due to the nature of WeakMap in allowing garbage collection
|
||||
* to occur on entries where the key object is no longer referenced. Since
|
||||
* WeakMap requires the key to be an object, this is only possible when the
|
||||
* dependant is object-like. The root cache is created as a hierarchy where
|
||||
* each top-level key is the first entry in a dependants set, the value a
|
||||
* WeakMap where each key is the next dependant, and so on. This continues
|
||||
* so long as the dependants are object-like. If no dependants are object-
|
||||
* like, then the cache is shared across all invocations.
|
||||
*
|
||||
* @see isObjectLike
|
||||
*
|
||||
* @param {Array} dependants Selector dependants.
|
||||
*
|
||||
* @return {Object} Cache object.
|
||||
*/
|
||||
function getWeakMapCache( dependants ) {
|
||||
var caches = rootCache,
|
||||
isUniqueByDependants = true,
|
||||
i, dependant, map, cache;
|
||||
|
||||
for ( i = 0; i < dependants.length; i++ ) {
|
||||
dependant = dependants[ i ];
|
||||
|
||||
// Can only compose WeakMap from object-like key.
|
||||
if ( ! isObjectLike( dependant ) ) {
|
||||
isUniqueByDependants = false;
|
||||
break;
|
||||
}
|
||||
|
||||
// Does current segment of cache already have a WeakMap?
|
||||
if ( caches.has( dependant ) ) {
|
||||
// Traverse into nested WeakMap.
|
||||
caches = caches.get( dependant );
|
||||
} else {
|
||||
// Create, set, and traverse into a new one.
|
||||
map = new WeakMap();
|
||||
caches.set( dependant, map );
|
||||
caches = map;
|
||||
}
|
||||
}
|
||||
|
||||
// We use an arbitrary (but consistent) object as key for the last item
|
||||
// in the WeakMap to serve as our running cache.
|
||||
if ( ! caches.has( LEAF_KEY ) ) {
|
||||
cache = createCache();
|
||||
cache.isUniqueByDependants = isUniqueByDependants;
|
||||
caches.set( LEAF_KEY, cache );
|
||||
}
|
||||
|
||||
return caches.get( LEAF_KEY );
|
||||
}
|
||||
|
||||
// Assign cache handler by availability of WeakMap
|
||||
getCache = hasWeakMap ? getWeakMapCache : getRootCache;
|
||||
|
||||
/**
|
||||
* Resets root memoization cache.
|
||||
*/
|
||||
function clear() {
|
||||
rootCache = hasWeakMap ? new WeakMap() : createCache();
|
||||
}
|
||||
|
||||
// eslint-disable-next-line jsdoc/check-param-names
|
||||
/**
|
||||
* The augmented selector call, considering first whether dependants have
|
||||
* changed before passing it to underlying memoize function.
|
||||
*
|
||||
* @param {Object} source Source object for derivation.
|
||||
* @param {...*} extraArgs Additional arguments to pass to selector.
|
||||
*
|
||||
* @return {*} Selector result.
|
||||
*/
|
||||
function callSelector( /* source, ...extraArgs */ ) {
|
||||
var len = arguments.length,
|
||||
cache, node, i, args, dependants;
|
||||
|
||||
// Create copy of arguments (avoid leaking deoptimization).
|
||||
args = new Array( len );
|
||||
for ( i = 0; i < len; i++ ) {
|
||||
args[ i ] = arguments[ i ];
|
||||
}
|
||||
|
||||
dependants = getDependants.apply( null, args );
|
||||
cache = getCache( dependants );
|
||||
|
||||
// If not guaranteed uniqueness by dependants (primitive type or lack
|
||||
// of WeakMap support), shallow compare against last dependants and, if
|
||||
// references have changed, destroy cache to recalculate result.
|
||||
if ( ! cache.isUniqueByDependants ) {
|
||||
if ( cache.lastDependants && ! isShallowEqual( dependants, cache.lastDependants, 0 ) ) {
|
||||
cache.clear();
|
||||
}
|
||||
|
||||
cache.lastDependants = dependants;
|
||||
}
|
||||
|
||||
node = cache.head;
|
||||
while ( node ) {
|
||||
// Check whether node arguments match arguments
|
||||
if ( ! isShallowEqual( node.args, args, 1 ) ) {
|
||||
node = node.next;
|
||||
continue;
|
||||
}
|
||||
|
||||
// At this point we can assume we've found a match
|
||||
|
||||
// Surface matched node to head if not already
|
||||
if ( node !== cache.head ) {
|
||||
// Adjust siblings to point to each other.
|
||||
node.prev.next = node.next;
|
||||
if ( node.next ) {
|
||||
node.next.prev = node.prev;
|
||||
}
|
||||
|
||||
node.next = cache.head;
|
||||
node.prev = null;
|
||||
cache.head.prev = node;
|
||||
cache.head = node;
|
||||
}
|
||||
|
||||
// Return immediately
|
||||
return node.val;
|
||||
}
|
||||
|
||||
// No cached value found. Continue to insertion phase:
|
||||
|
||||
node = {
|
||||
// Generate the result from original function
|
||||
val: selector.apply( null, args ),
|
||||
};
|
||||
|
||||
// Avoid including the source object in the cache.
|
||||
args[ 0 ] = null;
|
||||
node.args = args;
|
||||
|
||||
// Don't need to check whether node is already head, since it would
|
||||
// have been returned above already if it was
|
||||
|
||||
// Shift existing head down list
|
||||
if ( cache.head ) {
|
||||
cache.head.prev = node;
|
||||
node.next = cache.head;
|
||||
}
|
||||
|
||||
cache.head = node;
|
||||
|
||||
return node.val;
|
||||
}
|
||||
|
||||
callSelector.getDependants = getDependants;
|
||||
callSelector.clear = clear;
|
||||
clear();
|
||||
|
||||
return callSelector;
|
||||
});
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 33:
|
||||
|
@ -2361,7 +2361,7 @@ g = (function() {
|
|||
|
||||
try {
|
||||
// This works if eval is allowed (see CSP)
|
||||
g = g || Function("return this")() || (1, eval)("this");
|
||||
g = g || new Function("return this")();
|
||||
} catch (e) {
|
||||
// This works if the window reference is available
|
||||
if (typeof window === "object") g = window;
|
||||
|
|
2
wp-includes/js/dist/core-data.min.js
vendored
2
wp-includes/js/dist/core-data.min.js
vendored
File diff suppressed because one or more lines are too long
6
wp-includes/js/dist/data.js
vendored
6
wp-includes/js/dist/data.js
vendored
|
@ -82,7 +82,7 @@ this["wp"] = this["wp"] || {}; this["wp"]["data"] =
|
|||
/******/
|
||||
/******/
|
||||
/******/ // Load entry module and return exports
|
||||
/******/ return __webpack_require__(__webpack_require__.s = 308);
|
||||
/******/ return __webpack_require__(__webpack_require__.s = 309);
|
||||
/******/ })
|
||||
/************************************************************************/
|
||||
/******/ ({
|
||||
|
@ -444,7 +444,7 @@ function _assertThisInitialized(self) {
|
|||
|
||||
/***/ }),
|
||||
|
||||
/***/ 308:
|
||||
/***/ 309:
|
||||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||||
|
||||
"use strict";
|
||||
|
@ -2132,7 +2132,7 @@ g = (function() {
|
|||
|
||||
try {
|
||||
// This works if eval is allowed (see CSP)
|
||||
g = g || Function("return this")() || (1, eval)("this");
|
||||
g = g || new Function("return this")();
|
||||
} catch (e) {
|
||||
// This works if the window reference is available
|
||||
if (typeof window === "object") g = window;
|
||||
|
|
2
wp-includes/js/dist/data.min.js
vendored
2
wp-includes/js/dist/data.min.js
vendored
File diff suppressed because one or more lines are too long
16
wp-includes/js/dist/date.js
vendored
16
wp-includes/js/dist/date.js
vendored
File diff suppressed because one or more lines are too long
6
wp-includes/js/dist/date.min.js
vendored
6
wp-includes/js/dist/date.min.js
vendored
File diff suppressed because one or more lines are too long
4
wp-includes/js/dist/deprecated.js
vendored
4
wp-includes/js/dist/deprecated.js
vendored
|
@ -82,7 +82,7 @@ this["wp"] = this["wp"] || {}; this["wp"]["deprecated"] =
|
|||
/******/
|
||||
/******/
|
||||
/******/ // Load entry module and return exports
|
||||
/******/ return __webpack_require__(__webpack_require__.s = 267);
|
||||
/******/ return __webpack_require__(__webpack_require__.s = 268);
|
||||
/******/ })
|
||||
/************************************************************************/
|
||||
/******/ ({
|
||||
|
@ -94,7 +94,7 @@ this["wp"] = this["wp"] || {}; this["wp"]["deprecated"] =
|
|||
|
||||
/***/ }),
|
||||
|
||||
/***/ 267:
|
||||
/***/ 268:
|
||||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||||
|
||||
"use strict";
|
||||
|
|
2
wp-includes/js/dist/deprecated.min.js
vendored
2
wp-includes/js/dist/deprecated.min.js
vendored
|
@ -1 +1 @@
|
|||
this.wp=this.wp||{},this.wp.deprecated=function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=267)}({23:function(e,t){!function(){e.exports=this.wp.hooks}()},267:function(e,t,n){"use strict";n.r(t),n.d(t,"logged",function(){return o}),n.d(t,"default",function(){return c});var r=n(23),o=Object.create(null);function c(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.version,c=t.alternative,u=t.plugin,i=t.link,a=t.hint,l=u?" from ".concat(u):"",f=n?"".concat(l," in ").concat(n):"",d=c?" Please use ".concat(c," instead."):"",p=i?" See: ".concat(i):"",s=a?" Note: ".concat(a):"",b="".concat(e," is deprecated and will be removed").concat(f,".").concat(d).concat(p).concat(s);b in o||(Object(r.doAction)("deprecated",e,t,b),console.warn(b),o[b]=!0)}}}).default;
|
||||
this.wp=this.wp||{},this.wp.deprecated=function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=268)}({23:function(e,t){!function(){e.exports=this.wp.hooks}()},268:function(e,t,n){"use strict";n.r(t),n.d(t,"logged",function(){return o}),n.d(t,"default",function(){return c});var r=n(23),o=Object.create(null);function c(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.version,c=t.alternative,u=t.plugin,i=t.link,a=t.hint,l=u?" from ".concat(u):"",f=n?"".concat(l," in ").concat(n):"",d=c?" Please use ".concat(c," instead."):"",p=i?" See: ".concat(i):"",s=a?" Note: ".concat(a):"",b="".concat(e," is deprecated and will be removed").concat(f,".").concat(d).concat(p).concat(s);b in o||(Object(r.doAction)("deprecated",e,t,b),console.warn(b),o[b]=!0)}}}).default;
|
4
wp-includes/js/dist/dom-ready.js
vendored
4
wp-includes/js/dist/dom-ready.js
vendored
|
@ -82,12 +82,12 @@ this["wp"] = this["wp"] || {}; this["wp"]["domReady"] =
|
|||
/******/
|
||||
/******/
|
||||
/******/ // Load entry module and return exports
|
||||
/******/ return __webpack_require__(__webpack_require__.s = 268);
|
||||
/******/ return __webpack_require__(__webpack_require__.s = 269);
|
||||
/******/ })
|
||||
/************************************************************************/
|
||||
/******/ ({
|
||||
|
||||
/***/ 268:
|
||||
/***/ 269:
|
||||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||||
|
||||
"use strict";
|
||||
|
|
2
wp-includes/js/dist/dom-ready.min.js
vendored
2
wp-includes/js/dist/dom-ready.min.js
vendored
|
@ -1 +1 @@
|
|||
this.wp=this.wp||{},this.wp.domReady=function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=268)}({268:function(e,t,n){"use strict";n.r(t);t.default=function(e){if("complete"===document.readyState||"interactive"===document.readyState)return e();document.addEventListener("DOMContentLoaded",e)}}}).default;
|
||||
this.wp=this.wp||{},this.wp.domReady=function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=269)}({269:function(e,t,n){"use strict";n.r(t);t.default=function(e){if("complete"===document.readyState||"interactive"===document.readyState)return e();document.addEventListener("DOMContentLoaded",e)}}}).default;
|
4
wp-includes/js/dist/dom.js
vendored
4
wp-includes/js/dist/dom.js
vendored
|
@ -82,7 +82,7 @@ this["wp"] = this["wp"] || {}; this["wp"]["dom"] =
|
|||
/******/
|
||||
/******/
|
||||
/******/ // Load entry module and return exports
|
||||
/******/ return __webpack_require__(__webpack_require__.s = 323);
|
||||
/******/ return __webpack_require__(__webpack_require__.s = 324);
|
||||
/******/ })
|
||||
/************************************************************************/
|
||||
/******/ ({
|
||||
|
@ -127,7 +127,7 @@ function _toConsumableArray(arr) {
|
|||
|
||||
/***/ }),
|
||||
|
||||
/***/ 323:
|
||||
/***/ 324:
|
||||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||||
|
||||
"use strict";
|
||||
|
|
2
wp-includes/js/dist/dom.min.js
vendored
2
wp-includes/js/dist/dom.min.js
vendored
File diff suppressed because one or more lines are too long
34
wp-includes/js/dist/edit-post.js
vendored
34
wp-includes/js/dist/edit-post.js
vendored
|
@ -82,7 +82,7 @@ this["wp"] = this["wp"] || {}; this["wp"]["editPost"] =
|
|||
/******/
|
||||
/******/
|
||||
/******/ // Load entry module and return exports
|
||||
/******/ return __webpack_require__(__webpack_require__.s = 304);
|
||||
/******/ return __webpack_require__(__webpack_require__.s = 305);
|
||||
/******/ })
|
||||
/************************************************************************/
|
||||
/******/ ({
|
||||
|
@ -218,6 +218,13 @@ function _defineProperty(obj, key, value) {
|
|||
/***/ }),
|
||||
|
||||
/***/ 16:
|
||||
/***/ (function(module, exports) {
|
||||
|
||||
(function() { module.exports = this["wp"]["keycodes"]; }());
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 17:
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*!
|
||||
|
@ -273,13 +280,6 @@ var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*!
|
|||
}());
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 17:
|
||||
/***/ (function(module, exports) {
|
||||
|
||||
(function() { module.exports = this["wp"]["keycodes"]; }());
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 18:
|
||||
|
@ -505,7 +505,7 @@ function _assertThisInitialized(self) {
|
|||
|
||||
/***/ }),
|
||||
|
||||
/***/ 304:
|
||||
/***/ 305:
|
||||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||||
|
||||
"use strict";
|
||||
|
@ -1066,7 +1066,7 @@ function CopyContentMenuItem(_ref) {
|
|||
}))(CopyContentMenuItem));
|
||||
|
||||
// EXTERNAL MODULE: external {"this":["wp","keycodes"]}
|
||||
var external_this_wp_keycodes_ = __webpack_require__(17);
|
||||
var external_this_wp_keycodes_ = __webpack_require__(16);
|
||||
|
||||
// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/plugins/keyboard-shortcuts-help-menu-item/index.js
|
||||
|
||||
|
@ -2036,7 +2036,7 @@ var effects = {
|
|||
window.tinyMCE.triggerSave();
|
||||
}
|
||||
|
||||
var state = store.getState(); // Additional data needed for backwards compatibility.
|
||||
var state = store.getState(); // Additional data needed for backward compatibility.
|
||||
// If we do not provide this data, the post will be overridden with the default values.
|
||||
|
||||
var post = Object(external_this_wp_data_["select"])('core/editor').getCurrentPost(state);
|
||||
|
@ -2251,7 +2251,7 @@ store_store.dispatch({
|
|||
});
|
||||
|
||||
// EXTERNAL MODULE: ./node_modules/classnames/index.js
|
||||
var classnames = __webpack_require__(16);
|
||||
var classnames = __webpack_require__(17);
|
||||
var classnames_default = /*#__PURE__*/__webpack_require__.n(classnames);
|
||||
|
||||
// EXTERNAL MODULE: external {"this":["wp","url"]}
|
||||
|
@ -5743,7 +5743,15 @@ function reinitializeEditor(postType, postId, target, settings, initialEdits) {
|
|||
function initializeEditor(id, postType, postId, settings, initialEdits) {
|
||||
var target = document.getElementById(id);
|
||||
var reboot = reinitializeEditor.bind(null, postType, postId, target, settings, initialEdits);
|
||||
Object(external_this_wp_blockLibrary_["registerCoreBlocks"])();
|
||||
Object(external_this_wp_blockLibrary_["registerCoreBlocks"])(); // Show a console log warning if the browser is not in Standards rendering mode.
|
||||
|
||||
var documentMode = document.compatMode === 'CSS1Compat' ? 'Standards' : 'Quirks';
|
||||
|
||||
if (documentMode !== 'Standards') {
|
||||
// eslint-disable-next-line no-console
|
||||
console.warn("Your browser is using Quirks Mode. \nThis can cause rendering issues such as blocks overlaying meta boxes in the editor. Quirks Mode can be triggered by PHP errors or HTML code appearing before the opening <!DOCTYPE html>. Try checking the raw page source or your site's PHP error log and resolving errors there, removing any HTML before the doctype, or disabling plugins.");
|
||||
}
|
||||
|
||||
Object(external_this_wp_data_["dispatch"])('core/nux').triggerGuide(['core/editor.inserter', 'core/editor.settings', 'core/editor.preview', 'core/editor.publish']);
|
||||
Object(external_this_wp_element_["render"])(Object(external_this_wp_element_["createElement"])(editor, {
|
||||
settings: settings,
|
||||
|
|
4
wp-includes/js/dist/edit-post.min.js
vendored
4
wp-includes/js/dist/edit-post.min.js
vendored
File diff suppressed because one or more lines are too long
219
wp-includes/js/dist/editor.js
vendored
219
wp-includes/js/dist/editor.js
vendored
|
@ -82,7 +82,7 @@ this["wp"] = this["wp"] || {}; this["wp"]["editor"] =
|
|||
/******/
|
||||
/******/
|
||||
/******/ // Load entry module and return exports
|
||||
/******/ return __webpack_require__(__webpack_require__.s = 302);
|
||||
/******/ return __webpack_require__(__webpack_require__.s = 303);
|
||||
/******/ })
|
||||
/************************************************************************/
|
||||
/******/ ([
|
||||
|
@ -290,6 +290,12 @@ function _defineProperty(obj, key, value) {
|
|||
|
||||
/***/ }),
|
||||
/* 16 */
|
||||
/***/ (function(module, exports) {
|
||||
|
||||
(function() { module.exports = this["wp"]["keycodes"]; }());
|
||||
|
||||
/***/ }),
|
||||
/* 17 */
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*!
|
||||
|
@ -345,12 +351,6 @@ var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*!
|
|||
}());
|
||||
|
||||
|
||||
/***/ }),
|
||||
/* 17 */
|
||||
/***/ (function(module, exports) {
|
||||
|
||||
(function() { module.exports = this["wp"]["keycodes"]; }());
|
||||
|
||||
/***/ }),
|
||||
/* 18 */
|
||||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||||
|
@ -2300,7 +2300,7 @@ g = (function() {
|
|||
|
||||
try {
|
||||
// This works if eval is allowed (see CSP)
|
||||
g = g || Function("return this")() || (1, eval)("this");
|
||||
g = g || new Function("return this")();
|
||||
} catch (e) {
|
||||
// This works if the window reference is available
|
||||
if (typeof window === "object") g = window;
|
||||
|
@ -2323,7 +2323,7 @@ module.exports = g;
|
|||
/* 53 */
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
module.exports = __webpack_require__(269);
|
||||
module.exports = __webpack_require__(270);
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
@ -2334,7 +2334,7 @@ module.exports = __webpack_require__(269);
|
|||
"use strict";
|
||||
|
||||
exports.__esModule = true;
|
||||
var TextareaAutosize_1 = __webpack_require__(270);
|
||||
var TextareaAutosize_1 = __webpack_require__(271);
|
||||
exports["default"] = TextareaAutosize_1["default"];
|
||||
|
||||
|
||||
|
@ -3239,7 +3239,7 @@ if (typeof Object.create === 'function') {
|
|||
/* 100 */
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
/* WEBPACK VAR INJECTION */(function(module, global) {var __WEBPACK_AMD_DEFINE_RESULT__;/*! https://mths.be/punycode v1.3.2 by @mathias */
|
||||
/* WEBPACK VAR INJECTION */(function(module, global) {var __WEBPACK_AMD_DEFINE_RESULT__;/*! https://mths.be/punycode v1.4.1 by @mathias */
|
||||
;(function(root) {
|
||||
|
||||
/** Detect free variables */
|
||||
|
@ -3305,7 +3305,7 @@ if (typeof Object.create === 'function') {
|
|||
* @returns {Error} Throws a `RangeError` with the applicable error message.
|
||||
*/
|
||||
function error(type) {
|
||||
throw RangeError(errors[type]);
|
||||
throw new RangeError(errors[type]);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -3452,7 +3452,7 @@ if (typeof Object.create === 'function') {
|
|||
|
||||
/**
|
||||
* Bias adaptation function as per section 3.4 of RFC 3492.
|
||||
* http://tools.ietf.org/html/rfc3492#section-3.4
|
||||
* https://tools.ietf.org/html/rfc3492#section-3.4
|
||||
* @private
|
||||
*/
|
||||
function adapt(delta, numPoints, firstTime) {
|
||||
|
@ -3727,7 +3727,7 @@ if (typeof Object.create === 'function') {
|
|||
* @memberOf punycode
|
||||
* @type String
|
||||
*/
|
||||
'version': '1.3.2',
|
||||
'version': '1.4.1',
|
||||
/**
|
||||
* An object of methods to convert from JavaScript's internal character
|
||||
* representation (UCS-2) to Unicode code points, and back.
|
||||
|
@ -7035,7 +7035,8 @@ var hasOwnProperty = Object.hasOwnProperty || function (obj, key) {
|
|||
/* 266 */,
|
||||
/* 267 */,
|
||||
/* 268 */,
|
||||
/* 269 */
|
||||
/* 269 */,
|
||||
/* 270 */
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
"use strict";
|
||||
|
@ -7200,7 +7201,7 @@ function separateState(state) {
|
|||
}
|
||||
|
||||
/***/ }),
|
||||
/* 270 */
|
||||
/* 271 */
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
"use strict";
|
||||
|
@ -7235,8 +7236,8 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|||
exports.__esModule = true;
|
||||
var React = __webpack_require__(26);
|
||||
var PropTypes = __webpack_require__(29);
|
||||
var autosize = __webpack_require__(271);
|
||||
var _getLineHeight = __webpack_require__(272);
|
||||
var autosize = __webpack_require__(272);
|
||||
var _getLineHeight = __webpack_require__(273);
|
||||
var getLineHeight = _getLineHeight;
|
||||
var UPDATE = 'autosize:update';
|
||||
var DESTROY = 'autosize:destroy';
|
||||
|
@ -7328,7 +7329,7 @@ exports["default"] = TextareaAutosize;
|
|||
|
||||
|
||||
/***/ }),
|
||||
/* 271 */
|
||||
/* 272 */
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*!
|
||||
|
@ -7616,11 +7617,11 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
|
|||
});
|
||||
|
||||
/***/ }),
|
||||
/* 272 */
|
||||
/* 273 */
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
// Load in dependencies
|
||||
var computedStyle = __webpack_require__(273);
|
||||
var computedStyle = __webpack_require__(274);
|
||||
|
||||
/**
|
||||
* Calculate the `line-height` of a given node
|
||||
|
@ -7719,7 +7720,7 @@ module.exports = lineHeight;
|
|||
|
||||
|
||||
/***/ }),
|
||||
/* 273 */
|
||||
/* 274 */
|
||||
/***/ (function(module, exports) {
|
||||
|
||||
// This code has been refactored for 140 bytes
|
||||
|
@ -7752,7 +7753,6 @@ module.exports = computedStyle;
|
|||
|
||||
|
||||
/***/ }),
|
||||
/* 274 */,
|
||||
/* 275 */,
|
||||
/* 276 */,
|
||||
/* 277 */,
|
||||
|
@ -7780,7 +7780,8 @@ module.exports = computedStyle;
|
|||
/* 299 */,
|
||||
/* 300 */,
|
||||
/* 301 */,
|
||||
/* 302 */
|
||||
/* 302 */,
|
||||
/* 303 */
|
||||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||||
|
||||
"use strict";
|
||||
|
@ -8731,7 +8732,7 @@ var reducer_withSaveReusableBlock = function withSaveReusableBlock(reducer) {
|
|||
*/
|
||||
|
||||
|
||||
var reducer_editor = Object(external_lodash_["flow"])([external_this_wp_data_["combineReducers"], reducer_withInnerBlocksRemoveCascade, // Track undo history, starting at editor initialization.
|
||||
var editor = Object(external_lodash_["flow"])([external_this_wp_data_["combineReducers"], reducer_withInnerBlocksRemoveCascade, // Track undo history, starting at editor initialization.
|
||||
with_history({
|
||||
resetTypes: ['SETUP_EDITOR_STATE'],
|
||||
ignoreTypes: ['RECEIVE_BLOCKS', 'RESET_POST', 'UPDATE_POST'],
|
||||
|
@ -9746,7 +9747,7 @@ function reducer_previewLink() {
|
|||
return state;
|
||||
}
|
||||
/* harmony default export */ var store_reducer = (redux_optimist_default()(Object(external_this_wp_data_["combineReducers"])({
|
||||
editor: reducer_editor,
|
||||
editor: editor,
|
||||
initialEdits: initialEdits,
|
||||
currentPost: currentPost,
|
||||
isTyping: reducer_isTyping,
|
||||
|
@ -14068,7 +14069,7 @@ var esm_extends = __webpack_require__(18);
|
|||
var external_this_wp_element_ = __webpack_require__(0);
|
||||
|
||||
// EXTERNAL MODULE: ./node_modules/classnames/index.js
|
||||
var classnames = __webpack_require__(16);
|
||||
var classnames = __webpack_require__(17);
|
||||
var classnames_default = /*#__PURE__*/__webpack_require__.n(classnames);
|
||||
|
||||
// EXTERNAL MODULE: external {"this":["wp","compose"]}
|
||||
|
@ -14877,7 +14878,7 @@ BlockFormatControls.Slot = block_format_controls_Slot;
|
|||
/* harmony default export */ var block_format_controls = (BlockFormatControls);
|
||||
|
||||
// EXTERNAL MODULE: external {"this":["wp","keycodes"]}
|
||||
var external_this_wp_keycodes_ = __webpack_require__(17);
|
||||
var external_this_wp_keycodes_ = __webpack_require__(16);
|
||||
|
||||
// CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/block-navigation/index.js
|
||||
|
||||
|
@ -20529,23 +20530,15 @@ function (_Component) {
|
|||
custom_undo_redo_levels: 1,
|
||||
lists_indent_on_tab: false
|
||||
};
|
||||
|
||||
if (multilineTag === 'li') {
|
||||
settings.plugins.push('lists');
|
||||
}
|
||||
|
||||
external_tinymce_default.a.init(Object(objectSpread["a" /* default */])({}, settings, {
|
||||
target: this.editorNode,
|
||||
setup: function setup(editor) {
|
||||
_this3.editor = editor;
|
||||
|
||||
_this3.props.onSetup(editor); // TinyMCE resets the element content on initialization, even
|
||||
_this3.editor = editor; // TinyMCE resets the element content on initialization, even
|
||||
// when it's already identical to what exists currently. This
|
||||
// behavior clobbers a selection which exists at the time of
|
||||
// initialization, thus breaking writing flow navigation. The
|
||||
// hack here neutralizes setHTML during initialization.
|
||||
|
||||
|
||||
var setHTML;
|
||||
editor.on('preinit', function () {
|
||||
setHTML = editor.dom.setHTML;
|
||||
|
@ -20845,103 +20838,156 @@ function (_Component) {
|
|||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Internal dependencies
|
||||
*/
|
||||
|
||||
|
||||
|
||||
var _window$Node = window.Node,
|
||||
list_edit_TEXT_NODE = _window$Node.TEXT_NODE,
|
||||
ELEMENT_NODE = _window$Node.ELEMENT_NODE;
|
||||
/**
|
||||
* Gets the selected list node, which is the closest list node to the start of
|
||||
* the selection.
|
||||
*
|
||||
* @return {?Element} The selected list node, or undefined if none is selected.
|
||||
*/
|
||||
|
||||
function isListRootSelected(editor) {
|
||||
return !editor.selection || editor.selection.getNode().closest('ol,ul') === editor.getBody();
|
||||
}
|
||||
function getSelectedListNode() {
|
||||
var selection = window.getSelection();
|
||||
|
||||
function isActiveListType(editor, tagName, rootTagName) {
|
||||
if (document.activeElement !== editor.getBody()) {
|
||||
return tagName === rootTagName;
|
||||
}
|
||||
|
||||
var listItem = editor.selection.getNode();
|
||||
var list = listItem.closest('ol,ul');
|
||||
|
||||
if (!list) {
|
||||
if (selection.rangeCount === 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
return list.nodeName.toLowerCase() === tagName;
|
||||
var _selection$getRangeAt = selection.getRangeAt(0),
|
||||
startContainer = _selection$getRangeAt.startContainer;
|
||||
|
||||
if (startContainer.nodeType === list_edit_TEXT_NODE) {
|
||||
startContainer = startContainer.parentNode;
|
||||
}
|
||||
|
||||
if (startContainer.nodeType !== ELEMENT_NODE) {
|
||||
return;
|
||||
}
|
||||
|
||||
var rootNode = startContainer.closest('*[contenteditable]');
|
||||
|
||||
if (!rootNode || !rootNode.contains(startContainer)) {
|
||||
return;
|
||||
}
|
||||
|
||||
return startContainer.closest('ol,ul');
|
||||
}
|
||||
/**
|
||||
* Whether or not the root list is selected.
|
||||
*
|
||||
* @return {boolean} True if the root list or nothing is selected, false if an
|
||||
* inner list is selected.
|
||||
*/
|
||||
|
||||
|
||||
function isListRootSelected() {
|
||||
var listNode = getSelectedListNode(); // Consider the root list selected if nothing is selected.
|
||||
|
||||
return !listNode || listNode.contentEditable === 'true';
|
||||
}
|
||||
/**
|
||||
* Wether or not the selected list has the given tag name.
|
||||
*
|
||||
* @param {string} tagName The tag name the list should have.
|
||||
* @param {string} rootTagName The current root tag name, to compare with in
|
||||
* case nothing is selected.
|
||||
*
|
||||
* @return {boolean} [description]
|
||||
*/
|
||||
|
||||
|
||||
function isActiveListType(tagName, rootTagName) {
|
||||
var listNode = getSelectedListNode();
|
||||
|
||||
if (!listNode) {
|
||||
return tagName === rootTagName;
|
||||
}
|
||||
|
||||
return listNode.nodeName.toLowerCase() === tagName;
|
||||
}
|
||||
|
||||
var list_edit_ListEdit = function ListEdit(_ref) {
|
||||
var editor = _ref.editor,
|
||||
onTagNameChange = _ref.onTagNameChange,
|
||||
var onTagNameChange = _ref.onTagNameChange,
|
||||
tagName = _ref.tagName,
|
||||
onSyncDOM = _ref.onSyncDOM;
|
||||
value = _ref.value,
|
||||
onChange = _ref.onChange;
|
||||
return Object(external_this_wp_element_["createElement"])(external_this_wp_element_["Fragment"], null, Object(external_this_wp_element_["createElement"])(shortcut_RichTextShortcut, {
|
||||
type: "primary",
|
||||
character: "[",
|
||||
onUse: function onUse() {
|
||||
editor.execCommand('Outdent');
|
||||
onSyncDOM();
|
||||
onChange(Object(external_this_wp_richText_["outdentListItems"])(value));
|
||||
}
|
||||
}), Object(external_this_wp_element_["createElement"])(shortcut_RichTextShortcut, {
|
||||
type: "primary",
|
||||
character: "]",
|
||||
onUse: function onUse() {
|
||||
editor.execCommand('Indent');
|
||||
onSyncDOM();
|
||||
onChange(Object(external_this_wp_richText_["indentListItems"])(value, {
|
||||
type: tagName
|
||||
}));
|
||||
}
|
||||
}), Object(external_this_wp_element_["createElement"])(shortcut_RichTextShortcut, {
|
||||
type: "primary",
|
||||
character: "m",
|
||||
onUse: function onUse() {
|
||||
editor.execCommand('Indent');
|
||||
onSyncDOM();
|
||||
onChange(Object(external_this_wp_richText_["indentListItems"])(value, {
|
||||
type: tagName
|
||||
}));
|
||||
}
|
||||
}), Object(external_this_wp_element_["createElement"])(shortcut_RichTextShortcut, {
|
||||
type: "primaryShift",
|
||||
character: "m",
|
||||
onUse: function onUse() {
|
||||
editor.execCommand('Outdent');
|
||||
onSyncDOM();
|
||||
onChange(Object(external_this_wp_richText_["outdentListItems"])(value));
|
||||
}
|
||||
}), Object(external_this_wp_element_["createElement"])(block_format_controls, null, Object(external_this_wp_element_["createElement"])(external_this_wp_components_["Toolbar"], {
|
||||
controls: [{
|
||||
icon: 'editor-ul',
|
||||
title: Object(external_this_wp_i18n_["__"])('Convert to unordered list'),
|
||||
isActive: isActiveListType(editor, 'ul', tagName),
|
||||
isActive: isActiveListType('ul', tagName),
|
||||
onClick: function onClick() {
|
||||
if (isListRootSelected(editor)) {
|
||||
onChange(Object(external_this_wp_richText_["changeListType"])(value, {
|
||||
type: 'ul'
|
||||
}));
|
||||
|
||||
if (isListRootSelected()) {
|
||||
onTagNameChange('ul');
|
||||
} else {
|
||||
editor.execCommand('InsertUnorderedList');
|
||||
onSyncDOM();
|
||||
}
|
||||
}
|
||||
}, {
|
||||
icon: 'editor-ol',
|
||||
title: Object(external_this_wp_i18n_["__"])('Convert to ordered list'),
|
||||
isActive: isActiveListType(editor, 'ol', tagName),
|
||||
isActive: isActiveListType('ol', tagName),
|
||||
onClick: function onClick() {
|
||||
if (isListRootSelected(editor)) {
|
||||
onChange(Object(external_this_wp_richText_["changeListType"])(value, {
|
||||
type: 'ol'
|
||||
}));
|
||||
|
||||
if (isListRootSelected()) {
|
||||
onTagNameChange('ol');
|
||||
} else {
|
||||
editor.execCommand('InsertOrderedList');
|
||||
onSyncDOM();
|
||||
}
|
||||
}
|
||||
}, {
|
||||
icon: 'editor-outdent',
|
||||
title: Object(external_this_wp_i18n_["__"])('Outdent list item'),
|
||||
onClick: function onClick() {
|
||||
editor.execCommand('Outdent');
|
||||
onSyncDOM();
|
||||
onChange(Object(external_this_wp_richText_["outdentListItems"])(value));
|
||||
}
|
||||
}, {
|
||||
icon: 'editor-indent',
|
||||
title: Object(external_this_wp_i18n_["__"])('Indent list item'),
|
||||
onClick: function onClick() {
|
||||
editor.execCommand('Indent');
|
||||
onSyncDOM();
|
||||
onChange(Object(external_this_wp_richText_["indentListItems"])(value, {
|
||||
type: tagName
|
||||
}));
|
||||
}
|
||||
}]
|
||||
})));
|
||||
|
@ -21166,7 +21212,6 @@ function (_Component) {
|
|||
_this.onSplit = _this.props.unstableOnSplit;
|
||||
}
|
||||
|
||||
_this.onSetup = _this.onSetup.bind(Object(assertThisInitialized["a" /* default */])(Object(assertThisInitialized["a" /* default */])(_this)));
|
||||
_this.onFocus = _this.onFocus.bind(Object(assertThisInitialized["a" /* default */])(Object(assertThisInitialized["a" /* default */])(_this)));
|
||||
_this.onBlur = _this.onBlur.bind(Object(assertThisInitialized["a" /* default */])(Object(assertThisInitialized["a" /* default */])(_this)));
|
||||
_this.onChange = _this.onChange.bind(Object(assertThisInitialized["a" /* default */])(Object(assertThisInitialized["a" /* default */])(_this)));
|
||||
|
@ -21215,17 +21260,6 @@ function (_Component) {
|
|||
value: function setRef(node) {
|
||||
this.editableRef = node;
|
||||
}
|
||||
/**
|
||||
* Sets a reference to the TinyMCE editor instance.
|
||||
*
|
||||
* @param {Editor} editor The editor instance as passed by TinyMCE.
|
||||
*/
|
||||
|
||||
}, {
|
||||
key: "onSetup",
|
||||
value: function onSetup(editor) {
|
||||
this.editor = editor;
|
||||
}
|
||||
}, {
|
||||
key: "setFocusedElement",
|
||||
value: function setFocusedElement() {
|
||||
|
@ -21984,13 +22018,11 @@ function (_Component) {
|
|||
return Object(external_this_wp_element_["createElement"])("div", {
|
||||
className: classes,
|
||||
onFocus: this.setFocusedElement
|
||||
}, isSelected && this.editor && this.multilineTag === 'li' && Object(external_this_wp_element_["createElement"])(list_edit_ListEdit, {
|
||||
editor: this.editor,
|
||||
}, isSelected && this.multilineTag === 'li' && Object(external_this_wp_element_["createElement"])(list_edit_ListEdit, {
|
||||
onTagNameChange: onTagNameChange,
|
||||
tagName: Tagname,
|
||||
onSyncDOM: function onSyncDOM() {
|
||||
return _this3.onChange(_this3.createRecord());
|
||||
}
|
||||
value: record,
|
||||
onChange: this.onChange
|
||||
}), isSelected && !inlineToolbar && Object(external_this_wp_element_["createElement"])(block_format_controls, null, Object(external_this_wp_element_["createElement"])(format_toolbar, {
|
||||
controls: formattingControls
|
||||
})), isSelected && inlineToolbar && Object(external_this_wp_element_["createElement"])(external_this_wp_components_["IsolatedEventContainer"], {
|
||||
|
@ -22007,7 +22039,6 @@ function (_Component) {
|
|||
activeId = _ref6.activeId;
|
||||
return Object(external_this_wp_element_["createElement"])(external_this_wp_element_["Fragment"], null, Object(external_this_wp_element_["createElement"])(tinymce_TinyMCE, Object(esm_extends["a" /* default */])({
|
||||
tagName: Tagname,
|
||||
onSetup: _this3.onSetup,
|
||||
style: style,
|
||||
record: record,
|
||||
valueToEditableHTML: _this3.valueToEditableHTML,
|
||||
|
@ -23238,7 +23269,7 @@ function (_Component) {
|
|||
if (this.state.selectedSuggestion !== null) {
|
||||
this.selectLink(post); // Announce a link has been selected when tabbing away from the input field.
|
||||
|
||||
this.props.speak(Object(external_this_wp_i18n_["__"])('Link selected'));
|
||||
this.props.speak(Object(external_this_wp_i18n_["__"])('Link selected.'));
|
||||
}
|
||||
|
||||
break;
|
||||
|
|
8
wp-includes/js/dist/editor.min.js
vendored
8
wp-includes/js/dist/editor.min.js
vendored
File diff suppressed because one or more lines are too long
4
wp-includes/js/dist/element.js
vendored
4
wp-includes/js/dist/element.js
vendored
|
@ -82,7 +82,7 @@ this["wp"] = this["wp"] || {}; this["wp"]["element"] =
|
|||
/******/
|
||||
/******/
|
||||
/******/ // Load entry module and return exports
|
||||
/******/ return __webpack_require__(__webpack_require__.s = 318);
|
||||
/******/ return __webpack_require__(__webpack_require__.s = 319);
|
||||
/******/ })
|
||||
/************************************************************************/
|
||||
/******/ ({
|
||||
|
@ -190,7 +190,7 @@ function _typeof(obj) {
|
|||
|
||||
/***/ }),
|
||||
|
||||
/***/ 318:
|
||||
/***/ 319:
|
||||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||||
|
||||
"use strict";
|
||||
|
|
2
wp-includes/js/dist/element.min.js
vendored
2
wp-includes/js/dist/element.min.js
vendored
File diff suppressed because one or more lines are too long
4
wp-includes/js/dist/escape-html.js
vendored
4
wp-includes/js/dist/escape-html.js
vendored
|
@ -82,12 +82,12 @@ this["wp"] = this["wp"] || {}; this["wp"]["escapeHtml"] =
|
|||
/******/
|
||||
/******/
|
||||
/******/ // Load entry module and return exports
|
||||
/******/ return __webpack_require__(__webpack_require__.s = 274);
|
||||
/******/ return __webpack_require__(__webpack_require__.s = 275);
|
||||
/******/ })
|
||||
/************************************************************************/
|
||||
/******/ ({
|
||||
|
||||
/***/ 274:
|
||||
/***/ 275:
|
||||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||||
|
||||
"use strict";
|
||||
|
|
2
wp-includes/js/dist/escape-html.min.js
vendored
2
wp-includes/js/dist/escape-html.min.js
vendored
|
@ -1 +1 @@
|
|||
this.wp=this.wp||{},this.wp.escapeHtml=function(e){var t={};function n(r){if(t[r])return t[r].exports;var u=t[r]={i:r,l:!1,exports:{}};return e[r].call(u.exports,u,u.exports,n),u.l=!0,u.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var u in e)n.d(r,u,function(t){return e[t]}.bind(null,u));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=274)}({274:function(e,t,n){"use strict";n.r(t),n.d(t,"escapeAmpersand",function(){return u}),n.d(t,"escapeQuotationMark",function(){return o}),n.d(t,"escapeLessThan",function(){return i}),n.d(t,"escapeAttribute",function(){return c}),n.d(t,"escapeHTML",function(){return f}),n.d(t,"isValidAttributeName",function(){return a});var r=/[\u007F-\u009F "'>/="\uFDD0-\uFDEF]/;function u(e){return e.replace(/&(?!([a-z0-9]+|#[0-9]+|#x[a-f0-9]+);)/gi,"&")}function o(e){return e.replace(/"/g,""")}function i(e){return e.replace(/</g,"<")}function c(e){return o(u(e))}function f(e){return i(u(e))}function a(e){return!r.test(e)}}});
|
||||
this.wp=this.wp||{},this.wp.escapeHtml=function(e){var t={};function n(r){if(t[r])return t[r].exports;var u=t[r]={i:r,l:!1,exports:{}};return e[r].call(u.exports,u,u.exports,n),u.l=!0,u.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var u in e)n.d(r,u,function(t){return e[t]}.bind(null,u));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=275)}({275:function(e,t,n){"use strict";n.r(t),n.d(t,"escapeAmpersand",function(){return u}),n.d(t,"escapeQuotationMark",function(){return o}),n.d(t,"escapeLessThan",function(){return i}),n.d(t,"escapeAttribute",function(){return c}),n.d(t,"escapeHTML",function(){return f}),n.d(t,"isValidAttributeName",function(){return a});var r=/[\u007F-\u009F "'>\/="\uFDD0-\uFDEF]/;function u(e){return e.replace(/&(?!([a-z0-9]+|#[0-9]+|#x[a-f0-9]+);)/gi,"&")}function o(e){return e.replace(/"/g,""")}function i(e){return e.replace(/</g,"<")}function c(e){return o(u(e))}function f(e){return i(u(e))}function a(e){return!r.test(e)}}});
|
24
wp-includes/js/dist/format-library.js
vendored
24
wp-includes/js/dist/format-library.js
vendored
|
@ -82,7 +82,7 @@ this["wp"] = this["wp"] || {}; this["wp"]["formatLibrary"] =
|
|||
/******/
|
||||
/******/
|
||||
/******/ // Load entry module and return exports
|
||||
/******/ return __webpack_require__(__webpack_require__.s = 312);
|
||||
/******/ return __webpack_require__(__webpack_require__.s = 313);
|
||||
/******/ })
|
||||
/************************************************************************/
|
||||
/******/ ({
|
||||
|
@ -182,6 +182,13 @@ function _inherits(subClass, superClass) {
|
|||
/***/ }),
|
||||
|
||||
/***/ 16:
|
||||
/***/ (function(module, exports) {
|
||||
|
||||
(function() { module.exports = this["wp"]["keycodes"]; }());
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 17:
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*!
|
||||
|
@ -237,13 +244,6 @@ var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*!
|
|||
}());
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 17:
|
||||
/***/ (function(module, exports) {
|
||||
|
||||
(function() { module.exports = this["wp"]["keycodes"]; }());
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 2:
|
||||
|
@ -356,7 +356,7 @@ function _assertThisInitialized(self) {
|
|||
|
||||
/***/ }),
|
||||
|
||||
/***/ 312:
|
||||
/***/ 313:
|
||||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||||
|
||||
"use strict";
|
||||
|
@ -638,11 +638,11 @@ var italic = {
|
|||
var external_this_wp_url_ = __webpack_require__(24);
|
||||
|
||||
// EXTERNAL MODULE: ./node_modules/classnames/index.js
|
||||
var classnames = __webpack_require__(16);
|
||||
var classnames = __webpack_require__(17);
|
||||
var classnames_default = /*#__PURE__*/__webpack_require__.n(classnames);
|
||||
|
||||
// EXTERNAL MODULE: external {"this":["wp","keycodes"]}
|
||||
var external_this_wp_keycodes_ = __webpack_require__(17);
|
||||
var external_this_wp_keycodes_ = __webpack_require__(16);
|
||||
|
||||
// EXTERNAL MODULE: external {"this":["wp","dom"]}
|
||||
var external_this_wp_dom_ = __webpack_require__(22);
|
||||
|
@ -1061,7 +1061,7 @@ function (_Component) {
|
|||
} else if (isActive) {
|
||||
speak(Object(external_this_wp_i18n_["__"])('Link edited.'), 'assertive');
|
||||
} else {
|
||||
speak(Object(external_this_wp_i18n_["__"])('Link inserted'), 'assertive');
|
||||
speak(Object(external_this_wp_i18n_["__"])('Link inserted.'), 'assertive');
|
||||
}
|
||||
}
|
||||
}, {
|
||||
|
|
4
wp-includes/js/dist/format-library.min.js
vendored
4
wp-includes/js/dist/format-library.min.js
vendored
File diff suppressed because one or more lines are too long
4
wp-includes/js/dist/hooks.js
vendored
4
wp-includes/js/dist/hooks.js
vendored
|
@ -82,12 +82,12 @@ this["wp"] = this["wp"] || {}; this["wp"]["hooks"] =
|
|||
/******/
|
||||
/******/
|
||||
/******/ // Load entry module and return exports
|
||||
/******/ return __webpack_require__(__webpack_require__.s = 311);
|
||||
/******/ return __webpack_require__(__webpack_require__.s = 312);
|
||||
/******/ })
|
||||
/************************************************************************/
|
||||
/******/ ({
|
||||
|
||||
/***/ 311:
|
||||
/***/ 312:
|
||||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||||
|
||||
"use strict";
|
||||
|
|
2
wp-includes/js/dist/hooks.min.js
vendored
2
wp-includes/js/dist/hooks.min.js
vendored
|
@ -1 +1 @@
|
|||
this.wp=this.wp||{},this.wp.hooks=function(n){var r={};function e(t){if(r[t])return r[t].exports;var o=r[t]={i:t,l:!1,exports:{}};return n[t].call(o.exports,o,o.exports,e),o.l=!0,o.exports}return e.m=n,e.c=r,e.d=function(n,r,t){e.o(n,r)||Object.defineProperty(n,r,{enumerable:!0,get:t})},e.r=function(n){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(n,"__esModule",{value:!0})},e.t=function(n,r){if(1&r&&(n=e(n)),8&r)return n;if(4&r&&"object"==typeof n&&n&&n.__esModule)return n;var t=Object.create(null);if(e.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:n}),2&r&&"string"!=typeof n)for(var o in n)e.d(t,o,function(r){return n[r]}.bind(null,o));return t},e.n=function(n){var r=n&&n.__esModule?function(){return n.default}:function(){return n};return e.d(r,"a",r),r},e.o=function(n,r){return Object.prototype.hasOwnProperty.call(n,r)},e.p="",e(e.s=311)}({311:function(n,r,e){"use strict";e.r(r);var t=function(n){return"string"!=typeof n||""===n?(console.error("The namespace must be a non-empty string."),!1):!!/^[a-zA-Z][a-zA-Z0-9_.\-\/]*$/.test(n)||(console.error("The namespace can only contain numbers, letters, dashes, periods, underscores and slashes."),!1)};var o=function(n){return"string"!=typeof n||""===n?(console.error("The hook name must be a non-empty string."),!1):/^__/.test(n)?(console.error("The hook name cannot begin with `__`."),!1):!!/^[a-zA-Z][a-zA-Z0-9_.-]*$/.test(n)||(console.error("The hook name can only contain numbers, letters, dashes, periods and underscores."),!1)};var i=function(n){return function(r,e,i){var u=arguments.length>3&&void 0!==arguments[3]?arguments[3]:10;if(o(r)&&t(e))if("function"==typeof i)if("number"==typeof u){var c={callback:i,priority:u,namespace:e};if(n[r]){var l,a=n[r].handlers;for(l=a.length;l>0&&!(u>=a[l-1].priority);l--);l===a.length?a[l]=c:a.splice(l,0,c),(n.__current||[]).forEach(function(n){n.name===r&&n.currentIndex>=l&&n.currentIndex++})}else n[r]={handlers:[c],runs:0};"hookAdded"!==r&&F("hookAdded",r,e,i,u)}else console.error("If specified, the hook priority must be a number.");else console.error("The hook callback must be a function.")}};var u=function(n,r){return function(e,i){if(o(e)&&(r||t(i))){if(!n[e])return 0;var u=0;if(r)u=n[e].handlers.length,n[e]={runs:n[e].runs,handlers:[]};else for(var c=n[e].handlers,l=function(r){c[r].namespace===i&&(c.splice(r,1),u++,(n.__current||[]).forEach(function(n){n.name===e&&n.currentIndex>=r&&n.currentIndex--}))},a=c.length-1;a>=0;a--)l(a);return"hookRemoved"!==e&&F("hookRemoved",e,i),u}}};var c=function(n){return function(r){return r in n}};var l=function(n,r){return function(e){n[e]||(n[e]={handlers:[],runs:0}),n[e].runs++;for(var t=n[e].handlers,o=arguments.length,i=new Array(o>1?o-1:0),u=1;u<o;u++)i[u-1]=arguments[u];if(!t||!t.length)return r?i[0]:void 0;var c={name:e,currentIndex:0};for(n.__current.push(c);c.currentIndex<t.length;){var l=t[c.currentIndex].callback.apply(null,i);r&&(i[0]=l),c.currentIndex++}return n.__current.pop(),r?i[0]:void 0}};var a=function(n){return function(){return n.__current&&n.__current.length?n.__current[n.__current.length-1].name:null}};var d=function(n){return function(r){return void 0===r?void 0!==n.__current[0]:!!n.__current[0]&&r===n.__current[0].name}};var s=function(n){return function(r){if(o(r))return n[r]&&n[r].runs?n[r].runs:0}};var f=function(){var n=Object.create(null),r=Object.create(null);return n.__current=[],r.__current=[],{addAction:i(n),addFilter:i(r),removeAction:u(n),removeFilter:u(r),hasAction:c(n),hasFilter:c(r),removeAllActions:u(n,!0),removeAllFilters:u(r,!0),doAction:l(n),applyFilters:l(r,!0),currentAction:a(n),currentFilter:a(r),doingAction:d(n),doingFilter:d(r),didAction:s(n),didFilter:s(r),actions:n,filters:r}};e.d(r,"addAction",function(){return p}),e.d(r,"addFilter",function(){return v}),e.d(r,"removeAction",function(){return m}),e.d(r,"removeFilter",function(){return _}),e.d(r,"hasAction",function(){return A}),e.d(r,"hasFilter",function(){return y}),e.d(r,"removeAllActions",function(){return b}),e.d(r,"removeAllFilters",function(){return g}),e.d(r,"doAction",function(){return F}),e.d(r,"applyFilters",function(){return k}),e.d(r,"currentAction",function(){return x}),e.d(r,"currentFilter",function(){return j}),e.d(r,"doingAction",function(){return I}),e.d(r,"doingFilter",function(){return O}),e.d(r,"didAction",function(){return T}),e.d(r,"didFilter",function(){return w}),e.d(r,"actions",function(){return P}),e.d(r,"filters",function(){return S}),e.d(r,"createHooks",function(){return f});var h=f(),p=h.addAction,v=h.addFilter,m=h.removeAction,_=h.removeFilter,A=h.hasAction,y=h.hasFilter,b=h.removeAllActions,g=h.removeAllFilters,F=h.doAction,k=h.applyFilters,x=h.currentAction,j=h.currentFilter,I=h.doingAction,O=h.doingFilter,T=h.didAction,w=h.didFilter,P=h.actions,S=h.filters}});
|
||||
this.wp=this.wp||{},this.wp.hooks=function(n){var r={};function e(t){if(r[t])return r[t].exports;var o=r[t]={i:t,l:!1,exports:{}};return n[t].call(o.exports,o,o.exports,e),o.l=!0,o.exports}return e.m=n,e.c=r,e.d=function(n,r,t){e.o(n,r)||Object.defineProperty(n,r,{enumerable:!0,get:t})},e.r=function(n){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(n,"__esModule",{value:!0})},e.t=function(n,r){if(1&r&&(n=e(n)),8&r)return n;if(4&r&&"object"==typeof n&&n&&n.__esModule)return n;var t=Object.create(null);if(e.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:n}),2&r&&"string"!=typeof n)for(var o in n)e.d(t,o,function(r){return n[r]}.bind(null,o));return t},e.n=function(n){var r=n&&n.__esModule?function(){return n.default}:function(){return n};return e.d(r,"a",r),r},e.o=function(n,r){return Object.prototype.hasOwnProperty.call(n,r)},e.p="",e(e.s=312)}({312:function(n,r,e){"use strict";e.r(r);var t=function(n){return"string"!=typeof n||""===n?(console.error("The namespace must be a non-empty string."),!1):!!/^[a-zA-Z][a-zA-Z0-9_.\-\/]*$/.test(n)||(console.error("The namespace can only contain numbers, letters, dashes, periods, underscores and slashes."),!1)};var o=function(n){return"string"!=typeof n||""===n?(console.error("The hook name must be a non-empty string."),!1):/^__/.test(n)?(console.error("The hook name cannot begin with `__`."),!1):!!/^[a-zA-Z][a-zA-Z0-9_.-]*$/.test(n)||(console.error("The hook name can only contain numbers, letters, dashes, periods and underscores."),!1)};var i=function(n){return function(r,e,i){var u=arguments.length>3&&void 0!==arguments[3]?arguments[3]:10;if(o(r)&&t(e))if("function"==typeof i)if("number"==typeof u){var c={callback:i,priority:u,namespace:e};if(n[r]){var l,a=n[r].handlers;for(l=a.length;l>0&&!(u>=a[l-1].priority);l--);l===a.length?a[l]=c:a.splice(l,0,c),(n.__current||[]).forEach(function(n){n.name===r&&n.currentIndex>=l&&n.currentIndex++})}else n[r]={handlers:[c],runs:0};"hookAdded"!==r&&F("hookAdded",r,e,i,u)}else console.error("If specified, the hook priority must be a number.");else console.error("The hook callback must be a function.")}};var u=function(n,r){return function(e,i){if(o(e)&&(r||t(i))){if(!n[e])return 0;var u=0;if(r)u=n[e].handlers.length,n[e]={runs:n[e].runs,handlers:[]};else for(var c=n[e].handlers,l=function(r){c[r].namespace===i&&(c.splice(r,1),u++,(n.__current||[]).forEach(function(n){n.name===e&&n.currentIndex>=r&&n.currentIndex--}))},a=c.length-1;a>=0;a--)l(a);return"hookRemoved"!==e&&F("hookRemoved",e,i),u}}};var c=function(n){return function(r){return r in n}};var l=function(n,r){return function(e){n[e]||(n[e]={handlers:[],runs:0}),n[e].runs++;for(var t=n[e].handlers,o=arguments.length,i=new Array(o>1?o-1:0),u=1;u<o;u++)i[u-1]=arguments[u];if(!t||!t.length)return r?i[0]:void 0;var c={name:e,currentIndex:0};for(n.__current.push(c);c.currentIndex<t.length;){var l=t[c.currentIndex].callback.apply(null,i);r&&(i[0]=l),c.currentIndex++}return n.__current.pop(),r?i[0]:void 0}};var a=function(n){return function(){return n.__current&&n.__current.length?n.__current[n.__current.length-1].name:null}};var d=function(n){return function(r){return void 0===r?void 0!==n.__current[0]:!!n.__current[0]&&r===n.__current[0].name}};var s=function(n){return function(r){if(o(r))return n[r]&&n[r].runs?n[r].runs:0}};var f=function(){var n=Object.create(null),r=Object.create(null);return n.__current=[],r.__current=[],{addAction:i(n),addFilter:i(r),removeAction:u(n),removeFilter:u(r),hasAction:c(n),hasFilter:c(r),removeAllActions:u(n,!0),removeAllFilters:u(r,!0),doAction:l(n),applyFilters:l(r,!0),currentAction:a(n),currentFilter:a(r),doingAction:d(n),doingFilter:d(r),didAction:s(n),didFilter:s(r),actions:n,filters:r}};e.d(r,"addAction",function(){return p}),e.d(r,"addFilter",function(){return v}),e.d(r,"removeAction",function(){return m}),e.d(r,"removeFilter",function(){return _}),e.d(r,"hasAction",function(){return A}),e.d(r,"hasFilter",function(){return y}),e.d(r,"removeAllActions",function(){return b}),e.d(r,"removeAllFilters",function(){return g}),e.d(r,"doAction",function(){return F}),e.d(r,"applyFilters",function(){return k}),e.d(r,"currentAction",function(){return x}),e.d(r,"currentFilter",function(){return j}),e.d(r,"doingAction",function(){return I}),e.d(r,"doingFilter",function(){return O}),e.d(r,"didAction",function(){return T}),e.d(r,"didFilter",function(){return w}),e.d(r,"actions",function(){return P}),e.d(r,"filters",function(){return S}),e.d(r,"createHooks",function(){return f});var h=f(),p=h.addAction,v=h.addFilter,m=h.removeAction,_=h.removeFilter,A=h.hasAction,y=h.hasFilter,b=h.removeAllActions,g=h.removeAllFilters,F=h.doAction,k=h.applyFilters,x=h.currentAction,j=h.currentFilter,I=h.doingAction,O=h.doingFilter,T=h.didAction,w=h.didFilter,P=h.actions,S=h.filters}});
|
4
wp-includes/js/dist/html-entities.js
vendored
4
wp-includes/js/dist/html-entities.js
vendored
|
@ -82,12 +82,12 @@ this["wp"] = this["wp"] || {}; this["wp"]["htmlEntities"] =
|
|||
/******/
|
||||
/******/
|
||||
/******/ // Load entry module and return exports
|
||||
/******/ return __webpack_require__(__webpack_require__.s = 275);
|
||||
/******/ return __webpack_require__(__webpack_require__.s = 276);
|
||||
/******/ })
|
||||
/************************************************************************/
|
||||
/******/ ({
|
||||
|
||||
/***/ 275:
|
||||
/***/ 276:
|
||||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||||
|
||||
"use strict";
|
||||
|
|
2
wp-includes/js/dist/html-entities.min.js
vendored
2
wp-includes/js/dist/html-entities.min.js
vendored
|
@ -1 +1 @@
|
|||
this.wp=this.wp||{},this.wp.htmlEntities=function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=275)}({275:function(e,t,n){"use strict";var r;function o(e){if("string"!=typeof e||-1===e.indexOf("&"))return e;void 0===r&&(r=document.implementation&&document.implementation.createHTMLDocument?document.implementation.createHTMLDocument("").createElement("textarea"):document.createElement("textarea")),r.innerHTML=e;var t=r.textContent;return r.innerHTML="",t}n.r(t),n.d(t,"decodeEntities",function(){return o})}});
|
||||
this.wp=this.wp||{},this.wp.htmlEntities=function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=276)}({276:function(e,t,n){"use strict";var r;function o(e){if("string"!=typeof e||-1===e.indexOf("&"))return e;void 0===r&&(r=document.implementation&&document.implementation.createHTMLDocument?document.implementation.createHTMLDocument("").createElement("textarea"):document.createElement("textarea")),r.innerHTML=e;var t=r.textContent;return r.innerHTML="",t}n.r(t),n.d(t,"decodeEntities",function(){return o})}});
|
81
wp-includes/js/dist/i18n.js
vendored
81
wp-includes/js/dist/i18n.js
vendored
|
@ -82,7 +82,7 @@ this["wp"] = this["wp"] || {}; this["wp"]["i18n"] =
|
|||
/******/
|
||||
/******/
|
||||
/******/ // Load entry module and return exports
|
||||
/******/ return __webpack_require__(__webpack_require__.s = 319);
|
||||
/******/ return __webpack_require__(__webpack_require__.s = 320);
|
||||
/******/ })
|
||||
/************************************************************************/
|
||||
/******/ ({
|
||||
|
@ -106,11 +106,11 @@ var __WEBPACK_AMD_DEFINE_RESULT__;/* global window, exports, define */
|
|||
not_json: /[^j]/,
|
||||
text: /^[^\x25]+/,
|
||||
modulo: /^\x25{2}/,
|
||||
placeholder: /^\x25(?:([1-9]\d*)\$|\(([^\)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-gijostTuvxX])/,
|
||||
placeholder: /^\x25(?:([1-9]\d*)\$|\(([^)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-gijostTuvxX])/,
|
||||
key: /^([a-z_][a-z_\d]*)/i,
|
||||
key_access: /^\.([a-z_][a-z_\d]*)/i,
|
||||
index_access: /^\[(\d+)\]/,
|
||||
sign: /^[\+\-]/
|
||||
sign: /^[+-]/
|
||||
}
|
||||
|
||||
function sprintf(key) {
|
||||
|
@ -123,42 +123,42 @@ var __WEBPACK_AMD_DEFINE_RESULT__;/* global window, exports, define */
|
|||
}
|
||||
|
||||
function sprintf_format(parse_tree, argv) {
|
||||
var cursor = 1, tree_length = parse_tree.length, arg, output = '', i, k, match, pad, pad_character, pad_length, is_positive, sign
|
||||
var cursor = 1, tree_length = parse_tree.length, arg, output = '', i, k, ph, pad, pad_character, pad_length, is_positive, sign
|
||||
for (i = 0; i < tree_length; i++) {
|
||||
if (typeof parse_tree[i] === 'string') {
|
||||
output += parse_tree[i]
|
||||
}
|
||||
else if (Array.isArray(parse_tree[i])) {
|
||||
match = parse_tree[i] // convenience purposes only
|
||||
if (match[2]) { // keyword argument
|
||||
else if (typeof parse_tree[i] === 'object') {
|
||||
ph = parse_tree[i] // convenience purposes only
|
||||
if (ph.keys) { // keyword argument
|
||||
arg = argv[cursor]
|
||||
for (k = 0; k < match[2].length; k++) {
|
||||
if (!arg.hasOwnProperty(match[2][k])) {
|
||||
throw new Error(sprintf('[sprintf] property "%s" does not exist', match[2][k]))
|
||||
for (k = 0; k < ph.keys.length; k++) {
|
||||
if (arg == undefined) {
|
||||
throw new Error(sprintf('[sprintf] Cannot access property "%s" of undefined value "%s"', ph.keys[k], ph.keys[k-1]))
|
||||
}
|
||||
arg = arg[match[2][k]]
|
||||
arg = arg[ph.keys[k]]
|
||||
}
|
||||
}
|
||||
else if (match[1]) { // positional argument (explicit)
|
||||
arg = argv[match[1]]
|
||||
else if (ph.param_no) { // positional argument (explicit)
|
||||
arg = argv[ph.param_no]
|
||||
}
|
||||
else { // positional argument (implicit)
|
||||
arg = argv[cursor++]
|
||||
}
|
||||
|
||||
if (re.not_type.test(match[8]) && re.not_primitive.test(match[8]) && arg instanceof Function) {
|
||||
if (re.not_type.test(ph.type) && re.not_primitive.test(ph.type) && arg instanceof Function) {
|
||||
arg = arg()
|
||||
}
|
||||
|
||||
if (re.numeric_arg.test(match[8]) && (typeof arg !== 'number' && isNaN(arg))) {
|
||||
if (re.numeric_arg.test(ph.type) && (typeof arg !== 'number' && isNaN(arg))) {
|
||||
throw new TypeError(sprintf('[sprintf] expecting number but found %T', arg))
|
||||
}
|
||||
|
||||
if (re.number.test(match[8])) {
|
||||
if (re.number.test(ph.type)) {
|
||||
is_positive = arg >= 0
|
||||
}
|
||||
|
||||
switch (match[8]) {
|
||||
switch (ph.type) {
|
||||
case 'b':
|
||||
arg = parseInt(arg, 10).toString(2)
|
||||
break
|
||||
|
@ -170,38 +170,38 @@ var __WEBPACK_AMD_DEFINE_RESULT__;/* global window, exports, define */
|
|||
arg = parseInt(arg, 10)
|
||||
break
|
||||
case 'j':
|
||||
arg = JSON.stringify(arg, null, match[6] ? parseInt(match[6]) : 0)
|
||||
arg = JSON.stringify(arg, null, ph.width ? parseInt(ph.width) : 0)
|
||||
break
|
||||
case 'e':
|
||||
arg = match[7] ? parseFloat(arg).toExponential(match[7]) : parseFloat(arg).toExponential()
|
||||
arg = ph.precision ? parseFloat(arg).toExponential(ph.precision) : parseFloat(arg).toExponential()
|
||||
break
|
||||
case 'f':
|
||||
arg = match[7] ? parseFloat(arg).toFixed(match[7]) : parseFloat(arg)
|
||||
arg = ph.precision ? parseFloat(arg).toFixed(ph.precision) : parseFloat(arg)
|
||||
break
|
||||
case 'g':
|
||||
arg = match[7] ? String(Number(arg.toPrecision(match[7]))) : parseFloat(arg)
|
||||
arg = ph.precision ? String(Number(arg.toPrecision(ph.precision))) : parseFloat(arg)
|
||||
break
|
||||
case 'o':
|
||||
arg = (parseInt(arg, 10) >>> 0).toString(8)
|
||||
break
|
||||
case 's':
|
||||
arg = String(arg)
|
||||
arg = (match[7] ? arg.substring(0, match[7]) : arg)
|
||||
arg = (ph.precision ? arg.substring(0, ph.precision) : arg)
|
||||
break
|
||||
case 't':
|
||||
arg = String(!!arg)
|
||||
arg = (match[7] ? arg.substring(0, match[7]) : arg)
|
||||
arg = (ph.precision ? arg.substring(0, ph.precision) : arg)
|
||||
break
|
||||
case 'T':
|
||||
arg = Object.prototype.toString.call(arg).slice(8, -1).toLowerCase()
|
||||
arg = (match[7] ? arg.substring(0, match[7]) : arg)
|
||||
arg = (ph.precision ? arg.substring(0, ph.precision) : arg)
|
||||
break
|
||||
case 'u':
|
||||
arg = parseInt(arg, 10) >>> 0
|
||||
break
|
||||
case 'v':
|
||||
arg = arg.valueOf()
|
||||
arg = (match[7] ? arg.substring(0, match[7]) : arg)
|
||||
arg = (ph.precision ? arg.substring(0, ph.precision) : arg)
|
||||
break
|
||||
case 'x':
|
||||
arg = (parseInt(arg, 10) >>> 0).toString(16)
|
||||
|
@ -210,21 +210,21 @@ var __WEBPACK_AMD_DEFINE_RESULT__;/* global window, exports, define */
|
|||
arg = (parseInt(arg, 10) >>> 0).toString(16).toUpperCase()
|
||||
break
|
||||
}
|
||||
if (re.json.test(match[8])) {
|
||||
if (re.json.test(ph.type)) {
|
||||
output += arg
|
||||
}
|
||||
else {
|
||||
if (re.number.test(match[8]) && (!is_positive || match[3])) {
|
||||
if (re.number.test(ph.type) && (!is_positive || ph.sign)) {
|
||||
sign = is_positive ? '+' : '-'
|
||||
arg = arg.toString().replace(re.sign, '')
|
||||
}
|
||||
else {
|
||||
sign = ''
|
||||
}
|
||||
pad_character = match[4] ? match[4] === '0' ? '0' : match[4].charAt(1) : ' '
|
||||
pad_length = match[6] - (sign + arg).length
|
||||
pad = match[6] ? (pad_length > 0 ? pad_character.repeat(pad_length) : '') : ''
|
||||
output += match[5] ? sign + arg + pad : (pad_character === '0' ? sign + pad + arg : pad + sign + arg)
|
||||
pad_character = ph.pad_char ? ph.pad_char === '0' ? '0' : ph.pad_char.charAt(1) : ' '
|
||||
pad_length = ph.width - (sign + arg).length
|
||||
pad = ph.width ? (pad_length > 0 ? pad_character.repeat(pad_length) : '') : ''
|
||||
output += ph.align ? sign + arg + pad : (pad_character === '0' ? sign + pad + arg : pad + sign + arg)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -275,7 +275,20 @@ var __WEBPACK_AMD_DEFINE_RESULT__;/* global window, exports, define */
|
|||
if (arg_names === 3) {
|
||||
throw new Error('[sprintf] mixing positional and named placeholders is not (yet) supported')
|
||||
}
|
||||
parse_tree.push(match)
|
||||
|
||||
parse_tree.push(
|
||||
{
|
||||
placeholder: match[0],
|
||||
param_no: match[1],
|
||||
keys: match[2],
|
||||
sign: match[3],
|
||||
pad_char: match[4],
|
||||
align: match[5],
|
||||
width: match[6],
|
||||
precision: match[7],
|
||||
type: match[8]
|
||||
}
|
||||
)
|
||||
}
|
||||
else {
|
||||
throw new SyntaxError('[sprintf] unexpected placeholder')
|
||||
|
@ -308,7 +321,7 @@ var __WEBPACK_AMD_DEFINE_RESULT__;/* global window, exports, define */
|
|||
}
|
||||
}
|
||||
/* eslint-enable quote-props */
|
||||
}()
|
||||
}(); // eslint-disable-line
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
@ -335,7 +348,7 @@ function _defineProperty(obj, key, value) {
|
|||
|
||||
/***/ }),
|
||||
|
||||
/***/ 319:
|
||||
/***/ 320:
|
||||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||||
|
||||
"use strict";
|
||||
|
|
2
wp-includes/js/dist/i18n.min.js
vendored
2
wp-includes/js/dist/i18n.min.js
vendored
File diff suppressed because one or more lines are too long
12
wp-includes/js/dist/is-shallow-equal.js
vendored
12
wp-includes/js/dist/is-shallow-equal.js
vendored
|
@ -82,12 +82,12 @@ this["wp"] = this["wp"] || {}; this["wp"]["isShallowEqual"] =
|
|||
/******/
|
||||
/******/
|
||||
/******/ // Load entry module and return exports
|
||||
/******/ return __webpack_require__(__webpack_require__.s = 276);
|
||||
/******/ return __webpack_require__(__webpack_require__.s = 277);
|
||||
/******/ })
|
||||
/************************************************************************/
|
||||
/******/ ({
|
||||
|
||||
/***/ 276:
|
||||
/***/ 277:
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
"use strict";
|
||||
|
@ -96,8 +96,8 @@ this["wp"] = this["wp"] || {}; this["wp"]["isShallowEqual"] =
|
|||
/**
|
||||
* Internal dependencies;
|
||||
*/
|
||||
var isShallowEqualObjects = __webpack_require__( 277 );
|
||||
var isShallowEqualArrays = __webpack_require__( 278 );
|
||||
var isShallowEqualObjects = __webpack_require__( 278 );
|
||||
var isShallowEqualArrays = __webpack_require__( 279 );
|
||||
|
||||
var isArray = Array.isArray;
|
||||
|
||||
|
@ -127,7 +127,7 @@ module.exports = isShallowEqual;
|
|||
|
||||
/***/ }),
|
||||
|
||||
/***/ 277:
|
||||
/***/ 278:
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
"use strict";
|
||||
|
@ -176,7 +176,7 @@ module.exports = isShallowEqualObjects;
|
|||
|
||||
/***/ }),
|
||||
|
||||
/***/ 278:
|
||||
/***/ 279:
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
"use strict";
|
||||
|
|
2
wp-includes/js/dist/is-shallow-equal.min.js
vendored
2
wp-includes/js/dist/is-shallow-equal.min.js
vendored
|
@ -1 +1 @@
|
|||
this.wp=this.wp||{},this.wp.isShallowEqual=function(t){var r={};function e(n){if(r[n])return r[n].exports;var u=r[n]={i:n,l:!1,exports:{}};return t[n].call(u.exports,u,u.exports,e),u.l=!0,u.exports}return e.m=t,e.c=r,e.d=function(t,r,n){e.o(t,r)||Object.defineProperty(t,r,{enumerable:!0,get:n})},e.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},e.t=function(t,r){if(1&r&&(t=e(t)),8&r)return t;if(4&r&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(e.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&r&&"string"!=typeof t)for(var u in t)e.d(n,u,function(r){return t[r]}.bind(null,u));return n},e.n=function(t){var r=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(r,"a",r),r},e.o=function(t,r){return Object.prototype.hasOwnProperty.call(t,r)},e.p="",e(e.s=276)}({276:function(t,r,e){"use strict";var n=e(277),u=e(278),o=Array.isArray;t.exports=function(t,r){if(t&&r){if(t.constructor===Object&&r.constructor===Object)return n(t,r);if(o(t)&&o(r))return u(t,r)}return t===r}},277:function(t,r,e){"use strict";var n=Object.keys;t.exports=function(t,r){var e,u,o,i;if(t===r)return!0;if(e=n(t),u=n(r),e.length!==u.length)return!1;for(o=0;o<e.length;){if(t[i=e[o]]!==r[i])return!1;o++}return!0}},278:function(t,r,e){"use strict";t.exports=function(t,r){var e;if(t===r)return!0;if(t.length!==r.length)return!1;for(e=0;e<t.length;e++)if(t[e]!==r[e])return!1;return!0}}});
|
||||
this.wp=this.wp||{},this.wp.isShallowEqual=function(t){var r={};function e(n){if(r[n])return r[n].exports;var u=r[n]={i:n,l:!1,exports:{}};return t[n].call(u.exports,u,u.exports,e),u.l=!0,u.exports}return e.m=t,e.c=r,e.d=function(t,r,n){e.o(t,r)||Object.defineProperty(t,r,{enumerable:!0,get:n})},e.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},e.t=function(t,r){if(1&r&&(t=e(t)),8&r)return t;if(4&r&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(e.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&r&&"string"!=typeof t)for(var u in t)e.d(n,u,function(r){return t[r]}.bind(null,u));return n},e.n=function(t){var r=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(r,"a",r),r},e.o=function(t,r){return Object.prototype.hasOwnProperty.call(t,r)},e.p="",e(e.s=277)}({277:function(t,r,e){"use strict";var n=e(278),u=e(279),o=Array.isArray;t.exports=function(t,r){if(t&&r){if(t.constructor===Object&&r.constructor===Object)return n(t,r);if(o(t)&&o(r))return u(t,r)}return t===r}},278:function(t,r,e){"use strict";var n=Object.keys;t.exports=function(t,r){var e,u,o,i;if(t===r)return!0;if(e=n(t),u=n(r),e.length!==u.length)return!1;for(o=0;o<e.length;){if(t[i=e[o]]!==r[i])return!1;o++}return!0}},279:function(t,r,e){"use strict";t.exports=function(t,r){var e;if(t===r)return!0;if(t.length!==r.length)return!1;for(e=0;e<t.length;e++)if(t[e]!==r[e])return!1;return!0}}});
|
4
wp-includes/js/dist/keycodes.js
vendored
4
wp-includes/js/dist/keycodes.js
vendored
|
@ -82,7 +82,7 @@ this["wp"] = this["wp"] || {}; this["wp"]["keycodes"] =
|
|||
/******/
|
||||
/******/
|
||||
/******/ // Load entry module and return exports
|
||||
/******/ return __webpack_require__(__webpack_require__.s = 325);
|
||||
/******/ return __webpack_require__(__webpack_require__.s = 326);
|
||||
/******/ })
|
||||
/************************************************************************/
|
||||
/******/ ({
|
||||
|
@ -156,7 +156,7 @@ function _toConsumableArray(arr) {
|
|||
|
||||
/***/ }),
|
||||
|
||||
/***/ 325:
|
||||
/***/ 326:
|
||||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||||
|
||||
"use strict";
|
||||
|
|
2
wp-includes/js/dist/keycodes.min.js
vendored
2
wp-includes/js/dist/keycodes.min.js
vendored
|
@ -1 +1 @@
|
|||
this.wp=this.wp||{},this.wp.keycodes=function(t){var n={};function r(e){if(n[e])return n[e].exports;var u=n[e]={i:e,l:!1,exports:{}};return t[e].call(u.exports,u,u.exports,r),u.l=!0,u.exports}return r.m=t,r.c=n,r.d=function(t,n,e){r.o(t,n)||Object.defineProperty(t,n,{enumerable:!0,get:e})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,n){if(1&n&&(t=r(t)),8&n)return t;if(4&n&&"object"==typeof t&&t&&t.__esModule)return t;var e=Object.create(null);if(r.r(e),Object.defineProperty(e,"default",{enumerable:!0,value:t}),2&n&&"string"!=typeof t)for(var u in t)r.d(e,u,function(n){return t[n]}.bind(null,u));return e},r.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(n,"a",n),n},r.o=function(t,n){return Object.prototype.hasOwnProperty.call(t,n)},r.p="",r(r.s=325)}({1:function(t,n){!function(){t.exports=this.wp.i18n}()},15:function(t,n,r){"use strict";function e(t,n,r){return n in t?Object.defineProperty(t,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[n]=r,t}r.d(n,"a",function(){return e})},19:function(t,n,r){"use strict";var e=r(33);function u(t){return function(t){if(Array.isArray(t)){for(var n=0,r=new Array(t.length);n<t.length;n++)r[n]=t[n];return r}}(t)||Object(e.a)(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}r.d(n,"a",function(){return u})},2:function(t,n){!function(){t.exports=this.lodash}()},325:function(t,n,r){"use strict";r.r(n);var e=r(15),u=r(19),c=r(2),o=r(1);function i(){var t=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:window).navigator.platform;return-1!==t.indexOf("Mac")||Object(c.includes)(["iPad","iPhone"],t)}r.d(n,"BACKSPACE",function(){return a}),r.d(n,"TAB",function(){return f}),r.d(n,"ENTER",function(){return l}),r.d(n,"ESCAPE",function(){return d}),r.d(n,"SPACE",function(){return b}),r.d(n,"LEFT",function(){return s}),r.d(n,"UP",function(){return j}),r.d(n,"RIGHT",function(){return O}),r.d(n,"DOWN",function(){return p}),r.d(n,"DELETE",function(){return y}),r.d(n,"F10",function(){return v}),r.d(n,"ALT",function(){return h}),r.d(n,"CTRL",function(){return m}),r.d(n,"COMMAND",function(){return g}),r.d(n,"SHIFT",function(){return S}),r.d(n,"modifiers",function(){return A}),r.d(n,"rawShortcut",function(){return w}),r.d(n,"displayShortcutList",function(){return C}),r.d(n,"displayShortcut",function(){return P}),r.d(n,"shortcutAriaLabel",function(){return E}),r.d(n,"isKeyboardEvent",function(){return _});var a=8,f=9,l=13,d=27,b=32,s=37,j=38,O=39,p=40,y=46,v=121,h="alt",m="ctrl",g="meta",S="shift",A={primary:function(t){return t()?[g]:[m]},primaryShift:function(t){return t()?[S,g]:[m,S]},primaryAlt:function(t){return t()?[h,g]:[m,h]},secondary:function(t){return t()?[S,h,g]:[m,S,h]},access:function(t){return t()?[m,h]:[S,h]},ctrl:function(){return[m]},alt:function(){return[h]},ctrlShift:function(){return[m,S]},shift:function(){return[S]},shiftAlt:function(){return[S,h]}},w=Object(c.mapValues)(A,function(t){return function(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i;return Object(u.a)(t(r)).concat([n.toLowerCase()]).join("+")}}),C=Object(c.mapValues)(A,function(t){return function(n){var r,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i,a=o(),f=(r={},Object(e.a)(r,h,a?"⌥":"Alt"),Object(e.a)(r,m,a?"^":"Ctrl"),Object(e.a)(r,g,"⌘"),Object(e.a)(r,S,a?"⇧":"Shift"),r),l=t(o).reduce(function(t,n){var r=Object(c.get)(f,n,n);return a?Object(u.a)(t).concat([r]):Object(u.a)(t).concat([r,"+"])},[]),d=Object(c.capitalize)(n);return Object(u.a)(l).concat([d])}}),P=Object(c.mapValues)(C,function(t){return function(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i;return t(n,r).join("")}}),E=Object(c.mapValues)(A,function(t){return function(n){var r,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i,f=a(),l=(r={},Object(e.a)(r,S,"Shift"),Object(e.a)(r,g,f?"Command":"Control"),Object(e.a)(r,m,"Control"),Object(e.a)(r,h,f?"Option":"Alt"),Object(e.a)(r,",",Object(o.__)("Comma")),Object(e.a)(r,".",Object(o.__)("Period")),Object(e.a)(r,"`",Object(o.__)("Backtick")),r);return Object(u.a)(t(a)).concat([n]).map(function(t){return Object(c.capitalize)(Object(c.get)(l,t,t))}).join(f?" ":" + ")}}),_=Object(c.mapValues)(A,function(t){return function(n,r){var e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:i,u=t(e);return!!u.every(function(t){return n["".concat(t,"Key")]})&&(r?n.key===r:Object(c.includes)(u,n.key.toLowerCase()))}})},33:function(t,n,r){"use strict";function e(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)}r.d(n,"a",function(){return e})}});
|
||||
this.wp=this.wp||{},this.wp.keycodes=function(t){var n={};function r(e){if(n[e])return n[e].exports;var u=n[e]={i:e,l:!1,exports:{}};return t[e].call(u.exports,u,u.exports,r),u.l=!0,u.exports}return r.m=t,r.c=n,r.d=function(t,n,e){r.o(t,n)||Object.defineProperty(t,n,{enumerable:!0,get:e})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,n){if(1&n&&(t=r(t)),8&n)return t;if(4&n&&"object"==typeof t&&t&&t.__esModule)return t;var e=Object.create(null);if(r.r(e),Object.defineProperty(e,"default",{enumerable:!0,value:t}),2&n&&"string"!=typeof t)for(var u in t)r.d(e,u,function(n){return t[n]}.bind(null,u));return e},r.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(n,"a",n),n},r.o=function(t,n){return Object.prototype.hasOwnProperty.call(t,n)},r.p="",r(r.s=326)}({1:function(t,n){!function(){t.exports=this.wp.i18n}()},15:function(t,n,r){"use strict";function e(t,n,r){return n in t?Object.defineProperty(t,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[n]=r,t}r.d(n,"a",function(){return e})},19:function(t,n,r){"use strict";var e=r(33);function u(t){return function(t){if(Array.isArray(t)){for(var n=0,r=new Array(t.length);n<t.length;n++)r[n]=t[n];return r}}(t)||Object(e.a)(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}r.d(n,"a",function(){return u})},2:function(t,n){!function(){t.exports=this.lodash}()},326:function(t,n,r){"use strict";r.r(n);var e=r(15),u=r(19),c=r(2),o=r(1);function i(){var t=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:window).navigator.platform;return-1!==t.indexOf("Mac")||Object(c.includes)(["iPad","iPhone"],t)}r.d(n,"BACKSPACE",function(){return a}),r.d(n,"TAB",function(){return f}),r.d(n,"ENTER",function(){return l}),r.d(n,"ESCAPE",function(){return d}),r.d(n,"SPACE",function(){return b}),r.d(n,"LEFT",function(){return s}),r.d(n,"UP",function(){return j}),r.d(n,"RIGHT",function(){return O}),r.d(n,"DOWN",function(){return p}),r.d(n,"DELETE",function(){return y}),r.d(n,"F10",function(){return v}),r.d(n,"ALT",function(){return h}),r.d(n,"CTRL",function(){return m}),r.d(n,"COMMAND",function(){return g}),r.d(n,"SHIFT",function(){return S}),r.d(n,"modifiers",function(){return A}),r.d(n,"rawShortcut",function(){return w}),r.d(n,"displayShortcutList",function(){return C}),r.d(n,"displayShortcut",function(){return P}),r.d(n,"shortcutAriaLabel",function(){return E}),r.d(n,"isKeyboardEvent",function(){return _});var a=8,f=9,l=13,d=27,b=32,s=37,j=38,O=39,p=40,y=46,v=121,h="alt",m="ctrl",g="meta",S="shift",A={primary:function(t){return t()?[g]:[m]},primaryShift:function(t){return t()?[S,g]:[m,S]},primaryAlt:function(t){return t()?[h,g]:[m,h]},secondary:function(t){return t()?[S,h,g]:[m,S,h]},access:function(t){return t()?[m,h]:[S,h]},ctrl:function(){return[m]},alt:function(){return[h]},ctrlShift:function(){return[m,S]},shift:function(){return[S]},shiftAlt:function(){return[S,h]}},w=Object(c.mapValues)(A,function(t){return function(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i;return Object(u.a)(t(r)).concat([n.toLowerCase()]).join("+")}}),C=Object(c.mapValues)(A,function(t){return function(n){var r,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i,a=o(),f=(r={},Object(e.a)(r,h,a?"⌥":"Alt"),Object(e.a)(r,m,a?"^":"Ctrl"),Object(e.a)(r,g,"⌘"),Object(e.a)(r,S,a?"⇧":"Shift"),r),l=t(o).reduce(function(t,n){var r=Object(c.get)(f,n,n);return a?Object(u.a)(t).concat([r]):Object(u.a)(t).concat([r,"+"])},[]),d=Object(c.capitalize)(n);return Object(u.a)(l).concat([d])}}),P=Object(c.mapValues)(C,function(t){return function(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i;return t(n,r).join("")}}),E=Object(c.mapValues)(A,function(t){return function(n){var r,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i,f=a(),l=(r={},Object(e.a)(r,S,"Shift"),Object(e.a)(r,g,f?"Command":"Control"),Object(e.a)(r,m,"Control"),Object(e.a)(r,h,f?"Option":"Alt"),Object(e.a)(r,",",Object(o.__)("Comma")),Object(e.a)(r,".",Object(o.__)("Period")),Object(e.a)(r,"`",Object(o.__)("Backtick")),r);return Object(u.a)(t(a)).concat([n]).map(function(t){return Object(c.capitalize)(Object(c.get)(l,t,t))}).join(f?" ":" + ")}}),_=Object(c.mapValues)(A,function(t){return function(n,r){var e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:i,u=t(e);return!!u.every(function(t){return n["".concat(t,"Key")]})&&(r?n.key===r:Object(c.includes)(u,n.key.toLowerCase()))}})},33:function(t,n,r){"use strict";function e(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)}r.d(n,"a",function(){return e})}});
|
4
wp-includes/js/dist/list-reusable-blocks.js
vendored
4
wp-includes/js/dist/list-reusable-blocks.js
vendored
|
@ -82,7 +82,7 @@ this["wp"] = this["wp"] || {}; this["wp"]["listReusableBlocks"] =
|
|||
/******/
|
||||
/******/
|
||||
/******/ // Load entry module and return exports
|
||||
/******/ return __webpack_require__(__webpack_require__.s = 317);
|
||||
/******/ return __webpack_require__(__webpack_require__.s = 318);
|
||||
/******/ })
|
||||
/************************************************************************/
|
||||
/******/ ({
|
||||
|
@ -233,7 +233,7 @@ function _assertThisInitialized(self) {
|
|||
|
||||
/***/ }),
|
||||
|
||||
/***/ 317:
|
||||
/***/ 318:
|
||||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||||
|
||||
"use strict";
|
||||
|
|
File diff suppressed because one or more lines are too long
68
wp-includes/js/dist/notices.js
vendored
68
wp-includes/js/dist/notices.js
vendored
|
@ -82,7 +82,7 @@ this["wp"] = this["wp"] || {}; this["wp"]["notices"] =
|
|||
/******/
|
||||
/******/
|
||||
/******/ // Load entry module and return exports
|
||||
/******/ return __webpack_require__(__webpack_require__.s = 279);
|
||||
/******/ return __webpack_require__(__webpack_require__.s = 280);
|
||||
/******/ })
|
||||
/************************************************************************/
|
||||
/******/ ({
|
||||
|
@ -159,17 +159,6 @@ exports.DEFAULT_STATUS = DEFAULT_STATUS;
|
|||
|
||||
(function() { module.exports = this["lodash"]; }());
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 279:
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
"use strict";
|
||||
|
||||
|
||||
__webpack_require__(280);
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 280:
|
||||
|
@ -178,7 +167,18 @@ __webpack_require__(280);
|
|||
"use strict";
|
||||
|
||||
|
||||
var _interopRequireWildcard = __webpack_require__(281);
|
||||
__webpack_require__(281);
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 281:
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
"use strict";
|
||||
|
||||
|
||||
var _interopRequireWildcard = __webpack_require__(282);
|
||||
|
||||
var _interopRequireDefault = __webpack_require__(122);
|
||||
|
||||
|
@ -189,13 +189,13 @@ exports.default = void 0;
|
|||
|
||||
var _data = __webpack_require__(5);
|
||||
|
||||
var _reducer = _interopRequireDefault(__webpack_require__(282));
|
||||
var _reducer = _interopRequireDefault(__webpack_require__(283));
|
||||
|
||||
var actions = _interopRequireWildcard(__webpack_require__(289));
|
||||
var actions = _interopRequireWildcard(__webpack_require__(290));
|
||||
|
||||
var selectors = _interopRequireWildcard(__webpack_require__(290));
|
||||
var selectors = _interopRequireWildcard(__webpack_require__(291));
|
||||
|
||||
var _controls = _interopRequireDefault(__webpack_require__(291));
|
||||
var _controls = _interopRequireDefault(__webpack_require__(292));
|
||||
|
||||
/**
|
||||
* WordPress dependencies
|
||||
|
@ -216,7 +216,7 @@ exports.default = _default;
|
|||
|
||||
/***/ }),
|
||||
|
||||
/***/ 281:
|
||||
/***/ 282:
|
||||
/***/ (function(module, exports) {
|
||||
|
||||
function _interopRequireWildcard(obj) {
|
||||
|
@ -248,7 +248,7 @@ module.exports = _interopRequireWildcard;
|
|||
|
||||
/***/ }),
|
||||
|
||||
/***/ 282:
|
||||
/***/ 283:
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
"use strict";
|
||||
|
@ -261,11 +261,11 @@ Object.defineProperty(exports, "__esModule", {
|
|||
});
|
||||
exports.default = void 0;
|
||||
|
||||
var _toConsumableArray2 = _interopRequireDefault(__webpack_require__(283));
|
||||
var _toConsumableArray2 = _interopRequireDefault(__webpack_require__(284));
|
||||
|
||||
var _lodash = __webpack_require__(2);
|
||||
|
||||
var _onSubKey = _interopRequireDefault(__webpack_require__(287));
|
||||
var _onSubKey = _interopRequireDefault(__webpack_require__(288));
|
||||
|
||||
/**
|
||||
* External dependencies
|
||||
|
@ -309,14 +309,14 @@ exports.default = _default;
|
|||
|
||||
/***/ }),
|
||||
|
||||
/***/ 283:
|
||||
/***/ 284:
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
var arrayWithoutHoles = __webpack_require__(284);
|
||||
var arrayWithoutHoles = __webpack_require__(285);
|
||||
|
||||
var iterableToArray = __webpack_require__(285);
|
||||
var iterableToArray = __webpack_require__(286);
|
||||
|
||||
var nonIterableSpread = __webpack_require__(286);
|
||||
var nonIterableSpread = __webpack_require__(287);
|
||||
|
||||
function _toConsumableArray(arr) {
|
||||
return arrayWithoutHoles(arr) || iterableToArray(arr) || nonIterableSpread();
|
||||
|
@ -326,7 +326,7 @@ module.exports = _toConsumableArray;
|
|||
|
||||
/***/ }),
|
||||
|
||||
/***/ 284:
|
||||
/***/ 285:
|
||||
/***/ (function(module, exports) {
|
||||
|
||||
function _arrayWithoutHoles(arr) {
|
||||
|
@ -343,7 +343,7 @@ module.exports = _arrayWithoutHoles;
|
|||
|
||||
/***/ }),
|
||||
|
||||
/***/ 285:
|
||||
/***/ 286:
|
||||
/***/ (function(module, exports) {
|
||||
|
||||
function _iterableToArray(iter) {
|
||||
|
@ -354,7 +354,7 @@ module.exports = _iterableToArray;
|
|||
|
||||
/***/ }),
|
||||
|
||||
/***/ 286:
|
||||
/***/ 287:
|
||||
/***/ (function(module, exports) {
|
||||
|
||||
function _nonIterableSpread() {
|
||||
|
@ -365,7 +365,7 @@ module.exports = _nonIterableSpread;
|
|||
|
||||
/***/ }),
|
||||
|
||||
/***/ 287:
|
||||
/***/ 288:
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
"use strict";
|
||||
|
@ -380,7 +380,7 @@ exports.default = exports.onSubKey = void 0;
|
|||
|
||||
var _defineProperty2 = _interopRequireDefault(__webpack_require__(175));
|
||||
|
||||
var _objectSpread3 = _interopRequireDefault(__webpack_require__(288));
|
||||
var _objectSpread3 = _interopRequireDefault(__webpack_require__(289));
|
||||
|
||||
/**
|
||||
* Higher-order reducer creator which creates a combined reducer object, keyed
|
||||
|
@ -423,7 +423,7 @@ exports.default = _default;
|
|||
|
||||
/***/ }),
|
||||
|
||||
/***/ 288:
|
||||
/***/ 289:
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
var defineProperty = __webpack_require__(175);
|
||||
|
@ -451,7 +451,7 @@ module.exports = _objectSpread;
|
|||
|
||||
/***/ }),
|
||||
|
||||
/***/ 289:
|
||||
/***/ 290:
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
"use strict";
|
||||
|
@ -648,7 +648,7 @@ function removeNotice(id) {
|
|||
|
||||
/***/ }),
|
||||
|
||||
/***/ 290:
|
||||
/***/ 291:
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
"use strict";
|
||||
|
@ -725,7 +725,7 @@ function getNotices(state) {
|
|||
|
||||
/***/ }),
|
||||
|
||||
/***/ 291:
|
||||
/***/ 292:
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
"use strict";
|
||||
|
|
2
wp-includes/js/dist/notices.min.js
vendored
2
wp-includes/js/dist/notices.min.js
vendored
File diff suppressed because one or more lines are too long
4
wp-includes/js/dist/nux.js
vendored
4
wp-includes/js/dist/nux.js
vendored
|
@ -82,7 +82,7 @@ this["wp"] = this["wp"] || {}; this["wp"]["nux"] =
|
|||
/******/
|
||||
/******/
|
||||
/******/ // Load entry module and return exports
|
||||
/******/ return __webpack_require__(__webpack_require__.s = 320);
|
||||
/******/ return __webpack_require__(__webpack_require__.s = 321);
|
||||
/******/ })
|
||||
/************************************************************************/
|
||||
/******/ ({
|
||||
|
@ -493,7 +493,7 @@ function isShallowEqual( a, b, fromIndex ) {
|
|||
|
||||
/***/ }),
|
||||
|
||||
/***/ 320:
|
||||
/***/ 321:
|
||||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||||
|
||||
"use strict";
|
||||
|
|
2
wp-includes/js/dist/nux.min.js
vendored
2
wp-includes/js/dist/nux.min.js
vendored
File diff suppressed because one or more lines are too long
4
wp-includes/js/dist/plugins.js
vendored
4
wp-includes/js/dist/plugins.js
vendored
|
@ -82,7 +82,7 @@ this["wp"] = this["wp"] || {}; this["wp"]["plugins"] =
|
|||
/******/
|
||||
/******/
|
||||
/******/ // Load entry module and return exports
|
||||
/******/ return __webpack_require__(__webpack_require__.s = 321);
|
||||
/******/ return __webpack_require__(__webpack_require__.s = 322);
|
||||
/******/ })
|
||||
/************************************************************************/
|
||||
/******/ ({
|
||||
|
@ -273,7 +273,7 @@ function _assertThisInitialized(self) {
|
|||
|
||||
/***/ }),
|
||||
|
||||
/***/ 321:
|
||||
/***/ 322:
|
||||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||||
|
||||
"use strict";
|
||||
|
|
2
wp-includes/js/dist/plugins.min.js
vendored
2
wp-includes/js/dist/plugins.min.js
vendored
File diff suppressed because one or more lines are too long
24
wp-includes/js/dist/redux-routine.js
vendored
24
wp-includes/js/dist/redux-routine.js
vendored
|
@ -82,7 +82,7 @@ this["wp"] = this["wp"] || {}; this["wp"]["reduxRoutine"] =
|
|||
/******/
|
||||
/******/
|
||||
/******/ // Load entry module and return exports
|
||||
/******/ return __webpack_require__(__webpack_require__.s = 322);
|
||||
/******/ return __webpack_require__(__webpack_require__.s = 323);
|
||||
/******/ })
|
||||
/************************************************************************/
|
||||
/******/ ({
|
||||
|
@ -275,15 +275,15 @@ Object.keys(_helpers).forEach(function (key) {
|
|||
});
|
||||
});
|
||||
|
||||
var _create = __webpack_require__(292);
|
||||
var _create = __webpack_require__(293);
|
||||
|
||||
var _create2 = _interopRequireDefault(_create);
|
||||
|
||||
var _async = __webpack_require__(294);
|
||||
var _async = __webpack_require__(295);
|
||||
|
||||
var _async2 = _interopRequireDefault(_async);
|
||||
|
||||
var _wrap = __webpack_require__(296);
|
||||
var _wrap = __webpack_require__(297);
|
||||
|
||||
var _wrap2 = _interopRequireDefault(_wrap);
|
||||
|
||||
|
@ -325,7 +325,7 @@ function _typeof(obj) {
|
|||
|
||||
/***/ }),
|
||||
|
||||
/***/ 292:
|
||||
/***/ 293:
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
"use strict";
|
||||
|
@ -335,7 +335,7 @@ Object.defineProperty(exports, "__esModule", {
|
|||
value: true
|
||||
});
|
||||
|
||||
var _builtin = __webpack_require__(293);
|
||||
var _builtin = __webpack_require__(294);
|
||||
|
||||
var _builtin2 = _interopRequireDefault(_builtin);
|
||||
|
||||
|
@ -411,7 +411,7 @@ exports.default = create;
|
|||
|
||||
/***/ }),
|
||||
|
||||
/***/ 293:
|
||||
/***/ 294:
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
"use strict";
|
||||
|
@ -512,7 +512,7 @@ exports.default = [error, iterator, array, object, any];
|
|||
|
||||
/***/ }),
|
||||
|
||||
/***/ 294:
|
||||
/***/ 295:
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
"use strict";
|
||||
|
@ -529,7 +529,7 @@ var _is2 = _interopRequireDefault(_is);
|
|||
|
||||
var _helpers = __webpack_require__(177);
|
||||
|
||||
var _dispatcher = __webpack_require__(295);
|
||||
var _dispatcher = __webpack_require__(296);
|
||||
|
||||
var _dispatcher2 = _interopRequireDefault(_dispatcher);
|
||||
|
||||
|
@ -634,7 +634,7 @@ exports.default = [promise, fork, join, race, subscribe];
|
|||
|
||||
/***/ }),
|
||||
|
||||
/***/ 295:
|
||||
/***/ 296:
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
"use strict";
|
||||
|
@ -667,7 +667,7 @@ exports.default = createDispatcher;
|
|||
|
||||
/***/ }),
|
||||
|
||||
/***/ 296:
|
||||
/***/ 297:
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
"use strict";
|
||||
|
@ -710,7 +710,7 @@ exports.default = [call, cps];
|
|||
|
||||
/***/ }),
|
||||
|
||||
/***/ 322:
|
||||
/***/ 323:
|
||||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||||
|
||||
"use strict";
|
||||
|
|
2
wp-includes/js/dist/redux-routine.min.js
vendored
2
wp-includes/js/dist/redux-routine.min.js
vendored
File diff suppressed because one or more lines are too long
365
wp-includes/js/dist/rich-text.js
vendored
365
wp-includes/js/dist/rich-text.js
vendored
|
@ -456,10 +456,15 @@ function isFormatEqual(format1, format2) {
|
|||
}
|
||||
|
||||
// CONCATENATED MODULE: ./node_modules/@wordpress/rich-text/build-module/normalise-formats.js
|
||||
/**
|
||||
* External dependencies
|
||||
*/
|
||||
|
||||
/**
|
||||
* Internal dependencies
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* Normalises formats: ensures subsequent equal formats have the same reference.
|
||||
*
|
||||
|
@ -473,21 +478,20 @@ function normaliseFormats(_ref) {
|
|||
text = _ref.text,
|
||||
start = _ref.start,
|
||||
end = _ref.end;
|
||||
var newFormats = formats.slice(0);
|
||||
newFormats.forEach(function (formatsAtIndex, index) {
|
||||
var lastFormatsAtIndex = newFormats[index - 1];
|
||||
|
||||
if (lastFormatsAtIndex) {
|
||||
var newFormatsAtIndex = formatsAtIndex.slice(0);
|
||||
newFormatsAtIndex.forEach(function (format, formatIndex) {
|
||||
var lastFormat = lastFormatsAtIndex[formatIndex];
|
||||
|
||||
if (isFormatEqual(format, lastFormat)) {
|
||||
newFormatsAtIndex[formatIndex] = lastFormat;
|
||||
}
|
||||
var refs = [];
|
||||
var newFormats = formats.map(function (formatsAtIndex) {
|
||||
return formatsAtIndex.map(function (format) {
|
||||
var equalRef = Object(external_lodash_["find"])(refs, function (ref) {
|
||||
return isFormatEqual(ref, format);
|
||||
});
|
||||
newFormats[index] = newFormatsAtIndex;
|
||||
}
|
||||
|
||||
if (equalRef) {
|
||||
return equalRef;
|
||||
}
|
||||
|
||||
refs.push(format);
|
||||
return format;
|
||||
});
|
||||
});
|
||||
return {
|
||||
formats: newFormats,
|
||||
|
@ -2776,6 +2780,333 @@ function unregisterFormatType(name) {
|
|||
return oldFormat;
|
||||
}
|
||||
|
||||
// CONCATENATED MODULE: ./node_modules/@wordpress/rich-text/build-module/get-line-index.js
|
||||
/**
|
||||
* Internal dependencies
|
||||
*/
|
||||
|
||||
/**
|
||||
* Gets the currently selected line index, or the first line index if the
|
||||
* selection spans over multiple items.
|
||||
*
|
||||
* @param {Object} value Value to get the line index from.
|
||||
* @param {boolean} startIndex Optional index that should be contained by the
|
||||
* line. Defaults to the selection start of the
|
||||
* value.
|
||||
*
|
||||
* @return {?boolean} The line index. Undefined if not found.
|
||||
*/
|
||||
|
||||
function getLineIndex(_ref) {
|
||||
var start = _ref.start,
|
||||
text = _ref.text;
|
||||
var startIndex = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : start;
|
||||
var index = startIndex;
|
||||
|
||||
while (index--) {
|
||||
if (text[index] === LINE_SEPARATOR) {
|
||||
return index;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// CONCATENATED MODULE: ./node_modules/@wordpress/rich-text/build-module/indent-list-items.js
|
||||
/**
|
||||
* Internal dependencies
|
||||
*/
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Gets the line index of the first previous list item with higher indentation.
|
||||
*
|
||||
* @param {Object} value Value to search.
|
||||
* @param {number} lineIndex Line index of the list item to compare with.
|
||||
*
|
||||
* @return {boolean} The line index.
|
||||
*/
|
||||
|
||||
function getTargetLevelLineIndex(_ref, lineIndex) {
|
||||
var text = _ref.text,
|
||||
formats = _ref.formats;
|
||||
var startFormats = formats[lineIndex] || [];
|
||||
var index = lineIndex;
|
||||
|
||||
while (index-- >= 0) {
|
||||
if (text[index] !== LINE_SEPARATOR) {
|
||||
continue;
|
||||
}
|
||||
|
||||
var formatsAtIndex = formats[index] || []; // Return the first line index that is one level higher. If the level is
|
||||
// lower or equal, there is no result.
|
||||
|
||||
if (formatsAtIndex.length === startFormats.length + 1) {
|
||||
return index;
|
||||
} else if (formatsAtIndex.length <= startFormats.length) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
/**
|
||||
* Indents any selected list items if possible.
|
||||
*
|
||||
* @param {Object} value Value to change.
|
||||
* @param {Object} rootFormat
|
||||
*
|
||||
* @return {Object} The changed value.
|
||||
*/
|
||||
|
||||
|
||||
function indentListItems(value, rootFormat) {
|
||||
var lineIndex = getLineIndex(value); // There is only one line, so the line cannot be indented.
|
||||
|
||||
if (lineIndex === undefined) {
|
||||
return value;
|
||||
}
|
||||
|
||||
var text = value.text,
|
||||
formats = value.formats,
|
||||
start = value.start,
|
||||
end = value.end;
|
||||
var previousLineIndex = getLineIndex(value, lineIndex);
|
||||
var formatsAtLineIndex = formats[lineIndex] || [];
|
||||
var formatsAtPreviousLineIndex = formats[previousLineIndex] || []; // The the indentation of the current line is greater than previous line,
|
||||
// then the line cannot be furter indented.
|
||||
|
||||
if (formatsAtLineIndex.length > formatsAtPreviousLineIndex.length) {
|
||||
return value;
|
||||
}
|
||||
|
||||
var newFormats = formats.slice();
|
||||
var targetLevelLineIndex = getTargetLevelLineIndex(value, lineIndex);
|
||||
|
||||
for (var index = lineIndex; index < end; index++) {
|
||||
if (text[index] !== LINE_SEPARATOR) {
|
||||
continue;
|
||||
} // Get the previous list, and if there's a child list, take over the
|
||||
// formats. If not, duplicate the last level and create a new level.
|
||||
|
||||
|
||||
if (targetLevelLineIndex) {
|
||||
var targetFormats = formats[targetLevelLineIndex] || [];
|
||||
newFormats[index] = targetFormats.concat((newFormats[index] || []).slice(targetFormats.length - 1));
|
||||
} else {
|
||||
var _targetFormats = formats[previousLineIndex] || [];
|
||||
|
||||
var lastformat = _targetFormats[_targetFormats.length - 1] || rootFormat;
|
||||
newFormats[index] = _targetFormats.concat([lastformat], (newFormats[index] || []).slice(_targetFormats.length));
|
||||
}
|
||||
}
|
||||
|
||||
return normaliseFormats({
|
||||
text: text,
|
||||
formats: newFormats,
|
||||
start: start,
|
||||
end: end
|
||||
});
|
||||
}
|
||||
|
||||
// CONCATENATED MODULE: ./node_modules/@wordpress/rich-text/build-module/get-parent-line-index.js
|
||||
/**
|
||||
* Internal dependencies
|
||||
*/
|
||||
|
||||
/**
|
||||
* Gets the index of the first parent list. To get the parent list formats, we
|
||||
* go through every list item until we find one with exactly one format type
|
||||
* less.
|
||||
*
|
||||
* @param {Object} value Value to search.
|
||||
* @param {number} lineIndex Line index of a child list item.
|
||||
*
|
||||
* @return {Array} The parent list line index.
|
||||
*/
|
||||
|
||||
function getParentLineIndex(_ref, lineIndex) {
|
||||
var text = _ref.text,
|
||||
formats = _ref.formats;
|
||||
var startFormats = formats[lineIndex] || [];
|
||||
var index = lineIndex;
|
||||
|
||||
while (index-- >= 0) {
|
||||
if (text[index] !== LINE_SEPARATOR) {
|
||||
continue;
|
||||
}
|
||||
|
||||
var formatsAtIndex = formats[index] || [];
|
||||
|
||||
if (formatsAtIndex.length === startFormats.length - 1) {
|
||||
return index;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// CONCATENATED MODULE: ./node_modules/@wordpress/rich-text/build-module/get-last-child-index.js
|
||||
/**
|
||||
* Internal dependencies
|
||||
*/
|
||||
|
||||
/**
|
||||
* Gets the line index of the last child in the list.
|
||||
*
|
||||
* @param {Object} value Value to search.
|
||||
* @param {number} lineIndex Line index of a list item in the list.
|
||||
*
|
||||
* @return {Array} The index of the last child.
|
||||
*/
|
||||
|
||||
function getLastChildIndex(_ref, lineIndex) {
|
||||
var text = _ref.text,
|
||||
formats = _ref.formats;
|
||||
var lineFormats = formats[lineIndex] || []; // Use the given line index in case there are no next children.
|
||||
|
||||
var childIndex = lineIndex; // `lineIndex` could be `undefined` if it's the first line.
|
||||
|
||||
for (var index = lineIndex || 0; index < text.length; index++) {
|
||||
// We're only interested in line indices.
|
||||
if (text[index] !== LINE_SEPARATOR) {
|
||||
continue;
|
||||
}
|
||||
|
||||
var formatsAtIndex = formats[index] || []; // If the amout of formats is equal or more, store it, then return the
|
||||
// last one if the amount of formats is less.
|
||||
|
||||
if (formatsAtIndex.length >= lineFormats.length) {
|
||||
childIndex = index;
|
||||
} else {
|
||||
return childIndex;
|
||||
}
|
||||
} // If the end of the text is reached, return the last child index.
|
||||
|
||||
|
||||
return childIndex;
|
||||
}
|
||||
|
||||
// CONCATENATED MODULE: ./node_modules/@wordpress/rich-text/build-module/outdent-list-items.js
|
||||
/**
|
||||
* Internal dependencies
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Outdents any selected list items if possible.
|
||||
*
|
||||
* @param {Object} value Value to change.
|
||||
*
|
||||
* @return {Object} The changed value.
|
||||
*/
|
||||
|
||||
function outdentListItems(value) {
|
||||
var text = value.text,
|
||||
formats = value.formats,
|
||||
start = value.start,
|
||||
end = value.end;
|
||||
var startingLineIndex = getLineIndex(value, start); // Return early if the starting line index cannot be further outdented.
|
||||
|
||||
if (formats[startingLineIndex] === undefined) {
|
||||
return value;
|
||||
}
|
||||
|
||||
var newFormats = formats.slice(0);
|
||||
var parentFormats = formats[getParentLineIndex(value, startingLineIndex)] || [];
|
||||
var endingLineIndex = getLineIndex(value, end);
|
||||
var lastChildIndex = getLastChildIndex(value, endingLineIndex); // Outdent all list items from the starting line index until the last child
|
||||
// index of the ending list. All children of the ending list need to be
|
||||
// outdented, otherwise they'll be orphaned.
|
||||
|
||||
for (var index = startingLineIndex; index <= lastChildIndex; index++) {
|
||||
// Skip indices that are not line separators.
|
||||
if (text[index] !== LINE_SEPARATOR) {
|
||||
continue;
|
||||
} // In the case of level 0, the formats at the index are undefined.
|
||||
|
||||
|
||||
var currentFormats = newFormats[index] || []; // Omit the indentation level where the selection starts.
|
||||
|
||||
newFormats[index] = parentFormats.concat(currentFormats.slice(parentFormats.length + 1));
|
||||
|
||||
if (newFormats[index].length === 0) {
|
||||
delete newFormats[index];
|
||||
}
|
||||
}
|
||||
|
||||
return normaliseFormats({
|
||||
text: text,
|
||||
formats: newFormats,
|
||||
start: start,
|
||||
end: end
|
||||
});
|
||||
}
|
||||
|
||||
// CONCATENATED MODULE: ./node_modules/@wordpress/rich-text/build-module/change-list-type.js
|
||||
/**
|
||||
* Internal dependencies
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Changes the list type of the selected indented list, if any. Looks at the
|
||||
* currently selected list item and takes the parent list, then changes the list
|
||||
* type of this list. When multiple lines are selected, the parent lists are
|
||||
* takes and changed.
|
||||
*
|
||||
* @param {Object} value Value to change.
|
||||
* @param {Object} newFormat The new list format object. Choose between
|
||||
* `{ type: 'ol' }` and `{ type: 'ul' }`.
|
||||
*
|
||||
* @return {Object} The changed value.
|
||||
*/
|
||||
|
||||
function changeListType(value, newFormat) {
|
||||
var text = value.text,
|
||||
formats = value.formats,
|
||||
start = value.start,
|
||||
end = value.end;
|
||||
var startingLineIndex = getLineIndex(value, start);
|
||||
var startLineFormats = formats[startingLineIndex] || [];
|
||||
var endLineFormats = formats[getLineIndex(value, end)] || [];
|
||||
var startIndex = getParentLineIndex(value, startingLineIndex);
|
||||
var newFormats = formats.slice(0);
|
||||
var startCount = startLineFormats.length - 1;
|
||||
var endCount = endLineFormats.length - 1;
|
||||
var changed;
|
||||
|
||||
for (var index = startIndex + 1 || 0; index < text.length; index++) {
|
||||
if (text[index] !== LINE_SEPARATOR) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if ((newFormats[index] || []).length <= startCount) {
|
||||
break;
|
||||
}
|
||||
|
||||
if (!newFormats[index]) {
|
||||
continue;
|
||||
}
|
||||
|
||||
changed = true;
|
||||
newFormats[index] = newFormats[index].map(function (format, i) {
|
||||
return i < startCount || i > endCount ? format : newFormat;
|
||||
});
|
||||
}
|
||||
|
||||
if (!changed) {
|
||||
return value;
|
||||
}
|
||||
|
||||
return normaliseFormats({
|
||||
text: text,
|
||||
formats: newFormats,
|
||||
start: start,
|
||||
end: end
|
||||
});
|
||||
}
|
||||
|
||||
// CONCATENATED MODULE: ./node_modules/@wordpress/rich-text/build-module/index.js
|
||||
/* concated harmony reexport applyFormat */__webpack_require__.d(__webpack_exports__, "applyFormat", function() { return applyFormat; });
|
||||
/* concated harmony reexport charAt */__webpack_require__.d(__webpack_exports__, "charAt", function() { return charAt; });
|
||||
|
@ -2804,6 +3135,12 @@ function unregisterFormatType(name) {
|
|||
/* concated harmony reexport toggleFormat */__webpack_require__.d(__webpack_exports__, "toggleFormat", function() { return toggleFormat; });
|
||||
/* concated harmony reexport LINE_SEPARATOR */__webpack_require__.d(__webpack_exports__, "LINE_SEPARATOR", function() { return LINE_SEPARATOR; });
|
||||
/* concated harmony reexport unregisterFormatType */__webpack_require__.d(__webpack_exports__, "unregisterFormatType", function() { return unregisterFormatType; });
|
||||
/* concated harmony reexport indentListItems */__webpack_require__.d(__webpack_exports__, "indentListItems", function() { return indentListItems; });
|
||||
/* concated harmony reexport outdentListItems */__webpack_require__.d(__webpack_exports__, "outdentListItems", function() { return outdentListItems; });
|
||||
/* concated harmony reexport changeListType */__webpack_require__.d(__webpack_exports__, "changeListType", function() { return changeListType; });
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
2
wp-includes/js/dist/rich-text.min.js
vendored
2
wp-includes/js/dist/rich-text.min.js
vendored
File diff suppressed because one or more lines are too long
4
wp-includes/js/dist/shortcode.js
vendored
4
wp-includes/js/dist/shortcode.js
vendored
|
@ -82,7 +82,7 @@ this["wp"] = this["wp"] || {}; this["wp"]["shortcode"] =
|
|||
/******/
|
||||
/******/
|
||||
/******/ // Load entry module and return exports
|
||||
/******/ return __webpack_require__(__webpack_require__.s = 297);
|
||||
/******/ return __webpack_require__(__webpack_require__.s = 298);
|
||||
/******/ })
|
||||
/************************************************************************/
|
||||
/******/ ({
|
||||
|
@ -94,7 +94,7 @@ this["wp"] = this["wp"] || {}; this["wp"]["shortcode"] =
|
|||
|
||||
/***/ }),
|
||||
|
||||
/***/ 297:
|
||||
/***/ 298:
|
||||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||||
|
||||
"use strict";
|
||||
|
|
2
wp-includes/js/dist/shortcode.min.js
vendored
2
wp-includes/js/dist/shortcode.min.js
vendored
|
@ -1 +1 @@
|
|||
this.wp=this.wp||{},this.wp.shortcode=function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(r,i,function(e){return t[e]}.bind(null,i));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=297)}({2:function(t,e){!function(){t.exports=this.lodash}()},297:function(t,e,n){"use strict";n.r(e),n.d(e,"next",function(){return u}),n.d(e,"replace",function(){return o}),n.d(e,"string",function(){return c}),n.d(e,"regexp",function(){return s}),n.d(e,"attrs",function(){return a}),n.d(e,"fromMatch",function(){return f});var r=n(2),i=n(41);function u(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=s(t);r.lastIndex=n;var i=r.exec(e);if(i){if("["===i[1]&&"]"===i[7])return u(t,e,r.lastIndex);var o={index:i.index,content:i[0],shortcode:f(i)};return i[1]&&(o.content=o.content.slice(1),o.index++),i[7]&&(o.content=o.content.slice(0,-1)),o}}function o(t,e,n){var r=arguments;return e.replace(s(t),function(t,e,i,u,o,c,s,a){if("["===e&&"]"===a)return t;var l=n(f(r));return l?e+l+a:t})}function c(t){return new l(t).string()}function s(t){return new RegExp("\\[(\\[?)("+t+")(?![\\w-])([^\\]\\/]*(?:\\/(?!\\])[^\\]\\/]*)*?)(?:(\\/)\\]|\\](?:([^\\[]*(?:\\[(?!\\/\\2\\])[^\\[]*)*)(\\[\\/\\2\\]))?)(\\]?)","g")}var a=n.n(i)()(function(t){var e,n={},r=[],i=/([\w-]+)\s*=\s*"([^"]*)"(?:\s|$)|([\w-]+)\s*=\s*'([^']*)'(?:\s|$)|([\w-]+)\s*=\s*([^\s'"]+)(?:\s|$)|"([^"]*)"(?:\s|$)|'([^']*)'(?:\s|$)|(\S+)(?:\s|$)/g;for(t=t.replace(/[\u00a0\u200b]/g," ");e=i.exec(t);)e[1]?n[e[1].toLowerCase()]=e[2]:e[3]?n[e[3].toLowerCase()]=e[4]:e[5]?n[e[5].toLowerCase()]=e[6]:e[7]?r.push(e[7]):e[8]?r.push(e[8]):e[9]&&r.push(e[9]);return{named:n,numeric:r}});function f(t){var e;return e=t[4]?"self-closing":t[6]?"closed":"single",new l({tag:t[2],attrs:t[3],type:e,content:t[5]})}var l=Object(r.extend)(function(t){var e=this;Object(r.extend)(this,Object(r.pick)(t||{},"tag","attrs","type","content"));var n=this.attrs;this.attrs={named:{},numeric:[]},n&&(Object(r.isString)(n)?this.attrs=a(n):Object(r.isEqual)(Object.keys(n),["named","numeric"])?this.attrs=n:Object(r.forEach)(n,function(t,n){e.set(n,t)}))},{next:u,replace:o,string:c,regexp:s,attrs:a,fromMatch:f});Object(r.extend)(l.prototype,{get:function(t){return this.attrs[Object(r.isNumber)(t)?"numeric":"named"][t]},set:function(t,e){return this.attrs[Object(r.isNumber)(t)?"numeric":"named"][t]=e,this},string:function(){var t="["+this.tag;return Object(r.forEach)(this.attrs.numeric,function(e){/\s/.test(e)?t+=' "'+e+'"':t+=" "+e}),Object(r.forEach)(this.attrs.named,function(e,n){t+=" "+n+'="'+e+'"'}),"single"===this.type?t+"]":"self-closing"===this.type?t+" /]":(t+="]",this.content&&(t+=this.content),t+"[/"+this.tag+"]")}}),e.default=l},41:function(t,e,n){t.exports=function(t,e){var n,r,i,u=0;function o(){var e,o,c=r,s=arguments.length;t:for(;c;){if(c.args.length===arguments.length){for(o=0;o<s;o++)if(c.args[o]!==arguments[o]){c=c.next;continue t}return c!==r&&(c===i&&(i=c.prev),c.prev.next=c.next,c.next&&(c.next.prev=c.prev),c.next=r,c.prev=null,r.prev=c,r=c),c.val}c=c.next}for(e=new Array(s),o=0;o<s;o++)e[o]=arguments[o];return c={args:e,val:t.apply(null,e)},r?(r.prev=c,c.next=r):i=c,u===n?(i=i.prev).next=null:u++,r=c,c.val}return e&&e.maxSize&&(n=e.maxSize),o.clear=function(){r=null,i=null,u=0},o}}});
|
||||
this.wp=this.wp||{},this.wp.shortcode=function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(r,i,function(e){return t[e]}.bind(null,i));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=298)}({2:function(t,e){!function(){t.exports=this.lodash}()},298:function(t,e,n){"use strict";n.r(e),n.d(e,"next",function(){return u}),n.d(e,"replace",function(){return o}),n.d(e,"string",function(){return c}),n.d(e,"regexp",function(){return s}),n.d(e,"attrs",function(){return a}),n.d(e,"fromMatch",function(){return f});var r=n(2),i=n(41);function u(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=s(t);r.lastIndex=n;var i=r.exec(e);if(i){if("["===i[1]&&"]"===i[7])return u(t,e,r.lastIndex);var o={index:i.index,content:i[0],shortcode:f(i)};return i[1]&&(o.content=o.content.slice(1),o.index++),i[7]&&(o.content=o.content.slice(0,-1)),o}}function o(t,e,n){var r=arguments;return e.replace(s(t),function(t,e,i,u,o,c,s,a){if("["===e&&"]"===a)return t;var l=n(f(r));return l?e+l+a:t})}function c(t){return new l(t).string()}function s(t){return new RegExp("\\[(\\[?)("+t+")(?![\\w-])([^\\]\\/]*(?:\\/(?!\\])[^\\]\\/]*)*?)(?:(\\/)\\]|\\](?:([^\\[]*(?:\\[(?!\\/\\2\\])[^\\[]*)*)(\\[\\/\\2\\]))?)(\\]?)","g")}var a=n.n(i)()(function(t){var e,n={},r=[],i=/([\w-]+)\s*=\s*"([^"]*)"(?:\s|$)|([\w-]+)\s*=\s*'([^']*)'(?:\s|$)|([\w-]+)\s*=\s*([^\s'"]+)(?:\s|$)|"([^"]*)"(?:\s|$)|'([^']*)'(?:\s|$)|(\S+)(?:\s|$)/g;for(t=t.replace(/[\u00a0\u200b]/g," ");e=i.exec(t);)e[1]?n[e[1].toLowerCase()]=e[2]:e[3]?n[e[3].toLowerCase()]=e[4]:e[5]?n[e[5].toLowerCase()]=e[6]:e[7]?r.push(e[7]):e[8]?r.push(e[8]):e[9]&&r.push(e[9]);return{named:n,numeric:r}});function f(t){var e;return e=t[4]?"self-closing":t[6]?"closed":"single",new l({tag:t[2],attrs:t[3],type:e,content:t[5]})}var l=Object(r.extend)(function(t){var e=this;Object(r.extend)(this,Object(r.pick)(t||{},"tag","attrs","type","content"));var n=this.attrs;this.attrs={named:{},numeric:[]},n&&(Object(r.isString)(n)?this.attrs=a(n):Object(r.isEqual)(Object.keys(n),["named","numeric"])?this.attrs=n:Object(r.forEach)(n,function(t,n){e.set(n,t)}))},{next:u,replace:o,string:c,regexp:s,attrs:a,fromMatch:f});Object(r.extend)(l.prototype,{get:function(t){return this.attrs[Object(r.isNumber)(t)?"numeric":"named"][t]},set:function(t,e){return this.attrs[Object(r.isNumber)(t)?"numeric":"named"][t]=e,this},string:function(){var t="["+this.tag;return Object(r.forEach)(this.attrs.numeric,function(e){/\s/.test(e)?t+=' "'+e+'"':t+=" "+e}),Object(r.forEach)(this.attrs.named,function(e,n){t+=" "+n+'="'+e+'"'}),"single"===this.type?t+"]":"self-closing"===this.type?t+" /]":(t+="]",this.content&&(t+=this.content),t+"[/"+this.tag+"]")}}),e.default=l},41:function(t,e,n){t.exports=function(t,e){var n,r,i,u=0;function o(){var e,o,c=r,s=arguments.length;t:for(;c;){if(c.args.length===arguments.length){for(o=0;o<s;o++)if(c.args[o]!==arguments[o]){c=c.next;continue t}return c!==r&&(c===i&&(i=c.prev),c.prev.next=c.next,c.next&&(c.next.prev=c.prev),c.next=r,c.prev=null,r.prev=c,r=c),c.val}c=c.next}for(e=new Array(s),o=0;o<s;o++)e[o]=arguments[o];return c={args:e,val:t.apply(null,e)},r?(r.prev=c,c.next=r):i=c,u===n?(i=i.prev).next=null:u++,r=c,c.val}return e&&e.maxSize&&(n=e.maxSize),o.clear=function(){r=null,i=null,u=0},o}}});
|
4
wp-includes/js/dist/token-list.js
vendored
4
wp-includes/js/dist/token-list.js
vendored
|
@ -82,7 +82,7 @@ this["wp"] = this["wp"] || {}; this["wp"]["tokenList"] =
|
|||
/******/
|
||||
/******/
|
||||
/******/ // Load entry module and return exports
|
||||
/******/ return __webpack_require__(__webpack_require__.s = 298);
|
||||
/******/ return __webpack_require__(__webpack_require__.s = 299);
|
||||
/******/ })
|
||||
/************************************************************************/
|
||||
/******/ ({
|
||||
|
@ -107,7 +107,7 @@ function _classCallCheck(instance, Constructor) {
|
|||
|
||||
/***/ }),
|
||||
|
||||
/***/ 298:
|
||||
/***/ 299:
|
||||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||||
|
||||
"use strict";
|
||||
|
|
2
wp-includes/js/dist/token-list.min.js
vendored
2
wp-includes/js/dist/token-list.min.js
vendored
|
@ -1 +1 @@
|
|||
this.wp=this.wp||{},this.wp.tokenList=function(e){var t={};function n(r){if(t[r])return t[r].exports;var u=t[r]={i:r,l:!1,exports:{}};return e[r].call(u.exports,u,u.exports,n),u.l=!0,u.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var u in e)n.d(r,u,function(t){return e[t]}.bind(null,u));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=298)}({10:function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}n.d(t,"a",function(){return r})},2:function(e,t){!function(){e.exports=this.lodash}()},298:function(e,t,n){"use strict";n.r(t),n.d(t,"default",function(){return o});var r=n(10),u=n(9),i=n(2),o=function(){function e(){var t=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";Object(r.a)(this,e),this.value=n,["entries","forEach","keys","values"].forEach(function(e){t[e]=function(){var t;return(t=this._valueAsArray)[e].apply(t,arguments)}.bind(t)})}return Object(u.a)(e,[{key:"toString",value:function(){return this.value}},{key:Symbol.iterator,value:regeneratorRuntime.mark(function e(){return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.delegateYield(this._valueAsArray,"t0",1);case 1:return e.abrupt("return",e.t0);case 2:case"end":return e.stop()}},e,this)})},{key:"item",value:function(e){return this._valueAsArray[e]}},{key:"contains",value:function(e){return-1!==this._valueAsArray.indexOf(e)}},{key:"add",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];this.value+=" "+t.join(" ")}},{key:"remove",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];this.value=i.without.apply(void 0,[this._valueAsArray].concat(t)).join(" ")}},{key:"toggle",value:function(e,t){return void 0===t&&(t=!this.contains(e)),t?this.add(e):this.remove(e),t}},{key:"replace",value:function(e,t){return!!this.contains(e)&&(this.remove(e),this.add(t),!0)}},{key:"supports",value:function(){return!0}},{key:"value",get:function(){return this._currentValue},set:function(e){e=String(e),this._valueAsArray=Object(i.uniq)(Object(i.compact)(e.split(/\s+/g))),this._currentValue=this._valueAsArray.join(" ")}},{key:"length",get:function(){return this._valueAsArray.length}}]),e}()},9:function(e,t,n){"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function u(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),e}n.d(t,"a",function(){return u})}}).default;
|
||||
this.wp=this.wp||{},this.wp.tokenList=function(e){var t={};function n(r){if(t[r])return t[r].exports;var u=t[r]={i:r,l:!1,exports:{}};return e[r].call(u.exports,u,u.exports,n),u.l=!0,u.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var u in e)n.d(r,u,function(t){return e[t]}.bind(null,u));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=299)}({10:function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}n.d(t,"a",function(){return r})},2:function(e,t){!function(){e.exports=this.lodash}()},299:function(e,t,n){"use strict";n.r(t),n.d(t,"default",function(){return o});var r=n(10),u=n(9),i=n(2),o=function(){function e(){var t=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";Object(r.a)(this,e),this.value=n,["entries","forEach","keys","values"].forEach(function(e){t[e]=function(){var t;return(t=this._valueAsArray)[e].apply(t,arguments)}.bind(t)})}return Object(u.a)(e,[{key:"toString",value:function(){return this.value}},{key:Symbol.iterator,value:regeneratorRuntime.mark(function e(){return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.delegateYield(this._valueAsArray,"t0",1);case 1:return e.abrupt("return",e.t0);case 2:case"end":return e.stop()}},e,this)})},{key:"item",value:function(e){return this._valueAsArray[e]}},{key:"contains",value:function(e){return-1!==this._valueAsArray.indexOf(e)}},{key:"add",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];this.value+=" "+t.join(" ")}},{key:"remove",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];this.value=i.without.apply(void 0,[this._valueAsArray].concat(t)).join(" ")}},{key:"toggle",value:function(e,t){return void 0===t&&(t=!this.contains(e)),t?this.add(e):this.remove(e),t}},{key:"replace",value:function(e,t){return!!this.contains(e)&&(this.remove(e),this.add(t),!0)}},{key:"supports",value:function(){return!0}},{key:"value",get:function(){return this._currentValue},set:function(e){e=String(e),this._valueAsArray=Object(i.uniq)(Object(i.compact)(e.split(/\s+/g))),this._currentValue=this._valueAsArray.join(" ")}},{key:"length",get:function(){return this._valueAsArray.length}}]),e}()},9:function(e,t,n){"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function u(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),e}n.d(t,"a",function(){return u})}}).default;
|
185
wp-includes/js/dist/url.js
vendored
185
wp-includes/js/dist/url.js
vendored
|
@ -82,7 +82,7 @@ this["wp"] = this["wp"] || {}; this["wp"]["url"] =
|
|||
/******/
|
||||
/******/
|
||||
/******/ // Load entry module and return exports
|
||||
/******/ return __webpack_require__(__webpack_require__.s = 299);
|
||||
/******/ return __webpack_require__(__webpack_require__.s = 300);
|
||||
/******/ })
|
||||
/************************************************************************/
|
||||
/******/ ({
|
||||
|
@ -105,11 +105,9 @@ var hexTable = (function () {
|
|||
}());
|
||||
|
||||
var compactQueue = function compactQueue(queue) {
|
||||
var obj;
|
||||
|
||||
while (queue.length) {
|
||||
while (queue.length > 1) {
|
||||
var item = queue.pop();
|
||||
obj = item.obj[item.prop];
|
||||
var obj = item.obj[item.prop];
|
||||
|
||||
if (Array.isArray(obj)) {
|
||||
var compacted = [];
|
||||
|
@ -123,8 +121,6 @@ var compactQueue = function compactQueue(queue) {
|
|||
item.obj[item.prop] = compacted;
|
||||
}
|
||||
}
|
||||
|
||||
return obj;
|
||||
};
|
||||
|
||||
var arrayToObject = function arrayToObject(source, options) {
|
||||
|
@ -147,7 +143,7 @@ var merge = function merge(target, source, options) {
|
|||
if (Array.isArray(target)) {
|
||||
target.push(source);
|
||||
} else if (typeof target === 'object') {
|
||||
if (options.plainObjects || options.allowPrototypes || !has.call(Object.prototype, source)) {
|
||||
if ((options && (options.plainObjects || options.allowPrototypes)) || !has.call(Object.prototype, source)) {
|
||||
target[source] = true;
|
||||
}
|
||||
} else {
|
||||
|
@ -200,15 +196,21 @@ var assign = function assignSingleSource(target, source) {
|
|||
}, target);
|
||||
};
|
||||
|
||||
var decode = function (str) {
|
||||
var decode = function (str, decoder, charset) {
|
||||
var strWithoutPlus = str.replace(/\+/g, ' ');
|
||||
if (charset === 'iso-8859-1') {
|
||||
// unescape never throws, no try...catch needed:
|
||||
return strWithoutPlus.replace(/%[0-9a-f]{2}/gi, unescape);
|
||||
}
|
||||
// utf-8
|
||||
try {
|
||||
return decodeURIComponent(str.replace(/\+/g, ' '));
|
||||
return decodeURIComponent(strWithoutPlus);
|
||||
} catch (e) {
|
||||
return str;
|
||||
return strWithoutPlus;
|
||||
}
|
||||
};
|
||||
|
||||
var encode = function encode(str) {
|
||||
var encode = function encode(str, defaultEncoder, charset) {
|
||||
// This code was originally written by Brian White (mscdex) for the io.js core querystring library.
|
||||
// It has been adapted here for stricter adherence to RFC 3986
|
||||
if (str.length === 0) {
|
||||
|
@ -217,6 +219,12 @@ var encode = function encode(str) {
|
|||
|
||||
var string = typeof str === 'string' ? str : String(str);
|
||||
|
||||
if (charset === 'iso-8859-1') {
|
||||
return escape(string).replace(/%u[0-9a-f]{4}/gi, function ($0) {
|
||||
return '%26%23' + parseInt($0.slice(2), 16) + '%3B';
|
||||
});
|
||||
}
|
||||
|
||||
var out = '';
|
||||
for (var i = 0; i < string.length; ++i) {
|
||||
var c = string.charCodeAt(i);
|
||||
|
@ -279,7 +287,9 @@ var compact = function compact(value) {
|
|||
}
|
||||
}
|
||||
|
||||
return compactQueue(queue);
|
||||
compactQueue(queue);
|
||||
|
||||
return value;
|
||||
};
|
||||
|
||||
var isRegExp = function isRegExp(obj) {
|
||||
|
@ -294,9 +304,14 @@ var isBuffer = function isBuffer(obj) {
|
|||
return !!(obj.constructor && obj.constructor.isBuffer && obj.constructor.isBuffer(obj));
|
||||
};
|
||||
|
||||
var combine = function combine(a, b) {
|
||||
return [].concat(a, b);
|
||||
};
|
||||
|
||||
module.exports = {
|
||||
arrayToObject: arrayToObject,
|
||||
assign: assign,
|
||||
combine: combine,
|
||||
compact: compact,
|
||||
decode: decode,
|
||||
encode: encode,
|
||||
|
@ -334,7 +349,7 @@ module.exports = {
|
|||
|
||||
/***/ }),
|
||||
|
||||
/***/ 299:
|
||||
/***/ 300:
|
||||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||||
|
||||
"use strict";
|
||||
|
@ -657,7 +672,7 @@ function filterURLForDisplay(url) {
|
|||
|
||||
/***/ }),
|
||||
|
||||
/***/ 300:
|
||||
/***/ 301:
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
"use strict";
|
||||
|
@ -678,13 +693,25 @@ var arrayPrefixGenerators = {
|
|||
}
|
||||
};
|
||||
|
||||
var isArray = Array.isArray;
|
||||
var push = Array.prototype.push;
|
||||
var pushToArray = function (arr, valueOrArray) {
|
||||
push.apply(arr, isArray(valueOrArray) ? valueOrArray : [valueOrArray]);
|
||||
};
|
||||
|
||||
var toISO = Date.prototype.toISOString;
|
||||
|
||||
var defaults = {
|
||||
addQueryPrefix: false,
|
||||
allowDots: false,
|
||||
charset: 'utf-8',
|
||||
charsetSentinel: false,
|
||||
delimiter: '&',
|
||||
encode: true,
|
||||
encoder: utils.encode,
|
||||
encodeValuesOnly: false,
|
||||
// deprecated
|
||||
indices: false,
|
||||
serializeDate: function serializeDate(date) { // eslint-disable-line func-name-matching
|
||||
return toISO.call(date);
|
||||
},
|
||||
|
@ -704,16 +731,19 @@ var stringify = function stringify( // eslint-disable-line func-name-matching
|
|||
allowDots,
|
||||
serializeDate,
|
||||
formatter,
|
||||
encodeValuesOnly
|
||||
encodeValuesOnly,
|
||||
charset
|
||||
) {
|
||||
var obj = object;
|
||||
if (typeof filter === 'function') {
|
||||
obj = filter(prefix, obj);
|
||||
} else if (obj instanceof Date) {
|
||||
obj = serializeDate(obj);
|
||||
} else if (obj === null) {
|
||||
}
|
||||
|
||||
if (obj === null) {
|
||||
if (strictNullHandling) {
|
||||
return encoder && !encodeValuesOnly ? encoder(prefix, defaults.encoder) : prefix;
|
||||
return encoder && !encodeValuesOnly ? encoder(prefix, defaults.encoder, charset) : prefix;
|
||||
}
|
||||
|
||||
obj = '';
|
||||
|
@ -721,8 +751,8 @@ var stringify = function stringify( // eslint-disable-line func-name-matching
|
|||
|
||||
if (typeof obj === 'string' || typeof obj === 'number' || typeof obj === 'boolean' || utils.isBuffer(obj)) {
|
||||
if (encoder) {
|
||||
var keyValue = encodeValuesOnly ? prefix : encoder(prefix, defaults.encoder);
|
||||
return [formatter(keyValue) + '=' + formatter(encoder(obj, defaults.encoder))];
|
||||
var keyValue = encodeValuesOnly ? prefix : encoder(prefix, defaults.encoder, charset);
|
||||
return [formatter(keyValue) + '=' + formatter(encoder(obj, defaults.encoder, charset))];
|
||||
}
|
||||
return [formatter(prefix) + '=' + formatter(String(obj))];
|
||||
}
|
||||
|
@ -749,7 +779,7 @@ var stringify = function stringify( // eslint-disable-line func-name-matching
|
|||
}
|
||||
|
||||
if (Array.isArray(obj)) {
|
||||
values = values.concat(stringify(
|
||||
pushToArray(values, stringify(
|
||||
obj[key],
|
||||
generateArrayPrefix(prefix, key),
|
||||
generateArrayPrefix,
|
||||
|
@ -761,10 +791,11 @@ var stringify = function stringify( // eslint-disable-line func-name-matching
|
|||
allowDots,
|
||||
serializeDate,
|
||||
formatter,
|
||||
encodeValuesOnly
|
||||
encodeValuesOnly,
|
||||
charset
|
||||
));
|
||||
} else {
|
||||
values = values.concat(stringify(
|
||||
pushToArray(values, stringify(
|
||||
obj[key],
|
||||
prefix + (allowDots ? '.' + key : '[' + key + ']'),
|
||||
generateArrayPrefix,
|
||||
|
@ -776,7 +807,8 @@ var stringify = function stringify( // eslint-disable-line func-name-matching
|
|||
allowDots,
|
||||
serializeDate,
|
||||
formatter,
|
||||
encodeValuesOnly
|
||||
encodeValuesOnly,
|
||||
charset
|
||||
));
|
||||
}
|
||||
}
|
||||
|
@ -798,9 +830,14 @@ module.exports = function (object, opts) {
|
|||
var encode = typeof options.encode === 'boolean' ? options.encode : defaults.encode;
|
||||
var encoder = typeof options.encoder === 'function' ? options.encoder : defaults.encoder;
|
||||
var sort = typeof options.sort === 'function' ? options.sort : null;
|
||||
var allowDots = typeof options.allowDots === 'undefined' ? false : options.allowDots;
|
||||
var allowDots = typeof options.allowDots === 'undefined' ? defaults.allowDots : !!options.allowDots;
|
||||
var serializeDate = typeof options.serializeDate === 'function' ? options.serializeDate : defaults.serializeDate;
|
||||
var encodeValuesOnly = typeof options.encodeValuesOnly === 'boolean' ? options.encodeValuesOnly : defaults.encodeValuesOnly;
|
||||
var charset = options.charset || defaults.charset;
|
||||
if (typeof options.charset !== 'undefined' && options.charset !== 'utf-8' && options.charset !== 'iso-8859-1') {
|
||||
throw new Error('The charset option must be either utf-8, iso-8859-1, or undefined');
|
||||
}
|
||||
|
||||
if (typeof options.format === 'undefined') {
|
||||
options.format = formats['default'];
|
||||
} else if (!Object.prototype.hasOwnProperty.call(formats.formatters, options.format)) {
|
||||
|
@ -849,8 +886,7 @@ module.exports = function (object, opts) {
|
|||
if (skipNulls && obj[key] === null) {
|
||||
continue;
|
||||
}
|
||||
|
||||
keys = keys.concat(stringify(
|
||||
pushToArray(keys, stringify(
|
||||
obj[key],
|
||||
key,
|
||||
generateArrayPrefix,
|
||||
|
@ -862,20 +898,31 @@ module.exports = function (object, opts) {
|
|||
allowDots,
|
||||
serializeDate,
|
||||
formatter,
|
||||
encodeValuesOnly
|
||||
encodeValuesOnly,
|
||||
charset
|
||||
));
|
||||
}
|
||||
|
||||
var joined = keys.join(delimiter);
|
||||
var prefix = options.addQueryPrefix === true ? '?' : '';
|
||||
|
||||
if (options.charsetSentinel) {
|
||||
if (charset === 'iso-8859-1') {
|
||||
// encodeURIComponent('✓'), the "numeric entity" representation of a checkmark
|
||||
prefix += 'utf8=%26%2310003%3B&';
|
||||
} else {
|
||||
// encodeURIComponent('✓')
|
||||
prefix += 'utf8=%E2%9C%93&';
|
||||
}
|
||||
}
|
||||
|
||||
return joined.length > 0 ? prefix + joined : '';
|
||||
};
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 301:
|
||||
/***/ 302:
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
"use strict";
|
||||
|
@ -889,21 +936,62 @@ var defaults = {
|
|||
allowDots: false,
|
||||
allowPrototypes: false,
|
||||
arrayLimit: 20,
|
||||
charset: 'utf-8',
|
||||
charsetSentinel: false,
|
||||
decoder: utils.decode,
|
||||
delimiter: '&',
|
||||
depth: 5,
|
||||
ignoreQueryPrefix: false,
|
||||
interpretNumericEntities: false,
|
||||
parameterLimit: 1000,
|
||||
parseArrays: true,
|
||||
plainObjects: false,
|
||||
strictNullHandling: false
|
||||
};
|
||||
|
||||
var interpretNumericEntities = function (str) {
|
||||
return str.replace(/&#(\d+);/g, function ($0, numberStr) {
|
||||
return String.fromCharCode(parseInt(numberStr, 10));
|
||||
});
|
||||
};
|
||||
|
||||
// This is what browsers will submit when the ✓ character occurs in an
|
||||
// application/x-www-form-urlencoded body and the encoding of the page containing
|
||||
// the form is iso-8859-1, or when the submitted form has an accept-charset
|
||||
// attribute of iso-8859-1. Presumably also with other charsets that do not contain
|
||||
// the ✓ character, such as us-ascii.
|
||||
var isoSentinel = 'utf8=%26%2310003%3B'; // encodeURIComponent('✓')
|
||||
|
||||
// These are the percent-encoded utf-8 octets representing a checkmark, indicating that the request actually is utf-8 encoded.
|
||||
var charsetSentinel = 'utf8=%E2%9C%93'; // encodeURIComponent('✓')
|
||||
|
||||
var parseValues = function parseQueryStringValues(str, options) {
|
||||
var obj = {};
|
||||
var cleanStr = options.ignoreQueryPrefix ? str.replace(/^\?/, '') : str;
|
||||
var limit = options.parameterLimit === Infinity ? undefined : options.parameterLimit;
|
||||
var parts = cleanStr.split(options.delimiter, limit);
|
||||
var skipIndex = -1; // Keep track of where the utf8 sentinel was found
|
||||
var i;
|
||||
|
||||
for (var i = 0; i < parts.length; ++i) {
|
||||
var charset = options.charset;
|
||||
if (options.charsetSentinel) {
|
||||
for (i = 0; i < parts.length; ++i) {
|
||||
if (parts[i].indexOf('utf8=') === 0) {
|
||||
if (parts[i] === charsetSentinel) {
|
||||
charset = 'utf-8';
|
||||
} else if (parts[i] === isoSentinel) {
|
||||
charset = 'iso-8859-1';
|
||||
}
|
||||
skipIndex = i;
|
||||
i = parts.length; // The eslint settings do not allow break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (i = 0; i < parts.length; ++i) {
|
||||
if (i === skipIndex) {
|
||||
continue;
|
||||
}
|
||||
var part = parts[i];
|
||||
|
||||
var bracketEqualsPos = part.indexOf(']=');
|
||||
|
@ -911,14 +999,18 @@ var parseValues = function parseQueryStringValues(str, options) {
|
|||
|
||||
var key, val;
|
||||
if (pos === -1) {
|
||||
key = options.decoder(part, defaults.decoder);
|
||||
key = options.decoder(part, defaults.decoder, charset);
|
||||
val = options.strictNullHandling ? null : '';
|
||||
} else {
|
||||
key = options.decoder(part.slice(0, pos), defaults.decoder);
|
||||
val = options.decoder(part.slice(pos + 1), defaults.decoder);
|
||||
key = options.decoder(part.slice(0, pos), defaults.decoder, charset);
|
||||
val = options.decoder(part.slice(pos + 1), defaults.decoder, charset);
|
||||
}
|
||||
|
||||
if (val && options.interpretNumericEntities && charset === 'iso-8859-1') {
|
||||
val = interpretNumericEntities(val);
|
||||
}
|
||||
if (has.call(obj, key)) {
|
||||
obj[key] = [].concat(obj[key]).concat(val);
|
||||
obj[key] = utils.combine(obj[key], val);
|
||||
} else {
|
||||
obj[key] = val;
|
||||
}
|
||||
|
@ -934,14 +1026,15 @@ var parseObject = function (chain, val, options) {
|
|||
var obj;
|
||||
var root = chain[i];
|
||||
|
||||
if (root === '[]') {
|
||||
obj = [];
|
||||
obj = obj.concat(leaf);
|
||||
if (root === '[]' && options.parseArrays) {
|
||||
obj = [].concat(leaf);
|
||||
} else {
|
||||
obj = options.plainObjects ? Object.create(null) : {};
|
||||
var cleanRoot = root.charAt(0) === '[' && root.charAt(root.length - 1) === ']' ? root.slice(1, -1) : root;
|
||||
var index = parseInt(cleanRoot, 10);
|
||||
if (
|
||||
if (!options.parseArrays && cleanRoot === '') {
|
||||
obj = { 0: leaf };
|
||||
} else if (
|
||||
!isNaN(index)
|
||||
&& root !== cleanRoot
|
||||
&& String(index) === cleanRoot
|
||||
|
@ -983,8 +1076,7 @@ var parseKeys = function parseQueryStringKeys(givenKey, val, options) {
|
|||
|
||||
var keys = [];
|
||||
if (parent) {
|
||||
// If we aren't using plain objects, optionally prefix keys
|
||||
// that would overwrite object prototype properties
|
||||
// If we aren't using plain objects, optionally prefix keys that would overwrite object prototype properties
|
||||
if (!options.plainObjects && has.call(Object.prototype, parent)) {
|
||||
if (!options.allowPrototypes) {
|
||||
return;
|
||||
|
@ -1029,12 +1121,19 @@ module.exports = function (str, opts) {
|
|||
options.arrayLimit = typeof options.arrayLimit === 'number' ? options.arrayLimit : defaults.arrayLimit;
|
||||
options.parseArrays = options.parseArrays !== false;
|
||||
options.decoder = typeof options.decoder === 'function' ? options.decoder : defaults.decoder;
|
||||
options.allowDots = typeof options.allowDots === 'boolean' ? options.allowDots : defaults.allowDots;
|
||||
options.allowDots = typeof options.allowDots === 'undefined' ? defaults.allowDots : !!options.allowDots;
|
||||
options.plainObjects = typeof options.plainObjects === 'boolean' ? options.plainObjects : defaults.plainObjects;
|
||||
options.allowPrototypes = typeof options.allowPrototypes === 'boolean' ? options.allowPrototypes : defaults.allowPrototypes;
|
||||
options.parameterLimit = typeof options.parameterLimit === 'number' ? options.parameterLimit : defaults.parameterLimit;
|
||||
options.strictNullHandling = typeof options.strictNullHandling === 'boolean' ? options.strictNullHandling : defaults.strictNullHandling;
|
||||
|
||||
if (typeof options.charset !== 'undefined' && options.charset !== 'utf-8' && options.charset !== 'iso-8859-1') {
|
||||
throw new Error('The charset option must be either utf-8, iso-8859-1, or undefined');
|
||||
}
|
||||
if (typeof options.charset === 'undefined') {
|
||||
options.charset = defaults.charset;
|
||||
}
|
||||
|
||||
if (str === '' || str === null || typeof str === 'undefined') {
|
||||
return options.plainObjects ? Object.create(null) : {};
|
||||
}
|
||||
|
@ -1063,8 +1162,8 @@ module.exports = function (str, opts) {
|
|||
"use strict";
|
||||
|
||||
|
||||
var stringify = __webpack_require__(300);
|
||||
var parse = __webpack_require__(301);
|
||||
var stringify = __webpack_require__(301);
|
||||
var parse = __webpack_require__(302);
|
||||
var formats = __webpack_require__(180);
|
||||
|
||||
module.exports = {
|
||||
|
|
2
wp-includes/js/dist/url.min.js
vendored
2
wp-includes/js/dist/url.min.js
vendored
File diff suppressed because one or more lines are too long
|
@ -103,6 +103,12 @@ if (typeof FormData === 'undefined' || !FormData.prototype.keys) {
|
|||
: [name + '', value + '']
|
||||
}
|
||||
|
||||
function each (arr, cb) {
|
||||
for (let i = 0; i < arr.length; i++) {
|
||||
cb(arr[i])
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @implements {Iterable}
|
||||
*/
|
||||
|
@ -119,20 +125,25 @@ if (typeof FormData === 'undefined' || !FormData.prototype.keys) {
|
|||
if (!form)
|
||||
return this
|
||||
|
||||
for (let elm of arrayFrom(form.elements)) {
|
||||
if (!elm.name || elm.disabled) continue
|
||||
const self = this
|
||||
|
||||
if (elm.type === 'file')
|
||||
for (let file of arrayFrom(elm.files || []))
|
||||
this.append(elm.name, file)
|
||||
else if (elm.type === 'select-multiple' || elm.type === 'select-one')
|
||||
for (let opt of arrayFrom(elm.options))
|
||||
!opt.disabled && opt.selected && this.append(elm.name, opt.value)
|
||||
else if (elm.type === 'checkbox' || elm.type === 'radio') {
|
||||
if (elm.checked) this.append(elm.name, elm.value)
|
||||
} else
|
||||
this.append(elm.name, elm.value)
|
||||
}
|
||||
each(form.elements, elm => {
|
||||
if (!elm.name || elm.disabled || elm.type === 'submit' || elm.type === 'button') return
|
||||
|
||||
if (elm.type === 'file') {
|
||||
each(elm.files || [], file => {
|
||||
self.append(elm.name, file)
|
||||
})
|
||||
} else if (elm.type === 'select-multiple' || elm.type === 'select-one') {
|
||||
each(elm.options, opt => {
|
||||
!opt.disabled && opt.selected && self.append(elm.name, opt.value)
|
||||
})
|
||||
} else if (elm.type === 'checkbox' || elm.type === 'radio') {
|
||||
if (elm.checked) self.append(elm.name, elm.value)
|
||||
} else {
|
||||
self.append(elm.name, elm.value)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
|
@ -359,7 +370,7 @@ if (typeof FormData === 'undefined' || !FormData.prototype.keys) {
|
|||
|
||||
// Patch xhr's send method to call _blob transparently
|
||||
if (_send) {
|
||||
XMLHttpRequest.prototype.send = function(data) {
|
||||
XMLHttpRequest.prototype.send = function(data) {
|
||||
// I would check if Content-Type isn't already set
|
||||
// But xhr lacks getRequestHeaders functionallity
|
||||
// https://github.com/jimmywarting/FormData/issues/44
|
||||
|
|
|
@ -1,17 +1,17 @@
|
|||
;(function(){var k,l="function"==typeof Object.defineProperties?Object.defineProperty:function(a,b,d){a!=Array.prototype&&a!=Object.prototype&&(a[b]=d.value)},m="undefined"!=typeof window&&window===this?this:"undefined"!=typeof global&&null!=global?global:this;function n(){n=function(){};m.Symbol||(m.Symbol=p)}var p=function(){var a=0;return function(b){return"jscomp_symbol_"+(b||"")+a++}}();
|
||||
function r(){n();var a=m.Symbol.iterator;a||(a=m.Symbol.iterator=m.Symbol("iterator"));"function"!=typeof Array.prototype[a]&&l(Array.prototype,a,{configurable:!0,writable:!0,value:function(){return t(this)}});r=function(){}}function t(a){var b=0;return v(function(){return b<a.length?{done:!1,value:a[b++]}:{done:!0}})}function v(a){r();a={next:a};a[m.Symbol.iterator]=function(){return this};return a}function w(a){r();n();r();var b=a[Symbol.iterator];return b?b.call(a):t(a)}var x;
|
||||
if("function"==typeof Object.setPrototypeOf)x=Object.setPrototypeOf;else{var z;a:{var A={o:!0},B={};try{B.__proto__=A;z=B.o;break a}catch(a){}z=!1}x=z?function(a,b){a.__proto__=b;if(a.__proto__!==b)throw new TypeError(a+" is not extensible");return a}:null}var C=x;function D(){this.g=!1;this.c=null;this.m=void 0;this.b=1;this.l=this.s=0;this.f=null}function E(a){if(a.g)throw new TypeError("Generator is already running");a.g=!0}D.prototype.h=function(a){this.m=a};
|
||||
;(function(){var k;function l(a){var b=0;return function(){return b<a.length?{done:!1,value:a[b++]}:{done:!0}}}var m="function"==typeof Object.defineProperties?Object.defineProperty:function(a,b,d){a!=Array.prototype&&a!=Object.prototype&&(a[b]=d.value)},n="undefined"!=typeof window&&window===this?this:"undefined"!=typeof global&&null!=global?global:this;function p(){p=function(){};n.Symbol||(n.Symbol=r)}var r=function(){var a=0;return function(b){return"jscomp_symbol_"+(b||"")+a++}}();
|
||||
function u(){p();var a=n.Symbol.iterator;a||(a=n.Symbol.iterator=n.Symbol("iterator"));"function"!=typeof Array.prototype[a]&&m(Array.prototype,a,{configurable:!0,writable:!0,value:function(){return v(l(this))}});u=function(){}}function v(a){u();a={next:a};a[n.Symbol.iterator]=function(){return this};return a}function x(a){var b="undefined"!=typeof Symbol&&Symbol.iterator&&a[Symbol.iterator];return b?b.call(a):{next:l(a)}}var y;
|
||||
if("function"==typeof Object.setPrototypeOf)y=Object.setPrototypeOf;else{var z;a:{var A={o:!0},B={};try{B.__proto__=A;z=B.o;break a}catch(a){}z=!1}y=z?function(a,b){a.__proto__=b;if(a.__proto__!==b)throw new TypeError(a+" is not extensible");return a}:null}var C=y;function D(){this.g=!1;this.c=null;this.m=void 0;this.b=1;this.l=this.s=0;this.f=null}function E(a){if(a.g)throw new TypeError("Generator is already running");a.g=!0}D.prototype.h=function(a){this.m=a};
|
||||
D.prototype.i=function(a){this.f={u:a,v:!0};this.b=this.s||this.l};D.prototype["return"]=function(a){this.f={"return":a};this.b=this.l};function F(a,b,d){a.b=d;return{value:b}}function G(a){this.w=a;this.j=[];for(var b in a)this.j.push(b);this.j.reverse()}function H(a){this.a=new D;this.A=a}H.prototype.h=function(a){E(this.a);if(this.a.c)return I(this,this.a.c.next,a,this.a.h);this.a.h(a);return J(this)};
|
||||
function K(a,b){E(a.a);var d=a.a.c;if(d)return I(a,"return"in d?d["return"]:function(a){return{value:a,done:!0}},b,a.a["return"]);a.a["return"](b);return J(a)}H.prototype.i=function(a){E(this.a);if(this.a.c)return I(this,this.a.c["throw"],a,this.a.h);this.a.i(a);return J(this)};
|
||||
function I(a,b,d,c){try{var e=b.call(a.a.c,d);if(!(e instanceof Object))throw new TypeError("Iterator result "+e+" is not an object");if(!e.done)return a.a.g=!1,e;var f=e.value}catch(g){return a.a.c=null,a.a.i(g),J(a)}a.a.c=null;c.call(a.a,f);return J(a)}function J(a){for(;a.a.b;)try{var b=a.A(a.a);if(b)return a.a.g=!1,{value:b.value,done:!1}}catch(d){a.a.m=void 0,a.a.i(d)}a.a.g=!1;if(a.a.f){b=a.a.f;a.a.f=null;if(b.v)throw b.u;return{value:b["return"],done:!0}}return{value:void 0,done:!0}}
|
||||
function L(a){this.next=function(b){return a.h(b)};this["throw"]=function(b){return a.i(b)};this["return"]=function(b){return K(a,b)};r();n();r();this[Symbol.iterator]=function(){return this}}function M(a,b){var d=new L(new H(b));C&&C(d,a.prototype);return d}
|
||||
if("undefined"===typeof FormData||!FormData.prototype.keys){var N=function(a,b,d){if(2>arguments.length)throw new TypeError("2 arguments required, but only "+arguments.length+" present.");return b instanceof Blob?[a+"",b,void 0!==d?d+"":"string"===typeof b.name?b.name:"blob"]:[a+"",b+""]},O=function(a){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");return[a+""]},P=function(a){var b=w(a);a=b.next().value;b=b.next().value;a instanceof Blob&&(a=new File([a],b,{type:a.type,
|
||||
lastModified:a.lastModified}));return a},Q="object"===typeof window?window:"object"===typeof self?self:this,R=Q.FormData,S=Q.XMLHttpRequest&&Q.XMLHttpRequest.prototype.send,T=Q.Request&&Q.fetch;n();var U=Q.Symbol&&Symbol.toStringTag,V=new WeakMap,W=Array.from||function(a){return[].slice.call(a)};U&&(Blob.prototype[U]||(Blob.prototype[U]="Blob"),"File"in Q&&!File.prototype[U]&&(File.prototype[U]="File"));try{new File([],"")}catch(a){Q.File=function(b,d,c){b=new Blob(b,c);c=c&&void 0!==c.lastModified?
|
||||
new Date(c.lastModified):new Date;Object.defineProperties(b,{name:{value:d},lastModifiedDate:{value:c},lastModified:{value:+c},toString:{value:function(){return"[object File]"}}});U&&Object.defineProperty(b,U,{value:"File"});return b}}var X=function(a){V.set(this,Object.create(null));if(!a)return this;a=w(W(a.elements));for(var b=a.next();!b.done;b=a.next())if(b=b.value,b.name&&!b.disabled)if("file"===b.type)for(var d=w(W(b.files||[])),c=d.next();!c.done;c=d.next())this.append(b.name,c.value);else if("select-multiple"===
|
||||
b.type||"select-one"===b.type)for(d=w(W(b.options)),c=d.next();!c.done;c=d.next())c=c.value,!c.disabled&&c.selected&&this.append(b.name,c.value);else"checkbox"===b.type||"radio"===b.type?b.checked&&this.append(b.name,b.value):this.append(b.name,b.value)};k=X.prototype;k.append=function(a,b,d){var c=V.get(this);c[a]||(c[a]=[]);c[a].push([b,d])};k["delete"]=function(a){delete V.get(this)[a]};k.entries=function b(){var d=this,c,e,f,g,h,q;return M(b,function(b){switch(b.b){case 1:c=V.get(d),f=new G(c);
|
||||
case 2:var u;a:{for(u=f;0<u.j.length;){var y=u.j.pop();if(y in u.w){u=y;break a}}u=null}if(null==(e=u)){b.b=0;break}g=w(c[e]);h=g.next();case 5:if(h.done){b.b=2;break}q=h.value;return F(b,[e,P(q)],6);case 6:h=g.next(),b.b=5}})};k.forEach=function(b,d){for(var c=w(this),e=c.next();!e.done;e=c.next()){var f=w(e.value);e=f.next().value;f=f.next().value;b.call(d,f,e,this)}};k.get=function(b){var d=V.get(this);return d[b]?P(d[b][0]):null};k.getAll=function(b){return(V.get(this)[b]||[]).map(P)};k.has=function(b){return b in
|
||||
V.get(this)};k.keys=function d(){var c=this,e,f,g,h,q;return M(d,function(d){1==d.b&&(e=w(c),f=e.next());if(3!=d.b){if(f.done){d.b=0;return}g=f.value;h=w(g);q=h.next().value;return F(d,q,3)}f=e.next();d.b=2})};k.set=function(d,c,e){V.get(this)[d]=[[c,e]]};k.values=function c(){var e=this,f,g,h,q,y;return M(c,function(c){1==c.b&&(f=w(e),g=f.next());if(3!=c.b){if(g.done){c.b=0;return}h=g.value;q=w(h);q.next();y=q.next().value;return F(c,y,3)}g=f.next();c.b=2})};X.prototype._asNative=function(){for(var c=
|
||||
new R,e=w(this),f=e.next();!f.done;f=e.next()){var g=w(f.value);f=g.next().value;g=g.next().value;c.append(f,g)}return c};X.prototype._blob=function(){for(var c="----formdata-polyfill-"+Math.random(),e=[],f=w(this),g=f.next();!g.done;g=f.next()){var h=w(g.value);g=h.next().value;h=h.next().value;e.push("--"+c+"\r\n");h instanceof Blob?e.push('Content-Disposition: form-data; name="'+g+'"; filename="'+h.name+'"\r\n',"Content-Type: "+(h.type||"application/octet-stream")+"\r\n\r\n",h,"\r\n"):e.push('Content-Disposition: form-data; name="'+
|
||||
g+'"\r\n\r\n'+h+"\r\n")}e.push("--"+c+"--");return new Blob(e,{type:"multipart/form-data; boundary="+c})};n();r();X.prototype[Symbol.iterator]=function(){return this.entries()};X.prototype.toString=function(){return"[object FormData]"};U&&(X.prototype[U]="FormData");[["append",N],["delete",O],["get",O],["getAll",O],["has",O],["set",N]].forEach(function(c){var e=X.prototype[c[0]];X.prototype[c[0]]=function(){return e.apply(this,c[1].apply(this,W(arguments)))}});S&&(XMLHttpRequest.prototype.send=function(c){c instanceof
|
||||
X?(c=c._blob(),this.setRequestHeader("Content-Type",c.type),S.call(this,c)):S.call(this,c)});if(T){var Y=Q.fetch;Q.fetch=function(c,e){e&&e.body&&e.body instanceof X&&(e.body=e.body._blob());return Y(c,e)}}Q.FormData=X};
|
||||
function L(a){this.next=function(b){return a.h(b)};this["throw"]=function(b){return a.i(b)};this["return"]=function(b){return K(a,b)};u();this[Symbol.iterator]=function(){return this}}function M(a,b){var d=new L(new H(b));C&&C(d,a.prototype);return d}
|
||||
if("undefined"===typeof FormData||!FormData.prototype.keys){var N=function(a,b){for(var d=0;d<a.length;d++)b(a[d])},O=function(a,b,d){if(2>arguments.length)throw new TypeError("2 arguments required, but only "+arguments.length+" present.");return b instanceof Blob?[a+"",b,void 0!==d?d+"":"string"===typeof b.name?b.name:"blob"]:[a+"",b+""]},P=function(a){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");return[a+""]},Q=function(a){var b=x(a);a=b.next().value;b=b.next().value;
|
||||
a instanceof Blob&&(a=new File([a],b,{type:a.type,lastModified:a.lastModified}));return a},R="object"===typeof window?window:"object"===typeof self?self:this,S=R.FormData,T=R.XMLHttpRequest&&R.XMLHttpRequest.prototype.send,U=R.Request&&R.fetch;p();var V=R.Symbol&&Symbol.toStringTag,W=new WeakMap,X=Array.from||function(a){return[].slice.call(a)};V&&(Blob.prototype[V]||(Blob.prototype[V]="Blob"),"File"in R&&!File.prototype[V]&&(File.prototype[V]="File"));try{new File([],"")}catch(a){R.File=function(b,
|
||||
d,c){b=new Blob(b,c);c=c&&void 0!==c.lastModified?new Date(c.lastModified):new Date;Object.defineProperties(b,{name:{value:d},lastModifiedDate:{value:c},lastModified:{value:+c},toString:{value:function(){return"[object File]"}}});V&&Object.defineProperty(b,V,{value:"File"});return b}}p();u();var Y=function(a){W.set(this,Object.create(null));if(!a)return this;var b=this;N(a.elements,function(a){a.name&&!a.disabled&&"submit"!==a.type&&"button"!==a.type&&("file"===a.type?N(a.files||[],function(c){b.append(a.name,
|
||||
c)}):"select-multiple"===a.type||"select-one"===a.type?N(a.options,function(c){!c.disabled&&c.selected&&b.append(a.name,c.value)}):"checkbox"===a.type||"radio"===a.type?a.checked&&b.append(a.name,a.value):b.append(a.name,a.value))})};k=Y.prototype;k.append=function(a,b,d){var c=W.get(this);c[a]||(c[a]=[]);c[a].push([b,d])};k["delete"]=function(a){delete W.get(this)[a]};k.entries=function b(){var d=this,c,e,f,g,h,q;return M(b,function(b){switch(b.b){case 1:c=W.get(d),f=new G(c);case 2:var t;a:{for(t=
|
||||
f;0<t.j.length;){var w=t.j.pop();if(w in t.w){t=w;break a}}t=null}if(null==(e=t)){b.b=0;break}g=x(c[e]);h=g.next();case 5:if(h.done){b.b=2;break}q=h.value;return F(b,[e,Q(q)],6);case 6:h=g.next(),b.b=5}})};k.forEach=function(b,d){for(var c=x(this),e=c.next();!e.done;e=c.next()){var f=x(e.value);e=f.next().value;f=f.next().value;b.call(d,f,e,this)}};k.get=function(b){var d=W.get(this);return d[b]?Q(d[b][0]):null};k.getAll=function(b){return(W.get(this)[b]||[]).map(Q)};k.has=function(b){return b in
|
||||
W.get(this)};k.keys=function d(){var c=this,e,f,g,h,q;return M(d,function(d){1==d.b&&(e=x(c),f=e.next());if(3!=d.b){if(f.done){d.b=0;return}g=f.value;h=x(g);q=h.next().value;return F(d,q,3)}f=e.next();d.b=2})};k.set=function(d,c,e){W.get(this)[d]=[[c,e]]};k.values=function c(){var e=this,f,g,h,q,w;return M(c,function(c){1==c.b&&(f=x(e),g=f.next());if(3!=c.b){if(g.done){c.b=0;return}h=g.value;q=x(h);q.next();w=q.next().value;return F(c,w,3)}g=f.next();c.b=2})};Y.prototype._asNative=function(){for(var c=
|
||||
new S,e=x(this),f=e.next();!f.done;f=e.next()){var g=x(f.value);f=g.next().value;g=g.next().value;c.append(f,g)}return c};Y.prototype._blob=function(){for(var c="----formdata-polyfill-"+Math.random(),e=[],f=x(this),g=f.next();!g.done;g=f.next()){var h=x(g.value);g=h.next().value;h=h.next().value;e.push("--"+c+"\r\n");h instanceof Blob?e.push('Content-Disposition: form-data; name="'+g+'"; filename="'+h.name+'"\r\n',"Content-Type: "+(h.type||"application/octet-stream")+"\r\n\r\n",h,"\r\n"):e.push('Content-Disposition: form-data; name="'+
|
||||
g+'"\r\n\r\n'+h+"\r\n")}e.push("--"+c+"--");return new Blob(e,{type:"multipart/form-data; boundary="+c})};Y.prototype[Symbol.iterator]=function(){return this.entries()};Y.prototype.toString=function(){return"[object FormData]"};V&&(Y.prototype[V]="FormData");[["append",O],["delete",P],["get",P],["getAll",P],["has",P],["set",O]].forEach(function(c){var e=Y.prototype[c[0]];Y.prototype[c[0]]=function(){return e.apply(this,c[1].apply(this,X(arguments)))}});T&&(XMLHttpRequest.prototype.send=function(c){c instanceof
|
||||
Y?(c=c._blob(),this.setRequestHeader("Content-Type",c.type),T.call(this,c)):T.call(this,c)});if(U){var Z=R.fetch;R.fetch=function(c,e){e&&e.body&&e.body instanceof Y&&(e.body=e.body._blob());return Z(c,e)}}R.FormData=Y};
|
||||
})();
|
||||
|
|
2801
wp-includes/js/dist/vendor/wp-polyfill.js
vendored
2801
wp-includes/js/dist/vendor/wp-polyfill.js
vendored
File diff suppressed because it is too large
Load diff
File diff suppressed because one or more lines are too long
4
wp-includes/js/dist/viewport.js
vendored
4
wp-includes/js/dist/viewport.js
vendored
|
@ -82,7 +82,7 @@ this["wp"] = this["wp"] || {}; this["wp"]["viewport"] =
|
|||
/******/
|
||||
/******/
|
||||
/******/ // Load entry module and return exports
|
||||
/******/ return __webpack_require__(__webpack_require__.s = 316);
|
||||
/******/ return __webpack_require__(__webpack_require__.s = 317);
|
||||
/******/ })
|
||||
/************************************************************************/
|
||||
/******/ ({
|
||||
|
@ -94,7 +94,7 @@ this["wp"] = this["wp"] || {}; this["wp"]["viewport"] =
|
|||
|
||||
/***/ }),
|
||||
|
||||
/***/ 316:
|
||||
/***/ 317:
|
||||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||||
|
||||
"use strict";
|
||||
|
|
2
wp-includes/js/dist/viewport.min.js
vendored
2
wp-includes/js/dist/viewport.min.js
vendored
|
@ -1 +1 @@
|
|||
this.wp=this.wp||{},this.wp.viewport=function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(r,i,function(e){return t[e]}.bind(null,i));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=316)}({2:function(t,e){!function(){t.exports=this.lodash}()},316:function(t,e,n){"use strict";n.r(e);var r={};n.r(r),n.d(r,"setIsMatching",function(){return a});var i={};n.r(i),n.d(i,"isViewportMatch",function(){return f});var o=n(2),c=n(5);var u=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1?arguments[1]:void 0;switch(e.type){case"SET_IS_MATCHING":return e.values}return t};function a(t){return{type:"SET_IS_MATCHING",values:t}}function f(t,e){return-1===e.indexOf(" ")&&(e=">= "+e),!!t[e]}Object(c.registerStore)("core/viewport",{reducer:u,actions:r,selectors:i});var s=n(7),p=function(t){return Object(s.createHigherOrderComponent)(Object(c.withSelect)(function(e){return Object(o.mapValues)(t,function(t){return e("core/viewport").isViewportMatch(t)})}),"withViewportMatch")},d=function(t){return Object(s.createHigherOrderComponent)(Object(s.compose)([p({isViewportMatch:t}),Object(s.ifCondition)(function(t){return t.isViewportMatch})]),"ifViewportMatches")};n.d(e,"ifViewportMatches",function(){return d}),n.d(e,"withViewportMatch",function(){return p});var l={"<":"max-width",">=":"min-width"},h=Object(o.debounce)(function(){var t=Object(o.mapValues)(w,function(t){return t.matches});Object(c.dispatch)("core/viewport").setIsMatching(t)},{leading:!0}),w=Object(o.reduce)({huge:1440,wide:1280,large:960,medium:782,small:600,mobile:480},function(t,e,n){return Object(o.forEach)(l,function(r,i){var o=window.matchMedia("(".concat(r,": ").concat(e,"px)"));o.addListener(h);var c=[i,n].join(" ");t[c]=o}),t},{});window.addEventListener("orientationchange",h),h(),h.flush()},5:function(t,e){!function(){t.exports=this.wp.data}()},7:function(t,e){!function(){t.exports=this.wp.compose}()}});
|
||||
this.wp=this.wp||{},this.wp.viewport=function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(r,i,function(e){return t[e]}.bind(null,i));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=317)}({2:function(t,e){!function(){t.exports=this.lodash}()},317:function(t,e,n){"use strict";n.r(e);var r={};n.r(r),n.d(r,"setIsMatching",function(){return a});var i={};n.r(i),n.d(i,"isViewportMatch",function(){return f});var o=n(2),c=n(5);var u=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1?arguments[1]:void 0;switch(e.type){case"SET_IS_MATCHING":return e.values}return t};function a(t){return{type:"SET_IS_MATCHING",values:t}}function f(t,e){return-1===e.indexOf(" ")&&(e=">= "+e),!!t[e]}Object(c.registerStore)("core/viewport",{reducer:u,actions:r,selectors:i});var s=n(7),p=function(t){return Object(s.createHigherOrderComponent)(Object(c.withSelect)(function(e){return Object(o.mapValues)(t,function(t){return e("core/viewport").isViewportMatch(t)})}),"withViewportMatch")},d=function(t){return Object(s.createHigherOrderComponent)(Object(s.compose)([p({isViewportMatch:t}),Object(s.ifCondition)(function(t){return t.isViewportMatch})]),"ifViewportMatches")};n.d(e,"ifViewportMatches",function(){return d}),n.d(e,"withViewportMatch",function(){return p});var l={"<":"max-width",">=":"min-width"},h=Object(o.debounce)(function(){var t=Object(o.mapValues)(w,function(t){return t.matches});Object(c.dispatch)("core/viewport").setIsMatching(t)},{leading:!0}),w=Object(o.reduce)({huge:1440,wide:1280,large:960,medium:782,small:600,mobile:480},function(t,e,n){return Object(o.forEach)(l,function(r,i){var o=window.matchMedia("(".concat(r,": ").concat(e,"px)"));o.addListener(h);var c=[i,n].join(" ");t[c]=o}),t},{});window.addEventListener("orientationchange",h),h(),h.flush()},5:function(t,e){!function(){t.exports=this.wp.data}()},7:function(t,e){!function(){t.exports=this.wp.compose}()}});
|
4
wp-includes/js/dist/wordcount.js
vendored
4
wp-includes/js/dist/wordcount.js
vendored
|
@ -82,7 +82,7 @@ this["wp"] = this["wp"] || {}; this["wp"]["wordcount"] =
|
|||
/******/
|
||||
/******/
|
||||
/******/ // Load entry module and return exports
|
||||
/******/ return __webpack_require__(__webpack_require__.s = 310);
|
||||
/******/ return __webpack_require__(__webpack_require__.s = 311);
|
||||
/******/ })
|
||||
/************************************************************************/
|
||||
/******/ ({
|
||||
|
@ -94,7 +94,7 @@ this["wp"] = this["wp"] || {}; this["wp"]["wordcount"] =
|
|||
|
||||
/***/ }),
|
||||
|
||||
/***/ 310:
|
||||
/***/ 311:
|
||||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||||
|
||||
"use strict";
|
||||
|
|
2
wp-includes/js/dist/wordcount.min.js
vendored
2
wp-includes/js/dist/wordcount.min.js
vendored
|
@ -1 +1 @@
|
|||
this.wp=this.wp||{},this.wp.wordcount=function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=310)}({2:function(e,t){!function(){e.exports=this.lodash}()},310:function(e,t,n){"use strict";n.r(t);var r=n(2),o={HTMLRegExp:/<\/?[a-z][^>]*?>/gi,HTMLcommentRegExp:/<!--[\s\S]*?-->/g,spaceRegExp:/ | /gi,HTMLEntityRegExp:/&\S+?;/g,connectorRegExp:/--|\u2014/g,removeRegExp:new RegExp(["[","!-@[-`{-~","-¿×÷"," -⯿","⸀-","]"].join(""),"g"),astralRegExp:/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,wordsRegExp:/\S\s+/g,characters_excluding_spacesRegExp:/\S/g,characters_including_spacesRegExp:/[^\f\n\r\t\v\u00AD\u2028\u2029]/g,l10n:{type:"words"}},i=function(e,t){if(e.HTMLRegExp)return t.replace(e.HTMLRegExp,"\n")},c=function(e,t){return e.astralRegExp?t.replace(e.astralRegExp,"a"):t},u=function(e,t){return e.HTMLEntityRegExp?t.replace(e.HTMLEntityRegExp,""):t},p=function(e,t){return e.connectorRegExp?t.replace(e.connectorRegExp," "):t},s=function(e,t){return e.removeRegExp?t.replace(e.removeRegExp,""):t},a=function(e,t){return e.HTMLcommentRegExp?t.replace(e.HTMLcommentRegExp,""):t},g=function(e,t){return e.shortcodesRegExp?t.replace(e.shortcodesRegExp,"\n"):t},d=function(e,t){if(e.spaceRegExp)return t.replace(e.spaceRegExp," ")},f=function(e,t){return e.HTMLEntityRegExp?t.replace(e.HTMLEntityRegExp,"a"):t};function l(e,t,n){if(""===e)return 0;if(e){var l=function(e,t){var n=Object(r.extend)(o,t);return n.shortcodes=n.l10n.shortcodes||{},n.shortcodes&&n.shortcodes.length&&(n.shortcodesRegExp=new RegExp("\\[\\/?(?:"+n.shortcodes.join("|")+")[^\\]]*?\\]","g")),n.type=e||n.l10n.type,"characters_excluding_spaces"!==n.type&&"characters_including_spaces"!==n.type&&(n.type="words"),n}(t,n),x=l[t+"RegExp"],E="words"===l.type?function(e,t,n){return e=Object(r.flow)(i.bind(this,n),a.bind(this,n),g.bind(this,n),d.bind(this,n),u.bind(this,n),p.bind(this,n),s.bind(this,n))(e),(e+="\n").match(t)}(e,x,l):function(e,t,n){return e=Object(r.flow)(i.bind(this,n),a.bind(this,n),g.bind(this,n),d.bind(this,n),c.bind(this,n),f.bind(this,n))(e),(e+="\n").match(t)}(e,x,l);return E?E.length:0}}n.d(t,"count",function(){return l})}});
|
||||
this.wp=this.wp||{},this.wp.wordcount=function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=311)}({2:function(e,t){!function(){e.exports=this.lodash}()},311:function(e,t,n){"use strict";n.r(t);var r=n(2),o={HTMLRegExp:/<\/?[a-z][^>]*?>/gi,HTMLcommentRegExp:/<!--[\s\S]*?-->/g,spaceRegExp:/ | /gi,HTMLEntityRegExp:/&\S+?;/g,connectorRegExp:/--|\u2014/g,removeRegExp:new RegExp(["[","!-@[-`{-~","-¿×÷"," -⯿","⸀-","]"].join(""),"g"),astralRegExp:/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,wordsRegExp:/\S\s+/g,characters_excluding_spacesRegExp:/\S/g,characters_including_spacesRegExp:/[^\f\n\r\t\v\u00AD\u2028\u2029]/g,l10n:{type:"words"}},i=function(e,t){if(e.HTMLRegExp)return t.replace(e.HTMLRegExp,"\n")},c=function(e,t){return e.astralRegExp?t.replace(e.astralRegExp,"a"):t},u=function(e,t){return e.HTMLEntityRegExp?t.replace(e.HTMLEntityRegExp,""):t},p=function(e,t){return e.connectorRegExp?t.replace(e.connectorRegExp," "):t},s=function(e,t){return e.removeRegExp?t.replace(e.removeRegExp,""):t},a=function(e,t){return e.HTMLcommentRegExp?t.replace(e.HTMLcommentRegExp,""):t},g=function(e,t){return e.shortcodesRegExp?t.replace(e.shortcodesRegExp,"\n"):t},d=function(e,t){if(e.spaceRegExp)return t.replace(e.spaceRegExp," ")},f=function(e,t){return e.HTMLEntityRegExp?t.replace(e.HTMLEntityRegExp,"a"):t};function l(e,t,n){if(""===e)return 0;if(e){var l=function(e,t){var n=Object(r.extend)(o,t);return n.shortcodes=n.l10n.shortcodes||{},n.shortcodes&&n.shortcodes.length&&(n.shortcodesRegExp=new RegExp("\\[\\/?(?:"+n.shortcodes.join("|")+")[^\\]]*?\\]","g")),n.type=e||n.l10n.type,"characters_excluding_spaces"!==n.type&&"characters_including_spaces"!==n.type&&(n.type="words"),n}(t,n),x=l[t+"RegExp"],E="words"===l.type?function(e,t,n){return e=Object(r.flow)(i.bind(this,n),a.bind(this,n),g.bind(this,n),d.bind(this,n),u.bind(this,n),p.bind(this,n),s.bind(this,n))(e),(e+="\n").match(t)}(e,x,l):function(e,t,n){return e=Object(r.flow)(i.bind(this,n),a.bind(this,n),g.bind(this,n),d.bind(this,n),c.bind(this,n),f.bind(this,n))(e),(e+="\n").match(t)}(e,x,l);return E?E.length:0}}n.d(t,"count",function(){return l})}});
|
|
@ -24,76 +24,93 @@
|
|||
* - heartbeat-nonces-expired
|
||||
*
|
||||
* @since 3.6.0
|
||||
* @output wp-includes/js/heartbeat.js
|
||||
*/
|
||||
|
||||
( function( $, window, undefined ) {
|
||||
|
||||
/**
|
||||
* Constructs the Heartbeat API.
|
||||
*
|
||||
* @since 3.6.0
|
||||
*
|
||||
* @returns {Object} An instance of the Heartbeat class.
|
||||
* @constructor
|
||||
*/
|
||||
var Heartbeat = function() {
|
||||
var $document = $(document),
|
||||
settings = {
|
||||
// Suspend/resume
|
||||
// Suspend/resume.
|
||||
suspend: false,
|
||||
|
||||
// Whether suspending is enabled
|
||||
// Whether suspending is enabled.
|
||||
suspendEnabled: true,
|
||||
|
||||
// Current screen id, defaults to the JS global 'pagenow' when present (in the admin) or 'front'
|
||||
// Current screen id, defaults to the JS global 'pagenow' when present
|
||||
// (in the admin) or 'front'.
|
||||
screenId: '',
|
||||
|
||||
// XHR request URL, defaults to the JS global 'ajaxurl' when present
|
||||
// XHR request URL, defaults to the JS global 'ajaxurl' when present.
|
||||
url: '',
|
||||
|
||||
// Timestamp, start of the last connection request
|
||||
// Timestamp, start of the last connection request.
|
||||
lastTick: 0,
|
||||
|
||||
// Container for the enqueued items
|
||||
// Container for the enqueued items.
|
||||
queue: {},
|
||||
|
||||
// Connect interval (in seconds)
|
||||
// Connect interval (in seconds).
|
||||
mainInterval: 60,
|
||||
|
||||
// Used when the interval is set to 5 sec. temporarily
|
||||
// Used when the interval is set to 5 sec. temporarily.
|
||||
tempInterval: 0,
|
||||
|
||||
// Used when the interval is reset
|
||||
// Used when the interval is reset.
|
||||
originalInterval: 0,
|
||||
|
||||
// Used to limit the number of AJAX requests.
|
||||
minimalInterval: 0,
|
||||
|
||||
// Used together with tempInterval
|
||||
// Used together with tempInterval.
|
||||
countdown: 0,
|
||||
|
||||
// Whether a connection is currently in progress
|
||||
// Whether a connection is currently in progress.
|
||||
connecting: false,
|
||||
|
||||
// Whether a connection error occurred
|
||||
// Whether a connection error occurred.
|
||||
connectionError: false,
|
||||
|
||||
// Used to track non-critical errors
|
||||
// Used to track non-critical errors.
|
||||
errorcount: 0,
|
||||
|
||||
// Whether at least one connection has completed successfully
|
||||
// Whether at least one connection has been completed successfully.
|
||||
hasConnected: false,
|
||||
|
||||
// Whether the current browser window is in focus and the user is active
|
||||
// Whether the current browser window is in focus and the user is active.
|
||||
hasFocus: true,
|
||||
|
||||
// Timestamp, last time the user was active. Checked every 30 sec.
|
||||
userActivity: 0,
|
||||
|
||||
// Flags whether events tracking user activity were set
|
||||
// Flag whether events tracking user activity were set.
|
||||
userActivityEvents: false,
|
||||
|
||||
// Timer that keeps track of how long a user has focus.
|
||||
checkFocusTimer: 0,
|
||||
|
||||
// Timer that keeps track of how long needs to be waited before connecting to
|
||||
// the server again.
|
||||
beatTimer: 0
|
||||
};
|
||||
|
||||
/**
|
||||
* Set local vars and events, then start
|
||||
* Sets local variables and events, then starts the heartbeat.
|
||||
*
|
||||
* @access private
|
||||
*
|
||||
* @return void
|
||||
* @since 3.8.0
|
||||
*
|
||||
* @returns {void}
|
||||
*/
|
||||
function initialize() {
|
||||
var options, hidden, visibilityState, visibilitychange;
|
||||
|
@ -106,17 +123,20 @@
|
|||
settings.url = window.ajaxurl;
|
||||
}
|
||||
|
||||
// Pull in options passed from PHP
|
||||
// Pull in options passed from PHP.
|
||||
if ( typeof window.heartbeatSettings === 'object' ) {
|
||||
options = window.heartbeatSettings;
|
||||
|
||||
// The XHR URL can be passed as option when window.ajaxurl is not set
|
||||
// The XHR URL can be passed as option when window.ajaxurl is not set.
|
||||
if ( ! settings.url && options.ajaxurl ) {
|
||||
settings.url = options.ajaxurl;
|
||||
}
|
||||
|
||||
// The interval can be from 15 to 120 sec. and can be set temporarily to 5 sec.
|
||||
// It can be set in the initial options or changed later from JS and/or from PHP.
|
||||
/*
|
||||
* The interval can be from 15 to 120 sec. and can be set temporarily to 5 sec.
|
||||
* It can be set in the initial options or changed later through JS and/or
|
||||
* through PHP.
|
||||
*/
|
||||
if ( options.interval ) {
|
||||
settings.mainInterval = options.interval;
|
||||
|
||||
|
@ -127,11 +147,14 @@
|
|||
}
|
||||
}
|
||||
|
||||
// Used to limit the number of AJAX requests. Overrides all other intervals if they are shorter.
|
||||
// Needed for some hosts that cannot handle frequent requests and the user may exceed the allocated server CPU time, etc.
|
||||
// The minimal interval can be up to 600 sec. however setting it to longer than 120 sec. will limit or disable
|
||||
// some of the functionality (like post locks).
|
||||
// Once set at initialization, minimalInterval cannot be changed/overridden.
|
||||
/*
|
||||
* Used to limit the number of AJAX requests. Overrides all other intervals if
|
||||
* they are shorter. Needed for some hosts that cannot handle frequent requests
|
||||
* and the user may exceed the allocated server CPU time, etc. The minimal
|
||||
* interval can be up to 600 sec. however setting it to longer than 120 sec.
|
||||
* will limit or disable some of the functionality (like post locks). Once set
|
||||
* at initialization, minimalInterval cannot be changed/overridden.
|
||||
*/
|
||||
if ( options.minimalInterval ) {
|
||||
options.minimalInterval = parseInt( options.minimalInterval, 10 );
|
||||
settings.minimalInterval = options.minimalInterval > 0 && options.minimalInterval <= 600 ? options.minimalInterval * 1000 : 0;
|
||||
|
@ -141,7 +164,8 @@
|
|||
settings.mainInterval = settings.minimalInterval;
|
||||
}
|
||||
|
||||
// 'screenId' can be added from settings on the front end where the JS global 'pagenow' is not set
|
||||
// 'screenId' can be added from settings on the front end where the JS global
|
||||
// 'pagenow' is not set.
|
||||
if ( ! settings.screenId ) {
|
||||
settings.screenId = options.screenId || 'front';
|
||||
}
|
||||
|
@ -151,13 +175,16 @@
|
|||
}
|
||||
}
|
||||
|
||||
// Convert to milliseconds
|
||||
// Convert to milliseconds.
|
||||
settings.mainInterval = settings.mainInterval * 1000;
|
||||
settings.originalInterval = settings.mainInterval;
|
||||
|
||||
// Switch the interval to 120 sec. by using the Page Visibility API.
|
||||
// If the browser doesn't support it (Safari < 7, Android < 4.4, IE < 10), the interval
|
||||
// will be increased to 120 sec. after 5 min. of mouse and keyboard inactivity.
|
||||
/*
|
||||
* Switch the interval to 120 seconds by using the Page Visibility API.
|
||||
* If the browser doesn't support it (Safari < 7, Android < 4.4, IE < 10), the
|
||||
* interval will be increased to 120 seconds after 5 minutes of mouse and keyboard
|
||||
* inactivity.
|
||||
*/
|
||||
if ( typeof document.hidden !== 'undefined' ) {
|
||||
hidden = 'hidden';
|
||||
visibilitychange = 'visibilitychange';
|
||||
|
@ -196,10 +223,10 @@
|
|||
}
|
||||
|
||||
$(window).on( 'unload.wp-heartbeat', function() {
|
||||
// Don't connect any more
|
||||
// Don't connect anymore.
|
||||
settings.suspend = true;
|
||||
|
||||
// Abort the last request if not completed
|
||||
// Abort the last request if not completed.
|
||||
if ( settings.xhr && settings.xhr.readyState !== 4 ) {
|
||||
settings.xhr.abort();
|
||||
}
|
||||
|
@ -208,7 +235,7 @@
|
|||
// Check for user activity every 30 seconds.
|
||||
window.setInterval( checkUserActivity, 30000 );
|
||||
|
||||
// Start one tick after DOM ready
|
||||
// Start one tick after DOM ready.
|
||||
$document.ready( function() {
|
||||
settings.lastTick = time();
|
||||
scheduleNextTick();
|
||||
|
@ -216,28 +243,34 @@
|
|||
}
|
||||
|
||||
/**
|
||||
* Return the current time according to the browser
|
||||
* Returns the current time according to the browser.
|
||||
*
|
||||
* @access private
|
||||
*
|
||||
* @return int
|
||||
* @since 3.6.0
|
||||
*
|
||||
* @returns {number} Returns the current time.
|
||||
*/
|
||||
function time() {
|
||||
return (new Date()).getTime();
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if the iframe is from the same origin
|
||||
* Checks if the iframe is from the same origin.
|
||||
*
|
||||
* @access private
|
||||
*
|
||||
* @return bool
|
||||
* @since 3.6.0
|
||||
*
|
||||
* @returns {boolean} Returns whether or not the iframe is from the same origin.
|
||||
*/
|
||||
function isLocalFrame( frame ) {
|
||||
var origin, src = frame.src;
|
||||
|
||||
// Need to compare strings as WebKit doesn't throw JS errors when iframes have different origin.
|
||||
// It throws uncatchable exceptions.
|
||||
/*
|
||||
* Need to compare strings as WebKit doesn't throw JS errors when iframes have
|
||||
* different origin. It throws uncatchable exceptions.
|
||||
*/
|
||||
if ( src && /^https?:\/\//.test( src ) ) {
|
||||
origin = window.location.origin ? window.location.origin : window.location.protocol + '//' + window.location.host;
|
||||
|
||||
|
@ -256,11 +289,13 @@
|
|||
}
|
||||
|
||||
/**
|
||||
* Check if the document's focus has changed
|
||||
* Checks if the document's focus has changed.
|
||||
*
|
||||
* @access private
|
||||
*
|
||||
* @return void
|
||||
* @since 4.1.0
|
||||
*
|
||||
* @returns {void}
|
||||
*/
|
||||
function checkFocus() {
|
||||
if ( settings.hasFocus && ! document.hasFocus() ) {
|
||||
|
@ -271,13 +306,17 @@
|
|||
}
|
||||
|
||||
/**
|
||||
* Set error state and fire an event on XHR errors or timeout
|
||||
* Sets error state and fires an event on XHR errors or timeout.
|
||||
*
|
||||
* @access private
|
||||
*
|
||||
* @param string error The error type passed from the XHR
|
||||
* @param int status The HTTP status code passed from jqXHR (200, 404, 500, etc.)
|
||||
* @return void
|
||||
* @since 3.8.0
|
||||
*
|
||||
* @param {string} error The error type passed from the XHR.
|
||||
* @param {number} status The HTTP status code passed from jqXHR
|
||||
* (200, 404, 500, etc.).
|
||||
*
|
||||
* @returns {void}
|
||||
*/
|
||||
function setErrorState( error, status ) {
|
||||
var trigger;
|
||||
|
@ -285,10 +324,10 @@
|
|||
if ( error ) {
|
||||
switch ( error ) {
|
||||
case 'abort':
|
||||
// do nothing
|
||||
// Do nothing.
|
||||
break;
|
||||
case 'timeout':
|
||||
// no response for 30 sec.
|
||||
// No response for 30 sec.
|
||||
trigger = true;
|
||||
break;
|
||||
case 'error':
|
||||
|
@ -318,14 +357,16 @@
|
|||
}
|
||||
|
||||
/**
|
||||
* Clear the error state and fire an event
|
||||
* Clears the error state and fires an event if there is a connection error.
|
||||
*
|
||||
* @access private
|
||||
*
|
||||
* @return void
|
||||
* @since 3.8.0
|
||||
*
|
||||
* @returns {void}
|
||||
*/
|
||||
function clearErrorState() {
|
||||
// Has connected successfully
|
||||
// Has connected successfully.
|
||||
settings.hasConnected = true;
|
||||
|
||||
if ( hasConnectionError() ) {
|
||||
|
@ -337,11 +378,13 @@
|
|||
}
|
||||
|
||||
/**
|
||||
* Gather the data and connect to the server
|
||||
* Gathers the data and connects to the server.
|
||||
*
|
||||
* @access private
|
||||
*
|
||||
* @return void
|
||||
* @since 3.6.0
|
||||
*
|
||||
* @returns {void}
|
||||
*/
|
||||
function connect() {
|
||||
var ajaxData, heartbeatData;
|
||||
|
@ -355,7 +398,7 @@
|
|||
settings.lastTick = time();
|
||||
|
||||
heartbeatData = $.extend( {}, settings.queue );
|
||||
// Clear the data queue, anything added after this point will be send on the next tick
|
||||
// Clear the data queue. Anything added after this point will be sent on the next tick.
|
||||
settings.queue = {};
|
||||
|
||||
$document.trigger( 'heartbeat-send', [ heartbeatData ] );
|
||||
|
@ -421,7 +464,7 @@
|
|||
$document.trigger( 'heartbeat-tick', [response, textStatus, jqXHR] );
|
||||
wp.hooks.doAction( 'heartbeat.tick', response, textStatus, jqXHR );
|
||||
|
||||
// Do this last, can trigger the next XHR if connection time > 5 sec. and newInterval == 'fast'
|
||||
// Do this last. Can trigger the next XHR if connection time > 5 sec. and newInterval == 'fast'.
|
||||
if ( newInterval ) {
|
||||
interval( newInterval );
|
||||
}
|
||||
|
@ -433,13 +476,15 @@
|
|||
}
|
||||
|
||||
/**
|
||||
* Schedule the next connection
|
||||
* Schedules the next connection.
|
||||
*
|
||||
* Fires immediately if the connection time is longer than the interval.
|
||||
*
|
||||
* @access private
|
||||
*
|
||||
* @return void
|
||||
* @since 3.8.0
|
||||
*
|
||||
* @returns {void}
|
||||
*/
|
||||
function scheduleNextTick() {
|
||||
var delta = time() - settings.lastTick,
|
||||
|
@ -479,22 +524,26 @@
|
|||
}
|
||||
|
||||
/**
|
||||
* Set the internal state when the browser window becomes hidden or loses focus
|
||||
* Sets the internal state when the browser window becomes hidden or loses focus.
|
||||
*
|
||||
* @access private
|
||||
*
|
||||
* @return void
|
||||
* @since 3.6.0
|
||||
*
|
||||
* @returns {void}
|
||||
*/
|
||||
function blurred() {
|
||||
settings.hasFocus = false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the internal state when the browser window becomes visible or is in focus
|
||||
* Sets the internal state when the browser window becomes visible or is in focus.
|
||||
*
|
||||
* @access private
|
||||
*
|
||||
* @return void
|
||||
* @since 3.6.0
|
||||
*
|
||||
* @returns {void}
|
||||
*/
|
||||
function focused() {
|
||||
settings.userActivity = time();
|
||||
|
@ -509,11 +558,13 @@
|
|||
}
|
||||
|
||||
/**
|
||||
* Runs when the user becomes active after a period of inactivity
|
||||
* Runs when the user becomes active after a period of inactivity.
|
||||
*
|
||||
* @access private
|
||||
*
|
||||
* @return void
|
||||
* @since 3.6.0
|
||||
*
|
||||
* @returns {void}
|
||||
*/
|
||||
function userIsActive() {
|
||||
settings.userActivityEvents = false;
|
||||
|
@ -529,16 +580,17 @@
|
|||
}
|
||||
|
||||
/**
|
||||
* Check for user activity
|
||||
* Checks for user activity.
|
||||
*
|
||||
* Runs every 30 sec.
|
||||
* Sets 'hasFocus = true' if user is active and the window is in the background.
|
||||
* Set 'hasFocus = false' if the user has been inactive (no mouse or keyboard activity)
|
||||
* for 5 min. even when the window has focus.
|
||||
* Runs every 30 sec. Sets 'hasFocus = true' if user is active and the window is
|
||||
* in the background. Sets 'hasFocus = false' if the user has been inactive
|
||||
* (no mouse or keyboard activity) for 5 min. even when the window has focus.
|
||||
*
|
||||
* @access private
|
||||
*
|
||||
* @return void
|
||||
* @since 3.8.0
|
||||
*
|
||||
* @returns {void}
|
||||
*/
|
||||
function checkUserActivity() {
|
||||
var lastActive = settings.userActivity ? time() - settings.userActivity : 0;
|
||||
|
@ -571,33 +623,45 @@
|
|||
}
|
||||
}
|
||||
|
||||
// Public methods
|
||||
// Public methods.
|
||||
|
||||
/**
|
||||
* Whether the window (or any local iframe in it) has focus, or the user is active
|
||||
* Checks whether the window (or any local iframe in it) has focus, or the user
|
||||
* is active.
|
||||
*
|
||||
* @return bool
|
||||
* @since 3.6.0
|
||||
* @memberOf wp.heartbeat.prototype
|
||||
*
|
||||
* @returns {boolean} True if the window or the user is active.
|
||||
*/
|
||||
function hasFocus() {
|
||||
return settings.hasFocus;
|
||||
}
|
||||
|
||||
/**
|
||||
* Whether there is a connection error
|
||||
* Checks whether there is a connection error.
|
||||
*
|
||||
* @return bool
|
||||
* @since 3.6.0
|
||||
*
|
||||
* @memberOf wp.heartbeat.prototype
|
||||
*
|
||||
* @returns {boolean} True if a connection error was found.
|
||||
*/
|
||||
function hasConnectionError() {
|
||||
return settings.connectionError;
|
||||
}
|
||||
|
||||
/**
|
||||
* Connect asap regardless of 'hasFocus'
|
||||
* Connects as soon as possible regardless of 'hasFocus' state.
|
||||
*
|
||||
* Will not open two concurrent connections. If a connection is in progress,
|
||||
* will connect again immediately after the current connection completes.
|
||||
*
|
||||
* @return void
|
||||
* @since 3.8.0
|
||||
*
|
||||
* @memberOf wp.heartbeat.prototype
|
||||
*
|
||||
* @returns {void}
|
||||
*/
|
||||
function connectNow() {
|
||||
settings.lastTick = 0;
|
||||
|
@ -605,28 +669,41 @@
|
|||
}
|
||||
|
||||
/**
|
||||
* Disable suspending
|
||||
* Disables suspending.
|
||||
*
|
||||
* Should be used only when Heartbeat is performing critical tasks like autosave, post-locking, etc.
|
||||
* Using this on many screens may overload the user's hosting account if several
|
||||
* browser windows/tabs are left open for a long time.
|
||||
* Should be used only when Heartbeat is performing critical tasks like
|
||||
* autosave, post-locking, etc. Using this on many screens may overload the
|
||||
* user's hosting account if several browser windows/tabs are left open for a
|
||||
* long time.
|
||||
*
|
||||
* @return void
|
||||
* @since 3.8.0
|
||||
*
|
||||
* @memberOf wp.heartbeat.prototype
|
||||
*
|
||||
* @returns {void}
|
||||
*/
|
||||
function disableSuspend() {
|
||||
settings.suspendEnabled = false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get/Set the interval
|
||||
* Gets/Sets the interval.
|
||||
*
|
||||
* When setting to 'fast' or 5, by default interval is 5 sec. for the next 30 ticks (for 2 min and 30 sec).
|
||||
* In this case the number of 'ticks' can be passed as second argument.
|
||||
* If the window doesn't have focus, the interval slows down to 2 min.
|
||||
* When setting to 'fast' or 5, the interval is 5 seconds for the next 30 ticks
|
||||
* (for 2 minutes and 30 seconds) by default. In this case the number of 'ticks'
|
||||
* can be passed as second argument. If the window doesn't have focus, the
|
||||
* interval slows down to 2 min.
|
||||
*
|
||||
* @param mixed speed Interval: 'fast' or 5, 15, 30, 60, 120
|
||||
* @param string ticks Used with speed = 'fast' or 5, how many ticks before the interval reverts back
|
||||
* @return int Current interval in seconds
|
||||
* @since 3.6.0
|
||||
*
|
||||
* @memberOf wp.heartbeat.prototype
|
||||
*
|
||||
* @param {string|number} speed Interval: 'fast' or 5, 15, 30, 60, 120. Fast
|
||||
* equals 5.
|
||||
* @param {string} ticks Tells how many ticks before the interval reverts
|
||||
* back. Used with speed = 'fast' or 5.
|
||||
*
|
||||
* @returns {number} Current interval in seconds.
|
||||
*/
|
||||
function interval( speed, ticks ) {
|
||||
var newInterval,
|
||||
|
@ -686,20 +763,28 @@
|
|||
}
|
||||
|
||||
/**
|
||||
* Enqueue data to send with the next XHR
|
||||
* Enqueues data to send with the next XHR.
|
||||
*
|
||||
* As the data is send asynchronously, this function doesn't return the XHR response.
|
||||
* To see the response, use the custom jQuery event 'heartbeat-tick' on the document, example:
|
||||
* As the data is send asynchronously, this function doesn't return the XHR
|
||||
* response. To see the response, use the custom jQuery event 'heartbeat-tick'
|
||||
* on the document, example:
|
||||
* $(document).on( 'heartbeat-tick.myname', function( event, data, textStatus, jqXHR ) {
|
||||
* // code
|
||||
* });
|
||||
* If the same 'handle' is used more than once, the data is not overwritten when the third argument is 'true'.
|
||||
* Use wp.heartbeat.isQueued('handle') to see if any data is already queued for that handle.
|
||||
* If the same 'handle' is used more than once, the data is not overwritten when
|
||||
* the third argument is 'true'. Use `wp.heartbeat.isQueued('handle')` to see if
|
||||
* any data is already queued for that handle.
|
||||
*
|
||||
* $param string handle Unique handle for the data. The handle is used in PHP to receive the data.
|
||||
* $param mixed data The data to send.
|
||||
* $param bool noOverwrite Whether to overwrite existing data in the queue.
|
||||
* $return bool Whether the data was queued or not.
|
||||
* @since 3.6.0
|
||||
*
|
||||
* @memberOf wp.heartbeat.prototype
|
||||
*
|
||||
* @param {string} handle Unique handle for the data, used in PHP to
|
||||
* receive the data.
|
||||
* @param {*} data The data to send.
|
||||
* @param {boolean} noOverwrite Whether to overwrite existing data in the queue.
|
||||
*
|
||||
* @returns {boolean} True if the data was queued.
|
||||
*/
|
||||
function enqueue( handle, data, noOverwrite ) {
|
||||
if ( handle ) {
|
||||
|
@ -714,10 +799,13 @@
|
|||
}
|
||||
|
||||
/**
|
||||
* Check if data with a particular handle is queued
|
||||
* Checks if data with a particular handle is queued.
|
||||
*
|
||||
* $param string handle The handle for the data
|
||||
* $return bool Whether some data is queued with this handle
|
||||
* @since 3.6.0
|
||||
*
|
||||
* @param {string} handle The handle for the data.
|
||||
*
|
||||
* @returns {boolean} True if the data is queued with this handle.
|
||||
*/
|
||||
function isQueued( handle ) {
|
||||
if ( handle ) {
|
||||
|
@ -726,10 +814,15 @@
|
|||
}
|
||||
|
||||
/**
|
||||
* Remove data with a particular handle from the queue
|
||||
* Removes data with a particular handle from the queue.
|
||||
*
|
||||
* $param string handle The handle for the data
|
||||
* $return void
|
||||
* @since 3.7.0
|
||||
*
|
||||
* @memberOf wp.heartbeat.prototype
|
||||
*
|
||||
* @param {string} handle The handle for the data.
|
||||
*
|
||||
* @returns {void}
|
||||
*/
|
||||
function dequeue( handle ) {
|
||||
if ( handle ) {
|
||||
|
@ -738,10 +831,15 @@
|
|||
}
|
||||
|
||||
/**
|
||||
* Get data that was enqueued with a particular handle
|
||||
* Gets data that was enqueued with a particular handle.
|
||||
*
|
||||
* $param string handle The handle for the data
|
||||
* $return mixed The data or undefined
|
||||
* @since 3.7.0
|
||||
*
|
||||
* @memberOf wp.heartbeat.prototype
|
||||
*
|
||||
* @param {string} handle The handle for the data.
|
||||
*
|
||||
* @returns {*} The data or undefined.
|
||||
*/
|
||||
function getQueuedItem( handle ) {
|
||||
if ( handle ) {
|
||||
|
@ -751,7 +849,7 @@
|
|||
|
||||
initialize();
|
||||
|
||||
// Expose public methods
|
||||
// Expose public methods.
|
||||
return {
|
||||
hasFocus: hasFocus,
|
||||
connectNow: connectNow,
|
||||
|
@ -771,6 +869,13 @@
|
|||
* @namespace wp
|
||||
*/
|
||||
window.wp = window.wp || {};
|
||||
|
||||
/**
|
||||
* Contains the Heartbeat API.
|
||||
*
|
||||
* @namespace wp.heartbeat
|
||||
* @type {Heartbeat}
|
||||
*/
|
||||
window.wp.heartbeat = new Heartbeat();
|
||||
|
||||
}( jQuery, window ));
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
/*!
|
||||
* hoverIntent v1.8.1 // 2014.08.11 // jQuery v1.9.1+
|
||||
* hoverIntent v1.8.3 // 2014.08.11 // jQuery v1.9.1+
|
||||
* http://cherne.net/brian/resources/jquery.hoverIntent.html
|
||||
*
|
||||
* You may use hoverIntent under the terms of the MIT license. Basically that
|
||||
* means you are free to use hoverIntent as long as this header is left intact.
|
||||
* Copyright 2007, 2014 Brian Cherne
|
||||
*/
|
||||
|
||||
|
||||
/* hoverIntent is similar to jQuery's built-in "hover" method except that
|
||||
* instead of firing the handlerIn function immediately, hoverIntent checks
|
||||
* to see if the user's mouse has slowed down (beneath the sensitivity
|
||||
|
|
8
wp-includes/js/imagesloaded.min.js
vendored
8
wp-includes/js/imagesloaded.min.js
vendored
File diff suppressed because one or more lines are too long
36
wp-includes/js/jquery/jquery-migrate.js
vendored
36
wp-includes/js/jquery/jquery-migrate.js
vendored
|
@ -1,14 +1,14 @@
|
|||
/*!
|
||||
* jQuery Migrate - v1.4.1 - 2016-05-19
|
||||
* Copyright jQuery Foundation and other contributors
|
||||
*/
|
||||
/*!
|
||||
* jQuery Migrate - v1.4.1 - 2016-05-19
|
||||
* Copyright jQuery Foundation and other contributors
|
||||
*/
|
||||
(function( jQuery, window, undefined ) {
|
||||
// See http://bugs.jquery.com/ticket/13335
|
||||
// "use strict";
|
||||
|
||||
|
||||
|
||||
jQuery.migrateVersion = "1.4.1";
|
||||
|
||||
|
||||
|
||||
var warnedAbout = {};
|
||||
|
||||
|
@ -82,7 +82,7 @@ if ( document.compatMode === "BackCompat" ) {
|
|||
// jQuery has never supported or tested Quirks Mode
|
||||
migrateWarn( "jQuery is not compatible with Quirks Mode" );
|
||||
}
|
||||
|
||||
|
||||
|
||||
var attrFn = jQuery( "<input/>", { size: 1 } ).attr("size") && jQuery.attrFn,
|
||||
oldAttr = jQuery.attr,
|
||||
|
@ -189,7 +189,7 @@ jQuery.attrHooks.value = {
|
|||
elem.value = value;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
||||
var matched, browser,
|
||||
oldInit = jQuery.fn.init,
|
||||
|
@ -377,7 +377,7 @@ jQuery.fn.size = function() {
|
|||
migrateWarn( "jQuery.fn.size() is deprecated; use the .length property" );
|
||||
return this.length;
|
||||
};
|
||||
|
||||
|
||||
|
||||
var internalSwapCall = false;
|
||||
|
||||
|
@ -422,7 +422,7 @@ jQuery.swap = function( elem, options, callback, args ) {
|
|||
|
||||
return ret;
|
||||
};
|
||||
|
||||
|
||||
|
||||
// Ensure that $.ajax gets the new parseJSON defined in core.js
|
||||
jQuery.ajaxSetup({
|
||||
|
@ -430,7 +430,7 @@ jQuery.ajaxSetup({
|
|||
"text json": jQuery.parseJSON
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
|
||||
var oldFnData = jQuery.fn.data;
|
||||
|
||||
|
@ -449,7 +449,7 @@ jQuery.fn.data = function( name ) {
|
|||
}
|
||||
return oldFnData.apply( this, arguments );
|
||||
};
|
||||
|
||||
|
||||
|
||||
var rscriptType = /\/(java|ecma)script/i;
|
||||
|
||||
|
@ -502,7 +502,7 @@ if ( !jQuery.clean ) {
|
|||
return ret;
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
var eventAdd = jQuery.event.add,
|
||||
eventRemove = jQuery.event.remove,
|
||||
eventTrigger = jQuery.event.trigger,
|
||||
|
@ -664,7 +664,7 @@ jQuery.event.special.ready = {
|
|||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
var oldSelf = jQuery.fn.andSelf || jQuery.fn.addBack,
|
||||
oldFnFind = jQuery.fn.find;
|
||||
|
||||
|
@ -679,7 +679,7 @@ jQuery.fn.find = function( selector ) {
|
|||
ret.selector = this.selector ? this.selector + " " + selector : selector;
|
||||
return ret;
|
||||
};
|
||||
|
||||
|
||||
|
||||
// jQuery 1.6 did not support Callbacks, do not warn there
|
||||
if ( jQuery.Callbacks ) {
|
||||
|
@ -747,6 +747,6 @@ if ( jQuery.Callbacks ) {
|
|||
return deferred;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
})( jQuery, window );
|
||||
}
|
||||
|
||||
})( jQuery, window );
|
||||
|
|
13
wp-includes/js/jquery/jquery.form.min.js
vendored
13
wp-includes/js/jquery/jquery.form.min.js
vendored
File diff suppressed because one or more lines are too long
2
wp-includes/js/jquery/jquery.js
vendored
2
wp-includes/js/jquery/jquery.js
vendored
File diff suppressed because one or more lines are too long
2
wp-includes/js/masonry.min.js
vendored
2
wp-includes/js/masonry.min.js
vendored
File diff suppressed because one or more lines are too long
|
@ -1,3 +1,7 @@
|
|||
/**
|
||||
* @output wp-includes/js/mce-view.js
|
||||
*/
|
||||
|
||||
/* global tinymce */
|
||||
|
||||
/*
|
||||
|
|
|
@ -88,13 +88,24 @@
|
|||
/* 0 */
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
module.exports = __webpack_require__(1);
|
||||
|
||||
|
||||
/***/ }),
|
||||
/* 1 */
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
/**
|
||||
* @output wp-includes/js/media-audiovideo.js
|
||||
*/
|
||||
|
||||
var media = wp.media,
|
||||
baseSettings = window._wpmejsSettings || {},
|
||||
l10n = window._wpMediaViewsL10n || {};
|
||||
|
||||
/**
|
||||
*
|
||||
* @summary Defines the wp.media.mixin object.
|
||||
* Defines the wp.media.mixin object.
|
||||
*
|
||||
* @mixin
|
||||
*
|
||||
|
@ -104,7 +115,7 @@ wp.media.mixin = {
|
|||
mejsSettings: baseSettings,
|
||||
|
||||
/**
|
||||
* @summary Pauses and removes all players.
|
||||
* Pauses and removes all players.
|
||||
*
|
||||
* @since 4.2.0
|
||||
*
|
||||
|
@ -122,7 +133,7 @@ wp.media.mixin = {
|
|||
},
|
||||
|
||||
/**
|
||||
* @summary Removes the player.
|
||||
* Removes the player.
|
||||
*
|
||||
* Override the MediaElement method for removing a player.
|
||||
* MediaElement tries to pull the audio/video tag out of
|
||||
|
@ -168,7 +179,7 @@ wp.media.mixin = {
|
|||
|
||||
/**
|
||||
*
|
||||
* @summary Removes and resets all players.
|
||||
* Removes and resets all players.
|
||||
*
|
||||
* Allows any class that has set 'player' to a MediaElementPlayer
|
||||
* instance to remove the player when listening to events.
|
||||
|
@ -189,7 +200,7 @@ wp.media.mixin = {
|
|||
};
|
||||
|
||||
/**
|
||||
* @summary Shortcode modeling for playlists.
|
||||
* Shortcode modeling for playlists.
|
||||
*
|
||||
* @since 4.2.0
|
||||
*/
|
||||
|
@ -208,7 +219,7 @@ wp.media.playlist = new wp.media.collection({
|
|||
});
|
||||
|
||||
/**
|
||||
* @summary Shortcode modeling for audio.
|
||||
* Shortcode modeling for audio.
|
||||
*
|
||||
* `edit()` prepares the shortcode for the media modal.
|
||||
* `shortcode()` builds the new shortcode after an update.
|
||||
|
@ -230,7 +241,7 @@ wp.media.audio = {
|
|||
},
|
||||
|
||||
/**
|
||||
* @summary Instantiates a new media object with the next matching shortcode.
|
||||
* Instantiates a new media object with the next matching shortcode.
|
||||
*
|
||||
* @since 4.2.0
|
||||
*
|
||||
|
@ -250,7 +261,7 @@ wp.media.audio = {
|
|||
},
|
||||
|
||||
/**
|
||||
* @summary Generates an audio shortcode.
|
||||
* Generates an audio shortcode.
|
||||
*
|
||||
* @since 4.2.0
|
||||
*
|
||||
|
@ -280,7 +291,7 @@ wp.media.audio = {
|
|||
};
|
||||
|
||||
/**
|
||||
* @summary Shortcode modeling for video.
|
||||
* Shortcode modeling for video.
|
||||
*
|
||||
* `edit()` prepares the shortcode for the media modal.
|
||||
* `shortcode()` builds the new shortcode after update.
|
||||
|
@ -305,7 +316,7 @@ wp.media.video = {
|
|||
},
|
||||
|
||||
/**
|
||||
* @summary Instantiates a new media object with the next matching shortcode.
|
||||
* Instantiates a new media object with the next matching shortcode.
|
||||
*
|
||||
* @since 4.2.0
|
||||
*
|
||||
|
@ -330,7 +341,7 @@ wp.media.video = {
|
|||
},
|
||||
|
||||
/**
|
||||
* @summary Generates an video shortcode.
|
||||
* Generates an video shortcode.
|
||||
*
|
||||
* @since 4.2.0
|
||||
*
|
||||
|
@ -359,19 +370,19 @@ wp.media.video = {
|
|||
}
|
||||
};
|
||||
|
||||
media.model.PostMedia = __webpack_require__( 1 );
|
||||
media.controller.AudioDetails = __webpack_require__( 2 );
|
||||
media.controller.VideoDetails = __webpack_require__( 3 );
|
||||
media.view.MediaFrame.MediaDetails = __webpack_require__( 4 );
|
||||
media.view.MediaFrame.AudioDetails = __webpack_require__( 5 );
|
||||
media.view.MediaFrame.VideoDetails = __webpack_require__( 6 );
|
||||
media.view.MediaDetails = __webpack_require__( 7 );
|
||||
media.view.AudioDetails = __webpack_require__( 8 );
|
||||
media.view.VideoDetails = __webpack_require__( 9 );
|
||||
media.model.PostMedia = __webpack_require__( 2 );
|
||||
media.controller.AudioDetails = __webpack_require__( 3 );
|
||||
media.controller.VideoDetails = __webpack_require__( 4 );
|
||||
media.view.MediaFrame.MediaDetails = __webpack_require__( 5 );
|
||||
media.view.MediaFrame.AudioDetails = __webpack_require__( 6 );
|
||||
media.view.MediaFrame.VideoDetails = __webpack_require__( 7 );
|
||||
media.view.MediaDetails = __webpack_require__( 8 );
|
||||
media.view.AudioDetails = __webpack_require__( 9 );
|
||||
media.view.VideoDetails = __webpack_require__( 10 );
|
||||
|
||||
|
||||
/***/ }),
|
||||
/* 1 */
|
||||
/* 2 */
|
||||
/***/ (function(module, exports) {
|
||||
|
||||
/**
|
||||
|
@ -419,7 +430,7 @@ module.exports = PostMedia;
|
|||
|
||||
|
||||
/***/ }),
|
||||
/* 2 */
|
||||
/* 3 */
|
||||
/***/ (function(module, exports) {
|
||||
|
||||
var State = wp.media.controller.State,
|
||||
|
@ -458,7 +469,7 @@ module.exports = AudioDetails;
|
|||
|
||||
|
||||
/***/ }),
|
||||
/* 3 */
|
||||
/* 4 */
|
||||
/***/ (function(module, exports) {
|
||||
|
||||
/**
|
||||
|
@ -497,7 +508,7 @@ module.exports = VideoDetails;
|
|||
|
||||
|
||||
/***/ }),
|
||||
/* 4 */
|
||||
/* 5 */
|
||||
/***/ (function(module, exports) {
|
||||
|
||||
var Select = wp.media.view.MediaFrame.Select,
|
||||
|
@ -633,7 +644,7 @@ module.exports = MediaDetails;
|
|||
|
||||
|
||||
/***/ }),
|
||||
/* 5 */
|
||||
/* 6 */
|
||||
/***/ (function(module, exports) {
|
||||
|
||||
var MediaDetails = wp.media.view.MediaFrame.MediaDetails,
|
||||
|
@ -715,7 +726,7 @@ module.exports = AudioDetails;
|
|||
|
||||
|
||||
/***/ }),
|
||||
/* 6 */
|
||||
/* 7 */
|
||||
/***/ (function(module, exports) {
|
||||
|
||||
var MediaDetails = wp.media.view.MediaFrame.MediaDetails,
|
||||
|
@ -856,7 +867,7 @@ module.exports = VideoDetails;
|
|||
|
||||
|
||||
/***/ }),
|
||||
/* 7 */
|
||||
/* 8 */
|
||||
/***/ (function(module, exports) {
|
||||
|
||||
/* global MediaElementPlayer */
|
||||
|
@ -1030,7 +1041,7 @@ module.exports = MediaDetails;
|
|||
|
||||
|
||||
/***/ }),
|
||||
/* 8 */
|
||||
/* 9 */
|
||||
/***/ (function(module, exports) {
|
||||
|
||||
var MediaDetails = wp.media.view.MediaDetails,
|
||||
|
@ -1074,7 +1085,7 @@ module.exports = AudioDetails;
|
|||
|
||||
|
||||
/***/ }),
|
||||
/* 9 */
|
||||
/* 10 */
|
||||
/***/ (function(module, exports) {
|
||||
|
||||
var MediaDetails = wp.media.view.MediaDetails,
|
||||
|
|
2
wp-includes/js/media-audiovideo.min.js
vendored
2
wp-includes/js/media-audiovideo.min.js
vendored
File diff suppressed because one or more lines are too long
|
@ -1,3 +1,7 @@
|
|||
/**
|
||||
* @output wp-includes/js/media-editor.js
|
||||
*/
|
||||
|
||||
/* global getUserSetting, tinymce, QTags */
|
||||
|
||||
// WordPress, TinyMCE, and Media
|
||||
|
@ -605,8 +609,7 @@
|
|||
return wp.media.view.settings.post.featuredImageId;
|
||||
},
|
||||
/**
|
||||
* Set the featured image id, save the post thumbnail data and
|
||||
* set the HTML in the post meta box to the new featured image.
|
||||
* Sets the featured image ID property and sets the HTML in the post meta box to the new featured image.
|
||||
*
|
||||
* @param {number} id The post ID of the featured image, or -1 to unset it.
|
||||
*/
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue