this["wp"] = this["wp"] || {}; this["wp"]["components"] = /******/ (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 /******/ return __webpack_require__(__webpack_require__.s = "./node_modules/@wordpress/components/build-module/index.js"); /******/ }) /************************************************************************/ /******/ ({ /***/ "./node_modules/@babel/runtime/helpers/assertThisInitialized.js": /*!**********************************************************************!*\ !*** ./node_modules/@babel/runtime/helpers/assertThisInitialized.js ***! \**********************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } module.exports = _assertThisInitialized; /***/ }), /***/ "./node_modules/@babel/runtime/helpers/defineProperty.js": /*!***************************************************************!*\ !*** ./node_modules/@babel/runtime/helpers/defineProperty.js ***! \***************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { 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; } return obj; } module.exports = _defineProperty; /***/ }), /***/ "./node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js": /*!*******************************************************************!*\ !*** ./node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js ***! \*******************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _arrayWithHoles; }); function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } /***/ }), /***/ "./node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js": /*!**********************************************************************!*\ !*** ./node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js ***! \**********************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _arrayWithoutHoles; }); function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } } /***/ }), /***/ "./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js": /*!**************************************************************************!*\ !*** ./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js ***! \**************************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _assertThisInitialized; }); function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } /***/ }), /***/ "./node_modules/@babel/runtime/helpers/esm/classCallCheck.js": /*!*******************************************************************!*\ !*** ./node_modules/@babel/runtime/helpers/esm/classCallCheck.js ***! \*******************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _classCallCheck; }); function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } /***/ }), /***/ "./node_modules/@babel/runtime/helpers/esm/createClass.js": /*!****************************************************************!*\ !*** ./node_modules/@babel/runtime/helpers/esm/createClass.js ***! \****************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", 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); } } function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } /***/ }), /***/ "./node_modules/@babel/runtime/helpers/esm/defineProperty.js": /*!*******************************************************************!*\ !*** ./node_modules/@babel/runtime/helpers/esm/defineProperty.js ***! \*******************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", 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; } return obj; } /***/ }), /***/ "./node_modules/@babel/runtime/helpers/esm/extends.js": /*!************************************************************!*\ !*** ./node_modules/@babel/runtime/helpers/esm/extends.js ***! \************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _extends; }); function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } /***/ }), /***/ "./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js": /*!*******************************************************************!*\ !*** ./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js ***! \*******************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _getPrototypeOf; }); function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } /***/ }), /***/ "./node_modules/@babel/runtime/helpers/esm/inherits.js": /*!*************************************************************!*\ !*** ./node_modules/@babel/runtime/helpers/esm/inherits.js ***! \*************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _inherits; }); /* harmony import */ var _setPrototypeOf__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./setPrototypeOf */ "./node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js"); function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) Object(_setPrototypeOf__WEBPACK_IMPORTED_MODULE_0__["default"])(subClass, superClass); } /***/ }), /***/ "./node_modules/@babel/runtime/helpers/esm/iterableToArray.js": /*!********************************************************************!*\ !*** ./node_modules/@babel/runtime/helpers/esm/iterableToArray.js ***! \********************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _iterableToArray; }); function _iterableToArray(iter) { if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === "[object Arguments]") return Array.from(iter); } /***/ }), /***/ "./node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js": /*!*************************************************************************!*\ !*** ./node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js ***! \*************************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _iterableToArrayLimit; }); function _iterableToArrayLimit(arr, i) { 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; } /***/ }), /***/ "./node_modules/@babel/runtime/helpers/esm/nonIterableRest.js": /*!********************************************************************!*\ !*** ./node_modules/@babel/runtime/helpers/esm/nonIterableRest.js ***! \********************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _nonIterableRest; }); function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } /***/ }), /***/ "./node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js": /*!**********************************************************************!*\ !*** ./node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js ***! \**********************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _nonIterableSpread; }); function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance"); } /***/ }), /***/ "./node_modules/@babel/runtime/helpers/esm/objectSpread.js": /*!*****************************************************************!*\ !*** ./node_modules/@babel/runtime/helpers/esm/objectSpread.js ***! \*****************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _objectSpread; }); /* harmony import */ var _defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./defineProperty */ "./node_modules/@babel/runtime/helpers/esm/defineProperty.js"); function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { Object(_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(target, key, source[key]); }); } return target; } /***/ }), /***/ "./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js": /*!****************************************************************************!*\ !*** ./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js ***! \****************************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _objectWithoutProperties; }); /* harmony import */ var _objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./objectWithoutPropertiesLoose */ "./node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js"); function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = Object(_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_0__["default"])(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]; } } return target; } /***/ }), /***/ "./node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js": /*!*********************************************************************************!*\ !*** ./node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js ***! \*********************************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", 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; } /***/ }), /***/ "./node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js": /*!******************************************************************************!*\ !*** ./node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js ***! \******************************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _possibleConstructorReturn; }); /* harmony import */ var _helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../helpers/esm/typeof */ "./node_modules/@babel/runtime/helpers/esm/typeof.js"); /* harmony import */ var _assertThisInitialized__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./assertThisInitialized */ "./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js"); function _possibleConstructorReturn(self, call) { if (call && (Object(_helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_0__["default"])(call) === "object" || typeof call === "function")) { return call; } return Object(_assertThisInitialized__WEBPACK_IMPORTED_MODULE_1__["default"])(self); } /***/ }), /***/ "./node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js": /*!*******************************************************************!*\ !*** ./node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js ***! \*******************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _setPrototypeOf; }); function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } /***/ }), /***/ "./node_modules/@babel/runtime/helpers/esm/slicedToArray.js": /*!******************************************************************!*\ !*** ./node_modules/@babel/runtime/helpers/esm/slicedToArray.js ***! \******************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _slicedToArray; }); /* harmony import */ var _arrayWithHoles__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./arrayWithHoles */ "./node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js"); /* harmony import */ var _iterableToArrayLimit__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./iterableToArrayLimit */ "./node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js"); /* harmony import */ var _nonIterableRest__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./nonIterableRest */ "./node_modules/@babel/runtime/helpers/esm/nonIterableRest.js"); function _slicedToArray(arr, i) { return Object(_arrayWithHoles__WEBPACK_IMPORTED_MODULE_0__["default"])(arr) || Object(_iterableToArrayLimit__WEBPACK_IMPORTED_MODULE_1__["default"])(arr, i) || Object(_nonIterableRest__WEBPACK_IMPORTED_MODULE_2__["default"])(); } /***/ }), /***/ "./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js": /*!**********************************************************************!*\ !*** ./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js ***! \**********************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _toConsumableArray; }); /* harmony import */ var _arrayWithoutHoles__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./arrayWithoutHoles */ "./node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js"); /* harmony import */ var _iterableToArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./iterableToArray */ "./node_modules/@babel/runtime/helpers/esm/iterableToArray.js"); /* harmony import */ var _nonIterableSpread__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./nonIterableSpread */ "./node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js"); function _toConsumableArray(arr) { return Object(_arrayWithoutHoles__WEBPACK_IMPORTED_MODULE_0__["default"])(arr) || Object(_iterableToArray__WEBPACK_IMPORTED_MODULE_1__["default"])(arr) || Object(_nonIterableSpread__WEBPACK_IMPORTED_MODULE_2__["default"])(); } /***/ }), /***/ "./node_modules/@babel/runtime/helpers/esm/typeof.js": /*!***********************************************************!*\ !*** ./node_modules/@babel/runtime/helpers/esm/typeof.js ***! \***********************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _typeof; }); function _typeof2(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof2 = function _typeof2(obj) { return typeof obj; }; } else { _typeof2 = function _typeof2(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof2(obj); } function _typeof(obj) { if (typeof Symbol === "function" && _typeof2(Symbol.iterator) === "symbol") { _typeof = function _typeof(obj) { return _typeof2(obj); }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : _typeof2(obj); }; } return _typeof(obj); } /***/ }), /***/ "./node_modules/@babel/runtime/helpers/extends.js": /*!********************************************************!*\ !*** ./node_modules/@babel/runtime/helpers/extends.js ***! \********************************************************/ /*! no static exports found */ /***/ (function(module, exports) { function _extends() { module.exports = _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } module.exports = _extends; /***/ }), /***/ "./node_modules/@babel/runtime/helpers/inheritsLoose.js": /*!**************************************************************!*\ !*** ./node_modules/@babel/runtime/helpers/inheritsLoose.js ***! \**************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; } module.exports = _inheritsLoose; /***/ }), /***/ "./node_modules/@babel/runtime/helpers/objectWithoutPropertiesLoose.js": /*!*****************************************************************************!*\ !*** ./node_modules/@babel/runtime/helpers/objectWithoutPropertiesLoose.js ***! \*****************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { 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; } module.exports = _objectWithoutPropertiesLoose; /***/ }), /***/ "./node_modules/@wordpress/components/build-module/autocomplete/index.js": /*!*******************************************************************************!*\ !*** ./node_modules/@wordpress/components/build-module/autocomplete/index.js ***! \*******************************************************************************/ /*! exports provided: Autocomplete, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Autocomplete", function() { return Autocomplete; }); /* harmony import */ var _babel_runtime_helpers_esm_objectSpread__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectSpread */ "./node_modules/@babel/runtime/helpers/esm/objectSpread.js"); /* harmony import */ var _babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/defineProperty */ "./node_modules/@babel/runtime/helpers/esm/defineProperty.js"); /* harmony import */ var _babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/esm/classCallCheck */ "./node_modules/@babel/runtime/helpers/esm/classCallCheck.js"); /* harmony import */ var _babel_runtime_helpers_esm_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/esm/possibleConstructorReturn */ "./node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js"); /* harmony import */ var _babel_runtime_helpers_esm_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/esm/getPrototypeOf */ "./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js"); /* harmony import */ var _babel_runtime_helpers_esm_createClass__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @babel/runtime/helpers/esm/createClass */ "./node_modules/@babel/runtime/helpers/esm/createClass.js"); /* harmony import */ var _babel_runtime_helpers_esm_inherits__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @babel/runtime/helpers/esm/inherits */ "./node_modules/@babel/runtime/helpers/esm/inherits.js"); /* harmony import */ var _babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @babel/runtime/helpers/esm/assertThisInitialized */ "./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js"); /* harmony import */ var _babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @babel/runtime/helpers/esm/toConsumableArray */ "./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js"); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_9__); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js"); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_10__); /* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! lodash */ "lodash"); /* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_11__); /* harmony import */ var _wordpress_keycodes__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! @wordpress/keycodes */ "@wordpress/keycodes"); /* harmony import */ var _wordpress_keycodes__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(_wordpress_keycodes__WEBPACK_IMPORTED_MODULE_12__); /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_13__); /* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! @wordpress/compose */ "@wordpress/compose"); /* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(_wordpress_compose__WEBPACK_IMPORTED_MODULE_14__); /* harmony import */ var _wordpress_rich_text__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! @wordpress/rich-text */ "@wordpress/rich-text"); /* harmony import */ var _wordpress_rich_text__WEBPACK_IMPORTED_MODULE_15___default = /*#__PURE__*/__webpack_require__.n(_wordpress_rich_text__WEBPACK_IMPORTED_MODULE_15__); /* harmony import */ var _wordpress_dom__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! @wordpress/dom */ "@wordpress/dom"); /* harmony import */ var _wordpress_dom__WEBPACK_IMPORTED_MODULE_16___default = /*#__PURE__*/__webpack_require__.n(_wordpress_dom__WEBPACK_IMPORTED_MODULE_16__); /* harmony import */ var _higher_order_with_focus_outside__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../higher-order/with-focus-outside */ "./node_modules/@wordpress/components/build-module/higher-order/with-focus-outside/index.js"); /* harmony import */ var _button__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../button */ "./node_modules/@wordpress/components/build-module/button/index.js"); /* harmony import */ var _popover__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ../popover */ "./node_modules/@wordpress/components/build-module/popover/index.js"); /* harmony import */ var _higher_order_with_spoken_messages__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ../higher-order/with-spoken-messages */ "./node_modules/@wordpress/components/build-module/higher-order/with-spoken-messages/index.js"); /** * External dependencies */ /** * WordPress dependencies */ /** * Internal dependencies */ /** * A raw completer option. * @typedef {*} CompleterOption */ /** * @callback FnGetOptions * * @returns {(CompleterOption[]|Promise.)} The completer options or a promise for them. */ /** * @callback FnGetOptionKeywords * @param {CompleterOption} option a completer option. * * @returns {string[]} list of key words to search. */ /** * @callback FnIsOptionDisabled * @param {CompleterOption} option a completer option. * * @returns {string[]} whether or not the given option is disabled. */ /** * @callback FnGetOptionLabel * @param {CompleterOption} option a completer option. * * @returns {(string|Array.<(string|Component)>)} list of react components to render. */ /** * @callback FnAllowNode * @param {Node} textNode check if the completer can handle this text node. * * @returns {boolean} true if the completer can handle this text node. */ /** * @callback FnAllowContext * @param {Range} before the range before the auto complete trigger and query. * @param {Range} after the range after the autocomplete trigger and query. * * @returns {boolean} true if the completer can handle these ranges. */ /** * @typedef {Object} OptionCompletion * @property {('insert-at-caret', 'replace')} action the intended placement of the completion. * @property {OptionCompletionValue} value the completion value. */ /** * A completion value. * @typedef {(String|WPElement|Object)} OptionCompletionValue */ /** * @callback FnGetOptionCompletion * @param {CompleterOption} value the value of the completer option. * @param {Range} range the nodes included in the autocomplete trigger and query. * @param {String} query the text value of the autocomplete query. * * @returns {(OptionCompletion|OptionCompletionValue)} the completion for the given option. If an * OptionCompletionValue is returned, the * completion action defaults to `insert-at-caret`. */ /** * @typedef {Object} Completer * @property {String} name a way to identify a completer, useful for selective overriding. * @property {?String} className A class to apply to the popup menu. * @property {String} triggerPrefix the prefix that will display the menu. * @property {(CompleterOption[]|FnGetOptions)} options the completer options or a function to get them. * @property {?FnGetOptionKeywords} getOptionKeywords get the keywords for a given option. * @property {?FnIsOptionDisabled} isOptionDisabled get whether or not the given option is disabled. * @property {FnGetOptionLabel} getOptionLabel get the label for a given option. * @property {?FnAllowNode} allowNode filter the allowed text nodes in the autocomplete. * @property {?FnAllowContext} allowContext filter the context under which the autocomplete activates. * @property {FnGetOptionCompletion} getOptionCompletion get the completion associated with a given option. */ function filterOptions(search) { var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : []; var maxResults = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 10; var filtered = []; for (var i = 0; i < options.length; i++) { var option = options[i]; // Merge label into keywords var _option$keywords = option.keywords, keywords = _option$keywords === void 0 ? [] : _option$keywords; if ('string' === typeof option.label) { keywords = Object(_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_8__["default"])(keywords).concat([option.label]); } var isMatch = keywords.some(function (keyword) { return search.test(keyword); }); if (!isMatch) { continue; } filtered.push(option); // Abort early if max reached if (filtered.length === maxResults) { break; } } return filtered; } function getCaretRect() { var range = window.getSelection().getRangeAt(0); if (range) { return Object(_wordpress_dom__WEBPACK_IMPORTED_MODULE_16__["getRectangleFromRange"])(range); } } var Autocomplete = /*#__PURE__*/ function (_Component) { Object(_babel_runtime_helpers_esm_inherits__WEBPACK_IMPORTED_MODULE_6__["default"])(Autocomplete, _Component); Object(_babel_runtime_helpers_esm_createClass__WEBPACK_IMPORTED_MODULE_5__["default"])(Autocomplete, null, [{ key: "getInitialState", value: function getInitialState() { return { search: /./, selectedIndex: 0, suppress: undefined, open: undefined, query: undefined, filteredOptions: [] }; } }]); function Autocomplete() { var _this; Object(_babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_2__["default"])(this, Autocomplete); _this = Object(_babel_runtime_helpers_esm_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3__["default"])(this, Object(_babel_runtime_helpers_esm_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4__["default"])(Autocomplete).apply(this, arguments)); _this.bindNode = _this.bindNode.bind(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_7__["default"])(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_7__["default"])(_this))); _this.select = _this.select.bind(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_7__["default"])(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_7__["default"])(_this))); _this.reset = _this.reset.bind(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_7__["default"])(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_7__["default"])(_this))); _this.resetWhenSuppressed = _this.resetWhenSuppressed.bind(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_7__["default"])(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_7__["default"])(_this))); _this.handleKeyDown = _this.handleKeyDown.bind(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_7__["default"])(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_7__["default"])(_this))); _this.debouncedLoadOptions = Object(lodash__WEBPACK_IMPORTED_MODULE_11__["debounce"])(_this.loadOptions, 250); _this.state = _this.constructor.getInitialState(); return _this; } Object(_babel_runtime_helpers_esm_createClass__WEBPACK_IMPORTED_MODULE_5__["default"])(Autocomplete, [{ key: "bindNode", value: function bindNode(node) { this.node = node; } }, { key: "insertCompletion", value: function insertCompletion(replacement) { var _this$state = this.state, open = _this$state.open, query = _this$state.query; var _this$props = this.props, record = _this$props.record, onChange = _this$props.onChange; var end = record.start; var start = end - open.triggerPrefix.length - query.length; var toInsert = Object(_wordpress_rich_text__WEBPACK_IMPORTED_MODULE_15__["create"])({ html: Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_9__["renderToString"])(replacement) }); onChange(Object(_wordpress_rich_text__WEBPACK_IMPORTED_MODULE_15__["insert"])(record, toInsert, start, end)); } }, { key: "select", value: function select(option) { var onReplace = this.props.onReplace; var _this$state2 = this.state, open = _this$state2.open, query = _this$state2.query; var _ref = open || {}, getOptionCompletion = _ref.getOptionCompletion; if (option.isDisabled) { return; } if (getOptionCompletion) { var completion = getOptionCompletion(option.value, query); var _ref2 = undefined === completion.action || undefined === completion.value ? { action: 'insert-at-caret', value: completion } : completion, action = _ref2.action, value = _ref2.value; if ('replace' === action) { onReplace([value]); } else if ('insert-at-caret' === action) { this.insertCompletion(value); } } // Reset autocomplete state after insertion rather than before // so insertion events don't cause the completion menu to redisplay. this.reset(); } }, { key: "reset", value: function reset() { var isMounted = !!this.node; // Autocompletions may replace the block containing this component, // so we make sure it is mounted before resetting the state. if (isMounted) { this.setState(this.constructor.getInitialState()); } } }, { key: "resetWhenSuppressed", value: function resetWhenSuppressed() { var _this$state3 = this.state, open = _this$state3.open, suppress = _this$state3.suppress; if (open && suppress === open.idx) { this.reset(); } } }, { key: "handleFocusOutside", value: function handleFocusOutside() { this.reset(); } }, { key: "announce", value: function announce(filteredOptions) { var debouncedSpeak = this.props.debouncedSpeak; if (!debouncedSpeak) { return; } if (!!filteredOptions.length) { debouncedSpeak(Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_13__["sprintf"])(Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_13__["_n"])('%d result found, use up and down arrow keys to navigate.', '%d results found, use up and down arrow keys to navigate.', filteredOptions.length), filteredOptions.length), 'assertive'); } else { debouncedSpeak(Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_13__["__"])('No results.'), 'assertive'); } } /** * Load options for an autocompleter. * * @param {Completer} completer The autocompleter. * @param {string} query The query, if any. */ }, { key: "loadOptions", value: function loadOptions(completer, query) { var _this2 = this; var options = completer.options; /* * We support both synchronous and asynchronous retrieval of completer options * but internally treat all as async so we maintain a single, consistent code path. * * Because networks can be slow, and the internet is wonderfully unpredictable, * we don't want two promises updating the state at once. This ensures that only * the most recent promise will act on `optionsData`. This doesn't use the state * because `setState` is batched, and so there's no guarantee that setting * `activePromise` in the state would result in it actually being in `this.state` * before the promise resolves and we check to see if this is the active promise or not. */ var promise = this.activePromise = Promise.resolve(typeof options === 'function' ? options(query) : options).then(function (optionsData) { var _this2$setState; if (promise !== _this2.activePromise) { // Another promise has become active since this one was asked to resolve, so do nothing, // or else we might end triggering a race condition updating the state. return; } var keyedOptions = optionsData.map(function (optionData, optionIndex) { return { key: "".concat(completer.idx, "-").concat(optionIndex), value: optionData, label: completer.getOptionLabel(optionData), keywords: completer.getOptionKeywords ? completer.getOptionKeywords(optionData) : [], isDisabled: completer.isOptionDisabled ? completer.isOptionDisabled(optionData) : false }; }); var filteredOptions = filterOptions(_this2.state.search, keyedOptions); var selectedIndex = filteredOptions.length === _this2.state.filteredOptions.length ? _this2.state.selectedIndex : 0; _this2.setState((_this2$setState = {}, Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__["default"])(_this2$setState, 'options_' + completer.idx, keyedOptions), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__["default"])(_this2$setState, "filteredOptions", filteredOptions), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__["default"])(_this2$setState, "selectedIndex", selectedIndex), _this2$setState)); _this2.announce(filteredOptions); }); } }, { key: "handleKeyDown", value: function handleKeyDown(event) { var _this$state4 = this.state, open = _this$state4.open, suppress = _this$state4.suppress, selectedIndex = _this$state4.selectedIndex, filteredOptions = _this$state4.filteredOptions; if (!open) { return; } if (suppress === open.idx) { switch (event.keyCode) { // cancel popup suppression on CTRL+SPACE case _wordpress_keycodes__WEBPACK_IMPORTED_MODULE_12__["SPACE"]: var ctrlKey = event.ctrlKey, shiftKey = event.shiftKey, altKey = event.altKey, metaKey = event.metaKey; if (ctrlKey && !(shiftKey || altKey || metaKey)) { this.setState({ suppress: undefined }); event.preventDefault(); event.stopPropagation(); } break; // reset on cursor movement case _wordpress_keycodes__WEBPACK_IMPORTED_MODULE_12__["UP"]: case _wordpress_keycodes__WEBPACK_IMPORTED_MODULE_12__["DOWN"]: case _wordpress_keycodes__WEBPACK_IMPORTED_MODULE_12__["LEFT"]: case _wordpress_keycodes__WEBPACK_IMPORTED_MODULE_12__["RIGHT"]: this.reset(); } return; } if (filteredOptions.length === 0) { return; } var nextSelectedIndex; switch (event.keyCode) { case _wordpress_keycodes__WEBPACK_IMPORTED_MODULE_12__["UP"]: nextSelectedIndex = (selectedIndex === 0 ? filteredOptions.length : selectedIndex) - 1; this.setState({ selectedIndex: nextSelectedIndex }); break; case _wordpress_keycodes__WEBPACK_IMPORTED_MODULE_12__["DOWN"]: nextSelectedIndex = (selectedIndex + 1) % filteredOptions.length; this.setState({ selectedIndex: nextSelectedIndex }); break; case _wordpress_keycodes__WEBPACK_IMPORTED_MODULE_12__["ESCAPE"]: this.setState({ suppress: open.idx }); break; case _wordpress_keycodes__WEBPACK_IMPORTED_MODULE_12__["ENTER"]: this.select(filteredOptions[selectedIndex]); break; case _wordpress_keycodes__WEBPACK_IMPORTED_MODULE_12__["LEFT"]: case _wordpress_keycodes__WEBPACK_IMPORTED_MODULE_12__["RIGHT"]: this.reset(); return; default: return; } // Any handled keycode should prevent original behavior. This relies on // the early return in the default case. event.preventDefault(); event.stopPropagation(); } }, { key: "toggleKeyEvents", value: function toggleKeyEvents(isListening) { // This exists because we must capture ENTER key presses before RichText. // It seems that react fires the simulated capturing events after the // native browser event has already bubbled so we can't stopPropagation // and avoid RichText getting the event from TinyMCE, hence we must // register a native event handler. var handler = isListening ? 'addEventListener' : 'removeEventListener'; this.node[handler]('keydown', this.handleKeyDown, true); } }, { key: "componentDidUpdate", value: function componentDidUpdate(prevProps, prevState) { var _this$props2 = this.props, record = _this$props2.record, completers = _this$props2.completers; var prevRecord = prevProps.record; var prevOpen = prevState.open; if (!this.state.open !== !prevOpen) { this.toggleKeyEvents(!!this.state.open); } if (Object(_wordpress_rich_text__WEBPACK_IMPORTED_MODULE_15__["isCollapsed"])(record)) { var text = Object(_wordpress_rich_text__WEBPACK_IMPORTED_MODULE_15__["getTextContent"])(Object(_wordpress_rich_text__WEBPACK_IMPORTED_MODULE_15__["slice"])(record, 0)); var prevText = Object(_wordpress_rich_text__WEBPACK_IMPORTED_MODULE_15__["getTextContent"])(Object(_wordpress_rich_text__WEBPACK_IMPORTED_MODULE_15__["slice"])(prevRecord, 0)); if (text !== prevText) { var textAfterSelection = Object(_wordpress_rich_text__WEBPACK_IMPORTED_MODULE_15__["getTextContent"])(Object(_wordpress_rich_text__WEBPACK_IMPORTED_MODULE_15__["slice"])(record, undefined, Object(_wordpress_rich_text__WEBPACK_IMPORTED_MODULE_15__["getTextContent"])(record).length)); var allCompleters = Object(lodash__WEBPACK_IMPORTED_MODULE_11__["map"])(completers, function (completer, idx) { return Object(_babel_runtime_helpers_esm_objectSpread__WEBPACK_IMPORTED_MODULE_0__["default"])({}, completer, { idx: idx }); }); var open = Object(lodash__WEBPACK_IMPORTED_MODULE_11__["find"])(allCompleters, function (_ref3) { var triggerPrefix = _ref3.triggerPrefix, allowContext = _ref3.allowContext; var index = text.lastIndexOf(triggerPrefix); if (index === -1) { return false; } if (allowContext && !allowContext(text.slice(0, index), textAfterSelection)) { return false; } return /^\w*$/.test(text.slice(index + triggerPrefix.length)); }); if (!open) { this.reset(); return; } var match = text.match(new RegExp("".concat(open.triggerPrefix, "(\\w*)$"))); var query = match && match[1]; var _this$state5 = this.state, wasOpen = _this$state5.open, wasSuppress = _this$state5.suppress, wasQuery = _this$state5.query; if (open && (!wasOpen || open.idx !== wasOpen.idx || query !== wasQuery)) { if (open.isDebounced) { this.debouncedLoadOptions(open, query); } else { this.loadOptions(open, query); } } // create a regular expression to filter the options var search = open ? new RegExp('(?:\\b|\\s|^)' + Object(lodash__WEBPACK_IMPORTED_MODULE_11__["escapeRegExp"])(query), 'i') : /./; // filter the options we already have var filteredOptions = open ? filterOptions(search, this.state['options_' + open.idx]) : []; // check if we should still suppress the popover var suppress = open && wasSuppress === open.idx ? wasSuppress : undefined; // update the state if (wasOpen || open) { this.setState({ selectedIndex: 0, filteredOptions: filteredOptions, suppress: suppress, search: search, open: open, query: query }); } // announce the count of filtered options but only if they have loaded if (open && this.state['options_' + open.idx]) { this.announce(filteredOptions); } } } } }, { key: "componentWillUnmount", value: function componentWillUnmount() { this.toggleKeyEvents(false); this.debouncedLoadOptions.cancel(); } }, { key: "render", value: function render() { var _this3 = this; var _this$props3 = this.props, children = _this$props3.children, instanceId = _this$props3.instanceId; var _this$state6 = this.state, open = _this$state6.open, suppress = _this$state6.suppress, selectedIndex = _this$state6.selectedIndex, filteredOptions = _this$state6.filteredOptions; var _ref4 = filteredOptions[selectedIndex] || {}, _ref4$key = _ref4.key, selectedKey = _ref4$key === void 0 ? '' : _ref4$key; var _ref5 = open || {}, className = _ref5.className, idx = _ref5.idx; var isExpanded = suppress !== idx && filteredOptions.length > 0; var listBoxId = isExpanded ? "components-autocomplete-listbox-".concat(instanceId) : null; var activeId = isExpanded ? "components-autocomplete-item-".concat(instanceId, "-").concat(selectedKey) : null; // Disable reason: Clicking the editor should reset the autocomplete when the menu is suppressed /* eslint-disable jsx-a11y/no-static-element-interactions, jsx-a11y/onclick-has-role, jsx-a11y/click-events-have-key-events */ return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_9__["createElement"])("div", { ref: this.bindNode, onClick: this.resetWhenSuppressed, className: "components-autocomplete" }, children({ isExpanded: isExpanded, listBoxId: listBoxId, activeId: activeId }), isExpanded && Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_9__["createElement"])(_popover__WEBPACK_IMPORTED_MODULE_19__["default"], { focusOnMount: false, onClose: this.reset, position: "top right", className: "components-autocomplete__popover", getAnchorRect: getCaretRect }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_9__["createElement"])("div", { id: listBoxId, role: "listbox", className: "components-autocomplete__results" }, isExpanded && Object(lodash__WEBPACK_IMPORTED_MODULE_11__["map"])(filteredOptions, function (option, index) { return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_9__["createElement"])(_button__WEBPACK_IMPORTED_MODULE_18__["default"], { key: option.key, id: "components-autocomplete-item-".concat(instanceId, "-").concat(option.key), role: "option", "aria-selected": index === selectedIndex, disabled: option.isDisabled, className: classnames__WEBPACK_IMPORTED_MODULE_10___default()('components-autocomplete__result', className, { 'is-selected': index === selectedIndex }), onClick: function onClick() { return _this3.select(option); } }, option.label); })))); /* eslint-enable jsx-a11y/no-static-element-interactions, jsx-a11y/onclick-has-role, jsx-a11y/click-events-have-key-events */ } }]); return Autocomplete; }(_wordpress_element__WEBPACK_IMPORTED_MODULE_9__["Component"]); /* harmony default export */ __webpack_exports__["default"] = (Object(_wordpress_compose__WEBPACK_IMPORTED_MODULE_14__["compose"])([_higher_order_with_spoken_messages__WEBPACK_IMPORTED_MODULE_20__["default"], _wordpress_compose__WEBPACK_IMPORTED_MODULE_14__["withInstanceId"], _higher_order_with_focus_outside__WEBPACK_IMPORTED_MODULE_17__["default"]])(Autocomplete)); /***/ }), /***/ "./node_modules/@wordpress/components/build-module/base-control/index.js": /*!*******************************************************************************!*\ !*** ./node_modules/@wordpress/components/build-module/base-control/index.js ***! \*******************************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js"); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_1__); /** * External dependencies */ function BaseControl(_ref) { var id = _ref.id, label = _ref.label, help = _ref.help, className = _ref.className, children = _ref.children; return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])("div", { className: classnames__WEBPACK_IMPORTED_MODULE_1___default()('components-base-control', className) }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])("div", { className: "components-base-control__field" }, label && id && Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])("label", { className: "components-base-control__label", htmlFor: id }, label), label && !id && Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])("span", { className: "components-base-control__label" }, label), children), !!help && Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])("p", { id: id + '__help', className: "components-base-control__help" }, help)); } /* harmony default export */ __webpack_exports__["default"] = (BaseControl); /***/ }), /***/ "./node_modules/@wordpress/components/build-module/button-group/index.js": /*!*******************************************************************************!*\ !*** ./node_modules/@wordpress/components/build-module/button-group/index.js ***! \*******************************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ "./node_modules/@babel/runtime/helpers/esm/extends.js"); /* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutProperties */ "./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js"); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js"); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_3__); /** * External dependencies */ function ButtonGroup(_ref) { var className = _ref.className, props = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__["default"])(_ref, ["className"]); var classes = classnames__WEBPACK_IMPORTED_MODULE_3___default()('components-button-group', className); return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_2__["createElement"])("div", Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({}, props, { className: classes, role: "group" })); } /* harmony default export */ __webpack_exports__["default"] = (ButtonGroup); /***/ }), /***/ "./node_modules/@wordpress/components/build-module/button/index.js": /*!*************************************************************************!*\ !*** ./node_modules/@wordpress/components/build-module/button/index.js ***! \*************************************************************************/ /*! exports provided: Button, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Button", function() { return Button; }); /* harmony import */ var _babel_runtime_helpers_esm_objectSpread__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectSpread */ "./node_modules/@babel/runtime/helpers/esm/objectSpread.js"); /* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutProperties */ "./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js"); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js"); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_3__); /** * External dependencies */ /** * WordPress dependencies */ function Button(props, ref) { var href = props.href, target = props.target, isPrimary = props.isPrimary, isLarge = props.isLarge, isSmall = props.isSmall, isToggled = props.isToggled, isBusy = props.isBusy, isDefault = props.isDefault, isLink = props.isLink, isDestructive = props.isDestructive, className = props.className, disabled = props.disabled, additionalProps = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__["default"])(props, ["href", "target", "isPrimary", "isLarge", "isSmall", "isToggled", "isBusy", "isDefault", "isLink", "isDestructive", "className", "disabled"]); var classes = classnames__WEBPACK_IMPORTED_MODULE_2___default()('components-button', className, { 'is-button': isDefault || isPrimary || isLarge || isSmall, 'is-default': isDefault || isLarge || isSmall, 'is-primary': isPrimary, 'is-large': isLarge, 'is-small': isSmall, 'is-toggled': isToggled, 'is-busy': isBusy, 'is-link': isLink, 'is-destructive': isDestructive }); var tag = href !== undefined && !disabled ? 'a' : 'button'; var tagProps = tag === 'a' ? { href: href, target: target } : { type: 'button', disabled: disabled }; return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_3__["createElement"])(tag, Object(_babel_runtime_helpers_esm_objectSpread__WEBPACK_IMPORTED_MODULE_0__["default"])({}, tagProps, additionalProps, { className: classes, ref: ref })); } /* harmony default export */ __webpack_exports__["default"] = (Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_3__["forwardRef"])(Button)); /***/ }), /***/ "./node_modules/@wordpress/components/build-module/checkbox-control/index.js": /*!***********************************************************************************!*\ !*** ./node_modules/@wordpress/components/build-module/checkbox-control/index.js ***! \***********************************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ "./node_modules/@babel/runtime/helpers/esm/extends.js"); /* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutProperties */ "./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js"); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/compose */ "@wordpress/compose"); /* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_compose__WEBPACK_IMPORTED_MODULE_3__); /* harmony import */ var _base_control__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../base-control */ "./node_modules/@wordpress/components/build-module/base-control/index.js"); /** * External dependencies */ /** * Internal dependencies */ function CheckboxControl(_ref) { var label = _ref.label, className = _ref.className, heading = _ref.heading, checked = _ref.checked, help = _ref.help, instanceId = _ref.instanceId, onChange = _ref.onChange, props = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__["default"])(_ref, ["label", "className", "heading", "checked", "help", "instanceId", "onChange"]); var id = "inspector-checkbox-control-".concat(instanceId); var onChangeValue = function onChangeValue(event) { return onChange(event.target.checked); }; return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_2__["createElement"])(_base_control__WEBPACK_IMPORTED_MODULE_4__["default"], { label: heading, id: id, help: help, className: className }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_2__["createElement"])("input", Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({ id: id, className: "components-checkbox-control__input", type: "checkbox", value: "1", onChange: onChangeValue, checked: checked, "aria-describedby": !!help ? id + '__help' : undefined }, props)), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_2__["createElement"])("label", { className: "components-checkbox-control__label", htmlFor: id }, label)); } /* harmony default export */ __webpack_exports__["default"] = (Object(_wordpress_compose__WEBPACK_IMPORTED_MODULE_3__["withInstanceId"])(CheckboxControl)); /***/ }), /***/ "./node_modules/@wordpress/components/build-module/clipboard-button/index.js": /*!***********************************************************************************!*\ !*** ./node_modules/@wordpress/components/build-module/clipboard-button/index.js ***! \***********************************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ "./node_modules/@babel/runtime/helpers/esm/extends.js"); /* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutProperties */ "./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js"); /* harmony import */ var _babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/esm/classCallCheck */ "./node_modules/@babel/runtime/helpers/esm/classCallCheck.js"); /* harmony import */ var _babel_runtime_helpers_esm_createClass__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/esm/createClass */ "./node_modules/@babel/runtime/helpers/esm/createClass.js"); /* harmony import */ var _babel_runtime_helpers_esm_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/esm/possibleConstructorReturn */ "./node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js"); /* harmony import */ var _babel_runtime_helpers_esm_getPrototypeOf__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @babel/runtime/helpers/esm/getPrototypeOf */ "./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js"); /* harmony import */ var _babel_runtime_helpers_esm_inherits__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @babel/runtime/helpers/esm/inherits */ "./node_modules/@babel/runtime/helpers/esm/inherits.js"); /* harmony import */ var _babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @babel/runtime/helpers/esm/assertThisInitialized */ "./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js"); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_8__); /* harmony import */ var clipboard__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! clipboard */ "./node_modules/clipboard/lib/clipboard.js"); /* harmony import */ var clipboard__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(clipboard__WEBPACK_IMPORTED_MODULE_9__); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js"); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_10__); /* harmony import */ var _icon_button__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../icon-button */ "./node_modules/@wordpress/components/build-module/icon-button/index.js"); /* harmony import */ var _button__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../button */ "./node_modules/@wordpress/components/build-module/button/index.js"); /** * External dependencies */ /** * WordPress dependencies */ /** * Internal dependencies */ var ClipboardButton = /*#__PURE__*/ function (_Component) { Object(_babel_runtime_helpers_esm_inherits__WEBPACK_IMPORTED_MODULE_6__["default"])(ClipboardButton, _Component); function ClipboardButton() { var _this; Object(_babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_2__["default"])(this, ClipboardButton); _this = Object(_babel_runtime_helpers_esm_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_4__["default"])(this, Object(_babel_runtime_helpers_esm_getPrototypeOf__WEBPACK_IMPORTED_MODULE_5__["default"])(ClipboardButton).apply(this, arguments)); _this.bindContainer = _this.bindContainer.bind(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_7__["default"])(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_7__["default"])(_this))); _this.onCopy = _this.onCopy.bind(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_7__["default"])(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_7__["default"])(_this))); _this.getText = _this.getText.bind(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_7__["default"])(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_7__["default"])(_this))); return _this; } Object(_babel_runtime_helpers_esm_createClass__WEBPACK_IMPORTED_MODULE_3__["default"])(ClipboardButton, [{ key: "componentDidMount", value: function componentDidMount() { var container = this.container, getText = this.getText, onCopy = this.onCopy; var button = container.firstChild; this.clipboard = new clipboard__WEBPACK_IMPORTED_MODULE_9___default.a(button, { text: getText, container: container }); this.clipboard.on('success', onCopy); } }, { key: "componentWillUnmount", value: function componentWillUnmount() { this.clipboard.destroy(); delete this.clipboard; clearTimeout(this.onCopyTimeout); } }, { key: "bindContainer", value: function bindContainer(container) { this.container = container; } }, { key: "onCopy", value: function onCopy(args) { // Clearing selection will move focus back to the triggering button, // ensuring that it is not reset to the body, and further that it is // kept within the rendered node. args.clearSelection(); var _this$props = this.props, onCopy = _this$props.onCopy, onFinishCopy = _this$props.onFinishCopy; if (onCopy) { onCopy(); // For convenience and consistency, ClipboardButton offers to call // a secondary callback with delay. This is useful to reset // consumers' state, e.g. to revert a label from "Copied" to // "Copy". if (onFinishCopy) { clearTimeout(this.onCopyTimeout); this.onCopyTimeout = setTimeout(onFinishCopy, 4000); } } } }, { key: "getText", value: function getText() { var text = this.props.text; if ('function' === typeof text) { text = text(); } return text; } }, { key: "render", value: function render() { // Disable reason: Exclude from spread props passed to Button // eslint-disable-next-line no-unused-vars var _this$props2 = this.props, className = _this$props2.className, children = _this$props2.children, onCopy = _this$props2.onCopy, onFinishCopy = _this$props2.onFinishCopy, text = _this$props2.text, buttonProps = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__["default"])(_this$props2, ["className", "children", "onCopy", "onFinishCopy", "text"]); var icon = buttonProps.icon; var classes = classnames__WEBPACK_IMPORTED_MODULE_10___default()('components-clipboard-button', className); var ComponentToUse = icon ? _icon_button__WEBPACK_IMPORTED_MODULE_11__["default"] : _button__WEBPACK_IMPORTED_MODULE_12__["default"]; // Workaround for inconsistent behavior in Safari, where