WordPress/wp-includes/js/dist/plugins.min.js
Peter Wilson eae23abd88 Build tools: Use hashed module IDs for minified files.
Further improves webpack configuration for editor files to use hashed module IDs in the compressed (`*.min.js`) production files.

Follow up to [50940].

Props @gziolo.
Merges [51035] to the 5.7 branch.
Fixes #53192.


Built from https://develop.svn.wordpress.org/branches/5.7@51036


git-svn-id: http://core.svn.wordpress.org/branches/5.7@50645 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-27 00:29:10 +00:00

2 lines
7.6 KiB
JavaScript

/*! This file is auto-generated */
this.wp=this.wp||{},this.wp.plugins=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="ey5A")}({"1OyB":function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}n.d(t,"a",(function(){return r}))},GRId:function(e,t){e.exports=window.wp.element},JX7q:function(e,t,n){"use strict";function r(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}n.d(t,"a",(function(){return r}))},Ji7U:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n("s4An");function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Object(r.a)(e,t)}},K9lf:function(e,t){e.exports=window.wp.compose},Tqx9:function(e,t){e.exports=window.wp.primitives},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)}n.d(t,"a",(function(){return r}))},YLtl:function(e,t){e.exports=window.lodash},ey5A:function(e,t,n){"use strict";n.r(t),n.d(t,"PluginArea",(function(){return A})),n.d(t,"withPluginContext",(function(){return O})),n.d(t,"registerPlugin",(function(){return x})),n.d(t,"unregisterPlugin",(function(){return S})),n.d(t,"getPlugin",(function(){return U})),n.d(t,"getPlugins",(function(){return _}));var r=n("1OyB"),o=n("vuIU"),u=n("JX7q"),i=n("Ji7U"),c=n("md7G"),l=n("foSv"),s=n("GRId"),a=n("YLtl"),f=n("g56x"),p=n("wx14"),g=n("K9lf"),b=Object(s.createContext)({name:null,icon:null}),d=b.Consumer,y=b.Provider,O=function(e){return Object(g.createHigherOrderComponent)((function(t){return function(n){return Object(s.createElement)(d,null,(function(r){return Object(s.createElement)(t,Object(p.a)({},n,e(r,n)))}))}}),"withPluginContext")},j=n("rePB"),v=n("U8pU"),m=n("Tqx9"),h=Object(s.createElement)(m.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(s.createElement)(m.Path,{d:"M10.5 4v4h3V4H15v4h1.5a1 1 0 011 1v4l-3 4v2a1 1 0 01-1 1h-3a1 1 0 01-1-1v-2l-3-4V9a1 1 0 011-1H9V4h1.5zm.5 12.5v2h2v-2l3-4v-3H8v3l3 4z"}));function P(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var w={};function x(e,t){return"object"!==Object(v.a)(t)?(console.error("No settings object provided!"),null):"string"!=typeof e?(console.error("Plugin names must be strings."),null):/^[a-z][a-z0-9-]*$/.test(e)?(w[e]&&console.error('Plugin "'.concat(e,'" is already registered.')),t=Object(f.applyFilters)("plugins.registerPlugin",t,e),Object(a.isFunction)(t.render)?(w[e]=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?P(Object(n),!0).forEach((function(t){Object(j.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):P(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({name:e,icon:h},t),Object(f.doAction)("plugins.pluginRegistered",t,e),t):(console.error('The "render" property must be specified and must be a valid function.'),null)):(console.error('Plugin names must include only lowercase alphanumeric characters or dashes, and start with a letter. Example: "my-plugin".'),null)}function S(e){if(w[e]){var t=w[e];return delete w[e],Object(f.doAction)("plugins.pluginUnregistered",t,e),t}console.error('Plugin "'+e+'" is not registered.')}function U(e){return w[e]}function _(){return Object.values(w)}function E(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(l.a)(e);if(t){var o=Object(l.a)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Object(c.a)(this,n)}}var A=function(e){Object(i.a)(n,e);var t=E(n);function n(){var e;return Object(r.a)(this,n),(e=t.apply(this,arguments)).setPlugins=e.setPlugins.bind(Object(u.a)(e)),e.state=e.getCurrentPluginsState(),e}return Object(o.a)(n,[{key:"getCurrentPluginsState",value:function(){return{plugins:Object(a.map)(_(),(function(e){var t=e.icon,n=e.name;return{Plugin:e.render,context:{name:n,icon:t}}}))}}},{key:"componentDidMount",value:function(){Object(f.addAction)("plugins.pluginRegistered","core/plugins/plugin-area/plugins-registered",this.setPlugins),Object(f.addAction)("plugins.pluginUnregistered","core/plugins/plugin-area/plugins-unregistered",this.setPlugins)}},{key:"componentWillUnmount",value:function(){Object(f.removeAction)("plugins.pluginRegistered","core/plugins/plugin-area/plugins-registered"),Object(f.removeAction)("plugins.pluginUnregistered","core/plugins/plugin-area/plugins-unregistered")}},{key:"setPlugins",value:function(){this.setState(this.getCurrentPluginsState)}},{key:"render",value:function(){return Object(s.createElement)("div",{style:{display:"none"}},Object(a.map)(this.state.plugins,(function(e){var t=e.context,n=e.Plugin;return Object(s.createElement)(y,{key:t.name,value:t},Object(s.createElement)(n,null))})))}}]),n}(s.Component)},foSv:function(e,t,n){"use strict";function r(e){return(r=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}n.d(t,"a",(function(){return r}))},g56x:function(e,t){e.exports=window.wp.hooks},md7G:function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var r=n("U8pU"),o=n("JX7q");function u(e,t){return!t||"object"!==Object(r.a)(t)&&"function"!=typeof t?Object(o.a)(e):t}},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}))},s4An:function(e,t,n){"use strict";function r(e,t){return(r=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}n.d(t,"a",(function(){return r}))},vuIU:function(e,t,n){"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function o(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),e}n.d(t,"a",(function(){return o}))},wx14:function(e,t,n){"use strict";function r(){return(r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}n.d(t,"a",(function(){return r}))}});