mirror of
https://github.com/WordPress/WordPress.git
synced 2024-11-12 13:44:21 +01:00
5a721be794
Props peterwilsoncc, desrosj, gziolo. Merges [50940] in to the 5.7 branch. Fixes #53192. Built from https://develop.svn.wordpress.org/branches/5.7@50990 git-svn-id: http://core.svn.wordpress.org/branches/5.7@50599 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2 lines
16 KiB
JavaScript
2 lines
16 KiB
JavaScript
/*! This file is auto-generated */
|
|
this.wp=this.wp||{},this.wp.element=function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s="./node_modules/@wordpress/element/build-module/index.js")}({"./node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js":function(e,t,r){"use strict";function n(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}r.d(t,"a",(function(){return n}))},"./node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js":function(e,t,r){"use strict";function n(e){if(Array.isArray(e))return e}r.d(t,"a",(function(){return n}))},"./node_modules/@babel/runtime/helpers/esm/defineProperty.js":function(e,t,r){"use strict";function n(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}r.d(t,"a",(function(){return n}))},"./node_modules/@babel/runtime/helpers/esm/iterableToArray.js":function(e,t,r){"use strict";function n(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}r.d(t,"a",(function(){return n}))},"./node_modules/@babel/runtime/helpers/esm/nonIterableRest.js":function(e,t,r){"use strict";function n(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}r.d(t,"a",(function(){return n}))},"./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js":function(e,t,r){"use strict";r.d(t,"a",(function(){return o}));var n=r("./node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js");function o(e,t){if(null==e)return{};var r,o,u=Object(n.a)(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)r=i[o],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(u[r]=e[r])}return u}},"./node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js":function(e,t,r){"use strict";function n(e,t){if(null==e)return{};var r,n,o={},u=Object.keys(e);for(n=0;n<u.length;n++)r=u[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}r.d(t,"a",(function(){return n}))},"./node_modules/@babel/runtime/helpers/esm/slicedToArray.js":function(e,t,r){"use strict";r.d(t,"a",(function(){return i}));var n=r("./node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js");var o=r("./node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js"),u=r("./node_modules/@babel/runtime/helpers/esm/nonIterableRest.js");function i(e,t){return Object(n.a)(e)||function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var r=[],n=!0,o=!1,u=void 0;try{for(var i,a=e[Symbol.iterator]();!(n=(i=a.next()).done)&&(r.push(i.value),!t||r.length!==t);n=!0);}catch(e){o=!0,u=e}finally{try{n||null==a.return||a.return()}finally{if(o)throw u}}return r}}(e,t)||Object(o.a)(e,t)||Object(u.a)()}},"./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js":function(e,t,r){"use strict";r.d(t,"a",(function(){return i}));var n=r("./node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js");var o=r("./node_modules/@babel/runtime/helpers/esm/iterableToArray.js"),u=r("./node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js");function i(e){return function(e){if(Array.isArray(e))return Object(n.a)(e)}(e)||Object(o.a)(e)||Object(u.a)(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}},"./node_modules/@babel/runtime/helpers/esm/typeof.js":function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}r.d(t,"a",(function(){return n}))},"./node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js":function(e,t,r){"use strict";r.d(t,"a",(function(){return o}));var n=r("./node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js");function o(e,t){if(e){if("string"==typeof e)return Object(n.a)(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Object(n.a)(e,t):void 0}}},"./node_modules/@wordpress/element/build-module/index.js":function(e,t,r){"use strict";r.r(t),r.d(t,"createInterpolateElement",(function(){return h})),r.d(t,"Children",(function(){return l.Children})),r.d(t,"cloneElement",(function(){return l.cloneElement})),r.d(t,"Component",(function(){return l.Component})),r.d(t,"createContext",(function(){return l.createContext})),r.d(t,"createElement",(function(){return l.createElement})),r.d(t,"createRef",(function(){return l.createRef})),r.d(t,"forwardRef",(function(){return l.forwardRef})),r.d(t,"Fragment",(function(){return l.Fragment})),r.d(t,"isValidElement",(function(){return l.isValidElement})),r.d(t,"memo",(function(){return l.memo})),r.d(t,"StrictMode",(function(){return l.StrictMode})),r.d(t,"useCallback",(function(){return l.useCallback})),r.d(t,"useContext",(function(){return l.useContext})),r.d(t,"useDebugValue",(function(){return l.useDebugValue})),r.d(t,"useEffect",(function(){return l.useEffect})),r.d(t,"useImperativeHandle",(function(){return l.useImperativeHandle})),r.d(t,"useLayoutEffect",(function(){return l.useLayoutEffect})),r.d(t,"useMemo",(function(){return l.useMemo})),r.d(t,"useReducer",(function(){return l.useReducer})),r.d(t,"useRef",(function(){return l.useRef})),r.d(t,"useState",(function(){return l.useState})),r.d(t,"lazy",(function(){return l.lazy})),r.d(t,"Suspense",(function(){return l.Suspense})),r.d(t,"concatChildren",(function(){return w})),r.d(t,"switchChildrenNodeName",(function(){return S})),r.d(t,"createPortal",(function(){return P.createPortal})),r.d(t,"findDOMNode",(function(){return P.findDOMNode})),r.d(t,"render",(function(){return P.render})),r.d(t,"unmountComponentAtNode",(function(){return P.unmountComponentAtNode})),r.d(t,"isEmptyElement",(function(){return _})),r.d(t,"Platform",(function(){return k})),r.d(t,"renderToString",(function(){return Y})),r.d(t,"RawHTML",(function(){return C}));var n,o,u,i,a=r("./node_modules/@babel/runtime/helpers/esm/slicedToArray.js"),c=r("./node_modules/@babel/runtime/helpers/esm/typeof.js"),s=r("./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js"),l=r("react"),f=/<(\/)?(\w+)\s*(\/)?>/g;function d(e,t,r,n,o){return{element:e,tokenStart:t,tokenLength:r,prevOffset:n,leadingTextStart:o,children:[]}}var b=function(e){var t="object"===Object(c.a)(e),r=t&&Object.values(e);return t&&r.length&&r.every((function(e){return Object(l.isValidElement)(e)}))};function p(e){var t=function(){var e=f.exec(n);if(null===e)return["no-more-tokens"];var t=e.index,r=Object(a.a)(e,4),o=r[0],u=r[1],i=r[2],c=r[3],s=o.length;if(c)return["self-closed",i,t,s];if(u)return["closer",i,t,s];return["opener",i,t,s]}(),r=Object(a.a)(t,4),c=r[0],b=r[1],p=r[2],h=r[3],O=i.length,j=p>o?o:null;if(!e[b])return m(),!1;switch(c){case"no-more-tokens":if(0!==O){var v=i.pop(),g=v.leadingTextStart,w=v.tokenStart;u.push(n.substr(g,w))}return m(),!1;case"self-closed":return 0===O?(null!==j&&u.push(n.substr(j,p-j)),u.push(e[b]),o=p+h,!0):(y(d(e[b],p,h)),o=p+h,!0);case"opener":return i.push(d(e[b],p,h,p+h,j)),o=p+h,!0;case"closer":if(1===O)return function(e){var t=i.pop(),r=t.element,o=t.leadingTextStart,a=t.prevOffset,c=t.tokenStart,f=t.children,d=e?n.substr(a,e-a):n.substr(a);d&&f.push(d);null!==o&&u.push(n.substr(o,c-o));u.push(l.cloneElement.apply(void 0,[r,null].concat(Object(s.a)(f))))}(p),o=p+h,!0;var S=i.pop(),P=n.substr(S.prevOffset,p-S.prevOffset);S.children.push(P),S.prevOffset=p+h;var _=d(S.element,S.tokenStart,S.tokenLength,p+h);return _.children=S.children,y(_),o=p+h,!0;default:return m(),!1}}function m(){var e=n.length-o;0!==e&&u.push(n.substr(o,e))}function y(e){var t=e.element,r=e.tokenStart,o=e.tokenLength,u=e.prevOffset,a=e.children,c=i[i.length-1],f=n.substr(c.prevOffset,r-c.prevOffset);f&&c.children.push(f),c.children.push(l.cloneElement.apply(void 0,[t,null].concat(Object(s.a)(a)))),c.prevOffset=u||r+o}var h=function(e,t){if(n=e,o=0,u=[],i=[],f.lastIndex=0,!b(t))throw new TypeError("The conversionMap provided is not valid. It must be an object with values that are WPElements");do{}while(p(t));return l.createElement.apply(void 0,[l.Fragment,null].concat(Object(s.a)(u)))},O=r("./node_modules/@babel/runtime/helpers/esm/defineProperty.js"),j=r("./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js"),v=r("lodash");function g(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function w(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return t.reduce((function(e,t,r){return l.Children.forEach(t,(function(t,n){t&&"string"!=typeof t&&(t=Object(l.cloneElement)(t,{key:[r,n].join()})),e.push(t)})),e}),[])}function S(e,t){return e&&l.Children.map(e,(function(e,r){if(Object(v.isString)(e))return Object(l.createElement)(t,{key:r},e);var n=e.props,o=n.children,u=Object(j.a)(n,["children"]);return Object(l.createElement)(t,function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?g(Object(r),!0).forEach((function(t){Object(O.a)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):g(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({key:r},u),o)}))}var P=r("react-dom"),_=function(e){return!Object(v.isNumber)(e)&&(Object(v.isString)(e)||Object(v.isArray)(e)?!e.length:!e)},k={OS:"web",select:function(e){return"web"in e?e.web:e.default}},x=r("@wordpress/escape-html");function E(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function C(e){var t=e.children,r=Object(j.a)(e,["children"]);return Object(l.createElement)("div",function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?E(Object(r),!0).forEach((function(t){Object(O.a)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):E(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({dangerouslySetInnerHTML:{__html:t}},r))}function A(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function T(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?A(Object(r),!0).forEach((function(t){Object(O.a)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):A(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var I=Object(l.createContext)(void 0),M=I.Provider,D=I.Consumer,L=Object(l.forwardRef)((function(){return null})),R=new Set(["string","boolean","number"]),H=new Set(["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"]),W=new Set(["allowfullscreen","allowpaymentrequest","allowusermedia","async","autofocus","autoplay","checked","controls","default","defer","disabled","download","formnovalidate","hidden","ismap","itemscope","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","selected","typemustmatch"]),N=new Set(["autocapitalize","autocomplete","charset","contenteditable","crossorigin","decoding","dir","draggable","enctype","formenctype","formmethod","http-equiv","inputmode","kind","method","preload","scope","shape","spellcheck","translate","type","wrap"]),$=new Set(["animation","animationIterationCount","baselineShift","borderImageOutset","borderImageSlice","borderImageWidth","columnCount","cx","cy","fillOpacity","flexGrow","flexShrink","floodOpacity","fontWeight","gridColumnEnd","gridColumnStart","gridRowEnd","gridRowStart","lineHeight","opacity","order","orphans","r","rx","ry","shapeImageThreshold","stopOpacity","strokeDasharray","strokeDashoffset","strokeMiterlimit","strokeOpacity","strokeWidth","tabSize","widows","x","y","zIndex","zoom"]);function z(e,t){return t.some((function(t){return 0===e.indexOf(t)}))}function V(e){return"key"===e||"children"===e}function F(e,t){switch(e){case"style":return function(e){if(!Object(v.isPlainObject)(e))return e;var t;for(var r in e){var n=e[r];if(null!=n){t?t+=";":t="";var o=G(r),u=U(r,n);t+=o+":"+u}}return t}(t)}return t}function q(e){switch(e){case"htmlFor":return"for";case"className":return"class"}return e.toLowerCase()}function G(e){return Object(v.startsWith)(e,"--")?e:z(e,["ms","O","Moz","Webkit"])?"-"+Object(v.kebabCase)(e):Object(v.kebabCase)(e)}function U(e,t){return"number"!=typeof t||0===t||$.has(e)?t:t+"px"}function B(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(null==e||!1===e)return"";if(Array.isArray(e))return Q(e,t,r);switch(Object(c.a)(e)){case"string":return Object(x.escapeHTML)(e);case"number":return e.toString()}var n=e.type,o=e.props;switch(n){case l.StrictMode:case l.Fragment:return Q(o.children,t,r);case C:var u=o.children,i=Object(j.a)(o,["children"]);return J(Object(v.isEmpty)(i)?null:"div",T(T({},i),{},{dangerouslySetInnerHTML:{__html:u}}),t,r)}switch(Object(c.a)(n)){case"string":return J(n,o,t,r);case"function":return n.prototype&&"function"==typeof n.prototype.render?K(n,o,t,r):B(n(o,r),t,r)}switch(n&&n.$$typeof){case M.$$typeof:return Q(o.children,o.value,r);case D.$$typeof:return B(o.children(t||n._currentValue),t,r);case L.$$typeof:return B(n.render(o),t,r)}return""}function J(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o="";if("textarea"===e&&t.hasOwnProperty("value")?(o=Q(t.value,r,n),t=Object(v.omit)(t,"value")):t.dangerouslySetInnerHTML&&"string"==typeof t.dangerouslySetInnerHTML.__html?o=t.dangerouslySetInnerHTML.__html:void 0!==t.children&&(o=Q(t.children,r,n)),!e)return o;var u=X(t);return H.has(e)?"<"+e+u+"/>":"<"+e+u+">"+o+"</"+e+">"}function K(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=new e(t,n);"function"==typeof o.getChildContext&&Object.assign(n,o.getChildContext());var u=B(o.render(),r,n);return u}function Q(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n="";e=Object(v.castArray)(e);for(var o=0;o<e.length;o++){var u=e[o];n+=B(u,t,r)}return n}function X(e){var t="";for(var r in e){var n=q(r);if(Object(x.isValidAttributeName)(n)){var o=F(r,e[r]);if(R.has(Object(c.a)(o))&&!V(r)){var u=W.has(n);if(!u||!1!==o){var i=u||z(r,["data-","aria-"])||N.has(n);("boolean"!=typeof o||i)&&(t+=" "+n,u||("string"==typeof o&&(o=Object(x.escapeAttribute)(o)),t+='="'+o+'"'))}}}}return t}var Y=B},"@wordpress/escape-html":function(e,t){e.exports=window.wp.escapeHtml},lodash:function(e,t){e.exports=window.lodash},react:function(e,t){e.exports=window.React},"react-dom":function(e,t){e.exports=window.ReactDOM}}); |