2020-01-03 14:17:24 +01:00
this [ "wp" ] = this [ "wp" ] || { } ; this [ "wp" ] [ "blockDirectory" ] =
/******/ ( function ( modules ) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = { } ;
/******/
/******/ // The require function
/******/ function _ _webpack _require _ _ ( moduleId ) {
/******/
/******/ // Check if module is in cache
/******/ if ( installedModules [ moduleId ] ) {
/******/ return installedModules [ moduleId ] . exports ;
/******/ }
/******/ // Create a new module (and put it into the cache)
/******/ var module = installedModules [ moduleId ] = {
/******/ i : moduleId ,
/******/ l : false ,
/******/ exports : { }
/******/ } ;
/******/
/******/ // Execute the module function
/******/ modules [ moduleId ] . call ( module . exports , module , module . exports , _ _webpack _require _ _ ) ;
/******/
/******/ // Flag the module as loaded
/******/ module . l = true ;
/******/
/******/ // Return the exports of the module
/******/ return module . exports ;
/******/ }
/******/
/******/
/******/ // expose the modules object (__webpack_modules__)
/******/ _ _webpack _require _ _ . m = modules ;
/******/
/******/ // expose the module cache
/******/ _ _webpack _require _ _ . c = installedModules ;
/******/
/******/ // define getter function for harmony exports
/******/ _ _webpack _require _ _ . d = function ( exports , name , getter ) {
/******/ if ( ! _ _webpack _require _ _ . o ( exports , name ) ) {
/******/ Object . defineProperty ( exports , name , { enumerable : true , get : getter } ) ;
/******/ }
/******/ } ;
/******/
/******/ // define __esModule on exports
/******/ _ _webpack _require _ _ . r = function ( exports ) {
/******/ if ( typeof Symbol !== 'undefined' && Symbol . toStringTag ) {
/******/ Object . defineProperty ( exports , Symbol . toStringTag , { value : 'Module' } ) ;
/******/ }
/******/ Object . defineProperty ( exports , '__esModule' , { value : true } ) ;
/******/ } ;
/******/
/******/ // create a fake namespace object
/******/ // mode & 1: value is a module id, require it
/******/ // mode & 2: merge all properties of value into the ns
/******/ // mode & 4: return value when already ns object
/******/ // mode & 8|1: behave like require
/******/ _ _webpack _require _ _ . t = function ( value , mode ) {
/******/ if ( mode & 1 ) value = _ _webpack _require _ _ ( value ) ;
/******/ if ( mode & 8 ) return value ;
/******/ if ( ( mode & 4 ) && typeof value === 'object' && value && value . _ _esModule ) return value ;
/******/ var ns = Object . create ( null ) ;
/******/ _ _webpack _require _ _ . r ( ns ) ;
/******/ Object . defineProperty ( ns , 'default' , { enumerable : true , value : value } ) ;
/******/ if ( mode & 2 && typeof value != 'string' ) for ( var key in value ) _ _webpack _require _ _ . d ( ns , key , function ( key ) { return value [ key ] ; } . bind ( null , key ) ) ;
/******/ return ns ;
/******/ } ;
/******/
/******/ // getDefaultExport function for compatibility with non-harmony modules
/******/ _ _webpack _require _ _ . n = function ( module ) {
/******/ var getter = module && module . _ _esModule ?
/******/ function getDefault ( ) { return module [ 'default' ] ; } :
/******/ function getModuleExports ( ) { return module ; } ;
/******/ _ _webpack _require _ _ . d ( getter , 'a' , getter ) ;
/******/ return getter ;
/******/ } ;
/******/
/******/ // Object.prototype.hasOwnProperty.call
/******/ _ _webpack _require _ _ . o = function ( object , property ) { return Object . prototype . hasOwnProperty . call ( object , property ) ; } ;
/******/
/******/ // __webpack_public_path__
/******/ _ _webpack _require _ _ . p = "" ;
/******/
/******/
/******/ // Load entry module and return exports
2021-05-20 14:20:04 +02:00
/******/ return _ _webpack _require _ _ ( _ _webpack _require _ _ . s = "7f3f" ) ;
2020-01-03 14:17:24 +01:00
/******/ } )
/************************************************************************/
/******/ ( {
2021-05-20 14:20:04 +02:00
/***/ "//Lo" :
2020-06-26 15:33:47 +02:00
/***/ ( function ( module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) {
2020-01-03 14:17:24 +01:00
2020-07-21 14:14:37 +02:00
"use strict" ;
2021-05-20 14:20:04 +02:00
/* harmony import */ var _wordpress _element _ _WEBPACK _IMPORTED _MODULE _0 _ _ = _ _webpack _require _ _ ( "GRId" ) ;
2021-05-19 17:09:27 +02:00
/* harmony import */ var _wordpress _element _ _WEBPACK _IMPORTED _MODULE _0 _ _ _default = /*#__PURE__*/ _ _webpack _require _ _ . n ( _wordpress _element _ _WEBPACK _IMPORTED _MODULE _0 _ _ ) ;
2021-05-20 14:20:04 +02:00
/* harmony import */ var _wordpress _primitives _ _WEBPACK _IMPORTED _MODULE _1 _ _ = _ _webpack _require _ _ ( "Tqx9" ) ;
2021-05-19 17:09:27 +02:00
/* harmony import */ var _wordpress _primitives _ _WEBPACK _IMPORTED _MODULE _1 _ _ _default = /*#__PURE__*/ _ _webpack _require _ _ . n ( _wordpress _primitives _ _WEBPACK _IMPORTED _MODULE _1 _ _ ) ;
2020-07-21 14:14:37 +02:00
2021-05-19 17:09:27 +02:00
/ * *
* WordPress dependencies
* /
2020-07-21 14:14:37 +02:00
2021-05-19 17:09:27 +02:00
const blockDefault = Object ( _wordpress _element _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "createElement" ] ) ( _wordpress _primitives _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "SVG" ] , {
xmlns : "http://www.w3.org/2000/svg" ,
viewBox : "0 0 24 24"
} , Object ( _wordpress _element _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "createElement" ] ) ( _wordpress _primitives _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "Path" ] , {
d : "M19 8h-1V6h-5v2h-2V6H6v2H5c-1.1 0-2 .9-2 2v8c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-8c0-1.1-.9-2-2-2zm.5 10c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5v-8c0-.3.2-.5.5-.5h14c.3 0 .5.2.5.5v8z"
} ) ) ;
/* harmony default export */ _ _webpack _exports _ _ [ "a" ] = ( blockDefault ) ;
2020-07-21 14:14:37 +02:00
/***/ } ) ,
2021-05-20 14:20:04 +02:00
/***/ "1ZqX" :
2020-02-06 22:03:31 +01:00
/***/ ( function ( module , exports ) {
2021-01-28 03:04:13 +01:00
( function ( ) { module . exports = window [ "wp" ] [ "data" ] ; } ( ) ) ;
2020-02-06 22:03:31 +01:00
/***/ } ) ,
2021-05-20 14:20:04 +02:00
/***/ "7f3f" :
2020-01-03 14:17:24 +01:00
/***/ ( function ( module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) {
"use strict" ;
2020-06-29 13:50:29 +02:00
// ESM COMPAT FLAG
2020-01-03 14:17:24 +01:00
_ _webpack _require _ _ . r ( _ _webpack _exports _ _ ) ;
2020-06-29 13:50:29 +02:00
2021-01-28 03:04:13 +01:00
// EXPORTS
_ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "store" , function ( ) { return /* reexport */ store ; } ) ;
2020-06-29 13:50:29 +02:00
// NAMESPACE OBJECT: ./node_modules/@wordpress/block-directory/build-module/store/selectors.js
2020-01-03 14:17:24 +01:00
var selectors _namespaceObject = { } ;
_ _webpack _require _ _ . r ( selectors _namespaceObject ) ;
2021-01-28 03:04:13 +01:00
_ _webpack _require _ _ . d ( selectors _namespaceObject , "isRequestingDownloadableBlocks" , function ( ) { return selectors _isRequestingDownloadableBlocks ; } ) ;
2020-01-03 14:17:24 +01:00
_ _webpack _require _ _ . d ( selectors _namespaceObject , "getDownloadableBlocks" , function ( ) { return selectors _getDownloadableBlocks ; } ) ;
_ _webpack _require _ _ . d ( selectors _namespaceObject , "getInstalledBlockTypes" , function ( ) { return getInstalledBlockTypes ; } ) ;
2020-06-26 15:33:47 +02:00
_ _webpack _require _ _ . d ( selectors _namespaceObject , "getNewBlockTypes" , function ( ) { return getNewBlockTypes ; } ) ;
_ _webpack _require _ _ . d ( selectors _namespaceObject , "getUnusedBlockTypes" , function ( ) { return getUnusedBlockTypes ; } ) ;
2021-01-28 03:04:13 +01:00
_ _webpack _require _ _ . d ( selectors _namespaceObject , "isInstalling" , function ( ) { return selectors _isInstalling ; } ) ;
2020-06-26 15:33:47 +02:00
_ _webpack _require _ _ . d ( selectors _namespaceObject , "getErrorNotices" , function ( ) { return getErrorNotices ; } ) ;
2021-01-28 03:04:13 +01:00
_ _webpack _require _ _ . d ( selectors _namespaceObject , "getErrorNoticeForBlock" , function ( ) { return selectors _getErrorNoticeForBlock ; } ) ;
2020-06-29 13:50:29 +02:00
// NAMESPACE OBJECT: ./node_modules/@wordpress/block-directory/build-module/store/actions.js
2020-01-03 14:17:24 +01:00
var actions _namespaceObject = { } ;
_ _webpack _require _ _ . r ( actions _namespaceObject ) ;
_ _webpack _require _ _ . d ( actions _namespaceObject , "fetchDownloadableBlocks" , function ( ) { return fetchDownloadableBlocks ; } ) ;
_ _webpack _require _ _ . d ( actions _namespaceObject , "receiveDownloadableBlocks" , function ( ) { return receiveDownloadableBlocks ; } ) ;
2020-06-26 15:33:47 +02:00
_ _webpack _require _ _ . d ( actions _namespaceObject , "installBlockType" , function ( ) { return actions _installBlockType ; } ) ;
_ _webpack _require _ _ . d ( actions _namespaceObject , "uninstallBlockType" , function ( ) { return actions _uninstallBlockType ; } ) ;
2020-01-03 14:17:24 +01:00
_ _webpack _require _ _ . d ( actions _namespaceObject , "addInstalledBlockType" , function ( ) { return addInstalledBlockType ; } ) ;
_ _webpack _require _ _ . d ( actions _namespaceObject , "removeInstalledBlockType" , function ( ) { return removeInstalledBlockType ; } ) ;
2020-06-26 15:33:47 +02:00
_ _webpack _require _ _ . d ( actions _namespaceObject , "setIsInstalling" , function ( ) { return setIsInstalling ; } ) ;
_ _webpack _require _ _ . d ( actions _namespaceObject , "setErrorNotice" , function ( ) { return setErrorNotice ; } ) ;
_ _webpack _require _ _ . d ( actions _namespaceObject , "clearErrorNotice" , function ( ) { return clearErrorNotice ; } ) ;
2021-11-08 15:29:21 +01:00
// NAMESPACE OBJECT: ./node_modules/@wordpress/block-directory/build-module/store/resolvers.js
var resolvers _namespaceObject = { } ;
_ _webpack _require _ _ . r ( resolvers _namespaceObject ) ;
_ _webpack _require _ _ . d ( resolvers _namespaceObject , "getDownloadableBlocks" , function ( ) { return resolvers _getDownloadableBlocks ; } ) ;
2021-01-28 03:04:13 +01:00
// EXTERNAL MODULE: external ["wp","element"]
2021-05-20 14:20:04 +02:00
var external _wp _element _ = _ _webpack _require _ _ ( "GRId" ) ;
2021-01-28 03:04:13 +01:00
// EXTERNAL MODULE: external ["wp","plugins"]
2021-05-20 14:20:04 +02:00
var external _wp _plugins _ = _ _webpack _require _ _ ( "TvNi" ) ;
2021-01-28 03:04:13 +01:00
// EXTERNAL MODULE: external ["wp","hooks"]
2021-05-20 14:20:04 +02:00
var external _wp _hooks _ = _ _webpack _require _ _ ( "g56x" ) ;
2021-01-28 03:04:13 +01:00
// EXTERNAL MODULE: external ["wp","blocks"]
2021-05-20 14:20:04 +02:00
var external _wp _blocks _ = _ _webpack _require _ _ ( "HSyU" ) ;
2021-01-28 03:04:13 +01:00
// EXTERNAL MODULE: external ["wp","data"]
2021-05-20 14:20:04 +02:00
var external _wp _data _ = _ _webpack _require _ _ ( "1ZqX" ) ;
2020-07-07 16:43:35 +02:00
2021-04-15 17:19:43 +02:00
// EXTERNAL MODULE: external ["wp","editor"]
2021-05-20 14:20:04 +02:00
var external _wp _editor _ = _ _webpack _require _ _ ( "jSdM" ) ;
2020-01-03 14:17:24 +01:00
2021-01-28 03:04:13 +01:00
// EXTERNAL MODULE: external "lodash"
2021-05-20 14:20:04 +02:00
var external _lodash _ = _ _webpack _require _ _ ( "YLtl" ) ;
2020-01-03 14:17:24 +01:00
// CONCATENATED MODULE: ./node_modules/@wordpress/block-directory/build-module/store/reducer.js
2020-07-07 16:43:35 +02:00
/ * *
* External dependencies
* /
2020-01-03 14:17:24 +01:00
/ * *
* WordPress dependencies
* /
2020-07-07 16:43:35 +02:00
2020-01-03 14:17:24 +01:00
/ * *
* Reducer returning an array of downloadable blocks .
*
* @ param { Object } state Current state .
* @ param { Object } action Dispatched action .
*
* @ return { Object } Updated state .
* /
2021-11-15 13:50:17 +01:00
const downloadableBlocks = function ( ) {
let state = arguments . length > 0 && arguments [ 0 ] !== undefined ? arguments [ 0 ] : { } ;
let action = arguments . length > 1 ? arguments [ 1 ] : undefined ;
2020-01-03 14:17:24 +01:00
switch ( action . type ) {
case 'FETCH_DOWNLOADABLE_BLOCKS' :
2021-05-19 17:09:27 +02:00
return { ... state ,
[ action . filterValue ] : {
isRequesting : true
}
} ;
2020-01-03 14:17:24 +01:00
case 'RECEIVE_DOWNLOADABLE_BLOCKS' :
2021-05-19 17:09:27 +02:00
return { ... state ,
[ action . filterValue ] : {
results : action . downloadableBlocks ,
isRequesting : false
}
} ;
2020-02-06 22:03:31 +01:00
}
2020-01-03 14:17:24 +01:00
2020-02-06 22:03:31 +01:00
return state ;
} ;
/ * *
* Reducer managing the installation and deletion of blocks .
*
* @ param { Object } state Current state .
* @ param { Object } action Dispatched action .
*
* @ return { Object } Updated state .
* /
2021-11-15 13:50:17 +01:00
const blockManagement = function ( ) {
let state = arguments . length > 0 && arguments [ 0 ] !== undefined ? arguments [ 0 ] : {
installedBlockTypes : [ ] ,
isInstalling : { }
} ;
let action = arguments . length > 1 ? arguments [ 1 ] : undefined ;
2020-02-06 22:03:31 +01:00
switch ( action . type ) {
2020-01-03 14:17:24 +01:00
case 'ADD_INSTALLED_BLOCK_TYPE' :
2021-05-19 17:09:27 +02:00
return { ... state ,
installedBlockTypes : [ ... state . installedBlockTypes , action . item ]
} ;
2020-01-03 14:17:24 +01:00
case 'REMOVE_INSTALLED_BLOCK_TYPE' :
2021-05-19 17:09:27 +02:00
return { ... state ,
installedBlockTypes : state . installedBlockTypes . filter ( blockType => blockType . name !== action . item . name )
} ;
2020-06-26 15:33:47 +02:00
case 'SET_INSTALLING_BLOCK' :
2021-05-19 17:09:27 +02:00
return { ... state ,
isInstalling : { ... state . isInstalling ,
[ action . blockId ] : action . isInstalling
}
} ;
2020-01-03 14:17:24 +01:00
}
return state ;
} ;
2020-06-26 15:33:47 +02:00
/ * *
* Reducer returning an object of error notices .
*
* @ param { Object } state Current state .
* @ param { Object } action Dispatched action .
*
* @ return { Object } Updated state .
* /
2021-11-15 13:50:17 +01:00
const errorNotices = function ( ) {
let state = arguments . length > 0 && arguments [ 0 ] !== undefined ? arguments [ 0 ] : { } ;
let action = arguments . length > 1 ? arguments [ 1 ] : undefined ;
2020-06-26 15:33:47 +02:00
switch ( action . type ) {
case 'SET_ERROR_NOTICE' :
2021-05-19 17:09:27 +02:00
return { ... state ,
[ action . blockId ] : {
message : action . message ,
isFatal : action . isFatal
}
} ;
2020-07-07 16:43:35 +02:00
case 'CLEAR_ERROR_NOTICE' :
2021-01-28 03:04:13 +01:00
return Object ( external _lodash _ [ "omit" ] ) ( state , action . blockId ) ;
2020-06-26 15:33:47 +02:00
}
return state ;
} ;
2021-01-28 03:04:13 +01:00
/* harmony default export */ var reducer = ( Object ( external _wp _data _ [ "combineReducers" ] ) ( {
2021-05-19 17:09:27 +02:00
downloadableBlocks ,
blockManagement ,
errorNotices
2020-01-03 14:17:24 +01:00
} ) ) ;
2021-04-15 17:19:43 +02:00
// EXTERNAL MODULE: external ["wp","blockEditor"]
2021-05-20 14:20:04 +02:00
var external _wp _blockEditor _ = _ _webpack _require _ _ ( "axFQ" ) ;
2021-04-15 17:19:43 +02:00
2020-06-26 15:33:47 +02:00
// CONCATENATED MODULE: ./node_modules/@wordpress/block-directory/build-module/store/utils/has-block-type.js
/ * *
* Check if a block list contains a specific block type . Recursively searches
* through ` innerBlocks ` if they exist .
*
2021-11-08 15:29:21 +01:00
* @ param { Object } blockType A block object to search for .
* @ param { Object [ ] } blocks The list of blocks to look through .
2020-06-26 15:33:47 +02:00
*
* @ return { boolean } Whether the blockType is found .
* /
2021-11-15 13:50:17 +01:00
function hasBlockType ( blockType ) {
let blocks = arguments . length > 1 && arguments [ 1 ] !== undefined ? arguments [ 1 ] : [ ] ;
2020-06-26 15:33:47 +02:00
if ( ! blocks . length ) {
return false ;
}
2021-11-15 13:50:17 +01:00
if ( blocks . some ( _ref => {
let {
name
} = _ref ;
return name === blockType . name ;
} ) ) {
2020-06-26 15:33:47 +02:00
return true ;
}
2021-05-19 17:09:27 +02:00
for ( let i = 0 ; i < blocks . length ; i ++ ) {
2020-06-26 15:33:47 +02:00
if ( hasBlockType ( blockType , blocks [ i ] . innerBlocks ) ) {
return true ;
}
}
return false ;
}
2020-01-03 14:17:24 +01:00
// CONCATENATED MODULE: ./node_modules/@wordpress/block-directory/build-module/store/selectors.js
2020-06-26 15:33:47 +02:00
/ * *
* WordPress dependencies
* /
2021-04-15 17:19:43 +02:00
2020-06-26 15:33:47 +02:00
/ * *
* Internal dependencies
* /
2020-01-03 14:17:24 +01:00
/ * *
* Returns true if application is requesting for downloadable blocks .
*
2020-10-13 15:10:30 +02:00
* @ param { Object } state Global application state .
2020-06-26 15:33:47 +02:00
* @ param { string } filterValue Search string .
*
2020-10-13 15:10:30 +02:00
* @ return { boolean } Whether a request is in progress for the blocks list .
2020-01-03 14:17:24 +01:00
* /
2020-06-26 15:33:47 +02:00
2021-01-28 03:04:13 +01:00
function selectors _isRequestingDownloadableBlocks ( state , filterValue ) {
2021-11-08 15:29:21 +01:00
var _state$downloadableBl , _state$downloadableBl2 ;
2020-06-26 15:33:47 +02:00
2021-11-08 15:29:21 +01:00
return ( _state$downloadableBl = ( _state$downloadableBl2 = state . downloadableBlocks [ filterValue ] ) === null || _state$downloadableBl2 === void 0 ? void 0 : _state$downloadableBl2 . isRequesting ) !== null && _state$downloadableBl !== void 0 ? _state$downloadableBl : false ;
2020-01-03 14:17:24 +01:00
}
/ * *
2020-10-13 15:10:30 +02:00
* Returns the available uninstalled blocks .
2020-01-03 14:17:24 +01:00
*
* @ param { Object } state Global application state .
* @ param { string } filterValue Search string .
*
2020-10-13 15:10:30 +02:00
* @ return { Array } Downloadable blocks .
2020-01-03 14:17:24 +01:00
* /
function selectors _getDownloadableBlocks ( state , filterValue ) {
2021-11-08 15:29:21 +01:00
var _state$downloadableBl3 , _state$downloadableBl4 ;
2020-01-03 14:17:24 +01:00
2021-11-08 15:29:21 +01:00
return ( _state$downloadableBl3 = ( _state$downloadableBl4 = state . downloadableBlocks [ filterValue ] ) === null || _state$downloadableBl4 === void 0 ? void 0 : _state$downloadableBl4 . results ) !== null && _state$downloadableBl3 !== void 0 ? _state$downloadableBl3 : [ ] ;
2020-01-03 14:17:24 +01:00
}
/ * *
2020-10-13 15:10:30 +02:00
* Returns the block types that have been installed on the server in this
* session .
2020-01-03 14:17:24 +01:00
*
* @ param { Object } state Global application state .
*
2020-10-13 15:10:30 +02:00
* @ return { Array } Block type items
2020-01-03 14:17:24 +01:00
* /
function getInstalledBlockTypes ( state ) {
2020-02-06 22:03:31 +01:00
return state . blockManagement . installedBlockTypes ;
2020-01-03 14:17:24 +01:00
}
/ * *
2020-06-26 15:33:47 +02:00
* Returns block types that have been installed on the server and used in the
* current post .
*
* @ param { Object } state Global application state .
*
* @ return { Array } Block type items .
2020-01-03 14:17:24 +01:00
* /
2021-05-19 17:09:27 +02:00
const getNewBlockTypes = Object ( external _wp _data _ [ "createRegistrySelector" ] ) ( select => state => {
const usedBlockTree = select ( external _wp _blockEditor _ [ "store" ] ) . getBlocks ( ) ;
const installedBlockTypes = getInstalledBlockTypes ( state ) ;
return installedBlockTypes . filter ( blockType => hasBlockType ( blockType , usedBlockTree ) ) ;
2020-06-26 15:33:47 +02:00
} ) ;
2020-01-03 14:17:24 +01:00
/ * *
2020-06-26 15:33:47 +02:00
* Returns the block types that have been installed on the server but are not
* used in the current post .
*
* @ param { Object } state Global application state .
*
* @ return { Array } Block type items .
2020-01-03 14:17:24 +01:00
* /
2021-05-19 17:09:27 +02:00
const getUnusedBlockTypes = Object ( external _wp _data _ [ "createRegistrySelector" ] ) ( select => state => {
const usedBlockTree = select ( external _wp _blockEditor _ [ "store" ] ) . getBlocks ( ) ;
const installedBlockTypes = getInstalledBlockTypes ( state ) ;
return installedBlockTypes . filter ( blockType => ! hasBlockType ( blockType , usedBlockTree ) ) ;
2020-06-26 15:33:47 +02:00
} ) ;
2020-01-03 14:17:24 +01:00
/ * *
2020-10-13 15:10:30 +02:00
* Returns true if a block plugin install is in progress .
2020-01-03 14:17:24 +01:00
*
2020-10-13 15:10:30 +02:00
* @ param { Object } state Global application state .
2020-06-26 15:33:47 +02:00
* @ param { string } blockId Id of the block .
2020-01-03 14:17:24 +01:00
*
2020-10-13 15:10:30 +02:00
* @ return { boolean } Whether this block is currently being installed .
2020-01-03 14:17:24 +01:00
* /
2021-01-28 03:04:13 +01:00
function selectors _isInstalling ( state , blockId ) {
2020-06-26 15:33:47 +02:00
return state . blockManagement . isInstalling [ blockId ] || false ;
2020-01-03 14:17:24 +01:00
}
/ * *
2020-10-13 15:10:30 +02:00
* Returns all block error notices .
2020-01-03 14:17:24 +01:00
*
2020-06-26 15:33:47 +02:00
* @ param { Object } state Global application state .
2020-01-03 14:17:24 +01:00
*
2020-06-26 15:33:47 +02:00
* @ return { Object } Object with error notices .
2020-01-03 14:17:24 +01:00
* /
2020-06-26 15:33:47 +02:00
function getErrorNotices ( state ) {
return state . errorNotices ;
2020-01-03 14:17:24 +01:00
}
/ * *
2020-06-26 15:33:47 +02:00
* Returns the error notice for a given block .
2020-01-03 14:17:24 +01:00
*
2020-06-26 15:33:47 +02:00
* @ param { Object } state Global application state .
* @ param { string } blockId The ID of the block plugin . eg : my - block
2020-01-03 14:17:24 +01:00
*
2020-06-26 15:33:47 +02:00
* @ return { string | boolean } The error text , or false if no error .
2020-01-03 14:17:24 +01:00
* /
2021-01-28 03:04:13 +01:00
function selectors _getErrorNoticeForBlock ( state , blockId ) {
2020-07-07 16:43:35 +02:00
return state . errorNotices [ blockId ] ;
2020-01-03 14:17:24 +01:00
}
2020-06-26 15:33:47 +02:00
2021-01-28 03:04:13 +01:00
// EXTERNAL MODULE: external ["wp","i18n"]
2021-05-20 14:20:04 +02:00
var external _wp _i18n _ = _ _webpack _require _ _ ( "l3Sj" ) ;
2020-06-26 15:33:47 +02:00
2021-01-28 03:04:13 +01:00
// EXTERNAL MODULE: external ["wp","apiFetch"]
2021-05-20 14:20:04 +02:00
var external _wp _apiFetch _ = _ _webpack _require _ _ ( "ywyh" ) ;
2021-01-28 03:04:13 +01:00
var external _wp _apiFetch _default = /*#__PURE__*/ _ _webpack _require _ _ . n ( external _wp _apiFetch _ ) ;
2020-07-07 16:43:35 +02:00
2021-11-08 15:29:21 +01:00
// EXTERNAL MODULE: external ["wp","notices"]
var external _wp _notices _ = _ _webpack _require _ _ ( "onLe" ) ;
// CONCATENATED MODULE: ./node_modules/@wordpress/block-directory/build-module/store/load-assets.js
2020-07-07 16:43:35 +02:00
/ * *
* WordPress dependencies
* /
2020-01-03 14:17:24 +01:00
/ * *
2020-07-27 22:10:36 +02:00
* Load an asset for a block .
*
* This function returns a Promise that will resolve once the asset is loaded ,
2021-01-28 03:04:13 +01:00
* or in the case of Stylesheets and Inline JavaScript , will resolve immediately .
2020-06-26 15:33:47 +02:00
*
2020-07-27 22:10:36 +02:00
* @ param { HTMLElement } el A HTML Element asset to inject .
2020-01-03 14:17:24 +01:00
*
2020-06-26 15:33:47 +02:00
* @ return { Promise } Promise which will resolve when the asset is loaded .
2020-01-03 14:17:24 +01:00
* /
2020-07-07 16:43:35 +02:00
2021-05-19 17:09:27 +02:00
const loadAsset = el => {
return new Promise ( ( resolve , reject ) => {
2020-07-27 22:10:36 +02:00
/ *
* Reconstruct the passed element , this is required as inserting the Node directly
* won 't always fire the required onload events, even if the asset wasn' t already loaded .
* /
2021-05-19 17:09:27 +02:00
const newNode = document . createElement ( el . nodeName ) ;
[ 'id' , 'rel' , 'src' , 'href' , 'type' ] . forEach ( attr => {
2020-07-27 22:10:36 +02:00
if ( el [ attr ] ) {
newNode [ attr ] = el [ attr ] ;
}
} ) ; // Append inline <script> contents.
2020-01-03 14:17:24 +01:00
2020-07-27 22:10:36 +02:00
if ( el . innerHTML ) {
newNode . appendChild ( document . createTextNode ( el . innerHTML ) ) ;
2020-06-26 15:33:47 +02:00
}
2021-05-19 17:09:27 +02:00
newNode . onload = ( ) => resolve ( true ) ;
2020-01-03 14:17:24 +01:00
2021-05-19 17:09:27 +02:00
newNode . onerror = ( ) => reject ( new Error ( 'Error loading asset.' ) ) ;
2020-06-26 15:33:47 +02:00
2020-07-27 22:10:36 +02:00
document . body . appendChild ( newNode ) ; // Resolve Stylesheets and Inline JavaScript immediately.
2020-01-03 14:17:24 +01:00
2020-07-27 22:10:36 +02:00
if ( 'link' === newNode . nodeName . toLowerCase ( ) || 'script' === newNode . nodeName . toLowerCase ( ) && ! newNode . src ) {
resolve ( ) ;
}
2020-06-26 15:33:47 +02:00
} ) ;
2020-01-03 14:17:24 +01:00
} ;
/ * *
* Load the asset files for a block
* /
2021-11-08 15:29:21 +01:00
async function loadAssets ( ) {
/ *
* Fetch the current URL ( post - new . php , or post . php ? post = 1 & action = edit ) and compare the
* JavaScript and CSS assets loaded between the pages . This imports the required assets
* for the block into the current page while not requiring that we know them up - front .
* In the future this can be improved by reliance upon block . json and / or a script - loader
* dependency API .
* /
const response = await external _wp _apiFetch _default ( ) ( {
url : document . location . href ,
parse : false
} ) ;
const data = await response . text ( ) ;
const doc = new window . DOMParser ( ) . parseFromString ( data , 'text/html' ) ;
const newAssets = Array . from ( doc . querySelectorAll ( 'link[rel="stylesheet"],script' ) ) . filter ( asset => asset . id && ! document . getElementById ( asset . id ) ) ;
/ *
* Load each asset in order , as they may depend upon an earlier loaded script .
* Stylesheets and Inline Scripts will resolve immediately upon insertion .
* /
for ( const newAsset of newAssets ) {
await loadAsset ( newAsset ) ;
2020-01-03 14:17:24 +01:00
}
2021-11-08 15:29:21 +01:00
}
2020-01-03 14:17:24 +01:00
2020-07-07 16:43:35 +02:00
// CONCATENATED MODULE: ./node_modules/@wordpress/block-directory/build-module/store/utils/get-plugin-url.js
/ * *
* Get the plugin ' s direct API link out of a block - directory response .
*
* @ param { Object } block The block object
*
* @ return { string } The plugin URL , if exists .
* /
function getPluginUrl ( block ) {
if ( ! block ) {
return false ;
}
2021-05-19 17:09:27 +02:00
const link = block . links [ 'wp:plugin' ] || block . links . self ;
2020-07-07 16:43:35 +02:00
if ( link && link . length ) {
return link [ 0 ] . href ;
}
return false ;
}
2020-01-03 14:17:24 +01:00
// CONCATENATED MODULE: ./node_modules/@wordpress/block-directory/build-module/store/actions.js
/ * *
* WordPress dependencies
* /
2020-06-26 15:33:47 +02:00
2021-01-28 03:04:13 +01:00
2020-01-03 14:17:24 +01:00
/ * *
* Internal dependencies
* /
2020-07-07 16:43:35 +02:00
2020-01-03 14:17:24 +01:00
/ * *
2020-06-26 15:33:47 +02:00
* Returns an action object used in signalling that the downloadable blocks
2020-10-13 15:10:30 +02:00
* have been requested and are loading .
2020-06-26 15:33:47 +02:00
*
* @ param { string } filterValue Search string .
2020-01-03 14:17:24 +01:00
*
* @ return { Object } Action object .
* /
2020-06-26 15:33:47 +02:00
function fetchDownloadableBlocks ( filterValue ) {
2020-01-03 14:17:24 +01:00
return {
2020-06-26 15:33:47 +02:00
type : 'FETCH_DOWNLOADABLE_BLOCKS' ,
2021-05-19 17:09:27 +02:00
filterValue
2020-01-03 14:17:24 +01:00
} ;
}
/ * *
2020-06-26 15:33:47 +02:00
* Returns an action object used in signalling that the downloadable blocks
* have been updated .
2020-01-03 14:17:24 +01:00
*
2020-06-26 15:33:47 +02:00
* @ param { Array } downloadableBlocks Downloadable blocks .
* @ param { string } filterValue Search string .
2020-01-03 14:17:24 +01:00
*
* @ return { Object } Action object .
* /
function receiveDownloadableBlocks ( downloadableBlocks , filterValue ) {
return {
type : 'RECEIVE_DOWNLOADABLE_BLOCKS' ,
2021-05-19 17:09:27 +02:00
downloadableBlocks ,
filterValue
2020-01-03 14:17:24 +01:00
} ;
}
/ * *
2020-06-26 15:33:47 +02:00
* Action triggered to install a block plugin .
*
* @ param { Object } block The block item returned by search .
2020-01-03 14:17:24 +01:00
*
2020-06-26 15:33:47 +02:00
* @ return { boolean } Whether the block was successfully installed & loaded .
2020-01-03 14:17:24 +01:00
* /
2021-11-15 13:50:17 +01:00
const actions _installBlockType = block => async _ref => {
let {
registry ,
dispatch
} = _ref ;
2021-05-19 17:09:27 +02:00
const {
2021-11-08 15:29:21 +01:00
id
2021-05-19 17:09:27 +02:00
} = block ;
let success = false ;
2021-11-08 15:29:21 +01:00
dispatch . clearErrorNotice ( id ) ;
2021-04-15 17:19:43 +02:00
2021-05-19 17:09:27 +02:00
try {
2021-11-08 15:29:21 +01:00
dispatch . setIsInstalling ( id , true ) ; // If we have a wp:plugin link, the plugin is installed but inactive.
2021-05-19 17:09:27 +02:00
const url = getPluginUrl ( block ) ;
let links = { } ;
if ( url ) {
2021-11-08 15:29:21 +01:00
await external _wp _apiFetch _default ( ) ( {
method : 'PUT' ,
2021-05-19 17:09:27 +02:00
url ,
data : {
status : 'active'
2021-11-08 15:29:21 +01:00
}
2021-05-19 17:09:27 +02:00
} ) ;
} else {
2021-11-08 15:29:21 +01:00
const response = await external _wp _apiFetch _default ( ) ( {
method : 'POST' ,
2021-05-19 17:09:27 +02:00
path : 'wp/v2/plugins' ,
data : {
2021-11-08 15:29:21 +01:00
slug : id ,
2021-05-19 17:09:27 +02:00
status : 'active'
2021-11-08 15:29:21 +01:00
}
2021-05-19 17:09:27 +02:00
} ) ; // Add the `self` link for newly-installed blocks.
links = response . _links ;
}
2020-01-03 14:17:24 +01:00
2021-11-08 15:29:21 +01:00
dispatch . addInstalledBlockType ( { ... block ,
2021-05-19 17:09:27 +02:00
links : { ... block . links ,
... links
}
} ) ;
2021-11-08 15:29:21 +01:00
await loadAssets ( ) ;
const registeredBlocks = registry . select ( external _wp _blocks _ [ "store" ] ) . getBlockTypes ( ) ;
2020-01-03 14:17:24 +01:00
2021-05-19 17:09:27 +02:00
if ( ! registeredBlocks . some ( i => i . name === block . name ) ) {
throw new Error ( Object ( external _wp _i18n _ [ "__" ] ) ( 'Error registering block. Try reloading the page.' ) ) ;
}
2020-07-07 16:43:35 +02:00
2021-11-08 15:29:21 +01:00
registry . dispatch ( external _wp _notices _ [ "store" ] ) . createInfoNotice ( Object ( external _wp _i18n _ [ "sprintf" ] ) ( // translators: %s is the block title.
2021-05-19 17:09:27 +02:00
Object ( external _wp _i18n _ [ "__" ] ) ( 'Block %s installed and added.' ) , block . title ) , {
speak : true ,
type : 'snackbar'
} ) ;
success = true ;
} catch ( error ) {
let message = error . message || Object ( external _wp _i18n _ [ "__" ] ) ( 'An error occurred.' ) ; // Errors we throw are fatal
2020-07-07 16:43:35 +02:00
2021-05-19 17:09:27 +02:00
let isFatal = error instanceof Error ; // Specific API errors that are fatal
2020-07-07 16:43:35 +02:00
2021-05-19 17:09:27 +02:00
const fatalAPIErrors = {
folder _exists : Object ( external _wp _i18n _ [ "__" ] ) ( 'This block is already installed. Try reloading the page.' ) ,
unable _to _connect _to _filesystem : Object ( external _wp _i18n _ [ "__" ] ) ( 'Error installing block. You can reload the page and try again.' )
} ;
2021-04-15 17:19:43 +02:00
2021-05-19 17:09:27 +02:00
if ( fatalAPIErrors [ error . code ] ) {
isFatal = true ;
message = fatalAPIErrors [ error . code ] ;
}
2020-06-26 15:33:47 +02:00
2021-11-08 15:29:21 +01:00
dispatch . setErrorNotice ( id , message , isFatal ) ;
registry . dispatch ( external _wp _notices _ [ "store" ] ) . createErrorNotice ( message , {
2021-05-19 17:09:27 +02:00
speak : true ,
isDismissible : true
} ) ;
}
2020-06-26 15:33:47 +02:00
2021-11-08 15:29:21 +01:00
dispatch . setIsInstalling ( id , false ) ;
2021-05-19 17:09:27 +02:00
return success ;
2021-11-08 15:29:21 +01:00
} ;
2020-01-03 14:17:24 +01:00
/ * *
* Action triggered to uninstall a block plugin .
*
2020-06-26 15:33:47 +02:00
* @ param { Object } block The blockType object .
2020-01-03 14:17:24 +01:00
* /
2021-11-15 13:50:17 +01:00
const actions _uninstallBlockType = block => async _ref2 => {
let {
registry ,
dispatch
} = _ref2 ;
2021-05-19 17:09:27 +02:00
try {
2021-11-08 15:29:21 +01:00
const url = getPluginUrl ( block ) ;
await external _wp _apiFetch _default ( ) ( {
method : 'PUT' ,
url ,
2021-05-19 17:09:27 +02:00
data : {
status : 'inactive'
2021-11-08 15:29:21 +01:00
}
2021-05-19 17:09:27 +02:00
} ) ;
2021-11-08 15:29:21 +01:00
await external _wp _apiFetch _default ( ) ( {
method : 'DELETE' ,
url
2021-05-19 17:09:27 +02:00
} ) ;
2021-11-08 15:29:21 +01:00
dispatch . removeInstalledBlockType ( block ) ;
2021-05-19 17:09:27 +02:00
} catch ( error ) {
2021-11-08 15:29:21 +01:00
registry . dispatch ( external _wp _notices _ [ "store" ] ) . createErrorNotice ( error . message || Object ( external _wp _i18n _ [ "__" ] ) ( 'An error occurred.' ) ) ;
2021-05-19 17:09:27 +02:00
}
2021-11-08 15:29:21 +01:00
} ;
2020-01-03 14:17:24 +01:00
/ * *
2020-10-13 15:10:30 +02:00
* Returns an action object used to add a block type to the "newly installed"
* tracking list .
2020-01-03 14:17:24 +01:00
*
2020-06-26 15:33:47 +02:00
* @ param { Object } item The block item with the block id and name .
2020-01-03 14:17:24 +01:00
*
* @ return { Object } Action object .
* /
function addInstalledBlockType ( item ) {
return {
type : 'ADD_INSTALLED_BLOCK_TYPE' ,
2021-05-19 17:09:27 +02:00
item
2020-01-03 14:17:24 +01:00
} ;
}
/ * *
2020-10-13 15:10:30 +02:00
* Returns an action object used to remove a block type from the "newly installed"
* tracking list .
2020-01-03 14:17:24 +01:00
*
* @ param { string } item The block item with the block id and name .
*
* @ return { Object } Action object .
* /
function removeInstalledBlockType ( item ) {
return {
type : 'REMOVE_INSTALLED_BLOCK_TYPE' ,
2021-05-19 17:09:27 +02:00
item
2020-01-03 14:17:24 +01:00
} ;
}
2020-06-26 15:33:47 +02:00
/ * *
2020-10-13 15:10:30 +02:00
* Returns an action object used to indicate install in progress .
2020-06-26 15:33:47 +02:00
*
2021-11-08 15:29:21 +01:00
* @ param { string } blockId
2020-06-26 15:33:47 +02:00
* @ param { boolean } isInstalling
*
* @ return { Object } Action object .
* /
function setIsInstalling ( blockId , isInstalling ) {
return {
type : 'SET_INSTALLING_BLOCK' ,
2021-05-19 17:09:27 +02:00
blockId ,
isInstalling
2020-06-26 15:33:47 +02:00
} ;
}
/ * *
2020-10-13 15:10:30 +02:00
* Sets an error notice to be displayed to the user for a given block .
2020-06-26 15:33:47 +02:00
*
2021-11-08 15:29:21 +01:00
* @ param { string } blockId The ID of the block plugin . eg : my - block
* @ param { string } message The message shown in the notice .
2020-10-13 15:10:30 +02:00
* @ param { boolean } isFatal Whether the user can recover from the error .
2020-06-26 15:33:47 +02:00
*
* @ return { Object } Action object .
* /
2021-11-15 13:50:17 +01:00
function setErrorNotice ( blockId , message ) {
let isFatal = arguments . length > 2 && arguments [ 2 ] !== undefined ? arguments [ 2 ] : false ;
2020-06-26 15:33:47 +02:00
return {
type : 'SET_ERROR_NOTICE' ,
2021-05-19 17:09:27 +02:00
blockId ,
message ,
isFatal
2020-06-26 15:33:47 +02:00
} ;
}
/ * *
2020-10-13 15:10:30 +02:00
* Sets the error notice to empty for specific block .
2020-06-26 15:33:47 +02:00
*
* @ param { string } blockId The ID of the block plugin . eg : my - block
*
* @ return { Object } Action object .
* /
function clearErrorNotice ( blockId ) {
return {
2020-07-07 16:43:35 +02:00
type : 'CLEAR_ERROR_NOTICE' ,
2021-05-19 17:09:27 +02:00
blockId
2020-06-26 15:33:47 +02:00
} ;
}
2020-01-03 14:17:24 +01:00
// CONCATENATED MODULE: ./node_modules/@wordpress/block-directory/build-module/store/resolvers.js
/ * *
* External dependencies
* /
/ * *
2020-06-26 15:33:47 +02:00
* WordPress dependencies
2020-01-03 14:17:24 +01:00
* /
2020-06-26 15:33:47 +02:00
/ * *
* Internal dependencies
* /
2020-01-03 14:17:24 +01:00
2021-11-15 13:50:17 +01:00
const resolvers _getDownloadableBlocks = filterValue => async _ref => {
let {
dispatch
} = _ref ;
2021-11-08 15:29:21 +01:00
if ( ! filterValue ) {
return ;
2021-05-19 17:09:27 +02:00
}
2020-01-03 14:17:24 +01:00
2021-11-08 15:29:21 +01:00
try {
dispatch ( fetchDownloadableBlocks ( filterValue ) ) ;
const results = await external _wp _apiFetch _default ( ) ( {
path : ` wp/v2/block-directory/search?term= ${ filterValue } `
} ) ;
const blocks = results . map ( result => Object ( external _lodash _ [ "mapKeys" ] ) ( result , ( value , key ) => Object ( external _lodash _ [ "camelCase" ] ) ( key ) ) ) ;
dispatch ( receiveDownloadableBlocks ( blocks , filterValue ) ) ;
} catch { }
} ;
2020-01-03 14:17:24 +01:00
// CONCATENATED MODULE: ./node_modules/@wordpress/block-directory/build-module/store/index.js
/ * *
* WordPress dependencies
* /
/ * *
* Internal dependencies
* /
/ * *
* Module Constants
* /
2021-05-19 17:09:27 +02:00
const STORE _NAME = 'core/block-directory' ;
2020-01-03 14:17:24 +01:00
/ * *
* Block editor data store configuration .
*
2021-02-02 06:17:13 +01:00
* @ see https : //github.com/WordPress/gutenberg/blob/HEAD/packages/data/README.md#registerStore
2020-01-03 14:17:24 +01:00
*
* @ type { Object }
* /
2021-05-19 17:09:27 +02:00
const storeConfig = {
2020-01-03 14:17:24 +01:00
reducer : reducer ,
selectors : selectors _namespaceObject ,
actions : actions _namespaceObject ,
2021-11-08 15:29:21 +01:00
resolvers : resolvers _namespaceObject ,
_ _experimentalUseThunks : true
2020-01-03 14:17:24 +01:00
} ;
2021-01-28 03:04:13 +01:00
/ * *
* Store definition for the block directory namespace .
*
2021-02-02 06:17:13 +01:00
* @ see https : //github.com/WordPress/gutenberg/blob/HEAD/packages/data/README.md#createReduxStore
2021-01-28 03:04:13 +01:00
*
* @ type { Object }
* /
2020-06-26 15:33:47 +02:00
2021-05-19 17:09:27 +02:00
const store = Object ( external _wp _data _ [ "createReduxStore" ] ) ( STORE _NAME , storeConfig ) ;
2021-01-28 03:04:13 +01:00
Object ( external _wp _data _ [ "register" ] ) ( store ) ;
2020-06-26 15:33:47 +02:00
// CONCATENATED MODULE: ./node_modules/@wordpress/block-directory/build-module/components/auto-block-uninstaller/index.js
/ * *
* WordPress dependencies
* /
2021-04-15 17:19:43 +02:00
2021-01-28 03:04:13 +01:00
/ * *
* Internal dependencies
* /
2020-06-26 15:33:47 +02:00
function AutoBlockUninstaller ( ) {
2021-05-19 17:09:27 +02:00
const {
uninstallBlockType
} = Object ( external _wp _data _ [ "useDispatch" ] ) ( store ) ;
const shouldRemoveBlockTypes = Object ( external _wp _data _ [ "useSelect" ] ) ( select => {
const {
isAutosavingPost ,
isSavingPost
} = select ( external _wp _editor _ [ "store" ] ) ;
2020-06-26 15:33:47 +02:00
return isSavingPost ( ) && ! isAutosavingPost ( ) ;
2020-07-07 16:43:35 +02:00
} , [ ] ) ;
2021-05-19 17:09:27 +02:00
const unusedBlockTypes = Object ( external _wp _data _ [ "useSelect" ] ) ( select => select ( store ) . getUnusedBlockTypes ( ) , [ ] ) ;
Object ( external _wp _element _ [ "useEffect" ] ) ( ( ) => {
2020-06-26 15:33:47 +02:00
if ( shouldRemoveBlockTypes && unusedBlockTypes . length ) {
2021-05-19 17:09:27 +02:00
unusedBlockTypes . forEach ( blockType => {
2020-06-26 15:33:47 +02:00
uninstallBlockType ( blockType ) ;
2021-01-28 03:04:13 +01:00
Object ( external _wp _blocks _ [ "unregisterBlockType" ] ) ( blockType . name ) ;
2020-06-26 15:33:47 +02:00
} ) ;
}
} , [ shouldRemoveBlockTypes ] ) ;
return null ;
}
2020-01-08 12:57:23 +01:00
2021-01-28 03:04:13 +01:00
// EXTERNAL MODULE: external ["wp","components"]
2021-05-20 14:20:04 +02:00
var external _wp _components _ = _ _webpack _require _ _ ( "tI+e" ) ;
2020-01-03 14:17:24 +01:00
2021-04-15 17:19:43 +02:00
// EXTERNAL MODULE: external ["wp","compose"]
2021-05-20 14:20:04 +02:00
var external _wp _compose _ = _ _webpack _require _ _ ( "K9lf" ) ;
2020-06-26 15:33:47 +02:00
2021-04-15 17:19:43 +02:00
// EXTERNAL MODULE: external ["wp","coreData"]
2021-05-20 14:20:04 +02:00
var external _wp _coreData _ = _ _webpack _require _ _ ( "jZUy" ) ;
2020-06-26 15:33:47 +02:00
2021-04-15 17:19:43 +02:00
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/extends.js
2021-05-20 14:20:04 +02:00
var esm _extends = _ _webpack _require _ _ ( "wx14" ) ;
2020-06-26 15:33:47 +02:00
2021-01-28 03:04:13 +01:00
// EXTERNAL MODULE: external ["wp","htmlEntities"]
2021-05-20 14:20:04 +02:00
var external _wp _htmlEntities _ = _ _webpack _require _ _ ( "rmEH" ) ;
2020-10-13 15:10:30 +02:00
2020-06-26 15:33:47 +02:00
// EXTERNAL MODULE: ./node_modules/@wordpress/icons/build-module/icon/index.js
2021-05-20 14:20:04 +02:00
var build _module _icon = _ _webpack _require _ _ ( "iClF" ) ;
2020-06-26 15:33:47 +02:00
// EXTERNAL MODULE: ./node_modules/@wordpress/icons/build-module/library/star-filled.js
2021-05-20 14:20:04 +02:00
var star _filled = _ _webpack _require _ _ ( "URob" ) ;
2020-06-26 15:33:47 +02:00
2021-05-21 12:14:23 +02:00
// EXTERNAL MODULE: external ["wp","primitives"]
var external _wp _primitives _ = _ _webpack _require _ _ ( "Tqx9" ) ;
// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/star-half.js
/ * *
* WordPress dependencies
* /
const starHalf = Object ( external _wp _element _ [ "createElement" ] ) ( external _wp _primitives _ [ "SVG" ] , {
xmlns : "http://www.w3.org/2000/svg" ,
viewBox : "0 0 24 24"
} , Object ( external _wp _element _ [ "createElement" ] ) ( external _wp _primitives _ [ "Path" ] , {
d : "M9.518 8.783a.25.25 0 00.188-.137l2.069-4.192a.25.25 0 01.448 0l2.07 4.192a.25.25 0 00.187.137l4.626.672a.25.25 0 01.139.427l-3.347 3.262a.25.25 0 00-.072.222l.79 4.607a.25.25 0 01-.363.264l-4.137-2.176a.25.25 0 00-.233 0l-4.138 2.175a.25.25 0 01-.362-.263l.79-4.607a.25.25 0 00-.072-.222L4.753 9.882a.25.25 0 01.14-.427l4.625-.672zM12 14.533c.28 0 .559.067.814.2l1.895.997-.362-2.11a1.75 1.75 0 01.504-1.55l1.533-1.495-2.12-.308a1.75 1.75 0 01-1.317-.957L12 7.39v7.143z"
} ) ) ;
/* harmony default export */ var star _half = ( starHalf ) ;
2020-06-26 15:33:47 +02:00
// EXTERNAL MODULE: ./node_modules/@wordpress/icons/build-module/library/star-empty.js
2021-05-20 14:20:04 +02:00
var star _empty = _ _webpack _require _ _ ( "Xxwi" ) ;
2020-06-26 15:33:47 +02:00
2020-01-03 14:17:24 +01:00
// CONCATENATED MODULE: ./node_modules/@wordpress/block-directory/build-module/components/block-ratings/stars.js
/ * *
* External dependencies
* /
/ * *
* WordPress dependencies
* /
2021-11-15 13:50:17 +01:00
function Stars ( _ref ) {
let {
rating
} = _ref ;
2021-05-19 17:09:27 +02:00
const stars = Math . round ( rating / 0.5 ) * 0.5 ;
const fullStarCount = Math . floor ( rating ) ;
const halfStarCount = Math . ceil ( rating - fullStarCount ) ;
const emptyStarCount = 5 - ( fullStarCount + halfStarCount ) ;
2021-04-15 17:19:43 +02:00
return Object ( external _wp _element _ [ "createElement" ] ) ( "span" , {
2021-01-28 03:04:13 +01:00
"aria-label" : Object ( external _wp _i18n _ [ "sprintf" ] ) (
2020-06-26 15:33:47 +02:00
/* translators: %s: number of stars. */
2021-01-28 03:04:13 +01:00
Object ( external _wp _i18n _ [ "__" ] ) ( '%s out of 5 stars' ) , stars )
2021-05-19 17:09:27 +02:00
} , Object ( external _lodash _ [ "times" ] ) ( fullStarCount , i => Object ( external _wp _element _ [ "createElement" ] ) ( build _module _icon [ "a" /* default */ ] , {
key : ` full_stars_ ${ i } ` ,
className : "block-directory-block-ratings__star-full" ,
icon : star _filled [ "a" /* default */ ] ,
size : 16
} ) ) , Object ( external _lodash _ [ "times" ] ) ( halfStarCount , i => Object ( external _wp _element _ [ "createElement" ] ) ( build _module _icon [ "a" /* default */ ] , {
key : ` half_stars_ ${ i } ` ,
className : "block-directory-block-ratings__star-half-full" ,
2021-05-21 12:14:23 +02:00
icon : star _half ,
2021-05-19 17:09:27 +02:00
size : 16
} ) ) , Object ( external _lodash _ [ "times" ] ) ( emptyStarCount , i => Object ( external _wp _element _ [ "createElement" ] ) ( build _module _icon [ "a" /* default */ ] , {
key : ` empty_stars_ ${ i } ` ,
className : "block-directory-block-ratings__star-empty" ,
icon : star _empty [ "a" /* default */ ] ,
size : 16
} ) ) ) ;
2020-01-03 14:17:24 +01:00
}
/* harmony default export */ var block _ratings _stars = ( Stars ) ;
// CONCATENATED MODULE: ./node_modules/@wordpress/block-directory/build-module/components/block-ratings/index.js
/ * *
* Internal dependencies
* /
2021-11-15 13:50:17 +01:00
const BlockRatings = _ref => {
let {
rating
} = _ref ;
return Object ( external _wp _element _ [ "createElement" ] ) ( "span" , {
className : "block-directory-block-ratings"
} , Object ( external _wp _element _ [ "createElement" ] ) ( block _ratings _stars , {
rating : rating
} ) ) ;
} ;
2021-05-19 17:09:27 +02:00
/* harmony default export */ var block _ratings = ( BlockRatings ) ;
2020-01-03 14:17:24 +01:00
2020-06-26 15:33:47 +02:00
// CONCATENATED MODULE: ./node_modules/@wordpress/block-directory/build-module/components/downloadable-block-icon/index.js
/ * *
* WordPress dependencies
* /
2021-11-15 13:50:17 +01:00
function DownloadableBlockIcon ( _ref ) {
let {
icon
} = _ref ;
2021-05-19 17:09:27 +02:00
const className = 'block-directory-downloadable-block-icon' ;
2021-04-15 17:19:43 +02:00
return icon . match ( /\.(jpeg|jpg|gif|png|svg)(?:\?.*)?$/ ) !== null ? Object ( external _wp _element _ [ "createElement" ] ) ( "img" , {
className : className ,
2020-06-26 15:33:47 +02:00
src : icon ,
2021-04-15 17:19:43 +02:00
alt : ""
2021-01-28 03:04:13 +01:00
} ) : Object ( external _wp _element _ [ "createElement" ] ) ( external _wp _blockEditor _ [ "BlockIcon" ] , {
2021-04-15 17:19:43 +02:00
className : className ,
2020-06-26 15:33:47 +02:00
icon : icon ,
showColors : true
2021-04-15 17:19:43 +02:00
} ) ;
2020-06-26 15:33:47 +02:00
}
/* harmony default export */ var downloadable _block _icon = ( DownloadableBlockIcon ) ;
2021-04-15 17:19:43 +02:00
// CONCATENATED MODULE: ./node_modules/@wordpress/block-directory/build-module/components/downloadable-block-notice/index.js
2020-01-03 14:17:24 +01:00
/ * *
* WordPress dependencies
* /
/ * *
* Internal dependencies
* /
2021-11-15 13:50:17 +01:00
const DownloadableBlockNotice = _ref => {
let {
block
} = _ref ;
2021-05-19 17:09:27 +02:00
const errorNotice = Object ( external _wp _data _ [ "useSelect" ] ) ( select => select ( store ) . getErrorNoticeForBlock ( block . id ) , [ block ] ) ;
2020-01-03 14:17:24 +01:00
2021-04-15 17:19:43 +02:00
if ( ! errorNotice ) {
return null ;
}
2020-01-03 14:17:24 +01:00
2021-01-28 03:04:13 +01:00
return Object ( external _wp _element _ [ "createElement" ] ) ( "div" , {
2021-04-15 17:19:43 +02:00
className : "block-directory-downloadable-block-notice"
} , Object ( external _wp _element _ [ "createElement" ] ) ( "div" , {
className : "block-directory-downloadable-block-notice__content"
} , errorNotice . message , errorNotice . isFatal ? ' ' + Object ( external _wp _i18n _ [ "__" ] ) ( 'Try reloading the page.' ) : null ) ) ;
} ;
2021-05-19 17:09:27 +02:00
/* harmony default export */ var downloadable _block _notice = ( DownloadableBlockNotice ) ;
2020-01-03 14:17:24 +01:00
2021-04-15 17:19:43 +02:00
// CONCATENATED MODULE: ./node_modules/@wordpress/block-directory/build-module/components/downloadable-block-list-item/index.js
2020-01-03 14:17:24 +01:00
/ * *
* WordPress dependencies
* /
2020-02-10 23:33:27 +01:00
2020-01-03 14:17:24 +01:00
/ * *
2021-04-15 17:19:43 +02:00
* Internal dependencies
2020-01-03 14:17:24 +01:00
* /
2021-04-15 17:19:43 +02:00
// Return the appropriate block item label, given the block data and status.
2020-10-13 15:10:30 +02:00
2021-11-15 13:50:17 +01:00
function getDownloadableBlockLabel ( _ref , _ref2 ) {
let {
title ,
rating ,
ratingCount
} = _ref ;
let {
hasNotice ,
isInstalled ,
isInstalling
} = _ref2 ;
2021-05-19 17:09:27 +02:00
const stars = Math . round ( rating / 0.5 ) * 0.5 ;
2020-10-13 15:10:30 +02:00
2021-04-15 17:19:43 +02:00
if ( ! isInstalled && hasNotice ) {
/* translators: %1$s: block title */
return Object ( external _wp _i18n _ [ "sprintf" ] ) ( 'Retry installing %s.' , Object ( external _wp _htmlEntities _ [ "decodeEntities" ] ) ( title ) ) ;
2020-10-13 15:10:30 +02:00
}
2021-04-15 17:19:43 +02:00
if ( isInstalled ) {
/* translators: %1$s: block title */
return Object ( external _wp _i18n _ [ "sprintf" ] ) ( 'Add %s.' , Object ( external _wp _htmlEntities _ [ "decodeEntities" ] ) ( title ) ) ;
2020-06-26 15:33:47 +02:00
}
2021-04-15 17:19:43 +02:00
if ( isInstalling ) {
/* translators: %1$s: block title */
return Object ( external _wp _i18n _ [ "sprintf" ] ) ( 'Installing %s.' , Object ( external _wp _htmlEntities _ [ "decodeEntities" ] ) ( title ) ) ;
} // No ratings yet, just use the title.
2020-01-03 14:17:24 +01:00
2021-04-15 17:19:43 +02:00
if ( ratingCount < 1 ) {
/* translators: %1$s: block title */
return Object ( external _wp _i18n _ [ "sprintf" ] ) ( 'Install %s.' , Object ( external _wp _htmlEntities _ [ "decodeEntities" ] ) ( title ) ) ;
}
2020-01-03 14:17:24 +01:00
2021-04-15 17:19:43 +02:00
return Object ( external _wp _i18n _ [ "sprintf" ] ) (
/* translators: %1$s: block title, %2$s: average rating, %3$s: total ratings count. */
Object ( external _wp _i18n _ [ "_n" ] ) ( 'Install %1$s. %2$s stars with %3$s review.' , 'Install %1$s. %2$s stars with %3$s reviews.' , ratingCount ) , Object ( external _wp _htmlEntities _ [ "decodeEntities" ] ) ( title ) , stars , ratingCount ) ;
}
2020-06-26 15:33:47 +02:00
2021-11-15 13:50:17 +01:00
function DownloadableBlockListItem ( _ref3 ) {
let {
composite ,
item ,
onClick
} = _ref3 ;
2021-05-19 17:09:27 +02:00
const {
author ,
description ,
icon ,
rating ,
title
} = item ; // getBlockType returns a block object if this block exists, or null if not.
const isInstalled = ! ! Object ( external _wp _blocks _ [ "getBlockType" ] ) ( item . name ) ;
const {
hasNotice ,
isInstalling ,
isInstallable
} = Object ( external _wp _data _ [ "useSelect" ] ) ( select => {
const {
getErrorNoticeForBlock ,
isInstalling : isBlockInstalling
} = select ( store ) ;
const notice = getErrorNoticeForBlock ( item . id ) ;
const hasFatal = notice && notice . isFatal ;
2020-07-07 16:43:35 +02:00
return {
2021-04-15 17:19:43 +02:00
hasNotice : ! ! notice ,
isInstalling : isBlockInstalling ( item . id ) ,
2020-07-07 16:43:35 +02:00
isInstallable : ! hasFatal
} ;
2021-05-19 17:09:27 +02:00
} , [ item ] ) ;
let statusText = '' ;
2021-04-15 17:19:43 +02:00
if ( isInstalled ) {
statusText = Object ( external _wp _i18n _ [ "__" ] ) ( 'Installed!' ) ;
} else if ( isInstalling ) {
statusText = Object ( external _wp _i18n _ [ "__" ] ) ( 'Installing…' ) ;
}
return Object ( external _wp _element _ [ "createElement" ] ) ( external _wp _components _ [ "__unstableCompositeItem" ] , Object ( esm _extends [ "a" /* default */ ] ) ( {
role : "option" ,
as : external _wp _components _ [ "Button" ]
} , composite , {
className : "block-directory-downloadable-block-list-item" ,
2021-05-19 17:09:27 +02:00
onClick : event => {
2021-04-15 17:19:43 +02:00
event . preventDefault ( ) ;
2021-05-19 17:09:27 +02:00
onClick ( ) ;
2021-04-15 17:19:43 +02:00
} ,
isBusy : isInstalling ,
disabled : isInstalling || ! isInstallable ,
label : getDownloadableBlockLabel ( item , {
2021-05-19 17:09:27 +02:00
hasNotice ,
isInstalled ,
isInstalling
2021-04-15 17:19:43 +02:00
} ) ,
showTooltip : true ,
tooltipPosition : "top center"
} ) , Object ( external _wp _element _ [ "createElement" ] ) ( "div" , {
className : "block-directory-downloadable-block-list-item__icon"
} , Object ( external _wp _element _ [ "createElement" ] ) ( downloadable _block _icon , {
2020-01-03 14:17:24 +01:00
icon : icon ,
2021-04-15 17:19:43 +02:00
title : title
} ) , isInstalling ? Object ( external _wp _element _ [ "createElement" ] ) ( "span" , {
className : "block-directory-downloadable-block-list-item__spinner"
} , Object ( external _wp _element _ [ "createElement" ] ) ( external _wp _components _ [ "Spinner" ] , null ) ) : Object ( external _wp _element _ [ "createElement" ] ) ( block _ratings , {
rating : rating
} ) ) , Object ( external _wp _element _ [ "createElement" ] ) ( "span" , {
className : "block-directory-downloadable-block-list-item__details"
} , Object ( external _wp _element _ [ "createElement" ] ) ( "span" , {
className : "block-directory-downloadable-block-list-item__title"
} , Object ( external _wp _element _ [ "createInterpolateElement" ] ) ( Object ( external _wp _i18n _ [ "sprintf" ] ) (
/* translators: %1$s: block title, %2$s: author name. */
Object ( external _wp _i18n _ [ "__" ] ) ( '%1$s <span>by %2$s</span>' ) , Object ( external _wp _htmlEntities _ [ "decodeEntities" ] ) ( title ) , author ) , {
span : Object ( external _wp _element _ [ "createElement" ] ) ( "span" , {
className : "block-directory-downloadable-block-list-item__author"
} )
} ) ) , hasNotice ? Object ( external _wp _element _ [ "createElement" ] ) ( downloadable _block _notice , {
2020-06-26 15:33:47 +02:00
block : item
2021-04-15 17:19:43 +02:00
} ) : Object ( external _wp _element _ [ "createElement" ] ) ( external _wp _element _ [ "Fragment" ] , null , Object ( external _wp _element _ [ "createElement" ] ) ( "span" , {
className : "block-directory-downloadable-block-list-item__desc"
} , ! ! statusText ? statusText : Object ( external _wp _htmlEntities _ [ "decodeEntities" ] ) ( description ) ) , isInstallable && ! ( isInstalled || isInstalling ) && Object ( external _wp _element _ [ "createElement" ] ) ( external _wp _components _ [ "VisuallyHidden" ] , null , Object ( external _wp _i18n _ [ "__" ] ) ( 'Install block' ) ) ) ) ) ;
2020-01-03 14:17:24 +01:00
}
2021-04-15 17:19:43 +02:00
/* harmony default export */ var downloadable _block _list _item = ( DownloadableBlockListItem ) ;
2020-01-03 14:17:24 +01:00
// CONCATENATED MODULE: ./node_modules/@wordpress/block-directory/build-module/components/downloadable-blocks-list/index.js
2021-04-15 17:19:43 +02:00
2020-01-03 14:17:24 +01:00
/ * *
* External dependencies
* /
/ * *
* WordPress dependencies
* /
2021-01-28 03:04:13 +01:00
2021-04-15 17:19:43 +02:00
2020-01-03 14:17:24 +01:00
/ * *
* Internal dependencies
* /
2021-01-28 03:04:13 +01:00
2021-11-15 13:50:17 +01:00
function DownloadableBlocksList ( _ref ) {
let {
items ,
onHover = external _lodash _ [ "noop" ] ,
onSelect
} = _ref ;
2021-05-19 17:09:27 +02:00
const composite = Object ( external _wp _components _ [ "__unstableUseCompositeState" ] ) ( ) ;
const {
installBlockType
} = Object ( external _wp _data _ [ "useDispatch" ] ) ( store ) ;
2020-06-26 15:33:47 +02:00
if ( ! items . length ) {
return null ;
}
2021-04-15 17:19:43 +02:00
return Object ( external _wp _element _ [ "createElement" ] ) ( external _wp _components _ [ "__unstableComposite" ] , Object ( esm _extends [ "a" /* default */ ] ) ( { } , composite , {
role : "listbox" ,
className : "block-directory-downloadable-blocks-list" ,
"aria-label" : Object ( external _wp _i18n _ [ "__" ] ) ( 'Blocks available for install' )
2021-05-19 17:09:27 +02:00
} ) , items . map ( item => {
2021-04-15 17:19:43 +02:00
return Object ( external _wp _element _ [ "createElement" ] ) ( downloadable _block _list _item , {
key : item . id ,
composite : composite ,
2021-05-19 17:09:27 +02:00
onClick : ( ) => {
2021-04-15 17:19:43 +02:00
// Check if the block is registered (`getBlockType`
// will return an object). If so, insert the block.
// This prevents installing existing plugins.
if ( Object ( external _wp _blocks _ [ "getBlockType" ] ) ( item . name ) ) {
onSelect ( item ) ;
} else {
2021-05-19 17:09:27 +02:00
installBlockType ( item ) . then ( success => {
2021-04-15 17:19:43 +02:00
if ( success ) {
onSelect ( item ) ;
}
} ) ;
}
2020-01-03 14:17:24 +01:00
2021-04-15 17:19:43 +02:00
onHover ( null ) ;
} ,
onHover : onHover ,
item : item
} ) ;
} ) ) ;
}
2021-02-02 06:17:13 +01:00
2021-04-15 17:19:43 +02:00
/* harmony default export */ var downloadable _blocks _list = ( DownloadableBlocksList ) ;
// EXTERNAL MODULE: external ["wp","a11y"]
2021-05-20 14:20:04 +02:00
var external _wp _a11y _ = _ _webpack _require _ _ ( "gdqT" ) ;
2021-04-15 17:19:43 +02:00
// CONCATENATED MODULE: ./node_modules/@wordpress/block-directory/build-module/components/downloadable-blocks-panel/inserter-panel.js
/ * *
* WordPress dependencies
* /
2020-01-03 14:17:24 +01:00
2021-04-15 17:19:43 +02:00
2021-11-15 13:50:17 +01:00
function DownloadableBlocksInserterPanel ( _ref ) {
let {
children ,
downloadableItems ,
hasLocalBlocks
} = _ref ;
2021-05-19 17:09:27 +02:00
const count = downloadableItems . length ;
Object ( external _wp _element _ [ "useEffect" ] ) ( ( ) => {
2021-04-15 17:19:43 +02:00
Object ( external _wp _a11y _ [ "speak" ] ) ( Object ( external _wp _i18n _ [ "sprintf" ] ) (
/* translators: %d: number of available blocks. */
Object ( external _wp _i18n _ [ "_n" ] ) ( '%d additional block is available to install.' , '%d additional blocks are available to install.' , count ) , count ) ) ;
} , [ count ] ) ;
return Object ( external _wp _element _ [ "createElement" ] ) ( external _wp _element _ [ "Fragment" ] , null , ! hasLocalBlocks && Object ( external _wp _element _ [ "createElement" ] ) ( "p" , {
className : "block-directory-downloadable-blocks-panel__no-local"
} , Object ( external _wp _i18n _ [ "__" ] ) ( 'No results available from your installed blocks.' ) ) , Object ( external _wp _element _ [ "createElement" ] ) ( "div" , {
className : "block-editor-inserter__quick-inserter-separator"
} ) , Object ( external _wp _element _ [ "createElement" ] ) ( "div" , {
className : "block-directory-downloadable-blocks-panel"
} , Object ( external _wp _element _ [ "createElement" ] ) ( "div" , {
className : "block-directory-downloadable-blocks-panel__header"
} , Object ( external _wp _element _ [ "createElement" ] ) ( "h2" , {
className : "block-directory-downloadable-blocks-panel__title"
} , Object ( external _wp _i18n _ [ "__" ] ) ( 'Available to install' ) ) , Object ( external _wp _element _ [ "createElement" ] ) ( "p" , {
className : "block-directory-downloadable-blocks-panel__description"
} , Object ( external _wp _i18n _ [ "__" ] ) ( 'Select a block to install and add it to your post.' ) ) ) , children ) ) ;
2020-01-03 14:17:24 +01:00
}
2021-04-15 17:19:43 +02:00
/* harmony default export */ var inserter _panel = ( DownloadableBlocksInserterPanel ) ;
2020-01-03 14:17:24 +01:00
2021-04-15 17:19:43 +02:00
// EXTERNAL MODULE: ./node_modules/@wordpress/icons/build-module/library/block-default.js
2021-05-20 14:20:04 +02:00
var block _default = _ _webpack _require _ _ ( "//Lo" ) ;
2021-04-15 17:19:43 +02:00
// CONCATENATED MODULE: ./node_modules/@wordpress/block-directory/build-module/components/downloadable-blocks-panel/no-results.js
2020-01-03 14:17:24 +01:00
/ * *
* WordPress dependencies
* /
2021-04-15 17:19:43 +02:00
function DownloadableBlocksNoResults ( ) {
return Object ( external _wp _element _ [ "createElement" ] ) ( "div" , {
className : "block-editor-inserter__no-results"
} , Object ( external _wp _element _ [ "createElement" ] ) ( build _module _icon [ "a" /* default */ ] , {
className : "block-editor-inserter__no-results-icon" ,
icon : block _default [ "a" /* default */ ]
} ) , Object ( external _wp _element _ [ "createElement" ] ) ( "p" , null , Object ( external _wp _i18n _ [ "__" ] ) ( 'No results found.' ) ) ) ;
}
/* harmony default export */ var no _results = ( DownloadableBlocksNoResults ) ;
// CONCATENATED MODULE: ./node_modules/@wordpress/block-directory/build-module/components/downloadable-blocks-panel/index.js
/ * *
* WordPress dependencies
* /
2020-01-03 14:17:24 +01:00
2020-10-20 15:36:16 +02:00
2021-02-02 06:17:13 +01:00
2020-01-03 14:17:24 +01:00
/ * *
* Internal dependencies
* /
2021-01-28 03:04:13 +01:00
2021-04-15 17:19:43 +02:00
2021-11-15 13:50:17 +01:00
function DownloadableBlocksPanel ( _ref ) {
let {
downloadableItems ,
onSelect ,
onHover ,
hasLocalBlocks ,
hasPermission ,
isLoading ,
isTyping
} = _ref ;
2021-04-15 17:19:43 +02:00
if ( typeof hasPermission === 'undefined' || isLoading || isTyping ) {
return Object ( external _wp _element _ [ "createElement" ] ) ( external _wp _element _ [ "Fragment" ] , null , hasPermission && ! hasLocalBlocks && Object ( external _wp _element _ [ "createElement" ] ) ( external _wp _element _ [ "Fragment" ] , null , Object ( external _wp _element _ [ "createElement" ] ) ( "p" , {
className : "block-directory-downloadable-blocks-panel__no-local"
} , Object ( external _wp _i18n _ [ "__" ] ) ( 'No results available from your installed blocks.' ) ) , Object ( external _wp _element _ [ "createElement" ] ) ( "div" , {
className : "block-editor-inserter__quick-inserter-separator"
} ) ) , Object ( external _wp _element _ [ "createElement" ] ) ( "div" , {
className : "block-directory-downloadable-blocks-panel has-blocks-loading"
} , Object ( external _wp _element _ [ "createElement" ] ) ( external _wp _components _ [ "Spinner" ] , null ) ) ) ;
2020-01-03 14:17:24 +01:00
}
2021-04-15 17:19:43 +02:00
if ( false === hasPermission ) {
if ( ! hasLocalBlocks ) {
return Object ( external _wp _element _ [ "createElement" ] ) ( no _results , null ) ;
}
2020-01-03 14:17:24 +01:00
2021-04-15 17:19:43 +02:00
return null ;
2020-01-03 14:17:24 +01:00
}
2021-04-15 17:19:43 +02:00
return ! ! downloadableItems . length ? Object ( external _wp _element _ [ "createElement" ] ) ( inserter _panel , {
downloadableItems : downloadableItems ,
hasLocalBlocks : hasLocalBlocks
} , Object ( external _wp _element _ [ "createElement" ] ) ( downloadable _blocks _list , {
2020-01-03 14:17:24 +01:00
items : downloadableItems ,
onSelect : onSelect ,
onHover : onHover
2021-04-15 17:19:43 +02:00
} ) ) : ! hasLocalBlocks && Object ( external _wp _element _ [ "createElement" ] ) ( no _results , null ) ;
2020-01-03 14:17:24 +01:00
}
2021-11-15 13:50:17 +01:00
/* harmony default export */ var downloadable _blocks _panel = ( Object ( external _wp _compose _ [ "compose" ] ) ( [ Object ( external _wp _data _ [ "withSelect" ] ) ( ( select , _ref2 ) => {
let {
filterValue ,
rootClientId = null
} = _ref2 ;
2021-05-19 17:09:27 +02:00
const {
getDownloadableBlocks ,
isRequestingDownloadableBlocks
} = select ( store ) ;
const {
canInsertBlockType
} = select ( external _wp _blockEditor _ [ "store" ] ) ;
const hasPermission = select ( external _wp _coreData _ [ "store" ] ) . canUser ( 'read' , 'block-directory/search' ) ;
2021-02-02 06:17:13 +01:00
function getInstallableBlocks ( term ) {
2021-05-19 17:09:27 +02:00
return getDownloadableBlocks ( term ) . filter ( block => canInsertBlockType ( block , rootClientId , true ) ) ;
2021-02-02 06:17:13 +01:00
}
2021-05-19 17:09:27 +02:00
const downloadableItems = hasPermission ? getInstallableBlocks ( filterValue ) : [ ] ;
const isLoading = isRequestingDownloadableBlocks ( filterValue ) ;
2020-01-03 14:17:24 +01:00
return {
2021-05-19 17:09:27 +02:00
downloadableItems ,
hasPermission ,
isLoading
2020-01-03 14:17:24 +01:00
} ;
} ) ] ) ( DownloadableBlocksPanel ) ) ;
2020-01-08 12:57:23 +01:00
// CONCATENATED MODULE: ./node_modules/@wordpress/block-directory/build-module/plugins/inserter-menu-downloadable-blocks-panel/index.js
/ * *
* External dependencies
* /
/ * *
* WordPress dependencies
* /
/ * *
* Internal dependencies
* /
function InserterMenuDownloadableBlocksPanel ( ) {
2021-05-19 17:09:27 +02:00
const [ debouncedFilterValue , setFilterValue ] = Object ( external _wp _element _ [ "useState" ] ) ( '' ) ;
const debouncedSetFilterValue = Object ( external _lodash _ [ "debounce" ] ) ( setFilterValue , 400 ) ;
2021-11-15 13:50:17 +01:00
return Object ( external _wp _element _ [ "createElement" ] ) ( external _wp _blockEditor _ [ "__unstableInserterMenuExtension" ] , null , _ref => {
let {
onSelect ,
onHover ,
filterValue ,
hasItems ,
rootClientId
} = _ref ;
2020-01-08 12:57:23 +01:00
if ( debouncedFilterValue !== filterValue ) {
debouncedSetFilterValue ( filterValue ) ;
}
2021-04-15 17:19:43 +02:00
if ( ! debouncedFilterValue ) {
return null ;
}
2021-01-28 03:04:13 +01:00
return Object ( external _wp _element _ [ "createElement" ] ) ( downloadable _blocks _panel , {
2020-01-08 12:57:23 +01:00
onSelect : onSelect ,
onHover : onHover ,
2021-02-02 06:17:13 +01:00
rootClientId : rootClientId ,
2020-01-08 12:57:23 +01:00
filterValue : debouncedFilterValue ,
2021-04-15 17:19:43 +02:00
hasLocalBlocks : hasItems ,
isTyping : filterValue !== debouncedFilterValue
2020-01-08 12:57:23 +01:00
} ) ;
} ) ;
}
/* harmony default export */ var inserter _menu _downloadable _blocks _panel = ( InserterMenuDownloadableBlocksPanel ) ;
2021-02-02 06:17:13 +01:00
// EXTERNAL MODULE: external ["wp","editPost"]
2021-05-20 14:20:04 +02:00
var external _wp _editPost _ = _ _webpack _require _ _ ( "BLhE" ) ;
2020-06-26 15:33:47 +02:00
// CONCATENATED MODULE: ./node_modules/@wordpress/block-directory/build-module/components/compact-list/index.js
/ * *
* WordPress dependencies
* /
/ * *
* Internal dependencies
* /
2021-11-15 13:50:17 +01:00
function CompactList ( _ref ) {
let {
items
} = _ref ;
2020-06-26 15:33:47 +02:00
if ( ! items . length ) {
return null ;
}
2021-01-28 03:04:13 +01:00
return Object ( external _wp _element _ [ "createElement" ] ) ( "ul" , {
2020-06-26 15:33:47 +02:00
className : "block-directory-compact-list"
2021-11-15 13:50:17 +01:00
} , items . map ( _ref2 => {
let {
icon ,
id ,
title ,
author
} = _ref2 ;
return Object ( external _wp _element _ [ "createElement" ] ) ( "li" , {
key : id ,
className : "block-directory-compact-list__item"
} , Object ( external _wp _element _ [ "createElement" ] ) ( downloadable _block _icon , {
icon : icon ,
title : title
} ) , Object ( external _wp _element _ [ "createElement" ] ) ( "div" , {
className : "block-directory-compact-list__item-details"
} , Object ( external _wp _element _ [ "createElement" ] ) ( "div" , {
className : "block-directory-compact-list__item-title"
} , title ) , Object ( external _wp _element _ [ "createElement" ] ) ( "div" , {
className : "block-directory-compact-list__item-author"
} , Object ( external _wp _i18n _ [ "sprintf" ] ) (
/* translators: %s: Name of the block author. */
Object ( external _wp _i18n _ [ "__" ] ) ( 'By %s' ) , author ) ) ) ) ;
} ) ) ;
2020-06-26 15:33:47 +02:00
}
// CONCATENATED MODULE: ./node_modules/@wordpress/block-directory/build-module/plugins/installed-blocks-pre-publish-panel/index.js
/ * *
* WordPress dependencies
* /
2020-10-13 15:10:30 +02:00
2020-06-26 15:33:47 +02:00
/ * *
* Internal dependencies
* /
2021-01-28 03:04:13 +01:00
2020-06-26 15:33:47 +02:00
function InstalledBlocksPrePublishPanel ( ) {
2021-05-19 17:09:27 +02:00
const newBlockTypes = Object ( external _wp _data _ [ "useSelect" ] ) ( select => select ( store ) . getNewBlockTypes ( ) , [ ] ) ;
2020-06-26 15:33:47 +02:00
if ( ! newBlockTypes . length ) {
return null ;
}
2021-01-28 03:04:13 +01:00
return Object ( external _wp _element _ [ "createElement" ] ) ( external _wp _editPost _ [ "PluginPrePublishPanel" ] , {
2020-10-13 15:10:30 +02:00
icon : block _default [ "a" /* default */ ] ,
2021-01-28 03:04:13 +01:00
title : Object ( external _wp _i18n _ [ "sprintf" ] ) ( // translators: %d: number of blocks (number).
Object ( external _wp _i18n _ [ "_n" ] ) ( 'Added: %d block' , 'Added: %d blocks' , newBlockTypes . length ) , newBlockTypes . length ) ,
2020-06-26 15:33:47 +02:00
initialOpen : true
2021-01-28 03:04:13 +01:00
} , Object ( external _wp _element _ [ "createElement" ] ) ( "p" , {
2020-06-26 15:33:47 +02:00
className : "installed-blocks-pre-publish-panel__copy"
2021-01-28 03:04:13 +01:00
} , Object ( external _wp _i18n _ [ "_n" ] ) ( 'The following block has been added to your site.' , 'The following blocks have been added to your site.' , newBlockTypes . length ) ) , Object ( external _wp _element _ [ "createElement" ] ) ( CompactList , {
2020-06-26 15:33:47 +02:00
items : newBlockTypes
} ) ) ;
}
2020-10-13 15:10:30 +02:00
// CONCATENATED MODULE: ./node_modules/@wordpress/block-directory/build-module/plugins/get-install-missing/install-button.js
/ * *
* WordPress dependencies
* /
2021-04-15 17:19:43 +02:00
2021-01-28 03:04:13 +01:00
/ * *
* Internal dependencies
* /
2021-11-15 13:50:17 +01:00
function InstallButton ( _ref ) {
let {
attributes ,
block ,
clientId
} = _ref ;
2021-11-08 15:29:21 +01:00
const isInstallingBlock = Object ( external _wp _data _ [ "useSelect" ] ) ( select => select ( store ) . isInstalling ( block . id ) , [ block . id ] ) ;
2021-05-19 17:09:27 +02:00
const {
installBlockType
} = Object ( external _wp _data _ [ "useDispatch" ] ) ( store ) ;
const {
replaceBlock
} = Object ( external _wp _data _ [ "useDispatch" ] ) ( external _wp _blockEditor _ [ "store" ] ) ;
2021-01-28 03:04:13 +01:00
return Object ( external _wp _element _ [ "createElement" ] ) ( external _wp _components _ [ "Button" ] , {
2021-05-19 17:09:27 +02:00
onClick : ( ) => installBlockType ( block ) . then ( success => {
if ( success ) {
const blockType = Object ( external _wp _blocks _ [ "getBlockType" ] ) ( block . name ) ;
const [ originalBlock ] = Object ( external _wp _blocks _ [ "parse" ] ) ( attributes . originalContent ) ;
2021-11-08 15:29:21 +01:00
if ( originalBlock && blockType ) {
2021-05-19 17:09:27 +02:00
replaceBlock ( clientId , Object ( external _wp _blocks _ [ "createBlock" ] ) ( blockType . name , originalBlock . attributes , originalBlock . innerBlocks ) ) ;
2020-10-13 15:10:30 +02:00
}
2021-05-19 17:09:27 +02:00
}
} ) ,
2020-10-13 15:10:30 +02:00
disabled : isInstallingBlock ,
isBusy : isInstallingBlock ,
2021-11-08 15:29:21 +01:00
variant : "primary"
2021-01-28 03:04:13 +01:00
} , Object ( external _wp _i18n _ [ "sprintf" ] ) (
2020-10-13 15:10:30 +02:00
/* translators: %s: block name */
2021-01-28 03:04:13 +01:00
Object ( external _wp _i18n _ [ "__" ] ) ( 'Install %s' ) , block . title ) ) ;
2020-10-13 15:10:30 +02:00
}
// CONCATENATED MODULE: ./node_modules/@wordpress/block-directory/build-module/plugins/get-install-missing/index.js
2020-01-08 12:57:23 +01:00
2021-01-28 03:04:13 +01:00
2020-01-08 12:57:23 +01:00
/ * *
* WordPress dependencies
* /
2020-10-13 15:10:30 +02:00
2021-04-15 17:19:43 +02:00
2020-01-08 12:57:23 +01:00
/ * *
* Internal dependencies
* /
2020-06-26 15:33:47 +02:00
2021-01-28 03:04:13 +01:00
2021-05-19 17:09:27 +02:00
const getInstallMissing = OriginalComponent => props => {
const {
originalName
} = props . attributes ; // Disable reason: This is a valid component, but it's mistaken for a callback.
// eslint-disable-next-line react-hooks/rules-of-hooks
2020-10-13 15:10:30 +02:00
2021-05-19 17:09:27 +02:00
const {
block ,
hasPermission
} = Object ( external _wp _data _ [ "useSelect" ] ) ( select => {
const {
getDownloadableBlocks
} = select ( store ) ;
2021-11-15 13:50:17 +01:00
const blocks = getDownloadableBlocks ( 'block:' + originalName ) . filter ( _ref => {
let {
name
} = _ref ;
return originalName === name ;
} ) ;
2021-05-19 17:09:27 +02:00
return {
hasPermission : select ( external _wp _coreData _ [ "store" ] ) . canUser ( 'read' , 'block-directory/search' ) ,
block : blocks . length && blocks [ 0 ]
} ;
} , [ originalName ] ) ; // The user can't install blocks, or the block isn't available for download.
2020-10-13 15:10:30 +02:00
2021-05-19 17:09:27 +02:00
if ( ! hasPermission || ! block ) {
return Object ( external _wp _element _ [ "createElement" ] ) ( OriginalComponent , props ) ;
}
2020-10-13 15:10:30 +02:00
2021-05-19 17:09:27 +02:00
return Object ( external _wp _element _ [ "createElement" ] ) ( ModifiedWarning , Object ( esm _extends [ "a" /* default */ ] ) ( { } , props , {
originalBlock : block
} ) ) ;
2021-01-28 03:04:13 +01:00
} ;
2021-11-15 13:50:17 +01:00
const ModifiedWarning = _ref2 => {
let {
originalBlock ,
... props
} = _ref2 ;
2021-05-19 17:09:27 +02:00
const {
originalName ,
originalUndelimitedContent
} = props . attributes ;
const {
replaceBlock
} = Object ( external _wp _data _ [ "useDispatch" ] ) ( external _wp _blockEditor _ [ "store" ] ) ;
const convertToHTML = ( ) => {
2021-01-28 03:04:13 +01:00
replaceBlock ( props . clientId , Object ( external _wp _blocks _ [ "createBlock" ] ) ( 'core/html' , {
content : originalUndelimitedContent
} ) ) ;
2020-10-13 15:10:30 +02:00
} ;
2021-01-28 03:04:13 +01:00
2021-05-19 17:09:27 +02:00
const hasContent = ! ! originalUndelimitedContent ;
const hasHTMLBlock = Object ( external _wp _blocks _ [ "getBlockType" ] ) ( 'core/html' ) ;
let messageHTML = Object ( external _wp _i18n _ [ "sprintf" ] ) (
2021-01-28 03:04:13 +01:00
/* translators: %s: block name */
2021-04-15 17:19:43 +02:00
Object ( external _wp _i18n _ [ "__" ] ) ( 'Your site doesn’ t include support for the %s block. You can try installing the block or remove it entirely.' ) , originalBlock . title || originalName ) ;
2021-05-19 17:09:27 +02:00
const actions = [ Object ( external _wp _element _ [ "createElement" ] ) ( InstallButton , {
2021-01-28 03:04:13 +01:00
key : "install" ,
block : originalBlock ,
attributes : props . attributes ,
clientId : props . clientId
} ) ] ;
if ( hasContent && hasHTMLBlock ) {
messageHTML = Object ( external _wp _i18n _ [ "sprintf" ] ) (
/* translators: %s: block name */
Object ( external _wp _i18n _ [ "__" ] ) ( 'Your site doesn’ t include support for the %s block. You can try installing the block, convert it to a Custom HTML block, or remove it entirely.' ) , originalBlock . title || originalName ) ;
actions . push ( Object ( external _wp _element _ [ "createElement" ] ) ( external _wp _components _ [ "Button" ] , {
key : "convert" ,
onClick : convertToHTML ,
2021-11-08 15:29:21 +01:00
variant : "link"
2021-01-28 03:04:13 +01:00
} , Object ( external _wp _i18n _ [ "__" ] ) ( 'Keep as HTML' ) ) ) ;
}
return Object ( external _wp _element _ [ "createElement" ] ) ( "div" , Object ( external _wp _blockEditor _ [ "useBlockProps" ] ) ( ) , Object ( external _wp _element _ [ "createElement" ] ) ( external _wp _blockEditor _ [ "Warning" ] , {
actions : actions
} , messageHTML ) , Object ( external _wp _element _ [ "createElement" ] ) ( external _wp _element _ [ "RawHTML" ] , null , originalUndelimitedContent ) ) ;
2020-10-13 15:10:30 +02:00
} ;
2021-05-19 17:09:27 +02:00
/* harmony default export */ var get _install _missing = ( getInstallMissing ) ;
2020-10-13 15:10:30 +02:00
// CONCATENATED MODULE: ./node_modules/@wordpress/block-directory/build-module/plugins/index.js
2020-06-26 15:33:47 +02:00
2020-01-08 12:57:23 +01:00
2020-07-07 16:43:35 +02:00
/ * *
* WordPress dependencies
* /
2020-10-13 15:10:30 +02:00
2020-01-03 14:17:24 +01:00
/ * *
* Internal dependencies
* /
2020-07-07 16:43:35 +02:00
2021-01-28 03:04:13 +01:00
Object ( external _wp _plugins _ [ "registerPlugin" ] ) ( 'block-directory' , {
2021-05-19 17:09:27 +02:00
render ( ) {
2021-01-28 03:04:13 +01:00
return Object ( external _wp _element _ [ "createElement" ] ) ( external _wp _element _ [ "Fragment" ] , null , Object ( external _wp _element _ [ "createElement" ] ) ( AutoBlockUninstaller , null ) , Object ( external _wp _element _ [ "createElement" ] ) ( inserter _menu _downloadable _blocks _panel , null ) , Object ( external _wp _element _ [ "createElement" ] ) ( InstalledBlocksPrePublishPanel , null ) ) ;
2020-10-13 15:10:30 +02:00
}
2021-05-19 17:09:27 +02:00
2020-10-13 15:10:30 +02:00
} ) ;
2021-05-19 17:09:27 +02:00
Object ( external _wp _hooks _ [ "addFilter" ] ) ( 'blocks.registerBlockType' , 'block-directory/fallback' , ( settings , name ) => {
2020-10-13 15:10:30 +02:00
if ( name !== 'core/missing' ) {
return settings ;
}
2020-07-27 22:10:36 +02:00
2020-10-13 15:10:30 +02:00
settings . edit = get _install _missing ( settings . edit ) ;
return settings ;
} ) ;
2020-07-27 22:10:36 +02:00
2020-10-13 15:10:30 +02:00
// CONCATENATED MODULE: ./node_modules/@wordpress/block-directory/build-module/index.js
/ * *
* Internal dependencies
* /
2020-07-27 22:10:36 +02:00
2020-01-08 12:57:23 +01:00
2020-01-03 14:17:24 +01:00
2020-02-06 22:03:31 +01:00
2021-01-28 03:04:13 +01:00
/***/ } ) ,
2021-05-20 14:20:04 +02:00
/***/ "BLhE" :
2021-01-28 03:04:13 +01:00
/***/ ( function ( module , exports ) {
2021-05-20 14:20:04 +02:00
( function ( ) { module . exports = window [ "wp" ] [ "editPost" ] ; } ( ) ) ;
/***/ } ) ,
/***/ "GRId" :
/***/ ( function ( module , exports ) {
( function ( ) { module . exports = window [ "wp" ] [ "element" ] ; } ( ) ) ;
/***/ } ) ,
/***/ "HSyU" :
/***/ ( function ( module , exports ) {
( function ( ) { module . exports = window [ "wp" ] [ "blocks" ] ; } ( ) ) ;
/***/ } ) ,
/***/ "K9lf" :
/***/ ( function ( module , exports ) {
( function ( ) { module . exports = window [ "wp" ] [ "compose" ] ; } ( ) ) ;
/***/ } ) ,
/***/ "Tqx9" :
/***/ ( function ( module , exports ) {
( function ( ) { module . exports = window [ "wp" ] [ "primitives" ] ; } ( ) ) ;
/***/ } ) ,
/***/ "TvNi" :
/***/ ( function ( module , exports ) {
( function ( ) { module . exports = window [ "wp" ] [ "plugins" ] ; } ( ) ) ;
2020-01-22 23:06:21 +01:00
/***/ } ) ,
2021-05-20 14:20:04 +02:00
/***/ "URob" :
2021-01-28 03:04:13 +01:00
/***/ ( function ( module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) {
2020-07-07 16:43:35 +02:00
2021-01-28 03:04:13 +01:00
"use strict" ;
2021-05-20 14:20:04 +02:00
/* harmony import */ var _wordpress _element _ _WEBPACK _IMPORTED _MODULE _0 _ _ = _ _webpack _require _ _ ( "GRId" ) ;
/* harmony import */ var _wordpress _element _ _WEBPACK _IMPORTED _MODULE _0 _ _ _default = /*#__PURE__*/ _ _webpack _require _ _ . n ( _wordpress _element _ _WEBPACK _IMPORTED _MODULE _0 _ _ ) ;
/* harmony import */ var _wordpress _primitives _ _WEBPACK _IMPORTED _MODULE _1 _ _ = _ _webpack _require _ _ ( "Tqx9" ) ;
/* harmony import */ var _wordpress _primitives _ _WEBPACK _IMPORTED _MODULE _1 _ _ _default = /*#__PURE__*/ _ _webpack _require _ _ . n ( _wordpress _primitives _ _WEBPACK _IMPORTED _MODULE _1 _ _ ) ;
2021-01-28 03:04:13 +01:00
2021-05-20 14:20:04 +02:00
/ * *
* WordPress dependencies
* /
const starFilled = Object ( _wordpress _element _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "createElement" ] ) ( _wordpress _primitives _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "SVG" ] , {
xmlns : "http://www.w3.org/2000/svg" ,
viewBox : "0 0 24 24"
} , Object ( _wordpress _element _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "createElement" ] ) ( _wordpress _primitives _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "Path" ] , {
d : "M11.776 4.454a.25.25 0 01.448 0l2.069 4.192a.25.25 0 00.188.137l4.626.672a.25.25 0 01.139.426l-3.348 3.263a.25.25 0 00-.072.222l.79 4.607a.25.25 0 01-.362.263l-4.138-2.175a.25.25 0 00-.232 0l-4.138 2.175a.25.25 0 01-.363-.263l.79-4.607a.25.25 0 00-.071-.222L4.754 9.881a.25.25 0 01.139-.426l4.626-.672a.25.25 0 00.188-.137l2.069-4.192z"
} ) ) ;
/* harmony default export */ _ _webpack _exports _ _ [ "a" ] = ( starFilled ) ;
/***/ } ) ,
/***/ "Xxwi" :
/***/ ( function ( module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) {
"use strict" ;
/* harmony import */ var _wordpress _element _ _WEBPACK _IMPORTED _MODULE _0 _ _ = _ _webpack _require _ _ ( "GRId" ) ;
/* harmony import */ var _wordpress _element _ _WEBPACK _IMPORTED _MODULE _0 _ _ _default = /*#__PURE__*/ _ _webpack _require _ _ . n ( _wordpress _element _ _WEBPACK _IMPORTED _MODULE _0 _ _ ) ;
/* harmony import */ var _wordpress _primitives _ _WEBPACK _IMPORTED _MODULE _1 _ _ = _ _webpack _require _ _ ( "Tqx9" ) ;
/* harmony import */ var _wordpress _primitives _ _WEBPACK _IMPORTED _MODULE _1 _ _ _default = /*#__PURE__*/ _ _webpack _require _ _ . n ( _wordpress _primitives _ _WEBPACK _IMPORTED _MODULE _1 _ _ ) ;
/ * *
* WordPress dependencies
* /
const starEmpty = Object ( _wordpress _element _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "createElement" ] ) ( _wordpress _primitives _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "SVG" ] , {
xmlns : "http://www.w3.org/2000/svg" ,
viewBox : "0 0 24 24"
} , Object ( _wordpress _element _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "createElement" ] ) ( _wordpress _primitives _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "Path" ] , {
fillRule : "evenodd" ,
d : "M9.706 8.646a.25.25 0 01-.188.137l-4.626.672a.25.25 0 00-.139.427l3.348 3.262a.25.25 0 01.072.222l-.79 4.607a.25.25 0 00.362.264l4.138-2.176a.25.25 0 01.233 0l4.137 2.175a.25.25 0 00.363-.263l-.79-4.607a.25.25 0 01.072-.222l3.347-3.262a.25.25 0 00-.139-.427l-4.626-.672a.25.25 0 01-.188-.137l-2.069-4.192a.25.25 0 00-.448 0L9.706 8.646zM12 7.39l-.948 1.921a1.75 1.75 0 01-1.317.957l-2.12.308 1.534 1.495c.412.402.6.982.503 1.55l-.362 2.11 1.896-.997a1.75 1.75 0 011.629 0l1.895.997-.362-2.11a1.75 1.75 0 01.504-1.55l1.533-1.495-2.12-.308a1.75 1.75 0 01-1.317-.957L12 7.39z" ,
clipRule : "evenodd"
} ) ) ;
/* harmony default export */ _ _webpack _exports _ _ [ "a" ] = ( starEmpty ) ;
2021-01-28 03:04:13 +01:00
2020-07-07 16:43:35 +02:00
2020-10-20 15:36:16 +02:00
/***/ } ) ,
2021-05-20 14:20:04 +02:00
/***/ "YLtl" :
2020-10-20 15:36:16 +02:00
/***/ ( function ( module , exports ) {
2021-05-20 14:20:04 +02:00
( function ( ) { module . exports = window [ "lodash" ] ; } ( ) ) ;
/***/ } ) ,
/***/ "axFQ" :
/***/ ( function ( module , exports ) {
( function ( ) { module . exports = window [ "wp" ] [ "blockEditor" ] ; } ( ) ) ;
/***/ } ) ,
/***/ "g56x" :
/***/ ( function ( module , exports ) {
( function ( ) { module . exports = window [ "wp" ] [ "hooks" ] ; } ( ) ) ;
/***/ } ) ,
/***/ "gdqT" :
/***/ ( function ( module , exports ) {
( function ( ) { module . exports = window [ "wp" ] [ "a11y" ] ; } ( ) ) ;
2020-10-20 15:36:16 +02:00
2021-05-19 17:09:27 +02:00
/***/ } ) ,
2021-05-20 14:20:04 +02:00
/***/ "iClF" :
2021-05-19 17:09:27 +02:00
/***/ ( function ( module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) {
"use strict" ;
2021-05-20 14:20:04 +02:00
/* harmony import */ var _wordpress _element _ _WEBPACK _IMPORTED _MODULE _0 _ _ = _ _webpack _require _ _ ( "GRId" ) ;
2021-05-19 17:09:27 +02:00
/* harmony import */ var _wordpress _element _ _WEBPACK _IMPORTED _MODULE _0 _ _ _default = /*#__PURE__*/ _ _webpack _require _ _ . n ( _wordpress _element _ _WEBPACK _IMPORTED _MODULE _0 _ _ ) ;
/ * *
* WordPress dependencies
* /
/** @typedef {{icon: JSX.Element, size?: number} & import('@wordpress/primitives').SVGProps} IconProps */
/ * *
* Return an SVG icon .
*
* @ param { IconProps } props icon is the SVG component to render
* size is a number specifiying the icon size in pixels
* Other props will be passed to wrapped SVG component
*
* @ return { JSX . Element } Icon component
* /
2021-11-15 13:50:17 +01:00
function Icon ( _ref ) {
let {
icon ,
size = 24 ,
... props
} = _ref ;
2021-05-19 17:09:27 +02:00
return Object ( _wordpress _element _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "cloneElement" ] ) ( icon , {
width : size ,
height : size ,
... props
} ) ;
}
/* harmony default export */ _ _webpack _exports _ _ [ "a" ] = ( Icon ) ;
2021-05-20 14:20:04 +02:00
/***/ } ) ,
/***/ "jSdM" :
/***/ ( function ( module , exports ) {
( function ( ) { module . exports = window [ "wp" ] [ "editor" ] ; } ( ) ) ;
/***/ } ) ,
/***/ "jZUy" :
/***/ ( function ( module , exports ) {
( function ( ) { module . exports = window [ "wp" ] [ "coreData" ] ; } ( ) ) ;
/***/ } ) ,
/***/ "l3Sj" :
/***/ ( function ( module , exports ) {
( function ( ) { module . exports = window [ "wp" ] [ "i18n" ] ; } ( ) ) ;
/***/ } ) ,
/***/ "onLe" :
/***/ ( function ( module , exports ) {
( function ( ) { module . exports = window [ "wp" ] [ "notices" ] ; } ( ) ) ;
/***/ } ) ,
/***/ "rmEH" :
/***/ ( function ( module , exports ) {
( function ( ) { module . exports = window [ "wp" ] [ "htmlEntities" ] ; } ( ) ) ;
/***/ } ) ,
/***/ "tI+e" :
/***/ ( function ( module , exports ) {
( function ( ) { module . exports = window [ "wp" ] [ "components" ] ; } ( ) ) ;
/***/ } ) ,
/***/ "wx14" :
/***/ ( function ( module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) {
"use strict" ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "a" , function ( ) { return _extends ; } ) ;
function _extends ( ) {
_extends = Object . assign || function ( target ) {
for ( var i = 1 ; i < arguments . length ; i ++ ) {
var source = arguments [ i ] ;
for ( var key in source ) {
if ( Object . prototype . hasOwnProperty . call ( source , key ) ) {
target [ key ] = source [ key ] ;
}
}
}
return target ;
} ;
return _extends . apply ( this , arguments ) ;
}
/***/ } ) ,
/***/ "ywyh" :
/***/ ( function ( module , exports ) {
( function ( ) { module . exports = window [ "wp" ] [ "apiFetch" ] ; } ( ) ) ;
2020-01-03 14:17:24 +01:00
/***/ } )
/******/ } ) ;