%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /home/dordingu/public_html/hardkjarni/wp-content/plugins/gutenberg/build/plugins/
Upload File :
Create Path :
Current File : /home/dordingu/public_html/hardkjarni/wp-content/plugins/gutenberg/build/plugins/index.min.js.map

{"version":3,"file":"./build/plugins/index.min.js","mappings":"sBAsKAA,EAAOC,QA/HP,SAAiBC,EAAIC,GACpB,IAGIC,EAGAC,EANAC,EAAO,EAUX,SAASC,IACR,IAECC,EAAMC,EAFHC,EAAON,EACVO,EAAMC,UAAUC,OAGjBC,EAAa,KAAQJ,GAAO,CAQ3B,GAAKA,EAAKF,KAAKK,SAAWD,UAAUC,OAApC,CAMA,IAAMJ,EAAI,EAAGA,EAAIE,EAAKF,IACrB,GAAKC,EAAKF,KAAMC,KAAQG,UAAWH,GAAM,CACxCC,EAAOA,EAAKK,KACZ,SAASD,CACV,CA2BD,OArBKJ,IAASN,IAGRM,IAASL,IACbA,EAAOK,EAAKM,MAKoBN,EAAU,KAAEK,KAAOL,EAAKK,KACpDL,EAAKK,OACTL,EAAKK,KAAKC,KAAON,EAAKM,MAGvBN,EAAKK,KAAOX,EACZM,EAAKM,KAAO,KACmB,EAASA,KAAON,EAC/CN,EAAOM,GAIDA,EAAKO,GAlCZ,CAFCP,EAAOA,EAAKK,IAqCd,CAMA,IADAP,EAAO,IAAIU,MAAOP,GACZF,EAAI,EAAGA,EAAIE,EAAKF,IACrBD,EAAMC,GAAMG,UAAWH,GAgCxB,OA7BAC,EAAO,CACNF,KAAMA,EAGNS,IAAKf,EAAGiB,MAAO,KAAMX,IAOjBJ,GACJA,EAAKY,KAAON,EACZA,EAAKK,KAAOX,GAGZC,EAAOK,EAIHJ,IAAsC,EAAYc,SACtDf,EAAsC,EAASW,MACPD,KAAO,KAE/CT,IAGDF,EAAOM,EAEAA,EAAKO,GACb,CAsBA,OAnHAd,EAAUA,GAAW,CAAC,EA+FtBI,EAASc,MAAQ,WAChBjB,EAAO,KACPC,EAAO,KACPC,EAAO,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AAS,SACrBzD,KAAKgB,MAAMW,QAAQsB,KAAK,QAAE,QAAEtC,EAAF,OAAWuC,GAAb,SACzB,mBAAC,EAAD,CACCtE,IAAM+B,EAAQP,KACdV,MAAQiB,IAER,mBAACC,EAAD,CACCR,KAAOO,EAAQP,KACfgB,QAAUpB,KAAKU,MAAMU,UAErB,mBAAC8B,EAAD,OATuB,IAe5B,EAGF,S","sources":["webpack://wp/./node_modules/memize/index.js","webpack://wp/webpack/bootstrap","webpack://wp/webpack/runtime/compat get default export","webpack://wp/webpack/runtime/define property getters","webpack://wp/webpack/runtime/hasOwnProperty shorthand","webpack://wp/webpack/runtime/make namespace object","webpack://wp/external window [\"wp\",\"element\"]","webpack://wp/external window [\"wp\",\"hooks\"]","webpack://wp/./node_modules/@babel/runtime/helpers/esm/extends.js","webpack://wp/external window [\"wp\",\"compose\"]","webpack://wp/./packages/plugins/build-module/components/plugin-context/@wordpress/plugins/src/components/plugin-context/index.js","webpack://wp/./packages/plugins/build-module/components/plugin-error-boundary/@wordpress/plugins/src/components/plugin-error-boundary/index.js","webpack://wp/external window [\"wp\",\"primitives\"]","webpack://wp/./packages/icons/build-module/library/@wordpress/icons/src/library/plugins.js","webpack://wp/./packages/plugins/build-module/api/@wordpress/plugins/src/api/index.js","webpack://wp/./packages/plugins/build-module/components/plugin-area/@wordpress/plugins/src/components/plugin-area/index.js"],"sourcesContent":["/**\n * Memize options object.\n *\n * @typedef MemizeOptions\n *\n * @property {number} [maxSize] Maximum size of the cache.\n */\n\n/**\n * Internal cache entry.\n *\n * @typedef MemizeCacheNode\n *\n * @property {?MemizeCacheNode|undefined} [prev] Previous node.\n * @property {?MemizeCacheNode|undefined} [next] Next node.\n * @property {Array<*>}                   args   Function arguments for cache\n *                                               entry.\n * @property {*}                          val    Function result.\n */\n\n/**\n * Properties of the enhanced function for controlling cache.\n *\n * @typedef MemizeMemoizedFunction\n *\n * @property {()=>void} clear Clear the cache.\n */\n\n/**\n * Accepts a function to be memoized, and returns a new memoized function, with\n * optional options.\n *\n * @template {Function} F\n *\n * @param {F}             fn        Function to memoize.\n * @param {MemizeOptions} [options] Options object.\n *\n * @return {F & MemizeMemoizedFunction} Memoized function.\n */\nfunction memize( fn, options ) {\n\tvar size = 0;\n\n\t/** @type {?MemizeCacheNode|undefined} */\n\tvar head;\n\n\t/** @type {?MemizeCacheNode|undefined} */\n\tvar tail;\n\n\toptions = options || {};\n\n\tfunction memoized( /* ...args */ ) {\n\t\tvar node = head,\n\t\t\tlen = arguments.length,\n\t\t\targs, i;\n\n\t\tsearchCache: while ( node ) {\n\t\t\t// Perform a shallow equality test to confirm that whether the node\n\t\t\t// under test is a candidate for the arguments passed. Two arrays\n\t\t\t// are shallowly equal if their length matches and each entry is\n\t\t\t// strictly equal between the two sets. Avoid abstracting to a\n\t\t\t// function which could incur an arguments leaking deoptimization.\n\n\t\t\t// Check whether node arguments match arguments length\n\t\t\tif ( node.args.length !== arguments.length ) {\n\t\t\t\tnode = node.next;\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// Check whether node arguments match arguments values\n\t\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\t\tif ( node.args[ i ] !== arguments[ i ] ) {\n\t\t\t\t\tnode = node.next;\n\t\t\t\t\tcontinue searchCache;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// At this point we can assume we've found a match\n\n\t\t\t// Surface matched node to head if not already\n\t\t\tif ( node !== head ) {\n\t\t\t\t// As tail, shift to previous. Must only shift if not also\n\t\t\t\t// head, since if both head and tail, there is no previous.\n\t\t\t\tif ( node === tail ) {\n\t\t\t\t\ttail = node.prev;\n\t\t\t\t}\n\n\t\t\t\t// Adjust siblings to point to each other. If node was tail,\n\t\t\t\t// this also handles new tail's empty `next` assignment.\n\t\t\t\t/** @type {MemizeCacheNode} */ ( node.prev ).next = node.next;\n\t\t\t\tif ( node.next ) {\n\t\t\t\t\tnode.next.prev = node.prev;\n\t\t\t\t}\n\n\t\t\t\tnode.next = head;\n\t\t\t\tnode.prev = null;\n\t\t\t\t/** @type {MemizeCacheNode} */ ( head ).prev = node;\n\t\t\t\thead = node;\n\t\t\t}\n\n\t\t\t// Return immediately\n\t\t\treturn node.val;\n\t\t}\n\n\t\t// No cached value found. Continue to insertion phase:\n\n\t\t// Create a copy of arguments (avoid leaking deoptimization)\n\t\targs = new Array( len );\n\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\targs[ i ] = arguments[ i ];\n\t\t}\n\n\t\tnode = {\n\t\t\targs: args,\n\n\t\t\t// Generate the result from original function\n\t\t\tval: fn.apply( null, args ),\n\t\t};\n\n\t\t// Don't need to check whether node is already head, since it would\n\t\t// have been returned above already if it was\n\n\t\t// Shift existing head down list\n\t\tif ( head ) {\n\t\t\thead.prev = node;\n\t\t\tnode.next = head;\n\t\t} else {\n\t\t\t// If no head, follows that there's no tail (at initial or reset)\n\t\t\ttail = node;\n\t\t}\n\n\t\t// Trim tail if we're reached max size and are pending cache insertion\n\t\tif ( size === /** @type {MemizeOptions} */ ( options ).maxSize ) {\n\t\t\ttail = /** @type {MemizeCacheNode} */ ( tail ).prev;\n\t\t\t/** @type {MemizeCacheNode} */ ( tail ).next = null;\n\t\t} else {\n\t\t\tsize++;\n\t\t}\n\n\t\thead = node;\n\n\t\treturn node.val;\n\t}\n\n\tmemoized.clear = function() {\n\t\thead = null;\n\t\ttail = null;\n\t\tsize = 0;\n\t};\n\n\tif ( process.env.NODE_ENV === 'test' ) {\n\t\t// Cache is not exposed in the public API, but used in tests to ensure\n\t\t// expected list progression\n\t\tmemoized.getCache = function() {\n\t\t\treturn [ head, tail, size ];\n\t\t};\n\t}\n\n\t// Ignore reason: There's not a clear solution to create an intersection of\n\t// the function with additional properties, where the goal is to retain the\n\t// function signature of the incoming argument and add control properties\n\t// on the return value.\n\n\t// @ts-ignore\n\treturn memoized;\n}\n\nmodule.exports = memize;\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"element\"];","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"hooks\"];","export default function _extends() {\n  _extends = Object.assign || function (target) {\n    for (var i = 1; i < arguments.length; i++) {\n      var source = arguments[i];\n\n      for (var key in source) {\n        if (Object.prototype.hasOwnProperty.call(source, key)) {\n          target[key] = source[key];\n        }\n      }\n    }\n\n    return target;\n  };\n\n  return _extends.apply(this, arguments);\n}","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"compose\"];","/**\n * WordPress dependencies\n */\nimport { createContext } from '@wordpress/element';\nimport { createHigherOrderComponent } from '@wordpress/compose';\n\nconst { Consumer, Provider } = createContext( {\n\tname: null,\n\ticon: null,\n} );\n\nexport { Provider as PluginContextProvider };\n\n/**\n * A Higher Order Component used to inject Plugin context to the\n * wrapped component.\n *\n * @param {Function} mapContextToProps Function called on every context change,\n *                                     expected to return object of props to\n *                                     merge with the component's own props.\n *\n * @return {WPComponent} Enhanced component with injected context as props.\n */\nexport const withPluginContext = ( mapContextToProps ) =>\n\tcreateHigherOrderComponent( ( OriginalComponent ) => {\n\t\treturn ( props ) => (\n\t\t\t<Consumer>\n\t\t\t\t{ ( context ) => (\n\t\t\t\t\t<OriginalComponent\n\t\t\t\t\t\t{ ...props }\n\t\t\t\t\t\t{ ...mapContextToProps( context, props ) }\n\t\t\t\t\t/>\n\t\t\t\t) }\n\t\t\t</Consumer>\n\t\t);\n\t}, 'withPluginContext' );\n","/**\n * WordPress dependencies\n */\nimport { Component } from '@wordpress/element';\n\nexport class PluginErrorBoundary extends Component {\n\tconstructor( props ) {\n\t\tsuper( props );\n\t\tthis.state = {\n\t\t\thasError: false,\n\t\t};\n\t}\n\n\tstatic getDerivedStateFromError() {\n\t\treturn { hasError: true };\n\t}\n\n\tcomponentDidCatch( error ) {\n\t\tconst { name, onError } = this.props;\n\t\tif ( onError ) {\n\t\t\tonError( name, error );\n\t\t}\n\t}\n\n\trender() {\n\t\tif ( ! this.state.hasError ) {\n\t\t\treturn this.props.children;\n\t\t}\n\n\t\treturn null;\n\t}\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"primitives\"];","/**\n * WordPress dependencies\n */\nimport { SVG, Path } from '@wordpress/primitives';\n\nconst plugins = (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t\t<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\" />\n\t</SVG>\n);\n\nexport default plugins;\n","/* eslint no-console: [ 'error', { allow: [ 'error' ] } ] */\n\n/**\n * WordPress dependencies\n */\nimport { applyFilters, doAction } from '@wordpress/hooks';\nimport { plugins as pluginsIcon } from '@wordpress/icons';\n\n/**\n * Defined behavior of a plugin type.\n *\n * @typedef {Object} WPPlugin\n *\n * @property {string}                    name    A string identifying the plugin. Must be\n *                                               unique across all registered plugins.\n * @property {string|WPElement|Function} [icon]  An icon to be shown in the UI. It can\n *                                               be a slug of the Dashicon, or an element\n *                                               (or function returning an element) if you\n *                                               choose to render your own SVG.\n * @property {Function}                  render  A component containing the UI elements\n *                                               to be rendered.\n * @property {string}                    [scope] The optional scope to be used when rendering inside\n *                                               a plugin area. No scope by default.\n */\n\n/**\n * Plugin definitions keyed by plugin name.\n *\n * @type {Object.<string,WPPlugin>}\n */\nconst plugins = {};\n\n/**\n * Registers a plugin to the editor.\n *\n * @param {string}                 name     A string identifying the plugin.Must be\n *                                          unique across all registered plugins.\n * @param {Omit<WPPlugin, 'name'>} settings The settings for this plugin.\n *\n * @example\n * ```js\n * // Using ES5 syntax\n * var el = wp.element.createElement;\n * var Fragment = wp.element.Fragment;\n * var PluginSidebar = wp.editPost.PluginSidebar;\n * var PluginSidebarMoreMenuItem = wp.editPost.PluginSidebarMoreMenuItem;\n * var registerPlugin = wp.plugins.registerPlugin;\n * var moreIcon = wp.element.createElement( 'svg' ); //... svg element.\n *\n * function Component() {\n * \treturn el(\n * \t\tFragment,\n * \t\t{},\n * \t\tel(\n * \t\t\tPluginSidebarMoreMenuItem,\n * \t\t\t{\n * \t\t\t\ttarget: 'sidebar-name',\n * \t\t\t},\n * \t\t\t'My Sidebar'\n * \t\t),\n * \t\tel(\n * \t\t\tPluginSidebar,\n * \t\t\t{\n * \t\t\t\tname: 'sidebar-name',\n * \t\t\t\ttitle: 'My Sidebar',\n * \t\t\t},\n * \t\t\t'Content of the sidebar'\n * \t\t)\n * \t);\n * }\n * registerPlugin( 'plugin-name', {\n * \ticon: moreIcon,\n * \trender: Component,\n * \tscope: 'my-page',\n * } );\n * ```\n *\n * @example\n * ```js\n * // Using ESNext syntax\n * import { PluginSidebar, PluginSidebarMoreMenuItem } from '@wordpress/edit-post';\n * import { registerPlugin } from '@wordpress/plugins';\n * import { more } from '@wordpress/icons';\n *\n * const Component = () => (\n * \t<>\n * \t\t<PluginSidebarMoreMenuItem\n * \t\t\ttarget=\"sidebar-name\"\n * \t\t>\n * \t\t\tMy Sidebar\n * \t\t</PluginSidebarMoreMenuItem>\n * \t\t<PluginSidebar\n * \t\t\tname=\"sidebar-name\"\n * \t\t\ttitle=\"My Sidebar\"\n * \t\t>\n * \t\t\tContent of the sidebar\n * \t\t</PluginSidebar>\n * \t</>\n * );\n *\n * registerPlugin( 'plugin-name', {\n * \ticon: more,\n * \trender: Component,\n * \tscope: 'my-page',\n * } );\n * ```\n *\n * @return {WPPlugin} The final plugin settings object.\n */\nexport function registerPlugin( name, settings ) {\n\tif ( typeof settings !== 'object' ) {\n\t\tconsole.error( 'No settings object provided!' );\n\t\treturn null;\n\t}\n\tif ( typeof name !== 'string' ) {\n\t\tconsole.error( 'Plugin name must be string.' );\n\t\treturn null;\n\t}\n\tif ( ! /^[a-z][a-z0-9-]*$/.test( name ) ) {\n\t\tconsole.error(\n\t\t\t'Plugin name must include only lowercase alphanumeric characters or dashes, and start with a letter. Example: \"my-plugin\".'\n\t\t);\n\t\treturn null;\n\t}\n\tif ( plugins[ name ] ) {\n\t\tconsole.error( `Plugin \"${ name }\" is already registered.` );\n\t}\n\n\tsettings = applyFilters( 'plugins.registerPlugin', settings, name );\n\n\tconst { render, scope } = settings;\n\n\tif ( typeof render !== 'function' ) {\n\t\tconsole.error(\n\t\t\t'The \"render\" property must be specified and must be a valid function.'\n\t\t);\n\t\treturn null;\n\t}\n\n\tif ( scope ) {\n\t\tif ( typeof scope !== 'string' ) {\n\t\t\tconsole.error( 'Plugin scope must be string.' );\n\t\t\treturn null;\n\t\t}\n\n\t\tif ( ! /^[a-z][a-z0-9-]*$/.test( scope ) ) {\n\t\t\tconsole.error(\n\t\t\t\t'Plugin scope must include only lowercase alphanumeric characters or dashes, and start with a letter. Example: \"my-page\".'\n\t\t\t);\n\t\t\treturn null;\n\t\t}\n\t}\n\n\tplugins[ name ] = {\n\t\tname,\n\t\ticon: pluginsIcon,\n\t\t...settings,\n\t};\n\n\tdoAction( 'plugins.pluginRegistered', settings, name );\n\n\treturn settings;\n}\n\n/**\n * Unregisters a plugin by name.\n *\n * @param {string} name Plugin name.\n *\n * @example\n * ```js\n * // Using ES5 syntax\n * var unregisterPlugin = wp.plugins.unregisterPlugin;\n *\n * unregisterPlugin( 'plugin-name' );\n * ```\n *\n * @example\n * ```js\n * // Using ESNext syntax\n * import { unregisterPlugin } from '@wordpress/plugins';\n *\n * unregisterPlugin( 'plugin-name' );\n * ```\n *\n * @return {?WPPlugin} The previous plugin settings object, if it has been\n *                     successfully unregistered; otherwise `undefined`.\n */\nexport function unregisterPlugin( name ) {\n\tif ( ! plugins[ name ] ) {\n\t\tconsole.error( 'Plugin \"' + name + '\" is not registered.' );\n\t\treturn;\n\t}\n\tconst oldPlugin = plugins[ name ];\n\tdelete plugins[ name ];\n\n\tdoAction( 'plugins.pluginUnregistered', oldPlugin, name );\n\n\treturn oldPlugin;\n}\n\n/**\n * Returns a registered plugin settings.\n *\n * @param {string} name Plugin name.\n *\n * @return {?WPPlugin} Plugin setting.\n */\nexport function getPlugin( name ) {\n\treturn plugins[ name ];\n}\n\n/**\n * Returns all registered plugins without a scope or for a given scope.\n *\n * @param {string} [scope] The scope to be used when rendering inside\n *                         a plugin area. No scope by default.\n *\n * @return {WPPlugin[]} The list of plugins without a scope or for a given scope.\n */\nexport function getPlugins( scope ) {\n\treturn Object.values( plugins ).filter(\n\t\t( plugin ) => plugin.scope === scope\n\t);\n}\n","/**\n * External dependencies\n */\nimport memoize from 'memize';\n\n/**\n * WordPress dependencies\n */\nimport { Component } from '@wordpress/element';\nimport { addAction, removeAction } from '@wordpress/hooks';\n\n/**\n * Internal dependencies\n */\nimport { PluginContextProvider } from '../plugin-context';\nimport { PluginErrorBoundary } from '../plugin-error-boundary';\nimport { getPlugins } from '../../api';\n\n/**\n * A component that renders all plugin fills in a hidden div.\n *\n * @example\n * ```js\n * // Using ES5 syntax\n * var el = wp.element.createElement;\n * var PluginArea = wp.plugins.PluginArea;\n *\n * function Layout() {\n * \treturn el(\n * \t\t'div',\n * \t\t{ scope: 'my-page' },\n * \t\t'Content of the page',\n * \t\tPluginArea\n * \t);\n * }\n * ```\n *\n * @example\n * ```js\n * // Using ESNext syntax\n * import { PluginArea } from '@wordpress/plugins';\n *\n * const Layout = () => (\n * \t<div>\n * \t\tContent of the page\n * \t\t<PluginArea scope=\"my-page\" />\n * \t</div>\n * );\n * ```\n *\n * @return {WPComponent} The component to be rendered.\n */\nclass PluginArea extends Component {\n\tconstructor() {\n\t\tsuper( ...arguments );\n\n\t\tthis.setPlugins = this.setPlugins.bind( this );\n\t\tthis.memoizedContext = memoize( ( name, icon ) => {\n\t\t\treturn {\n\t\t\t\tname,\n\t\t\t\ticon,\n\t\t\t};\n\t\t} );\n\t\tthis.state = this.getCurrentPluginsState();\n\t}\n\n\tgetCurrentPluginsState() {\n\t\treturn {\n\t\t\tplugins: getPlugins( this.props.scope ).map(\n\t\t\t\t( { icon, name, render } ) => {\n\t\t\t\t\treturn {\n\t\t\t\t\t\tPlugin: render,\n\t\t\t\t\t\tcontext: this.memoizedContext( name, icon ),\n\t\t\t\t\t};\n\t\t\t\t}\n\t\t\t),\n\t\t};\n\t}\n\n\tcomponentDidMount() {\n\t\taddAction(\n\t\t\t'plugins.pluginRegistered',\n\t\t\t'core/plugins/plugin-area/plugins-registered',\n\t\t\tthis.setPlugins\n\t\t);\n\t\taddAction(\n\t\t\t'plugins.pluginUnregistered',\n\t\t\t'core/plugins/plugin-area/plugins-unregistered',\n\t\t\tthis.setPlugins\n\t\t);\n\t}\n\n\tcomponentWillUnmount() {\n\t\tremoveAction(\n\t\t\t'plugins.pluginRegistered',\n\t\t\t'core/plugins/plugin-area/plugins-registered'\n\t\t);\n\t\tremoveAction(\n\t\t\t'plugins.pluginUnregistered',\n\t\t\t'core/plugins/plugin-area/plugins-unregistered'\n\t\t);\n\t}\n\n\tsetPlugins() {\n\t\tthis.setState( this.getCurrentPluginsState );\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<div style={ { display: 'none' } }>\n\t\t\t\t{ this.state.plugins.map( ( { context, Plugin } ) => (\n\t\t\t\t\t<PluginContextProvider\n\t\t\t\t\t\tkey={ context.name }\n\t\t\t\t\t\tvalue={ context }\n\t\t\t\t\t>\n\t\t\t\t\t\t<PluginErrorBoundary\n\t\t\t\t\t\t\tname={ context.name }\n\t\t\t\t\t\t\tonError={ this.props.onError }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<Plugin />\n\t\t\t\t\t\t</PluginErrorBoundary>\n\t\t\t\t\t</PluginContextProvider>\n\t\t\t\t) ) }\n\t\t\t</div>\n\t\t);\n\t}\n}\n\nexport default PluginArea;\n"],"names":["module","exports","fn","options","head","tail","size","memoized","args","i","node","len","arguments","length","searchCache","next","prev","val","Array","apply","maxSize","clear","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","undefined","__webpack_modules__","n","getter","__esModule","d","a","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","r","Symbol","toStringTag","value","window","_extends","assign","target","source","this","Consumer","Provider","createContext","name","icon","withPluginContext","mapContextToProps","createHigherOrderComponent","OriginalComponent","props","context","PluginErrorBoundary","Component","constructor","super","state","hasError","componentDidCatch","error","onError","render","children","SVG","xmlns","viewBox","Path","plugins","registerPlugin","settings","console","test","applyFilters","scope","pluginsIcon","doAction","unregisterPlugin","oldPlugin","getPlugin","getPlugins","values","filter","plugin","PluginArea","setPlugins","bind","memoizedContext","memoize","getCurrentPluginsState","map","Plugin","componentDidMount","addAction","componentWillUnmount","removeAction","setState","style","display"],"sourceRoot":""}

Zerion Mini Shell 1.0