2018-12-14 12:02:53 +01:00
this [ "wp" ] = this [ "wp" ] || { } ; this [ "wp" ] [ "formatLibrary" ] =
/******/ ( 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
2020-07-07 16:43:35 +02:00
/******/ return _ _webpack _require _ _ ( _ _webpack _require _ _ . s = 445 ) ;
2018-12-14 12:02:53 +01:00
/******/ } )
/************************************************************************/
/******/ ( {
2018-12-18 04:14:52 +01:00
/***/ 0 :
/***/ ( function ( module , exports ) {
2018-12-14 12:02:53 +01:00
2018-12-18 04:14:52 +01:00
( function ( ) { module . exports = this [ "wp" ] [ "element" ] ; } ( ) ) ;
2018-12-14 12:02:53 +01:00
2018-12-18 04:14:52 +01:00
/***/ } ) ,
/***/ 1 :
/***/ ( function ( module , exports ) {
( function ( ) { module . exports = this [ "wp" ] [ "i18n" ] ; } ( ) ) ;
2018-12-14 12:02:53 +01:00
/***/ } ) ,
2020-07-07 16:43:35 +02:00
/***/ 12 :
2019-09-19 17:19:18 +02:00
/***/ ( function ( module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) {
2020-02-10 23:33:27 +01:00
"use strict" ;
2020-06-26 15:33:47 +02:00
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "a" , function ( ) { return _assertThisInitialized ; } ) ;
function _assertThisInitialized ( self ) {
if ( self === void 0 ) {
throw new ReferenceError ( "this hasn't been initialised - super() hasn't been called" ) ;
}
2020-02-10 23:33:27 +01:00
2020-06-26 15:33:47 +02:00
return self ;
2020-02-10 23:33:27 +01:00
}
/***/ } ) ,
/***/ 13 :
/***/ ( function ( module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) {
2019-09-19 17:19:18 +02:00
"use strict" ;
2020-07-07 16:43:35 +02:00
// EXPORTS
_ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "a" , function ( ) { return /* binding */ _slicedToArray ; } ) ;
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js
var arrayWithHoles = _ _webpack _require _ _ ( 38 ) ;
// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js
function _iterableToArrayLimit ( arr , i ) {
if ( typeof Symbol === "undefined" || ! ( Symbol . iterator in Object ( arr ) ) ) return ;
var _arr = [ ] ;
var _n = true ;
var _d = false ;
var _e = undefined ;
try {
for ( var _i = arr [ Symbol . iterator ] ( ) , _s ; ! ( _n = ( _s = _i . next ( ) ) . done ) ; _n = true ) {
_arr . push ( _s . value ) ;
if ( i && _arr . length === i ) break ;
}
} catch ( err ) {
_d = true ;
_e = err ;
} finally {
try {
if ( ! _n && _i [ "return" ] != null ) _i [ "return" ] ( ) ;
} finally {
if ( _d ) throw _e ;
}
}
return _arr ;
}
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js
var unsupportedIterableToArray = _ _webpack _require _ _ ( 29 ) ;
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/nonIterableRest.js
var nonIterableRest = _ _webpack _require _ _ ( 39 ) ;
// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/slicedToArray.js
function _slicedToArray ( arr , i ) {
return Object ( arrayWithHoles [ "a" /* default */ ] ) ( arr ) || _iterableToArrayLimit ( arr , i ) || Object ( unsupportedIterableToArray [ "a" /* default */ ] ) ( arr , i ) || Object ( nonIterableRest [ "a" /* default */ ] ) ( ) ;
2019-09-19 17:19:18 +02:00
}
2020-06-26 15:33:47 +02:00
/***/ } ) ,
2020-07-07 16:43:35 +02:00
/***/ 131 :
2020-06-26 15:33:47 +02:00
/***/ ( function ( module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) {
"use strict" ;
/* harmony import */ var _babel _runtime _helpers _esm _defineProperty _ _WEBPACK _IMPORTED _MODULE _0 _ _ = _ _webpack _require _ _ ( 5 ) ;
/* harmony import */ var _babel _runtime _helpers _esm _objectWithoutProperties _ _WEBPACK _IMPORTED _MODULE _1 _ _ = _ _webpack _require _ _ ( 14 ) ;
/* harmony import */ var _wordpress _element _ _WEBPACK _IMPORTED _MODULE _2 _ _ = _ _webpack _require _ _ ( 0 ) ;
/* harmony import */ var _wordpress _element _ _WEBPACK _IMPORTED _MODULE _2 _ _ _default = /*#__PURE__*/ _ _webpack _require _ _ . n ( _wordpress _element _ _WEBPACK _IMPORTED _MODULE _2 _ _ ) ;
function ownKeys ( object , enumerableOnly ) { var keys = Object . keys ( object ) ; if ( Object . getOwnPropertySymbols ) { var symbols = Object . getOwnPropertySymbols ( object ) ; if ( enumerableOnly ) symbols = symbols . filter ( function ( sym ) { return Object . getOwnPropertyDescriptor ( object , sym ) . enumerable ; } ) ; keys . push . apply ( keys , symbols ) ; } return keys ; }
function _objectSpread ( target ) { for ( var i = 1 ; i < arguments . length ; i ++ ) { var source = arguments [ i ] != null ? arguments [ i ] : { } ; if ( i % 2 ) { ownKeys ( Object ( source ) , true ) . forEach ( function ( key ) { Object ( _babel _runtime _helpers _esm _defineProperty _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ /* default */ "a" ] ) ( target , key , source [ key ] ) ; } ) ; } else if ( Object . getOwnPropertyDescriptors ) { Object . defineProperties ( target , Object . getOwnPropertyDescriptors ( source ) ) ; } else { ownKeys ( Object ( source ) ) . forEach ( function ( key ) { Object . defineProperty ( target , key , Object . getOwnPropertyDescriptor ( source , key ) ) ; } ) ; } } return target ; }
/ * *
* WordPress dependencies
* /
// Disable reason: JSDoc linter doesn't seem to parse the union (`&`) correctly.
/* eslint-disable jsdoc/valid-types */
/** @typedef {{icon: JSX.Element, size?: number} & import('react').ComponentPropsWithoutRef<'SVG'>} IconProps */
/* eslint-enable jsdoc/valid-types */
/ * *
* 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
* /
function Icon ( _ref ) {
var icon = _ref . icon ,
_ref$size = _ref . size ,
size = _ref$size === void 0 ? 24 : _ref$size ,
props = Object ( _babel _runtime _helpers _esm _objectWithoutProperties _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ /* default */ "a" ] ) ( _ref , [ "icon" , "size" ] ) ;
return Object ( _wordpress _element _ _WEBPACK _IMPORTED _MODULE _2 _ _ [ "cloneElement" ] ) ( icon , _objectSpread ( {
width : size ,
height : size
} , props ) ) ;
2019-09-19 17:19:18 +02:00
}
2020-06-26 15:33:47 +02:00
/* harmony default export */ _ _webpack _exports _ _ [ "a" ] = ( Icon ) ;
2019-09-19 17:19:18 +02:00
/***/ } ) ,
2020-02-10 23:33:27 +01:00
/***/ 14 :
2019-09-19 17:19:18 +02:00
/***/ ( function ( module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) {
2018-12-14 12:02:53 +01:00
"use strict" ;
2020-06-26 15:33:47 +02:00
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "a" , function ( ) { return _objectWithoutProperties ; } ) ;
2020-07-07 16:43:35 +02:00
/* harmony import */ var _objectWithoutPropertiesLoose _ _WEBPACK _IMPORTED _MODULE _0 _ _ = _ _webpack _require _ _ ( 41 ) ;
2020-06-26 15:33:47 +02:00
function _objectWithoutProperties ( source , excluded ) {
if ( source == null ) return { } ;
var target = Object ( _objectWithoutPropertiesLoose _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ /* default */ "a" ] ) ( source , excluded ) ;
var key , i ;
if ( Object . getOwnPropertySymbols ) {
var sourceSymbolKeys = Object . getOwnPropertySymbols ( source ) ;
for ( i = 0 ; i < sourceSymbolKeys . length ; i ++ ) {
key = sourceSymbolKeys [ i ] ;
if ( excluded . indexOf ( key ) >= 0 ) continue ;
if ( ! Object . prototype . propertyIsEnumerable . call ( source , key ) ) continue ;
target [ key ] = source [ key ] ;
}
2018-12-14 12:02:53 +01:00
}
2020-06-26 15:33:47 +02:00
return target ;
2018-12-14 12:02:53 +01:00
}
/***/ } ) ,
2020-02-10 23:33:27 +01:00
/***/ 15 :
2018-12-14 12:02:53 +01:00
/***/ ( function ( module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) {
"use strict" ;
2020-07-07 16:43:35 +02:00
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "a" , function ( ) { return _getPrototypeOf ; } ) ;
function _getPrototypeOf ( o ) {
_getPrototypeOf = Object . setPrototypeOf ? Object . getPrototypeOf : function _getPrototypeOf ( o ) {
return o . _ _proto _ _ || Object . getPrototypeOf ( o ) ;
} ;
return _getPrototypeOf ( o ) ;
2018-12-14 12:02:53 +01:00
}
/***/ } ) ,
2020-07-07 16:43:35 +02:00
/***/ 175 :
2020-02-10 23:33:27 +01:00
/***/ ( function ( module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) {
"use strict" ;
/* harmony import */ var _wordpress _element _ _WEBPACK _IMPORTED _MODULE _0 _ _ = _ _webpack _require _ _ ( 0 ) ;
/* harmony import */ var _wordpress _element _ _WEBPACK _IMPORTED _MODULE _0 _ _ _default = /*#__PURE__*/ _ _webpack _require _ _ . n ( _wordpress _element _ _WEBPACK _IMPORTED _MODULE _0 _ _ ) ;
2020-06-26 15:33:47 +02:00
/* harmony import */ var _wordpress _primitives _ _WEBPACK _IMPORTED _MODULE _1 _ _ = _ _webpack _require _ _ ( 6 ) ;
2020-02-10 23:33:27 +01:00
/* harmony import */ var _wordpress _primitives _ _WEBPACK _IMPORTED _MODULE _1 _ _ _default = /*#__PURE__*/ _ _webpack _require _ _ . n ( _wordpress _primitives _ _WEBPACK _IMPORTED _MODULE _1 _ _ ) ;
/ * *
* WordPress dependencies
* /
var link = Object ( _wordpress _element _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "createElement" ] ) ( _wordpress _primitives _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "SVG" ] , {
xmlns : "http://www.w3.org/2000/svg" ,
2020-06-26 15:33:47 +02:00
viewBox : "0 0 24 24"
2020-02-10 23:33:27 +01:00
} , Object ( _wordpress _element _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "createElement" ] ) ( _wordpress _primitives _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "Path" ] , {
2020-06-26 15:33:47 +02:00
d : "M15.6 7.2H14v1.5h1.6c2 0 3.7 1.7 3.7 3.7s-1.7 3.7-3.7 3.7H14v1.5h1.6c2.8 0 5.2-2.3 5.2-5.2 0-2.9-2.3-5.2-5.2-5.2zM4.7 12.4c0-2 1.7-3.7 3.7-3.7H10V7.2H8.4c-2.9 0-5.2 2.3-5.2 5.2 0 2.9 2.3 5.2 5.2 5.2H10v-1.5H8.4c-2 0-3.7-1.7-3.7-3.7zm4.6.9h5.3v-1.5H9.3v1.5z"
2020-02-10 23:33:27 +01:00
} ) ) ;
/* harmony default export */ _ _webpack _exports _ _ [ "a" ] = ( link ) ;
/***/ } ) ,
2020-06-26 15:33:47 +02:00
/***/ 18 :
2018-12-14 12:02:53 +01:00
/***/ ( function ( module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) {
"use strict" ;
2020-06-26 15:33:47 +02:00
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "a" , function ( ) { return _createClass ; } ) ;
function _defineProperties ( target , props ) {
for ( var i = 0 ; i < props . length ; i ++ ) {
var descriptor = props [ i ] ;
descriptor . enumerable = descriptor . enumerable || false ;
descriptor . configurable = true ;
if ( "value" in descriptor ) descriptor . writable = true ;
Object . defineProperty ( target , descriptor . key , descriptor ) ;
2018-12-14 12:02:53 +01:00
}
2020-06-26 15:33:47 +02:00
}
2018-12-14 12:02:53 +01:00
2020-06-26 15:33:47 +02:00
function _createClass ( Constructor , protoProps , staticProps ) {
if ( protoProps ) _defineProperties ( Constructor . prototype , protoProps ) ;
if ( staticProps ) _defineProperties ( Constructor , staticProps ) ;
return Constructor ;
2018-12-14 12:02:53 +01:00
}
2019-03-07 10:09:59 +01:00
/***/ } ) ,
2019-09-19 17:19:18 +02:00
/***/ 19 :
2018-12-14 12:02:53 +01:00
/***/ ( function ( module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) {
"use strict" ;
2020-06-26 15:33:47 +02:00
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "a" , function ( ) { return _classCallCheck ; } ) ;
function _classCallCheck ( instance , Constructor ) {
if ( ! ( instance instanceof Constructor ) ) {
throw new TypeError ( "Cannot call a class as a function" ) ;
2018-12-14 12:02:53 +01:00
}
}
/***/ } ) ,
2020-07-07 16:43:35 +02:00
/***/ 199 :
2020-03-16 23:07:16 +01:00
/***/ ( function ( module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) {
"use strict" ;
/* harmony import */ var _wordpress _element _ _WEBPACK _IMPORTED _MODULE _0 _ _ = _ _webpack _require _ _ ( 0 ) ;
/* harmony import */ var _wordpress _element _ _WEBPACK _IMPORTED _MODULE _0 _ _ _default = /*#__PURE__*/ _ _webpack _require _ _ . n ( _wordpress _element _ _WEBPACK _IMPORTED _MODULE _0 _ _ ) ;
2020-06-26 15:33:47 +02:00
/* harmony import */ var _wordpress _primitives _ _WEBPACK _IMPORTED _MODULE _1 _ _ = _ _webpack _require _ _ ( 6 ) ;
2020-03-16 23:07:16 +01:00
/* harmony import */ var _wordpress _primitives _ _WEBPACK _IMPORTED _MODULE _1 _ _ _default = /*#__PURE__*/ _ _webpack _require _ _ . n ( _wordpress _primitives _ _WEBPACK _IMPORTED _MODULE _1 _ _ ) ;
/ * *
* WordPress dependencies
* /
var keyboardReturn = Object ( _wordpress _element _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "createElement" ] ) ( _wordpress _primitives _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "SVG" ] , {
xmlns : "http://www.w3.org/2000/svg" ,
viewBox : "-2 -2 24 24"
} , Object ( _wordpress _element _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "createElement" ] ) ( _wordpress _primitives _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "Path" ] , {
d : "M16 4h2v9H7v3l-5-4 5-4v3h9V4z"
} ) ) ;
/* harmony default export */ _ _webpack _exports _ _ [ "a" ] = ( keyboardReturn ) ;
2020-02-06 22:03:31 +01:00
/***/ } ) ,
2020-03-16 23:07:16 +01:00
/***/ 2 :
2020-02-06 22:03:31 +01:00
/***/ ( function ( module , exports ) {
2020-03-16 23:07:16 +01:00
( function ( ) { module . exports = this [ "lodash" ] ; } ( ) ) ;
2020-02-06 22:03:31 +01:00
/***/ } ) ,
2020-03-16 23:07:16 +01:00
/***/ 20 :
2020-02-10 23:33:27 +01:00
/***/ ( function ( module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) {
"use strict" ;
2020-06-29 13:50:29 +02:00
// EXPORTS
_ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "a" , function ( ) { return /* binding */ _inherits ; } ) ;
2020-06-26 15:33:47 +02:00
// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js
function _setPrototypeOf ( o , p ) {
_setPrototypeOf = Object . setPrototypeOf || function _setPrototypeOf ( o , p ) {
o . _ _proto _ _ = p ;
return o ;
} ;
2020-02-10 23:33:27 +01:00
2020-06-26 15:33:47 +02:00
return _setPrototypeOf ( o , p ) ;
}
// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/inherits.js
2020-02-10 23:33:27 +01:00
2020-06-26 15:33:47 +02:00
function _inherits ( subClass , superClass ) {
if ( typeof superClass !== "function" && superClass !== null ) {
throw new TypeError ( "Super expression must either be null or a function" ) ;
2020-02-10 23:33:27 +01:00
}
2020-06-26 15:33:47 +02:00
subClass . prototype = Object . create ( superClass && superClass . prototype , {
constructor : {
value : subClass ,
writable : true ,
configurable : true
}
} ) ;
if ( superClass ) _setPrototypeOf ( subClass , superClass ) ;
2020-02-10 23:33:27 +01:00
}
2020-03-24 00:40:19 +01:00
2020-07-07 16:43:35 +02:00
/***/ } ) ,
/***/ 201 :
/***/ ( function ( module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) {
"use strict" ;
/* harmony import */ var _wordpress _element _ _WEBPACK _IMPORTED _MODULE _0 _ _ = _ _webpack _require _ _ ( 0 ) ;
/* 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 _ _ ( 6 ) ;
/* harmony import */ var _wordpress _primitives _ _WEBPACK _IMPORTED _MODULE _1 _ _ _default = /*#__PURE__*/ _ _webpack _require _ _ . n ( _wordpress _primitives _ _WEBPACK _IMPORTED _MODULE _1 _ _ ) ;
/ * *
* WordPress dependencies
* /
var linkOff = 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 : "M15.6 7.3h-.7l1.6-3.5-.9-.4-3.9 8.5H9v1.5h2l-1.3 2.8H8.4c-2 0-3.7-1.7-3.7-3.7s1.7-3.7 3.7-3.7H10V7.3H8.4c-2.9 0-5.2 2.3-5.2 5.2 0 2.9 2.3 5.2 5.2 5.2H9l-1.4 3.2.9.4 5.7-12.5h1.4c2 0 3.7 1.7 3.7 3.7s-1.7 3.7-3.7 3.7H14v1.5h1.6c2.9 0 5.2-2.3 5.2-5.2 0-2.9-2.4-5.2-5.2-5.2z"
} ) ) ;
/* harmony default export */ _ _webpack _exports _ _ [ "a" ] = ( linkOff ) ;
2020-06-26 15:33:47 +02:00
/***/ } ) ,
2020-02-10 23:33:27 +01:00
2020-06-26 15:33:47 +02:00
/***/ 21 :
/***/ ( function ( module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) {
2020-02-10 23:33:27 +01:00
2020-06-26 15:33:47 +02:00
"use strict" ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "a" , function ( ) { return _possibleConstructorReturn ; } ) ;
/* harmony import */ var _helpers _esm _typeof _ _WEBPACK _IMPORTED _MODULE _0 _ _ = _ _webpack _require _ _ ( 40 ) ;
2020-07-07 16:43:35 +02:00
/* harmony import */ var _assertThisInitialized _ _WEBPACK _IMPORTED _MODULE _1 _ _ = _ _webpack _require _ _ ( 12 ) ;
2020-02-10 23:33:27 +01:00
2020-06-26 15:33:47 +02:00
function _possibleConstructorReturn ( self , call ) {
if ( call && ( Object ( _helpers _esm _typeof _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ /* default */ "a" ] ) ( call ) === "object" || typeof call === "function" ) ) {
return call ;
}
2020-03-24 00:40:19 +01:00
2020-06-26 15:33:47 +02:00
return Object ( _assertThisInitialized _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ /* default */ "a" ] ) ( self ) ;
2020-02-10 23:33:27 +01:00
}
/***/ } ) ,
2020-03-16 23:07:16 +01:00
/***/ 22 :
/***/ ( function ( module , exports ) {
( function ( ) { module . exports = this [ "wp" ] [ "keycodes" ] ; } ( ) ) ;
/***/ } ) ,
2020-07-07 16:43:35 +02:00
/***/ 24 :
2019-04-22 14:40:04 +02:00
/***/ ( function ( module , exports ) {
2019-09-19 17:19:18 +02:00
( function ( ) { module . exports = this [ "wp" ] [ "richText" ] ; } ( ) ) ;
2019-04-22 14:40:04 +02:00
/***/ } ) ,
2020-06-26 15:33:47 +02:00
/***/ 26 :
2020-03-24 00:40:19 +01:00
/***/ ( function ( module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) {
2020-02-10 23:33:27 +01:00
2020-03-24 00:40:19 +01:00
"use strict" ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "a" , function ( ) { return _arrayLikeToArray ; } ) ;
function _arrayLikeToArray ( arr , len ) {
if ( len == null || len > arr . length ) len = arr . length ;
for ( var i = 0 , arr2 = new Array ( len ) ; i < len ; i ++ ) {
arr2 [ i ] = arr [ i ] ;
}
return arr2 ;
}
/***/ } ) ,
2020-07-07 16:43:35 +02:00
/***/ 29 :
2020-03-24 00:40:19 +01:00
/***/ ( function ( module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) {
"use strict" ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "a" , function ( ) { return _unsupportedIterableToArray ; } ) ;
2020-06-26 15:33:47 +02:00
/* harmony import */ var _arrayLikeToArray _ _WEBPACK _IMPORTED _MODULE _0 _ _ = _ _webpack _require _ _ ( 26 ) ;
2020-03-24 00:40:19 +01:00
function _unsupportedIterableToArray ( o , minLen ) {
if ( ! o ) return ;
if ( typeof o === "string" ) return Object ( _arrayLikeToArray _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ /* default */ "a" ] ) ( o , minLen ) ;
var n = Object . prototype . toString . call ( o ) . slice ( 8 , - 1 ) ;
if ( n === "Object" && o . constructor ) n = o . constructor . name ;
2020-06-26 15:33:47 +02:00
if ( n === "Map" || n === "Set" ) return Array . from ( o ) ;
2020-03-24 00:40:19 +01:00
if ( n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/ . test ( n ) ) return Object ( _arrayLikeToArray _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ /* default */ "a" ] ) ( o , minLen ) ;
}
2020-02-10 23:33:27 +01:00
/***/ } ) ,
2020-07-07 16:43:35 +02:00
/***/ 3 :
2018-12-18 04:14:52 +01:00
/***/ ( function ( module , exports ) {
2018-12-14 12:02:53 +01:00
2020-07-07 16:43:35 +02:00
( function ( ) { module . exports = this [ "wp" ] [ "components" ] ; } ( ) ) ;
/***/ } ) ,
/***/ 30 :
/***/ ( function ( module , exports ) {
( function ( ) { module . exports = this [ "wp" ] [ "url" ] ; } ( ) ) ;
2018-12-14 12:02:53 +01:00
2020-02-10 23:33:27 +01:00
/***/ } ) ,
2020-07-07 16:43:35 +02:00
/***/ 301 :
2020-02-10 23:33:27 +01:00
/***/ ( function ( module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) {
"use strict" ;
/* harmony import */ var _wordpress _element _ _WEBPACK _IMPORTED _MODULE _0 _ _ = _ _webpack _require _ _ ( 0 ) ;
/* harmony import */ var _wordpress _element _ _WEBPACK _IMPORTED _MODULE _0 _ _ _default = /*#__PURE__*/ _ _webpack _require _ _ . n ( _wordpress _element _ _WEBPACK _IMPORTED _MODULE _0 _ _ ) ;
2020-06-26 15:33:47 +02:00
/* harmony import */ var _wordpress _primitives _ _WEBPACK _IMPORTED _MODULE _1 _ _ = _ _webpack _require _ _ ( 6 ) ;
2020-02-10 23:33:27 +01:00
/* harmony import */ var _wordpress _primitives _ _WEBPACK _IMPORTED _MODULE _1 _ _ _default = /*#__PURE__*/ _ _webpack _require _ _ . n ( _wordpress _primitives _ _WEBPACK _IMPORTED _MODULE _1 _ _ ) ;
/ * *
* WordPress dependencies
* /
var code = Object ( _wordpress _element _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "createElement" ] ) ( _wordpress _primitives _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "SVG" ] , {
viewBox : "0 0 24 24" ,
xmlns : "http://www.w3.org/2000/svg"
} , Object ( _wordpress _element _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "createElement" ] ) ( _wordpress _primitives _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "Path" ] , {
2020-06-26 15:33:47 +02:00
d : "M20.8 10.7l-4.3-4.3-1.1 1.1 4.3 4.3c.1.1.1.3 0 .4l-4.3 4.3 1.1 1.1 4.3-4.3c.7-.8.7-1.9 0-2.6zM4.2 11.8l4.3-4.3-1-1-4.3 4.3c-.7.7-.7 1.8 0 2.5l4.3 4.3 1.1-1.1-4.3-4.3c-.2-.1-.2-.3-.1-.4z"
2020-02-10 23:33:27 +01:00
} ) ) ;
/* harmony default export */ _ _webpack _exports _ _ [ "a" ] = ( code ) ;
2020-06-26 15:33:47 +02:00
/***/ } ) ,
2020-07-07 16:43:35 +02:00
/***/ 31 :
2020-06-29 13:50:29 +02:00
/***/ ( function ( module , exports ) {
2020-07-07 16:43:35 +02:00
( function ( ) { module . exports = this [ "wp" ] [ "dom" ] ; } ( ) ) ;
2020-06-26 15:33:47 +02:00
2020-03-24 00:40:19 +01:00
/***/ } ) ,
2020-06-26 15:33:47 +02:00
/***/ 38 :
/***/ ( function ( module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) {
"use strict" ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "a" , function ( ) { return _arrayWithHoles ; } ) ;
function _arrayWithHoles ( arr ) {
if ( Array . isArray ( arr ) ) return arr ;
}
/***/ } ) ,
/***/ 39 :
/***/ ( function ( module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) {
"use strict" ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "a" , function ( ) { return _nonIterableRest ; } ) ;
function _nonIterableRest ( ) {
throw new TypeError ( "Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method." ) ;
}
/***/ } ) ,
/***/ 4 :
/***/ ( function ( module , exports ) {
( function ( ) { module . exports = this [ "wp" ] [ "data" ] ; } ( ) ) ;
/***/ } ) ,
/***/ 40 :
2018-12-14 12:02:53 +01:00
/***/ ( function ( module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) {
"use strict" ;
2018-12-18 04:14:52 +01:00
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "a" , function ( ) { return _typeof ; } ) ;
2018-12-14 12:02:53 +01:00
function _typeof ( obj ) {
2020-02-06 22:03:31 +01:00
"@babel/helpers - typeof" ;
2020-01-08 12:57:23 +01:00
if ( typeof Symbol === "function" && typeof Symbol . iterator === "symbol" ) {
2018-12-14 12:02:53 +01:00
_typeof = function _typeof ( obj ) {
2020-01-08 12:57:23 +01:00
return typeof obj ;
2018-12-14 12:02:53 +01:00
} ;
} else {
_typeof = function _typeof ( obj ) {
2020-01-08 12:57:23 +01:00
return obj && typeof Symbol === "function" && obj . constructor === Symbol && obj !== Symbol . prototype ? "symbol" : typeof obj ;
2018-12-14 12:02:53 +01:00
} ;
}
return _typeof ( obj ) ;
}
/***/ } ) ,
2020-07-07 16:43:35 +02:00
/***/ 41 :
/***/ ( function ( module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) {
"use strict" ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "a" , function ( ) { return _objectWithoutPropertiesLoose ; } ) ;
function _objectWithoutPropertiesLoose ( source , excluded ) {
if ( source == null ) return { } ;
var target = { } ;
var sourceKeys = Object . keys ( source ) ;
var key , i ;
for ( i = 0 ; i < sourceKeys . length ; i ++ ) {
key = sourceKeys [ i ] ;
if ( excluded . indexOf ( key ) >= 0 ) continue ;
target [ key ] = source [ key ] ;
}
return target ;
}
/***/ } ) ,
/***/ 410 :
2020-02-10 23:33:27 +01:00
/***/ ( function ( module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) {
"use strict" ;
2020-06-26 15:33:47 +02:00
/* harmony import */ var _wordpress _element _ _WEBPACK _IMPORTED _MODULE _0 _ _ = _ _webpack _require _ _ ( 0 ) ;
/* 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 _ _ ( 6 ) ;
/* harmony import */ var _wordpress _primitives _ _WEBPACK _IMPORTED _MODULE _1 _ _ _default = /*#__PURE__*/ _ _webpack _require _ _ . n ( _wordpress _primitives _ _WEBPACK _IMPORTED _MODULE _1 _ _ ) ;
2020-02-10 23:33:27 +01:00
2020-06-26 15:33:47 +02:00
/ * *
* WordPress dependencies
* /
2020-02-10 23:33:27 +01:00
2020-06-26 15:33:47 +02:00
var textColor = Object ( _wordpress _element _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "createElement" ] ) ( _wordpress _primitives _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "SVG" ] , {
xmlns : "http://www.w3.org/2000/svg" ,
viewBox : "-2 -2 24 24"
} , Object ( _wordpress _element _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "createElement" ] ) ( _wordpress _primitives _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "Path" ] , {
d : "M13.23 15h1.9L11 4H9L5 15h1.88l1.07-3h4.18zm-1.53-4.54H8.51L10 5.6z"
} ) ) ;
/* harmony default export */ _ _webpack _exports _ _ [ "a" ] = ( textColor ) ;
2020-02-10 23:33:27 +01:00
/***/ } ) ,
2020-07-07 16:43:35 +02:00
/***/ 445 :
2018-12-14 12:02:53 +01:00
/***/ ( function ( module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) {
"use strict" ;
2020-06-29 13:50:29 +02:00
// ESM COMPAT FLAG
2018-12-14 12:02:53 +01:00
_ _webpack _require _ _ . r ( _ _webpack _exports _ _ ) ;
2018-12-18 04:14:52 +01:00
2020-01-08 12:57:23 +01:00
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js
2020-06-26 15:33:47 +02:00
var objectWithoutProperties = _ _webpack _require _ _ ( 14 ) ;
2018-12-18 04:14:52 +01:00
2019-03-07 10:09:59 +01:00
// EXTERNAL MODULE: external {"this":["wp","richText"]}
2020-07-07 16:43:35 +02:00
var external _this _wp _richText _ = _ _webpack _require _ _ ( 24 ) ;
2019-03-07 10:09:59 +01:00
2018-12-18 04:14:52 +01:00
// EXTERNAL MODULE: external {"this":["wp","element"]}
var external _this _wp _element _ = _ _webpack _require _ _ ( 0 ) ;
// EXTERNAL MODULE: external {"this":["wp","i18n"]}
var external _this _wp _i18n _ = _ _webpack _require _ _ ( 1 ) ;
2019-03-21 13:48:00 +01:00
// EXTERNAL MODULE: external {"this":["wp","blockEditor"]}
2020-06-26 15:33:47 +02:00
var external _this _wp _blockEditor _ = _ _webpack _require _ _ ( 7 ) ;
2018-12-18 04:14:52 +01:00
2020-02-10 23:33:27 +01:00
// EXTERNAL MODULE: external {"this":["wp","primitives"]}
2020-06-26 15:33:47 +02:00
var external _this _wp _primitives _ = _ _webpack _require _ _ ( 6 ) ;
2020-02-10 23:33:27 +01:00
// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/format-bold.js
/ * *
* WordPress dependencies
* /
var formatBold = Object ( external _this _wp _element _ [ "createElement" ] ) ( external _this _wp _primitives _ [ "SVG" ] , {
xmlns : "http://www.w3.org/2000/svg" ,
2020-06-26 15:33:47 +02:00
viewBox : "0 0 24 24"
2020-02-10 23:33:27 +01:00
} , Object ( external _this _wp _element _ [ "createElement" ] ) ( external _this _wp _primitives _ [ "Path" ] , {
2020-06-26 15:33:47 +02:00
d : "M14.7 11.3c1-.6 1.5-1.6 1.5-3 0-2.3-1.3-3.4-4-3.4H7v14h5.8c1.4 0 2.5-.3 3.3-1 .8-.7 1.2-1.7 1.2-2.9.1-1.9-.8-3.1-2.6-3.7zm-5.1-4h2.3c.6 0 1.1.1 1.4.4.3.3.5.7.5 1.2s-.2 1-.5 1.2c-.3.3-.8.4-1.4.4H9.6V7.3zm4.6 9c-.4.3-1 .4-1.7.4H9.6v-3.9h2.9c.7 0 1.3.2 1.7.5.4.3.6.8.6 1.5s-.2 1.2-.6 1.5z"
2020-02-10 23:33:27 +01:00
} ) ) ;
/* harmony default export */ var format _bold = ( formatBold ) ;
2018-12-18 04:14:52 +01:00
// CONCATENATED MODULE: ./node_modules/@wordpress/format-library/build-module/bold/index.js
2018-12-14 12:02:53 +01:00
/ * *
* WordPress dependencies
* /
2020-02-10 23:33:27 +01:00
2018-12-18 04:14:52 +01:00
var bold _name = 'core/bold' ;
2019-09-19 17:19:18 +02:00
var title = Object ( external _this _wp _i18n _ [ "__" ] ) ( 'Bold' ) ;
2018-12-14 12:02:53 +01:00
var bold = {
2018-12-18 04:14:52 +01:00
name : bold _name ,
2019-09-19 17:19:18 +02:00
title : title ,
2018-12-17 05:52:00 +01:00
tagName : 'strong' ,
className : null ,
2018-12-14 12:02:53 +01:00
edit : function edit ( _ref ) {
var isActive = _ref . isActive ,
value = _ref . value ,
2020-02-06 22:03:31 +01:00
onChange = _ref . onChange ,
onFocus = _ref . onFocus ;
2018-12-14 12:02:53 +01:00
2020-02-06 22:03:31 +01:00
function onToggle ( ) {
onChange ( Object ( external _this _wp _richText _ [ "toggleFormat" ] ) ( value , {
2018-12-18 04:14:52 +01:00
type : bold _name
2018-12-14 12:02:53 +01:00
} ) ) ;
2020-02-06 22:03:31 +01:00
}
function onClick ( ) {
onToggle ( ) ;
onFocus ( ) ;
}
2018-12-14 12:02:53 +01:00
2019-03-21 13:48:00 +01:00
return Object ( external _this _wp _element _ [ "createElement" ] ) ( external _this _wp _element _ [ "Fragment" ] , null , Object ( external _this _wp _element _ [ "createElement" ] ) ( external _this _wp _blockEditor _ [ "RichTextShortcut" ] , {
2018-12-14 12:02:53 +01:00
type : "primary" ,
character : "b" ,
onUse : onToggle
2019-03-21 13:48:00 +01:00
} ) , Object ( external _this _wp _element _ [ "createElement" ] ) ( external _this _wp _blockEditor _ [ "RichTextToolbarButton" ] , {
2018-12-14 12:02:53 +01:00
name : "bold" ,
2020-02-10 23:33:27 +01:00
icon : format _bold ,
2019-09-19 17:19:18 +02:00
title : title ,
2020-02-06 22:03:31 +01:00
onClick : onClick ,
2018-12-14 12:02:53 +01:00
isActive : isActive ,
shortcutType : "primary" ,
shortcutCharacter : "b"
2019-09-19 17:19:18 +02:00
} ) , Object ( external _this _wp _element _ [ "createElement" ] ) ( external _this _wp _blockEditor _ [ "__unstableRichTextInputEvent" ] , {
2019-03-07 10:09:59 +01:00
inputType : "formatBold" ,
onInput : onToggle
2018-12-14 12:02:53 +01:00
} ) ) ;
}
} ;
2020-02-10 23:33:27 +01:00
// EXTERNAL MODULE: ./node_modules/@wordpress/icons/build-module/library/code.js
2020-07-07 16:43:35 +02:00
var code = _ _webpack _require _ _ ( 301 ) ;
2020-02-10 23:33:27 +01:00
2018-12-18 04:14:52 +01:00
// CONCATENATED MODULE: ./node_modules/@wordpress/format-library/build-module/code/index.js
2018-12-14 12:02:53 +01:00
/ * *
* WordPress dependencies
* /
2020-02-10 23:33:27 +01:00
2018-12-18 04:14:52 +01:00
var code _name = 'core/code' ;
2019-09-19 17:19:18 +02:00
var code _title = Object ( external _this _wp _i18n _ [ "__" ] ) ( 'Inline Code' ) ;
2020-02-10 23:33:27 +01:00
var code _code = {
2018-12-18 04:14:52 +01:00
name : code _name ,
2019-09-19 17:19:18 +02:00
title : code _title ,
2018-12-17 05:52:00 +01:00
tagName : 'code' ,
className : null ,
2019-09-19 17:19:18 +02:00
_ _unstableInputRule : function _ _unstableInputRule ( value ) {
var BACKTICK = '`' ;
var _value = value ,
start = _value . start ,
text = _value . text ;
var characterBefore = text . slice ( start - 1 , start ) ; // Quick check the text for the necessary character.
if ( characterBefore !== BACKTICK ) {
return value ;
}
var textBefore = text . slice ( 0 , start - 1 ) ;
var indexBefore = textBefore . lastIndexOf ( BACKTICK ) ;
if ( indexBefore === - 1 ) {
return value ;
}
var startIndex = indexBefore ;
var endIndex = start - 2 ;
if ( startIndex === endIndex ) {
return value ;
}
value = Object ( external _this _wp _richText _ [ "remove" ] ) ( value , startIndex , startIndex + 1 ) ;
value = Object ( external _this _wp _richText _ [ "remove" ] ) ( value , endIndex , endIndex + 1 ) ;
value = Object ( external _this _wp _richText _ [ "applyFormat" ] ) ( value , {
type : code _name
} , startIndex , endIndex ) ;
return value ;
} ,
2018-12-14 12:02:53 +01:00
edit : function edit ( _ref ) {
var value = _ref . value ,
2019-03-21 13:48:00 +01:00
onChange = _ref . onChange ,
2020-02-06 22:03:31 +01:00
onFocus = _ref . onFocus ,
2019-03-21 13:48:00 +01:00
isActive = _ref . isActive ;
2018-12-14 12:02:53 +01:00
2020-02-06 22:03:31 +01:00
function onClick ( ) {
onChange ( Object ( external _this _wp _richText _ [ "toggleFormat" ] ) ( value , {
2018-12-18 04:14:52 +01:00
type : code _name
2018-12-14 12:02:53 +01:00
} ) ) ;
2020-02-06 22:03:31 +01:00
onFocus ( ) ;
}
2018-12-14 12:02:53 +01:00
2019-09-19 17:19:18 +02:00
return Object ( external _this _wp _element _ [ "createElement" ] ) ( external _this _wp _blockEditor _ [ "RichTextToolbarButton" ] , {
2020-02-10 23:33:27 +01:00
icon : code [ "a" /* default */ ] ,
2019-09-19 17:19:18 +02:00
title : code _title ,
2020-02-06 22:03:31 +01:00
onClick : onClick ,
2019-09-19 17:19:18 +02:00
isActive : isActive
} ) ;
2018-12-14 12:02:53 +01:00
}
} ;
2020-02-06 22:03:31 +01:00
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/defineProperty.js
var defineProperty = _ _webpack _require _ _ ( 5 ) ;
2019-03-07 10:09:59 +01:00
2018-12-18 04:14:52 +01:00
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/classCallCheck.js
2020-06-26 15:33:47 +02:00
var classCallCheck = _ _webpack _require _ _ ( 19 ) ;
2018-12-14 12:02:53 +01:00
2018-12-18 04:14:52 +01:00
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/createClass.js
2020-06-26 15:33:47 +02:00
var createClass = _ _webpack _require _ _ ( 18 ) ;
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js
2020-07-07 16:43:35 +02:00
var assertThisInitialized = _ _webpack _require _ _ ( 12 ) ;
2018-12-14 12:02:53 +01:00
2018-12-18 04:14:52 +01:00
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js
2020-06-26 15:33:47 +02:00
var possibleConstructorReturn = _ _webpack _require _ _ ( 21 ) ;
2018-12-14 12:02:53 +01:00
2018-12-18 04:14:52 +01:00
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js
2020-07-07 16:43:35 +02:00
var getPrototypeOf = _ _webpack _require _ _ ( 15 ) ;
2018-12-18 04:14:52 +01:00
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/inherits.js + 1 modules
2020-06-26 15:33:47 +02:00
var inherits = _ _webpack _require _ _ ( 20 ) ;
2018-12-18 04:14:52 +01:00
// EXTERNAL MODULE: external {"this":["wp","components"]}
2019-09-19 17:19:18 +02:00
var external _this _wp _components _ = _ _webpack _require _ _ ( 3 ) ;
2018-12-18 04:14:52 +01:00
2019-03-07 10:09:59 +01:00
// EXTERNAL MODULE: external {"this":["wp","keycodes"]}
2020-03-16 23:07:16 +01:00
var external _this _wp _keycodes _ = _ _webpack _require _ _ ( 22 ) ;
2020-02-10 23:33:27 +01:00
// EXTERNAL MODULE: ./node_modules/@wordpress/icons/build-module/library/keyboard-return.js
2020-07-07 16:43:35 +02:00
var keyboard _return = _ _webpack _require _ _ ( 199 ) ;
2019-09-19 17:19:18 +02:00
2018-12-18 04:14:52 +01:00
// CONCATENATED MODULE: ./node_modules/@wordpress/format-library/build-module/image/index.js
2018-12-14 12:02:53 +01:00
2019-03-07 10:09:59 +01:00
2020-02-06 22:03:31 +01:00
function ownKeys ( object , enumerableOnly ) { var keys = Object . keys ( object ) ; if ( Object . getOwnPropertySymbols ) { var symbols = Object . getOwnPropertySymbols ( object ) ; if ( enumerableOnly ) symbols = symbols . filter ( function ( sym ) { return Object . getOwnPropertyDescriptor ( object , sym ) . enumerable ; } ) ; keys . push . apply ( keys , symbols ) ; } return keys ; }
function _objectSpread ( target ) { for ( var i = 1 ; i < arguments . length ; i ++ ) { var source = arguments [ i ] != null ? arguments [ i ] : { } ; if ( i % 2 ) { ownKeys ( Object ( source ) , true ) . forEach ( function ( key ) { Object ( defineProperty [ "a" /* default */ ] ) ( target , key , source [ key ] ) ; } ) ; } else if ( Object . getOwnPropertyDescriptors ) { Object . defineProperties ( target , Object . getOwnPropertyDescriptors ( source ) ) ; } else { ownKeys ( Object ( source ) ) . forEach ( function ( key ) { Object . defineProperty ( target , key , Object . getOwnPropertyDescriptor ( source , key ) ) ; } ) ; } } return target ; }
2020-06-26 15:33:47 +02:00
function _createSuper ( Derived ) { return function ( ) { var Super = Object ( getPrototypeOf [ "a" /* default */ ] ) ( Derived ) , result ; if ( _isNativeReflectConstruct ( ) ) { var NewTarget = Object ( getPrototypeOf [ "a" /* default */ ] ) ( this ) . constructor ; result = Reflect . construct ( Super , arguments , NewTarget ) ; } else { result = Super . apply ( this , arguments ) ; } return Object ( possibleConstructorReturn [ "a" /* default */ ] ) ( this , result ) ; } ; }
function _isNativeReflectConstruct ( ) { if ( typeof Reflect === "undefined" || ! Reflect . construct ) return false ; if ( Reflect . construct . sham ) return false ; if ( typeof Proxy === "function" ) return true ; try { Date . prototype . toString . call ( Reflect . construct ( Date , [ ] , function ( ) { } ) ) ; return true ; } catch ( e ) { return false ; } }
2018-12-14 12:02:53 +01:00
/ * *
* WordPress dependencies
* /
2019-03-07 10:09:59 +01:00
2020-02-10 23:33:27 +01:00
2018-12-14 12:02:53 +01:00
var ALLOWED _MEDIA _TYPES = [ 'image' ] ;
2018-12-18 04:14:52 +01:00
var image _name = 'core/image' ;
2019-03-07 10:09:59 +01:00
2019-09-19 17:19:18 +02:00
var image _title = Object ( external _this _wp _i18n _ [ "__" ] ) ( 'Inline image' ) ;
2019-03-07 10:09:59 +01:00
var stopKeyPropagation = function stopKeyPropagation ( event ) {
return event . stopPropagation ( ) ;
} ;
2020-01-08 12:57:23 +01:00
function getRange ( ) {
var selection = window . getSelection ( ) ;
return selection . rangeCount ? selection . getRangeAt ( 0 ) : null ;
}
2019-09-19 17:19:18 +02:00
2018-12-18 04:14:52 +01:00
var image _image = {
name : image _name ,
2019-09-19 17:19:18 +02:00
title : image _title ,
2018-12-18 04:14:52 +01:00
keywords : [ Object ( external _this _wp _i18n _ [ "__" ] ) ( 'photo' ) , Object ( external _this _wp _i18n _ [ "__" ] ) ( 'media' ) ] ,
2018-12-14 12:02:53 +01:00
object : true ,
2018-12-17 05:52:00 +01:00
tagName : 'img' ,
className : null ,
2018-12-14 12:02:53 +01:00
attributes : {
className : 'class' ,
style : 'style' ,
url : 'src' ,
alt : 'alt'
} ,
2020-06-26 15:33:47 +02:00
edit : /*#__PURE__*/ function ( _Component ) {
2018-12-18 04:14:52 +01:00
Object ( inherits [ "a" /* default */ ] ) ( ImageEdit , _Component ) ;
2018-12-14 12:02:53 +01:00
2020-06-26 15:33:47 +02:00
var _super = _createSuper ( ImageEdit ) ;
2018-12-14 12:02:53 +01:00
function ImageEdit ( ) {
var _this ;
2018-12-18 04:14:52 +01:00
Object ( classCallCheck [ "a" /* default */ ] ) ( this , ImageEdit ) ;
2018-12-14 12:02:53 +01:00
2020-06-26 15:33:47 +02:00
_this = _super . apply ( this , arguments ) ;
2019-09-19 17:19:18 +02:00
_this . onChange = _this . onChange . bind ( Object ( assertThisInitialized [ "a" /* default */ ] ) ( _this ) ) ;
_this . onKeyDown = _this . onKeyDown . bind ( Object ( assertThisInitialized [ "a" /* default */ ] ) ( _this ) ) ;
_this . openModal = _this . openModal . bind ( Object ( assertThisInitialized [ "a" /* default */ ] ) ( _this ) ) ;
_this . closeModal = _this . closeModal . bind ( Object ( assertThisInitialized [ "a" /* default */ ] ) ( _this ) ) ;
2020-02-18 00:02:14 +01:00
_this . anchorRef = null ;
2018-12-14 12:02:53 +01:00
_this . state = {
modal : false
} ;
return _this ;
}
2018-12-18 04:14:52 +01:00
Object ( createClass [ "a" /* default */ ] ) ( ImageEdit , [ {
2019-03-07 10:09:59 +01:00
key : "onChange" ,
value : function onChange ( width ) {
this . setState ( {
width : width
} ) ;
}
} , {
key : "onKeyDown" ,
value : function onKeyDown ( event ) {
if ( [ external _this _wp _keycodes _ [ "LEFT" ] , external _this _wp _keycodes _ [ "DOWN" ] , external _this _wp _keycodes _ [ "RIGHT" ] , external _this _wp _keycodes _ [ "UP" ] , external _this _wp _keycodes _ [ "BACKSPACE" ] , external _this _wp _keycodes _ [ "ENTER" ] ] . indexOf ( event . keyCode ) > - 1 ) {
// Stop the key event from propagating up to ObserveTyping.startTypingInTextField.
event . stopPropagation ( ) ;
}
}
} , {
2018-12-14 12:02:53 +01:00
key : "openModal" ,
value : function openModal ( ) {
this . setState ( {
modal : true
} ) ;
}
} , {
key : "closeModal" ,
value : function closeModal ( ) {
this . setState ( {
modal : false
} ) ;
}
2020-02-18 00:02:14 +01:00
} , {
key : "componentDidMount" ,
value : function componentDidMount ( ) {
this . anchorRef = getRange ( ) ;
}
} , {
key : "componentDidUpdate" ,
value : function componentDidUpdate ( prevProps ) {
// When the popover is open or when the selected image changes,
// update the anchorRef.
if ( ! prevProps . isObjectActive && this . props . isObjectActive || prevProps . activeObjectAttributes . url !== this . props . activeObjectAttributes . url ) {
this . anchorRef = getRange ( ) ;
}
}
2018-12-14 12:02:53 +01:00
} , {
key : "render" ,
value : function render ( ) {
var _this2 = this ;
var _this$props = this . props ,
value = _this$props . value ,
2019-03-07 10:09:59 +01:00
onChange = _this$props . onChange ,
2020-02-06 22:03:31 +01:00
onFocus = _this$props . onFocus ,
2019-03-21 13:48:00 +01:00
isObjectActive = _this$props . isObjectActive ,
activeObjectAttributes = _this$props . activeObjectAttributes ;
return Object ( external _this _wp _element _ [ "createElement" ] ) ( external _this _wp _blockEditor _ [ "MediaUploadCheck" ] , null , Object ( external _this _wp _element _ [ "createElement" ] ) ( external _this _wp _blockEditor _ [ "RichTextToolbarButton" ] , {
2018-12-18 04:14:52 +01:00
icon : Object ( external _this _wp _element _ [ "createElement" ] ) ( external _this _wp _components _ [ "SVG" ] , {
2018-12-14 12:02:53 +01:00
xmlns : "http://www.w3.org/2000/svg" ,
viewBox : "0 0 24 24"
2018-12-18 04:14:52 +01:00
} , Object ( external _this _wp _element _ [ "createElement" ] ) ( external _this _wp _components _ [ "Path" ] , {
2020-06-26 15:33:47 +02:00
d : "M4 18.5h16V17H4v1.5zM16 13v1.5h4V13h-4zM5.1 15h7.8c.6 0 1.1-.5 1.1-1.1V6.1c0-.6-.5-1.1-1.1-1.1H5.1C4.5 5 4 5.5 4 6.1v7.8c0 .6.5 1.1 1.1 1.1zm.4-8.5h7V10l-1-1c-.3-.3-.8-.3-1 0l-1.6 1.5-1.2-.7c-.3-.2-.6-.2-.9 0l-1.3 1V6.5zm0 6.1l1.8-1.3 1.3.8c.3.2.7.2.9-.1l1.5-1.4 1.5 1.4v1.5h-7v-.9z"
2018-12-14 12:02:53 +01:00
} ) ) ,
2019-09-19 17:19:18 +02:00
title : image _title ,
2019-03-21 13:48:00 +01:00
onClick : this . openModal ,
isActive : isObjectActive
} ) , this . state . modal && Object ( external _this _wp _element _ [ "createElement" ] ) ( external _this _wp _blockEditor _ [ "MediaUpload" ] , {
2018-12-14 12:02:53 +01:00
allowedTypes : ALLOWED _MEDIA _TYPES ,
2020-01-08 12:57:23 +01:00
onSelect : function onSelect ( _ref ) {
var id = _ref . id ,
url = _ref . url ,
alt = _ref . alt ,
width = _ref . width ;
2018-12-14 12:02:53 +01:00
_this2 . closeModal ( ) ;
2018-12-18 04:14:52 +01:00
onChange ( Object ( external _this _wp _richText _ [ "insertObject" ] ) ( value , {
type : image _name ,
2018-12-14 12:02:53 +01:00
attributes : {
className : "wp-image-" . concat ( id ) ,
style : "width: " . concat ( Math . min ( width , 150 ) , "px;" ) ,
url : url ,
alt : alt
}
} ) ) ;
2020-02-06 22:03:31 +01:00
onFocus ( ) ;
2018-12-14 12:02:53 +01:00
} ,
onClose : this . closeModal ,
2020-01-08 12:57:23 +01:00
render : function render ( _ref2 ) {
var open = _ref2 . open ;
2018-12-14 12:02:53 +01:00
open ( ) ;
return null ;
}
2020-01-08 12:57:23 +01:00
} ) , isObjectActive && Object ( external _this _wp _element _ [ "createElement" ] ) ( external _this _wp _components _ [ "Popover" ] , {
position : "bottom center" ,
focusOnMount : false ,
2020-02-18 00:02:14 +01:00
anchorRef : this . anchorRef
2019-03-07 10:09:59 +01:00
} , Object ( external _this _wp _element _ [ "createElement" ] ) ( "form" , {
2020-02-06 22:03:31 +01:00
className : "block-editor-format-toolbar__image-container-content" ,
2019-03-07 10:09:59 +01:00
onKeyPress : stopKeyPropagation ,
onKeyDown : this . onKeyDown ,
onSubmit : function onSubmit ( event ) {
2019-03-21 13:48:00 +01:00
var newReplacements = value . replacements . slice ( ) ;
newReplacements [ value . start ] = {
2019-03-07 10:09:59 +01:00
type : image _name ,
2020-02-06 22:03:31 +01:00
attributes : _objectSpread ( { } , activeObjectAttributes , {
2019-03-07 10:09:59 +01:00
style : "width: " . concat ( _this2 . state . width , "px;" )
} )
2019-03-21 13:48:00 +01:00
} ;
2020-02-06 22:03:31 +01:00
onChange ( _objectSpread ( { } , value , {
2019-03-21 13:48:00 +01:00
replacements : newReplacements
2019-03-07 10:09:59 +01:00
} ) ) ;
event . preventDefault ( ) ;
}
} , Object ( external _this _wp _element _ [ "createElement" ] ) ( external _this _wp _components _ [ "TextControl" ] , {
2020-02-06 22:03:31 +01:00
className : "block-editor-format-toolbar__image-container-value" ,
2019-03-07 10:09:59 +01:00
type : "number" ,
label : Object ( external _this _wp _i18n _ [ "__" ] ) ( 'Width' ) ,
value : this . state . width ,
min : 1 ,
onChange : this . onChange
2020-01-22 23:06:21 +01:00
} ) , Object ( external _this _wp _element _ [ "createElement" ] ) ( external _this _wp _components _ [ "Button" ] , {
2020-02-10 23:33:27 +01:00
icon : keyboard _return [ "a" /* default */ ] ,
2019-03-07 10:09:59 +01:00
label : Object ( external _this _wp _i18n _ [ "__" ] ) ( 'Apply' ) ,
type : "submit"
2019-09-19 17:19:18 +02:00
} ) ) ) ) ;
2019-03-07 10:09:59 +01:00
}
} ] , [ {
key : "getDerivedStateFromProps" ,
value : function getDerivedStateFromProps ( props , state ) {
2019-03-21 13:48:00 +01:00
var style = props . activeObjectAttributes . style ;
2019-03-07 10:09:59 +01:00
if ( style === state . previousStyle ) {
return null ;
}
if ( ! style ) {
return {
width : undefined ,
previousStyle : style
} ;
}
return {
width : style . replace ( /\D/g , '' ) ,
previousStyle : style
} ;
2018-12-14 12:02:53 +01:00
}
} ] ) ;
return ImageEdit ;
2018-12-18 04:14:52 +01:00
} ( external _this _wp _element _ [ "Component" ] )
2018-12-14 12:02:53 +01:00
} ;
2020-02-10 23:33:27 +01:00
// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/format-italic.js
/ * *
* WordPress dependencies
* /
var formatItalic = Object ( external _this _wp _element _ [ "createElement" ] ) ( external _this _wp _primitives _ [ "SVG" ] , {
xmlns : "http://www.w3.org/2000/svg" ,
2020-06-26 15:33:47 +02:00
viewBox : "0 0 24 24"
2020-02-10 23:33:27 +01:00
} , Object ( external _this _wp _element _ [ "createElement" ] ) ( external _this _wp _primitives _ [ "Path" ] , {
2020-06-26 15:33:47 +02:00
d : "M12.5 5L10 19h1.9l2.5-14z"
2020-02-10 23:33:27 +01:00
} ) ) ;
/* harmony default export */ var format _italic = ( formatItalic ) ;
2018-12-18 04:14:52 +01:00
// CONCATENATED MODULE: ./node_modules/@wordpress/format-library/build-module/italic/index.js
2018-12-14 12:02:53 +01:00
/ * *
* WordPress dependencies
* /
2020-02-10 23:33:27 +01:00
2018-12-18 04:14:52 +01:00
var italic _name = 'core/italic' ;
2019-09-19 17:19:18 +02:00
var italic _title = Object ( external _this _wp _i18n _ [ "__" ] ) ( 'Italic' ) ;
2018-12-14 12:02:53 +01:00
var italic = {
2018-12-18 04:14:52 +01:00
name : italic _name ,
2019-09-19 17:19:18 +02:00
title : italic _title ,
2018-12-17 05:52:00 +01:00
tagName : 'em' ,
className : null ,
2018-12-14 12:02:53 +01:00
edit : function edit ( _ref ) {
var isActive = _ref . isActive ,
value = _ref . value ,
2020-02-06 22:03:31 +01:00
onChange = _ref . onChange ,
onFocus = _ref . onFocus ;
2018-12-14 12:02:53 +01:00
2020-02-06 22:03:31 +01:00
function onToggle ( ) {
onChange ( Object ( external _this _wp _richText _ [ "toggleFormat" ] ) ( value , {
2018-12-18 04:14:52 +01:00
type : italic _name
2018-12-14 12:02:53 +01:00
} ) ) ;
2020-02-06 22:03:31 +01:00
}
function onClick ( ) {
onToggle ( ) ;
onFocus ( ) ;
}
2018-12-14 12:02:53 +01:00
2019-03-21 13:48:00 +01:00
return Object ( external _this _wp _element _ [ "createElement" ] ) ( external _this _wp _element _ [ "Fragment" ] , null , Object ( external _this _wp _element _ [ "createElement" ] ) ( external _this _wp _blockEditor _ [ "RichTextShortcut" ] , {
2018-12-14 12:02:53 +01:00
type : "primary" ,
character : "i" ,
onUse : onToggle
2019-03-21 13:48:00 +01:00
} ) , Object ( external _this _wp _element _ [ "createElement" ] ) ( external _this _wp _blockEditor _ [ "RichTextToolbarButton" ] , {
2018-12-14 12:02:53 +01:00
name : "italic" ,
2020-02-10 23:33:27 +01:00
icon : format _italic ,
2019-09-19 17:19:18 +02:00
title : italic _title ,
2020-02-06 22:03:31 +01:00
onClick : onClick ,
2018-12-14 12:02:53 +01:00
isActive : isActive ,
shortcutType : "primary" ,
shortcutCharacter : "i"
2019-09-19 17:19:18 +02:00
} ) , Object ( external _this _wp _element _ [ "createElement" ] ) ( external _this _wp _blockEditor _ [ "__unstableRichTextInputEvent" ] , {
2019-03-07 10:09:59 +01:00
inputType : "formatItalic" ,
onInput : onToggle
2018-12-14 12:02:53 +01:00
} ) ) ;
}
} ;
2018-12-18 04:14:52 +01:00
// EXTERNAL MODULE: external {"this":["wp","url"]}
2020-03-24 00:40:19 +01:00
var external _this _wp _url _ = _ _webpack _require _ _ ( 30 ) ;
2018-12-14 12:02:53 +01:00
2019-09-19 17:19:18 +02:00
// EXTERNAL MODULE: external {"this":["wp","htmlEntities"]}
2020-06-26 15:33:47 +02:00
var external _this _wp _htmlEntities _ = _ _webpack _require _ _ ( 62 ) ;
2020-02-10 23:33:27 +01:00
2020-06-26 15:33:47 +02:00
// EXTERNAL MODULE: ./node_modules/@wordpress/icons/build-module/library/link-off.js
2020-07-07 16:43:35 +02:00
var link _off = _ _webpack _require _ _ ( 201 ) ;
2020-02-10 23:33:27 +01:00
// EXTERNAL MODULE: ./node_modules/@wordpress/icons/build-module/library/link.js
2020-07-07 16:43:35 +02:00
var library _link = _ _webpack _require _ _ ( 175 ) ;
2020-02-10 23:33:27 +01:00
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/slicedToArray.js + 1 modules
2020-07-07 16:43:35 +02:00
var slicedToArray = _ _webpack _require _ _ ( 13 ) ;
2020-02-10 23:33:27 +01:00
2020-01-03 14:17:24 +01:00
// EXTERNAL MODULE: external {"this":"lodash"}
var external _this _lodash _ = _ _webpack _require _ _ ( 2 ) ;
2018-12-14 12:02:53 +01:00
2018-12-18 04:14:52 +01:00
// CONCATENATED MODULE: ./node_modules/@wordpress/format-library/build-module/link/utils.js
/ * *
* External dependencies
* /
2018-12-14 12:02:53 +01:00
2018-12-18 04:14:52 +01:00
/ * *
* WordPress dependencies
* /
2018-12-14 12:02:53 +01:00
2018-12-18 04:14:52 +01:00
/ * *
* Check for issues with the provided href .
*
* @ param { string } href The href .
*
* @ return { boolean } Is the href invalid ?
* /
function isValidHref ( href ) {
if ( ! href ) {
return false ;
}
var trimmedHref = href . trim ( ) ;
if ( ! trimmedHref ) {
return false ;
} // Does the href start with something that looks like a URL protocol?
if ( /^\S+:/ . test ( trimmedHref ) ) {
var protocol = Object ( external _this _wp _url _ [ "getProtocol" ] ) ( trimmedHref ) ;
if ( ! Object ( external _this _wp _url _ [ "isValidProtocol" ] ) ( protocol ) ) {
return false ;
} // Add some extra checks for http(s) URIs, since these are the most common use-case.
// This ensures URIs with an http protocol have exactly two forward slashes following the protocol.
2020-01-03 14:17:24 +01:00
if ( Object ( external _this _lodash _ [ "startsWith" ] ) ( protocol , 'http' ) && ! /^https?:\/\/[^\/\s]/i . test ( trimmedHref ) ) {
2018-12-18 04:14:52 +01:00
return false ;
}
var authority = Object ( external _this _wp _url _ [ "getAuthority" ] ) ( trimmedHref ) ;
if ( ! Object ( external _this _wp _url _ [ "isValidAuthority" ] ) ( authority ) ) {
return false ;
}
var path = Object ( external _this _wp _url _ [ "getPath" ] ) ( trimmedHref ) ;
if ( path && ! Object ( external _this _wp _url _ [ "isValidPath" ] ) ( path ) ) {
return false ;
}
var queryString = Object ( external _this _wp _url _ [ "getQueryString" ] ) ( trimmedHref ) ;
if ( queryString && ! Object ( external _this _wp _url _ [ "isValidQueryString" ] ) ( queryString ) ) {
return false ;
}
var fragment = Object ( external _this _wp _url _ [ "getFragment" ] ) ( trimmedHref ) ;
if ( fragment && ! Object ( external _this _wp _url _ [ "isValidFragment" ] ) ( fragment ) ) {
return false ;
}
} // Validate anchor links.
2020-01-03 14:17:24 +01:00
if ( Object ( external _this _lodash _ [ "startsWith" ] ) ( trimmedHref , '#' ) && ! Object ( external _this _wp _url _ [ "isValidFragment" ] ) ( trimmedHref ) ) {
2018-12-18 04:14:52 +01:00
return false ;
}
return true ;
}
2019-03-07 10:09:59 +01:00
/ * *
* Generates the format object that will be applied to the link text .
*
2019-09-19 17:19:18 +02:00
* @ param { Object } options
* @ param { string } options . url The href of the link .
2020-06-26 15:33:47 +02:00
* @ param { string } options . type The type of the link .
* @ param { string } options . id The ID of the link .
2019-09-19 17:19:18 +02:00
* @ param { boolean } options . opensInNewWindow Whether this link will open in a new window .
2019-03-07 10:09:59 +01:00
*
* @ return { Object } The final format object .
* /
function createLinkFormat ( _ref ) {
var url = _ref . url ,
2020-06-26 15:33:47 +02:00
type = _ref . type ,
id = _ref . id ,
2020-02-18 00:02:14 +01:00
opensInNewWindow = _ref . opensInNewWindow ;
2019-03-07 10:09:59 +01:00
var format = {
type : 'core/link' ,
attributes : {
url : url
}
} ;
2020-06-26 15:33:47 +02:00
if ( type ) format . attributes . type = type ;
if ( id ) format . attributes . id = id ;
2019-03-07 10:09:59 +01:00
if ( opensInNewWindow ) {
format . attributes . target = '_blank' ;
format . attributes . rel = 'noreferrer noopener' ;
}
return format ;
}
2018-12-18 04:14:52 +01:00
// CONCATENATED MODULE: ./node_modules/@wordpress/format-library/build-module/link/inline.js
2018-12-14 12:02:53 +01:00
2020-02-10 23:33:27 +01:00
function inline _ownKeys ( object , enumerableOnly ) { var keys = Object . keys ( object ) ; if ( Object . getOwnPropertySymbols ) { var symbols = Object . getOwnPropertySymbols ( object ) ; if ( enumerableOnly ) symbols = symbols . filter ( function ( sym ) { return Object . getOwnPropertyDescriptor ( object , sym ) . enumerable ; } ) ; keys . push . apply ( keys , symbols ) ; } return keys ; }
function inline _objectSpread ( target ) { for ( var i = 1 ; i < arguments . length ; i ++ ) { var source = arguments [ i ] != null ? arguments [ i ] : { } ; if ( i % 2 ) { inline _ownKeys ( Object ( source ) , true ) . forEach ( function ( key ) { Object ( defineProperty [ "a" /* default */ ] ) ( target , key , source [ key ] ) ; } ) ; } else if ( Object . getOwnPropertyDescriptors ) { Object . defineProperties ( target , Object . getOwnPropertyDescriptors ( source ) ) ; } else { inline _ownKeys ( Object ( source ) ) . forEach ( function ( key ) { Object . defineProperty ( target , key , Object . getOwnPropertyDescriptor ( source , key ) ) ; } ) ; } } return target ; }
2020-02-06 22:03:31 +01:00
/ * *
* External dependencies
* /
2019-04-22 14:40:04 +02:00
2018-12-14 12:02:53 +01:00
/ * *
* WordPress dependencies
* /
/ * *
* Internal dependencies
* /
2020-02-06 22:03:31 +01:00
function InlineLinkUI ( _ref ) {
2019-09-19 17:19:18 +02:00
var isActive = _ref . isActive ,
2020-02-06 22:03:31 +01:00
activeAttributes = _ref . activeAttributes ,
2019-09-19 17:19:18 +02:00
addingLink = _ref . addingLink ,
value = _ref . value ,
2020-02-06 22:03:31 +01:00
onChange = _ref . onChange ,
speak = _ref . speak ,
stopAddingLink = _ref . stopAddingLink ;
/ * *
* A unique key is generated when switching between editing and not editing
* a link , based on :
*
* - This component may be rendered _either _ when a link is active _or _
* when adding or editing a link .
* - It ' s only desirable to shift focus into the Popover when explicitly
* adding or editing a link , not when in the inline boundary of a link .
* - Focus behavior can only be controlled on a Popover at the time it
* mounts , so a new instance of the component must be mounted to
* programmatically enact the focusOnMount behavior .
*
* @ type { string }
* /
var mountingKey = Object ( external _this _wp _element _ [ "useMemo" ] ) ( external _this _lodash _ [ "uniqueId" ] , [ addingLink ] ) ;
2020-02-10 23:33:27 +01:00
/ * *
* Pending settings to be applied to the next link . When inserting a new
* link , toggle values cannot be applied immediately , because there is not
* yet a link for them to apply to . Thus , they are maintained in a state
* value until the time that the link can be inserted or edited .
*
* @ type { [ Object | undefined , Function ] }
* /
var _useState = Object ( external _this _wp _element _ [ "useState" ] ) ( ) ,
_useState2 = Object ( slicedToArray [ "a" /* default */ ] ) ( _useState , 2 ) ,
nextLinkValue = _useState2 [ 0 ] ,
setNextLinkValue = _useState2 [ 1 ] ;
2020-01-08 12:57:23 +01:00
var anchorRef = Object ( external _this _wp _element _ [ "useMemo" ] ) ( function ( ) {
2019-05-16 20:08:00 +02:00
var selection = window . getSelection ( ) ;
2019-04-22 14:40:04 +02:00
2020-01-08 12:57:23 +01:00
if ( ! selection . rangeCount ) {
2019-04-22 14:40:04 +02:00
return ;
}
2020-01-08 12:57:23 +01:00
var range = selection . getRangeAt ( 0 ) ;
2020-02-06 22:03:31 +01:00
if ( addingLink && ! isActive ) {
2020-01-08 12:57:23 +01:00
return range ;
2019-04-22 14:40:04 +02:00
}
var element = range . startContainer ; // If the caret is right before the element, select the next element.
element = element . nextElementSibling || element ;
while ( element . nodeType !== window . Node . ELEMENT _NODE ) {
element = element . parentNode ;
}
2020-01-08 12:57:23 +01:00
return element . closest ( 'a' ) ;
2020-02-06 22:03:31 +01:00
} , [ addingLink , value . start , value . end ] ) ;
2020-02-10 23:33:27 +01:00
var linkValue = inline _objectSpread ( {
2020-02-06 22:03:31 +01:00
url : activeAttributes . url ,
2020-06-26 15:33:47 +02:00
type : activeAttributes . type ,
id : activeAttributes . id ,
2020-02-06 22:03:31 +01:00
opensInNewTab : activeAttributes . target === '_blank'
2020-02-10 23:33:27 +01:00
} , nextLinkValue ) ;
2018-12-14 12:02:53 +01:00
2020-02-06 22:03:31 +01:00
function onChangeLink ( nextValue ) {
2020-02-10 23:33:27 +01:00
// Merge with values from state, both for the purpose of assigning the
// next state value, and for use in constructing the new link format if
// the link is ready to be applied.
nextValue = inline _objectSpread ( { } , nextLinkValue , { } , nextValue ) ; // LinkControl calls `onChange` immediately upon the toggling a setting.
var didToggleSetting = linkValue . opensInNewTab !== nextValue . opensInNewTab && linkValue . url === nextValue . url ; // If change handler was called as a result of a settings change during
// link insertion, it must be held in state until the link is ready to
// be applied.
var didToggleSettingForNewLink = didToggleSetting && nextValue . url === undefined ; // If link will be assigned, the state value can be considered flushed.
// Otherwise, persist the pending changes.
setNextLinkValue ( didToggleSettingForNewLink ? nextValue : undefined ) ;
if ( didToggleSettingForNewLink ) {
return ;
}
2020-02-06 22:03:31 +01:00
var newUrl = Object ( external _this _wp _url _ [ "prependHTTP" ] ) ( nextValue . url ) ;
var format = createLinkFormat ( {
url : newUrl ,
2020-06-26 15:33:47 +02:00
type : nextValue . type ,
id : nextValue . id !== undefined && nextValue . id !== null ? String ( nextValue . id ) : undefined ,
2020-02-18 00:02:14 +01:00
opensInNewWindow : nextValue . opensInNewTab
2020-02-06 22:03:31 +01:00
} ) ;
2018-12-14 12:02:53 +01:00
2020-02-06 22:03:31 +01:00
if ( Object ( external _this _wp _richText _ [ "isCollapsed" ] ) ( value ) && ! isActive ) {
2020-06-26 15:33:47 +02:00
var newText = nextValue . title || newUrl ;
2020-02-06 22:03:31 +01:00
var toInsert = Object ( external _this _wp _richText _ [ "applyFormat" ] ) ( Object ( external _this _wp _richText _ [ "create" ] ) ( {
2020-06-26 15:33:47 +02:00
text : newText
} ) , format , 0 , newText . length ) ;
2020-02-06 22:03:31 +01:00
onChange ( Object ( external _this _wp _richText _ [ "insert" ] ) ( value , toInsert ) ) ;
} else {
2020-06-26 15:33:47 +02:00
var newValue = Object ( external _this _wp _richText _ [ "applyFormat" ] ) ( value , format ) ;
newValue . start = newValue . end ;
newValue . activeFormats = [ ] ;
onChange ( newValue ) ;
2020-02-10 23:33:27 +01:00
} // Focus should only be shifted back to the formatted segment when the
// URL is submitted.
2018-12-14 12:02:53 +01:00
2020-02-10 23:33:27 +01:00
if ( ! didToggleSetting ) {
stopAddingLink ( ) ;
}
2019-10-15 18:17:12 +02:00
2020-02-06 22:03:31 +01:00
if ( ! isValidHref ( newUrl ) ) {
speak ( Object ( external _this _wp _i18n _ [ "__" ] ) ( 'Warning: the link has been inserted but may have errors. Please test it.' ) , 'assertive' ) ;
} else if ( isActive ) {
speak ( Object ( external _this _wp _i18n _ [ "__" ] ) ( 'Link edited.' ) , 'assertive' ) ;
} else {
speak ( Object ( external _this _wp _i18n _ [ "__" ] ) ( 'Link inserted.' ) , 'assertive' ) ;
2018-12-14 12:02:53 +01:00
}
2020-02-06 22:03:31 +01:00
}
2018-12-14 12:02:53 +01:00
2020-02-06 22:03:31 +01:00
return Object ( external _this _wp _element _ [ "createElement" ] ) ( external _this _wp _components _ [ "Popover" ] , {
key : mountingKey ,
anchorRef : anchorRef ,
focusOnMount : addingLink ? 'firstElement' : false ,
onClose : stopAddingLink ,
position : "bottom center"
} , Object ( external _this _wp _element _ [ "createElement" ] ) ( external _this _wp _blockEditor _ [ "__experimentalLinkControl" ] , {
value : linkValue ,
2020-02-10 23:33:27 +01:00
onChange : onChangeLink ,
forceIsEditingLink : addingLink
2020-02-06 22:03:31 +01:00
} ) ) ;
}
2018-12-14 12:02:53 +01:00
2020-02-06 22:03:31 +01:00
/* harmony default export */ var inline = ( Object ( external _this _wp _components _ [ "withSpokenMessages" ] ) ( InlineLinkUI ) ) ;
2018-12-14 12:02:53 +01:00
2018-12-18 04:14:52 +01:00
// CONCATENATED MODULE: ./node_modules/@wordpress/format-library/build-module/link/index.js
2018-12-14 12:02:53 +01:00
2020-06-26 15:33:47 +02:00
function link _createSuper ( Derived ) { return function ( ) { var Super = Object ( getPrototypeOf [ "a" /* default */ ] ) ( Derived ) , result ; if ( link _isNativeReflectConstruct ( ) ) { var NewTarget = Object ( getPrototypeOf [ "a" /* default */ ] ) ( this ) . constructor ; result = Reflect . construct ( Super , arguments , NewTarget ) ; } else { result = Super . apply ( this , arguments ) ; } return Object ( possibleConstructorReturn [ "a" /* default */ ] ) ( this , result ) ; } ; }
function link _isNativeReflectConstruct ( ) { if ( typeof Reflect === "undefined" || ! Reflect . construct ) return false ; if ( Reflect . construct . sham ) return false ; if ( typeof Proxy === "function" ) return true ; try { Date . prototype . toString . call ( Reflect . construct ( Date , [ ] , function ( ) { } ) ) ; return true ; } catch ( e ) { return false ; } }
2018-12-14 12:02:53 +01:00
/ * *
* WordPress dependencies
* /
2019-09-19 17:19:18 +02:00
2020-02-10 23:33:27 +01:00
2018-12-14 12:02:53 +01:00
/ * *
2018-12-18 04:14:52 +01:00
* Internal dependencies
2018-12-14 12:02:53 +01:00
* /
2018-12-18 04:14:52 +01:00
var link _name = 'core/link' ;
2019-09-19 17:19:18 +02:00
var link _title = Object ( external _this _wp _i18n _ [ "__" ] ) ( 'Link' ) ;
2018-12-18 04:14:52 +01:00
var link _link = {
name : link _name ,
2019-09-19 17:19:18 +02:00
title : link _title ,
2018-12-18 04:14:52 +01:00
tagName : 'a' ,
className : null ,
attributes : {
url : 'href' ,
2020-06-26 15:33:47 +02:00
type : 'data-type' ,
id : 'data-id' ,
2018-12-18 04:14:52 +01:00
target : 'target'
} ,
2019-09-19 17:19:18 +02:00
_ _unstablePasteRule : function _ _unstablePasteRule ( value , _ref ) {
var html = _ref . html ,
plainText = _ref . plainText ;
if ( Object ( external _this _wp _richText _ [ "isCollapsed" ] ) ( value ) ) {
return value ;
}
var pastedText = ( html || plainText ) . replace ( /<[^>]+>/g , '' ) . trim ( ) ; // A URL was pasted, turn the selection into a link
if ( ! Object ( external _this _wp _url _ [ "isURL" ] ) ( pastedText ) ) {
return value ;
} // Allows us to ask for this information when we get a report.
window . console . log ( 'Created link:\n\n' , pastedText ) ;
return Object ( external _this _wp _richText _ [ "applyFormat" ] ) ( value , {
type : link _name ,
attributes : {
url : Object ( external _this _wp _htmlEntities _ [ "decodeEntities" ] ) ( pastedText )
}
} ) ;
} ,
2020-06-26 15:33:47 +02:00
edit : Object ( external _this _wp _components _ [ "withSpokenMessages" ] ) ( /*#__PURE__*/ function ( _Component ) {
2018-12-18 04:14:52 +01:00
Object ( inherits [ "a" /* default */ ] ) ( LinkEdit , _Component ) ;
2018-12-14 12:02:53 +01:00
2020-06-26 15:33:47 +02:00
var _super = link _createSuper ( LinkEdit ) ;
2018-12-18 04:14:52 +01:00
function LinkEdit ( ) {
var _this ;
2018-12-14 12:02:53 +01:00
2018-12-18 04:14:52 +01:00
Object ( classCallCheck [ "a" /* default */ ] ) ( this , LinkEdit ) ;
2018-12-14 12:02:53 +01:00
2020-06-26 15:33:47 +02:00
_this = _super . apply ( this , arguments ) ;
2019-09-19 17:19:18 +02:00
_this . addLink = _this . addLink . bind ( Object ( assertThisInitialized [ "a" /* default */ ] ) ( _this ) ) ;
_this . stopAddingLink = _this . stopAddingLink . bind ( Object ( assertThisInitialized [ "a" /* default */ ] ) ( _this ) ) ;
_this . onRemoveFormat = _this . onRemoveFormat . bind ( Object ( assertThisInitialized [ "a" /* default */ ] ) ( _this ) ) ;
2018-12-18 04:14:52 +01:00
_this . state = {
addingLink : false
} ;
return _this ;
2018-12-17 05:52:00 +01:00
}
2018-12-18 04:14:52 +01:00
Object ( createClass [ "a" /* default */ ] ) ( LinkEdit , [ {
key : "addLink" ,
value : function addLink ( ) {
var _this$props = this . props ,
value = _this$props . value ,
onChange = _this$props . onChange ;
var text = Object ( external _this _wp _richText _ [ "getTextContent" ] ) ( Object ( external _this _wp _richText _ [ "slice" ] ) ( value ) ) ;
2018-12-17 05:52:00 +01:00
2018-12-18 04:14:52 +01:00
if ( text && Object ( external _this _wp _url _ [ "isURL" ] ) ( text ) ) {
onChange ( Object ( external _this _wp _richText _ [ "applyFormat" ] ) ( value , {
type : link _name ,
attributes : {
url : text
}
} ) ) ;
2019-09-19 17:19:18 +02:00
} else if ( text && Object ( external _this _wp _url _ [ "isEmail" ] ) ( text ) ) {
onChange ( Object ( external _this _wp _richText _ [ "applyFormat" ] ) ( value , {
type : link _name ,
attributes : {
url : "mailto:" . concat ( text )
}
} ) ) ;
2018-12-18 04:14:52 +01:00
} else {
this . setState ( {
addingLink : true
} ) ;
}
}
} , {
key : "stopAddingLink" ,
value : function stopAddingLink ( ) {
this . setState ( {
addingLink : false
} ) ;
2020-02-10 23:33:27 +01:00
this . props . onFocus ( ) ;
2018-12-18 04:14:52 +01:00
}
} , {
key : "onRemoveFormat" ,
value : function onRemoveFormat ( ) {
var _this$props2 = this . props ,
value = _this$props2 . value ,
onChange = _this$props2 . onChange ,
speak = _this$props2 . speak ;
onChange ( Object ( external _this _wp _richText _ [ "removeFormat" ] ) ( value , link _name ) ) ;
speak ( Object ( external _this _wp _i18n _ [ "__" ] ) ( 'Link removed.' ) , 'assertive' ) ;
}
} , {
key : "render" ,
value : function render ( ) {
var _this$props3 = this . props ,
isActive = _this$props3 . isActive ,
activeAttributes = _this$props3 . activeAttributes ,
value = _this$props3 . value ,
2020-02-10 23:33:27 +01:00
onChange = _this$props3 . onChange ;
2019-03-21 13:48:00 +01:00
return Object ( external _this _wp _element _ [ "createElement" ] ) ( external _this _wp _element _ [ "Fragment" ] , null , Object ( external _this _wp _element _ [ "createElement" ] ) ( external _this _wp _blockEditor _ [ "RichTextShortcut" ] , {
2018-12-18 04:14:52 +01:00
type : "primary" ,
character : "k" ,
onUse : this . addLink
2019-03-21 13:48:00 +01:00
} ) , Object ( external _this _wp _element _ [ "createElement" ] ) ( external _this _wp _blockEditor _ [ "RichTextShortcut" ] , {
2018-12-18 04:14:52 +01:00
type : "primaryShift" ,
character : "k" ,
onUse : this . onRemoveFormat
2019-03-21 13:48:00 +01:00
} ) , isActive && Object ( external _this _wp _element _ [ "createElement" ] ) ( external _this _wp _blockEditor _ [ "RichTextToolbarButton" ] , {
2018-12-18 04:14:52 +01:00
name : "link" ,
2020-06-26 15:33:47 +02:00
icon : link _off [ "a" /* default */ ] ,
2018-12-18 04:14:52 +01:00
title : Object ( external _this _wp _i18n _ [ "__" ] ) ( 'Unlink' ) ,
onClick : this . onRemoveFormat ,
isActive : isActive ,
shortcutType : "primaryShift" ,
shortcutCharacter : "k"
2019-03-21 13:48:00 +01:00
} ) , ! isActive && Object ( external _this _wp _element _ [ "createElement" ] ) ( external _this _wp _blockEditor _ [ "RichTextToolbarButton" ] , {
2018-12-18 04:14:52 +01:00
name : "link" ,
2020-02-10 23:33:27 +01:00
icon : library _link [ "a" /* default */ ] ,
2019-09-19 17:19:18 +02:00
title : link _title ,
2018-12-18 04:14:52 +01:00
onClick : this . addLink ,
isActive : isActive ,
shortcutType : "primary" ,
shortcutCharacter : "k"
2020-02-06 22:03:31 +01:00
} ) , ( this . state . addingLink || isActive ) && Object ( external _this _wp _element _ [ "createElement" ] ) ( inline , {
2018-12-18 04:14:52 +01:00
addingLink : this . state . addingLink ,
stopAddingLink : this . stopAddingLink ,
isActive : isActive ,
activeAttributes : activeAttributes ,
value : value ,
2020-02-10 23:33:27 +01:00
onChange : onChange
2018-12-18 04:14:52 +01:00
} ) ) ;
}
} ] ) ;
2018-12-14 12:02:53 +01:00
2018-12-18 04:14:52 +01:00
return LinkEdit ;
} ( external _this _wp _element _ [ "Component" ] ) )
} ;
2018-12-14 12:02:53 +01:00
2020-02-10 23:33:27 +01:00
// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/format-strikethrough.js
/ * *
* WordPress dependencies
* /
var formatStrikethrough = Object ( external _this _wp _element _ [ "createElement" ] ) ( external _this _wp _primitives _ [ "SVG" ] , {
xmlns : "http://www.w3.org/2000/svg" ,
2020-06-26 15:33:47 +02:00
viewBox : "0 0 24 24"
2020-02-10 23:33:27 +01:00
} , Object ( external _this _wp _element _ [ "createElement" ] ) ( external _this _wp _primitives _ [ "Path" ] , {
2020-06-26 15:33:47 +02:00
d : "M9.1 9v-.5c0-.6.2-1.1.7-1.4.5-.3 1.2-.5 2-.5.7 0 1.4.1 2.1.3.7.2 1.4.5 2.1.9l.2-1.9c-.6-.3-1.2-.5-1.9-.7-.8-.1-1.6-.2-2.4-.2-1.5 0-2.7.3-3.6 1-.8.7-1.2 1.5-1.2 2.6V9h2zM20 12H4v1h8.3c.3.1.6.2.8.3.5.2.9.5 1.1.8.3.3.4.7.4 1.2 0 .7-.2 1.1-.8 1.5-.5.3-1.2.5-2.1.5-.8 0-1.6-.1-2.4-.3-.8-.2-1.5-.5-2.2-.8L7 18.1c.5.2 1.2.4 2 .6.8.2 1.6.3 2.4.3 1.7 0 3-.3 3.9-1 .9-.7 1.3-1.6 1.3-2.8 0-.9-.2-1.7-.7-2.2H20v-1z"
2020-02-10 23:33:27 +01:00
} ) ) ;
/* harmony default export */ var format _strikethrough = ( formatStrikethrough ) ;
2018-12-18 04:14:52 +01:00
// CONCATENATED MODULE: ./node_modules/@wordpress/format-library/build-module/strikethrough/index.js
2018-12-14 12:02:53 +01:00
/ * *
* WordPress dependencies
* /
2020-02-10 23:33:27 +01:00
2018-12-18 04:14:52 +01:00
var strikethrough _name = 'core/strikethrough' ;
2019-09-19 17:19:18 +02:00
var strikethrough _title = Object ( external _this _wp _i18n _ [ "__" ] ) ( 'Strikethrough' ) ;
2018-12-14 12:02:53 +01:00
var strikethrough = {
2018-12-18 04:14:52 +01:00
name : strikethrough _name ,
2019-09-19 17:19:18 +02:00
title : strikethrough _title ,
2019-03-21 13:48:00 +01:00
tagName : 's' ,
2018-12-17 05:52:00 +01:00
className : null ,
2018-12-14 12:02:53 +01:00
edit : function edit ( _ref ) {
var isActive = _ref . isActive ,
value = _ref . value ,
2020-02-06 22:03:31 +01:00
onChange = _ref . onChange ,
onFocus = _ref . onFocus ;
2018-12-14 12:02:53 +01:00
2020-02-06 22:03:31 +01:00
function onClick ( ) {
onChange ( Object ( external _this _wp _richText _ [ "toggleFormat" ] ) ( value , {
2018-12-18 04:14:52 +01:00
type : strikethrough _name
2018-12-14 12:02:53 +01:00
} ) ) ;
2020-02-06 22:03:31 +01:00
onFocus ( ) ;
}
2018-12-14 12:02:53 +01:00
2019-09-19 17:19:18 +02:00
return Object ( external _this _wp _element _ [ "createElement" ] ) ( external _this _wp _blockEditor _ [ "RichTextToolbarButton" ] , {
2020-02-10 23:33:27 +01:00
icon : format _strikethrough ,
2019-09-19 17:19:18 +02:00
title : strikethrough _title ,
2020-02-06 22:03:31 +01:00
onClick : onClick ,
2019-09-19 17:19:18 +02:00
isActive : isActive
} ) ;
2018-12-14 12:02:53 +01:00
}
} ;
2019-03-07 10:09:59 +01:00
// CONCATENATED MODULE: ./node_modules/@wordpress/format-library/build-module/underline/index.js
2018-12-14 12:02:53 +01:00
2018-12-17 05:52:00 +01:00
2019-03-07 10:09:59 +01:00
/ * *
* WordPress dependencies
* /
var underline _name = 'core/underline' ;
var underline = {
name : underline _name ,
title : Object ( external _this _wp _i18n _ [ "__" ] ) ( 'Underline' ) ,
tagName : 'span' ,
className : null ,
attributes : {
style : 'style'
} ,
edit : function edit ( _ref ) {
var value = _ref . value ,
onChange = _ref . onChange ;
var onToggle = function onToggle ( ) {
onChange ( Object ( external _this _wp _richText _ [ "toggleFormat" ] ) ( value , {
type : underline _name ,
attributes : {
style : 'text-decoration: underline;'
}
} ) ) ;
} ;
2019-03-21 13:48:00 +01:00
return Object ( external _this _wp _element _ [ "createElement" ] ) ( external _this _wp _element _ [ "Fragment" ] , null , Object ( external _this _wp _element _ [ "createElement" ] ) ( external _this _wp _blockEditor _ [ "RichTextShortcut" ] , {
2019-03-07 10:09:59 +01:00
type : "primary" ,
character : "u" ,
onUse : onToggle
2019-09-19 17:19:18 +02:00
} ) , Object ( external _this _wp _element _ [ "createElement" ] ) ( external _this _wp _blockEditor _ [ "__unstableRichTextInputEvent" ] , {
2019-03-07 10:09:59 +01:00
inputType : "formatUnderline" ,
onInput : onToggle
} ) ) ;
}
} ;
2020-02-10 23:33:27 +01:00
// EXTERNAL MODULE: external {"this":["wp","data"]}
var external _this _wp _data _ = _ _webpack _require _ _ ( 4 ) ;
2020-06-26 15:33:47 +02:00
// EXTERNAL MODULE: ./node_modules/@wordpress/icons/build-module/icon/index.js
2020-07-07 16:43:35 +02:00
var icon = _ _webpack _require _ _ ( 131 ) ;
2020-06-26 15:33:47 +02:00
// EXTERNAL MODULE: ./node_modules/@wordpress/icons/build-module/library/text-color.js
2020-07-07 16:43:35 +02:00
var text _color = _ _webpack _require _ _ ( 410 ) ;
2020-06-26 15:33:47 +02:00
2020-02-10 23:33:27 +01:00
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/extends.js
2020-06-26 15:33:47 +02:00
var esm _extends = _ _webpack _require _ _ ( 8 ) ;
2020-02-10 23:33:27 +01:00
// EXTERNAL MODULE: external {"this":["wp","dom"]}
2020-07-07 16:43:35 +02:00
var external _this _wp _dom _ = _ _webpack _require _ _ ( 31 ) ;
2020-02-10 23:33:27 +01:00
// CONCATENATED MODULE: ./node_modules/@wordpress/format-library/build-module/text-color/inline.js
/ * *
* External dependencies
* /
/ * *
* WordPress dependencies
* /
function getActiveColor ( formatName , formatValue , colors ) {
var activeColorFormat = Object ( external _this _wp _richText _ [ "getActiveFormat" ] ) ( formatValue , formatName ) ;
if ( ! activeColorFormat ) {
return ;
}
var styleColor = activeColorFormat . attributes . style ;
if ( styleColor ) {
return styleColor . replace ( new RegExp ( "^color:\\s*" ) , '' ) ;
}
var currentClass = activeColorFormat . attributes . class ;
if ( currentClass ) {
var colorSlug = currentClass . replace ( /.*has-(.*?)-color.*/ , '$1' ) ;
return Object ( external _this _wp _blockEditor _ [ "getColorObjectByAttributeValues" ] ) ( colors , colorSlug ) . color ;
}
}
var inline _ColorPopoverAtLink = function ColorPopoverAtLink ( _ref ) {
2020-03-10 15:53:18 +01:00
var addingColor = _ref . addingColor ,
props = Object ( objectWithoutProperties [ "a" /* default */ ] ) ( _ref , [ "addingColor" ] ) ;
2020-02-10 23:33:27 +01:00
2020-03-10 15:53:18 +01:00
// There is no way to open a text formatter popover when another one is mounted.
// The first popover will always be dismounted when a click outside happens, so we can store the
// anchor Rect during the lifetime of the component.
2020-02-10 23:33:27 +01:00
var anchorRect = Object ( external _this _wp _element _ [ "useMemo" ] ) ( function ( ) {
var selection = window . getSelection ( ) ;
var range = selection . rangeCount > 0 ? selection . getRangeAt ( 0 ) : null ;
if ( ! range ) {
return ;
}
if ( addingColor ) {
return Object ( external _this _wp _dom _ [ "getRectangleFromRange" ] ) ( range ) ;
}
var element = range . startContainer ; // If the caret is right before the element, select the next element.
element = element . nextElementSibling || element ;
while ( element . nodeType !== window . Node . ELEMENT _NODE ) {
element = element . parentNode ;
}
var closest = element . closest ( 'span' ) ;
if ( closest ) {
return closest . getBoundingClientRect ( ) ;
}
2020-03-10 15:53:18 +01:00
} , [ ] ) ;
2020-02-10 23:33:27 +01:00
if ( ! anchorRect ) {
return null ;
}
return Object ( external _this _wp _element _ [ "createElement" ] ) ( external _this _wp _blockEditor _ [ "URLPopover" ] , Object ( esm _extends [ "a" /* default */ ] ) ( {
anchorRect : anchorRect
} , props ) ) ;
} ;
var inline _ColorPicker = function ColorPicker ( _ref2 ) {
var name = _ref2 . name ,
value = _ref2 . value ,
onChange = _ref2 . onChange ;
var colors = Object ( external _this _wp _data _ [ "useSelect" ] ) ( function ( select ) {
var _select = select ( 'core/block-editor' ) ,
getSettings = _select . getSettings ;
return Object ( external _this _lodash _ [ "get" ] ) ( getSettings ( ) , [ 'colors' ] , [ ] ) ;
} ) ;
var onColorChange = Object ( external _this _wp _element _ [ "useCallback" ] ) ( function ( color ) {
if ( color ) {
var colorObject = Object ( external _this _wp _blockEditor _ [ "getColorObjectByColorValue" ] ) ( colors , color ) ;
onChange ( Object ( external _this _wp _richText _ [ "applyFormat" ] ) ( value , {
type : name ,
attributes : colorObject ? {
class : Object ( external _this _wp _blockEditor _ [ "getColorClassName" ] ) ( 'color' , colorObject . slug )
} : {
style : "color:" . concat ( color )
}
} ) ) ;
} else {
onChange ( Object ( external _this _wp _richText _ [ "removeFormat" ] ) ( value , name ) ) ;
}
} , [ colors , onChange ] ) ;
var activeColor = Object ( external _this _wp _element _ [ "useMemo" ] ) ( function ( ) {
return getActiveColor ( name , value , colors ) ;
} , [ name , value , colors ] ) ;
return Object ( external _this _wp _element _ [ "createElement" ] ) ( external _this _wp _blockEditor _ [ "ColorPalette" ] , {
value : activeColor ,
onChange : onColorChange
} ) ;
} ;
var inline _InlineColorUI = function InlineColorUI ( _ref3 ) {
var name = _ref3 . name ,
value = _ref3 . value ,
onChange = _ref3 . onChange ,
onClose = _ref3 . onClose ,
isActive = _ref3 . isActive ,
addingColor = _ref3 . addingColor ;
return Object ( external _this _wp _element _ [ "createElement" ] ) ( inline _ColorPopoverAtLink , {
value : value ,
isActive : isActive ,
addingColor : addingColor ,
onClose : onClose ,
className : "components-inline-color-popover"
} , Object ( external _this _wp _element _ [ "createElement" ] ) ( inline _ColorPicker , {
name : name ,
value : value ,
onChange : onChange
} ) ) ;
} ;
/* harmony default export */ var text _color _inline = ( Object ( external _this _wp _components _ [ "withSpokenMessages" ] ) ( inline _InlineColorUI ) ) ;
// CONCATENATED MODULE: ./node_modules/@wordpress/format-library/build-module/text-color/index.js
/ * *
* External dependencies
* /
/ * *
* WordPress dependencies
* /
2020-02-18 00:02:14 +01:00
2020-02-10 23:33:27 +01:00
/ * *
* Internal dependencies
* /
var text _color _name = 'core/text-color' ;
var text _color _title = Object ( external _this _wp _i18n _ [ "__" ] ) ( 'Text Color' ) ;
var EMPTY _ARRAY = [ ] ;
function TextColorEdit ( _ref ) {
var value = _ref . value ,
onChange = _ref . onChange ,
isActive = _ref . isActive ,
activeAttributes = _ref . activeAttributes ;
2020-02-18 00:02:14 +01:00
var _useSelect = Object ( external _this _wp _data _ [ "useSelect" ] ) ( function ( select ) {
var blockEditorSelect = select ( 'core/block-editor' ) ;
var settings ;
if ( blockEditorSelect && blockEditorSelect . getSettings ) {
settings = blockEditorSelect . getSettings ( ) ;
} else {
settings = { } ;
2020-02-10 23:33:27 +01:00
}
2020-02-18 00:02:14 +01:00
return {
colors : Object ( external _this _lodash _ [ "get" ] ) ( settings , [ 'colors' ] , EMPTY _ARRAY ) ,
disableCustomColors : settings . disableCustomColors
} ;
} ) ,
colors = _useSelect . colors ,
disableCustomColors = _useSelect . disableCustomColors ;
2020-02-10 23:33:27 +01:00
var _useState = Object ( external _this _wp _element _ [ "useState" ] ) ( false ) ,
_useState2 = Object ( slicedToArray [ "a" /* default */ ] ) ( _useState , 2 ) ,
isAddingColor = _useState2 [ 0 ] ,
setIsAddingColor = _useState2 [ 1 ] ;
var enableIsAddingColor = Object ( external _this _wp _element _ [ "useCallback" ] ) ( function ( ) {
return setIsAddingColor ( true ) ;
} , [ setIsAddingColor ] ) ;
var disableIsAddingColor = Object ( external _this _wp _element _ [ "useCallback" ] ) ( function ( ) {
return setIsAddingColor ( false ) ;
} , [ setIsAddingColor ] ) ;
var colorIndicatorStyle = Object ( external _this _wp _element _ [ "useMemo" ] ) ( function ( ) {
var activeColor = getActiveColor ( text _color _name , value , colors ) ;
if ( ! activeColor ) {
return undefined ;
}
return {
backgroundColor : activeColor
} ;
} , [ value , colors ] ) ;
2020-02-18 00:02:14 +01:00
var hasColorsToChoose = ! Object ( external _this _lodash _ [ "isEmpty" ] ) ( colors ) || disableCustomColors !== true ;
if ( ! hasColorsToChoose && ! isActive ) {
return null ;
}
2020-02-10 23:33:27 +01:00
return Object ( external _this _wp _element _ [ "createElement" ] ) ( external _this _wp _element _ [ "Fragment" ] , null , Object ( external _this _wp _element _ [ "createElement" ] ) ( external _this _wp _blockEditor _ [ "RichTextToolbarButton" ] , {
key : isActive ? 'text-color' : 'text-color-not-active' ,
className : "format-library-text-color-button" ,
name : isActive ? 'text-color' : undefined ,
2020-06-26 15:33:47 +02:00
icon : Object ( external _this _wp _element _ [ "createElement" ] ) ( external _this _wp _element _ [ "Fragment" ] , null , Object ( external _this _wp _element _ [ "createElement" ] ) ( icon [ "a" /* default */ ] , {
icon : text _color [ "a" /* default */ ]
2020-02-10 23:33:27 +01:00
} ) , isActive && Object ( external _this _wp _element _ [ "createElement" ] ) ( "span" , {
className : "format-library-text-color-button__indicator" ,
style : colorIndicatorStyle
} ) ) ,
2020-02-18 00:02:14 +01:00
title : text _color _title // If has no colors to choose but a color is active remove the color onClick
,
onClick : hasColorsToChoose ? enableIsAddingColor : function ( ) {
return onChange ( Object ( external _this _wp _richText _ [ "removeFormat" ] ) ( value , text _color _name ) ) ;
}
2020-02-10 23:33:27 +01:00
} ) , isAddingColor && Object ( external _this _wp _element _ [ "createElement" ] ) ( text _color _inline , {
name : text _color _name ,
addingColor : isAddingColor ,
onClose : disableIsAddingColor ,
isActive : isActive ,
activeAttributes : activeAttributes ,
value : value ,
onChange : onChange
} ) ) ;
}
var textColor = {
name : text _color _name ,
title : text _color _title ,
tagName : 'span' ,
className : 'has-inline-color' ,
attributes : {
style : 'style' ,
class : 'class'
} ,
edit : TextColorEdit
} ;
2020-06-26 15:33:47 +02:00
// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/subscript.js
/ * *
* WordPress dependencies
* /
var subscript = Object ( external _this _wp _element _ [ "createElement" ] ) ( external _this _wp _primitives _ [ "SVG" ] , {
xmlns : "http://www.w3.org/2000/svg" ,
viewBox : "0 0 24 24"
} , Object ( external _this _wp _element _ [ "createElement" ] ) ( external _this _wp _primitives _ [ "Path" ] , {
d : "M16.9 18.3l.8-1.2c.4-.6.7-1.2.9-1.6.2-.4.3-.8.3-1.2 0-.3-.1-.7-.2-1-.1-.3-.4-.5-.6-.7-.3-.2-.6-.3-1-.3s-.8.1-1.1.2c-.3.1-.7.3-1 .6l.2 1.3c.3-.3.5-.5.8-.6s.6-.2.9-.2c.3 0 .5.1.7.2.2.2.2.4.2.7 0 .3-.1.5-.2.8-.1.3-.4.7-.8 1.3L15 19.4h4.3v-1.2h-2.4zM14.1 7.2h-2L9.5 11 6.9 7.2h-2l3.6 5.3L4.7 18h2l2.7-4 2.7 4h2l-3.8-5.5 3.8-5.3z"
} ) ) ;
/* harmony default export */ var library _subscript = ( subscript ) ;
// CONCATENATED MODULE: ./node_modules/@wordpress/format-library/build-module/subscript/index.js
/ * *
* WordPress dependencies
* /
var subscript _name = 'core/subscript' ;
var subscript _title = Object ( external _this _wp _i18n _ [ "__" ] ) ( 'Subscript' ) ;
var subscript _subscript = {
name : subscript _name ,
title : subscript _title ,
tagName : 'sub' ,
className : null ,
edit : function edit ( _ref ) {
var isActive = _ref . isActive ,
value = _ref . value ,
onChange = _ref . onChange ,
onFocus = _ref . onFocus ;
function onToggle ( ) {
onChange ( Object ( external _this _wp _richText _ [ "toggleFormat" ] ) ( value , {
type : subscript _name
} ) ) ;
}
function onClick ( ) {
onToggle ( ) ;
onFocus ( ) ;
}
return Object ( external _this _wp _element _ [ "createElement" ] ) ( external _this _wp _blockEditor _ [ "RichTextToolbarButton" ] , {
icon : library _subscript ,
title : subscript _title ,
onClick : onClick ,
isActive : isActive
} ) ;
}
} ;
// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/superscript.js
/ * *
* WordPress dependencies
* /
var superscript = Object ( external _this _wp _element _ [ "createElement" ] ) ( external _this _wp _primitives _ [ "SVG" ] , {
xmlns : "http://www.w3.org/2000/svg" ,
viewBox : "0 0 24 24"
} , Object ( external _this _wp _element _ [ "createElement" ] ) ( external _this _wp _primitives _ [ "Path" ] , {
d : "M16.9 10.3l.8-1.3c.4-.6.7-1.2.9-1.6.2-.4.3-.8.3-1.2 0-.3-.1-.7-.2-1-.2-.2-.4-.4-.7-.6-.3-.2-.6-.3-1-.3s-.8.1-1.1.2c-.3.1-.7.3-1 .6l.1 1.3c.3-.3.5-.5.8-.6s.6-.2.9-.2c.3 0 .5.1.7.2.2.2.2.4.2.7 0 .3-.1.5-.2.8-.1.3-.4.7-.8 1.3l-1.8 2.8h4.3v-1.2h-2.2zm-2.8-3.1h-2L9.5 11 6.9 7.2h-2l3.6 5.3L4.7 18h2l2.7-4 2.7 4h2l-3.8-5.5 3.8-5.3z"
} ) ) ;
/* harmony default export */ var library _superscript = ( superscript ) ;
// CONCATENATED MODULE: ./node_modules/@wordpress/format-library/build-module/superscript/index.js
/ * *
* WordPress dependencies
* /
var superscript _name = 'core/superscript' ;
var superscript _title = Object ( external _this _wp _i18n _ [ "__" ] ) ( 'Superscript' ) ;
var superscript _superscript = {
name : superscript _name ,
title : superscript _title ,
tagName : 'sup' ,
className : null ,
edit : function edit ( _ref ) {
var isActive = _ref . isActive ,
value = _ref . value ,
onChange = _ref . onChange ,
onFocus = _ref . onFocus ;
function onToggle ( ) {
onChange ( Object ( external _this _wp _richText _ [ "toggleFormat" ] ) ( value , {
type : superscript _name
} ) ) ;
}
function onClick ( ) {
onToggle ( ) ;
onFocus ( ) ;
}
return Object ( external _this _wp _element _ [ "createElement" ] ) ( external _this _wp _blockEditor _ [ "RichTextToolbarButton" ] , {
icon : library _superscript ,
title : superscript _title ,
onClick : onClick ,
isActive : isActive
} ) ;
}
} ;
2019-03-07 10:09:59 +01:00
// CONCATENATED MODULE: ./node_modules/@wordpress/format-library/build-module/default-formats.js
2018-12-18 04:14:52 +01:00
/ * *
* Internal dependencies
* /
2018-12-17 05:52:00 +01:00
2019-03-07 10:09:59 +01:00
2020-02-10 23:33:27 +01:00
2020-06-26 15:33:47 +02:00
/* harmony default export */ var default _formats = ( [ bold , code _code , image _image , italic , link _link , strikethrough , underline , textColor , subscript _subscript , superscript _superscript ] ) ;
2019-03-07 10:09:59 +01:00
// CONCATENATED MODULE: ./node_modules/@wordpress/format-library/build-module/index.js
2018-12-18 04:14:52 +01:00
/ * *
* WordPress dependencies
* /
2018-12-17 05:52:00 +01:00
2019-03-07 10:09:59 +01:00
/ * *
* Internal dependencies
* /
2018-12-17 05:52:00 +01:00
2019-03-07 10:09:59 +01:00
default _formats . forEach ( function ( _ref ) {
2018-12-18 04:14:52 +01:00
var name = _ref . name ,
settings = Object ( objectWithoutProperties [ "a" /* default */ ] ) ( _ref , [ "name" ] ) ;
2018-12-17 05:52:00 +01:00
2018-12-18 04:14:52 +01:00
return Object ( external _this _wp _richText _ [ "registerFormatType" ] ) ( name , settings ) ;
} ) ;
2018-12-17 05:52:00 +01:00
2018-12-14 12:02:53 +01:00
/***/ } ) ,
2020-02-06 22:03:31 +01:00
/***/ 5 :
2019-09-19 17:19:18 +02:00
/***/ ( function ( module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) {
"use strict" ;
2020-02-06 22:03:31 +01:00
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "a" , function ( ) { return _defineProperty ; } ) ;
function _defineProperty ( obj , key , value ) {
if ( key in obj ) {
Object . defineProperty ( obj , key , {
value : value ,
enumerable : true ,
configurable : true ,
writable : true
} ) ;
} else {
obj [ key ] = value ;
2019-09-19 17:19:18 +02:00
}
2020-02-06 22:03:31 +01:00
return obj ;
2019-09-19 17:19:18 +02:00
}
/***/ } ) ,
2020-06-26 15:33:47 +02:00
/***/ 6 :
/***/ ( function ( module , exports ) {
( function ( ) { module . exports = this [ "wp" ] [ "primitives" ] ; } ( ) ) ;
/***/ } ) ,
/***/ 62 :
2018-12-14 12:02:53 +01:00
/***/ ( function ( module , exports ) {
2019-09-19 17:19:18 +02:00
( function ( ) { module . exports = this [ "wp" ] [ "htmlEntities" ] ; } ( ) ) ;
/***/ } ) ,
2020-06-26 15:33:47 +02:00
/***/ 7 :
2020-02-06 22:03:31 +01:00
/***/ ( function ( module , exports ) {
2019-03-07 10:09:59 +01:00
2020-02-06 22:03:31 +01:00
( function ( ) { module . exports = this [ "wp" ] [ "blockEditor" ] ; } ( ) ) ;
2019-03-07 10:09:59 +01:00
2020-01-08 12:57:23 +01:00
/***/ } ) ,
2020-06-26 15:33:47 +02:00
/***/ 8 :
2020-01-22 23:06:21 +01:00
/***/ ( function ( module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) {
"use strict" ;
2020-06-26 15:33:47 +02:00
/* 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 ] ;
2020-01-22 23:06:21 +01:00
2020-06-26 15:33:47 +02:00
for ( var key in source ) {
if ( Object . prototype . hasOwnProperty . call ( source , key ) ) {
target [ key ] = source [ key ] ;
}
}
}
2020-02-10 23:33:27 +01:00
2020-06-26 15:33:47 +02:00
return target ;
} ;
2020-02-10 23:33:27 +01:00
2020-06-26 15:33:47 +02:00
return _extends . apply ( this , arguments ) ;
}
2020-02-10 23:33:27 +01:00
2018-12-14 12:02:53 +01:00
/***/ } )
2018-12-18 04:14:52 +01:00
/******/ } ) ;