80 /******/ // __webpack_public_path__ |
80 /******/ // __webpack_public_path__ |
81 /******/ __webpack_require__.p = ""; |
81 /******/ __webpack_require__.p = ""; |
82 /******/ |
82 /******/ |
83 /******/ |
83 /******/ |
84 /******/ // Load entry module and return exports |
84 /******/ // Load entry module and return exports |
85 /******/ return __webpack_require__(__webpack_require__.s = 443); |
85 /******/ return __webpack_require__(__webpack_require__.s = "7f3f"); |
86 /******/ }) |
86 /******/ }) |
87 /************************************************************************/ |
87 /************************************************************************/ |
88 /******/ ({ |
88 /******/ ({ |
89 |
89 |
90 /***/ 0: |
90 /***/ "//Lo": |
91 /***/ (function(module, exports) { |
|
92 |
|
93 (function() { module.exports = this["wp"]["element"]; }()); |
|
94 |
|
95 /***/ }), |
|
96 |
|
97 /***/ 1: |
|
98 /***/ (function(module, exports) { |
|
99 |
|
100 (function() { module.exports = this["wp"]["i18n"]; }()); |
|
101 |
|
102 /***/ }), |
|
103 |
|
104 /***/ 10: |
|
105 /***/ (function(module, exports) { |
|
106 |
|
107 (function() { module.exports = this["wp"]["blocks"]; }()); |
|
108 |
|
109 /***/ }), |
|
110 |
|
111 /***/ 100: |
|
112 /***/ (function(module, exports) { |
|
113 |
|
114 (function() { module.exports = this["wp"]["notices"]; }()); |
|
115 |
|
116 /***/ }), |
|
117 |
|
118 /***/ 137: |
|
119 /***/ (function(module, __webpack_exports__, __webpack_require__) { |
91 /***/ (function(module, __webpack_exports__, __webpack_require__) { |
120 |
92 |
121 "use strict"; |
93 "use strict"; |
122 /* harmony import */ var _babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(5); |
94 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("GRId"); |
123 /* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(15); |
|
124 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(0); |
|
125 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_2__); |
|
126 |
|
127 |
|
128 |
|
129 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; } |
|
130 |
|
131 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; } |
|
132 |
|
133 /** |
|
134 * WordPress dependencies |
|
135 */ |
|
136 // Disable reason: JSDoc linter doesn't seem to parse the union (`&`) correctly. |
|
137 |
|
138 /* eslint-disable jsdoc/valid-types */ |
|
139 |
|
140 /** @typedef {{icon: JSX.Element, size?: number} & import('react').ComponentPropsWithoutRef<'SVG'>} IconProps */ |
|
141 |
|
142 /* eslint-enable jsdoc/valid-types */ |
|
143 |
|
144 /** |
|
145 * Return an SVG icon. |
|
146 * |
|
147 * @param {IconProps} props icon is the SVG component to render |
|
148 * size is a number specifiying the icon size in pixels |
|
149 * Other props will be passed to wrapped SVG component |
|
150 * |
|
151 * @return {JSX.Element} Icon component |
|
152 */ |
|
153 |
|
154 function Icon(_ref) { |
|
155 var icon = _ref.icon, |
|
156 _ref$size = _ref.size, |
|
157 size = _ref$size === void 0 ? 24 : _ref$size, |
|
158 props = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(_ref, ["icon", "size"]); |
|
159 |
|
160 return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_2__["cloneElement"])(icon, _objectSpread({ |
|
161 width: size, |
|
162 height: size |
|
163 }, props)); |
|
164 } |
|
165 |
|
166 /* harmony default export */ __webpack_exports__["a"] = (Icon); |
|
167 |
|
168 |
|
169 /***/ }), |
|
170 |
|
171 /***/ 14: |
|
172 /***/ (function(module, __webpack_exports__, __webpack_require__) { |
|
173 |
|
174 "use strict"; |
|
175 |
|
176 // EXPORTS |
|
177 __webpack_require__.d(__webpack_exports__, "a", function() { return /* binding */ _slicedToArray; }); |
|
178 |
|
179 // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js |
|
180 var arrayWithHoles = __webpack_require__(38); |
|
181 |
|
182 // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js |
|
183 function _iterableToArrayLimit(arr, i) { |
|
184 if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return; |
|
185 var _arr = []; |
|
186 var _n = true; |
|
187 var _d = false; |
|
188 var _e = undefined; |
|
189 |
|
190 try { |
|
191 for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { |
|
192 _arr.push(_s.value); |
|
193 |
|
194 if (i && _arr.length === i) break; |
|
195 } |
|
196 } catch (err) { |
|
197 _d = true; |
|
198 _e = err; |
|
199 } finally { |
|
200 try { |
|
201 if (!_n && _i["return"] != null) _i["return"](); |
|
202 } finally { |
|
203 if (_d) throw _e; |
|
204 } |
|
205 } |
|
206 |
|
207 return _arr; |
|
208 } |
|
209 // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js |
|
210 var unsupportedIterableToArray = __webpack_require__(29); |
|
211 |
|
212 // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/nonIterableRest.js |
|
213 var nonIterableRest = __webpack_require__(39); |
|
214 |
|
215 // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/slicedToArray.js |
|
216 |
|
217 |
|
218 |
|
219 |
|
220 function _slicedToArray(arr, i) { |
|
221 return Object(arrayWithHoles["a" /* default */])(arr) || _iterableToArrayLimit(arr, i) || Object(unsupportedIterableToArray["a" /* default */])(arr, i) || Object(nonIterableRest["a" /* default */])(); |
|
222 } |
|
223 |
|
224 /***/ }), |
|
225 |
|
226 /***/ 15: |
|
227 /***/ (function(module, __webpack_exports__, __webpack_require__) { |
|
228 |
|
229 "use strict"; |
|
230 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _objectWithoutProperties; }); |
|
231 /* harmony import */ var _objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(41); |
|
232 |
|
233 function _objectWithoutProperties(source, excluded) { |
|
234 if (source == null) return {}; |
|
235 var target = Object(_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(source, excluded); |
|
236 var key, i; |
|
237 |
|
238 if (Object.getOwnPropertySymbols) { |
|
239 var sourceSymbolKeys = Object.getOwnPropertySymbols(source); |
|
240 |
|
241 for (i = 0; i < sourceSymbolKeys.length; i++) { |
|
242 key = sourceSymbolKeys[i]; |
|
243 if (excluded.indexOf(key) >= 0) continue; |
|
244 if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; |
|
245 target[key] = source[key]; |
|
246 } |
|
247 } |
|
248 |
|
249 return target; |
|
250 } |
|
251 |
|
252 /***/ }), |
|
253 |
|
254 /***/ 18: |
|
255 /***/ (function(module, __webpack_exports__, __webpack_require__) { |
|
256 |
|
257 "use strict"; |
|
258 |
|
259 // EXPORTS |
|
260 __webpack_require__.d(__webpack_exports__, "a", function() { return /* binding */ _toConsumableArray; }); |
|
261 |
|
262 // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js |
|
263 var arrayLikeToArray = __webpack_require__(26); |
|
264 |
|
265 // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js |
|
266 |
|
267 function _arrayWithoutHoles(arr) { |
|
268 if (Array.isArray(arr)) return Object(arrayLikeToArray["a" /* default */])(arr); |
|
269 } |
|
270 // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/iterableToArray.js |
|
271 var iterableToArray = __webpack_require__(35); |
|
272 |
|
273 // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js |
|
274 var unsupportedIterableToArray = __webpack_require__(29); |
|
275 |
|
276 // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js |
|
277 function _nonIterableSpread() { |
|
278 throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); |
|
279 } |
|
280 // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js |
|
281 |
|
282 |
|
283 |
|
284 |
|
285 function _toConsumableArray(arr) { |
|
286 return _arrayWithoutHoles(arr) || Object(iterableToArray["a" /* default */])(arr) || Object(unsupportedIterableToArray["a" /* default */])(arr) || _nonIterableSpread(); |
|
287 } |
|
288 |
|
289 /***/ }), |
|
290 |
|
291 /***/ 2: |
|
292 /***/ (function(module, exports) { |
|
293 |
|
294 (function() { module.exports = this["lodash"]; }()); |
|
295 |
|
296 /***/ }), |
|
297 |
|
298 /***/ 24: |
|
299 /***/ (function(module, exports) { |
|
300 |
|
301 (function() { module.exports = this["regeneratorRuntime"]; }()); |
|
302 |
|
303 /***/ }), |
|
304 |
|
305 /***/ 26: |
|
306 /***/ (function(module, __webpack_exports__, __webpack_require__) { |
|
307 |
|
308 "use strict"; |
|
309 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _arrayLikeToArray; }); |
|
310 function _arrayLikeToArray(arr, len) { |
|
311 if (len == null || len > arr.length) len = arr.length; |
|
312 |
|
313 for (var i = 0, arr2 = new Array(len); i < len; i++) { |
|
314 arr2[i] = arr[i]; |
|
315 } |
|
316 |
|
317 return arr2; |
|
318 } |
|
319 |
|
320 /***/ }), |
|
321 |
|
322 /***/ 262: |
|
323 /***/ (function(module, exports) { |
|
324 |
|
325 (function() { module.exports = this["wp"]["editPost"]; }()); |
|
326 |
|
327 /***/ }), |
|
328 |
|
329 /***/ 285: |
|
330 /***/ (function(module, __webpack_exports__, __webpack_require__) { |
|
331 |
|
332 "use strict"; |
|
333 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0); |
|
334 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); |
95 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); |
335 /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(6); |
96 /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("Tqx9"); |
336 /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__); |
97 /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__); |
337 |
98 |
338 |
99 |
339 /** |
100 /** |
340 * WordPress dependencies |
101 * WordPress dependencies |
341 */ |
102 */ |
342 |
103 |
343 var starFilled = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["SVG"], { |
104 const blockDefault = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["SVG"], { |
344 xmlns: "http://www.w3.org/2000/svg", |
105 xmlns: "http://www.w3.org/2000/svg", |
345 viewBox: "0 0 24 24" |
106 viewBox: "0 0 24 24" |
346 }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["Path"], { |
107 }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["Path"], { |
347 d: "M11.776 4.454a.25.25 0 01.448 0l2.069 4.192a.25.25 0 00.188.137l4.626.672a.25.25 0 01.139.426l-3.348 3.263a.25.25 0 00-.072.222l.79 4.607a.25.25 0 01-.362.263l-4.138-2.175a.25.25 0 00-.232 0l-4.138 2.175a.25.25 0 01-.363-.263l.79-4.607a.25.25 0 00-.071-.222L4.754 9.881a.25.25 0 01.139-.426l4.626-.672a.25.25 0 00.188-.137l2.069-4.192z" |
108 d: "M19 8h-1V6h-5v2h-2V6H6v2H5c-1.1 0-2 .9-2 2v8c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-8c0-1.1-.9-2-2-2zm.5 10c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5v-8c0-.3.2-.5.5-.5h14c.3 0 .5.2.5.5v8z" |
348 })); |
109 })); |
349 /* harmony default export */ __webpack_exports__["a"] = (starFilled); |
110 /* harmony default export */ __webpack_exports__["a"] = (blockDefault); |
350 |
111 |
351 |
112 |
352 /***/ }), |
113 /***/ }), |
353 |
114 |
354 /***/ 286: |
115 /***/ "1ZqX": |
355 /***/ (function(module, __webpack_exports__, __webpack_require__) { |
|
356 |
|
357 "use strict"; |
|
358 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0); |
|
359 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); |
|
360 /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(6); |
|
361 /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__); |
|
362 |
|
363 |
|
364 /** |
|
365 * WordPress dependencies |
|
366 */ |
|
367 |
|
368 var starEmpty = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["SVG"], { |
|
369 xmlns: "http://www.w3.org/2000/svg", |
|
370 viewBox: "0 0 24 24" |
|
371 }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["Path"], { |
|
372 fillRule: "evenodd", |
|
373 d: "M9.706 8.646a.25.25 0 01-.188.137l-4.626.672a.25.25 0 00-.139.427l3.348 3.262a.25.25 0 01.072.222l-.79 4.607a.25.25 0 00.362.264l4.138-2.176a.25.25 0 01.233 0l4.137 2.175a.25.25 0 00.363-.263l-.79-4.607a.25.25 0 01.072-.222l3.347-3.262a.25.25 0 00-.139-.427l-4.626-.672a.25.25 0 01-.188-.137l-2.069-4.192a.25.25 0 00-.448 0L9.706 8.646zM12 7.39l-.948 1.921a1.75 1.75 0 01-1.317.957l-2.12.308 1.534 1.495c.412.402.6.982.503 1.55l-.362 2.11 1.896-.997a1.75 1.75 0 011.629 0l1.895.997-.362-2.11a1.75 1.75 0 01.504-1.55l1.533-1.495-2.12-.308a1.75 1.75 0 01-1.317-.957L12 7.39z", |
|
374 clipRule: "evenodd" |
|
375 })); |
|
376 /* harmony default export */ __webpack_exports__["a"] = (starEmpty); |
|
377 |
|
378 |
|
379 /***/ }), |
|
380 |
|
381 /***/ 29: |
|
382 /***/ (function(module, __webpack_exports__, __webpack_require__) { |
|
383 |
|
384 "use strict"; |
|
385 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _unsupportedIterableToArray; }); |
|
386 /* harmony import */ var _arrayLikeToArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(26); |
|
387 |
|
388 function _unsupportedIterableToArray(o, minLen) { |
|
389 if (!o) return; |
|
390 if (typeof o === "string") return Object(_arrayLikeToArray__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(o, minLen); |
|
391 var n = Object.prototype.toString.call(o).slice(8, -1); |
|
392 if (n === "Object" && o.constructor) n = o.constructor.name; |
|
393 if (n === "Map" || n === "Set") return Array.from(o); |
|
394 if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return Object(_arrayLikeToArray__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(o, minLen); |
|
395 } |
|
396 |
|
397 /***/ }), |
|
398 |
|
399 /***/ 3: |
|
400 /***/ (function(module, exports) { |
116 /***/ (function(module, exports) { |
401 |
117 |
402 (function() { module.exports = this["wp"]["components"]; }()); |
118 (function() { module.exports = window["wp"]["data"]; }()); |
403 |
119 |
404 /***/ }), |
120 /***/ }), |
405 |
121 |
406 /***/ 35: |
122 /***/ "51Zz": |
407 /***/ (function(module, __webpack_exports__, __webpack_require__) { |
|
408 |
|
409 "use strict"; |
|
410 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _iterableToArray; }); |
|
411 function _iterableToArray(iter) { |
|
412 if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter); |
|
413 } |
|
414 |
|
415 /***/ }), |
|
416 |
|
417 /***/ 36: |
|
418 /***/ (function(module, exports) { |
123 /***/ (function(module, exports) { |
419 |
124 |
420 (function() { module.exports = this["wp"]["dataControls"]; }()); |
125 (function() { module.exports = window["wp"]["dataControls"]; }()); |
421 |
126 |
422 /***/ }), |
127 /***/ }), |
423 |
128 |
424 /***/ 38: |
129 /***/ "7f3f": |
425 /***/ (function(module, __webpack_exports__, __webpack_require__) { |
|
426 |
|
427 "use strict"; |
|
428 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _arrayWithHoles; }); |
|
429 function _arrayWithHoles(arr) { |
|
430 if (Array.isArray(arr)) return arr; |
|
431 } |
|
432 |
|
433 /***/ }), |
|
434 |
|
435 /***/ 39: |
|
436 /***/ (function(module, __webpack_exports__, __webpack_require__) { |
|
437 |
|
438 "use strict"; |
|
439 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _nonIterableRest; }); |
|
440 function _nonIterableRest() { |
|
441 throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); |
|
442 } |
|
443 |
|
444 /***/ }), |
|
445 |
|
446 /***/ 4: |
|
447 /***/ (function(module, exports) { |
|
448 |
|
449 (function() { module.exports = this["wp"]["data"]; }()); |
|
450 |
|
451 /***/ }), |
|
452 |
|
453 /***/ 41: |
|
454 /***/ (function(module, __webpack_exports__, __webpack_require__) { |
|
455 |
|
456 "use strict"; |
|
457 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _objectWithoutPropertiesLoose; }); |
|
458 function _objectWithoutPropertiesLoose(source, excluded) { |
|
459 if (source == null) return {}; |
|
460 var target = {}; |
|
461 var sourceKeys = Object.keys(source); |
|
462 var key, i; |
|
463 |
|
464 for (i = 0; i < sourceKeys.length; i++) { |
|
465 key = sourceKeys[i]; |
|
466 if (excluded.indexOf(key) >= 0) continue; |
|
467 target[key] = source[key]; |
|
468 } |
|
469 |
|
470 return target; |
|
471 } |
|
472 |
|
473 /***/ }), |
|
474 |
|
475 /***/ 443: |
|
476 /***/ (function(module, __webpack_exports__, __webpack_require__) { |
130 /***/ (function(module, __webpack_exports__, __webpack_require__) { |
477 |
131 |
478 "use strict"; |
132 "use strict"; |
479 // ESM COMPAT FLAG |
133 // ESM COMPAT FLAG |
480 __webpack_require__.r(__webpack_exports__); |
134 __webpack_require__.r(__webpack_exports__); |
481 |
135 |
|
136 // EXPORTS |
|
137 __webpack_require__.d(__webpack_exports__, "store", function() { return /* reexport */ store; }); |
|
138 |
482 // NAMESPACE OBJECT: ./node_modules/@wordpress/block-directory/build-module/store/selectors.js |
139 // NAMESPACE OBJECT: ./node_modules/@wordpress/block-directory/build-module/store/selectors.js |
483 var selectors_namespaceObject = {}; |
140 var selectors_namespaceObject = {}; |
484 __webpack_require__.r(selectors_namespaceObject); |
141 __webpack_require__.r(selectors_namespaceObject); |
485 __webpack_require__.d(selectors_namespaceObject, "isRequestingDownloadableBlocks", function() { return isRequestingDownloadableBlocks; }); |
142 __webpack_require__.d(selectors_namespaceObject, "isRequestingDownloadableBlocks", function() { return selectors_isRequestingDownloadableBlocks; }); |
486 __webpack_require__.d(selectors_namespaceObject, "getDownloadableBlocks", function() { return selectors_getDownloadableBlocks; }); |
143 __webpack_require__.d(selectors_namespaceObject, "getDownloadableBlocks", function() { return selectors_getDownloadableBlocks; }); |
487 __webpack_require__.d(selectors_namespaceObject, "getInstalledBlockTypes", function() { return getInstalledBlockTypes; }); |
144 __webpack_require__.d(selectors_namespaceObject, "getInstalledBlockTypes", function() { return getInstalledBlockTypes; }); |
488 __webpack_require__.d(selectors_namespaceObject, "getNewBlockTypes", function() { return getNewBlockTypes; }); |
145 __webpack_require__.d(selectors_namespaceObject, "getNewBlockTypes", function() { return getNewBlockTypes; }); |
489 __webpack_require__.d(selectors_namespaceObject, "getUnusedBlockTypes", function() { return getUnusedBlockTypes; }); |
146 __webpack_require__.d(selectors_namespaceObject, "getUnusedBlockTypes", function() { return getUnusedBlockTypes; }); |
490 __webpack_require__.d(selectors_namespaceObject, "isInstalling", function() { return isInstalling; }); |
147 __webpack_require__.d(selectors_namespaceObject, "isInstalling", function() { return selectors_isInstalling; }); |
491 __webpack_require__.d(selectors_namespaceObject, "getErrorNotices", function() { return getErrorNotices; }); |
148 __webpack_require__.d(selectors_namespaceObject, "getErrorNotices", function() { return getErrorNotices; }); |
492 __webpack_require__.d(selectors_namespaceObject, "getErrorNoticeForBlock", function() { return getErrorNoticeForBlock; }); |
149 __webpack_require__.d(selectors_namespaceObject, "getErrorNoticeForBlock", function() { return selectors_getErrorNoticeForBlock; }); |
493 |
150 |
494 // NAMESPACE OBJECT: ./node_modules/@wordpress/block-directory/build-module/store/actions.js |
151 // NAMESPACE OBJECT: ./node_modules/@wordpress/block-directory/build-module/store/actions.js |
495 var actions_namespaceObject = {}; |
152 var actions_namespaceObject = {}; |
496 __webpack_require__.r(actions_namespaceObject); |
153 __webpack_require__.r(actions_namespaceObject); |
497 __webpack_require__.d(actions_namespaceObject, "fetchDownloadableBlocks", function() { return fetchDownloadableBlocks; }); |
154 __webpack_require__.d(actions_namespaceObject, "fetchDownloadableBlocks", function() { return fetchDownloadableBlocks; }); |
797 * @param {string} blockId The ID of the block plugin. eg: my-block |
435 * @param {string} blockId The ID of the block plugin. eg: my-block |
798 * |
436 * |
799 * @return {string|boolean} The error text, or false if no error. |
437 * @return {string|boolean} The error text, or false if no error. |
800 */ |
438 */ |
801 |
439 |
802 function getErrorNoticeForBlock(state, blockId) { |
440 function selectors_getErrorNoticeForBlock(state, blockId) { |
803 return state.errorNotices[blockId]; |
441 return state.errorNotices[blockId]; |
804 } |
442 } |
805 |
443 |
806 // EXTERNAL MODULE: external {"this":"regeneratorRuntime"} |
444 // EXTERNAL MODULE: external ["wp","i18n"] |
807 var external_this_regeneratorRuntime_ = __webpack_require__(24); |
445 var external_wp_i18n_ = __webpack_require__("l3Sj"); |
808 var external_this_regeneratorRuntime_default = /*#__PURE__*/__webpack_require__.n(external_this_regeneratorRuntime_); |
446 |
809 |
447 // EXTERNAL MODULE: external ["wp","notices"] |
810 // EXTERNAL MODULE: external {"this":["wp","i18n"]} |
448 var external_wp_notices_ = __webpack_require__("onLe"); |
811 var external_this_wp_i18n_ = __webpack_require__(1); |
449 |
812 |
450 // EXTERNAL MODULE: external ["wp","apiFetch"] |
813 // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js |
451 var external_wp_apiFetch_ = __webpack_require__("ywyh"); |
814 var asyncToGenerator = __webpack_require__(50); |
452 var external_wp_apiFetch_default = /*#__PURE__*/__webpack_require__.n(external_wp_apiFetch_); |
815 |
|
816 // EXTERNAL MODULE: external {"this":["wp","apiFetch"]} |
|
817 var external_this_wp_apiFetch_ = __webpack_require__(45); |
|
818 var external_this_wp_apiFetch_default = /*#__PURE__*/__webpack_require__.n(external_this_wp_apiFetch_); |
|
819 |
453 |
820 // CONCATENATED MODULE: ./node_modules/@wordpress/block-directory/build-module/store/controls.js |
454 // CONCATENATED MODULE: ./node_modules/@wordpress/block-directory/build-module/store/controls.js |
821 |
|
822 |
|
823 |
|
824 /** |
455 /** |
825 * WordPress dependencies |
456 * WordPress dependencies |
826 */ |
457 */ |
827 |
458 |
828 /** |
459 /** |
829 * Load an asset for a block. |
460 * Load an asset for a block. |
830 * |
461 * |
831 * This function returns a Promise that will resolve once the asset is loaded, |
462 * This function returns a Promise that will resolve once the asset is loaded, |
832 * or in the case of Stylesheets and Inline Javascript, will resolve immediately. |
463 * or in the case of Stylesheets and Inline JavaScript, will resolve immediately. |
833 * |
464 * |
834 * @param {HTMLElement} el A HTML Element asset to inject. |
465 * @param {HTMLElement} el A HTML Element asset to inject. |
835 * |
466 * |
836 * @return {Promise} Promise which will resolve when the asset is loaded. |
467 * @return {Promise} Promise which will resolve when the asset is loaded. |
837 */ |
468 */ |
838 |
469 |
839 var loadAsset = function loadAsset(el) { |
470 const loadAsset = el => { |
840 return new Promise(function (resolve, reject) { |
471 return new Promise((resolve, reject) => { |
841 /* |
472 /* |
842 * Reconstruct the passed element, this is required as inserting the Node directly |
473 * Reconstruct the passed element, this is required as inserting the Node directly |
843 * won't always fire the required onload events, even if the asset wasn't already loaded. |
474 * won't always fire the required onload events, even if the asset wasn't already loaded. |
844 */ |
475 */ |
845 var newNode = document.createElement(el.nodeName); |
476 const newNode = document.createElement(el.nodeName); |
846 ['id', 'rel', 'src', 'href', 'type'].forEach(function (attr) { |
477 ['id', 'rel', 'src', 'href', 'type'].forEach(attr => { |
847 if (el[attr]) { |
478 if (el[attr]) { |
848 newNode[attr] = el[attr]; |
479 newNode[attr] = el[attr]; |
849 } |
480 } |
850 }); // Append inline <script> contents. |
481 }); // Append inline <script> contents. |
851 |
482 |
852 if (el.innerHTML) { |
483 if (el.innerHTML) { |
853 newNode.appendChild(document.createTextNode(el.innerHTML)); |
484 newNode.appendChild(document.createTextNode(el.innerHTML)); |
854 } |
485 } |
855 |
486 |
856 newNode.onload = function () { |
487 newNode.onload = () => resolve(true); |
857 return resolve(true); |
488 |
858 }; |
489 newNode.onerror = () => reject(new Error('Error loading asset.')); |
859 |
|
860 newNode.onerror = function () { |
|
861 return reject(new Error('Error loading asset.')); |
|
862 }; |
|
863 |
490 |
864 document.body.appendChild(newNode); // Resolve Stylesheets and Inline JavaScript immediately. |
491 document.body.appendChild(newNode); // Resolve Stylesheets and Inline JavaScript immediately. |
865 |
492 |
866 if ('link' === newNode.nodeName.toLowerCase() || 'script' === newNode.nodeName.toLowerCase() && !newNode.src) { |
493 if ('link' === newNode.nodeName.toLowerCase() || 'script' === newNode.nodeName.toLowerCase() && !newNode.src) { |
867 resolve(); |
494 resolve(); |
1024 */ |
601 */ |
1025 |
602 |
1026 function receiveDownloadableBlocks(downloadableBlocks, filterValue) { |
603 function receiveDownloadableBlocks(downloadableBlocks, filterValue) { |
1027 return { |
604 return { |
1028 type: 'RECEIVE_DOWNLOADABLE_BLOCKS', |
605 type: 'RECEIVE_DOWNLOADABLE_BLOCKS', |
1029 downloadableBlocks: downloadableBlocks, |
606 downloadableBlocks, |
1030 filterValue: filterValue |
607 filterValue |
1031 }; |
608 }; |
1032 } |
609 } |
1033 /** |
610 /** |
1034 * Action triggered to install a block plugin. |
611 * Action triggered to install a block plugin. |
1035 * |
612 * |
1036 * @param {Object} block The block item returned by search. |
613 * @param {Object} block The block item returned by search. |
1037 * |
614 * |
1038 * @return {boolean} Whether the block was successfully installed & loaded. |
615 * @return {boolean} Whether the block was successfully installed & loaded. |
1039 */ |
616 */ |
1040 |
617 |
1041 function actions_installBlockType(block) { |
618 function* actions_installBlockType(block) { |
1042 var id, assets, success, url, links, response, registeredBlocks, message, isFatal, fatalAPIErrors; |
619 const { |
1043 return external_this_regeneratorRuntime_default.a.wrap(function installBlockType$(_context) { |
620 id, |
1044 while (1) { |
621 assets |
1045 switch (_context.prev = _context.next) { |
622 } = block; |
1046 case 0: |
623 let success = false; |
1047 id = block.id, assets = block.assets; |
624 yield clearErrorNotice(id); |
1048 success = false; |
625 |
1049 _context.next = 4; |
626 try { |
1050 return clearErrorNotice(id); |
627 yield setIsInstalling(block.id, true); // If we have a wp:plugin link, the plugin is installed but inactive. |
1051 |
628 |
1052 case 4: |
629 const url = getPluginUrl(block); |
1053 _context.prev = 4; |
630 let links = {}; |
1054 _context.next = 7; |
631 |
1055 return setIsInstalling(block.id, true); |
632 if (url) { |
1056 |
633 yield Object(external_wp_dataControls_["apiFetch"])({ |
1057 case 7: |
634 url, |
1058 // If we have a wp:plugin link, the plugin is installed but inactive. |
635 data: { |
1059 url = getPluginUrl(block); |
636 status: 'active' |
1060 links = {}; |
637 }, |
1061 |
638 method: 'PUT' |
1062 if (!url) { |
639 }); |
1063 _context.next = 14; |
640 } else { |
1064 break; |
641 const response = yield Object(external_wp_dataControls_["apiFetch"])({ |
1065 } |
642 path: 'wp/v2/plugins', |
1066 |
643 data: { |
1067 _context.next = 12; |
644 slug: block.id, |
1068 return Object(external_this_wp_dataControls_["apiFetch"])({ |
645 status: 'active' |
1069 url: url, |
646 }, |
1070 data: { |
647 method: 'POST' |
1071 status: 'active' |
648 }); // Add the `self` link for newly-installed blocks. |
1072 }, |
649 |
1073 method: 'PUT' |
650 links = response._links; |
1074 }); |
651 } |
1075 |
652 |
1076 case 12: |
653 yield addInstalledBlockType({ ...block, |
1077 _context.next = 18; |
654 links: { ...block.links, |
1078 break; |
655 ...links |
1079 |
|
1080 case 14: |
|
1081 _context.next = 16; |
|
1082 return Object(external_this_wp_dataControls_["apiFetch"])({ |
|
1083 path: 'wp/v2/plugins', |
|
1084 data: { |
|
1085 slug: block.id, |
|
1086 status: 'active' |
|
1087 }, |
|
1088 method: 'POST' |
|
1089 }); |
|
1090 |
|
1091 case 16: |
|
1092 response = _context.sent; |
|
1093 // Add the `self` link for newly-installed blocks. |
|
1094 links = response._links; |
|
1095 |
|
1096 case 18: |
|
1097 _context.next = 20; |
|
1098 return addInstalledBlockType(actions_objectSpread({}, block, { |
|
1099 links: actions_objectSpread({}, block.links, {}, links) |
|
1100 })); |
|
1101 |
|
1102 case 20: |
|
1103 _context.next = 22; |
|
1104 return loadAssets(assets); |
|
1105 |
|
1106 case 22: |
|
1107 _context.next = 24; |
|
1108 return Object(external_this_wp_dataControls_["select"])('core/blocks', 'getBlockTypes'); |
|
1109 |
|
1110 case 24: |
|
1111 registeredBlocks = _context.sent; |
|
1112 |
|
1113 if (!(!registeredBlocks.length || !registeredBlocks.filter(function (i) { |
|
1114 return i.name === block.name; |
|
1115 }).length)) { |
|
1116 _context.next = 27; |
|
1117 break; |
|
1118 } |
|
1119 |
|
1120 throw new Error(Object(external_this_wp_i18n_["__"])('Error registering block. Try reloading the page.')); |
|
1121 |
|
1122 case 27: |
|
1123 success = true; |
|
1124 _context.next = 38; |
|
1125 break; |
|
1126 |
|
1127 case 30: |
|
1128 _context.prev = 30; |
|
1129 _context.t0 = _context["catch"](4); |
|
1130 message = _context.t0.message || Object(external_this_wp_i18n_["__"])('An error occurred.'); // Errors we throw are fatal |
|
1131 |
|
1132 isFatal = _context.t0 instanceof Error; // Specific API errors that are fatal |
|
1133 |
|
1134 fatalAPIErrors = { |
|
1135 folder_exists: Object(external_this_wp_i18n_["__"])('This block is already installed. Try reloading the page.'), |
|
1136 unable_to_connect_to_filesystem: Object(external_this_wp_i18n_["__"])('Error installing block. You can reload the page and try again.') |
|
1137 }; |
|
1138 |
|
1139 if (fatalAPIErrors[_context.t0.code]) { |
|
1140 isFatal = true; |
|
1141 message = fatalAPIErrors[_context.t0.code]; |
|
1142 } |
|
1143 |
|
1144 _context.next = 38; |
|
1145 return setErrorNotice(id, message, isFatal); |
|
1146 |
|
1147 case 38: |
|
1148 _context.next = 40; |
|
1149 return setIsInstalling(block.id, false); |
|
1150 |
|
1151 case 40: |
|
1152 return _context.abrupt("return", success); |
|
1153 |
|
1154 case 41: |
|
1155 case "end": |
|
1156 return _context.stop(); |
|
1157 } |
656 } |
|
657 }); |
|
658 yield loadAssets(assets); |
|
659 const registeredBlocks = yield external_wp_data_["controls"].select(external_wp_blocks_["store"].name, 'getBlockTypes'); |
|
660 |
|
661 if (!registeredBlocks.some(i => i.name === block.name)) { |
|
662 throw new Error(Object(external_wp_i18n_["__"])('Error registering block. Try reloading the page.')); |
1158 } |
663 } |
1159 }, _marked, null, [[4, 30]]); |
664 |
|
665 yield external_wp_data_["controls"].dispatch(external_wp_notices_["store"], 'createInfoNotice', Object(external_wp_i18n_["sprintf"])( // translators: %s is the block title. |
|
666 Object(external_wp_i18n_["__"])('Block %s installed and added.'), block.title), { |
|
667 speak: true, |
|
668 type: 'snackbar' |
|
669 }); |
|
670 success = true; |
|
671 } catch (error) { |
|
672 let message = error.message || Object(external_wp_i18n_["__"])('An error occurred.'); // Errors we throw are fatal |
|
673 |
|
674 |
|
675 let isFatal = error instanceof Error; // Specific API errors that are fatal |
|
676 |
|
677 const fatalAPIErrors = { |
|
678 folder_exists: Object(external_wp_i18n_["__"])('This block is already installed. Try reloading the page.'), |
|
679 unable_to_connect_to_filesystem: Object(external_wp_i18n_["__"])('Error installing block. You can reload the page and try again.') |
|
680 }; |
|
681 |
|
682 if (fatalAPIErrors[error.code]) { |
|
683 isFatal = true; |
|
684 message = fatalAPIErrors[error.code]; |
|
685 } |
|
686 |
|
687 yield setErrorNotice(id, message, isFatal); |
|
688 yield external_wp_data_["controls"].dispatch(external_wp_notices_["store"], 'createErrorNotice', message, { |
|
689 speak: true, |
|
690 isDismissible: true |
|
691 }); |
|
692 } |
|
693 |
|
694 yield setIsInstalling(block.id, false); |
|
695 return success; |
1160 } |
696 } |
1161 /** |
697 /** |
1162 * Action triggered to uninstall a block plugin. |
698 * Action triggered to uninstall a block plugin. |
1163 * |
699 * |
1164 * @param {Object} block The blockType object. |
700 * @param {Object} block The blockType object. |
1165 */ |
701 */ |
1166 |
702 |
1167 function actions_uninstallBlockType(block) { |
703 function* actions_uninstallBlockType(block) { |
1168 return external_this_regeneratorRuntime_default.a.wrap(function uninstallBlockType$(_context2) { |
704 try { |
1169 while (1) { |
705 yield Object(external_wp_dataControls_["apiFetch"])({ |
1170 switch (_context2.prev = _context2.next) { |
706 url: getPluginUrl(block), |
1171 case 0: |
707 data: { |
1172 _context2.prev = 0; |
708 status: 'inactive' |
1173 _context2.next = 3; |
709 }, |
1174 return Object(external_this_wp_dataControls_["apiFetch"])({ |
710 method: 'PUT' |
1175 url: getPluginUrl(block), |
711 }); |
1176 data: { |
712 yield Object(external_wp_dataControls_["apiFetch"])({ |
1177 status: 'inactive' |
713 url: getPluginUrl(block), |
1178 }, |
714 method: 'DELETE' |
1179 method: 'PUT' |
715 }); |
1180 }); |
716 yield removeInstalledBlockType(block); |
1181 |
717 } catch (error) { |
1182 case 3: |
718 yield external_wp_data_["controls"].dispatch(external_wp_notices_["store"], 'createErrorNotice', error.message || Object(external_wp_i18n_["__"])('An error occurred.')); |
1183 _context2.next = 5; |
719 } |
1184 return Object(external_this_wp_dataControls_["apiFetch"])({ |
720 } |
1185 url: getPluginUrl(block), |
721 /** |
1186 method: 'DELETE' |
722 * Returns an action object used to add a block type to the "newly installed" |
1187 }); |
723 * tracking list. |
1188 |
|
1189 case 5: |
|
1190 _context2.next = 7; |
|
1191 return removeInstalledBlockType(block); |
|
1192 |
|
1193 case 7: |
|
1194 _context2.next = 13; |
|
1195 break; |
|
1196 |
|
1197 case 9: |
|
1198 _context2.prev = 9; |
|
1199 _context2.t0 = _context2["catch"](0); |
|
1200 _context2.next = 13; |
|
1201 return Object(external_this_wp_dataControls_["dispatch"])('core/notices', 'createErrorNotice', _context2.t0.message || Object(external_this_wp_i18n_["__"])('An error occurred.')); |
|
1202 |
|
1203 case 13: |
|
1204 case "end": |
|
1205 return _context2.stop(); |
|
1206 } |
|
1207 } |
|
1208 }, _marked2, null, [[0, 9]]); |
|
1209 } |
|
1210 /** |
|
1211 * Returns an action object used to add a newly installed block type. |
|
1212 * |
724 * |
1213 * @param {Object} item The block item with the block id and name. |
725 * @param {Object} item The block item with the block id and name. |
1214 * |
726 * |
1215 * @return {Object} Action object. |
727 * @return {Object} Action object. |
1216 */ |
728 */ |
1217 |
729 |
1218 function addInstalledBlockType(item) { |
730 function addInstalledBlockType(item) { |
1219 return { |
731 return { |
1220 type: 'ADD_INSTALLED_BLOCK_TYPE', |
732 type: 'ADD_INSTALLED_BLOCK_TYPE', |
1221 item: item |
733 item |
1222 }; |
734 }; |
1223 } |
735 } |
1224 /** |
736 /** |
1225 * Returns an action object used to remove a newly installed block type. |
737 * Returns an action object used to remove a block type from the "newly installed" |
|
738 * tracking list. |
1226 * |
739 * |
1227 * @param {string} item The block item with the block id and name. |
740 * @param {string} item The block item with the block id and name. |
1228 * |
741 * |
1229 * @return {Object} Action object. |
742 * @return {Object} Action object. |
1230 */ |
743 */ |
1231 |
744 |
1232 function removeInstalledBlockType(item) { |
745 function removeInstalledBlockType(item) { |
1233 return { |
746 return { |
1234 type: 'REMOVE_INSTALLED_BLOCK_TYPE', |
747 type: 'REMOVE_INSTALLED_BLOCK_TYPE', |
1235 item: item |
748 item |
1236 }; |
749 }; |
1237 } |
750 } |
1238 /** |
751 /** |
1239 * Returns an action object used to indicate install in progress |
752 * Returns an action object used to indicate install in progress. |
1240 * |
753 * |
1241 * @param {string} blockId |
754 * @param {string} blockId |
1242 * @param {boolean} isInstalling |
755 * @param {boolean} isInstalling |
1243 * |
756 * |
1244 * @return {Object} Action object. |
757 * @return {Object} Action object. |
1245 */ |
758 */ |
1246 |
759 |
1247 function setIsInstalling(blockId, isInstalling) { |
760 function setIsInstalling(blockId, isInstalling) { |
1248 return { |
761 return { |
1249 type: 'SET_INSTALLING_BLOCK', |
762 type: 'SET_INSTALLING_BLOCK', |
1250 blockId: blockId, |
763 blockId, |
1251 isInstalling: isInstalling |
764 isInstalling |
1252 }; |
765 }; |
1253 } |
766 } |
1254 /** |
767 /** |
1255 * Sets an error notice string to be displayed to the user |
768 * Sets an error notice to be displayed to the user for a given block. |
1256 * |
769 * |
1257 * @param {string} blockId The ID of the block plugin. eg: my-block |
770 * @param {string} blockId The ID of the block plugin. eg: my-block |
1258 * @param {string} message The message shown in the notice. |
771 * @param {string} message The message shown in the notice. |
1259 * @param {boolean} isFatal Whether the user can recover from the error |
772 * @param {boolean} isFatal Whether the user can recover from the error. |
1260 * |
773 * |
1261 * @return {Object} Action object. |
774 * @return {Object} Action object. |
1262 */ |
775 */ |
1263 |
776 |
1264 function setErrorNotice(blockId, message) { |
777 function setErrorNotice(blockId, message, isFatal = false) { |
1265 var isFatal = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false; |
|
1266 return { |
778 return { |
1267 type: 'SET_ERROR_NOTICE', |
779 type: 'SET_ERROR_NOTICE', |
1268 blockId: blockId, |
780 blockId, |
1269 message: message, |
781 message, |
1270 isFatal: isFatal |
782 isFatal |
1271 }; |
783 }; |
1272 } |
784 } |
1273 /** |
785 /** |
1274 * Sets the error notice to empty for specific block |
786 * Sets the error notice to empty for specific block. |
1275 * |
787 * |
1276 * @param {string} blockId The ID of the block plugin. eg: my-block |
788 * @param {string} blockId The ID of the block plugin. eg: my-block |
1277 * |
789 * |
1278 * @return {Object} Action object. |
790 * @return {Object} Action object. |
1279 */ |
791 */ |
1280 |
792 |
1281 function clearErrorNotice(blockId) { |
793 function clearErrorNotice(blockId) { |
1282 return { |
794 return { |
1283 type: 'CLEAR_ERROR_NOTICE', |
795 type: 'CLEAR_ERROR_NOTICE', |
1284 blockId: blockId |
796 blockId |
1285 }; |
797 }; |
1286 } |
798 } |
1287 |
799 |
1288 // CONCATENATED MODULE: ./node_modules/@wordpress/block-directory/build-module/store/resolvers.js |
800 // CONCATENATED MODULE: ./node_modules/@wordpress/block-directory/build-module/store/resolvers.js |
1289 |
|
1290 |
|
1291 /** |
801 /** |
1292 * External dependencies |
802 * External dependencies |
1293 */ |
803 */ |
1294 |
804 |
1295 /** |
805 /** |
1377 |
849 |
1378 /** |
850 /** |
1379 * Module Constants |
851 * Module Constants |
1380 */ |
852 */ |
1381 |
853 |
1382 var MODULE_KEY = 'core/block-directory'; |
854 const STORE_NAME = 'core/block-directory'; |
1383 /** |
855 /** |
1384 * Block editor data store configuration. |
856 * Block editor data store configuration. |
1385 * |
857 * |
1386 * @see https://github.com/WordPress/gutenberg/blob/master/packages/data/README.md#registerStore |
858 * @see https://github.com/WordPress/gutenberg/blob/HEAD/packages/data/README.md#registerStore |
1387 * |
859 * |
1388 * @type {Object} |
860 * @type {Object} |
1389 */ |
861 */ |
1390 |
862 |
1391 var storeConfig = { |
863 const storeConfig = { |
1392 reducer: reducer, |
864 reducer: reducer, |
1393 selectors: selectors_namespaceObject, |
865 selectors: selectors_namespaceObject, |
1394 actions: actions_namespaceObject, |
866 actions: actions_namespaceObject, |
1395 controls: store_objectSpread({}, external_this_wp_dataControls_["controls"], {}, store_controls), |
867 controls: { ...external_wp_dataControls_["controls"], |
|
868 ...store_controls |
|
869 }, |
1396 resolvers: resolvers |
870 resolvers: resolvers |
1397 }; |
871 }; |
1398 var store = Object(external_this_wp_data_["registerStore"])(MODULE_KEY, storeConfig); |
872 /** |
1399 /* harmony default export */ var build_module_store = (store); |
873 * Store definition for the block directory namespace. |
1400 |
874 * |
1401 // EXTERNAL MODULE: external {"this":["wp","element"]} |
875 * @see https://github.com/WordPress/gutenberg/blob/HEAD/packages/data/README.md#createReduxStore |
1402 var external_this_wp_element_ = __webpack_require__(0); |
876 * |
1403 |
877 * @type {Object} |
1404 // EXTERNAL MODULE: external {"this":["wp","plugins"]} |
878 */ |
1405 var external_this_wp_plugins_ = __webpack_require__(76); |
879 |
1406 |
880 const store = Object(external_wp_data_["createReduxStore"])(STORE_NAME, storeConfig); |
1407 // EXTERNAL MODULE: external {"this":["wp","blocks"]} |
881 Object(external_wp_data_["register"])(store); |
1408 var external_this_wp_blocks_ = __webpack_require__(10); |
|
1409 |
882 |
1410 // CONCATENATED MODULE: ./node_modules/@wordpress/block-directory/build-module/components/auto-block-uninstaller/index.js |
883 // CONCATENATED MODULE: ./node_modules/@wordpress/block-directory/build-module/components/auto-block-uninstaller/index.js |
1411 /** |
884 /** |
1412 * WordPress dependencies |
885 * WordPress dependencies |
1413 */ |
886 */ |
1414 |
887 |
1415 |
888 |
1416 |
889 |
|
890 |
|
891 /** |
|
892 * Internal dependencies |
|
893 */ |
|
894 |
|
895 |
1417 function AutoBlockUninstaller() { |
896 function AutoBlockUninstaller() { |
1418 var _useDispatch = Object(external_this_wp_data_["useDispatch"])('core/block-directory'), |
897 const { |
1419 uninstallBlockType = _useDispatch.uninstallBlockType; |
898 uninstallBlockType |
1420 |
899 } = Object(external_wp_data_["useDispatch"])(store); |
1421 var shouldRemoveBlockTypes = Object(external_this_wp_data_["useSelect"])(function (select) { |
900 const shouldRemoveBlockTypes = Object(external_wp_data_["useSelect"])(select => { |
1422 var _select = select('core/editor'), |
901 const { |
1423 isAutosavingPost = _select.isAutosavingPost, |
902 isAutosavingPost, |
1424 isSavingPost = _select.isSavingPost; |
903 isSavingPost |
1425 |
904 } = select(external_wp_editor_["store"]); |
1426 return isSavingPost() && !isAutosavingPost(); |
905 return isSavingPost() && !isAutosavingPost(); |
1427 }, []); |
906 }, []); |
1428 var unusedBlockTypes = Object(external_this_wp_data_["useSelect"])(function (select) { |
907 const unusedBlockTypes = Object(external_wp_data_["useSelect"])(select => select(store).getUnusedBlockTypes(), []); |
1429 return select('core/block-directory').getUnusedBlockTypes(); |
908 Object(external_wp_element_["useEffect"])(() => { |
1430 }, []); |
|
1431 Object(external_this_wp_element_["useEffect"])(function () { |
|
1432 if (shouldRemoveBlockTypes && unusedBlockTypes.length) { |
909 if (shouldRemoveBlockTypes && unusedBlockTypes.length) { |
1433 unusedBlockTypes.forEach(function (blockType) { |
910 unusedBlockTypes.forEach(blockType => { |
1434 uninstallBlockType(blockType); |
911 uninstallBlockType(blockType); |
1435 Object(external_this_wp_blocks_["unregisterBlockType"])(blockType.name); |
912 Object(external_wp_blocks_["unregisterBlockType"])(blockType.name); |
1436 }); |
913 }); |
1437 } |
914 } |
1438 }, [shouldRemoveBlockTypes]); |
915 }, [shouldRemoveBlockTypes]); |
1439 return null; |
916 return null; |
1440 } |
917 } |
1441 |
918 |
1442 // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/slicedToArray.js + 1 modules |
919 // EXTERNAL MODULE: external ["wp","components"] |
1443 var slicedToArray = __webpack_require__(14); |
920 var external_wp_components_ = __webpack_require__("tI+e"); |
1444 |
921 |
1445 // EXTERNAL MODULE: external {"this":["wp","blockEditor"]} |
922 // EXTERNAL MODULE: external ["wp","compose"] |
1446 var external_this_wp_blockEditor_ = __webpack_require__(7); |
923 var external_wp_compose_ = __webpack_require__("K9lf"); |
1447 |
924 |
1448 // EXTERNAL MODULE: external {"this":["wp","compose"]} |
925 // EXTERNAL MODULE: external ["wp","coreData"] |
1449 var external_this_wp_compose_ = __webpack_require__(9); |
926 var external_wp_coreData_ = __webpack_require__("jZUy"); |
1450 |
927 |
1451 // EXTERNAL MODULE: external {"this":["wp","components"]} |
928 // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/extends.js |
1452 var external_this_wp_components_ = __webpack_require__(3); |
929 var esm_extends = __webpack_require__("wx14"); |
1453 |
930 |
1454 // CONCATENATED MODULE: ./node_modules/@wordpress/block-directory/build-module/components/downloadable-block-author-info/index.js |
931 // EXTERNAL MODULE: external ["wp","htmlEntities"] |
1455 |
932 var external_wp_htmlEntities_ = __webpack_require__("rmEH"); |
1456 |
|
1457 /** |
|
1458 * WordPress dependencies |
|
1459 */ |
|
1460 |
|
1461 |
|
1462 |
|
1463 function DownloadableBlockAuthorInfo(_ref) { |
|
1464 var author = _ref.author, |
|
1465 authorBlockCount = _ref.authorBlockCount, |
|
1466 authorBlockRating = _ref.authorBlockRating; |
|
1467 return Object(external_this_wp_element_["createElement"])(external_this_wp_element_["Fragment"], null, Object(external_this_wp_element_["createElement"])("span", { |
|
1468 className: "block-directory-downloadable-block-author-info__content-author" |
|
1469 }, Object(external_this_wp_i18n_["sprintf"])( |
|
1470 /* translators: %s: author name. */ |
|
1471 Object(external_this_wp_i18n_["__"])('Authored by %s'), author)), Object(external_this_wp_element_["createElement"])("span", { |
|
1472 className: "block-directory-downloadable-block-author-info__content" |
|
1473 }, authorBlockRating > 0 ? Object(external_this_wp_i18n_["sprintf"])( |
|
1474 /* translators: 1: number of blocks. 2: average rating. */ |
|
1475 Object(external_this_wp_i18n_["_n"])('This author has %1$d block, with an average rating of %2$d.', 'This author has %1$d blocks, with an average rating of %2$d.', authorBlockCount), authorBlockCount, authorBlockRating) : Object(external_this_wp_i18n_["sprintf"])( |
|
1476 /* translators: 1: number of blocks. */ |
|
1477 Object(external_this_wp_i18n_["_n"])('This author has %1$d block.', 'This author has %1$d blocks.', authorBlockCount), authorBlockCount))); |
|
1478 } |
|
1479 |
|
1480 /* harmony default export */ var downloadable_block_author_info = (DownloadableBlockAuthorInfo); |
|
1481 |
933 |
1482 // EXTERNAL MODULE: ./node_modules/@wordpress/icons/build-module/icon/index.js |
934 // EXTERNAL MODULE: ./node_modules/@wordpress/icons/build-module/icon/index.js |
1483 var build_module_icon = __webpack_require__(137); |
935 var build_module_icon = __webpack_require__("iClF"); |
1484 |
936 |
1485 // EXTERNAL MODULE: ./node_modules/@wordpress/icons/build-module/library/star-filled.js |
937 // EXTERNAL MODULE: ./node_modules/@wordpress/icons/build-module/library/star-filled.js |
1486 var star_filled = __webpack_require__(285); |
938 var star_filled = __webpack_require__("URob"); |
1487 |
939 |
1488 // EXTERNAL MODULE: external {"this":["wp","primitives"]} |
940 // EXTERNAL MODULE: external ["wp","primitives"] |
1489 var external_this_wp_primitives_ = __webpack_require__(6); |
941 var external_wp_primitives_ = __webpack_require__("Tqx9"); |
1490 |
942 |
1491 // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/star-half.js |
943 // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/star-half.js |
1492 |
944 |
1493 |
945 |
1494 /** |
946 /** |
1495 * WordPress dependencies |
947 * WordPress dependencies |
1496 */ |
948 */ |
1497 |
949 |
1498 var starHalf = Object(external_this_wp_element_["createElement"])(external_this_wp_primitives_["SVG"], { |
950 const starHalf = Object(external_wp_element_["createElement"])(external_wp_primitives_["SVG"], { |
1499 xmlns: "http://www.w3.org/2000/svg", |
951 xmlns: "http://www.w3.org/2000/svg", |
1500 viewBox: "0 0 24 24" |
952 viewBox: "0 0 24 24" |
1501 }, Object(external_this_wp_element_["createElement"])(external_this_wp_primitives_["Path"], { |
953 }, Object(external_wp_element_["createElement"])(external_wp_primitives_["Path"], { |
1502 d: "M9.518 8.783a.25.25 0 00.188-.137l2.069-4.192a.25.25 0 01.448 0l2.07 4.192a.25.25 0 00.187.137l4.626.672a.25.25 0 01.139.427l-3.347 3.262a.25.25 0 00-.072.222l.79 4.607a.25.25 0 01-.363.264l-4.137-2.176a.25.25 0 00-.233 0l-4.138 2.175a.25.25 0 01-.362-.263l.79-4.607a.25.25 0 00-.072-.222L4.753 9.882a.25.25 0 01.14-.427l4.625-.672zM12 14.533c.28 0 .559.067.814.2l1.895.997-.362-2.11a1.75 1.75 0 01.504-1.55l1.533-1.495-2.12-.308a1.75 1.75 0 01-1.317-.957L12 7.39v7.143z" |
954 d: "M9.518 8.783a.25.25 0 00.188-.137l2.069-4.192a.25.25 0 01.448 0l2.07 4.192a.25.25 0 00.187.137l4.626.672a.25.25 0 01.139.427l-3.347 3.262a.25.25 0 00-.072.222l.79 4.607a.25.25 0 01-.363.264l-4.137-2.176a.25.25 0 00-.233 0l-4.138 2.175a.25.25 0 01-.362-.263l.79-4.607a.25.25 0 00-.072-.222L4.753 9.882a.25.25 0 01.14-.427l4.625-.672zM12 14.533c.28 0 .559.067.814.2l1.895.997-.362-2.11a1.75 1.75 0 01.504-1.55l1.533-1.495-2.12-.308a1.75 1.75 0 01-1.317-.957L12 7.39v7.143z" |
1503 })); |
955 })); |
1504 /* harmony default export */ var star_half = (starHalf); |
956 /* harmony default export */ var star_half = (starHalf); |
1505 |
957 |
1506 // EXTERNAL MODULE: ./node_modules/@wordpress/icons/build-module/library/star-empty.js |
958 // EXTERNAL MODULE: ./node_modules/@wordpress/icons/build-module/library/star-empty.js |
1507 var star_empty = __webpack_require__(286); |
959 var star_empty = __webpack_require__("Xxwi"); |
1508 |
960 |
1509 // CONCATENATED MODULE: ./node_modules/@wordpress/block-directory/build-module/components/block-ratings/stars.js |
961 // CONCATENATED MODULE: ./node_modules/@wordpress/block-directory/build-module/components/block-ratings/stars.js |
1510 |
962 |
1511 |
963 |
1512 /** |
964 /** |
1518 */ |
970 */ |
1519 |
971 |
1520 |
972 |
1521 |
973 |
1522 |
974 |
1523 function Stars(_ref) { |
975 function Stars({ |
1524 var rating = _ref.rating; |
976 rating |
1525 var stars = Math.round(rating / 0.5) * 0.5; |
977 }) { |
1526 var fullStarCount = Math.floor(rating); |
978 const stars = Math.round(rating / 0.5) * 0.5; |
1527 var halfStarCount = Math.ceil(rating - fullStarCount); |
979 const fullStarCount = Math.floor(rating); |
1528 var emptyStarCount = 5 - (fullStarCount + halfStarCount); |
980 const halfStarCount = Math.ceil(rating - fullStarCount); |
1529 return Object(external_this_wp_element_["createElement"])("div", { |
981 const emptyStarCount = 5 - (fullStarCount + halfStarCount); |
1530 "aria-label": Object(external_this_wp_i18n_["sprintf"])( |
982 return Object(external_wp_element_["createElement"])("span", { |
|
983 "aria-label": Object(external_wp_i18n_["sprintf"])( |
1531 /* translators: %s: number of stars. */ |
984 /* translators: %s: number of stars. */ |
1532 Object(external_this_wp_i18n_["__"])('%s out of 5 stars'), stars) |
985 Object(external_wp_i18n_["__"])('%s out of 5 stars'), stars) |
1533 }, Object(external_this_lodash_["times"])(fullStarCount, function (i) { |
986 }, Object(external_lodash_["times"])(fullStarCount, i => Object(external_wp_element_["createElement"])(build_module_icon["a" /* default */], { |
1534 return Object(external_this_wp_element_["createElement"])(build_module_icon["a" /* default */], { |
987 key: `full_stars_${i}`, |
1535 key: "full_stars_".concat(i), |
988 className: "block-directory-block-ratings__star-full", |
1536 icon: star_filled["a" /* default */], |
989 icon: star_filled["a" /* default */], |
1537 size: 16 |
990 size: 16 |
1538 }); |
991 })), Object(external_lodash_["times"])(halfStarCount, i => Object(external_wp_element_["createElement"])(build_module_icon["a" /* default */], { |
1539 }), Object(external_this_lodash_["times"])(halfStarCount, function (i) { |
992 key: `half_stars_${i}`, |
1540 return Object(external_this_wp_element_["createElement"])(build_module_icon["a" /* default */], { |
993 className: "block-directory-block-ratings__star-half-full", |
1541 key: "half_stars_".concat(i), |
994 icon: star_half, |
1542 icon: star_half, |
995 size: 16 |
1543 size: 16 |
996 })), Object(external_lodash_["times"])(emptyStarCount, i => Object(external_wp_element_["createElement"])(build_module_icon["a" /* default */], { |
1544 }); |
997 key: `empty_stars_${i}`, |
1545 }), Object(external_this_lodash_["times"])(emptyStarCount, function (i) { |
998 className: "block-directory-block-ratings__star-empty", |
1546 return Object(external_this_wp_element_["createElement"])(build_module_icon["a" /* default */], { |
999 icon: star_empty["a" /* default */], |
1547 key: "empty_stars_".concat(i), |
1000 size: 16 |
1548 icon: star_empty["a" /* default */], |
1001 }))); |
1549 size: 16 |
|
1550 }); |
|
1551 })); |
|
1552 } |
1002 } |
1553 |
1003 |
1554 /* harmony default export */ var block_ratings_stars = (Stars); |
1004 /* harmony default export */ var block_ratings_stars = (Stars); |
1555 |
1005 |
1556 // CONCATENATED MODULE: ./node_modules/@wordpress/block-directory/build-module/components/block-ratings/index.js |
1006 // CONCATENATED MODULE: ./node_modules/@wordpress/block-directory/build-module/components/block-ratings/index.js |
1557 |
1007 |
1558 |
1008 |
1559 /** |
1009 /** |
1560 * WordPress dependencies |
|
1561 */ |
|
1562 |
|
1563 /** |
|
1564 * Internal dependencies |
1010 * Internal dependencies |
1565 */ |
1011 */ |
1566 |
1012 |
1567 |
1013 const BlockRatings = ({ |
1568 var block_ratings_BlockRatings = function BlockRatings(_ref) { |
1014 rating |
1569 var rating = _ref.rating, |
1015 }) => Object(external_wp_element_["createElement"])("span", { |
1570 ratingCount = _ref.ratingCount; |
1016 className: "block-directory-block-ratings" |
1571 return Object(external_this_wp_element_["createElement"])("div", { |
1017 }, Object(external_wp_element_["createElement"])(block_ratings_stars, { |
1572 className: "block-directory-block-ratings" |
1018 rating: rating |
1573 }, Object(external_this_wp_element_["createElement"])(block_ratings_stars, { |
1019 })); |
1574 rating: rating |
1020 /* harmony default export */ var block_ratings = (BlockRatings); |
1575 }), Object(external_this_wp_element_["createElement"])("span", { |
|
1576 className: "block-directory-block-ratings__rating-count", |
|
1577 "aria-label": Object(external_this_wp_i18n_["sprintf"])( // translators: %d: number of ratings (number). |
|
1578 Object(external_this_wp_i18n_["_n"])('%d total rating', '%d total ratings', ratingCount), ratingCount) |
|
1579 }, "(", ratingCount, ")")); |
|
1580 }; |
|
1581 /* harmony default export */ var block_ratings = (block_ratings_BlockRatings); |
|
1582 |
1021 |
1583 // CONCATENATED MODULE: ./node_modules/@wordpress/block-directory/build-module/components/downloadable-block-icon/index.js |
1022 // CONCATENATED MODULE: ./node_modules/@wordpress/block-directory/build-module/components/downloadable-block-icon/index.js |
1584 |
1023 |
1585 |
1024 |
1586 /** |
1025 /** |
1587 * WordPress dependencies |
1026 * WordPress dependencies |
1588 */ |
1027 */ |
1589 |
1028 |
1590 |
1029 |
1591 |
1030 function DownloadableBlockIcon({ |
1592 function DownloadableBlockIcon(_ref) { |
1031 icon |
1593 var icon = _ref.icon, |
1032 }) { |
1594 title = _ref.title; |
1033 const className = 'block-directory-downloadable-block-icon'; |
1595 return Object(external_this_wp_element_["createElement"])("div", { |
1034 return icon.match(/\.(jpeg|jpg|gif|png|svg)(?:\?.*)?$/) !== null ? Object(external_wp_element_["createElement"])("img", { |
1596 className: "block-directory-downloadable-block-icon" |
1035 className: className, |
1597 }, icon.match(/\.(jpeg|jpg|gif|png|svg)(?:\?.*)?$/) !== null ? Object(external_this_wp_element_["createElement"])("img", { |
|
1598 src: icon, |
1036 src: icon, |
1599 alt: Object(external_this_wp_i18n_["sprintf"])( // translators: %s: Name of the plugin e.g: "Akismet". |
1037 alt: "" |
1600 Object(external_this_wp_i18n_["__"])('%s block icon'), title) |
1038 }) : Object(external_wp_element_["createElement"])(external_wp_blockEditor_["BlockIcon"], { |
1601 }) : Object(external_this_wp_element_["createElement"])(external_this_wp_blockEditor_["BlockIcon"], { |
1039 className: className, |
1602 icon: icon, |
1040 icon: icon, |
1603 showColors: true |
1041 showColors: true |
1604 })); |
1042 }); |
1605 } |
1043 } |
1606 |
1044 |
1607 /* harmony default export */ var downloadable_block_icon = (DownloadableBlockIcon); |
1045 /* harmony default export */ var downloadable_block_icon = (DownloadableBlockIcon); |
1608 |
1046 |
1609 // CONCATENATED MODULE: ./node_modules/@wordpress/block-directory/build-module/components/downloadable-block-header/index.js |
1047 // CONCATENATED MODULE: ./node_modules/@wordpress/block-directory/build-module/components/downloadable-block-notice/index.js |
1610 |
1048 |
1611 |
1049 |
1612 /** |
1050 /** |
1613 * WordPress dependencies |
1051 * WordPress dependencies |
1614 */ |
1052 */ |
1617 /** |
1055 /** |
1618 * Internal dependencies |
1056 * Internal dependencies |
1619 */ |
1057 */ |
1620 |
1058 |
1621 |
1059 |
1622 |
1060 const DownloadableBlockNotice = ({ |
1623 |
1061 block |
1624 function DownloadableBlockHeader(_ref) { |
1062 }) => { |
1625 var icon = _ref.icon, |
1063 const errorNotice = Object(external_wp_data_["useSelect"])(select => select(store).getErrorNoticeForBlock(block.id), [block]); |
1626 title = _ref.title, |
1064 |
1627 rating = _ref.rating, |
1065 if (!errorNotice) { |
1628 ratingCount = _ref.ratingCount, |
1066 return null; |
1629 _ref$isLoading = _ref.isLoading, |
1067 } |
1630 isLoading = _ref$isLoading === void 0 ? false : _ref$isLoading, |
1068 |
1631 _ref$isInstallable = _ref.isInstallable, |
1069 return Object(external_wp_element_["createElement"])("div", { |
1632 isInstallable = _ref$isInstallable === void 0 ? true : _ref$isInstallable, |
1070 className: "block-directory-downloadable-block-notice" |
1633 _onClick = _ref.onClick; |
1071 }, Object(external_wp_element_["createElement"])("div", { |
1634 return Object(external_this_wp_element_["createElement"])("div", { |
1072 className: "block-directory-downloadable-block-notice__content" |
1635 className: "block-directory-downloadable-block-header__row" |
1073 }, errorNotice.message, errorNotice.isFatal ? ' ' + Object(external_wp_i18n_["__"])('Try reloading the page.') : null)); |
1636 }, Object(external_this_wp_element_["createElement"])(downloadable_block_icon, { |
1074 }; |
|
1075 /* harmony default export */ var downloadable_block_notice = (DownloadableBlockNotice); |
|
1076 |
|
1077 // CONCATENATED MODULE: ./node_modules/@wordpress/block-directory/build-module/components/downloadable-block-list-item/index.js |
|
1078 |
|
1079 |
|
1080 |
|
1081 /** |
|
1082 * WordPress dependencies |
|
1083 */ |
|
1084 |
|
1085 |
|
1086 |
|
1087 |
|
1088 |
|
1089 |
|
1090 /** |
|
1091 * Internal dependencies |
|
1092 */ |
|
1093 |
|
1094 |
|
1095 |
|
1096 |
|
1097 // Return the appropriate block item label, given the block data and status. |
|
1098 |
|
1099 function getDownloadableBlockLabel({ |
|
1100 title, |
|
1101 rating, |
|
1102 ratingCount |
|
1103 }, { |
|
1104 hasNotice, |
|
1105 isInstalled, |
|
1106 isInstalling |
|
1107 }) { |
|
1108 const stars = Math.round(rating / 0.5) * 0.5; |
|
1109 |
|
1110 if (!isInstalled && hasNotice) { |
|
1111 /* translators: %1$s: block title */ |
|
1112 return Object(external_wp_i18n_["sprintf"])('Retry installing %s.', Object(external_wp_htmlEntities_["decodeEntities"])(title)); |
|
1113 } |
|
1114 |
|
1115 if (isInstalled) { |
|
1116 /* translators: %1$s: block title */ |
|
1117 return Object(external_wp_i18n_["sprintf"])('Add %s.', Object(external_wp_htmlEntities_["decodeEntities"])(title)); |
|
1118 } |
|
1119 |
|
1120 if (isInstalling) { |
|
1121 /* translators: %1$s: block title */ |
|
1122 return Object(external_wp_i18n_["sprintf"])('Installing %s.', Object(external_wp_htmlEntities_["decodeEntities"])(title)); |
|
1123 } // No ratings yet, just use the title. |
|
1124 |
|
1125 |
|
1126 if (ratingCount < 1) { |
|
1127 /* translators: %1$s: block title */ |
|
1128 return Object(external_wp_i18n_["sprintf"])('Install %s.', Object(external_wp_htmlEntities_["decodeEntities"])(title)); |
|
1129 } |
|
1130 |
|
1131 return Object(external_wp_i18n_["sprintf"])( |
|
1132 /* translators: %1$s: block title, %2$s: average rating, %3$s: total ratings count. */ |
|
1133 Object(external_wp_i18n_["_n"])('Install %1$s. %2$s stars with %3$s review.', 'Install %1$s. %2$s stars with %3$s reviews.', ratingCount), Object(external_wp_htmlEntities_["decodeEntities"])(title), stars, ratingCount); |
|
1134 } |
|
1135 |
|
1136 function DownloadableBlockListItem({ |
|
1137 composite, |
|
1138 item, |
|
1139 onClick |
|
1140 }) { |
|
1141 const { |
|
1142 author, |
|
1143 description, |
|
1144 icon, |
|
1145 rating, |
|
1146 title |
|
1147 } = item; // getBlockType returns a block object if this block exists, or null if not. |
|
1148 |
|
1149 const isInstalled = !!Object(external_wp_blocks_["getBlockType"])(item.name); |
|
1150 const { |
|
1151 hasNotice, |
|
1152 isInstalling, |
|
1153 isInstallable |
|
1154 } = Object(external_wp_data_["useSelect"])(select => { |
|
1155 const { |
|
1156 getErrorNoticeForBlock, |
|
1157 isInstalling: isBlockInstalling |
|
1158 } = select(store); |
|
1159 const notice = getErrorNoticeForBlock(item.id); |
|
1160 const hasFatal = notice && notice.isFatal; |
|
1161 return { |
|
1162 hasNotice: !!notice, |
|
1163 isInstalling: isBlockInstalling(item.id), |
|
1164 isInstallable: !hasFatal |
|
1165 }; |
|
1166 }, [item]); |
|
1167 let statusText = ''; |
|
1168 |
|
1169 if (isInstalled) { |
|
1170 statusText = Object(external_wp_i18n_["__"])('Installed!'); |
|
1171 } else if (isInstalling) { |
|
1172 statusText = Object(external_wp_i18n_["__"])('Installing…'); |
|
1173 } |
|
1174 |
|
1175 return Object(external_wp_element_["createElement"])(external_wp_components_["__unstableCompositeItem"], Object(esm_extends["a" /* default */])({ |
|
1176 role: "option", |
|
1177 as: external_wp_components_["Button"] |
|
1178 }, composite, { |
|
1179 className: "block-directory-downloadable-block-list-item", |
|
1180 onClick: event => { |
|
1181 event.preventDefault(); |
|
1182 onClick(); |
|
1183 }, |
|
1184 isBusy: isInstalling, |
|
1185 disabled: isInstalling || !isInstallable, |
|
1186 label: getDownloadableBlockLabel(item, { |
|
1187 hasNotice, |
|
1188 isInstalled, |
|
1189 isInstalling |
|
1190 }), |
|
1191 showTooltip: true, |
|
1192 tooltipPosition: "top center" |
|
1193 }), Object(external_wp_element_["createElement"])("div", { |
|
1194 className: "block-directory-downloadable-block-list-item__icon" |
|
1195 }, Object(external_wp_element_["createElement"])(downloadable_block_icon, { |
1637 icon: icon, |
1196 icon: icon, |
1638 title: title |
1197 title: title |
1639 }), Object(external_this_wp_element_["createElement"])("div", { |
1198 }), isInstalling ? Object(external_wp_element_["createElement"])("span", { |
1640 className: "block-directory-downloadable-block-header__column" |
1199 className: "block-directory-downloadable-block-list-item__spinner" |
1641 }, Object(external_this_wp_element_["createElement"])("h2", { |
1200 }, Object(external_wp_element_["createElement"])(external_wp_components_["Spinner"], null)) : Object(external_wp_element_["createElement"])(block_ratings, { |
1642 className: "block-directory-downloadable-block-header__title" |
1201 rating: rating |
1643 }, title), Object(external_this_wp_element_["createElement"])(block_ratings, { |
1202 })), Object(external_wp_element_["createElement"])("span", { |
1644 rating: rating, |
1203 className: "block-directory-downloadable-block-list-item__details" |
1645 ratingCount: ratingCount |
1204 }, Object(external_wp_element_["createElement"])("span", { |
1646 })), Object(external_this_wp_element_["createElement"])(external_this_wp_components_["Button"], { |
1205 className: "block-directory-downloadable-block-list-item__title" |
1647 isSecondary: true, |
1206 }, Object(external_wp_element_["createInterpolateElement"])(Object(external_wp_i18n_["sprintf"])( |
1648 isBusy: isLoading, |
1207 /* translators: %1$s: block title, %2$s: author name. */ |
1649 disabled: isLoading || !isInstallable, |
1208 Object(external_wp_i18n_["__"])('%1$s <span>by %2$s</span>'), Object(external_wp_htmlEntities_["decodeEntities"])(title), author), { |
1650 onClick: function onClick(event) { |
1209 span: Object(external_wp_element_["createElement"])("span", { |
1651 event.preventDefault(); |
1210 className: "block-directory-downloadable-block-list-item__author" |
1652 |
1211 }) |
1653 if (!isLoading && isInstallable) { |
1212 })), hasNotice ? Object(external_wp_element_["createElement"])(downloadable_block_notice, { |
1654 _onClick(); |
1213 block: item |
1655 } |
1214 }) : Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_element_["createElement"])("span", { |
1656 } |
1215 className: "block-directory-downloadable-block-list-item__desc" |
1657 }, isLoading ? Object(external_this_wp_i18n_["__"])('Adding…') : Object(external_this_wp_i18n_["__"])('Add block'))); |
1216 }, !!statusText ? statusText : Object(external_wp_htmlEntities_["decodeEntities"])(description)), isInstallable && !(isInstalled || isInstalling) && Object(external_wp_element_["createElement"])(external_wp_components_["VisuallyHidden"], null, Object(external_wp_i18n_["__"])('Install block'))))); |
1658 } |
1217 } |
1659 |
1218 |
1660 /* harmony default export */ var downloadable_block_header = (DownloadableBlockHeader); |
1219 /* harmony default export */ var downloadable_block_list_item = (DownloadableBlockListItem); |
1661 |
1220 |
1662 // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/chart-line.js |
1221 // CONCATENATED MODULE: ./node_modules/@wordpress/block-directory/build-module/components/downloadable-blocks-list/index.js |
1663 |
1222 |
1664 |
1223 |
1665 /** |
1224 |
1666 * WordPress dependencies |
1225 /** |
1667 */ |
1226 * External dependencies |
1668 |
1227 */ |
1669 var chartLine = Object(external_this_wp_element_["createElement"])(external_this_wp_primitives_["SVG"], { |
1228 |
1670 xmlns: "http://www.w3.org/2000/svg", |
1229 /** |
1671 viewBox: "-2 -2 24 24" |
1230 * WordPress dependencies |
1672 }, Object(external_this_wp_element_["createElement"])(external_this_wp_primitives_["Path"], { |
1231 */ |
1673 d: "M18 3.5c0 .62-.38 1.16-.92 1.38v13.11H1.99l4.22-6.73c-.13-.23-.21-.48-.21-.76C6 9.67 6.67 9 7.5 9S9 9.67 9 10.5c0 .13-.02.25-.05.37l1.44.63c.27-.3.67-.5 1.11-.5.18 0 .35.04.51.09l3.58-6.41c-.36-.27-.59-.7-.59-1.18 0-.83.67-1.5 1.5-1.5.19 0 .36.04.53.1l.05-.09v.11c.54.22.92.76.92 1.38zm-1.92 13.49V5.85l-3.29 5.89c.13.23.21.48.21.76 0 .83-.67 1.5-1.5 1.5s-1.5-.67-1.5-1.5l.01-.07-1.63-.72c-.25.18-.55.29-.88.29-.18 0-.35-.04-.51-.1l-3.2 5.09h12.29z" |
1232 |
1674 })); |
1233 |
1675 /* harmony default export */ var chart_line = (chartLine); |
1234 |
1676 |
1235 |
1677 // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/update.js |
|
1678 |
|
1679 |
|
1680 /** |
|
1681 * WordPress dependencies |
|
1682 */ |
|
1683 |
|
1684 var update = Object(external_this_wp_element_["createElement"])(external_this_wp_primitives_["SVG"], { |
|
1685 xmlns: "http://www.w3.org/2000/svg", |
|
1686 viewBox: "-2 -2 24 24" |
|
1687 }, Object(external_this_wp_element_["createElement"])(external_this_wp_primitives_["Path"], { |
|
1688 d: "M10.2 3.28c3.53 0 6.43 2.61 6.92 6h2.08l-3.5 4-3.5-4h2.32c-.45-1.97-2.21-3.45-4.32-3.45-1.45 0-2.73.71-3.54 1.78L4.95 5.66C6.23 4.2 8.11 3.28 10.2 3.28zm-.4 13.44c-3.52 0-6.43-2.61-6.92-6H.8l3.5-4c1.17 1.33 2.33 2.67 3.5 4H5.48c.45 1.97 2.21 3.45 4.32 3.45 1.45 0 2.73-.71 3.54-1.78l1.71 1.95c-1.28 1.46-3.15 2.38-5.25 2.38z" |
|
1689 })); |
|
1690 /* harmony default export */ var library_update = (update); |
|
1691 |
|
1692 // CONCATENATED MODULE: ./node_modules/@wordpress/block-directory/build-module/components/downloadable-block-info/index.js |
|
1693 |
|
1694 |
|
1695 /** |
|
1696 * WordPress dependencies |
|
1697 */ |
|
1698 |
|
1699 |
|
1700 |
|
1701 |
|
1702 function DownloadableBlockInfo(_ref) { |
|
1703 var description = _ref.description, |
|
1704 activeInstalls = _ref.activeInstalls, |
|
1705 humanizedUpdated = _ref.humanizedUpdated; |
|
1706 return Object(external_this_wp_element_["createElement"])(external_this_wp_element_["Fragment"], null, Object(external_this_wp_element_["createElement"])("p", { |
|
1707 className: "block-directory-downloadable-block-info__content" |
|
1708 }, description), Object(external_this_wp_element_["createElement"])("div", { |
|
1709 className: "block-directory-downloadable-block-info__meta" |
|
1710 }, Object(external_this_wp_element_["createElement"])(build_module_icon["a" /* default */], { |
|
1711 className: "block-directory-downloadable-block-info__icon", |
|
1712 icon: chart_line |
|
1713 }), Object(external_this_wp_i18n_["sprintf"])( |
|
1714 /* translators: %s: number of active installations. */ |
|
1715 Object(external_this_wp_i18n_["_n"])('%d active installation', '%d active installations', activeInstalls), activeInstalls)), Object(external_this_wp_element_["createElement"])("div", { |
|
1716 className: "block-directory-downloadable-block-info__meta" |
|
1717 }, Object(external_this_wp_element_["createElement"])(build_module_icon["a" /* default */], { |
|
1718 className: "block-directory-downloadable-block-info__icon", |
|
1719 icon: library_update |
|
1720 }), // translators: %s: Humanized date of last update e.g: "2 months ago". |
|
1721 Object(external_this_wp_i18n_["sprintf"])(Object(external_this_wp_i18n_["__"])('Updated %s'), humanizedUpdated))); |
|
1722 } |
|
1723 |
|
1724 /* harmony default export */ var downloadable_block_info = (DownloadableBlockInfo); |
|
1725 |
|
1726 // CONCATENATED MODULE: ./node_modules/@wordpress/block-directory/build-module/components/downloadable-block-notice/index.js |
|
1727 |
|
1728 |
|
1729 /** |
|
1730 * WordPress dependencies |
|
1731 */ |
|
1732 |
|
1733 |
|
1734 |
|
1735 var downloadable_block_notice_DownloadableBlockNotice = function DownloadableBlockNotice(_ref) { |
|
1736 var block = _ref.block, |
|
1737 _onClick = _ref.onClick; |
|
1738 var errorNotice = Object(external_this_wp_data_["useSelect"])(function (select) { |
|
1739 return select('core/block-directory').getErrorNoticeForBlock(block.id); |
|
1740 }, [block]); |
|
1741 |
|
1742 if (!errorNotice) { |
|
1743 return null; |
|
1744 } |
|
1745 |
|
1746 return Object(external_this_wp_element_["createElement"])(external_this_wp_components_["Notice"], { |
|
1747 status: "error", |
|
1748 isDismissible: false, |
|
1749 className: "block-directory-downloadable-block-notice" |
|
1750 }, Object(external_this_wp_element_["createElement"])("div", { |
|
1751 className: "block-directory-downloadable-block-notice__content" |
|
1752 }, errorNotice.message), Object(external_this_wp_element_["createElement"])(external_this_wp_components_["Button"], { |
|
1753 isSmall: true, |
|
1754 isPrimary: true, |
|
1755 onClick: function onClick() { |
|
1756 if (errorNotice.isFatal) { |
|
1757 window.location.reload(); |
|
1758 return false; |
|
1759 } |
|
1760 |
|
1761 _onClick(block); |
|
1762 } |
|
1763 }, errorNotice.isFatal ? Object(external_this_wp_i18n_["__"])('Reload') : Object(external_this_wp_i18n_["__"])('Retry'))); |
|
1764 }; |
|
1765 /* harmony default export */ var downloadable_block_notice = (downloadable_block_notice_DownloadableBlockNotice); |
|
1766 |
|
1767 // CONCATENATED MODULE: ./node_modules/@wordpress/block-directory/build-module/components/downloadable-block-list-item/index.js |
|
1768 |
|
1769 |
|
1770 /** |
|
1771 * WordPress dependencies |
|
1772 */ |
|
1773 |
1236 |
1774 /** |
1237 /** |
1775 * Internal dependencies |
1238 * Internal dependencies |
1776 */ |
1239 */ |
1777 |
1240 |
1778 |
1241 |
1779 |
1242 |
1780 |
1243 |
1781 |
1244 function DownloadableBlocksList({ |
1782 function DownloadableBlockListItem(_ref) { |
1245 items, |
1783 var item = _ref.item, |
1246 onHover = external_lodash_["noop"], |
1784 onClick = _ref.onClick; |
1247 onSelect |
1785 |
1248 }) { |
1786 var _useSelect = Object(external_this_wp_data_["useSelect"])(function (select) { |
1249 const composite = Object(external_wp_components_["__unstableUseCompositeState"])(); |
1787 var _select = select('core/block-directory'), |
1250 const { |
1788 isInstalling = _select.isInstalling, |
1251 installBlockType |
1789 getErrorNoticeForBlock = _select.getErrorNoticeForBlock; |
1252 } = Object(external_wp_data_["useDispatch"])(store); |
1790 |
|
1791 var notice = getErrorNoticeForBlock(item.id); |
|
1792 var hasFatal = notice && notice.isFatal; |
|
1793 return { |
|
1794 isLoading: isInstalling(item.id), |
|
1795 isInstallable: !hasFatal |
|
1796 }; |
|
1797 }, [item]), |
|
1798 isLoading = _useSelect.isLoading, |
|
1799 isInstallable = _useSelect.isInstallable; |
|
1800 |
|
1801 var icon = item.icon, |
|
1802 title = item.title, |
|
1803 description = item.description, |
|
1804 rating = item.rating, |
|
1805 activeInstalls = item.activeInstalls, |
|
1806 ratingCount = item.ratingCount, |
|
1807 author = item.author, |
|
1808 humanizedUpdated = item.humanizedUpdated, |
|
1809 authorBlockCount = item.authorBlockCount, |
|
1810 authorBlockRating = item.authorBlockRating; |
|
1811 return Object(external_this_wp_element_["createElement"])("li", { |
|
1812 className: "block-directory-downloadable-block-list-item" |
|
1813 }, Object(external_this_wp_element_["createElement"])("article", { |
|
1814 className: "block-directory-downloadable-block-list-item__panel" |
|
1815 }, Object(external_this_wp_element_["createElement"])("header", { |
|
1816 className: "block-directory-downloadable-block-list-item__header" |
|
1817 }, Object(external_this_wp_element_["createElement"])(downloadable_block_header, { |
|
1818 icon: icon, |
|
1819 onClick: onClick, |
|
1820 title: title, |
|
1821 rating: rating, |
|
1822 ratingCount: ratingCount, |
|
1823 isLoading: isLoading, |
|
1824 isInstallable: isInstallable |
|
1825 })), Object(external_this_wp_element_["createElement"])("section", { |
|
1826 className: "block-directory-downloadable-block-list-item__body" |
|
1827 }, Object(external_this_wp_element_["createElement"])(downloadable_block_notice, { |
|
1828 onClick: onClick, |
|
1829 block: item |
|
1830 }), Object(external_this_wp_element_["createElement"])(downloadable_block_info, { |
|
1831 activeInstalls: activeInstalls, |
|
1832 description: description, |
|
1833 humanizedUpdated: humanizedUpdated |
|
1834 })), Object(external_this_wp_element_["createElement"])("footer", { |
|
1835 className: "block-directory-downloadable-block-list-item__footer" |
|
1836 }, Object(external_this_wp_element_["createElement"])(downloadable_block_author_info, { |
|
1837 author: author, |
|
1838 authorBlockCount: authorBlockCount, |
|
1839 authorBlockRating: authorBlockRating |
|
1840 })))); |
|
1841 } |
|
1842 |
|
1843 // CONCATENATED MODULE: ./node_modules/@wordpress/block-directory/build-module/components/downloadable-blocks-list/index.js |
|
1844 |
|
1845 |
|
1846 /** |
|
1847 * External dependencies |
|
1848 */ |
|
1849 |
|
1850 /** |
|
1851 * WordPress dependencies |
|
1852 */ |
|
1853 |
|
1854 |
|
1855 /** |
|
1856 * Internal dependencies |
|
1857 */ |
|
1858 |
|
1859 |
|
1860 |
|
1861 function DownloadableBlocksList(_ref) { |
|
1862 var items = _ref.items, |
|
1863 _ref$onHover = _ref.onHover, |
|
1864 onHover = _ref$onHover === void 0 ? external_this_lodash_["noop"] : _ref$onHover, |
|
1865 onSelect = _ref.onSelect; |
|
1866 |
|
1867 var _useDispatch = Object(external_this_wp_data_["useDispatch"])('core/block-directory'), |
|
1868 installBlockType = _useDispatch.installBlockType; |
|
1869 |
1253 |
1870 if (!items.length) { |
1254 if (!items.length) { |
1871 return null; |
1255 return null; |
1872 } |
1256 } |
1873 |
1257 |
1874 return ( |
1258 return Object(external_wp_element_["createElement"])(external_wp_components_["__unstableComposite"], Object(esm_extends["a" /* default */])({}, composite, { |
1875 /* |
1259 role: "listbox", |
1876 * Disable reason: The `list` ARIA role is redundant but |
1260 className: "block-directory-downloadable-blocks-list", |
1877 * Safari+VoiceOver won't announce the list otherwise. |
1261 "aria-label": Object(external_wp_i18n_["__"])('Blocks available for install') |
1878 */ |
1262 }), items.map(item => { |
1879 |
1263 return Object(external_wp_element_["createElement"])(downloadable_block_list_item, { |
1880 /* eslint-disable jsx-a11y/no-redundant-roles */ |
1264 key: item.id, |
1881 Object(external_this_wp_element_["createElement"])("ul", { |
1265 composite: composite, |
1882 role: "list", |
1266 onClick: () => { |
1883 className: "block-directory-downloadable-blocks-list" |
1267 // Check if the block is registered (`getBlockType` |
1884 }, items.map(function (item) { |
1268 // will return an object). If so, insert the block. |
1885 return Object(external_this_wp_element_["createElement"])(DownloadableBlockListItem, { |
1269 // This prevents installing existing plugins. |
1886 key: item.id, |
1270 if (Object(external_wp_blocks_["getBlockType"])(item.name)) { |
1887 onClick: function onClick() { |
1271 onSelect(item); |
1888 installBlockType(item).then(function (success) { |
1272 } else { |
|
1273 installBlockType(item).then(success => { |
1889 if (success) { |
1274 if (success) { |
1890 onSelect(item); |
1275 onSelect(item); |
1891 } |
1276 } |
1892 }); |
1277 }); |
1893 onHover(null); |
1278 } |
1894 }, |
1279 |
1895 item: item |
1280 onHover(null); |
1896 }); |
1281 }, |
1897 })) |
1282 onHover: onHover, |
1898 /* eslint-enable jsx-a11y/no-redundant-roles */ |
1283 item: item |
1899 |
1284 }); |
1900 ); |
1285 })); |
1901 } |
1286 } |
1902 |
1287 |
1903 /* harmony default export */ var downloadable_blocks_list = (DownloadableBlocksList); |
1288 /* harmony default export */ var downloadable_blocks_list = (DownloadableBlocksList); |
1904 |
1289 |
|
1290 // EXTERNAL MODULE: external ["wp","a11y"] |
|
1291 var external_wp_a11y_ = __webpack_require__("gdqT"); |
|
1292 |
|
1293 // CONCATENATED MODULE: ./node_modules/@wordpress/block-directory/build-module/components/downloadable-blocks-panel/inserter-panel.js |
|
1294 |
|
1295 |
|
1296 /** |
|
1297 * WordPress dependencies |
|
1298 */ |
|
1299 |
|
1300 |
|
1301 |
|
1302 |
|
1303 function DownloadableBlocksInserterPanel({ |
|
1304 children, |
|
1305 downloadableItems, |
|
1306 hasLocalBlocks |
|
1307 }) { |
|
1308 const count = downloadableItems.length; |
|
1309 Object(external_wp_element_["useEffect"])(() => { |
|
1310 Object(external_wp_a11y_["speak"])(Object(external_wp_i18n_["sprintf"])( |
|
1311 /* translators: %d: number of available blocks. */ |
|
1312 Object(external_wp_i18n_["_n"])('%d additional block is available to install.', '%d additional blocks are available to install.', count), count)); |
|
1313 }, [count]); |
|
1314 return Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, !hasLocalBlocks && Object(external_wp_element_["createElement"])("p", { |
|
1315 className: "block-directory-downloadable-blocks-panel__no-local" |
|
1316 }, Object(external_wp_i18n_["__"])('No results available from your installed blocks.')), Object(external_wp_element_["createElement"])("div", { |
|
1317 className: "block-editor-inserter__quick-inserter-separator" |
|
1318 }), Object(external_wp_element_["createElement"])("div", { |
|
1319 className: "block-directory-downloadable-blocks-panel" |
|
1320 }, Object(external_wp_element_["createElement"])("div", { |
|
1321 className: "block-directory-downloadable-blocks-panel__header" |
|
1322 }, Object(external_wp_element_["createElement"])("h2", { |
|
1323 className: "block-directory-downloadable-blocks-panel__title" |
|
1324 }, Object(external_wp_i18n_["__"])('Available to install')), Object(external_wp_element_["createElement"])("p", { |
|
1325 className: "block-directory-downloadable-blocks-panel__description" |
|
1326 }, Object(external_wp_i18n_["__"])('Select a block to install and add it to your post.'))), children)); |
|
1327 } |
|
1328 |
|
1329 /* harmony default export */ var inserter_panel = (DownloadableBlocksInserterPanel); |
|
1330 |
|
1331 // EXTERNAL MODULE: ./node_modules/@wordpress/icons/build-module/library/block-default.js |
|
1332 var block_default = __webpack_require__("//Lo"); |
|
1333 |
|
1334 // CONCATENATED MODULE: ./node_modules/@wordpress/block-directory/build-module/components/downloadable-blocks-panel/no-results.js |
|
1335 |
|
1336 |
|
1337 /** |
|
1338 * WordPress dependencies |
|
1339 */ |
|
1340 |
|
1341 |
|
1342 |
|
1343 function DownloadableBlocksNoResults() { |
|
1344 return Object(external_wp_element_["createElement"])("div", { |
|
1345 className: "block-editor-inserter__no-results" |
|
1346 }, Object(external_wp_element_["createElement"])(build_module_icon["a" /* default */], { |
|
1347 className: "block-editor-inserter__no-results-icon", |
|
1348 icon: block_default["a" /* default */] |
|
1349 }), Object(external_wp_element_["createElement"])("p", null, Object(external_wp_i18n_["__"])('No results found.'))); |
|
1350 } |
|
1351 |
|
1352 /* harmony default export */ var no_results = (DownloadableBlocksNoResults); |
|
1353 |
1905 // CONCATENATED MODULE: ./node_modules/@wordpress/block-directory/build-module/components/downloadable-blocks-panel/index.js |
1354 // CONCATENATED MODULE: ./node_modules/@wordpress/block-directory/build-module/components/downloadable-blocks-panel/index.js |
1906 |
1355 |
1907 |
1356 |
1908 /** |
1357 /** |
1909 * WordPress dependencies |
1358 * WordPress dependencies |
1911 |
1360 |
1912 |
1361 |
1913 |
1362 |
1914 |
1363 |
1915 |
1364 |
|
1365 |
1916 /** |
1366 /** |
1917 * Internal dependencies |
1367 * Internal dependencies |
1918 */ |
1368 */ |
1919 |
1369 |
1920 |
1370 |
1921 |
1371 |
1922 function DownloadableBlocksPanel(_ref) { |
1372 |
1923 var downloadableItems = _ref.downloadableItems, |
1373 |
1924 onSelect = _ref.onSelect, |
1374 |
1925 onHover = _ref.onHover, |
1375 function DownloadableBlocksPanel({ |
1926 hasPermission = _ref.hasPermission, |
1376 downloadableItems, |
1927 isLoading = _ref.isLoading, |
1377 onSelect, |
1928 isWaiting = _ref.isWaiting, |
1378 onHover, |
1929 debouncedSpeak = _ref.debouncedSpeak; |
1379 hasLocalBlocks, |
|
1380 hasPermission, |
|
1381 isLoading, |
|
1382 isTyping |
|
1383 }) { |
|
1384 if (typeof hasPermission === 'undefined' || isLoading || isTyping) { |
|
1385 return Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, hasPermission && !hasLocalBlocks && Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_element_["createElement"])("p", { |
|
1386 className: "block-directory-downloadable-blocks-panel__no-local" |
|
1387 }, Object(external_wp_i18n_["__"])('No results available from your installed blocks.')), Object(external_wp_element_["createElement"])("div", { |
|
1388 className: "block-editor-inserter__quick-inserter-separator" |
|
1389 })), Object(external_wp_element_["createElement"])("div", { |
|
1390 className: "block-directory-downloadable-blocks-panel has-blocks-loading" |
|
1391 }, Object(external_wp_element_["createElement"])(external_wp_components_["Spinner"], null))); |
|
1392 } |
1930 |
1393 |
1931 if (false === hasPermission) { |
1394 if (false === hasPermission) { |
1932 debouncedSpeak(Object(external_this_wp_i18n_["__"])('No blocks found in your library.')); |
1395 if (!hasLocalBlocks) { |
1933 return Object(external_this_wp_element_["createElement"])("p", { |
1396 return Object(external_wp_element_["createElement"])(no_results, null); |
1934 className: "block-directory-downloadable-blocks-panel__description has-no-results" |
1397 } |
1935 }, Object(external_this_wp_i18n_["__"])('No blocks found in your library.')); |
1398 |
1936 } |
1399 return null; |
1937 |
1400 } |
1938 if (typeof hasPermission === 'undefined' || isLoading || isWaiting) { |
1401 |
1939 return Object(external_this_wp_element_["createElement"])("p", { |
1402 return !!downloadableItems.length ? Object(external_wp_element_["createElement"])(inserter_panel, { |
1940 className: "block-directory-downloadable-blocks-panel__description has-no-results" |
1403 downloadableItems: downloadableItems, |
1941 }, Object(external_this_wp_element_["createElement"])(external_this_wp_components_["Spinner"], null)); |
1404 hasLocalBlocks: hasLocalBlocks |
1942 } |
1405 }, Object(external_wp_element_["createElement"])(downloadable_blocks_list, { |
1943 |
|
1944 if (!downloadableItems.length) { |
|
1945 return Object(external_this_wp_element_["createElement"])("p", { |
|
1946 className: "block-directory-downloadable-blocks-panel__description has-no-results" |
|
1947 }, Object(external_this_wp_i18n_["__"])('No blocks found in your library.')); |
|
1948 } |
|
1949 |
|
1950 var resultsFoundMessage = Object(external_this_wp_i18n_["sprintf"])( |
|
1951 /* translators: %s: number of available blocks. */ |
|
1952 Object(external_this_wp_i18n_["_n"])('No blocks found in your library. We did find %d block available for download.', 'No blocks found in your library. We did find %d blocks available for download.', downloadableItems.length), downloadableItems.length); |
|
1953 debouncedSpeak(resultsFoundMessage); |
|
1954 return Object(external_this_wp_element_["createElement"])(external_this_wp_element_["Fragment"], null, Object(external_this_wp_element_["createElement"])("p", { |
|
1955 className: "block-directory-downloadable-blocks-panel__description" |
|
1956 }, Object(external_this_wp_i18n_["__"])('No blocks found in your library. These blocks can be downloaded and installed:')), Object(external_this_wp_element_["createElement"])(downloadable_blocks_list, { |
|
1957 items: downloadableItems, |
1406 items: downloadableItems, |
1958 onSelect: onSelect, |
1407 onSelect: onSelect, |
1959 onHover: onHover |
1408 onHover: onHover |
1960 })); |
1409 })) : !hasLocalBlocks && Object(external_wp_element_["createElement"])(no_results, null); |
1961 } |
1410 } |
1962 |
1411 |
1963 /* harmony default export */ var downloadable_blocks_panel = (Object(external_this_wp_compose_["compose"])([external_this_wp_components_["withSpokenMessages"], Object(external_this_wp_data_["withSelect"])(function (select, _ref2) { |
1412 /* harmony default export */ var downloadable_blocks_panel = (Object(external_wp_compose_["compose"])([Object(external_wp_data_["withSelect"])((select, { |
1964 var filterValue = _ref2.filterValue; |
1413 filterValue, |
1965 |
1414 rootClientId = null |
1966 var _select = select('core/block-directory'), |
1415 }) => { |
1967 getDownloadableBlocks = _select.getDownloadableBlocks, |
1416 const { |
1968 isRequestingDownloadableBlocks = _select.isRequestingDownloadableBlocks; |
1417 getDownloadableBlocks, |
1969 |
1418 isRequestingDownloadableBlocks |
1970 var hasPermission = select('core').canUser('read', 'block-directory/search'); |
1419 } = select(store); |
1971 var downloadableItems = hasPermission ? getDownloadableBlocks(filterValue) : []; |
1420 const { |
1972 var isLoading = isRequestingDownloadableBlocks(filterValue); |
1421 canInsertBlockType |
|
1422 } = select(external_wp_blockEditor_["store"]); |
|
1423 const hasPermission = select(external_wp_coreData_["store"]).canUser('read', 'block-directory/search'); |
|
1424 |
|
1425 function getInstallableBlocks(term) { |
|
1426 return getDownloadableBlocks(term).filter(block => canInsertBlockType(block, rootClientId, true)); |
|
1427 } |
|
1428 |
|
1429 const downloadableItems = hasPermission ? getInstallableBlocks(filterValue) : []; |
|
1430 const isLoading = isRequestingDownloadableBlocks(filterValue); |
1973 return { |
1431 return { |
1974 downloadableItems: downloadableItems, |
1432 downloadableItems, |
1975 hasPermission: hasPermission, |
1433 hasPermission, |
1976 isLoading: isLoading |
1434 isLoading |
1977 }; |
1435 }; |
1978 })])(DownloadableBlocksPanel)); |
1436 })])(DownloadableBlocksPanel)); |
1979 |
1437 |
1980 // CONCATENATED MODULE: ./node_modules/@wordpress/block-directory/build-module/plugins/inserter-menu-downloadable-blocks-panel/index.js |
1438 // CONCATENATED MODULE: ./node_modules/@wordpress/block-directory/build-module/plugins/inserter-menu-downloadable-blocks-panel/index.js |
1981 |
1439 |
1982 |
1440 |
1983 |
|
1984 /** |
1441 /** |
1985 * External dependencies |
1442 * External dependencies |
1986 */ |
1443 */ |
1987 |
1444 |
1988 /** |
1445 /** |
2083 * WordPress dependencies |
1538 * WordPress dependencies |
2084 */ |
1539 */ |
2085 |
1540 |
2086 |
1541 |
2087 |
1542 |
|
1543 |
2088 /** |
1544 /** |
2089 * Internal dependencies |
1545 * Internal dependencies |
2090 */ |
1546 */ |
2091 |
1547 |
2092 |
1548 |
|
1549 |
2093 function InstalledBlocksPrePublishPanel() { |
1550 function InstalledBlocksPrePublishPanel() { |
2094 var newBlockTypes = Object(external_this_wp_data_["useSelect"])(function (select) { |
1551 const newBlockTypes = Object(external_wp_data_["useSelect"])(select => select(store).getNewBlockTypes(), []); |
2095 return select('core/block-directory').getNewBlockTypes(); |
|
2096 }, []); |
|
2097 |
1552 |
2098 if (!newBlockTypes.length) { |
1553 if (!newBlockTypes.length) { |
2099 return null; |
1554 return null; |
2100 } |
1555 } |
2101 |
1556 |
2102 return Object(external_this_wp_element_["createElement"])(external_this_wp_editPost_["PluginPrePublishPanel"], { |
1557 return Object(external_wp_element_["createElement"])(external_wp_editPost_["PluginPrePublishPanel"], { |
2103 icon: "block-default", |
1558 icon: block_default["a" /* default */], |
2104 title: Object(external_this_wp_i18n_["sprintf"])( // translators: %d: number of blocks (number). |
1559 title: Object(external_wp_i18n_["sprintf"])( // translators: %d: number of blocks (number). |
2105 Object(external_this_wp_i18n_["_n"])('Added: %d block', 'Added: %d blocks', newBlockTypes.length), newBlockTypes.length), |
1560 Object(external_wp_i18n_["_n"])('Added: %d block', 'Added: %d blocks', newBlockTypes.length), newBlockTypes.length), |
2106 initialOpen: true |
1561 initialOpen: true |
2107 }, Object(external_this_wp_element_["createElement"])("p", { |
1562 }, Object(external_wp_element_["createElement"])("p", { |
2108 className: "installed-blocks-pre-publish-panel__copy" |
1563 className: "installed-blocks-pre-publish-panel__copy" |
2109 }, Object(external_this_wp_i18n_["_n"])('The following block has been added to your site.', 'The following blocks have been added to your site.', newBlockTypes.length)), Object(external_this_wp_element_["createElement"])(CompactList, { |
1564 }, Object(external_wp_i18n_["_n"])('The following block has been added to your site.', 'The following blocks have been added to your site.', newBlockTypes.length)), Object(external_wp_element_["createElement"])(CompactList, { |
2110 items: newBlockTypes |
1565 items: newBlockTypes |
2111 })); |
1566 })); |
2112 } |
1567 } |
2113 |
1568 |
|
1569 // CONCATENATED MODULE: ./node_modules/@wordpress/block-directory/build-module/plugins/get-install-missing/install-button.js |
|
1570 |
|
1571 |
|
1572 /** |
|
1573 * WordPress dependencies |
|
1574 */ |
|
1575 |
|
1576 |
|
1577 |
|
1578 |
|
1579 |
|
1580 /** |
|
1581 * Internal dependencies |
|
1582 */ |
|
1583 |
|
1584 |
|
1585 function InstallButton({ |
|
1586 attributes, |
|
1587 block, |
|
1588 clientId |
|
1589 }) { |
|
1590 const isInstallingBlock = Object(external_wp_data_["useSelect"])(select => select(store).isInstalling(block.id)); |
|
1591 const { |
|
1592 installBlockType |
|
1593 } = Object(external_wp_data_["useDispatch"])(store); |
|
1594 const { |
|
1595 replaceBlock |
|
1596 } = Object(external_wp_data_["useDispatch"])(external_wp_blockEditor_["store"]); |
|
1597 return Object(external_wp_element_["createElement"])(external_wp_components_["Button"], { |
|
1598 onClick: () => installBlockType(block).then(success => { |
|
1599 if (success) { |
|
1600 const blockType = Object(external_wp_blocks_["getBlockType"])(block.name); |
|
1601 const [originalBlock] = Object(external_wp_blocks_["parse"])(attributes.originalContent); |
|
1602 |
|
1603 if (originalBlock) { |
|
1604 replaceBlock(clientId, Object(external_wp_blocks_["createBlock"])(blockType.name, originalBlock.attributes, originalBlock.innerBlocks)); |
|
1605 } |
|
1606 } |
|
1607 }), |
|
1608 disabled: isInstallingBlock, |
|
1609 isBusy: isInstallingBlock, |
|
1610 isPrimary: true |
|
1611 }, Object(external_wp_i18n_["sprintf"])( |
|
1612 /* translators: %s: block name */ |
|
1613 Object(external_wp_i18n_["__"])('Install %s'), block.title)); |
|
1614 } |
|
1615 |
|
1616 // CONCATENATED MODULE: ./node_modules/@wordpress/block-directory/build-module/plugins/get-install-missing/index.js |
|
1617 |
|
1618 |
|
1619 |
|
1620 /** |
|
1621 * WordPress dependencies |
|
1622 */ |
|
1623 |
|
1624 |
|
1625 |
|
1626 |
|
1627 |
|
1628 |
|
1629 |
|
1630 /** |
|
1631 * Internal dependencies |
|
1632 */ |
|
1633 |
|
1634 |
|
1635 |
|
1636 |
|
1637 const getInstallMissing = OriginalComponent => props => { |
|
1638 const { |
|
1639 originalName |
|
1640 } = props.attributes; // Disable reason: This is a valid component, but it's mistaken for a callback. |
|
1641 // eslint-disable-next-line react-hooks/rules-of-hooks |
|
1642 |
|
1643 const { |
|
1644 block, |
|
1645 hasPermission |
|
1646 } = Object(external_wp_data_["useSelect"])(select => { |
|
1647 const { |
|
1648 getDownloadableBlocks |
|
1649 } = select(store); |
|
1650 const blocks = getDownloadableBlocks('block:' + originalName).filter(({ |
|
1651 name |
|
1652 }) => originalName === name); |
|
1653 return { |
|
1654 hasPermission: select(external_wp_coreData_["store"]).canUser('read', 'block-directory/search'), |
|
1655 block: blocks.length && blocks[0] |
|
1656 }; |
|
1657 }, [originalName]); // The user can't install blocks, or the block isn't available for download. |
|
1658 |
|
1659 if (!hasPermission || !block) { |
|
1660 return Object(external_wp_element_["createElement"])(OriginalComponent, props); |
|
1661 } |
|
1662 |
|
1663 return Object(external_wp_element_["createElement"])(ModifiedWarning, Object(esm_extends["a" /* default */])({}, props, { |
|
1664 originalBlock: block |
|
1665 })); |
|
1666 }; |
|
1667 |
|
1668 const ModifiedWarning = ({ |
|
1669 originalBlock, |
|
1670 ...props |
|
1671 }) => { |
|
1672 const { |
|
1673 originalName, |
|
1674 originalUndelimitedContent |
|
1675 } = props.attributes; |
|
1676 const { |
|
1677 replaceBlock |
|
1678 } = Object(external_wp_data_["useDispatch"])(external_wp_blockEditor_["store"]); |
|
1679 |
|
1680 const convertToHTML = () => { |
|
1681 replaceBlock(props.clientId, Object(external_wp_blocks_["createBlock"])('core/html', { |
|
1682 content: originalUndelimitedContent |
|
1683 })); |
|
1684 }; |
|
1685 |
|
1686 const hasContent = !!originalUndelimitedContent; |
|
1687 const hasHTMLBlock = Object(external_wp_blocks_["getBlockType"])('core/html'); |
|
1688 let messageHTML = Object(external_wp_i18n_["sprintf"])( |
|
1689 /* translators: %s: block name */ |
|
1690 Object(external_wp_i18n_["__"])('Your site doesn’t include support for the %s block. You can try installing the block or remove it entirely.'), originalBlock.title || originalName); |
|
1691 const actions = [Object(external_wp_element_["createElement"])(InstallButton, { |
|
1692 key: "install", |
|
1693 block: originalBlock, |
|
1694 attributes: props.attributes, |
|
1695 clientId: props.clientId |
|
1696 })]; |
|
1697 |
|
1698 if (hasContent && hasHTMLBlock) { |
|
1699 messageHTML = Object(external_wp_i18n_["sprintf"])( |
|
1700 /* translators: %s: block name */ |
|
1701 Object(external_wp_i18n_["__"])('Your site doesn’t include support for the %s block. You can try installing the block, convert it to a Custom HTML block, or remove it entirely.'), originalBlock.title || originalName); |
|
1702 actions.push(Object(external_wp_element_["createElement"])(external_wp_components_["Button"], { |
|
1703 key: "convert", |
|
1704 onClick: convertToHTML, |
|
1705 isLink: true |
|
1706 }, Object(external_wp_i18n_["__"])('Keep as HTML'))); |
|
1707 } |
|
1708 |
|
1709 return Object(external_wp_element_["createElement"])("div", Object(external_wp_blockEditor_["useBlockProps"])(), Object(external_wp_element_["createElement"])(external_wp_blockEditor_["Warning"], { |
|
1710 actions: actions |
|
1711 }, messageHTML), Object(external_wp_element_["createElement"])(external_wp_element_["RawHTML"], null, originalUndelimitedContent)); |
|
1712 }; |
|
1713 |
|
1714 /* harmony default export */ var get_install_missing = (getInstallMissing); |
|
1715 |
2114 // CONCATENATED MODULE: ./node_modules/@wordpress/block-directory/build-module/plugins/index.js |
1716 // CONCATENATED MODULE: ./node_modules/@wordpress/block-directory/build-module/plugins/index.js |
2115 |
1717 |
2116 |
1718 |
2117 /** |
1719 /** |
2118 * WordPress dependencies |
1720 * WordPress dependencies |
2119 */ |
1721 */ |
2120 |
1722 |
|
1723 |
2121 /** |
1724 /** |
2122 * Internal dependencies |
1725 * Internal dependencies |
2123 */ |
1726 */ |
2124 |
1727 |
2125 |
1728 |
2126 |
1729 |
2127 |
1730 |
2128 Object(external_this_wp_plugins_["registerPlugin"])('block-directory', { |
1731 |
2129 render: function render() { |
1732 Object(external_wp_plugins_["registerPlugin"])('block-directory', { |
2130 return Object(external_this_wp_element_["createElement"])(external_this_wp_element_["Fragment"], null, Object(external_this_wp_element_["createElement"])(AutoBlockUninstaller, null), Object(external_this_wp_element_["createElement"])(inserter_menu_downloadable_blocks_panel, null), Object(external_this_wp_element_["createElement"])(InstalledBlocksPrePublishPanel, null)); |
1733 render() { |
2131 } |
1734 return Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_element_["createElement"])(AutoBlockUninstaller, null), Object(external_wp_element_["createElement"])(inserter_menu_downloadable_blocks_panel, null), Object(external_wp_element_["createElement"])(InstalledBlocksPrePublishPanel, null)); |
|
1735 } |
|
1736 |
2132 }); |
1737 }); |
|
1738 Object(external_wp_hooks_["addFilter"])('blocks.registerBlockType', 'block-directory/fallback', (settings, name) => { |
|
1739 if (name !== 'core/missing') { |
|
1740 return settings; |
|
1741 } |
|
1742 |
|
1743 settings.edit = get_install_missing(settings.edit); |
|
1744 return settings; |
|
1745 }); |
2133 |
1746 |
2134 // CONCATENATED MODULE: ./node_modules/@wordpress/block-directory/build-module/index.js |
1747 // CONCATENATED MODULE: ./node_modules/@wordpress/block-directory/build-module/index.js |
2135 /** |
1748 /** |
2136 * WordPress dependencies |
|
2137 */ |
|
2138 |
|
2139 /** |
|
2140 * Internal dependencies |
1749 * Internal dependencies |
2141 */ |
1750 */ |
2142 |
1751 |
2143 |
1752 |
2144 |
1753 |
2145 |
1754 |
2146 |
1755 /***/ }), |
2147 /***/ }), |
1756 |
2148 |
1757 /***/ "BLhE": |
2149 /***/ 45: |
|
2150 /***/ (function(module, exports) { |
1758 /***/ (function(module, exports) { |
2151 |
1759 |
2152 (function() { module.exports = this["wp"]["apiFetch"]; }()); |
1760 (function() { module.exports = window["wp"]["editPost"]; }()); |
2153 |
1761 |
2154 /***/ }), |
1762 /***/ }), |
2155 |
1763 |
2156 /***/ 5: |
1764 /***/ "GRId": |
|
1765 /***/ (function(module, exports) { |
|
1766 |
|
1767 (function() { module.exports = window["wp"]["element"]; }()); |
|
1768 |
|
1769 /***/ }), |
|
1770 |
|
1771 /***/ "HSyU": |
|
1772 /***/ (function(module, exports) { |
|
1773 |
|
1774 (function() { module.exports = window["wp"]["blocks"]; }()); |
|
1775 |
|
1776 /***/ }), |
|
1777 |
|
1778 /***/ "K9lf": |
|
1779 /***/ (function(module, exports) { |
|
1780 |
|
1781 (function() { module.exports = window["wp"]["compose"]; }()); |
|
1782 |
|
1783 /***/ }), |
|
1784 |
|
1785 /***/ "Tqx9": |
|
1786 /***/ (function(module, exports) { |
|
1787 |
|
1788 (function() { module.exports = window["wp"]["primitives"]; }()); |
|
1789 |
|
1790 /***/ }), |
|
1791 |
|
1792 /***/ "TvNi": |
|
1793 /***/ (function(module, exports) { |
|
1794 |
|
1795 (function() { module.exports = window["wp"]["plugins"]; }()); |
|
1796 |
|
1797 /***/ }), |
|
1798 |
|
1799 /***/ "URob": |
2157 /***/ (function(module, __webpack_exports__, __webpack_require__) { |
1800 /***/ (function(module, __webpack_exports__, __webpack_require__) { |
2158 |
1801 |
2159 "use strict"; |
1802 "use strict"; |
2160 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _defineProperty; }); |
1803 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("GRId"); |
2161 function _defineProperty(obj, key, value) { |
1804 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); |
2162 if (key in obj) { |
1805 /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("Tqx9"); |
2163 Object.defineProperty(obj, key, { |
1806 /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__); |
2164 value: value, |
1807 |
2165 enumerable: true, |
1808 |
2166 configurable: true, |
1809 /** |
2167 writable: true |
1810 * WordPress dependencies |
2168 }); |
1811 */ |
2169 } else { |
1812 |
2170 obj[key] = value; |
1813 const starFilled = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["SVG"], { |
2171 } |
1814 xmlns: "http://www.w3.org/2000/svg", |
2172 |
1815 viewBox: "0 0 24 24" |
2173 return obj; |
1816 }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["Path"], { |
2174 } |
1817 d: "M11.776 4.454a.25.25 0 01.448 0l2.069 4.192a.25.25 0 00.188.137l4.626.672a.25.25 0 01.139.426l-3.348 3.263a.25.25 0 00-.072.222l.79 4.607a.25.25 0 01-.362.263l-4.138-2.175a.25.25 0 00-.232 0l-4.138 2.175a.25.25 0 01-.363-.263l.79-4.607a.25.25 0 00-.071-.222L4.754 9.881a.25.25 0 01.139-.426l4.626-.672a.25.25 0 00.188-.137l2.069-4.192z" |
2175 |
1818 })); |
2176 /***/ }), |
1819 /* harmony default export */ __webpack_exports__["a"] = (starFilled); |
2177 |
1820 |
2178 /***/ 50: |
1821 |
|
1822 /***/ }), |
|
1823 |
|
1824 /***/ "Xxwi": |
2179 /***/ (function(module, __webpack_exports__, __webpack_require__) { |
1825 /***/ (function(module, __webpack_exports__, __webpack_require__) { |
2180 |
1826 |
2181 "use strict"; |
1827 "use strict"; |
2182 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _asyncToGenerator; }); |
1828 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("GRId"); |
2183 function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { |
1829 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); |
2184 try { |
1830 /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("Tqx9"); |
2185 var info = gen[key](arg); |
1831 /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__); |
2186 var value = info.value; |
1832 |
2187 } catch (error) { |
1833 |
2188 reject(error); |
1834 /** |
2189 return; |
1835 * WordPress dependencies |
2190 } |
1836 */ |
2191 |
1837 |
2192 if (info.done) { |
1838 const starEmpty = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["SVG"], { |
2193 resolve(value); |
1839 xmlns: "http://www.w3.org/2000/svg", |
2194 } else { |
1840 viewBox: "0 0 24 24" |
2195 Promise.resolve(value).then(_next, _throw); |
1841 }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["Path"], { |
2196 } |
1842 fillRule: "evenodd", |
2197 } |
1843 d: "M9.706 8.646a.25.25 0 01-.188.137l-4.626.672a.25.25 0 00-.139.427l3.348 3.262a.25.25 0 01.072.222l-.79 4.607a.25.25 0 00.362.264l4.138-2.176a.25.25 0 01.233 0l4.137 2.175a.25.25 0 00.363-.263l-.79-4.607a.25.25 0 01.072-.222l3.347-3.262a.25.25 0 00-.139-.427l-4.626-.672a.25.25 0 01-.188-.137l-2.069-4.192a.25.25 0 00-.448 0L9.706 8.646zM12 7.39l-.948 1.921a1.75 1.75 0 01-1.317.957l-2.12.308 1.534 1.495c.412.402.6.982.503 1.55l-.362 2.11 1.896-.997a1.75 1.75 0 011.629 0l1.895.997-.362-2.11a1.75 1.75 0 01.504-1.55l1.533-1.495-2.12-.308a1.75 1.75 0 01-1.317-.957L12 7.39z", |
2198 |
1844 clipRule: "evenodd" |
2199 function _asyncToGenerator(fn) { |
1845 })); |
2200 return function () { |
1846 /* harmony default export */ __webpack_exports__["a"] = (starEmpty); |
2201 var self = this, |
1847 |
2202 args = arguments; |
1848 |
2203 return new Promise(function (resolve, reject) { |
1849 /***/ }), |
2204 var gen = fn.apply(self, args); |
1850 |
2205 |
1851 /***/ "YLtl": |
2206 function _next(value) { |
1852 /***/ (function(module, exports) { |
2207 asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); |
1853 |
|
1854 (function() { module.exports = window["lodash"]; }()); |
|
1855 |
|
1856 /***/ }), |
|
1857 |
|
1858 /***/ "axFQ": |
|
1859 /***/ (function(module, exports) { |
|
1860 |
|
1861 (function() { module.exports = window["wp"]["blockEditor"]; }()); |
|
1862 |
|
1863 /***/ }), |
|
1864 |
|
1865 /***/ "g56x": |
|
1866 /***/ (function(module, exports) { |
|
1867 |
|
1868 (function() { module.exports = window["wp"]["hooks"]; }()); |
|
1869 |
|
1870 /***/ }), |
|
1871 |
|
1872 /***/ "gdqT": |
|
1873 /***/ (function(module, exports) { |
|
1874 |
|
1875 (function() { module.exports = window["wp"]["a11y"]; }()); |
|
1876 |
|
1877 /***/ }), |
|
1878 |
|
1879 /***/ "iClF": |
|
1880 /***/ (function(module, __webpack_exports__, __webpack_require__) { |
|
1881 |
|
1882 "use strict"; |
|
1883 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("GRId"); |
|
1884 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); |
|
1885 /** |
|
1886 * WordPress dependencies |
|
1887 */ |
|
1888 |
|
1889 /** @typedef {{icon: JSX.Element, size?: number} & import('@wordpress/primitives').SVGProps} IconProps */ |
|
1890 |
|
1891 /** |
|
1892 * Return an SVG icon. |
|
1893 * |
|
1894 * @param {IconProps} props icon is the SVG component to render |
|
1895 * size is a number specifiying the icon size in pixels |
|
1896 * Other props will be passed to wrapped SVG component |
|
1897 * |
|
1898 * @return {JSX.Element} Icon component |
|
1899 */ |
|
1900 |
|
1901 function Icon({ |
|
1902 icon, |
|
1903 size = 24, |
|
1904 ...props |
|
1905 }) { |
|
1906 return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["cloneElement"])(icon, { |
|
1907 width: size, |
|
1908 height: size, |
|
1909 ...props |
|
1910 }); |
|
1911 } |
|
1912 |
|
1913 /* harmony default export */ __webpack_exports__["a"] = (Icon); |
|
1914 |
|
1915 |
|
1916 /***/ }), |
|
1917 |
|
1918 /***/ "jSdM": |
|
1919 /***/ (function(module, exports) { |
|
1920 |
|
1921 (function() { module.exports = window["wp"]["editor"]; }()); |
|
1922 |
|
1923 /***/ }), |
|
1924 |
|
1925 /***/ "jZUy": |
|
1926 /***/ (function(module, exports) { |
|
1927 |
|
1928 (function() { module.exports = window["wp"]["coreData"]; }()); |
|
1929 |
|
1930 /***/ }), |
|
1931 |
|
1932 /***/ "l3Sj": |
|
1933 /***/ (function(module, exports) { |
|
1934 |
|
1935 (function() { module.exports = window["wp"]["i18n"]; }()); |
|
1936 |
|
1937 /***/ }), |
|
1938 |
|
1939 /***/ "onLe": |
|
1940 /***/ (function(module, exports) { |
|
1941 |
|
1942 (function() { module.exports = window["wp"]["notices"]; }()); |
|
1943 |
|
1944 /***/ }), |
|
1945 |
|
1946 /***/ "rmEH": |
|
1947 /***/ (function(module, exports) { |
|
1948 |
|
1949 (function() { module.exports = window["wp"]["htmlEntities"]; }()); |
|
1950 |
|
1951 /***/ }), |
|
1952 |
|
1953 /***/ "tI+e": |
|
1954 /***/ (function(module, exports) { |
|
1955 |
|
1956 (function() { module.exports = window["wp"]["components"]; }()); |
|
1957 |
|
1958 /***/ }), |
|
1959 |
|
1960 /***/ "wx14": |
|
1961 /***/ (function(module, __webpack_exports__, __webpack_require__) { |
|
1962 |
|
1963 "use strict"; |
|
1964 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _extends; }); |
|
1965 function _extends() { |
|
1966 _extends = Object.assign || function (target) { |
|
1967 for (var i = 1; i < arguments.length; i++) { |
|
1968 var source = arguments[i]; |
|
1969 |
|
1970 for (var key in source) { |
|
1971 if (Object.prototype.hasOwnProperty.call(source, key)) { |
|
1972 target[key] = source[key]; |
|
1973 } |
2208 } |
1974 } |
2209 |
1975 } |
2210 function _throw(err) { |
1976 |
2211 asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); |
1977 return target; |
2212 } |
|
2213 |
|
2214 _next(undefined); |
|
2215 }); |
|
2216 }; |
1978 }; |
2217 } |
1979 |
2218 |
1980 return _extends.apply(this, arguments); |
2219 /***/ }), |
1981 } |
2220 |
1982 |
2221 /***/ 6: |
1983 /***/ }), |
|
1984 |
|
1985 /***/ "ywyh": |
2222 /***/ (function(module, exports) { |
1986 /***/ (function(module, exports) { |
2223 |
1987 |
2224 (function() { module.exports = this["wp"]["primitives"]; }()); |
1988 (function() { module.exports = window["wp"]["apiFetch"]; }()); |
2225 |
|
2226 /***/ }), |
|
2227 |
|
2228 /***/ 7: |
|
2229 /***/ (function(module, exports) { |
|
2230 |
|
2231 (function() { module.exports = this["wp"]["blockEditor"]; }()); |
|
2232 |
|
2233 /***/ }), |
|
2234 |
|
2235 /***/ 76: |
|
2236 /***/ (function(module, exports) { |
|
2237 |
|
2238 (function() { module.exports = this["wp"]["plugins"]; }()); |
|
2239 |
|
2240 /***/ }), |
|
2241 |
|
2242 /***/ 9: |
|
2243 /***/ (function(module, exports) { |
|
2244 |
|
2245 (function() { module.exports = this["wp"]["compose"]; }()); |
|
2246 |
1989 |
2247 /***/ }) |
1990 /***/ }) |
2248 |
1991 |
2249 /******/ }); |
1992 /******/ }); |