mirror of
https://github.com/WordPress/WordPress.git
synced 2025-03-12 14:49:55 +01:00
Build/Test Tools: Update devDependencies
.
This updates the following `devDependencies` to their latest versions: - `@playwright/test` from `1.49.1` to `1.50.1` - `chalk` from `5.3.0` to `5.4.1` - `copy-webpack-plugin` from `12.0.2` to `13.0.0` - `grunt-sass` from `3.1.0` to `4.0.0` - `postcss` from `8.4.49` to `8.5.3` - `sass` from `1.83.4` to `1.85.1` - `terser-webpack-plugin` from `5.3.11` to `5.3.12` - `uuid` from `11.0.3` to `11.1.0` - `wait-on` from `8.0.1` to `8.0.2` - `wepback` from `5.97.1` to `5.98.0` Additionally, `npm dedupe` and `npm audit fix` have been run. Fixes #62220. Built from https://develop.svn.wordpress.org/trunk@59929 git-svn-id: http://core.svn.wordpress.org/trunk@59271 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
9735646a21
commit
8817327a73
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -1 +1 @@
|
|||||||
<?php return array('dependencies' => array('wp-react-refresh-runtime'), 'version' => '7f2b9b64306bff9c719f');
|
<?php return array('dependencies' => array('wp-react-refresh-runtime'), 'version' => '461b2e321e6e009f2209');
|
||||||
|
@ -1 +1 @@
|
|||||||
<?php return array('dependencies' => array('wp-react-refresh-runtime'), 'version' => '7f2b9b64306bff9c719f');
|
<?php return array('dependencies' => array('wp-react-refresh-runtime'), 'version' => '461b2e321e6e009f2209');
|
||||||
|
9520
wp-includes/js/dist/block-editor.js
vendored
9520
wp-includes/js/dist/block-editor.js
vendored
File diff suppressed because it is too large
Load Diff
14
wp-includes/js/dist/block-editor.min.js
vendored
14
wp-includes/js/dist/block-editor.min.js
vendored
File diff suppressed because one or more lines are too long
1208
wp-includes/js/dist/blocks.js
vendored
1208
wp-includes/js/dist/blocks.js
vendored
File diff suppressed because it is too large
Load Diff
6
wp-includes/js/dist/blocks.min.js
vendored
6
wp-includes/js/dist/blocks.min.js
vendored
File diff suppressed because one or more lines are too long
484
wp-includes/js/dist/components.js
vendored
484
wp-includes/js/dist/components.js
vendored
@ -140,6 +140,248 @@ var deepmerge_1 = deepmerge;
|
|||||||
module.exports = deepmerge_1;
|
module.exports = deepmerge_1;
|
||||||
|
|
||||||
|
|
||||||
|
/***/ }),
|
||||||
|
|
||||||
|
/***/ 83:
|
||||||
|
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
||||||
|
|
||||||
|
"use strict";
|
||||||
|
/**
|
||||||
|
* @license React
|
||||||
|
* use-sync-external-store-shim.production.js
|
||||||
|
*
|
||||||
|
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||||
|
*
|
||||||
|
* This source code is licensed under the MIT license found in the
|
||||||
|
* LICENSE file in the root directory of this source tree.
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
var React = __webpack_require__(1609);
|
||||||
|
function is(x, y) {
|
||||||
|
return (x === y && (0 !== x || 1 / x === 1 / y)) || (x !== x && y !== y);
|
||||||
|
}
|
||||||
|
var objectIs = "function" === typeof Object.is ? Object.is : is,
|
||||||
|
useState = React.useState,
|
||||||
|
useEffect = React.useEffect,
|
||||||
|
useLayoutEffect = React.useLayoutEffect,
|
||||||
|
useDebugValue = React.useDebugValue;
|
||||||
|
function useSyncExternalStore$2(subscribe, getSnapshot) {
|
||||||
|
var value = getSnapshot(),
|
||||||
|
_useState = useState({ inst: { value: value, getSnapshot: getSnapshot } }),
|
||||||
|
inst = _useState[0].inst,
|
||||||
|
forceUpdate = _useState[1];
|
||||||
|
useLayoutEffect(
|
||||||
|
function () {
|
||||||
|
inst.value = value;
|
||||||
|
inst.getSnapshot = getSnapshot;
|
||||||
|
checkIfSnapshotChanged(inst) && forceUpdate({ inst: inst });
|
||||||
|
},
|
||||||
|
[subscribe, value, getSnapshot]
|
||||||
|
);
|
||||||
|
useEffect(
|
||||||
|
function () {
|
||||||
|
checkIfSnapshotChanged(inst) && forceUpdate({ inst: inst });
|
||||||
|
return subscribe(function () {
|
||||||
|
checkIfSnapshotChanged(inst) && forceUpdate({ inst: inst });
|
||||||
|
});
|
||||||
|
},
|
||||||
|
[subscribe]
|
||||||
|
);
|
||||||
|
useDebugValue(value);
|
||||||
|
return value;
|
||||||
|
}
|
||||||
|
function checkIfSnapshotChanged(inst) {
|
||||||
|
var latestGetSnapshot = inst.getSnapshot;
|
||||||
|
inst = inst.value;
|
||||||
|
try {
|
||||||
|
var nextValue = latestGetSnapshot();
|
||||||
|
return !objectIs(inst, nextValue);
|
||||||
|
} catch (error) {
|
||||||
|
return !0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
function useSyncExternalStore$1(subscribe, getSnapshot) {
|
||||||
|
return getSnapshot();
|
||||||
|
}
|
||||||
|
var shim =
|
||||||
|
"undefined" === typeof window ||
|
||||||
|
"undefined" === typeof window.document ||
|
||||||
|
"undefined" === typeof window.document.createElement
|
||||||
|
? useSyncExternalStore$1
|
||||||
|
: useSyncExternalStore$2;
|
||||||
|
exports.useSyncExternalStore =
|
||||||
|
void 0 !== React.useSyncExternalStore ? React.useSyncExternalStore : shim;
|
||||||
|
|
||||||
|
|
||||||
|
/***/ }),
|
||||||
|
|
||||||
|
/***/ 422:
|
||||||
|
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
||||||
|
|
||||||
|
"use strict";
|
||||||
|
|
||||||
|
|
||||||
|
if (true) {
|
||||||
|
module.exports = __webpack_require__(83);
|
||||||
|
} else {}
|
||||||
|
|
||||||
|
|
||||||
|
/***/ }),
|
||||||
|
|
||||||
|
/***/ 1178:
|
||||||
|
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
||||||
|
|
||||||
|
"use strict";
|
||||||
|
|
||||||
|
|
||||||
|
if (true) {
|
||||||
|
module.exports = __webpack_require__(2950);
|
||||||
|
} else {}
|
||||||
|
|
||||||
|
|
||||||
|
/***/ }),
|
||||||
|
|
||||||
|
/***/ 1609:
|
||||||
|
/***/ ((module) => {
|
||||||
|
|
||||||
|
"use strict";
|
||||||
|
module.exports = window["React"];
|
||||||
|
|
||||||
|
/***/ }),
|
||||||
|
|
||||||
|
/***/ 1880:
|
||||||
|
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
||||||
|
|
||||||
|
"use strict";
|
||||||
|
|
||||||
|
|
||||||
|
var reactIs = __webpack_require__(1178);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Copyright 2015, Yahoo! Inc.
|
||||||
|
* Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms.
|
||||||
|
*/
|
||||||
|
var REACT_STATICS = {
|
||||||
|
childContextTypes: true,
|
||||||
|
contextType: true,
|
||||||
|
contextTypes: true,
|
||||||
|
defaultProps: true,
|
||||||
|
displayName: true,
|
||||||
|
getDefaultProps: true,
|
||||||
|
getDerivedStateFromError: true,
|
||||||
|
getDerivedStateFromProps: true,
|
||||||
|
mixins: true,
|
||||||
|
propTypes: true,
|
||||||
|
type: true
|
||||||
|
};
|
||||||
|
var KNOWN_STATICS = {
|
||||||
|
name: true,
|
||||||
|
length: true,
|
||||||
|
prototype: true,
|
||||||
|
caller: true,
|
||||||
|
callee: true,
|
||||||
|
arguments: true,
|
||||||
|
arity: true
|
||||||
|
};
|
||||||
|
var FORWARD_REF_STATICS = {
|
||||||
|
'$$typeof': true,
|
||||||
|
render: true,
|
||||||
|
defaultProps: true,
|
||||||
|
displayName: true,
|
||||||
|
propTypes: true
|
||||||
|
};
|
||||||
|
var MEMO_STATICS = {
|
||||||
|
'$$typeof': true,
|
||||||
|
compare: true,
|
||||||
|
defaultProps: true,
|
||||||
|
displayName: true,
|
||||||
|
propTypes: true,
|
||||||
|
type: true
|
||||||
|
};
|
||||||
|
var TYPE_STATICS = {};
|
||||||
|
TYPE_STATICS[reactIs.ForwardRef] = FORWARD_REF_STATICS;
|
||||||
|
TYPE_STATICS[reactIs.Memo] = MEMO_STATICS;
|
||||||
|
|
||||||
|
function getStatics(component) {
|
||||||
|
// React v16.11 and below
|
||||||
|
if (reactIs.isMemo(component)) {
|
||||||
|
return MEMO_STATICS;
|
||||||
|
} // React v16.12 and above
|
||||||
|
|
||||||
|
|
||||||
|
return TYPE_STATICS[component['$$typeof']] || REACT_STATICS;
|
||||||
|
}
|
||||||
|
|
||||||
|
var defineProperty = Object.defineProperty;
|
||||||
|
var getOwnPropertyNames = Object.getOwnPropertyNames;
|
||||||
|
var getOwnPropertySymbols = Object.getOwnPropertySymbols;
|
||||||
|
var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
|
||||||
|
var getPrototypeOf = Object.getPrototypeOf;
|
||||||
|
var objectPrototype = Object.prototype;
|
||||||
|
function hoistNonReactStatics(targetComponent, sourceComponent, blacklist) {
|
||||||
|
if (typeof sourceComponent !== 'string') {
|
||||||
|
// don't hoist over string (html) components
|
||||||
|
if (objectPrototype) {
|
||||||
|
var inheritedComponent = getPrototypeOf(sourceComponent);
|
||||||
|
|
||||||
|
if (inheritedComponent && inheritedComponent !== objectPrototype) {
|
||||||
|
hoistNonReactStatics(targetComponent, inheritedComponent, blacklist);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
var keys = getOwnPropertyNames(sourceComponent);
|
||||||
|
|
||||||
|
if (getOwnPropertySymbols) {
|
||||||
|
keys = keys.concat(getOwnPropertySymbols(sourceComponent));
|
||||||
|
}
|
||||||
|
|
||||||
|
var targetStatics = getStatics(targetComponent);
|
||||||
|
var sourceStatics = getStatics(sourceComponent);
|
||||||
|
|
||||||
|
for (var i = 0; i < keys.length; ++i) {
|
||||||
|
var key = keys[i];
|
||||||
|
|
||||||
|
if (!KNOWN_STATICS[key] && !(blacklist && blacklist[key]) && !(sourceStatics && sourceStatics[key]) && !(targetStatics && targetStatics[key])) {
|
||||||
|
var descriptor = getOwnPropertyDescriptor(sourceComponent, key);
|
||||||
|
|
||||||
|
try {
|
||||||
|
// Avoid failures from read-only properties
|
||||||
|
defineProperty(targetComponent, key, descriptor);
|
||||||
|
} catch (e) {}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return targetComponent;
|
||||||
|
}
|
||||||
|
|
||||||
|
module.exports = hoistNonReactStatics;
|
||||||
|
|
||||||
|
|
||||||
|
/***/ }),
|
||||||
|
|
||||||
|
/***/ 2950:
|
||||||
|
/***/ ((__unused_webpack_module, exports) => {
|
||||||
|
|
||||||
|
"use strict";
|
||||||
|
/** @license React v16.13.1
|
||||||
|
* react-is.production.min.js
|
||||||
|
*
|
||||||
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||||
|
*
|
||||||
|
* This source code is licensed under the MIT license found in the
|
||||||
|
* LICENSE file in the root directory of this source tree.
|
||||||
|
*/
|
||||||
|
|
||||||
|
var b="function"===typeof Symbol&&Symbol.for,c=b?Symbol.for("react.element"):60103,d=b?Symbol.for("react.portal"):60106,e=b?Symbol.for("react.fragment"):60107,f=b?Symbol.for("react.strict_mode"):60108,g=b?Symbol.for("react.profiler"):60114,h=b?Symbol.for("react.provider"):60109,k=b?Symbol.for("react.context"):60110,l=b?Symbol.for("react.async_mode"):60111,m=b?Symbol.for("react.concurrent_mode"):60111,n=b?Symbol.for("react.forward_ref"):60112,p=b?Symbol.for("react.suspense"):60113,q=b?
|
||||||
|
Symbol.for("react.suspense_list"):60120,r=b?Symbol.for("react.memo"):60115,t=b?Symbol.for("react.lazy"):60116,v=b?Symbol.for("react.block"):60121,w=b?Symbol.for("react.fundamental"):60117,x=b?Symbol.for("react.responder"):60118,y=b?Symbol.for("react.scope"):60119;
|
||||||
|
function z(a){if("object"===typeof a&&null!==a){var u=a.$$typeof;switch(u){case c:switch(a=a.type,a){case l:case m:case e:case g:case f:case p:return a;default:switch(a=a&&a.$$typeof,a){case k:case n:case t:case r:case h:return a;default:return u}}case d:return u}}}function A(a){return z(a)===m}exports.AsyncMode=l;exports.ConcurrentMode=m;exports.ContextConsumer=k;exports.ContextProvider=h;exports.Element=c;exports.ForwardRef=n;exports.Fragment=e;exports.Lazy=t;exports.Memo=r;exports.Portal=d;
|
||||||
|
exports.Profiler=g;exports.StrictMode=f;exports.Suspense=p;exports.isAsyncMode=function(a){return A(a)||z(a)===l};exports.isConcurrentMode=A;exports.isContextConsumer=function(a){return z(a)===k};exports.isContextProvider=function(a){return z(a)===h};exports.isElement=function(a){return"object"===typeof a&&null!==a&&a.$$typeof===c};exports.isForwardRef=function(a){return z(a)===n};exports.isFragment=function(a){return z(a)===e};exports.isLazy=function(a){return z(a)===t};
|
||||||
|
exports.isMemo=function(a){return z(a)===r};exports.isPortal=function(a){return z(a)===d};exports.isProfiler=function(a){return z(a)===g};exports.isStrictMode=function(a){return z(a)===f};exports.isSuspense=function(a){return z(a)===p};
|
||||||
|
exports.isValidElementType=function(a){return"string"===typeof a||"function"===typeof a||a===e||a===m||a===g||a===f||a===p||a===q||"object"===typeof a&&null!==a&&(a.$$typeof===t||a.$$typeof===r||a.$$typeof===h||a.$$typeof===k||a.$$typeof===n||a.$$typeof===w||a.$$typeof===x||a.$$typeof===y||a.$$typeof===v)};exports.typeOf=z;
|
||||||
|
|
||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
|
|
||||||
/***/ 7734:
|
/***/ 7734:
|
||||||
@ -828,153 +1070,6 @@ module.exports =
|
|||||||
/******/ ]);
|
/******/ ]);
|
||||||
|
|
||||||
|
|
||||||
/***/ }),
|
|
||||||
|
|
||||||
/***/ 1880:
|
|
||||||
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
||||||
|
|
||||||
"use strict";
|
|
||||||
|
|
||||||
|
|
||||||
var reactIs = __webpack_require__(1178);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Copyright 2015, Yahoo! Inc.
|
|
||||||
* Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms.
|
|
||||||
*/
|
|
||||||
var REACT_STATICS = {
|
|
||||||
childContextTypes: true,
|
|
||||||
contextType: true,
|
|
||||||
contextTypes: true,
|
|
||||||
defaultProps: true,
|
|
||||||
displayName: true,
|
|
||||||
getDefaultProps: true,
|
|
||||||
getDerivedStateFromError: true,
|
|
||||||
getDerivedStateFromProps: true,
|
|
||||||
mixins: true,
|
|
||||||
propTypes: true,
|
|
||||||
type: true
|
|
||||||
};
|
|
||||||
var KNOWN_STATICS = {
|
|
||||||
name: true,
|
|
||||||
length: true,
|
|
||||||
prototype: true,
|
|
||||||
caller: true,
|
|
||||||
callee: true,
|
|
||||||
arguments: true,
|
|
||||||
arity: true
|
|
||||||
};
|
|
||||||
var FORWARD_REF_STATICS = {
|
|
||||||
'$$typeof': true,
|
|
||||||
render: true,
|
|
||||||
defaultProps: true,
|
|
||||||
displayName: true,
|
|
||||||
propTypes: true
|
|
||||||
};
|
|
||||||
var MEMO_STATICS = {
|
|
||||||
'$$typeof': true,
|
|
||||||
compare: true,
|
|
||||||
defaultProps: true,
|
|
||||||
displayName: true,
|
|
||||||
propTypes: true,
|
|
||||||
type: true
|
|
||||||
};
|
|
||||||
var TYPE_STATICS = {};
|
|
||||||
TYPE_STATICS[reactIs.ForwardRef] = FORWARD_REF_STATICS;
|
|
||||||
TYPE_STATICS[reactIs.Memo] = MEMO_STATICS;
|
|
||||||
|
|
||||||
function getStatics(component) {
|
|
||||||
// React v16.11 and below
|
|
||||||
if (reactIs.isMemo(component)) {
|
|
||||||
return MEMO_STATICS;
|
|
||||||
} // React v16.12 and above
|
|
||||||
|
|
||||||
|
|
||||||
return TYPE_STATICS[component['$$typeof']] || REACT_STATICS;
|
|
||||||
}
|
|
||||||
|
|
||||||
var defineProperty = Object.defineProperty;
|
|
||||||
var getOwnPropertyNames = Object.getOwnPropertyNames;
|
|
||||||
var getOwnPropertySymbols = Object.getOwnPropertySymbols;
|
|
||||||
var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
|
|
||||||
var getPrototypeOf = Object.getPrototypeOf;
|
|
||||||
var objectPrototype = Object.prototype;
|
|
||||||
function hoistNonReactStatics(targetComponent, sourceComponent, blacklist) {
|
|
||||||
if (typeof sourceComponent !== 'string') {
|
|
||||||
// don't hoist over string (html) components
|
|
||||||
if (objectPrototype) {
|
|
||||||
var inheritedComponent = getPrototypeOf(sourceComponent);
|
|
||||||
|
|
||||||
if (inheritedComponent && inheritedComponent !== objectPrototype) {
|
|
||||||
hoistNonReactStatics(targetComponent, inheritedComponent, blacklist);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
var keys = getOwnPropertyNames(sourceComponent);
|
|
||||||
|
|
||||||
if (getOwnPropertySymbols) {
|
|
||||||
keys = keys.concat(getOwnPropertySymbols(sourceComponent));
|
|
||||||
}
|
|
||||||
|
|
||||||
var targetStatics = getStatics(targetComponent);
|
|
||||||
var sourceStatics = getStatics(sourceComponent);
|
|
||||||
|
|
||||||
for (var i = 0; i < keys.length; ++i) {
|
|
||||||
var key = keys[i];
|
|
||||||
|
|
||||||
if (!KNOWN_STATICS[key] && !(blacklist && blacklist[key]) && !(sourceStatics && sourceStatics[key]) && !(targetStatics && targetStatics[key])) {
|
|
||||||
var descriptor = getOwnPropertyDescriptor(sourceComponent, key);
|
|
||||||
|
|
||||||
try {
|
|
||||||
// Avoid failures from read-only properties
|
|
||||||
defineProperty(targetComponent, key, descriptor);
|
|
||||||
} catch (e) {}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return targetComponent;
|
|
||||||
}
|
|
||||||
|
|
||||||
module.exports = hoistNonReactStatics;
|
|
||||||
|
|
||||||
|
|
||||||
/***/ }),
|
|
||||||
|
|
||||||
/***/ 2950:
|
|
||||||
/***/ ((__unused_webpack_module, exports) => {
|
|
||||||
|
|
||||||
"use strict";
|
|
||||||
/** @license React v16.13.1
|
|
||||||
* react-is.production.min.js
|
|
||||||
*
|
|
||||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
||||||
*
|
|
||||||
* This source code is licensed under the MIT license found in the
|
|
||||||
* LICENSE file in the root directory of this source tree.
|
|
||||||
*/
|
|
||||||
|
|
||||||
var b="function"===typeof Symbol&&Symbol.for,c=b?Symbol.for("react.element"):60103,d=b?Symbol.for("react.portal"):60106,e=b?Symbol.for("react.fragment"):60107,f=b?Symbol.for("react.strict_mode"):60108,g=b?Symbol.for("react.profiler"):60114,h=b?Symbol.for("react.provider"):60109,k=b?Symbol.for("react.context"):60110,l=b?Symbol.for("react.async_mode"):60111,m=b?Symbol.for("react.concurrent_mode"):60111,n=b?Symbol.for("react.forward_ref"):60112,p=b?Symbol.for("react.suspense"):60113,q=b?
|
|
||||||
Symbol.for("react.suspense_list"):60120,r=b?Symbol.for("react.memo"):60115,t=b?Symbol.for("react.lazy"):60116,v=b?Symbol.for("react.block"):60121,w=b?Symbol.for("react.fundamental"):60117,x=b?Symbol.for("react.responder"):60118,y=b?Symbol.for("react.scope"):60119;
|
|
||||||
function z(a){if("object"===typeof a&&null!==a){var u=a.$$typeof;switch(u){case c:switch(a=a.type,a){case l:case m:case e:case g:case f:case p:return a;default:switch(a=a&&a.$$typeof,a){case k:case n:case t:case r:case h:return a;default:return u}}case d:return u}}}function A(a){return z(a)===m}exports.AsyncMode=l;exports.ConcurrentMode=m;exports.ContextConsumer=k;exports.ContextProvider=h;exports.Element=c;exports.ForwardRef=n;exports.Fragment=e;exports.Lazy=t;exports.Memo=r;exports.Portal=d;
|
|
||||||
exports.Profiler=g;exports.StrictMode=f;exports.Suspense=p;exports.isAsyncMode=function(a){return A(a)||z(a)===l};exports.isConcurrentMode=A;exports.isContextConsumer=function(a){return z(a)===k};exports.isContextProvider=function(a){return z(a)===h};exports.isElement=function(a){return"object"===typeof a&&null!==a&&a.$$typeof===c};exports.isForwardRef=function(a){return z(a)===n};exports.isFragment=function(a){return z(a)===e};exports.isLazy=function(a){return z(a)===t};
|
|
||||||
exports.isMemo=function(a){return z(a)===r};exports.isPortal=function(a){return z(a)===d};exports.isProfiler=function(a){return z(a)===g};exports.isStrictMode=function(a){return z(a)===f};exports.isSuspense=function(a){return z(a)===p};
|
|
||||||
exports.isValidElementType=function(a){return"string"===typeof a||"function"===typeof a||a===e||a===m||a===g||a===f||a===p||a===q||"object"===typeof a&&null!==a&&(a.$$typeof===t||a.$$typeof===r||a.$$typeof===h||a.$$typeof===k||a.$$typeof===n||a.$$typeof===w||a.$$typeof===x||a.$$typeof===y||a.$$typeof===v)};exports.typeOf=z;
|
|
||||||
|
|
||||||
|
|
||||||
/***/ }),
|
|
||||||
|
|
||||||
/***/ 1178:
|
|
||||||
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
||||||
|
|
||||||
"use strict";
|
|
||||||
|
|
||||||
|
|
||||||
if (true) {
|
|
||||||
module.exports = __webpack_require__(2950);
|
|
||||||
} else {}
|
|
||||||
|
|
||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
|
|
||||||
/***/ 9681:
|
/***/ 9681:
|
||||||
@ -1463,101 +1558,6 @@ module.exports.has = hasAccents;
|
|||||||
module.exports.remove = removeAccents;
|
module.exports.remove = removeAccents;
|
||||||
|
|
||||||
|
|
||||||
/***/ }),
|
|
||||||
|
|
||||||
/***/ 83:
|
|
||||||
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
||||||
|
|
||||||
"use strict";
|
|
||||||
/**
|
|
||||||
* @license React
|
|
||||||
* use-sync-external-store-shim.production.js
|
|
||||||
*
|
|
||||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
||||||
*
|
|
||||||
* This source code is licensed under the MIT license found in the
|
|
||||||
* LICENSE file in the root directory of this source tree.
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
var React = __webpack_require__(1609);
|
|
||||||
function is(x, y) {
|
|
||||||
return (x === y && (0 !== x || 1 / x === 1 / y)) || (x !== x && y !== y);
|
|
||||||
}
|
|
||||||
var objectIs = "function" === typeof Object.is ? Object.is : is,
|
|
||||||
useState = React.useState,
|
|
||||||
useEffect = React.useEffect,
|
|
||||||
useLayoutEffect = React.useLayoutEffect,
|
|
||||||
useDebugValue = React.useDebugValue;
|
|
||||||
function useSyncExternalStore$2(subscribe, getSnapshot) {
|
|
||||||
var value = getSnapshot(),
|
|
||||||
_useState = useState({ inst: { value: value, getSnapshot: getSnapshot } }),
|
|
||||||
inst = _useState[0].inst,
|
|
||||||
forceUpdate = _useState[1];
|
|
||||||
useLayoutEffect(
|
|
||||||
function () {
|
|
||||||
inst.value = value;
|
|
||||||
inst.getSnapshot = getSnapshot;
|
|
||||||
checkIfSnapshotChanged(inst) && forceUpdate({ inst: inst });
|
|
||||||
},
|
|
||||||
[subscribe, value, getSnapshot]
|
|
||||||
);
|
|
||||||
useEffect(
|
|
||||||
function () {
|
|
||||||
checkIfSnapshotChanged(inst) && forceUpdate({ inst: inst });
|
|
||||||
return subscribe(function () {
|
|
||||||
checkIfSnapshotChanged(inst) && forceUpdate({ inst: inst });
|
|
||||||
});
|
|
||||||
},
|
|
||||||
[subscribe]
|
|
||||||
);
|
|
||||||
useDebugValue(value);
|
|
||||||
return value;
|
|
||||||
}
|
|
||||||
function checkIfSnapshotChanged(inst) {
|
|
||||||
var latestGetSnapshot = inst.getSnapshot;
|
|
||||||
inst = inst.value;
|
|
||||||
try {
|
|
||||||
var nextValue = latestGetSnapshot();
|
|
||||||
return !objectIs(inst, nextValue);
|
|
||||||
} catch (error) {
|
|
||||||
return !0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
function useSyncExternalStore$1(subscribe, getSnapshot) {
|
|
||||||
return getSnapshot();
|
|
||||||
}
|
|
||||||
var shim =
|
|
||||||
"undefined" === typeof window ||
|
|
||||||
"undefined" === typeof window.document ||
|
|
||||||
"undefined" === typeof window.document.createElement
|
|
||||||
? useSyncExternalStore$1
|
|
||||||
: useSyncExternalStore$2;
|
|
||||||
exports.useSyncExternalStore =
|
|
||||||
void 0 !== React.useSyncExternalStore ? React.useSyncExternalStore : shim;
|
|
||||||
|
|
||||||
|
|
||||||
/***/ }),
|
|
||||||
|
|
||||||
/***/ 422:
|
|
||||||
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
||||||
|
|
||||||
"use strict";
|
|
||||||
|
|
||||||
|
|
||||||
if (true) {
|
|
||||||
module.exports = __webpack_require__(83);
|
|
||||||
} else {}
|
|
||||||
|
|
||||||
|
|
||||||
/***/ }),
|
|
||||||
|
|
||||||
/***/ 1609:
|
|
||||||
/***/ ((module) => {
|
|
||||||
|
|
||||||
"use strict";
|
|
||||||
module.exports = window["React"];
|
|
||||||
|
|
||||||
/***/ })
|
/***/ })
|
||||||
|
|
||||||
/******/ });
|
/******/ });
|
||||||
|
20
wp-includes/js/dist/components.min.js
vendored
20
wp-includes/js/dist/components.min.js
vendored
File diff suppressed because one or more lines are too long
1782
wp-includes/js/dist/compose.js
vendored
1782
wp-includes/js/dist/compose.js
vendored
File diff suppressed because it is too large
Load Diff
4
wp-includes/js/dist/compose.min.js
vendored
4
wp-includes/js/dist/compose.min.js
vendored
File diff suppressed because one or more lines are too long
26
wp-includes/js/dist/date.js
vendored
26
wp-includes/js/dist/date.js
vendored
File diff suppressed because one or more lines are too long
4
wp-includes/js/dist/date.min.js
vendored
4
wp-includes/js/dist/date.min.js
vendored
File diff suppressed because one or more lines are too long
@ -9,17 +9,6 @@
|
|||||||
/******/ (() => { // webpackBootstrap
|
/******/ (() => { // webpackBootstrap
|
||||||
/******/ var __webpack_modules__ = ({
|
/******/ var __webpack_modules__ = ({
|
||||||
|
|
||||||
/***/ "react-refresh/runtime":
|
|
||||||
/*!**************************************!*\
|
|
||||||
!*** external "ReactRefreshRuntime" ***!
|
|
||||||
\**************************************/
|
|
||||||
/***/ ((module) => {
|
|
||||||
|
|
||||||
"use strict";
|
|
||||||
module.exports = window["ReactRefreshRuntime"];
|
|
||||||
|
|
||||||
/***/ }),
|
|
||||||
|
|
||||||
/***/ "./node_modules/@pmmmwh/react-refresh-webpack-plugin/client/ReactRefreshEntry.js":
|
/***/ "./node_modules/@pmmmwh/react-refresh-webpack-plugin/client/ReactRefreshEntry.js":
|
||||||
/*!***************************************************************************************!*\
|
/*!***************************************************************************************!*\
|
||||||
!*** ./node_modules/@pmmmwh/react-refresh-webpack-plugin/client/ReactRefreshEntry.js ***!
|
!*** ./node_modules/@pmmmwh/react-refresh-webpack-plugin/client/ReactRefreshEntry.js ***!
|
||||||
@ -644,6 +633,17 @@ eval("\n// TODO: Remove from `core-js@4`\n__webpack_require__(/*! ../modules/es.
|
|||||||
"use strict";
|
"use strict";
|
||||||
eval("\nvar parent = __webpack_require__(/*! ../es/global-this */ \"./node_modules/core-js-pure/es/global-this.js\");\n\nmodule.exports = parent;\n\n\n//# sourceURL=webpack://WordPress/./node_modules/core-js-pure/stable/global-this.js?");
|
eval("\nvar parent = __webpack_require__(/*! ../es/global-this */ \"./node_modules/core-js-pure/es/global-this.js\");\n\nmodule.exports = parent;\n\n\n//# sourceURL=webpack://WordPress/./node_modules/core-js-pure/stable/global-this.js?");
|
||||||
|
|
||||||
|
/***/ }),
|
||||||
|
|
||||||
|
/***/ "react-refresh/runtime":
|
||||||
|
/*!**************************************!*\
|
||||||
|
!*** external "ReactRefreshRuntime" ***!
|
||||||
|
\**************************************/
|
||||||
|
/***/ ((module) => {
|
||||||
|
|
||||||
|
"use strict";
|
||||||
|
module.exports = window["ReactRefreshRuntime"];
|
||||||
|
|
||||||
/***/ })
|
/***/ })
|
||||||
|
|
||||||
/******/ });
|
/******/ });
|
||||||
|
@ -9,17 +9,6 @@
|
|||||||
/******/ (() => { // webpackBootstrap
|
/******/ (() => { // webpackBootstrap
|
||||||
/******/ var __webpack_modules__ = ({
|
/******/ var __webpack_modules__ = ({
|
||||||
|
|
||||||
/***/ "react-refresh/runtime":
|
|
||||||
/*!**************************************!*\
|
|
||||||
!*** external "ReactRefreshRuntime" ***!
|
|
||||||
\**************************************/
|
|
||||||
/***/ ((module) => {
|
|
||||||
|
|
||||||
"use strict";
|
|
||||||
module.exports = window["ReactRefreshRuntime"];
|
|
||||||
|
|
||||||
/***/ }),
|
|
||||||
|
|
||||||
/***/ "./node_modules/@pmmmwh/react-refresh-webpack-plugin/client/ReactRefreshEntry.js":
|
/***/ "./node_modules/@pmmmwh/react-refresh-webpack-plugin/client/ReactRefreshEntry.js":
|
||||||
/*!***************************************************************************************!*\
|
/*!***************************************************************************************!*\
|
||||||
!*** ./node_modules/@pmmmwh/react-refresh-webpack-plugin/client/ReactRefreshEntry.js ***!
|
!*** ./node_modules/@pmmmwh/react-refresh-webpack-plugin/client/ReactRefreshEntry.js ***!
|
||||||
@ -644,6 +633,17 @@ eval("\n// TODO: Remove from `core-js@4`\n__webpack_require__(/*! ../modules/es.
|
|||||||
"use strict";
|
"use strict";
|
||||||
eval("\nvar parent = __webpack_require__(/*! ../es/global-this */ \"./node_modules/core-js-pure/es/global-this.js\");\n\nmodule.exports = parent;\n\n\n//# sourceURL=webpack://WordPress/./node_modules/core-js-pure/stable/global-this.js?");
|
eval("\nvar parent = __webpack_require__(/*! ../es/global-this */ \"./node_modules/core-js-pure/es/global-this.js\");\n\nmodule.exports = parent;\n\n\n//# sourceURL=webpack://WordPress/./node_modules/core-js-pure/stable/global-this.js?");
|
||||||
|
|
||||||
|
/***/ }),
|
||||||
|
|
||||||
|
/***/ "react-refresh/runtime":
|
||||||
|
/*!**************************************!*\
|
||||||
|
!*** external "ReactRefreshRuntime" ***!
|
||||||
|
\**************************************/
|
||||||
|
/***/ ((module) => {
|
||||||
|
|
||||||
|
"use strict";
|
||||||
|
module.exports = window["ReactRefreshRuntime"];
|
||||||
|
|
||||||
/***/ })
|
/***/ })
|
||||||
|
|
||||||
/******/ });
|
/******/ });
|
||||||
|
190
wp-includes/js/dist/edit-site.js
vendored
190
wp-includes/js/dist/edit-site.js
vendored
@ -1,6 +1,101 @@
|
|||||||
/******/ (() => { // webpackBootstrap
|
/******/ (() => { // webpackBootstrap
|
||||||
/******/ var __webpack_modules__ = ({
|
/******/ var __webpack_modules__ = ({
|
||||||
|
|
||||||
|
/***/ 83:
|
||||||
|
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
||||||
|
|
||||||
|
"use strict";
|
||||||
|
/**
|
||||||
|
* @license React
|
||||||
|
* use-sync-external-store-shim.production.js
|
||||||
|
*
|
||||||
|
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||||
|
*
|
||||||
|
* This source code is licensed under the MIT license found in the
|
||||||
|
* LICENSE file in the root directory of this source tree.
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
var React = __webpack_require__(1609);
|
||||||
|
function is(x, y) {
|
||||||
|
return (x === y && (0 !== x || 1 / x === 1 / y)) || (x !== x && y !== y);
|
||||||
|
}
|
||||||
|
var objectIs = "function" === typeof Object.is ? Object.is : is,
|
||||||
|
useState = React.useState,
|
||||||
|
useEffect = React.useEffect,
|
||||||
|
useLayoutEffect = React.useLayoutEffect,
|
||||||
|
useDebugValue = React.useDebugValue;
|
||||||
|
function useSyncExternalStore$2(subscribe, getSnapshot) {
|
||||||
|
var value = getSnapshot(),
|
||||||
|
_useState = useState({ inst: { value: value, getSnapshot: getSnapshot } }),
|
||||||
|
inst = _useState[0].inst,
|
||||||
|
forceUpdate = _useState[1];
|
||||||
|
useLayoutEffect(
|
||||||
|
function () {
|
||||||
|
inst.value = value;
|
||||||
|
inst.getSnapshot = getSnapshot;
|
||||||
|
checkIfSnapshotChanged(inst) && forceUpdate({ inst: inst });
|
||||||
|
},
|
||||||
|
[subscribe, value, getSnapshot]
|
||||||
|
);
|
||||||
|
useEffect(
|
||||||
|
function () {
|
||||||
|
checkIfSnapshotChanged(inst) && forceUpdate({ inst: inst });
|
||||||
|
return subscribe(function () {
|
||||||
|
checkIfSnapshotChanged(inst) && forceUpdate({ inst: inst });
|
||||||
|
});
|
||||||
|
},
|
||||||
|
[subscribe]
|
||||||
|
);
|
||||||
|
useDebugValue(value);
|
||||||
|
return value;
|
||||||
|
}
|
||||||
|
function checkIfSnapshotChanged(inst) {
|
||||||
|
var latestGetSnapshot = inst.getSnapshot;
|
||||||
|
inst = inst.value;
|
||||||
|
try {
|
||||||
|
var nextValue = latestGetSnapshot();
|
||||||
|
return !objectIs(inst, nextValue);
|
||||||
|
} catch (error) {
|
||||||
|
return !0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
function useSyncExternalStore$1(subscribe, getSnapshot) {
|
||||||
|
return getSnapshot();
|
||||||
|
}
|
||||||
|
var shim =
|
||||||
|
"undefined" === typeof window ||
|
||||||
|
"undefined" === typeof window.document ||
|
||||||
|
"undefined" === typeof window.document.createElement
|
||||||
|
? useSyncExternalStore$1
|
||||||
|
: useSyncExternalStore$2;
|
||||||
|
exports.useSyncExternalStore =
|
||||||
|
void 0 !== React.useSyncExternalStore ? React.useSyncExternalStore : shim;
|
||||||
|
|
||||||
|
|
||||||
|
/***/ }),
|
||||||
|
|
||||||
|
/***/ 422:
|
||||||
|
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
||||||
|
|
||||||
|
"use strict";
|
||||||
|
|
||||||
|
|
||||||
|
if (true) {
|
||||||
|
module.exports = __webpack_require__(83);
|
||||||
|
} else {}
|
||||||
|
|
||||||
|
|
||||||
|
/***/ }),
|
||||||
|
|
||||||
|
/***/ 1609:
|
||||||
|
/***/ ((module) => {
|
||||||
|
|
||||||
|
"use strict";
|
||||||
|
module.exports = window["React"];
|
||||||
|
|
||||||
|
/***/ }),
|
||||||
|
|
||||||
/***/ 4660:
|
/***/ 4660:
|
||||||
/***/ ((module) => {
|
/***/ ((module) => {
|
||||||
|
|
||||||
@ -5873,101 +5968,6 @@ module.exports.has = hasAccents;
|
|||||||
module.exports.remove = removeAccents;
|
module.exports.remove = removeAccents;
|
||||||
|
|
||||||
|
|
||||||
/***/ }),
|
|
||||||
|
|
||||||
/***/ 83:
|
|
||||||
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
||||||
|
|
||||||
"use strict";
|
|
||||||
/**
|
|
||||||
* @license React
|
|
||||||
* use-sync-external-store-shim.production.js
|
|
||||||
*
|
|
||||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
||||||
*
|
|
||||||
* This source code is licensed under the MIT license found in the
|
|
||||||
* LICENSE file in the root directory of this source tree.
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
var React = __webpack_require__(1609);
|
|
||||||
function is(x, y) {
|
|
||||||
return (x === y && (0 !== x || 1 / x === 1 / y)) || (x !== x && y !== y);
|
|
||||||
}
|
|
||||||
var objectIs = "function" === typeof Object.is ? Object.is : is,
|
|
||||||
useState = React.useState,
|
|
||||||
useEffect = React.useEffect,
|
|
||||||
useLayoutEffect = React.useLayoutEffect,
|
|
||||||
useDebugValue = React.useDebugValue;
|
|
||||||
function useSyncExternalStore$2(subscribe, getSnapshot) {
|
|
||||||
var value = getSnapshot(),
|
|
||||||
_useState = useState({ inst: { value: value, getSnapshot: getSnapshot } }),
|
|
||||||
inst = _useState[0].inst,
|
|
||||||
forceUpdate = _useState[1];
|
|
||||||
useLayoutEffect(
|
|
||||||
function () {
|
|
||||||
inst.value = value;
|
|
||||||
inst.getSnapshot = getSnapshot;
|
|
||||||
checkIfSnapshotChanged(inst) && forceUpdate({ inst: inst });
|
|
||||||
},
|
|
||||||
[subscribe, value, getSnapshot]
|
|
||||||
);
|
|
||||||
useEffect(
|
|
||||||
function () {
|
|
||||||
checkIfSnapshotChanged(inst) && forceUpdate({ inst: inst });
|
|
||||||
return subscribe(function () {
|
|
||||||
checkIfSnapshotChanged(inst) && forceUpdate({ inst: inst });
|
|
||||||
});
|
|
||||||
},
|
|
||||||
[subscribe]
|
|
||||||
);
|
|
||||||
useDebugValue(value);
|
|
||||||
return value;
|
|
||||||
}
|
|
||||||
function checkIfSnapshotChanged(inst) {
|
|
||||||
var latestGetSnapshot = inst.getSnapshot;
|
|
||||||
inst = inst.value;
|
|
||||||
try {
|
|
||||||
var nextValue = latestGetSnapshot();
|
|
||||||
return !objectIs(inst, nextValue);
|
|
||||||
} catch (error) {
|
|
||||||
return !0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
function useSyncExternalStore$1(subscribe, getSnapshot) {
|
|
||||||
return getSnapshot();
|
|
||||||
}
|
|
||||||
var shim =
|
|
||||||
"undefined" === typeof window ||
|
|
||||||
"undefined" === typeof window.document ||
|
|
||||||
"undefined" === typeof window.document.createElement
|
|
||||||
? useSyncExternalStore$1
|
|
||||||
: useSyncExternalStore$2;
|
|
||||||
exports.useSyncExternalStore =
|
|
||||||
void 0 !== React.useSyncExternalStore ? React.useSyncExternalStore : shim;
|
|
||||||
|
|
||||||
|
|
||||||
/***/ }),
|
|
||||||
|
|
||||||
/***/ 422:
|
|
||||||
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
||||||
|
|
||||||
"use strict";
|
|
||||||
|
|
||||||
|
|
||||||
if (true) {
|
|
||||||
module.exports = __webpack_require__(83);
|
|
||||||
} else {}
|
|
||||||
|
|
||||||
|
|
||||||
/***/ }),
|
|
||||||
|
|
||||||
/***/ 1609:
|
|
||||||
/***/ ((module) => {
|
|
||||||
|
|
||||||
"use strict";
|
|
||||||
module.exports = window["React"];
|
|
||||||
|
|
||||||
/***/ })
|
/***/ })
|
||||||
|
|
||||||
/******/ });
|
/******/ });
|
||||||
|
4
wp-includes/js/dist/edit-site.min.js
vendored
4
wp-includes/js/dist/edit-site.min.js
vendored
File diff suppressed because one or more lines are too long
918
wp-includes/js/dist/editor.js
vendored
918
wp-includes/js/dist/editor.js
vendored
@ -1,6 +1,365 @@
|
|||||||
/******/ (() => { // webpackBootstrap
|
/******/ (() => { // webpackBootstrap
|
||||||
/******/ var __webpack_modules__ = ({
|
/******/ var __webpack_modules__ = ({
|
||||||
|
|
||||||
|
/***/ 66:
|
||||||
|
/***/ ((module) => {
|
||||||
|
|
||||||
|
"use strict";
|
||||||
|
|
||||||
|
|
||||||
|
var isMergeableObject = function isMergeableObject(value) {
|
||||||
|
return isNonNullObject(value)
|
||||||
|
&& !isSpecial(value)
|
||||||
|
};
|
||||||
|
|
||||||
|
function isNonNullObject(value) {
|
||||||
|
return !!value && typeof value === 'object'
|
||||||
|
}
|
||||||
|
|
||||||
|
function isSpecial(value) {
|
||||||
|
var stringValue = Object.prototype.toString.call(value);
|
||||||
|
|
||||||
|
return stringValue === '[object RegExp]'
|
||||||
|
|| stringValue === '[object Date]'
|
||||||
|
|| isReactElement(value)
|
||||||
|
}
|
||||||
|
|
||||||
|
// see https://github.com/facebook/react/blob/b5ac963fb791d1298e7f396236383bc955f916c1/src/isomorphic/classic/element/ReactElement.js#L21-L25
|
||||||
|
var canUseSymbol = typeof Symbol === 'function' && Symbol.for;
|
||||||
|
var REACT_ELEMENT_TYPE = canUseSymbol ? Symbol.for('react.element') : 0xeac7;
|
||||||
|
|
||||||
|
function isReactElement(value) {
|
||||||
|
return value.$$typeof === REACT_ELEMENT_TYPE
|
||||||
|
}
|
||||||
|
|
||||||
|
function emptyTarget(val) {
|
||||||
|
return Array.isArray(val) ? [] : {}
|
||||||
|
}
|
||||||
|
|
||||||
|
function cloneUnlessOtherwiseSpecified(value, options) {
|
||||||
|
return (options.clone !== false && options.isMergeableObject(value))
|
||||||
|
? deepmerge(emptyTarget(value), value, options)
|
||||||
|
: value
|
||||||
|
}
|
||||||
|
|
||||||
|
function defaultArrayMerge(target, source, options) {
|
||||||
|
return target.concat(source).map(function(element) {
|
||||||
|
return cloneUnlessOtherwiseSpecified(element, options)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
function getMergeFunction(key, options) {
|
||||||
|
if (!options.customMerge) {
|
||||||
|
return deepmerge
|
||||||
|
}
|
||||||
|
var customMerge = options.customMerge(key);
|
||||||
|
return typeof customMerge === 'function' ? customMerge : deepmerge
|
||||||
|
}
|
||||||
|
|
||||||
|
function getEnumerableOwnPropertySymbols(target) {
|
||||||
|
return Object.getOwnPropertySymbols
|
||||||
|
? Object.getOwnPropertySymbols(target).filter(function(symbol) {
|
||||||
|
return Object.propertyIsEnumerable.call(target, symbol)
|
||||||
|
})
|
||||||
|
: []
|
||||||
|
}
|
||||||
|
|
||||||
|
function getKeys(target) {
|
||||||
|
return Object.keys(target).concat(getEnumerableOwnPropertySymbols(target))
|
||||||
|
}
|
||||||
|
|
||||||
|
function propertyIsOnObject(object, property) {
|
||||||
|
try {
|
||||||
|
return property in object
|
||||||
|
} catch(_) {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Protects from prototype poisoning and unexpected merging up the prototype chain.
|
||||||
|
function propertyIsUnsafe(target, key) {
|
||||||
|
return propertyIsOnObject(target, key) // Properties are safe to merge if they don't exist in the target yet,
|
||||||
|
&& !(Object.hasOwnProperty.call(target, key) // unsafe if they exist up the prototype chain,
|
||||||
|
&& Object.propertyIsEnumerable.call(target, key)) // and also unsafe if they're nonenumerable.
|
||||||
|
}
|
||||||
|
|
||||||
|
function mergeObject(target, source, options) {
|
||||||
|
var destination = {};
|
||||||
|
if (options.isMergeableObject(target)) {
|
||||||
|
getKeys(target).forEach(function(key) {
|
||||||
|
destination[key] = cloneUnlessOtherwiseSpecified(target[key], options);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
getKeys(source).forEach(function(key) {
|
||||||
|
if (propertyIsUnsafe(target, key)) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
if (propertyIsOnObject(target, key) && options.isMergeableObject(source[key])) {
|
||||||
|
destination[key] = getMergeFunction(key, options)(target[key], source[key], options);
|
||||||
|
} else {
|
||||||
|
destination[key] = cloneUnlessOtherwiseSpecified(source[key], options);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
return destination
|
||||||
|
}
|
||||||
|
|
||||||
|
function deepmerge(target, source, options) {
|
||||||
|
options = options || {};
|
||||||
|
options.arrayMerge = options.arrayMerge || defaultArrayMerge;
|
||||||
|
options.isMergeableObject = options.isMergeableObject || isMergeableObject;
|
||||||
|
// cloneUnlessOtherwiseSpecified is added to `options` so that custom arrayMerge()
|
||||||
|
// implementations can use it. The caller may not replace it.
|
||||||
|
options.cloneUnlessOtherwiseSpecified = cloneUnlessOtherwiseSpecified;
|
||||||
|
|
||||||
|
var sourceIsArray = Array.isArray(source);
|
||||||
|
var targetIsArray = Array.isArray(target);
|
||||||
|
var sourceAndTargetTypesMatch = sourceIsArray === targetIsArray;
|
||||||
|
|
||||||
|
if (!sourceAndTargetTypesMatch) {
|
||||||
|
return cloneUnlessOtherwiseSpecified(source, options)
|
||||||
|
} else if (sourceIsArray) {
|
||||||
|
return options.arrayMerge(target, source, options)
|
||||||
|
} else {
|
||||||
|
return mergeObject(target, source, options)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
deepmerge.all = function deepmergeAll(array, options) {
|
||||||
|
if (!Array.isArray(array)) {
|
||||||
|
throw new Error('first argument should be an array')
|
||||||
|
}
|
||||||
|
|
||||||
|
return array.reduce(function(prev, next) {
|
||||||
|
return deepmerge(prev, next, options)
|
||||||
|
}, {})
|
||||||
|
};
|
||||||
|
|
||||||
|
var deepmerge_1 = deepmerge;
|
||||||
|
|
||||||
|
module.exports = deepmerge_1;
|
||||||
|
|
||||||
|
|
||||||
|
/***/ }),
|
||||||
|
|
||||||
|
/***/ 461:
|
||||||
|
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
||||||
|
|
||||||
|
// Load in dependencies
|
||||||
|
var computedStyle = __webpack_require__(6109);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Calculate the `line-height` of a given node
|
||||||
|
* @param {HTMLElement} node Element to calculate line height of. Must be in the DOM.
|
||||||
|
* @returns {Number} `line-height` of the element in pixels
|
||||||
|
*/
|
||||||
|
function lineHeight(node) {
|
||||||
|
// Grab the line-height via style
|
||||||
|
var lnHeightStr = computedStyle(node, 'line-height');
|
||||||
|
var lnHeight = parseFloat(lnHeightStr, 10);
|
||||||
|
|
||||||
|
// If the lineHeight did not contain a unit (i.e. it was numeric), convert it to ems (e.g. '2.3' === '2.3em')
|
||||||
|
if (lnHeightStr === lnHeight + '') {
|
||||||
|
// Save the old lineHeight style and update the em unit to the element
|
||||||
|
var _lnHeightStyle = node.style.lineHeight;
|
||||||
|
node.style.lineHeight = lnHeightStr + 'em';
|
||||||
|
|
||||||
|
// Calculate the em based height
|
||||||
|
lnHeightStr = computedStyle(node, 'line-height');
|
||||||
|
lnHeight = parseFloat(lnHeightStr, 10);
|
||||||
|
|
||||||
|
// Revert the lineHeight style
|
||||||
|
if (_lnHeightStyle) {
|
||||||
|
node.style.lineHeight = _lnHeightStyle;
|
||||||
|
} else {
|
||||||
|
delete node.style.lineHeight;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// If the lineHeight is in `pt`, convert it to pixels (4px for 3pt)
|
||||||
|
// DEV: `em` units are converted to `pt` in IE6
|
||||||
|
// Conversion ratio from https://developer.mozilla.org/en-US/docs/Web/CSS/length
|
||||||
|
if (lnHeightStr.indexOf('pt') !== -1) {
|
||||||
|
lnHeight *= 4;
|
||||||
|
lnHeight /= 3;
|
||||||
|
// Otherwise, if the lineHeight is in `mm`, convert it to pixels (96px for 25.4mm)
|
||||||
|
} else if (lnHeightStr.indexOf('mm') !== -1) {
|
||||||
|
lnHeight *= 96;
|
||||||
|
lnHeight /= 25.4;
|
||||||
|
// Otherwise, if the lineHeight is in `cm`, convert it to pixels (96px for 2.54cm)
|
||||||
|
} else if (lnHeightStr.indexOf('cm') !== -1) {
|
||||||
|
lnHeight *= 96;
|
||||||
|
lnHeight /= 2.54;
|
||||||
|
// Otherwise, if the lineHeight is in `in`, convert it to pixels (96px for 1in)
|
||||||
|
} else if (lnHeightStr.indexOf('in') !== -1) {
|
||||||
|
lnHeight *= 96;
|
||||||
|
// Otherwise, if the lineHeight is in `pc`, convert it to pixels (12pt for 1pc)
|
||||||
|
} else if (lnHeightStr.indexOf('pc') !== -1) {
|
||||||
|
lnHeight *= 16;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Continue our computation
|
||||||
|
lnHeight = Math.round(lnHeight);
|
||||||
|
|
||||||
|
// If the line-height is "normal", calculate by font-size
|
||||||
|
if (lnHeightStr === 'normal') {
|
||||||
|
// Create a temporary node
|
||||||
|
var nodeName = node.nodeName;
|
||||||
|
var _node = document.createElement(nodeName);
|
||||||
|
_node.innerHTML = ' ';
|
||||||
|
|
||||||
|
// If we have a text area, reset it to only 1 row
|
||||||
|
// https://github.com/twolfson/line-height/issues/4
|
||||||
|
if (nodeName.toUpperCase() === 'TEXTAREA') {
|
||||||
|
_node.setAttribute('rows', '1');
|
||||||
|
}
|
||||||
|
|
||||||
|
// Set the font-size of the element
|
||||||
|
var fontSizeStr = computedStyle(node, 'font-size');
|
||||||
|
_node.style.fontSize = fontSizeStr;
|
||||||
|
|
||||||
|
// Remove default padding/border which can affect offset height
|
||||||
|
// https://github.com/twolfson/line-height/issues/4
|
||||||
|
// https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/offsetHeight
|
||||||
|
_node.style.padding = '0px';
|
||||||
|
_node.style.border = '0px';
|
||||||
|
|
||||||
|
// Append it to the body
|
||||||
|
var body = document.body;
|
||||||
|
body.appendChild(_node);
|
||||||
|
|
||||||
|
// Assume the line height of the element is the height
|
||||||
|
var height = _node.offsetHeight;
|
||||||
|
lnHeight = height;
|
||||||
|
|
||||||
|
// Remove our child from the DOM
|
||||||
|
body.removeChild(_node);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Return the calculated height
|
||||||
|
return lnHeight;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Export lineHeight
|
||||||
|
module.exports = lineHeight;
|
||||||
|
|
||||||
|
|
||||||
|
/***/ }),
|
||||||
|
|
||||||
|
/***/ 628:
|
||||||
|
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
||||||
|
|
||||||
|
"use strict";
|
||||||
|
/**
|
||||||
|
* Copyright (c) 2013-present, Facebook, Inc.
|
||||||
|
*
|
||||||
|
* This source code is licensed under the MIT license found in the
|
||||||
|
* LICENSE file in the root directory of this source tree.
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
var ReactPropTypesSecret = __webpack_require__(4067);
|
||||||
|
|
||||||
|
function emptyFunction() {}
|
||||||
|
function emptyFunctionWithReset() {}
|
||||||
|
emptyFunctionWithReset.resetWarningCache = emptyFunction;
|
||||||
|
|
||||||
|
module.exports = function() {
|
||||||
|
function shim(props, propName, componentName, location, propFullName, secret) {
|
||||||
|
if (secret === ReactPropTypesSecret) {
|
||||||
|
// It is still safe when called from React.
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
var err = new Error(
|
||||||
|
'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +
|
||||||
|
'Use PropTypes.checkPropTypes() to call them. ' +
|
||||||
|
'Read more at http://fb.me/use-check-prop-types'
|
||||||
|
);
|
||||||
|
err.name = 'Invariant Violation';
|
||||||
|
throw err;
|
||||||
|
};
|
||||||
|
shim.isRequired = shim;
|
||||||
|
function getShim() {
|
||||||
|
return shim;
|
||||||
|
};
|
||||||
|
// Important!
|
||||||
|
// Keep this list in sync with production version in `./factoryWithTypeCheckers.js`.
|
||||||
|
var ReactPropTypes = {
|
||||||
|
array: shim,
|
||||||
|
bigint: shim,
|
||||||
|
bool: shim,
|
||||||
|
func: shim,
|
||||||
|
number: shim,
|
||||||
|
object: shim,
|
||||||
|
string: shim,
|
||||||
|
symbol: shim,
|
||||||
|
|
||||||
|
any: shim,
|
||||||
|
arrayOf: getShim,
|
||||||
|
element: shim,
|
||||||
|
elementType: shim,
|
||||||
|
instanceOf: getShim,
|
||||||
|
node: shim,
|
||||||
|
objectOf: getShim,
|
||||||
|
oneOf: getShim,
|
||||||
|
oneOfType: getShim,
|
||||||
|
shape: getShim,
|
||||||
|
exact: getShim,
|
||||||
|
|
||||||
|
checkPropTypes: emptyFunctionWithReset,
|
||||||
|
resetWarningCache: emptyFunction
|
||||||
|
};
|
||||||
|
|
||||||
|
ReactPropTypes.PropTypes = ReactPropTypes;
|
||||||
|
|
||||||
|
return ReactPropTypes;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/***/ }),
|
||||||
|
|
||||||
|
/***/ 1609:
|
||||||
|
/***/ ((module) => {
|
||||||
|
|
||||||
|
"use strict";
|
||||||
|
module.exports = window["React"];
|
||||||
|
|
||||||
|
/***/ }),
|
||||||
|
|
||||||
|
/***/ 4067:
|
||||||
|
/***/ ((module) => {
|
||||||
|
|
||||||
|
"use strict";
|
||||||
|
/**
|
||||||
|
* Copyright (c) 2013-present, Facebook, Inc.
|
||||||
|
*
|
||||||
|
* This source code is licensed under the MIT license found in the
|
||||||
|
* LICENSE file in the root directory of this source tree.
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';
|
||||||
|
|
||||||
|
module.exports = ReactPropTypesSecret;
|
||||||
|
|
||||||
|
|
||||||
|
/***/ }),
|
||||||
|
|
||||||
|
/***/ 4132:
|
||||||
|
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
||||||
|
|
||||||
|
"use strict";
|
||||||
|
var __webpack_unused_export__;
|
||||||
|
|
||||||
|
__webpack_unused_export__ = true;
|
||||||
|
var TextareaAutosize_1 = __webpack_require__(4462);
|
||||||
|
exports.A = TextareaAutosize_1.TextareaAutosize;
|
||||||
|
|
||||||
|
|
||||||
|
/***/ }),
|
||||||
|
|
||||||
/***/ 4306:
|
/***/ 4306:
|
||||||
/***/ (function(module, exports) {
|
/***/ (function(module, exports) {
|
||||||
|
|
||||||
@ -288,451 +647,6 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
|
|||||||
module.exports = exports['default'];
|
module.exports = exports['default'];
|
||||||
});
|
});
|
||||||
|
|
||||||
/***/ }),
|
|
||||||
|
|
||||||
/***/ 6109:
|
|
||||||
/***/ ((module) => {
|
|
||||||
|
|
||||||
// This code has been refactored for 140 bytes
|
|
||||||
// You can see the original here: https://github.com/twolfson/computedStyle/blob/04cd1da2e30fa45844f95f5cb1ac898e9b9ef050/lib/computedStyle.js
|
|
||||||
var computedStyle = function (el, prop, getComputedStyle) {
|
|
||||||
getComputedStyle = window.getComputedStyle;
|
|
||||||
|
|
||||||
// In one fell swoop
|
|
||||||
return (
|
|
||||||
// If we have getComputedStyle
|
|
||||||
getComputedStyle ?
|
|
||||||
// Query it
|
|
||||||
// TODO: From CSS-Query notes, we might need (node, null) for FF
|
|
||||||
getComputedStyle(el) :
|
|
||||||
|
|
||||||
// Otherwise, we are in IE and use currentStyle
|
|
||||||
el.currentStyle
|
|
||||||
)[
|
|
||||||
// Switch to camelCase for CSSOM
|
|
||||||
// DEV: Grabbed from jQuery
|
|
||||||
// https://github.com/jquery/jquery/blob/1.9-stable/src/css.js#L191-L194
|
|
||||||
// https://github.com/jquery/jquery/blob/1.9-stable/src/core.js#L593-L597
|
|
||||||
prop.replace(/-(\w)/gi, function (word, letter) {
|
|
||||||
return letter.toUpperCase();
|
|
||||||
})
|
|
||||||
];
|
|
||||||
};
|
|
||||||
|
|
||||||
module.exports = computedStyle;
|
|
||||||
|
|
||||||
|
|
||||||
/***/ }),
|
|
||||||
|
|
||||||
/***/ 66:
|
|
||||||
/***/ ((module) => {
|
|
||||||
|
|
||||||
"use strict";
|
|
||||||
|
|
||||||
|
|
||||||
var isMergeableObject = function isMergeableObject(value) {
|
|
||||||
return isNonNullObject(value)
|
|
||||||
&& !isSpecial(value)
|
|
||||||
};
|
|
||||||
|
|
||||||
function isNonNullObject(value) {
|
|
||||||
return !!value && typeof value === 'object'
|
|
||||||
}
|
|
||||||
|
|
||||||
function isSpecial(value) {
|
|
||||||
var stringValue = Object.prototype.toString.call(value);
|
|
||||||
|
|
||||||
return stringValue === '[object RegExp]'
|
|
||||||
|| stringValue === '[object Date]'
|
|
||||||
|| isReactElement(value)
|
|
||||||
}
|
|
||||||
|
|
||||||
// see https://github.com/facebook/react/blob/b5ac963fb791d1298e7f396236383bc955f916c1/src/isomorphic/classic/element/ReactElement.js#L21-L25
|
|
||||||
var canUseSymbol = typeof Symbol === 'function' && Symbol.for;
|
|
||||||
var REACT_ELEMENT_TYPE = canUseSymbol ? Symbol.for('react.element') : 0xeac7;
|
|
||||||
|
|
||||||
function isReactElement(value) {
|
|
||||||
return value.$$typeof === REACT_ELEMENT_TYPE
|
|
||||||
}
|
|
||||||
|
|
||||||
function emptyTarget(val) {
|
|
||||||
return Array.isArray(val) ? [] : {}
|
|
||||||
}
|
|
||||||
|
|
||||||
function cloneUnlessOtherwiseSpecified(value, options) {
|
|
||||||
return (options.clone !== false && options.isMergeableObject(value))
|
|
||||||
? deepmerge(emptyTarget(value), value, options)
|
|
||||||
: value
|
|
||||||
}
|
|
||||||
|
|
||||||
function defaultArrayMerge(target, source, options) {
|
|
||||||
return target.concat(source).map(function(element) {
|
|
||||||
return cloneUnlessOtherwiseSpecified(element, options)
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
function getMergeFunction(key, options) {
|
|
||||||
if (!options.customMerge) {
|
|
||||||
return deepmerge
|
|
||||||
}
|
|
||||||
var customMerge = options.customMerge(key);
|
|
||||||
return typeof customMerge === 'function' ? customMerge : deepmerge
|
|
||||||
}
|
|
||||||
|
|
||||||
function getEnumerableOwnPropertySymbols(target) {
|
|
||||||
return Object.getOwnPropertySymbols
|
|
||||||
? Object.getOwnPropertySymbols(target).filter(function(symbol) {
|
|
||||||
return Object.propertyIsEnumerable.call(target, symbol)
|
|
||||||
})
|
|
||||||
: []
|
|
||||||
}
|
|
||||||
|
|
||||||
function getKeys(target) {
|
|
||||||
return Object.keys(target).concat(getEnumerableOwnPropertySymbols(target))
|
|
||||||
}
|
|
||||||
|
|
||||||
function propertyIsOnObject(object, property) {
|
|
||||||
try {
|
|
||||||
return property in object
|
|
||||||
} catch(_) {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Protects from prototype poisoning and unexpected merging up the prototype chain.
|
|
||||||
function propertyIsUnsafe(target, key) {
|
|
||||||
return propertyIsOnObject(target, key) // Properties are safe to merge if they don't exist in the target yet,
|
|
||||||
&& !(Object.hasOwnProperty.call(target, key) // unsafe if they exist up the prototype chain,
|
|
||||||
&& Object.propertyIsEnumerable.call(target, key)) // and also unsafe if they're nonenumerable.
|
|
||||||
}
|
|
||||||
|
|
||||||
function mergeObject(target, source, options) {
|
|
||||||
var destination = {};
|
|
||||||
if (options.isMergeableObject(target)) {
|
|
||||||
getKeys(target).forEach(function(key) {
|
|
||||||
destination[key] = cloneUnlessOtherwiseSpecified(target[key], options);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
getKeys(source).forEach(function(key) {
|
|
||||||
if (propertyIsUnsafe(target, key)) {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
if (propertyIsOnObject(target, key) && options.isMergeableObject(source[key])) {
|
|
||||||
destination[key] = getMergeFunction(key, options)(target[key], source[key], options);
|
|
||||||
} else {
|
|
||||||
destination[key] = cloneUnlessOtherwiseSpecified(source[key], options);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
return destination
|
|
||||||
}
|
|
||||||
|
|
||||||
function deepmerge(target, source, options) {
|
|
||||||
options = options || {};
|
|
||||||
options.arrayMerge = options.arrayMerge || defaultArrayMerge;
|
|
||||||
options.isMergeableObject = options.isMergeableObject || isMergeableObject;
|
|
||||||
// cloneUnlessOtherwiseSpecified is added to `options` so that custom arrayMerge()
|
|
||||||
// implementations can use it. The caller may not replace it.
|
|
||||||
options.cloneUnlessOtherwiseSpecified = cloneUnlessOtherwiseSpecified;
|
|
||||||
|
|
||||||
var sourceIsArray = Array.isArray(source);
|
|
||||||
var targetIsArray = Array.isArray(target);
|
|
||||||
var sourceAndTargetTypesMatch = sourceIsArray === targetIsArray;
|
|
||||||
|
|
||||||
if (!sourceAndTargetTypesMatch) {
|
|
||||||
return cloneUnlessOtherwiseSpecified(source, options)
|
|
||||||
} else if (sourceIsArray) {
|
|
||||||
return options.arrayMerge(target, source, options)
|
|
||||||
} else {
|
|
||||||
return mergeObject(target, source, options)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
deepmerge.all = function deepmergeAll(array, options) {
|
|
||||||
if (!Array.isArray(array)) {
|
|
||||||
throw new Error('first argument should be an array')
|
|
||||||
}
|
|
||||||
|
|
||||||
return array.reduce(function(prev, next) {
|
|
||||||
return deepmerge(prev, next, options)
|
|
||||||
}, {})
|
|
||||||
};
|
|
||||||
|
|
||||||
var deepmerge_1 = deepmerge;
|
|
||||||
|
|
||||||
module.exports = deepmerge_1;
|
|
||||||
|
|
||||||
|
|
||||||
/***/ }),
|
|
||||||
|
|
||||||
/***/ 5215:
|
|
||||||
/***/ ((module) => {
|
|
||||||
|
|
||||||
"use strict";
|
|
||||||
|
|
||||||
|
|
||||||
// do not edit .js files directly - edit src/index.jst
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
module.exports = function equal(a, b) {
|
|
||||||
if (a === b) return true;
|
|
||||||
|
|
||||||
if (a && b && typeof a == 'object' && typeof b == 'object') {
|
|
||||||
if (a.constructor !== b.constructor) return false;
|
|
||||||
|
|
||||||
var length, i, keys;
|
|
||||||
if (Array.isArray(a)) {
|
|
||||||
length = a.length;
|
|
||||||
if (length != b.length) return false;
|
|
||||||
for (i = length; i-- !== 0;)
|
|
||||||
if (!equal(a[i], b[i])) return false;
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if (a.constructor === RegExp) return a.source === b.source && a.flags === b.flags;
|
|
||||||
if (a.valueOf !== Object.prototype.valueOf) return a.valueOf() === b.valueOf();
|
|
||||||
if (a.toString !== Object.prototype.toString) return a.toString() === b.toString();
|
|
||||||
|
|
||||||
keys = Object.keys(a);
|
|
||||||
length = keys.length;
|
|
||||||
if (length !== Object.keys(b).length) return false;
|
|
||||||
|
|
||||||
for (i = length; i-- !== 0;)
|
|
||||||
if (!Object.prototype.hasOwnProperty.call(b, keys[i])) return false;
|
|
||||||
|
|
||||||
for (i = length; i-- !== 0;) {
|
|
||||||
var key = keys[i];
|
|
||||||
|
|
||||||
if (!equal(a[key], b[key])) return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
// true if both NaN, false otherwise
|
|
||||||
return a!==a && b!==b;
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
/***/ }),
|
|
||||||
|
|
||||||
/***/ 461:
|
|
||||||
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
||||||
|
|
||||||
// Load in dependencies
|
|
||||||
var computedStyle = __webpack_require__(6109);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Calculate the `line-height` of a given node
|
|
||||||
* @param {HTMLElement} node Element to calculate line height of. Must be in the DOM.
|
|
||||||
* @returns {Number} `line-height` of the element in pixels
|
|
||||||
*/
|
|
||||||
function lineHeight(node) {
|
|
||||||
// Grab the line-height via style
|
|
||||||
var lnHeightStr = computedStyle(node, 'line-height');
|
|
||||||
var lnHeight = parseFloat(lnHeightStr, 10);
|
|
||||||
|
|
||||||
// If the lineHeight did not contain a unit (i.e. it was numeric), convert it to ems (e.g. '2.3' === '2.3em')
|
|
||||||
if (lnHeightStr === lnHeight + '') {
|
|
||||||
// Save the old lineHeight style and update the em unit to the element
|
|
||||||
var _lnHeightStyle = node.style.lineHeight;
|
|
||||||
node.style.lineHeight = lnHeightStr + 'em';
|
|
||||||
|
|
||||||
// Calculate the em based height
|
|
||||||
lnHeightStr = computedStyle(node, 'line-height');
|
|
||||||
lnHeight = parseFloat(lnHeightStr, 10);
|
|
||||||
|
|
||||||
// Revert the lineHeight style
|
|
||||||
if (_lnHeightStyle) {
|
|
||||||
node.style.lineHeight = _lnHeightStyle;
|
|
||||||
} else {
|
|
||||||
delete node.style.lineHeight;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// If the lineHeight is in `pt`, convert it to pixels (4px for 3pt)
|
|
||||||
// DEV: `em` units are converted to `pt` in IE6
|
|
||||||
// Conversion ratio from https://developer.mozilla.org/en-US/docs/Web/CSS/length
|
|
||||||
if (lnHeightStr.indexOf('pt') !== -1) {
|
|
||||||
lnHeight *= 4;
|
|
||||||
lnHeight /= 3;
|
|
||||||
// Otherwise, if the lineHeight is in `mm`, convert it to pixels (96px for 25.4mm)
|
|
||||||
} else if (lnHeightStr.indexOf('mm') !== -1) {
|
|
||||||
lnHeight *= 96;
|
|
||||||
lnHeight /= 25.4;
|
|
||||||
// Otherwise, if the lineHeight is in `cm`, convert it to pixels (96px for 2.54cm)
|
|
||||||
} else if (lnHeightStr.indexOf('cm') !== -1) {
|
|
||||||
lnHeight *= 96;
|
|
||||||
lnHeight /= 2.54;
|
|
||||||
// Otherwise, if the lineHeight is in `in`, convert it to pixels (96px for 1in)
|
|
||||||
} else if (lnHeightStr.indexOf('in') !== -1) {
|
|
||||||
lnHeight *= 96;
|
|
||||||
// Otherwise, if the lineHeight is in `pc`, convert it to pixels (12pt for 1pc)
|
|
||||||
} else if (lnHeightStr.indexOf('pc') !== -1) {
|
|
||||||
lnHeight *= 16;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Continue our computation
|
|
||||||
lnHeight = Math.round(lnHeight);
|
|
||||||
|
|
||||||
// If the line-height is "normal", calculate by font-size
|
|
||||||
if (lnHeightStr === 'normal') {
|
|
||||||
// Create a temporary node
|
|
||||||
var nodeName = node.nodeName;
|
|
||||||
var _node = document.createElement(nodeName);
|
|
||||||
_node.innerHTML = ' ';
|
|
||||||
|
|
||||||
// If we have a text area, reset it to only 1 row
|
|
||||||
// https://github.com/twolfson/line-height/issues/4
|
|
||||||
if (nodeName.toUpperCase() === 'TEXTAREA') {
|
|
||||||
_node.setAttribute('rows', '1');
|
|
||||||
}
|
|
||||||
|
|
||||||
// Set the font-size of the element
|
|
||||||
var fontSizeStr = computedStyle(node, 'font-size');
|
|
||||||
_node.style.fontSize = fontSizeStr;
|
|
||||||
|
|
||||||
// Remove default padding/border which can affect offset height
|
|
||||||
// https://github.com/twolfson/line-height/issues/4
|
|
||||||
// https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/offsetHeight
|
|
||||||
_node.style.padding = '0px';
|
|
||||||
_node.style.border = '0px';
|
|
||||||
|
|
||||||
// Append it to the body
|
|
||||||
var body = document.body;
|
|
||||||
body.appendChild(_node);
|
|
||||||
|
|
||||||
// Assume the line height of the element is the height
|
|
||||||
var height = _node.offsetHeight;
|
|
||||||
lnHeight = height;
|
|
||||||
|
|
||||||
// Remove our child from the DOM
|
|
||||||
body.removeChild(_node);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Return the calculated height
|
|
||||||
return lnHeight;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Export lineHeight
|
|
||||||
module.exports = lineHeight;
|
|
||||||
|
|
||||||
|
|
||||||
/***/ }),
|
|
||||||
|
|
||||||
/***/ 628:
|
|
||||||
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
||||||
|
|
||||||
"use strict";
|
|
||||||
/**
|
|
||||||
* Copyright (c) 2013-present, Facebook, Inc.
|
|
||||||
*
|
|
||||||
* This source code is licensed under the MIT license found in the
|
|
||||||
* LICENSE file in the root directory of this source tree.
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
var ReactPropTypesSecret = __webpack_require__(4067);
|
|
||||||
|
|
||||||
function emptyFunction() {}
|
|
||||||
function emptyFunctionWithReset() {}
|
|
||||||
emptyFunctionWithReset.resetWarningCache = emptyFunction;
|
|
||||||
|
|
||||||
module.exports = function() {
|
|
||||||
function shim(props, propName, componentName, location, propFullName, secret) {
|
|
||||||
if (secret === ReactPropTypesSecret) {
|
|
||||||
// It is still safe when called from React.
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
var err = new Error(
|
|
||||||
'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +
|
|
||||||
'Use PropTypes.checkPropTypes() to call them. ' +
|
|
||||||
'Read more at http://fb.me/use-check-prop-types'
|
|
||||||
);
|
|
||||||
err.name = 'Invariant Violation';
|
|
||||||
throw err;
|
|
||||||
};
|
|
||||||
shim.isRequired = shim;
|
|
||||||
function getShim() {
|
|
||||||
return shim;
|
|
||||||
};
|
|
||||||
// Important!
|
|
||||||
// Keep this list in sync with production version in `./factoryWithTypeCheckers.js`.
|
|
||||||
var ReactPropTypes = {
|
|
||||||
array: shim,
|
|
||||||
bigint: shim,
|
|
||||||
bool: shim,
|
|
||||||
func: shim,
|
|
||||||
number: shim,
|
|
||||||
object: shim,
|
|
||||||
string: shim,
|
|
||||||
symbol: shim,
|
|
||||||
|
|
||||||
any: shim,
|
|
||||||
arrayOf: getShim,
|
|
||||||
element: shim,
|
|
||||||
elementType: shim,
|
|
||||||
instanceOf: getShim,
|
|
||||||
node: shim,
|
|
||||||
objectOf: getShim,
|
|
||||||
oneOf: getShim,
|
|
||||||
oneOfType: getShim,
|
|
||||||
shape: getShim,
|
|
||||||
exact: getShim,
|
|
||||||
|
|
||||||
checkPropTypes: emptyFunctionWithReset,
|
|
||||||
resetWarningCache: emptyFunction
|
|
||||||
};
|
|
||||||
|
|
||||||
ReactPropTypes.PropTypes = ReactPropTypes;
|
|
||||||
|
|
||||||
return ReactPropTypes;
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
/***/ }),
|
|
||||||
|
|
||||||
/***/ 5826:
|
|
||||||
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Copyright (c) 2013-present, Facebook, Inc.
|
|
||||||
*
|
|
||||||
* This source code is licensed under the MIT license found in the
|
|
||||||
* LICENSE file in the root directory of this source tree.
|
|
||||||
*/
|
|
||||||
|
|
||||||
if (false) { var throwOnDirectAccess, ReactIs; } else {
|
|
||||||
// By explicitly using `prop-types` you are opting into new production behavior.
|
|
||||||
// http://fb.me/prop-types-in-prod
|
|
||||||
module.exports = __webpack_require__(628)();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/***/ }),
|
|
||||||
|
|
||||||
/***/ 4067:
|
|
||||||
/***/ ((module) => {
|
|
||||||
|
|
||||||
"use strict";
|
|
||||||
/**
|
|
||||||
* Copyright (c) 2013-present, Facebook, Inc.
|
|
||||||
*
|
|
||||||
* This source code is licensed under the MIT license found in the
|
|
||||||
* LICENSE file in the root directory of this source tree.
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';
|
|
||||||
|
|
||||||
module.exports = ReactPropTypesSecret;
|
|
||||||
|
|
||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
|
|
||||||
/***/ 4462:
|
/***/ 4462:
|
||||||
@ -869,15 +783,109 @@ exports.TextareaAutosize = React.forwardRef(function (props, ref) {
|
|||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
|
|
||||||
/***/ 4132:
|
/***/ 5215:
|
||||||
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
/***/ ((module) => {
|
||||||
|
|
||||||
"use strict";
|
"use strict";
|
||||||
var __webpack_unused_export__;
|
|
||||||
|
|
||||||
__webpack_unused_export__ = true;
|
|
||||||
var TextareaAutosize_1 = __webpack_require__(4462);
|
// do not edit .js files directly - edit src/index.jst
|
||||||
exports.A = TextareaAutosize_1.TextareaAutosize;
|
|
||||||
|
|
||||||
|
|
||||||
|
module.exports = function equal(a, b) {
|
||||||
|
if (a === b) return true;
|
||||||
|
|
||||||
|
if (a && b && typeof a == 'object' && typeof b == 'object') {
|
||||||
|
if (a.constructor !== b.constructor) return false;
|
||||||
|
|
||||||
|
var length, i, keys;
|
||||||
|
if (Array.isArray(a)) {
|
||||||
|
length = a.length;
|
||||||
|
if (length != b.length) return false;
|
||||||
|
for (i = length; i-- !== 0;)
|
||||||
|
if (!equal(a[i], b[i])) return false;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
if (a.constructor === RegExp) return a.source === b.source && a.flags === b.flags;
|
||||||
|
if (a.valueOf !== Object.prototype.valueOf) return a.valueOf() === b.valueOf();
|
||||||
|
if (a.toString !== Object.prototype.toString) return a.toString() === b.toString();
|
||||||
|
|
||||||
|
keys = Object.keys(a);
|
||||||
|
length = keys.length;
|
||||||
|
if (length !== Object.keys(b).length) return false;
|
||||||
|
|
||||||
|
for (i = length; i-- !== 0;)
|
||||||
|
if (!Object.prototype.hasOwnProperty.call(b, keys[i])) return false;
|
||||||
|
|
||||||
|
for (i = length; i-- !== 0;) {
|
||||||
|
var key = keys[i];
|
||||||
|
|
||||||
|
if (!equal(a[key], b[key])) return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
// true if both NaN, false otherwise
|
||||||
|
return a!==a && b!==b;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/***/ }),
|
||||||
|
|
||||||
|
/***/ 5826:
|
||||||
|
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Copyright (c) 2013-present, Facebook, Inc.
|
||||||
|
*
|
||||||
|
* This source code is licensed under the MIT license found in the
|
||||||
|
* LICENSE file in the root directory of this source tree.
|
||||||
|
*/
|
||||||
|
|
||||||
|
if (false) { var throwOnDirectAccess, ReactIs; } else {
|
||||||
|
// By explicitly using `prop-types` you are opting into new production behavior.
|
||||||
|
// http://fb.me/prop-types-in-prod
|
||||||
|
module.exports = __webpack_require__(628)();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/***/ }),
|
||||||
|
|
||||||
|
/***/ 6109:
|
||||||
|
/***/ ((module) => {
|
||||||
|
|
||||||
|
// This code has been refactored for 140 bytes
|
||||||
|
// You can see the original here: https://github.com/twolfson/computedStyle/blob/04cd1da2e30fa45844f95f5cb1ac898e9b9ef050/lib/computedStyle.js
|
||||||
|
var computedStyle = function (el, prop, getComputedStyle) {
|
||||||
|
getComputedStyle = window.getComputedStyle;
|
||||||
|
|
||||||
|
// In one fell swoop
|
||||||
|
return (
|
||||||
|
// If we have getComputedStyle
|
||||||
|
getComputedStyle ?
|
||||||
|
// Query it
|
||||||
|
// TODO: From CSS-Query notes, we might need (node, null) for FF
|
||||||
|
getComputedStyle(el) :
|
||||||
|
|
||||||
|
// Otherwise, we are in IE and use currentStyle
|
||||||
|
el.currentStyle
|
||||||
|
)[
|
||||||
|
// Switch to camelCase for CSSOM
|
||||||
|
// DEV: Grabbed from jQuery
|
||||||
|
// https://github.com/jquery/jquery/blob/1.9-stable/src/css.js#L191-L194
|
||||||
|
// https://github.com/jquery/jquery/blob/1.9-stable/src/core.js#L593-L597
|
||||||
|
prop.replace(/-(\w)/gi, function (word, letter) {
|
||||||
|
return letter.toUpperCase();
|
||||||
|
})
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
module.exports = computedStyle;
|
||||||
|
|
||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
@ -1368,14 +1376,6 @@ module.exports.has = hasAccents;
|
|||||||
module.exports.remove = removeAccents;
|
module.exports.remove = removeAccents;
|
||||||
|
|
||||||
|
|
||||||
/***/ }),
|
|
||||||
|
|
||||||
/***/ 1609:
|
|
||||||
/***/ ((module) => {
|
|
||||||
|
|
||||||
"use strict";
|
|
||||||
module.exports = window["React"];
|
|
||||||
|
|
||||||
/***/ })
|
/***/ })
|
||||||
|
|
||||||
/******/ });
|
/******/ });
|
||||||
|
4
wp-includes/js/dist/editor.min.js
vendored
4
wp-includes/js/dist/editor.min.js
vendored
File diff suppressed because one or more lines are too long
784
wp-includes/js/dist/redux-routine.js
vendored
784
wp-includes/js/dist/redux-routine.js
vendored
@ -2,227 +2,6 @@
|
|||||||
/******/ "use strict";
|
/******/ "use strict";
|
||||||
/******/ var __webpack_modules__ = ({
|
/******/ var __webpack_modules__ = ({
|
||||||
|
|
||||||
/***/ 6910:
|
|
||||||
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Object.defineProperty(exports, "__esModule", ({
|
|
||||||
value: true
|
|
||||||
}));
|
|
||||||
exports.race = exports.join = exports.fork = exports.promise = undefined;
|
|
||||||
|
|
||||||
var _is = __webpack_require__(6921);
|
|
||||||
|
|
||||||
var _is2 = _interopRequireDefault(_is);
|
|
||||||
|
|
||||||
var _helpers = __webpack_require__(3524);
|
|
||||||
|
|
||||||
var _dispatcher = __webpack_require__(5136);
|
|
||||||
|
|
||||||
var _dispatcher2 = _interopRequireDefault(_dispatcher);
|
|
||||||
|
|
||||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
||||||
|
|
||||||
var promise = exports.promise = function promise(value, next, rungen, yieldNext, raiseNext) {
|
|
||||||
if (!_is2.default.promise(value)) return false;
|
|
||||||
value.then(next, raiseNext);
|
|
||||||
return true;
|
|
||||||
};
|
|
||||||
|
|
||||||
var forkedTasks = new Map();
|
|
||||||
var fork = exports.fork = function fork(value, next, rungen) {
|
|
||||||
if (!_is2.default.fork(value)) return false;
|
|
||||||
var task = Symbol('fork');
|
|
||||||
var dispatcher = (0, _dispatcher2.default)();
|
|
||||||
forkedTasks.set(task, dispatcher);
|
|
||||||
rungen(value.iterator.apply(null, value.args), function (result) {
|
|
||||||
return dispatcher.dispatch(result);
|
|
||||||
}, function (err) {
|
|
||||||
return dispatcher.dispatch((0, _helpers.error)(err));
|
|
||||||
});
|
|
||||||
var unsubscribe = dispatcher.subscribe(function () {
|
|
||||||
unsubscribe();
|
|
||||||
forkedTasks.delete(task);
|
|
||||||
});
|
|
||||||
next(task);
|
|
||||||
return true;
|
|
||||||
};
|
|
||||||
|
|
||||||
var join = exports.join = function join(value, next, rungen, yieldNext, raiseNext) {
|
|
||||||
if (!_is2.default.join(value)) return false;
|
|
||||||
var dispatcher = forkedTasks.get(value.task);
|
|
||||||
if (!dispatcher) {
|
|
||||||
raiseNext('join error : task not found');
|
|
||||||
} else {
|
|
||||||
(function () {
|
|
||||||
var unsubscribe = dispatcher.subscribe(function (result) {
|
|
||||||
unsubscribe();
|
|
||||||
next(result);
|
|
||||||
});
|
|
||||||
})();
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
};
|
|
||||||
|
|
||||||
var race = exports.race = function race(value, next, rungen, yieldNext, raiseNext) {
|
|
||||||
if (!_is2.default.race(value)) return false;
|
|
||||||
var finished = false;
|
|
||||||
var success = function success(result, k, v) {
|
|
||||||
if (finished) return;
|
|
||||||
finished = true;
|
|
||||||
result[k] = v;
|
|
||||||
next(result);
|
|
||||||
};
|
|
||||||
|
|
||||||
var fail = function fail(err) {
|
|
||||||
if (finished) return;
|
|
||||||
raiseNext(err);
|
|
||||||
};
|
|
||||||
if (_is2.default.array(value.competitors)) {
|
|
||||||
(function () {
|
|
||||||
var result = value.competitors.map(function () {
|
|
||||||
return false;
|
|
||||||
});
|
|
||||||
value.competitors.forEach(function (competitor, index) {
|
|
||||||
rungen(competitor, function (output) {
|
|
||||||
return success(result, index, output);
|
|
||||||
}, fail);
|
|
||||||
});
|
|
||||||
})();
|
|
||||||
} else {
|
|
||||||
(function () {
|
|
||||||
var result = Object.keys(value.competitors).reduce(function (p, c) {
|
|
||||||
p[c] = false;
|
|
||||||
return p;
|
|
||||||
}, {});
|
|
||||||
Object.keys(value.competitors).forEach(function (index) {
|
|
||||||
rungen(value.competitors[index], function (output) {
|
|
||||||
return success(result, index, output);
|
|
||||||
}, fail);
|
|
||||||
});
|
|
||||||
})();
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
};
|
|
||||||
|
|
||||||
var subscribe = function subscribe(value, next) {
|
|
||||||
if (!_is2.default.subscribe(value)) return false;
|
|
||||||
if (!_is2.default.channel(value.channel)) {
|
|
||||||
throw new Error('the first argument of "subscribe" must be a valid channel');
|
|
||||||
}
|
|
||||||
var unsubscribe = value.channel.subscribe(function (ret) {
|
|
||||||
unsubscribe && unsubscribe();
|
|
||||||
next(ret);
|
|
||||||
});
|
|
||||||
|
|
||||||
return true;
|
|
||||||
};
|
|
||||||
|
|
||||||
exports["default"] = [promise, fork, join, race, subscribe];
|
|
||||||
|
|
||||||
/***/ }),
|
|
||||||
|
|
||||||
/***/ 5357:
|
|
||||||
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Object.defineProperty(exports, "__esModule", ({
|
|
||||||
value: true
|
|
||||||
}));
|
|
||||||
exports.iterator = exports.array = exports.object = exports.error = exports.any = undefined;
|
|
||||||
|
|
||||||
var _is = __webpack_require__(6921);
|
|
||||||
|
|
||||||
var _is2 = _interopRequireDefault(_is);
|
|
||||||
|
|
||||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
||||||
|
|
||||||
var any = exports.any = function any(value, next, rungen, yieldNext) {
|
|
||||||
yieldNext(value);
|
|
||||||
return true;
|
|
||||||
};
|
|
||||||
|
|
||||||
var error = exports.error = function error(value, next, rungen, yieldNext, raiseNext) {
|
|
||||||
if (!_is2.default.error(value)) return false;
|
|
||||||
raiseNext(value.error);
|
|
||||||
return true;
|
|
||||||
};
|
|
||||||
|
|
||||||
var object = exports.object = function object(value, next, rungen, yieldNext, raiseNext) {
|
|
||||||
if (!_is2.default.all(value) || !_is2.default.obj(value.value)) return false;
|
|
||||||
var result = {};
|
|
||||||
var keys = Object.keys(value.value);
|
|
||||||
var count = 0;
|
|
||||||
var hasError = false;
|
|
||||||
var gotResultSuccess = function gotResultSuccess(key, ret) {
|
|
||||||
if (hasError) return;
|
|
||||||
result[key] = ret;
|
|
||||||
count++;
|
|
||||||
if (count === keys.length) {
|
|
||||||
yieldNext(result);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
var gotResultError = function gotResultError(key, error) {
|
|
||||||
if (hasError) return;
|
|
||||||
hasError = true;
|
|
||||||
raiseNext(error);
|
|
||||||
};
|
|
||||||
|
|
||||||
keys.map(function (key) {
|
|
||||||
rungen(value.value[key], function (ret) {
|
|
||||||
return gotResultSuccess(key, ret);
|
|
||||||
}, function (err) {
|
|
||||||
return gotResultError(key, err);
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
return true;
|
|
||||||
};
|
|
||||||
|
|
||||||
var array = exports.array = function array(value, next, rungen, yieldNext, raiseNext) {
|
|
||||||
if (!_is2.default.all(value) || !_is2.default.array(value.value)) return false;
|
|
||||||
var result = [];
|
|
||||||
var count = 0;
|
|
||||||
var hasError = false;
|
|
||||||
var gotResultSuccess = function gotResultSuccess(key, ret) {
|
|
||||||
if (hasError) return;
|
|
||||||
result[key] = ret;
|
|
||||||
count++;
|
|
||||||
if (count === value.value.length) {
|
|
||||||
yieldNext(result);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
var gotResultError = function gotResultError(key, error) {
|
|
||||||
if (hasError) return;
|
|
||||||
hasError = true;
|
|
||||||
raiseNext(error);
|
|
||||||
};
|
|
||||||
|
|
||||||
value.value.map(function (v, key) {
|
|
||||||
rungen(v, function (ret) {
|
|
||||||
return gotResultSuccess(key, ret);
|
|
||||||
}, function (err) {
|
|
||||||
return gotResultError(key, err);
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
return true;
|
|
||||||
};
|
|
||||||
|
|
||||||
var iterator = exports.iterator = function iterator(value, next, rungen, yieldNext, raiseNext) {
|
|
||||||
if (!_is2.default.iterator(value)) return false;
|
|
||||||
rungen(value, next, raiseNext);
|
|
||||||
return true;
|
|
||||||
};
|
|
||||||
|
|
||||||
exports["default"] = [error, iterator, array, object, any];
|
|
||||||
|
|
||||||
/***/ }),
|
|
||||||
|
|
||||||
/***/ 3304:
|
/***/ 3304:
|
||||||
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
||||||
|
|
||||||
@ -265,165 +44,6 @@ exports["default"] = [call, cps];
|
|||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
|
|
||||||
/***/ 9127:
|
|
||||||
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Object.defineProperty(exports, "__esModule", ({
|
|
||||||
value: true
|
|
||||||
}));
|
|
||||||
|
|
||||||
var _builtin = __webpack_require__(5357);
|
|
||||||
|
|
||||||
var _builtin2 = _interopRequireDefault(_builtin);
|
|
||||||
|
|
||||||
var _is = __webpack_require__(6921);
|
|
||||||
|
|
||||||
var _is2 = _interopRequireDefault(_is);
|
|
||||||
|
|
||||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
||||||
|
|
||||||
function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } }
|
|
||||||
|
|
||||||
var create = function create() {
|
|
||||||
var userControls = arguments.length <= 0 || arguments[0] === undefined ? [] : arguments[0];
|
|
||||||
|
|
||||||
var controls = [].concat(_toConsumableArray(userControls), _toConsumableArray(_builtin2.default));
|
|
||||||
|
|
||||||
var runtime = function runtime(input) {
|
|
||||||
var success = arguments.length <= 1 || arguments[1] === undefined ? function () {} : arguments[1];
|
|
||||||
var error = arguments.length <= 2 || arguments[2] === undefined ? function () {} : arguments[2];
|
|
||||||
|
|
||||||
var iterate = function iterate(gen) {
|
|
||||||
var yieldValue = function yieldValue(isError) {
|
|
||||||
return function (ret) {
|
|
||||||
try {
|
|
||||||
var _ref = isError ? gen.throw(ret) : gen.next(ret);
|
|
||||||
|
|
||||||
var value = _ref.value;
|
|
||||||
var done = _ref.done;
|
|
||||||
|
|
||||||
if (done) return success(value);
|
|
||||||
next(value);
|
|
||||||
} catch (e) {
|
|
||||||
return error(e);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
var next = function next(ret) {
|
|
||||||
controls.some(function (control) {
|
|
||||||
return control(ret, next, runtime, yieldValue(false), yieldValue(true));
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
yieldValue(false)();
|
|
||||||
};
|
|
||||||
|
|
||||||
var iterator = _is2.default.iterator(input) ? input : regeneratorRuntime.mark(function _callee() {
|
|
||||||
return regeneratorRuntime.wrap(function _callee$(_context) {
|
|
||||||
while (1) {
|
|
||||||
switch (_context.prev = _context.next) {
|
|
||||||
case 0:
|
|
||||||
_context.next = 2;
|
|
||||||
return input;
|
|
||||||
|
|
||||||
case 2:
|
|
||||||
return _context.abrupt('return', _context.sent);
|
|
||||||
|
|
||||||
case 3:
|
|
||||||
case 'end':
|
|
||||||
return _context.stop();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}, _callee, this);
|
|
||||||
})();
|
|
||||||
|
|
||||||
iterate(iterator, success, error);
|
|
||||||
};
|
|
||||||
|
|
||||||
return runtime;
|
|
||||||
};
|
|
||||||
|
|
||||||
exports["default"] = create;
|
|
||||||
|
|
||||||
/***/ }),
|
|
||||||
|
|
||||||
/***/ 8975:
|
|
||||||
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Object.defineProperty(exports, "__esModule", ({
|
|
||||||
value: true
|
|
||||||
}));
|
|
||||||
exports.wrapControls = exports.asyncControls = exports.create = undefined;
|
|
||||||
|
|
||||||
var _helpers = __webpack_require__(3524);
|
|
||||||
|
|
||||||
Object.keys(_helpers).forEach(function (key) {
|
|
||||||
if (key === "default") return;
|
|
||||||
Object.defineProperty(exports, key, {
|
|
||||||
enumerable: true,
|
|
||||||
get: function get() {
|
|
||||||
return _helpers[key];
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
var _create = __webpack_require__(9127);
|
|
||||||
|
|
||||||
var _create2 = _interopRequireDefault(_create);
|
|
||||||
|
|
||||||
var _async = __webpack_require__(6910);
|
|
||||||
|
|
||||||
var _async2 = _interopRequireDefault(_async);
|
|
||||||
|
|
||||||
var _wrap = __webpack_require__(3304);
|
|
||||||
|
|
||||||
var _wrap2 = _interopRequireDefault(_wrap);
|
|
||||||
|
|
||||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
||||||
|
|
||||||
exports.create = _create2.default;
|
|
||||||
exports.asyncControls = _async2.default;
|
|
||||||
exports.wrapControls = _wrap2.default;
|
|
||||||
|
|
||||||
/***/ }),
|
|
||||||
|
|
||||||
/***/ 5136:
|
|
||||||
/***/ ((__unused_webpack_module, exports) => {
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Object.defineProperty(exports, "__esModule", ({
|
|
||||||
value: true
|
|
||||||
}));
|
|
||||||
var createDispatcher = function createDispatcher() {
|
|
||||||
var listeners = [];
|
|
||||||
|
|
||||||
return {
|
|
||||||
subscribe: function subscribe(listener) {
|
|
||||||
listeners.push(listener);
|
|
||||||
return function () {
|
|
||||||
listeners = listeners.filter(function (l) {
|
|
||||||
return l !== listener;
|
|
||||||
});
|
|
||||||
};
|
|
||||||
},
|
|
||||||
dispatch: function dispatch(action) {
|
|
||||||
listeners.slice().forEach(function (listener) {
|
|
||||||
return listener(action);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
exports["default"] = createDispatcher;
|
|
||||||
|
|
||||||
/***/ }),
|
|
||||||
|
|
||||||
/***/ 3524:
|
/***/ 3524:
|
||||||
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
||||||
|
|
||||||
@ -564,6 +184,282 @@ var createChannel = exports.createChannel = function createChannel(callback) {
|
|||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
|
|
||||||
|
/***/ 4137:
|
||||||
|
/***/ ((__unused_webpack_module, exports) => {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Object.defineProperty(exports, "__esModule", ({
|
||||||
|
value: true
|
||||||
|
}));
|
||||||
|
var keys = {
|
||||||
|
all: Symbol('all'),
|
||||||
|
error: Symbol('error'),
|
||||||
|
fork: Symbol('fork'),
|
||||||
|
join: Symbol('join'),
|
||||||
|
race: Symbol('race'),
|
||||||
|
call: Symbol('call'),
|
||||||
|
cps: Symbol('cps'),
|
||||||
|
subscribe: Symbol('subscribe')
|
||||||
|
};
|
||||||
|
|
||||||
|
exports["default"] = keys;
|
||||||
|
|
||||||
|
/***/ }),
|
||||||
|
|
||||||
|
/***/ 5136:
|
||||||
|
/***/ ((__unused_webpack_module, exports) => {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Object.defineProperty(exports, "__esModule", ({
|
||||||
|
value: true
|
||||||
|
}));
|
||||||
|
var createDispatcher = function createDispatcher() {
|
||||||
|
var listeners = [];
|
||||||
|
|
||||||
|
return {
|
||||||
|
subscribe: function subscribe(listener) {
|
||||||
|
listeners.push(listener);
|
||||||
|
return function () {
|
||||||
|
listeners = listeners.filter(function (l) {
|
||||||
|
return l !== listener;
|
||||||
|
});
|
||||||
|
};
|
||||||
|
},
|
||||||
|
dispatch: function dispatch(action) {
|
||||||
|
listeners.slice().forEach(function (listener) {
|
||||||
|
return listener(action);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
exports["default"] = createDispatcher;
|
||||||
|
|
||||||
|
/***/ }),
|
||||||
|
|
||||||
|
/***/ 5357:
|
||||||
|
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Object.defineProperty(exports, "__esModule", ({
|
||||||
|
value: true
|
||||||
|
}));
|
||||||
|
exports.iterator = exports.array = exports.object = exports.error = exports.any = undefined;
|
||||||
|
|
||||||
|
var _is = __webpack_require__(6921);
|
||||||
|
|
||||||
|
var _is2 = _interopRequireDefault(_is);
|
||||||
|
|
||||||
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||||
|
|
||||||
|
var any = exports.any = function any(value, next, rungen, yieldNext) {
|
||||||
|
yieldNext(value);
|
||||||
|
return true;
|
||||||
|
};
|
||||||
|
|
||||||
|
var error = exports.error = function error(value, next, rungen, yieldNext, raiseNext) {
|
||||||
|
if (!_is2.default.error(value)) return false;
|
||||||
|
raiseNext(value.error);
|
||||||
|
return true;
|
||||||
|
};
|
||||||
|
|
||||||
|
var object = exports.object = function object(value, next, rungen, yieldNext, raiseNext) {
|
||||||
|
if (!_is2.default.all(value) || !_is2.default.obj(value.value)) return false;
|
||||||
|
var result = {};
|
||||||
|
var keys = Object.keys(value.value);
|
||||||
|
var count = 0;
|
||||||
|
var hasError = false;
|
||||||
|
var gotResultSuccess = function gotResultSuccess(key, ret) {
|
||||||
|
if (hasError) return;
|
||||||
|
result[key] = ret;
|
||||||
|
count++;
|
||||||
|
if (count === keys.length) {
|
||||||
|
yieldNext(result);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
var gotResultError = function gotResultError(key, error) {
|
||||||
|
if (hasError) return;
|
||||||
|
hasError = true;
|
||||||
|
raiseNext(error);
|
||||||
|
};
|
||||||
|
|
||||||
|
keys.map(function (key) {
|
||||||
|
rungen(value.value[key], function (ret) {
|
||||||
|
return gotResultSuccess(key, ret);
|
||||||
|
}, function (err) {
|
||||||
|
return gotResultError(key, err);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
return true;
|
||||||
|
};
|
||||||
|
|
||||||
|
var array = exports.array = function array(value, next, rungen, yieldNext, raiseNext) {
|
||||||
|
if (!_is2.default.all(value) || !_is2.default.array(value.value)) return false;
|
||||||
|
var result = [];
|
||||||
|
var count = 0;
|
||||||
|
var hasError = false;
|
||||||
|
var gotResultSuccess = function gotResultSuccess(key, ret) {
|
||||||
|
if (hasError) return;
|
||||||
|
result[key] = ret;
|
||||||
|
count++;
|
||||||
|
if (count === value.value.length) {
|
||||||
|
yieldNext(result);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
var gotResultError = function gotResultError(key, error) {
|
||||||
|
if (hasError) return;
|
||||||
|
hasError = true;
|
||||||
|
raiseNext(error);
|
||||||
|
};
|
||||||
|
|
||||||
|
value.value.map(function (v, key) {
|
||||||
|
rungen(v, function (ret) {
|
||||||
|
return gotResultSuccess(key, ret);
|
||||||
|
}, function (err) {
|
||||||
|
return gotResultError(key, err);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
return true;
|
||||||
|
};
|
||||||
|
|
||||||
|
var iterator = exports.iterator = function iterator(value, next, rungen, yieldNext, raiseNext) {
|
||||||
|
if (!_is2.default.iterator(value)) return false;
|
||||||
|
rungen(value, next, raiseNext);
|
||||||
|
return true;
|
||||||
|
};
|
||||||
|
|
||||||
|
exports["default"] = [error, iterator, array, object, any];
|
||||||
|
|
||||||
|
/***/ }),
|
||||||
|
|
||||||
|
/***/ 6910:
|
||||||
|
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Object.defineProperty(exports, "__esModule", ({
|
||||||
|
value: true
|
||||||
|
}));
|
||||||
|
exports.race = exports.join = exports.fork = exports.promise = undefined;
|
||||||
|
|
||||||
|
var _is = __webpack_require__(6921);
|
||||||
|
|
||||||
|
var _is2 = _interopRequireDefault(_is);
|
||||||
|
|
||||||
|
var _helpers = __webpack_require__(3524);
|
||||||
|
|
||||||
|
var _dispatcher = __webpack_require__(5136);
|
||||||
|
|
||||||
|
var _dispatcher2 = _interopRequireDefault(_dispatcher);
|
||||||
|
|
||||||
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||||
|
|
||||||
|
var promise = exports.promise = function promise(value, next, rungen, yieldNext, raiseNext) {
|
||||||
|
if (!_is2.default.promise(value)) return false;
|
||||||
|
value.then(next, raiseNext);
|
||||||
|
return true;
|
||||||
|
};
|
||||||
|
|
||||||
|
var forkedTasks = new Map();
|
||||||
|
var fork = exports.fork = function fork(value, next, rungen) {
|
||||||
|
if (!_is2.default.fork(value)) return false;
|
||||||
|
var task = Symbol('fork');
|
||||||
|
var dispatcher = (0, _dispatcher2.default)();
|
||||||
|
forkedTasks.set(task, dispatcher);
|
||||||
|
rungen(value.iterator.apply(null, value.args), function (result) {
|
||||||
|
return dispatcher.dispatch(result);
|
||||||
|
}, function (err) {
|
||||||
|
return dispatcher.dispatch((0, _helpers.error)(err));
|
||||||
|
});
|
||||||
|
var unsubscribe = dispatcher.subscribe(function () {
|
||||||
|
unsubscribe();
|
||||||
|
forkedTasks.delete(task);
|
||||||
|
});
|
||||||
|
next(task);
|
||||||
|
return true;
|
||||||
|
};
|
||||||
|
|
||||||
|
var join = exports.join = function join(value, next, rungen, yieldNext, raiseNext) {
|
||||||
|
if (!_is2.default.join(value)) return false;
|
||||||
|
var dispatcher = forkedTasks.get(value.task);
|
||||||
|
if (!dispatcher) {
|
||||||
|
raiseNext('join error : task not found');
|
||||||
|
} else {
|
||||||
|
(function () {
|
||||||
|
var unsubscribe = dispatcher.subscribe(function (result) {
|
||||||
|
unsubscribe();
|
||||||
|
next(result);
|
||||||
|
});
|
||||||
|
})();
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
};
|
||||||
|
|
||||||
|
var race = exports.race = function race(value, next, rungen, yieldNext, raiseNext) {
|
||||||
|
if (!_is2.default.race(value)) return false;
|
||||||
|
var finished = false;
|
||||||
|
var success = function success(result, k, v) {
|
||||||
|
if (finished) return;
|
||||||
|
finished = true;
|
||||||
|
result[k] = v;
|
||||||
|
next(result);
|
||||||
|
};
|
||||||
|
|
||||||
|
var fail = function fail(err) {
|
||||||
|
if (finished) return;
|
||||||
|
raiseNext(err);
|
||||||
|
};
|
||||||
|
if (_is2.default.array(value.competitors)) {
|
||||||
|
(function () {
|
||||||
|
var result = value.competitors.map(function () {
|
||||||
|
return false;
|
||||||
|
});
|
||||||
|
value.competitors.forEach(function (competitor, index) {
|
||||||
|
rungen(competitor, function (output) {
|
||||||
|
return success(result, index, output);
|
||||||
|
}, fail);
|
||||||
|
});
|
||||||
|
})();
|
||||||
|
} else {
|
||||||
|
(function () {
|
||||||
|
var result = Object.keys(value.competitors).reduce(function (p, c) {
|
||||||
|
p[c] = false;
|
||||||
|
return p;
|
||||||
|
}, {});
|
||||||
|
Object.keys(value.competitors).forEach(function (index) {
|
||||||
|
rungen(value.competitors[index], function (output) {
|
||||||
|
return success(result, index, output);
|
||||||
|
}, fail);
|
||||||
|
});
|
||||||
|
})();
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
};
|
||||||
|
|
||||||
|
var subscribe = function subscribe(value, next) {
|
||||||
|
if (!_is2.default.subscribe(value)) return false;
|
||||||
|
if (!_is2.default.channel(value.channel)) {
|
||||||
|
throw new Error('the first argument of "subscribe" must be a valid channel');
|
||||||
|
}
|
||||||
|
var unsubscribe = value.channel.subscribe(function (ret) {
|
||||||
|
unsubscribe && unsubscribe();
|
||||||
|
next(ret);
|
||||||
|
});
|
||||||
|
|
||||||
|
return true;
|
||||||
|
};
|
||||||
|
|
||||||
|
exports["default"] = [promise, fork, join, race, subscribe];
|
||||||
|
|
||||||
|
/***/ }),
|
||||||
|
|
||||||
/***/ 6921:
|
/***/ 6921:
|
||||||
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
||||||
|
|
||||||
@ -628,26 +524,130 @@ exports["default"] = is;
|
|||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
|
|
||||||
/***/ 4137:
|
/***/ 8975:
|
||||||
/***/ ((__unused_webpack_module, exports) => {
|
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Object.defineProperty(exports, "__esModule", ({
|
Object.defineProperty(exports, "__esModule", ({
|
||||||
value: true
|
value: true
|
||||||
}));
|
}));
|
||||||
var keys = {
|
exports.wrapControls = exports.asyncControls = exports.create = undefined;
|
||||||
all: Symbol('all'),
|
|
||||||
error: Symbol('error'),
|
var _helpers = __webpack_require__(3524);
|
||||||
fork: Symbol('fork'),
|
|
||||||
join: Symbol('join'),
|
Object.keys(_helpers).forEach(function (key) {
|
||||||
race: Symbol('race'),
|
if (key === "default") return;
|
||||||
call: Symbol('call'),
|
Object.defineProperty(exports, key, {
|
||||||
cps: Symbol('cps'),
|
enumerable: true,
|
||||||
subscribe: Symbol('subscribe')
|
get: function get() {
|
||||||
|
return _helpers[key];
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
var _create = __webpack_require__(9127);
|
||||||
|
|
||||||
|
var _create2 = _interopRequireDefault(_create);
|
||||||
|
|
||||||
|
var _async = __webpack_require__(6910);
|
||||||
|
|
||||||
|
var _async2 = _interopRequireDefault(_async);
|
||||||
|
|
||||||
|
var _wrap = __webpack_require__(3304);
|
||||||
|
|
||||||
|
var _wrap2 = _interopRequireDefault(_wrap);
|
||||||
|
|
||||||
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||||
|
|
||||||
|
exports.create = _create2.default;
|
||||||
|
exports.asyncControls = _async2.default;
|
||||||
|
exports.wrapControls = _wrap2.default;
|
||||||
|
|
||||||
|
/***/ }),
|
||||||
|
|
||||||
|
/***/ 9127:
|
||||||
|
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Object.defineProperty(exports, "__esModule", ({
|
||||||
|
value: true
|
||||||
|
}));
|
||||||
|
|
||||||
|
var _builtin = __webpack_require__(5357);
|
||||||
|
|
||||||
|
var _builtin2 = _interopRequireDefault(_builtin);
|
||||||
|
|
||||||
|
var _is = __webpack_require__(6921);
|
||||||
|
|
||||||
|
var _is2 = _interopRequireDefault(_is);
|
||||||
|
|
||||||
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||||
|
|
||||||
|
function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } }
|
||||||
|
|
||||||
|
var create = function create() {
|
||||||
|
var userControls = arguments.length <= 0 || arguments[0] === undefined ? [] : arguments[0];
|
||||||
|
|
||||||
|
var controls = [].concat(_toConsumableArray(userControls), _toConsumableArray(_builtin2.default));
|
||||||
|
|
||||||
|
var runtime = function runtime(input) {
|
||||||
|
var success = arguments.length <= 1 || arguments[1] === undefined ? function () {} : arguments[1];
|
||||||
|
var error = arguments.length <= 2 || arguments[2] === undefined ? function () {} : arguments[2];
|
||||||
|
|
||||||
|
var iterate = function iterate(gen) {
|
||||||
|
var yieldValue = function yieldValue(isError) {
|
||||||
|
return function (ret) {
|
||||||
|
try {
|
||||||
|
var _ref = isError ? gen.throw(ret) : gen.next(ret);
|
||||||
|
|
||||||
|
var value = _ref.value;
|
||||||
|
var done = _ref.done;
|
||||||
|
|
||||||
|
if (done) return success(value);
|
||||||
|
next(value);
|
||||||
|
} catch (e) {
|
||||||
|
return error(e);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
var next = function next(ret) {
|
||||||
|
controls.some(function (control) {
|
||||||
|
return control(ret, next, runtime, yieldValue(false), yieldValue(true));
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
yieldValue(false)();
|
||||||
|
};
|
||||||
|
|
||||||
|
var iterator = _is2.default.iterator(input) ? input : regeneratorRuntime.mark(function _callee() {
|
||||||
|
return regeneratorRuntime.wrap(function _callee$(_context) {
|
||||||
|
while (1) {
|
||||||
|
switch (_context.prev = _context.next) {
|
||||||
|
case 0:
|
||||||
|
_context.next = 2;
|
||||||
|
return input;
|
||||||
|
|
||||||
|
case 2:
|
||||||
|
return _context.abrupt('return', _context.sent);
|
||||||
|
|
||||||
|
case 3:
|
||||||
|
case 'end':
|
||||||
|
return _context.stop();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}, _callee, this);
|
||||||
|
})();
|
||||||
|
|
||||||
|
iterate(iterator, success, error);
|
||||||
|
};
|
||||||
|
|
||||||
|
return runtime;
|
||||||
};
|
};
|
||||||
|
|
||||||
exports["default"] = keys;
|
exports["default"] = create;
|
||||||
|
|
||||||
/***/ })
|
/***/ })
|
||||||
|
|
||||||
|
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
@ -1,2 +1,2 @@
|
|||||||
/*! For license information please see react-jsx-runtime.min.js.LICENSE.txt */
|
/*! For license information please see react-jsx-runtime.min.js.LICENSE.txt */
|
||||||
(()=>{"use strict";var r={20:(r,e,t)=>{var o=t(594),n=Symbol.for("react.element"),s=Symbol.for("react.fragment"),a=Object.prototype.hasOwnProperty,f=o.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,p={key:!0,ref:!0,__self:!0,__source:!0};function _(r,e,t){var o,s={},_=null,i=null;for(o in void 0!==t&&(_=""+t),void 0!==e.key&&(_=""+e.key),void 0!==e.ref&&(i=e.ref),e)a.call(e,o)&&!p.hasOwnProperty(o)&&(s[o]=e[o]);if(r&&r.defaultProps)for(o in e=r.defaultProps)void 0===s[o]&&(s[o]=e[o]);return{$$typeof:n,type:r,key:_,ref:i,props:s,_owner:f.current}}e.Fragment=s,e.jsx=_,e.jsxs=_},848:(r,e,t)=>{r.exports=t(20)},594:r=>{r.exports=React}},e={},t=function t(o){var n=e[o];if(void 0!==n)return n.exports;var s=e[o]={exports:{}};return r[o](s,s.exports,t),s.exports}(848);window.ReactJSXRuntime=t})();
|
(()=>{"use strict";var r={20:(r,e,t)=>{var o=t(594),n=Symbol.for("react.element"),s=Symbol.for("react.fragment"),a=Object.prototype.hasOwnProperty,f=o.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,p={key:!0,ref:!0,__self:!0,__source:!0};function _(r,e,t){var o,s={},_=null,i=null;for(o in void 0!==t&&(_=""+t),void 0!==e.key&&(_=""+e.key),void 0!==e.ref&&(i=e.ref),e)a.call(e,o)&&!p.hasOwnProperty(o)&&(s[o]=e[o]);if(r&&r.defaultProps)for(o in e=r.defaultProps)void 0===s[o]&&(s[o]=e[o]);return{$$typeof:n,type:r,key:_,ref:i,props:s,_owner:f.current}}e.Fragment=s,e.jsx=_,e.jsxs=_},594:r=>{r.exports=React},848:(r,e,t)=>{r.exports=t(20)}},e={},t=function t(o){var n=e[o];if(void 0!==n)return n.exports;var s=e[o]={exports:{}};return r[o](s,s.exports,t),s.exports}(848);window.ReactJSXRuntime=t})();
|
@ -1,180 +1,6 @@
|
|||||||
/******/ (() => { // webpackBootstrap
|
/******/ (() => { // webpackBootstrap
|
||||||
/******/ var __webpack_modules__ = ({
|
/******/ var __webpack_modules__ = ({
|
||||||
|
|
||||||
/***/ 1206:
|
|
||||||
/***/ ((module) => {
|
|
||||||
|
|
||||||
var State = wp.media.controller.State,
|
|
||||||
l10n = wp.media.view.l10n,
|
|
||||||
AudioDetails;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* wp.media.controller.AudioDetails
|
|
||||||
*
|
|
||||||
* The controller for the Audio Details state
|
|
||||||
*
|
|
||||||
* @memberOf wp.media.controller
|
|
||||||
*
|
|
||||||
* @class
|
|
||||||
* @augments wp.media.controller.State
|
|
||||||
* @augments Backbone.Model
|
|
||||||
*/
|
|
||||||
AudioDetails = State.extend(/** @lends wp.media.controller.AudioDetails.prototype */{
|
|
||||||
defaults: {
|
|
||||||
id: 'audio-details',
|
|
||||||
toolbar: 'audio-details',
|
|
||||||
title: l10n.audioDetailsTitle,
|
|
||||||
content: 'audio-details',
|
|
||||||
menu: 'audio-details',
|
|
||||||
router: false,
|
|
||||||
priority: 60
|
|
||||||
},
|
|
||||||
|
|
||||||
initialize: function( options ) {
|
|
||||||
this.media = options.media;
|
|
||||||
State.prototype.initialize.apply( this, arguments );
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
module.exports = AudioDetails;
|
|
||||||
|
|
||||||
|
|
||||||
/***/ }),
|
|
||||||
|
|
||||||
/***/ 5039:
|
|
||||||
/***/ ((module) => {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* wp.media.controller.VideoDetails
|
|
||||||
*
|
|
||||||
* The controller for the Video Details state
|
|
||||||
*
|
|
||||||
* @memberOf wp.media.controller
|
|
||||||
*
|
|
||||||
* @class
|
|
||||||
* @augments wp.media.controller.State
|
|
||||||
* @augments Backbone.Model
|
|
||||||
*/
|
|
||||||
var State = wp.media.controller.State,
|
|
||||||
l10n = wp.media.view.l10n,
|
|
||||||
VideoDetails;
|
|
||||||
|
|
||||||
VideoDetails = State.extend(/** @lends wp.media.controller.VideoDetails.prototype */{
|
|
||||||
defaults: {
|
|
||||||
id: 'video-details',
|
|
||||||
toolbar: 'video-details',
|
|
||||||
title: l10n.videoDetailsTitle,
|
|
||||||
content: 'video-details',
|
|
||||||
menu: 'video-details',
|
|
||||||
router: false,
|
|
||||||
priority: 60
|
|
||||||
},
|
|
||||||
|
|
||||||
initialize: function( options ) {
|
|
||||||
this.media = options.media;
|
|
||||||
State.prototype.initialize.apply( this, arguments );
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
module.exports = VideoDetails;
|
|
||||||
|
|
||||||
|
|
||||||
/***/ }),
|
|
||||||
|
|
||||||
/***/ 241:
|
|
||||||
/***/ ((module) => {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* wp.media.model.PostMedia
|
|
||||||
*
|
|
||||||
* Shared model class for audio and video. Updates the model after
|
|
||||||
* "Add Audio|Video Source" and "Replace Audio|Video" states return
|
|
||||||
*
|
|
||||||
* @memberOf wp.media.model
|
|
||||||
*
|
|
||||||
* @class
|
|
||||||
* @augments Backbone.Model
|
|
||||||
*/
|
|
||||||
var PostMedia = Backbone.Model.extend(/** @lends wp.media.model.PostMedia.prototype */{
|
|
||||||
initialize: function() {
|
|
||||||
this.attachment = false;
|
|
||||||
},
|
|
||||||
|
|
||||||
setSource: function( attachment ) {
|
|
||||||
this.attachment = attachment;
|
|
||||||
this.extension = attachment.get( 'filename' ).split('.').pop();
|
|
||||||
|
|
||||||
if ( this.get( 'src' ) && this.extension === this.get( 'src' ).split('.').pop() ) {
|
|
||||||
this.unset( 'src' );
|
|
||||||
}
|
|
||||||
|
|
||||||
if ( _.contains( wp.media.view.settings.embedExts, this.extension ) ) {
|
|
||||||
this.set( this.extension, this.attachment.get( 'url' ) );
|
|
||||||
} else {
|
|
||||||
this.unset( this.extension );
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
changeAttachment: function( attachment ) {
|
|
||||||
this.setSource( attachment );
|
|
||||||
|
|
||||||
this.unset( 'src' );
|
|
||||||
_.each( _.without( wp.media.view.settings.embedExts, this.extension ), function( ext ) {
|
|
||||||
this.unset( ext );
|
|
||||||
}, this );
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
module.exports = PostMedia;
|
|
||||||
|
|
||||||
|
|
||||||
/***/ }),
|
|
||||||
|
|
||||||
/***/ 3713:
|
|
||||||
/***/ ((module) => {
|
|
||||||
|
|
||||||
var MediaDetails = wp.media.view.MediaDetails,
|
|
||||||
AudioDetails;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* wp.media.view.AudioDetails
|
|
||||||
*
|
|
||||||
* @memberOf wp.media.view
|
|
||||||
*
|
|
||||||
* @class
|
|
||||||
* @augments wp.media.view.MediaDetails
|
|
||||||
* @augments wp.media.view.Settings.AttachmentDisplay
|
|
||||||
* @augments wp.media.view.Settings
|
|
||||||
* @augments wp.media.View
|
|
||||||
* @augments wp.Backbone.View
|
|
||||||
* @augments Backbone.View
|
|
||||||
*/
|
|
||||||
AudioDetails = MediaDetails.extend(/** @lends wp.media.view.AudioDetails.prototype */{
|
|
||||||
className: 'audio-details',
|
|
||||||
template: wp.template('audio-details'),
|
|
||||||
|
|
||||||
setMedia: function() {
|
|
||||||
var audio = this.$('.wp-audio-shortcode');
|
|
||||||
|
|
||||||
if ( audio.find( 'source' ).length ) {
|
|
||||||
if ( audio.is(':hidden') ) {
|
|
||||||
audio.show();
|
|
||||||
}
|
|
||||||
this.media = MediaDetails.prepareSrc( audio.get(0) );
|
|
||||||
} else {
|
|
||||||
audio.hide();
|
|
||||||
this.media = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
module.exports = AudioDetails;
|
|
||||||
|
|
||||||
|
|
||||||
/***/ }),
|
|
||||||
|
|
||||||
/***/ 175:
|
/***/ 175:
|
||||||
/***/ ((module) => {
|
/***/ ((module) => {
|
||||||
|
|
||||||
@ -256,6 +82,55 @@ AudioDetails = MediaDetails.extend(/** @lends wp.media.view.MediaFrame.AudioDeta
|
|||||||
module.exports = AudioDetails;
|
module.exports = AudioDetails;
|
||||||
|
|
||||||
|
|
||||||
|
/***/ }),
|
||||||
|
|
||||||
|
/***/ 241:
|
||||||
|
/***/ ((module) => {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* wp.media.model.PostMedia
|
||||||
|
*
|
||||||
|
* Shared model class for audio and video. Updates the model after
|
||||||
|
* "Add Audio|Video Source" and "Replace Audio|Video" states return
|
||||||
|
*
|
||||||
|
* @memberOf wp.media.model
|
||||||
|
*
|
||||||
|
* @class
|
||||||
|
* @augments Backbone.Model
|
||||||
|
*/
|
||||||
|
var PostMedia = Backbone.Model.extend(/** @lends wp.media.model.PostMedia.prototype */{
|
||||||
|
initialize: function() {
|
||||||
|
this.attachment = false;
|
||||||
|
},
|
||||||
|
|
||||||
|
setSource: function( attachment ) {
|
||||||
|
this.attachment = attachment;
|
||||||
|
this.extension = attachment.get( 'filename' ).split('.').pop();
|
||||||
|
|
||||||
|
if ( this.get( 'src' ) && this.extension === this.get( 'src' ).split('.').pop() ) {
|
||||||
|
this.unset( 'src' );
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( _.contains( wp.media.view.settings.embedExts, this.extension ) ) {
|
||||||
|
this.set( this.extension, this.attachment.get( 'url' ) );
|
||||||
|
} else {
|
||||||
|
this.unset( this.extension );
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
changeAttachment: function( attachment ) {
|
||||||
|
this.setSource( attachment );
|
||||||
|
|
||||||
|
this.unset( 'src' );
|
||||||
|
_.each( _.without( wp.media.view.settings.embedExts, this.extension ), function( ext ) {
|
||||||
|
this.unset( ext );
|
||||||
|
}, this );
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
module.exports = PostMedia;
|
||||||
|
|
||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
|
|
||||||
/***/ 741:
|
/***/ 741:
|
||||||
@ -393,6 +268,181 @@ MediaDetails = Select.extend(/** @lends wp.media.view.MediaFrame.MediaDetails.pr
|
|||||||
module.exports = MediaDetails;
|
module.exports = MediaDetails;
|
||||||
|
|
||||||
|
|
||||||
|
/***/ }),
|
||||||
|
|
||||||
|
/***/ 1206:
|
||||||
|
/***/ ((module) => {
|
||||||
|
|
||||||
|
var State = wp.media.controller.State,
|
||||||
|
l10n = wp.media.view.l10n,
|
||||||
|
AudioDetails;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* wp.media.controller.AudioDetails
|
||||||
|
*
|
||||||
|
* The controller for the Audio Details state
|
||||||
|
*
|
||||||
|
* @memberOf wp.media.controller
|
||||||
|
*
|
||||||
|
* @class
|
||||||
|
* @augments wp.media.controller.State
|
||||||
|
* @augments Backbone.Model
|
||||||
|
*/
|
||||||
|
AudioDetails = State.extend(/** @lends wp.media.controller.AudioDetails.prototype */{
|
||||||
|
defaults: {
|
||||||
|
id: 'audio-details',
|
||||||
|
toolbar: 'audio-details',
|
||||||
|
title: l10n.audioDetailsTitle,
|
||||||
|
content: 'audio-details',
|
||||||
|
menu: 'audio-details',
|
||||||
|
router: false,
|
||||||
|
priority: 60
|
||||||
|
},
|
||||||
|
|
||||||
|
initialize: function( options ) {
|
||||||
|
this.media = options.media;
|
||||||
|
State.prototype.initialize.apply( this, arguments );
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
module.exports = AudioDetails;
|
||||||
|
|
||||||
|
|
||||||
|
/***/ }),
|
||||||
|
|
||||||
|
/***/ 3713:
|
||||||
|
/***/ ((module) => {
|
||||||
|
|
||||||
|
var MediaDetails = wp.media.view.MediaDetails,
|
||||||
|
AudioDetails;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* wp.media.view.AudioDetails
|
||||||
|
*
|
||||||
|
* @memberOf wp.media.view
|
||||||
|
*
|
||||||
|
* @class
|
||||||
|
* @augments wp.media.view.MediaDetails
|
||||||
|
* @augments wp.media.view.Settings.AttachmentDisplay
|
||||||
|
* @augments wp.media.view.Settings
|
||||||
|
* @augments wp.media.View
|
||||||
|
* @augments wp.Backbone.View
|
||||||
|
* @augments Backbone.View
|
||||||
|
*/
|
||||||
|
AudioDetails = MediaDetails.extend(/** @lends wp.media.view.AudioDetails.prototype */{
|
||||||
|
className: 'audio-details',
|
||||||
|
template: wp.template('audio-details'),
|
||||||
|
|
||||||
|
setMedia: function() {
|
||||||
|
var audio = this.$('.wp-audio-shortcode');
|
||||||
|
|
||||||
|
if ( audio.find( 'source' ).length ) {
|
||||||
|
if ( audio.is(':hidden') ) {
|
||||||
|
audio.show();
|
||||||
|
}
|
||||||
|
this.media = MediaDetails.prepareSrc( audio.get(0) );
|
||||||
|
} else {
|
||||||
|
audio.hide();
|
||||||
|
this.media = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
module.exports = AudioDetails;
|
||||||
|
|
||||||
|
|
||||||
|
/***/ }),
|
||||||
|
|
||||||
|
/***/ 5039:
|
||||||
|
/***/ ((module) => {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* wp.media.controller.VideoDetails
|
||||||
|
*
|
||||||
|
* The controller for the Video Details state
|
||||||
|
*
|
||||||
|
* @memberOf wp.media.controller
|
||||||
|
*
|
||||||
|
* @class
|
||||||
|
* @augments wp.media.controller.State
|
||||||
|
* @augments Backbone.Model
|
||||||
|
*/
|
||||||
|
var State = wp.media.controller.State,
|
||||||
|
l10n = wp.media.view.l10n,
|
||||||
|
VideoDetails;
|
||||||
|
|
||||||
|
VideoDetails = State.extend(/** @lends wp.media.controller.VideoDetails.prototype */{
|
||||||
|
defaults: {
|
||||||
|
id: 'video-details',
|
||||||
|
toolbar: 'video-details',
|
||||||
|
title: l10n.videoDetailsTitle,
|
||||||
|
content: 'video-details',
|
||||||
|
menu: 'video-details',
|
||||||
|
router: false,
|
||||||
|
priority: 60
|
||||||
|
},
|
||||||
|
|
||||||
|
initialize: function( options ) {
|
||||||
|
this.media = options.media;
|
||||||
|
State.prototype.initialize.apply( this, arguments );
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
module.exports = VideoDetails;
|
||||||
|
|
||||||
|
|
||||||
|
/***/ }),
|
||||||
|
|
||||||
|
/***/ 5836:
|
||||||
|
/***/ ((module) => {
|
||||||
|
|
||||||
|
var MediaDetails = wp.media.view.MediaDetails,
|
||||||
|
VideoDetails;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* wp.media.view.VideoDetails
|
||||||
|
*
|
||||||
|
* @memberOf wp.media.view
|
||||||
|
*
|
||||||
|
* @class
|
||||||
|
* @augments wp.media.view.MediaDetails
|
||||||
|
* @augments wp.media.view.Settings.AttachmentDisplay
|
||||||
|
* @augments wp.media.view.Settings
|
||||||
|
* @augments wp.media.View
|
||||||
|
* @augments wp.Backbone.View
|
||||||
|
* @augments Backbone.View
|
||||||
|
*/
|
||||||
|
VideoDetails = MediaDetails.extend(/** @lends wp.media.view.VideoDetails.prototype */{
|
||||||
|
className: 'video-details',
|
||||||
|
template: wp.template('video-details'),
|
||||||
|
|
||||||
|
setMedia: function() {
|
||||||
|
var video = this.$('.wp-video-shortcode');
|
||||||
|
|
||||||
|
if ( video.find( 'source' ).length ) {
|
||||||
|
if ( video.is(':hidden') ) {
|
||||||
|
video.show();
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( ! video.hasClass( 'youtube-video' ) && ! video.hasClass( 'vimeo-video' ) ) {
|
||||||
|
this.media = MediaDetails.prepareSrc( video.get(0) );
|
||||||
|
} else {
|
||||||
|
this.media = video.get(0);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
video.hide();
|
||||||
|
this.media = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
module.exports = VideoDetails;
|
||||||
|
|
||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
|
|
||||||
/***/ 8646:
|
/***/ 8646:
|
||||||
@ -711,56 +761,6 @@ MediaDetails = AttachmentDisplay.extend(/** @lends wp.media.view.MediaDetails.pr
|
|||||||
module.exports = MediaDetails;
|
module.exports = MediaDetails;
|
||||||
|
|
||||||
|
|
||||||
/***/ }),
|
|
||||||
|
|
||||||
/***/ 5836:
|
|
||||||
/***/ ((module) => {
|
|
||||||
|
|
||||||
var MediaDetails = wp.media.view.MediaDetails,
|
|
||||||
VideoDetails;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* wp.media.view.VideoDetails
|
|
||||||
*
|
|
||||||
* @memberOf wp.media.view
|
|
||||||
*
|
|
||||||
* @class
|
|
||||||
* @augments wp.media.view.MediaDetails
|
|
||||||
* @augments wp.media.view.Settings.AttachmentDisplay
|
|
||||||
* @augments wp.media.view.Settings
|
|
||||||
* @augments wp.media.View
|
|
||||||
* @augments wp.Backbone.View
|
|
||||||
* @augments Backbone.View
|
|
||||||
*/
|
|
||||||
VideoDetails = MediaDetails.extend(/** @lends wp.media.view.VideoDetails.prototype */{
|
|
||||||
className: 'video-details',
|
|
||||||
template: wp.template('video-details'),
|
|
||||||
|
|
||||||
setMedia: function() {
|
|
||||||
var video = this.$('.wp-video-shortcode');
|
|
||||||
|
|
||||||
if ( video.find( 'source' ).length ) {
|
|
||||||
if ( video.is(':hidden') ) {
|
|
||||||
video.show();
|
|
||||||
}
|
|
||||||
|
|
||||||
if ( ! video.hasClass( 'youtube-video' ) && ! video.hasClass( 'vimeo-video' ) ) {
|
|
||||||
this.media = MediaDetails.prepareSrc( video.get(0) );
|
|
||||||
} else {
|
|
||||||
this.media = video.get(0);
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
video.hide();
|
|
||||||
this.media = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
module.exports = VideoDetails;
|
|
||||||
|
|
||||||
|
|
||||||
/***/ })
|
/***/ })
|
||||||
|
|
||||||
/******/ });
|
/******/ });
|
||||||
|
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
@ -34,244 +34,6 @@ EditAttachmentMetadata = wp.media.controller.State.extend(/** @lends wp.media.co
|
|||||||
module.exports = EditAttachmentMetadata;
|
module.exports = EditAttachmentMetadata;
|
||||||
|
|
||||||
|
|
||||||
/***/ }),
|
|
||||||
|
|
||||||
/***/ 2429:
|
|
||||||
/***/ ((module) => {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* wp.media.view.MediaFrame.Manage.Router
|
|
||||||
*
|
|
||||||
* A router for handling the browser history and application state.
|
|
||||||
*
|
|
||||||
* @memberOf wp.media.view.MediaFrame.Manage
|
|
||||||
*
|
|
||||||
* @class
|
|
||||||
* @augments Backbone.Router
|
|
||||||
*/
|
|
||||||
var Router = Backbone.Router.extend(/** @lends wp.media.view.MediaFrame.Manage.Router.prototype */{
|
|
||||||
routes: {
|
|
||||||
'upload.php?item=:slug&mode=edit': 'editItem',
|
|
||||||
'upload.php?item=:slug': 'showItem',
|
|
||||||
'upload.php?search=:query': 'search',
|
|
||||||
'upload.php': 'reset'
|
|
||||||
},
|
|
||||||
|
|
||||||
// Map routes against the page URL.
|
|
||||||
baseUrl: function( url ) {
|
|
||||||
return 'upload.php' + url;
|
|
||||||
},
|
|
||||||
|
|
||||||
reset: function() {
|
|
||||||
var frame = wp.media.frames.edit;
|
|
||||||
|
|
||||||
if ( frame ) {
|
|
||||||
frame.close();
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
// Respond to the search route by filling the search field and triggering the input event.
|
|
||||||
search: function( query ) {
|
|
||||||
jQuery( '#media-search-input' ).val( query ).trigger( 'input' );
|
|
||||||
},
|
|
||||||
|
|
||||||
// Show the modal with a specific item.
|
|
||||||
showItem: function( query ) {
|
|
||||||
var media = wp.media,
|
|
||||||
frame = media.frames.browse,
|
|
||||||
library = frame.state().get('library'),
|
|
||||||
item;
|
|
||||||
|
|
||||||
// Trigger the media frame to open the correct item.
|
|
||||||
item = library.findWhere( { id: parseInt( query, 10 ) } );
|
|
||||||
|
|
||||||
if ( item ) {
|
|
||||||
item.set( 'skipHistory', true );
|
|
||||||
frame.trigger( 'edit:attachment', item );
|
|
||||||
} else {
|
|
||||||
item = media.attachment( query );
|
|
||||||
frame.listenTo( item, 'change', function( model ) {
|
|
||||||
frame.stopListening( item );
|
|
||||||
frame.trigger( 'edit:attachment', model );
|
|
||||||
} );
|
|
||||||
item.fetch();
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
// Show the modal in edit mode with a specific item.
|
|
||||||
editItem: function( query ) {
|
|
||||||
this.showItem( query );
|
|
||||||
wp.media.frames.edit.content.mode( 'edit-details' );
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
module.exports = Router;
|
|
||||||
|
|
||||||
|
|
||||||
/***/ }),
|
|
||||||
|
|
||||||
/***/ 1312:
|
|
||||||
/***/ ((module) => {
|
|
||||||
|
|
||||||
var Details = wp.media.view.Attachment.Details,
|
|
||||||
TwoColumn;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* wp.media.view.Attachment.Details.TwoColumn
|
|
||||||
*
|
|
||||||
* A similar view to media.view.Attachment.Details
|
|
||||||
* for use in the Edit Attachment modal.
|
|
||||||
*
|
|
||||||
* @memberOf wp.media.view.Attachment.Details
|
|
||||||
*
|
|
||||||
* @class
|
|
||||||
* @augments wp.media.view.Attachment.Details
|
|
||||||
* @augments wp.media.view.Attachment
|
|
||||||
* @augments wp.media.View
|
|
||||||
* @augments wp.Backbone.View
|
|
||||||
* @augments Backbone.View
|
|
||||||
*/
|
|
||||||
TwoColumn = Details.extend(/** @lends wp.media.view.Attachment.Details.TwoColumn.prototype */{
|
|
||||||
template: wp.template( 'attachment-details-two-column' ),
|
|
||||||
|
|
||||||
initialize: function() {
|
|
||||||
this.controller.on( 'content:activate:edit-details', _.bind( this.editAttachment, this ) );
|
|
||||||
|
|
||||||
Details.prototype.initialize.apply( this, arguments );
|
|
||||||
},
|
|
||||||
|
|
||||||
editAttachment: function( event ) {
|
|
||||||
if ( event ) {
|
|
||||||
event.preventDefault();
|
|
||||||
}
|
|
||||||
this.controller.content.mode( 'edit-image' );
|
|
||||||
},
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Noop this from parent class, doesn't apply here.
|
|
||||||
*/
|
|
||||||
toggleSelectionHandler: function() {}
|
|
||||||
|
|
||||||
});
|
|
||||||
|
|
||||||
module.exports = TwoColumn;
|
|
||||||
|
|
||||||
|
|
||||||
/***/ }),
|
|
||||||
|
|
||||||
/***/ 5806:
|
|
||||||
/***/ ((module) => {
|
|
||||||
|
|
||||||
var Button = wp.media.view.Button,
|
|
||||||
DeleteSelected = wp.media.view.DeleteSelectedButton,
|
|
||||||
DeleteSelectedPermanently;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* wp.media.view.DeleteSelectedPermanentlyButton
|
|
||||||
*
|
|
||||||
* When MEDIA_TRASH is true, a button that handles bulk Delete Permanently logic
|
|
||||||
*
|
|
||||||
* @memberOf wp.media.view
|
|
||||||
*
|
|
||||||
* @class
|
|
||||||
* @augments wp.media.view.DeleteSelectedButton
|
|
||||||
* @augments wp.media.view.Button
|
|
||||||
* @augments wp.media.View
|
|
||||||
* @augments wp.Backbone.View
|
|
||||||
* @augments Backbone.View
|
|
||||||
*/
|
|
||||||
DeleteSelectedPermanently = DeleteSelected.extend(/** @lends wp.media.view.DeleteSelectedPermanentlyButton.prototype */{
|
|
||||||
initialize: function() {
|
|
||||||
DeleteSelected.prototype.initialize.apply( this, arguments );
|
|
||||||
this.controller.on( 'select:activate', this.selectActivate, this );
|
|
||||||
this.controller.on( 'select:deactivate', this.selectDeactivate, this );
|
|
||||||
},
|
|
||||||
|
|
||||||
filterChange: function( model ) {
|
|
||||||
this.canShow = ( 'trash' === model.get( 'status' ) );
|
|
||||||
},
|
|
||||||
|
|
||||||
selectActivate: function() {
|
|
||||||
this.toggleDisabled();
|
|
||||||
this.$el.toggleClass( 'hidden', ! this.canShow );
|
|
||||||
},
|
|
||||||
|
|
||||||
selectDeactivate: function() {
|
|
||||||
this.toggleDisabled();
|
|
||||||
this.$el.addClass( 'hidden' );
|
|
||||||
},
|
|
||||||
|
|
||||||
render: function() {
|
|
||||||
Button.prototype.render.apply( this, arguments );
|
|
||||||
this.selectActivate();
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
module.exports = DeleteSelectedPermanently;
|
|
||||||
|
|
||||||
|
|
||||||
/***/ }),
|
|
||||||
|
|
||||||
/***/ 6606:
|
|
||||||
/***/ ((module) => {
|
|
||||||
|
|
||||||
var Button = wp.media.view.Button,
|
|
||||||
l10n = wp.media.view.l10n,
|
|
||||||
DeleteSelected;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* wp.media.view.DeleteSelectedButton
|
|
||||||
*
|
|
||||||
* A button that handles bulk Delete/Trash logic
|
|
||||||
*
|
|
||||||
* @memberOf wp.media.view
|
|
||||||
*
|
|
||||||
* @class
|
|
||||||
* @augments wp.media.view.Button
|
|
||||||
* @augments wp.media.View
|
|
||||||
* @augments wp.Backbone.View
|
|
||||||
* @augments Backbone.View
|
|
||||||
*/
|
|
||||||
DeleteSelected = Button.extend(/** @lends wp.media.view.DeleteSelectedButton.prototype */{
|
|
||||||
initialize: function() {
|
|
||||||
Button.prototype.initialize.apply( this, arguments );
|
|
||||||
if ( this.options.filters ) {
|
|
||||||
this.options.filters.model.on( 'change', this.filterChange, this );
|
|
||||||
}
|
|
||||||
this.controller.on( 'selection:toggle', this.toggleDisabled, this );
|
|
||||||
this.controller.on( 'select:activate', this.toggleDisabled, this );
|
|
||||||
},
|
|
||||||
|
|
||||||
filterChange: function( model ) {
|
|
||||||
if ( 'trash' === model.get( 'status' ) ) {
|
|
||||||
this.model.set( 'text', l10n.restoreSelected );
|
|
||||||
} else if ( wp.media.view.settings.mediaTrash ) {
|
|
||||||
this.model.set( 'text', l10n.trashSelected );
|
|
||||||
} else {
|
|
||||||
this.model.set( 'text', l10n.deletePermanently );
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
toggleDisabled: function() {
|
|
||||||
this.model.set( 'disabled', ! this.controller.state().get( 'selection' ).length );
|
|
||||||
},
|
|
||||||
|
|
||||||
render: function() {
|
|
||||||
Button.prototype.render.apply( this, arguments );
|
|
||||||
if ( this.controller.isModeActive( 'select' ) ) {
|
|
||||||
this.$el.addClass( 'delete-selected-button' );
|
|
||||||
} else {
|
|
||||||
this.$el.addClass( 'delete-selected-button hidden' );
|
|
||||||
}
|
|
||||||
this.toggleDisabled();
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
module.exports = DeleteSelected;
|
|
||||||
|
|
||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
|
|
||||||
/***/ 682:
|
/***/ 682:
|
||||||
@ -356,48 +118,6 @@ SelectModeToggle = Button.extend(/** @lends wp.media.view.SelectModeToggle.proto
|
|||||||
module.exports = SelectModeToggle;
|
module.exports = SelectModeToggle;
|
||||||
|
|
||||||
|
|
||||||
/***/ }),
|
|
||||||
|
|
||||||
/***/ 8521:
|
|
||||||
/***/ ((module) => {
|
|
||||||
|
|
||||||
var View = wp.media.View,
|
|
||||||
EditImage = wp.media.view.EditImage,
|
|
||||||
Details;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* wp.media.view.EditImage.Details
|
|
||||||
*
|
|
||||||
* @memberOf wp.media.view.EditImage
|
|
||||||
*
|
|
||||||
* @class
|
|
||||||
* @augments wp.media.view.EditImage
|
|
||||||
* @augments wp.media.View
|
|
||||||
* @augments wp.Backbone.View
|
|
||||||
* @augments Backbone.View
|
|
||||||
*/
|
|
||||||
Details = EditImage.extend(/** @lends wp.media.view.EditImage.Details.prototype */{
|
|
||||||
initialize: function( options ) {
|
|
||||||
this.editor = window.imageEdit;
|
|
||||||
this.frame = options.frame;
|
|
||||||
this.controller = options.controller;
|
|
||||||
View.prototype.initialize.apply( this, arguments );
|
|
||||||
},
|
|
||||||
|
|
||||||
back: function() {
|
|
||||||
this.frame.content.mode( 'edit-metadata' );
|
|
||||||
},
|
|
||||||
|
|
||||||
save: function() {
|
|
||||||
this.model.fetch().done( _.bind( function() {
|
|
||||||
this.frame.content.mode( 'edit-metadata' );
|
|
||||||
}, this ) );
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
module.exports = Details;
|
|
||||||
|
|
||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
|
|
||||||
/***/ 1003:
|
/***/ 1003:
|
||||||
@ -680,6 +400,244 @@ EditAttachments = MediaFrame.extend(/** @lends wp.media.view.MediaFrame.EditAtta
|
|||||||
module.exports = EditAttachments;
|
module.exports = EditAttachments;
|
||||||
|
|
||||||
|
|
||||||
|
/***/ }),
|
||||||
|
|
||||||
|
/***/ 1312:
|
||||||
|
/***/ ((module) => {
|
||||||
|
|
||||||
|
var Details = wp.media.view.Attachment.Details,
|
||||||
|
TwoColumn;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* wp.media.view.Attachment.Details.TwoColumn
|
||||||
|
*
|
||||||
|
* A similar view to media.view.Attachment.Details
|
||||||
|
* for use in the Edit Attachment modal.
|
||||||
|
*
|
||||||
|
* @memberOf wp.media.view.Attachment.Details
|
||||||
|
*
|
||||||
|
* @class
|
||||||
|
* @augments wp.media.view.Attachment.Details
|
||||||
|
* @augments wp.media.view.Attachment
|
||||||
|
* @augments wp.media.View
|
||||||
|
* @augments wp.Backbone.View
|
||||||
|
* @augments Backbone.View
|
||||||
|
*/
|
||||||
|
TwoColumn = Details.extend(/** @lends wp.media.view.Attachment.Details.TwoColumn.prototype */{
|
||||||
|
template: wp.template( 'attachment-details-two-column' ),
|
||||||
|
|
||||||
|
initialize: function() {
|
||||||
|
this.controller.on( 'content:activate:edit-details', _.bind( this.editAttachment, this ) );
|
||||||
|
|
||||||
|
Details.prototype.initialize.apply( this, arguments );
|
||||||
|
},
|
||||||
|
|
||||||
|
editAttachment: function( event ) {
|
||||||
|
if ( event ) {
|
||||||
|
event.preventDefault();
|
||||||
|
}
|
||||||
|
this.controller.content.mode( 'edit-image' );
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Noop this from parent class, doesn't apply here.
|
||||||
|
*/
|
||||||
|
toggleSelectionHandler: function() {}
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
module.exports = TwoColumn;
|
||||||
|
|
||||||
|
|
||||||
|
/***/ }),
|
||||||
|
|
||||||
|
/***/ 2429:
|
||||||
|
/***/ ((module) => {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* wp.media.view.MediaFrame.Manage.Router
|
||||||
|
*
|
||||||
|
* A router for handling the browser history and application state.
|
||||||
|
*
|
||||||
|
* @memberOf wp.media.view.MediaFrame.Manage
|
||||||
|
*
|
||||||
|
* @class
|
||||||
|
* @augments Backbone.Router
|
||||||
|
*/
|
||||||
|
var Router = Backbone.Router.extend(/** @lends wp.media.view.MediaFrame.Manage.Router.prototype */{
|
||||||
|
routes: {
|
||||||
|
'upload.php?item=:slug&mode=edit': 'editItem',
|
||||||
|
'upload.php?item=:slug': 'showItem',
|
||||||
|
'upload.php?search=:query': 'search',
|
||||||
|
'upload.php': 'reset'
|
||||||
|
},
|
||||||
|
|
||||||
|
// Map routes against the page URL.
|
||||||
|
baseUrl: function( url ) {
|
||||||
|
return 'upload.php' + url;
|
||||||
|
},
|
||||||
|
|
||||||
|
reset: function() {
|
||||||
|
var frame = wp.media.frames.edit;
|
||||||
|
|
||||||
|
if ( frame ) {
|
||||||
|
frame.close();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
// Respond to the search route by filling the search field and triggering the input event.
|
||||||
|
search: function( query ) {
|
||||||
|
jQuery( '#media-search-input' ).val( query ).trigger( 'input' );
|
||||||
|
},
|
||||||
|
|
||||||
|
// Show the modal with a specific item.
|
||||||
|
showItem: function( query ) {
|
||||||
|
var media = wp.media,
|
||||||
|
frame = media.frames.browse,
|
||||||
|
library = frame.state().get('library'),
|
||||||
|
item;
|
||||||
|
|
||||||
|
// Trigger the media frame to open the correct item.
|
||||||
|
item = library.findWhere( { id: parseInt( query, 10 ) } );
|
||||||
|
|
||||||
|
if ( item ) {
|
||||||
|
item.set( 'skipHistory', true );
|
||||||
|
frame.trigger( 'edit:attachment', item );
|
||||||
|
} else {
|
||||||
|
item = media.attachment( query );
|
||||||
|
frame.listenTo( item, 'change', function( model ) {
|
||||||
|
frame.stopListening( item );
|
||||||
|
frame.trigger( 'edit:attachment', model );
|
||||||
|
} );
|
||||||
|
item.fetch();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
// Show the modal in edit mode with a specific item.
|
||||||
|
editItem: function( query ) {
|
||||||
|
this.showItem( query );
|
||||||
|
wp.media.frames.edit.content.mode( 'edit-details' );
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
module.exports = Router;
|
||||||
|
|
||||||
|
|
||||||
|
/***/ }),
|
||||||
|
|
||||||
|
/***/ 5806:
|
||||||
|
/***/ ((module) => {
|
||||||
|
|
||||||
|
var Button = wp.media.view.Button,
|
||||||
|
DeleteSelected = wp.media.view.DeleteSelectedButton,
|
||||||
|
DeleteSelectedPermanently;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* wp.media.view.DeleteSelectedPermanentlyButton
|
||||||
|
*
|
||||||
|
* When MEDIA_TRASH is true, a button that handles bulk Delete Permanently logic
|
||||||
|
*
|
||||||
|
* @memberOf wp.media.view
|
||||||
|
*
|
||||||
|
* @class
|
||||||
|
* @augments wp.media.view.DeleteSelectedButton
|
||||||
|
* @augments wp.media.view.Button
|
||||||
|
* @augments wp.media.View
|
||||||
|
* @augments wp.Backbone.View
|
||||||
|
* @augments Backbone.View
|
||||||
|
*/
|
||||||
|
DeleteSelectedPermanently = DeleteSelected.extend(/** @lends wp.media.view.DeleteSelectedPermanentlyButton.prototype */{
|
||||||
|
initialize: function() {
|
||||||
|
DeleteSelected.prototype.initialize.apply( this, arguments );
|
||||||
|
this.controller.on( 'select:activate', this.selectActivate, this );
|
||||||
|
this.controller.on( 'select:deactivate', this.selectDeactivate, this );
|
||||||
|
},
|
||||||
|
|
||||||
|
filterChange: function( model ) {
|
||||||
|
this.canShow = ( 'trash' === model.get( 'status' ) );
|
||||||
|
},
|
||||||
|
|
||||||
|
selectActivate: function() {
|
||||||
|
this.toggleDisabled();
|
||||||
|
this.$el.toggleClass( 'hidden', ! this.canShow );
|
||||||
|
},
|
||||||
|
|
||||||
|
selectDeactivate: function() {
|
||||||
|
this.toggleDisabled();
|
||||||
|
this.$el.addClass( 'hidden' );
|
||||||
|
},
|
||||||
|
|
||||||
|
render: function() {
|
||||||
|
Button.prototype.render.apply( this, arguments );
|
||||||
|
this.selectActivate();
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
module.exports = DeleteSelectedPermanently;
|
||||||
|
|
||||||
|
|
||||||
|
/***/ }),
|
||||||
|
|
||||||
|
/***/ 6606:
|
||||||
|
/***/ ((module) => {
|
||||||
|
|
||||||
|
var Button = wp.media.view.Button,
|
||||||
|
l10n = wp.media.view.l10n,
|
||||||
|
DeleteSelected;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* wp.media.view.DeleteSelectedButton
|
||||||
|
*
|
||||||
|
* A button that handles bulk Delete/Trash logic
|
||||||
|
*
|
||||||
|
* @memberOf wp.media.view
|
||||||
|
*
|
||||||
|
* @class
|
||||||
|
* @augments wp.media.view.Button
|
||||||
|
* @augments wp.media.View
|
||||||
|
* @augments wp.Backbone.View
|
||||||
|
* @augments Backbone.View
|
||||||
|
*/
|
||||||
|
DeleteSelected = Button.extend(/** @lends wp.media.view.DeleteSelectedButton.prototype */{
|
||||||
|
initialize: function() {
|
||||||
|
Button.prototype.initialize.apply( this, arguments );
|
||||||
|
if ( this.options.filters ) {
|
||||||
|
this.options.filters.model.on( 'change', this.filterChange, this );
|
||||||
|
}
|
||||||
|
this.controller.on( 'selection:toggle', this.toggleDisabled, this );
|
||||||
|
this.controller.on( 'select:activate', this.toggleDisabled, this );
|
||||||
|
},
|
||||||
|
|
||||||
|
filterChange: function( model ) {
|
||||||
|
if ( 'trash' === model.get( 'status' ) ) {
|
||||||
|
this.model.set( 'text', l10n.restoreSelected );
|
||||||
|
} else if ( wp.media.view.settings.mediaTrash ) {
|
||||||
|
this.model.set( 'text', l10n.trashSelected );
|
||||||
|
} else {
|
||||||
|
this.model.set( 'text', l10n.deletePermanently );
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
toggleDisabled: function() {
|
||||||
|
this.model.set( 'disabled', ! this.controller.state().get( 'selection' ).length );
|
||||||
|
},
|
||||||
|
|
||||||
|
render: function() {
|
||||||
|
Button.prototype.render.apply( this, arguments );
|
||||||
|
if ( this.controller.isModeActive( 'select' ) ) {
|
||||||
|
this.$el.addClass( 'delete-selected-button' );
|
||||||
|
} else {
|
||||||
|
this.$el.addClass( 'delete-selected-button hidden' );
|
||||||
|
}
|
||||||
|
this.toggleDisabled();
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
module.exports = DeleteSelected;
|
||||||
|
|
||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
|
|
||||||
/***/ 8359:
|
/***/ 8359:
|
||||||
@ -974,6 +932,48 @@ Manage = MediaFrame.extend(/** @lends wp.media.view.MediaFrame.Manage.prototype
|
|||||||
module.exports = Manage;
|
module.exports = Manage;
|
||||||
|
|
||||||
|
|
||||||
|
/***/ }),
|
||||||
|
|
||||||
|
/***/ 8521:
|
||||||
|
/***/ ((module) => {
|
||||||
|
|
||||||
|
var View = wp.media.View,
|
||||||
|
EditImage = wp.media.view.EditImage,
|
||||||
|
Details;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* wp.media.view.EditImage.Details
|
||||||
|
*
|
||||||
|
* @memberOf wp.media.view.EditImage
|
||||||
|
*
|
||||||
|
* @class
|
||||||
|
* @augments wp.media.view.EditImage
|
||||||
|
* @augments wp.media.View
|
||||||
|
* @augments wp.Backbone.View
|
||||||
|
* @augments Backbone.View
|
||||||
|
*/
|
||||||
|
Details = EditImage.extend(/** @lends wp.media.view.EditImage.Details.prototype */{
|
||||||
|
initialize: function( options ) {
|
||||||
|
this.editor = window.imageEdit;
|
||||||
|
this.frame = options.frame;
|
||||||
|
this.controller = options.controller;
|
||||||
|
View.prototype.initialize.apply( this, arguments );
|
||||||
|
},
|
||||||
|
|
||||||
|
back: function() {
|
||||||
|
this.frame.content.mode( 'edit-metadata' );
|
||||||
|
},
|
||||||
|
|
||||||
|
save: function() {
|
||||||
|
this.model.fetch().done( _.bind( function() {
|
||||||
|
this.frame.content.mode( 'edit-metadata' );
|
||||||
|
}, this ) );
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
module.exports = Details;
|
||||||
|
|
||||||
|
|
||||||
/***/ })
|
/***/ })
|
||||||
|
|
||||||
/******/ });
|
/******/ });
|
||||||
|
2
wp-includes/js/media-grid.min.js
vendored
2
wp-includes/js/media-grid.min.js
vendored
File diff suppressed because one or more lines are too long
@ -1,6 +1,317 @@
|
|||||||
/******/ (() => { // webpackBootstrap
|
/******/ (() => { // webpackBootstrap
|
||||||
/******/ var __webpack_modules__ = ({
|
/******/ var __webpack_modules__ = ({
|
||||||
|
|
||||||
|
/***/ 1288:
|
||||||
|
/***/ ((module) => {
|
||||||
|
|
||||||
|
var Attachments = wp.media.model.Attachments,
|
||||||
|
Query;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* wp.media.model.Query
|
||||||
|
*
|
||||||
|
* A collection of attachments that match the supplied query arguments.
|
||||||
|
*
|
||||||
|
* Note: Do NOT change this.args after the query has been initialized.
|
||||||
|
* Things will break.
|
||||||
|
*
|
||||||
|
* @memberOf wp.media.model
|
||||||
|
*
|
||||||
|
* @class
|
||||||
|
* @augments wp.media.model.Attachments
|
||||||
|
* @augments Backbone.Collection
|
||||||
|
*
|
||||||
|
* @param {array} [models] Models to initialize with the collection.
|
||||||
|
* @param {object} [options] Options hash.
|
||||||
|
* @param {object} [options.args] Attachments query arguments.
|
||||||
|
* @param {object} [options.args.posts_per_page]
|
||||||
|
*/
|
||||||
|
Query = Attachments.extend(/** @lends wp.media.model.Query.prototype */{
|
||||||
|
/**
|
||||||
|
* @param {Array} [models=[]] Array of initial models to populate the collection.
|
||||||
|
* @param {Object} [options={}]
|
||||||
|
*/
|
||||||
|
initialize: function( models, options ) {
|
||||||
|
var allowed;
|
||||||
|
|
||||||
|
options = options || {};
|
||||||
|
Attachments.prototype.initialize.apply( this, arguments );
|
||||||
|
|
||||||
|
this.args = options.args;
|
||||||
|
this._hasMore = true;
|
||||||
|
this.created = new Date();
|
||||||
|
|
||||||
|
this.filters.order = function( attachment ) {
|
||||||
|
var orderby = this.props.get('orderby'),
|
||||||
|
order = this.props.get('order');
|
||||||
|
|
||||||
|
if ( ! this.comparator ) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* We want any items that can be placed before the last
|
||||||
|
* item in the set. If we add any items after the last
|
||||||
|
* item, then we can't guarantee the set is complete.
|
||||||
|
*/
|
||||||
|
if ( this.length ) {
|
||||||
|
return 1 !== this.comparator( attachment, this.last(), { ties: true });
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Handle the case where there are no items yet and
|
||||||
|
* we're sorting for recent items. In that case, we want
|
||||||
|
* changes that occurred after we created the query.
|
||||||
|
*/
|
||||||
|
} else if ( 'DESC' === order && ( 'date' === orderby || 'modified' === orderby ) ) {
|
||||||
|
return attachment.get( orderby ) >= this.created;
|
||||||
|
|
||||||
|
// If we're sorting by menu order and we have no items,
|
||||||
|
// accept any items that have the default menu order (0).
|
||||||
|
} else if ( 'ASC' === order && 'menuOrder' === orderby ) {
|
||||||
|
return attachment.get( orderby ) === 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Otherwise, we don't want any items yet.
|
||||||
|
return false;
|
||||||
|
};
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Observe the central `wp.Uploader.queue` collection to watch for
|
||||||
|
* new matches for the query.
|
||||||
|
*
|
||||||
|
* Only observe when a limited number of query args are set. There
|
||||||
|
* are no filters for other properties, so observing will result in
|
||||||
|
* false positives in those queries.
|
||||||
|
*/
|
||||||
|
allowed = [ 's', 'order', 'orderby', 'posts_per_page', 'post_mime_type', 'post_parent', 'author' ];
|
||||||
|
if ( wp.Uploader && _( this.args ).chain().keys().difference( allowed ).isEmpty().value() ) {
|
||||||
|
this.observe( wp.Uploader.queue );
|
||||||
|
}
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
* Whether there are more attachments that haven't been sync'd from the server
|
||||||
|
* that match the collection's query.
|
||||||
|
*
|
||||||
|
* @return {boolean}
|
||||||
|
*/
|
||||||
|
hasMore: function() {
|
||||||
|
return this._hasMore;
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
* Fetch more attachments from the server for the collection.
|
||||||
|
*
|
||||||
|
* @param {Object} [options={}]
|
||||||
|
* @return {Promise}
|
||||||
|
*/
|
||||||
|
more: function( options ) {
|
||||||
|
var query = this;
|
||||||
|
|
||||||
|
// If there is already a request pending, return early with the Deferred object.
|
||||||
|
if ( this._more && 'pending' === this._more.state() ) {
|
||||||
|
return this._more;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( ! this.hasMore() ) {
|
||||||
|
return jQuery.Deferred().resolveWith( this ).promise();
|
||||||
|
}
|
||||||
|
|
||||||
|
options = options || {};
|
||||||
|
options.remove = false;
|
||||||
|
|
||||||
|
return this._more = this.fetch( options ).done( function( response ) {
|
||||||
|
if ( _.isEmpty( response ) || -1 === query.args.posts_per_page || response.length < query.args.posts_per_page ) {
|
||||||
|
query._hasMore = false;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
* Overrides Backbone.Collection.sync
|
||||||
|
* Overrides wp.media.model.Attachments.sync
|
||||||
|
*
|
||||||
|
* @param {string} method
|
||||||
|
* @param {Backbone.Model} model
|
||||||
|
* @param {Object} [options={}]
|
||||||
|
* @return {Promise}
|
||||||
|
*/
|
||||||
|
sync: function( method, model, options ) {
|
||||||
|
var args, fallback;
|
||||||
|
|
||||||
|
// Overload the read method so Attachment.fetch() functions correctly.
|
||||||
|
if ( 'read' === method ) {
|
||||||
|
options = options || {};
|
||||||
|
options.context = this;
|
||||||
|
options.data = _.extend( options.data || {}, {
|
||||||
|
action: 'query-attachments',
|
||||||
|
post_id: wp.media.model.settings.post.id
|
||||||
|
});
|
||||||
|
|
||||||
|
// Clone the args so manipulation is non-destructive.
|
||||||
|
args = _.clone( this.args );
|
||||||
|
|
||||||
|
// Determine which page to query.
|
||||||
|
if ( -1 !== args.posts_per_page ) {
|
||||||
|
args.paged = Math.round( this.length / args.posts_per_page ) + 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
options.data.query = args;
|
||||||
|
return wp.media.ajax( options );
|
||||||
|
|
||||||
|
// Otherwise, fall back to `Backbone.sync()`.
|
||||||
|
} else {
|
||||||
|
/**
|
||||||
|
* Call wp.media.model.Attachments.sync or Backbone.sync
|
||||||
|
*/
|
||||||
|
fallback = Attachments.prototype.sync ? Attachments.prototype : Backbone;
|
||||||
|
return fallback.sync.apply( this, arguments );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}, /** @lends wp.media.model.Query */{
|
||||||
|
/**
|
||||||
|
* @readonly
|
||||||
|
*/
|
||||||
|
defaultProps: {
|
||||||
|
orderby: 'date',
|
||||||
|
order: 'DESC'
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
* @readonly
|
||||||
|
*/
|
||||||
|
defaultArgs: {
|
||||||
|
posts_per_page: 80
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
* @readonly
|
||||||
|
*/
|
||||||
|
orderby: {
|
||||||
|
allowed: [ 'name', 'author', 'date', 'title', 'modified', 'uploadedTo', 'id', 'post__in', 'menuOrder' ],
|
||||||
|
/**
|
||||||
|
* A map of JavaScript orderby values to their WP_Query equivalents.
|
||||||
|
* @type {Object}
|
||||||
|
*/
|
||||||
|
valuemap: {
|
||||||
|
'id': 'ID',
|
||||||
|
'uploadedTo': 'parent',
|
||||||
|
'menuOrder': 'menu_order ID'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
* A map of JavaScript query properties to their WP_Query equivalents.
|
||||||
|
*
|
||||||
|
* @readonly
|
||||||
|
*/
|
||||||
|
propmap: {
|
||||||
|
'search': 's',
|
||||||
|
'type': 'post_mime_type',
|
||||||
|
'perPage': 'posts_per_page',
|
||||||
|
'menuOrder': 'menu_order',
|
||||||
|
'uploadedTo': 'post_parent',
|
||||||
|
'status': 'post_status',
|
||||||
|
'include': 'post__in',
|
||||||
|
'exclude': 'post__not_in',
|
||||||
|
'author': 'author'
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
* Creates and returns an Attachments Query collection given the properties.
|
||||||
|
*
|
||||||
|
* Caches query objects and reuses where possible.
|
||||||
|
*
|
||||||
|
* @static
|
||||||
|
* @method
|
||||||
|
*
|
||||||
|
* @param {object} [props]
|
||||||
|
* @param {Object} [props.order]
|
||||||
|
* @param {Object} [props.orderby]
|
||||||
|
* @param {Object} [props.include]
|
||||||
|
* @param {Object} [props.exclude]
|
||||||
|
* @param {Object} [props.s]
|
||||||
|
* @param {Object} [props.post_mime_type]
|
||||||
|
* @param {Object} [props.posts_per_page]
|
||||||
|
* @param {Object} [props.menu_order]
|
||||||
|
* @param {Object} [props.post_parent]
|
||||||
|
* @param {Object} [props.post_status]
|
||||||
|
* @param {Object} [props.author]
|
||||||
|
* @param {Object} [options]
|
||||||
|
*
|
||||||
|
* @return {wp.media.model.Query} A new Attachments Query collection.
|
||||||
|
*/
|
||||||
|
get: (function(){
|
||||||
|
/**
|
||||||
|
* @static
|
||||||
|
* @type Array
|
||||||
|
*/
|
||||||
|
var queries = [];
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return {Query}
|
||||||
|
*/
|
||||||
|
return function( props, options ) {
|
||||||
|
var args = {},
|
||||||
|
orderby = Query.orderby,
|
||||||
|
defaults = Query.defaultProps,
|
||||||
|
query;
|
||||||
|
|
||||||
|
// Remove the `query` property. This isn't linked to a query,
|
||||||
|
// this *is* the query.
|
||||||
|
delete props.query;
|
||||||
|
|
||||||
|
// Fill default args.
|
||||||
|
_.defaults( props, defaults );
|
||||||
|
|
||||||
|
// Normalize the order.
|
||||||
|
props.order = props.order.toUpperCase();
|
||||||
|
if ( 'DESC' !== props.order && 'ASC' !== props.order ) {
|
||||||
|
props.order = defaults.order.toUpperCase();
|
||||||
|
}
|
||||||
|
|
||||||
|
// Ensure we have a valid orderby value.
|
||||||
|
if ( ! _.contains( orderby.allowed, props.orderby ) ) {
|
||||||
|
props.orderby = defaults.orderby;
|
||||||
|
}
|
||||||
|
|
||||||
|
_.each( [ 'include', 'exclude' ], function( prop ) {
|
||||||
|
if ( props[ prop ] && ! _.isArray( props[ prop ] ) ) {
|
||||||
|
props[ prop ] = [ props[ prop ] ];
|
||||||
|
}
|
||||||
|
} );
|
||||||
|
|
||||||
|
// Generate the query `args` object.
|
||||||
|
// Correct any differing property names.
|
||||||
|
_.each( props, function( value, prop ) {
|
||||||
|
if ( _.isNull( value ) ) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
args[ Query.propmap[ prop ] || prop ] = value;
|
||||||
|
});
|
||||||
|
|
||||||
|
// Fill any other default query args.
|
||||||
|
_.defaults( args, Query.defaultArgs );
|
||||||
|
|
||||||
|
// `props.orderby` does not always map directly to `args.orderby`.
|
||||||
|
// Substitute exceptions specified in orderby.keymap.
|
||||||
|
args.orderby = orderby.valuemap[ props.orderby ] || props.orderby;
|
||||||
|
|
||||||
|
queries = [];
|
||||||
|
|
||||||
|
// Otherwise, create a new query and add it to the cache.
|
||||||
|
if ( ! query ) {
|
||||||
|
query = new Query( [], _.extend( options || {}, {
|
||||||
|
props: props,
|
||||||
|
args: args
|
||||||
|
} ) );
|
||||||
|
queries.push( query );
|
||||||
|
}
|
||||||
|
|
||||||
|
return query;
|
||||||
|
};
|
||||||
|
}())
|
||||||
|
});
|
||||||
|
|
||||||
|
module.exports = Query;
|
||||||
|
|
||||||
|
|
||||||
|
/***/ }),
|
||||||
|
|
||||||
/***/ 3343:
|
/***/ 3343:
|
||||||
/***/ ((module) => {
|
/***/ ((module) => {
|
||||||
|
|
||||||
@ -175,6 +486,110 @@ Attachment = Backbone.Model.extend(/** @lends wp.media.model.Attachment.prototyp
|
|||||||
module.exports = Attachment;
|
module.exports = Attachment;
|
||||||
|
|
||||||
|
|
||||||
|
/***/ }),
|
||||||
|
|
||||||
|
/***/ 4134:
|
||||||
|
/***/ ((module) => {
|
||||||
|
|
||||||
|
var Attachments = wp.media.model.Attachments,
|
||||||
|
Selection;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* wp.media.model.Selection
|
||||||
|
*
|
||||||
|
* A selection of attachments.
|
||||||
|
*
|
||||||
|
* @memberOf wp.media.model
|
||||||
|
*
|
||||||
|
* @class
|
||||||
|
* @augments wp.media.model.Attachments
|
||||||
|
* @augments Backbone.Collection
|
||||||
|
*/
|
||||||
|
Selection = Attachments.extend(/** @lends wp.media.model.Selection.prototype */{
|
||||||
|
/**
|
||||||
|
* Refresh the `single` model whenever the selection changes.
|
||||||
|
* Binds `single` instead of using the context argument to ensure
|
||||||
|
* it receives no parameters.
|
||||||
|
*
|
||||||
|
* @param {Array} [models=[]] Array of models used to populate the collection.
|
||||||
|
* @param {Object} [options={}]
|
||||||
|
*/
|
||||||
|
initialize: function( models, options ) {
|
||||||
|
/**
|
||||||
|
* call 'initialize' directly on the parent class
|
||||||
|
*/
|
||||||
|
Attachments.prototype.initialize.apply( this, arguments );
|
||||||
|
this.multiple = options && options.multiple;
|
||||||
|
|
||||||
|
this.on( 'add remove reset', _.bind( this.single, this, false ) );
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* If the workflow does not support multi-select, clear out the selection
|
||||||
|
* before adding a new attachment to it.
|
||||||
|
*
|
||||||
|
* @param {Array} models
|
||||||
|
* @param {Object} options
|
||||||
|
* @return {wp.media.model.Attachment[]}
|
||||||
|
*/
|
||||||
|
add: function( models, options ) {
|
||||||
|
if ( ! this.multiple ) {
|
||||||
|
this.remove( this.models );
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* call 'add' directly on the parent class
|
||||||
|
*/
|
||||||
|
return Attachments.prototype.add.call( this, models, options );
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Fired when toggling (clicking on) an attachment in the modal.
|
||||||
|
*
|
||||||
|
* @param {undefined|boolean|wp.media.model.Attachment} model
|
||||||
|
*
|
||||||
|
* @fires wp.media.model.Selection#selection:single
|
||||||
|
* @fires wp.media.model.Selection#selection:unsingle
|
||||||
|
*
|
||||||
|
* @return {Backbone.Model}
|
||||||
|
*/
|
||||||
|
single: function( model ) {
|
||||||
|
var previous = this._single;
|
||||||
|
|
||||||
|
// If a `model` is provided, use it as the single model.
|
||||||
|
if ( model ) {
|
||||||
|
this._single = model;
|
||||||
|
}
|
||||||
|
// If the single model isn't in the selection, remove it.
|
||||||
|
if ( this._single && ! this.get( this._single.cid ) ) {
|
||||||
|
delete this._single;
|
||||||
|
}
|
||||||
|
|
||||||
|
this._single = this._single || this.last();
|
||||||
|
|
||||||
|
// If single has changed, fire an event.
|
||||||
|
if ( this._single !== previous ) {
|
||||||
|
if ( previous ) {
|
||||||
|
previous.trigger( 'selection:unsingle', previous, this );
|
||||||
|
|
||||||
|
// If the model was already removed, trigger the collection
|
||||||
|
// event manually.
|
||||||
|
if ( ! this.get( previous.cid ) ) {
|
||||||
|
this.trigger( 'selection:unsingle', previous, this );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if ( this._single ) {
|
||||||
|
this._single.trigger( 'selection:single', this._single, this );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Return the single model, or the last model as a fallback.
|
||||||
|
return this._single;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
module.exports = Selection;
|
||||||
|
|
||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
|
|
||||||
/***/ 8266:
|
/***/ 8266:
|
||||||
@ -944,421 +1359,6 @@ var PostImage = Backbone.Model.extend(/** @lends wp.media.model.PostImage.protot
|
|||||||
module.exports = PostImage;
|
module.exports = PostImage;
|
||||||
|
|
||||||
|
|
||||||
/***/ }),
|
|
||||||
|
|
||||||
/***/ 1288:
|
|
||||||
/***/ ((module) => {
|
|
||||||
|
|
||||||
var Attachments = wp.media.model.Attachments,
|
|
||||||
Query;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* wp.media.model.Query
|
|
||||||
*
|
|
||||||
* A collection of attachments that match the supplied query arguments.
|
|
||||||
*
|
|
||||||
* Note: Do NOT change this.args after the query has been initialized.
|
|
||||||
* Things will break.
|
|
||||||
*
|
|
||||||
* @memberOf wp.media.model
|
|
||||||
*
|
|
||||||
* @class
|
|
||||||
* @augments wp.media.model.Attachments
|
|
||||||
* @augments Backbone.Collection
|
|
||||||
*
|
|
||||||
* @param {array} [models] Models to initialize with the collection.
|
|
||||||
* @param {object} [options] Options hash.
|
|
||||||
* @param {object} [options.args] Attachments query arguments.
|
|
||||||
* @param {object} [options.args.posts_per_page]
|
|
||||||
*/
|
|
||||||
Query = Attachments.extend(/** @lends wp.media.model.Query.prototype */{
|
|
||||||
/**
|
|
||||||
* @param {Array} [models=[]] Array of initial models to populate the collection.
|
|
||||||
* @param {Object} [options={}]
|
|
||||||
*/
|
|
||||||
initialize: function( models, options ) {
|
|
||||||
var allowed;
|
|
||||||
|
|
||||||
options = options || {};
|
|
||||||
Attachments.prototype.initialize.apply( this, arguments );
|
|
||||||
|
|
||||||
this.args = options.args;
|
|
||||||
this._hasMore = true;
|
|
||||||
this.created = new Date();
|
|
||||||
|
|
||||||
this.filters.order = function( attachment ) {
|
|
||||||
var orderby = this.props.get('orderby'),
|
|
||||||
order = this.props.get('order');
|
|
||||||
|
|
||||||
if ( ! this.comparator ) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
* We want any items that can be placed before the last
|
|
||||||
* item in the set. If we add any items after the last
|
|
||||||
* item, then we can't guarantee the set is complete.
|
|
||||||
*/
|
|
||||||
if ( this.length ) {
|
|
||||||
return 1 !== this.comparator( attachment, this.last(), { ties: true });
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Handle the case where there are no items yet and
|
|
||||||
* we're sorting for recent items. In that case, we want
|
|
||||||
* changes that occurred after we created the query.
|
|
||||||
*/
|
|
||||||
} else if ( 'DESC' === order && ( 'date' === orderby || 'modified' === orderby ) ) {
|
|
||||||
return attachment.get( orderby ) >= this.created;
|
|
||||||
|
|
||||||
// If we're sorting by menu order and we have no items,
|
|
||||||
// accept any items that have the default menu order (0).
|
|
||||||
} else if ( 'ASC' === order && 'menuOrder' === orderby ) {
|
|
||||||
return attachment.get( orderby ) === 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Otherwise, we don't want any items yet.
|
|
||||||
return false;
|
|
||||||
};
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Observe the central `wp.Uploader.queue` collection to watch for
|
|
||||||
* new matches for the query.
|
|
||||||
*
|
|
||||||
* Only observe when a limited number of query args are set. There
|
|
||||||
* are no filters for other properties, so observing will result in
|
|
||||||
* false positives in those queries.
|
|
||||||
*/
|
|
||||||
allowed = [ 's', 'order', 'orderby', 'posts_per_page', 'post_mime_type', 'post_parent', 'author' ];
|
|
||||||
if ( wp.Uploader && _( this.args ).chain().keys().difference( allowed ).isEmpty().value() ) {
|
|
||||||
this.observe( wp.Uploader.queue );
|
|
||||||
}
|
|
||||||
},
|
|
||||||
/**
|
|
||||||
* Whether there are more attachments that haven't been sync'd from the server
|
|
||||||
* that match the collection's query.
|
|
||||||
*
|
|
||||||
* @return {boolean}
|
|
||||||
*/
|
|
||||||
hasMore: function() {
|
|
||||||
return this._hasMore;
|
|
||||||
},
|
|
||||||
/**
|
|
||||||
* Fetch more attachments from the server for the collection.
|
|
||||||
*
|
|
||||||
* @param {Object} [options={}]
|
|
||||||
* @return {Promise}
|
|
||||||
*/
|
|
||||||
more: function( options ) {
|
|
||||||
var query = this;
|
|
||||||
|
|
||||||
// If there is already a request pending, return early with the Deferred object.
|
|
||||||
if ( this._more && 'pending' === this._more.state() ) {
|
|
||||||
return this._more;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ( ! this.hasMore() ) {
|
|
||||||
return jQuery.Deferred().resolveWith( this ).promise();
|
|
||||||
}
|
|
||||||
|
|
||||||
options = options || {};
|
|
||||||
options.remove = false;
|
|
||||||
|
|
||||||
return this._more = this.fetch( options ).done( function( response ) {
|
|
||||||
if ( _.isEmpty( response ) || -1 === query.args.posts_per_page || response.length < query.args.posts_per_page ) {
|
|
||||||
query._hasMore = false;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
/**
|
|
||||||
* Overrides Backbone.Collection.sync
|
|
||||||
* Overrides wp.media.model.Attachments.sync
|
|
||||||
*
|
|
||||||
* @param {string} method
|
|
||||||
* @param {Backbone.Model} model
|
|
||||||
* @param {Object} [options={}]
|
|
||||||
* @return {Promise}
|
|
||||||
*/
|
|
||||||
sync: function( method, model, options ) {
|
|
||||||
var args, fallback;
|
|
||||||
|
|
||||||
// Overload the read method so Attachment.fetch() functions correctly.
|
|
||||||
if ( 'read' === method ) {
|
|
||||||
options = options || {};
|
|
||||||
options.context = this;
|
|
||||||
options.data = _.extend( options.data || {}, {
|
|
||||||
action: 'query-attachments',
|
|
||||||
post_id: wp.media.model.settings.post.id
|
|
||||||
});
|
|
||||||
|
|
||||||
// Clone the args so manipulation is non-destructive.
|
|
||||||
args = _.clone( this.args );
|
|
||||||
|
|
||||||
// Determine which page to query.
|
|
||||||
if ( -1 !== args.posts_per_page ) {
|
|
||||||
args.paged = Math.round( this.length / args.posts_per_page ) + 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
options.data.query = args;
|
|
||||||
return wp.media.ajax( options );
|
|
||||||
|
|
||||||
// Otherwise, fall back to `Backbone.sync()`.
|
|
||||||
} else {
|
|
||||||
/**
|
|
||||||
* Call wp.media.model.Attachments.sync or Backbone.sync
|
|
||||||
*/
|
|
||||||
fallback = Attachments.prototype.sync ? Attachments.prototype : Backbone;
|
|
||||||
return fallback.sync.apply( this, arguments );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}, /** @lends wp.media.model.Query */{
|
|
||||||
/**
|
|
||||||
* @readonly
|
|
||||||
*/
|
|
||||||
defaultProps: {
|
|
||||||
orderby: 'date',
|
|
||||||
order: 'DESC'
|
|
||||||
},
|
|
||||||
/**
|
|
||||||
* @readonly
|
|
||||||
*/
|
|
||||||
defaultArgs: {
|
|
||||||
posts_per_page: 80
|
|
||||||
},
|
|
||||||
/**
|
|
||||||
* @readonly
|
|
||||||
*/
|
|
||||||
orderby: {
|
|
||||||
allowed: [ 'name', 'author', 'date', 'title', 'modified', 'uploadedTo', 'id', 'post__in', 'menuOrder' ],
|
|
||||||
/**
|
|
||||||
* A map of JavaScript orderby values to their WP_Query equivalents.
|
|
||||||
* @type {Object}
|
|
||||||
*/
|
|
||||||
valuemap: {
|
|
||||||
'id': 'ID',
|
|
||||||
'uploadedTo': 'parent',
|
|
||||||
'menuOrder': 'menu_order ID'
|
|
||||||
}
|
|
||||||
},
|
|
||||||
/**
|
|
||||||
* A map of JavaScript query properties to their WP_Query equivalents.
|
|
||||||
*
|
|
||||||
* @readonly
|
|
||||||
*/
|
|
||||||
propmap: {
|
|
||||||
'search': 's',
|
|
||||||
'type': 'post_mime_type',
|
|
||||||
'perPage': 'posts_per_page',
|
|
||||||
'menuOrder': 'menu_order',
|
|
||||||
'uploadedTo': 'post_parent',
|
|
||||||
'status': 'post_status',
|
|
||||||
'include': 'post__in',
|
|
||||||
'exclude': 'post__not_in',
|
|
||||||
'author': 'author'
|
|
||||||
},
|
|
||||||
/**
|
|
||||||
* Creates and returns an Attachments Query collection given the properties.
|
|
||||||
*
|
|
||||||
* Caches query objects and reuses where possible.
|
|
||||||
*
|
|
||||||
* @static
|
|
||||||
* @method
|
|
||||||
*
|
|
||||||
* @param {object} [props]
|
|
||||||
* @param {Object} [props.order]
|
|
||||||
* @param {Object} [props.orderby]
|
|
||||||
* @param {Object} [props.include]
|
|
||||||
* @param {Object} [props.exclude]
|
|
||||||
* @param {Object} [props.s]
|
|
||||||
* @param {Object} [props.post_mime_type]
|
|
||||||
* @param {Object} [props.posts_per_page]
|
|
||||||
* @param {Object} [props.menu_order]
|
|
||||||
* @param {Object} [props.post_parent]
|
|
||||||
* @param {Object} [props.post_status]
|
|
||||||
* @param {Object} [props.author]
|
|
||||||
* @param {Object} [options]
|
|
||||||
*
|
|
||||||
* @return {wp.media.model.Query} A new Attachments Query collection.
|
|
||||||
*/
|
|
||||||
get: (function(){
|
|
||||||
/**
|
|
||||||
* @static
|
|
||||||
* @type Array
|
|
||||||
*/
|
|
||||||
var queries = [];
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @return {Query}
|
|
||||||
*/
|
|
||||||
return function( props, options ) {
|
|
||||||
var args = {},
|
|
||||||
orderby = Query.orderby,
|
|
||||||
defaults = Query.defaultProps,
|
|
||||||
query;
|
|
||||||
|
|
||||||
// Remove the `query` property. This isn't linked to a query,
|
|
||||||
// this *is* the query.
|
|
||||||
delete props.query;
|
|
||||||
|
|
||||||
// Fill default args.
|
|
||||||
_.defaults( props, defaults );
|
|
||||||
|
|
||||||
// Normalize the order.
|
|
||||||
props.order = props.order.toUpperCase();
|
|
||||||
if ( 'DESC' !== props.order && 'ASC' !== props.order ) {
|
|
||||||
props.order = defaults.order.toUpperCase();
|
|
||||||
}
|
|
||||||
|
|
||||||
// Ensure we have a valid orderby value.
|
|
||||||
if ( ! _.contains( orderby.allowed, props.orderby ) ) {
|
|
||||||
props.orderby = defaults.orderby;
|
|
||||||
}
|
|
||||||
|
|
||||||
_.each( [ 'include', 'exclude' ], function( prop ) {
|
|
||||||
if ( props[ prop ] && ! _.isArray( props[ prop ] ) ) {
|
|
||||||
props[ prop ] = [ props[ prop ] ];
|
|
||||||
}
|
|
||||||
} );
|
|
||||||
|
|
||||||
// Generate the query `args` object.
|
|
||||||
// Correct any differing property names.
|
|
||||||
_.each( props, function( value, prop ) {
|
|
||||||
if ( _.isNull( value ) ) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
args[ Query.propmap[ prop ] || prop ] = value;
|
|
||||||
});
|
|
||||||
|
|
||||||
// Fill any other default query args.
|
|
||||||
_.defaults( args, Query.defaultArgs );
|
|
||||||
|
|
||||||
// `props.orderby` does not always map directly to `args.orderby`.
|
|
||||||
// Substitute exceptions specified in orderby.keymap.
|
|
||||||
args.orderby = orderby.valuemap[ props.orderby ] || props.orderby;
|
|
||||||
|
|
||||||
queries = [];
|
|
||||||
|
|
||||||
// Otherwise, create a new query and add it to the cache.
|
|
||||||
if ( ! query ) {
|
|
||||||
query = new Query( [], _.extend( options || {}, {
|
|
||||||
props: props,
|
|
||||||
args: args
|
|
||||||
} ) );
|
|
||||||
queries.push( query );
|
|
||||||
}
|
|
||||||
|
|
||||||
return query;
|
|
||||||
};
|
|
||||||
}())
|
|
||||||
});
|
|
||||||
|
|
||||||
module.exports = Query;
|
|
||||||
|
|
||||||
|
|
||||||
/***/ }),
|
|
||||||
|
|
||||||
/***/ 4134:
|
|
||||||
/***/ ((module) => {
|
|
||||||
|
|
||||||
var Attachments = wp.media.model.Attachments,
|
|
||||||
Selection;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* wp.media.model.Selection
|
|
||||||
*
|
|
||||||
* A selection of attachments.
|
|
||||||
*
|
|
||||||
* @memberOf wp.media.model
|
|
||||||
*
|
|
||||||
* @class
|
|
||||||
* @augments wp.media.model.Attachments
|
|
||||||
* @augments Backbone.Collection
|
|
||||||
*/
|
|
||||||
Selection = Attachments.extend(/** @lends wp.media.model.Selection.prototype */{
|
|
||||||
/**
|
|
||||||
* Refresh the `single` model whenever the selection changes.
|
|
||||||
* Binds `single` instead of using the context argument to ensure
|
|
||||||
* it receives no parameters.
|
|
||||||
*
|
|
||||||
* @param {Array} [models=[]] Array of models used to populate the collection.
|
|
||||||
* @param {Object} [options={}]
|
|
||||||
*/
|
|
||||||
initialize: function( models, options ) {
|
|
||||||
/**
|
|
||||||
* call 'initialize' directly on the parent class
|
|
||||||
*/
|
|
||||||
Attachments.prototype.initialize.apply( this, arguments );
|
|
||||||
this.multiple = options && options.multiple;
|
|
||||||
|
|
||||||
this.on( 'add remove reset', _.bind( this.single, this, false ) );
|
|
||||||
},
|
|
||||||
|
|
||||||
/**
|
|
||||||
* If the workflow does not support multi-select, clear out the selection
|
|
||||||
* before adding a new attachment to it.
|
|
||||||
*
|
|
||||||
* @param {Array} models
|
|
||||||
* @param {Object} options
|
|
||||||
* @return {wp.media.model.Attachment[]}
|
|
||||||
*/
|
|
||||||
add: function( models, options ) {
|
|
||||||
if ( ! this.multiple ) {
|
|
||||||
this.remove( this.models );
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* call 'add' directly on the parent class
|
|
||||||
*/
|
|
||||||
return Attachments.prototype.add.call( this, models, options );
|
|
||||||
},
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Fired when toggling (clicking on) an attachment in the modal.
|
|
||||||
*
|
|
||||||
* @param {undefined|boolean|wp.media.model.Attachment} model
|
|
||||||
*
|
|
||||||
* @fires wp.media.model.Selection#selection:single
|
|
||||||
* @fires wp.media.model.Selection#selection:unsingle
|
|
||||||
*
|
|
||||||
* @return {Backbone.Model}
|
|
||||||
*/
|
|
||||||
single: function( model ) {
|
|
||||||
var previous = this._single;
|
|
||||||
|
|
||||||
// If a `model` is provided, use it as the single model.
|
|
||||||
if ( model ) {
|
|
||||||
this._single = model;
|
|
||||||
}
|
|
||||||
// If the single model isn't in the selection, remove it.
|
|
||||||
if ( this._single && ! this.get( this._single.cid ) ) {
|
|
||||||
delete this._single;
|
|
||||||
}
|
|
||||||
|
|
||||||
this._single = this._single || this.last();
|
|
||||||
|
|
||||||
// If single has changed, fire an event.
|
|
||||||
if ( this._single !== previous ) {
|
|
||||||
if ( previous ) {
|
|
||||||
previous.trigger( 'selection:unsingle', previous, this );
|
|
||||||
|
|
||||||
// If the model was already removed, trigger the collection
|
|
||||||
// event manually.
|
|
||||||
if ( ! this.get( previous.cid ) ) {
|
|
||||||
this.trigger( 'selection:unsingle', previous, this );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if ( this._single ) {
|
|
||||||
this._single.trigger( 'selection:single', this._single, this );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Return the single model, or the last model as a fallback.
|
|
||||||
return this._single;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
module.exports = Selection;
|
|
||||||
|
|
||||||
|
|
||||||
/***/ })
|
/***/ })
|
||||||
|
|
||||||
/******/ });
|
/******/ });
|
||||||
|
2
wp-includes/js/media-models.min.js
vendored
2
wp-includes/js/media-models.min.js
vendored
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
2
wp-includes/js/media-views.min.js
vendored
2
wp-includes/js/media-views.min.js
vendored
File diff suppressed because one or more lines are too long
@ -16,7 +16,7 @@
|
|||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @global string $wp_version
|
||||||
*/
|
*/
|
||||||
$wp_version = '6.8-alpha-59928';
|
$wp_version = '6.8-alpha-59929';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
Loading…
Reference in New Issue
Block a user