WordPress/wp-includes/js/dist/element.min.js
desrosj 5a4b00a618 Grouped merges for 5.2.12.
- Update `lodash` to the latest version `4.17.21`.
- Disable some attributes for rich text.
- Use hashed/deterministic moduleIDs in webpack config.

Props ellatrix, peterwilsoncc, get_dave, mcsf, talldanwp, youknowriad, desrosj, nerrad, gziolo.
Merges [50940-50941,50984-50985,51426] to the 5.2 branch.
Built from https://develop.svn.wordpress.org/branches/5.2@51756


git-svn-id: http://core.svn.wordpress.org/branches/5.2@51363 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-08 21:22:54 +00:00

1 line
8.9 KiB
JavaScript

this.wp=this.wp||{},this.wp.element=function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s="o/Ny")}({Ff2n:function(e,t,n){"use strict";function r(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},u=Object.keys(e);for(r=0;r<u.length;r++)n=u[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var u=Object.getOwnPropertySymbols(e);for(r=0;r<u.length;r++)n=u[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}n.d(t,"a",(function(){return r}))},U8pU:function(e,t,n){"use strict";function r(e){return(r="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)}function o(e){return(o="function"==typeof Symbol&&"symbol"===r(Symbol.iterator)?function(e){return r(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":r(e)})(e)}n.d(t,"a",(function(){return o}))},Vx3V:function(e,t){!function(){e.exports=this.wp.escapeHtml}()},YLtl:function(e,t){!function(){e.exports=this.lodash}()},cDcd:function(e,t){!function(){e.exports=this.React}()},faye:function(e,t){!function(){e.exports=this.ReactDOM}()},"o/Ny":function(e,t,n){"use strict";n.r(t),n.d(t,"Children",(function(){return u.Children})),n.d(t,"cloneElement",(function(){return u.cloneElement})),n.d(t,"Component",(function(){return u.Component})),n.d(t,"createContext",(function(){return u.createContext})),n.d(t,"createElement",(function(){return u.createElement})),n.d(t,"createRef",(function(){return u.createRef})),n.d(t,"forwardRef",(function(){return u.forwardRef})),n.d(t,"Fragment",(function(){return u.Fragment})),n.d(t,"isValidElement",(function(){return u.isValidElement})),n.d(t,"StrictMode",(function(){return u.StrictMode})),n.d(t,"useCallback",(function(){return u.useCallback})),n.d(t,"useContext",(function(){return u.useContext})),n.d(t,"useDebugValue",(function(){return u.useDebugValue})),n.d(t,"useEffect",(function(){return u.useEffect})),n.d(t,"useImperativeHandle",(function(){return u.useImperativeHandle})),n.d(t,"useLayoutEffect",(function(){return u.useLayoutEffect})),n.d(t,"useMemo",(function(){return u.useMemo})),n.d(t,"useReducer",(function(){return u.useReducer})),n.d(t,"useRef",(function(){return u.useRef})),n.d(t,"useState",(function(){return u.useState})),n.d(t,"concatChildren",(function(){return c})),n.d(t,"switchChildrenNodeName",(function(){return a})),n.d(t,"createPortal",(function(){return f.createPortal})),n.d(t,"findDOMNode",(function(){return f.findDOMNode})),n.d(t,"render",(function(){return f.render})),n.d(t,"unmountComponentAtNode",(function(){return f.unmountComponentAtNode})),n.d(t,"isEmptyElement",(function(){return l})),n.d(t,"renderToString",(function(){return L})),n.d(t,"RawHTML",(function(){return p}));var r=n("vpQ4"),o=n("Ff2n"),u=n("cDcd"),i=n("YLtl");function c(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.reduce((function(e,t,n){return u.Children.forEach(t,(function(t,r){t&&"string"!=typeof t&&(t=Object(u.cloneElement)(t,{key:[n,r].join()})),e.push(t)})),e}),[])}function a(e,t){return e&&u.Children.map(e,(function(e,n){if(Object(i.isString)(e))return Object(u.createElement)(t,{key:n},e);var c=e.props,a=c.children,f=Object(o.a)(c,["children"]);return Object(u.createElement)(t,Object(r.a)({key:n},f),a)}))}var f=n("faye"),l=function(e){return!Object(i.isNumber)(e)&&(Object(i.isString)(e)||Object(i.isArray)(e)?!e.length:!e)},s=n("U8pU"),d=n("Vx3V");function p(e){var t=e.children,n=Object(o.a)(e,["children"]);return Object(u.createElement)("div",Object(r.a)({dangerouslySetInnerHTML:{__html:t}},n))}var y=Object(u.createContext)(),b=y.Provider,m=y.Consumer,h=new Set(["string","boolean","number"]),O=new Set(["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"]),v=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"]),g=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"]),j=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 S(e,t){return t.some((function(t){return 0===e.indexOf(t)}))}function w(e){return"key"===e||"children"===e}function x(e,t){switch(e){case"style":return function(e){if(!Object(i.isPlainObject)(e))return e;var t;for(var n in e){var r=e[n];if(null!=r){t?t+=";":t="";var o=k(n),u=E(n,r);t+=o+":"+u}}return t}(t)}return t}function C(e){switch(e){case"htmlFor":return"for";case"className":return"class"}return e.toLowerCase()}function k(e){return Object(i.startsWith)(e,"--")?e:S(e,["ms","O","Moz","Webkit"])?"-"+Object(i.kebabCase)(e):Object(i.kebabCase)(e)}function E(e,t){return"number"!=typeof t||0===t||j.has(e)?t:t+"px"}function M(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(null==e||!1===e)return"";if(Array.isArray(e))return I(e,t,n);switch(Object(s.a)(e)){case"string":return Object(d.escapeHTML)(e);case"number":return e.toString()}var c=e.type,a=e.props;switch(c){case u.StrictMode:case u.Fragment:return I(a.children,t,n);case p:var f=a.children,l=Object(o.a)(a,["children"]);return P(Object(i.isEmpty)(l)?null:"div",Object(r.a)({},l,{dangerouslySetInnerHTML:{__html:f}}),t,n)}switch(Object(s.a)(c)){case"string":return P(c,a,t,n);case"function":return c.prototype&&"function"==typeof c.prototype.render?_(c,a,t,n):M(c(a,n),t,n)}switch(c&&c.$$typeof){case b.$$typeof:return I(a.children,a.value,n);case m.$$typeof:return M(a.children(t||c._currentValue),t,n)}return""}function P(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o="";if("textarea"===e&&t.hasOwnProperty("value")?(o=I(t.value,n,r),t=Object(i.omit)(t,"value")):t.dangerouslySetInnerHTML&&"string"==typeof t.dangerouslySetInnerHTML.__html?o=t.dangerouslySetInnerHTML.__html:void 0!==t.children&&(o=I(t.children,n,r)),!e)return o;var u=R(t);return O.has(e)?"<"+e+u+"/>":"<"+e+u+">"+o+"</"+e+">"}function _(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=new e(t,r);"function"==typeof o.getChildContext&&Object.assign(r,o.getChildContext());var u=M(o.render(),n,r);return u}function I(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r="";e=Object(i.castArray)(e);for(var o=0;o<e.length;o++){var u=e[o];r+=M(u,t,n)}return r}function R(e){var t="";for(var n in e){var r=C(n);if(Object(d.isValidAttributeName)(r)){var o=x(n,e[n]);if(h.has(Object(s.a)(o))&&!w(n)){var u=v.has(r);if(!u||!1!==o){var i=u||S(n,["data-","aria-"])||g.has(r);("boolean"!=typeof o||i)&&(t+=" "+r,u||("string"==typeof o&&(o=Object(d.escapeAttribute)(o)),t+='="'+o+'"'))}}}}return t}var L=M},rePB:function(e,t,n){"use strict";function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}n.d(t,"a",(function(){return r}))},vpQ4:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n("rePB");function o(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},o=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),o.forEach((function(t){Object(r.a)(e,t,n[t])}))}return e}}});