Diff: STRATO-apps/wordpress_03/app/wp-includes/js/dist/block-library.js

Keine Baseline-Datei – Diff nur gegen leer.
Zur Liste
1 -
1 + /******/ (() => { // webpackBootstrap
2 + /******/ var __webpack_modules__ = ({
3 +
4 + /***/ 3533:
5 + /***/ ((module) => {
6 +
7 + "use strict";
8 + module.exports = window["wp"]["latexToMathml"];
9 +
10 + /***/ }),
11 +
12 + /***/ 7734:
13 + /***/ ((module) => {
14 +
15 + "use strict";
16 +
17 +
18 + // do not edit .js files directly - edit src/index.jst
19 +
20 +
21 + var envHasBigInt64Array = typeof BigInt64Array !== 'undefined';
22 +
23 +
24 + module.exports = function equal(a, b) {
25 + if (a === b) return true;
26 +
27 + if (a && b && typeof a == 'object' && typeof b == 'object') {
28 + if (a.constructor !== b.constructor) return false;
29 +
30 + var length, i, keys;
31 + if (Array.isArray(a)) {
32 + length = a.length;
33 + if (length != b.length) return false;
34 + for (i = length; i-- !== 0;)
35 + if (!equal(a[i], b[i])) return false;
36 + return true;
37 + }
38 +
39 +
40 + if ((a instanceof Map) && (b instanceof Map)) {
41 + if (a.size !== b.size) return false;
42 + for (i of a.entries())
43 + if (!b.has(i[0])) return false;
44 + for (i of a.entries())
45 + if (!equal(i[1], b.get(i[0]))) return false;
46 + return true;
47 + }
48 +
49 + if ((a instanceof Set) && (b instanceof Set)) {
50 + if (a.size !== b.size) return false;
51 + for (i of a.entries())
52 + if (!b.has(i[0])) return false;
53 + return true;
54 + }
55 +
56 + if (ArrayBuffer.isView(a) && ArrayBuffer.isView(b)) {
57 + length = a.length;
58 + if (length != b.length) return false;
59 + for (i = length; i-- !== 0;)
60 + if (a[i] !== b[i]) return false;
61 + return true;
62 + }
63 +
64 +
65 + if (a.constructor === RegExp) return a.source === b.source && a.flags === b.flags;
66 + if (a.valueOf !== Object.prototype.valueOf) return a.valueOf() === b.valueOf();
67 + if (a.toString !== Object.prototype.toString) return a.toString() === b.toString();
68 +
69 + keys = Object.keys(a);
70 + length = keys.length;
71 + if (length !== Object.keys(b).length) return false;
72 +
73 + for (i = length; i-- !== 0;)
74 + if (!Object.prototype.hasOwnProperty.call(b, keys[i])) return false;
75 +
76 + for (i = length; i-- !== 0;) {
77 + var key = keys[i];
78 +
79 + if (!equal(a[key], b[key])) return false;
80 + }
81 +
82 + return true;
83 + }
84 +
85 + // true if both NaN, false otherwise
86 + return a!==a && b!==b;
87 + };
88 +
89 +
90 + /***/ }),
91 +
92 + /***/ 9681:
93 + /***/ ((module) => {
94 +
95 + var characterMap = {
96 + "À": "A",
97 + "Á": "A",
98 + "Â": "A",
99 + "Ã": "A",
100 + "Ä": "A",
101 + "Å": "A",
102 + "Ấ": "A",
103 + "Ắ": "A",
104 + "Ẳ": "A",
105 + "Ẵ": "A",
106 + "Ặ": "A",
107 + "Æ": "AE",
108 + "Ầ": "A",
109 + "Ằ": "A",
110 + "Ȃ": "A",
111 + "Ả": "A",
112 + "Ạ": "A",
113 + "Ẩ": "A",
114 + "Ẫ": "A",
115 + "Ậ": "A",
116 + "Ç": "C",
117 + "Ḉ": "C",
118 + "È": "E",
119 + "É": "E",
120 + "Ê": "E",
121 + "Ë": "E",
122 + "Ế": "E",
123 + "Ḗ": "E",
124 + "Ề": "E",
125 + "Ḕ": "E",
126 + "Ḝ": "E",
127 + "Ȇ": "E",
128 + "Ẻ": "E",
129 + "Ẽ": "E",
130 + "Ẹ": "E",
131 + "Ể": "E",
132 + "Ễ": "E",
133 + "Ệ": "E",
134 + "Ì": "I",
135 + "Í": "I",
136 + "Î": "I",
137 + "Ï": "I",
138 + "Ḯ": "I",
139 + "Ȋ": "I",
140 + "Ỉ": "I",
141 + "Ị": "I",
142 + "Ð": "D",
143 + "Ñ": "N",
144 + "Ò": "O",
145 + "Ó": "O",
146 + "Ô": "O",
147 + "Õ": "O",
148 + "Ö": "O",
149 + "Ø": "O",
150 + "Ố": "O",
151 + "Ṍ": "O",
152 + "Ṓ": "O",
153 + "Ȏ": "O",
154 + "Ỏ": "O",
155 + "Ọ": "O",
156 + "Ổ": "O",
157 + "Ỗ": "O",
158 + "Ộ": "O",
159 + "Ờ": "O",
160 + "Ở": "O",
161 + "Ỡ": "O",
162 + "Ớ": "O",
163 + "Ợ": "O",
164 + "Ù": "U",
165 + "Ú": "U",
166 + "Û": "U",
167 + "Ü": "U",
168 + "Ủ": "U",
169 + "Ụ": "U",
170 + "Ử": "U",
171 + "Ữ": "U",
172 + "Ự": "U",
173 + "Ý": "Y",
174 + "à": "a",
175 + "á": "a",
176 + "â": "a",
177 + "ã": "a",
178 + "ä": "a",
179 + "å": "a",
180 + "ấ": "a",
181 + "ắ": "a",
182 + "ẳ": "a",
183 + "ẵ": "a",
184 + "ặ": "a",
185 + "æ": "ae",
186 + "ầ": "a",
187 + "ằ": "a",
188 + "ȃ": "a",
189 + "ả": "a",
190 + "ạ": "a",
191 + "ẩ": "a",
192 + "ẫ": "a",
193 + "ậ": "a",
194 + "ç": "c",
195 + "ḉ": "c",
196 + "è": "e",
197 + "é": "e",
198 + "ê": "e",
199 + "ë": "e",
200 + "ế": "e",
201 + "ḗ": "e",
202 + "ề": "e",
203 + "ḕ": "e",
204 + "ḝ": "e",
205 + "ȇ": "e",
206 + "ẻ": "e",
207 + "ẽ": "e",
208 + "ẹ": "e",
209 + "ể": "e",
210 + "ễ": "e",
211 + "ệ": "e",
212 + "ì": "i",
213 + "í": "i",
214 + "î": "i",
215 + "ï": "i",
216 + "ḯ": "i",
217 + "ȋ": "i",
218 + "ỉ": "i",
219 + "ị": "i",
220 + "ð": "d",
221 + "ñ": "n",
222 + "ò": "o",
223 + "ó": "o",
224 + "ô": "o",
225 + "õ": "o",
226 + "ö": "o",
227 + "ø": "o",
228 + "ố": "o",
229 + "ṍ": "o",
230 + "ṓ": "o",
231 + "ȏ": "o",
232 + "ỏ": "o",
233 + "ọ": "o",
234 + "ổ": "o",
235 + "ỗ": "o",
236 + "ộ": "o",
237 + "ờ": "o",
238 + "ở": "o",
239 + "ỡ": "o",
240 + "ớ": "o",
241 + "ợ": "o",
242 + "ù": "u",
243 + "ú": "u",
244 + "û": "u",
245 + "ü": "u",
246 + "ủ": "u",
247 + "ụ": "u",
248 + "ử": "u",
249 + "ữ": "u",
250 + "ự": "u",
251 + "ý": "y",
252 + "ÿ": "y",
253 + "Ā": "A",
254 + "ā": "a",
255 + "Ă": "A",
256 + "ă": "a",
257 + "Ą": "A",
258 + "ą": "a",
259 + "Ć": "C",
260 + "ć": "c",
261 + "Ĉ": "C",
262 + "ĉ": "c",
263 + "Ċ": "C",
264 + "ċ": "c",
265 + "Č": "C",
266 + "č": "c",
267 + "C̆": "C",
268 + "c̆": "c",
269 + "Ď": "D",
270 + "ď": "d",
271 + "Đ": "D",
272 + "đ": "d",
273 + "Ē": "E",
274 + "ē": "e",
275 + "Ĕ": "E",
276 + "ĕ": "e",
277 + "Ė": "E",
278 + "ė": "e",
279 + "Ę": "E",
280 + "ę": "e",
281 + "Ě": "E",
282 + "ě": "e",
283 + "Ĝ": "G",
284 + "Ǵ": "G",
285 + "ĝ": "g",
286 + "ǵ": "g",
287 + "Ğ": "G",
288 + "ğ": "g",
289 + "Ġ": "G",
290 + "ġ": "g",
291 + "Ģ": "G",
292 + "ģ": "g",
293 + "Ĥ": "H",
294 + "ĥ": "h",
295 + "Ħ": "H",
296 + "ħ": "h",
297 + "Ḫ": "H",
298 + "ḫ": "h",
299 + "Ĩ": "I",
300 + "ĩ": "i",
301 + "Ī": "I",
302 + "ī": "i",
303 + "Ĭ": "I",
304 + "ĭ": "i",
305 + "Į": "I",
306 + "į": "i",
307 + "İ": "I",
308 + "ı": "i",
309 + "IJ": "IJ",
310 + "ij": "ij",
311 + "Ĵ": "J",
312 + "ĵ": "j",
313 + "Ķ": "K",
314 + "ķ": "k",
315 + "Ḱ": "K",
316 + "ḱ": "k",
317 + "K̆": "K",
318 + "k̆": "k",
319 + "Ĺ": "L",
320 + "ĺ": "l",
321 + "Ļ": "L",
322 + "ļ": "l",
323 + "Ľ": "L",
324 + "ľ": "l",
325 + "Ŀ": "L",
326 + "ŀ": "l",
327 + "Ł": "l",
328 + "ł": "l",
329 + "Ḿ": "M",
330 + "ḿ": "m",
331 + "M̆": "M",
332 + "m̆": "m",
333 + "Ń": "N",
334 + "ń": "n",
335 + "Ņ": "N",
336 + "ņ": "n",
337 + "Ň": "N",
338 + "ň": "n",
339 + "ʼn": "n",
340 + "N̆": "N",
341 + "n̆": "n",
342 + "Ō": "O",
343 + "ō": "o",
344 + "Ŏ": "O",
345 + "ŏ": "o",
346 + "Ő": "O",
347 + "ő": "o",
348 + "Œ": "OE",
349 + "œ": "oe",
350 + "P̆": "P",
351 + "p̆": "p",
352 + "Ŕ": "R",
353 + "ŕ": "r",
354 + "Ŗ": "R",
355 + "ŗ": "r",
356 + "Ř": "R",
357 + "ř": "r",
358 + "R̆": "R",
359 + "r̆": "r",
360 + "Ȓ": "R",
361 + "ȓ": "r",
362 + "Ś": "S",
363 + "ś": "s",
364 + "Ŝ": "S",
365 + "ŝ": "s",
366 + "Ş": "S",
367 + "Ș": "S",
368 + "ș": "s",
369 + "ş": "s",
370 + "Š": "S",
371 + "š": "s",
372 + "Ţ": "T",
373 + "ţ": "t",
374 + "ț": "t",
375 + "Ț": "T",
376 + "Ť": "T",
377 + "ť": "t",
378 + "Ŧ": "T",
379 + "ŧ": "t",
380 + "T̆": "T",
381 + "t̆": "t",
382 + "Ũ": "U",
383 + "ũ": "u",
384 + "Ū": "U",
385 + "ū": "u",
386 + "Ŭ": "U",
387 + "ŭ": "u",
388 + "Ů": "U",
389 + "ů": "u",
390 + "Ű": "U",
391 + "ű": "u",
392 + "Ų": "U",
393 + "ų": "u",
394 + "Ȗ": "U",
395 + "ȗ": "u",
396 + "V̆": "V",
397 + "v̆": "v",
398 + "Ŵ": "W",
399 + "ŵ": "w",
400 + "Ẃ": "W",
401 + "ẃ": "w",
402 + "X̆": "X",
403 + "x̆": "x",
404 + "Ŷ": "Y",
405 + "ŷ": "y",
406 + "Ÿ": "Y",
407 + "Y̆": "Y",
408 + "y̆": "y",
409 + "Ź": "Z",
410 + "ź": "z",
411 + "Ż": "Z",
412 + "ż": "z",
413 + "Ž": "Z",
414 + "ž": "z",
415 + "ſ": "s",
416 + "ƒ": "f",
417 + "Ơ": "O",
418 + "ơ": "o",
419 + "Ư": "U",
420 + "ư": "u",
421 + "Ǎ": "A",
422 + "ǎ": "a",
423 + "Ǐ": "I",
424 + "ǐ": "i",
425 + "Ǒ": "O",
426 + "ǒ": "o",
427 + "Ǔ": "U",
428 + "ǔ": "u",
429 + "Ǖ": "U",
430 + "ǖ": "u",
431 + "Ǘ": "U",
432 + "ǘ": "u",
433 + "Ǚ": "U",
434 + "ǚ": "u",
435 + "Ǜ": "U",
436 + "ǜ": "u",
437 + "Ứ": "U",
438 + "ứ": "u",
439 + "Ṹ": "U",
440 + "ṹ": "u",
441 + "Ǻ": "A",
442 + "ǻ": "a",
443 + "Ǽ": "AE",
444 + "ǽ": "ae",
445 + "Ǿ": "O",
446 + "ǿ": "o",
447 + "Þ": "TH",
448 + "þ": "th",
449 + "Ṕ": "P",
450 + "ṕ": "p",
451 + "Ṥ": "S",
452 + "ṥ": "s",
453 + "X́": "X",
454 + "x́": "x",
455 + "Ѓ": "Г",
456 + "ѓ": "г",
457 + "Ќ": "К",
458 + "ќ": "к",
459 + "A̋": "A",
460 + "a̋": "a",
461 + "E̋": "E",
462 + "e̋": "e",
463 + "I̋": "I",
464 + "i̋": "i",
465 + "Ǹ": "N",
466 + "ǹ": "n",
467 + "Ồ": "O",
468 + "ồ": "o",
469 + "Ṑ": "O",
470 + "ṑ": "o",
471 + "Ừ": "U",
472 + "ừ": "u",
473 + "Ẁ": "W",
474 + "ẁ": "w",
475 + "Ỳ": "Y",
476 + "ỳ": "y",
477 + "Ȁ": "A",
478 + "ȁ": "a",
479 + "Ȅ": "E",
480 + "ȅ": "e",
481 + "Ȉ": "I",
482 + "ȉ": "i",
483 + "Ȍ": "O",
484 + "ȍ": "o",
485 + "Ȑ": "R",
486 + "ȑ": "r",
487 + "Ȕ": "U",
488 + "ȕ": "u",
489 + "B̌": "B",
490 + "b̌": "b",
491 + "Č̣": "C",
492 + "č̣": "c",
493 + "Ê̌": "E",
494 + "ê̌": "e",
495 + "F̌": "F",
496 + "f̌": "f",
497 + "Ǧ": "G",
498 + "ǧ": "g",
499 + "Ȟ": "H",
500 + "ȟ": "h",
501 + "J̌": "J",
502 + "ǰ": "j",
503 + "Ǩ": "K",
504 + "ǩ": "k",
505 + "M̌": "M",
506 + "m̌": "m",
507 + "P̌": "P",
508 + "p̌": "p",
509 + "Q̌": "Q",
510 + "q̌": "q",
511 + "Ř̩": "R",
512 + "ř̩": "r",
513 + "Ṧ": "S",
514 + "ṧ": "s",
515 + "V̌": "V",
516 + "v̌": "v",
517 + "W̌": "W",
518 + "w̌": "w",
519 + "X̌": "X",
520 + "x̌": "x",
521 + "Y̌": "Y",
522 + "y̌": "y",
523 + "A̧": "A",
524 + "a̧": "a",
525 + "B̧": "B",
526 + "b̧": "b",
527 + "Ḑ": "D",
528 + "ḑ": "d",
529 + "Ȩ": "E",
530 + "ȩ": "e",
531 + "Ɛ̧": "E",
532 + "ɛ̧": "e",
533 + "Ḩ": "H",
534 + "ḩ": "h",
535 + "I̧": "I",
536 + "i̧": "i",
537 + "Ɨ̧": "I",
538 + "ɨ̧": "i",
539 + "M̧": "M",
540 + "m̧": "m",
541 + "O̧": "O",
542 + "o̧": "o",
543 + "Q̧": "Q",
544 + "q̧": "q",
545 + "U̧": "U",
546 + "u̧": "u",
547 + "X̧": "X",
548 + "x̧": "x",
549 + "Z̧": "Z",
550 + "z̧": "z",
551 + "й":"и",
552 + "Й":"И",
553 + "ё":"е",
554 + "Ё":"Е",
555 + };
556 +
557 + var chars = Object.keys(characterMap).join('|');
558 + var allAccents = new RegExp(chars, 'g');
559 + var firstAccent = new RegExp(chars, '');
560 +
561 + function matcher(match) {
562 + return characterMap[match];
563 + }
564 +
565 + var removeAccents = function(string) {
566 + return string.replace(allAccents, matcher);
567 + };
568 +
569 + var hasAccents = function(string) {
570 + return !!string.match(firstAccent);
571 + };
572 +
573 + module.exports = removeAccents;
574 + module.exports.has = hasAccents;
575 + module.exports.remove = removeAccents;
576 +
577 +
578 + /***/ })
579 +
580 + /******/ });
581 + /************************************************************************/
582 + /******/ // The module cache
583 + /******/ var __webpack_module_cache__ = {};
584 + /******/
585 + /******/ // The require function
586 + /******/ function __webpack_require__(moduleId) {
587 + /******/ // Check if module is in cache
588 + /******/ var cachedModule = __webpack_module_cache__[moduleId];
589 + /******/ if (cachedModule !== undefined) {
590 + /******/ return cachedModule.exports;
591 + /******/ }
592 + /******/ // Create a new module (and put it into the cache)
593 + /******/ var module = __webpack_module_cache__[moduleId] = {
594 + /******/ // no module.id needed
595 + /******/ // no module.loaded needed
596 + /******/ exports: {}
597 + /******/ };
598 + /******/
599 + /******/ // Execute the module function
600 + /******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
601 + /******/
602 + /******/ // Return the exports of the module
603 + /******/ return module.exports;
604 + /******/ }
605 + /******/
606 + /************************************************************************/
607 + /******/ /* webpack/runtime/compat get default export */
608 + /******/ (() => {
609 + /******/ // getDefaultExport function for compatibility with non-harmony modules
610 + /******/ __webpack_require__.n = (module) => {
611 + /******/ var getter = module && module.__esModule ?
612 + /******/ () => (module['default']) :
613 + /******/ () => (module);
614 + /******/ __webpack_require__.d(getter, { a: getter });
615 + /******/ return getter;
616 + /******/ };
617 + /******/ })();
618 + /******/
619 + /******/ /* webpack/runtime/create fake namespace object */
620 + /******/ (() => {
621 + /******/ var getProto = Object.getPrototypeOf ? (obj) => (Object.getPrototypeOf(obj)) : (obj) => (obj.__proto__);
622 + /******/ var leafPrototypes;
623 + /******/ // create a fake namespace object
624 + /******/ // mode & 1: value is a module id, require it
625 + /******/ // mode & 2: merge all properties of value into the ns
626 + /******/ // mode & 4: return value when already ns object
627 + /******/ // mode & 16: return value when it's Promise-like
628 + /******/ // mode & 8|1: behave like require
629 + /******/ __webpack_require__.t = function(value, mode) {
630 + /******/ if(mode & 1) value = this(value);
631 + /******/ if(mode & 8) return value;
632 + /******/ if(typeof value === 'object' && value) {
633 + /******/ if((mode & 4) && value.__esModule) return value;
634 + /******/ if((mode & 16) && typeof value.then === 'function') return value;
635 + /******/ }
636 + /******/ var ns = Object.create(null);
637 + /******/ __webpack_require__.r(ns);
638 + /******/ var def = {};
639 + /******/ leafPrototypes = leafPrototypes || [null, getProto({}), getProto([]), getProto(getProto)];
640 + /******/ for(var current = mode & 2 && value; typeof current == 'object' && !~leafPrototypes.indexOf(current); current = getProto(current)) {
641 + /******/ Object.getOwnPropertyNames(current).forEach((key) => (def[key] = () => (value[key])));
642 + /******/ }
643 + /******/ def['default'] = () => (value);
644 + /******/ __webpack_require__.d(ns, def);
645 + /******/ return ns;
646 + /******/ };
647 + /******/ })();
648 + /******/
649 + /******/ /* webpack/runtime/define property getters */
650 + /******/ (() => {
651 + /******/ // define getter functions for harmony exports
652 + /******/ __webpack_require__.d = (exports, definition) => {
653 + /******/ for(var key in definition) {
654 + /******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
655 + /******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
656 + /******/ }
657 + /******/ }
658 + /******/ };
659 + /******/ })();
660 + /******/
661 + /******/ /* webpack/runtime/hasOwnProperty shorthand */
662 + /******/ (() => {
663 + /******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
664 + /******/ })();
665 + /******/
666 + /******/ /* webpack/runtime/make namespace object */
667 + /******/ (() => {
668 + /******/ // define __esModule on exports
669 + /******/ __webpack_require__.r = (exports) => {
670 + /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
671 + /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
672 + /******/ }
673 + /******/ Object.defineProperty(exports, '__esModule', { value: true });
674 + /******/ };
675 + /******/ })();
676 + /******/
677 + /************************************************************************/
678 + var __webpack_exports__ = {};
679 + // This entry needs to be wrapped in an IIFE because it needs to be in strict mode.
680 + (() => {
681 + "use strict";
682 + // ESM COMPAT FLAG
683 + __webpack_require__.r(__webpack_exports__);
684 +
685 + // EXPORTS
686 + __webpack_require__.d(__webpack_exports__, {
687 + __experimentalGetCoreBlocks: () => (/* binding */ __experimentalGetCoreBlocks),
688 + __experimentalRegisterExperimentalCoreBlocks: () => (/* binding */ __experimentalRegisterExperimentalCoreBlocks),
689 + privateApis: () => (/* reexport */ privateApis),
690 + registerCoreBlocks: () => (/* binding */ registerCoreBlocks)
691 + });
692 +
693 + // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/accordion/index.js
694 + var accordion_namespaceObject = {};
695 + __webpack_require__.r(accordion_namespaceObject);
696 + __webpack_require__.d(accordion_namespaceObject, {
697 + init: () => (init),
698 + metadata: () => (block_namespaceObject),
699 + name: () => (accordion_name),
700 + settings: () => (settings)
701 + });
702 +
703 + // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/accordion-item/index.js
704 + var accordion_item_namespaceObject = {};
705 + __webpack_require__.r(accordion_item_namespaceObject);
706 + __webpack_require__.d(accordion_item_namespaceObject, {
707 + init: () => (accordion_item_init),
708 + metadata: () => (accordion_item_block_namespaceObject),
709 + name: () => (accordion_item_name),
710 + settings: () => (accordion_item_settings)
711 + });
712 +
713 + // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/accordion-heading/index.js
714 + var accordion_heading_namespaceObject = {};
715 + __webpack_require__.r(accordion_heading_namespaceObject);
716 + __webpack_require__.d(accordion_heading_namespaceObject, {
717 + init: () => (accordion_heading_init),
718 + metadata: () => (accordion_heading_block_namespaceObject),
719 + name: () => (accordion_heading_name),
720 + settings: () => (accordion_heading_settings)
721 + });
722 +
723 + // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/accordion-panel/index.js
724 + var accordion_panel_namespaceObject = {};
725 + __webpack_require__.r(accordion_panel_namespaceObject);
726 + __webpack_require__.d(accordion_panel_namespaceObject, {
727 + init: () => (accordion_panel_init),
728 + metadata: () => (accordion_panel_block_namespaceObject),
729 + name: () => (accordion_panel_name),
730 + settings: () => (accordion_panel_settings)
731 + });
732 +
733 + // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/archives/index.js
734 + var archives_namespaceObject = {};
735 + __webpack_require__.r(archives_namespaceObject);
736 + __webpack_require__.d(archives_namespaceObject, {
737 + init: () => (archives_init),
738 + metadata: () => (archives_block_namespaceObject),
739 + name: () => (archives_name),
740 + settings: () => (archives_settings)
741 + });
742 +
743 + // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/avatar/index.js
744 + var avatar_namespaceObject = {};
745 + __webpack_require__.r(avatar_namespaceObject);
746 + __webpack_require__.d(avatar_namespaceObject, {
747 + init: () => (avatar_init),
748 + metadata: () => (avatar_block_namespaceObject),
749 + name: () => (avatar_name),
750 + settings: () => (avatar_settings)
751 + });
752 +
753 + // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/audio/index.js
754 + var build_module_audio_namespaceObject = {};
755 + __webpack_require__.r(build_module_audio_namespaceObject);
756 + __webpack_require__.d(build_module_audio_namespaceObject, {
757 + init: () => (audio_init),
758 + metadata: () => (audio_block_namespaceObject),
759 + name: () => (audio_name),
760 + settings: () => (audio_settings)
761 + });
762 +
763 + // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/breadcrumbs/index.js
764 + var build_module_breadcrumbs_namespaceObject = {};
765 + __webpack_require__.r(build_module_breadcrumbs_namespaceObject);
766 + __webpack_require__.d(build_module_breadcrumbs_namespaceObject, {
767 + init: () => (breadcrumbs_init),
768 + metadata: () => (breadcrumbs_block_namespaceObject),
769 + name: () => (breadcrumbs_name),
770 + settings: () => (breadcrumbs_settings)
771 + });
772 +
773 + // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/button/index.js
774 + var build_module_button_namespaceObject = {};
775 + __webpack_require__.r(build_module_button_namespaceObject);
776 + __webpack_require__.d(build_module_button_namespaceObject, {
777 + init: () => (button_init),
778 + metadata: () => (button_block_namespaceObject),
779 + name: () => (button_name),
780 + settings: () => (button_settings)
781 + });
782 +
783 + // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/buttons/index.js
784 + var build_module_buttons_namespaceObject = {};
785 + __webpack_require__.r(build_module_buttons_namespaceObject);
786 + __webpack_require__.d(build_module_buttons_namespaceObject, {
787 + init: () => (buttons_init),
788 + metadata: () => (buttons_block_namespaceObject),
789 + name: () => (buttons_name),
790 + settings: () => (buttons_settings)
791 + });
792 +
793 + // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/calendar/index.js
794 + var build_module_calendar_namespaceObject = {};
795 + __webpack_require__.r(build_module_calendar_namespaceObject);
796 + __webpack_require__.d(build_module_calendar_namespaceObject, {
797 + init: () => (calendar_init),
798 + metadata: () => (calendar_block_namespaceObject),
799 + name: () => (calendar_name),
800 + settings: () => (calendar_settings)
801 + });
802 +
803 + // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/categories/index.js
804 + var categories_namespaceObject = {};
805 + __webpack_require__.r(categories_namespaceObject);
806 + __webpack_require__.d(categories_namespaceObject, {
807 + init: () => (categories_init),
808 + metadata: () => (categories_block_namespaceObject),
809 + name: () => (categories_name),
810 + settings: () => (categories_settings)
811 + });
812 +
813 + // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/freeform/index.js
814 + var freeform_namespaceObject = {};
815 + __webpack_require__.r(freeform_namespaceObject);
816 + __webpack_require__.d(freeform_namespaceObject, {
817 + init: () => (freeform_init),
818 + metadata: () => (freeform_block_namespaceObject),
819 + name: () => (freeform_name),
820 + settings: () => (freeform_settings)
821 + });
822 +
823 + // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/code/index.js
824 + var build_module_code_namespaceObject = {};
825 + __webpack_require__.r(build_module_code_namespaceObject);
826 + __webpack_require__.d(build_module_code_namespaceObject, {
827 + init: () => (code_init),
828 + metadata: () => (code_block_namespaceObject),
829 + name: () => (code_name),
830 + settings: () => (code_settings)
831 + });
832 +
833 + // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/column/index.js
834 + var build_module_column_namespaceObject = {};
835 + __webpack_require__.r(build_module_column_namespaceObject);
836 + __webpack_require__.d(build_module_column_namespaceObject, {
837 + init: () => (column_init),
838 + metadata: () => (column_block_namespaceObject),
839 + name: () => (column_name),
840 + settings: () => (column_settings)
841 + });
842 +
843 + // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/columns/index.js
844 + var build_module_columns_namespaceObject = {};
845 + __webpack_require__.r(build_module_columns_namespaceObject);
846 + __webpack_require__.d(build_module_columns_namespaceObject, {
847 + init: () => (columns_init),
848 + metadata: () => (columns_block_namespaceObject),
849 + name: () => (columns_name),
850 + settings: () => (columns_settings)
851 + });
852 +
853 + // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/comments/index.js
854 + var comments_namespaceObject = {};
855 + __webpack_require__.r(comments_namespaceObject);
856 + __webpack_require__.d(comments_namespaceObject, {
857 + init: () => (comments_init),
858 + metadata: () => (comments_block_namespaceObject),
859 + name: () => (comments_name),
860 + settings: () => (comments_settings)
861 + });
862 +
863 + // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/comment-author-avatar/index.js
864 + var build_module_comment_author_avatar_namespaceObject = {};
865 + __webpack_require__.r(build_module_comment_author_avatar_namespaceObject);
866 + __webpack_require__.d(build_module_comment_author_avatar_namespaceObject, {
867 + init: () => (comment_author_avatar_init),
868 + metadata: () => (comment_author_avatar_block_namespaceObject),
869 + name: () => (comment_author_avatar_name),
870 + settings: () => (comment_author_avatar_settings)
871 + });
872 +
873 + // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/comment-author-name/index.js
874 + var build_module_comment_author_name_namespaceObject = {};
875 + __webpack_require__.r(build_module_comment_author_name_namespaceObject);
876 + __webpack_require__.d(build_module_comment_author_name_namespaceObject, {
877 + init: () => (comment_author_name_init),
878 + metadata: () => (comment_author_name_block_namespaceObject),
879 + name: () => (comment_author_name_name),
880 + settings: () => (comment_author_name_settings)
881 + });
882 +
883 + // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/comment-content/index.js
884 + var build_module_comment_content_namespaceObject = {};
885 + __webpack_require__.r(build_module_comment_content_namespaceObject);
886 + __webpack_require__.d(build_module_comment_content_namespaceObject, {
887 + init: () => (comment_content_init),
888 + metadata: () => (comment_content_block_namespaceObject),
889 + name: () => (comment_content_name),
890 + settings: () => (comment_content_settings)
891 + });
892 +
893 + // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/comment-date/index.js
894 + var comment_date_namespaceObject = {};
895 + __webpack_require__.r(comment_date_namespaceObject);
896 + __webpack_require__.d(comment_date_namespaceObject, {
897 + init: () => (comment_date_init),
898 + metadata: () => (comment_date_block_namespaceObject),
899 + name: () => (comment_date_name),
900 + settings: () => (comment_date_settings)
901 + });
902 +
903 + // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/comment-edit-link/index.js
904 + var build_module_comment_edit_link_namespaceObject = {};
905 + __webpack_require__.r(build_module_comment_edit_link_namespaceObject);
906 + __webpack_require__.d(build_module_comment_edit_link_namespaceObject, {
907 + init: () => (comment_edit_link_init),
908 + metadata: () => (comment_edit_link_block_namespaceObject),
909 + name: () => (comment_edit_link_name),
910 + settings: () => (comment_edit_link_settings)
911 + });
912 +
913 + // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/comment-reply-link/index.js
914 + var build_module_comment_reply_link_namespaceObject = {};
915 + __webpack_require__.r(build_module_comment_reply_link_namespaceObject);
916 + __webpack_require__.d(build_module_comment_reply_link_namespaceObject, {
917 + init: () => (comment_reply_link_init),
918 + metadata: () => (comment_reply_link_block_namespaceObject),
919 + name: () => (comment_reply_link_name),
920 + settings: () => (comment_reply_link_settings)
921 + });
922 +
923 + // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/comment-template/index.js
924 + var comment_template_namespaceObject = {};
925 + __webpack_require__.r(comment_template_namespaceObject);
926 + __webpack_require__.d(comment_template_namespaceObject, {
927 + init: () => (comment_template_init),
928 + metadata: () => (comment_template_block_namespaceObject),
929 + name: () => (comment_template_name),
930 + settings: () => (comment_template_settings)
931 + });
932 +
933 + // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/comments-pagination-previous/index.js
934 + var comments_pagination_previous_namespaceObject = {};
935 + __webpack_require__.r(comments_pagination_previous_namespaceObject);
936 + __webpack_require__.d(comments_pagination_previous_namespaceObject, {
937 + init: () => (comments_pagination_previous_init),
938 + metadata: () => (comments_pagination_previous_block_namespaceObject),
939 + name: () => (comments_pagination_previous_name),
940 + settings: () => (comments_pagination_previous_settings)
941 + });
942 +
943 + // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/comments-pagination/index.js
944 + var comments_pagination_namespaceObject = {};
945 + __webpack_require__.r(comments_pagination_namespaceObject);
946 + __webpack_require__.d(comments_pagination_namespaceObject, {
947 + init: () => (comments_pagination_init),
948 + metadata: () => (comments_pagination_block_namespaceObject),
949 + name: () => (comments_pagination_name),
950 + settings: () => (comments_pagination_settings)
951 + });
952 +
953 + // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/comments-pagination-next/index.js
954 + var comments_pagination_next_namespaceObject = {};
955 + __webpack_require__.r(comments_pagination_next_namespaceObject);
956 + __webpack_require__.d(comments_pagination_next_namespaceObject, {
957 + init: () => (comments_pagination_next_init),
958 + metadata: () => (comments_pagination_next_block_namespaceObject),
959 + name: () => (comments_pagination_next_name),
960 + settings: () => (comments_pagination_next_settings)
961 + });
962 +
963 + // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/comments-pagination-numbers/index.js
964 + var comments_pagination_numbers_namespaceObject = {};
965 + __webpack_require__.r(comments_pagination_numbers_namespaceObject);
966 + __webpack_require__.d(comments_pagination_numbers_namespaceObject, {
967 + init: () => (comments_pagination_numbers_init),
968 + metadata: () => (comments_pagination_numbers_block_namespaceObject),
969 + name: () => (comments_pagination_numbers_name),
970 + settings: () => (comments_pagination_numbers_settings)
971 + });
972 +
973 + // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/comments-title/index.js
974 + var comments_title_namespaceObject = {};
975 + __webpack_require__.r(comments_title_namespaceObject);
976 + __webpack_require__.d(comments_title_namespaceObject, {
977 + init: () => (comments_title_init),
978 + metadata: () => (comments_title_block_namespaceObject),
979 + name: () => (comments_title_name),
980 + settings: () => (comments_title_settings)
981 + });
982 +
983 + // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/cover/index.js
984 + var build_module_cover_namespaceObject = {};
985 + __webpack_require__.r(build_module_cover_namespaceObject);
986 + __webpack_require__.d(build_module_cover_namespaceObject, {
987 + init: () => (cover_init),
988 + metadata: () => (cover_block_namespaceObject),
989 + name: () => (cover_name),
990 + settings: () => (cover_settings)
991 + });
992 +
993 + // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/details/index.js
994 + var build_module_details_namespaceObject = {};
995 + __webpack_require__.r(build_module_details_namespaceObject);
996 + __webpack_require__.d(build_module_details_namespaceObject, {
997 + init: () => (details_init),
998 + metadata: () => (details_block_namespaceObject),
999 + name: () => (details_name),
1000 + settings: () => (details_settings)
1001 + });
1002 +
1003 + // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/embed/index.js
1004 + var embed_namespaceObject = {};
1005 + __webpack_require__.r(embed_namespaceObject);
1006 + __webpack_require__.d(embed_namespaceObject, {
1007 + init: () => (embed_init),
1008 + metadata: () => (embed_block_namespaceObject),
1009 + name: () => (embed_name),
1010 + settings: () => (embed_settings)
1011 + });
1012 +
1013 + // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/file/index.js
1014 + var build_module_file_namespaceObject = {};
1015 + __webpack_require__.r(build_module_file_namespaceObject);
1016 + __webpack_require__.d(build_module_file_namespaceObject, {
1017 + init: () => (file_init),
1018 + metadata: () => (file_block_namespaceObject),
1019 + name: () => (file_name),
1020 + settings: () => (file_settings)
1021 + });
1022 +
1023 + // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/form/index.js
1024 + var build_module_form_namespaceObject = {};
1025 + __webpack_require__.r(build_module_form_namespaceObject);
1026 + __webpack_require__.d(build_module_form_namespaceObject, {
1027 + init: () => (form_init),
1028 + metadata: () => (form_block_namespaceObject),
1029 + name: () => (form_name),
1030 + settings: () => (form_settings)
1031 + });
1032 +
1033 + // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/form-input/index.js
1034 + var form_input_namespaceObject = {};
1035 + __webpack_require__.r(form_input_namespaceObject);
1036 + __webpack_require__.d(form_input_namespaceObject, {
1037 + init: () => (form_input_init),
1038 + metadata: () => (form_input_block_namespaceObject),
1039 + name: () => (form_input_name),
1040 + settings: () => (form_input_settings)
1041 + });
1042 +
1043 + // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/form-submit-button/index.js
1044 + var form_submit_button_namespaceObject = {};
1045 + __webpack_require__.r(form_submit_button_namespaceObject);
1046 + __webpack_require__.d(form_submit_button_namespaceObject, {
1047 + init: () => (form_submit_button_init),
1048 + metadata: () => (form_submit_button_block_namespaceObject),
1049 + name: () => (form_submit_button_name),
1050 + settings: () => (form_submit_button_settings)
1051 + });
1052 +
1053 + // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/form-submission-notification/index.js
1054 + var form_submission_notification_namespaceObject = {};
1055 + __webpack_require__.r(form_submission_notification_namespaceObject);
1056 + __webpack_require__.d(form_submission_notification_namespaceObject, {
1057 + init: () => (form_submission_notification_init),
1058 + metadata: () => (form_submission_notification_block_namespaceObject),
1059 + name: () => (form_submission_notification_name),
1060 + settings: () => (form_submission_notification_settings)
1061 + });
1062 +
1063 + // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/gallery/index.js
1064 + var build_module_gallery_namespaceObject = {};
1065 + __webpack_require__.r(build_module_gallery_namespaceObject);
1066 + __webpack_require__.d(build_module_gallery_namespaceObject, {
1067 + init: () => (gallery_init),
1068 + metadata: () => (gallery_block_namespaceObject),
1069 + name: () => (gallery_name),
1070 + settings: () => (gallery_settings)
1071 + });
1072 +
1073 + // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/group/index.js
1074 + var build_module_group_namespaceObject = {};
1075 + __webpack_require__.r(build_module_group_namespaceObject);
1076 + __webpack_require__.d(build_module_group_namespaceObject, {
1077 + init: () => (group_init),
1078 + metadata: () => (group_block_namespaceObject),
1079 + name: () => (group_name),
1080 + settings: () => (group_settings)
1081 + });
1082 +
1083 + // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/heading/index.js
1084 + var build_module_heading_namespaceObject = {};
1085 + __webpack_require__.r(build_module_heading_namespaceObject);
1086 + __webpack_require__.d(build_module_heading_namespaceObject, {
1087 + init: () => (heading_init),
1088 + metadata: () => (heading_block_namespaceObject),
1089 + name: () => (heading_name),
1090 + settings: () => (heading_settings)
1091 + });
1092 +
1093 + // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/home-link/index.js
1094 + var home_link_namespaceObject = {};
1095 + __webpack_require__.r(home_link_namespaceObject);
1096 + __webpack_require__.d(home_link_namespaceObject, {
1097 + init: () => (home_link_init),
1098 + metadata: () => (home_link_block_namespaceObject),
1099 + name: () => (home_link_name),
1100 + settings: () => (home_link_settings)
1101 + });
1102 +
1103 + // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/html/index.js
1104 + var build_module_html_namespaceObject = {};
1105 + __webpack_require__.r(build_module_html_namespaceObject);
1106 + __webpack_require__.d(build_module_html_namespaceObject, {
1107 + init: () => (html_init),
1108 + metadata: () => (html_block_namespaceObject),
1109 + name: () => (html_name),
1110 + settings: () => (html_settings)
1111 + });
1112 +
1113 + // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/image/index.js
1114 + var build_module_image_namespaceObject = {};
1115 + __webpack_require__.r(build_module_image_namespaceObject);
1116 + __webpack_require__.d(build_module_image_namespaceObject, {
1117 + init: () => (image_init),
1118 + metadata: () => (image_block_namespaceObject),
1119 + name: () => (image_name),
1120 + settings: () => (image_settings)
1121 + });
1122 +
1123 + // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/latest-comments/index.js
1124 + var latest_comments_namespaceObject = {};
1125 + __webpack_require__.r(latest_comments_namespaceObject);
1126 + __webpack_require__.d(latest_comments_namespaceObject, {
1127 + init: () => (latest_comments_init),
1128 + metadata: () => (latest_comments_block_namespaceObject),
1129 + name: () => (latest_comments_name),
1130 + settings: () => (latest_comments_settings)
1131 + });
1132 +
1133 + // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/latest-posts/index.js
1134 + var latest_posts_namespaceObject = {};
1135 + __webpack_require__.r(latest_posts_namespaceObject);
1136 + __webpack_require__.d(latest_posts_namespaceObject, {
1137 + init: () => (latest_posts_init),
1138 + metadata: () => (latest_posts_block_namespaceObject),
1139 + name: () => (latest_posts_name),
1140 + settings: () => (latest_posts_settings)
1141 + });
1142 +
1143 + // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/list/index.js
1144 + var build_module_list_namespaceObject = {};
1145 + __webpack_require__.r(build_module_list_namespaceObject);
1146 + __webpack_require__.d(build_module_list_namespaceObject, {
1147 + init: () => (list_init),
1148 + metadata: () => (list_block_namespaceObject),
1149 + name: () => (list_name),
1150 + settings: () => (list_settings)
1151 + });
1152 +
1153 + // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/math/index.js
1154 + var build_module_math_namespaceObject = {};
1155 + __webpack_require__.r(build_module_math_namespaceObject);
1156 + __webpack_require__.d(build_module_math_namespaceObject, {
1157 + init: () => (math_init),
1158 + metadata: () => (math_block_namespaceObject),
1159 + name: () => (math_name),
1160 + settings: () => (math_settings)
1161 + });
1162 +
1163 + // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/list-item/index.js
1164 + var build_module_list_item_namespaceObject = {};
1165 + __webpack_require__.r(build_module_list_item_namespaceObject);
1166 + __webpack_require__.d(build_module_list_item_namespaceObject, {
1167 + init: () => (list_item_init),
1168 + metadata: () => (list_item_block_namespaceObject),
1169 + name: () => (list_item_name),
1170 + settings: () => (list_item_settings)
1171 + });
1172 +
1173 + // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/loginout/index.js
1174 + var loginout_namespaceObject = {};
1175 + __webpack_require__.r(loginout_namespaceObject);
1176 + __webpack_require__.d(loginout_namespaceObject, {
1177 + init: () => (loginout_init),
1178 + metadata: () => (loginout_block_namespaceObject),
1179 + name: () => (loginout_name),
1180 + settings: () => (loginout_settings)
1181 + });
1182 +
1183 + // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/media-text/index.js
1184 + var media_text_namespaceObject = {};
1185 + __webpack_require__.r(media_text_namespaceObject);
1186 + __webpack_require__.d(media_text_namespaceObject, {
1187 + init: () => (media_text_init),
1188 + metadata: () => (media_text_block_namespaceObject),
1189 + name: () => (media_text_name),
1190 + settings: () => (media_text_settings)
1191 + });
1192 +
1193 + // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/missing/index.js
1194 + var missing_namespaceObject = {};
1195 + __webpack_require__.r(missing_namespaceObject);
1196 + __webpack_require__.d(missing_namespaceObject, {
1197 + init: () => (missing_init),
1198 + metadata: () => (missing_block_namespaceObject),
1199 + name: () => (missing_name),
1200 + settings: () => (missing_settings)
1201 + });
1202 +
1203 + // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/more/index.js
1204 + var build_module_more_namespaceObject = {};
1205 + __webpack_require__.r(build_module_more_namespaceObject);
1206 + __webpack_require__.d(build_module_more_namespaceObject, {
1207 + init: () => (more_init),
1208 + metadata: () => (more_block_namespaceObject),
1209 + name: () => (more_name),
1210 + settings: () => (more_settings)
1211 + });
1212 +
1213 + // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/navigation/index.js
1214 + var build_module_navigation_namespaceObject = {};
1215 + __webpack_require__.r(build_module_navigation_namespaceObject);
1216 + __webpack_require__.d(build_module_navigation_namespaceObject, {
1217 + init: () => (navigation_init),
1218 + metadata: () => (navigation_block_namespaceObject),
1219 + name: () => (navigation_name),
1220 + settings: () => (navigation_settings)
1221 + });
1222 +
1223 + // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/navigation-link/index.js
1224 + var navigation_link_namespaceObject = {};
1225 + __webpack_require__.r(navigation_link_namespaceObject);
1226 + __webpack_require__.d(navigation_link_namespaceObject, {
1227 + init: () => (navigation_link_init),
1228 + metadata: () => (navigation_link_block_namespaceObject),
1229 + name: () => (navigation_link_name),
1230 + settings: () => (navigation_link_settings)
1231 + });
1232 +
1233 + // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/navigation-submenu/index.js
1234 + var navigation_submenu_namespaceObject = {};
1235 + __webpack_require__.r(navigation_submenu_namespaceObject);
1236 + __webpack_require__.d(navigation_submenu_namespaceObject, {
1237 + init: () => (navigation_submenu_init),
1238 + metadata: () => (navigation_submenu_block_namespaceObject),
1239 + name: () => (navigation_submenu_name),
1240 + settings: () => (navigation_submenu_settings)
1241 + });
1242 +
1243 + // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/nextpage/index.js
1244 + var nextpage_namespaceObject = {};
1245 + __webpack_require__.r(nextpage_namespaceObject);
1246 + __webpack_require__.d(nextpage_namespaceObject, {
1247 + init: () => (nextpage_init),
1248 + metadata: () => (nextpage_block_namespaceObject),
1249 + name: () => (nextpage_name),
1250 + settings: () => (nextpage_settings)
1251 + });
1252 +
1253 + // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/pattern/index.js
1254 + var pattern_namespaceObject = {};
1255 + __webpack_require__.r(pattern_namespaceObject);
1256 + __webpack_require__.d(pattern_namespaceObject, {
1257 + init: () => (pattern_init),
1258 + metadata: () => (pattern_block_namespaceObject),
1259 + name: () => (pattern_name),
1260 + settings: () => (pattern_settings)
1261 + });
1262 +
1263 + // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/page-list/index.js
1264 + var page_list_namespaceObject = {};
1265 + __webpack_require__.r(page_list_namespaceObject);
1266 + __webpack_require__.d(page_list_namespaceObject, {
1267 + init: () => (page_list_init),
1268 + metadata: () => (page_list_block_namespaceObject),
1269 + name: () => (page_list_name),
1270 + settings: () => (page_list_settings)
1271 + });
1272 +
1273 + // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/page-list-item/index.js
1274 + var page_list_item_namespaceObject = {};
1275 + __webpack_require__.r(page_list_item_namespaceObject);
1276 + __webpack_require__.d(page_list_item_namespaceObject, {
1277 + init: () => (page_list_item_init),
1278 + metadata: () => (page_list_item_block_namespaceObject),
1279 + name: () => (page_list_item_name),
1280 + settings: () => (page_list_item_settings)
1281 + });
1282 +
1283 + // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/paragraph/index.js
1284 + var build_module_paragraph_namespaceObject = {};
1285 + __webpack_require__.r(build_module_paragraph_namespaceObject);
1286 + __webpack_require__.d(build_module_paragraph_namespaceObject, {
1287 + init: () => (paragraph_init),
1288 + metadata: () => (paragraph_block_namespaceObject),
1289 + name: () => (paragraph_name),
1290 + settings: () => (paragraph_settings)
1291 + });
1292 +
1293 + // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/post-author/index.js
1294 + var build_module_post_author_namespaceObject = {};
1295 + __webpack_require__.r(build_module_post_author_namespaceObject);
1296 + __webpack_require__.d(build_module_post_author_namespaceObject, {
1297 + init: () => (post_author_init),
1298 + metadata: () => (post_author_block_namespaceObject),
1299 + name: () => (post_author_name),
1300 + settings: () => (post_author_settings)
1301 + });
1302 +
1303 + // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/post-author-name/index.js
1304 + var post_author_name_namespaceObject = {};
1305 + __webpack_require__.r(post_author_name_namespaceObject);
1306 + __webpack_require__.d(post_author_name_namespaceObject, {
1307 + init: () => (post_author_name_init),
1308 + metadata: () => (post_author_name_block_namespaceObject),
1309 + name: () => (post_author_name_name),
1310 + settings: () => (post_author_name_settings)
1311 + });
1312 +
1313 + // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/post-author-biography/index.js
1314 + var post_author_biography_namespaceObject = {};
1315 + __webpack_require__.r(post_author_biography_namespaceObject);
1316 + __webpack_require__.d(post_author_biography_namespaceObject, {
1317 + init: () => (post_author_biography_init),
1318 + metadata: () => (post_author_biography_block_namespaceObject),
1319 + name: () => (post_author_biography_name),
1320 + settings: () => (post_author_biography_settings)
1321 + });
1322 +
1323 + // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/post-comment/index.js
1324 + var post_comment_namespaceObject = {};
1325 + __webpack_require__.r(post_comment_namespaceObject);
1326 + __webpack_require__.d(post_comment_namespaceObject, {
1327 + init: () => (post_comment_init),
1328 + metadata: () => (post_comment_block_namespaceObject),
1329 + name: () => (post_comment_name),
1330 + settings: () => (post_comment_settings)
1331 + });
1332 +
1333 + // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/post-comments-count/index.js
1334 + var build_module_post_comments_count_namespaceObject = {};
1335 + __webpack_require__.r(build_module_post_comments_count_namespaceObject);
1336 + __webpack_require__.d(build_module_post_comments_count_namespaceObject, {
1337 + init: () => (post_comments_count_init),
1338 + metadata: () => (post_comments_count_block_namespaceObject),
1339 + name: () => (post_comments_count_name),
1340 + settings: () => (post_comments_count_settings)
1341 + });
1342 +
1343 + // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/post-comments-form/index.js
1344 + var build_module_post_comments_form_namespaceObject = {};
1345 + __webpack_require__.r(build_module_post_comments_form_namespaceObject);
1346 + __webpack_require__.d(build_module_post_comments_form_namespaceObject, {
1347 + init: () => (post_comments_form_init),
1348 + metadata: () => (post_comments_form_block_namespaceObject),
1349 + name: () => (post_comments_form_name),
1350 + settings: () => (post_comments_form_settings)
1351 + });
1352 +
1353 + // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/post-comments-link/index.js
1354 + var post_comments_link_namespaceObject = {};
1355 + __webpack_require__.r(post_comments_link_namespaceObject);
1356 + __webpack_require__.d(post_comments_link_namespaceObject, {
1357 + init: () => (post_comments_link_init),
1358 + metadata: () => (post_comments_link_block_namespaceObject),
1359 + name: () => (post_comments_link_name),
1360 + settings: () => (post_comments_link_settings)
1361 + });
1362 +
1363 + // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/post-content/index.js
1364 + var build_module_post_content_namespaceObject = {};
1365 + __webpack_require__.r(build_module_post_content_namespaceObject);
1366 + __webpack_require__.d(build_module_post_content_namespaceObject, {
1367 + init: () => (post_content_init),
1368 + metadata: () => (post_content_block_namespaceObject),
1369 + name: () => (post_content_name),
1370 + settings: () => (post_content_settings)
1371 + });
1372 +
1373 + // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/post-date/index.js
1374 + var build_module_post_date_namespaceObject = {};
1375 + __webpack_require__.r(build_module_post_date_namespaceObject);
1376 + __webpack_require__.d(build_module_post_date_namespaceObject, {
1377 + init: () => (post_date_init),
1378 + metadata: () => (post_date_block_namespaceObject),
1379 + name: () => (post_date_name),
1380 + settings: () => (post_date_settings)
1381 + });
1382 +
1383 + // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/post-excerpt/index.js
1384 + var build_module_post_excerpt_namespaceObject = {};
1385 + __webpack_require__.r(build_module_post_excerpt_namespaceObject);
1386 + __webpack_require__.d(build_module_post_excerpt_namespaceObject, {
1387 + init: () => (post_excerpt_init),
1388 + metadata: () => (post_excerpt_block_namespaceObject),
1389 + name: () => (post_excerpt_name),
1390 + settings: () => (post_excerpt_settings)
1391 + });
1392 +
1393 + // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/post-featured-image/index.js
1394 + var build_module_post_featured_image_namespaceObject = {};
1395 + __webpack_require__.r(build_module_post_featured_image_namespaceObject);
1396 + __webpack_require__.d(build_module_post_featured_image_namespaceObject, {
1397 + init: () => (post_featured_image_init),
1398 + metadata: () => (post_featured_image_block_namespaceObject),
1399 + name: () => (post_featured_image_name),
1400 + settings: () => (post_featured_image_settings)
1401 + });
1402 +
1403 + // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/post-navigation-link/index.js
1404 + var post_navigation_link_namespaceObject = {};
1405 + __webpack_require__.r(post_navigation_link_namespaceObject);
1406 + __webpack_require__.d(post_navigation_link_namespaceObject, {
1407 + init: () => (post_navigation_link_init),
1408 + metadata: () => (post_navigation_link_block_namespaceObject),
1409 + name: () => (post_navigation_link_name),
1410 + settings: () => (post_navigation_link_settings)
1411 + });
1412 +
1413 + // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/post-template/index.js
1414 + var post_template_namespaceObject = {};
1415 + __webpack_require__.r(post_template_namespaceObject);
1416 + __webpack_require__.d(post_template_namespaceObject, {
1417 + init: () => (post_template_init),
1418 + metadata: () => (post_template_block_namespaceObject),
1419 + name: () => (post_template_name),
1420 + settings: () => (post_template_settings)
1421 + });
1422 +
1423 + // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/post-terms/index.js
1424 + var build_module_post_terms_namespaceObject = {};
1425 + __webpack_require__.r(build_module_post_terms_namespaceObject);
1426 + __webpack_require__.d(build_module_post_terms_namespaceObject, {
1427 + init: () => (post_terms_init),
1428 + metadata: () => (post_terms_block_namespaceObject),
1429 + name: () => (post_terms_name),
1430 + settings: () => (post_terms_settings)
1431 + });
1432 +
1433 + // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/post-time-to-read/index.js
1434 + var post_time_to_read_namespaceObject = {};
1435 + __webpack_require__.r(post_time_to_read_namespaceObject);
1436 + __webpack_require__.d(post_time_to_read_namespaceObject, {
1437 + init: () => (post_time_to_read_init),
1438 + metadata: () => (post_time_to_read_block_namespaceObject),
1439 + name: () => (post_time_to_read_name),
1440 + settings: () => (post_time_to_read_settings)
1441 + });
1442 +
1443 + // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/post-title/index.js
1444 + var post_title_namespaceObject = {};
1445 + __webpack_require__.r(post_title_namespaceObject);
1446 + __webpack_require__.d(post_title_namespaceObject, {
1447 + init: () => (post_title_init),
1448 + metadata: () => (post_title_block_namespaceObject),
1449 + name: () => (post_title_name),
1450 + settings: () => (post_title_settings)
1451 + });
1452 +
1453 + // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/preformatted/index.js
1454 + var build_module_preformatted_namespaceObject = {};
1455 + __webpack_require__.r(build_module_preformatted_namespaceObject);
1456 + __webpack_require__.d(build_module_preformatted_namespaceObject, {
1457 + init: () => (preformatted_init),
1458 + metadata: () => (preformatted_block_namespaceObject),
1459 + name: () => (preformatted_name),
1460 + settings: () => (preformatted_settings)
1461 + });
1462 +
1463 + // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/pullquote/index.js
1464 + var build_module_pullquote_namespaceObject = {};
1465 + __webpack_require__.r(build_module_pullquote_namespaceObject);
1466 + __webpack_require__.d(build_module_pullquote_namespaceObject, {
1467 + init: () => (pullquote_init),
1468 + metadata: () => (pullquote_block_namespaceObject),
1469 + name: () => (pullquote_name),
1470 + settings: () => (pullquote_settings)
1471 + });
1472 +
1473 + // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/query/index.js
1474 + var query_namespaceObject = {};
1475 + __webpack_require__.r(query_namespaceObject);
1476 + __webpack_require__.d(query_namespaceObject, {
1477 + init: () => (query_init),
1478 + metadata: () => (query_block_namespaceObject),
1479 + name: () => (query_name),
1480 + settings: () => (query_settings)
1481 + });
1482 +
1483 + // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/query-no-results/index.js
1484 + var query_no_results_namespaceObject = {};
1485 + __webpack_require__.r(query_no_results_namespaceObject);
1486 + __webpack_require__.d(query_no_results_namespaceObject, {
1487 + init: () => (query_no_results_init),
1488 + metadata: () => (query_no_results_block_namespaceObject),
1489 + name: () => (query_no_results_name),
1490 + settings: () => (query_no_results_settings)
1491 + });
1492 +
1493 + // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/query-pagination/index.js
1494 + var build_module_query_pagination_namespaceObject = {};
1495 + __webpack_require__.r(build_module_query_pagination_namespaceObject);
1496 + __webpack_require__.d(build_module_query_pagination_namespaceObject, {
1497 + init: () => (query_pagination_init),
1498 + metadata: () => (query_pagination_block_namespaceObject),
1499 + name: () => (query_pagination_name),
1500 + settings: () => (query_pagination_settings)
1501 + });
1502 +
1503 + // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/query-pagination-next/index.js
1504 + var build_module_query_pagination_next_namespaceObject = {};
1505 + __webpack_require__.r(build_module_query_pagination_next_namespaceObject);
1506 + __webpack_require__.d(build_module_query_pagination_next_namespaceObject, {
1507 + init: () => (query_pagination_next_init),
1508 + metadata: () => (query_pagination_next_block_namespaceObject),
1509 + name: () => (query_pagination_next_name),
1510 + settings: () => (query_pagination_next_settings)
1511 + });
1512 +
1513 + // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/query-pagination-numbers/index.js
1514 + var build_module_query_pagination_numbers_namespaceObject = {};
1515 + __webpack_require__.r(build_module_query_pagination_numbers_namespaceObject);
1516 + __webpack_require__.d(build_module_query_pagination_numbers_namespaceObject, {
1517 + init: () => (query_pagination_numbers_init),
1518 + metadata: () => (query_pagination_numbers_block_namespaceObject),
1519 + name: () => (query_pagination_numbers_name),
1520 + settings: () => (query_pagination_numbers_settings)
1521 + });
1522 +
1523 + // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/query-pagination-previous/index.js
1524 + var build_module_query_pagination_previous_namespaceObject = {};
1525 + __webpack_require__.r(build_module_query_pagination_previous_namespaceObject);
1526 + __webpack_require__.d(build_module_query_pagination_previous_namespaceObject, {
1527 + init: () => (query_pagination_previous_init),
1528 + metadata: () => (query_pagination_previous_block_namespaceObject),
1529 + name: () => (query_pagination_previous_name),
1530 + settings: () => (query_pagination_previous_settings)
1531 + });
1532 +
1533 + // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/query-title/index.js
1534 + var query_title_namespaceObject = {};
1535 + __webpack_require__.r(query_title_namespaceObject);
1536 + __webpack_require__.d(query_title_namespaceObject, {
1537 + init: () => (query_title_init),
1538 + metadata: () => (query_title_block_namespaceObject),
1539 + name: () => (query_title_name),
1540 + settings: () => (query_title_settings)
1541 + });
1542 +
1543 + // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/query-total/index.js
1544 + var query_total_namespaceObject = {};
1545 + __webpack_require__.r(query_total_namespaceObject);
1546 + __webpack_require__.d(query_total_namespaceObject, {
1547 + init: () => (query_total_init),
1548 + metadata: () => (query_total_block_namespaceObject),
1549 + name: () => (query_total_name),
1550 + settings: () => (query_total_settings)
1551 + });
1552 +
1553 + // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/quote/index.js
1554 + var build_module_quote_namespaceObject = {};
1555 + __webpack_require__.r(build_module_quote_namespaceObject);
1556 + __webpack_require__.d(build_module_quote_namespaceObject, {
1557 + init: () => (quote_init),
1558 + metadata: () => (quote_block_namespaceObject),
1559 + name: () => (quote_name),
1560 + settings: () => (quote_settings)
1561 + });
1562 +
1563 + // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/block/index.js
1564 + var build_module_block_namespaceObject = {};
1565 + __webpack_require__.r(build_module_block_namespaceObject);
1566 + __webpack_require__.d(build_module_block_namespaceObject, {
1567 + init: () => (block_init),
1568 + metadata: () => (block_block_namespaceObject),
1569 + name: () => (block_name),
1570 + settings: () => (block_settings)
1571 + });
1572 +
1573 + // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/read-more/index.js
1574 + var read_more_namespaceObject = {};
1575 + __webpack_require__.r(read_more_namespaceObject);
1576 + __webpack_require__.d(read_more_namespaceObject, {
1577 + init: () => (read_more_init),
1578 + metadata: () => (read_more_block_namespaceObject),
1579 + name: () => (read_more_name),
1580 + settings: () => (read_more_settings)
1581 + });
1582 +
1583 + // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/rss/index.js
1584 + var build_module_rss_namespaceObject = {};
1585 + __webpack_require__.r(build_module_rss_namespaceObject);
1586 + __webpack_require__.d(build_module_rss_namespaceObject, {
1587 + init: () => (rss_init),
1588 + metadata: () => (rss_block_namespaceObject),
1589 + name: () => (rss_name),
1590 + settings: () => (rss_settings)
1591 + });
1592 +
1593 + // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/search/index.js
1594 + var build_module_search_namespaceObject = {};
1595 + __webpack_require__.r(build_module_search_namespaceObject);
1596 + __webpack_require__.d(build_module_search_namespaceObject, {
1597 + init: () => (search_init),
1598 + metadata: () => (search_block_namespaceObject),
1599 + name: () => (search_name),
1600 + settings: () => (search_settings)
1601 + });
1602 +
1603 + // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/separator/index.js
1604 + var build_module_separator_namespaceObject = {};
1605 + __webpack_require__.r(build_module_separator_namespaceObject);
1606 + __webpack_require__.d(build_module_separator_namespaceObject, {
1607 + init: () => (separator_init),
1608 + metadata: () => (separator_block_namespaceObject),
1609 + name: () => (separator_name),
1610 + settings: () => (separator_settings)
1611 + });
1612 +
1613 + // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/shortcode/index.js
1614 + var build_module_shortcode_namespaceObject = {};
1615 + __webpack_require__.r(build_module_shortcode_namespaceObject);
1616 + __webpack_require__.d(build_module_shortcode_namespaceObject, {
1617 + init: () => (shortcode_init),
1618 + metadata: () => (shortcode_block_namespaceObject),
1619 + name: () => (shortcode_name),
1620 + settings: () => (shortcode_settings)
1621 + });
1622 +
1623 + // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/site-logo/index.js
1624 + var build_module_site_logo_namespaceObject = {};
1625 + __webpack_require__.r(build_module_site_logo_namespaceObject);
1626 + __webpack_require__.d(build_module_site_logo_namespaceObject, {
1627 + init: () => (site_logo_init),
1628 + metadata: () => (site_logo_block_namespaceObject),
1629 + name: () => (site_logo_name),
1630 + settings: () => (site_logo_settings)
1631 + });
1632 +
1633 + // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/site-tagline/index.js
1634 + var site_tagline_namespaceObject = {};
1635 + __webpack_require__.r(site_tagline_namespaceObject);
1636 + __webpack_require__.d(site_tagline_namespaceObject, {
1637 + init: () => (site_tagline_init),
1638 + metadata: () => (site_tagline_block_namespaceObject),
1639 + name: () => (site_tagline_name),
1640 + settings: () => (site_tagline_settings)
1641 + });
1642 +
1643 + // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/site-title/index.js
1644 + var site_title_namespaceObject = {};
1645 + __webpack_require__.r(site_title_namespaceObject);
1646 + __webpack_require__.d(site_title_namespaceObject, {
1647 + init: () => (site_title_init),
1648 + metadata: () => (site_title_block_namespaceObject),
1649 + name: () => (site_title_name),
1650 + settings: () => (site_title_settings)
1651 + });
1652 +
1653 + // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/social-link/index.js
1654 + var social_link_namespaceObject = {};
1655 + __webpack_require__.r(social_link_namespaceObject);
1656 + __webpack_require__.d(social_link_namespaceObject, {
1657 + init: () => (social_link_init),
1658 + metadata: () => (social_link_block_namespaceObject),
1659 + name: () => (social_link_name),
1660 + settings: () => (social_link_settings)
1661 + });
1662 +
1663 + // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/social-links/index.js
1664 + var social_links_namespaceObject = {};
1665 + __webpack_require__.r(social_links_namespaceObject);
1666 + __webpack_require__.d(social_links_namespaceObject, {
1667 + init: () => (social_links_init),
1668 + metadata: () => (social_links_block_namespaceObject),
1669 + name: () => (social_links_name),
1670 + settings: () => (social_links_settings)
1671 + });
1672 +
1673 + // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/spacer/index.js
1674 + var spacer_namespaceObject = {};
1675 + __webpack_require__.r(spacer_namespaceObject);
1676 + __webpack_require__.d(spacer_namespaceObject, {
1677 + init: () => (spacer_init),
1678 + metadata: () => (spacer_block_namespaceObject),
1679 + name: () => (spacer_name),
1680 + settings: () => (spacer_settings)
1681 + });
1682 +
1683 + // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/table/index.js
1684 + var build_module_table_namespaceObject = {};
1685 + __webpack_require__.r(build_module_table_namespaceObject);
1686 + __webpack_require__.d(build_module_table_namespaceObject, {
1687 + init: () => (table_init),
1688 + metadata: () => (table_block_namespaceObject),
1689 + name: () => (table_name),
1690 + settings: () => (table_settings)
1691 + });
1692 +
1693 + // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/table-of-contents/index.js
1694 + var build_module_table_of_contents_namespaceObject = {};
1695 + __webpack_require__.r(build_module_table_of_contents_namespaceObject);
1696 + __webpack_require__.d(build_module_table_of_contents_namespaceObject, {
1697 + init: () => (table_of_contents_init),
1698 + metadata: () => (table_of_contents_block_namespaceObject),
1699 + name: () => (table_of_contents_name),
1700 + settings: () => (table_of_contents_settings)
1701 + });
1702 +
1703 + // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/tag-cloud/index.js
1704 + var tag_cloud_namespaceObject = {};
1705 + __webpack_require__.r(tag_cloud_namespaceObject);
1706 + __webpack_require__.d(tag_cloud_namespaceObject, {
1707 + init: () => (tag_cloud_init),
1708 + metadata: () => (tag_cloud_block_namespaceObject),
1709 + name: () => (tag_cloud_name),
1710 + settings: () => (tag_cloud_settings)
1711 + });
1712 +
1713 + // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/template-part/index.js
1714 + var template_part_namespaceObject = {};
1715 + __webpack_require__.r(template_part_namespaceObject);
1716 + __webpack_require__.d(template_part_namespaceObject, {
1717 + init: () => (template_part_init),
1718 + metadata: () => (template_part_block_namespaceObject),
1719 + name: () => (template_part_name),
1720 + settings: () => (template_part_settings)
1721 + });
1722 +
1723 + // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/term-count/index.js
1724 + var build_module_term_count_namespaceObject = {};
1725 + __webpack_require__.r(build_module_term_count_namespaceObject);
1726 + __webpack_require__.d(build_module_term_count_namespaceObject, {
1727 + init: () => (term_count_init),
1728 + metadata: () => (term_count_block_namespaceObject),
1729 + name: () => (term_count_name),
1730 + settings: () => (term_count_settings)
1731 + });
1732 +
1733 + // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/term-description/index.js
1734 + var build_module_term_description_namespaceObject = {};
1735 + __webpack_require__.r(build_module_term_description_namespaceObject);
1736 + __webpack_require__.d(build_module_term_description_namespaceObject, {
1737 + init: () => (term_description_init),
1738 + metadata: () => (term_description_block_namespaceObject),
1739 + name: () => (term_description_name),
1740 + settings: () => (term_description_settings)
1741 + });
1742 +
1743 + // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/term-name/index.js
1744 + var build_module_term_name_namespaceObject = {};
1745 + __webpack_require__.r(build_module_term_name_namespaceObject);
1746 + __webpack_require__.d(build_module_term_name_namespaceObject, {
1747 + init: () => (term_name_init),
1748 + metadata: () => (term_name_block_namespaceObject),
1749 + name: () => (term_name_name),
1750 + settings: () => (term_name_settings)
1751 + });
1752 +
1753 + // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/terms-query/index.js
1754 + var terms_query_namespaceObject = {};
1755 + __webpack_require__.r(terms_query_namespaceObject);
1756 + __webpack_require__.d(terms_query_namespaceObject, {
1757 + init: () => (terms_query_init),
1758 + metadata: () => (terms_query_block_namespaceObject),
1759 + name: () => (terms_query_name),
1760 + settings: () => (terms_query_settings)
1761 + });
1762 +
1763 + // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/term-template/index.js
1764 + var term_template_namespaceObject = {};
1765 + __webpack_require__.r(term_template_namespaceObject);
1766 + __webpack_require__.d(term_template_namespaceObject, {
1767 + init: () => (term_template_init),
1768 + metadata: () => (term_template_block_namespaceObject),
1769 + name: () => (term_template_name),
1770 + settings: () => (term_template_settings)
1771 + });
1772 +
1773 + // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/text-columns/index.js
1774 + var text_columns_namespaceObject = {};
1775 + __webpack_require__.r(text_columns_namespaceObject);
1776 + __webpack_require__.d(text_columns_namespaceObject, {
1777 + init: () => (text_columns_init),
1778 + metadata: () => (text_columns_block_namespaceObject),
1779 + name: () => (text_columns_name),
1780 + settings: () => (text_columns_settings)
1781 + });
1782 +
1783 + // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/verse/index.js
1784 + var build_module_verse_namespaceObject = {};
1785 + __webpack_require__.r(build_module_verse_namespaceObject);
1786 + __webpack_require__.d(build_module_verse_namespaceObject, {
1787 + init: () => (verse_init),
1788 + metadata: () => (verse_block_namespaceObject),
1789 + name: () => (verse_name),
1790 + settings: () => (verse_settings)
1791 + });
1792 +
1793 + // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/video/index.js
1794 + var build_module_video_namespaceObject = {};
1795 + __webpack_require__.r(build_module_video_namespaceObject);
1796 + __webpack_require__.d(build_module_video_namespaceObject, {
1797 + init: () => (video_init),
1798 + metadata: () => (video_block_namespaceObject),
1799 + name: () => (video_name),
1800 + settings: () => (video_settings)
1801 + });
1802 +
1803 + // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/footnotes/index.js
1804 + var footnotes_namespaceObject = {};
1805 + __webpack_require__.r(footnotes_namespaceObject);
1806 + __webpack_require__.d(footnotes_namespaceObject, {
1807 + init: () => (footnotes_init),
1808 + metadata: () => (footnotes_block_namespaceObject),
1809 + name: () => (footnotes_name),
1810 + settings: () => (footnotes_settings)
1811 + });
1812 +
1813 + ;// external "ReactJSXRuntime"
1814 + const external_ReactJSXRuntime_namespaceObject = window["ReactJSXRuntime"];
1815 + ;// external ["wp","blocks"]
1816 + const external_wp_blocks_namespaceObject = window["wp"]["blocks"];
1817 + ;// external ["wp","data"]
1818 + const external_wp_data_namespaceObject = window["wp"]["data"];
1819 + ;// external ["wp","blockEditor"]
1820 + const external_wp_blockEditor_namespaceObject = window["wp"]["blockEditor"];
1821 + ;// external ["wp","serverSideRender"]
1822 + const external_wp_serverSideRender_namespaceObject = window["wp"]["serverSideRender"];
1823 + var external_wp_serverSideRender_default = /*#__PURE__*/__webpack_require__.n(external_wp_serverSideRender_namespaceObject);
1824 + ;// external ["wp","i18n"]
1825 + const external_wp_i18n_namespaceObject = window["wp"]["i18n"];
1826 + ;// external ["wp","components"]
1827 + const external_wp_components_namespaceObject = window["wp"]["components"];
1828 + ;// external ["wp","element"]
1829 + const external_wp_element_namespaceObject = window["wp"]["element"];
1830 + ;// external ["wp","blob"]
1831 + const external_wp_blob_namespaceObject = window["wp"]["blob"];
1832 + ;// external ["wp","coreData"]
1833 + const external_wp_coreData_namespaceObject = window["wp"]["coreData"];
1834 + ;// external ["wp","compose"]
1835 + const external_wp_compose_namespaceObject = window["wp"]["compose"];
1836 + ;// ./node_modules/@wordpress/block-library/build-module/utils/hooks.js
1837 +
1838 +
1839 +
1840 +
1841 +
1842 +
1843 + function useCanEditEntity(kind, name, recordId) {
1844 + return (0,external_wp_data_namespaceObject.useSelect)(
1845 + (select) => select(external_wp_coreData_namespaceObject.store).canUser("update", {
1846 + kind,
1847 + name,
1848 + id: recordId
1849 + }),
1850 + [kind, name, recordId]
1851 + );
1852 + }
1853 + function useUploadMediaFromBlobURL(args = {}) {
1854 + const latestArgsRef = (0,external_wp_element_namespaceObject.useRef)(args);
1855 + const hasUploadStartedRef = (0,external_wp_element_namespaceObject.useRef)(false);
1856 + const { getSettings } = (0,external_wp_data_namespaceObject.useSelect)(external_wp_blockEditor_namespaceObject.store);
1857 + (0,external_wp_element_namespaceObject.useLayoutEffect)(() => {
1858 + latestArgsRef.current = args;
1859 + });
1860 + (0,external_wp_element_namespaceObject.useEffect)(() => {
1861 + if (hasUploadStartedRef.current) {
1862 + return;
1863 + }
1864 + if (!latestArgsRef.current.url || !(0,external_wp_blob_namespaceObject.isBlobURL)(latestArgsRef.current.url)) {
1865 + return;
1866 + }
1867 + const file = (0,external_wp_blob_namespaceObject.getBlobByURL)(latestArgsRef.current.url);
1868 + if (!file) {
1869 + return;
1870 + }
1871 + const { url, allowedTypes, onChange, onError } = latestArgsRef.current;
1872 + const { mediaUpload } = getSettings();
1873 + if (!mediaUpload) {
1874 + return;
1875 + }
1876 + hasUploadStartedRef.current = true;
1877 + mediaUpload({
1878 + filesList: [file],
1879 + allowedTypes,
1880 + onFileChange: ([media]) => {
1881 + if ((0,external_wp_blob_namespaceObject.isBlobURL)(media?.url)) {
1882 + return;
1883 + }
1884 + (0,external_wp_blob_namespaceObject.revokeBlobURL)(url);
1885 + onChange(media);
1886 + hasUploadStartedRef.current = false;
1887 + },
1888 + onError: (message) => {
1889 + (0,external_wp_blob_namespaceObject.revokeBlobURL)(url);
1890 + onError(message);
1891 + hasUploadStartedRef.current = false;
1892 + }
1893 + });
1894 + }, [getSettings]);
1895 + }
1896 + function useDefaultAvatar() {
1897 + const { avatarURL: defaultAvatarUrl } = (0,external_wp_data_namespaceObject.useSelect)((select) => {
1898 + const { getSettings } = select(external_wp_blockEditor_namespaceObject.store);
1899 + const { __experimentalDiscussionSettings } = getSettings();
1900 + return __experimentalDiscussionSettings;
1901 + });
1902 + return defaultAvatarUrl;
1903 + }
1904 + function useToolsPanelDropdownMenuProps() {
1905 + const isMobile = (0,external_wp_compose_namespaceObject.useViewportMatch)("medium", "<");
1906 + return !isMobile ? {
1907 + popoverProps: {
1908 + placement: "left-start",
1909 + // For non-mobile, inner sidebar width (248px) - button width (24px) - border (1px) + padding (16px) + spacing (20px)
1910 + offset: 259
1911 + }
1912 + } : {};
1913 + }
1914 +
1915 +
1916 + ;// ./node_modules/@wordpress/block-library/build-module/accordion/edit.js
1917 +
1918 +
1919 +
1920 +
1921 +
1922 +
1923 +
1924 + const ACCORDION_BLOCK_NAME = "core/accordion-item";
1925 + const ACCORDION_HEADING_BLOCK_NAME = "core/accordion-heading";
1926 + const ACCORDION_BLOCK = {
1927 + name: ACCORDION_BLOCK_NAME
1928 + };
1929 + function Edit({
1930 + attributes: {
1931 + autoclose,
1932 + iconPosition,
1933 + showIcon,
1934 + headingLevel,
1935 + levelOptions
1936 + },
1937 + clientId,
1938 + setAttributes,
1939 + isSelected: isSingleSelected
1940 + }) {
1941 + const registry = (0,external_wp_data_namespaceObject.useRegistry)();
1942 + const { getBlockOrder } = (0,external_wp_data_namespaceObject.useSelect)(external_wp_blockEditor_namespaceObject.store);
1943 + const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)({
1944 + role: "group"
1945 + });
1946 + const dropdownMenuProps = useToolsPanelDropdownMenuProps();
1947 + const { updateBlockAttributes, insertBlock } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_blockEditor_namespaceObject.store);
1948 + const blockEditingMode = (0,external_wp_blockEditor_namespaceObject.useBlockEditingMode)();
1949 + const isContentOnlyMode = blockEditingMode === "contentOnly";
1950 + const innerBlocksProps = (0,external_wp_blockEditor_namespaceObject.useInnerBlocksProps)(blockProps, {
1951 + template: [[ACCORDION_BLOCK_NAME]],
1952 + defaultBlock: ACCORDION_BLOCK,
1953 + directInsert: true,
1954 + templateInsertUpdatesSelection: true
1955 + });
1956 + const addAccordionItemBlock = () => {
1957 + const newAccordionItem = (0,external_wp_blocks_namespaceObject.createBlock)(ACCORDION_BLOCK_NAME, {}, [
1958 + (0,external_wp_blocks_namespaceObject.createBlock)(ACCORDION_HEADING_BLOCK_NAME, {
1959 + level: headingLevel
1960 + }),
1961 + (0,external_wp_blocks_namespaceObject.createBlock)("core/accordion-panel", {})
1962 + ]);
1963 + insertBlock(newAccordionItem, void 0, clientId);
1964 + };
1965 + const updateHeadingLevel = (newHeadingLevel) => {
1966 + const innerBlockClientIds = getBlockOrder(clientId);
1967 + const accordionHeaderClientIds = [];
1968 + innerBlockClientIds.forEach((contentClientId) => {
1969 + const headerClientIds = getBlockOrder(contentClientId);
1970 + accordionHeaderClientIds.push(...headerClientIds);
1971 + });
1972 + registry.batch(() => {
1973 + setAttributes({ headingLevel: newHeadingLevel });
1974 + updateBlockAttributes(accordionHeaderClientIds, {
1975 + level: newHeadingLevel
1976 + });
1977 + });
1978 + };
1979 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
1980 + isSingleSelected && !isContentOnlyMode && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
1981 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockControls, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ToolbarGroup, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
1982 + external_wp_blockEditor_namespaceObject.HeadingLevelDropdown,
1983 + {
1984 + value: headingLevel,
1985 + options: levelOptions,
1986 + onChange: updateHeadingLevel
1987 + }
1988 + ) }) }),
1989 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockControls, { group: "other", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ToolbarButton, { onClick: addAccordionItemBlock, children: (0,external_wp_i18n_namespaceObject.__)("Add item") }) })
1990 + ] }),
1991 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(
1992 + external_wp_components_namespaceObject.__experimentalToolsPanel,
1993 + {
1994 + label: (0,external_wp_i18n_namespaceObject.__)("Settings"),
1995 + resetAll: () => {
1996 + setAttributes({
1997 + autoclose: false,
1998 + showIcon: true,
1999 + iconPosition: "right"
2000 + });
2001 + },
2002 + dropdownMenuProps,
2003 + children: [
2004 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
2005 + external_wp_components_namespaceObject.__experimentalToolsPanelItem,
2006 + {
2007 + label: (0,external_wp_i18n_namespaceObject.__)("Auto-close"),
2008 + isShownByDefault: true,
2009 + hasValue: () => !!autoclose,
2010 + onDeselect: () => setAttributes({ autoclose: false }),
2011 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
2012 + external_wp_components_namespaceObject.ToggleControl,
2013 + {
2014 + isBlock: true,
2015 + __nextHasNoMarginBottom: true,
2016 + label: (0,external_wp_i18n_namespaceObject.__)("Auto-close"),
2017 + onChange: (value) => {
2018 + setAttributes({
2019 + autoclose: value
2020 + });
2021 + },
2022 + checked: autoclose,
2023 + help: (0,external_wp_i18n_namespaceObject.__)(
2024 + "Automatically close accordions when a new one is opened."
2025 + )
2026 + }
2027 + )
2028 + }
2029 + ),
2030 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
2031 + external_wp_components_namespaceObject.__experimentalToolsPanelItem,
2032 + {
2033 + label: (0,external_wp_i18n_namespaceObject.__)("Show icon"),
2034 + isShownByDefault: true,
2035 + hasValue: () => !showIcon,
2036 + onDeselect: () => setAttributes({ showIcon: true }),
2037 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
2038 + external_wp_components_namespaceObject.ToggleControl,
2039 + {
2040 + isBlock: true,
2041 + __nextHasNoMarginBottom: true,
2042 + label: (0,external_wp_i18n_namespaceObject.__)("Show icon"),
2043 + onChange: (value) => {
2044 + setAttributes({
2045 + showIcon: value,
2046 + iconPosition: value ? iconPosition : "right"
2047 + });
2048 + },
2049 + checked: showIcon,
2050 + help: (0,external_wp_i18n_namespaceObject.__)(
2051 + "Display a plus icon next to the accordion header."
2052 + )
2053 + }
2054 + )
2055 + }
2056 + ),
2057 + showIcon && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
2058 + external_wp_components_namespaceObject.__experimentalToolsPanelItem,
2059 + {
2060 + label: (0,external_wp_i18n_namespaceObject.__)("Icon Position"),
2061 + isShownByDefault: true,
2062 + hasValue: () => iconPosition !== "right",
2063 + onDeselect: () => setAttributes({ iconPosition: "right" }),
2064 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(
2065 + external_wp_components_namespaceObject.__experimentalToggleGroupControl,
2066 + {
2067 + __nextHasNoMarginBottom: true,
2068 + __next40pxDefaultSize: true,
2069 + isBlock: true,
2070 + label: (0,external_wp_i18n_namespaceObject.__)("Icon Position"),
2071 + value: iconPosition,
2072 + onChange: (value) => {
2073 + setAttributes({ iconPosition: value });
2074 + },
2075 + children: [
2076 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
2077 + external_wp_components_namespaceObject.__experimentalToggleGroupControlOption,
2078 + {
2079 + label: (0,external_wp_i18n_namespaceObject.__)("Left"),
2080 + value: "left"
2081 + }
2082 + ),
2083 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
2084 + external_wp_components_namespaceObject.__experimentalToggleGroupControlOption,
2085 + {
2086 + label: (0,external_wp_i18n_namespaceObject.__)("Right"),
2087 + value: "right"
2088 + }
2089 + )
2090 + ]
2091 + }
2092 + )
2093 + }
2094 + )
2095 + ]
2096 + }
2097 + ) }, "setting"),
2098 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { ...innerBlocksProps })
2099 + ] });
2100 + }
2101 +
2102 +
2103 + ;// ./node_modules/@wordpress/block-library/build-module/accordion/save.js
2104 +
2105 +
2106 + function save() {
2107 + const blockProps = external_wp_blockEditor_namespaceObject.useBlockProps.save({
2108 + role: "group"
2109 + });
2110 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { ...external_wp_blockEditor_namespaceObject.useInnerBlocksProps.save(blockProps) });
2111 + }
2112 +
2113 +
2114 + ;// ./node_modules/@wordpress/block-library/build-module/accordion/block.json
2115 + const block_namespaceObject = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/accordion","title":"Accordion","category":"design","description":"Displays a foldable layout that groups content in collapsible sections.","example":{},"supports":{"anchor":true,"html":false,"align":["wide","full"],"background":{"backgroundImage":true,"backgroundSize":true,"__experimentalDefaultControls":{"backgroundImage":true}},"color":{"background":true,"gradients":true},"__experimentalBorder":{"color":true,"radius":true,"style":true,"width":true,"__experimentalDefaultControls":{"color":true,"radius":true,"style":true,"width":true}},"spacing":{"padding":true,"margin":["top","bottom"],"blockGap":true},"shadow":true,"layout":true,"ariaLabel":true,"interactivity":true,"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"contentRole":true},"attributes":{"iconPosition":{"type":"string","default":"right"},"showIcon":{"type":"boolean","default":true},"autoclose":{"type":"boolean","default":false},"headingLevel":{"type":"number","default":3},"levelOptions":{"type":"array"}},"providesContext":{"core/accordion-icon-position":"iconPosition","core/accordion-show-icon":"showIcon","core/accordion-heading-level":"headingLevel"},"allowedBlocks":["core/accordion-item"],"textdomain":"default","viewScriptModule":"@wordpress/block-library/accordion/view"}');
2116 + ;// ./node_modules/@wordpress/block-library/build-module/utils/init-block.js
2117 +
2118 + function initBlock(block) {
2119 + if (!block) {
2120 + return;
2121 + }
2122 + const { metadata, settings, name } = block;
2123 + return (0,external_wp_blocks_namespaceObject.registerBlockType)({ name, ...metadata }, settings);
2124 + }
2125 +
2126 +
2127 + ;// external ["wp","primitives"]
2128 + const external_wp_primitives_namespaceObject = window["wp"]["primitives"];
2129 + ;// ./node_modules/@wordpress/block-library/build-module/accordion/icon.js
2130 +
2131 +
2132 + var icon_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: [
2133 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
2134 + external_wp_primitives_namespaceObject.Path,
2135 + {
2136 + fillRule: "evenodd",
2137 + clipRule: "evenodd",
2138 + d: "M19.5 9.25L9.5 9.25L9.5 7.75L19.5 7.75L19.5 9.25Z",
2139 + fill: "currentColor"
2140 + }
2141 + ),
2142 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M4.5 6L8.5 8.5L4.5 11L4.5 6Z", fill: "currentColor" }),
2143 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
2144 + external_wp_primitives_namespaceObject.Path,
2145 + {
2146 + fillRule: "evenodd",
2147 + clipRule: "evenodd",
2148 + d: "M19.5 16.25L9.5 16.25L9.5 14.75L19.5 14.75L19.5 16.25Z",
2149 + fill: "currentColor"
2150 + }
2151 + ),
2152 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M4.5 13L8.5 15.5L4.5 18L4.5 13Z", fill: "currentColor" })
2153 + ] });
2154 +
2155 +
2156 + ;// ./node_modules/@wordpress/block-library/build-module/accordion/index.js
2157 +
2158 +
2159 +
2160 +
2161 +
2162 +
2163 + const { name: accordion_name } = block_namespaceObject;
2164 + const settings = {
2165 + icon: icon_default,
2166 + example: {
2167 + innerBlocks: [
2168 + {
2169 + name: "core/accordion-item",
2170 + innerBlocks: [
2171 + {
2172 + name: "core/accordion-heading",
2173 + attributes: {
2174 + title: (0,external_wp_i18n_namespaceObject.__)(
2175 + "Lorem ipsum dolor sit amet, consectetur."
2176 + )
2177 + }
2178 + }
2179 + ]
2180 + },
2181 + {
2182 + name: "core/accordion-item",
2183 + innerBlocks: [
2184 + {
2185 + name: "core/accordion-heading",
2186 + attributes: {
2187 + title: (0,external_wp_i18n_namespaceObject.__)(
2188 + "Suspendisse commodo lacus, interdum et."
2189 + )
2190 + }
2191 + }
2192 + ]
2193 + }
2194 + ]
2195 + },
2196 + edit: Edit,
2197 + save: save
2198 + };
2199 + const init = () => initBlock({ name: accordion_name, metadata: block_namespaceObject, settings });
2200 +
2201 +
2202 + ;// ./node_modules/clsx/dist/clsx.mjs
2203 + function r(e){var t,f,n="";if("string"==typeof e||"number"==typeof e)n+=e;else if("object"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(f=r(e[t]))&&(n&&(n+=" "),n+=f)}else for(f in e)e[f]&&(n&&(n+=" "),n+=f);return n}function clsx(){for(var e,t,f=0,n="",o=arguments.length;f<o;f++)(e=arguments[f])&&(t=r(e))&&(n&&(n+=" "),n+=t);return n}/* harmony default export */ const dist_clsx = (clsx);
2204 + ;// ./node_modules/@wordpress/block-library/build-module/accordion-item/edit.js
2205 +
2206 +
2207 +
2208 +
2209 +
2210 +
2211 +
2212 +
2213 + function edit_Edit({
2214 + attributes,
2215 + clientId,
2216 + setAttributes,
2217 + context
2218 + }) {
2219 + const { openByDefault } = attributes;
2220 + const dropdownMenuProps = useToolsPanelDropdownMenuProps();
2221 + const { isSelected, getBlockOrder } = (0,external_wp_data_namespaceObject.useSelect)(
2222 + (select) => {
2223 + const {
2224 + isBlockSelected,
2225 + hasSelectedInnerBlock,
2226 + getBlockOrder: getBlockOrderSelector
2227 + } = select(external_wp_blockEditor_namespaceObject.store);
2228 + return {
2229 + isSelected: isBlockSelected(clientId) || hasSelectedInnerBlock(clientId, true),
2230 + getBlockOrder: getBlockOrderSelector
2231 + };
2232 + },
2233 + [clientId]
2234 + );
2235 + const contentBlockClientId = getBlockOrder(clientId)[1];
2236 + const { updateBlockAttributes, __unstableMarkNextChangeAsNotPersistent } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_blockEditor_namespaceObject.store);
2237 + (0,external_wp_element_namespaceObject.useEffect)(() => {
2238 + if (contentBlockClientId) {
2239 + __unstableMarkNextChangeAsNotPersistent();
2240 + updateBlockAttributes(contentBlockClientId, {
2241 + isSelected
2242 + });
2243 + }
2244 + }, [
2245 + isSelected,
2246 + contentBlockClientId,
2247 + __unstableMarkNextChangeAsNotPersistent,
2248 + updateBlockAttributes
2249 + ]);
2250 + const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)({
2251 + className: dist_clsx({
2252 + "is-open": openByDefault || isSelected
2253 + })
2254 + });
2255 + const headingLevel = context && context["core/accordion-heading-level"];
2256 + const innerBlocksProps = (0,external_wp_blockEditor_namespaceObject.useInnerBlocksProps)(blockProps, {
2257 + template: [
2258 + [
2259 + "core/accordion-heading",
2260 + headingLevel ? { level: headingLevel } : {}
2261 + ],
2262 + [
2263 + "core/accordion-panel",
2264 + {
2265 + openByDefault
2266 + }
2267 + ]
2268 + ],
2269 + templateLock: "all",
2270 + directInsert: true,
2271 + templateInsertUpdatesSelection: true
2272 + });
2273 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
2274 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
2275 + external_wp_components_namespaceObject.__experimentalToolsPanel,
2276 + {
2277 + label: (0,external_wp_i18n_namespaceObject.__)("Settings"),
2278 + resetAll: () => {
2279 + setAttributes({ openByDefault: false });
2280 + if (contentBlockClientId) {
2281 + updateBlockAttributes(contentBlockClientId, {
2282 + openByDefault: false
2283 + });
2284 + }
2285 + },
2286 + dropdownMenuProps,
2287 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
2288 + external_wp_components_namespaceObject.__experimentalToolsPanelItem,
2289 + {
2290 + label: (0,external_wp_i18n_namespaceObject.__)("Open by default"),
2291 + isShownByDefault: true,
2292 + hasValue: () => !!openByDefault,
2293 + onDeselect: () => {
2294 + setAttributes({ openByDefault: false });
2295 + if (contentBlockClientId) {
2296 + updateBlockAttributes(contentBlockClientId, {
2297 + openByDefault: false
2298 + });
2299 + }
2300 + },
2301 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
2302 + external_wp_components_namespaceObject.ToggleControl,
2303 + {
2304 + label: (0,external_wp_i18n_namespaceObject.__)("Open by default"),
2305 + __nextHasNoMarginBottom: true,
2306 + onChange: (value) => {
2307 + setAttributes({
2308 + openByDefault: value
2309 + });
2310 + if (contentBlockClientId) {
2311 + updateBlockAttributes(
2312 + contentBlockClientId,
2313 + {
2314 + openByDefault: value
2315 + }
2316 + );
2317 + }
2318 + },
2319 + checked: openByDefault,
2320 + help: (0,external_wp_i18n_namespaceObject.__)(
2321 + "Accordion content will be displayed by default."
2322 + )
2323 + }
2324 + )
2325 + }
2326 + )
2327 + }
2328 + ) }, "setting"),
2329 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { ...innerBlocksProps })
2330 + ] });
2331 + }
2332 +
2333 +
2334 + ;// ./node_modules/@wordpress/block-library/build-module/accordion-item/save.js
2335 +
2336 +
2337 +
2338 + function save_save({ attributes }) {
2339 + const { openByDefault } = attributes;
2340 + const blockProps = external_wp_blockEditor_namespaceObject.useBlockProps.save({
2341 + className: dist_clsx({
2342 + "is-open": openByDefault
2343 + })
2344 + });
2345 + const innerBlocksProps = external_wp_blockEditor_namespaceObject.useInnerBlocksProps.save(blockProps);
2346 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { ...innerBlocksProps });
2347 + }
2348 +
2349 +
2350 + ;// ./node_modules/@wordpress/block-library/build-module/accordion-item/block.json
2351 + const accordion_item_block_namespaceObject = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/accordion-item","title":"Accordion Item","category":"design","description":"Wraps the heading and panel in one unit.","parent":["core/accordion"],"allowedBlocks":["core/accordion-heading","core/accordion-panel"],"supports":{"html":false,"color":{"background":true,"gradients":true},"interactivity":true,"spacing":{"margin":["top","bottom"],"blockGap":true},"__experimentalBorder":{"color":true,"radius":true,"style":true,"width":true,"__experimentalDefaultControls":{"color":true,"radius":true,"style":true,"width":true}},"shadow":true,"layout":{"allowEditing":false},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"contentRole":true},"attributes":{"openByDefault":{"type":"boolean","default":false}},"textdomain":"default","style":"wp-block-accordion-item"}');
2352 + ;// ./node_modules/@wordpress/block-library/build-module/accordion-item/icon.js
2353 +
2354 +
2355 + var icon_icon_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: [
2356 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
2357 + external_wp_primitives_namespaceObject.Path,
2358 + {
2359 + fillRule: "evenodd",
2360 + clipRule: "evenodd",
2361 + d: "M19.5 9.5L9.5 9.5L9.5 8L19.5 8L19.5 9.5Z",
2362 + fill: "currentColor"
2363 + }
2364 + ),
2365 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
2366 + external_wp_primitives_namespaceObject.Path,
2367 + {
2368 + fillRule: "evenodd",
2369 + clipRule: "evenodd",
2370 + d: "M19.5 13L9.5 13L9.5 11.5L19.5 11.5L19.5 13Z",
2371 + fill: "currentColor"
2372 + }
2373 + ),
2374 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
2375 + external_wp_primitives_namespaceObject.Path,
2376 + {
2377 + fillRule: "evenodd",
2378 + clipRule: "evenodd",
2379 + d: "M19.5 16.3999L9.5 16.3999L9.5 14.8999L19.5 14.8999L19.5 16.3999Z",
2380 + fill: "currentColor"
2381 + }
2382 + ),
2383 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M4.5 6.25L8.5 8.75L4.5 11.25L4.5 6.25Z", fill: "currentColor" })
2384 + ] });
2385 +
2386 +
2387 + ;// ./node_modules/@wordpress/block-library/build-module/accordion-item/index.js
2388 +
2389 +
2390 +
2391 +
2392 +
2393 + const { name: accordion_item_name } = accordion_item_block_namespaceObject;
2394 + const accordion_item_settings = {
2395 + icon: icon_icon_default,
2396 + edit: edit_Edit,
2397 + save: save_save
2398 + };
2399 + const accordion_item_init = () => initBlock({ name: accordion_item_name, metadata: accordion_item_block_namespaceObject, settings: accordion_item_settings });
2400 +
2401 +
2402 + ;// ./node_modules/@wordpress/block-library/build-module/accordion-heading/edit.js
2403 +
2404 +
2405 +
2406 +
2407 + function accordion_heading_edit_Edit({ attributes, setAttributes, context }) {
2408 + const { title } = attributes;
2409 + const {
2410 + "core/accordion-icon-position": iconPosition,
2411 + "core/accordion-show-icon": showIcon,
2412 + "core/accordion-heading-level": headingLevel
2413 + } = context;
2414 + const TagName = "h" + headingLevel;
2415 + (0,external_wp_element_namespaceObject.useEffect)(() => {
2416 + if (iconPosition !== void 0 && showIcon !== void 0) {
2417 + setAttributes({
2418 + iconPosition,
2419 + showIcon
2420 + });
2421 + }
2422 + }, [iconPosition, showIcon, setAttributes]);
2423 + const [fluidTypographySettings, layout] = (0,external_wp_blockEditor_namespaceObject.useSettings)(
2424 + "typography.fluid",
2425 + "layout"
2426 + );
2427 + const typographyProps = (0,external_wp_blockEditor_namespaceObject.getTypographyClassesAndStyles)(attributes, {
2428 + typography: {
2429 + fluid: fluidTypographySettings
2430 + },
2431 + layout: {
2432 + wideSize: layout?.wideSize
2433 + }
2434 + });
2435 + const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)();
2436 + const spacingProps = (0,external_wp_blockEditor_namespaceObject.__experimentalGetSpacingClassesAndStyles)(attributes);
2437 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(TagName, { ...blockProps, children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(
2438 + "button",
2439 + {
2440 + className: "wp-block-accordion-heading__toggle",
2441 + style: spacingProps.style,
2442 + tabIndex: "-1",
2443 + children: [
2444 + showIcon && iconPosition === "left" && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
2445 + "span",
2446 + {
2447 + className: "wp-block-accordion-heading__toggle-icon",
2448 + "aria-hidden": "true",
2449 + children: "+"
2450 + }
2451 + ),
2452 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
2453 + external_wp_blockEditor_namespaceObject.RichText,
2454 + {
2455 + withoutInteractiveFormatting: true,
2456 + disableLineBreaks: true,
2457 + tagName: "span",
2458 + value: title,
2459 + onChange: (newTitle) => setAttributes({ title: newTitle }),
2460 + placeholder: (0,external_wp_i18n_namespaceObject.__)("Accordion title"),
2461 + className: "wp-block-accordion-heading__toggle-title",
2462 + style: {
2463 + letterSpacing: typographyProps.style.letterSpacing,
2464 + textDecoration: typographyProps.style.textDecoration
2465 + }
2466 + }
2467 + ),
2468 + showIcon && iconPosition === "right" && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
2469 + "span",
2470 + {
2471 + className: "wp-block-accordion-heading__toggle-icon",
2472 + "aria-hidden": "true",
2473 + children: "+"
2474 + }
2475 + )
2476 + ]
2477 + }
2478 + ) });
2479 + }
2480 +
2481 +
2482 + ;// ./node_modules/@wordpress/block-library/build-module/accordion-heading/save.js
2483 +
2484 +
2485 + function accordion_heading_save_save({ attributes }) {
2486 + const { level, title, iconPosition, showIcon } = attributes;
2487 + const TagName = "h" + (level || 3);
2488 + const typographyProps = (0,external_wp_blockEditor_namespaceObject.getTypographyClassesAndStyles)(attributes);
2489 + const blockProps = external_wp_blockEditor_namespaceObject.useBlockProps.save();
2490 + const spacingProps = (0,external_wp_blockEditor_namespaceObject.__experimentalGetSpacingClassesAndStyles)(attributes);
2491 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(TagName, { ...blockProps, children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(
2492 + "button",
2493 + {
2494 + className: "wp-block-accordion-heading__toggle",
2495 + style: spacingProps.style,
2496 + children: [
2497 + showIcon && iconPosition === "left" && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
2498 + "span",
2499 + {
2500 + className: "wp-block-accordion-heading__toggle-icon",
2501 + "aria-hidden": "true",
2502 + children: "+"
2503 + }
2504 + ),
2505 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
2506 + external_wp_blockEditor_namespaceObject.RichText.Content,
2507 + {
2508 + className: "wp-block-accordion-heading__toggle-title",
2509 + tagName: "span",
2510 + value: title,
2511 + style: {
2512 + letterSpacing: typographyProps.style.letterSpacing,
2513 + textDecoration: typographyProps.style.textDecoration
2514 + }
2515 + }
2516 + ),
2517 + showIcon && iconPosition === "right" && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
2518 + "span",
2519 + {
2520 + className: "wp-block-accordion-heading__toggle-icon",
2521 + "aria-hidden": "true",
2522 + children: "+"
2523 + }
2524 + )
2525 + ]
2526 + }
2527 + ) });
2528 + }
2529 +
2530 +
2531 + ;// ./node_modules/@wordpress/block-library/build-module/accordion-heading/block.json
2532 + const accordion_heading_block_namespaceObject = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/accordion-heading","title":"Accordion Heading","category":"design","description":"Displays a heading that toggles the accordion panel.","parent":["core/accordion-item"],"usesContext":["core/accordion-icon-position","core/accordion-show-icon","core/accordion-heading-level"],"supports":{"anchor":true,"color":{"background":true,"gradients":true},"align":false,"interactivity":true,"spacing":{"padding":true,"__experimentalDefaultControls":{"padding":true},"__experimentalSkipSerialization":true,"__experimentalSelector":".wp-block-accordion-heading__toggle"},"__experimentalBorder":{"color":true,"radius":true,"style":true,"width":true,"__experimentalDefaultControls":{"color":true,"radius":true,"style":true,"width":true}},"typography":{"__experimentalSkipSerialization":["textDecoration","letterSpacing"],"fontSize":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true,"fontFamily":true}},"shadow":true,"visibility":false,"lock":false},"selectors":{"typography":{"letterSpacing":".wp-block-accordion-heading .wp-block-accordion-heading__toggle-title","textDecoration":".wp-block-accordion-heading .wp-block-accordion-heading__toggle-title"}},"attributes":{"openByDefault":{"type":"boolean","default":false},"title":{"type":"rich-text","source":"rich-text","selector":".wp-block-accordion-heading__toggle-title","role":"content"},"level":{"type":"number"},"iconPosition":{"type":"string","enum":["left","right"],"default":"right"},"showIcon":{"type":"boolean","default":true}},"textdomain":"default"}');
2533 + ;// ./node_modules/@wordpress/block-library/build-module/accordion-heading/icon.js
2534 +
2535 +
2536 + var accordion_heading_icon_icon_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: [
2537 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
2538 + external_wp_primitives_namespaceObject.Path,
2539 + {
2540 + fillRule: "evenodd",
2541 + clipRule: "evenodd",
2542 + d: "M19.5 12.75L9.5 12.75L9.5 11.25L19.5 11.25L19.5 12.75Z",
2543 + fill: "currentColor"
2544 + }
2545 + ),
2546 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M4.5 9.5L8.5 12L4.5 14.5L4.5 9.5Z", fill: "currentColor" })
2547 + ] });
2548 +
2549 +
2550 + ;// ./node_modules/@wordpress/block-library/build-module/accordion-heading/deprecated.js
2551 +
2552 +
2553 + const v1 = {
2554 + attributes: {
2555 + openByDefault: {
2556 + type: "boolean",
2557 + default: false
2558 + },
2559 + title: {
2560 + type: "rich-text",
2561 + source: "rich-text",
2562 + selector: ".wp-block-accordion-heading__toggle-title",
2563 + role: "content"
2564 + },
2565 + level: {
2566 + type: "number"
2567 + },
2568 + iconPosition: {
2569 + type: "string",
2570 + enum: ["left", "right"],
2571 + default: "right"
2572 + },
2573 + showIcon: {
2574 + type: "boolean",
2575 + default: true
2576 + }
2577 + },
2578 + supports: {
2579 + anchor: true,
2580 + color: {
2581 + background: true,
2582 + gradients: true
2583 + },
2584 + align: false,
2585 + interactivity: true,
2586 + spacing: {
2587 + padding: true,
2588 + __experimentalDefaultControls: {
2589 + padding: true
2590 + },
2591 + __experimentalSkipSerialization: true,
2592 + __experimentalSelector: ".wp-block-accordion-heading__toggle"
2593 + },
2594 + __experimentalBorder: {
2595 + color: true,
2596 + radius: true,
2597 + style: true,
2598 + width: true,
2599 + __experimentalDefaultControls: {
2600 + color: true,
2601 + radius: true,
2602 + style: true,
2603 + width: true
2604 + }
2605 + },
2606 + typography: {
2607 + fontSize: true,
2608 + __experimentalFontFamily: true,
2609 + __experimentalFontWeight: true,
2610 + __experimentalFontStyle: true,
2611 + __experimentalTextTransform: true,
2612 + __experimentalTextDecoration: true,
2613 + __experimentalLetterSpacing: true,
2614 + __experimentalDefaultControls: {
2615 + fontSize: true,
2616 + fontFamily: true
2617 + }
2618 + },
2619 + shadow: true,
2620 + visibility: false
2621 + },
2622 + save({ attributes }) {
2623 + const { level, title, iconPosition, showIcon } = attributes;
2624 + const TagName = "h" + (level || 3);
2625 + const blockProps = external_wp_blockEditor_namespaceObject.useBlockProps.save();
2626 + const spacingProps = (0,external_wp_blockEditor_namespaceObject.__experimentalGetSpacingClassesAndStyles)(attributes);
2627 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(TagName, { ...blockProps, children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(
2628 + "button",
2629 + {
2630 + className: "wp-block-accordion-heading__toggle",
2631 + style: spacingProps.style,
2632 + children: [
2633 + showIcon && iconPosition === "left" && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
2634 + "span",
2635 + {
2636 + className: "wp-block-accordion-heading__toggle-icon",
2637 + "aria-hidden": "true",
2638 + children: "+"
2639 + }
2640 + ),
2641 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
2642 + external_wp_blockEditor_namespaceObject.RichText.Content,
2643 + {
2644 + className: "wp-block-accordion-heading__toggle-title",
2645 + tagName: "span",
2646 + value: title
2647 + }
2648 + ),
2649 + showIcon && iconPosition === "right" && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
2650 + "span",
2651 + {
2652 + className: "wp-block-accordion-heading__toggle-icon",
2653 + "aria-hidden": "true",
2654 + children: "+"
2655 + }
2656 + )
2657 + ]
2658 + }
2659 + ) });
2660 + }
2661 + };
2662 + var deprecated_default = [v1];
2663 +
2664 +
2665 + ;// ./node_modules/@wordpress/block-library/build-module/accordion-heading/index.js
2666 +
2667 +
2668 +
2669 +
2670 +
2671 +
2672 + const { name: accordion_heading_name } = accordion_heading_block_namespaceObject;
2673 + const accordion_heading_settings = {
2674 + icon: accordion_heading_icon_icon_default,
2675 + edit: accordion_heading_edit_Edit,
2676 + save: accordion_heading_save_save,
2677 + deprecated: deprecated_default
2678 + };
2679 + const accordion_heading_init = () => initBlock({ name: accordion_heading_name, metadata: accordion_heading_block_namespaceObject, settings: accordion_heading_settings });
2680 +
2681 +
2682 + ;// ./node_modules/@wordpress/block-library/build-module/accordion-panel/edit.js
2683 +
2684 +
2685 + function accordion_panel_edit_Edit({ attributes }) {
2686 + const { allowedBlocks, templateLock, openByDefault, isSelected } = attributes;
2687 + const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)({
2688 + "aria-hidden": !isSelected && !openByDefault,
2689 + role: "region"
2690 + });
2691 + const innerBlocksProps = (0,external_wp_blockEditor_namespaceObject.useInnerBlocksProps)(blockProps, {
2692 + allowedBlocks,
2693 + template: [["core/paragraph", {}]],
2694 + templateLock
2695 + });
2696 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { ...innerBlocksProps });
2697 + }
2698 +
2699 +
2700 + ;// ./node_modules/@wordpress/block-library/build-module/accordion-panel/save.js
2701 +
2702 +
2703 + function accordion_panel_save_save() {
2704 + const blockProps = external_wp_blockEditor_namespaceObject.useBlockProps.save({
2705 + role: "region"
2706 + });
2707 + const innerBlocksProps = external_wp_blockEditor_namespaceObject.useInnerBlocksProps.save(blockProps);
2708 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { ...innerBlocksProps });
2709 + }
2710 +
2711 +
2712 + ;// ./node_modules/@wordpress/block-library/build-module/accordion-panel/block.json
2713 + const accordion_panel_block_namespaceObject = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/accordion-panel","title":"Accordion Panel","category":"design","description":"Contains the hidden or revealed content beneath the heading.","parent":["core/accordion-item"],"supports":{"html":false,"color":{"background":true,"gradients":true},"interactivity":true,"spacing":{"padding":true,"blockGap":true,"__experimentalDefaultControls":{"padding":true,"blockGap":true}},"__experimentalBorder":{"color":true,"radius":true,"style":true,"width":true,"__experimentalDefaultControls":{"color":true,"radius":true,"style":true,"width":true}},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"shadow":true,"layout":{"allowEditing":false},"visibility":false,"contentRole":true,"allowedBlocks":true,"lock":false},"attributes":{"templateLock":{"type":["string","boolean"],"enum":["all","insert","contentOnly",false],"default":false},"openByDefault":{"type":"boolean","default":false},"isSelected":{"type":"boolean","default":false}},"textdomain":"default","style":"wp-block-accordion-panel"}');
2714 + ;// ./node_modules/@wordpress/block-library/build-module/accordion-panel/icon.js
2715 +
2716 +
2717 + var accordion_panel_icon_icon_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
2718 + external_wp_primitives_namespaceObject.Path,
2719 + {
2720 + fillRule: "evenodd",
2721 + clipRule: "evenodd",
2722 + d: "M8.10417 6.00024H6.5C5.39543 6.00024 4.5 6.89567 4.5 8.00024V10.3336H6V8.00024C6 7.7241 6.22386 7.50024 6.5 7.50024H8.10417V6.00024ZM4.5 13.6669V16.0002C4.5 17.1048 5.39543 18.0002 6.5 18.0002H8.10417V16.5002H6.5C6.22386 16.5002 6 16.2764 6 16.0002V13.6669H4.5ZM10.3958 6.00024V7.50024H13.6042V6.00024H10.3958ZM15.8958 6.00024V7.50024H17.5C17.7761 7.50024 18 7.7241 18 8.00024V10.3336H19.5V8.00024C19.5 6.89567 18.6046 6.00024 17.5 6.00024H15.8958ZM19.5 13.6669H18V16.0002C18 16.2764 17.7761 16.5002 17.5 16.5002H15.8958V18.0002H17.5C18.6046 18.0002 19.5 17.1048 19.5 16.0002V13.6669ZM13.6042 18.0002V16.5002H10.3958V18.0002H13.6042Z",
2723 + fill: "currentColor"
2724 + }
2725 + ) });
2726 +
2727 +
2728 + ;// ./node_modules/@wordpress/block-library/build-module/accordion-panel/index.js
2729 +
2730 +
2731 +
2732 +
2733 +
2734 + const { name: accordion_panel_name } = accordion_panel_block_namespaceObject;
2735 + const accordion_panel_settings = {
2736 + icon: accordion_panel_icon_icon_default,
2737 + edit: accordion_panel_edit_Edit,
2738 + save: accordion_panel_save_save
2739 + };
2740 + const accordion_panel_init = () => initBlock({ name: accordion_panel_name, metadata: accordion_panel_block_namespaceObject, settings: accordion_panel_settings });
2741 +
2742 +
2743 + ;// ./node_modules/@wordpress/icons/build-module/library/archive.js
2744 +
2745 +
2746 + var archive_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
2747 + external_wp_primitives_namespaceObject.Path,
2748 + {
2749 + fillRule: "evenodd",
2750 + clipRule: "evenodd",
2751 + d: "M11.934 7.406a1 1 0 0 0 .914.594H19a.5.5 0 0 1 .5.5v9a.5.5 0 0 1-.5.5H5a.5.5 0 0 1-.5-.5V6a.5.5 0 0 1 .5-.5h5.764a.5.5 0 0 1 .447.276l.723 1.63Zm1.064-1.216a.5.5 0 0 0 .462.31H19a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h5.764a2 2 0 0 1 1.789 1.106l.445 1.084ZM8.5 10.5h7V12h-7v-1.5Zm7 3.5h-7v1.5h7V14Z"
2752 + }
2753 + ) });
2754 +
2755 +
2756 + ;// ./node_modules/@wordpress/block-library/build-module/archives/block.json
2757 + const archives_block_namespaceObject = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/archives","title":"Archives","category":"widgets","description":"Display a date archive of your posts.","textdomain":"default","attributes":{"displayAsDropdown":{"type":"boolean","default":false},"showLabel":{"type":"boolean","default":true},"showPostCounts":{"type":"boolean","default":false},"type":{"type":"string","default":"monthly"}},"supports":{"align":true,"__experimentalBorder":{"radius":true,"color":true,"width":true,"style":true},"html":false,"spacing":{"margin":true,"padding":true,"__experimentalDefaultControls":{"margin":false,"padding":false}},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"color":{"gradients":true,"link":true,"__experimentalDefaultControls":{"background":true,"text":true,"link":true}},"interactivity":{"clientNavigation":true}},"editorStyle":"wp-block-archives-editor"}');
2758 + ;// ./node_modules/@wordpress/block-library/build-module/archives/edit.js
2759 +
2760 +
2761 +
2762 +
2763 +
2764 +
2765 + function ArchivesEdit({ attributes, setAttributes }) {
2766 + const { showLabel, showPostCounts, displayAsDropdown, type } = attributes;
2767 + const dropdownMenuProps = useToolsPanelDropdownMenuProps();
2768 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
2769 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(
2770 + external_wp_components_namespaceObject.__experimentalToolsPanel,
2771 + {
2772 + label: (0,external_wp_i18n_namespaceObject.__)("Settings"),
2773 + resetAll: () => {
2774 + setAttributes({
2775 + displayAsDropdown: false,
2776 + showLabel: true,
2777 + showPostCounts: false,
2778 + type: "monthly"
2779 + });
2780 + },
2781 + dropdownMenuProps,
2782 + children: [
2783 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
2784 + external_wp_components_namespaceObject.__experimentalToolsPanelItem,
2785 + {
2786 + label: (0,external_wp_i18n_namespaceObject.__)("Display as dropdown"),
2787 + isShownByDefault: true,
2788 + hasValue: () => displayAsDropdown,
2789 + onDeselect: () => setAttributes({ displayAsDropdown: false }),
2790 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
2791 + external_wp_components_namespaceObject.ToggleControl,
2792 + {
2793 + __nextHasNoMarginBottom: true,
2794 + label: (0,external_wp_i18n_namespaceObject.__)("Display as dropdown"),
2795 + checked: displayAsDropdown,
2796 + onChange: () => setAttributes({
2797 + displayAsDropdown: !displayAsDropdown
2798 + })
2799 + }
2800 + )
2801 + }
2802 + ),
2803 + displayAsDropdown && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
2804 + external_wp_components_namespaceObject.__experimentalToolsPanelItem,
2805 + {
2806 + label: (0,external_wp_i18n_namespaceObject.__)("Show label"),
2807 + isShownByDefault: true,
2808 + hasValue: () => !showLabel,
2809 + onDeselect: () => setAttributes({ showLabel: true }),
2810 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
2811 + external_wp_components_namespaceObject.ToggleControl,
2812 + {
2813 + __nextHasNoMarginBottom: true,
2814 + label: (0,external_wp_i18n_namespaceObject.__)("Show label"),
2815 + checked: showLabel,
2816 + onChange: () => setAttributes({
2817 + showLabel: !showLabel
2818 + })
2819 + }
2820 + )
2821 + }
2822 + ),
2823 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
2824 + external_wp_components_namespaceObject.__experimentalToolsPanelItem,
2825 + {
2826 + label: (0,external_wp_i18n_namespaceObject.__)("Show post counts"),
2827 + isShownByDefault: true,
2828 + hasValue: () => showPostCounts,
2829 + onDeselect: () => setAttributes({ showPostCounts: false }),
2830 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
2831 + external_wp_components_namespaceObject.ToggleControl,
2832 + {
2833 + __nextHasNoMarginBottom: true,
2834 + label: (0,external_wp_i18n_namespaceObject.__)("Show post counts"),
2835 + checked: showPostCounts,
2836 + onChange: () => setAttributes({
2837 + showPostCounts: !showPostCounts
2838 + })
2839 + }
2840 + )
2841 + }
2842 + ),
2843 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
2844 + external_wp_components_namespaceObject.__experimentalToolsPanelItem,
2845 + {
2846 + label: (0,external_wp_i18n_namespaceObject.__)("Group by"),
2847 + isShownByDefault: true,
2848 + hasValue: () => type !== "monthly",
2849 + onDeselect: () => setAttributes({ type: "monthly" }),
2850 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
2851 + external_wp_components_namespaceObject.SelectControl,
2852 + {
2853 + __next40pxDefaultSize: true,
2854 + __nextHasNoMarginBottom: true,
2855 + label: (0,external_wp_i18n_namespaceObject.__)("Group by"),
2856 + options: [
2857 + { label: (0,external_wp_i18n_namespaceObject.__)("Year"), value: "yearly" },
2858 + { label: (0,external_wp_i18n_namespaceObject.__)("Month"), value: "monthly" },
2859 + { label: (0,external_wp_i18n_namespaceObject.__)("Week"), value: "weekly" },
2860 + { label: (0,external_wp_i18n_namespaceObject.__)("Day"), value: "daily" }
2861 + ],
2862 + value: type,
2863 + onChange: (value) => setAttributes({ type: value })
2864 + }
2865 + )
2866 + }
2867 + )
2868 + ]
2869 + }
2870 + ) }),
2871 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { ...(0,external_wp_blockEditor_namespaceObject.useBlockProps)(), children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Disabled, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
2872 + (external_wp_serverSideRender_default()),
2873 + {
2874 + block: "core/archives",
2875 + skipBlockSupportAttributes: true,
2876 + attributes
2877 + }
2878 + ) }) })
2879 + ] });
2880 + }
2881 +
2882 +
2883 + ;// ./node_modules/@wordpress/block-library/build-module/archives/index.js
2884 +
2885 +
2886 +
2887 +
2888 + const { name: archives_name } = archives_block_namespaceObject;
2889 + const archives_settings = {
2890 + icon: archive_default,
2891 + example: {},
2892 + edit: ArchivesEdit
2893 + };
2894 + const archives_init = () => initBlock({ name: archives_name, metadata: archives_block_namespaceObject, settings: archives_settings });
2895 +
2896 +
2897 + ;// ./node_modules/@wordpress/icons/build-module/library/comment-author-avatar.js
2898 +
2899 +
2900 + var comment_author_avatar_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
2901 + external_wp_primitives_namespaceObject.Path,
2902 + {
2903 + fillRule: "evenodd",
2904 + d: "M7.25 16.437a6.5 6.5 0 1 1 9.5 0V16A2.75 2.75 0 0 0 14 13.25h-4A2.75 2.75 0 0 0 7.25 16v.437Zm1.5 1.193a6.47 6.47 0 0 0 3.25.87 6.47 6.47 0 0 0 3.25-.87V16c0-.69-.56-1.25-1.25-1.25h-4c-.69 0-1.25.56-1.25 1.25v1.63ZM4 12a8 8 0 1 1 16 0 8 8 0 0 1-16 0Zm10-2a2 2 0 1 1-4 0 2 2 0 0 1 4 0Z",
2905 + clipRule: "evenodd"
2906 + }
2907 + ) });
2908 +
2909 +
2910 + ;// ./node_modules/@wordpress/block-library/build-module/avatar/block.json
2911 + const avatar_block_namespaceObject = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/avatar","title":"Avatar","category":"theme","description":"Add a user’s avatar.","textdomain":"default","attributes":{"userId":{"type":"number"},"size":{"type":"number","default":96},"isLink":{"type":"boolean","default":false},"linkTarget":{"type":"string","default":"_self"}},"usesContext":["postType","postId","commentId"],"supports":{"html":false,"align":true,"alignWide":false,"spacing":{"margin":true,"padding":true,"__experimentalDefaultControls":{"margin":false,"padding":false}},"__experimentalBorder":{"__experimentalSkipSerialization":true,"radius":true,"width":true,"color":true,"style":true,"__experimentalDefaultControls":{"radius":true}},"color":{"text":false,"background":false},"filter":{"duotone":true},"interactivity":{"clientNavigation":true}},"selectors":{"border":".wp-block-avatar img","filter":{"duotone":".wp-block-avatar img"}},"editorStyle":"wp-block-avatar-editor","style":"wp-block-avatar"}');
2912 + ;// external ["wp","url"]
2913 + const external_wp_url_namespaceObject = window["wp"]["url"];
2914 + ;// ./node_modules/@wordpress/block-library/build-module/avatar/hooks.js
2915 +
2916 +
2917 +
2918 +
2919 + function getAvatarSizes(sizes) {
2920 + const minSize = sizes ? sizes[0] : 24;
2921 + const maxSize = sizes ? sizes[sizes.length - 1] : 96;
2922 + const maxSizeBuffer = Math.floor(maxSize * 2.5);
2923 + return {
2924 + minSize,
2925 + maxSize: maxSizeBuffer
2926 + };
2927 + }
2928 + function useCommentAvatar({ commentId }) {
2929 + const [avatars] = (0,external_wp_coreData_namespaceObject.useEntityProp)(
2930 + "root",
2931 + "comment",
2932 + "author_avatar_urls",
2933 + commentId
2934 + );
2935 + const [authorName] = (0,external_wp_coreData_namespaceObject.useEntityProp)(
2936 + "root",
2937 + "comment",
2938 + "author_name",
2939 + commentId
2940 + );
2941 + const avatarUrls = avatars ? Object.values(avatars) : null;
2942 + const sizes = avatars ? Object.keys(avatars) : null;
2943 + const { minSize, maxSize } = getAvatarSizes(sizes);
2944 + const defaultAvatar = useDefaultAvatar();
2945 + return {
2946 + src: avatarUrls ? avatarUrls[avatarUrls.length - 1] : defaultAvatar,
2947 + minSize,
2948 + maxSize,
2949 + alt: authorName ? (
2950 + // translators: %s: Author name.
2951 + (0,external_wp_i18n_namespaceObject.sprintf)((0,external_wp_i18n_namespaceObject.__)("%s Avatar"), authorName)
2952 + ) : (0,external_wp_i18n_namespaceObject.__)("Default Avatar")
2953 + };
2954 + }
2955 + function useUserAvatar({ userId, postId, postType }) {
2956 + const { authorDetails } = (0,external_wp_data_namespaceObject.useSelect)(
2957 + (select) => {
2958 + const { getEditedEntityRecord, getUser } = select(external_wp_coreData_namespaceObject.store);
2959 + if (userId) {
2960 + return {
2961 + authorDetails: getUser(userId)
2962 + };
2963 + }
2964 + const _authorId = getEditedEntityRecord(
2965 + "postType",
2966 + postType,
2967 + postId
2968 + )?.author;
2969 + return {
2970 + authorDetails: _authorId ? getUser(_authorId) : null
2971 + };
2972 + },
2973 + [postType, postId, userId]
2974 + );
2975 + const avatarUrls = authorDetails?.avatar_urls ? Object.values(authorDetails.avatar_urls) : null;
2976 + const sizes = authorDetails?.avatar_urls ? Object.keys(authorDetails.avatar_urls) : null;
2977 + const { minSize, maxSize } = getAvatarSizes(sizes);
2978 + const defaultAvatar = useDefaultAvatar();
2979 + return {
2980 + src: avatarUrls ? avatarUrls[avatarUrls.length - 1] : defaultAvatar,
2981 + minSize,
2982 + maxSize,
2983 + alt: authorDetails ? (
2984 + // translators: %s: Author name.
2985 + (0,external_wp_i18n_namespaceObject.sprintf)((0,external_wp_i18n_namespaceObject.__)("%s Avatar"), authorDetails?.name)
2986 + ) : (0,external_wp_i18n_namespaceObject.__)("Default Avatar")
2987 + };
2988 + }
2989 +
2990 +
2991 + ;// external ["wp","htmlEntities"]
2992 + const external_wp_htmlEntities_namespaceObject = window["wp"]["htmlEntities"];
2993 + ;// ./node_modules/@wordpress/block-library/build-module/avatar/user-control.js
2994 +
2995 +
2996 +
2997 +
2998 +
2999 +
3000 +
3001 +
3002 + const AUTHORS_QUERY = {
3003 + who: "authors",
3004 + per_page: 100,
3005 + _fields: "id,name",
3006 + context: "view"
3007 + };
3008 + function UserControl({ value, onChange }) {
3009 + const [filterValue, setFilterValue] = (0,external_wp_element_namespaceObject.useState)("");
3010 + const { authors, isLoading } = (0,external_wp_data_namespaceObject.useSelect)(
3011 + (select) => {
3012 + const { getUsers, isResolving } = select(external_wp_coreData_namespaceObject.store);
3013 + const query = { ...AUTHORS_QUERY };
3014 + if (filterValue) {
3015 + query.search = filterValue;
3016 + query.search_columns = ["name"];
3017 + }
3018 + return {
3019 + authors: getUsers(query),
3020 + isLoading: isResolving("getUsers", [query])
3021 + };
3022 + },
3023 + [filterValue]
3024 + );
3025 + const options = (0,external_wp_element_namespaceObject.useMemo)(() => {
3026 + return (authors ?? []).map((author) => {
3027 + return {
3028 + value: author.id,
3029 + label: (0,external_wp_htmlEntities_namespaceObject.decodeEntities)(author.name)
3030 + };
3031 + });
3032 + }, [authors]);
3033 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
3034 + external_wp_components_namespaceObject.ComboboxControl,
3035 + {
3036 + __next40pxDefaultSize: true,
3037 + __nextHasNoMarginBottom: true,
3038 + label: (0,external_wp_i18n_namespaceObject.__)("User"),
3039 + help: (0,external_wp_i18n_namespaceObject.__)(
3040 + "Select the avatar user to display, if it is blank it will use the post/page author."
3041 + ),
3042 + value,
3043 + onChange,
3044 + options,
3045 + onFilterValueChange: (0,external_wp_compose_namespaceObject.debounce)(setFilterValue, 300),
3046 + isLoading
3047 + }
3048 + );
3049 + }
3050 +
3051 +
3052 + ;// ./node_modules/@wordpress/block-library/build-module/avatar/edit.js
3053 +
3054 +
3055 +
3056 +
3057 +
3058 +
3059 +
3060 +
3061 +
3062 + const AvatarInspectorControls = ({
3063 + setAttributes,
3064 + avatar,
3065 + attributes,
3066 + selectUser
3067 + }) => {
3068 + const dropdownMenuProps = useToolsPanelDropdownMenuProps();
3069 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(
3070 + external_wp_components_namespaceObject.__experimentalToolsPanel,
3071 + {
3072 + label: (0,external_wp_i18n_namespaceObject.__)("Settings"),
3073 + resetAll: () => {
3074 + setAttributes({
3075 + size: 96,
3076 + isLink: false,
3077 + linkTarget: "_self",
3078 + userId: void 0
3079 + });
3080 + },
3081 + dropdownMenuProps,
3082 + children: [
3083 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
3084 + external_wp_components_namespaceObject.__experimentalToolsPanelItem,
3085 + {
3086 + label: (0,external_wp_i18n_namespaceObject.__)("Image size"),
3087 + isShownByDefault: true,
3088 + hasValue: () => attributes?.size !== 96,
3089 + onDeselect: () => setAttributes({ size: 96 }),
3090 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
3091 + external_wp_components_namespaceObject.RangeControl,
3092 + {
3093 + __nextHasNoMarginBottom: true,
3094 + __next40pxDefaultSize: true,
3095 + label: (0,external_wp_i18n_namespaceObject.__)("Image size"),
3096 + onChange: (newSize) => setAttributes({
3097 + size: newSize
3098 + }),
3099 + min: avatar.minSize,
3100 + max: avatar.maxSize,
3101 + initialPosition: attributes?.size,
3102 + value: attributes?.size
3103 + }
3104 + )
3105 + }
3106 + ),
3107 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
3108 + external_wp_components_namespaceObject.__experimentalToolsPanelItem,
3109 + {
3110 + label: (0,external_wp_i18n_namespaceObject.__)("Link to user profile"),
3111 + isShownByDefault: true,
3112 + hasValue: () => attributes?.isLink,
3113 + onDeselect: () => setAttributes({ isLink: false }),
3114 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
3115 + external_wp_components_namespaceObject.ToggleControl,
3116 + {
3117 + __nextHasNoMarginBottom: true,
3118 + label: (0,external_wp_i18n_namespaceObject.__)("Link to user profile"),
3119 + onChange: () => setAttributes({ isLink: !attributes.isLink }),
3120 + checked: attributes.isLink
3121 + }
3122 + )
3123 + }
3124 + ),
3125 + attributes.isLink && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
3126 + external_wp_components_namespaceObject.__experimentalToolsPanelItem,
3127 + {
3128 + label: (0,external_wp_i18n_namespaceObject.__)("Open in new tab"),
3129 + isShownByDefault: true,
3130 + hasValue: () => attributes?.linkTarget !== "_self",
3131 + onDeselect: () => setAttributes({ linkTarget: "_self" }),
3132 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
3133 + external_wp_components_namespaceObject.ToggleControl,
3134 + {
3135 + __nextHasNoMarginBottom: true,
3136 + label: (0,external_wp_i18n_namespaceObject.__)("Open in new tab"),
3137 + onChange: (value) => setAttributes({
3138 + linkTarget: value ? "_blank" : "_self"
3139 + }),
3140 + checked: attributes.linkTarget === "_blank"
3141 + }
3142 + )
3143 + }
3144 + ),
3145 + selectUser && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
3146 + external_wp_components_namespaceObject.__experimentalToolsPanelItem,
3147 + {
3148 + label: (0,external_wp_i18n_namespaceObject.__)("User"),
3149 + isShownByDefault: true,
3150 + hasValue: () => !!attributes?.userId,
3151 + onDeselect: () => setAttributes({ userId: void 0 }),
3152 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
3153 + UserControl,
3154 + {
3155 + value: attributes?.userId,
3156 + onChange: (value) => {
3157 + setAttributes({
3158 + userId: value
3159 + });
3160 + }
3161 + }
3162 + )
3163 + }
3164 + )
3165 + ]
3166 + }
3167 + ) });
3168 + };
3169 + const ResizableAvatar = ({
3170 + setAttributes,
3171 + attributes,
3172 + avatar,
3173 + blockProps,
3174 + isSelected
3175 + }) => {
3176 + const borderProps = (0,external_wp_blockEditor_namespaceObject.__experimentalUseBorderProps)(attributes);
3177 + const doubledSizedSrc = (0,external_wp_url_namespaceObject.addQueryArgs)(
3178 + (0,external_wp_url_namespaceObject.removeQueryArgs)(avatar?.src, ["s"]),
3179 + {
3180 + s: attributes?.size * 2
3181 + }
3182 + );
3183 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { ...blockProps, children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
3184 + external_wp_components_namespaceObject.ResizableBox,
3185 + {
3186 + size: {
3187 + width: attributes.size,
3188 + height: attributes.size
3189 + },
3190 + showHandle: isSelected,
3191 + onResizeStop: (event, direction, elt, delta) => {
3192 + setAttributes({
3193 + size: parseInt(
3194 + attributes.size + (delta.height || delta.width),
3195 + 10
3196 + )
3197 + });
3198 + },
3199 + lockAspectRatio: true,
3200 + enable: {
3201 + top: false,
3202 + right: !(0,external_wp_i18n_namespaceObject.isRTL)(),
3203 + bottom: true,
3204 + left: (0,external_wp_i18n_namespaceObject.isRTL)()
3205 + },
3206 + minWidth: avatar.minSize,
3207 + maxWidth: avatar.maxSize,
3208 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
3209 + "img",
3210 + {
3211 + src: doubledSizedSrc,
3212 + alt: avatar.alt,
3213 + className: dist_clsx(
3214 + "avatar",
3215 + "avatar-" + attributes.size,
3216 + "photo",
3217 + "wp-block-avatar__image",
3218 + borderProps.className
3219 + ),
3220 + style: borderProps.style
3221 + }
3222 + )
3223 + }
3224 + ) });
3225 + };
3226 + const CommentEdit = ({ attributes, context, setAttributes, isSelected }) => {
3227 + const { commentId } = context;
3228 + const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)();
3229 + const avatar = useCommentAvatar({ commentId });
3230 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
3231 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
3232 + AvatarInspectorControls,
3233 + {
3234 + avatar,
3235 + setAttributes,
3236 + attributes,
3237 + selectUser: false
3238 + }
3239 + ),
3240 + attributes.isLink ? /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
3241 + "a",
3242 + {
3243 + href: "#avatar-pseudo-link",
3244 + className: "wp-block-avatar__link",
3245 + onClick: (event) => event.preventDefault(),
3246 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
3247 + ResizableAvatar,
3248 + {
3249 + attributes,
3250 + avatar,
3251 + blockProps,
3252 + isSelected,
3253 + setAttributes
3254 + }
3255 + )
3256 + }
3257 + ) : /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
3258 + ResizableAvatar,
3259 + {
3260 + attributes,
3261 + avatar,
3262 + blockProps,
3263 + isSelected,
3264 + setAttributes
3265 + }
3266 + )
3267 + ] });
3268 + };
3269 + const UserEdit = ({ attributes, context, setAttributes, isSelected }) => {
3270 + const { postId, postType } = context;
3271 + const avatar = useUserAvatar({
3272 + userId: attributes?.userId,
3273 + postId,
3274 + postType
3275 + });
3276 + const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)();
3277 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
3278 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
3279 + AvatarInspectorControls,
3280 + {
3281 + selectUser: true,
3282 + attributes,
3283 + avatar,
3284 + setAttributes
3285 + }
3286 + ),
3287 + attributes.isLink ? /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
3288 + "a",
3289 + {
3290 + href: "#avatar-pseudo-link",
3291 + className: "wp-block-avatar__link",
3292 + onClick: (event) => event.preventDefault(),
3293 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
3294 + ResizableAvatar,
3295 + {
3296 + attributes,
3297 + avatar,
3298 + blockProps,
3299 + isSelected,
3300 + setAttributes
3301 + }
3302 + )
3303 + }
3304 + ) : /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
3305 + ResizableAvatar,
3306 + {
3307 + attributes,
3308 + avatar,
3309 + blockProps,
3310 + isSelected,
3311 + setAttributes
3312 + }
3313 + )
3314 + ] });
3315 + };
3316 + function avatar_edit_Edit(props) {
3317 + if (props?.context?.commentId || props?.context?.commentId === null) {
3318 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(CommentEdit, { ...props });
3319 + }
3320 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(UserEdit, { ...props });
3321 + }
3322 +
3323 +
3324 + ;// ./node_modules/@wordpress/block-library/build-module/avatar/index.js
3325 +
3326 +
3327 +
3328 +
3329 + const { name: avatar_name } = avatar_block_namespaceObject;
3330 + const avatar_settings = {
3331 + icon: comment_author_avatar_default,
3332 + edit: avatar_edit_Edit,
3333 + example: {}
3334 + };
3335 + const avatar_init = () => initBlock({ name: avatar_name, metadata: avatar_block_namespaceObject, settings: avatar_settings });
3336 +
3337 +
3338 + ;// ./node_modules/@wordpress/icons/build-module/library/audio.js
3339 +
3340 +
3341 + var audio_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M17.7 4.3c-1.2 0-2.8 0-3.8 1-.6.6-.9 1.5-.9 2.6V14c-.6-.6-1.5-1-2.5-1C8.6 13 7 14.6 7 16.5S8.6 20 10.5 20c1.5 0 2.8-1 3.3-2.3.5-.8.7-1.8.7-2.5V7.9c0-.7.2-1.2.5-1.6.6-.6 1.8-.6 2.8-.6h.3V4.3h-.4z" }) });
3342 +
3343 +
3344 + ;// ./node_modules/@wordpress/block-library/build-module/audio/deprecated.js
3345 +
3346 +
3347 + var deprecated_deprecated_default = [
3348 + {
3349 + attributes: {
3350 + src: {
3351 + type: "string",
3352 + source: "attribute",
3353 + selector: "audio",
3354 + attribute: "src"
3355 + },
3356 + caption: {
3357 + type: "string",
3358 + source: "html",
3359 + selector: "figcaption"
3360 + },
3361 + id: {
3362 + type: "number"
3363 + },
3364 + autoplay: {
3365 + type: "boolean",
3366 + source: "attribute",
3367 + selector: "audio",
3368 + attribute: "autoplay"
3369 + },
3370 + loop: {
3371 + type: "boolean",
3372 + source: "attribute",
3373 + selector: "audio",
3374 + attribute: "loop"
3375 + },
3376 + preload: {
3377 + type: "string",
3378 + source: "attribute",
3379 + selector: "audio",
3380 + attribute: "preload"
3381 + }
3382 + },
3383 + supports: {
3384 + align: true
3385 + },
3386 + save({ attributes }) {
3387 + const { autoplay, caption, loop, preload, src } = attributes;
3388 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("figure", { children: [
3389 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
3390 + "audio",
3391 + {
3392 + controls: "controls",
3393 + src,
3394 + autoPlay: autoplay,
3395 + loop,
3396 + preload
3397 + }
3398 + ),
3399 + !external_wp_blockEditor_namespaceObject.RichText.isEmpty(caption) && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
3400 + external_wp_blockEditor_namespaceObject.RichText.Content,
3401 + {
3402 + tagName: "figcaption",
3403 + value: caption
3404 + }
3405 + )
3406 + ] });
3407 + }
3408 + }
3409 + ];
3410 +
3411 +
3412 + ;// external ["wp","notices"]
3413 + const external_wp_notices_namespaceObject = window["wp"]["notices"];
3414 + ;// ./node_modules/memize/dist/index.js
3415 + /**
3416 + * Memize options object.
3417 + *
3418 + * @typedef MemizeOptions
3419 + *
3420 + * @property {number} [maxSize] Maximum size of the cache.
3421 + */
3422 +
3423 + /**
3424 + * Internal cache entry.
3425 + *
3426 + * @typedef MemizeCacheNode
3427 + *
3428 + * @property {?MemizeCacheNode|undefined} [prev] Previous node.
3429 + * @property {?MemizeCacheNode|undefined} [next] Next node.
3430 + * @property {Array<*>} args Function arguments for cache
3431 + * entry.
3432 + * @property {*} val Function result.
3433 + */
3434 +
3435 + /**
3436 + * Properties of the enhanced function for controlling cache.
3437 + *
3438 + * @typedef MemizeMemoizedFunction
3439 + *
3440 + * @property {()=>void} clear Clear the cache.
3441 + */
3442 +
3443 + /**
3444 + * Accepts a function to be memoized, and returns a new memoized function, with
3445 + * optional options.
3446 + *
3447 + * @template {(...args: any[]) => any} F
3448 + *
3449 + * @param {F} fn Function to memoize.
3450 + * @param {MemizeOptions} [options] Options object.
3451 + *
3452 + * @return {((...args: Parameters<F>) => ReturnType<F>) & MemizeMemoizedFunction} Memoized function.
3453 + */
3454 + function memize(fn, options) {
3455 + var size = 0;
3456 +
3457 + /** @type {?MemizeCacheNode|undefined} */
3458 + var head;
3459 +
3460 + /** @type {?MemizeCacheNode|undefined} */
3461 + var tail;
3462 +
3463 + options = options || {};
3464 +
3465 + function memoized(/* ...args */) {
3466 + var node = head,
3467 + len = arguments.length,
3468 + args,
3469 + i;
3470 +
3471 + searchCache: while (node) {
3472 + // Perform a shallow equality test to confirm that whether the node
3473 + // under test is a candidate for the arguments passed. Two arrays
3474 + // are shallowly equal if their length matches and each entry is
3475 + // strictly equal between the two sets. Avoid abstracting to a
3476 + // function which could incur an arguments leaking deoptimization.
3477 +
3478 + // Check whether node arguments match arguments length
3479 + if (node.args.length !== arguments.length) {
3480 + node = node.next;
3481 + continue;
3482 + }
3483 +
3484 + // Check whether node arguments match arguments values
3485 + for (i = 0; i < len; i++) {
3486 + if (node.args[i] !== arguments[i]) {
3487 + node = node.next;
3488 + continue searchCache;
3489 + }
3490 + }
3491 +
3492 + // At this point we can assume we've found a match
3493 +
3494 + // Surface matched node to head if not already
3495 + if (node !== head) {
3496 + // As tail, shift to previous. Must only shift if not also
3497 + // head, since if both head and tail, there is no previous.
3498 + if (node === tail) {
3499 + tail = node.prev;
3500 + }
3501 +
3502 + // Adjust siblings to point to each other. If node was tail,
3503 + // this also handles new tail's empty `next` assignment.
3504 + /** @type {MemizeCacheNode} */ (node.prev).next = node.next;
3505 + if (node.next) {
3506 + node.next.prev = node.prev;
3507 + }
3508 +
3509 + node.next = head;
3510 + node.prev = null;
3511 + /** @type {MemizeCacheNode} */ (head).prev = node;
3512 + head = node;
3513 + }
3514 +
3515 + // Return immediately
3516 + return node.val;
3517 + }
3518 +
3519 + // No cached value found. Continue to insertion phase:
3520 +
3521 + // Create a copy of arguments (avoid leaking deoptimization)
3522 + args = new Array(len);
3523 + for (i = 0; i < len; i++) {
3524 + args[i] = arguments[i];
3525 + }
3526 +
3527 + node = {
3528 + args: args,
3529 +
3530 + // Generate the result from original function
3531 + val: fn.apply(null, args),
3532 + };
3533 +
3534 + // Don't need to check whether node is already head, since it would
3535 + // have been returned above already if it was
3536 +
3537 + // Shift existing head down list
3538 + if (head) {
3539 + head.prev = node;
3540 + node.next = head;
3541 + } else {
3542 + // If no head, follows that there's no tail (at initial or reset)
3543 + tail = node;
3544 + }
3545 +
3546 + // Trim tail if we're reached max size and are pending cache insertion
3547 + if (size === /** @type {MemizeOptions} */ (options).maxSize) {
3548 + tail = /** @type {MemizeCacheNode} */ (tail).prev;
3549 + /** @type {MemizeCacheNode} */ (tail).next = null;
3550 + } else {
3551 + size++;
3552 + }
3553 +
3554 + head = node;
3555 +
3556 + return node.val;
3557 + }
3558 +
3559 + memoized.clear = function () {
3560 + head = null;
3561 + tail = null;
3562 + size = 0;
3563 + };
3564 +
3565 + // Ignore reason: There's not a clear solution to create an intersection of
3566 + // the function with additional properties, where the goal is to retain the
3567 + // function signature of the incoming argument and add control properties
3568 + // on the return value.
3569 +
3570 + // @ts-ignore
3571 + return memoized;
3572 + }
3573 +
3574 +
3575 +
3576 + ;// ./node_modules/@wordpress/block-library/build-module/embed/block.json
3577 + const embed_block_namespaceObject = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/embed","title":"Embed","category":"embed","description":"Add a block that displays content pulled from other sites, like Twitter or YouTube.","textdomain":"default","attributes":{"url":{"type":"string","role":"content"},"caption":{"type":"rich-text","source":"rich-text","selector":"figcaption","role":"content"},"type":{"type":"string","role":"content"},"providerNameSlug":{"type":"string","role":"content"},"allowResponsive":{"type":"boolean","default":true},"responsive":{"type":"boolean","default":false,"role":"content"},"previewable":{"type":"boolean","default":true,"role":"content"}},"supports":{"align":true,"spacing":{"margin":true},"interactivity":{"clientNavigation":true}},"editorStyle":"wp-block-embed-editor","style":"wp-block-embed"}');
3578 + ;// ./node_modules/@wordpress/block-library/build-module/embed/constants.js
3579 + const ASPECT_RATIOS = [
3580 + // Common video resolutions.
3581 + { ratio: "2.33", className: "wp-embed-aspect-21-9" },
3582 + { ratio: "2.00", className: "wp-embed-aspect-18-9" },
3583 + { ratio: "1.78", className: "wp-embed-aspect-16-9" },
3584 + { ratio: "1.33", className: "wp-embed-aspect-4-3" },
3585 + // Vertical video and instagram square video support.
3586 + { ratio: "1.00", className: "wp-embed-aspect-1-1" },
3587 + { ratio: "0.56", className: "wp-embed-aspect-9-16" },
3588 + { ratio: "0.50", className: "wp-embed-aspect-1-2" }
3589 + ];
3590 + const WP_EMBED_TYPE = "wp-embed";
3591 +
3592 +
3593 + ;// external ["wp","privateApis"]
3594 + const external_wp_privateApis_namespaceObject = window["wp"]["privateApis"];
3595 + ;// ./node_modules/@wordpress/block-library/build-module/lock-unlock.js
3596 +
3597 + const { lock, unlock } = (0,external_wp_privateApis_namespaceObject.__dangerousOptInToUnstableAPIsOnlyForCoreModules)(
3598 + "I acknowledge private features are not for use in themes or plugins and doing so will break in the next version of WordPress.",
3599 + "@wordpress/block-library"
3600 + );
3601 +
3602 +
3603 + ;// ./node_modules/@wordpress/block-library/build-module/embed/util.js
3604 +
3605 +
3606 +
3607 +
3608 +
3609 +
3610 +
3611 +
3612 +
3613 + const { name: DEFAULT_EMBED_BLOCK } = embed_block_namespaceObject;
3614 + const { kebabCase } = unlock(external_wp_components_namespaceObject.privateApis);
3615 + const getEmbedInfoByProvider = (provider) => (0,external_wp_blocks_namespaceObject.getBlockVariations)(DEFAULT_EMBED_BLOCK)?.find(
3616 + ({ name }) => name === provider
3617 + );
3618 + const matchesPatterns = (url, patterns = []) => patterns.some((pattern) => url.match(pattern));
3619 + const findMoreSuitableBlock = (url) => (0,external_wp_blocks_namespaceObject.getBlockVariations)(DEFAULT_EMBED_BLOCK)?.find(
3620 + ({ patterns }) => matchesPatterns(url, patterns)
3621 + );
3622 + const isFromWordPress = (html) => html && html.includes('class="wp-embedded-content"');
3623 + const getPhotoHtml = (photo) => {
3624 + const imageUrl = photo.url || photo.thumbnail_url;
3625 + const photoPreview = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("p", { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("img", { src: imageUrl, alt: photo.title, width: "100%" }) });
3626 + return (0,external_wp_element_namespaceObject.renderToString)(photoPreview);
3627 + };
3628 + const createUpgradedEmbedBlock = (props, attributesFromPreview = {}) => {
3629 + const { preview, attributes = {} } = props;
3630 + const { url, providerNameSlug, type, ...restAttributes } = attributes;
3631 + if (!url || !(0,external_wp_blocks_namespaceObject.getBlockType)(DEFAULT_EMBED_BLOCK)) {
3632 + return;
3633 + }
3634 + const matchedBlock = findMoreSuitableBlock(url);
3635 + const isCurrentBlockWP = providerNameSlug === "wordpress" || type === WP_EMBED_TYPE;
3636 + const shouldCreateNewBlock = !isCurrentBlockWP && matchedBlock && (matchedBlock.attributes.providerNameSlug !== providerNameSlug || !providerNameSlug);
3637 + if (shouldCreateNewBlock) {
3638 + return (0,external_wp_blocks_namespaceObject.createBlock)(DEFAULT_EMBED_BLOCK, {
3639 + url,
3640 + ...restAttributes,
3641 + ...matchedBlock.attributes
3642 + });
3643 + }
3644 + const wpVariation = (0,external_wp_blocks_namespaceObject.getBlockVariations)(DEFAULT_EMBED_BLOCK)?.find(
3645 + ({ name }) => name === "wordpress"
3646 + );
3647 + if (!wpVariation || !preview || !isFromWordPress(preview.html) || isCurrentBlockWP) {
3648 + return;
3649 + }
3650 + return (0,external_wp_blocks_namespaceObject.createBlock)(DEFAULT_EMBED_BLOCK, {
3651 + url,
3652 + ...wpVariation.attributes,
3653 + // By now we have the preview, but when the new block first renders, it
3654 + // won't have had all the attributes set, and so won't get the correct
3655 + // type and it won't render correctly. So, we pass through the current attributes
3656 + // here so that the initial render works when we switch to the WordPress
3657 + // block. This only affects the WordPress block because it can't be
3658 + // rendered in the usual Sandbox (it has a sandbox of its own) and it
3659 + // relies on the preview to set the correct render type.
3660 + ...attributesFromPreview
3661 + });
3662 + };
3663 + const hasAspectRatioClass = (existingClassNames) => {
3664 + if (!existingClassNames) {
3665 + return false;
3666 + }
3667 + return ASPECT_RATIOS.some(
3668 + ({ className }) => existingClassNames.includes(className)
3669 + );
3670 + };
3671 + const removeAspectRatioClasses = (existingClassNames) => {
3672 + if (!existingClassNames) {
3673 + return existingClassNames;
3674 + }
3675 + const aspectRatioClassNames = ASPECT_RATIOS.reduce(
3676 + (accumulator, { className }) => {
3677 + accumulator.push(className);
3678 + return accumulator;
3679 + },
3680 + ["wp-has-aspect-ratio"]
3681 + );
3682 + let outputClassNames = existingClassNames;
3683 + for (const className of aspectRatioClassNames) {
3684 + outputClassNames = outputClassNames.replace(className, "");
3685 + }
3686 + return outputClassNames.trim();
3687 + };
3688 + function getClassNames(html, existingClassNames, allowResponsive = true) {
3689 + if (!allowResponsive) {
3690 + return removeAspectRatioClasses(existingClassNames);
3691 + }
3692 + const previewDocument = document.implementation.createHTMLDocument("");
3693 + previewDocument.body.innerHTML = html;
3694 + const iframe = previewDocument.body.querySelector("iframe");
3695 + if (iframe && iframe.height && iframe.width) {
3696 + const aspectRatio = (iframe.width / iframe.height).toFixed(2);
3697 + for (let ratioIndex = 0; ratioIndex < ASPECT_RATIOS.length; ratioIndex++) {
3698 + const potentialRatio = ASPECT_RATIOS[ratioIndex];
3699 + if (aspectRatio >= potentialRatio.ratio) {
3700 + const ratioDiff = aspectRatio - potentialRatio.ratio;
3701 + if (ratioDiff > 0.1) {
3702 + return removeAspectRatioClasses(existingClassNames);
3703 + }
3704 + return dist_clsx(
3705 + removeAspectRatioClasses(existingClassNames),
3706 + potentialRatio.className,
3707 + "wp-has-aspect-ratio"
3708 + );
3709 + }
3710 + }
3711 + }
3712 + return existingClassNames;
3713 + }
3714 + function fallback(url, onReplace) {
3715 + const link = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("a", { href: url, children: url });
3716 + onReplace(
3717 + (0,external_wp_blocks_namespaceObject.createBlock)("core/paragraph", { content: (0,external_wp_element_namespaceObject.renderToString)(link) })
3718 + );
3719 + }
3720 + const getAttributesFromPreview = memize(
3721 + (preview, title, currentClassNames, isResponsive, allowResponsive = true) => {
3722 + if (!preview) {
3723 + return {};
3724 + }
3725 + const attributes = {};
3726 + let { type = "rich" } = preview;
3727 + const { html, provider_name: providerName } = preview;
3728 + const providerNameSlug = kebabCase(
3729 + (providerName || title).toLowerCase()
3730 + );
3731 + if (isFromWordPress(html)) {
3732 + type = WP_EMBED_TYPE;
3733 + }
3734 + if (html || "photo" === type) {
3735 + attributes.type = type;
3736 + attributes.providerNameSlug = providerNameSlug;
3737 + }
3738 + if (hasAspectRatioClass(currentClassNames)) {
3739 + return attributes;
3740 + }
3741 + attributes.className = getClassNames(
3742 + html,
3743 + currentClassNames,
3744 + isResponsive && allowResponsive
3745 + );
3746 + return attributes;
3747 + }
3748 + );
3749 + const getMergedAttributesWithPreview = (currentAttributes, preview, title, isResponsive) => {
3750 + const { allowResponsive, className } = currentAttributes;
3751 + return {
3752 + ...currentAttributes,
3753 + ...getAttributesFromPreview(
3754 + preview,
3755 + title,
3756 + className,
3757 + isResponsive,
3758 + allowResponsive
3759 + )
3760 + };
3761 + };
3762 +
3763 +
3764 + ;// ./node_modules/@wordpress/icons/build-module/library/caption.js
3765 +
3766 +
3767 + var caption_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
3768 + external_wp_primitives_namespaceObject.Path,
3769 + {
3770 + fillRule: "evenodd",
3771 + clipRule: "evenodd",
3772 + d: "M6 5.5h12a.5.5 0 0 1 .5.5v12a.5.5 0 0 1-.5.5H6a.5.5 0 0 1-.5-.5V6a.5.5 0 0 1 .5-.5ZM4 6a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6Zm4 10h2v-1.5H8V16Zm5 0h-2v-1.5h2V16Zm1 0h2v-1.5h-2V16Z"
3773 + }
3774 + ) });
3775 +
3776 +
3777 + ;// ./node_modules/@wordpress/block-library/build-module/utils/caption.js
3778 +
3779 +
3780 +
3781 +
3782 +
3783 +
3784 +
3785 +
3786 +
3787 +
3788 + function Caption({
3789 + attributeKey = "caption",
3790 + attributes,
3791 + setAttributes,
3792 + isSelected,
3793 + insertBlocksAfter,
3794 + placeholder = (0,external_wp_i18n_namespaceObject.__)("Add caption"),
3795 + label = (0,external_wp_i18n_namespaceObject.__)("Caption text"),
3796 + showToolbarButton = true,
3797 + excludeElementClassName,
3798 + className,
3799 + readOnly,
3800 + tagName = "figcaption",
3801 + addLabel = (0,external_wp_i18n_namespaceObject.__)("Add caption"),
3802 + removeLabel = (0,external_wp_i18n_namespaceObject.__)("Remove caption"),
3803 + icon = caption_default,
3804 + ...props
3805 + }) {
3806 + const caption = attributes[attributeKey];
3807 + const prevCaption = (0,external_wp_compose_namespaceObject.usePrevious)(caption);
3808 + const { PrivateRichText: RichText } = unlock(external_wp_blockEditor_namespaceObject.privateApis);
3809 + const isCaptionEmpty = RichText.isEmpty(caption);
3810 + const isPrevCaptionEmpty = RichText.isEmpty(prevCaption);
3811 + const [showCaption, setShowCaption] = (0,external_wp_element_namespaceObject.useState)(!isCaptionEmpty);
3812 + (0,external_wp_element_namespaceObject.useEffect)(() => {
3813 + if (!isCaptionEmpty && isPrevCaptionEmpty) {
3814 + setShowCaption(true);
3815 + }
3816 + }, [isCaptionEmpty, isPrevCaptionEmpty]);
3817 + (0,external_wp_element_namespaceObject.useEffect)(() => {
3818 + if (!isSelected && isCaptionEmpty) {
3819 + setShowCaption(false);
3820 + }
3821 + }, [isSelected, isCaptionEmpty]);
3822 + const ref = (0,external_wp_element_namespaceObject.useCallback)(
3823 + (node) => {
3824 + if (node && isCaptionEmpty) {
3825 + node.focus();
3826 + }
3827 + },
3828 + [isCaptionEmpty]
3829 + );
3830 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
3831 + showToolbarButton && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockControls, { group: "block", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
3832 + external_wp_components_namespaceObject.ToolbarButton,
3833 + {
3834 + onClick: () => {
3835 + setShowCaption(!showCaption);
3836 + if (showCaption && caption) {
3837 + setAttributes({
3838 + [attributeKey]: void 0
3839 + });
3840 + }
3841 + },
3842 + icon,
3843 + isPressed: showCaption,
3844 + label: showCaption ? removeLabel : addLabel
3845 + }
3846 + ) }),
3847 + showCaption && (!RichText.isEmpty(caption) || isSelected) && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
3848 + RichText,
3849 + {
3850 + identifier: attributeKey,
3851 + tagName,
3852 + className: dist_clsx(
3853 + className,
3854 + excludeElementClassName ? "" : (0,external_wp_blockEditor_namespaceObject.__experimentalGetElementClassName)("caption")
3855 + ),
3856 + ref,
3857 + "aria-label": label,
3858 + placeholder,
3859 + value: caption,
3860 + onChange: (value) => setAttributes({ [attributeKey]: value }),
3861 + inlineToolbar: true,
3862 + __unstableOnSplitAtEnd: () => insertBlocksAfter(
3863 + (0,external_wp_blocks_namespaceObject.createBlock)((0,external_wp_blocks_namespaceObject.getDefaultBlockName)())
3864 + ),
3865 + readOnly,
3866 + ...props
3867 + }
3868 + )
3869 + ] });
3870 + }
3871 +
3872 +
3873 + ;// ./node_modules/@wordpress/block-library/build-module/audio/edit.js
3874 +
3875 +
3876 +
3877 +
3878 +
3879 +
3880 +
3881 +
3882 +
3883 +
3884 +
3885 +
3886 +
3887 + const ALLOWED_MEDIA_TYPES = ["audio"];
3888 + function AudioEdit({
3889 + attributes,
3890 + className,
3891 + setAttributes,
3892 + onReplace,
3893 + isSelected: isSingleSelected,
3894 + insertBlocksAfter
3895 + }) {
3896 + const { id, autoplay, loop, preload, src } = attributes;
3897 + const [temporaryURL, setTemporaryURL] = (0,external_wp_element_namespaceObject.useState)(attributes.blob);
3898 + const blockEditingMode = (0,external_wp_blockEditor_namespaceObject.useBlockEditingMode)();
3899 + const hasNonContentControls = blockEditingMode === "default";
3900 + useUploadMediaFromBlobURL({
3901 + url: temporaryURL,
3902 + allowedTypes: ALLOWED_MEDIA_TYPES,
3903 + onChange: onSelectAudio,
3904 + onError: onUploadError
3905 + });
3906 + function toggleAttribute(attribute) {
3907 + return (newValue) => {
3908 + setAttributes({ [attribute]: newValue });
3909 + };
3910 + }
3911 + function onSelectURL(newSrc) {
3912 + if (newSrc !== src) {
3913 + const embedBlock = createUpgradedEmbedBlock({
3914 + attributes: { url: newSrc }
3915 + });
3916 + if (void 0 !== embedBlock && onReplace) {
3917 + onReplace(embedBlock);
3918 + return;
3919 + }
3920 + setAttributes({ src: newSrc, id: void 0, blob: void 0 });
3921 + setTemporaryURL();
3922 + }
3923 + }
3924 + const { createErrorNotice } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_notices_namespaceObject.store);
3925 + function onUploadError(message) {
3926 + createErrorNotice(message, { type: "snackbar" });
3927 + }
3928 + function getAutoplayHelp(checked) {
3929 + return checked ? (0,external_wp_i18n_namespaceObject.__)("Autoplay may cause usability issues for some users.") : null;
3930 + }
3931 + function onSelectAudio(media) {
3932 + if (!media || !media.url) {
3933 + setAttributes({
3934 + src: void 0,
3935 + id: void 0,
3936 + caption: void 0,
3937 + blob: void 0
3938 + });
3939 + setTemporaryURL();
3940 + return;
3941 + }
3942 + if ((0,external_wp_blob_namespaceObject.isBlobURL)(media.url)) {
3943 + setTemporaryURL(media.url);
3944 + return;
3945 + }
3946 + setAttributes({
3947 + blob: void 0,
3948 + src: media.url,
3949 + id: media.id,
3950 + caption: media.caption
3951 + });
3952 + setTemporaryURL();
3953 + }
3954 + const classes = dist_clsx(className, {
3955 + "is-transient": !!temporaryURL
3956 + });
3957 + const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)({
3958 + className: classes
3959 + });
3960 + const dropdownMenuProps = useToolsPanelDropdownMenuProps();
3961 + if (!src && !temporaryURL) {
3962 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { ...blockProps, children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
3963 + external_wp_blockEditor_namespaceObject.MediaPlaceholder,
3964 + {
3965 + icon: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockIcon, { icon: audio_default }),
3966 + onSelect: onSelectAudio,
3967 + onSelectURL,
3968 + accept: "audio/*",
3969 + allowedTypes: ALLOWED_MEDIA_TYPES,
3970 + value: attributes,
3971 + onError: onUploadError
3972 + }
3973 + ) });
3974 + }
3975 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
3976 + isSingleSelected && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockControls, { group: "other", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
3977 + external_wp_blockEditor_namespaceObject.MediaReplaceFlow,
3978 + {
3979 + mediaId: id,
3980 + mediaURL: src,
3981 + allowedTypes: ALLOWED_MEDIA_TYPES,
3982 + accept: "audio/*",
3983 + onSelect: onSelectAudio,
3984 + onSelectURL,
3985 + onError: onUploadError,
3986 + onReset: () => onSelectAudio(void 0)
3987 + }
3988 + ) }),
3989 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(
3990 + external_wp_components_namespaceObject.__experimentalToolsPanel,
3991 + {
3992 + label: (0,external_wp_i18n_namespaceObject.__)("Settings"),
3993 + resetAll: () => {
3994 + setAttributes({
3995 + autoplay: false,
3996 + loop: false,
3997 + preload: void 0
3998 + });
3999 + },
4000 + dropdownMenuProps,
4001 + children: [
4002 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
4003 + external_wp_components_namespaceObject.__experimentalToolsPanelItem,
4004 + {
4005 + label: (0,external_wp_i18n_namespaceObject.__)("Autoplay"),
4006 + isShownByDefault: true,
4007 + hasValue: () => !!autoplay,
4008 + onDeselect: () => setAttributes({
4009 + autoplay: false
4010 + }),
4011 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
4012 + external_wp_components_namespaceObject.ToggleControl,
4013 + {
4014 + __nextHasNoMarginBottom: true,
4015 + label: (0,external_wp_i18n_namespaceObject.__)("Autoplay"),
4016 + onChange: toggleAttribute("autoplay"),
4017 + checked: !!autoplay,
4018 + help: getAutoplayHelp
4019 + }
4020 + )
4021 + }
4022 + ),
4023 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
4024 + external_wp_components_namespaceObject.__experimentalToolsPanelItem,
4025 + {
4026 + label: (0,external_wp_i18n_namespaceObject.__)("Loop"),
4027 + isShownByDefault: true,
4028 + hasValue: () => !!loop,
4029 + onDeselect: () => setAttributes({
4030 + loop: false
4031 + }),
4032 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
4033 + external_wp_components_namespaceObject.ToggleControl,
4034 + {
4035 + __nextHasNoMarginBottom: true,
4036 + label: (0,external_wp_i18n_namespaceObject.__)("Loop"),
4037 + onChange: toggleAttribute("loop"),
4038 + checked: !!loop
4039 + }
4040 + )
4041 + }
4042 + ),
4043 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
4044 + external_wp_components_namespaceObject.__experimentalToolsPanelItem,
4045 + {
4046 + label: (0,external_wp_i18n_namespaceObject.__)("Preload"),
4047 + isShownByDefault: true,
4048 + hasValue: () => !!preload,
4049 + onDeselect: () => setAttributes({
4050 + preload: void 0
4051 + }),
4052 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
4053 + external_wp_components_namespaceObject.SelectControl,
4054 + {
4055 + __next40pxDefaultSize: true,
4056 + __nextHasNoMarginBottom: true,
4057 + label: (0,external_wp_i18n_namespaceObject._x)(
4058 + "Preload",
4059 + "noun; Audio block parameter"
4060 + ),
4061 + value: preload || "",
4062 + onChange: (value) => setAttributes({
4063 + preload: value || void 0
4064 + }),
4065 + options: [
4066 + { value: "", label: (0,external_wp_i18n_namespaceObject.__)("Browser default") },
4067 + { value: "auto", label: (0,external_wp_i18n_namespaceObject.__)("Auto") },
4068 + { value: "metadata", label: (0,external_wp_i18n_namespaceObject.__)("Metadata") },
4069 + {
4070 + value: "none",
4071 + label: (0,external_wp_i18n_namespaceObject._x)("None", "Preload value")
4072 + }
4073 + ]
4074 + }
4075 + )
4076 + }
4077 + )
4078 + ]
4079 + }
4080 + ) }),
4081 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("figure", { ...blockProps, children: [
4082 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Disabled, { isDisabled: !isSingleSelected, children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("audio", { controls: "controls", src: src ?? temporaryURL }) }),
4083 + !!temporaryURL && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Spinner, {}),
4084 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
4085 + Caption,
4086 + {
4087 + attributes,
4088 + setAttributes,
4089 + isSelected: isSingleSelected,
4090 + insertBlocksAfter,
4091 + label: (0,external_wp_i18n_namespaceObject.__)("Audio caption text"),
4092 + showToolbarButton: isSingleSelected && hasNonContentControls
4093 + }
4094 + )
4095 + ] })
4096 + ] });
4097 + }
4098 + var edit_default = AudioEdit;
4099 +
4100 +
4101 + ;// ./node_modules/@wordpress/block-library/build-module/audio/block.json
4102 + const audio_block_namespaceObject = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/audio","title":"Audio","category":"media","description":"Embed a simple audio player.","keywords":["music","sound","podcast","recording"],"textdomain":"default","attributes":{"blob":{"type":"string","role":"local"},"src":{"type":"string","source":"attribute","selector":"audio","attribute":"src","role":"content"},"caption":{"type":"rich-text","source":"rich-text","selector":"figcaption","role":"content"},"id":{"type":"number","role":"content"},"autoplay":{"type":"boolean","source":"attribute","selector":"audio","attribute":"autoplay"},"loop":{"type":"boolean","source":"attribute","selector":"audio","attribute":"loop"},"preload":{"type":"string","source":"attribute","selector":"audio","attribute":"preload"}},"supports":{"anchor":true,"align":true,"spacing":{"margin":true,"padding":true,"__experimentalDefaultControls":{"margin":false,"padding":false}},"interactivity":{"clientNavigation":true}},"editorStyle":"wp-block-audio-editor","style":"wp-block-audio"}');
4103 + ;// ./node_modules/@wordpress/block-library/build-module/audio/save.js
4104 +
4105 +
4106 + function audio_save_save({ attributes }) {
4107 + const { autoplay, caption, loop, preload, src } = attributes;
4108 + return src && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("figure", { ...external_wp_blockEditor_namespaceObject.useBlockProps.save(), children: [
4109 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
4110 + "audio",
4111 + {
4112 + controls: "controls",
4113 + src,
4114 + autoPlay: autoplay,
4115 + loop,
4116 + preload
4117 + }
4118 + ),
4119 + !external_wp_blockEditor_namespaceObject.RichText.isEmpty(caption) && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
4120 + external_wp_blockEditor_namespaceObject.RichText.Content,
4121 + {
4122 + tagName: "figcaption",
4123 + value: caption,
4124 + className: (0,external_wp_blockEditor_namespaceObject.__experimentalGetElementClassName)(
4125 + "caption"
4126 + )
4127 + }
4128 + )
4129 + ] });
4130 + }
4131 +
4132 +
4133 + ;// ./node_modules/@wordpress/block-library/build-module/audio/transforms.js
4134 +
4135 +
4136 + const transforms = {
4137 + from: [
4138 + {
4139 + type: "files",
4140 + isMatch(files) {
4141 + return files.length === 1 && files[0].type.indexOf("audio/") === 0;
4142 + },
4143 + transform(files) {
4144 + const file = files[0];
4145 + const block = (0,external_wp_blocks_namespaceObject.createBlock)("core/audio", {
4146 + blob: (0,external_wp_blob_namespaceObject.createBlobURL)(file)
4147 + });
4148 + return block;
4149 + }
4150 + },
4151 + {
4152 + type: "shortcode",
4153 + tag: "audio",
4154 + attributes: {
4155 + src: {
4156 + type: "string",
4157 + shortcode: ({
4158 + named: { src, mp3, m4a, ogg, wav, wma }
4159 + }) => {
4160 + return src || mp3 || m4a || ogg || wav || wma;
4161 + }
4162 + },
4163 + loop: {
4164 + type: "string",
4165 + shortcode: ({ named: { loop } }) => {
4166 + return loop;
4167 + }
4168 + },
4169 + autoplay: {
4170 + type: "string",
4171 + shortcode: ({ named: { autoplay } }) => {
4172 + return autoplay;
4173 + }
4174 + },
4175 + preload: {
4176 + type: "string",
4177 + shortcode: ({ named: { preload } }) => {
4178 + return preload;
4179 + }
4180 + }
4181 + }
4182 + }
4183 + ]
4184 + };
4185 + var transforms_default = transforms;
4186 +
4187 +
4188 + ;// ./node_modules/@wordpress/block-library/build-module/audio/index.js
4189 +
4190 +
4191 +
4192 +
4193 +
4194 +
4195 +
4196 + const { name: audio_name } = audio_block_namespaceObject;
4197 + const audio_settings = {
4198 + icon: audio_default,
4199 + example: {
4200 + attributes: {
4201 + src: "https://upload.wikimedia.org/wikipedia/commons/d/dd/Armstrong_Small_Step.ogg"
4202 + },
4203 + viewportWidth: 350
4204 + },
4205 + transforms: transforms_default,
4206 + deprecated: deprecated_deprecated_default,
4207 + edit: edit_default,
4208 + save: audio_save_save
4209 + };
4210 + const audio_init = () => initBlock({ name: audio_name, metadata: audio_block_namespaceObject, settings: audio_settings });
4211 +
4212 +
4213 + ;// ./node_modules/@wordpress/icons/build-module/library/breadcrumbs.js
4214 +
4215 +
4216 + var breadcrumbs_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M4 13.5h3v-3H4v3Zm6-3.5 2 2-2 2 1 1 3-3-3-3-1 1Zm7 .5v3h3v-3h-3Z" }) });
4217 +
4218 +
4219 + ;// ./node_modules/@wordpress/block-library/build-module/breadcrumbs/block.json
4220 + const breadcrumbs_block_namespaceObject = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/breadcrumbs","title":"Breadcrumbs","__experimental":true,"category":"theme","description":"Display a breadcrumb trail for hierarchical post types or based on taxonomy terms.","textdomain":"default","attributes":{"type":{"type":"string","default":"auto","enum":["auto","postWithTerms","postWithAncestors"]},"separator":{"type":"string","default":"/"},"showHomeLink":{"type":"boolean","default":true}},"usesContext":["postId","postType","templateSlug"],"supports":{"html":false,"spacing":{"margin":true,"padding":true},"color":{"gradients":true,"link":true,"__experimentalDefaultControls":{"background":true,"text":true}},"__experimentalBorder":{"radius":true,"color":true,"width":true,"style":true,"__experimentalDefaultControls":{"radius":false,"color":true,"width":true,"style":true}},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"interactivity":{"clientNavigation":true}},"style":"wp-block-breadcrumbs"}');
4221 + ;// ./node_modules/@wordpress/block-library/build-module/breadcrumbs/edit.js
4222 +
4223 +
4224 +
4225 +
4226 +
4227 +
4228 +
4229 +
4230 +
4231 + const separatorDefaultValue = "/";
4232 + const typeDefaultValue = "auto";
4233 + const BREADCRUMB_TYPES = {
4234 + auto: {
4235 + help: (0,external_wp_i18n_namespaceObject.__)(
4236 + "Try to automatically determine the best type of breadcrumb for the template."
4237 + )
4238 + },
4239 + postWithAncestors: {
4240 + help: (0,external_wp_i18n_namespaceObject.__)(
4241 + "Shows breadcrumbs based on post hierarchy. Only works for hierarchical post types."
4242 + ),
4243 + placeholderItems: [(0,external_wp_i18n_namespaceObject.__)("Ancestor"), (0,external_wp_i18n_namespaceObject.__)("Parent")]
4244 + },
4245 + postWithTerms: {
4246 + help: (0,external_wp_i18n_namespaceObject.__)(
4247 + "Shows breadcrumbs based on taxonomy terms. Chooses the first taxonomy with assigned terms and includes ancestors if the taxonomy is hierarchical."
4248 + ),
4249 + placeholderItems: [(0,external_wp_i18n_namespaceObject.__)("Category")]
4250 + }
4251 + };
4252 + function BreadcrumbEdit({
4253 + attributes,
4254 + setAttributes,
4255 + context: { postId, postType, templateSlug }
4256 + }) {
4257 + const { separator, showHomeLink, type } = attributes;
4258 + const { post, isPostTypeHierarchical, hasTermsAssigned, isLoading } = (0,external_wp_data_namespaceObject.useSelect)(
4259 + (select) => {
4260 + if (!postType) {
4261 + return {};
4262 + }
4263 + const _post = select(external_wp_coreData_namespaceObject.store).getEntityRecord(
4264 + "postType",
4265 + postType,
4266 + postId
4267 + );
4268 + const postTypeObject = select(external_wp_coreData_namespaceObject.store).getPostType(postType);
4269 + const postTypeHasTaxonomies = postTypeObject && postTypeObject.taxonomies.length;
4270 + let taxonomies;
4271 + if (postTypeHasTaxonomies) {
4272 + taxonomies = select(external_wp_coreData_namespaceObject.store).getTaxonomies({
4273 + type: postType,
4274 + per_page: -1
4275 + });
4276 + }
4277 + return {
4278 + post: _post,
4279 + isPostTypeHierarchical: postTypeObject?.hierarchical,
4280 + hasTermsAssigned: _post && (taxonomies || []).filter(
4281 + ({ visibility }) => visibility?.publicly_queryable
4282 + ).some((taxonomy) => {
4283 + return !!_post[taxonomy.rest_base]?.length;
4284 + }),
4285 + isLoading: !_post || !postTypeObject || postTypeHasTaxonomies && !taxonomies
4286 + };
4287 + },
4288 + [postType, postId]
4289 + );
4290 + const [invalidationKey, setInvalidationKey] = (0,external_wp_element_namespaceObject.useState)(0);
4291 + (0,external_wp_element_namespaceObject.useEffect)(() => {
4292 + setInvalidationKey((c) => c + 1);
4293 + }, [post]);
4294 + const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)();
4295 + const dropdownMenuProps = useToolsPanelDropdownMenuProps();
4296 + const { content } = (0,external_wp_serverSideRender_namespaceObject.useServerSideRender)({
4297 + attributes,
4298 + skipBlockSupportAttributes: true,
4299 + block: "core/breadcrumbs",
4300 + urlQueryArgs: { post_id: postId, invalidationKey }
4301 + });
4302 + if (isLoading) {
4303 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { ...blockProps, children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Spinner, {}) });
4304 + }
4305 + let breadcrumbsType;
4306 + const isSpecificSupportedTypeSet = [
4307 + "postWithAncestors",
4308 + "postWithTerms"
4309 + ].includes(type);
4310 + if (isSpecificSupportedTypeSet) {
4311 + breadcrumbsType = type;
4312 + } else {
4313 + breadcrumbsType = isPostTypeHierarchical ? "postWithAncestors" : "postWithTerms";
4314 + }
4315 + let placeholder = null;
4316 + const showPlaceholder = !postId || !postType || // When `templateSlug` is set only show placeholder if the post type is not.
4317 + // This is needed because when we are showing the template in post editor we
4318 + // want to show the real breadcrumbs if we have the post type.
4319 + templateSlug && !postType || breadcrumbsType === "postWithAncestors" && !isPostTypeHierarchical || breadcrumbsType === "postWithTerms" && !hasTermsAssigned;
4320 + if (showPlaceholder) {
4321 + const placeholderItems = [
4322 + showHomeLink && (0,external_wp_i18n_namespaceObject.__)("Home"),
4323 + // For now if we are adding this in a template show a generic placeholder.
4324 + ...templateSlug && !isSpecificSupportedTypeSet ? [(0,external_wp_i18n_namespaceObject.__)("Page")] : BREADCRUMB_TYPES[breadcrumbsType].placeholderItems
4325 + ].filter(Boolean);
4326 + placeholder = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
4327 + "nav",
4328 + {
4329 + style: {
4330 + "--separator": `'${separator}'`
4331 + },
4332 + inert: "true",
4333 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("ol", { children: [
4334 + placeholderItems.map((text, index) => /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("li", { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("a", { href: `#breadcrumbs-pseudo-link-${index}`, children: text }) }, index)),
4335 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("li", { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("span", { "aria-current": "page", children: (0,external_wp_i18n_namespaceObject.__)("Current") }) })
4336 + ] })
4337 + }
4338 + );
4339 + }
4340 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
4341 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(
4342 + external_wp_components_namespaceObject.__experimentalToolsPanel,
4343 + {
4344 + label: (0,external_wp_i18n_namespaceObject.__)("Settings"),
4345 + resetAll: () => {
4346 + setAttributes({
4347 + separator: separatorDefaultValue,
4348 + showHomeLink: true,
4349 + type: typeDefaultValue
4350 + });
4351 + },
4352 + dropdownMenuProps,
4353 + children: [
4354 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
4355 + external_wp_components_namespaceObject.__experimentalToolsPanelItem,
4356 + {
4357 + label: (0,external_wp_i18n_namespaceObject.__)("Type"),
4358 + isShownByDefault: true,
4359 + hasValue: () => type !== typeDefaultValue,
4360 + onDeselect: () => setAttributes({
4361 + type: typeDefaultValue
4362 + }),
4363 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
4364 + external_wp_components_namespaceObject.SelectControl,
4365 + {
4366 + __nextHasNoMarginBottom: true,
4367 + __next40pxDefaultSize: true,
4368 + label: (0,external_wp_i18n_namespaceObject.__)("Type"),
4369 + value: type,
4370 + onChange: (value) => setAttributes({ type: value }),
4371 + options: [
4372 + {
4373 + label: (0,external_wp_i18n_namespaceObject.__)("Auto"),
4374 + value: "auto"
4375 + },
4376 + {
4377 + label: (0,external_wp_i18n_namespaceObject.__)("Post with ancestors"),
4378 + value: "postWithAncestors"
4379 + },
4380 + {
4381 + label: (0,external_wp_i18n_namespaceObject.__)("Post with terms"),
4382 + value: "postWithTerms"
4383 + }
4384 + ],
4385 + help: BREADCRUMB_TYPES[type].help
4386 + }
4387 + )
4388 + }
4389 + ),
4390 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
4391 + external_wp_components_namespaceObject.__experimentalToolsPanelItem,
4392 + {
4393 + label: (0,external_wp_i18n_namespaceObject.__)("Show home link"),
4394 + isShownByDefault: true,
4395 + hasValue: () => !showHomeLink,
4396 + onDeselect: () => setAttributes({
4397 + showHomeLink: true
4398 + }),
4399 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
4400 + external_wp_components_namespaceObject.ToggleControl,
4401 + {
4402 + __nextHasNoMarginBottom: true,
4403 + label: (0,external_wp_i18n_namespaceObject.__)("Show home link"),
4404 + onChange: (value) => setAttributes({ showHomeLink: value }),
4405 + checked: showHomeLink
4406 + }
4407 + )
4408 + }
4409 + ),
4410 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
4411 + external_wp_components_namespaceObject.__experimentalToolsPanelItem,
4412 + {
4413 + label: (0,external_wp_i18n_namespaceObject.__)("Separator"),
4414 + isShownByDefault: true,
4415 + hasValue: () => separator !== separatorDefaultValue,
4416 + onDeselect: () => setAttributes({
4417 + separator: separatorDefaultValue
4418 + }),
4419 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
4420 + external_wp_components_namespaceObject.TextControl,
4421 + {
4422 + __nextHasNoMarginBottom: true,
4423 + __next40pxDefaultSize: true,
4424 + autoComplete: "off",
4425 + label: (0,external_wp_i18n_namespaceObject.__)("Separator"),
4426 + value: separator,
4427 + onChange: (value) => setAttributes({ separator: value }),
4428 + onBlur: () => {
4429 + if (!separator) {
4430 + setAttributes({
4431 + separator: separatorDefaultValue
4432 + });
4433 + }
4434 + }
4435 + }
4436 + )
4437 + }
4438 + )
4439 + ]
4440 + }
4441 + ) }),
4442 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { ...blockProps, children: showPlaceholder ? placeholder : /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_element_namespaceObject.RawHTML, { inert: "true", children: content }) })
4443 + ] });
4444 + }
4445 +
4446 +
4447 + ;// ./node_modules/@wordpress/block-library/build-module/breadcrumbs/index.js
4448 +
4449 +
4450 +
4451 +
4452 + const { name: breadcrumbs_name } = breadcrumbs_block_namespaceObject;
4453 + const breadcrumbs_settings = {
4454 + icon: breadcrumbs_default,
4455 + edit: BreadcrumbEdit
4456 + };
4457 + const breadcrumbs_init = () => initBlock({ name: breadcrumbs_name, metadata: breadcrumbs_block_namespaceObject, settings: breadcrumbs_settings });
4458 +
4459 +
4460 + ;// ./node_modules/@wordpress/icons/build-module/library/button.js
4461 +
4462 +
4463 + var button_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M8 12.5h8V11H8v1.5Z M19 6.5H5a2 2 0 0 0-2 2V15a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V8.5a2 2 0 0 0-2-2ZM5 8h14a.5.5 0 0 1 .5.5V15a.5.5 0 0 1-.5.5H5a.5.5 0 0 1-.5-.5V8.5A.5.5 0 0 1 5 8Z" }) });
4464 +
4465 +
4466 + ;// ./node_modules/@wordpress/block-library/build-module/utils/migrate-font-family.js
4467 +
4468 +
4469 + const { cleanEmptyObject } = unlock(external_wp_blockEditor_namespaceObject.privateApis);
4470 + function migrate_font_family_default(attributes) {
4471 + if (!attributes?.style?.typography?.fontFamily) {
4472 + return attributes;
4473 + }
4474 + const { fontFamily, ...typography } = attributes.style.typography;
4475 + return {
4476 + ...attributes,
4477 + style: cleanEmptyObject({
4478 + ...attributes.style,
4479 + typography
4480 + }),
4481 + fontFamily: fontFamily.split("|").pop()
4482 + };
4483 + }
4484 +
4485 +
4486 + ;// ./node_modules/@wordpress/block-library/build-module/button/deprecated.js
4487 +
4488 +
4489 +
4490 +
4491 +
4492 + const migrateBorderRadius = (attributes) => {
4493 + const { borderRadius, ...newAttributes } = attributes;
4494 + const oldBorderRadius = [
4495 + borderRadius,
4496 + newAttributes.style?.border?.radius
4497 + ].find((possibleBorderRadius) => {
4498 + return typeof possibleBorderRadius === "number" && possibleBorderRadius !== 0;
4499 + });
4500 + if (!oldBorderRadius) {
4501 + return newAttributes;
4502 + }
4503 + return {
4504 + ...newAttributes,
4505 + style: {
4506 + ...newAttributes.style,
4507 + border: {
4508 + ...newAttributes.style?.border,
4509 + radius: `${oldBorderRadius}px`
4510 + }
4511 + }
4512 + };
4513 + };
4514 + function migrateAlign(attributes) {
4515 + if (!attributes.align) {
4516 + return attributes;
4517 + }
4518 + const { align, ...otherAttributes } = attributes;
4519 + return {
4520 + ...otherAttributes,
4521 + className: dist_clsx(
4522 + otherAttributes.className,
4523 + `align${attributes.align}`
4524 + )
4525 + };
4526 + }
4527 + const migrateCustomColorsAndGradients = (attributes) => {
4528 + if (!attributes.customTextColor && !attributes.customBackgroundColor && !attributes.customGradient) {
4529 + return attributes;
4530 + }
4531 + const style = { color: {} };
4532 + if (attributes.customTextColor) {
4533 + style.color.text = attributes.customTextColor;
4534 + }
4535 + if (attributes.customBackgroundColor) {
4536 + style.color.background = attributes.customBackgroundColor;
4537 + }
4538 + if (attributes.customGradient) {
4539 + style.color.gradient = attributes.customGradient;
4540 + }
4541 + const {
4542 + customTextColor,
4543 + customBackgroundColor,
4544 + customGradient,
4545 + ...restAttributes
4546 + } = attributes;
4547 + return {
4548 + ...restAttributes,
4549 + style
4550 + };
4551 + };
4552 + const oldColorsMigration = (attributes) => {
4553 + const { color, textColor, ...restAttributes } = {
4554 + ...attributes,
4555 + customTextColor: attributes.textColor && "#" === attributes.textColor[0] ? attributes.textColor : void 0,
4556 + customBackgroundColor: attributes.color && "#" === attributes.color[0] ? attributes.color : void 0
4557 + };
4558 + return migrateCustomColorsAndGradients(restAttributes);
4559 + };
4560 + const blockAttributes = {
4561 + url: {
4562 + type: "string",
4563 + source: "attribute",
4564 + selector: "a",
4565 + attribute: "href"
4566 + },
4567 + title: {
4568 + type: "string",
4569 + source: "attribute",
4570 + selector: "a",
4571 + attribute: "title"
4572 + },
4573 + text: {
4574 + type: "string",
4575 + source: "html",
4576 + selector: "a"
4577 + }
4578 + };
4579 + const v12 = {
4580 + attributes: {
4581 + tagName: {
4582 + type: "string",
4583 + enum: ["a", "button"],
4584 + default: "a"
4585 + },
4586 + type: {
4587 + type: "string",
4588 + default: "button"
4589 + },
4590 + textAlign: {
4591 + type: "string"
4592 + },
4593 + url: {
4594 + type: "string",
4595 + source: "attribute",
4596 + selector: "a",
4597 + attribute: "href"
4598 + },
4599 + title: {
4600 + type: "string",
4601 + source: "attribute",
4602 + selector: "a,button",
4603 + attribute: "title",
4604 + role: "content"
4605 + },
4606 + text: {
4607 + type: "rich-text",
4608 + source: "rich-text",
4609 + selector: "a,button",
4610 + role: "content"
4611 + },
4612 + linkTarget: {
4613 + type: "string",
4614 + source: "attribute",
4615 + selector: "a",
4616 + attribute: "target",
4617 + role: "content"
4618 + },
4619 + rel: {
4620 + type: "string",
4621 + source: "attribute",
4622 + selector: "a",
4623 + attribute: "rel",
4624 + role: "content"
4625 + },
4626 + placeholder: {
4627 + type: "string"
4628 + },
4629 + backgroundColor: {
4630 + type: "string"
4631 + },
4632 + textColor: {
4633 + type: "string"
4634 + },
4635 + gradient: {
4636 + type: "string"
4637 + },
4638 + width: {
4639 + type: "number"
4640 + }
4641 + },
4642 + supports: {
4643 + anchor: true,
4644 + align: true,
4645 + alignWide: false,
4646 + color: {
4647 + __experimentalSkipSerialization: true,
4648 + gradients: true,
4649 + __experimentalDefaultControls: {
4650 + background: true,
4651 + text: true
4652 + }
4653 + },
4654 + typography: {
4655 + fontSize: true,
4656 + lineHeight: true,
4657 + __experimentalFontFamily: true,
4658 + __experimentalFontWeight: true,
4659 + __experimentalFontStyle: true,
4660 + __experimentalTextTransform: true,
4661 + __experimentalTextDecoration: true,
4662 + __experimentalLetterSpacing: true,
4663 + __experimentalWritingMode: true,
4664 + __experimentalDefaultControls: {
4665 + fontSize: true
4666 + }
4667 + },
4668 + reusable: false,
4669 + shadow: {
4670 + __experimentalSkipSerialization: true
4671 + },
4672 + spacing: {
4673 + __experimentalSkipSerialization: true,
4674 + padding: ["horizontal", "vertical"],
4675 + __experimentalDefaultControls: {
4676 + padding: true
4677 + }
4678 + },
4679 + __experimentalBorder: {
4680 + color: true,
4681 + radius: true,
4682 + style: true,
4683 + width: true,
4684 + __experimentalSkipSerialization: true,
4685 + __experimentalDefaultControls: {
4686 + color: true,
4687 + radius: true,
4688 + style: true,
4689 + width: true
4690 + }
4691 + },
4692 + __experimentalSelector: ".wp-block-button__link",
4693 + interactivity: {
4694 + clientNavigation: true
4695 + }
4696 + },
4697 + save({ attributes, className }) {
4698 + const {
4699 + tagName,
4700 + type,
4701 + textAlign,
4702 + fontSize,
4703 + linkTarget,
4704 + rel,
4705 + style,
4706 + text,
4707 + title,
4708 + url,
4709 + width
4710 + } = attributes;
4711 + const TagName = tagName || "a";
4712 + const isButtonTag = "button" === TagName;
4713 + const buttonType = type || "button";
4714 + const borderProps = (0,external_wp_blockEditor_namespaceObject.__experimentalGetBorderClassesAndStyles)(attributes);
4715 + const colorProps = (0,external_wp_blockEditor_namespaceObject.__experimentalGetColorClassesAndStyles)(attributes);
4716 + const spacingProps = (0,external_wp_blockEditor_namespaceObject.__experimentalGetSpacingClassesAndStyles)(attributes);
4717 + const shadowProps = (0,external_wp_blockEditor_namespaceObject.__experimentalGetShadowClassesAndStyles)(attributes);
4718 + const buttonClasses = dist_clsx(
4719 + "wp-block-button__link",
4720 + colorProps.className,
4721 + borderProps.className,
4722 + {
4723 + [`has-text-align-${textAlign}`]: textAlign,
4724 + // For backwards compatibility add style that isn't provided via
4725 + // block support.
4726 + "no-border-radius": style?.border?.radius === 0
4727 + },
4728 + (0,external_wp_blockEditor_namespaceObject.__experimentalGetElementClassName)("button")
4729 + );
4730 + const buttonStyle = {
4731 + ...borderProps.style,
4732 + ...colorProps.style,
4733 + ...spacingProps.style,
4734 + ...shadowProps.style
4735 + };
4736 + const wrapperClasses = dist_clsx(className, {
4737 + [`has-custom-width wp-block-button__width-${width}`]: width,
4738 + [`has-custom-font-size`]: fontSize || style?.typography?.fontSize
4739 + });
4740 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { ...external_wp_blockEditor_namespaceObject.useBlockProps.save({ className: wrapperClasses }), children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
4741 + external_wp_blockEditor_namespaceObject.RichText.Content,
4742 + {
4743 + tagName: TagName,
4744 + type: isButtonTag ? buttonType : null,
4745 + className: buttonClasses,
4746 + href: isButtonTag ? null : url,
4747 + title,
4748 + style: buttonStyle,
4749 + value: text,
4750 + target: isButtonTag ? null : linkTarget,
4751 + rel: isButtonTag ? null : rel
4752 + }
4753 + ) });
4754 + }
4755 + };
4756 + const v11 = {
4757 + attributes: {
4758 + url: {
4759 + type: "string",
4760 + source: "attribute",
4761 + selector: "a",
4762 + attribute: "href"
4763 + },
4764 + title: {
4765 + type: "string",
4766 + source: "attribute",
4767 + selector: "a",
4768 + attribute: "title"
4769 + },
4770 + text: {
4771 + type: "string",
4772 + source: "html",
4773 + selector: "a"
4774 + },
4775 + linkTarget: {
4776 + type: "string",
4777 + source: "attribute",
4778 + selector: "a",
4779 + attribute: "target"
4780 + },
4781 + rel: {
4782 + type: "string",
4783 + source: "attribute",
4784 + selector: "a",
4785 + attribute: "rel"
4786 + },
4787 + placeholder: {
4788 + type: "string"
4789 + },
4790 + backgroundColor: {
4791 + type: "string"
4792 + },
4793 + textColor: {
4794 + type: "string"
4795 + },
4796 + gradient: {
4797 + type: "string"
4798 + },
4799 + width: {
4800 + type: "number"
4801 + }
4802 + },
4803 + supports: {
4804 + anchor: true,
4805 + align: true,
4806 + alignWide: false,
4807 + color: {
4808 + __experimentalSkipSerialization: true,
4809 + gradients: true,
4810 + __experimentalDefaultControls: {
4811 + background: true,
4812 + text: true
4813 + }
4814 + },
4815 + typography: {
4816 + fontSize: true,
4817 + __experimentalFontFamily: true,
4818 + __experimentalDefaultControls: {
4819 + fontSize: true
4820 + }
4821 + },
4822 + reusable: false,
4823 + spacing: {
4824 + __experimentalSkipSerialization: true,
4825 + padding: ["horizontal", "vertical"],
4826 + __experimentalDefaultControls: {
4827 + padding: true
4828 + }
4829 + },
4830 + __experimentalBorder: {
4831 + radius: true,
4832 + __experimentalSkipSerialization: true,
4833 + __experimentalDefaultControls: {
4834 + radius: true
4835 + }
4836 + },
4837 + __experimentalSelector: ".wp-block-button__link"
4838 + },
4839 + save({ attributes, className }) {
4840 + const { fontSize, linkTarget, rel, style, text, title, url, width } = attributes;
4841 + if (!text) {
4842 + return null;
4843 + }
4844 + const borderProps = (0,external_wp_blockEditor_namespaceObject.__experimentalGetBorderClassesAndStyles)(attributes);
4845 + const colorProps = (0,external_wp_blockEditor_namespaceObject.__experimentalGetColorClassesAndStyles)(attributes);
4846 + const spacingProps = (0,external_wp_blockEditor_namespaceObject.__experimentalGetSpacingClassesAndStyles)(attributes);
4847 + const buttonClasses = dist_clsx(
4848 + "wp-block-button__link",
4849 + colorProps.className,
4850 + borderProps.className,
4851 + {
4852 + // For backwards compatibility add style that isn't provided via
4853 + // block support.
4854 + "no-border-radius": style?.border?.radius === 0
4855 + }
4856 + );
4857 + const buttonStyle = {
4858 + ...borderProps.style,
4859 + ...colorProps.style,
4860 + ...spacingProps.style
4861 + };
4862 + const wrapperClasses = dist_clsx(className, {
4863 + [`has-custom-width wp-block-button__width-${width}`]: width,
4864 + [`has-custom-font-size`]: fontSize || style?.typography?.fontSize
4865 + });
4866 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { ...external_wp_blockEditor_namespaceObject.useBlockProps.save({ className: wrapperClasses }), children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
4867 + external_wp_blockEditor_namespaceObject.RichText.Content,
4868 + {
4869 + tagName: "a",
4870 + className: buttonClasses,
4871 + href: url,
4872 + title,
4873 + style: buttonStyle,
4874 + value: text,
4875 + target: linkTarget,
4876 + rel
4877 + }
4878 + ) });
4879 + }
4880 + };
4881 + const v10 = {
4882 + attributes: {
4883 + url: {
4884 + type: "string",
4885 + source: "attribute",
4886 + selector: "a",
4887 + attribute: "href"
4888 + },
4889 + title: {
4890 + type: "string",
4891 + source: "attribute",
4892 + selector: "a",
4893 + attribute: "title"
4894 + },
4895 + text: {
4896 + type: "string",
4897 + source: "html",
4898 + selector: "a"
4899 + },
4900 + linkTarget: {
4901 + type: "string",
4902 + source: "attribute",
4903 + selector: "a",
4904 + attribute: "target"
4905 + },
4906 + rel: {
4907 + type: "string",
4908 + source: "attribute",
4909 + selector: "a",
4910 + attribute: "rel"
4911 + },
4912 + placeholder: {
4913 + type: "string"
4914 + },
4915 + backgroundColor: {
4916 + type: "string"
4917 + },
4918 + textColor: {
4919 + type: "string"
4920 + },
4921 + gradient: {
4922 + type: "string"
4923 + },
4924 + width: {
4925 + type: "number"
4926 + }
4927 + },
4928 + supports: {
4929 + anchor: true,
4930 + align: true,
4931 + alignWide: false,
4932 + color: {
4933 + __experimentalSkipSerialization: true,
4934 + gradients: true
4935 + },
4936 + typography: {
4937 + fontSize: true,
4938 + __experimentalFontFamily: true
4939 + },
4940 + reusable: false,
4941 + spacing: {
4942 + __experimentalSkipSerialization: true,
4943 + padding: ["horizontal", "vertical"],
4944 + __experimentalDefaultControls: {
4945 + padding: true
4946 + }
4947 + },
4948 + __experimentalBorder: {
4949 + radius: true,
4950 + __experimentalSkipSerialization: true
4951 + },
4952 + __experimentalSelector: ".wp-block-button__link"
4953 + },
4954 + save({ attributes, className }) {
4955 + const { fontSize, linkTarget, rel, style, text, title, url, width } = attributes;
4956 + if (!text) {
4957 + return null;
4958 + }
4959 + const borderProps = (0,external_wp_blockEditor_namespaceObject.__experimentalGetBorderClassesAndStyles)(attributes);
4960 + const colorProps = (0,external_wp_blockEditor_namespaceObject.__experimentalGetColorClassesAndStyles)(attributes);
4961 + const spacingProps = (0,external_wp_blockEditor_namespaceObject.__experimentalGetSpacingClassesAndStyles)(attributes);
4962 + const buttonClasses = dist_clsx(
4963 + "wp-block-button__link",
4964 + colorProps.className,
4965 + borderProps.className,
4966 + {
4967 + // For backwards compatibility add style that isn't provided via
4968 + // block support.
4969 + "no-border-radius": style?.border?.radius === 0
4970 + }
4971 + );
4972 + const buttonStyle = {
4973 + ...borderProps.style,
4974 + ...colorProps.style,
4975 + ...spacingProps.style
4976 + };
4977 + const wrapperClasses = dist_clsx(className, {
4978 + [`has-custom-width wp-block-button__width-${width}`]: width,
4979 + [`has-custom-font-size`]: fontSize || style?.typography?.fontSize
4980 + });
4981 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { ...external_wp_blockEditor_namespaceObject.useBlockProps.save({ className: wrapperClasses }), children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
4982 + external_wp_blockEditor_namespaceObject.RichText.Content,
4983 + {
4984 + tagName: "a",
4985 + className: buttonClasses,
4986 + href: url,
4987 + title,
4988 + style: buttonStyle,
4989 + value: text,
4990 + target: linkTarget,
4991 + rel
4992 + }
4993 + ) });
4994 + },
4995 + migrate: migrate_font_family_default,
4996 + isEligible({ style }) {
4997 + return style?.typography?.fontFamily;
4998 + }
4999 + };
5000 + const deprecated = [
5001 + v12,
5002 + v11,
5003 + v10,
5004 + {
5005 + supports: {
5006 + anchor: true,
5007 + align: true,
5008 + alignWide: false,
5009 + color: {
5010 + __experimentalSkipSerialization: true,
5011 + gradients: true
5012 + },
5013 + typography: {
5014 + fontSize: true,
5015 + __experimentalFontFamily: true
5016 + },
5017 + reusable: false,
5018 + __experimentalSelector: ".wp-block-button__link"
5019 + },
5020 + attributes: {
5021 + ...blockAttributes,
5022 + linkTarget: {
5023 + type: "string",
5024 + source: "attribute",
5025 + selector: "a",
5026 + attribute: "target"
5027 + },
5028 + rel: {
5029 + type: "string",
5030 + source: "attribute",
5031 + selector: "a",
5032 + attribute: "rel"
5033 + },
5034 + placeholder: {
5035 + type: "string"
5036 + },
5037 + backgroundColor: {
5038 + type: "string"
5039 + },
5040 + textColor: {
5041 + type: "string"
5042 + },
5043 + gradient: {
5044 + type: "string"
5045 + },
5046 + width: {
5047 + type: "number"
5048 + }
5049 + },
5050 + isEligible({ style }) {
5051 + return typeof style?.border?.radius === "number";
5052 + },
5053 + save({ attributes, className }) {
5054 + const {
5055 + fontSize,
5056 + linkTarget,
5057 + rel,
5058 + style,
5059 + text,
5060 + title,
5061 + url,
5062 + width
5063 + } = attributes;
5064 + if (!text) {
5065 + return null;
5066 + }
5067 + const borderRadius = style?.border?.radius;
5068 + const colorProps = (0,external_wp_blockEditor_namespaceObject.__experimentalGetColorClassesAndStyles)(attributes);
5069 + const buttonClasses = dist_clsx(
5070 + "wp-block-button__link",
5071 + colorProps.className,
5072 + {
5073 + "no-border-radius": style?.border?.radius === 0
5074 + }
5075 + );
5076 + const buttonStyle = {
5077 + borderRadius: borderRadius ? borderRadius : void 0,
5078 + ...colorProps.style
5079 + };
5080 + const wrapperClasses = dist_clsx(className, {
5081 + [`has-custom-width wp-block-button__width-${width}`]: width,
5082 + [`has-custom-font-size`]: fontSize || style?.typography?.fontSize
5083 + });
5084 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { ...external_wp_blockEditor_namespaceObject.useBlockProps.save({ className: wrapperClasses }), children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
5085 + external_wp_blockEditor_namespaceObject.RichText.Content,
5086 + {
5087 + tagName: "a",
5088 + className: buttonClasses,
5089 + href: url,
5090 + title,
5091 + style: buttonStyle,
5092 + value: text,
5093 + target: linkTarget,
5094 + rel
5095 + }
5096 + ) });
5097 + },
5098 + migrate: (0,external_wp_compose_namespaceObject.compose)(migrate_font_family_default, migrateBorderRadius)
5099 + },
5100 + {
5101 + supports: {
5102 + anchor: true,
5103 + align: true,
5104 + alignWide: false,
5105 + color: {
5106 + __experimentalSkipSerialization: true
5107 + },
5108 + reusable: false,
5109 + __experimentalSelector: ".wp-block-button__link"
5110 + },
5111 + attributes: {
5112 + ...blockAttributes,
5113 + linkTarget: {
5114 + type: "string",
5115 + source: "attribute",
5116 + selector: "a",
5117 + attribute: "target"
5118 + },
5119 + rel: {
5120 + type: "string",
5121 + source: "attribute",
5122 + selector: "a",
5123 + attribute: "rel"
5124 + },
5125 + placeholder: {
5126 + type: "string"
5127 + },
5128 + borderRadius: {
5129 + type: "number"
5130 + },
5131 + backgroundColor: {
5132 + type: "string"
5133 + },
5134 + textColor: {
5135 + type: "string"
5136 + },
5137 + gradient: {
5138 + type: "string"
5139 + },
5140 + style: {
5141 + type: "object"
5142 + },
5143 + width: {
5144 + type: "number"
5145 + }
5146 + },
5147 + save({ attributes, className }) {
5148 + const { borderRadius, linkTarget, rel, text, title, url, width } = attributes;
5149 + const colorProps = (0,external_wp_blockEditor_namespaceObject.__experimentalGetColorClassesAndStyles)(attributes);
5150 + const buttonClasses = dist_clsx(
5151 + "wp-block-button__link",
5152 + colorProps.className,
5153 + {
5154 + "no-border-radius": borderRadius === 0
5155 + }
5156 + );
5157 + const buttonStyle = {
5158 + borderRadius: borderRadius ? borderRadius + "px" : void 0,
5159 + ...colorProps.style
5160 + };
5161 + const wrapperClasses = dist_clsx(className, {
5162 + [`has-custom-width wp-block-button__width-${width}`]: width
5163 + });
5164 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { ...external_wp_blockEditor_namespaceObject.useBlockProps.save({ className: wrapperClasses }), children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
5165 + external_wp_blockEditor_namespaceObject.RichText.Content,
5166 + {
5167 + tagName: "a",
5168 + className: buttonClasses,
5169 + href: url,
5170 + title,
5171 + style: buttonStyle,
5172 + value: text,
5173 + target: linkTarget,
5174 + rel
5175 + }
5176 + ) });
5177 + },
5178 + migrate: (0,external_wp_compose_namespaceObject.compose)(migrate_font_family_default, migrateBorderRadius)
5179 + },
5180 + {
5181 + supports: {
5182 + anchor: true,
5183 + align: true,
5184 + alignWide: false,
5185 + color: {
5186 + __experimentalSkipSerialization: true
5187 + },
5188 + reusable: false,
5189 + __experimentalSelector: ".wp-block-button__link"
5190 + },
5191 + attributes: {
5192 + ...blockAttributes,
5193 + linkTarget: {
5194 + type: "string",
5195 + source: "attribute",
5196 + selector: "a",
5197 + attribute: "target"
5198 + },
5199 + rel: {
5200 + type: "string",
5201 + source: "attribute",
5202 + selector: "a",
5203 + attribute: "rel"
5204 + },
5205 + placeholder: {
5206 + type: "string"
5207 + },
5208 + borderRadius: {
5209 + type: "number"
5210 + },
5211 + backgroundColor: {
5212 + type: "string"
5213 + },
5214 + textColor: {
5215 + type: "string"
5216 + },
5217 + gradient: {
5218 + type: "string"
5219 + },
5220 + style: {
5221 + type: "object"
5222 + },
5223 + width: {
5224 + type: "number"
5225 + }
5226 + },
5227 + save({ attributes, className }) {
5228 + const { borderRadius, linkTarget, rel, text, title, url, width } = attributes;
5229 + const colorProps = (0,external_wp_blockEditor_namespaceObject.__experimentalGetColorClassesAndStyles)(attributes);
5230 + const buttonClasses = dist_clsx(
5231 + "wp-block-button__link",
5232 + colorProps.className,
5233 + {
5234 + "no-border-radius": borderRadius === 0
5235 + }
5236 + );
5237 + const buttonStyle = {
5238 + borderRadius: borderRadius ? borderRadius + "px" : void 0,
5239 + ...colorProps.style
5240 + };
5241 + const wrapperClasses = dist_clsx(className, {
5242 + [`has-custom-width wp-block-button__width-${width}`]: width
5243 + });
5244 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { ...external_wp_blockEditor_namespaceObject.useBlockProps.save({ className: wrapperClasses }), children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
5245 + external_wp_blockEditor_namespaceObject.RichText.Content,
5246 + {
5247 + tagName: "a",
5248 + className: buttonClasses,
5249 + href: url,
5250 + title,
5251 + style: buttonStyle,
5252 + value: text,
5253 + target: linkTarget,
5254 + rel
5255 + }
5256 + ) });
5257 + },
5258 + migrate: (0,external_wp_compose_namespaceObject.compose)(migrate_font_family_default, migrateBorderRadius)
5259 + },
5260 + {
5261 + supports: {
5262 + align: true,
5263 + alignWide: false,
5264 + color: { gradients: true }
5265 + },
5266 + attributes: {
5267 + ...blockAttributes,
5268 + linkTarget: {
5269 + type: "string",
5270 + source: "attribute",
5271 + selector: "a",
5272 + attribute: "target"
5273 + },
5274 + rel: {
5275 + type: "string",
5276 + source: "attribute",
5277 + selector: "a",
5278 + attribute: "rel"
5279 + },
5280 + placeholder: {
5281 + type: "string"
5282 + },
5283 + borderRadius: {
5284 + type: "number"
5285 + },
5286 + backgroundColor: {
5287 + type: "string"
5288 + },
5289 + textColor: {
5290 + type: "string"
5291 + },
5292 + gradient: {
5293 + type: "string"
5294 + },
5295 + style: {
5296 + type: "object"
5297 + }
5298 + },
5299 + save({ attributes }) {
5300 + const { borderRadius, linkTarget, rel, text, title, url } = attributes;
5301 + const buttonClasses = dist_clsx("wp-block-button__link", {
5302 + "no-border-radius": borderRadius === 0
5303 + });
5304 + const buttonStyle = {
5305 + borderRadius: borderRadius ? borderRadius + "px" : void 0
5306 + };
5307 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
5308 + external_wp_blockEditor_namespaceObject.RichText.Content,
5309 + {
5310 + tagName: "a",
5311 + className: buttonClasses,
5312 + href: url,
5313 + title,
5314 + style: buttonStyle,
5315 + value: text,
5316 + target: linkTarget,
5317 + rel
5318 + }
5319 + );
5320 + },
5321 + migrate: migrateBorderRadius
5322 + },
5323 + {
5324 + supports: {
5325 + align: true,
5326 + alignWide: false
5327 + },
5328 + attributes: {
5329 + ...blockAttributes,
5330 + linkTarget: {
5331 + type: "string",
5332 + source: "attribute",
5333 + selector: "a",
5334 + attribute: "target"
5335 + },
5336 + rel: {
5337 + type: "string",
5338 + source: "attribute",
5339 + selector: "a",
5340 + attribute: "rel"
5341 + },
5342 + placeholder: {
5343 + type: "string"
5344 + },
5345 + borderRadius: {
5346 + type: "number"
5347 + },
5348 + backgroundColor: {
5349 + type: "string"
5350 + },
5351 + textColor: {
5352 + type: "string"
5353 + },
5354 + customBackgroundColor: {
5355 + type: "string"
5356 + },
5357 + customTextColor: {
5358 + type: "string"
5359 + },
5360 + customGradient: {
5361 + type: "string"
5362 + },
5363 + gradient: {
5364 + type: "string"
5365 + }
5366 + },
5367 + isEligible: (attributes) => !!attributes.customTextColor || !!attributes.customBackgroundColor || !!attributes.customGradient || !!attributes.align,
5368 + migrate: (0,external_wp_compose_namespaceObject.compose)(
5369 + migrateBorderRadius,
5370 + migrateCustomColorsAndGradients,
5371 + migrateAlign
5372 + ),
5373 + save({ attributes }) {
5374 + const {
5375 + backgroundColor,
5376 + borderRadius,
5377 + customBackgroundColor,
5378 + customTextColor,
5379 + customGradient,
5380 + linkTarget,
5381 + gradient,
5382 + rel,
5383 + text,
5384 + textColor,
5385 + title,
5386 + url
5387 + } = attributes;
5388 + const textClass = (0,external_wp_blockEditor_namespaceObject.getColorClassName)("color", textColor);
5389 + const backgroundClass = !customGradient && (0,external_wp_blockEditor_namespaceObject.getColorClassName)("background-color", backgroundColor);
5390 + const gradientClass = (0,external_wp_blockEditor_namespaceObject.__experimentalGetGradientClass)(gradient);
5391 + const buttonClasses = dist_clsx("wp-block-button__link", {
5392 + "has-text-color": textColor || customTextColor,
5393 + [textClass]: textClass,
5394 + "has-background": backgroundColor || customBackgroundColor || customGradient || gradient,
5395 + [backgroundClass]: backgroundClass,
5396 + "no-border-radius": borderRadius === 0,
5397 + [gradientClass]: gradientClass
5398 + });
5399 + const buttonStyle = {
5400 + background: customGradient ? customGradient : void 0,
5401 + backgroundColor: backgroundClass || customGradient || gradient ? void 0 : customBackgroundColor,
5402 + color: textClass ? void 0 : customTextColor,
5403 + borderRadius: borderRadius ? borderRadius + "px" : void 0
5404 + };
5405 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
5406 + external_wp_blockEditor_namespaceObject.RichText.Content,
5407 + {
5408 + tagName: "a",
5409 + className: buttonClasses,
5410 + href: url,
5411 + title,
5412 + style: buttonStyle,
5413 + value: text,
5414 + target: linkTarget,
5415 + rel
5416 + }
5417 + ) });
5418 + }
5419 + },
5420 + {
5421 + attributes: {
5422 + ...blockAttributes,
5423 + align: {
5424 + type: "string",
5425 + default: "none"
5426 + },
5427 + backgroundColor: {
5428 + type: "string"
5429 + },
5430 + textColor: {
5431 + type: "string"
5432 + },
5433 + customBackgroundColor: {
5434 + type: "string"
5435 + },
5436 + customTextColor: {
5437 + type: "string"
5438 + },
5439 + linkTarget: {
5440 + type: "string",
5441 + source: "attribute",
5442 + selector: "a",
5443 + attribute: "target"
5444 + },
5445 + rel: {
5446 + type: "string",
5447 + source: "attribute",
5448 + selector: "a",
5449 + attribute: "rel"
5450 + },
5451 + placeholder: {
5452 + type: "string"
5453 + }
5454 + },
5455 + isEligible(attribute) {
5456 + return attribute.className && attribute.className.includes("is-style-squared");
5457 + },
5458 + migrate(attributes) {
5459 + let newClassName = attributes.className;
5460 + if (newClassName) {
5461 + newClassName = newClassName.replace(/is-style-squared[\s]?/, "").trim();
5462 + }
5463 + return migrateBorderRadius(
5464 + migrateCustomColorsAndGradients({
5465 + ...attributes,
5466 + className: newClassName ? newClassName : void 0,
5467 + borderRadius: 0
5468 + })
5469 + );
5470 + },
5471 + save({ attributes }) {
5472 + const {
5473 + backgroundColor,
5474 + customBackgroundColor,
5475 + customTextColor,
5476 + linkTarget,
5477 + rel,
5478 + text,
5479 + textColor,
5480 + title,
5481 + url
5482 + } = attributes;
5483 + const textClass = (0,external_wp_blockEditor_namespaceObject.getColorClassName)("color", textColor);
5484 + const backgroundClass = (0,external_wp_blockEditor_namespaceObject.getColorClassName)(
5485 + "background-color",
5486 + backgroundColor
5487 + );
5488 + const buttonClasses = dist_clsx("wp-block-button__link", {
5489 + "has-text-color": textColor || customTextColor,
5490 + [textClass]: textClass,
5491 + "has-background": backgroundColor || customBackgroundColor,
5492 + [backgroundClass]: backgroundClass
5493 + });
5494 + const buttonStyle = {
5495 + backgroundColor: backgroundClass ? void 0 : customBackgroundColor,
5496 + color: textClass ? void 0 : customTextColor
5497 + };
5498 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
5499 + external_wp_blockEditor_namespaceObject.RichText.Content,
5500 + {
5501 + tagName: "a",
5502 + className: buttonClasses,
5503 + href: url,
5504 + title,
5505 + style: buttonStyle,
5506 + value: text,
5507 + target: linkTarget,
5508 + rel
5509 + }
5510 + ) });
5511 + }
5512 + },
5513 + {
5514 + attributes: {
5515 + ...blockAttributes,
5516 + align: {
5517 + type: "string",
5518 + default: "none"
5519 + },
5520 + backgroundColor: {
5521 + type: "string"
5522 + },
5523 + textColor: {
5524 + type: "string"
5525 + },
5526 + customBackgroundColor: {
5527 + type: "string"
5528 + },
5529 + customTextColor: {
5530 + type: "string"
5531 + }
5532 + },
5533 + migrate: oldColorsMigration,
5534 + save({ attributes }) {
5535 + const {
5536 + url,
5537 + text,
5538 + title,
5539 + backgroundColor,
5540 + textColor,
5541 + customBackgroundColor,
5542 + customTextColor
5543 + } = attributes;
5544 + const textClass = (0,external_wp_blockEditor_namespaceObject.getColorClassName)("color", textColor);
5545 + const backgroundClass = (0,external_wp_blockEditor_namespaceObject.getColorClassName)(
5546 + "background-color",
5547 + backgroundColor
5548 + );
5549 + const buttonClasses = dist_clsx("wp-block-button__link", {
5550 + "has-text-color": textColor || customTextColor,
5551 + [textClass]: textClass,
5552 + "has-background": backgroundColor || customBackgroundColor,
5553 + [backgroundClass]: backgroundClass
5554 + });
5555 + const buttonStyle = {
5556 + backgroundColor: backgroundClass ? void 0 : customBackgroundColor,
5557 + color: textClass ? void 0 : customTextColor
5558 + };
5559 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
5560 + external_wp_blockEditor_namespaceObject.RichText.Content,
5561 + {
5562 + tagName: "a",
5563 + className: buttonClasses,
5564 + href: url,
5565 + title,
5566 + style: buttonStyle,
5567 + value: text
5568 + }
5569 + ) });
5570 + }
5571 + },
5572 + {
5573 + attributes: {
5574 + ...blockAttributes,
5575 + color: {
5576 + type: "string"
5577 + },
5578 + textColor: {
5579 + type: "string"
5580 + },
5581 + align: {
5582 + type: "string",
5583 + default: "none"
5584 + }
5585 + },
5586 + save({ attributes }) {
5587 + const { url, text, title, align, color, textColor } = attributes;
5588 + const buttonStyle = {
5589 + backgroundColor: color,
5590 + color: textColor
5591 + };
5592 + const linkClass = "wp-block-button__link";
5593 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { className: `align${align}`, children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
5594 + external_wp_blockEditor_namespaceObject.RichText.Content,
5595 + {
5596 + tagName: "a",
5597 + className: linkClass,
5598 + href: url,
5599 + title,
5600 + style: buttonStyle,
5601 + value: text
5602 + }
5603 + ) });
5604 + },
5605 + migrate: oldColorsMigration
5606 + },
5607 + {
5608 + attributes: {
5609 + ...blockAttributes,
5610 + color: {
5611 + type: "string"
5612 + },
5613 + textColor: {
5614 + type: "string"
5615 + },
5616 + align: {
5617 + type: "string",
5618 + default: "none"
5619 + }
5620 + },
5621 + save({ attributes }) {
5622 + const { url, text, title, align, color, textColor } = attributes;
5623 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
5624 + "div",
5625 + {
5626 + className: `align${align}`,
5627 + style: { backgroundColor: color },
5628 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
5629 + external_wp_blockEditor_namespaceObject.RichText.Content,
5630 + {
5631 + tagName: "a",
5632 + href: url,
5633 + title,
5634 + style: { color: textColor },
5635 + value: text
5636 + }
5637 + )
5638 + }
5639 + );
5640 + },
5641 + migrate: oldColorsMigration
5642 + }
5643 + ];
5644 + var button_deprecated_deprecated_default = deprecated;
5645 +
5646 +
5647 + ;// ./node_modules/@wordpress/block-library/build-module/button/constants.js
5648 + const NEW_TAB_REL = "noreferrer noopener";
5649 + const NEW_TAB_TARGET = "_blank";
5650 + const NOFOLLOW_REL = "nofollow";
5651 +
5652 +
5653 + ;// ./node_modules/@wordpress/block-library/build-module/button/get-updated-link-attributes.js
5654 +
5655 +
5656 + function getUpdatedLinkAttributes({
5657 + rel = "",
5658 + url = "",
5659 + opensInNewTab,
5660 + nofollow
5661 + }) {
5662 + let newLinkTarget;
5663 + let updatedRel = rel;
5664 + if (opensInNewTab) {
5665 + newLinkTarget = NEW_TAB_TARGET;
5666 + updatedRel = updatedRel?.includes(NEW_TAB_REL) ? updatedRel : updatedRel + ` ${NEW_TAB_REL}`;
5667 + } else {
5668 + const relRegex = new RegExp(`\\b${NEW_TAB_REL}\\s*`, "g");
5669 + updatedRel = updatedRel?.replace(relRegex, "").trim();
5670 + }
5671 + if (nofollow) {
5672 + updatedRel = updatedRel?.includes(NOFOLLOW_REL) ? updatedRel : (updatedRel + ` ${NOFOLLOW_REL}`).trim();
5673 + } else {
5674 + const relRegex = new RegExp(`\\b${NOFOLLOW_REL}\\s*`, "g");
5675 + updatedRel = updatedRel?.replace(relRegex, "").trim();
5676 + }
5677 + return {
5678 + url: (0,external_wp_url_namespaceObject.prependHTTP)(url),
5679 + linkTarget: newLinkTarget,
5680 + rel: updatedRel || void 0
5681 + };
5682 + }
5683 +
5684 +
5685 + ;// ./node_modules/@wordpress/block-library/build-module/utils/remove-anchor-tag.js
5686 + function removeAnchorTag(value) {
5687 + return value.toString().replace(/<\/?a[^>]*>/g, "");
5688 + }
5689 +
5690 +
5691 + ;// external ["wp","keycodes"]
5692 + const external_wp_keycodes_namespaceObject = window["wp"]["keycodes"];
5693 + ;// ./node_modules/@wordpress/icons/build-module/library/link.js
5694 +
5695 +
5696 + var link_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M10 17.389H8.444A5.194 5.194 0 1 1 8.444 7H10v1.5H8.444a3.694 3.694 0 0 0 0 7.389H10v1.5ZM14 7h1.556a5.194 5.194 0 0 1 0 10.39H14v-1.5h1.556a3.694 3.694 0 0 0 0-7.39H14V7Zm-4.5 6h5v-1.5h-5V13Z" }) });
5697 +
5698 +
5699 + ;// ./node_modules/@wordpress/icons/build-module/library/link-off.js
5700 +
5701 +
5702 + var link_off_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M17.031 4.703 15.576 4l-1.56 3H14v.03l-2.324 4.47H9.5V13h1.396l-1.502 2.889h-.95a3.694 3.694 0 0 1 0-7.389H10V7H8.444a5.194 5.194 0 1 0 0 10.389h.17L7.5 19.53l1.416.719L15.049 8.5h.507a3.694 3.694 0 0 1 0 7.39H14v1.5h1.556a5.194 5.194 0 0 0 .273-10.383l1.202-2.304Z" }) });
5703 +
5704 +
5705 + ;// ./node_modules/@wordpress/block-library/build-module/button/edit.js
5706 +
5707 +
5708 +
5709 +
5710 +
5711 +
5712 +
5713 +
5714 +
5715 +
5716 +
5717 +
5718 +
5719 +
5720 +
5721 +
5722 + const { HTMLElementControl } = unlock(external_wp_blockEditor_namespaceObject.privateApis);
5723 + const LINK_SETTINGS = [
5724 + ...external_wp_blockEditor_namespaceObject.LinkControl.DEFAULT_LINK_SETTINGS,
5725 + {
5726 + id: "nofollow",
5727 + title: (0,external_wp_i18n_namespaceObject.__)("Mark as nofollow")
5728 + }
5729 + ];
5730 + function useEnter(props) {
5731 + const { replaceBlocks, selectionChange } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_blockEditor_namespaceObject.store);
5732 + const { getBlock, getBlockRootClientId, getBlockIndex } = (0,external_wp_data_namespaceObject.useSelect)(external_wp_blockEditor_namespaceObject.store);
5733 + const propsRef = (0,external_wp_element_namespaceObject.useRef)(props);
5734 + propsRef.current = props;
5735 + return (0,external_wp_compose_namespaceObject.useRefEffect)((element) => {
5736 + function onKeyDown(event) {
5737 + if (event.defaultPrevented || event.keyCode !== external_wp_keycodes_namespaceObject.ENTER) {
5738 + return;
5739 + }
5740 + const { content, clientId } = propsRef.current;
5741 + if (content.length) {
5742 + return;
5743 + }
5744 + event.preventDefault();
5745 + const topParentListBlock = getBlock(
5746 + getBlockRootClientId(clientId)
5747 + );
5748 + const blockIndex = getBlockIndex(clientId);
5749 + const head = (0,external_wp_blocks_namespaceObject.cloneBlock)({
5750 + ...topParentListBlock,
5751 + innerBlocks: topParentListBlock.innerBlocks.slice(
5752 + 0,
5753 + blockIndex
5754 + )
5755 + });
5756 + const middle = (0,external_wp_blocks_namespaceObject.createBlock)((0,external_wp_blocks_namespaceObject.getDefaultBlockName)());
5757 + const after = topParentListBlock.innerBlocks.slice(
5758 + blockIndex + 1
5759 + );
5760 + const tail = after.length ? [
5761 + (0,external_wp_blocks_namespaceObject.cloneBlock)({
5762 + ...topParentListBlock,
5763 + innerBlocks: after
5764 + })
5765 + ] : [];
5766 + replaceBlocks(
5767 + topParentListBlock.clientId,
5768 + [head, middle, ...tail],
5769 + 1
5770 + );
5771 + selectionChange(middle.clientId);
5772 + }
5773 + element.addEventListener("keydown", onKeyDown);
5774 + return () => {
5775 + element.removeEventListener("keydown", onKeyDown);
5776 + };
5777 + }, []);
5778 + }
5779 + function WidthPanel({ selectedWidth, setAttributes }) {
5780 + const dropdownMenuProps = useToolsPanelDropdownMenuProps();
5781 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
5782 + external_wp_components_namespaceObject.__experimentalToolsPanel,
5783 + {
5784 + label: (0,external_wp_i18n_namespaceObject.__)("Settings"),
5785 + resetAll: () => setAttributes({ width: void 0 }),
5786 + dropdownMenuProps,
5787 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
5788 + external_wp_components_namespaceObject.__experimentalToolsPanelItem,
5789 + {
5790 + label: (0,external_wp_i18n_namespaceObject.__)("Width"),
5791 + isShownByDefault: true,
5792 + hasValue: () => !!selectedWidth,
5793 + onDeselect: () => setAttributes({ width: void 0 }),
5794 + __nextHasNoMarginBottom: true,
5795 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
5796 + external_wp_components_namespaceObject.__experimentalToggleGroupControl,
5797 + {
5798 + label: (0,external_wp_i18n_namespaceObject.__)("Width"),
5799 + value: selectedWidth,
5800 + onChange: (newWidth) => setAttributes({ width: newWidth }),
5801 + isBlock: true,
5802 + __next40pxDefaultSize: true,
5803 + __nextHasNoMarginBottom: true,
5804 + children: [25, 50, 75, 100].map((widthValue) => {
5805 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
5806 + external_wp_components_namespaceObject.__experimentalToggleGroupControlOption,
5807 + {
5808 + value: widthValue,
5809 + label: (0,external_wp_i18n_namespaceObject.sprintf)(
5810 + /* translators: %d: Percentage value. */
5811 + (0,external_wp_i18n_namespaceObject.__)("%d%%"),
5812 + widthValue
5813 + )
5814 + },
5815 + widthValue
5816 + );
5817 + })
5818 + }
5819 + )
5820 + }
5821 + )
5822 + }
5823 + );
5824 + }
5825 + function ButtonEdit(props) {
5826 + const {
5827 + attributes,
5828 + setAttributes,
5829 + className,
5830 + isSelected,
5831 + onReplace,
5832 + mergeBlocks,
5833 + clientId,
5834 + context
5835 + } = props;
5836 + const {
5837 + tagName,
5838 + textAlign,
5839 + linkTarget,
5840 + placeholder,
5841 + rel,
5842 + style,
5843 + text,
5844 + url,
5845 + width,
5846 + metadata
5847 + } = attributes;
5848 + const TagName = tagName || "a";
5849 + function onKeyDown(event) {
5850 + if (external_wp_keycodes_namespaceObject.isKeyboardEvent.primary(event, "k")) {
5851 + startEditing(event);
5852 + } else if (external_wp_keycodes_namespaceObject.isKeyboardEvent.primaryShift(event, "k")) {
5853 + unlink();
5854 + richTextRef.current?.focus();
5855 + }
5856 + }
5857 + const [popoverAnchor, setPopoverAnchor] = (0,external_wp_element_namespaceObject.useState)(null);
5858 + const borderProps = (0,external_wp_blockEditor_namespaceObject.__experimentalUseBorderProps)(attributes);
5859 + const colorProps = (0,external_wp_blockEditor_namespaceObject.__experimentalUseColorProps)(attributes);
5860 + const spacingProps = (0,external_wp_blockEditor_namespaceObject.__experimentalGetSpacingClassesAndStyles)(attributes);
5861 + const shadowProps = (0,external_wp_blockEditor_namespaceObject.__experimentalGetShadowClassesAndStyles)(attributes);
5862 + const ref = (0,external_wp_element_namespaceObject.useRef)();
5863 + const richTextRef = (0,external_wp_element_namespaceObject.useRef)();
5864 + const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)({
5865 + ref: (0,external_wp_compose_namespaceObject.useMergeRefs)([setPopoverAnchor, ref]),
5866 + onKeyDown
5867 + });
5868 + const blockEditingMode = (0,external_wp_blockEditor_namespaceObject.useBlockEditingMode)();
5869 + const [isEditingURL, setIsEditingURL] = (0,external_wp_element_namespaceObject.useState)(false);
5870 + const isURLSet = !!url;
5871 + const opensInNewTab = linkTarget === NEW_TAB_TARGET;
5872 + const nofollow = !!rel?.includes(NOFOLLOW_REL);
5873 + const isLinkTag = "a" === TagName;
5874 + const {
5875 + createPageEntity,
5876 + userCanCreatePages,
5877 + lockUrlControls = false
5878 + } = (0,external_wp_data_namespaceObject.useSelect)(
5879 + (select) => {
5880 + if (!isSelected) {
5881 + return {};
5882 + }
5883 + const _settings = select(external_wp_blockEditor_namespaceObject.store).getSettings();
5884 + const blockBindingsSource = (0,external_wp_blocks_namespaceObject.getBlockBindingsSource)(
5885 + metadata?.bindings?.url?.source
5886 + );
5887 + return {
5888 + createPageEntity: _settings.__experimentalCreatePageEntity,
5889 + userCanCreatePages: _settings.__experimentalUserCanCreatePages,
5890 + lockUrlControls: !!metadata?.bindings?.url && !blockBindingsSource?.canUserEditValue?.({
5891 + select,
5892 + context,
5893 + args: metadata?.bindings?.url?.args
5894 + })
5895 + };
5896 + },
5897 + [context, isSelected, metadata?.bindings?.url]
5898 + );
5899 + async function handleCreate(pageTitle) {
5900 + const page = await createPageEntity({
5901 + title: pageTitle,
5902 + status: "draft"
5903 + });
5904 + return {
5905 + id: page.id,
5906 + type: page.type,
5907 + title: page.title.rendered,
5908 + url: page.link,
5909 + kind: "post-type"
5910 + };
5911 + }
5912 + function createButtonText(searchTerm) {
5913 + return (0,external_wp_element_namespaceObject.createInterpolateElement)(
5914 + (0,external_wp_i18n_namespaceObject.sprintf)(
5915 + /* translators: %s: search term. */
5916 + (0,external_wp_i18n_namespaceObject.__)("Create page: <mark>%s</mark>"),
5917 + searchTerm
5918 + ),
5919 + { mark: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("mark", {}) }
5920 + );
5921 + }
5922 + function startEditing(event) {
5923 + event.preventDefault();
5924 + setIsEditingURL(true);
5925 + }
5926 + function unlink() {
5927 + setAttributes({
5928 + url: void 0,
5929 + linkTarget: void 0,
5930 + rel: void 0
5931 + });
5932 + setIsEditingURL(false);
5933 + }
5934 + (0,external_wp_element_namespaceObject.useEffect)(() => {
5935 + if (!isSelected) {
5936 + setIsEditingURL(false);
5937 + }
5938 + }, [isSelected]);
5939 + const linkValue = (0,external_wp_element_namespaceObject.useMemo)(
5940 + () => ({ url, opensInNewTab, nofollow }),
5941 + [url, opensInNewTab, nofollow]
5942 + );
5943 + const useEnterRef = useEnter({ content: text, clientId });
5944 + const mergedRef = (0,external_wp_compose_namespaceObject.useMergeRefs)([useEnterRef, richTextRef]);
5945 + const [fluidTypographySettings, layout] = (0,external_wp_blockEditor_namespaceObject.useSettings)(
5946 + "typography.fluid",
5947 + "layout"
5948 + );
5949 + const typographyProps = (0,external_wp_blockEditor_namespaceObject.getTypographyClassesAndStyles)(attributes, {
5950 + typography: {
5951 + fluid: fluidTypographySettings
5952 + },
5953 + layout: {
5954 + wideSize: layout?.wideSize
5955 + }
5956 + });
5957 + const hasNonContentControls = blockEditingMode === "default";
5958 + const hasBlockControls = hasNonContentControls || isLinkTag && !lockUrlControls;
5959 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
5960 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
5961 + "div",
5962 + {
5963 + ...blockProps,
5964 + className: dist_clsx(blockProps.className, {
5965 + [`has-custom-width wp-block-button__width-${width}`]: width
5966 + }),
5967 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
5968 + external_wp_blockEditor_namespaceObject.RichText,
5969 + {
5970 + ref: mergedRef,
5971 + "aria-label": (0,external_wp_i18n_namespaceObject.__)("Button text"),
5972 + placeholder: placeholder || (0,external_wp_i18n_namespaceObject.__)("Add text\u2026"),
5973 + value: text,
5974 + onChange: (value) => setAttributes({
5975 + text: removeAnchorTag(value)
5976 + }),
5977 + withoutInteractiveFormatting: true,
5978 + className: dist_clsx(
5979 + className,
5980 + "wp-block-button__link",
5981 + colorProps.className,
5982 + borderProps.className,
5983 + typographyProps.className,
5984 + {
5985 + [`has-text-align-${textAlign}`]: textAlign,
5986 + // For backwards compatibility add style that isn't
5987 + // provided via block support.
5988 + "no-border-radius": style?.border?.radius === 0,
5989 + [`has-custom-font-size`]: blockProps.style.fontSize
5990 + },
5991 + (0,external_wp_blockEditor_namespaceObject.__experimentalGetElementClassName)("button")
5992 + ),
5993 + style: {
5994 + ...borderProps.style,
5995 + ...colorProps.style,
5996 + ...spacingProps.style,
5997 + ...shadowProps.style,
5998 + ...typographyProps.style,
5999 + writingMode: void 0
6000 + },
6001 + onReplace,
6002 + onMerge: mergeBlocks,
6003 + identifier: "text"
6004 + }
6005 + )
6006 + }
6007 + ),
6008 + hasBlockControls && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_blockEditor_namespaceObject.BlockControls, { group: "block", children: [
6009 + hasNonContentControls && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
6010 + external_wp_blockEditor_namespaceObject.AlignmentControl,
6011 + {
6012 + value: textAlign,
6013 + onChange: (nextAlign) => {
6014 + setAttributes({ textAlign: nextAlign });
6015 + }
6016 + }
6017 + ),
6018 + isLinkTag && !lockUrlControls && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
6019 + external_wp_components_namespaceObject.ToolbarButton,
6020 + {
6021 + name: "link",
6022 + icon: !isURLSet ? link_default : link_off_default,
6023 + title: !isURLSet ? (0,external_wp_i18n_namespaceObject.__)("Link") : (0,external_wp_i18n_namespaceObject.__)("Unlink"),
6024 + shortcut: !isURLSet ? external_wp_keycodes_namespaceObject.displayShortcut.primary("k") : external_wp_keycodes_namespaceObject.displayShortcut.primaryShift("k"),
6025 + onClick: !isURLSet ? startEditing : unlink,
6026 + isActive: isURLSet
6027 + }
6028 + )
6029 + ] }),
6030 + isLinkTag && isSelected && (isEditingURL || isURLSet) && !lockUrlControls && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
6031 + external_wp_components_namespaceObject.Popover,
6032 + {
6033 + placement: "bottom",
6034 + onClose: () => {
6035 + setIsEditingURL(false);
6036 + richTextRef.current?.focus();
6037 + },
6038 + anchor: popoverAnchor,
6039 + focusOnMount: isEditingURL ? "firstElement" : false,
6040 + __unstableSlotName: "__unstable-block-tools-after",
6041 + shift: true,
6042 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
6043 + external_wp_blockEditor_namespaceObject.LinkControl,
6044 + {
6045 + value: linkValue,
6046 + onChange: ({
6047 + url: newURL,
6048 + opensInNewTab: newOpensInNewTab,
6049 + nofollow: newNofollow
6050 + }) => setAttributes(
6051 + getUpdatedLinkAttributes({
6052 + rel,
6053 + url: newURL,
6054 + opensInNewTab: newOpensInNewTab,
6055 + nofollow: newNofollow
6056 + })
6057 + ),
6058 + onRemove: () => {
6059 + unlink();
6060 + richTextRef.current?.focus();
6061 + },
6062 + forceIsEditingLink: isEditingURL,
6063 + settings: LINK_SETTINGS,
6064 + createSuggestion: createPageEntity && handleCreate,
6065 + withCreateSuggestion: userCanCreatePages,
6066 + createSuggestionButtonText: createButtonText
6067 + }
6068 + )
6069 + }
6070 + ),
6071 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
6072 + WidthPanel,
6073 + {
6074 + selectedWidth: width,
6075 + setAttributes
6076 + }
6077 + ) }),
6078 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_blockEditor_namespaceObject.InspectorControls, { group: "advanced", children: [
6079 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
6080 + HTMLElementControl,
6081 + {
6082 + tagName,
6083 + onChange: (value) => setAttributes({ tagName: value }),
6084 + options: [
6085 + { label: (0,external_wp_i18n_namespaceObject.__)("Default (<a>)"), value: "a" },
6086 + { label: "<button>", value: "button" }
6087 + ]
6088 + }
6089 + ),
6090 + isLinkTag && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
6091 + external_wp_components_namespaceObject.TextControl,
6092 + {
6093 + __next40pxDefaultSize: true,
6094 + __nextHasNoMarginBottom: true,
6095 + label: (0,external_wp_i18n_namespaceObject.__)("Link relation"),
6096 + help: (0,external_wp_element_namespaceObject.createInterpolateElement)(
6097 + (0,external_wp_i18n_namespaceObject.__)(
6098 + "The <a>Link Relation</a> attribute defines the relationship between a linked resource and the current document."
6099 + ),
6100 + {
6101 + a: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ExternalLink, { href: "https://developer.mozilla.org/docs/Web/HTML/Attributes/rel" })
6102 + }
6103 + ),
6104 + value: rel || "",
6105 + onChange: (newRel) => setAttributes({ rel: newRel })
6106 + }
6107 + )
6108 + ] })
6109 + ] });
6110 + }
6111 + var edit_edit_default = ButtonEdit;
6112 +
6113 +
6114 + ;// ./node_modules/@wordpress/block-library/build-module/button/block.json
6115 + const button_block_namespaceObject = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/button","title":"Button","category":"design","parent":["core/buttons"],"description":"Prompt visitors to take action with a button-style link.","keywords":["link"],"textdomain":"default","attributes":{"tagName":{"type":"string","enum":["a","button"],"default":"a"},"type":{"type":"string","default":"button"},"textAlign":{"type":"string"},"url":{"type":"string","source":"attribute","selector":"a","attribute":"href","role":"content"},"title":{"type":"string","source":"attribute","selector":"a,button","attribute":"title","role":"content"},"text":{"type":"rich-text","source":"rich-text","selector":"a,button","role":"content"},"linkTarget":{"type":"string","source":"attribute","selector":"a","attribute":"target","role":"content"},"rel":{"type":"string","source":"attribute","selector":"a","attribute":"rel","role":"content"},"placeholder":{"type":"string"},"backgroundColor":{"type":"string"},"textColor":{"type":"string"},"gradient":{"type":"string"},"width":{"type":"number"}},"supports":{"anchor":true,"splitting":true,"align":false,"alignWide":false,"color":{"__experimentalSkipSerialization":true,"gradients":true,"__experimentalDefaultControls":{"background":true,"text":true}},"typography":{"__experimentalSkipSerialization":["fontSize","lineHeight","fontFamily","fontWeight","fontStyle","textTransform","textDecoration","letterSpacing"],"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalWritingMode":true,"__experimentalDefaultControls":{"fontSize":true}},"reusable":false,"shadow":{"__experimentalSkipSerialization":true},"spacing":{"__experimentalSkipSerialization":true,"padding":["horizontal","vertical"],"__experimentalDefaultControls":{"padding":true}},"__experimentalBorder":{"color":true,"radius":true,"style":true,"width":true,"__experimentalSkipSerialization":true,"__experimentalDefaultControls":{"color":true,"radius":true,"style":true,"width":true}},"interactivity":{"clientNavigation":true}},"styles":[{"name":"fill","label":"Fill","isDefault":true},{"name":"outline","label":"Outline"}],"editorStyle":"wp-block-button-editor","style":"wp-block-button","selectors":{"root":".wp-block-button .wp-block-button__link","typography":{"writingMode":".wp-block-button"}}}');
6116 + ;// ./node_modules/@wordpress/block-library/build-module/button/save.js
6117 +
6118 +
6119 +
6120 + function button_save_save({ attributes, className }) {
6121 + const {
6122 + tagName,
6123 + type,
6124 + textAlign,
6125 + fontSize,
6126 + linkTarget,
6127 + rel,
6128 + style,
6129 + text,
6130 + title,
6131 + url,
6132 + width
6133 + } = attributes;
6134 + const TagName = tagName || "a";
6135 + const isButtonTag = "button" === TagName;
6136 + const buttonType = type || "button";
6137 + const borderProps = (0,external_wp_blockEditor_namespaceObject.__experimentalGetBorderClassesAndStyles)(attributes);
6138 + const colorProps = (0,external_wp_blockEditor_namespaceObject.__experimentalGetColorClassesAndStyles)(attributes);
6139 + const spacingProps = (0,external_wp_blockEditor_namespaceObject.__experimentalGetSpacingClassesAndStyles)(attributes);
6140 + const shadowProps = (0,external_wp_blockEditor_namespaceObject.__experimentalGetShadowClassesAndStyles)(attributes);
6141 + const typographyProps = (0,external_wp_blockEditor_namespaceObject.getTypographyClassesAndStyles)(attributes);
6142 + const buttonClasses = dist_clsx(
6143 + "wp-block-button__link",
6144 + colorProps.className,
6145 + borderProps.className,
6146 + typographyProps.className,
6147 + {
6148 + [`has-text-align-${textAlign}`]: textAlign,
6149 + // For backwards compatibility add style that isn't provided via
6150 + // block support.
6151 + "no-border-radius": style?.border?.radius === 0,
6152 + [`has-custom-font-size`]: fontSize || style?.typography?.fontSize
6153 + },
6154 + (0,external_wp_blockEditor_namespaceObject.__experimentalGetElementClassName)("button")
6155 + );
6156 + const buttonStyle = {
6157 + ...borderProps.style,
6158 + ...colorProps.style,
6159 + ...spacingProps.style,
6160 + ...shadowProps.style,
6161 + ...typographyProps.style,
6162 + writingMode: void 0
6163 + };
6164 + const wrapperClasses = dist_clsx(className, {
6165 + [`has-custom-width wp-block-button__width-${width}`]: width
6166 + });
6167 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { ...external_wp_blockEditor_namespaceObject.useBlockProps.save({ className: wrapperClasses }), children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
6168 + external_wp_blockEditor_namespaceObject.RichText.Content,
6169 + {
6170 + tagName: TagName,
6171 + type: isButtonTag ? buttonType : null,
6172 + className: buttonClasses,
6173 + href: isButtonTag ? null : url,
6174 + title,
6175 + style: buttonStyle,
6176 + value: text,
6177 + target: isButtonTag ? null : linkTarget,
6178 + rel: isButtonTag ? null : rel
6179 + }
6180 + ) });
6181 + }
6182 +
6183 +
6184 + ;// ./node_modules/@wordpress/block-library/build-module/button/index.js
6185 +
6186 +
6187 +
6188 +
6189 +
6190 +
6191 +
6192 + const { name: button_name } = button_block_namespaceObject;
6193 + const button_settings = {
6194 + icon: button_default,
6195 + example: {
6196 + attributes: {
6197 + className: "is-style-fill",
6198 + text: (0,external_wp_i18n_namespaceObject.__)("Call to action")
6199 + }
6200 + },
6201 + edit: edit_edit_default,
6202 + save: button_save_save,
6203 + deprecated: button_deprecated_deprecated_default,
6204 + merge: (a, { text = "" }) => ({
6205 + ...a,
6206 + text: (a.text || "") + text
6207 + })
6208 + };
6209 + const button_init = () => initBlock({ name: button_name, metadata: button_block_namespaceObject, settings: button_settings });
6210 +
6211 +
6212 + ;// ./node_modules/@wordpress/icons/build-module/library/buttons.js
6213 +
6214 +
6215 + var buttons_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M14.5 17.5H9.5V16H14.5V17.5Z M14.5 8H9.5V6.5H14.5V8Z M7 3.5H17C18.1046 3.5 19 4.39543 19 5.5V9C19 10.1046 18.1046 11 17 11H7C5.89543 11 5 10.1046 5 9V5.5C5 4.39543 5.89543 3.5 7 3.5ZM17 5H7C6.72386 5 6.5 5.22386 6.5 5.5V9C6.5 9.27614 6.72386 9.5 7 9.5H17C17.2761 9.5 17.5 9.27614 17.5 9V5.5C17.5 5.22386 17.2761 5 17 5Z M7 13H17C18.1046 13 19 13.8954 19 15V18.5C19 19.6046 18.1046 20.5 17 20.5H7C5.89543 20.5 5 19.6046 5 18.5V15C5 13.8954 5.89543 13 7 13ZM17 14.5H7C6.72386 14.5 6.5 14.7239 6.5 15V18.5C6.5 18.7761 6.72386 19 7 19H17C17.2761 19 17.5 18.7761 17.5 18.5V15C17.5 14.7239 17.2761 14.5 17 14.5Z" }) });
6216 +
6217 +
6218 + ;// ./node_modules/@wordpress/block-library/build-module/buttons/deprecated.js
6219 +
6220 +
6221 +
6222 + const migrateWithLayout = (attributes) => {
6223 + if (!!attributes.layout) {
6224 + return attributes;
6225 + }
6226 + const { contentJustification, orientation, ...updatedAttributes } = attributes;
6227 + if (contentJustification || orientation) {
6228 + Object.assign(updatedAttributes, {
6229 + layout: {
6230 + type: "flex",
6231 + ...contentJustification && {
6232 + justifyContent: contentJustification
6233 + },
6234 + ...orientation && { orientation }
6235 + }
6236 + });
6237 + }
6238 + return updatedAttributes;
6239 + };
6240 + const deprecated_deprecated = [
6241 + {
6242 + attributes: {
6243 + contentJustification: {
6244 + type: "string"
6245 + },
6246 + orientation: {
6247 + type: "string",
6248 + default: "horizontal"
6249 + }
6250 + },
6251 + supports: {
6252 + anchor: true,
6253 + align: ["wide", "full"],
6254 + __experimentalExposeControlsToChildren: true,
6255 + spacing: {
6256 + blockGap: true,
6257 + margin: ["top", "bottom"],
6258 + __experimentalDefaultControls: {
6259 + blockGap: true
6260 + }
6261 + }
6262 + },
6263 + isEligible: ({ contentJustification, orientation }) => !!contentJustification || !!orientation,
6264 + migrate: migrateWithLayout,
6265 + save({ attributes: { contentJustification, orientation } }) {
6266 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
6267 + "div",
6268 + {
6269 + ...external_wp_blockEditor_namespaceObject.useBlockProps.save({
6270 + className: dist_clsx({
6271 + [`is-content-justification-${contentJustification}`]: contentJustification,
6272 + "is-vertical": orientation === "vertical"
6273 + })
6274 + }),
6275 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, {})
6276 + }
6277 + );
6278 + }
6279 + },
6280 + {
6281 + supports: {
6282 + align: ["center", "left", "right"],
6283 + anchor: true
6284 + },
6285 + save() {
6286 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, {}) });
6287 + },
6288 + isEligible({ align }) {
6289 + return align && ["center", "left", "right"].includes(align);
6290 + },
6291 + migrate(attributes) {
6292 + return migrateWithLayout({
6293 + ...attributes,
6294 + align: void 0,
6295 + // Floating Buttons blocks shouldn't have been supported in the
6296 + // first place. Most users using them probably expected them to
6297 + // act like content justification controls, so these blocks are
6298 + // migrated to use content justification.
6299 + // As for center-aligned Buttons blocks, the content justification
6300 + // equivalent will create an identical end result in most cases.
6301 + contentJustification: attributes.align
6302 + });
6303 + }
6304 + }
6305 + ];
6306 + var buttons_deprecated_deprecated_default = deprecated_deprecated;
6307 +
6308 +
6309 + ;// external ["wp","richText"]
6310 + const external_wp_richText_namespaceObject = window["wp"]["richText"];
6311 + ;// ./node_modules/@wordpress/block-library/build-module/utils/get-transformed-attributes.js
6312 +
6313 + function getTransformedAttributes(attributes, newBlockName, bindingsCallback = null) {
6314 + if (!attributes) {
6315 + return void 0;
6316 + }
6317 + const newBlockType = (0,external_wp_blocks_namespaceObject.getBlockType)(newBlockName);
6318 + if (!newBlockType) {
6319 + return void 0;
6320 + }
6321 + const transformedAttributes = {};
6322 + if ((0,external_wp_blocks_namespaceObject.hasBlockSupport)(newBlockType, "anchor") && attributes.anchor) {
6323 + transformedAttributes.anchor = attributes.anchor;
6324 + }
6325 + if ((0,external_wp_blocks_namespaceObject.hasBlockSupport)(newBlockType, "ariaLabel") && attributes.ariaLabel) {
6326 + transformedAttributes.ariaLabel = attributes.ariaLabel;
6327 + }
6328 + if (attributes.metadata) {
6329 + const transformedMetadata = [];
6330 + if (bindingsCallback) {
6331 + transformedMetadata.push("id", "bindings");
6332 + }
6333 + if (transformedMetadata.length > 0) {
6334 + const newMetadata = Object.entries(attributes.metadata).reduce(
6335 + (obj, [prop, value]) => {
6336 + if (!transformedMetadata.includes(prop)) {
6337 + return obj;
6338 + }
6339 + obj[prop] = prop === "bindings" ? bindingsCallback(value) : value;
6340 + return obj;
6341 + },
6342 + {}
6343 + );
6344 + if (Object.keys(newMetadata).length > 0) {
6345 + transformedAttributes.metadata = newMetadata;
6346 + }
6347 + }
6348 + }
6349 + if (Object.keys(transformedAttributes).length === 0) {
6350 + return void 0;
6351 + }
6352 + return transformedAttributes;
6353 + }
6354 +
6355 +
6356 + ;// ./node_modules/@wordpress/block-library/build-module/buttons/transforms.js
6357 +
6358 +
6359 +
6360 + const transforms_transforms = {
6361 + from: [
6362 + {
6363 + type: "block",
6364 + isMultiBlock: true,
6365 + blocks: ["core/button"],
6366 + transform: (buttons) => (
6367 + // Creates the buttons block.
6368 + (0,external_wp_blocks_namespaceObject.createBlock)(
6369 + "core/buttons",
6370 + {},
6371 + // Loop the selected buttons.
6372 + buttons.map(
6373 + (attributes) => (
6374 + // Create singular button in the buttons block.
6375 + (0,external_wp_blocks_namespaceObject.createBlock)("core/button", attributes)
6376 + )
6377 + )
6378 + )
6379 + )
6380 + },
6381 + {
6382 + type: "block",
6383 + isMultiBlock: true,
6384 + blocks: ["core/paragraph"],
6385 + transform: (buttons) => (
6386 + // Creates the buttons block.
6387 + (0,external_wp_blocks_namespaceObject.createBlock)(
6388 + "core/buttons",
6389 + {},
6390 + // Loop the selected buttons.
6391 + buttons.map((attributes) => {
6392 + const { content } = attributes;
6393 + const element = (0,external_wp_richText_namespaceObject.__unstableCreateElement)(document, content);
6394 + const text = element.innerText || "";
6395 + const link = element.querySelector("a");
6396 + const url = link?.getAttribute("href");
6397 + return (0,external_wp_blocks_namespaceObject.createBlock)("core/button", {
6398 + ...attributes,
6399 + ...getTransformedAttributes(
6400 + attributes,
6401 + "core/button",
6402 + ({ content: contentBinding }) => ({
6403 + text: contentBinding
6404 + })
6405 + ),
6406 + text,
6407 + url
6408 + });
6409 + })
6410 + )
6411 + ),
6412 + isMatch: (paragraphs) => {
6413 + return paragraphs.every((attributes) => {
6414 + const element = (0,external_wp_richText_namespaceObject.__unstableCreateElement)(
6415 + document,
6416 + attributes.content
6417 + );
6418 + const text = element.innerText || "";
6419 + const links = element.querySelectorAll("a");
6420 + return text.length <= 30 && links.length <= 1;
6421 + });
6422 + }
6423 + }
6424 + ]
6425 + };
6426 + var transforms_transforms_default = transforms_transforms;
6427 +
6428 +
6429 + ;// ./node_modules/@wordpress/block-library/build-module/buttons/edit.js
6430 +
6431 +
6432 +
6433 +
6434 +
6435 + const DEFAULT_BLOCK = {
6436 + name: "core/button",
6437 + attributesToCopy: [
6438 + "backgroundColor",
6439 + "border",
6440 + "className",
6441 + "fontFamily",
6442 + "fontSize",
6443 + "gradient",
6444 + "style",
6445 + "textColor",
6446 + "width"
6447 + ]
6448 + };
6449 + function ButtonsEdit({ attributes, className }) {
6450 + const { fontSize, layout, style } = attributes;
6451 + const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)({
6452 + className: dist_clsx(className, {
6453 + "has-custom-font-size": fontSize || style?.typography?.fontSize
6454 + })
6455 + });
6456 + const { hasButtonVariations } = (0,external_wp_data_namespaceObject.useSelect)((select) => {
6457 + const buttonVariations = select(external_wp_blocks_namespaceObject.store).getBlockVariations(
6458 + "core/button",
6459 + "inserter"
6460 + );
6461 + return {
6462 + hasButtonVariations: buttonVariations.length > 0
6463 + };
6464 + }, []);
6465 + const innerBlocksProps = (0,external_wp_blockEditor_namespaceObject.useInnerBlocksProps)(blockProps, {
6466 + defaultBlock: DEFAULT_BLOCK,
6467 + // This check should be handled by the `Inserter` internally to be consistent across all blocks that use it.
6468 + directInsert: !hasButtonVariations,
6469 + template: [["core/button"]],
6470 + templateInsertUpdatesSelection: true,
6471 + orientation: layout?.orientation ?? "horizontal"
6472 + });
6473 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { ...innerBlocksProps });
6474 + }
6475 + var buttons_edit_edit_default = ButtonsEdit;
6476 +
6477 +
6478 + ;// ./node_modules/@wordpress/block-library/build-module/buttons/block.json
6479 + const buttons_block_namespaceObject = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/buttons","title":"Buttons","category":"design","allowedBlocks":["core/button"],"description":"Prompt visitors to take action with a group of button-style links.","keywords":["link"],"textdomain":"default","supports":{"anchor":true,"align":["wide","full"],"html":false,"__experimentalExposeControlsToChildren":true,"color":{"gradients":true,"text":false,"__experimentalDefaultControls":{"background":true}},"spacing":{"blockGap":["horizontal","vertical"],"padding":true,"margin":["top","bottom"],"__experimentalDefaultControls":{"blockGap":true}},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"__experimentalBorder":{"color":true,"radius":true,"style":true,"width":true,"__experimentalDefaultControls":{"color":true,"radius":true,"style":true,"width":true}},"layout":{"allowSwitching":false,"allowInheriting":false,"default":{"type":"flex"}},"interactivity":{"clientNavigation":true},"contentRole":true},"editorStyle":"wp-block-buttons-editor","style":"wp-block-buttons"}');
6480 + ;// ./node_modules/@wordpress/block-library/build-module/buttons/save.js
6481 +
6482 +
6483 +
6484 + function buttons_save_save({ attributes, className }) {
6485 + const { fontSize, style } = attributes;
6486 + const blockProps = external_wp_blockEditor_namespaceObject.useBlockProps.save({
6487 + className: dist_clsx(className, {
6488 + "has-custom-font-size": fontSize || style?.typography?.fontSize
6489 + })
6490 + });
6491 + const innerBlocksProps = external_wp_blockEditor_namespaceObject.useInnerBlocksProps.save(blockProps);
6492 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { ...innerBlocksProps });
6493 + }
6494 +
6495 +
6496 + ;// ./node_modules/@wordpress/block-library/build-module/buttons/index.js
6497 +
6498 +
6499 +
6500 +
6501 +
6502 +
6503 +
6504 +
6505 + const { name: buttons_name } = buttons_block_namespaceObject;
6506 + const buttons_settings = {
6507 + icon: buttons_default,
6508 + example: {
6509 + attributes: {
6510 + layout: {
6511 + type: "flex",
6512 + justifyContent: "center"
6513 + }
6514 + },
6515 + innerBlocks: [
6516 + {
6517 + name: "core/button",
6518 + attributes: { text: (0,external_wp_i18n_namespaceObject.__)("Find out more") }
6519 + },
6520 + {
6521 + name: "core/button",
6522 + attributes: { text: (0,external_wp_i18n_namespaceObject.__)("Contact us") }
6523 + }
6524 + ]
6525 + },
6526 + deprecated: buttons_deprecated_deprecated_default,
6527 + transforms: transforms_transforms_default,
6528 + edit: buttons_edit_edit_default,
6529 + save: buttons_save_save
6530 + };
6531 + const buttons_init = () => initBlock({ name: buttons_name, metadata: buttons_block_namespaceObject, settings: buttons_settings });
6532 +
6533 +
6534 + ;// ./node_modules/@wordpress/icons/build-module/library/calendar.js
6535 +
6536 +
6537 + var calendar_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm.5 16c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5V7h15v12zM9 10H7v2h2v-2zm0 4H7v2h2v-2zm4-4h-2v2h2v-2zm4 0h-2v2h2v-2zm-4 4h-2v2h2v-2zm4 0h-2v2h2v-2z" }) });
6538 +
6539 +
6540 + ;// ./node_modules/@wordpress/block-library/build-module/calendar/block.json
6541 + const calendar_block_namespaceObject = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/calendar","title":"Calendar","category":"widgets","description":"A calendar of your site’s posts.","keywords":["posts","archive"],"textdomain":"default","attributes":{"month":{"type":"integer"},"year":{"type":"integer"}},"supports":{"align":true,"html":false,"color":{"link":true,"__experimentalSkipSerialization":["text","background"],"__experimentalDefaultControls":{"background":true,"text":true},"__experimentalSelector":"table, th"},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"interactivity":{"clientNavigation":true}},"style":"wp-block-calendar"}');
6542 + ;// ./node_modules/@wordpress/block-library/build-module/calendar/edit.js
6543 +
6544 +
6545 +
6546 +
6547 +
6548 +
6549 +
6550 +
6551 +
6552 + const getYearMonth = memize((date) => {
6553 + if (!date) {
6554 + return {};
6555 + }
6556 + const dateObj = new Date(date);
6557 + return {
6558 + year: dateObj.getFullYear(),
6559 + month: dateObj.getMonth() + 1
6560 + };
6561 + });
6562 + function CalendarEdit({ attributes }) {
6563 + const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)();
6564 + const { date, hasPosts, hasPostsResolved } = (0,external_wp_data_namespaceObject.useSelect)((select) => {
6565 + const { getEntityRecords, hasFinishedResolution } = select(external_wp_coreData_namespaceObject.store);
6566 + const singlePublishedPostQuery = {
6567 + status: "publish",
6568 + per_page: 1
6569 + };
6570 + const posts = getEntityRecords(
6571 + "postType",
6572 + "post",
6573 + singlePublishedPostQuery
6574 + );
6575 + const postsResolved = hasFinishedResolution("getEntityRecords", [
6576 + "postType",
6577 + "post",
6578 + singlePublishedPostQuery
6579 + ]);
6580 + let _date;
6581 + const editorSelectors = select("core/editor");
6582 + if (editorSelectors) {
6583 + const postType = editorSelectors.getEditedPostAttribute("type");
6584 + if (postType === "post") {
6585 + _date = editorSelectors.getEditedPostAttribute("date");
6586 + }
6587 + }
6588 + return {
6589 + date: _date,
6590 + hasPostsResolved: postsResolved,
6591 + hasPosts: postsResolved && posts?.length === 1
6592 + };
6593 + }, []);
6594 + if (!hasPosts) {
6595 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { ...blockProps, children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Placeholder, { icon: calendar_default, label: (0,external_wp_i18n_namespaceObject.__)("Calendar"), children: !hasPostsResolved ? /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Spinner, {}) : (0,external_wp_i18n_namespaceObject.__)("No published posts found.") }) });
6596 + }
6597 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { ...blockProps, children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Disabled, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
6598 + (external_wp_serverSideRender_default()),
6599 + {
6600 + block: "core/calendar",
6601 + attributes: { ...attributes, ...getYearMonth(date) }
6602 + }
6603 + ) }) });
6604 + }
6605 +
6606 +
6607 + ;// ./node_modules/@wordpress/block-library/build-module/calendar/transforms.js
6608 +
6609 + const calendar_transforms_transforms = {
6610 + from: [
6611 + {
6612 + type: "block",
6613 + blocks: ["core/archives"],
6614 + transform: () => (0,external_wp_blocks_namespaceObject.createBlock)("core/calendar")
6615 + }
6616 + ],
6617 + to: [
6618 + {
6619 + type: "block",
6620 + blocks: ["core/archives"],
6621 + transform: () => (0,external_wp_blocks_namespaceObject.createBlock)("core/archives")
6622 + }
6623 + ]
6624 + };
6625 + var calendar_transforms_transforms_default = calendar_transforms_transforms;
6626 +
6627 +
6628 + ;// ./node_modules/@wordpress/block-library/build-module/calendar/index.js
6629 +
6630 +
6631 +
6632 +
6633 +
6634 + const { name: calendar_name } = calendar_block_namespaceObject;
6635 + const calendar_settings = {
6636 + icon: calendar_default,
6637 + example: {},
6638 + edit: CalendarEdit,
6639 + transforms: calendar_transforms_transforms_default
6640 + };
6641 + const calendar_init = () => initBlock({ name: calendar_name, metadata: calendar_block_namespaceObject, settings: calendar_settings });
6642 +
6643 +
6644 + ;// ./node_modules/@wordpress/icons/build-module/library/category.js
6645 +
6646 +
6647 + var category_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
6648 + external_wp_primitives_namespaceObject.Path,
6649 + {
6650 + d: "M6 5.5h3a.5.5 0 01.5.5v3a.5.5 0 01-.5.5H6a.5.5 0 01-.5-.5V6a.5.5 0 01.5-.5zM4 6a2 2 0 012-2h3a2 2 0 012 2v3a2 2 0 01-2 2H6a2 2 0 01-2-2V6zm11-.5h3a.5.5 0 01.5.5v3a.5.5 0 01-.5.5h-3a.5.5 0 01-.5-.5V6a.5.5 0 01.5-.5zM13 6a2 2 0 012-2h3a2 2 0 012 2v3a2 2 0 01-2 2h-3a2 2 0 01-2-2V6zm5 8.5h-3a.5.5 0 00-.5.5v3a.5.5 0 00.5.5h3a.5.5 0 00.5-.5v-3a.5.5 0 00-.5-.5zM15 13a2 2 0 00-2 2v3a2 2 0 002 2h3a2 2 0 002-2v-3a2 2 0 00-2-2h-3zm-9 1.5h3a.5.5 0 01.5.5v3a.5.5 0 01-.5.5H6a.5.5 0 01-.5-.5v-3a.5.5 0 01.5-.5zM4 15a2 2 0 012-2h3a2 2 0 012 2v3a2 2 0 01-2 2H6a2 2 0 01-2-2v-3z",
6651 + fillRule: "evenodd",
6652 + clipRule: "evenodd"
6653 + }
6654 + ) });
6655 +
6656 +
6657 + ;// ./node_modules/@wordpress/block-library/build-module/categories/block.json
6658 + const categories_block_namespaceObject = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/categories","title":"Terms List","category":"widgets","description":"Display a list of all terms of a given taxonomy.","keywords":["categories"],"textdomain":"default","attributes":{"taxonomy":{"type":"string","default":"category"},"displayAsDropdown":{"type":"boolean","default":false},"showHierarchy":{"type":"boolean","default":false},"showPostCounts":{"type":"boolean","default":false},"showOnlyTopLevel":{"type":"boolean","default":false},"showEmpty":{"type":"boolean","default":false},"label":{"type":"string","role":"content"},"showLabel":{"type":"boolean","default":true}},"usesContext":["enhancedPagination"],"supports":{"align":true,"html":false,"spacing":{"margin":true,"padding":true,"__experimentalDefaultControls":{"margin":false,"padding":false}},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"color":{"gradients":true,"link":true,"__experimentalDefaultControls":{"background":true,"text":true,"link":true}},"interactivity":{"clientNavigation":true},"__experimentalBorder":{"radius":true,"color":true,"width":true,"style":true,"__experimentalDefaultControls":{"radius":true,"color":true,"width":true,"style":true}}},"editorStyle":"wp-block-categories-editor","style":"wp-block-categories"}');
6659 + ;// ./node_modules/@wordpress/icons/build-module/library/pin.js
6660 +
6661 +
6662 + var pin_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "m21.5 9.1-6.6-6.6-4.2 5.6c-1.2-.1-2.4.1-3.6.7-.1 0-.1.1-.2.1-.5.3-.9.6-1.2.9l3.7 3.7-5.7 5.7v1.1h1.1l5.7-5.7 3.7 3.7c.4-.4.7-.8.9-1.2.1-.1.1-.2.2-.3.6-1.1.8-2.4.6-3.6l5.6-4.1zm-7.3 3.5.1.9c.1.9 0 1.8-.4 2.6l-6-6c.8-.4 1.7-.5 2.6-.4l.9.1L15 4.9 19.1 9l-4.9 3.6z" }) });
6663 +
6664 +
6665 + ;// ./node_modules/@wordpress/block-library/build-module/categories/edit.js
6666 +
6667 +
6668 +
6669 +
6670 +
6671 +
6672 +
6673 +
6674 +
6675 +
6676 +
6677 +
6678 + function CategoriesEdit({
6679 + attributes: {
6680 + displayAsDropdown,
6681 + showHierarchy,
6682 + showPostCounts,
6683 + showOnlyTopLevel,
6684 + showEmpty,
6685 + label,
6686 + showLabel,
6687 + taxonomy: taxonomySlug
6688 + },
6689 + setAttributes,
6690 + className,
6691 + clientId
6692 + }) {
6693 + const selectId = (0,external_wp_compose_namespaceObject.useInstanceId)(CategoriesEdit, "blocks-category-select");
6694 + const { records: allTaxonomies, isResolvingTaxonomies } = (0,external_wp_coreData_namespaceObject.useEntityRecords)(
6695 + "root",
6696 + "taxonomy",
6697 + { per_page: -1 }
6698 + );
6699 + const taxonomies = allTaxonomies?.filter((t) => t.visibility.public);
6700 + const taxonomy = taxonomies?.find((t) => t.slug === taxonomySlug);
6701 + const isHierarchicalTaxonomy = !isResolvingTaxonomies && taxonomy?.hierarchical;
6702 + const query = { per_page: -1, hide_empty: !showEmpty, context: "view" };
6703 + if (isHierarchicalTaxonomy && showOnlyTopLevel) {
6704 + query.parent = 0;
6705 + }
6706 + const { records: categories, isResolving } = (0,external_wp_coreData_namespaceObject.useEntityRecords)(
6707 + "taxonomy",
6708 + taxonomySlug,
6709 + query
6710 + );
6711 + const { createWarningNotice } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_notices_namespaceObject.store);
6712 + const showRedirectionPreventedNotice = (event) => {
6713 + event.preventDefault();
6714 + createWarningNotice((0,external_wp_i18n_namespaceObject.__)("Links are disabled in the editor."), {
6715 + id: `block-library/core/categories/redirection-prevented/${clientId}`,
6716 + type: "snackbar"
6717 + });
6718 + };
6719 + const getCategoriesList = (parentId) => {
6720 + if (!categories?.length) {
6721 + return [];
6722 + }
6723 + if (parentId === null) {
6724 + return categories;
6725 + }
6726 + return categories.filter(({ parent }) => parent === parentId);
6727 + };
6728 + const toggleAttribute = (attributeName) => (newValue) => setAttributes({ [attributeName]: newValue });
6729 + const renderCategoryName = (name) => !name ? (0,external_wp_i18n_namespaceObject.__)("(Untitled)") : (0,external_wp_htmlEntities_namespaceObject.decodeEntities)(name).trim();
6730 + const renderCategoryList = () => {
6731 + const parentId = isHierarchicalTaxonomy && showHierarchy ? 0 : null;
6732 + const categoriesList = getCategoriesList(parentId);
6733 + return categoriesList.map(
6734 + (category) => renderCategoryListItem(category)
6735 + );
6736 + };
6737 + const renderCategoryListItem = (category) => {
6738 + const childCategories = getCategoriesList(category.id);
6739 + const { id, link, count, name } = category;
6740 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("li", { className: `cat-item cat-item-${id}`, children: [
6741 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("a", { href: link, onClick: showRedirectionPreventedNotice, children: renderCategoryName(name) }),
6742 + showPostCounts && ` (${count})`,
6743 + isHierarchicalTaxonomy && showHierarchy && !!childCategories.length && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("ul", { className: "children", children: childCategories.map(
6744 + (childCategory) => renderCategoryListItem(childCategory)
6745 + ) })
6746 + ] }, id);
6747 + };
6748 + const renderCategoryDropdown = () => {
6749 + const parentId = isHierarchicalTaxonomy && showHierarchy ? 0 : null;
6750 + const categoriesList = getCategoriesList(parentId);
6751 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
6752 + showLabel ? /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
6753 + external_wp_blockEditor_namespaceObject.RichText,
6754 + {
6755 + className: "wp-block-categories__label",
6756 + "aria-label": (0,external_wp_i18n_namespaceObject.__)("Label text"),
6757 + placeholder: taxonomy?.name,
6758 + withoutInteractiveFormatting: true,
6759 + value: label,
6760 + onChange: (html) => setAttributes({ label: html })
6761 + }
6762 + ) : /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.VisuallyHidden, { as: "label", htmlFor: selectId, children: label ? label : taxonomy?.name }),
6763 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("select", { id: selectId, children: [
6764 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("option", { children: (0,external_wp_i18n_namespaceObject.sprintf)(
6765 + /* translators: %s: taxonomy's singular name */
6766 + (0,external_wp_i18n_namespaceObject.__)("Select %s"),
6767 + taxonomy?.labels?.singular_name
6768 + ) }),
6769 + categoriesList.map(
6770 + (category) => renderCategoryDropdownItem(category, 0)
6771 + )
6772 + ] })
6773 + ] });
6774 + };
6775 + const renderCategoryDropdownItem = (category, level) => {
6776 + const { id, count, name } = category;
6777 + const childCategories = getCategoriesList(id);
6778 + return [
6779 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("option", { className: `level-${level}`, children: [
6780 + Array.from({ length: level * 3 }).map(() => "\xA0"),
6781 + renderCategoryName(name),
6782 + showPostCounts && ` (${count})`
6783 + ] }, id),
6784 + isHierarchicalTaxonomy && showHierarchy && !!childCategories.length && childCategories.map(
6785 + (childCategory) => renderCategoryDropdownItem(childCategory, level + 1)
6786 + )
6787 + ];
6788 + };
6789 + const TagName = !!categories?.length && !displayAsDropdown && !isResolving ? "ul" : "div";
6790 + const classes = dist_clsx(className, {
6791 + "wp-block-categories-list": !!categories?.length && !displayAsDropdown && !isResolving,
6792 + "wp-block-categories-dropdown": !!categories?.length && displayAsDropdown && !isResolving
6793 + });
6794 + const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)({
6795 + className: classes
6796 + });
6797 + const dropdownMenuProps = useToolsPanelDropdownMenuProps();
6798 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(TagName, { ...blockProps, children: [
6799 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(
6800 + external_wp_components_namespaceObject.__experimentalToolsPanel,
6801 + {
6802 + label: (0,external_wp_i18n_namespaceObject.__)("Settings"),
6803 + resetAll: () => {
6804 + setAttributes({
6805 + taxonomy: "category",
6806 + displayAsDropdown: false,
6807 + showHierarchy: false,
6808 + showPostCounts: false,
6809 + showOnlyTopLevel: false,
6810 + showEmpty: false,
6811 + showLabel: true
6812 + });
6813 + },
6814 + dropdownMenuProps,
6815 + children: [
6816 + Array.isArray(taxonomies) && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
6817 + external_wp_components_namespaceObject.__experimentalToolsPanelItem,
6818 + {
6819 + hasValue: () => {
6820 + return taxonomySlug !== "category";
6821 + },
6822 + label: (0,external_wp_i18n_namespaceObject.__)("Taxonomy"),
6823 + onDeselect: () => {
6824 + setAttributes({ taxonomy: "category" });
6825 + },
6826 + isShownByDefault: true,
6827 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
6828 + external_wp_components_namespaceObject.SelectControl,
6829 + {
6830 + __nextHasNoMarginBottom: true,
6831 + __next40pxDefaultSize: true,
6832 + label: (0,external_wp_i18n_namespaceObject.__)("Taxonomy"),
6833 + options: taxonomies.map((t) => ({
6834 + label: t.name,
6835 + value: t.slug
6836 + })),
6837 + value: taxonomySlug,
6838 + onChange: (selectedTaxonomy) => setAttributes({
6839 + taxonomy: selectedTaxonomy
6840 + })
6841 + }
6842 + )
6843 + }
6844 + ),
6845 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
6846 + external_wp_components_namespaceObject.__experimentalToolsPanelItem,
6847 + {
6848 + hasValue: () => !!displayAsDropdown,
6849 + label: (0,external_wp_i18n_namespaceObject.__)("Display as dropdown"),
6850 + onDeselect: () => setAttributes({ displayAsDropdown: false }),
6851 + isShownByDefault: true,
6852 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
6853 + external_wp_components_namespaceObject.ToggleControl,
6854 + {
6855 + __nextHasNoMarginBottom: true,
6856 + label: (0,external_wp_i18n_namespaceObject.__)("Display as dropdown"),
6857 + checked: displayAsDropdown,
6858 + onChange: toggleAttribute("displayAsDropdown")
6859 + }
6860 + )
6861 + }
6862 + ),
6863 + displayAsDropdown && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
6864 + external_wp_components_namespaceObject.__experimentalToolsPanelItem,
6865 + {
6866 + hasValue: () => !showLabel,
6867 + label: (0,external_wp_i18n_namespaceObject.__)("Show label"),
6868 + onDeselect: () => setAttributes({ showLabel: true }),
6869 + isShownByDefault: true,
6870 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
6871 + external_wp_components_namespaceObject.ToggleControl,
6872 + {
6873 + __nextHasNoMarginBottom: true,
6874 + className: "wp-block-categories__indentation",
6875 + label: (0,external_wp_i18n_namespaceObject.__)("Show label"),
6876 + checked: showLabel,
6877 + onChange: toggleAttribute("showLabel")
6878 + }
6879 + )
6880 + }
6881 + ),
6882 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
6883 + external_wp_components_namespaceObject.__experimentalToolsPanelItem,
6884 + {
6885 + hasValue: () => !!showPostCounts,
6886 + label: (0,external_wp_i18n_namespaceObject.__)("Show post counts"),
6887 + onDeselect: () => setAttributes({ showPostCounts: false }),
6888 + isShownByDefault: true,
6889 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
6890 + external_wp_components_namespaceObject.ToggleControl,
6891 + {
6892 + __nextHasNoMarginBottom: true,
6893 + label: (0,external_wp_i18n_namespaceObject.__)("Show post counts"),
6894 + checked: showPostCounts,
6895 + onChange: toggleAttribute("showPostCounts")
6896 + }
6897 + )
6898 + }
6899 + ),
6900 + isHierarchicalTaxonomy && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
6901 + external_wp_components_namespaceObject.__experimentalToolsPanelItem,
6902 + {
6903 + hasValue: () => !!showOnlyTopLevel,
6904 + label: (0,external_wp_i18n_namespaceObject.__)("Show only top level terms"),
6905 + onDeselect: () => setAttributes({ showOnlyTopLevel: false }),
6906 + isShownByDefault: true,
6907 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
6908 + external_wp_components_namespaceObject.ToggleControl,
6909 + {
6910 + __nextHasNoMarginBottom: true,
6911 + label: (0,external_wp_i18n_namespaceObject.__)("Show only top level terms"),
6912 + checked: showOnlyTopLevel,
6913 + onChange: toggleAttribute(
6914 + "showOnlyTopLevel"
6915 + )
6916 + }
6917 + )
6918 + }
6919 + ),
6920 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
6921 + external_wp_components_namespaceObject.__experimentalToolsPanelItem,
6922 + {
6923 + hasValue: () => !!showEmpty,
6924 + label: (0,external_wp_i18n_namespaceObject.__)("Show empty terms"),
6925 + onDeselect: () => setAttributes({ showEmpty: false }),
6926 + isShownByDefault: true,
6927 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
6928 + external_wp_components_namespaceObject.ToggleControl,
6929 + {
6930 + __nextHasNoMarginBottom: true,
6931 + label: (0,external_wp_i18n_namespaceObject.__)("Show empty terms"),
6932 + checked: showEmpty,
6933 + onChange: toggleAttribute("showEmpty")
6934 + }
6935 + )
6936 + }
6937 + ),
6938 + isHierarchicalTaxonomy && !showOnlyTopLevel && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
6939 + external_wp_components_namespaceObject.__experimentalToolsPanelItem,
6940 + {
6941 + hasValue: () => !!showHierarchy,
6942 + label: (0,external_wp_i18n_namespaceObject.__)("Show hierarchy"),
6943 + onDeselect: () => setAttributes({ showHierarchy: false }),
6944 + isShownByDefault: true,
6945 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
6946 + external_wp_components_namespaceObject.ToggleControl,
6947 + {
6948 + __nextHasNoMarginBottom: true,
6949 + label: (0,external_wp_i18n_namespaceObject.__)("Show hierarchy"),
6950 + checked: showHierarchy,
6951 + onChange: toggleAttribute("showHierarchy")
6952 + }
6953 + )
6954 + }
6955 + )
6956 + ]
6957 + }
6958 + ) }),
6959 + isResolving && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Placeholder, { icon: pin_default, label: (0,external_wp_i18n_namespaceObject.__)("Terms"), children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Spinner, {}) }),
6960 + !isResolving && categories?.length === 0 && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("p", { children: taxonomy.labels.no_terms }),
6961 + !isResolving && categories?.length > 0 && (displayAsDropdown ? renderCategoryDropdown() : renderCategoryList())
6962 + ] });
6963 + }
6964 +
6965 +
6966 + ;// ./node_modules/@wordpress/block-library/build-module/categories/variations.js
6967 +
6968 +
6969 + const variations = [
6970 + {
6971 + name: "terms",
6972 + title: (0,external_wp_i18n_namespaceObject.__)("Terms List"),
6973 + icon: category_default,
6974 + attributes: {
6975 + // We need to set an attribute here that will be set when inserting the block.
6976 + // We cannot leave this empty, as that would be interpreted as the default value,
6977 + // which is `category` -- for which we're defining a distinct variation below,
6978 + // for backwards compatibility reasons.
6979 + // The logical fallback is thus the only other built-in and public taxonomy: Tags.
6980 + taxonomy: "post_tag"
6981 + },
6982 + isActive: (blockAttributes) => (
6983 + // This variation is used for any taxonomy other than `category`.
6984 + blockAttributes.taxonomy !== "category"
6985 + )
6986 + },
6987 + {
6988 + name: "categories",
6989 + title: (0,external_wp_i18n_namespaceObject.__)("Categories List"),
6990 + description: (0,external_wp_i18n_namespaceObject.__)("Display a list of all categories."),
6991 + icon: category_default,
6992 + attributes: {
6993 + taxonomy: "category"
6994 + },
6995 + isActive: ["taxonomy"],
6996 + // The following is needed to prevent "Terms List" from showing up twice in the inserter
6997 + // (once for the block, once for the variation). Fortunately, it does not collide with
6998 + // `categories` being the default value of the `taxonomy` attribute.
6999 + isDefault: true
7000 + }
7001 + ];
7002 + var variations_default = variations;
7003 +
7004 +
7005 + ;// ./node_modules/@wordpress/block-library/build-module/categories/index.js
7006 +
7007 +
7008 +
7009 +
7010 +
7011 + const { name: categories_name } = categories_block_namespaceObject;
7012 + const categories_settings = {
7013 + icon: category_default,
7014 + example: {},
7015 + edit: CategoriesEdit,
7016 + variations: variations_default
7017 + };
7018 + const categories_init = () => initBlock({ name: categories_name, metadata: categories_block_namespaceObject, settings: categories_settings });
7019 +
7020 +
7021 + ;// ./node_modules/@wordpress/icons/build-module/library/classic.js
7022 +
7023 +
7024 + var classic_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M20 6H4c-1.1 0-2 .9-2 2v9c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2zm.5 11c0 .3-.2.5-.5.5H4c-.3 0-.5-.2-.5-.5V8c0-.3.2-.5.5-.5h16c.3 0 .5.2.5.5v9zM10 10H8v2h2v-2zm-5 2h2v-2H5v2zm8-2h-2v2h2v-2zm-5 6h8v-2H8v2zm6-4h2v-2h-2v2zm3 0h2v-2h-2v2zm0 4h2v-2h-2v2zM5 16h2v-2H5v2z" }) });
7025 +
7026 +
7027 + ;// ./node_modules/@wordpress/block-library/build-module/freeform/convert-to-blocks-button.js
7028 +
7029 +
7030 +
7031 +
7032 +
7033 +
7034 + const ConvertToBlocksButton = ({ clientId }) => {
7035 + const { replaceBlocks } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_blockEditor_namespaceObject.store);
7036 + const block = (0,external_wp_data_namespaceObject.useSelect)(
7037 + (select) => {
7038 + return select(external_wp_blockEditor_namespaceObject.store).getBlock(clientId);
7039 + },
7040 + [clientId]
7041 + );
7042 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
7043 + external_wp_components_namespaceObject.ToolbarButton,
7044 + {
7045 + onClick: () => replaceBlocks(
7046 + block.clientId,
7047 + (0,external_wp_blocks_namespaceObject.rawHandler)({ HTML: (0,external_wp_blocks_namespaceObject.serialize)(block) })
7048 + ),
7049 + children: (0,external_wp_i18n_namespaceObject.__)("Convert to blocks")
7050 + }
7051 + );
7052 + };
7053 + var convert_to_blocks_button_default = ConvertToBlocksButton;
7054 +
7055 +
7056 + ;// ./node_modules/@wordpress/icons/build-module/library/fullscreen.js
7057 +
7058 +
7059 + var fullscreen_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M6 4a2 2 0 0 0-2 2v3h1.5V6a.5.5 0 0 1 .5-.5h3V4H6Zm3 14.5H6a.5.5 0 0 1-.5-.5v-3H4v3a2 2 0 0 0 2 2h3v-1.5Zm6 1.5v-1.5h3a.5.5 0 0 0 .5-.5v-3H20v3a2 2 0 0 1-2 2h-3Zm3-16a2 2 0 0 1 2 2v3h-1.5V6a.5.5 0 0 0-.5-.5h-3V4h3Z" }) });
7060 +
7061 +
7062 + ;// ./node_modules/@wordpress/block-library/build-module/freeform/modal.js
7063 +
7064 +
7065 +
7066 +
7067 +
7068 +
7069 +
7070 +
7071 + function ModalAuxiliaryActions({ onClick, isModalFullScreen }) {
7072 + const isMobileViewport = (0,external_wp_compose_namespaceObject.useViewportMatch)("small", "<");
7073 + if (isMobileViewport) {
7074 + return null;
7075 + }
7076 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
7077 + external_wp_components_namespaceObject.Button,
7078 + {
7079 + size: "compact",
7080 + onClick,
7081 + icon: fullscreen_default,
7082 + isPressed: isModalFullScreen,
7083 + label: isModalFullScreen ? (0,external_wp_i18n_namespaceObject.__)("Exit fullscreen") : (0,external_wp_i18n_namespaceObject.__)("Enter fullscreen")
7084 + }
7085 + );
7086 + }
7087 + function ClassicEdit(props) {
7088 + const styles = (0,external_wp_data_namespaceObject.useSelect)(
7089 + (select) => select(external_wp_blockEditor_namespaceObject.store).getSettings().styles
7090 + );
7091 + (0,external_wp_element_namespaceObject.useEffect)(() => {
7092 + const { baseURL, suffix, settings } = window.wpEditorL10n.tinymce;
7093 + window.tinymce.EditorManager.overrideDefaults({
7094 + base_url: baseURL,
7095 + suffix
7096 + });
7097 + window.wp.oldEditor.initialize(props.id, {
7098 + tinymce: {
7099 + ...settings,
7100 + setup(editor) {
7101 + editor.on("init", () => {
7102 + const doc = editor.getDoc();
7103 + styles.forEach(({ css }) => {
7104 + const styleEl = doc.createElement("style");
7105 + styleEl.innerHTML = css;
7106 + doc.head.appendChild(styleEl);
7107 + });
7108 + });
7109 + }
7110 + }
7111 + });
7112 + return () => {
7113 + window.wp.oldEditor.remove(props.id);
7114 + };
7115 + }, []);
7116 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("textarea", { ...props });
7117 + }
7118 + function ModalEdit(props) {
7119 + const {
7120 + clientId,
7121 + attributes: { content },
7122 + setAttributes,
7123 + onReplace
7124 + } = props;
7125 + const [isOpen, setOpen] = (0,external_wp_element_namespaceObject.useState)(false);
7126 + const [isModalFullScreen, setIsModalFullScreen] = (0,external_wp_element_namespaceObject.useState)(false);
7127 + const id = `editor-${clientId}`;
7128 + const onClose = () => content ? setOpen(false) : onReplace([]);
7129 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
7130 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockControls, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ToolbarGroup, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ToolbarButton, { onClick: () => setOpen(true), children: (0,external_wp_i18n_namespaceObject.__)("Edit") }) }) }),
7131 + content && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_element_namespaceObject.RawHTML, { children: content }),
7132 + (isOpen || !content) && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(
7133 + external_wp_components_namespaceObject.Modal,
7134 + {
7135 + title: (0,external_wp_i18n_namespaceObject.__)("Classic Editor"),
7136 + onRequestClose: onClose,
7137 + shouldCloseOnClickOutside: false,
7138 + overlayClassName: "block-editor-freeform-modal",
7139 + isFullScreen: isModalFullScreen,
7140 + className: "block-editor-freeform-modal__content",
7141 + headerActions: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
7142 + ModalAuxiliaryActions,
7143 + {
7144 + onClick: () => setIsModalFullScreen(!isModalFullScreen),
7145 + isModalFullScreen
7146 + }
7147 + ),
7148 + children: [
7149 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(ClassicEdit, { id, defaultValue: content }),
7150 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(
7151 + external_wp_components_namespaceObject.Flex,
7152 + {
7153 + className: "block-editor-freeform-modal__actions",
7154 + justify: "flex-end",
7155 + expanded: false,
7156 + children: [
7157 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.FlexItem, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
7158 + external_wp_components_namespaceObject.Button,
7159 + {
7160 + __next40pxDefaultSize: true,
7161 + variant: "tertiary",
7162 + onClick: onClose,
7163 + children: (0,external_wp_i18n_namespaceObject.__)("Cancel")
7164 + }
7165 + ) }),
7166 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.FlexItem, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
7167 + external_wp_components_namespaceObject.Button,
7168 + {
7169 + __next40pxDefaultSize: true,
7170 + variant: "primary",
7171 + onClick: () => {
7172 + setAttributes({
7173 + content: window.wp.oldEditor.getContent(
7174 + id
7175 + )
7176 + });
7177 + setOpen(false);
7178 + },
7179 + children: (0,external_wp_i18n_namespaceObject.__)("Save")
7180 + }
7181 + ) })
7182 + ]
7183 + }
7184 + )
7185 + ]
7186 + }
7187 + )
7188 + ] });
7189 + }
7190 +
7191 +
7192 + ;// ./node_modules/@wordpress/block-library/build-module/freeform/edit.js
7193 +
7194 +
7195 +
7196 +
7197 +
7198 +
7199 +
7200 +
7201 +
7202 +
7203 + const { wp } = window;
7204 + function isTmceEmpty(editor) {
7205 + const body = editor.getBody();
7206 + if (body.childNodes.length > 1) {
7207 + return false;
7208 + } else if (body.childNodes.length === 0) {
7209 + return true;
7210 + }
7211 + if (body.childNodes[0].childNodes.length > 1) {
7212 + return false;
7213 + }
7214 + return /^\n?$/.test(body.innerText || body.textContent);
7215 + }
7216 + function FreeformEdit(props) {
7217 + const { clientId } = props;
7218 + const canRemove = (0,external_wp_data_namespaceObject.useSelect)(
7219 + (select) => select(external_wp_blockEditor_namespaceObject.store).canRemoveBlock(clientId),
7220 + [clientId]
7221 + );
7222 + const [isIframed, setIsIframed] = (0,external_wp_element_namespaceObject.useState)(false);
7223 + const ref = (0,external_wp_compose_namespaceObject.useRefEffect)((element) => {
7224 + setIsIframed(element.ownerDocument !== document);
7225 + }, []);
7226 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
7227 + canRemove && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockControls, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ToolbarGroup, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(convert_to_blocks_button_default, { clientId }) }) }),
7228 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { ...(0,external_wp_blockEditor_namespaceObject.useBlockProps)({ ref }), children: isIframed ? /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(ModalEdit, { ...props }) : /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(edit_ClassicEdit, { ...props }) })
7229 + ] });
7230 + }
7231 + function edit_ClassicEdit({
7232 + clientId,
7233 + attributes: { content },
7234 + setAttributes,
7235 + onReplace
7236 + }) {
7237 + const { getMultiSelectedBlockClientIds } = (0,external_wp_data_namespaceObject.useSelect)(external_wp_blockEditor_namespaceObject.store);
7238 + const didMountRef = (0,external_wp_element_namespaceObject.useRef)(false);
7239 + (0,external_wp_element_namespaceObject.useEffect)(() => {
7240 + if (!didMountRef.current) {
7241 + return;
7242 + }
7243 + const editor = window.tinymce.get(`editor-${clientId}`);
7244 + if (!editor) {
7245 + return;
7246 + }
7247 + const currentContent = editor.getContent();
7248 + if (currentContent !== content) {
7249 + editor.setContent(content || "");
7250 + }
7251 + }, [clientId, content]);
7252 + (0,external_wp_element_namespaceObject.useEffect)(() => {
7253 + const { baseURL, suffix } = window.wpEditorL10n.tinymce;
7254 + didMountRef.current = true;
7255 + window.tinymce.EditorManager.overrideDefaults({
7256 + base_url: baseURL,
7257 + suffix
7258 + });
7259 + function onSetup(editor) {
7260 + let bookmark;
7261 + if (content) {
7262 + editor.on("loadContent", () => editor.setContent(content));
7263 + }
7264 + editor.on("blur", () => {
7265 + bookmark = editor.selection.getBookmark(2, true);
7266 + const scrollContainer = document.querySelector(
7267 + ".interface-interface-skeleton__content"
7268 + );
7269 + const scrollPosition = scrollContainer.scrollTop;
7270 + if (!getMultiSelectedBlockClientIds()?.length) {
7271 + setAttributes({
7272 + content: editor.getContent()
7273 + });
7274 + }
7275 + editor.once("focus", () => {
7276 + if (bookmark) {
7277 + editor.selection.moveToBookmark(bookmark);
7278 + if (scrollContainer.scrollTop !== scrollPosition) {
7279 + scrollContainer.scrollTop = scrollPosition;
7280 + }
7281 + }
7282 + });
7283 + return false;
7284 + });
7285 + editor.on("mousedown touchstart", () => {
7286 + bookmark = null;
7287 + });
7288 + const debouncedOnChange = (0,external_wp_compose_namespaceObject.debounce)(() => {
7289 + const value = editor.getContent();
7290 + if (value !== editor._lastChange) {
7291 + editor._lastChange = value;
7292 + setAttributes({
7293 + content: value
7294 + });
7295 + }
7296 + }, 250);
7297 + editor.on("Paste Change input Undo Redo", debouncedOnChange);
7298 + editor.on("remove", debouncedOnChange.cancel);
7299 + editor.on("keydown", (event) => {
7300 + if (external_wp_keycodes_namespaceObject.isKeyboardEvent.primary(event, "z")) {
7301 + event.stopPropagation();
7302 + }
7303 + if ((event.keyCode === external_wp_keycodes_namespaceObject.BACKSPACE || event.keyCode === external_wp_keycodes_namespaceObject.DELETE) && isTmceEmpty(editor)) {
7304 + onReplace([]);
7305 + event.preventDefault();
7306 + event.stopImmediatePropagation();
7307 + }
7308 + const { altKey } = event;
7309 + if (altKey && event.keyCode === external_wp_keycodes_namespaceObject.F10) {
7310 + event.stopPropagation();
7311 + }
7312 + });
7313 + editor.on("paste", (event) => {
7314 + event.stopPropagation();
7315 + });
7316 + editor.on("init", () => {
7317 + const rootNode = editor.getBody();
7318 + if (rootNode.ownerDocument.activeElement === rootNode) {
7319 + rootNode.blur();
7320 + editor.focus();
7321 + }
7322 + });
7323 + }
7324 + function initialize() {
7325 + const { settings } = window.wpEditorL10n.tinymce;
7326 + wp.oldEditor.initialize(`editor-${clientId}`, {
7327 + tinymce: {
7328 + ...settings,
7329 + inline: true,
7330 + content_css: false,
7331 + fixed_toolbar_container: `#toolbar-${clientId}`,
7332 + setup: onSetup
7333 + }
7334 + });
7335 + }
7336 + function onReadyStateChange() {
7337 + if (document.readyState === "complete") {
7338 + initialize();
7339 + }
7340 + }
7341 + if (document.readyState === "complete") {
7342 + initialize();
7343 + } else {
7344 + document.addEventListener("readystatechange", onReadyStateChange);
7345 + }
7346 + return () => {
7347 + document.removeEventListener(
7348 + "readystatechange",
7349 + onReadyStateChange
7350 + );
7351 + wp.oldEditor.remove(`editor-${clientId}`);
7352 + didMountRef.current = false;
7353 + };
7354 + }, []);
7355 + function focus() {
7356 + const editor = window.tinymce.get(`editor-${clientId}`);
7357 + if (editor) {
7358 + editor.focus();
7359 + }
7360 + }
7361 + function onToolbarKeyDown(event) {
7362 + event.stopPropagation();
7363 + event.nativeEvent.stopImmediatePropagation();
7364 + }
7365 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
7366 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
7367 + "div",
7368 + {
7369 + id: `toolbar-${clientId}`,
7370 + className: "block-library-classic__toolbar",
7371 + onClick: focus,
7372 + "data-placeholder": (0,external_wp_i18n_namespaceObject.__)("Classic"),
7373 + onKeyDown: onToolbarKeyDown
7374 + },
7375 + "toolbar"
7376 + ),
7377 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
7378 + "div",
7379 + {
7380 + id: `editor-${clientId}`,
7381 + className: "wp-block-freeform block-library-rich-text__tinymce"
7382 + },
7383 + "editor"
7384 + )
7385 + ] });
7386 + }
7387 +
7388 +
7389 + ;// ./node_modules/@wordpress/block-library/build-module/freeform/block.json
7390 + const freeform_block_namespaceObject = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/freeform","title":"Classic","category":"text","description":"Use the classic WordPress editor.","textdomain":"default","attributes":{"content":{"type":"string","source":"raw"}},"supports":{"html":false,"className":false,"customClassName":false,"lock":false,"reusable":false,"renaming":false,"visibility":false},"editorStyle":"wp-block-freeform-editor"}');
7391 + ;// ./node_modules/@wordpress/block-library/build-module/freeform/save.js
7392 +
7393 +
7394 + function freeform_save_save({ attributes }) {
7395 + const { content } = attributes;
7396 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_element_namespaceObject.RawHTML, { children: content });
7397 + }
7398 +
7399 +
7400 + ;// ./node_modules/@wordpress/block-library/build-module/freeform/index.js
7401 +
7402 +
7403 +
7404 +
7405 +
7406 + const { name: freeform_name } = freeform_block_namespaceObject;
7407 + const freeform_settings = {
7408 + icon: classic_default,
7409 + edit: FreeformEdit,
7410 + save: freeform_save_save
7411 + };
7412 + const freeform_init = () => initBlock({ name: freeform_name, metadata: freeform_block_namespaceObject, settings: freeform_settings });
7413 +
7414 +
7415 + ;// ./node_modules/@wordpress/icons/build-module/library/code.js
7416 +
7417 +
7418 + var code_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M20.8 10.7l-4.3-4.3-1.1 1.1 4.3 4.3c.1.1.1.3 0 .4l-4.3 4.3 1.1 1.1 4.3-4.3c.7-.8.7-1.9 0-2.6zM4.2 11.8l4.3-4.3-1-1-4.3 4.3c-.7.7-.7 1.8 0 2.5l4.3 4.3 1.1-1.1-4.3-4.3c-.2-.1-.2-.3-.1-.4z" }) });
7419 +
7420 +
7421 + ;// ./node_modules/@wordpress/block-library/build-module/code/edit.js
7422 +
7423 +
7424 +
7425 +
7426 + function CodeEdit({
7427 + attributes,
7428 + setAttributes,
7429 + onRemove,
7430 + insertBlocksAfter,
7431 + mergeBlocks
7432 + }) {
7433 + const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)();
7434 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("pre", { ...blockProps, children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
7435 + external_wp_blockEditor_namespaceObject.RichText,
7436 + {
7437 + tagName: "code",
7438 + identifier: "content",
7439 + value: attributes.content,
7440 + onChange: (content) => setAttributes({ content }),
7441 + onRemove,
7442 + onMerge: mergeBlocks,
7443 + placeholder: (0,external_wp_i18n_namespaceObject.__)("Write code\u2026"),
7444 + "aria-label": (0,external_wp_i18n_namespaceObject.__)("Code"),
7445 + preserveWhiteSpace: true,
7446 + __unstablePastePlainText: true,
7447 + __unstableOnSplitAtDoubleLineEnd: () => insertBlocksAfter((0,external_wp_blocks_namespaceObject.createBlock)((0,external_wp_blocks_namespaceObject.getDefaultBlockName)()))
7448 + }
7449 + ) });
7450 + }
7451 +
7452 +
7453 + ;// ./node_modules/@wordpress/block-library/build-module/code/block.json
7454 + const code_block_namespaceObject = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/code","title":"Code","category":"text","description":"Display code snippets that respect your spacing and tabs.","textdomain":"default","attributes":{"content":{"type":"rich-text","source":"rich-text","selector":"code","__unstablePreserveWhiteSpace":true,"role":"content"}},"supports":{"align":["wide"],"anchor":true,"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"spacing":{"margin":["top","bottom"],"padding":true,"__experimentalDefaultControls":{"margin":false,"padding":false}},"__experimentalBorder":{"radius":true,"color":true,"width":true,"style":true,"__experimentalDefaultControls":{"width":true,"color":true}},"color":{"text":true,"background":true,"gradients":true,"__experimentalDefaultControls":{"background":true,"text":true}},"interactivity":{"clientNavigation":true}},"style":"wp-block-code"}');
7455 + ;// ./node_modules/@wordpress/block-library/build-module/code/utils.js
7456 +
7457 + function utils_escape(content) {
7458 + return (0,external_wp_compose_namespaceObject.pipe)(
7459 + escapeOpeningSquareBrackets,
7460 + escapeProtocolInIsolatedUrls
7461 + )(content || "");
7462 + }
7463 + function escapeOpeningSquareBrackets(content) {
7464 + return content.replace(/\[/g, "&#91;");
7465 + }
7466 + function escapeProtocolInIsolatedUrls(content) {
7467 + return content.replace(
7468 + /^(\s*https?:)\/\/([^\s<>"]+\s*)$/m,
7469 + "$1&#47;&#47;$2"
7470 + );
7471 + }
7472 +
7473 +
7474 + ;// ./node_modules/@wordpress/block-library/build-module/code/save.js
7475 +
7476 +
7477 +
7478 + function code_save_save({ attributes }) {
7479 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("pre", { ...external_wp_blockEditor_namespaceObject.useBlockProps.save(), children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
7480 + external_wp_blockEditor_namespaceObject.RichText.Content,
7481 + {
7482 + tagName: "code",
7483 + value: utils_escape(
7484 + typeof attributes.content === "string" ? attributes.content : attributes.content.toHTMLString({
7485 + preserveWhiteSpace: true
7486 + })
7487 + )
7488 + }
7489 + ) });
7490 + }
7491 +
7492 +
7493 + ;// ./node_modules/@wordpress/block-library/build-module/code/transforms.js
7494 +
7495 +
7496 +
7497 + const code_transforms_transforms = {
7498 + from: [
7499 + {
7500 + type: "enter",
7501 + regExp: /^```$/,
7502 + transform: () => (0,external_wp_blocks_namespaceObject.createBlock)("core/code")
7503 + },
7504 + {
7505 + type: "block",
7506 + blocks: ["core/paragraph"],
7507 + transform: (attributes) => {
7508 + const { content } = attributes;
7509 + return (0,external_wp_blocks_namespaceObject.createBlock)("core/code", {
7510 + ...attributes,
7511 + ...getTransformedAttributes(attributes, "core/code"),
7512 + content
7513 + });
7514 + }
7515 + },
7516 + {
7517 + type: "block",
7518 + blocks: ["core/html"],
7519 + transform: (attributes) => {
7520 + const { content: text } = attributes;
7521 + return (0,external_wp_blocks_namespaceObject.createBlock)("core/code", {
7522 + ...attributes,
7523 + ...getTransformedAttributes(attributes, "core/code"),
7524 + // The HTML is plain text (with plain line breaks), so
7525 + // convert it to rich text.
7526 + content: (0,external_wp_richText_namespaceObject.toHTMLString)({ value: (0,external_wp_richText_namespaceObject.create)({ text }) })
7527 + });
7528 + }
7529 + },
7530 + {
7531 + type: "raw",
7532 + isMatch: (node) => node.nodeName === "PRE" && node.children.length === 1 && node.firstChild.nodeName === "CODE",
7533 + schema: {
7534 + pre: {
7535 + children: {
7536 + code: {
7537 + children: {
7538 + "#text": {}
7539 + }
7540 + }
7541 + }
7542 + }
7543 + }
7544 + }
7545 + ],
7546 + to: [
7547 + {
7548 + type: "block",
7549 + blocks: ["core/paragraph"],
7550 + transform: (attributes) => {
7551 + const { content } = attributes;
7552 + return (0,external_wp_blocks_namespaceObject.createBlock)("core/paragraph", {
7553 + ...getTransformedAttributes(attributes, "core/paragraph"),
7554 + content
7555 + });
7556 + }
7557 + }
7558 + ]
7559 + };
7560 + var code_transforms_transforms_default = code_transforms_transforms;
7561 +
7562 +
7563 + ;// ./node_modules/@wordpress/block-library/build-module/code/index.js
7564 +
7565 +
7566 +
7567 +
7568 +
7569 +
7570 +
7571 + const { name: code_name } = code_block_namespaceObject;
7572 + const code_settings = {
7573 + icon: code_default,
7574 + example: {
7575 + attributes: {
7576 + /* eslint-disable @wordpress/i18n-no-collapsible-whitespace */
7577 + // translators: Preserve \n markers for line breaks
7578 + content: (0,external_wp_i18n_namespaceObject.__)(
7579 + "// A \u201Cblock\u201D is the abstract term used\n// to describe units of markup that\n// when composed together, form the\n// content or layout of a page.\nregisterBlockType( name, settings );"
7580 + )
7581 + /* eslint-enable @wordpress/i18n-no-collapsible-whitespace */
7582 + }
7583 + },
7584 + merge(attributes, attributesToMerge) {
7585 + return {
7586 + content: attributes.content + "\n\n" + attributesToMerge.content
7587 + };
7588 + },
7589 + transforms: code_transforms_transforms_default,
7590 + edit: CodeEdit,
7591 + save: code_save_save
7592 + };
7593 + const code_init = () => initBlock({ name: code_name, metadata: code_block_namespaceObject, settings: code_settings });
7594 +
7595 +
7596 + ;// ./node_modules/@wordpress/icons/build-module/library/column.js
7597 +
7598 +
7599 + var column_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M19 6H6c-1.1 0-2 .9-2 2v9c0 1.1.9 2 2 2h13c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2zM6 17.5c-.3 0-.5-.2-.5-.5V8c0-.3.2-.5.5-.5h3v10H6zm13.5-.5c0 .3-.2.5-.5.5h-3v-10h3c.3 0 .5.2.5.5v9z" }) });
7600 +
7601 +
7602 + ;// ./node_modules/@wordpress/block-library/build-module/column/deprecated.js
7603 +
7604 +
7605 +
7606 + const column_deprecated_deprecated = [
7607 + {
7608 + attributes: {
7609 + verticalAlignment: {
7610 + type: "string"
7611 + },
7612 + width: {
7613 + type: "number",
7614 + min: 0,
7615 + max: 100
7616 + }
7617 + },
7618 + isEligible({ width }) {
7619 + return isFinite(width);
7620 + },
7621 + migrate(attributes) {
7622 + return {
7623 + ...attributes,
7624 + width: `${attributes.width}%`
7625 + };
7626 + },
7627 + save({ attributes }) {
7628 + const { verticalAlignment, width } = attributes;
7629 + const wrapperClasses = dist_clsx({
7630 + [`is-vertically-aligned-${verticalAlignment}`]: verticalAlignment
7631 + });
7632 + const style = { flexBasis: width + "%" };
7633 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { className: wrapperClasses, style, children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, {}) });
7634 + }
7635 + }
7636 + ];
7637 + var column_deprecated_deprecated_default = column_deprecated_deprecated;
7638 +
7639 +
7640 + ;// ./node_modules/@wordpress/block-library/build-module/column/edit.js
7641 +
7642 +
7643 +
7644 +
7645 +
7646 +
7647 +
7648 + function ColumnInspectorControls({ width, setAttributes }) {
7649 + const [availableUnits] = (0,external_wp_blockEditor_namespaceObject.useSettings)("spacing.units");
7650 + const units = (0,external_wp_components_namespaceObject.__experimentalUseCustomUnits)({
7651 + availableUnits: availableUnits || ["%", "px", "em", "rem", "vw"]
7652 + });
7653 + const dropdownMenuProps = useToolsPanelDropdownMenuProps();
7654 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
7655 + external_wp_components_namespaceObject.__experimentalToolsPanel,
7656 + {
7657 + label: (0,external_wp_i18n_namespaceObject.__)("Settings"),
7658 + resetAll: () => {
7659 + setAttributes({ width: void 0 });
7660 + },
7661 + dropdownMenuProps,
7662 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
7663 + external_wp_components_namespaceObject.__experimentalToolsPanelItem,
7664 + {
7665 + hasValue: () => width !== void 0,
7666 + label: (0,external_wp_i18n_namespaceObject.__)("Width"),
7667 + onDeselect: () => setAttributes({ width: void 0 }),
7668 + isShownByDefault: true,
7669 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
7670 + external_wp_components_namespaceObject.__experimentalUnitControl,
7671 + {
7672 + label: (0,external_wp_i18n_namespaceObject.__)("Width"),
7673 + __unstableInputWidth: "calc(50% - 8px)",
7674 + __next40pxDefaultSize: true,
7675 + value: width || "",
7676 + onChange: (nextWidth) => {
7677 + nextWidth = 0 > parseFloat(nextWidth) ? "0" : nextWidth;
7678 + setAttributes({ width: nextWidth });
7679 + },
7680 + units
7681 + }
7682 + )
7683 + }
7684 + )
7685 + }
7686 + );
7687 + }
7688 + function ColumnEdit({
7689 + attributes: { verticalAlignment, width, templateLock, allowedBlocks },
7690 + setAttributes,
7691 + clientId
7692 + }) {
7693 + const classes = dist_clsx("block-core-columns", {
7694 + [`is-vertically-aligned-${verticalAlignment}`]: verticalAlignment
7695 + });
7696 + const { columnsIds, hasChildBlocks, rootClientId } = (0,external_wp_data_namespaceObject.useSelect)(
7697 + (select) => {
7698 + const { getBlockOrder, getBlockRootClientId } = select(external_wp_blockEditor_namespaceObject.store);
7699 + const rootId = getBlockRootClientId(clientId);
7700 + return {
7701 + hasChildBlocks: getBlockOrder(clientId).length > 0,
7702 + rootClientId: rootId,
7703 + columnsIds: getBlockOrder(rootId)
7704 + };
7705 + },
7706 + [clientId]
7707 + );
7708 + const { updateBlockAttributes } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_blockEditor_namespaceObject.store);
7709 + const updateAlignment = (value) => {
7710 + setAttributes({ verticalAlignment: value });
7711 + updateBlockAttributes(rootClientId, {
7712 + verticalAlignment: null
7713 + });
7714 + };
7715 + const widthWithUnit = Number.isFinite(width) ? width + "%" : width;
7716 + const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)({
7717 + className: classes,
7718 + style: widthWithUnit ? { flexBasis: widthWithUnit } : void 0
7719 + });
7720 + const columnsCount = columnsIds.length;
7721 + const currentColumnPosition = columnsIds.indexOf(clientId) + 1;
7722 + const label = (0,external_wp_i18n_namespaceObject.sprintf)(
7723 + /* translators: 1: Block label (i.e. "Block: Column"), 2: Position of the selected block, 3: Total number of sibling blocks of the same type */
7724 + (0,external_wp_i18n_namespaceObject.__)("%1$s (%2$d of %3$d)"),
7725 + blockProps["aria-label"],
7726 + currentColumnPosition,
7727 + columnsCount
7728 + );
7729 + const innerBlocksProps = (0,external_wp_blockEditor_namespaceObject.useInnerBlocksProps)(
7730 + { ...blockProps, "aria-label": label },
7731 + {
7732 + templateLock,
7733 + allowedBlocks,
7734 + renderAppender: hasChildBlocks ? void 0 : external_wp_blockEditor_namespaceObject.InnerBlocks.ButtonBlockAppender
7735 + }
7736 + );
7737 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
7738 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockControls, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
7739 + external_wp_blockEditor_namespaceObject.BlockVerticalAlignmentToolbar,
7740 + {
7741 + onChange: updateAlignment,
7742 + value: verticalAlignment,
7743 + controls: ["top", "center", "bottom", "stretch"]
7744 + }
7745 + ) }),
7746 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
7747 + ColumnInspectorControls,
7748 + {
7749 + width,
7750 + setAttributes
7751 + }
7752 + ) }),
7753 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { ...innerBlocksProps })
7754 + ] });
7755 + }
7756 + var column_edit_edit_default = ColumnEdit;
7757 +
7758 +
7759 + ;// ./node_modules/@wordpress/block-library/build-module/column/block.json
7760 + const column_block_namespaceObject = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/column","title":"Column","category":"design","parent":["core/columns"],"description":"A single column within a columns block.","textdomain":"default","attributes":{"verticalAlignment":{"type":"string"},"width":{"type":"string"},"templateLock":{"type":["string","boolean"],"enum":["all","insert","contentOnly",false]}},"supports":{"__experimentalOnEnter":true,"anchor":true,"reusable":false,"html":false,"color":{"gradients":true,"heading":true,"button":true,"link":true,"__experimentalDefaultControls":{"background":true,"text":true}},"shadow":true,"spacing":{"blockGap":true,"padding":true,"__experimentalDefaultControls":{"padding":true,"blockGap":true}},"__experimentalBorder":{"color":true,"radius":true,"style":true,"width":true,"__experimentalDefaultControls":{"color":true,"radius":true,"style":true,"width":true}},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"layout":true,"interactivity":{"clientNavigation":true},"allowedBlocks":true}}');
7761 + ;// ./node_modules/@wordpress/block-library/build-module/column/save.js
7762 +
7763 +
7764 +
7765 + function column_save_save({ attributes }) {
7766 + const { verticalAlignment, width } = attributes;
7767 + const wrapperClasses = dist_clsx({
7768 + [`is-vertically-aligned-${verticalAlignment}`]: verticalAlignment
7769 + });
7770 + let style;
7771 + if (width && /\d/.test(width)) {
7772 + let flexBasis = Number.isFinite(width) ? width + "%" : width;
7773 + if (!Number.isFinite(width) && width?.endsWith("%")) {
7774 + const multiplier = 1e12;
7775 + flexBasis = Math.round(Number.parseFloat(width) * multiplier) / multiplier + "%";
7776 + }
7777 + style = { flexBasis };
7778 + }
7779 + const blockProps = external_wp_blockEditor_namespaceObject.useBlockProps.save({
7780 + className: wrapperClasses,
7781 + style
7782 + });
7783 + const innerBlocksProps = external_wp_blockEditor_namespaceObject.useInnerBlocksProps.save(blockProps);
7784 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { ...innerBlocksProps });
7785 + }
7786 +
7787 +
7788 + ;// ./node_modules/@wordpress/block-library/build-module/column/index.js
7789 +
7790 +
7791 +
7792 +
7793 +
7794 +
7795 + const { name: column_name } = column_block_namespaceObject;
7796 + const column_settings = {
7797 + icon: column_default,
7798 + edit: column_edit_edit_default,
7799 + save: column_save_save,
7800 + deprecated: column_deprecated_deprecated_default
7801 + };
7802 + const column_init = () => initBlock({ name: column_name, metadata: column_block_namespaceObject, settings: column_settings });
7803 +
7804 +
7805 + ;// ./node_modules/@wordpress/icons/build-module/library/columns.js
7806 +
7807 +
7808 + var columns_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
7809 + external_wp_primitives_namespaceObject.Path,
7810 + {
7811 + fillRule: "evenodd",
7812 + clipRule: "evenodd",
7813 + d: "M15 7.5h-5v10h5v-10Zm1.5 0v10H19a.5.5 0 0 0 .5-.5V8a.5.5 0 0 0-.5-.5h-2.5ZM6 7.5h2.5v10H6a.5.5 0 0 1-.5-.5V8a.5.5 0 0 1 .5-.5ZM6 6h13a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2Z"
7814 + }
7815 + ) });
7816 +
7817 +
7818 + ;// ./node_modules/@wordpress/block-library/build-module/columns/deprecated.js
7819 +
7820 +
7821 +
7822 +
7823 + function getDeprecatedLayoutColumn(originalContent) {
7824 + let { doc } = getDeprecatedLayoutColumn;
7825 + if (!doc) {
7826 + doc = document.implementation.createHTMLDocument("");
7827 + getDeprecatedLayoutColumn.doc = doc;
7828 + }
7829 + let columnMatch;
7830 + doc.body.innerHTML = originalContent;
7831 + for (const classListItem of doc.body.firstChild.classList) {
7832 + if (columnMatch = classListItem.match(/^layout-column-(\d+)$/)) {
7833 + return Number(columnMatch[1]) - 1;
7834 + }
7835 + }
7836 + }
7837 + const migrateCustomColors = (attributes) => {
7838 + if (!attributes.customTextColor && !attributes.customBackgroundColor) {
7839 + return attributes;
7840 + }
7841 + const style = { color: {} };
7842 + if (attributes.customTextColor) {
7843 + style.color.text = attributes.customTextColor;
7844 + }
7845 + if (attributes.customBackgroundColor) {
7846 + style.color.background = attributes.customBackgroundColor;
7847 + }
7848 + const { customTextColor, customBackgroundColor, ...restAttributes } = attributes;
7849 + return {
7850 + ...restAttributes,
7851 + style,
7852 + isStackedOnMobile: true
7853 + };
7854 + };
7855 + var columns_deprecated_deprecated_default = [
7856 + {
7857 + attributes: {
7858 + verticalAlignment: {
7859 + type: "string"
7860 + },
7861 + backgroundColor: {
7862 + type: "string"
7863 + },
7864 + customBackgroundColor: {
7865 + type: "string"
7866 + },
7867 + customTextColor: {
7868 + type: "string"
7869 + },
7870 + textColor: {
7871 + type: "string"
7872 + }
7873 + },
7874 + migrate: migrateCustomColors,
7875 + save({ attributes }) {
7876 + const {
7877 + verticalAlignment,
7878 + backgroundColor,
7879 + customBackgroundColor,
7880 + textColor,
7881 + customTextColor
7882 + } = attributes;
7883 + const backgroundClass = (0,external_wp_blockEditor_namespaceObject.getColorClassName)(
7884 + "background-color",
7885 + backgroundColor
7886 + );
7887 + const textClass = (0,external_wp_blockEditor_namespaceObject.getColorClassName)("color", textColor);
7888 + const className = dist_clsx({
7889 + "has-background": backgroundColor || customBackgroundColor,
7890 + "has-text-color": textColor || customTextColor,
7891 + [backgroundClass]: backgroundClass,
7892 + [textClass]: textClass,
7893 + [`are-vertically-aligned-${verticalAlignment}`]: verticalAlignment
7894 + });
7895 + const style = {
7896 + backgroundColor: backgroundClass ? void 0 : customBackgroundColor,
7897 + color: textClass ? void 0 : customTextColor
7898 + };
7899 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
7900 + "div",
7901 + {
7902 + className: className ? className : void 0,
7903 + style,
7904 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, {})
7905 + }
7906 + );
7907 + }
7908 + },
7909 + {
7910 + attributes: {
7911 + columns: {
7912 + type: "number",
7913 + default: 2
7914 + }
7915 + },
7916 + isEligible(attributes, innerBlocks) {
7917 + const isFastPassEligible = innerBlocks.some(
7918 + (innerBlock) => /layout-column-\d+/.test(innerBlock.originalContent)
7919 + );
7920 + if (!isFastPassEligible) {
7921 + return false;
7922 + }
7923 + return innerBlocks.some(
7924 + (innerBlock) => getDeprecatedLayoutColumn(innerBlock.originalContent) !== void 0
7925 + );
7926 + },
7927 + migrate(attributes, innerBlocks) {
7928 + const columns = innerBlocks.reduce((accumulator, innerBlock) => {
7929 + const { originalContent } = innerBlock;
7930 + let columnIndex = getDeprecatedLayoutColumn(originalContent);
7931 + if (columnIndex === void 0) {
7932 + columnIndex = 0;
7933 + }
7934 + if (!accumulator[columnIndex]) {
7935 + accumulator[columnIndex] = [];
7936 + }
7937 + accumulator[columnIndex].push(innerBlock);
7938 + return accumulator;
7939 + }, []);
7940 + const migratedInnerBlocks = columns.map(
7941 + (columnBlocks) => (0,external_wp_blocks_namespaceObject.createBlock)("core/column", {}, columnBlocks)
7942 + );
7943 + const { columns: ignoredColumns, ...restAttributes } = attributes;
7944 + return [
7945 + {
7946 + ...restAttributes,
7947 + isStackedOnMobile: true
7948 + },
7949 + migratedInnerBlocks
7950 + ];
7951 + },
7952 + save({ attributes }) {
7953 + const { columns } = attributes;
7954 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { className: `has-${columns}-columns`, children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, {}) });
7955 + }
7956 + },
7957 + {
7958 + attributes: {
7959 + columns: {
7960 + type: "number",
7961 + default: 2
7962 + }
7963 + },
7964 + migrate(attributes, innerBlocks) {
7965 + const { columns, ...restAttributes } = attributes;
7966 + attributes = {
7967 + ...restAttributes,
7968 + isStackedOnMobile: true
7969 + };
7970 + return [attributes, innerBlocks];
7971 + },
7972 + save({ attributes }) {
7973 + const { verticalAlignment, columns } = attributes;
7974 + const wrapperClasses = dist_clsx(`has-${columns}-columns`, {
7975 + [`are-vertically-aligned-${verticalAlignment}`]: verticalAlignment
7976 + });
7977 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { className: wrapperClasses, children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, {}) });
7978 + }
7979 + }
7980 + ];
7981 +
7982 +
7983 + ;// ./node_modules/@wordpress/block-library/build-module/columns/utils.js
7984 + const toWidthPrecision = (value) => {
7985 + const unitlessValue = parseFloat(value);
7986 + return Number.isFinite(unitlessValue) ? parseFloat(unitlessValue.toFixed(2)) : void 0;
7987 + };
7988 + function getEffectiveColumnWidth(block, totalBlockCount) {
7989 + const { width = 100 / totalBlockCount } = block.attributes;
7990 + return toWidthPrecision(width);
7991 + }
7992 + function getTotalColumnsWidth(blocks, totalBlockCount = blocks.length) {
7993 + return blocks.reduce(
7994 + (sum, block) => sum + getEffectiveColumnWidth(block, totalBlockCount),
7995 + 0
7996 + );
7997 + }
7998 + function getColumnWidths(blocks, totalBlockCount = blocks.length) {
7999 + return blocks.reduce((accumulator, block) => {
8000 + const width = getEffectiveColumnWidth(block, totalBlockCount);
8001 + return Object.assign(accumulator, { [block.clientId]: width });
8002 + }, {});
8003 + }
8004 + function getRedistributedColumnWidths(blocks, availableWidth, totalBlockCount = blocks.length) {
8005 + const totalWidth = getTotalColumnsWidth(blocks, totalBlockCount);
8006 + return Object.fromEntries(
8007 + Object.entries(getColumnWidths(blocks, totalBlockCount)).map(
8008 + ([clientId, width]) => {
8009 + const newWidth = availableWidth * width / totalWidth;
8010 + return [clientId, toWidthPrecision(newWidth)];
8011 + }
8012 + )
8013 + );
8014 + }
8015 + function hasExplicitPercentColumnWidths(blocks) {
8016 + return blocks.every((block) => {
8017 + const blockWidth = block.attributes.width;
8018 + return Number.isFinite(
8019 + blockWidth?.endsWith?.("%") ? parseFloat(blockWidth) : blockWidth
8020 + );
8021 + });
8022 + }
8023 + function getMappedColumnWidths(blocks, widths) {
8024 + return blocks.map((block) => ({
8025 + ...block,
8026 + attributes: {
8027 + ...block.attributes,
8028 + width: `${widths[block.clientId]}%`
8029 + }
8030 + }));
8031 + }
8032 + function getWidths(blocks, withParsing = true) {
8033 + return blocks.map((innerColumn) => {
8034 + const innerColumnWidth = innerColumn.attributes.width || 100 / blocks.length;
8035 + return withParsing ? parseFloat(innerColumnWidth) : innerColumnWidth;
8036 + });
8037 + }
8038 + function getWidthWithUnit(width, unit) {
8039 + width = 0 > parseFloat(width) ? "0" : width;
8040 + if (isPercentageUnit(unit)) {
8041 + width = Math.min(width, 100);
8042 + }
8043 + return `${width}${unit}`;
8044 + }
8045 + function isPercentageUnit(unit) {
8046 + return unit === "%";
8047 + }
8048 +
8049 +
8050 + ;// ./node_modules/@wordpress/block-library/build-module/columns/edit.js
8051 +
8052 +
8053 +
8054 +
8055 +
8056 +
8057 +
8058 +
8059 +
8060 + const edit_DEFAULT_BLOCK = {
8061 + name: "core/column"
8062 + };
8063 + function edit_ColumnInspectorControls({
8064 + clientId,
8065 + setAttributes,
8066 + isStackedOnMobile
8067 + }) {
8068 + const { count, canInsertColumnBlock, minCount } = (0,external_wp_data_namespaceObject.useSelect)(
8069 + (select) => {
8070 + const { canInsertBlockType, canRemoveBlock, getBlockOrder } = select(external_wp_blockEditor_namespaceObject.store);
8071 + const blockOrder = getBlockOrder(clientId);
8072 + const preventRemovalBlockIndexes = blockOrder.reduce(
8073 + (acc, blockId, index) => {
8074 + if (!canRemoveBlock(blockId)) {
8075 + acc.push(index);
8076 + }
8077 + return acc;
8078 + },
8079 + []
8080 + );
8081 + return {
8082 + count: blockOrder.length,
8083 + canInsertColumnBlock: canInsertBlockType(
8084 + "core/column",
8085 + clientId
8086 + ),
8087 + minCount: Math.max(...preventRemovalBlockIndexes) + 1
8088 + };
8089 + },
8090 + [clientId]
8091 + );
8092 + const { getBlocks } = (0,external_wp_data_namespaceObject.useSelect)(external_wp_blockEditor_namespaceObject.store);
8093 + const { replaceInnerBlocks } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_blockEditor_namespaceObject.store);
8094 + function updateColumns(previousColumns, newColumns) {
8095 + let innerBlocks = getBlocks(clientId);
8096 + const hasExplicitWidths = hasExplicitPercentColumnWidths(innerBlocks);
8097 + const isAddingColumn = newColumns > previousColumns;
8098 + if (isAddingColumn && hasExplicitWidths) {
8099 + const newColumnWidth = toWidthPrecision(100 / newColumns);
8100 + const newlyAddedColumns = newColumns - previousColumns;
8101 + const widths = getRedistributedColumnWidths(
8102 + innerBlocks,
8103 + 100 - newColumnWidth * newlyAddedColumns
8104 + );
8105 + innerBlocks = [
8106 + ...getMappedColumnWidths(innerBlocks, widths),
8107 + ...Array.from({
8108 + length: newlyAddedColumns
8109 + }).map(() => {
8110 + return (0,external_wp_blocks_namespaceObject.createBlock)("core/column", {
8111 + width: `${newColumnWidth}%`
8112 + });
8113 + })
8114 + ];
8115 + } else if (isAddingColumn) {
8116 + innerBlocks = [
8117 + ...innerBlocks,
8118 + ...Array.from({
8119 + length: newColumns - previousColumns
8120 + }).map(() => {
8121 + return (0,external_wp_blocks_namespaceObject.createBlock)("core/column");
8122 + })
8123 + ];
8124 + } else if (newColumns < previousColumns) {
8125 + innerBlocks = innerBlocks.slice(
8126 + 0,
8127 + -(previousColumns - newColumns)
8128 + );
8129 + if (hasExplicitWidths) {
8130 + const widths = getRedistributedColumnWidths(innerBlocks, 100);
8131 + innerBlocks = getMappedColumnWidths(innerBlocks, widths);
8132 + }
8133 + }
8134 + replaceInnerBlocks(clientId, innerBlocks);
8135 + }
8136 + const dropdownMenuProps = useToolsPanelDropdownMenuProps();
8137 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(
8138 + external_wp_components_namespaceObject.__experimentalToolsPanel,
8139 + {
8140 + label: (0,external_wp_i18n_namespaceObject.__)("Settings"),
8141 + resetAll: () => {
8142 + setAttributes({
8143 + isStackedOnMobile: true
8144 + });
8145 + },
8146 + dropdownMenuProps,
8147 + children: [
8148 + canInsertColumnBlock && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.__experimentalVStack, { spacing: 4, style: { gridColumn: "1 / -1" }, children: [
8149 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
8150 + external_wp_components_namespaceObject.RangeControl,
8151 + {
8152 + __nextHasNoMarginBottom: true,
8153 + __next40pxDefaultSize: true,
8154 + label: (0,external_wp_i18n_namespaceObject.__)("Columns"),
8155 + value: count,
8156 + onChange: (value) => updateColumns(count, Math.max(minCount, value)),
8157 + min: Math.max(1, minCount),
8158 + max: Math.max(6, count)
8159 + }
8160 + ),
8161 + count > 6 && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Notice, { status: "warning", isDismissible: false, children: (0,external_wp_i18n_namespaceObject.__)(
8162 + "This column count exceeds the recommended amount and may cause visual breakage."
8163 + ) })
8164 + ] }),
8165 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
8166 + external_wp_components_namespaceObject.__experimentalToolsPanelItem,
8167 + {
8168 + label: (0,external_wp_i18n_namespaceObject.__)("Stack on mobile"),
8169 + isShownByDefault: true,
8170 + hasValue: () => isStackedOnMobile !== true,
8171 + onDeselect: () => setAttributes({
8172 + isStackedOnMobile: true
8173 + }),
8174 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
8175 + external_wp_components_namespaceObject.ToggleControl,
8176 + {
8177 + __nextHasNoMarginBottom: true,
8178 + label: (0,external_wp_i18n_namespaceObject.__)("Stack on mobile"),
8179 + checked: isStackedOnMobile,
8180 + onChange: () => setAttributes({
8181 + isStackedOnMobile: !isStackedOnMobile
8182 + })
8183 + }
8184 + )
8185 + }
8186 + )
8187 + ]
8188 + }
8189 + );
8190 + }
8191 + function ColumnsEditContainer({ attributes, setAttributes, clientId }) {
8192 + const { isStackedOnMobile, verticalAlignment, templateLock } = attributes;
8193 + const registry = (0,external_wp_data_namespaceObject.useRegistry)();
8194 + const { getBlockOrder } = (0,external_wp_data_namespaceObject.useSelect)(external_wp_blockEditor_namespaceObject.store);
8195 + const { updateBlockAttributes } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_blockEditor_namespaceObject.store);
8196 + const classes = dist_clsx({
8197 + [`are-vertically-aligned-${verticalAlignment}`]: verticalAlignment,
8198 + [`is-not-stacked-on-mobile`]: !isStackedOnMobile
8199 + });
8200 + const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)({
8201 + className: classes
8202 + });
8203 + const innerBlocksProps = (0,external_wp_blockEditor_namespaceObject.useInnerBlocksProps)(blockProps, {
8204 + defaultBlock: edit_DEFAULT_BLOCK,
8205 + directInsert: true,
8206 + orientation: "horizontal",
8207 + renderAppender: false,
8208 + templateLock
8209 + });
8210 + function updateAlignment(newVerticalAlignment) {
8211 + const innerBlockClientIds = getBlockOrder(clientId);
8212 + registry.batch(() => {
8213 + setAttributes({ verticalAlignment: newVerticalAlignment });
8214 + updateBlockAttributes(innerBlockClientIds, {
8215 + verticalAlignment: newVerticalAlignment
8216 + });
8217 + });
8218 + }
8219 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
8220 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockControls, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
8221 + external_wp_blockEditor_namespaceObject.BlockVerticalAlignmentToolbar,
8222 + {
8223 + onChange: updateAlignment,
8224 + value: verticalAlignment
8225 + }
8226 + ) }),
8227 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
8228 + edit_ColumnInspectorControls,
8229 + {
8230 + clientId,
8231 + setAttributes,
8232 + isStackedOnMobile
8233 + }
8234 + ) }),
8235 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { ...innerBlocksProps })
8236 + ] });
8237 + }
8238 + function Placeholder({ clientId, name, setAttributes }) {
8239 + const { blockType, defaultVariation, variations } = (0,external_wp_data_namespaceObject.useSelect)(
8240 + (select) => {
8241 + const {
8242 + getBlockVariations,
8243 + getBlockType,
8244 + getDefaultBlockVariation
8245 + } = select(external_wp_blocks_namespaceObject.store);
8246 + return {
8247 + blockType: getBlockType(name),
8248 + defaultVariation: getDefaultBlockVariation(name, "block"),
8249 + variations: getBlockVariations(name, "block")
8250 + };
8251 + },
8252 + [name]
8253 + );
8254 + const { replaceInnerBlocks } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_blockEditor_namespaceObject.store);
8255 + const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)();
8256 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { ...blockProps, children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
8257 + external_wp_blockEditor_namespaceObject.__experimentalBlockVariationPicker,
8258 + {
8259 + icon: blockType?.icon?.src,
8260 + label: blockType?.title,
8261 + variations,
8262 + instructions: (0,external_wp_i18n_namespaceObject.__)("Divide into columns. Select a layout:"),
8263 + onSelect: (nextVariation = defaultVariation) => {
8264 + if (nextVariation.attributes) {
8265 + setAttributes(nextVariation.attributes);
8266 + }
8267 + if (nextVariation.innerBlocks) {
8268 + replaceInnerBlocks(
8269 + clientId,
8270 + (0,external_wp_blocks_namespaceObject.createBlocksFromInnerBlocksTemplate)(
8271 + nextVariation.innerBlocks
8272 + ),
8273 + true
8274 + );
8275 + }
8276 + },
8277 + allowSkip: true
8278 + }
8279 + ) });
8280 + }
8281 + const ColumnsEdit = (props) => {
8282 + const { clientId } = props;
8283 + const hasInnerBlocks = (0,external_wp_data_namespaceObject.useSelect)(
8284 + (select) => select(external_wp_blockEditor_namespaceObject.store).getBlocks(clientId).length > 0,
8285 + [clientId]
8286 + );
8287 + const Component = hasInnerBlocks ? ColumnsEditContainer : Placeholder;
8288 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(Component, { ...props });
8289 + };
8290 + var columns_edit_edit_default = ColumnsEdit;
8291 +
8292 +
8293 + ;// ./node_modules/@wordpress/block-library/build-module/columns/block.json
8294 + const columns_block_namespaceObject = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/columns","title":"Columns","category":"design","allowedBlocks":["core/column"],"description":"Display content in multiple columns, with blocks added to each column.","textdomain":"default","attributes":{"verticalAlignment":{"type":"string"},"isStackedOnMobile":{"type":"boolean","default":true},"templateLock":{"type":["string","boolean"],"enum":["all","insert","contentOnly",false]}},"supports":{"anchor":true,"align":["wide","full"],"html":false,"color":{"gradients":true,"link":true,"heading":true,"button":true,"__experimentalDefaultControls":{"background":true,"text":true}},"spacing":{"blockGap":{"__experimentalDefault":"2em","sides":["horizontal","vertical"]},"margin":["top","bottom"],"padding":true,"__experimentalDefaultControls":{"padding":true,"blockGap":true}},"layout":{"allowSwitching":false,"allowInheriting":false,"allowEditing":false,"default":{"type":"flex","flexWrap":"nowrap"}},"__experimentalBorder":{"color":true,"radius":true,"style":true,"width":true,"__experimentalDefaultControls":{"color":true,"radius":true,"style":true,"width":true}},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"interactivity":{"clientNavigation":true},"shadow":true},"editorStyle":"wp-block-columns-editor","style":"wp-block-columns"}');
8295 + ;// ./node_modules/@wordpress/block-library/build-module/columns/save.js
8296 +
8297 +
8298 +
8299 + function columns_save_save({ attributes }) {
8300 + const { isStackedOnMobile, verticalAlignment } = attributes;
8301 + const className = dist_clsx({
8302 + [`are-vertically-aligned-${verticalAlignment}`]: verticalAlignment,
8303 + [`is-not-stacked-on-mobile`]: !isStackedOnMobile
8304 + });
8305 + const blockProps = external_wp_blockEditor_namespaceObject.useBlockProps.save({ className });
8306 + const innerBlocksProps = external_wp_blockEditor_namespaceObject.useInnerBlocksProps.save(blockProps);
8307 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { ...innerBlocksProps });
8308 + }
8309 +
8310 +
8311 + ;// ./node_modules/@wordpress/block-library/build-module/columns/variations.js
8312 +
8313 +
8314 +
8315 + const variations_variations = [
8316 + {
8317 + name: "one-column-full",
8318 + title: (0,external_wp_i18n_namespaceObject.__)("100"),
8319 + description: (0,external_wp_i18n_namespaceObject.__)("One column"),
8320 + icon: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
8321 + external_wp_components_namespaceObject.SVG,
8322 + {
8323 + xmlns: "http://www.w3.org/2000/svg",
8324 + width: "48",
8325 + height: "48",
8326 + viewBox: "0 0 48 48",
8327 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Path, { d: "M0 10a2 2 0 0 1 2-2h44a2 2 0 0 1 2 2v28a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V10Z" })
8328 + }
8329 + ),
8330 + innerBlocks: [["core/column"]],
8331 + scope: ["block"]
8332 + },
8333 + {
8334 + name: "two-columns-equal",
8335 + title: (0,external_wp_i18n_namespaceObject.__)("50 / 50"),
8336 + description: (0,external_wp_i18n_namespaceObject.__)("Two columns; equal split"),
8337 + icon: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
8338 + external_wp_components_namespaceObject.SVG,
8339 + {
8340 + xmlns: "http://www.w3.org/2000/svg",
8341 + width: "48",
8342 + height: "48",
8343 + viewBox: "0 0 48 48",
8344 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Path, { d: "M0 10a2 2 0 0 1 2-2h19a2 2 0 0 1 2 2v28a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V10Zm25 0a2 2 0 0 1 2-2h19a2 2 0 0 1 2 2v28a2 2 0 0 1-2 2H27a2 2 0 0 1-2-2V10Z" })
8345 + }
8346 + ),
8347 + isDefault: true,
8348 + innerBlocks: [["core/column"], ["core/column"]],
8349 + scope: ["block"]
8350 + },
8351 + {
8352 + name: "two-columns-one-third-two-thirds",
8353 + title: (0,external_wp_i18n_namespaceObject.__)("33 / 66"),
8354 + description: (0,external_wp_i18n_namespaceObject.__)("Two columns; one-third, two-thirds split"),
8355 + icon: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
8356 + external_wp_components_namespaceObject.SVG,
8357 + {
8358 + xmlns: "http://www.w3.org/2000/svg",
8359 + width: "48",
8360 + height: "48",
8361 + viewBox: "0 0 48 48",
8362 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Path, { d: "M0 10a2 2 0 0 1 2-2h11a2 2 0 0 1 2 2v28a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V10Zm17 0a2 2 0 0 1 2-2h27a2 2 0 0 1 2 2v28a2 2 0 0 1-2 2H19a2 2 0 0 1-2-2V10Z" })
8363 + }
8364 + ),
8365 + innerBlocks: [
8366 + ["core/column", { width: "33.33%" }],
8367 + ["core/column", { width: "66.66%" }]
8368 + ],
8369 + scope: ["block"]
8370 + },
8371 + {
8372 + name: "two-columns-two-thirds-one-third",
8373 + title: (0,external_wp_i18n_namespaceObject.__)("66 / 33"),
8374 + description: (0,external_wp_i18n_namespaceObject.__)("Two columns; two-thirds, one-third split"),
8375 + icon: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
8376 + external_wp_components_namespaceObject.SVG,
8377 + {
8378 + xmlns: "http://www.w3.org/2000/svg",
8379 + width: "48",
8380 + height: "48",
8381 + viewBox: "0 0 48 48",
8382 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Path, { d: "M0 10a2 2 0 0 1 2-2h27a2 2 0 0 1 2 2v28a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V10Zm33 0a2 2 0 0 1 2-2h11a2 2 0 0 1 2 2v28a2 2 0 0 1-2 2H35a2 2 0 0 1-2-2V10Z" })
8383 + }
8384 + ),
8385 + innerBlocks: [
8386 + ["core/column", { width: "66.66%" }],
8387 + ["core/column", { width: "33.33%" }]
8388 + ],
8389 + scope: ["block"]
8390 + },
8391 + {
8392 + name: "three-columns-equal",
8393 + title: (0,external_wp_i18n_namespaceObject.__)("33 / 33 / 33"),
8394 + description: (0,external_wp_i18n_namespaceObject.__)("Three columns; equal split"),
8395 + icon: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
8396 + external_wp_components_namespaceObject.SVG,
8397 + {
8398 + xmlns: "http://www.w3.org/2000/svg",
8399 + width: "48",
8400 + height: "48",
8401 + viewBox: "0 0 48 48",
8402 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Path, { d: "M0 10a2 2 0 0 1 2-2h10.531c1.105 0 1.969.895 1.969 2v28c0 1.105-.864 2-1.969 2H2a2 2 0 0 1-2-2V10Zm16.5 0c0-1.105.864-2 1.969-2H29.53c1.105 0 1.969.895 1.969 2v28c0 1.105-.864 2-1.969 2H18.47c-1.105 0-1.969-.895-1.969-2V10Zm17 0c0-1.105.864-2 1.969-2H46a2 2 0 0 1 2 2v28a2 2 0 0 1-2 2H35.469c-1.105 0-1.969-.895-1.969-2V10Z" })
8403 + }
8404 + ),
8405 + innerBlocks: [
8406 + ["core/column"],
8407 + ["core/column"],
8408 + ["core/column"]
8409 + ],
8410 + scope: ["block"]
8411 + },
8412 + {
8413 + name: "three-columns-wider-center",
8414 + title: (0,external_wp_i18n_namespaceObject.__)("25 / 50 / 25"),
8415 + description: (0,external_wp_i18n_namespaceObject.__)("Three columns; wide center column"),
8416 + icon: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
8417 + external_wp_components_namespaceObject.SVG,
8418 + {
8419 + xmlns: "http://www.w3.org/2000/svg",
8420 + width: "48",
8421 + height: "48",
8422 + viewBox: "0 0 48 48",
8423 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Path, { d: "M0 10a2 2 0 0 1 2-2h7.531c1.105 0 1.969.895 1.969 2v28c0 1.105-.864 2-1.969 2H2a2 2 0 0 1-2-2V10Zm13.5 0c0-1.105.864-2 1.969-2H32.53c1.105 0 1.969.895 1.969 2v28c0 1.105-.864 2-1.969 2H15.47c-1.105 0-1.969-.895-1.969-2V10Zm23 0c0-1.105.864-2 1.969-2H46a2 2 0 0 1 2 2v28a2 2 0 0 1-2 2h-7.531c-1.105 0-1.969-.895-1.969-2V10Z" })
8424 + }
8425 + ),
8426 + innerBlocks: [
8427 + ["core/column", { width: "25%" }],
8428 + ["core/column", { width: "50%" }],
8429 + ["core/column", { width: "25%" }]
8430 + ],
8431 + scope: ["block"]
8432 + }
8433 + ];
8434 + var variations_variations_default = variations_variations;
8435 +
8436 +
8437 + ;// ./node_modules/@wordpress/block-library/build-module/columns/transforms.js
8438 +
8439 + const MAXIMUM_SELECTED_BLOCKS = 6;
8440 + const columns_transforms_transforms = {
8441 + from: [
8442 + {
8443 + type: "block",
8444 + isMultiBlock: true,
8445 + blocks: ["*"],
8446 + __experimentalConvert: (blocks) => {
8447 + const columnWidth = +(100 / blocks.length).toFixed(2);
8448 + const innerBlocksTemplate = blocks.map(
8449 + ({ name, attributes, innerBlocks }) => [
8450 + "core/column",
8451 + { width: `${columnWidth}%` },
8452 + [[name, { ...attributes }, innerBlocks]]
8453 + ]
8454 + );
8455 + return (0,external_wp_blocks_namespaceObject.createBlock)(
8456 + "core/columns",
8457 + {},
8458 + (0,external_wp_blocks_namespaceObject.createBlocksFromInnerBlocksTemplate)(innerBlocksTemplate)
8459 + );
8460 + },
8461 + isMatch: ({ length: selectedBlocksLength }, blocks) => {
8462 + if (blocks.length === 1 && blocks[0].name === "core/columns") {
8463 + return false;
8464 + }
8465 + return selectedBlocksLength && selectedBlocksLength <= MAXIMUM_SELECTED_BLOCKS;
8466 + }
8467 + },
8468 + {
8469 + type: "block",
8470 + blocks: ["core/media-text"],
8471 + priority: 1,
8472 + transform: (attributes, innerBlocks) => {
8473 + const {
8474 + align,
8475 + backgroundColor,
8476 + textColor,
8477 + style,
8478 + mediaAlt: alt,
8479 + mediaId: id,
8480 + mediaPosition,
8481 + mediaSizeSlug: sizeSlug,
8482 + mediaType,
8483 + mediaUrl: url,
8484 + mediaWidth,
8485 + verticalAlignment
8486 + } = attributes;
8487 + let media;
8488 + if (mediaType === "image" || !mediaType) {
8489 + const imageAttrs = { id, alt, url, sizeSlug };
8490 + const linkAttrs = {
8491 + href: attributes.href,
8492 + linkClass: attributes.linkClass,
8493 + linkDestination: attributes.linkDestination,
8494 + linkTarget: attributes.linkTarget,
8495 + rel: attributes.rel
8496 + };
8497 + media = ["core/image", { ...imageAttrs, ...linkAttrs }];
8498 + } else {
8499 + media = ["core/video", { id, src: url }];
8500 + }
8501 + const innerBlocksTemplate = [
8502 + ["core/column", { width: `${mediaWidth}%` }, [media]],
8503 + [
8504 + "core/column",
8505 + { width: `${100 - mediaWidth}%` },
8506 + innerBlocks
8507 + ]
8508 + ];
8509 + if (mediaPosition === "right") {
8510 + innerBlocksTemplate.reverse();
8511 + }
8512 + return (0,external_wp_blocks_namespaceObject.createBlock)(
8513 + "core/columns",
8514 + {
8515 + align,
8516 + backgroundColor,
8517 + textColor,
8518 + style,
8519 + verticalAlignment
8520 + },
8521 + (0,external_wp_blocks_namespaceObject.createBlocksFromInnerBlocksTemplate)(innerBlocksTemplate)
8522 + );
8523 + }
8524 + }
8525 + ],
8526 + ungroup: (attributes, innerBlocks) => innerBlocks.flatMap((innerBlock) => innerBlock.innerBlocks)
8527 + };
8528 + var columns_transforms_transforms_default = columns_transforms_transforms;
8529 +
8530 +
8531 + ;// ./node_modules/@wordpress/block-library/build-module/columns/index.js
8532 +
8533 +
8534 +
8535 +
8536 +
8537 +
8538 +
8539 +
8540 +
8541 + const { name: columns_name } = columns_block_namespaceObject;
8542 + const columns_settings = {
8543 + icon: columns_default,
8544 + variations: variations_variations_default,
8545 + example: {
8546 + viewportWidth: 782,
8547 + // Columns collapse "@media (max-width: 781px)".
8548 + innerBlocks: [
8549 + {
8550 + name: "core/column",
8551 + innerBlocks: [
8552 + {
8553 + name: "core/paragraph",
8554 + attributes: {
8555 + /* translators: example text. */
8556 + content: (0,external_wp_i18n_namespaceObject.__)(
8557 + "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent et eros eu felis."
8558 + )
8559 + }
8560 + },
8561 + {
8562 + name: "core/image",
8563 + attributes: {
8564 + url: "https://s.w.org/images/core/5.3/Windbuchencom.jpg"
8565 + }
8566 + },
8567 + {
8568 + name: "core/paragraph",
8569 + attributes: {
8570 + /* translators: example text. */
8571 + content: (0,external_wp_i18n_namespaceObject.__)(
8572 + "Suspendisse commodo neque lacus, a dictum orci interdum et."
8573 + )
8574 + }
8575 + }
8576 + ]
8577 + },
8578 + {
8579 + name: "core/column",
8580 + innerBlocks: [
8581 + {
8582 + name: "core/paragraph",
8583 + attributes: {
8584 + /* translators: example text. */
8585 + content: (0,external_wp_i18n_namespaceObject.__)(
8586 + "Etiam et egestas lorem. Vivamus sagittis sit amet dolor quis lobortis. Integer sed fermentum arcu, id vulputate lacus. Etiam fermentum sem eu quam hendrerit."
8587 + )
8588 + }
8589 + },
8590 + {
8591 + name: "core/paragraph",
8592 + attributes: {
8593 + /* translators: example text. */
8594 + content: (0,external_wp_i18n_namespaceObject.__)(
8595 + "Nam risus massa, ullamcorper consectetur eros fermentum, porta aliquet ligula. Sed vel mauris nec enim."
8596 + )
8597 + }
8598 + }
8599 + ]
8600 + }
8601 + ]
8602 + },
8603 + deprecated: columns_deprecated_deprecated_default,
8604 + edit: columns_edit_edit_default,
8605 + save: columns_save_save,
8606 + transforms: columns_transforms_transforms_default
8607 + };
8608 + const columns_init = () => initBlock({ name: columns_name, metadata: columns_block_namespaceObject, settings: columns_settings });
8609 +
8610 +
8611 + ;// ./node_modules/@wordpress/icons/build-module/library/post-comments.js
8612 +
8613 +
8614 + var post_comments_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M14 10.1V4c0-.6-.4-1-1-1H5c-.6 0-1 .4-1 1v8.3c0 .3.2.7.6.8.1.1.2.1.3.1.2 0 .5-.1.6-.3l1.8-1.8H13c.6 0 1-.4 1-1zm-1.5-.5H6.7l-1.2 1.2V4.5h7v5.1zM19 12h-8c-.6 0-1 .4-1 1v6.1c0 .6.4 1 1 1h5.7l1.8 1.8c.1.2.4.3.6.3.1 0 .2 0 .3-.1.4-.1.6-.5.6-.8V13c0-.6-.4-1-1-1zm-.5 7.8l-1.2-1.2h-5.8v-5.1h7v6.3z" }) });
8615 +
8616 +
8617 + ;// ./node_modules/@wordpress/block-library/build-module/comments/block.json
8618 + const comments_block_namespaceObject = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/comments","title":"Comments","category":"theme","description":"An advanced block that allows displaying post comments using different visual configurations.","textdomain":"default","attributes":{"tagName":{"type":"string","default":"div"},"legacy":{"type":"boolean","default":false}},"supports":{"align":["wide","full"],"html":false,"color":{"gradients":true,"heading":true,"link":true,"__experimentalDefaultControls":{"background":true,"text":true,"link":true}},"spacing":{"margin":true,"padding":true},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"__experimentalBorder":{"radius":true,"color":true,"width":true,"style":true,"__experimentalDefaultControls":{"radius":true,"color":true,"width":true,"style":true}}},"editorStyle":"wp-block-comments-editor","usesContext":["postId","postType"]}');
8619 + ;// ./node_modules/@wordpress/block-library/build-module/comments/deprecated.js
8620 +
8621 +
8622 + const deprecated_v1 = {
8623 + attributes: {
8624 + tagName: {
8625 + type: "string",
8626 + default: "div"
8627 + }
8628 + },
8629 + apiVersion: 3,
8630 + supports: {
8631 + align: ["wide", "full"],
8632 + html: false,
8633 + color: {
8634 + gradients: true,
8635 + link: true,
8636 + __experimentalDefaultControls: {
8637 + background: true,
8638 + text: true,
8639 + link: true
8640 + }
8641 + }
8642 + },
8643 + save({ attributes: { tagName: Tag } }) {
8644 + const blockProps = external_wp_blockEditor_namespaceObject.useBlockProps.save();
8645 + const { className } = blockProps;
8646 + const classes = className?.split(" ") || [];
8647 + const newClasses = classes?.filter(
8648 + (cls) => cls !== "wp-block-comments"
8649 + );
8650 + const newBlockProps = {
8651 + ...blockProps,
8652 + className: newClasses.join(" ")
8653 + };
8654 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(Tag, { ...newBlockProps, children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, {}) });
8655 + }
8656 + };
8657 + var comments_deprecated_deprecated_default = [deprecated_v1];
8658 +
8659 +
8660 + ;// ./node_modules/@wordpress/block-library/build-module/comments/edit/comments-inspector-controls.js
8661 +
8662 +
8663 +
8664 +
8665 + const { HTMLElementControl: comments_inspector_controls_HTMLElementControl } = unlock(external_wp_blockEditor_namespaceObject.privateApis);
8666 + function CommentsInspectorControls({
8667 + attributes: { tagName },
8668 + setAttributes
8669 + }) {
8670 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, { group: "advanced", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
8671 + comments_inspector_controls_HTMLElementControl,
8672 + {
8673 + tagName,
8674 + onChange: (value) => setAttributes({ tagName: value }),
8675 + options: [
8676 + { label: (0,external_wp_i18n_namespaceObject.__)("Default (<div>)"), value: "div" },
8677 + { label: "<section>", value: "section" },
8678 + { label: "<aside>", value: "aside" }
8679 + ]
8680 + }
8681 + ) }) });
8682 + }
8683 +
8684 +
8685 + ;// ./node_modules/@wordpress/block-library/build-module/post-comments-form/form.js
8686 +
8687 +
8688 +
8689 +
8690 +
8691 +
8692 +
8693 +
8694 + const CommentsFormPlaceholder = () => {
8695 + const instanceId = (0,external_wp_compose_namespaceObject.useInstanceId)(CommentsFormPlaceholder);
8696 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", { className: "comment-respond", children: [
8697 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("h3", { className: "comment-reply-title", children: (0,external_wp_i18n_namespaceObject.__)("Leave a Reply") }),
8698 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(
8699 + "form",
8700 + {
8701 + noValidate: true,
8702 + className: "comment-form",
8703 + onSubmit: (event) => event.preventDefault(),
8704 + children: [
8705 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("p", { children: [
8706 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("label", { htmlFor: `comment-${instanceId}`, children: (0,external_wp_i18n_namespaceObject.__)("Comment") }),
8707 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
8708 + "textarea",
8709 + {
8710 + id: `comment-${instanceId}`,
8711 + name: "comment",
8712 + cols: "45",
8713 + rows: "8",
8714 + readOnly: true
8715 + }
8716 + )
8717 + ] }),
8718 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("p", { className: "form-submit wp-block-button", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
8719 + "input",
8720 + {
8721 + name: "submit",
8722 + type: "submit",
8723 + className: dist_clsx(
8724 + "wp-block-button__link",
8725 + (0,external_wp_blockEditor_namespaceObject.__experimentalGetElementClassName)("button")
8726 + ),
8727 + label: (0,external_wp_i18n_namespaceObject.__)("Post Comment"),
8728 + value: (0,external_wp_i18n_namespaceObject.__)("Post Comment"),
8729 + "aria-disabled": "true"
8730 + }
8731 + ) })
8732 + ]
8733 + }
8734 + )
8735 + ] });
8736 + };
8737 + const CommentsForm = ({ postId, postType }) => {
8738 + const [commentStatus, setCommentStatus] = (0,external_wp_coreData_namespaceObject.useEntityProp)(
8739 + "postType",
8740 + postType,
8741 + "comment_status",
8742 + postId
8743 + );
8744 + const isSiteEditor = postType === void 0 || postId === void 0;
8745 + const { defaultCommentStatus } = (0,external_wp_data_namespaceObject.useSelect)(
8746 + (select) => select(external_wp_blockEditor_namespaceObject.store).getSettings().__experimentalDiscussionSettings
8747 + );
8748 + const postTypeSupportsComments = (0,external_wp_data_namespaceObject.useSelect)(
8749 + (select) => postType ? !!select(external_wp_coreData_namespaceObject.store).getPostType(postType)?.supports.comments : false
8750 + );
8751 + if (!isSiteEditor && "open" !== commentStatus) {
8752 + if ("closed" === commentStatus) {
8753 + const actions = [
8754 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
8755 + external_wp_components_namespaceObject.Button,
8756 + {
8757 + __next40pxDefaultSize: true,
8758 + onClick: () => setCommentStatus("open"),
8759 + variant: "primary",
8760 + children: (0,external_wp_i18n_namespaceObject._x)(
8761 + "Enable comments",
8762 + "action that affects the current post"
8763 + )
8764 + },
8765 + "enableComments"
8766 + )
8767 + ];
8768 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.Warning, { actions, children: (0,external_wp_i18n_namespaceObject.__)(
8769 + "Post Comments Form block: Comments are not enabled for this item."
8770 + ) });
8771 + } else if (!postTypeSupportsComments) {
8772 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.Warning, { children: (0,external_wp_i18n_namespaceObject.sprintf)(
8773 + /* translators: %s: Post type (i.e. "post", "page") */
8774 + (0,external_wp_i18n_namespaceObject.__)(
8775 + "Post Comments Form block: Comments are not enabled for this post type (%s)."
8776 + ),
8777 + postType
8778 + ) });
8779 + } else if ("open" !== defaultCommentStatus) {
8780 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.Warning, { children: (0,external_wp_i18n_namespaceObject.__)(
8781 + "Post Comments Form block: Comments are not enabled."
8782 + ) });
8783 + }
8784 + }
8785 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(CommentsFormPlaceholder, {});
8786 + };
8787 + var form_default = CommentsForm;
8788 +
8789 +
8790 + ;// ./node_modules/@wordpress/block-library/build-module/comments/edit/placeholder.js
8791 +
8792 +
8793 +
8794 +
8795 +
8796 +
8797 +
8798 + function PostCommentsPlaceholder({ postType, postId }) {
8799 + let [postTitle] = (0,external_wp_coreData_namespaceObject.useEntityProp)("postType", postType, "title", postId);
8800 + postTitle = postTitle || (0,external_wp_i18n_namespaceObject.__)("Post Title");
8801 + const { avatarURL } = (0,external_wp_data_namespaceObject.useSelect)(
8802 + (select) => select(external_wp_blockEditor_namespaceObject.store).getSettings().__experimentalDiscussionSettings
8803 + );
8804 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", { className: "wp-block-comments__legacy-placeholder", inert: "true", children: [
8805 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("h3", {
8806 + /* translators: %s: Post title. */
8807 + children: (0,external_wp_i18n_namespaceObject.sprintf)((0,external_wp_i18n_namespaceObject.__)("One response to %s"), postTitle)
8808 + }),
8809 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", { className: "navigation", children: [
8810 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { className: "alignleft", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("a", { href: "#top", children: [
8811 + "\xAB ",
8812 + (0,external_wp_i18n_namespaceObject.__)("Older Comments")
8813 + ] }) }),
8814 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { className: "alignright", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("a", { href: "#top", children: [
8815 + (0,external_wp_i18n_namespaceObject.__)("Newer Comments"),
8816 + " \xBB"
8817 + ] }) })
8818 + ] }),
8819 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("ol", { className: "commentlist", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("li", { className: "comment even thread-even depth-1", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("article", { className: "comment-body", children: [
8820 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("footer", { className: "comment-meta", children: [
8821 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", { className: "comment-author vcard", children: [
8822 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
8823 + "img",
8824 + {
8825 + alt: (0,external_wp_i18n_namespaceObject.__)("Commenter Avatar"),
8826 + src: avatarURL,
8827 + className: "avatar avatar-32 photo",
8828 + height: "32",
8829 + width: "32",
8830 + loading: "lazy"
8831 + }
8832 + ),
8833 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("b", { className: "fn", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("a", { href: "#top", className: "url", children: (0,external_wp_i18n_namespaceObject.__)("A WordPress Commenter") }) }),
8834 + " ",
8835 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("span", { className: "says", children: [
8836 + (0,external_wp_i18n_namespaceObject.__)("says"),
8837 + ":"
8838 + ] })
8839 + ] }),
8840 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", { className: "comment-metadata", children: [
8841 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("a", { href: "#top", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("time", { dateTime: "2000-01-01T00:00:00+00:00", children: (0,external_wp_i18n_namespaceObject.__)("January 1, 2000 at 00:00 am") }) }),
8842 + " ",
8843 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("span", { className: "edit-link", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
8844 + "a",
8845 + {
8846 + className: "comment-edit-link",
8847 + href: "#top",
8848 + children: (0,external_wp_i18n_namespaceObject.__)("Edit")
8849 + }
8850 + ) })
8851 + ] })
8852 + ] }),
8853 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { className: "comment-content", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("p", { children: [
8854 + (0,external_wp_i18n_namespaceObject.__)("Hi, this is a comment."),
8855 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("br", {}),
8856 + (0,external_wp_i18n_namespaceObject.__)(
8857 + "To get started with moderating, editing, and deleting comments, please visit the Comments screen in the dashboard."
8858 + ),
8859 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("br", {}),
8860 + (0,external_wp_element_namespaceObject.createInterpolateElement)(
8861 + (0,external_wp_i18n_namespaceObject.__)(
8862 + "Commenter avatars come from <a>Gravatar</a>."
8863 + ),
8864 + {
8865 + a: (
8866 + // eslint-disable-next-line jsx-a11y/anchor-has-content
8867 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("a", { href: "https://gravatar.com/" })
8868 + )
8869 + }
8870 + )
8871 + ] }) }),
8872 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { className: "reply", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
8873 + "a",
8874 + {
8875 + className: "comment-reply-link",
8876 + href: "#top",
8877 + "aria-label": (0,external_wp_i18n_namespaceObject.__)(
8878 + "Reply to A WordPress Commenter"
8879 + ),
8880 + children: (0,external_wp_i18n_namespaceObject.__)("Reply")
8881 + }
8882 + ) })
8883 + ] }) }) }),
8884 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", { className: "navigation", children: [
8885 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { className: "alignleft", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("a", { href: "#top", children: [
8886 + "\xAB ",
8887 + (0,external_wp_i18n_namespaceObject.__)("Older Comments")
8888 + ] }) }),
8889 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { className: "alignright", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("a", { href: "#top", children: [
8890 + (0,external_wp_i18n_namespaceObject.__)("Newer Comments"),
8891 + " \xBB"
8892 + ] }) })
8893 + ] }),
8894 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(form_default, { postId, postType })
8895 + ] });
8896 + }
8897 +
8898 +
8899 + ;// ./node_modules/@wordpress/block-library/build-module/comments/edit/comments-legacy.js
8900 +
8901 +
8902 +
8903 +
8904 +
8905 +
8906 + function CommentsLegacy({
8907 + attributes,
8908 + setAttributes,
8909 + context: { postType, postId }
8910 + }) {
8911 + const { textAlign } = attributes;
8912 + const actions = [
8913 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
8914 + external_wp_components_namespaceObject.Button,
8915 + {
8916 + __next40pxDefaultSize: true,
8917 + onClick: () => void setAttributes({ legacy: false }),
8918 + variant: "primary",
8919 + children: (0,external_wp_i18n_namespaceObject.__)("Switch to editable mode")
8920 + },
8921 + "convert"
8922 + )
8923 + ];
8924 + const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)({
8925 + className: dist_clsx({
8926 + [`has-text-align-${textAlign}`]: textAlign
8927 + })
8928 + });
8929 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
8930 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockControls, { group: "block", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
8931 + external_wp_blockEditor_namespaceObject.AlignmentControl,
8932 + {
8933 + value: textAlign,
8934 + onChange: (nextAlign) => {
8935 + setAttributes({ textAlign: nextAlign });
8936 + }
8937 + }
8938 + ) }),
8939 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", { ...blockProps, children: [
8940 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.Warning, { actions, children: (0,external_wp_i18n_namespaceObject.__)(
8941 + "Comments block: You\u2019re currently using the legacy version of the block. The following is just a placeholder - the final styling will likely look different. For a better representation and more customization options, switch the block to its editable mode."
8942 + ) }),
8943 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(PostCommentsPlaceholder, { postId, postType })
8944 + ] })
8945 + ] });
8946 + }
8947 +
8948 +
8949 + ;// ./node_modules/@wordpress/block-library/build-module/comments/edit/template.js
8950 + const TEMPLATE = [
8951 + ["core/comments-title"],
8952 + [
8953 + "core/comment-template",
8954 + {},
8955 + [
8956 + [
8957 + "core/columns",
8958 + {},
8959 + [
8960 + [
8961 + "core/column",
8962 + { width: "40px" },
8963 + [
8964 + [
8965 + "core/avatar",
8966 + {
8967 + size: 40,
8968 + style: {
8969 + border: { radius: "20px" }
8970 + }
8971 + }
8972 + ]
8973 + ]
8974 + ],
8975 + [
8976 + "core/column",
8977 + {},
8978 + [
8979 + [
8980 + "core/comment-author-name",
8981 + {
8982 + fontSize: "small"
8983 + }
8984 + ],
8985 + [
8986 + "core/group",
8987 + {
8988 + layout: { type: "flex" },
8989 + style: {
8990 + spacing: {
8991 + margin: {
8992 + top: "0px",
8993 + bottom: "0px"
8994 + }
8995 + }
8996 + }
8997 + },
8998 + [
8999 + [
9000 + "core/comment-date",
9001 + {
9002 + fontSize: "small"
9003 + }
9004 + ],
9005 + [
9006 + "core/comment-edit-link",
9007 + {
9008 + fontSize: "small"
9009 + }
9010 + ]
9011 + ]
9012 + ],
9013 + ["core/comment-content"],
9014 + [
9015 + "core/comment-reply-link",
9016 + {
9017 + fontSize: "small"
9018 + }
9019 + ]
9020 + ]
9021 + ]
9022 + ]
9023 + ]
9024 + ]
9025 + ],
9026 + ["core/comments-pagination"],
9027 + ["core/post-comments-form"]
9028 + ];
9029 + var template_default = TEMPLATE;
9030 +
9031 +
9032 + ;// ./node_modules/@wordpress/block-library/build-module/comments/edit/index.js
9033 +
9034 +
9035 +
9036 +
9037 +
9038 + function CommentsEdit(props) {
9039 + const { attributes, setAttributes, clientId } = props;
9040 + const { tagName: TagName, legacy } = attributes;
9041 + const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)();
9042 + const innerBlocksProps = (0,external_wp_blockEditor_namespaceObject.useInnerBlocksProps)(blockProps, {
9043 + template: template_default
9044 + });
9045 + if (legacy) {
9046 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(CommentsLegacy, { ...props });
9047 + }
9048 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
9049 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
9050 + CommentsInspectorControls,
9051 + {
9052 + attributes,
9053 + setAttributes,
9054 + clientId
9055 + }
9056 + ),
9057 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(TagName, { ...innerBlocksProps })
9058 + ] });
9059 + }
9060 +
9061 +
9062 + ;// ./node_modules/@wordpress/block-library/build-module/comments/save.js
9063 +
9064 +
9065 + function comments_save_save({ attributes: { tagName: Tag, legacy } }) {
9066 + const blockProps = external_wp_blockEditor_namespaceObject.useBlockProps.save();
9067 + const innerBlocksProps = external_wp_blockEditor_namespaceObject.useInnerBlocksProps.save(blockProps);
9068 + return legacy ? null : /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(Tag, { ...innerBlocksProps });
9069 + }
9070 +
9071 +
9072 + ;// ./node_modules/@wordpress/block-library/build-module/comments/index.js
9073 +
9074 +
9075 +
9076 +
9077 +
9078 +
9079 + const { name: comments_name } = comments_block_namespaceObject;
9080 + const comments_settings = {
9081 + icon: post_comments_default,
9082 + example: {},
9083 + edit: CommentsEdit,
9084 + save: comments_save_save,
9085 + deprecated: comments_deprecated_deprecated_default
9086 + };
9087 + const comments_init = () => initBlock({ name: comments_name, metadata: comments_block_namespaceObject, settings: comments_settings });
9088 +
9089 +
9090 + ;// ./node_modules/@wordpress/block-library/build-module/comment-author-avatar/block.json
9091 + const comment_author_avatar_block_namespaceObject = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"__experimental":"fse","name":"core/comment-author-avatar","title":"Comment Author Avatar (deprecated)","category":"theme","ancestor":["core/comment-template"],"description":"This block is deprecated. Please use the Avatar block instead.","textdomain":"default","attributes":{"width":{"type":"number","default":96},"height":{"type":"number","default":96}},"usesContext":["commentId"],"supports":{"html":false,"inserter":false,"__experimentalBorder":{"radius":true,"width":true,"color":true,"style":true},"color":{"background":true,"text":false,"__experimentalDefaultControls":{"background":true}},"spacing":{"__experimentalSkipSerialization":true,"margin":true,"padding":true},"interactivity":{"clientNavigation":true}}}');
9092 + ;// ./node_modules/@wordpress/block-library/build-module/comment-author-avatar/edit.js
9093 +
9094 +
9095 +
9096 +
9097 +
9098 +
9099 + function comment_author_avatar_edit_Edit({
9100 + attributes,
9101 + context: { commentId },
9102 + setAttributes,
9103 + isSelected
9104 + }) {
9105 + const { height, width } = attributes;
9106 + const [avatars] = (0,external_wp_coreData_namespaceObject.useEntityProp)(
9107 + "root",
9108 + "comment",
9109 + "author_avatar_urls",
9110 + commentId
9111 + );
9112 + const [authorName] = (0,external_wp_coreData_namespaceObject.useEntityProp)(
9113 + "root",
9114 + "comment",
9115 + "author_name",
9116 + commentId
9117 + );
9118 + const avatarUrls = avatars ? Object.values(avatars) : null;
9119 + const sizes = avatars ? Object.keys(avatars) : null;
9120 + const minSize = sizes ? sizes[0] : 24;
9121 + const maxSize = sizes ? sizes[sizes.length - 1] : 96;
9122 + const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)();
9123 + const spacingProps = (0,external_wp_blockEditor_namespaceObject.__experimentalGetSpacingClassesAndStyles)(attributes);
9124 + const maxSizeBuffer = Math.floor(maxSize * 2.5);
9125 + const { avatarURL } = (0,external_wp_data_namespaceObject.useSelect)((select) => {
9126 + const { getSettings } = select(external_wp_blockEditor_namespaceObject.store);
9127 + const { __experimentalDiscussionSettings } = getSettings();
9128 + return __experimentalDiscussionSettings;
9129 + });
9130 + const inspectorControls = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.PanelBody, { title: (0,external_wp_i18n_namespaceObject.__)("Settings"), children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
9131 + external_wp_components_namespaceObject.RangeControl,
9132 + {
9133 + __nextHasNoMarginBottom: true,
9134 + __next40pxDefaultSize: true,
9135 + label: (0,external_wp_i18n_namespaceObject.__)("Image size"),
9136 + onChange: (newWidth) => setAttributes({
9137 + width: newWidth,
9138 + height: newWidth
9139 + }),
9140 + min: minSize,
9141 + max: maxSizeBuffer,
9142 + initialPosition: width,
9143 + value: width
9144 + }
9145 + ) }) });
9146 + const resizableAvatar = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
9147 + external_wp_components_namespaceObject.ResizableBox,
9148 + {
9149 + size: {
9150 + width,
9151 + height
9152 + },
9153 + showHandle: isSelected,
9154 + onResizeStop: (event, direction, elt, delta) => {
9155 + setAttributes({
9156 + height: parseInt(height + delta.height, 10),
9157 + width: parseInt(width + delta.width, 10)
9158 + });
9159 + },
9160 + lockAspectRatio: true,
9161 + enable: {
9162 + top: false,
9163 + right: !(0,external_wp_i18n_namespaceObject.isRTL)(),
9164 + bottom: true,
9165 + left: (0,external_wp_i18n_namespaceObject.isRTL)()
9166 + },
9167 + minWidth: minSize,
9168 + maxWidth: maxSizeBuffer,
9169 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
9170 + "img",
9171 + {
9172 + src: avatarUrls ? avatarUrls[avatarUrls.length - 1] : avatarURL,
9173 + alt: `${authorName} ${(0,external_wp_i18n_namespaceObject.__)("Avatar")}`,
9174 + ...blockProps
9175 + }
9176 + )
9177 + }
9178 + );
9179 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
9180 + inspectorControls,
9181 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { ...spacingProps, children: resizableAvatar })
9182 + ] });
9183 + }
9184 +
9185 +
9186 + ;// ./node_modules/@wordpress/block-library/build-module/comment-author-avatar/index.js
9187 +
9188 +
9189 +
9190 +
9191 + const { name: comment_author_avatar_name } = comment_author_avatar_block_namespaceObject;
9192 + const comment_author_avatar_settings = {
9193 + icon: comment_author_avatar_default,
9194 + edit: comment_author_avatar_edit_Edit
9195 + };
9196 + const comment_author_avatar_init = () => initBlock({ name: comment_author_avatar_name, metadata: comment_author_avatar_block_namespaceObject, settings: comment_author_avatar_settings });
9197 +
9198 +
9199 + ;// ./node_modules/@wordpress/icons/build-module/library/comment-author-name.js
9200 +
9201 +
9202 + var comment_author_name_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_primitives_namespaceObject.SVG, { viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", children: [
9203 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
9204 + external_wp_primitives_namespaceObject.Path,
9205 + {
9206 + d: "M18 4H6c-1.1 0-2 .9-2 2v12.9c0 .6.5 1.1 1.1 1.1.3 0 .5-.1.8-.3L8.5 17H18c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm.5 11c0 .3-.2.5-.5.5H7.9l-2.4 2.4V6c0-.3.2-.5.5-.5h12c.3 0 .5.2.5.5v9z",
9207 + fillRule: "evenodd",
9208 + clipRule: "evenodd"
9209 + }
9210 + ),
9211 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
9212 + external_wp_primitives_namespaceObject.Path,
9213 + {
9214 + d: "M15 15V15C15 13.8954 14.1046 13 13 13L11 13C9.89543 13 9 13.8954 9 15V15",
9215 + fillRule: "evenodd",
9216 + clipRule: "evenodd"
9217 + }
9218 + ),
9219 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Circle, { cx: "12", cy: "9", r: "2", fillRule: "evenodd", clipRule: "evenodd" })
9220 + ] });
9221 +
9222 +
9223 + ;// ./node_modules/@wordpress/block-library/build-module/comment-author-name/block.json
9224 + const comment_author_name_block_namespaceObject = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/comment-author-name","title":"Comment Author Name","category":"theme","ancestor":["core/comment-template"],"description":"Displays the name of the author of the comment.","textdomain":"default","attributes":{"isLink":{"type":"boolean","default":true},"linkTarget":{"type":"string","default":"_self"},"textAlign":{"type":"string"}},"usesContext":["commentId"],"supports":{"html":false,"spacing":{"margin":true,"padding":true},"color":{"gradients":true,"link":true,"__experimentalDefaultControls":{"background":true,"text":true,"link":true}},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"interactivity":{"clientNavigation":true},"__experimentalBorder":{"radius":true,"color":true,"width":true,"style":true,"__experimentalDefaultControls":{"radius":true,"color":true,"width":true,"style":true}}},"style":"wp-block-comment-author-name"}');
9225 + ;// ./node_modules/@wordpress/block-library/build-module/comment-author-name/edit.js
9226 +
9227 +
9228 +
9229 +
9230 +
9231 +
9232 +
9233 +
9234 + function comment_author_name_edit_Edit({
9235 + attributes: { isLink, linkTarget, textAlign },
9236 + context: { commentId },
9237 + setAttributes
9238 + }) {
9239 + const dropdownMenuProps = useToolsPanelDropdownMenuProps();
9240 + const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)({
9241 + className: dist_clsx({
9242 + [`has-text-align-${textAlign}`]: textAlign
9243 + })
9244 + });
9245 + let displayName = (0,external_wp_data_namespaceObject.useSelect)(
9246 + (select) => {
9247 + const { getEntityRecord } = select(external_wp_coreData_namespaceObject.store);
9248 + const comment = getEntityRecord("root", "comment", commentId);
9249 + const authorName = comment?.author_name;
9250 + if (comment && !authorName) {
9251 + const user = getEntityRecord("root", "user", comment.author);
9252 + return user?.name ?? (0,external_wp_i18n_namespaceObject.__)("Anonymous");
9253 + }
9254 + return authorName ?? "";
9255 + },
9256 + [commentId]
9257 + );
9258 + const blockControls = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockControls, { group: "block", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
9259 + external_wp_blockEditor_namespaceObject.AlignmentControl,
9260 + {
9261 + value: textAlign,
9262 + onChange: (newAlign) => setAttributes({ textAlign: newAlign })
9263 + }
9264 + ) });
9265 + const inspectorControls = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(
9266 + external_wp_components_namespaceObject.__experimentalToolsPanel,
9267 + {
9268 + label: (0,external_wp_i18n_namespaceObject.__)("Settings"),
9269 + resetAll: () => {
9270 + setAttributes({
9271 + isLink: true,
9272 + linkTarget: "_self"
9273 + });
9274 + },
9275 + dropdownMenuProps,
9276 + children: [
9277 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
9278 + external_wp_components_namespaceObject.__experimentalToolsPanelItem,
9279 + {
9280 + label: (0,external_wp_i18n_namespaceObject.__)("Link to authors URL"),
9281 + isShownByDefault: true,
9282 + hasValue: () => !isLink,
9283 + onDeselect: () => setAttributes({
9284 + isLink: true
9285 + }),
9286 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
9287 + external_wp_components_namespaceObject.ToggleControl,
9288 + {
9289 + __nextHasNoMarginBottom: true,
9290 + label: (0,external_wp_i18n_namespaceObject.__)("Link to authors URL"),
9291 + onChange: () => setAttributes({ isLink: !isLink }),
9292 + checked: isLink
9293 + }
9294 + )
9295 + }
9296 + ),
9297 + isLink && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
9298 + external_wp_components_namespaceObject.__experimentalToolsPanelItem,
9299 + {
9300 + label: (0,external_wp_i18n_namespaceObject.__)("Open in new tab"),
9301 + isShownByDefault: true,
9302 + hasValue: () => linkTarget !== "_self",
9303 + onDeselect: () => setAttributes({
9304 + linkTarget: "_self"
9305 + }),
9306 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
9307 + external_wp_components_namespaceObject.ToggleControl,
9308 + {
9309 + __nextHasNoMarginBottom: true,
9310 + label: (0,external_wp_i18n_namespaceObject.__)("Open in new tab"),
9311 + onChange: (value) => setAttributes({
9312 + linkTarget: value ? "_blank" : "_self"
9313 + }),
9314 + checked: linkTarget === "_blank"
9315 + }
9316 + )
9317 + }
9318 + )
9319 + ]
9320 + }
9321 + ) });
9322 + if (!commentId || !displayName) {
9323 + displayName = (0,external_wp_i18n_namespaceObject._x)("Comment Author", "block title");
9324 + }
9325 + const displayAuthor = isLink ? /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
9326 + "a",
9327 + {
9328 + href: "#comment-author-pseudo-link",
9329 + onClick: (event) => event.preventDefault(),
9330 + children: displayName
9331 + }
9332 + ) : displayName;
9333 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
9334 + inspectorControls,
9335 + blockControls,
9336 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { ...blockProps, children: displayAuthor })
9337 + ] });
9338 + }
9339 +
9340 +
9341 + ;// ./node_modules/@wordpress/block-library/build-module/comment-author-name/deprecated.js
9342 +
9343 + const comment_author_name_deprecated_v1 = {
9344 + attributes: {
9345 + isLink: {
9346 + type: "boolean",
9347 + default: false
9348 + },
9349 + linkTarget: {
9350 + type: "string",
9351 + default: "_self"
9352 + }
9353 + },
9354 + supports: {
9355 + html: false,
9356 + color: {
9357 + gradients: true,
9358 + link: true
9359 + },
9360 + typography: {
9361 + fontSize: true,
9362 + lineHeight: true,
9363 + __experimentalFontFamily: true,
9364 + __experimentalFontWeight: true,
9365 + __experimentalFontStyle: true,
9366 + __experimentalTextTransform: true,
9367 + __experimentalLetterSpacing: true
9368 + }
9369 + },
9370 + save() {
9371 + return null;
9372 + },
9373 + migrate: migrate_font_family_default,
9374 + isEligible({ style }) {
9375 + return style?.typography?.fontFamily;
9376 + }
9377 + };
9378 + var comment_author_name_deprecated_deprecated_default = [comment_author_name_deprecated_v1];
9379 +
9380 +
9381 + ;// ./node_modules/@wordpress/block-library/build-module/comment-author-name/index.js
9382 +
9383 +
9384 +
9385 +
9386 +
9387 + const { name: comment_author_name_name } = comment_author_name_block_namespaceObject;
9388 + const comment_author_name_settings = {
9389 + icon: comment_author_name_default,
9390 + edit: comment_author_name_edit_Edit,
9391 + deprecated: comment_author_name_deprecated_deprecated_default,
9392 + example: {}
9393 + };
9394 + const comment_author_name_init = () => initBlock({ name: comment_author_name_name, metadata: comment_author_name_block_namespaceObject, settings: comment_author_name_settings });
9395 +
9396 +
9397 + ;// ./node_modules/@wordpress/icons/build-module/library/comment-content.js
9398 +
9399 +
9400 + var comment_content_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
9401 + external_wp_primitives_namespaceObject.Path,
9402 + {
9403 + fillRule: "evenodd",
9404 + clipRule: "evenodd",
9405 + d: "M6.68822 16.625L5.5 17.8145L5.5 5.5L18.5 5.5L18.5 16.625L6.68822 16.625ZM7.31 18.125L19 18.125C19.5523 18.125 20 17.6773 20 17.125L20 5C20 4.44772 19.5523 4 19 4H5C4.44772 4 4 4.44772 4 5V19.5247C4 19.8173 4.16123 20.086 4.41935 20.2237C4.72711 20.3878 5.10601 20.3313 5.35252 20.0845L7.31 18.125ZM16 9.99997H8V8.49997H16V9.99997ZM8 14H13V12.5H8V14Z"
9406 + }
9407 + ) });
9408 +
9409 +
9410 + ;// ./node_modules/@wordpress/block-library/build-module/comment-content/block.json
9411 + const comment_content_block_namespaceObject = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/comment-content","title":"Comment Content","category":"theme","ancestor":["core/comment-template"],"description":"Displays the contents of a comment.","textdomain":"default","usesContext":["commentId"],"attributes":{"textAlign":{"type":"string"}},"supports":{"color":{"gradients":true,"link":true,"__experimentalDefaultControls":{"background":true,"text":true}},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"__experimentalBorder":{"radius":true,"color":true,"width":true,"style":true,"__experimentalDefaultControls":{"radius":true,"color":true,"width":true,"style":true}},"spacing":{"padding":["horizontal","vertical"],"__experimentalDefaultControls":{"padding":true}},"html":false},"style":"wp-block-comment-content"}');
9412 + ;// ./node_modules/@wordpress/block-library/build-module/comment-content/edit.js
9413 +
9414 +
9415 +
9416 +
9417 +
9418 +
9419 +
9420 + function comment_content_edit_Edit({
9421 + setAttributes,
9422 + attributes: { textAlign },
9423 + context: { commentId }
9424 + }) {
9425 + const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)({
9426 + className: dist_clsx({
9427 + [`has-text-align-${textAlign}`]: textAlign
9428 + })
9429 + });
9430 + const [content] = (0,external_wp_coreData_namespaceObject.useEntityProp)(
9431 + "root",
9432 + "comment",
9433 + "content",
9434 + commentId
9435 + );
9436 + const blockControls = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockControls, { group: "block", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
9437 + external_wp_blockEditor_namespaceObject.AlignmentControl,
9438 + {
9439 + value: textAlign,
9440 + onChange: (newAlign) => setAttributes({ textAlign: newAlign })
9441 + }
9442 + ) });
9443 + if (!commentId || !content) {
9444 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
9445 + blockControls,
9446 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { ...blockProps, children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("p", { children: (0,external_wp_i18n_namespaceObject._x)("Comment Content", "block title") }) })
9447 + ] });
9448 + }
9449 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
9450 + blockControls,
9451 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { ...blockProps, children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Disabled, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_element_namespaceObject.RawHTML, { children: content.rendered }, "html") }) })
9452 + ] });
9453 + }
9454 +
9455 +
9456 + ;// ./node_modules/@wordpress/block-library/build-module/comment-content/index.js
9457 +
9458 +
9459 +
9460 +
9461 + const { name: comment_content_name } = comment_content_block_namespaceObject;
9462 + const comment_content_settings = {
9463 + icon: comment_content_default,
9464 + edit: comment_content_edit_Edit,
9465 + example: {}
9466 + };
9467 + const comment_content_init = () => initBlock({ name: comment_content_name, metadata: comment_content_block_namespaceObject, settings: comment_content_settings });
9468 +
9469 +
9470 + ;// ./node_modules/@wordpress/icons/build-module/library/post-date.js
9471 +
9472 +
9473 + var post_date_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: [
9474 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M11.696 13.972c.356-.546.599-.958.728-1.235a1.79 1.79 0 00.203-.783c0-.264-.077-.47-.23-.618-.148-.153-.354-.23-.618-.23-.295 0-.569.07-.82.212a3.413 3.413 0 00-.738.571l-.147-1.188c.289-.234.59-.41.903-.526.313-.117.66-.175 1.041-.175.375 0 .695.08.959.24.264.153.46.362.59.626.135.265.203.556.203.876 0 .362-.08.734-.24 1.115-.154.381-.427.87-.82 1.466l-.756 1.152H14v1.106h-4l1.696-2.609z" }),
9475 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M19.5 7h-15v12a.5.5 0 00.5.5h14a.5.5 0 00.5-.5V7zM3 7V5a2 2 0 012-2h14a2 2 0 012 2v14a2 2 0 01-2 2H5a2 2 0 01-2-2V7z" })
9476 + ] });
9477 +
9478 +
9479 + ;// ./node_modules/@wordpress/block-library/build-module/comment-date/block.json
9480 + const comment_date_block_namespaceObject = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/comment-date","title":"Comment Date","category":"theme","ancestor":["core/comment-template"],"description":"Displays the date on which the comment was posted.","textdomain":"default","attributes":{"format":{"type":"string"},"isLink":{"type":"boolean","default":true}},"usesContext":["commentId"],"supports":{"html":false,"color":{"gradients":true,"link":true,"__experimentalDefaultControls":{"background":true,"text":true,"link":true}},"spacing":{"margin":true,"padding":true},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"interactivity":{"clientNavigation":true},"__experimentalBorder":{"radius":true,"color":true,"width":true,"style":true,"__experimentalDefaultControls":{"radius":true,"color":true,"width":true,"style":true}}},"style":"wp-block-comment-date"}');
9481 + ;// external ["wp","date"]
9482 + const external_wp_date_namespaceObject = window["wp"]["date"];
9483 + ;// ./node_modules/@wordpress/block-library/build-module/comment-date/edit.js
9484 +
9485 +
9486 +
9487 +
9488 +
9489 +
9490 +
9491 + function comment_date_edit_Edit({
9492 + attributes: { format, isLink },
9493 + context: { commentId },
9494 + setAttributes
9495 + }) {
9496 + const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)();
9497 + const dropdownMenuProps = useToolsPanelDropdownMenuProps();
9498 + let [date] = (0,external_wp_coreData_namespaceObject.useEntityProp)("root", "comment", "date", commentId);
9499 + const [siteFormat = (0,external_wp_date_namespaceObject.getSettings)().formats.date] = (0,external_wp_coreData_namespaceObject.useEntityProp)(
9500 + "root",
9501 + "site",
9502 + "date_format"
9503 + );
9504 + const inspectorControls = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(
9505 + external_wp_components_namespaceObject.__experimentalToolsPanel,
9506 + {
9507 + label: (0,external_wp_i18n_namespaceObject.__)("Settings"),
9508 + resetAll: () => {
9509 + setAttributes({
9510 + format: void 0,
9511 + isLink: true
9512 + });
9513 + },
9514 + dropdownMenuProps,
9515 + children: [
9516 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
9517 + external_wp_components_namespaceObject.__experimentalToolsPanelItem,
9518 + {
9519 + label: (0,external_wp_i18n_namespaceObject.__)("Date format"),
9520 + hasValue: () => format !== void 0,
9521 + onDeselect: () => setAttributes({ format: void 0 }),
9522 + isShownByDefault: true,
9523 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
9524 + external_wp_blockEditor_namespaceObject.__experimentalDateFormatPicker,
9525 + {
9526 + format,
9527 + defaultFormat: siteFormat,
9528 + onChange: (nextFormat) => setAttributes({ format: nextFormat })
9529 + }
9530 + )
9531 + }
9532 + ),
9533 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
9534 + external_wp_components_namespaceObject.__experimentalToolsPanelItem,
9535 + {
9536 + label: (0,external_wp_i18n_namespaceObject.__)("Link to comment"),
9537 + hasValue: () => !isLink,
9538 + onDeselect: () => setAttributes({ isLink: true }),
9539 + isShownByDefault: true,
9540 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
9541 + external_wp_components_namespaceObject.ToggleControl,
9542 + {
9543 + __nextHasNoMarginBottom: true,
9544 + label: (0,external_wp_i18n_namespaceObject.__)("Link to comment"),
9545 + onChange: () => setAttributes({ isLink: !isLink }),
9546 + checked: isLink
9547 + }
9548 + )
9549 + }
9550 + )
9551 + ]
9552 + }
9553 + ) });
9554 + if (!commentId || !date) {
9555 + date = (0,external_wp_i18n_namespaceObject._x)("Comment Date", "block title");
9556 + }
9557 + let commentDate = date instanceof Date ? /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("time", { dateTime: (0,external_wp_date_namespaceObject.dateI18n)("c", date), children: format === "human-diff" ? (0,external_wp_date_namespaceObject.humanTimeDiff)(date) : (0,external_wp_date_namespaceObject.dateI18n)(format || siteFormat, date) }) : /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("time", { children: date });
9558 + if (isLink) {
9559 + commentDate = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
9560 + "a",
9561 + {
9562 + href: "#comment-date-pseudo-link",
9563 + onClick: (event) => event.preventDefault(),
9564 + children: commentDate
9565 + }
9566 + );
9567 + }
9568 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
9569 + inspectorControls,
9570 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { ...blockProps, children: commentDate })
9571 + ] });
9572 + }
9573 +
9574 +
9575 + ;// ./node_modules/@wordpress/block-library/build-module/comment-date/deprecated.js
9576 +
9577 + const comment_date_deprecated_v1 = {
9578 + attributes: {
9579 + format: {
9580 + type: "string"
9581 + },
9582 + isLink: {
9583 + type: "boolean",
9584 + default: false
9585 + }
9586 + },
9587 + supports: {
9588 + html: false,
9589 + color: {
9590 + gradients: true,
9591 + link: true
9592 + },
9593 + typography: {
9594 + fontSize: true,
9595 + lineHeight: true,
9596 + __experimentalFontFamily: true,
9597 + __experimentalFontWeight: true,
9598 + __experimentalFontStyle: true,
9599 + __experimentalTextTransform: true,
9600 + __experimentalLetterSpacing: true
9601 + }
9602 + },
9603 + save() {
9604 + return null;
9605 + },
9606 + migrate: migrate_font_family_default,
9607 + isEligible({ style }) {
9608 + return style?.typography?.fontFamily;
9609 + }
9610 + };
9611 + var comment_date_deprecated_deprecated_default = [comment_date_deprecated_v1];
9612 +
9613 +
9614 + ;// ./node_modules/@wordpress/block-library/build-module/comment-date/index.js
9615 +
9616 +
9617 +
9618 +
9619 +
9620 + const { name: comment_date_name } = comment_date_block_namespaceObject;
9621 + const comment_date_settings = {
9622 + icon: post_date_default,
9623 + edit: comment_date_edit_Edit,
9624 + deprecated: comment_date_deprecated_deprecated_default,
9625 + example: {}
9626 + };
9627 + const comment_date_init = () => initBlock({ name: comment_date_name, metadata: comment_date_block_namespaceObject, settings: comment_date_settings });
9628 +
9629 +
9630 + ;// ./node_modules/@wordpress/icons/build-module/library/comment-edit-link.js
9631 +
9632 +
9633 + var comment_edit_link_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "m6.249 11.065.44-.44h3.186l-1.5 1.5H7.31l-1.957 1.96A.792.792 0 0 1 4 13.524V5a1 1 0 0 1 1-1h8a1 1 0 0 1 1 1v1.5L12.5 8V5.5h-7v6.315l.749-.75ZM20 19.75H7v-1.5h13v1.5Zm0-12.653-8.967 9.064L8 17l.867-2.935L17.833 5 20 7.097Z" }) });
9634 +
9635 +
9636 + ;// ./node_modules/@wordpress/block-library/build-module/comment-edit-link/block.json
9637 + const comment_edit_link_block_namespaceObject = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/comment-edit-link","title":"Comment Edit Link","category":"theme","ancestor":["core/comment-template"],"description":"Displays a link to edit the comment in the WordPress Dashboard. This link is only visible to users with the edit comment capability.","textdomain":"default","usesContext":["commentId"],"attributes":{"linkTarget":{"type":"string","default":"_self"},"textAlign":{"type":"string"}},"supports":{"html":false,"color":{"link":true,"gradients":true,"text":false,"__experimentalDefaultControls":{"background":true,"link":true}},"spacing":{"margin":true,"padding":true,"__experimentalDefaultControls":{"margin":false,"padding":false}},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"interactivity":{"clientNavigation":true},"__experimentalBorder":{"radius":true,"color":true,"width":true,"style":true}},"style":"wp-block-comment-edit-link"}');
9638 + ;// ./node_modules/@wordpress/block-library/build-module/comment-edit-link/edit.js
9639 +
9640 +
9641 +
9642 +
9643 +
9644 +
9645 + function comment_edit_link_edit_Edit({
9646 + attributes: { linkTarget, textAlign },
9647 + setAttributes
9648 + }) {
9649 + const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)({
9650 + className: dist_clsx({
9651 + [`has-text-align-${textAlign}`]: textAlign
9652 + })
9653 + });
9654 + const dropdownMenuProps = useToolsPanelDropdownMenuProps();
9655 + const blockControls = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockControls, { group: "block", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
9656 + external_wp_blockEditor_namespaceObject.AlignmentControl,
9657 + {
9658 + value: textAlign,
9659 + onChange: (newAlign) => setAttributes({ textAlign: newAlign })
9660 + }
9661 + ) });
9662 + const inspectorControls = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
9663 + external_wp_components_namespaceObject.__experimentalToolsPanel,
9664 + {
9665 + label: (0,external_wp_i18n_namespaceObject.__)("Settings"),
9666 + resetAll: () => {
9667 + setAttributes({
9668 + linkTarget: "_self"
9669 + });
9670 + },
9671 + dropdownMenuProps,
9672 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
9673 + external_wp_components_namespaceObject.__experimentalToolsPanelItem,
9674 + {
9675 + label: (0,external_wp_i18n_namespaceObject.__)("Open in new tab"),
9676 + isShownByDefault: true,
9677 + hasValue: () => linkTarget === "_blank",
9678 + onDeselect: () => setAttributes({ linkTarget: "_self" }),
9679 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
9680 + external_wp_components_namespaceObject.ToggleControl,
9681 + {
9682 + __nextHasNoMarginBottom: true,
9683 + label: (0,external_wp_i18n_namespaceObject.__)("Open in new tab"),
9684 + onChange: (value) => setAttributes({
9685 + linkTarget: value ? "_blank" : "_self"
9686 + }),
9687 + checked: linkTarget === "_blank"
9688 + }
9689 + )
9690 + }
9691 + )
9692 + }
9693 + ) });
9694 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
9695 + blockControls,
9696 + inspectorControls,
9697 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { ...blockProps, children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
9698 + "a",
9699 + {
9700 + href: "#edit-comment-pseudo-link",
9701 + onClick: (event) => event.preventDefault(),
9702 + children: (0,external_wp_i18n_namespaceObject.__)("Edit")
9703 + }
9704 + ) })
9705 + ] });
9706 + }
9707 +
9708 +
9709 + ;// ./node_modules/@wordpress/block-library/build-module/comment-edit-link/index.js
9710 +
9711 +
9712 +
9713 +
9714 + const { name: comment_edit_link_name } = comment_edit_link_block_namespaceObject;
9715 + const comment_edit_link_settings = {
9716 + icon: comment_edit_link_default,
9717 + edit: comment_edit_link_edit_Edit,
9718 + example: {}
9719 + };
9720 + const comment_edit_link_init = () => initBlock({ name: comment_edit_link_name, metadata: comment_edit_link_block_namespaceObject, settings: comment_edit_link_settings });
9721 +
9722 +
9723 + ;// ./node_modules/@wordpress/icons/build-module/library/comment-reply-link.js
9724 +
9725 +
9726 + var comment_reply_link_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M6.68822 10.625L6.24878 11.0649L5.5 11.8145L5.5 5.5L12.5 5.5V8L14 6.5V5C14 4.44772 13.5523 4 13 4H5C4.44772 4 4 4.44771 4 5V13.5247C4 13.8173 4.16123 14.086 4.41935 14.2237C4.72711 14.3878 5.10601 14.3313 5.35252 14.0845L7.31 12.125H8.375L9.875 10.625H7.31H6.68822ZM14.5605 10.4983L11.6701 13.75H16.9975C17.9963 13.75 18.7796 14.1104 19.3553 14.7048C19.9095 15.2771 20.2299 16.0224 20.4224 16.7443C20.7645 18.0276 20.7543 19.4618 20.7487 20.2544C20.7481 20.345 20.7475 20.4272 20.7475 20.4999L19.2475 20.5001C19.2475 20.4191 19.248 20.3319 19.2484 20.2394V20.2394C19.2526 19.4274 19.259 18.2035 18.973 17.1307C18.8156 16.5401 18.586 16.0666 18.2778 15.7483C17.9909 15.4521 17.5991 15.25 16.9975 15.25H11.8106L14.5303 17.9697L13.4696 19.0303L8.96956 14.5303L13.4394 9.50171L14.5605 10.4983Z" }) });
9727 +
9728 +
9729 + ;// ./node_modules/@wordpress/block-library/build-module/comment-reply-link/block.json
9730 + const comment_reply_link_block_namespaceObject = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/comment-reply-link","title":"Comment Reply Link","category":"theme","ancestor":["core/comment-template"],"description":"Displays a link to reply to a comment.","textdomain":"default","usesContext":["commentId"],"attributes":{"textAlign":{"type":"string"}},"supports":{"color":{"gradients":true,"link":true,"text":false,"__experimentalDefaultControls":{"background":true,"link":true}},"spacing":{"margin":true,"padding":true,"__experimentalDefaultControls":{"margin":false,"padding":false}},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"__experimentalBorder":{"radius":true,"color":true,"width":true,"style":true},"html":false},"style":"wp-block-comment-reply-link"}');
9731 + ;// ./node_modules/@wordpress/block-library/build-module/comment-reply-link/edit.js
9732 +
9733 +
9734 +
9735 +
9736 + function comment_reply_link_edit_Edit({ setAttributes, attributes: { textAlign } }) {
9737 + const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)({
9738 + className: dist_clsx({
9739 + [`has-text-align-${textAlign}`]: textAlign
9740 + })
9741 + });
9742 + const blockControls = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockControls, { group: "block", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
9743 + external_wp_blockEditor_namespaceObject.AlignmentControl,
9744 + {
9745 + value: textAlign,
9746 + onChange: (newAlign) => setAttributes({ textAlign: newAlign })
9747 + }
9748 + ) });
9749 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
9750 + blockControls,
9751 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { ...blockProps, children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
9752 + "a",
9753 + {
9754 + href: "#comment-reply-pseudo-link",
9755 + onClick: (event) => event.preventDefault(),
9756 + children: (0,external_wp_i18n_namespaceObject.__)("Reply")
9757 + }
9758 + ) })
9759 + ] });
9760 + }
9761 + var comment_reply_link_edit_edit_default = comment_reply_link_edit_Edit;
9762 +
9763 +
9764 + ;// ./node_modules/@wordpress/block-library/build-module/comment-reply-link/index.js
9765 +
9766 +
9767 +
9768 +
9769 + const { name: comment_reply_link_name } = comment_reply_link_block_namespaceObject;
9770 + const comment_reply_link_settings = {
9771 + edit: comment_reply_link_edit_edit_default,
9772 + icon: comment_reply_link_default,
9773 + example: {}
9774 + };
9775 + const comment_reply_link_init = () => initBlock({ name: comment_reply_link_name, metadata: comment_reply_link_block_namespaceObject, settings: comment_reply_link_settings });
9776 +
9777 +
9778 + ;// ./node_modules/@wordpress/icons/build-module/library/layout.js
9779 +
9780 +
9781 + var layout_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M18 5.5H6a.5.5 0 00-.5.5v3h13V6a.5.5 0 00-.5-.5zm.5 5H10v8h8a.5.5 0 00.5-.5v-7.5zm-10 0h-3V18a.5.5 0 00.5.5h2.5v-8zM6 4h12a2 2 0 012 2v12a2 2 0 01-2 2H6a2 2 0 01-2-2V6a2 2 0 012-2z" }) });
9782 +
9783 +
9784 + ;// ./node_modules/@wordpress/block-library/build-module/comment-template/block.json
9785 + const comment_template_block_namespaceObject = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/comment-template","title":"Comment Template","category":"design","parent":["core/comments"],"description":"Contains the block elements used to display a comment, like the title, date, author, avatar and more.","textdomain":"default","usesContext":["postId"],"supports":{"align":true,"html":false,"reusable":false,"spacing":{"margin":true,"padding":true},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"interactivity":{"clientNavigation":true},"__experimentalBorder":{"radius":true,"color":true,"width":true,"style":true,"__experimentalDefaultControls":{"radius":true,"color":true,"width":true,"style":true}}},"style":"wp-block-comment-template"}');
9786 + ;// external ["wp","apiFetch"]
9787 + const external_wp_apiFetch_namespaceObject = window["wp"]["apiFetch"];
9788 + var external_wp_apiFetch_default = /*#__PURE__*/__webpack_require__.n(external_wp_apiFetch_namespaceObject);
9789 + ;// ./node_modules/@wordpress/block-library/build-module/comment-template/hooks.js
9790 +
9791 +
9792 +
9793 +
9794 +
9795 + const MAX_COMMENTS_PER_PAGE = 100;
9796 + const useCommentQueryArgs = ({ postId }) => {
9797 + const queryArgs = {
9798 + status: "approve",
9799 + order: "asc",
9800 + context: "embed",
9801 + parent: 0,
9802 + _embed: "children"
9803 + };
9804 + const {
9805 + pageComments,
9806 + commentsPerPage,
9807 + defaultCommentsPage: defaultPage
9808 + } = (0,external_wp_data_namespaceObject.useSelect)((select) => {
9809 + const { getSettings } = select(external_wp_blockEditor_namespaceObject.store);
9810 + const { __experimentalDiscussionSettings } = getSettings();
9811 + return __experimentalDiscussionSettings;
9812 + });
9813 + const perPage = pageComments ? Math.min(commentsPerPage, MAX_COMMENTS_PER_PAGE) : MAX_COMMENTS_PER_PAGE;
9814 + const page = useDefaultPageIndex({
9815 + defaultPage,
9816 + postId,
9817 + perPage,
9818 + queryArgs
9819 + });
9820 + return (0,external_wp_element_namespaceObject.useMemo)(() => {
9821 + return page ? {
9822 + ...queryArgs,
9823 + post: postId,
9824 + per_page: perPage,
9825 + page
9826 + } : null;
9827 + }, [postId, perPage, page]);
9828 + };
9829 + const useDefaultPageIndex = ({ defaultPage, postId, perPage, queryArgs }) => {
9830 + const [defaultPages, setDefaultPages] = (0,external_wp_element_namespaceObject.useState)({});
9831 + const key = `${postId}_${perPage}`;
9832 + const page = defaultPages[key] || 0;
9833 + (0,external_wp_element_namespaceObject.useEffect)(() => {
9834 + if (page || defaultPage !== "newest") {
9835 + return;
9836 + }
9837 + external_wp_apiFetch_default()({
9838 + path: (0,external_wp_url_namespaceObject.addQueryArgs)("/wp/v2/comments", {
9839 + ...queryArgs,
9840 + post: postId,
9841 + per_page: perPage,
9842 + _fields: "id"
9843 + }),
9844 + method: "HEAD",
9845 + parse: false
9846 + }).then((res) => {
9847 + const pages = parseInt(res.headers.get("X-WP-TotalPages"));
9848 + setDefaultPages({
9849 + ...defaultPages,
9850 + [key]: pages <= 1 ? 1 : pages
9851 + // If there are 0 pages, it means that there are no comments, but there is no 0th page.
9852 + });
9853 + }).catch(() => {
9854 + setDefaultPages({
9855 + ...defaultPages,
9856 + [key]: 1
9857 + });
9858 + });
9859 + }, [defaultPage, postId, perPage, setDefaultPages]);
9860 + return defaultPage === "newest" ? page : 1;
9861 + };
9862 + const useCommentTree = (topLevelComments) => {
9863 + const commentTree = (0,external_wp_element_namespaceObject.useMemo)(
9864 + () => topLevelComments?.map(({ id, _embedded }) => {
9865 + const [children] = _embedded?.children || [[]];
9866 + return {
9867 + commentId: id,
9868 + children: children.map((child) => ({
9869 + commentId: child.id
9870 + }))
9871 + };
9872 + }),
9873 + [topLevelComments]
9874 + );
9875 + return commentTree;
9876 + };
9877 +
9878 +
9879 + ;// ./node_modules/@wordpress/block-library/build-module/comment-template/edit.js
9880 +
9881 +
9882 +
9883 +
9884 +
9885 +
9886 +
9887 +
9888 + const edit_TEMPLATE = [
9889 + ["core/avatar"],
9890 + ["core/comment-author-name"],
9891 + ["core/comment-date"],
9892 + ["core/comment-content"],
9893 + ["core/comment-reply-link"],
9894 + ["core/comment-edit-link"]
9895 + ];
9896 + const getCommentsPlaceholder = ({
9897 + perPage,
9898 + pageComments,
9899 + threadComments,
9900 + threadCommentsDepth
9901 + }) => {
9902 + const commentsDepth = !threadComments ? 1 : Math.min(threadCommentsDepth, 3);
9903 + const buildChildrenComment = (commentsLevel) => {
9904 + if (commentsLevel < commentsDepth) {
9905 + const nextLevel = commentsLevel + 1;
9906 + return [
9907 + {
9908 + commentId: -(commentsLevel + 3),
9909 + children: buildChildrenComment(nextLevel)
9910 + }
9911 + ];
9912 + }
9913 + return [];
9914 + };
9915 + const placeholderComments = [
9916 + { commentId: -1, children: buildChildrenComment(1) }
9917 + ];
9918 + if ((!pageComments || perPage >= 2) && commentsDepth < 3) {
9919 + placeholderComments.push({
9920 + commentId: -2,
9921 + children: []
9922 + });
9923 + }
9924 + if ((!pageComments || perPage >= 3) && commentsDepth < 2) {
9925 + placeholderComments.push({
9926 + commentId: -3,
9927 + children: []
9928 + });
9929 + }
9930 + return placeholderComments;
9931 + };
9932 + function CommentTemplateInnerBlocks({
9933 + comment,
9934 + activeCommentId,
9935 + setActiveCommentId,
9936 + firstCommentId,
9937 + blocks
9938 + }) {
9939 + const { children, ...innerBlocksProps } = (0,external_wp_blockEditor_namespaceObject.useInnerBlocksProps)(
9940 + {},
9941 + { template: edit_TEMPLATE }
9942 + );
9943 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("li", { ...innerBlocksProps, children: [
9944 + comment.commentId === (activeCommentId || firstCommentId) ? children : null,
9945 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
9946 + MemoizedCommentTemplatePreview,
9947 + {
9948 + blocks,
9949 + commentId: comment.commentId,
9950 + setActiveCommentId,
9951 + isHidden: comment.commentId === (activeCommentId || firstCommentId)
9952 + }
9953 + ),
9954 + comment?.children?.length > 0 ? /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
9955 + CommentsList,
9956 + {
9957 + comments: comment.children,
9958 + activeCommentId,
9959 + setActiveCommentId,
9960 + blocks,
9961 + firstCommentId
9962 + }
9963 + ) : null
9964 + ] });
9965 + }
9966 + const CommentTemplatePreview = ({
9967 + blocks,
9968 + commentId,
9969 + setActiveCommentId,
9970 + isHidden
9971 + }) => {
9972 + const blockPreviewProps = (0,external_wp_blockEditor_namespaceObject.__experimentalUseBlockPreview)({
9973 + blocks
9974 + });
9975 + const handleOnClick = () => {
9976 + setActiveCommentId(commentId);
9977 + };
9978 + const style = {
9979 + display: isHidden ? "none" : void 0
9980 + };
9981 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
9982 + "div",
9983 + {
9984 + ...blockPreviewProps,
9985 + tabIndex: 0,
9986 + role: "button",
9987 + style,
9988 + onClick: handleOnClick,
9989 + onKeyPress: handleOnClick
9990 + }
9991 + );
9992 + };
9993 + const MemoizedCommentTemplatePreview = (0,external_wp_element_namespaceObject.memo)(CommentTemplatePreview);
9994 + const CommentsList = ({
9995 + comments,
9996 + blockProps,
9997 + activeCommentId,
9998 + setActiveCommentId,
9999 + blocks,
10000 + firstCommentId
10001 + }) => /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("ol", { ...blockProps, children: comments && comments.map(({ commentId, ...comment }, index) => /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
10002 + external_wp_blockEditor_namespaceObject.BlockContextProvider,
10003 + {
10004 + value: {
10005 + // If the commentId is negative it means that this comment is a
10006 + // "placeholder" and that the block is most likely being used in the
10007 + // site editor. In this case, we have to set the commentId to `null`
10008 + // because otherwise the (non-existent) comment with a negative ID
10009 + // would be requested from the REST API.
10010 + commentId: commentId < 0 ? null : commentId
10011 + },
10012 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
10013 + CommentTemplateInnerBlocks,
10014 + {
10015 + comment: { commentId, ...comment },
10016 + activeCommentId,
10017 + setActiveCommentId,
10018 + blocks,
10019 + firstCommentId
10020 + }
10021 + )
10022 + },
10023 + comment.commentId || index
10024 + )) });
10025 + function CommentTemplateEdit({
10026 + clientId,
10027 + context: { postId }
10028 + }) {
10029 + const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)();
10030 + const [activeCommentId, setActiveCommentId] = (0,external_wp_element_namespaceObject.useState)();
10031 + const {
10032 + commentOrder,
10033 + threadCommentsDepth,
10034 + threadComments,
10035 + commentsPerPage,
10036 + pageComments
10037 + } = (0,external_wp_data_namespaceObject.useSelect)((select) => {
10038 + const { getSettings } = select(external_wp_blockEditor_namespaceObject.store);
10039 + return getSettings().__experimentalDiscussionSettings;
10040 + });
10041 + const commentQuery = useCommentQueryArgs({
10042 + postId
10043 + });
10044 + const { topLevelComments, blocks } = (0,external_wp_data_namespaceObject.useSelect)(
10045 + (select) => {
10046 + const { getEntityRecords } = select(external_wp_coreData_namespaceObject.store);
10047 + const { getBlocks } = select(external_wp_blockEditor_namespaceObject.store);
10048 + return {
10049 + // Request only top-level comments. Replies are embedded.
10050 + topLevelComments: commentQuery ? getEntityRecords("root", "comment", commentQuery) : null,
10051 + blocks: getBlocks(clientId)
10052 + };
10053 + },
10054 + [clientId, commentQuery]
10055 + );
10056 + let commentTree = useCommentTree(
10057 + // Reverse the order of top comments if needed.
10058 + commentOrder === "desc" && topLevelComments ? [...topLevelComments].reverse() : topLevelComments
10059 + );
10060 + if (!topLevelComments) {
10061 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("p", { ...blockProps, children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Spinner, {}) });
10062 + }
10063 + if (!postId) {
10064 + commentTree = getCommentsPlaceholder({
10065 + perPage: commentsPerPage,
10066 + pageComments,
10067 + threadComments,
10068 + threadCommentsDepth
10069 + });
10070 + }
10071 + if (!commentTree.length) {
10072 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("p", { ...blockProps, children: (0,external_wp_i18n_namespaceObject.__)("No results found.") });
10073 + }
10074 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
10075 + CommentsList,
10076 + {
10077 + comments: commentTree,
10078 + blockProps,
10079 + blocks,
10080 + activeCommentId,
10081 + setActiveCommentId,
10082 + firstCommentId: commentTree[0]?.commentId
10083 + }
10084 + );
10085 + }
10086 +
10087 +
10088 + ;// ./node_modules/@wordpress/block-library/build-module/comment-template/save.js
10089 +
10090 +
10091 + function CommentTemplateSave() {
10092 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, {});
10093 + }
10094 +
10095 +
10096 + ;// ./node_modules/@wordpress/block-library/build-module/comment-template/index.js
10097 +
10098 +
10099 +
10100 +
10101 +
10102 + const { name: comment_template_name } = comment_template_block_namespaceObject;
10103 + const comment_template_settings = {
10104 + icon: layout_default,
10105 + edit: CommentTemplateEdit,
10106 + save: CommentTemplateSave
10107 + };
10108 + const comment_template_init = () => initBlock({ name: comment_template_name, metadata: comment_template_block_namespaceObject, settings: comment_template_settings });
10109 +
10110 +
10111 + ;// ./node_modules/@wordpress/icons/build-module/library/query-pagination-previous.js
10112 +
10113 +
10114 + var query_pagination_previous_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M16 10.5v3h3v-3h-3zm-5 3h3v-3h-3v3zM7 9l-3 3 3 3 1-1-2-2 2-2-1-1z" }) });
10115 +
10116 +
10117 + ;// ./node_modules/@wordpress/block-library/build-module/comments-pagination-previous/block.json
10118 + const comments_pagination_previous_block_namespaceObject = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/comments-pagination-previous","title":"Comments Previous Page","category":"theme","parent":["core/comments-pagination"],"description":"Displays the previous comment\'s page link.","textdomain":"default","attributes":{"label":{"type":"string"}},"usesContext":["postId","comments/paginationArrow"],"supports":{"reusable":false,"html":false,"color":{"gradients":true,"text":false,"__experimentalDefaultControls":{"background":true}},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"interactivity":{"clientNavigation":true}}}');
10119 + ;// ./node_modules/@wordpress/block-library/build-module/comments-pagination-previous/edit.js
10120 +
10121 +
10122 +
10123 + const arrowMap = {
10124 + none: "",
10125 + arrow: "\u2190",
10126 + chevron: "\xAB"
10127 + };
10128 + function CommentsPaginationPreviousEdit({
10129 + attributes: { label },
10130 + setAttributes,
10131 + context: { "comments/paginationArrow": paginationArrow }
10132 + }) {
10133 + const displayArrow = arrowMap[paginationArrow];
10134 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(
10135 + "a",
10136 + {
10137 + href: "#comments-pagination-previous-pseudo-link",
10138 + onClick: (event) => event.preventDefault(),
10139 + ...(0,external_wp_blockEditor_namespaceObject.useBlockProps)(),
10140 + children: [
10141 + displayArrow && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
10142 + "span",
10143 + {
10144 + className: `wp-block-comments-pagination-previous-arrow is-arrow-${paginationArrow}`,
10145 + children: displayArrow
10146 + }
10147 + ),
10148 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
10149 + external_wp_blockEditor_namespaceObject.PlainText,
10150 + {
10151 + __experimentalVersion: 2,
10152 + tagName: "span",
10153 + "aria-label": (0,external_wp_i18n_namespaceObject.__)("Older comments page link"),
10154 + placeholder: (0,external_wp_i18n_namespaceObject.__)("Older Comments"),
10155 + value: label,
10156 + onChange: (newLabel) => setAttributes({ label: newLabel })
10157 + }
10158 + )
10159 + ]
10160 + }
10161 + );
10162 + }
10163 +
10164 +
10165 + ;// ./node_modules/@wordpress/block-library/build-module/comments-pagination-previous/index.js
10166 +
10167 +
10168 +
10169 +
10170 +
10171 + const { name: comments_pagination_previous_name } = comments_pagination_previous_block_namespaceObject;
10172 + const comments_pagination_previous_settings = {
10173 + icon: query_pagination_previous_default,
10174 + edit: CommentsPaginationPreviousEdit,
10175 + example: {
10176 + attributes: {
10177 + label: (0,external_wp_i18n_namespaceObject.__)("Older Comments")
10178 + }
10179 + }
10180 + };
10181 + const comments_pagination_previous_init = () => initBlock({ name: comments_pagination_previous_name, metadata: comments_pagination_previous_block_namespaceObject, settings: comments_pagination_previous_settings });
10182 +
10183 +
10184 + ;// ./node_modules/@wordpress/icons/build-module/library/query-pagination.js
10185 +
10186 +
10187 + var query_pagination_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M4 13.5h6v-3H4v3zm8 0h3v-3h-3v3zm5-3v3h3v-3h-3z" }) });
10188 +
10189 +
10190 + ;// ./node_modules/@wordpress/block-library/build-module/comments-pagination/block.json
10191 + const comments_pagination_block_namespaceObject = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/comments-pagination","title":"Comments Pagination","category":"theme","parent":["core/comments"],"allowedBlocks":["core/comments-pagination-previous","core/comments-pagination-numbers","core/comments-pagination-next"],"description":"Displays a paginated navigation to next/previous set of comments, when applicable.","textdomain":"default","attributes":{"paginationArrow":{"type":"string","default":"none"}},"example":{"attributes":{"paginationArrow":"none"}},"providesContext":{"comments/paginationArrow":"paginationArrow"},"supports":{"align":true,"reusable":false,"html":false,"color":{"gradients":true,"link":true,"__experimentalDefaultControls":{"background":true,"text":true,"link":true}},"layout":{"allowSwitching":false,"allowInheriting":false,"default":{"type":"flex"}},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"interactivity":{"clientNavigation":true}},"editorStyle":"wp-block-comments-pagination-editor","style":"wp-block-comments-pagination"}');
10192 + ;// ./node_modules/@wordpress/block-library/build-module/comments-pagination/comments-pagination-arrow-controls.js
10193 +
10194 +
10195 +
10196 + function CommentsPaginationArrowControls({ value, onChange }) {
10197 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(
10198 + external_wp_components_namespaceObject.__experimentalToggleGroupControl,
10199 + {
10200 + __next40pxDefaultSize: true,
10201 + __nextHasNoMarginBottom: true,
10202 + label: (0,external_wp_i18n_namespaceObject.__)("Arrow"),
10203 + value,
10204 + onChange,
10205 + help: (0,external_wp_i18n_namespaceObject.__)(
10206 + "A decorative arrow appended to the next and previous comments link."
10207 + ),
10208 + isBlock: true,
10209 + children: [
10210 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
10211 + external_wp_components_namespaceObject.__experimentalToggleGroupControlOption,
10212 + {
10213 + value: "none",
10214 + label: (0,external_wp_i18n_namespaceObject._x)(
10215 + "None",
10216 + "Arrow option for Comments Pagination Next/Previous blocks"
10217 + )
10218 + }
10219 + ),
10220 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
10221 + external_wp_components_namespaceObject.__experimentalToggleGroupControlOption,
10222 + {
10223 + value: "arrow",
10224 + label: (0,external_wp_i18n_namespaceObject._x)(
10225 + "Arrow",
10226 + "Arrow option for Comments Pagination Next/Previous blocks"
10227 + )
10228 + }
10229 + ),
10230 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
10231 + external_wp_components_namespaceObject.__experimentalToggleGroupControlOption,
10232 + {
10233 + value: "chevron",
10234 + label: (0,external_wp_i18n_namespaceObject._x)(
10235 + "Chevron",
10236 + "Arrow option for Comments Pagination Next/Previous blocks"
10237 + )
10238 + }
10239 + )
10240 + ]
10241 + }
10242 + );
10243 + }
10244 +
10245 +
10246 + ;// ./node_modules/@wordpress/block-library/build-module/comments-pagination/edit.js
10247 +
10248 +
10249 +
10250 +
10251 +
10252 +
10253 +
10254 + const comments_pagination_edit_TEMPLATE = [
10255 + ["core/comments-pagination-previous"],
10256 + ["core/comments-pagination-numbers"],
10257 + ["core/comments-pagination-next"]
10258 + ];
10259 + function QueryPaginationEdit({
10260 + attributes: { paginationArrow },
10261 + setAttributes,
10262 + clientId
10263 + }) {
10264 + const hasNextPreviousBlocks = (0,external_wp_data_namespaceObject.useSelect)((select) => {
10265 + const { getBlocks } = select(external_wp_blockEditor_namespaceObject.store);
10266 + const innerBlocks = getBlocks(clientId);
10267 + return innerBlocks?.find((innerBlock) => {
10268 + return [
10269 + "core/comments-pagination-previous",
10270 + "core/comments-pagination-next"
10271 + ].includes(innerBlock.name);
10272 + });
10273 + }, []);
10274 + const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)();
10275 + const dropdownMenuProps = useToolsPanelDropdownMenuProps();
10276 + const innerBlocksProps = (0,external_wp_blockEditor_namespaceObject.useInnerBlocksProps)(blockProps, {
10277 + template: comments_pagination_edit_TEMPLATE
10278 + });
10279 + const pageComments = (0,external_wp_data_namespaceObject.useSelect)((select) => {
10280 + const { getSettings } = select(external_wp_blockEditor_namespaceObject.store);
10281 + const { __experimentalDiscussionSettings } = getSettings();
10282 + return __experimentalDiscussionSettings?.pageComments;
10283 + }, []);
10284 + if (!pageComments) {
10285 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.Warning, { children: (0,external_wp_i18n_namespaceObject.__)(
10286 + "Comments Pagination block: paging comments is disabled in the Discussion Settings"
10287 + ) });
10288 + }
10289 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
10290 + hasNextPreviousBlocks && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
10291 + external_wp_components_namespaceObject.__experimentalToolsPanel,
10292 + {
10293 + label: (0,external_wp_i18n_namespaceObject.__)("Settings"),
10294 + dropdownMenuProps,
10295 + resetAll: () => setAttributes({ paginationArrow: "none" }),
10296 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
10297 + external_wp_components_namespaceObject.__experimentalToolsPanelItem,
10298 + {
10299 + label: (0,external_wp_i18n_namespaceObject.__)("Arrow"),
10300 + hasValue: () => paginationArrow !== "none",
10301 + onDeselect: () => setAttributes({ paginationArrow: "none" }),
10302 + isShownByDefault: true,
10303 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
10304 + CommentsPaginationArrowControls,
10305 + {
10306 + value: paginationArrow,
10307 + onChange: (value) => {
10308 + setAttributes({ paginationArrow: value });
10309 + }
10310 + }
10311 + )
10312 + }
10313 + )
10314 + }
10315 + ) }),
10316 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { ...innerBlocksProps })
10317 + ] });
10318 + }
10319 +
10320 +
10321 + ;// ./node_modules/@wordpress/block-library/build-module/comments-pagination/save.js
10322 +
10323 +
10324 + function comments_pagination_save_save() {
10325 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, {});
10326 + }
10327 +
10328 +
10329 + ;// ./node_modules/@wordpress/block-library/build-module/comments-pagination/index.js
10330 +
10331 +
10332 +
10333 +
10334 +
10335 + const { name: comments_pagination_name } = comments_pagination_block_namespaceObject;
10336 + const comments_pagination_settings = {
10337 + icon: query_pagination_default,
10338 + edit: QueryPaginationEdit,
10339 + save: comments_pagination_save_save
10340 + };
10341 + const comments_pagination_init = () => initBlock({ name: comments_pagination_name, metadata: comments_pagination_block_namespaceObject, settings: comments_pagination_settings });
10342 +
10343 +
10344 + ;// ./node_modules/@wordpress/icons/build-module/library/query-pagination-next.js
10345 +
10346 +
10347 + var query_pagination_next_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M5 13.5h3v-3H5v3zm5 0h3v-3h-3v3zM17 9l-1 1 2 2-2 2 1 1 3-3-3-3z" }) });
10348 +
10349 +
10350 + ;// ./node_modules/@wordpress/block-library/build-module/comments-pagination-next/block.json
10351 + const comments_pagination_next_block_namespaceObject = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/comments-pagination-next","title":"Comments Next Page","category":"theme","parent":["core/comments-pagination"],"description":"Displays the next comment\'s page link.","textdomain":"default","attributes":{"label":{"type":"string"}},"usesContext":["postId","comments/paginationArrow"],"supports":{"reusable":false,"html":false,"color":{"gradients":true,"text":false,"__experimentalDefaultControls":{"background":true}},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"interactivity":{"clientNavigation":true}}}');
10352 + ;// ./node_modules/@wordpress/block-library/build-module/comments-pagination-next/edit.js
10353 +
10354 +
10355 +
10356 + const edit_arrowMap = {
10357 + none: "",
10358 + arrow: "\u2192",
10359 + chevron: "\xBB"
10360 + };
10361 + function CommentsPaginationNextEdit({
10362 + attributes: { label },
10363 + setAttributes,
10364 + context: { "comments/paginationArrow": paginationArrow }
10365 + }) {
10366 + const displayArrow = edit_arrowMap[paginationArrow];
10367 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(
10368 + "a",
10369 + {
10370 + href: "#comments-pagination-next-pseudo-link",
10371 + onClick: (event) => event.preventDefault(),
10372 + ...(0,external_wp_blockEditor_namespaceObject.useBlockProps)(),
10373 + children: [
10374 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
10375 + external_wp_blockEditor_namespaceObject.PlainText,
10376 + {
10377 + __experimentalVersion: 2,
10378 + tagName: "span",
10379 + "aria-label": (0,external_wp_i18n_namespaceObject.__)("Newer comments page link"),
10380 + placeholder: (0,external_wp_i18n_namespaceObject.__)("Newer Comments"),
10381 + value: label,
10382 + onChange: (newLabel) => setAttributes({ label: newLabel })
10383 + }
10384 + ),
10385 + displayArrow && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
10386 + "span",
10387 + {
10388 + className: `wp-block-comments-pagination-next-arrow is-arrow-${paginationArrow}`,
10389 + children: displayArrow
10390 + }
10391 + )
10392 + ]
10393 + }
10394 + );
10395 + }
10396 +
10397 +
10398 + ;// ./node_modules/@wordpress/block-library/build-module/comments-pagination-next/index.js
10399 +
10400 +
10401 +
10402 +
10403 +
10404 + const { name: comments_pagination_next_name } = comments_pagination_next_block_namespaceObject;
10405 + const comments_pagination_next_settings = {
10406 + icon: query_pagination_next_default,
10407 + edit: CommentsPaginationNextEdit,
10408 + example: {
10409 + attributes: {
10410 + label: (0,external_wp_i18n_namespaceObject.__)("Newer Comments")
10411 + }
10412 + }
10413 + };
10414 + const comments_pagination_next_init = () => initBlock({ name: comments_pagination_next_name, metadata: comments_pagination_next_block_namespaceObject, settings: comments_pagination_next_settings });
10415 +
10416 +
10417 + ;// ./node_modules/@wordpress/icons/build-module/library/query-pagination-numbers.js
10418 +
10419 +
10420 + var query_pagination_numbers_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M4 13.5h6v-3H4v3zm8.2-2.5.8-.3V14h1V9.3l-2.2.7.4 1zm7.1-1.2c-.5-.6-1.2-.5-1.7-.4-.3.1-.5.2-.7.3l.1 1.1c.2-.2.5-.4.8-.5.3-.1.6 0 .7.1.2.3 0 .8-.2 1.1-.5.8-.9 1.6-1.4 2.5h2.7v-1h-.9c.3-.6.8-1.4.9-2.1 0-.3-.1-.8-.3-1.1z" }) });
10421 +
10422 +
10423 + ;// ./node_modules/@wordpress/block-library/build-module/comments-pagination-numbers/block.json
10424 + const comments_pagination_numbers_block_namespaceObject = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/comments-pagination-numbers","title":"Comments Page Numbers","category":"theme","parent":["core/comments-pagination"],"description":"Displays a list of page numbers for comments pagination.","textdomain":"default","usesContext":["postId"],"supports":{"reusable":false,"html":false,"color":{"gradients":true,"text":false,"__experimentalDefaultControls":{"background":true}},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"interactivity":{"clientNavigation":true}}}');
10425 + ;// ./node_modules/@wordpress/block-library/build-module/comments-pagination-numbers/edit.js
10426 +
10427 +
10428 + const PaginationItem = ({ content, tag: Tag = "a", extraClass = "" }) => Tag === "a" ? /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
10429 + Tag,
10430 + {
10431 + className: `page-numbers ${extraClass}`,
10432 + href: "#comments-pagination-numbers-pseudo-link",
10433 + onClick: (event) => event.preventDefault(),
10434 + children: content
10435 + }
10436 + ) : /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(Tag, { className: `page-numbers ${extraClass}`, children: content });
10437 + function CommentsPaginationNumbersEdit() {
10438 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", { ...(0,external_wp_blockEditor_namespaceObject.useBlockProps)(), children: [
10439 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(PaginationItem, { content: "1" }),
10440 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(PaginationItem, { content: "2" }),
10441 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(PaginationItem, { content: "3", tag: "span", extraClass: "current" }),
10442 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(PaginationItem, { content: "4" }),
10443 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(PaginationItem, { content: "5" }),
10444 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(PaginationItem, { content: "...", tag: "span", extraClass: "dots" }),
10445 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(PaginationItem, { content: "8" })
10446 + ] });
10447 + }
10448 +
10449 +
10450 + ;// ./node_modules/@wordpress/block-library/build-module/comments-pagination-numbers/index.js
10451 +
10452 +
10453 +
10454 +
10455 + const { name: comments_pagination_numbers_name } = comments_pagination_numbers_block_namespaceObject;
10456 + const comments_pagination_numbers_settings = {
10457 + icon: query_pagination_numbers_default,
10458 + edit: CommentsPaginationNumbersEdit,
10459 + example: {}
10460 + };
10461 + const comments_pagination_numbers_init = () => initBlock({ name: comments_pagination_numbers_name, metadata: comments_pagination_numbers_block_namespaceObject, settings: comments_pagination_numbers_settings });
10462 +
10463 +
10464 + ;// ./node_modules/@wordpress/icons/build-module/library/title.js
10465 +
10466 +
10467 + var title_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "m4 5.5h2v6.5h1.5v-6.5h2v-1.5h-5.5zm16 10.5h-16v-1.5h16zm-7 4h-9v-1.5h9z" }) });
10468 +
10469 +
10470 + ;// ./node_modules/@wordpress/block-library/build-module/comments-title/block.json
10471 + const comments_title_block_namespaceObject = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/comments-title","title":"Comments Title","category":"theme","ancestor":["core/comments"],"description":"Displays a title with the number of comments.","textdomain":"default","usesContext":["postId","postType"],"attributes":{"textAlign":{"type":"string"},"showPostTitle":{"type":"boolean","default":true},"showCommentsCount":{"type":"boolean","default":true},"level":{"type":"number","default":2},"levelOptions":{"type":"array"}},"supports":{"anchor":false,"align":true,"html":false,"__experimentalBorder":{"radius":true,"color":true,"width":true,"style":true},"color":{"gradients":true,"__experimentalDefaultControls":{"background":true,"text":true}},"spacing":{"margin":true,"padding":true},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true,"__experimentalFontFamily":true,"__experimentalFontStyle":true,"__experimentalFontWeight":true}},"interactivity":{"clientNavigation":true}}}');
10472 + ;// ./node_modules/@wordpress/block-library/build-module/comments-title/edit.js
10473 +
10474 +
10475 +
10476 +
10477 +
10478 +
10479 +
10480 +
10481 +
10482 +
10483 +
10484 + function comments_title_edit_Edit({
10485 + attributes: {
10486 + textAlign,
10487 + showPostTitle,
10488 + showCommentsCount,
10489 + level,
10490 + levelOptions
10491 + },
10492 + setAttributes,
10493 + context: { postType, postId }
10494 + }) {
10495 + const TagName = "h" + level;
10496 + const [commentsCount, setCommentsCount] = (0,external_wp_element_namespaceObject.useState)();
10497 + const [rawTitle] = (0,external_wp_coreData_namespaceObject.useEntityProp)("postType", postType, "title", postId);
10498 + const isSiteEditor = typeof postId === "undefined";
10499 + const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)({
10500 + className: dist_clsx({
10501 + [`has-text-align-${textAlign}`]: textAlign
10502 + })
10503 + });
10504 + const {
10505 + threadCommentsDepth,
10506 + threadComments,
10507 + commentsPerPage,
10508 + pageComments
10509 + } = (0,external_wp_data_namespaceObject.useSelect)((select) => {
10510 + const { getSettings } = select(external_wp_blockEditor_namespaceObject.store);
10511 + return getSettings().__experimentalDiscussionSettings;
10512 + });
10513 + const dropdownMenuProps = useToolsPanelDropdownMenuProps();
10514 + (0,external_wp_element_namespaceObject.useEffect)(() => {
10515 + if (isSiteEditor) {
10516 + const nestedCommentsNumber = threadComments ? Math.min(threadCommentsDepth, 3) - 1 : 0;
10517 + const topLevelCommentsNumber = pageComments ? commentsPerPage : 3;
10518 + const commentsNumber = parseInt(nestedCommentsNumber) + parseInt(topLevelCommentsNumber);
10519 + setCommentsCount(Math.min(commentsNumber, 3));
10520 + return;
10521 + }
10522 + const currentPostId = postId;
10523 + external_wp_apiFetch_default()({
10524 + path: (0,external_wp_url_namespaceObject.addQueryArgs)("/wp/v2/comments", {
10525 + post: postId,
10526 + _fields: "id"
10527 + }),
10528 + method: "HEAD",
10529 + parse: false
10530 + }).then((res) => {
10531 + if (currentPostId === postId) {
10532 + setCommentsCount(
10533 + parseInt(res.headers.get("X-WP-Total"))
10534 + );
10535 + }
10536 + }).catch(() => {
10537 + setCommentsCount(0);
10538 + });
10539 + }, [postId]);
10540 + const blockControls = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_blockEditor_namespaceObject.BlockControls, { group: "block", children: [
10541 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
10542 + external_wp_blockEditor_namespaceObject.AlignmentControl,
10543 + {
10544 + value: textAlign,
10545 + onChange: (newAlign) => setAttributes({ textAlign: newAlign })
10546 + }
10547 + ),
10548 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
10549 + external_wp_blockEditor_namespaceObject.HeadingLevelDropdown,
10550 + {
10551 + value: level,
10552 + options: levelOptions,
10553 + onChange: (newLevel) => setAttributes({ level: newLevel })
10554 + }
10555 + )
10556 + ] });
10557 + const inspectorControls = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(
10558 + external_wp_components_namespaceObject.__experimentalToolsPanel,
10559 + {
10560 + label: (0,external_wp_i18n_namespaceObject.__)("Settings"),
10561 + resetAll: () => {
10562 + setAttributes({
10563 + showPostTitle: true,
10564 + showCommentsCount: true
10565 + });
10566 + },
10567 + dropdownMenuProps,
10568 + children: [
10569 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
10570 + external_wp_components_namespaceObject.__experimentalToolsPanelItem,
10571 + {
10572 + label: (0,external_wp_i18n_namespaceObject.__)("Show post title"),
10573 + isShownByDefault: true,
10574 + hasValue: () => !showPostTitle,
10575 + onDeselect: () => setAttributes({ showPostTitle: true }),
10576 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
10577 + external_wp_components_namespaceObject.ToggleControl,
10578 + {
10579 + __nextHasNoMarginBottom: true,
10580 + label: (0,external_wp_i18n_namespaceObject.__)("Show post title"),
10581 + checked: showPostTitle,
10582 + onChange: (value) => setAttributes({ showPostTitle: value })
10583 + }
10584 + )
10585 + }
10586 + ),
10587 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
10588 + external_wp_components_namespaceObject.__experimentalToolsPanelItem,
10589 + {
10590 + label: (0,external_wp_i18n_namespaceObject.__)("Show comments count"),
10591 + isShownByDefault: true,
10592 + hasValue: () => !showCommentsCount,
10593 + onDeselect: () => setAttributes({ showCommentsCount: true }),
10594 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
10595 + external_wp_components_namespaceObject.ToggleControl,
10596 + {
10597 + __nextHasNoMarginBottom: true,
10598 + label: (0,external_wp_i18n_namespaceObject.__)("Show comments count"),
10599 + checked: showCommentsCount,
10600 + onChange: (value) => setAttributes({ showCommentsCount: value })
10601 + }
10602 + )
10603 + }
10604 + )
10605 + ]
10606 + }
10607 + ) });
10608 + const postTitle = isSiteEditor ? (0,external_wp_i18n_namespaceObject.__)("\u201CPost Title\u201D") : `"${rawTitle}"`;
10609 + let placeholder;
10610 + if (showCommentsCount && commentsCount !== void 0) {
10611 + if (showPostTitle) {
10612 + if (commentsCount === 1) {
10613 + placeholder = (0,external_wp_i18n_namespaceObject.sprintf)((0,external_wp_i18n_namespaceObject.__)("One response to %s"), postTitle);
10614 + } else {
10615 + placeholder = (0,external_wp_i18n_namespaceObject.sprintf)(
10616 + /* translators: 1: Number of comments, 2: Post title. */
10617 + (0,external_wp_i18n_namespaceObject._n)(
10618 + "%1$s response to %2$s",
10619 + "%1$s responses to %2$s",
10620 + commentsCount
10621 + ),
10622 + commentsCount,
10623 + postTitle
10624 + );
10625 + }
10626 + } else if (commentsCount === 1) {
10627 + placeholder = (0,external_wp_i18n_namespaceObject.__)("One response");
10628 + } else {
10629 + placeholder = (0,external_wp_i18n_namespaceObject.sprintf)(
10630 + /* translators: %s: Number of comments. */
10631 + (0,external_wp_i18n_namespaceObject._n)("%s response", "%s responses", commentsCount),
10632 + commentsCount
10633 + );
10634 + }
10635 + } else if (showPostTitle) {
10636 + if (commentsCount === 1) {
10637 + placeholder = (0,external_wp_i18n_namespaceObject.sprintf)((0,external_wp_i18n_namespaceObject.__)("Response to %s"), postTitle);
10638 + } else {
10639 + placeholder = (0,external_wp_i18n_namespaceObject.sprintf)((0,external_wp_i18n_namespaceObject.__)("Responses to %s"), postTitle);
10640 + }
10641 + } else if (commentsCount === 1) {
10642 + placeholder = (0,external_wp_i18n_namespaceObject.__)("Response");
10643 + } else {
10644 + placeholder = (0,external_wp_i18n_namespaceObject.__)("Responses");
10645 + }
10646 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
10647 + blockControls,
10648 + inspectorControls,
10649 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(TagName, { ...blockProps, children: placeholder })
10650 + ] });
10651 + }
10652 +
10653 +
10654 + ;// ./node_modules/@wordpress/block-library/build-module/comments-title/deprecated.js
10655 +
10656 + const { attributes, supports } = comments_title_block_namespaceObject;
10657 + var comments_title_deprecated_deprecated_default = [
10658 + {
10659 + attributes: {
10660 + ...attributes,
10661 + singleCommentLabel: {
10662 + type: "string"
10663 + },
10664 + multipleCommentsLabel: {
10665 + type: "string"
10666 + }
10667 + },
10668 + supports,
10669 + migrate: (oldAttributes) => {
10670 + const {
10671 + singleCommentLabel,
10672 + multipleCommentsLabel,
10673 + ...newAttributes
10674 + } = oldAttributes;
10675 + return newAttributes;
10676 + },
10677 + isEligible: ({ multipleCommentsLabel, singleCommentLabel }) => multipleCommentsLabel || singleCommentLabel,
10678 + save: () => null
10679 + }
10680 + ];
10681 +
10682 +
10683 + ;// ./node_modules/@wordpress/block-library/build-module/comments-title/index.js
10684 +
10685 +
10686 +
10687 +
10688 +
10689 + const { name: comments_title_name } = comments_title_block_namespaceObject;
10690 + const comments_title_settings = {
10691 + icon: title_default,
10692 + edit: comments_title_edit_Edit,
10693 + deprecated: comments_title_deprecated_deprecated_default,
10694 + example: {}
10695 + };
10696 + const comments_title_init = () => initBlock({ name: comments_title_name, metadata: comments_title_block_namespaceObject, settings: comments_title_settings });
10697 +
10698 +
10699 + ;// ./node_modules/@wordpress/icons/build-module/library/cover.js
10700 +
10701 +
10702 + var cover_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M18.7 3H5.3C4 3 3 4 3 5.3v13.4C3 20 4 21 5.3 21h13.4c1.3 0 2.3-1 2.3-2.3V5.3C21 4 20 3 18.7 3zm.8 15.7c0 .4-.4.8-.8.8H5.3c-.4 0-.8-.4-.8-.8V5.3c0-.4.4-.8.8-.8h6.2v8.9l2.5-3.1 2.5 3.1V4.5h2.2c.4 0 .8.4.8.8v13.4z" }) });
10703 +
10704 +
10705 + ;// ./node_modules/@wordpress/block-library/build-module/cover/shared.js
10706 +
10707 + const POSITION_CLASSNAMES = {
10708 + "top left": "is-position-top-left",
10709 + "top center": "is-position-top-center",
10710 + "top right": "is-position-top-right",
10711 + "center left": "is-position-center-left",
10712 + "center center": "is-position-center-center",
10713 + center: "is-position-center-center",
10714 + "center right": "is-position-center-right",
10715 + "bottom left": "is-position-bottom-left",
10716 + "bottom center": "is-position-bottom-center",
10717 + "bottom right": "is-position-bottom-right"
10718 + };
10719 + const IMAGE_BACKGROUND_TYPE = "image";
10720 + const VIDEO_BACKGROUND_TYPE = "video";
10721 + const COVER_MIN_HEIGHT = 50;
10722 + const COVER_MAX_HEIGHT = 1e3;
10723 + const COVER_DEFAULT_HEIGHT = 300;
10724 + const DEFAULT_FOCAL_POINT = { x: 0.5, y: 0.5 };
10725 + const shared_ALLOWED_MEDIA_TYPES = ["image", "video"];
10726 + function mediaPosition({ x, y } = DEFAULT_FOCAL_POINT) {
10727 + return `${Math.round(x * 100)}% ${Math.round(y * 100)}%`;
10728 + }
10729 + function dimRatioToClass(ratio) {
10730 + return ratio === 50 || ratio === void 0 ? null : "has-background-dim-" + 10 * Math.round(ratio / 10);
10731 + }
10732 + function attributesFromMedia(media) {
10733 + if (!media || !media.url && !media.src) {
10734 + return {
10735 + url: void 0,
10736 + id: void 0
10737 + };
10738 + }
10739 + if ((0,external_wp_blob_namespaceObject.isBlobURL)(media.url)) {
10740 + media.type = (0,external_wp_blob_namespaceObject.getBlobTypeByURL)(media.url);
10741 + }
10742 + let mediaType;
10743 + if (media.media_type) {
10744 + if (media.media_type === IMAGE_BACKGROUND_TYPE) {
10745 + mediaType = IMAGE_BACKGROUND_TYPE;
10746 + } else {
10747 + mediaType = VIDEO_BACKGROUND_TYPE;
10748 + }
10749 + } else if (media.type && (media.type === IMAGE_BACKGROUND_TYPE || media.type === VIDEO_BACKGROUND_TYPE)) {
10750 + mediaType = media.type;
10751 + } else {
10752 + return;
10753 + }
10754 + return {
10755 + url: media.url || media.src,
10756 + id: media.id,
10757 + alt: media?.alt,
10758 + backgroundType: mediaType,
10759 + ...mediaType === VIDEO_BACKGROUND_TYPE ? { hasParallax: void 0 } : {}
10760 + };
10761 + }
10762 + function isContentPositionCenter(contentPosition) {
10763 + return !contentPosition || contentPosition === "center center" || contentPosition === "center";
10764 + }
10765 + function getPositionClassName(contentPosition) {
10766 + if (isContentPositionCenter(contentPosition)) {
10767 + return "";
10768 + }
10769 + return POSITION_CLASSNAMES[contentPosition];
10770 + }
10771 +
10772 +
10773 + ;// ./node_modules/@wordpress/block-library/build-module/cover/deprecated.js
10774 +
10775 +
10776 +
10777 +
10778 +
10779 +
10780 +
10781 + function backgroundImageStyles(url) {
10782 + return url ? { backgroundImage: `url(${url})` } : {};
10783 + }
10784 + function dimRatioToClassV1(ratio) {
10785 + return ratio === 0 || ratio === 50 || !ratio ? null : "has-background-dim-" + 10 * Math.round(ratio / 10);
10786 + }
10787 + function migrateDimRatio(attributes) {
10788 + return {
10789 + ...attributes,
10790 + dimRatio: !attributes.url ? 100 : attributes.dimRatio
10791 + };
10792 + }
10793 + function migrateTag(attributes) {
10794 + if (!attributes.tagName) {
10795 + attributes = {
10796 + ...attributes,
10797 + tagName: "div"
10798 + };
10799 + }
10800 + return {
10801 + ...attributes
10802 + };
10803 + }
10804 + const deprecated_blockAttributes = {
10805 + url: {
10806 + type: "string"
10807 + },
10808 + id: {
10809 + type: "number"
10810 + },
10811 + hasParallax: {
10812 + type: "boolean",
10813 + default: false
10814 + },
10815 + dimRatio: {
10816 + type: "number",
10817 + default: 50
10818 + },
10819 + overlayColor: {
10820 + type: "string"
10821 + },
10822 + customOverlayColor: {
10823 + type: "string"
10824 + },
10825 + backgroundType: {
10826 + type: "string",
10827 + default: "image"
10828 + },
10829 + focalPoint: {
10830 + type: "object"
10831 + }
10832 + };
10833 + const v8ToV11BlockAttributes = {
10834 + url: {
10835 + type: "string"
10836 + },
10837 + id: {
10838 + type: "number"
10839 + },
10840 + alt: {
10841 + type: "string",
10842 + source: "attribute",
10843 + selector: "img",
10844 + attribute: "alt",
10845 + default: ""
10846 + },
10847 + hasParallax: {
10848 + type: "boolean",
10849 + default: false
10850 + },
10851 + isRepeated: {
10852 + type: "boolean",
10853 + default: false
10854 + },
10855 + dimRatio: {
10856 + type: "number",
10857 + default: 100
10858 + },
10859 + overlayColor: {
10860 + type: "string"
10861 + },
10862 + customOverlayColor: {
10863 + type: "string"
10864 + },
10865 + backgroundType: {
10866 + type: "string",
10867 + default: "image"
10868 + },
10869 + focalPoint: {
10870 + type: "object"
10871 + },
10872 + minHeight: {
10873 + type: "number"
10874 + },
10875 + minHeightUnit: {
10876 + type: "string"
10877 + },
10878 + gradient: {
10879 + type: "string"
10880 + },
10881 + customGradient: {
10882 + type: "string"
10883 + },
10884 + contentPosition: {
10885 + type: "string"
10886 + },
10887 + isDark: {
10888 + type: "boolean",
10889 + default: true
10890 + },
10891 + allowedBlocks: {
10892 + type: "array"
10893 + },
10894 + templateLock: {
10895 + type: ["string", "boolean"],
10896 + enum: ["all", "insert", false]
10897 + }
10898 + };
10899 + const v12toV13BlockAttributes = {
10900 + ...v8ToV11BlockAttributes,
10901 + useFeaturedImage: {
10902 + type: "boolean",
10903 + default: false
10904 + },
10905 + tagName: {
10906 + type: "string",
10907 + default: "div"
10908 + }
10909 + };
10910 + const v14BlockAttributes = {
10911 + ...v12toV13BlockAttributes,
10912 + isUserOverlayColor: {
10913 + type: "boolean"
10914 + },
10915 + sizeSlug: {
10916 + type: "string"
10917 + },
10918 + alt: {
10919 + type: "string",
10920 + default: ""
10921 + }
10922 + };
10923 + const v7toV11BlockSupports = {
10924 + anchor: true,
10925 + align: true,
10926 + html: false,
10927 + spacing: {
10928 + padding: true,
10929 + __experimentalDefaultControls: {
10930 + padding: true
10931 + }
10932 + },
10933 + color: {
10934 + __experimentalDuotone: "> .wp-block-cover__image-background, > .wp-block-cover__video-background",
10935 + text: false,
10936 + background: false
10937 + }
10938 + };
10939 + const v12BlockSupports = {
10940 + ...v7toV11BlockSupports,
10941 + spacing: {
10942 + padding: true,
10943 + margin: ["top", "bottom"],
10944 + blockGap: true,
10945 + __experimentalDefaultControls: {
10946 + padding: true,
10947 + blockGap: true
10948 + }
10949 + },
10950 + __experimentalBorder: {
10951 + color: true,
10952 + radius: true,
10953 + style: true,
10954 + width: true,
10955 + __experimentalDefaultControls: {
10956 + color: true,
10957 + radius: true,
10958 + style: true,
10959 + width: true
10960 + }
10961 + },
10962 + color: {
10963 + __experimentalDuotone: "> .wp-block-cover__image-background, > .wp-block-cover__video-background",
10964 + heading: true,
10965 + text: true,
10966 + background: false,
10967 + __experimentalSkipSerialization: ["gradients"],
10968 + enableContrastChecker: false
10969 + },
10970 + typography: {
10971 + fontSize: true,
10972 + lineHeight: true,
10973 + __experimentalFontFamily: true,
10974 + __experimentalFontWeight: true,
10975 + __experimentalFontStyle: true,
10976 + __experimentalTextTransform: true,
10977 + __experimentalTextDecoration: true,
10978 + __experimentalLetterSpacing: true,
10979 + __experimentalDefaultControls: {
10980 + fontSize: true
10981 + }
10982 + },
10983 + layout: {
10984 + allowJustification: false
10985 + }
10986 + };
10987 + const v14BlockSupports = {
10988 + ...v12BlockSupports,
10989 + shadow: true,
10990 + dimensions: {
10991 + aspectRatio: true
10992 + },
10993 + interactivity: {
10994 + clientNavigation: true
10995 + }
10996 + };
10997 + const v14 = {
10998 + attributes: v14BlockAttributes,
10999 + supports: v14BlockSupports,
11000 + save({ attributes }) {
11001 + const {
11002 + backgroundType,
11003 + gradient,
11004 + contentPosition,
11005 + customGradient,
11006 + customOverlayColor,
11007 + dimRatio,
11008 + focalPoint,
11009 + useFeaturedImage,
11010 + hasParallax,
11011 + isDark,
11012 + isRepeated,
11013 + overlayColor,
11014 + url,
11015 + alt,
11016 + id,
11017 + minHeight: minHeightProp,
11018 + minHeightUnit,
11019 + tagName: Tag,
11020 + sizeSlug
11021 + } = attributes;
11022 + const overlayColorClass = (0,external_wp_blockEditor_namespaceObject.getColorClassName)(
11023 + "background-color",
11024 + overlayColor
11025 + );
11026 + const gradientClass = (0,external_wp_blockEditor_namespaceObject.__experimentalGetGradientClass)(gradient);
11027 + const minHeight = minHeightProp && minHeightUnit ? `${minHeightProp}${minHeightUnit}` : minHeightProp;
11028 + const isImageBackground = IMAGE_BACKGROUND_TYPE === backgroundType;
11029 + const isVideoBackground = VIDEO_BACKGROUND_TYPE === backgroundType;
11030 + const isImgElement = !(hasParallax || isRepeated);
11031 + const style = {
11032 + minHeight: minHeight || void 0
11033 + };
11034 + const bgStyle = {
11035 + backgroundColor: !overlayColorClass ? customOverlayColor : void 0,
11036 + background: customGradient ? customGradient : void 0
11037 + };
11038 + const objectPosition = (
11039 + // prettier-ignore
11040 + focalPoint && isImgElement ? mediaPosition(focalPoint) : void 0
11041 + );
11042 + const backgroundImage = url ? `url(${url})` : void 0;
11043 + const backgroundPosition = mediaPosition(focalPoint);
11044 + const classes = dist_clsx(
11045 + {
11046 + "is-light": !isDark,
11047 + "has-parallax": hasParallax,
11048 + "is-repeated": isRepeated,
11049 + "has-custom-content-position": !isContentPositionCenter(contentPosition)
11050 + },
11051 + getPositionClassName(contentPosition)
11052 + );
11053 + const imgClasses = dist_clsx(
11054 + "wp-block-cover__image-background",
11055 + id ? `wp-image-${id}` : null,
11056 + {
11057 + [`size-${sizeSlug}`]: sizeSlug,
11058 + "has-parallax": hasParallax,
11059 + "is-repeated": isRepeated
11060 + }
11061 + );
11062 + const gradientValue = gradient || customGradient;
11063 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(Tag, { ...external_wp_blockEditor_namespaceObject.useBlockProps.save({ className: classes, style }), children: [
11064 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
11065 + "span",
11066 + {
11067 + "aria-hidden": "true",
11068 + className: dist_clsx(
11069 + "wp-block-cover__background",
11070 + overlayColorClass,
11071 + dimRatioToClass(dimRatio),
11072 + {
11073 + "has-background-dim": dimRatio !== void 0,
11074 + // For backwards compatibility. Former versions of the Cover Block applied
11075 + // `.wp-block-cover__gradient-background` in the presence of
11076 + // media, a gradient and a dim.
11077 + "wp-block-cover__gradient-background": url && gradientValue && dimRatio !== 0,
11078 + "has-background-gradient": gradientValue,
11079 + [gradientClass]: gradientClass
11080 + }
11081 + ),
11082 + style: bgStyle
11083 + }
11084 + ),
11085 + !useFeaturedImage && isImageBackground && url && (isImgElement ? /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
11086 + "img",
11087 + {
11088 + className: imgClasses,
11089 + alt,
11090 + src: url,
11091 + style: { objectPosition },
11092 + "data-object-fit": "cover",
11093 + "data-object-position": objectPosition
11094 + }
11095 + ) : /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
11096 + "div",
11097 + {
11098 + role: alt ? "img" : void 0,
11099 + "aria-label": alt ? alt : void 0,
11100 + className: imgClasses,
11101 + style: { backgroundPosition, backgroundImage }
11102 + }
11103 + )),
11104 + isVideoBackground && url && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
11105 + "video",
11106 + {
11107 + className: dist_clsx(
11108 + "wp-block-cover__video-background",
11109 + "intrinsic-ignore"
11110 + ),
11111 + autoPlay: true,
11112 + muted: true,
11113 + loop: true,
11114 + playsInline: true,
11115 + src: url,
11116 + style: { objectPosition },
11117 + "data-object-fit": "cover",
11118 + "data-object-position": objectPosition
11119 + }
11120 + ),
11121 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
11122 + "div",
11123 + {
11124 + ...external_wp_blockEditor_namespaceObject.useInnerBlocksProps.save({
11125 + className: "wp-block-cover__inner-container"
11126 + })
11127 + }
11128 + )
11129 + ] });
11130 + }
11131 + };
11132 + const v13 = {
11133 + attributes: v12toV13BlockAttributes,
11134 + supports: v12BlockSupports,
11135 + save({ attributes }) {
11136 + const {
11137 + backgroundType,
11138 + gradient,
11139 + contentPosition,
11140 + customGradient,
11141 + customOverlayColor,
11142 + dimRatio,
11143 + focalPoint,
11144 + useFeaturedImage,
11145 + hasParallax,
11146 + isDark,
11147 + isRepeated,
11148 + overlayColor,
11149 + url,
11150 + alt,
11151 + id,
11152 + minHeight: minHeightProp,
11153 + minHeightUnit,
11154 + tagName: Tag
11155 + } = attributes;
11156 + const overlayColorClass = (0,external_wp_blockEditor_namespaceObject.getColorClassName)(
11157 + "background-color",
11158 + overlayColor
11159 + );
11160 + const gradientClass = (0,external_wp_blockEditor_namespaceObject.__experimentalGetGradientClass)(gradient);
11161 + const minHeight = minHeightProp && minHeightUnit ? `${minHeightProp}${minHeightUnit}` : minHeightProp;
11162 + const isImageBackground = IMAGE_BACKGROUND_TYPE === backgroundType;
11163 + const isVideoBackground = VIDEO_BACKGROUND_TYPE === backgroundType;
11164 + const isImgElement = !(hasParallax || isRepeated);
11165 + const style = {
11166 + minHeight: minHeight || void 0
11167 + };
11168 + const bgStyle = {
11169 + backgroundColor: !overlayColorClass ? customOverlayColor : void 0,
11170 + background: customGradient ? customGradient : void 0
11171 + };
11172 + const objectPosition = (
11173 + // prettier-ignore
11174 + focalPoint && isImgElement ? mediaPosition(focalPoint) : void 0
11175 + );
11176 + const backgroundImage = url ? `url(${url})` : void 0;
11177 + const backgroundPosition = mediaPosition(focalPoint);
11178 + const classes = dist_clsx(
11179 + {
11180 + "is-light": !isDark,
11181 + "has-parallax": hasParallax,
11182 + "is-repeated": isRepeated,
11183 + "has-custom-content-position": !isContentPositionCenter(contentPosition)
11184 + },
11185 + getPositionClassName(contentPosition)
11186 + );
11187 + const imgClasses = dist_clsx(
11188 + "wp-block-cover__image-background",
11189 + id ? `wp-image-${id}` : null,
11190 + {
11191 + "has-parallax": hasParallax,
11192 + "is-repeated": isRepeated
11193 + }
11194 + );
11195 + const gradientValue = gradient || customGradient;
11196 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(Tag, { ...external_wp_blockEditor_namespaceObject.useBlockProps.save({ className: classes, style }), children: [
11197 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
11198 + "span",
11199 + {
11200 + "aria-hidden": "true",
11201 + className: dist_clsx(
11202 + "wp-block-cover__background",
11203 + overlayColorClass,
11204 + dimRatioToClass(dimRatio),
11205 + {
11206 + "has-background-dim": dimRatio !== void 0,
11207 + // For backwards compatibility. Former versions of the Cover Block applied
11208 + // `.wp-block-cover__gradient-background` in the presence of
11209 + // media, a gradient and a dim.
11210 + "wp-block-cover__gradient-background": url && gradientValue && dimRatio !== 0,
11211 + "has-background-gradient": gradientValue,
11212 + [gradientClass]: gradientClass
11213 + }
11214 + ),
11215 + style: bgStyle
11216 + }
11217 + ),
11218 + !useFeaturedImage && isImageBackground && url && (isImgElement ? /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
11219 + "img",
11220 + {
11221 + className: imgClasses,
11222 + alt,
11223 + src: url,
11224 + style: { objectPosition },
11225 + "data-object-fit": "cover",
11226 + "data-object-position": objectPosition
11227 + }
11228 + ) : /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
11229 + "div",
11230 + {
11231 + role: "img",
11232 + className: imgClasses,
11233 + style: { backgroundPosition, backgroundImage }
11234 + }
11235 + )),
11236 + isVideoBackground && url && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
11237 + "video",
11238 + {
11239 + className: dist_clsx(
11240 + "wp-block-cover__video-background",
11241 + "intrinsic-ignore"
11242 + ),
11243 + autoPlay: true,
11244 + muted: true,
11245 + loop: true,
11246 + playsInline: true,
11247 + src: url,
11248 + style: { objectPosition },
11249 + "data-object-fit": "cover",
11250 + "data-object-position": objectPosition
11251 + }
11252 + ),
11253 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
11254 + "div",
11255 + {
11256 + ...external_wp_blockEditor_namespaceObject.useInnerBlocksProps.save({
11257 + className: "wp-block-cover__inner-container"
11258 + })
11259 + }
11260 + )
11261 + ] });
11262 + }
11263 + };
11264 + const deprecated_v12 = {
11265 + attributes: v12toV13BlockAttributes,
11266 + supports: v12BlockSupports,
11267 + isEligible(attributes) {
11268 + return (attributes.customOverlayColor !== void 0 || attributes.overlayColor !== void 0) && attributes.isUserOverlayColor === void 0;
11269 + },
11270 + migrate(attributes) {
11271 + return {
11272 + ...attributes,
11273 + isUserOverlayColor: true
11274 + };
11275 + },
11276 + save({ attributes }) {
11277 + const {
11278 + backgroundType,
11279 + gradient,
11280 + contentPosition,
11281 + customGradient,
11282 + customOverlayColor,
11283 + dimRatio,
11284 + focalPoint,
11285 + useFeaturedImage,
11286 + hasParallax,
11287 + isDark,
11288 + isRepeated,
11289 + overlayColor,
11290 + url,
11291 + alt,
11292 + id,
11293 + minHeight: minHeightProp,
11294 + minHeightUnit,
11295 + tagName: Tag
11296 + } = attributes;
11297 + const overlayColorClass = (0,external_wp_blockEditor_namespaceObject.getColorClassName)(
11298 + "background-color",
11299 + overlayColor
11300 + );
11301 + const gradientClass = (0,external_wp_blockEditor_namespaceObject.__experimentalGetGradientClass)(gradient);
11302 + const minHeight = minHeightProp && minHeightUnit ? `${minHeightProp}${minHeightUnit}` : minHeightProp;
11303 + const isImageBackground = IMAGE_BACKGROUND_TYPE === backgroundType;
11304 + const isVideoBackground = VIDEO_BACKGROUND_TYPE === backgroundType;
11305 + const isImgElement = !(hasParallax || isRepeated);
11306 + const style = {
11307 + minHeight: minHeight || void 0
11308 + };
11309 + const bgStyle = {
11310 + backgroundColor: !overlayColorClass ? customOverlayColor : void 0,
11311 + background: customGradient ? customGradient : void 0
11312 + };
11313 + const objectPosition = (
11314 + // prettier-ignore
11315 + focalPoint && isImgElement ? mediaPosition(focalPoint) : void 0
11316 + );
11317 + const backgroundImage = url ? `url(${url})` : void 0;
11318 + const backgroundPosition = mediaPosition(focalPoint);
11319 + const classes = dist_clsx(
11320 + {
11321 + "is-light": !isDark,
11322 + "has-parallax": hasParallax,
11323 + "is-repeated": isRepeated,
11324 + "has-custom-content-position": !isContentPositionCenter(contentPosition)
11325 + },
11326 + getPositionClassName(contentPosition)
11327 + );
11328 + const imgClasses = dist_clsx(
11329 + "wp-block-cover__image-background",
11330 + id ? `wp-image-${id}` : null,
11331 + {
11332 + "has-parallax": hasParallax,
11333 + "is-repeated": isRepeated
11334 + }
11335 + );
11336 + const gradientValue = gradient || customGradient;
11337 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(Tag, { ...external_wp_blockEditor_namespaceObject.useBlockProps.save({ className: classes, style }), children: [
11338 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
11339 + "span",
11340 + {
11341 + "aria-hidden": "true",
11342 + className: dist_clsx(
11343 + "wp-block-cover__background",
11344 + overlayColorClass,
11345 + dimRatioToClass(dimRatio),
11346 + {
11347 + "has-background-dim": dimRatio !== void 0,
11348 + // For backwards compatibility. Former versions of the Cover Block applied
11349 + // `.wp-block-cover__gradient-background` in the presence of
11350 + // media, a gradient and a dim.
11351 + "wp-block-cover__gradient-background": url && gradientValue && dimRatio !== 0,
11352 + "has-background-gradient": gradientValue,
11353 + [gradientClass]: gradientClass
11354 + }
11355 + ),
11356 + style: bgStyle
11357 + }
11358 + ),
11359 + !useFeaturedImage && isImageBackground && url && (isImgElement ? /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
11360 + "img",
11361 + {
11362 + className: imgClasses,
11363 + alt,
11364 + src: url,
11365 + style: { objectPosition },
11366 + "data-object-fit": "cover",
11367 + "data-object-position": objectPosition
11368 + }
11369 + ) : /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
11370 + "div",
11371 + {
11372 + role: "img",
11373 + className: imgClasses,
11374 + style: { backgroundPosition, backgroundImage }
11375 + }
11376 + )),
11377 + isVideoBackground && url && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
11378 + "video",
11379 + {
11380 + className: dist_clsx(
11381 + "wp-block-cover__video-background",
11382 + "intrinsic-ignore"
11383 + ),
11384 + autoPlay: true,
11385 + muted: true,
11386 + loop: true,
11387 + playsInline: true,
11388 + src: url,
11389 + style: { objectPosition },
11390 + "data-object-fit": "cover",
11391 + "data-object-position": objectPosition
11392 + }
11393 + ),
11394 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
11395 + "div",
11396 + {
11397 + ...external_wp_blockEditor_namespaceObject.useInnerBlocksProps.save({
11398 + className: "wp-block-cover__inner-container"
11399 + })
11400 + }
11401 + )
11402 + ] });
11403 + }
11404 + };
11405 + const deprecated_v11 = {
11406 + attributes: v8ToV11BlockAttributes,
11407 + supports: v7toV11BlockSupports,
11408 + save({ attributes }) {
11409 + const {
11410 + backgroundType,
11411 + gradient,
11412 + contentPosition,
11413 + customGradient,
11414 + customOverlayColor,
11415 + dimRatio,
11416 + focalPoint,
11417 + useFeaturedImage,
11418 + hasParallax,
11419 + isDark,
11420 + isRepeated,
11421 + overlayColor,
11422 + url,
11423 + alt,
11424 + id,
11425 + minHeight: minHeightProp,
11426 + minHeightUnit
11427 + } = attributes;
11428 + const overlayColorClass = (0,external_wp_blockEditor_namespaceObject.getColorClassName)(
11429 + "background-color",
11430 + overlayColor
11431 + );
11432 + const gradientClass = (0,external_wp_blockEditor_namespaceObject.__experimentalGetGradientClass)(gradient);
11433 + const minHeight = minHeightProp && minHeightUnit ? `${minHeightProp}${minHeightUnit}` : minHeightProp;
11434 + const isImageBackground = IMAGE_BACKGROUND_TYPE === backgroundType;
11435 + const isVideoBackground = VIDEO_BACKGROUND_TYPE === backgroundType;
11436 + const isImgElement = !(hasParallax || isRepeated);
11437 + const style = {
11438 + minHeight: minHeight || void 0
11439 + };
11440 + const bgStyle = {
11441 + backgroundColor: !overlayColorClass ? customOverlayColor : void 0,
11442 + background: customGradient ? customGradient : void 0
11443 + };
11444 + const objectPosition = (
11445 + // prettier-ignore
11446 + focalPoint && isImgElement ? mediaPosition(focalPoint) : void 0
11447 + );
11448 + const backgroundImage = url ? `url(${url})` : void 0;
11449 + const backgroundPosition = mediaPosition(focalPoint);
11450 + const classes = dist_clsx(
11451 + {
11452 + "is-light": !isDark,
11453 + "has-parallax": hasParallax,
11454 + "is-repeated": isRepeated,
11455 + "has-custom-content-position": !isContentPositionCenter(contentPosition)
11456 + },
11457 + getPositionClassName(contentPosition)
11458 + );
11459 + const imgClasses = dist_clsx(
11460 + "wp-block-cover__image-background",
11461 + id ? `wp-image-${id}` : null,
11462 + {
11463 + "has-parallax": hasParallax,
11464 + "is-repeated": isRepeated
11465 + }
11466 + );
11467 + const gradientValue = gradient || customGradient;
11468 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", { ...external_wp_blockEditor_namespaceObject.useBlockProps.save({ className: classes, style }), children: [
11469 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
11470 + "span",
11471 + {
11472 + "aria-hidden": "true",
11473 + className: dist_clsx(
11474 + "wp-block-cover__background",
11475 + overlayColorClass,
11476 + dimRatioToClass(dimRatio),
11477 + {
11478 + "has-background-dim": dimRatio !== void 0,
11479 + // For backwards compatibility. Former versions of the Cover Block applied
11480 + // `.wp-block-cover__gradient-background` in the presence of
11481 + // media, a gradient and a dim.
11482 + "wp-block-cover__gradient-background": url && gradientValue && dimRatio !== 0,
11483 + "has-background-gradient": gradientValue,
11484 + [gradientClass]: gradientClass
11485 + }
11486 + ),
11487 + style: bgStyle
11488 + }
11489 + ),
11490 + !useFeaturedImage && isImageBackground && url && (isImgElement ? /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
11491 + "img",
11492 + {
11493 + className: imgClasses,
11494 + alt,
11495 + src: url,
11496 + style: { objectPosition },
11497 + "data-object-fit": "cover",
11498 + "data-object-position": objectPosition
11499 + }
11500 + ) : /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
11501 + "div",
11502 + {
11503 + role: "img",
11504 + className: imgClasses,
11505 + style: { backgroundPosition, backgroundImage }
11506 + }
11507 + )),
11508 + isVideoBackground && url && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
11509 + "video",
11510 + {
11511 + className: dist_clsx(
11512 + "wp-block-cover__video-background",
11513 + "intrinsic-ignore"
11514 + ),
11515 + autoPlay: true,
11516 + muted: true,
11517 + loop: true,
11518 + playsInline: true,
11519 + src: url,
11520 + style: { objectPosition },
11521 + "data-object-fit": "cover",
11522 + "data-object-position": objectPosition
11523 + }
11524 + ),
11525 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
11526 + "div",
11527 + {
11528 + ...external_wp_blockEditor_namespaceObject.useInnerBlocksProps.save({
11529 + className: "wp-block-cover__inner-container"
11530 + })
11531 + }
11532 + )
11533 + ] });
11534 + },
11535 + migrate: migrateTag
11536 + };
11537 + const deprecated_v10 = {
11538 + attributes: v8ToV11BlockAttributes,
11539 + supports: v7toV11BlockSupports,
11540 + save({ attributes }) {
11541 + const {
11542 + backgroundType,
11543 + gradient,
11544 + contentPosition,
11545 + customGradient,
11546 + customOverlayColor,
11547 + dimRatio,
11548 + focalPoint,
11549 + useFeaturedImage,
11550 + hasParallax,
11551 + isDark,
11552 + isRepeated,
11553 + overlayColor,
11554 + url,
11555 + alt,
11556 + id,
11557 + minHeight: minHeightProp,
11558 + minHeightUnit
11559 + } = attributes;
11560 + const overlayColorClass = (0,external_wp_blockEditor_namespaceObject.getColorClassName)(
11561 + "background-color",
11562 + overlayColor
11563 + );
11564 + const gradientClass = (0,external_wp_blockEditor_namespaceObject.__experimentalGetGradientClass)(gradient);
11565 + const minHeight = minHeightProp && minHeightUnit ? `${minHeightProp}${minHeightUnit}` : minHeightProp;
11566 + const isImageBackground = IMAGE_BACKGROUND_TYPE === backgroundType;
11567 + const isVideoBackground = VIDEO_BACKGROUND_TYPE === backgroundType;
11568 + const isImgElement = !(hasParallax || isRepeated);
11569 + const style = {
11570 + ...isImageBackground && !isImgElement && !useFeaturedImage ? backgroundImageStyles(url) : {},
11571 + minHeight: minHeight || void 0
11572 + };
11573 + const bgStyle = {
11574 + backgroundColor: !overlayColorClass ? customOverlayColor : void 0,
11575 + background: customGradient ? customGradient : void 0
11576 + };
11577 + const objectPosition = (
11578 + // prettier-ignore
11579 + focalPoint && isImgElement ? `${Math.round(focalPoint.x * 100)}% ${Math.round(focalPoint.y * 100)}%` : void 0
11580 + );
11581 + const classes = dist_clsx(
11582 + {
11583 + "is-light": !isDark,
11584 + "has-parallax": hasParallax,
11585 + "is-repeated": isRepeated,
11586 + "has-custom-content-position": !isContentPositionCenter(contentPosition)
11587 + },
11588 + getPositionClassName(contentPosition)
11589 + );
11590 + const gradientValue = gradient || customGradient;
11591 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", { ...external_wp_blockEditor_namespaceObject.useBlockProps.save({ className: classes, style }), children: [
11592 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
11593 + "span",
11594 + {
11595 + "aria-hidden": "true",
11596 + className: dist_clsx(
11597 + "wp-block-cover__background",
11598 + overlayColorClass,
11599 + dimRatioToClass(dimRatio),
11600 + {
11601 + "has-background-dim": dimRatio !== void 0,
11602 + // For backwards compatibility. Former versions of the Cover Block applied
11603 + // `.wp-block-cover__gradient-background` in the presence of
11604 + // media, a gradient and a dim.
11605 + "wp-block-cover__gradient-background": url && gradientValue && dimRatio !== 0,
11606 + "has-background-gradient": gradientValue,
11607 + [gradientClass]: gradientClass
11608 + }
11609 + ),
11610 + style: bgStyle
11611 + }
11612 + ),
11613 + !useFeaturedImage && isImageBackground && isImgElement && url && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
11614 + "img",
11615 + {
11616 + className: dist_clsx(
11617 + "wp-block-cover__image-background",
11618 + id ? `wp-image-${id}` : null
11619 + ),
11620 + alt,
11621 + src: url,
11622 + style: { objectPosition },
11623 + "data-object-fit": "cover",
11624 + "data-object-position": objectPosition
11625 + }
11626 + ),
11627 + isVideoBackground && url && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
11628 + "video",
11629 + {
11630 + className: dist_clsx(
11631 + "wp-block-cover__video-background",
11632 + "intrinsic-ignore"
11633 + ),
11634 + autoPlay: true,
11635 + muted: true,
11636 + loop: true,
11637 + playsInline: true,
11638 + src: url,
11639 + style: { objectPosition },
11640 + "data-object-fit": "cover",
11641 + "data-object-position": objectPosition
11642 + }
11643 + ),
11644 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
11645 + "div",
11646 + {
11647 + ...external_wp_blockEditor_namespaceObject.useInnerBlocksProps.save({
11648 + className: "wp-block-cover__inner-container"
11649 + })
11650 + }
11651 + )
11652 + ] });
11653 + },
11654 + migrate: migrateTag
11655 + };
11656 + const v9 = {
11657 + attributes: v8ToV11BlockAttributes,
11658 + supports: v7toV11BlockSupports,
11659 + save({ attributes }) {
11660 + const {
11661 + backgroundType,
11662 + gradient,
11663 + contentPosition,
11664 + customGradient,
11665 + customOverlayColor,
11666 + dimRatio,
11667 + focalPoint,
11668 + hasParallax,
11669 + isDark,
11670 + isRepeated,
11671 + overlayColor,
11672 + url,
11673 + alt,
11674 + id,
11675 + minHeight: minHeightProp,
11676 + minHeightUnit
11677 + } = attributes;
11678 + const overlayColorClass = (0,external_wp_blockEditor_namespaceObject.getColorClassName)(
11679 + "background-color",
11680 + overlayColor
11681 + );
11682 + const gradientClass = (0,external_wp_blockEditor_namespaceObject.__experimentalGetGradientClass)(gradient);
11683 + const minHeight = minHeightUnit ? `${minHeightProp}${minHeightUnit}` : minHeightProp;
11684 + const isImageBackground = IMAGE_BACKGROUND_TYPE === backgroundType;
11685 + const isVideoBackground = VIDEO_BACKGROUND_TYPE === backgroundType;
11686 + const isImgElement = !(hasParallax || isRepeated);
11687 + const style = {
11688 + ...isImageBackground && !isImgElement ? backgroundImageStyles(url) : {},
11689 + minHeight: minHeight || void 0
11690 + };
11691 + const bgStyle = {
11692 + backgroundColor: !overlayColorClass ? customOverlayColor : void 0,
11693 + background: customGradient ? customGradient : void 0
11694 + };
11695 + const objectPosition = (
11696 + // prettier-ignore
11697 + focalPoint && isImgElement ? `${Math.round(focalPoint.x * 100)}% ${Math.round(focalPoint.y * 100)}%` : void 0
11698 + );
11699 + const classes = dist_clsx(
11700 + {
11701 + "is-light": !isDark,
11702 + "has-parallax": hasParallax,
11703 + "is-repeated": isRepeated,
11704 + "has-custom-content-position": !isContentPositionCenter(contentPosition)
11705 + },
11706 + getPositionClassName(contentPosition)
11707 + );
11708 + const gradientValue = gradient || customGradient;
11709 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", { ...external_wp_blockEditor_namespaceObject.useBlockProps.save({ className: classes, style }), children: [
11710 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
11711 + "span",
11712 + {
11713 + "aria-hidden": "true",
11714 + className: dist_clsx(
11715 + "wp-block-cover__background",
11716 + overlayColorClass,
11717 + dimRatioToClass(dimRatio),
11718 + {
11719 + "has-background-dim": dimRatio !== void 0,
11720 + // For backwards compatibility. Former versions of the Cover Block applied
11721 + // `.wp-block-cover__gradient-background` in the presence of
11722 + // media, a gradient and a dim.
11723 + "wp-block-cover__gradient-background": url && gradientValue && dimRatio !== 0,
11724 + "has-background-gradient": gradientValue,
11725 + [gradientClass]: gradientClass
11726 + }
11727 + ),
11728 + style: bgStyle
11729 + }
11730 + ),
11731 + isImageBackground && isImgElement && url && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
11732 + "img",
11733 + {
11734 + className: dist_clsx(
11735 + "wp-block-cover__image-background",
11736 + id ? `wp-image-${id}` : null
11737 + ),
11738 + alt,
11739 + src: url,
11740 + style: { objectPosition },
11741 + "data-object-fit": "cover",
11742 + "data-object-position": objectPosition
11743 + }
11744 + ),
11745 + isVideoBackground && url && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
11746 + "video",
11747 + {
11748 + className: dist_clsx(
11749 + "wp-block-cover__video-background",
11750 + "intrinsic-ignore"
11751 + ),
11752 + autoPlay: true,
11753 + muted: true,
11754 + loop: true,
11755 + playsInline: true,
11756 + src: url,
11757 + style: { objectPosition },
11758 + "data-object-fit": "cover",
11759 + "data-object-position": objectPosition
11760 + }
11761 + ),
11762 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
11763 + "div",
11764 + {
11765 + ...external_wp_blockEditor_namespaceObject.useInnerBlocksProps.save({
11766 + className: "wp-block-cover__inner-container"
11767 + })
11768 + }
11769 + )
11770 + ] });
11771 + },
11772 + migrate: migrateTag
11773 + };
11774 + const v8 = {
11775 + attributes: v8ToV11BlockAttributes,
11776 + supports: v7toV11BlockSupports,
11777 + save({ attributes }) {
11778 + const {
11779 + backgroundType,
11780 + gradient,
11781 + contentPosition,
11782 + customGradient,
11783 + customOverlayColor,
11784 + dimRatio,
11785 + focalPoint,
11786 + hasParallax,
11787 + isDark,
11788 + isRepeated,
11789 + overlayColor,
11790 + url,
11791 + alt,
11792 + id,
11793 + minHeight: minHeightProp,
11794 + minHeightUnit
11795 + } = attributes;
11796 + const overlayColorClass = (0,external_wp_blockEditor_namespaceObject.getColorClassName)(
11797 + "background-color",
11798 + overlayColor
11799 + );
11800 + const gradientClass = (0,external_wp_blockEditor_namespaceObject.__experimentalGetGradientClass)(gradient);
11801 + const minHeight = minHeightUnit ? `${minHeightProp}${minHeightUnit}` : minHeightProp;
11802 + const isImageBackground = IMAGE_BACKGROUND_TYPE === backgroundType;
11803 + const isVideoBackground = VIDEO_BACKGROUND_TYPE === backgroundType;
11804 + const isImgElement = !(hasParallax || isRepeated);
11805 + const style = {
11806 + ...isImageBackground && !isImgElement ? backgroundImageStyles(url) : {},
11807 + minHeight: minHeight || void 0
11808 + };
11809 + const bgStyle = {
11810 + backgroundColor: !overlayColorClass ? customOverlayColor : void 0,
11811 + background: customGradient ? customGradient : void 0
11812 + };
11813 + const objectPosition = (
11814 + // prettier-ignore
11815 + focalPoint && isImgElement ? `${Math.round(focalPoint.x * 100)}% ${Math.round(focalPoint.y * 100)}%` : void 0
11816 + );
11817 + const classes = dist_clsx(
11818 + {
11819 + "is-light": !isDark,
11820 + "has-parallax": hasParallax,
11821 + "is-repeated": isRepeated,
11822 + "has-custom-content-position": !isContentPositionCenter(contentPosition)
11823 + },
11824 + getPositionClassName(contentPosition)
11825 + );
11826 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", { ...external_wp_blockEditor_namespaceObject.useBlockProps.save({ className: classes, style }), children: [
11827 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
11828 + "span",
11829 + {
11830 + "aria-hidden": "true",
11831 + className: dist_clsx(
11832 + overlayColorClass,
11833 + dimRatioToClass(dimRatio),
11834 + "wp-block-cover__gradient-background",
11835 + gradientClass,
11836 + {
11837 + "has-background-dim": dimRatio !== void 0,
11838 + "has-background-gradient": gradient || customGradient,
11839 + [gradientClass]: !url && gradientClass
11840 + }
11841 + ),
11842 + style: bgStyle
11843 + }
11844 + ),
11845 + isImageBackground && isImgElement && url && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
11846 + "img",
11847 + {
11848 + className: dist_clsx(
11849 + "wp-block-cover__image-background",
11850 + id ? `wp-image-${id}` : null
11851 + ),
11852 + alt,
11853 + src: url,
11854 + style: { objectPosition },
11855 + "data-object-fit": "cover",
11856 + "data-object-position": objectPosition
11857 + }
11858 + ),
11859 + isVideoBackground && url && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
11860 + "video",
11861 + {
11862 + className: dist_clsx(
11863 + "wp-block-cover__video-background",
11864 + "intrinsic-ignore"
11865 + ),
11866 + autoPlay: true,
11867 + muted: true,
11868 + loop: true,
11869 + playsInline: true,
11870 + src: url,
11871 + style: { objectPosition },
11872 + "data-object-fit": "cover",
11873 + "data-object-position": objectPosition
11874 + }
11875 + ),
11876 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
11877 + "div",
11878 + {
11879 + ...external_wp_blockEditor_namespaceObject.useInnerBlocksProps.save({
11880 + className: "wp-block-cover__inner-container"
11881 + })
11882 + }
11883 + )
11884 + ] });
11885 + },
11886 + migrate: migrateTag
11887 + };
11888 + const v7 = {
11889 + attributes: {
11890 + ...deprecated_blockAttributes,
11891 + isRepeated: {
11892 + type: "boolean",
11893 + default: false
11894 + },
11895 + minHeight: {
11896 + type: "number"
11897 + },
11898 + minHeightUnit: {
11899 + type: "string"
11900 + },
11901 + gradient: {
11902 + type: "string"
11903 + },
11904 + customGradient: {
11905 + type: "string"
11906 + },
11907 + contentPosition: {
11908 + type: "string"
11909 + },
11910 + alt: {
11911 + type: "string",
11912 + source: "attribute",
11913 + selector: "img",
11914 + attribute: "alt",
11915 + default: ""
11916 + }
11917 + },
11918 + supports: v7toV11BlockSupports,
11919 + save({ attributes }) {
11920 + const {
11921 + backgroundType,
11922 + gradient,
11923 + contentPosition,
11924 + customGradient,
11925 + customOverlayColor,
11926 + dimRatio,
11927 + focalPoint,
11928 + hasParallax,
11929 + isRepeated,
11930 + overlayColor,
11931 + url,
11932 + alt,
11933 + id,
11934 + minHeight: minHeightProp,
11935 + minHeightUnit
11936 + } = attributes;
11937 + const overlayColorClass = (0,external_wp_blockEditor_namespaceObject.getColorClassName)(
11938 + "background-color",
11939 + overlayColor
11940 + );
11941 + const gradientClass = (0,external_wp_blockEditor_namespaceObject.__experimentalGetGradientClass)(gradient);
11942 + const minHeight = minHeightUnit ? `${minHeightProp}${minHeightUnit}` : minHeightProp;
11943 + const isImageBackground = IMAGE_BACKGROUND_TYPE === backgroundType;
11944 + const isVideoBackground = VIDEO_BACKGROUND_TYPE === backgroundType;
11945 + const isImgElement = !(hasParallax || isRepeated);
11946 + const style = {
11947 + ...isImageBackground && !isImgElement ? backgroundImageStyles(url) : {},
11948 + backgroundColor: !overlayColorClass ? customOverlayColor : void 0,
11949 + background: customGradient && !url ? customGradient : void 0,
11950 + minHeight: minHeight || void 0
11951 + };
11952 + const objectPosition = (
11953 + // prettier-ignore
11954 + focalPoint && isImgElement ? `${Math.round(focalPoint.x * 100)}% ${Math.round(focalPoint.y * 100)}%` : void 0
11955 + );
11956 + const classes = dist_clsx(
11957 + dimRatioToClassV1(dimRatio),
11958 + overlayColorClass,
11959 + {
11960 + "has-background-dim": dimRatio !== 0,
11961 + "has-parallax": hasParallax,
11962 + "is-repeated": isRepeated,
11963 + "has-background-gradient": gradient || customGradient,
11964 + [gradientClass]: !url && gradientClass,
11965 + "has-custom-content-position": !isContentPositionCenter(contentPosition)
11966 + },
11967 + getPositionClassName(contentPosition)
11968 + );
11969 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", { ...external_wp_blockEditor_namespaceObject.useBlockProps.save({ className: classes, style }), children: [
11970 + url && (gradient || customGradient) && dimRatio !== 0 && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
11971 + "span",
11972 + {
11973 + "aria-hidden": "true",
11974 + className: dist_clsx(
11975 + "wp-block-cover__gradient-background",
11976 + gradientClass
11977 + ),
11978 + style: customGradient ? { background: customGradient } : void 0
11979 + }
11980 + ),
11981 + isImageBackground && isImgElement && url && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
11982 + "img",
11983 + {
11984 + className: dist_clsx(
11985 + "wp-block-cover__image-background",
11986 + id ? `wp-image-${id}` : null
11987 + ),
11988 + alt,
11989 + src: url,
11990 + style: { objectPosition },
11991 + "data-object-fit": "cover",
11992 + "data-object-position": objectPosition
11993 + }
11994 + ),
11995 + isVideoBackground && url && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
11996 + "video",
11997 + {
11998 + className: dist_clsx(
11999 + "wp-block-cover__video-background",
12000 + "intrinsic-ignore"
12001 + ),
12002 + autoPlay: true,
12003 + muted: true,
12004 + loop: true,
12005 + playsInline: true,
12006 + src: url,
12007 + style: { objectPosition },
12008 + "data-object-fit": "cover",
12009 + "data-object-position": objectPosition
12010 + }
12011 + ),
12012 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { className: "wp-block-cover__inner-container", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, {}) })
12013 + ] });
12014 + },
12015 + migrate: (0,external_wp_compose_namespaceObject.compose)(migrateDimRatio, migrateTag)
12016 + };
12017 + const v6 = {
12018 + attributes: {
12019 + ...deprecated_blockAttributes,
12020 + isRepeated: {
12021 + type: "boolean",
12022 + default: false
12023 + },
12024 + minHeight: {
12025 + type: "number"
12026 + },
12027 + minHeightUnit: {
12028 + type: "string"
12029 + },
12030 + gradient: {
12031 + type: "string"
12032 + },
12033 + customGradient: {
12034 + type: "string"
12035 + },
12036 + contentPosition: {
12037 + type: "string"
12038 + }
12039 + },
12040 + supports: {
12041 + align: true
12042 + },
12043 + save({ attributes }) {
12044 + const {
12045 + backgroundType,
12046 + gradient,
12047 + contentPosition,
12048 + customGradient,
12049 + customOverlayColor,
12050 + dimRatio,
12051 + focalPoint,
12052 + hasParallax,
12053 + isRepeated,
12054 + overlayColor,
12055 + url,
12056 + minHeight: minHeightProp,
12057 + minHeightUnit
12058 + } = attributes;
12059 + const overlayColorClass = (0,external_wp_blockEditor_namespaceObject.getColorClassName)(
12060 + "background-color",
12061 + overlayColor
12062 + );
12063 + const gradientClass = (0,external_wp_blockEditor_namespaceObject.__experimentalGetGradientClass)(gradient);
12064 + const minHeight = minHeightUnit ? `${minHeightProp}${minHeightUnit}` : minHeightProp;
12065 + const isImageBackground = IMAGE_BACKGROUND_TYPE === backgroundType;
12066 + const isVideoBackground = VIDEO_BACKGROUND_TYPE === backgroundType;
12067 + const style = isImageBackground ? backgroundImageStyles(url) : {};
12068 + const videoStyle = {};
12069 + if (!overlayColorClass) {
12070 + style.backgroundColor = customOverlayColor;
12071 + }
12072 + if (customGradient && !url) {
12073 + style.background = customGradient;
12074 + }
12075 + style.minHeight = minHeight || void 0;
12076 + let positionValue;
12077 + if (focalPoint) {
12078 + positionValue = `${Math.round(
12079 + focalPoint.x * 100
12080 + )}% ${Math.round(focalPoint.y * 100)}%`;
12081 + if (isImageBackground && !hasParallax) {
12082 + style.backgroundPosition = positionValue;
12083 + }
12084 + if (isVideoBackground) {
12085 + videoStyle.objectPosition = positionValue;
12086 + }
12087 + }
12088 + const classes = dist_clsx(
12089 + dimRatioToClassV1(dimRatio),
12090 + overlayColorClass,
12091 + {
12092 + "has-background-dim": dimRatio !== 0,
12093 + "has-parallax": hasParallax,
12094 + "is-repeated": isRepeated,
12095 + "has-background-gradient": gradient || customGradient,
12096 + [gradientClass]: !url && gradientClass,
12097 + "has-custom-content-position": !isContentPositionCenter(contentPosition)
12098 + },
12099 + getPositionClassName(contentPosition)
12100 + );
12101 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", { ...external_wp_blockEditor_namespaceObject.useBlockProps.save({ className: classes, style }), children: [
12102 + url && (gradient || customGradient) && dimRatio !== 0 && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
12103 + "span",
12104 + {
12105 + "aria-hidden": "true",
12106 + className: dist_clsx(
12107 + "wp-block-cover__gradient-background",
12108 + gradientClass
12109 + ),
12110 + style: customGradient ? { background: customGradient } : void 0
12111 + }
12112 + ),
12113 + isVideoBackground && url && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
12114 + "video",
12115 + {
12116 + className: "wp-block-cover__video-background",
12117 + autoPlay: true,
12118 + muted: true,
12119 + loop: true,
12120 + playsInline: true,
12121 + src: url,
12122 + style: videoStyle
12123 + }
12124 + ),
12125 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { className: "wp-block-cover__inner-container", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, {}) })
12126 + ] });
12127 + },
12128 + migrate: (0,external_wp_compose_namespaceObject.compose)(migrateDimRatio, migrateTag)
12129 + };
12130 + const v5 = {
12131 + attributes: {
12132 + ...deprecated_blockAttributes,
12133 + minHeight: {
12134 + type: "number"
12135 + },
12136 + gradient: {
12137 + type: "string"
12138 + },
12139 + customGradient: {
12140 + type: "string"
12141 + }
12142 + },
12143 + supports: {
12144 + align: true
12145 + },
12146 + save({ attributes }) {
12147 + const {
12148 + backgroundType,
12149 + gradient,
12150 + customGradient,
12151 + customOverlayColor,
12152 + dimRatio,
12153 + focalPoint,
12154 + hasParallax,
12155 + overlayColor,
12156 + url,
12157 + minHeight
12158 + } = attributes;
12159 + const overlayColorClass = (0,external_wp_blockEditor_namespaceObject.getColorClassName)(
12160 + "background-color",
12161 + overlayColor
12162 + );
12163 + const gradientClass = (0,external_wp_blockEditor_namespaceObject.__experimentalGetGradientClass)(gradient);
12164 + const style = backgroundType === IMAGE_BACKGROUND_TYPE ? backgroundImageStyles(url) : {};
12165 + if (!overlayColorClass) {
12166 + style.backgroundColor = customOverlayColor;
12167 + }
12168 + if (focalPoint && !hasParallax) {
12169 + style.backgroundPosition = `${Math.round(
12170 + focalPoint.x * 100
12171 + )}% ${Math.round(focalPoint.y * 100)}%`;
12172 + }
12173 + if (customGradient && !url) {
12174 + style.background = customGradient;
12175 + }
12176 + style.minHeight = minHeight || void 0;
12177 + const classes = dist_clsx(
12178 + dimRatioToClassV1(dimRatio),
12179 + overlayColorClass,
12180 + {
12181 + "has-background-dim": dimRatio !== 0,
12182 + "has-parallax": hasParallax,
12183 + "has-background-gradient": customGradient,
12184 + [gradientClass]: !url && gradientClass
12185 + }
12186 + );
12187 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", { className: classes, style, children: [
12188 + url && (gradient || customGradient) && dimRatio !== 0 && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
12189 + "span",
12190 + {
12191 + "aria-hidden": "true",
12192 + className: dist_clsx(
12193 + "wp-block-cover__gradient-background",
12194 + gradientClass
12195 + ),
12196 + style: customGradient ? { background: customGradient } : void 0
12197 + }
12198 + ),
12199 + VIDEO_BACKGROUND_TYPE === backgroundType && url && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
12200 + "video",
12201 + {
12202 + className: "wp-block-cover__video-background",
12203 + autoPlay: true,
12204 + muted: true,
12205 + loop: true,
12206 + src: url
12207 + }
12208 + ),
12209 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { className: "wp-block-cover__inner-container", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, {}) })
12210 + ] });
12211 + },
12212 + migrate: (0,external_wp_compose_namespaceObject.compose)(migrateDimRatio, migrateTag)
12213 + };
12214 + const v4 = {
12215 + attributes: {
12216 + ...deprecated_blockAttributes,
12217 + minHeight: {
12218 + type: "number"
12219 + },
12220 + gradient: {
12221 + type: "string"
12222 + },
12223 + customGradient: {
12224 + type: "string"
12225 + }
12226 + },
12227 + supports: {
12228 + align: true
12229 + },
12230 + save({ attributes }) {
12231 + const {
12232 + backgroundType,
12233 + gradient,
12234 + customGradient,
12235 + customOverlayColor,
12236 + dimRatio,
12237 + focalPoint,
12238 + hasParallax,
12239 + overlayColor,
12240 + url,
12241 + minHeight
12242 + } = attributes;
12243 + const overlayColorClass = (0,external_wp_blockEditor_namespaceObject.getColorClassName)(
12244 + "background-color",
12245 + overlayColor
12246 + );
12247 + const gradientClass = (0,external_wp_blockEditor_namespaceObject.__experimentalGetGradientClass)(gradient);
12248 + const style = backgroundType === IMAGE_BACKGROUND_TYPE ? backgroundImageStyles(url) : {};
12249 + if (!overlayColorClass) {
12250 + style.backgroundColor = customOverlayColor;
12251 + }
12252 + if (focalPoint && !hasParallax) {
12253 + style.backgroundPosition = `${focalPoint.x * 100}% ${focalPoint.y * 100}%`;
12254 + }
12255 + if (customGradient && !url) {
12256 + style.background = customGradient;
12257 + }
12258 + style.minHeight = minHeight || void 0;
12259 + const classes = dist_clsx(
12260 + dimRatioToClassV1(dimRatio),
12261 + overlayColorClass,
12262 + {
12263 + "has-background-dim": dimRatio !== 0,
12264 + "has-parallax": hasParallax,
12265 + "has-background-gradient": customGradient,
12266 + [gradientClass]: !url && gradientClass
12267 + }
12268 + );
12269 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", { className: classes, style, children: [
12270 + url && (gradient || customGradient) && dimRatio !== 0 && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
12271 + "span",
12272 + {
12273 + "aria-hidden": "true",
12274 + className: dist_clsx(
12275 + "wp-block-cover__gradient-background",
12276 + gradientClass
12277 + ),
12278 + style: customGradient ? { background: customGradient } : void 0
12279 + }
12280 + ),
12281 + VIDEO_BACKGROUND_TYPE === backgroundType && url && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
12282 + "video",
12283 + {
12284 + className: "wp-block-cover__video-background",
12285 + autoPlay: true,
12286 + muted: true,
12287 + loop: true,
12288 + src: url
12289 + }
12290 + ),
12291 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { className: "wp-block-cover__inner-container", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, {}) })
12292 + ] });
12293 + },
12294 + migrate: (0,external_wp_compose_namespaceObject.compose)(migrateDimRatio, migrateTag)
12295 + };
12296 + const v3 = {
12297 + attributes: {
12298 + ...deprecated_blockAttributes,
12299 + title: {
12300 + type: "string",
12301 + source: "html",
12302 + selector: "p"
12303 + },
12304 + contentAlign: {
12305 + type: "string",
12306 + default: "center"
12307 + }
12308 + },
12309 + supports: {
12310 + align: true
12311 + },
12312 + save({ attributes }) {
12313 + const {
12314 + backgroundType,
12315 + contentAlign,
12316 + customOverlayColor,
12317 + dimRatio,
12318 + focalPoint,
12319 + hasParallax,
12320 + overlayColor,
12321 + title,
12322 + url
12323 + } = attributes;
12324 + const overlayColorClass = (0,external_wp_blockEditor_namespaceObject.getColorClassName)(
12325 + "background-color",
12326 + overlayColor
12327 + );
12328 + const style = backgroundType === IMAGE_BACKGROUND_TYPE ? backgroundImageStyles(url) : {};
12329 + if (!overlayColorClass) {
12330 + style.backgroundColor = customOverlayColor;
12331 + }
12332 + if (focalPoint && !hasParallax) {
12333 + style.backgroundPosition = `${focalPoint.x * 100}% ${focalPoint.y * 100}%`;
12334 + }
12335 + const classes = dist_clsx(
12336 + dimRatioToClassV1(dimRatio),
12337 + overlayColorClass,
12338 + {
12339 + "has-background-dim": dimRatio !== 0,
12340 + "has-parallax": hasParallax,
12341 + [`has-${contentAlign}-content`]: contentAlign !== "center"
12342 + }
12343 + );
12344 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", { className: classes, style, children: [
12345 + VIDEO_BACKGROUND_TYPE === backgroundType && url && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
12346 + "video",
12347 + {
12348 + className: "wp-block-cover__video-background",
12349 + autoPlay: true,
12350 + muted: true,
12351 + loop: true,
12352 + src: url
12353 + }
12354 + ),
12355 + !external_wp_blockEditor_namespaceObject.RichText.isEmpty(title) && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
12356 + external_wp_blockEditor_namespaceObject.RichText.Content,
12357 + {
12358 + tagName: "p",
12359 + className: "wp-block-cover-text",
12360 + value: title
12361 + }
12362 + )
12363 + ] });
12364 + },
12365 + migrate(attributes) {
12366 + const newAttribs = {
12367 + ...attributes,
12368 + dimRatio: !attributes.url ? 100 : attributes.dimRatio,
12369 + tagName: !attributes.tagName ? "div" : attributes.tagName
12370 + };
12371 + const { title, contentAlign, ...restAttributes } = newAttribs;
12372 + return [
12373 + restAttributes,
12374 + [
12375 + (0,external_wp_blocks_namespaceObject.createBlock)("core/paragraph", {
12376 + content: attributes.title,
12377 + align: attributes.contentAlign,
12378 + fontSize: "large",
12379 + placeholder: (0,external_wp_i18n_namespaceObject.__)("Write title\u2026")
12380 + })
12381 + ]
12382 + ];
12383 + }
12384 + };
12385 + const v2 = {
12386 + attributes: {
12387 + ...deprecated_blockAttributes,
12388 + title: {
12389 + type: "string",
12390 + source: "html",
12391 + selector: "p"
12392 + },
12393 + contentAlign: {
12394 + type: "string",
12395 + default: "center"
12396 + },
12397 + align: {
12398 + type: "string"
12399 + }
12400 + },
12401 + supports: {
12402 + className: false
12403 + },
12404 + save({ attributes }) {
12405 + const {
12406 + url,
12407 + title,
12408 + hasParallax,
12409 + dimRatio,
12410 + align,
12411 + contentAlign,
12412 + overlayColor,
12413 + customOverlayColor
12414 + } = attributes;
12415 + const overlayColorClass = (0,external_wp_blockEditor_namespaceObject.getColorClassName)(
12416 + "background-color",
12417 + overlayColor
12418 + );
12419 + const style = backgroundImageStyles(url);
12420 + if (!overlayColorClass) {
12421 + style.backgroundColor = customOverlayColor;
12422 + }
12423 + const classes = dist_clsx(
12424 + "wp-block-cover-image",
12425 + dimRatioToClassV1(dimRatio),
12426 + overlayColorClass,
12427 + {
12428 + "has-background-dim": dimRatio !== 0,
12429 + "has-parallax": hasParallax,
12430 + [`has-${contentAlign}-content`]: contentAlign !== "center"
12431 + },
12432 + align ? `align${align}` : null
12433 + );
12434 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { className: classes, style, children: !external_wp_blockEditor_namespaceObject.RichText.isEmpty(title) && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
12435 + external_wp_blockEditor_namespaceObject.RichText.Content,
12436 + {
12437 + tagName: "p",
12438 + className: "wp-block-cover-image-text",
12439 + value: title
12440 + }
12441 + ) });
12442 + },
12443 + migrate(attributes) {
12444 + const newAttribs = {
12445 + ...attributes,
12446 + dimRatio: !attributes.url ? 100 : attributes.dimRatio,
12447 + tagName: !attributes.tagName ? "div" : attributes.tagName
12448 + };
12449 + const { title, contentAlign, align, ...restAttributes } = newAttribs;
12450 + return [
12451 + restAttributes,
12452 + [
12453 + (0,external_wp_blocks_namespaceObject.createBlock)("core/paragraph", {
12454 + content: attributes.title,
12455 + align: attributes.contentAlign,
12456 + fontSize: "large",
12457 + placeholder: (0,external_wp_i18n_namespaceObject.__)("Write title\u2026")
12458 + })
12459 + ]
12460 + ];
12461 + }
12462 + };
12463 + const cover_deprecated_v1 = {
12464 + attributes: {
12465 + ...deprecated_blockAttributes,
12466 + title: {
12467 + type: "string",
12468 + source: "html",
12469 + selector: "h2"
12470 + },
12471 + align: {
12472 + type: "string"
12473 + },
12474 + contentAlign: {
12475 + type: "string",
12476 + default: "center"
12477 + }
12478 + },
12479 + supports: {
12480 + className: false
12481 + },
12482 + save({ attributes }) {
12483 + const { url, title, hasParallax, dimRatio, align } = attributes;
12484 + const style = backgroundImageStyles(url);
12485 + const classes = dist_clsx(
12486 + "wp-block-cover-image",
12487 + dimRatioToClassV1(dimRatio),
12488 + {
12489 + "has-background-dim": dimRatio !== 0,
12490 + "has-parallax": hasParallax
12491 + },
12492 + align ? `align${align}` : null
12493 + );
12494 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("section", { className: classes, style, children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichText.Content, { tagName: "h2", value: title }) });
12495 + },
12496 + migrate(attributes) {
12497 + const newAttribs = {
12498 + ...attributes,
12499 + dimRatio: !attributes.url ? 100 : attributes.dimRatio,
12500 + tagName: !attributes.tagName ? "div" : attributes.tagName
12501 + };
12502 + const { title, contentAlign, align, ...restAttributes } = newAttribs;
12503 + return [
12504 + restAttributes,
12505 + [
12506 + (0,external_wp_blocks_namespaceObject.createBlock)("core/paragraph", {
12507 + content: attributes.title,
12508 + align: attributes.contentAlign,
12509 + fontSize: "large",
12510 + placeholder: (0,external_wp_i18n_namespaceObject.__)("Write title\u2026")
12511 + })
12512 + ]
12513 + ];
12514 + }
12515 + };
12516 + var cover_deprecated_deprecated_default = [v14, v13, deprecated_v12, deprecated_v11, deprecated_v10, v9, v8, v7, v6, v5, v4, v3, v2, cover_deprecated_v1];
12517 +
12518 +
12519 + ;// ./node_modules/@wordpress/block-library/build-module/cover/constants.js
12520 + const DEFAULT_MEDIA_SIZE_SLUG = "full";
12521 +
12522 +
12523 + ;// ./node_modules/@wordpress/block-library/build-module/utils/poster-image.js
12524 +
12525 +
12526 +
12527 +
12528 +
12529 +
12530 +
12531 +
12532 +
12533 +
12534 + const POSTER_IMAGE_ALLOWED_MEDIA_TYPES = ["image"];
12535 + function PosterImage({ poster, onChange }) {
12536 + const posterButtonRef = (0,external_wp_element_namespaceObject.useRef)();
12537 + const [isLoading, setIsLoading] = (0,external_wp_element_namespaceObject.useState)(false);
12538 + const descriptionId = (0,external_wp_compose_namespaceObject.useInstanceId)(
12539 + PosterImage,
12540 + "block-library-poster-image-description"
12541 + );
12542 + const { getSettings } = (0,external_wp_data_namespaceObject.useSelect)(external_wp_blockEditor_namespaceObject.store);
12543 + const { createErrorNotice } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_notices_namespaceObject.store);
12544 + const onDropFiles = (filesList) => {
12545 + getSettings().mediaUpload({
12546 + allowedTypes: POSTER_IMAGE_ALLOWED_MEDIA_TYPES,
12547 + filesList,
12548 + onFileChange: ([image]) => {
12549 + if ((0,external_wp_blob_namespaceObject.isBlobURL)(image?.url)) {
12550 + setIsLoading(true);
12551 + return;
12552 + }
12553 + if (image) {
12554 + onChange(image);
12555 + }
12556 + setIsLoading(false);
12557 + },
12558 + onError: (message) => {
12559 + createErrorNotice(message, {
12560 + id: "poster-image-upload-notice",
12561 + type: "snackbar"
12562 + });
12563 + setIsLoading(false);
12564 + },
12565 + multiple: false
12566 + });
12567 + };
12568 + const getPosterButtonContent = () => {
12569 + if (!poster && isLoading) {
12570 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Spinner, {});
12571 + }
12572 + return !poster ? (0,external_wp_i18n_namespaceObject.__)("Set poster image") : (0,external_wp_i18n_namespaceObject.__)("Replace");
12573 + };
12574 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.MediaUploadCheck, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(
12575 + external_wp_components_namespaceObject.__experimentalToolsPanelItem,
12576 + {
12577 + label: (0,external_wp_i18n_namespaceObject.__)("Poster image"),
12578 + isShownByDefault: true,
12579 + hasValue: () => !!poster,
12580 + onDeselect: () => onChange(void 0),
12581 + children: [
12582 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.BaseControl.VisualLabel, { children: (0,external_wp_i18n_namespaceObject.__)("Poster image") }),
12583 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
12584 + external_wp_blockEditor_namespaceObject.MediaUpload,
12585 + {
12586 + title: (0,external_wp_i18n_namespaceObject.__)("Select poster image"),
12587 + onSelect: onChange,
12588 + allowedTypes: POSTER_IMAGE_ALLOWED_MEDIA_TYPES,
12589 + render: ({ open }) => /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", { className: "block-library-poster-image__container", children: [
12590 + poster && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(
12591 + external_wp_components_namespaceObject.Button,
12592 + {
12593 + __next40pxDefaultSize: true,
12594 + onClick: open,
12595 + "aria-haspopup": "dialog",
12596 + "aria-label": (0,external_wp_i18n_namespaceObject.__)(
12597 + "Edit or replace the poster image."
12598 + ),
12599 + className: "block-library-poster-image__preview",
12600 + disabled: isLoading,
12601 + accessibleWhenDisabled: true,
12602 + children: [
12603 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
12604 + "img",
12605 + {
12606 + src: poster,
12607 + alt: (0,external_wp_i18n_namespaceObject.__)("Poster image preview"),
12608 + className: "block-library-poster-image__preview-image"
12609 + }
12610 + ),
12611 + isLoading && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Spinner, {})
12612 + ]
12613 + }
12614 + ),
12615 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(
12616 + external_wp_components_namespaceObject.__experimentalHStack,
12617 + {
12618 + className: dist_clsx(
12619 + "block-library-poster-image__actions",
12620 + {
12621 + "block-library-poster-image__actions-select": !poster
12622 + }
12623 + ),
12624 + children: [
12625 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
12626 + external_wp_components_namespaceObject.Button,
12627 + {
12628 + __next40pxDefaultSize: true,
12629 + onClick: open,
12630 + ref: posterButtonRef,
12631 + className: "block-library-poster-image__action",
12632 + "aria-describedby": descriptionId,
12633 + "aria-haspopup": "dialog",
12634 + variant: !poster ? "secondary" : void 0,
12635 + disabled: isLoading,
12636 + accessibleWhenDisabled: true,
12637 + children: getPosterButtonContent()
12638 + }
12639 + ),
12640 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("p", { id: descriptionId, hidden: true, children: poster ? (0,external_wp_i18n_namespaceObject.sprintf)(
12641 + /* translators: %s: poster image URL. */
12642 + (0,external_wp_i18n_namespaceObject.__)(
12643 + "The current poster image url is %s."
12644 + ),
12645 + poster
12646 + ) : (0,external_wp_i18n_namespaceObject.__)(
12647 + "There is no poster image currently selected."
12648 + ) }),
12649 + !!poster && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
12650 + external_wp_components_namespaceObject.Button,
12651 + {
12652 + __next40pxDefaultSize: true,
12653 + onClick: () => {
12654 + onChange(void 0);
12655 + posterButtonRef.current.focus();
12656 + },
12657 + className: "block-library-poster-image__action",
12658 + disabled: isLoading,
12659 + accessibleWhenDisabled: true,
12660 + children: (0,external_wp_i18n_namespaceObject.__)("Remove")
12661 + }
12662 + )
12663 + ]
12664 + }
12665 + ),
12666 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.DropZone, { onFilesDrop: onDropFiles })
12667 + ] })
12668 + }
12669 + )
12670 + ]
12671 + }
12672 + ) });
12673 + }
12674 + var poster_image_default = PosterImage;
12675 +
12676 +
12677 + ;// ./node_modules/@wordpress/block-library/build-module/cover/edit/inspector-controls.js
12678 +
12679 +
12680 +
12681 +
12682 +
12683 +
12684 +
12685 +
12686 +
12687 +
12688 +
12689 +
12690 +
12691 + const { cleanEmptyObject: inspector_controls_cleanEmptyObject, ResolutionTool, HTMLElementControl: inspector_controls_HTMLElementControl } = unlock(
12692 + external_wp_blockEditor_namespaceObject.privateApis
12693 + );
12694 + function CoverHeightInput({
12695 + onChange,
12696 + onUnitChange,
12697 + unit = "px",
12698 + value = ""
12699 + }) {
12700 + const instanceId = (0,external_wp_compose_namespaceObject.useInstanceId)(external_wp_components_namespaceObject.__experimentalUnitControl);
12701 + const inputId = `block-cover-height-input-${instanceId}`;
12702 + const isPx = unit === "px";
12703 + const [availableUnits] = (0,external_wp_blockEditor_namespaceObject.useSettings)("spacing.units");
12704 + const units = (0,external_wp_components_namespaceObject.__experimentalUseCustomUnits)({
12705 + availableUnits: availableUnits || ["px", "em", "rem", "vw", "vh"],
12706 + defaultValues: { px: 430, "%": 20, em: 20, rem: 20, vw: 20, vh: 50 }
12707 + });
12708 + const handleOnChange = (unprocessedValue) => {
12709 + const inputValue = unprocessedValue !== "" ? parseFloat(unprocessedValue) : void 0;
12710 + if (isNaN(inputValue) && inputValue !== void 0) {
12711 + return;
12712 + }
12713 + onChange(inputValue);
12714 + };
12715 + const computedValue = (0,external_wp_element_namespaceObject.useMemo)(() => {
12716 + const [parsedQuantity] = (0,external_wp_components_namespaceObject.__experimentalParseQuantityAndUnitFromRawValue)(value);
12717 + return [parsedQuantity, unit].join("");
12718 + }, [unit, value]);
12719 + const min = isPx ? COVER_MIN_HEIGHT : 0;
12720 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
12721 + external_wp_components_namespaceObject.__experimentalUnitControl,
12722 + {
12723 + __next40pxDefaultSize: true,
12724 + label: (0,external_wp_i18n_namespaceObject.__)("Minimum height"),
12725 + id: inputId,
12726 + isResetValueOnUnitChange: true,
12727 + min,
12728 + onChange: handleOnChange,
12729 + onUnitChange,
12730 + units,
12731 + value: computedValue
12732 + }
12733 + );
12734 + }
12735 + function CoverInspectorControls({
12736 + attributes,
12737 + setAttributes,
12738 + clientId,
12739 + setOverlayColor,
12740 + coverRef,
12741 + currentSettings,
12742 + updateDimRatio,
12743 + featuredImage
12744 + }) {
12745 + const {
12746 + useFeaturedImage,
12747 + id,
12748 + dimRatio,
12749 + focalPoint,
12750 + hasParallax,
12751 + isRepeated,
12752 + minHeight,
12753 + minHeightUnit,
12754 + alt,
12755 + tagName,
12756 + poster
12757 + } = attributes;
12758 + const {
12759 + isVideoBackground,
12760 + isImageBackground,
12761 + mediaElement,
12762 + url,
12763 + overlayColor
12764 + } = currentSettings;
12765 + const sizeSlug = attributes.sizeSlug || DEFAULT_MEDIA_SIZE_SLUG;
12766 + const { gradientValue, setGradient } = (0,external_wp_blockEditor_namespaceObject.__experimentalUseGradient)();
12767 + const { getSettings } = (0,external_wp_data_namespaceObject.useSelect)(external_wp_blockEditor_namespaceObject.store);
12768 + const imageSizes = getSettings()?.imageSizes;
12769 + const image = (0,external_wp_data_namespaceObject.useSelect)(
12770 + (select) => id && isImageBackground ? select(external_wp_coreData_namespaceObject.store).getEntityRecord(
12771 + "postType",
12772 + "attachment",
12773 + id,
12774 + { context: "view" }
12775 + ) : null,
12776 + [id, isImageBackground]
12777 + );
12778 + const currentBackgroundImage = useFeaturedImage ? featuredImage : image;
12779 + function updateImage(newSizeSlug) {
12780 + const newUrl = currentBackgroundImage?.media_details?.sizes?.[newSizeSlug]?.source_url;
12781 + if (!newUrl) {
12782 + return null;
12783 + }
12784 + setAttributes({
12785 + url: newUrl,
12786 + sizeSlug: newSizeSlug
12787 + });
12788 + }
12789 + const imageSizeOptions = imageSizes?.filter(
12790 + ({ slug }) => currentBackgroundImage?.media_details?.sizes?.[slug]?.source_url
12791 + )?.map(({ name, slug }) => ({ value: slug, label: name }));
12792 + const toggleParallax = () => {
12793 + setAttributes({
12794 + hasParallax: !hasParallax,
12795 + ...!hasParallax ? { focalPoint: void 0 } : {}
12796 + });
12797 + };
12798 + const toggleIsRepeated = () => {
12799 + setAttributes({
12800 + isRepeated: !isRepeated
12801 + });
12802 + };
12803 + const showFocalPointPicker = isVideoBackground || isImageBackground && (!hasParallax || isRepeated);
12804 + const imperativeFocalPointPreview = (value) => {
12805 + const [styleOfRef, property] = mediaElement.current ? [mediaElement.current.style, "objectPosition"] : [coverRef.current.style, "backgroundPosition"];
12806 + styleOfRef[property] = mediaPosition(value);
12807 + };
12808 + const colorGradientSettings = (0,external_wp_blockEditor_namespaceObject.__experimentalUseMultipleOriginColorsAndGradients)();
12809 + const dropdownMenuProps = useToolsPanelDropdownMenuProps();
12810 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
12811 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, { children: !!url && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(
12812 + external_wp_components_namespaceObject.__experimentalToolsPanel,
12813 + {
12814 + label: (0,external_wp_i18n_namespaceObject.__)("Settings"),
12815 + resetAll: () => {
12816 + setAttributes({
12817 + hasParallax: false,
12818 + focalPoint: void 0,
12819 + isRepeated: false,
12820 + alt: "",
12821 + poster: void 0
12822 + });
12823 + updateImage(DEFAULT_MEDIA_SIZE_SLUG);
12824 + },
12825 + dropdownMenuProps,
12826 + children: [
12827 + isImageBackground && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
12828 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
12829 + external_wp_components_namespaceObject.__experimentalToolsPanelItem,
12830 + {
12831 + label: (0,external_wp_i18n_namespaceObject.__)("Fixed background"),
12832 + isShownByDefault: true,
12833 + hasValue: () => !!hasParallax,
12834 + onDeselect: () => setAttributes({
12835 + hasParallax: false,
12836 + focalPoint: void 0
12837 + }),
12838 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
12839 + external_wp_components_namespaceObject.ToggleControl,
12840 + {
12841 + __nextHasNoMarginBottom: true,
12842 + label: (0,external_wp_i18n_namespaceObject.__)("Fixed background"),
12843 + checked: !!hasParallax,
12844 + onChange: toggleParallax
12845 + }
12846 + )
12847 + }
12848 + ),
12849 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
12850 + external_wp_components_namespaceObject.__experimentalToolsPanelItem,
12851 + {
12852 + label: (0,external_wp_i18n_namespaceObject.__)("Repeated background"),
12853 + isShownByDefault: true,
12854 + hasValue: () => isRepeated,
12855 + onDeselect: () => setAttributes({
12856 + isRepeated: false
12857 + }),
12858 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
12859 + external_wp_components_namespaceObject.ToggleControl,
12860 + {
12861 + __nextHasNoMarginBottom: true,
12862 + label: (0,external_wp_i18n_namespaceObject.__)("Repeated background"),
12863 + checked: isRepeated,
12864 + onChange: toggleIsRepeated
12865 + }
12866 + )
12867 + }
12868 + )
12869 + ] }),
12870 + showFocalPointPicker && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
12871 + external_wp_components_namespaceObject.__experimentalToolsPanelItem,
12872 + {
12873 + label: (0,external_wp_i18n_namespaceObject.__)("Focal point"),
12874 + isShownByDefault: true,
12875 + hasValue: () => !!focalPoint,
12876 + onDeselect: () => setAttributes({
12877 + focalPoint: void 0
12878 + }),
12879 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
12880 + external_wp_components_namespaceObject.FocalPointPicker,
12881 + {
12882 + __nextHasNoMarginBottom: true,
12883 + label: (0,external_wp_i18n_namespaceObject.__)("Focal point"),
12884 + url,
12885 + value: focalPoint,
12886 + onDragStart: imperativeFocalPointPreview,
12887 + onDrag: imperativeFocalPointPreview,
12888 + onChange: (newFocalPoint) => setAttributes({
12889 + focalPoint: newFocalPoint
12890 + })
12891 + }
12892 + )
12893 + }
12894 + ),
12895 + isVideoBackground && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
12896 + poster_image_default,
12897 + {
12898 + poster,
12899 + onChange: (posterImage) => setAttributes({
12900 + poster: posterImage?.url
12901 + })
12902 + }
12903 + ),
12904 + !useFeaturedImage && url && !isVideoBackground && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
12905 + external_wp_components_namespaceObject.__experimentalToolsPanelItem,
12906 + {
12907 + label: (0,external_wp_i18n_namespaceObject.__)("Alternative text"),
12908 + isShownByDefault: true,
12909 + hasValue: () => !!alt,
12910 + onDeselect: () => setAttributes({ alt: "" }),
12911 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
12912 + external_wp_components_namespaceObject.TextareaControl,
12913 + {
12914 + __nextHasNoMarginBottom: true,
12915 + label: (0,external_wp_i18n_namespaceObject.__)("Alternative text"),
12916 + value: alt,
12917 + onChange: (newAlt) => setAttributes({ alt: newAlt }),
12918 + help: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
12919 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
12920 + external_wp_components_namespaceObject.ExternalLink,
12921 + {
12922 + href: (
12923 + // translators: Localized tutorial, if one exists. W3C Web Accessibility Initiative link has list of existing translations.
12924 + (0,external_wp_i18n_namespaceObject.__)(
12925 + "https://www.w3.org/WAI/tutorials/images/decision-tree/"
12926 + )
12927 + ),
12928 + children: (0,external_wp_i18n_namespaceObject.__)(
12929 + "Describe the purpose of the image."
12930 + )
12931 + }
12932 + ),
12933 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("br", {}),
12934 + (0,external_wp_i18n_namespaceObject.__)(
12935 + "Leave empty if decorative."
12936 + )
12937 + ] })
12938 + }
12939 + )
12940 + }
12941 + ),
12942 + !!imageSizeOptions?.length && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
12943 + ResolutionTool,
12944 + {
12945 + value: sizeSlug,
12946 + onChange: updateImage,
12947 + options: imageSizeOptions,
12948 + defaultValue: DEFAULT_MEDIA_SIZE_SLUG
12949 + }
12950 + )
12951 + ]
12952 + }
12953 + ) }),
12954 + colorGradientSettings.hasColorsOrGradients && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_blockEditor_namespaceObject.InspectorControls, { group: "color", children: [
12955 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
12956 + external_wp_blockEditor_namespaceObject.__experimentalColorGradientSettingsDropdown,
12957 + {
12958 + __experimentalIsRenderedInSidebar: true,
12959 + settings: [
12960 + {
12961 + colorValue: overlayColor.color,
12962 + gradientValue,
12963 + label: (0,external_wp_i18n_namespaceObject.__)("Overlay"),
12964 + onColorChange: setOverlayColor,
12965 + onGradientChange: setGradient,
12966 + isShownByDefault: true,
12967 + resetAllFilter: () => ({
12968 + overlayColor: void 0,
12969 + customOverlayColor: void 0,
12970 + gradient: void 0,
12971 + customGradient: void 0
12972 + }),
12973 + clearable: true
12974 + }
12975 + ],
12976 + panelId: clientId,
12977 + ...colorGradientSettings
12978 + }
12979 + ),
12980 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
12981 + external_wp_components_namespaceObject.__experimentalToolsPanelItem,
12982 + {
12983 + hasValue: () => {
12984 + return dimRatio === void 0 ? false : dimRatio !== (url ? 50 : 100);
12985 + },
12986 + label: (0,external_wp_i18n_namespaceObject.__)("Overlay opacity"),
12987 + onDeselect: () => updateDimRatio(url ? 50 : 100),
12988 + resetAllFilter: () => ({
12989 + dimRatio: url ? 50 : 100
12990 + }),
12991 + isShownByDefault: true,
12992 + panelId: clientId,
12993 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
12994 + external_wp_components_namespaceObject.RangeControl,
12995 + {
12996 + __nextHasNoMarginBottom: true,
12997 + label: (0,external_wp_i18n_namespaceObject.__)("Overlay opacity"),
12998 + value: dimRatio,
12999 + onChange: (newDimRatio) => updateDimRatio(newDimRatio),
13000 + min: 0,
13001 + max: 100,
13002 + step: 10,
13003 + required: true,
13004 + __next40pxDefaultSize: true
13005 + }
13006 + )
13007 + }
13008 + )
13009 + ] }),
13010 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, { group: "dimensions", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
13011 + external_wp_components_namespaceObject.__experimentalToolsPanelItem,
13012 + {
13013 + className: "single-column",
13014 + hasValue: () => !!minHeight,
13015 + label: (0,external_wp_i18n_namespaceObject.__)("Minimum height"),
13016 + onDeselect: () => setAttributes({
13017 + minHeight: void 0,
13018 + minHeightUnit: void 0
13019 + }),
13020 + resetAllFilter: () => ({
13021 + minHeight: void 0,
13022 + minHeightUnit: void 0
13023 + }),
13024 + isShownByDefault: true,
13025 + panelId: clientId,
13026 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
13027 + CoverHeightInput,
13028 + {
13029 + value: attributes?.style?.dimensions?.aspectRatio ? "" : minHeight,
13030 + unit: minHeightUnit,
13031 + onChange: (newMinHeight) => setAttributes({
13032 + minHeight: newMinHeight,
13033 + style: inspector_controls_cleanEmptyObject({
13034 + ...attributes?.style,
13035 + dimensions: {
13036 + ...attributes?.style?.dimensions,
13037 + aspectRatio: void 0
13038 + // Reset aspect ratio when minHeight is set.
13039 + }
13040 + })
13041 + }),
13042 + onUnitChange: (nextUnit) => setAttributes({
13043 + minHeightUnit: nextUnit
13044 + })
13045 + }
13046 + )
13047 + }
13048 + ) }),
13049 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, { group: "advanced", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
13050 + inspector_controls_HTMLElementControl,
13051 + {
13052 + tagName,
13053 + onChange: (value) => setAttributes({ tagName: value }),
13054 + clientId,
13055 + options: [
13056 + { label: (0,external_wp_i18n_namespaceObject.__)("Default (<div>)"), value: "div" },
13057 + { label: "<header>", value: "header" },
13058 + { label: "<main>", value: "main" },
13059 + { label: "<section>", value: "section" },
13060 + { label: "<article>", value: "article" },
13061 + { label: "<aside>", value: "aside" },
13062 + { label: "<footer>", value: "footer" }
13063 + ]
13064 + }
13065 + ) })
13066 + ] });
13067 + }
13068 +
13069 +
13070 + ;// ./node_modules/@wordpress/block-library/build-module/cover/edit/block-controls.js
13071 +
13072 +
13073 +
13074 +
13075 +
13076 +
13077 + const { cleanEmptyObject: block_controls_cleanEmptyObject } = unlock(external_wp_blockEditor_namespaceObject.privateApis);
13078 + function CoverBlockControls({
13079 + attributes,
13080 + setAttributes,
13081 + onSelectMedia,
13082 + currentSettings,
13083 + toggleUseFeaturedImage,
13084 + onClearMedia,
13085 + blockEditingMode
13086 + }) {
13087 + const { contentPosition, id, useFeaturedImage, minHeight, minHeightUnit } = attributes;
13088 + const { hasInnerBlocks, url } = currentSettings;
13089 + const [prevMinHeightValue, setPrevMinHeightValue] = (0,external_wp_element_namespaceObject.useState)(minHeight);
13090 + const [prevMinHeightUnit, setPrevMinHeightUnit] = (0,external_wp_element_namespaceObject.useState)(minHeightUnit);
13091 + const isMinFullHeight = minHeightUnit === "vh" && minHeight === 100 && !attributes?.style?.dimensions?.aspectRatio;
13092 + const isContentOnlyMode = blockEditingMode === "contentOnly";
13093 + const toggleMinFullHeight = () => {
13094 + if (isMinFullHeight) {
13095 + if (prevMinHeightUnit === "vh" && prevMinHeightValue === 100) {
13096 + return setAttributes({
13097 + minHeight: void 0,
13098 + minHeightUnit: void 0
13099 + });
13100 + }
13101 + return setAttributes({
13102 + minHeight: prevMinHeightValue,
13103 + minHeightUnit: prevMinHeightUnit
13104 + });
13105 + }
13106 + setPrevMinHeightValue(minHeight);
13107 + setPrevMinHeightUnit(minHeightUnit);
13108 + return setAttributes({
13109 + minHeight: 100,
13110 + minHeightUnit: "vh",
13111 + style: block_controls_cleanEmptyObject({
13112 + ...attributes?.style,
13113 + dimensions: {
13114 + ...attributes?.style?.dimensions,
13115 + aspectRatio: void 0
13116 + // Reset aspect ratio when minHeight is set.
13117 + }
13118 + })
13119 + });
13120 + };
13121 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
13122 + !isContentOnlyMode && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_blockEditor_namespaceObject.BlockControls, { group: "block", children: [
13123 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
13124 + external_wp_blockEditor_namespaceObject.__experimentalBlockAlignmentMatrixControl,
13125 + {
13126 + label: (0,external_wp_i18n_namespaceObject.__)("Change content position"),
13127 + value: contentPosition,
13128 + onChange: (nextPosition) => setAttributes({
13129 + contentPosition: nextPosition
13130 + }),
13131 + isDisabled: !hasInnerBlocks
13132 + }
13133 + ),
13134 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
13135 + external_wp_blockEditor_namespaceObject.__experimentalBlockFullHeightAligmentControl,
13136 + {
13137 + isActive: isMinFullHeight,
13138 + onToggle: toggleMinFullHeight,
13139 + isDisabled: !hasInnerBlocks
13140 + }
13141 + )
13142 + ] }),
13143 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockControls, { group: "other", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
13144 + external_wp_blockEditor_namespaceObject.MediaReplaceFlow,
13145 + {
13146 + mediaId: id,
13147 + mediaURL: url,
13148 + allowedTypes: shared_ALLOWED_MEDIA_TYPES,
13149 + accept: "image/*,video/*",
13150 + onSelect: onSelectMedia,
13151 + onToggleFeaturedImage: toggleUseFeaturedImage,
13152 + useFeaturedImage,
13153 + name: !url ? (0,external_wp_i18n_namespaceObject.__)("Add media") : (0,external_wp_i18n_namespaceObject.__)("Replace"),
13154 + onReset: onClearMedia
13155 + }
13156 + ) })
13157 + ] });
13158 + }
13159 +
13160 +
13161 + ;// ./node_modules/@wordpress/block-library/build-module/cover/edit/cover-placeholder.js
13162 +
13163 +
13164 +
13165 +
13166 +
13167 + function CoverPlaceholder({
13168 + disableMediaButtons = false,
13169 + children,
13170 + onSelectMedia,
13171 + onError,
13172 + style,
13173 + toggleUseFeaturedImage
13174 + }) {
13175 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
13176 + external_wp_blockEditor_namespaceObject.MediaPlaceholder,
13177 + {
13178 + icon: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockIcon, { icon: cover_default }),
13179 + labels: {
13180 + title: (0,external_wp_i18n_namespaceObject.__)("Cover")
13181 + },
13182 + onSelect: onSelectMedia,
13183 + accept: "image/*,video/*",
13184 + allowedTypes: shared_ALLOWED_MEDIA_TYPES,
13185 + disableMediaButtons,
13186 + onToggleFeaturedImage: toggleUseFeaturedImage,
13187 + onError,
13188 + style,
13189 + children
13190 + }
13191 + );
13192 + }
13193 +
13194 +
13195 + ;// ./node_modules/@wordpress/block-library/build-module/cover/edit/resizable-cover-popover.js
13196 +
13197 +
13198 +
13199 +
13200 +
13201 + const RESIZABLE_BOX_ENABLE_OPTION = {
13202 + top: false,
13203 + right: false,
13204 + bottom: true,
13205 + left: false,
13206 + topRight: false,
13207 + bottomRight: false,
13208 + bottomLeft: false,
13209 + topLeft: false
13210 + };
13211 + const { ResizableBoxPopover } = unlock(external_wp_blockEditor_namespaceObject.privateApis);
13212 + function ResizableCoverPopover({
13213 + className,
13214 + height,
13215 + minHeight,
13216 + onResize,
13217 + onResizeStart,
13218 + onResizeStop,
13219 + showHandle,
13220 + size,
13221 + width,
13222 + ...props
13223 + }) {
13224 + const [isResizing, setIsResizing] = (0,external_wp_element_namespaceObject.useState)(false);
13225 + const resizableBoxProps = {
13226 + className: dist_clsx(className, { "is-resizing": isResizing }),
13227 + enable: RESIZABLE_BOX_ENABLE_OPTION,
13228 + onResizeStart: (_event, _direction, elt) => {
13229 + onResizeStart(elt.clientHeight);
13230 + onResize(elt.clientHeight);
13231 + },
13232 + onResize: (_event, _direction, elt) => {
13233 + onResize(elt.clientHeight);
13234 + if (!isResizing) {
13235 + setIsResizing(true);
13236 + }
13237 + },
13238 + onResizeStop: (_event, _direction, elt) => {
13239 + onResizeStop(elt.clientHeight);
13240 + setIsResizing(false);
13241 + },
13242 + showHandle,
13243 + size,
13244 + __experimentalShowTooltip: true,
13245 + __experimentalTooltipProps: {
13246 + axis: "y",
13247 + position: "bottom",
13248 + isVisible: isResizing
13249 + }
13250 + };
13251 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
13252 + ResizableBoxPopover,
13253 + {
13254 + className: "block-library-cover__resizable-box-popover",
13255 + resizableBoxProps,
13256 + ...props
13257 + }
13258 + );
13259 + }
13260 +
13261 +
13262 + ;// ./node_modules/colord/index.mjs
13263 + var colord_r={grad:.9,turn:360,rad:360/(2*Math.PI)},t=function(r){return"string"==typeof r?r.length>0:"number"==typeof r},n=function(r,t,n){return void 0===t&&(t=0),void 0===n&&(n=Math.pow(10,t)),Math.round(n*r)/n+0},e=function(r,t,n){return void 0===t&&(t=0),void 0===n&&(n=1),r>n?n:r>t?r:t},u=function(r){return(r=isFinite(r)?r%360:0)>0?r:r+360},a=function(r){return{r:e(r.r,0,255),g:e(r.g,0,255),b:e(r.b,0,255),a:e(r.a)}},o=function(r){return{r:n(r.r),g:n(r.g),b:n(r.b),a:n(r.a,3)}},i=/^#([0-9a-f]{3,8})$/i,s=function(r){var t=r.toString(16);return t.length<2?"0"+t:t},h=function(r){var t=r.r,n=r.g,e=r.b,u=r.a,a=Math.max(t,n,e),o=a-Math.min(t,n,e),i=o?a===t?(n-e)/o:a===n?2+(e-t)/o:4+(t-n)/o:0;return{h:60*(i<0?i+6:i),s:a?o/a*100:0,v:a/255*100,a:u}},b=function(r){var t=r.h,n=r.s,e=r.v,u=r.a;t=t/360*6,n/=100,e/=100;var a=Math.floor(t),o=e*(1-n),i=e*(1-(t-a)*n),s=e*(1-(1-t+a)*n),h=a%6;return{r:255*[e,i,o,o,s,e][h],g:255*[s,e,e,i,o,o][h],b:255*[o,o,s,e,e,i][h],a:u}},g=function(r){return{h:u(r.h),s:e(r.s,0,100),l:e(r.l,0,100),a:e(r.a)}},d=function(r){return{h:n(r.h),s:n(r.s),l:n(r.l),a:n(r.a,3)}},f=function(r){return b((n=(t=r).s,{h:t.h,s:(n*=((e=t.l)<50?e:100-e)/100)>0?2*n/(e+n)*100:0,v:e+n,a:t.a}));var t,n,e},c=function(r){return{h:(t=h(r)).h,s:(u=(200-(n=t.s))*(e=t.v)/100)>0&&u<200?n*e/100/(u<=100?u:200-u)*100:0,l:u/2,a:t.a};var t,n,e,u},l=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,p=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,v=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,m=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,y={string:[[function(r){var t=i.exec(r);return t?(r=t[1]).length<=4?{r:parseInt(r[0]+r[0],16),g:parseInt(r[1]+r[1],16),b:parseInt(r[2]+r[2],16),a:4===r.length?n(parseInt(r[3]+r[3],16)/255,2):1}:6===r.length||8===r.length?{r:parseInt(r.substr(0,2),16),g:parseInt(r.substr(2,2),16),b:parseInt(r.substr(4,2),16),a:8===r.length?n(parseInt(r.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(r){var t=v.exec(r)||m.exec(r);return t?t[2]!==t[4]||t[4]!==t[6]?null:a({r:Number(t[1])/(t[2]?100/255:1),g:Number(t[3])/(t[4]?100/255:1),b:Number(t[5])/(t[6]?100/255:1),a:void 0===t[7]?1:Number(t[7])/(t[8]?100:1)}):null},"rgb"],[function(t){var n=l.exec(t)||p.exec(t);if(!n)return null;var e,u,a=g({h:(e=n[1],u=n[2],void 0===u&&(u="deg"),Number(e)*(colord_r[u]||1)),s:Number(n[3]),l:Number(n[4]),a:void 0===n[5]?1:Number(n[5])/(n[6]?100:1)});return f(a)},"hsl"]],object:[[function(r){var n=r.r,e=r.g,u=r.b,o=r.a,i=void 0===o?1:o;return t(n)&&t(e)&&t(u)?a({r:Number(n),g:Number(e),b:Number(u),a:Number(i)}):null},"rgb"],[function(r){var n=r.h,e=r.s,u=r.l,a=r.a,o=void 0===a?1:a;if(!t(n)||!t(e)||!t(u))return null;var i=g({h:Number(n),s:Number(e),l:Number(u),a:Number(o)});return f(i)},"hsl"],[function(r){var n=r.h,a=r.s,o=r.v,i=r.a,s=void 0===i?1:i;if(!t(n)||!t(a)||!t(o))return null;var h=function(r){return{h:u(r.h),s:e(r.s,0,100),v:e(r.v,0,100),a:e(r.a)}}({h:Number(n),s:Number(a),v:Number(o),a:Number(s)});return b(h)},"hsv"]]},N=function(r,t){for(var n=0;n<t.length;n++){var e=t[n][0](r);if(e)return[e,t[n][1]]}return[null,void 0]},x=function(r){return"string"==typeof r?N(r.trim(),y.string):"object"==typeof r&&null!==r?N(r,y.object):[null,void 0]},I=function(r){return x(r)[1]},M=function(r,t){var n=c(r);return{h:n.h,s:e(n.s+100*t,0,100),l:n.l,a:n.a}},H=function(r){return(299*r.r+587*r.g+114*r.b)/1e3/255},$=function(r,t){var n=c(r);return{h:n.h,s:n.s,l:e(n.l+100*t,0,100),a:n.a}},j=function(){function r(r){this.parsed=x(r)[0],this.rgba=this.parsed||{r:0,g:0,b:0,a:1}}return r.prototype.isValid=function(){return null!==this.parsed},r.prototype.brightness=function(){return n(H(this.rgba),2)},r.prototype.isDark=function(){return H(this.rgba)<.5},r.prototype.isLight=function(){return H(this.rgba)>=.5},r.prototype.toHex=function(){return r=o(this.rgba),t=r.r,e=r.g,u=r.b,i=(a=r.a)<1?s(n(255*a)):"","#"+s(t)+s(e)+s(u)+i;var r,t,e,u,a,i},r.prototype.toRgb=function(){return o(this.rgba)},r.prototype.toRgbString=function(){return r=o(this.rgba),t=r.r,n=r.g,e=r.b,(u=r.a)<1?"rgba("+t+", "+n+", "+e+", "+u+")":"rgb("+t+", "+n+", "+e+")";var r,t,n,e,u},r.prototype.toHsl=function(){return d(c(this.rgba))},r.prototype.toHslString=function(){return r=d(c(this.rgba)),t=r.h,n=r.s,e=r.l,(u=r.a)<1?"hsla("+t+", "+n+"%, "+e+"%, "+u+")":"hsl("+t+", "+n+"%, "+e+"%)";var r,t,n,e,u},r.prototype.toHsv=function(){return r=h(this.rgba),{h:n(r.h),s:n(r.s),v:n(r.v),a:n(r.a,3)};var r},r.prototype.invert=function(){return w({r:255-(r=this.rgba).r,g:255-r.g,b:255-r.b,a:r.a});var r},r.prototype.saturate=function(r){return void 0===r&&(r=.1),w(M(this.rgba,r))},r.prototype.desaturate=function(r){return void 0===r&&(r=.1),w(M(this.rgba,-r))},r.prototype.grayscale=function(){return w(M(this.rgba,-1))},r.prototype.lighten=function(r){return void 0===r&&(r=.1),w($(this.rgba,r))},r.prototype.darken=function(r){return void 0===r&&(r=.1),w($(this.rgba,-r))},r.prototype.rotate=function(r){return void 0===r&&(r=15),this.hue(this.hue()+r)},r.prototype.alpha=function(r){return"number"==typeof r?w({r:(t=this.rgba).r,g:t.g,b:t.b,a:r}):n(this.rgba.a,3);var t},r.prototype.hue=function(r){var t=c(this.rgba);return"number"==typeof r?w({h:r,s:t.s,l:t.l,a:t.a}):n(t.h)},r.prototype.isEqual=function(r){return this.toHex()===w(r).toHex()},r}(),w=function(r){return r instanceof j?r:new j(r)},S=[],k=function(r){r.forEach(function(r){S.indexOf(r)<0&&(r(j,y),S.push(r))})},E=function(){return new j({r:255*Math.random(),g:255*Math.random(),b:255*Math.random()})};
13264 +
13265 + ;// ./node_modules/colord/plugins/names.mjs
13266 + /* harmony default export */ function names(e,f){var a={white:"#ffffff",bisque:"#ffe4c4",blue:"#0000ff",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",antiquewhite:"#faebd7",aqua:"#00ffff",azure:"#f0ffff",whitesmoke:"#f5f5f5",papayawhip:"#ffefd5",plum:"#dda0dd",blanchedalmond:"#ffebcd",black:"#000000",gold:"#ffd700",goldenrod:"#daa520",gainsboro:"#dcdcdc",cornsilk:"#fff8dc",cornflowerblue:"#6495ed",burlywood:"#deb887",aquamarine:"#7fffd4",beige:"#f5f5dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkkhaki:"#bdb76b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",peachpuff:"#ffdab9",darkmagenta:"#8b008b",darkred:"#8b0000",darkorchid:"#9932cc",darkorange:"#ff8c00",darkslateblue:"#483d8b",gray:"#808080",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",deeppink:"#ff1493",deepskyblue:"#00bfff",wheat:"#f5deb3",firebrick:"#b22222",floralwhite:"#fffaf0",ghostwhite:"#f8f8ff",darkviolet:"#9400d3",magenta:"#ff00ff",green:"#008000",dodgerblue:"#1e90ff",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",blueviolet:"#8a2be2",forestgreen:"#228b22",lawngreen:"#7cfc00",indianred:"#cd5c5c",indigo:"#4b0082",fuchsia:"#ff00ff",brown:"#a52a2a",maroon:"#800000",mediumblue:"#0000cd",lightcoral:"#f08080",darkturquoise:"#00ced1",lightcyan:"#e0ffff",ivory:"#fffff0",lightyellow:"#ffffe0",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",linen:"#faf0e6",mediumaquamarine:"#66cdaa",lemonchiffon:"#fffacd",lime:"#00ff00",khaki:"#f0e68c",mediumseagreen:"#3cb371",limegreen:"#32cd32",mediumspringgreen:"#00fa9a",lightskyblue:"#87cefa",lightblue:"#add8e6",midnightblue:"#191970",lightpink:"#ffb6c1",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",mintcream:"#f5fffa",lightslategray:"#778899",lightslategrey:"#778899",navajowhite:"#ffdead",navy:"#000080",mediumvioletred:"#c71585",powderblue:"#b0e0e6",palegoldenrod:"#eee8aa",oldlace:"#fdf5e6",paleturquoise:"#afeeee",mediumturquoise:"#48d1cc",mediumorchid:"#ba55d3",rebeccapurple:"#663399",lightsteelblue:"#b0c4de",mediumslateblue:"#7b68ee",thistle:"#d8bfd8",tan:"#d2b48c",orchid:"#da70d6",mediumpurple:"#9370db",purple:"#800080",pink:"#ffc0cb",skyblue:"#87ceeb",springgreen:"#00ff7f",palegreen:"#98fb98",red:"#ff0000",yellow:"#ffff00",slateblue:"#6a5acd",lavenderblush:"#fff0f5",peru:"#cd853f",palevioletred:"#db7093",violet:"#ee82ee",teal:"#008080",slategray:"#708090",slategrey:"#708090",aliceblue:"#f0f8ff",darkseagreen:"#8fbc8f",darkolivegreen:"#556b2f",greenyellow:"#adff2f",seagreen:"#2e8b57",seashell:"#fff5ee",tomato:"#ff6347",silver:"#c0c0c0",sienna:"#a0522d",lavender:"#e6e6fa",lightgreen:"#90ee90",orange:"#ffa500",orangered:"#ff4500",steelblue:"#4682b4",royalblue:"#4169e1",turquoise:"#40e0d0",yellowgreen:"#9acd32",salmon:"#fa8072",saddlebrown:"#8b4513",sandybrown:"#f4a460",rosybrown:"#bc8f8f",darksalmon:"#e9967a",lightgoldenrodyellow:"#fafad2",snow:"#fffafa",lightgrey:"#d3d3d3",lightgray:"#d3d3d3",dimgray:"#696969",dimgrey:"#696969",olivedrab:"#6b8e23",olive:"#808000"},r={};for(var d in a)r[a[d]]=d;var l={};e.prototype.toName=function(f){if(!(this.rgba.a||this.rgba.r||this.rgba.g||this.rgba.b))return"transparent";var d,i,n=r[this.toHex()];if(n)return n;if(null==f?void 0:f.closest){var o=this.toRgb(),t=1/0,b="black";if(!l.length)for(var c in a)l[c]=new e(a[c]).toRgb();for(var g in a){var u=(d=o,i=l[g],Math.pow(d.r-i.r,2)+Math.pow(d.g-i.g,2)+Math.pow(d.b-i.b,2));u<t&&(t=u,b=g)}return b}};f.string.push([function(f){var r=f.toLowerCase(),d="transparent"===r?"#0000":a[r];return d?new e(d).toRgb():null},"name"])}
13267 +
13268 + ;// ./node_modules/fast-average-color/dist/index.esm.js
13269 + /*! Fast Average Color | © 2022 Denis Seleznev | MIT License | https://github.com/fast-average-color/fast-average-color */
13270 + function toHex(num) {
13271 + var str = num.toString(16);
13272 + return str.length === 1 ? '0' + str : str;
13273 + }
13274 + function arrayToHex(arr) {
13275 + return '#' + arr.map(toHex).join('');
13276 + }
13277 + function isDark(color) {
13278 + // http://www.w3.org/TR/AERT#color-contrast
13279 + var result = (color[0] * 299 + color[1] * 587 + color[2] * 114) / 1000;
13280 + return result < 128;
13281 + }
13282 + function prepareIgnoredColor(color) {
13283 + if (!color) {
13284 + return [];
13285 + }
13286 + return isRGBArray(color) ? color : [color];
13287 + }
13288 + function isRGBArray(value) {
13289 + return Array.isArray(value[0]);
13290 + }
13291 + function isIgnoredColor(data, index, ignoredColor) {
13292 + for (var i = 0; i < ignoredColor.length; i++) {
13293 + if (isIgnoredColorAsNumbers(data, index, ignoredColor[i])) {
13294 + return true;
13295 + }
13296 + }
13297 + return false;
13298 + }
13299 + function isIgnoredColorAsNumbers(data, index, ignoredColor) {
13300 + switch (ignoredColor.length) {
13301 + case 3:
13302 + // [red, green, blue]
13303 + if (isIgnoredRGBColor(data, index, ignoredColor)) {
13304 + return true;
13305 + }
13306 + break;
13307 + case 4:
13308 + // [red, green, blue, alpha]
13309 + if (isIgnoredRGBAColor(data, index, ignoredColor)) {
13310 + return true;
13311 + }
13312 + break;
13313 + case 5:
13314 + // [red, green, blue, alpha, threshold]
13315 + if (isIgnoredRGBAColorWithThreshold(data, index, ignoredColor)) {
13316 + return true;
13317 + }
13318 + break;
13319 + default:
13320 + return false;
13321 + }
13322 + }
13323 + function isIgnoredRGBColor(data, index, ignoredColor) {
13324 + // Ignore if the pixel are transparent.
13325 + if (data[index + 3] !== 255) {
13326 + return true;
13327 + }
13328 + if (data[index] === ignoredColor[0] &&
13329 + data[index + 1] === ignoredColor[1] &&
13330 + data[index + 2] === ignoredColor[2]) {
13331 + return true;
13332 + }
13333 + return false;
13334 + }
13335 + function isIgnoredRGBAColor(data, index, ignoredColor) {
13336 + if (data[index + 3] && ignoredColor[3]) {
13337 + return data[index] === ignoredColor[0] &&
13338 + data[index + 1] === ignoredColor[1] &&
13339 + data[index + 2] === ignoredColor[2] &&
13340 + data[index + 3] === ignoredColor[3];
13341 + }
13342 + // Ignore rgb components if the pixel are fully transparent.
13343 + return data[index + 3] === ignoredColor[3];
13344 + }
13345 + function inRange(colorComponent, ignoredColorComponent, value) {
13346 + return colorComponent >= (ignoredColorComponent - value) &&
13347 + colorComponent <= (ignoredColorComponent + value);
13348 + }
13349 + function isIgnoredRGBAColorWithThreshold(data, index, ignoredColor) {
13350 + var redIgnored = ignoredColor[0];
13351 + var greenIgnored = ignoredColor[1];
13352 + var blueIgnored = ignoredColor[2];
13353 + var alphaIgnored = ignoredColor[3];
13354 + var threshold = ignoredColor[4];
13355 + var alphaData = data[index + 3];
13356 + var alphaInRange = inRange(alphaData, alphaIgnored, threshold);
13357 + if (!alphaIgnored) {
13358 + return alphaInRange;
13359 + }
13360 + if (!alphaData && alphaInRange) {
13361 + return true;
13362 + }
13363 + if (inRange(data[index], redIgnored, threshold) &&
13364 + inRange(data[index + 1], greenIgnored, threshold) &&
13365 + inRange(data[index + 2], blueIgnored, threshold) &&
13366 + alphaInRange) {
13367 + return true;
13368 + }
13369 + return false;
13370 + }
13371 +
13372 + function dominantAlgorithm(arr, len, options) {
13373 + var colorHash = {};
13374 + var divider = 24;
13375 + var ignoredColor = options.ignoredColor;
13376 + var step = options.step;
13377 + var max = [0, 0, 0, 0, 0];
13378 + for (var i = 0; i < len; i += step) {
13379 + var red = arr[i];
13380 + var green = arr[i + 1];
13381 + var blue = arr[i + 2];
13382 + var alpha = arr[i + 3];
13383 + if (ignoredColor && isIgnoredColor(arr, i, ignoredColor)) {
13384 + continue;
13385 + }
13386 + var key = Math.round(red / divider) + ',' +
13387 + Math.round(green / divider) + ',' +
13388 + Math.round(blue / divider);
13389 + if (colorHash[key]) {
13390 + colorHash[key] = [
13391 + colorHash[key][0] + red * alpha,
13392 + colorHash[key][1] + green * alpha,
13393 + colorHash[key][2] + blue * alpha,
13394 + colorHash[key][3] + alpha,
13395 + colorHash[key][4] + 1
13396 + ];
13397 + }
13398 + else {
13399 + colorHash[key] = [red * alpha, green * alpha, blue * alpha, alpha, 1];
13400 + }
13401 + if (max[4] < colorHash[key][4]) {
13402 + max = colorHash[key];
13403 + }
13404 + }
13405 + var redTotal = max[0];
13406 + var greenTotal = max[1];
13407 + var blueTotal = max[2];
13408 + var alphaTotal = max[3];
13409 + var count = max[4];
13410 + return alphaTotal ? [
13411 + Math.round(redTotal / alphaTotal),
13412 + Math.round(greenTotal / alphaTotal),
13413 + Math.round(blueTotal / alphaTotal),
13414 + Math.round(alphaTotal / count)
13415 + ] : options.defaultColor;
13416 + }
13417 +
13418 + function simpleAlgorithm(arr, len, options) {
13419 + var redTotal = 0;
13420 + var greenTotal = 0;
13421 + var blueTotal = 0;
13422 + var alphaTotal = 0;
13423 + var count = 0;
13424 + var ignoredColor = options.ignoredColor;
13425 + var step = options.step;
13426 + for (var i = 0; i < len; i += step) {
13427 + var alpha = arr[i + 3];
13428 + var red = arr[i] * alpha;
13429 + var green = arr[i + 1] * alpha;
13430 + var blue = arr[i + 2] * alpha;
13431 + if (ignoredColor && isIgnoredColor(arr, i, ignoredColor)) {
13432 + continue;
13433 + }
13434 + redTotal += red;
13435 + greenTotal += green;
13436 + blueTotal += blue;
13437 + alphaTotal += alpha;
13438 + count++;
13439 + }
13440 + return alphaTotal ? [
13441 + Math.round(redTotal / alphaTotal),
13442 + Math.round(greenTotal / alphaTotal),
13443 + Math.round(blueTotal / alphaTotal),
13444 + Math.round(alphaTotal / count)
13445 + ] : options.defaultColor;
13446 + }
13447 +
13448 + function sqrtAlgorithm(arr, len, options) {
13449 + var redTotal = 0;
13450 + var greenTotal = 0;
13451 + var blueTotal = 0;
13452 + var alphaTotal = 0;
13453 + var count = 0;
13454 + var ignoredColor = options.ignoredColor;
13455 + var step = options.step;
13456 + for (var i = 0; i < len; i += step) {
13457 + var red = arr[i];
13458 + var green = arr[i + 1];
13459 + var blue = arr[i + 2];
13460 + var alpha = arr[i + 3];
13461 + if (ignoredColor && isIgnoredColor(arr, i, ignoredColor)) {
13462 + continue;
13463 + }
13464 + redTotal += red * red * alpha;
13465 + greenTotal += green * green * alpha;
13466 + blueTotal += blue * blue * alpha;
13467 + alphaTotal += alpha;
13468 + count++;
13469 + }
13470 + return alphaTotal ? [
13471 + Math.round(Math.sqrt(redTotal / alphaTotal)),
13472 + Math.round(Math.sqrt(greenTotal / alphaTotal)),
13473 + Math.round(Math.sqrt(blueTotal / alphaTotal)),
13474 + Math.round(alphaTotal / count)
13475 + ] : options.defaultColor;
13476 + }
13477 +
13478 + function getDefaultColor(options) {
13479 + return getOption(options, 'defaultColor', [0, 0, 0, 0]);
13480 + }
13481 + function getOption(options, name, defaultValue) {
13482 + return (options[name] === undefined ? defaultValue : options[name]);
13483 + }
13484 +
13485 + var MIN_SIZE = 10;
13486 + var MAX_SIZE = 100;
13487 + function isSvg(filename) {
13488 + return filename.search(/\.svg(\?|$)/i) !== -1;
13489 + }
13490 + function getOriginalSize(resource) {
13491 + if (isInstanceOfHTMLImageElement(resource)) {
13492 + var width = resource.naturalWidth;
13493 + var height = resource.naturalHeight;
13494 + // For SVG images with only viewBox attribute
13495 + if (!resource.naturalWidth && isSvg(resource.src)) {
13496 + width = height = MAX_SIZE;
13497 + }
13498 + return {
13499 + width: width,
13500 + height: height,
13501 + };
13502 + }
13503 + if (isInstanceOfHTMLVideoElement(resource)) {
13504 + return {
13505 + width: resource.videoWidth,
13506 + height: resource.videoHeight
13507 + };
13508 + }
13509 + return {
13510 + width: resource.width,
13511 + height: resource.height
13512 + };
13513 + }
13514 + function getSrc(resource) {
13515 + if (isInstanceOfHTMLCanvasElement(resource)) {
13516 + return 'canvas';
13517 + }
13518 + if (isInstanceOfOffscreenCanvas(resource)) {
13519 + return 'offscreencanvas';
13520 + }
13521 + if (isInstanceOfImageBitmap(resource)) {
13522 + return 'imagebitmap';
13523 + }
13524 + return resource.src;
13525 + }
13526 + function isInstanceOfHTMLImageElement(resource) {
13527 + return typeof HTMLImageElement !== 'undefined' && resource instanceof HTMLImageElement;
13528 + }
13529 + var hasOffscreenCanvas = typeof OffscreenCanvas !== 'undefined';
13530 + function isInstanceOfOffscreenCanvas(resource) {
13531 + return hasOffscreenCanvas && resource instanceof OffscreenCanvas;
13532 + }
13533 + function isInstanceOfHTMLVideoElement(resource) {
13534 + return typeof HTMLVideoElement !== 'undefined' && resource instanceof HTMLVideoElement;
13535 + }
13536 + function isInstanceOfHTMLCanvasElement(resource) {
13537 + return typeof HTMLCanvasElement !== 'undefined' && resource instanceof HTMLCanvasElement;
13538 + }
13539 + function isInstanceOfImageBitmap(resource) {
13540 + return typeof ImageBitmap !== 'undefined' && resource instanceof ImageBitmap;
13541 + }
13542 + function prepareSizeAndPosition(originalSize, options) {
13543 + var srcLeft = getOption(options, 'left', 0);
13544 + var srcTop = getOption(options, 'top', 0);
13545 + var srcWidth = getOption(options, 'width', originalSize.width);
13546 + var srcHeight = getOption(options, 'height', originalSize.height);
13547 + var destWidth = srcWidth;
13548 + var destHeight = srcHeight;
13549 + if (options.mode === 'precision') {
13550 + return {
13551 + srcLeft: srcLeft,
13552 + srcTop: srcTop,
13553 + srcWidth: srcWidth,
13554 + srcHeight: srcHeight,
13555 + destWidth: destWidth,
13556 + destHeight: destHeight
13557 + };
13558 + }
13559 + var factor;
13560 + if (srcWidth > srcHeight) {
13561 + factor = srcWidth / srcHeight;
13562 + destWidth = MAX_SIZE;
13563 + destHeight = Math.round(destWidth / factor);
13564 + }
13565 + else {
13566 + factor = srcHeight / srcWidth;
13567 + destHeight = MAX_SIZE;
13568 + destWidth = Math.round(destHeight / factor);
13569 + }
13570 + if (destWidth > srcWidth || destHeight > srcHeight ||
13571 + destWidth < MIN_SIZE || destHeight < MIN_SIZE) {
13572 + destWidth = srcWidth;
13573 + destHeight = srcHeight;
13574 + }
13575 + return {
13576 + srcLeft: srcLeft,
13577 + srcTop: srcTop,
13578 + srcWidth: srcWidth,
13579 + srcHeight: srcHeight,
13580 + destWidth: destWidth,
13581 + destHeight: destHeight
13582 + };
13583 + }
13584 + var isWebWorkers = typeof window === 'undefined';
13585 + function makeCanvas() {
13586 + if (isWebWorkers) {
13587 + return hasOffscreenCanvas ? new OffscreenCanvas(1, 1) : null;
13588 + }
13589 + return document.createElement('canvas');
13590 + }
13591 +
13592 + var ERROR_PREFIX = 'FastAverageColor: ';
13593 + function getError(message) {
13594 + return Error(ERROR_PREFIX + message);
13595 + }
13596 + function outputError(error, silent) {
13597 + if (!silent) {
13598 + console.error(error);
13599 + }
13600 + }
13601 +
13602 + var FastAverageColor = /** @class */ (function () {
13603 + function FastAverageColor() {
13604 + this.canvas = null;
13605 + this.ctx = null;
13606 + }
13607 + /**
13608 + * Get asynchronously the average color from not loaded image.
13609 + */
13610 + FastAverageColor.prototype.getColorAsync = function (resource, options) {
13611 + if (!resource) {
13612 + return Promise.reject(getError('call .getColorAsync() without resource.'));
13613 + }
13614 + if (typeof resource === 'string') {
13615 + // Web workers
13616 + if (typeof Image === 'undefined') {
13617 + return Promise.reject(getError('resource as string is not supported in this environment'));
13618 + }
13619 + var img = new Image();
13620 + img.crossOrigin = options && options.crossOrigin || '';
13621 + img.src = resource;
13622 + return this.bindImageEvents(img, options);
13623 + }
13624 + else if (isInstanceOfHTMLImageElement(resource) && !resource.complete) {
13625 + return this.bindImageEvents(resource, options);
13626 + }
13627 + else {
13628 + var result = this.getColor(resource, options);
13629 + return result.error ? Promise.reject(result.error) : Promise.resolve(result);
13630 + }
13631 + };
13632 + /**
13633 + * Get the average color from images, videos and canvas.
13634 + */
13635 + FastAverageColor.prototype.getColor = function (resource, options) {
13636 + options = options || {};
13637 + var defaultColor = getDefaultColor(options);
13638 + if (!resource) {
13639 + var error = getError('call .getColor(null) without resource');
13640 + outputError(error, options.silent);
13641 + return this.prepareResult(defaultColor, error);
13642 + }
13643 + var originalSize = getOriginalSize(resource);
13644 + var size = prepareSizeAndPosition(originalSize, options);
13645 + if (!size.srcWidth || !size.srcHeight || !size.destWidth || !size.destHeight) {
13646 + var error = getError("incorrect sizes for resource \"".concat(getSrc(resource), "\""));
13647 + outputError(error, options.silent);
13648 + return this.prepareResult(defaultColor, error);
13649 + }
13650 + if (!this.canvas) {
13651 + this.canvas = makeCanvas();
13652 + if (!this.canvas) {
13653 + var error = getError('OffscreenCanvas is not supported in this browser');
13654 + outputError(error, options.silent);
13655 + return this.prepareResult(defaultColor, error);
13656 + }
13657 + }
13658 + if (!this.ctx) {
13659 + this.ctx = this.canvas.getContext('2d', { willReadFrequently: true });
13660 + if (!this.ctx) {
13661 + var error = getError('Canvas Context 2D is not supported in this browser');
13662 + outputError(error, options.silent);
13663 + return this.prepareResult(defaultColor);
13664 + }
13665 + this.ctx.imageSmoothingEnabled = false;
13666 + }
13667 + this.canvas.width = size.destWidth;
13668 + this.canvas.height = size.destHeight;
13669 + try {
13670 + this.ctx.clearRect(0, 0, size.destWidth, size.destHeight);
13671 + this.ctx.drawImage(resource, size.srcLeft, size.srcTop, size.srcWidth, size.srcHeight, 0, 0, size.destWidth, size.destHeight);
13672 + var bitmapData = this.ctx.getImageData(0, 0, size.destWidth, size.destHeight).data;
13673 + return this.prepareResult(this.getColorFromArray4(bitmapData, options));
13674 + }
13675 + catch (originalError) {
13676 + var error = getError("security error (CORS) for resource ".concat(getSrc(resource), ".\nDetails: https://developer.mozilla.org/en/docs/Web/HTML/CORS_enabled_image"));
13677 + outputError(error, options.silent);
13678 + !options.silent && console.error(originalError);
13679 + return this.prepareResult(defaultColor, error);
13680 + }
13681 + };
13682 + /**
13683 + * Get the average color from a array when 1 pixel is 4 bytes.
13684 + */
13685 + FastAverageColor.prototype.getColorFromArray4 = function (arr, options) {
13686 + options = options || {};
13687 + var bytesPerPixel = 4;
13688 + var arrLength = arr.length;
13689 + var defaultColor = getDefaultColor(options);
13690 + if (arrLength < bytesPerPixel) {
13691 + return defaultColor;
13692 + }
13693 + var len = arrLength - arrLength % bytesPerPixel;
13694 + var step = (options.step || 1) * bytesPerPixel;
13695 + var algorithm;
13696 + switch (options.algorithm || 'sqrt') {
13697 + case 'simple':
13698 + algorithm = simpleAlgorithm;
13699 + break;
13700 + case 'sqrt':
13701 + algorithm = sqrtAlgorithm;
13702 + break;
13703 + case 'dominant':
13704 + algorithm = dominantAlgorithm;
13705 + break;
13706 + default:
13707 + throw getError("".concat(options.algorithm, " is unknown algorithm"));
13708 + }
13709 + return algorithm(arr, len, {
13710 + defaultColor: defaultColor,
13711 + ignoredColor: prepareIgnoredColor(options.ignoredColor),
13712 + step: step
13713 + });
13714 + };
13715 + /**
13716 + * Get color data from value ([r, g, b, a]).
13717 + */
13718 + FastAverageColor.prototype.prepareResult = function (value, error) {
13719 + var rgb = value.slice(0, 3);
13720 + var rgba = [value[0], value[1], value[2], value[3] / 255];
13721 + var isDarkColor = isDark(value);
13722 + return {
13723 + value: [value[0], value[1], value[2], value[3]],
13724 + rgb: 'rgb(' + rgb.join(',') + ')',
13725 + rgba: 'rgba(' + rgba.join(',') + ')',
13726 + hex: arrayToHex(rgb),
13727 + hexa: arrayToHex(value),
13728 + isDark: isDarkColor,
13729 + isLight: !isDarkColor,
13730 + error: error,
13731 + };
13732 + };
13733 + /**
13734 + * Destroy the instance.
13735 + */
13736 + FastAverageColor.prototype.destroy = function () {
13737 + if (this.canvas) {
13738 + this.canvas.width = 1;
13739 + this.canvas.height = 1;
13740 + this.canvas = null;
13741 + }
13742 + this.ctx = null;
13743 + };
13744 + FastAverageColor.prototype.bindImageEvents = function (resource, options) {
13745 + var _this = this;
13746 + return new Promise(function (resolve, reject) {
13747 + var onload = function () {
13748 + unbindEvents();
13749 + var result = _this.getColor(resource, options);
13750 + if (result.error) {
13751 + reject(result.error);
13752 + }
13753 + else {
13754 + resolve(result);
13755 + }
13756 + };
13757 + var onerror = function () {
13758 + unbindEvents();
13759 + reject(getError("Error loading image \"".concat(resource.src, "\".")));
13760 + };
13761 + var onabort = function () {
13762 + unbindEvents();
13763 + reject(getError("Image \"".concat(resource.src, "\" loading aborted")));
13764 + };
13765 + var unbindEvents = function () {
13766 + resource.removeEventListener('load', onload);
13767 + resource.removeEventListener('error', onerror);
13768 + resource.removeEventListener('abort', onabort);
13769 + };
13770 + resource.addEventListener('load', onload);
13771 + resource.addEventListener('error', onerror);
13772 + resource.addEventListener('abort', onabort);
13773 + });
13774 + };
13775 + return FastAverageColor;
13776 + }());
13777 +
13778 +
13779 +
13780 + ;// external ["wp","hooks"]
13781 + const external_wp_hooks_namespaceObject = window["wp"]["hooks"];
13782 + ;// ./node_modules/@wordpress/block-library/build-module/cover/edit/color-utils.js
13783 +
13784 +
13785 +
13786 +
13787 +
13788 + k([names]);
13789 + const DEFAULT_BACKGROUND_COLOR = "#FFF";
13790 + const DEFAULT_OVERLAY_COLOR = "#000";
13791 + function compositeSourceOver(source, dest) {
13792 + return {
13793 + r: source.r * source.a + dest.r * dest.a * (1 - source.a),
13794 + g: source.g * source.a + dest.g * dest.a * (1 - source.a),
13795 + b: source.b * source.a + dest.b * dest.a * (1 - source.a),
13796 + a: source.a + dest.a * (1 - source.a)
13797 + };
13798 + }
13799 + function retrieveFastAverageColor() {
13800 + if (!retrieveFastAverageColor.fastAverageColor) {
13801 + retrieveFastAverageColor.fastAverageColor = new FastAverageColor();
13802 + }
13803 + return retrieveFastAverageColor.fastAverageColor;
13804 + }
13805 + const getMediaColor = memize(async (url) => {
13806 + if (!url) {
13807 + return DEFAULT_BACKGROUND_COLOR;
13808 + }
13809 + const { r, g, b, a } = w(DEFAULT_BACKGROUND_COLOR).toRgb();
13810 + try {
13811 + const imgCrossOrigin = (0,external_wp_hooks_namespaceObject.applyFilters)(
13812 + "media.crossOrigin",
13813 + void 0,
13814 + url
13815 + );
13816 + const color = await retrieveFastAverageColor().getColorAsync(url, {
13817 + // The default color is white, which is the color
13818 + // that is returned if there's an error.
13819 + // colord returns alpga 0-1, FAC needs 0-255
13820 + defaultColor: [r, g, b, a * 255],
13821 + // Errors that come up don't reject the promise,
13822 + // so error logging has to be silenced
13823 + // with this option.
13824 + silent: "production" === "production",
13825 + crossOrigin: imgCrossOrigin
13826 + });
13827 + return color.hex;
13828 + } catch (error) {
13829 + return DEFAULT_BACKGROUND_COLOR;
13830 + }
13831 + });
13832 + function compositeIsDark(dimRatio, overlayColor, backgroundColor) {
13833 + if (overlayColor === backgroundColor || dimRatio === 100) {
13834 + return w(overlayColor).isDark();
13835 + }
13836 + const overlay = w(overlayColor).alpha(dimRatio / 100).toRgb();
13837 + const background = w(backgroundColor).toRgb();
13838 + const composite = compositeSourceOver(overlay, background);
13839 + return w(composite).isDark();
13840 + }
13841 +
13842 +
13843 + ;// ./node_modules/@wordpress/block-library/build-module/cover/edit/index.js
13844 +
13845 +
13846 +
13847 +
13848 +
13849 +
13850 +
13851 +
13852 +
13853 +
13854 +
13855 +
13856 +
13857 +
13858 +
13859 +
13860 +
13861 +
13862 + function getInnerBlocksTemplate(attributes) {
13863 + return [
13864 + [
13865 + "core/paragraph",
13866 + {
13867 + align: "center",
13868 + placeholder: (0,external_wp_i18n_namespaceObject.__)("Write title\u2026"),
13869 + ...attributes
13870 + }
13871 + ]
13872 + ];
13873 + }
13874 + const isTemporaryMedia = (id, url) => !id && (0,external_wp_blob_namespaceObject.isBlobURL)(url);
13875 + function CoverEdit({
13876 + attributes,
13877 + clientId,
13878 + isSelected,
13879 + overlayColor,
13880 + setAttributes,
13881 + setOverlayColor,
13882 + toggleSelection,
13883 + context: { postId, postType }
13884 + }) {
13885 + const {
13886 + contentPosition,
13887 + id,
13888 + url: originalUrl,
13889 + backgroundType: originalBackgroundType,
13890 + useFeaturedImage,
13891 + dimRatio,
13892 + focalPoint,
13893 + hasParallax,
13894 + isDark,
13895 + isRepeated,
13896 + minHeight,
13897 + minHeightUnit,
13898 + alt,
13899 + allowedBlocks,
13900 + templateLock,
13901 + tagName: TagName = "div",
13902 + isUserOverlayColor,
13903 + sizeSlug,
13904 + poster
13905 + } = attributes;
13906 + const [featuredImage] = (0,external_wp_coreData_namespaceObject.useEntityProp)(
13907 + "postType",
13908 + postType,
13909 + "featured_media",
13910 + postId
13911 + );
13912 + const { getSettings } = (0,external_wp_data_namespaceObject.useSelect)(external_wp_blockEditor_namespaceObject.store);
13913 + const { __unstableMarkNextChangeAsNotPersistent } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_blockEditor_namespaceObject.store);
13914 + const { media } = (0,external_wp_data_namespaceObject.useSelect)(
13915 + (select) => {
13916 + return {
13917 + media: featuredImage && useFeaturedImage ? select(external_wp_coreData_namespaceObject.store).getEntityRecord(
13918 + "postType",
13919 + "attachment",
13920 + featuredImage,
13921 + {
13922 + context: "view"
13923 + }
13924 + ) : void 0
13925 + };
13926 + },
13927 + [featuredImage, useFeaturedImage]
13928 + );
13929 + const mediaUrl = media?.media_details?.sizes?.[sizeSlug]?.source_url ?? media?.source_url;
13930 + (0,external_wp_element_namespaceObject.useEffect)(() => {
13931 + (async () => {
13932 + if (!useFeaturedImage) {
13933 + return;
13934 + }
13935 + const averageBackgroundColor = await getMediaColor(mediaUrl);
13936 + let newOverlayColor = overlayColor.color;
13937 + if (!isUserOverlayColor) {
13938 + newOverlayColor = averageBackgroundColor;
13939 + __unstableMarkNextChangeAsNotPersistent();
13940 + setOverlayColor(newOverlayColor);
13941 + }
13942 + const newIsDark = compositeIsDark(
13943 + dimRatio,
13944 + newOverlayColor,
13945 + averageBackgroundColor
13946 + );
13947 + __unstableMarkNextChangeAsNotPersistent();
13948 + setAttributes({
13949 + isDark: newIsDark,
13950 + isUserOverlayColor: isUserOverlayColor || false
13951 + });
13952 + })();
13953 + }, [mediaUrl]);
13954 + const url = useFeaturedImage ? mediaUrl : (
13955 + // Ensure the url is not malformed due to sanitization through `wp_kses`.
13956 + originalUrl?.replaceAll("&amp;", "&")
13957 + );
13958 + const backgroundType = useFeaturedImage ? IMAGE_BACKGROUND_TYPE : originalBackgroundType;
13959 + const { createErrorNotice } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_notices_namespaceObject.store);
13960 + const { gradientClass, gradientValue } = (0,external_wp_blockEditor_namespaceObject.__experimentalUseGradient)();
13961 + const onSelectMedia = async (newMedia) => {
13962 + const mediaAttributes = attributesFromMedia(newMedia);
13963 + const isImage = [newMedia?.type, newMedia?.media_type].includes(
13964 + IMAGE_BACKGROUND_TYPE
13965 + );
13966 + const averageBackgroundColor = await getMediaColor(
13967 + isImage ? newMedia?.url : void 0
13968 + );
13969 + let newOverlayColor = overlayColor.color;
13970 + if (!isUserOverlayColor) {
13971 + newOverlayColor = averageBackgroundColor;
13972 + setOverlayColor(newOverlayColor);
13973 + __unstableMarkNextChangeAsNotPersistent();
13974 + }
13975 + const newDimRatio = originalUrl === void 0 && dimRatio === 100 ? 50 : dimRatio;
13976 + const newIsDark = compositeIsDark(
13977 + newDimRatio,
13978 + newOverlayColor,
13979 + averageBackgroundColor
13980 + );
13981 + if (backgroundType === IMAGE_BACKGROUND_TYPE && mediaAttributes?.id) {
13982 + const { imageDefaultSize } = getSettings();
13983 + if (sizeSlug && (newMedia?.sizes?.[sizeSlug] || newMedia?.media_details?.sizes?.[sizeSlug])) {
13984 + mediaAttributes.sizeSlug = sizeSlug;
13985 + mediaAttributes.url = newMedia?.sizes?.[sizeSlug]?.url || newMedia?.media_details?.sizes?.[sizeSlug]?.source_url;
13986 + } else if (newMedia?.sizes?.[imageDefaultSize] || newMedia?.media_details?.sizes?.[imageDefaultSize]) {
13987 + mediaAttributes.sizeSlug = imageDefaultSize;
13988 + mediaAttributes.url = newMedia?.sizes?.[imageDefaultSize]?.url || newMedia?.media_details?.sizes?.[imageDefaultSize]?.source_url;
13989 + } else {
13990 + mediaAttributes.sizeSlug = DEFAULT_MEDIA_SIZE_SLUG;
13991 + }
13992 + }
13993 + setAttributes({
13994 + ...mediaAttributes,
13995 + focalPoint: void 0,
13996 + useFeaturedImage: void 0,
13997 + dimRatio: newDimRatio,
13998 + isDark: newIsDark,
13999 + isUserOverlayColor: isUserOverlayColor || false
14000 + });
14001 + };
14002 + const onClearMedia = () => {
14003 + let newOverlayColor = overlayColor.color;
14004 + if (!isUserOverlayColor) {
14005 + newOverlayColor = DEFAULT_OVERLAY_COLOR;
14006 + setOverlayColor(void 0);
14007 + __unstableMarkNextChangeAsNotPersistent();
14008 + }
14009 + const newIsDark = compositeIsDark(
14010 + dimRatio,
14011 + newOverlayColor,
14012 + DEFAULT_BACKGROUND_COLOR
14013 + );
14014 + setAttributes({
14015 + url: void 0,
14016 + id: void 0,
14017 + backgroundType: void 0,
14018 + focalPoint: void 0,
14019 + hasParallax: void 0,
14020 + isRepeated: void 0,
14021 + useFeaturedImage: void 0,
14022 + isDark: newIsDark
14023 + });
14024 + };
14025 + const onSetOverlayColor = async (newOverlayColor) => {
14026 + const averageBackgroundColor = await getMediaColor(url);
14027 + const newIsDark = compositeIsDark(
14028 + dimRatio,
14029 + newOverlayColor,
14030 + averageBackgroundColor
14031 + );
14032 + setOverlayColor(newOverlayColor);
14033 + __unstableMarkNextChangeAsNotPersistent();
14034 + setAttributes({
14035 + isUserOverlayColor: true,
14036 + isDark: newIsDark
14037 + });
14038 + };
14039 + const onUpdateDimRatio = async (newDimRatio) => {
14040 + const averageBackgroundColor = await getMediaColor(url);
14041 + const newIsDark = compositeIsDark(
14042 + newDimRatio,
14043 + overlayColor.color,
14044 + averageBackgroundColor
14045 + );
14046 + setAttributes({
14047 + dimRatio: newDimRatio,
14048 + isDark: newIsDark
14049 + });
14050 + };
14051 + const onUploadError = (message) => {
14052 + createErrorNotice(message, { type: "snackbar" });
14053 + };
14054 + const isUploadingMedia = isTemporaryMedia(id, url);
14055 + const isImageBackground = IMAGE_BACKGROUND_TYPE === backgroundType;
14056 + const isVideoBackground = VIDEO_BACKGROUND_TYPE === backgroundType;
14057 + const blockEditingMode = (0,external_wp_blockEditor_namespaceObject.useBlockEditingMode)();
14058 + const hasNonContentControls = blockEditingMode === "default";
14059 + const [resizeListener, { height, width }] = (0,external_wp_compose_namespaceObject.useResizeObserver)();
14060 + const resizableBoxDimensions = (0,external_wp_element_namespaceObject.useMemo)(() => {
14061 + return {
14062 + height: minHeightUnit === "px" && minHeight ? minHeight : "auto",
14063 + width: "auto"
14064 + };
14065 + }, [minHeight, minHeightUnit]);
14066 + const minHeightWithUnit = minHeight && minHeightUnit ? `${minHeight}${minHeightUnit}` : minHeight;
14067 + const isImgElement = !(hasParallax || isRepeated);
14068 + const style = {
14069 + minHeight: minHeightWithUnit || void 0
14070 + };
14071 + const backgroundImage = url ? `url(${url})` : void 0;
14072 + const backgroundPosition = mediaPosition(focalPoint);
14073 + const bgStyle = { backgroundColor: overlayColor.color };
14074 + const mediaStyle = {
14075 + objectPosition: focalPoint && isImgElement ? mediaPosition(focalPoint) : void 0
14076 + };
14077 + const hasBackground = !!(url || overlayColor.color || gradientValue);
14078 + const hasInnerBlocks = (0,external_wp_data_namespaceObject.useSelect)(
14079 + (select) => select(external_wp_blockEditor_namespaceObject.store).getBlock(clientId).innerBlocks.length > 0,
14080 + [clientId]
14081 + );
14082 + const ref = (0,external_wp_element_namespaceObject.useRef)();
14083 + const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)({ ref });
14084 + const [fontSizes] = (0,external_wp_blockEditor_namespaceObject.useSettings)("typography.fontSizes");
14085 + const hasFontSizes = fontSizes?.length > 0;
14086 + const innerBlocksTemplate = getInnerBlocksTemplate({
14087 + fontSize: hasFontSizes ? "large" : void 0
14088 + });
14089 + const innerBlocksProps = (0,external_wp_blockEditor_namespaceObject.useInnerBlocksProps)(
14090 + {
14091 + className: "wp-block-cover__inner-container"
14092 + },
14093 + {
14094 + // Avoid template sync when the `templateLock` value is `all` or `contentOnly`.
14095 + // See: https://github.com/WordPress/gutenberg/pull/45632
14096 + template: !hasInnerBlocks ? innerBlocksTemplate : void 0,
14097 + templateInsertUpdatesSelection: true,
14098 + allowedBlocks,
14099 + templateLock,
14100 + dropZoneElement: ref.current
14101 + }
14102 + );
14103 + const mediaElement = (0,external_wp_element_namespaceObject.useRef)();
14104 + const currentSettings = {
14105 + isVideoBackground,
14106 + isImageBackground,
14107 + mediaElement,
14108 + hasInnerBlocks,
14109 + url,
14110 + isImgElement,
14111 + overlayColor
14112 + };
14113 + const toggleUseFeaturedImage = async () => {
14114 + const newUseFeaturedImage = !useFeaturedImage;
14115 + const averageBackgroundColor = newUseFeaturedImage ? await getMediaColor(mediaUrl) : DEFAULT_BACKGROUND_COLOR;
14116 + const newOverlayColor = !isUserOverlayColor ? averageBackgroundColor : overlayColor.color;
14117 + if (!isUserOverlayColor) {
14118 + if (newUseFeaturedImage) {
14119 + setOverlayColor(newOverlayColor);
14120 + } else {
14121 + setOverlayColor(void 0);
14122 + }
14123 + __unstableMarkNextChangeAsNotPersistent();
14124 + }
14125 + const newDimRatio = dimRatio === 100 ? 50 : dimRatio;
14126 + const newIsDark = compositeIsDark(
14127 + newDimRatio,
14128 + newOverlayColor,
14129 + averageBackgroundColor
14130 + );
14131 + setAttributes({
14132 + id: void 0,
14133 + url: void 0,
14134 + useFeaturedImage: newUseFeaturedImage,
14135 + dimRatio: newDimRatio,
14136 + backgroundType: useFeaturedImage ? IMAGE_BACKGROUND_TYPE : void 0,
14137 + isDark: newIsDark
14138 + });
14139 + };
14140 + const blockControls = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
14141 + CoverBlockControls,
14142 + {
14143 + attributes,
14144 + setAttributes,
14145 + onSelectMedia,
14146 + currentSettings,
14147 + toggleUseFeaturedImage,
14148 + onClearMedia,
14149 + blockEditingMode
14150 + }
14151 + );
14152 + const inspectorControls = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
14153 + CoverInspectorControls,
14154 + {
14155 + attributes,
14156 + setAttributes,
14157 + clientId,
14158 + setOverlayColor: onSetOverlayColor,
14159 + coverRef: ref,
14160 + currentSettings,
14161 + toggleUseFeaturedImage,
14162 + updateDimRatio: onUpdateDimRatio,
14163 + onClearMedia,
14164 + featuredImage: media
14165 + }
14166 + );
14167 + const resizableCoverProps = {
14168 + className: "block-library-cover__resize-container",
14169 + clientId,
14170 + height,
14171 + minHeight: minHeightWithUnit,
14172 + onResizeStart: () => {
14173 + setAttributes({ minHeightUnit: "px" });
14174 + toggleSelection(false);
14175 + },
14176 + onResize: (value) => {
14177 + setAttributes({ minHeight: value });
14178 + },
14179 + onResizeStop: (newMinHeight) => {
14180 + toggleSelection(true);
14181 + setAttributes({ minHeight: newMinHeight });
14182 + },
14183 + // Hide the resize handle if an aspect ratio is set, as the aspect ratio takes precedence.
14184 + showHandle: !attributes.style?.dimensions?.aspectRatio,
14185 + size: resizableBoxDimensions,
14186 + width
14187 + };
14188 + if (!useFeaturedImage && !hasInnerBlocks && !hasBackground) {
14189 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
14190 + blockControls,
14191 + inspectorControls,
14192 + hasNonContentControls && isSelected && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(ResizableCoverPopover, { ...resizableCoverProps }),
14193 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(
14194 + TagName,
14195 + {
14196 + ...blockProps,
14197 + className: dist_clsx("is-placeholder", blockProps.className),
14198 + style: {
14199 + ...blockProps.style,
14200 + minHeight: minHeightWithUnit || void 0
14201 + },
14202 + children: [
14203 + resizeListener,
14204 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
14205 + CoverPlaceholder,
14206 + {
14207 + onSelectMedia,
14208 + onError: onUploadError,
14209 + toggleUseFeaturedImage,
14210 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { className: "wp-block-cover__placeholder-background-options", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
14211 + external_wp_blockEditor_namespaceObject.ColorPalette,
14212 + {
14213 + disableCustomColors: true,
14214 + value: overlayColor.color,
14215 + onChange: onSetOverlayColor,
14216 + clearable: false,
14217 + asButtons: true,
14218 + "aria-label": (0,external_wp_i18n_namespaceObject.__)("Overlay color")
14219 + }
14220 + ) })
14221 + }
14222 + )
14223 + ]
14224 + }
14225 + )
14226 + ] });
14227 + }
14228 + const classes = dist_clsx(
14229 + {
14230 + "is-dark-theme": isDark,
14231 + "is-light": !isDark,
14232 + "is-transient": isUploadingMedia,
14233 + "has-parallax": hasParallax,
14234 + "is-repeated": isRepeated,
14235 + "has-custom-content-position": !isContentPositionCenter(contentPosition)
14236 + },
14237 + getPositionClassName(contentPosition)
14238 + );
14239 + const showOverlay = url || !useFeaturedImage || useFeaturedImage && !url;
14240 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
14241 + blockControls,
14242 + inspectorControls,
14243 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(
14244 + TagName,
14245 + {
14246 + ...blockProps,
14247 + className: dist_clsx(classes, blockProps.className),
14248 + style: { ...style, ...blockProps.style },
14249 + "data-url": url,
14250 + children: [
14251 + resizeListener,
14252 + !url && useFeaturedImage && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
14253 + external_wp_components_namespaceObject.Placeholder,
14254 + {
14255 + className: "wp-block-cover__image--placeholder-image",
14256 + withIllustration: true
14257 + }
14258 + ),
14259 + url && isImageBackground && (isImgElement ? /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
14260 + "img",
14261 + {
14262 + ref: mediaElement,
14263 + className: "wp-block-cover__image-background",
14264 + alt,
14265 + src: url,
14266 + style: mediaStyle
14267 + }
14268 + ) : /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
14269 + "div",
14270 + {
14271 + ref: mediaElement,
14272 + role: alt ? "img" : void 0,
14273 + "aria-label": alt ? alt : void 0,
14274 + className: dist_clsx(
14275 + classes,
14276 + "wp-block-cover__image-background"
14277 + ),
14278 + style: { backgroundImage, backgroundPosition }
14279 + }
14280 + )),
14281 + url && isVideoBackground && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
14282 + "video",
14283 + {
14284 + ref: mediaElement,
14285 + className: "wp-block-cover__video-background",
14286 + autoPlay: true,
14287 + muted: true,
14288 + loop: true,
14289 + src: url,
14290 + poster,
14291 + style: mediaStyle
14292 + }
14293 + ),
14294 + showOverlay && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
14295 + "span",
14296 + {
14297 + "aria-hidden": "true",
14298 + className: dist_clsx(
14299 + "wp-block-cover__background",
14300 + dimRatioToClass(dimRatio),
14301 + {
14302 + [overlayColor.class]: overlayColor.class,
14303 + "has-background-dim": dimRatio !== void 0,
14304 + // For backwards compatibility. Former versions of the Cover Block applied
14305 + // `.wp-block-cover__gradient-background` in the presence of
14306 + // media, a gradient and a dim.
14307 + "wp-block-cover__gradient-background": url && gradientValue && dimRatio !== 0,
14308 + "has-background-gradient": gradientValue,
14309 + [gradientClass]: gradientClass
14310 + }
14311 + ),
14312 + style: { backgroundImage: gradientValue, ...bgStyle }
14313 + }
14314 + ),
14315 + isUploadingMedia && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Spinner, {}),
14316 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
14317 + CoverPlaceholder,
14318 + {
14319 + disableMediaButtons: true,
14320 + onSelectMedia,
14321 + onError: onUploadError,
14322 + toggleUseFeaturedImage
14323 + }
14324 + ),
14325 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { ...innerBlocksProps })
14326 + ]
14327 + }
14328 + ),
14329 + hasNonContentControls && isSelected && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(ResizableCoverPopover, { ...resizableCoverProps })
14330 + ] });
14331 + }
14332 + var cover_edit_edit_default = (0,external_wp_compose_namespaceObject.compose)([
14333 + (0,external_wp_blockEditor_namespaceObject.withColors)({ overlayColor: "background-color" })
14334 + ])(CoverEdit);
14335 +
14336 +
14337 + ;// ./node_modules/@wordpress/block-library/build-module/cover/block.json
14338 + const cover_block_namespaceObject = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/cover","title":"Cover","category":"media","description":"Add an image or video with a text overlay.","textdomain":"default","attributes":{"url":{"type":"string","role":"content"},"useFeaturedImage":{"type":"boolean","default":false},"id":{"type":"number"},"alt":{"type":"string","default":""},"hasParallax":{"type":"boolean","default":false},"isRepeated":{"type":"boolean","default":false},"dimRatio":{"type":"number","default":100},"overlayColor":{"type":"string"},"customOverlayColor":{"type":"string"},"isUserOverlayColor":{"type":"boolean"},"backgroundType":{"type":"string","default":"image"},"focalPoint":{"type":"object"},"minHeight":{"type":"number"},"minHeightUnit":{"type":"string"},"gradient":{"type":"string"},"customGradient":{"type":"string"},"contentPosition":{"type":"string"},"isDark":{"type":"boolean","default":true},"templateLock":{"type":["string","boolean"],"enum":["all","insert","contentOnly",false]},"tagName":{"type":"string","default":"div"},"sizeSlug":{"type":"string"},"poster":{"type":"string","source":"attribute","selector":"video","attribute":"poster"}},"usesContext":["postId","postType"],"supports":{"anchor":true,"align":true,"html":false,"shadow":true,"spacing":{"padding":true,"margin":["top","bottom"],"blockGap":true,"__experimentalDefaultControls":{"padding":true,"blockGap":true}},"__experimentalBorder":{"color":true,"radius":true,"style":true,"width":true,"__experimentalDefaultControls":{"color":true,"radius":true,"style":true,"width":true}},"color":{"heading":true,"text":true,"background":false,"__experimentalSkipSerialization":["gradients"],"enableContrastChecker":false},"dimensions":{"aspectRatio":true},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"layout":{"allowJustification":false},"interactivity":{"clientNavigation":true},"filter":{"duotone":true},"allowedBlocks":true},"selectors":{"filter":{"duotone":".wp-block-cover > .wp-block-cover__image-background, .wp-block-cover > .wp-block-cover__video-background"}},"editorStyle":"wp-block-cover-editor","style":"wp-block-cover"}');
14339 + ;// ./node_modules/@wordpress/block-library/build-module/cover/save.js
14340 +
14341 +
14342 +
14343 +
14344 + function cover_save_save({ attributes }) {
14345 + const {
14346 + backgroundType,
14347 + gradient,
14348 + contentPosition,
14349 + customGradient,
14350 + customOverlayColor,
14351 + dimRatio,
14352 + focalPoint,
14353 + useFeaturedImage,
14354 + hasParallax,
14355 + isDark,
14356 + isRepeated,
14357 + overlayColor,
14358 + url,
14359 + alt,
14360 + id,
14361 + minHeight: minHeightProp,
14362 + minHeightUnit,
14363 + tagName: Tag,
14364 + sizeSlug,
14365 + poster
14366 + } = attributes;
14367 + const overlayColorClass = (0,external_wp_blockEditor_namespaceObject.getColorClassName)(
14368 + "background-color",
14369 + overlayColor
14370 + );
14371 + const gradientClass = (0,external_wp_blockEditor_namespaceObject.__experimentalGetGradientClass)(gradient);
14372 + const minHeight = minHeightProp && minHeightUnit ? `${minHeightProp}${minHeightUnit}` : minHeightProp;
14373 + const isImageBackground = IMAGE_BACKGROUND_TYPE === backgroundType;
14374 + const isVideoBackground = VIDEO_BACKGROUND_TYPE === backgroundType;
14375 + const isImgElement = !(hasParallax || isRepeated);
14376 + const style = {
14377 + minHeight: minHeight || void 0
14378 + };
14379 + const bgStyle = {
14380 + backgroundColor: !overlayColorClass ? customOverlayColor : void 0,
14381 + background: customGradient ? customGradient : void 0
14382 + };
14383 + const objectPosition = (
14384 + // prettier-ignore
14385 + focalPoint && isImgElement ? mediaPosition(focalPoint) : void 0
14386 + );
14387 + const backgroundImage = url ? `url(${url})` : void 0;
14388 + const backgroundPosition = mediaPosition(focalPoint);
14389 + const classes = dist_clsx(
14390 + {
14391 + "is-light": !isDark,
14392 + "has-parallax": hasParallax,
14393 + "is-repeated": isRepeated,
14394 + "has-custom-content-position": !isContentPositionCenter(contentPosition)
14395 + },
14396 + getPositionClassName(contentPosition)
14397 + );
14398 + const imgClasses = dist_clsx(
14399 + "wp-block-cover__image-background",
14400 + id ? `wp-image-${id}` : null,
14401 + {
14402 + [`size-${sizeSlug}`]: sizeSlug,
14403 + "has-parallax": hasParallax,
14404 + "is-repeated": isRepeated
14405 + }
14406 + );
14407 + const gradientValue = gradient || customGradient;
14408 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(Tag, { ...external_wp_blockEditor_namespaceObject.useBlockProps.save({ className: classes, style }), children: [
14409 + !useFeaturedImage && isImageBackground && url && (isImgElement ? /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
14410 + "img",
14411 + {
14412 + className: imgClasses,
14413 + alt,
14414 + src: url,
14415 + style: { objectPosition },
14416 + "data-object-fit": "cover",
14417 + "data-object-position": objectPosition
14418 + }
14419 + ) : /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
14420 + "div",
14421 + {
14422 + role: alt ? "img" : void 0,
14423 + "aria-label": alt ? alt : void 0,
14424 + className: imgClasses,
14425 + style: { backgroundPosition, backgroundImage }
14426 + }
14427 + )),
14428 + isVideoBackground && url && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
14429 + "video",
14430 + {
14431 + className: dist_clsx(
14432 + "wp-block-cover__video-background",
14433 + "intrinsic-ignore"
14434 + ),
14435 + autoPlay: true,
14436 + muted: true,
14437 + loop: true,
14438 + playsInline: true,
14439 + src: url,
14440 + poster,
14441 + style: { objectPosition },
14442 + "data-object-fit": "cover",
14443 + "data-object-position": objectPosition
14444 + }
14445 + ),
14446 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
14447 + "span",
14448 + {
14449 + "aria-hidden": "true",
14450 + className: dist_clsx(
14451 + "wp-block-cover__background",
14452 + overlayColorClass,
14453 + dimRatioToClass(dimRatio),
14454 + {
14455 + "has-background-dim": dimRatio !== void 0,
14456 + // For backwards compatibility. Former versions of the Cover Block applied
14457 + // `.wp-block-cover__gradient-background` in the presence of
14458 + // media, a gradient and a dim.
14459 + "wp-block-cover__gradient-background": url && gradientValue && dimRatio !== 0,
14460 + "has-background-gradient": gradientValue,
14461 + [gradientClass]: gradientClass
14462 + }
14463 + ),
14464 + style: bgStyle
14465 + }
14466 + ),
14467 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
14468 + "div",
14469 + {
14470 + ...external_wp_blockEditor_namespaceObject.useInnerBlocksProps.save({
14471 + className: "wp-block-cover__inner-container"
14472 + })
14473 + }
14474 + )
14475 + ] });
14476 + }
14477 +
14478 +
14479 + ;// ./node_modules/@wordpress/block-library/build-module/cover/transforms.js
14480 +
14481 +
14482 +
14483 +
14484 + const { cleanEmptyObject: transforms_cleanEmptyObject } = unlock(external_wp_blockEditor_namespaceObject.privateApis);
14485 + const cover_transforms_transforms = {
14486 + from: [
14487 + {
14488 + type: "block",
14489 + blocks: ["core/image"],
14490 + transform: ({ caption, url, alt, align, id, anchor, style }) => (0,external_wp_blocks_namespaceObject.createBlock)(
14491 + "core/cover",
14492 + {
14493 + dimRatio: 50,
14494 + url,
14495 + alt,
14496 + align,
14497 + id,
14498 + anchor,
14499 + style: {
14500 + color: {
14501 + duotone: style?.color?.duotone
14502 + }
14503 + }
14504 + },
14505 + [
14506 + (0,external_wp_blocks_namespaceObject.createBlock)("core/paragraph", {
14507 + content: caption,
14508 + fontSize: "large",
14509 + align: "center"
14510 + })
14511 + ]
14512 + )
14513 + },
14514 + {
14515 + type: "block",
14516 + blocks: ["core/video"],
14517 + transform: ({ caption, src, align, id, anchor }) => (0,external_wp_blocks_namespaceObject.createBlock)(
14518 + "core/cover",
14519 + {
14520 + dimRatio: 50,
14521 + url: src,
14522 + align,
14523 + id,
14524 + backgroundType: VIDEO_BACKGROUND_TYPE,
14525 + anchor
14526 + },
14527 + [
14528 + (0,external_wp_blocks_namespaceObject.createBlock)("core/paragraph", {
14529 + content: caption,
14530 + fontSize: "large",
14531 + align: "center"
14532 + })
14533 + ]
14534 + )
14535 + },
14536 + {
14537 + type: "block",
14538 + blocks: ["core/group"],
14539 + transform: (attributes, innerBlocks) => {
14540 + const { align, anchor, backgroundColor, gradient, style } = attributes;
14541 + if (innerBlocks?.length === 1 && innerBlocks[0]?.name === "core/cover") {
14542 + return (0,external_wp_blocks_namespaceObject.createBlock)(
14543 + "core/cover",
14544 + innerBlocks[0].attributes,
14545 + innerBlocks[0].innerBlocks
14546 + );
14547 + }
14548 + const dimRatio = backgroundColor || gradient || style?.color?.background || style?.color?.gradient ? void 0 : 50;
14549 + const parentAttributes = {
14550 + align,
14551 + anchor,
14552 + dimRatio,
14553 + overlayColor: backgroundColor,
14554 + customOverlayColor: style?.color?.background,
14555 + gradient,
14556 + customGradient: style?.color?.gradient
14557 + };
14558 + const attributesWithoutBackgroundColors = {
14559 + ...attributes,
14560 + backgroundColor: void 0,
14561 + gradient: void 0,
14562 + style: transforms_cleanEmptyObject({
14563 + ...attributes?.style,
14564 + color: style?.color ? {
14565 + ...style?.color,
14566 + background: void 0,
14567 + gradient: void 0
14568 + } : void 0
14569 + })
14570 + };
14571 + return (0,external_wp_blocks_namespaceObject.createBlock)("core/cover", parentAttributes, [
14572 + (0,external_wp_blocks_namespaceObject.createBlock)(
14573 + "core/group",
14574 + attributesWithoutBackgroundColors,
14575 + innerBlocks
14576 + )
14577 + ]);
14578 + }
14579 + }
14580 + ],
14581 + to: [
14582 + {
14583 + type: "block",
14584 + blocks: ["core/image"],
14585 + isMatch: ({
14586 + backgroundType,
14587 + url,
14588 + overlayColor,
14589 + customOverlayColor,
14590 + gradient,
14591 + customGradient
14592 + }) => {
14593 + if (url) {
14594 + return backgroundType === IMAGE_BACKGROUND_TYPE;
14595 + }
14596 + return !overlayColor && !customOverlayColor && !gradient && !customGradient;
14597 + },
14598 + transform: ({ title, url, alt, align, id, anchor, style }) => (0,external_wp_blocks_namespaceObject.createBlock)("core/image", {
14599 + caption: title,
14600 + url,
14601 + alt,
14602 + align,
14603 + id,
14604 + anchor,
14605 + style: {
14606 + color: {
14607 + duotone: style?.color?.duotone
14608 + }
14609 + }
14610 + })
14611 + },
14612 + {
14613 + type: "block",
14614 + blocks: ["core/video"],
14615 + isMatch: ({
14616 + backgroundType,
14617 + url,
14618 + overlayColor,
14619 + customOverlayColor,
14620 + gradient,
14621 + customGradient
14622 + }) => {
14623 + if (url) {
14624 + return backgroundType === VIDEO_BACKGROUND_TYPE;
14625 + }
14626 + return !overlayColor && !customOverlayColor && !gradient && !customGradient;
14627 + },
14628 + transform: ({ title, url, align, id, anchor }) => (0,external_wp_blocks_namespaceObject.createBlock)("core/video", {
14629 + caption: title,
14630 + src: url,
14631 + id,
14632 + align,
14633 + anchor
14634 + })
14635 + },
14636 + {
14637 + type: "block",
14638 + blocks: ["core/group"],
14639 + isMatch: ({ url, useFeaturedImage }) => {
14640 + if (url || useFeaturedImage) {
14641 + return false;
14642 + }
14643 + return true;
14644 + },
14645 + transform: (attributes, innerBlocks) => {
14646 + const transformedColorAttributes = {
14647 + backgroundColor: attributes?.overlayColor,
14648 + gradient: attributes?.gradient,
14649 + style: transforms_cleanEmptyObject({
14650 + ...attributes?.style,
14651 + color: attributes?.customOverlayColor || attributes?.customGradient || attributes?.style?.color ? {
14652 + background: attributes?.customOverlayColor,
14653 + gradient: attributes?.customGradient,
14654 + ...attributes?.style?.color
14655 + } : void 0
14656 + })
14657 + };
14658 + if (innerBlocks?.length === 1 && innerBlocks[0]?.name === "core/group") {
14659 + const groupAttributes = transforms_cleanEmptyObject(
14660 + innerBlocks[0].attributes || {}
14661 + );
14662 + if (groupAttributes?.backgroundColor || groupAttributes?.gradient || groupAttributes?.style?.color?.background || groupAttributes?.style?.color?.gradient) {
14663 + return (0,external_wp_blocks_namespaceObject.createBlock)(
14664 + "core/group",
14665 + groupAttributes,
14666 + innerBlocks[0]?.innerBlocks
14667 + );
14668 + }
14669 + return (0,external_wp_blocks_namespaceObject.createBlock)(
14670 + "core/group",
14671 + {
14672 + ...transformedColorAttributes,
14673 + ...groupAttributes,
14674 + style: transforms_cleanEmptyObject({
14675 + ...groupAttributes?.style,
14676 + color: transformedColorAttributes?.style?.color || groupAttributes?.style?.color ? {
14677 + ...transformedColorAttributes?.style?.color,
14678 + ...groupAttributes?.style?.color
14679 + } : void 0
14680 + })
14681 + },
14682 + innerBlocks[0]?.innerBlocks
14683 + );
14684 + }
14685 + return (0,external_wp_blocks_namespaceObject.createBlock)(
14686 + "core/group",
14687 + { ...attributes, ...transformedColorAttributes },
14688 + innerBlocks
14689 + );
14690 + }
14691 + }
14692 + ]
14693 + };
14694 + var cover_transforms_transforms_default = cover_transforms_transforms;
14695 +
14696 +
14697 + ;// ./node_modules/@wordpress/block-library/build-module/cover/variations.js
14698 +
14699 +
14700 + const cover_variations_variations = [
14701 + {
14702 + name: "cover",
14703 + title: (0,external_wp_i18n_namespaceObject.__)("Cover"),
14704 + description: (0,external_wp_i18n_namespaceObject.__)("Add an image or video with a text overlay."),
14705 + attributes: { layout: { type: "constrained" } },
14706 + isDefault: true,
14707 + icon: cover_default
14708 + }
14709 + ];
14710 + var cover_variations_variations_default = cover_variations_variations;
14711 +
14712 +
14713 + ;// ./node_modules/@wordpress/block-library/build-module/cover/index.js
14714 +
14715 +
14716 +
14717 +
14718 +
14719 +
14720 +
14721 +
14722 +
14723 + const { name: cover_name } = cover_block_namespaceObject;
14724 + const cover_settings = {
14725 + icon: cover_default,
14726 + example: {
14727 + attributes: {
14728 + customOverlayColor: "#065174",
14729 + dimRatio: 40,
14730 + url: "https://s.w.org/images/core/5.3/Windbuchencom.jpg",
14731 + style: {
14732 + typography: {
14733 + fontSize: 48
14734 + },
14735 + color: {
14736 + text: "white"
14737 + }
14738 + }
14739 + },
14740 + innerBlocks: [
14741 + {
14742 + name: "core/paragraph",
14743 + attributes: {
14744 + content: `<strong>${(0,external_wp_i18n_namespaceObject.__)("Snow Patrol")}</strong>`,
14745 + align: "center"
14746 + }
14747 + }
14748 + ]
14749 + },
14750 + transforms: cover_transforms_transforms_default,
14751 + save: cover_save_save,
14752 + edit: cover_edit_edit_default,
14753 + deprecated: cover_deprecated_deprecated_default,
14754 + variations: cover_variations_variations_default
14755 + };
14756 + const cover_init = () => initBlock({ name: cover_name, metadata: cover_block_namespaceObject, settings: cover_settings });
14757 +
14758 +
14759 + ;// ./node_modules/@wordpress/icons/build-module/library/details.js
14760 +
14761 +
14762 + var details_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_primitives_namespaceObject.SVG, { viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", children: [
14763 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
14764 + external_wp_primitives_namespaceObject.Path,
14765 + {
14766 + d: "M4 16h10v1.5H4V16Zm0-4.5h16V13H4v-1.5ZM10 7h10v1.5H10V7Z",
14767 + fillRule: "evenodd",
14768 + clipRule: "evenodd"
14769 + }
14770 + ),
14771 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "m4 5.25 4 2.5-4 2.5v-5Z" })
14772 + ] });
14773 +
14774 +
14775 + ;// ./node_modules/@wordpress/block-library/build-module/details/block.json
14776 + const details_block_namespaceObject = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/details","title":"Details","category":"text","description":"Hide and show additional content.","keywords":["summary","toggle","disclosure"],"textdomain":"default","attributes":{"showContent":{"type":"boolean","default":false},"summary":{"type":"rich-text","source":"rich-text","selector":"summary","role":"content"},"name":{"type":"string","source":"attribute","attribute":"name","selector":".wp-block-details"},"placeholder":{"type":"string"}},"supports":{"__experimentalOnEnter":true,"align":["wide","full"],"anchor":true,"color":{"gradients":true,"link":true,"__experimentalDefaultControls":{"background":true,"text":true}},"__experimentalBorder":{"color":true,"width":true,"style":true},"html":false,"spacing":{"margin":true,"padding":true,"blockGap":true,"__experimentalDefaultControls":{"margin":false,"padding":false}},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"layout":{"allowEditing":false},"interactivity":{"clientNavigation":true},"allowedBlocks":true},"editorStyle":"wp-block-details-editor","style":"wp-block-details"}');
14777 + ;// ./node_modules/@wordpress/block-library/build-module/details/edit.js
14778 +
14779 +
14780 +
14781 +
14782 +
14783 +
14784 +
14785 +
14786 + const { withIgnoreIMEEvents } = unlock(external_wp_components_namespaceObject.privateApis);
14787 + const details_edit_TEMPLATE = [
14788 + [
14789 + "core/paragraph",
14790 + {
14791 + placeholder: (0,external_wp_i18n_namespaceObject.__)("Type / to add a hidden block")
14792 + }
14793 + ]
14794 + ];
14795 + function DetailsEdit({ attributes, setAttributes, clientId }) {
14796 + const { name, showContent, summary, allowedBlocks, placeholder } = attributes;
14797 + const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)();
14798 + const innerBlocksProps = (0,external_wp_blockEditor_namespaceObject.useInnerBlocksProps)(blockProps, {
14799 + template: details_edit_TEMPLATE,
14800 + __experimentalCaptureToolbars: true,
14801 + allowedBlocks
14802 + });
14803 + const [isOpen, setIsOpen] = (0,external_wp_element_namespaceObject.useState)(showContent);
14804 + const dropdownMenuProps = useToolsPanelDropdownMenuProps();
14805 + const hasSelectedInnerBlock = (0,external_wp_data_namespaceObject.useSelect)(
14806 + (select) => select(external_wp_blockEditor_namespaceObject.store).hasSelectedInnerBlock(clientId, true),
14807 + [clientId]
14808 + );
14809 + const handleSummaryKeyDown = (event) => {
14810 + if (event.key === "Enter" && !event.shiftKey) {
14811 + setIsOpen((prevIsOpen) => !prevIsOpen);
14812 + event.preventDefault();
14813 + }
14814 + };
14815 + const handleSummaryKeyUp = (event) => {
14816 + if (event.key === " ") {
14817 + event.preventDefault();
14818 + }
14819 + };
14820 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
14821 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
14822 + external_wp_components_namespaceObject.__experimentalToolsPanel,
14823 + {
14824 + label: (0,external_wp_i18n_namespaceObject.__)("Settings"),
14825 + resetAll: () => {
14826 + setAttributes({
14827 + showContent: false
14828 + });
14829 + },
14830 + dropdownMenuProps,
14831 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
14832 + external_wp_components_namespaceObject.__experimentalToolsPanelItem,
14833 + {
14834 + isShownByDefault: true,
14835 + label: (0,external_wp_i18n_namespaceObject.__)("Open by default"),
14836 + hasValue: () => showContent,
14837 + onDeselect: () => {
14838 + setAttributes({
14839 + showContent: false
14840 + });
14841 + },
14842 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
14843 + external_wp_components_namespaceObject.ToggleControl,
14844 + {
14845 + __nextHasNoMarginBottom: true,
14846 + label: (0,external_wp_i18n_namespaceObject.__)("Open by default"),
14847 + checked: showContent,
14848 + onChange: () => setAttributes({
14849 + showContent: !showContent
14850 + })
14851 + }
14852 + )
14853 + }
14854 + )
14855 + }
14856 + ) }),
14857 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, { group: "advanced", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
14858 + external_wp_components_namespaceObject.TextControl,
14859 + {
14860 + __next40pxDefaultSize: true,
14861 + __nextHasNoMarginBottom: true,
14862 + label: (0,external_wp_i18n_namespaceObject.__)("Name attribute"),
14863 + value: name || "",
14864 + onChange: (newName) => setAttributes({ name: newName }),
14865 + help: (0,external_wp_i18n_namespaceObject.__)(
14866 + "Enables multiple Details blocks with the same name attribute to be connected, with only one open at a time."
14867 + )
14868 + }
14869 + ) }),
14870 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(
14871 + "details",
14872 + {
14873 + ...innerBlocksProps,
14874 + open: isOpen || hasSelectedInnerBlock,
14875 + onToggle: (event) => setIsOpen(event.target.open),
14876 + name: name || "",
14877 + children: [
14878 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
14879 + "summary",
14880 + {
14881 + onKeyDown: withIgnoreIMEEvents(handleSummaryKeyDown),
14882 + onKeyUp: handleSummaryKeyUp,
14883 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
14884 + external_wp_blockEditor_namespaceObject.RichText,
14885 + {
14886 + identifier: "summary",
14887 + "aria-label": (0,external_wp_i18n_namespaceObject.__)(
14888 + "Write summary. Press Enter to expand or collapse the details."
14889 + ),
14890 + placeholder: placeholder || (0,external_wp_i18n_namespaceObject.__)("Write summary\u2026"),
14891 + withoutInteractiveFormatting: true,
14892 + value: summary,
14893 + onChange: (newSummary) => setAttributes({ summary: newSummary })
14894 + }
14895 + )
14896 + }
14897 + ),
14898 + innerBlocksProps.children
14899 + ]
14900 + }
14901 + )
14902 + ] });
14903 + }
14904 + var details_edit_edit_default = DetailsEdit;
14905 +
14906 +
14907 + ;// ./node_modules/@wordpress/block-library/build-module/details/save.js
14908 +
14909 +
14910 + function details_save_save({ attributes }) {
14911 + const { name, showContent } = attributes;
14912 + const summary = attributes.summary ? attributes.summary : "Details";
14913 + const blockProps = external_wp_blockEditor_namespaceObject.useBlockProps.save();
14914 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(
14915 + "details",
14916 + {
14917 + ...blockProps,
14918 + name: name || void 0,
14919 + open: showContent,
14920 + children: [
14921 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("summary", { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichText.Content, { value: summary }) }),
14922 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, {})
14923 + ]
14924 + }
14925 + );
14926 + }
14927 +
14928 +
14929 + ;// ./node_modules/@wordpress/block-library/build-module/details/transforms.js
14930 +
14931 + var details_transforms_transforms_default = {
14932 + from: [
14933 + {
14934 + type: "block",
14935 + isMultiBlock: true,
14936 + blocks: ["*"],
14937 + isMatch({}, blocks) {
14938 + return !(blocks.length === 1 && blocks[0].name === "core/details");
14939 + },
14940 + __experimentalConvert(blocks) {
14941 + return (0,external_wp_blocks_namespaceObject.createBlock)(
14942 + "core/details",
14943 + {},
14944 + blocks.map((block) => (0,external_wp_blocks_namespaceObject.cloneBlock)(block))
14945 + );
14946 + }
14947 + }
14948 + ]
14949 + };
14950 +
14951 +
14952 + ;// ./node_modules/@wordpress/block-library/build-module/details/index.js
14953 +
14954 +
14955 +
14956 +
14957 +
14958 +
14959 +
14960 + const { name: details_name } = details_block_namespaceObject;
14961 + const details_settings = {
14962 + icon: details_default,
14963 + example: {
14964 + attributes: {
14965 + summary: (0,external_wp_i18n_namespaceObject.__)("La Mancha"),
14966 + showContent: true
14967 + },
14968 + innerBlocks: [
14969 + {
14970 + name: "core/paragraph",
14971 + attributes: {
14972 + content: (0,external_wp_i18n_namespaceObject.__)(
14973 + "In a village of La Mancha, the name of which I have no desire to call to mind, there lived not long since one of those gentlemen that keep a lance in the lance-rack, an old buckler, a lean hack, and a greyhound for coursing."
14974 + )
14975 + }
14976 + }
14977 + ]
14978 + },
14979 + __experimentalLabel(attributes, { context }) {
14980 + const { summary } = attributes;
14981 + const customName = attributes?.metadata?.name;
14982 + const hasSummary = summary?.trim().length > 0;
14983 + if (context === "list-view" && (customName || hasSummary)) {
14984 + return customName || summary;
14985 + }
14986 + if (context === "accessibility") {
14987 + return !hasSummary ? (0,external_wp_i18n_namespaceObject.__)("Details. Empty.") : (0,external_wp_i18n_namespaceObject.sprintf)(
14988 + /* translators: %s: accessibility text; summary title. */
14989 + (0,external_wp_i18n_namespaceObject.__)("Details. %s"),
14990 + summary
14991 + );
14992 + }
14993 + },
14994 + save: details_save_save,
14995 + edit: details_edit_edit_default,
14996 + transforms: details_transforms_transforms_default
14997 + };
14998 + const details_init = () => initBlock({ name: details_name, metadata: details_block_namespaceObject, settings: details_settings });
14999 +
15000 +
15001 + ;// ./node_modules/@wordpress/icons/build-module/library/pencil.js
15002 +
15003 +
15004 + var pencil_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "m19 7-3-3-8.5 8.5-1 4 4-1L19 7Zm-7 11.5H5V20h7v-1.5Z" }) });
15005 +
15006 +
15007 + ;// ./node_modules/@wordpress/block-library/build-module/embed/embed-controls.js
15008 +
15009 +
15010 +
15011 +
15012 +
15013 +
15014 + function getResponsiveHelp(checked) {
15015 + return checked ? (0,external_wp_i18n_namespaceObject.__)(
15016 + "This embed will preserve its aspect ratio when the browser is resized."
15017 + ) : (0,external_wp_i18n_namespaceObject.__)(
15018 + "This embed may not preserve its aspect ratio when the browser is resized."
15019 + );
15020 + }
15021 + const EmbedControls = ({
15022 + blockSupportsResponsive,
15023 + showEditButton,
15024 + themeSupportsResponsive,
15025 + allowResponsive,
15026 + toggleResponsive,
15027 + switchBackToURLInput
15028 + }) => {
15029 + const dropdownMenuProps = useToolsPanelDropdownMenuProps();
15030 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
15031 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockControls, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ToolbarGroup, { children: showEditButton && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
15032 + external_wp_components_namespaceObject.ToolbarButton,
15033 + {
15034 + className: "components-toolbar__control",
15035 + label: (0,external_wp_i18n_namespaceObject.__)("Edit URL"),
15036 + icon: pencil_default,
15037 + onClick: switchBackToURLInput
15038 + }
15039 + ) }) }),
15040 + themeSupportsResponsive && blockSupportsResponsive && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
15041 + external_wp_components_namespaceObject.__experimentalToolsPanel,
15042 + {
15043 + label: (0,external_wp_i18n_namespaceObject.__)("Media settings"),
15044 + resetAll: () => {
15045 + toggleResponsive(true);
15046 + },
15047 + dropdownMenuProps,
15048 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
15049 + external_wp_components_namespaceObject.__experimentalToolsPanelItem,
15050 + {
15051 + label: (0,external_wp_i18n_namespaceObject.__)("Media settings"),
15052 + isShownByDefault: true,
15053 + hasValue: () => !allowResponsive,
15054 + onDeselect: () => {
15055 + toggleResponsive(!allowResponsive);
15056 + },
15057 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
15058 + external_wp_components_namespaceObject.ToggleControl,
15059 + {
15060 + __nextHasNoMarginBottom: true,
15061 + label: (0,external_wp_i18n_namespaceObject.__)("Resize for smaller devices"),
15062 + checked: allowResponsive,
15063 + help: getResponsiveHelp,
15064 + onChange: toggleResponsive
15065 + }
15066 + )
15067 + }
15068 + )
15069 + }
15070 + ) })
15071 + ] });
15072 + };
15073 + var embed_controls_default = EmbedControls;
15074 +
15075 +
15076 + ;// ./node_modules/@wordpress/block-library/build-module/embed/icons.js
15077 +
15078 +
15079 + const embedContentIcon = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.SVG, { viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Path, { d: "M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm.5 16c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5V9.8l4.7-5.3H19c.3 0 .5.2.5.5v14zm-6-9.5L16 12l-2.5 2.8 1.1 1L18 12l-3.5-3.5-1 1zm-3 0l-1-1L6 12l3.5 3.8 1.1-1L8 12l2.5-2.5z" }) });
15080 + const embedAudioIcon = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.SVG, { viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Path, { d: "M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm.5 16c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5V9.8l4.7-5.3H19c.3 0 .5.2.5.5v14zM13.2 7.7c-.4.4-.7 1.1-.7 1.9v3.7c-.4-.3-.8-.4-1.3-.4-1.2 0-2.2 1-2.2 2.2 0 1.2 1 2.2 2.2 2.2.5 0 1-.2 1.4-.5.9-.6 1.4-1.6 1.4-2.6V9.6c0-.4.1-.6.2-.8.3-.3 1-.3 1.6-.3h.2V7h-.2c-.7 0-1.8 0-2.6.7z" }) });
15081 + const embedPhotoIcon = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.SVG, { viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Path, { d: "M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zM9.2 4.5H19c.3 0 .5.2.5.5v8.4l-3-2.9c-.3-.3-.8-.3-1 0L11.9 14 9 12c-.3-.2-.6-.2-.8 0l-3.6 2.6V9.8l4.6-5.3zm9.8 15H5c-.3 0-.5-.2-.5-.5v-2.4l4.1-3 3 1.9c.3.2.7.2.9-.1L16 12l3.5 3.4V19c0 .3-.2.5-.5.5z" }) });
15082 + const embedVideoIcon = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.SVG, { viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Path, { d: "M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm.5 16c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5V9.8l4.7-5.3H19c.3 0 .5.2.5.5v14zM10 15l5-3-5-3v6z" }) });
15083 + const embedTwitterIcon = {
15084 + foreground: "#1da1f2",
15085 + src: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.G, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Path, { d: "M22.23 5.924c-.736.326-1.527.547-2.357.646.847-.508 1.498-1.312 1.804-2.27-.793.47-1.67.812-2.606.996C18.325 4.498 17.258 4 16.078 4c-2.266 0-4.103 1.837-4.103 4.103 0 .322.036.635.106.935-3.41-.17-6.433-1.804-8.457-4.287-.353.607-.556 1.312-.556 2.064 0 1.424.724 2.68 1.825 3.415-.673-.022-1.305-.207-1.86-.514v.052c0 1.988 1.415 3.647 3.293 4.023-.344.095-.707.145-1.08.145-.265 0-.522-.026-.773-.074.522 1.63 2.038 2.817 3.833 2.85-1.404 1.1-3.174 1.757-5.096 1.757-.332 0-.66-.02-.98-.057 1.816 1.164 3.973 1.843 6.29 1.843 7.547 0 11.675-6.252 11.675-11.675 0-.178-.004-.355-.012-.53.802-.578 1.497-1.3 2.047-2.124z" }) }) })
15086 + };
15087 + const embedYouTubeIcon = {
15088 + foreground: "#ff0000",
15089 + src: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.SVG, { viewBox: "0 0 24 24", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Path, { d: "M21.8 8s-.195-1.377-.795-1.984c-.76-.797-1.613-.8-2.004-.847-2.798-.203-6.996-.203-6.996-.203h-.01s-4.197 0-6.996.202c-.39.046-1.242.05-2.003.846C2.395 6.623 2.2 8 2.2 8S2 9.62 2 11.24v1.517c0 1.618.2 3.237.2 3.237s.195 1.378.795 1.985c.76.797 1.76.77 2.205.855 1.6.153 6.8.2 6.8.2s4.203-.005 7-.208c.392-.047 1.244-.05 2.005-.847.6-.607.795-1.985.795-1.985s.2-1.618.2-3.237v-1.517C22 9.62 21.8 8 21.8 8zM9.935 14.595v-5.62l5.403 2.82-5.403 2.8z" }) })
15090 + };
15091 + const embedFacebookIcon = {
15092 + foreground: "#3b5998",
15093 + src: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.SVG, { viewBox: "0 0 24 24", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Path, { d: "M20 3H4c-.6 0-1 .4-1 1v16c0 .5.4 1 1 1h8.6v-7h-2.3v-2.7h2.3v-2c0-2.3 1.4-3.6 3.5-3.6 1 0 1.8.1 2.1.1v2.4h-1.4c-1.1 0-1.3.5-1.3 1.3v1.7h2.7l-.4 2.8h-2.3v7H20c.5 0 1-.4 1-1V4c0-.6-.4-1-1-1z" }) })
15094 + };
15095 + const embedInstagramIcon = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.SVG, { viewBox: "0 0 24 24", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.G, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Path, { d: "M12 4.622c2.403 0 2.688.01 3.637.052.877.04 1.354.187 1.67.31.42.163.72.358 1.036.673.315.315.51.615.673 1.035.123.317.27.794.31 1.67.043.95.052 1.235.052 3.638s-.01 2.688-.052 3.637c-.04.877-.187 1.354-.31 1.67-.163.42-.358.72-.673 1.036-.315.315-.615.51-1.035.673-.317.123-.794.27-1.67.31-.95.043-1.234.052-3.638.052s-2.688-.01-3.637-.052c-.877-.04-1.354-.187-1.67-.31-.42-.163-.72-.358-1.036-.673-.315-.315-.51-.615-.673-1.035-.123-.317-.27-.794-.31-1.67-.043-.95-.052-1.235-.052-3.638s.01-2.688.052-3.637c.04-.877.187-1.354.31-1.67.163-.42.358-.72.673-1.036.315-.315.615-.51 1.035-.673.317-.123.794-.27 1.67-.31.95-.043 1.235-.052 3.638-.052M12 3c-2.444 0-2.75.01-3.71.054s-1.613.196-2.185.418c-.592.23-1.094.538-1.594 1.04-.5.5-.807 1-1.037 1.593-.223.572-.375 1.226-.42 2.184C3.01 9.25 3 9.555 3 12s.01 2.75.054 3.71.196 1.613.418 2.186c.23.592.538 1.094 1.038 1.594s1.002.808 1.594 1.038c.572.222 1.227.375 2.185.418.96.044 1.266.054 3.71.054s2.75-.01 3.71-.054 1.613-.196 2.186-.418c.592-.23 1.094-.538 1.594-1.038s.808-1.002 1.038-1.594c.222-.572.375-1.227.418-2.185.044-.96.054-1.266.054-3.71s-.01-2.75-.054-3.71-.196-1.613-.418-2.186c-.23-.592-.538-1.094-1.038-1.594s-1.002-.808-1.594-1.038c-.572-.222-1.227-.375-2.185-.418C14.75 3.01 14.445 3 12 3zm0 4.378c-2.552 0-4.622 2.07-4.622 4.622s2.07 4.622 4.622 4.622 4.622-2.07 4.622-4.622S14.552 7.378 12 7.378zM12 15c-1.657 0-3-1.343-3-3s1.343-3 3-3 3 1.343 3 3-1.343 3-3 3zm4.804-8.884c-.596 0-1.08.484-1.08 1.08s.484 1.08 1.08 1.08c.596 0 1.08-.484 1.08-1.08s-.483-1.08-1.08-1.08z" }) }) });
15096 + const embedWordPressIcon = {
15097 + foreground: "#0073AA",
15098 + src: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.SVG, { viewBox: "0 0 24 24", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.G, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Path, { d: "M12.158 12.786l-2.698 7.84c.806.236 1.657.365 2.54.365 1.047 0 2.05-.18 2.986-.51-.024-.037-.046-.078-.065-.123l-2.762-7.57zM3.008 12c0 3.56 2.07 6.634 5.068 8.092L3.788 8.342c-.5 1.117-.78 2.354-.78 3.658zm15.06-.454c0-1.112-.398-1.88-.74-2.48-.456-.74-.883-1.368-.883-2.11 0-.825.627-1.595 1.51-1.595.04 0 .078.006.116.008-1.598-1.464-3.73-2.36-6.07-2.36-3.14 0-5.904 1.613-7.512 4.053.21.008.41.012.58.012.94 0 2.395-.114 2.395-.114.484-.028.54.684.057.74 0 0-.487.058-1.03.086l3.275 9.74 1.968-5.902-1.4-3.838c-.485-.028-.944-.085-.944-.085-.486-.03-.43-.77.056-.742 0 0 1.484.114 2.368.114.94 0 2.397-.114 2.397-.114.486-.028.543.684.058.74 0 0-.488.058-1.03.086l3.25 9.665.897-2.997c.456-1.17.684-2.137.684-2.907zm1.82-3.86c.04.286.06.593.06.924 0 .912-.17 1.938-.683 3.22l-2.746 7.94c2.672-1.558 4.47-4.454 4.47-7.77 0-1.564-.4-3.033-1.1-4.314zM12 22C6.486 22 2 17.514 2 12S6.486 2 12 2s10 4.486 10 10-4.486 10-10 10z" }) }) })
15099 + };
15100 + const embedSpotifyIcon = {
15101 + foreground: "#1db954",
15102 + src: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.SVG, { viewBox: "0 0 24 24", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Path, { d: "M12 2C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10S17.523 2 12 2m4.586 14.424c-.18.295-.563.387-.857.207-2.35-1.434-5.305-1.76-8.786-.963-.335.077-.67-.133-.746-.47-.077-.334.132-.67.47-.745 3.808-.87 7.076-.496 9.712 1.115.293.18.386.563.206.857M17.81 13.7c-.226.367-.706.482-1.072.257-2.687-1.652-6.785-2.13-9.965-1.166-.413.127-.848-.106-.973-.517-.125-.413.108-.848.52-.973 3.632-1.102 8.147-.568 11.234 1.328.366.226.48.707.256 1.072m.105-2.835C14.692 8.95 9.375 8.775 6.297 9.71c-.493.15-1.016-.13-1.166-.624-.148-.495.13-1.017.625-1.167 3.532-1.073 9.404-.866 13.115 1.337.445.264.59.838.327 1.282-.264.443-.838.59-1.282.325" }) })
15103 + };
15104 + const embedFlickrIcon = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.SVG, { viewBox: "0 0 24 24", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Path, { d: "m6.5 7c-2.75 0-5 2.25-5 5s2.25 5 5 5 5-2.25 5-5-2.25-5-5-5zm11 0c-2.75 0-5 2.25-5 5s2.25 5 5 5 5-2.25 5-5-2.25-5-5-5z" }) });
15105 + const embedVimeoIcon = {
15106 + foreground: "#1ab7ea",
15107 + src: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.G, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Path, { d: "M22.396 7.164c-.093 2.026-1.507 4.8-4.245 8.32C15.323 19.16 12.93 21 10.97 21c-1.214 0-2.24-1.12-3.08-3.36-.56-2.052-1.118-4.105-1.68-6.158-.622-2.24-1.29-3.36-2.004-3.36-.156 0-.7.328-1.634.98l-.978-1.26c1.027-.903 2.04-1.806 3.037-2.71C6 3.95 7.03 3.328 7.716 3.265c1.62-.156 2.616.95 2.99 3.32.404 2.558.685 4.148.84 4.77.468 2.12.982 3.18 1.543 3.18.435 0 1.09-.687 1.963-2.064.872-1.376 1.34-2.422 1.402-3.142.125-1.187-.343-1.782-1.4-1.782-.5 0-1.013.115-1.542.34 1.023-3.35 2.977-4.976 5.862-4.883 2.14.063 3.148 1.45 3.024 4.16z" }) }) })
15108 + };
15109 + const embedRedditIcon = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.SVG, { viewBox: "0 0 24 24", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Path, { d: "M22 12.068a2.184 2.184 0 0 0-2.186-2.186c-.592 0-1.13.233-1.524.609-1.505-1.075-3.566-1.774-5.86-1.864l1.004-4.695 3.261.699A1.56 1.56 0 1 0 18.255 3c-.61-.001-1.147.357-1.398.877l-3.638-.77a.382.382 0 0 0-.287.053.348.348 0 0 0-.161.251l-1.112 5.233c-2.33.072-4.426.77-5.95 1.864a2.201 2.201 0 0 0-1.523-.61 2.184 2.184 0 0 0-.896 4.176c-.036.215-.053.43-.053.663 0 3.37 3.924 6.111 8.763 6.111s8.763-2.724 8.763-6.11c0-.216-.017-.449-.053-.664A2.207 2.207 0 0 0 22 12.068Zm-15.018 1.56a1.56 1.56 0 0 1 3.118 0c0 .86-.699 1.558-1.559 1.558-.86.018-1.559-.699-1.559-1.559Zm8.728 4.139c-1.076 1.075-3.119 1.147-3.71 1.147-.61 0-2.652-.09-3.71-1.147a.4.4 0 0 1 0-.573.4.4 0 0 1 .574 0c.68.68 2.114.914 3.136.914 1.022 0 2.473-.233 3.136-.914a.4.4 0 0 1 .574 0 .436.436 0 0 1 0 .573Zm-.287-2.563a1.56 1.56 0 0 1 0-3.118c.86 0 1.56.699 1.56 1.56 0 .841-.7 1.558-1.56 1.558Z" }) });
15110 + const embedTumblrIcon = {
15111 + foreground: "#35465c",
15112 + src: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.SVG, { viewBox: "0 0 24 24", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Path, { d: "M19 3H5a2 2 0 00-2 2v14c0 1.1.9 2 2 2h14a2 2 0 002-2V5a2 2 0 00-2-2zm-5.69 14.66c-2.72 0-3.1-1.9-3.1-3.16v-3.56H8.49V8.99c1.7-.62 2.54-1.99 2.64-2.87 0-.06.06-.41.06-.58h1.9v3.1h2.17v2.3h-2.18v3.1c0 .47.13 1.3 1.2 1.26h1.1v2.36c-1.01.02-2.07 0-2.07 0z" }) })
15113 + };
15114 + const embedAmazonIcon = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.SVG, { viewBox: "0 0 24 24", children: [
15115 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Path, { d: "M18.42 14.58c-.51-.66-1.05-1.23-1.05-2.5V7.87c0-1.8.15-3.45-1.2-4.68-1.05-1.02-2.79-1.35-4.14-1.35-2.6 0-5.52.96-6.12 4.14-.06.36.18.54.4.57l2.66.3c.24-.03.42-.27.48-.5.24-1.12 1.17-1.63 2.2-1.63.56 0 1.22.21 1.55.7.4.56.33 1.31.33 1.97v.36c-1.59.18-3.66.27-5.16.93a4.63 4.63 0 0 0-2.93 4.44c0 2.82 1.8 4.23 4.1 4.23 1.95 0 3.03-.45 4.53-1.98.51.72.66 1.08 1.59 1.83.18.09.45.09.63-.1v.04l2.1-1.8c.24-.21.2-.48.03-.75zm-5.4-1.2c-.45.75-1.14 1.23-1.92 1.23-1.05 0-1.65-.81-1.65-1.98 0-2.31 2.1-2.73 4.08-2.73v.6c0 1.05.03 1.92-.5 2.88z" }),
15116 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Path, { d: "M21.69 19.2a17.62 17.62 0 0 1-21.6-1.57c-.23-.2 0-.5.28-.33a23.88 23.88 0 0 0 20.93 1.3c.45-.19.84.3.39.6z" }),
15117 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Path, { d: "M22.8 17.96c-.36-.45-2.22-.2-3.1-.12-.23.03-.3-.18-.05-.36 1.5-1.05 3.96-.75 4.26-.39.3.36-.1 2.82-1.5 4.02-.21.18-.42.1-.3-.15.3-.8 1.02-2.58.69-3z" })
15118 + ] });
15119 + const embedAnimotoIcon = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.SVG, { viewBox: "0 0 24 24", children: [
15120 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
15121 + external_wp_components_namespaceObject.Path,
15122 + {
15123 + d: "m.0206909 21 19.8160091-13.07806 3.5831 6.20826z",
15124 + fill: "#4bc7ee"
15125 + }
15126 + ),
15127 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
15128 + external_wp_components_namespaceObject.Path,
15129 + {
15130 + d: "m23.7254 19.0205-10.1074-17.18468c-.6421-1.114428-1.7087-1.114428-2.3249 0l-11.2931 19.16418h22.5655c1.279 0 1.8019-.8905 1.1599-1.9795z",
15131 + fill: "#d4cdcb"
15132 + }
15133 + ),
15134 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
15135 + external_wp_components_namespaceObject.Path,
15136 + {
15137 + d: "m.0206909 21 15.2439091-16.38571 4.3029 7.32271z",
15138 + fill: "#c3d82e"
15139 + }
15140 + ),
15141 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
15142 + external_wp_components_namespaceObject.Path,
15143 + {
15144 + d: "m13.618 1.83582c-.6421-1.114428-1.7087-1.114428-2.3249 0l-11.2931 19.16418 15.2646-16.38573z",
15145 + fill: "#e4ecb0"
15146 + }
15147 + ),
15148 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Path, { d: "m.0206909 21 19.5468091-9.063 1.6621 2.8344z", fill: "#209dbd" }),
15149 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
15150 + external_wp_components_namespaceObject.Path,
15151 + {
15152 + d: "m.0206909 21 17.9209091-11.82623 1.6259 2.76323z",
15153 + fill: "#7cb3c9"
15154 + }
15155 + )
15156 + ] });
15157 + const embedDailymotionIcon = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.SVG, { viewBox: "0 0 24 24", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
15158 + external_wp_components_namespaceObject.Path,
15159 + {
15160 + d: "M11.903 16.568c-1.82 0-3.124-1.281-3.124-2.967a2.987 2.987 0 0 1 2.989-2.989c1.663 0 2.944 1.304 2.944 3.034 0 1.663-1.281 2.922-2.81 2.922ZM17.997 3l-3.308.73v5.107c-.809-1.034-2.045-1.37-3.505-1.37-1.529 0-2.9.561-4.023 1.662-1.259 1.214-1.933 2.764-1.933 4.495 0 1.888.72 3.506 2.113 4.742 1.056.944 2.314 1.415 3.775 1.415 1.438 0 2.517-.382 3.573-1.415v1.415h3.308V3Z",
15161 + fill: "#333436"
15162 + }
15163 + ) });
15164 + const embedPinterestIcon = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.SVG, { width: "24", height: "24", viewBox: "0 0 24 24", version: "1.1", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Path, { d: "M12.289,2C6.617,2,3.606,5.648,3.606,9.622c0,1.846,1.025,4.146,2.666,4.878c0.25,0.111,0.381,0.063,0.439-0.169 c0.044-0.175,0.267-1.029,0.365-1.428c0.032-0.128,0.017-0.237-0.091-0.362C6.445,11.911,6.01,10.75,6.01,9.668 c0-2.777,2.194-5.464,5.933-5.464c3.23,0,5.49,2.108,5.49,5.122c0,3.407-1.794,5.768-4.13,5.768c-1.291,0-2.257-1.021-1.948-2.277 c0.372-1.495,1.089-3.112,1.089-4.191c0-0.967-0.542-1.775-1.663-1.775c-1.319,0-2.379,1.309-2.379,3.059 c0,1.115,0.394,1.869,0.394,1.869s-1.302,5.279-1.54,6.261c-0.405,1.666,0.053,4.368,0.094,4.604 c0.021,0.126,0.167,0.169,0.25,0.063c0.129-0.165,1.699-2.419,2.142-4.051c0.158-0.59,0.817-2.995,0.817-2.995 c0.43,0.784,1.681,1.446,3.013,1.446c3.963,0,6.822-3.494,6.822-7.833C20.394,5.112,16.849,2,12.289,2" }) });
15165 + const embedWolframIcon = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.SVG, { viewBox: "0 0 44 44", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Path, { d: "M32.59521,22.001l4.31885-4.84473-6.34131-1.38379.646-6.459-5.94336,2.61035L22,6.31934l-3.27344,5.60351L12.78418,9.3125l.645,6.458L7.08643,17.15234,11.40479,21.999,7.08594,26.84375l6.34131,1.38379-.64551,6.458,5.94287-2.60938L22,37.68066l3.27344-5.60351,5.94287,2.61035-.64551-6.458,6.34277-1.38183Zm.44385,2.75244L30.772,23.97827l-1.59558-2.07391,1.97888.735Zm-8.82147,6.1579L22.75,33.424V30.88977l1.52228-2.22168ZM18.56226,13.48816,19.819,15.09534l-2.49219-.88642L15.94037,12.337Zm6.87719.00116,2.62043-1.15027-1.38654,1.86981L24.183,15.0946Zm3.59357,2.6029-1.22546,1.7381.07525-2.73486,1.44507-1.94867ZM22,29.33008l-2.16406-3.15686L22,23.23688l2.16406,2.93634Zm-4.25458-9.582-.10528-3.836,3.60986,1.284v3.73242Zm5.00458-2.552,3.60986-1.284-.10528,3.836L22.75,20.92853Zm-7.78174-1.10559-.29352-2.94263,1.44245,1.94739.07519,2.73321Zm2.30982,5.08319,3.50817,1.18164-2.16247,2.9342-3.678-1.08447Zm2.4486,7.49285L21.25,30.88977v2.53485L19.78052,30.91Zm3.48707-6.31121,3.50817-1.18164,2.33228,3.03137-3.678,1.08447Zm10.87219-4.28113-2.714,3.04529L28.16418,19.928l1.92176-2.72565ZM24.06036,12.81769l-2.06012,2.6322-2.059-2.63318L22,9.292ZM9.91455,18.07227l4.00079-.87195,1.921,2.72735-3.20794,1.19019Zm2.93024,4.565,1.9801-.73462L13.228,23.97827l-2.26838.77429Zm-1.55591,3.58819L13.701,25.4021l2.64935.78058-2.14447.67853Zm3.64868,1.977L18.19,27.17334l.08313,3.46332L14.52979,32.2793Zm10.7876,2.43549.08447-3.464,3.25165,1.03052.407,4.07684Zm4.06824-3.77478-2.14545-.68,2.65063-.781,2.41266.825Z" }) });
15166 + const embedPocketCastsIcon = {
15167 + foreground: "#f43e37",
15168 + src: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(
15169 + external_wp_components_namespaceObject.SVG,
15170 + {
15171 + width: "24",
15172 + height: "24",
15173 + viewBox: "0 0 24 24",
15174 + fill: "none",
15175 + xmlns: "http://www.w3.org/2000/svg",
15176 + children: [
15177 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
15178 + external_wp_components_namespaceObject.Path,
15179 + {
15180 + fillRule: "evenodd",
15181 + clipRule: "evenodd",
15182 + d: "M24,12A12,12,0,1,1,12,0,12,12,0,0,1,24,12Z"
15183 + }
15184 + ),
15185 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
15186 + external_wp_components_namespaceObject.Path,
15187 + {
15188 + fillRule: "evenodd",
15189 + clipRule: "evenodd",
15190 + d: "M2.67,12a9.33,9.33,0,0,1,18.66,0H19a7,7,0,1,0-7,7v2.33A9.33,9.33,0,0,1,2.67,12ZM12,17.6A5.6,5.6,0,1,1,17.6,12h-2A3.56,3.56,0,1,0,12,15.56Z",
15191 + fill: "#fff"
15192 + }
15193 + )
15194 + ]
15195 + }
15196 + )
15197 + };
15198 + const embedBlueskyIcon = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.SVG, { viewBox: "0 0 24 24", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
15199 + external_wp_components_namespaceObject.Path,
15200 + {
15201 + fill: "#0a7aff",
15202 + d: "M6.3,4.2c2.3,1.7,4.8,5.3,5.7,7.2.9-1.9,3.4-5.4,5.7-7.2,1.7-1.3,4.3-2.2,4.3.9s-.4,5.2-.6,5.9c-.7,2.6-3.3,3.2-5.6,2.8,4,.7,5.1,3,2.9,5.3-5,5.2-6.7-2.8-6.7-2.8,0,0-1.7,8-6.7,2.8-2.2-2.3-1.2-4.6,2.9-5.3-2.3.4-4.9-.3-5.6-2.8-.2-.7-.6-5.3-.6-5.9,0-3.1,2.7-2.1,4.3-.9h0Z"
15203 + }
15204 + ) });
15205 +
15206 +
15207 + ;// ./node_modules/@wordpress/block-library/build-module/embed/embed-loading.js
15208 +
15209 +
15210 + const EmbedLoading = () => /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { className: "wp-block-embed is-loading", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Spinner, {}) });
15211 + var embed_loading_default = EmbedLoading;
15212 +
15213 +
15214 + ;// ./node_modules/@wordpress/block-library/build-module/embed/embed-placeholder.js
15215 +
15216 +
15217 +
15218 +
15219 + const EmbedPlaceholder = ({
15220 + icon,
15221 + label,
15222 + value,
15223 + onSubmit,
15224 + onChange,
15225 + cannotEmbed,
15226 + fallback,
15227 + tryAgain
15228 + }) => {
15229 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(
15230 + external_wp_components_namespaceObject.Placeholder,
15231 + {
15232 + icon: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockIcon, { icon, showColors: true }),
15233 + label,
15234 + className: "wp-block-embed",
15235 + instructions: (0,external_wp_i18n_namespaceObject.__)(
15236 + "Paste a link to the content you want to display on your site."
15237 + ),
15238 + children: [
15239 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("form", { onSubmit, children: [
15240 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
15241 + external_wp_components_namespaceObject.__experimentalInputControl,
15242 + {
15243 + __next40pxDefaultSize: true,
15244 + type: "url",
15245 + value: value || "",
15246 + className: "wp-block-embed__placeholder-input",
15247 + label,
15248 + hideLabelFromVision: true,
15249 + placeholder: (0,external_wp_i18n_namespaceObject.__)("Enter URL to embed here\u2026"),
15250 + onChange
15251 + }
15252 + ),
15253 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Button, { __next40pxDefaultSize: true, variant: "primary", type: "submit", children: (0,external_wp_i18n_namespaceObject._x)("Embed", "button label") })
15254 + ] }),
15255 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { className: "wp-block-embed__learn-more", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
15256 + external_wp_components_namespaceObject.ExternalLink,
15257 + {
15258 + href: (0,external_wp_i18n_namespaceObject.__)(
15259 + "https://wordpress.org/documentation/article/embeds/"
15260 + ),
15261 + children: (0,external_wp_i18n_namespaceObject.__)("Learn more about embeds")
15262 + }
15263 + ) }),
15264 + cannotEmbed && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.__experimentalVStack, { spacing: 3, className: "components-placeholder__error", children: [
15265 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { className: "components-placeholder__instructions", children: (0,external_wp_i18n_namespaceObject.__)("Sorry, this content could not be embedded.") }),
15266 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(
15267 + external_wp_components_namespaceObject.__experimentalHStack,
15268 + {
15269 + expanded: false,
15270 + spacing: 3,
15271 + justify: "flex-start",
15272 + children: [
15273 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
15274 + external_wp_components_namespaceObject.Button,
15275 + {
15276 + __next40pxDefaultSize: true,
15277 + variant: "secondary",
15278 + onClick: tryAgain,
15279 + children: (0,external_wp_i18n_namespaceObject._x)("Try again", "button label")
15280 + }
15281 + ),
15282 + " ",
15283 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
15284 + external_wp_components_namespaceObject.Button,
15285 + {
15286 + __next40pxDefaultSize: true,
15287 + variant: "secondary",
15288 + onClick: fallback,
15289 + children: (0,external_wp_i18n_namespaceObject._x)("Convert to link", "button label")
15290 + }
15291 + )
15292 + ]
15293 + }
15294 + )
15295 + ] })
15296 + ]
15297 + }
15298 + );
15299 + };
15300 + var embed_placeholder_default = EmbedPlaceholder;
15301 +
15302 +
15303 + ;// ./node_modules/@wordpress/block-library/build-module/embed/wp-embed-preview.js
15304 +
15305 +
15306 +
15307 + const attributeMap = {
15308 + class: "className",
15309 + frameborder: "frameBorder",
15310 + marginheight: "marginHeight",
15311 + marginwidth: "marginWidth"
15312 + };
15313 + function WpEmbedPreview({ html }) {
15314 + const ref = (0,external_wp_element_namespaceObject.useRef)();
15315 + const props = (0,external_wp_element_namespaceObject.useMemo)(() => {
15316 + const doc = new window.DOMParser().parseFromString(html, "text/html");
15317 + const iframe = doc.querySelector("iframe");
15318 + const iframeProps = {};
15319 + if (!iframe) {
15320 + return iframeProps;
15321 + }
15322 + Array.from(iframe.attributes).forEach(({ name, value }) => {
15323 + if (name === "style") {
15324 + return;
15325 + }
15326 + iframeProps[attributeMap[name] || name] = value;
15327 + });
15328 + return iframeProps;
15329 + }, [html]);
15330 + (0,external_wp_element_namespaceObject.useEffect)(() => {
15331 + const { ownerDocument } = ref.current;
15332 + const { defaultView } = ownerDocument;
15333 + function resizeWPembeds({ data: { secret, message, value } = {} }) {
15334 + if (message !== "height" || secret !== props["data-secret"]) {
15335 + return;
15336 + }
15337 + ref.current.height = value;
15338 + }
15339 + defaultView.addEventListener("message", resizeWPembeds);
15340 + return () => {
15341 + defaultView.removeEventListener("message", resizeWPembeds);
15342 + };
15343 + }, []);
15344 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { className: "wp-block-embed__wrapper", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
15345 + "iframe",
15346 + {
15347 + ref: (0,external_wp_compose_namespaceObject.useMergeRefs)([ref, (0,external_wp_compose_namespaceObject.useFocusableIframe)()]),
15348 + title: props.title,
15349 + ...props
15350 + }
15351 + ) });
15352 + }
15353 +
15354 +
15355 + ;// ./node_modules/@wordpress/block-library/build-module/embed/embed-preview.js
15356 +
15357 +
15358 +
15359 +
15360 +
15361 +
15362 +
15363 +
15364 +
15365 + function EmbedPreview({
15366 + preview,
15367 + previewable,
15368 + url,
15369 + type,
15370 + isSelected,
15371 + className,
15372 + icon,
15373 + label
15374 + }) {
15375 + const [interactive, setInteractive] = (0,external_wp_element_namespaceObject.useState)(false);
15376 + if (!isSelected && interactive) {
15377 + setInteractive(false);
15378 + }
15379 + const hideOverlay = () => {
15380 + setInteractive(true);
15381 + };
15382 + const { scripts } = preview;
15383 + const html = "photo" === type ? getPhotoHtml(preview) : preview.html;
15384 + const embedSourceUrl = (0,external_wp_url_namespaceObject.getAuthority)(url);
15385 + const iframeTitle = (0,external_wp_i18n_namespaceObject.sprintf)(
15386 + // translators: %s: host providing embed content e.g: www.youtube.com
15387 + (0,external_wp_i18n_namespaceObject.__)("Embedded content from %s"),
15388 + embedSourceUrl
15389 + );
15390 + const sandboxClassnames = dist_clsx(
15391 + type,
15392 + className,
15393 + "wp-block-embed__wrapper"
15394 + );
15395 + const embedWrapper = "wp-embed" === type ? /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(WpEmbedPreview, { html }) : /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", { className: "wp-block-embed__wrapper", children: [
15396 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
15397 + external_wp_components_namespaceObject.SandBox,
15398 + {
15399 + html,
15400 + scripts,
15401 + title: iframeTitle,
15402 + type: sandboxClassnames,
15403 + onFocus: hideOverlay
15404 + }
15405 + ),
15406 + !interactive && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
15407 + "div",
15408 + {
15409 + className: "block-library-embed__interactive-overlay",
15410 + onMouseUp: hideOverlay
15411 + }
15412 + )
15413 + ] });
15414 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: previewable ? embedWrapper : /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(
15415 + external_wp_components_namespaceObject.Placeholder,
15416 + {
15417 + icon: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockIcon, { icon, showColors: true }),
15418 + label,
15419 + children: [
15420 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("p", { className: "components-placeholder__error", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("a", { href: url, children: url }) }),
15421 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("p", { className: "components-placeholder__error", children: (0,external_wp_i18n_namespaceObject.sprintf)(
15422 + /* translators: %s: host providing embed content e.g: www.youtube.com */
15423 + (0,external_wp_i18n_namespaceObject.__)(
15424 + "Embedded content from %s can't be previewed in the editor."
15425 + ),
15426 + embedSourceUrl
15427 + ) })
15428 + ]
15429 + }
15430 + ) });
15431 + }
15432 +
15433 +
15434 + ;// ./node_modules/@wordpress/block-library/build-module/embed/edit.js
15435 +
15436 +
15437 +
15438 +
15439 +
15440 +
15441 +
15442 +
15443 +
15444 +
15445 +
15446 +
15447 +
15448 +
15449 +
15450 +
15451 + const EmbedEdit = (props) => {
15452 + const {
15453 + attributes: {
15454 + providerNameSlug,
15455 + previewable,
15456 + responsive,
15457 + url: attributesUrl
15458 + },
15459 + attributes,
15460 + isSelected,
15461 + onReplace,
15462 + setAttributes,
15463 + insertBlocksAfter,
15464 + onFocus
15465 + } = props;
15466 + const defaultEmbedInfo = {
15467 + title: (0,external_wp_i18n_namespaceObject._x)("Embed", "block title"),
15468 + icon: embedContentIcon
15469 + };
15470 + const { icon, title } = getEmbedInfoByProvider(providerNameSlug) || defaultEmbedInfo;
15471 + const [url, setURL] = (0,external_wp_element_namespaceObject.useState)(attributesUrl);
15472 + const [isEditingURL, setIsEditingURL] = (0,external_wp_element_namespaceObject.useState)(false);
15473 + const { invalidateResolution } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_coreData_namespaceObject.store);
15474 + const {
15475 + preview,
15476 + fetching,
15477 + themeSupportsResponsive,
15478 + cannotEmbed,
15479 + hasResolved
15480 + } = (0,external_wp_data_namespaceObject.useSelect)(
15481 + (select) => {
15482 + const {
15483 + getEmbedPreview,
15484 + isPreviewEmbedFallback,
15485 + isRequestingEmbedPreview,
15486 + getThemeSupports,
15487 + hasFinishedResolution
15488 + } = select(external_wp_coreData_namespaceObject.store);
15489 + if (!attributesUrl) {
15490 + return { fetching: false, cannotEmbed: false };
15491 + }
15492 + const embedPreview = getEmbedPreview(attributesUrl);
15493 + const previewIsFallback = isPreviewEmbedFallback(attributesUrl);
15494 + const badEmbedProvider = embedPreview?.html === false && embedPreview?.type === void 0;
15495 + const wordpressCantEmbed = embedPreview?.data?.status === 404;
15496 + const validPreview = !!embedPreview && !badEmbedProvider && !wordpressCantEmbed;
15497 + return {
15498 + preview: validPreview ? embedPreview : void 0,
15499 + fetching: isRequestingEmbedPreview(attributesUrl),
15500 + themeSupportsResponsive: getThemeSupports()["responsive-embeds"],
15501 + cannotEmbed: !validPreview || previewIsFallback,
15502 + hasResolved: hasFinishedResolution("getEmbedPreview", [
15503 + attributesUrl
15504 + ])
15505 + };
15506 + },
15507 + [attributesUrl]
15508 + );
15509 + const getMergedAttributes = () => getMergedAttributesWithPreview(
15510 + attributes,
15511 + preview,
15512 + title,
15513 + responsive
15514 + );
15515 + function toggleResponsive(newAllowResponsive) {
15516 + const { className: className2 } = attributes;
15517 + const { html } = preview;
15518 + setAttributes({
15519 + allowResponsive: newAllowResponsive,
15520 + className: getClassNames(
15521 + html,
15522 + className2,
15523 + responsive && newAllowResponsive
15524 + )
15525 + });
15526 + }
15527 + (0,external_wp_element_namespaceObject.useEffect)(() => {
15528 + if (preview?.html || !cannotEmbed || !hasResolved) {
15529 + return;
15530 + }
15531 + const newURL = attributesUrl.replace(/\/$/, "");
15532 + setURL(newURL);
15533 + setIsEditingURL(false);
15534 + setAttributes({ url: newURL });
15535 + }, [
15536 + preview?.html,
15537 + attributesUrl,
15538 + cannotEmbed,
15539 + hasResolved,
15540 + setAttributes
15541 + ]);
15542 + (0,external_wp_element_namespaceObject.useEffect)(() => {
15543 + if (!cannotEmbed || fetching || !url) {
15544 + return;
15545 + }
15546 + if ((0,external_wp_url_namespaceObject.getAuthority)(url) === "x.com") {
15547 + const newURL = new URL(url);
15548 + newURL.host = "twitter.com";
15549 + setAttributes({ url: newURL.toString() });
15550 + }
15551 + }, [url, cannotEmbed, fetching, setAttributes]);
15552 + (0,external_wp_element_namespaceObject.useEffect)(() => {
15553 + if (preview && !isEditingURL) {
15554 + const mergedAttributes = getMergedAttributes();
15555 + const hasChanges = Object.keys(mergedAttributes).some(
15556 + (key) => mergedAttributes[key] !== attributes[key]
15557 + );
15558 + if (hasChanges) {
15559 + setAttributes(mergedAttributes);
15560 + }
15561 + if (onReplace) {
15562 + const upgradedBlock = createUpgradedEmbedBlock(
15563 + props,
15564 + mergedAttributes
15565 + );
15566 + if (upgradedBlock) {
15567 + onReplace(upgradedBlock);
15568 + }
15569 + }
15570 + }
15571 + }, [preview, isEditingURL]);
15572 + const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)();
15573 + if (fetching) {
15574 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.View, { ...blockProps, children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(embed_loading_default, {}) });
15575 + }
15576 + const label = (0,external_wp_i18n_namespaceObject.sprintf)((0,external_wp_i18n_namespaceObject.__)("%s URL"), title);
15577 + const showEmbedPlaceholder = !preview || cannotEmbed || isEditingURL;
15578 + if (showEmbedPlaceholder) {
15579 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.View, { ...blockProps, children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
15580 + embed_placeholder_default,
15581 + {
15582 + icon,
15583 + label,
15584 + onFocus,
15585 + onSubmit: (event) => {
15586 + if (event) {
15587 + event.preventDefault();
15588 + }
15589 + const blockClass = removeAspectRatioClasses(
15590 + attributes.className
15591 + );
15592 + setIsEditingURL(false);
15593 + setAttributes({ url, className: blockClass });
15594 + },
15595 + value: url,
15596 + cannotEmbed,
15597 + onChange: (value) => setURL(value),
15598 + fallback: () => fallback(url, onReplace),
15599 + tryAgain: () => {
15600 + invalidateResolution("getEmbedPreview", [url]);
15601 + }
15602 + }
15603 + ) });
15604 + }
15605 + const {
15606 + caption,
15607 + type,
15608 + allowResponsive,
15609 + className: classFromPreview
15610 + } = getMergedAttributes();
15611 + const className = dist_clsx(classFromPreview, props.className);
15612 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
15613 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
15614 + embed_controls_default,
15615 + {
15616 + showEditButton: preview && !cannotEmbed,
15617 + themeSupportsResponsive,
15618 + blockSupportsResponsive: responsive,
15619 + allowResponsive,
15620 + toggleResponsive,
15621 + switchBackToURLInput: () => setIsEditingURL(true)
15622 + }
15623 + ),
15624 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(
15625 + "figure",
15626 + {
15627 + ...blockProps,
15628 + className: dist_clsx(blockProps.className, className, {
15629 + [`is-type-${type}`]: type,
15630 + [`is-provider-${providerNameSlug}`]: providerNameSlug,
15631 + [`wp-block-embed-${providerNameSlug}`]: providerNameSlug
15632 + }),
15633 + children: [
15634 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
15635 + EmbedPreview,
15636 + {
15637 + preview,
15638 + previewable,
15639 + className,
15640 + url,
15641 + type,
15642 + caption,
15643 + onCaptionChange: (value) => setAttributes({ caption: value }),
15644 + isSelected,
15645 + icon,
15646 + label,
15647 + insertBlocksAfter,
15648 + attributes,
15649 + setAttributes
15650 + }
15651 + ),
15652 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
15653 + Caption,
15654 + {
15655 + attributes,
15656 + setAttributes,
15657 + isSelected,
15658 + insertBlocksAfter,
15659 + label: (0,external_wp_i18n_namespaceObject.__)("Embed caption text"),
15660 + showToolbarButton: isSelected
15661 + }
15662 + )
15663 + ]
15664 + }
15665 + )
15666 + ] });
15667 + };
15668 + var embed_edit_edit_default = EmbedEdit;
15669 +
15670 +
15671 + ;// ./node_modules/@wordpress/block-library/build-module/embed/save.js
15672 +
15673 +
15674 +
15675 + function embed_save_save({ attributes }) {
15676 + const { url, caption, type, providerNameSlug } = attributes;
15677 + if (!url) {
15678 + return null;
15679 + }
15680 + const className = dist_clsx("wp-block-embed", {
15681 + [`is-type-${type}`]: type,
15682 + [`is-provider-${providerNameSlug}`]: providerNameSlug,
15683 + [`wp-block-embed-${providerNameSlug}`]: providerNameSlug
15684 + });
15685 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("figure", { ...external_wp_blockEditor_namespaceObject.useBlockProps.save({ className }), children: [
15686 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { className: "wp-block-embed__wrapper", children: `
15687 + ${url}
15688 + ` }),
15689 + !external_wp_blockEditor_namespaceObject.RichText.isEmpty(caption) && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
15690 + external_wp_blockEditor_namespaceObject.RichText.Content,
15691 + {
15692 + className: (0,external_wp_blockEditor_namespaceObject.__experimentalGetElementClassName)("caption"),
15693 + tagName: "figcaption",
15694 + value: caption
15695 + }
15696 + )
15697 + ] });
15698 + }
15699 +
15700 +
15701 + ;// ./node_modules/@wordpress/block-library/build-module/embed/transforms.js
15702 +
15703 +
15704 +
15705 + const { name: EMBED_BLOCK } = embed_block_namespaceObject;
15706 + const embed_transforms_transforms = {
15707 + from: [
15708 + {
15709 + type: "raw",
15710 + isMatch: (node) => node.nodeName === "P" && /^\s*(https?:\/\/\S+)\s*$/i.test(node.textContent) && node.textContent?.match(/https/gi)?.length === 1,
15711 + transform: (node) => {
15712 + return (0,external_wp_blocks_namespaceObject.createBlock)(EMBED_BLOCK, {
15713 + url: node.textContent.trim()
15714 + });
15715 + }
15716 + }
15717 + ],
15718 + to: [
15719 + {
15720 + type: "block",
15721 + blocks: ["core/paragraph"],
15722 + isMatch: ({ url }) => !!url,
15723 + transform: ({ url, caption, className }) => {
15724 + let value = `<a href="${url}">${url}</a>`;
15725 + if (caption?.trim()) {
15726 + value += `<br />${caption}`;
15727 + }
15728 + return (0,external_wp_blocks_namespaceObject.createBlock)("core/paragraph", {
15729 + content: value,
15730 + className: removeAspectRatioClasses(className)
15731 + });
15732 + }
15733 + }
15734 + ]
15735 + };
15736 + var embed_transforms_transforms_default = embed_transforms_transforms;
15737 +
15738 +
15739 + ;// ./node_modules/@wordpress/block-library/build-module/embed/variations.js
15740 +
15741 +
15742 + function getTitle(providerName) {
15743 + return (0,external_wp_i18n_namespaceObject.sprintf)(
15744 + /* translators: %s: provider name */
15745 + (0,external_wp_i18n_namespaceObject.__)("%s Embed"),
15746 + providerName
15747 + );
15748 + }
15749 + const embed_variations_variations = [
15750 + {
15751 + name: "twitter",
15752 + title: getTitle("Twitter"),
15753 + icon: embedTwitterIcon,
15754 + keywords: ["tweet", (0,external_wp_i18n_namespaceObject.__)("social")],
15755 + description: (0,external_wp_i18n_namespaceObject.__)("Embed a tweet."),
15756 + patterns: [/^https?:\/\/(www\.)?twitter\.com\/.+/i],
15757 + attributes: { providerNameSlug: "twitter", responsive: true }
15758 + },
15759 + {
15760 + name: "youtube",
15761 + title: getTitle("YouTube"),
15762 + icon: embedYouTubeIcon,
15763 + keywords: [(0,external_wp_i18n_namespaceObject.__)("music"), (0,external_wp_i18n_namespaceObject.__)("video")],
15764 + description: (0,external_wp_i18n_namespaceObject.__)("Embed a YouTube video."),
15765 + patterns: [
15766 + /^https?:\/\/((m|www)\.)?youtube\.com\/.+/i,
15767 + /^https?:\/\/youtu\.be\/.+/i
15768 + ],
15769 + attributes: { providerNameSlug: "youtube", responsive: true }
15770 + },
15771 + {
15772 + // Deprecate Facebook Embed per FB policy
15773 + // See: https://developers.facebook.com/docs/plugins/oembed-legacy
15774 + name: "facebook",
15775 + title: getTitle("Facebook"),
15776 + icon: embedFacebookIcon,
15777 + keywords: [(0,external_wp_i18n_namespaceObject.__)("social")],
15778 + description: (0,external_wp_i18n_namespaceObject.__)("Embed a Facebook post."),
15779 + scope: ["block"],
15780 + patterns: [],
15781 + attributes: {
15782 + providerNameSlug: "facebook",
15783 + previewable: false,
15784 + responsive: true
15785 + }
15786 + },
15787 + {
15788 + // Deprecate Instagram per FB policy
15789 + // See: https://developers.facebook.com/docs/instagram/oembed-legacy
15790 + name: "instagram",
15791 + title: getTitle("Instagram"),
15792 + icon: embedInstagramIcon,
15793 + keywords: [(0,external_wp_i18n_namespaceObject.__)("image"), (0,external_wp_i18n_namespaceObject.__)("social")],
15794 + description: (0,external_wp_i18n_namespaceObject.__)("Embed an Instagram post."),
15795 + scope: ["block"],
15796 + patterns: [],
15797 + attributes: { providerNameSlug: "instagram", responsive: true }
15798 + },
15799 + {
15800 + name: "wordpress",
15801 + title: getTitle("WordPress"),
15802 + icon: embedWordPressIcon,
15803 + keywords: [(0,external_wp_i18n_namespaceObject.__)("post"), (0,external_wp_i18n_namespaceObject.__)("blog")],
15804 + description: (0,external_wp_i18n_namespaceObject.__)("Embed a WordPress post."),
15805 + attributes: {
15806 + providerNameSlug: "wordpress"
15807 + }
15808 + },
15809 + {
15810 + name: "soundcloud",
15811 + title: getTitle("SoundCloud"),
15812 + icon: embedAudioIcon,
15813 + keywords: [(0,external_wp_i18n_namespaceObject.__)("music"), (0,external_wp_i18n_namespaceObject.__)("audio")],
15814 + description: (0,external_wp_i18n_namespaceObject.__)("Embed SoundCloud content."),
15815 + patterns: [/^https?:\/\/(www\.)?soundcloud\.com\/.+/i],
15816 + attributes: { providerNameSlug: "soundcloud", responsive: true }
15817 + },
15818 + {
15819 + name: "spotify",
15820 + title: getTitle("Spotify"),
15821 + icon: embedSpotifyIcon,
15822 + keywords: [(0,external_wp_i18n_namespaceObject.__)("music"), (0,external_wp_i18n_namespaceObject.__)("audio")],
15823 + description: (0,external_wp_i18n_namespaceObject.__)("Embed Spotify content."),
15824 + patterns: [/^https?:\/\/(open|play)\.spotify\.com\/.+/i],
15825 + attributes: { providerNameSlug: "spotify", responsive: true }
15826 + },
15827 + {
15828 + name: "flickr",
15829 + title: getTitle("Flickr"),
15830 + icon: embedFlickrIcon,
15831 + keywords: [(0,external_wp_i18n_namespaceObject.__)("image")],
15832 + description: (0,external_wp_i18n_namespaceObject.__)("Embed Flickr content."),
15833 + patterns: [
15834 + /^https?:\/\/(www\.)?flickr\.com\/.+/i,
15835 + /^https?:\/\/flic\.kr\/.+/i
15836 + ],
15837 + attributes: { providerNameSlug: "flickr", responsive: true }
15838 + },
15839 + {
15840 + name: "vimeo",
15841 + title: getTitle("Vimeo"),
15842 + icon: embedVimeoIcon,
15843 + keywords: [(0,external_wp_i18n_namespaceObject.__)("video")],
15844 + description: (0,external_wp_i18n_namespaceObject.__)("Embed a Vimeo video."),
15845 + patterns: [/^https?:\/\/(www\.)?vimeo\.com\/.+/i],
15846 + attributes: { providerNameSlug: "vimeo", responsive: true }
15847 + },
15848 + {
15849 + name: "animoto",
15850 + title: getTitle("Animoto"),
15851 + icon: embedAnimotoIcon,
15852 + description: (0,external_wp_i18n_namespaceObject.__)("Embed an Animoto video."),
15853 + patterns: [/^https?:\/\/(www\.)?(animoto|video214)\.com\/.+/i],
15854 + attributes: { providerNameSlug: "animoto", responsive: true }
15855 + },
15856 + {
15857 + name: "cloudup",
15858 + title: getTitle("Cloudup"),
15859 + icon: embedContentIcon,
15860 + description: (0,external_wp_i18n_namespaceObject.__)("Embed Cloudup content."),
15861 + patterns: [/^https?:\/\/cloudup\.com\/.+/i],
15862 + attributes: { providerNameSlug: "cloudup", responsive: true }
15863 + },
15864 + {
15865 + // Deprecated since CollegeHumor content is now powered by YouTube.
15866 + name: "collegehumor",
15867 + title: getTitle("CollegeHumor"),
15868 + icon: embedVideoIcon,
15869 + description: (0,external_wp_i18n_namespaceObject.__)("Embed CollegeHumor content."),
15870 + scope: ["block"],
15871 + patterns: [],
15872 + attributes: { providerNameSlug: "collegehumor", responsive: true }
15873 + },
15874 + {
15875 + name: "crowdsignal",
15876 + title: getTitle("Crowdsignal"),
15877 + icon: embedContentIcon,
15878 + keywords: ["polldaddy", (0,external_wp_i18n_namespaceObject.__)("survey")],
15879 + description: (0,external_wp_i18n_namespaceObject.__)("Embed Crowdsignal (formerly Polldaddy) content."),
15880 + patterns: [
15881 + /^https?:\/\/((.+\.)?polldaddy\.com|poll\.fm|.+\.crowdsignal\.net|.+\.survey\.fm)\/.+/i
15882 + ],
15883 + attributes: { providerNameSlug: "crowdsignal", responsive: true }
15884 + },
15885 + {
15886 + name: "dailymotion",
15887 + title: getTitle("Dailymotion"),
15888 + icon: embedDailymotionIcon,
15889 + keywords: [(0,external_wp_i18n_namespaceObject.__)("video")],
15890 + description: (0,external_wp_i18n_namespaceObject.__)("Embed a Dailymotion video."),
15891 + patterns: [/^https?:\/\/(www\.)?dailymotion\.com\/.+/i],
15892 + attributes: { providerNameSlug: "dailymotion", responsive: true }
15893 + },
15894 + {
15895 + name: "imgur",
15896 + title: getTitle("Imgur"),
15897 + icon: embedPhotoIcon,
15898 + description: (0,external_wp_i18n_namespaceObject.__)("Embed Imgur content."),
15899 + patterns: [/^https?:\/\/(.+\.)?imgur\.com\/.+/i],
15900 + attributes: { providerNameSlug: "imgur", responsive: true }
15901 + },
15902 + {
15903 + name: "issuu",
15904 + title: getTitle("Issuu"),
15905 + icon: embedContentIcon,
15906 + description: (0,external_wp_i18n_namespaceObject.__)("Embed Issuu content."),
15907 + patterns: [/^https?:\/\/(www\.)?issuu\.com\/.+/i],
15908 + attributes: { providerNameSlug: "issuu", responsive: true }
15909 + },
15910 + {
15911 + name: "kickstarter",
15912 + title: getTitle("Kickstarter"),
15913 + icon: embedContentIcon,
15914 + description: (0,external_wp_i18n_namespaceObject.__)("Embed Kickstarter content."),
15915 + patterns: [
15916 + /^https?:\/\/(www\.)?kickstarter\.com\/.+/i,
15917 + /^https?:\/\/kck\.st\/.+/i
15918 + ],
15919 + attributes: { providerNameSlug: "kickstarter", responsive: true }
15920 + },
15921 + {
15922 + name: "mixcloud",
15923 + title: getTitle("Mixcloud"),
15924 + icon: embedAudioIcon,
15925 + keywords: [(0,external_wp_i18n_namespaceObject.__)("music"), (0,external_wp_i18n_namespaceObject.__)("audio")],
15926 + description: (0,external_wp_i18n_namespaceObject.__)("Embed Mixcloud content."),
15927 + patterns: [/^https?:\/\/(www\.)?mixcloud\.com\/.+/i],
15928 + attributes: { providerNameSlug: "mixcloud", responsive: true }
15929 + },
15930 + {
15931 + name: "pocket-casts",
15932 + title: getTitle("Pocket Casts"),
15933 + icon: embedPocketCastsIcon,
15934 + keywords: [(0,external_wp_i18n_namespaceObject.__)("podcast"), (0,external_wp_i18n_namespaceObject.__)("audio")],
15935 + description: (0,external_wp_i18n_namespaceObject.__)("Embed a podcast player from Pocket Casts."),
15936 + patterns: [/^https:\/\/pca.st\/\w+/i],
15937 + attributes: { providerNameSlug: "pocket-casts", responsive: true }
15938 + },
15939 + {
15940 + name: "reddit",
15941 + title: getTitle("Reddit"),
15942 + icon: embedRedditIcon,
15943 + description: (0,external_wp_i18n_namespaceObject.__)("Embed a Reddit thread."),
15944 + patterns: [/^https?:\/\/(www\.)?reddit\.com\/.+/i],
15945 + attributes: { providerNameSlug: "reddit", responsive: true }
15946 + },
15947 + {
15948 + name: "reverbnation",
15949 + title: getTitle("ReverbNation"),
15950 + icon: embedAudioIcon,
15951 + description: (0,external_wp_i18n_namespaceObject.__)("Embed ReverbNation content."),
15952 + patterns: [/^https?:\/\/(www\.)?reverbnation\.com\/.+/i],
15953 + attributes: { providerNameSlug: "reverbnation", responsive: true }
15954 + },
15955 + {
15956 + name: "scribd",
15957 + title: getTitle("Scribd"),
15958 + icon: embedContentIcon,
15959 + description: (0,external_wp_i18n_namespaceObject.__)("Embed Scribd content."),
15960 + patterns: [/^https?:\/\/(www\.)?scribd\.com\/.+/i],
15961 + attributes: { providerNameSlug: "scribd", responsive: true }
15962 + },
15963 + {
15964 + name: "smugmug",
15965 + title: getTitle("SmugMug"),
15966 + icon: embedPhotoIcon,
15967 + description: (0,external_wp_i18n_namespaceObject.__)("Embed SmugMug content."),
15968 + patterns: [/^https?:\/\/(.+\.)?smugmug\.com\/.*/i],
15969 + attributes: {
15970 + providerNameSlug: "smugmug",
15971 + previewable: false,
15972 + responsive: true
15973 + }
15974 + },
15975 + {
15976 + name: "speaker-deck",
15977 + title: getTitle("Speaker Deck"),
15978 + icon: embedContentIcon,
15979 + description: (0,external_wp_i18n_namespaceObject.__)("Embed Speaker Deck content."),
15980 + patterns: [/^https?:\/\/(www\.)?speakerdeck\.com\/.+/i],
15981 + attributes: { providerNameSlug: "speaker-deck", responsive: true }
15982 + },
15983 + {
15984 + name: "tiktok",
15985 + title: getTitle("TikTok"),
15986 + icon: embedVideoIcon,
15987 + keywords: [(0,external_wp_i18n_namespaceObject.__)("video")],
15988 + description: (0,external_wp_i18n_namespaceObject.__)("Embed a TikTok video."),
15989 + patterns: [/^https?:\/\/(www\.)?tiktok\.com\/.+/i],
15990 + attributes: { providerNameSlug: "tiktok", responsive: true }
15991 + },
15992 + {
15993 + name: "ted",
15994 + title: getTitle("TED"),
15995 + icon: embedVideoIcon,
15996 + description: (0,external_wp_i18n_namespaceObject.__)("Embed a TED video."),
15997 + patterns: [/^https?:\/\/(www\.|embed\.)?ted\.com\/.+/i],
15998 + attributes: { providerNameSlug: "ted", responsive: true }
15999 + },
16000 + {
16001 + name: "tumblr",
16002 + title: getTitle("Tumblr"),
16003 + icon: embedTumblrIcon,
16004 + keywords: [(0,external_wp_i18n_namespaceObject.__)("social")],
16005 + description: (0,external_wp_i18n_namespaceObject.__)("Embed a Tumblr post."),
16006 + patterns: [/^https?:\/\/(.+)\.tumblr\.com\/.+/i],
16007 + attributes: { providerNameSlug: "tumblr", responsive: true }
16008 + },
16009 + {
16010 + name: "videopress",
16011 + title: getTitle("VideoPress"),
16012 + icon: embedVideoIcon,
16013 + keywords: [(0,external_wp_i18n_namespaceObject.__)("video")],
16014 + description: (0,external_wp_i18n_namespaceObject.__)("Embed a VideoPress video."),
16015 + patterns: [/^https?:\/\/videopress\.com\/.+/i],
16016 + attributes: { providerNameSlug: "videopress", responsive: true }
16017 + },
16018 + {
16019 + name: "wordpress-tv",
16020 + title: getTitle("WordPress.tv"),
16021 + icon: embedVideoIcon,
16022 + description: (0,external_wp_i18n_namespaceObject.__)("Embed a WordPress.tv video."),
16023 + patterns: [/^https?:\/\/wordpress\.tv\/.+/i],
16024 + attributes: { providerNameSlug: "wordpress-tv", responsive: true }
16025 + },
16026 + {
16027 + name: "amazon-kindle",
16028 + title: getTitle("Amazon Kindle"),
16029 + icon: embedAmazonIcon,
16030 + keywords: [(0,external_wp_i18n_namespaceObject.__)("ebook")],
16031 + description: (0,external_wp_i18n_namespaceObject.__)("Embed Amazon Kindle content."),
16032 + patterns: [
16033 + /^https?:\/\/([a-z0-9-]+\.)?(amazon|amzn)(\.[a-z]{2,4})+\/.+/i,
16034 + /^https?:\/\/(www\.)?(a\.co|z\.cn)\/.+/i
16035 + ],
16036 + attributes: { providerNameSlug: "amazon-kindle" }
16037 + },
16038 + {
16039 + name: "pinterest",
16040 + title: getTitle("Pinterest"),
16041 + icon: embedPinterestIcon,
16042 + keywords: [(0,external_wp_i18n_namespaceObject.__)("social"), (0,external_wp_i18n_namespaceObject.__)("bookmark")],
16043 + description: (0,external_wp_i18n_namespaceObject.__)("Embed Pinterest pins, boards, and profiles."),
16044 + patterns: [
16045 + /^https?:\/\/([a-z]{2}|www)\.pinterest\.com(\.(au|mx))?\/.*/i
16046 + ],
16047 + attributes: { providerNameSlug: "pinterest" }
16048 + },
16049 + {
16050 + name: "wolfram-cloud",
16051 + title: getTitle("Wolfram"),
16052 + icon: embedWolframIcon,
16053 + description: (0,external_wp_i18n_namespaceObject.__)("Embed Wolfram notebook content."),
16054 + patterns: [/^https?:\/\/(www\.)?wolframcloud\.com\/obj\/.+/i],
16055 + attributes: { providerNameSlug: "wolfram-cloud", responsive: true }
16056 + },
16057 + {
16058 + name: "bluesky",
16059 + title: getTitle("Bluesky"),
16060 + icon: embedBlueskyIcon,
16061 + description: (0,external_wp_i18n_namespaceObject.__)("Embed a Bluesky post."),
16062 + patterns: [/^https?:\/\/bsky\.app\/profile\/.+\/post\/.+/i],
16063 + attributes: { providerNameSlug: "bluesky" }
16064 + }
16065 + ];
16066 + embed_variations_variations.forEach((variation) => {
16067 + if (variation.isActive) {
16068 + return;
16069 + }
16070 + variation.isActive = (blockAttributes, variationAttributes) => blockAttributes.providerNameSlug === variationAttributes.providerNameSlug;
16071 + });
16072 + var embed_variations_variations_default = embed_variations_variations;
16073 +
16074 +
16075 + ;// ./node_modules/@wordpress/block-library/build-module/embed/deprecated.js
16076 +
16077 +
16078 +
16079 +
16080 + const { attributes: embed_deprecated_blockAttributes } = embed_block_namespaceObject;
16081 + const deprecated_v2 = {
16082 + attributes: embed_deprecated_blockAttributes,
16083 + save({ attributes }) {
16084 + const { url, caption, type, providerNameSlug } = attributes;
16085 + if (!url) {
16086 + return null;
16087 + }
16088 + const className = dist_clsx("wp-block-embed", {
16089 + [`is-type-${type}`]: type,
16090 + [`is-provider-${providerNameSlug}`]: providerNameSlug,
16091 + [`wp-block-embed-${providerNameSlug}`]: providerNameSlug
16092 + });
16093 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("figure", { ...external_wp_blockEditor_namespaceObject.useBlockProps.save({ className }), children: [
16094 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { className: "wp-block-embed__wrapper", children: `
16095 + ${url}
16096 + ` }),
16097 + !external_wp_blockEditor_namespaceObject.RichText.isEmpty(caption) && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichText.Content, { tagName: "figcaption", value: caption })
16098 + ] });
16099 + }
16100 + };
16101 + const embed_deprecated_v1 = {
16102 + attributes: embed_deprecated_blockAttributes,
16103 + save({ attributes: { url, caption, type, providerNameSlug } }) {
16104 + if (!url) {
16105 + return null;
16106 + }
16107 + const embedClassName = dist_clsx("wp-block-embed", {
16108 + [`is-type-${type}`]: type,
16109 + [`is-provider-${providerNameSlug}`]: providerNameSlug
16110 + });
16111 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("figure", { className: embedClassName, children: [
16112 + `
16113 + ${url}
16114 + `,
16115 + !external_wp_blockEditor_namespaceObject.RichText.isEmpty(caption) && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichText.Content, { tagName: "figcaption", value: caption })
16116 + ] });
16117 + }
16118 + };
16119 + const embed_deprecated_deprecated = [deprecated_v2, embed_deprecated_v1];
16120 + var embed_deprecated_deprecated_default = embed_deprecated_deprecated;
16121 +
16122 +
16123 + ;// ./node_modules/@wordpress/block-library/build-module/embed/index.js
16124 +
16125 +
16126 +
16127 +
16128 +
16129 +
16130 +
16131 +
16132 + const { name: embed_name } = embed_block_namespaceObject;
16133 + const embed_settings = {
16134 + icon: embedContentIcon,
16135 + edit: embed_edit_edit_default,
16136 + save: embed_save_save,
16137 + transforms: embed_transforms_transforms_default,
16138 + variations: embed_variations_variations_default,
16139 + deprecated: embed_deprecated_deprecated_default
16140 + };
16141 + const embed_init = () => initBlock({ name: embed_name, metadata: embed_block_namespaceObject, settings: embed_settings });
16142 +
16143 +
16144 + ;// ./node_modules/@wordpress/icons/build-module/library/file.js
16145 +
16146 +
16147 + var file_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
16148 + external_wp_primitives_namespaceObject.Path,
16149 + {
16150 + fillRule: "evenodd",
16151 + clipRule: "evenodd",
16152 + d: "M12.848 8a1 1 0 0 1-.914-.594l-.723-1.63a.5.5 0 0 0-.447-.276H5a.5.5 0 0 0-.5.5v11.5a.5.5 0 0 0 .5.5h14a.5.5 0 0 0 .5-.5v-9A.5.5 0 0 0 19 8h-6.152Zm.612-1.5a.5.5 0 0 1-.462-.31l-.445-1.084A2 2 0 0 0 10.763 4H5a2 2 0 0 0-2 2v11.5a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-9a2 2 0 0 0-2-2h-5.54Z"
16153 + }
16154 + ) });
16155 +
16156 +
16157 + ;// ./node_modules/@wordpress/block-library/build-module/file/deprecated.js
16158 +
16159 +
16160 +
16161 +
16162 + const deprecated_v3 = {
16163 + attributes: {
16164 + id: {
16165 + type: "number"
16166 + },
16167 + href: {
16168 + type: "string"
16169 + },
16170 + fileId: {
16171 + type: "string",
16172 + source: "attribute",
16173 + selector: "a:not([download])",
16174 + attribute: "id"
16175 + },
16176 + fileName: {
16177 + type: "string",
16178 + source: "html",
16179 + selector: "a:not([download])"
16180 + },
16181 + textLinkHref: {
16182 + type: "string",
16183 + source: "attribute",
16184 + selector: "a:not([download])",
16185 + attribute: "href"
16186 + },
16187 + textLinkTarget: {
16188 + type: "string",
16189 + source: "attribute",
16190 + selector: "a:not([download])",
16191 + attribute: "target"
16192 + },
16193 + showDownloadButton: {
16194 + type: "boolean",
16195 + default: true
16196 + },
16197 + downloadButtonText: {
16198 + type: "string",
16199 + source: "html",
16200 + selector: "a[download]"
16201 + },
16202 + displayPreview: {
16203 + type: "boolean"
16204 + },
16205 + previewHeight: {
16206 + type: "number",
16207 + default: 600
16208 + }
16209 + },
16210 + supports: {
16211 + anchor: true,
16212 + align: true
16213 + },
16214 + save({ attributes }) {
16215 + const {
16216 + href,
16217 + fileId,
16218 + fileName,
16219 + textLinkHref,
16220 + textLinkTarget,
16221 + showDownloadButton,
16222 + downloadButtonText,
16223 + displayPreview,
16224 + previewHeight
16225 + } = attributes;
16226 + const pdfEmbedLabel = external_wp_blockEditor_namespaceObject.RichText.isEmpty(fileName) ? (0,external_wp_i18n_namespaceObject.__)("PDF embed") : (0,external_wp_i18n_namespaceObject.sprintf)(
16227 + /* translators: %s: filename. */
16228 + (0,external_wp_i18n_namespaceObject.__)("Embed of %s."),
16229 + fileName
16230 + );
16231 + const hasFilename = !external_wp_blockEditor_namespaceObject.RichText.isEmpty(fileName);
16232 + const describedById = hasFilename ? fileId : void 0;
16233 + return href && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", { ...external_wp_blockEditor_namespaceObject.useBlockProps.save(), children: [
16234 + displayPreview && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
16235 + "object",
16236 + {
16237 + className: "wp-block-file__embed",
16238 + data: href,
16239 + type: "application/pdf",
16240 + style: {
16241 + width: "100%",
16242 + height: `${previewHeight}px`
16243 + },
16244 + "aria-label": pdfEmbedLabel
16245 + }
16246 + ) }),
16247 + hasFilename && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
16248 + "a",
16249 + {
16250 + id: describedById,
16251 + href: textLinkHref,
16252 + target: textLinkTarget,
16253 + rel: textLinkTarget ? "noreferrer noopener" : void 0,
16254 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichText.Content, { value: fileName })
16255 + }
16256 + ),
16257 + showDownloadButton && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
16258 + "a",
16259 + {
16260 + href,
16261 + className: dist_clsx(
16262 + "wp-block-file__button",
16263 + (0,external_wp_blockEditor_namespaceObject.__experimentalGetElementClassName)("button")
16264 + ),
16265 + download: true,
16266 + "aria-describedby": describedById,
16267 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichText.Content, { value: downloadButtonText })
16268 + }
16269 + )
16270 + ] });
16271 + }
16272 + };
16273 + const file_deprecated_v2 = {
16274 + attributes: {
16275 + id: {
16276 + type: "number"
16277 + },
16278 + href: {
16279 + type: "string"
16280 + },
16281 + fileId: {
16282 + type: "string",
16283 + source: "attribute",
16284 + selector: "a:not([download])",
16285 + attribute: "id"
16286 + },
16287 + fileName: {
16288 + type: "string",
16289 + source: "html",
16290 + selector: "a:not([download])"
16291 + },
16292 + textLinkHref: {
16293 + type: "string",
16294 + source: "attribute",
16295 + selector: "a:not([download])",
16296 + attribute: "href"
16297 + },
16298 + textLinkTarget: {
16299 + type: "string",
16300 + source: "attribute",
16301 + selector: "a:not([download])",
16302 + attribute: "target"
16303 + },
16304 + showDownloadButton: {
16305 + type: "boolean",
16306 + default: true
16307 + },
16308 + downloadButtonText: {
16309 + type: "string",
16310 + source: "html",
16311 + selector: "a[download]"
16312 + },
16313 + displayPreview: {
16314 + type: "boolean"
16315 + },
16316 + previewHeight: {
16317 + type: "number",
16318 + default: 600
16319 + }
16320 + },
16321 + supports: {
16322 + anchor: true,
16323 + align: true
16324 + },
16325 + save({ attributes }) {
16326 + const {
16327 + href,
16328 + fileId,
16329 + fileName,
16330 + textLinkHref,
16331 + textLinkTarget,
16332 + showDownloadButton,
16333 + downloadButtonText,
16334 + displayPreview,
16335 + previewHeight
16336 + } = attributes;
16337 + const pdfEmbedLabel = external_wp_blockEditor_namespaceObject.RichText.isEmpty(fileName) ? (0,external_wp_i18n_namespaceObject.__)("PDF embed") : (0,external_wp_i18n_namespaceObject.sprintf)(
16338 + /* translators: %s: filename. */
16339 + (0,external_wp_i18n_namespaceObject.__)("Embed of %s."),
16340 + fileName
16341 + );
16342 + const hasFilename = !external_wp_blockEditor_namespaceObject.RichText.isEmpty(fileName);
16343 + const describedById = hasFilename ? fileId : void 0;
16344 + return href && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", { ...external_wp_blockEditor_namespaceObject.useBlockProps.save(), children: [
16345 + displayPreview && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
16346 + "object",
16347 + {
16348 + className: "wp-block-file__embed",
16349 + data: href,
16350 + type: "application/pdf",
16351 + style: {
16352 + width: "100%",
16353 + height: `${previewHeight}px`
16354 + },
16355 + "aria-label": pdfEmbedLabel
16356 + }
16357 + ) }),
16358 + hasFilename && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
16359 + "a",
16360 + {
16361 + id: describedById,
16362 + href: textLinkHref,
16363 + target: textLinkTarget,
16364 + rel: textLinkTarget ? "noreferrer noopener" : void 0,
16365 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichText.Content, { value: fileName })
16366 + }
16367 + ),
16368 + showDownloadButton && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
16369 + "a",
16370 + {
16371 + href,
16372 + className: "wp-block-file__button",
16373 + download: true,
16374 + "aria-describedby": describedById,
16375 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichText.Content, { value: downloadButtonText })
16376 + }
16377 + )
16378 + ] });
16379 + }
16380 + };
16381 + const file_deprecated_v1 = {
16382 + attributes: {
16383 + id: {
16384 + type: "number"
16385 + },
16386 + href: {
16387 + type: "string"
16388 + },
16389 + fileName: {
16390 + type: "string",
16391 + source: "html",
16392 + selector: "a:not([download])"
16393 + },
16394 + textLinkHref: {
16395 + type: "string",
16396 + source: "attribute",
16397 + selector: "a:not([download])",
16398 + attribute: "href"
16399 + },
16400 + textLinkTarget: {
16401 + type: "string",
16402 + source: "attribute",
16403 + selector: "a:not([download])",
16404 + attribute: "target"
16405 + },
16406 + showDownloadButton: {
16407 + type: "boolean",
16408 + default: true
16409 + },
16410 + downloadButtonText: {
16411 + type: "string",
16412 + source: "html",
16413 + selector: "a[download]"
16414 + },
16415 + displayPreview: {
16416 + type: "boolean"
16417 + },
16418 + previewHeight: {
16419 + type: "number",
16420 + default: 600
16421 + }
16422 + },
16423 + supports: {
16424 + anchor: true,
16425 + align: true
16426 + },
16427 + save({ attributes }) {
16428 + const {
16429 + href,
16430 + fileName,
16431 + textLinkHref,
16432 + textLinkTarget,
16433 + showDownloadButton,
16434 + downloadButtonText,
16435 + displayPreview,
16436 + previewHeight
16437 + } = attributes;
16438 + const pdfEmbedLabel = external_wp_blockEditor_namespaceObject.RichText.isEmpty(fileName) ? (0,external_wp_i18n_namespaceObject.__)("PDF embed") : (0,external_wp_i18n_namespaceObject.sprintf)(
16439 + /* translators: %s: filename. */
16440 + (0,external_wp_i18n_namespaceObject.__)("Embed of %s."),
16441 + fileName
16442 + );
16443 + return href && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", { ...external_wp_blockEditor_namespaceObject.useBlockProps.save(), children: [
16444 + displayPreview && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
16445 + "object",
16446 + {
16447 + className: "wp-block-file__embed",
16448 + data: href,
16449 + type: "application/pdf",
16450 + style: {
16451 + width: "100%",
16452 + height: `${previewHeight}px`
16453 + },
16454 + "aria-label": pdfEmbedLabel
16455 + }
16456 + ) }),
16457 + !external_wp_blockEditor_namespaceObject.RichText.isEmpty(fileName) && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
16458 + "a",
16459 + {
16460 + href: textLinkHref,
16461 + target: textLinkTarget,
16462 + rel: textLinkTarget ? "noreferrer noopener" : void 0,
16463 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichText.Content, { value: fileName })
16464 + }
16465 + ),
16466 + showDownloadButton && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
16467 + "a",
16468 + {
16469 + href,
16470 + className: "wp-block-file__button",
16471 + download: true,
16472 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichText.Content, { value: downloadButtonText })
16473 + }
16474 + )
16475 + ] });
16476 + }
16477 + };
16478 + const file_deprecated_deprecated = [deprecated_v3, file_deprecated_v2, file_deprecated_v1];
16479 + var file_deprecated_deprecated_default = file_deprecated_deprecated;
16480 +
16481 +
16482 + ;// ./node_modules/@wordpress/block-library/build-module/file/inspector.js
16483 +
16484 +
16485 +
16486 +
16487 +
16488 +
16489 + function FileBlockInspector({
16490 + hrefs,
16491 + openInNewWindow,
16492 + showDownloadButton,
16493 + changeLinkDestinationOption,
16494 + changeOpenInNewWindow,
16495 + changeShowDownloadButton,
16496 + displayPreview,
16497 + changeDisplayPreview,
16498 + previewHeight,
16499 + changePreviewHeight
16500 + }) {
16501 + const { href, textLinkHref, attachmentPage } = hrefs;
16502 + const dropdownMenuProps = useToolsPanelDropdownMenuProps();
16503 + let linkDestinationOptions = [{ value: href, label: (0,external_wp_i18n_namespaceObject.__)("URL") }];
16504 + if (attachmentPage) {
16505 + linkDestinationOptions = [
16506 + { value: href, label: (0,external_wp_i18n_namespaceObject.__)("Media file") },
16507 + { value: attachmentPage, label: (0,external_wp_i18n_namespaceObject.__)("Attachment page") }
16508 + ];
16509 + }
16510 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_blockEditor_namespaceObject.InspectorControls, { children: [
16511 + href.endsWith(".pdf") && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(
16512 + external_wp_components_namespaceObject.__experimentalToolsPanel,
16513 + {
16514 + label: (0,external_wp_i18n_namespaceObject.__)("PDF settings"),
16515 + resetAll: () => {
16516 + changeDisplayPreview(true);
16517 + changePreviewHeight(600);
16518 + },
16519 + dropdownMenuProps,
16520 + children: [
16521 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
16522 + external_wp_components_namespaceObject.__experimentalToolsPanelItem,
16523 + {
16524 + label: (0,external_wp_i18n_namespaceObject.__)("Show inline embed"),
16525 + isShownByDefault: true,
16526 + hasValue: () => !displayPreview,
16527 + onDeselect: () => changeDisplayPreview(true),
16528 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
16529 + external_wp_components_namespaceObject.ToggleControl,
16530 + {
16531 + __nextHasNoMarginBottom: true,
16532 + label: (0,external_wp_i18n_namespaceObject.__)("Show inline embed"),
16533 + help: displayPreview ? (0,external_wp_i18n_namespaceObject.__)(
16534 + "Note: Most phone and tablet browsers won't display embedded PDFs."
16535 + ) : null,
16536 + checked: !!displayPreview,
16537 + onChange: changeDisplayPreview
16538 + }
16539 + )
16540 + }
16541 + ),
16542 + displayPreview && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
16543 + external_wp_components_namespaceObject.__experimentalToolsPanelItem,
16544 + {
16545 + label: (0,external_wp_i18n_namespaceObject.__)("Height in pixels"),
16546 + isShownByDefault: true,
16547 + hasValue: () => previewHeight !== 600,
16548 + onDeselect: () => changePreviewHeight(600),
16549 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
16550 + external_wp_components_namespaceObject.RangeControl,
16551 + {
16552 + __nextHasNoMarginBottom: true,
16553 + __next40pxDefaultSize: true,
16554 + label: (0,external_wp_i18n_namespaceObject.__)("Height in pixels"),
16555 + min: MIN_PREVIEW_HEIGHT,
16556 + max: Math.max(
16557 + MAX_PREVIEW_HEIGHT,
16558 + previewHeight
16559 + ),
16560 + value: previewHeight,
16561 + onChange: changePreviewHeight
16562 + }
16563 + )
16564 + }
16565 + )
16566 + ]
16567 + }
16568 + ),
16569 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(
16570 + external_wp_components_namespaceObject.__experimentalToolsPanel,
16571 + {
16572 + label: (0,external_wp_i18n_namespaceObject.__)("Settings"),
16573 + resetAll: () => {
16574 + changeLinkDestinationOption(href);
16575 + changeOpenInNewWindow(false);
16576 + changeShowDownloadButton(true);
16577 + },
16578 + dropdownMenuProps,
16579 + children: [
16580 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
16581 + external_wp_components_namespaceObject.__experimentalToolsPanelItem,
16582 + {
16583 + label: (0,external_wp_i18n_namespaceObject.__)("Link to"),
16584 + isShownByDefault: true,
16585 + hasValue: () => textLinkHref !== href,
16586 + onDeselect: () => changeLinkDestinationOption(href),
16587 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
16588 + external_wp_components_namespaceObject.SelectControl,
16589 + {
16590 + __next40pxDefaultSize: true,
16591 + __nextHasNoMarginBottom: true,
16592 + label: (0,external_wp_i18n_namespaceObject.__)("Link to"),
16593 + value: textLinkHref,
16594 + options: linkDestinationOptions,
16595 + onChange: changeLinkDestinationOption
16596 + }
16597 + )
16598 + }
16599 + ),
16600 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
16601 + external_wp_components_namespaceObject.__experimentalToolsPanelItem,
16602 + {
16603 + label: (0,external_wp_i18n_namespaceObject.__)("Open in new tab"),
16604 + isShownByDefault: true,
16605 + hasValue: () => !!openInNewWindow,
16606 + onDeselect: () => changeOpenInNewWindow(false),
16607 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
16608 + external_wp_components_namespaceObject.ToggleControl,
16609 + {
16610 + __nextHasNoMarginBottom: true,
16611 + label: (0,external_wp_i18n_namespaceObject.__)("Open in new tab"),
16612 + checked: openInNewWindow,
16613 + onChange: changeOpenInNewWindow
16614 + }
16615 + )
16616 + }
16617 + ),
16618 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
16619 + external_wp_components_namespaceObject.__experimentalToolsPanelItem,
16620 + {
16621 + label: (0,external_wp_i18n_namespaceObject.__)("Show download button"),
16622 + isShownByDefault: true,
16623 + hasValue: () => !showDownloadButton,
16624 + onDeselect: () => changeShowDownloadButton(true),
16625 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
16626 + external_wp_components_namespaceObject.ToggleControl,
16627 + {
16628 + __nextHasNoMarginBottom: true,
16629 + label: (0,external_wp_i18n_namespaceObject.__)("Show download button"),
16630 + checked: showDownloadButton,
16631 + onChange: changeShowDownloadButton
16632 + }
16633 + )
16634 + }
16635 + )
16636 + ]
16637 + }
16638 + )
16639 + ] }) });
16640 + }
16641 +
16642 +
16643 + ;// ./node_modules/@wordpress/block-library/build-module/file/utils/index.js
16644 + const browserSupportsPdfs = () => {
16645 + if (window.navigator.pdfViewerEnabled) {
16646 + return true;
16647 + }
16648 + if (window.navigator.userAgent.indexOf("Mobi") > -1) {
16649 + return false;
16650 + }
16651 + if (window.navigator.userAgent.indexOf("Android") > -1) {
16652 + return false;
16653 + }
16654 + if (window.navigator.userAgent.indexOf("Macintosh") > -1 && window.navigator.maxTouchPoints && window.navigator.maxTouchPoints > 2) {
16655 + return false;
16656 + }
16657 + if (!!(window.ActiveXObject || "ActiveXObject" in window) && !(createActiveXObject("AcroPDF.PDF") || createActiveXObject("PDF.PdfCtrl"))) {
16658 + return false;
16659 + }
16660 + return true;
16661 + };
16662 + const createActiveXObject = (type) => {
16663 + let ax;
16664 + try {
16665 + ax = new window.ActiveXObject(type);
16666 + } catch (e) {
16667 + ax = void 0;
16668 + }
16669 + return ax;
16670 + };
16671 +
16672 +
16673 + ;// ./node_modules/@wordpress/block-library/build-module/file/edit.js
16674 +
16675 +
16676 +
16677 +
16678 +
16679 +
16680 +
16681 +
16682 +
16683 +
16684 +
16685 +
16686 +
16687 +
16688 +
16689 +
16690 +
16691 + const MIN_PREVIEW_HEIGHT = 200;
16692 + const MAX_PREVIEW_HEIGHT = 2e3;
16693 + function ClipboardToolbarButton({ text, disabled }) {
16694 + const { createNotice } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_notices_namespaceObject.store);
16695 + const ref = (0,external_wp_compose_namespaceObject.useCopyToClipboard)(text, () => {
16696 + createNotice("info", (0,external_wp_i18n_namespaceObject.__)("Copied URL to clipboard."), {
16697 + isDismissible: true,
16698 + type: "snackbar"
16699 + });
16700 + });
16701 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
16702 + external_wp_components_namespaceObject.ToolbarButton,
16703 + {
16704 + className: "components-clipboard-toolbar-button",
16705 + ref,
16706 + disabled,
16707 + children: (0,external_wp_i18n_namespaceObject.__)("Copy URL")
16708 + }
16709 + );
16710 + }
16711 + function FileEdit({ attributes, isSelected, setAttributes, clientId }) {
16712 + const {
16713 + id,
16714 + fileName,
16715 + href,
16716 + textLinkHref,
16717 + textLinkTarget,
16718 + showDownloadButton,
16719 + downloadButtonText,
16720 + displayPreview,
16721 + previewHeight
16722 + } = attributes;
16723 + const [temporaryURL, setTemporaryURL] = (0,external_wp_element_namespaceObject.useState)(attributes.blob);
16724 + const { media } = (0,external_wp_data_namespaceObject.useSelect)(
16725 + (select) => ({
16726 + media: id === void 0 ? void 0 : select(external_wp_coreData_namespaceObject.store).getEntityRecord(
16727 + "postType",
16728 + "attachment",
16729 + id
16730 + )
16731 + }),
16732 + [id]
16733 + );
16734 + const { createErrorNotice } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_notices_namespaceObject.store);
16735 + const { toggleSelection, __unstableMarkNextChangeAsNotPersistent } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_blockEditor_namespaceObject.store);
16736 + useUploadMediaFromBlobURL({
16737 + url: temporaryURL,
16738 + onChange: onSelectFile,
16739 + onError: onUploadError
16740 + });
16741 + (0,external_wp_element_namespaceObject.useEffect)(() => {
16742 + if (external_wp_blockEditor_namespaceObject.RichText.isEmpty(downloadButtonText)) {
16743 + __unstableMarkNextChangeAsNotPersistent();
16744 + setAttributes({
16745 + downloadButtonText: (0,external_wp_i18n_namespaceObject._x)("Download", "button label")
16746 + });
16747 + }
16748 + }, []);
16749 + function onSelectFile(newMedia) {
16750 + if (!newMedia || !newMedia.url) {
16751 + setAttributes({
16752 + href: void 0,
16753 + fileName: void 0,
16754 + textLinkHref: void 0,
16755 + id: void 0,
16756 + fileId: void 0,
16757 + displayPreview: void 0,
16758 + previewHeight: void 0
16759 + });
16760 + setTemporaryURL();
16761 + return;
16762 + }
16763 + if ((0,external_wp_blob_namespaceObject.isBlobURL)(newMedia.url)) {
16764 + setTemporaryURL(newMedia.url);
16765 + return;
16766 + }
16767 + const isPdf = (
16768 + // Media Library and REST API use different properties for mime type.
16769 + (newMedia.mime || newMedia.mime_type) === "application/pdf" || (0,external_wp_url_namespaceObject.getFilename)(newMedia.url).toLowerCase().endsWith(".pdf")
16770 + );
16771 + const pdfAttributes = {
16772 + displayPreview: isPdf ? attributes.displayPreview ?? true : void 0,
16773 + previewHeight: isPdf ? attributes.previewHeight ?? 600 : void 0
16774 + };
16775 + setAttributes({
16776 + href: newMedia.url,
16777 + fileName: newMedia.title,
16778 + textLinkHref: newMedia.url,
16779 + id: newMedia.id,
16780 + fileId: `wp-block-file--media-${clientId}`,
16781 + blob: void 0,
16782 + ...pdfAttributes
16783 + });
16784 + setTemporaryURL();
16785 + }
16786 + function onUploadError(message) {
16787 + setAttributes({ href: void 0 });
16788 + createErrorNotice(message, { type: "snackbar" });
16789 + }
16790 + function changeLinkDestinationOption(newHref) {
16791 + setAttributes({ textLinkHref: newHref });
16792 + }
16793 + function changeOpenInNewWindow(newValue) {
16794 + setAttributes({
16795 + textLinkTarget: newValue ? "_blank" : false
16796 + });
16797 + }
16798 + function changeShowDownloadButton(newValue) {
16799 + setAttributes({ showDownloadButton: newValue });
16800 + }
16801 + function changeDisplayPreview(newValue) {
16802 + setAttributes({ displayPreview: newValue });
16803 + }
16804 + function handleOnResizeStop(event, direction, elt, delta) {
16805 + toggleSelection(true);
16806 + const newHeight = parseInt(previewHeight + delta.height, 10);
16807 + setAttributes({ previewHeight: newHeight });
16808 + }
16809 + function changePreviewHeight(newValue) {
16810 + const newHeight = Math.max(
16811 + parseInt(newValue, 10),
16812 + MIN_PREVIEW_HEIGHT
16813 + );
16814 + setAttributes({ previewHeight: newHeight });
16815 + }
16816 + const attachmentPage = media && media.link;
16817 + const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)({
16818 + className: dist_clsx(
16819 + !!temporaryURL && (0,external_wp_components_namespaceObject.__unstableGetAnimateClassName)({ type: "loading" }),
16820 + {
16821 + "is-transient": !!temporaryURL
16822 + }
16823 + )
16824 + });
16825 + const displayPreviewInEditor = browserSupportsPdfs() && displayPreview;
16826 + if (!href && !temporaryURL) {
16827 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { ...blockProps, children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
16828 + external_wp_blockEditor_namespaceObject.MediaPlaceholder,
16829 + {
16830 + icon: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockIcon, { icon: file_default }),
16831 + labels: {
16832 + title: (0,external_wp_i18n_namespaceObject.__)("File"),
16833 + instructions: (0,external_wp_i18n_namespaceObject.__)(
16834 + "Drag and drop a file, upload, or choose from your library."
16835 + )
16836 + },
16837 + onSelect: onSelectFile,
16838 + onError: onUploadError,
16839 + accept: "*"
16840 + }
16841 + ) });
16842 + }
16843 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
16844 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
16845 + FileBlockInspector,
16846 + {
16847 + hrefs: {
16848 + href: href || temporaryURL,
16849 + textLinkHref,
16850 + attachmentPage
16851 + },
16852 + ...{
16853 + openInNewWindow: !!textLinkTarget,
16854 + showDownloadButton,
16855 + changeLinkDestinationOption,
16856 + changeOpenInNewWindow,
16857 + changeShowDownloadButton,
16858 + displayPreview,
16859 + changeDisplayPreview,
16860 + previewHeight,
16861 + changePreviewHeight
16862 + }
16863 + }
16864 + ),
16865 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_blockEditor_namespaceObject.BlockControls, { group: "other", children: [
16866 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
16867 + external_wp_blockEditor_namespaceObject.MediaReplaceFlow,
16868 + {
16869 + mediaId: id,
16870 + mediaURL: href,
16871 + accept: "*",
16872 + onSelect: onSelectFile,
16873 + onError: onUploadError,
16874 + onReset: () => onSelectFile(void 0)
16875 + }
16876 + ),
16877 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
16878 + ClipboardToolbarButton,
16879 + {
16880 + text: href,
16881 + disabled: (0,external_wp_blob_namespaceObject.isBlobURL)(href)
16882 + }
16883 + )
16884 + ] }),
16885 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", { ...blockProps, children: [
16886 + displayPreviewInEditor && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(
16887 + external_wp_components_namespaceObject.ResizableBox,
16888 + {
16889 + size: { height: previewHeight, width: "100%" },
16890 + minHeight: MIN_PREVIEW_HEIGHT,
16891 + maxHeight: MAX_PREVIEW_HEIGHT,
16892 + grid: [1, 10],
16893 + enable: {
16894 + top: false,
16895 + right: false,
16896 + bottom: true,
16897 + left: false,
16898 + topRight: false,
16899 + bottomRight: false,
16900 + bottomLeft: false,
16901 + topLeft: false
16902 + },
16903 + onResizeStart: () => toggleSelection(false),
16904 + onResizeStop: handleOnResizeStop,
16905 + showHandle: isSelected,
16906 + children: [
16907 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
16908 + "object",
16909 + {
16910 + className: "wp-block-file__preview",
16911 + data: href,
16912 + type: "application/pdf",
16913 + "aria-label": (0,external_wp_i18n_namespaceObject.__)(
16914 + "Embed of the selected PDF file."
16915 + )
16916 + }
16917 + ),
16918 + !isSelected && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { className: "wp-block-file__preview-overlay" })
16919 + ]
16920 + }
16921 + ),
16922 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", { className: "wp-block-file__content-wrapper", children: [
16923 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
16924 + external_wp_blockEditor_namespaceObject.RichText,
16925 + {
16926 + identifier: "fileName",
16927 + tagName: "a",
16928 + value: fileName,
16929 + placeholder: (0,external_wp_i18n_namespaceObject.__)("Write file name\u2026"),
16930 + withoutInteractiveFormatting: true,
16931 + onChange: (text) => setAttributes({
16932 + fileName: removeAnchorTag(text)
16933 + }),
16934 + href: textLinkHref
16935 + }
16936 + ),
16937 + showDownloadButton && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { className: "wp-block-file__button-richtext-wrapper", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
16938 + external_wp_blockEditor_namespaceObject.RichText,
16939 + {
16940 + identifier: "downloadButtonText",
16941 + tagName: "div",
16942 + "aria-label": (0,external_wp_i18n_namespaceObject.__)("Download button text"),
16943 + className: dist_clsx(
16944 + "wp-block-file__button",
16945 + (0,external_wp_blockEditor_namespaceObject.__experimentalGetElementClassName)(
16946 + "button"
16947 + )
16948 + ),
16949 + value: downloadButtonText,
16950 + withoutInteractiveFormatting: true,
16951 + placeholder: (0,external_wp_i18n_namespaceObject.__)("Add text\u2026"),
16952 + onChange: (text) => setAttributes({
16953 + downloadButtonText: removeAnchorTag(text)
16954 + })
16955 + }
16956 + ) })
16957 + ] })
16958 + ] })
16959 + ] });
16960 + }
16961 + var file_edit_edit_default = FileEdit;
16962 +
16963 +
16964 + ;// ./node_modules/@wordpress/block-library/build-module/file/block.json
16965 + const file_block_namespaceObject = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/file","title":"File","category":"media","description":"Add a link to a downloadable file.","keywords":["document","pdf","download"],"textdomain":"default","attributes":{"id":{"type":"number"},"blob":{"type":"string","role":"local"},"href":{"type":"string","role":"content"},"fileId":{"type":"string","source":"attribute","selector":"a:not([download])","attribute":"id"},"fileName":{"type":"rich-text","source":"rich-text","selector":"a:not([download])","role":"content"},"textLinkHref":{"type":"string","source":"attribute","selector":"a:not([download])","attribute":"href","role":"content"},"textLinkTarget":{"type":"string","source":"attribute","selector":"a:not([download])","attribute":"target"},"showDownloadButton":{"type":"boolean","default":true},"downloadButtonText":{"type":"rich-text","source":"rich-text","selector":"a[download]","role":"content"},"displayPreview":{"type":"boolean"},"previewHeight":{"type":"number","default":600}},"supports":{"anchor":true,"align":true,"spacing":{"margin":true,"padding":true},"color":{"gradients":true,"link":true,"text":false,"__experimentalDefaultControls":{"background":true,"link":true}},"__experimentalBorder":{"radius":true,"color":true,"width":true,"style":true,"__experimentalDefaultControls":{"radius":true,"color":true,"width":true,"style":true}},"interactivity":true},"editorStyle":"wp-block-file-editor","style":"wp-block-file"}');
16966 + ;// ./node_modules/@wordpress/block-library/build-module/file/save.js
16967 +
16968 +
16969 +
16970 + function file_save_save({ attributes }) {
16971 + const {
16972 + href,
16973 + fileId,
16974 + fileName,
16975 + textLinkHref,
16976 + textLinkTarget,
16977 + showDownloadButton,
16978 + downloadButtonText,
16979 + displayPreview,
16980 + previewHeight
16981 + } = attributes;
16982 + const pdfEmbedLabel = external_wp_blockEditor_namespaceObject.RichText.isEmpty(fileName) ? "PDF embed" : (
16983 + // To do: use toPlainText, but we need ensure it's RichTextData. See
16984 + // https://github.com/WordPress/gutenberg/pull/56710.
16985 + fileName.toString()
16986 + );
16987 + const hasFilename = !external_wp_blockEditor_namespaceObject.RichText.isEmpty(fileName);
16988 + const describedById = hasFilename ? fileId : void 0;
16989 + return href && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", { ...external_wp_blockEditor_namespaceObject.useBlockProps.save(), children: [
16990 + displayPreview && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
16991 + "object",
16992 + {
16993 + className: "wp-block-file__embed",
16994 + data: href,
16995 + type: "application/pdf",
16996 + style: {
16997 + width: "100%",
16998 + height: `${previewHeight}px`
16999 + },
17000 + "aria-label": pdfEmbedLabel
17001 + }
17002 + ) }),
17003 + hasFilename && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
17004 + "a",
17005 + {
17006 + id: describedById,
17007 + href: textLinkHref,
17008 + target: textLinkTarget,
17009 + rel: textLinkTarget ? "noreferrer noopener" : void 0,
17010 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichText.Content, { value: fileName })
17011 + }
17012 + ),
17013 + showDownloadButton && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
17014 + "a",
17015 + {
17016 + href,
17017 + className: dist_clsx(
17018 + "wp-block-file__button",
17019 + (0,external_wp_blockEditor_namespaceObject.__experimentalGetElementClassName)("button")
17020 + ),
17021 + download: true,
17022 + "aria-describedby": describedById,
17023 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichText.Content, { value: downloadButtonText })
17024 + }
17025 + )
17026 + ] });
17027 + }
17028 +
17029 +
17030 + ;// ./node_modules/@wordpress/block-library/build-module/file/transforms.js
17031 +
17032 +
17033 +
17034 +
17035 +
17036 + const file_transforms_transforms = {
17037 + from: [
17038 + {
17039 + type: "files",
17040 + isMatch(files) {
17041 + return files.length > 0;
17042 + },
17043 + // We define a lower priority (higher number) than the default of 10. This
17044 + // ensures that the File block is only created as a fallback.
17045 + priority: 15,
17046 + transform: (files) => {
17047 + const blocks = [];
17048 + files.forEach((file) => {
17049 + const blobURL = (0,external_wp_blob_namespaceObject.createBlobURL)(file);
17050 + if (file.type.startsWith("video/")) {
17051 + blocks.push(
17052 + (0,external_wp_blocks_namespaceObject.createBlock)("core/video", {
17053 + blob: (0,external_wp_blob_namespaceObject.createBlobURL)(file)
17054 + })
17055 + );
17056 + } else if (file.type.startsWith("image/")) {
17057 + blocks.push(
17058 + (0,external_wp_blocks_namespaceObject.createBlock)("core/image", {
17059 + blob: (0,external_wp_blob_namespaceObject.createBlobURL)(file)
17060 + })
17061 + );
17062 + } else if (file.type.startsWith("audio/")) {
17063 + blocks.push(
17064 + (0,external_wp_blocks_namespaceObject.createBlock)("core/audio", {
17065 + blob: (0,external_wp_blob_namespaceObject.createBlobURL)(file)
17066 + })
17067 + );
17068 + } else {
17069 + blocks.push(
17070 + (0,external_wp_blocks_namespaceObject.createBlock)("core/file", {
17071 + blob: blobURL,
17072 + fileName: file.name
17073 + })
17074 + );
17075 + }
17076 + });
17077 + return blocks;
17078 + }
17079 + },
17080 + {
17081 + type: "block",
17082 + blocks: ["core/audio"],
17083 + transform: (attributes) => {
17084 + return (0,external_wp_blocks_namespaceObject.createBlock)("core/file", {
17085 + href: attributes.src,
17086 + fileName: attributes.caption,
17087 + textLinkHref: attributes.src,
17088 + id: attributes.id,
17089 + anchor: attributes.anchor
17090 + });
17091 + }
17092 + },
17093 + {
17094 + type: "block",
17095 + blocks: ["core/video"],
17096 + transform: (attributes) => {
17097 + return (0,external_wp_blocks_namespaceObject.createBlock)("core/file", {
17098 + href: attributes.src,
17099 + fileName: attributes.caption,
17100 + textLinkHref: attributes.src,
17101 + id: attributes.id,
17102 + anchor: attributes.anchor
17103 + });
17104 + }
17105 + },
17106 + {
17107 + type: "block",
17108 + blocks: ["core/image"],
17109 + transform: (attributes) => {
17110 + return (0,external_wp_blocks_namespaceObject.createBlock)("core/file", {
17111 + href: attributes.url,
17112 + fileName: attributes.caption || (0,external_wp_url_namespaceObject.getFilename)(attributes.url),
17113 + textLinkHref: attributes.url,
17114 + id: attributes.id,
17115 + anchor: attributes.anchor
17116 + });
17117 + }
17118 + }
17119 + ],
17120 + to: [
17121 + {
17122 + type: "block",
17123 + blocks: ["core/audio"],
17124 + isMatch: ({ id }) => {
17125 + if (!id) {
17126 + return false;
17127 + }
17128 + const { getEntityRecord } = (0,external_wp_data_namespaceObject.select)(external_wp_coreData_namespaceObject.store);
17129 + const media = getEntityRecord("postType", "attachment", id);
17130 + return !!media && media.mime_type.includes("audio");
17131 + },
17132 + transform: (attributes) => {
17133 + return (0,external_wp_blocks_namespaceObject.createBlock)("core/audio", {
17134 + src: attributes.href,
17135 + caption: attributes.fileName,
17136 + id: attributes.id,
17137 + anchor: attributes.anchor
17138 + });
17139 + }
17140 + },
17141 + {
17142 + type: "block",
17143 + blocks: ["core/video"],
17144 + isMatch: ({ id }) => {
17145 + if (!id) {
17146 + return false;
17147 + }
17148 + const { getEntityRecord } = (0,external_wp_data_namespaceObject.select)(external_wp_coreData_namespaceObject.store);
17149 + const media = getEntityRecord("postType", "attachment", id);
17150 + return !!media && media.mime_type.includes("video");
17151 + },
17152 + transform: (attributes) => {
17153 + return (0,external_wp_blocks_namespaceObject.createBlock)("core/video", {
17154 + src: attributes.href,
17155 + caption: attributes.fileName,
17156 + id: attributes.id,
17157 + anchor: attributes.anchor
17158 + });
17159 + }
17160 + },
17161 + {
17162 + type: "block",
17163 + blocks: ["core/image"],
17164 + isMatch: ({ id }) => {
17165 + if (!id) {
17166 + return false;
17167 + }
17168 + const { getEntityRecord } = (0,external_wp_data_namespaceObject.select)(external_wp_coreData_namespaceObject.store);
17169 + const media = getEntityRecord("postType", "attachment", id);
17170 + return !!media && media.mime_type.includes("image");
17171 + },
17172 + transform: (attributes) => {
17173 + return (0,external_wp_blocks_namespaceObject.createBlock)("core/image", {
17174 + url: attributes.href,
17175 + caption: attributes.fileName,
17176 + id: attributes.id,
17177 + anchor: attributes.anchor
17178 + });
17179 + }
17180 + }
17181 + ]
17182 + };
17183 + var file_transforms_transforms_default = file_transforms_transforms;
17184 +
17185 +
17186 + ;// ./node_modules/@wordpress/block-library/build-module/file/index.js
17187 +
17188 +
17189 +
17190 +
17191 +
17192 +
17193 +
17194 +
17195 + const { name: file_name } = file_block_namespaceObject;
17196 + const file_settings = {
17197 + icon: file_default,
17198 + example: {
17199 + attributes: {
17200 + href: "https://upload.wikimedia.org/wikipedia/commons/d/dd/Armstrong_Small_Step.ogg",
17201 + fileName: (0,external_wp_i18n_namespaceObject._x)("Armstrong_Small_Step", "Name of the file")
17202 + }
17203 + },
17204 + transforms: file_transforms_transforms_default,
17205 + deprecated: file_deprecated_deprecated_default,
17206 + edit: file_edit_edit_default,
17207 + save: file_save_save
17208 + };
17209 + const file_init = () => initBlock({ name: file_name, metadata: file_block_namespaceObject, settings: file_settings });
17210 +
17211 +
17212 + ;// ./node_modules/@wordpress/block-library/build-module/form/utils.js
17213 +
17214 + const formSubmissionNotificationSuccess = [
17215 + "core/form-submission-notification",
17216 + {
17217 + type: "success"
17218 + },
17219 + [
17220 + [
17221 + "core/paragraph",
17222 + {
17223 + content: '<mark style="background-color:rgba(0, 0, 0, 0);color:#345C00" class="has-inline-color">' + (0,external_wp_i18n_namespaceObject.__)("Your form has been submitted successfully") + "</mark>"
17224 + }
17225 + ]
17226 + ]
17227 + ];
17228 + const formSubmissionNotificationError = [
17229 + "core/form-submission-notification",
17230 + {
17231 + type: "error"
17232 + },
17233 + [
17234 + [
17235 + "core/paragraph",
17236 + {
17237 + content: '<mark style="background-color:rgba(0, 0, 0, 0);color:#CF2E2E" class="has-inline-color">' + (0,external_wp_i18n_namespaceObject.__)("There was an error submitting your form.") + "</mark>"
17238 + }
17239 + ]
17240 + ]
17241 + ];
17242 +
17243 +
17244 + ;// ./node_modules/@wordpress/block-library/build-module/form/edit.js
17245 +
17246 +
17247 +
17248 +
17249 +
17250 +
17251 +
17252 + const form_edit_TEMPLATE = [
17253 + formSubmissionNotificationSuccess,
17254 + formSubmissionNotificationError,
17255 + [
17256 + "core/form-input",
17257 + {
17258 + type: "text",
17259 + label: (0,external_wp_i18n_namespaceObject.__)("Name"),
17260 + required: true
17261 + }
17262 + ],
17263 + [
17264 + "core/form-input",
17265 + {
17266 + type: "email",
17267 + label: (0,external_wp_i18n_namespaceObject.__)("Email"),
17268 + required: true
17269 + }
17270 + ],
17271 + [
17272 + "core/form-input",
17273 + {
17274 + type: "textarea",
17275 + label: (0,external_wp_i18n_namespaceObject.__)("Comment"),
17276 + required: true
17277 + }
17278 + ],
17279 + ["core/form-submit-button", {}]
17280 + ];
17281 + const form_edit_Edit = ({ attributes, setAttributes, clientId }) => {
17282 + const dropdownMenuProps = useToolsPanelDropdownMenuProps();
17283 + const resetAllSettings = () => {
17284 + setAttributes({
17285 + submissionMethod: "email",
17286 + email: void 0,
17287 + action: void 0,
17288 + method: "post"
17289 + });
17290 + };
17291 + const { action, method, email, submissionMethod } = attributes;
17292 + const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)();
17293 + const { hasInnerBlocks } = (0,external_wp_data_namespaceObject.useSelect)(
17294 + (select) => {
17295 + const { getBlock } = select(external_wp_blockEditor_namespaceObject.store);
17296 + const block = getBlock(clientId);
17297 + return {
17298 + hasInnerBlocks: !!(block && block.innerBlocks.length)
17299 + };
17300 + },
17301 + [clientId]
17302 + );
17303 + const innerBlocksProps = (0,external_wp_blockEditor_namespaceObject.useInnerBlocksProps)(blockProps, {
17304 + template: form_edit_TEMPLATE,
17305 + renderAppender: hasInnerBlocks ? void 0 : external_wp_blockEditor_namespaceObject.InnerBlocks.ButtonBlockAppender
17306 + });
17307 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
17308 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(
17309 + external_wp_components_namespaceObject.__experimentalToolsPanel,
17310 + {
17311 + dropdownMenuProps,
17312 + label: (0,external_wp_i18n_namespaceObject.__)("Settings"),
17313 + resetAll: resetAllSettings,
17314 + children: [
17315 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
17316 + external_wp_components_namespaceObject.__experimentalToolsPanelItem,
17317 + {
17318 + hasValue: () => submissionMethod !== "email",
17319 + label: (0,external_wp_i18n_namespaceObject.__)("Submissions method"),
17320 + onDeselect: () => setAttributes({
17321 + submissionMethod: "email"
17322 + }),
17323 + isShownByDefault: true,
17324 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
17325 + external_wp_components_namespaceObject.SelectControl,
17326 + {
17327 + __nextHasNoMarginBottom: true,
17328 + __next40pxDefaultSize: true,
17329 + label: (0,external_wp_i18n_namespaceObject.__)("Submissions method"),
17330 + options: [
17331 + // TODO: Allow plugins to add their own submission methods.
17332 + {
17333 + label: (0,external_wp_i18n_namespaceObject.__)("Send email"),
17334 + value: "email"
17335 + },
17336 + {
17337 + label: (0,external_wp_i18n_namespaceObject.__)("- Custom -"),
17338 + value: "custom"
17339 + }
17340 + ],
17341 + value: submissionMethod,
17342 + onChange: (value) => setAttributes({ submissionMethod: value }),
17343 + help: submissionMethod === "custom" ? (0,external_wp_i18n_namespaceObject.__)(
17344 + 'Select the method to use for form submissions. Additional options for the "custom" mode can be found in the "Advanced" section.'
17345 + ) : (0,external_wp_i18n_namespaceObject.__)(
17346 + "Select the method to use for form submissions."
17347 + )
17348 + }
17349 + )
17350 + }
17351 + ),
17352 + submissionMethod === "email" && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
17353 + external_wp_components_namespaceObject.__experimentalToolsPanelItem,
17354 + {
17355 + hasValue: () => !!email,
17356 + label: (0,external_wp_i18n_namespaceObject.__)("Email for form submissions"),
17357 + onDeselect: () => setAttributes({
17358 + email: void 0,
17359 + action: void 0,
17360 + method: "post"
17361 + }),
17362 + isShownByDefault: true,
17363 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
17364 + external_wp_components_namespaceObject.TextControl,
17365 + {
17366 + __nextHasNoMarginBottom: true,
17367 + __next40pxDefaultSize: true,
17368 + autoComplete: "off",
17369 + label: (0,external_wp_i18n_namespaceObject.__)("Email for form submissions"),
17370 + value: email || "",
17371 + required: true,
17372 + onChange: (value) => {
17373 + setAttributes({ email: value });
17374 + setAttributes({
17375 + action: `mailto:${value}`
17376 + });
17377 + setAttributes({ method: "post" });
17378 + },
17379 + help: (0,external_wp_i18n_namespaceObject.__)(
17380 + "The email address where form submissions will be sent. Separate multiple email addresses with a comma."
17381 + ),
17382 + type: "email"
17383 + }
17384 + )
17385 + }
17386 + )
17387 + ]
17388 + }
17389 + ) }),
17390 + submissionMethod !== "email" && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_blockEditor_namespaceObject.InspectorControls, { group: "advanced", children: [
17391 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
17392 + external_wp_components_namespaceObject.SelectControl,
17393 + {
17394 + __next40pxDefaultSize: true,
17395 + __nextHasNoMarginBottom: true,
17396 + label: (0,external_wp_i18n_namespaceObject.__)("Method"),
17397 + options: [
17398 + { label: "Get", value: "get" },
17399 + { label: "Post", value: "post" }
17400 + ],
17401 + value: method,
17402 + onChange: (value) => setAttributes({ method: value }),
17403 + help: (0,external_wp_i18n_namespaceObject.__)(
17404 + "Select the method to use for form submissions."
17405 + )
17406 + }
17407 + ),
17408 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
17409 + external_wp_components_namespaceObject.TextControl,
17410 + {
17411 + __next40pxDefaultSize: true,
17412 + __nextHasNoMarginBottom: true,
17413 + autoComplete: "off",
17414 + label: (0,external_wp_i18n_namespaceObject.__)("Form action"),
17415 + value: action,
17416 + onChange: (newVal) => {
17417 + setAttributes({
17418 + action: newVal
17419 + });
17420 + },
17421 + help: (0,external_wp_i18n_namespaceObject.__)(
17422 + "The URL where the form should be submitted."
17423 + ),
17424 + type: "url"
17425 + }
17426 + )
17427 + ] }),
17428 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
17429 + "form",
17430 + {
17431 + ...innerBlocksProps,
17432 + encType: submissionMethod === "email" ? "text/plain" : null
17433 + }
17434 + )
17435 + ] });
17436 + };
17437 + var form_edit_edit_default = form_edit_Edit;
17438 +
17439 +
17440 + ;// ./node_modules/@wordpress/block-library/build-module/form/block.json
17441 + const form_block_namespaceObject = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"__experimental":true,"name":"core/form","title":"Form","category":"common","allowedBlocks":["core/paragraph","core/heading","core/form-input","core/form-submit-button","core/form-submission-notification","core/group","core/columns"],"description":"A form.","keywords":["container","wrapper","row","section"],"textdomain":"default","icon":"feedback","attributes":{"submissionMethod":{"type":"string","default":"email"},"method":{"type":"string","default":"post"},"action":{"type":"string"},"email":{"type":"string"}},"supports":{"anchor":true,"color":{"gradients":true,"link":true,"__experimentalDefaultControls":{"background":true,"text":true,"link":true}},"spacing":{"margin":true,"padding":true},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalTextDecoration":true,"__experimentalFontStyle":true,"__experimentalFontWeight":true,"__experimentalLetterSpacing":true,"__experimentalTextTransform":true,"__experimentalDefaultControls":{"fontSize":true}}}}');
17442 + ;// ./node_modules/@wordpress/block-library/build-module/form/save.js
17443 +
17444 +
17445 + function form_save_save({ attributes }) {
17446 + const blockProps = external_wp_blockEditor_namespaceObject.useBlockProps.save();
17447 + const { submissionMethod } = attributes;
17448 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
17449 + "form",
17450 + {
17451 + ...blockProps,
17452 + encType: submissionMethod === "email" ? "text/plain" : null,
17453 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, {})
17454 + }
17455 + );
17456 + }
17457 +
17458 +
17459 + ;// ./node_modules/@wordpress/block-library/build-module/form/variations.js
17460 +
17461 +
17462 + const form_variations_variations = [
17463 + {
17464 + name: "comment-form",
17465 + title: (0,external_wp_i18n_namespaceObject.__)("Experimental Comment form"),
17466 + description: (0,external_wp_i18n_namespaceObject.__)("A comment form for posts and pages."),
17467 + attributes: {
17468 + submissionMethod: "custom",
17469 + action: "{SITE_URL}/wp-comments-post.php",
17470 + method: "post",
17471 + anchor: "comment-form"
17472 + },
17473 + isDefault: false,
17474 + innerBlocks: [
17475 + [
17476 + "core/form-input",
17477 + {
17478 + type: "text",
17479 + name: "author",
17480 + label: (0,external_wp_i18n_namespaceObject.__)("Name"),
17481 + required: true,
17482 + visibilityPermissions: "logged-out"
17483 + }
17484 + ],
17485 + [
17486 + "core/form-input",
17487 + {
17488 + type: "email",
17489 + name: "email",
17490 + label: (0,external_wp_i18n_namespaceObject.__)("Email"),
17491 + required: true,
17492 + visibilityPermissions: "logged-out"
17493 + }
17494 + ],
17495 + [
17496 + "core/form-input",
17497 + {
17498 + type: "textarea",
17499 + name: "comment",
17500 + label: (0,external_wp_i18n_namespaceObject.__)("Comment"),
17501 + required: true,
17502 + visibilityPermissions: "all"
17503 + }
17504 + ],
17505 + ["core/form-submit-button", {}]
17506 + ],
17507 + scope: ["inserter", "transform"],
17508 + isActive: (blockAttributes) => !blockAttributes?.type || blockAttributes?.type === "text"
17509 + },
17510 + {
17511 + name: "wp-privacy-form",
17512 + title: (0,external_wp_i18n_namespaceObject.__)("Experimental Privacy Request Form"),
17513 + keywords: ["GDPR"],
17514 + description: (0,external_wp_i18n_namespaceObject.__)("A form to request data exports and/or deletion."),
17515 + attributes: {
17516 + submissionMethod: "custom",
17517 + action: "",
17518 + method: "post",
17519 + anchor: "gdpr-form"
17520 + },
17521 + isDefault: false,
17522 + innerBlocks: [
17523 + formSubmissionNotificationSuccess,
17524 + formSubmissionNotificationError,
17525 + [
17526 + "core/paragraph",
17527 + {
17528 + content: (0,external_wp_i18n_namespaceObject.__)(
17529 + "To request an export or deletion of your personal data on this site, please fill-in the form below. You can define the type of request you wish to perform, and your email address. Once the form is submitted, you will receive a confirmation email with instructions on the next steps."
17530 + )
17531 + }
17532 + ],
17533 + [
17534 + "core/form-input",
17535 + {
17536 + type: "email",
17537 + name: "email",
17538 + label: (0,external_wp_i18n_namespaceObject.__)("Enter your email address."),
17539 + required: true,
17540 + visibilityPermissions: "all"
17541 + }
17542 + ],
17543 + [
17544 + "core/form-input",
17545 + {
17546 + type: "checkbox",
17547 + name: "export_personal_data",
17548 + label: (0,external_wp_i18n_namespaceObject.__)("Request data export"),
17549 + required: false,
17550 + visibilityPermissions: "all"
17551 + }
17552 + ],
17553 + [
17554 + "core/form-input",
17555 + {
17556 + type: "checkbox",
17557 + name: "remove_personal_data",
17558 + label: (0,external_wp_i18n_namespaceObject.__)("Request data deletion"),
17559 + required: false,
17560 + visibilityPermissions: "all"
17561 + }
17562 + ],
17563 + ["core/form-submit-button", {}],
17564 + [
17565 + "core/form-input",
17566 + {
17567 + type: "hidden",
17568 + name: "wp-action",
17569 + value: "wp_privacy_send_request"
17570 + }
17571 + ],
17572 + [
17573 + "core/form-input",
17574 + {
17575 + type: "hidden",
17576 + name: "wp-privacy-request",
17577 + value: "1"
17578 + }
17579 + ]
17580 + ],
17581 + scope: ["inserter", "transform"],
17582 + isActive: (blockAttributes) => !blockAttributes?.type || blockAttributes?.type === "text"
17583 + }
17584 + ];
17585 + var form_variations_variations_default = form_variations_variations;
17586 +
17587 +
17588 + ;// ./node_modules/@wordpress/block-library/build-module/form/deprecated.js
17589 +
17590 +
17591 + const form_deprecated_v1 = {
17592 + // The block supports here are deliberately empty despite this
17593 + // deprecated version of the block having adopted block supports.
17594 + // The attributes added by these supports have been manually
17595 + // added to this deprecated version's attributes definition so
17596 + // that the data isn't lost on migration. All this is so that the
17597 + // automatic application of block support classes doesn't occur
17598 + // as this version of the block had a bug that overrode those
17599 + // classes. If those block support classes are applied during the
17600 + // deprecation process, this deprecation doesn't match and won't
17601 + // run.
17602 + // @see https://github.com/WordPress/gutenberg/pull/55755
17603 + supports: {},
17604 + attributes: {
17605 + submissionMethod: {
17606 + type: "string",
17607 + default: "email"
17608 + },
17609 + method: {
17610 + type: "string",
17611 + default: "post"
17612 + },
17613 + action: {
17614 + type: "string"
17615 + },
17616 + email: {
17617 + type: "string"
17618 + },
17619 + // The following attributes have been added to match the block
17620 + // supports at the time of the deprecation. See above for details.
17621 + anchor: {
17622 + type: "string",
17623 + source: "attribute",
17624 + attribute: "id",
17625 + selector: "*"
17626 + },
17627 + backgroundColor: {
17628 + type: "string"
17629 + },
17630 + textColor: {
17631 + type: "string"
17632 + },
17633 + gradient: {
17634 + type: "string"
17635 + },
17636 + style: {
17637 + type: "object"
17638 + },
17639 + fontFamily: {
17640 + type: "string"
17641 + },
17642 + fontSize: {
17643 + type: "string"
17644 + }
17645 + },
17646 + save({ attributes }) {
17647 + const { submissionMethod } = attributes;
17648 + const colorProps = (0,external_wp_blockEditor_namespaceObject.__experimentalGetColorClassesAndStyles)(attributes);
17649 + const typographyProps = (0,external_wp_blockEditor_namespaceObject.getTypographyClassesAndStyles)(attributes);
17650 + const spacingProps = (0,external_wp_blockEditor_namespaceObject.__experimentalGetSpacingClassesAndStyles)(attributes);
17651 + const blockProps = external_wp_blockEditor_namespaceObject.useBlockProps.save({
17652 + // In this deprecated version, the block support is deliberately empty.
17653 + // As a result, the useBlockProps.save() does not output style or id attributes,
17654 + // so we apply them explicitly here.
17655 + style: {
17656 + ...colorProps.style,
17657 + ...typographyProps.style,
17658 + ...spacingProps.style
17659 + },
17660 + id: attributes.anchor
17661 + });
17662 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
17663 + "form",
17664 + {
17665 + ...blockProps,
17666 + className: "wp-block-form",
17667 + encType: submissionMethod === "email" ? "text/plain" : null,
17668 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, {})
17669 + }
17670 + );
17671 + }
17672 + };
17673 + var form_deprecated_deprecated_default = [form_deprecated_v1];
17674 +
17675 +
17676 + ;// ./node_modules/@wordpress/block-library/build-module/form/index.js
17677 +
17678 +
17679 +
17680 +
17681 +
17682 +
17683 +
17684 + const { name: form_name } = form_block_namespaceObject;
17685 + const form_settings = {
17686 + edit: form_edit_edit_default,
17687 + save: form_save_save,
17688 + deprecated: form_deprecated_deprecated_default,
17689 + variations: form_variations_variations_default,
17690 + example: {}
17691 + };
17692 + const form_init = () => {
17693 + const DISALLOWED_PARENTS = ["core/form"];
17694 + (0,external_wp_hooks_namespaceObject.addFilter)(
17695 + "blockEditor.__unstableCanInsertBlockType",
17696 + "core/block-library/preventInsertingFormIntoAnotherForm",
17697 + (canInsert, blockType, rootClientId, { getBlock, getBlockParentsByBlockName }) => {
17698 + if (blockType.name !== "core/form") {
17699 + return canInsert;
17700 + }
17701 + for (const disallowedParentType of DISALLOWED_PARENTS) {
17702 + const hasDisallowedParent = getBlock(rootClientId)?.name === disallowedParentType || getBlockParentsByBlockName(
17703 + rootClientId,
17704 + disallowedParentType
17705 + ).length;
17706 + if (hasDisallowedParent) {
17707 + return false;
17708 + }
17709 + }
17710 + return true;
17711 + }
17712 + );
17713 + return initBlock({ name: form_name, metadata: form_block_namespaceObject, settings: form_settings });
17714 + };
17715 +
17716 +
17717 + // EXTERNAL MODULE: ./node_modules/remove-accents/index.js
17718 + var remove_accents = __webpack_require__(9681);
17719 + var remove_accents_default = /*#__PURE__*/__webpack_require__.n(remove_accents);
17720 + ;// external ["wp","dom"]
17721 + const external_wp_dom_namespaceObject = window["wp"]["dom"];
17722 + ;// ./node_modules/@wordpress/block-library/build-module/form-input/deprecated.js
17723 +
17724 +
17725 +
17726 +
17727 +
17728 + const getNameFromLabelV1 = (content) => {
17729 + return remove_accents_default()((0,external_wp_dom_namespaceObject.__unstableStripHTML)(content)).replace(/[^\p{L}\p{N}]+/gu, "-").toLowerCase().replace(/(^-+)|(-+$)/g, "");
17730 + };
17731 + const form_input_deprecated_v2 = {
17732 + attributes: {
17733 + type: {
17734 + type: "string",
17735 + default: "text"
17736 + },
17737 + name: {
17738 + type: "string"
17739 + },
17740 + label: {
17741 + type: "string",
17742 + default: "Label",
17743 + selector: ".wp-block-form-input__label-content",
17744 + source: "html",
17745 + role: "content"
17746 + },
17747 + inlineLabel: {
17748 + type: "boolean",
17749 + default: false
17750 + },
17751 + required: {
17752 + type: "boolean",
17753 + default: false,
17754 + selector: ".wp-block-form-input__input",
17755 + source: "attribute",
17756 + attribute: "required"
17757 + },
17758 + placeholder: {
17759 + type: "string",
17760 + selector: ".wp-block-form-input__input",
17761 + source: "attribute",
17762 + attribute: "placeholder",
17763 + role: "content"
17764 + },
17765 + value: {
17766 + type: "string",
17767 + default: "",
17768 + selector: "input",
17769 + source: "attribute",
17770 + attribute: "value"
17771 + },
17772 + visibilityPermissions: {
17773 + type: "string",
17774 + default: "all"
17775 + }
17776 + },
17777 + supports: {
17778 + anchor: true,
17779 + reusable: false,
17780 + spacing: {
17781 + margin: ["top", "bottom"]
17782 + },
17783 + __experimentalBorder: {
17784 + radius: true,
17785 + __experimentalSkipSerialization: true,
17786 + __experimentalDefaultControls: {
17787 + radius: true
17788 + }
17789 + }
17790 + },
17791 + save({ attributes }) {
17792 + const { type, name, label, inlineLabel, required, placeholder, value } = attributes;
17793 + const borderProps = (0,external_wp_blockEditor_namespaceObject.__experimentalGetBorderClassesAndStyles)(attributes);
17794 + const colorProps = (0,external_wp_blockEditor_namespaceObject.__experimentalGetColorClassesAndStyles)(attributes);
17795 + const inputStyle = {
17796 + ...borderProps.style,
17797 + ...colorProps.style
17798 + };
17799 + const inputClasses = dist_clsx(
17800 + "wp-block-form-input__input",
17801 + colorProps.className,
17802 + borderProps.className
17803 + );
17804 + const TagName = type === "textarea" ? "textarea" : "input";
17805 + const blockProps = external_wp_blockEditor_namespaceObject.useBlockProps.save();
17806 + if ("hidden" === type) {
17807 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("input", { type, name, value });
17808 + }
17809 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { ...blockProps, children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(
17810 + "label",
17811 + {
17812 + className: dist_clsx("wp-block-form-input__label", {
17813 + "is-label-inline": inlineLabel
17814 + }),
17815 + children: [
17816 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("span", { className: "wp-block-form-input__label-content", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichText.Content, { value: label }) }),
17817 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
17818 + TagName,
17819 + {
17820 + className: inputClasses,
17821 + type: "textarea" === type ? void 0 : type,
17822 + name: name || getNameFromLabelV1(label),
17823 + required,
17824 + "aria-required": required,
17825 + placeholder: placeholder || void 0,
17826 + style: inputStyle
17827 + }
17828 + )
17829 + ]
17830 + }
17831 + ) });
17832 + }
17833 + };
17834 + const form_input_deprecated_v1 = {
17835 + attributes: {
17836 + type: {
17837 + type: "string",
17838 + default: "text"
17839 + },
17840 + name: {
17841 + type: "string"
17842 + },
17843 + label: {
17844 + type: "string",
17845 + default: "Label",
17846 + selector: ".wp-block-form-input__label-content",
17847 + source: "html",
17848 + role: "content"
17849 + },
17850 + inlineLabel: {
17851 + type: "boolean",
17852 + default: false
17853 + },
17854 + required: {
17855 + type: "boolean",
17856 + default: false,
17857 + selector: ".wp-block-form-input__input",
17858 + source: "attribute",
17859 + attribute: "required"
17860 + },
17861 + placeholder: {
17862 + type: "string",
17863 + selector: ".wp-block-form-input__input",
17864 + source: "attribute",
17865 + attribute: "placeholder",
17866 + role: "content"
17867 + },
17868 + value: {
17869 + type: "string",
17870 + default: "",
17871 + selector: "input",
17872 + source: "attribute",
17873 + attribute: "value"
17874 + },
17875 + visibilityPermissions: {
17876 + type: "string",
17877 + default: "all"
17878 + }
17879 + },
17880 + supports: {
17881 + className: false,
17882 + anchor: true,
17883 + reusable: false,
17884 + spacing: {
17885 + margin: ["top", "bottom"]
17886 + },
17887 + __experimentalBorder: {
17888 + radius: true,
17889 + __experimentalSkipSerialization: true,
17890 + __experimentalDefaultControls: {
17891 + radius: true
17892 + }
17893 + }
17894 + },
17895 + save({ attributes }) {
17896 + const { type, name, label, inlineLabel, required, placeholder, value } = attributes;
17897 + const borderProps = (0,external_wp_blockEditor_namespaceObject.__experimentalGetBorderClassesAndStyles)(attributes);
17898 + const colorProps = (0,external_wp_blockEditor_namespaceObject.__experimentalGetColorClassesAndStyles)(attributes);
17899 + const inputStyle = {
17900 + ...borderProps.style,
17901 + ...colorProps.style
17902 + };
17903 + const inputClasses = dist_clsx(
17904 + "wp-block-form-input__input",
17905 + colorProps.className,
17906 + borderProps.className
17907 + );
17908 + const TagName = type === "textarea" ? "textarea" : "input";
17909 + if ("hidden" === type) {
17910 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("input", { type, name, value });
17911 + }
17912 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(
17913 + "label",
17914 + {
17915 + className: dist_clsx("wp-block-form-input__label", {
17916 + "is-label-inline": inlineLabel
17917 + }),
17918 + children: [
17919 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("span", { className: "wp-block-form-input__label-content", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichText.Content, { value: label }) }),
17920 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
17921 + TagName,
17922 + {
17923 + className: inputClasses,
17924 + type: "textarea" === type ? void 0 : type,
17925 + name: name || getNameFromLabelV1(label),
17926 + required,
17927 + "aria-required": required,
17928 + placeholder: placeholder || void 0,
17929 + style: inputStyle
17930 + }
17931 + )
17932 + ]
17933 + }
17934 + );
17935 + }
17936 + };
17937 + const form_input_deprecated_deprecated = [form_input_deprecated_v2, form_input_deprecated_v1];
17938 + var form_input_deprecated_deprecated_default = form_input_deprecated_deprecated;
17939 +
17940 +
17941 + ;// ./node_modules/@wordpress/block-library/build-module/form-input/edit.js
17942 +
17943 +
17944 +
17945 +
17946 +
17947 +
17948 +
17949 + function InputFieldBlock({ attributes, setAttributes, className }) {
17950 + const { type, name, label, inlineLabel, required, placeholder, value } = attributes;
17951 + const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)();
17952 + const dropdownMenuProps = useToolsPanelDropdownMenuProps();
17953 + const ref = (0,external_wp_element_namespaceObject.useRef)();
17954 + const TagName = type === "textarea" ? "textarea" : "input";
17955 + const borderProps = (0,external_wp_blockEditor_namespaceObject.__experimentalUseBorderProps)(attributes);
17956 + const colorProps = (0,external_wp_blockEditor_namespaceObject.__experimentalUseColorProps)(attributes);
17957 + if (ref.current) {
17958 + ref.current.focus();
17959 + }
17960 + const isCheckboxOrRadio = type === "checkbox" || type === "radio";
17961 + const controls = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
17962 + "hidden" !== type && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(
17963 + external_wp_components_namespaceObject.__experimentalToolsPanel,
17964 + {
17965 + label: (0,external_wp_i18n_namespaceObject.__)("Settings"),
17966 + resetAll: () => {
17967 + setAttributes({
17968 + inlineLabel: false,
17969 + required: false
17970 + });
17971 + },
17972 + dropdownMenuProps,
17973 + children: [
17974 + "checkbox" !== type && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
17975 + external_wp_components_namespaceObject.__experimentalToolsPanelItem,
17976 + {
17977 + label: (0,external_wp_i18n_namespaceObject.__)("Inline label"),
17978 + hasValue: () => !!inlineLabel,
17979 + onDeselect: () => setAttributes({ inlineLabel: false }),
17980 + isShownByDefault: true,
17981 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
17982 + external_wp_components_namespaceObject.CheckboxControl,
17983 + {
17984 + __nextHasNoMarginBottom: true,
17985 + label: (0,external_wp_i18n_namespaceObject.__)("Inline label"),
17986 + checked: inlineLabel,
17987 + onChange: (newVal) => {
17988 + setAttributes({
17989 + inlineLabel: newVal
17990 + });
17991 + }
17992 + }
17993 + )
17994 + }
17995 + ),
17996 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
17997 + external_wp_components_namespaceObject.__experimentalToolsPanelItem,
17998 + {
17999 + label: (0,external_wp_i18n_namespaceObject.__)("Required"),
18000 + hasValue: () => !!required,
18001 + onDeselect: () => setAttributes({ required: false }),
18002 + isShownByDefault: true,
18003 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
18004 + external_wp_components_namespaceObject.CheckboxControl,
18005 + {
18006 + __nextHasNoMarginBottom: true,
18007 + label: (0,external_wp_i18n_namespaceObject.__)("Required"),
18008 + checked: required,
18009 + onChange: (newVal) => {
18010 + setAttributes({
18011 + required: newVal
18012 + });
18013 + }
18014 + }
18015 + )
18016 + }
18017 + )
18018 + ]
18019 + }
18020 + ) }),
18021 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, { group: "advanced", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
18022 + external_wp_components_namespaceObject.TextControl,
18023 + {
18024 + __next40pxDefaultSize: true,
18025 + __nextHasNoMarginBottom: true,
18026 + autoComplete: "off",
18027 + label: (0,external_wp_i18n_namespaceObject.__)("Name"),
18028 + value: name,
18029 + onChange: (newVal) => {
18030 + setAttributes({
18031 + name: newVal
18032 + });
18033 + },
18034 + help: (0,external_wp_i18n_namespaceObject.__)(
18035 + 'Affects the "name" attribute of the input element, and is used as a name for the form submission results.'
18036 + )
18037 + }
18038 + ) })
18039 + ] });
18040 + const content = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
18041 + external_wp_blockEditor_namespaceObject.RichText,
18042 + {
18043 + tagName: "span",
18044 + className: "wp-block-form-input__label-content",
18045 + value: label,
18046 + onChange: (newLabel) => setAttributes({ label: newLabel }),
18047 + "aria-label": label ? (0,external_wp_i18n_namespaceObject.__)("Label") : (0,external_wp_i18n_namespaceObject.__)("Empty label"),
18048 + "data-empty": !label,
18049 + placeholder: (0,external_wp_i18n_namespaceObject.__)("Type the label for this input")
18050 + }
18051 + );
18052 + if ("hidden" === type) {
18053 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
18054 + controls,
18055 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
18056 + "input",
18057 + {
18058 + type: "hidden",
18059 + className: dist_clsx(
18060 + className,
18061 + "wp-block-form-input__input",
18062 + colorProps.className,
18063 + borderProps.className
18064 + ),
18065 + "aria-label": (0,external_wp_i18n_namespaceObject.__)("Value"),
18066 + value,
18067 + onChange: (event) => setAttributes({ value: event.target.value })
18068 + }
18069 + )
18070 + ] });
18071 + }
18072 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", { ...blockProps, children: [
18073 + controls,
18074 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(
18075 + "span",
18076 + {
18077 + className: dist_clsx("wp-block-form-input__label", {
18078 + "is-label-inline": inlineLabel || "checkbox" === type
18079 + }),
18080 + children: [
18081 + !isCheckboxOrRadio && content,
18082 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
18083 + TagName,
18084 + {
18085 + type: "textarea" === type ? void 0 : type,
18086 + className: dist_clsx(
18087 + className,
18088 + "wp-block-form-input__input",
18089 + colorProps.className,
18090 + borderProps.className
18091 + ),
18092 + "aria-label": (0,external_wp_i18n_namespaceObject.__)("Optional placeholder text"),
18093 + placeholder: placeholder ? void 0 : (0,external_wp_i18n_namespaceObject.__)("Optional placeholder\u2026"),
18094 + value: placeholder,
18095 + onChange: (event) => setAttributes({ placeholder: event.target.value }),
18096 + "aria-required": required,
18097 + style: {
18098 + ...borderProps.style,
18099 + ...colorProps.style
18100 + }
18101 + }
18102 + ),
18103 + isCheckboxOrRadio && content
18104 + ]
18105 + }
18106 + )
18107 + ] });
18108 + }
18109 + var form_input_edit_edit_default = InputFieldBlock;
18110 +
18111 +
18112 + ;// ./node_modules/@wordpress/block-library/build-module/form-input/block.json
18113 + const form_input_block_namespaceObject = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"__experimental":true,"name":"core/form-input","title":"Input Field","category":"common","ancestor":["core/form"],"description":"The basic building block for forms.","keywords":["input","form"],"textdomain":"default","icon":"forms","attributes":{"type":{"type":"string","default":"text"},"name":{"type":"string"},"label":{"type":"rich-text","default":"Label","selector":".wp-block-form-input__label-content","source":"rich-text","role":"content"},"inlineLabel":{"type":"boolean","default":false},"required":{"type":"boolean","default":false,"selector":".wp-block-form-input__input","source":"attribute","attribute":"required"},"placeholder":{"type":"string","selector":".wp-block-form-input__input","source":"attribute","attribute":"placeholder","role":"content"},"value":{"type":"string","default":"","selector":"input","source":"attribute","attribute":"value"},"visibilityPermissions":{"type":"string","default":"all"}},"supports":{"anchor":true,"reusable":false,"spacing":{"margin":["top","bottom"]},"__experimentalBorder":{"radius":true,"__experimentalSkipSerialization":true,"__experimentalDefaultControls":{"radius":true}}},"style":["wp-block-form-input"]}');
18114 + ;// ./node_modules/@wordpress/block-library/build-module/form-input/save.js
18115 +
18116 +
18117 +
18118 +
18119 +
18120 + const getNameFromLabel = (content) => {
18121 + return remove_accents_default()((0,external_wp_dom_namespaceObject.__unstableStripHTML)(content)).replace(/[^\p{L}\p{N}]+/gu, "-").toLowerCase().replace(/(^-+)|(-+$)/g, "");
18122 + };
18123 + function form_input_save_save({ attributes }) {
18124 + const { type, name, label, inlineLabel, required, placeholder, value } = attributes;
18125 + const borderProps = (0,external_wp_blockEditor_namespaceObject.__experimentalGetBorderClassesAndStyles)(attributes);
18126 + const colorProps = (0,external_wp_blockEditor_namespaceObject.__experimentalGetColorClassesAndStyles)(attributes);
18127 + const inputStyle = {
18128 + ...borderProps.style,
18129 + ...colorProps.style
18130 + };
18131 + const inputClasses = dist_clsx(
18132 + "wp-block-form-input__input",
18133 + colorProps.className,
18134 + borderProps.className
18135 + );
18136 + const TagName = type === "textarea" ? "textarea" : "input";
18137 + const blockProps = external_wp_blockEditor_namespaceObject.useBlockProps.save();
18138 + const isCheckboxOrRadio = type === "checkbox" || type === "radio";
18139 + if ("hidden" === type) {
18140 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("input", { type, name, value });
18141 + }
18142 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { ...blockProps, children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(
18143 + "label",
18144 + {
18145 + className: dist_clsx("wp-block-form-input__label", {
18146 + "is-label-inline": inlineLabel
18147 + }),
18148 + children: [
18149 + !isCheckboxOrRadio && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("span", { className: "wp-block-form-input__label-content", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichText.Content, { value: label }) }),
18150 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
18151 + TagName,
18152 + {
18153 + className: inputClasses,
18154 + type: "textarea" === type ? void 0 : type,
18155 + name: name || getNameFromLabel(label),
18156 + required,
18157 + "aria-required": required,
18158 + placeholder: placeholder || void 0,
18159 + style: inputStyle
18160 + }
18161 + ),
18162 + isCheckboxOrRadio && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("span", { className: "wp-block-form-input__label-content", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichText.Content, { value: label }) })
18163 + ]
18164 + }
18165 + ) });
18166 + }
18167 +
18168 +
18169 + ;// ./node_modules/@wordpress/block-library/build-module/form-input/variations.js
18170 +
18171 + const form_input_variations_variations = [
18172 + {
18173 + name: "text",
18174 + title: (0,external_wp_i18n_namespaceObject.__)("Text Input"),
18175 + icon: "edit-page",
18176 + description: (0,external_wp_i18n_namespaceObject.__)("A generic text input."),
18177 + attributes: { type: "text" },
18178 + isDefault: true,
18179 + scope: ["inserter", "transform"],
18180 + isActive: (blockAttributes) => !blockAttributes?.type || blockAttributes?.type === "text"
18181 + },
18182 + {
18183 + name: "textarea",
18184 + title: (0,external_wp_i18n_namespaceObject.__)("Textarea Input"),
18185 + icon: "testimonial",
18186 + description: (0,external_wp_i18n_namespaceObject.__)(
18187 + "A textarea input to allow entering multiple lines of text."
18188 + ),
18189 + attributes: { type: "textarea" },
18190 + isDefault: true,
18191 + scope: ["inserter", "transform"],
18192 + isActive: (blockAttributes) => blockAttributes?.type === "textarea"
18193 + },
18194 + {
18195 + name: "checkbox",
18196 + title: (0,external_wp_i18n_namespaceObject.__)("Checkbox Input"),
18197 + description: (0,external_wp_i18n_namespaceObject.__)("A simple checkbox input."),
18198 + icon: "forms",
18199 + attributes: { type: "checkbox", inlineLabel: true },
18200 + isDefault: true,
18201 + scope: ["inserter", "transform"],
18202 + isActive: (blockAttributes) => blockAttributes?.type === "checkbox"
18203 + },
18204 + {
18205 + name: "email",
18206 + title: (0,external_wp_i18n_namespaceObject.__)("Email Input"),
18207 + icon: "email",
18208 + description: (0,external_wp_i18n_namespaceObject.__)("Used for email addresses."),
18209 + attributes: { type: "email" },
18210 + isDefault: true,
18211 + scope: ["inserter", "transform"],
18212 + isActive: (blockAttributes) => blockAttributes?.type === "email"
18213 + },
18214 + {
18215 + name: "url",
18216 + title: (0,external_wp_i18n_namespaceObject.__)("URL Input"),
18217 + icon: "admin-site",
18218 + description: (0,external_wp_i18n_namespaceObject.__)("Used for URLs."),
18219 + attributes: { type: "url" },
18220 + isDefault: true,
18221 + scope: ["inserter", "transform"],
18222 + isActive: (blockAttributes) => blockAttributes?.type === "url"
18223 + },
18224 + {
18225 + name: "tel",
18226 + title: (0,external_wp_i18n_namespaceObject.__)("Telephone Input"),
18227 + icon: "phone",
18228 + description: (0,external_wp_i18n_namespaceObject.__)("Used for phone numbers."),
18229 + attributes: { type: "tel" },
18230 + isDefault: true,
18231 + scope: ["inserter", "transform"],
18232 + isActive: (blockAttributes) => blockAttributes?.type === "tel"
18233 + },
18234 + {
18235 + name: "number",
18236 + title: (0,external_wp_i18n_namespaceObject.__)("Number Input"),
18237 + icon: "edit-page",
18238 + description: (0,external_wp_i18n_namespaceObject.__)("A numeric input."),
18239 + attributes: { type: "number" },
18240 + isDefault: true,
18241 + scope: ["inserter", "transform"],
18242 + isActive: (blockAttributes) => blockAttributes?.type === "number"
18243 + }
18244 + ];
18245 + var form_input_variations_variations_default = form_input_variations_variations;
18246 +
18247 +
18248 + ;// ./node_modules/@wordpress/block-library/build-module/form-input/index.js
18249 +
18250 +
18251 +
18252 +
18253 +
18254 +
18255 + const { name: form_input_name } = form_input_block_namespaceObject;
18256 + const form_input_settings = {
18257 + deprecated: form_input_deprecated_deprecated_default,
18258 + edit: form_input_edit_edit_default,
18259 + save: form_input_save_save,
18260 + variations: form_input_variations_variations_default,
18261 + example: {}
18262 + };
18263 + const form_input_init = () => initBlock({ name: form_input_name, metadata: form_input_block_namespaceObject, settings: form_input_settings });
18264 +
18265 +
18266 + ;// ./node_modules/@wordpress/block-library/build-module/form-submit-button/edit.js
18267 +
18268 +
18269 +
18270 + const form_submit_button_edit_TEMPLATE = [
18271 + [
18272 + "core/buttons",
18273 + {},
18274 + [
18275 + [
18276 + "core/button",
18277 + {
18278 + text: (0,external_wp_i18n_namespaceObject.__)("Submit"),
18279 + tagName: "button",
18280 + type: "submit"
18281 + }
18282 + ]
18283 + ]
18284 + ]
18285 + ];
18286 + const form_submit_button_edit_Edit = () => {
18287 + const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)();
18288 + const innerBlocksProps = (0,external_wp_blockEditor_namespaceObject.useInnerBlocksProps)(blockProps, {
18289 + template: form_submit_button_edit_TEMPLATE,
18290 + templateLock: "all"
18291 + });
18292 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { className: "wp-block-form-submit-wrapper", ...innerBlocksProps });
18293 + };
18294 + var form_submit_button_edit_edit_default = form_submit_button_edit_Edit;
18295 +
18296 +
18297 + ;// ./node_modules/@wordpress/block-library/build-module/form-submit-button/block.json
18298 + const form_submit_button_block_namespaceObject = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"__experimental":true,"name":"core/form-submit-button","title":"Form Submit Button","category":"common","icon":"button","ancestor":["core/form"],"allowedBlocks":["core/buttons","core/button"],"description":"A submission button for forms.","keywords":["submit","button","form"],"textdomain":"default","style":["wp-block-form-submit-button"]}');
18299 + ;// ./node_modules/@wordpress/block-library/build-module/form-submit-button/save.js
18300 +
18301 +
18302 + function form_submit_button_save_save() {
18303 + const blockProps = external_wp_blockEditor_namespaceObject.useBlockProps.save();
18304 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { className: "wp-block-form-submit-wrapper", ...blockProps, children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, {}) });
18305 + }
18306 +
18307 +
18308 + ;// ./node_modules/@wordpress/block-library/build-module/form-submit-button/index.js
18309 +
18310 +
18311 +
18312 +
18313 + const { name: form_submit_button_name } = form_submit_button_block_namespaceObject;
18314 + const form_submit_button_settings = {
18315 + edit: form_submit_button_edit_edit_default,
18316 + save: form_submit_button_save_save,
18317 + example: {}
18318 + };
18319 + const form_submit_button_init = () => initBlock({ name: form_submit_button_name, metadata: form_submit_button_block_namespaceObject, settings: form_submit_button_settings });
18320 +
18321 +
18322 + ;// ./node_modules/@wordpress/icons/build-module/library/group.js
18323 +
18324 +
18325 + var group_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M18 4h-7c-1.1 0-2 .9-2 2v3H6c-1.1 0-2 .9-2 2v7c0 1.1.9 2 2 2h7c1.1 0 2-.9 2-2v-3h3c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm-4.5 14c0 .3-.2.5-.5.5H6c-.3 0-.5-.2-.5-.5v-7c0-.3.2-.5.5-.5h3V13c0 1.1.9 2 2 2h2.5v3zm0-4.5H11c-.3 0-.5-.2-.5-.5v-2.5H13c.3 0 .5.2.5.5v2.5zm5-.5c0 .3-.2.5-.5.5h-3V11c0-1.1-.9-2-2-2h-2.5V6c0-.3.2-.5.5-.5h7c.3 0 .5.2.5.5v7z" }) });
18326 +
18327 +
18328 + ;// ./node_modules/@wordpress/block-library/build-module/form-submission-notification/edit.js
18329 +
18330 +
18331 +
18332 +
18333 +
18334 + const form_submission_notification_edit_TEMPLATE = [
18335 + [
18336 + "core/paragraph",
18337 + {
18338 + content: (0,external_wp_i18n_namespaceObject.__)(
18339 + "Enter the message you wish displayed for form submission error/success, and select the type of the message (success/error) from the block's options."
18340 + )
18341 + }
18342 + ]
18343 + ];
18344 + const form_submission_notification_edit_Edit = ({ attributes, clientId }) => {
18345 + const { type } = attributes;
18346 + const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)({
18347 + className: dist_clsx("wp-block-form-submission-notification", {
18348 + [`form-notification-type-${type}`]: type
18349 + })
18350 + });
18351 + const { hasInnerBlocks } = (0,external_wp_data_namespaceObject.useSelect)(
18352 + (select) => {
18353 + const { getBlock } = select(external_wp_blockEditor_namespaceObject.store);
18354 + const block = getBlock(clientId);
18355 + return {
18356 + hasInnerBlocks: !!(block && block.innerBlocks.length)
18357 + };
18358 + },
18359 + [clientId]
18360 + );
18361 + const innerBlocksProps = (0,external_wp_blockEditor_namespaceObject.useInnerBlocksProps)(blockProps, {
18362 + template: form_submission_notification_edit_TEMPLATE,
18363 + renderAppender: hasInnerBlocks ? void 0 : external_wp_blockEditor_namespaceObject.InnerBlocks.ButtonBlockAppender
18364 + });
18365 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
18366 + "div",
18367 + {
18368 + ...innerBlocksProps,
18369 + "data-message-success": (0,external_wp_i18n_namespaceObject.__)("Submission success notification"),
18370 + "data-message-error": (0,external_wp_i18n_namespaceObject.__)("Submission error notification")
18371 + }
18372 + );
18373 + };
18374 + var form_submission_notification_edit_edit_default = form_submission_notification_edit_Edit;
18375 +
18376 +
18377 + ;// ./node_modules/@wordpress/block-library/build-module/form-submission-notification/block.json
18378 + const form_submission_notification_block_namespaceObject = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"__experimental":true,"name":"core/form-submission-notification","title":"Form Submission Notification","category":"common","ancestor":["core/form"],"description":"Provide a notification message after the form has been submitted.","keywords":["form","feedback","notification","message"],"textdomain":"default","icon":"feedback","attributes":{"type":{"type":"string","default":"success"}}}');
18379 + ;// ./node_modules/@wordpress/block-library/build-module/form-submission-notification/save.js
18380 +
18381 +
18382 +
18383 + function form_submission_notification_save_save({ attributes }) {
18384 + const { type } = attributes;
18385 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
18386 + "div",
18387 + {
18388 + ...external_wp_blockEditor_namespaceObject.useInnerBlocksProps.save(
18389 + external_wp_blockEditor_namespaceObject.useBlockProps.save({
18390 + className: dist_clsx("wp-block-form-submission-notification", {
18391 + [`form-notification-type-${type}`]: type
18392 + })
18393 + })
18394 + )
18395 + }
18396 + );
18397 + }
18398 +
18399 +
18400 + ;// ./node_modules/@wordpress/block-library/build-module/form-submission-notification/variations.js
18401 +
18402 + const form_submission_notification_variations_variations = [
18403 + {
18404 + name: "form-submission-success",
18405 + title: (0,external_wp_i18n_namespaceObject.__)("Form Submission Success"),
18406 + description: (0,external_wp_i18n_namespaceObject.__)("Success message for form submissions."),
18407 + attributes: {
18408 + type: "success"
18409 + },
18410 + isDefault: true,
18411 + innerBlocks: [
18412 + [
18413 + "core/paragraph",
18414 + {
18415 + content: (0,external_wp_i18n_namespaceObject.__)("Your form has been submitted successfully."),
18416 + backgroundColor: "#00D084",
18417 + textColor: "#000000",
18418 + style: {
18419 + elements: { link: { color: { text: "#000000" } } }
18420 + }
18421 + }
18422 + ]
18423 + ],
18424 + scope: ["inserter", "transform"],
18425 + isActive: (blockAttributes) => !blockAttributes?.type || blockAttributes?.type === "success"
18426 + },
18427 + {
18428 + name: "form-submission-error",
18429 + title: (0,external_wp_i18n_namespaceObject.__)("Form Submission Error"),
18430 + description: (0,external_wp_i18n_namespaceObject.__)("Error/failure message for form submissions."),
18431 + attributes: {
18432 + type: "error"
18433 + },
18434 + isDefault: false,
18435 + innerBlocks: [
18436 + [
18437 + "core/paragraph",
18438 + {
18439 + content: (0,external_wp_i18n_namespaceObject.__)("There was an error submitting your form."),
18440 + backgroundColor: "#CF2E2E",
18441 + textColor: "#FFFFFF",
18442 + style: {
18443 + elements: { link: { color: { text: "#FFFFFF" } } }
18444 + }
18445 + }
18446 + ]
18447 + ],
18448 + scope: ["inserter", "transform"],
18449 + isActive: (blockAttributes) => !blockAttributes?.type || blockAttributes?.type === "error"
18450 + }
18451 + ];
18452 + var form_submission_notification_variations_variations_default = form_submission_notification_variations_variations;
18453 +
18454 +
18455 + ;// ./node_modules/@wordpress/block-library/build-module/form-submission-notification/index.js
18456 +
18457 +
18458 +
18459 +
18460 +
18461 +
18462 + const { name: form_submission_notification_name } = form_submission_notification_block_namespaceObject;
18463 + const form_submission_notification_settings = {
18464 + icon: group_default,
18465 + edit: form_submission_notification_edit_edit_default,
18466 + save: form_submission_notification_save_save,
18467 + variations: form_submission_notification_variations_variations_default,
18468 + example: {}
18469 + };
18470 + const form_submission_notification_init = () => initBlock({ name: form_submission_notification_name, metadata: form_submission_notification_block_namespaceObject, settings: form_submission_notification_settings });
18471 +
18472 +
18473 + ;// ./node_modules/@wordpress/icons/build-module/library/gallery.js
18474 +
18475 +
18476 + var gallery_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
18477 + external_wp_primitives_namespaceObject.Path,
18478 + {
18479 + d: "M16.375 4.5H4.625a.125.125 0 0 0-.125.125v8.254l2.859-1.54a.75.75 0 0 1 .68-.016l2.384 1.142 2.89-2.074a.75.75 0 0 1 .874 0l2.313 1.66V4.625a.125.125 0 0 0-.125-.125Zm.125 9.398-2.75-1.975-2.813 2.02a.75.75 0 0 1-.76.067l-2.444-1.17L4.5 14.583v1.792c0 .069.056.125.125.125h11.75a.125.125 0 0 0 .125-.125v-2.477ZM4.625 3C3.728 3 3 3.728 3 4.625v11.75C3 17.273 3.728 18 4.625 18h11.75c.898 0 1.625-.727 1.625-1.625V4.625C18 3.728 17.273 3 16.375 3H4.625ZM20 8v11c0 .69-.31 1-.999 1H6v1.5h13.001c1.52 0 2.499-.982 2.499-2.5V8H20Z",
18480 + fillRule: "evenodd",
18481 + clipRule: "evenodd"
18482 + }
18483 + ) });
18484 +
18485 +
18486 + ;// ./node_modules/@wordpress/block-library/build-module/gallery/constants.js
18487 + const LINK_DESTINATION_NONE = "none";
18488 + const LINK_DESTINATION_MEDIA = "media";
18489 + const LINK_DESTINATION_LIGHTBOX = "lightbox";
18490 + const LINK_DESTINATION_ATTACHMENT = "attachment";
18491 + const LINK_DESTINATION_MEDIA_WP_CORE = "file";
18492 + const LINK_DESTINATION_ATTACHMENT_WP_CORE = "post";
18493 + const constants_DEFAULT_MEDIA_SIZE_SLUG = "large";
18494 +
18495 +
18496 + ;// ./node_modules/@wordpress/block-library/build-module/gallery/deprecated.js
18497 +
18498 +
18499 +
18500 +
18501 +
18502 + const DEPRECATED_LINK_DESTINATION_MEDIA = "file";
18503 + const DEPRECATED_LINK_DESTINATION_ATTACHMENT = "post";
18504 + function defaultColumnsNumberV1(attributes) {
18505 + return Math.min(3, attributes?.images?.length);
18506 + }
18507 + function getHrefAndDestination(image, destination) {
18508 + switch (destination) {
18509 + case DEPRECATED_LINK_DESTINATION_MEDIA:
18510 + return {
18511 + href: image?.source_url || image?.url,
18512 + // eslint-disable-line camelcase
18513 + linkDestination: LINK_DESTINATION_MEDIA
18514 + };
18515 + case DEPRECATED_LINK_DESTINATION_ATTACHMENT:
18516 + return {
18517 + href: image?.link,
18518 + linkDestination: LINK_DESTINATION_ATTACHMENT
18519 + };
18520 + case LINK_DESTINATION_MEDIA:
18521 + return {
18522 + href: image?.source_url || image?.url,
18523 + // eslint-disable-line camelcase
18524 + linkDestination: LINK_DESTINATION_MEDIA
18525 + };
18526 + case LINK_DESTINATION_ATTACHMENT:
18527 + return {
18528 + href: image?.link,
18529 + linkDestination: LINK_DESTINATION_ATTACHMENT
18530 + };
18531 + case LINK_DESTINATION_NONE:
18532 + return {
18533 + href: void 0,
18534 + linkDestination: LINK_DESTINATION_NONE
18535 + };
18536 + }
18537 + return {};
18538 + }
18539 + function runV2Migration(attributes) {
18540 + let linkTo = attributes.linkTo ? attributes.linkTo : "none";
18541 + if (linkTo === "post") {
18542 + linkTo = "attachment";
18543 + } else if (linkTo === "file") {
18544 + linkTo = "media";
18545 + }
18546 + const imageBlocks = attributes.images.map((image) => {
18547 + return getImageBlock(image, attributes.sizeSlug, linkTo);
18548 + });
18549 + const { images, ids, ...restAttributes } = attributes;
18550 + return [
18551 + {
18552 + ...restAttributes,
18553 + linkTo,
18554 + allowResize: false
18555 + },
18556 + imageBlocks
18557 + ];
18558 + }
18559 + function getImageBlock(image, sizeSlug, linkTo) {
18560 + return (0,external_wp_blocks_namespaceObject.createBlock)("core/image", {
18561 + ...image.id && { id: parseInt(image.id) },
18562 + url: image.url,
18563 + alt: image.alt,
18564 + caption: image.caption,
18565 + sizeSlug,
18566 + ...getHrefAndDestination(image, linkTo)
18567 + });
18568 + }
18569 + const deprecated_v7 = {
18570 + attributes: {
18571 + images: {
18572 + type: "array",
18573 + default: [],
18574 + source: "query",
18575 + selector: ".blocks-gallery-item",
18576 + query: {
18577 + url: {
18578 + type: "string",
18579 + source: "attribute",
18580 + selector: "img",
18581 + attribute: "src"
18582 + },
18583 + fullUrl: {
18584 + type: "string",
18585 + source: "attribute",
18586 + selector: "img",
18587 + attribute: "data-full-url"
18588 + },
18589 + link: {
18590 + type: "string",
18591 + source: "attribute",
18592 + selector: "img",
18593 + attribute: "data-link"
18594 + },
18595 + alt: {
18596 + type: "string",
18597 + source: "attribute",
18598 + selector: "img",
18599 + attribute: "alt",
18600 + default: ""
18601 + },
18602 + id: {
18603 + type: "string",
18604 + source: "attribute",
18605 + selector: "img",
18606 + attribute: "data-id"
18607 + },
18608 + caption: {
18609 + type: "string",
18610 + source: "html",
18611 + selector: ".blocks-gallery-item__caption"
18612 + }
18613 + }
18614 + },
18615 + ids: {
18616 + type: "array",
18617 + items: {
18618 + type: "number"
18619 + },
18620 + default: []
18621 + },
18622 + shortCodeTransforms: {
18623 + type: "array",
18624 + default: [],
18625 + items: {
18626 + type: "object"
18627 + }
18628 + },
18629 + columns: {
18630 + type: "number",
18631 + minimum: 1,
18632 + maximum: 8
18633 + },
18634 + caption: {
18635 + type: "string",
18636 + source: "html",
18637 + selector: ".blocks-gallery-caption"
18638 + },
18639 + imageCrop: {
18640 + type: "boolean",
18641 + default: true
18642 + },
18643 + fixedHeight: {
18644 + type: "boolean",
18645 + default: true
18646 + },
18647 + linkTarget: {
18648 + type: "string"
18649 + },
18650 + linkTo: {
18651 + type: "string"
18652 + },
18653 + sizeSlug: {
18654 + type: "string",
18655 + default: "large"
18656 + },
18657 + allowResize: {
18658 + type: "boolean",
18659 + default: false
18660 + }
18661 + },
18662 + save({ attributes }) {
18663 + const { caption, columns, imageCrop } = attributes;
18664 + const className = dist_clsx("has-nested-images", {
18665 + [`columns-${columns}`]: columns !== void 0,
18666 + [`columns-default`]: columns === void 0,
18667 + "is-cropped": imageCrop
18668 + });
18669 + const blockProps = external_wp_blockEditor_namespaceObject.useBlockProps.save({ className });
18670 + const innerBlocksProps = external_wp_blockEditor_namespaceObject.useInnerBlocksProps.save(blockProps);
18671 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("figure", { ...innerBlocksProps, children: [
18672 + innerBlocksProps.children,
18673 + !external_wp_blockEditor_namespaceObject.RichText.isEmpty(caption) && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
18674 + external_wp_blockEditor_namespaceObject.RichText.Content,
18675 + {
18676 + tagName: "figcaption",
18677 + className: "blocks-gallery-caption",
18678 + value: caption
18679 + }
18680 + )
18681 + ] });
18682 + }
18683 + };
18684 + const deprecated_v6 = {
18685 + attributes: {
18686 + images: {
18687 + type: "array",
18688 + default: [],
18689 + source: "query",
18690 + selector: ".blocks-gallery-item",
18691 + query: {
18692 + url: {
18693 + type: "string",
18694 + source: "attribute",
18695 + selector: "img",
18696 + attribute: "src"
18697 + },
18698 + fullUrl: {
18699 + type: "string",
18700 + source: "attribute",
18701 + selector: "img",
18702 + attribute: "data-full-url"
18703 + },
18704 + link: {
18705 + type: "string",
18706 + source: "attribute",
18707 + selector: "img",
18708 + attribute: "data-link"
18709 + },
18710 + alt: {
18711 + type: "string",
18712 + source: "attribute",
18713 + selector: "img",
18714 + attribute: "alt",
18715 + default: ""
18716 + },
18717 + id: {
18718 + type: "string",
18719 + source: "attribute",
18720 + selector: "img",
18721 + attribute: "data-id"
18722 + },
18723 + caption: {
18724 + type: "string",
18725 + source: "html",
18726 + selector: ".blocks-gallery-item__caption"
18727 + }
18728 + }
18729 + },
18730 + ids: {
18731 + type: "array",
18732 + items: {
18733 + type: "number"
18734 + },
18735 + default: []
18736 + },
18737 + columns: {
18738 + type: "number",
18739 + minimum: 1,
18740 + maximum: 8
18741 + },
18742 + caption: {
18743 + type: "string",
18744 + source: "html",
18745 + selector: ".blocks-gallery-caption"
18746 + },
18747 + imageCrop: {
18748 + type: "boolean",
18749 + default: true
18750 + },
18751 + fixedHeight: {
18752 + type: "boolean",
18753 + default: true
18754 + },
18755 + linkTo: {
18756 + type: "string"
18757 + },
18758 + sizeSlug: {
18759 + type: "string",
18760 + default: "large"
18761 + }
18762 + },
18763 + supports: {
18764 + anchor: true,
18765 + align: true
18766 + },
18767 + save({ attributes }) {
18768 + const {
18769 + images,
18770 + columns = defaultColumnsNumberV1(attributes),
18771 + imageCrop,
18772 + caption,
18773 + linkTo
18774 + } = attributes;
18775 + const className = `columns-${columns} ${imageCrop ? "is-cropped" : ""}`;
18776 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("figure", { ...external_wp_blockEditor_namespaceObject.useBlockProps.save({ className }), children: [
18777 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("ul", { className: "blocks-gallery-grid", children: images.map((image) => {
18778 + let href;
18779 + switch (linkTo) {
18780 + case DEPRECATED_LINK_DESTINATION_MEDIA:
18781 + href = image.fullUrl || image.url;
18782 + break;
18783 + case DEPRECATED_LINK_DESTINATION_ATTACHMENT:
18784 + href = image.link;
18785 + break;
18786 + }
18787 + const img = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
18788 + "img",
18789 + {
18790 + src: image.url,
18791 + alt: image.alt,
18792 + "data-id": image.id,
18793 + "data-full-url": image.fullUrl,
18794 + "data-link": image.link,
18795 + className: image.id ? `wp-image-${image.id}` : null
18796 + }
18797 + );
18798 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
18799 + "li",
18800 + {
18801 + className: "blocks-gallery-item",
18802 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("figure", { children: [
18803 + href ? /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("a", { href, children: img }) : img,
18804 + !external_wp_blockEditor_namespaceObject.RichText.isEmpty(image.caption) && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
18805 + external_wp_blockEditor_namespaceObject.RichText.Content,
18806 + {
18807 + tagName: "figcaption",
18808 + className: "blocks-gallery-item__caption",
18809 + value: image.caption
18810 + }
18811 + )
18812 + ] })
18813 + },
18814 + image.id || image.url
18815 + );
18816 + }) }),
18817 + !external_wp_blockEditor_namespaceObject.RichText.isEmpty(caption) && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
18818 + external_wp_blockEditor_namespaceObject.RichText.Content,
18819 + {
18820 + tagName: "figcaption",
18821 + className: "blocks-gallery-caption",
18822 + value: caption
18823 + }
18824 + )
18825 + ] });
18826 + },
18827 + migrate(attributes) {
18828 + return runV2Migration(attributes);
18829 + }
18830 + };
18831 + const deprecated_v5 = {
18832 + attributes: {
18833 + images: {
18834 + type: "array",
18835 + default: [],
18836 + source: "query",
18837 + selector: ".blocks-gallery-item",
18838 + query: {
18839 + url: {
18840 + type: "string",
18841 + source: "attribute",
18842 + selector: "img",
18843 + attribute: "src"
18844 + },
18845 + fullUrl: {
18846 + type: "string",
18847 + source: "attribute",
18848 + selector: "img",
18849 + attribute: "data-full-url"
18850 + },
18851 + link: {
18852 + type: "string",
18853 + source: "attribute",
18854 + selector: "img",
18855 + attribute: "data-link"
18856 + },
18857 + alt: {
18858 + type: "string",
18859 + source: "attribute",
18860 + selector: "img",
18861 + attribute: "alt",
18862 + default: ""
18863 + },
18864 + id: {
18865 + type: "string",
18866 + source: "attribute",
18867 + selector: "img",
18868 + attribute: "data-id"
18869 + },
18870 + caption: {
18871 + type: "string",
18872 + source: "html",
18873 + selector: ".blocks-gallery-item__caption"
18874 + }
18875 + }
18876 + },
18877 + ids: {
18878 + type: "array",
18879 + items: {
18880 + type: "number"
18881 + },
18882 + default: []
18883 + },
18884 + columns: {
18885 + type: "number",
18886 + minimum: 1,
18887 + maximum: 8
18888 + },
18889 + caption: {
18890 + type: "string",
18891 + source: "html",
18892 + selector: ".blocks-gallery-caption"
18893 + },
18894 + imageCrop: {
18895 + type: "boolean",
18896 + default: true
18897 + },
18898 + linkTo: {
18899 + type: "string",
18900 + default: "none"
18901 + },
18902 + sizeSlug: {
18903 + type: "string",
18904 + default: "large"
18905 + }
18906 + },
18907 + supports: {
18908 + align: true
18909 + },
18910 + isEligible({ linkTo }) {
18911 + return !linkTo || linkTo === "attachment" || linkTo === "media";
18912 + },
18913 + migrate(attributes) {
18914 + return runV2Migration(attributes);
18915 + },
18916 + save({ attributes }) {
18917 + const {
18918 + images,
18919 + columns = defaultColumnsNumberV1(attributes),
18920 + imageCrop,
18921 + caption,
18922 + linkTo
18923 + } = attributes;
18924 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(
18925 + "figure",
18926 + {
18927 + className: `columns-${columns} ${imageCrop ? "is-cropped" : ""}`,
18928 + children: [
18929 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("ul", { className: "blocks-gallery-grid", children: images.map((image) => {
18930 + let href;
18931 + switch (linkTo) {
18932 + case "media":
18933 + href = image.fullUrl || image.url;
18934 + break;
18935 + case "attachment":
18936 + href = image.link;
18937 + break;
18938 + }
18939 + const img = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
18940 + "img",
18941 + {
18942 + src: image.url,
18943 + alt: image.alt,
18944 + "data-id": image.id,
18945 + "data-full-url": image.fullUrl,
18946 + "data-link": image.link,
18947 + className: image.id ? `wp-image-${image.id}` : null
18948 + }
18949 + );
18950 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
18951 + "li",
18952 + {
18953 + className: "blocks-gallery-item",
18954 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("figure", { children: [
18955 + href ? /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("a", { href, children: img }) : img,
18956 + !external_wp_blockEditor_namespaceObject.RichText.isEmpty(image.caption) && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
18957 + external_wp_blockEditor_namespaceObject.RichText.Content,
18958 + {
18959 + tagName: "figcaption",
18960 + className: "blocks-gallery-item__caption",
18961 + value: image.caption
18962 + }
18963 + )
18964 + ] })
18965 + },
18966 + image.id || image.url
18967 + );
18968 + }) }),
18969 + !external_wp_blockEditor_namespaceObject.RichText.isEmpty(caption) && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
18970 + external_wp_blockEditor_namespaceObject.RichText.Content,
18971 + {
18972 + tagName: "figcaption",
18973 + className: "blocks-gallery-caption",
18974 + value: caption
18975 + }
18976 + )
18977 + ]
18978 + }
18979 + );
18980 + }
18981 + };
18982 + const deprecated_v4 = {
18983 + attributes: {
18984 + images: {
18985 + type: "array",
18986 + default: [],
18987 + source: "query",
18988 + selector: ".blocks-gallery-item",
18989 + query: {
18990 + url: {
18991 + source: "attribute",
18992 + selector: "img",
18993 + attribute: "src"
18994 + },
18995 + fullUrl: {
18996 + source: "attribute",
18997 + selector: "img",
18998 + attribute: "data-full-url"
18999 + },
19000 + link: {
19001 + source: "attribute",
19002 + selector: "img",
19003 + attribute: "data-link"
19004 + },
19005 + alt: {
19006 + source: "attribute",
19007 + selector: "img",
19008 + attribute: "alt",
19009 + default: ""
19010 + },
19011 + id: {
19012 + source: "attribute",
19013 + selector: "img",
19014 + attribute: "data-id"
19015 + },
19016 + caption: {
19017 + type: "string",
19018 + source: "html",
19019 + selector: ".blocks-gallery-item__caption"
19020 + }
19021 + }
19022 + },
19023 + ids: {
19024 + type: "array",
19025 + default: []
19026 + },
19027 + columns: {
19028 + type: "number"
19029 + },
19030 + caption: {
19031 + type: "string",
19032 + source: "html",
19033 + selector: ".blocks-gallery-caption"
19034 + },
19035 + imageCrop: {
19036 + type: "boolean",
19037 + default: true
19038 + },
19039 + linkTo: {
19040 + type: "string",
19041 + default: "none"
19042 + }
19043 + },
19044 + supports: {
19045 + align: true
19046 + },
19047 + isEligible({ ids }) {
19048 + return ids && ids.some((id) => typeof id === "string");
19049 + },
19050 + migrate(attributes) {
19051 + return runV2Migration(attributes);
19052 + },
19053 + save({ attributes }) {
19054 + const {
19055 + images,
19056 + columns = defaultColumnsNumberV1(attributes),
19057 + imageCrop,
19058 + caption,
19059 + linkTo
19060 + } = attributes;
19061 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(
19062 + "figure",
19063 + {
19064 + className: `columns-${columns} ${imageCrop ? "is-cropped" : ""}`,
19065 + children: [
19066 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("ul", { className: "blocks-gallery-grid", children: images.map((image) => {
19067 + let href;
19068 + switch (linkTo) {
19069 + case "media":
19070 + href = image.fullUrl || image.url;
19071 + break;
19072 + case "attachment":
19073 + href = image.link;
19074 + break;
19075 + }
19076 + const img = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
19077 + "img",
19078 + {
19079 + src: image.url,
19080 + alt: image.alt,
19081 + "data-id": image.id,
19082 + "data-full-url": image.fullUrl,
19083 + "data-link": image.link,
19084 + className: image.id ? `wp-image-${image.id}` : null
19085 + }
19086 + );
19087 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
19088 + "li",
19089 + {
19090 + className: "blocks-gallery-item",
19091 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("figure", { children: [
19092 + href ? /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("a", { href, children: img }) : img,
19093 + !external_wp_blockEditor_namespaceObject.RichText.isEmpty(image.caption) && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
19094 + external_wp_blockEditor_namespaceObject.RichText.Content,
19095 + {
19096 + tagName: "figcaption",
19097 + className: "blocks-gallery-item__caption",
19098 + value: image.caption
19099 + }
19100 + )
19101 + ] })
19102 + },
19103 + image.id || image.url
19104 + );
19105 + }) }),
19106 + !external_wp_blockEditor_namespaceObject.RichText.isEmpty(caption) && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
19107 + external_wp_blockEditor_namespaceObject.RichText.Content,
19108 + {
19109 + tagName: "figcaption",
19110 + className: "blocks-gallery-caption",
19111 + value: caption
19112 + }
19113 + )
19114 + ]
19115 + }
19116 + );
19117 + }
19118 + };
19119 + const gallery_deprecated_v3 = {
19120 + attributes: {
19121 + images: {
19122 + type: "array",
19123 + default: [],
19124 + source: "query",
19125 + selector: "ul.wp-block-gallery .blocks-gallery-item",
19126 + query: {
19127 + url: {
19128 + source: "attribute",
19129 + selector: "img",
19130 + attribute: "src"
19131 + },
19132 + fullUrl: {
19133 + source: "attribute",
19134 + selector: "img",
19135 + attribute: "data-full-url"
19136 + },
19137 + alt: {
19138 + source: "attribute",
19139 + selector: "img",
19140 + attribute: "alt",
19141 + default: ""
19142 + },
19143 + id: {
19144 + source: "attribute",
19145 + selector: "img",
19146 + attribute: "data-id"
19147 + },
19148 + link: {
19149 + source: "attribute",
19150 + selector: "img",
19151 + attribute: "data-link"
19152 + },
19153 + caption: {
19154 + type: "string",
19155 + source: "html",
19156 + selector: "figcaption"
19157 + }
19158 + }
19159 + },
19160 + ids: {
19161 + type: "array",
19162 + default: []
19163 + },
19164 + columns: {
19165 + type: "number"
19166 + },
19167 + imageCrop: {
19168 + type: "boolean",
19169 + default: true
19170 + },
19171 + linkTo: {
19172 + type: "string",
19173 + default: "none"
19174 + }
19175 + },
19176 + supports: {
19177 + align: true
19178 + },
19179 + save({ attributes }) {
19180 + const {
19181 + images,
19182 + columns = defaultColumnsNumberV1(attributes),
19183 + imageCrop,
19184 + linkTo
19185 + } = attributes;
19186 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
19187 + "ul",
19188 + {
19189 + className: `columns-${columns} ${imageCrop ? "is-cropped" : ""}`,
19190 + children: images.map((image) => {
19191 + let href;
19192 + switch (linkTo) {
19193 + case "media":
19194 + href = image.fullUrl || image.url;
19195 + break;
19196 + case "attachment":
19197 + href = image.link;
19198 + break;
19199 + }
19200 + const img = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
19201 + "img",
19202 + {
19203 + src: image.url,
19204 + alt: image.alt,
19205 + "data-id": image.id,
19206 + "data-full-url": image.fullUrl,
19207 + "data-link": image.link,
19208 + className: image.id ? `wp-image-${image.id}` : null
19209 + }
19210 + );
19211 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
19212 + "li",
19213 + {
19214 + className: "blocks-gallery-item",
19215 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("figure", { children: [
19216 + href ? /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("a", { href, children: img }) : img,
19217 + image.caption && image.caption.length > 0 && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
19218 + external_wp_blockEditor_namespaceObject.RichText.Content,
19219 + {
19220 + tagName: "figcaption",
19221 + value: image.caption
19222 + }
19223 + )
19224 + ] })
19225 + },
19226 + image.id || image.url
19227 + );
19228 + })
19229 + }
19230 + );
19231 + },
19232 + migrate(attributes) {
19233 + return runV2Migration(attributes);
19234 + }
19235 + };
19236 + const gallery_deprecated_v2 = {
19237 + attributes: {
19238 + images: {
19239 + type: "array",
19240 + default: [],
19241 + source: "query",
19242 + selector: "ul.wp-block-gallery .blocks-gallery-item",
19243 + query: {
19244 + url: {
19245 + source: "attribute",
19246 + selector: "img",
19247 + attribute: "src"
19248 + },
19249 + alt: {
19250 + source: "attribute",
19251 + selector: "img",
19252 + attribute: "alt",
19253 + default: ""
19254 + },
19255 + id: {
19256 + source: "attribute",
19257 + selector: "img",
19258 + attribute: "data-id"
19259 + },
19260 + link: {
19261 + source: "attribute",
19262 + selector: "img",
19263 + attribute: "data-link"
19264 + },
19265 + caption: {
19266 + type: "string",
19267 + source: "html",
19268 + selector: "figcaption"
19269 + }
19270 + }
19271 + },
19272 + columns: {
19273 + type: "number"
19274 + },
19275 + imageCrop: {
19276 + type: "boolean",
19277 + default: true
19278 + },
19279 + linkTo: {
19280 + type: "string",
19281 + default: "none"
19282 + }
19283 + },
19284 + isEligible({ images, ids }) {
19285 + return images && images.length > 0 && (!ids && images || ids && images && ids.length !== images.length || images.some((id, index) => {
19286 + if (!id && ids[index] !== null) {
19287 + return true;
19288 + }
19289 + return parseInt(id, 10) !== ids[index];
19290 + }));
19291 + },
19292 + migrate(attributes) {
19293 + return runV2Migration(attributes);
19294 + },
19295 + supports: {
19296 + align: true
19297 + },
19298 + save({ attributes }) {
19299 + const {
19300 + images,
19301 + columns = defaultColumnsNumberV1(attributes),
19302 + imageCrop,
19303 + linkTo
19304 + } = attributes;
19305 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
19306 + "ul",
19307 + {
19308 + className: `columns-${columns} ${imageCrop ? "is-cropped" : ""}`,
19309 + children: images.map((image) => {
19310 + let href;
19311 + switch (linkTo) {
19312 + case "media":
19313 + href = image.url;
19314 + break;
19315 + case "attachment":
19316 + href = image.link;
19317 + break;
19318 + }
19319 + const img = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
19320 + "img",
19321 + {
19322 + src: image.url,
19323 + alt: image.alt,
19324 + "data-id": image.id,
19325 + "data-link": image.link,
19326 + className: image.id ? `wp-image-${image.id}` : null
19327 + }
19328 + );
19329 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
19330 + "li",
19331 + {
19332 + className: "blocks-gallery-item",
19333 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("figure", { children: [
19334 + href ? /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("a", { href, children: img }) : img,
19335 + image.caption && image.caption.length > 0 && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
19336 + external_wp_blockEditor_namespaceObject.RichText.Content,
19337 + {
19338 + tagName: "figcaption",
19339 + value: image.caption
19340 + }
19341 + )
19342 + ] })
19343 + },
19344 + image.id || image.url
19345 + );
19346 + })
19347 + }
19348 + );
19349 + }
19350 + };
19351 + const gallery_deprecated_v1 = {
19352 + attributes: {
19353 + images: {
19354 + type: "array",
19355 + default: [],
19356 + source: "query",
19357 + selector: "div.wp-block-gallery figure.blocks-gallery-image img",
19358 + query: {
19359 + url: {
19360 + source: "attribute",
19361 + attribute: "src"
19362 + },
19363 + alt: {
19364 + source: "attribute",
19365 + attribute: "alt",
19366 + default: ""
19367 + },
19368 + id: {
19369 + source: "attribute",
19370 + attribute: "data-id"
19371 + }
19372 + }
19373 + },
19374 + columns: {
19375 + type: "number"
19376 + },
19377 + imageCrop: {
19378 + type: "boolean",
19379 + default: true
19380 + },
19381 + linkTo: {
19382 + type: "string",
19383 + default: "none"
19384 + },
19385 + align: {
19386 + type: "string",
19387 + default: "none"
19388 + }
19389 + },
19390 + supports: {
19391 + align: true
19392 + },
19393 + save({ attributes }) {
19394 + const {
19395 + images,
19396 + columns = defaultColumnsNumberV1(attributes),
19397 + align,
19398 + imageCrop,
19399 + linkTo
19400 + } = attributes;
19401 + const className = dist_clsx(`columns-${columns}`, {
19402 + alignnone: align === "none",
19403 + "is-cropped": imageCrop
19404 + });
19405 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { className, children: images.map((image) => {
19406 + let href;
19407 + switch (linkTo) {
19408 + case "media":
19409 + href = image.url;
19410 + break;
19411 + case "attachment":
19412 + href = image.link;
19413 + break;
19414 + }
19415 + const img = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
19416 + "img",
19417 + {
19418 + src: image.url,
19419 + alt: image.alt,
19420 + "data-id": image.id
19421 + }
19422 + );
19423 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
19424 + "figure",
19425 + {
19426 + className: "blocks-gallery-image",
19427 + children: href ? /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("a", { href, children: img }) : img
19428 + },
19429 + image.id || image.url
19430 + );
19431 + }) });
19432 + },
19433 + migrate(attributes) {
19434 + return runV2Migration(attributes);
19435 + }
19436 + };
19437 + var gallery_deprecated_deprecated_default = [deprecated_v7, deprecated_v6, deprecated_v5, deprecated_v4, gallery_deprecated_v3, gallery_deprecated_v2, gallery_deprecated_v1];
19438 +
19439 +
19440 + ;// ./node_modules/@wordpress/icons/build-module/library/custom-link.js
19441 +
19442 +
19443 + var custom_link_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M12.5 14.5h-1V16h1c2.2 0 4-1.8 4-4s-1.8-4-4-4h-1v1.5h1c1.4 0 2.5 1.1 2.5 2.5s-1.1 2.5-2.5 2.5zm-4 1.5v-1.5h-1C6.1 14.5 5 13.4 5 12s1.1-2.5 2.5-2.5h1V8h-1c-2.2 0-4 1.8-4 4s1.8 4 4 4h1zm-1-3.2h5v-1.5h-5v1.5zM18 4H9c-1.1 0-2 .9-2 2v.5h1.5V6c0-.3.2-.5.5-.5h9c.3 0 .5.2.5.5v12c0 .3-.2.5-.5.5H9c-.3 0-.5-.2-.5-.5v-.5H7v.5c0 1.1.9 2 2 2h9c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2z" }) });
19444 +
19445 +
19446 + ;// ./node_modules/@wordpress/icons/build-module/library/image.js
19447 +
19448 +
19449 + var image_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zM5 4.5h14c.3 0 .5.2.5.5v8.4l-3-2.9c-.3-.3-.8-.3-1 0L11.9 14 9 12c-.3-.2-.6-.2-.8 0l-3.6 2.6V5c-.1-.3.1-.5.4-.5zm14 15H5c-.3 0-.5-.2-.5-.5v-2.4l4.1-3 3 1.9c.3.2.7.2.9-.1L16 12l3.5 3.4V19c0 .3-.2.5-.5.5z" }) });
19450 +
19451 +
19452 + ;// ./node_modules/@wordpress/block-library/build-module/gallery/shared-icon.js
19453 +
19454 +
19455 +
19456 + const sharedIcon = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockIcon, { icon: gallery_default });
19457 +
19458 +
19459 + ;// ./node_modules/@wordpress/block-library/build-module/gallery/shared.js
19460 + function defaultColumnsNumber(imageCount) {
19461 + return imageCount ? Math.min(3, imageCount) : 3;
19462 + }
19463 + const pickRelevantMediaFiles = (image, sizeSlug = "large") => {
19464 + const imageProps = Object.fromEntries(
19465 + Object.entries(image ?? {}).filter(
19466 + ([key]) => ["alt", "id", "link"].includes(key)
19467 + )
19468 + );
19469 + imageProps.url = image?.sizes?.[sizeSlug]?.url || image?.media_details?.sizes?.[sizeSlug]?.source_url || image?.url || image?.source_url;
19470 + const fullUrl = image?.sizes?.full?.url || image?.media_details?.sizes?.full?.source_url;
19471 + if (fullUrl) {
19472 + imageProps.fullUrl = fullUrl;
19473 + }
19474 + return imageProps;
19475 + };
19476 +
19477 +
19478 + ;// ./node_modules/@wordpress/block-library/build-module/image/constants.js
19479 + const constants_MIN_SIZE = 20;
19480 + const constants_LINK_DESTINATION_NONE = "none";
19481 + const constants_LINK_DESTINATION_MEDIA = "media";
19482 + const constants_LINK_DESTINATION_ATTACHMENT = "attachment";
19483 + const LINK_DESTINATION_CUSTOM = "custom";
19484 + const constants_NEW_TAB_REL = ["noreferrer", "noopener"];
19485 + const constants_ALLOWED_MEDIA_TYPES = ["image"];
19486 + const MEDIA_ID_NO_FEATURED_IMAGE_SET = 0;
19487 + const SIZED_LAYOUTS = ["flex", "grid"];
19488 + const image_constants_DEFAULT_MEDIA_SIZE_SLUG = "full";
19489 +
19490 +
19491 + ;// ./node_modules/@wordpress/block-library/build-module/gallery/utils.js
19492 +
19493 +
19494 + function utils_getHrefAndDestination(image, galleryDestination, imageDestination, attributes, lightboxSetting) {
19495 + switch (imageDestination ? imageDestination : galleryDestination) {
19496 + case LINK_DESTINATION_MEDIA_WP_CORE:
19497 + case LINK_DESTINATION_MEDIA:
19498 + return {
19499 + href: image?.source_url || image?.url,
19500 + // eslint-disable-line camelcase
19501 + linkDestination: constants_LINK_DESTINATION_MEDIA,
19502 + lightbox: lightboxSetting?.enabled ? { ...attributes?.lightbox, enabled: false } : void 0
19503 + };
19504 + case LINK_DESTINATION_ATTACHMENT_WP_CORE:
19505 + case LINK_DESTINATION_ATTACHMENT:
19506 + return {
19507 + href: image?.link,
19508 + linkDestination: constants_LINK_DESTINATION_ATTACHMENT,
19509 + lightbox: lightboxSetting?.enabled ? { ...attributes?.lightbox, enabled: false } : void 0
19510 + };
19511 + case LINK_DESTINATION_LIGHTBOX:
19512 + return {
19513 + href: void 0,
19514 + lightbox: !lightboxSetting?.enabled ? { ...attributes?.lightbox, enabled: true } : void 0,
19515 + linkDestination: constants_LINK_DESTINATION_NONE
19516 + };
19517 + case LINK_DESTINATION_NONE:
19518 + return {
19519 + href: void 0,
19520 + linkDestination: constants_LINK_DESTINATION_NONE,
19521 + lightbox: void 0
19522 + };
19523 + }
19524 + return {};
19525 + }
19526 +
19527 +
19528 + ;// ./node_modules/@wordpress/block-library/build-module/image/utils.js
19529 +
19530 + function evalAspectRatio(value) {
19531 + const [width, height = 1] = value.split("/").map(Number);
19532 + const aspectRatio = width / height;
19533 + return aspectRatio === Infinity || aspectRatio === 0 ? NaN : aspectRatio;
19534 + }
19535 + function removeNewTabRel(currentRel) {
19536 + let newRel = currentRel;
19537 + if (currentRel !== void 0 && newRel) {
19538 + constants_NEW_TAB_REL.forEach((relVal) => {
19539 + const regExp = new RegExp("\\b" + relVal + "\\b", "gi");
19540 + newRel = newRel.replace(regExp, "");
19541 + });
19542 + if (newRel !== currentRel) {
19543 + newRel = newRel.trim();
19544 + }
19545 + if (!newRel) {
19546 + newRel = void 0;
19547 + }
19548 + }
19549 + return newRel;
19550 + }
19551 + function getUpdatedLinkTargetSettings(value, { rel }) {
19552 + const linkTarget = value ? "_blank" : void 0;
19553 + let updatedRel;
19554 + if (!linkTarget && !rel) {
19555 + updatedRel = void 0;
19556 + } else {
19557 + updatedRel = removeNewTabRel(rel);
19558 + }
19559 + return {
19560 + linkTarget,
19561 + rel: updatedRel
19562 + };
19563 + }
19564 + function getImageSizeAttributes(image, size) {
19565 + const url = image?.media_details?.sizes?.[size]?.source_url;
19566 + if (url) {
19567 + return { url, width: void 0, height: void 0, sizeSlug: size };
19568 + }
19569 + return {};
19570 + }
19571 + function isValidFileType(file) {
19572 + return constants_ALLOWED_MEDIA_TYPES.some(
19573 + (mediaType) => file.type.indexOf(mediaType) === 0
19574 + );
19575 + }
19576 +
19577 +
19578 + ;// ./node_modules/@wordpress/block-library/build-module/gallery/gallery.js
19579 +
19580 +
19581 +
19582 +
19583 +
19584 + function Gallery(props) {
19585 + const {
19586 + attributes,
19587 + isSelected,
19588 + setAttributes,
19589 + mediaPlaceholder,
19590 + insertBlocksAfter,
19591 + blockProps,
19592 + __unstableLayoutClassNames: layoutClassNames,
19593 + isContentLocked,
19594 + multiGallerySelection
19595 + } = props;
19596 + const { align, columns, imageCrop } = attributes;
19597 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(
19598 + "figure",
19599 + {
19600 + ...blockProps,
19601 + className: dist_clsx(
19602 + blockProps.className,
19603 + layoutClassNames,
19604 + "blocks-gallery-grid",
19605 + {
19606 + [`align${align}`]: align,
19607 + [`columns-${columns}`]: columns !== void 0,
19608 + [`columns-default`]: columns === void 0,
19609 + "is-cropped": imageCrop
19610 + }
19611 + ),
19612 + children: [
19613 + blockProps.children,
19614 + isSelected && !blockProps.children && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.View, { className: "blocks-gallery-media-placeholder-wrapper", children: mediaPlaceholder }),
19615 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
19616 + Caption,
19617 + {
19618 + attributes,
19619 + setAttributes,
19620 + isSelected,
19621 + insertBlocksAfter,
19622 + showToolbarButton: !multiGallerySelection && !isContentLocked,
19623 + className: "blocks-gallery-caption",
19624 + label: (0,external_wp_i18n_namespaceObject.__)("Gallery caption text"),
19625 + placeholder: (0,external_wp_i18n_namespaceObject.__)("Add gallery caption")
19626 + }
19627 + )
19628 + ]
19629 + }
19630 + );
19631 + }
19632 +
19633 +
19634 + ;// ./node_modules/@wordpress/block-library/build-module/gallery/use-image-sizes.js
19635 +
19636 + function useImageSizes(images, isSelected, getSettings) {
19637 + return (0,external_wp_element_namespaceObject.useMemo)(() => getImageSizing(), [images, isSelected]);
19638 + function getImageSizing() {
19639 + if (!images || images.length === 0) {
19640 + return;
19641 + }
19642 + const { imageSizes } = getSettings();
19643 + let resizedImages = {};
19644 + if (isSelected) {
19645 + resizedImages = images.reduce((currentResizedImages, img) => {
19646 + if (!img.id) {
19647 + return currentResizedImages;
19648 + }
19649 + const sizes = imageSizes.reduce((currentSizes, size) => {
19650 + const defaultUrl = img.sizes?.[size.slug]?.url;
19651 + const mediaDetailsUrl = img.media_details?.sizes?.[size.slug]?.source_url;
19652 + return {
19653 + ...currentSizes,
19654 + [size.slug]: defaultUrl || mediaDetailsUrl
19655 + };
19656 + }, {});
19657 + return {
19658 + ...currentResizedImages,
19659 + [parseInt(img.id, 10)]: sizes
19660 + };
19661 + }, {});
19662 + }
19663 + const resizedImageSizes = Object.values(resizedImages);
19664 + return imageSizes.filter(
19665 + ({ slug }) => resizedImageSizes.some((sizes) => sizes[slug])
19666 + ).map(({ name, slug }) => ({ value: slug, label: name }));
19667 + }
19668 + }
19669 +
19670 +
19671 + ;// ./node_modules/@wordpress/block-library/build-module/gallery/use-get-new-images.js
19672 +
19673 + function useGetNewImages(images, imageData) {
19674 + const [currentImages, setCurrentImages] = (0,external_wp_element_namespaceObject.useState)([]);
19675 + return (0,external_wp_element_namespaceObject.useMemo)(() => getNewImages(), [images, imageData]);
19676 + function getNewImages() {
19677 + let imagesUpdated = false;
19678 + const newCurrentImages = currentImages.filter(
19679 + (currentImg) => images.find((img) => {
19680 + return currentImg.clientId === img.clientId;
19681 + })
19682 + );
19683 + if (newCurrentImages.length < currentImages.length) {
19684 + imagesUpdated = true;
19685 + }
19686 + images.forEach((image) => {
19687 + if (image.fromSavedContent && !newCurrentImages.find(
19688 + (currentImage) => currentImage.id === image.id
19689 + )) {
19690 + imagesUpdated = true;
19691 + newCurrentImages.push(image);
19692 + }
19693 + });
19694 + const newImages = images.filter(
19695 + (image) => !newCurrentImages.find(
19696 + (currentImage) => image.clientId && currentImage.clientId === image.clientId
19697 + ) && imageData?.find((img) => img.id === image.id) && !image.fromSavedContent
19698 + );
19699 + if (imagesUpdated || newImages?.length > 0) {
19700 + setCurrentImages([...newCurrentImages, ...newImages]);
19701 + }
19702 + return newImages.length > 0 ? newImages : null;
19703 + }
19704 + }
19705 +
19706 +
19707 + ;// ./node_modules/@wordpress/block-library/build-module/gallery/use-get-media.js
19708 +
19709 +
19710 + const EMPTY_IMAGE_MEDIA = [];
19711 + function useGetMedia(innerBlockImages) {
19712 + return (0,external_wp_data_namespaceObject.useSelect)(
19713 + (select) => {
19714 + const imageIds = innerBlockImages.map((imageBlock) => imageBlock.attributes.id).filter((id) => id !== void 0);
19715 + if (imageIds.length === 0) {
19716 + return EMPTY_IMAGE_MEDIA;
19717 + }
19718 + return select(external_wp_coreData_namespaceObject.store).getEntityRecords(
19719 + "postType",
19720 + "attachment",
19721 + {
19722 + include: imageIds.join(","),
19723 + per_page: -1,
19724 + orderby: "include"
19725 + }
19726 + ) ?? EMPTY_IMAGE_MEDIA;
19727 + },
19728 + [innerBlockImages]
19729 + );
19730 + }
19731 +
19732 +
19733 + ;// ./node_modules/@wordpress/block-library/build-module/gallery/gap-styles.js
19734 +
19735 + function GapStyles({ blockGap, clientId }) {
19736 + const fallbackValue = `var( --wp--style--gallery-gap-default, var( --gallery-block--gutter-size, var( --wp--style--block-gap, 0.5em ) ) )`;
19737 + let gapValue = fallbackValue;
19738 + let column = fallbackValue;
19739 + let row;
19740 + if (!!blockGap) {
19741 + row = typeof blockGap === "string" ? (0,external_wp_blockEditor_namespaceObject.__experimentalGetGapCSSValue)(blockGap) : (0,external_wp_blockEditor_namespaceObject.__experimentalGetGapCSSValue)(blockGap?.top) || fallbackValue;
19742 + column = typeof blockGap === "string" ? (0,external_wp_blockEditor_namespaceObject.__experimentalGetGapCSSValue)(blockGap) : (0,external_wp_blockEditor_namespaceObject.__experimentalGetGapCSSValue)(blockGap?.left) || fallbackValue;
19743 + gapValue = row === column ? row : `${row} ${column}`;
19744 + }
19745 + const gap = `#block-${clientId} {
19746 + --wp--style--unstable-gallery-gap: ${column === "0" ? "0px" : column};
19747 + gap: ${gapValue}
19748 + }`;
19749 + (0,external_wp_blockEditor_namespaceObject.useStyleOverride)({ css: gap });
19750 + return null;
19751 + }
19752 +
19753 +
19754 + ;// ./node_modules/@wordpress/block-library/build-module/gallery/edit.js
19755 +
19756 +
19757 +
19758 +
19759 +
19760 +
19761 +
19762 +
19763 +
19764 +
19765 +
19766 +
19767 +
19768 +
19769 +
19770 +
19771 +
19772 +
19773 +
19774 +
19775 +
19776 +
19777 +
19778 + const MAX_COLUMNS = 8;
19779 + const LINK_OPTIONS = [
19780 + {
19781 + icon: custom_link_default,
19782 + label: (0,external_wp_i18n_namespaceObject.__)("Link images to attachment pages"),
19783 + value: LINK_DESTINATION_ATTACHMENT,
19784 + noticeText: (0,external_wp_i18n_namespaceObject.__)("Attachment Pages")
19785 + },
19786 + {
19787 + icon: image_default,
19788 + label: (0,external_wp_i18n_namespaceObject.__)("Link images to media files"),
19789 + value: LINK_DESTINATION_MEDIA,
19790 + noticeText: (0,external_wp_i18n_namespaceObject.__)("Media Files")
19791 + },
19792 + {
19793 + icon: fullscreen_default,
19794 + label: (0,external_wp_i18n_namespaceObject.__)("Enlarge on click"),
19795 + value: LINK_DESTINATION_LIGHTBOX,
19796 + noticeText: (0,external_wp_i18n_namespaceObject.__)("Lightbox effect"),
19797 + infoText: (0,external_wp_i18n_namespaceObject.__)("Scale images with a lightbox effect")
19798 + },
19799 + {
19800 + icon: link_off_default,
19801 + label: (0,external_wp_i18n_namespaceObject._x)("None", "Media item link option"),
19802 + value: LINK_DESTINATION_NONE,
19803 + noticeText: (0,external_wp_i18n_namespaceObject.__)("None")
19804 + }
19805 + ];
19806 + const edit_ALLOWED_MEDIA_TYPES = ["image"];
19807 + const PLACEHOLDER_TEXT = external_wp_element_namespaceObject.Platform.isNative ? (0,external_wp_i18n_namespaceObject.__)("Add media") : (0,external_wp_i18n_namespaceObject.__)("Drag and drop images, upload, or choose from your library.");
19808 + const MOBILE_CONTROL_PROPS_RANGE_CONTROL = external_wp_element_namespaceObject.Platform.isNative ? { type: "stepper" } : {};
19809 + const gallery_edit_DEFAULT_BLOCK = { name: "core/image" };
19810 + const EMPTY_ARRAY = [];
19811 + function GalleryEdit(props) {
19812 + const {
19813 + setAttributes,
19814 + attributes,
19815 + className,
19816 + clientId,
19817 + isSelected,
19818 + insertBlocksAfter,
19819 + isContentLocked,
19820 + onFocus
19821 + } = props;
19822 + const [lightboxSetting, defaultRatios, themeRatios, showDefaultRatios] = (0,external_wp_blockEditor_namespaceObject.useSettings)(
19823 + "blocks.core/image.lightbox",
19824 + "dimensions.aspectRatios.default",
19825 + "dimensions.aspectRatios.theme",
19826 + "dimensions.defaultAspectRatios"
19827 + );
19828 + const linkOptions = !lightboxSetting?.allowEditing ? LINK_OPTIONS.filter(
19829 + (option) => option.value !== LINK_DESTINATION_LIGHTBOX
19830 + ) : LINK_OPTIONS;
19831 + const {
19832 + columns,
19833 + imageCrop,
19834 + randomOrder,
19835 + linkTarget,
19836 + linkTo,
19837 + sizeSlug,
19838 + aspectRatio
19839 + } = attributes;
19840 + const {
19841 + __unstableMarkNextChangeAsNotPersistent,
19842 + replaceInnerBlocks,
19843 + updateBlockAttributes,
19844 + selectBlock
19845 + } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_blockEditor_namespaceObject.store);
19846 + const { createSuccessNotice, createErrorNotice } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_notices_namespaceObject.store);
19847 + const {
19848 + getBlock,
19849 + getSettings,
19850 + innerBlockImages,
19851 + blockWasJustInserted,
19852 + multiGallerySelection
19853 + } = (0,external_wp_data_namespaceObject.useSelect)(
19854 + (select) => {
19855 + const {
19856 + getBlockName,
19857 + getMultiSelectedBlockClientIds,
19858 + getSettings: _getSettings,
19859 + getBlock: _getBlock,
19860 + wasBlockJustInserted
19861 + } = select(external_wp_blockEditor_namespaceObject.store);
19862 + const multiSelectedClientIds = getMultiSelectedBlockClientIds();
19863 + return {
19864 + getBlock: _getBlock,
19865 + getSettings: _getSettings,
19866 + innerBlockImages: _getBlock(clientId)?.innerBlocks ?? EMPTY_ARRAY,
19867 + blockWasJustInserted: wasBlockJustInserted(
19868 + clientId,
19869 + "inserter_menu"
19870 + ),
19871 + multiGallerySelection: multiSelectedClientIds.length && multiSelectedClientIds.every(
19872 + (_clientId) => getBlockName(_clientId) === "core/gallery"
19873 + )
19874 + };
19875 + },
19876 + [clientId]
19877 + );
19878 + const images = (0,external_wp_element_namespaceObject.useMemo)(
19879 + () => innerBlockImages?.map((block) => ({
19880 + clientId: block.clientId,
19881 + id: block.attributes.id,
19882 + url: block.attributes.url,
19883 + attributes: block.attributes,
19884 + fromSavedContent: Boolean(block.originalContent)
19885 + })),
19886 + [innerBlockImages]
19887 + );
19888 + const imageData = useGetMedia(innerBlockImages);
19889 + const newImages = useGetNewImages(images, imageData);
19890 + const themeOptions = themeRatios?.map(({ name, ratio }) => ({
19891 + label: name,
19892 + value: ratio
19893 + }));
19894 + const defaultOptions = defaultRatios?.map(({ name, ratio }) => ({
19895 + label: name,
19896 + value: ratio
19897 + }));
19898 + const aspectRatioOptions = [
19899 + {
19900 + label: (0,external_wp_i18n_namespaceObject._x)(
19901 + "Original",
19902 + "Aspect ratio option for dimensions control"
19903 + ),
19904 + value: "auto"
19905 + },
19906 + ...showDefaultRatios ? defaultOptions || [] : [],
19907 + ...themeOptions || []
19908 + ];
19909 + (0,external_wp_element_namespaceObject.useEffect)(() => {
19910 + newImages?.forEach((newImage) => {
19911 + __unstableMarkNextChangeAsNotPersistent();
19912 + updateBlockAttributes(newImage.clientId, {
19913 + ...buildImageAttributes(newImage.attributes),
19914 + id: newImage.id,
19915 + align: void 0
19916 + });
19917 + });
19918 + }, [newImages]);
19919 + const imageSizeOptions = useImageSizes(
19920 + imageData,
19921 + isSelected,
19922 + getSettings
19923 + );
19924 + function buildImageAttributes(imageAttributes) {
19925 + const image = imageAttributes.id ? imageData.find(({ id }) => id === imageAttributes.id) : null;
19926 + let newClassName;
19927 + if (imageAttributes.className && imageAttributes.className !== "") {
19928 + newClassName = imageAttributes.className;
19929 + }
19930 + let newLinkTarget;
19931 + if (imageAttributes.linkTarget || imageAttributes.rel) {
19932 + newLinkTarget = {
19933 + linkTarget: imageAttributes.linkTarget,
19934 + rel: imageAttributes.rel
19935 + };
19936 + } else {
19937 + newLinkTarget = getUpdatedLinkTargetSettings(
19938 + linkTarget,
19939 + attributes
19940 + );
19941 + }
19942 + return {
19943 + ...pickRelevantMediaFiles(image, sizeSlug),
19944 + ...utils_getHrefAndDestination(
19945 + image,
19946 + linkTo,
19947 + imageAttributes?.linkDestination
19948 + ),
19949 + ...newLinkTarget,
19950 + className: newClassName,
19951 + sizeSlug,
19952 + caption: imageAttributes.caption || image.caption?.raw,
19953 + alt: imageAttributes.alt || image.alt_text,
19954 + aspectRatio: aspectRatio === "auto" ? void 0 : aspectRatio
19955 + };
19956 + }
19957 + function isValidFileType(file) {
19958 + const nativeFileData = external_wp_element_namespaceObject.Platform.isNative && file.id ? imageData.find(({ id }) => id === file.id) : null;
19959 + const mediaTypeSelector = nativeFileData ? nativeFileData?.media_type : file.type;
19960 + return edit_ALLOWED_MEDIA_TYPES.some(
19961 + (mediaType) => mediaTypeSelector?.indexOf(mediaType) === 0
19962 + ) || file.blob;
19963 + }
19964 + function updateImages(selectedImages) {
19965 + const newFileUploads = Object.prototype.toString.call(selectedImages) === "[object FileList]";
19966 + const imageArray = newFileUploads ? Array.from(selectedImages).map((file) => {
19967 + if (!file.url) {
19968 + return {
19969 + blob: (0,external_wp_blob_namespaceObject.createBlobURL)(file)
19970 + };
19971 + }
19972 + return file;
19973 + }) : selectedImages;
19974 + if (!imageArray.every(isValidFileType)) {
19975 + createErrorNotice(
19976 + (0,external_wp_i18n_namespaceObject.__)(
19977 + "If uploading to a gallery all files need to be image formats"
19978 + ),
19979 + { id: "gallery-upload-invalid-file", type: "snackbar" }
19980 + );
19981 + }
19982 + const processedImages = imageArray.filter((file) => file.url || isValidFileType(file)).map((file) => {
19983 + if (!file.url) {
19984 + return {
19985 + blob: file.blob || (0,external_wp_blob_namespaceObject.createBlobURL)(file)
19986 + };
19987 + }
19988 + return file;
19989 + });
19990 + const newOrderMap = processedImages.reduce(
19991 + (result, image, index) => (result[image.id] = index, result),
19992 + {}
19993 + );
19994 + const existingImageBlocks = !newFileUploads ? innerBlockImages.filter(
19995 + (block) => processedImages.find(
19996 + (img) => img.id === block.attributes.id
19997 + )
19998 + ) : innerBlockImages;
19999 + const newImageList = processedImages.filter(
20000 + (img) => !existingImageBlocks.find(
20001 + (existingImg) => img.id === existingImg.attributes.id
20002 + )
20003 + );
20004 + const newBlocks = newImageList.map((image) => {
20005 + return (0,external_wp_blocks_namespaceObject.createBlock)("core/image", {
20006 + id: image.id,
20007 + blob: image.blob,
20008 + url: image.url,
20009 + caption: image.caption,
20010 + alt: image.alt
20011 + });
20012 + });
20013 + replaceInnerBlocks(
20014 + clientId,
20015 + existingImageBlocks.concat(newBlocks).sort(
20016 + (a, b) => newOrderMap[a.attributes.id] - newOrderMap[b.attributes.id]
20017 + )
20018 + );
20019 + if (newBlocks?.length > 0) {
20020 + selectBlock(newBlocks[0].clientId);
20021 + }
20022 + }
20023 + function onUploadError(message) {
20024 + createErrorNotice(message, { type: "snackbar" });
20025 + }
20026 + function setLinkTo(value) {
20027 + setAttributes({ linkTo: value });
20028 + const changedAttributes = {};
20029 + const blocks = [];
20030 + getBlock(clientId).innerBlocks.forEach((block) => {
20031 + blocks.push(block.clientId);
20032 + const image = block.attributes.id ? imageData.find(({ id }) => id === block.attributes.id) : null;
20033 + changedAttributes[block.clientId] = utils_getHrefAndDestination(
20034 + image,
20035 + value,
20036 + false,
20037 + block.attributes,
20038 + lightboxSetting
20039 + );
20040 + });
20041 + updateBlockAttributes(blocks, changedAttributes, {
20042 + uniqueByBlock: true
20043 + });
20044 + const linkToText = [...linkOptions].find(
20045 + (linkType) => linkType.value === value
20046 + );
20047 + createSuccessNotice(
20048 + (0,external_wp_i18n_namespaceObject.sprintf)(
20049 + /* translators: %s: image size settings */
20050 + (0,external_wp_i18n_namespaceObject.__)("All gallery image links updated to: %s"),
20051 + linkToText.noticeText
20052 + ),
20053 + {
20054 + id: "gallery-attributes-linkTo",
20055 + type: "snackbar"
20056 + }
20057 + );
20058 + }
20059 + function setColumnsNumber(value) {
20060 + setAttributes({ columns: value });
20061 + }
20062 + function toggleImageCrop() {
20063 + setAttributes({ imageCrop: !imageCrop });
20064 + }
20065 + function toggleRandomOrder() {
20066 + setAttributes({ randomOrder: !randomOrder });
20067 + }
20068 + function toggleOpenInNewTab(openInNewTab) {
20069 + const newLinkTarget = openInNewTab ? "_blank" : void 0;
20070 + setAttributes({ linkTarget: newLinkTarget });
20071 + const changedAttributes = {};
20072 + const blocks = [];
20073 + getBlock(clientId).innerBlocks.forEach((block) => {
20074 + blocks.push(block.clientId);
20075 + changedAttributes[block.clientId] = getUpdatedLinkTargetSettings(
20076 + newLinkTarget,
20077 + block.attributes
20078 + );
20079 + });
20080 + updateBlockAttributes(blocks, changedAttributes, {
20081 + uniqueByBlock: true
20082 + });
20083 + const noticeText = openInNewTab ? (0,external_wp_i18n_namespaceObject.__)("All gallery images updated to open in new tab") : (0,external_wp_i18n_namespaceObject.__)("All gallery images updated to not open in new tab");
20084 + createSuccessNotice(noticeText, {
20085 + id: "gallery-attributes-openInNewTab",
20086 + type: "snackbar"
20087 + });
20088 + }
20089 + function updateImagesSize(newSizeSlug) {
20090 + setAttributes({ sizeSlug: newSizeSlug });
20091 + const changedAttributes = {};
20092 + const blocks = [];
20093 + getBlock(clientId).innerBlocks.forEach((block) => {
20094 + blocks.push(block.clientId);
20095 + const image = block.attributes.id ? imageData.find(({ id }) => id === block.attributes.id) : null;
20096 + changedAttributes[block.clientId] = getImageSizeAttributes(
20097 + image,
20098 + newSizeSlug
20099 + );
20100 + });
20101 + updateBlockAttributes(blocks, changedAttributes, {
20102 + uniqueByBlock: true
20103 + });
20104 + const imageSize = imageSizeOptions.find(
20105 + (size) => size.value === newSizeSlug
20106 + );
20107 + createSuccessNotice(
20108 + (0,external_wp_i18n_namespaceObject.sprintf)(
20109 + /* translators: %s: image size settings */
20110 + (0,external_wp_i18n_namespaceObject.__)("All gallery image sizes updated to: %s"),
20111 + imageSize?.label ?? newSizeSlug
20112 + ),
20113 + {
20114 + id: "gallery-attributes-sizeSlug",
20115 + type: "snackbar"
20116 + }
20117 + );
20118 + }
20119 + function setAspectRatio(value) {
20120 + setAttributes({ aspectRatio: value });
20121 + const changedAttributes = {};
20122 + const blocks = [];
20123 + getBlock(clientId).innerBlocks.forEach((block) => {
20124 + blocks.push(block.clientId);
20125 + changedAttributes[block.clientId] = {
20126 + aspectRatio: value === "auto" ? void 0 : value
20127 + };
20128 + });
20129 + updateBlockAttributes(blocks, changedAttributes, true);
20130 + const aspectRatioText = aspectRatioOptions.find(
20131 + (option) => option.value === value
20132 + );
20133 + createSuccessNotice(
20134 + (0,external_wp_i18n_namespaceObject.sprintf)(
20135 + /* translators: %s: aspect ratio setting */
20136 + (0,external_wp_i18n_namespaceObject.__)("All gallery images updated to aspect ratio: %s"),
20137 + aspectRatioText?.label || value
20138 + ),
20139 + {
20140 + id: "gallery-attributes-aspectRatio",
20141 + type: "snackbar"
20142 + }
20143 + );
20144 + }
20145 + (0,external_wp_element_namespaceObject.useEffect)(() => {
20146 + if (!linkTo) {
20147 + __unstableMarkNextChangeAsNotPersistent();
20148 + setAttributes({
20149 + linkTo: window?.wp?.media?.view?.settings?.defaultProps?.link || LINK_DESTINATION_NONE
20150 + });
20151 + }
20152 + }, [linkTo]);
20153 + const hasImages = !!images.length;
20154 + const hasImageIds = hasImages && images.some((image) => !!image.id);
20155 + const imagesUploading = images.some(
20156 + (img) => !external_wp_element_namespaceObject.Platform.isNative ? !img.id && img.url?.indexOf("blob:") === 0 : img.url?.indexOf("file:") === 0
20157 + );
20158 + const mediaPlaceholderProps = external_wp_element_namespaceObject.Platform.select({
20159 + web: {
20160 + addToGallery: false,
20161 + disableMediaButtons: imagesUploading,
20162 + value: {}
20163 + },
20164 + native: {
20165 + addToGallery: hasImageIds,
20166 + isAppender: hasImages,
20167 + disableMediaButtons: hasImages && !isSelected || imagesUploading,
20168 + value: hasImageIds ? images : {},
20169 + autoOpenMediaUpload: !hasImages && isSelected && blockWasJustInserted,
20170 + onFocus
20171 + }
20172 + });
20173 + const mediaPlaceholder = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
20174 + external_wp_blockEditor_namespaceObject.MediaPlaceholder,
20175 + {
20176 + handleUpload: false,
20177 + icon: sharedIcon,
20178 + labels: {
20179 + title: (0,external_wp_i18n_namespaceObject.__)("Gallery"),
20180 + instructions: PLACEHOLDER_TEXT
20181 + },
20182 + onSelect: updateImages,
20183 + accept: "image/*",
20184 + allowedTypes: edit_ALLOWED_MEDIA_TYPES,
20185 + multiple: true,
20186 + onError: onUploadError,
20187 + ...mediaPlaceholderProps
20188 + }
20189 + );
20190 + const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)({
20191 + className: dist_clsx(className, "has-nested-images")
20192 + });
20193 + const nativeInnerBlockProps = external_wp_element_namespaceObject.Platform.isNative && {
20194 + marginHorizontal: 0,
20195 + marginVertical: 0
20196 + };
20197 + const innerBlocksProps = (0,external_wp_blockEditor_namespaceObject.useInnerBlocksProps)(blockProps, {
20198 + defaultBlock: gallery_edit_DEFAULT_BLOCK,
20199 + directInsert: true,
20200 + orientation: "horizontal",
20201 + renderAppender: false,
20202 + ...nativeInnerBlockProps
20203 + });
20204 + const dropdownMenuProps = useToolsPanelDropdownMenuProps();
20205 + if (!hasImages) {
20206 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_primitives_namespaceObject.View, { ...innerBlocksProps, children: [
20207 + innerBlocksProps.children,
20208 + mediaPlaceholder
20209 + ] });
20210 + }
20211 + const hasLinkTo = linkTo && linkTo !== "none";
20212 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
20213 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_blockEditor_namespaceObject.InspectorControls, { children: [
20214 + external_wp_element_namespaceObject.Platform.isWeb && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(
20215 + external_wp_components_namespaceObject.__experimentalToolsPanel,
20216 + {
20217 + label: (0,external_wp_i18n_namespaceObject.__)("Settings"),
20218 + resetAll: () => {
20219 + setAttributes({
20220 + columns: void 0,
20221 + imageCrop: true,
20222 + randomOrder: false
20223 + });
20224 + setAspectRatio("auto");
20225 + if (sizeSlug !== constants_DEFAULT_MEDIA_SIZE_SLUG) {
20226 + updateImagesSize(constants_DEFAULT_MEDIA_SIZE_SLUG);
20227 + }
20228 + if (linkTarget) {
20229 + toggleOpenInNewTab(false);
20230 + }
20231 + },
20232 + dropdownMenuProps,
20233 + children: [
20234 + images.length > 1 && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
20235 + external_wp_components_namespaceObject.__experimentalToolsPanelItem,
20236 + {
20237 + isShownByDefault: true,
20238 + label: (0,external_wp_i18n_namespaceObject.__)("Columns"),
20239 + hasValue: () => !!columns && columns !== images.length,
20240 + onDeselect: () => setColumnsNumber(void 0),
20241 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
20242 + external_wp_components_namespaceObject.RangeControl,
20243 + {
20244 + __nextHasNoMarginBottom: true,
20245 + label: (0,external_wp_i18n_namespaceObject.__)("Columns"),
20246 + value: columns ? columns : defaultColumnsNumber(
20247 + images.length
20248 + ),
20249 + onChange: setColumnsNumber,
20250 + min: 1,
20251 + max: Math.min(
20252 + MAX_COLUMNS,
20253 + images.length
20254 + ),
20255 + required: true,
20256 + __next40pxDefaultSize: true
20257 + }
20258 + )
20259 + }
20260 + ),
20261 + imageSizeOptions?.length > 0 && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
20262 + external_wp_components_namespaceObject.__experimentalToolsPanelItem,
20263 + {
20264 + isShownByDefault: true,
20265 + label: (0,external_wp_i18n_namespaceObject.__)("Resolution"),
20266 + hasValue: () => sizeSlug !== constants_DEFAULT_MEDIA_SIZE_SLUG,
20267 + onDeselect: () => updateImagesSize(constants_DEFAULT_MEDIA_SIZE_SLUG),
20268 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
20269 + external_wp_components_namespaceObject.SelectControl,
20270 + {
20271 + __nextHasNoMarginBottom: true,
20272 + label: (0,external_wp_i18n_namespaceObject.__)("Resolution"),
20273 + help: (0,external_wp_i18n_namespaceObject.__)(
20274 + "Select the size of the source images."
20275 + ),
20276 + value: sizeSlug,
20277 + options: imageSizeOptions,
20278 + onChange: updateImagesSize,
20279 + hideCancelButton: true,
20280 + size: "__unstable-large"
20281 + }
20282 + )
20283 + }
20284 + ),
20285 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
20286 + external_wp_components_namespaceObject.__experimentalToolsPanelItem,
20287 + {
20288 + isShownByDefault: true,
20289 + label: (0,external_wp_i18n_namespaceObject.__)("Crop images to fit"),
20290 + hasValue: () => !imageCrop,
20291 + onDeselect: () => setAttributes({ imageCrop: true }),
20292 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
20293 + external_wp_components_namespaceObject.ToggleControl,
20294 + {
20295 + __nextHasNoMarginBottom: true,
20296 + label: (0,external_wp_i18n_namespaceObject.__)("Crop images to fit"),
20297 + checked: !!imageCrop,
20298 + onChange: toggleImageCrop
20299 + }
20300 + )
20301 + }
20302 + ),
20303 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
20304 + external_wp_components_namespaceObject.__experimentalToolsPanelItem,
20305 + {
20306 + isShownByDefault: true,
20307 + label: (0,external_wp_i18n_namespaceObject.__)("Randomize order"),
20308 + hasValue: () => !!randomOrder,
20309 + onDeselect: () => setAttributes({ randomOrder: false }),
20310 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
20311 + external_wp_components_namespaceObject.ToggleControl,
20312 + {
20313 + __nextHasNoMarginBottom: true,
20314 + label: (0,external_wp_i18n_namespaceObject.__)("Randomize order"),
20315 + checked: !!randomOrder,
20316 + onChange: toggleRandomOrder
20317 + }
20318 + )
20319 + }
20320 + ),
20321 + hasLinkTo && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
20322 + external_wp_components_namespaceObject.__experimentalToolsPanelItem,
20323 + {
20324 + isShownByDefault: true,
20325 + label: (0,external_wp_i18n_namespaceObject.__)("Open images in new tab"),
20326 + hasValue: () => !!linkTarget,
20327 + onDeselect: () => toggleOpenInNewTab(false),
20328 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
20329 + external_wp_components_namespaceObject.ToggleControl,
20330 + {
20331 + __nextHasNoMarginBottom: true,
20332 + label: (0,external_wp_i18n_namespaceObject.__)("Open images in new tab"),
20333 + checked: linkTarget === "_blank",
20334 + onChange: toggleOpenInNewTab
20335 + }
20336 + )
20337 + }
20338 + ),
20339 + aspectRatioOptions.length > 1 && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
20340 + external_wp_components_namespaceObject.__experimentalToolsPanelItem,
20341 + {
20342 + hasValue: () => !!aspectRatio && aspectRatio !== "auto",
20343 + label: (0,external_wp_i18n_namespaceObject.__)("Aspect ratio"),
20344 + onDeselect: () => setAspectRatio("auto"),
20345 + isShownByDefault: true,
20346 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
20347 + external_wp_components_namespaceObject.SelectControl,
20348 + {
20349 + __next40pxDefaultSize: true,
20350 + __nextHasNoMarginBottom: true,
20351 + label: (0,external_wp_i18n_namespaceObject.__)("Aspect ratio"),
20352 + help: (0,external_wp_i18n_namespaceObject.__)(
20353 + "Set a consistent aspect ratio for all images in the gallery."
20354 + ),
20355 + value: aspectRatio,
20356 + options: aspectRatioOptions,
20357 + onChange: setAspectRatio
20358 + }
20359 + )
20360 + }
20361 + )
20362 + ]
20363 + }
20364 + ),
20365 + external_wp_element_namespaceObject.Platform.isNative && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.PanelBody, { title: (0,external_wp_i18n_namespaceObject.__)("Settings"), children: [
20366 + images.length > 1 && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
20367 + external_wp_components_namespaceObject.RangeControl,
20368 + {
20369 + __nextHasNoMarginBottom: true,
20370 + label: (0,external_wp_i18n_namespaceObject.__)("Columns"),
20371 + value: columns ? columns : defaultColumnsNumber(images.length),
20372 + onChange: setColumnsNumber,
20373 + min: 1,
20374 + max: Math.min(MAX_COLUMNS, images.length),
20375 + ...MOBILE_CONTROL_PROPS_RANGE_CONTROL,
20376 + required: true,
20377 + __next40pxDefaultSize: true
20378 + }
20379 + ),
20380 + imageSizeOptions?.length > 0 && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
20381 + external_wp_components_namespaceObject.SelectControl,
20382 + {
20383 + __nextHasNoMarginBottom: true,
20384 + label: (0,external_wp_i18n_namespaceObject.__)("Resolution"),
20385 + help: (0,external_wp_i18n_namespaceObject.__)(
20386 + "Select the size of the source images."
20387 + ),
20388 + value: sizeSlug,
20389 + options: imageSizeOptions,
20390 + onChange: updateImagesSize,
20391 + hideCancelButton: true,
20392 + size: "__unstable-large"
20393 + }
20394 + ),
20395 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
20396 + external_wp_components_namespaceObject.SelectControl,
20397 + {
20398 + __nextHasNoMarginBottom: true,
20399 + label: (0,external_wp_i18n_namespaceObject.__)("Link"),
20400 + value: linkTo,
20401 + onChange: setLinkTo,
20402 + options: linkOptions,
20403 + hideCancelButton: true,
20404 + size: "__unstable-large"
20405 + }
20406 + ),
20407 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
20408 + external_wp_components_namespaceObject.ToggleControl,
20409 + {
20410 + __nextHasNoMarginBottom: true,
20411 + label: (0,external_wp_i18n_namespaceObject.__)("Crop images to fit"),
20412 + checked: !!imageCrop,
20413 + onChange: toggleImageCrop
20414 + }
20415 + ),
20416 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
20417 + external_wp_components_namespaceObject.ToggleControl,
20418 + {
20419 + __nextHasNoMarginBottom: true,
20420 + label: (0,external_wp_i18n_namespaceObject.__)("Randomize order"),
20421 + checked: !!randomOrder,
20422 + onChange: toggleRandomOrder
20423 + }
20424 + ),
20425 + hasLinkTo && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
20426 + external_wp_components_namespaceObject.ToggleControl,
20427 + {
20428 + __nextHasNoMarginBottom: true,
20429 + label: (0,external_wp_i18n_namespaceObject.__)("Open images in new tab"),
20430 + checked: linkTarget === "_blank",
20431 + onChange: toggleOpenInNewTab
20432 + }
20433 + ),
20434 + aspectRatioOptions.length > 1 && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
20435 + external_wp_components_namespaceObject.SelectControl,
20436 + {
20437 + __nextHasNoMarginBottom: true,
20438 + label: (0,external_wp_i18n_namespaceObject.__)("Aspect Ratio"),
20439 + help: (0,external_wp_i18n_namespaceObject.__)(
20440 + "Set a consistent aspect ratio for all images in the gallery."
20441 + ),
20442 + value: aspectRatio,
20443 + options: aspectRatioOptions,
20444 + onChange: setAspectRatio,
20445 + hideCancelButton: true,
20446 + size: "__unstable-large"
20447 + }
20448 + )
20449 + ] })
20450 + ] }),
20451 + external_wp_element_namespaceObject.Platform.isWeb ? /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockControls, { group: "block", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
20452 + external_wp_components_namespaceObject.ToolbarDropdownMenu,
20453 + {
20454 + icon: link_default,
20455 + label: (0,external_wp_i18n_namespaceObject.__)("Link"),
20456 + children: ({ onClose }) => /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.MenuGroup, { children: linkOptions.map((linkItem) => {
20457 + const isOptionSelected = linkTo === linkItem.value;
20458 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
20459 + external_wp_components_namespaceObject.MenuItem,
20460 + {
20461 + isSelected: isOptionSelected,
20462 + className: dist_clsx(
20463 + "components-dropdown-menu__menu-item",
20464 + {
20465 + "is-active": isOptionSelected
20466 + }
20467 + ),
20468 + iconPosition: "left",
20469 + icon: linkItem.icon,
20470 + onClick: () => {
20471 + setLinkTo(linkItem.value);
20472 + onClose();
20473 + },
20474 + role: "menuitemradio",
20475 + info: linkItem.infoText,
20476 + children: linkItem.label
20477 + },
20478 + linkItem.value
20479 + );
20480 + }) })
20481 + }
20482 + ) }) : null,
20483 + external_wp_element_namespaceObject.Platform.isWeb && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
20484 + !multiGallerySelection && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockControls, { group: "other", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
20485 + external_wp_blockEditor_namespaceObject.MediaReplaceFlow,
20486 + {
20487 + allowedTypes: edit_ALLOWED_MEDIA_TYPES,
20488 + accept: "image/*",
20489 + handleUpload: false,
20490 + onSelect: updateImages,
20491 + name: (0,external_wp_i18n_namespaceObject.__)("Add"),
20492 + multiple: true,
20493 + mediaIds: images.filter((image) => image.id).map((image) => image.id),
20494 + addToGallery: hasImageIds
20495 + }
20496 + ) }),
20497 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
20498 + GapStyles,
20499 + {
20500 + blockGap: attributes.style?.spacing?.blockGap,
20501 + clientId
20502 + }
20503 + )
20504 + ] }),
20505 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
20506 + Gallery,
20507 + {
20508 + ...props,
20509 + isContentLocked,
20510 + images,
20511 + mediaPlaceholder: !hasImages || external_wp_element_namespaceObject.Platform.isNative ? mediaPlaceholder : void 0,
20512 + blockProps: innerBlocksProps,
20513 + insertBlocksAfter,
20514 + multiGallerySelection
20515 + }
20516 + )
20517 + ] });
20518 + }
20519 +
20520 +
20521 + ;// ./node_modules/@wordpress/block-library/build-module/gallery/block.json
20522 + const gallery_block_namespaceObject = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/gallery","title":"Gallery","category":"media","allowedBlocks":["core/image"],"description":"Display multiple images in a rich gallery.","keywords":["images","photos"],"textdomain":"default","attributes":{"images":{"type":"array","default":[],"source":"query","selector":".blocks-gallery-item","query":{"url":{"type":"string","source":"attribute","selector":"img","attribute":"src"},"fullUrl":{"type":"string","source":"attribute","selector":"img","attribute":"data-full-url"},"link":{"type":"string","source":"attribute","selector":"img","attribute":"data-link"},"alt":{"type":"string","source":"attribute","selector":"img","attribute":"alt","default":""},"id":{"type":"string","source":"attribute","selector":"img","attribute":"data-id"},"caption":{"type":"rich-text","source":"rich-text","selector":".blocks-gallery-item__caption"}}},"ids":{"type":"array","items":{"type":"number"},"default":[]},"shortCodeTransforms":{"type":"array","items":{"type":"object"},"default":[]},"columns":{"type":"number","minimum":1,"maximum":8},"caption":{"type":"rich-text","source":"rich-text","selector":".blocks-gallery-caption","role":"content"},"imageCrop":{"type":"boolean","default":true},"randomOrder":{"type":"boolean","default":false},"fixedHeight":{"type":"boolean","default":true},"linkTarget":{"type":"string"},"linkTo":{"type":"string"},"sizeSlug":{"type":"string","default":"large"},"allowResize":{"type":"boolean","default":false},"aspectRatio":{"type":"string","default":"auto"}},"providesContext":{"allowResize":"allowResize","imageCrop":"imageCrop","fixedHeight":"fixedHeight"},"supports":{"anchor":true,"align":true,"__experimentalBorder":{"radius":true,"color":true,"width":true,"style":true,"__experimentalDefaultControls":{"color":true,"radius":true}},"html":false,"units":["px","em","rem","vh","vw"],"spacing":{"margin":true,"padding":true,"blockGap":["horizontal","vertical"],"__experimentalSkipSerialization":["blockGap"],"__experimentalDefaultControls":{"blockGap":true,"margin":false,"padding":false}},"color":{"text":false,"background":true,"gradients":true},"layout":{"allowSwitching":false,"allowInheriting":false,"allowEditing":false,"default":{"type":"flex"}},"interactivity":{"clientNavigation":true}},"editorStyle":"wp-block-gallery-editor","style":"wp-block-gallery"}');
20523 + ;// ./node_modules/@wordpress/block-library/build-module/gallery/save.js
20524 +
20525 +
20526 +
20527 + function saveWithInnerBlocks({ attributes }) {
20528 + const { caption, columns, imageCrop } = attributes;
20529 + const className = dist_clsx("has-nested-images", {
20530 + [`columns-${columns}`]: columns !== void 0,
20531 + [`columns-default`]: columns === void 0,
20532 + "is-cropped": imageCrop
20533 + });
20534 + const blockProps = external_wp_blockEditor_namespaceObject.useBlockProps.save({ className });
20535 + const innerBlocksProps = external_wp_blockEditor_namespaceObject.useInnerBlocksProps.save(blockProps);
20536 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("figure", { ...innerBlocksProps, children: [
20537 + innerBlocksProps.children,
20538 + !external_wp_blockEditor_namespaceObject.RichText.isEmpty(caption) && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
20539 + external_wp_blockEditor_namespaceObject.RichText.Content,
20540 + {
20541 + tagName: "figcaption",
20542 + className: dist_clsx(
20543 + "blocks-gallery-caption",
20544 + (0,external_wp_blockEditor_namespaceObject.__experimentalGetElementClassName)("caption")
20545 + ),
20546 + value: caption
20547 + }
20548 + )
20549 + ] });
20550 + }
20551 +
20552 +
20553 + ;// ./node_modules/@wordpress/block-library/build-module/gallery/transforms.js
20554 +
20555 +
20556 +
20557 +
20558 + const parseShortcodeIds = (ids) => {
20559 + if (!ids) {
20560 + return [];
20561 + }
20562 + return ids.split(",").map((id) => parseInt(id, 10));
20563 + };
20564 + function updateThirdPartyTransformToGallery(block) {
20565 + if (block.name === "core/gallery" && block.attributes?.images.length > 0) {
20566 + const innerBlocks = block.attributes.images.map(
20567 + ({ url, id, alt }) => {
20568 + return (0,external_wp_blocks_namespaceObject.createBlock)("core/image", {
20569 + url,
20570 + id: id ? parseInt(id, 10) : null,
20571 + alt,
20572 + sizeSlug: block.attributes.sizeSlug,
20573 + linkDestination: block.attributes.linkDestination
20574 + });
20575 + }
20576 + );
20577 + delete block.attributes.ids;
20578 + delete block.attributes.images;
20579 + block.innerBlocks = innerBlocks;
20580 + }
20581 + return block;
20582 + }
20583 + (0,external_wp_hooks_namespaceObject.addFilter)(
20584 + "blocks.switchToBlockType.transformedBlock",
20585 + "core/gallery/update-third-party-transform-to",
20586 + updateThirdPartyTransformToGallery
20587 + );
20588 + function updateThirdPartyTransformFromGallery(toBlock, fromBlocks) {
20589 + const from = Array.isArray(fromBlocks) ? fromBlocks : [fromBlocks];
20590 + const galleryBlock = from.find(
20591 + (transformedBlock) => transformedBlock.name === "core/gallery" && transformedBlock.innerBlocks.length > 0 && !transformedBlock.attributes.images?.length > 0 && !toBlock.name.includes("core/")
20592 + );
20593 + if (galleryBlock) {
20594 + const images = galleryBlock.innerBlocks.map(
20595 + ({ attributes: { url, id, alt } }) => ({
20596 + url,
20597 + id: id ? parseInt(id, 10) : null,
20598 + alt
20599 + })
20600 + );
20601 + const ids = images.map(({ id }) => id);
20602 + galleryBlock.attributes.images = images;
20603 + galleryBlock.attributes.ids = ids;
20604 + }
20605 + return toBlock;
20606 + }
20607 + (0,external_wp_hooks_namespaceObject.addFilter)(
20608 + "blocks.switchToBlockType.transformedBlock",
20609 + "core/gallery/update-third-party-transform-from",
20610 + updateThirdPartyTransformFromGallery
20611 + );
20612 + const gallery_transforms_transforms = {
20613 + from: [
20614 + {
20615 + type: "block",
20616 + isMultiBlock: true,
20617 + blocks: ["core/image"],
20618 + transform: (attributes) => {
20619 + let { align, sizeSlug } = attributes[0];
20620 + align = attributes.every(
20621 + (attribute) => attribute.align === align
20622 + ) ? align : void 0;
20623 + sizeSlug = attributes.every(
20624 + (attribute) => attribute.sizeSlug === sizeSlug
20625 + ) ? sizeSlug : void 0;
20626 + const validImages = attributes.filter(({ url }) => url);
20627 + const innerBlocks = validImages.map((image) => {
20628 + image.width = void 0;
20629 + image.height = void 0;
20630 + return (0,external_wp_blocks_namespaceObject.createBlock)("core/image", image);
20631 + });
20632 + return (0,external_wp_blocks_namespaceObject.createBlock)(
20633 + "core/gallery",
20634 + {
20635 + align,
20636 + sizeSlug
20637 + },
20638 + innerBlocks
20639 + );
20640 + }
20641 + },
20642 + {
20643 + type: "shortcode",
20644 + tag: "gallery",
20645 + transform({ named: { ids, columns = 3, link, orderby } }) {
20646 + const imageIds = parseShortcodeIds(ids).map(
20647 + (id) => parseInt(id, 10)
20648 + );
20649 + let linkTo = LINK_DESTINATION_NONE;
20650 + if (link === "post") {
20651 + linkTo = LINK_DESTINATION_ATTACHMENT;
20652 + } else if (link === "file") {
20653 + linkTo = LINK_DESTINATION_MEDIA;
20654 + }
20655 + const galleryBlock = (0,external_wp_blocks_namespaceObject.createBlock)(
20656 + "core/gallery",
20657 + {
20658 + columns: parseInt(columns, 10),
20659 + linkTo,
20660 + randomOrder: orderby === "rand"
20661 + },
20662 + imageIds.map(
20663 + (imageId) => (0,external_wp_blocks_namespaceObject.createBlock)("core/image", { id: imageId })
20664 + )
20665 + );
20666 + return galleryBlock;
20667 + },
20668 + isMatch({ named }) {
20669 + return void 0 !== named.ids;
20670 + }
20671 + },
20672 + {
20673 + // When created by drag and dropping multiple files on an insertion point. Because multiple
20674 + // files must not be transformed to a gallery when dropped within a gallery there is another transform
20675 + // within the image block to handle that case. Therefore this transform has to have priority 1
20676 + // set so that it overrides the image block transformation when multiple images are dropped outside
20677 + // of a gallery block.
20678 + type: "files",
20679 + priority: 1,
20680 + isMatch(files) {
20681 + return files.length !== 1 && files.every(
20682 + (file) => file.type.indexOf("image/") === 0
20683 + );
20684 + },
20685 + transform(files) {
20686 + const innerBlocks = files.map(
20687 + (file) => (0,external_wp_blocks_namespaceObject.createBlock)("core/image", {
20688 + blob: (0,external_wp_blob_namespaceObject.createBlobURL)(file)
20689 + })
20690 + );
20691 + return (0,external_wp_blocks_namespaceObject.createBlock)("core/gallery", {}, innerBlocks);
20692 + }
20693 + }
20694 + ],
20695 + to: [
20696 + {
20697 + type: "block",
20698 + blocks: ["core/image"],
20699 + transform: ({ align }, innerBlocks) => {
20700 + if (innerBlocks.length > 0) {
20701 + return innerBlocks.map(
20702 + ({
20703 + attributes: {
20704 + url,
20705 + alt,
20706 + caption,
20707 + title,
20708 + href,
20709 + rel,
20710 + linkClass,
20711 + id,
20712 + sizeSlug: imageSizeSlug,
20713 + linkDestination,
20714 + linkTarget,
20715 + anchor,
20716 + className
20717 + }
20718 + }) => (0,external_wp_blocks_namespaceObject.createBlock)("core/image", {
20719 + align,
20720 + url,
20721 + alt,
20722 + caption,
20723 + title,
20724 + href,
20725 + rel,
20726 + linkClass,
20727 + id,
20728 + sizeSlug: imageSizeSlug,
20729 + linkDestination,
20730 + linkTarget,
20731 + anchor,
20732 + className
20733 + })
20734 + );
20735 + }
20736 + return (0,external_wp_blocks_namespaceObject.createBlock)("core/image", { align });
20737 + }
20738 + }
20739 + ]
20740 + };
20741 + var gallery_transforms_transforms_default = gallery_transforms_transforms;
20742 +
20743 +
20744 + ;// ./node_modules/@wordpress/block-library/build-module/gallery/index.js
20745 +
20746 +
20747 +
20748 +
20749 +
20750 +
20751 +
20752 + const { name: gallery_name } = gallery_block_namespaceObject;
20753 + const gallery_settings = {
20754 + icon: gallery_default,
20755 + example: {
20756 + attributes: {
20757 + columns: 2
20758 + },
20759 + innerBlocks: [
20760 + {
20761 + name: "core/image",
20762 + attributes: {
20763 + url: "https://s.w.org/images/core/5.3/Glacial_lakes%2C_Bhutan.jpg"
20764 + }
20765 + },
20766 + {
20767 + name: "core/image",
20768 + attributes: {
20769 + url: "https://s.w.org/images/core/5.3/Sediment_off_the_Yucatan_Peninsula.jpg"
20770 + }
20771 + }
20772 + ]
20773 + },
20774 + transforms: gallery_transforms_transforms_default,
20775 + edit: GalleryEdit,
20776 + save: saveWithInnerBlocks,
20777 + deprecated: gallery_deprecated_deprecated_default
20778 + };
20779 + const gallery_init = () => initBlock({ name: gallery_name, metadata: gallery_block_namespaceObject, settings: gallery_settings });
20780 +
20781 +
20782 + ;// ./node_modules/@wordpress/block-library/build-module/group/deprecated.js
20783 +
20784 +
20785 +
20786 + const migrateAttributes = (attributes) => {
20787 + if (!attributes.tagName) {
20788 + attributes = {
20789 + ...attributes,
20790 + tagName: "div"
20791 + };
20792 + }
20793 + if (!attributes.customTextColor && !attributes.customBackgroundColor) {
20794 + return attributes;
20795 + }
20796 + const style = { color: {} };
20797 + if (attributes.customTextColor) {
20798 + style.color.text = attributes.customTextColor;
20799 + }
20800 + if (attributes.customBackgroundColor) {
20801 + style.color.background = attributes.customBackgroundColor;
20802 + }
20803 + const { customTextColor, customBackgroundColor, ...restAttributes } = attributes;
20804 + return {
20805 + ...restAttributes,
20806 + style
20807 + };
20808 + };
20809 + const group_deprecated_deprecated = [
20810 + // Version with default layout.
20811 + {
20812 + attributes: {
20813 + tagName: {
20814 + type: "string",
20815 + default: "div"
20816 + },
20817 + templateLock: {
20818 + type: ["string", "boolean"],
20819 + enum: ["all", "insert", false]
20820 + }
20821 + },
20822 + supports: {
20823 + __experimentalOnEnter: true,
20824 + __experimentalSettings: true,
20825 + align: ["wide", "full"],
20826 + anchor: true,
20827 + ariaLabel: true,
20828 + html: false,
20829 + color: {
20830 + gradients: true,
20831 + link: true,
20832 + __experimentalDefaultControls: {
20833 + background: true,
20834 + text: true
20835 + }
20836 + },
20837 + spacing: {
20838 + margin: ["top", "bottom"],
20839 + padding: true,
20840 + blockGap: true,
20841 + __experimentalDefaultControls: {
20842 + padding: true,
20843 + blockGap: true
20844 + }
20845 + },
20846 + __experimentalBorder: {
20847 + color: true,
20848 + radius: true,
20849 + style: true,
20850 + width: true,
20851 + __experimentalDefaultControls: {
20852 + color: true,
20853 + radius: true,
20854 + style: true,
20855 + width: true
20856 + }
20857 + },
20858 + typography: {
20859 + fontSize: true,
20860 + lineHeight: true,
20861 + __experimentalFontStyle: true,
20862 + __experimentalFontWeight: true,
20863 + __experimentalLetterSpacing: true,
20864 + __experimentalTextTransform: true,
20865 + __experimentalDefaultControls: {
20866 + fontSize: true
20867 + }
20868 + },
20869 + layout: true
20870 + },
20871 + save({ attributes: { tagName: Tag } }) {
20872 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(Tag, { ...external_wp_blockEditor_namespaceObject.useInnerBlocksProps.save(external_wp_blockEditor_namespaceObject.useBlockProps.save()) });
20873 + },
20874 + isEligible: ({ layout }) => layout?.inherit || layout?.contentSize && layout?.type !== "constrained",
20875 + migrate: (attributes) => {
20876 + const { layout = null } = attributes;
20877 + if (layout?.inherit || layout?.contentSize) {
20878 + return {
20879 + ...attributes,
20880 + layout: {
20881 + ...layout,
20882 + type: "constrained"
20883 + }
20884 + };
20885 + }
20886 + }
20887 + },
20888 + // Version of the block with the double div.
20889 + {
20890 + attributes: {
20891 + tagName: {
20892 + type: "string",
20893 + default: "div"
20894 + },
20895 + templateLock: {
20896 + type: ["string", "boolean"],
20897 + enum: ["all", "insert", false]
20898 + }
20899 + },
20900 + supports: {
20901 + align: ["wide", "full"],
20902 + anchor: true,
20903 + color: {
20904 + gradients: true,
20905 + link: true
20906 + },
20907 + spacing: {
20908 + padding: true
20909 + },
20910 + __experimentalBorder: {
20911 + radius: true
20912 + }
20913 + },
20914 + save({ attributes }) {
20915 + const { tagName: Tag } = attributes;
20916 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(Tag, { ...external_wp_blockEditor_namespaceObject.useBlockProps.save(), children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { className: "wp-block-group__inner-container", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, {}) }) });
20917 + }
20918 + },
20919 + // Version of the block without global styles support
20920 + {
20921 + attributes: {
20922 + backgroundColor: {
20923 + type: "string"
20924 + },
20925 + customBackgroundColor: {
20926 + type: "string"
20927 + },
20928 + textColor: {
20929 + type: "string"
20930 + },
20931 + customTextColor: {
20932 + type: "string"
20933 + }
20934 + },
20935 + supports: {
20936 + align: ["wide", "full"],
20937 + anchor: true,
20938 + html: false
20939 + },
20940 + migrate: migrateAttributes,
20941 + save({ attributes }) {
20942 + const {
20943 + backgroundColor,
20944 + customBackgroundColor,
20945 + textColor,
20946 + customTextColor
20947 + } = attributes;
20948 + const backgroundClass = (0,external_wp_blockEditor_namespaceObject.getColorClassName)(
20949 + "background-color",
20950 + backgroundColor
20951 + );
20952 + const textClass = (0,external_wp_blockEditor_namespaceObject.getColorClassName)("color", textColor);
20953 + const className = dist_clsx(backgroundClass, textClass, {
20954 + "has-text-color": textColor || customTextColor,
20955 + "has-background": backgroundColor || customBackgroundColor
20956 + });
20957 + const styles = {
20958 + backgroundColor: backgroundClass ? void 0 : customBackgroundColor,
20959 + color: textClass ? void 0 : customTextColor
20960 + };
20961 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { className, style: styles, children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { className: "wp-block-group__inner-container", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, {}) }) });
20962 + }
20963 + },
20964 + // Version of the group block with a bug that made text color class not applied.
20965 + {
20966 + attributes: {
20967 + backgroundColor: {
20968 + type: "string"
20969 + },
20970 + customBackgroundColor: {
20971 + type: "string"
20972 + },
20973 + textColor: {
20974 + type: "string"
20975 + },
20976 + customTextColor: {
20977 + type: "string"
20978 + }
20979 + },
20980 + migrate: migrateAttributes,
20981 + supports: {
20982 + align: ["wide", "full"],
20983 + anchor: true,
20984 + html: false
20985 + },
20986 + save({ attributes }) {
20987 + const {
20988 + backgroundColor,
20989 + customBackgroundColor,
20990 + textColor,
20991 + customTextColor
20992 + } = attributes;
20993 + const backgroundClass = (0,external_wp_blockEditor_namespaceObject.getColorClassName)(
20994 + "background-color",
20995 + backgroundColor
20996 + );
20997 + const textClass = (0,external_wp_blockEditor_namespaceObject.getColorClassName)("color", textColor);
20998 + const className = dist_clsx(backgroundClass, {
20999 + "has-text-color": textColor || customTextColor,
21000 + "has-background": backgroundColor || customBackgroundColor
21001 + });
21002 + const styles = {
21003 + backgroundColor: backgroundClass ? void 0 : customBackgroundColor,
21004 + color: textClass ? void 0 : customTextColor
21005 + };
21006 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { className, style: styles, children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { className: "wp-block-group__inner-container", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, {}) }) });
21007 + }
21008 + },
21009 + // v1 of group block. Deprecated to add an inner-container div around `InnerBlocks.Content`.
21010 + {
21011 + attributes: {
21012 + backgroundColor: {
21013 + type: "string"
21014 + },
21015 + customBackgroundColor: {
21016 + type: "string"
21017 + }
21018 + },
21019 + supports: {
21020 + align: ["wide", "full"],
21021 + anchor: true,
21022 + html: false
21023 + },
21024 + migrate: migrateAttributes,
21025 + save({ attributes }) {
21026 + const { backgroundColor, customBackgroundColor } = attributes;
21027 + const backgroundClass = (0,external_wp_blockEditor_namespaceObject.getColorClassName)(
21028 + "background-color",
21029 + backgroundColor
21030 + );
21031 + const className = dist_clsx(backgroundClass, {
21032 + "has-background": backgroundColor || customBackgroundColor
21033 + });
21034 + const styles = {
21035 + backgroundColor: backgroundClass ? void 0 : customBackgroundColor
21036 + };
21037 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { className, style: styles, children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, {}) });
21038 + }
21039 + }
21040 + ];
21041 + var group_deprecated_deprecated_default = group_deprecated_deprecated;
21042 +
21043 +
21044 + ;// ./node_modules/@wordpress/block-library/build-module/group/placeholder.js
21045 +
21046 +
21047 +
21048 +
21049 +
21050 +
21051 +
21052 + const getGroupPlaceholderIcons = (name = "group") => {
21053 + const icons = {
21054 + group: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
21055 + external_wp_components_namespaceObject.SVG,
21056 + {
21057 + xmlns: "http://www.w3.org/2000/svg",
21058 + width: "48",
21059 + height: "48",
21060 + viewBox: "0 0 48 48",
21061 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Path, { d: "M0 10a2 2 0 0 1 2-2h44a2 2 0 0 1 2 2v28a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V10Z" })
21062 + }
21063 + ),
21064 + "group-row": /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
21065 + external_wp_components_namespaceObject.SVG,
21066 + {
21067 + xmlns: "http://www.w3.org/2000/svg",
21068 + width: "48",
21069 + height: "48",
21070 + viewBox: "0 0 48 48",
21071 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Path, { d: "M0 10a2 2 0 0 1 2-2h19a2 2 0 0 1 2 2v28a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V10Zm25 0a2 2 0 0 1 2-2h19a2 2 0 0 1 2 2v28a2 2 0 0 1-2 2H27a2 2 0 0 1-2-2V10Z" })
21072 + }
21073 + ),
21074 + "group-stack": /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
21075 + external_wp_components_namespaceObject.SVG,
21076 + {
21077 + xmlns: "http://www.w3.org/2000/svg",
21078 + width: "48",
21079 + height: "48",
21080 + viewBox: "0 0 48 48",
21081 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Path, { d: "M0 10a2 2 0 0 1 2-2h44a2 2 0 0 1 2 2v11a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V10Zm0 17a2 2 0 0 1 2-2h44a2 2 0 0 1 2 2v11a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V27Z" })
21082 + }
21083 + ),
21084 + "group-grid": /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
21085 + external_wp_components_namespaceObject.SVG,
21086 + {
21087 + xmlns: "http://www.w3.org/2000/svg",
21088 + width: "48",
21089 + height: "48",
21090 + viewBox: "0 0 48 48",
21091 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Path, { d: "M0 10a2 2 0 0 1 2-2h19a2 2 0 0 1 2 2v11a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V10Zm25 0a2 2 0 0 1 2-2h19a2 2 0 0 1 2 2v11a2 2 0 0 1-2 2H27a2 2 0 0 1-2-2V10ZM0 27a2 2 0 0 1 2-2h19a2 2 0 0 1 2 2v11a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V27Zm25 0a2 2 0 0 1 2-2h19a2 2 0 0 1 2 2v11a2 2 0 0 1-2 2H27a2 2 0 0 1-2-2V27Z" })
21092 + }
21093 + )
21094 + };
21095 + return icons?.[name];
21096 + };
21097 + function useShouldShowPlaceHolder({
21098 + attributes = {
21099 + style: void 0,
21100 + backgroundColor: void 0,
21101 + textColor: void 0,
21102 + fontSize: void 0
21103 + },
21104 + usedLayoutType = "",
21105 + hasInnerBlocks = false
21106 + }) {
21107 + const { style, backgroundColor, textColor, fontSize } = attributes;
21108 + const [showPlaceholder, setShowPlaceholder] = (0,external_wp_element_namespaceObject.useState)(
21109 + !hasInnerBlocks && !backgroundColor && !fontSize && !textColor && !style && usedLayoutType !== "flex" && usedLayoutType !== "grid"
21110 + );
21111 + (0,external_wp_element_namespaceObject.useEffect)(() => {
21112 + if (!!hasInnerBlocks || !!backgroundColor || !!fontSize || !!textColor || !!style || usedLayoutType === "flex") {
21113 + setShowPlaceholder(false);
21114 + }
21115 + }, [
21116 + backgroundColor,
21117 + fontSize,
21118 + textColor,
21119 + style,
21120 + usedLayoutType,
21121 + hasInnerBlocks
21122 + ]);
21123 + return [showPlaceholder, setShowPlaceholder];
21124 + }
21125 + function GroupPlaceHolder({ name, onSelect }) {
21126 + const variations = (0,external_wp_data_namespaceObject.useSelect)(
21127 + (select) => select(external_wp_blocks_namespaceObject.store).getBlockVariations(name, "block"),
21128 + [name]
21129 + );
21130 + const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)({
21131 + className: "wp-block-group__placeholder"
21132 + });
21133 + (0,external_wp_element_namespaceObject.useEffect)(() => {
21134 + if (variations && variations.length === 1) {
21135 + onSelect(variations[0]);
21136 + }
21137 + }, [onSelect, variations]);
21138 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { ...blockProps, children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
21139 + external_wp_components_namespaceObject.Placeholder,
21140 + {
21141 + instructions: (0,external_wp_i18n_namespaceObject.__)("Group blocks together. Select a layout:"),
21142 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
21143 + "ul",
21144 + {
21145 + role: "list",
21146 + className: "wp-block-group-placeholder__variations",
21147 + "aria-label": (0,external_wp_i18n_namespaceObject.__)("Block variations"),
21148 + children: variations.map((variation) => /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("li", { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
21149 + external_wp_components_namespaceObject.Button,
21150 + {
21151 + __next40pxDefaultSize: true,
21152 + variant: "tertiary",
21153 + icon: getGroupPlaceholderIcons(
21154 + variation.name
21155 + ),
21156 + iconSize: 48,
21157 + onClick: () => onSelect(variation),
21158 + className: "wp-block-group-placeholder__variation-button",
21159 + label: `${variation.title}: ${variation.description}`
21160 + }
21161 + ) }, variation.name))
21162 + }
21163 + )
21164 + }
21165 + ) });
21166 + }
21167 + var placeholder_default = GroupPlaceHolder;
21168 +
21169 +
21170 + ;// ./node_modules/@wordpress/block-library/build-module/group/edit.js
21171 +
21172 +
21173 +
21174 +
21175 +
21176 +
21177 +
21178 +
21179 + const { HTMLElementControl: edit_HTMLElementControl } = unlock(external_wp_blockEditor_namespaceObject.privateApis);
21180 + function GroupEditControls({ tagName, onSelectTagName, clientId }) {
21181 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, { group: "advanced", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
21182 + edit_HTMLElementControl,
21183 + {
21184 + tagName,
21185 + onChange: onSelectTagName,
21186 + clientId,
21187 + options: [
21188 + { label: (0,external_wp_i18n_namespaceObject.__)("Default (<div>)"), value: "div" },
21189 + { label: "<header>", value: "header" },
21190 + { label: "<main>", value: "main" },
21191 + { label: "<section>", value: "section" },
21192 + { label: "<article>", value: "article" },
21193 + { label: "<aside>", value: "aside" },
21194 + { label: "<footer>", value: "footer" }
21195 + ]
21196 + }
21197 + ) });
21198 + }
21199 + function GroupEdit({ attributes, name, setAttributes, clientId }) {
21200 + const { hasInnerBlocks, themeSupportsLayout } = (0,external_wp_data_namespaceObject.useSelect)(
21201 + (select) => {
21202 + const { getBlock, getSettings } = select(external_wp_blockEditor_namespaceObject.store);
21203 + const block = getBlock(clientId);
21204 + return {
21205 + hasInnerBlocks: !!(block && block.innerBlocks.length),
21206 + themeSupportsLayout: getSettings()?.supportsLayout
21207 + };
21208 + },
21209 + [clientId]
21210 + );
21211 + const {
21212 + tagName: TagName = "div",
21213 + templateLock,
21214 + allowedBlocks,
21215 + layout = {}
21216 + } = attributes;
21217 + const { type = "default" } = layout;
21218 + const layoutSupportEnabled = themeSupportsLayout || type === "flex" || type === "grid";
21219 + const ref = (0,external_wp_element_namespaceObject.useRef)();
21220 + const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)({ ref });
21221 + const [showPlaceholder, setShowPlaceholder] = useShouldShowPlaceHolder({
21222 + attributes,
21223 + usedLayoutType: type,
21224 + hasInnerBlocks
21225 + });
21226 + let renderAppender;
21227 + if (showPlaceholder) {
21228 + renderAppender = false;
21229 + } else if (!hasInnerBlocks) {
21230 + renderAppender = external_wp_blockEditor_namespaceObject.InnerBlocks.ButtonBlockAppender;
21231 + }
21232 + const innerBlocksProps = (0,external_wp_blockEditor_namespaceObject.useInnerBlocksProps)(
21233 + layoutSupportEnabled ? blockProps : { className: "wp-block-group__inner-container" },
21234 + {
21235 + dropZoneElement: ref.current,
21236 + templateLock,
21237 + allowedBlocks,
21238 + renderAppender
21239 + }
21240 + );
21241 + const { selectBlock } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_blockEditor_namespaceObject.store);
21242 + const selectVariation = (nextVariation) => {
21243 + setAttributes(nextVariation.attributes);
21244 + selectBlock(clientId, -1);
21245 + setShowPlaceholder(false);
21246 + };
21247 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
21248 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
21249 + GroupEditControls,
21250 + {
21251 + tagName: TagName,
21252 + onSelectTagName: (value) => setAttributes({ tagName: value }),
21253 + clientId
21254 + }
21255 + ),
21256 + showPlaceholder && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_primitives_namespaceObject.View, { children: [
21257 + innerBlocksProps.children,
21258 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
21259 + placeholder_default,
21260 + {
21261 + name,
21262 + onSelect: selectVariation
21263 + }
21264 + )
21265 + ] }),
21266 + layoutSupportEnabled && !showPlaceholder && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(TagName, { ...innerBlocksProps }),
21267 + !layoutSupportEnabled && !showPlaceholder && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(TagName, { ...blockProps, children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { ...innerBlocksProps }) })
21268 + ] });
21269 + }
21270 + var group_edit_edit_default = GroupEdit;
21271 +
21272 +
21273 + ;// ./node_modules/@wordpress/block-library/build-module/group/block.json
21274 + const group_block_namespaceObject = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/group","title":"Group","category":"design","description":"Gather blocks in a layout container.","keywords":["container","wrapper","row","section"],"textdomain":"default","attributes":{"tagName":{"type":"string","default":"div"},"templateLock":{"type":["string","boolean"],"enum":["all","insert","contentOnly",false]}},"supports":{"__experimentalOnEnter":true,"__experimentalOnMerge":true,"__experimentalSettings":true,"align":["wide","full"],"anchor":true,"ariaLabel":true,"html":false,"background":{"backgroundImage":true,"backgroundSize":true,"__experimentalDefaultControls":{"backgroundImage":true}},"color":{"gradients":true,"heading":true,"button":true,"link":true,"__experimentalDefaultControls":{"background":true,"text":true}},"shadow":true,"spacing":{"margin":["top","bottom"],"padding":true,"blockGap":true,"__experimentalDefaultControls":{"padding":true,"blockGap":true}},"dimensions":{"minHeight":true},"__experimentalBorder":{"color":true,"radius":true,"style":true,"width":true,"__experimentalDefaultControls":{"color":true,"radius":true,"style":true,"width":true}},"position":{"sticky":true},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"layout":{"allowSizingOnChildren":true},"interactivity":{"clientNavigation":true},"allowedBlocks":true},"editorStyle":"wp-block-group-editor","style":"wp-block-group"}');
21275 + ;// ./node_modules/@wordpress/block-library/build-module/group/save.js
21276 +
21277 +
21278 + function group_save_save({ attributes: { tagName: Tag } }) {
21279 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(Tag, { ...external_wp_blockEditor_namespaceObject.useInnerBlocksProps.save(external_wp_blockEditor_namespaceObject.useBlockProps.save()) });
21280 + }
21281 +
21282 +
21283 + ;// ./node_modules/@wordpress/block-library/build-module/group/transforms.js
21284 +
21285 + const group_transforms_transforms = {
21286 + from: [
21287 + {
21288 + type: "block",
21289 + isMultiBlock: true,
21290 + blocks: ["*"],
21291 + __experimentalConvert(blocks) {
21292 + const alignments = ["wide", "full"];
21293 + const widestAlignment = blocks.reduce(
21294 + (accumulator, block) => {
21295 + const { align } = block.attributes;
21296 + return alignments.indexOf(align) > alignments.indexOf(accumulator) ? align : accumulator;
21297 + },
21298 + void 0
21299 + );
21300 + const groupInnerBlocks = blocks.map((block) => {
21301 + return (0,external_wp_blocks_namespaceObject.createBlock)(
21302 + block.name,
21303 + block.attributes,
21304 + block.innerBlocks
21305 + );
21306 + });
21307 + return (0,external_wp_blocks_namespaceObject.createBlock)(
21308 + "core/group",
21309 + {
21310 + align: widestAlignment,
21311 + layout: { type: "constrained" }
21312 + },
21313 + groupInnerBlocks
21314 + );
21315 + }
21316 + }
21317 + ]
21318 + };
21319 + var group_transforms_transforms_default = group_transforms_transforms;
21320 +
21321 +
21322 + ;// ./node_modules/@wordpress/icons/build-module/library/row.js
21323 +
21324 +
21325 + var row_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M4 6.5h5a2 2 0 0 1 2 2v7a2 2 0 0 1-2 2H4V16h5a.5.5 0 0 0 .5-.5v-7A.5.5 0 0 0 9 8H4V6.5Zm16 0h-5a2 2 0 0 0-2 2v7a2 2 0 0 0 2 2h5V16h-5a.5.5 0 0 1-.5-.5v-7A.5.5 0 0 1 15 8h5V6.5Z" }) });
21326 +
21327 +
21328 + ;// ./node_modules/@wordpress/icons/build-module/library/stack.js
21329 +
21330 +
21331 + var stack_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M17.5 4v5a2 2 0 0 1-2 2h-7a2 2 0 0 1-2-2V4H8v5a.5.5 0 0 0 .5.5h7A.5.5 0 0 0 16 9V4h1.5Zm0 16v-5a2 2 0 0 0-2-2h-7a2 2 0 0 0-2 2v5H8v-5a.5.5 0 0 1 .5-.5h7a.5.5 0 0 1 .5.5v5h1.5Z" }) });
21332 +
21333 +
21334 + ;// ./node_modules/@wordpress/icons/build-module/library/grid.js
21335 +
21336 +
21337 + var grid_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
21338 + external_wp_primitives_namespaceObject.Path,
21339 + {
21340 + d: "m3 5c0-1.10457.89543-2 2-2h13.5c1.1046 0 2 .89543 2 2v13.5c0 1.1046-.8954 2-2 2h-13.5c-1.10457 0-2-.8954-2-2zm2-.5h6v6.5h-6.5v-6c0-.27614.22386-.5.5-.5zm-.5 8v6c0 .2761.22386.5.5.5h6v-6.5zm8 0v6.5h6c.2761 0 .5-.2239.5-.5v-6zm0-8v6.5h6.5v-6c0-.27614-.2239-.5-.5-.5z",
21341 + fillRule: "evenodd",
21342 + clipRule: "evenodd"
21343 + }
21344 + ) });
21345 +
21346 +
21347 + ;// ./node_modules/@wordpress/block-library/build-module/group/variations.js
21348 +
21349 +
21350 + const example = {
21351 + innerBlocks: [
21352 + {
21353 + name: "core/paragraph",
21354 + attributes: {
21355 + content: (0,external_wp_i18n_namespaceObject.__)("One.")
21356 + }
21357 + },
21358 + {
21359 + name: "core/paragraph",
21360 + attributes: {
21361 + content: (0,external_wp_i18n_namespaceObject.__)("Two.")
21362 + }
21363 + },
21364 + {
21365 + name: "core/paragraph",
21366 + attributes: {
21367 + content: (0,external_wp_i18n_namespaceObject.__)("Three.")
21368 + }
21369 + },
21370 + {
21371 + name: "core/paragraph",
21372 + attributes: {
21373 + content: (0,external_wp_i18n_namespaceObject.__)("Four.")
21374 + }
21375 + },
21376 + {
21377 + name: "core/paragraph",
21378 + attributes: {
21379 + content: (0,external_wp_i18n_namespaceObject.__)("Five.")
21380 + }
21381 + },
21382 + {
21383 + name: "core/paragraph",
21384 + attributes: {
21385 + content: (0,external_wp_i18n_namespaceObject.__)("Six.")
21386 + }
21387 + }
21388 + ]
21389 + };
21390 + const group_variations_variations = [
21391 + {
21392 + name: "group",
21393 + title: (0,external_wp_i18n_namespaceObject.__)("Group"),
21394 + description: (0,external_wp_i18n_namespaceObject.__)("Gather blocks in a container."),
21395 + attributes: { layout: { type: "constrained" } },
21396 + isDefault: true,
21397 + scope: ["block", "inserter", "transform"],
21398 + icon: group_default
21399 + },
21400 + {
21401 + name: "group-row",
21402 + title: (0,external_wp_i18n_namespaceObject._x)("Row", "single horizontal line"),
21403 + description: (0,external_wp_i18n_namespaceObject.__)("Arrange blocks horizontally."),
21404 + attributes: { layout: { type: "flex", flexWrap: "nowrap" } },
21405 + scope: ["block", "inserter", "transform"],
21406 + isActive: ["layout.type"],
21407 + icon: row_default,
21408 + example
21409 + },
21410 + {
21411 + name: "group-stack",
21412 + title: (0,external_wp_i18n_namespaceObject.__)("Stack"),
21413 + description: (0,external_wp_i18n_namespaceObject.__)("Arrange blocks vertically."),
21414 + attributes: { layout: { type: "flex", orientation: "vertical" } },
21415 + scope: ["block", "inserter", "transform"],
21416 + isActive: ["layout.type", "layout.orientation"],
21417 + icon: stack_default,
21418 + example
21419 + },
21420 + {
21421 + name: "group-grid",
21422 + title: (0,external_wp_i18n_namespaceObject.__)("Grid"),
21423 + description: (0,external_wp_i18n_namespaceObject.__)("Arrange blocks in a grid."),
21424 + attributes: { layout: { type: "grid" } },
21425 + scope: ["block", "inserter", "transform"],
21426 + isActive: ["layout.type"],
21427 + icon: grid_default,
21428 + example
21429 + }
21430 + ];
21431 + var group_variations_variations_default = group_variations_variations;
21432 +
21433 +
21434 + ;// ./node_modules/@wordpress/block-library/build-module/group/index.js
21435 +
21436 +
21437 +
21438 +
21439 +
21440 +
21441 +
21442 +
21443 +
21444 + const { name: group_name } = group_block_namespaceObject;
21445 + const group_settings = {
21446 + icon: group_default,
21447 + example: {
21448 + attributes: {
21449 + layout: {
21450 + type: "constrained",
21451 + justifyContent: "center"
21452 + },
21453 + style: {
21454 + spacing: {
21455 + padding: {
21456 + top: "4em",
21457 + right: "3em",
21458 + bottom: "4em",
21459 + left: "3em"
21460 + }
21461 + }
21462 + }
21463 + },
21464 + innerBlocks: [
21465 + {
21466 + name: "core/heading",
21467 + attributes: {
21468 + content: (0,external_wp_i18n_namespaceObject.__)("La Mancha"),
21469 + textAlign: "center"
21470 + }
21471 + },
21472 + {
21473 + name: "core/paragraph",
21474 + attributes: {
21475 + align: "center",
21476 + content: (0,external_wp_i18n_namespaceObject.__)(
21477 + "In a village of La Mancha, the name of which I have no desire to call to mind, there lived not long since one of those gentlemen that keep a lance in the lance-rack, an old buckler, a lean hack, and a greyhound for coursing."
21478 + )
21479 + }
21480 + },
21481 + {
21482 + name: "core/spacer",
21483 + attributes: {
21484 + height: "10px"
21485 + }
21486 + },
21487 + {
21488 + name: "core/button",
21489 + attributes: {
21490 + text: (0,external_wp_i18n_namespaceObject.__)("Read more")
21491 + }
21492 + }
21493 + ],
21494 + viewportWidth: 600
21495 + },
21496 + transforms: group_transforms_transforms_default,
21497 + edit: group_edit_edit_default,
21498 + save: group_save_save,
21499 + deprecated: group_deprecated_deprecated_default,
21500 + variations: group_variations_variations_default
21501 + };
21502 + const group_init = () => initBlock({ name: group_name, metadata: group_block_namespaceObject, settings: group_settings });
21503 +
21504 +
21505 + ;// ./node_modules/@wordpress/icons/build-module/library/heading.js
21506 +
21507 +
21508 + var heading_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M6 5V18.5911L12 13.8473L18 18.5911V5H6Z" }) });
21509 +
21510 +
21511 + ;// ./node_modules/@wordpress/block-library/build-module/heading/deprecated.js
21512 +
21513 +
21514 +
21515 + const blockSupports = {
21516 + className: false,
21517 + anchor: true
21518 + };
21519 + const heading_deprecated_blockAttributes = {
21520 + align: {
21521 + type: "string"
21522 + },
21523 + content: {
21524 + type: "string",
21525 + source: "html",
21526 + selector: "h1,h2,h3,h4,h5,h6",
21527 + default: ""
21528 + },
21529 + level: {
21530 + type: "number",
21531 + default: 2
21532 + },
21533 + placeholder: {
21534 + type: "string"
21535 + }
21536 + };
21537 + const deprecated_migrateCustomColors = (attributes) => {
21538 + if (!attributes.customTextColor) {
21539 + return attributes;
21540 + }
21541 + const style = {
21542 + color: {
21543 + text: attributes.customTextColor
21544 + }
21545 + };
21546 + const { customTextColor, ...restAttributes } = attributes;
21547 + return {
21548 + ...restAttributes,
21549 + style
21550 + };
21551 + };
21552 + const TEXT_ALIGN_OPTIONS = ["left", "right", "center"];
21553 + const migrateTextAlign = (attributes) => {
21554 + const { align, ...rest } = attributes;
21555 + return TEXT_ALIGN_OPTIONS.includes(align) ? { ...rest, textAlign: align } : attributes;
21556 + };
21557 + const heading_deprecated_v1 = {
21558 + supports: blockSupports,
21559 + attributes: {
21560 + ...heading_deprecated_blockAttributes,
21561 + customTextColor: {
21562 + type: "string"
21563 + },
21564 + textColor: {
21565 + type: "string"
21566 + }
21567 + },
21568 + migrate: (attributes) => deprecated_migrateCustomColors(migrateTextAlign(attributes)),
21569 + save({ attributes }) {
21570 + const { align, level, content, textColor, customTextColor } = attributes;
21571 + const tagName = "h" + level;
21572 + const textClass = (0,external_wp_blockEditor_namespaceObject.getColorClassName)("color", textColor);
21573 + const className = dist_clsx({
21574 + [textClass]: textClass
21575 + });
21576 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
21577 + external_wp_blockEditor_namespaceObject.RichText.Content,
21578 + {
21579 + className: className ? className : void 0,
21580 + tagName,
21581 + style: {
21582 + textAlign: align,
21583 + color: textClass ? void 0 : customTextColor
21584 + },
21585 + value: content
21586 + }
21587 + );
21588 + }
21589 + };
21590 + const heading_deprecated_v2 = {
21591 + attributes: {
21592 + ...heading_deprecated_blockAttributes,
21593 + customTextColor: {
21594 + type: "string"
21595 + },
21596 + textColor: {
21597 + type: "string"
21598 + }
21599 + },
21600 + migrate: (attributes) => deprecated_migrateCustomColors(migrateTextAlign(attributes)),
21601 + save({ attributes }) {
21602 + const { align, content, customTextColor, level, textColor } = attributes;
21603 + const tagName = "h" + level;
21604 + const textClass = (0,external_wp_blockEditor_namespaceObject.getColorClassName)("color", textColor);
21605 + const className = dist_clsx({
21606 + [textClass]: textClass,
21607 + [`has-text-align-${align}`]: align
21608 + });
21609 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
21610 + external_wp_blockEditor_namespaceObject.RichText.Content,
21611 + {
21612 + className: className ? className : void 0,
21613 + tagName,
21614 + style: {
21615 + color: textClass ? void 0 : customTextColor
21616 + },
21617 + value: content
21618 + }
21619 + );
21620 + },
21621 + supports: blockSupports
21622 + };
21623 + const heading_deprecated_v3 = {
21624 + supports: blockSupports,
21625 + attributes: {
21626 + ...heading_deprecated_blockAttributes,
21627 + customTextColor: {
21628 + type: "string"
21629 + },
21630 + textColor: {
21631 + type: "string"
21632 + }
21633 + },
21634 + migrate: (attributes) => deprecated_migrateCustomColors(migrateTextAlign(attributes)),
21635 + save({ attributes }) {
21636 + const { align, content, customTextColor, level, textColor } = attributes;
21637 + const tagName = "h" + level;
21638 + const textClass = (0,external_wp_blockEditor_namespaceObject.getColorClassName)("color", textColor);
21639 + const className = dist_clsx({
21640 + [textClass]: textClass,
21641 + "has-text-color": textColor || customTextColor,
21642 + [`has-text-align-${align}`]: align
21643 + });
21644 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
21645 + external_wp_blockEditor_namespaceObject.RichText.Content,
21646 + {
21647 + className: className ? className : void 0,
21648 + tagName,
21649 + style: {
21650 + color: textClass ? void 0 : customTextColor
21651 + },
21652 + value: content
21653 + }
21654 + );
21655 + }
21656 + };
21657 + const heading_deprecated_v4 = {
21658 + supports: {
21659 + align: ["wide", "full"],
21660 + anchor: true,
21661 + className: false,
21662 + color: { link: true },
21663 + fontSize: true,
21664 + lineHeight: true,
21665 + __experimentalSelector: {
21666 + "core/heading/h1": "h1",
21667 + "core/heading/h2": "h2",
21668 + "core/heading/h3": "h3",
21669 + "core/heading/h4": "h4",
21670 + "core/heading/h5": "h5",
21671 + "core/heading/h6": "h6"
21672 + },
21673 + __unstablePasteTextInline: true
21674 + },
21675 + attributes: heading_deprecated_blockAttributes,
21676 + isEligible: ({ align }) => TEXT_ALIGN_OPTIONS.includes(align),
21677 + migrate: migrateTextAlign,
21678 + save({ attributes }) {
21679 + const { align, content, level } = attributes;
21680 + const TagName = "h" + level;
21681 + const className = dist_clsx({
21682 + [`has-text-align-${align}`]: align
21683 + });
21684 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(TagName, { ...external_wp_blockEditor_namespaceObject.useBlockProps.save({ className }), children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichText.Content, { value: content }) });
21685 + }
21686 + };
21687 + const heading_deprecated_v5 = {
21688 + supports: {
21689 + align: ["wide", "full"],
21690 + anchor: true,
21691 + className: false,
21692 + color: {
21693 + gradients: true,
21694 + link: true,
21695 + __experimentalDefaultControls: {
21696 + background: true,
21697 + text: true
21698 + }
21699 + },
21700 + spacing: {
21701 + margin: true,
21702 + padding: true
21703 + },
21704 + typography: {
21705 + fontSize: true,
21706 + lineHeight: true,
21707 + __experimentalFontFamily: true,
21708 + __experimentalFontStyle: true,
21709 + __experimentalFontWeight: true,
21710 + __experimentalLetterSpacing: true,
21711 + __experimentalTextTransform: true,
21712 + __experimentalTextDecoration: true,
21713 + __experimentalDefaultControls: {
21714 + fontSize: true,
21715 + fontAppearance: true,
21716 + textTransform: true
21717 + }
21718 + },
21719 + __experimentalSelector: "h1,h2,h3,h4,h5,h6",
21720 + __unstablePasteTextInline: true,
21721 + __experimentalSlashInserter: true
21722 + },
21723 + attributes: {
21724 + textAlign: {
21725 + type: "string"
21726 + },
21727 + content: {
21728 + type: "string",
21729 + source: "html",
21730 + selector: "h1,h2,h3,h4,h5,h6",
21731 + default: "",
21732 + role: "content"
21733 + },
21734 + level: {
21735 + type: "number",
21736 + default: 2
21737 + },
21738 + placeholder: {
21739 + type: "string"
21740 + }
21741 + },
21742 + save({ attributes }) {
21743 + const { textAlign, content, level } = attributes;
21744 + const TagName = "h" + level;
21745 + const className = dist_clsx({
21746 + [`has-text-align-${textAlign}`]: textAlign
21747 + });
21748 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(TagName, { ...external_wp_blockEditor_namespaceObject.useBlockProps.save({ className }), children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichText.Content, { value: content }) });
21749 + }
21750 + };
21751 + const heading_deprecated_deprecated = [heading_deprecated_v5, heading_deprecated_v4, heading_deprecated_v3, heading_deprecated_v2, heading_deprecated_v1];
21752 + var heading_deprecated_deprecated_default = heading_deprecated_deprecated;
21753 +
21754 +
21755 + ;// ./node_modules/@wordpress/block-library/build-module/heading/autogenerate-anchors.js
21756 +
21757 + const autogenerate_anchors_anchors = {};
21758 + const getTextWithoutMarkup = (text) => {
21759 + const dummyElement = document.createElement("div");
21760 + dummyElement.innerHTML = text;
21761 + return dummyElement.innerText;
21762 + };
21763 + const getSlug = (content) => {
21764 + return remove_accents_default()(getTextWithoutMarkup(content)).replace(/[^\p{L}\p{N}]+/gu, "-").toLowerCase().replace(/(^-+)|(-+$)/g, "");
21765 + };
21766 + const generateAnchor = (clientId, content) => {
21767 + const slug = getSlug(content);
21768 + if ("" === slug) {
21769 + return null;
21770 + }
21771 + delete autogenerate_anchors_anchors[clientId];
21772 + let anchor = slug;
21773 + let i = 0;
21774 + while (Object.values(autogenerate_anchors_anchors).includes(anchor)) {
21775 + i += 1;
21776 + anchor = slug + "-" + i;
21777 + }
21778 + return anchor;
21779 + };
21780 + const setAnchor = (clientId, anchor) => {
21781 + autogenerate_anchors_anchors[clientId] = anchor;
21782 + };
21783 +
21784 +
21785 + ;// ./node_modules/@wordpress/block-library/build-module/heading/edit.js
21786 +
21787 +
21788 +
21789 +
21790 +
21791 +
21792 +
21793 + function HeadingEdit({
21794 + attributes,
21795 + setAttributes,
21796 + mergeBlocks,
21797 + onReplace,
21798 + style,
21799 + clientId
21800 + }) {
21801 + const { textAlign, content, level, levelOptions, placeholder, anchor } = attributes;
21802 + const tagName = "h" + level;
21803 + const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)({
21804 + className: dist_clsx({
21805 + [`has-text-align-${textAlign}`]: textAlign
21806 + }),
21807 + style
21808 + });
21809 + const blockEditingMode = (0,external_wp_blockEditor_namespaceObject.useBlockEditingMode)();
21810 + const { canGenerateAnchors } = (0,external_wp_data_namespaceObject.useSelect)((select) => {
21811 + const { getGlobalBlockCount, getSettings } = select(external_wp_blockEditor_namespaceObject.store);
21812 + const settings = getSettings();
21813 + return {
21814 + canGenerateAnchors: !!settings.generateAnchors || getGlobalBlockCount("core/table-of-contents") > 0
21815 + };
21816 + }, []);
21817 + const { __unstableMarkNextChangeAsNotPersistent } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_blockEditor_namespaceObject.store);
21818 + (0,external_wp_element_namespaceObject.useEffect)(() => {
21819 + if (!canGenerateAnchors) {
21820 + return;
21821 + }
21822 + if (!anchor && content) {
21823 + __unstableMarkNextChangeAsNotPersistent();
21824 + setAttributes({
21825 + anchor: generateAnchor(clientId, content)
21826 + });
21827 + }
21828 + setAnchor(clientId, anchor);
21829 + return () => setAnchor(clientId, null);
21830 + }, [anchor, content, clientId, canGenerateAnchors]);
21831 + const onContentChange = (value) => {
21832 + const newAttrs = { content: value };
21833 + if (canGenerateAnchors && (!anchor || !value || generateAnchor(clientId, content) === anchor)) {
21834 + newAttrs.anchor = generateAnchor(clientId, value);
21835 + }
21836 + setAttributes(newAttrs);
21837 + };
21838 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
21839 + blockEditingMode === "default" && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_blockEditor_namespaceObject.BlockControls, { group: "block", children: [
21840 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
21841 + external_wp_blockEditor_namespaceObject.HeadingLevelDropdown,
21842 + {
21843 + value: level,
21844 + options: levelOptions,
21845 + onChange: (newLevel) => setAttributes({ level: newLevel })
21846 + }
21847 + ),
21848 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
21849 + external_wp_blockEditor_namespaceObject.AlignmentControl,
21850 + {
21851 + value: textAlign,
21852 + onChange: (nextAlign) => {
21853 + setAttributes({ textAlign: nextAlign });
21854 + }
21855 + }
21856 + )
21857 + ] }),
21858 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
21859 + external_wp_blockEditor_namespaceObject.RichText,
21860 + {
21861 + identifier: "content",
21862 + tagName,
21863 + value: content,
21864 + onChange: onContentChange,
21865 + onMerge: mergeBlocks,
21866 + onReplace,
21867 + onRemove: () => onReplace([]),
21868 + placeholder: placeholder || (0,external_wp_i18n_namespaceObject.__)("Heading"),
21869 + textAlign,
21870 + ...external_wp_element_namespaceObject.Platform.isNative && { deleteEnter: true },
21871 + ...blockProps
21872 + }
21873 + )
21874 + ] });
21875 + }
21876 + var heading_edit_edit_default = HeadingEdit;
21877 +
21878 +
21879 + ;// ./node_modules/@wordpress/block-library/build-module/heading/block.json
21880 + const heading_block_namespaceObject = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/heading","title":"Heading","category":"text","description":"Introduce new sections and organize content to help visitors (and search engines) understand the structure of your content.","keywords":["title","subtitle"],"textdomain":"default","attributes":{"textAlign":{"type":"string"},"content":{"type":"rich-text","source":"rich-text","selector":"h1,h2,h3,h4,h5,h6","role":"content"},"level":{"type":"number","default":2},"levelOptions":{"type":"array"},"placeholder":{"type":"string"}},"supports":{"align":["wide","full"],"anchor":true,"className":true,"splitting":true,"__experimentalBorder":{"color":true,"radius":true,"style":true,"width":true},"color":{"gradients":true,"link":true,"__experimentalDefaultControls":{"background":true,"text":true}},"spacing":{"margin":true,"padding":true,"__experimentalDefaultControls":{"margin":false,"padding":false}},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontStyle":true,"__experimentalFontWeight":true,"__experimentalLetterSpacing":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalWritingMode":true,"fitText":true,"__experimentalDefaultControls":{"fontSize":true}},"__unstablePasteTextInline":true,"__experimentalSlashInserter":true,"interactivity":{"clientNavigation":true}},"editorStyle":"wp-block-heading-editor","style":"wp-block-heading"}');
21881 + ;// ./node_modules/@wordpress/block-library/build-module/heading/save.js
21882 +
21883 +
21884 +
21885 + function heading_save_save({ attributes }) {
21886 + const { textAlign, content, level } = attributes;
21887 + const TagName = "h" + level;
21888 + const className = dist_clsx({
21889 + [`has-text-align-${textAlign}`]: textAlign
21890 + });
21891 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(TagName, { ...external_wp_blockEditor_namespaceObject.useBlockProps.save({ className }), children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichText.Content, { value: content }) });
21892 + }
21893 +
21894 +
21895 + ;// ./node_modules/@wordpress/block-library/build-module/heading/shared.js
21896 + function getLevelFromHeadingNodeName(nodeName) {
21897 + return Number(nodeName.substr(1));
21898 + }
21899 +
21900 +
21901 + ;// ./node_modules/@wordpress/block-library/build-module/heading/transforms.js
21902 +
21903 +
21904 +
21905 + const heading_transforms_transforms = {
21906 + from: [
21907 + {
21908 + type: "block",
21909 + isMultiBlock: true,
21910 + blocks: ["core/paragraph"],
21911 + transform: (attributes) => attributes.map((_attributes) => {
21912 + const { content, anchor, align: textAlign } = _attributes;
21913 + return (0,external_wp_blocks_namespaceObject.createBlock)("core/heading", {
21914 + ...getTransformedAttributes(
21915 + _attributes,
21916 + "core/heading",
21917 + ({ content: contentBinding }) => ({
21918 + content: contentBinding
21919 + })
21920 + ),
21921 + content,
21922 + anchor,
21923 + textAlign
21924 + });
21925 + })
21926 + },
21927 + {
21928 + type: "raw",
21929 + selector: "h1,h2,h3,h4,h5,h6",
21930 + schema: ({ phrasingContentSchema, isPaste }) => {
21931 + const schema = {
21932 + children: phrasingContentSchema,
21933 + attributes: isPaste ? [] : ["style", "id"]
21934 + };
21935 + return {
21936 + h1: schema,
21937 + h2: schema,
21938 + h3: schema,
21939 + h4: schema,
21940 + h5: schema,
21941 + h6: schema
21942 + };
21943 + },
21944 + transform(node) {
21945 + const attributes = (0,external_wp_blocks_namespaceObject.getBlockAttributes)(
21946 + "core/heading",
21947 + node.outerHTML
21948 + );
21949 + const { textAlign } = node.style || {};
21950 + attributes.level = getLevelFromHeadingNodeName(node.nodeName);
21951 + if (textAlign === "left" || textAlign === "center" || textAlign === "right") {
21952 + attributes.align = textAlign;
21953 + }
21954 + return (0,external_wp_blocks_namespaceObject.createBlock)("core/heading", attributes);
21955 + }
21956 + },
21957 + ...[1, 2, 3, 4, 5, 6].map((level) => ({
21958 + type: "prefix",
21959 + prefix: Array(level + 1).join("#"),
21960 + transform(content) {
21961 + return (0,external_wp_blocks_namespaceObject.createBlock)("core/heading", {
21962 + level,
21963 + content
21964 + });
21965 + }
21966 + })),
21967 + ...[1, 2, 3, 4, 5, 6].map((level) => ({
21968 + type: "enter",
21969 + regExp: new RegExp(`^/(h|H)${level}$`),
21970 + transform: () => (0,external_wp_blocks_namespaceObject.createBlock)("core/heading", { level })
21971 + }))
21972 + ],
21973 + to: [
21974 + {
21975 + type: "block",
21976 + isMultiBlock: true,
21977 + blocks: ["core/paragraph"],
21978 + transform: (attributes) => attributes.map((_attributes) => {
21979 + const { content, textAlign: align } = _attributes;
21980 + return (0,external_wp_blocks_namespaceObject.createBlock)("core/paragraph", {
21981 + ...getTransformedAttributes(
21982 + _attributes,
21983 + "core/paragraph",
21984 + ({ content: contentBinding }) => ({
21985 + content: contentBinding
21986 + })
21987 + ),
21988 + content,
21989 + align
21990 + });
21991 + })
21992 + }
21993 + ]
21994 + };
21995 + var heading_transforms_transforms_default = heading_transforms_transforms;
21996 +
21997 +
21998 + ;// ./node_modules/@wordpress/block-library/build-module/heading/variations.js
21999 +
22000 +
22001 +
22002 +
22003 + const heading_variations_variations = [
22004 + {
22005 + name: "heading",
22006 + title: (0,external_wp_i18n_namespaceObject.__)("Heading"),
22007 + description: (0,external_wp_i18n_namespaceObject.__)(
22008 + "Introduce new sections and organize content to help visitors (and search engines) understand the structure of your content."
22009 + ),
22010 + isDefault: true,
22011 + scope: ["inserter", "transform"],
22012 + attributes: { fitText: void 0 },
22013 + icon: heading_default
22014 + },
22015 + // There is a hardcoded workaround in packages/block-editor/src/store/selectors.js
22016 + // to make Stretchy variations appear as the last of their sections in the inserter.
22017 + {
22018 + name: "stretchy-heading",
22019 + title: (0,external_wp_i18n_namespaceObject.__)("Stretchy Heading"),
22020 + description: (0,external_wp_i18n_namespaceObject.__)("Heading that resizes to fit its container."),
22021 + icon: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "m3 18.6 6-4.7 6 4.7V5H3v13.6Zm16.2-9.8v1.5h2.2L17.7 14l1.1 1.1 3.7-3.7v2.2H24V8.8h-4.8Z" }) }),
22022 + attributes: { fitText: true },
22023 + scope: ["inserter", "transform"],
22024 + isActive: (blockAttributes) => blockAttributes.fitText === true
22025 + }
22026 + ];
22027 + var heading_variations_variations_default = heading_variations_variations;
22028 +
22029 +
22030 + ;// ./node_modules/@wordpress/block-library/build-module/heading/index.js
22031 +
22032 +
22033 +
22034 +
22035 +
22036 +
22037 +
22038 +
22039 +
22040 + const { name: heading_name } = heading_block_namespaceObject;
22041 + const heading_settings = {
22042 + icon: heading_default,
22043 + example: {
22044 + attributes: {
22045 + content: (0,external_wp_i18n_namespaceObject.__)("Code is Poetry"),
22046 + level: 2,
22047 + textAlign: "center"
22048 + }
22049 + },
22050 + __experimentalLabel(attributes, { context }) {
22051 + const { content, level } = attributes;
22052 + const customName = attributes?.metadata?.name;
22053 + const hasContent = content?.trim().length > 0;
22054 + if (context === "list-view" && (customName || hasContent)) {
22055 + return customName || content;
22056 + }
22057 + if (context === "accessibility") {
22058 + return !hasContent ? (0,external_wp_i18n_namespaceObject.sprintf)(
22059 + /* translators: accessibility text. %s: heading level. */
22060 + (0,external_wp_i18n_namespaceObject.__)("Level %s. Empty."),
22061 + level
22062 + ) : (0,external_wp_i18n_namespaceObject.sprintf)(
22063 + /* translators: accessibility text. 1: heading level. 2: heading content. */
22064 + (0,external_wp_i18n_namespaceObject.__)("Level %1$s. %2$s"),
22065 + level,
22066 + content
22067 + );
22068 + }
22069 + },
22070 + transforms: heading_transforms_transforms_default,
22071 + deprecated: heading_deprecated_deprecated_default,
22072 + merge(attributes, attributesToMerge) {
22073 + return {
22074 + content: (attributes.content || "") + (attributesToMerge.content || "")
22075 + };
22076 + },
22077 + edit: heading_edit_edit_default,
22078 + save: heading_save_save,
22079 + variations: heading_variations_variations_default
22080 + };
22081 + const heading_init = () => initBlock({ name: heading_name, metadata: heading_block_namespaceObject, settings: heading_settings });
22082 +
22083 +
22084 + ;// ./node_modules/@wordpress/icons/build-module/library/home.js
22085 +
22086 +
22087 + var home_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M12 4L4 7.9V20h16V7.9L12 4zm6.5 14.5H14V13h-4v5.5H5.5V8.8L12 5.7l6.5 3.1v9.7z" }) });
22088 +
22089 +
22090 + ;// ./node_modules/@wordpress/block-library/build-module/home-link/block.json
22091 + const home_link_block_namespaceObject = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/home-link","category":"design","parent":["core/navigation"],"title":"Home Link","description":"Create a link that always points to the homepage of the site. Usually not necessary if there is already a site title link present in the header.","textdomain":"default","attributes":{"label":{"type":"string","role":"content"}},"usesContext":["textColor","customTextColor","backgroundColor","customBackgroundColor","fontSize","customFontSize","style"],"supports":{"reusable":false,"html":false,"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"interactivity":{"clientNavigation":true}},"editorStyle":"wp-block-home-link-editor","style":"wp-block-home-link"}');
22092 + ;// ./node_modules/@wordpress/block-library/build-module/home-link/edit.js
22093 +
22094 +
22095 +
22096 +
22097 +
22098 +
22099 + const preventDefault = (event) => event.preventDefault();
22100 + function HomeEdit({ attributes, setAttributes, context }) {
22101 + const homeUrl = (0,external_wp_data_namespaceObject.useSelect)((select) => {
22102 + return select(external_wp_coreData_namespaceObject.store).getEntityRecord("root", "__unstableBase")?.home;
22103 + }, []);
22104 + const { textColor, backgroundColor, style } = context;
22105 + const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)({
22106 + className: dist_clsx("wp-block-navigation-item", {
22107 + "has-text-color": !!textColor || !!style?.color?.text,
22108 + [`has-${textColor}-color`]: !!textColor,
22109 + "has-background": !!backgroundColor || !!style?.color?.background,
22110 + [`has-${backgroundColor}-background-color`]: !!backgroundColor
22111 + }),
22112 + style: {
22113 + color: style?.color?.text,
22114 + backgroundColor: style?.color?.background
22115 + }
22116 + });
22117 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { ...blockProps, children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
22118 + "a",
22119 + {
22120 + className: "wp-block-home-link__content wp-block-navigation-item__content",
22121 + href: homeUrl,
22122 + onClick: preventDefault,
22123 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
22124 + external_wp_blockEditor_namespaceObject.RichText,
22125 + {
22126 + identifier: "label",
22127 + className: "wp-block-home-link__label",
22128 + value: attributes.label ?? (0,external_wp_i18n_namespaceObject.__)("Home"),
22129 + onChange: (labelValue) => {
22130 + setAttributes({ label: labelValue });
22131 + },
22132 + "aria-label": (0,external_wp_i18n_namespaceObject.__)("Home link text"),
22133 + placeholder: (0,external_wp_i18n_namespaceObject.__)("Add home link"),
22134 + withoutInteractiveFormatting: true
22135 + }
22136 + )
22137 + }
22138 + ) });
22139 + }
22140 +
22141 +
22142 + ;// ./node_modules/@wordpress/block-library/build-module/home-link/save.js
22143 +
22144 +
22145 + function home_link_save_save() {
22146 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, {});
22147 + }
22148 +
22149 +
22150 + ;// ./node_modules/@wordpress/block-library/build-module/home-link/index.js
22151 +
22152 +
22153 +
22154 +
22155 +
22156 +
22157 + const { name: home_link_name } = home_link_block_namespaceObject;
22158 + const home_link_settings = {
22159 + icon: home_default,
22160 + edit: HomeEdit,
22161 + save: home_link_save_save,
22162 + example: {
22163 + attributes: {
22164 + label: (0,external_wp_i18n_namespaceObject._x)("Home Link", "block example")
22165 + }
22166 + }
22167 + };
22168 + const home_link_init = () => initBlock({ name: home_link_name, metadata: home_link_block_namespaceObject, settings: home_link_settings });
22169 +
22170 +
22171 + ;// ./node_modules/@wordpress/icons/build-module/library/html.js
22172 +
22173 +
22174 + var html_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M4.8 11.4H2.1V9H1v6h1.1v-2.6h2.7V15h1.1V9H4.8v2.4zm1.9-1.3h1.7V15h1.1v-4.9h1.7V9H6.7v1.1zM16.2 9l-1.5 2.7L13.3 9h-.9l-.8 6h1.1l.5-4 1.5 2.8 1.5-2.8.5 4h1.1L17 9h-.8zm3.8 5V9h-1.1v6h3.6v-1H20z" }) });
22175 +
22176 +
22177 + ;// ./node_modules/@wordpress/block-library/build-module/html/preview.js
22178 +
22179 +
22180 +
22181 +
22182 +
22183 +
22184 + const DEFAULT_STYLES = `
22185 + html,body,:root {
22186 + margin: 0 !important;
22187 + padding: 0 !important;
22188 + overflow: visible !important;
22189 + min-height: auto !important;
22190 + }
22191 + `;
22192 + function HTMLEditPreview({ content, isSelected }) {
22193 + const settingStyles = (0,external_wp_data_namespaceObject.useSelect)(
22194 + (select) => select(external_wp_blockEditor_namespaceObject.store).getSettings().styles,
22195 + []
22196 + );
22197 + const styles = (0,external_wp_element_namespaceObject.useMemo)(
22198 + () => [
22199 + DEFAULT_STYLES,
22200 + ...(0,external_wp_blockEditor_namespaceObject.transformStyles)(
22201 + (settingStyles ?? []).filter((style) => style.css)
22202 + )
22203 + ],
22204 + [settingStyles]
22205 + );
22206 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
22207 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
22208 + external_wp_components_namespaceObject.SandBox,
22209 + {
22210 + html: content,
22211 + styles,
22212 + title: (0,external_wp_i18n_namespaceObject.__)("Custom HTML Preview"),
22213 + tabIndex: -1
22214 + }
22215 + ),
22216 + !isSelected && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { className: "block-library-html__preview-overlay" })
22217 + ] });
22218 + }
22219 +
22220 +
22221 + ;// ./node_modules/@wordpress/block-library/build-module/html/edit.js
22222 +
22223 +
22224 +
22225 +
22226 +
22227 +
22228 +
22229 +
22230 + function HTMLEdit({ attributes, setAttributes, isSelected }) {
22231 + const [isPreview, setIsPreview] = (0,external_wp_element_namespaceObject.useState)();
22232 + const isDisabled = (0,external_wp_element_namespaceObject.useContext)(external_wp_components_namespaceObject.Disabled.Context);
22233 + const instanceId = (0,external_wp_compose_namespaceObject.useInstanceId)(HTMLEdit, "html-edit-desc");
22234 + const isPreviewMode = (0,external_wp_data_namespaceObject.useSelect)((select) => {
22235 + return select(external_wp_blockEditor_namespaceObject.store).getSettings().isPreviewMode;
22236 + }, []);
22237 + function switchToPreview() {
22238 + setIsPreview(true);
22239 + }
22240 + function switchToHTML() {
22241 + setIsPreview(false);
22242 + }
22243 + const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)({
22244 + className: "block-library-html__edit",
22245 + "aria-describedby": isPreview ? instanceId : void 0
22246 + });
22247 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", { ...blockProps, children: [
22248 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockControls, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.ToolbarGroup, { children: [
22249 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
22250 + external_wp_components_namespaceObject.ToolbarButton,
22251 + {
22252 + isPressed: !isPreview,
22253 + onClick: switchToHTML,
22254 + children: "HTML"
22255 + }
22256 + ),
22257 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
22258 + external_wp_components_namespaceObject.ToolbarButton,
22259 + {
22260 + isPressed: isPreview,
22261 + onClick: switchToPreview,
22262 + children: (0,external_wp_i18n_namespaceObject.__)("Preview")
22263 + }
22264 + )
22265 + ] }) }),
22266 + isPreview || isPreviewMode || isDisabled ? /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
22267 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
22268 + HTMLEditPreview,
22269 + {
22270 + content: attributes.content,
22271 + isSelected
22272 + }
22273 + ),
22274 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.VisuallyHidden, { id: instanceId, children: (0,external_wp_i18n_namespaceObject.__)(
22275 + "HTML preview is not yet fully accessible. Please switch screen reader to virtualized mode to navigate the below iFrame."
22276 + ) })
22277 + ] }) : /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
22278 + external_wp_blockEditor_namespaceObject.PlainText,
22279 + {
22280 + value: attributes.content,
22281 + onChange: (content) => setAttributes({ content }),
22282 + placeholder: (0,external_wp_i18n_namespaceObject.__)("Write HTML\u2026"),
22283 + "aria-label": (0,external_wp_i18n_namespaceObject.__)("HTML")
22284 + }
22285 + )
22286 + ] });
22287 + }
22288 +
22289 +
22290 + ;// ./node_modules/@wordpress/block-library/build-module/html/block.json
22291 + const html_block_namespaceObject = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/html","title":"Custom HTML","category":"widgets","description":"Add custom HTML code and preview it as you edit.","keywords":["embed"],"textdomain":"default","attributes":{"content":{"type":"string","source":"raw","role":"content"}},"supports":{"customClassName":false,"className":false,"html":false,"interactivity":{"clientNavigation":true}},"editorStyle":"wp-block-html-editor"}');
22292 + ;// ./node_modules/@wordpress/block-library/build-module/html/save.js
22293 +
22294 +
22295 + function html_save_save({ attributes }) {
22296 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_element_namespaceObject.RawHTML, { children: attributes.content });
22297 + }
22298 +
22299 +
22300 + ;// ./node_modules/@wordpress/block-library/build-module/html/transforms.js
22301 +
22302 +
22303 + const html_transforms_transforms = {
22304 + from: [
22305 + {
22306 + type: "block",
22307 + blocks: ["core/code"],
22308 + transform: ({ content: html }) => {
22309 + return (0,external_wp_blocks_namespaceObject.createBlock)("core/html", {
22310 + // The code block may output HTML formatting, so convert it
22311 + // to plain text.
22312 + content: (0,external_wp_richText_namespaceObject.create)({ html }).text
22313 + });
22314 + }
22315 + }
22316 + ]
22317 + };
22318 + var html_transforms_transforms_default = html_transforms_transforms;
22319 +
22320 +
22321 + ;// ./node_modules/@wordpress/block-library/build-module/html/index.js
22322 +
22323 +
22324 +
22325 +
22326 +
22327 +
22328 +
22329 + const { name: html_name } = html_block_namespaceObject;
22330 + const html_settings = {
22331 + icon: html_default,
22332 + example: {
22333 + attributes: {
22334 + content: "<marquee>" + (0,external_wp_i18n_namespaceObject.__)("Welcome to the wonderful world of blocks\u2026") + "</marquee>"
22335 + }
22336 + },
22337 + edit: HTMLEdit,
22338 + save: html_save_save,
22339 + transforms: html_transforms_transforms_default
22340 + };
22341 + const html_init = () => initBlock({ name: html_name, metadata: html_block_namespaceObject, settings: html_settings });
22342 +
22343 +
22344 + ;// ./node_modules/@wordpress/block-library/build-module/image/deprecated.js
22345 +
22346 +
22347 +
22348 + const image_deprecated_v1 = {
22349 + attributes: {
22350 + url: {
22351 + type: "string",
22352 + source: "attribute",
22353 + selector: "img",
22354 + attribute: "src"
22355 + },
22356 + alt: {
22357 + type: "string",
22358 + source: "attribute",
22359 + selector: "img",
22360 + attribute: "alt",
22361 + default: ""
22362 + },
22363 + caption: {
22364 + type: "array",
22365 + source: "children",
22366 + selector: "figcaption"
22367 + },
22368 + href: {
22369 + type: "string",
22370 + source: "attribute",
22371 + selector: "a",
22372 + attribute: "href"
22373 + },
22374 + id: {
22375 + type: "number"
22376 + },
22377 + align: {
22378 + type: "string"
22379 + },
22380 + width: {
22381 + type: "number"
22382 + },
22383 + height: {
22384 + type: "number"
22385 + }
22386 + },
22387 + save({ attributes }) {
22388 + const { url, alt, caption, align, href, width, height } = attributes;
22389 + const extraImageProps = width || height ? { width, height } : {};
22390 + const image = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("img", { src: url, alt, ...extraImageProps });
22391 + let figureStyle = {};
22392 + if (width) {
22393 + figureStyle = { width };
22394 + } else if (align === "left" || align === "right") {
22395 + figureStyle = { maxWidth: "50%" };
22396 + }
22397 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(
22398 + "figure",
22399 + {
22400 + className: align ? `align${align}` : null,
22401 + style: figureStyle,
22402 + children: [
22403 + href ? /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("a", { href, children: image }) : image,
22404 + !external_wp_blockEditor_namespaceObject.RichText.isEmpty(caption) && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichText.Content, { tagName: "figcaption", value: caption })
22405 + ]
22406 + }
22407 + );
22408 + }
22409 + };
22410 + const image_deprecated_v2 = {
22411 + attributes: {
22412 + url: {
22413 + type: "string",
22414 + source: "attribute",
22415 + selector: "img",
22416 + attribute: "src"
22417 + },
22418 + alt: {
22419 + type: "string",
22420 + source: "attribute",
22421 + selector: "img",
22422 + attribute: "alt",
22423 + default: ""
22424 + },
22425 + caption: {
22426 + type: "array",
22427 + source: "children",
22428 + selector: "figcaption"
22429 + },
22430 + href: {
22431 + type: "string",
22432 + source: "attribute",
22433 + selector: "a",
22434 + attribute: "href"
22435 + },
22436 + id: {
22437 + type: "number"
22438 + },
22439 + align: {
22440 + type: "string"
22441 + },
22442 + width: {
22443 + type: "number"
22444 + },
22445 + height: {
22446 + type: "number"
22447 + }
22448 + },
22449 + save({ attributes }) {
22450 + const { url, alt, caption, align, href, width, height, id } = attributes;
22451 + const image = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
22452 + "img",
22453 + {
22454 + src: url,
22455 + alt,
22456 + className: id ? `wp-image-${id}` : null,
22457 + width,
22458 + height
22459 + }
22460 + );
22461 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("figure", { className: align ? `align${align}` : null, children: [
22462 + href ? /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("a", { href, children: image }) : image,
22463 + !external_wp_blockEditor_namespaceObject.RichText.isEmpty(caption) && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichText.Content, { tagName: "figcaption", value: caption })
22464 + ] });
22465 + }
22466 + };
22467 + const image_deprecated_v3 = {
22468 + attributes: {
22469 + url: {
22470 + type: "string",
22471 + source: "attribute",
22472 + selector: "img",
22473 + attribute: "src"
22474 + },
22475 + alt: {
22476 + type: "string",
22477 + source: "attribute",
22478 + selector: "img",
22479 + attribute: "alt",
22480 + default: ""
22481 + },
22482 + caption: {
22483 + type: "array",
22484 + source: "children",
22485 + selector: "figcaption"
22486 + },
22487 + href: {
22488 + type: "string",
22489 + source: "attribute",
22490 + selector: "figure > a",
22491 + attribute: "href"
22492 + },
22493 + id: {
22494 + type: "number"
22495 + },
22496 + align: {
22497 + type: "string"
22498 + },
22499 + width: {
22500 + type: "number"
22501 + },
22502 + height: {
22503 + type: "number"
22504 + },
22505 + linkDestination: {
22506 + type: "string",
22507 + default: "none"
22508 + }
22509 + },
22510 + save({ attributes }) {
22511 + const { url, alt, caption, align, href, width, height, id } = attributes;
22512 + const classes = dist_clsx({
22513 + [`align${align}`]: align,
22514 + "is-resized": width || height
22515 + });
22516 + const image = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
22517 + "img",
22518 + {
22519 + src: url,
22520 + alt,
22521 + className: id ? `wp-image-${id}` : null,
22522 + width,
22523 + height
22524 + }
22525 + );
22526 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("figure", { className: classes, children: [
22527 + href ? /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("a", { href, children: image }) : image,
22528 + !external_wp_blockEditor_namespaceObject.RichText.isEmpty(caption) && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichText.Content, { tagName: "figcaption", value: caption })
22529 + ] });
22530 + }
22531 + };
22532 + const image_deprecated_v4 = {
22533 + attributes: {
22534 + align: {
22535 + type: "string"
22536 + },
22537 + url: {
22538 + type: "string",
22539 + source: "attribute",
22540 + selector: "img",
22541 + attribute: "src"
22542 + },
22543 + alt: {
22544 + type: "string",
22545 + source: "attribute",
22546 + selector: "img",
22547 + attribute: "alt",
22548 + default: ""
22549 + },
22550 + caption: {
22551 + type: "string",
22552 + source: "html",
22553 + selector: "figcaption"
22554 + },
22555 + title: {
22556 + type: "string",
22557 + source: "attribute",
22558 + selector: "img",
22559 + attribute: "title"
22560 + },
22561 + href: {
22562 + type: "string",
22563 + source: "attribute",
22564 + selector: "figure > a",
22565 + attribute: "href"
22566 + },
22567 + rel: {
22568 + type: "string",
22569 + source: "attribute",
22570 + selector: "figure > a",
22571 + attribute: "rel"
22572 + },
22573 + linkClass: {
22574 + type: "string",
22575 + source: "attribute",
22576 + selector: "figure > a",
22577 + attribute: "class"
22578 + },
22579 + id: {
22580 + type: "number"
22581 + },
22582 + width: {
22583 + type: "number"
22584 + },
22585 + height: {
22586 + type: "number"
22587 + },
22588 + sizeSlug: {
22589 + type: "string"
22590 + },
22591 + linkDestination: {
22592 + type: "string"
22593 + },
22594 + linkTarget: {
22595 + type: "string",
22596 + source: "attribute",
22597 + selector: "figure > a",
22598 + attribute: "target"
22599 + }
22600 + },
22601 + supports: {
22602 + anchor: true
22603 + },
22604 + save({ attributes }) {
22605 + const {
22606 + url,
22607 + alt,
22608 + caption,
22609 + align,
22610 + href,
22611 + rel,
22612 + linkClass,
22613 + width,
22614 + height,
22615 + id,
22616 + linkTarget,
22617 + sizeSlug,
22618 + title
22619 + } = attributes;
22620 + const newRel = !rel ? void 0 : rel;
22621 + const classes = dist_clsx({
22622 + [`align${align}`]: align,
22623 + [`size-${sizeSlug}`]: sizeSlug,
22624 + "is-resized": width || height
22625 + });
22626 + const image = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
22627 + "img",
22628 + {
22629 + src: url,
22630 + alt,
22631 + className: id ? `wp-image-${id}` : null,
22632 + width,
22633 + height,
22634 + title
22635 + }
22636 + );
22637 + const figure = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
22638 + href ? /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
22639 + "a",
22640 + {
22641 + className: linkClass,
22642 + href,
22643 + target: linkTarget,
22644 + rel: newRel,
22645 + children: image
22646 + }
22647 + ) : image,
22648 + !external_wp_blockEditor_namespaceObject.RichText.isEmpty(caption) && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichText.Content, { tagName: "figcaption", value: caption })
22649 + ] });
22650 + if ("left" === align || "right" === align || "center" === align) {
22651 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { ...external_wp_blockEditor_namespaceObject.useBlockProps.save(), children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("figure", { className: classes, children: figure }) });
22652 + }
22653 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("figure", { ...external_wp_blockEditor_namespaceObject.useBlockProps.save({ className: classes }), children: figure });
22654 + }
22655 + };
22656 + const image_deprecated_v5 = {
22657 + attributes: {
22658 + align: {
22659 + type: "string"
22660 + },
22661 + url: {
22662 + type: "string",
22663 + source: "attribute",
22664 + selector: "img",
22665 + attribute: "src"
22666 + },
22667 + alt: {
22668 + type: "string",
22669 + source: "attribute",
22670 + selector: "img",
22671 + attribute: "alt",
22672 + default: ""
22673 + },
22674 + caption: {
22675 + type: "string",
22676 + source: "html",
22677 + selector: "figcaption"
22678 + },
22679 + title: {
22680 + type: "string",
22681 + source: "attribute",
22682 + selector: "img",
22683 + attribute: "title"
22684 + },
22685 + href: {
22686 + type: "string",
22687 + source: "attribute",
22688 + selector: "figure > a",
22689 + attribute: "href"
22690 + },
22691 + rel: {
22692 + type: "string",
22693 + source: "attribute",
22694 + selector: "figure > a",
22695 + attribute: "rel"
22696 + },
22697 + linkClass: {
22698 + type: "string",
22699 + source: "attribute",
22700 + selector: "figure > a",
22701 + attribute: "class"
22702 + },
22703 + id: {
22704 + type: "number"
22705 + },
22706 + width: {
22707 + type: "number"
22708 + },
22709 + height: {
22710 + type: "number"
22711 + },
22712 + sizeSlug: {
22713 + type: "string"
22714 + },
22715 + linkDestination: {
22716 + type: "string"
22717 + },
22718 + linkTarget: {
22719 + type: "string",
22720 + source: "attribute",
22721 + selector: "figure > a",
22722 + attribute: "target"
22723 + }
22724 + },
22725 + supports: {
22726 + anchor: true,
22727 + color: {
22728 + __experimentalDuotone: "img",
22729 + text: false,
22730 + background: false
22731 + },
22732 + __experimentalBorder: {
22733 + radius: true,
22734 + __experimentalDefaultControls: {
22735 + radius: true
22736 + }
22737 + },
22738 + __experimentalStyle: {
22739 + spacing: {
22740 + margin: "0 0 1em 0"
22741 + }
22742 + }
22743 + },
22744 + save({ attributes }) {
22745 + const {
22746 + url,
22747 + alt,
22748 + caption,
22749 + align,
22750 + href,
22751 + rel,
22752 + linkClass,
22753 + width,
22754 + height,
22755 + id,
22756 + linkTarget,
22757 + sizeSlug,
22758 + title
22759 + } = attributes;
22760 + const newRel = !rel ? void 0 : rel;
22761 + const classes = dist_clsx({
22762 + [`align${align}`]: align,
22763 + [`size-${sizeSlug}`]: sizeSlug,
22764 + "is-resized": width || height
22765 + });
22766 + const image = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
22767 + "img",
22768 + {
22769 + src: url,
22770 + alt,
22771 + className: id ? `wp-image-${id}` : null,
22772 + width,
22773 + height,
22774 + title
22775 + }
22776 + );
22777 + const figure = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
22778 + href ? /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
22779 + "a",
22780 + {
22781 + className: linkClass,
22782 + href,
22783 + target: linkTarget,
22784 + rel: newRel,
22785 + children: image
22786 + }
22787 + ) : image,
22788 + !external_wp_blockEditor_namespaceObject.RichText.isEmpty(caption) && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichText.Content, { tagName: "figcaption", value: caption })
22789 + ] });
22790 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("figure", { ...external_wp_blockEditor_namespaceObject.useBlockProps.save({ className: classes }), children: figure });
22791 + }
22792 + };
22793 + const image_deprecated_v6 = {
22794 + attributes: {
22795 + align: {
22796 + type: "string"
22797 + },
22798 + url: {
22799 + type: "string",
22800 + source: "attribute",
22801 + selector: "img",
22802 + attribute: "src",
22803 + role: "content"
22804 + },
22805 + alt: {
22806 + type: "string",
22807 + source: "attribute",
22808 + selector: "img",
22809 + attribute: "alt",
22810 + default: "",
22811 + role: "content"
22812 + },
22813 + caption: {
22814 + type: "string",
22815 + source: "html",
22816 + selector: "figcaption",
22817 + role: "content"
22818 + },
22819 + title: {
22820 + type: "string",
22821 + source: "attribute",
22822 + selector: "img",
22823 + attribute: "title",
22824 + role: "content"
22825 + },
22826 + href: {
22827 + type: "string",
22828 + source: "attribute",
22829 + selector: "figure > a",
22830 + attribute: "href",
22831 + role: "content"
22832 + },
22833 + rel: {
22834 + type: "string",
22835 + source: "attribute",
22836 + selector: "figure > a",
22837 + attribute: "rel"
22838 + },
22839 + linkClass: {
22840 + type: "string",
22841 + source: "attribute",
22842 + selector: "figure > a",
22843 + attribute: "class"
22844 + },
22845 + id: {
22846 + type: "number",
22847 + role: "content"
22848 + },
22849 + width: {
22850 + type: "number"
22851 + },
22852 + height: {
22853 + type: "number"
22854 + },
22855 + aspectRatio: {
22856 + type: "string"
22857 + },
22858 + scale: {
22859 + type: "string"
22860 + },
22861 + sizeSlug: {
22862 + type: "string"
22863 + },
22864 + linkDestination: {
22865 + type: "string"
22866 + },
22867 + linkTarget: {
22868 + type: "string",
22869 + source: "attribute",
22870 + selector: "figure > a",
22871 + attribute: "target"
22872 + }
22873 + },
22874 + supports: {
22875 + anchor: true,
22876 + color: {
22877 + text: false,
22878 + background: false
22879 + },
22880 + filter: {
22881 + duotone: true
22882 + },
22883 + __experimentalBorder: {
22884 + color: true,
22885 + radius: true,
22886 + width: true,
22887 + __experimentalSkipSerialization: true,
22888 + __experimentalDefaultControls: {
22889 + color: true,
22890 + radius: true,
22891 + width: true
22892 + }
22893 + }
22894 + },
22895 + migrate(attributes) {
22896 + const { height, width } = attributes;
22897 + return {
22898 + ...attributes,
22899 + width: typeof width === "number" ? `${width}px` : width,
22900 + height: typeof height === "number" ? `${height}px` : height
22901 + };
22902 + },
22903 + save({ attributes }) {
22904 + const {
22905 + url,
22906 + alt,
22907 + caption,
22908 + align,
22909 + href,
22910 + rel,
22911 + linkClass,
22912 + width,
22913 + height,
22914 + aspectRatio,
22915 + scale,
22916 + id,
22917 + linkTarget,
22918 + sizeSlug,
22919 + title
22920 + } = attributes;
22921 + const newRel = !rel ? void 0 : rel;
22922 + const borderProps = (0,external_wp_blockEditor_namespaceObject.__experimentalGetBorderClassesAndStyles)(attributes);
22923 + const classes = dist_clsx({
22924 + [`align${align}`]: align,
22925 + [`size-${sizeSlug}`]: sizeSlug,
22926 + "is-resized": width || height,
22927 + "has-custom-border": !!borderProps.className || borderProps.style && Object.keys(borderProps.style).length > 0
22928 + });
22929 + const imageClasses = dist_clsx(borderProps.className, {
22930 + [`wp-image-${id}`]: !!id
22931 + });
22932 + const image = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
22933 + "img",
22934 + {
22935 + src: url,
22936 + alt,
22937 + className: imageClasses || void 0,
22938 + style: {
22939 + ...borderProps.style,
22940 + aspectRatio,
22941 + objectFit: scale
22942 + },
22943 + width,
22944 + height,
22945 + title
22946 + }
22947 + );
22948 + const figure = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
22949 + href ? /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
22950 + "a",
22951 + {
22952 + className: linkClass,
22953 + href,
22954 + target: linkTarget,
22955 + rel: newRel,
22956 + children: image
22957 + }
22958 + ) : image,
22959 + !external_wp_blockEditor_namespaceObject.RichText.isEmpty(caption) && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
22960 + external_wp_blockEditor_namespaceObject.RichText.Content,
22961 + {
22962 + className: (0,external_wp_blockEditor_namespaceObject.__experimentalGetElementClassName)(
22963 + "caption"
22964 + ),
22965 + tagName: "figcaption",
22966 + value: caption
22967 + }
22968 + )
22969 + ] });
22970 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("figure", { ...external_wp_blockEditor_namespaceObject.useBlockProps.save({ className: classes }), children: figure });
22971 + }
22972 + };
22973 + const image_deprecated_v7 = {
22974 + attributes: {
22975 + align: {
22976 + type: "string"
22977 + },
22978 + url: {
22979 + type: "string",
22980 + source: "attribute",
22981 + selector: "img",
22982 + attribute: "src",
22983 + role: "content"
22984 + },
22985 + alt: {
22986 + type: "string",
22987 + source: "attribute",
22988 + selector: "img",
22989 + attribute: "alt",
22990 + default: "",
22991 + role: "content"
22992 + },
22993 + caption: {
22994 + type: "string",
22995 + source: "html",
22996 + selector: "figcaption",
22997 + role: "content"
22998 + },
22999 + title: {
23000 + type: "string",
23001 + source: "attribute",
23002 + selector: "img",
23003 + attribute: "title",
23004 + role: "content"
23005 + },
23006 + href: {
23007 + type: "string",
23008 + source: "attribute",
23009 + selector: "figure > a",
23010 + attribute: "href",
23011 + role: "content"
23012 + },
23013 + rel: {
23014 + type: "string",
23015 + source: "attribute",
23016 + selector: "figure > a",
23017 + attribute: "rel"
23018 + },
23019 + linkClass: {
23020 + type: "string",
23021 + source: "attribute",
23022 + selector: "figure > a",
23023 + attribute: "class"
23024 + },
23025 + id: {
23026 + type: "number",
23027 + role: "content"
23028 + },
23029 + width: {
23030 + type: "number"
23031 + },
23032 + height: {
23033 + type: "number"
23034 + },
23035 + aspectRatio: {
23036 + type: "string"
23037 + },
23038 + scale: {
23039 + type: "string"
23040 + },
23041 + sizeSlug: {
23042 + type: "string"
23043 + },
23044 + linkDestination: {
23045 + type: "string"
23046 + },
23047 + linkTarget: {
23048 + type: "string",
23049 + source: "attribute",
23050 + selector: "figure > a",
23051 + attribute: "target"
23052 + }
23053 + },
23054 + supports: {
23055 + anchor: true,
23056 + color: {
23057 + text: false,
23058 + background: false
23059 + },
23060 + filter: {
23061 + duotone: true
23062 + },
23063 + __experimentalBorder: {
23064 + color: true,
23065 + radius: true,
23066 + width: true,
23067 + __experimentalSkipSerialization: true,
23068 + __experimentalDefaultControls: {
23069 + color: true,
23070 + radius: true,
23071 + width: true
23072 + }
23073 + }
23074 + },
23075 + migrate({ width, height, ...attributes }) {
23076 + return {
23077 + ...attributes,
23078 + width: `${width}px`,
23079 + height: `${height}px`
23080 + };
23081 + },
23082 + save({ attributes }) {
23083 + const {
23084 + url,
23085 + alt,
23086 + caption,
23087 + align,
23088 + href,
23089 + rel,
23090 + linkClass,
23091 + width,
23092 + height,
23093 + aspectRatio,
23094 + scale,
23095 + id,
23096 + linkTarget,
23097 + sizeSlug,
23098 + title
23099 + } = attributes;
23100 + const newRel = !rel ? void 0 : rel;
23101 + const borderProps = (0,external_wp_blockEditor_namespaceObject.__experimentalGetBorderClassesAndStyles)(attributes);
23102 + const classes = dist_clsx({
23103 + [`align${align}`]: align,
23104 + [`size-${sizeSlug}`]: sizeSlug,
23105 + "is-resized": width || height,
23106 + "has-custom-border": !!borderProps.className || borderProps.style && Object.keys(borderProps.style).length > 0
23107 + });
23108 + const imageClasses = dist_clsx(borderProps.className, {
23109 + [`wp-image-${id}`]: !!id
23110 + });
23111 + const image = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
23112 + "img",
23113 + {
23114 + src: url,
23115 + alt,
23116 + className: imageClasses || void 0,
23117 + style: {
23118 + ...borderProps.style,
23119 + aspectRatio,
23120 + objectFit: scale,
23121 + width,
23122 + height
23123 + },
23124 + width,
23125 + height,
23126 + title
23127 + }
23128 + );
23129 + const figure = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
23130 + href ? /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
23131 + "a",
23132 + {
23133 + className: linkClass,
23134 + href,
23135 + target: linkTarget,
23136 + rel: newRel,
23137 + children: image
23138 + }
23139 + ) : image,
23140 + !external_wp_blockEditor_namespaceObject.RichText.isEmpty(caption) && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
23141 + external_wp_blockEditor_namespaceObject.RichText.Content,
23142 + {
23143 + className: (0,external_wp_blockEditor_namespaceObject.__experimentalGetElementClassName)(
23144 + "caption"
23145 + ),
23146 + tagName: "figcaption",
23147 + value: caption
23148 + }
23149 + )
23150 + ] });
23151 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("figure", { ...external_wp_blockEditor_namespaceObject.useBlockProps.save({ className: classes }), children: figure });
23152 + }
23153 + };
23154 + const deprecated_v8 = {
23155 + attributes: {
23156 + align: {
23157 + type: "string"
23158 + },
23159 + behaviors: {
23160 + type: "object"
23161 + },
23162 + url: {
23163 + type: "string",
23164 + source: "attribute",
23165 + selector: "img",
23166 + attribute: "src",
23167 + role: "content"
23168 + },
23169 + alt: {
23170 + type: "string",
23171 + source: "attribute",
23172 + selector: "img",
23173 + attribute: "alt",
23174 + default: "",
23175 + role: "content"
23176 + },
23177 + caption: {
23178 + type: "string",
23179 + source: "html",
23180 + selector: "figcaption",
23181 + role: "content"
23182 + },
23183 + title: {
23184 + type: "string",
23185 + source: "attribute",
23186 + selector: "img",
23187 + attribute: "title",
23188 + role: "content"
23189 + },
23190 + href: {
23191 + type: "string",
23192 + source: "attribute",
23193 + selector: "figure > a",
23194 + attribute: "href",
23195 + role: "content"
23196 + },
23197 + rel: {
23198 + type: "string",
23199 + source: "attribute",
23200 + selector: "figure > a",
23201 + attribute: "rel"
23202 + },
23203 + linkClass: {
23204 + type: "string",
23205 + source: "attribute",
23206 + selector: "figure > a",
23207 + attribute: "class"
23208 + },
23209 + id: {
23210 + type: "number",
23211 + role: "content"
23212 + },
23213 + width: {
23214 + type: "string"
23215 + },
23216 + height: {
23217 + type: "string"
23218 + },
23219 + aspectRatio: {
23220 + type: "string"
23221 + },
23222 + scale: {
23223 + type: "string"
23224 + },
23225 + sizeSlug: {
23226 + type: "string"
23227 + },
23228 + linkDestination: {
23229 + type: "string"
23230 + },
23231 + linkTarget: {
23232 + type: "string",
23233 + source: "attribute",
23234 + selector: "figure > a",
23235 + attribute: "target"
23236 + }
23237 + },
23238 + supports: {
23239 + anchor: true,
23240 + color: {
23241 + text: false,
23242 + background: false
23243 + },
23244 + filter: {
23245 + duotone: true
23246 + },
23247 + __experimentalBorder: {
23248 + color: true,
23249 + radius: true,
23250 + width: true,
23251 + __experimentalSkipSerialization: true,
23252 + __experimentalDefaultControls: {
23253 + color: true,
23254 + radius: true,
23255 + width: true
23256 + }
23257 + }
23258 + },
23259 + migrate({ width, height, ...attributes }) {
23260 + if (!attributes.behaviors?.lightbox) {
23261 + return attributes;
23262 + }
23263 + const {
23264 + behaviors: {
23265 + lightbox: { enabled }
23266 + }
23267 + } = attributes;
23268 + const newAttributes = {
23269 + ...attributes,
23270 + lightbox: {
23271 + enabled
23272 + }
23273 + };
23274 + delete newAttributes.behaviors;
23275 + return newAttributes;
23276 + },
23277 + isEligible(attributes) {
23278 + return !!attributes.behaviors;
23279 + },
23280 + save({ attributes }) {
23281 + const {
23282 + url,
23283 + alt,
23284 + caption,
23285 + align,
23286 + href,
23287 + rel,
23288 + linkClass,
23289 + width,
23290 + height,
23291 + aspectRatio,
23292 + scale,
23293 + id,
23294 + linkTarget,
23295 + sizeSlug,
23296 + title
23297 + } = attributes;
23298 + const newRel = !rel ? void 0 : rel;
23299 + const borderProps = (0,external_wp_blockEditor_namespaceObject.__experimentalGetBorderClassesAndStyles)(attributes);
23300 + const classes = dist_clsx({
23301 + [`align${align}`]: align,
23302 + [`size-${sizeSlug}`]: sizeSlug,
23303 + "is-resized": width || height,
23304 + "has-custom-border": !!borderProps.className || borderProps.style && Object.keys(borderProps.style).length > 0
23305 + });
23306 + const imageClasses = dist_clsx(borderProps.className, {
23307 + [`wp-image-${id}`]: !!id
23308 + });
23309 + const image = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
23310 + "img",
23311 + {
23312 + src: url,
23313 + alt,
23314 + className: imageClasses || void 0,
23315 + style: {
23316 + ...borderProps.style,
23317 + aspectRatio,
23318 + objectFit: scale,
23319 + width,
23320 + height
23321 + },
23322 + title
23323 + }
23324 + );
23325 + const figure = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
23326 + href ? /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
23327 + "a",
23328 + {
23329 + className: linkClass,
23330 + href,
23331 + target: linkTarget,
23332 + rel: newRel,
23333 + children: image
23334 + }
23335 + ) : image,
23336 + !external_wp_blockEditor_namespaceObject.RichText.isEmpty(caption) && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
23337 + external_wp_blockEditor_namespaceObject.RichText.Content,
23338 + {
23339 + className: (0,external_wp_blockEditor_namespaceObject.__experimentalGetElementClassName)(
23340 + "caption"
23341 + ),
23342 + tagName: "figcaption",
23343 + value: caption
23344 + }
23345 + )
23346 + ] });
23347 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("figure", { ...external_wp_blockEditor_namespaceObject.useBlockProps.save({ className: classes }), children: figure });
23348 + }
23349 + };
23350 + var image_deprecated_deprecated_default = [deprecated_v8, image_deprecated_v7, image_deprecated_v6, image_deprecated_v5, image_deprecated_v4, image_deprecated_v3, image_deprecated_v2, image_deprecated_v1];
23351 +
23352 +
23353 + ;// ./node_modules/@wordpress/icons/build-module/library/plugins.js
23354 +
23355 +
23356 + var plugins_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M10.5 4v4h3V4H15v4h1.5a1 1 0 011 1v4l-3 4v2a1 1 0 01-1 1h-3a1 1 0 01-1-1v-2l-3-4V9a1 1 0 011-1H9V4h1.5zm.5 12.5v2h2v-2l3-4v-3H8v3l3 4z" }) });
23357 +
23358 +
23359 + ;// ./node_modules/@wordpress/icons/build-module/library/chevron-down.js
23360 +
23361 +
23362 + var chevron_down_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M17.5 11.6L12 16l-5.5-4.4.9-1.2L12 14l4.5-3.6 1 1.2z" }) });
23363 +
23364 +
23365 + ;// ./node_modules/@wordpress/icons/build-module/library/crop.js
23366 +
23367 +
23368 + var crop_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M18 20v-2h2v-1.5H7.75a.25.25 0 0 1-.25-.25V4H6v2H4v1.5h2v8.75c0 .966.784 1.75 1.75 1.75h8.75v2H18ZM9.273 7.5h6.977a.25.25 0 0 1 .25.25v6.977H18V7.75A1.75 1.75 0 0 0 16.25 6H9.273v1.5Z" }) });
23369 +
23370 +
23371 + ;// ./node_modules/@wordpress/icons/build-module/library/overlay-text.js
23372 +
23373 +
23374 + var overlay_text_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M18 4H6c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12-9.8c.4 0 .8-.3.9-.7l1.1-3h3.6l.5 1.7h1.9L13 9h-2.2l-3.4 9.5H6c-.3 0-.5-.2-.5-.5V6c0-.3.2-.5.5-.5h12c.3 0 .5.2.5.5v12H20V6c0-1.1-.9-2-2-2zm-6 7l1.4 3.9h-2.7L12 11z" }) });
23375 +
23376 +
23377 + ;// ./node_modules/@wordpress/icons/build-module/library/upload.js
23378 +
23379 +
23380 + var upload_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M18.5 15v3.5H13V6.7l4.5 4.1 1-1.1-6.2-5.8-5.8 5.8 1 1.1 4-4v11.7h-6V15H4v5h16v-5z" }) });
23381 +
23382 +
23383 + ;// ./node_modules/@wordpress/block-library/build-module/image/image.js
23384 +
23385 +
23386 +
23387 +
23388 +
23389 +
23390 +
23391 +
23392 +
23393 +
23394 +
23395 +
23396 +
23397 +
23398 +
23399 +
23400 +
23401 +
23402 +
23403 +
23404 + const { DimensionsTool, ResolutionTool: image_ResolutionTool } = unlock(external_wp_blockEditor_namespaceObject.privateApis);
23405 + const scaleOptions = [
23406 + {
23407 + value: "cover",
23408 + label: (0,external_wp_i18n_namespaceObject._x)("Cover", "Scale option for dimensions control"),
23409 + help: (0,external_wp_i18n_namespaceObject.__)("Image covers the space evenly.")
23410 + },
23411 + {
23412 + value: "contain",
23413 + label: (0,external_wp_i18n_namespaceObject._x)("Contain", "Scale option for dimensions control"),
23414 + help: (0,external_wp_i18n_namespaceObject.__)("Image is contained without distortion.")
23415 + }
23416 + ];
23417 + const WRITEMODE_POPOVER_PROPS = {
23418 + placement: "bottom-start"
23419 + };
23420 + const ImageWrapper = ({ href, children }) => {
23421 + if (!href) {
23422 + return children;
23423 + }
23424 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
23425 + "a",
23426 + {
23427 + href,
23428 + onClick: (event) => event.preventDefault(),
23429 + "aria-disabled": true,
23430 + style: {
23431 + // When the Image block is linked,
23432 + // it's wrapped with a disabled <a /> tag.
23433 + // Restore cursor style so it doesn't appear 'clickable'
23434 + // and remove pointer events. Safari needs the display property.
23435 + pointerEvents: "none",
23436 + cursor: "default",
23437 + display: "inline"
23438 + },
23439 + children
23440 + }
23441 + );
23442 + };
23443 + function ContentOnlyControls({
23444 + attributes,
23445 + setAttributes,
23446 + lockAltControls,
23447 + lockAltControlsMessage,
23448 + lockTitleControls,
23449 + lockTitleControlsMessage
23450 + }) {
23451 + const [popoverAnchor, setPopoverAnchor] = (0,external_wp_element_namespaceObject.useState)(null);
23452 + const [isAltDialogOpen, setIsAltDialogOpen] = (0,external_wp_element_namespaceObject.useState)(false);
23453 + const [isTitleDialogOpen, setIsTitleDialogOpen] = (0,external_wp_element_namespaceObject.useState)(false);
23454 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
23455 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ToolbarItem, { ref: setPopoverAnchor, children: (toggleProps) => /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
23456 + external_wp_components_namespaceObject.DropdownMenu,
23457 + {
23458 + icon: chevron_down_default,
23459 + label: (0,external_wp_i18n_namespaceObject.__)("More"),
23460 + toggleProps: {
23461 + ...toggleProps,
23462 + description: (0,external_wp_i18n_namespaceObject.__)("Displays more controls.")
23463 + },
23464 + popoverProps: WRITEMODE_POPOVER_PROPS,
23465 + children: ({ onClose }) => /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
23466 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
23467 + external_wp_components_namespaceObject.MenuItem,
23468 + {
23469 + onClick: () => {
23470 + setIsAltDialogOpen(true);
23471 + onClose();
23472 + },
23473 + "aria-haspopup": "dialog",
23474 + children: (0,external_wp_i18n_namespaceObject._x)(
23475 + "Alternative text",
23476 + "Alternative text for an image. Block toolbar label, a low character count is preferred."
23477 + )
23478 + }
23479 + ),
23480 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
23481 + external_wp_components_namespaceObject.MenuItem,
23482 + {
23483 + onClick: () => {
23484 + setIsTitleDialogOpen(true);
23485 + onClose();
23486 + },
23487 + "aria-haspopup": "dialog",
23488 + children: (0,external_wp_i18n_namespaceObject.__)("Title text")
23489 + }
23490 + )
23491 + ] })
23492 + }
23493 + ) }),
23494 + isAltDialogOpen && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
23495 + external_wp_components_namespaceObject.Popover,
23496 + {
23497 + placement: "bottom-start",
23498 + anchor: popoverAnchor,
23499 + onClose: () => setIsAltDialogOpen(false),
23500 + offset: 13,
23501 + variant: "toolbar",
23502 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { className: "wp-block-image__toolbar_content_textarea__container", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
23503 + external_wp_components_namespaceObject.TextareaControl,
23504 + {
23505 + className: "wp-block-image__toolbar_content_textarea",
23506 + label: (0,external_wp_i18n_namespaceObject.__)("Alternative text"),
23507 + value: attributes.alt || "",
23508 + onChange: (value) => setAttributes({ alt: value }),
23509 + disabled: lockAltControls,
23510 + help: lockAltControls ? /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: lockAltControlsMessage }) : /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
23511 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
23512 + external_wp_components_namespaceObject.ExternalLink,
23513 + {
23514 + href: (
23515 + // translators: Localized tutorial, if one exists. W3C Web Accessibility Initiative link has list of existing translations.
23516 + (0,external_wp_i18n_namespaceObject.__)(
23517 + "https://www.w3.org/WAI/tutorials/images/decision-tree/"
23518 + )
23519 + ),
23520 + children: (0,external_wp_i18n_namespaceObject.__)(
23521 + "Describe the purpose of the image."
23522 + )
23523 + }
23524 + ),
23525 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("br", {}),
23526 + (0,external_wp_i18n_namespaceObject.__)("Leave empty if decorative.")
23527 + ] }),
23528 + __nextHasNoMarginBottom: true
23529 + }
23530 + ) })
23531 + }
23532 + ),
23533 + isTitleDialogOpen && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
23534 + external_wp_components_namespaceObject.Popover,
23535 + {
23536 + placement: "bottom-start",
23537 + anchor: popoverAnchor,
23538 + onClose: () => setIsTitleDialogOpen(false),
23539 + offset: 13,
23540 + variant: "toolbar",
23541 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { className: "wp-block-image__toolbar_content_textarea__container", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
23542 + external_wp_components_namespaceObject.TextControl,
23543 + {
23544 + __next40pxDefaultSize: true,
23545 + className: "wp-block-image__toolbar_content_textarea",
23546 + __nextHasNoMarginBottom: true,
23547 + label: (0,external_wp_i18n_namespaceObject.__)("Title attribute"),
23548 + value: attributes.title || "",
23549 + onChange: (value) => setAttributes({
23550 + title: value
23551 + }),
23552 + disabled: lockTitleControls,
23553 + help: lockTitleControls ? /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: lockTitleControlsMessage }) : /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
23554 + (0,external_wp_i18n_namespaceObject.__)(
23555 + "Describe the role of this image on the page."
23556 + ),
23557 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ExternalLink, { href: "https://www.w3.org/TR/html52/dom.html#the-title-attribute", children: (0,external_wp_i18n_namespaceObject.__)(
23558 + "(Note: many devices and browsers do not display this text.)"
23559 + ) })
23560 + ] })
23561 + }
23562 + ) })
23563 + }
23564 + )
23565 + ] });
23566 + }
23567 + function image_Image({
23568 + temporaryURL,
23569 + attributes,
23570 + setAttributes,
23571 + isSingleSelected,
23572 + insertBlocksAfter,
23573 + onReplace,
23574 + onSelectImage,
23575 + onSelectURL,
23576 + onUploadError,
23577 + context,
23578 + clientId,
23579 + blockEditingMode,
23580 + parentLayoutType,
23581 + maxContentWidth
23582 + }) {
23583 + const {
23584 + url = "",
23585 + alt,
23586 + align,
23587 + id,
23588 + href,
23589 + rel,
23590 + linkClass,
23591 + linkDestination,
23592 + title,
23593 + width,
23594 + height,
23595 + aspectRatio,
23596 + scale,
23597 + linkTarget,
23598 + sizeSlug,
23599 + lightbox,
23600 + metadata
23601 + } = attributes;
23602 + const [imageElement, setImageElement] = (0,external_wp_element_namespaceObject.useState)();
23603 + const [resizeDelta, setResizeDelta] = (0,external_wp_element_namespaceObject.useState)(null);
23604 + const [pixelSize, setPixelSize] = (0,external_wp_element_namespaceObject.useState)({});
23605 + const [offsetTop, setOffsetTop] = (0,external_wp_element_namespaceObject.useState)(0);
23606 + const setResizeObserved = (0,external_wp_compose_namespaceObject.useResizeObserver)(([entry]) => {
23607 + if (!resizeDelta) {
23608 + const [box] = entry.borderBoxSize;
23609 + setPixelSize({ width: box.inlineSize, height: box.blockSize });
23610 + }
23611 + setOffsetTop(entry.target.offsetTop);
23612 + });
23613 + const effectResizeableBoxPlacement = (0,external_wp_element_namespaceObject.useCallback)(() => {
23614 + setOffsetTop(imageElement?.offsetTop ?? 0);
23615 + }, [imageElement]);
23616 + const setRefs = (0,external_wp_compose_namespaceObject.useMergeRefs)([setImageElement, setResizeObserved]);
23617 + const { allowResize = true } = context;
23618 + const image = (0,external_wp_data_namespaceObject.useSelect)(
23619 + (select) => id && isSingleSelected ? select(external_wp_coreData_namespaceObject.store).getEntityRecord(
23620 + "postType",
23621 + "attachment",
23622 + id,
23623 + { context: "view" }
23624 + ) : null,
23625 + [id, isSingleSelected]
23626 + );
23627 + const { canInsertCover, imageEditing, imageSizes, maxWidth } = (0,external_wp_data_namespaceObject.useSelect)(
23628 + (select) => {
23629 + const { getBlockRootClientId, canInsertBlockType, getSettings: getSettings2 } = select(external_wp_blockEditor_namespaceObject.store);
23630 + const rootClientId = getBlockRootClientId(clientId);
23631 + const settings = getSettings2();
23632 + return {
23633 + imageEditing: settings.imageEditing,
23634 + imageSizes: settings.imageSizes,
23635 + maxWidth: settings.maxWidth,
23636 + canInsertCover: canInsertBlockType(
23637 + "core/cover",
23638 + rootClientId
23639 + )
23640 + };
23641 + },
23642 + [clientId]
23643 + );
23644 + const { getBlock, getSettings } = (0,external_wp_data_namespaceObject.useSelect)(external_wp_blockEditor_namespaceObject.store);
23645 + const { replaceBlocks, toggleSelection } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_blockEditor_namespaceObject.store);
23646 + const { createErrorNotice, createSuccessNotice } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_notices_namespaceObject.store);
23647 + const { editEntityRecord } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_coreData_namespaceObject.store);
23648 + const isLargeViewport = (0,external_wp_compose_namespaceObject.useViewportMatch)("medium");
23649 + const isWideAligned = ["wide", "full"].includes(align);
23650 + const [
23651 + { loadedNaturalWidth, loadedNaturalHeight },
23652 + setLoadedNaturalSize
23653 + ] = (0,external_wp_element_namespaceObject.useState)({});
23654 + const [isEditingImage, setIsEditingImage] = (0,external_wp_element_namespaceObject.useState)(false);
23655 + const [externalBlob, setExternalBlob] = (0,external_wp_element_namespaceObject.useState)();
23656 + const [hasImageErrored, setHasImageErrored] = (0,external_wp_element_namespaceObject.useState)(false);
23657 + const hasNonContentControls = blockEditingMode === "default";
23658 + const isContentOnlyMode = blockEditingMode === "contentOnly";
23659 + const isResizable = allowResize && hasNonContentControls && !isWideAligned && isLargeViewport;
23660 + const imageSizeOptions = imageSizes.filter(
23661 + ({ slug }) => image?.media_details?.sizes?.[slug]?.source_url
23662 + ).map(({ name, slug }) => ({ value: slug, label: name }));
23663 + (0,external_wp_element_namespaceObject.useEffect)(() => {
23664 + if (!isExternalImage(id, url) || !isSingleSelected || !getSettings().mediaUpload) {
23665 + setExternalBlob();
23666 + return;
23667 + }
23668 + if (externalBlob) {
23669 + return;
23670 + }
23671 + window.fetch(url.includes("?") ? url : url + "?").then((response) => response.blob()).then((blob) => setExternalBlob(blob)).catch(() => {
23672 + });
23673 + }, [id, url, isSingleSelected, externalBlob, getSettings]);
23674 + const { naturalWidth, naturalHeight } = (0,external_wp_element_namespaceObject.useMemo)(() => {
23675 + return {
23676 + naturalWidth: imageElement?.naturalWidth || loadedNaturalWidth || void 0,
23677 + naturalHeight: imageElement?.naturalHeight || loadedNaturalHeight || void 0
23678 + };
23679 + }, [loadedNaturalWidth, loadedNaturalHeight, imageElement?.complete]);
23680 + function onImageError() {
23681 + setHasImageErrored(true);
23682 + const embedBlock = createUpgradedEmbedBlock({ attributes: { url } });
23683 + if (void 0 !== embedBlock) {
23684 + onReplace(embedBlock);
23685 + }
23686 + }
23687 + function onImageLoad(event) {
23688 + setHasImageErrored(false);
23689 + setLoadedNaturalSize({
23690 + loadedNaturalWidth: event.target?.naturalWidth,
23691 + loadedNaturalHeight: event.target?.naturalHeight
23692 + });
23693 + }
23694 + function onSetHref(props) {
23695 + setAttributes(props);
23696 + }
23697 + function onSetLightbox(enable) {
23698 + if (enable && !lightboxSetting?.enabled) {
23699 + setAttributes({
23700 + lightbox: { enabled: true }
23701 + });
23702 + } else if (!enable && lightboxSetting?.enabled) {
23703 + setAttributes({
23704 + lightbox: { enabled: false }
23705 + });
23706 + } else {
23707 + setAttributes({
23708 + lightbox: void 0
23709 + });
23710 + }
23711 + }
23712 + function resetLightbox() {
23713 + if (lightboxSetting?.enabled && lightboxSetting?.allowEditing) {
23714 + setAttributes({
23715 + lightbox: { enabled: false }
23716 + });
23717 + } else {
23718 + setAttributes({
23719 + lightbox: void 0
23720 + });
23721 + }
23722 + }
23723 + function onSetTitle(value) {
23724 + setAttributes({ title: value });
23725 + }
23726 + function updateAlt(newAlt) {
23727 + setAttributes({ alt: newAlt });
23728 + }
23729 + function updateImage(newSizeSlug) {
23730 + const newUrl = image?.media_details?.sizes?.[newSizeSlug]?.source_url;
23731 + if (!newUrl) {
23732 + return null;
23733 + }
23734 + setAttributes({
23735 + url: newUrl,
23736 + sizeSlug: newSizeSlug
23737 + });
23738 + }
23739 + function uploadExternal() {
23740 + const { mediaUpload } = getSettings();
23741 + if (!mediaUpload) {
23742 + return;
23743 + }
23744 + mediaUpload({
23745 + filesList: [externalBlob],
23746 + onFileChange([img2]) {
23747 + onSelectImage(img2);
23748 + if ((0,external_wp_blob_namespaceObject.isBlobURL)(img2.url)) {
23749 + return;
23750 + }
23751 + setExternalBlob();
23752 + createSuccessNotice((0,external_wp_i18n_namespaceObject.__)("Image uploaded."), {
23753 + type: "snackbar"
23754 + });
23755 + },
23756 + allowedTypes: constants_ALLOWED_MEDIA_TYPES,
23757 + onError(message) {
23758 + createErrorNotice(message, { type: "snackbar" });
23759 + }
23760 + });
23761 + }
23762 + (0,external_wp_element_namespaceObject.useEffect)(() => {
23763 + if (!isSingleSelected) {
23764 + setIsEditingImage(false);
23765 + }
23766 + }, [isSingleSelected]);
23767 + const canEditImage = id && naturalWidth && naturalHeight && imageEditing;
23768 + const allowCrop = isSingleSelected && canEditImage && !isEditingImage && !isContentOnlyMode;
23769 + function switchToCover() {
23770 + replaceBlocks(
23771 + clientId,
23772 + (0,external_wp_blocks_namespaceObject.switchToBlockType)(getBlock(clientId), "core/cover")
23773 + );
23774 + }
23775 + const dimensionsUnitsOptions = (0,external_wp_components_namespaceObject.__experimentalUseCustomUnits)({
23776 + availableUnits: ["px"]
23777 + });
23778 + const [lightboxSetting] = (0,external_wp_blockEditor_namespaceObject.useSettings)("lightbox");
23779 + const showLightboxSetting = (
23780 + // If a block-level override is set, we should give users the option to
23781 + // remove that override, even if the lightbox UI is disabled in the settings.
23782 + !!lightbox && lightbox?.enabled !== lightboxSetting?.enabled || lightboxSetting?.allowEditing
23783 + );
23784 + const lightboxChecked = !!lightbox?.enabled || !lightbox && !!lightboxSetting?.enabled;
23785 + const dropdownMenuProps = useToolsPanelDropdownMenuProps();
23786 + const dimensionsControl = isResizable && (SIZED_LAYOUTS.includes(parentLayoutType) ? /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
23787 + DimensionsTool,
23788 + {
23789 + value: { aspectRatio },
23790 + onChange: ({ aspectRatio: newAspectRatio }) => {
23791 + setAttributes({
23792 + aspectRatio: newAspectRatio,
23793 + scale: "cover"
23794 + });
23795 + },
23796 + defaultAspectRatio: "auto",
23797 + tools: ["aspectRatio"]
23798 + }
23799 + ) : /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
23800 + DimensionsTool,
23801 + {
23802 + value: { width, height, scale, aspectRatio },
23803 + onChange: ({
23804 + width: newWidth,
23805 + height: newHeight,
23806 + scale: newScale,
23807 + aspectRatio: newAspectRatio
23808 + }) => {
23809 + setAttributes({
23810 + // CSS includes `height: auto`, but we need
23811 + // `width: auto` to fix the aspect ratio when
23812 + // only height is set due to the width and
23813 + // height attributes set via the server.
23814 + width: !newWidth && newHeight ? "auto" : newWidth,
23815 + height: newHeight,
23816 + scale: newScale,
23817 + aspectRatio: newAspectRatio
23818 + });
23819 + },
23820 + defaultScale: "cover",
23821 + defaultAspectRatio: "auto",
23822 + scaleOptions,
23823 + unitsOptions: dimensionsUnitsOptions
23824 + }
23825 + ));
23826 + const resetAll = () => {
23827 + setAttributes({
23828 + alt: void 0,
23829 + width: void 0,
23830 + height: void 0,
23831 + scale: void 0,
23832 + aspectRatio: void 0,
23833 + lightbox: void 0
23834 + });
23835 + updateImage(image_constants_DEFAULT_MEDIA_SIZE_SLUG);
23836 + };
23837 + const sizeControls = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
23838 + external_wp_components_namespaceObject.__experimentalToolsPanel,
23839 + {
23840 + label: (0,external_wp_i18n_namespaceObject.__)("Settings"),
23841 + resetAll,
23842 + dropdownMenuProps,
23843 + children: dimensionsControl
23844 + }
23845 + ) });
23846 + const arePatternOverridesEnabled = metadata?.bindings?.__default?.source === "core/pattern-overrides";
23847 + const {
23848 + lockUrlControls = false,
23849 + lockHrefControls = false,
23850 + lockAltControls = false,
23851 + lockAltControlsMessage,
23852 + lockTitleControls = false,
23853 + lockTitleControlsMessage,
23854 + hideCaptionControls = false
23855 + } = (0,external_wp_data_namespaceObject.useSelect)(
23856 + (select) => {
23857 + if (!isSingleSelected) {
23858 + return {};
23859 + }
23860 + const {
23861 + url: urlBinding,
23862 + alt: altBinding,
23863 + title: titleBinding,
23864 + caption: captionBinding
23865 + } = metadata?.bindings || {};
23866 + const hasParentPattern = !!context["pattern/overrides"];
23867 + const urlBindingSource = (0,external_wp_blocks_namespaceObject.getBlockBindingsSource)(
23868 + urlBinding?.source
23869 + );
23870 + const altBindingSource = (0,external_wp_blocks_namespaceObject.getBlockBindingsSource)(
23871 + altBinding?.source
23872 + );
23873 + const titleBindingSource = (0,external_wp_blocks_namespaceObject.getBlockBindingsSource)(
23874 + titleBinding?.source
23875 + );
23876 + return {
23877 + lockUrlControls: !!urlBinding && !urlBindingSource?.canUserEditValue?.({
23878 + select,
23879 + context,
23880 + args: urlBinding?.args
23881 + }),
23882 + lockHrefControls: (
23883 + // Disable editing the link of the URL if the image is inside a pattern instance.
23884 + // This is a temporary solution until we support overriding the link on the frontend.
23885 + hasParentPattern || arePatternOverridesEnabled
23886 + ),
23887 + hideCaptionControls: !!captionBinding,
23888 + lockAltControls: !!altBinding && !altBindingSource?.canUserEditValue?.({
23889 + select,
23890 + context,
23891 + args: altBinding?.args
23892 + }),
23893 + lockAltControlsMessage: altBindingSource?.label ? (0,external_wp_i18n_namespaceObject.sprintf)(
23894 + /* translators: %s: Label of the bindings source. */
23895 + (0,external_wp_i18n_namespaceObject.__)("Connected to %s"),
23896 + altBindingSource.label
23897 + ) : (0,external_wp_i18n_namespaceObject.__)("Connected to dynamic data"),
23898 + lockTitleControls: !!titleBinding && !titleBindingSource?.canUserEditValue?.({
23899 + select,
23900 + context,
23901 + args: titleBinding?.args
23902 + }),
23903 + lockTitleControlsMessage: titleBindingSource?.label ? (0,external_wp_i18n_namespaceObject.sprintf)(
23904 + /* translators: %s: Label of the bindings source. */
23905 + (0,external_wp_i18n_namespaceObject.__)("Connected to %s"),
23906 + titleBindingSource.label
23907 + ) : (0,external_wp_i18n_namespaceObject.__)("Connected to dynamic data")
23908 + };
23909 + },
23910 + [
23911 + arePatternOverridesEnabled,
23912 + context,
23913 + isSingleSelected,
23914 + metadata?.bindings
23915 + ]
23916 + );
23917 + const showUrlInput = isSingleSelected && !isEditingImage && !lockHrefControls && !lockUrlControls;
23918 + const showCoverControls = isSingleSelected && canInsertCover && !isContentOnlyMode;
23919 + const showBlockControls = showUrlInput || allowCrop || showCoverControls;
23920 + const mediaReplaceFlow = isSingleSelected && !isEditingImage && !lockUrlControls && // For contentOnly mode, put this button in its own area so it has borders around it.
23921 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockControls, { group: isContentOnlyMode ? "inline" : "other", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
23922 + external_wp_blockEditor_namespaceObject.MediaReplaceFlow,
23923 + {
23924 + mediaId: id,
23925 + mediaURL: url,
23926 + allowedTypes: constants_ALLOWED_MEDIA_TYPES,
23927 + accept: "image/*",
23928 + onSelect: onSelectImage,
23929 + onSelectURL,
23930 + onError: onUploadError,
23931 + name: !url ? (0,external_wp_i18n_namespaceObject.__)("Add image") : (0,external_wp_i18n_namespaceObject.__)("Replace"),
23932 + onReset: () => onSelectImage(void 0)
23933 + }
23934 + ) });
23935 + const controls = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
23936 + showBlockControls && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_blockEditor_namespaceObject.BlockControls, { group: "block", children: [
23937 + showUrlInput && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
23938 + external_wp_blockEditor_namespaceObject.__experimentalImageURLInputUI,
23939 + {
23940 + url: href || "",
23941 + onChangeUrl: onSetHref,
23942 + linkDestination,
23943 + mediaUrl: image && image.source_url || url,
23944 + mediaLink: image && image.link,
23945 + linkTarget,
23946 + linkClass,
23947 + rel,
23948 + showLightboxSetting,
23949 + lightboxEnabled: lightboxChecked,
23950 + onSetLightbox,
23951 + resetLightbox
23952 + }
23953 + ),
23954 + allowCrop && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
23955 + external_wp_components_namespaceObject.ToolbarButton,
23956 + {
23957 + onClick: () => setIsEditingImage(true),
23958 + icon: crop_default,
23959 + label: (0,external_wp_i18n_namespaceObject.__)("Crop")
23960 + }
23961 + ),
23962 + showCoverControls && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
23963 + external_wp_components_namespaceObject.ToolbarButton,
23964 + {
23965 + icon: overlay_text_default,
23966 + label: (0,external_wp_i18n_namespaceObject.__)("Add text over image"),
23967 + onClick: switchToCover
23968 + }
23969 + )
23970 + ] }),
23971 + isSingleSelected && externalBlob && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockControls, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ToolbarGroup, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
23972 + external_wp_components_namespaceObject.ToolbarButton,
23973 + {
23974 + onClick: uploadExternal,
23975 + icon: upload_default,
23976 + label: (0,external_wp_i18n_namespaceObject.__)("Upload to Media Library")
23977 + }
23978 + ) }) }),
23979 + isContentOnlyMode && // Add some extra controls for content attributes when content only mode is active.
23980 + // With content only mode active, the inspector is hidden, so users need another way
23981 + // to edit these attributes.
23982 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockControls, { group: "block", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
23983 + ContentOnlyControls,
23984 + {
23985 + attributes,
23986 + setAttributes,
23987 + lockAltControls,
23988 + lockAltControlsMessage,
23989 + lockTitleControls,
23990 + lockTitleControlsMessage
23991 + }
23992 + ) }),
23993 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(
23994 + external_wp_components_namespaceObject.__experimentalToolsPanel,
23995 + {
23996 + label: (0,external_wp_i18n_namespaceObject.__)("Settings"),
23997 + resetAll,
23998 + dropdownMenuProps,
23999 + children: [
24000 + isSingleSelected && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
24001 + external_wp_components_namespaceObject.__experimentalToolsPanelItem,
24002 + {
24003 + label: (0,external_wp_i18n_namespaceObject.__)("Alternative text"),
24004 + isShownByDefault: true,
24005 + hasValue: () => !!alt,
24006 + onDeselect: () => setAttributes({ alt: void 0 }),
24007 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
24008 + external_wp_components_namespaceObject.TextareaControl,
24009 + {
24010 + label: (0,external_wp_i18n_namespaceObject.__)("Alternative text"),
24011 + value: alt || "",
24012 + onChange: updateAlt,
24013 + readOnly: lockAltControls,
24014 + help: lockAltControls ? /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: lockAltControlsMessage }) : /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
24015 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
24016 + external_wp_components_namespaceObject.ExternalLink,
24017 + {
24018 + href: (
24019 + // translators: Localized tutorial, if one exists. W3C Web Accessibility Initiative link has list of existing translations.
24020 + (0,external_wp_i18n_namespaceObject.__)(
24021 + "https://www.w3.org/WAI/tutorials/images/decision-tree/"
24022 + )
24023 + ),
24024 + children: (0,external_wp_i18n_namespaceObject.__)(
24025 + "Describe the purpose of the image."
24026 + )
24027 + }
24028 + ),
24029 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("br", {}),
24030 + (0,external_wp_i18n_namespaceObject.__)(
24031 + "Leave empty if decorative."
24032 + )
24033 + ] }),
24034 + __nextHasNoMarginBottom: true
24035 + }
24036 + )
24037 + }
24038 + ),
24039 + dimensionsControl,
24040 + !!imageSizeOptions.length && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
24041 + image_ResolutionTool,
24042 + {
24043 + value: sizeSlug,
24044 + defaultValue: image_constants_DEFAULT_MEDIA_SIZE_SLUG,
24045 + onChange: updateImage,
24046 + options: imageSizeOptions
24047 + }
24048 + )
24049 + ]
24050 + }
24051 + ) }),
24052 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, { group: "advanced", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
24053 + external_wp_components_namespaceObject.TextControl,
24054 + {
24055 + __nextHasNoMarginBottom: true,
24056 + __next40pxDefaultSize: true,
24057 + label: (0,external_wp_i18n_namespaceObject.__)("Title attribute"),
24058 + value: title || "",
24059 + onChange: onSetTitle,
24060 + readOnly: lockTitleControls,
24061 + help: lockTitleControls ? /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: lockTitleControlsMessage }) : /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
24062 + (0,external_wp_i18n_namespaceObject.__)(
24063 + "Describe the role of this image on the page."
24064 + ),
24065 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ExternalLink, { href: "https://www.w3.org/TR/html52/dom.html#the-title-attribute", children: (0,external_wp_i18n_namespaceObject.__)(
24066 + "(Note: many devices and browsers do not display this text.)"
24067 + ) })
24068 + ] })
24069 + }
24070 + ) })
24071 + ] });
24072 + const filename = (0,external_wp_url_namespaceObject.getFilename)(url);
24073 + let defaultedAlt;
24074 + if (alt) {
24075 + defaultedAlt = alt;
24076 + } else if (filename) {
24077 + defaultedAlt = (0,external_wp_i18n_namespaceObject.sprintf)(
24078 + /* translators: %s: file name */
24079 + (0,external_wp_i18n_namespaceObject.__)("This image has an empty alt attribute; its file name is %s"),
24080 + filename
24081 + );
24082 + } else {
24083 + defaultedAlt = (0,external_wp_i18n_namespaceObject.__)("This image has an empty alt attribute");
24084 + }
24085 + const borderProps = (0,external_wp_blockEditor_namespaceObject.__experimentalUseBorderProps)(attributes);
24086 + const shadowProps = (0,external_wp_blockEditor_namespaceObject.__experimentalGetShadowClassesAndStyles)(attributes);
24087 + const isRounded = attributes.className?.includes("is-style-rounded");
24088 + const { postType, postId, queryId } = context;
24089 + const isDescendentOfQueryLoop = Number.isFinite(queryId);
24090 + let img = temporaryURL && hasImageErrored ? (
24091 + // Show a placeholder during upload when the blob URL can't be loaded. This can
24092 + // happen when the user uploads a HEIC image in a browser that doesn't support them.
24093 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
24094 + external_wp_components_namespaceObject.Placeholder,
24095 + {
24096 + className: "wp-block-image__placeholder",
24097 + withIllustration: true,
24098 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Spinner, {})
24099 + }
24100 + )
24101 + ) : (
24102 + // Disable reason: Image itself is not meant to be interactive, but
24103 + // should direct focus to block.
24104 + /* eslint-disable jsx-a11y/no-noninteractive-element-interactions, jsx-a11y/click-events-have-key-events */
24105 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
24106 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
24107 + "img",
24108 + {
24109 + src: temporaryURL || url,
24110 + alt: defaultedAlt,
24111 + onError: onImageError,
24112 + onLoad: onImageLoad,
24113 + ref: setRefs,
24114 + className: borderProps.className,
24115 + width: naturalWidth,
24116 + height: naturalHeight,
24117 + style: {
24118 + aspectRatio,
24119 + ...resizeDelta ? {
24120 + width: pixelSize.width + resizeDelta.width,
24121 + height: pixelSize.height + resizeDelta.height
24122 + } : { width, height },
24123 + objectFit: scale,
24124 + ...borderProps.style,
24125 + ...shadowProps.style
24126 + }
24127 + }
24128 + ),
24129 + temporaryURL && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Spinner, {})
24130 + ] })
24131 + );
24132 + if (canEditImage && isEditingImage) {
24133 + img = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(ImageWrapper, { href, children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
24134 + external_wp_blockEditor_namespaceObject.__experimentalImageEditor,
24135 + {
24136 + id,
24137 + url,
24138 + ...pixelSize,
24139 + naturalHeight,
24140 + naturalWidth,
24141 + onSaveImage: (imageAttributes) => setAttributes(imageAttributes),
24142 + onFinishEditing: () => {
24143 + setIsEditingImage(false);
24144 + },
24145 + borderProps: isRounded ? void 0 : borderProps
24146 + }
24147 + ) });
24148 + } else {
24149 + img = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(ImageWrapper, { href, children: img });
24150 + }
24151 + let resizableBox;
24152 + if (isResizable && isSingleSelected && !isEditingImage && !SIZED_LAYOUTS.includes(parentLayoutType)) {
24153 + const numericRatio = aspectRatio && evalAspectRatio(aspectRatio);
24154 + const customRatio = pixelSize.width / pixelSize.height;
24155 + const naturalRatio = naturalWidth / naturalHeight;
24156 + const ratio = numericRatio || customRatio || naturalRatio || 1;
24157 + const minWidth = naturalWidth < naturalHeight ? constants_MIN_SIZE : constants_MIN_SIZE * ratio;
24158 + const minHeight = naturalHeight < naturalWidth ? constants_MIN_SIZE : constants_MIN_SIZE / ratio;
24159 + const maxWidthBuffer = maxWidth * 2.5;
24160 + const maxResizeWidth = maxContentWidth || maxWidthBuffer;
24161 + let showRightHandle = false;
24162 + let showLeftHandle = false;
24163 + if (align === "center") {
24164 + showRightHandle = true;
24165 + showLeftHandle = true;
24166 + } else if ((0,external_wp_i18n_namespaceObject.isRTL)()) {
24167 + if (align === "left") {
24168 + showRightHandle = true;
24169 + } else {
24170 + showLeftHandle = true;
24171 + }
24172 + } else {
24173 + if (align === "right") {
24174 + showLeftHandle = true;
24175 + } else {
24176 + showRightHandle = true;
24177 + }
24178 + }
24179 + resizableBox = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
24180 + external_wp_components_namespaceObject.ResizableBox,
24181 + {
24182 + ref: effectResizeableBoxPlacement,
24183 + style: {
24184 + position: "absolute",
24185 + // To match the vertical-align: bottom of the img (from style.scss)
24186 + // syncs the top with the img. This matters when the img height is
24187 + // less than the line-height.
24188 + inset: `${offsetTop}px 0 0 0`
24189 + },
24190 + size: pixelSize,
24191 + minWidth,
24192 + maxWidth: maxResizeWidth,
24193 + minHeight,
24194 + maxHeight: maxResizeWidth / ratio,
24195 + lockAspectRatio: ratio,
24196 + enable: {
24197 + top: false,
24198 + right: showRightHandle,
24199 + bottom: true,
24200 + left: showLeftHandle
24201 + },
24202 + onResizeStart: () => {
24203 + toggleSelection(false);
24204 + },
24205 + onResize: (event, direction, elt, delta) => {
24206 + setResizeDelta(delta);
24207 + },
24208 + onResizeStop: (event, direction, elt, delta) => {
24209 + toggleSelection(true);
24210 + setResizeDelta(null);
24211 + setPixelSize((current) => ({
24212 + width: current.width + delta.width,
24213 + height: current.height + delta.height
24214 + }));
24215 + if (maxContentWidth && // Only do this if the image is bigger than the container to prevent it from being squished.
24216 + // TODO: Remove this check if the image support setting 100% width.
24217 + naturalWidth >= maxContentWidth && Math.abs(elt.offsetWidth - maxContentWidth) < 10) {
24218 + setAttributes({
24219 + width: void 0,
24220 + height: void 0
24221 + });
24222 + return;
24223 + }
24224 + setAttributes({
24225 + width: `${elt.offsetWidth}px`,
24226 + height: "auto",
24227 + aspectRatio: ratio === naturalRatio ? void 0 : String(ratio)
24228 + });
24229 + },
24230 + resizeRatio: align === "center" ? 2 : 1
24231 + }
24232 + );
24233 + }
24234 + if (!url && !temporaryURL) {
24235 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
24236 + mediaReplaceFlow,
24237 + metadata?.bindings ? controls : sizeControls
24238 + ] });
24239 + }
24240 + const setPostFeatureImage = () => {
24241 + editEntityRecord("postType", postType, postId, {
24242 + featured_media: id
24243 + });
24244 + createSuccessNotice((0,external_wp_i18n_namespaceObject.__)("Post featured image updated."), {
24245 + type: "snackbar"
24246 + });
24247 + };
24248 + const featuredImageControl = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockSettingsMenuControls, { children: ({ selectedClientIds }) => selectedClientIds.length === 1 && !isDescendentOfQueryLoop && postId && id && clientId === selectedClientIds[0] && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.MenuItem, { onClick: setPostFeatureImage, children: (0,external_wp_i18n_namespaceObject.__)("Set as featured image") }) });
24249 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
24250 + mediaReplaceFlow,
24251 + controls,
24252 + featuredImageControl,
24253 + img,
24254 + resizableBox,
24255 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
24256 + Caption,
24257 + {
24258 + attributes,
24259 + setAttributes,
24260 + isSelected: isSingleSelected,
24261 + insertBlocksAfter,
24262 + label: (0,external_wp_i18n_namespaceObject.__)("Image caption text"),
24263 + showToolbarButton: isSingleSelected && (hasNonContentControls || isContentOnlyMode) && !hideCaptionControls
24264 + }
24265 + )
24266 + ] });
24267 + }
24268 +
24269 +
24270 + ;// ./node_modules/@wordpress/block-library/build-module/image/use-max-width-observer.js
24271 +
24272 +
24273 +
24274 + function useMaxWidthObserver() {
24275 + const [contentResizeListener, { width }] = (0,external_wp_compose_namespaceObject.useResizeObserver)();
24276 + const observerRef = (0,external_wp_element_namespaceObject.useRef)();
24277 + const maxWidthObserver = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
24278 + "div",
24279 + {
24280 + className: "wp-block",
24281 + "aria-hidden": "true",
24282 + style: {
24283 + position: "absolute",
24284 + inset: 0,
24285 + width: "100%",
24286 + height: 0,
24287 + margin: 0
24288 + },
24289 + ref: observerRef,
24290 + children: contentResizeListener
24291 + }
24292 + );
24293 + return [maxWidthObserver, width];
24294 + }
24295 +
24296 +
24297 + ;// ./node_modules/@wordpress/block-library/build-module/image/edit.js
24298 +
24299 +
24300 +
24301 +
24302 +
24303 +
24304 +
24305 +
24306 +
24307 +
24308 +
24309 +
24310 +
24311 +
24312 +
24313 +
24314 +
24315 + const edit_pickRelevantMediaFiles = (image, size) => {
24316 + const imageProps = Object.fromEntries(
24317 + Object.entries(image ?? {}).filter(
24318 + ([key]) => ["alt", "id", "link", "caption"].includes(key)
24319 + )
24320 + );
24321 + imageProps.url = image?.sizes?.[size]?.url || image?.media_details?.sizes?.[size]?.source_url || image.url;
24322 + return imageProps;
24323 + };
24324 + const isExternalImage = (id, url) => url && !id && !(0,external_wp_blob_namespaceObject.isBlobURL)(url);
24325 + function hasSize(image, size) {
24326 + return "url" in (image?.sizes?.[size] ?? {}) || "source_url" in (image?.media_details?.sizes?.[size] ?? {});
24327 + }
24328 + function ImageEdit({
24329 + attributes,
24330 + setAttributes,
24331 + isSelected: isSingleSelected,
24332 + className,
24333 + insertBlocksAfter,
24334 + onReplace,
24335 + context,
24336 + clientId,
24337 + __unstableParentLayout: parentLayout
24338 + }) {
24339 + const {
24340 + url = "",
24341 + caption,
24342 + id,
24343 + width,
24344 + height,
24345 + sizeSlug,
24346 + aspectRatio,
24347 + scale,
24348 + align,
24349 + metadata
24350 + } = attributes;
24351 + const [temporaryURL, setTemporaryURL] = (0,external_wp_element_namespaceObject.useState)(attributes.blob);
24352 + const containerRef = (0,external_wp_element_namespaceObject.useRef)();
24353 + const layoutType = parentLayout?.type || parentLayout?.default?.type;
24354 + const isMaxWidthContainerWidth = !layoutType || layoutType !== "flex" && layoutType !== "grid";
24355 + const [maxWidthObserver, maxContentWidth] = useMaxWidthObserver();
24356 + const [placeholderResizeListener, { width: placeholderWidth }] = (0,external_wp_compose_namespaceObject.useResizeObserver)();
24357 + const isSmallContainer = placeholderWidth && placeholderWidth < 160;
24358 + const captionRef = (0,external_wp_element_namespaceObject.useRef)();
24359 + (0,external_wp_element_namespaceObject.useEffect)(() => {
24360 + captionRef.current = caption;
24361 + }, [caption]);
24362 + const { __unstableMarkNextChangeAsNotPersistent, replaceBlock } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_blockEditor_namespaceObject.store);
24363 + (0,external_wp_element_namespaceObject.useEffect)(() => {
24364 + if (["wide", "full"].includes(align)) {
24365 + __unstableMarkNextChangeAsNotPersistent();
24366 + setAttributes({
24367 + width: void 0,
24368 + height: void 0,
24369 + aspectRatio: void 0,
24370 + scale: void 0
24371 + });
24372 + }
24373 + }, [__unstableMarkNextChangeAsNotPersistent, align, setAttributes]);
24374 + const {
24375 + getSettings,
24376 + getBlockRootClientId,
24377 + getBlockName,
24378 + canInsertBlockType
24379 + } = (0,external_wp_data_namespaceObject.useSelect)(external_wp_blockEditor_namespaceObject.store);
24380 + const blockEditingMode = (0,external_wp_blockEditor_namespaceObject.useBlockEditingMode)();
24381 + const { createErrorNotice } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_notices_namespaceObject.store);
24382 + function onUploadError(message) {
24383 + createErrorNotice(message, { type: "snackbar" });
24384 + setAttributes({
24385 + src: void 0,
24386 + id: void 0,
24387 + url: void 0,
24388 + blob: void 0
24389 + });
24390 + }
24391 + function onSelectImagesList(images) {
24392 + const win = containerRef.current?.ownerDocument.defaultView;
24393 + if (images.every((file) => file instanceof win.File)) {
24394 + const files = images;
24395 + const rootClientId = getBlockRootClientId(clientId);
24396 + if (files.some((file) => !isValidFileType(file))) {
24397 + createErrorNotice(
24398 + (0,external_wp_i18n_namespaceObject.__)(
24399 + "If uploading to a gallery all files need to be image formats"
24400 + ),
24401 + { id: "gallery-upload-invalid-file", type: "snackbar" }
24402 + );
24403 + }
24404 + const imageBlocks = files.filter((file) => isValidFileType(file)).map(
24405 + (file) => (0,external_wp_blocks_namespaceObject.createBlock)("core/image", {
24406 + blob: (0,external_wp_blob_namespaceObject.createBlobURL)(file)
24407 + })
24408 + );
24409 + if (getBlockName(rootClientId) === "core/gallery") {
24410 + replaceBlock(clientId, imageBlocks);
24411 + } else if (canInsertBlockType("core/gallery", rootClientId)) {
24412 + const galleryBlock = (0,external_wp_blocks_namespaceObject.createBlock)(
24413 + "core/gallery",
24414 + {},
24415 + imageBlocks
24416 + );
24417 + replaceBlock(clientId, galleryBlock);
24418 + }
24419 + }
24420 + }
24421 + function onSelectImage(media) {
24422 + if (Array.isArray(media)) {
24423 + onSelectImagesList(media);
24424 + return;
24425 + }
24426 + if (!media || !media.url) {
24427 + setAttributes({
24428 + url: void 0,
24429 + alt: void 0,
24430 + id: void 0,
24431 + title: void 0,
24432 + caption: void 0,
24433 + blob: void 0
24434 + });
24435 + setTemporaryURL();
24436 + return;
24437 + }
24438 + if ((0,external_wp_blob_namespaceObject.isBlobURL)(media.url)) {
24439 + setTemporaryURL(media.url);
24440 + return;
24441 + }
24442 + const { imageDefaultSize } = getSettings();
24443 + let newSize = image_constants_DEFAULT_MEDIA_SIZE_SLUG;
24444 + if (sizeSlug && hasSize(media, sizeSlug)) {
24445 + newSize = sizeSlug;
24446 + } else if (hasSize(media, imageDefaultSize)) {
24447 + newSize = imageDefaultSize;
24448 + }
24449 + let mediaAttributes = edit_pickRelevantMediaFiles(media, newSize);
24450 + if (typeof mediaAttributes.caption === "string" && mediaAttributes.caption.includes("\n")) {
24451 + mediaAttributes.caption = mediaAttributes.caption.replace(
24452 + /\n/g,
24453 + "<br>"
24454 + );
24455 + }
24456 + if (captionRef.current && !mediaAttributes.caption) {
24457 + const { caption: omittedCaption, ...restMediaAttributes } = mediaAttributes;
24458 + mediaAttributes = restMediaAttributes;
24459 + }
24460 + let additionalAttributes;
24461 + if (!media.id || media.id !== id) {
24462 + additionalAttributes = {
24463 + sizeSlug: newSize
24464 + };
24465 + }
24466 + let linkDestination = attributes.linkDestination;
24467 + if (!linkDestination) {
24468 + switch (window?.wp?.media?.view?.settings?.defaultProps?.link || constants_LINK_DESTINATION_NONE) {
24469 + case "file":
24470 + case constants_LINK_DESTINATION_MEDIA:
24471 + linkDestination = constants_LINK_DESTINATION_MEDIA;
24472 + break;
24473 + case "post":
24474 + case constants_LINK_DESTINATION_ATTACHMENT:
24475 + linkDestination = constants_LINK_DESTINATION_ATTACHMENT;
24476 + break;
24477 + case LINK_DESTINATION_CUSTOM:
24478 + linkDestination = LINK_DESTINATION_CUSTOM;
24479 + break;
24480 + case constants_LINK_DESTINATION_NONE:
24481 + linkDestination = constants_LINK_DESTINATION_NONE;
24482 + break;
24483 + }
24484 + }
24485 + let href;
24486 + switch (linkDestination) {
24487 + case constants_LINK_DESTINATION_MEDIA:
24488 + href = media.url;
24489 + break;
24490 + case constants_LINK_DESTINATION_ATTACHMENT:
24491 + href = media.link;
24492 + break;
24493 + }
24494 + mediaAttributes.href = href;
24495 + setAttributes({
24496 + blob: void 0,
24497 + ...mediaAttributes,
24498 + ...additionalAttributes,
24499 + linkDestination
24500 + });
24501 + setTemporaryURL();
24502 + }
24503 + function onSelectURL(newURL) {
24504 + if (newURL !== url) {
24505 + setAttributes({
24506 + blob: void 0,
24507 + url: newURL,
24508 + id: void 0,
24509 + sizeSlug: getSettings().imageDefaultSize
24510 + });
24511 + setTemporaryURL();
24512 + }
24513 + }
24514 + useUploadMediaFromBlobURL({
24515 + url: temporaryURL,
24516 + allowedTypes: constants_ALLOWED_MEDIA_TYPES,
24517 + onChange: onSelectImage,
24518 + onError: onUploadError
24519 + });
24520 + const isExternal = isExternalImage(id, url);
24521 + const src = isExternal ? url : void 0;
24522 + const mediaPreview = !!url && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
24523 + "img",
24524 + {
24525 + alt: (0,external_wp_i18n_namespaceObject.__)("Edit image"),
24526 + title: (0,external_wp_i18n_namespaceObject.__)("Edit image"),
24527 + className: "edit-image-preview",
24528 + src: url
24529 + }
24530 + );
24531 + const borderProps = (0,external_wp_blockEditor_namespaceObject.__experimentalUseBorderProps)(attributes);
24532 + const shadowProps = (0,external_wp_blockEditor_namespaceObject.__experimentalGetShadowClassesAndStyles)(attributes);
24533 + const classes = dist_clsx(className, {
24534 + "is-transient": !!temporaryURL,
24535 + "is-resized": !!width || !!height,
24536 + [`size-${sizeSlug}`]: sizeSlug,
24537 + "has-custom-border": !!borderProps.className || borderProps.style && Object.keys(borderProps.style).length > 0
24538 + });
24539 + const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)({
24540 + ref: containerRef,
24541 + className: classes
24542 + });
24543 + const { lockUrlControls = false, lockUrlControlsMessage } = (0,external_wp_data_namespaceObject.useSelect)(
24544 + (select) => {
24545 + if (!isSingleSelected) {
24546 + return {};
24547 + }
24548 + const blockBindingsSource = (0,external_wp_blocks_namespaceObject.getBlockBindingsSource)(
24549 + metadata?.bindings?.url?.source
24550 + );
24551 + return {
24552 + lockUrlControls: !!metadata?.bindings?.url && !blockBindingsSource?.canUserEditValue?.({
24553 + select,
24554 + context,
24555 + args: metadata?.bindings?.url?.args
24556 + }),
24557 + lockUrlControlsMessage: blockBindingsSource?.label ? (0,external_wp_i18n_namespaceObject.sprintf)(
24558 + /* translators: %s: Label of the bindings source. */
24559 + (0,external_wp_i18n_namespaceObject.__)("Connected to %s"),
24560 + blockBindingsSource.label
24561 + ) : (0,external_wp_i18n_namespaceObject.__)("Connected to dynamic data")
24562 + };
24563 + },
24564 + [context, isSingleSelected, metadata?.bindings?.url]
24565 + );
24566 + const placeholder = (content) => {
24567 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(
24568 + external_wp_components_namespaceObject.Placeholder,
24569 + {
24570 + className: dist_clsx("block-editor-media-placeholder", {
24571 + [borderProps.className]: !!borderProps.className && !isSingleSelected
24572 + }),
24573 + icon: !isSmallContainer && (lockUrlControls ? plugins_default : image_default),
24574 + withIllustration: !isSingleSelected || isSmallContainer,
24575 + label: !isSmallContainer && (0,external_wp_i18n_namespaceObject.__)("Image"),
24576 + instructions: !lockUrlControls && !isSmallContainer && (0,external_wp_i18n_namespaceObject.__)(
24577 + "Drag and drop an image, upload, or choose from your library."
24578 + ),
24579 + style: {
24580 + aspectRatio: !(width && height) && aspectRatio ? aspectRatio : void 0,
24581 + width: height && aspectRatio ? "100%" : width,
24582 + height: width && aspectRatio ? "100%" : height,
24583 + objectFit: scale,
24584 + ...borderProps.style,
24585 + ...shadowProps.style
24586 + },
24587 + children: [
24588 + lockUrlControls && !isSmallContainer && lockUrlControlsMessage,
24589 + !lockUrlControls && !isSmallContainer && content,
24590 + placeholderResizeListener
24591 + ]
24592 + }
24593 + );
24594 + };
24595 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
24596 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("figure", { ...blockProps, children: [
24597 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
24598 + image_Image,
24599 + {
24600 + temporaryURL,
24601 + attributes,
24602 + setAttributes,
24603 + isSingleSelected,
24604 + insertBlocksAfter,
24605 + onReplace,
24606 + onSelectImage,
24607 + onSelectURL,
24608 + onUploadError,
24609 + context,
24610 + clientId,
24611 + blockEditingMode,
24612 + parentLayoutType: layoutType,
24613 + maxContentWidth
24614 + }
24615 + ),
24616 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
24617 + external_wp_blockEditor_namespaceObject.MediaPlaceholder,
24618 + {
24619 + icon: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockIcon, { icon: image_default }),
24620 + onSelect: onSelectImage,
24621 + onSelectURL,
24622 + onError: onUploadError,
24623 + placeholder,
24624 + accept: "image/*",
24625 + allowedTypes: constants_ALLOWED_MEDIA_TYPES,
24626 + handleUpload: (files) => files.length === 1,
24627 + value: { id, src },
24628 + mediaPreview,
24629 + disableMediaButtons: temporaryURL || url
24630 + }
24631 + )
24632 + ] }),
24633 + // The listener cannot be placed as the first element as it will break the in-between inserter.
24634 + // See https://github.com/WordPress/gutenberg/blob/71134165868298fc15e22896d0c28b41b3755ff7/packages/block-editor/src/components/block-list/use-in-between-inserter.js#L120
24635 + isSingleSelected && isMaxWidthContainerWidth && maxWidthObserver
24636 + ] });
24637 + }
24638 + var image_edit_edit_default = ImageEdit;
24639 +
24640 +
24641 + ;// ./node_modules/@wordpress/block-library/build-module/image/block.json
24642 + const image_block_namespaceObject = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/image","title":"Image","category":"media","usesContext":["allowResize","imageCrop","fixedHeight","postId","postType","queryId"],"description":"Insert an image to make a visual statement.","keywords":["img","photo","picture"],"textdomain":"default","attributes":{"blob":{"type":"string","role":"local"},"url":{"type":"string","source":"attribute","selector":"img","attribute":"src","role":"content"},"alt":{"type":"string","source":"attribute","selector":"img","attribute":"alt","default":"","role":"content"},"caption":{"type":"rich-text","source":"rich-text","selector":"figcaption","role":"content"},"lightbox":{"type":"object","enabled":{"type":"boolean"}},"title":{"type":"string","source":"attribute","selector":"img","attribute":"title","role":"content"},"href":{"type":"string","source":"attribute","selector":"figure > a","attribute":"href","role":"content"},"rel":{"type":"string","source":"attribute","selector":"figure > a","attribute":"rel"},"linkClass":{"type":"string","source":"attribute","selector":"figure > a","attribute":"class"},"id":{"type":"number","role":"content"},"width":{"type":"string"},"height":{"type":"string"},"aspectRatio":{"type":"string"},"scale":{"type":"string"},"sizeSlug":{"type":"string"},"linkDestination":{"type":"string"},"linkTarget":{"type":"string","source":"attribute","selector":"figure > a","attribute":"target"}},"supports":{"interactivity":true,"align":["left","center","right","wide","full"],"anchor":true,"color":{"text":false,"background":false},"filter":{"duotone":true},"spacing":{"margin":true},"__experimentalBorder":{"color":true,"radius":true,"width":true,"__experimentalSkipSerialization":true,"__experimentalDefaultControls":{"color":true,"radius":true,"width":true}},"shadow":{"__experimentalSkipSerialization":true}},"selectors":{"border":".wp-block-image img, .wp-block-image .wp-block-image__crop-area, .wp-block-image .components-placeholder","shadow":".wp-block-image img, .wp-block-image .wp-block-image__crop-area, .wp-block-image .components-placeholder","filter":{"duotone":".wp-block-image img, .wp-block-image .components-placeholder"}},"styles":[{"name":"default","label":"Default","isDefault":true},{"name":"rounded","label":"Rounded"}],"editorStyle":"wp-block-image-editor","style":"wp-block-image"}');
24643 + ;// ./node_modules/@wordpress/block-library/build-module/image/save.js
24644 +
24645 +
24646 +
24647 + function image_save_save({ attributes }) {
24648 + const {
24649 + url,
24650 + alt,
24651 + caption,
24652 + align,
24653 + href,
24654 + rel,
24655 + linkClass,
24656 + width,
24657 + height,
24658 + aspectRatio,
24659 + scale,
24660 + id,
24661 + linkTarget,
24662 + sizeSlug,
24663 + title,
24664 + metadata: { bindings = {} } = {}
24665 + } = attributes;
24666 + const newRel = !rel ? void 0 : rel;
24667 + const borderProps = (0,external_wp_blockEditor_namespaceObject.__experimentalGetBorderClassesAndStyles)(attributes);
24668 + const shadowProps = (0,external_wp_blockEditor_namespaceObject.__experimentalGetShadowClassesAndStyles)(attributes);
24669 + const classes = dist_clsx({
24670 + // All other align classes are handled by block supports.
24671 + // `{ align: 'none' }` is unique to transforms for the image block.
24672 + alignnone: "none" === align,
24673 + [`size-${sizeSlug}`]: sizeSlug,
24674 + "is-resized": width || height,
24675 + "has-custom-border": !!borderProps.className || borderProps.style && Object.keys(borderProps.style).length > 0
24676 + });
24677 + const imageClasses = dist_clsx(borderProps.className, {
24678 + [`wp-image-${id}`]: !!id
24679 + });
24680 + const image = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
24681 + "img",
24682 + {
24683 + src: url,
24684 + alt,
24685 + className: imageClasses || void 0,
24686 + style: {
24687 + ...borderProps.style,
24688 + ...shadowProps.style,
24689 + aspectRatio,
24690 + objectFit: scale,
24691 + width,
24692 + height
24693 + },
24694 + title
24695 + }
24696 + );
24697 + const displayCaption = !external_wp_blockEditor_namespaceObject.RichText.isEmpty(caption) || bindings.caption || bindings?.__default?.source === "core/pattern-overrides";
24698 + const figure = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
24699 + href ? /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
24700 + "a",
24701 + {
24702 + className: linkClass,
24703 + href,
24704 + target: linkTarget,
24705 + rel: newRel,
24706 + children: image
24707 + }
24708 + ) : image,
24709 + displayCaption && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
24710 + external_wp_blockEditor_namespaceObject.RichText.Content,
24711 + {
24712 + className: (0,external_wp_blockEditor_namespaceObject.__experimentalGetElementClassName)("caption"),
24713 + tagName: "figcaption",
24714 + value: caption
24715 + }
24716 + )
24717 + ] });
24718 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("figure", { ...external_wp_blockEditor_namespaceObject.useBlockProps.save({ className: classes }), children: figure });
24719 + }
24720 +
24721 +
24722 + ;// ./node_modules/@wordpress/block-library/build-module/image/transforms.js
24723 +
24724 +
24725 + function stripFirstImage(attributes, { shortcode }) {
24726 + const { body } = document.implementation.createHTMLDocument("");
24727 + body.innerHTML = shortcode.content;
24728 + let nodeToRemove = body.querySelector("img");
24729 + while (nodeToRemove && nodeToRemove.parentNode && nodeToRemove.parentNode !== body) {
24730 + nodeToRemove = nodeToRemove.parentNode;
24731 + }
24732 + if (nodeToRemove) {
24733 + nodeToRemove.parentNode.removeChild(nodeToRemove);
24734 + }
24735 + return body.innerHTML.trim();
24736 + }
24737 + function getFirstAnchorAttributeFormHTML(html, attributeName) {
24738 + const { body } = document.implementation.createHTMLDocument("");
24739 + body.innerHTML = html;
24740 + const { firstElementChild } = body;
24741 + if (firstElementChild && firstElementChild.nodeName === "A") {
24742 + return firstElementChild.getAttribute(attributeName) || void 0;
24743 + }
24744 + }
24745 + const imageSchema = {
24746 + img: {
24747 + attributes: ["src", "alt", "title"],
24748 + classes: [
24749 + "alignleft",
24750 + "aligncenter",
24751 + "alignright",
24752 + "alignnone",
24753 + /^wp-image-\d+$/
24754 + ]
24755 + }
24756 + };
24757 + const schema = ({ phrasingContentSchema }) => ({
24758 + figure: {
24759 + require: ["img"],
24760 + children: {
24761 + ...imageSchema,
24762 + a: {
24763 + attributes: ["href", "rel", "target"],
24764 + classes: ["*"],
24765 + children: imageSchema
24766 + },
24767 + figcaption: {
24768 + children: phrasingContentSchema
24769 + }
24770 + }
24771 + }
24772 + });
24773 + const image_transforms_transforms = {
24774 + from: [
24775 + {
24776 + type: "raw",
24777 + isMatch: (node) => node.nodeName === "FIGURE" && !!node.querySelector("img"),
24778 + schema,
24779 + transform: (node) => {
24780 + const className = node.className + " " + node.querySelector("img").className;
24781 + const alignMatches = /(?:^|\s)align(left|center|right)(?:$|\s)/.exec(
24782 + className
24783 + );
24784 + const anchor = node.id === "" ? void 0 : node.id;
24785 + const align = alignMatches ? alignMatches[1] : void 0;
24786 + const idMatches = /(?:^|\s)wp-image-(\d+)(?:$|\s)/.exec(
24787 + className
24788 + );
24789 + const id = idMatches ? Number(idMatches[1]) : void 0;
24790 + const anchorElement = node.querySelector("a");
24791 + const linkDestination = anchorElement && anchorElement.href ? "custom" : void 0;
24792 + const href = anchorElement && anchorElement.href ? anchorElement.href : void 0;
24793 + const rel = anchorElement && anchorElement.rel ? anchorElement.rel : void 0;
24794 + const linkClass = anchorElement && anchorElement.className ? anchorElement.className : void 0;
24795 + const attributes = (0,external_wp_blocks_namespaceObject.getBlockAttributes)(
24796 + "core/image",
24797 + node.outerHTML,
24798 + {
24799 + align,
24800 + id,
24801 + linkDestination,
24802 + href,
24803 + rel,
24804 + linkClass,
24805 + anchor
24806 + }
24807 + );
24808 + if ((0,external_wp_blob_namespaceObject.isBlobURL)(attributes.url)) {
24809 + attributes.blob = attributes.url;
24810 + delete attributes.url;
24811 + }
24812 + return (0,external_wp_blocks_namespaceObject.createBlock)("core/image", attributes);
24813 + }
24814 + },
24815 + {
24816 + // Note: when dragging and dropping multiple files onto a gallery this overrides the
24817 + // gallery transform in order to add new images to the gallery instead of
24818 + // creating a new gallery.
24819 + type: "files",
24820 + isMatch(files) {
24821 + return files.every(
24822 + (file) => file.type.indexOf("image/") === 0
24823 + );
24824 + },
24825 + transform(files) {
24826 + const blocks = files.map((file) => {
24827 + return (0,external_wp_blocks_namespaceObject.createBlock)("core/image", {
24828 + blob: (0,external_wp_blob_namespaceObject.createBlobURL)(file)
24829 + });
24830 + });
24831 + return blocks;
24832 + }
24833 + },
24834 + {
24835 + type: "shortcode",
24836 + tag: "caption",
24837 + attributes: {
24838 + url: {
24839 + type: "string",
24840 + source: "attribute",
24841 + attribute: "src",
24842 + selector: "img"
24843 + },
24844 + alt: {
24845 + type: "string",
24846 + source: "attribute",
24847 + attribute: "alt",
24848 + selector: "img"
24849 + },
24850 + caption: {
24851 + shortcode: stripFirstImage
24852 + },
24853 + href: {
24854 + shortcode: (attributes, { shortcode }) => {
24855 + return getFirstAnchorAttributeFormHTML(
24856 + shortcode.content,
24857 + "href"
24858 + );
24859 + }
24860 + },
24861 + rel: {
24862 + shortcode: (attributes, { shortcode }) => {
24863 + return getFirstAnchorAttributeFormHTML(
24864 + shortcode.content,
24865 + "rel"
24866 + );
24867 + }
24868 + },
24869 + linkClass: {
24870 + shortcode: (attributes, { shortcode }) => {
24871 + return getFirstAnchorAttributeFormHTML(
24872 + shortcode.content,
24873 + "class"
24874 + );
24875 + }
24876 + },
24877 + id: {
24878 + type: "number",
24879 + shortcode: ({ named: { id } }) => {
24880 + if (!id) {
24881 + return;
24882 + }
24883 + return parseInt(id.replace("attachment_", ""), 10);
24884 + }
24885 + },
24886 + align: {
24887 + type: "string",
24888 + shortcode: ({ named: { align = "alignnone" } }) => {
24889 + return align.replace("align", "");
24890 + }
24891 + }
24892 + }
24893 + }
24894 + ]
24895 + };
24896 + var image_transforms_transforms_default = image_transforms_transforms;
24897 +
24898 +
24899 + ;// ./node_modules/@wordpress/block-library/build-module/image/index.js
24900 +
24901 +
24902 +
24903 +
24904 +
24905 +
24906 +
24907 +
24908 + const { name: image_name } = image_block_namespaceObject;
24909 + const image_settings = {
24910 + icon: image_default,
24911 + example: {
24912 + attributes: {
24913 + sizeSlug: "large",
24914 + url: "https://s.w.org/images/core/5.3/MtBlanc1.jpg",
24915 + // translators: Caption accompanying an image of the Mont Blanc, which serves as an example for the Image block.
24916 + caption: (0,external_wp_i18n_namespaceObject.__)("Mont Blanc appears\u2014still, snowy, and serene.")
24917 + }
24918 + },
24919 + __experimentalLabel(attributes, { context }) {
24920 + const customName = attributes?.metadata?.name;
24921 + if (context === "list-view" && customName) {
24922 + return customName;
24923 + }
24924 + if (context === "accessibility") {
24925 + const { caption, alt, url } = attributes;
24926 + if (!url) {
24927 + return (0,external_wp_i18n_namespaceObject.__)("Empty");
24928 + }
24929 + if (!alt) {
24930 + return caption || "";
24931 + }
24932 + return alt + (caption ? ". " + caption : "");
24933 + }
24934 + },
24935 + getEditWrapperProps(attributes) {
24936 + return {
24937 + "data-align": attributes.align
24938 + };
24939 + },
24940 + transforms: image_transforms_transforms_default,
24941 + edit: image_edit_edit_default,
24942 + save: image_save_save,
24943 + deprecated: image_deprecated_deprecated_default
24944 + };
24945 + const image_init = () => initBlock({ name: image_name, metadata: image_block_namespaceObject, settings: image_settings });
24946 +
24947 +
24948 + ;// ./node_modules/@wordpress/icons/build-module/library/comment.js
24949 +
24950 +
24951 + var comment_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M18 4H6c-1.1 0-2 .9-2 2v12.9c0 .6.5 1.1 1.1 1.1.3 0 .5-.1.8-.3L8.5 17H18c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm.5 11c0 .3-.2.5-.5.5H7.9l-2.4 2.4V6c0-.3.2-.5.5-.5h12c.3 0 .5.2.5.5v9z" }) });
24952 +
24953 +
24954 + ;// ./node_modules/@wordpress/block-library/build-module/latest-comments/block.json
24955 + const latest_comments_block_namespaceObject = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/latest-comments","title":"Latest Comments","category":"widgets","description":"Display a list of your most recent comments.","keywords":["recent comments"],"textdomain":"default","attributes":{"commentsToShow":{"type":"number","default":5,"minimum":1,"maximum":100},"displayAvatar":{"type":"boolean","default":true},"displayDate":{"type":"boolean","default":true},"displayExcerpt":{"type":"boolean","default":true}},"supports":{"align":true,"color":{"gradients":true,"link":true,"__experimentalDefaultControls":{"background":true,"text":true,"link":true}},"html":false,"spacing":{"margin":true,"padding":true},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"interactivity":{"clientNavigation":true}},"editorStyle":"wp-block-latest-comments-editor","style":"wp-block-latest-comments"}');
24956 + ;// ./node_modules/@wordpress/block-library/build-module/latest-comments/edit.js
24957 +
24958 +
24959 +
24960 +
24961 +
24962 +
24963 + const MIN_COMMENTS = 1;
24964 + const MAX_COMMENTS = 100;
24965 + function LatestComments({ attributes, setAttributes }) {
24966 + const { commentsToShow, displayAvatar, displayDate, displayExcerpt } = attributes;
24967 + const serverSideAttributes = {
24968 + ...attributes,
24969 + style: {
24970 + ...attributes?.style,
24971 + spacing: void 0
24972 + }
24973 + };
24974 + const dropdownMenuProps = useToolsPanelDropdownMenuProps();
24975 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", { ...(0,external_wp_blockEditor_namespaceObject.useBlockProps)(), children: [
24976 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(
24977 + external_wp_components_namespaceObject.__experimentalToolsPanel,
24978 + {
24979 + label: (0,external_wp_i18n_namespaceObject.__)("Settings"),
24980 + resetAll: () => {
24981 + setAttributes({
24982 + commentsToShow: 5,
24983 + displayAvatar: true,
24984 + displayDate: true,
24985 + displayExcerpt: true
24986 + });
24987 + },
24988 + dropdownMenuProps,
24989 + children: [
24990 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
24991 + external_wp_components_namespaceObject.__experimentalToolsPanelItem,
24992 + {
24993 + hasValue: () => !displayAvatar,
24994 + label: (0,external_wp_i18n_namespaceObject.__)("Display avatar"),
24995 + onDeselect: () => setAttributes({ displayAvatar: true }),
24996 + isShownByDefault: true,
24997 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
24998 + external_wp_components_namespaceObject.ToggleControl,
24999 + {
25000 + __nextHasNoMarginBottom: true,
25001 + label: (0,external_wp_i18n_namespaceObject.__)("Display avatar"),
25002 + checked: displayAvatar,
25003 + onChange: () => setAttributes({
25004 + displayAvatar: !displayAvatar
25005 + })
25006 + }
25007 + )
25008 + }
25009 + ),
25010 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
25011 + external_wp_components_namespaceObject.__experimentalToolsPanelItem,
25012 + {
25013 + hasValue: () => !displayDate,
25014 + label: (0,external_wp_i18n_namespaceObject.__)("Display date"),
25015 + onDeselect: () => setAttributes({ displayDate: true }),
25016 + isShownByDefault: true,
25017 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
25018 + external_wp_components_namespaceObject.ToggleControl,
25019 + {
25020 + __nextHasNoMarginBottom: true,
25021 + label: (0,external_wp_i18n_namespaceObject.__)("Display date"),
25022 + checked: displayDate,
25023 + onChange: () => setAttributes({ displayDate: !displayDate })
25024 + }
25025 + )
25026 + }
25027 + ),
25028 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
25029 + external_wp_components_namespaceObject.__experimentalToolsPanelItem,
25030 + {
25031 + hasValue: () => !displayExcerpt,
25032 + label: (0,external_wp_i18n_namespaceObject.__)("Display excerpt"),
25033 + onDeselect: () => setAttributes({ displayExcerpt: true }),
25034 + isShownByDefault: true,
25035 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
25036 + external_wp_components_namespaceObject.ToggleControl,
25037 + {
25038 + __nextHasNoMarginBottom: true,
25039 + label: (0,external_wp_i18n_namespaceObject.__)("Display excerpt"),
25040 + checked: displayExcerpt,
25041 + onChange: () => setAttributes({
25042 + displayExcerpt: !displayExcerpt
25043 + })
25044 + }
25045 + )
25046 + }
25047 + ),
25048 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
25049 + external_wp_components_namespaceObject.__experimentalToolsPanelItem,
25050 + {
25051 + hasValue: () => commentsToShow !== 5,
25052 + label: (0,external_wp_i18n_namespaceObject.__)("Number of comments"),
25053 + onDeselect: () => setAttributes({ commentsToShow: 5 }),
25054 + isShownByDefault: true,
25055 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
25056 + external_wp_components_namespaceObject.RangeControl,
25057 + {
25058 + __nextHasNoMarginBottom: true,
25059 + __next40pxDefaultSize: true,
25060 + label: (0,external_wp_i18n_namespaceObject.__)("Number of comments"),
25061 + value: commentsToShow,
25062 + onChange: (value) => setAttributes({ commentsToShow: value }),
25063 + min: MIN_COMMENTS,
25064 + max: MAX_COMMENTS,
25065 + required: true
25066 + }
25067 + )
25068 + }
25069 + )
25070 + ]
25071 + }
25072 + ) }),
25073 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Disabled, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
25074 + (external_wp_serverSideRender_default()),
25075 + {
25076 + block: "core/latest-comments",
25077 + attributes: serverSideAttributes,
25078 + urlQueryArgs: { _locale: "site" }
25079 + }
25080 + ) })
25081 + ] });
25082 + }
25083 +
25084 +
25085 + ;// ./node_modules/@wordpress/block-library/build-module/latest-comments/index.js
25086 +
25087 +
25088 +
25089 +
25090 + const { name: latest_comments_name } = latest_comments_block_namespaceObject;
25091 + const latest_comments_settings = {
25092 + icon: comment_default,
25093 + example: {},
25094 + edit: LatestComments
25095 + };
25096 + const latest_comments_init = () => initBlock({ name: latest_comments_name, metadata: latest_comments_block_namespaceObject, settings: latest_comments_settings });
25097 +
25098 +
25099 + ;// ./node_modules/@wordpress/icons/build-module/library/post-list.js
25100 +
25101 +
25102 + var post_list_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M18 5.5H6a.5.5 0 0 0-.5.5v12a.5.5 0 0 0 .5.5h12a.5.5 0 0 0 .5-.5V6a.5.5 0 0 0-.5-.5ZM6 4h12a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2Zm1 5h1.5v1.5H7V9Zm1.5 4.5H7V15h1.5v-1.5ZM10 9h7v1.5h-7V9Zm7 4.5h-7V15h7v-1.5Z" }) });
25103 +
25104 +
25105 + ;// ./node_modules/@wordpress/block-library/build-module/latest-posts/block.json
25106 + const latest_posts_block_namespaceObject = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/latest-posts","title":"Latest Posts","category":"widgets","description":"Display a list of your most recent posts.","keywords":["recent posts"],"textdomain":"default","attributes":{"categories":{"type":"array","items":{"type":"object"}},"selectedAuthor":{"type":"number"},"postsToShow":{"type":"number","default":5},"displayPostContent":{"type":"boolean","default":false},"displayPostContentRadio":{"type":"string","default":"excerpt"},"excerptLength":{"type":"number","default":55},"displayAuthor":{"type":"boolean","default":false},"displayPostDate":{"type":"boolean","default":false},"postLayout":{"type":"string","default":"list"},"columns":{"type":"number","default":3},"order":{"type":"string","default":"desc"},"orderBy":{"type":"string","default":"date"},"displayFeaturedImage":{"type":"boolean","default":false},"featuredImageAlign":{"type":"string","enum":["left","center","right"]},"featuredImageSizeSlug":{"type":"string","default":"thumbnail"},"featuredImageSizeWidth":{"type":"number","default":null},"featuredImageSizeHeight":{"type":"number","default":null},"addLinkToFeaturedImage":{"type":"boolean","default":false}},"supports":{"align":true,"html":false,"color":{"gradients":true,"link":true,"__experimentalDefaultControls":{"background":true,"text":true,"link":true}},"spacing":{"margin":true,"padding":true},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"__experimentalBorder":{"radius":true,"color":true,"width":true,"style":true,"__experimentalDefaultControls":{"radius":true,"color":true,"width":true,"style":true}},"interactivity":{"clientNavigation":true}},"editorStyle":"wp-block-latest-posts-editor","style":"wp-block-latest-posts"}');
25107 + ;// ./node_modules/@wordpress/block-library/build-module/latest-posts/deprecated.js
25108 +
25109 + const { attributes: deprecated_attributes } = latest_posts_block_namespaceObject;
25110 + var latest_posts_deprecated_deprecated_default = [
25111 + {
25112 + attributes: {
25113 + ...deprecated_attributes,
25114 + categories: {
25115 + type: "string"
25116 + }
25117 + },
25118 + supports: {
25119 + align: true,
25120 + html: false
25121 + },
25122 + migrate: (oldAttributes) => {
25123 + return {
25124 + ...oldAttributes,
25125 + categories: [{ id: Number(oldAttributes.categories) }]
25126 + };
25127 + },
25128 + isEligible: ({ categories }) => categories && "string" === typeof categories,
25129 + save: () => null
25130 + }
25131 + ];
25132 +
25133 +
25134 + ;// ./node_modules/@wordpress/icons/build-module/library/align-none.js
25135 +
25136 +
25137 + var align_none_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M19 5.5H5V4h14v1.5ZM19 20H5v-1.5h14V20ZM5 9h14v6H5V9Z" }) });
25138 +
25139 +
25140 + ;// ./node_modules/@wordpress/icons/build-module/library/position-left.js
25141 +
25142 +
25143 + var position_left_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M5 5.5h8V4H5v1.5ZM5 20h8v-1.5H5V20ZM19 9H5v6h14V9Z" }) });
25144 +
25145 +
25146 + ;// ./node_modules/@wordpress/icons/build-module/library/position-center.js
25147 +
25148 +
25149 + var position_center_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M19 5.5H5V4h14v1.5ZM19 20H5v-1.5h14V20ZM7 9h10v6H7V9Z" }) });
25150 +
25151 +
25152 + ;// ./node_modules/@wordpress/icons/build-module/library/position-right.js
25153 +
25154 +
25155 + var position_right_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M19 5.5h-8V4h8v1.5ZM19 20h-8v-1.5h8V20ZM5 9h14v6H5V9Z" }) });
25156 +
25157 +
25158 + ;// ./node_modules/@wordpress/icons/build-module/library/list.js
25159 +
25160 +
25161 + var list_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M4 4v1.5h16V4H4zm8 8.5h8V11h-8v1.5zM4 20h16v-1.5H4V20zm4-8c0-1.1-.9-2-2-2s-2 .9-2 2 .9 2 2 2 2-.9 2-2z" }) });
25162 +
25163 +
25164 + ;// ./node_modules/@wordpress/block-library/build-module/latest-posts/constants.js
25165 + const MIN_EXCERPT_LENGTH = 10;
25166 + const MAX_EXCERPT_LENGTH = 100;
25167 + const MAX_POSTS_COLUMNS = 6;
25168 + const DEFAULT_EXCERPT_LENGTH = 55;
25169 +
25170 +
25171 + ;// ./node_modules/@wordpress/block-library/build-module/latest-posts/edit.js
25172 +
25173 +
25174 +
25175 +
25176 +
25177 +
25178 +
25179 +
25180 +
25181 +
25182 +
25183 +
25184 +
25185 +
25186 + const CATEGORIES_LIST_QUERY = {
25187 + per_page: -1,
25188 + _fields: "id,name",
25189 + context: "view"
25190 + };
25191 + const USERS_LIST_QUERY = {
25192 + per_page: -1,
25193 + has_published_posts: ["post"],
25194 + context: "view"
25195 + };
25196 + const imageAlignmentOptions = [
25197 + {
25198 + value: "none",
25199 + icon: align_none_default,
25200 + label: (0,external_wp_i18n_namespaceObject.__)("None")
25201 + },
25202 + {
25203 + value: "left",
25204 + icon: position_left_default,
25205 + label: (0,external_wp_i18n_namespaceObject.__)("Left")
25206 + },
25207 + {
25208 + value: "center",
25209 + icon: position_center_default,
25210 + label: (0,external_wp_i18n_namespaceObject.__)("Center")
25211 + },
25212 + {
25213 + value: "right",
25214 + icon: position_right_default,
25215 + label: (0,external_wp_i18n_namespaceObject.__)("Right")
25216 + }
25217 + ];
25218 + function getFeaturedImageDetails(post, size) {
25219 + const image = post._embedded?.["wp:featuredmedia"]?.["0"];
25220 + return {
25221 + url: image?.media_details?.sizes?.[size]?.source_url ?? image?.source_url,
25222 + alt: image?.alt_text
25223 + };
25224 + }
25225 + function getCurrentAuthor(post) {
25226 + return post._embedded?.author?.[0];
25227 + }
25228 + function Controls({ attributes, setAttributes, postCount }) {
25229 + const {
25230 + postsToShow,
25231 + order,
25232 + orderBy,
25233 + categories,
25234 + selectedAuthor,
25235 + displayFeaturedImage,
25236 + displayPostContentRadio,
25237 + displayPostContent,
25238 + displayPostDate,
25239 + displayAuthor,
25240 + postLayout,
25241 + columns,
25242 + excerptLength,
25243 + featuredImageAlign,
25244 + featuredImageSizeSlug,
25245 + featuredImageSizeWidth,
25246 + featuredImageSizeHeight,
25247 + addLinkToFeaturedImage
25248 + } = attributes;
25249 + const {
25250 + imageSizes,
25251 + defaultImageWidth,
25252 + defaultImageHeight,
25253 + categoriesList,
25254 + authorList
25255 + } = (0,external_wp_data_namespaceObject.useSelect)(
25256 + (select) => {
25257 + const { getEntityRecords, getUsers } = select(external_wp_coreData_namespaceObject.store);
25258 + const settings = select(external_wp_blockEditor_namespaceObject.store).getSettings();
25259 + return {
25260 + defaultImageWidth: settings.imageDimensions?.[featuredImageSizeSlug]?.width ?? 0,
25261 + defaultImageHeight: settings.imageDimensions?.[featuredImageSizeSlug]?.height ?? 0,
25262 + imageSizes: settings.imageSizes,
25263 + categoriesList: getEntityRecords(
25264 + "taxonomy",
25265 + "category",
25266 + CATEGORIES_LIST_QUERY
25267 + ),
25268 + authorList: getUsers(USERS_LIST_QUERY)
25269 + };
25270 + },
25271 + [featuredImageSizeSlug]
25272 + );
25273 + const dropdownMenuProps = useToolsPanelDropdownMenuProps();
25274 + const imageSizeOptions = imageSizes.filter(({ slug }) => slug !== "full").map(({ name, slug }) => ({
25275 + value: slug,
25276 + label: name
25277 + }));
25278 + const categorySuggestions = categoriesList?.reduce(
25279 + (accumulator, category) => ({
25280 + ...accumulator,
25281 + [category.name]: category
25282 + }),
25283 + {}
25284 + ) ?? {};
25285 + const selectCategories = (tokens) => {
25286 + const hasNoSuggestion = tokens.some(
25287 + (token) => typeof token === "string" && !categorySuggestions[token]
25288 + );
25289 + if (hasNoSuggestion) {
25290 + return;
25291 + }
25292 + const allCategories = tokens.map((token) => {
25293 + return typeof token === "string" ? categorySuggestions[token] : token;
25294 + });
25295 + if (allCategories.includes(null)) {
25296 + return false;
25297 + }
25298 + setAttributes({ categories: allCategories });
25299 + };
25300 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
25301 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(
25302 + external_wp_components_namespaceObject.__experimentalToolsPanel,
25303 + {
25304 + label: (0,external_wp_i18n_namespaceObject.__)("Post content"),
25305 + resetAll: () => setAttributes({
25306 + displayPostContent: false,
25307 + displayPostContentRadio: "excerpt",
25308 + excerptLength: DEFAULT_EXCERPT_LENGTH
25309 + }),
25310 + dropdownMenuProps,
25311 + children: [
25312 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
25313 + external_wp_components_namespaceObject.__experimentalToolsPanelItem,
25314 + {
25315 + hasValue: () => !!displayPostContent,
25316 + label: (0,external_wp_i18n_namespaceObject.__)("Display post content"),
25317 + onDeselect: () => setAttributes({ displayPostContent: false }),
25318 + isShownByDefault: true,
25319 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
25320 + external_wp_components_namespaceObject.ToggleControl,
25321 + {
25322 + __nextHasNoMarginBottom: true,
25323 + label: (0,external_wp_i18n_namespaceObject.__)("Display post content"),
25324 + checked: displayPostContent,
25325 + onChange: (value) => setAttributes({ displayPostContent: value })
25326 + }
25327 + )
25328 + }
25329 + ),
25330 + displayPostContent && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
25331 + external_wp_components_namespaceObject.__experimentalToolsPanelItem,
25332 + {
25333 + hasValue: () => displayPostContentRadio !== "excerpt",
25334 + label: (0,external_wp_i18n_namespaceObject.__)("Content length"),
25335 + onDeselect: () => setAttributes({
25336 + displayPostContentRadio: "excerpt"
25337 + }),
25338 + isShownByDefault: true,
25339 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
25340 + external_wp_components_namespaceObject.RadioControl,
25341 + {
25342 + label: (0,external_wp_i18n_namespaceObject.__)("Content length"),
25343 + selected: displayPostContentRadio,
25344 + options: [
25345 + { label: (0,external_wp_i18n_namespaceObject.__)("Excerpt"), value: "excerpt" },
25346 + {
25347 + label: (0,external_wp_i18n_namespaceObject.__)("Full post"),
25348 + value: "full_post"
25349 + }
25350 + ],
25351 + onChange: (value) => setAttributes({
25352 + displayPostContentRadio: value
25353 + })
25354 + }
25355 + )
25356 + }
25357 + ),
25358 + displayPostContent && displayPostContentRadio === "excerpt" && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
25359 + external_wp_components_namespaceObject.__experimentalToolsPanelItem,
25360 + {
25361 + hasValue: () => excerptLength !== DEFAULT_EXCERPT_LENGTH,
25362 + label: (0,external_wp_i18n_namespaceObject.__)("Max number of words"),
25363 + onDeselect: () => setAttributes({
25364 + excerptLength: DEFAULT_EXCERPT_LENGTH
25365 + }),
25366 + isShownByDefault: true,
25367 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
25368 + external_wp_components_namespaceObject.RangeControl,
25369 + {
25370 + __nextHasNoMarginBottom: true,
25371 + __next40pxDefaultSize: true,
25372 + label: (0,external_wp_i18n_namespaceObject.__)("Max number of words"),
25373 + value: excerptLength,
25374 + onChange: (value) => setAttributes({ excerptLength: value }),
25375 + min: MIN_EXCERPT_LENGTH,
25376 + max: MAX_EXCERPT_LENGTH
25377 + }
25378 + )
25379 + }
25380 + )
25381 + ]
25382 + }
25383 + ),
25384 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(
25385 + external_wp_components_namespaceObject.__experimentalToolsPanel,
25386 + {
25387 + label: (0,external_wp_i18n_namespaceObject.__)("Post meta"),
25388 + resetAll: () => setAttributes({
25389 + displayAuthor: false,
25390 + displayPostDate: false
25391 + }),
25392 + dropdownMenuProps,
25393 + children: [
25394 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
25395 + external_wp_components_namespaceObject.__experimentalToolsPanelItem,
25396 + {
25397 + hasValue: () => !!displayAuthor,
25398 + label: (0,external_wp_i18n_namespaceObject.__)("Display author name"),
25399 + onDeselect: () => setAttributes({ displayAuthor: false }),
25400 + isShownByDefault: true,
25401 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
25402 + external_wp_components_namespaceObject.ToggleControl,
25403 + {
25404 + __nextHasNoMarginBottom: true,
25405 + label: (0,external_wp_i18n_namespaceObject.__)("Display author name"),
25406 + checked: displayAuthor,
25407 + onChange: (value) => setAttributes({ displayAuthor: value })
25408 + }
25409 + )
25410 + }
25411 + ),
25412 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
25413 + external_wp_components_namespaceObject.__experimentalToolsPanelItem,
25414 + {
25415 + hasValue: () => !!displayPostDate,
25416 + label: (0,external_wp_i18n_namespaceObject.__)("Display post date"),
25417 + onDeselect: () => setAttributes({ displayPostDate: false }),
25418 + isShownByDefault: true,
25419 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
25420 + external_wp_components_namespaceObject.ToggleControl,
25421 + {
25422 + __nextHasNoMarginBottom: true,
25423 + label: (0,external_wp_i18n_namespaceObject.__)("Display post date"),
25424 + checked: displayPostDate,
25425 + onChange: (value) => setAttributes({ displayPostDate: value })
25426 + }
25427 + )
25428 + }
25429 + )
25430 + ]
25431 + }
25432 + ),
25433 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(
25434 + external_wp_components_namespaceObject.__experimentalToolsPanel,
25435 + {
25436 + label: (0,external_wp_i18n_namespaceObject.__)("Featured image"),
25437 + resetAll: () => setAttributes({
25438 + displayFeaturedImage: false,
25439 + featuredImageAlign: void 0,
25440 + featuredImageSizeSlug: "thumbnail",
25441 + featuredImageSizeWidth: null,
25442 + featuredImageSizeHeight: null,
25443 + addLinkToFeaturedImage: false
25444 + }),
25445 + dropdownMenuProps,
25446 + children: [
25447 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
25448 + external_wp_components_namespaceObject.__experimentalToolsPanelItem,
25449 + {
25450 + hasValue: () => !!displayFeaturedImage,
25451 + label: (0,external_wp_i18n_namespaceObject.__)("Display featured image"),
25452 + onDeselect: () => setAttributes({ displayFeaturedImage: false }),
25453 + isShownByDefault: true,
25454 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
25455 + external_wp_components_namespaceObject.ToggleControl,
25456 + {
25457 + __nextHasNoMarginBottom: true,
25458 + label: (0,external_wp_i18n_namespaceObject.__)("Display featured image"),
25459 + checked: displayFeaturedImage,
25460 + onChange: (value) => setAttributes({ displayFeaturedImage: value })
25461 + }
25462 + )
25463 + }
25464 + ),
25465 + displayFeaturedImage && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
25466 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
25467 + external_wp_components_namespaceObject.__experimentalToolsPanelItem,
25468 + {
25469 + hasValue: () => featuredImageSizeSlug !== "thumbnail" || featuredImageSizeWidth !== null || featuredImageSizeHeight !== null,
25470 + label: (0,external_wp_i18n_namespaceObject.__)("Image size"),
25471 + onDeselect: () => setAttributes({
25472 + featuredImageSizeSlug: "thumbnail",
25473 + featuredImageSizeWidth: null,
25474 + featuredImageSizeHeight: null
25475 + }),
25476 + isShownByDefault: true,
25477 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
25478 + external_wp_blockEditor_namespaceObject.__experimentalImageSizeControl,
25479 + {
25480 + onChange: (value) => {
25481 + const newAttrs = {};
25482 + if (value.hasOwnProperty("width")) {
25483 + newAttrs.featuredImageSizeWidth = value.width;
25484 + }
25485 + if (value.hasOwnProperty("height")) {
25486 + newAttrs.featuredImageSizeHeight = value.height;
25487 + }
25488 + setAttributes(newAttrs);
25489 + },
25490 + slug: featuredImageSizeSlug,
25491 + width: featuredImageSizeWidth,
25492 + height: featuredImageSizeHeight,
25493 + imageWidth: defaultImageWidth,
25494 + imageHeight: defaultImageHeight,
25495 + imageSizeOptions,
25496 + imageSizeHelp: (0,external_wp_i18n_namespaceObject.__)(
25497 + "Select the size of the source image."
25498 + ),
25499 + onChangeImage: (value) => setAttributes({
25500 + featuredImageSizeSlug: value,
25501 + featuredImageSizeWidth: void 0,
25502 + featuredImageSizeHeight: void 0
25503 + })
25504 + }
25505 + )
25506 + }
25507 + ),
25508 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
25509 + external_wp_components_namespaceObject.__experimentalToolsPanelItem,
25510 + {
25511 + hasValue: () => !!featuredImageAlign,
25512 + label: (0,external_wp_i18n_namespaceObject.__)("Image alignment"),
25513 + onDeselect: () => setAttributes({
25514 + featuredImageAlign: void 0
25515 + }),
25516 + isShownByDefault: true,
25517 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
25518 + external_wp_components_namespaceObject.__experimentalToggleGroupControl,
25519 + {
25520 + className: "editor-latest-posts-image-alignment-control",
25521 + __nextHasNoMarginBottom: true,
25522 + __next40pxDefaultSize: true,
25523 + label: (0,external_wp_i18n_namespaceObject.__)("Image alignment"),
25524 + value: featuredImageAlign || "none",
25525 + onChange: (value) => setAttributes({
25526 + featuredImageAlign: value !== "none" ? value : void 0
25527 + }),
25528 + children: imageAlignmentOptions.map(
25529 + ({ value, icon, label }) => {
25530 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
25531 + external_wp_components_namespaceObject.__experimentalToggleGroupControlOptionIcon,
25532 + {
25533 + value,
25534 + icon,
25535 + label
25536 + },
25537 + value
25538 + );
25539 + }
25540 + )
25541 + }
25542 + )
25543 + }
25544 + ),
25545 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
25546 + external_wp_components_namespaceObject.__experimentalToolsPanelItem,
25547 + {
25548 + hasValue: () => !!addLinkToFeaturedImage,
25549 + label: (0,external_wp_i18n_namespaceObject.__)("Add link to featured image"),
25550 + onDeselect: () => setAttributes({
25551 + addLinkToFeaturedImage: false
25552 + }),
25553 + isShownByDefault: true,
25554 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
25555 + external_wp_components_namespaceObject.ToggleControl,
25556 + {
25557 + __nextHasNoMarginBottom: true,
25558 + label: (0,external_wp_i18n_namespaceObject.__)("Add link to featured image"),
25559 + checked: addLinkToFeaturedImage,
25560 + onChange: (value) => setAttributes({
25561 + addLinkToFeaturedImage: value
25562 + })
25563 + }
25564 + )
25565 + }
25566 + )
25567 + ] })
25568 + ]
25569 + }
25570 + ),
25571 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(
25572 + external_wp_components_namespaceObject.__experimentalToolsPanel,
25573 + {
25574 + label: (0,external_wp_i18n_namespaceObject.__)("Sorting and filtering"),
25575 + resetAll: () => setAttributes({
25576 + order: "desc",
25577 + orderBy: "date",
25578 + postsToShow: 5,
25579 + categories: void 0,
25580 + selectedAuthor: void 0,
25581 + columns: 3
25582 + }),
25583 + dropdownMenuProps,
25584 + children: [
25585 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
25586 + external_wp_components_namespaceObject.__experimentalToolsPanelItem,
25587 + {
25588 + hasValue: () => order !== "desc" || orderBy !== "date" || postsToShow !== 5 || categories?.length > 0 || !!selectedAuthor,
25589 + label: (0,external_wp_i18n_namespaceObject.__)("Sort and filter"),
25590 + onDeselect: () => setAttributes({
25591 + order: "desc",
25592 + orderBy: "date",
25593 + postsToShow: 5,
25594 + categories: void 0,
25595 + selectedAuthor: void 0
25596 + }),
25597 + isShownByDefault: true,
25598 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
25599 + external_wp_components_namespaceObject.QueryControls,
25600 + {
25601 + ...{ order, orderBy },
25602 + numberOfItems: postsToShow,
25603 + onOrderChange: (value) => setAttributes({ order: value }),
25604 + onOrderByChange: (value) => setAttributes({ orderBy: value }),
25605 + onNumberOfItemsChange: (value) => setAttributes({ postsToShow: value }),
25606 + categorySuggestions,
25607 + onCategoryChange: selectCategories,
25608 + selectedCategories: categories,
25609 + onAuthorChange: (value) => setAttributes({
25610 + selectedAuthor: "" !== value ? Number(value) : void 0
25611 + }),
25612 + authorList: authorList ?? [],
25613 + selectedAuthorId: selectedAuthor
25614 + }
25615 + )
25616 + }
25617 + ),
25618 + postLayout === "grid" && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
25619 + external_wp_components_namespaceObject.__experimentalToolsPanelItem,
25620 + {
25621 + hasValue: () => columns !== 3,
25622 + label: (0,external_wp_i18n_namespaceObject.__)("Columns"),
25623 + onDeselect: () => setAttributes({
25624 + columns: 3
25625 + }),
25626 + isShownByDefault: true,
25627 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
25628 + external_wp_components_namespaceObject.RangeControl,
25629 + {
25630 + __nextHasNoMarginBottom: true,
25631 + __next40pxDefaultSize: true,
25632 + label: (0,external_wp_i18n_namespaceObject.__)("Columns"),
25633 + value: columns,
25634 + onChange: (value) => setAttributes({ columns: value }),
25635 + min: 2,
25636 + max: !postCount ? MAX_POSTS_COLUMNS : Math.min(MAX_POSTS_COLUMNS, postCount),
25637 + required: true
25638 + }
25639 + )
25640 + }
25641 + )
25642 + ]
25643 + }
25644 + )
25645 + ] });
25646 + }
25647 + function LatestPostsEdit({ attributes, setAttributes }) {
25648 + const instanceId = (0,external_wp_compose_namespaceObject.useInstanceId)(LatestPostsEdit);
25649 + const {
25650 + postsToShow,
25651 + order,
25652 + orderBy,
25653 + categories,
25654 + selectedAuthor,
25655 + displayFeaturedImage,
25656 + displayPostContentRadio,
25657 + displayPostContent,
25658 + displayPostDate,
25659 + displayAuthor,
25660 + postLayout,
25661 + columns,
25662 + excerptLength,
25663 + featuredImageAlign,
25664 + featuredImageSizeSlug,
25665 + featuredImageSizeWidth,
25666 + featuredImageSizeHeight,
25667 + addLinkToFeaturedImage
25668 + } = attributes;
25669 + const { latestPosts } = (0,external_wp_data_namespaceObject.useSelect)(
25670 + (select) => {
25671 + const { getEntityRecords } = select(external_wp_coreData_namespaceObject.store);
25672 + const catIds = categories && categories.length > 0 ? categories.map((cat) => cat.id) : [];
25673 + const latestPostsQuery = Object.fromEntries(
25674 + Object.entries({
25675 + categories: catIds,
25676 + author: selectedAuthor,
25677 + order,
25678 + orderby: orderBy,
25679 + per_page: postsToShow,
25680 + _embed: "author,wp:featuredmedia",
25681 + ignore_sticky: true
25682 + }).filter(([, value]) => typeof value !== "undefined")
25683 + );
25684 + return {
25685 + latestPosts: getEntityRecords(
25686 + "postType",
25687 + "post",
25688 + latestPostsQuery
25689 + )
25690 + };
25691 + },
25692 + [postsToShow, order, orderBy, categories, selectedAuthor]
25693 + );
25694 + const { createWarningNotice } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_notices_namespaceObject.store);
25695 + const showRedirectionPreventedNotice = (event) => {
25696 + event.preventDefault();
25697 + createWarningNotice((0,external_wp_i18n_namespaceObject.__)("Links are disabled in the editor."), {
25698 + id: `block-library/core/latest-posts/redirection-prevented/${instanceId}`,
25699 + type: "snackbar"
25700 + });
25701 + };
25702 + const hasPosts = !!latestPosts?.length;
25703 + const inspectorControls = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
25704 + Controls,
25705 + {
25706 + attributes,
25707 + setAttributes,
25708 + postCount: latestPosts?.length ?? 0
25709 + }
25710 + ) });
25711 + const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)({
25712 + className: dist_clsx({
25713 + "wp-block-latest-posts__list": true,
25714 + "is-grid": postLayout === "grid",
25715 + "has-dates": displayPostDate,
25716 + "has-author": displayAuthor,
25717 + [`columns-${columns}`]: postLayout === "grid"
25718 + })
25719 + });
25720 + if (!hasPosts) {
25721 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", { ...blockProps, children: [
25722 + inspectorControls,
25723 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Placeholder, { icon: pin_default, label: (0,external_wp_i18n_namespaceObject.__)("Latest Posts"), children: !Array.isArray(latestPosts) ? /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Spinner, {}) : (0,external_wp_i18n_namespaceObject.__)("No posts found.") })
25724 + ] });
25725 + }
25726 + const displayPosts = latestPosts.length > postsToShow ? latestPosts.slice(0, postsToShow) : latestPosts;
25727 + const layoutControls = [
25728 + {
25729 + icon: list_default,
25730 + title: (0,external_wp_i18n_namespaceObject._x)("List view", "Latest posts block display setting"),
25731 + onClick: () => setAttributes({ postLayout: "list" }),
25732 + isActive: postLayout === "list"
25733 + },
25734 + {
25735 + icon: grid_default,
25736 + title: (0,external_wp_i18n_namespaceObject._x)("Grid view", "Latest posts block display setting"),
25737 + onClick: () => setAttributes({ postLayout: "grid" }),
25738 + isActive: postLayout === "grid"
25739 + }
25740 + ];
25741 + const dateFormat = (0,external_wp_date_namespaceObject.getSettings)().formats.date;
25742 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
25743 + inspectorControls,
25744 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockControls, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ToolbarGroup, { controls: layoutControls }) }),
25745 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("ul", { ...blockProps, children: displayPosts.map((post) => {
25746 + const titleTrimmed = post.title.rendered.trim();
25747 + let excerpt = post.excerpt.rendered;
25748 + const currentAuthor = getCurrentAuthor(post);
25749 + const excerptElement = document.createElement("div");
25750 + excerptElement.innerHTML = excerpt;
25751 + excerpt = excerptElement.textContent || excerptElement.innerText || "";
25752 + const { url: imageSourceUrl, alt: featuredImageAlt } = getFeaturedImageDetails(post, featuredImageSizeSlug);
25753 + const imageClasses = dist_clsx({
25754 + "wp-block-latest-posts__featured-image": true,
25755 + [`align${featuredImageAlign}`]: !!featuredImageAlign
25756 + });
25757 + const renderFeaturedImage = displayFeaturedImage && imageSourceUrl;
25758 + const featuredImage = renderFeaturedImage && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
25759 + "img",
25760 + {
25761 + src: imageSourceUrl,
25762 + alt: featuredImageAlt,
25763 + style: {
25764 + maxWidth: featuredImageSizeWidth,
25765 + maxHeight: featuredImageSizeHeight
25766 + }
25767 + }
25768 + );
25769 + const needsReadMore = excerptLength < excerpt.trim().split(" ").length && post.excerpt.raw === "";
25770 + const postExcerpt = needsReadMore ? /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
25771 + excerpt.trim().split(" ", excerptLength).join(" "),
25772 + (0,external_wp_element_namespaceObject.createInterpolateElement)(
25773 + (0,external_wp_i18n_namespaceObject.sprintf)(
25774 + /* translators: 1: Hidden accessibility text: Post title */
25775 + (0,external_wp_i18n_namespaceObject.__)(
25776 + "\u2026 <a>Read more<span>: %1$s</span></a>"
25777 + ),
25778 + titleTrimmed || (0,external_wp_i18n_namespaceObject.__)("(no title)")
25779 + ),
25780 + {
25781 + a: (
25782 + // eslint-disable-next-line jsx-a11y/anchor-has-content
25783 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
25784 + "a",
25785 + {
25786 + className: "wp-block-latest-posts__read-more",
25787 + href: post.link,
25788 + rel: "noopener noreferrer",
25789 + onClick: showRedirectionPreventedNotice
25790 + }
25791 + )
25792 + ),
25793 + span: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("span", { className: "screen-reader-text" })
25794 + }
25795 + )
25796 + ] }) : excerpt;
25797 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("li", { children: [
25798 + renderFeaturedImage && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { className: imageClasses, children: addLinkToFeaturedImage ? /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
25799 + "a",
25800 + {
25801 + href: post.link,
25802 + onClick: showRedirectionPreventedNotice,
25803 + children: featuredImage
25804 + }
25805 + ) : featuredImage }),
25806 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
25807 + "a",
25808 + {
25809 + className: "wp-block-latest-posts__post-title",
25810 + href: post.link,
25811 + dangerouslySetInnerHTML: !!titleTrimmed ? {
25812 + __html: titleTrimmed
25813 + } : void 0,
25814 + onClick: showRedirectionPreventedNotice,
25815 + children: !titleTrimmed ? (0,external_wp_i18n_namespaceObject.__)("(no title)") : null
25816 + }
25817 + ),
25818 + displayAuthor && currentAuthor && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { className: "wp-block-latest-posts__post-author", children: (0,external_wp_i18n_namespaceObject.sprintf)(
25819 + /* translators: byline. %s: author. */
25820 + (0,external_wp_i18n_namespaceObject.__)("by %s"),
25821 + currentAuthor.name
25822 + ) }),
25823 + displayPostDate && post.date_gmt && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
25824 + "time",
25825 + {
25826 + dateTime: (0,external_wp_date_namespaceObject.format)("c", post.date_gmt),
25827 + className: "wp-block-latest-posts__post-date",
25828 + children: (0,external_wp_date_namespaceObject.dateI18n)(dateFormat, post.date_gmt)
25829 + }
25830 + ),
25831 + displayPostContent && displayPostContentRadio === "excerpt" && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { className: "wp-block-latest-posts__post-excerpt", children: postExcerpt }),
25832 + displayPostContent && displayPostContentRadio === "full_post" && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
25833 + "div",
25834 + {
25835 + className: "wp-block-latest-posts__post-full-content",
25836 + dangerouslySetInnerHTML: {
25837 + __html: post.content.raw.trim()
25838 + }
25839 + }
25840 + )
25841 + ] }, post.id);
25842 + }) })
25843 + ] });
25844 + }
25845 +
25846 +
25847 + ;// ./node_modules/@wordpress/block-library/build-module/latest-posts/index.js
25848 +
25849 +
25850 +
25851 +
25852 +
25853 + const { name: latest_posts_name } = latest_posts_block_namespaceObject;
25854 + const latest_posts_settings = {
25855 + icon: post_list_default,
25856 + example: {},
25857 + edit: LatestPostsEdit,
25858 + deprecated: latest_posts_deprecated_deprecated_default
25859 + };
25860 + const latest_posts_init = () => initBlock({ name: latest_posts_name, metadata: latest_posts_block_namespaceObject, settings: latest_posts_settings });
25861 +
25862 +
25863 + ;// ./node_modules/@wordpress/block-library/build-module/list/utils.js
25864 +
25865 + const LIST_STYLES = {
25866 + A: "upper-alpha",
25867 + a: "lower-alpha",
25868 + I: "upper-roman",
25869 + i: "lower-roman"
25870 + };
25871 + function createListBlockFromDOMElement(listElement) {
25872 + const type = listElement.getAttribute("type");
25873 + const listAttributes = {
25874 + ordered: "OL" === listElement.tagName,
25875 + anchor: listElement.id === "" ? void 0 : listElement.id,
25876 + start: listElement.getAttribute("start") ? parseInt(listElement.getAttribute("start"), 10) : void 0,
25877 + reversed: listElement.hasAttribute("reversed") ? true : void 0,
25878 + type: type && LIST_STYLES[type] ? LIST_STYLES[type] : void 0
25879 + };
25880 + const innerBlocks = Array.from(listElement.children).map(
25881 + (listItem) => {
25882 + const children = Array.from(listItem.childNodes).filter(
25883 + (node) => node.nodeType !== node.TEXT_NODE || node.textContent.trim().length !== 0
25884 + );
25885 + children.reverse();
25886 + const [nestedList, ...nodes] = children;
25887 + const hasNestedList = nestedList?.tagName === "UL" || nestedList?.tagName === "OL";
25888 + if (!hasNestedList) {
25889 + return (0,external_wp_blocks_namespaceObject.createBlock)("core/list-item", {
25890 + content: listItem.innerHTML
25891 + });
25892 + }
25893 + const htmlNodes = nodes.map((node) => {
25894 + if (node.nodeType === node.TEXT_NODE) {
25895 + return node.textContent;
25896 + }
25897 + return node.outerHTML;
25898 + });
25899 + htmlNodes.reverse();
25900 + const childAttributes = {
25901 + content: htmlNodes.join("").trim()
25902 + };
25903 + const childInnerBlocks = [
25904 + createListBlockFromDOMElement(nestedList)
25905 + ];
25906 + return (0,external_wp_blocks_namespaceObject.createBlock)(
25907 + "core/list-item",
25908 + childAttributes,
25909 + childInnerBlocks
25910 + );
25911 + }
25912 + );
25913 + return (0,external_wp_blocks_namespaceObject.createBlock)("core/list", listAttributes, innerBlocks);
25914 + }
25915 + function migrateToListV2(attributes) {
25916 + const { values, start, reversed, ordered, type, ...otherAttributes } = attributes;
25917 + const list = document.createElement(ordered ? "ol" : "ul");
25918 + list.innerHTML = values;
25919 + if (start) {
25920 + list.setAttribute("start", start);
25921 + }
25922 + if (reversed) {
25923 + list.setAttribute("reversed", true);
25924 + }
25925 + if (type) {
25926 + list.setAttribute("type", type);
25927 + }
25928 + const [listBlock] = (0,external_wp_blocks_namespaceObject.rawHandler)({ HTML: list.outerHTML });
25929 + return [
25930 + { ...otherAttributes, ...listBlock.attributes },
25931 + listBlock.innerBlocks
25932 + ];
25933 + }
25934 + function migrateTypeToInlineStyle(attributes) {
25935 + const { type } = attributes;
25936 + if (type && LIST_STYLES[type]) {
25937 + return {
25938 + ...attributes,
25939 + type: LIST_STYLES[type]
25940 + };
25941 + }
25942 + return attributes;
25943 + }
25944 +
25945 +
25946 + ;// ./node_modules/@wordpress/block-library/build-module/list/deprecated.js
25947 +
25948 +
25949 +
25950 +
25951 + const v0 = {
25952 + attributes: {
25953 + ordered: {
25954 + type: "boolean",
25955 + default: false,
25956 + role: "content"
25957 + },
25958 + values: {
25959 + type: "string",
25960 + source: "html",
25961 + selector: "ol,ul",
25962 + multiline: "li",
25963 + __unstableMultilineWrapperTags: ["ol", "ul"],
25964 + default: "",
25965 + role: "content"
25966 + },
25967 + type: {
25968 + type: "string"
25969 + },
25970 + start: {
25971 + type: "number"
25972 + },
25973 + reversed: {
25974 + type: "boolean"
25975 + },
25976 + placeholder: {
25977 + type: "string"
25978 + }
25979 + },
25980 + supports: {
25981 + anchor: true,
25982 + className: false,
25983 + typography: {
25984 + fontSize: true,
25985 + __experimentalFontFamily: true
25986 + },
25987 + color: {
25988 + gradients: true,
25989 + link: true
25990 + },
25991 + __unstablePasteTextInline: true,
25992 + __experimentalSelector: "ol,ul",
25993 + __experimentalSlashInserter: true
25994 + },
25995 + save({ attributes }) {
25996 + const { ordered, values, type, reversed, start } = attributes;
25997 + const TagName = ordered ? "ol" : "ul";
25998 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(TagName, { ...external_wp_blockEditor_namespaceObject.useBlockProps.save({ type, reversed, start }), children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichText.Content, { value: values, multiline: "li" }) });
25999 + },
26000 + migrate: migrate_font_family_default,
26001 + isEligible({ style }) {
26002 + return style?.typography?.fontFamily;
26003 + }
26004 + };
26005 + const list_deprecated_v1 = {
26006 + attributes: {
26007 + ordered: {
26008 + type: "boolean",
26009 + default: false,
26010 + role: "content"
26011 + },
26012 + values: {
26013 + type: "string",
26014 + source: "html",
26015 + selector: "ol,ul",
26016 + multiline: "li",
26017 + __unstableMultilineWrapperTags: ["ol", "ul"],
26018 + default: "",
26019 + role: "content"
26020 + },
26021 + type: {
26022 + type: "string"
26023 + },
26024 + start: {
26025 + type: "number"
26026 + },
26027 + reversed: {
26028 + type: "boolean"
26029 + },
26030 + placeholder: {
26031 + type: "string"
26032 + }
26033 + },
26034 + supports: {
26035 + anchor: true,
26036 + className: false,
26037 + typography: {
26038 + fontSize: true,
26039 + __experimentalFontFamily: true,
26040 + lineHeight: true,
26041 + __experimentalFontStyle: true,
26042 + __experimentalFontWeight: true,
26043 + __experimentalLetterSpacing: true,
26044 + __experimentalTextTransform: true,
26045 + __experimentalDefaultControls: {
26046 + fontSize: true
26047 + }
26048 + },
26049 + color: {
26050 + gradients: true,
26051 + link: true,
26052 + __experimentalDefaultControls: {
26053 + background: true,
26054 + text: true
26055 + }
26056 + },
26057 + __unstablePasteTextInline: true,
26058 + __experimentalSelector: "ol,ul",
26059 + __experimentalSlashInserter: true
26060 + },
26061 + save({ attributes }) {
26062 + const { ordered, values, type, reversed, start } = attributes;
26063 + const TagName = ordered ? "ol" : "ul";
26064 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(TagName, { ...external_wp_blockEditor_namespaceObject.useBlockProps.save({ type, reversed, start }), children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichText.Content, { value: values, multiline: "li" }) });
26065 + },
26066 + migrate: migrateToListV2
26067 + };
26068 + const list_deprecated_v2 = {
26069 + attributes: {
26070 + ordered: {
26071 + type: "boolean",
26072 + default: false,
26073 + role: "content"
26074 + },
26075 + values: {
26076 + type: "string",
26077 + source: "html",
26078 + selector: "ol,ul",
26079 + multiline: "li",
26080 + __unstableMultilineWrapperTags: ["ol", "ul"],
26081 + default: "",
26082 + role: "content"
26083 + },
26084 + type: {
26085 + type: "string"
26086 + },
26087 + start: {
26088 + type: "number"
26089 + },
26090 + reversed: {
26091 + type: "boolean"
26092 + },
26093 + placeholder: {
26094 + type: "string"
26095 + }
26096 + },
26097 + supports: {
26098 + anchor: true,
26099 + className: false,
26100 + typography: {
26101 + fontSize: true,
26102 + lineHeight: true,
26103 + __experimentalFontFamily: true,
26104 + __experimentalFontWeight: true,
26105 + __experimentalFontStyle: true,
26106 + __experimentalTextTransform: true,
26107 + __experimentalTextDecoration: true,
26108 + __experimentalLetterSpacing: true,
26109 + __experimentalDefaultControls: {
26110 + fontSize: true
26111 + }
26112 + },
26113 + color: {
26114 + gradients: true,
26115 + link: true,
26116 + __experimentalDefaultControls: {
26117 + background: true,
26118 + text: true
26119 + }
26120 + },
26121 + spacing: {
26122 + margin: true,
26123 + padding: true,
26124 + __experimentalDefaultControls: {
26125 + margin: false,
26126 + padding: false
26127 + }
26128 + },
26129 + __unstablePasteTextInline: true,
26130 + __experimentalSelector: "ol,ul",
26131 + __experimentalSlashInserter: true
26132 + },
26133 + isEligible({ type }) {
26134 + return !!type;
26135 + },
26136 + save({ attributes }) {
26137 + const { ordered, type, reversed, start } = attributes;
26138 + const TagName = ordered ? "ol" : "ul";
26139 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(TagName, { ...external_wp_blockEditor_namespaceObject.useBlockProps.save({ type, reversed, start }), children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, {}) });
26140 + },
26141 + migrate: migrateTypeToInlineStyle
26142 + };
26143 + const list_deprecated_v3 = {
26144 + attributes: {
26145 + ordered: {
26146 + type: "boolean",
26147 + default: false,
26148 + role: "content"
26149 + },
26150 + values: {
26151 + type: "string",
26152 + source: "html",
26153 + selector: "ol,ul",
26154 + multiline: "li",
26155 + __unstableMultilineWrapperTags: ["ol", "ul"],
26156 + default: "",
26157 + role: "content"
26158 + },
26159 + type: {
26160 + type: "string"
26161 + },
26162 + start: {
26163 + type: "number"
26164 + },
26165 + reversed: {
26166 + type: "boolean"
26167 + },
26168 + placeholder: {
26169 + type: "string"
26170 + }
26171 + },
26172 + supports: {
26173 + anchor: true,
26174 + className: false,
26175 + typography: {
26176 + fontSize: true,
26177 + lineHeight: true,
26178 + __experimentalFontFamily: true,
26179 + __experimentalFontWeight: true,
26180 + __experimentalFontStyle: true,
26181 + __experimentalTextTransform: true,
26182 + __experimentalTextDecoration: true,
26183 + __experimentalLetterSpacing: true,
26184 + __experimentalDefaultControls: {
26185 + fontSize: true
26186 + }
26187 + },
26188 + color: {
26189 + gradients: true,
26190 + link: true,
26191 + __experimentalDefaultControls: {
26192 + background: true,
26193 + text: true
26194 + }
26195 + },
26196 + spacing: {
26197 + margin: true,
26198 + padding: true,
26199 + __experimentalDefaultControls: {
26200 + margin: false,
26201 + padding: false
26202 + }
26203 + },
26204 + __unstablePasteTextInline: true,
26205 + __experimentalSelector: "ol,ul",
26206 + __experimentalOnMerge: "true",
26207 + __experimentalSlashInserter: true
26208 + },
26209 + save({ attributes }) {
26210 + const { ordered, type, reversed, start } = attributes;
26211 + const TagName = ordered ? "ol" : "ul";
26212 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
26213 + TagName,
26214 + {
26215 + ...external_wp_blockEditor_namespaceObject.useBlockProps.save({
26216 + reversed,
26217 + start,
26218 + style: {
26219 + listStyleType: ordered && type !== "decimal" ? type : void 0
26220 + }
26221 + }),
26222 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, {})
26223 + }
26224 + );
26225 + }
26226 + };
26227 + var list_deprecated_deprecated_default = [list_deprecated_v3, list_deprecated_v2, list_deprecated_v1, v0];
26228 +
26229 +
26230 + ;// ./node_modules/@wordpress/icons/build-module/library/format-outdent-rtl.js
26231 +
26232 +
26233 + var format_outdent_rtl_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M20 5.5H4V4H20V5.5ZM12 12.5H4V11H12V12.5ZM20 20V18.5H4V20H20ZM15.4697 14.9697L18.4393 12L15.4697 9.03033L16.5303 7.96967L20.0303 11.4697L20.5607 12L20.0303 12.5303L16.5303 16.0303L15.4697 14.9697Z" }) });
26234 +
26235 +
26236 + ;// ./node_modules/@wordpress/icons/build-module/library/format-outdent.js
26237 +
26238 +
26239 + var format_outdent_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M4 7.2v1.5h16V7.2H4zm8 8.6h8v-1.5h-8v1.5zm-4-4.6l-4 4 4 4 1-1-3-3 3-3-1-1z" }) });
26240 +
26241 +
26242 + ;// ./node_modules/@wordpress/icons/build-module/library/format-list-bullets-rtl.js
26243 +
26244 +
26245 + var format_list_bullets_rtl_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M4 8.8h8.9V7.2H4v1.6zm0 7h8.9v-1.5H4v1.5zM18 13c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0-3c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2z" }) });
26246 +
26247 +
26248 + ;// ./node_modules/@wordpress/icons/build-module/library/format-list-bullets.js
26249 +
26250 +
26251 + var format_list_bullets_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M11.1 15.8H20v-1.5h-8.9v1.5zm0-8.6v1.5H20V7.2h-8.9zM6 13c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0-7c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z" }) });
26252 +
26253 +
26254 + ;// ./node_modules/@wordpress/icons/build-module/library/format-list-numbered-rtl.js
26255 +
26256 +
26257 + var format_list_numbered_rtl_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M3.8 15.8h8.9v-1.5H3.8v1.5zm0-7h8.9V7.2H3.8v1.6zm14.7-2.1V10h1V5.3l-2.2.7.3 1 .9-.3zm1.2 6.1c-.5-.6-1.2-.5-1.7-.4-.3.1-.5.2-.7.3l.1 1.1c.2-.2.5-.4.8-.5.3-.1.6 0 .7.1.2.3 0 .8-.2 1.1-.5.8-.9 1.6-1.4 2.5H20v-1h-.9c.3-.6.8-1.4.9-2.1 0-.3 0-.8-.3-1.1z" }) });
26258 +
26259 +
26260 + ;// ./node_modules/@wordpress/icons/build-module/library/format-list-numbered.js
26261 +
26262 +
26263 + var format_list_numbered_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M11.1 15.8H20v-1.5h-8.9v1.5zm0-8.6v1.5H20V7.2h-8.9zM5 6.7V10h1V5.3L3.8 6l.4 1 .8-.3zm-.4 5.7c-.3.1-.5.2-.7.3l.1 1.1c.2-.2.5-.4.8-.5.3-.1.6 0 .7.1.2.3 0 .8-.2 1.1-.5.8-.9 1.6-1.4 2.5h2.7v-1h-1c.3-.6.8-1.4.9-2.1.1-.3 0-.8-.2-1.1-.5-.6-1.3-.5-1.7-.4z" }) });
26264 +
26265 +
26266 + ;// external ["wp","deprecated"]
26267 + const external_wp_deprecated_namespaceObject = window["wp"]["deprecated"];
26268 + var external_wp_deprecated_default = /*#__PURE__*/__webpack_require__.n(external_wp_deprecated_namespaceObject);
26269 + ;// ./node_modules/@wordpress/block-library/build-module/list/ordered-list-settings.js
26270 +
26271 +
26272 +
26273 +
26274 +
26275 +
26276 + const LIST_STYLE_OPTIONS = [
26277 + {
26278 + label: (0,external_wp_i18n_namespaceObject.__)("Numbers"),
26279 + value: "decimal"
26280 + },
26281 + {
26282 + label: (0,external_wp_i18n_namespaceObject.__)("Uppercase letters"),
26283 + value: "upper-alpha"
26284 + },
26285 + {
26286 + label: (0,external_wp_i18n_namespaceObject.__)("Lowercase letters"),
26287 + value: "lower-alpha"
26288 + },
26289 + {
26290 + label: (0,external_wp_i18n_namespaceObject.__)("Uppercase Roman numerals"),
26291 + value: "upper-roman"
26292 + },
26293 + {
26294 + label: (0,external_wp_i18n_namespaceObject.__)("Lowercase Roman numerals"),
26295 + value: "lower-roman"
26296 + }
26297 + ];
26298 + const OrderedListSettings = ({ setAttributes, reversed, start, type }) => {
26299 + const dropdownMenuProps = useToolsPanelDropdownMenuProps();
26300 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, { children: external_wp_element_namespaceObject.Platform.isNative ? /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.PanelBody, { title: (0,external_wp_i18n_namespaceObject.__)("Settings"), children: [
26301 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
26302 + external_wp_components_namespaceObject.SelectControl,
26303 + {
26304 + __next40pxDefaultSize: true,
26305 + __nextHasNoMarginBottom: true,
26306 + label: (0,external_wp_i18n_namespaceObject.__)("List style"),
26307 + options: LIST_STYLE_OPTIONS,
26308 + value: type,
26309 + onChange: (newValue) => setAttributes({ type: newValue })
26310 + }
26311 + ),
26312 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
26313 + external_wp_components_namespaceObject.TextControl,
26314 + {
26315 + __next40pxDefaultSize: true,
26316 + __nextHasNoMarginBottom: true,
26317 + label: (0,external_wp_i18n_namespaceObject.__)("Start value"),
26318 + type: "number",
26319 + onChange: (value) => {
26320 + const int = parseInt(value, 10);
26321 + setAttributes({
26322 + // It should be possible to unset the value,
26323 + // e.g. with an empty string.
26324 + start: isNaN(int) ? void 0 : int
26325 + });
26326 + },
26327 + value: Number.isInteger(start) ? start.toString(10) : "",
26328 + step: "1"
26329 + }
26330 + ),
26331 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
26332 + external_wp_components_namespaceObject.ToggleControl,
26333 + {
26334 + __nextHasNoMarginBottom: true,
26335 + label: (0,external_wp_i18n_namespaceObject.__)("Reverse order"),
26336 + checked: reversed || false,
26337 + onChange: (value) => {
26338 + setAttributes({
26339 + // Unset the attribute if not reversed.
26340 + reversed: value || void 0
26341 + });
26342 + }
26343 + }
26344 + )
26345 + ] }) : /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(
26346 + external_wp_components_namespaceObject.__experimentalToolsPanel,
26347 + {
26348 + label: (0,external_wp_i18n_namespaceObject.__)("Settings"),
26349 + resetAll: () => {
26350 + setAttributes({
26351 + type: void 0,
26352 + start: void 0,
26353 + reversed: void 0
26354 + });
26355 + },
26356 + dropdownMenuProps,
26357 + children: [
26358 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
26359 + external_wp_components_namespaceObject.__experimentalToolsPanelItem,
26360 + {
26361 + label: (0,external_wp_i18n_namespaceObject.__)("List style"),
26362 + isShownByDefault: true,
26363 + hasValue: () => !!type,
26364 + onDeselect: () => setAttributes({
26365 + type: void 0
26366 + }),
26367 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
26368 + external_wp_components_namespaceObject.SelectControl,
26369 + {
26370 + __next40pxDefaultSize: true,
26371 + __nextHasNoMarginBottom: true,
26372 + label: (0,external_wp_i18n_namespaceObject.__)("List style"),
26373 + options: LIST_STYLE_OPTIONS,
26374 + value: type || "decimal",
26375 + onChange: (newValue) => setAttributes({ type: newValue })
26376 + }
26377 + )
26378 + }
26379 + ),
26380 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
26381 + external_wp_components_namespaceObject.__experimentalToolsPanelItem,
26382 + {
26383 + label: (0,external_wp_i18n_namespaceObject.__)("Start value"),
26384 + isShownByDefault: true,
26385 + hasValue: () => !!start,
26386 + onDeselect: () => setAttributes({
26387 + start: void 0
26388 + }),
26389 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
26390 + external_wp_components_namespaceObject.TextControl,
26391 + {
26392 + __next40pxDefaultSize: true,
26393 + __nextHasNoMarginBottom: true,
26394 + label: (0,external_wp_i18n_namespaceObject.__)("Start value"),
26395 + type: "number",
26396 + onChange: (value) => {
26397 + const int = parseInt(value, 10);
26398 + setAttributes({
26399 + // It should be possible to unset the value,
26400 + // e.g. with an empty string.
26401 + start: isNaN(int) ? void 0 : int
26402 + });
26403 + },
26404 + value: Number.isInteger(start) ? start.toString(10) : "",
26405 + step: "1"
26406 + }
26407 + )
26408 + }
26409 + ),
26410 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
26411 + external_wp_components_namespaceObject.__experimentalToolsPanelItem,
26412 + {
26413 + label: (0,external_wp_i18n_namespaceObject.__)("Reverse order"),
26414 + isShownByDefault: true,
26415 + hasValue: () => !!reversed,
26416 + onDeselect: () => setAttributes({
26417 + reversed: void 0
26418 + }),
26419 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
26420 + external_wp_components_namespaceObject.ToggleControl,
26421 + {
26422 + __nextHasNoMarginBottom: true,
26423 + label: (0,external_wp_i18n_namespaceObject.__)("Reverse order"),
26424 + checked: reversed || false,
26425 + onChange: (value) => {
26426 + setAttributes({
26427 + // Unset the attribute if not reversed.
26428 + reversed: value || void 0
26429 + });
26430 + }
26431 + }
26432 + )
26433 + }
26434 + )
26435 + ]
26436 + }
26437 + ) });
26438 + };
26439 + var ordered_list_settings_default = OrderedListSettings;
26440 +
26441 +
26442 + ;// ./node_modules/@wordpress/block-library/build-module/list/tag-name.js
26443 +
26444 +
26445 + function TagName(props, ref) {
26446 + const { ordered, ...extraProps } = props;
26447 + const Tag = ordered ? "ol" : "ul";
26448 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(Tag, { ref, ...extraProps });
26449 + }
26450 + var tag_name_default = (0,external_wp_element_namespaceObject.forwardRef)(TagName);
26451 +
26452 +
26453 + ;// ./node_modules/@wordpress/block-library/build-module/list/edit.js
26454 +
26455 +
26456 +
26457 +
26458 +
26459 +
26460 +
26461 +
26462 +
26463 +
26464 +
26465 +
26466 + const list_edit_DEFAULT_BLOCK = {
26467 + name: "core/list-item"
26468 + };
26469 + const list_edit_TEMPLATE = [["core/list-item"]];
26470 + const NATIVE_MARGIN_SPACING = 8;
26471 + function useMigrateOnLoad(attributes, clientId) {
26472 + const registry = (0,external_wp_data_namespaceObject.useRegistry)();
26473 + const { updateBlockAttributes, replaceInnerBlocks } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_blockEditor_namespaceObject.store);
26474 + (0,external_wp_element_namespaceObject.useEffect)(() => {
26475 + if (!attributes.values) {
26476 + return;
26477 + }
26478 + const [newAttributes, newInnerBlocks] = migrateToListV2(attributes);
26479 + external_wp_deprecated_default()("Value attribute on the list block", {
26480 + since: "6.0",
26481 + version: "6.5",
26482 + alternative: "inner blocks"
26483 + });
26484 + registry.batch(() => {
26485 + updateBlockAttributes(clientId, newAttributes);
26486 + replaceInnerBlocks(clientId, newInnerBlocks);
26487 + });
26488 + }, [attributes.values]);
26489 + }
26490 + function useOutdentList(clientId) {
26491 + const { replaceBlocks, selectionChange } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_blockEditor_namespaceObject.store);
26492 + const { getBlockRootClientId, getBlockAttributes, getBlock } = (0,external_wp_data_namespaceObject.useSelect)(external_wp_blockEditor_namespaceObject.store);
26493 + return (0,external_wp_element_namespaceObject.useCallback)(() => {
26494 + const parentBlockId = getBlockRootClientId(clientId);
26495 + const parentBlockAttributes = getBlockAttributes(parentBlockId);
26496 + const newParentBlock = (0,external_wp_blocks_namespaceObject.createBlock)(
26497 + "core/list-item",
26498 + parentBlockAttributes
26499 + );
26500 + const { innerBlocks } = getBlock(clientId);
26501 + replaceBlocks([parentBlockId], [newParentBlock, ...innerBlocks]);
26502 + selectionChange(innerBlocks[innerBlocks.length - 1].clientId);
26503 + }, [clientId]);
26504 + }
26505 + function IndentUI({ clientId }) {
26506 + const outdentList = useOutdentList(clientId);
26507 + const canOutdent = (0,external_wp_data_namespaceObject.useSelect)(
26508 + (select) => {
26509 + const { getBlockRootClientId, getBlockName } = select(external_wp_blockEditor_namespaceObject.store);
26510 + return getBlockName(getBlockRootClientId(clientId)) === "core/list-item";
26511 + },
26512 + [clientId]
26513 + );
26514 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
26515 + external_wp_components_namespaceObject.ToolbarButton,
26516 + {
26517 + icon: (0,external_wp_i18n_namespaceObject.isRTL)() ? format_outdent_rtl_default : format_outdent_default,
26518 + title: (0,external_wp_i18n_namespaceObject.__)("Outdent"),
26519 + description: (0,external_wp_i18n_namespaceObject.__)("Outdent list item"),
26520 + disabled: !canOutdent,
26521 + onClick: outdentList
26522 + }
26523 + ) });
26524 + }
26525 + function list_edit_Edit({ attributes, setAttributes, clientId, style }) {
26526 + const { ordered, type, reversed, start } = attributes;
26527 + const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)({
26528 + style: {
26529 + ...external_wp_element_namespaceObject.Platform.isNative && style,
26530 + listStyleType: ordered && type !== "decimal" ? type : void 0
26531 + }
26532 + });
26533 + const innerBlocksProps = (0,external_wp_blockEditor_namespaceObject.useInnerBlocksProps)(blockProps, {
26534 + defaultBlock: list_edit_DEFAULT_BLOCK,
26535 + directInsert: true,
26536 + template: list_edit_TEMPLATE,
26537 + templateLock: false,
26538 + templateInsertUpdatesSelection: true,
26539 + ...external_wp_element_namespaceObject.Platform.isNative && {
26540 + marginVertical: NATIVE_MARGIN_SPACING,
26541 + marginHorizontal: NATIVE_MARGIN_SPACING,
26542 + renderAppender: false
26543 + },
26544 + __experimentalCaptureToolbars: true
26545 + });
26546 + useMigrateOnLoad(attributes, clientId);
26547 + const controls = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_blockEditor_namespaceObject.BlockControls, { group: "block", children: [
26548 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
26549 + external_wp_components_namespaceObject.ToolbarButton,
26550 + {
26551 + icon: (0,external_wp_i18n_namespaceObject.isRTL)() ? format_list_bullets_rtl_default : format_list_bullets_default,
26552 + title: (0,external_wp_i18n_namespaceObject.__)("Unordered"),
26553 + description: (0,external_wp_i18n_namespaceObject.__)("Convert to unordered list"),
26554 + isActive: ordered === false,
26555 + onClick: () => {
26556 + setAttributes({ ordered: false });
26557 + }
26558 + }
26559 + ),
26560 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
26561 + external_wp_components_namespaceObject.ToolbarButton,
26562 + {
26563 + icon: (0,external_wp_i18n_namespaceObject.isRTL)() ? format_list_numbered_rtl_default : format_list_numbered_default,
26564 + title: (0,external_wp_i18n_namespaceObject.__)("Ordered"),
26565 + description: (0,external_wp_i18n_namespaceObject.__)("Convert to ordered list"),
26566 + isActive: ordered === true,
26567 + onClick: () => {
26568 + setAttributes({ ordered: true });
26569 + }
26570 + }
26571 + ),
26572 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(IndentUI, { clientId })
26573 + ] });
26574 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
26575 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
26576 + tag_name_default,
26577 + {
26578 + ordered,
26579 + reversed,
26580 + start,
26581 + ...innerBlocksProps
26582 + }
26583 + ),
26584 + controls,
26585 + ordered && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
26586 + ordered_list_settings_default,
26587 + {
26588 + ...{
26589 + setAttributes,
26590 + reversed,
26591 + start,
26592 + type
26593 + }
26594 + }
26595 + )
26596 + ] });
26597 + }
26598 +
26599 +
26600 + ;// ./node_modules/@wordpress/block-library/build-module/list/block.json
26601 + const list_block_namespaceObject = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/list","title":"List","category":"text","allowedBlocks":["core/list-item"],"description":"An organized collection of items displayed in a specific order.","keywords":["bullet list","ordered list","numbered list"],"textdomain":"default","attributes":{"ordered":{"type":"boolean","default":false,"role":"content"},"values":{"type":"string","source":"html","selector":"ol,ul","multiline":"li","default":"","role":"content"},"type":{"type":"string"},"start":{"type":"number"},"reversed":{"type":"boolean"},"placeholder":{"type":"string"}},"supports":{"anchor":true,"html":false,"__experimentalBorder":{"color":true,"radius":true,"style":true,"width":true},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"color":{"gradients":true,"link":true,"__experimentalDefaultControls":{"background":true,"text":true}},"spacing":{"margin":true,"padding":true,"__experimentalDefaultControls":{"margin":false,"padding":false}},"__unstablePasteTextInline":true,"__experimentalOnMerge":true,"__experimentalSlashInserter":true,"interactivity":{"clientNavigation":true}},"selectors":{"border":".wp-block-list:not(.wp-block-list .wp-block-list)"},"editorStyle":"wp-block-list-editor","style":"wp-block-list"}');
26602 + ;// ./node_modules/@wordpress/block-library/build-module/list/save.js
26603 +
26604 +
26605 + function list_save_save({ attributes }) {
26606 + const { ordered, type, reversed, start } = attributes;
26607 + const TagName = ordered ? "ol" : "ul";
26608 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
26609 + TagName,
26610 + {
26611 + ...external_wp_blockEditor_namespaceObject.useBlockProps.save({
26612 + reversed,
26613 + start,
26614 + style: {
26615 + listStyleType: ordered && type !== "decimal" ? type : void 0
26616 + }
26617 + }),
26618 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, {})
26619 + }
26620 + );
26621 + }
26622 +
26623 +
26624 + ;// ./node_modules/@wordpress/block-library/build-module/list/transforms.js
26625 +
26626 +
26627 +
26628 + function getListContentSchema({ phrasingContentSchema }) {
26629 + const listContentSchema = {
26630 + ...phrasingContentSchema,
26631 + ul: {},
26632 + ol: { attributes: ["type", "start", "reversed"] }
26633 + };
26634 + ["ul", "ol"].forEach((tag) => {
26635 + listContentSchema[tag].children = {
26636 + li: {
26637 + children: listContentSchema
26638 + }
26639 + };
26640 + });
26641 + return listContentSchema;
26642 + }
26643 + function getListContentFlat(blocks) {
26644 + return blocks.flatMap(({ name, attributes, innerBlocks = [] }) => {
26645 + if (name === "core/list-item") {
26646 + return [attributes.content, ...getListContentFlat(innerBlocks)];
26647 + }
26648 + return getListContentFlat(innerBlocks);
26649 + });
26650 + }
26651 + const list_transforms_transforms = {
26652 + from: [
26653 + {
26654 + type: "block",
26655 + isMultiBlock: true,
26656 + blocks: ["core/paragraph", "core/heading"],
26657 + transform: (blockAttributes) => {
26658 + let childBlocks = [];
26659 + if (blockAttributes.length > 1) {
26660 + childBlocks = blockAttributes.map(({ content }) => {
26661 + return (0,external_wp_blocks_namespaceObject.createBlock)("core/list-item", { content });
26662 + });
26663 + } else if (blockAttributes.length === 1) {
26664 + const value = (0,external_wp_richText_namespaceObject.create)({
26665 + html: blockAttributes[0].content
26666 + });
26667 + childBlocks = (0,external_wp_richText_namespaceObject.split)(value, "\n").map((result) => {
26668 + return (0,external_wp_blocks_namespaceObject.createBlock)("core/list-item", {
26669 + content: (0,external_wp_richText_namespaceObject.toHTMLString)({ value: result })
26670 + });
26671 + });
26672 + }
26673 + return (0,external_wp_blocks_namespaceObject.createBlock)(
26674 + "core/list",
26675 + {
26676 + anchor: blockAttributes.anchor
26677 + },
26678 + childBlocks
26679 + );
26680 + }
26681 + },
26682 + {
26683 + type: "raw",
26684 + selector: "ol,ul",
26685 + schema: (args) => ({
26686 + ol: getListContentSchema(args).ol,
26687 + ul: getListContentSchema(args).ul
26688 + }),
26689 + transform: createListBlockFromDOMElement
26690 + },
26691 + ...["*", "-"].map((prefix) => ({
26692 + type: "prefix",
26693 + prefix,
26694 + transform(content) {
26695 + return (0,external_wp_blocks_namespaceObject.createBlock)("core/list", {}, [
26696 + (0,external_wp_blocks_namespaceObject.createBlock)("core/list-item", { content })
26697 + ]);
26698 + }
26699 + })),
26700 + ...["1.", "1)"].map((prefix) => ({
26701 + type: "prefix",
26702 + prefix,
26703 + transform(content) {
26704 + return (0,external_wp_blocks_namespaceObject.createBlock)(
26705 + "core/list",
26706 + {
26707 + ordered: true
26708 + },
26709 + [(0,external_wp_blocks_namespaceObject.createBlock)("core/list-item", { content })]
26710 + );
26711 + }
26712 + }))
26713 + ],
26714 + to: [
26715 + ...["core/paragraph", "core/heading"].map((block) => ({
26716 + type: "block",
26717 + blocks: [block],
26718 + transform: (_attributes, childBlocks) => {
26719 + return getListContentFlat(childBlocks).map(
26720 + (content) => (0,external_wp_blocks_namespaceObject.createBlock)(block, {
26721 + content
26722 + })
26723 + );
26724 + }
26725 + }))
26726 + ]
26727 + };
26728 + var list_transforms_transforms_default = list_transforms_transforms;
26729 +
26730 +
26731 + ;// ./node_modules/@wordpress/block-library/build-module/list/index.js
26732 +
26733 +
26734 +
26735 +
26736 +
26737 +
26738 +
26739 +
26740 + const { name: list_name } = list_block_namespaceObject;
26741 + const list_settings = {
26742 + icon: list_default,
26743 + example: {
26744 + innerBlocks: [
26745 + {
26746 + name: "core/list-item",
26747 + attributes: { content: (0,external_wp_i18n_namespaceObject.__)("Alice.") }
26748 + },
26749 + {
26750 + name: "core/list-item",
26751 + attributes: { content: (0,external_wp_i18n_namespaceObject.__)("The White Rabbit.") }
26752 + },
26753 + {
26754 + name: "core/list-item",
26755 + attributes: { content: (0,external_wp_i18n_namespaceObject.__)("The Cheshire Cat.") }
26756 + },
26757 + {
26758 + name: "core/list-item",
26759 + attributes: { content: (0,external_wp_i18n_namespaceObject.__)("The Mad Hatter.") }
26760 + },
26761 + {
26762 + name: "core/list-item",
26763 + attributes: { content: (0,external_wp_i18n_namespaceObject.__)("The Queen of Hearts.") }
26764 + }
26765 + ]
26766 + },
26767 + transforms: list_transforms_transforms_default,
26768 + edit: list_edit_Edit,
26769 + save: list_save_save,
26770 + deprecated: list_deprecated_deprecated_default
26771 + };
26772 + const list_init = () => initBlock({ name: list_name, metadata: list_block_namespaceObject, settings: list_settings });
26773 +
26774 +
26775 + ;// ./node_modules/@wordpress/icons/build-module/library/math.js
26776 +
26777 +
26778 + var math_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M11.2 6.8c-.7 0-1.4.5-1.6 1.1l-2.8 7.5-1.2-1.8c-.1-.2-.4-.3-.6-.3H3v1.5h1.6l1.2 1.8c.6.9 1.9.7 2.2-.3l2.9-7.9s.1-.2.2-.2h7.8V6.7h-7.8Zm5.3 3.4-1.9 1.9-1.9-1.9-1.1 1.1 1.9 1.9-1.9 1.9 1.1 1.1 1.9-1.9 1.9 1.9 1.1-1.1-1.9-1.9 1.9-1.9-1.1-1.1Z" }) });
26779 +
26780 +
26781 + ;// external ["wp","a11y"]
26782 + const external_wp_a11y_namespaceObject = window["wp"]["a11y"];
26783 + ;// ./node_modules/@wordpress/block-library/build-module/math/edit.js
26784 +
26785 +
26786 +
26787 +
26788 +
26789 +
26790 +
26791 +
26792 + const { Badge } = unlock(external_wp_components_namespaceObject.privateApis);
26793 + function MathEdit({ attributes, setAttributes, isSelected }) {
26794 + const { latex, mathML } = attributes;
26795 + const [blockRef, setBlockRef] = (0,external_wp_element_namespaceObject.useState)();
26796 + const [error, setError] = (0,external_wp_element_namespaceObject.useState)(null);
26797 + const [latexToMathML, setLatexToMathML] = (0,external_wp_element_namespaceObject.useState)();
26798 + const initialLatex = (0,external_wp_element_namespaceObject.useRef)(latex);
26799 + const { __unstableMarkNextChangeAsNotPersistent } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_blockEditor_namespaceObject.store);
26800 + (0,external_wp_element_namespaceObject.useEffect)(() => {
26801 + Promise.resolve(/* import() */).then(__webpack_require__.t.bind(__webpack_require__, 3533, 23)).then((module) => {
26802 + setLatexToMathML(() => module.default);
26803 + if (initialLatex.current) {
26804 + __unstableMarkNextChangeAsNotPersistent();
26805 + setAttributes({
26806 + mathML: module.default(initialLatex.current, {
26807 + displayMode: true
26808 + })
26809 + });
26810 + }
26811 + });
26812 + }, [
26813 + initialLatex,
26814 + setAttributes,
26815 + __unstableMarkNextChangeAsNotPersistent
26816 + ]);
26817 + const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)({
26818 + ref: setBlockRef,
26819 + position: "relative"
26820 + });
26821 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", { ...blockProps, children: [
26822 + mathML ? /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
26823 + "math",
26824 + {
26825 + display: "block",
26826 + dangerouslySetInnerHTML: { __html: mathML }
26827 + }
26828 + ) : "\u200B",
26829 + isSelected && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
26830 + external_wp_components_namespaceObject.Popover,
26831 + {
26832 + placement: "bottom-start",
26833 + offset: 8,
26834 + anchor: blockRef,
26835 + focusOnMount: false,
26836 + __unstableSlotName: "__unstable-block-tools-after",
26837 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { style: { padding: "4px", minWidth: "300px" }, children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.__experimentalVStack, { spacing: 1, children: [
26838 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
26839 + external_wp_components_namespaceObject.TextareaControl,
26840 + {
26841 + __nextHasNoMarginBottom: true,
26842 + __next40pxDefaultSize: true,
26843 + label: (0,external_wp_i18n_namespaceObject.__)("LaTeX math syntax"),
26844 + hideLabelFromVision: true,
26845 + value: latex,
26846 + className: "wp-block-math__textarea-control",
26847 + onChange: (newLatex) => {
26848 + if (!latexToMathML) {
26849 + setAttributes({ latex: newLatex });
26850 + return;
26851 + }
26852 + let newMathML = "";
26853 + try {
26854 + newMathML = latexToMathML(newLatex, {
26855 + displayMode: true
26856 + });
26857 + setError(null);
26858 + } catch (err) {
26859 + setError(err.message);
26860 + (0,external_wp_a11y_namespaceObject.speak)(err.message);
26861 + }
26862 + setAttributes({
26863 + mathML: newMathML,
26864 + latex: newLatex
26865 + });
26866 + },
26867 + placeholder: (0,external_wp_i18n_namespaceObject.__)("e.g., x^2, \\frac{a}{b}")
26868 + }
26869 + ),
26870 + error && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
26871 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
26872 + Badge,
26873 + {
26874 + intent: "error",
26875 + className: "wp-block-math__error",
26876 + children: error
26877 + }
26878 + ),
26879 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("style", { children: ".wp-block-math__error .components-badge__content{white-space:normal}" })
26880 + ] })
26881 + ] }) })
26882 + }
26883 + )
26884 + ] });
26885 + }
26886 +
26887 +
26888 + ;// ./node_modules/@wordpress/block-library/build-module/math/block.json
26889 + const math_block_namespaceObject = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/math","title":"Math","category":"text","description":"Display mathematical notation using LaTeX.","keywords":["equation","formula","latex","mathematics"],"textdomain":"default","supports":{"html":false},"attributes":{"latex":{"type":"string","role":"content"},"mathML":{"type":"string","source":"html","selector":"math"}}}');
26890 + ;// ./node_modules/@wordpress/block-library/build-module/math/save.js
26891 +
26892 +
26893 + function math_save_save({ attributes }) {
26894 + const { latex, mathML } = attributes;
26895 + if (!latex) {
26896 + return null;
26897 + }
26898 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { ...external_wp_blockEditor_namespaceObject.useBlockProps.save(), children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
26899 + "math",
26900 + {
26901 + display: "block",
26902 + dangerouslySetInnerHTML: { __html: mathML }
26903 + }
26904 + ) });
26905 + }
26906 +
26907 +
26908 + ;// ./node_modules/@wordpress/block-library/build-module/math/deprecated.js
26909 +
26910 +
26911 + const math_deprecated_v1 = {
26912 + attributes: {
26913 + latex: {
26914 + type: "string",
26915 + role: "content"
26916 + },
26917 + mathML: {
26918 + type: "string",
26919 + source: "html",
26920 + selector: "math"
26921 + }
26922 + },
26923 + save({ attributes }) {
26924 + const { latex, mathML } = attributes;
26925 + if (!latex) {
26926 + return null;
26927 + }
26928 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
26929 + "math",
26930 + {
26931 + ...external_wp_blockEditor_namespaceObject.useBlockProps.save(),
26932 + display: "block",
26933 + dangerouslySetInnerHTML: { __html: mathML }
26934 + }
26935 + );
26936 + }
26937 + };
26938 + var math_deprecated_deprecated_default = [math_deprecated_v1];
26939 +
26940 +
26941 + ;// ./node_modules/@wordpress/block-library/build-module/math/index.js
26942 +
26943 +
26944 +
26945 +
26946 +
26947 +
26948 + const { name: math_name } = math_block_namespaceObject;
26949 + const math_settings = {
26950 + icon: math_default,
26951 + example: {
26952 + attributes: {
26953 + latex: "x = \\frac{-b \\pm \\sqrt{b^2-4ac}}{2a}",
26954 + mathML: '<semantics><mrow><mi>x</mi><mo>=</mo><mfrac><mrow><mo lspace="0em" rspace="0em">\u2212</mo><mi>b</mi><mo>\xB1</mo><msqrt><mrow><msup><mi>b</mi><mn>2</mn></msup><mo>\u2212</mo><mn>4</mn><mi>a</mi><mi>c</mi></mrow></msqrt></mrow><mrow><mn>2</mn><mi>a</mi></mrow></mfrac></mrow><annotation encoding="application/x-tex">x = \\frac{-b \\pm \\sqrt{b^2-4ac}}{2a}</annotation></semantics>'
26955 + },
26956 + viewportWidth: 300
26957 + },
26958 + edit: MathEdit,
26959 + save: math_save_save,
26960 + deprecated: math_deprecated_deprecated_default
26961 + };
26962 + const math_init = () => initBlock({ name: math_name, metadata: math_block_namespaceObject, settings: math_settings });
26963 +
26964 +
26965 + ;// ./node_modules/@wordpress/icons/build-module/library/list-item.js
26966 +
26967 +
26968 + var list_item_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M12 11v1.5h8V11h-8zm-6-1c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z" }) });
26969 +
26970 +
26971 + ;// ./node_modules/@wordpress/block-library/build-module/list-item/block.json
26972 + const list_item_block_namespaceObject = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/list-item","title":"List Item","category":"text","parent":["core/list"],"allowedBlocks":["core/list"],"description":"An individual item within a list.","textdomain":"default","attributes":{"placeholder":{"type":"string"},"content":{"type":"rich-text","source":"rich-text","selector":"li","role":"content"}},"supports":{"anchor":true,"className":false,"splitting":true,"__experimentalBorder":{"color":true,"radius":true,"style":true,"width":true},"color":{"gradients":true,"link":true,"background":true,"__experimentalDefaultControls":{"text":true}},"spacing":{"margin":true,"padding":true,"__experimentalDefaultControls":{"margin":false,"padding":false}},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"interactivity":{"clientNavigation":true}},"selectors":{"root":".wp-block-list > li","border":".wp-block-list:not(.wp-block-list .wp-block-list) > li"}}');
26973 + ;// ./node_modules/@wordpress/icons/build-module/library/format-indent-rtl.js
26974 +
26975 +
26976 + var format_indent_rtl_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M20 5.5H4V4H20V5.5ZM12 12.5H4V11H12V12.5ZM20 20V18.5H4V20H20ZM20.0303 9.03033L17.0607 12L20.0303 14.9697L18.9697 16.0303L15.4697 12.5303L14.9393 12L15.4697 11.4697L18.9697 7.96967L20.0303 9.03033Z" }) });
26977 +
26978 +
26979 + ;// ./node_modules/@wordpress/icons/build-module/library/format-indent.js
26980 +
26981 +
26982 + var format_indent_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M4 7.2v1.5h16V7.2H4zm8 8.6h8v-1.5h-8v1.5zm-8-3.5l3 3-3 3 1 1 4-4-4-4-1 1z" }) });
26983 +
26984 +
26985 + ;// ./node_modules/@wordpress/block-library/build-module/list-item/hooks/use-indent-list-item.js
26986 +
26987 +
26988 +
26989 +
26990 + function useIndentListItem(clientId) {
26991 + const { replaceBlocks, selectionChange, multiSelect } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_blockEditor_namespaceObject.store);
26992 + const {
26993 + getBlock,
26994 + getPreviousBlockClientId,
26995 + getSelectionStart,
26996 + getSelectionEnd,
26997 + hasMultiSelection,
26998 + getMultiSelectedBlockClientIds
26999 + } = (0,external_wp_data_namespaceObject.useSelect)(external_wp_blockEditor_namespaceObject.store);
27000 + return (0,external_wp_element_namespaceObject.useCallback)(() => {
27001 + const _hasMultiSelection = hasMultiSelection();
27002 + const clientIds = _hasMultiSelection ? getMultiSelectedBlockClientIds() : [clientId];
27003 + const clonedBlocks = clientIds.map(
27004 + (_clientId) => (0,external_wp_blocks_namespaceObject.cloneBlock)(getBlock(_clientId))
27005 + );
27006 + const previousSiblingId = getPreviousBlockClientId(clientId);
27007 + const newListItem = (0,external_wp_blocks_namespaceObject.cloneBlock)(getBlock(previousSiblingId));
27008 + if (!newListItem.innerBlocks?.length) {
27009 + newListItem.innerBlocks = [(0,external_wp_blocks_namespaceObject.createBlock)("core/list")];
27010 + }
27011 + newListItem.innerBlocks[newListItem.innerBlocks.length - 1].innerBlocks.push(...clonedBlocks);
27012 + const selectionStart = getSelectionStart();
27013 + const selectionEnd = getSelectionEnd();
27014 + replaceBlocks([previousSiblingId, ...clientIds], [newListItem]);
27015 + if (!_hasMultiSelection) {
27016 + selectionChange(
27017 + clonedBlocks[0].clientId,
27018 + selectionEnd.attributeKey,
27019 + selectionEnd.clientId === selectionStart.clientId ? selectionStart.offset : selectionEnd.offset,
27020 + selectionEnd.offset
27021 + );
27022 + } else {
27023 + multiSelect(
27024 + clonedBlocks[0].clientId,
27025 + clonedBlocks[clonedBlocks.length - 1].clientId
27026 + );
27027 + }
27028 + return true;
27029 + }, [clientId]);
27030 + }
27031 +
27032 +
27033 + ;// ./node_modules/@wordpress/block-library/build-module/list-item/hooks/use-outdent-list-item.js
27034 +
27035 +
27036 +
27037 +
27038 + function useOutdentListItem() {
27039 + const registry = (0,external_wp_data_namespaceObject.useRegistry)();
27040 + const {
27041 + moveBlocksToPosition,
27042 + removeBlock,
27043 + insertBlock,
27044 + updateBlockListSettings
27045 + } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_blockEditor_namespaceObject.store);
27046 + const {
27047 + getBlockRootClientId,
27048 + getBlockName,
27049 + getBlockOrder,
27050 + getBlockIndex,
27051 + getSelectedBlockClientIds,
27052 + getBlock,
27053 + getBlockListSettings
27054 + } = (0,external_wp_data_namespaceObject.useSelect)(external_wp_blockEditor_namespaceObject.store);
27055 + function getParentListItemId(id) {
27056 + const listId = getBlockRootClientId(id);
27057 + const parentListItemId = getBlockRootClientId(listId);
27058 + if (!parentListItemId) {
27059 + return;
27060 + }
27061 + if (getBlockName(parentListItemId) !== "core/list-item") {
27062 + return;
27063 + }
27064 + return parentListItemId;
27065 + }
27066 + return (0,external_wp_element_namespaceObject.useCallback)((clientIds = getSelectedBlockClientIds()) => {
27067 + if (!Array.isArray(clientIds)) {
27068 + clientIds = [clientIds];
27069 + }
27070 + if (!clientIds.length) {
27071 + return;
27072 + }
27073 + const firstClientId = clientIds[0];
27074 + if (getBlockName(firstClientId) !== "core/list-item") {
27075 + return;
27076 + }
27077 + const parentListItemId = getParentListItemId(firstClientId);
27078 + if (!parentListItemId) {
27079 + return;
27080 + }
27081 + const parentListId = getBlockRootClientId(firstClientId);
27082 + const lastClientId = clientIds[clientIds.length - 1];
27083 + const order = getBlockOrder(parentListId);
27084 + const followingListItems = order.slice(
27085 + getBlockIndex(lastClientId) + 1
27086 + );
27087 + registry.batch(() => {
27088 + if (followingListItems.length) {
27089 + let nestedListId = getBlockOrder(firstClientId)[0];
27090 + if (!nestedListId) {
27091 + const nestedListBlock = (0,external_wp_blocks_namespaceObject.cloneBlock)(
27092 + getBlock(parentListId),
27093 + {},
27094 + []
27095 + );
27096 + nestedListId = nestedListBlock.clientId;
27097 + insertBlock(nestedListBlock, 0, firstClientId, false);
27098 + updateBlockListSettings(
27099 + nestedListId,
27100 + getBlockListSettings(parentListId)
27101 + );
27102 + }
27103 + moveBlocksToPosition(
27104 + followingListItems,
27105 + parentListId,
27106 + nestedListId
27107 + );
27108 + }
27109 + moveBlocksToPosition(
27110 + clientIds,
27111 + parentListId,
27112 + getBlockRootClientId(parentListItemId),
27113 + getBlockIndex(parentListItemId) + 1
27114 + );
27115 + if (!getBlockOrder(parentListId).length) {
27116 + const shouldSelectParent = false;
27117 + removeBlock(parentListId, shouldSelectParent);
27118 + }
27119 + });
27120 + return true;
27121 + }, []);
27122 + }
27123 +
27124 +
27125 + ;// ./node_modules/@wordpress/block-library/build-module/list-item/hooks/use-enter.js
27126 +
27127 +
27128 +
27129 +
27130 +
27131 +
27132 +
27133 + function use_enter_useEnter(props) {
27134 + const { replaceBlocks, selectionChange } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_blockEditor_namespaceObject.store);
27135 + const { getBlock, getBlockRootClientId, getBlockIndex, getBlockName } = (0,external_wp_data_namespaceObject.useSelect)(external_wp_blockEditor_namespaceObject.store);
27136 + const propsRef = (0,external_wp_element_namespaceObject.useRef)(props);
27137 + propsRef.current = props;
27138 + const outdentListItem = useOutdentListItem();
27139 + return (0,external_wp_compose_namespaceObject.useRefEffect)((element) => {
27140 + function onKeyDown(event) {
27141 + if (event.defaultPrevented || event.keyCode !== external_wp_keycodes_namespaceObject.ENTER) {
27142 + return;
27143 + }
27144 + const { content, clientId } = propsRef.current;
27145 + if (content.length) {
27146 + return;
27147 + }
27148 + event.preventDefault();
27149 + const canOutdent = getBlockName(
27150 + getBlockRootClientId(
27151 + getBlockRootClientId(propsRef.current.clientId)
27152 + )
27153 + ) === "core/list-item";
27154 + if (canOutdent) {
27155 + outdentListItem();
27156 + return;
27157 + }
27158 + const topParentListBlock = getBlock(
27159 + getBlockRootClientId(clientId)
27160 + );
27161 + const blockIndex = getBlockIndex(clientId);
27162 + const head = (0,external_wp_blocks_namespaceObject.cloneBlock)({
27163 + ...topParentListBlock,
27164 + innerBlocks: topParentListBlock.innerBlocks.slice(
27165 + 0,
27166 + blockIndex
27167 + )
27168 + });
27169 + const middle = (0,external_wp_blocks_namespaceObject.createBlock)((0,external_wp_blocks_namespaceObject.getDefaultBlockName)());
27170 + const after = [
27171 + ...topParentListBlock.innerBlocks[blockIndex].innerBlocks[0]?.innerBlocks || [],
27172 + ...topParentListBlock.innerBlocks.slice(blockIndex + 1)
27173 + ];
27174 + const tail = after.length ? [
27175 + (0,external_wp_blocks_namespaceObject.cloneBlock)({
27176 + ...topParentListBlock,
27177 + innerBlocks: after
27178 + })
27179 + ] : [];
27180 + replaceBlocks(
27181 + topParentListBlock.clientId,
27182 + [head, middle, ...tail],
27183 + 1
27184 + );
27185 + selectionChange(middle.clientId);
27186 + }
27187 + element.addEventListener("keydown", onKeyDown);
27188 + return () => {
27189 + element.removeEventListener("keydown", onKeyDown);
27190 + };
27191 + }, []);
27192 + }
27193 +
27194 +
27195 + ;// ./node_modules/@wordpress/block-library/build-module/list-item/hooks/use-space.js
27196 +
27197 +
27198 +
27199 +
27200 +
27201 +
27202 + function useSpace(clientId) {
27203 + const { getSelectionStart, getSelectionEnd, getBlockIndex } = (0,external_wp_data_namespaceObject.useSelect)(external_wp_blockEditor_namespaceObject.store);
27204 + const indentListItem = useIndentListItem(clientId);
27205 + const outdentListItem = useOutdentListItem();
27206 + return (0,external_wp_compose_namespaceObject.useRefEffect)(
27207 + (element) => {
27208 + function onKeyDown(event) {
27209 + const { keyCode, shiftKey, altKey, metaKey, ctrlKey } = event;
27210 + if (event.defaultPrevented || keyCode !== external_wp_keycodes_namespaceObject.SPACE && keyCode !== external_wp_keycodes_namespaceObject.TAB || // Only override when no modifiers are pressed.
27211 + altKey || metaKey || ctrlKey) {
27212 + return;
27213 + }
27214 + const selectionStart = getSelectionStart();
27215 + const selectionEnd = getSelectionEnd();
27216 + if (selectionStart.offset === 0 && selectionEnd.offset === 0) {
27217 + if (shiftKey) {
27218 + if (keyCode === external_wp_keycodes_namespaceObject.TAB) {
27219 + if (outdentListItem()) {
27220 + event.preventDefault();
27221 + }
27222 + }
27223 + } else if (getBlockIndex(clientId) !== 0) {
27224 + if (indentListItem()) {
27225 + event.preventDefault();
27226 + }
27227 + }
27228 + }
27229 + }
27230 + element.addEventListener("keydown", onKeyDown);
27231 + return () => {
27232 + element.removeEventListener("keydown", onKeyDown);
27233 + };
27234 + },
27235 + [clientId, indentListItem]
27236 + );
27237 + }
27238 +
27239 +
27240 + ;// ./node_modules/@wordpress/block-library/build-module/list-item/hooks/use-merge.js
27241 +
27242 +
27243 +
27244 + function useMerge(clientId, onMerge) {
27245 + const registry = (0,external_wp_data_namespaceObject.useRegistry)();
27246 + const {
27247 + getPreviousBlockClientId,
27248 + getNextBlockClientId,
27249 + getBlockOrder,
27250 + getBlockRootClientId,
27251 + getBlockName
27252 + } = (0,external_wp_data_namespaceObject.useSelect)(external_wp_blockEditor_namespaceObject.store);
27253 + const { mergeBlocks, moveBlocksToPosition } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_blockEditor_namespaceObject.store);
27254 + const outdentListItem = useOutdentListItem();
27255 + function getTrailingId(id) {
27256 + const order = getBlockOrder(id);
27257 + if (!order.length) {
27258 + return id;
27259 + }
27260 + return getTrailingId(order[order.length - 1]);
27261 + }
27262 + function getParentListItemId(id) {
27263 + const listId = getBlockRootClientId(id);
27264 + const parentListItemId = getBlockRootClientId(listId);
27265 + if (!parentListItemId) {
27266 + return;
27267 + }
27268 + if (getBlockName(parentListItemId) !== "core/list-item") {
27269 + return;
27270 + }
27271 + return parentListItemId;
27272 + }
27273 + function _getNextId(id) {
27274 + const next = getNextBlockClientId(id);
27275 + if (next) {
27276 + return next;
27277 + }
27278 + const parentListItemId = getParentListItemId(id);
27279 + if (!parentListItemId) {
27280 + return;
27281 + }
27282 + return _getNextId(parentListItemId);
27283 + }
27284 + function getNextId(id) {
27285 + const order = getBlockOrder(id);
27286 + if (!order.length) {
27287 + return _getNextId(id);
27288 + }
27289 + return getBlockOrder(order[0])[0];
27290 + }
27291 + return (forward) => {
27292 + function mergeWithNested(clientIdA, clientIdB) {
27293 + registry.batch(() => {
27294 + const [nestedListClientId] = getBlockOrder(clientIdB);
27295 + if (nestedListClientId) {
27296 + if (getPreviousBlockClientId(clientIdB) === clientIdA && !getBlockOrder(clientIdA).length) {
27297 + moveBlocksToPosition(
27298 + [nestedListClientId],
27299 + clientIdB,
27300 + clientIdA
27301 + );
27302 + } else {
27303 + moveBlocksToPosition(
27304 + getBlockOrder(nestedListClientId),
27305 + nestedListClientId,
27306 + getBlockRootClientId(clientIdA)
27307 + );
27308 + }
27309 + }
27310 + mergeBlocks(clientIdA, clientIdB);
27311 + });
27312 + }
27313 + if (forward) {
27314 + const nextBlockClientId = getNextId(clientId);
27315 + if (!nextBlockClientId) {
27316 + onMerge(forward);
27317 + return;
27318 + }
27319 + if (getParentListItemId(nextBlockClientId)) {
27320 + outdentListItem(nextBlockClientId);
27321 + } else {
27322 + mergeWithNested(clientId, nextBlockClientId);
27323 + }
27324 + } else {
27325 + const previousBlockClientId = getPreviousBlockClientId(clientId);
27326 + if (getParentListItemId(clientId)) {
27327 + outdentListItem(clientId);
27328 + } else if (previousBlockClientId) {
27329 + const trailingId = getTrailingId(previousBlockClientId);
27330 + mergeWithNested(trailingId, clientId);
27331 + } else {
27332 + onMerge(forward);
27333 + }
27334 + }
27335 + };
27336 + }
27337 +
27338 +
27339 + ;// ./node_modules/@wordpress/block-library/build-module/list-item/edit.js
27340 +
27341 +
27342 +
27343 +
27344 +
27345 +
27346 +
27347 +
27348 +
27349 + function edit_IndentUI({ clientId }) {
27350 + const indentListItem = useIndentListItem(clientId);
27351 + const outdentListItem = useOutdentListItem();
27352 + const { canIndent, canOutdent } = (0,external_wp_data_namespaceObject.useSelect)(
27353 + (select) => {
27354 + const { getBlockIndex, getBlockRootClientId, getBlockName } = select(external_wp_blockEditor_namespaceObject.store);
27355 + return {
27356 + canIndent: getBlockIndex(clientId) > 0,
27357 + canOutdent: getBlockName(
27358 + getBlockRootClientId(getBlockRootClientId(clientId))
27359 + ) === "core/list-item"
27360 + };
27361 + },
27362 + [clientId]
27363 + );
27364 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
27365 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
27366 + external_wp_components_namespaceObject.ToolbarButton,
27367 + {
27368 + icon: (0,external_wp_i18n_namespaceObject.isRTL)() ? format_outdent_rtl_default : format_outdent_default,
27369 + title: (0,external_wp_i18n_namespaceObject.__)("Outdent"),
27370 + shortcut: external_wp_keycodes_namespaceObject.displayShortcut.shift("Tab"),
27371 + description: (0,external_wp_i18n_namespaceObject.__)("Outdent list item"),
27372 + disabled: !canOutdent,
27373 + onClick: () => outdentListItem()
27374 + }
27375 + ),
27376 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
27377 + external_wp_components_namespaceObject.ToolbarButton,
27378 + {
27379 + icon: (0,external_wp_i18n_namespaceObject.isRTL)() ? format_indent_rtl_default : format_indent_default,
27380 + title: (0,external_wp_i18n_namespaceObject.__)("Indent"),
27381 + shortcut: "Tab",
27382 + description: (0,external_wp_i18n_namespaceObject.__)("Indent list item"),
27383 + disabled: !canIndent,
27384 + onClick: () => indentListItem()
27385 + }
27386 + )
27387 + ] });
27388 + }
27389 + function ListItemEdit({
27390 + attributes,
27391 + setAttributes,
27392 + clientId,
27393 + mergeBlocks
27394 + }) {
27395 + const { placeholder, content } = attributes;
27396 + const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)();
27397 + const innerBlocksProps = (0,external_wp_blockEditor_namespaceObject.useInnerBlocksProps)(blockProps, {
27398 + renderAppender: false,
27399 + __unstableDisableDropZone: true
27400 + });
27401 + const useEnterRef = use_enter_useEnter({ content, clientId });
27402 + const useSpaceRef = useSpace(clientId);
27403 + const onMerge = useMerge(clientId, mergeBlocks);
27404 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
27405 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("li", { ...innerBlocksProps, children: [
27406 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
27407 + external_wp_blockEditor_namespaceObject.RichText,
27408 + {
27409 + ref: (0,external_wp_compose_namespaceObject.useMergeRefs)([useEnterRef, useSpaceRef]),
27410 + identifier: "content",
27411 + tagName: "div",
27412 + onChange: (nextContent) => setAttributes({ content: nextContent }),
27413 + value: content,
27414 + "aria-label": (0,external_wp_i18n_namespaceObject.__)("List text"),
27415 + placeholder: placeholder || (0,external_wp_i18n_namespaceObject.__)("List"),
27416 + onMerge
27417 + }
27418 + ),
27419 + innerBlocksProps.children
27420 + ] }),
27421 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockControls, { group: "block", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(edit_IndentUI, { clientId }) })
27422 + ] });
27423 + }
27424 +
27425 +
27426 + ;// ./node_modules/@wordpress/block-library/build-module/list-item/save.js
27427 +
27428 +
27429 + function list_item_save_save({ attributes }) {
27430 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("li", { ...external_wp_blockEditor_namespaceObject.useBlockProps.save(), children: [
27431 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichText.Content, { value: attributes.content }),
27432 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, {})
27433 + ] });
27434 + }
27435 +
27436 +
27437 + ;// ./node_modules/@wordpress/block-library/build-module/list-item/transforms.js
27438 +
27439 + const list_item_transforms_transforms = {
27440 + to: [
27441 + {
27442 + type: "block",
27443 + blocks: ["core/paragraph"],
27444 + transform: (attributes, innerBlocks = []) => [
27445 + (0,external_wp_blocks_namespaceObject.createBlock)("core/paragraph", attributes),
27446 + ...innerBlocks.map((block) => (0,external_wp_blocks_namespaceObject.cloneBlock)(block))
27447 + ]
27448 + }
27449 + ]
27450 + };
27451 + var list_item_transforms_transforms_default = list_item_transforms_transforms;
27452 +
27453 +
27454 + ;// ./node_modules/@wordpress/block-library/build-module/list-item/index.js
27455 +
27456 +
27457 +
27458 +
27459 +
27460 +
27461 +
27462 +
27463 + const { name: list_item_name } = list_item_block_namespaceObject;
27464 + const list_item_settings = {
27465 + icon: list_item_default,
27466 + edit: ListItemEdit,
27467 + save: list_item_save_save,
27468 + merge(attributes, attributesToMerge) {
27469 + return {
27470 + ...attributes,
27471 + content: attributes.content + attributesToMerge.content
27472 + };
27473 + },
27474 + transforms: list_item_transforms_transforms_default,
27475 + [unlock(external_wp_blockEditor_namespaceObject.privateApis).requiresWrapperOnCopy]: true
27476 + };
27477 + const list_item_init = () => initBlock({ name: list_item_name, metadata: list_item_block_namespaceObject, settings: list_item_settings });
27478 +
27479 +
27480 + ;// ./node_modules/@wordpress/icons/build-module/library/login.js
27481 +
27482 +
27483 + var login_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M11 14.5l1.1 1.1 3-3 .5-.5-.6-.6-3-3-1 1 1.7 1.7H5v1.5h7.7L11 14.5zM16.8 5h-7c-1.1 0-2 .9-2 2v1.5h1.5V7c0-.3.2-.5.5-.5h7c.3 0 .5.2.5.5v10c0 .3-.2.5-.5.5h-7c-.3 0-.5-.2-.5-.5v-1.5H7.8V17c0 1.1.9 2 2 2h7c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2z" }) });
27484 +
27485 +
27486 + ;// ./node_modules/@wordpress/block-library/build-module/loginout/edit.js
27487 +
27488 +
27489 +
27490 +
27491 +
27492 + function LoginOutEdit({ attributes, setAttributes }) {
27493 + const { displayLoginAsForm, redirectToCurrent } = attributes;
27494 + const dropdownMenuProps = useToolsPanelDropdownMenuProps();
27495 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
27496 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(
27497 + external_wp_components_namespaceObject.__experimentalToolsPanel,
27498 + {
27499 + label: (0,external_wp_i18n_namespaceObject.__)("Settings"),
27500 + resetAll: () => {
27501 + setAttributes({
27502 + displayLoginAsForm: false,
27503 + redirectToCurrent: true
27504 + });
27505 + },
27506 + dropdownMenuProps,
27507 + children: [
27508 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
27509 + external_wp_components_namespaceObject.__experimentalToolsPanelItem,
27510 + {
27511 + label: (0,external_wp_i18n_namespaceObject.__)("Display login as form"),
27512 + isShownByDefault: true,
27513 + hasValue: () => displayLoginAsForm,
27514 + onDeselect: () => setAttributes({ displayLoginAsForm: false }),
27515 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
27516 + external_wp_components_namespaceObject.ToggleControl,
27517 + {
27518 + __nextHasNoMarginBottom: true,
27519 + label: (0,external_wp_i18n_namespaceObject.__)("Display login as form"),
27520 + checked: displayLoginAsForm,
27521 + onChange: () => setAttributes({
27522 + displayLoginAsForm: !displayLoginAsForm
27523 + })
27524 + }
27525 + )
27526 + }
27527 + ),
27528 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
27529 + external_wp_components_namespaceObject.__experimentalToolsPanelItem,
27530 + {
27531 + label: (0,external_wp_i18n_namespaceObject.__)("Redirect to current URL"),
27532 + isShownByDefault: true,
27533 + hasValue: () => !redirectToCurrent,
27534 + onDeselect: () => setAttributes({ redirectToCurrent: true }),
27535 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
27536 + external_wp_components_namespaceObject.ToggleControl,
27537 + {
27538 + __nextHasNoMarginBottom: true,
27539 + label: (0,external_wp_i18n_namespaceObject.__)("Redirect to current URL"),
27540 + checked: redirectToCurrent,
27541 + onChange: () => setAttributes({
27542 + redirectToCurrent: !redirectToCurrent
27543 + })
27544 + }
27545 + )
27546 + }
27547 + )
27548 + ]
27549 + }
27550 + ) }),
27551 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
27552 + "div",
27553 + {
27554 + ...(0,external_wp_blockEditor_namespaceObject.useBlockProps)({
27555 + className: "logged-in"
27556 + }),
27557 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("a", { href: "#login-pseudo-link", children: (0,external_wp_i18n_namespaceObject.__)("Log out") })
27558 + }
27559 + )
27560 + ] });
27561 + }
27562 +
27563 +
27564 + ;// ./node_modules/@wordpress/block-library/build-module/loginout/block.json
27565 + const loginout_block_namespaceObject = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/loginout","title":"Login/out","category":"theme","description":"Show login & logout links.","keywords":["login","logout","form"],"textdomain":"default","attributes":{"displayLoginAsForm":{"type":"boolean","default":false},"redirectToCurrent":{"type":"boolean","default":true}},"example":{"viewportWidth":350},"supports":{"className":true,"color":{"background":true,"text":false,"gradients":true,"link":true},"spacing":{"margin":true,"padding":true,"__experimentalDefaultControls":{"margin":false,"padding":false}},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"__experimentalBorder":{"radius":true,"color":true,"width":true,"style":true},"interactivity":{"clientNavigation":true}},"style":"wp-block-loginout"}');
27566 + ;// ./node_modules/@wordpress/block-library/build-module/loginout/index.js
27567 +
27568 +
27569 +
27570 +
27571 + const { name: loginout_name } = loginout_block_namespaceObject;
27572 + const loginout_settings = {
27573 + icon: login_default,
27574 + edit: LoginOutEdit
27575 + };
27576 + const loginout_init = () => initBlock({ name: loginout_name, metadata: loginout_block_namespaceObject, settings: loginout_settings });
27577 +
27578 +
27579 + ;// ./node_modules/@wordpress/icons/build-module/library/media-and-text.js
27580 +
27581 +
27582 + var media_and_text_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M3 6v11.5h8V6H3Zm11 3h7V7.5h-7V9Zm7 3.5h-7V11h7v1.5ZM14 16h7v-1.5h-7V16Z" }) });
27583 +
27584 +
27585 + ;// ./node_modules/@wordpress/block-library/build-module/media-text/constants.js
27586 +
27587 + const media_text_constants_DEFAULT_MEDIA_SIZE_SLUG = "full";
27588 + const WIDTH_CONSTRAINT_PERCENTAGE = 15;
27589 + const media_text_constants_LINK_DESTINATION_MEDIA = "media";
27590 + const media_text_constants_LINK_DESTINATION_ATTACHMENT = "attachment";
27591 + const constants_TEMPLATE = [
27592 + [
27593 + "core/paragraph",
27594 + {
27595 + placeholder: (0,external_wp_i18n_namespaceObject._x)("Content\u2026", "content placeholder")
27596 + }
27597 + ]
27598 + ];
27599 +
27600 +
27601 + ;// ./node_modules/@wordpress/block-library/build-module/media-text/deprecated.js
27602 +
27603 +
27604 +
27605 +
27606 +
27607 + const v1ToV5ImageFillStyles = (url, focalPoint) => {
27608 + return url ? {
27609 + backgroundImage: `url(${url})`,
27610 + backgroundPosition: focalPoint ? `${focalPoint.x * 100}% ${focalPoint.y * 100}%` : `50% 50%`
27611 + } : {};
27612 + };
27613 + const v6ToV7ImageFillStyles = (url, focalPoint) => {
27614 + return url ? {
27615 + backgroundImage: `url(${url})`,
27616 + backgroundPosition: focalPoint ? `${Math.round(focalPoint.x * 100)}% ${Math.round(
27617 + focalPoint.y * 100
27618 + )}%` : `50% 50%`
27619 + } : {};
27620 + };
27621 + const DEFAULT_MEDIA_WIDTH = 50;
27622 + const noop = () => {
27623 + };
27624 + const media_text_deprecated_migrateCustomColors = (attributes) => {
27625 + if (!attributes.customBackgroundColor) {
27626 + return attributes;
27627 + }
27628 + const style = {
27629 + color: {
27630 + background: attributes.customBackgroundColor
27631 + }
27632 + };
27633 + const { customBackgroundColor, ...restAttributes } = attributes;
27634 + return {
27635 + ...restAttributes,
27636 + style
27637 + };
27638 + };
27639 + const migrateDefaultAlign = (attributes) => {
27640 + if (attributes.align) {
27641 + return attributes;
27642 + }
27643 + return {
27644 + ...attributes,
27645 + align: "wide"
27646 + };
27647 + };
27648 + const v0Attributes = {
27649 + align: {
27650 + type: "string",
27651 + default: "wide"
27652 + },
27653 + mediaAlt: {
27654 + type: "string",
27655 + source: "attribute",
27656 + selector: "figure img",
27657 + attribute: "alt",
27658 + default: ""
27659 + },
27660 + mediaPosition: {
27661 + type: "string",
27662 + default: "left"
27663 + },
27664 + mediaId: {
27665 + type: "number"
27666 + },
27667 + mediaType: {
27668 + type: "string"
27669 + },
27670 + mediaWidth: {
27671 + type: "number",
27672 + default: 50
27673 + },
27674 + isStackedOnMobile: {
27675 + type: "boolean",
27676 + default: false
27677 + }
27678 + };
27679 + const v4ToV5BlockAttributes = {
27680 + ...v0Attributes,
27681 + isStackedOnMobile: {
27682 + type: "boolean",
27683 + default: true
27684 + },
27685 + mediaUrl: {
27686 + type: "string",
27687 + source: "attribute",
27688 + selector: "figure video,figure img",
27689 + attribute: "src"
27690 + },
27691 + mediaLink: {
27692 + type: "string"
27693 + },
27694 + linkDestination: {
27695 + type: "string"
27696 + },
27697 + linkTarget: {
27698 + type: "string",
27699 + source: "attribute",
27700 + selector: "figure a",
27701 + attribute: "target"
27702 + },
27703 + href: {
27704 + type: "string",
27705 + source: "attribute",
27706 + selector: "figure a",
27707 + attribute: "href"
27708 + },
27709 + rel: {
27710 + type: "string",
27711 + source: "attribute",
27712 + selector: "figure a",
27713 + attribute: "rel"
27714 + },
27715 + linkClass: {
27716 + type: "string",
27717 + source: "attribute",
27718 + selector: "figure a",
27719 + attribute: "class"
27720 + },
27721 + mediaSizeSlug: {
27722 + type: "string"
27723 + },
27724 + verticalAlignment: {
27725 + type: "string"
27726 + },
27727 + imageFill: {
27728 + type: "boolean"
27729 + },
27730 + focalPoint: {
27731 + type: "object"
27732 + }
27733 + };
27734 + const v6Attributes = {
27735 + ...v4ToV5BlockAttributes,
27736 + mediaAlt: {
27737 + type: "string",
27738 + source: "attribute",
27739 + selector: "figure img",
27740 + attribute: "alt",
27741 + default: "",
27742 + role: "content"
27743 + },
27744 + mediaId: {
27745 + type: "number",
27746 + role: "content"
27747 + },
27748 + mediaUrl: {
27749 + type: "string",
27750 + source: "attribute",
27751 + selector: "figure video,figure img",
27752 + attribute: "src",
27753 + role: "content"
27754 + },
27755 + href: {
27756 + type: "string",
27757 + source: "attribute",
27758 + selector: "figure a",
27759 + attribute: "href",
27760 + role: "content"
27761 + },
27762 + mediaType: {
27763 + type: "string",
27764 + role: "content"
27765 + }
27766 + };
27767 + const v7Attributes = {
27768 + ...v6Attributes,
27769 + align: {
27770 + type: "string",
27771 + // v7 changed the default for the `align` attribute.
27772 + default: "none"
27773 + },
27774 + // New attribute.
27775 + useFeaturedImage: {
27776 + type: "boolean",
27777 + default: false
27778 + }
27779 + };
27780 + const v4ToV5Supports = {
27781 + anchor: true,
27782 + align: ["wide", "full"],
27783 + html: false,
27784 + color: {
27785 + gradients: true,
27786 + link: true
27787 + }
27788 + };
27789 + const v6Supports = {
27790 + ...v4ToV5Supports,
27791 + color: {
27792 + gradients: true,
27793 + link: true,
27794 + __experimentalDefaultControls: {
27795 + background: true,
27796 + text: true
27797 + }
27798 + },
27799 + spacing: {
27800 + margin: true,
27801 + padding: true
27802 + },
27803 + typography: {
27804 + fontSize: true,
27805 + lineHeight: true,
27806 + __experimentalFontFamily: true,
27807 + __experimentalFontWeight: true,
27808 + __experimentalFontStyle: true,
27809 + __experimentalTextTransform: true,
27810 + __experimentalTextDecoration: true,
27811 + __experimentalLetterSpacing: true,
27812 + __experimentalDefaultControls: {
27813 + fontSize: true
27814 + }
27815 + }
27816 + };
27817 + const v7Supports = {
27818 + ...v6Supports,
27819 + __experimentalBorder: {
27820 + color: true,
27821 + radius: true,
27822 + style: true,
27823 + width: true,
27824 + __experimentalDefaultControls: {
27825 + color: true,
27826 + radius: true,
27827 + style: true,
27828 + width: true
27829 + }
27830 + },
27831 + color: {
27832 + gradients: true,
27833 + heading: true,
27834 + link: true,
27835 + __experimentalDefaultControls: {
27836 + background: true,
27837 + text: true
27838 + }
27839 + },
27840 + interactivity: {
27841 + clientNavigation: true
27842 + }
27843 + };
27844 + const media_text_deprecated_v7 = {
27845 + attributes: v7Attributes,
27846 + supports: v7Supports,
27847 + usesContext: ["postId", "postType"],
27848 + save({ attributes }) {
27849 + const {
27850 + isStackedOnMobile,
27851 + mediaAlt,
27852 + mediaPosition,
27853 + mediaType,
27854 + mediaUrl,
27855 + mediaWidth,
27856 + mediaId,
27857 + verticalAlignment,
27858 + imageFill,
27859 + focalPoint,
27860 + linkClass,
27861 + href,
27862 + linkTarget,
27863 + rel
27864 + } = attributes;
27865 + const mediaSizeSlug = attributes.mediaSizeSlug || media_text_constants_DEFAULT_MEDIA_SIZE_SLUG;
27866 + const newRel = !rel ? void 0 : rel;
27867 + const imageClasses = dist_clsx({
27868 + [`wp-image-${mediaId}`]: mediaId && mediaType === "image",
27869 + [`size-${mediaSizeSlug}`]: mediaId && mediaType === "image"
27870 + });
27871 + let image = mediaUrl ? /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
27872 + "img",
27873 + {
27874 + src: mediaUrl,
27875 + alt: mediaAlt,
27876 + className: imageClasses || null
27877 + }
27878 + ) : null;
27879 + if (href) {
27880 + image = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
27881 + "a",
27882 + {
27883 + className: linkClass,
27884 + href,
27885 + target: linkTarget,
27886 + rel: newRel,
27887 + children: image
27888 + }
27889 + );
27890 + }
27891 + const mediaTypeRenders = {
27892 + image: () => image,
27893 + video: () => /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("video", { controls: true, src: mediaUrl })
27894 + };
27895 + const className = dist_clsx({
27896 + "has-media-on-the-right": "right" === mediaPosition,
27897 + "is-stacked-on-mobile": isStackedOnMobile,
27898 + [`is-vertically-aligned-${verticalAlignment}`]: verticalAlignment,
27899 + "is-image-fill": imageFill
27900 + });
27901 + const backgroundStyles = imageFill ? v6ToV7ImageFillStyles(mediaUrl, focalPoint) : {};
27902 + let gridTemplateColumns;
27903 + if (mediaWidth !== DEFAULT_MEDIA_WIDTH) {
27904 + gridTemplateColumns = "right" === mediaPosition ? `auto ${mediaWidth}%` : `${mediaWidth}% auto`;
27905 + }
27906 + const style = {
27907 + gridTemplateColumns
27908 + };
27909 + if ("right" === mediaPosition) {
27910 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", { ...external_wp_blockEditor_namespaceObject.useBlockProps.save({ className, style }), children: [
27911 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
27912 + "div",
27913 + {
27914 + ...external_wp_blockEditor_namespaceObject.useInnerBlocksProps.save({
27915 + className: "wp-block-media-text__content"
27916 + })
27917 + }
27918 + ),
27919 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
27920 + "figure",
27921 + {
27922 + className: "wp-block-media-text__media",
27923 + style: backgroundStyles,
27924 + children: (mediaTypeRenders[mediaType] || noop)()
27925 + }
27926 + )
27927 + ] });
27928 + }
27929 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", { ...external_wp_blockEditor_namespaceObject.useBlockProps.save({ className, style }), children: [
27930 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
27931 + "figure",
27932 + {
27933 + className: "wp-block-media-text__media",
27934 + style: backgroundStyles,
27935 + children: (mediaTypeRenders[mediaType] || noop)()
27936 + }
27937 + ),
27938 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
27939 + "div",
27940 + {
27941 + ...external_wp_blockEditor_namespaceObject.useInnerBlocksProps.save({
27942 + className: "wp-block-media-text__content"
27943 + })
27944 + }
27945 + )
27946 + ] });
27947 + }
27948 + };
27949 + const media_text_deprecated_v6 = {
27950 + attributes: v6Attributes,
27951 + supports: v6Supports,
27952 + save({ attributes }) {
27953 + const {
27954 + isStackedOnMobile,
27955 + mediaAlt,
27956 + mediaPosition,
27957 + mediaType,
27958 + mediaUrl,
27959 + mediaWidth,
27960 + mediaId,
27961 + verticalAlignment,
27962 + imageFill,
27963 + focalPoint,
27964 + linkClass,
27965 + href,
27966 + linkTarget,
27967 + rel
27968 + } = attributes;
27969 + const mediaSizeSlug = attributes.mediaSizeSlug || media_text_constants_DEFAULT_MEDIA_SIZE_SLUG;
27970 + const newRel = !rel ? void 0 : rel;
27971 + const imageClasses = dist_clsx({
27972 + [`wp-image-${mediaId}`]: mediaId && mediaType === "image",
27973 + [`size-${mediaSizeSlug}`]: mediaId && mediaType === "image"
27974 + });
27975 + let image = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
27976 + "img",
27977 + {
27978 + src: mediaUrl,
27979 + alt: mediaAlt,
27980 + className: imageClasses || null
27981 + }
27982 + );
27983 + if (href) {
27984 + image = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
27985 + "a",
27986 + {
27987 + className: linkClass,
27988 + href,
27989 + target: linkTarget,
27990 + rel: newRel,
27991 + children: image
27992 + }
27993 + );
27994 + }
27995 + const mediaTypeRenders = {
27996 + image: () => image,
27997 + video: () => /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("video", { controls: true, src: mediaUrl })
27998 + };
27999 + const className = dist_clsx({
28000 + "has-media-on-the-right": "right" === mediaPosition,
28001 + "is-stacked-on-mobile": isStackedOnMobile,
28002 + [`is-vertically-aligned-${verticalAlignment}`]: verticalAlignment,
28003 + "is-image-fill": imageFill
28004 + });
28005 + const backgroundStyles = imageFill ? v6ToV7ImageFillStyles(mediaUrl, focalPoint) : {};
28006 + let gridTemplateColumns;
28007 + if (mediaWidth !== DEFAULT_MEDIA_WIDTH) {
28008 + gridTemplateColumns = "right" === mediaPosition ? `auto ${mediaWidth}%` : `${mediaWidth}% auto`;
28009 + }
28010 + const style = {
28011 + gridTemplateColumns
28012 + };
28013 + if ("right" === mediaPosition) {
28014 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", { ...external_wp_blockEditor_namespaceObject.useBlockProps.save({ className, style }), children: [
28015 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
28016 + "div",
28017 + {
28018 + ...external_wp_blockEditor_namespaceObject.useInnerBlocksProps.save({
28019 + className: "wp-block-media-text__content"
28020 + })
28021 + }
28022 + ),
28023 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
28024 + "figure",
28025 + {
28026 + className: "wp-block-media-text__media",
28027 + style: backgroundStyles,
28028 + children: (mediaTypeRenders[mediaType] || noop)()
28029 + }
28030 + )
28031 + ] });
28032 + }
28033 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", { ...external_wp_blockEditor_namespaceObject.useBlockProps.save({ className, style }), children: [
28034 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
28035 + "figure",
28036 + {
28037 + className: "wp-block-media-text__media",
28038 + style: backgroundStyles,
28039 + children: (mediaTypeRenders[mediaType] || noop)()
28040 + }
28041 + ),
28042 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
28043 + "div",
28044 + {
28045 + ...external_wp_blockEditor_namespaceObject.useInnerBlocksProps.save({
28046 + className: "wp-block-media-text__content"
28047 + })
28048 + }
28049 + )
28050 + ] });
28051 + },
28052 + migrate: migrateDefaultAlign,
28053 + isEligible(attributes, innerBlocks, { block }) {
28054 + const { attributes: finalizedAttributes } = block;
28055 + return attributes.align === void 0 && !!finalizedAttributes.className?.includes("alignwide");
28056 + }
28057 + };
28058 + const media_text_deprecated_v5 = {
28059 + attributes: v4ToV5BlockAttributes,
28060 + supports: v4ToV5Supports,
28061 + save({ attributes }) {
28062 + const {
28063 + isStackedOnMobile,
28064 + mediaAlt,
28065 + mediaPosition,
28066 + mediaType,
28067 + mediaUrl,
28068 + mediaWidth,
28069 + mediaId,
28070 + verticalAlignment,
28071 + imageFill,
28072 + focalPoint,
28073 + linkClass,
28074 + href,
28075 + linkTarget,
28076 + rel
28077 + } = attributes;
28078 + const mediaSizeSlug = attributes.mediaSizeSlug || media_text_constants_DEFAULT_MEDIA_SIZE_SLUG;
28079 + const newRel = !rel ? void 0 : rel;
28080 + const imageClasses = dist_clsx({
28081 + [`wp-image-${mediaId}`]: mediaId && mediaType === "image",
28082 + [`size-${mediaSizeSlug}`]: mediaId && mediaType === "image"
28083 + });
28084 + let image = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
28085 + "img",
28086 + {
28087 + src: mediaUrl,
28088 + alt: mediaAlt,
28089 + className: imageClasses || null
28090 + }
28091 + );
28092 + if (href) {
28093 + image = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
28094 + "a",
28095 + {
28096 + className: linkClass,
28097 + href,
28098 + target: linkTarget,
28099 + rel: newRel,
28100 + children: image
28101 + }
28102 + );
28103 + }
28104 + const mediaTypeRenders = {
28105 + image: () => image,
28106 + video: () => /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("video", { controls: true, src: mediaUrl })
28107 + };
28108 + const className = dist_clsx({
28109 + "has-media-on-the-right": "right" === mediaPosition,
28110 + "is-stacked-on-mobile": isStackedOnMobile,
28111 + [`is-vertically-aligned-${verticalAlignment}`]: verticalAlignment,
28112 + "is-image-fill": imageFill
28113 + });
28114 + const backgroundStyles = imageFill ? v1ToV5ImageFillStyles(mediaUrl, focalPoint) : {};
28115 + let gridTemplateColumns;
28116 + if (mediaWidth !== DEFAULT_MEDIA_WIDTH) {
28117 + gridTemplateColumns = "right" === mediaPosition ? `auto ${mediaWidth}%` : `${mediaWidth}% auto`;
28118 + }
28119 + const style = {
28120 + gridTemplateColumns
28121 + };
28122 + if ("right" === mediaPosition) {
28123 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", { ...external_wp_blockEditor_namespaceObject.useBlockProps.save({ className, style }), children: [
28124 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
28125 + "div",
28126 + {
28127 + ...external_wp_blockEditor_namespaceObject.useInnerBlocksProps.save({
28128 + className: "wp-block-media-text__content"
28129 + })
28130 + }
28131 + ),
28132 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
28133 + "figure",
28134 + {
28135 + className: "wp-block-media-text__media",
28136 + style: backgroundStyles,
28137 + children: (mediaTypeRenders[mediaType] || noop)()
28138 + }
28139 + )
28140 + ] });
28141 + }
28142 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", { ...external_wp_blockEditor_namespaceObject.useBlockProps.save({ className, style }), children: [
28143 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
28144 + "figure",
28145 + {
28146 + className: "wp-block-media-text__media",
28147 + style: backgroundStyles,
28148 + children: (mediaTypeRenders[mediaType] || noop)()
28149 + }
28150 + ),
28151 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
28152 + "div",
28153 + {
28154 + ...external_wp_blockEditor_namespaceObject.useInnerBlocksProps.save({
28155 + className: "wp-block-media-text__content"
28156 + })
28157 + }
28158 + )
28159 + ] });
28160 + },
28161 + migrate: migrateDefaultAlign
28162 + };
28163 + const media_text_deprecated_v4 = {
28164 + attributes: v4ToV5BlockAttributes,
28165 + supports: v4ToV5Supports,
28166 + save({ attributes }) {
28167 + const {
28168 + isStackedOnMobile,
28169 + mediaAlt,
28170 + mediaPosition,
28171 + mediaType,
28172 + mediaUrl,
28173 + mediaWidth,
28174 + mediaId,
28175 + verticalAlignment,
28176 + imageFill,
28177 + focalPoint,
28178 + linkClass,
28179 + href,
28180 + linkTarget,
28181 + rel
28182 + } = attributes;
28183 + const mediaSizeSlug = attributes.mediaSizeSlug || media_text_constants_DEFAULT_MEDIA_SIZE_SLUG;
28184 + const newRel = !rel ? void 0 : rel;
28185 + const imageClasses = dist_clsx({
28186 + [`wp-image-${mediaId}`]: mediaId && mediaType === "image",
28187 + [`size-${mediaSizeSlug}`]: mediaId && mediaType === "image"
28188 + });
28189 + let image = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
28190 + "img",
28191 + {
28192 + src: mediaUrl,
28193 + alt: mediaAlt,
28194 + className: imageClasses || null
28195 + }
28196 + );
28197 + if (href) {
28198 + image = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
28199 + "a",
28200 + {
28201 + className: linkClass,
28202 + href,
28203 + target: linkTarget,
28204 + rel: newRel,
28205 + children: image
28206 + }
28207 + );
28208 + }
28209 + const mediaTypeRenders = {
28210 + image: () => image,
28211 + video: () => /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("video", { controls: true, src: mediaUrl })
28212 + };
28213 + const className = dist_clsx({
28214 + "has-media-on-the-right": "right" === mediaPosition,
28215 + "is-stacked-on-mobile": isStackedOnMobile,
28216 + [`is-vertically-aligned-${verticalAlignment}`]: verticalAlignment,
28217 + "is-image-fill": imageFill
28218 + });
28219 + const backgroundStyles = imageFill ? v1ToV5ImageFillStyles(mediaUrl, focalPoint) : {};
28220 + let gridTemplateColumns;
28221 + if (mediaWidth !== DEFAULT_MEDIA_WIDTH) {
28222 + gridTemplateColumns = "right" === mediaPosition ? `auto ${mediaWidth}%` : `${mediaWidth}% auto`;
28223 + }
28224 + const style = {
28225 + gridTemplateColumns
28226 + };
28227 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", { ...external_wp_blockEditor_namespaceObject.useBlockProps.save({ className, style }), children: [
28228 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
28229 + "figure",
28230 + {
28231 + className: "wp-block-media-text__media",
28232 + style: backgroundStyles,
28233 + children: (mediaTypeRenders[mediaType] || noop)()
28234 + }
28235 + ),
28236 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
28237 + "div",
28238 + {
28239 + ...external_wp_blockEditor_namespaceObject.useInnerBlocksProps.save({
28240 + className: "wp-block-media-text__content"
28241 + })
28242 + }
28243 + )
28244 + ] });
28245 + },
28246 + migrate: migrateDefaultAlign
28247 + };
28248 + const media_text_deprecated_v3 = {
28249 + attributes: {
28250 + ...v0Attributes,
28251 + isStackedOnMobile: {
28252 + type: "boolean",
28253 + default: true
28254 + },
28255 + backgroundColor: {
28256 + type: "string"
28257 + },
28258 + customBackgroundColor: {
28259 + type: "string"
28260 + },
28261 + mediaLink: {
28262 + type: "string"
28263 + },
28264 + linkDestination: {
28265 + type: "string"
28266 + },
28267 + linkTarget: {
28268 + type: "string",
28269 + source: "attribute",
28270 + selector: "figure a",
28271 + attribute: "target"
28272 + },
28273 + href: {
28274 + type: "string",
28275 + source: "attribute",
28276 + selector: "figure a",
28277 + attribute: "href"
28278 + },
28279 + rel: {
28280 + type: "string",
28281 + source: "attribute",
28282 + selector: "figure a",
28283 + attribute: "rel"
28284 + },
28285 + linkClass: {
28286 + type: "string",
28287 + source: "attribute",
28288 + selector: "figure a",
28289 + attribute: "class"
28290 + },
28291 + verticalAlignment: {
28292 + type: "string"
28293 + },
28294 + imageFill: {
28295 + type: "boolean"
28296 + },
28297 + focalPoint: {
28298 + type: "object"
28299 + }
28300 + },
28301 + migrate: (0,external_wp_compose_namespaceObject.compose)(media_text_deprecated_migrateCustomColors, migrateDefaultAlign),
28302 + save({ attributes }) {
28303 + const {
28304 + backgroundColor,
28305 + customBackgroundColor,
28306 + isStackedOnMobile,
28307 + mediaAlt,
28308 + mediaPosition,
28309 + mediaType,
28310 + mediaUrl,
28311 + mediaWidth,
28312 + mediaId,
28313 + verticalAlignment,
28314 + imageFill,
28315 + focalPoint,
28316 + linkClass,
28317 + href,
28318 + linkTarget,
28319 + rel
28320 + } = attributes;
28321 + const newRel = !rel ? void 0 : rel;
28322 + let image = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
28323 + "img",
28324 + {
28325 + src: mediaUrl,
28326 + alt: mediaAlt,
28327 + className: mediaId && mediaType === "image" ? `wp-image-${mediaId}` : null
28328 + }
28329 + );
28330 + if (href) {
28331 + image = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
28332 + "a",
28333 + {
28334 + className: linkClass,
28335 + href,
28336 + target: linkTarget,
28337 + rel: newRel,
28338 + children: image
28339 + }
28340 + );
28341 + }
28342 + const mediaTypeRenders = {
28343 + image: () => image,
28344 + video: () => /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("video", { controls: true, src: mediaUrl })
28345 + };
28346 + const backgroundClass = (0,external_wp_blockEditor_namespaceObject.getColorClassName)(
28347 + "background-color",
28348 + backgroundColor
28349 + );
28350 + const className = dist_clsx({
28351 + "has-media-on-the-right": "right" === mediaPosition,
28352 + "has-background": backgroundClass || customBackgroundColor,
28353 + [backgroundClass]: backgroundClass,
28354 + "is-stacked-on-mobile": isStackedOnMobile,
28355 + [`is-vertically-aligned-${verticalAlignment}`]: verticalAlignment,
28356 + "is-image-fill": imageFill
28357 + });
28358 + const backgroundStyles = imageFill ? v1ToV5ImageFillStyles(mediaUrl, focalPoint) : {};
28359 + let gridTemplateColumns;
28360 + if (mediaWidth !== DEFAULT_MEDIA_WIDTH) {
28361 + gridTemplateColumns = "right" === mediaPosition ? `auto ${mediaWidth}%` : `${mediaWidth}% auto`;
28362 + }
28363 + const style = {
28364 + backgroundColor: backgroundClass ? void 0 : customBackgroundColor,
28365 + gridTemplateColumns
28366 + };
28367 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", { className, style, children: [
28368 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
28369 + "figure",
28370 + {
28371 + className: "wp-block-media-text__media",
28372 + style: backgroundStyles,
28373 + children: (mediaTypeRenders[mediaType] || noop)()
28374 + }
28375 + ),
28376 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { className: "wp-block-media-text__content", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, {}) })
28377 + ] });
28378 + }
28379 + };
28380 + const media_text_deprecated_v2 = {
28381 + attributes: {
28382 + ...v0Attributes,
28383 + backgroundColor: {
28384 + type: "string"
28385 + },
28386 + customBackgroundColor: {
28387 + type: "string"
28388 + },
28389 + mediaUrl: {
28390 + type: "string",
28391 + source: "attribute",
28392 + selector: "figure video,figure img",
28393 + attribute: "src"
28394 + },
28395 + verticalAlignment: {
28396 + type: "string"
28397 + },
28398 + imageFill: {
28399 + type: "boolean"
28400 + },
28401 + focalPoint: {
28402 + type: "object"
28403 + }
28404 + },
28405 + migrate: (0,external_wp_compose_namespaceObject.compose)(media_text_deprecated_migrateCustomColors, migrateDefaultAlign),
28406 + save({ attributes }) {
28407 + const {
28408 + backgroundColor,
28409 + customBackgroundColor,
28410 + isStackedOnMobile,
28411 + mediaAlt,
28412 + mediaPosition,
28413 + mediaType,
28414 + mediaUrl,
28415 + mediaWidth,
28416 + mediaId,
28417 + verticalAlignment,
28418 + imageFill,
28419 + focalPoint
28420 + } = attributes;
28421 + const mediaTypeRenders = {
28422 + image: () => /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
28423 + "img",
28424 + {
28425 + src: mediaUrl,
28426 + alt: mediaAlt,
28427 + className: mediaId && mediaType === "image" ? `wp-image-${mediaId}` : null
28428 + }
28429 + ),
28430 + video: () => /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("video", { controls: true, src: mediaUrl })
28431 + };
28432 + const backgroundClass = (0,external_wp_blockEditor_namespaceObject.getColorClassName)(
28433 + "background-color",
28434 + backgroundColor
28435 + );
28436 + const className = dist_clsx({
28437 + "has-media-on-the-right": "right" === mediaPosition,
28438 + [backgroundClass]: backgroundClass,
28439 + "is-stacked-on-mobile": isStackedOnMobile,
28440 + [`is-vertically-aligned-${verticalAlignment}`]: verticalAlignment,
28441 + "is-image-fill": imageFill
28442 + });
28443 + const backgroundStyles = imageFill ? v1ToV5ImageFillStyles(mediaUrl, focalPoint) : {};
28444 + let gridTemplateColumns;
28445 + if (mediaWidth !== DEFAULT_MEDIA_WIDTH) {
28446 + gridTemplateColumns = "right" === mediaPosition ? `auto ${mediaWidth}%` : `${mediaWidth}% auto`;
28447 + }
28448 + const style = {
28449 + backgroundColor: backgroundClass ? void 0 : customBackgroundColor,
28450 + gridTemplateColumns
28451 + };
28452 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", { className, style, children: [
28453 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
28454 + "figure",
28455 + {
28456 + className: "wp-block-media-text__media",
28457 + style: backgroundStyles,
28458 + children: (mediaTypeRenders[mediaType] || noop)()
28459 + }
28460 + ),
28461 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { className: "wp-block-media-text__content", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, {}) })
28462 + ] });
28463 + }
28464 + };
28465 + const media_text_deprecated_v1 = {
28466 + attributes: {
28467 + ...v0Attributes,
28468 + backgroundColor: {
28469 + type: "string"
28470 + },
28471 + customBackgroundColor: {
28472 + type: "string"
28473 + },
28474 + mediaUrl: {
28475 + type: "string",
28476 + source: "attribute",
28477 + selector: "figure video,figure img",
28478 + attribute: "src"
28479 + }
28480 + },
28481 + migrate: migrateDefaultAlign,
28482 + save({ attributes }) {
28483 + const {
28484 + backgroundColor,
28485 + customBackgroundColor,
28486 + isStackedOnMobile,
28487 + mediaAlt,
28488 + mediaPosition,
28489 + mediaType,
28490 + mediaUrl,
28491 + mediaWidth
28492 + } = attributes;
28493 + const mediaTypeRenders = {
28494 + image: () => /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("img", { src: mediaUrl, alt: mediaAlt }),
28495 + video: () => /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("video", { controls: true, src: mediaUrl })
28496 + };
28497 + const backgroundClass = (0,external_wp_blockEditor_namespaceObject.getColorClassName)(
28498 + "background-color",
28499 + backgroundColor
28500 + );
28501 + const className = dist_clsx({
28502 + "has-media-on-the-right": "right" === mediaPosition,
28503 + [backgroundClass]: backgroundClass,
28504 + "is-stacked-on-mobile": isStackedOnMobile
28505 + });
28506 + let gridTemplateColumns;
28507 + if (mediaWidth !== DEFAULT_MEDIA_WIDTH) {
28508 + gridTemplateColumns = "right" === mediaPosition ? `auto ${mediaWidth}%` : `${mediaWidth}% auto`;
28509 + }
28510 + const style = {
28511 + backgroundColor: backgroundClass ? void 0 : customBackgroundColor,
28512 + gridTemplateColumns
28513 + };
28514 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", { className, style, children: [
28515 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("figure", { className: "wp-block-media-text__media", children: (mediaTypeRenders[mediaType] || noop)() }),
28516 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { className: "wp-block-media-text__content", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, {}) })
28517 + ] });
28518 + }
28519 + };
28520 + var media_text_deprecated_deprecated_default = [media_text_deprecated_v7, media_text_deprecated_v6, media_text_deprecated_v5, media_text_deprecated_v4, media_text_deprecated_v3, media_text_deprecated_v2, media_text_deprecated_v1];
28521 +
28522 +
28523 + ;// ./node_modules/@wordpress/icons/build-module/library/pull-left.js
28524 +
28525 +
28526 + var pull_left_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M4 18h6V6H4v12zm9-9.5V10h7V8.5h-7zm0 7h7V14h-7v1.5z" }) });
28527 +
28528 +
28529 + ;// ./node_modules/@wordpress/icons/build-module/library/pull-right.js
28530 +
28531 +
28532 + var pull_right_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M14 6v12h6V6h-6zM4 10h7V8.5H4V10zm0 5.5h7V14H4v1.5z" }) });
28533 +
28534 +
28535 + ;// ./node_modules/@wordpress/icons/build-module/library/media.js
28536 +
28537 +
28538 + var media_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: [
28539 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "m7 6.5 4 2.5-4 2.5z" }),
28540 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
28541 + external_wp_primitives_namespaceObject.Path,
28542 + {
28543 + fillRule: "evenodd",
28544 + clipRule: "evenodd",
28545 + d: "m5 3c-1.10457 0-2 .89543-2 2v14c0 1.1046.89543 2 2 2h14c1.1046 0 2-.8954 2-2v-14c0-1.10457-.8954-2-2-2zm14 1.5h-14c-.27614 0-.5.22386-.5.5v10.7072l3.62953-2.6465c.25108-.1831.58905-.1924.84981-.0234l2.92666 1.8969 3.5712-3.4719c.2911-.2831.7545-.2831 1.0456 0l2.9772 2.8945v-9.3568c0-.27614-.2239-.5-.5-.5zm-14.5 14.5v-1.4364l4.09643-2.987 2.99567 1.9417c.2936.1903.6798.1523.9307-.0917l3.4772-3.3806 3.4772 3.3806.0228-.0234v2.5968c0 .2761-.2239.5-.5.5h-14c-.27614 0-.5-.2239-.5-.5z"
28546 + }
28547 + )
28548 + ] });
28549 +
28550 +
28551 + ;// ./node_modules/@wordpress/block-library/build-module/media-text/image-fill.js
28552 + function imageFillStyles(url, focalPoint) {
28553 + return url ? {
28554 + objectPosition: focalPoint ? `${Math.round(focalPoint.x * 100)}% ${Math.round(
28555 + focalPoint.y * 100
28556 + )}%` : `50% 50%`
28557 + } : {};
28558 + }
28559 +
28560 +
28561 + ;// ./node_modules/@wordpress/block-library/build-module/media-text/media-container.js
28562 +
28563 +
28564 +
28565 +
28566 +
28567 +
28568 +
28569 +
28570 +
28571 +
28572 +
28573 +
28574 + const media_container_ALLOWED_MEDIA_TYPES = ["image", "video"];
28575 + const media_container_noop = () => {
28576 + };
28577 + const ResizableBoxContainer = (0,external_wp_element_namespaceObject.forwardRef)(
28578 + ({ isSelected, isStackedOnMobile, ...props }, ref) => {
28579 + const isMobile = (0,external_wp_compose_namespaceObject.useViewportMatch)("small", "<");
28580 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
28581 + external_wp_components_namespaceObject.ResizableBox,
28582 + {
28583 + ref,
28584 + showHandle: isSelected && (!isMobile || !isStackedOnMobile),
28585 + ...props
28586 + }
28587 + );
28588 + }
28589 + );
28590 + function ToolbarEditButton({
28591 + mediaId,
28592 + mediaUrl,
28593 + onSelectMedia,
28594 + toggleUseFeaturedImage,
28595 + useFeaturedImage
28596 + }) {
28597 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockControls, { group: "other", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
28598 + external_wp_blockEditor_namespaceObject.MediaReplaceFlow,
28599 + {
28600 + mediaId,
28601 + mediaURL: mediaUrl,
28602 + allowedTypes: media_container_ALLOWED_MEDIA_TYPES,
28603 + accept: "image/*,video/*",
28604 + onSelect: onSelectMedia,
28605 + onToggleFeaturedImage: toggleUseFeaturedImage,
28606 + useFeaturedImage,
28607 + onReset: () => onSelectMedia(void 0)
28608 + }
28609 + ) });
28610 + }
28611 + function PlaceholderContainer({
28612 + className,
28613 + mediaUrl,
28614 + onSelectMedia,
28615 + toggleUseFeaturedImage
28616 + }) {
28617 + const { createErrorNotice } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_notices_namespaceObject.store);
28618 + const onUploadError = (message) => {
28619 + createErrorNotice(message, { type: "snackbar" });
28620 + };
28621 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
28622 + external_wp_blockEditor_namespaceObject.MediaPlaceholder,
28623 + {
28624 + icon: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockIcon, { icon: media_default }),
28625 + labels: {
28626 + title: (0,external_wp_i18n_namespaceObject.__)("Media area")
28627 + },
28628 + className,
28629 + onSelect: onSelectMedia,
28630 + accept: "image/*,video/*",
28631 + onToggleFeaturedImage: toggleUseFeaturedImage,
28632 + allowedTypes: media_container_ALLOWED_MEDIA_TYPES,
28633 + onError: onUploadError,
28634 + disableMediaButtons: mediaUrl
28635 + }
28636 + );
28637 + }
28638 + function MediaContainer(props, ref) {
28639 + const {
28640 + className,
28641 + commitWidthChange,
28642 + focalPoint,
28643 + imageFill,
28644 + isSelected,
28645 + isStackedOnMobile,
28646 + mediaAlt,
28647 + mediaId,
28648 + mediaPosition,
28649 + mediaType,
28650 + mediaUrl,
28651 + mediaWidth,
28652 + onSelectMedia,
28653 + onWidthChange,
28654 + enableResize,
28655 + toggleUseFeaturedImage,
28656 + useFeaturedImage,
28657 + featuredImageURL,
28658 + featuredImageAlt,
28659 + refMedia
28660 + } = props;
28661 + const isTemporaryMedia = !mediaId && (0,external_wp_blob_namespaceObject.isBlobURL)(mediaUrl);
28662 + const { toggleSelection } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_blockEditor_namespaceObject.store);
28663 + if (mediaUrl || featuredImageURL || useFeaturedImage) {
28664 + const onResizeStart = () => {
28665 + toggleSelection(false);
28666 + };
28667 + const onResize = (event, direction, elt) => {
28668 + onWidthChange(parseInt(elt.style.width));
28669 + };
28670 + const onResizeStop = (event, direction, elt) => {
28671 + toggleSelection(true);
28672 + commitWidthChange(parseInt(elt.style.width));
28673 + };
28674 + const enablePositions = {
28675 + right: enableResize && mediaPosition === "left",
28676 + left: enableResize && mediaPosition === "right"
28677 + };
28678 + const positionStyles = mediaType === "image" && imageFill ? imageFillStyles(mediaUrl || featuredImageURL, focalPoint) : {};
28679 + const mediaTypeRenderers = {
28680 + image: () => useFeaturedImage && featuredImageURL ? /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
28681 + "img",
28682 + {
28683 + ref: refMedia,
28684 + src: featuredImageURL,
28685 + alt: featuredImageAlt,
28686 + style: positionStyles
28687 + }
28688 + ) : mediaUrl && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
28689 + "img",
28690 + {
28691 + ref: refMedia,
28692 + src: mediaUrl,
28693 + alt: mediaAlt,
28694 + style: positionStyles
28695 + }
28696 + ),
28697 + video: () => /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("video", { controls: true, ref: refMedia, src: mediaUrl })
28698 + };
28699 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(
28700 + ResizableBoxContainer,
28701 + {
28702 + as: "figure",
28703 + className: dist_clsx(
28704 + className,
28705 + "editor-media-container__resizer",
28706 + { "is-transient": isTemporaryMedia }
28707 + ),
28708 + size: { width: mediaWidth + "%" },
28709 + minWidth: "10%",
28710 + maxWidth: "100%",
28711 + enable: enablePositions,
28712 + onResizeStart,
28713 + onResize,
28714 + onResizeStop,
28715 + axis: "x",
28716 + isSelected,
28717 + isStackedOnMobile,
28718 + ref,
28719 + children: [
28720 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
28721 + ToolbarEditButton,
28722 + {
28723 + onSelectMedia,
28724 + mediaUrl: useFeaturedImage && featuredImageURL ? featuredImageURL : mediaUrl,
28725 + mediaId,
28726 + toggleUseFeaturedImage,
28727 + useFeaturedImage
28728 + }
28729 + ),
28730 + (mediaTypeRenderers[mediaType] || media_container_noop)(),
28731 + isTemporaryMedia && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Spinner, {}),
28732 + !useFeaturedImage && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(PlaceholderContainer, { ...props }),
28733 + !featuredImageURL && useFeaturedImage && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
28734 + external_wp_components_namespaceObject.Placeholder,
28735 + {
28736 + className: "wp-block-media-text--placeholder-image",
28737 + style: positionStyles,
28738 + withIllustration: true
28739 + }
28740 + )
28741 + ]
28742 + }
28743 + );
28744 + }
28745 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(PlaceholderContainer, { ...props });
28746 + }
28747 + var media_container_default = (0,external_wp_element_namespaceObject.forwardRef)(MediaContainer);
28748 +
28749 +
28750 + ;// ./node_modules/@wordpress/block-library/build-module/media-text/edit.js
28751 +
28752 +
28753 +
28754 +
28755 +
28756 +
28757 +
28758 +
28759 +
28760 +
28761 +
28762 +
28763 +
28764 +
28765 + const { ResolutionTool: edit_ResolutionTool } = unlock(external_wp_blockEditor_namespaceObject.privateApis);
28766 + const applyWidthConstraints = (width) => Math.max(
28767 + WIDTH_CONSTRAINT_PERCENTAGE,
28768 + Math.min(width, 100 - WIDTH_CONSTRAINT_PERCENTAGE)
28769 + );
28770 + function getImageSourceUrlBySizeSlug(image, slug) {
28771 + return image?.media_details?.sizes?.[slug]?.source_url;
28772 + }
28773 + function edit_attributesFromMedia({
28774 + attributes: { linkDestination, href },
28775 + setAttributes
28776 + }) {
28777 + return (media) => {
28778 + if (!media || !media.url) {
28779 + setAttributes({
28780 + mediaAlt: void 0,
28781 + mediaId: void 0,
28782 + mediaType: void 0,
28783 + mediaUrl: void 0,
28784 + mediaLink: void 0,
28785 + href: void 0,
28786 + focalPoint: void 0,
28787 + useFeaturedImage: false
28788 + });
28789 + return;
28790 + }
28791 + if ((0,external_wp_blob_namespaceObject.isBlobURL)(media.url)) {
28792 + media.type = (0,external_wp_blob_namespaceObject.getBlobTypeByURL)(media.url);
28793 + }
28794 + let mediaType;
28795 + let src;
28796 + if (media.media_type) {
28797 + if (media.media_type === "image") {
28798 + mediaType = "image";
28799 + } else {
28800 + mediaType = "video";
28801 + }
28802 + } else {
28803 + mediaType = media.type;
28804 + }
28805 + if (mediaType === "image") {
28806 + src = media.sizes?.large?.url || // eslint-disable-next-line camelcase
28807 + media.media_details?.sizes?.large?.source_url;
28808 + }
28809 + let newHref = href;
28810 + if (linkDestination === media_text_constants_LINK_DESTINATION_MEDIA) {
28811 + newHref = media.url;
28812 + }
28813 + if (linkDestination === media_text_constants_LINK_DESTINATION_ATTACHMENT) {
28814 + newHref = media.link;
28815 + }
28816 + setAttributes({
28817 + mediaAlt: media.alt,
28818 + mediaId: media.id,
28819 + mediaType,
28820 + mediaUrl: src || media.url,
28821 + mediaLink: media.link || void 0,
28822 + href: newHref,
28823 + focalPoint: void 0,
28824 + useFeaturedImage: false
28825 + });
28826 + };
28827 + }
28828 + function MediaTextResolutionTool({ image, value, onChange }) {
28829 + const { imageSizes } = (0,external_wp_data_namespaceObject.useSelect)((select) => {
28830 + const { getSettings } = select(external_wp_blockEditor_namespaceObject.store);
28831 + return {
28832 + imageSizes: getSettings().imageSizes
28833 + };
28834 + }, []);
28835 + if (!imageSizes?.length) {
28836 + return null;
28837 + }
28838 + const imageSizeOptions = imageSizes.filter(({ slug }) => getImageSourceUrlBySizeSlug(image, slug)).map(({ name, slug }) => ({ value: slug, label: name }));
28839 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
28840 + edit_ResolutionTool,
28841 + {
28842 + value,
28843 + defaultValue: media_text_constants_DEFAULT_MEDIA_SIZE_SLUG,
28844 + options: imageSizeOptions,
28845 + onChange
28846 + }
28847 + );
28848 + }
28849 + function MediaTextEdit({
28850 + attributes,
28851 + isSelected,
28852 + setAttributes,
28853 + context: { postId, postType }
28854 + }) {
28855 + const {
28856 + focalPoint,
28857 + href,
28858 + imageFill,
28859 + isStackedOnMobile,
28860 + linkClass,
28861 + linkDestination,
28862 + linkTarget,
28863 + mediaAlt,
28864 + mediaId,
28865 + mediaPosition,
28866 + mediaType,
28867 + mediaUrl,
28868 + mediaWidth,
28869 + mediaSizeSlug,
28870 + rel,
28871 + verticalAlignment,
28872 + allowedBlocks,
28873 + useFeaturedImage
28874 + } = attributes;
28875 + const [featuredImage] = (0,external_wp_coreData_namespaceObject.useEntityProp)(
28876 + "postType",
28877 + postType,
28878 + "featured_media",
28879 + postId
28880 + );
28881 + const { featuredImageMedia } = (0,external_wp_data_namespaceObject.useSelect)(
28882 + (select) => {
28883 + return {
28884 + featuredImageMedia: featuredImage && useFeaturedImage ? select(external_wp_coreData_namespaceObject.store).getEntityRecord(
28885 + "postType",
28886 + "attachment",
28887 + featuredImage,
28888 + {
28889 + context: "view"
28890 + }
28891 + ) : void 0
28892 + };
28893 + },
28894 + [featuredImage, useFeaturedImage]
28895 + );
28896 + const { image } = (0,external_wp_data_namespaceObject.useSelect)(
28897 + (select) => {
28898 + return {
28899 + image: mediaId && isSelected ? select(external_wp_coreData_namespaceObject.store).getEntityRecord(
28900 + "postType",
28901 + "attachment",
28902 + mediaId,
28903 + {
28904 + context: "view"
28905 + }
28906 + ) : null
28907 + };
28908 + },
28909 + [isSelected, mediaId]
28910 + );
28911 + const featuredImageURL = useFeaturedImage ? featuredImageMedia?.source_url : "";
28912 + const featuredImageAlt = useFeaturedImage ? featuredImageMedia?.alt_text : "";
28913 + const toggleUseFeaturedImage = () => {
28914 + setAttributes({
28915 + imageFill: false,
28916 + mediaType: "image",
28917 + mediaId: void 0,
28918 + mediaUrl: void 0,
28919 + mediaAlt: void 0,
28920 + mediaLink: void 0,
28921 + linkDestination: void 0,
28922 + linkTarget: void 0,
28923 + linkClass: void 0,
28924 + rel: void 0,
28925 + href: void 0,
28926 + useFeaturedImage: !useFeaturedImage
28927 + });
28928 + };
28929 + const refMedia = (0,external_wp_element_namespaceObject.useRef)();
28930 + const imperativeFocalPointPreview = (value) => {
28931 + const { style: style2 } = refMedia.current;
28932 + const { x, y } = value;
28933 + style2.objectPosition = `${x * 100}% ${y * 100}%`;
28934 + };
28935 + const [temporaryMediaWidth, setTemporaryMediaWidth] = (0,external_wp_element_namespaceObject.useState)(null);
28936 + const onSelectMedia = edit_attributesFromMedia({ attributes, setAttributes });
28937 + const onSetHref = (props) => {
28938 + setAttributes(props);
28939 + };
28940 + const onWidthChange = (width) => {
28941 + setTemporaryMediaWidth(applyWidthConstraints(width));
28942 + };
28943 + const commitWidthChange = (width) => {
28944 + setAttributes({
28945 + mediaWidth: applyWidthConstraints(width)
28946 + });
28947 + setTemporaryMediaWidth(null);
28948 + };
28949 + const classNames = dist_clsx({
28950 + "has-media-on-the-right": "right" === mediaPosition,
28951 + "is-selected": isSelected,
28952 + "is-stacked-on-mobile": isStackedOnMobile,
28953 + [`is-vertically-aligned-${verticalAlignment}`]: verticalAlignment,
28954 + "is-image-fill-element": imageFill
28955 + });
28956 + const widthString = `${temporaryMediaWidth || mediaWidth}%`;
28957 + const gridTemplateColumns = "right" === mediaPosition ? `1fr ${widthString}` : `${widthString} 1fr`;
28958 + const style = {
28959 + gridTemplateColumns,
28960 + msGridColumns: gridTemplateColumns
28961 + };
28962 + const onMediaAltChange = (newMediaAlt) => {
28963 + setAttributes({ mediaAlt: newMediaAlt });
28964 + };
28965 + const onVerticalAlignmentChange = (alignment) => {
28966 + setAttributes({ verticalAlignment: alignment });
28967 + };
28968 + const updateImage = (newMediaSizeSlug) => {
28969 + const newUrl = getImageSourceUrlBySizeSlug(image, newMediaSizeSlug);
28970 + if (!newUrl) {
28971 + return null;
28972 + }
28973 + setAttributes({
28974 + mediaUrl: newUrl,
28975 + mediaSizeSlug: newMediaSizeSlug
28976 + });
28977 + };
28978 + const dropdownMenuProps = useToolsPanelDropdownMenuProps();
28979 + const mediaTextGeneralSettings = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(
28980 + external_wp_components_namespaceObject.__experimentalToolsPanel,
28981 + {
28982 + label: (0,external_wp_i18n_namespaceObject.__)("Settings"),
28983 + resetAll: () => {
28984 + setAttributes({
28985 + isStackedOnMobile: true,
28986 + imageFill: false,
28987 + mediaAlt: "",
28988 + focalPoint: void 0,
28989 + mediaWidth: 50
28990 + });
28991 + updateImage(media_text_constants_DEFAULT_MEDIA_SIZE_SLUG);
28992 + },
28993 + dropdownMenuProps,
28994 + children: [
28995 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
28996 + external_wp_components_namespaceObject.__experimentalToolsPanelItem,
28997 + {
28998 + label: (0,external_wp_i18n_namespaceObject.__)("Media width"),
28999 + isShownByDefault: true,
29000 + hasValue: () => mediaWidth !== 50,
29001 + onDeselect: () => setAttributes({ mediaWidth: 50 }),
29002 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
29003 + external_wp_components_namespaceObject.RangeControl,
29004 + {
29005 + __nextHasNoMarginBottom: true,
29006 + __next40pxDefaultSize: true,
29007 + label: (0,external_wp_i18n_namespaceObject.__)("Media width"),
29008 + value: temporaryMediaWidth || mediaWidth,
29009 + onChange: commitWidthChange,
29010 + min: WIDTH_CONSTRAINT_PERCENTAGE,
29011 + max: 100 - WIDTH_CONSTRAINT_PERCENTAGE
29012 + }
29013 + )
29014 + }
29015 + ),
29016 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
29017 + external_wp_components_namespaceObject.__experimentalToolsPanelItem,
29018 + {
29019 + label: (0,external_wp_i18n_namespaceObject.__)("Stack on mobile"),
29020 + isShownByDefault: true,
29021 + hasValue: () => !isStackedOnMobile,
29022 + onDeselect: () => setAttributes({ isStackedOnMobile: true }),
29023 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
29024 + external_wp_components_namespaceObject.ToggleControl,
29025 + {
29026 + __nextHasNoMarginBottom: true,
29027 + label: (0,external_wp_i18n_namespaceObject.__)("Stack on mobile"),
29028 + checked: isStackedOnMobile,
29029 + onChange: () => setAttributes({
29030 + isStackedOnMobile: !isStackedOnMobile
29031 + })
29032 + }
29033 + )
29034 + }
29035 + ),
29036 + mediaType === "image" && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
29037 + external_wp_components_namespaceObject.__experimentalToolsPanelItem,
29038 + {
29039 + label: (0,external_wp_i18n_namespaceObject.__)("Crop image to fill"),
29040 + isShownByDefault: true,
29041 + hasValue: () => !!imageFill,
29042 + onDeselect: () => setAttributes({ imageFill: false }),
29043 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
29044 + external_wp_components_namespaceObject.ToggleControl,
29045 + {
29046 + __nextHasNoMarginBottom: true,
29047 + label: (0,external_wp_i18n_namespaceObject.__)("Crop image to fill"),
29048 + checked: !!imageFill,
29049 + onChange: () => setAttributes({
29050 + imageFill: !imageFill
29051 + })
29052 + }
29053 + )
29054 + }
29055 + ),
29056 + imageFill && (mediaUrl || featuredImageURL) && mediaType === "image" && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
29057 + external_wp_components_namespaceObject.__experimentalToolsPanelItem,
29058 + {
29059 + label: (0,external_wp_i18n_namespaceObject.__)("Focal point"),
29060 + isShownByDefault: true,
29061 + hasValue: () => !!focalPoint,
29062 + onDeselect: () => setAttributes({ focalPoint: void 0 }),
29063 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
29064 + external_wp_components_namespaceObject.FocalPointPicker,
29065 + {
29066 + __nextHasNoMarginBottom: true,
29067 + label: (0,external_wp_i18n_namespaceObject.__)("Focal point"),
29068 + url: useFeaturedImage && featuredImageURL ? featuredImageURL : mediaUrl,
29069 + value: focalPoint,
29070 + onChange: (value) => setAttributes({ focalPoint: value }),
29071 + onDragStart: imperativeFocalPointPreview,
29072 + onDrag: imperativeFocalPointPreview
29073 + }
29074 + )
29075 + }
29076 + ),
29077 + mediaType === "image" && mediaUrl && !useFeaturedImage && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
29078 + external_wp_components_namespaceObject.__experimentalToolsPanelItem,
29079 + {
29080 + label: (0,external_wp_i18n_namespaceObject.__)("Alternative text"),
29081 + isShownByDefault: true,
29082 + hasValue: () => !!mediaAlt,
29083 + onDeselect: () => setAttributes({ mediaAlt: "" }),
29084 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
29085 + external_wp_components_namespaceObject.TextareaControl,
29086 + {
29087 + __nextHasNoMarginBottom: true,
29088 + label: (0,external_wp_i18n_namespaceObject.__)("Alternative text"),
29089 + value: mediaAlt,
29090 + onChange: onMediaAltChange,
29091 + help: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
29092 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
29093 + external_wp_components_namespaceObject.ExternalLink,
29094 + {
29095 + href: (
29096 + // translators: Localized tutorial, if one exists. W3C Web Accessibility Initiative link has list of existing translations.
29097 + (0,external_wp_i18n_namespaceObject.__)(
29098 + "https://www.w3.org/WAI/tutorials/images/decision-tree/"
29099 + )
29100 + ),
29101 + children: (0,external_wp_i18n_namespaceObject.__)(
29102 + "Describe the purpose of the image."
29103 + )
29104 + }
29105 + ),
29106 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("br", {}),
29107 + (0,external_wp_i18n_namespaceObject.__)("Leave empty if decorative.")
29108 + ] })
29109 + }
29110 + )
29111 + }
29112 + ),
29113 + mediaType === "image" && !useFeaturedImage && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
29114 + MediaTextResolutionTool,
29115 + {
29116 + image,
29117 + value: mediaSizeSlug,
29118 + onChange: updateImage
29119 + }
29120 + )
29121 + ]
29122 + }
29123 + );
29124 + const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)({
29125 + className: classNames,
29126 + style
29127 + });
29128 + const innerBlocksProps = (0,external_wp_blockEditor_namespaceObject.useInnerBlocksProps)(
29129 + { className: "wp-block-media-text__content" },
29130 + { template: constants_TEMPLATE, allowedBlocks }
29131 + );
29132 + const blockEditingMode = (0,external_wp_blockEditor_namespaceObject.useBlockEditingMode)();
29133 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
29134 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, { children: mediaTextGeneralSettings }),
29135 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_blockEditor_namespaceObject.BlockControls, { group: "block", children: [
29136 + blockEditingMode === "default" && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
29137 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
29138 + external_wp_blockEditor_namespaceObject.BlockVerticalAlignmentControl,
29139 + {
29140 + onChange: onVerticalAlignmentChange,
29141 + value: verticalAlignment
29142 + }
29143 + ),
29144 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
29145 + external_wp_components_namespaceObject.ToolbarButton,
29146 + {
29147 + icon: pull_left_default,
29148 + title: (0,external_wp_i18n_namespaceObject.__)("Show media on left"),
29149 + isActive: mediaPosition === "left",
29150 + onClick: () => setAttributes({ mediaPosition: "left" })
29151 + }
29152 + ),
29153 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
29154 + external_wp_components_namespaceObject.ToolbarButton,
29155 + {
29156 + icon: pull_right_default,
29157 + title: (0,external_wp_i18n_namespaceObject.__)("Show media on right"),
29158 + isActive: mediaPosition === "right",
29159 + onClick: () => setAttributes({ mediaPosition: "right" })
29160 + }
29161 + )
29162 + ] }),
29163 + mediaType === "image" && !useFeaturedImage && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
29164 + external_wp_blockEditor_namespaceObject.__experimentalImageURLInputUI,
29165 + {
29166 + url: href || "",
29167 + onChangeUrl: onSetHref,
29168 + linkDestination,
29169 + mediaType,
29170 + mediaUrl: image && image.source_url,
29171 + mediaLink: image && image.link,
29172 + linkTarget,
29173 + linkClass,
29174 + rel
29175 + }
29176 + )
29177 + ] }),
29178 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", { ...blockProps, children: [
29179 + mediaPosition === "right" && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { ...innerBlocksProps }),
29180 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
29181 + media_container_default,
29182 + {
29183 + className: "wp-block-media-text__media",
29184 + onSelectMedia,
29185 + onWidthChange,
29186 + commitWidthChange,
29187 + refMedia,
29188 + enableResize: blockEditingMode === "default",
29189 + toggleUseFeaturedImage,
29190 + ...{
29191 + focalPoint,
29192 + imageFill,
29193 + isSelected,
29194 + isStackedOnMobile,
29195 + mediaAlt,
29196 + mediaId,
29197 + mediaPosition,
29198 + mediaType,
29199 + mediaUrl,
29200 + mediaWidth,
29201 + useFeaturedImage,
29202 + featuredImageURL,
29203 + featuredImageAlt
29204 + }
29205 + }
29206 + ),
29207 + mediaPosition !== "right" && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { ...innerBlocksProps })
29208 + ] })
29209 + ] });
29210 + }
29211 + var media_text_edit_edit_default = MediaTextEdit;
29212 +
29213 +
29214 + ;// ./node_modules/@wordpress/block-library/build-module/media-text/block.json
29215 + const media_text_block_namespaceObject = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/media-text","title":"Media & Text","category":"media","description":"Set media and words side-by-side for a richer layout.","keywords":["image","video"],"textdomain":"default","attributes":{"align":{"type":"string","default":"none"},"mediaAlt":{"type":"string","source":"attribute","selector":"figure img","attribute":"alt","default":"","role":"content"},"mediaPosition":{"type":"string","default":"left"},"mediaId":{"type":"number","role":"content"},"mediaUrl":{"type":"string","source":"attribute","selector":"figure video,figure img","attribute":"src","role":"content"},"mediaLink":{"type":"string"},"linkDestination":{"type":"string"},"linkTarget":{"type":"string","source":"attribute","selector":"figure a","attribute":"target"},"href":{"type":"string","source":"attribute","selector":"figure a","attribute":"href","role":"content"},"rel":{"type":"string","source":"attribute","selector":"figure a","attribute":"rel"},"linkClass":{"type":"string","source":"attribute","selector":"figure a","attribute":"class"},"mediaType":{"type":"string","role":"content"},"mediaWidth":{"type":"number","default":50},"mediaSizeSlug":{"type":"string"},"isStackedOnMobile":{"type":"boolean","default":true},"verticalAlignment":{"type":"string"},"imageFill":{"type":"boolean"},"focalPoint":{"type":"object"},"useFeaturedImage":{"type":"boolean","default":false}},"usesContext":["postId","postType"],"supports":{"anchor":true,"align":["wide","full"],"html":false,"__experimentalBorder":{"color":true,"radius":true,"style":true,"width":true,"__experimentalDefaultControls":{"color":true,"radius":true,"style":true,"width":true}},"color":{"gradients":true,"heading":true,"link":true,"__experimentalDefaultControls":{"background":true,"text":true}},"spacing":{"margin":true,"padding":true},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"interactivity":{"clientNavigation":true},"allowedBlocks":true},"editorStyle":"wp-block-media-text-editor","style":"wp-block-media-text"}');
29216 + ;// ./node_modules/@wordpress/block-library/build-module/media-text/save.js
29217 +
29218 +
29219 +
29220 +
29221 +
29222 + const save_DEFAULT_MEDIA_WIDTH = 50;
29223 + const save_noop = () => {
29224 + };
29225 + function media_text_save_save({ attributes }) {
29226 + const {
29227 + isStackedOnMobile,
29228 + mediaAlt,
29229 + mediaPosition,
29230 + mediaType,
29231 + mediaUrl,
29232 + mediaWidth,
29233 + mediaId,
29234 + verticalAlignment,
29235 + imageFill,
29236 + focalPoint,
29237 + linkClass,
29238 + href,
29239 + linkTarget,
29240 + rel
29241 + } = attributes;
29242 + const mediaSizeSlug = attributes.mediaSizeSlug || media_text_constants_DEFAULT_MEDIA_SIZE_SLUG;
29243 + const newRel = !rel ? void 0 : rel;
29244 + const imageClasses = dist_clsx({
29245 + [`wp-image-${mediaId}`]: mediaId && mediaType === "image",
29246 + [`size-${mediaSizeSlug}`]: mediaId && mediaType === "image"
29247 + });
29248 + const positionStyles = imageFill ? imageFillStyles(mediaUrl, focalPoint) : {};
29249 + let image = mediaUrl ? /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
29250 + "img",
29251 + {
29252 + src: mediaUrl,
29253 + alt: mediaAlt,
29254 + className: imageClasses || null,
29255 + style: positionStyles
29256 + }
29257 + ) : null;
29258 + if (href) {
29259 + image = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
29260 + "a",
29261 + {
29262 + className: linkClass,
29263 + href,
29264 + target: linkTarget,
29265 + rel: newRel,
29266 + children: image
29267 + }
29268 + );
29269 + }
29270 + const mediaTypeRenders = {
29271 + image: () => image,
29272 + video: () => /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("video", { controls: true, src: mediaUrl })
29273 + };
29274 + const className = dist_clsx({
29275 + "has-media-on-the-right": "right" === mediaPosition,
29276 + "is-stacked-on-mobile": isStackedOnMobile,
29277 + [`is-vertically-aligned-${verticalAlignment}`]: verticalAlignment,
29278 + "is-image-fill-element": imageFill
29279 + });
29280 + let gridTemplateColumns;
29281 + if (mediaWidth !== save_DEFAULT_MEDIA_WIDTH) {
29282 + gridTemplateColumns = "right" === mediaPosition ? `auto ${mediaWidth}%` : `${mediaWidth}% auto`;
29283 + }
29284 + const style = {
29285 + gridTemplateColumns
29286 + };
29287 + if ("right" === mediaPosition) {
29288 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", { ...external_wp_blockEditor_namespaceObject.useBlockProps.save({ className, style }), children: [
29289 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
29290 + "div",
29291 + {
29292 + ...external_wp_blockEditor_namespaceObject.useInnerBlocksProps.save({
29293 + className: "wp-block-media-text__content"
29294 + })
29295 + }
29296 + ),
29297 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("figure", { className: "wp-block-media-text__media", children: (mediaTypeRenders[mediaType] || save_noop)() })
29298 + ] });
29299 + }
29300 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", { ...external_wp_blockEditor_namespaceObject.useBlockProps.save({ className, style }), children: [
29301 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("figure", { className: "wp-block-media-text__media", children: (mediaTypeRenders[mediaType] || save_noop)() }),
29302 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
29303 + "div",
29304 + {
29305 + ...external_wp_blockEditor_namespaceObject.useInnerBlocksProps.save({
29306 + className: "wp-block-media-text__content"
29307 + })
29308 + }
29309 + )
29310 + ] });
29311 + }
29312 +
29313 +
29314 + ;// ./node_modules/@wordpress/block-library/build-module/media-text/transforms.js
29315 +
29316 + const media_text_transforms_transforms = {
29317 + from: [
29318 + {
29319 + type: "block",
29320 + blocks: ["core/image"],
29321 + transform: ({ alt, url, id, anchor }) => (0,external_wp_blocks_namespaceObject.createBlock)("core/media-text", {
29322 + mediaAlt: alt,
29323 + mediaId: id,
29324 + mediaUrl: url,
29325 + mediaType: "image",
29326 + anchor
29327 + })
29328 + },
29329 + {
29330 + type: "block",
29331 + blocks: ["core/video"],
29332 + transform: ({ src, id, anchor }) => (0,external_wp_blocks_namespaceObject.createBlock)("core/media-text", {
29333 + mediaId: id,
29334 + mediaUrl: src,
29335 + mediaType: "video",
29336 + anchor
29337 + })
29338 + },
29339 + {
29340 + type: "block",
29341 + blocks: ["core/cover"],
29342 + transform: ({
29343 + align,
29344 + alt,
29345 + anchor,
29346 + backgroundType,
29347 + customGradient,
29348 + customOverlayColor,
29349 + gradient,
29350 + id,
29351 + overlayColor,
29352 + style,
29353 + textColor,
29354 + url,
29355 + useFeaturedImage
29356 + }, innerBlocks) => {
29357 + let additionalAttributes = {};
29358 + if (customGradient) {
29359 + additionalAttributes = {
29360 + style: {
29361 + color: {
29362 + gradient: customGradient
29363 + }
29364 + }
29365 + };
29366 + } else if (customOverlayColor) {
29367 + additionalAttributes = {
29368 + style: {
29369 + color: {
29370 + background: customOverlayColor
29371 + }
29372 + }
29373 + };
29374 + }
29375 + if (style?.color?.text) {
29376 + additionalAttributes.style = {
29377 + color: {
29378 + ...additionalAttributes.style?.color,
29379 + text: style.color.text
29380 + }
29381 + };
29382 + }
29383 + return (0,external_wp_blocks_namespaceObject.createBlock)(
29384 + "core/media-text",
29385 + {
29386 + align,
29387 + anchor,
29388 + backgroundColor: overlayColor,
29389 + gradient,
29390 + mediaAlt: alt,
29391 + mediaId: id,
29392 + mediaType: backgroundType,
29393 + mediaUrl: url,
29394 + textColor,
29395 + useFeaturedImage,
29396 + ...additionalAttributes
29397 + },
29398 + innerBlocks
29399 + );
29400 + }
29401 + }
29402 + ],
29403 + to: [
29404 + {
29405 + type: "block",
29406 + blocks: ["core/image"],
29407 + isMatch: ({ mediaType, mediaUrl }) => {
29408 + return !mediaUrl || mediaType === "image";
29409 + },
29410 + transform: ({ mediaAlt, mediaId, mediaUrl, anchor }) => {
29411 + return (0,external_wp_blocks_namespaceObject.createBlock)("core/image", {
29412 + alt: mediaAlt,
29413 + id: mediaId,
29414 + url: mediaUrl,
29415 + anchor
29416 + });
29417 + }
29418 + },
29419 + {
29420 + type: "block",
29421 + blocks: ["core/video"],
29422 + isMatch: ({ mediaType, mediaUrl }) => {
29423 + return !mediaUrl || mediaType === "video";
29424 + },
29425 + transform: ({ mediaId, mediaUrl, anchor }) => {
29426 + return (0,external_wp_blocks_namespaceObject.createBlock)("core/video", {
29427 + id: mediaId,
29428 + src: mediaUrl,
29429 + anchor
29430 + });
29431 + }
29432 + },
29433 + {
29434 + type: "block",
29435 + blocks: ["core/cover"],
29436 + transform: ({
29437 + align,
29438 + anchor,
29439 + backgroundColor,
29440 + focalPoint,
29441 + gradient,
29442 + mediaAlt,
29443 + mediaId,
29444 + mediaType,
29445 + mediaUrl,
29446 + style,
29447 + textColor,
29448 + useFeaturedImage
29449 + }, innerBlocks) => {
29450 + const additionalAttributes = {};
29451 + if (style?.color?.gradient) {
29452 + additionalAttributes.customGradient = style.color.gradient;
29453 + } else if (style?.color?.background) {
29454 + additionalAttributes.customOverlayColor = style.color.background;
29455 + }
29456 + if (style?.color?.text) {
29457 + additionalAttributes.style = {
29458 + color: { text: style.color.text }
29459 + };
29460 + }
29461 + const coverAttributes = {
29462 + align,
29463 + alt: mediaAlt,
29464 + anchor,
29465 + backgroundType: mediaType,
29466 + dimRatio: !!mediaUrl || useFeaturedImage ? 50 : 100,
29467 + focalPoint,
29468 + gradient,
29469 + id: mediaId,
29470 + overlayColor: backgroundColor,
29471 + textColor,
29472 + url: mediaUrl,
29473 + useFeaturedImage,
29474 + ...additionalAttributes
29475 + };
29476 + return (0,external_wp_blocks_namespaceObject.createBlock)(
29477 + "core/cover",
29478 + coverAttributes,
29479 + innerBlocks
29480 + );
29481 + }
29482 + }
29483 + ]
29484 + };
29485 + var media_text_transforms_transforms_default = media_text_transforms_transforms;
29486 +
29487 +
29488 + ;// ./node_modules/@wordpress/block-library/build-module/media-text/index.js
29489 +
29490 +
29491 +
29492 +
29493 +
29494 +
29495 +
29496 +
29497 + const { name: media_text_name } = media_text_block_namespaceObject;
29498 + const media_text_settings = {
29499 + icon: media_and_text_default,
29500 + example: {
29501 + viewportWidth: 601,
29502 + // Columns collapse "@media (max-width: 600px)".
29503 + attributes: {
29504 + mediaType: "image",
29505 + mediaUrl: "https://s.w.org/images/core/5.3/Biologia_Centrali-Americana_-_Cantorchilus_semibadius_1902.jpg"
29506 + },
29507 + innerBlocks: [
29508 + {
29509 + name: "core/paragraph",
29510 + attributes: {
29511 + content: (0,external_wp_i18n_namespaceObject.__)(
29512 + "The wren<br>Earns his living<br>Noiselessly."
29513 + )
29514 + }
29515 + },
29516 + {
29517 + name: "core/paragraph",
29518 + attributes: {
29519 + content: (0,external_wp_i18n_namespaceObject.__)("\u2014 Kobayashi Issa (\u4E00\u8336)")
29520 + }
29521 + }
29522 + ]
29523 + },
29524 + transforms: media_text_transforms_transforms_default,
29525 + edit: media_text_edit_edit_default,
29526 + save: media_text_save_save,
29527 + deprecated: media_text_deprecated_deprecated_default
29528 + };
29529 + const media_text_init = () => initBlock({ name: media_text_name, metadata: media_text_block_namespaceObject, settings: media_text_settings });
29530 +
29531 +
29532 + ;// ./node_modules/@wordpress/block-library/build-module/missing/edit.js
29533 +
29534 +
29535 +
29536 +
29537 +
29538 +
29539 +
29540 +
29541 + function MissingEdit({ attributes, clientId }) {
29542 + const { originalName, originalUndelimitedContent } = attributes;
29543 + const hasContent = !!originalUndelimitedContent;
29544 + const { hasFreeformBlock, hasHTMLBlock } = (0,external_wp_data_namespaceObject.useSelect)(
29545 + (select) => {
29546 + const { canInsertBlockType, getBlockRootClientId } = select(external_wp_blockEditor_namespaceObject.store);
29547 + return {
29548 + hasFreeformBlock: canInsertBlockType(
29549 + "core/freeform",
29550 + getBlockRootClientId(clientId)
29551 + ),
29552 + hasHTMLBlock: canInsertBlockType(
29553 + "core/html",
29554 + getBlockRootClientId(clientId)
29555 + )
29556 + };
29557 + },
29558 + [clientId]
29559 + );
29560 + const { replaceBlock } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_blockEditor_namespaceObject.store);
29561 + function convertToHTML() {
29562 + replaceBlock(
29563 + clientId,
29564 + (0,external_wp_blocks_namespaceObject.createBlock)("core/html", {
29565 + content: originalUndelimitedContent
29566 + })
29567 + );
29568 + }
29569 + const actions = [];
29570 + let messageHTML;
29571 + const convertToHtmlButton = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
29572 + external_wp_components_namespaceObject.Button,
29573 + {
29574 + __next40pxDefaultSize: true,
29575 + onClick: convertToHTML,
29576 + variant: "primary",
29577 + children: (0,external_wp_i18n_namespaceObject.__)("Keep as HTML")
29578 + },
29579 + "convert"
29580 + );
29581 + if (hasContent && !hasFreeformBlock && !originalName) {
29582 + if (hasHTMLBlock) {
29583 + messageHTML = (0,external_wp_i18n_namespaceObject.__)(
29584 + "It appears you are trying to use the deprecated Classic block. You can leave this block intact, convert its content to a Custom HTML block, or remove it entirely. Alternatively, you can refresh the page to use the Classic block."
29585 + );
29586 + actions.push(convertToHtmlButton);
29587 + } else {
29588 + messageHTML = (0,external_wp_i18n_namespaceObject.__)(
29589 + "It appears you are trying to use the deprecated Classic block. You can leave this block intact, or remove it entirely. Alternatively, you can refresh the page to use the Classic block."
29590 + );
29591 + }
29592 + } else if (hasContent && hasHTMLBlock) {
29593 + messageHTML = (0,external_wp_i18n_namespaceObject.sprintf)(
29594 + /* translators: %s: block name */
29595 + (0,external_wp_i18n_namespaceObject.__)(
29596 + 'Your site doesn\u2019t include support for the "%s" block. You can leave it as-is, convert it to custom HTML, or remove it.'
29597 + ),
29598 + originalName
29599 + );
29600 + actions.push(convertToHtmlButton);
29601 + } else {
29602 + messageHTML = (0,external_wp_i18n_namespaceObject.sprintf)(
29603 + /* translators: %s: block name */
29604 + (0,external_wp_i18n_namespaceObject.__)(
29605 + 'Your site doesn\u2019t include support for the "%s" block. You can leave it as-is or remove it.'
29606 + ),
29607 + originalName
29608 + );
29609 + }
29610 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", { ...(0,external_wp_blockEditor_namespaceObject.useBlockProps)({ className: "has-warning" }), children: [
29611 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.Warning, { actions, children: messageHTML }),
29612 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_element_namespaceObject.RawHTML, { children: (0,external_wp_dom_namespaceObject.safeHTML)(originalUndelimitedContent) })
29613 + ] });
29614 + }
29615 +
29616 +
29617 + ;// ./node_modules/@wordpress/block-library/build-module/missing/block.json
29618 + const missing_block_namespaceObject = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/missing","title":"Unsupported","category":"text","description":"Your site doesn’t include support for this block.","textdomain":"default","attributes":{"originalName":{"type":"string"},"originalUndelimitedContent":{"type":"string"},"originalContent":{"type":"string","source":"raw"}},"supports":{"className":false,"customClassName":false,"inserter":false,"html":false,"lock":false,"reusable":false,"renaming":false,"visibility":false,"interactivity":{"clientNavigation":true}}}');
29619 + ;// ./node_modules/@wordpress/block-library/build-module/missing/save.js
29620 +
29621 +
29622 + function missing_save_save({ attributes }) {
29623 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_element_namespaceObject.RawHTML, { children: attributes.originalContent });
29624 + }
29625 +
29626 +
29627 + ;// ./node_modules/@wordpress/block-library/build-module/missing/index.js
29628 +
29629 +
29630 +
29631 +
29632 +
29633 + const { name: missing_name } = missing_block_namespaceObject;
29634 + const missing_settings = {
29635 + name: missing_name,
29636 + __experimentalLabel(attributes, { context }) {
29637 + if (context === "accessibility") {
29638 + const { originalName } = attributes;
29639 + const originalBlockType = originalName ? (0,external_wp_blocks_namespaceObject.getBlockType)(originalName) : void 0;
29640 + if (originalBlockType) {
29641 + return originalBlockType.settings.title || originalName;
29642 + }
29643 + return "";
29644 + }
29645 + },
29646 + edit: MissingEdit,
29647 + save: missing_save_save
29648 + };
29649 + const missing_init = () => initBlock({ name: missing_name, metadata: missing_block_namespaceObject, settings: missing_settings });
29650 +
29651 +
29652 + ;// ./node_modules/@wordpress/icons/build-module/library/more.js
29653 +
29654 +
29655 + var more_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M4 9v1.5h16V9H4zm12 5.5h4V13h-4v1.5zm-6 0h4V13h-4v1.5zm-6 0h4V13H4v1.5z" }) });
29656 +
29657 +
29658 + ;// ./node_modules/@wordpress/block-library/build-module/more/edit.js
29659 +
29660 +
29661 +
29662 +
29663 +
29664 +
29665 + const DEFAULT_TEXT = (0,external_wp_i18n_namespaceObject.__)("Read more");
29666 + function MoreEdit({
29667 + attributes: { customText, noTeaser },
29668 + insertBlocksAfter,
29669 + setAttributes
29670 + }) {
29671 + const dropdownMenuProps = useToolsPanelDropdownMenuProps();
29672 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
29673 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
29674 + external_wp_components_namespaceObject.__experimentalToolsPanel,
29675 + {
29676 + label: (0,external_wp_i18n_namespaceObject.__)("Settings"),
29677 + resetAll: () => {
29678 + setAttributes({
29679 + noTeaser: false
29680 + });
29681 + },
29682 + dropdownMenuProps,
29683 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
29684 + external_wp_components_namespaceObject.__experimentalToolsPanelItem,
29685 + {
29686 + label: (0,external_wp_i18n_namespaceObject.__)("Hide excerpt"),
29687 + isShownByDefault: true,
29688 + hasValue: () => noTeaser,
29689 + onDeselect: () => setAttributes({ noTeaser: false }),
29690 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
29691 + external_wp_components_namespaceObject.ToggleControl,
29692 + {
29693 + __nextHasNoMarginBottom: true,
29694 + label: (0,external_wp_i18n_namespaceObject.__)(
29695 + "Hide the excerpt on the full content page"
29696 + ),
29697 + checked: !!noTeaser,
29698 + onChange: () => setAttributes({ noTeaser: !noTeaser }),
29699 + help: (checked) => checked ? (0,external_wp_i18n_namespaceObject.__)("The excerpt is hidden.") : (0,external_wp_i18n_namespaceObject.__)("The excerpt is visible.")
29700 + }
29701 + )
29702 + }
29703 + )
29704 + }
29705 + ) }),
29706 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { ...(0,external_wp_blockEditor_namespaceObject.useBlockProps)(), children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
29707 + external_wp_blockEditor_namespaceObject.PlainText,
29708 + {
29709 + __experimentalVersion: 2,
29710 + tagName: "span",
29711 + "aria-label": (0,external_wp_i18n_namespaceObject.__)('"Read more" text'),
29712 + value: customText,
29713 + placeholder: DEFAULT_TEXT,
29714 + onChange: (value) => setAttributes({ customText: value }),
29715 + disableLineBreaks: true,
29716 + __unstableOnSplitAtEnd: () => insertBlocksAfter(
29717 + (0,external_wp_blocks_namespaceObject.createBlock)((0,external_wp_blocks_namespaceObject.getDefaultBlockName)())
29718 + )
29719 + }
29720 + ) })
29721 + ] });
29722 + }
29723 +
29724 +
29725 + ;// ./node_modules/@wordpress/block-library/build-module/more/block.json
29726 + const more_block_namespaceObject = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/more","title":"More","category":"design","description":"Content before this block will be shown in the excerpt on your archives page.","keywords":["read more"],"textdomain":"default","attributes":{"customText":{"type":"string","default":"","role":"content"},"noTeaser":{"type":"boolean","default":false}},"supports":{"customClassName":false,"className":false,"html":false,"multiple":false,"interactivity":{"clientNavigation":true}},"editorStyle":"wp-block-more-editor"}');
29727 + ;// ./node_modules/@wordpress/block-library/build-module/more/save.js
29728 +
29729 +
29730 + function more_save_save({ attributes: { customText, noTeaser } }) {
29731 + const moreTag = customText ? `<!--more ${customText}-->` : "<!--more-->";
29732 + const noTeaserTag = noTeaser ? "<!--noteaser-->" : "";
29733 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_element_namespaceObject.RawHTML, { children: [moreTag, noTeaserTag].filter(Boolean).join("\n") });
29734 + }
29735 +
29736 +
29737 + ;// ./node_modules/@wordpress/block-library/build-module/more/transforms.js
29738 +
29739 + const more_transforms_transforms = {
29740 + from: [
29741 + {
29742 + type: "raw",
29743 + schema: {
29744 + "wp-block": { attributes: ["data-block"] }
29745 + },
29746 + isMatch: (node) => node.dataset && node.dataset.block === "core/more",
29747 + transform(node) {
29748 + const { customText, noTeaser } = node.dataset;
29749 + const attrs = {};
29750 + if (customText) {
29751 + attrs.customText = customText;
29752 + }
29753 + if (noTeaser === "") {
29754 + attrs.noTeaser = true;
29755 + }
29756 + return (0,external_wp_blocks_namespaceObject.createBlock)("core/more", attrs);
29757 + }
29758 + }
29759 + ]
29760 + };
29761 + var more_transforms_transforms_default = more_transforms_transforms;
29762 +
29763 +
29764 + ;// ./node_modules/@wordpress/block-library/build-module/more/index.js
29765 +
29766 +
29767 +
29768 +
29769 +
29770 +
29771 + const { name: more_name } = more_block_namespaceObject;
29772 + const more_settings = {
29773 + icon: more_default,
29774 + example: {},
29775 + __experimentalLabel(attributes, { context }) {
29776 + const customName = attributes?.metadata?.name;
29777 + if (context === "list-view" && customName) {
29778 + return customName;
29779 + }
29780 + if (context === "accessibility") {
29781 + return attributes.customText;
29782 + }
29783 + },
29784 + transforms: more_transforms_transforms_default,
29785 + edit: MoreEdit,
29786 + save: more_save_save
29787 + };
29788 + const more_init = () => initBlock({ name: more_name, metadata: more_block_namespaceObject, settings: more_settings });
29789 +
29790 +
29791 + ;// ./node_modules/@wordpress/icons/build-module/library/navigation.js
29792 +
29793 +
29794 + var navigation_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M12 4c-4.4 0-8 3.6-8 8s3.6 8 8 8 8-3.6 8-8-3.6-8-8-8zm0 14.5c-3.6 0-6.5-2.9-6.5-6.5S8.4 5.5 12 5.5s6.5 2.9 6.5 6.5-2.9 6.5-6.5 6.5zM9 16l4.5-3L15 8.4l-4.5 3L9 16z" }) });
29795 +
29796 +
29797 + ;// ./node_modules/@wordpress/block-library/build-module/navigation/block.json
29798 + const navigation_block_namespaceObject = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/navigation","title":"Navigation","category":"theme","allowedBlocks":["core/navigation-link","core/search","core/social-links","core/page-list","core/spacer","core/home-link","core/site-title","core/site-logo","core/navigation-submenu","core/loginout","core/buttons"],"description":"A collection of blocks that allow visitors to get around your site.","keywords":["menu","navigation","links"],"textdomain":"default","attributes":{"ref":{"type":"number"},"textColor":{"type":"string"},"customTextColor":{"type":"string"},"rgbTextColor":{"type":"string"},"backgroundColor":{"type":"string"},"customBackgroundColor":{"type":"string"},"rgbBackgroundColor":{"type":"string"},"showSubmenuIcon":{"type":"boolean","default":true},"openSubmenusOnClick":{"type":"boolean","default":false},"overlayMenu":{"type":"string","default":"mobile"},"icon":{"type":"string","default":"handle"},"hasIcon":{"type":"boolean","default":true},"__unstableLocation":{"type":"string"},"overlayBackgroundColor":{"type":"string"},"customOverlayBackgroundColor":{"type":"string"},"overlayTextColor":{"type":"string"},"customOverlayTextColor":{"type":"string"},"maxNestingLevel":{"type":"number","default":5},"templateLock":{"type":["string","boolean"],"enum":["all","insert","contentOnly",false]}},"providesContext":{"textColor":"textColor","customTextColor":"customTextColor","backgroundColor":"backgroundColor","customBackgroundColor":"customBackgroundColor","overlayTextColor":"overlayTextColor","customOverlayTextColor":"customOverlayTextColor","overlayBackgroundColor":"overlayBackgroundColor","customOverlayBackgroundColor":"customOverlayBackgroundColor","fontSize":"fontSize","customFontSize":"customFontSize","showSubmenuIcon":"showSubmenuIcon","openSubmenusOnClick":"openSubmenusOnClick","style":"style","maxNestingLevel":"maxNestingLevel"},"supports":{"align":["wide","full"],"ariaLabel":true,"html":false,"inserter":true,"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontStyle":true,"__experimentalFontWeight":true,"__experimentalTextTransform":true,"__experimentalFontFamily":true,"__experimentalLetterSpacing":true,"__experimentalTextDecoration":true,"__experimentalSkipSerialization":["textDecoration"],"__experimentalDefaultControls":{"fontSize":true}},"spacing":{"blockGap":true,"units":["px","em","rem","vh","vw"],"__experimentalDefaultControls":{"blockGap":true}},"layout":{"allowSwitching":false,"allowInheriting":false,"allowVerticalAlignment":false,"allowSizingOnChildren":true,"default":{"type":"flex"}},"interactivity":true,"renaming":false,"contentRole":true},"editorStyle":"wp-block-navigation-editor","style":"wp-block-navigation"}');
29799 + ;// ./node_modules/@wordpress/icons/build-module/library/page.js
29800 +
29801 +
29802 + var page_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: [
29803 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M15.5 7.5h-7V9h7V7.5Zm-7 3.5h7v1.5h-7V11Zm7 3.5h-7V16h7v-1.5Z" }),
29804 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M17 4H7a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2ZM7 5.5h10a.5.5 0 0 1 .5.5v12a.5.5 0 0 1-.5.5H7a.5.5 0 0 1-.5-.5V6a.5.5 0 0 1 .5-.5Z" })
29805 + ] });
29806 +
29807 +
29808 + ;// ./node_modules/@wordpress/icons/build-module/icon/index.js
29809 +
29810 + var build_module_icon_icon_default = (0,external_wp_element_namespaceObject.forwardRef)(
29811 + ({ icon, size = 24, ...props }, ref) => {
29812 + return (0,external_wp_element_namespaceObject.cloneElement)(icon, {
29813 + width: size,
29814 + height: size,
29815 + ...props,
29816 + ref
29817 + });
29818 + }
29819 + );
29820 +
29821 +
29822 + ;// ./node_modules/@wordpress/icons/build-module/library/close.js
29823 +
29824 +
29825 + var close_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "m13.06 12 6.47-6.47-1.06-1.06L12 10.94 5.53 4.47 4.47 5.53 10.94 12l-6.47 6.47 1.06 1.06L12 13.06l6.47 6.47 1.06-1.06L13.06 12Z" }) });
29826 +
29827 +
29828 + ;// ./node_modules/@wordpress/block-library/build-module/navigation/constants.js
29829 + const constants_DEFAULT_BLOCK = {
29830 + name: "core/navigation-link",
29831 + attributes: {
29832 + kind: "post-type",
29833 + type: "page"
29834 + }
29835 + };
29836 + const PRIORITIZED_INSERTER_BLOCKS = [
29837 + "core/navigation-link/page",
29838 + "core/navigation-link"
29839 + ];
29840 + const PRELOADED_NAVIGATION_MENUS_QUERY = {
29841 + per_page: 100,
29842 + status: ["publish", "draft"],
29843 + order: "desc",
29844 + orderby: "date"
29845 + };
29846 + const SELECT_NAVIGATION_MENUS_ARGS = [
29847 + "postType",
29848 + "wp_navigation",
29849 + PRELOADED_NAVIGATION_MENUS_QUERY
29850 + ];
29851 +
29852 +
29853 + ;// ./node_modules/@wordpress/block-library/build-module/navigation/use-navigation-menu.js
29854 +
29855 +
29856 +
29857 + function useNavigationMenu(ref) {
29858 + const permissions = (0,external_wp_coreData_namespaceObject.useResourcePermissions)({
29859 + kind: "postType",
29860 + name: "wp_navigation",
29861 + id: ref
29862 + });
29863 + const {
29864 + navigationMenu,
29865 + isNavigationMenuResolved,
29866 + isNavigationMenuMissing
29867 + } = (0,external_wp_data_namespaceObject.useSelect)(
29868 + (select) => {
29869 + return selectExistingMenu(select, ref);
29870 + },
29871 + [ref]
29872 + );
29873 + const {
29874 + // Can the user create navigation menus?
29875 + canCreate: canCreateNavigationMenus,
29876 + // Can the user update the specific navigation menu with the given post ID?
29877 + canUpdate: canUpdateNavigationMenu,
29878 + // Can the user delete the specific navigation menu with the given post ID?
29879 + canDelete: canDeleteNavigationMenu,
29880 + isResolving: isResolvingPermissions,
29881 + hasResolved: hasResolvedPermissions
29882 + } = permissions;
29883 + const {
29884 + records: navigationMenus,
29885 + isResolving: isResolvingNavigationMenus,
29886 + hasResolved: hasResolvedNavigationMenus
29887 + } = (0,external_wp_coreData_namespaceObject.useEntityRecords)(
29888 + "postType",
29889 + `wp_navigation`,
29890 + PRELOADED_NAVIGATION_MENUS_QUERY
29891 + );
29892 + const canSwitchNavigationMenu = ref ? navigationMenus?.length > 1 : navigationMenus?.length > 0;
29893 + return {
29894 + navigationMenu,
29895 + isNavigationMenuResolved,
29896 + isNavigationMenuMissing,
29897 + navigationMenus,
29898 + isResolvingNavigationMenus,
29899 + hasResolvedNavigationMenus,
29900 + canSwitchNavigationMenu,
29901 + canUserCreateNavigationMenus: canCreateNavigationMenus,
29902 + isResolvingCanUserCreateNavigationMenus: isResolvingPermissions,
29903 + hasResolvedCanUserCreateNavigationMenus: hasResolvedPermissions,
29904 + canUserUpdateNavigationMenu: canUpdateNavigationMenu,
29905 + hasResolvedCanUserUpdateNavigationMenu: ref ? hasResolvedPermissions : void 0,
29906 + canUserDeleteNavigationMenu: canDeleteNavigationMenu,
29907 + hasResolvedCanUserDeleteNavigationMenu: ref ? hasResolvedPermissions : void 0
29908 + };
29909 + }
29910 + function selectExistingMenu(select, ref) {
29911 + if (!ref) {
29912 + return {
29913 + isNavigationMenuResolved: false,
29914 + isNavigationMenuMissing: true
29915 + };
29916 + }
29917 + const { getEntityRecord, getEditedEntityRecord, hasFinishedResolution } = select(external_wp_coreData_namespaceObject.store);
29918 + const args = ["postType", "wp_navigation", ref];
29919 + const navigationMenu = getEntityRecord(...args);
29920 + const editedNavigationMenu = getEditedEntityRecord(...args);
29921 + const hasResolvedNavigationMenu = hasFinishedResolution(
29922 + "getEditedEntityRecord",
29923 + args
29924 + );
29925 + const isNavigationMenuPublishedOrDraft = editedNavigationMenu.status === "publish" || editedNavigationMenu.status === "draft";
29926 + return {
29927 + isNavigationMenuResolved: hasResolvedNavigationMenu,
29928 + isNavigationMenuMissing: hasResolvedNavigationMenu && (!navigationMenu || !isNavigationMenuPublishedOrDraft),
29929 + // getEditedEntityRecord will return the post regardless of status.
29930 + // Therefore if the found post is not published then we should ignore it.
29931 + navigationMenu: isNavigationMenuPublishedOrDraft ? editedNavigationMenu : null
29932 + };
29933 + }
29934 +
29935 +
29936 + ;// ./node_modules/@wordpress/block-library/build-module/navigation/use-navigation-entities.js
29937 +
29938 + function useNavigationEntities(menuId) {
29939 + const {
29940 + records: menus,
29941 + isResolving: isResolvingMenus,
29942 + hasResolved: hasResolvedMenus
29943 + } = (0,external_wp_coreData_namespaceObject.useEntityRecords)("root", "menu", { per_page: -1, context: "view" });
29944 + const {
29945 + records: pages,
29946 + isResolving: isResolvingPages,
29947 + hasResolved: hasResolvedPages
29948 + } = (0,external_wp_coreData_namespaceObject.useEntityRecords)("postType", "page", {
29949 + parent: 0,
29950 + order: "asc",
29951 + orderby: "id",
29952 + per_page: -1,
29953 + context: "view"
29954 + });
29955 + const { records: menuItems, hasResolved: hasResolvedMenuItems } = (0,external_wp_coreData_namespaceObject.useEntityRecords)(
29956 + "root",
29957 + "menuItem",
29958 + {
29959 + menus: menuId,
29960 + per_page: -1,
29961 + context: "view"
29962 + },
29963 + { enabled: !!menuId }
29964 + );
29965 + return {
29966 + pages,
29967 + isResolvingPages,
29968 + hasResolvedPages,
29969 + hasPages: !!(hasResolvedPages && pages?.length),
29970 + menus,
29971 + isResolvingMenus,
29972 + hasResolvedMenus,
29973 + hasMenus: !!(hasResolvedMenus && menus?.length),
29974 + menuItems,
29975 + hasResolvedMenuItems
29976 + };
29977 + }
29978 +
29979 +
29980 + ;// ./node_modules/@wordpress/block-library/build-module/navigation/edit/placeholder/placeholder-preview.js
29981 +
29982 +
29983 +
29984 + const PlaceholderPreview = ({ isVisible = true }) => {
29985 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
29986 + "div",
29987 + {
29988 + "aria-hidden": !isVisible ? true : void 0,
29989 + className: "wp-block-navigation-placeholder__preview",
29990 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", { className: "wp-block-navigation-placeholder__actions__indicator", children: [
29991 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(build_module_icon_icon_default, { icon: navigation_default }),
29992 + (0,external_wp_i18n_namespaceObject.__)("Navigation")
29993 + ] })
29994 + }
29995 + );
29996 + };
29997 + var placeholder_preview_default = PlaceholderPreview;
29998 +
29999 +
30000 + ;// ./node_modules/@wordpress/icons/build-module/library/more-vertical.js
30001 +
30002 +
30003 + var more_vertical_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M13 19h-2v-2h2v2zm0-6h-2v-2h2v2zm0-6h-2V5h2v2z" }) });
30004 +
30005 +
30006 + ;// ./node_modules/@wordpress/block-library/build-module/navigation/edit/navigation-menu-selector.js
30007 +
30008 +
30009 +
30010 +
30011 +
30012 +
30013 +
30014 +
30015 +
30016 + function buildMenuLabel(title, id, status) {
30017 + if (!title) {
30018 + return (0,external_wp_i18n_namespaceObject.sprintf)((0,external_wp_i18n_namespaceObject.__)("(no title %s)"), id);
30019 + }
30020 + if (status === "publish") {
30021 + return (0,external_wp_htmlEntities_namespaceObject.decodeEntities)(title);
30022 + }
30023 + return (0,external_wp_i18n_namespaceObject.sprintf)(
30024 + // translators: 1: title of the menu. 2: status of the menu (draft, pending, etc.).
30025 + (0,external_wp_i18n_namespaceObject.__)("%1$s (%2$s)"),
30026 + (0,external_wp_htmlEntities_namespaceObject.decodeEntities)(title),
30027 + status
30028 + );
30029 + }
30030 + function NavigationMenuSelector({
30031 + currentMenuId,
30032 + onSelectNavigationMenu,
30033 + onSelectClassicMenu,
30034 + onCreateNew,
30035 + actionLabel,
30036 + createNavigationMenuIsSuccess,
30037 + createNavigationMenuIsError
30038 + }) {
30039 + const createActionLabel = (0,external_wp_i18n_namespaceObject.__)("Create from '%s'");
30040 + const [isUpdatingMenuRef, setIsUpdatingMenuRef] = (0,external_wp_element_namespaceObject.useState)(false);
30041 + actionLabel = actionLabel || createActionLabel;
30042 + const { menus: classicMenus } = useNavigationEntities();
30043 + const {
30044 + navigationMenus,
30045 + isResolvingNavigationMenus,
30046 + hasResolvedNavigationMenus,
30047 + canUserCreateNavigationMenus,
30048 + canSwitchNavigationMenu,
30049 + isNavigationMenuMissing
30050 + } = useNavigationMenu(currentMenuId);
30051 + const [currentTitle] = (0,external_wp_coreData_namespaceObject.useEntityProp)(
30052 + "postType",
30053 + "wp_navigation",
30054 + "title"
30055 + );
30056 + const menuChoices = (0,external_wp_element_namespaceObject.useMemo)(() => {
30057 + return navigationMenus?.map(({ id, title, status }, index) => {
30058 + const label = buildMenuLabel(
30059 + title?.rendered,
30060 + index + 1,
30061 + status
30062 + );
30063 + return {
30064 + value: id,
30065 + label,
30066 + ariaLabel: (0,external_wp_i18n_namespaceObject.sprintf)(actionLabel, label),
30067 + disabled: isUpdatingMenuRef || isResolvingNavigationMenus || !hasResolvedNavigationMenus
30068 + };
30069 + }) || [];
30070 + }, [
30071 + navigationMenus,
30072 + actionLabel,
30073 + isResolvingNavigationMenus,
30074 + hasResolvedNavigationMenus,
30075 + isUpdatingMenuRef
30076 + ]);
30077 + const hasNavigationMenus = !!navigationMenus?.length;
30078 + const hasClassicMenus = !!classicMenus?.length;
30079 + const showNavigationMenus = !!canSwitchNavigationMenu;
30080 + const showClassicMenus = !!canUserCreateNavigationMenus;
30081 + const noMenuSelected = hasNavigationMenus && !currentMenuId;
30082 + const noBlockMenus = !hasNavigationMenus && hasResolvedNavigationMenus;
30083 + const menuUnavailable = hasResolvedNavigationMenus && currentMenuId === null;
30084 + const navMenuHasBeenDeleted = currentMenuId && isNavigationMenuMissing;
30085 + let selectorLabel = "";
30086 + if (isResolvingNavigationMenus) {
30087 + selectorLabel = (0,external_wp_i18n_namespaceObject.__)("Loading\u2026");
30088 + } else if (noMenuSelected || noBlockMenus || menuUnavailable || navMenuHasBeenDeleted) {
30089 + selectorLabel = (0,external_wp_i18n_namespaceObject.__)("Choose or create a Navigation Menu");
30090 + } else {
30091 + selectorLabel = currentTitle;
30092 + }
30093 + (0,external_wp_element_namespaceObject.useEffect)(() => {
30094 + if (isUpdatingMenuRef && (createNavigationMenuIsSuccess || createNavigationMenuIsError)) {
30095 + setIsUpdatingMenuRef(false);
30096 + }
30097 + }, [
30098 + hasResolvedNavigationMenus,
30099 + createNavigationMenuIsSuccess,
30100 + canUserCreateNavigationMenus,
30101 + createNavigationMenuIsError,
30102 + isUpdatingMenuRef,
30103 + menuUnavailable,
30104 + noBlockMenus,
30105 + noMenuSelected
30106 + ]);
30107 + const NavigationMenuSelectorDropdown = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
30108 + external_wp_components_namespaceObject.DropdownMenu,
30109 + {
30110 + label: selectorLabel,
30111 + icon: more_vertical_default,
30112 + toggleProps: { size: "small" },
30113 + children: ({ onClose }) => /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
30114 + showNavigationMenus && hasNavigationMenus && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.MenuGroup, { label: (0,external_wp_i18n_namespaceObject.__)("Menus"), children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
30115 + external_wp_components_namespaceObject.MenuItemsChoice,
30116 + {
30117 + value: currentMenuId,
30118 + onSelect: (menuId) => {
30119 + onSelectNavigationMenu(menuId);
30120 + onClose();
30121 + },
30122 + choices: menuChoices
30123 + }
30124 + ) }),
30125 + showClassicMenus && hasClassicMenus && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.MenuGroup, { label: (0,external_wp_i18n_namespaceObject.__)("Import Classic Menus"), children: classicMenus?.map((menu) => {
30126 + const label = (0,external_wp_htmlEntities_namespaceObject.decodeEntities)(menu.name);
30127 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
30128 + external_wp_components_namespaceObject.MenuItem,
30129 + {
30130 + onClick: async () => {
30131 + setIsUpdatingMenuRef(true);
30132 + await onSelectClassicMenu(menu);
30133 + setIsUpdatingMenuRef(false);
30134 + onClose();
30135 + },
30136 + "aria-label": (0,external_wp_i18n_namespaceObject.sprintf)(
30137 + createActionLabel,
30138 + label
30139 + ),
30140 + disabled: isUpdatingMenuRef || isResolvingNavigationMenus || !hasResolvedNavigationMenus,
30141 + children: label
30142 + },
30143 + menu.id
30144 + );
30145 + }) }),
30146 + canUserCreateNavigationMenus && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.MenuGroup, { label: (0,external_wp_i18n_namespaceObject.__)("Tools"), children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
30147 + external_wp_components_namespaceObject.MenuItem,
30148 + {
30149 + onClick: async () => {
30150 + setIsUpdatingMenuRef(true);
30151 + await onCreateNew();
30152 + setIsUpdatingMenuRef(false);
30153 + onClose();
30154 + },
30155 + disabled: isUpdatingMenuRef || isResolvingNavigationMenus || !hasResolvedNavigationMenus,
30156 + children: (0,external_wp_i18n_namespaceObject.__)("Create new Menu")
30157 + }
30158 + ) })
30159 + ] })
30160 + }
30161 + );
30162 + return NavigationMenuSelectorDropdown;
30163 + }
30164 + var navigation_menu_selector_default = NavigationMenuSelector;
30165 +
30166 +
30167 + ;// ./node_modules/@wordpress/block-library/build-module/navigation/edit/placeholder/index.js
30168 +
30169 +
30170 +
30171 +
30172 +
30173 +
30174 +
30175 +
30176 +
30177 + function NavigationPlaceholder({
30178 + isSelected,
30179 + currentMenuId,
30180 + clientId,
30181 + canUserCreateNavigationMenus = false,
30182 + isResolvingCanUserCreateNavigationMenus,
30183 + onSelectNavigationMenu,
30184 + onSelectClassicMenu,
30185 + onCreateEmpty
30186 + }) {
30187 + const { isResolvingMenus, hasResolvedMenus } = useNavigationEntities();
30188 + (0,external_wp_element_namespaceObject.useEffect)(() => {
30189 + if (!isSelected) {
30190 + return;
30191 + }
30192 + if (isResolvingMenus) {
30193 + (0,external_wp_a11y_namespaceObject.speak)((0,external_wp_i18n_namespaceObject.__)("Loading navigation block setup options\u2026"));
30194 + }
30195 + if (hasResolvedMenus) {
30196 + (0,external_wp_a11y_namespaceObject.speak)((0,external_wp_i18n_namespaceObject.__)("Navigation block setup options ready."));
30197 + }
30198 + }, [hasResolvedMenus, isResolvingMenus, isSelected]);
30199 + const isResolvingActions = isResolvingMenus && isResolvingCanUserCreateNavigationMenus;
30200 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.Placeholder, { className: "wp-block-navigation-placeholder", children: [
30201 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(placeholder_preview_default, { isVisible: !isSelected }),
30202 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
30203 + "div",
30204 + {
30205 + "aria-hidden": !isSelected ? true : void 0,
30206 + className: "wp-block-navigation-placeholder__controls",
30207 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", { className: "wp-block-navigation-placeholder__actions", children: [
30208 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", { className: "wp-block-navigation-placeholder__actions__indicator", children: [
30209 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(build_module_icon_icon_default, { icon: navigation_default }),
30210 + " ",
30211 + (0,external_wp_i18n_namespaceObject.__)("Navigation")
30212 + ] }),
30213 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("hr", {}),
30214 + isResolvingActions && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Spinner, {}),
30215 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
30216 + navigation_menu_selector_default,
30217 + {
30218 + currentMenuId,
30219 + clientId,
30220 + onSelectNavigationMenu,
30221 + onSelectClassicMenu
30222 + }
30223 + ),
30224 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("hr", {}),
30225 + canUserCreateNavigationMenus && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
30226 + external_wp_components_namespaceObject.Button,
30227 + {
30228 + __next40pxDefaultSize: true,
30229 + variant: "tertiary",
30230 + onClick: onCreateEmpty,
30231 + children: (0,external_wp_i18n_namespaceObject.__)("Start empty")
30232 + }
30233 + )
30234 + ] })
30235 + }
30236 + )
30237 + ] }) });
30238 + }
30239 +
30240 +
30241 + ;// ./node_modules/@wordpress/icons/build-module/library/menu.js
30242 +
30243 +
30244 + var menu_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M5 5v1.5h14V5H5zm0 7.8h14v-1.5H5v1.5zM5 19h14v-1.5H5V19z" }) });
30245 +
30246 +
30247 + ;// ./node_modules/@wordpress/block-library/build-module/navigation/edit/overlay-menu-icon.js
30248 +
30249 +
30250 +
30251 + function OverlayMenuIcon({ icon }) {
30252 + if (icon === "menu") {
30253 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(build_module_icon_icon_default, { icon: menu_default });
30254 + }
30255 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(
30256 + external_wp_primitives_namespaceObject.SVG,
30257 + {
30258 + xmlns: "http://www.w3.org/2000/svg",
30259 + viewBox: "0 0 24 24",
30260 + width: "24",
30261 + height: "24",
30262 + "aria-hidden": "true",
30263 + focusable: "false",
30264 + children: [
30265 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Rect, { x: "4", y: "7.5", width: "16", height: "1.5" }),
30266 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Rect, { x: "4", y: "15", width: "16", height: "1.5" })
30267 + ]
30268 + }
30269 + );
30270 + }
30271 +
30272 +
30273 + ;// ./node_modules/@wordpress/block-library/build-module/navigation/edit/responsive-wrapper.js
30274 +
30275 +
30276 +
30277 +
30278 +
30279 +
30280 +
30281 + function ResponsiveWrapper({
30282 + children,
30283 + id,
30284 + isOpen,
30285 + isResponsive,
30286 + onToggle,
30287 + isHiddenByDefault,
30288 + overlayBackgroundColor,
30289 + overlayTextColor,
30290 + hasIcon,
30291 + icon
30292 + }) {
30293 + if (!isResponsive) {
30294 + return children;
30295 + }
30296 + const responsiveContainerClasses = dist_clsx(
30297 + "wp-block-navigation__responsive-container",
30298 + {
30299 + "has-text-color": !!overlayTextColor.color || !!overlayTextColor?.class,
30300 + [(0,external_wp_blockEditor_namespaceObject.getColorClassName)("color", overlayTextColor?.slug)]: !!overlayTextColor?.slug,
30301 + "has-background": !!overlayBackgroundColor.color || overlayBackgroundColor?.class,
30302 + [(0,external_wp_blockEditor_namespaceObject.getColorClassName)(
30303 + "background-color",
30304 + overlayBackgroundColor?.slug
30305 + )]: !!overlayBackgroundColor?.slug,
30306 + "is-menu-open": isOpen,
30307 + "hidden-by-default": isHiddenByDefault
30308 + }
30309 + );
30310 + const styles = {
30311 + color: !overlayTextColor?.slug && overlayTextColor?.color,
30312 + backgroundColor: !overlayBackgroundColor?.slug && overlayBackgroundColor?.color && overlayBackgroundColor.color
30313 + };
30314 + const openButtonClasses = dist_clsx(
30315 + "wp-block-navigation__responsive-container-open",
30316 + { "always-shown": isHiddenByDefault }
30317 + );
30318 + const modalId = `${id}-modal`;
30319 + const dialogProps = {
30320 + className: "wp-block-navigation__responsive-dialog",
30321 + ...isOpen && {
30322 + role: "dialog",
30323 + "aria-modal": true,
30324 + "aria-label": (0,external_wp_i18n_namespaceObject.__)("Menu")
30325 + }
30326 + };
30327 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
30328 + !isOpen && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(
30329 + external_wp_components_namespaceObject.Button,
30330 + {
30331 + __next40pxDefaultSize: true,
30332 + "aria-haspopup": "true",
30333 + "aria-label": hasIcon && (0,external_wp_i18n_namespaceObject.__)("Open menu"),
30334 + className: openButtonClasses,
30335 + onClick: () => onToggle(true),
30336 + children: [
30337 + hasIcon && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(OverlayMenuIcon, { icon }),
30338 + !hasIcon && (0,external_wp_i18n_namespaceObject.__)("Menu")
30339 + ]
30340 + }
30341 + ),
30342 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
30343 + "div",
30344 + {
30345 + className: responsiveContainerClasses,
30346 + style: styles,
30347 + id: modalId,
30348 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
30349 + "div",
30350 + {
30351 + className: "wp-block-navigation__responsive-close",
30352 + tabIndex: "-1",
30353 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", { ...dialogProps, children: [
30354 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(
30355 + external_wp_components_namespaceObject.Button,
30356 + {
30357 + __next40pxDefaultSize: true,
30358 + className: "wp-block-navigation__responsive-container-close",
30359 + "aria-label": hasIcon && (0,external_wp_i18n_namespaceObject.__)("Close menu"),
30360 + onClick: () => onToggle(false),
30361 + children: [
30362 + hasIcon && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(build_module_icon_icon_default, { icon: close_default }),
30363 + !hasIcon && (0,external_wp_i18n_namespaceObject.__)("Close")
30364 + ]
30365 + }
30366 + ),
30367 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
30368 + "div",
30369 + {
30370 + className: "wp-block-navigation__responsive-container-content",
30371 + id: `${modalId}-content`,
30372 + children
30373 + }
30374 + )
30375 + ] })
30376 + }
30377 + )
30378 + }
30379 + )
30380 + ] });
30381 + }
30382 +
30383 +
30384 + ;// ./node_modules/@wordpress/block-library/build-module/navigation/edit/inner-blocks.js
30385 +
30386 +
30387 +
30388 +
30389 +
30390 +
30391 +
30392 + function NavigationInnerBlocks({
30393 + clientId,
30394 + hasCustomPlaceholder,
30395 + orientation,
30396 + templateLock
30397 + }) {
30398 + const {
30399 + isImmediateParentOfSelectedBlock,
30400 + selectedBlockHasChildren,
30401 + isSelected,
30402 + hasSelectedDescendant
30403 + } = (0,external_wp_data_namespaceObject.useSelect)(
30404 + (select) => {
30405 + const {
30406 + getBlockCount,
30407 + hasSelectedInnerBlock,
30408 + getSelectedBlockClientId
30409 + } = select(external_wp_blockEditor_namespaceObject.store);
30410 + const selectedBlockId = getSelectedBlockClientId();
30411 + return {
30412 + isImmediateParentOfSelectedBlock: hasSelectedInnerBlock(
30413 + clientId,
30414 + false
30415 + ),
30416 + selectedBlockHasChildren: !!getBlockCount(selectedBlockId),
30417 + hasSelectedDescendant: hasSelectedInnerBlock(clientId, true),
30418 + // This prop is already available but computing it here ensures it's
30419 + // fresh compared to isImmediateParentOfSelectedBlock.
30420 + isSelected: selectedBlockId === clientId
30421 + };
30422 + },
30423 + [clientId]
30424 + );
30425 + const [blocks, onInput, onChange] = (0,external_wp_coreData_namespaceObject.useEntityBlockEditor)(
30426 + "postType",
30427 + "wp_navigation"
30428 + );
30429 + const parentOrChildHasSelection = isSelected || isImmediateParentOfSelectedBlock && !selectedBlockHasChildren;
30430 + const placeholder = (0,external_wp_element_namespaceObject.useMemo)(() => /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(placeholder_preview_default, {}), []);
30431 + const hasMenuItems = !!blocks?.length;
30432 + const showPlaceholder = !hasCustomPlaceholder && !hasMenuItems && !isSelected;
30433 + const innerBlocksProps = (0,external_wp_blockEditor_namespaceObject.useInnerBlocksProps)(
30434 + {
30435 + className: "wp-block-navigation__container"
30436 + },
30437 + {
30438 + value: blocks,
30439 + onInput,
30440 + onChange,
30441 + prioritizedInserterBlocks: PRIORITIZED_INSERTER_BLOCKS,
30442 + defaultBlock: constants_DEFAULT_BLOCK,
30443 + directInsert: true,
30444 + orientation,
30445 + templateLock,
30446 + // As an exception to other blocks which feature nesting, show
30447 + // the block appender even when a child block is selected.
30448 + // This should be a temporary fix, to be replaced by improvements to
30449 + // the sibling inserter.
30450 + // See https://github.com/WordPress/gutenberg/issues/37572.
30451 + renderAppender: isSelected || isImmediateParentOfSelectedBlock && !selectedBlockHasChildren || hasSelectedDescendant || // Show the appender while dragging to allow inserting element between item and the appender.
30452 + parentOrChildHasSelection ? external_wp_blockEditor_namespaceObject.InnerBlocks.ButtonBlockAppender : false,
30453 + placeholder: showPlaceholder ? placeholder : void 0,
30454 + __experimentalCaptureToolbars: true,
30455 + __unstableDisableLayoutClassNames: true
30456 + }
30457 + );
30458 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { ...innerBlocksProps });
30459 + }
30460 +
30461 +
30462 + ;// ./node_modules/@wordpress/block-library/build-module/navigation/edit/navigation-menu-name-control.js
30463 +
30464 +
30465 +
30466 +
30467 + function NavigationMenuNameControl() {
30468 + const [title, updateTitle] = (0,external_wp_coreData_namespaceObject.useEntityProp)(
30469 + "postType",
30470 + "wp_navigation",
30471 + "title"
30472 + );
30473 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
30474 + external_wp_components_namespaceObject.TextControl,
30475 + {
30476 + __next40pxDefaultSize: true,
30477 + __nextHasNoMarginBottom: true,
30478 + label: (0,external_wp_i18n_namespaceObject.__)("Menu name"),
30479 + value: title,
30480 + onChange: updateTitle
30481 + }
30482 + );
30483 + }
30484 +
30485 +
30486 + ;// ./node_modules/@wordpress/block-library/build-module/navigation/edit/are-blocks-dirty.js
30487 + function areBlocksDirty(originalBlocks, blocks) {
30488 + return !isDeepEqual(originalBlocks, blocks, (prop, x) => {
30489 + if (x?.name === "core/page-list" && prop === "innerBlocks") {
30490 + return true;
30491 + }
30492 + });
30493 + }
30494 + const isDeepEqual = (x, y, shouldSkip) => {
30495 + if (x === y) {
30496 + return true;
30497 + } else if (typeof x === "object" && x !== null && x !== void 0 && typeof y === "object" && y !== null && y !== void 0) {
30498 + if (Object.keys(x).length !== Object.keys(y).length) {
30499 + return false;
30500 + }
30501 + for (const prop in x) {
30502 + if (y.hasOwnProperty(prop)) {
30503 + if (shouldSkip && shouldSkip(prop, x)) {
30504 + return true;
30505 + }
30506 + if (!isDeepEqual(x[prop], y[prop], shouldSkip)) {
30507 + return false;
30508 + }
30509 + } else {
30510 + return false;
30511 + }
30512 + }
30513 + return true;
30514 + }
30515 + return false;
30516 + };
30517 +
30518 +
30519 + ;// ./node_modules/@wordpress/block-library/build-module/navigation/edit/unsaved-inner-blocks.js
30520 +
30521 +
30522 +
30523 +
30524 +
30525 +
30526 +
30527 +
30528 + const EMPTY_OBJECT = {};
30529 + function UnsavedInnerBlocks({
30530 + blocks,
30531 + createNavigationMenu,
30532 + hasSelection
30533 + }) {
30534 + const originalBlocksRef = (0,external_wp_element_namespaceObject.useRef)();
30535 + (0,external_wp_element_namespaceObject.useEffect)(() => {
30536 + if (!originalBlocksRef?.current) {
30537 + originalBlocksRef.current = blocks;
30538 + }
30539 + }, [blocks]);
30540 + const innerBlocksAreDirty = areBlocksDirty(
30541 + originalBlocksRef?.current,
30542 + blocks
30543 + );
30544 + const isDisabled = (0,external_wp_element_namespaceObject.useContext)(external_wp_components_namespaceObject.Disabled.Context);
30545 + const innerBlocksProps = (0,external_wp_blockEditor_namespaceObject.useInnerBlocksProps)(
30546 + {
30547 + className: "wp-block-navigation__container"
30548 + },
30549 + {
30550 + renderAppender: hasSelection ? void 0 : false,
30551 + defaultBlock: constants_DEFAULT_BLOCK,
30552 + directInsert: true
30553 + }
30554 + );
30555 + const { isSaving, hasResolvedAllNavigationMenus } = (0,external_wp_data_namespaceObject.useSelect)(
30556 + (select) => {
30557 + if (isDisabled) {
30558 + return EMPTY_OBJECT;
30559 + }
30560 + const { hasFinishedResolution, isSavingEntityRecord } = select(external_wp_coreData_namespaceObject.store);
30561 + return {
30562 + isSaving: isSavingEntityRecord("postType", "wp_navigation"),
30563 + hasResolvedAllNavigationMenus: hasFinishedResolution(
30564 + "getEntityRecords",
30565 + SELECT_NAVIGATION_MENUS_ARGS
30566 + )
30567 + };
30568 + },
30569 + [isDisabled]
30570 + );
30571 + (0,external_wp_element_namespaceObject.useEffect)(() => {
30572 + if (isDisabled || isSaving || !hasResolvedAllNavigationMenus || !hasSelection || !innerBlocksAreDirty) {
30573 + return;
30574 + }
30575 + createNavigationMenu(null, blocks);
30576 + }, [
30577 + blocks,
30578 + createNavigationMenu,
30579 + isDisabled,
30580 + isSaving,
30581 + hasResolvedAllNavigationMenus,
30582 + innerBlocksAreDirty,
30583 + hasSelection
30584 + ]);
30585 + const Wrapper = isSaving ? external_wp_components_namespaceObject.Disabled : "div";
30586 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(Wrapper, { ...innerBlocksProps });
30587 + }
30588 +
30589 +
30590 + ;// ./node_modules/@wordpress/block-library/build-module/navigation/edit/navigation-menu-delete-control.js
30591 +
30592 +
30593 +
30594 +
30595 +
30596 +
30597 + function NavigationMenuDeleteControl({ onDelete }) {
30598 + const [isConfirmDialogVisible, setIsConfirmDialogVisible] = (0,external_wp_element_namespaceObject.useState)(false);
30599 + const id = (0,external_wp_coreData_namespaceObject.useEntityId)("postType", "wp_navigation");
30600 + const { deleteEntityRecord } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_coreData_namespaceObject.store);
30601 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
30602 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
30603 + external_wp_components_namespaceObject.Button,
30604 + {
30605 + __next40pxDefaultSize: true,
30606 + className: "wp-block-navigation-delete-menu-button",
30607 + variant: "secondary",
30608 + isDestructive: true,
30609 + onClick: () => {
30610 + setIsConfirmDialogVisible(true);
30611 + },
30612 + children: (0,external_wp_i18n_namespaceObject.__)("Delete menu")
30613 + }
30614 + ),
30615 + isConfirmDialogVisible && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
30616 + external_wp_components_namespaceObject.__experimentalConfirmDialog,
30617 + {
30618 + isOpen: true,
30619 + onConfirm: () => {
30620 + deleteEntityRecord("postType", "wp_navigation", id, {
30621 + force: true
30622 + });
30623 + onDelete();
30624 + },
30625 + onCancel: () => {
30626 + setIsConfirmDialogVisible(false);
30627 + },
30628 + confirmButtonText: (0,external_wp_i18n_namespaceObject.__)("Delete"),
30629 + size: "medium",
30630 + children: (0,external_wp_i18n_namespaceObject.__)(
30631 + "Are you sure you want to delete this Navigation Menu?"
30632 + )
30633 + }
30634 + )
30635 + ] });
30636 + }
30637 +
30638 +
30639 + ;// ./node_modules/@wordpress/block-library/build-module/navigation/edit/use-navigation-notice.js
30640 +
30641 +
30642 +
30643 + function useNavigationNotice({ name, message = "" } = {}) {
30644 + const noticeRef = (0,external_wp_element_namespaceObject.useRef)();
30645 + const { createWarningNotice, removeNotice } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_notices_namespaceObject.store);
30646 + const showNotice = (0,external_wp_element_namespaceObject.useCallback)(
30647 + (customMsg) => {
30648 + if (noticeRef.current) {
30649 + return;
30650 + }
30651 + noticeRef.current = name;
30652 + createWarningNotice(customMsg || message, {
30653 + id: noticeRef.current,
30654 + type: "snackbar"
30655 + });
30656 + },
30657 + [noticeRef, createWarningNotice, message, name]
30658 + );
30659 + const hideNotice = (0,external_wp_element_namespaceObject.useCallback)(() => {
30660 + if (!noticeRef.current) {
30661 + return;
30662 + }
30663 + removeNotice(noticeRef.current);
30664 + noticeRef.current = null;
30665 + }, [noticeRef, removeNotice]);
30666 + return [showNotice, hideNotice];
30667 + }
30668 + var use_navigation_notice_default = useNavigationNotice;
30669 +
30670 +
30671 + ;// ./node_modules/@wordpress/block-library/build-module/navigation/edit/overlay-menu-preview.js
30672 +
30673 +
30674 +
30675 +
30676 + function OverlayMenuPreview({ setAttributes, hasIcon, icon }) {
30677 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
30678 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
30679 + external_wp_components_namespaceObject.__experimentalToolsPanelItem,
30680 + {
30681 + label: (0,external_wp_i18n_namespaceObject.__)("Show icon button"),
30682 + isShownByDefault: true,
30683 + hasValue: () => !hasIcon,
30684 + onDeselect: () => setAttributes({ hasIcon: true }),
30685 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
30686 + external_wp_components_namespaceObject.ToggleControl,
30687 + {
30688 + __nextHasNoMarginBottom: true,
30689 + label: (0,external_wp_i18n_namespaceObject.__)("Show icon button"),
30690 + help: (0,external_wp_i18n_namespaceObject.__)(
30691 + "Configure the visual appearance of the button that toggles the overlay menu."
30692 + ),
30693 + onChange: (value) => setAttributes({ hasIcon: value }),
30694 + checked: hasIcon
30695 + }
30696 + )
30697 + }
30698 + ),
30699 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
30700 + external_wp_components_namespaceObject.__experimentalToolsPanelItem,
30701 + {
30702 + label: (0,external_wp_i18n_namespaceObject.__)("Icon"),
30703 + isShownByDefault: true,
30704 + hasValue: () => icon !== "handle",
30705 + onDeselect: () => setAttributes({ icon: "handle" }),
30706 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(
30707 + external_wp_components_namespaceObject.__experimentalToggleGroupControl,
30708 + {
30709 + __next40pxDefaultSize: true,
30710 + __nextHasNoMarginBottom: true,
30711 + className: "wp-block-navigation__overlay-menu-icon-toggle-group",
30712 + label: (0,external_wp_i18n_namespaceObject.__)("Icon"),
30713 + value: icon,
30714 + onChange: (value) => setAttributes({ icon: value }),
30715 + isBlock: true,
30716 + children: [
30717 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
30718 + external_wp_components_namespaceObject.__experimentalToggleGroupControlOption,
30719 + {
30720 + value: "handle",
30721 + "aria-label": (0,external_wp_i18n_namespaceObject.__)("handle"),
30722 + label: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(OverlayMenuIcon, { icon: "handle" })
30723 + }
30724 + ),
30725 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
30726 + external_wp_components_namespaceObject.__experimentalToggleGroupControlOption,
30727 + {
30728 + value: "menu",
30729 + "aria-label": (0,external_wp_i18n_namespaceObject.__)("menu"),
30730 + label: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(OverlayMenuIcon, { icon: "menu" })
30731 + }
30732 + )
30733 + ]
30734 + }
30735 + )
30736 + }
30737 + )
30738 + ] });
30739 + }
30740 +
30741 +
30742 + ;// ./node_modules/@wordpress/block-library/build-module/navigation-link/shared/use-entity-binding.js
30743 +
30744 +
30745 +
30746 +
30747 + function buildNavigationLinkEntityBinding(kind) {
30748 + if (kind === void 0) {
30749 + throw new Error(
30750 + 'buildNavigationLinkEntityBinding requires a kind parameter. Only "post-type" and "taxonomy" are supported.'
30751 + );
30752 + }
30753 + if (kind !== "post-type" && kind !== "taxonomy") {
30754 + throw new Error(
30755 + `Invalid kind "${kind}" provided to buildNavigationLinkEntityBinding. Only 'post-type' and 'taxonomy' are supported.`
30756 + );
30757 + }
30758 + const source = kind === "taxonomy" ? "core/term-data" : "core/post-data";
30759 + return {
30760 + url: {
30761 + source,
30762 + args: {
30763 + field: "link"
30764 + }
30765 + }
30766 + };
30767 + }
30768 + function useEntityBinding({ clientId, attributes }) {
30769 + const { updateBlockBindings } = (0,external_wp_blockEditor_namespaceObject.useBlockBindingsUtils)(clientId);
30770 + const { metadata, id, kind, type } = attributes;
30771 + const blockEditingMode = (0,external_wp_blockEditor_namespaceObject.useBlockEditingMode)();
30772 + const hasUrlBinding = !!metadata?.bindings?.url && !!id;
30773 + const expectedSource = kind === "post-type" ? "core/post-data" : "core/term-data";
30774 + const hasCorrectBinding = hasUrlBinding && metadata?.bindings?.url?.source === expectedSource;
30775 + const isBoundEntityAvailable = (0,external_wp_data_namespaceObject.useSelect)(
30776 + (select) => {
30777 + if (!hasCorrectBinding || !id) {
30778 + return false;
30779 + }
30780 + const isPostType = kind === "post-type";
30781 + const isTaxonomy = kind === "taxonomy";
30782 + if (!isPostType && !isTaxonomy) {
30783 + return false;
30784 + }
30785 + if (blockEditingMode === "disabled") {
30786 + return true;
30787 + }
30788 + const { getEntityRecord, hasFinishedResolution } = select(external_wp_coreData_namespaceObject.store);
30789 + const entityType = isTaxonomy ? "taxonomy" : "postType";
30790 + const typeForAPI = type === "tag" ? "post_tag" : type;
30791 + const entityRecord = getEntityRecord(entityType, typeForAPI, id);
30792 + const hasResolved = hasFinishedResolution("getEntityRecord", [
30793 + entityType,
30794 + typeForAPI,
30795 + id
30796 + ]);
30797 + return hasResolved ? entityRecord !== void 0 : true;
30798 + },
30799 + [kind, type, id, hasCorrectBinding, blockEditingMode]
30800 + );
30801 + const clearBinding = (0,external_wp_element_namespaceObject.useCallback)(() => {
30802 + if (hasUrlBinding) {
30803 + updateBlockBindings({ url: void 0 });
30804 + }
30805 + }, [updateBlockBindings, hasUrlBinding, metadata, id]);
30806 + const createBinding = (0,external_wp_element_namespaceObject.useCallback)(
30807 + (updatedAttributes) => {
30808 + const kindToUse = updatedAttributes?.kind ?? kind;
30809 + if (!kindToUse) {
30810 + return;
30811 + }
30812 + try {
30813 + const binding = buildNavigationLinkEntityBinding(kindToUse);
30814 + updateBlockBindings(binding);
30815 + } catch (error) {
30816 + console.warn(
30817 + "Failed to create entity binding:",
30818 + error.message
30819 + );
30820 + }
30821 + },
30822 + [updateBlockBindings, kind]
30823 + );
30824 + return {
30825 + hasUrlBinding: hasCorrectBinding,
30826 + isBoundEntityAvailable,
30827 + clearBinding,
30828 + createBinding
30829 + };
30830 + }
30831 +
30832 +
30833 + ;// ./node_modules/@wordpress/block-library/build-module/navigation/menu-items-to-blocks.js
30834 +
30835 +
30836 +
30837 + function menuItemsToBlocks(menuItems) {
30838 + if (!menuItems) {
30839 + return null;
30840 + }
30841 + const menuTree = createDataTree(menuItems);
30842 + const blocks = mapMenuItemsToBlocks(menuTree);
30843 + return (0,external_wp_hooks_namespaceObject.applyFilters)(
30844 + "blocks.navigation.__unstableMenuItemsToBlocks",
30845 + blocks,
30846 + menuItems
30847 + );
30848 + }
30849 + function mapMenuItemsToBlocks(menuItems, level = 0) {
30850 + let mapping = {};
30851 + const sortedItems = [...menuItems].sort(
30852 + (a, b) => a.menu_order - b.menu_order
30853 + );
30854 + const innerBlocks = sortedItems.map((menuItem) => {
30855 + if (menuItem.type === "block") {
30856 + const [block2] = (0,external_wp_blocks_namespaceObject.parse)(menuItem.content.raw);
30857 + if (!block2) {
30858 + return (0,external_wp_blocks_namespaceObject.createBlock)("core/freeform", {
30859 + content: menuItem.content
30860 + });
30861 + }
30862 + return block2;
30863 + }
30864 + const blockType = menuItem.children?.length ? "core/navigation-submenu" : "core/navigation-link";
30865 + const attributes = menuItemToBlockAttributes(
30866 + menuItem,
30867 + blockType,
30868 + level
30869 + );
30870 + const {
30871 + innerBlocks: nestedBlocks = [],
30872 + // alias to avoid shadowing
30873 + mapping: nestedMapping = {}
30874 + // alias to avoid shadowing
30875 + } = menuItem.children?.length ? mapMenuItemsToBlocks(menuItem.children, level + 1) : {};
30876 + mapping = {
30877 + ...mapping,
30878 + ...nestedMapping
30879 + };
30880 + const block = (0,external_wp_blocks_namespaceObject.createBlock)(blockType, attributes, nestedBlocks);
30881 + mapping[menuItem.id] = block.clientId;
30882 + return block;
30883 + });
30884 + return {
30885 + innerBlocks,
30886 + mapping
30887 + };
30888 + }
30889 + function menuItemToBlockAttributes({
30890 + title: menuItemTitleField,
30891 + xfn,
30892 + classes,
30893 + // eslint-disable-next-line camelcase
30894 + attr_title,
30895 + object,
30896 + // eslint-disable-next-line camelcase
30897 + object_id,
30898 + description,
30899 + url,
30900 + type: menuItemTypeField,
30901 + target
30902 + }, blockType, level) {
30903 + if (object && object === "post_tag") {
30904 + object = "tag";
30905 + }
30906 + const inferredKind = menuItemTypeField?.replace("_", "-") || "custom";
30907 + return {
30908 + label: menuItemTitleField?.rendered || "",
30909 + ...object?.length && {
30910 + type: object
30911 + },
30912 + kind: inferredKind,
30913 + url: url || "",
30914 + ...xfn?.length && xfn.join(" ").trim() && {
30915 + rel: xfn.join(" ").trim()
30916 + },
30917 + ...classes?.length && classes.join(" ").trim() && {
30918 + className: classes.join(" ").trim()
30919 + },
30920 + /* eslint-disable camelcase */
30921 + ...attr_title?.length && {
30922 + title: attr_title
30923 + },
30924 + ...object_id && (inferredKind === "post-type" || inferredKind === "taxonomy") && {
30925 + id: object_id,
30926 + metadata: {
30927 + bindings: buildNavigationLinkEntityBinding(inferredKind)
30928 + }
30929 + },
30930 + /* eslint-enable camelcase */
30931 + ...description?.length && {
30932 + description
30933 + },
30934 + ...target === "_blank" && {
30935 + opensInNewTab: true
30936 + },
30937 + ...blockType === "core/navigation-submenu" && {
30938 + isTopLevelItem: level === 0
30939 + },
30940 + ...blockType === "core/navigation-link" && {
30941 + isTopLevelLink: level === 0
30942 + }
30943 + };
30944 + }
30945 + function createDataTree(dataset, id = "id", relation = "parent") {
30946 + const hashTable = /* @__PURE__ */ Object.create(null);
30947 + const dataTree = [];
30948 + for (const data of dataset) {
30949 + hashTable[data[id]] = {
30950 + ...data,
30951 + children: []
30952 + };
30953 + if (data[relation]) {
30954 + hashTable[data[relation]] = hashTable[data[relation]] || {};
30955 + hashTable[data[relation]].children = hashTable[data[relation]].children || [];
30956 + hashTable[data[relation]].children.push(
30957 + hashTable[data[id]]
30958 + );
30959 + } else {
30960 + dataTree.push(hashTable[data[id]]);
30961 + }
30962 + }
30963 + return dataTree;
30964 + }
30965 +
30966 +
30967 + ;// ./node_modules/@wordpress/block-library/build-module/navigation/edit/use-convert-classic-menu-to-block-menu.js
30968 +
30969 +
30970 +
30971 +
30972 +
30973 + const CLASSIC_MENU_CONVERSION_SUCCESS = "success";
30974 + const CLASSIC_MENU_CONVERSION_ERROR = "error";
30975 + const CLASSIC_MENU_CONVERSION_PENDING = "pending";
30976 + const CLASSIC_MENU_CONVERSION_IDLE = "idle";
30977 + let classicMenuBeingConvertedId = null;
30978 + function useConvertClassicToBlockMenu(createNavigationMenu, { throwOnError = false } = {}) {
30979 + const registry = (0,external_wp_data_namespaceObject.useRegistry)();
30980 + const { editEntityRecord } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_coreData_namespaceObject.store);
30981 + const [status, setStatus] = (0,external_wp_element_namespaceObject.useState)(CLASSIC_MENU_CONVERSION_IDLE);
30982 + const [error, setError] = (0,external_wp_element_namespaceObject.useState)(null);
30983 + const convertClassicMenuToBlockMenu = (0,external_wp_element_namespaceObject.useCallback)(
30984 + async (menuId, menuName, postStatus = "publish") => {
30985 + let navigationMenu;
30986 + let classicMenuItems;
30987 + try {
30988 + classicMenuItems = await registry.resolveSelect(external_wp_coreData_namespaceObject.store).getMenuItems({
30989 + menus: menuId,
30990 + per_page: -1,
30991 + context: "view"
30992 + });
30993 + } catch (err) {
30994 + throw new Error(
30995 + (0,external_wp_i18n_namespaceObject.sprintf)(
30996 + // translators: %s: The name of a menu (e.g. Header menu).
30997 + (0,external_wp_i18n_namespaceObject.__)(`Unable to fetch classic menu "%s" from API.`),
30998 + menuName
30999 + ),
31000 + {
31001 + cause: err
31002 + }
31003 + );
31004 + }
31005 + if (classicMenuItems === null) {
31006 + throw new Error(
31007 + (0,external_wp_i18n_namespaceObject.sprintf)(
31008 + // translators: %s: The name of a menu (e.g. Header menu).
31009 + (0,external_wp_i18n_namespaceObject.__)(`Unable to fetch classic menu "%s" from API.`),
31010 + menuName
31011 + )
31012 + );
31013 + }
31014 + const { innerBlocks } = menuItemsToBlocks(classicMenuItems);
31015 + try {
31016 + navigationMenu = await createNavigationMenu(
31017 + menuName,
31018 + innerBlocks,
31019 + postStatus
31020 + );
31021 + await editEntityRecord(
31022 + "postType",
31023 + "wp_navigation",
31024 + navigationMenu.id,
31025 + {
31026 + status: "publish"
31027 + },
31028 + { throwOnError: true }
31029 + );
31030 + } catch (err) {
31031 + throw new Error(
31032 + (0,external_wp_i18n_namespaceObject.sprintf)(
31033 + // translators: %s: The name of a menu (e.g. Header menu).
31034 + (0,external_wp_i18n_namespaceObject.__)(`Unable to create Navigation Menu "%s".`),
31035 + menuName
31036 + ),
31037 + {
31038 + cause: err
31039 + }
31040 + );
31041 + }
31042 + return navigationMenu;
31043 + },
31044 + [createNavigationMenu, editEntityRecord, registry]
31045 + );
31046 + const convert = (0,external_wp_element_namespaceObject.useCallback)(
31047 + async (menuId, menuName, postStatus) => {
31048 + if (classicMenuBeingConvertedId === menuId) {
31049 + return;
31050 + }
31051 + classicMenuBeingConvertedId = menuId;
31052 + if (!menuId || !menuName) {
31053 + setError("Unable to convert menu. Missing menu details.");
31054 + setStatus(CLASSIC_MENU_CONVERSION_ERROR);
31055 + return;
31056 + }
31057 + setStatus(CLASSIC_MENU_CONVERSION_PENDING);
31058 + setError(null);
31059 + return await convertClassicMenuToBlockMenu(
31060 + menuId,
31061 + menuName,
31062 + postStatus
31063 + ).then((navigationMenu) => {
31064 + setStatus(CLASSIC_MENU_CONVERSION_SUCCESS);
31065 + classicMenuBeingConvertedId = null;
31066 + return navigationMenu;
31067 + }).catch((err) => {
31068 + setError(err?.message);
31069 + setStatus(CLASSIC_MENU_CONVERSION_ERROR);
31070 + classicMenuBeingConvertedId = null;
31071 + if (throwOnError) {
31072 + throw new Error(
31073 + (0,external_wp_i18n_namespaceObject.sprintf)(
31074 + // translators: %s: The name of a menu (e.g. Header menu).
31075 + (0,external_wp_i18n_namespaceObject.__)(`Unable to create Navigation Menu "%s".`),
31076 + menuName
31077 + ),
31078 + {
31079 + cause: err
31080 + }
31081 + );
31082 + }
31083 + });
31084 + },
31085 + [convertClassicMenuToBlockMenu, throwOnError]
31086 + );
31087 + return {
31088 + convert,
31089 + status,
31090 + error
31091 + };
31092 + }
31093 + var use_convert_classic_menu_to_block_menu_default = useConvertClassicToBlockMenu;
31094 +
31095 +
31096 + ;// ./node_modules/@wordpress/block-library/build-module/template-part/edit/utils/create-template-part-id.js
31097 + function createTemplatePartId(theme, slug) {
31098 + return theme && slug ? theme + "//" + slug : null;
31099 + }
31100 +
31101 +
31102 + ;// ./node_modules/@wordpress/icons/build-module/library/header.js
31103 +
31104 +
31105 + var header_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M18.5 10.5H10v8h8a.5.5 0 00.5-.5v-7.5zm-10 0h-3V18a.5.5 0 00.5.5h2.5v-8zM6 4h12a2 2 0 012 2v12a2 2 0 01-2 2H6a2 2 0 01-2-2V6a2 2 0 012-2z" }) });
31106 +
31107 +
31108 + ;// ./node_modules/@wordpress/icons/build-module/library/footer.js
31109 +
31110 +
31111 + var footer_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
31112 + external_wp_primitives_namespaceObject.Path,
31113 + {
31114 + fillRule: "evenodd",
31115 + d: "M18 5.5h-8v8h8.5V6a.5.5 0 00-.5-.5zm-9.5 8h-3V6a.5.5 0 01.5-.5h2.5v8zM6 4h12a2 2 0 012 2v12a2 2 0 01-2 2H6a2 2 0 01-2-2V6a2 2 0 012-2z"
31116 + }
31117 + ) });
31118 +
31119 +
31120 + ;// ./node_modules/@wordpress/icons/build-module/library/sidebar.js
31121 +
31122 +
31123 + var sidebar_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M18 5.5H6a.5.5 0 00-.5.5v3h13V6a.5.5 0 00-.5-.5zm.5 5H10v8h8a.5.5 0 00.5-.5v-7.5zM6 4h12a2 2 0 012 2v12a2 2 0 01-2 2H6a2 2 0 01-2-2V6a2 2 0 012-2z" }) });
31124 +
31125 +
31126 + ;// ./node_modules/@wordpress/icons/build-module/library/symbol-filled.js
31127 +
31128 +
31129 + var symbol_filled_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M21.3 10.8l-5.6-5.6c-.7-.7-1.8-.7-2.5 0l-5.6 5.6c-.7.7-.7 1.8 0 2.5l5.6 5.6c.3.3.8.5 1.2.5s.9-.2 1.2-.5l5.6-5.6c.8-.7.8-1.9.1-2.5zm-17.6 1L10 5.5l-1-1-6.3 6.3c-.7.7-.7 1.8 0 2.5L9 19.5l1.1-1.1-6.3-6.3c-.2 0-.2-.2-.1-.3z" }) });
31130 +
31131 +
31132 + ;// ./node_modules/@wordpress/block-library/build-module/template-part/edit/utils/get-template-part-icon.js
31133 +
31134 + const getTemplatePartIcon = (iconName) => {
31135 + if ("header" === iconName) {
31136 + return header_default;
31137 + } else if ("footer" === iconName) {
31138 + return footer_default;
31139 + } else if ("sidebar" === iconName) {
31140 + return sidebar_default;
31141 + }
31142 + return symbol_filled_default;
31143 + };
31144 +
31145 +
31146 + ;// ./node_modules/@wordpress/block-library/build-module/navigation/use-template-part-area-label.js
31147 +
31148 +
31149 +
31150 +
31151 +
31152 + function useTemplatePartAreaLabel(clientId) {
31153 + return (0,external_wp_data_namespaceObject.useSelect)(
31154 + (select) => {
31155 + if (!clientId) {
31156 + return;
31157 + }
31158 + const { getBlock, getBlockParentsByBlockName } = select(external_wp_blockEditor_namespaceObject.store);
31159 + const withAscendingResults = true;
31160 + const parentTemplatePartClientIds = getBlockParentsByBlockName(
31161 + clientId,
31162 + "core/template-part",
31163 + withAscendingResults
31164 + );
31165 + if (!parentTemplatePartClientIds?.length) {
31166 + return;
31167 + }
31168 + const { getCurrentTheme, getEditedEntityRecord } = select(external_wp_coreData_namespaceObject.store);
31169 + const currentTheme = getCurrentTheme();
31170 + const defaultTemplatePartAreas = currentTheme?.default_template_part_areas || [];
31171 + const definedAreas = defaultTemplatePartAreas.map((item) => ({
31172 + ...item,
31173 + icon: getTemplatePartIcon(item.icon)
31174 + }));
31175 + for (const templatePartClientId of parentTemplatePartClientIds) {
31176 + const templatePartBlock = getBlock(templatePartClientId);
31177 + const { theme = currentTheme?.stylesheet, slug } = templatePartBlock.attributes;
31178 + const templatePartEntityId = createTemplatePartId(
31179 + theme,
31180 + slug
31181 + );
31182 + const templatePartEntity = getEditedEntityRecord(
31183 + "postType",
31184 + "wp_template_part",
31185 + templatePartEntityId
31186 + );
31187 + if (templatePartEntity?.area) {
31188 + return definedAreas.find(
31189 + (definedArea) => definedArea.area !== "uncategorized" && definedArea.area === templatePartEntity.area
31190 + )?.label;
31191 + }
31192 + }
31193 + },
31194 + [clientId]
31195 + );
31196 + }
31197 +
31198 +
31199 + ;// ./node_modules/@wordpress/block-library/build-module/navigation/edit/use-generate-default-navigation-title.js
31200 +
31201 +
31202 +
31203 +
31204 +
31205 +
31206 + const DRAFT_MENU_PARAMS = [
31207 + "postType",
31208 + "wp_navigation",
31209 + { status: "draft", per_page: -1 }
31210 + ];
31211 + const PUBLISHED_MENU_PARAMS = [
31212 + "postType",
31213 + "wp_navigation",
31214 + { per_page: -1, status: "publish" }
31215 + ];
31216 + function useGenerateDefaultNavigationTitle(clientId) {
31217 + const isDisabled = (0,external_wp_element_namespaceObject.useContext)(external_wp_components_namespaceObject.Disabled.Context);
31218 + const area = useTemplatePartAreaLabel(isDisabled ? void 0 : clientId);
31219 + const registry = (0,external_wp_data_namespaceObject.useRegistry)();
31220 + return (0,external_wp_element_namespaceObject.useCallback)(async () => {
31221 + if (isDisabled) {
31222 + return "";
31223 + }
31224 + const { getEntityRecords } = registry.resolveSelect(external_wp_coreData_namespaceObject.store);
31225 + const [draftNavigationMenus, navigationMenus] = await Promise.all([
31226 + getEntityRecords(...DRAFT_MENU_PARAMS),
31227 + getEntityRecords(...PUBLISHED_MENU_PARAMS)
31228 + ]);
31229 + const title = area ? (0,external_wp_i18n_namespaceObject.sprintf)(
31230 + // translators: %s: the name of a menu (e.g. Header menu).
31231 + (0,external_wp_i18n_namespaceObject.__)("%s menu"),
31232 + area
31233 + ) : (
31234 + // translators: 'menu' as in website navigation menu.
31235 + (0,external_wp_i18n_namespaceObject.__)("Menu")
31236 + );
31237 + const matchingMenuTitleCount = [
31238 + ...draftNavigationMenus,
31239 + ...navigationMenus
31240 + ].reduce(
31241 + (count, menu) => menu?.title?.raw?.startsWith(title) ? count + 1 : count,
31242 + 0
31243 + );
31244 + const titleWithCount = matchingMenuTitleCount > 0 ? `${title} ${matchingMenuTitleCount + 1}` : title;
31245 + return titleWithCount || "";
31246 + }, [isDisabled, area, registry]);
31247 + }
31248 +
31249 +
31250 + ;// ./node_modules/@wordpress/block-library/build-module/navigation/edit/use-create-navigation-menu.js
31251 +
31252 +
31253 +
31254 +
31255 +
31256 + const CREATE_NAVIGATION_MENU_SUCCESS = "success";
31257 + const CREATE_NAVIGATION_MENU_ERROR = "error";
31258 + const CREATE_NAVIGATION_MENU_PENDING = "pending";
31259 + const CREATE_NAVIGATION_MENU_IDLE = "idle";
31260 + function useCreateNavigationMenu(clientId) {
31261 + const [status, setStatus] = (0,external_wp_element_namespaceObject.useState)(CREATE_NAVIGATION_MENU_IDLE);
31262 + const [value, setValue] = (0,external_wp_element_namespaceObject.useState)(null);
31263 + const [error, setError] = (0,external_wp_element_namespaceObject.useState)(null);
31264 + const { saveEntityRecord, editEntityRecord } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_coreData_namespaceObject.store);
31265 + const generateDefaultTitle = useGenerateDefaultNavigationTitle(clientId);
31266 + const create = (0,external_wp_element_namespaceObject.useCallback)(
31267 + async (title = null, blocks = [], postStatus) => {
31268 + if (title && typeof title !== "string") {
31269 + setError(
31270 + "Invalid title supplied when creating Navigation Menu."
31271 + );
31272 + setStatus(CREATE_NAVIGATION_MENU_ERROR);
31273 + throw new Error(
31274 + `Value of supplied title argument was not a string.`
31275 + );
31276 + }
31277 + setStatus(CREATE_NAVIGATION_MENU_PENDING);
31278 + setValue(null);
31279 + setError(null);
31280 + if (!title) {
31281 + title = await generateDefaultTitle().catch((err) => {
31282 + setError(err?.message);
31283 + setStatus(CREATE_NAVIGATION_MENU_ERROR);
31284 + throw new Error(
31285 + "Failed to create title when saving new Navigation Menu.",
31286 + {
31287 + cause: err
31288 + }
31289 + );
31290 + });
31291 + }
31292 + const record = {
31293 + title,
31294 + content: (0,external_wp_blocks_namespaceObject.serialize)(blocks),
31295 + status: postStatus
31296 + };
31297 + return saveEntityRecord("postType", "wp_navigation", record).then((response) => {
31298 + setValue(response);
31299 + setStatus(CREATE_NAVIGATION_MENU_SUCCESS);
31300 + if (postStatus !== "publish") {
31301 + editEntityRecord(
31302 + "postType",
31303 + "wp_navigation",
31304 + response.id,
31305 + { status: "publish" }
31306 + );
31307 + }
31308 + return response;
31309 + }).catch((err) => {
31310 + setError(err?.message);
31311 + setStatus(CREATE_NAVIGATION_MENU_ERROR);
31312 + throw new Error("Unable to save new Navigation Menu", {
31313 + cause: err
31314 + });
31315 + });
31316 + },
31317 + [saveEntityRecord, editEntityRecord, generateDefaultTitle]
31318 + );
31319 + return {
31320 + create,
31321 + status,
31322 + value,
31323 + error,
31324 + isIdle: status === CREATE_NAVIGATION_MENU_IDLE,
31325 + isPending: status === CREATE_NAVIGATION_MENU_PENDING,
31326 + isSuccess: status === CREATE_NAVIGATION_MENU_SUCCESS,
31327 + isError: status === CREATE_NAVIGATION_MENU_ERROR
31328 + };
31329 + }
31330 +
31331 +
31332 + ;// ./node_modules/@wordpress/block-library/build-module/navigation/edit/use-inner-blocks.js
31333 +
31334 +
31335 + const use_inner_blocks_EMPTY_ARRAY = [];
31336 + function useInnerBlocks(clientId) {
31337 + return (0,external_wp_data_namespaceObject.useSelect)(
31338 + (select) => {
31339 + const { getBlock, getBlocks, hasSelectedInnerBlock } = select(external_wp_blockEditor_namespaceObject.store);
31340 + const _uncontrolledInnerBlocks = getBlock(clientId).innerBlocks;
31341 + const _hasUncontrolledInnerBlocks = !!_uncontrolledInnerBlocks?.length;
31342 + const _controlledInnerBlocks = _hasUncontrolledInnerBlocks ? use_inner_blocks_EMPTY_ARRAY : getBlocks(clientId);
31343 + return {
31344 + innerBlocks: _hasUncontrolledInnerBlocks ? _uncontrolledInnerBlocks : _controlledInnerBlocks,
31345 + hasUncontrolledInnerBlocks: _hasUncontrolledInnerBlocks,
31346 + uncontrolledInnerBlocks: _uncontrolledInnerBlocks,
31347 + controlledInnerBlocks: _controlledInnerBlocks,
31348 + isInnerBlockSelected: hasSelectedInnerBlock(clientId, true)
31349 + };
31350 + },
31351 + [clientId]
31352 + );
31353 + }
31354 +
31355 +
31356 + ;// ./node_modules/@wordpress/block-library/build-module/navigation/edit/utils.js
31357 +
31358 + function getComputedStyle(node) {
31359 + return node.ownerDocument.defaultView.getComputedStyle(node);
31360 + }
31361 + function detectColors(colorsDetectionElement, setColor, setBackground) {
31362 + if (!colorsDetectionElement) {
31363 + return;
31364 + }
31365 + setColor(getComputedStyle(colorsDetectionElement).color);
31366 + let backgroundColorNode = colorsDetectionElement;
31367 + let backgroundColor = getComputedStyle(backgroundColorNode).backgroundColor;
31368 + while (backgroundColor === "rgba(0, 0, 0, 0)" && backgroundColorNode.parentNode && backgroundColorNode.parentNode.nodeType === backgroundColorNode.parentNode.ELEMENT_NODE) {
31369 + backgroundColorNode = backgroundColorNode.parentNode;
31370 + backgroundColor = getComputedStyle(backgroundColorNode).backgroundColor;
31371 + }
31372 + setBackground(backgroundColor);
31373 + }
31374 + function getColors(context, isSubMenu) {
31375 + const {
31376 + textColor,
31377 + customTextColor,
31378 + backgroundColor,
31379 + customBackgroundColor,
31380 + overlayTextColor,
31381 + customOverlayTextColor,
31382 + overlayBackgroundColor,
31383 + customOverlayBackgroundColor,
31384 + style
31385 + } = context;
31386 + const colors = {};
31387 + if (isSubMenu && !!customOverlayTextColor) {
31388 + colors.customTextColor = customOverlayTextColor;
31389 + } else if (isSubMenu && !!overlayTextColor) {
31390 + colors.textColor = overlayTextColor;
31391 + } else if (!!customTextColor) {
31392 + colors.customTextColor = customTextColor;
31393 + } else if (!!textColor) {
31394 + colors.textColor = textColor;
31395 + } else if (!!style?.color?.text) {
31396 + colors.customTextColor = style.color.text;
31397 + }
31398 + if (isSubMenu && !!customOverlayBackgroundColor) {
31399 + colors.customBackgroundColor = customOverlayBackgroundColor;
31400 + } else if (isSubMenu && !!overlayBackgroundColor) {
31401 + colors.backgroundColor = overlayBackgroundColor;
31402 + } else if (!!customBackgroundColor) {
31403 + colors.customBackgroundColor = customBackgroundColor;
31404 + } else if (!!backgroundColor) {
31405 + colors.backgroundColor = backgroundColor;
31406 + } else if (!!style?.color?.background) {
31407 + colors.customTextColor = style.color.background;
31408 + }
31409 + return colors;
31410 + }
31411 + function getNavigationChildBlockProps(innerBlocksColors) {
31412 + return {
31413 + className: dist_clsx("wp-block-navigation__submenu-container", {
31414 + "has-text-color": !!(innerBlocksColors.textColor || innerBlocksColors.customTextColor),
31415 + [`has-${innerBlocksColors.textColor}-color`]: !!innerBlocksColors.textColor,
31416 + "has-background": !!(innerBlocksColors.backgroundColor || innerBlocksColors.customBackgroundColor),
31417 + [`has-${innerBlocksColors.backgroundColor}-background-color`]: !!innerBlocksColors.backgroundColor
31418 + }),
31419 + style: {
31420 + color: innerBlocksColors.customTextColor,
31421 + backgroundColor: innerBlocksColors.customBackgroundColor
31422 + }
31423 + };
31424 + }
31425 +
31426 +
31427 + ;// ./node_modules/@wordpress/block-library/build-module/navigation/edit/manage-menus-button.js
31428 +
31429 +
31430 +
31431 +
31432 + const ManageMenusButton = ({
31433 + className = "",
31434 + disabled,
31435 + isMenuItem = false
31436 + }) => {
31437 + let ComponentName = external_wp_components_namespaceObject.Button;
31438 + if (isMenuItem) {
31439 + ComponentName = external_wp_components_namespaceObject.MenuItem;
31440 + }
31441 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
31442 + ComponentName,
31443 + {
31444 + variant: "link",
31445 + disabled,
31446 + className,
31447 + href: (0,external_wp_url_namespaceObject.addQueryArgs)("edit.php", {
31448 + post_type: "wp_navigation"
31449 + }),
31450 + children: (0,external_wp_i18n_namespaceObject.__)("Manage menus")
31451 + }
31452 + );
31453 + };
31454 + var manage_menus_button_default = ManageMenusButton;
31455 +
31456 +
31457 + ;// ./node_modules/@wordpress/block-library/build-module/navigation/edit/deleted-navigation-warning.js
31458 +
31459 +
31460 +
31461 +
31462 +
31463 + function DeletedNavigationWarning({ onCreateNew, isNotice = false }) {
31464 + const [isButtonDisabled, setIsButtonDisabled] = (0,external_wp_element_namespaceObject.useState)(false);
31465 + const handleButtonClick = () => {
31466 + setIsButtonDisabled(true);
31467 + onCreateNew();
31468 + };
31469 + const message = (0,external_wp_element_namespaceObject.createInterpolateElement)(
31470 + (0,external_wp_i18n_namespaceObject.__)(
31471 + "Navigation Menu has been deleted or is unavailable. <button>Create a new Menu?</button>"
31472 + ),
31473 + {
31474 + button: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
31475 + external_wp_components_namespaceObject.Button,
31476 + {
31477 + __next40pxDefaultSize: true,
31478 + onClick: handleButtonClick,
31479 + variant: "link",
31480 + disabled: isButtonDisabled,
31481 + accessibleWhenDisabled: true
31482 + }
31483 + )
31484 + }
31485 + );
31486 + return isNotice ? /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Notice, { status: "warning", isDismissible: false, children: message }) : /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.Warning, { children: message });
31487 + }
31488 + var deleted_navigation_warning_default = DeletedNavigationWarning;
31489 +
31490 +
31491 + ;// ./node_modules/@wordpress/icons/build-module/library/add-submenu.js
31492 +
31493 +
31494 + var add_submenu_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M2 12c0 3.6 2.4 5.5 6 5.5h.5V19l3-2.5-3-2.5v2H8c-2.5 0-4.5-1.5-4.5-4s2-4.5 4.5-4.5h3.5V6H8c-3.6 0-6 2.4-6 6zm19.5-1h-8v1.5h8V11zm0 5h-8v1.5h8V16zm0-10h-8v1.5h8V6z" }) });
31495 +
31496 +
31497 + ;// ./node_modules/@wordpress/icons/build-module/library/chevron-up.js
31498 +
31499 +
31500 + var chevron_up_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M6.5 12.4L12 8l5.5 4.4-.9 1.2L12 10l-4.5 3.6-1-1.2z" }) });
31501 +
31502 +
31503 + ;// ./node_modules/@wordpress/block-library/build-module/navigation/edit/leaf-more-menu.js
31504 +
31505 +
31506 +
31507 +
31508 +
31509 +
31510 +
31511 +
31512 + const POPOVER_PROPS = {
31513 + className: "block-editor-block-settings-menu__popover",
31514 + placement: "bottom-start"
31515 + };
31516 + const BLOCKS_THAT_CAN_BE_CONVERTED_TO_SUBMENU = [
31517 + "core/navigation-link",
31518 + "core/navigation-submenu"
31519 + ];
31520 + function AddSubmenuItem({
31521 + block,
31522 + onClose,
31523 + expandedState,
31524 + expand,
31525 + setInsertedBlock
31526 + }) {
31527 + const { insertBlock, replaceBlock, replaceInnerBlocks } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_blockEditor_namespaceObject.store);
31528 + const clientId = block.clientId;
31529 + const isDisabled = !BLOCKS_THAT_CAN_BE_CONVERTED_TO_SUBMENU.includes(
31530 + block.name
31531 + );
31532 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
31533 + external_wp_components_namespaceObject.MenuItem,
31534 + {
31535 + icon: add_submenu_default,
31536 + disabled: isDisabled,
31537 + onClick: () => {
31538 + const updateSelectionOnInsert = false;
31539 + const newLink = (0,external_wp_blocks_namespaceObject.createBlock)(
31540 + constants_DEFAULT_BLOCK.name,
31541 + constants_DEFAULT_BLOCK.attributes
31542 + );
31543 + if (block.name === "core/navigation-submenu") {
31544 + insertBlock(
31545 + newLink,
31546 + block.innerBlocks.length,
31547 + clientId,
31548 + updateSelectionOnInsert
31549 + );
31550 + } else {
31551 + const newSubmenu = (0,external_wp_blocks_namespaceObject.createBlock)(
31552 + "core/navigation-submenu",
31553 + block.attributes,
31554 + block.innerBlocks
31555 + );
31556 + replaceBlock(clientId, newSubmenu);
31557 + replaceInnerBlocks(
31558 + newSubmenu.clientId,
31559 + [newLink],
31560 + updateSelectionOnInsert
31561 + );
31562 + }
31563 + setInsertedBlock(newLink);
31564 + if (!expandedState[block.clientId]) {
31565 + expand(block.clientId);
31566 + }
31567 + onClose();
31568 + },
31569 + children: (0,external_wp_i18n_namespaceObject.__)("Add submenu link")
31570 + }
31571 + );
31572 + }
31573 + function LeafMoreMenu(props) {
31574 + const { block } = props;
31575 + const { clientId } = block;
31576 + const { moveBlocksDown, moveBlocksUp, removeBlocks } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_blockEditor_namespaceObject.store);
31577 + const removeLabel = (0,external_wp_i18n_namespaceObject.sprintf)(
31578 + /* translators: %s: block name */
31579 + (0,external_wp_i18n_namespaceObject.__)("Remove %s"),
31580 + (0,external_wp_blockEditor_namespaceObject.BlockTitle)({ clientId, maximumLength: 25 })
31581 + );
31582 + const rootClientId = (0,external_wp_data_namespaceObject.useSelect)(
31583 + (select) => {
31584 + const { getBlockRootClientId } = select(external_wp_blockEditor_namespaceObject.store);
31585 + return getBlockRootClientId(clientId);
31586 + },
31587 + [clientId]
31588 + );
31589 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
31590 + external_wp_components_namespaceObject.DropdownMenu,
31591 + {
31592 + icon: more_vertical_default,
31593 + label: (0,external_wp_i18n_namespaceObject.__)("Options"),
31594 + className: "block-editor-block-settings-menu",
31595 + popoverProps: POPOVER_PROPS,
31596 + noIcons: true,
31597 + ...props,
31598 + children: ({ onClose }) => /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
31599 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.MenuGroup, { children: [
31600 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
31601 + external_wp_components_namespaceObject.MenuItem,
31602 + {
31603 + icon: chevron_up_default,
31604 + onClick: () => {
31605 + moveBlocksUp([clientId], rootClientId);
31606 + onClose();
31607 + },
31608 + children: (0,external_wp_i18n_namespaceObject.__)("Move up")
31609 + }
31610 + ),
31611 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
31612 + external_wp_components_namespaceObject.MenuItem,
31613 + {
31614 + icon: chevron_down_default,
31615 + onClick: () => {
31616 + moveBlocksDown([clientId], rootClientId);
31617 + onClose();
31618 + },
31619 + children: (0,external_wp_i18n_namespaceObject.__)("Move down")
31620 + }
31621 + ),
31622 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
31623 + AddSubmenuItem,
31624 + {
31625 + block,
31626 + onClose,
31627 + expandedState: props.expandedState,
31628 + expand: props.expand,
31629 + setInsertedBlock: props.setInsertedBlock
31630 + }
31631 + )
31632 + ] }),
31633 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.MenuGroup, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
31634 + external_wp_components_namespaceObject.MenuItem,
31635 + {
31636 + onClick: () => {
31637 + removeBlocks([clientId], false);
31638 + onClose();
31639 + },
31640 + children: removeLabel
31641 + }
31642 + ) })
31643 + ] })
31644 + }
31645 + );
31646 + }
31647 +
31648 +
31649 + ;// ./node_modules/@wordpress/icons/build-module/library/plus.js
31650 +
31651 +
31652 + var plus_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M11 12.5V17.5H12.5V12.5H17.5V11H12.5V6H11V11H6V12.5H11Z" }) });
31653 +
31654 +
31655 + ;// ./node_modules/@wordpress/icons/build-module/library/chevron-right-small.js
31656 +
31657 +
31658 + var chevron_right_small_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M10.8622 8.04053L14.2805 12.0286L10.8622 16.0167L9.72327 15.0405L12.3049 12.0286L9.72327 9.01672L10.8622 8.04053Z" }) });
31659 +
31660 +
31661 + ;// ./node_modules/@wordpress/icons/build-module/library/chevron-left-small.js
31662 +
31663 +
31664 + var chevron_left_small_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "m13.1 16-3.4-4 3.4-4 1.1 1-2.6 3 2.6 3-1.1 1z" }) });
31665 +
31666 +
31667 + ;// ./node_modules/@wordpress/block-library/build-module/navigation-link/link-ui/dialog-wrapper.js
31668 +
31669 +
31670 +
31671 +
31672 +
31673 + function BackButton({ className, onBack }) {
31674 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
31675 + external_wp_components_namespaceObject.Button,
31676 + {
31677 + className,
31678 + icon: (0,external_wp_i18n_namespaceObject.isRTL)() ? chevron_right_small_default : chevron_left_small_default,
31679 + onClick: (e) => {
31680 + e.preventDefault();
31681 + onBack();
31682 + },
31683 + size: "small",
31684 + children: (0,external_wp_i18n_namespaceObject.__)("Back")
31685 + }
31686 + );
31687 + }
31688 + function DialogWrapper({ className, title, description, onBack, children }) {
31689 + const dialogTitleId = (0,external_wp_compose_namespaceObject.useInstanceId)(
31690 + DialogWrapper,
31691 + "link-ui-dialog-title"
31692 + );
31693 + const dialogDescriptionId = (0,external_wp_compose_namespaceObject.useInstanceId)(
31694 + DialogWrapper,
31695 + "link-ui-dialog-description"
31696 + );
31697 + const focusOnMountRef = (0,external_wp_compose_namespaceObject.useFocusOnMount)("firstElement");
31698 + const backButtonClassName = `${className}__back`;
31699 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(
31700 + "div",
31701 + {
31702 + className,
31703 + role: "dialog",
31704 + "aria-labelledby": dialogTitleId,
31705 + "aria-describedby": dialogDescriptionId,
31706 + ref: focusOnMountRef,
31707 + children: [
31708 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.VisuallyHidden, { children: [
31709 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("h2", { id: dialogTitleId, children: title }),
31710 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("p", { id: dialogDescriptionId, children: description })
31711 + ] }),
31712 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(BackButton, { className: backButtonClassName, onBack }),
31713 + children
31714 + ]
31715 + }
31716 + );
31717 + }
31718 + var dialog_wrapper_default = DialogWrapper;
31719 +
31720 +
31721 + ;// ./node_modules/@wordpress/block-library/build-module/navigation-link/link-ui/page-creator.js
31722 +
31723 +
31724 +
31725 +
31726 +
31727 +
31728 +
31729 +
31730 + function LinkUIPageCreator({
31731 + postType,
31732 + onBack,
31733 + onPageCreated,
31734 + initialTitle = ""
31735 + }) {
31736 + const [title, setTitle] = (0,external_wp_element_namespaceObject.useState)(initialTitle);
31737 + const [shouldPublish, setShouldPublish] = (0,external_wp_element_namespaceObject.useState)(false);
31738 + const isTitleValid = title.trim().length > 0;
31739 + const { lastError, isSaving } = (0,external_wp_data_namespaceObject.useSelect)(
31740 + (select) => ({
31741 + lastError: select(external_wp_coreData_namespaceObject.store).getLastEntitySaveError(
31742 + "postType",
31743 + postType
31744 + ),
31745 + isSaving: select(external_wp_coreData_namespaceObject.store).isSavingEntityRecord(
31746 + "postType",
31747 + postType
31748 + )
31749 + }),
31750 + [postType]
31751 + );
31752 + const { saveEntityRecord } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_coreData_namespaceObject.store);
31753 + async function createPage(event) {
31754 + event.preventDefault();
31755 + if (isSaving || !isTitleValid) {
31756 + return;
31757 + }
31758 + try {
31759 + const savedRecord = await saveEntityRecord(
31760 + "postType",
31761 + postType,
31762 + {
31763 + title,
31764 + status: shouldPublish ? "publish" : "draft"
31765 + },
31766 + { throwOnError: true }
31767 + );
31768 + if (savedRecord) {
31769 + const pageLink = {
31770 + id: savedRecord.id,
31771 + type: postType,
31772 + title: (0,external_wp_htmlEntities_namespaceObject.decodeEntities)(savedRecord.title.rendered),
31773 + url: savedRecord.link,
31774 + kind: "post-type"
31775 + };
31776 + onPageCreated(pageLink);
31777 + }
31778 + } catch (error) {
31779 + }
31780 + }
31781 + const isSubmitDisabled = isSaving || !isTitleValid;
31782 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
31783 + dialog_wrapper_default,
31784 + {
31785 + className: "link-ui-page-creator",
31786 + title: (0,external_wp_i18n_namespaceObject.__)("Create page"),
31787 + description: (0,external_wp_i18n_namespaceObject.__)("Create a new page to add to your Navigation."),
31788 + onBack,
31789 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalVStack, { className: "link-ui-page-creator__inner", spacing: 4, children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("form", { onSubmit: createPage, children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.__experimentalVStack, { spacing: 4, children: [
31790 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
31791 + external_wp_components_namespaceObject.TextControl,
31792 + {
31793 + __next40pxDefaultSize: true,
31794 + __nextHasNoMarginBottom: true,
31795 + label: (0,external_wp_i18n_namespaceObject.__)("Title"),
31796 + onChange: setTitle,
31797 + placeholder: (0,external_wp_i18n_namespaceObject.__)("No title"),
31798 + value: title
31799 + }
31800 + ),
31801 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
31802 + external_wp_components_namespaceObject.CheckboxControl,
31803 + {
31804 + __nextHasNoMarginBottom: true,
31805 + label: (0,external_wp_i18n_namespaceObject.__)("Publish immediately"),
31806 + help: (0,external_wp_i18n_namespaceObject.__)(
31807 + "If unchecked, the page will be created as a draft."
31808 + ),
31809 + checked: shouldPublish,
31810 + onChange: setShouldPublish
31811 + }
31812 + ),
31813 + lastError && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Notice, { status: "error", isDismissible: false, children: lastError.message }),
31814 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.__experimentalHStack, { spacing: 2, justify: "flex-end", children: [
31815 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
31816 + external_wp_components_namespaceObject.Button,
31817 + {
31818 + __next40pxDefaultSize: true,
31819 + variant: "tertiary",
31820 + onClick: onBack,
31821 + disabled: isSaving,
31822 + accessibleWhenDisabled: true,
31823 + children: (0,external_wp_i18n_namespaceObject.__)("Cancel")
31824 + }
31825 + ),
31826 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
31827 + external_wp_components_namespaceObject.Button,
31828 + {
31829 + __next40pxDefaultSize: true,
31830 + variant: "primary",
31831 + type: "submit",
31832 + isBusy: isSaving,
31833 + "aria-disabled": isSubmitDisabled,
31834 + children: (0,external_wp_i18n_namespaceObject.__)("Create page")
31835 + }
31836 + )
31837 + ] })
31838 + ] }) }) })
31839 + }
31840 + );
31841 + }
31842 +
31843 +
31844 + ;// ./node_modules/@wordpress/block-library/build-module/navigation-link/link-ui/block-inserter.js
31845 +
31846 +
31847 +
31848 +
31849 +
31850 +
31851 + const { PrivateQuickInserter: QuickInserter } = unlock(
31852 + external_wp_blockEditor_namespaceObject.privateApis
31853 + );
31854 + function LinkUIBlockInserter({ clientId, onBack, onBlockInsert }) {
31855 + const { rootBlockClientId } = (0,external_wp_data_namespaceObject.useSelect)(
31856 + (select) => {
31857 + const { getBlockRootClientId } = select(external_wp_blockEditor_namespaceObject.store);
31858 + return {
31859 + rootBlockClientId: getBlockRootClientId(clientId)
31860 + };
31861 + },
31862 + [clientId]
31863 + );
31864 + if (!clientId) {
31865 + return null;
31866 + }
31867 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
31868 + dialog_wrapper_default,
31869 + {
31870 + className: "link-ui-block-inserter",
31871 + title: (0,external_wp_i18n_namespaceObject.__)("Add block"),
31872 + description: (0,external_wp_i18n_namespaceObject.__)("Choose a block to add to your Navigation."),
31873 + onBack,
31874 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
31875 + QuickInserter,
31876 + {
31877 + rootClientId: rootBlockClientId,
31878 + clientId,
31879 + isAppender: false,
31880 + prioritizePatterns: false,
31881 + selectBlockOnInsert: !onBlockInsert,
31882 + onSelect: onBlockInsert ? onBlockInsert : void 0,
31883 + hasSearch: false
31884 + }
31885 + )
31886 + }
31887 + );
31888 + }
31889 + var block_inserter_default = LinkUIBlockInserter;
31890 +
31891 +
31892 + ;// ./node_modules/@wordpress/block-library/build-module/navigation-link/link-ui/index.js
31893 +
31894 +
31895 +
31896 +
31897 +
31898 +
31899 +
31900 +
31901 +
31902 +
31903 +
31904 +
31905 + function getSuggestionsQuery(type, kind) {
31906 + switch (type) {
31907 + case "post":
31908 + case "page":
31909 + return { type: "post", subtype: type };
31910 + case "category":
31911 + return { type: "term", subtype: "category" };
31912 + case "tag":
31913 + return { type: "term", subtype: "post_tag" };
31914 + case "post_format":
31915 + return { type: "post-format" };
31916 + default:
31917 + if (kind === "taxonomy") {
31918 + return { type: "term", subtype: type };
31919 + }
31920 + if (kind === "post-type") {
31921 + return { type: "post", subtype: type };
31922 + }
31923 + return {
31924 + // for custom link which has no type
31925 + // always show pages as initial suggestions
31926 + initialSuggestionsSearchOptions: {
31927 + type: "post",
31928 + subtype: "page",
31929 + perPage: 20
31930 + }
31931 + };
31932 + }
31933 + }
31934 + function UnforwardedLinkUI(props, ref) {
31935 + const { label, url, opensInNewTab, type, kind, id } = props.link;
31936 + const { clientId } = props;
31937 + const postType = type || "page";
31938 + const [addingBlock, setAddingBlock] = (0,external_wp_element_namespaceObject.useState)(false);
31939 + const [addingPage, setAddingPage] = (0,external_wp_element_namespaceObject.useState)(false);
31940 + const [focusAddBlockButton, setFocusAddBlockButton] = (0,external_wp_element_namespaceObject.useState)(false);
31941 + const [focusAddPageButton, setFocusAddPageButton] = (0,external_wp_element_namespaceObject.useState)(false);
31942 + const permissions = (0,external_wp_coreData_namespaceObject.useResourcePermissions)({
31943 + kind: "postType",
31944 + name: postType
31945 + });
31946 + const { isBoundEntityAvailable } = useEntityBinding({
31947 + clientId,
31948 + attributes: props.link
31949 + });
31950 + const link = (0,external_wp_element_namespaceObject.useMemo)(
31951 + () => ({
31952 + url,
31953 + opensInNewTab,
31954 + title: label && (0,external_wp_dom_namespaceObject.__unstableStripHTML)(label),
31955 + kind,
31956 + type,
31957 + id
31958 + }),
31959 + [label, opensInNewTab, url, kind, type, id]
31960 + );
31961 + const handlePageCreated = (pageLink) => {
31962 + props.onChange(pageLink);
31963 + setAddingPage(false);
31964 + };
31965 + const dialogTitleId = (0,external_wp_compose_namespaceObject.useInstanceId)(
31966 + LinkUI,
31967 + "link-ui-link-control__title"
31968 + );
31969 + const dialogDescriptionId = (0,external_wp_compose_namespaceObject.useInstanceId)(
31970 + LinkUI,
31971 + "link-ui-link-control__description"
31972 + );
31973 + const blockEditingMode = (0,external_wp_blockEditor_namespaceObject.useBlockEditingMode)();
31974 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(
31975 + external_wp_components_namespaceObject.Popover,
31976 + {
31977 + ref,
31978 + placement: "bottom",
31979 + onClose: props.onClose,
31980 + anchor: props.anchor,
31981 + shift: true,
31982 + children: [
31983 + !addingBlock && !addingPage && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(
31984 + "div",
31985 + {
31986 + role: "dialog",
31987 + "aria-labelledby": dialogTitleId,
31988 + "aria-describedby": dialogDescriptionId,
31989 + children: [
31990 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.VisuallyHidden, { children: [
31991 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("h2", { id: dialogTitleId, children: (0,external_wp_i18n_namespaceObject.__)("Add link") }),
31992 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("p", { id: dialogDescriptionId, children: (0,external_wp_i18n_namespaceObject.__)(
31993 + "Search for and add a link to your Navigation."
31994 + ) })
31995 + ] }),
31996 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
31997 + external_wp_blockEditor_namespaceObject.LinkControl,
31998 + {
31999 + hasTextControl: true,
32000 + hasRichPreviews: true,
32001 + value: link,
32002 + showInitialSuggestions: true,
32003 + withCreateSuggestion: false,
32004 + noDirectEntry: !!type,
32005 + noURLSuggestion: !!type,
32006 + suggestionsQuery: getSuggestionsQuery(type, kind),
32007 + onChange: props.onChange,
32008 + onRemove: props.onRemove,
32009 + onCancel: props.onCancel,
32010 + handleEntities: isBoundEntityAvailable,
32011 + renderControlBottom: () => {
32012 + if (link?.url?.length) {
32013 + return null;
32014 + }
32015 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
32016 + LinkUITools,
32017 + {
32018 + focusAddBlockButton,
32019 + focusAddPageButton,
32020 + setAddingBlock: () => {
32021 + setAddingBlock(true);
32022 + setFocusAddBlockButton(false);
32023 + },
32024 + setAddingPage: () => {
32025 + setAddingPage(true);
32026 + setFocusAddPageButton(false);
32027 + },
32028 + canAddPage: permissions?.canCreate && type === "page",
32029 + canAddBlock: blockEditingMode === "default"
32030 + }
32031 + );
32032 + }
32033 + }
32034 + )
32035 + ]
32036 + }
32037 + ),
32038 + addingBlock && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
32039 + block_inserter_default,
32040 + {
32041 + clientId: props.clientId,
32042 + onBack: () => {
32043 + setAddingBlock(false);
32044 + setFocusAddBlockButton(true);
32045 + setFocusAddPageButton(false);
32046 + },
32047 + onBlockInsert: props?.onBlockInsert
32048 + }
32049 + ),
32050 + addingPage && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
32051 + LinkUIPageCreator,
32052 + {
32053 + postType,
32054 + onBack: () => {
32055 + setAddingPage(false);
32056 + setFocusAddPageButton(true);
32057 + setFocusAddBlockButton(false);
32058 + },
32059 + onPageCreated: handlePageCreated,
32060 + initialTitle: link?.url || ""
32061 + }
32062 + )
32063 + ]
32064 + }
32065 + );
32066 + }
32067 + const LinkUI = (0,external_wp_element_namespaceObject.forwardRef)(UnforwardedLinkUI);
32068 + const LinkUITools = ({
32069 + setAddingBlock,
32070 + setAddingPage,
32071 + focusAddBlockButton,
32072 + focusAddPageButton,
32073 + canAddPage,
32074 + canAddBlock
32075 + }) => {
32076 + const blockInserterAriaRole = "listbox";
32077 + const addBlockButtonRef = (0,external_wp_element_namespaceObject.useRef)();
32078 + const addPageButtonRef = (0,external_wp_element_namespaceObject.useRef)();
32079 + (0,external_wp_element_namespaceObject.useEffect)(() => {
32080 + if (focusAddBlockButton) {
32081 + addBlockButtonRef.current?.focus();
32082 + }
32083 + }, [focusAddBlockButton]);
32084 + (0,external_wp_element_namespaceObject.useEffect)(() => {
32085 + if (focusAddPageButton) {
32086 + addPageButtonRef.current?.focus();
32087 + }
32088 + }, [focusAddPageButton]);
32089 + if (!canAddPage && !canAddBlock) {
32090 + return null;
32091 + }
32092 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.__experimentalVStack, { spacing: 0, className: "link-ui-tools", children: [
32093 + canAddPage && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
32094 + external_wp_components_namespaceObject.Button,
32095 + {
32096 + __next40pxDefaultSize: true,
32097 + ref: addPageButtonRef,
32098 + icon: plus_default,
32099 + onClick: (e) => {
32100 + e.preventDefault();
32101 + setAddingPage(true);
32102 + },
32103 + "aria-haspopup": blockInserterAriaRole,
32104 + children: (0,external_wp_i18n_namespaceObject.__)("Create page")
32105 + }
32106 + ),
32107 + canAddBlock && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
32108 + external_wp_components_namespaceObject.Button,
32109 + {
32110 + __next40pxDefaultSize: true,
32111 + ref: addBlockButtonRef,
32112 + icon: plus_default,
32113 + onClick: (e) => {
32114 + e.preventDefault();
32115 + setAddingBlock(true);
32116 + },
32117 + "aria-haspopup": blockInserterAriaRole,
32118 + children: (0,external_wp_i18n_namespaceObject.__)("Add block")
32119 + }
32120 + )
32121 + ] });
32122 + };
32123 + var link_ui_default = (/* unused pure expression or super */ null && (LinkUITools));
32124 +
32125 +
32126 + ;// external ["wp","escapeHtml"]
32127 + const external_wp_escapeHtml_namespaceObject = window["wp"]["escapeHtml"];
32128 + ;// ./node_modules/@wordpress/block-library/build-module/navigation-link/shared/update-attributes.js
32129 +
32130 +
32131 + const shouldSeverEntityLink = (originalUrl, newUrl) => {
32132 + if (!originalUrl || !newUrl) {
32133 + return false;
32134 + }
32135 + const normalizePath = (path) => {
32136 + if (!path) {
32137 + return "";
32138 + }
32139 + return path.replace(/\/+$/, "");
32140 + };
32141 + const createUrlObject = (url, baseUrl = null) => {
32142 + try {
32143 + const base = baseUrl || (typeof window !== "undefined" ? window.location.origin : "https://wordpress.org");
32144 + return new URL(url, base);
32145 + } catch (error) {
32146 + return null;
32147 + }
32148 + };
32149 + const originalUrlObj = createUrlObject(originalUrl);
32150 + if (!originalUrlObj) {
32151 + return true;
32152 + }
32153 + const newUrlObj = createUrlObject(newUrl, originalUrl);
32154 + if (!newUrlObj) {
32155 + return true;
32156 + }
32157 + const originalHostname = originalUrlObj.hostname;
32158 + const newHostname = newUrlObj.hostname;
32159 + const originalPath = normalizePath((0,external_wp_url_namespaceObject.getPath)(originalUrlObj.toString()));
32160 + const newPath = normalizePath((0,external_wp_url_namespaceObject.getPath)(newUrlObj.toString()));
32161 + if (originalHostname !== newHostname || originalPath !== newPath) {
32162 + return true;
32163 + }
32164 + const originalP = originalUrlObj.searchParams.get("p");
32165 + const newP = newUrlObj.searchParams.get("p");
32166 + if (originalP && newP && originalP !== newP) {
32167 + return true;
32168 + }
32169 + const originalPageId = originalUrlObj.searchParams.get("page_id");
32170 + const newPageId = newUrlObj.searchParams.get("page_id");
32171 + if (originalPageId && newPageId && originalPageId !== newPageId) {
32172 + return true;
32173 + }
32174 + if (originalP && newPageId || originalPageId && newP) {
32175 + return true;
32176 + }
32177 + return false;
32178 + };
32179 + const updateAttributes = (updatedValue = {}, setAttributes, blockAttributes = {}) => {
32180 + const {
32181 + label: originalLabel = "",
32182 + kind: originalKind = "",
32183 + type: originalType = ""
32184 + } = blockAttributes;
32185 + const {
32186 + title: newLabel = "",
32187 + // the title of any provided Post.
32188 + label: newLabelFromLabel = "",
32189 + // alternative to title
32190 + url: newUrl,
32191 + opensInNewTab,
32192 + id: newID,
32193 + kind: newKind = originalKind,
32194 + type: newType = originalType
32195 + } = updatedValue;
32196 + const finalNewLabel = newLabel || newLabelFromLabel;
32197 + const newLabelWithoutHttp = finalNewLabel.replace(/http(s?):\/\//gi, "");
32198 + const newUrlWithoutHttp = newUrl?.replace(/http(s?):\/\//gi, "") ?? "";
32199 + const useNewLabel = finalNewLabel && finalNewLabel !== originalLabel && // LinkControl without the title field relies
32200 + // on the check below. Specifically, it assumes that
32201 + // the URL is the same as a title.
32202 + // This logic a) looks suspicious and b) should really
32203 + // live in the LinkControl and not here. It's a great
32204 + // candidate for future refactoring.
32205 + newLabelWithoutHttp !== newUrlWithoutHttp;
32206 + const label = useNewLabel ? (0,external_wp_escapeHtml_namespaceObject.escapeHTML)(finalNewLabel) : originalLabel || (0,external_wp_escapeHtml_namespaceObject.escapeHTML)(newUrlWithoutHttp);
32207 + const type = newType === "post_tag" ? "tag" : newType.replace("-", "_");
32208 + const isBuiltInType = ["post", "page", "tag", "category"].indexOf(type) > -1;
32209 + const isCustomLink = !newKind && !isBuiltInType || newKind === "custom";
32210 + const kind = isCustomLink ? "custom" : newKind;
32211 + const attributes = {
32212 + // Passed `url` may already be encoded. To prevent double encoding, decodeURI is executed to revert to the original string.
32213 + ...newUrl !== void 0 ? { url: newUrl ? encodeURI((0,external_wp_url_namespaceObject.safeDecodeURI)(newUrl)) : newUrl } : {},
32214 + ...label && { label },
32215 + ...void 0 !== opensInNewTab && { opensInNewTab },
32216 + ...kind && { kind },
32217 + ...type && type !== "URL" && { type }
32218 + };
32219 + if (newUrl && !newID && blockAttributes.id) {
32220 + const shouldSever = shouldSeverEntityLink(
32221 + blockAttributes.url,
32222 + newUrl
32223 + );
32224 + if (shouldSever) {
32225 + attributes.id = void 0;
32226 + attributes.kind = "custom";
32227 + attributes.type = "custom";
32228 + }
32229 + } else if (newID && Number.isInteger(newID)) {
32230 + attributes.id = newID;
32231 + } else if (blockAttributes.id) {
32232 + attributes.kind = kind;
32233 + attributes.type = type;
32234 + }
32235 + setAttributes(attributes);
32236 + const finalId = "id" in attributes ? attributes.id : blockAttributes.id;
32237 + const finalKind = "kind" in attributes ? attributes.kind : blockAttributes.kind;
32238 + return {
32239 + isEntityLink: !!finalId && finalKind !== "custom",
32240 + attributes
32241 + // Return the computed attributes object
32242 + };
32243 + };
32244 +
32245 +
32246 + ;// ./node_modules/@wordpress/block-library/build-module/navigation/edit/menu-inspector-controls.js
32247 +
32248 +
32249 +
32250 +
32251 +
32252 +
32253 +
32254 +
32255 +
32256 +
32257 +
32258 + const actionLabel = (
32259 + /* translators: %s: The name of a menu. */
32260 + (0,external_wp_i18n_namespaceObject.__)("Switch to '%s'")
32261 + );
32262 + const BLOCKS_WITH_LINK_UI_SUPPORT = [
32263 + "core/navigation-link",
32264 + "core/navigation-submenu"
32265 + ];
32266 + const { PrivateListView } = unlock(external_wp_blockEditor_namespaceObject.privateApis);
32267 + function AdditionalBlockContent({ block, insertedBlock, setInsertedBlock }) {
32268 + const { updateBlockAttributes, removeBlock } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_blockEditor_namespaceObject.store);
32269 + const supportsLinkControls = BLOCKS_WITH_LINK_UI_SUPPORT?.includes(
32270 + insertedBlock?.name
32271 + );
32272 + const blockWasJustInserted = insertedBlock?.clientId === block.clientId;
32273 + const showLinkControls = supportsLinkControls && blockWasJustInserted;
32274 + const { createBinding, clearBinding } = useEntityBinding({
32275 + clientId: insertedBlock?.clientId,
32276 + attributes: insertedBlock?.attributes || {}
32277 + });
32278 + if (!showLinkControls) {
32279 + return null;
32280 + }
32281 + const cleanupInsertedBlock = () => {
32282 + const shouldAutoSelectBlock = false;
32283 + if (!insertedBlock?.attributes?.url && insertedBlock?.clientId) {
32284 + removeBlock(insertedBlock.clientId, shouldAutoSelectBlock);
32285 + }
32286 + setInsertedBlock(null);
32287 + };
32288 + const setInsertedBlockAttributes = (_insertedBlockClientId) => (_updatedAttributes) => {
32289 + if (!_insertedBlockClientId) {
32290 + return;
32291 + }
32292 + updateBlockAttributes(_insertedBlockClientId, _updatedAttributes);
32293 + };
32294 + const handleSetInsertedBlock = (newBlock) => {
32295 + const shouldAutoSelectBlock = false;
32296 + if (insertedBlock?.clientId && newBlock) {
32297 + removeBlock(insertedBlock.clientId, shouldAutoSelectBlock);
32298 + }
32299 + setInsertedBlock(newBlock);
32300 + };
32301 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
32302 + LinkUI,
32303 + {
32304 + clientId: insertedBlock?.clientId,
32305 + link: insertedBlock?.attributes,
32306 + onBlockInsert: handleSetInsertedBlock,
32307 + onClose: () => {
32308 + cleanupInsertedBlock();
32309 + },
32310 + onChange: (updatedValue) => {
32311 + const { isEntityLink, attributes: updatedAttributes } = updateAttributes(
32312 + updatedValue,
32313 + setInsertedBlockAttributes(insertedBlock?.clientId),
32314 + insertedBlock?.attributes
32315 + );
32316 + if (isEntityLink) {
32317 + createBinding(updatedAttributes);
32318 + } else {
32319 + clearBinding(updatedAttributes);
32320 + }
32321 + setInsertedBlock(null);
32322 + }
32323 + }
32324 + );
32325 + }
32326 + const MainContent = ({
32327 + clientId,
32328 + currentMenuId,
32329 + isLoading,
32330 + isNavigationMenuMissing,
32331 + onCreateNew
32332 + }) => {
32333 + const hasChildren = (0,external_wp_data_namespaceObject.useSelect)(
32334 + (select) => {
32335 + return !!select(external_wp_blockEditor_namespaceObject.store).getBlockCount(clientId);
32336 + },
32337 + [clientId]
32338 + );
32339 + const { navigationMenu } = useNavigationMenu(currentMenuId);
32340 + if (currentMenuId && isNavigationMenuMissing) {
32341 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(deleted_navigation_warning_default, { onCreateNew, isNotice: true });
32342 + }
32343 + if (isLoading) {
32344 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Spinner, {});
32345 + }
32346 + const description = navigationMenu ? (0,external_wp_i18n_namespaceObject.sprintf)(
32347 + /* translators: %s: The name of a menu. */
32348 + (0,external_wp_i18n_namespaceObject.__)("Structure for Navigation Menu: %s"),
32349 + navigationMenu?.title || (0,external_wp_i18n_namespaceObject.__)("Untitled menu")
32350 + ) : (0,external_wp_i18n_namespaceObject.__)(
32351 + "You have not yet created any menus. Displaying a list of your Pages"
32352 + );
32353 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", { className: "wp-block-navigation__menu-inspector-controls", children: [
32354 + !hasChildren && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("p", { className: "wp-block-navigation__menu-inspector-controls__empty-message", children: (0,external_wp_i18n_namespaceObject.__)("This Navigation Menu is empty.") }),
32355 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
32356 + PrivateListView,
32357 + {
32358 + rootClientId: clientId,
32359 + isExpanded: true,
32360 + description,
32361 + showAppender: true,
32362 + blockSettingsMenu: LeafMoreMenu,
32363 + additionalBlockContent: AdditionalBlockContent
32364 + }
32365 + )
32366 + ] });
32367 + };
32368 + const MenuInspectorControls = (props) => {
32369 + const {
32370 + createNavigationMenuIsSuccess,
32371 + createNavigationMenuIsError,
32372 + currentMenuId = null,
32373 + onCreateNew,
32374 + onSelectClassicMenu,
32375 + onSelectNavigationMenu,
32376 + isManageMenusButtonDisabled,
32377 + blockEditingMode
32378 + } = props;
32379 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, { group: "list", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.PanelBody, { title: null, children: [
32380 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.__experimentalHStack, { className: "wp-block-navigation-off-canvas-editor__header", children: [
32381 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
32382 + external_wp_components_namespaceObject.__experimentalHeading,
32383 + {
32384 + className: "wp-block-navigation-off-canvas-editor__title",
32385 + level: 2,
32386 + children: (0,external_wp_i18n_namespaceObject.__)("Menu")
32387 + }
32388 + ),
32389 + blockEditingMode === "default" && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
32390 + navigation_menu_selector_default,
32391 + {
32392 + currentMenuId,
32393 + onSelectClassicMenu,
32394 + onSelectNavigationMenu,
32395 + onCreateNew,
32396 + createNavigationMenuIsSuccess,
32397 + createNavigationMenuIsError,
32398 + actionLabel,
32399 + isManageMenusButtonDisabled
32400 + }
32401 + )
32402 + ] }),
32403 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(MainContent, { ...props })
32404 + ] }) });
32405 + };
32406 + var menu_inspector_controls_default = MenuInspectorControls;
32407 +
32408 +
32409 + ;// ./node_modules/@wordpress/block-library/build-module/navigation/edit/accessible-description.js
32410 +
32411 +
32412 + function AccessibleDescription({ id, children }) {
32413 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.VisuallyHidden, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { id, className: "wp-block-navigation__description", children }) });
32414 + }
32415 +
32416 +
32417 + ;// ./node_modules/@wordpress/block-library/build-module/navigation/edit/accessible-menu-description.js
32418 +
32419 +
32420 +
32421 +
32422 + function AccessibleMenuDescription({ id }) {
32423 + const [menuTitle] = (0,external_wp_coreData_namespaceObject.useEntityProp)("postType", "wp_navigation", "title");
32424 + const description = (0,external_wp_i18n_namespaceObject.sprintf)((0,external_wp_i18n_namespaceObject.__)(`Navigation Menu: "%s"`), menuTitle);
32425 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(AccessibleDescription, { id, children: description });
32426 + }
32427 +
32428 +
32429 + ;// ./node_modules/@wordpress/block-library/build-module/navigation/edit/index.js
32430 +
32431 +
32432 +
32433 +
32434 +
32435 +
32436 +
32437 +
32438 +
32439 +
32440 +
32441 +
32442 +
32443 +
32444 +
32445 +
32446 +
32447 +
32448 +
32449 +
32450 +
32451 +
32452 +
32453 +
32454 +
32455 +
32456 +
32457 +
32458 +
32459 +
32460 +
32461 +
32462 +
32463 +
32464 +
32465 + function NavigationAddPageButton({ clientId }) {
32466 + const { insertBlock } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_blockEditor_namespaceObject.store);
32467 + const { getBlockCount } = (0,external_wp_data_namespaceObject.useSelect)(external_wp_blockEditor_namespaceObject.store);
32468 + const onAddPage = (0,external_wp_element_namespaceObject.useCallback)(() => {
32469 + const blockCount = getBlockCount(clientId);
32470 + const newBlock = (0,external_wp_blocks_namespaceObject.createBlock)(constants_DEFAULT_BLOCK.name, {
32471 + kind: constants_DEFAULT_BLOCK.attributes.kind,
32472 + type: constants_DEFAULT_BLOCK.attributes.type
32473 + });
32474 + insertBlock(newBlock, blockCount, clientId);
32475 + }, [clientId, insertBlock, getBlockCount]);
32476 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockControls, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ToolbarGroup, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
32477 + external_wp_components_namespaceObject.ToolbarButton,
32478 + {
32479 + name: "add-page",
32480 + icon: page_default,
32481 + onClick: onAddPage,
32482 + children: (0,external_wp_i18n_namespaceObject.__)("Add page")
32483 + }
32484 + ) }) });
32485 + }
32486 + function ColorTools({
32487 + textColor,
32488 + setTextColor,
32489 + backgroundColor,
32490 + setBackgroundColor,
32491 + overlayTextColor,
32492 + setOverlayTextColor,
32493 + overlayBackgroundColor,
32494 + setOverlayBackgroundColor,
32495 + clientId,
32496 + navRef
32497 + }) {
32498 + const [detectedBackgroundColor, setDetectedBackgroundColor] = (0,external_wp_element_namespaceObject.useState)();
32499 + const [detectedColor, setDetectedColor] = (0,external_wp_element_namespaceObject.useState)();
32500 + const [
32501 + detectedOverlayBackgroundColor,
32502 + setDetectedOverlayBackgroundColor
32503 + ] = (0,external_wp_element_namespaceObject.useState)();
32504 + const [detectedOverlayColor, setDetectedOverlayColor] = (0,external_wp_element_namespaceObject.useState)();
32505 + const enableContrastChecking = external_wp_element_namespaceObject.Platform.OS === "web";
32506 + (0,external_wp_element_namespaceObject.useEffect)(() => {
32507 + if (!enableContrastChecking) {
32508 + return;
32509 + }
32510 + detectColors(
32511 + navRef.current,
32512 + setDetectedColor,
32513 + setDetectedBackgroundColor
32514 + );
32515 + const subMenuElement = navRef.current?.querySelector(
32516 + '[data-type="core/navigation-submenu"] [data-type="core/navigation-link"]'
32517 + );
32518 + if (!subMenuElement) {
32519 + return;
32520 + }
32521 + if (overlayTextColor.color || overlayBackgroundColor.color) {
32522 + detectColors(
32523 + subMenuElement,
32524 + setDetectedOverlayColor,
32525 + setDetectedOverlayBackgroundColor
32526 + );
32527 + }
32528 + }, [
32529 + enableContrastChecking,
32530 + overlayTextColor.color,
32531 + overlayBackgroundColor.color,
32532 + navRef
32533 + ]);
32534 + const colorGradientSettings = (0,external_wp_blockEditor_namespaceObject.__experimentalUseMultipleOriginColorsAndGradients)();
32535 + if (!colorGradientSettings.hasColorsOrGradients) {
32536 + return null;
32537 + }
32538 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
32539 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
32540 + external_wp_blockEditor_namespaceObject.__experimentalColorGradientSettingsDropdown,
32541 + {
32542 + __experimentalIsRenderedInSidebar: true,
32543 + settings: [
32544 + {
32545 + colorValue: textColor.color,
32546 + label: (0,external_wp_i18n_namespaceObject.__)("Text"),
32547 + onColorChange: setTextColor,
32548 + resetAllFilter: () => setTextColor(),
32549 + clearable: true,
32550 + enableAlpha: true
32551 + },
32552 + {
32553 + colorValue: backgroundColor.color,
32554 + label: (0,external_wp_i18n_namespaceObject.__)("Background"),
32555 + onColorChange: setBackgroundColor,
32556 + resetAllFilter: () => setBackgroundColor(),
32557 + clearable: true,
32558 + enableAlpha: true
32559 + },
32560 + {
32561 + colorValue: overlayTextColor.color,
32562 + label: (0,external_wp_i18n_namespaceObject.__)("Submenu & overlay text"),
32563 + onColorChange: setOverlayTextColor,
32564 + resetAllFilter: () => setOverlayTextColor(),
32565 + clearable: true,
32566 + enableAlpha: true
32567 + },
32568 + {
32569 + colorValue: overlayBackgroundColor.color,
32570 + label: (0,external_wp_i18n_namespaceObject.__)("Submenu & overlay background"),
32571 + onColorChange: setOverlayBackgroundColor,
32572 + resetAllFilter: () => setOverlayBackgroundColor(),
32573 + clearable: true,
32574 + enableAlpha: true
32575 + }
32576 + ],
32577 + panelId: clientId,
32578 + ...colorGradientSettings,
32579 + gradients: [],
32580 + disableCustomGradients: true
32581 + }
32582 + ),
32583 + enableContrastChecking && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
32584 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
32585 + external_wp_blockEditor_namespaceObject.ContrastChecker,
32586 + {
32587 + backgroundColor: detectedBackgroundColor,
32588 + textColor: detectedColor
32589 + }
32590 + ),
32591 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
32592 + external_wp_blockEditor_namespaceObject.ContrastChecker,
32593 + {
32594 + backgroundColor: detectedOverlayBackgroundColor,
32595 + textColor: detectedOverlayColor
32596 + }
32597 + )
32598 + ] })
32599 + ] });
32600 + }
32601 + function Navigation({
32602 + attributes,
32603 + setAttributes,
32604 + clientId,
32605 + isSelected,
32606 + className,
32607 + backgroundColor,
32608 + setBackgroundColor,
32609 + textColor,
32610 + setTextColor,
32611 + overlayBackgroundColor,
32612 + setOverlayBackgroundColor,
32613 + overlayTextColor,
32614 + setOverlayTextColor,
32615 + // These props are used by the navigation editor to override specific
32616 + // navigation block settings.
32617 + hasSubmenuIndicatorSetting = true,
32618 + customPlaceholder: CustomPlaceholder = null,
32619 + __unstableLayoutClassNames: layoutClassNames
32620 + }) {
32621 + const {
32622 + openSubmenusOnClick,
32623 + overlayMenu,
32624 + showSubmenuIcon,
32625 + templateLock,
32626 + layout: {
32627 + justifyContent,
32628 + orientation = "horizontal",
32629 + flexWrap = "wrap"
32630 + } = {},
32631 + hasIcon,
32632 + icon = "handle"
32633 + } = attributes;
32634 + const ref = attributes.ref;
32635 + const setRef = (0,external_wp_element_namespaceObject.useCallback)(
32636 + (postId) => {
32637 + setAttributes({ ref: postId });
32638 + },
32639 + [setAttributes]
32640 + );
32641 + const recursionId = `navigationMenu/${ref}`;
32642 + const hasAlreadyRendered = (0,external_wp_blockEditor_namespaceObject.useHasRecursion)(recursionId);
32643 + const blockEditingMode = (0,external_wp_blockEditor_namespaceObject.useBlockEditingMode)();
32644 + const { menus: classicMenus } = useNavigationEntities();
32645 + const [showNavigationMenuStatusNotice, hideNavigationMenuStatusNotice] = use_navigation_notice_default({
32646 + name: "block-library/core/navigation/status"
32647 + });
32648 + const [showClassicMenuConversionNotice, hideClassicMenuConversionNotice] = use_navigation_notice_default({
32649 + name: "block-library/core/navigation/classic-menu-conversion"
32650 + });
32651 + const [
32652 + showNavigationMenuPermissionsNotice,
32653 + hideNavigationMenuPermissionsNotice
32654 + ] = use_navigation_notice_default({
32655 + name: "block-library/core/navigation/permissions/update"
32656 + });
32657 + const {
32658 + create: createNavigationMenu,
32659 + status: createNavigationMenuStatus,
32660 + error: createNavigationMenuError,
32661 + value: createNavigationMenuPost,
32662 + isPending: isCreatingNavigationMenu,
32663 + isSuccess: createNavigationMenuIsSuccess,
32664 + isError: createNavigationMenuIsError
32665 + } = useCreateNavigationMenu(clientId);
32666 + const createUntitledEmptyNavigationMenu = async () => {
32667 + await createNavigationMenu("");
32668 + };
32669 + const {
32670 + hasUncontrolledInnerBlocks,
32671 + uncontrolledInnerBlocks,
32672 + isInnerBlockSelected,
32673 + innerBlocks
32674 + } = useInnerBlocks(clientId);
32675 + const hasSubmenus = !!innerBlocks.find(
32676 + (block) => block.name === "core/navigation-submenu"
32677 + );
32678 + const {
32679 + replaceInnerBlocks,
32680 + selectBlock,
32681 + __unstableMarkNextChangeAsNotPersistent
32682 + } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_blockEditor_namespaceObject.store);
32683 + const [isResponsiveMenuOpen, setResponsiveMenuVisibility] = (0,external_wp_element_namespaceObject.useState)(false);
32684 + const [overlayMenuPreview, setOverlayMenuPreview] = (0,external_wp_element_namespaceObject.useState)(false);
32685 + const {
32686 + hasResolvedNavigationMenus,
32687 + isNavigationMenuResolved,
32688 + isNavigationMenuMissing,
32689 + canUserUpdateNavigationMenu,
32690 + hasResolvedCanUserUpdateNavigationMenu,
32691 + canUserDeleteNavigationMenu,
32692 + hasResolvedCanUserDeleteNavigationMenu,
32693 + canUserCreateNavigationMenus,
32694 + isResolvingCanUserCreateNavigationMenus,
32695 + hasResolvedCanUserCreateNavigationMenus
32696 + } = useNavigationMenu(ref);
32697 + const navMenuResolvedButMissing = hasResolvedNavigationMenus && isNavigationMenuMissing;
32698 + const {
32699 + convert: convertClassicMenu,
32700 + status: classicMenuConversionStatus,
32701 + error: classicMenuConversionError
32702 + } = use_convert_classic_menu_to_block_menu_default(createNavigationMenu);
32703 + const isConvertingClassicMenu = classicMenuConversionStatus === CLASSIC_MENU_CONVERSION_PENDING;
32704 + const handleUpdateMenu = (0,external_wp_element_namespaceObject.useCallback)(
32705 + (menuId, options = { focusNavigationBlock: false }) => {
32706 + const { focusNavigationBlock } = options;
32707 + setRef(menuId);
32708 + if (focusNavigationBlock) {
32709 + selectBlock(clientId);
32710 + }
32711 + },
32712 + [selectBlock, clientId, setRef]
32713 + );
32714 + const isEntityAvailable = !isNavigationMenuMissing && isNavigationMenuResolved;
32715 + const hasUnsavedBlocks = hasUncontrolledInnerBlocks && !isEntityAvailable;
32716 + const { getNavigationFallbackId } = unlock((0,external_wp_data_namespaceObject.useSelect)(external_wp_coreData_namespaceObject.store));
32717 + const navigationFallbackId = !(ref || hasUnsavedBlocks) ? getNavigationFallbackId() : null;
32718 + (0,external_wp_element_namespaceObject.useEffect)(() => {
32719 + if (ref || hasUnsavedBlocks || !navigationFallbackId) {
32720 + return;
32721 + }
32722 + __unstableMarkNextChangeAsNotPersistent();
32723 + setRef(navigationFallbackId);
32724 + }, [
32725 + ref,
32726 + setRef,
32727 + hasUnsavedBlocks,
32728 + navigationFallbackId,
32729 + __unstableMarkNextChangeAsNotPersistent
32730 + ]);
32731 + const navRef = (0,external_wp_element_namespaceObject.useRef)();
32732 + const TagName = "nav";
32733 + const isPlaceholder = !ref && !isCreatingNavigationMenu && !isConvertingClassicMenu && hasResolvedNavigationMenus && classicMenus?.length === 0 && !hasUncontrolledInnerBlocks;
32734 + const isLoading = !hasResolvedNavigationMenus || isCreatingNavigationMenu || isConvertingClassicMenu || !!(ref && !isEntityAvailable && !isConvertingClassicMenu);
32735 + const textDecoration = attributes.style?.typography?.textDecoration;
32736 + const hasBlockOverlay = (0,external_wp_data_namespaceObject.useSelect)(
32737 + (select) => select(external_wp_blockEditor_namespaceObject.store).__unstableHasActiveBlockOverlayActive(
32738 + clientId
32739 + ),
32740 + [clientId]
32741 + );
32742 + const isResponsive = "never" !== overlayMenu;
32743 + const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)({
32744 + ref: navRef,
32745 + className: dist_clsx(
32746 + className,
32747 + {
32748 + "items-justified-right": justifyContent === "right",
32749 + "items-justified-space-between": justifyContent === "space-between",
32750 + "items-justified-left": justifyContent === "left",
32751 + "items-justified-center": justifyContent === "center",
32752 + "is-vertical": orientation === "vertical",
32753 + "no-wrap": flexWrap === "nowrap",
32754 + "is-responsive": isResponsive,
32755 + "has-text-color": !!textColor.color || !!textColor?.class,
32756 + [(0,external_wp_blockEditor_namespaceObject.getColorClassName)("color", textColor?.slug)]: !!textColor?.slug,
32757 + "has-background": !!backgroundColor.color || backgroundColor.class,
32758 + [(0,external_wp_blockEditor_namespaceObject.getColorClassName)(
32759 + "background-color",
32760 + backgroundColor?.slug
32761 + )]: !!backgroundColor?.slug,
32762 + [`has-text-decoration-${textDecoration}`]: textDecoration,
32763 + "block-editor-block-content-overlay": hasBlockOverlay
32764 + },
32765 + layoutClassNames
32766 + ),
32767 + style: {
32768 + color: !textColor?.slug && textColor?.color,
32769 + backgroundColor: !backgroundColor?.slug && backgroundColor?.color
32770 + }
32771 + });
32772 + const onSelectClassicMenu = async (classicMenu) => {
32773 + return convertClassicMenu(classicMenu.id, classicMenu.name, "draft");
32774 + };
32775 + const onSelectNavigationMenu = (menuId) => {
32776 + handleUpdateMenu(menuId);
32777 + };
32778 + (0,external_wp_element_namespaceObject.useEffect)(() => {
32779 + hideNavigationMenuStatusNotice();
32780 + if (isCreatingNavigationMenu) {
32781 + (0,external_wp_a11y_namespaceObject.speak)((0,external_wp_i18n_namespaceObject.__)(`Creating Navigation Menu.`));
32782 + }
32783 + if (createNavigationMenuIsSuccess) {
32784 + handleUpdateMenu(createNavigationMenuPost?.id, {
32785 + focusNavigationBlock: true
32786 + });
32787 + showNavigationMenuStatusNotice(
32788 + (0,external_wp_i18n_namespaceObject.__)(`Navigation Menu successfully created.`)
32789 + );
32790 + }
32791 + if (createNavigationMenuIsError) {
32792 + showNavigationMenuStatusNotice(
32793 + (0,external_wp_i18n_namespaceObject.__)("Failed to create Navigation Menu.")
32794 + );
32795 + }
32796 + }, [
32797 + createNavigationMenuStatus,
32798 + createNavigationMenuError,
32799 + createNavigationMenuPost?.id,
32800 + createNavigationMenuIsError,
32801 + createNavigationMenuIsSuccess,
32802 + isCreatingNavigationMenu,
32803 + handleUpdateMenu,
32804 + hideNavigationMenuStatusNotice,
32805 + showNavigationMenuStatusNotice
32806 + ]);
32807 + (0,external_wp_element_namespaceObject.useEffect)(() => {
32808 + hideClassicMenuConversionNotice();
32809 + if (classicMenuConversionStatus === CLASSIC_MENU_CONVERSION_PENDING) {
32810 + (0,external_wp_a11y_namespaceObject.speak)((0,external_wp_i18n_namespaceObject.__)("Classic menu importing."));
32811 + }
32812 + if (classicMenuConversionStatus === CLASSIC_MENU_CONVERSION_SUCCESS) {
32813 + showClassicMenuConversionNotice(
32814 + (0,external_wp_i18n_namespaceObject.__)("Classic menu imported successfully.")
32815 + );
32816 + handleUpdateMenu(createNavigationMenuPost?.id, {
32817 + focusNavigationBlock: true
32818 + });
32819 + }
32820 + if (classicMenuConversionStatus === CLASSIC_MENU_CONVERSION_ERROR) {
32821 + showClassicMenuConversionNotice(
32822 + (0,external_wp_i18n_namespaceObject.__)("Classic menu import failed.")
32823 + );
32824 + }
32825 + }, [
32826 + classicMenuConversionStatus,
32827 + classicMenuConversionError,
32828 + hideClassicMenuConversionNotice,
32829 + showClassicMenuConversionNotice,
32830 + createNavigationMenuPost?.id,
32831 + handleUpdateMenu
32832 + ]);
32833 + (0,external_wp_element_namespaceObject.useEffect)(() => {
32834 + if (!isSelected && !isInnerBlockSelected) {
32835 + hideNavigationMenuPermissionsNotice();
32836 + }
32837 + if (isSelected || isInnerBlockSelected) {
32838 + if (ref && !navMenuResolvedButMissing && hasResolvedCanUserUpdateNavigationMenu && !canUserUpdateNavigationMenu) {
32839 + showNavigationMenuPermissionsNotice(
32840 + (0,external_wp_i18n_namespaceObject.__)(
32841 + "You do not have permission to edit this Menu. Any changes made will not be saved."
32842 + )
32843 + );
32844 + }
32845 + if (!ref && hasResolvedCanUserCreateNavigationMenus && !canUserCreateNavigationMenus) {
32846 + showNavigationMenuPermissionsNotice(
32847 + (0,external_wp_i18n_namespaceObject.__)(
32848 + "You do not have permission to create Navigation Menus."
32849 + )
32850 + );
32851 + }
32852 + }
32853 + }, [
32854 + isSelected,
32855 + isInnerBlockSelected,
32856 + canUserUpdateNavigationMenu,
32857 + hasResolvedCanUserUpdateNavigationMenu,
32858 + canUserCreateNavigationMenus,
32859 + hasResolvedCanUserCreateNavigationMenus,
32860 + ref,
32861 + hideNavigationMenuPermissionsNotice,
32862 + showNavigationMenuPermissionsNotice,
32863 + navMenuResolvedButMissing
32864 + ]);
32865 + const hasManagePermissions = canUserCreateNavigationMenus || canUserUpdateNavigationMenu;
32866 + const overlayMenuPreviewClasses = dist_clsx(
32867 + "wp-block-navigation__overlay-menu-preview",
32868 + { open: overlayMenuPreview }
32869 + );
32870 + const submenuAccessibilityNotice = !showSubmenuIcon && !openSubmenusOnClick ? (0,external_wp_i18n_namespaceObject.__)(
32871 + 'The current menu options offer reduced accessibility for users and are not recommended. Enabling either "Open on Click" or "Show arrow" offers enhanced accessibility by allowing keyboard users to browse submenus selectively.'
32872 + ) : "";
32873 + const isFirstRender = (0,external_wp_element_namespaceObject.useRef)(true);
32874 + (0,external_wp_element_namespaceObject.useEffect)(() => {
32875 + if (!isFirstRender.current && submenuAccessibilityNotice) {
32876 + (0,external_wp_a11y_namespaceObject.speak)(submenuAccessibilityNotice);
32877 + }
32878 + isFirstRender.current = false;
32879 + }, [submenuAccessibilityNotice]);
32880 + const overlayMenuPreviewId = (0,external_wp_compose_namespaceObject.useInstanceId)(
32881 + OverlayMenuPreview,
32882 + `overlay-menu-preview`
32883 + );
32884 + const dropdownMenuProps = useToolsPanelDropdownMenuProps();
32885 + const stylingInspectorControls = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
32886 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, { children: hasSubmenuIndicatorSetting && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(
32887 + external_wp_components_namespaceObject.__experimentalToolsPanel,
32888 + {
32889 + label: (0,external_wp_i18n_namespaceObject.__)("Display"),
32890 + resetAll: () => {
32891 + setAttributes({
32892 + showSubmenuIcon: true,
32893 + openSubmenusOnClick: false,
32894 + overlayMenu: "mobile",
32895 + hasIcon: true,
32896 + icon: "handle"
32897 + });
32898 + },
32899 + dropdownMenuProps,
32900 + children: [
32901 + isResponsive && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
32902 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(
32903 + external_wp_components_namespaceObject.Button,
32904 + {
32905 + __next40pxDefaultSize: true,
32906 + className: overlayMenuPreviewClasses,
32907 + onClick: () => {
32908 + setOverlayMenuPreview(
32909 + !overlayMenuPreview
32910 + );
32911 + },
32912 + "aria-label": (0,external_wp_i18n_namespaceObject.__)("Overlay menu controls"),
32913 + "aria-controls": overlayMenuPreviewId,
32914 + "aria-expanded": overlayMenuPreview,
32915 + children: [
32916 + hasIcon && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
32917 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(OverlayMenuIcon, { icon }),
32918 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(build_module_icon_icon_default, { icon: close_default })
32919 + ] }),
32920 + !hasIcon && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
32921 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("span", { children: (0,external_wp_i18n_namespaceObject.__)("Menu") }),
32922 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("span", { children: (0,external_wp_i18n_namespaceObject.__)("Close") })
32923 + ] })
32924 + ]
32925 + }
32926 + ),
32927 + overlayMenuPreview && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
32928 + external_wp_components_namespaceObject.__experimentalVStack,
32929 + {
32930 + id: overlayMenuPreviewId,
32931 + spacing: 4,
32932 + style: {
32933 + gridColumn: "span 2"
32934 + },
32935 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
32936 + OverlayMenuPreview,
32937 + {
32938 + setAttributes,
32939 + hasIcon,
32940 + icon,
32941 + hidden: !overlayMenuPreview
32942 + }
32943 + )
32944 + }
32945 + )
32946 + ] }),
32947 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
32948 + external_wp_components_namespaceObject.__experimentalToolsPanelItem,
32949 + {
32950 + hasValue: () => overlayMenu !== "mobile",
32951 + label: (0,external_wp_i18n_namespaceObject.__)("Overlay Menu"),
32952 + onDeselect: () => setAttributes({ overlayMenu: "mobile" }),
32953 + isShownByDefault: true,
32954 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(
32955 + external_wp_components_namespaceObject.__experimentalToggleGroupControl,
32956 + {
32957 + __next40pxDefaultSize: true,
32958 + __nextHasNoMarginBottom: true,
32959 + label: (0,external_wp_i18n_namespaceObject.__)("Overlay Menu"),
32960 + "aria-label": (0,external_wp_i18n_namespaceObject.__)("Configure overlay menu"),
32961 + value: overlayMenu,
32962 + help: (0,external_wp_i18n_namespaceObject.__)(
32963 + "Collapses the navigation options in a menu icon opening an overlay."
32964 + ),
32965 + onChange: (value) => setAttributes({ overlayMenu: value }),
32966 + isBlock: true,
32967 + children: [
32968 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
32969 + external_wp_components_namespaceObject.__experimentalToggleGroupControlOption,
32970 + {
32971 + value: "never",
32972 + label: (0,external_wp_i18n_namespaceObject.__)("Off")
32973 + }
32974 + ),
32975 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
32976 + external_wp_components_namespaceObject.__experimentalToggleGroupControlOption,
32977 + {
32978 + value: "mobile",
32979 + label: (0,external_wp_i18n_namespaceObject.__)("Mobile")
32980 + }
32981 + ),
32982 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
32983 + external_wp_components_namespaceObject.__experimentalToggleGroupControlOption,
32984 + {
32985 + value: "always",
32986 + label: (0,external_wp_i18n_namespaceObject.__)("Always")
32987 + }
32988 + )
32989 + ]
32990 + }
32991 + )
32992 + }
32993 + ),
32994 + hasSubmenus && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
32995 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("h3", { className: "wp-block-navigation__submenu-header", children: (0,external_wp_i18n_namespaceObject.__)("Submenus") }),
32996 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
32997 + external_wp_components_namespaceObject.__experimentalToolsPanelItem,
32998 + {
32999 + hasValue: () => openSubmenusOnClick,
33000 + label: (0,external_wp_i18n_namespaceObject.__)("Open on click"),
33001 + onDeselect: () => setAttributes({
33002 + openSubmenusOnClick: false,
33003 + showSubmenuIcon: true
33004 + }),
33005 + isShownByDefault: true,
33006 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
33007 + external_wp_components_namespaceObject.ToggleControl,
33008 + {
33009 + __nextHasNoMarginBottom: true,
33010 + checked: openSubmenusOnClick,
33011 + onChange: (value) => {
33012 + setAttributes({
33013 + openSubmenusOnClick: value,
33014 + ...value && {
33015 + showSubmenuIcon: true
33016 + }
33017 + // Make sure arrows are shown when we toggle this on.
33018 + });
33019 + },
33020 + label: (0,external_wp_i18n_namespaceObject.__)("Open on click")
33021 + }
33022 + )
33023 + }
33024 + ),
33025 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
33026 + external_wp_components_namespaceObject.__experimentalToolsPanelItem,
33027 + {
33028 + hasValue: () => !showSubmenuIcon,
33029 + label: (0,external_wp_i18n_namespaceObject.__)("Show arrow"),
33030 + onDeselect: () => setAttributes({
33031 + showSubmenuIcon: true
33032 + }),
33033 + isDisabled: attributes.openSubmenusOnClick,
33034 + isShownByDefault: true,
33035 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
33036 + external_wp_components_namespaceObject.ToggleControl,
33037 + {
33038 + __nextHasNoMarginBottom: true,
33039 + checked: showSubmenuIcon,
33040 + onChange: (value) => {
33041 + setAttributes({
33042 + showSubmenuIcon: value
33043 + });
33044 + },
33045 + disabled: attributes.openSubmenusOnClick,
33046 + label: (0,external_wp_i18n_namespaceObject.__)("Show arrow")
33047 + }
33048 + )
33049 + }
33050 + ),
33051 + submenuAccessibilityNotice && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
33052 + external_wp_components_namespaceObject.Notice,
33053 + {
33054 + spokenMessage: null,
33055 + status: "warning",
33056 + isDismissible: false,
33057 + className: "wp-block-navigation__submenu-accessibility-notice",
33058 + children: submenuAccessibilityNotice
33059 + }
33060 + )
33061 + ] })
33062 + ]
33063 + }
33064 + ) }),
33065 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, { group: "color", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
33066 + ColorTools,
33067 + {
33068 + textColor,
33069 + setTextColor,
33070 + backgroundColor,
33071 + setBackgroundColor,
33072 + overlayTextColor,
33073 + setOverlayTextColor,
33074 + overlayBackgroundColor,
33075 + setOverlayBackgroundColor,
33076 + clientId,
33077 + navRef
33078 + }
33079 + ) })
33080 + ] });
33081 + const accessibleDescriptionId = `${clientId}-desc`;
33082 + const isHiddenByDefault = "always" === overlayMenu;
33083 + const isManageMenusButtonDisabled = !hasManagePermissions || !hasResolvedNavigationMenus;
33084 + if (hasUnsavedBlocks && !isCreatingNavigationMenu) {
33085 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(
33086 + TagName,
33087 + {
33088 + ...blockProps,
33089 + "aria-describedby": !isPlaceholder ? accessibleDescriptionId : void 0,
33090 + children: [
33091 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(AccessibleDescription, { id: accessibleDescriptionId, children: (0,external_wp_i18n_namespaceObject.__)("Unsaved Navigation Menu.") }),
33092 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
33093 + menu_inspector_controls_default,
33094 + {
33095 + clientId,
33096 + createNavigationMenuIsSuccess,
33097 + createNavigationMenuIsError,
33098 + currentMenuId: ref,
33099 + isNavigationMenuMissing,
33100 + isManageMenusButtonDisabled,
33101 + onCreateNew: createUntitledEmptyNavigationMenu,
33102 + onSelectClassicMenu,
33103 + onSelectNavigationMenu,
33104 + isLoading,
33105 + blockEditingMode
33106 + }
33107 + ),
33108 + blockEditingMode === "default" && stylingInspectorControls,
33109 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
33110 + ResponsiveWrapper,
33111 + {
33112 + id: clientId,
33113 + onToggle: setResponsiveMenuVisibility,
33114 + isOpen: isResponsiveMenuOpen,
33115 + hasIcon,
33116 + icon,
33117 + isResponsive,
33118 + isHiddenByDefault,
33119 + overlayBackgroundColor,
33120 + overlayTextColor,
33121 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
33122 + UnsavedInnerBlocks,
33123 + {
33124 + createNavigationMenu,
33125 + blocks: uncontrolledInnerBlocks,
33126 + hasSelection: isSelected || isInnerBlockSelected
33127 + }
33128 + )
33129 + }
33130 + )
33131 + ]
33132 + }
33133 + );
33134 + }
33135 + if (ref && isNavigationMenuMissing) {
33136 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(TagName, { ...blockProps, children: [
33137 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
33138 + menu_inspector_controls_default,
33139 + {
33140 + clientId,
33141 + createNavigationMenuIsSuccess,
33142 + createNavigationMenuIsError,
33143 + currentMenuId: ref,
33144 + isNavigationMenuMissing,
33145 + isManageMenusButtonDisabled,
33146 + onCreateNew: createUntitledEmptyNavigationMenu,
33147 + onSelectClassicMenu,
33148 + onSelectNavigationMenu,
33149 + isLoading,
33150 + blockEditingMode
33151 + }
33152 + ),
33153 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
33154 + deleted_navigation_warning_default,
33155 + {
33156 + onCreateNew: createUntitledEmptyNavigationMenu
33157 + }
33158 + )
33159 + ] });
33160 + }
33161 + if (isEntityAvailable && hasAlreadyRendered) {
33162 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { ...blockProps, children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.Warning, { children: (0,external_wp_i18n_namespaceObject.__)("Block cannot be rendered inside itself.") }) });
33163 + }
33164 + const PlaceholderComponent = CustomPlaceholder ? CustomPlaceholder : NavigationPlaceholder;
33165 + if (isPlaceholder && CustomPlaceholder) {
33166 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(TagName, { ...blockProps, children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
33167 + PlaceholderComponent,
33168 + {
33169 + isSelected,
33170 + currentMenuId: ref,
33171 + clientId,
33172 + canUserCreateNavigationMenus,
33173 + isResolvingCanUserCreateNavigationMenus,
33174 + onSelectNavigationMenu,
33175 + onSelectClassicMenu,
33176 + onCreateEmpty: createUntitledEmptyNavigationMenu
33177 + }
33178 + ) });
33179 + }
33180 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_coreData_namespaceObject.EntityProvider, { kind: "postType", type: "wp_navigation", id: ref, children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_blockEditor_namespaceObject.RecursionProvider, { uniqueId: recursionId, children: [
33181 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
33182 + menu_inspector_controls_default,
33183 + {
33184 + clientId,
33185 + createNavigationMenuIsSuccess,
33186 + createNavigationMenuIsError,
33187 + currentMenuId: ref,
33188 + isNavigationMenuMissing,
33189 + isManageMenusButtonDisabled,
33190 + onCreateNew: createUntitledEmptyNavigationMenu,
33191 + onSelectClassicMenu,
33192 + onSelectNavigationMenu,
33193 + isLoading,
33194 + blockEditingMode
33195 + }
33196 + ),
33197 + blockEditingMode === "default" && stylingInspectorControls,
33198 + blockEditingMode === "contentOnly" && isEntityAvailable && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(NavigationAddPageButton, { clientId }),
33199 + blockEditingMode === "default" && isEntityAvailable && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_blockEditor_namespaceObject.InspectorControls, { group: "advanced", children: [
33200 + hasResolvedCanUserUpdateNavigationMenu && canUserUpdateNavigationMenu && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(NavigationMenuNameControl, {}),
33201 + hasResolvedCanUserDeleteNavigationMenu && canUserDeleteNavigationMenu && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
33202 + NavigationMenuDeleteControl,
33203 + {
33204 + onDelete: () => {
33205 + replaceInnerBlocks(clientId, []);
33206 + showNavigationMenuStatusNotice(
33207 + (0,external_wp_i18n_namespaceObject.__)(
33208 + "Navigation Menu successfully deleted."
33209 + )
33210 + );
33211 + }
33212 + }
33213 + ),
33214 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
33215 + manage_menus_button_default,
33216 + {
33217 + disabled: isManageMenusButtonDisabled,
33218 + className: "wp-block-navigation-manage-menus-button"
33219 + }
33220 + )
33221 + ] }),
33222 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(
33223 + TagName,
33224 + {
33225 + ...blockProps,
33226 + "aria-describedby": !isPlaceholder && !isLoading ? accessibleDescriptionId : void 0,
33227 + children: [
33228 + isLoading && !isHiddenByDefault && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { className: "wp-block-navigation__loading-indicator-container", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Spinner, { className: "wp-block-navigation__loading-indicator" }) }),
33229 + (!isLoading || isHiddenByDefault) && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
33230 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
33231 + AccessibleMenuDescription,
33232 + {
33233 + id: accessibleDescriptionId
33234 + }
33235 + ),
33236 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
33237 + ResponsiveWrapper,
33238 + {
33239 + id: clientId,
33240 + onToggle: setResponsiveMenuVisibility,
33241 + hasIcon,
33242 + icon,
33243 + isOpen: isResponsiveMenuOpen,
33244 + isResponsive,
33245 + isHiddenByDefault,
33246 + overlayBackgroundColor,
33247 + overlayTextColor,
33248 + children: isEntityAvailable && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
33249 + NavigationInnerBlocks,
33250 + {
33251 + clientId,
33252 + hasCustomPlaceholder: !!CustomPlaceholder,
33253 + templateLock,
33254 + orientation
33255 + }
33256 + )
33257 + }
33258 + )
33259 + ] })
33260 + ]
33261 + }
33262 + )
33263 + ] }) });
33264 + }
33265 + var navigation_edit_edit_default = (0,external_wp_blockEditor_namespaceObject.withColors)(
33266 + { textColor: "color" },
33267 + { backgroundColor: "color" },
33268 + { overlayBackgroundColor: "color" },
33269 + { overlayTextColor: "color" }
33270 + )(Navigation);
33271 +
33272 +
33273 + ;// ./node_modules/@wordpress/block-library/build-module/navigation/save.js
33274 +
33275 +
33276 + function navigation_save_save({ attributes }) {
33277 + if (attributes.ref) {
33278 + return;
33279 + }
33280 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, {});
33281 + }
33282 +
33283 +
33284 + ;// ./node_modules/@wordpress/block-library/build-module/navigation/deprecated.js
33285 +
33286 +
33287 +
33288 +
33289 + const TYPOGRAPHY_PRESET_DEPRECATION_MAP = {
33290 + fontStyle: "var:preset|font-style|",
33291 + fontWeight: "var:preset|font-weight|",
33292 + textDecoration: "var:preset|text-decoration|",
33293 + textTransform: "var:preset|text-transform|"
33294 + };
33295 + const migrateIdToRef = ({ navigationMenuId, ...attributes }) => {
33296 + return {
33297 + ...attributes,
33298 + ref: navigationMenuId
33299 + };
33300 + };
33301 + const deprecated_migrateWithLayout = (attributes) => {
33302 + if (!!attributes.layout) {
33303 + return attributes;
33304 + }
33305 + const { itemsJustification, orientation, ...updatedAttributes } = attributes;
33306 + if (itemsJustification || orientation) {
33307 + Object.assign(updatedAttributes, {
33308 + layout: {
33309 + type: "flex",
33310 + ...itemsJustification && {
33311 + justifyContent: itemsJustification
33312 + },
33313 + ...orientation && { orientation }
33314 + }
33315 + });
33316 + }
33317 + return updatedAttributes;
33318 + };
33319 + const navigation_deprecated_v6 = {
33320 + attributes: {
33321 + navigationMenuId: {
33322 + type: "number"
33323 + },
33324 + textColor: {
33325 + type: "string"
33326 + },
33327 + customTextColor: {
33328 + type: "string"
33329 + },
33330 + rgbTextColor: {
33331 + type: "string"
33332 + },
33333 + backgroundColor: {
33334 + type: "string"
33335 + },
33336 + customBackgroundColor: {
33337 + type: "string"
33338 + },
33339 + rgbBackgroundColor: {
33340 + type: "string"
33341 + },
33342 + showSubmenuIcon: {
33343 + type: "boolean",
33344 + default: true
33345 + },
33346 + openSubmenusOnClick: {
33347 + type: "boolean",
33348 + default: false
33349 + },
33350 + overlayMenu: {
33351 + type: "string",
33352 + default: "mobile"
33353 + },
33354 + __unstableLocation: {
33355 + type: "string"
33356 + },
33357 + overlayBackgroundColor: {
33358 + type: "string"
33359 + },
33360 + customOverlayBackgroundColor: {
33361 + type: "string"
33362 + },
33363 + overlayTextColor: {
33364 + type: "string"
33365 + },
33366 + customOverlayTextColor: {
33367 + type: "string"
33368 + }
33369 + },
33370 + supports: {
33371 + align: ["wide", "full"],
33372 + anchor: true,
33373 + html: false,
33374 + inserter: true,
33375 + typography: {
33376 + fontSize: true,
33377 + lineHeight: true,
33378 + __experimentalFontStyle: true,
33379 + __experimentalFontWeight: true,
33380 + __experimentalTextTransform: true,
33381 + __experimentalFontFamily: true,
33382 + __experimentalTextDecoration: true,
33383 + __experimentalDefaultControls: {
33384 + fontSize: true
33385 + }
33386 + },
33387 + spacing: {
33388 + blockGap: true,
33389 + units: ["px", "em", "rem", "vh", "vw"],
33390 + __experimentalDefaultControls: {
33391 + blockGap: true
33392 + }
33393 + },
33394 + layout: {
33395 + allowSwitching: false,
33396 + allowInheriting: false,
33397 + default: {
33398 + type: "flex"
33399 + }
33400 + }
33401 + },
33402 + save() {
33403 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, {});
33404 + },
33405 + isEligible: ({ navigationMenuId }) => !!navigationMenuId,
33406 + migrate: migrateIdToRef
33407 + };
33408 + const navigation_deprecated_v5 = {
33409 + attributes: {
33410 + navigationMenuId: {
33411 + type: "number"
33412 + },
33413 + orientation: {
33414 + type: "string",
33415 + default: "horizontal"
33416 + },
33417 + textColor: {
33418 + type: "string"
33419 + },
33420 + customTextColor: {
33421 + type: "string"
33422 + },
33423 + rgbTextColor: {
33424 + type: "string"
33425 + },
33426 + backgroundColor: {
33427 + type: "string"
33428 + },
33429 + customBackgroundColor: {
33430 + type: "string"
33431 + },
33432 + rgbBackgroundColor: {
33433 + type: "string"
33434 + },
33435 + itemsJustification: {
33436 + type: "string"
33437 + },
33438 + showSubmenuIcon: {
33439 + type: "boolean",
33440 + default: true
33441 + },
33442 + openSubmenusOnClick: {
33443 + type: "boolean",
33444 + default: false
33445 + },
33446 + overlayMenu: {
33447 + type: "string",
33448 + default: "never"
33449 + },
33450 + __unstableLocation: {
33451 + type: "string"
33452 + },
33453 + overlayBackgroundColor: {
33454 + type: "string"
33455 + },
33456 + customOverlayBackgroundColor: {
33457 + type: "string"
33458 + },
33459 + overlayTextColor: {
33460 + type: "string"
33461 + },
33462 + customOverlayTextColor: {
33463 + type: "string"
33464 + }
33465 + },
33466 + supports: {
33467 + align: ["wide", "full"],
33468 + anchor: true,
33469 + html: false,
33470 + inserter: true,
33471 + typography: {
33472 + fontSize: true,
33473 + lineHeight: true,
33474 + __experimentalFontStyle: true,
33475 + __experimentalFontWeight: true,
33476 + __experimentalTextTransform: true,
33477 + __experimentalFontFamily: true,
33478 + __experimentalTextDecoration: true,
33479 + __experimentalDefaultControls: {
33480 + fontSize: true
33481 + }
33482 + },
33483 + spacing: {
33484 + blockGap: true,
33485 + units: ["px", "em", "rem", "vh", "vw"],
33486 + __experimentalDefaultControls: {
33487 + blockGap: true
33488 + }
33489 + }
33490 + },
33491 + save() {
33492 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, {});
33493 + },
33494 + isEligible: ({ itemsJustification, orientation }) => !!itemsJustification || !!orientation,
33495 + migrate: (0,external_wp_compose_namespaceObject.compose)(migrateIdToRef, deprecated_migrateWithLayout)
33496 + };
33497 + const navigation_deprecated_v4 = {
33498 + attributes: {
33499 + orientation: {
33500 + type: "string",
33501 + default: "horizontal"
33502 + },
33503 + textColor: {
33504 + type: "string"
33505 + },
33506 + customTextColor: {
33507 + type: "string"
33508 + },
33509 + rgbTextColor: {
33510 + type: "string"
33511 + },
33512 + backgroundColor: {
33513 + type: "string"
33514 + },
33515 + customBackgroundColor: {
33516 + type: "string"
33517 + },
33518 + rgbBackgroundColor: {
33519 + type: "string"
33520 + },
33521 + itemsJustification: {
33522 + type: "string"
33523 + },
33524 + showSubmenuIcon: {
33525 + type: "boolean",
33526 + default: true
33527 + },
33528 + openSubmenusOnClick: {
33529 + type: "boolean",
33530 + default: false
33531 + },
33532 + overlayMenu: {
33533 + type: "string",
33534 + default: "never"
33535 + },
33536 + __unstableLocation: {
33537 + type: "string"
33538 + },
33539 + overlayBackgroundColor: {
33540 + type: "string"
33541 + },
33542 + customOverlayBackgroundColor: {
33543 + type: "string"
33544 + },
33545 + overlayTextColor: {
33546 + type: "string"
33547 + },
33548 + customOverlayTextColor: {
33549 + type: "string"
33550 + }
33551 + },
33552 + supports: {
33553 + align: ["wide", "full"],
33554 + anchor: true,
33555 + html: false,
33556 + inserter: true,
33557 + typography: {
33558 + fontSize: true,
33559 + lineHeight: true,
33560 + __experimentalFontStyle: true,
33561 + __experimentalFontWeight: true,
33562 + __experimentalTextTransform: true,
33563 + __experimentalFontFamily: true,
33564 + __experimentalTextDecoration: true
33565 + },
33566 + spacing: {
33567 + blockGap: true,
33568 + units: ["px", "em", "rem", "vh", "vw"],
33569 + __experimentalDefaultControls: {
33570 + blockGap: true
33571 + }
33572 + }
33573 + },
33574 + save() {
33575 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, {});
33576 + },
33577 + migrate: (0,external_wp_compose_namespaceObject.compose)(migrateIdToRef, deprecated_migrateWithLayout, migrate_font_family_default),
33578 + isEligible({ style }) {
33579 + return style?.typography?.fontFamily;
33580 + }
33581 + };
33582 + const migrateIsResponsive = function(attributes) {
33583 + delete attributes.isResponsive;
33584 + return {
33585 + ...attributes,
33586 + overlayMenu: "mobile"
33587 + };
33588 + };
33589 + const migrateTypographyPresets = function(attributes) {
33590 + return {
33591 + ...attributes,
33592 + style: {
33593 + ...attributes.style,
33594 + typography: Object.fromEntries(
33595 + Object.entries(attributes.style.typography ?? {}).map(
33596 + ([key, value]) => {
33597 + const prefix = TYPOGRAPHY_PRESET_DEPRECATION_MAP[key];
33598 + if (prefix && value.startsWith(prefix)) {
33599 + const newValue = value.slice(prefix.length);
33600 + if ("textDecoration" === key && "strikethrough" === newValue) {
33601 + return [key, "line-through"];
33602 + }
33603 + return [key, newValue];
33604 + }
33605 + return [key, value];
33606 + }
33607 + )
33608 + )
33609 + }
33610 + };
33611 + };
33612 + const navigation_deprecated_deprecated = [
33613 + navigation_deprecated_v6,
33614 + navigation_deprecated_v5,
33615 + navigation_deprecated_v4,
33616 + // Remove `isResponsive` attribute.
33617 + {
33618 + attributes: {
33619 + orientation: {
33620 + type: "string",
33621 + default: "horizontal"
33622 + },
33623 + textColor: {
33624 + type: "string"
33625 + },
33626 + customTextColor: {
33627 + type: "string"
33628 + },
33629 + rgbTextColor: {
33630 + type: "string"
33631 + },
33632 + backgroundColor: {
33633 + type: "string"
33634 + },
33635 + customBackgroundColor: {
33636 + type: "string"
33637 + },
33638 + rgbBackgroundColor: {
33639 + type: "string"
33640 + },
33641 + itemsJustification: {
33642 + type: "string"
33643 + },
33644 + showSubmenuIcon: {
33645 + type: "boolean",
33646 + default: true
33647 + },
33648 + openSubmenusOnClick: {
33649 + type: "boolean",
33650 + default: false
33651 + },
33652 + isResponsive: {
33653 + type: "boolean",
33654 + default: "false"
33655 + },
33656 + __unstableLocation: {
33657 + type: "string"
33658 + },
33659 + overlayBackgroundColor: {
33660 + type: "string"
33661 + },
33662 + customOverlayBackgroundColor: {
33663 + type: "string"
33664 + },
33665 + overlayTextColor: {
33666 + type: "string"
33667 + },
33668 + customOverlayTextColor: {
33669 + type: "string"
33670 + }
33671 + },
33672 + supports: {
33673 + align: ["wide", "full"],
33674 + anchor: true,
33675 + html: false,
33676 + inserter: true,
33677 + typography: {
33678 + fontSize: true,
33679 + lineHeight: true,
33680 + __experimentalFontStyle: true,
33681 + __experimentalFontWeight: true,
33682 + __experimentalTextTransform: true,
33683 + __experimentalFontFamily: true,
33684 + __experimentalTextDecoration: true
33685 + }
33686 + },
33687 + isEligible(attributes) {
33688 + return attributes.isResponsive;
33689 + },
33690 + migrate: (0,external_wp_compose_namespaceObject.compose)(
33691 + migrateIdToRef,
33692 + deprecated_migrateWithLayout,
33693 + migrate_font_family_default,
33694 + migrateIsResponsive
33695 + ),
33696 + save() {
33697 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, {});
33698 + }
33699 + },
33700 + {
33701 + attributes: {
33702 + orientation: {
33703 + type: "string"
33704 + },
33705 + textColor: {
33706 + type: "string"
33707 + },
33708 + customTextColor: {
33709 + type: "string"
33710 + },
33711 + rgbTextColor: {
33712 + type: "string"
33713 + },
33714 + backgroundColor: {
33715 + type: "string"
33716 + },
33717 + customBackgroundColor: {
33718 + type: "string"
33719 + },
33720 + rgbBackgroundColor: {
33721 + type: "string"
33722 + },
33723 + itemsJustification: {
33724 + type: "string"
33725 + },
33726 + showSubmenuIcon: {
33727 + type: "boolean",
33728 + default: true
33729 + }
33730 + },
33731 + supports: {
33732 + align: ["wide", "full"],
33733 + anchor: true,
33734 + html: false,
33735 + inserter: true,
33736 + fontSize: true,
33737 + __experimentalFontStyle: true,
33738 + __experimentalFontWeight: true,
33739 + __experimentalTextTransform: true,
33740 + color: true,
33741 + __experimentalFontFamily: true,
33742 + __experimentalTextDecoration: true
33743 + },
33744 + save() {
33745 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, {});
33746 + },
33747 + isEligible(attributes) {
33748 + if (!attributes.style || !attributes.style.typography) {
33749 + return false;
33750 + }
33751 + for (const styleAttribute in TYPOGRAPHY_PRESET_DEPRECATION_MAP) {
33752 + const attributeValue = attributes.style.typography[styleAttribute];
33753 + if (attributeValue && attributeValue.startsWith(
33754 + TYPOGRAPHY_PRESET_DEPRECATION_MAP[styleAttribute]
33755 + )) {
33756 + return true;
33757 + }
33758 + }
33759 + return false;
33760 + },
33761 + migrate: (0,external_wp_compose_namespaceObject.compose)(
33762 + migrateIdToRef,
33763 + deprecated_migrateWithLayout,
33764 + migrate_font_family_default,
33765 + migrateTypographyPresets
33766 + )
33767 + },
33768 + {
33769 + attributes: {
33770 + className: {
33771 + type: "string"
33772 + },
33773 + textColor: {
33774 + type: "string"
33775 + },
33776 + rgbTextColor: {
33777 + type: "string"
33778 + },
33779 + backgroundColor: {
33780 + type: "string"
33781 + },
33782 + rgbBackgroundColor: {
33783 + type: "string"
33784 + },
33785 + fontSize: {
33786 + type: "string"
33787 + },
33788 + customFontSize: {
33789 + type: "number"
33790 + },
33791 + itemsJustification: {
33792 + type: "string"
33793 + },
33794 + showSubmenuIcon: {
33795 + type: "boolean"
33796 + }
33797 + },
33798 + isEligible(attribute) {
33799 + return attribute.rgbTextColor || attribute.rgbBackgroundColor;
33800 + },
33801 + supports: {
33802 + align: ["wide", "full"],
33803 + anchor: true,
33804 + html: false,
33805 + inserter: true
33806 + },
33807 + migrate: (0,external_wp_compose_namespaceObject.compose)(migrateIdToRef, (attributes) => {
33808 + const { rgbTextColor, rgbBackgroundColor, ...restAttributes } = attributes;
33809 + return {
33810 + ...restAttributes,
33811 + customTextColor: attributes.textColor ? void 0 : attributes.rgbTextColor,
33812 + customBackgroundColor: attributes.backgroundColor ? void 0 : attributes.rgbBackgroundColor
33813 + };
33814 + }),
33815 + save() {
33816 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, {});
33817 + }
33818 + }
33819 + ];
33820 + var navigation_deprecated_deprecated_default = navigation_deprecated_deprecated;
33821 +
33822 +
33823 + ;// ./node_modules/@wordpress/block-library/build-module/navigation/index.js
33824 +
33825 +
33826 +
33827 +
33828 +
33829 +
33830 +
33831 +
33832 +
33833 +
33834 + const { name: navigation_name } = navigation_block_namespaceObject;
33835 + const navigation_settings = {
33836 + icon: navigation_default,
33837 + example: {
33838 + attributes: {
33839 + overlayMenu: "never"
33840 + },
33841 + innerBlocks: [
33842 + {
33843 + name: "core/navigation-link",
33844 + attributes: {
33845 + // translators: 'Home' as in a website's home page.
33846 + label: (0,external_wp_i18n_namespaceObject.__)("Home"),
33847 + url: "https://make.wordpress.org/"
33848 + }
33849 + },
33850 + {
33851 + name: "core/navigation-link",
33852 + attributes: {
33853 + // translators: 'About' as in a website's about page.
33854 + label: (0,external_wp_i18n_namespaceObject.__)("About"),
33855 + url: "https://make.wordpress.org/"
33856 + }
33857 + },
33858 + {
33859 + name: "core/navigation-link",
33860 + attributes: {
33861 + // translators: 'Contact' as in a website's contact page.
33862 + label: (0,external_wp_i18n_namespaceObject.__)("Contact"),
33863 + url: "https://make.wordpress.org/"
33864 + }
33865 + }
33866 + ]
33867 + },
33868 + edit: navigation_edit_edit_default,
33869 + save: navigation_save_save,
33870 + __experimentalLabel: ({ ref }) => {
33871 + if (!ref) {
33872 + return;
33873 + }
33874 + const navigation = (0,external_wp_data_namespaceObject.select)(external_wp_coreData_namespaceObject.store).getEditedEntityRecord(
33875 + "postType",
33876 + "wp_navigation",
33877 + ref
33878 + );
33879 + if (!navigation?.title) {
33880 + return;
33881 + }
33882 + return (0,external_wp_htmlEntities_namespaceObject.decodeEntities)(navigation.title);
33883 + },
33884 + deprecated: navigation_deprecated_deprecated_default
33885 + };
33886 + const navigation_init = () => initBlock({ name: navigation_name, metadata: navigation_block_namespaceObject, settings: navigation_settings });
33887 +
33888 +
33889 + ;// ./node_modules/@wordpress/block-library/build-module/navigation-link/block.json
33890 + const navigation_link_block_namespaceObject = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/navigation-link","title":"Custom Link","category":"design","parent":["core/navigation"],"allowedBlocks":["core/navigation-link","core/navigation-submenu","core/page-list"],"description":"Add a page, link, or another item to your navigation.","textdomain":"default","attributes":{"label":{"type":"string","role":"content"},"type":{"type":"string"},"description":{"type":"string"},"rel":{"type":"string"},"id":{"type":"number"},"opensInNewTab":{"type":"boolean","default":false},"url":{"type":"string"},"title":{"type":"string"},"kind":{"type":"string"},"isTopLevelLink":{"type":"boolean"}},"usesContext":["textColor","customTextColor","backgroundColor","customBackgroundColor","overlayTextColor","customOverlayTextColor","overlayBackgroundColor","customOverlayBackgroundColor","fontSize","customFontSize","showSubmenuIcon","maxNestingLevel","style"],"supports":{"reusable":false,"html":false,"__experimentalSlashInserter":true,"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"renaming":false,"interactivity":{"clientNavigation":true}},"editorStyle":"wp-block-navigation-link-editor","style":"wp-block-navigation-link"}');
33891 + ;// ./node_modules/@wordpress/block-library/build-module/navigation-link/shared/controls.js
33892 +
33893 +
33894 +
33895 +
33896 +
33897 +
33898 +
33899 +
33900 +
33901 +
33902 +
33903 +
33904 +
33905 + function getEntityTypeName(type, kind) {
33906 + if (kind === "post-type") {
33907 + switch (type) {
33908 + case "post":
33909 + return (0,external_wp_i18n_namespaceObject.__)("post");
33910 + case "page":
33911 + return (0,external_wp_i18n_namespaceObject.__)("page");
33912 + default:
33913 + return type || (0,external_wp_i18n_namespaceObject.__)("post");
33914 + }
33915 + }
33916 + if (kind === "taxonomy") {
33917 + switch (type) {
33918 + case "category":
33919 + return (0,external_wp_i18n_namespaceObject.__)("category");
33920 + case "tag":
33921 + return (0,external_wp_i18n_namespaceObject.__)("tag");
33922 + default:
33923 + return type || (0,external_wp_i18n_namespaceObject.__)("term");
33924 + }
33925 + }
33926 + return type || (0,external_wp_i18n_namespaceObject.__)("item");
33927 + }
33928 + function controls_Controls({ attributes, setAttributes, clientId }) {
33929 + const { label, url, description, rel, opensInNewTab } = attributes;
33930 + const lastURLRef = (0,external_wp_element_namespaceObject.useRef)(url);
33931 + const dropdownMenuProps = useToolsPanelDropdownMenuProps();
33932 + const urlInputRef = (0,external_wp_element_namespaceObject.useRef)();
33933 + const shouldFocusURLInputRef = (0,external_wp_element_namespaceObject.useRef)(false);
33934 + const inputId = (0,external_wp_compose_namespaceObject.useInstanceId)(controls_Controls, "link-input");
33935 + const helpTextId = `${inputId}__help`;
33936 + const [inputValue, setInputValue] = (0,external_wp_element_namespaceObject.useState)(url);
33937 + (0,external_wp_element_namespaceObject.useEffect)(() => {
33938 + setInputValue(url);
33939 + lastURLRef.current = url;
33940 + }, [url]);
33941 + const { hasUrlBinding, isBoundEntityAvailable, clearBinding } = useEntityBinding({
33942 + clientId,
33943 + attributes
33944 + });
33945 + const { updateBlockAttributes } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_blockEditor_namespaceObject.store);
33946 + const unsyncBoundLink = () => {
33947 + clearBinding();
33948 + updateBlockAttributes(clientId, {
33949 + url: lastURLRef.current,
33950 + // set the lastURLRef as the new editable value so we avoid bugs from empty link states
33951 + id: void 0
33952 + });
33953 + };
33954 + (0,external_wp_element_namespaceObject.useEffect)(() => {
33955 + if (!hasUrlBinding && shouldFocusURLInputRef.current) {
33956 + urlInputRef.current?.select();
33957 + }
33958 + shouldFocusURLInputRef.current = false;
33959 + }, [hasUrlBinding]);
33960 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(
33961 + external_wp_components_namespaceObject.__experimentalToolsPanel,
33962 + {
33963 + label: (0,external_wp_i18n_namespaceObject.__)("Settings"),
33964 + resetAll: () => {
33965 + setAttributes({
33966 + label: "",
33967 + url: "",
33968 + description: "",
33969 + rel: "",
33970 + opensInNewTab: false
33971 + });
33972 + },
33973 + dropdownMenuProps,
33974 + children: [
33975 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
33976 + external_wp_components_namespaceObject.__experimentalToolsPanelItem,
33977 + {
33978 + hasValue: () => !!label,
33979 + label: (0,external_wp_i18n_namespaceObject.__)("Text"),
33980 + onDeselect: () => setAttributes({ label: "" }),
33981 + isShownByDefault: true,
33982 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
33983 + external_wp_components_namespaceObject.TextControl,
33984 + {
33985 + __nextHasNoMarginBottom: true,
33986 + __next40pxDefaultSize: true,
33987 + label: (0,external_wp_i18n_namespaceObject.__)("Text"),
33988 + value: label ? (0,external_wp_dom_namespaceObject.__unstableStripHTML)(label) : "",
33989 + onChange: (labelValue) => {
33990 + setAttributes({ label: labelValue });
33991 + },
33992 + autoComplete: "off"
33993 + }
33994 + )
33995 + }
33996 + ),
33997 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
33998 + external_wp_components_namespaceObject.__experimentalToolsPanelItem,
33999 + {
34000 + hasValue: () => !!url,
34001 + label: (0,external_wp_i18n_namespaceObject.__)("Link"),
34002 + onDeselect: () => setAttributes({ url: "" }),
34003 + isShownByDefault: true,
34004 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
34005 + external_wp_components_namespaceObject.__experimentalInputControl,
34006 + {
34007 + ref: urlInputRef,
34008 + __nextHasNoMarginBottom: true,
34009 + __next40pxDefaultSize: true,
34010 + id: inputId,
34011 + label: (0,external_wp_i18n_namespaceObject.__)("Link"),
34012 + value: (() => {
34013 + if (hasUrlBinding && !isBoundEntityAvailable) {
34014 + return "";
34015 + }
34016 + return inputValue ? (0,external_wp_url_namespaceObject.safeDecodeURI)(inputValue) : "";
34017 + })(),
34018 + autoComplete: "off",
34019 + type: "url",
34020 + disabled: hasUrlBinding,
34021 + "aria-invalid": hasUrlBinding && !isBoundEntityAvailable ? "true" : void 0,
34022 + "aria-describedby": helpTextId,
34023 + className: hasUrlBinding && !isBoundEntityAvailable ? "navigation-link-control__input-with-error-suffix" : void 0,
34024 + onChange: (newValue) => {
34025 + if (isBoundEntityAvailable) {
34026 + return;
34027 + }
34028 + setInputValue(newValue);
34029 + },
34030 + onFocus: () => {
34031 + if (isBoundEntityAvailable) {
34032 + return;
34033 + }
34034 + lastURLRef.current = url;
34035 + },
34036 + onBlur: () => {
34037 + if (isBoundEntityAvailable) {
34038 + return;
34039 + }
34040 + const finalValue = !inputValue ? lastURLRef.current : inputValue;
34041 + setInputValue(finalValue);
34042 + updateAttributes({ url: finalValue }, setAttributes, {
34043 + ...attributes,
34044 + url: lastURLRef.current
34045 + });
34046 + },
34047 + help: hasUrlBinding && !isBoundEntityAvailable ? /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
34048 + MissingEntityHelp,
34049 + {
34050 + id: helpTextId,
34051 + type: attributes.type,
34052 + kind: attributes.kind
34053 + }
34054 + ) : isBoundEntityAvailable && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
34055 + BindingHelpText,
34056 + {
34057 + type: attributes.type,
34058 + kind: attributes.kind
34059 + }
34060 + ),
34061 + suffix: hasUrlBinding && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
34062 + external_wp_components_namespaceObject.Button,
34063 + {
34064 + icon: link_off_default,
34065 + onClick: () => {
34066 + unsyncBoundLink();
34067 + shouldFocusURLInputRef.current = true;
34068 + },
34069 + "aria-describedby": helpTextId,
34070 + showTooltip: true,
34071 + label: (0,external_wp_i18n_namespaceObject.__)("Unsync and edit"),
34072 + __next40pxDefaultSize: true,
34073 + className: hasUrlBinding && !isBoundEntityAvailable ? "navigation-link-control__error-suffix-button" : void 0
34074 + }
34075 + )
34076 + }
34077 + )
34078 + }
34079 + ),
34080 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
34081 + external_wp_components_namespaceObject.__experimentalToolsPanelItem,
34082 + {
34083 + hasValue: () => !!opensInNewTab,
34084 + label: (0,external_wp_i18n_namespaceObject.__)("Open in new tab"),
34085 + onDeselect: () => setAttributes({ opensInNewTab: false }),
34086 + isShownByDefault: true,
34087 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
34088 + external_wp_components_namespaceObject.CheckboxControl,
34089 + {
34090 + __nextHasNoMarginBottom: true,
34091 + label: (0,external_wp_i18n_namespaceObject.__)("Open in new tab"),
34092 + checked: opensInNewTab,
34093 + onChange: (value) => setAttributes({ opensInNewTab: value })
34094 + }
34095 + )
34096 + }
34097 + ),
34098 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
34099 + external_wp_components_namespaceObject.__experimentalToolsPanelItem,
34100 + {
34101 + hasValue: () => !!description,
34102 + label: (0,external_wp_i18n_namespaceObject.__)("Description"),
34103 + onDeselect: () => setAttributes({ description: "" }),
34104 + isShownByDefault: true,
34105 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
34106 + external_wp_components_namespaceObject.TextareaControl,
34107 + {
34108 + __nextHasNoMarginBottom: true,
34109 + label: (0,external_wp_i18n_namespaceObject.__)("Description"),
34110 + value: description || "",
34111 + onChange: (descriptionValue) => {
34112 + setAttributes({ description: descriptionValue });
34113 + },
34114 + help: (0,external_wp_i18n_namespaceObject.__)(
34115 + "The description will be displayed in the menu if the current theme supports it."
34116 + )
34117 + }
34118 + )
34119 + }
34120 + ),
34121 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
34122 + external_wp_components_namespaceObject.__experimentalToolsPanelItem,
34123 + {
34124 + hasValue: () => !!rel,
34125 + label: (0,external_wp_i18n_namespaceObject.__)("Rel attribute"),
34126 + onDeselect: () => setAttributes({ rel: "" }),
34127 + isShownByDefault: true,
34128 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
34129 + external_wp_components_namespaceObject.TextControl,
34130 + {
34131 + __nextHasNoMarginBottom: true,
34132 + __next40pxDefaultSize: true,
34133 + label: (0,external_wp_i18n_namespaceObject.__)("Rel attribute"),
34134 + value: rel || "",
34135 + onChange: (relValue) => {
34136 + setAttributes({ rel: relValue });
34137 + },
34138 + autoComplete: "off",
34139 + help: (0,external_wp_i18n_namespaceObject.__)(
34140 + "The relationship of the linked URL as space-separated link types."
34141 + )
34142 + }
34143 + )
34144 + }
34145 + )
34146 + ]
34147 + }
34148 + );
34149 + }
34150 + function BindingHelpText({ type, kind }) {
34151 + const entityType = getEntityTypeName(type, kind);
34152 + return (0,external_wp_i18n_namespaceObject.sprintf)(
34153 + /* translators: %s is the entity type (e.g., "page", "post", "category") */
34154 + (0,external_wp_i18n_namespaceObject.__)("Synced with the selected %s."),
34155 + entityType
34156 + );
34157 + }
34158 + function MissingEntityHelpText({ type, kind }) {
34159 + const entityType = getEntityTypeName(type, kind);
34160 + return (0,external_wp_i18n_namespaceObject.sprintf)(
34161 + /* translators: %s is the entity type (e.g., "page", "post", "category") */
34162 + (0,external_wp_i18n_namespaceObject.__)("Synced %s is missing. Please update or remove this link."),
34163 + entityType
34164 + );
34165 + }
34166 + function MissingEntityHelp({ id, type, kind }) {
34167 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("span", { id, className: "navigation-link-control__error-text", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(MissingEntityHelpText, { type, kind }) });
34168 + }
34169 +
34170 +
34171 + ;// ./node_modules/@wordpress/block-library/build-module/navigation-link/edit.js
34172 +
34173 +
34174 +
34175 +
34176 +
34177 +
34178 +
34179 +
34180 +
34181 +
34182 +
34183 +
34184 +
34185 +
34186 +
34187 +
34188 + const navigation_link_edit_DEFAULT_BLOCK = { name: "core/navigation-link" };
34189 + const NESTING_BLOCK_NAMES = [
34190 + "core/navigation-link",
34191 + "core/navigation-submenu"
34192 + ];
34193 + const useIsDraggingWithin = (elementRef) => {
34194 + const [isDraggingWithin, setIsDraggingWithin] = (0,external_wp_element_namespaceObject.useState)(false);
34195 + (0,external_wp_element_namespaceObject.useEffect)(() => {
34196 + const { ownerDocument } = elementRef.current;
34197 + function handleDragStart(event) {
34198 + handleDragEnter(event);
34199 + }
34200 + function handleDragEnd() {
34201 + setIsDraggingWithin(false);
34202 + }
34203 + function handleDragEnter(event) {
34204 + if (elementRef.current.contains(event.target)) {
34205 + setIsDraggingWithin(true);
34206 + } else {
34207 + setIsDraggingWithin(false);
34208 + }
34209 + }
34210 + ownerDocument.addEventListener("dragstart", handleDragStart);
34211 + ownerDocument.addEventListener("dragend", handleDragEnd);
34212 + ownerDocument.addEventListener("dragenter", handleDragEnter);
34213 + return () => {
34214 + ownerDocument.removeEventListener("dragstart", handleDragStart);
34215 + ownerDocument.removeEventListener("dragend", handleDragEnd);
34216 + ownerDocument.removeEventListener("dragenter", handleDragEnter);
34217 + };
34218 + }, [elementRef]);
34219 + return isDraggingWithin;
34220 + };
34221 + const useIsInvalidLink = (kind, type, id, enabled) => {
34222 + const isPostType = kind === "post-type" || type === "post" || type === "page";
34223 + const hasId = Number.isInteger(id);
34224 + const blockEditingMode = (0,external_wp_blockEditor_namespaceObject.useBlockEditingMode)();
34225 + const { postStatus, isDeleted } = (0,external_wp_data_namespaceObject.useSelect)(
34226 + (select) => {
34227 + if (!isPostType) {
34228 + return { postStatus: null, isDeleted: false };
34229 + }
34230 + if (blockEditingMode === "disabled" || !enabled) {
34231 + return { postStatus: null, isDeleted: false };
34232 + }
34233 + const { getEntityRecord, hasFinishedResolution } = select(external_wp_coreData_namespaceObject.store);
34234 + const entityRecord = getEntityRecord("postType", type, id);
34235 + const hasResolved = hasFinishedResolution("getEntityRecord", [
34236 + "postType",
34237 + type,
34238 + id
34239 + ]);
34240 + const deleted = hasResolved && entityRecord === void 0;
34241 + return {
34242 + postStatus: entityRecord?.status,
34243 + isDeleted: deleted
34244 + };
34245 + },
34246 + [isPostType, blockEditingMode, enabled, type, id]
34247 + );
34248 + const isInvalid = isPostType && hasId && (isDeleted || postStatus && "trash" === postStatus);
34249 + const isDraft = "draft" === postStatus;
34250 + return [isInvalid, isDraft];
34251 + };
34252 + function getMissingText(type) {
34253 + let missingText = "";
34254 + switch (type) {
34255 + case "post":
34256 + missingText = (0,external_wp_i18n_namespaceObject.__)("Select post");
34257 + break;
34258 + case "page":
34259 + missingText = (0,external_wp_i18n_namespaceObject.__)("Select page");
34260 + break;
34261 + case "category":
34262 + missingText = (0,external_wp_i18n_namespaceObject.__)("Select category");
34263 + break;
34264 + case "tag":
34265 + missingText = (0,external_wp_i18n_namespaceObject.__)("Select tag");
34266 + break;
34267 + default:
34268 + missingText = (0,external_wp_i18n_namespaceObject.__)("Add link");
34269 + }
34270 + return missingText;
34271 + }
34272 + function NavigationLinkEdit({
34273 + attributes,
34274 + isSelected,
34275 + setAttributes,
34276 + insertBlocksAfter,
34277 + mergeBlocks,
34278 + onReplace,
34279 + context,
34280 + clientId
34281 + }) {
34282 + const { id, label, type, url, description, kind, metadata } = attributes;
34283 + const { maxNestingLevel } = context;
34284 + const {
34285 + replaceBlock,
34286 + __unstableMarkNextChangeAsNotPersistent,
34287 + selectBlock
34288 + } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_blockEditor_namespaceObject.store);
34289 + const [isLinkOpen, setIsLinkOpen] = (0,external_wp_element_namespaceObject.useState)(isSelected && !url);
34290 + const [popoverAnchor, setPopoverAnchor] = (0,external_wp_element_namespaceObject.useState)(null);
34291 + const listItemRef = (0,external_wp_element_namespaceObject.useRef)(null);
34292 + const isDraggingWithin = useIsDraggingWithin(listItemRef);
34293 + const itemLabelPlaceholder = (0,external_wp_i18n_namespaceObject.__)("Add label\u2026");
34294 + const ref = (0,external_wp_element_namespaceObject.useRef)();
34295 + const linkUIref = (0,external_wp_element_namespaceObject.useRef)();
34296 + const prevUrl = (0,external_wp_compose_namespaceObject.usePrevious)(url);
34297 + const isNewLink = (0,external_wp_element_namespaceObject.useRef)(!url && !metadata?.bindings?.url);
34298 + const {
34299 + isAtMaxNesting,
34300 + isTopLevelLink,
34301 + isParentOfSelectedBlock,
34302 + hasChildren,
34303 + validateLinkStatus,
34304 + parentBlockClientId
34305 + } = (0,external_wp_data_namespaceObject.useSelect)(
34306 + (select) => {
34307 + const {
34308 + getBlockCount,
34309 + getBlockName,
34310 + getBlockRootClientId,
34311 + hasSelectedInnerBlock,
34312 + getBlockParentsByBlockName,
34313 + getSelectedBlockClientId
34314 + } = select(external_wp_blockEditor_namespaceObject.store);
34315 + const rootClientId = getBlockRootClientId(clientId);
34316 + const parentBlockName = getBlockName(rootClientId);
34317 + const isTopLevel = parentBlockName === "core/navigation";
34318 + const selectedBlockClientId = getSelectedBlockClientId();
34319 + const rootNavigationClientId = isTopLevel ? rootClientId : getBlockParentsByBlockName(
34320 + clientId,
34321 + "core/navigation"
34322 + )[0];
34323 + const parentBlockId = parentBlockName === "core/navigation-submenu" ? rootClientId : rootNavigationClientId;
34324 + const enableLinkStatusValidation = selectedBlockClientId === rootNavigationClientId || hasSelectedInnerBlock(rootNavigationClientId, true);
34325 + return {
34326 + isAtMaxNesting: getBlockParentsByBlockName(clientId, NESTING_BLOCK_NAMES).length >= maxNestingLevel,
34327 + isTopLevelLink: isTopLevel,
34328 + isParentOfSelectedBlock: hasSelectedInnerBlock(
34329 + clientId,
34330 + true
34331 + ),
34332 + hasChildren: !!getBlockCount(clientId),
34333 + validateLinkStatus: enableLinkStatusValidation,
34334 + parentBlockClientId: parentBlockId
34335 + };
34336 + },
34337 + [clientId, maxNestingLevel]
34338 + );
34339 + const { getBlocks } = (0,external_wp_data_namespaceObject.useSelect)(external_wp_blockEditor_namespaceObject.store);
34340 + const {
34341 + clearBinding,
34342 + createBinding,
34343 + hasUrlBinding,
34344 + isBoundEntityAvailable
34345 + } = useEntityBinding({
34346 + clientId,
34347 + attributes
34348 + });
34349 + const [isInvalid, isDraft] = useIsInvalidLink(
34350 + kind,
34351 + type,
34352 + id,
34353 + validateLinkStatus
34354 + );
34355 + const transformToSubmenu = (0,external_wp_element_namespaceObject.useCallback)(() => {
34356 + let innerBlocks = getBlocks(clientId);
34357 + if (innerBlocks.length === 0) {
34358 + innerBlocks = [(0,external_wp_blocks_namespaceObject.createBlock)("core/navigation-link")];
34359 + selectBlock(innerBlocks[0].clientId);
34360 + }
34361 + const newSubmenu = (0,external_wp_blocks_namespaceObject.createBlock)(
34362 + "core/navigation-submenu",
34363 + attributes,
34364 + innerBlocks
34365 + );
34366 + replaceBlock(clientId, newSubmenu);
34367 + }, [getBlocks, clientId, selectBlock, replaceBlock, attributes]);
34368 + (0,external_wp_element_namespaceObject.useEffect)(() => {
34369 + if (isNewLink.current && isSelected && !url) {
34370 + selectBlock(parentBlockClientId);
34371 + }
34372 + }, []);
34373 + (0,external_wp_element_namespaceObject.useEffect)(() => {
34374 + if (hasChildren) {
34375 + __unstableMarkNextChangeAsNotPersistent();
34376 + transformToSubmenu();
34377 + }
34378 + }, [
34379 + hasChildren,
34380 + __unstableMarkNextChangeAsNotPersistent,
34381 + transformToSubmenu
34382 + ]);
34383 + (0,external_wp_element_namespaceObject.useEffect)(() => {
34384 + if (!prevUrl && url && isLinkOpen && (0,external_wp_url_namespaceObject.isURL)((0,external_wp_url_namespaceObject.prependHTTP)(label)) && /^.+\.[a-z]+/.test(label)) {
34385 + selectLabelText();
34386 + }
34387 + }, [prevUrl, url, isLinkOpen, label]);
34388 + function selectLabelText() {
34389 + ref.current.focus();
34390 + const { ownerDocument } = ref.current;
34391 + const { defaultView } = ownerDocument;
34392 + const selection = defaultView.getSelection();
34393 + const range = ownerDocument.createRange();
34394 + range.selectNodeContents(ref.current);
34395 + selection.removeAllRanges();
34396 + selection.addRange(range);
34397 + }
34398 + function removeLink() {
34399 + setAttributes({
34400 + url: void 0,
34401 + label: void 0,
34402 + id: void 0,
34403 + kind: void 0,
34404 + type: void 0,
34405 + opensInNewTab: false
34406 + });
34407 + setIsLinkOpen(false);
34408 + }
34409 + const {
34410 + textColor,
34411 + customTextColor,
34412 + backgroundColor,
34413 + customBackgroundColor
34414 + } = getColors(context, !isTopLevelLink);
34415 + function onKeyDown(event) {
34416 + if (external_wp_keycodes_namespaceObject.isKeyboardEvent.primary(event, "k")) {
34417 + event.preventDefault();
34418 + event.stopPropagation();
34419 + setIsLinkOpen(true);
34420 + }
34421 + }
34422 + const instanceId = (0,external_wp_compose_namespaceObject.useInstanceId)(NavigationLinkEdit);
34423 + const hasMissingEntity = hasUrlBinding && !isBoundEntityAvailable;
34424 + const missingEntityDescriptionId = hasMissingEntity ? (0,external_wp_i18n_namespaceObject.sprintf)("navigation-link-edit-%d-desc", instanceId) : void 0;
34425 + const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)({
34426 + ref: (0,external_wp_compose_namespaceObject.useMergeRefs)([setPopoverAnchor, listItemRef]),
34427 + className: dist_clsx("wp-block-navigation-item", {
34428 + "is-editing": isSelected || isParentOfSelectedBlock,
34429 + "is-dragging-within": isDraggingWithin,
34430 + "has-link": !!url,
34431 + "has-child": hasChildren,
34432 + "has-text-color": !!textColor || !!customTextColor,
34433 + [(0,external_wp_blockEditor_namespaceObject.getColorClassName)("color", textColor)]: !!textColor,
34434 + "has-background": !!backgroundColor || customBackgroundColor,
34435 + [(0,external_wp_blockEditor_namespaceObject.getColorClassName)("background-color", backgroundColor)]: !!backgroundColor
34436 + }),
34437 + "aria-describedby": missingEntityDescriptionId,
34438 + "aria-invalid": hasMissingEntity,
34439 + style: {
34440 + color: !textColor && customTextColor,
34441 + backgroundColor: !backgroundColor && customBackgroundColor
34442 + },
34443 + onKeyDown
34444 + });
34445 + const innerBlocksProps = (0,external_wp_blockEditor_namespaceObject.useInnerBlocksProps)(
34446 + {
34447 + ...blockProps,
34448 + className: "remove-outline"
34449 + // Remove the outline from the inner blocks container.
34450 + },
34451 + {
34452 + defaultBlock: navigation_link_edit_DEFAULT_BLOCK,
34453 + directInsert: true,
34454 + renderAppender: false
34455 + }
34456 + );
34457 + if (!url || isInvalid || isDraft || hasUrlBinding && !isBoundEntityAvailable) {
34458 + blockProps.onClick = () => {
34459 + setIsLinkOpen(true);
34460 + };
34461 + }
34462 + const classes = dist_clsx("wp-block-navigation-item__content", {
34463 + "wp-block-navigation-link__placeholder": !url || isInvalid || isDraft || hasUrlBinding && !isBoundEntityAvailable
34464 + });
34465 + const missingText = getMissingText(type);
34466 + const placeholderText = `(${isInvalid ? (0,external_wp_i18n_namespaceObject.__)("Invalid") : (0,external_wp_i18n_namespaceObject.__)("Draft")})`;
34467 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
34468 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockControls, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.ToolbarGroup, { children: [
34469 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
34470 + external_wp_components_namespaceObject.ToolbarButton,
34471 + {
34472 + name: "link",
34473 + icon: link_default,
34474 + title: (0,external_wp_i18n_namespaceObject.__)("Link"),
34475 + shortcut: external_wp_keycodes_namespaceObject.displayShortcut.primary("k"),
34476 + onClick: () => {
34477 + setIsLinkOpen(true);
34478 + }
34479 + }
34480 + ),
34481 + !isAtMaxNesting && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
34482 + external_wp_components_namespaceObject.ToolbarButton,
34483 + {
34484 + name: "submenu",
34485 + icon: add_submenu_default,
34486 + title: (0,external_wp_i18n_namespaceObject.__)("Add submenu"),
34487 + onClick: transformToSubmenu
34488 + }
34489 + )
34490 + ] }) }),
34491 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
34492 + controls_Controls,
34493 + {
34494 + attributes,
34495 + setAttributes,
34496 + clientId
34497 + }
34498 + ) }),
34499 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", { ...blockProps, children: [
34500 + hasMissingEntity && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.VisuallyHidden, { id: missingEntityDescriptionId, children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(MissingEntityHelpText, { type, kind }) }),
34501 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("a", { className: classes, children: [
34502 + !url && !metadata?.bindings?.url ? /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { className: "wp-block-navigation-link__placeholder-text", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("span", { children: missingText }) }) : /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
34503 + !isInvalid && !isDraft && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
34504 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
34505 + external_wp_blockEditor_namespaceObject.RichText,
34506 + {
34507 + ref,
34508 + identifier: "label",
34509 + className: "wp-block-navigation-item__label",
34510 + value: label,
34511 + onChange: (labelValue) => setAttributes({
34512 + label: labelValue
34513 + }),
34514 + onMerge: mergeBlocks,
34515 + onReplace,
34516 + __unstableOnSplitAtEnd: () => insertBlocksAfter(
34517 + (0,external_wp_blocks_namespaceObject.createBlock)(
34518 + "core/navigation-link"
34519 + )
34520 + ),
34521 + "aria-label": (0,external_wp_i18n_namespaceObject.__)(
34522 + "Navigation link text"
34523 + ),
34524 + placeholder: itemLabelPlaceholder,
34525 + withoutInteractiveFormatting: true
34526 + }
34527 + ),
34528 + description && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("span", { className: "wp-block-navigation-item__description", children: description })
34529 + ] }),
34530 + (isInvalid || isDraft) && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
34531 + "div",
34532 + {
34533 + className: dist_clsx(
34534 + "wp-block-navigation-link__placeholder-text",
34535 + "wp-block-navigation-link__label",
34536 + {
34537 + "is-invalid": isInvalid,
34538 + "is-draft": isDraft
34539 + }
34540 + ),
34541 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("span", {
34542 + // Some attributes are stored in an escaped form. It's a legacy issue.
34543 + // Ideally they would be stored in a raw, unescaped form.
34544 + // Unescape is used here to "recover" the escaped characters
34545 + // so they display without encoding.
34546 + // See `updateAttributes` for more details.
34547 + children: `${(0,external_wp_htmlEntities_namespaceObject.decodeEntities)(label)} ${isInvalid || isDraft ? placeholderText : ""}`.trim()
34548 + })
34549 + }
34550 + )
34551 + ] }),
34552 + isLinkOpen && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
34553 + LinkUI,
34554 + {
34555 + ref: linkUIref,
34556 + clientId,
34557 + link: attributes,
34558 + onClose: () => {
34559 + setIsLinkOpen(false);
34560 + if (!url && !hasUrlBinding) {
34561 + onReplace([]);
34562 + } else if (isNewLink.current) {
34563 + selectBlock(clientId);
34564 + }
34565 + },
34566 + anchor: popoverAnchor,
34567 + onRemove: removeLink,
34568 + onChange: (updatedValue) => {
34569 + const {
34570 + isEntityLink,
34571 + attributes: updatedAttributes
34572 + } = updateAttributes(
34573 + updatedValue,
34574 + setAttributes,
34575 + attributes
34576 + );
34577 + if (isEntityLink) {
34578 + createBinding(updatedAttributes);
34579 + } else {
34580 + clearBinding(updatedAttributes);
34581 + }
34582 + }
34583 + }
34584 + )
34585 + ] }),
34586 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { ...innerBlocksProps })
34587 + ] })
34588 + ] });
34589 + }
34590 +
34591 +
34592 + ;// ./node_modules/@wordpress/block-library/build-module/navigation-link/save.js
34593 +
34594 +
34595 + function navigation_link_save_save() {
34596 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, {});
34597 + }
34598 +
34599 +
34600 + ;// ./node_modules/@wordpress/icons/build-module/library/tag.js
34601 +
34602 +
34603 + var tag_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M4.75 4a.75.75 0 0 0-.75.75v7.826c0 .2.08.39.22.53l6.72 6.716a2.313 2.313 0 0 0 3.276-.001l5.61-5.611-.531-.53.532.528a2.315 2.315 0 0 0 0-3.264L13.104 4.22a.75.75 0 0 0-.53-.22H4.75ZM19 12.576a.815.815 0 0 1-.236.574l-5.61 5.611a.814.814 0 0 1-1.153 0L5.5 12.264V5.5h6.763l6.5 6.502a.816.816 0 0 1 .237.574ZM8.75 9.75a1 1 0 1 0 0-2 1 1 0 0 0 0 2Z" }) });
34604 +
34605 +
34606 + ;// ./node_modules/@wordpress/icons/build-module/library/custom-post-type.js
34607 +
34608 +
34609 + var custom_post_type_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M4 20h9v-1.5H4V20zm0-5.5V16h16v-1.5H4zm.8-4l.7.7 2-2V12h1V9.2l2 2 .7-.7-2-2H12v-1H9.2l2-2-.7-.7-2 2V4h-1v2.8l-2-2-.7.7 2 2H4v1h2.8l-2 2z" }) });
34610 +
34611 +
34612 + ;// ./node_modules/@wordpress/block-library/build-module/navigation-link/hooks.js
34613 +
34614 + function getIcon(variationName) {
34615 + switch (variationName) {
34616 + case "post":
34617 + return post_list_default;
34618 + case "page":
34619 + return page_default;
34620 + case "tag":
34621 + return tag_default;
34622 + case "category":
34623 + return category_default;
34624 + default:
34625 + return custom_post_type_default;
34626 + }
34627 + }
34628 + function enhanceNavigationLinkVariations(settings, name) {
34629 + if (name !== "core/navigation-link") {
34630 + return settings;
34631 + }
34632 + if (settings.variations) {
34633 + const isActive = (blockAttributes, variationAttributes) => {
34634 + return blockAttributes.type === variationAttributes.type;
34635 + };
34636 + const variations = settings.variations.map((variation) => {
34637 + return {
34638 + ...variation,
34639 + ...!variation.icon && {
34640 + icon: getIcon(variation.name)
34641 + },
34642 + ...!variation.isActive && {
34643 + isActive
34644 + }
34645 + };
34646 + });
34647 + return {
34648 + ...settings,
34649 + variations
34650 + };
34651 + }
34652 + return settings;
34653 + }
34654 +
34655 +
34656 + ;// ./node_modules/@wordpress/block-library/build-module/navigation-link/transforms.js
34657 +
34658 + const navigation_link_transforms_transforms = {
34659 + from: [
34660 + {
34661 + type: "block",
34662 + blocks: ["core/site-logo"],
34663 + transform: () => {
34664 + return (0,external_wp_blocks_namespaceObject.createBlock)("core/navigation-link");
34665 + }
34666 + },
34667 + {
34668 + type: "block",
34669 + blocks: ["core/spacer"],
34670 + transform: () => {
34671 + return (0,external_wp_blocks_namespaceObject.createBlock)("core/navigation-link");
34672 + }
34673 + },
34674 + {
34675 + type: "block",
34676 + blocks: ["core/home-link"],
34677 + transform: () => {
34678 + return (0,external_wp_blocks_namespaceObject.createBlock)("core/navigation-link");
34679 + }
34680 + },
34681 + {
34682 + type: "block",
34683 + blocks: ["core/social-links"],
34684 + transform: () => {
34685 + return (0,external_wp_blocks_namespaceObject.createBlock)("core/navigation-link");
34686 + }
34687 + },
34688 + {
34689 + type: "block",
34690 + blocks: ["core/search"],
34691 + transform: () => {
34692 + return (0,external_wp_blocks_namespaceObject.createBlock)("core/navigation-link");
34693 + }
34694 + },
34695 + {
34696 + type: "block",
34697 + blocks: ["core/page-list"],
34698 + transform: () => {
34699 + return (0,external_wp_blocks_namespaceObject.createBlock)("core/navigation-link");
34700 + }
34701 + },
34702 + {
34703 + type: "block",
34704 + blocks: ["core/buttons"],
34705 + transform: () => {
34706 + return (0,external_wp_blocks_namespaceObject.createBlock)("core/navigation-link");
34707 + }
34708 + }
34709 + ],
34710 + to: [
34711 + {
34712 + type: "block",
34713 + blocks: ["core/navigation-submenu"],
34714 + transform: (attributes, innerBlocks) => (0,external_wp_blocks_namespaceObject.createBlock)(
34715 + "core/navigation-submenu",
34716 + attributes,
34717 + innerBlocks
34718 + )
34719 + },
34720 + {
34721 + type: "block",
34722 + blocks: ["core/spacer"],
34723 + transform: () => {
34724 + return (0,external_wp_blocks_namespaceObject.createBlock)("core/spacer");
34725 + }
34726 + },
34727 + {
34728 + type: "block",
34729 + blocks: ["core/site-logo"],
34730 + transform: () => {
34731 + return (0,external_wp_blocks_namespaceObject.createBlock)("core/site-logo");
34732 + }
34733 + },
34734 + {
34735 + type: "block",
34736 + blocks: ["core/home-link"],
34737 + transform: () => {
34738 + return (0,external_wp_blocks_namespaceObject.createBlock)("core/home-link");
34739 + }
34740 + },
34741 + {
34742 + type: "block",
34743 + blocks: ["core/social-links"],
34744 + transform: () => {
34745 + return (0,external_wp_blocks_namespaceObject.createBlock)("core/social-links");
34746 + }
34747 + },
34748 + {
34749 + type: "block",
34750 + blocks: ["core/search"],
34751 + transform: () => {
34752 + return (0,external_wp_blocks_namespaceObject.createBlock)("core/search", {
34753 + showLabel: false,
34754 + buttonUseIcon: true,
34755 + buttonPosition: "button-inside"
34756 + });
34757 + }
34758 + },
34759 + {
34760 + type: "block",
34761 + blocks: ["core/page-list"],
34762 + transform: () => {
34763 + return (0,external_wp_blocks_namespaceObject.createBlock)("core/page-list");
34764 + }
34765 + },
34766 + {
34767 + type: "block",
34768 + blocks: ["core/buttons"],
34769 + transform: ({ label, url, rel, title, opensInNewTab }) => {
34770 + return (0,external_wp_blocks_namespaceObject.createBlock)("core/buttons", {}, [
34771 + (0,external_wp_blocks_namespaceObject.createBlock)("core/button", {
34772 + text: label,
34773 + url,
34774 + rel,
34775 + title,
34776 + linkTarget: opensInNewTab ? "_blank" : void 0
34777 + })
34778 + ]);
34779 + }
34780 + }
34781 + ]
34782 + };
34783 + var navigation_link_transforms_transforms_default = navigation_link_transforms_transforms;
34784 +
34785 +
34786 + ;// ./node_modules/@wordpress/block-library/build-module/navigation-link/index.js
34787 +
34788 +
34789 +
34790 +
34791 +
34792 +
34793 +
34794 +
34795 +
34796 +
34797 +
34798 + const { name: navigation_link_name } = navigation_link_block_namespaceObject;
34799 + const navigation_link_settings = {
34800 + icon: custom_link_default,
34801 + __experimentalLabel: ({ label }) => label,
34802 + merge(leftAttributes, { label: rightLabel = "" }) {
34803 + return {
34804 + ...leftAttributes,
34805 + label: leftAttributes.label + rightLabel
34806 + };
34807 + },
34808 + edit: NavigationLinkEdit,
34809 + save: navigation_link_save_save,
34810 + example: {
34811 + attributes: {
34812 + label: (0,external_wp_i18n_namespaceObject._x)("Example Link", "navigation link preview example"),
34813 + url: "https://example.com"
34814 + }
34815 + },
34816 + deprecated: [
34817 + {
34818 + isEligible(attributes) {
34819 + return attributes.nofollow;
34820 + },
34821 + attributes: {
34822 + label: {
34823 + type: "string"
34824 + },
34825 + type: {
34826 + type: "string"
34827 + },
34828 + nofollow: {
34829 + type: "boolean"
34830 + },
34831 + description: {
34832 + type: "string"
34833 + },
34834 + id: {
34835 + type: "number"
34836 + },
34837 + opensInNewTab: {
34838 + type: "boolean",
34839 + default: false
34840 + },
34841 + url: {
34842 + type: "string"
34843 + }
34844 + },
34845 + migrate({ nofollow, ...rest }) {
34846 + return {
34847 + rel: nofollow ? "nofollow" : "",
34848 + ...rest
34849 + };
34850 + },
34851 + save() {
34852 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, {});
34853 + }
34854 + }
34855 + ],
34856 + transforms: navigation_link_transforms_transforms_default
34857 + };
34858 + const navigation_link_init = () => {
34859 + (0,external_wp_hooks_namespaceObject.addFilter)(
34860 + "blocks.registerBlockType",
34861 + "core/navigation-link",
34862 + enhanceNavigationLinkVariations
34863 + );
34864 + return initBlock({ name: navigation_link_name, metadata: navigation_link_block_namespaceObject, settings: navigation_link_settings });
34865 + };
34866 +
34867 +
34868 + ;// ./node_modules/@wordpress/block-library/build-module/navigation-submenu/block.json
34869 + const navigation_submenu_block_namespaceObject = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/navigation-submenu","title":"Submenu","category":"design","parent":["core/navigation"],"description":"Add a submenu to your navigation.","textdomain":"default","attributes":{"label":{"type":"string","role":"content"},"type":{"type":"string"},"description":{"type":"string"},"rel":{"type":"string"},"id":{"type":"number"},"opensInNewTab":{"type":"boolean","default":false},"url":{"type":"string"},"title":{"type":"string"},"kind":{"type":"string"},"isTopLevelItem":{"type":"boolean"}},"usesContext":["textColor","customTextColor","backgroundColor","customBackgroundColor","overlayTextColor","customOverlayTextColor","overlayBackgroundColor","customOverlayBackgroundColor","fontSize","customFontSize","showSubmenuIcon","maxNestingLevel","openSubmenusOnClick","style"],"supports":{"reusable":false,"html":false,"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"interactivity":{"clientNavigation":true}},"editorStyle":"wp-block-navigation-submenu-editor","style":"wp-block-navigation-submenu"}');
34870 + ;// ./node_modules/@wordpress/icons/build-module/library/remove-submenu.js
34871 +
34872 +
34873 + var remove_submenu_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
34874 + external_wp_primitives_namespaceObject.Path,
34875 + {
34876 + fillRule: "evenodd",
34877 + clipRule: "evenodd",
34878 + d: "m13.955 20.748 8-17.5-.91-.416L19.597 6H13.5v1.5h5.411l-1.6 3.5H13.5v1.5h3.126l-1.6 3.5H13.5l.028 1.5h.812l-1.295 2.832.91.416ZM17.675 16l-.686 1.5h4.539L21.5 16h-3.825Zm2.286-5-.686 1.5H21.5V11h-1.54ZM2 12c0 3.58 2.42 5.5 6 5.5h.5V19l3-2.5-3-2.5v2H8c-2.48 0-4.5-1.52-4.5-4S5.52 7.5 8 7.5h3.5V6H8c-3.58 0-6 2.42-6 6Z"
34879 + }
34880 + ) });
34881 +
34882 +
34883 + ;// ./node_modules/@wordpress/block-library/build-module/navigation-submenu/icons.js
34884 +
34885 +
34886 + const ItemSubmenuIcon = () => /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
34887 + external_wp_components_namespaceObject.SVG,
34888 + {
34889 + xmlns: "http://www.w3.org/2000/svg",
34890 + width: "12",
34891 + height: "12",
34892 + viewBox: "0 0 12 12",
34893 + fill: "none",
34894 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Path, { d: "M1.50002 4L6.00002 8L10.5 4", strokeWidth: "1.5" })
34895 + }
34896 + );
34897 +
34898 +
34899 + ;// ./node_modules/@wordpress/block-library/build-module/navigation-submenu/edit.js
34900 +
34901 +
34902 +
34903 +
34904 +
34905 +
34906 +
34907 +
34908 +
34909 +
34910 +
34911 +
34912 +
34913 +
34914 +
34915 +
34916 +
34917 + const ALLOWED_BLOCKS = [
34918 + "core/navigation-link",
34919 + "core/navigation-submenu",
34920 + "core/page-list"
34921 + ];
34922 + const edit_useIsDraggingWithin = (elementRef) => {
34923 + const [isDraggingWithin, setIsDraggingWithin] = (0,external_wp_element_namespaceObject.useState)(false);
34924 + (0,external_wp_element_namespaceObject.useEffect)(() => {
34925 + const { ownerDocument } = elementRef.current;
34926 + function handleDragStart(event) {
34927 + handleDragEnter(event);
34928 + }
34929 + function handleDragEnd() {
34930 + setIsDraggingWithin(false);
34931 + }
34932 + function handleDragEnter(event) {
34933 + if (elementRef.current.contains(event.target)) {
34934 + setIsDraggingWithin(true);
34935 + } else {
34936 + setIsDraggingWithin(false);
34937 + }
34938 + }
34939 + ownerDocument.addEventListener("dragstart", handleDragStart);
34940 + ownerDocument.addEventListener("dragend", handleDragEnd);
34941 + ownerDocument.addEventListener("dragenter", handleDragEnter);
34942 + return () => {
34943 + ownerDocument.removeEventListener("dragstart", handleDragStart);
34944 + ownerDocument.removeEventListener("dragend", handleDragEnd);
34945 + ownerDocument.removeEventListener("dragenter", handleDragEnter);
34946 + };
34947 + }, []);
34948 + return isDraggingWithin;
34949 + };
34950 + function NavigationSubmenuEdit({
34951 + attributes,
34952 + isSelected,
34953 + setAttributes,
34954 + mergeBlocks,
34955 + onReplace,
34956 + context,
34957 + clientId
34958 + }) {
34959 + const { label, url, description } = attributes;
34960 + const {
34961 + showSubmenuIcon,
34962 + maxNestingLevel,
34963 + openSubmenusOnClick: contextOpenSubmenusOnClick
34964 + } = context;
34965 + const blockEditingMode = (0,external_wp_blockEditor_namespaceObject.useBlockEditingMode)();
34966 + const openSubmenusOnClick = blockEditingMode !== "default" ? true : contextOpenSubmenusOnClick;
34967 + const { clearBinding, createBinding } = useEntityBinding({
34968 + clientId,
34969 + attributes
34970 + });
34971 + const { __unstableMarkNextChangeAsNotPersistent, replaceBlock } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_blockEditor_namespaceObject.store);
34972 + const [isLinkOpen, setIsLinkOpen] = (0,external_wp_element_namespaceObject.useState)(false);
34973 + const [popoverAnchor, setPopoverAnchor] = (0,external_wp_element_namespaceObject.useState)(null);
34974 + const listItemRef = (0,external_wp_element_namespaceObject.useRef)(null);
34975 + const isDraggingWithin = edit_useIsDraggingWithin(listItemRef);
34976 + const itemLabelPlaceholder = (0,external_wp_i18n_namespaceObject.__)("Add text\u2026");
34977 + const ref = (0,external_wp_element_namespaceObject.useRef)();
34978 + const {
34979 + parentCount,
34980 + isParentOfSelectedBlock,
34981 + isImmediateParentOfSelectedBlock,
34982 + hasChildren,
34983 + selectedBlockHasChildren,
34984 + onlyDescendantIsEmptyLink
34985 + } = (0,external_wp_data_namespaceObject.useSelect)(
34986 + (select) => {
34987 + const {
34988 + hasSelectedInnerBlock,
34989 + getSelectedBlockClientId,
34990 + getBlockParentsByBlockName,
34991 + getBlock,
34992 + getBlockCount,
34993 + getBlockOrder
34994 + } = select(external_wp_blockEditor_namespaceObject.store);
34995 + let _onlyDescendantIsEmptyLink;
34996 + const selectedBlockId = getSelectedBlockClientId();
34997 + const selectedBlockChildren = getBlockOrder(selectedBlockId);
34998 + if (selectedBlockChildren?.length === 1) {
34999 + const singleBlock = getBlock(selectedBlockChildren[0]);
35000 + _onlyDescendantIsEmptyLink = singleBlock?.name === "core/navigation-link" && !singleBlock?.attributes?.label;
35001 + }
35002 + return {
35003 + parentCount: getBlockParentsByBlockName(
35004 + clientId,
35005 + "core/navigation-submenu"
35006 + ).length,
35007 + isParentOfSelectedBlock: hasSelectedInnerBlock(
35008 + clientId,
35009 + true
35010 + ),
35011 + isImmediateParentOfSelectedBlock: hasSelectedInnerBlock(
35012 + clientId,
35013 + false
35014 + ),
35015 + hasChildren: !!getBlockCount(clientId),
35016 + selectedBlockHasChildren: !!selectedBlockChildren?.length,
35017 + onlyDescendantIsEmptyLink: _onlyDescendantIsEmptyLink
35018 + };
35019 + },
35020 + [clientId]
35021 + );
35022 + const prevHasChildren = (0,external_wp_compose_namespaceObject.usePrevious)(hasChildren);
35023 + (0,external_wp_element_namespaceObject.useEffect)(() => {
35024 + if (!openSubmenusOnClick && !url) {
35025 + setIsLinkOpen(true);
35026 + }
35027 + }, []);
35028 + (0,external_wp_element_namespaceObject.useEffect)(() => {
35029 + if (!isSelected) {
35030 + setIsLinkOpen(false);
35031 + }
35032 + }, [isSelected]);
35033 + (0,external_wp_element_namespaceObject.useEffect)(() => {
35034 + if (isLinkOpen && url) {
35035 + if ((0,external_wp_url_namespaceObject.isURL)((0,external_wp_url_namespaceObject.prependHTTP)(label)) && /^.+\.[a-z]+/.test(label)) {
35036 + selectLabelText();
35037 + }
35038 + }
35039 + }, [url]);
35040 + function selectLabelText() {
35041 + ref.current.focus();
35042 + const { ownerDocument } = ref.current;
35043 + const { defaultView } = ownerDocument;
35044 + const selection = defaultView.getSelection();
35045 + const range = ownerDocument.createRange();
35046 + range.selectNodeContents(ref.current);
35047 + selection.removeAllRanges();
35048 + selection.addRange(range);
35049 + }
35050 + const {
35051 + textColor,
35052 + customTextColor,
35053 + backgroundColor,
35054 + customBackgroundColor
35055 + } = getColors(context, parentCount > 0);
35056 + function onKeyDown(event) {
35057 + if (external_wp_keycodes_namespaceObject.isKeyboardEvent.primary(event, "k")) {
35058 + event.preventDefault();
35059 + event.stopPropagation();
35060 + setIsLinkOpen(true);
35061 + }
35062 + }
35063 + const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)({
35064 + ref: (0,external_wp_compose_namespaceObject.useMergeRefs)([setPopoverAnchor, listItemRef]),
35065 + className: dist_clsx("wp-block-navigation-item", {
35066 + "is-editing": isSelected || isParentOfSelectedBlock,
35067 + "is-dragging-within": isDraggingWithin,
35068 + "has-link": !!url,
35069 + "has-child": hasChildren,
35070 + "has-text-color": !!textColor || !!customTextColor,
35071 + [(0,external_wp_blockEditor_namespaceObject.getColorClassName)("color", textColor)]: !!textColor,
35072 + "has-background": !!backgroundColor || customBackgroundColor,
35073 + [(0,external_wp_blockEditor_namespaceObject.getColorClassName)("background-color", backgroundColor)]: !!backgroundColor,
35074 + "open-on-click": openSubmenusOnClick
35075 + }),
35076 + style: {
35077 + color: !textColor && customTextColor,
35078 + backgroundColor: !backgroundColor && customBackgroundColor
35079 + },
35080 + onKeyDown
35081 + });
35082 + const innerBlocksColors = getColors(context, true);
35083 + const allowedBlocks = parentCount >= maxNestingLevel ? ALLOWED_BLOCKS.filter(
35084 + (blockName) => blockName !== "core/navigation-submenu"
35085 + ) : ALLOWED_BLOCKS;
35086 + const navigationChildBlockProps = getNavigationChildBlockProps(innerBlocksColors);
35087 + const innerBlocksProps = (0,external_wp_blockEditor_namespaceObject.useInnerBlocksProps)(navigationChildBlockProps, {
35088 + allowedBlocks,
35089 + defaultBlock: constants_DEFAULT_BLOCK,
35090 + directInsert: true,
35091 + // Ensure block toolbar is not too far removed from item
35092 + // being edited.
35093 + // see: https://github.com/WordPress/gutenberg/pull/34615.
35094 + __experimentalCaptureToolbars: true,
35095 + renderAppender: isSelected || isImmediateParentOfSelectedBlock && !selectedBlockHasChildren || // Show the appender while dragging to allow inserting element between item and the appender.
35096 + hasChildren ? external_wp_blockEditor_namespaceObject.InnerBlocks.ButtonBlockAppender : false
35097 + });
35098 + const ParentElement = openSubmenusOnClick ? "button" : "a";
35099 + function transformToLink() {
35100 + const newLinkBlock = (0,external_wp_blocks_namespaceObject.createBlock)("core/navigation-link", attributes);
35101 + replaceBlock(clientId, newLinkBlock);
35102 + }
35103 + (0,external_wp_element_namespaceObject.useEffect)(() => {
35104 + if (!hasChildren && prevHasChildren) {
35105 + __unstableMarkNextChangeAsNotPersistent();
35106 + transformToLink();
35107 + }
35108 + }, [hasChildren, prevHasChildren]);
35109 + const canConvertToLink = !selectedBlockHasChildren || onlyDescendantIsEmptyLink;
35110 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
35111 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockControls, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.ToolbarGroup, { children: [
35112 + !openSubmenusOnClick && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
35113 + external_wp_components_namespaceObject.ToolbarButton,
35114 + {
35115 + name: "link",
35116 + icon: link_default,
35117 + title: (0,external_wp_i18n_namespaceObject.__)("Link"),
35118 + shortcut: external_wp_keycodes_namespaceObject.displayShortcut.primary("k"),
35119 + onClick: () => {
35120 + setIsLinkOpen(true);
35121 + }
35122 + }
35123 + ),
35124 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
35125 + external_wp_components_namespaceObject.ToolbarButton,
35126 + {
35127 + name: "revert",
35128 + icon: remove_submenu_default,
35129 + title: (0,external_wp_i18n_namespaceObject.__)("Convert to Link"),
35130 + onClick: transformToLink,
35131 + className: "wp-block-navigation__submenu__revert",
35132 + disabled: !canConvertToLink
35133 + }
35134 + )
35135 + ] }) }),
35136 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
35137 + controls_Controls,
35138 + {
35139 + attributes,
35140 + setAttributes,
35141 + clientId
35142 + }
35143 + ) }),
35144 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", { ...blockProps, children: [
35145 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(ParentElement, { className: "wp-block-navigation-item__content", children: [
35146 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
35147 + external_wp_blockEditor_namespaceObject.RichText,
35148 + {
35149 + ref,
35150 + identifier: "label",
35151 + className: "wp-block-navigation-item__label",
35152 + value: label,
35153 + onChange: (labelValue) => setAttributes({ label: labelValue }),
35154 + onMerge: mergeBlocks,
35155 + onReplace,
35156 + "aria-label": (0,external_wp_i18n_namespaceObject.__)("Navigation link text"),
35157 + placeholder: itemLabelPlaceholder,
35158 + withoutInteractiveFormatting: true,
35159 + onClick: () => {
35160 + if (!openSubmenusOnClick && !url) {
35161 + setIsLinkOpen(true);
35162 + }
35163 + }
35164 + }
35165 + ),
35166 + description && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("span", { className: "wp-block-navigation-item__description", children: description }),
35167 + !openSubmenusOnClick && isLinkOpen && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
35168 + LinkUI,
35169 + {
35170 + clientId,
35171 + link: attributes,
35172 + onClose: () => {
35173 + setIsLinkOpen(false);
35174 + },
35175 + anchor: popoverAnchor,
35176 + onRemove: () => {
35177 + setAttributes({ url: "" });
35178 + (0,external_wp_a11y_namespaceObject.speak)((0,external_wp_i18n_namespaceObject.__)("Link removed."), "assertive");
35179 + },
35180 + onChange: (updatedValue) => {
35181 + const {
35182 + isEntityLink,
35183 + attributes: updatedAttributes
35184 + } = updateAttributes(
35185 + updatedValue,
35186 + setAttributes,
35187 + attributes
35188 + );
35189 + if (isEntityLink) {
35190 + createBinding(updatedAttributes);
35191 + } else {
35192 + clearBinding(updatedAttributes);
35193 + }
35194 + }
35195 + }
35196 + )
35197 + ] }),
35198 + (showSubmenuIcon || openSubmenusOnClick) && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("span", { className: "wp-block-navigation__submenu-icon", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(ItemSubmenuIcon, {}) }),
35199 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { ...innerBlocksProps })
35200 + ] })
35201 + ] });
35202 + }
35203 +
35204 +
35205 + ;// ./node_modules/@wordpress/block-library/build-module/navigation-submenu/save.js
35206 +
35207 +
35208 + function navigation_submenu_save_save() {
35209 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, {});
35210 + }
35211 +
35212 +
35213 + ;// ./node_modules/@wordpress/block-library/build-module/navigation-submenu/transforms.js
35214 +
35215 + const navigation_submenu_transforms_transforms = {
35216 + to: [
35217 + {
35218 + type: "block",
35219 + blocks: ["core/navigation-link"],
35220 + isMatch: (attributes, block) => block?.innerBlocks?.length === 0,
35221 + transform: (attributes) => (0,external_wp_blocks_namespaceObject.createBlock)("core/navigation-link", attributes)
35222 + },
35223 + {
35224 + type: "block",
35225 + blocks: ["core/spacer"],
35226 + isMatch: (attributes, block) => block?.innerBlocks?.length === 0,
35227 + transform: () => {
35228 + return (0,external_wp_blocks_namespaceObject.createBlock)("core/spacer");
35229 + }
35230 + },
35231 + {
35232 + type: "block",
35233 + blocks: ["core/site-logo"],
35234 + isMatch: (attributes, block) => block?.innerBlocks?.length === 0,
35235 + transform: () => {
35236 + return (0,external_wp_blocks_namespaceObject.createBlock)("core/site-logo");
35237 + }
35238 + },
35239 + {
35240 + type: "block",
35241 + blocks: ["core/home-link"],
35242 + isMatch: (attributes, block) => block?.innerBlocks?.length === 0,
35243 + transform: () => {
35244 + return (0,external_wp_blocks_namespaceObject.createBlock)("core/home-link");
35245 + }
35246 + },
35247 + {
35248 + type: "block",
35249 + blocks: ["core/social-links"],
35250 + isMatch: (attributes, block) => block?.innerBlocks?.length === 0,
35251 + transform: () => {
35252 + return (0,external_wp_blocks_namespaceObject.createBlock)("core/social-links");
35253 + }
35254 + },
35255 + {
35256 + type: "block",
35257 + blocks: ["core/search"],
35258 + isMatch: (attributes, block) => block?.innerBlocks?.length === 0,
35259 + transform: () => {
35260 + return (0,external_wp_blocks_namespaceObject.createBlock)("core/search");
35261 + }
35262 + }
35263 + ]
35264 + };
35265 + var navigation_submenu_transforms_transforms_default = navigation_submenu_transforms_transforms;
35266 +
35267 +
35268 + ;// ./node_modules/@wordpress/block-library/build-module/navigation-submenu/index.js
35269 +
35270 +
35271 +
35272 +
35273 +
35274 +
35275 +
35276 + const { name: navigation_submenu_name } = navigation_submenu_block_namespaceObject;
35277 + const navigation_submenu_settings = {
35278 + icon: ({ context }) => {
35279 + if (context === "list-view") {
35280 + return page_default;
35281 + }
35282 + return add_submenu_default;
35283 + },
35284 + __experimentalLabel(attributes, { context }) {
35285 + const { label } = attributes;
35286 + const customName = attributes?.metadata?.name;
35287 + if (context === "list-view" && (customName || label)) {
35288 + return attributes?.metadata?.name || label;
35289 + }
35290 + return label;
35291 + },
35292 + edit: NavigationSubmenuEdit,
35293 + example: {
35294 + attributes: {
35295 + label: (0,external_wp_i18n_namespaceObject._x)("About", "Example link text for Navigation Submenu"),
35296 + type: "page"
35297 + }
35298 + },
35299 + save: navigation_submenu_save_save,
35300 + transforms: navigation_submenu_transforms_transforms_default
35301 + };
35302 + const navigation_submenu_init = () => initBlock({ name: navigation_submenu_name, metadata: navigation_submenu_block_namespaceObject, settings: navigation_submenu_settings });
35303 +
35304 +
35305 + ;// ./node_modules/@wordpress/icons/build-module/library/page-break.js
35306 +
35307 +
35308 + var page_break_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M17.5 9V6a2 2 0 0 0-2-2h-7a2 2 0 0 0-2 2v3H8V6a.5.5 0 0 1 .5-.5h7a.5.5 0 0 1 .5.5v3h1.5Zm0 6.5V18a2 2 0 0 1-2 2h-7a2 2 0 0 1-2-2v-2.5H8V18a.5.5 0 0 0 .5.5h7a.5.5 0 0 0 .5-.5v-2.5h1.5ZM4 13h16v-1.5H4V13Z" }) });
35309 +
35310 +
35311 + ;// ./node_modules/@wordpress/block-library/build-module/nextpage/edit.js
35312 +
35313 +
35314 +
35315 + function NextPageEdit() {
35316 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { ...(0,external_wp_blockEditor_namespaceObject.useBlockProps)(), children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("span", { children: (0,external_wp_i18n_namespaceObject.__)("Page break") }) });
35317 + }
35318 +
35319 +
35320 + ;// ./node_modules/@wordpress/block-library/build-module/nextpage/block.json
35321 + const nextpage_block_namespaceObject = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/nextpage","title":"Page Break","category":"design","description":"Separate your content into a multi-page experience.","keywords":["next page","pagination"],"parent":["core/post-content"],"textdomain":"default","supports":{"customClassName":false,"className":false,"html":false,"interactivity":{"clientNavigation":true}},"editorStyle":"wp-block-nextpage-editor"}');
35322 + ;// ./node_modules/@wordpress/block-library/build-module/nextpage/save.js
35323 +
35324 +
35325 + function nextpage_save_save() {
35326 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_element_namespaceObject.RawHTML, { children: "<!--nextpage-->" });
35327 + }
35328 +
35329 +
35330 + ;// ./node_modules/@wordpress/block-library/build-module/nextpage/transforms.js
35331 +
35332 + const nextpage_transforms_transforms = {
35333 + from: [
35334 + {
35335 + type: "raw",
35336 + schema: {
35337 + "wp-block": { attributes: ["data-block"] }
35338 + },
35339 + isMatch: (node) => node.dataset && node.dataset.block === "core/nextpage",
35340 + transform() {
35341 + return (0,external_wp_blocks_namespaceObject.createBlock)("core/nextpage", {});
35342 + }
35343 + }
35344 + ]
35345 + };
35346 + var nextpage_transforms_transforms_default = nextpage_transforms_transforms;
35347 +
35348 +
35349 + ;// ./node_modules/@wordpress/block-library/build-module/nextpage/index.js
35350 +
35351 +
35352 +
35353 +
35354 +
35355 +
35356 + const { name: nextpage_name } = nextpage_block_namespaceObject;
35357 + const nextpage_settings = {
35358 + icon: page_break_default,
35359 + example: {},
35360 + transforms: nextpage_transforms_transforms_default,
35361 + edit: NextPageEdit,
35362 + save: nextpage_save_save
35363 + };
35364 + const nextpage_init = () => initBlock({ name: nextpage_name, metadata: nextpage_block_namespaceObject, settings: nextpage_settings });
35365 +
35366 +
35367 + ;// ./node_modules/@wordpress/block-library/build-module/pattern/block.json
35368 + const pattern_block_namespaceObject = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/pattern","title":"Pattern Placeholder","category":"theme","description":"Show a block pattern.","supports":{"html":false,"inserter":false,"renaming":false,"visibility":false,"interactivity":{"clientNavigation":true}},"textdomain":"default","attributes":{"slug":{"type":"string"}}}');
35369 + ;// ./node_modules/@wordpress/block-library/build-module/pattern/recursion-detector.js
35370 +
35371 + const cachedParsers = /* @__PURE__ */ new WeakMap();
35372 + function useParsePatternDependencies() {
35373 + const registry = (0,external_wp_data_namespaceObject.useRegistry)();
35374 + if (!cachedParsers.has(registry)) {
35375 + const deps = /* @__PURE__ */ new Map();
35376 + cachedParsers.set(
35377 + registry,
35378 + parsePatternDependencies.bind(null, deps)
35379 + );
35380 + }
35381 + return cachedParsers.get(registry);
35382 + }
35383 + function parsePatternDependencies(deps, { name, blocks }) {
35384 + const queue = [...blocks];
35385 + while (queue.length) {
35386 + const block = queue.shift();
35387 + for (const innerBlock of block.innerBlocks ?? []) {
35388 + queue.unshift(innerBlock);
35389 + }
35390 + if (block.name === "core/pattern") {
35391 + registerDependency(deps, name, block.attributes.slug);
35392 + }
35393 + }
35394 + }
35395 + function registerDependency(deps, a, b) {
35396 + if (!deps.has(a)) {
35397 + deps.set(a, /* @__PURE__ */ new Set());
35398 + }
35399 + deps.get(a).add(b);
35400 + if (hasCycle(deps, a)) {
35401 + throw new TypeError(
35402 + `Pattern ${a} has a circular dependency and cannot be rendered.`
35403 + );
35404 + }
35405 + }
35406 + function hasCycle(deps, slug, visitedNodes = /* @__PURE__ */ new Set(), currentPath = /* @__PURE__ */ new Set()) {
35407 + visitedNodes.add(slug);
35408 + currentPath.add(slug);
35409 + const dependencies = deps.get(slug) ?? /* @__PURE__ */ new Set();
35410 + for (const dependency of dependencies) {
35411 + if (!visitedNodes.has(dependency)) {
35412 + if (hasCycle(deps, dependency, visitedNodes, currentPath)) {
35413 + return true;
35414 + }
35415 + } else if (currentPath.has(dependency)) {
35416 + return true;
35417 + }
35418 + }
35419 + currentPath.delete(slug);
35420 + return false;
35421 + }
35422 +
35423 +
35424 + ;// ./node_modules/@wordpress/block-library/build-module/pattern/edit.js
35425 +
35426 +
35427 +
35428 +
35429 +
35430 +
35431 +
35432 +
35433 + const PatternEdit = ({ attributes, clientId }) => {
35434 + const registry = (0,external_wp_data_namespaceObject.useRegistry)();
35435 + const selectedPattern = (0,external_wp_data_namespaceObject.useSelect)(
35436 + (select) => select(external_wp_blockEditor_namespaceObject.store).__experimentalGetParsedPattern(
35437 + attributes.slug
35438 + ),
35439 + [attributes.slug]
35440 + );
35441 + const currentThemeStylesheet = (0,external_wp_data_namespaceObject.useSelect)(
35442 + (select) => select(external_wp_coreData_namespaceObject.store).getCurrentTheme()?.stylesheet,
35443 + []
35444 + );
35445 + const {
35446 + replaceBlocks,
35447 + setBlockEditingMode,
35448 + __unstableMarkNextChangeAsNotPersistent
35449 + } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_blockEditor_namespaceObject.store);
35450 + const { getBlockRootClientId, getBlockEditingMode } = (0,external_wp_data_namespaceObject.useSelect)(external_wp_blockEditor_namespaceObject.store);
35451 + const [hasRecursionError, setHasRecursionError] = (0,external_wp_element_namespaceObject.useState)(false);
35452 + const parsePatternDependencies = useParsePatternDependencies();
35453 + function injectThemeAttributeInBlockTemplateContent(block) {
35454 + if (block.innerBlocks.find(
35455 + (innerBlock) => innerBlock.name === "core/template-part"
35456 + )) {
35457 + block.innerBlocks = block.innerBlocks.map((innerBlock) => {
35458 + if (innerBlock.name === "core/template-part" && innerBlock.attributes.theme === void 0) {
35459 + innerBlock.attributes.theme = currentThemeStylesheet;
35460 + }
35461 + return innerBlock;
35462 + });
35463 + }
35464 + if (block.name === "core/template-part" && block.attributes.theme === void 0) {
35465 + block.attributes.theme = currentThemeStylesheet;
35466 + }
35467 + return block;
35468 + }
35469 + (0,external_wp_element_namespaceObject.useEffect)(() => {
35470 + if (!hasRecursionError && selectedPattern?.blocks) {
35471 + try {
35472 + parsePatternDependencies(selectedPattern);
35473 + } catch (error) {
35474 + setHasRecursionError(true);
35475 + return;
35476 + }
35477 + window.queueMicrotask(() => {
35478 + const rootClientId = getBlockRootClientId(clientId);
35479 + const clonedBlocks = selectedPattern.blocks.map(
35480 + (block) => (0,external_wp_blocks_namespaceObject.cloneBlock)(
35481 + injectThemeAttributeInBlockTemplateContent(block)
35482 + )
35483 + );
35484 + if (clonedBlocks.length === 1 && selectedPattern.categories?.length > 0) {
35485 + clonedBlocks[0].attributes = {
35486 + ...clonedBlocks[0].attributes,
35487 + metadata: {
35488 + ...clonedBlocks[0].attributes.metadata,
35489 + categories: selectedPattern.categories,
35490 + patternName: selectedPattern.name,
35491 + name: clonedBlocks[0].attributes.metadata.name || selectedPattern.title
35492 + }
35493 + };
35494 + }
35495 + const rootEditingMode = getBlockEditingMode(rootClientId);
35496 + registry.batch(() => {
35497 + __unstableMarkNextChangeAsNotPersistent();
35498 + setBlockEditingMode(rootClientId, "default");
35499 + __unstableMarkNextChangeAsNotPersistent();
35500 + replaceBlocks(clientId, clonedBlocks);
35501 + __unstableMarkNextChangeAsNotPersistent();
35502 + setBlockEditingMode(rootClientId, rootEditingMode);
35503 + });
35504 + });
35505 + }
35506 + }, [
35507 + clientId,
35508 + hasRecursionError,
35509 + selectedPattern,
35510 + __unstableMarkNextChangeAsNotPersistent,
35511 + replaceBlocks,
35512 + getBlockEditingMode,
35513 + setBlockEditingMode,
35514 + getBlockRootClientId
35515 + ]);
35516 + const props = (0,external_wp_blockEditor_namespaceObject.useBlockProps)();
35517 + if (hasRecursionError) {
35518 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { ...props, children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.Warning, { children: (0,external_wp_i18n_namespaceObject.sprintf)(
35519 + // translators: A warning in which %s is the name of a pattern.
35520 + (0,external_wp_i18n_namespaceObject.__)('Pattern "%s" cannot be rendered inside itself.'),
35521 + selectedPattern?.name
35522 + ) }) });
35523 + }
35524 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { ...props });
35525 + };
35526 + var pattern_edit_edit_default = PatternEdit;
35527 +
35528 +
35529 + ;// ./node_modules/@wordpress/block-library/build-module/pattern/index.js
35530 +
35531 +
35532 +
35533 + const { name: pattern_name } = pattern_block_namespaceObject;
35534 + const pattern_settings = {
35535 + edit: pattern_edit_edit_default
35536 + };
35537 + const pattern_init = () => initBlock({ name: pattern_name, metadata: pattern_block_namespaceObject, settings: pattern_settings });
35538 +
35539 +
35540 + ;// ./node_modules/@wordpress/icons/build-module/library/pages.js
35541 +
35542 +
35543 + var pages_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: [
35544 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M14.5 5.5h-7V7h7V5.5ZM7.5 9h7v1.5h-7V9Zm7 3.5h-7V14h7v-1.5Z" }),
35545 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M16 2H6a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V4a2 2 0 0 0-2-2ZM6 3.5h10a.5.5 0 0 1 .5.5v12a.5.5 0 0 1-.5.5H6a.5.5 0 0 1-.5-.5V4a.5.5 0 0 1 .5-.5Z" }),
35546 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M20 8v11c0 .69-.31 1-.999 1H6v1.5h13.001c1.52 0 2.499-.982 2.499-2.5V8H20Z" })
35547 + ] });
35548 +
35549 +
35550 + ;// ./node_modules/@wordpress/block-library/build-module/page-list/block.json
35551 + const page_list_block_namespaceObject = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/page-list","title":"Page List","category":"widgets","allowedBlocks":["core/page-list-item"],"description":"Display a list of all pages.","keywords":["menu","navigation"],"textdomain":"default","attributes":{"parentPageID":{"type":"integer","default":0},"isNested":{"type":"boolean","default":false}},"usesContext":["textColor","customTextColor","backgroundColor","customBackgroundColor","overlayTextColor","customOverlayTextColor","overlayBackgroundColor","customOverlayBackgroundColor","fontSize","customFontSize","showSubmenuIcon","style","openSubmenusOnClick"],"supports":{"reusable":false,"html":false,"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"interactivity":{"clientNavigation":true},"color":{"text":true,"background":true,"link":true,"gradients":true,"__experimentalDefaultControls":{"background":true,"text":true,"link":true}},"__experimentalBorder":{"radius":true,"color":true,"width":true,"style":true},"spacing":{"padding":true,"margin":true,"__experimentalDefaultControls":{"padding":false,"margin":false}},"contentRole":true},"editorStyle":"wp-block-page-list-editor","style":"wp-block-page-list"}');
35552 + ;// ./node_modules/@wordpress/block-library/build-module/page-list/use-convert-to-navigation-links.js
35553 +
35554 +
35555 +
35556 +
35557 + function createNavigationLinks(pages = []) {
35558 + const POST_TYPE_KIND = "post-type";
35559 + const linkMap = {};
35560 + const navigationLinks = [];
35561 + pages.forEach(({ id, title, link: url, type, parent }) => {
35562 + const innerBlocks = linkMap[id]?.innerBlocks ?? [];
35563 + linkMap[id] = (0,external_wp_blocks_namespaceObject.createBlock)(
35564 + "core/navigation-link",
35565 + {
35566 + id,
35567 + label: title.rendered,
35568 + url,
35569 + type,
35570 + kind: POST_TYPE_KIND,
35571 + metadata: {
35572 + bindings: buildNavigationLinkEntityBinding(POST_TYPE_KIND)
35573 + }
35574 + },
35575 + innerBlocks
35576 + );
35577 + if (!parent) {
35578 + navigationLinks.push(linkMap[id]);
35579 + } else {
35580 + if (!linkMap[parent]) {
35581 + linkMap[parent] = { innerBlocks: [] };
35582 + }
35583 + const parentLinkInnerBlocks = linkMap[parent].innerBlocks;
35584 + parentLinkInnerBlocks.push(linkMap[id]);
35585 + }
35586 + });
35587 + return navigationLinks;
35588 + }
35589 + function findNavigationLinkById(navigationLinks, id) {
35590 + for (const navigationLink of navigationLinks) {
35591 + if (navigationLink.attributes.id === id) {
35592 + return navigationLink;
35593 + }
35594 + if (navigationLink.innerBlocks && navigationLink.innerBlocks.length) {
35595 + const foundNavigationLink = findNavigationLinkById(
35596 + navigationLink.innerBlocks,
35597 + id
35598 + );
35599 + if (foundNavigationLink) {
35600 + return foundNavigationLink;
35601 + }
35602 + }
35603 + }
35604 + return null;
35605 + }
35606 + function convertToNavigationLinks(pages = [], parentPageID = null) {
35607 + let navigationLinks = createNavigationLinks(pages);
35608 + if (parentPageID) {
35609 + const parentPage = findNavigationLinkById(
35610 + navigationLinks,
35611 + parentPageID
35612 + );
35613 + if (parentPage && parentPage.innerBlocks) {
35614 + navigationLinks = parentPage.innerBlocks;
35615 + }
35616 + }
35617 + const transformSubmenus = (listOfLinks) => {
35618 + listOfLinks.forEach((block, index, listOfLinksArray) => {
35619 + const { attributes, innerBlocks } = block;
35620 + if (innerBlocks.length !== 0) {
35621 + transformSubmenus(innerBlocks);
35622 + const transformedBlock = (0,external_wp_blocks_namespaceObject.createBlock)(
35623 + "core/navigation-submenu",
35624 + attributes,
35625 + innerBlocks
35626 + );
35627 + listOfLinksArray[index] = transformedBlock;
35628 + }
35629 + });
35630 + };
35631 + transformSubmenus(navigationLinks);
35632 + return navigationLinks;
35633 + }
35634 + function useConvertToNavigationLinks({
35635 + clientId,
35636 + pages,
35637 + parentClientId,
35638 + parentPageID
35639 + }) {
35640 + const { replaceBlock, selectBlock } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_blockEditor_namespaceObject.store);
35641 + return () => {
35642 + const navigationLinks = convertToNavigationLinks(pages, parentPageID);
35643 + replaceBlock(clientId, navigationLinks);
35644 + selectBlock(parentClientId);
35645 + };
35646 + }
35647 +
35648 +
35649 + ;// ./node_modules/@wordpress/block-library/build-module/page-list/convert-to-links-modal.js
35650 +
35651 +
35652 +
35653 +
35654 + const convertDescription = (0,external_wp_i18n_namespaceObject.__)(
35655 + "This Navigation Menu displays your website's pages. Editing it will enable you to add, delete, or reorder pages. However, new pages will no longer be added automatically."
35656 + );
35657 + function ConvertToLinksModal({ onClick, onClose, disabled }) {
35658 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(
35659 + external_wp_components_namespaceObject.Modal,
35660 + {
35661 + onRequestClose: onClose,
35662 + title: (0,external_wp_i18n_namespaceObject.__)("Edit Page List"),
35663 + className: "wp-block-page-list-modal",
35664 + aria: {
35665 + describedby: (0,external_wp_compose_namespaceObject.useInstanceId)(
35666 + ConvertToLinksModal,
35667 + "wp-block-page-list-modal__description"
35668 + )
35669 + },
35670 + children: [
35671 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
35672 + "p",
35673 + {
35674 + id: (0,external_wp_compose_namespaceObject.useInstanceId)(
35675 + ConvertToLinksModal,
35676 + "wp-block-page-list-modal__description"
35677 + ),
35678 + children: convertDescription
35679 + }
35680 + ),
35681 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", { className: "wp-block-page-list-modal-buttons", children: [
35682 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
35683 + external_wp_components_namespaceObject.Button,
35684 + {
35685 + __next40pxDefaultSize: true,
35686 + variant: "tertiary",
35687 + onClick: onClose,
35688 + children: (0,external_wp_i18n_namespaceObject.__)("Cancel")
35689 + }
35690 + ),
35691 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
35692 + external_wp_components_namespaceObject.Button,
35693 + {
35694 + __next40pxDefaultSize: true,
35695 + variant: "primary",
35696 + accessibleWhenDisabled: true,
35697 + disabled,
35698 + onClick,
35699 + children: (0,external_wp_i18n_namespaceObject.__)("Edit")
35700 + }
35701 + )
35702 + ] })
35703 + ]
35704 + }
35705 + );
35706 + }
35707 +
35708 +
35709 + ;// ./node_modules/@wordpress/block-library/build-module/page-list/edit.js
35710 +
35711 +
35712 +
35713 +
35714 +
35715 +
35716 +
35717 +
35718 +
35719 +
35720 +
35721 +
35722 + const MAX_PAGE_COUNT = 100;
35723 + const NOOP = () => {
35724 + };
35725 + function BlockContent({
35726 + blockProps,
35727 + innerBlocksProps,
35728 + hasResolvedPages,
35729 + blockList,
35730 + pages,
35731 + parentPageID
35732 + }) {
35733 + if (!hasResolvedPages) {
35734 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { ...blockProps, children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { className: "wp-block-page-list__loading-indicator-container", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Spinner, { className: "wp-block-page-list__loading-indicator" }) }) });
35735 + }
35736 + if (pages === null) {
35737 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { ...blockProps, children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Notice, { status: "warning", isDismissible: false, children: (0,external_wp_i18n_namespaceObject.__)("Page List: Cannot retrieve Pages.") }) });
35738 + }
35739 + if (pages.length === 0) {
35740 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { ...blockProps, children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Notice, { status: "info", isDismissible: false, children: (0,external_wp_i18n_namespaceObject.__)("Page List: Cannot retrieve Pages.") }) });
35741 + }
35742 + if (blockList.length === 0) {
35743 + const parentPageDetails = pages.find(
35744 + (page) => page.id === parentPageID
35745 + );
35746 + if (parentPageDetails?.title?.rendered) {
35747 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { ...blockProps, children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.Warning, { children: (0,external_wp_i18n_namespaceObject.sprintf)(
35748 + // translators: %s: Page title.
35749 + (0,external_wp_i18n_namespaceObject.__)('Page List: "%s" page has no children.'),
35750 + parentPageDetails.title.rendered
35751 + ) }) });
35752 + }
35753 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { ...blockProps, children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Notice, { status: "warning", isDismissible: false, children: (0,external_wp_i18n_namespaceObject.__)("Page List: Cannot retrieve Pages.") }) });
35754 + }
35755 + if (pages.length > 0) {
35756 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("ul", { ...innerBlocksProps });
35757 + }
35758 + }
35759 + function PageListEdit({
35760 + context,
35761 + clientId,
35762 + attributes,
35763 + setAttributes
35764 + }) {
35765 + const { parentPageID } = attributes;
35766 + const [isOpen, setOpen] = (0,external_wp_element_namespaceObject.useState)(false);
35767 + const openModal = (0,external_wp_element_namespaceObject.useCallback)(() => setOpen(true), []);
35768 + const closeModal = () => setOpen(false);
35769 + const dropdownMenuProps = useToolsPanelDropdownMenuProps();
35770 + const { records: pages, hasResolved: hasResolvedPages } = (0,external_wp_coreData_namespaceObject.useEntityRecords)(
35771 + "postType",
35772 + "page",
35773 + {
35774 + per_page: MAX_PAGE_COUNT,
35775 + _fields: ["id", "link", "menu_order", "parent", "title", "type"],
35776 + // TODO: When https://core.trac.wordpress.org/ticket/39037 REST API support for multiple orderby
35777 + // values is resolved, update 'orderby' to [ 'menu_order', 'post_title' ] to provide a consistent
35778 + // sort.
35779 + orderby: "menu_order",
35780 + order: "asc"
35781 + }
35782 + );
35783 + const allowConvertToLinks = "showSubmenuIcon" in context && pages?.length > 0 && pages?.length <= MAX_PAGE_COUNT;
35784 + const pagesByParentId = (0,external_wp_element_namespaceObject.useMemo)(() => {
35785 + if (pages === null) {
35786 + return /* @__PURE__ */ new Map();
35787 + }
35788 + const sortedPages = pages.sort((a, b) => {
35789 + if (a.menu_order === b.menu_order) {
35790 + return a.title.rendered.localeCompare(b.title.rendered);
35791 + }
35792 + return a.menu_order - b.menu_order;
35793 + });
35794 + return sortedPages.reduce((accumulator, page) => {
35795 + const { parent } = page;
35796 + if (accumulator.has(parent)) {
35797 + accumulator.get(parent).push(page);
35798 + } else {
35799 + accumulator.set(parent, [page]);
35800 + }
35801 + return accumulator;
35802 + }, /* @__PURE__ */ new Map());
35803 + }, [pages]);
35804 + const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)({
35805 + className: dist_clsx("wp-block-page-list", {
35806 + "has-text-color": !!context.textColor,
35807 + [(0,external_wp_blockEditor_namespaceObject.getColorClassName)("color", context.textColor)]: !!context.textColor,
35808 + "has-background": !!context.backgroundColor,
35809 + [(0,external_wp_blockEditor_namespaceObject.getColorClassName)(
35810 + "background-color",
35811 + context.backgroundColor
35812 + )]: !!context.backgroundColor
35813 + }),
35814 + style: { ...context.style?.color }
35815 + });
35816 + const pagesTree = (0,external_wp_element_namespaceObject.useMemo)(
35817 + function makePagesTree(parentId = 0, level = 0) {
35818 + const childPages = pagesByParentId.get(parentId);
35819 + if (!childPages?.length) {
35820 + return [];
35821 + }
35822 + return childPages.reduce((tree, page) => {
35823 + const hasChildren = pagesByParentId.has(page.id);
35824 + const item = {
35825 + value: page.id,
35826 + label: "\u2014 ".repeat(level) + page.title.rendered,
35827 + rawName: page.title.rendered
35828 + };
35829 + tree.push(item);
35830 + if (hasChildren) {
35831 + tree.push(...makePagesTree(page.id, level + 1));
35832 + }
35833 + return tree;
35834 + }, []);
35835 + },
35836 + [pagesByParentId]
35837 + );
35838 + const blockList = (0,external_wp_element_namespaceObject.useMemo)(
35839 + function getBlockList(parentId = parentPageID) {
35840 + const childPages = pagesByParentId.get(parentId);
35841 + if (!childPages?.length) {
35842 + return [];
35843 + }
35844 + return childPages.reduce((template, page) => {
35845 + const hasChildren = pagesByParentId.has(page.id);
35846 + const pageProps = {
35847 + id: page.id,
35848 + label: (
35849 + // translators: displayed when a page has an empty title.
35850 + page.title?.rendered?.trim() !== "" ? page.title?.rendered : (0,external_wp_i18n_namespaceObject.__)("(no title)")
35851 + ),
35852 + title: (
35853 + // translators: displayed when a page has an empty title.
35854 + page.title?.rendered?.trim() !== "" ? page.title?.rendered : (0,external_wp_i18n_namespaceObject.__)("(no title)")
35855 + ),
35856 + link: page.url,
35857 + hasChildren
35858 + };
35859 + let item = null;
35860 + const children = getBlockList(page.id);
35861 + item = (0,external_wp_blocks_namespaceObject.createBlock)(
35862 + "core/page-list-item",
35863 + pageProps,
35864 + children
35865 + );
35866 + template.push(item);
35867 + return template;
35868 + }, []);
35869 + },
35870 + [pagesByParentId, parentPageID]
35871 + );
35872 + const {
35873 + isNested,
35874 + hasSelectedChild,
35875 + parentClientId,
35876 + hasDraggedChild,
35877 + isChildOfNavigation
35878 + } = (0,external_wp_data_namespaceObject.useSelect)(
35879 + (select) => {
35880 + const {
35881 + getBlockParentsByBlockName,
35882 + hasSelectedInnerBlock,
35883 + hasDraggedInnerBlock
35884 + } = select(external_wp_blockEditor_namespaceObject.store);
35885 + const blockParents = getBlockParentsByBlockName(
35886 + clientId,
35887 + "core/navigation-submenu",
35888 + true
35889 + );
35890 + const navigationBlockParents = getBlockParentsByBlockName(
35891 + clientId,
35892 + "core/navigation",
35893 + true
35894 + );
35895 + return {
35896 + isNested: blockParents.length > 0,
35897 + isChildOfNavigation: navigationBlockParents.length > 0,
35898 + hasSelectedChild: hasSelectedInnerBlock(clientId, true),
35899 + hasDraggedChild: hasDraggedInnerBlock(clientId, true),
35900 + parentClientId: navigationBlockParents[0]
35901 + };
35902 + },
35903 + [clientId]
35904 + );
35905 + const convertToNavigationLinks = useConvertToNavigationLinks({
35906 + clientId,
35907 + pages,
35908 + parentClientId,
35909 + parentPageID
35910 + });
35911 + const innerBlocksProps = (0,external_wp_blockEditor_namespaceObject.useInnerBlocksProps)(blockProps, {
35912 + renderAppender: false,
35913 + __unstableDisableDropZone: true,
35914 + templateLock: isChildOfNavigation ? false : "all",
35915 + onInput: NOOP,
35916 + onChange: NOOP,
35917 + value: blockList
35918 + });
35919 + const { selectBlock } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_blockEditor_namespaceObject.store);
35920 + (0,external_wp_element_namespaceObject.useEffect)(() => {
35921 + if (hasSelectedChild || hasDraggedChild) {
35922 + openModal();
35923 + selectBlock(parentClientId);
35924 + }
35925 + }, [
35926 + hasSelectedChild,
35927 + hasDraggedChild,
35928 + parentClientId,
35929 + selectBlock,
35930 + openModal
35931 + ]);
35932 + (0,external_wp_element_namespaceObject.useEffect)(() => {
35933 + setAttributes({ isNested });
35934 + }, [isNested, setAttributes]);
35935 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
35936 + (pagesTree.length > 0 || allowConvertToLinks) && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(
35937 + external_wp_components_namespaceObject.__experimentalToolsPanel,
35938 + {
35939 + label: (0,external_wp_i18n_namespaceObject.__)("Settings"),
35940 + resetAll: () => {
35941 + setAttributes({ parentPageID: 0 });
35942 + },
35943 + dropdownMenuProps,
35944 + children: [
35945 + pagesTree.length > 0 && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
35946 + external_wp_components_namespaceObject.__experimentalToolsPanelItem,
35947 + {
35948 + label: (0,external_wp_i18n_namespaceObject.__)("Parent Page"),
35949 + hasValue: () => parentPageID !== 0,
35950 + onDeselect: () => setAttributes({ parentPageID: 0 }),
35951 + isShownByDefault: true,
35952 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
35953 + external_wp_components_namespaceObject.ComboboxControl,
35954 + {
35955 + __nextHasNoMarginBottom: true,
35956 + __next40pxDefaultSize: true,
35957 + className: "editor-page-attributes__parent",
35958 + label: (0,external_wp_i18n_namespaceObject.__)("Parent"),
35959 + value: parentPageID,
35960 + options: pagesTree,
35961 + onChange: (value) => setAttributes({
35962 + parentPageID: value ?? 0
35963 + }),
35964 + help: (0,external_wp_i18n_namespaceObject.__)(
35965 + "Choose a page to show only its subpages."
35966 + )
35967 + }
35968 + )
35969 + }
35970 + ),
35971 + allowConvertToLinks && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", { style: { gridColumn: "1 / -1" }, children: [
35972 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("p", { children: convertDescription }),
35973 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
35974 + external_wp_components_namespaceObject.Button,
35975 + {
35976 + __next40pxDefaultSize: true,
35977 + variant: "primary",
35978 + accessibleWhenDisabled: true,
35979 + disabled: !hasResolvedPages,
35980 + onClick: convertToNavigationLinks,
35981 + children: (0,external_wp_i18n_namespaceObject.__)("Edit")
35982 + }
35983 + )
35984 + ] })
35985 + ]
35986 + }
35987 + ) }),
35988 + allowConvertToLinks && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
35989 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockControls, { group: "other", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
35990 + external_wp_components_namespaceObject.ToolbarButton,
35991 + {
35992 + title: (0,external_wp_i18n_namespaceObject.__)("Edit"),
35993 + onClick: openModal,
35994 + children: (0,external_wp_i18n_namespaceObject.__)("Edit")
35995 + }
35996 + ) }),
35997 + isOpen && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
35998 + ConvertToLinksModal,
35999 + {
36000 + onClick: convertToNavigationLinks,
36001 + onClose: closeModal,
36002 + disabled: !hasResolvedPages
36003 + }
36004 + )
36005 + ] }),
36006 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
36007 + BlockContent,
36008 + {
36009 + blockProps,
36010 + innerBlocksProps,
36011 + hasResolvedPages,
36012 + blockList,
36013 + pages,
36014 + parentPageID
36015 + }
36016 + )
36017 + ] });
36018 + }
36019 +
36020 +
36021 + ;// ./node_modules/@wordpress/block-library/build-module/page-list/index.js
36022 +
36023 +
36024 +
36025 +
36026 + const { name: page_list_name } = page_list_block_namespaceObject;
36027 + const page_list_settings = {
36028 + icon: pages_default,
36029 + example: {},
36030 + edit: PageListEdit
36031 + };
36032 + const page_list_init = () => initBlock({ name: page_list_name, metadata: page_list_block_namespaceObject, settings: page_list_settings });
36033 +
36034 +
36035 + ;// ./node_modules/@wordpress/block-library/build-module/page-list-item/block.json
36036 + const page_list_item_block_namespaceObject = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/page-list-item","title":"Page List Item","category":"widgets","parent":["core/page-list"],"description":"Displays a page inside a list of all pages.","keywords":["page","menu","navigation"],"textdomain":"default","attributes":{"id":{"type":"number"},"label":{"type":"string"},"title":{"type":"string"},"link":{"type":"string"},"hasChildren":{"type":"boolean"}},"usesContext":["textColor","customTextColor","backgroundColor","customBackgroundColor","overlayTextColor","customOverlayTextColor","overlayBackgroundColor","customOverlayBackgroundColor","fontSize","customFontSize","showSubmenuIcon","style","openSubmenusOnClick"],"supports":{"reusable":false,"html":false,"lock":false,"inserter":false,"__experimentalToolbar":false,"interactivity":{"clientNavigation":true}},"editorStyle":"wp-block-page-list-editor","style":"wp-block-page-list"}');
36037 + ;// ./node_modules/@wordpress/block-library/build-module/navigation-link/icons.js
36038 +
36039 +
36040 + const icons_ItemSubmenuIcon = () => /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
36041 + external_wp_components_namespaceObject.SVG,
36042 + {
36043 + xmlns: "http://www.w3.org/2000/svg",
36044 + width: "12",
36045 + height: "12",
36046 + viewBox: "0 0 12 12",
36047 + fill: "none",
36048 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Path, { d: "M1.50002 4L6.00002 8L10.5 4", strokeWidth: "1.5" })
36049 + }
36050 + );
36051 +
36052 +
36053 + ;// ./node_modules/@wordpress/block-library/build-module/page-list-item/edit.js
36054 +
36055 +
36056 +
36057 +
36058 +
36059 +
36060 +
36061 +
36062 + function useFrontPageId() {
36063 + return (0,external_wp_data_namespaceObject.useSelect)((select) => {
36064 + const canReadSettings = select(external_wp_coreData_namespaceObject.store).canUser("read", {
36065 + kind: "root",
36066 + name: "site"
36067 + });
36068 + if (!canReadSettings) {
36069 + return void 0;
36070 + }
36071 + const site = select(external_wp_coreData_namespaceObject.store).getEntityRecord("root", "site");
36072 + return site?.show_on_front === "page" && site?.page_on_front;
36073 + }, []);
36074 + }
36075 + function PageListItemEdit({ context, attributes }) {
36076 + const { id, label, link, hasChildren, title } = attributes;
36077 + const isNavigationChild = "showSubmenuIcon" in context;
36078 + const frontPageId = useFrontPageId();
36079 + const innerBlocksColors = getColors(context, true);
36080 + const navigationChildBlockProps = getNavigationChildBlockProps(innerBlocksColors);
36081 + const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)(navigationChildBlockProps, {
36082 + className: "wp-block-pages-list__item"
36083 + });
36084 + const innerBlocksProps = (0,external_wp_blockEditor_namespaceObject.useInnerBlocksProps)(blockProps);
36085 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(
36086 + "li",
36087 + {
36088 + className: dist_clsx("wp-block-pages-list__item", {
36089 + "has-child": hasChildren,
36090 + "wp-block-navigation-item": isNavigationChild,
36091 + "open-on-click": context.openSubmenusOnClick,
36092 + "open-on-hover-click": !context.openSubmenusOnClick && context.showSubmenuIcon,
36093 + "menu-item-home": id === frontPageId
36094 + }),
36095 + children: [
36096 + hasChildren && context.openSubmenusOnClick ? /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
36097 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
36098 + "button",
36099 + {
36100 + type: "button",
36101 + className: "wp-block-navigation-item__content wp-block-navigation-submenu__toggle",
36102 + "aria-expanded": "false",
36103 + children: (0,external_wp_htmlEntities_namespaceObject.decodeEntities)(label)
36104 + }
36105 + ),
36106 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("span", { className: "wp-block-page-list__submenu-icon wp-block-navigation__submenu-icon", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(icons_ItemSubmenuIcon, {}) })
36107 + ] }) : /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
36108 + "a",
36109 + {
36110 + className: dist_clsx("wp-block-pages-list__item__link", {
36111 + "wp-block-navigation-item__content": isNavigationChild
36112 + }),
36113 + href: link,
36114 + children: (0,external_wp_htmlEntities_namespaceObject.decodeEntities)(title)
36115 + }
36116 + ),
36117 + hasChildren && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
36118 + !context.openSubmenusOnClick && context.showSubmenuIcon && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
36119 + "button",
36120 + {
36121 + className: "wp-block-navigation-item__content wp-block-navigation-submenu__toggle wp-block-page-list__submenu-icon wp-block-navigation__submenu-icon",
36122 + "aria-expanded": "false",
36123 + type: "button",
36124 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(icons_ItemSubmenuIcon, {})
36125 + }
36126 + ),
36127 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("ul", { ...innerBlocksProps })
36128 + ] })
36129 + ]
36130 + },
36131 + id
36132 + );
36133 + }
36134 +
36135 +
36136 + ;// ./node_modules/@wordpress/block-library/build-module/page-list-item/index.js
36137 +
36138 +
36139 +
36140 +
36141 + const { name: page_list_item_name } = page_list_item_block_namespaceObject;
36142 + const page_list_item_settings = {
36143 + __experimentalLabel: ({ label }) => label,
36144 + icon: page_default,
36145 + example: {},
36146 + edit: PageListItemEdit
36147 + };
36148 + const page_list_item_init = () => initBlock({ name: page_list_item_name, metadata: page_list_item_block_namespaceObject, settings: page_list_item_settings });
36149 +
36150 +
36151 + ;// ./node_modules/@wordpress/icons/build-module/library/paragraph.js
36152 +
36153 +
36154 + var paragraph_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "m9.99609 14v-.2251l.00391.0001v6.225h1.5v-14.5h2.5v14.5h1.5v-14.5h3v-1.5h-8.50391c-2.76142 0-5 2.23858-5 5 0 2.7614 2.23858 5 5 5z" }) });
36155 +
36156 +
36157 + ;// ./node_modules/@wordpress/block-library/build-module/paragraph/deprecated.js
36158 +
36159 +
36160 +
36161 +
36162 +
36163 + const deprecated_supports = {
36164 + className: false
36165 + };
36166 + const paragraph_deprecated_blockAttributes = {
36167 + align: {
36168 + type: "string"
36169 + },
36170 + content: {
36171 + type: "string",
36172 + source: "html",
36173 + selector: "p",
36174 + default: ""
36175 + },
36176 + dropCap: {
36177 + type: "boolean",
36178 + default: false
36179 + },
36180 + placeholder: {
36181 + type: "string"
36182 + },
36183 + textColor: {
36184 + type: "string"
36185 + },
36186 + backgroundColor: {
36187 + type: "string"
36188 + },
36189 + fontSize: {
36190 + type: "string"
36191 + },
36192 + direction: {
36193 + type: "string",
36194 + enum: ["ltr", "rtl"]
36195 + },
36196 + style: {
36197 + type: "object"
36198 + }
36199 + };
36200 + const migrateCustomColorsAndFontSizes = (attributes) => {
36201 + if (!attributes.customTextColor && !attributes.customBackgroundColor && !attributes.customFontSize) {
36202 + return attributes;
36203 + }
36204 + const style2 = {};
36205 + if (attributes.customTextColor || attributes.customBackgroundColor) {
36206 + style2.color = {};
36207 + }
36208 + if (attributes.customTextColor) {
36209 + style2.color.text = attributes.customTextColor;
36210 + }
36211 + if (attributes.customBackgroundColor) {
36212 + style2.color.background = attributes.customBackgroundColor;
36213 + }
36214 + if (attributes.customFontSize) {
36215 + style2.typography = { fontSize: attributes.customFontSize };
36216 + }
36217 + const {
36218 + customTextColor,
36219 + customBackgroundColor,
36220 + customFontSize,
36221 + ...restAttributes
36222 + } = attributes;
36223 + return {
36224 + ...restAttributes,
36225 + style: style2
36226 + };
36227 + };
36228 + const { style, ...restBlockAttributes } = paragraph_deprecated_blockAttributes;
36229 + const paragraph_deprecated_deprecated = [
36230 + // Version without drop cap on aligned text.
36231 + {
36232 + supports: deprecated_supports,
36233 + attributes: {
36234 + ...restBlockAttributes,
36235 + customTextColor: {
36236 + type: "string"
36237 + },
36238 + customBackgroundColor: {
36239 + type: "string"
36240 + },
36241 + customFontSize: {
36242 + type: "number"
36243 + }
36244 + },
36245 + save({ attributes }) {
36246 + const { align, content, dropCap, direction } = attributes;
36247 + const className = dist_clsx({
36248 + "has-drop-cap": align === ((0,external_wp_i18n_namespaceObject.isRTL)() ? "left" : "right") || align === "center" ? false : dropCap,
36249 + [`has-text-align-${align}`]: align
36250 + });
36251 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("p", { ...external_wp_blockEditor_namespaceObject.useBlockProps.save({ className, dir: direction }), children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichText.Content, { value: content }) });
36252 + }
36253 + },
36254 + {
36255 + supports: deprecated_supports,
36256 + attributes: {
36257 + ...restBlockAttributes,
36258 + customTextColor: {
36259 + type: "string"
36260 + },
36261 + customBackgroundColor: {
36262 + type: "string"
36263 + },
36264 + customFontSize: {
36265 + type: "number"
36266 + }
36267 + },
36268 + migrate: migrateCustomColorsAndFontSizes,
36269 + save({ attributes }) {
36270 + const {
36271 + align,
36272 + content,
36273 + dropCap,
36274 + backgroundColor,
36275 + textColor,
36276 + customBackgroundColor,
36277 + customTextColor,
36278 + fontSize,
36279 + customFontSize,
36280 + direction
36281 + } = attributes;
36282 + const textClass = (0,external_wp_blockEditor_namespaceObject.getColorClassName)("color", textColor);
36283 + const backgroundClass = (0,external_wp_blockEditor_namespaceObject.getColorClassName)(
36284 + "background-color",
36285 + backgroundColor
36286 + );
36287 + const fontSizeClass = (0,external_wp_blockEditor_namespaceObject.getFontSizeClass)(fontSize);
36288 + const className = dist_clsx({
36289 + "has-text-color": textColor || customTextColor,
36290 + "has-background": backgroundColor || customBackgroundColor,
36291 + "has-drop-cap": dropCap,
36292 + [`has-text-align-${align}`]: align,
36293 + [fontSizeClass]: fontSizeClass,
36294 + [textClass]: textClass,
36295 + [backgroundClass]: backgroundClass
36296 + });
36297 + const styles = {
36298 + backgroundColor: backgroundClass ? void 0 : customBackgroundColor,
36299 + color: textClass ? void 0 : customTextColor,
36300 + fontSize: fontSizeClass ? void 0 : customFontSize
36301 + };
36302 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
36303 + external_wp_blockEditor_namespaceObject.RichText.Content,
36304 + {
36305 + tagName: "p",
36306 + style: styles,
36307 + className: className ? className : void 0,
36308 + value: content,
36309 + dir: direction
36310 + }
36311 + );
36312 + }
36313 + },
36314 + {
36315 + supports: deprecated_supports,
36316 + attributes: {
36317 + ...restBlockAttributes,
36318 + customTextColor: {
36319 + type: "string"
36320 + },
36321 + customBackgroundColor: {
36322 + type: "string"
36323 + },
36324 + customFontSize: {
36325 + type: "number"
36326 + }
36327 + },
36328 + migrate: migrateCustomColorsAndFontSizes,
36329 + save({ attributes }) {
36330 + const {
36331 + align,
36332 + content,
36333 + dropCap,
36334 + backgroundColor,
36335 + textColor,
36336 + customBackgroundColor,
36337 + customTextColor,
36338 + fontSize,
36339 + customFontSize,
36340 + direction
36341 + } = attributes;
36342 + const textClass = (0,external_wp_blockEditor_namespaceObject.getColorClassName)("color", textColor);
36343 + const backgroundClass = (0,external_wp_blockEditor_namespaceObject.getColorClassName)(
36344 + "background-color",
36345 + backgroundColor
36346 + );
36347 + const fontSizeClass = (0,external_wp_blockEditor_namespaceObject.getFontSizeClass)(fontSize);
36348 + const className = dist_clsx({
36349 + "has-text-color": textColor || customTextColor,
36350 + "has-background": backgroundColor || customBackgroundColor,
36351 + "has-drop-cap": dropCap,
36352 + [fontSizeClass]: fontSizeClass,
36353 + [textClass]: textClass,
36354 + [backgroundClass]: backgroundClass
36355 + });
36356 + const styles = {
36357 + backgroundColor: backgroundClass ? void 0 : customBackgroundColor,
36358 + color: textClass ? void 0 : customTextColor,
36359 + fontSize: fontSizeClass ? void 0 : customFontSize,
36360 + textAlign: align
36361 + };
36362 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
36363 + external_wp_blockEditor_namespaceObject.RichText.Content,
36364 + {
36365 + tagName: "p",
36366 + style: styles,
36367 + className: className ? className : void 0,
36368 + value: content,
36369 + dir: direction
36370 + }
36371 + );
36372 + }
36373 + },
36374 + {
36375 + supports: deprecated_supports,
36376 + attributes: {
36377 + ...restBlockAttributes,
36378 + customTextColor: {
36379 + type: "string"
36380 + },
36381 + customBackgroundColor: {
36382 + type: "string"
36383 + },
36384 + customFontSize: {
36385 + type: "number"
36386 + },
36387 + width: {
36388 + type: "string"
36389 + }
36390 + },
36391 + migrate: migrateCustomColorsAndFontSizes,
36392 + save({ attributes }) {
36393 + const {
36394 + width,
36395 + align,
36396 + content,
36397 + dropCap,
36398 + backgroundColor,
36399 + textColor,
36400 + customBackgroundColor,
36401 + customTextColor,
36402 + fontSize,
36403 + customFontSize
36404 + } = attributes;
36405 + const textClass = (0,external_wp_blockEditor_namespaceObject.getColorClassName)("color", textColor);
36406 + const backgroundClass = (0,external_wp_blockEditor_namespaceObject.getColorClassName)(
36407 + "background-color",
36408 + backgroundColor
36409 + );
36410 + const fontSizeClass = fontSize && `is-${fontSize}-text`;
36411 + const className = dist_clsx({
36412 + [`align${width}`]: width,
36413 + "has-background": backgroundColor || customBackgroundColor,
36414 + "has-drop-cap": dropCap,
36415 + [fontSizeClass]: fontSizeClass,
36416 + [textClass]: textClass,
36417 + [backgroundClass]: backgroundClass
36418 + });
36419 + const styles = {
36420 + backgroundColor: backgroundClass ? void 0 : customBackgroundColor,
36421 + color: textClass ? void 0 : customTextColor,
36422 + fontSize: fontSizeClass ? void 0 : customFontSize,
36423 + textAlign: align
36424 + };
36425 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
36426 + external_wp_blockEditor_namespaceObject.RichText.Content,
36427 + {
36428 + tagName: "p",
36429 + style: styles,
36430 + className: className ? className : void 0,
36431 + value: content
36432 + }
36433 + );
36434 + }
36435 + },
36436 + {
36437 + supports: deprecated_supports,
36438 + attributes: {
36439 + ...restBlockAttributes,
36440 + fontSize: {
36441 + type: "number"
36442 + }
36443 + },
36444 + save({ attributes }) {
36445 + const {
36446 + width,
36447 + align,
36448 + content,
36449 + dropCap,
36450 + backgroundColor,
36451 + textColor,
36452 + fontSize
36453 + } = attributes;
36454 + const className = dist_clsx({
36455 + [`align${width}`]: width,
36456 + "has-background": backgroundColor,
36457 + "has-drop-cap": dropCap
36458 + });
36459 + const styles = {
36460 + backgroundColor,
36461 + color: textColor,
36462 + fontSize,
36463 + textAlign: align
36464 + };
36465 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
36466 + "p",
36467 + {
36468 + style: styles,
36469 + className: className ? className : void 0,
36470 + children: content
36471 + }
36472 + );
36473 + },
36474 + migrate(attributes) {
36475 + return migrateCustomColorsAndFontSizes({
36476 + ...attributes,
36477 + customFontSize: Number.isFinite(attributes.fontSize) ? attributes.fontSize : void 0,
36478 + customTextColor: attributes.textColor && "#" === attributes.textColor[0] ? attributes.textColor : void 0,
36479 + customBackgroundColor: attributes.backgroundColor && "#" === attributes.backgroundColor[0] ? attributes.backgroundColor : void 0
36480 + });
36481 + }
36482 + },
36483 + {
36484 + supports: deprecated_supports,
36485 + attributes: {
36486 + ...paragraph_deprecated_blockAttributes,
36487 + content: {
36488 + type: "string",
36489 + source: "html",
36490 + default: ""
36491 + }
36492 + },
36493 + save({ attributes }) {
36494 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_element_namespaceObject.RawHTML, { children: attributes.content });
36495 + },
36496 + migrate(attributes) {
36497 + return attributes;
36498 + }
36499 + }
36500 + ];
36501 + var paragraph_deprecated_deprecated_default = paragraph_deprecated_deprecated;
36502 +
36503 +
36504 + ;// ./node_modules/@wordpress/icons/build-module/library/format-ltr.js
36505 +
36506 +
36507 + var format_ltr_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M3 9c0 2.8 2.2 5 5 5v-.2V20h1.5V5.5H12V20h1.5V5.5h3V4H8C5.2 4 3 6.2 3 9Zm15.9-1-1.1 1 2.6 3-2.6 3 1.1 1 3.4-4-3.4-4Z" }) });
36508 +
36509 +
36510 + ;// ./node_modules/@wordpress/block-library/build-module/paragraph/use-enter.js
36511 +
36512 +
36513 +
36514 +
36515 +
36516 +
36517 + function useOnEnter(props) {
36518 + const { batch } = (0,external_wp_data_namespaceObject.useRegistry)();
36519 + const {
36520 + moveBlocksToPosition,
36521 + replaceInnerBlocks,
36522 + duplicateBlocks,
36523 + insertBlock
36524 + } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_blockEditor_namespaceObject.store);
36525 + const {
36526 + getBlockRootClientId,
36527 + getBlockIndex,
36528 + getBlockOrder,
36529 + getBlockName,
36530 + getBlock,
36531 + getNextBlockClientId,
36532 + canInsertBlockType
36533 + } = (0,external_wp_data_namespaceObject.useSelect)(external_wp_blockEditor_namespaceObject.store);
36534 + const propsRef = (0,external_wp_element_namespaceObject.useRef)(props);
36535 + propsRef.current = props;
36536 + return (0,external_wp_compose_namespaceObject.useRefEffect)((element) => {
36537 + function onKeyDown(event) {
36538 + if (event.defaultPrevented) {
36539 + return;
36540 + }
36541 + if (event.keyCode !== external_wp_keycodes_namespaceObject.ENTER) {
36542 + return;
36543 + }
36544 + const { content, clientId } = propsRef.current;
36545 + if (content.length) {
36546 + return;
36547 + }
36548 + const wrapperClientId = getBlockRootClientId(clientId);
36549 + if (!(0,external_wp_blocks_namespaceObject.hasBlockSupport)(
36550 + getBlockName(wrapperClientId),
36551 + "__experimentalOnEnter",
36552 + false
36553 + )) {
36554 + return;
36555 + }
36556 + const order = getBlockOrder(wrapperClientId);
36557 + const position = order.indexOf(clientId);
36558 + if (position === order.length - 1) {
36559 + let newWrapperClientId = wrapperClientId;
36560 + while (!canInsertBlockType(
36561 + getBlockName(clientId),
36562 + getBlockRootClientId(newWrapperClientId)
36563 + )) {
36564 + newWrapperClientId = getBlockRootClientId(newWrapperClientId);
36565 + }
36566 + if (typeof newWrapperClientId === "string") {
36567 + event.preventDefault();
36568 + moveBlocksToPosition(
36569 + [clientId],
36570 + wrapperClientId,
36571 + getBlockRootClientId(newWrapperClientId),
36572 + getBlockIndex(newWrapperClientId) + 1
36573 + );
36574 + }
36575 + return;
36576 + }
36577 + const defaultBlockName = (0,external_wp_blocks_namespaceObject.getDefaultBlockName)();
36578 + if (!canInsertBlockType(
36579 + defaultBlockName,
36580 + getBlockRootClientId(wrapperClientId)
36581 + )) {
36582 + return;
36583 + }
36584 + event.preventDefault();
36585 + const wrapperBlock = getBlock(wrapperClientId);
36586 + batch(() => {
36587 + duplicateBlocks([wrapperClientId]);
36588 + const blockIndex = getBlockIndex(wrapperClientId);
36589 + replaceInnerBlocks(
36590 + wrapperClientId,
36591 + wrapperBlock.innerBlocks.slice(0, position)
36592 + );
36593 + replaceInnerBlocks(
36594 + getNextBlockClientId(wrapperClientId),
36595 + wrapperBlock.innerBlocks.slice(position + 1)
36596 + );
36597 + insertBlock(
36598 + (0,external_wp_blocks_namespaceObject.createBlock)(defaultBlockName),
36599 + blockIndex + 1,
36600 + getBlockRootClientId(wrapperClientId),
36601 + true
36602 + );
36603 + });
36604 + }
36605 + element.addEventListener("keydown", onKeyDown);
36606 + return () => {
36607 + element.removeEventListener("keydown", onKeyDown);
36608 + };
36609 + }, []);
36610 + }
36611 +
36612 +
36613 + ;// ./node_modules/@wordpress/block-library/build-module/paragraph/edit.js
36614 +
36615 +
36616 +
36617 +
36618 +
36619 +
36620 +
36621 +
36622 + function ParagraphRTLControl({ direction, setDirection }) {
36623 + return (0,external_wp_i18n_namespaceObject.isRTL)() && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
36624 + external_wp_components_namespaceObject.ToolbarButton,
36625 + {
36626 + icon: format_ltr_default,
36627 + title: (0,external_wp_i18n_namespaceObject._x)("Left to right", "editor button"),
36628 + isActive: direction === "ltr",
36629 + onClick: () => {
36630 + setDirection(direction === "ltr" ? void 0 : "ltr");
36631 + }
36632 + }
36633 + );
36634 + }
36635 + function hasDropCapDisabled(align) {
36636 + return align === ((0,external_wp_i18n_namespaceObject.isRTL)() ? "left" : "right") || align === "center";
36637 + }
36638 + function DropCapControl({ clientId, attributes, setAttributes, name }) {
36639 + const [isDropCapFeatureEnabled] = (0,external_wp_blockEditor_namespaceObject.useSettings)("typography.dropCap");
36640 + if (!isDropCapFeatureEnabled) {
36641 + return null;
36642 + }
36643 + const { align, dropCap } = attributes;
36644 + let helpText;
36645 + if (hasDropCapDisabled(align)) {
36646 + helpText = (0,external_wp_i18n_namespaceObject.__)("Not available for aligned text.");
36647 + } else if (dropCap) {
36648 + helpText = (0,external_wp_i18n_namespaceObject.__)("Showing large initial letter.");
36649 + } else {
36650 + helpText = (0,external_wp_i18n_namespaceObject.__)("Show a large initial letter.");
36651 + }
36652 + const isDropCapControlEnabledByDefault = (0,external_wp_blocks_namespaceObject.getBlockSupport)(
36653 + name,
36654 + "typography.defaultControls.dropCap",
36655 + false
36656 + );
36657 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, { group: "typography", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
36658 + external_wp_components_namespaceObject.__experimentalToolsPanelItem,
36659 + {
36660 + hasValue: () => !!dropCap,
36661 + label: (0,external_wp_i18n_namespaceObject.__)("Drop cap"),
36662 + isShownByDefault: isDropCapControlEnabledByDefault,
36663 + onDeselect: () => setAttributes({ dropCap: false }),
36664 + resetAllFilter: () => ({ dropCap: false }),
36665 + panelId: clientId,
36666 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
36667 + external_wp_components_namespaceObject.ToggleControl,
36668 + {
36669 + __nextHasNoMarginBottom: true,
36670 + label: (0,external_wp_i18n_namespaceObject.__)("Drop cap"),
36671 + checked: !!dropCap,
36672 + onChange: () => setAttributes({ dropCap: !dropCap }),
36673 + help: helpText,
36674 + disabled: hasDropCapDisabled(align)
36675 + }
36676 + )
36677 + }
36678 + ) });
36679 + }
36680 + function ParagraphBlock({
36681 + attributes,
36682 + mergeBlocks,
36683 + onReplace,
36684 + onRemove,
36685 + setAttributes,
36686 + clientId,
36687 + isSelected: isSingleSelected,
36688 + name
36689 + }) {
36690 + const { align, content, direction, dropCap, placeholder } = attributes;
36691 + const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)({
36692 + ref: useOnEnter({ clientId, content }),
36693 + className: dist_clsx({
36694 + "has-drop-cap": hasDropCapDisabled(align) ? false : dropCap,
36695 + [`has-text-align-${align}`]: align
36696 + }),
36697 + style: { direction }
36698 + });
36699 + const blockEditingMode = (0,external_wp_blockEditor_namespaceObject.useBlockEditingMode)();
36700 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
36701 + blockEditingMode === "default" && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_blockEditor_namespaceObject.BlockControls, { group: "block", children: [
36702 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
36703 + external_wp_blockEditor_namespaceObject.AlignmentControl,
36704 + {
36705 + value: align,
36706 + onChange: (newAlign) => setAttributes({
36707 + align: newAlign,
36708 + dropCap: hasDropCapDisabled(newAlign) ? false : dropCap
36709 + })
36710 + }
36711 + ),
36712 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
36713 + ParagraphRTLControl,
36714 + {
36715 + direction,
36716 + setDirection: (newDirection) => setAttributes({ direction: newDirection })
36717 + }
36718 + )
36719 + ] }),
36720 + isSingleSelected && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
36721 + DropCapControl,
36722 + {
36723 + name,
36724 + clientId,
36725 + attributes,
36726 + setAttributes
36727 + }
36728 + ),
36729 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
36730 + external_wp_blockEditor_namespaceObject.RichText,
36731 + {
36732 + identifier: "content",
36733 + tagName: "p",
36734 + ...blockProps,
36735 + value: content,
36736 + onChange: (newContent) => setAttributes({ content: newContent }),
36737 + onMerge: mergeBlocks,
36738 + onReplace,
36739 + onRemove,
36740 + "aria-label": external_wp_blockEditor_namespaceObject.RichText.isEmpty(content) ? (0,external_wp_i18n_namespaceObject.__)(
36741 + "Empty block; start writing or type forward slash to choose a block"
36742 + ) : (0,external_wp_i18n_namespaceObject.__)("Block: Paragraph"),
36743 + "data-empty": external_wp_blockEditor_namespaceObject.RichText.isEmpty(content),
36744 + placeholder: placeholder || (0,external_wp_i18n_namespaceObject.__)("Type / to choose a block"),
36745 + "data-custom-placeholder": placeholder ? true : void 0,
36746 + __unstableEmbedURLOnPaste: true,
36747 + __unstableAllowPrefixTransformations: true
36748 + }
36749 + )
36750 + ] });
36751 + }
36752 + var paragraph_edit_edit_default = ParagraphBlock;
36753 +
36754 +
36755 + ;// ./node_modules/@wordpress/block-library/build-module/paragraph/block.json
36756 + const paragraph_block_namespaceObject = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/paragraph","title":"Paragraph","category":"text","description":"Start with the basic building block of all narrative.","keywords":["text"],"textdomain":"default","attributes":{"align":{"type":"string"},"content":{"type":"rich-text","source":"rich-text","selector":"p","role":"content"},"dropCap":{"type":"boolean","default":false},"placeholder":{"type":"string"},"direction":{"type":"string","enum":["ltr","rtl"]}},"supports":{"splitting":true,"anchor":true,"className":false,"__experimentalBorder":{"color":true,"radius":true,"style":true,"width":true},"color":{"gradients":true,"link":true,"__experimentalDefaultControls":{"background":true,"text":true}},"spacing":{"margin":true,"padding":true,"__experimentalDefaultControls":{"margin":false,"padding":false}},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalTextDecoration":true,"__experimentalFontStyle":true,"__experimentalFontWeight":true,"__experimentalLetterSpacing":true,"__experimentalTextTransform":true,"__experimentalWritingMode":true,"fitText":true,"__experimentalDefaultControls":{"fontSize":true}},"__experimentalSelector":"p","__unstablePasteTextInline":true,"interactivity":{"clientNavigation":true}},"editorStyle":"wp-block-paragraph-editor","style":"wp-block-paragraph"}');
36757 + ;// ./node_modules/@wordpress/block-library/build-module/paragraph/save.js
36758 +
36759 +
36760 +
36761 +
36762 + function paragraph_save_save({ attributes }) {
36763 + const { align, content, dropCap, direction } = attributes;
36764 + const className = dist_clsx({
36765 + "has-drop-cap": align === ((0,external_wp_i18n_namespaceObject.isRTL)() ? "left" : "right") || align === "center" ? false : dropCap,
36766 + [`has-text-align-${align}`]: align
36767 + });
36768 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("p", { ...external_wp_blockEditor_namespaceObject.useBlockProps.save({ className, dir: direction }), children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichText.Content, { value: content }) });
36769 + }
36770 +
36771 +
36772 + ;// ./node_modules/@wordpress/block-library/build-module/paragraph/transforms.js
36773 +
36774 +
36775 + const paragraph_transforms_transforms = {
36776 + from: [
36777 + {
36778 + type: "raw",
36779 + // Paragraph is a fallback and should be matched last.
36780 + priority: 20,
36781 + selector: "p",
36782 + schema: ({ phrasingContentSchema, isPaste }) => ({
36783 + p: {
36784 + children: phrasingContentSchema,
36785 + attributes: isPaste ? [] : ["style", "id"]
36786 + }
36787 + }),
36788 + transform(node) {
36789 + const attributes = (0,external_wp_blocks_namespaceObject.getBlockAttributes)(paragraph_block_namespaceObject.name, node.outerHTML);
36790 + const { textAlign } = node.style || {};
36791 + if (textAlign === "left" || textAlign === "center" || textAlign === "right") {
36792 + attributes.align = textAlign;
36793 + }
36794 + return (0,external_wp_blocks_namespaceObject.createBlock)(paragraph_block_namespaceObject.name, attributes);
36795 + }
36796 + }
36797 + ]
36798 + };
36799 + var paragraph_transforms_transforms_default = paragraph_transforms_transforms;
36800 +
36801 +
36802 + ;// ./node_modules/@wordpress/block-library/build-module/paragraph/variations.js
36803 +
36804 +
36805 +
36806 +
36807 + const paragraph_variations_variations = [
36808 + {
36809 + name: "paragraph",
36810 + title: (0,external_wp_i18n_namespaceObject.__)("Paragraph"),
36811 + description: (0,external_wp_i18n_namespaceObject.__)(
36812 + "Start with the basic building block of all narrative."
36813 + ),
36814 + isDefault: true,
36815 + scope: ["block", "inserter", "transform"],
36816 + attributes: { fitText: void 0 },
36817 + icon: paragraph_default
36818 + },
36819 + // There is a hardcoded workaround in packages/block-editor/src/store/selectors.js
36820 + // to make Stretchy variations appear as the last of their sections in the inserter.
36821 + {
36822 + name: "stretchy-paragraph",
36823 + title: (0,external_wp_i18n_namespaceObject.__)("Stretchy Paragraph"),
36824 + description: (0,external_wp_i18n_namespaceObject.__)("Paragraph that resizes to fit its container."),
36825 + icon: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M3 9c0 2.8 2.2 5 5 5v-.2V20h1.5V5.5H12V20h1.5V5.5h3V4H8C5.2 4 3 6.2 3 9Zm16.2-.2v1.5h2.2L17.7 14l1.1 1.1 3.7-3.7v2.2H24V8.8h-4.8Z" }) }),
36826 + attributes: {
36827 + fitText: true
36828 + },
36829 + scope: ["inserter", "transform"],
36830 + isActive: (blockAttributes) => blockAttributes.fitText === true
36831 + }
36832 + ];
36833 + var paragraph_variations_variations_default = paragraph_variations_variations;
36834 +
36835 +
36836 + ;// ./node_modules/@wordpress/block-library/build-module/paragraph/index.js
36837 +
36838 +
36839 +
36840 +
36841 +
36842 +
36843 +
36844 +
36845 +
36846 + const { name: paragraph_name } = paragraph_block_namespaceObject;
36847 + const paragraph_settings = {
36848 + icon: paragraph_default,
36849 + example: {
36850 + attributes: {
36851 + content: (0,external_wp_i18n_namespaceObject.__)(
36852 + "In a village of La Mancha, the name of which I have no desire to call to mind, there lived not long since one of those gentlemen that keep a lance in the lance-rack, an old buckler, a lean hack, and a greyhound for coursing."
36853 + )
36854 + }
36855 + },
36856 + __experimentalLabel(attributes, { context }) {
36857 + const customName = attributes?.metadata?.name;
36858 + if (context === "list-view" && customName) {
36859 + return customName;
36860 + }
36861 + if (context === "accessibility") {
36862 + if (customName) {
36863 + return customName;
36864 + }
36865 + const { content } = attributes;
36866 + return !content || content.length === 0 ? (0,external_wp_i18n_namespaceObject.__)("Empty") : content;
36867 + }
36868 + },
36869 + transforms: paragraph_transforms_transforms_default,
36870 + deprecated: paragraph_deprecated_deprecated_default,
36871 + merge(attributes, attributesToMerge) {
36872 + return {
36873 + content: (attributes.content || "") + (attributesToMerge.content || "")
36874 + };
36875 + },
36876 + edit: paragraph_edit_edit_default,
36877 + save: paragraph_save_save,
36878 + variations: paragraph_variations_variations_default
36879 + };
36880 + const paragraph_init = () => initBlock({ name: paragraph_name, metadata: paragraph_block_namespaceObject, settings: paragraph_settings });
36881 +
36882 +
36883 + ;// ./node_modules/@wordpress/icons/build-module/library/post-author.js
36884 +
36885 +
36886 + var post_author_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
36887 + external_wp_primitives_namespaceObject.Path,
36888 + {
36889 + d: "M10 4.5a1 1 0 11-2 0 1 1 0 012 0zm1.5 0a2.5 2.5 0 11-5 0 2.5 2.5 0 015 0zm2.25 7.5v-1A2.75 2.75 0 0011 8.25H7A2.75 2.75 0 004.25 11v1h1.5v-1c0-.69.56-1.25 1.25-1.25h4c.69 0 1.25.56 1.25 1.25v1h1.5zM4 20h9v-1.5H4V20zm16-4H4v-1.5h16V16z",
36890 + fillRule: "evenodd",
36891 + clipRule: "evenodd"
36892 + }
36893 + ) });
36894 +
36895 +
36896 + ;// ./node_modules/@wordpress/block-library/build-module/post-author/block.json
36897 + const post_author_block_namespaceObject = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/post-author","title":"Author","category":"theme","description":"Display post author details such as name, avatar, and bio.","textdomain":"default","attributes":{"textAlign":{"type":"string"},"avatarSize":{"type":"number","default":48},"showAvatar":{"type":"boolean","default":true},"showBio":{"type":"boolean"},"byline":{"type":"string"},"isLink":{"type":"boolean","default":false,"role":"content"},"linkTarget":{"type":"string","default":"_self","role":"content"}},"usesContext":["postType","postId","queryId"],"supports":{"html":false,"spacing":{"margin":true,"padding":true},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"color":{"gradients":true,"link":true,"__experimentalDefaultControls":{"background":true,"text":true}},"interactivity":{"clientNavigation":true},"__experimentalBorder":{"radius":true,"color":true,"width":true,"style":true,"__experimentalDefaultControls":{"radius":true,"color":true,"width":true,"style":true}},"filter":{"duotone":true}},"selectors":{"filter":{"duotone":".wp-block-post-author .wp-block-post-author__avatar img"}},"editorStyle":"wp-block-post-author-editor","style":"wp-block-post-author"}');
36898 + ;// ./node_modules/@wordpress/block-library/build-module/post-author/edit.js
36899 +
36900 +
36901 +
36902 +
36903 +
36904 +
36905 +
36906 +
36907 +
36908 +
36909 +
36910 + const edit_AUTHORS_QUERY = {
36911 + who: "authors",
36912 + per_page: 100,
36913 + _fields: "id,name",
36914 + context: "view"
36915 + };
36916 + function AuthorCombobox({ value, onChange }) {
36917 + const [filterValue, setFilterValue] = (0,external_wp_element_namespaceObject.useState)("");
36918 + const { authors, isLoading } = (0,external_wp_data_namespaceObject.useSelect)(
36919 + (select) => {
36920 + const { getUsers, isResolving } = select(external_wp_coreData_namespaceObject.store);
36921 + const query = { ...edit_AUTHORS_QUERY };
36922 + if (filterValue) {
36923 + query.search = filterValue;
36924 + query.search_columns = ["name"];
36925 + }
36926 + return {
36927 + authors: getUsers(query),
36928 + isLoading: isResolving("getUsers", [query])
36929 + };
36930 + },
36931 + [filterValue]
36932 + );
36933 + const authorOptions = (0,external_wp_element_namespaceObject.useMemo)(() => {
36934 + const fetchedAuthors = (authors ?? []).map((author) => {
36935 + return {
36936 + value: author.id,
36937 + label: (0,external_wp_htmlEntities_namespaceObject.decodeEntities)(author.name)
36938 + };
36939 + });
36940 + const foundAuthor = fetchedAuthors.findIndex(
36941 + (fetchedAuthor) => value?.id === fetchedAuthor.value
36942 + );
36943 + let currentAuthor = [];
36944 + if (foundAuthor < 0 && value) {
36945 + currentAuthor = [
36946 + {
36947 + value: value.id,
36948 + label: (0,external_wp_htmlEntities_namespaceObject.decodeEntities)(value.name)
36949 + }
36950 + ];
36951 + } else if (foundAuthor < 0 && !value) {
36952 + currentAuthor = [
36953 + {
36954 + value: 0,
36955 + label: (0,external_wp_i18n_namespaceObject.__)("(No author)")
36956 + }
36957 + ];
36958 + }
36959 + return [...currentAuthor, ...fetchedAuthors];
36960 + }, [authors, value]);
36961 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
36962 + external_wp_components_namespaceObject.ComboboxControl,
36963 + {
36964 + __next40pxDefaultSize: true,
36965 + __nextHasNoMarginBottom: true,
36966 + label: (0,external_wp_i18n_namespaceObject.__)("Author"),
36967 + options: authorOptions,
36968 + value: value?.id,
36969 + onFilterValueChange: (0,external_wp_compose_namespaceObject.debounce)(setFilterValue, 300),
36970 + onChange,
36971 + allowReset: false,
36972 + isLoading
36973 + }
36974 + );
36975 + }
36976 + function PostAuthorEdit({
36977 + isSelected,
36978 + context: { postType, postId, queryId },
36979 + attributes,
36980 + setAttributes
36981 + }) {
36982 + const isDescendentOfQueryLoop = Number.isFinite(queryId);
36983 + const dropdownMenuProps = useToolsPanelDropdownMenuProps();
36984 + const defaultAvatar = useDefaultAvatar();
36985 + const { authorDetails, canAssignAuthor, supportsAuthor } = (0,external_wp_data_namespaceObject.useSelect)(
36986 + (select) => {
36987 + const { getEditedEntityRecord, getUser, getPostType } = select(external_wp_coreData_namespaceObject.store);
36988 + const currentPost = getEditedEntityRecord(
36989 + "postType",
36990 + postType,
36991 + postId
36992 + );
36993 + const authorId = currentPost?.author;
36994 + return {
36995 + authorDetails: authorId ? getUser(authorId, { context: "view" }) : null,
36996 + supportsAuthor: getPostType(postType)?.supports?.author ?? false,
36997 + canAssignAuthor: currentPost?._links?.["wp:action-assign-author"] ? true : false
36998 + };
36999 + },
37000 + [postType, postId]
37001 + );
37002 + const { editEntityRecord } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_coreData_namespaceObject.store);
37003 + const {
37004 + textAlign,
37005 + showAvatar,
37006 + showBio,
37007 + byline,
37008 + isLink,
37009 + linkTarget,
37010 + avatarSize
37011 + } = attributes;
37012 + const avatarSizes = [];
37013 + const authorName = authorDetails?.name || (0,external_wp_i18n_namespaceObject.__)("Post Author");
37014 + if (authorDetails?.avatar_urls) {
37015 + Object.keys(authorDetails.avatar_urls).forEach((size) => {
37016 + avatarSizes.push({
37017 + value: size,
37018 + label: `${size} x ${size}`
37019 + });
37020 + });
37021 + }
37022 + const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)({
37023 + className: dist_clsx({
37024 + [`has-text-align-${textAlign}`]: textAlign
37025 + })
37026 + });
37027 + const handleSelect = (nextAuthorId) => {
37028 + editEntityRecord("postType", postType, postId, {
37029 + author: nextAuthorId
37030 + });
37031 + };
37032 + const showAuthorControl = !!postId && !isDescendentOfQueryLoop && canAssignAuthor;
37033 + if (!supportsAuthor && postType !== void 0) {
37034 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { ...blockProps, children: (0,external_wp_i18n_namespaceObject.sprintf)(
37035 + // translators: %s: Name of the post type e.g: "post".
37036 + (0,external_wp_i18n_namespaceObject.__)("This post type (%s) does not support the author."),
37037 + postType
37038 + ) });
37039 + }
37040 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
37041 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(
37042 + external_wp_components_namespaceObject.__experimentalToolsPanel,
37043 + {
37044 + label: (0,external_wp_i18n_namespaceObject.__)("Settings"),
37045 + resetAll: () => {
37046 + setAttributes({
37047 + avatarSize: 48,
37048 + showAvatar: true,
37049 + isLink: false,
37050 + linkTarget: "_self"
37051 + });
37052 + },
37053 + dropdownMenuProps,
37054 + children: [
37055 + showAuthorControl && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { style: { gridColumn: "1 / -1" }, children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
37056 + AuthorCombobox,
37057 + {
37058 + value: authorDetails,
37059 + onChange: handleSelect
37060 + }
37061 + ) }),
37062 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
37063 + external_wp_components_namespaceObject.__experimentalToolsPanelItem,
37064 + {
37065 + label: (0,external_wp_i18n_namespaceObject.__)("Show avatar"),
37066 + isShownByDefault: true,
37067 + hasValue: () => !showAvatar,
37068 + onDeselect: () => setAttributes({ showAvatar: true }),
37069 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
37070 + external_wp_components_namespaceObject.ToggleControl,
37071 + {
37072 + __nextHasNoMarginBottom: true,
37073 + label: (0,external_wp_i18n_namespaceObject.__)("Show avatar"),
37074 + checked: showAvatar,
37075 + onChange: () => setAttributes({
37076 + showAvatar: !showAvatar
37077 + })
37078 + }
37079 + )
37080 + }
37081 + ),
37082 + showAvatar && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
37083 + external_wp_components_namespaceObject.__experimentalToolsPanelItem,
37084 + {
37085 + label: (0,external_wp_i18n_namespaceObject.__)("Avatar size"),
37086 + isShownByDefault: true,
37087 + hasValue: () => avatarSize !== 48,
37088 + onDeselect: () => setAttributes({ avatarSize: 48 }),
37089 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
37090 + external_wp_components_namespaceObject.SelectControl,
37091 + {
37092 + __next40pxDefaultSize: true,
37093 + __nextHasNoMarginBottom: true,
37094 + label: (0,external_wp_i18n_namespaceObject.__)("Avatar size"),
37095 + value: avatarSize,
37096 + options: avatarSizes,
37097 + onChange: (size) => {
37098 + setAttributes({
37099 + avatarSize: Number(size)
37100 + });
37101 + }
37102 + }
37103 + )
37104 + }
37105 + ),
37106 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
37107 + external_wp_components_namespaceObject.__experimentalToolsPanelItem,
37108 + {
37109 + label: (0,external_wp_i18n_namespaceObject.__)("Show bio"),
37110 + isShownByDefault: true,
37111 + hasValue: () => !!showBio,
37112 + onDeselect: () => setAttributes({ showBio: void 0 }),
37113 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
37114 + external_wp_components_namespaceObject.ToggleControl,
37115 + {
37116 + __nextHasNoMarginBottom: true,
37117 + label: (0,external_wp_i18n_namespaceObject.__)("Show bio"),
37118 + checked: !!showBio,
37119 + onChange: () => setAttributes({ showBio: !showBio })
37120 + }
37121 + )
37122 + }
37123 + ),
37124 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
37125 + external_wp_components_namespaceObject.__experimentalToolsPanelItem,
37126 + {
37127 + label: (0,external_wp_i18n_namespaceObject.__)("Link author name to author page"),
37128 + isShownByDefault: true,
37129 + hasValue: () => !!isLink,
37130 + onDeselect: () => setAttributes({ isLink: false }),
37131 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
37132 + external_wp_components_namespaceObject.ToggleControl,
37133 + {
37134 + __nextHasNoMarginBottom: true,
37135 + label: (0,external_wp_i18n_namespaceObject.__)("Link author name to author page"),
37136 + checked: isLink,
37137 + onChange: () => setAttributes({ isLink: !isLink })
37138 + }
37139 + )
37140 + }
37141 + ),
37142 + isLink && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
37143 + external_wp_components_namespaceObject.__experimentalToolsPanelItem,
37144 + {
37145 + label: (0,external_wp_i18n_namespaceObject.__)("Link target"),
37146 + isShownByDefault: true,
37147 + hasValue: () => linkTarget !== "_self",
37148 + onDeselect: () => setAttributes({ linkTarget: "_self" }),
37149 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
37150 + external_wp_components_namespaceObject.ToggleControl,
37151 + {
37152 + __nextHasNoMarginBottom: true,
37153 + label: (0,external_wp_i18n_namespaceObject.__)("Open in new tab"),
37154 + onChange: (value) => setAttributes({
37155 + linkTarget: value ? "_blank" : "_self"
37156 + }),
37157 + checked: linkTarget === "_blank"
37158 + }
37159 + )
37160 + }
37161 + )
37162 + ]
37163 + }
37164 + ) }),
37165 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockControls, { group: "block", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
37166 + external_wp_blockEditor_namespaceObject.AlignmentControl,
37167 + {
37168 + value: textAlign,
37169 + onChange: (nextAlign) => {
37170 + setAttributes({ textAlign: nextAlign });
37171 + }
37172 + }
37173 + ) }),
37174 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", { ...blockProps, children: [
37175 + showAvatar && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { className: "wp-block-post-author__avatar", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
37176 + "img",
37177 + {
37178 + width: avatarSize,
37179 + src: authorDetails?.avatar_urls?.[avatarSize] || defaultAvatar,
37180 + alt: authorDetails?.name || (0,external_wp_i18n_namespaceObject.__)("Default Avatar")
37181 + }
37182 + ) }),
37183 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", { className: "wp-block-post-author__content", children: [
37184 + (!external_wp_blockEditor_namespaceObject.RichText.isEmpty(byline) || isSelected) && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
37185 + external_wp_blockEditor_namespaceObject.RichText,
37186 + {
37187 + identifier: "byline",
37188 + className: "wp-block-post-author__byline",
37189 + "aria-label": (0,external_wp_i18n_namespaceObject.__)("Post author byline text"),
37190 + placeholder: (0,external_wp_i18n_namespaceObject.__)("Write byline\u2026"),
37191 + value: byline,
37192 + onChange: (value) => setAttributes({ byline: value })
37193 + }
37194 + ),
37195 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("p", { className: "wp-block-post-author__name", children: isLink ? /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
37196 + "a",
37197 + {
37198 + href: "#post-author-pseudo-link",
37199 + onClick: (event) => event.preventDefault(),
37200 + children: authorName
37201 + }
37202 + ) : authorName }),
37203 + showBio && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
37204 + "p",
37205 + {
37206 + className: "wp-block-post-author__bio",
37207 + dangerouslySetInnerHTML: {
37208 + __html: authorDetails?.description
37209 + }
37210 + }
37211 + )
37212 + ] })
37213 + ] })
37214 + ] });
37215 + }
37216 + var post_author_edit_edit_default = PostAuthorEdit;
37217 +
37218 +
37219 + ;// ./node_modules/@wordpress/block-library/build-module/post-author/index.js
37220 +
37221 +
37222 +
37223 +
37224 +
37225 + const { name: post_author_name } = post_author_block_namespaceObject;
37226 + const post_author_settings = {
37227 + icon: post_author_default,
37228 + example: {
37229 + viewportWidth: 350,
37230 + attributes: {
37231 + showBio: true,
37232 + byline: (0,external_wp_i18n_namespaceObject.__)("Posted by")
37233 + }
37234 + },
37235 + edit: post_author_edit_edit_default
37236 + };
37237 + const post_author_init = () => initBlock({ name: post_author_name, metadata: post_author_block_namespaceObject, settings: post_author_settings });
37238 +
37239 +
37240 + ;// ./node_modules/@wordpress/block-library/build-module/post-author-name/block.json
37241 + const post_author_name_block_namespaceObject = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/post-author-name","title":"Author Name","category":"theme","description":"The author name.","textdomain":"default","attributes":{"textAlign":{"type":"string"},"isLink":{"type":"boolean","default":false,"role":"content"},"linkTarget":{"type":"string","default":"_self","role":"content"}},"usesContext":["postType","postId"],"example":{"viewportWidth":350},"supports":{"html":false,"spacing":{"margin":true,"padding":true},"color":{"gradients":true,"link":true,"__experimentalDefaultControls":{"background":true,"text":true,"link":true}},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"interactivity":{"clientNavigation":true},"__experimentalBorder":{"radius":true,"color":true,"width":true,"style":true,"__experimentalDefaultControls":{"radius":true,"color":true,"width":true,"style":true}}},"style":"wp-block-post-author-name"}');
37242 + ;// ./node_modules/@wordpress/block-library/build-module/post-author-name/edit.js
37243 +
37244 +
37245 +
37246 +
37247 +
37248 +
37249 +
37250 +
37251 + function PostAuthorNameEdit({
37252 + context: { postType, postId },
37253 + attributes: { textAlign, isLink, linkTarget },
37254 + setAttributes
37255 + }) {
37256 + const { authorName, supportsAuthor } = (0,external_wp_data_namespaceObject.useSelect)(
37257 + (select) => {
37258 + const { getEditedEntityRecord, getUser, getPostType } = select(external_wp_coreData_namespaceObject.store);
37259 + const _authorId = getEditedEntityRecord(
37260 + "postType",
37261 + postType,
37262 + postId
37263 + )?.author;
37264 + return {
37265 + authorName: _authorId ? getUser(_authorId) : null,
37266 + supportsAuthor: getPostType(postType)?.supports?.author ?? false
37267 + };
37268 + },
37269 + [postType, postId]
37270 + );
37271 + const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)({
37272 + className: dist_clsx({
37273 + [`has-text-align-${textAlign}`]: textAlign
37274 + })
37275 + });
37276 + const displayName = authorName?.name || (0,external_wp_i18n_namespaceObject.__)("Author Name");
37277 + const displayAuthor = isLink ? /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
37278 + "a",
37279 + {
37280 + href: "#author-pseudo-link",
37281 + onClick: (event) => event.preventDefault(),
37282 + className: "wp-block-post-author-name__link",
37283 + children: displayName
37284 + }
37285 + ) : displayName;
37286 + const dropdownMenuProps = useToolsPanelDropdownMenuProps();
37287 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
37288 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockControls, { group: "block", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
37289 + external_wp_blockEditor_namespaceObject.AlignmentControl,
37290 + {
37291 + value: textAlign,
37292 + onChange: (nextAlign) => {
37293 + setAttributes({ textAlign: nextAlign });
37294 + }
37295 + }
37296 + ) }),
37297 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(
37298 + external_wp_components_namespaceObject.__experimentalToolsPanel,
37299 + {
37300 + label: (0,external_wp_i18n_namespaceObject.__)("Settings"),
37301 + resetAll: () => {
37302 + setAttributes({
37303 + isLink: false,
37304 + linkTarget: "_self"
37305 + });
37306 + },
37307 + dropdownMenuProps,
37308 + children: [
37309 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
37310 + external_wp_components_namespaceObject.__experimentalToolsPanelItem,
37311 + {
37312 + label: (0,external_wp_i18n_namespaceObject.__)("Link to author archive"),
37313 + isShownByDefault: true,
37314 + hasValue: () => isLink,
37315 + onDeselect: () => setAttributes({ isLink: false }),
37316 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
37317 + external_wp_components_namespaceObject.ToggleControl,
37318 + {
37319 + __nextHasNoMarginBottom: true,
37320 + label: (0,external_wp_i18n_namespaceObject.__)("Link to author archive"),
37321 + onChange: () => setAttributes({ isLink: !isLink }),
37322 + checked: isLink
37323 + }
37324 + )
37325 + }
37326 + ),
37327 + isLink && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
37328 + external_wp_components_namespaceObject.__experimentalToolsPanelItem,
37329 + {
37330 + label: (0,external_wp_i18n_namespaceObject.__)("Open in new tab"),
37331 + isShownByDefault: true,
37332 + hasValue: () => linkTarget !== "_self",
37333 + onDeselect: () => setAttributes({ linkTarget: "_self" }),
37334 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
37335 + external_wp_components_namespaceObject.ToggleControl,
37336 + {
37337 + __nextHasNoMarginBottom: true,
37338 + label: (0,external_wp_i18n_namespaceObject.__)("Open in new tab"),
37339 + onChange: (value) => setAttributes({
37340 + linkTarget: value ? "_blank" : "_self"
37341 + }),
37342 + checked: linkTarget === "_blank"
37343 + }
37344 + )
37345 + }
37346 + )
37347 + ]
37348 + }
37349 + ) }),
37350 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { ...blockProps, children: !supportsAuthor && postType !== void 0 ? (0,external_wp_i18n_namespaceObject.sprintf)(
37351 + // translators: %s: Name of the post type e.g: "post".
37352 + (0,external_wp_i18n_namespaceObject.__)(
37353 + "This post type (%s) does not support the author."
37354 + ),
37355 + postType
37356 + ) : displayAuthor })
37357 + ] });
37358 + }
37359 + var post_author_name_edit_edit_default = PostAuthorNameEdit;
37360 +
37361 +
37362 + ;// ./node_modules/@wordpress/block-library/build-module/post-author-name/transforms.js
37363 +
37364 + const post_author_name_transforms_transforms = {
37365 + from: [
37366 + {
37367 + type: "block",
37368 + blocks: ["core/post-author"],
37369 + transform: ({ textAlign }) => (0,external_wp_blocks_namespaceObject.createBlock)("core/post-author-name", { textAlign })
37370 + }
37371 + ],
37372 + to: [
37373 + {
37374 + type: "block",
37375 + blocks: ["core/post-author"],
37376 + transform: ({ textAlign }) => (0,external_wp_blocks_namespaceObject.createBlock)("core/post-author", { textAlign })
37377 + }
37378 + ]
37379 + };
37380 + var post_author_name_transforms_transforms_default = post_author_name_transforms_transforms;
37381 +
37382 +
37383 + ;// ./node_modules/@wordpress/block-library/build-module/post-author-name/index.js
37384 +
37385 +
37386 +
37387 +
37388 +
37389 + const { name: post_author_name_name } = post_author_name_block_namespaceObject;
37390 + const post_author_name_settings = {
37391 + icon: post_author_default,
37392 + transforms: post_author_name_transforms_transforms_default,
37393 + edit: post_author_name_edit_edit_default
37394 + };
37395 + const post_author_name_init = () => initBlock({ name: post_author_name_name, metadata: post_author_name_block_namespaceObject, settings: post_author_name_settings });
37396 +
37397 +
37398 + ;// ./node_modules/@wordpress/block-library/build-module/post-author-biography/block.json
37399 + const post_author_biography_block_namespaceObject = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/post-author-biography","title":"Author Biography","category":"theme","description":"The author biography.","textdomain":"default","attributes":{"textAlign":{"type":"string"}},"usesContext":["postType","postId"],"example":{"viewportWidth":350},"supports":{"spacing":{"margin":true,"padding":true},"color":{"gradients":true,"link":true,"__experimentalDefaultControls":{"background":true,"text":true}},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"interactivity":{"clientNavigation":true},"__experimentalBorder":{"radius":true,"color":true,"width":true,"style":true,"__experimentalDefaultControls":{"radius":true,"color":true,"width":true,"style":true}}},"style":"wp-block-post-author-biography"}');
37400 + ;// ./node_modules/@wordpress/block-library/build-module/post-author-biography/edit.js
37401 +
37402 +
37403 +
37404 +
37405 +
37406 +
37407 + function PostAuthorBiographyEdit({
37408 + context: { postType, postId },
37409 + attributes: { textAlign },
37410 + setAttributes
37411 + }) {
37412 + const { authorDetails } = (0,external_wp_data_namespaceObject.useSelect)(
37413 + (select) => {
37414 + const { getEditedEntityRecord, getUser } = select(external_wp_coreData_namespaceObject.store);
37415 + const _authorId = getEditedEntityRecord(
37416 + "postType",
37417 + postType,
37418 + postId
37419 + )?.author;
37420 + return {
37421 + authorDetails: _authorId ? getUser(_authorId) : null
37422 + };
37423 + },
37424 + [postType, postId]
37425 + );
37426 + const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)({
37427 + className: dist_clsx({
37428 + [`has-text-align-${textAlign}`]: textAlign
37429 + })
37430 + });
37431 + const displayAuthorBiography = authorDetails?.description || (0,external_wp_i18n_namespaceObject.__)("Author Biography");
37432 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
37433 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockControls, { group: "block", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
37434 + external_wp_blockEditor_namespaceObject.AlignmentControl,
37435 + {
37436 + value: textAlign,
37437 + onChange: (nextAlign) => {
37438 + setAttributes({ textAlign: nextAlign });
37439 + }
37440 + }
37441 + ) }),
37442 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
37443 + "div",
37444 + {
37445 + ...blockProps,
37446 + dangerouslySetInnerHTML: { __html: displayAuthorBiography }
37447 + }
37448 + )
37449 + ] });
37450 + }
37451 + var post_author_biography_edit_edit_default = PostAuthorBiographyEdit;
37452 +
37453 +
37454 + ;// ./node_modules/@wordpress/block-library/build-module/post-author-biography/index.js
37455 +
37456 +
37457 +
37458 +
37459 + const { name: post_author_biography_name } = post_author_biography_block_namespaceObject;
37460 + const post_author_biography_settings = {
37461 + icon: post_author_default,
37462 + edit: post_author_biography_edit_edit_default
37463 + };
37464 + const post_author_biography_init = () => initBlock({ name: post_author_biography_name, metadata: post_author_biography_block_namespaceObject, settings: post_author_biography_settings });
37465 +
37466 +
37467 + ;// ./node_modules/@wordpress/block-library/build-module/post-comment/block.json
37468 + const post_comment_block_namespaceObject = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"__experimental":"fse","name":"core/post-comment","title":"Comment (deprecated)","category":"theme","allowedBlocks":["core/avatar","core/comment-author-name","core/comment-content","core/comment-date","core/comment-edit-link","core/comment-reply-link"],"description":"This block is deprecated. Please use the Comments block instead.","textdomain":"default","attributes":{"commentId":{"type":"number"}},"providesContext":{"commentId":"commentId"},"supports":{"html":false,"inserter":false,"interactivity":{"clientNavigation":true}}}');
37469 + ;// ./node_modules/@wordpress/icons/build-module/library/block-default.js
37470 +
37471 +
37472 + var block_default_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M19 8h-1V6h-5v2h-2V6H6v2H5c-1.1 0-2 .9-2 2v8c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-8c0-1.1-.9-2-2-2zm.5 10c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5v-8c0-.3.2-.5.5-.5h14c.3 0 .5.2.5.5v8z" }) });
37473 +
37474 +
37475 + ;// ./node_modules/@wordpress/block-library/build-module/post-comment/edit.js
37476 +
37477 +
37478 +
37479 +
37480 +
37481 +
37482 + const post_comment_edit_TEMPLATE = [
37483 + ["core/avatar"],
37484 + ["core/comment-author-name"],
37485 + ["core/comment-date"],
37486 + ["core/comment-content"],
37487 + ["core/comment-reply-link"],
37488 + ["core/comment-edit-link"]
37489 + ];
37490 + function post_comment_edit_Edit({ attributes: { commentId }, setAttributes }) {
37491 + const [commentIdInput, setCommentIdInput] = (0,external_wp_element_namespaceObject.useState)(commentId);
37492 + const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)();
37493 + const innerBlocksProps = (0,external_wp_blockEditor_namespaceObject.useInnerBlocksProps)(blockProps, {
37494 + template: post_comment_edit_TEMPLATE
37495 + });
37496 + if (!commentId) {
37497 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { ...blockProps, children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(
37498 + external_wp_components_namespaceObject.Placeholder,
37499 + {
37500 + icon: block_default_default,
37501 + label: (0,external_wp_i18n_namespaceObject._x)("Post Comment", "block title"),
37502 + instructions: (0,external_wp_i18n_namespaceObject.__)(
37503 + "To show a comment, input the comment ID."
37504 + ),
37505 + children: [
37506 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
37507 + external_wp_components_namespaceObject.TextControl,
37508 + {
37509 + __next40pxDefaultSize: true,
37510 + __nextHasNoMarginBottom: true,
37511 + value: commentId,
37512 + onChange: (val) => setCommentIdInput(parseInt(val))
37513 + }
37514 + ),
37515 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
37516 + external_wp_components_namespaceObject.Button,
37517 + {
37518 + __next40pxDefaultSize: true,
37519 + variant: "primary",
37520 + onClick: () => {
37521 + setAttributes({ commentId: commentIdInput });
37522 + },
37523 + children: (0,external_wp_i18n_namespaceObject.__)("Save")
37524 + }
37525 + )
37526 + ]
37527 + }
37528 + ) });
37529 + }
37530 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { ...innerBlocksProps });
37531 + }
37532 +
37533 +
37534 + ;// ./node_modules/@wordpress/block-library/build-module/post-comment/save.js
37535 +
37536 +
37537 + function post_comment_save_save() {
37538 + const blockProps = external_wp_blockEditor_namespaceObject.useBlockProps.save();
37539 + const innerBlocksProps = external_wp_blockEditor_namespaceObject.useInnerBlocksProps.save(blockProps);
37540 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { ...innerBlocksProps });
37541 + }
37542 +
37543 +
37544 + ;// ./node_modules/@wordpress/block-library/build-module/post-comment/index.js
37545 +
37546 +
37547 +
37548 +
37549 +
37550 + const { name: post_comment_name } = post_comment_block_namespaceObject;
37551 + const post_comment_settings = {
37552 + icon: comment_default,
37553 + edit: post_comment_edit_Edit,
37554 + save: post_comment_save_save
37555 + };
37556 + const post_comment_init = () => initBlock({ name: post_comment_name, metadata: post_comment_block_namespaceObject, settings: post_comment_settings });
37557 +
37558 +
37559 + ;// ./node_modules/@wordpress/icons/build-module/library/post-comments-count.js
37560 +
37561 +
37562 + var post_comments_count_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M13 8H4v1.5h9V8zM4 4v1.5h16V4H4zm9 8H5c-.6 0-1 .4-1 1v8.3c0 .3.2.7.6.8.1.1.2.1.3.1.2 0 .5-.1.6-.3l1.8-1.8H13c.6 0 1-.4 1-1V13c0-.6-.4-1-1-1zm-2.2 6.6H7l1.6-2.2c.3-.4.5-.7.6-.9.1-.2.2-.4.2-.5 0-.2-.1-.3-.1-.4-.1-.1-.2-.1-.4-.1s-.4 0-.6.1c-.3.1-.5.3-.7.4l-.2.2-.2-1.2.1-.1c.3-.2.5-.3.8-.4.3-.1.6-.1.9-.1.3 0 .6.1.9.2.2.1.4.3.6.5.1.2.2.5.2.7 0 .3-.1.6-.2.9-.1.3-.4.7-.7 1.1l-.5.6h1.6v1.2z" }) });
37563 +
37564 +
37565 + ;// ./node_modules/@wordpress/block-library/build-module/post-comments-count/block.json
37566 + const post_comments_count_block_namespaceObject = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/post-comments-count","title":"Comments Count","category":"theme","description":"Display a post\'s comments count.","textdomain":"default","attributes":{"textAlign":{"type":"string"}},"usesContext":["postId"],"example":{"viewportWidth":350},"supports":{"html":false,"color":{"gradients":true,"__experimentalDefaultControls":{"background":true,"text":true}},"spacing":{"margin":true,"padding":true},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"__experimentalBorder":{"radius":true,"color":true,"width":true,"style":true},"interactivity":{"clientNavigation":true}},"style":"wp-block-post-comments-count"}');
37567 + ;// ./node_modules/@wordpress/block-library/build-module/post-comments-count/edit.js
37568 +
37569 +
37570 +
37571 +
37572 +
37573 +
37574 +
37575 + function PostCommentsCountEdit({
37576 + attributes,
37577 + context,
37578 + setAttributes
37579 + }) {
37580 + const { textAlign } = attributes;
37581 + const { postId } = context;
37582 + const [commentsCount, setCommentsCount] = (0,external_wp_element_namespaceObject.useState)();
37583 + const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)({
37584 + className: dist_clsx({
37585 + [`has-text-align-${textAlign}`]: textAlign
37586 + })
37587 + });
37588 + (0,external_wp_element_namespaceObject.useEffect)(() => {
37589 + if (!postId) {
37590 + return;
37591 + }
37592 + const currentPostId = postId;
37593 + external_wp_apiFetch_default()({
37594 + path: (0,external_wp_url_namespaceObject.addQueryArgs)("/wp/v2/comments", {
37595 + post: postId
37596 + }),
37597 + parse: false
37598 + }).then((res) => {
37599 + if (currentPostId === postId) {
37600 + setCommentsCount(res.headers.get("X-WP-Total"));
37601 + }
37602 + });
37603 + }, [postId]);
37604 + const hasPostAndComments = postId && commentsCount !== void 0;
37605 + const blockStyles = {
37606 + ...blockProps.style,
37607 + textDecoration: hasPostAndComments ? blockProps.style?.textDecoration : void 0
37608 + };
37609 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
37610 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockControls, { group: "block", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
37611 + external_wp_blockEditor_namespaceObject.AlignmentControl,
37612 + {
37613 + value: textAlign,
37614 + onChange: (nextAlign) => {
37615 + setAttributes({ textAlign: nextAlign });
37616 + }
37617 + }
37618 + ) }),
37619 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { ...blockProps, style: blockStyles, children: hasPostAndComments ? commentsCount : /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.Warning, { children: (0,external_wp_i18n_namespaceObject.__)("Post Comments Count block: post not found.") }) })
37620 + ] });
37621 + }
37622 +
37623 +
37624 + ;// ./node_modules/@wordpress/block-library/build-module/post-comments-count/transforms.js
37625 +
37626 + const post_comments_count_transforms_transforms = {
37627 + to: [
37628 + {
37629 + type: "block",
37630 + blocks: ["core/post-comments-link"],
37631 + transform: ({ textAlign }) => {
37632 + return (0,external_wp_blocks_namespaceObject.createBlock)("core/post-comments-link", {
37633 + textAlign
37634 + });
37635 + }
37636 + }
37637 + ]
37638 + };
37639 + var post_comments_count_transforms_transforms_default = post_comments_count_transforms_transforms;
37640 +
37641 +
37642 + ;// ./node_modules/@wordpress/block-library/build-module/post-comments-count/index.js
37643 +
37644 +
37645 +
37646 +
37647 +
37648 + const { name: post_comments_count_name } = post_comments_count_block_namespaceObject;
37649 + const post_comments_count_settings = {
37650 + icon: post_comments_count_default,
37651 + edit: PostCommentsCountEdit,
37652 + transforms: post_comments_count_transforms_transforms_default
37653 + };
37654 + const post_comments_count_init = () => initBlock({ name: post_comments_count_name, metadata: post_comments_count_block_namespaceObject, settings: post_comments_count_settings });
37655 +
37656 +
37657 + ;// ./node_modules/@wordpress/icons/build-module/library/post-comments-form.js
37658 +
37659 +
37660 + var post_comments_form_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M13 8H4v1.5h9V8zM4 4v1.5h16V4H4zm9 8H5c-.6 0-1 .4-1 1v8.3c0 .3.2.7.6.8.1.1.2.1.3.1.2 0 .5-.1.6-.3l1.8-1.8H13c.6 0 1-.4 1-1V13c0-.6-.4-1-1-1zm-.5 6.6H6.7l-1.2 1.2v-6.3h7v5.1z" }) });
37661 +
37662 +
37663 + ;// ./node_modules/@wordpress/block-library/build-module/post-comments-form/block.json
37664 + const post_comments_form_block_namespaceObject = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/post-comments-form","title":"Comments Form","category":"theme","description":"Display a post\'s comments form.","textdomain":"default","attributes":{"textAlign":{"type":"string"}},"usesContext":["postId","postType"],"supports":{"html":false,"color":{"gradients":true,"heading":true,"link":true,"__experimentalDefaultControls":{"background":true,"text":true}},"spacing":{"margin":true,"padding":true},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontStyle":true,"__experimentalFontWeight":true,"__experimentalLetterSpacing":true,"__experimentalTextTransform":true,"__experimentalDefaultControls":{"fontSize":true}},"__experimentalBorder":{"radius":true,"color":true,"width":true,"style":true,"__experimentalDefaultControls":{"radius":true,"color":true,"width":true,"style":true}}},"editorStyle":"wp-block-post-comments-form-editor","style":["wp-block-post-comments-form","wp-block-buttons","wp-block-button"],"example":{"attributes":{"textAlign":"center"}}}');
37665 + ;// ./node_modules/@wordpress/block-library/build-module/post-comments-form/edit.js
37666 +
37667 +
37668 +
37669 +
37670 +
37671 +
37672 +
37673 + function PostCommentsFormEdit({
37674 + attributes,
37675 + context,
37676 + setAttributes
37677 + }) {
37678 + const { textAlign } = attributes;
37679 + const { postId, postType } = context;
37680 + const instanceId = (0,external_wp_compose_namespaceObject.useInstanceId)(PostCommentsFormEdit);
37681 + const instanceIdDesc = (0,external_wp_i18n_namespaceObject.sprintf)("comments-form-edit-%d-desc", instanceId);
37682 + const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)({
37683 + className: dist_clsx({
37684 + [`has-text-align-${textAlign}`]: textAlign
37685 + }),
37686 + "aria-describedby": instanceIdDesc
37687 + });
37688 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
37689 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockControls, { group: "block", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
37690 + external_wp_blockEditor_namespaceObject.AlignmentControl,
37691 + {
37692 + value: textAlign,
37693 + onChange: (nextAlign) => {
37694 + setAttributes({ textAlign: nextAlign });
37695 + }
37696 + }
37697 + ) }),
37698 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", { ...blockProps, children: [
37699 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(form_default, { postId, postType }),
37700 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.VisuallyHidden, { id: instanceIdDesc, children: (0,external_wp_i18n_namespaceObject.__)("Comments form disabled in editor.") })
37701 + ] })
37702 + ] });
37703 + }
37704 +
37705 +
37706 + ;// ./node_modules/@wordpress/block-library/build-module/post-comments-form/index.js
37707 +
37708 +
37709 +
37710 +
37711 + const { name: post_comments_form_name } = post_comments_form_block_namespaceObject;
37712 + const post_comments_form_settings = {
37713 + icon: post_comments_form_default,
37714 + edit: PostCommentsFormEdit
37715 + };
37716 + const post_comments_form_init = () => initBlock({ name: post_comments_form_name, metadata: post_comments_form_block_namespaceObject, settings: post_comments_form_settings });
37717 +
37718 +
37719 + ;// ./node_modules/@wordpress/block-library/build-module/post-comments-link/block.json
37720 + const post_comments_link_block_namespaceObject = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/post-comments-link","title":"Comments Link","category":"theme","description":"Displays the link to the current post comments.","textdomain":"default","usesContext":["postType","postId"],"attributes":{"textAlign":{"type":"string"}},"example":{"viewportWidth":350},"supports":{"html":false,"color":{"link":true,"text":false,"__experimentalDefaultControls":{"background":true,"link":true}},"spacing":{"margin":true,"padding":true},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"interactivity":{"clientNavigation":true},"__experimentalBorder":{"radius":true,"color":true,"width":true,"style":true,"__experimentalDefaultControls":{"radius":true,"color":true,"width":true,"style":true}}},"style":"wp-block-post-comments-link"}');
37721 + ;// ./node_modules/@wordpress/block-library/build-module/post-comments-link/edit.js
37722 +
37723 +
37724 +
37725 +
37726 +
37727 +
37728 +
37729 +
37730 +
37731 + function PostCommentsLinkEdit({ context, attributes, setAttributes }) {
37732 + const { textAlign } = attributes;
37733 + const { postType, postId } = context;
37734 + const [commentsCount, setCommentsCount] = (0,external_wp_element_namespaceObject.useState)();
37735 + const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)({
37736 + className: dist_clsx({
37737 + [`has-text-align-${textAlign}`]: textAlign
37738 + })
37739 + });
37740 + (0,external_wp_element_namespaceObject.useEffect)(() => {
37741 + if (!postId) {
37742 + return;
37743 + }
37744 + const currentPostId = postId;
37745 + external_wp_apiFetch_default()({
37746 + path: (0,external_wp_url_namespaceObject.addQueryArgs)("/wp/v2/comments", {
37747 + post: postId
37748 + }),
37749 + parse: false
37750 + }).then((res) => {
37751 + if (currentPostId === postId) {
37752 + setCommentsCount(res.headers.get("X-WP-Total"));
37753 + }
37754 + });
37755 + }, [postId]);
37756 + const post = (0,external_wp_data_namespaceObject.useSelect)(
37757 + (select) => select(external_wp_coreData_namespaceObject.store).getEditedEntityRecord(
37758 + "postType",
37759 + postType,
37760 + postId
37761 + ),
37762 + [postType, postId]
37763 + );
37764 + if (!post) {
37765 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { ...blockProps, children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.Warning, { children: (0,external_wp_i18n_namespaceObject.__)("Post Comments Link block: post not found.") }) });
37766 + }
37767 + const { link } = post;
37768 + let commentsText;
37769 + if (commentsCount !== void 0) {
37770 + const commentsNumber = parseInt(commentsCount);
37771 + if (commentsNumber === 0) {
37772 + commentsText = (0,external_wp_i18n_namespaceObject.__)("No comments");
37773 + } else {
37774 + commentsText = (0,external_wp_i18n_namespaceObject.sprintf)(
37775 + /* translators: %s: Number of comments */
37776 + (0,external_wp_i18n_namespaceObject._n)("%s comment", "%s comments", commentsNumber),
37777 + commentsNumber.toLocaleString()
37778 + );
37779 + }
37780 + }
37781 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
37782 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockControls, { group: "block", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
37783 + external_wp_blockEditor_namespaceObject.AlignmentControl,
37784 + {
37785 + value: textAlign,
37786 + onChange: (nextAlign) => {
37787 + setAttributes({ textAlign: nextAlign });
37788 + }
37789 + }
37790 + ) }),
37791 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { ...blockProps, children: link && commentsText !== void 0 ? /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
37792 + "a",
37793 + {
37794 + href: link + "#comments",
37795 + onClick: (event) => event.preventDefault(),
37796 + children: commentsText
37797 + }
37798 + ) : /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.Warning, { children: (0,external_wp_i18n_namespaceObject.__)("Post Comments Link block: post not found.") }) })
37799 + ] });
37800 + }
37801 + var post_comments_link_edit_edit_default = PostCommentsLinkEdit;
37802 +
37803 +
37804 + ;// ./node_modules/@wordpress/block-library/build-module/post-comments-link/transforms.js
37805 +
37806 + const post_comments_link_transforms_transforms = {
37807 + to: [
37808 + {
37809 + type: "block",
37810 + blocks: ["core/post-comments-count"],
37811 + transform: ({ textAlign }) => {
37812 + return (0,external_wp_blocks_namespaceObject.createBlock)("core/post-comments-count", {
37813 + textAlign
37814 + });
37815 + }
37816 + }
37817 + ]
37818 + };
37819 + var post_comments_link_transforms_transforms_default = post_comments_link_transforms_transforms;
37820 +
37821 +
37822 + ;// ./node_modules/@wordpress/block-library/build-module/post-comments-link/index.js
37823 +
37824 +
37825 +
37826 +
37827 +
37828 + const { name: post_comments_link_name } = post_comments_link_block_namespaceObject;
37829 + const post_comments_link_settings = {
37830 + edit: post_comments_link_edit_edit_default,
37831 + icon: post_comments_count_default,
37832 + transforms: post_comments_link_transforms_transforms_default
37833 + };
37834 + const post_comments_link_init = () => initBlock({ name: post_comments_link_name, metadata: post_comments_link_block_namespaceObject, settings: post_comments_link_settings });
37835 +
37836 +
37837 + ;// ./node_modules/@wordpress/icons/build-module/library/post-content.js
37838 +
37839 +
37840 + var post_content_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M4 6h12V4.5H4V6Zm16 4.5H4V9h16v1.5ZM4 15h16v-1.5H4V15Zm0 4.5h16V18H4v1.5Z" }) });
37841 +
37842 +
37843 + ;// ./node_modules/@wordpress/block-library/build-module/post-content/block.json
37844 + const post_content_block_namespaceObject = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/post-content","title":"Content","category":"theme","description":"Displays the contents of a post or page.","textdomain":"default","usesContext":["postId","postType","queryId"],"attributes":{"tagName":{"type":"string","default":"div"}},"example":{"viewportWidth":350},"supports":{"align":["wide","full"],"html":false,"layout":true,"background":{"backgroundImage":true,"backgroundSize":true,"__experimentalDefaultControls":{"backgroundImage":true}},"dimensions":{"minHeight":true},"spacing":{"blockGap":true,"padding":true,"margin":true,"__experimentalDefaultControls":{"margin":false,"padding":false}},"color":{"gradients":true,"heading":true,"link":true,"__experimentalDefaultControls":{"background":false,"text":false}},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"interactivity":{"clientNavigation":true},"__experimentalBorder":{"radius":true,"color":true,"width":true,"style":true,"__experimentalDefaultControls":{"radius":true,"color":true,"width":true,"style":true}}},"style":"wp-block-post-content","editorStyle":"wp-block-post-content-editor"}');
37845 + ;// ./node_modules/@wordpress/block-library/build-module/post-content/edit.js
37846 +
37847 +
37848 +
37849 +
37850 +
37851 +
37852 +
37853 +
37854 +
37855 + const { HTMLElementControl: post_content_edit_HTMLElementControl } = unlock(external_wp_blockEditor_namespaceObject.privateApis);
37856 + function ReadOnlyContent({
37857 + parentLayout,
37858 + layoutClassNames,
37859 + userCanEdit,
37860 + postType,
37861 + postId,
37862 + tagName: TagName = "div"
37863 + }) {
37864 + const [, , content] = (0,external_wp_coreData_namespaceObject.useEntityProp)(
37865 + "postType",
37866 + postType,
37867 + "content",
37868 + postId
37869 + );
37870 + const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)({ className: layoutClassNames });
37871 + const blocks = (0,external_wp_element_namespaceObject.useMemo)(() => {
37872 + return content?.raw ? (0,external_wp_blocks_namespaceObject.parse)(content.raw) : [];
37873 + }, [content?.raw]);
37874 + const blockPreviewProps = (0,external_wp_blockEditor_namespaceObject.__experimentalUseBlockPreview)({
37875 + blocks,
37876 + props: blockProps,
37877 + layout: parentLayout
37878 + });
37879 + if (userCanEdit) {
37880 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { ...blockPreviewProps });
37881 + }
37882 + return content?.protected ? /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(TagName, { ...blockProps, children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.Warning, { children: (0,external_wp_i18n_namespaceObject.__)("This content is password protected.") }) }) : /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
37883 + TagName,
37884 + {
37885 + ...blockProps,
37886 + dangerouslySetInnerHTML: { __html: content?.rendered }
37887 + }
37888 + );
37889 + }
37890 + function EditableContent({ context = {}, tagName: TagName = "div" }) {
37891 + const { postType, postId } = context;
37892 + const [blocks, onInput, onChange] = (0,external_wp_coreData_namespaceObject.useEntityBlockEditor)(
37893 + "postType",
37894 + postType,
37895 + { id: postId }
37896 + );
37897 + const entityRecord = (0,external_wp_data_namespaceObject.useSelect)(
37898 + (select) => {
37899 + return select(external_wp_coreData_namespaceObject.store).getEntityRecord(
37900 + "postType",
37901 + postType,
37902 + postId
37903 + );
37904 + },
37905 + [postType, postId]
37906 + );
37907 + const hasInnerBlocks = !!entityRecord?.content?.raw || blocks?.length;
37908 + const initialInnerBlocks = [["core/paragraph"]];
37909 + const props = (0,external_wp_blockEditor_namespaceObject.useInnerBlocksProps)(
37910 + (0,external_wp_blockEditor_namespaceObject.useBlockProps)({ className: "entry-content" }),
37911 + {
37912 + value: blocks,
37913 + onInput,
37914 + onChange,
37915 + template: !hasInnerBlocks ? initialInnerBlocks : void 0
37916 + }
37917 + );
37918 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(TagName, { ...props });
37919 + }
37920 + function Content(props) {
37921 + const {
37922 + context: { queryId, postType, postId } = {},
37923 + layoutClassNames,
37924 + tagName
37925 + } = props;
37926 + const userCanEdit = useCanEditEntity("postType", postType, postId);
37927 + if (userCanEdit === void 0) {
37928 + return null;
37929 + }
37930 + const isDescendentOfQueryLoop = Number.isFinite(queryId);
37931 + const isEditable = userCanEdit && !isDescendentOfQueryLoop;
37932 + return isEditable ? /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(EditableContent, { ...props }) : /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
37933 + ReadOnlyContent,
37934 + {
37935 + parentLayout: props.parentLayout,
37936 + layoutClassNames,
37937 + userCanEdit,
37938 + postType,
37939 + postId,
37940 + tagName
37941 + }
37942 + );
37943 + }
37944 + function edit_Placeholder({ layoutClassNames }) {
37945 + const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)({ className: layoutClassNames });
37946 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", { ...blockProps, children: [
37947 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("p", { children: (0,external_wp_i18n_namespaceObject.__)(
37948 + "This is the Content block, it will display all the blocks in any single post or page."
37949 + ) }),
37950 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("p", { children: (0,external_wp_i18n_namespaceObject.__)(
37951 + "That might be a simple arrangement like consecutive paragraphs in a blog post, or a more elaborate composition that includes image galleries, videos, tables, columns, and any other block types."
37952 + ) }),
37953 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("p", { children: (0,external_wp_i18n_namespaceObject.__)(
37954 + "If there are any Custom Post Types registered at your site, the Content block can display the contents of those entries as well."
37955 + ) })
37956 + ] });
37957 + }
37958 + function RecursionError() {
37959 + const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)();
37960 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { ...blockProps, children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.Warning, { children: (0,external_wp_i18n_namespaceObject.__)("Block cannot be rendered inside itself.") }) });
37961 + }
37962 + function PostContentEditControls({ tagName, onSelectTagName, clientId }) {
37963 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, { group: "advanced", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
37964 + post_content_edit_HTMLElementControl,
37965 + {
37966 + tagName,
37967 + onChange: onSelectTagName,
37968 + clientId,
37969 + options: [
37970 + { label: (0,external_wp_i18n_namespaceObject.__)("Default (<div>)"), value: "div" },
37971 + { label: "<main>", value: "main" },
37972 + { label: "<section>", value: "section" },
37973 + { label: "<article>", value: "article" }
37974 + ]
37975 + }
37976 + ) });
37977 + }
37978 + function PostContentEdit({
37979 + context,
37980 + attributes: { tagName = "div" },
37981 + setAttributes,
37982 + clientId,
37983 + __unstableLayoutClassNames: layoutClassNames,
37984 + __unstableParentLayout: parentLayout
37985 + }) {
37986 + const { postId: contextPostId, postType: contextPostType } = context;
37987 + const hasAlreadyRendered = (0,external_wp_blockEditor_namespaceObject.useHasRecursion)(contextPostId);
37988 + if (contextPostId && contextPostType && hasAlreadyRendered) {
37989 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(RecursionError, {});
37990 + }
37991 + const handleSelectTagName = (value) => {
37992 + setAttributes({ tagName: value });
37993 + };
37994 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
37995 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
37996 + PostContentEditControls,
37997 + {
37998 + tagName,
37999 + onSelectTagName: handleSelectTagName,
38000 + clientId
38001 + }
38002 + ),
38003 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RecursionProvider, { uniqueId: contextPostId, children: contextPostId && contextPostType ? /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
38004 + Content,
38005 + {
38006 + context,
38007 + parentLayout,
38008 + layoutClassNames
38009 + }
38010 + ) : /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(edit_Placeholder, { layoutClassNames }) })
38011 + ] });
38012 + }
38013 +
38014 +
38015 + ;// ./node_modules/@wordpress/block-library/build-module/post-content/index.js
38016 +
38017 +
38018 +
38019 +
38020 + const { name: post_content_name } = post_content_block_namespaceObject;
38021 + const post_content_settings = {
38022 + icon: post_content_default,
38023 + edit: PostContentEdit
38024 + };
38025 + const post_content_init = () => initBlock({ name: post_content_name, metadata: post_content_block_namespaceObject, settings: post_content_settings });
38026 +
38027 +
38028 + ;// ./node_modules/@wordpress/block-library/build-module/post-date/block.json
38029 + const post_date_block_namespaceObject = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/post-date","title":"Date","category":"theme","description":"Display a custom date.","textdomain":"default","attributes":{"datetime":{"type":"string","role":"content"},"textAlign":{"type":"string"},"format":{"type":"string"},"isLink":{"type":"boolean","default":false,"role":"content"}},"usesContext":["postId","postType","queryId"],"example":{"viewportWidth":350},"supports":{"html":false,"color":{"gradients":true,"link":true,"__experimentalDefaultControls":{"background":true,"text":true,"link":true}},"spacing":{"margin":true,"padding":true},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"interactivity":{"clientNavigation":true},"__experimentalBorder":{"radius":true,"color":true,"width":true,"style":true,"__experimentalDefaultControls":{"radius":true,"color":true,"width":true,"style":true}}}}');
38030 + ;// ./node_modules/@wordpress/block-library/build-module/post-date/edit.js
38031 +
38032 +
38033 +
38034 +
38035 +
38036 +
38037 +
38038 +
38039 +
38040 +
38041 +
38042 +
38043 +
38044 + function PostDateEdit({
38045 + attributes,
38046 + context: { postType: postTypeSlug, queryId },
38047 + setAttributes,
38048 + name
38049 + }) {
38050 + const { datetime, textAlign, format, isLink } = attributes;
38051 + const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)({
38052 + className: dist_clsx({
38053 + [`has-text-align-${textAlign}`]: textAlign
38054 + })
38055 + });
38056 + const dropdownMenuProps = useToolsPanelDropdownMenuProps();
38057 + const [popoverAnchor, setPopoverAnchor] = (0,external_wp_element_namespaceObject.useState)(null);
38058 + const popoverProps = (0,external_wp_element_namespaceObject.useMemo)(
38059 + () => ({ anchor: popoverAnchor }),
38060 + [popoverAnchor]
38061 + );
38062 + const { __unstableMarkNextChangeAsNotPersistent } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_blockEditor_namespaceObject.store);
38063 + (0,external_wp_element_namespaceObject.useEffect)(() => {
38064 + if (datetime === void 0) {
38065 + __unstableMarkNextChangeAsNotPersistent();
38066 + setAttributes({ datetime: /* @__PURE__ */ new Date() });
38067 + }
38068 + }, [datetime]);
38069 + const isDescendentOfQueryLoop = Number.isFinite(queryId);
38070 + const dateSettings = (0,external_wp_date_namespaceObject.getSettings)();
38071 + const {
38072 + postType,
38073 + siteFormat = dateSettings.formats.date,
38074 + siteTimeFormat = dateSettings.formats.time
38075 + } = (0,external_wp_data_namespaceObject.useSelect)(
38076 + (select) => {
38077 + const { getPostType, getEntityRecord } = select(external_wp_coreData_namespaceObject.store);
38078 + const siteSettings = getEntityRecord("root", "site");
38079 + return {
38080 + siteFormat: siteSettings?.date_format,
38081 + siteTimeFormat: siteSettings?.time_format,
38082 + postType: postTypeSlug ? getPostType(postTypeSlug) : null
38083 + };
38084 + },
38085 + [postTypeSlug]
38086 + );
38087 + const activeBlockVariationName = (0,external_wp_data_namespaceObject.useSelect)(
38088 + (select) => select(external_wp_blocks_namespaceObject.store).getActiveBlockVariation(name, attributes)?.name,
38089 + [name, attributes]
38090 + );
38091 + const blockEditingMode = (0,external_wp_blockEditor_namespaceObject.useBlockEditingMode)();
38092 + let postDate = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("time", { dateTime: (0,external_wp_date_namespaceObject.dateI18n)("c", datetime), ref: setPopoverAnchor, children: format === "human-diff" ? (0,external_wp_date_namespaceObject.humanTimeDiff)(datetime) : (0,external_wp_date_namespaceObject.dateI18n)(format || siteFormat, datetime) });
38093 + if (isLink && datetime) {
38094 + postDate = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
38095 + "a",
38096 + {
38097 + href: "#post-date-pseudo-link",
38098 + onClick: (event) => event.preventDefault(),
38099 + children: postDate
38100 + }
38101 + );
38102 + }
38103 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
38104 + (blockEditingMode === "default" || !isDescendentOfQueryLoop) && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_blockEditor_namespaceObject.BlockControls, { group: "block", children: [
38105 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
38106 + external_wp_blockEditor_namespaceObject.AlignmentControl,
38107 + {
38108 + value: textAlign,
38109 + onChange: (nextAlign) => {
38110 + setAttributes({ textAlign: nextAlign });
38111 + }
38112 + }
38113 + ),
38114 + activeBlockVariationName !== "post-date-modified" && (!isDescendentOfQueryLoop || !activeBlockVariationName) && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ToolbarGroup, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
38115 + external_wp_components_namespaceObject.Dropdown,
38116 + {
38117 + popoverProps,
38118 + renderContent: ({ onClose }) => /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
38119 + external_wp_blockEditor_namespaceObject.__experimentalPublishDateTimePicker,
38120 + {
38121 + title: activeBlockVariationName === "post-date" ? (0,external_wp_i18n_namespaceObject.__)("Publish Date") : (0,external_wp_i18n_namespaceObject.__)("Date"),
38122 + currentDate: datetime,
38123 + onChange: (newDatetime) => setAttributes({
38124 + datetime: newDatetime
38125 + }),
38126 + is12Hour: is12HourFormat(
38127 + siteTimeFormat
38128 + ),
38129 + onClose,
38130 + dateOrder: (
38131 + /* translators: Order of day, month, and year. Available formats are 'dmy', 'mdy', and 'ymd'. */
38132 + (0,external_wp_i18n_namespaceObject._x)("dmy", "date order")
38133 + )
38134 + }
38135 + ),
38136 + renderToggle: ({ isOpen, onToggle }) => {
38137 + const openOnArrowDown = (event) => {
38138 + if (!isOpen && event.keyCode === external_wp_keycodes_namespaceObject.DOWN) {
38139 + event.preventDefault();
38140 + onToggle();
38141 + }
38142 + };
38143 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
38144 + external_wp_components_namespaceObject.ToolbarButton,
38145 + {
38146 + "aria-expanded": isOpen,
38147 + icon: pencil_default,
38148 + title: (0,external_wp_i18n_namespaceObject.__)("Change Date"),
38149 + onClick: onToggle,
38150 + onKeyDown: openOnArrowDown
38151 + }
38152 + );
38153 + }
38154 + }
38155 + ) })
38156 + ] }),
38157 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(
38158 + external_wp_components_namespaceObject.__experimentalToolsPanel,
38159 + {
38160 + label: (0,external_wp_i18n_namespaceObject.__)("Settings"),
38161 + resetAll: () => {
38162 + setAttributes({
38163 + datetime: void 0,
38164 + format: void 0,
38165 + isLink: false
38166 + });
38167 + },
38168 + dropdownMenuProps,
38169 + children: [
38170 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
38171 + external_wp_components_namespaceObject.__experimentalToolsPanelItem,
38172 + {
38173 + hasValue: () => !!format,
38174 + label: (0,external_wp_i18n_namespaceObject.__)("Date Format"),
38175 + onDeselect: () => setAttributes({ format: void 0 }),
38176 + isShownByDefault: true,
38177 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
38178 + external_wp_blockEditor_namespaceObject.__experimentalDateFormatPicker,
38179 + {
38180 + format,
38181 + defaultFormat: siteFormat,
38182 + onChange: (nextFormat) => setAttributes({ format: nextFormat })
38183 + }
38184 + )
38185 + }
38186 + ),
38187 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
38188 + external_wp_components_namespaceObject.__experimentalToolsPanelItem,
38189 + {
38190 + hasValue: () => isLink !== false,
38191 + label: postType?.labels.singular_name ? (0,external_wp_i18n_namespaceObject.sprintf)(
38192 + // translators: %s: Name of the post type e.g: "post".
38193 + (0,external_wp_i18n_namespaceObject.__)("Link to %s"),
38194 + postType.labels.singular_name.toLowerCase()
38195 + ) : (0,external_wp_i18n_namespaceObject.__)("Link to post"),
38196 + onDeselect: () => setAttributes({ isLink: false }),
38197 + isShownByDefault: true,
38198 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
38199 + external_wp_components_namespaceObject.ToggleControl,
38200 + {
38201 + __nextHasNoMarginBottom: true,
38202 + label: postType?.labels.singular_name ? (0,external_wp_i18n_namespaceObject.sprintf)(
38203 + // translators: %s: Name of the post type e.g: "post".
38204 + (0,external_wp_i18n_namespaceObject.__)("Link to %s"),
38205 + postType.labels.singular_name.toLowerCase()
38206 + ) : (0,external_wp_i18n_namespaceObject.__)("Link to post"),
38207 + onChange: () => setAttributes({ isLink: !isLink }),
38208 + checked: isLink
38209 + }
38210 + )
38211 + }
38212 + )
38213 + ]
38214 + }
38215 + ) }),
38216 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { ...blockProps, children: postDate })
38217 + ] });
38218 + }
38219 + function is12HourFormat(format) {
38220 + return /(?:^|[^\\])[aAgh]/.test(format);
38221 + }
38222 +
38223 +
38224 + ;// ./node_modules/@wordpress/block-library/build-module/post-date/deprecated.js
38225 +
38226 +
38227 + const post_date_deprecated_v3 = {
38228 + attributes: {
38229 + datetime: {
38230 + type: "string",
38231 + role: "content"
38232 + },
38233 + textAlign: {
38234 + type: "string"
38235 + },
38236 + format: {
38237 + type: "string"
38238 + },
38239 + isLink: {
38240 + type: "boolean",
38241 + default: false,
38242 + role: "content"
38243 + }
38244 + },
38245 + supports: {
38246 + html: false,
38247 + color: {
38248 + gradients: true,
38249 + link: true,
38250 + __experimentalDefaultControls: {
38251 + background: true,
38252 + text: true,
38253 + link: true
38254 + }
38255 + },
38256 + spacing: {
38257 + margin: true,
38258 + padding: true
38259 + },
38260 + typography: {
38261 + fontSize: true,
38262 + lineHeight: true,
38263 + __experimentalFontFamily: true,
38264 + __experimentalFontWeight: true,
38265 + __experimentalFontStyle: true,
38266 + __experimentalTextTransform: true,
38267 + __experimentalTextDecoration: true,
38268 + __experimentalLetterSpacing: true,
38269 + __experimentalDefaultControls: {
38270 + fontSize: true
38271 + }
38272 + },
38273 + interactivity: {
38274 + clientNavigation: true
38275 + },
38276 + __experimentalBorder: {
38277 + radius: true,
38278 + color: true,
38279 + width: true,
38280 + style: true,
38281 + __experimentalDefaultControls: {
38282 + radius: true,
38283 + color: true,
38284 + width: true,
38285 + style: true
38286 + }
38287 + }
38288 + },
38289 + save() {
38290 + return null;
38291 + },
38292 + migrate({
38293 + metadata: {
38294 + bindings: {
38295 + datetime: {
38296 + source,
38297 + args: { key, ...otherArgs }
38298 + },
38299 + ...otherBindings
38300 + },
38301 + ...otherMetadata
38302 + },
38303 + ...otherAttributes
38304 + }) {
38305 + return {
38306 + metadata: {
38307 + bindings: {
38308 + datetime: {
38309 + source,
38310 + args: { field: key, ...otherArgs }
38311 + },
38312 + ...otherBindings
38313 + },
38314 + ...otherMetadata
38315 + },
38316 + ...otherAttributes
38317 + };
38318 + },
38319 + isEligible(attributes) {
38320 + return attributes?.metadata?.bindings?.datetime?.source === "core/post-data" && !!attributes?.metadata?.bindings?.datetime?.args?.key;
38321 + }
38322 + };
38323 + const post_date_deprecated_v2 = {
38324 + attributes: {
38325 + textAlign: {
38326 + type: "string"
38327 + },
38328 + format: {
38329 + type: "string"
38330 + },
38331 + isLink: {
38332 + type: "boolean",
38333 + default: false,
38334 + role: "content"
38335 + },
38336 + displayType: {
38337 + type: "string",
38338 + default: "date"
38339 + }
38340 + },
38341 + supports: {
38342 + html: false,
38343 + color: {
38344 + gradients: true,
38345 + link: true,
38346 + __experimentalDefaultControls: {
38347 + background: true,
38348 + text: true,
38349 + link: true
38350 + }
38351 + },
38352 + spacing: {
38353 + margin: true,
38354 + padding: true
38355 + },
38356 + typography: {
38357 + fontSize: true,
38358 + lineHeight: true,
38359 + __experimentalFontFamily: true,
38360 + __experimentalFontWeight: true,
38361 + __experimentalFontStyle: true,
38362 + __experimentalTextTransform: true,
38363 + __experimentalTextDecoration: true,
38364 + __experimentalLetterSpacing: true,
38365 + __experimentalDefaultControls: {
38366 + fontSize: true
38367 + }
38368 + },
38369 + interactivity: {
38370 + clientNavigation: true
38371 + },
38372 + __experimentalBorder: {
38373 + radius: true,
38374 + color: true,
38375 + width: true,
38376 + style: true,
38377 + __experimentalDefaultControls: {
38378 + radius: true,
38379 + color: true,
38380 + width: true,
38381 + style: true
38382 + }
38383 + }
38384 + },
38385 + save() {
38386 + return null;
38387 + },
38388 + migrate({ className, displayType, metadata, ...otherAttributes }) {
38389 + if (displayType === "date" || displayType === "modified") {
38390 + if (displayType === "modified") {
38391 + className = dist_clsx(
38392 + className,
38393 + "wp-block-post-date__modified-date"
38394 + );
38395 + }
38396 + return {
38397 + ...otherAttributes,
38398 + className,
38399 + metadata: {
38400 + ...metadata,
38401 + bindings: {
38402 + datetime: {
38403 + source: "core/post-data",
38404 + args: { field: displayType }
38405 + }
38406 + }
38407 + }
38408 + };
38409 + }
38410 + },
38411 + isEligible(attributes) {
38412 + return !attributes.datetime && !attributes?.metadata?.bindings?.datetime;
38413 + }
38414 + };
38415 + const post_date_deprecated_v1 = {
38416 + attributes: {
38417 + textAlign: {
38418 + type: "string"
38419 + },
38420 + format: {
38421 + type: "string"
38422 + },
38423 + isLink: {
38424 + type: "boolean",
38425 + default: false
38426 + }
38427 + },
38428 + supports: {
38429 + html: false,
38430 + color: {
38431 + gradients: true,
38432 + link: true
38433 + },
38434 + typography: {
38435 + fontSize: true,
38436 + lineHeight: true,
38437 + __experimentalFontFamily: true,
38438 + __experimentalFontWeight: true,
38439 + __experimentalFontStyle: true,
38440 + __experimentalTextTransform: true,
38441 + __experimentalLetterSpacing: true
38442 + }
38443 + },
38444 + save() {
38445 + return null;
38446 + },
38447 + migrate: migrate_font_family_default,
38448 + isEligible({ style }) {
38449 + return style?.typography?.fontFamily;
38450 + }
38451 + };
38452 + var post_date_deprecated_deprecated_default = [post_date_deprecated_v3, post_date_deprecated_v2, post_date_deprecated_v1];
38453 +
38454 +
38455 + ;// ./node_modules/@wordpress/block-library/build-module/post-date/variations.js
38456 +
38457 + const post_date_variations_variations = [
38458 + {
38459 + name: "post-date",
38460 + title: (0,external_wp_i18n_namespaceObject.__)("Post Date"),
38461 + description: (0,external_wp_i18n_namespaceObject.__)("Display a post's publish date."),
38462 + attributes: {
38463 + metadata: {
38464 + bindings: {
38465 + datetime: {
38466 + source: "core/post-data",
38467 + args: { field: "date" }
38468 + }
38469 + }
38470 + }
38471 + },
38472 + scope: ["inserter", "transform"],
38473 + isActive: (blockAttributes) => blockAttributes?.metadata?.bindings?.datetime?.source === "core/post-data" && blockAttributes?.metadata?.bindings?.datetime?.args?.field === "date"
38474 + },
38475 + {
38476 + name: "post-date-modified",
38477 + title: (0,external_wp_i18n_namespaceObject.__)("Modified Date"),
38478 + description: (0,external_wp_i18n_namespaceObject.__)("Display a post's last updated date."),
38479 + attributes: {
38480 + metadata: {
38481 + bindings: {
38482 + datetime: {
38483 + source: "core/post-data",
38484 + args: { field: "modified" }
38485 + }
38486 + }
38487 + },
38488 + className: "wp-block-post-date__modified-date"
38489 + },
38490 + scope: ["inserter", "transform"],
38491 + isActive: (blockAttributes) => blockAttributes?.metadata?.bindings?.datetime?.source === "core/post-data" && blockAttributes?.metadata?.bindings?.datetime?.args?.field === "modified"
38492 + }
38493 + ];
38494 + var post_date_variations_variations_default = post_date_variations_variations;
38495 +
38496 +
38497 + ;// ./node_modules/@wordpress/block-library/build-module/post-date/index.js
38498 +
38499 +
38500 +
38501 +
38502 +
38503 +
38504 + const { name: post_date_name } = post_date_block_namespaceObject;
38505 + const post_date_settings = {
38506 + icon: post_date_default,
38507 + edit: PostDateEdit,
38508 + deprecated: post_date_deprecated_deprecated_default,
38509 + variations: post_date_variations_variations_default
38510 + };
38511 + const post_date_init = () => initBlock({ name: post_date_name, metadata: post_date_block_namespaceObject, settings: post_date_settings });
38512 +
38513 +
38514 + ;// ./node_modules/@wordpress/icons/build-module/library/post-excerpt.js
38515 +
38516 +
38517 + var post_excerpt_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M8.001 3.984V9.47c0 1.518-.98 2.5-2.499 2.5h-.5v-1.5h.5c.69 0 1-.31 1-1V6.984H4v-3h4.001ZM4 20h9v-1.5H4V20Zm16-4H4v-1.5h16V16ZM13.001 3.984V9.47c0 1.518-.98 2.5-2.499 2.5h-.5v-1.5h.5c.69 0 1-.31 1-1V6.984H9v-3h4.001Z" }) });
38518 +
38519 +
38520 + ;// ./node_modules/@wordpress/block-library/build-module/post-excerpt/block.json
38521 + const post_excerpt_block_namespaceObject = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/post-excerpt","title":"Excerpt","category":"theme","description":"Display the excerpt.","textdomain":"default","attributes":{"textAlign":{"type":"string"},"moreText":{"type":"string","role":"content"},"showMoreOnNewLine":{"type":"boolean","default":true},"excerptLength":{"type":"number","default":55}},"usesContext":["postId","postType","queryId"],"example":{"viewportWidth":350},"supports":{"html":false,"color":{"gradients":true,"link":true,"__experimentalDefaultControls":{"background":true,"text":true,"link":true}},"spacing":{"margin":true,"padding":true},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"interactivity":{"clientNavigation":true},"__experimentalBorder":{"radius":true,"color":true,"width":true,"style":true,"__experimentalDefaultControls":{"radius":true,"color":true,"width":true,"style":true}}},"editorStyle":"wp-block-post-excerpt-editor","style":"wp-block-post-excerpt"}');
38522 + ;// ./node_modules/@wordpress/block-library/build-module/post-excerpt/edit.js
38523 +
38524 +
38525 +
38526 +
38527 +
38528 +
38529 +
38530 +
38531 +
38532 + const ELLIPSIS = "\u2026";
38533 + function PostExcerptEditor({
38534 + attributes: { textAlign, moreText, showMoreOnNewLine, excerptLength },
38535 + setAttributes,
38536 + isSelected,
38537 + context: { postId, postType, queryId }
38538 + }) {
38539 + const blockEditingMode = (0,external_wp_blockEditor_namespaceObject.useBlockEditingMode)();
38540 + const showControls = blockEditingMode === "default";
38541 + const isDescendentOfQueryLoop = Number.isFinite(queryId);
38542 + const userCanEdit = useCanEditEntity("postType", postType, postId);
38543 + const [
38544 + rawExcerpt,
38545 + setExcerpt,
38546 + { rendered: renderedExcerpt, protected: isProtected } = {}
38547 + ] = (0,external_wp_coreData_namespaceObject.useEntityProp)("postType", postType, "excerpt", postId);
38548 + const dropdownMenuProps = useToolsPanelDropdownMenuProps();
38549 + const postTypeSupportsExcerpts = (0,external_wp_data_namespaceObject.useSelect)(
38550 + (select) => {
38551 + if (postType === "page") {
38552 + return true;
38553 + }
38554 + return !!select(external_wp_coreData_namespaceObject.store).getPostType(postType)?.supports?.excerpt;
38555 + },
38556 + [postType]
38557 + );
38558 + const isEditable = userCanEdit && !isDescendentOfQueryLoop && postTypeSupportsExcerpts;
38559 + const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)({
38560 + className: dist_clsx({
38561 + [`has-text-align-${textAlign}`]: textAlign
38562 + })
38563 + });
38564 + const wordCountType = (0,external_wp_i18n_namespaceObject._x)("words", "Word count type. Do not translate!");
38565 + const strippedRenderedExcerpt = (0,external_wp_element_namespaceObject.useMemo)(() => {
38566 + if (!renderedExcerpt) {
38567 + return "";
38568 + }
38569 + const document = new window.DOMParser().parseFromString(
38570 + renderedExcerpt,
38571 + "text/html"
38572 + );
38573 + return document.body.textContent || document.body.innerText || "";
38574 + }, [renderedExcerpt]);
38575 + if (!postType || !postId) {
38576 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
38577 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockControls, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
38578 + external_wp_blockEditor_namespaceObject.AlignmentToolbar,
38579 + {
38580 + value: textAlign,
38581 + onChange: (newAlign) => setAttributes({ textAlign: newAlign })
38582 + }
38583 + ) }),
38584 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { ...blockProps, children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("p", { children: (0,external_wp_i18n_namespaceObject.__)("This block will display the excerpt.") }) })
38585 + ] });
38586 + }
38587 + if (isProtected && !userCanEdit) {
38588 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { ...blockProps, children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.Warning, { children: (0,external_wp_i18n_namespaceObject.__)(
38589 + "The content is currently protected and does not have the available excerpt."
38590 + ) }) });
38591 + }
38592 + const readMoreLink = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
38593 + external_wp_blockEditor_namespaceObject.RichText,
38594 + {
38595 + identifier: "moreText",
38596 + className: "wp-block-post-excerpt__more-link",
38597 + tagName: "a",
38598 + "aria-label": (0,external_wp_i18n_namespaceObject.__)("\u201CRead more\u201D link text"),
38599 + placeholder: (0,external_wp_i18n_namespaceObject.__)('Add "read more" link text'),
38600 + value: moreText,
38601 + onChange: (newMoreText) => setAttributes({ moreText: newMoreText }),
38602 + withoutInteractiveFormatting: true
38603 + }
38604 + );
38605 + const excerptClassName = dist_clsx("wp-block-post-excerpt__excerpt", {
38606 + "is-inline": !showMoreOnNewLine
38607 + });
38608 + const rawOrRenderedExcerpt = (rawExcerpt || strippedRenderedExcerpt).trim();
38609 + let trimmedExcerpt = "";
38610 + if (wordCountType === "words") {
38611 + trimmedExcerpt = rawOrRenderedExcerpt.split(" ", excerptLength).join(" ");
38612 + } else if (wordCountType === "characters_excluding_spaces") {
38613 + const excerptWithSpaces = rawOrRenderedExcerpt.split("", excerptLength).join("");
38614 + const numberOfSpaces = excerptWithSpaces.length - excerptWithSpaces.replaceAll(" ", "").length;
38615 + trimmedExcerpt = rawOrRenderedExcerpt.split("", excerptLength + numberOfSpaces).join("");
38616 + } else if (wordCountType === "characters_including_spaces") {
38617 + trimmedExcerpt = rawOrRenderedExcerpt.split("", excerptLength).join("");
38618 + }
38619 + const isTrimmed = trimmedExcerpt !== rawOrRenderedExcerpt;
38620 + const excerptContent = isEditable ? /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
38621 + external_wp_blockEditor_namespaceObject.RichText,
38622 + {
38623 + className: excerptClassName,
38624 + "aria-label": (0,external_wp_i18n_namespaceObject.__)("Excerpt text"),
38625 + value: isSelected ? rawOrRenderedExcerpt : (!isTrimmed ? rawOrRenderedExcerpt : trimmedExcerpt + ELLIPSIS) || (0,external_wp_i18n_namespaceObject.__)("No excerpt found"),
38626 + onChange: setExcerpt,
38627 + tagName: "p"
38628 + }
38629 + ) : /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("p", { className: excerptClassName, children: !isTrimmed ? rawOrRenderedExcerpt || (0,external_wp_i18n_namespaceObject.__)("No excerpt found") : trimmedExcerpt + ELLIPSIS });
38630 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
38631 + showControls && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockControls, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
38632 + external_wp_blockEditor_namespaceObject.AlignmentToolbar,
38633 + {
38634 + value: textAlign,
38635 + onChange: (newAlign) => setAttributes({ textAlign: newAlign })
38636 + }
38637 + ) }),
38638 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(
38639 + external_wp_components_namespaceObject.__experimentalToolsPanel,
38640 + {
38641 + label: (0,external_wp_i18n_namespaceObject.__)("Settings"),
38642 + resetAll: () => {
38643 + setAttributes({
38644 + showMoreOnNewLine: true,
38645 + excerptLength: 55
38646 + });
38647 + },
38648 + dropdownMenuProps,
38649 + children: [
38650 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
38651 + external_wp_components_namespaceObject.__experimentalToolsPanelItem,
38652 + {
38653 + hasValue: () => showMoreOnNewLine !== true,
38654 + label: (0,external_wp_i18n_namespaceObject.__)("Show link on new line"),
38655 + onDeselect: () => setAttributes({ showMoreOnNewLine: true }),
38656 + isShownByDefault: true,
38657 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
38658 + external_wp_components_namespaceObject.ToggleControl,
38659 + {
38660 + __nextHasNoMarginBottom: true,
38661 + label: (0,external_wp_i18n_namespaceObject.__)("Show link on new line"),
38662 + checked: showMoreOnNewLine,
38663 + onChange: (newShowMoreOnNewLine) => setAttributes({
38664 + showMoreOnNewLine: newShowMoreOnNewLine
38665 + })
38666 + }
38667 + )
38668 + }
38669 + ),
38670 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
38671 + external_wp_components_namespaceObject.__experimentalToolsPanelItem,
38672 + {
38673 + hasValue: () => excerptLength !== 55,
38674 + label: (0,external_wp_i18n_namespaceObject.__)("Max number of words"),
38675 + onDeselect: () => setAttributes({ excerptLength: 55 }),
38676 + isShownByDefault: true,
38677 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
38678 + external_wp_components_namespaceObject.RangeControl,
38679 + {
38680 + __next40pxDefaultSize: true,
38681 + __nextHasNoMarginBottom: true,
38682 + label: (0,external_wp_i18n_namespaceObject.__)("Max number of words"),
38683 + value: excerptLength,
38684 + onChange: (value) => {
38685 + setAttributes({ excerptLength: value });
38686 + },
38687 + min: "10",
38688 + max: "100"
38689 + }
38690 + )
38691 + }
38692 + )
38693 + ]
38694 + }
38695 + ) }),
38696 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", { ...blockProps, children: [
38697 + excerptContent,
38698 + !showMoreOnNewLine && " ",
38699 + showMoreOnNewLine ? /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("p", { className: "wp-block-post-excerpt__more-text", children: readMoreLink }) : readMoreLink
38700 + ] })
38701 + ] });
38702 + }
38703 +
38704 +
38705 + ;// ./node_modules/@wordpress/block-library/build-module/post-excerpt/transforms.js
38706 +
38707 + const post_excerpt_transforms_transforms = {
38708 + from: [
38709 + {
38710 + type: "block",
38711 + blocks: ["core/post-content"],
38712 + transform: () => (0,external_wp_blocks_namespaceObject.createBlock)("core/post-excerpt")
38713 + }
38714 + ],
38715 + to: [
38716 + {
38717 + type: "block",
38718 + blocks: ["core/post-content"],
38719 + transform: () => (0,external_wp_blocks_namespaceObject.createBlock)("core/post-content")
38720 + }
38721 + ]
38722 + };
38723 + var post_excerpt_transforms_transforms_default = post_excerpt_transforms_transforms;
38724 +
38725 +
38726 + ;// ./node_modules/@wordpress/block-library/build-module/post-excerpt/index.js
38727 +
38728 +
38729 +
38730 +
38731 +
38732 + const { name: post_excerpt_name } = post_excerpt_block_namespaceObject;
38733 + const post_excerpt_settings = {
38734 + icon: post_excerpt_default,
38735 + transforms: post_excerpt_transforms_transforms_default,
38736 + edit: PostExcerptEditor
38737 + };
38738 + const post_excerpt_init = () => initBlock({ name: post_excerpt_name, metadata: post_excerpt_block_namespaceObject, settings: post_excerpt_settings });
38739 +
38740 +
38741 + ;// ./node_modules/@wordpress/icons/build-module/library/post-featured-image.js
38742 +
38743 +
38744 + var post_featured_image_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M19 3H5c-.6 0-1 .4-1 1v7c0 .5.4 1 1 1h14c.5 0 1-.4 1-1V4c0-.6-.4-1-1-1zM5.5 10.5v-.4l1.8-1.3 1.3.8c.3.2.7.2.9-.1L11 8.1l2.4 2.4H5.5zm13 0h-2.9l-4-4c-.3-.3-.8-.3-1.1 0L8.9 8l-1.2-.8c-.3-.2-.6-.2-.9 0l-1.3 1V4.5h13v6zM4 20h9v-1.5H4V20zm0-4h16v-1.5H4V16z" }) });
38745 +
38746 +
38747 + ;// ./node_modules/@wordpress/block-library/build-module/post-featured-image/block.json
38748 + const post_featured_image_block_namespaceObject = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/post-featured-image","title":"Featured Image","category":"theme","description":"Display a post\'s featured image.","textdomain":"default","attributes":{"isLink":{"type":"boolean","default":false,"role":"content"},"aspectRatio":{"type":"string"},"width":{"type":"string"},"height":{"type":"string"},"scale":{"type":"string","default":"cover"},"sizeSlug":{"type":"string"},"rel":{"type":"string","attribute":"rel","default":"","role":"content"},"linkTarget":{"type":"string","default":"_self","role":"content"},"overlayColor":{"type":"string"},"customOverlayColor":{"type":"string"},"dimRatio":{"type":"number","default":0},"gradient":{"type":"string"},"customGradient":{"type":"string"},"useFirstImageFromPost":{"type":"boolean","default":false}},"usesContext":["postId","postType","queryId"],"example":{"viewportWidth":350},"supports":{"align":["left","right","center","wide","full"],"color":{"text":false,"background":false},"__experimentalBorder":{"color":true,"radius":true,"width":true,"__experimentalSkipSerialization":true,"__experimentalDefaultControls":{"color":true,"radius":true,"width":true}},"filter":{"duotone":true},"shadow":{"__experimentalSkipSerialization":true},"html":false,"spacing":{"margin":true,"padding":true},"interactivity":{"clientNavigation":true}},"selectors":{"border":".wp-block-post-featured-image img, .wp-block-post-featured-image .block-editor-media-placeholder, .wp-block-post-featured-image .wp-block-post-featured-image__overlay","shadow":".wp-block-post-featured-image img, .wp-block-post-featured-image .components-placeholder","filter":{"duotone":".wp-block-post-featured-image img, .wp-block-post-featured-image .wp-block-post-featured-image__placeholder, .wp-block-post-featured-image .components-placeholder__illustration, .wp-block-post-featured-image .components-placeholder::before"}},"editorStyle":"wp-block-post-featured-image-editor","style":"wp-block-post-featured-image"}');
38749 + ;// ./node_modules/@wordpress/block-library/build-module/post-featured-image/dimension-controls.js
38750 +
38751 +
38752 +
38753 +
38754 + const SCALE_OPTIONS = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
38755 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
38756 + external_wp_components_namespaceObject.__experimentalToggleGroupControlOption,
38757 + {
38758 + value: "cover",
38759 + label: (0,external_wp_i18n_namespaceObject._x)("Cover", "Scale option for Image dimension control")
38760 + }
38761 + ),
38762 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
38763 + external_wp_components_namespaceObject.__experimentalToggleGroupControlOption,
38764 + {
38765 + value: "contain",
38766 + label: (0,external_wp_i18n_namespaceObject._x)(
38767 + "Contain",
38768 + "Scale option for Image dimension control"
38769 + )
38770 + }
38771 + ),
38772 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
38773 + external_wp_components_namespaceObject.__experimentalToggleGroupControlOption,
38774 + {
38775 + value: "fill",
38776 + label: (0,external_wp_i18n_namespaceObject._x)("Fill", "Scale option for Image dimension control")
38777 + }
38778 + )
38779 + ] });
38780 + const DEFAULT_SCALE = "cover";
38781 + const scaleHelp = {
38782 + cover: (0,external_wp_i18n_namespaceObject.__)(
38783 + "Image is scaled and cropped to fill the entire space without being distorted."
38784 + ),
38785 + contain: (0,external_wp_i18n_namespaceObject.__)(
38786 + "Image is scaled to fill the space without clipping nor distorting."
38787 + ),
38788 + fill: (0,external_wp_i18n_namespaceObject.__)(
38789 + "Image will be stretched and distorted to completely fill the space."
38790 + )
38791 + };
38792 + const DimensionControls = ({
38793 + clientId,
38794 + attributes: { aspectRatio, width, height, scale },
38795 + setAttributes
38796 + }) => {
38797 + const [availableUnits, defaultRatios, themeRatios, showDefaultRatios] = (0,external_wp_blockEditor_namespaceObject.useSettings)(
38798 + "spacing.units",
38799 + "dimensions.aspectRatios.default",
38800 + "dimensions.aspectRatios.theme",
38801 + "dimensions.defaultAspectRatios"
38802 + );
38803 + const units = (0,external_wp_components_namespaceObject.__experimentalUseCustomUnits)({
38804 + availableUnits: availableUnits || ["px", "%", "vw", "em", "rem"]
38805 + });
38806 + const onDimensionChange = (dimension, nextValue) => {
38807 + const parsedValue = parseFloat(nextValue);
38808 + if (isNaN(parsedValue) && nextValue) {
38809 + return;
38810 + }
38811 + setAttributes({
38812 + [dimension]: parsedValue < 0 ? "0" : nextValue
38813 + });
38814 + };
38815 + const scaleLabel = (0,external_wp_i18n_namespaceObject._x)("Scale", "Image scaling options");
38816 + const showScaleControl = height || aspectRatio && aspectRatio !== "auto";
38817 + const themeOptions = themeRatios?.map(({ name, ratio }) => ({
38818 + label: name,
38819 + value: ratio
38820 + }));
38821 + const defaultOptions = defaultRatios?.map(({ name, ratio }) => ({
38822 + label: name,
38823 + value: ratio
38824 + }));
38825 + const aspectRatioOptions = [
38826 + {
38827 + label: (0,external_wp_i18n_namespaceObject._x)(
38828 + "Original",
38829 + "Aspect ratio option for dimensions control"
38830 + ),
38831 + value: "auto"
38832 + },
38833 + ...showDefaultRatios ? defaultOptions : [],
38834 + ...themeOptions ? themeOptions : []
38835 + ];
38836 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
38837 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
38838 + external_wp_components_namespaceObject.__experimentalToolsPanelItem,
38839 + {
38840 + hasValue: () => !!aspectRatio,
38841 + label: (0,external_wp_i18n_namespaceObject.__)("Aspect ratio"),
38842 + onDeselect: () => setAttributes({ aspectRatio: void 0 }),
38843 + resetAllFilter: () => ({
38844 + aspectRatio: void 0
38845 + }),
38846 + isShownByDefault: true,
38847 + panelId: clientId,
38848 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
38849 + external_wp_components_namespaceObject.SelectControl,
38850 + {
38851 + __next40pxDefaultSize: true,
38852 + __nextHasNoMarginBottom: true,
38853 + label: (0,external_wp_i18n_namespaceObject.__)("Aspect ratio"),
38854 + value: aspectRatio,
38855 + options: aspectRatioOptions,
38856 + onChange: (nextAspectRatio) => setAttributes({ aspectRatio: nextAspectRatio })
38857 + }
38858 + )
38859 + }
38860 + ),
38861 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
38862 + external_wp_components_namespaceObject.__experimentalToolsPanelItem,
38863 + {
38864 + className: "single-column",
38865 + hasValue: () => !!height,
38866 + label: (0,external_wp_i18n_namespaceObject.__)("Height"),
38867 + onDeselect: () => setAttributes({ height: void 0 }),
38868 + resetAllFilter: () => ({
38869 + height: void 0
38870 + }),
38871 + isShownByDefault: true,
38872 + panelId: clientId,
38873 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
38874 + external_wp_components_namespaceObject.__experimentalUnitControl,
38875 + {
38876 + __next40pxDefaultSize: true,
38877 + label: (0,external_wp_i18n_namespaceObject.__)("Height"),
38878 + labelPosition: "top",
38879 + value: height || "",
38880 + min: 0,
38881 + onChange: (nextHeight) => onDimensionChange("height", nextHeight),
38882 + units
38883 + }
38884 + )
38885 + }
38886 + ),
38887 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
38888 + external_wp_components_namespaceObject.__experimentalToolsPanelItem,
38889 + {
38890 + className: "single-column",
38891 + hasValue: () => !!width,
38892 + label: (0,external_wp_i18n_namespaceObject.__)("Width"),
38893 + onDeselect: () => setAttributes({ width: void 0 }),
38894 + resetAllFilter: () => ({
38895 + width: void 0
38896 + }),
38897 + isShownByDefault: true,
38898 + panelId: clientId,
38899 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
38900 + external_wp_components_namespaceObject.__experimentalUnitControl,
38901 + {
38902 + __next40pxDefaultSize: true,
38903 + label: (0,external_wp_i18n_namespaceObject.__)("Width"),
38904 + labelPosition: "top",
38905 + value: width || "",
38906 + min: 0,
38907 + onChange: (nextWidth) => onDimensionChange("width", nextWidth),
38908 + units
38909 + }
38910 + )
38911 + }
38912 + ),
38913 + showScaleControl && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
38914 + external_wp_components_namespaceObject.__experimentalToolsPanelItem,
38915 + {
38916 + hasValue: () => !!scale && scale !== DEFAULT_SCALE,
38917 + label: scaleLabel,
38918 + onDeselect: () => setAttributes({
38919 + scale: DEFAULT_SCALE
38920 + }),
38921 + resetAllFilter: () => ({
38922 + scale: DEFAULT_SCALE
38923 + }),
38924 + isShownByDefault: true,
38925 + panelId: clientId,
38926 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
38927 + external_wp_components_namespaceObject.__experimentalToggleGroupControl,
38928 + {
38929 + __next40pxDefaultSize: true,
38930 + __nextHasNoMarginBottom: true,
38931 + label: scaleLabel,
38932 + value: scale,
38933 + help: scaleHelp[scale],
38934 + onChange: (value) => setAttributes({
38935 + scale: value
38936 + }),
38937 + isBlock: true,
38938 + children: SCALE_OPTIONS
38939 + }
38940 + )
38941 + }
38942 + )
38943 + ] });
38944 + };
38945 + var dimension_controls_default = DimensionControls;
38946 +
38947 +
38948 + ;// ./node_modules/@wordpress/block-library/build-module/post-featured-image/overlay-controls.js
38949 +
38950 +
38951 +
38952 +
38953 +
38954 + const Overlay = ({
38955 + clientId,
38956 + attributes,
38957 + setAttributes,
38958 + overlayColor,
38959 + setOverlayColor
38960 + }) => {
38961 + const { dimRatio } = attributes;
38962 + const { gradientValue, setGradient } = (0,external_wp_blockEditor_namespaceObject.__experimentalUseGradient)();
38963 + const colorGradientSettings = (0,external_wp_blockEditor_namespaceObject.__experimentalUseMultipleOriginColorsAndGradients)();
38964 + if (!colorGradientSettings.hasColorsOrGradients) {
38965 + return null;
38966 + }
38967 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
38968 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
38969 + external_wp_blockEditor_namespaceObject.__experimentalColorGradientSettingsDropdown,
38970 + {
38971 + __experimentalIsRenderedInSidebar: true,
38972 + settings: [
38973 + {
38974 + colorValue: overlayColor.color,
38975 + gradientValue,
38976 + label: (0,external_wp_i18n_namespaceObject.__)("Overlay"),
38977 + onColorChange: setOverlayColor,
38978 + onGradientChange: setGradient,
38979 + isShownByDefault: true,
38980 + resetAllFilter: () => ({
38981 + overlayColor: void 0,
38982 + customOverlayColor: void 0,
38983 + gradient: void 0,
38984 + customGradient: void 0
38985 + }),
38986 + clearable: true
38987 + }
38988 + ],
38989 + panelId: clientId,
38990 + ...colorGradientSettings
38991 + }
38992 + ),
38993 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
38994 + external_wp_components_namespaceObject.__experimentalToolsPanelItem,
38995 + {
38996 + hasValue: () => dimRatio !== void 0,
38997 + label: (0,external_wp_i18n_namespaceObject.__)("Overlay opacity"),
38998 + onDeselect: () => setAttributes({ dimRatio: 0 }),
38999 + resetAllFilter: () => ({
39000 + dimRatio: 0
39001 + }),
39002 + isShownByDefault: true,
39003 + panelId: clientId,
39004 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
39005 + external_wp_components_namespaceObject.RangeControl,
39006 + {
39007 + __nextHasNoMarginBottom: true,
39008 + label: (0,external_wp_i18n_namespaceObject.__)("Overlay opacity"),
39009 + value: dimRatio,
39010 + onChange: (newDimRatio) => setAttributes({
39011 + dimRatio: newDimRatio
39012 + }),
39013 + min: 0,
39014 + max: 100,
39015 + step: 10,
39016 + required: true,
39017 + __next40pxDefaultSize: true
39018 + }
39019 + )
39020 + }
39021 + )
39022 + ] });
39023 + };
39024 + var overlay_controls_default = (0,external_wp_compose_namespaceObject.compose)([
39025 + (0,external_wp_blockEditor_namespaceObject.withColors)({ overlayColor: "background-color" })
39026 + ])(Overlay);
39027 +
39028 +
39029 + ;// ./node_modules/@wordpress/block-library/build-module/post-featured-image/utils.js
39030 + function utils_dimRatioToClass(ratio) {
39031 + return ratio === void 0 ? null : "has-background-dim-" + 10 * Math.round(ratio / 10);
39032 + }
39033 +
39034 +
39035 + ;// ./node_modules/@wordpress/block-library/build-module/post-featured-image/overlay.js
39036 +
39037 +
39038 +
39039 +
39040 +
39041 + const overlay_Overlay = ({ attributes, overlayColor }) => {
39042 + const { dimRatio } = attributes;
39043 + const { gradientClass, gradientValue } = (0,external_wp_blockEditor_namespaceObject.__experimentalUseGradient)();
39044 + const colorGradientSettings = (0,external_wp_blockEditor_namespaceObject.__experimentalUseMultipleOriginColorsAndGradients)();
39045 + const borderProps = (0,external_wp_blockEditor_namespaceObject.__experimentalUseBorderProps)(attributes);
39046 + const overlayStyles = {
39047 + backgroundColor: overlayColor.color,
39048 + backgroundImage: gradientValue,
39049 + ...borderProps.style
39050 + };
39051 + if (!colorGradientSettings.hasColorsOrGradients || !dimRatio) {
39052 + return null;
39053 + }
39054 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
39055 + "span",
39056 + {
39057 + "aria-hidden": "true",
39058 + className: dist_clsx(
39059 + "wp-block-post-featured-image__overlay",
39060 + utils_dimRatioToClass(dimRatio),
39061 + {
39062 + [overlayColor.class]: overlayColor.class,
39063 + "has-background-dim": dimRatio !== void 0,
39064 + "has-background-gradient": gradientValue,
39065 + [gradientClass]: gradientClass
39066 + },
39067 + borderProps.className
39068 + ),
39069 + style: overlayStyles
39070 + }
39071 + );
39072 + };
39073 + var overlay_default = (0,external_wp_compose_namespaceObject.compose)([
39074 + (0,external_wp_blockEditor_namespaceObject.withColors)({ overlayColor: "background-color" })
39075 + ])(overlay_Overlay);
39076 +
39077 +
39078 + ;// ./node_modules/@wordpress/block-library/build-module/post-featured-image/edit.js
39079 +
39080 +
39081 +
39082 +
39083 +
39084 +
39085 +
39086 +
39087 +
39088 +
39089 +
39090 +
39091 +
39092 +
39093 +
39094 +
39095 + const post_featured_image_edit_ALLOWED_MEDIA_TYPES = ["image"];
39096 + const { ResolutionTool: post_featured_image_edit_ResolutionTool } = unlock(external_wp_blockEditor_namespaceObject.privateApis);
39097 + const edit_DEFAULT_MEDIA_SIZE_SLUG = "full";
39098 + function FeaturedImageResolutionTool({ image, value, onChange }) {
39099 + const { imageSizes } = (0,external_wp_data_namespaceObject.useSelect)((select) => {
39100 + const { getSettings } = select(external_wp_blockEditor_namespaceObject.store);
39101 + return {
39102 + imageSizes: getSettings().imageSizes
39103 + };
39104 + }, []);
39105 + if (!imageSizes?.length) {
39106 + return null;
39107 + }
39108 + const imageSizeOptions = imageSizes.filter(
39109 + ({ slug }) => image?.media_details?.sizes?.[slug]?.source_url
39110 + ).map(({ name, slug }) => ({ value: slug, label: name }));
39111 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
39112 + post_featured_image_edit_ResolutionTool,
39113 + {
39114 + value,
39115 + defaultValue: edit_DEFAULT_MEDIA_SIZE_SLUG,
39116 + options: imageSizeOptions,
39117 + onChange
39118 + }
39119 + );
39120 + }
39121 + function PostFeaturedImageEdit({
39122 + clientId,
39123 + attributes,
39124 + setAttributes,
39125 + context: { postId, postType: postTypeSlug, queryId }
39126 + }) {
39127 + const isDescendentOfQueryLoop = Number.isFinite(queryId);
39128 + const {
39129 + isLink,
39130 + aspectRatio,
39131 + height,
39132 + width,
39133 + scale,
39134 + sizeSlug,
39135 + rel,
39136 + linkTarget,
39137 + useFirstImageFromPost
39138 + } = attributes;
39139 + const [temporaryURL, setTemporaryURL] = (0,external_wp_element_namespaceObject.useState)();
39140 + const [storedFeaturedImage, setFeaturedImage] = (0,external_wp_coreData_namespaceObject.useEntityProp)(
39141 + "postType",
39142 + postTypeSlug,
39143 + "featured_media",
39144 + postId
39145 + );
39146 + const [postContent] = (0,external_wp_coreData_namespaceObject.useEntityProp)(
39147 + "postType",
39148 + postTypeSlug,
39149 + "content",
39150 + postId
39151 + );
39152 + const featuredImage = (0,external_wp_element_namespaceObject.useMemo)(() => {
39153 + if (storedFeaturedImage) {
39154 + return storedFeaturedImage;
39155 + }
39156 + if (!useFirstImageFromPost) {
39157 + return;
39158 + }
39159 + const imageOpener = /<!--\s+wp:(?:core\/)?image\s+(?<attrs>{(?:(?:[^}]+|}+(?=})|(?!}\s+\/?-->).)*)?}\s+)?-->/.exec(
39160 + postContent
39161 + );
39162 + const imageId = imageOpener?.groups?.attrs && JSON.parse(imageOpener.groups.attrs)?.id;
39163 + return imageId;
39164 + }, [storedFeaturedImage, useFirstImageFromPost, postContent]);
39165 + const { media, postType, postPermalink } = (0,external_wp_data_namespaceObject.useSelect)(
39166 + (select) => {
39167 + const { getEntityRecord, getPostType, getEditedEntityRecord } = select(external_wp_coreData_namespaceObject.store);
39168 + return {
39169 + media: featuredImage && getEntityRecord("postType", "attachment", featuredImage, {
39170 + context: "view"
39171 + }),
39172 + postType: postTypeSlug && getPostType(postTypeSlug),
39173 + postPermalink: getEditedEntityRecord(
39174 + "postType",
39175 + postTypeSlug,
39176 + postId
39177 + )?.link
39178 + };
39179 + },
39180 + [featuredImage, postTypeSlug, postId]
39181 + );
39182 + const mediaUrl = media?.media_details?.sizes?.[sizeSlug]?.source_url || media?.source_url;
39183 + const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)({
39184 + style: { width, height, aspectRatio },
39185 + className: dist_clsx({
39186 + "is-transient": temporaryURL
39187 + })
39188 + });
39189 + const borderProps = (0,external_wp_blockEditor_namespaceObject.__experimentalUseBorderProps)(attributes);
39190 + const shadowProps = (0,external_wp_blockEditor_namespaceObject.__experimentalGetShadowClassesAndStyles)(attributes);
39191 + const blockEditingMode = (0,external_wp_blockEditor_namespaceObject.useBlockEditingMode)();
39192 + const placeholder = (content) => {
39193 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
39194 + external_wp_components_namespaceObject.Placeholder,
39195 + {
39196 + className: dist_clsx(
39197 + "block-editor-media-placeholder",
39198 + borderProps.className
39199 + ),
39200 + withIllustration: true,
39201 + style: {
39202 + height: !!aspectRatio && "100%",
39203 + width: !!aspectRatio && "100%",
39204 + ...borderProps.style,
39205 + ...shadowProps.style
39206 + },
39207 + children: content
39208 + }
39209 + );
39210 + };
39211 + const onSelectImage = (value) => {
39212 + if (value?.id) {
39213 + setFeaturedImage(value.id);
39214 + }
39215 + if (value?.url && (0,external_wp_blob_namespaceObject.isBlobURL)(value.url)) {
39216 + setTemporaryURL(value.url);
39217 + }
39218 + };
39219 + const onResetImage = () => {
39220 + setAttributes({
39221 + isLink: false,
39222 + linkTarget: "_self",
39223 + rel: "",
39224 + sizeSlug: void 0
39225 + });
39226 + setFeaturedImage(0);
39227 + };
39228 + (0,external_wp_element_namespaceObject.useEffect)(() => {
39229 + if (mediaUrl && temporaryURL) {
39230 + setTemporaryURL();
39231 + }
39232 + }, [mediaUrl, temporaryURL]);
39233 + const { createErrorNotice } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_notices_namespaceObject.store);
39234 + const onUploadError = (message) => {
39235 + createErrorNotice(message, { type: "snackbar" });
39236 + setTemporaryURL();
39237 + };
39238 + const dropdownMenuProps = useToolsPanelDropdownMenuProps();
39239 + const controls = blockEditingMode === "default" && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
39240 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, { group: "color", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
39241 + overlay_controls_default,
39242 + {
39243 + attributes,
39244 + setAttributes,
39245 + clientId
39246 + }
39247 + ) }),
39248 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, { group: "dimensions", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
39249 + dimension_controls_default,
39250 + {
39251 + clientId,
39252 + attributes,
39253 + setAttributes,
39254 + media
39255 + }
39256 + ) }),
39257 + (featuredImage || isDescendentOfQueryLoop || !postId) && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(
39258 + external_wp_components_namespaceObject.__experimentalToolsPanel,
39259 + {
39260 + label: (0,external_wp_i18n_namespaceObject.__)("Settings"),
39261 + resetAll: () => {
39262 + setAttributes({
39263 + isLink: false,
39264 + linkTarget: "_self",
39265 + rel: "",
39266 + sizeSlug: edit_DEFAULT_MEDIA_SIZE_SLUG
39267 + });
39268 + },
39269 + dropdownMenuProps,
39270 + children: [
39271 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
39272 + external_wp_components_namespaceObject.__experimentalToolsPanelItem,
39273 + {
39274 + label: postType?.labels.singular_name ? (0,external_wp_i18n_namespaceObject.sprintf)(
39275 + // translators: %s: Name of the post type e.g: "post".
39276 + (0,external_wp_i18n_namespaceObject.__)("Link to %s"),
39277 + postType.labels.singular_name
39278 + ) : (0,external_wp_i18n_namespaceObject.__)("Link to post"),
39279 + isShownByDefault: true,
39280 + hasValue: () => !!isLink,
39281 + onDeselect: () => setAttributes({
39282 + isLink: false
39283 + }),
39284 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
39285 + external_wp_components_namespaceObject.ToggleControl,
39286 + {
39287 + __nextHasNoMarginBottom: true,
39288 + label: postType?.labels.singular_name ? (0,external_wp_i18n_namespaceObject.sprintf)(
39289 + // translators: %s: Name of the post type e.g: "post".
39290 + (0,external_wp_i18n_namespaceObject.__)("Link to %s"),
39291 + postType.labels.singular_name
39292 + ) : (0,external_wp_i18n_namespaceObject.__)("Link to post"),
39293 + onChange: () => setAttributes({ isLink: !isLink }),
39294 + checked: isLink
39295 + }
39296 + )
39297 + }
39298 + ),
39299 + isLink && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
39300 + external_wp_components_namespaceObject.__experimentalToolsPanelItem,
39301 + {
39302 + label: (0,external_wp_i18n_namespaceObject.__)("Open in new tab"),
39303 + isShownByDefault: true,
39304 + hasValue: () => "_self" !== linkTarget,
39305 + onDeselect: () => setAttributes({
39306 + linkTarget: "_self"
39307 + }),
39308 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
39309 + external_wp_components_namespaceObject.ToggleControl,
39310 + {
39311 + __nextHasNoMarginBottom: true,
39312 + label: (0,external_wp_i18n_namespaceObject.__)("Open in new tab"),
39313 + onChange: (value) => setAttributes({
39314 + linkTarget: value ? "_blank" : "_self"
39315 + }),
39316 + checked: linkTarget === "_blank"
39317 + }
39318 + )
39319 + }
39320 + ),
39321 + isLink && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
39322 + external_wp_components_namespaceObject.__experimentalToolsPanelItem,
39323 + {
39324 + label: (0,external_wp_i18n_namespaceObject.__)("Link relation"),
39325 + isShownByDefault: true,
39326 + hasValue: () => !!rel,
39327 + onDeselect: () => setAttributes({
39328 + rel: ""
39329 + }),
39330 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
39331 + external_wp_components_namespaceObject.TextControl,
39332 + {
39333 + __next40pxDefaultSize: true,
39334 + __nextHasNoMarginBottom: true,
39335 + label: (0,external_wp_i18n_namespaceObject.__)("Link relation"),
39336 + help: (0,external_wp_element_namespaceObject.createInterpolateElement)(
39337 + (0,external_wp_i18n_namespaceObject.__)(
39338 + "The <a>Link Relation</a> attribute defines the relationship between a linked resource and the current document."
39339 + ),
39340 + {
39341 + a: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ExternalLink, { href: "https://developer.mozilla.org/docs/Web/HTML/Attributes/rel" })
39342 + }
39343 + ),
39344 + value: rel,
39345 + onChange: (newRel) => setAttributes({ rel: newRel })
39346 + }
39347 + )
39348 + }
39349 + ),
39350 + !!media && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
39351 + FeaturedImageResolutionTool,
39352 + {
39353 + image: media,
39354 + value: sizeSlug,
39355 + onChange: (nextSizeSlug) => setAttributes({ sizeSlug: nextSizeSlug })
39356 + }
39357 + )
39358 + ]
39359 + }
39360 + ) })
39361 + ] });
39362 + let image;
39363 + if (!featuredImage && (isDescendentOfQueryLoop || !postId)) {
39364 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
39365 + controls,
39366 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", { ...blockProps, children: [
39367 + !!isLink ? /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("a", { href: postPermalink, target: linkTarget, children: placeholder() }) : placeholder(),
39368 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
39369 + overlay_default,
39370 + {
39371 + attributes,
39372 + setAttributes,
39373 + clientId
39374 + }
39375 + )
39376 + ] })
39377 + ] });
39378 + }
39379 + const label = (0,external_wp_i18n_namespaceObject.__)("Add a featured image");
39380 + const imageStyles = {
39381 + ...borderProps.style,
39382 + ...shadowProps.style,
39383 + height: aspectRatio ? "100%" : height,
39384 + width: !!aspectRatio && "100%",
39385 + objectFit: !!(height || aspectRatio) && scale
39386 + };
39387 + if (!featuredImage && !temporaryURL) {
39388 + image = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
39389 + external_wp_blockEditor_namespaceObject.MediaPlaceholder,
39390 + {
39391 + onSelect: onSelectImage,
39392 + accept: "image/*",
39393 + allowedTypes: post_featured_image_edit_ALLOWED_MEDIA_TYPES,
39394 + onError: onUploadError,
39395 + placeholder,
39396 + mediaLibraryButton: ({ open }) => {
39397 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
39398 + external_wp_components_namespaceObject.Button,
39399 + {
39400 + __next40pxDefaultSize: true,
39401 + icon: upload_default,
39402 + variant: "primary",
39403 + label,
39404 + showTooltip: true,
39405 + tooltipPosition: "top center",
39406 + onClick: () => {
39407 + open();
39408 + }
39409 + }
39410 + );
39411 + }
39412 + }
39413 + );
39414 + } else {
39415 + image = !media && !temporaryURL ? placeholder() : /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
39416 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
39417 + "img",
39418 + {
39419 + className: borderProps.className,
39420 + src: temporaryURL || mediaUrl,
39421 + alt: media && media?.alt_text ? (0,external_wp_i18n_namespaceObject.sprintf)(
39422 + // translators: %s: The image's alt text.
39423 + (0,external_wp_i18n_namespaceObject.__)("Featured image: %s"),
39424 + media.alt_text
39425 + ) : (0,external_wp_i18n_namespaceObject.__)("Featured image"),
39426 + style: imageStyles
39427 + }
39428 + ),
39429 + temporaryURL && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Spinner, {})
39430 + ] });
39431 + }
39432 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
39433 + !temporaryURL && controls,
39434 + !!media && !isDescendentOfQueryLoop && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockControls, { group: "other", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
39435 + external_wp_blockEditor_namespaceObject.MediaReplaceFlow,
39436 + {
39437 + mediaId: featuredImage,
39438 + mediaURL: mediaUrl,
39439 + allowedTypes: post_featured_image_edit_ALLOWED_MEDIA_TYPES,
39440 + accept: "image/*",
39441 + onSelect: onSelectImage,
39442 + onError: onUploadError,
39443 + onReset: onResetImage
39444 + }
39445 + ) }),
39446 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("figure", { ...blockProps, children: [
39447 + !!isLink ? /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("a", { href: postPermalink, target: linkTarget, children: image }) : image,
39448 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
39449 + overlay_default,
39450 + {
39451 + attributes,
39452 + setAttributes,
39453 + clientId
39454 + }
39455 + )
39456 + ] })
39457 + ] });
39458 + }
39459 +
39460 +
39461 + ;// ./node_modules/@wordpress/block-library/build-module/post-featured-image/index.js
39462 +
39463 +
39464 +
39465 +
39466 + const { name: post_featured_image_name } = post_featured_image_block_namespaceObject;
39467 + const post_featured_image_settings = {
39468 + icon: post_featured_image_default,
39469 + edit: PostFeaturedImageEdit
39470 + };
39471 + const post_featured_image_init = () => initBlock({ name: post_featured_image_name, metadata: post_featured_image_block_namespaceObject, settings: post_featured_image_settings });
39472 +
39473 +
39474 + ;// ./node_modules/@wordpress/block-library/build-module/post-navigation-link/block.json
39475 + const post_navigation_link_block_namespaceObject = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/post-navigation-link","title":"Post Navigation Link","category":"theme","description":"Displays the next or previous post link that is adjacent to the current post.","textdomain":"default","attributes":{"textAlign":{"type":"string"},"type":{"type":"string","default":"next"},"label":{"type":"string","role":"content"},"showTitle":{"type":"boolean","default":false},"linkLabel":{"type":"boolean","default":false},"arrow":{"type":"string","default":"none"},"taxonomy":{"type":"string","default":""}},"usesContext":["postType"],"supports":{"reusable":false,"html":false,"color":{"link":true},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalWritingMode":true,"__experimentalDefaultControls":{"fontSize":true}},"interactivity":{"clientNavigation":true}},"style":"wp-block-post-navigation-link"}');
39476 + ;// ./node_modules/@wordpress/block-library/build-module/post-navigation-link/edit.js
39477 +
39478 +
39479 +
39480 +
39481 +
39482 +
39483 +
39484 +
39485 + function PostNavigationLinkEdit({
39486 + context: { postType },
39487 + attributes: {
39488 + type,
39489 + label,
39490 + showTitle,
39491 + textAlign,
39492 + linkLabel,
39493 + arrow,
39494 + taxonomy
39495 + },
39496 + setAttributes
39497 + }) {
39498 + const blockEditingMode = (0,external_wp_blockEditor_namespaceObject.useBlockEditingMode)();
39499 + const showControls = blockEditingMode === "default";
39500 + const isNext = type === "next";
39501 + let placeholder = isNext ? (0,external_wp_i18n_namespaceObject.__)("Next") : (0,external_wp_i18n_namespaceObject.__)("Previous");
39502 + const arrowMap = {
39503 + none: "",
39504 + arrow: isNext ? "\u2192" : "\u2190",
39505 + chevron: isNext ? "\xBB" : "\xAB"
39506 + };
39507 + const displayArrow = arrowMap[arrow];
39508 + if (showTitle) {
39509 + placeholder = isNext ? (
39510 + /* translators: Label before for next and previous post. There is a space after the colon. */
39511 + (0,external_wp_i18n_namespaceObject.__)("Next: ")
39512 + ) : (
39513 + /* translators: Label before for next and previous post. There is a space after the colon. */
39514 + (0,external_wp_i18n_namespaceObject.__)("Previous: ")
39515 + );
39516 + }
39517 + const ariaLabel = isNext ? (0,external_wp_i18n_namespaceObject.__)("Next post") : (0,external_wp_i18n_namespaceObject.__)("Previous post");
39518 + const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)({
39519 + className: dist_clsx({
39520 + [`has-text-align-${textAlign}`]: textAlign
39521 + })
39522 + });
39523 + const taxonomies = (0,external_wp_data_namespaceObject.useSelect)(
39524 + (select) => {
39525 + const { getTaxonomies } = select(external_wp_coreData_namespaceObject.store);
39526 + const filteredTaxonomies = getTaxonomies({
39527 + type: postType,
39528 + per_page: -1
39529 + });
39530 + return filteredTaxonomies;
39531 + },
39532 + [postType]
39533 + );
39534 + const getTaxonomyOptions = () => {
39535 + const selectOption = {
39536 + label: (0,external_wp_i18n_namespaceObject.__)("Unfiltered"),
39537 + value: ""
39538 + };
39539 + const taxonomyOptions = (taxonomies ?? []).filter(({ visibility }) => !!visibility?.publicly_queryable).map((item) => {
39540 + return {
39541 + value: item.slug,
39542 + label: item.name
39543 + };
39544 + });
39545 + return [selectOption, ...taxonomyOptions];
39546 + };
39547 + const dropdownMenuProps = useToolsPanelDropdownMenuProps();
39548 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
39549 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(
39550 + external_wp_components_namespaceObject.__experimentalToolsPanel,
39551 + {
39552 + label: (0,external_wp_i18n_namespaceObject.__)("Settings"),
39553 + resetAll: () => {
39554 + setAttributes({
39555 + showTitle: false,
39556 + linkLabel: false,
39557 + arrow: "none"
39558 + });
39559 + },
39560 + dropdownMenuProps,
39561 + children: [
39562 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
39563 + external_wp_components_namespaceObject.__experimentalToolsPanelItem,
39564 + {
39565 + label: (0,external_wp_i18n_namespaceObject.__)("Display the title as a link"),
39566 + isShownByDefault: true,
39567 + hasValue: () => showTitle,
39568 + onDeselect: () => setAttributes({ showTitle: false }),
39569 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
39570 + external_wp_components_namespaceObject.ToggleControl,
39571 + {
39572 + __nextHasNoMarginBottom: true,
39573 + label: (0,external_wp_i18n_namespaceObject.__)("Display the title as a link"),
39574 + help: (0,external_wp_i18n_namespaceObject.__)(
39575 + "If you have entered a custom label, it will be prepended before the title."
39576 + ),
39577 + checked: !!showTitle,
39578 + onChange: () => setAttributes({
39579 + showTitle: !showTitle
39580 + })
39581 + }
39582 + )
39583 + }
39584 + ),
39585 + showTitle && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
39586 + external_wp_components_namespaceObject.__experimentalToolsPanelItem,
39587 + {
39588 + label: (0,external_wp_i18n_namespaceObject.__)(
39589 + "Include the label as part of the link"
39590 + ),
39591 + isShownByDefault: true,
39592 + hasValue: () => !!linkLabel,
39593 + onDeselect: () => setAttributes({ linkLabel: false }),
39594 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
39595 + external_wp_components_namespaceObject.ToggleControl,
39596 + {
39597 + __nextHasNoMarginBottom: true,
39598 + label: (0,external_wp_i18n_namespaceObject.__)(
39599 + "Include the label as part of the link"
39600 + ),
39601 + checked: !!linkLabel,
39602 + onChange: () => setAttributes({
39603 + linkLabel: !linkLabel
39604 + })
39605 + }
39606 + )
39607 + }
39608 + ),
39609 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
39610 + external_wp_components_namespaceObject.__experimentalToolsPanelItem,
39611 + {
39612 + label: (0,external_wp_i18n_namespaceObject.__)("Arrow"),
39613 + isShownByDefault: true,
39614 + hasValue: () => arrow !== "none",
39615 + onDeselect: () => setAttributes({ arrow: "none" }),
39616 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(
39617 + external_wp_components_namespaceObject.__experimentalToggleGroupControl,
39618 + {
39619 + __next40pxDefaultSize: true,
39620 + __nextHasNoMarginBottom: true,
39621 + label: (0,external_wp_i18n_namespaceObject.__)("Arrow"),
39622 + value: arrow,
39623 + onChange: (value) => {
39624 + setAttributes({ arrow: value });
39625 + },
39626 + help: (0,external_wp_i18n_namespaceObject.__)(
39627 + "A decorative arrow for the next and previous link."
39628 + ),
39629 + isBlock: true,
39630 + children: [
39631 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
39632 + external_wp_components_namespaceObject.__experimentalToggleGroupControlOption,
39633 + {
39634 + value: "none",
39635 + label: (0,external_wp_i18n_namespaceObject._x)(
39636 + "None",
39637 + "Arrow option for Next/Previous link"
39638 + )
39639 + }
39640 + ),
39641 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
39642 + external_wp_components_namespaceObject.__experimentalToggleGroupControlOption,
39643 + {
39644 + value: "arrow",
39645 + label: (0,external_wp_i18n_namespaceObject._x)(
39646 + "Arrow",
39647 + "Arrow option for Next/Previous link"
39648 + )
39649 + }
39650 + ),
39651 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
39652 + external_wp_components_namespaceObject.__experimentalToggleGroupControlOption,
39653 + {
39654 + value: "chevron",
39655 + label: (0,external_wp_i18n_namespaceObject._x)(
39656 + "Chevron",
39657 + "Arrow option for Next/Previous link"
39658 + )
39659 + }
39660 + )
39661 + ]
39662 + }
39663 + )
39664 + }
39665 + )
39666 + ]
39667 + }
39668 + ) }),
39669 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, { group: "advanced", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
39670 + external_wp_components_namespaceObject.SelectControl,
39671 + {
39672 + __next40pxDefaultSize: true,
39673 + __nextHasNoMarginBottom: true,
39674 + label: (0,external_wp_i18n_namespaceObject.__)("Filter by taxonomy"),
39675 + value: taxonomy,
39676 + options: getTaxonomyOptions(),
39677 + onChange: (value) => setAttributes({
39678 + taxonomy: value
39679 + }),
39680 + help: (0,external_wp_i18n_namespaceObject.__)(
39681 + "Only link to posts that have the same taxonomy terms as the current post. For example the same tags or categories."
39682 + )
39683 + }
39684 + ) }),
39685 + showControls && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockControls, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
39686 + external_wp_blockEditor_namespaceObject.AlignmentToolbar,
39687 + {
39688 + value: textAlign,
39689 + onChange: (nextAlign) => {
39690 + setAttributes({ textAlign: nextAlign });
39691 + }
39692 + }
39693 + ) }),
39694 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", { ...blockProps, children: [
39695 + !isNext && displayArrow && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
39696 + "span",
39697 + {
39698 + className: `wp-block-post-navigation-link__arrow-previous is-arrow-${arrow}`,
39699 + children: displayArrow
39700 + }
39701 + ),
39702 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
39703 + external_wp_blockEditor_namespaceObject.RichText,
39704 + {
39705 + tagName: "a",
39706 + identifier: "label",
39707 + "aria-label": ariaLabel,
39708 + placeholder,
39709 + value: label,
39710 + withoutInteractiveFormatting: true,
39711 + onChange: (newLabel) => setAttributes({ label: newLabel })
39712 + }
39713 + ),
39714 + showTitle && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
39715 + "a",
39716 + {
39717 + href: "#post-navigation-pseudo-link",
39718 + onClick: (event) => event.preventDefault(),
39719 + children: (0,external_wp_i18n_namespaceObject.__)("An example title")
39720 + }
39721 + ),
39722 + isNext && displayArrow && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
39723 + "span",
39724 + {
39725 + className: `wp-block-post-navigation-link__arrow-next is-arrow-${arrow}`,
39726 + "aria-hidden": true,
39727 + children: displayArrow
39728 + }
39729 + )
39730 + ] })
39731 + ] });
39732 + }
39733 +
39734 +
39735 + ;// ./node_modules/@wordpress/icons/build-module/library/previous.js
39736 +
39737 +
39738 + var previous_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M11.6 7l-1.1-1L5 12l5.5 6 1.1-1L7 12l4.6-5zm6 0l-1.1-1-5.5 6 5.5 6 1.1-1-4.6-5 4.6-5z" }) });
39739 +
39740 +
39741 + ;// ./node_modules/@wordpress/icons/build-module/library/next.js
39742 +
39743 +
39744 + var next_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M6.6 6L5.4 7l4.5 5-4.5 5 1.1 1 5.5-6-5.4-6zm6 0l-1.1 1 4.5 5-4.5 5 1.1 1 5.5-6-5.5-6z" }) });
39745 +
39746 +
39747 + ;// ./node_modules/@wordpress/block-library/build-module/post-navigation-link/variations.js
39748 +
39749 +
39750 + const post_navigation_link_variations_variations = [
39751 + {
39752 + name: "post-previous",
39753 + title: (0,external_wp_i18n_namespaceObject.__)("Previous Post"),
39754 + description: (0,external_wp_i18n_namespaceObject.__)(
39755 + "Displays the post link that precedes the current post."
39756 + ),
39757 + icon: previous_default,
39758 + attributes: { type: "previous" },
39759 + scope: ["inserter", "transform"],
39760 + example: {
39761 + attributes: {
39762 + label: (0,external_wp_i18n_namespaceObject.__)("Previous post"),
39763 + arrow: "arrow"
39764 + }
39765 + }
39766 + },
39767 + {
39768 + isDefault: true,
39769 + name: "post-next",
39770 + title: (0,external_wp_i18n_namespaceObject.__)("Next Post"),
39771 + description: (0,external_wp_i18n_namespaceObject.__)(
39772 + "Displays the post link that follows the current post."
39773 + ),
39774 + icon: next_default,
39775 + attributes: { type: "next" },
39776 + scope: ["inserter", "transform"],
39777 + example: {
39778 + attributes: {
39779 + label: (0,external_wp_i18n_namespaceObject.__)("Next post"),
39780 + arrow: "arrow"
39781 + }
39782 + }
39783 + }
39784 + ];
39785 + post_navigation_link_variations_variations.forEach((variation) => {
39786 + if (variation.isActive) {
39787 + return;
39788 + }
39789 + variation.isActive = (blockAttributes, variationAttributes) => blockAttributes.type === variationAttributes.type;
39790 + });
39791 + var post_navigation_link_variations_variations_default = post_navigation_link_variations_variations;
39792 +
39793 +
39794 + ;// ./node_modules/@wordpress/block-library/build-module/post-navigation-link/index.js
39795 +
39796 +
39797 +
39798 +
39799 +
39800 + const { name: post_navigation_link_name } = post_navigation_link_block_namespaceObject;
39801 + const post_navigation_link_settings = {
39802 + edit: PostNavigationLinkEdit,
39803 + variations: post_navigation_link_variations_variations_default,
39804 + example: {
39805 + attributes: {
39806 + label: (0,external_wp_i18n_namespaceObject.__)("Next post"),
39807 + arrow: "arrow"
39808 + }
39809 + }
39810 + };
39811 + const post_navigation_link_init = () => initBlock({ name: post_navigation_link_name, metadata: post_navigation_link_block_namespaceObject, settings: post_navigation_link_settings });
39812 +
39813 +
39814 + ;// ./node_modules/@wordpress/block-library/build-module/post-template/block.json
39815 + const post_template_block_namespaceObject = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/post-template","title":"Post Template","category":"theme","ancestor":["core/query"],"description":"Contains the block elements used to render a post, like the title, date, featured image, content or excerpt, and more.","textdomain":"default","usesContext":["queryId","query","displayLayout","templateSlug","previewPostType","enhancedPagination","postType"],"supports":{"reusable":false,"html":false,"align":["wide","full"],"layout":true,"color":{"gradients":true,"link":true,"__experimentalDefaultControls":{"background":true,"text":true}},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"spacing":{"margin":true,"padding":true,"blockGap":{"__experimentalDefault":"1.25em"},"__experimentalDefaultControls":{"blockGap":true,"padding":false,"margin":false}},"interactivity":{"clientNavigation":true},"__experimentalBorder":{"radius":true,"color":true,"width":true,"style":true}},"style":"wp-block-post-template","editorStyle":"wp-block-post-template-editor"}');
39816 + ;// ./node_modules/@wordpress/block-library/build-module/post-template/edit.js
39817 +
39818 +
39819 +
39820 +
39821 +
39822 +
39823 +
39824 +
39825 +
39826 + const post_template_edit_TEMPLATE = [
39827 + ["core/post-title"],
39828 + [
39829 + "core/post-date",
39830 + {
39831 + metadata: {
39832 + bindings: {
39833 + datetime: {
39834 + source: "core/post-data",
39835 + args: { field: "date" }
39836 + }
39837 + }
39838 + }
39839 + }
39840 + ],
39841 + ["core/post-excerpt"]
39842 + ];
39843 + function PostTemplateInnerBlocks({ classList }) {
39844 + const innerBlocksProps = (0,external_wp_blockEditor_namespaceObject.useInnerBlocksProps)(
39845 + { className: dist_clsx("wp-block-post", classList) },
39846 + { template: post_template_edit_TEMPLATE, __unstableDisableLayoutClassNames: true }
39847 + );
39848 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("li", { ...innerBlocksProps });
39849 + }
39850 + function PostTemplateBlockPreview({
39851 + blocks,
39852 + blockContextId,
39853 + classList,
39854 + isHidden,
39855 + setActiveBlockContextId
39856 + }) {
39857 + const blockPreviewProps = (0,external_wp_blockEditor_namespaceObject.__experimentalUseBlockPreview)({
39858 + blocks,
39859 + props: {
39860 + className: dist_clsx("wp-block-post", classList)
39861 + }
39862 + });
39863 + const handleOnClick = () => {
39864 + setActiveBlockContextId(blockContextId);
39865 + };
39866 + const style = {
39867 + display: isHidden ? "none" : void 0
39868 + };
39869 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
39870 + "li",
39871 + {
39872 + ...blockPreviewProps,
39873 + tabIndex: 0,
39874 + role: "button",
39875 + onClick: handleOnClick,
39876 + onKeyPress: handleOnClick,
39877 + style
39878 + }
39879 + );
39880 + }
39881 + const MemoizedPostTemplateBlockPreview = (0,external_wp_element_namespaceObject.memo)(PostTemplateBlockPreview);
39882 + function PostTemplateEdit({
39883 + setAttributes,
39884 + clientId,
39885 + context: {
39886 + query: {
39887 + perPage,
39888 + offset = 0,
39889 + postType,
39890 + order,
39891 + orderBy,
39892 + author,
39893 + search,
39894 + exclude,
39895 + sticky,
39896 + inherit,
39897 + taxQuery,
39898 + parents,
39899 + pages,
39900 + format,
39901 + // We gather extra query args to pass to the REST API call.
39902 + // This way extenders of Query Loop can add their own query args,
39903 + // and have accurate previews in the editor.
39904 + // Noting though that these args should either be supported by the
39905 + // REST API or be handled by custom REST filters like `rest_{$this->post_type}_query`.
39906 + ...restQueryArgs
39907 + } = {},
39908 + templateSlug,
39909 + previewPostType
39910 + },
39911 + attributes: { layout },
39912 + __unstableLayoutClassNames
39913 + }) {
39914 + const { type: layoutType, columnCount = 3 } = layout || {};
39915 + const [activeBlockContextId, setActiveBlockContextId] = (0,external_wp_element_namespaceObject.useState)();
39916 + const { posts, blocks } = (0,external_wp_data_namespaceObject.useSelect)(
39917 + (select) => {
39918 + const { getEntityRecords, getTaxonomies } = select(external_wp_coreData_namespaceObject.store);
39919 + const { getBlocks } = select(external_wp_blockEditor_namespaceObject.store);
39920 + const templateCategory = inherit && templateSlug?.startsWith("category-") && getEntityRecords("taxonomy", "category", {
39921 + context: "view",
39922 + per_page: 1,
39923 + _fields: ["id"],
39924 + slug: templateSlug.replace("category-", "")
39925 + });
39926 + const templateTag = inherit && templateSlug?.startsWith("tag-") && getEntityRecords("taxonomy", "post_tag", {
39927 + context: "view",
39928 + per_page: 1,
39929 + _fields: ["id"],
39930 + slug: templateSlug.replace("tag-", "")
39931 + });
39932 + const query = {
39933 + offset: offset || 0,
39934 + order,
39935 + orderby: orderBy
39936 + };
39937 + if (taxQuery && !inherit) {
39938 + const taxonomies = getTaxonomies({
39939 + type: postType,
39940 + per_page: -1,
39941 + context: "view"
39942 + });
39943 + const builtTaxQuery = Object.entries(taxQuery).reduce(
39944 + (accumulator, [taxonomySlug, terms]) => {
39945 + const taxonomy = taxonomies?.find(
39946 + ({ slug }) => slug === taxonomySlug
39947 + );
39948 + if (taxonomy?.rest_base) {
39949 + accumulator[taxonomy?.rest_base] = terms;
39950 + }
39951 + return accumulator;
39952 + },
39953 + {}
39954 + );
39955 + if (!!Object.keys(builtTaxQuery).length) {
39956 + Object.assign(query, builtTaxQuery);
39957 + }
39958 + }
39959 + if (perPage) {
39960 + query.per_page = perPage;
39961 + }
39962 + if (author) {
39963 + query.author = author;
39964 + }
39965 + if (search) {
39966 + query.search = search;
39967 + }
39968 + if (exclude?.length) {
39969 + query.exclude = exclude;
39970 + }
39971 + if (parents?.length) {
39972 + query.parent = parents;
39973 + }
39974 + if (format?.length) {
39975 + query.format = format;
39976 + }
39977 + if (["exclude", "only"].includes(sticky)) {
39978 + query.sticky = sticky === "only";
39979 + }
39980 + if (["", "ignore"].includes(sticky)) {
39981 + delete query.sticky;
39982 + query.ignore_sticky = sticky === "ignore";
39983 + }
39984 + let currentPostType = postType;
39985 + if (inherit) {
39986 + if (templateSlug?.startsWith("archive-")) {
39987 + query.postType = templateSlug.replace("archive-", "");
39988 + currentPostType = query.postType;
39989 + } else if (templateCategory) {
39990 + query.categories = templateCategory[0]?.id;
39991 + } else if (templateTag) {
39992 + query.tags = templateTag[0]?.id;
39993 + } else if (templateSlug?.startsWith("taxonomy-post_format")) {
39994 + query.format = templateSlug.replace(
39995 + "taxonomy-post_format-post-format-",
39996 + ""
39997 + );
39998 + }
39999 + }
40000 + const usedPostType = previewPostType || currentPostType;
40001 + return {
40002 + posts: getEntityRecords("postType", usedPostType, {
40003 + ...query,
40004 + ...restQueryArgs
40005 + }),
40006 + blocks: getBlocks(clientId)
40007 + };
40008 + },
40009 + [
40010 + perPage,
40011 + offset,
40012 + order,
40013 + orderBy,
40014 + clientId,
40015 + author,
40016 + search,
40017 + postType,
40018 + exclude,
40019 + sticky,
40020 + inherit,
40021 + templateSlug,
40022 + taxQuery,
40023 + parents,
40024 + format,
40025 + restQueryArgs,
40026 + previewPostType
40027 + ]
40028 + );
40029 + const blockContexts = (0,external_wp_element_namespaceObject.useMemo)(
40030 + () => posts?.map((post) => ({
40031 + postType: post.type,
40032 + postId: post.id,
40033 + classList: post.class_list ?? ""
40034 + })),
40035 + [posts]
40036 + );
40037 + const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)({
40038 + className: dist_clsx(__unstableLayoutClassNames, {
40039 + [`columns-${columnCount}`]: layoutType === "grid" && columnCount
40040 + // Ensure column count is flagged via classname for backwards compatibility.
40041 + })
40042 + });
40043 + if (!posts) {
40044 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("p", { ...blockProps, children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Spinner, {}) });
40045 + }
40046 + if (!posts.length) {
40047 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("p", { ...blockProps, children: [
40048 + " ",
40049 + (0,external_wp_i18n_namespaceObject.__)("No results found.")
40050 + ] });
40051 + }
40052 + const setDisplayLayout = (newDisplayLayout) => setAttributes({
40053 + layout: { ...layout, ...newDisplayLayout }
40054 + });
40055 + const displayLayoutControls = [
40056 + {
40057 + icon: list_default,
40058 + title: (0,external_wp_i18n_namespaceObject._x)("List view", "Post template block display setting"),
40059 + onClick: () => setDisplayLayout({ type: "default" }),
40060 + isActive: layoutType === "default" || layoutType === "constrained"
40061 + },
40062 + {
40063 + icon: grid_default,
40064 + title: (0,external_wp_i18n_namespaceObject._x)("Grid view", "Post template block display setting"),
40065 + onClick: () => setDisplayLayout({
40066 + type: "grid",
40067 + columnCount
40068 + }),
40069 + isActive: layoutType === "grid"
40070 + }
40071 + ];
40072 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
40073 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockControls, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ToolbarGroup, { controls: displayLayoutControls }) }),
40074 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("ul", { ...blockProps, children: blockContexts && blockContexts.map((blockContext) => /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(
40075 + external_wp_blockEditor_namespaceObject.BlockContextProvider,
40076 + {
40077 + value: blockContext,
40078 + children: [
40079 + blockContext.postId === (activeBlockContextId || blockContexts[0]?.postId) ? /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
40080 + PostTemplateInnerBlocks,
40081 + {
40082 + classList: blockContext.classList
40083 + }
40084 + ) : null,
40085 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
40086 + MemoizedPostTemplateBlockPreview,
40087 + {
40088 + blocks,
40089 + blockContextId: blockContext.postId,
40090 + classList: blockContext.classList,
40091 + setActiveBlockContextId,
40092 + isHidden: blockContext.postId === (activeBlockContextId || blockContexts[0]?.postId)
40093 + }
40094 + )
40095 + ]
40096 + },
40097 + blockContext.postId
40098 + )) })
40099 + ] });
40100 + }
40101 +
40102 +
40103 + ;// ./node_modules/@wordpress/block-library/build-module/post-template/save.js
40104 +
40105 +
40106 + function PostTemplateSave() {
40107 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, {});
40108 + }
40109 +
40110 +
40111 + ;// ./node_modules/@wordpress/block-library/build-module/post-template/index.js
40112 +
40113 +
40114 +
40115 +
40116 +
40117 + const { name: post_template_name } = post_template_block_namespaceObject;
40118 + const post_template_settings = {
40119 + icon: layout_default,
40120 + edit: PostTemplateEdit,
40121 + save: PostTemplateSave
40122 + };
40123 + const post_template_init = () => initBlock({ name: post_template_name, metadata: post_template_block_namespaceObject, settings: post_template_settings });
40124 +
40125 +
40126 + ;// ./node_modules/@wordpress/icons/build-module/library/post-categories.js
40127 +
40128 +
40129 + var post_categories_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
40130 + external_wp_primitives_namespaceObject.Path,
40131 + {
40132 + d: "M20 4H4v1.5h16V4zm-2 9h-3c-1.1 0-2 .9-2 2v3c0 1.1.9 2 2 2h3c1.1 0 2-.9 2-2v-3c0-1.1-.9-2-2-2zm.5 5c0 .3-.2.5-.5.5h-3c-.3 0-.5-.2-.5-.5v-3c0-.3.2-.5.5-.5h3c.3 0 .5.2.5.5v3zM4 9.5h9V8H4v1.5zM9 13H6c-1.1 0-2 .9-2 2v3c0 1.1.9 2 2 2h3c1.1 0 2-.9 2-2v-3c0-1.1-.9-2-2-2zm.5 5c0 .3-.2.5-.5.5H6c-.3 0-.5-.2-.5-.5v-3c0-.3.2-.5.5-.5h3c.3 0 .5.2.5.5v3z",
40133 + fillRule: "evenodd",
40134 + clipRule: "evenodd"
40135 + }
40136 + ) });
40137 +
40138 +
40139 + ;// ./node_modules/@wordpress/block-library/build-module/post-terms/block.json
40140 + const post_terms_block_namespaceObject = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/post-terms","title":"Post Terms","category":"theme","description":"Post terms.","textdomain":"default","attributes":{"term":{"type":"string"},"textAlign":{"type":"string"},"separator":{"type":"string","default":", "},"prefix":{"type":"string","default":"","role":"content"},"suffix":{"type":"string","default":"","role":"content"}},"usesContext":["postId","postType"],"example":{"viewportWidth":350},"supports":{"html":false,"color":{"gradients":true,"link":true,"__experimentalDefaultControls":{"background":true,"text":true,"link":true}},"spacing":{"margin":true,"padding":true},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"interactivity":{"clientNavigation":true},"__experimentalBorder":{"radius":true,"color":true,"width":true,"style":true,"__experimentalDefaultControls":{"radius":true,"color":true,"width":true,"style":true}}},"style":"wp-block-post-terms"}');
40141 + ;// ./node_modules/@wordpress/block-library/build-module/post-terms/use-post-terms.js
40142 +
40143 +
40144 + const use_post_terms_EMPTY_ARRAY = [];
40145 + function usePostTerms({ postId, term }) {
40146 + const { slug } = term;
40147 + return (0,external_wp_data_namespaceObject.useSelect)(
40148 + (select) => {
40149 + const visible = term?.visibility?.publicly_queryable;
40150 + if (!visible) {
40151 + return {
40152 + postTerms: use_post_terms_EMPTY_ARRAY,
40153 + isLoading: false,
40154 + hasPostTerms: false
40155 + };
40156 + }
40157 + const { getEntityRecords, isResolving } = select(external_wp_coreData_namespaceObject.store);
40158 + const taxonomyArgs = [
40159 + "taxonomy",
40160 + slug,
40161 + {
40162 + post: postId,
40163 + per_page: -1,
40164 + context: "view"
40165 + }
40166 + ];
40167 + const terms = getEntityRecords(...taxonomyArgs);
40168 + return {
40169 + postTerms: terms,
40170 + isLoading: isResolving("getEntityRecords", taxonomyArgs),
40171 + hasPostTerms: !!terms?.length
40172 + };
40173 + },
40174 + [postId, term?.visibility?.publicly_queryable, slug]
40175 + );
40176 + }
40177 +
40178 +
40179 + ;// ./node_modules/@wordpress/block-library/build-module/post-terms/edit.js
40180 +
40181 +
40182 +
40183 +
40184 +
40185 +
40186 +
40187 +
40188 +
40189 +
40190 + const ALLOWED_FORMATS = [
40191 + "core/bold",
40192 + "core/image",
40193 + "core/italic",
40194 + "core/link",
40195 + "core/strikethrough",
40196 + "core/text-color"
40197 + ];
40198 + function PostTermsEdit({
40199 + attributes,
40200 + clientId,
40201 + context,
40202 + isSelected,
40203 + setAttributes,
40204 + insertBlocksAfter
40205 + }) {
40206 + const { term, textAlign, separator, prefix, suffix } = attributes;
40207 + const { postId, postType } = context;
40208 + const blockEditingMode = (0,external_wp_blockEditor_namespaceObject.useBlockEditingMode)();
40209 + const showControls = blockEditingMode === "default";
40210 + const selectedTerm = (0,external_wp_data_namespaceObject.useSelect)(
40211 + (select) => {
40212 + if (!term) {
40213 + return {};
40214 + }
40215 + const { getTaxonomy } = select(external_wp_coreData_namespaceObject.store);
40216 + const taxonomy = getTaxonomy(term);
40217 + return taxonomy?.visibility?.publicly_queryable ? taxonomy : {};
40218 + },
40219 + [term]
40220 + );
40221 + const { postTerms, hasPostTerms, isLoading } = usePostTerms({
40222 + postId,
40223 + term: selectedTerm
40224 + });
40225 + const hasPost = postId && postType;
40226 + const blockInformation = (0,external_wp_blockEditor_namespaceObject.useBlockDisplayInformation)(clientId);
40227 + const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)({
40228 + className: dist_clsx({
40229 + [`has-text-align-${textAlign}`]: textAlign,
40230 + [`taxonomy-${term}`]: term
40231 + })
40232 + });
40233 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
40234 + showControls && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockControls, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
40235 + external_wp_blockEditor_namespaceObject.AlignmentToolbar,
40236 + {
40237 + value: textAlign,
40238 + onChange: (nextAlign) => {
40239 + setAttributes({ textAlign: nextAlign });
40240 + }
40241 + }
40242 + ) }),
40243 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, { group: "advanced", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
40244 + external_wp_components_namespaceObject.TextControl,
40245 + {
40246 + __next40pxDefaultSize: true,
40247 + __nextHasNoMarginBottom: true,
40248 + autoComplete: "off",
40249 + label: (0,external_wp_i18n_namespaceObject.__)("Separator"),
40250 + value: separator || "",
40251 + onChange: (nextValue) => {
40252 + setAttributes({ separator: nextValue });
40253 + },
40254 + help: (0,external_wp_i18n_namespaceObject.__)("Enter character(s) used to separate terms.")
40255 + }
40256 + ) }),
40257 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", { ...blockProps, children: [
40258 + isLoading && hasPost && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Spinner, {}),
40259 + !isLoading && (isSelected || prefix) && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
40260 + external_wp_blockEditor_namespaceObject.RichText,
40261 + {
40262 + identifier: "prefix",
40263 + allowedFormats: ALLOWED_FORMATS,
40264 + className: "wp-block-post-terms__prefix",
40265 + "aria-label": (0,external_wp_i18n_namespaceObject.__)("Prefix"),
40266 + placeholder: (0,external_wp_i18n_namespaceObject.__)("Prefix") + " ",
40267 + value: prefix,
40268 + onChange: (value) => setAttributes({ prefix: value }),
40269 + tagName: "span"
40270 + }
40271 + ),
40272 + (!hasPost || !term) && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("span", { children: blockInformation.title }),
40273 + hasPost && !isLoading && hasPostTerms && postTerms.map((postTerm) => /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
40274 + "a",
40275 + {
40276 + href: postTerm.link,
40277 + onClick: (event) => event.preventDefault(),
40278 + rel: "tag",
40279 + children: (0,external_wp_htmlEntities_namespaceObject.decodeEntities)(postTerm.name)
40280 + },
40281 + postTerm.id
40282 + )).reduce((prev, curr) => /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
40283 + prev,
40284 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("span", { className: "wp-block-post-terms__separator", children: separator || " " }),
40285 + curr
40286 + ] })),
40287 + hasPost && !isLoading && !hasPostTerms && (selectedTerm?.labels?.no_terms || (0,external_wp_i18n_namespaceObject.__)("Term items not found.")),
40288 + !isLoading && (isSelected || suffix) && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
40289 + external_wp_blockEditor_namespaceObject.RichText,
40290 + {
40291 + identifier: "suffix",
40292 + allowedFormats: ALLOWED_FORMATS,
40293 + className: "wp-block-post-terms__suffix",
40294 + "aria-label": (0,external_wp_i18n_namespaceObject.__)("Suffix"),
40295 + placeholder: " " + (0,external_wp_i18n_namespaceObject.__)("Suffix"),
40296 + value: suffix,
40297 + onChange: (value) => setAttributes({ suffix: value }),
40298 + tagName: "span",
40299 + __unstableOnSplitAtEnd: () => insertBlocksAfter(
40300 + (0,external_wp_blocks_namespaceObject.createBlock)((0,external_wp_blocks_namespaceObject.getDefaultBlockName)())
40301 + )
40302 + }
40303 + )
40304 + ] })
40305 + ] });
40306 + }
40307 +
40308 +
40309 + ;// ./node_modules/@wordpress/icons/build-module/library/post-terms.js
40310 +
40311 +
40312 + var post_terms_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M8.1 12.3c.1.1.3.3.5.3.2.1.4.1.6.1.2 0 .4 0 .6-.1.2-.1.4-.2.5-.3l3-3c.3-.3.5-.7.5-1.1 0-.4-.2-.8-.5-1.1L9.7 3.5c-.1-.2-.3-.3-.5-.3H5c-.4 0-.8.4-.8.8v4.2c0 .2.1.4.2.5l3.7 3.6zM5.8 4.8h3.1l3.4 3.4v.1l-3 3 .5.5-.7-.5-3.3-3.4V4.8zM4 20h9v-1.5H4V20zm0-5.5V16h16v-1.5H4z" }) });
40313 +
40314 +
40315 + ;// ./node_modules/@wordpress/block-library/build-module/post-terms/hooks.js
40316 +
40317 + const variationIconMap = {
40318 + category: post_categories_default,
40319 + post_tag: post_terms_default
40320 + };
40321 + function enhanceVariations(settings, name) {
40322 + if (name !== "core/post-terms") {
40323 + return settings;
40324 + }
40325 + const variations = settings.variations.map((variation) => ({
40326 + ...variation,
40327 + ...{
40328 + icon: variationIconMap[variation.name] ?? post_categories_default
40329 + }
40330 + }));
40331 + return {
40332 + ...settings,
40333 + variations
40334 + };
40335 + }
40336 +
40337 +
40338 + ;// ./node_modules/@wordpress/block-library/build-module/post-terms/index.js
40339 +
40340 +
40341 +
40342 +
40343 +
40344 +
40345 + const { name: post_terms_name } = post_terms_block_namespaceObject;
40346 + const post_terms_settings = {
40347 + icon: post_categories_default,
40348 + edit: PostTermsEdit
40349 + };
40350 + const post_terms_init = () => {
40351 + (0,external_wp_hooks_namespaceObject.addFilter)(
40352 + "blocks.registerBlockType",
40353 + "core/template-part",
40354 + enhanceVariations
40355 + );
40356 + return initBlock({ name: post_terms_name, metadata: post_terms_block_namespaceObject, settings: post_terms_settings });
40357 + };
40358 +
40359 +
40360 + ;// ./node_modules/@wordpress/icons/build-module/library/time-to-read.js
40361 +
40362 +
40363 + var time_to_read_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M12 3c-5 0-9 4-9 9s4 9 9 9 9-4 9-9-4-9-9-9zm0 16.5c-4.1 0-7.5-3.4-7.5-7.5S7.9 4.5 12 4.5s7.5 3.4 7.5 7.5-3.4 7.5-7.5 7.5zM12 7l-1 5c0 .3.2.6.4.8l4.2 2.8-2.7-4.1L12 7z" }) });
40364 +
40365 +
40366 + ;// ./node_modules/@wordpress/block-library/build-module/post-time-to-read/block.json
40367 + const post_time_to_read_block_namespaceObject = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/post-time-to-read","title":"Time to Read","category":"theme","description":"Show minutes required to finish reading the post. Can also show a word count.","textdomain":"default","usesContext":["postId","postType"],"attributes":{"textAlign":{"type":"string"},"displayAsRange":{"type":"boolean","default":true},"displayMode":{"type":"string","default":"time"},"averageReadingSpeed":{"type":"number","default":189}},"supports":{"color":{"gradients":true,"__experimentalDefaultControls":{"background":true,"text":true}},"html":false,"spacing":{"margin":true,"padding":true,"__experimentalDefaultControls":{"margin":false,"padding":false}},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"interactivity":{"clientNavigation":true},"__experimentalBorder":{"radius":true,"color":true,"width":true,"style":true}}}');
40368 + ;// external ["wp","wordcount"]
40369 + const external_wp_wordcount_namespaceObject = window["wp"]["wordcount"];
40370 + ;// ./node_modules/@wordpress/block-library/build-module/post-time-to-read/edit.js
40371 +
40372 +
40373 +
40374 +
40375 +
40376 +
40377 +
40378 +
40379 +
40380 +
40381 + function PostTimeToReadEdit({ attributes, setAttributes, context }) {
40382 + const { textAlign, displayAsRange, displayMode, averageReadingSpeed } = attributes;
40383 + const { postId, postType } = context;
40384 + const dropdownMenuProps = useToolsPanelDropdownMenuProps();
40385 + const [contentStructure] = (0,external_wp_coreData_namespaceObject.useEntityProp)(
40386 + "postType",
40387 + postType,
40388 + "content",
40389 + postId
40390 + );
40391 + const [blocks] = (0,external_wp_coreData_namespaceObject.useEntityBlockEditor)("postType", postType, {
40392 + id: postId
40393 + });
40394 + const displayString = (0,external_wp_element_namespaceObject.useMemo)(() => {
40395 + let content;
40396 + if (contentStructure instanceof Function) {
40397 + content = contentStructure({ blocks });
40398 + } else if (blocks) {
40399 + content = (0,external_wp_blocks_namespaceObject.__unstableSerializeAndClean)(blocks);
40400 + } else {
40401 + content = contentStructure;
40402 + }
40403 + const wordCountType = (0,external_wp_i18n_namespaceObject._x)(
40404 + "words",
40405 + "Word count type. Do not translate!"
40406 + );
40407 + const totalWords = (0,external_wp_wordcount_namespaceObject.count)(content || "", wordCountType);
40408 + if (displayMode === "time") {
40409 + if (displayAsRange) {
40410 + let maxMinutes = Math.max(
40411 + 1,
40412 + Math.round(totalWords / averageReadingSpeed * 1.2)
40413 + );
40414 + const minMinutes = Math.max(
40415 + 1,
40416 + Math.round(totalWords / averageReadingSpeed * 0.8)
40417 + );
40418 + if (minMinutes === maxMinutes) {
40419 + maxMinutes = maxMinutes + 1;
40420 + }
40421 + const rangeLabel = (0,external_wp_i18n_namespaceObject._x)(
40422 + "%1$s\u2013%2$s minutes",
40423 + "Range of minutes to read"
40424 + );
40425 + return (0,external_wp_i18n_namespaceObject.sprintf)(rangeLabel, minMinutes, maxMinutes);
40426 + }
40427 + const minutesToRead = Math.max(
40428 + 1,
40429 + Math.round(totalWords / averageReadingSpeed)
40430 + );
40431 + return (0,external_wp_i18n_namespaceObject.sprintf)(
40432 + /* translators: %s: the number of minutes to read the post. */
40433 + (0,external_wp_i18n_namespaceObject._n)("%s minute", "%s minutes", minutesToRead),
40434 + minutesToRead
40435 + );
40436 + }
40437 + if (displayMode === "words") {
40438 + return wordCountType === "words" ? (0,external_wp_i18n_namespaceObject.sprintf)(
40439 + /* translators: %s: the number of words in the post. */
40440 + (0,external_wp_i18n_namespaceObject._n)("%s word", "%s words", totalWords),
40441 + totalWords.toLocaleString()
40442 + ) : (0,external_wp_i18n_namespaceObject.sprintf)(
40443 + /* translators: %s: the number of characters in the post. */
40444 + (0,external_wp_i18n_namespaceObject._n)("%s character", "%s characters", totalWords),
40445 + totalWords.toLocaleString()
40446 + );
40447 + }
40448 + }, [
40449 + contentStructure,
40450 + blocks,
40451 + displayAsRange,
40452 + displayMode,
40453 + averageReadingSpeed
40454 + ]);
40455 + const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)({
40456 + className: dist_clsx({
40457 + [`has-text-align-${textAlign}`]: textAlign
40458 + })
40459 + });
40460 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
40461 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockControls, { group: "block", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
40462 + external_wp_blockEditor_namespaceObject.AlignmentControl,
40463 + {
40464 + value: textAlign,
40465 + onChange: (nextAlign) => {
40466 + setAttributes({ textAlign: nextAlign });
40467 + }
40468 + }
40469 + ) }),
40470 + displayMode === "time" && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
40471 + external_wp_components_namespaceObject.__experimentalToolsPanel,
40472 + {
40473 + label: (0,external_wp_i18n_namespaceObject.__)("Settings"),
40474 + resetAll: () => {
40475 + setAttributes({
40476 + displayAsRange: true
40477 + });
40478 + },
40479 + dropdownMenuProps,
40480 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
40481 + external_wp_components_namespaceObject.__experimentalToolsPanelItem,
40482 + {
40483 + isShownByDefault: true,
40484 + label: (0,external_wp_i18n_namespaceObject._x)(
40485 + "Display as range",
40486 + "Turns reading time range display on or off"
40487 + ),
40488 + hasValue: () => !displayAsRange,
40489 + onDeselect: () => {
40490 + setAttributes({
40491 + displayAsRange: true
40492 + });
40493 + },
40494 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
40495 + external_wp_components_namespaceObject.ToggleControl,
40496 + {
40497 + __nextHasNoMarginBottom: true,
40498 + label: (0,external_wp_i18n_namespaceObject.__)("Display as range"),
40499 + checked: !!displayAsRange,
40500 + onChange: () => setAttributes({
40501 + displayAsRange: !displayAsRange
40502 + })
40503 + }
40504 + )
40505 + }
40506 + )
40507 + }
40508 + ) }),
40509 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { ...blockProps, children: displayString })
40510 + ] });
40511 + }
40512 + var post_time_to_read_edit_edit_default = PostTimeToReadEdit;
40513 +
40514 +
40515 + ;// ./node_modules/@wordpress/icons/build-module/library/word-count.js
40516 +
40517 +
40518 + var word_count_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M19 5c1.1 0 2 .9 2 2v10c0 1.1-.9 2-2 2H5c-1.1 0-2-.9-2-2V7c0-1.1.9-2 2-2zM5 6.5c-.3 0-.5.2-.5.5v10c0 .3.2.5.5.5h14c.3 0 .5-.2.5-.5V7c0-.3-.2-.5-.5-.5zM14.734 9q.714 0 1.15.253.437.247.639.84.2.591.2 1.61v1.15q0 .402.036.667.04.258.172.39.138.127.437.127h.104l-.162.828h-.08q-.5 0-.776-.097a.9.9 0 0 1-.414-.283 2 2 0 0 1-.259-.448q-.316.367-.748.598-.43.23-.977.23-.524 0-.914-.213a1.56 1.56 0 0 1-.61-.58 1.65 1.65 0 0 1-.213-.84q0-.477.207-.817.213-.345.564-.568.357-.23.794-.363.437-.139.902-.196.471-.062.902-.068 0-.805-.315-1.053-.316-.247-.915-.247-.316 0-.678.098-.356.097-.805.408l-.15-.84a2.8 2.8 0 0 1 .846-.419A3.4 3.4 0 0 1 14.734 9m-5.877 1.669H9.86l.59-1.531h.689l-.585 1.53h.898l-.249.727h-.922l-.337.866h1.019l-.354.773h-.962l-.681 1.804h-.701l.69-1.804h-.999l-.693 1.804h-.69l.685-1.804H6.3l.34-.773h.915l.333-.866h-.994l.244-.726H8.16l.594-1.531h.693zm6.832 1.264q-.823.029-1.335.16-.506.133-.74.397-.236.265-.236.685 0 .454.241.66.248.202.632.202.414 0 .8-.207.39-.207.637-.552zm-7.441.328h1l.34-.866h-1z" }) });
40519 +
40520 +
40521 + ;// ./node_modules/@wordpress/block-library/build-module/post-time-to-read/variations.js
40522 +
40523 +
40524 + const post_time_to_read_variations_variations = [
40525 + {
40526 + name: "time-to-read",
40527 + title: (0,external_wp_i18n_namespaceObject.__)("Time to Read"),
40528 + description: (0,external_wp_i18n_namespaceObject.__)("Show minutes required to finish reading the post."),
40529 + attributes: {
40530 + displayMode: "time"
40531 + },
40532 + scope: ["inserter", "transform"],
40533 + isActive: (blockAttributes) => blockAttributes?.displayMode === "time",
40534 + icon: time_to_read_default,
40535 + isDefault: true
40536 + },
40537 + {
40538 + name: "word-count",
40539 + title: (0,external_wp_i18n_namespaceObject.__)("Word Count"),
40540 + description: (0,external_wp_i18n_namespaceObject.__)("Show the number of words in the post."),
40541 + attributes: {
40542 + displayMode: "words"
40543 + },
40544 + scope: ["inserter", "transform"],
40545 + isActive: (blockAttributes) => blockAttributes?.displayMode === "words",
40546 + icon: word_count_default
40547 + }
40548 + ];
40549 + var post_time_to_read_variations_variations_default = post_time_to_read_variations_variations;
40550 +
40551 +
40552 + ;// ./node_modules/@wordpress/block-library/build-module/post-time-to-read/index.js
40553 +
40554 +
40555 +
40556 +
40557 +
40558 + const { name: post_time_to_read_name } = post_time_to_read_block_namespaceObject;
40559 + const post_time_to_read_settings = {
40560 + icon: time_to_read_default,
40561 + edit: post_time_to_read_edit_edit_default,
40562 + variations: post_time_to_read_variations_variations_default,
40563 + example: {}
40564 + };
40565 + const post_time_to_read_init = () => initBlock({ name: post_time_to_read_name, metadata: post_time_to_read_block_namespaceObject, settings: post_time_to_read_settings });
40566 +
40567 +
40568 + ;// ./node_modules/@wordpress/block-library/build-module/post-title/block.json
40569 + const post_title_block_namespaceObject = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/post-title","title":"Title","category":"theme","description":"Displays the title of a post, page, or any other content-type.","textdomain":"default","usesContext":["postId","postType","queryId"],"attributes":{"textAlign":{"type":"string"},"level":{"type":"number","default":2},"levelOptions":{"type":"array"},"isLink":{"type":"boolean","default":false,"role":"content"},"rel":{"type":"string","attribute":"rel","default":"","role":"content"},"linkTarget":{"type":"string","default":"_self","role":"content"}},"example":{"viewportWidth":350},"supports":{"align":["wide","full"],"html":false,"color":{"gradients":true,"link":true,"__experimentalDefaultControls":{"background":true,"text":true,"link":true}},"spacing":{"margin":true,"padding":true},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"interactivity":{"clientNavigation":true},"__experimentalBorder":{"radius":true,"color":true,"width":true,"style":true,"__experimentalDefaultControls":{"radius":true,"color":true,"width":true,"style":true}}},"style":"wp-block-post-title"}');
40570 + ;// ./node_modules/@wordpress/block-library/build-module/post-title/edit.js
40571 +
40572 +
40573 +
40574 +
40575 +
40576 +
40577 +
40578 +
40579 +
40580 +
40581 + function PostTitleEdit({
40582 + attributes: { level, levelOptions, textAlign, isLink, rel, linkTarget },
40583 + setAttributes,
40584 + context: { postType, postId, queryId },
40585 + insertBlocksAfter
40586 + }) {
40587 + const TagName = level === 0 ? "p" : `h${level}`;
40588 + const isDescendentOfQueryLoop = Number.isFinite(queryId);
40589 + const userCanEdit = (0,external_wp_data_namespaceObject.useSelect)(
40590 + (select) => {
40591 + if (isDescendentOfQueryLoop) {
40592 + return false;
40593 + }
40594 + return select(external_wp_coreData_namespaceObject.store).canUser("update", {
40595 + kind: "postType",
40596 + name: postType,
40597 + id: postId
40598 + });
40599 + },
40600 + [isDescendentOfQueryLoop, postType, postId]
40601 + );
40602 + const [rawTitle = "", setTitle, fullTitle] = (0,external_wp_coreData_namespaceObject.useEntityProp)(
40603 + "postType",
40604 + postType,
40605 + "title",
40606 + postId
40607 + );
40608 + const [link] = (0,external_wp_coreData_namespaceObject.useEntityProp)("postType", postType, "link", postId);
40609 + const onSplitAtEnd = () => {
40610 + insertBlocksAfter((0,external_wp_blocks_namespaceObject.createBlock)((0,external_wp_blocks_namespaceObject.getDefaultBlockName)()));
40611 + };
40612 + const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)({
40613 + className: dist_clsx({
40614 + [`has-text-align-${textAlign}`]: textAlign
40615 + })
40616 + });
40617 + const blockEditingMode = (0,external_wp_blockEditor_namespaceObject.useBlockEditingMode)();
40618 + const dropdownMenuProps = useToolsPanelDropdownMenuProps();
40619 + let titleElement = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(TagName, { ...blockProps, children: (0,external_wp_i18n_namespaceObject.__)("Title") });
40620 + if (postType && postId) {
40621 + titleElement = userCanEdit ? /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
40622 + external_wp_blockEditor_namespaceObject.PlainText,
40623 + {
40624 + tagName: TagName,
40625 + placeholder: (0,external_wp_i18n_namespaceObject.__)("No title"),
40626 + value: rawTitle,
40627 + onChange: setTitle,
40628 + __experimentalVersion: 2,
40629 + __unstableOnSplitAtEnd: onSplitAtEnd,
40630 + ...blockProps
40631 + }
40632 + ) : /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
40633 + TagName,
40634 + {
40635 + ...blockProps,
40636 + dangerouslySetInnerHTML: { __html: fullTitle?.rendered }
40637 + }
40638 + );
40639 + }
40640 + if (isLink && postType && postId) {
40641 + titleElement = userCanEdit ? /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(TagName, { ...blockProps, children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
40642 + external_wp_blockEditor_namespaceObject.PlainText,
40643 + {
40644 + tagName: "a",
40645 + href: link,
40646 + target: linkTarget,
40647 + rel,
40648 + placeholder: !rawTitle.length ? (0,external_wp_i18n_namespaceObject.__)("No title") : null,
40649 + value: rawTitle,
40650 + onChange: setTitle,
40651 + __experimentalVersion: 2,
40652 + __unstableOnSplitAtEnd: onSplitAtEnd
40653 + }
40654 + ) }) : /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(TagName, { ...blockProps, children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
40655 + "a",
40656 + {
40657 + href: link,
40658 + target: linkTarget,
40659 + rel,
40660 + onClick: (event) => event.preventDefault(),
40661 + dangerouslySetInnerHTML: {
40662 + __html: fullTitle?.rendered
40663 + }
40664 + }
40665 + ) });
40666 + }
40667 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
40668 + blockEditingMode === "default" && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
40669 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_blockEditor_namespaceObject.BlockControls, { group: "block", children: [
40670 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
40671 + external_wp_blockEditor_namespaceObject.HeadingLevelDropdown,
40672 + {
40673 + value: level,
40674 + options: levelOptions,
40675 + onChange: (newLevel) => setAttributes({ level: newLevel })
40676 + }
40677 + ),
40678 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
40679 + external_wp_blockEditor_namespaceObject.AlignmentControl,
40680 + {
40681 + value: textAlign,
40682 + onChange: (nextAlign) => {
40683 + setAttributes({ textAlign: nextAlign });
40684 + }
40685 + }
40686 + )
40687 + ] }),
40688 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(
40689 + external_wp_components_namespaceObject.__experimentalToolsPanel,
40690 + {
40691 + label: (0,external_wp_i18n_namespaceObject.__)("Settings"),
40692 + resetAll: () => {
40693 + setAttributes({
40694 + rel: "",
40695 + linkTarget: "_self",
40696 + isLink: false
40697 + });
40698 + },
40699 + dropdownMenuProps,
40700 + children: [
40701 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
40702 + external_wp_components_namespaceObject.__experimentalToolsPanelItem,
40703 + {
40704 + label: (0,external_wp_i18n_namespaceObject.__)("Make title a link"),
40705 + isShownByDefault: true,
40706 + hasValue: () => isLink,
40707 + onDeselect: () => setAttributes({ isLink: false }),
40708 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
40709 + external_wp_components_namespaceObject.ToggleControl,
40710 + {
40711 + __nextHasNoMarginBottom: true,
40712 + label: (0,external_wp_i18n_namespaceObject.__)("Make title a link"),
40713 + onChange: () => setAttributes({ isLink: !isLink }),
40714 + checked: isLink
40715 + }
40716 + )
40717 + }
40718 + ),
40719 + isLink && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
40720 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
40721 + external_wp_components_namespaceObject.__experimentalToolsPanelItem,
40722 + {
40723 + label: (0,external_wp_i18n_namespaceObject.__)("Open in new tab"),
40724 + isShownByDefault: true,
40725 + hasValue: () => linkTarget === "_blank",
40726 + onDeselect: () => setAttributes({
40727 + linkTarget: "_self"
40728 + }),
40729 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
40730 + external_wp_components_namespaceObject.ToggleControl,
40731 + {
40732 + __nextHasNoMarginBottom: true,
40733 + label: (0,external_wp_i18n_namespaceObject.__)("Open in new tab"),
40734 + onChange: (value) => setAttributes({
40735 + linkTarget: value ? "_blank" : "_self"
40736 + }),
40737 + checked: linkTarget === "_blank"
40738 + }
40739 + )
40740 + }
40741 + ),
40742 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
40743 + external_wp_components_namespaceObject.__experimentalToolsPanelItem,
40744 + {
40745 + label: (0,external_wp_i18n_namespaceObject.__)("Link relation"),
40746 + isShownByDefault: true,
40747 + hasValue: () => !!rel,
40748 + onDeselect: () => setAttributes({ rel: "" }),
40749 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
40750 + external_wp_components_namespaceObject.TextControl,
40751 + {
40752 + __next40pxDefaultSize: true,
40753 + __nextHasNoMarginBottom: true,
40754 + label: (0,external_wp_i18n_namespaceObject.__)("Link relation"),
40755 + help: (0,external_wp_element_namespaceObject.createInterpolateElement)(
40756 + (0,external_wp_i18n_namespaceObject.__)(
40757 + "The <a>Link Relation</a> attribute defines the relationship between a linked resource and the current document."
40758 + ),
40759 + {
40760 + a: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ExternalLink, { href: "https://developer.mozilla.org/docs/Web/HTML/Attributes/rel" })
40761 + }
40762 + ),
40763 + value: rel,
40764 + onChange: (newRel) => setAttributes({ rel: newRel })
40765 + }
40766 + )
40767 + }
40768 + )
40769 + ] })
40770 + ]
40771 + }
40772 + ) })
40773 + ] }),
40774 + titleElement
40775 + ] });
40776 + }
40777 +
40778 +
40779 + ;// ./node_modules/@wordpress/block-library/build-module/post-title/deprecated.js
40780 +
40781 + const post_title_deprecated_v1 = {
40782 + attributes: {
40783 + textAlign: {
40784 + type: "string"
40785 + },
40786 + level: {
40787 + type: "number",
40788 + default: 2
40789 + },
40790 + isLink: {
40791 + type: "boolean",
40792 + default: false
40793 + },
40794 + rel: {
40795 + type: "string",
40796 + attribute: "rel",
40797 + default: ""
40798 + },
40799 + linkTarget: {
40800 + type: "string",
40801 + default: "_self"
40802 + }
40803 + },
40804 + supports: {
40805 + align: ["wide", "full"],
40806 + html: false,
40807 + color: {
40808 + gradients: true,
40809 + link: true
40810 + },
40811 + spacing: {
40812 + margin: true
40813 + },
40814 + typography: {
40815 + fontSize: true,
40816 + lineHeight: true,
40817 + __experimentalFontFamily: true,
40818 + __experimentalFontWeight: true,
40819 + __experimentalFontStyle: true,
40820 + __experimentalTextTransform: true
40821 + }
40822 + },
40823 + save() {
40824 + return null;
40825 + },
40826 + migrate: migrate_font_family_default,
40827 + isEligible({ style }) {
40828 + return style?.typography?.fontFamily;
40829 + }
40830 + };
40831 + var post_title_deprecated_deprecated_default = [post_title_deprecated_v1];
40832 +
40833 +
40834 + ;// ./node_modules/@wordpress/block-library/build-module/post-title/index.js
40835 +
40836 +
40837 +
40838 +
40839 +
40840 + const { name: post_title_name } = post_title_block_namespaceObject;
40841 + const post_title_settings = {
40842 + icon: title_default,
40843 + edit: PostTitleEdit,
40844 + deprecated: post_title_deprecated_deprecated_default
40845 + };
40846 + const post_title_init = () => initBlock({ name: post_title_name, metadata: post_title_block_namespaceObject, settings: post_title_settings });
40847 +
40848 +
40849 + ;// ./node_modules/@wordpress/icons/build-module/library/preformatted.js
40850 +
40851 +
40852 + var preformatted_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M18 4H6c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm.5 14c0 .3-.2.5-.5.5H6c-.3 0-.5-.2-.5-.5V6c0-.3.2-.5.5-.5h12c.3 0 .5.2.5.5v12zM7 16.5h6V15H7v1.5zm4-4h6V11h-6v1.5zM9 11H7v1.5h2V11zm6 5.5h2V15h-2v1.5z" }) });
40853 +
40854 +
40855 + ;// ./node_modules/@wordpress/block-library/build-module/preformatted/edit.js
40856 +
40857 +
40858 +
40859 +
40860 + function PreformattedEdit({
40861 + attributes,
40862 + mergeBlocks,
40863 + setAttributes,
40864 + onRemove,
40865 + insertBlocksAfter,
40866 + style
40867 + }) {
40868 + const { content } = attributes;
40869 + const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)({ style });
40870 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
40871 + external_wp_blockEditor_namespaceObject.RichText,
40872 + {
40873 + tagName: "pre",
40874 + identifier: "content",
40875 + preserveWhiteSpace: true,
40876 + value: content,
40877 + onChange: (nextContent) => {
40878 + setAttributes({
40879 + content: nextContent
40880 + });
40881 + },
40882 + onRemove,
40883 + "aria-label": (0,external_wp_i18n_namespaceObject.__)("Preformatted text"),
40884 + placeholder: (0,external_wp_i18n_namespaceObject.__)("Write preformatted text\u2026"),
40885 + onMerge: mergeBlocks,
40886 + ...blockProps,
40887 + __unstablePastePlainText: true,
40888 + __unstableOnSplitAtDoubleLineEnd: () => insertBlocksAfter((0,external_wp_blocks_namespaceObject.createBlock)((0,external_wp_blocks_namespaceObject.getDefaultBlockName)()))
40889 + }
40890 + );
40891 + }
40892 +
40893 +
40894 + ;// ./node_modules/@wordpress/block-library/build-module/preformatted/block.json
40895 + const preformatted_block_namespaceObject = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/preformatted","title":"Preformatted","category":"text","description":"Add text that respects your spacing and tabs, and also allows styling.","textdomain":"default","attributes":{"content":{"type":"rich-text","source":"rich-text","selector":"pre","__unstablePreserveWhiteSpace":true,"role":"content"}},"supports":{"anchor":true,"color":{"gradients":true,"__experimentalDefaultControls":{"background":true,"text":true}},"spacing":{"padding":true,"margin":true},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"interactivity":{"clientNavigation":true},"__experimentalBorder":{"radius":true,"color":true,"width":true,"style":true,"__experimentalDefaultControls":{"radius":true,"color":true,"width":true,"style":true}}},"style":"wp-block-preformatted"}');
40896 + ;// ./node_modules/@wordpress/block-library/build-module/preformatted/save.js
40897 +
40898 +
40899 + function preformatted_save_save({ attributes }) {
40900 + const { content } = attributes;
40901 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("pre", { ...external_wp_blockEditor_namespaceObject.useBlockProps.save(), children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichText.Content, { value: content }) });
40902 + }
40903 +
40904 +
40905 + ;// ./node_modules/@wordpress/block-library/build-module/preformatted/transforms.js
40906 +
40907 + const preformatted_transforms_transforms = {
40908 + from: [
40909 + {
40910 + type: "block",
40911 + blocks: ["core/code", "core/paragraph", "core/verse"],
40912 + transform: ({ content, anchor }) => (0,external_wp_blocks_namespaceObject.createBlock)("core/preformatted", {
40913 + content,
40914 + anchor
40915 + })
40916 + },
40917 + {
40918 + type: "raw",
40919 + isMatch: (node) => node.nodeName === "PRE" && !(node.children.length === 1 && node.firstChild.nodeName === "CODE"),
40920 + schema: ({ phrasingContentSchema }) => ({
40921 + pre: {
40922 + children: phrasingContentSchema
40923 + }
40924 + })
40925 + }
40926 + ],
40927 + to: [
40928 + {
40929 + type: "block",
40930 + blocks: ["core/paragraph"],
40931 + transform: (attributes) => (0,external_wp_blocks_namespaceObject.createBlock)("core/paragraph", attributes)
40932 + },
40933 + {
40934 + type: "block",
40935 + blocks: ["core/code"],
40936 + transform: (attributes) => (0,external_wp_blocks_namespaceObject.createBlock)("core/code", attributes)
40937 + },
40938 + {
40939 + type: "block",
40940 + blocks: ["core/verse"],
40941 + transform: (attributes) => (0,external_wp_blocks_namespaceObject.createBlock)("core/verse", attributes)
40942 + }
40943 + ]
40944 + };
40945 + var preformatted_transforms_transforms_default = preformatted_transforms_transforms;
40946 +
40947 +
40948 + ;// ./node_modules/@wordpress/block-library/build-module/preformatted/index.js
40949 +
40950 +
40951 +
40952 +
40953 +
40954 +
40955 +
40956 + const { name: preformatted_name } = preformatted_block_namespaceObject;
40957 + const preformatted_settings = {
40958 + icon: preformatted_default,
40959 + example: {
40960 + attributes: {
40961 + /* eslint-disable @wordpress/i18n-no-collapsible-whitespace */
40962 + // translators: Sample content for the Preformatted block. Can be replaced with a more locale-adequate work.
40963 + content: (0,external_wp_i18n_namespaceObject.__)(
40964 + "EXT. XANADU - FAINT DAWN - 1940 (MINIATURE)\nWindow, very small in the distance, illuminated.\nAll around this is an almost totally black screen. Now, as the camera moves slowly towards the window which is almost a postage stamp in the frame, other forms appear;"
40965 + )
40966 + /* eslint-enable @wordpress/i18n-no-collapsible-whitespace */
40967 + }
40968 + },
40969 + transforms: preformatted_transforms_transforms_default,
40970 + edit: PreformattedEdit,
40971 + save: preformatted_save_save,
40972 + merge(attributes, attributesToMerge) {
40973 + return {
40974 + content: attributes.content + "\n\n" + attributesToMerge.content
40975 + };
40976 + }
40977 + };
40978 + const preformatted_init = () => initBlock({ name: preformatted_name, metadata: preformatted_block_namespaceObject, settings: preformatted_settings });
40979 +
40980 +
40981 + ;// ./node_modules/@wordpress/icons/build-module/library/pullquote.js
40982 +
40983 +
40984 + var pullquote_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M18 8H6c-1.1 0-2 .9-2 2v4c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2v-4c0-1.1-.9-2-2-2zm.5 6c0 .3-.2.5-.5.5H6c-.3 0-.5-.2-.5-.5v-4c0-.3.2-.5.5-.5h12c.3 0 .5.2.5.5v4zM4 4v1.5h16V4H4zm0 16h16v-1.5H4V20z" }) });
40985 +
40986 +
40987 + ;// ./node_modules/@wordpress/block-library/build-module/pullquote/shared.js
40988 + const SOLID_COLOR_CLASS = `is-style-solid-color`;
40989 +
40990 +
40991 + ;// ./node_modules/@wordpress/block-library/build-module/pullquote/deprecated.js
40992 +
40993 +
40994 +
40995 +
40996 +
40997 + const pullquote_deprecated_blockAttributes = {
40998 + value: {
40999 + type: "string",
41000 + source: "html",
41001 + selector: "blockquote",
41002 + multiline: "p"
41003 + },
41004 + citation: {
41005 + type: "string",
41006 + source: "html",
41007 + selector: "cite",
41008 + default: ""
41009 + },
41010 + mainColor: {
41011 + type: "string"
41012 + },
41013 + customMainColor: {
41014 + type: "string"
41015 + },
41016 + textColor: {
41017 + type: "string"
41018 + },
41019 + customTextColor: {
41020 + type: "string"
41021 + }
41022 + };
41023 + function parseBorderColor(styleString) {
41024 + if (!styleString) {
41025 + return;
41026 + }
41027 + const matches = styleString.match(/border-color:([^;]+)[;]?/);
41028 + if (matches && matches[1]) {
41029 + return matches[1];
41030 + }
41031 + }
41032 + function multilineToInline(value) {
41033 + value = value || `<p></p>`;
41034 + const padded = `</p>${value}<p>`;
41035 + const values = padded.split(`</p><p>`);
41036 + values.shift();
41037 + values.pop();
41038 + return values.join("<br>");
41039 + }
41040 + const pullquote_deprecated_v5 = {
41041 + attributes: {
41042 + value: {
41043 + type: "string",
41044 + source: "html",
41045 + selector: "blockquote",
41046 + multiline: "p",
41047 + role: "content"
41048 + },
41049 + citation: {
41050 + type: "string",
41051 + source: "html",
41052 + selector: "cite",
41053 + default: "",
41054 + role: "content"
41055 + },
41056 + textAlign: {
41057 + type: "string"
41058 + }
41059 + },
41060 + save({ attributes }) {
41061 + const { textAlign, citation, value } = attributes;
41062 + const shouldShowCitation = !external_wp_blockEditor_namespaceObject.RichText.isEmpty(citation);
41063 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
41064 + "figure",
41065 + {
41066 + ...external_wp_blockEditor_namespaceObject.useBlockProps.save({
41067 + className: dist_clsx({
41068 + [`has-text-align-${textAlign}`]: textAlign
41069 + })
41070 + }),
41071 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("blockquote", { children: [
41072 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichText.Content, { value, multiline: true }),
41073 + shouldShowCitation && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichText.Content, { tagName: "cite", value: citation })
41074 + ] })
41075 + }
41076 + );
41077 + },
41078 + migrate({ value, ...attributes }) {
41079 + return {
41080 + value: multilineToInline(value),
41081 + ...attributes
41082 + };
41083 + }
41084 + };
41085 + const pullquote_deprecated_v4 = {
41086 + attributes: {
41087 + ...pullquote_deprecated_blockAttributes
41088 + },
41089 + save({ attributes }) {
41090 + const {
41091 + mainColor,
41092 + customMainColor,
41093 + customTextColor,
41094 + textColor,
41095 + value,
41096 + citation,
41097 + className
41098 + } = attributes;
41099 + const isSolidColorStyle = className?.includes(SOLID_COLOR_CLASS);
41100 + let figureClasses, figureStyles;
41101 + if (isSolidColorStyle) {
41102 + const backgroundClass = (0,external_wp_blockEditor_namespaceObject.getColorClassName)(
41103 + "background-color",
41104 + mainColor
41105 + );
41106 + figureClasses = dist_clsx({
41107 + "has-background": backgroundClass || customMainColor,
41108 + [backgroundClass]: backgroundClass
41109 + });
41110 + figureStyles = {
41111 + backgroundColor: backgroundClass ? void 0 : customMainColor
41112 + };
41113 + } else if (customMainColor) {
41114 + figureStyles = {
41115 + borderColor: customMainColor
41116 + };
41117 + }
41118 + const blockquoteTextColorClass = (0,external_wp_blockEditor_namespaceObject.getColorClassName)(
41119 + "color",
41120 + textColor
41121 + );
41122 + const blockquoteClasses = dist_clsx({
41123 + "has-text-color": textColor || customTextColor,
41124 + [blockquoteTextColorClass]: blockquoteTextColorClass
41125 + });
41126 + const blockquoteStyles = blockquoteTextColorClass ? void 0 : { color: customTextColor };
41127 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
41128 + "figure",
41129 + {
41130 + ...external_wp_blockEditor_namespaceObject.useBlockProps.save({
41131 + className: figureClasses,
41132 + style: figureStyles
41133 + }),
41134 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(
41135 + "blockquote",
41136 + {
41137 + className: blockquoteClasses,
41138 + style: blockquoteStyles,
41139 + children: [
41140 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichText.Content, { value, multiline: true }),
41141 + !external_wp_blockEditor_namespaceObject.RichText.isEmpty(citation) && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichText.Content, { tagName: "cite", value: citation })
41142 + ]
41143 + }
41144 + )
41145 + }
41146 + );
41147 + },
41148 + migrate({
41149 + value,
41150 + className,
41151 + mainColor,
41152 + customMainColor,
41153 + customTextColor,
41154 + ...attributes
41155 + }) {
41156 + const isSolidColorStyle = className?.includes(SOLID_COLOR_CLASS);
41157 + let style;
41158 + if (customMainColor) {
41159 + if (!isSolidColorStyle) {
41160 + style = {
41161 + border: {
41162 + color: customMainColor
41163 + }
41164 + };
41165 + } else {
41166 + style = {
41167 + color: {
41168 + background: customMainColor
41169 + }
41170 + };
41171 + }
41172 + }
41173 + if (customTextColor && style) {
41174 + style.color = {
41175 + ...style.color,
41176 + text: customTextColor
41177 + };
41178 + }
41179 + return {
41180 + value: multilineToInline(value),
41181 + className,
41182 + backgroundColor: isSolidColorStyle ? mainColor : void 0,
41183 + borderColor: isSolidColorStyle ? void 0 : mainColor,
41184 + textAlign: isSolidColorStyle ? "left" : void 0,
41185 + style,
41186 + ...attributes
41187 + };
41188 + }
41189 + };
41190 + const pullquote_deprecated_v3 = {
41191 + attributes: {
41192 + ...pullquote_deprecated_blockAttributes,
41193 + // figureStyle is an attribute that never existed.
41194 + // We are using it as a way to access the styles previously applied to the figure.
41195 + figureStyle: {
41196 + source: "attribute",
41197 + selector: "figure",
41198 + attribute: "style"
41199 + }
41200 + },
41201 + save({ attributes }) {
41202 + const {
41203 + mainColor,
41204 + customMainColor,
41205 + textColor,
41206 + customTextColor,
41207 + value,
41208 + citation,
41209 + className,
41210 + figureStyle
41211 + } = attributes;
41212 + const isSolidColorStyle = className?.includes(SOLID_COLOR_CLASS);
41213 + let figureClasses, figureStyles;
41214 + if (isSolidColorStyle) {
41215 + const backgroundClass = (0,external_wp_blockEditor_namespaceObject.getColorClassName)(
41216 + "background-color",
41217 + mainColor
41218 + );
41219 + figureClasses = dist_clsx({
41220 + "has-background": backgroundClass || customMainColor,
41221 + [backgroundClass]: backgroundClass
41222 + });
41223 + figureStyles = {
41224 + backgroundColor: backgroundClass ? void 0 : customMainColor
41225 + };
41226 + } else if (customMainColor) {
41227 + figureStyles = {
41228 + borderColor: customMainColor
41229 + };
41230 + } else if (mainColor) {
41231 + const borderColor = parseBorderColor(figureStyle);
41232 + figureStyles = {
41233 + borderColor
41234 + };
41235 + }
41236 + const blockquoteTextColorClass = (0,external_wp_blockEditor_namespaceObject.getColorClassName)(
41237 + "color",
41238 + textColor
41239 + );
41240 + const blockquoteClasses = (textColor || customTextColor) && dist_clsx("has-text-color", {
41241 + [blockquoteTextColorClass]: blockquoteTextColorClass
41242 + });
41243 + const blockquoteStyles = blockquoteTextColorClass ? void 0 : { color: customTextColor };
41244 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("figure", { className: figureClasses, style: figureStyles, children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(
41245 + "blockquote",
41246 + {
41247 + className: blockquoteClasses,
41248 + style: blockquoteStyles,
41249 + children: [
41250 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichText.Content, { value, multiline: true }),
41251 + !external_wp_blockEditor_namespaceObject.RichText.isEmpty(citation) && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichText.Content, { tagName: "cite", value: citation })
41252 + ]
41253 + }
41254 + ) });
41255 + },
41256 + migrate({
41257 + value,
41258 + className,
41259 + figureStyle,
41260 + mainColor,
41261 + customMainColor,
41262 + customTextColor,
41263 + ...attributes
41264 + }) {
41265 + const isSolidColorStyle = className?.includes(SOLID_COLOR_CLASS);
41266 + let style;
41267 + if (customMainColor) {
41268 + if (!isSolidColorStyle) {
41269 + style = {
41270 + border: {
41271 + color: customMainColor
41272 + }
41273 + };
41274 + } else {
41275 + style = {
41276 + color: {
41277 + background: customMainColor
41278 + }
41279 + };
41280 + }
41281 + }
41282 + if (customTextColor && style) {
41283 + style.color = {
41284 + ...style.color,
41285 + text: customTextColor
41286 + };
41287 + }
41288 + if (!isSolidColorStyle && mainColor && figureStyle) {
41289 + const borderColor = parseBorderColor(figureStyle);
41290 + if (borderColor) {
41291 + return {
41292 + value: multilineToInline(value),
41293 + ...attributes,
41294 + className,
41295 + // Block supports: Set style.border.color if a deprecated block has `mainColor`, inline border CSS and is not a solid color style.
41296 + style: {
41297 + border: {
41298 + color: borderColor
41299 + }
41300 + }
41301 + };
41302 + }
41303 + }
41304 + return {
41305 + value: multilineToInline(value),
41306 + className,
41307 + backgroundColor: isSolidColorStyle ? mainColor : void 0,
41308 + borderColor: isSolidColorStyle ? void 0 : mainColor,
41309 + textAlign: isSolidColorStyle ? "left" : void 0,
41310 + style,
41311 + ...attributes
41312 + };
41313 + }
41314 + };
41315 + const pullquote_deprecated_v2 = {
41316 + attributes: pullquote_deprecated_blockAttributes,
41317 + save({ attributes }) {
41318 + const {
41319 + mainColor,
41320 + customMainColor,
41321 + textColor,
41322 + customTextColor,
41323 + value,
41324 + citation,
41325 + className
41326 + } = attributes;
41327 + const isSolidColorStyle = className?.includes(SOLID_COLOR_CLASS);
41328 + let figureClass, figureStyles;
41329 + if (isSolidColorStyle) {
41330 + figureClass = (0,external_wp_blockEditor_namespaceObject.getColorClassName)("background-color", mainColor);
41331 + if (!figureClass) {
41332 + figureStyles = {
41333 + backgroundColor: customMainColor
41334 + };
41335 + }
41336 + } else if (customMainColor) {
41337 + figureStyles = {
41338 + borderColor: customMainColor
41339 + };
41340 + } else if (mainColor) {
41341 + const colors = (0,external_wp_data_namespaceObject.select)(external_wp_blockEditor_namespaceObject.store).getSettings().colors ?? [];
41342 + const colorObject = (0,external_wp_blockEditor_namespaceObject.getColorObjectByAttributeValues)(
41343 + colors,
41344 + mainColor
41345 + );
41346 + figureStyles = {
41347 + borderColor: colorObject.color
41348 + };
41349 + }
41350 + const blockquoteTextColorClass = (0,external_wp_blockEditor_namespaceObject.getColorClassName)(
41351 + "color",
41352 + textColor
41353 + );
41354 + const blockquoteClasses = textColor || customTextColor ? dist_clsx("has-text-color", {
41355 + [blockquoteTextColorClass]: blockquoteTextColorClass
41356 + }) : void 0;
41357 + const blockquoteStyle = blockquoteTextColorClass ? void 0 : { color: customTextColor };
41358 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("figure", { className: figureClass, style: figureStyles, children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(
41359 + "blockquote",
41360 + {
41361 + className: blockquoteClasses,
41362 + style: blockquoteStyle,
41363 + children: [
41364 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichText.Content, { value, multiline: true }),
41365 + !external_wp_blockEditor_namespaceObject.RichText.isEmpty(citation) && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichText.Content, { tagName: "cite", value: citation })
41366 + ]
41367 + }
41368 + ) });
41369 + },
41370 + migrate({
41371 + value,
41372 + className,
41373 + mainColor,
41374 + customMainColor,
41375 + customTextColor,
41376 + ...attributes
41377 + }) {
41378 + const isSolidColorStyle = className?.includes(SOLID_COLOR_CLASS);
41379 + let style = {};
41380 + if (customMainColor) {
41381 + if (!isSolidColorStyle) {
41382 + style = {
41383 + border: {
41384 + color: customMainColor
41385 + }
41386 + };
41387 + } else {
41388 + style = {
41389 + color: {
41390 + background: customMainColor
41391 + }
41392 + };
41393 + }
41394 + }
41395 + if (customTextColor && style) {
41396 + style.color = {
41397 + ...style.color,
41398 + text: customTextColor
41399 + };
41400 + }
41401 + return {
41402 + value: multilineToInline(value),
41403 + className,
41404 + backgroundColor: isSolidColorStyle ? mainColor : void 0,
41405 + borderColor: isSolidColorStyle ? void 0 : mainColor,
41406 + textAlign: isSolidColorStyle ? "left" : void 0,
41407 + style,
41408 + ...attributes
41409 + };
41410 + }
41411 + };
41412 + const pullquote_deprecated_v1 = {
41413 + attributes: {
41414 + ...pullquote_deprecated_blockAttributes
41415 + },
41416 + save({ attributes }) {
41417 + const { value, citation } = attributes;
41418 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("blockquote", { children: [
41419 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichText.Content, { value, multiline: true }),
41420 + !external_wp_blockEditor_namespaceObject.RichText.isEmpty(citation) && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichText.Content, { tagName: "cite", value: citation })
41421 + ] });
41422 + },
41423 + migrate({ value, ...attributes }) {
41424 + return {
41425 + value: multilineToInline(value),
41426 + ...attributes
41427 + };
41428 + }
41429 + };
41430 + const deprecated_v0 = {
41431 + attributes: {
41432 + ...pullquote_deprecated_blockAttributes,
41433 + citation: {
41434 + type: "string",
41435 + source: "html",
41436 + selector: "footer"
41437 + },
41438 + align: {
41439 + type: "string",
41440 + default: "none"
41441 + }
41442 + },
41443 + save({ attributes }) {
41444 + const { value, citation, align } = attributes;
41445 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("blockquote", { className: `align${align}`, children: [
41446 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichText.Content, { value, multiline: true }),
41447 + !external_wp_blockEditor_namespaceObject.RichText.isEmpty(citation) && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichText.Content, { tagName: "footer", value: citation })
41448 + ] });
41449 + },
41450 + migrate({ value, ...attributes }) {
41451 + return {
41452 + value: multilineToInline(value),
41453 + ...attributes
41454 + };
41455 + }
41456 + };
41457 + var pullquote_deprecated_deprecated_default = [pullquote_deprecated_v5, pullquote_deprecated_v4, pullquote_deprecated_v3, pullquote_deprecated_v2, pullquote_deprecated_v1, deprecated_v0];
41458 +
41459 +
41460 + ;// ./node_modules/@wordpress/block-library/build-module/pullquote/figure.js
41461 + const Figure = "figure";
41462 +
41463 +
41464 + ;// ./node_modules/@wordpress/block-library/build-module/pullquote/blockquote.js
41465 + const BlockQuote = "blockquote";
41466 +
41467 +
41468 + ;// ./node_modules/@wordpress/block-library/build-module/pullquote/edit.js
41469 +
41470 +
41471 +
41472 +
41473 +
41474 +
41475 +
41476 +
41477 + const isWebPlatform = external_wp_element_namespaceObject.Platform.OS === "web";
41478 + function PullQuoteEdit({
41479 + attributes,
41480 + setAttributes,
41481 + isSelected,
41482 + insertBlocksAfter
41483 + }) {
41484 + const { textAlign, citation, value } = attributes;
41485 + const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)({
41486 + className: dist_clsx({
41487 + [`has-text-align-${textAlign}`]: textAlign
41488 + })
41489 + });
41490 + const shouldShowCitation = !external_wp_blockEditor_namespaceObject.RichText.isEmpty(citation) || isSelected;
41491 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
41492 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockControls, { group: "block", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
41493 + external_wp_blockEditor_namespaceObject.AlignmentControl,
41494 + {
41495 + value: textAlign,
41496 + onChange: (nextAlign) => {
41497 + setAttributes({ textAlign: nextAlign });
41498 + }
41499 + }
41500 + ) }),
41501 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(Figure, { ...blockProps, children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(BlockQuote, { children: [
41502 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
41503 + external_wp_blockEditor_namespaceObject.RichText,
41504 + {
41505 + identifier: "value",
41506 + tagName: "p",
41507 + value,
41508 + onChange: (nextValue) => setAttributes({
41509 + value: nextValue
41510 + }),
41511 + "aria-label": (0,external_wp_i18n_namespaceObject.__)("Pullquote text"),
41512 + placeholder: (
41513 + // translators: placeholder text used for the quote
41514 + (0,external_wp_i18n_namespaceObject.__)("Add quote")
41515 + ),
41516 + textAlign: "center"
41517 + }
41518 + ),
41519 + shouldShowCitation && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
41520 + external_wp_blockEditor_namespaceObject.RichText,
41521 + {
41522 + identifier: "citation",
41523 + tagName: isWebPlatform ? "cite" : void 0,
41524 + style: { display: "block" },
41525 + value: citation,
41526 + "aria-label": (0,external_wp_i18n_namespaceObject.__)("Pullquote citation text"),
41527 + placeholder: (
41528 + // translators: placeholder text used for the citation
41529 + (0,external_wp_i18n_namespaceObject.__)("Add citation")
41530 + ),
41531 + onChange: (nextCitation) => setAttributes({
41532 + citation: nextCitation
41533 + }),
41534 + className: "wp-block-pullquote__citation",
41535 + __unstableMobileNoFocusOnMount: true,
41536 + textAlign: "center",
41537 + __unstableOnSplitAtEnd: () => insertBlocksAfter(
41538 + (0,external_wp_blocks_namespaceObject.createBlock)((0,external_wp_blocks_namespaceObject.getDefaultBlockName)())
41539 + )
41540 + }
41541 + )
41542 + ] }) })
41543 + ] });
41544 + }
41545 + var pullquote_edit_edit_default = PullQuoteEdit;
41546 +
41547 +
41548 + ;// ./node_modules/@wordpress/block-library/build-module/pullquote/block.json
41549 + const pullquote_block_namespaceObject = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/pullquote","title":"Pullquote","category":"text","description":"Give special visual emphasis to a quote from your text.","textdomain":"default","attributes":{"value":{"type":"rich-text","source":"rich-text","selector":"p","role":"content"},"citation":{"type":"rich-text","source":"rich-text","selector":"cite","role":"content"},"textAlign":{"type":"string"}},"supports":{"anchor":true,"align":["left","right","wide","full"],"background":{"backgroundImage":true,"backgroundSize":true,"__experimentalDefaultControls":{"backgroundImage":true}},"color":{"gradients":true,"background":true,"link":true,"__experimentalDefaultControls":{"background":true,"text":true}},"dimensions":{"minHeight":true,"__experimentalDefaultControls":{"minHeight":false}},"spacing":{"margin":true,"padding":true},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"__experimentalBorder":{"color":true,"radius":true,"style":true,"width":true,"__experimentalDefaultControls":{"color":true,"radius":true,"style":true,"width":true}},"__experimentalStyle":{"typography":{"fontSize":"1.5em","lineHeight":"1.6"}},"interactivity":{"clientNavigation":true}},"editorStyle":"wp-block-pullquote-editor","style":"wp-block-pullquote"}');
41550 + ;// ./node_modules/@wordpress/block-library/build-module/pullquote/save.js
41551 +
41552 +
41553 +
41554 + function pullquote_save_save({ attributes }) {
41555 + const { textAlign, citation, value } = attributes;
41556 + const shouldShowCitation = !external_wp_blockEditor_namespaceObject.RichText.isEmpty(citation);
41557 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
41558 + "figure",
41559 + {
41560 + ...external_wp_blockEditor_namespaceObject.useBlockProps.save({
41561 + className: dist_clsx({
41562 + [`has-text-align-${textAlign}`]: textAlign
41563 + })
41564 + }),
41565 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("blockquote", { children: [
41566 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichText.Content, { tagName: "p", value }),
41567 + shouldShowCitation && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichText.Content, { tagName: "cite", value: citation })
41568 + ] })
41569 + }
41570 + );
41571 + }
41572 +
41573 +
41574 + ;// ./node_modules/@wordpress/block-library/build-module/pullquote/transforms.js
41575 +
41576 +
41577 + const pullquote_transforms_transforms = {
41578 + from: [
41579 + {
41580 + type: "block",
41581 + isMultiBlock: true,
41582 + blocks: ["core/paragraph"],
41583 + transform: (attributes) => {
41584 + return (0,external_wp_blocks_namespaceObject.createBlock)("core/pullquote", {
41585 + value: (0,external_wp_richText_namespaceObject.toHTMLString)({
41586 + value: (0,external_wp_richText_namespaceObject.join)(
41587 + attributes.map(
41588 + ({ content }) => (0,external_wp_richText_namespaceObject.create)({ html: content })
41589 + ),
41590 + "\n"
41591 + )
41592 + }),
41593 + anchor: attributes.anchor
41594 + });
41595 + }
41596 + },
41597 + {
41598 + type: "block",
41599 + blocks: ["core/heading"],
41600 + transform: ({ content, anchor }) => {
41601 + return (0,external_wp_blocks_namespaceObject.createBlock)("core/pullquote", {
41602 + value: content,
41603 + anchor
41604 + });
41605 + }
41606 + }
41607 + ],
41608 + to: [
41609 + {
41610 + type: "block",
41611 + blocks: ["core/paragraph"],
41612 + transform: ({ value, citation }) => {
41613 + const paragraphs = [];
41614 + if (value) {
41615 + paragraphs.push(
41616 + (0,external_wp_blocks_namespaceObject.createBlock)("core/paragraph", {
41617 + content: value
41618 + })
41619 + );
41620 + }
41621 + if (citation) {
41622 + paragraphs.push(
41623 + (0,external_wp_blocks_namespaceObject.createBlock)("core/paragraph", {
41624 + content: citation
41625 + })
41626 + );
41627 + }
41628 + if (paragraphs.length === 0) {
41629 + return (0,external_wp_blocks_namespaceObject.createBlock)("core/paragraph", {
41630 + content: ""
41631 + });
41632 + }
41633 + return paragraphs;
41634 + }
41635 + },
41636 + {
41637 + type: "block",
41638 + blocks: ["core/heading"],
41639 + transform: ({ value, citation }) => {
41640 + if (!value) {
41641 + return (0,external_wp_blocks_namespaceObject.createBlock)("core/heading", {
41642 + content: citation
41643 + });
41644 + }
41645 + const headingBlock = (0,external_wp_blocks_namespaceObject.createBlock)("core/heading", {
41646 + content: value
41647 + });
41648 + if (!citation) {
41649 + return headingBlock;
41650 + }
41651 + return [
41652 + headingBlock,
41653 + (0,external_wp_blocks_namespaceObject.createBlock)("core/heading", {
41654 + content: citation
41655 + })
41656 + ];
41657 + }
41658 + }
41659 + ]
41660 + };
41661 + var pullquote_transforms_transforms_default = pullquote_transforms_transforms;
41662 +
41663 +
41664 + ;// ./node_modules/@wordpress/block-library/build-module/pullquote/index.js
41665 +
41666 +
41667 +
41668 +
41669 +
41670 +
41671 +
41672 +
41673 + const { name: pullquote_name } = pullquote_block_namespaceObject;
41674 + const pullquote_settings = {
41675 + icon: pullquote_default,
41676 + example: {
41677 + attributes: {
41678 + value: (
41679 + // translators: Quote serving as example for the Pullquote block. Attributed to Matt Mullenweg.
41680 + (0,external_wp_i18n_namespaceObject.__)(
41681 + "One of the hardest things to do in technology is disrupt yourself."
41682 + )
41683 + ),
41684 + citation: (0,external_wp_i18n_namespaceObject.__)("Matt Mullenweg")
41685 + }
41686 + },
41687 + transforms: pullquote_transforms_transforms_default,
41688 + edit: pullquote_edit_edit_default,
41689 + save: pullquote_save_save,
41690 + deprecated: pullquote_deprecated_deprecated_default
41691 + };
41692 + const pullquote_init = () => initBlock({ name: pullquote_name, metadata: pullquote_block_namespaceObject, settings: pullquote_settings });
41693 +
41694 +
41695 + ;// ./node_modules/@wordpress/icons/build-module/library/loop.js
41696 +
41697 +
41698 + var loop_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M18.1823 11.6392C18.1823 13.0804 17.0139 14.2487 15.5727 14.2487C14.3579 14.2487 13.335 13.4179 13.0453 12.2922L13.0377 12.2625L13.0278 12.2335L12.3985 10.377L12.3942 10.3785C11.8571 8.64997 10.246 7.39405 8.33961 7.39405C5.99509 7.39405 4.09448 9.29465 4.09448 11.6392C4.09448 13.9837 5.99509 15.8843 8.33961 15.8843C8.88499 15.8843 9.40822 15.781 9.88943 15.5923L9.29212 14.0697C8.99812 14.185 8.67729 14.2487 8.33961 14.2487C6.89838 14.2487 5.73003 13.0804 5.73003 11.6392C5.73003 10.1979 6.89838 9.02959 8.33961 9.02959C9.55444 9.02959 10.5773 9.86046 10.867 10.9862L10.8772 10.9836L11.4695 12.7311C11.9515 14.546 13.6048 15.8843 15.5727 15.8843C17.9172 15.8843 19.8178 13.9837 19.8178 11.6392C19.8178 9.29465 17.9172 7.39404 15.5727 7.39404C15.0287 7.39404 14.5066 7.4968 14.0264 7.6847L14.6223 9.20781C14.9158 9.093 15.2358 9.02959 15.5727 9.02959C17.0139 9.02959 18.1823 10.1979 18.1823 11.6392Z" }) });
41699 +
41700 +
41701 + ;// ./node_modules/@wordpress/block-library/build-module/query/block.json
41702 + const query_block_namespaceObject = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/query","title":"Query Loop","category":"theme","description":"An advanced block that allows displaying post types based on different query parameters and visual configurations.","keywords":["posts","list","blog","blogs","custom post types"],"textdomain":"default","attributes":{"queryId":{"type":"number"},"query":{"type":"object","default":{"perPage":null,"pages":0,"offset":0,"postType":"post","order":"desc","orderBy":"date","author":"","search":"","exclude":[],"sticky":"","inherit":true,"taxQuery":null,"parents":[],"format":[]}},"tagName":{"type":"string","default":"div"},"namespace":{"type":"string"},"enhancedPagination":{"type":"boolean","default":false}},"usesContext":["templateSlug"],"providesContext":{"queryId":"queryId","query":"query","displayLayout":"displayLayout","enhancedPagination":"enhancedPagination"},"supports":{"align":["wide","full"],"html":false,"layout":true,"interactivity":true,"contentRole":true},"editorStyle":"wp-block-query-editor"}');
41703 + ;// ./node_modules/@wordpress/block-library/build-module/query/utils.js
41704 +
41705 +
41706 +
41707 +
41708 +
41709 +
41710 +
41711 + const getEntitiesInfo = (entities) => {
41712 + const mapping = entities?.reduce(
41713 + (accumulator, entity) => {
41714 + const { mapById, mapByName, names } = accumulator;
41715 + mapById[entity.id] = entity;
41716 + mapByName[entity.name] = entity;
41717 + names.push(entity.name);
41718 + return accumulator;
41719 + },
41720 + { mapById: {}, mapByName: {}, names: [] }
41721 + );
41722 + return {
41723 + entities,
41724 + ...mapping
41725 + };
41726 + };
41727 + const getValueFromObjectPath = (object, path) => {
41728 + const normalizedPath = path.split(".");
41729 + let value = object;
41730 + normalizedPath.forEach((fieldName) => {
41731 + value = value?.[fieldName];
41732 + });
41733 + return value;
41734 + };
41735 + const mapToIHasNameAndId = (entities, path) => {
41736 + return (entities || []).map((entity) => ({
41737 + ...entity,
41738 + name: (0,external_wp_htmlEntities_namespaceObject.decodeEntities)(getValueFromObjectPath(entity, path))
41739 + }));
41740 + };
41741 + const usePostTypes = () => {
41742 + const postTypes = (0,external_wp_data_namespaceObject.useSelect)((select) => {
41743 + const { getPostTypes } = select(external_wp_coreData_namespaceObject.store);
41744 + const excludedPostTypes = ["attachment"];
41745 + const filteredPostTypes = getPostTypes({ per_page: -1 })?.filter(
41746 + ({ viewable, slug }) => viewable && !excludedPostTypes.includes(slug)
41747 + );
41748 + return filteredPostTypes;
41749 + }, []);
41750 + const postTypesTaxonomiesMap = (0,external_wp_element_namespaceObject.useMemo)(() => {
41751 + if (!postTypes?.length) {
41752 + return;
41753 + }
41754 + return postTypes.reduce((accumulator, type) => {
41755 + accumulator[type.slug] = type.taxonomies;
41756 + return accumulator;
41757 + }, {});
41758 + }, [postTypes]);
41759 + const postTypesSelectOptions = (0,external_wp_element_namespaceObject.useMemo)(
41760 + () => (postTypes || []).map(({ labels, slug }) => ({
41761 + label: labels.singular_name,
41762 + value: slug
41763 + })),
41764 + [postTypes]
41765 + );
41766 + const postTypeFormatSupportMap = (0,external_wp_element_namespaceObject.useMemo)(() => {
41767 + if (!postTypes?.length) {
41768 + return {};
41769 + }
41770 + return postTypes.reduce((accumulator, type) => {
41771 + accumulator[type.slug] = type.supports?.["post-formats"] || false;
41772 + return accumulator;
41773 + }, {});
41774 + }, [postTypes]);
41775 + return {
41776 + postTypesTaxonomiesMap,
41777 + postTypesSelectOptions,
41778 + postTypeFormatSupportMap
41779 + };
41780 + };
41781 + const useTaxonomies = (postType) => {
41782 + const taxonomies = (0,external_wp_data_namespaceObject.useSelect)(
41783 + (select) => {
41784 + const { getTaxonomies, getPostType } = select(external_wp_coreData_namespaceObject.store);
41785 + if (getPostType(postType)?.taxonomies?.length > 0) {
41786 + return getTaxonomies({
41787 + type: postType,
41788 + per_page: -1
41789 + });
41790 + }
41791 + return [];
41792 + },
41793 + [postType]
41794 + );
41795 + return (0,external_wp_element_namespaceObject.useMemo)(() => {
41796 + return taxonomies?.filter(
41797 + ({ visibility }) => !!visibility?.publicly_queryable
41798 + );
41799 + }, [taxonomies]);
41800 + };
41801 + function useIsPostTypeHierarchical(postType) {
41802 + return (0,external_wp_data_namespaceObject.useSelect)(
41803 + (select) => {
41804 + const type = select(external_wp_coreData_namespaceObject.store).getPostType(postType);
41805 + return type?.viewable && type?.hierarchical;
41806 + },
41807 + [postType]
41808 + );
41809 + }
41810 + function useOrderByOptions(postType) {
41811 + const supportsCustomOrder = (0,external_wp_data_namespaceObject.useSelect)(
41812 + (select) => {
41813 + const type = select(external_wp_coreData_namespaceObject.store).getPostType(postType);
41814 + return !!type?.supports?.["page-attributes"];
41815 + },
41816 + [postType]
41817 + );
41818 + return (0,external_wp_element_namespaceObject.useMemo)(() => {
41819 + const orderByOptions = [
41820 + {
41821 + label: (0,external_wp_i18n_namespaceObject.__)("Newest to oldest"),
41822 + value: "date/desc"
41823 + },
41824 + {
41825 + label: (0,external_wp_i18n_namespaceObject.__)("Oldest to newest"),
41826 + value: "date/asc"
41827 + },
41828 + {
41829 + /* translators: Label for ordering posts by title in ascending order. */
41830 + label: (0,external_wp_i18n_namespaceObject.__)("A \u2192 Z"),
41831 + value: "title/asc"
41832 + },
41833 + {
41834 + /* translators: Label for ordering posts by title in descending order. */
41835 + label: (0,external_wp_i18n_namespaceObject.__)("Z \u2192 A"),
41836 + value: "title/desc"
41837 + }
41838 + ];
41839 + if (supportsCustomOrder) {
41840 + orderByOptions.push(
41841 + {
41842 + /* translators: Label for ordering posts by ascending menu order. */
41843 + label: (0,external_wp_i18n_namespaceObject.__)("Ascending by order"),
41844 + value: "menu_order/asc"
41845 + },
41846 + {
41847 + /* translators: Label for ordering posts by descending menu order. */
41848 + label: (0,external_wp_i18n_namespaceObject.__)("Descending by order"),
41849 + value: "menu_order/desc"
41850 + }
41851 + );
41852 + }
41853 + return orderByOptions;
41854 + }, [supportsCustomOrder]);
41855 + }
41856 + function useAllowedControls(attributes) {
41857 + return (0,external_wp_data_namespaceObject.useSelect)(
41858 + (select) => select(external_wp_blocks_namespaceObject.store).getActiveBlockVariation(
41859 + "core/query",
41860 + attributes
41861 + )?.allowedControls,
41862 + [attributes]
41863 + );
41864 + }
41865 + function isControlAllowed(allowedControls, key) {
41866 + if (!allowedControls) {
41867 + return true;
41868 + }
41869 + return allowedControls.includes(key);
41870 + }
41871 + const getTransformedBlocksFromPattern = (blocks, queryBlockAttributes) => {
41872 + const {
41873 + query: { postType, inherit },
41874 + namespace
41875 + } = queryBlockAttributes;
41876 + const clonedBlocks = blocks.map((block) => (0,external_wp_blocks_namespaceObject.cloneBlock)(block));
41877 + const queryClientIds = [];
41878 + const blocksQueue = [...clonedBlocks];
41879 + while (blocksQueue.length > 0) {
41880 + const block = blocksQueue.shift();
41881 + if (block.name === "core/query") {
41882 + block.attributes.query = {
41883 + ...block.attributes.query,
41884 + postType,
41885 + inherit
41886 + };
41887 + if (namespace) {
41888 + block.attributes.namespace = namespace;
41889 + }
41890 + queryClientIds.push(block.clientId);
41891 + }
41892 + block.innerBlocks?.forEach((innerBlock) => {
41893 + blocksQueue.push(innerBlock);
41894 + });
41895 + }
41896 + return { newBlocks: clonedBlocks, queryClientIds };
41897 + };
41898 + function useBlockNameForPatterns(clientId, attributes) {
41899 + return (0,external_wp_data_namespaceObject.useSelect)(
41900 + (select) => {
41901 + const activeVariationName = select(
41902 + external_wp_blocks_namespaceObject.store
41903 + ).getActiveBlockVariation("core/query", attributes)?.name;
41904 + if (!activeVariationName) {
41905 + return "core/query";
41906 + }
41907 + const { getBlockRootClientId, getPatternsByBlockTypes } = select(external_wp_blockEditor_namespaceObject.store);
41908 + const rootClientId = getBlockRootClientId(clientId);
41909 + const activePatterns = getPatternsByBlockTypes(
41910 + `core/query/${activeVariationName}`,
41911 + rootClientId
41912 + );
41913 + return activePatterns.length > 0 ? `core/query/${activeVariationName}` : "core/query";
41914 + },
41915 + [clientId, attributes]
41916 + );
41917 + }
41918 + function useScopedBlockVariations(attributes) {
41919 + const { activeVariationName, blockVariations } = (0,external_wp_data_namespaceObject.useSelect)(
41920 + (select) => {
41921 + const { getActiveBlockVariation, getBlockVariations } = select(external_wp_blocks_namespaceObject.store);
41922 + return {
41923 + activeVariationName: getActiveBlockVariation(
41924 + "core/query",
41925 + attributes
41926 + )?.name,
41927 + blockVariations: getBlockVariations("core/query", "block")
41928 + };
41929 + },
41930 + [attributes]
41931 + );
41932 + const variations = (0,external_wp_element_namespaceObject.useMemo)(() => {
41933 + const isNotConnected = (variation) => !variation.attributes?.namespace;
41934 + if (!activeVariationName) {
41935 + return blockVariations.filter(isNotConnected);
41936 + }
41937 + const connectedVariations = blockVariations.filter(
41938 + (variation) => variation.attributes?.namespace?.includes(activeVariationName)
41939 + );
41940 + if (!!connectedVariations.length) {
41941 + return connectedVariations;
41942 + }
41943 + return blockVariations.filter(isNotConnected);
41944 + }, [activeVariationName, blockVariations]);
41945 + return variations;
41946 + }
41947 + const usePatterns = (clientId, name) => {
41948 + return (0,external_wp_data_namespaceObject.useSelect)(
41949 + (select) => {
41950 + const { getBlockRootClientId, getPatternsByBlockTypes } = select(external_wp_blockEditor_namespaceObject.store);
41951 + const rootClientId = getBlockRootClientId(clientId);
41952 + return getPatternsByBlockTypes(name, rootClientId);
41953 + },
41954 + [name, clientId]
41955 + );
41956 + };
41957 + const useUnsupportedBlocks = (clientId) => {
41958 + return (0,external_wp_data_namespaceObject.useSelect)(
41959 + (select) => {
41960 + const { getClientIdsOfDescendants, getBlockName } = select(external_wp_blockEditor_namespaceObject.store);
41961 + return getClientIdsOfDescendants(clientId).some(
41962 + (descendantClientId) => {
41963 + const blockName = getBlockName(descendantClientId);
41964 + const blockSupportsInteractivity = Object.is(
41965 + (0,external_wp_blocks_namespaceObject.getBlockSupport)(blockName, "interactivity"),
41966 + true
41967 + );
41968 + const blockSupportsInteractivityClientNavigation = (0,external_wp_blocks_namespaceObject.getBlockSupport)(
41969 + blockName,
41970 + "interactivity.clientNavigation"
41971 + );
41972 + return !blockSupportsInteractivity && !blockSupportsInteractivityClientNavigation;
41973 + }
41974 + );
41975 + },
41976 + [clientId]
41977 + );
41978 + };
41979 + function getQueryContextFromTemplate(templateSlug) {
41980 + if (!templateSlug) {
41981 + return { isSingular: true };
41982 + }
41983 + let isSingular = false;
41984 + let templateType = templateSlug === "wp" ? "custom" : templateSlug;
41985 + const singularTemplates = ["404", "blank", "single", "page", "custom"];
41986 + const templateTypeFromSlug = templateSlug.includes("-") ? templateSlug.split("-", 1)[0] : templateSlug;
41987 + const queryFromTemplateSlug = templateSlug.includes("-") ? templateSlug.split("-").slice(1).join("-") : "";
41988 + if (queryFromTemplateSlug) {
41989 + templateType = templateTypeFromSlug;
41990 + }
41991 + isSingular = singularTemplates.includes(templateType);
41992 + return { isSingular, templateType };
41993 + }
41994 +
41995 +
41996 + ;// ./node_modules/@wordpress/block-library/build-module/query/edit/inspector-controls/enhanced-pagination-control.js
41997 +
41998 +
41999 +
42000 +
42001 + function EnhancedPaginationControl({
42002 + enhancedPagination,
42003 + setAttributes,
42004 + clientId
42005 + }) {
42006 + const hasUnsupportedBlocks = useUnsupportedBlocks(clientId);
42007 + let help = (0,external_wp_i18n_namespaceObject.__)(
42008 + "Reload the full page\u2014instead of just the posts list\u2014when visitors navigate between pages."
42009 + );
42010 + if (hasUnsupportedBlocks) {
42011 + help = (0,external_wp_i18n_namespaceObject.__)(
42012 + "Enhancement disabled because there are non-compatible blocks inside the Query block."
42013 + );
42014 + }
42015 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
42016 + external_wp_components_namespaceObject.ToggleControl,
42017 + {
42018 + __nextHasNoMarginBottom: true,
42019 + label: (0,external_wp_i18n_namespaceObject.__)("Reload full page"),
42020 + help,
42021 + checked: !enhancedPagination,
42022 + disabled: hasUnsupportedBlocks,
42023 + onChange: (value) => {
42024 + setAttributes({
42025 + enhancedPagination: !value
42026 + });
42027 + }
42028 + }
42029 + ) });
42030 + }
42031 +
42032 +
42033 + ;// ./node_modules/@wordpress/block-library/build-module/query/edit/inspector-controls/order-control.js
42034 +
42035 +
42036 +
42037 + const defaultOrderByOptions = [
42038 + {
42039 + label: (0,external_wp_i18n_namespaceObject.__)("Newest to oldest"),
42040 + value: "date/desc"
42041 + },
42042 + {
42043 + label: (0,external_wp_i18n_namespaceObject.__)("Oldest to newest"),
42044 + value: "date/asc"
42045 + },
42046 + {
42047 + /* translators: Label for ordering posts by title in ascending order. */
42048 + label: (0,external_wp_i18n_namespaceObject.__)("A \u2192 Z"),
42049 + value: "title/asc"
42050 + },
42051 + {
42052 + /* translators: Label for ordering posts by title in descending order. */
42053 + label: (0,external_wp_i18n_namespaceObject.__)("Z \u2192 A"),
42054 + value: "title/desc"
42055 + }
42056 + ];
42057 + function OrderControl({
42058 + order,
42059 + orderBy,
42060 + orderByOptions = defaultOrderByOptions,
42061 + onChange
42062 + }) {
42063 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
42064 + external_wp_components_namespaceObject.SelectControl,
42065 + {
42066 + __nextHasNoMarginBottom: true,
42067 + __next40pxDefaultSize: true,
42068 + label: (0,external_wp_i18n_namespaceObject.__)("Order by"),
42069 + value: `${orderBy}/${order}`,
42070 + options: orderByOptions,
42071 + onChange: (value) => {
42072 + const [newOrderBy, newOrder] = value.split("/");
42073 + onChange({ order: newOrder, orderBy: newOrderBy });
42074 + }
42075 + }
42076 + );
42077 + }
42078 + var order_control_default = OrderControl;
42079 +
42080 +
42081 + ;// ./node_modules/@wordpress/block-library/build-module/query/edit/inspector-controls/author-control.js
42082 +
42083 +
42084 +
42085 +
42086 +
42087 +
42088 + const author_control_AUTHORS_QUERY = {
42089 + who: "authors",
42090 + per_page: -1,
42091 + _fields: "id,name",
42092 + context: "view"
42093 + };
42094 + function AuthorControl({ value, onChange }) {
42095 + const authorsList = (0,external_wp_data_namespaceObject.useSelect)((select) => {
42096 + const { getUsers } = select(external_wp_coreData_namespaceObject.store);
42097 + return getUsers(author_control_AUTHORS_QUERY);
42098 + }, []);
42099 + if (!authorsList) {
42100 + return null;
42101 + }
42102 + const authorsInfo = getEntitiesInfo(authorsList);
42103 + const normalizedValue = !value ? [] : value.toString().split(",");
42104 + const sanitizedValue = normalizedValue.reduce(
42105 + (accumulator, authorId) => {
42106 + const author = authorsInfo.mapById[authorId];
42107 + if (author) {
42108 + accumulator.push({
42109 + id: authorId,
42110 + value: author.name
42111 + });
42112 + }
42113 + return accumulator;
42114 + },
42115 + []
42116 + );
42117 + const getIdByValue = (entitiesMappedByName, authorValue) => {
42118 + const id = authorValue?.id || entitiesMappedByName[authorValue]?.id;
42119 + if (id) {
42120 + return id;
42121 + }
42122 + };
42123 + const onAuthorChange = (newValue) => {
42124 + const ids = Array.from(
42125 + newValue.reduce((accumulator, author) => {
42126 + const id = getIdByValue(authorsInfo.mapByName, author);
42127 + if (id) {
42128 + accumulator.add(id);
42129 + }
42130 + return accumulator;
42131 + }, /* @__PURE__ */ new Set())
42132 + );
42133 + onChange({ author: ids.join(",") });
42134 + };
42135 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
42136 + external_wp_components_namespaceObject.FormTokenField,
42137 + {
42138 + label: (0,external_wp_i18n_namespaceObject.__)("Authors"),
42139 + value: sanitizedValue,
42140 + suggestions: authorsInfo.names,
42141 + onChange: onAuthorChange,
42142 + __experimentalShowHowTo: false,
42143 + __nextHasNoMarginBottom: true,
42144 + __next40pxDefaultSize: true
42145 + }
42146 + );
42147 + }
42148 + var author_control_default = AuthorControl;
42149 +
42150 +
42151 + ;// ./node_modules/@wordpress/block-library/build-module/query/edit/inspector-controls/parent-control.js
42152 +
42153 +
42154 +
42155 +
42156 +
42157 +
42158 +
42159 +
42160 + const parent_control_EMPTY_ARRAY = [];
42161 + const BASE_QUERY = {
42162 + order: "asc",
42163 + _fields: "id,title",
42164 + context: "view"
42165 + };
42166 + function ParentControl({ parents, postType, onChange }) {
42167 + const [search, setSearch] = (0,external_wp_element_namespaceObject.useState)("");
42168 + const [value, setValue] = (0,external_wp_element_namespaceObject.useState)(parent_control_EMPTY_ARRAY);
42169 + const [suggestions, setSuggestions] = (0,external_wp_element_namespaceObject.useState)(parent_control_EMPTY_ARRAY);
42170 + const debouncedSearch = (0,external_wp_compose_namespaceObject.useDebounce)(setSearch, 250);
42171 + const { searchResults, searchHasResolved } = (0,external_wp_data_namespaceObject.useSelect)(
42172 + (select) => {
42173 + if (!search) {
42174 + return { searchResults: parent_control_EMPTY_ARRAY, searchHasResolved: true };
42175 + }
42176 + const { getEntityRecords, hasFinishedResolution } = select(external_wp_coreData_namespaceObject.store);
42177 + const selectorArgs = [
42178 + "postType",
42179 + postType,
42180 + {
42181 + ...BASE_QUERY,
42182 + search,
42183 + orderby: "relevance",
42184 + exclude: parents,
42185 + per_page: 20
42186 + }
42187 + ];
42188 + return {
42189 + searchResults: getEntityRecords(...selectorArgs),
42190 + searchHasResolved: hasFinishedResolution(
42191 + "getEntityRecords",
42192 + selectorArgs
42193 + )
42194 + };
42195 + },
42196 + [search, postType, parents]
42197 + );
42198 + const currentParents = (0,external_wp_data_namespaceObject.useSelect)(
42199 + (select) => {
42200 + if (!parents?.length) {
42201 + return parent_control_EMPTY_ARRAY;
42202 + }
42203 + const { getEntityRecords } = select(external_wp_coreData_namespaceObject.store);
42204 + return getEntityRecords("postType", postType, {
42205 + ...BASE_QUERY,
42206 + include: parents,
42207 + per_page: parents.length
42208 + });
42209 + },
42210 + [parents, postType]
42211 + );
42212 + (0,external_wp_element_namespaceObject.useEffect)(() => {
42213 + if (!parents?.length) {
42214 + setValue(parent_control_EMPTY_ARRAY);
42215 + }
42216 + if (!currentParents?.length) {
42217 + return;
42218 + }
42219 + const currentParentsInfo = getEntitiesInfo(
42220 + mapToIHasNameAndId(currentParents, "title.rendered")
42221 + );
42222 + const sanitizedValue = parents.reduce((accumulator, id) => {
42223 + const entity = currentParentsInfo.mapById[id];
42224 + if (entity) {
42225 + accumulator.push({
42226 + id,
42227 + value: entity.name
42228 + });
42229 + }
42230 + return accumulator;
42231 + }, []);
42232 + setValue(sanitizedValue);
42233 + }, [parents, currentParents]);
42234 + const entitiesInfo = (0,external_wp_element_namespaceObject.useMemo)(() => {
42235 + if (!searchResults?.length) {
42236 + return parent_control_EMPTY_ARRAY;
42237 + }
42238 + return getEntitiesInfo(
42239 + mapToIHasNameAndId(searchResults, "title.rendered")
42240 + );
42241 + }, [searchResults]);
42242 + (0,external_wp_element_namespaceObject.useEffect)(() => {
42243 + if (!searchHasResolved) {
42244 + return;
42245 + }
42246 + setSuggestions(entitiesInfo.names);
42247 + }, [entitiesInfo.names, searchHasResolved]);
42248 + const getIdByValue = (entitiesMappedByName, entity) => {
42249 + const id = entity?.id || entitiesMappedByName?.[entity]?.id;
42250 + if (id) {
42251 + return id;
42252 + }
42253 + };
42254 + const onParentChange = (newValue) => {
42255 + const ids = Array.from(
42256 + newValue.reduce((accumulator, entity) => {
42257 + const id = getIdByValue(entitiesInfo.mapByName, entity);
42258 + if (id) {
42259 + accumulator.add(id);
42260 + }
42261 + return accumulator;
42262 + }, /* @__PURE__ */ new Set())
42263 + );
42264 + setSuggestions(parent_control_EMPTY_ARRAY);
42265 + onChange({ parents: ids });
42266 + };
42267 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
42268 + external_wp_components_namespaceObject.FormTokenField,
42269 + {
42270 + __next40pxDefaultSize: true,
42271 + label: (0,external_wp_i18n_namespaceObject.__)("Parents"),
42272 + value,
42273 + onInputChange: debouncedSearch,
42274 + suggestions,
42275 + onChange: onParentChange,
42276 + __experimentalShowHowTo: false,
42277 + __nextHasNoMarginBottom: true
42278 + }
42279 + );
42280 + }
42281 + var parent_control_default = ParentControl;
42282 +
42283 +
42284 + ;// ./node_modules/@wordpress/block-library/build-module/query/edit/inspector-controls/taxonomy-controls.js
42285 +
42286 +
42287 +
42288 +
42289 +
42290 +
42291 +
42292 +
42293 + const taxonomy_controls_EMPTY_ARRAY = [];
42294 + const taxonomy_controls_BASE_QUERY = {
42295 + order: "asc",
42296 + _fields: "id,name",
42297 + context: "view"
42298 + };
42299 + const getTermIdByTermValue = (terms, termValue) => {
42300 + const termId = termValue?.id || terms?.find((term) => term.name === termValue)?.id;
42301 + if (termId) {
42302 + return termId;
42303 + }
42304 + const termValueLower = termValue.toLocaleLowerCase();
42305 + return terms?.find(
42306 + (term) => term.name.toLocaleLowerCase() === termValueLower
42307 + )?.id;
42308 + };
42309 + function TaxonomyControls({ onChange, query }) {
42310 + const { postType, taxQuery } = query;
42311 + const taxonomies = useTaxonomies(postType);
42312 + if (!taxonomies || taxonomies.length === 0) {
42313 + return null;
42314 + }
42315 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalVStack, { spacing: 4, children: taxonomies.map((taxonomy) => {
42316 + const termIds = taxQuery?.[taxonomy.slug] || [];
42317 + const handleChange = (newTermIds) => onChange({
42318 + taxQuery: {
42319 + ...taxQuery,
42320 + [taxonomy.slug]: newTermIds
42321 + }
42322 + });
42323 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
42324 + TaxonomyItem,
42325 + {
42326 + taxonomy,
42327 + termIds,
42328 + onChange: handleChange
42329 + },
42330 + taxonomy.slug
42331 + );
42332 + }) });
42333 + }
42334 + function TaxonomyItem({ taxonomy, termIds, onChange }) {
42335 + const [search, setSearch] = (0,external_wp_element_namespaceObject.useState)("");
42336 + const [value, setValue] = (0,external_wp_element_namespaceObject.useState)(taxonomy_controls_EMPTY_ARRAY);
42337 + const [suggestions, setSuggestions] = (0,external_wp_element_namespaceObject.useState)(taxonomy_controls_EMPTY_ARRAY);
42338 + const debouncedSearch = (0,external_wp_compose_namespaceObject.useDebounce)(setSearch, 250);
42339 + const { searchResults, searchHasResolved } = (0,external_wp_data_namespaceObject.useSelect)(
42340 + (select) => {
42341 + if (!search) {
42342 + return { searchResults: taxonomy_controls_EMPTY_ARRAY, searchHasResolved: true };
42343 + }
42344 + const { getEntityRecords, hasFinishedResolution } = select(external_wp_coreData_namespaceObject.store);
42345 + const selectorArgs = [
42346 + "taxonomy",
42347 + taxonomy.slug,
42348 + {
42349 + ...taxonomy_controls_BASE_QUERY,
42350 + search,
42351 + orderby: "name",
42352 + exclude: termIds,
42353 + per_page: 20
42354 + }
42355 + ];
42356 + return {
42357 + searchResults: getEntityRecords(...selectorArgs),
42358 + searchHasResolved: hasFinishedResolution(
42359 + "getEntityRecords",
42360 + selectorArgs
42361 + )
42362 + };
42363 + },
42364 + [search, taxonomy.slug, termIds]
42365 + );
42366 + const existingTerms = (0,external_wp_data_namespaceObject.useSelect)(
42367 + (select) => {
42368 + if (!termIds?.length) {
42369 + return taxonomy_controls_EMPTY_ARRAY;
42370 + }
42371 + const { getEntityRecords } = select(external_wp_coreData_namespaceObject.store);
42372 + return getEntityRecords("taxonomy", taxonomy.slug, {
42373 + ...taxonomy_controls_BASE_QUERY,
42374 + include: termIds,
42375 + per_page: termIds.length
42376 + });
42377 + },
42378 + [taxonomy.slug, termIds]
42379 + );
42380 + (0,external_wp_element_namespaceObject.useEffect)(() => {
42381 + if (!termIds?.length) {
42382 + setValue(taxonomy_controls_EMPTY_ARRAY);
42383 + }
42384 + if (!existingTerms?.length) {
42385 + return;
42386 + }
42387 + const sanitizedValue = termIds.reduce((accumulator, id) => {
42388 + const entity = existingTerms.find((term) => term.id === id);
42389 + if (entity) {
42390 + accumulator.push({
42391 + id,
42392 + value: entity.name
42393 + });
42394 + }
42395 + return accumulator;
42396 + }, []);
42397 + setValue(sanitizedValue);
42398 + }, [termIds, existingTerms]);
42399 + (0,external_wp_element_namespaceObject.useEffect)(() => {
42400 + if (!searchHasResolved) {
42401 + return;
42402 + }
42403 + setSuggestions(searchResults.map((result) => result.name));
42404 + }, [searchResults, searchHasResolved]);
42405 + const onTermsChange = (newTermValues) => {
42406 + const newTermIds = /* @__PURE__ */ new Set();
42407 + for (const termValue of newTermValues) {
42408 + const termId = getTermIdByTermValue(searchResults, termValue);
42409 + if (termId) {
42410 + newTermIds.add(termId);
42411 + }
42412 + }
42413 + setSuggestions(taxonomy_controls_EMPTY_ARRAY);
42414 + onChange(Array.from(newTermIds));
42415 + };
42416 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { className: "block-library-query-inspector__taxonomy-control", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
42417 + external_wp_components_namespaceObject.FormTokenField,
42418 + {
42419 + label: taxonomy.name,
42420 + value,
42421 + onInputChange: debouncedSearch,
42422 + suggestions,
42423 + displayTransform: external_wp_htmlEntities_namespaceObject.decodeEntities,
42424 + onChange: onTermsChange,
42425 + __experimentalShowHowTo: false,
42426 + __nextHasNoMarginBottom: true,
42427 + __next40pxDefaultSize: true
42428 + }
42429 + ) });
42430 + }
42431 +
42432 +
42433 + ;// ./node_modules/@wordpress/block-library/build-module/query/edit/inspector-controls/format-controls.js
42434 +
42435 +
42436 +
42437 +
42438 +
42439 + const POST_FORMATS = [
42440 + { value: "aside", label: (0,external_wp_i18n_namespaceObject.__)("Aside") },
42441 + { value: "audio", label: (0,external_wp_i18n_namespaceObject.__)("Audio") },
42442 + { value: "chat", label: (0,external_wp_i18n_namespaceObject.__)("Chat") },
42443 + { value: "gallery", label: (0,external_wp_i18n_namespaceObject.__)("Gallery") },
42444 + { value: "image", label: (0,external_wp_i18n_namespaceObject.__)("Image") },
42445 + { value: "link", label: (0,external_wp_i18n_namespaceObject.__)("Link") },
42446 + { value: "quote", label: (0,external_wp_i18n_namespaceObject.__)("Quote") },
42447 + { value: "standard", label: (0,external_wp_i18n_namespaceObject.__)("Standard") },
42448 + { value: "status", label: (0,external_wp_i18n_namespaceObject.__)("Status") },
42449 + { value: "video", label: (0,external_wp_i18n_namespaceObject.__)("Video") }
42450 + ].sort((a, b) => {
42451 + const normalizedA = a.label.toUpperCase();
42452 + const normalizedB = b.label.toUpperCase();
42453 + if (normalizedA < normalizedB) {
42454 + return -1;
42455 + }
42456 + if (normalizedA > normalizedB) {
42457 + return 1;
42458 + }
42459 + return 0;
42460 + });
42461 + function formatNamesToValues(names, formats) {
42462 + return names.map((name) => {
42463 + return formats.find(
42464 + (item) => item.label.toLocaleLowerCase() === name.toLocaleLowerCase()
42465 + )?.value;
42466 + }).filter(Boolean);
42467 + }
42468 + function FormatControls({ onChange, query: { format } }) {
42469 + const normalizedFormats = Array.isArray(format) ? format : [format];
42470 + const { supportedFormats } = (0,external_wp_data_namespaceObject.useSelect)((select) => {
42471 + const themeSupports = select(external_wp_coreData_namespaceObject.store).getThemeSupports();
42472 + return {
42473 + supportedFormats: themeSupports.formats
42474 + };
42475 + }, []);
42476 + const formats = POST_FORMATS.filter(
42477 + (item) => supportedFormats.includes(item.value)
42478 + );
42479 + const values = normalizedFormats.map(
42480 + (name) => formats.find((item) => item.value === name)?.label
42481 + ).filter(Boolean);
42482 + const suggestions = formats.filter((item) => !normalizedFormats.includes(item.value)).map((item) => item.label);
42483 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
42484 + external_wp_components_namespaceObject.FormTokenField,
42485 + {
42486 + label: (0,external_wp_i18n_namespaceObject.__)("Formats"),
42487 + value: values,
42488 + suggestions,
42489 + onChange: (newValues) => {
42490 + onChange({
42491 + format: formatNamesToValues(newValues, formats)
42492 + });
42493 + },
42494 + __experimentalShowHowTo: false,
42495 + __experimentalExpandOnFocus: true,
42496 + __nextHasNoMarginBottom: true,
42497 + __next40pxDefaultSize: true
42498 + }
42499 + );
42500 + }
42501 +
42502 +
42503 + ;// ./node_modules/@wordpress/block-library/build-module/query/edit/inspector-controls/sticky-control.js
42504 +
42505 +
42506 +
42507 + const stickyOptions = [
42508 + { label: (0,external_wp_i18n_namespaceObject.__)("Include"), value: "" },
42509 + { label: (0,external_wp_i18n_namespaceObject.__)("Ignore"), value: "ignore" },
42510 + { label: (0,external_wp_i18n_namespaceObject.__)("Exclude"), value: "exclude" },
42511 + { label: (0,external_wp_i18n_namespaceObject.__)("Only"), value: "only" }
42512 + ];
42513 + function StickyControl({ value, onChange }) {
42514 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
42515 + external_wp_components_namespaceObject.SelectControl,
42516 + {
42517 + __nextHasNoMarginBottom: true,
42518 + __next40pxDefaultSize: true,
42519 + label: (0,external_wp_i18n_namespaceObject.__)("Sticky posts"),
42520 + options: stickyOptions,
42521 + value,
42522 + onChange,
42523 + help: (0,external_wp_i18n_namespaceObject.__)(
42524 + "Sticky posts always appear first, regardless of their publish date."
42525 + )
42526 + }
42527 + );
42528 + }
42529 +
42530 +
42531 + ;// ./node_modules/@wordpress/block-library/build-module/query/edit/inspector-controls/per-page-control.js
42532 +
42533 +
42534 +
42535 + const MIN_POSTS_PER_PAGE = 1;
42536 + const MAX_POSTS_PER_PAGE = 100;
42537 + const PerPageControl = ({ perPage, offset = 0, onChange }) => {
42538 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
42539 + external_wp_components_namespaceObject.RangeControl,
42540 + {
42541 + __next40pxDefaultSize: true,
42542 + __nextHasNoMarginBottom: true,
42543 + label: (0,external_wp_i18n_namespaceObject.__)("Items per page"),
42544 + min: MIN_POSTS_PER_PAGE,
42545 + max: MAX_POSTS_PER_PAGE,
42546 + onChange: (newPerPage) => {
42547 + if (isNaN(newPerPage) || newPerPage < MIN_POSTS_PER_PAGE || newPerPage > MAX_POSTS_PER_PAGE) {
42548 + return;
42549 + }
42550 + onChange({ perPage: newPerPage, offset });
42551 + },
42552 + value: parseInt(perPage, 10)
42553 + }
42554 + );
42555 + };
42556 + var per_page_control_default = PerPageControl;
42557 +
42558 +
42559 + ;// ./node_modules/@wordpress/block-library/build-module/query/edit/inspector-controls/offset-controls.js
42560 +
42561 +
42562 +
42563 + const MIN_OFFSET = 0;
42564 + const MAX_OFFSET = 100;
42565 + const OffsetControl = ({ offset = 0, onChange }) => {
42566 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
42567 + external_wp_components_namespaceObject.__experimentalNumberControl,
42568 + {
42569 + __next40pxDefaultSize: true,
42570 + label: (0,external_wp_i18n_namespaceObject.__)("Offset"),
42571 + value: offset,
42572 + min: MIN_OFFSET,
42573 + onChange: (newOffset) => {
42574 + if (isNaN(newOffset) || newOffset < MIN_OFFSET || newOffset > MAX_OFFSET) {
42575 + return;
42576 + }
42577 + onChange({ offset: newOffset });
42578 + }
42579 + }
42580 + );
42581 + };
42582 + var offset_controls_default = OffsetControl;
42583 +
42584 +
42585 + ;// ./node_modules/@wordpress/block-library/build-module/query/edit/inspector-controls/pages-control.js
42586 +
42587 +
42588 +
42589 + const PagesControl = ({ pages, onChange }) => {
42590 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
42591 + external_wp_components_namespaceObject.__experimentalNumberControl,
42592 + {
42593 + __next40pxDefaultSize: true,
42594 + label: (0,external_wp_i18n_namespaceObject.__)("Max pages to show"),
42595 + value: pages,
42596 + min: 0,
42597 + onChange: (newPages) => {
42598 + if (isNaN(newPages) || newPages < 0) {
42599 + return;
42600 + }
42601 + onChange({ pages: newPages });
42602 + },
42603 + help: (0,external_wp_i18n_namespaceObject.__)(
42604 + "Limit the pages you want to show, even if the query has more results. To show all pages use 0 (zero)."
42605 + )
42606 + }
42607 + );
42608 + };
42609 + var pages_control_default = PagesControl;
42610 +
42611 +
42612 + ;// ./node_modules/@wordpress/block-library/build-module/query/edit/inspector-controls/index.js
42613 +
42614 +
42615 +
42616 +
42617 +
42618 +
42619 +
42620 +
42621 +
42622 +
42623 +
42624 +
42625 +
42626 +
42627 +
42628 +
42629 +
42630 +
42631 + function QueryInspectorControls(props) {
42632 + const { attributes, setQuery, isSingular } = props;
42633 + const { query } = attributes;
42634 + const {
42635 + order,
42636 + orderBy,
42637 + author: authorIds,
42638 + pages,
42639 + postType,
42640 + perPage,
42641 + offset,
42642 + sticky,
42643 + inherit,
42644 + taxQuery,
42645 + parents,
42646 + format
42647 + } = query;
42648 + const allowedControls = useAllowedControls(attributes);
42649 + const showSticky = postType === "post";
42650 + const {
42651 + postTypesTaxonomiesMap,
42652 + postTypesSelectOptions,
42653 + postTypeFormatSupportMap
42654 + } = usePostTypes();
42655 + const taxonomies = useTaxonomies(postType);
42656 + const isPostTypeHierarchical = useIsPostTypeHierarchical(postType);
42657 + const onPostTypeChange = (newValue) => {
42658 + const updateQuery = { postType: newValue };
42659 + const supportedTaxonomies = postTypesTaxonomiesMap[newValue];
42660 + const updatedTaxQuery = Object.entries(taxQuery || {}).reduce(
42661 + (accumulator, [taxonomySlug, terms]) => {
42662 + if (supportedTaxonomies.includes(taxonomySlug)) {
42663 + accumulator[taxonomySlug] = terms;
42664 + }
42665 + return accumulator;
42666 + },
42667 + {}
42668 + );
42669 + updateQuery.taxQuery = !!Object.keys(updatedTaxQuery).length ? updatedTaxQuery : void 0;
42670 + if (newValue !== "post") {
42671 + updateQuery.sticky = "";
42672 + }
42673 + updateQuery.parents = [];
42674 + const hasFormatSupport = postTypeFormatSupportMap[newValue];
42675 + if (!hasFormatSupport) {
42676 + updateQuery.format = [];
42677 + }
42678 + setQuery(updateQuery);
42679 + };
42680 + const [querySearch, setQuerySearch] = (0,external_wp_element_namespaceObject.useState)(query.search);
42681 + const debouncedQuerySearch = (0,external_wp_element_namespaceObject.useMemo)(() => {
42682 + return (0,external_wp_compose_namespaceObject.debounce)((newQuerySearch) => {
42683 + setQuery({ search: newQuerySearch });
42684 + }, 250);
42685 + }, [setQuery]);
42686 + const orderByOptions = useOrderByOptions(postType);
42687 + const showInheritControl = isControlAllowed(allowedControls, "inherit");
42688 + const showPostTypeControl = !inherit && isControlAllowed(allowedControls, "postType");
42689 + const postTypeControlLabel = (0,external_wp_i18n_namespaceObject.__)("Post type");
42690 + const postTypeControlHelp = (0,external_wp_i18n_namespaceObject.__)(
42691 + "Select the type of content to display: posts, pages, or custom post types."
42692 + );
42693 + const showOrderControl = !inherit && isControlAllowed(allowedControls, "order");
42694 + const showStickyControl = !inherit && showSticky && isControlAllowed(allowedControls, "sticky");
42695 + const showSettingsPanel = showInheritControl || showPostTypeControl || showOrderControl || showStickyControl;
42696 + const showTaxControl = !!taxonomies?.length && isControlAllowed(allowedControls, "taxQuery");
42697 + const showAuthorControl = isControlAllowed(allowedControls, "author");
42698 + const showSearchControl = isControlAllowed(allowedControls, "search");
42699 + const showParentControl = isControlAllowed(allowedControls, "parents") && isPostTypeHierarchical;
42700 + const postTypeHasFormatSupport = postTypeFormatSupportMap[postType];
42701 + const showFormatControl = (0,external_wp_data_namespaceObject.useSelect)(
42702 + (select) => {
42703 + if (!postTypeHasFormatSupport || !isControlAllowed(allowedControls, "format")) {
42704 + return false;
42705 + }
42706 + const themeSupports = select(external_wp_coreData_namespaceObject.store).getThemeSupports();
42707 + return themeSupports.formats && themeSupports.formats.length > 0 && themeSupports.formats.some((type) => type !== "standard");
42708 + },
42709 + [allowedControls, postTypeHasFormatSupport]
42710 + );
42711 + const showFiltersPanel = showTaxControl || showAuthorControl || showSearchControl || showParentControl || showFormatControl;
42712 + const dropdownMenuProps = useToolsPanelDropdownMenuProps();
42713 + const showPostCountControl = isControlAllowed(
42714 + allowedControls,
42715 + "postCount"
42716 + );
42717 + const showOffSetControl = isControlAllowed(allowedControls, "offset");
42718 + const showPagesControl = isControlAllowed(allowedControls, "pages");
42719 + const showDisplayPanel = showPostCountControl || showOffSetControl || showPagesControl;
42720 + const hasInheritanceWarning = isSingular && inherit;
42721 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
42722 + showSettingsPanel && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(
42723 + external_wp_components_namespaceObject.__experimentalToolsPanel,
42724 + {
42725 + label: (0,external_wp_i18n_namespaceObject.__)("Settings"),
42726 + resetAll: () => {
42727 + setQuery({
42728 + postType: "post",
42729 + order: "desc",
42730 + orderBy: "date",
42731 + sticky: "",
42732 + inherit: true
42733 + });
42734 + },
42735 + dropdownMenuProps,
42736 + children: [
42737 + showInheritControl && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
42738 + external_wp_components_namespaceObject.__experimentalToolsPanelItem,
42739 + {
42740 + hasValue: () => !inherit,
42741 + label: (0,external_wp_i18n_namespaceObject.__)("Query type"),
42742 + onDeselect: () => setQuery({ inherit: true }),
42743 + isShownByDefault: true,
42744 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.__experimentalVStack, { spacing: 4, children: [
42745 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(
42746 + external_wp_components_namespaceObject.__experimentalToggleGroupControl,
42747 + {
42748 + __next40pxDefaultSize: true,
42749 + __nextHasNoMarginBottom: true,
42750 + label: (0,external_wp_i18n_namespaceObject.__)("Query type"),
42751 + isBlock: true,
42752 + onChange: (value) => {
42753 + setQuery({
42754 + inherit: value === "default"
42755 + });
42756 + },
42757 + help: inherit ? (0,external_wp_i18n_namespaceObject.__)(
42758 + "Display a list of posts or custom post types based on the current template."
42759 + ) : (0,external_wp_i18n_namespaceObject.__)(
42760 + "Display a list of posts or custom post types based on specific criteria."
42761 + ),
42762 + value: !!inherit ? "default" : "custom",
42763 + children: [
42764 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
42765 + external_wp_components_namespaceObject.__experimentalToggleGroupControlOption,
42766 + {
42767 + value: "default",
42768 + label: (0,external_wp_i18n_namespaceObject.__)("Default")
42769 + }
42770 + ),
42771 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
42772 + external_wp_components_namespaceObject.__experimentalToggleGroupControlOption,
42773 + {
42774 + value: "custom",
42775 + label: (0,external_wp_i18n_namespaceObject.__)("Custom")
42776 + }
42777 + )
42778 + ]
42779 + }
42780 + ),
42781 + hasInheritanceWarning && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
42782 + external_wp_components_namespaceObject.Notice,
42783 + {
42784 + status: "warning",
42785 + isDismissible: false,
42786 + children: (0,external_wp_i18n_namespaceObject.__)(
42787 + "Cannot inherit the current template query when placed inside the singular content (e.g., post, page, 404, blank)."
42788 + )
42789 + }
42790 + )
42791 + ] })
42792 + }
42793 + ),
42794 + showPostTypeControl && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
42795 + external_wp_components_namespaceObject.__experimentalToolsPanelItem,
42796 + {
42797 + hasValue: () => postType !== "post",
42798 + label: postTypeControlLabel,
42799 + onDeselect: () => onPostTypeChange("post"),
42800 + isShownByDefault: true,
42801 + children: postTypesSelectOptions.length > 2 ? /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
42802 + external_wp_components_namespaceObject.SelectControl,
42803 + {
42804 + __nextHasNoMarginBottom: true,
42805 + __next40pxDefaultSize: true,
42806 + options: postTypesSelectOptions,
42807 + value: postType,
42808 + label: postTypeControlLabel,
42809 + onChange: onPostTypeChange,
42810 + help: postTypeControlHelp
42811 + }
42812 + ) : /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
42813 + external_wp_components_namespaceObject.__experimentalToggleGroupControl,
42814 + {
42815 + __nextHasNoMarginBottom: true,
42816 + __next40pxDefaultSize: true,
42817 + isBlock: true,
42818 + value: postType,
42819 + label: postTypeControlLabel,
42820 + onChange: onPostTypeChange,
42821 + help: postTypeControlHelp,
42822 + children: postTypesSelectOptions.map(
42823 + (option) => /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
42824 + external_wp_components_namespaceObject.__experimentalToggleGroupControlOption,
42825 + {
42826 + value: option.value,
42827 + label: option.label
42828 + },
42829 + option.value
42830 + )
42831 + )
42832 + }
42833 + )
42834 + }
42835 + ),
42836 + showOrderControl && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
42837 + external_wp_components_namespaceObject.__experimentalToolsPanelItem,
42838 + {
42839 + hasValue: () => order !== "desc" || orderBy !== "date",
42840 + label: (0,external_wp_i18n_namespaceObject.__)("Order by"),
42841 + onDeselect: () => setQuery({ order: "desc", orderBy: "date" }),
42842 + isShownByDefault: true,
42843 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
42844 + order_control_default,
42845 + {
42846 + ...{ order, orderBy, orderByOptions },
42847 + onChange: setQuery
42848 + }
42849 + )
42850 + }
42851 + ),
42852 + showStickyControl && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
42853 + external_wp_components_namespaceObject.__experimentalToolsPanelItem,
42854 + {
42855 + hasValue: () => !!sticky,
42856 + label: (0,external_wp_i18n_namespaceObject.__)("Sticky posts"),
42857 + onDeselect: () => setQuery({ sticky: "" }),
42858 + isShownByDefault: true,
42859 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
42860 + StickyControl,
42861 + {
42862 + value: sticky,
42863 + onChange: (value) => setQuery({ sticky: value })
42864 + }
42865 + )
42866 + }
42867 + )
42868 + ]
42869 + }
42870 + ),
42871 + !inherit && showDisplayPanel && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(
42872 + external_wp_components_namespaceObject.__experimentalToolsPanel,
42873 + {
42874 + className: "block-library-query-toolspanel__display",
42875 + label: (0,external_wp_i18n_namespaceObject.__)("Display"),
42876 + resetAll: () => {
42877 + setQuery({
42878 + offset: 0,
42879 + pages: 0
42880 + });
42881 + },
42882 + dropdownMenuProps,
42883 + children: [
42884 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
42885 + external_wp_components_namespaceObject.__experimentalToolsPanelItem,
42886 + {
42887 + label: (0,external_wp_i18n_namespaceObject.__)("Items per page"),
42888 + hasValue: () => perPage > 0,
42889 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
42890 + per_page_control_default,
42891 + {
42892 + perPage,
42893 + offset,
42894 + onChange: setQuery
42895 + }
42896 + )
42897 + }
42898 + ),
42899 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
42900 + external_wp_components_namespaceObject.__experimentalToolsPanelItem,
42901 + {
42902 + label: (0,external_wp_i18n_namespaceObject.__)("Offset"),
42903 + hasValue: () => offset > 0,
42904 + onDeselect: () => setQuery({ offset: 0 }),
42905 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
42906 + offset_controls_default,
42907 + {
42908 + offset,
42909 + onChange: setQuery
42910 + }
42911 + )
42912 + }
42913 + ),
42914 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
42915 + external_wp_components_namespaceObject.__experimentalToolsPanelItem,
42916 + {
42917 + label: (0,external_wp_i18n_namespaceObject.__)("Max pages to show"),
42918 + hasValue: () => pages > 0,
42919 + onDeselect: () => setQuery({ pages: 0 }),
42920 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(pages_control_default, { pages, onChange: setQuery })
42921 + }
42922 + )
42923 + ]
42924 + }
42925 + ),
42926 + !inherit && showFiltersPanel && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(
42927 + external_wp_components_namespaceObject.__experimentalToolsPanel,
42928 + {
42929 + className: "block-library-query-toolspanel__filters",
42930 + label: (0,external_wp_i18n_namespaceObject.__)("Filters"),
42931 + resetAll: () => {
42932 + setQuery({
42933 + author: "",
42934 + parents: [],
42935 + search: "",
42936 + taxQuery: null,
42937 + format: []
42938 + });
42939 + setQuerySearch("");
42940 + },
42941 + dropdownMenuProps,
42942 + children: [
42943 + showTaxControl && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
42944 + external_wp_components_namespaceObject.__experimentalToolsPanelItem,
42945 + {
42946 + label: (0,external_wp_i18n_namespaceObject.__)("Taxonomies"),
42947 + hasValue: () => Object.values(taxQuery || {}).some(
42948 + (terms) => !!terms.length
42949 + ),
42950 + onDeselect: () => setQuery({ taxQuery: null }),
42951 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
42952 + TaxonomyControls,
42953 + {
42954 + onChange: setQuery,
42955 + query
42956 + }
42957 + )
42958 + }
42959 + ),
42960 + showAuthorControl && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
42961 + external_wp_components_namespaceObject.__experimentalToolsPanelItem,
42962 + {
42963 + hasValue: () => !!authorIds,
42964 + label: (0,external_wp_i18n_namespaceObject.__)("Authors"),
42965 + onDeselect: () => setQuery({ author: "" }),
42966 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
42967 + author_control_default,
42968 + {
42969 + value: authorIds,
42970 + onChange: setQuery
42971 + }
42972 + )
42973 + }
42974 + ),
42975 + showSearchControl && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
42976 + external_wp_components_namespaceObject.__experimentalToolsPanelItem,
42977 + {
42978 + hasValue: () => !!querySearch,
42979 + label: (0,external_wp_i18n_namespaceObject.__)("Keyword"),
42980 + onDeselect: () => {
42981 + setQuery({ search: "" });
42982 + setQuerySearch("");
42983 + },
42984 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
42985 + external_wp_components_namespaceObject.TextControl,
42986 + {
42987 + __nextHasNoMarginBottom: true,
42988 + __next40pxDefaultSize: true,
42989 + label: (0,external_wp_i18n_namespaceObject.__)("Keyword"),
42990 + value: querySearch,
42991 + onChange: (newQuerySearch) => {
42992 + debouncedQuerySearch(newQuerySearch);
42993 + setQuerySearch(newQuerySearch);
42994 + }
42995 + }
42996 + )
42997 + }
42998 + ),
42999 + showParentControl && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
43000 + external_wp_components_namespaceObject.__experimentalToolsPanelItem,
43001 + {
43002 + hasValue: () => !!parents?.length,
43003 + label: (0,external_wp_i18n_namespaceObject.__)("Parents"),
43004 + onDeselect: () => setQuery({ parents: [] }),
43005 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
43006 + parent_control_default,
43007 + {
43008 + parents,
43009 + postType,
43010 + onChange: setQuery
43011 + }
43012 + )
43013 + }
43014 + ),
43015 + showFormatControl && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
43016 + external_wp_components_namespaceObject.__experimentalToolsPanelItem,
43017 + {
43018 + hasValue: () => !!format?.length,
43019 + label: (0,external_wp_i18n_namespaceObject.__)("Formats"),
43020 + onDeselect: () => setQuery({ format: [] }),
43021 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
43022 + FormatControls,
43023 + {
43024 + onChange: setQuery,
43025 + query
43026 + }
43027 + )
43028 + }
43029 + )
43030 + ]
43031 + }
43032 + )
43033 + ] });
43034 + }
43035 +
43036 +
43037 + ;// ./node_modules/@wordpress/block-library/build-module/query/edit/enhanced-pagination-modal.js
43038 +
43039 +
43040 +
43041 +
43042 +
43043 + const modalDescriptionId = "wp-block-query-enhanced-pagination-modal__description";
43044 + function EnhancedPaginationModal({
43045 + clientId,
43046 + attributes: { enhancedPagination },
43047 + setAttributes
43048 + }) {
43049 + const [isOpen, setOpen] = (0,external_wp_element_namespaceObject.useState)(false);
43050 + const hasUnsupportedBlocks = useUnsupportedBlocks(clientId);
43051 + (0,external_wp_element_namespaceObject.useEffect)(() => {
43052 + if (enhancedPagination && hasUnsupportedBlocks) {
43053 + setAttributes({ enhancedPagination: false });
43054 + setOpen(true);
43055 + }
43056 + }, [enhancedPagination, hasUnsupportedBlocks, setAttributes]);
43057 + const closeModal = () => {
43058 + setOpen(false);
43059 + };
43060 + const notice = (0,external_wp_i18n_namespaceObject.__)(
43061 + "Currently, avoiding full page reloads is not possible when non-interactive or non-client Navigation compatible blocks from plugins are present inside the Query block."
43062 + ) + " " + (0,external_wp_i18n_namespaceObject.__)(
43063 + 'If you still want to prevent full page reloads, remove that block, then disable "Reload full page" again in the Query Block settings.'
43064 + );
43065 + return isOpen && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
43066 + external_wp_components_namespaceObject.Modal,
43067 + {
43068 + title: (0,external_wp_i18n_namespaceObject.__)("Query block: Reload full page enabled"),
43069 + className: "wp-block-query__enhanced-pagination-modal",
43070 + aria: {
43071 + describedby: modalDescriptionId
43072 + },
43073 + role: "alertdialog",
43074 + focusOnMount: "firstElement",
43075 + isDismissible: false,
43076 + onRequestClose: closeModal,
43077 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.__experimentalVStack, { alignment: "right", spacing: 5, children: [
43078 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("span", { id: modalDescriptionId, children: notice }),
43079 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
43080 + external_wp_components_namespaceObject.Button,
43081 + {
43082 + __next40pxDefaultSize: true,
43083 + variant: "primary",
43084 + onClick: closeModal,
43085 + children: (0,external_wp_i18n_namespaceObject.__)("OK")
43086 + }
43087 + )
43088 + ] })
43089 + }
43090 + );
43091 + }
43092 +
43093 +
43094 + ;// ./node_modules/@wordpress/block-library/build-module/utils/search-patterns.js
43095 +
43096 + function normalizeSearchInput(input = "") {
43097 + input = remove_accents_default()(input);
43098 + input = input.trim().toLowerCase();
43099 + return input;
43100 + }
43101 + function getPatternSearchRank(pattern, searchValue) {
43102 + const normalizedSearchValue = normalizeSearchInput(searchValue);
43103 + const normalizedTitle = normalizeSearchInput(pattern.title);
43104 + let rank = 0;
43105 + if (normalizedSearchValue === normalizedTitle) {
43106 + rank += 30;
43107 + } else if (normalizedTitle.startsWith(normalizedSearchValue)) {
43108 + rank += 20;
43109 + } else {
43110 + const searchTerms = normalizedSearchValue.split(" ");
43111 + const hasMatchedTerms = searchTerms.every(
43112 + (searchTerm) => normalizedTitle.includes(searchTerm)
43113 + );
43114 + if (hasMatchedTerms) {
43115 + rank += 10;
43116 + }
43117 + }
43118 + return rank;
43119 + }
43120 + function searchPatterns(patterns = [], searchValue = "") {
43121 + if (!searchValue) {
43122 + return patterns;
43123 + }
43124 + const rankedPatterns = patterns.map((pattern) => {
43125 + return [pattern, getPatternSearchRank(pattern, searchValue)];
43126 + }).filter(([, rank]) => rank > 0);
43127 + rankedPatterns.sort(([, rank1], [, rank2]) => rank2 - rank1);
43128 + return rankedPatterns.map(([pattern]) => pattern);
43129 + }
43130 +
43131 +
43132 + ;// ./node_modules/@wordpress/block-library/build-module/query/edit/pattern-selection.js
43133 +
43134 +
43135 +
43136 +
43137 +
43138 +
43139 +
43140 +
43141 + function PatternSelectionModal({
43142 + clientId,
43143 + attributes,
43144 + setIsPatternSelectionModalOpen
43145 + }) {
43146 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
43147 + external_wp_components_namespaceObject.Modal,
43148 + {
43149 + overlayClassName: "block-library-query-pattern__selection-modal",
43150 + title: (0,external_wp_i18n_namespaceObject.__)("Choose a pattern"),
43151 + onRequestClose: () => setIsPatternSelectionModalOpen(false),
43152 + isFullScreen: true,
43153 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(PatternSelection, { clientId, attributes })
43154 + }
43155 + );
43156 + }
43157 + function useBlockPatterns(clientId, attributes) {
43158 + const blockNameForPatterns = useBlockNameForPatterns(
43159 + clientId,
43160 + attributes
43161 + );
43162 + const allPatterns = usePatterns(clientId, blockNameForPatterns);
43163 + const rootBlockPatterns = (0,external_wp_element_namespaceObject.useMemo)(() => {
43164 + return allPatterns.filter((pattern) => {
43165 + return pattern.blocks?.[0]?.name === blockNameForPatterns;
43166 + });
43167 + }, [allPatterns, blockNameForPatterns]);
43168 + return rootBlockPatterns;
43169 + }
43170 + function PatternSelection({
43171 + clientId,
43172 + attributes,
43173 + showTitlesAsTooltip = false,
43174 + showSearch = true
43175 + }) {
43176 + const [searchValue, setSearchValue] = (0,external_wp_element_namespaceObject.useState)("");
43177 + const { replaceBlock, selectBlock } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_blockEditor_namespaceObject.store);
43178 + const blockPatterns = useBlockPatterns(clientId, attributes);
43179 + const blockPreviewContext = (0,external_wp_element_namespaceObject.useMemo)(
43180 + () => ({
43181 + previewPostType: attributes.query.postType
43182 + }),
43183 + [attributes.query.postType]
43184 + );
43185 + const filteredBlockPatterns = (0,external_wp_element_namespaceObject.useMemo)(() => {
43186 + return searchPatterns(blockPatterns, searchValue);
43187 + }, [blockPatterns, searchValue]);
43188 + const onBlockPatternSelect = (pattern, blocks) => {
43189 + const { newBlocks, queryClientIds } = getTransformedBlocksFromPattern(
43190 + blocks,
43191 + attributes
43192 + );
43193 + replaceBlock(clientId, newBlocks);
43194 + if (queryClientIds[0]) {
43195 + selectBlock(queryClientIds[0]);
43196 + }
43197 + };
43198 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", { className: "block-library-query-pattern__selection-content", children: [
43199 + showSearch && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { className: "block-library-query-pattern__selection-search", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
43200 + external_wp_components_namespaceObject.SearchControl,
43201 + {
43202 + __nextHasNoMarginBottom: true,
43203 + onChange: setSearchValue,
43204 + value: searchValue,
43205 + label: (0,external_wp_i18n_namespaceObject.__)("Search"),
43206 + placeholder: (0,external_wp_i18n_namespaceObject.__)("Search")
43207 + }
43208 + ) }),
43209 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockContextProvider, { value: blockPreviewContext, children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
43210 + external_wp_blockEditor_namespaceObject.__experimentalBlockPatternsList,
43211 + {
43212 + blockPatterns: filteredBlockPatterns,
43213 + onClickPattern: onBlockPatternSelect,
43214 + showTitlesAsTooltip
43215 + }
43216 + ) })
43217 + ] });
43218 + }
43219 +
43220 +
43221 + ;// ./node_modules/@wordpress/block-library/build-module/query/edit/query-toolbar.js
43222 +
43223 +
43224 +
43225 +
43226 + function QueryToolbar({
43227 + clientId,
43228 + attributes,
43229 + hasInnerBlocks
43230 + }) {
43231 + const hasPatterns = useBlockPatterns(clientId, attributes).length;
43232 + if (!hasPatterns) {
43233 + return null;
43234 + }
43235 + const buttonLabel = hasInnerBlocks ? (0,external_wp_i18n_namespaceObject.__)("Change design") : (0,external_wp_i18n_namespaceObject.__)("Choose pattern");
43236 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ToolbarGroup, { className: "wp-block-template-part__block-control-group", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalDropdownContentWrapper, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
43237 + external_wp_components_namespaceObject.Dropdown,
43238 + {
43239 + contentClassName: "block-editor-block-settings-menu__popover",
43240 + focusOnMount: "firstElement",
43241 + expandOnMobile: true,
43242 + renderToggle: ({ isOpen, onToggle }) => /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
43243 + external_wp_components_namespaceObject.ToolbarButton,
43244 + {
43245 + "aria-haspopup": "true",
43246 + "aria-expanded": isOpen,
43247 + onClick: onToggle,
43248 + children: buttonLabel
43249 + }
43250 + ),
43251 + renderContent: () => /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
43252 + PatternSelection,
43253 + {
43254 + clientId,
43255 + attributes,
43256 + showSearch: false,
43257 + showTitlesAsTooltip: true
43258 + }
43259 + )
43260 + }
43261 + ) }) });
43262 + }
43263 +
43264 +
43265 + ;// ./node_modules/@wordpress/block-library/build-module/query/edit/query-content.js
43266 +
43267 +
43268 +
43269 +
43270 +
43271 +
43272 +
43273 +
43274 +
43275 +
43276 +
43277 +
43278 +
43279 + const { HTMLElementControl: query_content_HTMLElementControl } = unlock(external_wp_blockEditor_namespaceObject.privateApis);
43280 + const DEFAULTS_POSTS_PER_PAGE = 3;
43281 + const query_content_TEMPLATE = [["core/post-template"]];
43282 + function QueryContent({
43283 + attributes,
43284 + setAttributes,
43285 + clientId,
43286 + context,
43287 + name
43288 + }) {
43289 + const {
43290 + queryId,
43291 + query,
43292 + enhancedPagination,
43293 + tagName: TagName = "div",
43294 + query: { inherit } = {}
43295 + } = attributes;
43296 + const { templateSlug } = context;
43297 + const { isSingular } = getQueryContextFromTemplate(templateSlug);
43298 + const { __unstableMarkNextChangeAsNotPersistent } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_blockEditor_namespaceObject.store);
43299 + const instanceId = (0,external_wp_compose_namespaceObject.useInstanceId)(QueryContent);
43300 + const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)();
43301 + const innerBlocksProps = (0,external_wp_blockEditor_namespaceObject.useInnerBlocksProps)(blockProps, {
43302 + template: query_content_TEMPLATE
43303 + });
43304 + const { postsPerPage } = (0,external_wp_data_namespaceObject.useSelect)((select) => {
43305 + const { getSettings } = select(external_wp_blockEditor_namespaceObject.store);
43306 + const { getEntityRecord, getEntityRecordEdits, canUser } = select(external_wp_coreData_namespaceObject.store);
43307 + const settingPerPage = canUser("read", {
43308 + kind: "root",
43309 + name: "site"
43310 + }) ? +getEntityRecord("root", "site")?.posts_per_page : +getSettings().postsPerPage;
43311 + const editedSettingPerPage = +getEntityRecordEdits("root", "site")?.posts_per_page;
43312 + return {
43313 + postsPerPage: editedSettingPerPage || settingPerPage || DEFAULTS_POSTS_PER_PAGE
43314 + };
43315 + }, []);
43316 + const updateQuery = (0,external_wp_element_namespaceObject.useCallback)(
43317 + (newQuery) => setAttributes((prevAttributes) => ({
43318 + query: { ...prevAttributes.query, ...newQuery }
43319 + })),
43320 + [setAttributes]
43321 + );
43322 + (0,external_wp_element_namespaceObject.useEffect)(() => {
43323 + const newQuery = {};
43324 + if (inherit && query.perPage !== postsPerPage) {
43325 + newQuery.perPage = postsPerPage;
43326 + } else if (!query.perPage && postsPerPage) {
43327 + newQuery.perPage = postsPerPage;
43328 + }
43329 + if (!!Object.keys(newQuery).length) {
43330 + __unstableMarkNextChangeAsNotPersistent();
43331 + updateQuery(newQuery);
43332 + }
43333 + }, [
43334 + query.perPage,
43335 + inherit,
43336 + postsPerPage,
43337 + __unstableMarkNextChangeAsNotPersistent,
43338 + updateQuery
43339 + ]);
43340 + (0,external_wp_element_namespaceObject.useEffect)(() => {
43341 + if (!Number.isFinite(queryId)) {
43342 + __unstableMarkNextChangeAsNotPersistent();
43343 + setAttributes({ queryId: instanceId });
43344 + }
43345 + }, [
43346 + queryId,
43347 + instanceId,
43348 + __unstableMarkNextChangeAsNotPersistent,
43349 + setAttributes
43350 + ]);
43351 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
43352 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockControls, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
43353 + QueryToolbar,
43354 + {
43355 + clientId,
43356 + attributes,
43357 + hasInnerBlocks: true
43358 + }
43359 + ) }),
43360 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
43361 + EnhancedPaginationModal,
43362 + {
43363 + attributes,
43364 + setAttributes,
43365 + clientId
43366 + }
43367 + ),
43368 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
43369 + QueryInspectorControls,
43370 + {
43371 + name,
43372 + attributes,
43373 + setQuery: updateQuery,
43374 + setAttributes,
43375 + clientId,
43376 + isSingular
43377 + }
43378 + ) }),
43379 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_blockEditor_namespaceObject.InspectorControls, { group: "advanced", children: [
43380 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
43381 + query_content_HTMLElementControl,
43382 + {
43383 + tagName: TagName,
43384 + onChange: (value) => setAttributes({ tagName: value }),
43385 + clientId,
43386 + options: [
43387 + { label: (0,external_wp_i18n_namespaceObject.__)("Default (<div>)"), value: "div" },
43388 + { label: "<main>", value: "main" },
43389 + { label: "<section>", value: "section" },
43390 + { label: "<aside>", value: "aside" }
43391 + ]
43392 + }
43393 + ),
43394 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
43395 + EnhancedPaginationControl,
43396 + {
43397 + enhancedPagination,
43398 + setAttributes,
43399 + clientId
43400 + }
43401 + )
43402 + ] }),
43403 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(TagName, { ...innerBlocksProps })
43404 + ] });
43405 + }
43406 +
43407 +
43408 + ;// ./node_modules/@wordpress/block-library/build-module/query/edit/query-placeholder.js
43409 +
43410 +
43411 +
43412 +
43413 +
43414 +
43415 +
43416 +
43417 +
43418 +
43419 +
43420 + function QueryPlaceholder({
43421 + attributes,
43422 + clientId,
43423 + name,
43424 + openPatternSelectionModal
43425 + }) {
43426 + const [isStartingBlank, setIsStartingBlank] = (0,external_wp_element_namespaceObject.useState)(false);
43427 + const [containerWidth, setContainerWidth] = (0,external_wp_element_namespaceObject.useState)(0);
43428 + const resizeObserverRef = (0,external_wp_compose_namespaceObject.useResizeObserver)(([entry]) => {
43429 + setContainerWidth(entry.contentRect.width);
43430 + });
43431 + const SMALL_CONTAINER_BREAKPOINT = 160;
43432 + const isSmallContainer = containerWidth > 0 && containerWidth < SMALL_CONTAINER_BREAKPOINT;
43433 + const { blockType, activeBlockVariation } = (0,external_wp_data_namespaceObject.useSelect)(
43434 + (select) => {
43435 + const { getActiveBlockVariation, getBlockType } = select(external_wp_blocks_namespaceObject.store);
43436 + return {
43437 + blockType: getBlockType(name),
43438 + activeBlockVariation: getActiveBlockVariation(
43439 + name,
43440 + attributes
43441 + )
43442 + };
43443 + },
43444 + [name, attributes]
43445 + );
43446 + const hasPatterns = !!useBlockPatterns(clientId, attributes).length;
43447 + const icon = activeBlockVariation?.icon?.src || activeBlockVariation?.icon || blockType?.icon?.src;
43448 + const label = activeBlockVariation?.title || blockType?.title;
43449 + const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)({
43450 + ref: resizeObserverRef
43451 + });
43452 + if (isStartingBlank) {
43453 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
43454 + QueryVariationPicker,
43455 + {
43456 + clientId,
43457 + attributes,
43458 + icon,
43459 + label
43460 + }
43461 + );
43462 + }
43463 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", { ...blockProps, children: [
43464 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockControls, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
43465 + QueryToolbar,
43466 + {
43467 + clientId,
43468 + attributes,
43469 + hasInnerBlocks: false
43470 + }
43471 + ) }),
43472 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(
43473 + external_wp_components_namespaceObject.Placeholder,
43474 + {
43475 + className: "block-editor-media-placeholder",
43476 + icon: !isSmallContainer && icon,
43477 + label: !isSmallContainer && label,
43478 + instructions: !isSmallContainer && (0,external_wp_i18n_namespaceObject.__)("Choose a pattern for the query loop or start blank."),
43479 + withIllustration: isSmallContainer,
43480 + children: [
43481 + !!hasPatterns && !isSmallContainer && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
43482 + external_wp_components_namespaceObject.Button,
43483 + {
43484 + __next40pxDefaultSize: true,
43485 + variant: "primary",
43486 + onClick: openPatternSelectionModal,
43487 + children: (0,external_wp_i18n_namespaceObject.__)("Choose")
43488 + }
43489 + ),
43490 + !isSmallContainer && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
43491 + external_wp_components_namespaceObject.Button,
43492 + {
43493 + __next40pxDefaultSize: true,
43494 + variant: "secondary",
43495 + onClick: () => {
43496 + setIsStartingBlank(true);
43497 + },
43498 + children: (0,external_wp_i18n_namespaceObject.__)("Start blank")
43499 + }
43500 + )
43501 + ]
43502 + }
43503 + )
43504 + ] });
43505 + }
43506 + function QueryVariationPicker({ clientId, attributes, icon, label }) {
43507 + const scopeVariations = useScopedBlockVariations(attributes);
43508 + const { replaceInnerBlocks } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_blockEditor_namespaceObject.store);
43509 + const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)();
43510 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { ...blockProps, children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
43511 + external_wp_blockEditor_namespaceObject.__experimentalBlockVariationPicker,
43512 + {
43513 + icon,
43514 + label,
43515 + variations: scopeVariations,
43516 + onSelect: (variation) => {
43517 + if (variation.innerBlocks) {
43518 + replaceInnerBlocks(
43519 + clientId,
43520 + (0,external_wp_blocks_namespaceObject.createBlocksFromInnerBlocksTemplate)(
43521 + variation.innerBlocks
43522 + ),
43523 + false
43524 + );
43525 + }
43526 + }
43527 + }
43528 + ) });
43529 + }
43530 +
43531 +
43532 + ;// ./node_modules/@wordpress/block-library/build-module/query/edit/index.js
43533 +
43534 +
43535 +
43536 +
43537 +
43538 +
43539 +
43540 + const QueryEdit = (props) => {
43541 + const { clientId, attributes } = props;
43542 + const [isPatternSelectionModalOpen, setIsPatternSelectionModalOpen] = (0,external_wp_element_namespaceObject.useState)(false);
43543 + const hasInnerBlocks = (0,external_wp_data_namespaceObject.useSelect)(
43544 + (select) => !!select(external_wp_blockEditor_namespaceObject.store).getBlocks(clientId).length,
43545 + [clientId]
43546 + );
43547 + const Component = hasInnerBlocks ? QueryContent : QueryPlaceholder;
43548 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
43549 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
43550 + Component,
43551 + {
43552 + ...props,
43553 + openPatternSelectionModal: () => setIsPatternSelectionModalOpen(true)
43554 + }
43555 + ),
43556 + isPatternSelectionModalOpen && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
43557 + PatternSelectionModal,
43558 + {
43559 + clientId,
43560 + attributes,
43561 + setIsPatternSelectionModalOpen
43562 + }
43563 + )
43564 + ] });
43565 + };
43566 + var query_edit_edit_default = QueryEdit;
43567 +
43568 +
43569 + ;// ./node_modules/@wordpress/block-library/build-module/query/save.js
43570 +
43571 +
43572 + function query_save_save({ attributes: { tagName: Tag = "div" } }) {
43573 + const blockProps = external_wp_blockEditor_namespaceObject.useBlockProps.save();
43574 + const innerBlocksProps = external_wp_blockEditor_namespaceObject.useInnerBlocksProps.save(blockProps);
43575 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(Tag, { ...innerBlocksProps });
43576 + }
43577 +
43578 +
43579 + ;// ./node_modules/@wordpress/block-library/build-module/query/icons.js
43580 +
43581 +
43582 + const titleDate = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 48 48", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Path, { d: "M41 9H7v3h34V9zm-22 5H7v1h12v-1zM7 26h12v1H7v-1zm34-5H7v3h34v-3zM7 38h12v1H7v-1zm34-5H7v3h34v-3z" }) });
43583 + const titleExcerpt = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 48 48", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Path, { d: "M41 9H7v3h34V9zm-4 5H7v1h30v-1zm4 3H7v1h34v-1zM7 20h30v1H7v-1zm0 12h30v1H7v-1zm34 3H7v1h34v-1zM7 38h30v1H7v-1zm34-11H7v3h34v-3z" }) });
43584 + const titleDateExcerpt = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 48 48", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Path, { d: "M41 9H7v3h34V9zm-22 5H7v1h12v-1zm22 3H7v1h34v-1zM7 20h34v1H7v-1zm0 12h12v1H7v-1zm34 3H7v1h34v-1zM7 38h34v1H7v-1zm34-11H7v3h34v-3z" }) });
43585 + const imageDateTitle = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 48 48", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Path, { d: "M7 9h34v6H7V9zm12 8H7v1h12v-1zm18 3H7v1h30v-1zm0 18H7v1h30v-1zM7 35h12v1H7v-1zm34-8H7v6h34v-6z" }) });
43586 +
43587 +
43588 + ;// ./node_modules/@wordpress/block-library/build-module/query/variations.js
43589 +
43590 +
43591 + const postDate = [
43592 + "core/post-date",
43593 + {
43594 + metadata: {
43595 + bindings: {
43596 + datetime: {
43597 + source: "core/post-data",
43598 + args: { field: "date" }
43599 + }
43600 + }
43601 + }
43602 + }
43603 + ];
43604 + const query_variations_variations = [
43605 + {
43606 + name: "title-date",
43607 + title: (0,external_wp_i18n_namespaceObject.__)("Title & Date"),
43608 + icon: titleDate,
43609 + attributes: {},
43610 + innerBlocks: [
43611 + ["core/post-template", {}, [["core/post-title"], postDate]],
43612 + ["core/query-pagination"],
43613 + ["core/query-no-results"]
43614 + ],
43615 + scope: ["block"]
43616 + },
43617 + {
43618 + name: "title-excerpt",
43619 + title: (0,external_wp_i18n_namespaceObject.__)("Title & Excerpt"),
43620 + icon: titleExcerpt,
43621 + attributes: {},
43622 + innerBlocks: [
43623 + [
43624 + "core/post-template",
43625 + {},
43626 + [["core/post-title"], ["core/post-excerpt"]]
43627 + ],
43628 + ["core/query-pagination"],
43629 + ["core/query-no-results"]
43630 + ],
43631 + scope: ["block"]
43632 + },
43633 + {
43634 + name: "title-date-excerpt",
43635 + title: (0,external_wp_i18n_namespaceObject.__)("Title, Date, & Excerpt"),
43636 + icon: titleDateExcerpt,
43637 + attributes: {},
43638 + innerBlocks: [
43639 + [
43640 + "core/post-template",
43641 + {},
43642 + [["core/post-title"], postDate, ["core/post-excerpt"]]
43643 + ],
43644 + ["core/query-pagination"],
43645 + ["core/query-no-results"]
43646 + ],
43647 + scope: ["block"]
43648 + },
43649 + {
43650 + name: "image-date-title",
43651 + title: (0,external_wp_i18n_namespaceObject.__)("Image, Date, & Title"),
43652 + icon: imageDateTitle,
43653 + attributes: {},
43654 + innerBlocks: [
43655 + [
43656 + "core/post-template",
43657 + {},
43658 + [
43659 + ["core/post-featured-image"],
43660 + postDate,
43661 + ["core/post-title"]
43662 + ]
43663 + ],
43664 + ["core/query-pagination"],
43665 + ["core/query-no-results"]
43666 + ],
43667 + scope: ["block"]
43668 + }
43669 + ];
43670 + var query_variations_variations_default = query_variations_variations;
43671 +
43672 +
43673 + ;// ./node_modules/@wordpress/block-library/build-module/query/deprecated.js
43674 +
43675 +
43676 +
43677 +
43678 + const { cleanEmptyObject: deprecated_cleanEmptyObject } = unlock(external_wp_blockEditor_namespaceObject.privateApis);
43679 + const migrateToTaxQuery = (attributes) => {
43680 + const { query } = attributes;
43681 + const { categoryIds, tagIds, ...newQuery } = query;
43682 + if (query.categoryIds?.length || query.tagIds?.length) {
43683 + newQuery.taxQuery = {
43684 + category: !!query.categoryIds?.length ? query.categoryIds : void 0,
43685 + post_tag: !!query.tagIds?.length ? query.tagIds : void 0
43686 + };
43687 + }
43688 + return {
43689 + ...attributes,
43690 + query: newQuery
43691 + };
43692 + };
43693 + const migrateColors = (attributes, innerBlocks) => {
43694 + const { style, backgroundColor, gradient, textColor, ...newAttributes } = attributes;
43695 + const hasColorStyles = backgroundColor || gradient || textColor || style?.color || style?.elements?.link;
43696 + if (!hasColorStyles) {
43697 + return [attributes, innerBlocks];
43698 + }
43699 + if (style) {
43700 + newAttributes.style = deprecated_cleanEmptyObject({
43701 + ...style,
43702 + color: void 0,
43703 + elements: {
43704 + ...style.elements,
43705 + link: void 0
43706 + }
43707 + });
43708 + }
43709 + if (hasSingleInnerGroupBlock(innerBlocks)) {
43710 + const groupBlock = innerBlocks[0];
43711 + const hasStyles = style?.color || style?.elements?.link || groupBlock.attributes.style;
43712 + const newStyles = hasStyles ? deprecated_cleanEmptyObject({
43713 + ...groupBlock.attributes.style,
43714 + color: style?.color,
43715 + elements: style?.elements?.link ? { link: style?.elements?.link } : void 0
43716 + }) : void 0;
43717 + const updatedGroupBlock = (0,external_wp_blocks_namespaceObject.createBlock)(
43718 + "core/group",
43719 + {
43720 + ...groupBlock.attributes,
43721 + backgroundColor,
43722 + gradient,
43723 + textColor,
43724 + style: newStyles
43725 + },
43726 + groupBlock.innerBlocks
43727 + );
43728 + return [newAttributes, [updatedGroupBlock]];
43729 + }
43730 + const newGroupBlock = (0,external_wp_blocks_namespaceObject.createBlock)(
43731 + "core/group",
43732 + {
43733 + backgroundColor,
43734 + gradient,
43735 + textColor,
43736 + style: deprecated_cleanEmptyObject({
43737 + color: style?.color,
43738 + elements: style?.elements?.link ? { link: style?.elements?.link } : void 0
43739 + })
43740 + },
43741 + innerBlocks
43742 + );
43743 + return [newAttributes, [newGroupBlock]];
43744 + };
43745 + const hasSingleInnerGroupBlock = (innerBlocks = []) => innerBlocks.length === 1 && innerBlocks[0].name === "core/group";
43746 + const migrateToConstrainedLayout = (attributes) => {
43747 + const { layout = null } = attributes;
43748 + if (!layout) {
43749 + return attributes;
43750 + }
43751 + const { inherit = null, contentSize = null, ...newLayout } = layout;
43752 + if (inherit || contentSize) {
43753 + return {
43754 + ...attributes,
43755 + layout: {
43756 + ...newLayout,
43757 + contentSize,
43758 + type: "constrained"
43759 + }
43760 + };
43761 + }
43762 + return attributes;
43763 + };
43764 + const findPostTemplateBlock = (innerBlocks = []) => {
43765 + let foundBlock = null;
43766 + for (const block of innerBlocks) {
43767 + if (block.name === "core/post-template") {
43768 + foundBlock = block;
43769 + break;
43770 + } else if (block.innerBlocks.length) {
43771 + foundBlock = findPostTemplateBlock(block.innerBlocks);
43772 + }
43773 + }
43774 + return foundBlock;
43775 + };
43776 + const replacePostTemplateBlock = (innerBlocks = [], replacementBlock) => {
43777 + innerBlocks.forEach((block, index) => {
43778 + if (block.name === "core/post-template") {
43779 + innerBlocks.splice(index, 1, replacementBlock);
43780 + } else if (block.innerBlocks.length) {
43781 + block.innerBlocks = replacePostTemplateBlock(
43782 + block.innerBlocks,
43783 + replacementBlock
43784 + );
43785 + }
43786 + });
43787 + return innerBlocks;
43788 + };
43789 + const migrateDisplayLayout = (attributes, innerBlocks) => {
43790 + const { displayLayout = null, ...newAttributes } = attributes;
43791 + if (!displayLayout) {
43792 + return [attributes, innerBlocks];
43793 + }
43794 + const postTemplateBlock = findPostTemplateBlock(innerBlocks);
43795 + if (!postTemplateBlock) {
43796 + return [attributes, innerBlocks];
43797 + }
43798 + const { type, columns } = displayLayout;
43799 + const updatedLayoutType = type === "flex" ? "grid" : "default";
43800 + const newPostTemplateBlock = (0,external_wp_blocks_namespaceObject.createBlock)(
43801 + "core/post-template",
43802 + {
43803 + ...postTemplateBlock.attributes,
43804 + layout: {
43805 + type: updatedLayoutType,
43806 + ...columns && { columnCount: columns }
43807 + }
43808 + },
43809 + postTemplateBlock.innerBlocks
43810 + );
43811 + return [
43812 + newAttributes,
43813 + replacePostTemplateBlock(innerBlocks, newPostTemplateBlock)
43814 + ];
43815 + };
43816 + const query_deprecated_v1 = {
43817 + attributes: {
43818 + queryId: {
43819 + type: "number"
43820 + },
43821 + query: {
43822 + type: "object",
43823 + default: {
43824 + perPage: null,
43825 + pages: 0,
43826 + offset: 0,
43827 + postType: "post",
43828 + categoryIds: [],
43829 + tagIds: [],
43830 + order: "desc",
43831 + orderBy: "date",
43832 + author: "",
43833 + search: "",
43834 + exclude: [],
43835 + sticky: "",
43836 + inherit: true
43837 + }
43838 + },
43839 + layout: {
43840 + type: "object",
43841 + default: {
43842 + type: "list"
43843 + }
43844 + }
43845 + },
43846 + supports: {
43847 + html: false
43848 + },
43849 + migrate(attributes, innerBlocks) {
43850 + const withTaxQuery = migrateToTaxQuery(attributes);
43851 + const { layout, ...restWithTaxQuery } = withTaxQuery;
43852 + const newAttributes = {
43853 + ...restWithTaxQuery,
43854 + displayLayout: withTaxQuery.layout
43855 + };
43856 + return migrateDisplayLayout(newAttributes, innerBlocks);
43857 + },
43858 + save() {
43859 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, {});
43860 + }
43861 + };
43862 + const query_deprecated_v2 = {
43863 + attributes: {
43864 + queryId: {
43865 + type: "number"
43866 + },
43867 + query: {
43868 + type: "object",
43869 + default: {
43870 + perPage: null,
43871 + pages: 0,
43872 + offset: 0,
43873 + postType: "post",
43874 + categoryIds: [],
43875 + tagIds: [],
43876 + order: "desc",
43877 + orderBy: "date",
43878 + author: "",
43879 + search: "",
43880 + exclude: [],
43881 + sticky: "",
43882 + inherit: true
43883 + }
43884 + },
43885 + tagName: {
43886 + type: "string",
43887 + default: "div"
43888 + },
43889 + displayLayout: {
43890 + type: "object",
43891 + default: {
43892 + type: "list"
43893 + }
43894 + }
43895 + },
43896 + supports: {
43897 + align: ["wide", "full"],
43898 + html: false,
43899 + color: {
43900 + gradients: true,
43901 + link: true
43902 + },
43903 + layout: true
43904 + },
43905 + isEligible: ({ query: { categoryIds, tagIds } = {} }) => categoryIds || tagIds,
43906 + migrate(attributes, innerBlocks) {
43907 + const withTaxQuery = migrateToTaxQuery(attributes);
43908 + const [withColorAttributes, withColorInnerBlocks] = migrateColors(
43909 + withTaxQuery,
43910 + innerBlocks
43911 + );
43912 + const withConstrainedLayoutAttributes = migrateToConstrainedLayout(withColorAttributes);
43913 + return migrateDisplayLayout(
43914 + withConstrainedLayoutAttributes,
43915 + withColorInnerBlocks
43916 + );
43917 + },
43918 + save({ attributes: { tagName: Tag = "div" } }) {
43919 + const blockProps = external_wp_blockEditor_namespaceObject.useBlockProps.save();
43920 + const innerBlocksProps = external_wp_blockEditor_namespaceObject.useInnerBlocksProps.save(blockProps);
43921 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(Tag, { ...innerBlocksProps });
43922 + }
43923 + };
43924 + const query_deprecated_v3 = {
43925 + attributes: {
43926 + queryId: {
43927 + type: "number"
43928 + },
43929 + query: {
43930 + type: "object",
43931 + default: {
43932 + perPage: null,
43933 + pages: 0,
43934 + offset: 0,
43935 + postType: "post",
43936 + order: "desc",
43937 + orderBy: "date",
43938 + author: "",
43939 + search: "",
43940 + exclude: [],
43941 + sticky: "",
43942 + inherit: true,
43943 + taxQuery: null,
43944 + parents: []
43945 + }
43946 + },
43947 + tagName: {
43948 + type: "string",
43949 + default: "div"
43950 + },
43951 + displayLayout: {
43952 + type: "object",
43953 + default: {
43954 + type: "list"
43955 + }
43956 + },
43957 + namespace: {
43958 + type: "string"
43959 + }
43960 + },
43961 + supports: {
43962 + align: ["wide", "full"],
43963 + html: false,
43964 + color: {
43965 + gradients: true,
43966 + link: true,
43967 + __experimentalDefaultControls: {
43968 + background: true,
43969 + text: true
43970 + }
43971 + },
43972 + layout: true
43973 + },
43974 + isEligible(attributes) {
43975 + const { style, backgroundColor, gradient, textColor } = attributes;
43976 + return backgroundColor || gradient || textColor || style?.color || style?.elements?.link;
43977 + },
43978 + migrate(attributes, innerBlocks) {
43979 + const [withColorAttributes, withColorInnerBlocks] = migrateColors(
43980 + attributes,
43981 + innerBlocks
43982 + );
43983 + const withConstrainedLayoutAttributes = migrateToConstrainedLayout(withColorAttributes);
43984 + return migrateDisplayLayout(
43985 + withConstrainedLayoutAttributes,
43986 + withColorInnerBlocks
43987 + );
43988 + },
43989 + save({ attributes: { tagName: Tag = "div" } }) {
43990 + const blockProps = external_wp_blockEditor_namespaceObject.useBlockProps.save();
43991 + const innerBlocksProps = external_wp_blockEditor_namespaceObject.useInnerBlocksProps.save(blockProps);
43992 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(Tag, { ...innerBlocksProps });
43993 + }
43994 + };
43995 + const query_deprecated_v4 = {
43996 + attributes: {
43997 + queryId: {
43998 + type: "number"
43999 + },
44000 + query: {
44001 + type: "object",
44002 + default: {
44003 + perPage: null,
44004 + pages: 0,
44005 + offset: 0,
44006 + postType: "post",
44007 + order: "desc",
44008 + orderBy: "date",
44009 + author: "",
44010 + search: "",
44011 + exclude: [],
44012 + sticky: "",
44013 + inherit: true,
44014 + taxQuery: null,
44015 + parents: []
44016 + }
44017 + },
44018 + tagName: {
44019 + type: "string",
44020 + default: "div"
44021 + },
44022 + displayLayout: {
44023 + type: "object",
44024 + default: {
44025 + type: "list"
44026 + }
44027 + },
44028 + namespace: {
44029 + type: "string"
44030 + }
44031 + },
44032 + supports: {
44033 + align: ["wide", "full"],
44034 + html: false,
44035 + color: {
44036 + gradients: true,
44037 + link: true,
44038 + __experimentalDefaultControls: {
44039 + background: true,
44040 + text: true
44041 + }
44042 + },
44043 + layout: true
44044 + },
44045 + save({ attributes: { tagName: Tag = "div" } }) {
44046 + const blockProps = external_wp_blockEditor_namespaceObject.useBlockProps.save();
44047 + const innerBlocksProps = external_wp_blockEditor_namespaceObject.useInnerBlocksProps.save(blockProps);
44048 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(Tag, { ...innerBlocksProps });
44049 + },
44050 + isEligible: ({ layout }) => layout?.inherit || layout?.contentSize && layout?.type !== "constrained",
44051 + migrate(attributes, innerBlocks) {
44052 + const withConstrainedLayoutAttributes = migrateToConstrainedLayout(attributes);
44053 + return migrateDisplayLayout(
44054 + withConstrainedLayoutAttributes,
44055 + innerBlocks
44056 + );
44057 + }
44058 + };
44059 + const query_deprecated_v5 = {
44060 + attributes: {
44061 + queryId: {
44062 + type: "number"
44063 + },
44064 + query: {
44065 + type: "object",
44066 + default: {
44067 + perPage: null,
44068 + pages: 0,
44069 + offset: 0,
44070 + postType: "post",
44071 + order: "desc",
44072 + orderBy: "date",
44073 + author: "",
44074 + search: "",
44075 + exclude: [],
44076 + sticky: "",
44077 + inherit: true,
44078 + taxQuery: null,
44079 + parents: []
44080 + }
44081 + },
44082 + tagName: {
44083 + type: "string",
44084 + default: "div"
44085 + },
44086 + displayLayout: {
44087 + type: "object",
44088 + default: {
44089 + type: "list"
44090 + }
44091 + },
44092 + namespace: {
44093 + type: "string"
44094 + }
44095 + },
44096 + supports: {
44097 + align: ["wide", "full"],
44098 + anchor: true,
44099 + html: false,
44100 + layout: true
44101 + },
44102 + save({ attributes: { tagName: Tag = "div" } }) {
44103 + const blockProps = external_wp_blockEditor_namespaceObject.useBlockProps.save();
44104 + const innerBlocksProps = external_wp_blockEditor_namespaceObject.useInnerBlocksProps.save(blockProps);
44105 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(Tag, { ...innerBlocksProps });
44106 + },
44107 + isEligible: ({ displayLayout }) => {
44108 + return !!displayLayout;
44109 + },
44110 + migrate: migrateDisplayLayout
44111 + };
44112 + const query_deprecated_deprecated = [query_deprecated_v5, query_deprecated_v4, query_deprecated_v3, query_deprecated_v2, query_deprecated_v1];
44113 + var query_deprecated_deprecated_default = query_deprecated_deprecated;
44114 +
44115 +
44116 + ;// ./node_modules/@wordpress/block-library/build-module/query/index.js
44117 +
44118 +
44119 +
44120 +
44121 +
44122 +
44123 +
44124 + const { name: query_name } = query_block_namespaceObject;
44125 + const query_settings = {
44126 + icon: loop_default,
44127 + edit: query_edit_edit_default,
44128 + example: {
44129 + viewportWidth: 650,
44130 + attributes: {
44131 + namespace: "core/posts-list",
44132 + query: {
44133 + perPage: 4,
44134 + pages: 1,
44135 + offset: 0,
44136 + postType: "post",
44137 + order: "desc",
44138 + orderBy: "date",
44139 + author: "",
44140 + search: "",
44141 + sticky: "exclude",
44142 + inherit: false
44143 + }
44144 + },
44145 + innerBlocks: [
44146 + {
44147 + name: "core/post-template",
44148 + attributes: {
44149 + layout: {
44150 + type: "grid",
44151 + columnCount: 2
44152 + }
44153 + },
44154 + innerBlocks: [
44155 + {
44156 + name: "core/post-title"
44157 + },
44158 + {
44159 + name: "core/post-date",
44160 + attributes: {
44161 + metadata: {
44162 + bindings: {
44163 + datetime: {
44164 + source: "core/post-data",
44165 + args: { field: "date" }
44166 + }
44167 + }
44168 + }
44169 + }
44170 + },
44171 + {
44172 + name: "core/post-excerpt"
44173 + }
44174 + ]
44175 + }
44176 + ]
44177 + },
44178 + save: query_save_save,
44179 + variations: query_variations_variations_default,
44180 + deprecated: query_deprecated_deprecated_default
44181 + };
44182 + const query_init = () => initBlock({ name: query_name, metadata: query_block_namespaceObject, settings: query_settings });
44183 +
44184 +
44185 + ;// ./node_modules/@wordpress/block-library/build-module/query-no-results/block.json
44186 + const query_no_results_block_namespaceObject = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/query-no-results","title":"No Results","category":"theme","description":"Contains the block elements used to render content when no query results are found.","ancestor":["core/query"],"textdomain":"default","usesContext":["queryId","query"],"supports":{"align":true,"reusable":false,"html":false,"color":{"gradients":true,"link":true},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"interactivity":{"clientNavigation":true}}}');
44187 + ;// ./node_modules/@wordpress/block-library/build-module/query-no-results/edit.js
44188 +
44189 +
44190 +
44191 + const query_no_results_edit_TEMPLATE = [
44192 + [
44193 + "core/paragraph",
44194 + {
44195 + placeholder: (0,external_wp_i18n_namespaceObject.__)(
44196 + "Add text or blocks that will display when a query returns no results."
44197 + )
44198 + }
44199 + ]
44200 + ];
44201 + function QueryNoResultsEdit() {
44202 + const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)();
44203 + const innerBlocksProps = (0,external_wp_blockEditor_namespaceObject.useInnerBlocksProps)(blockProps, {
44204 + template: query_no_results_edit_TEMPLATE
44205 + });
44206 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { ...innerBlocksProps });
44207 + }
44208 +
44209 +
44210 + ;// ./node_modules/@wordpress/block-library/build-module/query-no-results/save.js
44211 +
44212 +
44213 + function query_no_results_save_save() {
44214 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, {});
44215 + }
44216 +
44217 +
44218 + ;// ./node_modules/@wordpress/block-library/build-module/query-no-results/index.js
44219 +
44220 +
44221 +
44222 +
44223 +
44224 +
44225 + const { name: query_no_results_name } = query_no_results_block_namespaceObject;
44226 + const query_no_results_settings = {
44227 + icon: loop_default,
44228 + edit: QueryNoResultsEdit,
44229 + save: query_no_results_save_save,
44230 + example: {
44231 + innerBlocks: [
44232 + {
44233 + name: "core/paragraph",
44234 + attributes: {
44235 + content: (0,external_wp_i18n_namespaceObject.__)("No posts were found.")
44236 + }
44237 + }
44238 + ]
44239 + }
44240 + };
44241 + const query_no_results_init = () => initBlock({ name: query_no_results_name, metadata: query_no_results_block_namespaceObject, settings: query_no_results_settings });
44242 +
44243 +
44244 + ;// ./node_modules/@wordpress/block-library/build-module/query-pagination/block.json
44245 + const query_pagination_block_namespaceObject = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/query-pagination","title":"Pagination","category":"theme","ancestor":["core/query"],"allowedBlocks":["core/query-pagination-previous","core/query-pagination-numbers","core/query-pagination-next"],"description":"Displays a paginated navigation to next/previous set of posts, when applicable.","textdomain":"default","attributes":{"paginationArrow":{"type":"string","default":"none"},"showLabel":{"type":"boolean","default":true}},"usesContext":["queryId","query"],"providesContext":{"paginationArrow":"paginationArrow","showLabel":"showLabel"},"supports":{"align":true,"reusable":false,"html":false,"color":{"gradients":true,"link":true,"__experimentalDefaultControls":{"background":true,"text":true,"link":true}},"layout":{"allowSwitching":false,"allowInheriting":false,"default":{"type":"flex"}},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"interactivity":{"clientNavigation":true}},"editorStyle":"wp-block-query-pagination-editor","style":"wp-block-query-pagination"}');
44246 + ;// ./node_modules/@wordpress/block-library/build-module/query-pagination/query-pagination-arrow-controls.js
44247 +
44248 +
44249 +
44250 + function QueryPaginationArrowControls({ value, onChange }) {
44251 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(
44252 + external_wp_components_namespaceObject.__experimentalToggleGroupControl,
44253 + {
44254 + __next40pxDefaultSize: true,
44255 + __nextHasNoMarginBottom: true,
44256 + label: (0,external_wp_i18n_namespaceObject.__)("Arrow"),
44257 + value,
44258 + onChange,
44259 + help: (0,external_wp_i18n_namespaceObject.__)(
44260 + "A decorative arrow appended to the next and previous page link."
44261 + ),
44262 + isBlock: true,
44263 + children: [
44264 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
44265 + external_wp_components_namespaceObject.__experimentalToggleGroupControlOption,
44266 + {
44267 + value: "none",
44268 + label: (0,external_wp_i18n_namespaceObject._x)(
44269 + "None",
44270 + "Arrow option for Query Pagination Next/Previous blocks"
44271 + )
44272 + }
44273 + ),
44274 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
44275 + external_wp_components_namespaceObject.__experimentalToggleGroupControlOption,
44276 + {
44277 + value: "arrow",
44278 + label: (0,external_wp_i18n_namespaceObject._x)(
44279 + "Arrow",
44280 + "Arrow option for Query Pagination Next/Previous blocks"
44281 + )
44282 + }
44283 + ),
44284 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
44285 + external_wp_components_namespaceObject.__experimentalToggleGroupControlOption,
44286 + {
44287 + value: "chevron",
44288 + label: (0,external_wp_i18n_namespaceObject._x)(
44289 + "Chevron",
44290 + "Arrow option for Query Pagination Next/Previous blocks"
44291 + )
44292 + }
44293 + )
44294 + ]
44295 + }
44296 + );
44297 + }
44298 +
44299 +
44300 + ;// ./node_modules/@wordpress/block-library/build-module/query-pagination/query-pagination-label-control.js
44301 +
44302 +
44303 +
44304 + function QueryPaginationLabelControl({ value, onChange }) {
44305 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
44306 + external_wp_components_namespaceObject.ToggleControl,
44307 + {
44308 + __nextHasNoMarginBottom: true,
44309 + label: (0,external_wp_i18n_namespaceObject.__)("Show label text"),
44310 + help: (0,external_wp_i18n_namespaceObject.__)('Make label text visible, e.g. "Next Page".'),
44311 + onChange,
44312 + checked: value === true
44313 + }
44314 + );
44315 + }
44316 +
44317 +
44318 + ;// ./node_modules/@wordpress/block-library/build-module/query-pagination/edit.js
44319 +
44320 +
44321 +
44322 +
44323 +
44324 +
44325 +
44326 +
44327 +
44328 + const query_pagination_edit_TEMPLATE = [
44329 + ["core/query-pagination-previous"],
44330 + ["core/query-pagination-numbers"],
44331 + ["core/query-pagination-next"]
44332 + ];
44333 + function edit_QueryPaginationEdit({
44334 + attributes: { paginationArrow, showLabel },
44335 + setAttributes,
44336 + clientId
44337 + }) {
44338 + const hasNextPreviousBlocks = (0,external_wp_data_namespaceObject.useSelect)(
44339 + (select) => {
44340 + const { getBlocks } = select(external_wp_blockEditor_namespaceObject.store);
44341 + const innerBlocks = getBlocks(clientId);
44342 + return innerBlocks?.find((innerBlock) => {
44343 + return [
44344 + "core/query-pagination-next",
44345 + "core/query-pagination-previous"
44346 + ].includes(innerBlock.name);
44347 + });
44348 + },
44349 + [clientId]
44350 + );
44351 + const { __unstableMarkNextChangeAsNotPersistent } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_blockEditor_namespaceObject.store);
44352 + const dropdownMenuProps = useToolsPanelDropdownMenuProps();
44353 + const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)();
44354 + const innerBlocksProps = (0,external_wp_blockEditor_namespaceObject.useInnerBlocksProps)(blockProps, {
44355 + template: query_pagination_edit_TEMPLATE
44356 + });
44357 + (0,external_wp_element_namespaceObject.useEffect)(() => {
44358 + if (paginationArrow === "none" && !showLabel) {
44359 + __unstableMarkNextChangeAsNotPersistent();
44360 + setAttributes({ showLabel: true });
44361 + }
44362 + }, [
44363 + paginationArrow,
44364 + setAttributes,
44365 + showLabel,
44366 + __unstableMarkNextChangeAsNotPersistent
44367 + ]);
44368 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
44369 + hasNextPreviousBlocks && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(
44370 + external_wp_components_namespaceObject.__experimentalToolsPanel,
44371 + {
44372 + label: (0,external_wp_i18n_namespaceObject.__)("Settings"),
44373 + resetAll: () => {
44374 + setAttributes({
44375 + paginationArrow: "none",
44376 + showLabel: true
44377 + });
44378 + },
44379 + dropdownMenuProps,
44380 + children: [
44381 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
44382 + external_wp_components_namespaceObject.__experimentalToolsPanelItem,
44383 + {
44384 + hasValue: () => paginationArrow !== "none",
44385 + label: (0,external_wp_i18n_namespaceObject.__)("Pagination arrow"),
44386 + onDeselect: () => setAttributes({ paginationArrow: "none" }),
44387 + isShownByDefault: true,
44388 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
44389 + QueryPaginationArrowControls,
44390 + {
44391 + value: paginationArrow,
44392 + onChange: (value) => {
44393 + setAttributes({ paginationArrow: value });
44394 + }
44395 + }
44396 + )
44397 + }
44398 + ),
44399 + paginationArrow !== "none" && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
44400 + external_wp_components_namespaceObject.__experimentalToolsPanelItem,
44401 + {
44402 + hasValue: () => !showLabel,
44403 + label: (0,external_wp_i18n_namespaceObject.__)("Show text"),
44404 + onDeselect: () => setAttributes({ showLabel: true }),
44405 + isShownByDefault: true,
44406 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
44407 + QueryPaginationLabelControl,
44408 + {
44409 + value: showLabel,
44410 + onChange: (value) => {
44411 + setAttributes({ showLabel: value });
44412 + }
44413 + }
44414 + )
44415 + }
44416 + )
44417 + ]
44418 + }
44419 + ) }),
44420 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("nav", { ...innerBlocksProps })
44421 + ] });
44422 + }
44423 +
44424 +
44425 + ;// ./node_modules/@wordpress/block-library/build-module/query-pagination/save.js
44426 +
44427 +
44428 + function query_pagination_save_save() {
44429 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, {});
44430 + }
44431 +
44432 +
44433 + ;// ./node_modules/@wordpress/block-library/build-module/query-pagination/deprecated.js
44434 +
44435 +
44436 + const query_pagination_deprecated_deprecated = [
44437 + // Version with wrapper `div` element.
44438 + {
44439 + save() {
44440 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { ...external_wp_blockEditor_namespaceObject.useBlockProps.save(), children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, {}) });
44441 + }
44442 + }
44443 + ];
44444 + var query_pagination_deprecated_deprecated_default = query_pagination_deprecated_deprecated;
44445 +
44446 +
44447 + ;// ./node_modules/@wordpress/block-library/build-module/query-pagination/index.js
44448 +
44449 +
44450 +
44451 +
44452 +
44453 +
44454 + const { name: query_pagination_name } = query_pagination_block_namespaceObject;
44455 + const query_pagination_settings = {
44456 + icon: query_pagination_default,
44457 + edit: edit_QueryPaginationEdit,
44458 + save: query_pagination_save_save,
44459 + deprecated: query_pagination_deprecated_deprecated_default
44460 + };
44461 + const query_pagination_init = () => initBlock({ name: query_pagination_name, metadata: query_pagination_block_namespaceObject, settings: query_pagination_settings });
44462 +
44463 +
44464 + ;// ./node_modules/@wordpress/block-library/build-module/query-pagination-next/block.json
44465 + const query_pagination_next_block_namespaceObject = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/query-pagination-next","title":"Next Page","category":"theme","parent":["core/query-pagination"],"description":"Displays the next posts page link.","textdomain":"default","attributes":{"label":{"type":"string"}},"usesContext":["queryId","query","paginationArrow","showLabel","enhancedPagination"],"supports":{"reusable":false,"html":false,"color":{"gradients":true,"text":false,"__experimentalDefaultControls":{"background":true}},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"interactivity":{"clientNavigation":true}}}');
44466 + ;// ./node_modules/@wordpress/block-library/build-module/query-pagination-next/edit.js
44467 +
44468 +
44469 +
44470 + const query_pagination_next_edit_arrowMap = {
44471 + none: "",
44472 + arrow: "\u2192",
44473 + chevron: "\xBB"
44474 + };
44475 + function QueryPaginationNextEdit({
44476 + attributes: { label },
44477 + setAttributes,
44478 + context: { paginationArrow, showLabel }
44479 + }) {
44480 + const displayArrow = query_pagination_next_edit_arrowMap[paginationArrow];
44481 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(
44482 + "a",
44483 + {
44484 + href: "#pagination-next-pseudo-link",
44485 + onClick: (event) => event.preventDefault(),
44486 + ...(0,external_wp_blockEditor_namespaceObject.useBlockProps)(),
44487 + children: [
44488 + showLabel && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
44489 + external_wp_blockEditor_namespaceObject.PlainText,
44490 + {
44491 + __experimentalVersion: 2,
44492 + tagName: "span",
44493 + "aria-label": (0,external_wp_i18n_namespaceObject.__)("Next page link"),
44494 + placeholder: (0,external_wp_i18n_namespaceObject.__)("Next Page"),
44495 + value: label,
44496 + onChange: (newLabel) => setAttributes({ label: newLabel })
44497 + }
44498 + ),
44499 + displayArrow && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
44500 + "span",
44501 + {
44502 + className: `wp-block-query-pagination-next-arrow is-arrow-${paginationArrow}`,
44503 + "aria-hidden": true,
44504 + children: displayArrow
44505 + }
44506 + )
44507 + ]
44508 + }
44509 + );
44510 + }
44511 +
44512 +
44513 + ;// ./node_modules/@wordpress/block-library/build-module/query-pagination-next/index.js
44514 +
44515 +
44516 +
44517 +
44518 + const { name: query_pagination_next_name } = query_pagination_next_block_namespaceObject;
44519 + const query_pagination_next_settings = {
44520 + icon: query_pagination_next_default,
44521 + edit: QueryPaginationNextEdit
44522 + };
44523 + const query_pagination_next_init = () => initBlock({ name: query_pagination_next_name, metadata: query_pagination_next_block_namespaceObject, settings: query_pagination_next_settings });
44524 +
44525 +
44526 + ;// ./node_modules/@wordpress/block-library/build-module/query-pagination-numbers/block.json
44527 + const query_pagination_numbers_block_namespaceObject = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/query-pagination-numbers","title":"Page Numbers","category":"theme","parent":["core/query-pagination"],"description":"Displays a list of page numbers for pagination.","textdomain":"default","attributes":{"midSize":{"type":"number","default":2}},"usesContext":["queryId","query","enhancedPagination"],"supports":{"reusable":false,"html":false,"color":{"gradients":true,"text":false,"__experimentalDefaultControls":{"background":true}},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"interactivity":{"clientNavigation":true}},"editorStyle":"wp-block-query-pagination-numbers-editor"}');
44528 + ;// ./node_modules/@wordpress/block-library/build-module/query-pagination-numbers/edit.js
44529 +
44530 +
44531 +
44532 +
44533 +
44534 + const createPaginationItem = (content, Tag = "a", extraClass = "") => /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(Tag, { className: `page-numbers ${extraClass}`, children: content }, content);
44535 + const previewPaginationNumbers = (midSize) => {
44536 + const paginationItems = [];
44537 + for (let i = 1; i <= midSize; i++) {
44538 + paginationItems.push(createPaginationItem(i));
44539 + }
44540 + paginationItems.push(
44541 + createPaginationItem(midSize + 1, "span", "current")
44542 + );
44543 + for (let i = 1; i <= midSize; i++) {
44544 + paginationItems.push(createPaginationItem(midSize + 1 + i));
44545 + }
44546 + paginationItems.push(createPaginationItem("...", "span", "dots"));
44547 + paginationItems.push(createPaginationItem(midSize * 2 + 3));
44548 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: paginationItems });
44549 + };
44550 + function QueryPaginationNumbersEdit({
44551 + attributes,
44552 + setAttributes
44553 + }) {
44554 + const { midSize } = attributes;
44555 + const paginationNumbers = previewPaginationNumbers(
44556 + parseInt(midSize, 10)
44557 + );
44558 + const dropdownMenuProps = useToolsPanelDropdownMenuProps();
44559 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
44560 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
44561 + external_wp_components_namespaceObject.__experimentalToolsPanel,
44562 + {
44563 + label: (0,external_wp_i18n_namespaceObject.__)("Settings"),
44564 + resetAll: () => setAttributes({ midSize: 2 }),
44565 + dropdownMenuProps,
44566 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
44567 + external_wp_components_namespaceObject.__experimentalToolsPanelItem,
44568 + {
44569 + label: (0,external_wp_i18n_namespaceObject.__)("Number of links"),
44570 + hasValue: () => midSize !== 2,
44571 + onDeselect: () => setAttributes({ midSize: 2 }),
44572 + isShownByDefault: true,
44573 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
44574 + external_wp_components_namespaceObject.RangeControl,
44575 + {
44576 + __next40pxDefaultSize: true,
44577 + __nextHasNoMarginBottom: true,
44578 + label: (0,external_wp_i18n_namespaceObject.__)("Number of links"),
44579 + help: (0,external_wp_i18n_namespaceObject.__)(
44580 + "Specify how many links can appear before and after the current page number. Links to the first, current and last page are always visible."
44581 + ),
44582 + value: midSize,
44583 + onChange: (value) => {
44584 + setAttributes({
44585 + midSize: parseInt(value, 10)
44586 + });
44587 + },
44588 + min: 0,
44589 + max: 5,
44590 + withInputField: false
44591 + }
44592 + )
44593 + }
44594 + )
44595 + }
44596 + ) }),
44597 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { ...(0,external_wp_blockEditor_namespaceObject.useBlockProps)(), children: paginationNumbers })
44598 + ] });
44599 + }
44600 +
44601 +
44602 + ;// ./node_modules/@wordpress/block-library/build-module/query-pagination-numbers/index.js
44603 +
44604 +
44605 +
44606 +
44607 + const { name: query_pagination_numbers_name } = query_pagination_numbers_block_namespaceObject;
44608 + const query_pagination_numbers_settings = {
44609 + icon: query_pagination_numbers_default,
44610 + edit: QueryPaginationNumbersEdit,
44611 + example: {}
44612 + };
44613 + const query_pagination_numbers_init = () => initBlock({ name: query_pagination_numbers_name, metadata: query_pagination_numbers_block_namespaceObject, settings: query_pagination_numbers_settings });
44614 +
44615 +
44616 + ;// ./node_modules/@wordpress/block-library/build-module/query-pagination-previous/block.json
44617 + const query_pagination_previous_block_namespaceObject = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/query-pagination-previous","title":"Previous Page","category":"theme","parent":["core/query-pagination"],"description":"Displays the previous posts page link.","textdomain":"default","attributes":{"label":{"type":"string"}},"usesContext":["queryId","query","paginationArrow","showLabel","enhancedPagination"],"supports":{"reusable":false,"html":false,"color":{"gradients":true,"text":false,"__experimentalDefaultControls":{"background":true}},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"interactivity":{"clientNavigation":true}}}');
44618 + ;// ./node_modules/@wordpress/block-library/build-module/query-pagination-previous/edit.js
44619 +
44620 +
44621 +
44622 + const query_pagination_previous_edit_arrowMap = {
44623 + none: "",
44624 + arrow: "\u2190",
44625 + chevron: "\xAB"
44626 + };
44627 + function QueryPaginationPreviousEdit({
44628 + attributes: { label },
44629 + setAttributes,
44630 + context: { paginationArrow, showLabel }
44631 + }) {
44632 + const displayArrow = query_pagination_previous_edit_arrowMap[paginationArrow];
44633 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(
44634 + "a",
44635 + {
44636 + href: "#pagination-previous-pseudo-link",
44637 + onClick: (event) => event.preventDefault(),
44638 + ...(0,external_wp_blockEditor_namespaceObject.useBlockProps)(),
44639 + children: [
44640 + displayArrow && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
44641 + "span",
44642 + {
44643 + className: `wp-block-query-pagination-previous-arrow is-arrow-${paginationArrow}`,
44644 + "aria-hidden": true,
44645 + children: displayArrow
44646 + }
44647 + ),
44648 + showLabel && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
44649 + external_wp_blockEditor_namespaceObject.PlainText,
44650 + {
44651 + __experimentalVersion: 2,
44652 + tagName: "span",
44653 + "aria-label": (0,external_wp_i18n_namespaceObject.__)("Previous page link"),
44654 + placeholder: (0,external_wp_i18n_namespaceObject.__)("Previous Page"),
44655 + value: label,
44656 + onChange: (newLabel) => setAttributes({ label: newLabel })
44657 + }
44658 + )
44659 + ]
44660 + }
44661 + );
44662 + }
44663 +
44664 +
44665 + ;// ./node_modules/@wordpress/block-library/build-module/query-pagination-previous/index.js
44666 +
44667 +
44668 +
44669 +
44670 + const { name: query_pagination_previous_name } = query_pagination_previous_block_namespaceObject;
44671 + const query_pagination_previous_settings = {
44672 + icon: query_pagination_previous_default,
44673 + edit: QueryPaginationPreviousEdit
44674 + };
44675 + const query_pagination_previous_init = () => initBlock({ name: query_pagination_previous_name, metadata: query_pagination_previous_block_namespaceObject, settings: query_pagination_previous_settings });
44676 +
44677 +
44678 + ;// ./node_modules/@wordpress/block-library/build-module/query-title/block.json
44679 + const query_title_block_namespaceObject = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/query-title","title":"Query Title","category":"theme","description":"Display the query title.","textdomain":"default","attributes":{"type":{"type":"string"},"textAlign":{"type":"string"},"level":{"type":"number","default":1},"levelOptions":{"type":"array"},"showPrefix":{"type":"boolean","default":true},"showSearchTerm":{"type":"boolean","default":true}},"example":{"attributes":{"type":"search"}},"usesContext":["query"],"supports":{"align":["wide","full"],"html":false,"color":{"gradients":true,"__experimentalDefaultControls":{"background":true,"text":true}},"spacing":{"margin":true,"padding":true},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontStyle":true,"__experimentalFontWeight":true,"__experimentalLetterSpacing":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalDefaultControls":{"fontSize":true}},"interactivity":{"clientNavigation":true},"__experimentalBorder":{"radius":true,"color":true,"width":true,"style":true,"__experimentalDefaultControls":{"radius":true,"color":true,"width":true,"style":true}}},"style":"wp-block-query-title"}');
44680 + ;// ./node_modules/@wordpress/block-library/build-module/query-title/use-archive-label.js
44681 +
44682 +
44683 + function useArchiveLabel() {
44684 + const templateSlug = (0,external_wp_data_namespaceObject.useSelect)((select) => {
44685 + const { getCurrentPostId, getCurrentPostType, getCurrentTemplateId } = select("core/editor");
44686 + const currentPostType = getCurrentPostType();
44687 + const templateId = getCurrentTemplateId() || (currentPostType === "wp_template" ? getCurrentPostId() : null);
44688 + return templateId ? select(external_wp_coreData_namespaceObject.store).getEditedEntityRecord(
44689 + "postType",
44690 + "wp_template",
44691 + templateId
44692 + )?.slug : null;
44693 + }, []);
44694 + const taxonomyMatches = templateSlug?.match(
44695 + /^(category|tag|taxonomy-([^-]+))$|^(((category|tag)|taxonomy-([^-]+))-(.+))$/
44696 + );
44697 + let taxonomy;
44698 + let term;
44699 + let isAuthor = false;
44700 + let authorSlug;
44701 + if (taxonomyMatches) {
44702 + if (taxonomyMatches[1]) {
44703 + taxonomy = taxonomyMatches[2] ? taxonomyMatches[2] : taxonomyMatches[1];
44704 + } else if (taxonomyMatches[3]) {
44705 + taxonomy = taxonomyMatches[6] ? taxonomyMatches[6] : taxonomyMatches[4];
44706 + term = taxonomyMatches[7];
44707 + }
44708 + taxonomy = taxonomy === "tag" ? "post_tag" : taxonomy;
44709 + } else {
44710 + const authorMatches = templateSlug?.match(/^(author)$|^author-(.+)$/);
44711 + if (authorMatches) {
44712 + isAuthor = true;
44713 + if (authorMatches[2]) {
44714 + authorSlug = authorMatches[2];
44715 + }
44716 + }
44717 + }
44718 + return (0,external_wp_data_namespaceObject.useSelect)(
44719 + (select) => {
44720 + const { getEntityRecords, getTaxonomy, getAuthors } = select(external_wp_coreData_namespaceObject.store);
44721 + let archiveTypeLabel;
44722 + let archiveNameLabel;
44723 + if (taxonomy) {
44724 + archiveTypeLabel = getTaxonomy(taxonomy)?.labels?.singular_name;
44725 + }
44726 + if (term) {
44727 + const records = getEntityRecords("taxonomy", taxonomy, {
44728 + slug: term,
44729 + per_page: 1
44730 + });
44731 + if (records && records[0]) {
44732 + archiveNameLabel = records[0].name;
44733 + }
44734 + }
44735 + if (isAuthor) {
44736 + archiveTypeLabel = "Author";
44737 + if (authorSlug) {
44738 + const authorRecords = getAuthors({ slug: authorSlug });
44739 + if (authorRecords && authorRecords[0]) {
44740 + archiveNameLabel = authorRecords[0].name;
44741 + }
44742 + }
44743 + }
44744 + return {
44745 + archiveTypeLabel,
44746 + archiveNameLabel
44747 + };
44748 + },
44749 + [authorSlug, isAuthor, taxonomy, term]
44750 + );
44751 + }
44752 +
44753 +
44754 + ;// ./node_modules/@wordpress/block-library/build-module/query-title/use-post-type-label.js
44755 +
44756 +
44757 + function usePostTypeLabel(contextPostType) {
44758 + const currentPostType = (0,external_wp_data_namespaceObject.useSelect)((select) => {
44759 + const { getCurrentPostType } = select("core/editor");
44760 + return getCurrentPostType();
44761 + }, []);
44762 + return (0,external_wp_data_namespaceObject.useSelect)(
44763 + (select) => {
44764 + const { getPostType } = select(external_wp_coreData_namespaceObject.store);
44765 + const postTypeSlug = contextPostType || currentPostType;
44766 + const postType = getPostType(postTypeSlug);
44767 + return {
44768 + postTypeLabel: postType ? postType.labels.singular_name : ""
44769 + };
44770 + },
44771 + [contextPostType, currentPostType]
44772 + );
44773 + }
44774 +
44775 +
44776 + ;// ./node_modules/@wordpress/block-library/build-module/query-title/edit.js
44777 +
44778 +
44779 +
44780 +
44781 +
44782 +
44783 +
44784 +
44785 + const SUPPORTED_TYPES = ["archive", "search", "post-type"];
44786 + function QueryTitleEdit({
44787 + attributes: {
44788 + type,
44789 + level,
44790 + levelOptions,
44791 + textAlign,
44792 + showPrefix,
44793 + showSearchTerm
44794 + },
44795 + setAttributes,
44796 + context: { query }
44797 + }) {
44798 + const { archiveTypeLabel, archiveNameLabel } = useArchiveLabel();
44799 + const { postTypeLabel } = usePostTypeLabel(query?.postType);
44800 + const dropdownMenuProps = useToolsPanelDropdownMenuProps();
44801 + const TagName = level === 0 ? "p" : `h${level}`;
44802 + const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)({
44803 + className: dist_clsx("wp-block-query-title__placeholder", {
44804 + [`has-text-align-${textAlign}`]: textAlign
44805 + })
44806 + });
44807 + if (!SUPPORTED_TYPES.includes(type)) {
44808 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { ...blockProps, children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.Warning, { children: (0,external_wp_i18n_namespaceObject.__)("Provided type is not supported.") }) });
44809 + }
44810 + let titleElement;
44811 + if (type === "archive") {
44812 + let title;
44813 + if (archiveTypeLabel) {
44814 + if (showPrefix) {
44815 + if (archiveNameLabel) {
44816 + title = (0,external_wp_i18n_namespaceObject.sprintf)(
44817 + /* translators: 1: Archive type title e.g: "Category", 2: Label of the archive e.g: "Shoes" */
44818 + (0,external_wp_i18n_namespaceObject._x)("%1$s: %2$s", "archive label"),
44819 + archiveTypeLabel,
44820 + archiveNameLabel
44821 + );
44822 + } else {
44823 + title = (0,external_wp_i18n_namespaceObject.sprintf)(
44824 + /* translators: %s: Archive type title e.g: "Category", "Tag"... */
44825 + (0,external_wp_i18n_namespaceObject.__)("%s: Name"),
44826 + archiveTypeLabel
44827 + );
44828 + }
44829 + } else if (archiveNameLabel) {
44830 + title = archiveNameLabel;
44831 + } else {
44832 + title = (0,external_wp_i18n_namespaceObject.sprintf)(
44833 + /* translators: %s: Archive type title e.g: "Category", "Tag"... */
44834 + (0,external_wp_i18n_namespaceObject.__)("%s name"),
44835 + archiveTypeLabel
44836 + );
44837 + }
44838 + } else {
44839 + title = showPrefix ? (0,external_wp_i18n_namespaceObject.__)("Archive type: Name") : (0,external_wp_i18n_namespaceObject.__)("Archive title");
44840 + }
44841 + titleElement = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
44842 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
44843 + external_wp_components_namespaceObject.__experimentalToolsPanel,
44844 + {
44845 + label: (0,external_wp_i18n_namespaceObject.__)("Settings"),
44846 + resetAll: () => setAttributes({
44847 + showPrefix: true
44848 + }),
44849 + dropdownMenuProps,
44850 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
44851 + external_wp_components_namespaceObject.__experimentalToolsPanelItem,
44852 + {
44853 + hasValue: () => !showPrefix,
44854 + label: (0,external_wp_i18n_namespaceObject.__)("Show archive type in title"),
44855 + onDeselect: () => setAttributes({ showPrefix: true }),
44856 + isShownByDefault: true,
44857 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
44858 + external_wp_components_namespaceObject.ToggleControl,
44859 + {
44860 + __nextHasNoMarginBottom: true,
44861 + label: (0,external_wp_i18n_namespaceObject.__)("Show archive type in title"),
44862 + onChange: () => setAttributes({
44863 + showPrefix: !showPrefix
44864 + }),
44865 + checked: showPrefix
44866 + }
44867 + )
44868 + }
44869 + )
44870 + }
44871 + ) }),
44872 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(TagName, { ...blockProps, children: title })
44873 + ] });
44874 + }
44875 + if (type === "search") {
44876 + titleElement = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
44877 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
44878 + external_wp_components_namespaceObject.__experimentalToolsPanel,
44879 + {
44880 + label: (0,external_wp_i18n_namespaceObject.__)("Settings"),
44881 + resetAll: () => setAttributes({
44882 + showSearchTerm: true
44883 + }),
44884 + dropdownMenuProps,
44885 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
44886 + external_wp_components_namespaceObject.__experimentalToolsPanelItem,
44887 + {
44888 + hasValue: () => !showSearchTerm,
44889 + label: (0,external_wp_i18n_namespaceObject.__)("Show search term in title"),
44890 + onDeselect: () => setAttributes({ showSearchTerm: true }),
44891 + isShownByDefault: true,
44892 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
44893 + external_wp_components_namespaceObject.ToggleControl,
44894 + {
44895 + __nextHasNoMarginBottom: true,
44896 + label: (0,external_wp_i18n_namespaceObject.__)("Show search term in title"),
44897 + onChange: () => setAttributes({
44898 + showSearchTerm: !showSearchTerm
44899 + }),
44900 + checked: showSearchTerm
44901 + }
44902 + )
44903 + }
44904 + )
44905 + }
44906 + ) }),
44907 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(TagName, { ...blockProps, children: showSearchTerm ? (0,external_wp_i18n_namespaceObject.__)("Search results for: \u201Csearch term\u201D") : (0,external_wp_i18n_namespaceObject.__)("Search results") })
44908 + ] });
44909 + }
44910 + if (type === "post-type") {
44911 + let title;
44912 + if (postTypeLabel) {
44913 + if (showPrefix) {
44914 + title = (0,external_wp_i18n_namespaceObject.sprintf)(
44915 + /* translators: %s: Singular post type name of the queried object */
44916 + (0,external_wp_i18n_namespaceObject.__)('Post Type: "%s"'),
44917 + postTypeLabel
44918 + );
44919 + } else {
44920 + title = postTypeLabel;
44921 + }
44922 + } else {
44923 + title = showPrefix ? (0,external_wp_i18n_namespaceObject.__)("Post Type: Name") : (0,external_wp_i18n_namespaceObject.__)("Name");
44924 + }
44925 + titleElement = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
44926 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
44927 + external_wp_components_namespaceObject.__experimentalToolsPanel,
44928 + {
44929 + label: (0,external_wp_i18n_namespaceObject.__)("Settings"),
44930 + resetAll: () => setAttributes({
44931 + showPrefix: true
44932 + }),
44933 + dropdownMenuProps,
44934 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
44935 + external_wp_components_namespaceObject.__experimentalToolsPanelItem,
44936 + {
44937 + hasValue: () => !showPrefix,
44938 + label: (0,external_wp_i18n_namespaceObject.__)("Show post type label"),
44939 + onDeselect: () => setAttributes({ showPrefix: true }),
44940 + isShownByDefault: true,
44941 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
44942 + external_wp_components_namespaceObject.ToggleControl,
44943 + {
44944 + __nextHasNoMarginBottom: true,
44945 + label: (0,external_wp_i18n_namespaceObject.__)("Show post type label"),
44946 + onChange: () => setAttributes({
44947 + showPrefix: !showPrefix
44948 + }),
44949 + checked: showPrefix
44950 + }
44951 + )
44952 + }
44953 + )
44954 + }
44955 + ) }),
44956 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(TagName, { ...blockProps, children: title })
44957 + ] });
44958 + }
44959 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
44960 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_blockEditor_namespaceObject.BlockControls, { group: "block", children: [
44961 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
44962 + external_wp_blockEditor_namespaceObject.HeadingLevelDropdown,
44963 + {
44964 + value: level,
44965 + options: levelOptions,
44966 + onChange: (newLevel) => setAttributes({ level: newLevel })
44967 + }
44968 + ),
44969 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
44970 + external_wp_blockEditor_namespaceObject.AlignmentControl,
44971 + {
44972 + value: textAlign,
44973 + onChange: (nextAlign) => {
44974 + setAttributes({ textAlign: nextAlign });
44975 + }
44976 + }
44977 + )
44978 + ] }),
44979 + titleElement
44980 + ] });
44981 + }
44982 +
44983 +
44984 + ;// ./node_modules/@wordpress/block-library/build-module/query-title/variations.js
44985 +
44986 +
44987 + const query_title_variations_variations = [
44988 + {
44989 + isDefault: true,
44990 + name: "archive-title",
44991 + title: (0,external_wp_i18n_namespaceObject.__)("Archive Title"),
44992 + description: (0,external_wp_i18n_namespaceObject.__)(
44993 + "Display the archive title based on the queried object."
44994 + ),
44995 + icon: title_default,
44996 + attributes: {
44997 + type: "archive"
44998 + },
44999 + scope: ["inserter"]
45000 + },
45001 + {
45002 + isDefault: false,
45003 + name: "search-title",
45004 + title: (0,external_wp_i18n_namespaceObject.__)("Search Results Title"),
45005 + description: (0,external_wp_i18n_namespaceObject.__)(
45006 + "Display the search results title based on the queried object."
45007 + ),
45008 + icon: title_default,
45009 + attributes: {
45010 + type: "search"
45011 + },
45012 + scope: ["inserter"]
45013 + },
45014 + {
45015 + isDefault: false,
45016 + name: "post-type-label",
45017 + title: (0,external_wp_i18n_namespaceObject.__)("Post Type Label"),
45018 + description: (0,external_wp_i18n_namespaceObject.__)(
45019 + "Display the post type label based on the queried object."
45020 + ),
45021 + icon: title_default,
45022 + attributes: {
45023 + type: "post-type"
45024 + },
45025 + scope: ["inserter"]
45026 + }
45027 + ];
45028 + query_title_variations_variations.forEach((variation) => {
45029 + if (variation.isActive) {
45030 + return;
45031 + }
45032 + variation.isActive = (blockAttributes, variationAttributes) => blockAttributes.type === variationAttributes.type;
45033 + });
45034 + var query_title_variations_variations_default = query_title_variations_variations;
45035 +
45036 +
45037 + ;// ./node_modules/@wordpress/block-library/build-module/query-title/deprecated.js
45038 +
45039 + const query_title_deprecated_v1 = {
45040 + attributes: {
45041 + type: {
45042 + type: "string"
45043 + },
45044 + textAlign: {
45045 + type: "string"
45046 + },
45047 + level: {
45048 + type: "number",
45049 + default: 1
45050 + }
45051 + },
45052 + supports: {
45053 + align: ["wide", "full"],
45054 + html: false,
45055 + color: {
45056 + gradients: true
45057 + },
45058 + spacing: {
45059 + margin: true
45060 + },
45061 + typography: {
45062 + fontSize: true,
45063 + lineHeight: true,
45064 + __experimentalFontFamily: true
45065 + }
45066 + },
45067 + save() {
45068 + return null;
45069 + },
45070 + migrate: migrate_font_family_default,
45071 + isEligible({ style }) {
45072 + return style?.typography?.fontFamily;
45073 + }
45074 + };
45075 + var query_title_deprecated_deprecated_default = [query_title_deprecated_v1];
45076 +
45077 +
45078 + ;// ./node_modules/@wordpress/block-library/build-module/query-title/index.js
45079 +
45080 +
45081 +
45082 +
45083 +
45084 +
45085 + const { name: query_title_name } = query_title_block_namespaceObject;
45086 + const query_title_settings = {
45087 + icon: title_default,
45088 + edit: QueryTitleEdit,
45089 + variations: query_title_variations_variations_default,
45090 + deprecated: query_title_deprecated_deprecated_default
45091 + };
45092 + const query_title_init = () => initBlock({ name: query_title_name, metadata: query_title_block_namespaceObject, settings: query_title_settings });
45093 +
45094 +
45095 + ;// ./node_modules/@wordpress/block-library/build-module/query-total/block.json
45096 + const query_total_block_namespaceObject = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/query-total","title":"Query Total","category":"theme","ancestor":["core/query"],"description":"Display the total number of results in a query.","textdomain":"default","attributes":{"displayType":{"type":"string","default":"total-results"}},"usesContext":["queryId","query"],"supports":{"align":["wide","full"],"html":false,"spacing":{"margin":true,"padding":true},"color":{"gradients":true,"__experimentalDefaultControls":{"background":true,"text":true}},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"__experimentalBorder":{"radius":true,"color":true,"width":true,"style":true,"__experimentalDefaultControls":{"radius":true,"color":true,"width":true,"style":true}},"interactivity":{"clientNavigation":true}},"style":"wp-block-query-total"}');
45097 + ;// ./node_modules/@wordpress/block-library/build-module/query-total/icons.js
45098 +
45099 +
45100 + const resultsFound = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
45101 + external_wp_components_namespaceObject.SVG,
45102 + {
45103 + xmlns: "http://www.w3.org/2000/svg",
45104 + viewBox: "0 0 24 24",
45105 + width: "24",
45106 + height: "24",
45107 + "aria-hidden": "true",
45108 + focusable: "false",
45109 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Path, { d: "M4 11h4v2H4v-2zm6 0h6v2h-6v-2zm8 0h2v2h-2v-2z" })
45110 + }
45111 + );
45112 + const displayingResults = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
45113 + external_wp_components_namespaceObject.SVG,
45114 + {
45115 + xmlns: "http://www.w3.org/2000/svg",
45116 + viewBox: "0 0 24 24",
45117 + width: "24",
45118 + height: "24",
45119 + "aria-hidden": "true",
45120 + focusable: "false",
45121 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Path, { d: "M4 13h2v-2H4v2zm4 0h10v-2H8v2zm12 0h2v-2h-2v2z" })
45122 + }
45123 + );
45124 + const queryTotal = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
45125 + external_wp_components_namespaceObject.SVG,
45126 + {
45127 + xmlns: "http://www.w3.org/2000/svg",
45128 + viewBox: "0 0 24 24",
45129 + width: "24",
45130 + height: "24",
45131 + "aria-hidden": "true",
45132 + focusable: "false",
45133 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Path, { d: "M18 4H6c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2Zm.5 14c0 .3-.2.5-.5.5H6c-.3 0-.5-.2-.5-.5V6c0-.3.2-.5.5-.5h12c.3 0 .5.2.5.5v12Zm-7-6-4.1 5h8.8v-3h-1.5v1.5h-4.2l2.9-3.5-2.9-3.5h4.2V10h1.5V7H7.4l4.1 5Z" })
45134 + }
45135 + );
45136 +
45137 +
45138 + ;// ./node_modules/@wordpress/block-library/build-module/query-total/edit.js
45139 +
45140 +
45141 +
45142 +
45143 +
45144 + function QueryTotalEdit({ attributes, setAttributes }) {
45145 + const { displayType } = attributes;
45146 + const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)();
45147 + const getButtonPositionIcon = () => {
45148 + switch (displayType) {
45149 + case "total-results":
45150 + return resultsFound;
45151 + case "range-display":
45152 + return displayingResults;
45153 + }
45154 + };
45155 + const buttonPositionControls = [
45156 + {
45157 + role: "menuitemradio",
45158 + title: (0,external_wp_i18n_namespaceObject.__)("Total results"),
45159 + isActive: displayType === "total-results",
45160 + icon: resultsFound,
45161 + onClick: () => {
45162 + setAttributes({ displayType: "total-results" });
45163 + }
45164 + },
45165 + {
45166 + role: "menuitemradio",
45167 + title: (0,external_wp_i18n_namespaceObject.__)("Range display"),
45168 + isActive: displayType === "range-display",
45169 + icon: displayingResults,
45170 + onClick: () => {
45171 + setAttributes({ displayType: "range-display" });
45172 + }
45173 + }
45174 + ];
45175 + const controls = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockControls, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ToolbarGroup, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
45176 + external_wp_components_namespaceObject.ToolbarDropdownMenu,
45177 + {
45178 + icon: getButtonPositionIcon(),
45179 + label: (0,external_wp_i18n_namespaceObject.__)("Change display type"),
45180 + controls: buttonPositionControls
45181 + }
45182 + ) }) });
45183 + const renderDisplay = () => {
45184 + if (displayType === "total-results") {
45185 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: (0,external_wp_i18n_namespaceObject.__)("12 results found") });
45186 + }
45187 + if (displayType === "range-display") {
45188 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: (0,external_wp_i18n_namespaceObject.__)("Displaying 1 \u2013 10 of 12") });
45189 + }
45190 + return null;
45191 + };
45192 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", { ...blockProps, children: [
45193 + controls,
45194 + renderDisplay()
45195 + ] });
45196 + }
45197 +
45198 +
45199 + ;// ./node_modules/@wordpress/block-library/build-module/query-total/index.js
45200 +
45201 +
45202 +
45203 +
45204 + const { name: query_total_name } = query_total_block_namespaceObject;
45205 + const query_total_settings = {
45206 + icon: queryTotal,
45207 + edit: QueryTotalEdit
45208 + };
45209 + const query_total_init = () => initBlock({ name: query_total_name, metadata: query_total_block_namespaceObject, settings: query_total_settings });
45210 +
45211 +
45212 + ;// ./node_modules/@wordpress/icons/build-module/library/quote.js
45213 +
45214 +
45215 + var quote_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M13 6v6h5.2v4c0 .8-.2 1.4-.5 1.7-.6.6-1.6.6-2.5.5h-.3v1.5h.5c1 0 2.3-.1 3.3-1 .6-.6 1-1.6 1-2.8V6H13zm-9 6h5.2v4c0 .8-.2 1.4-.5 1.7-.6.6-1.6.6-2.5.5h-.3v1.5h.5c1 0 2.3-.1 3.3-1 .6-.6 1-1.6 1-2.8V6H4v6z" }) });
45216 +
45217 +
45218 + ;// ./node_modules/@wordpress/block-library/build-module/quote/deprecated.js
45219 +
45220 +
45221 +
45222 +
45223 + const migrateToQuoteV2 = (attributes) => {
45224 + const { value, ...restAttributes } = attributes;
45225 + return [
45226 + {
45227 + ...restAttributes
45228 + },
45229 + value ? (0,external_wp_blocks_namespaceObject.parseWithAttributeSchema)(value, {
45230 + type: "array",
45231 + source: "query",
45232 + selector: "p",
45233 + query: {
45234 + content: {
45235 + type: "string",
45236 + source: "html"
45237 + }
45238 + }
45239 + }).map(
45240 + ({ content }) => (0,external_wp_blocks_namespaceObject.createBlock)("core/paragraph", { content })
45241 + ) : (0,external_wp_blocks_namespaceObject.createBlock)("core/paragraph")
45242 + ];
45243 + };
45244 + const deprecated_TEXT_ALIGN_OPTIONS = ["left", "right", "center"];
45245 + const deprecated_migrateTextAlign = (attributes, innerBlocks) => {
45246 + const { align, ...rest } = attributes;
45247 + const migratedAttributes = deprecated_TEXT_ALIGN_OPTIONS.includes(align) ? { ...rest, textAlign: align } : attributes;
45248 + return [migratedAttributes, innerBlocks];
45249 + };
45250 + const migrateLargeStyle = (attributes, innerBlocks) => {
45251 + return [
45252 + {
45253 + ...attributes,
45254 + className: attributes.className ? attributes.className + " is-style-large" : "is-style-large"
45255 + },
45256 + innerBlocks
45257 + ];
45258 + };
45259 + const quote_deprecated_v4 = {
45260 + attributes: {
45261 + value: {
45262 + type: "string",
45263 + source: "html",
45264 + selector: "blockquote",
45265 + multiline: "p",
45266 + default: "",
45267 + role: "content"
45268 + },
45269 + citation: {
45270 + type: "string",
45271 + source: "html",
45272 + selector: "cite",
45273 + default: "",
45274 + role: "content"
45275 + },
45276 + align: {
45277 + type: "string"
45278 + }
45279 + },
45280 + supports: {
45281 + anchor: true,
45282 + html: false,
45283 + __experimentalOnEnter: true,
45284 + __experimentalOnMerge: true,
45285 + typography: {
45286 + fontSize: true,
45287 + lineHeight: true,
45288 + __experimentalFontFamily: true,
45289 + __experimentalFontWeight: true,
45290 + __experimentalFontStyle: true,
45291 + __experimentalTextTransform: true,
45292 + __experimentalTextDecoration: true,
45293 + __experimentalLetterSpacing: true,
45294 + __experimentalDefaultControls: {
45295 + fontSize: true,
45296 + fontAppearance: true
45297 + }
45298 + },
45299 + color: {
45300 + gradients: true,
45301 + heading: true,
45302 + link: true,
45303 + __experimentalDefaultControls: {
45304 + background: true,
45305 + text: true
45306 + }
45307 + }
45308 + },
45309 + isEligible: ({ align }) => deprecated_TEXT_ALIGN_OPTIONS.includes(align),
45310 + save({ attributes }) {
45311 + const { align, citation } = attributes;
45312 + const className = dist_clsx({
45313 + [`has-text-align-${align}`]: align
45314 + });
45315 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("blockquote", { ...external_wp_blockEditor_namespaceObject.useBlockProps.save({ className }), children: [
45316 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, {}),
45317 + !external_wp_blockEditor_namespaceObject.RichText.isEmpty(citation) && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichText.Content, { tagName: "cite", value: citation })
45318 + ] });
45319 + },
45320 + migrate: deprecated_migrateTextAlign
45321 + };
45322 + const quote_deprecated_v3 = {
45323 + attributes: {
45324 + value: {
45325 + type: "string",
45326 + source: "html",
45327 + selector: "blockquote",
45328 + multiline: "p",
45329 + default: "",
45330 + role: "content"
45331 + },
45332 + citation: {
45333 + type: "string",
45334 + source: "html",
45335 + selector: "cite",
45336 + default: "",
45337 + role: "content"
45338 + },
45339 + align: {
45340 + type: "string"
45341 + }
45342 + },
45343 + supports: {
45344 + anchor: true,
45345 + __experimentalSlashInserter: true,
45346 + typography: {
45347 + fontSize: true,
45348 + lineHeight: true,
45349 + __experimentalFontStyle: true,
45350 + __experimentalFontWeight: true,
45351 + __experimentalLetterSpacing: true,
45352 + __experimentalTextTransform: true,
45353 + __experimentalDefaultControls: {
45354 + fontSize: true,
45355 + fontAppearance: true
45356 + }
45357 + }
45358 + },
45359 + save({ attributes }) {
45360 + const { align, value, citation } = attributes;
45361 + const className = dist_clsx({
45362 + [`has-text-align-${align}`]: align
45363 + });
45364 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("blockquote", { ...external_wp_blockEditor_namespaceObject.useBlockProps.save({ className }), children: [
45365 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichText.Content, { multiline: true, value }),
45366 + !external_wp_blockEditor_namespaceObject.RichText.isEmpty(citation) && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichText.Content, { tagName: "cite", value: citation })
45367 + ] });
45368 + },
45369 + migrate(attributes) {
45370 + return deprecated_migrateTextAlign(...migrateToQuoteV2(attributes));
45371 + }
45372 + };
45373 + const quote_deprecated_v2 = {
45374 + attributes: {
45375 + value: {
45376 + type: "string",
45377 + source: "html",
45378 + selector: "blockquote",
45379 + multiline: "p",
45380 + default: ""
45381 + },
45382 + citation: {
45383 + type: "string",
45384 + source: "html",
45385 + selector: "cite",
45386 + default: ""
45387 + },
45388 + align: {
45389 + type: "string"
45390 + }
45391 + },
45392 + migrate(attributes) {
45393 + return deprecated_migrateTextAlign(...migrateToQuoteV2(attributes));
45394 + },
45395 + save({ attributes }) {
45396 + const { align, value, citation } = attributes;
45397 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("blockquote", { style: { textAlign: align ? align : null }, children: [
45398 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichText.Content, { multiline: true, value }),
45399 + !external_wp_blockEditor_namespaceObject.RichText.isEmpty(citation) && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichText.Content, { tagName: "cite", value: citation })
45400 + ] });
45401 + }
45402 + };
45403 + const quote_deprecated_v1 = {
45404 + attributes: {
45405 + value: {
45406 + type: "string",
45407 + source: "html",
45408 + selector: "blockquote",
45409 + multiline: "p",
45410 + default: ""
45411 + },
45412 + citation: {
45413 + type: "string",
45414 + source: "html",
45415 + selector: "cite",
45416 + default: ""
45417 + },
45418 + align: {
45419 + type: "string"
45420 + },
45421 + style: {
45422 + type: "number",
45423 + default: 1
45424 + }
45425 + },
45426 + migrate(attributes) {
45427 + if (attributes.style === 2) {
45428 + const { style, ...restAttributes } = attributes;
45429 + return deprecated_migrateTextAlign(
45430 + ...migrateLargeStyle(...migrateToQuoteV2(restAttributes))
45431 + );
45432 + }
45433 + return deprecated_migrateTextAlign(...migrateToQuoteV2(attributes));
45434 + },
45435 + save({ attributes }) {
45436 + const { align, value, citation, style } = attributes;
45437 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(
45438 + "blockquote",
45439 + {
45440 + className: style === 2 ? "is-large" : "",
45441 + style: { textAlign: align ? align : null },
45442 + children: [
45443 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichText.Content, { multiline: true, value }),
45444 + !external_wp_blockEditor_namespaceObject.RichText.isEmpty(citation) && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichText.Content, { tagName: "cite", value: citation })
45445 + ]
45446 + }
45447 + );
45448 + }
45449 + };
45450 + const quote_deprecated_v0 = {
45451 + attributes: {
45452 + value: {
45453 + type: "string",
45454 + source: "html",
45455 + selector: "blockquote",
45456 + multiline: "p",
45457 + default: ""
45458 + },
45459 + citation: {
45460 + type: "string",
45461 + source: "html",
45462 + selector: "footer",
45463 + default: ""
45464 + },
45465 + align: {
45466 + type: "string"
45467 + },
45468 + style: {
45469 + type: "number",
45470 + default: 1
45471 + }
45472 + },
45473 + migrate(attributes) {
45474 + if (!isNaN(parseInt(attributes.style))) {
45475 + const { style, ...restAttributes } = attributes;
45476 + return deprecated_migrateTextAlign(...migrateToQuoteV2(restAttributes));
45477 + }
45478 + return deprecated_migrateTextAlign(...migrateToQuoteV2(attributes));
45479 + },
45480 + save({ attributes }) {
45481 + const { align, value, citation, style } = attributes;
45482 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(
45483 + "blockquote",
45484 + {
45485 + className: `blocks-quote-style-${style}`,
45486 + style: { textAlign: align ? align : null },
45487 + children: [
45488 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichText.Content, { multiline: true, value }),
45489 + !external_wp_blockEditor_namespaceObject.RichText.isEmpty(citation) && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichText.Content, { tagName: "footer", value: citation })
45490 + ]
45491 + }
45492 + );
45493 + }
45494 + };
45495 + var quote_deprecated_deprecated_default = [quote_deprecated_v4, quote_deprecated_v3, quote_deprecated_v2, quote_deprecated_v1, quote_deprecated_v0];
45496 +
45497 +
45498 + ;// ./node_modules/@wordpress/icons/build-module/library/verse.js
45499 +
45500 +
45501 + var verse_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M17.8 2l-.9.3c-.1 0-3.6 1-5.2 2.1C10 5.5 9.3 6.5 8.9 7.1c-.6.9-1.7 4.7-1.7 6.3l-.9 2.3c-.2.4 0 .8.4 1 .1 0 .2.1.3.1.3 0 .6-.2.7-.5l.6-1.5c.3 0 .7-.1 1.2-.2.7-.1 1.4-.3 2.2-.5.8-.2 1.6-.5 2.4-.8.7-.3 1.4-.7 1.9-1.2s.8-1.2 1-1.9c.2-.7.3-1.6.4-2.4.1-.8.1-1.7.2-2.5 0-.8.1-1.5.2-2.1V2zm-1.9 5.6c-.1.8-.2 1.5-.3 2.1-.2.6-.4 1-.6 1.3-.3.3-.8.6-1.4.9-.7.3-1.4.5-2.2.8-.6.2-1.3.3-1.8.4L15 7.5c.3-.3.6-.7 1-1.1 0 .4 0 .8-.1 1.2zM6 20h8v-1.5H6V20z" }) });
45502 +
45503 +
45504 + ;// ./node_modules/@wordpress/block-library/build-module/quote/edit.js
45505 +
45506 +
45507 +
45508 +
45509 +
45510 +
45511 +
45512 +
45513 +
45514 +
45515 +
45516 + const edit_isWebPlatform = external_wp_element_namespaceObject.Platform.OS === "web";
45517 + const quote_edit_TEMPLATE = [["core/paragraph", {}]];
45518 + const edit_useMigrateOnLoad = (attributes, clientId) => {
45519 + const registry = (0,external_wp_data_namespaceObject.useRegistry)();
45520 + const { updateBlockAttributes, replaceInnerBlocks } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_blockEditor_namespaceObject.store);
45521 + (0,external_wp_element_namespaceObject.useEffect)(() => {
45522 + if (!attributes.value) {
45523 + return;
45524 + }
45525 + const [newAttributes, newInnerBlocks] = migrateToQuoteV2(attributes);
45526 + external_wp_deprecated_default()("Value attribute on the quote block", {
45527 + since: "6.0",
45528 + version: "6.5",
45529 + alternative: "inner blocks"
45530 + });
45531 + registry.batch(() => {
45532 + updateBlockAttributes(clientId, newAttributes);
45533 + replaceInnerBlocks(clientId, newInnerBlocks);
45534 + });
45535 + }, [attributes.value]);
45536 + };
45537 + function QuoteEdit({
45538 + attributes,
45539 + setAttributes,
45540 + insertBlocksAfter,
45541 + clientId,
45542 + className,
45543 + style,
45544 + isSelected
45545 + }) {
45546 + const { textAlign, allowedBlocks } = attributes;
45547 + edit_useMigrateOnLoad(attributes, clientId);
45548 + const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)({
45549 + className: dist_clsx(className, {
45550 + [`has-text-align-${textAlign}`]: textAlign
45551 + }),
45552 + ...!edit_isWebPlatform && { style }
45553 + });
45554 + const innerBlocksProps = (0,external_wp_blockEditor_namespaceObject.useInnerBlocksProps)(blockProps, {
45555 + template: quote_edit_TEMPLATE,
45556 + templateInsertUpdatesSelection: true,
45557 + __experimentalCaptureToolbars: true,
45558 + renderAppender: false,
45559 + allowedBlocks
45560 + });
45561 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
45562 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockControls, { group: "block", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
45563 + external_wp_blockEditor_namespaceObject.AlignmentControl,
45564 + {
45565 + value: textAlign,
45566 + onChange: (nextAlign) => {
45567 + setAttributes({ textAlign: nextAlign });
45568 + }
45569 + }
45570 + ) }),
45571 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.BlockQuotation, { ...innerBlocksProps, children: [
45572 + innerBlocksProps.children,
45573 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
45574 + Caption,
45575 + {
45576 + attributeKey: "citation",
45577 + tagName: edit_isWebPlatform ? "cite" : "p",
45578 + style: edit_isWebPlatform && { display: "block" },
45579 + isSelected,
45580 + attributes,
45581 + setAttributes,
45582 + __unstableMobileNoFocusOnMount: true,
45583 + icon: verse_default,
45584 + label: (0,external_wp_i18n_namespaceObject.__)("Quote citation"),
45585 + placeholder: (
45586 + // translators: placeholder text used for the
45587 + // citation
45588 + (0,external_wp_i18n_namespaceObject.__)("Add citation")
45589 + ),
45590 + addLabel: (0,external_wp_i18n_namespaceObject.__)("Add citation"),
45591 + removeLabel: (0,external_wp_i18n_namespaceObject.__)("Remove citation"),
45592 + excludeElementClassName: true,
45593 + className: "wp-block-quote__citation",
45594 + insertBlocksAfter,
45595 + ...!edit_isWebPlatform ? { textAlign } : {}
45596 + }
45597 + )
45598 + ] })
45599 + ] });
45600 + }
45601 +
45602 +
45603 + ;// ./node_modules/@wordpress/block-library/build-module/quote/block.json
45604 + const quote_block_namespaceObject = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/quote","title":"Quote","category":"text","description":"Give quoted text visual emphasis. \\"In quoting others, we cite ourselves.\\" — Julio Cortázar","keywords":["blockquote","cite"],"textdomain":"default","attributes":{"value":{"type":"string","source":"html","selector":"blockquote","multiline":"p","default":"","role":"content"},"citation":{"type":"rich-text","source":"rich-text","selector":"cite","role":"content"},"textAlign":{"type":"string"}},"supports":{"anchor":true,"align":["left","right","wide","full"],"html":false,"background":{"backgroundImage":true,"backgroundSize":true,"__experimentalDefaultControls":{"backgroundImage":true}},"__experimentalBorder":{"color":true,"radius":true,"style":true,"width":true,"__experimentalDefaultControls":{"color":true,"radius":true,"style":true,"width":true}},"dimensions":{"minHeight":true,"__experimentalDefaultControls":{"minHeight":false}},"__experimentalOnEnter":true,"__experimentalOnMerge":true,"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"color":{"gradients":true,"heading":true,"link":true,"__experimentalDefaultControls":{"background":true,"text":true}},"layout":{"allowEditing":false},"spacing":{"blockGap":true,"padding":true,"margin":true},"interactivity":{"clientNavigation":true},"allowedBlocks":true},"styles":[{"name":"default","label":"Default","isDefault":true},{"name":"plain","label":"Plain"}],"editorStyle":"wp-block-quote-editor","style":"wp-block-quote"}');
45605 + ;// ./node_modules/@wordpress/block-library/build-module/quote/save.js
45606 +
45607 +
45608 +
45609 + function quote_save_save({ attributes }) {
45610 + const { textAlign, citation } = attributes;
45611 + const className = dist_clsx({
45612 + [`has-text-align-${textAlign}`]: textAlign
45613 + });
45614 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("blockquote", { ...external_wp_blockEditor_namespaceObject.useBlockProps.save({ className }), children: [
45615 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, {}),
45616 + !external_wp_blockEditor_namespaceObject.RichText.isEmpty(citation) && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichText.Content, { tagName: "cite", value: citation })
45617 + ] });
45618 + }
45619 +
45620 +
45621 + ;// ./node_modules/@wordpress/block-library/build-module/quote/transforms.js
45622 +
45623 +
45624 + const quote_transforms_transforms = {
45625 + from: [
45626 + {
45627 + type: "block",
45628 + blocks: ["core/pullquote"],
45629 + transform: ({
45630 + value,
45631 + align,
45632 + citation,
45633 + anchor,
45634 + fontSize,
45635 + style
45636 + }) => {
45637 + return (0,external_wp_blocks_namespaceObject.createBlock)(
45638 + "core/quote",
45639 + {
45640 + align,
45641 + citation,
45642 + anchor,
45643 + fontSize,
45644 + style
45645 + },
45646 + [(0,external_wp_blocks_namespaceObject.createBlock)("core/paragraph", { content: value })]
45647 + );
45648 + }
45649 + },
45650 + {
45651 + type: "prefix",
45652 + prefix: ">",
45653 + transform: (content) => (0,external_wp_blocks_namespaceObject.createBlock)("core/quote", {}, [
45654 + (0,external_wp_blocks_namespaceObject.createBlock)("core/paragraph", { content })
45655 + ])
45656 + },
45657 + {
45658 + type: "raw",
45659 + schema: () => ({
45660 + blockquote: {
45661 + children: "*"
45662 + }
45663 + }),
45664 + selector: "blockquote",
45665 + transform: (node, handler) => {
45666 + return (0,external_wp_blocks_namespaceObject.createBlock)(
45667 + "core/quote",
45668 + // Don't try to parse any `cite` out of this content.
45669 + // * There may be more than one cite.
45670 + // * There may be more attribution text than just the cite.
45671 + // * If the cite is nested in the quoted text, it's wrong to
45672 + // remove it.
45673 + {},
45674 + handler({
45675 + HTML: node.innerHTML,
45676 + mode: "BLOCKS"
45677 + })
45678 + );
45679 + }
45680 + },
45681 + {
45682 + type: "block",
45683 + isMultiBlock: true,
45684 + blocks: ["*"],
45685 + isMatch: ({}, blocks) => {
45686 + if (blocks.length === 1) {
45687 + return [
45688 + "core/paragraph",
45689 + "core/heading",
45690 + "core/list",
45691 + "core/pullquote"
45692 + ].includes(blocks[0].name);
45693 + }
45694 + return !blocks.some(({ name }) => name === "core/quote");
45695 + },
45696 + __experimentalConvert: (blocks) => (0,external_wp_blocks_namespaceObject.createBlock)(
45697 + "core/quote",
45698 + {},
45699 + blocks.map(
45700 + (block) => (0,external_wp_blocks_namespaceObject.createBlock)(
45701 + block.name,
45702 + block.attributes,
45703 + block.innerBlocks
45704 + )
45705 + )
45706 + )
45707 + }
45708 + ],
45709 + to: [
45710 + {
45711 + type: "block",
45712 + blocks: ["core/pullquote"],
45713 + isMatch: ({}, block) => {
45714 + return block.innerBlocks.every(
45715 + ({ name }) => name === "core/paragraph"
45716 + );
45717 + },
45718 + transform: ({ align, citation, anchor, fontSize, style }, innerBlocks) => {
45719 + const value = innerBlocks.map(({ attributes }) => `${attributes.content}`).join("<br>");
45720 + return (0,external_wp_blocks_namespaceObject.createBlock)("core/pullquote", {
45721 + value,
45722 + align,
45723 + citation,
45724 + anchor,
45725 + fontSize,
45726 + style
45727 + });
45728 + }
45729 + },
45730 + {
45731 + type: "block",
45732 + blocks: ["core/paragraph"],
45733 + transform: ({ citation }, innerBlocks) => external_wp_blockEditor_namespaceObject.RichText.isEmpty(citation) ? innerBlocks : [
45734 + ...innerBlocks,
45735 + (0,external_wp_blocks_namespaceObject.createBlock)("core/paragraph", {
45736 + content: citation
45737 + })
45738 + ]
45739 + },
45740 + {
45741 + type: "block",
45742 + blocks: ["core/group"],
45743 + transform: ({ citation, anchor }, innerBlocks) => (0,external_wp_blocks_namespaceObject.createBlock)(
45744 + "core/group",
45745 + { anchor },
45746 + external_wp_blockEditor_namespaceObject.RichText.isEmpty(citation) ? innerBlocks : [
45747 + ...innerBlocks,
45748 + (0,external_wp_blocks_namespaceObject.createBlock)("core/paragraph", {
45749 + content: citation
45750 + })
45751 + ]
45752 + )
45753 + }
45754 + ],
45755 + ungroup: ({ citation }, innerBlocks) => external_wp_blockEditor_namespaceObject.RichText.isEmpty(citation) ? innerBlocks : [
45756 + ...innerBlocks,
45757 + (0,external_wp_blocks_namespaceObject.createBlock)("core/paragraph", {
45758 + content: citation
45759 + })
45760 + ]
45761 + };
45762 + var quote_transforms_transforms_default = quote_transforms_transforms;
45763 +
45764 +
45765 + ;// ./node_modules/@wordpress/block-library/build-module/quote/index.js
45766 +
45767 +
45768 +
45769 +
45770 +
45771 +
45772 +
45773 +
45774 + const { name: quote_name } = quote_block_namespaceObject;
45775 + const quote_settings = {
45776 + icon: quote_default,
45777 + example: {
45778 + attributes: {
45779 + citation: (0,external_wp_i18n_namespaceObject.__)("Julio Cort\xE1zar")
45780 + },
45781 + innerBlocks: [
45782 + {
45783 + name: "core/paragraph",
45784 + attributes: {
45785 + content: (0,external_wp_i18n_namespaceObject.__)("In quoting others, we cite ourselves.")
45786 + }
45787 + }
45788 + ]
45789 + },
45790 + transforms: quote_transforms_transforms_default,
45791 + edit: QuoteEdit,
45792 + save: quote_save_save,
45793 + deprecated: quote_deprecated_deprecated_default
45794 + };
45795 + const quote_init = () => initBlock({ name: quote_name, metadata: quote_block_namespaceObject, settings: quote_settings });
45796 +
45797 +
45798 + ;// ./node_modules/@wordpress/icons/build-module/library/symbol.js
45799 +
45800 +
45801 + var symbol_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M21.3 10.8l-5.6-5.6c-.7-.7-1.8-.7-2.5 0l-5.6 5.6c-.7.7-.7 1.8 0 2.5l5.6 5.6c.3.3.8.5 1.2.5s.9-.2 1.2-.5l5.6-5.6c.8-.7.8-1.9.1-2.5zm-1 1.4l-5.6 5.6c-.1.1-.3.1-.4 0l-5.6-5.6c-.1-.1-.1-.3 0-.4l5.6-5.6s.1-.1.2-.1.1 0 .2.1l5.6 5.6c.1.1.1.3 0 .4zm-16.6-.4L10 5.5l-1-1-6.3 6.3c-.7.7-.7 1.8 0 2.5L9 19.5l1.1-1.1-6.3-6.3c-.2 0-.2-.2-.1-.3z" }) });
45802 +
45803 +
45804 + ;// ./node_modules/@wordpress/block-library/build-module/block/block.json
45805 + const block_block_namespaceObject = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/block","title":"Pattern","category":"reusable","description":"Reuse this design across your site.","keywords":["reusable"],"textdomain":"default","attributes":{"ref":{"type":"number"},"content":{"type":"object","default":{}}},"providesContext":{"pattern/overrides":"content"},"supports":{"customClassName":false,"html":false,"inserter":false,"renaming":false,"interactivity":{"clientNavigation":true}}}');
45806 + ;// external ["wp","patterns"]
45807 + const external_wp_patterns_namespaceObject = window["wp"]["patterns"];
45808 + ;// ./node_modules/@wordpress/block-library/build-module/block/edit.js
45809 +
45810 +
45811 +
45812 +
45813 +
45814 +
45815 +
45816 +
45817 +
45818 +
45819 +
45820 + const { useLayoutClasses } = unlock(external_wp_blockEditor_namespaceObject.privateApis);
45821 + const { hasOverridableBlocks } = unlock(external_wp_patterns_namespaceObject.privateApis);
45822 + const fullAlignments = ["full", "wide", "left", "right"];
45823 + const useInferredLayout = (blocks, parentLayout) => {
45824 + const initialInferredAlignmentRef = (0,external_wp_element_namespaceObject.useRef)();
45825 + return (0,external_wp_element_namespaceObject.useMemo)(() => {
45826 + if (!blocks?.length) {
45827 + return {};
45828 + }
45829 + let alignment = initialInferredAlignmentRef.current;
45830 + if (alignment === void 0) {
45831 + const isConstrained = parentLayout?.type === "constrained";
45832 + const hasFullAlignment = blocks.some(
45833 + (block) => fullAlignments.includes(block.attributes.align)
45834 + );
45835 + alignment = isConstrained && hasFullAlignment ? "full" : null;
45836 + initialInferredAlignmentRef.current = alignment;
45837 + }
45838 + const layout = alignment ? parentLayout : void 0;
45839 + return { alignment, layout };
45840 + }, [blocks, parentLayout]);
45841 + };
45842 + function RecursionWarning() {
45843 + const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)();
45844 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { ...blockProps, children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.Warning, { children: (0,external_wp_i18n_namespaceObject.__)("Block cannot be rendered inside itself.") }) });
45845 + }
45846 + const edit_NOOP = () => {
45847 + };
45848 + function ReusableBlockEditRecursionWrapper(props) {
45849 + const { ref } = props.attributes;
45850 + const hasAlreadyRendered = (0,external_wp_blockEditor_namespaceObject.useHasRecursion)(ref);
45851 + if (hasAlreadyRendered) {
45852 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(RecursionWarning, {});
45853 + }
45854 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RecursionProvider, { uniqueId: ref, children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(ReusableBlockEdit, { ...props }) });
45855 + }
45856 + function ReusableBlockControl({
45857 + recordId,
45858 + canOverrideBlocks,
45859 + hasContent,
45860 + handleEditOriginal,
45861 + resetContent
45862 + }) {
45863 + const canUserEdit = (0,external_wp_data_namespaceObject.useSelect)(
45864 + (select) => !!select(external_wp_coreData_namespaceObject.store).canUser("update", {
45865 + kind: "postType",
45866 + name: "wp_block",
45867 + id: recordId
45868 + }),
45869 + [recordId]
45870 + );
45871 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
45872 + canUserEdit && !!handleEditOriginal && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockControls, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ToolbarGroup, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ToolbarButton, { onClick: handleEditOriginal, children: (0,external_wp_i18n_namespaceObject.__)("Edit original") }) }) }),
45873 + canOverrideBlocks && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockControls, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ToolbarGroup, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
45874 + external_wp_components_namespaceObject.ToolbarButton,
45875 + {
45876 + onClick: resetContent,
45877 + disabled: !hasContent,
45878 + children: (0,external_wp_i18n_namespaceObject.__)("Reset")
45879 + }
45880 + ) }) })
45881 + ] });
45882 + }
45883 + function ReusableBlockEdit({
45884 + name,
45885 + attributes: { ref, content },
45886 + __unstableParentLayout: parentLayout,
45887 + setAttributes
45888 + }) {
45889 + const { record, hasResolved } = (0,external_wp_coreData_namespaceObject.useEntityRecord)(
45890 + "postType",
45891 + "wp_block",
45892 + ref
45893 + );
45894 + const [blocks] = (0,external_wp_coreData_namespaceObject.useEntityBlockEditor)("postType", "wp_block", {
45895 + id: ref
45896 + });
45897 + const isMissing = hasResolved && !record;
45898 + const { __unstableMarkLastChangeAsPersistent } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_blockEditor_namespaceObject.store);
45899 + const { onNavigateToEntityRecord, hasPatternOverridesSource } = (0,external_wp_data_namespaceObject.useSelect)(
45900 + (select) => {
45901 + const { getSettings } = select(external_wp_blockEditor_namespaceObject.store);
45902 + return {
45903 + onNavigateToEntityRecord: getSettings().onNavigateToEntityRecord,
45904 + hasPatternOverridesSource: !!(0,external_wp_blocks_namespaceObject.getBlockBindingsSource)(
45905 + "core/pattern-overrides"
45906 + )
45907 + };
45908 + },
45909 + []
45910 + );
45911 + const canOverrideBlocks = (0,external_wp_element_namespaceObject.useMemo)(
45912 + () => hasPatternOverridesSource && hasOverridableBlocks(blocks),
45913 + [hasPatternOverridesSource, blocks]
45914 + );
45915 + const { alignment, layout } = useInferredLayout(blocks, parentLayout);
45916 + const layoutClasses = useLayoutClasses({ layout }, name);
45917 + const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)({
45918 + className: dist_clsx(
45919 + "block-library-block__reusable-block-container",
45920 + layout && layoutClasses,
45921 + { [`align${alignment}`]: alignment }
45922 + )
45923 + });
45924 + const innerBlocksProps = (0,external_wp_blockEditor_namespaceObject.useInnerBlocksProps)(blockProps, {
45925 + layout,
45926 + value: blocks,
45927 + onInput: edit_NOOP,
45928 + onChange: edit_NOOP,
45929 + renderAppender: blocks?.length ? void 0 : external_wp_blockEditor_namespaceObject.InnerBlocks.ButtonBlockAppender
45930 + });
45931 + const handleEditOriginal = () => {
45932 + onNavigateToEntityRecord({
45933 + postId: ref,
45934 + postType: "wp_block"
45935 + });
45936 + };
45937 + const resetContent = () => {
45938 + if (content) {
45939 + __unstableMarkLastChangeAsPersistent();
45940 + setAttributes({ content: void 0 });
45941 + }
45942 + };
45943 + let children = null;
45944 + if (isMissing) {
45945 + children = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.Warning, { children: (0,external_wp_i18n_namespaceObject.__)("Block has been deleted or is unavailable.") });
45946 + }
45947 + if (!hasResolved) {
45948 + children = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Placeholder, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Spinner, {}) });
45949 + }
45950 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
45951 + hasResolved && !isMissing && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
45952 + ReusableBlockControl,
45953 + {
45954 + recordId: ref,
45955 + canOverrideBlocks,
45956 + hasContent: !!content,
45957 + handleEditOriginal: onNavigateToEntityRecord ? handleEditOriginal : void 0,
45958 + resetContent
45959 + }
45960 + ),
45961 + children === null ? /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { ...innerBlocksProps }) : /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { ...blockProps, children })
45962 + ] });
45963 + }
45964 +
45965 +
45966 + ;// ./node_modules/@wordpress/block-library/build-module/block/deprecated.js
45967 + const isObject = (obj) => typeof obj === "object" && !Array.isArray(obj) && obj !== null;
45968 + const block_deprecated_v2 = {
45969 + attributes: {
45970 + ref: {
45971 + type: "number"
45972 + },
45973 + content: {
45974 + type: "object"
45975 + }
45976 + },
45977 + supports: {
45978 + customClassName: false,
45979 + html: false,
45980 + inserter: false,
45981 + renaming: false
45982 + },
45983 + // Force this deprecation to run whenever there's a values sub-property that's an object.
45984 + //
45985 + // This could fail in the future if a block ever has binding to a `values` attribute.
45986 + // Some extra protection is added to ensure `values` is an object, but this only reduces
45987 + // the likelihood, it doesn't solve it completely.
45988 + isEligible({ content }) {
45989 + return !!content && Object.keys(content).every(
45990 + (contentKey) => content[contentKey].values && isObject(content[contentKey].values)
45991 + );
45992 + },
45993 + /*
45994 + * Old attribute format:
45995 + * content: {
45996 + * "V98q_x": {
45997 + * // The attribute values are now stored as a 'values' sub-property.
45998 + * values: { content: 'My content value' },
45999 + * // ... additional metadata, like the block name can be stored here.
46000 + * }
46001 + * }
46002 + *
46003 + * New attribute format:
46004 + * content: {
46005 + * "V98q_x": {
46006 + * content: 'My content value',
46007 + * }
46008 + * }
46009 + */
46010 + migrate(attributes) {
46011 + const { content, ...retainedAttributes } = attributes;
46012 + if (content && Object.keys(content).length) {
46013 + const updatedContent = { ...content };
46014 + for (const contentKey in content) {
46015 + updatedContent[contentKey] = content[contentKey].values;
46016 + }
46017 + return {
46018 + ...retainedAttributes,
46019 + content: updatedContent
46020 + };
46021 + }
46022 + return attributes;
46023 + }
46024 + };
46025 + const block_deprecated_v1 = {
46026 + attributes: {
46027 + ref: {
46028 + type: "number"
46029 + },
46030 + overrides: {
46031 + type: "object"
46032 + }
46033 + },
46034 + supports: {
46035 + customClassName: false,
46036 + html: false,
46037 + inserter: false,
46038 + renaming: false
46039 + },
46040 + // Force this deprecation to run whenever there's an `overrides` object.
46041 + isEligible({ overrides }) {
46042 + return !!overrides;
46043 + },
46044 + /*
46045 + * Old attribute format:
46046 + * overrides: {
46047 + * // An key is an id that represents a block.
46048 + * // The values are the attribute values of the block.
46049 + * "V98q_x": { content: 'My content value' }
46050 + * }
46051 + *
46052 + * New attribute format:
46053 + * content: {
46054 + * "V98q_x": { content: 'My content value' }
46055 + * }
46056 + *
46057 + */
46058 + migrate(attributes) {
46059 + const { overrides, ...retainedAttributes } = attributes;
46060 + const content = {};
46061 + Object.keys(overrides).forEach((id) => {
46062 + content[id] = overrides[id];
46063 + });
46064 + return {
46065 + ...retainedAttributes,
46066 + content
46067 + };
46068 + }
46069 + };
46070 + var block_deprecated_deprecated_default = [block_deprecated_v2, block_deprecated_v1];
46071 +
46072 +
46073 + ;// ./node_modules/@wordpress/block-library/build-module/block/index.js
46074 +
46075 +
46076 +
46077 +
46078 +
46079 +
46080 +
46081 +
46082 + const { name: block_name } = block_block_namespaceObject;
46083 + const block_settings = {
46084 + deprecated: block_deprecated_deprecated_default,
46085 + edit: ReusableBlockEditRecursionWrapper,
46086 + icon: symbol_default,
46087 + __experimentalLabel: ({ ref }) => {
46088 + if (!ref) {
46089 + return;
46090 + }
46091 + const entity = (0,external_wp_data_namespaceObject.select)(external_wp_coreData_namespaceObject.store).getEditedEntityRecord(
46092 + "postType",
46093 + "wp_block",
46094 + ref
46095 + );
46096 + if (!entity?.title) {
46097 + return;
46098 + }
46099 + return (0,external_wp_htmlEntities_namespaceObject.decodeEntities)(entity.title);
46100 + }
46101 + };
46102 + const block_init = () => initBlock({ name: block_name, metadata: block_block_namespaceObject, settings: block_settings });
46103 +
46104 +
46105 + ;// ./node_modules/@wordpress/block-library/build-module/read-more/block.json
46106 + const read_more_block_namespaceObject = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/read-more","title":"Read More","category":"theme","description":"Displays the link of a post, page, or any other content-type.","textdomain":"default","attributes":{"content":{"type":"string","role":"content"},"linkTarget":{"type":"string","default":"_self"}},"usesContext":["postId"],"supports":{"html":false,"color":{"gradients":true,"text":true},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalLetterSpacing":true,"__experimentalTextDecoration":true,"__experimentalDefaultControls":{"fontSize":true,"textDecoration":true}},"spacing":{"margin":["top","bottom"],"padding":true,"__experimentalDefaultControls":{"padding":true}},"__experimentalBorder":{"color":true,"radius":true,"width":true,"__experimentalDefaultControls":{"width":true}},"interactivity":{"clientNavigation":true}},"style":"wp-block-read-more"}');
46107 + ;// ./node_modules/@wordpress/block-library/build-module/read-more/edit.js
46108 +
46109 +
46110 +
46111 +
46112 +
46113 +
46114 + function ReadMore({
46115 + attributes: { content, linkTarget },
46116 + setAttributes,
46117 + insertBlocksAfter
46118 + }) {
46119 + const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)();
46120 + const dropdownMenuProps = useToolsPanelDropdownMenuProps();
46121 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
46122 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
46123 + external_wp_components_namespaceObject.__experimentalToolsPanel,
46124 + {
46125 + label: (0,external_wp_i18n_namespaceObject.__)("Settings"),
46126 + resetAll: () => setAttributes({ linkTarget: "_self" }),
46127 + dropdownMenuProps,
46128 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
46129 + external_wp_components_namespaceObject.__experimentalToolsPanelItem,
46130 + {
46131 + label: (0,external_wp_i18n_namespaceObject.__)("Open in new tab"),
46132 + isShownByDefault: true,
46133 + hasValue: () => linkTarget !== "_self",
46134 + onDeselect: () => setAttributes({ linkTarget: "_self" }),
46135 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
46136 + external_wp_components_namespaceObject.ToggleControl,
46137 + {
46138 + __nextHasNoMarginBottom: true,
46139 + label: (0,external_wp_i18n_namespaceObject.__)("Open in new tab"),
46140 + onChange: (value) => setAttributes({
46141 + linkTarget: value ? "_blank" : "_self"
46142 + }),
46143 + checked: linkTarget === "_blank"
46144 + }
46145 + )
46146 + }
46147 + )
46148 + }
46149 + ) }),
46150 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
46151 + external_wp_blockEditor_namespaceObject.RichText,
46152 + {
46153 + identifier: "content",
46154 + tagName: "a",
46155 + "aria-label": (0,external_wp_i18n_namespaceObject.__)("\u201CRead more\u201D link text"),
46156 + placeholder: (0,external_wp_i18n_namespaceObject.__)("Read more"),
46157 + value: content,
46158 + onChange: (newValue) => setAttributes({ content: newValue }),
46159 + __unstableOnSplitAtEnd: () => insertBlocksAfter((0,external_wp_blocks_namespaceObject.createBlock)((0,external_wp_blocks_namespaceObject.getDefaultBlockName)())),
46160 + withoutInteractiveFormatting: true,
46161 + ...blockProps
46162 + }
46163 + )
46164 + ] });
46165 + }
46166 +
46167 +
46168 + ;// ./node_modules/@wordpress/block-library/build-module/read-more/index.js
46169 +
46170 +
46171 +
46172 +
46173 +
46174 + const { name: read_more_name } = read_more_block_namespaceObject;
46175 + const read_more_settings = {
46176 + icon: link_default,
46177 + edit: ReadMore,
46178 + example: {
46179 + attributes: {
46180 + content: (0,external_wp_i18n_namespaceObject.__)("Read more")
46181 + }
46182 + }
46183 + };
46184 + const read_more_init = () => initBlock({ name: read_more_name, metadata: read_more_block_namespaceObject, settings: read_more_settings });
46185 +
46186 +
46187 + ;// ./node_modules/@wordpress/icons/build-module/library/rss.js
46188 +
46189 +
46190 + var rss_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M5 10.2h-.8v1.5H5c1.9 0 3.8.8 5.1 2.1 1.4 1.4 2.1 3.2 2.1 5.1v.8h1.5V19c0-2.3-.9-4.5-2.6-6.2-1.6-1.6-3.8-2.6-6.1-2.6zm10.4-1.6C12.6 5.8 8.9 4.2 5 4.2h-.8v1.5H5c3.5 0 6.9 1.4 9.4 3.9s3.9 5.8 3.9 9.4v.8h1.5V19c0-3.9-1.6-7.6-4.4-10.4zM4 20h3v-3H4v3z" }) });
46191 +
46192 +
46193 + ;// ./node_modules/@wordpress/block-library/build-module/rss/block.json
46194 + const rss_block_namespaceObject = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/rss","title":"RSS","category":"widgets","description":"Display entries from any RSS or Atom feed.","keywords":["atom","feed"],"textdomain":"default","attributes":{"columns":{"type":"number","default":2},"blockLayout":{"type":"string","default":"list"},"feedURL":{"type":"string","default":"","role":"content"},"itemsToShow":{"type":"number","default":5},"displayExcerpt":{"type":"boolean","default":false},"displayAuthor":{"type":"boolean","default":false},"displayDate":{"type":"boolean","default":false},"excerptLength":{"type":"number","default":55},"openInNewTab":{"type":"boolean","default":false},"rel":{"type":"string"}},"supports":{"align":true,"html":false,"interactivity":{"clientNavigation":true},"__experimentalBorder":{"radius":true,"color":true,"width":true,"style":true},"spacing":{"margin":true,"padding":true,"__experimentalDefaultControls":{"padding":false,"margin":false}},"color":{"background":true,"text":true,"gradients":true,"link":true}},"editorStyle":"wp-block-rss-editor","style":"wp-block-rss"}');
46195 + ;// ./node_modules/@wordpress/block-library/build-module/rss/edit.js
46196 +
46197 +
46198 +
46199 +
46200 +
46201 +
46202 +
46203 +
46204 +
46205 + const DEFAULT_MIN_ITEMS = 1;
46206 + const DEFAULT_MAX_ITEMS = 20;
46207 + function RSSEdit({ attributes, setAttributes }) {
46208 + const [isEditing, setIsEditing] = (0,external_wp_element_namespaceObject.useState)(!attributes.feedURL);
46209 + const {
46210 + blockLayout,
46211 + columns,
46212 + displayAuthor,
46213 + displayDate,
46214 + displayExcerpt,
46215 + excerptLength,
46216 + feedURL,
46217 + itemsToShow,
46218 + openInNewTab,
46219 + rel
46220 + } = attributes;
46221 + const dropdownMenuProps = useToolsPanelDropdownMenuProps();
46222 + function toggleAttribute(propName) {
46223 + return () => {
46224 + const value = attributes[propName];
46225 + setAttributes({ [propName]: !value });
46226 + };
46227 + }
46228 + function onSubmitURL(event) {
46229 + event.preventDefault();
46230 + if (feedURL) {
46231 + setAttributes({ feedURL: (0,external_wp_url_namespaceObject.prependHTTP)(feedURL) });
46232 + setIsEditing(false);
46233 + }
46234 + }
46235 + const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)();
46236 + const label = (0,external_wp_i18n_namespaceObject.__)("RSS URL");
46237 + if (isEditing) {
46238 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { ...blockProps, children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
46239 + external_wp_components_namespaceObject.Placeholder,
46240 + {
46241 + icon: rss_default,
46242 + label,
46243 + instructions: (0,external_wp_i18n_namespaceObject.__)(
46244 + "Display entries from any RSS or Atom feed."
46245 + ),
46246 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(
46247 + "form",
46248 + {
46249 + onSubmit: onSubmitURL,
46250 + className: "wp-block-rss__placeholder-form",
46251 + children: [
46252 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
46253 + external_wp_components_namespaceObject.__experimentalInputControl,
46254 + {
46255 + __next40pxDefaultSize: true,
46256 + label,
46257 + type: "url",
46258 + hideLabelFromVision: true,
46259 + placeholder: (0,external_wp_i18n_namespaceObject.__)("Enter URL here\u2026"),
46260 + value: feedURL,
46261 + onChange: (value) => setAttributes({ feedURL: value }),
46262 + className: "wp-block-rss__placeholder-input"
46263 + }
46264 + ),
46265 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
46266 + external_wp_components_namespaceObject.Button,
46267 + {
46268 + __next40pxDefaultSize: true,
46269 + variant: "primary",
46270 + type: "submit",
46271 + children: (0,external_wp_i18n_namespaceObject.__)("Apply")
46272 + }
46273 + )
46274 + ]
46275 + }
46276 + )
46277 + }
46278 + ) });
46279 + }
46280 + const toolbarControls = [
46281 + {
46282 + icon: pencil_default,
46283 + title: (0,external_wp_i18n_namespaceObject.__)("Edit RSS URL"),
46284 + onClick: () => setIsEditing(true)
46285 + },
46286 + {
46287 + icon: list_default,
46288 + title: (0,external_wp_i18n_namespaceObject._x)("List view", "RSS block display setting"),
46289 + onClick: () => setAttributes({ blockLayout: "list" }),
46290 + isActive: blockLayout === "list"
46291 + },
46292 + {
46293 + icon: grid_default,
46294 + title: (0,external_wp_i18n_namespaceObject._x)("Grid view", "RSS block display setting"),
46295 + onClick: () => setAttributes({ blockLayout: "grid" }),
46296 + isActive: blockLayout === "grid"
46297 + }
46298 + ];
46299 + const serverSideAttributes = {
46300 + ...attributes,
46301 + style: {
46302 + ...attributes?.style,
46303 + border: void 0,
46304 + spacing: void 0
46305 + }
46306 + };
46307 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
46308 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockControls, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ToolbarGroup, { controls: toolbarControls }) }),
46309 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(
46310 + external_wp_components_namespaceObject.__experimentalToolsPanel,
46311 + {
46312 + label: (0,external_wp_i18n_namespaceObject.__)("Settings"),
46313 + resetAll: () => {
46314 + setAttributes({
46315 + itemsToShow: 5,
46316 + displayAuthor: false,
46317 + displayDate: false,
46318 + displayExcerpt: false,
46319 + excerptLength: 55,
46320 + columns: 2,
46321 + openInNewTab: false
46322 + });
46323 + },
46324 + dropdownMenuProps,
46325 + children: [
46326 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
46327 + external_wp_components_namespaceObject.__experimentalToolsPanelItem,
46328 + {
46329 + label: (0,external_wp_i18n_namespaceObject.__)("Number of items"),
46330 + hasValue: () => itemsToShow !== 5,
46331 + onDeselect: () => setAttributes({ itemsToShow: 5 }),
46332 + isShownByDefault: true,
46333 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
46334 + external_wp_components_namespaceObject.RangeControl,
46335 + {
46336 + __nextHasNoMarginBottom: true,
46337 + __next40pxDefaultSize: true,
46338 + label: (0,external_wp_i18n_namespaceObject.__)("Number of items"),
46339 + value: itemsToShow,
46340 + onChange: (value) => setAttributes({ itemsToShow: value }),
46341 + min: DEFAULT_MIN_ITEMS,
46342 + max: DEFAULT_MAX_ITEMS,
46343 + required: true
46344 + }
46345 + )
46346 + }
46347 + ),
46348 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
46349 + external_wp_components_namespaceObject.__experimentalToolsPanelItem,
46350 + {
46351 + label: (0,external_wp_i18n_namespaceObject.__)("Display author"),
46352 + hasValue: () => !!displayAuthor,
46353 + onDeselect: () => setAttributes({ displayAuthor: false }),
46354 + isShownByDefault: true,
46355 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
46356 + external_wp_components_namespaceObject.ToggleControl,
46357 + {
46358 + __nextHasNoMarginBottom: true,
46359 + label: (0,external_wp_i18n_namespaceObject.__)("Display author"),
46360 + checked: displayAuthor,
46361 + onChange: toggleAttribute("displayAuthor")
46362 + }
46363 + )
46364 + }
46365 + ),
46366 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
46367 + external_wp_components_namespaceObject.__experimentalToolsPanelItem,
46368 + {
46369 + label: (0,external_wp_i18n_namespaceObject.__)("Display date"),
46370 + hasValue: () => !!displayDate,
46371 + onDeselect: () => setAttributes({ displayDate: false }),
46372 + isShownByDefault: true,
46373 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
46374 + external_wp_components_namespaceObject.ToggleControl,
46375 + {
46376 + __nextHasNoMarginBottom: true,
46377 + label: (0,external_wp_i18n_namespaceObject.__)("Display date"),
46378 + checked: displayDate,
46379 + onChange: toggleAttribute("displayDate")
46380 + }
46381 + )
46382 + }
46383 + ),
46384 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
46385 + external_wp_components_namespaceObject.__experimentalToolsPanelItem,
46386 + {
46387 + label: (0,external_wp_i18n_namespaceObject.__)("Display excerpt"),
46388 + hasValue: () => !!displayExcerpt,
46389 + onDeselect: () => setAttributes({ displayExcerpt: false }),
46390 + isShownByDefault: true,
46391 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
46392 + external_wp_components_namespaceObject.ToggleControl,
46393 + {
46394 + __nextHasNoMarginBottom: true,
46395 + label: (0,external_wp_i18n_namespaceObject.__)("Display excerpt"),
46396 + checked: displayExcerpt,
46397 + onChange: toggleAttribute("displayExcerpt")
46398 + }
46399 + )
46400 + }
46401 + ),
46402 + displayExcerpt && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
46403 + external_wp_components_namespaceObject.__experimentalToolsPanelItem,
46404 + {
46405 + label: (0,external_wp_i18n_namespaceObject.__)("Max number of words in excerpt"),
46406 + hasValue: () => excerptLength !== 55,
46407 + onDeselect: () => setAttributes({ excerptLength: 55 }),
46408 + isShownByDefault: true,
46409 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
46410 + external_wp_components_namespaceObject.RangeControl,
46411 + {
46412 + __nextHasNoMarginBottom: true,
46413 + __next40pxDefaultSize: true,
46414 + label: (0,external_wp_i18n_namespaceObject.__)("Max number of words in excerpt"),
46415 + value: excerptLength,
46416 + onChange: (value) => setAttributes({ excerptLength: value }),
46417 + min: 10,
46418 + max: 100,
46419 + required: true
46420 + }
46421 + )
46422 + }
46423 + ),
46424 + blockLayout === "grid" && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
46425 + external_wp_components_namespaceObject.__experimentalToolsPanelItem,
46426 + {
46427 + label: (0,external_wp_i18n_namespaceObject.__)("Columns"),
46428 + hasValue: () => columns !== 2,
46429 + onDeselect: () => setAttributes({ columns: 2 }),
46430 + isShownByDefault: true,
46431 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
46432 + external_wp_components_namespaceObject.RangeControl,
46433 + {
46434 + __nextHasNoMarginBottom: true,
46435 + __next40pxDefaultSize: true,
46436 + label: (0,external_wp_i18n_namespaceObject.__)("Columns"),
46437 + value: columns,
46438 + onChange: (value) => setAttributes({ columns: value }),
46439 + min: 2,
46440 + max: 6,
46441 + required: true
46442 + }
46443 + )
46444 + }
46445 + ),
46446 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
46447 + external_wp_components_namespaceObject.__experimentalToolsPanelItem,
46448 + {
46449 + label: (0,external_wp_i18n_namespaceObject.__)("Open links in new tab"),
46450 + hasValue: () => !!openInNewTab,
46451 + onDeselect: () => setAttributes({ openInNewTab: false }),
46452 + isShownByDefault: true,
46453 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
46454 + external_wp_components_namespaceObject.ToggleControl,
46455 + {
46456 + __nextHasNoMarginBottom: true,
46457 + label: (0,external_wp_i18n_namespaceObject.__)("Open links in new tab"),
46458 + checked: openInNewTab,
46459 + onChange: (value) => setAttributes({ openInNewTab: value })
46460 + }
46461 + )
46462 + }
46463 + )
46464 + ]
46465 + }
46466 + ) }),
46467 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, { group: "advanced", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
46468 + external_wp_components_namespaceObject.TextControl,
46469 + {
46470 + __next40pxDefaultSize: true,
46471 + __nextHasNoMarginBottom: true,
46472 + label: (0,external_wp_i18n_namespaceObject.__)("Link relation"),
46473 + help: (0,external_wp_element_namespaceObject.createInterpolateElement)(
46474 + (0,external_wp_i18n_namespaceObject.__)(
46475 + "The <a>Link Relation</a> attribute defines the relationship between a linked resource and the current document."
46476 + ),
46477 + {
46478 + a: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ExternalLink, { href: "https://developer.mozilla.org/docs/Web/HTML/Attributes/rel" })
46479 + }
46480 + ),
46481 + value: rel || "",
46482 + onChange: (value) => setAttributes({ rel: value })
46483 + }
46484 + ) }),
46485 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { ...blockProps, children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Disabled, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
46486 + (external_wp_serverSideRender_default()),
46487 + {
46488 + block: "core/rss",
46489 + attributes: serverSideAttributes
46490 + }
46491 + ) }) })
46492 + ] });
46493 + }
46494 +
46495 +
46496 + ;// ./node_modules/@wordpress/block-library/build-module/rss/index.js
46497 +
46498 +
46499 +
46500 +
46501 + const { name: rss_name } = rss_block_namespaceObject;
46502 + const rss_settings = {
46503 + icon: rss_default,
46504 + example: {
46505 + attributes: {
46506 + feedURL: "https://wordpress.org"
46507 + }
46508 + },
46509 + edit: RSSEdit
46510 + };
46511 + const rss_init = () => initBlock({ name: rss_name, metadata: rss_block_namespaceObject, settings: rss_settings });
46512 +
46513 +
46514 + ;// ./node_modules/@wordpress/icons/build-module/library/search.js
46515 +
46516 +
46517 + var search_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M13 5c-3.3 0-6 2.7-6 6 0 1.4.5 2.7 1.3 3.7l-3.8 3.8 1.1 1.1 3.8-3.8c1 .8 2.3 1.3 3.7 1.3 3.3 0 6-2.7 6-6S16.3 5 13 5zm0 10.5c-2.5 0-4.5-2-4.5-4.5s2-4.5 4.5-4.5 4.5 2 4.5 4.5-2 4.5-4.5 4.5z" }) });
46518 +
46519 +
46520 + ;// ./node_modules/@wordpress/block-library/build-module/search/block.json
46521 + const search_block_namespaceObject = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/search","title":"Search","category":"widgets","description":"Help visitors find your content.","keywords":["find"],"textdomain":"default","attributes":{"label":{"type":"string","role":"content"},"showLabel":{"type":"boolean","default":true},"placeholder":{"type":"string","default":"","role":"content"},"width":{"type":"number"},"widthUnit":{"type":"string"},"buttonText":{"type":"string","role":"content"},"buttonPosition":{"type":"string","default":"button-outside"},"buttonUseIcon":{"type":"boolean","default":false},"query":{"type":"object","default":{}},"isSearchFieldHidden":{"type":"boolean","default":false}},"supports":{"align":["left","center","right"],"color":{"gradients":true,"__experimentalSkipSerialization":true,"__experimentalDefaultControls":{"background":true,"text":true}},"interactivity":true,"typography":{"__experimentalSkipSerialization":true,"__experimentalSelector":".wp-block-search__label, .wp-block-search__input, .wp-block-search__button","fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"__experimentalBorder":{"color":true,"radius":true,"width":true,"__experimentalSkipSerialization":true,"__experimentalDefaultControls":{"color":true,"radius":true,"width":true}},"spacing":{"margin":true},"html":false},"editorStyle":"wp-block-search-editor","style":"wp-block-search"}');
46522 + ;// ./node_modules/@wordpress/block-library/build-module/search/utils.js
46523 + const PC_WIDTH_DEFAULT = 50;
46524 + const PX_WIDTH_DEFAULT = 350;
46525 + const MIN_WIDTH = 220;
46526 + function utils_isPercentageUnit(unit) {
46527 + return unit === "%";
46528 + }
46529 +
46530 +
46531 + ;// ./node_modules/@wordpress/block-library/build-module/search/edit.js
46532 +
46533 +
46534 +
46535 +
46536 +
46537 +
46538 +
46539 +
46540 +
46541 +
46542 +
46543 +
46544 + const DEFAULT_INNER_PADDING = "4px";
46545 + const PERCENTAGE_WIDTHS = [25, 50, 75, 100];
46546 + function SearchEdit({
46547 + className,
46548 + attributes,
46549 + setAttributes,
46550 + toggleSelection,
46551 + isSelected,
46552 + clientId
46553 + }) {
46554 + const {
46555 + label,
46556 + showLabel,
46557 + placeholder,
46558 + width,
46559 + widthUnit,
46560 + align,
46561 + buttonText,
46562 + buttonPosition,
46563 + buttonUseIcon,
46564 + isSearchFieldHidden,
46565 + style
46566 + } = attributes;
46567 + const wasJustInsertedIntoNavigationBlock = (0,external_wp_data_namespaceObject.useSelect)(
46568 + (select) => {
46569 + const { getBlockParentsByBlockName, wasBlockJustInserted } = select(external_wp_blockEditor_namespaceObject.store);
46570 + return !!getBlockParentsByBlockName(clientId, "core/navigation")?.length && wasBlockJustInserted(clientId);
46571 + },
46572 + [clientId]
46573 + );
46574 + const { __unstableMarkNextChangeAsNotPersistent } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_blockEditor_namespaceObject.store);
46575 + (0,external_wp_element_namespaceObject.useEffect)(() => {
46576 + if (wasJustInsertedIntoNavigationBlock) {
46577 + __unstableMarkNextChangeAsNotPersistent();
46578 + setAttributes({
46579 + showLabel: false,
46580 + buttonUseIcon: true,
46581 + buttonPosition: "button-inside"
46582 + });
46583 + }
46584 + }, [
46585 + __unstableMarkNextChangeAsNotPersistent,
46586 + wasJustInsertedIntoNavigationBlock,
46587 + setAttributes
46588 + ]);
46589 + const borderRadius = style?.border?.radius;
46590 + let borderProps = (0,external_wp_blockEditor_namespaceObject.__experimentalUseBorderProps)(attributes);
46591 + if (typeof borderRadius === "number") {
46592 + borderProps = {
46593 + ...borderProps,
46594 + style: {
46595 + ...borderProps.style,
46596 + borderRadius: `${borderRadius}px`
46597 + }
46598 + };
46599 + }
46600 + const colorProps = (0,external_wp_blockEditor_namespaceObject.__experimentalUseColorProps)(attributes);
46601 + const [fluidTypographySettings, layout] = (0,external_wp_blockEditor_namespaceObject.useSettings)(
46602 + "typography.fluid",
46603 + "layout"
46604 + );
46605 + const typographyProps = (0,external_wp_blockEditor_namespaceObject.getTypographyClassesAndStyles)(attributes, {
46606 + typography: {
46607 + fluid: fluidTypographySettings
46608 + },
46609 + layout: {
46610 + wideSize: layout?.wideSize
46611 + }
46612 + });
46613 + const unitControlInstanceId = (0,external_wp_compose_namespaceObject.useInstanceId)(external_wp_components_namespaceObject.__experimentalUnitControl);
46614 + const unitControlInputId = `wp-block-search__width-${unitControlInstanceId}`;
46615 + const isButtonPositionInside = "button-inside" === buttonPosition;
46616 + const isButtonPositionOutside = "button-outside" === buttonPosition;
46617 + const hasNoButton = "no-button" === buttonPosition;
46618 + const hasOnlyButton = "button-only" === buttonPosition;
46619 + const searchFieldRef = (0,external_wp_element_namespaceObject.useRef)();
46620 + const buttonRef = (0,external_wp_element_namespaceObject.useRef)();
46621 + const units = (0,external_wp_components_namespaceObject.__experimentalUseCustomUnits)({
46622 + availableUnits: ["%", "px"],
46623 + defaultValues: { "%": PC_WIDTH_DEFAULT, px: PX_WIDTH_DEFAULT }
46624 + });
46625 + (0,external_wp_element_namespaceObject.useEffect)(() => {
46626 + if (hasOnlyButton && !isSelected) {
46627 + setAttributes({
46628 + isSearchFieldHidden: true
46629 + });
46630 + }
46631 + }, [hasOnlyButton, isSelected, setAttributes]);
46632 + (0,external_wp_element_namespaceObject.useEffect)(() => {
46633 + if (!hasOnlyButton || !isSelected) {
46634 + return;
46635 + }
46636 + setAttributes({
46637 + isSearchFieldHidden: false
46638 + });
46639 + }, [hasOnlyButton, isSelected, setAttributes, width]);
46640 + const getBlockClassNames = () => {
46641 + return dist_clsx(
46642 + className,
46643 + isButtonPositionInside ? "wp-block-search__button-inside" : void 0,
46644 + isButtonPositionOutside ? "wp-block-search__button-outside" : void 0,
46645 + hasNoButton ? "wp-block-search__no-button" : void 0,
46646 + hasOnlyButton ? "wp-block-search__button-only" : void 0,
46647 + !buttonUseIcon && !hasNoButton ? "wp-block-search__text-button" : void 0,
46648 + buttonUseIcon && !hasNoButton ? "wp-block-search__icon-button" : void 0,
46649 + hasOnlyButton && isSearchFieldHidden ? "wp-block-search__searchfield-hidden" : void 0
46650 + );
46651 + };
46652 + const buttonPositionControls = [
46653 + {
46654 + label: (0,external_wp_i18n_namespaceObject.__)("Button outside"),
46655 + value: "button-outside"
46656 + },
46657 + {
46658 + label: (0,external_wp_i18n_namespaceObject.__)("Button inside"),
46659 + value: "button-inside"
46660 + },
46661 + {
46662 + label: (0,external_wp_i18n_namespaceObject.__)("No button"),
46663 + value: "no-button"
46664 + },
46665 + {
46666 + label: (0,external_wp_i18n_namespaceObject.__)("Button only"),
46667 + value: "button-only"
46668 + }
46669 + ];
46670 + const getResizableSides = () => {
46671 + if (hasOnlyButton) {
46672 + return {};
46673 + }
46674 + return {
46675 + right: align !== "right",
46676 + left: align === "right"
46677 + };
46678 + };
46679 + const renderTextField = () => {
46680 + const textFieldClasses = dist_clsx(
46681 + "wp-block-search__input",
46682 + isButtonPositionInside ? void 0 : borderProps.className,
46683 + typographyProps.className
46684 + );
46685 + const textFieldStyles = {
46686 + ...isButtonPositionInside ? {
46687 + borderRadius: borderProps.style?.borderRadius,
46688 + borderTopLeftRadius: borderProps.style?.borderTopLeftRadius,
46689 + borderTopRightRadius: borderProps.style?.borderTopRightRadius,
46690 + borderBottomLeftRadius: borderProps.style?.borderBottomLeftRadius,
46691 + borderBottomRightRadius: borderProps.style?.borderBottomRightRadius
46692 + } : borderProps.style,
46693 + ...typographyProps.style,
46694 + textDecoration: void 0
46695 + };
46696 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
46697 + "input",
46698 + {
46699 + type: "search",
46700 + className: textFieldClasses,
46701 + style: textFieldStyles,
46702 + "aria-label": (0,external_wp_i18n_namespaceObject.__)("Optional placeholder text"),
46703 + placeholder: placeholder ? void 0 : (0,external_wp_i18n_namespaceObject.__)("Optional placeholder\u2026"),
46704 + value: placeholder,
46705 + onChange: (event) => setAttributes({ placeholder: event.target.value }),
46706 + ref: searchFieldRef
46707 + }
46708 + );
46709 + };
46710 + const renderButton = () => {
46711 + const buttonClasses = dist_clsx(
46712 + "wp-block-search__button",
46713 + colorProps.className,
46714 + typographyProps.className,
46715 + isButtonPositionInside ? void 0 : borderProps.className,
46716 + buttonUseIcon ? "has-icon" : void 0,
46717 + (0,external_wp_blockEditor_namespaceObject.__experimentalGetElementClassName)("button")
46718 + );
46719 + const buttonStyles = {
46720 + ...colorProps.style,
46721 + ...typographyProps.style,
46722 + ...isButtonPositionInside ? {
46723 + borderRadius: borderProps.style?.borderRadius,
46724 + borderTopLeftRadius: borderProps.style?.borderTopLeftRadius,
46725 + borderTopRightRadius: borderProps.style?.borderTopRightRadius,
46726 + borderBottomLeftRadius: borderProps.style?.borderBottomLeftRadius,
46727 + borderBottomRightRadius: borderProps.style?.borderBottomRightRadius
46728 + } : borderProps.style
46729 + };
46730 + const handleButtonClick = () => {
46731 + if (hasOnlyButton) {
46732 + setAttributes({
46733 + isSearchFieldHidden: !isSearchFieldHidden
46734 + });
46735 + }
46736 + };
46737 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
46738 + buttonUseIcon && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
46739 + "button",
46740 + {
46741 + type: "button",
46742 + className: buttonClasses,
46743 + style: buttonStyles,
46744 + "aria-label": buttonText ? (0,external_wp_dom_namespaceObject.__unstableStripHTML)(buttonText) : (0,external_wp_i18n_namespaceObject.__)("Search"),
46745 + onClick: handleButtonClick,
46746 + ref: buttonRef,
46747 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(build_module_icon_icon_default, { icon: search_default })
46748 + }
46749 + ),
46750 + !buttonUseIcon && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
46751 + external_wp_blockEditor_namespaceObject.RichText,
46752 + {
46753 + identifier: "buttonText",
46754 + className: buttonClasses,
46755 + style: buttonStyles,
46756 + "aria-label": (0,external_wp_i18n_namespaceObject.__)("Button text"),
46757 + placeholder: (0,external_wp_i18n_namespaceObject.__)("Add button text\u2026"),
46758 + withoutInteractiveFormatting: true,
46759 + value: buttonText,
46760 + onChange: (html) => setAttributes({ buttonText: html }),
46761 + onClick: handleButtonClick
46762 + }
46763 + )
46764 + ] });
46765 + };
46766 + const dropdownMenuProps = useToolsPanelDropdownMenuProps();
46767 + const controls = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(
46768 + external_wp_components_namespaceObject.__experimentalToolsPanel,
46769 + {
46770 + label: (0,external_wp_i18n_namespaceObject.__)("Settings"),
46771 + resetAll: () => {
46772 + setAttributes({
46773 + width: void 0,
46774 + widthUnit: void 0,
46775 + showLabel: true,
46776 + buttonUseIcon: false,
46777 + buttonPosition: "button-outside",
46778 + isSearchFieldHidden: false
46779 + });
46780 + },
46781 + dropdownMenuProps,
46782 + children: [
46783 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
46784 + external_wp_components_namespaceObject.__experimentalToolsPanelItem,
46785 + {
46786 + hasValue: () => !showLabel,
46787 + label: (0,external_wp_i18n_namespaceObject.__)("Show label"),
46788 + onDeselect: () => {
46789 + setAttributes({
46790 + showLabel: true
46791 + });
46792 + },
46793 + isShownByDefault: true,
46794 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
46795 + external_wp_components_namespaceObject.ToggleControl,
46796 + {
46797 + __nextHasNoMarginBottom: true,
46798 + checked: showLabel,
46799 + label: (0,external_wp_i18n_namespaceObject.__)("Show label"),
46800 + onChange: (value) => setAttributes({
46801 + showLabel: value
46802 + })
46803 + }
46804 + )
46805 + }
46806 + ),
46807 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
46808 + external_wp_components_namespaceObject.__experimentalToolsPanelItem,
46809 + {
46810 + hasValue: () => buttonPosition !== "button-outside",
46811 + label: (0,external_wp_i18n_namespaceObject.__)("Button position"),
46812 + onDeselect: () => {
46813 + setAttributes({
46814 + buttonPosition: "button-outside",
46815 + isSearchFieldHidden: false
46816 + });
46817 + },
46818 + isShownByDefault: true,
46819 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
46820 + external_wp_components_namespaceObject.SelectControl,
46821 + {
46822 + value: buttonPosition,
46823 + __next40pxDefaultSize: true,
46824 + __nextHasNoMarginBottom: true,
46825 + label: (0,external_wp_i18n_namespaceObject.__)("Button position"),
46826 + onChange: (value) => {
46827 + setAttributes({
46828 + buttonPosition: value,
46829 + isSearchFieldHidden: value === "button-only"
46830 + });
46831 + },
46832 + options: buttonPositionControls
46833 + }
46834 + )
46835 + }
46836 + ),
46837 + buttonPosition !== "no-button" && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
46838 + external_wp_components_namespaceObject.__experimentalToolsPanelItem,
46839 + {
46840 + hasValue: () => !!buttonUseIcon,
46841 + label: (0,external_wp_i18n_namespaceObject.__)("Use button with icon"),
46842 + onDeselect: () => {
46843 + setAttributes({
46844 + buttonUseIcon: false
46845 + });
46846 + },
46847 + isShownByDefault: true,
46848 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
46849 + external_wp_components_namespaceObject.ToggleControl,
46850 + {
46851 + __nextHasNoMarginBottom: true,
46852 + checked: buttonUseIcon,
46853 + label: (0,external_wp_i18n_namespaceObject.__)("Use button with icon"),
46854 + onChange: (value) => setAttributes({
46855 + buttonUseIcon: value
46856 + })
46857 + }
46858 + )
46859 + }
46860 + ),
46861 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
46862 + external_wp_components_namespaceObject.__experimentalToolsPanelItem,
46863 + {
46864 + hasValue: () => !!width,
46865 + label: (0,external_wp_i18n_namespaceObject.__)("Width"),
46866 + onDeselect: () => {
46867 + setAttributes({
46868 + width: void 0,
46869 + widthUnit: void 0
46870 + });
46871 + },
46872 + isShownByDefault: true,
46873 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.__experimentalVStack, { children: [
46874 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
46875 + external_wp_components_namespaceObject.__experimentalUnitControl,
46876 + {
46877 + __next40pxDefaultSize: true,
46878 + label: (0,external_wp_i18n_namespaceObject.__)("Width"),
46879 + id: unitControlInputId,
46880 + min: utils_isPercentageUnit(widthUnit) ? 0 : MIN_WIDTH,
46881 + max: utils_isPercentageUnit(widthUnit) ? 100 : void 0,
46882 + step: 1,
46883 + onChange: (newWidth) => {
46884 + const parsedNewWidth = newWidth === "" ? void 0 : parseInt(newWidth, 10);
46885 + setAttributes({
46886 + width: parsedNewWidth
46887 + });
46888 + },
46889 + onUnitChange: (newUnit) => {
46890 + setAttributes({
46891 + width: "%" === newUnit ? PC_WIDTH_DEFAULT : PX_WIDTH_DEFAULT,
46892 + widthUnit: newUnit
46893 + });
46894 + },
46895 + __unstableInputWidth: "80px",
46896 + value: `${width}${widthUnit}`,
46897 + units
46898 + }
46899 + ),
46900 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
46901 + external_wp_components_namespaceObject.__experimentalToggleGroupControl,
46902 + {
46903 + label: (0,external_wp_i18n_namespaceObject.__)("Percentage Width"),
46904 + value: PERCENTAGE_WIDTHS.includes(width) && widthUnit === "%" ? width : void 0,
46905 + hideLabelFromVision: true,
46906 + onChange: (newWidth) => {
46907 + setAttributes({
46908 + width: newWidth,
46909 + widthUnit: "%"
46910 + });
46911 + },
46912 + isBlock: true,
46913 + __next40pxDefaultSize: true,
46914 + __nextHasNoMarginBottom: true,
46915 + children: PERCENTAGE_WIDTHS.map((widthValue) => {
46916 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
46917 + external_wp_components_namespaceObject.__experimentalToggleGroupControlOption,
46918 + {
46919 + value: widthValue,
46920 + label: (0,external_wp_i18n_namespaceObject.sprintf)(
46921 + /* translators: %d: Percentage value. */
46922 + (0,external_wp_i18n_namespaceObject.__)("%d%%"),
46923 + widthValue
46924 + )
46925 + },
46926 + widthValue
46927 + );
46928 + })
46929 + }
46930 + )
46931 + ] })
46932 + }
46933 + )
46934 + ]
46935 + }
46936 + ) }) });
46937 + const isNonZeroBorderRadius = (radius) => radius !== void 0 && parseInt(radius, 10) !== 0;
46938 + const padBorderRadius = (radius) => isNonZeroBorderRadius(radius) ? `calc(${radius} + ${DEFAULT_INNER_PADDING})` : void 0;
46939 + const getWrapperStyles = () => {
46940 + const styles = isButtonPositionInside ? borderProps.style : {
46941 + borderRadius: borderProps.style?.borderRadius,
46942 + borderTopLeftRadius: borderProps.style?.borderTopLeftRadius,
46943 + borderTopRightRadius: borderProps.style?.borderTopRightRadius,
46944 + borderBottomLeftRadius: borderProps.style?.borderBottomLeftRadius,
46945 + borderBottomRightRadius: borderProps.style?.borderBottomRightRadius
46946 + };
46947 + if (isButtonPositionInside) {
46948 + if (typeof borderRadius === "object") {
46949 + const {
46950 + borderTopLeftRadius,
46951 + borderTopRightRadius,
46952 + borderBottomLeftRadius,
46953 + borderBottomRightRadius
46954 + } = borderProps.style;
46955 + return {
46956 + ...styles,
46957 + borderTopLeftRadius: padBorderRadius(borderTopLeftRadius),
46958 + borderTopRightRadius: padBorderRadius(borderTopRightRadius),
46959 + borderBottomLeftRadius: padBorderRadius(
46960 + borderBottomLeftRadius
46961 + ),
46962 + borderBottomRightRadius: padBorderRadius(
46963 + borderBottomRightRadius
46964 + )
46965 + };
46966 + }
46967 + const radius = Number.isInteger(borderRadius) ? `${borderRadius}px` : borderRadius;
46968 + styles.borderRadius = `calc(${radius} + ${DEFAULT_INNER_PADDING})`;
46969 + }
46970 + return styles;
46971 + };
46972 + const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)({
46973 + className: getBlockClassNames(),
46974 + style: {
46975 + ...typographyProps.style,
46976 + // Input opts out of text decoration.
46977 + textDecoration: void 0
46978 + }
46979 + });
46980 + const labelClassnames = dist_clsx(
46981 + "wp-block-search__label",
46982 + typographyProps.className
46983 + );
46984 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", { ...blockProps, children: [
46985 + controls,
46986 + showLabel && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
46987 + external_wp_blockEditor_namespaceObject.RichText,
46988 + {
46989 + identifier: "label",
46990 + className: labelClassnames,
46991 + "aria-label": (0,external_wp_i18n_namespaceObject.__)("Label text"),
46992 + placeholder: (0,external_wp_i18n_namespaceObject.__)("Add label\u2026"),
46993 + withoutInteractiveFormatting: true,
46994 + value: label,
46995 + onChange: (html) => setAttributes({ label: html }),
46996 + style: typographyProps.style
46997 + }
46998 + ),
46999 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(
47000 + external_wp_components_namespaceObject.ResizableBox,
47001 + {
47002 + size: {
47003 + width: width === void 0 ? "auto" : `${width}${widthUnit}`,
47004 + height: "auto"
47005 + },
47006 + className: dist_clsx(
47007 + "wp-block-search__inside-wrapper",
47008 + isButtonPositionInside ? borderProps.className : void 0
47009 + ),
47010 + style: getWrapperStyles(),
47011 + minWidth: MIN_WIDTH,
47012 + enable: getResizableSides(),
47013 + onResizeStart: (event, direction, elt) => {
47014 + setAttributes({
47015 + width: parseInt(elt.offsetWidth, 10),
47016 + widthUnit: "px"
47017 + });
47018 + toggleSelection(false);
47019 + },
47020 + onResizeStop: (event, direction, elt, delta) => {
47021 + setAttributes({
47022 + width: parseInt(width + delta.width, 10)
47023 + });
47024 + toggleSelection(true);
47025 + },
47026 + showHandle: isSelected,
47027 + children: [
47028 + (isButtonPositionInside || isButtonPositionOutside || hasOnlyButton) && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
47029 + renderTextField(),
47030 + renderButton()
47031 + ] }),
47032 + hasNoButton && renderTextField()
47033 + ]
47034 + }
47035 + )
47036 + ] });
47037 + }
47038 +
47039 +
47040 + ;// ./node_modules/@wordpress/block-library/build-module/search/variations.js
47041 +
47042 + const search_variations_variations = [
47043 + {
47044 + name: "default",
47045 + isDefault: true,
47046 + attributes: { buttonText: (0,external_wp_i18n_namespaceObject.__)("Search"), label: (0,external_wp_i18n_namespaceObject.__)("Search") }
47047 + }
47048 + ];
47049 + var search_variations_variations_default = search_variations_variations;
47050 +
47051 +
47052 + ;// ./node_modules/@wordpress/block-library/build-module/search/index.js
47053 +
47054 +
47055 +
47056 +
47057 +
47058 +
47059 + const { name: search_name } = search_block_namespaceObject;
47060 + const search_settings = {
47061 + icon: search_default,
47062 + example: {
47063 + attributes: { buttonText: (0,external_wp_i18n_namespaceObject.__)("Search"), label: (0,external_wp_i18n_namespaceObject.__)("Search") },
47064 + viewportWidth: 400
47065 + },
47066 + variations: search_variations_variations_default,
47067 + edit: SearchEdit
47068 + };
47069 + const search_init = () => initBlock({ name: search_name, metadata: search_block_namespaceObject, settings: search_settings });
47070 +
47071 +
47072 + ;// ./node_modules/@wordpress/icons/build-module/library/separator.js
47073 +
47074 +
47075 + var separator_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M4.5 12.5v4H3V7h1.5v3.987h15V7H21v9.5h-1.5v-4h-15Z" }) });
47076 +
47077 +
47078 + ;// ./node_modules/@wordpress/block-library/build-module/separator/use-deprecated-opacity.js
47079 +
47080 +
47081 + function useDeprecatedOpacity(opacity, currentColor, setAttributes) {
47082 + const [deprecatedOpacityWithNoColor, setDeprecatedOpacityWithNoColor] = (0,external_wp_element_namespaceObject.useState)(false);
47083 + const previousColor = (0,external_wp_compose_namespaceObject.usePrevious)(currentColor);
47084 + (0,external_wp_element_namespaceObject.useEffect)(() => {
47085 + if (opacity === "css" && !currentColor && !previousColor) {
47086 + setDeprecatedOpacityWithNoColor(true);
47087 + }
47088 + }, [currentColor, previousColor, opacity]);
47089 + (0,external_wp_element_namespaceObject.useEffect)(() => {
47090 + if (opacity === "css" && (deprecatedOpacityWithNoColor && currentColor || previousColor && currentColor !== previousColor)) {
47091 + setAttributes({ opacity: "alpha-channel" });
47092 + setDeprecatedOpacityWithNoColor(false);
47093 + }
47094 + }, [deprecatedOpacityWithNoColor, currentColor, previousColor]);
47095 + }
47096 +
47097 +
47098 + ;// ./node_modules/@wordpress/block-library/build-module/separator/edit.js
47099 +
47100 +
47101 +
47102 +
47103 +
47104 +
47105 + const HtmlElementControl = ({ tagName, setAttributes }) => {
47106 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
47107 + external_wp_components_namespaceObject.SelectControl,
47108 + {
47109 + label: (0,external_wp_i18n_namespaceObject.__)("HTML element"),
47110 + value: tagName,
47111 + onChange: (newValue) => setAttributes({ tagName: newValue }),
47112 + options: [
47113 + { label: (0,external_wp_i18n_namespaceObject.__)("Default (<hr>)"), value: "hr" },
47114 + { label: "<div>", value: "div" }
47115 + ],
47116 + help: tagName === "hr" ? (0,external_wp_i18n_namespaceObject.__)(
47117 + "Only select <hr> if the separator conveys important information and should be announced by screen readers."
47118 + ) : (0,external_wp_i18n_namespaceObject.__)(
47119 + "The <div> element should only be used if the block is a design element with no semantic meaning."
47120 + ),
47121 + __next40pxDefaultSize: true,
47122 + __nextHasNoMarginBottom: true
47123 + }
47124 + );
47125 + };
47126 + function SeparatorEdit({ attributes, setAttributes }) {
47127 + const { backgroundColor, opacity, style, tagName } = attributes;
47128 + const colorProps = (0,external_wp_blockEditor_namespaceObject.__experimentalUseColorProps)(attributes);
47129 + const currentColor = colorProps?.style?.backgroundColor;
47130 + const hasCustomColor = !!style?.color?.background;
47131 + useDeprecatedOpacity(opacity, currentColor, setAttributes);
47132 + const colorClass = (0,external_wp_blockEditor_namespaceObject.getColorClassName)("color", backgroundColor);
47133 + const className = dist_clsx(
47134 + {
47135 + "has-text-color": backgroundColor || currentColor,
47136 + [colorClass]: colorClass,
47137 + "has-css-opacity": opacity === "css",
47138 + "has-alpha-channel-opacity": opacity === "alpha-channel"
47139 + },
47140 + colorProps.className
47141 + );
47142 + const styles = {
47143 + color: currentColor,
47144 + backgroundColor: currentColor
47145 + };
47146 + const Wrapper = tagName === "hr" ? external_wp_components_namespaceObject.HorizontalRule : tagName;
47147 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
47148 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, { group: "advanced", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
47149 + HtmlElementControl,
47150 + {
47151 + tagName,
47152 + setAttributes
47153 + }
47154 + ) }),
47155 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
47156 + Wrapper,
47157 + {
47158 + ...(0,external_wp_blockEditor_namespaceObject.useBlockProps)({
47159 + className,
47160 + style: hasCustomColor ? styles : void 0
47161 + })
47162 + }
47163 + )
47164 + ] });
47165 + }
47166 +
47167 +
47168 + ;// ./node_modules/@wordpress/block-library/build-module/separator/block.json
47169 + const separator_block_namespaceObject = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/separator","title":"Separator","category":"design","description":"Create a break between ideas or sections with a horizontal separator.","keywords":["horizontal-line","hr","divider"],"textdomain":"default","attributes":{"opacity":{"type":"string","default":"alpha-channel"},"tagName":{"type":"string","enum":["hr","div"],"default":"hr"}},"supports":{"anchor":true,"align":["center","wide","full"],"color":{"enableContrastChecker":false,"__experimentalSkipSerialization":true,"gradients":true,"background":true,"text":false,"__experimentalDefaultControls":{"background":true}},"spacing":{"margin":["top","bottom"]},"interactivity":{"clientNavigation":true}},"styles":[{"name":"default","label":"Default","isDefault":true},{"name":"wide","label":"Wide Line"},{"name":"dots","label":"Dots"}],"editorStyle":"wp-block-separator-editor","style":"wp-block-separator"}');
47170 + ;// ./node_modules/@wordpress/block-library/build-module/separator/save.js
47171 +
47172 +
47173 +
47174 + function separatorSave({ attributes }) {
47175 + const { backgroundColor, style, opacity, tagName: Tag } = attributes;
47176 + const customColor = style?.color?.background;
47177 + const colorProps = (0,external_wp_blockEditor_namespaceObject.__experimentalGetColorClassesAndStyles)(attributes);
47178 + const colorClass = (0,external_wp_blockEditor_namespaceObject.getColorClassName)("color", backgroundColor);
47179 + const className = dist_clsx(
47180 + {
47181 + "has-text-color": backgroundColor || customColor,
47182 + [colorClass]: colorClass,
47183 + "has-css-opacity": opacity === "css",
47184 + "has-alpha-channel-opacity": opacity === "alpha-channel"
47185 + },
47186 + colorProps.className
47187 + );
47188 + const styles = {
47189 + backgroundColor: colorProps?.style?.backgroundColor,
47190 + color: colorClass ? void 0 : customColor
47191 + };
47192 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(Tag, { ...external_wp_blockEditor_namespaceObject.useBlockProps.save({ className, style: styles }) });
47193 + }
47194 +
47195 +
47196 + ;// ./node_modules/@wordpress/block-library/build-module/separator/transforms.js
47197 +
47198 + const separator_transforms_transforms = {
47199 + from: [
47200 + {
47201 + type: "enter",
47202 + regExp: /^-{3,}$/,
47203 + transform: () => (0,external_wp_blocks_namespaceObject.createBlock)("core/separator")
47204 + },
47205 + {
47206 + type: "raw",
47207 + selector: "hr",
47208 + schema: {
47209 + hr: {}
47210 + }
47211 + }
47212 + ],
47213 + to: [
47214 + {
47215 + type: "block",
47216 + blocks: ["core/spacer"],
47217 + // Transform to Spacer.
47218 + transform: ({ anchor }) => {
47219 + return (0,external_wp_blocks_namespaceObject.createBlock)("core/spacer", {
47220 + anchor: anchor || ""
47221 + });
47222 + }
47223 + }
47224 + ]
47225 + };
47226 + var separator_transforms_transforms_default = separator_transforms_transforms;
47227 +
47228 +
47229 + ;// ./node_modules/@wordpress/block-library/build-module/separator/deprecated.js
47230 +
47231 +
47232 +
47233 + const separator_deprecated_v1 = {
47234 + attributes: {
47235 + color: {
47236 + type: "string"
47237 + },
47238 + customColor: {
47239 + type: "string"
47240 + }
47241 + },
47242 + save({ attributes }) {
47243 + const { color, customColor } = attributes;
47244 + const backgroundClass = (0,external_wp_blockEditor_namespaceObject.getColorClassName)("background-color", color);
47245 + const colorClass = (0,external_wp_blockEditor_namespaceObject.getColorClassName)("color", color);
47246 + const className = dist_clsx({
47247 + "has-text-color has-background": color || customColor,
47248 + [backgroundClass]: backgroundClass,
47249 + [colorClass]: colorClass
47250 + });
47251 + const style = {
47252 + backgroundColor: backgroundClass ? void 0 : customColor,
47253 + color: colorClass ? void 0 : customColor
47254 + };
47255 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("hr", { ...external_wp_blockEditor_namespaceObject.useBlockProps.save({ className, style }) });
47256 + },
47257 + migrate(attributes) {
47258 + const { color, customColor, ...restAttributes } = attributes;
47259 + return {
47260 + ...restAttributes,
47261 + backgroundColor: color ? color : void 0,
47262 + opacity: "css",
47263 + style: customColor ? { color: { background: customColor } } : void 0,
47264 + tagName: "hr"
47265 + };
47266 + }
47267 + };
47268 + var separator_deprecated_deprecated_default = [separator_deprecated_v1];
47269 +
47270 +
47271 + ;// ./node_modules/@wordpress/block-library/build-module/separator/index.js
47272 +
47273 +
47274 +
47275 +
47276 +
47277 +
47278 +
47279 + const { name: separator_name } = separator_block_namespaceObject;
47280 + const separator_settings = {
47281 + icon: separator_default,
47282 + example: {
47283 + attributes: {
47284 + customColor: "#065174",
47285 + className: "is-style-wide"
47286 + }
47287 + },
47288 + transforms: separator_transforms_transforms_default,
47289 + edit: SeparatorEdit,
47290 + save: separatorSave,
47291 + deprecated: separator_deprecated_deprecated_default
47292 + };
47293 + const separator_init = () => initBlock({ name: separator_name, metadata: separator_block_namespaceObject, settings: separator_settings });
47294 +
47295 +
47296 + ;// ./node_modules/@wordpress/icons/build-module/library/shortcode.js
47297 +
47298 +
47299 + var shortcode_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M16 4.2v1.5h2.5v12.5H16v1.5h4V4.2h-4zM4.2 19.8h4v-1.5H5.8V5.8h2.5V4.2h-4l-.1 15.6zm5.1-3.1l1.4.6 4-10-1.4-.6-4 10z" }) });
47300 +
47301 +
47302 + ;// ./node_modules/@wordpress/block-library/build-module/shortcode/edit.js
47303 +
47304 +
47305 +
47306 +
47307 +
47308 +
47309 + function ShortcodeEdit({ attributes, setAttributes }) {
47310 + const instanceId = (0,external_wp_compose_namespaceObject.useInstanceId)(ShortcodeEdit);
47311 + const inputId = `blocks-shortcode-input-${instanceId}`;
47312 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { ...(0,external_wp_blockEditor_namespaceObject.useBlockProps)(), children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Placeholder, { icon: shortcode_default, label: (0,external_wp_i18n_namespaceObject.__)("Shortcode"), children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
47313 + external_wp_blockEditor_namespaceObject.PlainText,
47314 + {
47315 + className: "blocks-shortcode__textarea",
47316 + id: inputId,
47317 + value: attributes.text,
47318 + "aria-label": (0,external_wp_i18n_namespaceObject.__)("Shortcode text"),
47319 + placeholder: (0,external_wp_i18n_namespaceObject.__)("Write shortcode here\u2026"),
47320 + onChange: (text) => setAttributes({ text })
47321 + }
47322 + ) }) });
47323 + }
47324 +
47325 +
47326 + ;// ./node_modules/@wordpress/block-library/build-module/shortcode/save.js
47327 +
47328 +
47329 + function shortcode_save_save({ attributes }) {
47330 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_element_namespaceObject.RawHTML, { children: attributes.text });
47331 + }
47332 +
47333 +
47334 + ;// external ["wp","autop"]
47335 + const external_wp_autop_namespaceObject = window["wp"]["autop"];
47336 + ;// ./node_modules/@wordpress/block-library/build-module/shortcode/transforms.js
47337 +
47338 + const shortcode_transforms_transforms = {
47339 + from: [
47340 + {
47341 + type: "shortcode",
47342 + // Per "Shortcode names should be all lowercase and use all
47343 + // letters, but numbers and underscores should work fine too.
47344 + // Be wary of using hyphens (dashes), you'll be better off not
47345 + // using them." in https://codex.wordpress.org/Shortcode_API
47346 + // Require that the first character be a letter. This notably
47347 + // prevents footnote markings ([1]) from being caught as
47348 + // shortcodes.
47349 + tag: "[a-z][a-z0-9_-]*",
47350 + attributes: {
47351 + text: {
47352 + type: "string",
47353 + shortcode: (attrs, { content }) => {
47354 + return (0,external_wp_autop_namespaceObject.removep)((0,external_wp_autop_namespaceObject.autop)(content));
47355 + }
47356 + }
47357 + },
47358 + priority: 20
47359 + }
47360 + ]
47361 + };
47362 + var shortcode_transforms_transforms_default = shortcode_transforms_transforms;
47363 +
47364 +
47365 + ;// ./node_modules/@wordpress/block-library/build-module/shortcode/block.json
47366 + const shortcode_block_namespaceObject = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/shortcode","title":"Shortcode","category":"widgets","description":"Insert additional custom elements with a WordPress shortcode.","textdomain":"default","attributes":{"text":{"type":"string","source":"raw","role":"content"}},"supports":{"className":false,"customClassName":false,"html":false},"editorStyle":"wp-block-shortcode-editor"}');
47367 + ;// ./node_modules/@wordpress/block-library/build-module/shortcode/index.js
47368 +
47369 +
47370 +
47371 +
47372 +
47373 +
47374 + const { name: shortcode_name } = shortcode_block_namespaceObject;
47375 + const shortcode_settings = {
47376 + icon: shortcode_default,
47377 + transforms: shortcode_transforms_transforms_default,
47378 + edit: ShortcodeEdit,
47379 + save: shortcode_save_save
47380 + };
47381 + const shortcode_init = () => initBlock({ name: shortcode_name, metadata: shortcode_block_namespaceObject, settings: shortcode_settings });
47382 +
47383 +
47384 + ;// ./node_modules/@wordpress/icons/build-module/library/site-logo.js
47385 +
47386 +
47387 + var site_logo_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M12 4c-4.4 0-8 3.6-8 8s3.6 8 8 8 8-3.6 8-8-3.6-8-8-8Zm0 1.5c3.4 0 6.2 2.7 6.5 6l-1.2-.6-.8-.4c-.1 0-.2 0-.3-.1H16c-.1-.2-.4-.2-.7 0l-2.9 2.1L9 11.3h-.7L5.5 13v-1.1c0-3.6 2.9-6.5 6.5-6.5Zm0 13c-2.7 0-5-1.7-6-4l2.8-1.7 3.5 1.2h.4s.2 0 .4-.2l2.9-2.1.4.2c.6.3 1.4.7 2.1 1.1-.5 3.1-3.2 5.4-6.4 5.4Z" }) });
47388 +
47389 +
47390 + ;// ./node_modules/@wordpress/block-library/build-module/site-logo/block.json
47391 + const site_logo_block_namespaceObject = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/site-logo","title":"Site Logo","category":"theme","description":"Display an image to represent this site. Update this block and the changes apply everywhere.","textdomain":"default","attributes":{"width":{"type":"number"},"isLink":{"type":"boolean","default":true,"role":"content"},"linkTarget":{"type":"string","default":"_self","role":"content"},"shouldSyncIcon":{"type":"boolean"}},"example":{"viewportWidth":500,"attributes":{"width":350,"className":"block-editor-block-types-list__site-logo-example"}},"supports":{"html":false,"align":true,"alignWide":false,"color":{"text":false,"background":false},"spacing":{"margin":true,"padding":true,"__experimentalDefaultControls":{"margin":false,"padding":false}},"interactivity":{"clientNavigation":true},"filter":{"duotone":true}},"styles":[{"name":"default","label":"Default","isDefault":true},{"name":"rounded","label":"Rounded"}],"selectors":{"filter":{"duotone":".wp-block-site-logo img, .wp-block-site-logo .components-placeholder__illustration, .wp-block-site-logo .components-placeholder::before"}},"editorStyle":"wp-block-site-logo-editor","style":"wp-block-site-logo"}');
47392 + ;// ./node_modules/@wordpress/block-library/build-module/site-logo/edit.js
47393 +
47394 +
47395 +
47396 +
47397 +
47398 +
47399 +
47400 +
47401 +
47402 +
47403 +
47404 +
47405 +
47406 +
47407 + const site_logo_edit_ALLOWED_MEDIA_TYPES = ["image"];
47408 + const ACCEPT_MEDIA_STRING = "image/*";
47409 + const SiteLogo = ({
47410 + alt,
47411 + attributes: { align, width, height, isLink, linkTarget, shouldSyncIcon },
47412 + isSelected,
47413 + setAttributes,
47414 + setLogo,
47415 + logoUrl,
47416 + siteUrl,
47417 + logoId,
47418 + iconId,
47419 + setIcon,
47420 + canUserEdit
47421 + }) => {
47422 + const isLargeViewport = (0,external_wp_compose_namespaceObject.useViewportMatch)("medium");
47423 + const isWideAligned = ["wide", "full"].includes(align);
47424 + const isResizable = !isWideAligned && isLargeViewport;
47425 + const [{ naturalWidth, naturalHeight }, setNaturalSize] = (0,external_wp_element_namespaceObject.useState)({});
47426 + const [isEditingImage, setIsEditingImage] = (0,external_wp_element_namespaceObject.useState)(false);
47427 + const { toggleSelection } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_blockEditor_namespaceObject.store);
47428 + const dropdownMenuProps = useToolsPanelDropdownMenuProps();
47429 + const blockEditingMode = (0,external_wp_blockEditor_namespaceObject.useBlockEditingMode)();
47430 + const isContentOnlyMode = blockEditingMode === "contentOnly";
47431 + const { imageEditing, maxWidth, title } = (0,external_wp_data_namespaceObject.useSelect)((select) => {
47432 + const settings = select(external_wp_blockEditor_namespaceObject.store).getSettings();
47433 + const siteEntities = select(external_wp_coreData_namespaceObject.store).getEntityRecord(
47434 + "root",
47435 + "__unstableBase"
47436 + );
47437 + return {
47438 + title: siteEntities?.name,
47439 + imageEditing: settings.imageEditing,
47440 + maxWidth: settings.maxWidth
47441 + };
47442 + }, []);
47443 + (0,external_wp_element_namespaceObject.useEffect)(() => {
47444 + if (shouldSyncIcon && logoId !== iconId) {
47445 + setAttributes({ shouldSyncIcon: false });
47446 + }
47447 + }, []);
47448 + (0,external_wp_element_namespaceObject.useEffect)(() => {
47449 + if (!isSelected) {
47450 + setIsEditingImage(false);
47451 + }
47452 + }, [isSelected]);
47453 + function onResizeStart() {
47454 + toggleSelection(false);
47455 + }
47456 + function onResizeStop() {
47457 + toggleSelection(true);
47458 + }
47459 + const img = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
47460 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
47461 + "img",
47462 + {
47463 + className: "custom-logo",
47464 + src: logoUrl,
47465 + alt,
47466 + onLoad: (event) => {
47467 + setNaturalSize({
47468 + naturalWidth: event.target.naturalWidth,
47469 + naturalHeight: event.target.naturalHeight
47470 + });
47471 + }
47472 + }
47473 + ),
47474 + (0,external_wp_blob_namespaceObject.isBlobURL)(logoUrl) && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Spinner, {})
47475 + ] });
47476 + let imgWrapper = img;
47477 + if (isLink) {
47478 + imgWrapper = /* eslint-disable jsx-a11y/no-noninteractive-element-interactions, jsx-a11y/click-events-have-key-events */
47479 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
47480 + "a",
47481 + {
47482 + href: siteUrl,
47483 + className: "custom-logo-link",
47484 + rel: "home",
47485 + title,
47486 + onClick: (event) => event.preventDefault(),
47487 + children: img
47488 + }
47489 + );
47490 + }
47491 + if (!isResizable || !naturalWidth || !naturalHeight) {
47492 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { style: { width, height }, children: imgWrapper });
47493 + }
47494 + const defaultWidth = 120;
47495 + const currentWidth = width || defaultWidth;
47496 + const ratio = naturalWidth / naturalHeight;
47497 + const currentHeight = currentWidth / ratio;
47498 + const minWidth = naturalWidth < naturalHeight ? constants_MIN_SIZE : Math.ceil(constants_MIN_SIZE * ratio);
47499 + const minHeight = naturalHeight < naturalWidth ? constants_MIN_SIZE : Math.ceil(constants_MIN_SIZE / ratio);
47500 + const maxWidthBuffer = maxWidth * 2.5;
47501 + let showRightHandle = false;
47502 + let showLeftHandle = false;
47503 + if (align === "center") {
47504 + showRightHandle = true;
47505 + showLeftHandle = true;
47506 + } else if ((0,external_wp_i18n_namespaceObject.isRTL)()) {
47507 + if (align === "left") {
47508 + showRightHandle = true;
47509 + } else {
47510 + showLeftHandle = true;
47511 + }
47512 + } else {
47513 + if (align === "right") {
47514 + showLeftHandle = true;
47515 + } else {
47516 + showRightHandle = true;
47517 + }
47518 + }
47519 + const canEditImage = logoId && naturalWidth && naturalHeight && imageEditing;
47520 + const shouldShowCropAndDimensions = !isContentOnlyMode;
47521 + let imgEdit;
47522 + if (canEditImage && isEditingImage) {
47523 + imgEdit = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
47524 + external_wp_blockEditor_namespaceObject.__experimentalImageEditor,
47525 + {
47526 + id: logoId,
47527 + url: logoUrl,
47528 + width: currentWidth,
47529 + height: currentHeight,
47530 + naturalHeight,
47531 + naturalWidth,
47532 + onSaveImage: (imageAttributes) => {
47533 + setLogo(imageAttributes.id);
47534 + },
47535 + onFinishEditing: () => {
47536 + setIsEditingImage(false);
47537 + }
47538 + }
47539 + );
47540 + } else {
47541 + imgEdit = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
47542 + external_wp_components_namespaceObject.ResizableBox,
47543 + {
47544 + size: {
47545 + width: currentWidth,
47546 + height: currentHeight
47547 + },
47548 + showHandle: isSelected && shouldShowCropAndDimensions,
47549 + minWidth,
47550 + maxWidth: maxWidthBuffer,
47551 + minHeight,
47552 + maxHeight: maxWidthBuffer / ratio,
47553 + lockAspectRatio: true,
47554 + enable: {
47555 + top: false,
47556 + right: showRightHandle,
47557 + bottom: true,
47558 + left: showLeftHandle
47559 + },
47560 + onResizeStart,
47561 + onResizeStop: (event, direction, elt, delta) => {
47562 + onResizeStop();
47563 + setAttributes({
47564 + width: parseInt(currentWidth + delta.width, 10),
47565 + height: parseInt(currentHeight + delta.height, 10)
47566 + });
47567 + },
47568 + children: imgWrapper
47569 + }
47570 + );
47571 + }
47572 + const shouldUseNewUrl = !window?.__experimentalUseCustomizerSiteLogoUrl;
47573 + const siteIconSettingsUrl = shouldUseNewUrl ? siteUrl + "/wp-admin/options-general.php" : siteUrl + "/wp-admin/customize.php?autofocus[section]=title_tagline";
47574 + const syncSiteIconHelpText = (0,external_wp_element_namespaceObject.createInterpolateElement)(
47575 + (0,external_wp_i18n_namespaceObject.__)(
47576 + "Site Icons are what you see in browser tabs, bookmark bars, and within the WordPress mobile apps. To use a custom icon that is different from your site logo, use the <a>Site Icon settings</a>."
47577 + ),
47578 + {
47579 + a: (
47580 + // eslint-disable-next-line jsx-a11y/anchor-has-content
47581 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
47582 + "a",
47583 + {
47584 + href: siteIconSettingsUrl,
47585 + target: "_blank",
47586 + rel: "noopener noreferrer"
47587 + }
47588 + )
47589 + )
47590 + }
47591 + );
47592 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
47593 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(
47594 + external_wp_components_namespaceObject.__experimentalToolsPanel,
47595 + {
47596 + label: (0,external_wp_i18n_namespaceObject.__)("Settings"),
47597 + dropdownMenuProps,
47598 + children: [
47599 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
47600 + external_wp_components_namespaceObject.__experimentalToolsPanelItem,
47601 + {
47602 + isShownByDefault: true,
47603 + hasValue: () => !!width,
47604 + label: (0,external_wp_i18n_namespaceObject.__)("Image width"),
47605 + onDeselect: () => setAttributes({ width: void 0 }),
47606 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
47607 + external_wp_components_namespaceObject.RangeControl,
47608 + {
47609 + __nextHasNoMarginBottom: true,
47610 + __next40pxDefaultSize: true,
47611 + label: (0,external_wp_i18n_namespaceObject.__)("Image width"),
47612 + onChange: (newWidth) => setAttributes({ width: newWidth }),
47613 + min: minWidth,
47614 + max: maxWidthBuffer,
47615 + initialPosition: Math.min(
47616 + defaultWidth,
47617 + maxWidthBuffer
47618 + ),
47619 + value: width || "",
47620 + disabled: !isResizable
47621 + }
47622 + )
47623 + }
47624 + ),
47625 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
47626 + external_wp_components_namespaceObject.__experimentalToolsPanelItem,
47627 + {
47628 + isShownByDefault: true,
47629 + hasValue: () => !isLink,
47630 + label: (0,external_wp_i18n_namespaceObject.__)("Link image to home"),
47631 + onDeselect: () => setAttributes({ isLink: true }),
47632 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
47633 + external_wp_components_namespaceObject.ToggleControl,
47634 + {
47635 + __nextHasNoMarginBottom: true,
47636 + label: (0,external_wp_i18n_namespaceObject.__)("Link image to home"),
47637 + onChange: () => setAttributes({ isLink: !isLink }),
47638 + checked: isLink
47639 + }
47640 + )
47641 + }
47642 + ),
47643 + isLink && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
47644 + external_wp_components_namespaceObject.__experimentalToolsPanelItem,
47645 + {
47646 + isShownByDefault: true,
47647 + hasValue: () => linkTarget === "_blank",
47648 + label: (0,external_wp_i18n_namespaceObject.__)("Open in new tab"),
47649 + onDeselect: () => setAttributes({ linkTarget: "_self" }),
47650 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
47651 + external_wp_components_namespaceObject.ToggleControl,
47652 + {
47653 + __nextHasNoMarginBottom: true,
47654 + label: (0,external_wp_i18n_namespaceObject.__)("Open in new tab"),
47655 + onChange: (value) => setAttributes({
47656 + linkTarget: value ? "_blank" : "_self"
47657 + }),
47658 + checked: linkTarget === "_blank"
47659 + }
47660 + )
47661 + }
47662 + ),
47663 + canUserEdit && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
47664 + external_wp_components_namespaceObject.__experimentalToolsPanelItem,
47665 + {
47666 + isShownByDefault: true,
47667 + hasValue: () => !!shouldSyncIcon,
47668 + label: (0,external_wp_i18n_namespaceObject.__)("Use as Site Icon"),
47669 + onDeselect: () => {
47670 + setAttributes({ shouldSyncIcon: false });
47671 + setIcon(void 0);
47672 + },
47673 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
47674 + external_wp_components_namespaceObject.ToggleControl,
47675 + {
47676 + __nextHasNoMarginBottom: true,
47677 + label: (0,external_wp_i18n_namespaceObject.__)("Use as Site Icon"),
47678 + onChange: (value) => {
47679 + setAttributes({ shouldSyncIcon: value });
47680 + setIcon(value ? logoId : void 0);
47681 + },
47682 + checked: !!shouldSyncIcon,
47683 + help: syncSiteIconHelpText
47684 + }
47685 + )
47686 + }
47687 + )
47688 + ]
47689 + }
47690 + ) }),
47691 + canEditImage && !isEditingImage && shouldShowCropAndDimensions && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockControls, { group: "block", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
47692 + external_wp_components_namespaceObject.ToolbarButton,
47693 + {
47694 + onClick: () => setIsEditingImage(true),
47695 + icon: crop_default,
47696 + label: (0,external_wp_i18n_namespaceObject.__)("Crop")
47697 + }
47698 + ) }),
47699 + imgEdit
47700 + ] });
47701 + };
47702 + function SiteLogoReplaceFlow({ mediaURL, ...mediaReplaceProps }) {
47703 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
47704 + external_wp_blockEditor_namespaceObject.MediaReplaceFlow,
47705 + {
47706 + ...mediaReplaceProps,
47707 + mediaURL,
47708 + allowedTypes: site_logo_edit_ALLOWED_MEDIA_TYPES,
47709 + accept: ACCEPT_MEDIA_STRING
47710 + }
47711 + );
47712 + }
47713 + const InspectorLogoPreview = ({ media, itemGroupProps }) => {
47714 + const {
47715 + alt_text: alt,
47716 + source_url: logoUrl,
47717 + slug: logoSlug,
47718 + media_details: logoMediaDetails
47719 + } = media ?? {};
47720 + const logoLabel = logoMediaDetails?.sizes?.full?.file || logoSlug;
47721 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalItemGroup, { ...itemGroupProps, as: "span", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.__experimentalHStack, { justify: "flex-start", as: "span", children: [
47722 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("img", { src: logoUrl, alt }),
47723 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.FlexItem, { as: "span", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
47724 + external_wp_components_namespaceObject.__experimentalTruncate,
47725 + {
47726 + numberOfLines: 1,
47727 + className: "block-library-site-logo__inspector-media-replace-title",
47728 + children: logoLabel
47729 + }
47730 + ) })
47731 + ] }) });
47732 + };
47733 + function LogoEdit({
47734 + attributes,
47735 + className,
47736 + setAttributes,
47737 + isSelected
47738 + }) {
47739 + const { width, shouldSyncIcon } = attributes;
47740 + const {
47741 + siteLogoId,
47742 + canUserEdit,
47743 + url,
47744 + siteIconId,
47745 + mediaItemData,
47746 + isRequestingMediaItem
47747 + } = (0,external_wp_data_namespaceObject.useSelect)((select) => {
47748 + const { canUser, getEntityRecord, getEditedEntityRecord } = select(external_wp_coreData_namespaceObject.store);
47749 + const _canUserEdit = canUser("update", {
47750 + kind: "root",
47751 + name: "site"
47752 + });
47753 + const siteSettings = _canUserEdit ? getEditedEntityRecord("root", "site") : void 0;
47754 + const siteData = getEntityRecord("root", "__unstableBase");
47755 + const _siteLogoId = _canUserEdit ? siteSettings?.site_logo : siteData?.site_logo;
47756 + const _siteIconId = siteSettings?.site_icon;
47757 + const mediaItem = _siteLogoId && select(external_wp_coreData_namespaceObject.store).getEntityRecord(
47758 + "postType",
47759 + "attachment",
47760 + _siteLogoId,
47761 + {
47762 + context: "view"
47763 + }
47764 + );
47765 + const _isRequestingMediaItem = !!_siteLogoId && !select(external_wp_coreData_namespaceObject.store).hasFinishedResolution("getEntityRecord", [
47766 + "postType",
47767 + "attachment",
47768 + _siteLogoId,
47769 + { context: "view" }
47770 + ]);
47771 + return {
47772 + siteLogoId: _siteLogoId,
47773 + canUserEdit: _canUserEdit,
47774 + url: siteData?.home,
47775 + mediaItemData: mediaItem,
47776 + isRequestingMediaItem: _isRequestingMediaItem,
47777 + siteIconId: _siteIconId
47778 + };
47779 + }, []);
47780 + const { getSettings } = (0,external_wp_data_namespaceObject.useSelect)(external_wp_blockEditor_namespaceObject.store);
47781 + const [temporaryURL, setTemporaryURL] = (0,external_wp_element_namespaceObject.useState)();
47782 + const dropdownMenuProps = useToolsPanelDropdownMenuProps();
47783 + const { editEntityRecord } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_coreData_namespaceObject.store);
47784 + const setLogo = (newValue, shouldForceSync = false) => {
47785 + if (shouldSyncIcon || shouldForceSync) {
47786 + setIcon(newValue);
47787 + }
47788 + editEntityRecord("root", "site", void 0, {
47789 + site_logo: newValue
47790 + });
47791 + };
47792 + const setIcon = (newValue) => (
47793 + // The new value needs to be `null` to reset the Site Icon.
47794 + editEntityRecord("root", "site", void 0, {
47795 + site_icon: newValue ?? null
47796 + })
47797 + );
47798 + const { alt_text: alt, source_url: logoUrl } = mediaItemData ?? {};
47799 + const onInitialSelectLogo = (media) => {
47800 + if (shouldSyncIcon === void 0) {
47801 + const shouldForceSync = !siteIconId;
47802 + setAttributes({ shouldSyncIcon: shouldForceSync });
47803 + onSelectLogo(media, shouldForceSync);
47804 + return;
47805 + }
47806 + onSelectLogo(media);
47807 + };
47808 + const onSelectLogo = (media, shouldForceSync = false) => {
47809 + if (!media) {
47810 + return;
47811 + }
47812 + if (!media.id && media.url) {
47813 + setTemporaryURL(media.url);
47814 + setLogo(void 0);
47815 + return;
47816 + }
47817 + setLogo(media.id, shouldForceSync);
47818 + };
47819 + const onRemoveLogo = () => {
47820 + setLogo(null);
47821 + setAttributes({ width: void 0 });
47822 + };
47823 + const { createErrorNotice } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_notices_namespaceObject.store);
47824 + const onUploadError = (message) => {
47825 + createErrorNotice(message, { type: "snackbar" });
47826 + setTemporaryURL();
47827 + };
47828 + const onFilesDrop = (filesList) => {
47829 + getSettings().mediaUpload({
47830 + allowedTypes: site_logo_edit_ALLOWED_MEDIA_TYPES,
47831 + filesList,
47832 + onFileChange([image]) {
47833 + if ((0,external_wp_blob_namespaceObject.isBlobURL)(image?.url)) {
47834 + setTemporaryURL(image.url);
47835 + return;
47836 + }
47837 + onInitialSelectLogo(image);
47838 + },
47839 + onError: onUploadError,
47840 + multiple: false
47841 + });
47842 + };
47843 + const mediaReplaceFlowProps = {
47844 + mediaURL: logoUrl,
47845 + name: !logoUrl ? (0,external_wp_i18n_namespaceObject.__)("Choose logo") : (0,external_wp_i18n_namespaceObject.__)("Replace"),
47846 + onSelect: onSelectLogo,
47847 + onError: onUploadError,
47848 + onReset: onRemoveLogo
47849 + };
47850 + const controls = canUserEdit && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockControls, { group: "other", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(SiteLogoReplaceFlow, { ...mediaReplaceFlowProps }) });
47851 + let logoImage;
47852 + const isLoading = siteLogoId === void 0 || isRequestingMediaItem;
47853 + if (isLoading) {
47854 + logoImage = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Spinner, {});
47855 + }
47856 + (0,external_wp_element_namespaceObject.useEffect)(() => {
47857 + if (logoUrl && temporaryURL) {
47858 + setTemporaryURL();
47859 + }
47860 + }, [logoUrl, temporaryURL]);
47861 + if (!!logoUrl || !!temporaryURL) {
47862 + logoImage = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
47863 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
47864 + SiteLogo,
47865 + {
47866 + alt,
47867 + attributes,
47868 + className,
47869 + isSelected,
47870 + setAttributes,
47871 + logoUrl: temporaryURL || logoUrl,
47872 + setLogo,
47873 + logoId: mediaItemData?.id || siteLogoId,
47874 + siteUrl: url,
47875 + setIcon,
47876 + iconId: siteIconId,
47877 + canUserEdit
47878 + }
47879 + ),
47880 + canUserEdit && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.DropZone, { onFilesDrop })
47881 + ] });
47882 + }
47883 + const placeholder = (content) => {
47884 + const placeholderClassName = dist_clsx(
47885 + "block-editor-media-placeholder",
47886 + className
47887 + );
47888 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
47889 + external_wp_components_namespaceObject.Placeholder,
47890 + {
47891 + className: placeholderClassName,
47892 + preview: logoImage,
47893 + withIllustration: true,
47894 + style: {
47895 + width
47896 + },
47897 + children: content
47898 + }
47899 + );
47900 + };
47901 + const classes = dist_clsx(className, {
47902 + "is-default-size": !width,
47903 + "is-transient": temporaryURL
47904 + });
47905 + const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)({ className: classes });
47906 + const mediaInspectorPanel = (canUserEdit || logoUrl) && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
47907 + external_wp_components_namespaceObject.__experimentalToolsPanel,
47908 + {
47909 + label: (0,external_wp_i18n_namespaceObject.__)("Media"),
47910 + dropdownMenuProps,
47911 + children: !canUserEdit ? /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
47912 + "div",
47913 + {
47914 + className: "block-library-site-logo__inspector-media-replace-container",
47915 + style: { gridColumn: "1 / -1" },
47916 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
47917 + InspectorLogoPreview,
47918 + {
47919 + media: mediaItemData,
47920 + itemGroupProps: {
47921 + isBordered: true,
47922 + className: "block-library-site-logo__inspector-readonly-logo-preview"
47923 + }
47924 + }
47925 + )
47926 + }
47927 + ) : /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
47928 + external_wp_components_namespaceObject.__experimentalToolsPanelItem,
47929 + {
47930 + hasValue: () => !!logoUrl,
47931 + label: (0,external_wp_i18n_namespaceObject.__)("Logo"),
47932 + isShownByDefault: true,
47933 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", { className: "block-library-site-logo__inspector-media-replace-container", children: [
47934 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
47935 + SiteLogoReplaceFlow,
47936 + {
47937 + ...mediaReplaceFlowProps,
47938 + name: !!logoUrl ? /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
47939 + InspectorLogoPreview,
47940 + {
47941 + media: mediaItemData
47942 + }
47943 + ) : (0,external_wp_i18n_namespaceObject.__)("Choose logo"),
47944 + renderToggle: (props) => /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Button, { ...props, __next40pxDefaultSize: true, children: temporaryURL ? /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Spinner, {}) : props.children })
47945 + }
47946 + ),
47947 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.DropZone, { onFilesDrop })
47948 + ] })
47949 + }
47950 + )
47951 + }
47952 + ) });
47953 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", { ...blockProps, children: [
47954 + controls,
47955 + mediaInspectorPanel,
47956 + (!!logoUrl || !!temporaryURL) && logoImage,
47957 + (isLoading || !temporaryURL && !logoUrl && !canUserEdit) && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Placeholder, { className: "site-logo_placeholder", withIllustration: true, children: isLoading && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("span", { className: "components-placeholder__preview", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Spinner, {}) }) }),
47958 + !isLoading && !temporaryURL && !logoUrl && canUserEdit && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
47959 + external_wp_blockEditor_namespaceObject.MediaPlaceholder,
47960 + {
47961 + onSelect: onInitialSelectLogo,
47962 + accept: ACCEPT_MEDIA_STRING,
47963 + allowedTypes: site_logo_edit_ALLOWED_MEDIA_TYPES,
47964 + onError: onUploadError,
47965 + placeholder,
47966 + mediaLibraryButton: ({ open }) => {
47967 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
47968 + external_wp_components_namespaceObject.Button,
47969 + {
47970 + __next40pxDefaultSize: true,
47971 + icon: upload_default,
47972 + variant: "primary",
47973 + label: (0,external_wp_i18n_namespaceObject.__)("Choose logo"),
47974 + showTooltip: true,
47975 + tooltipPosition: "middle right",
47976 + onClick: () => {
47977 + open();
47978 + }
47979 + }
47980 + );
47981 + }
47982 + }
47983 + )
47984 + ] });
47985 + }
47986 +
47987 +
47988 + ;// ./node_modules/@wordpress/block-library/build-module/site-logo/transforms.js
47989 +
47990 + const site_logo_transforms_transforms = {
47991 + to: [
47992 + {
47993 + type: "block",
47994 + blocks: ["core/site-title"],
47995 + transform: ({ isLink, linkTarget }) => {
47996 + return (0,external_wp_blocks_namespaceObject.createBlock)("core/site-title", {
47997 + isLink,
47998 + linkTarget
47999 + });
48000 + }
48001 + }
48002 + ]
48003 + };
48004 + var site_logo_transforms_transforms_default = site_logo_transforms_transforms;
48005 +
48006 +
48007 + ;// ./node_modules/@wordpress/block-library/build-module/site-logo/index.js
48008 +
48009 +
48010 +
48011 +
48012 +
48013 + const { name: site_logo_name } = site_logo_block_namespaceObject;
48014 + const site_logo_settings = {
48015 + icon: site_logo_default,
48016 + example: {},
48017 + edit: LogoEdit,
48018 + transforms: site_logo_transforms_transforms_default
48019 + };
48020 + const site_logo_init = () => initBlock({ name: site_logo_name, metadata: site_logo_block_namespaceObject, settings: site_logo_settings });
48021 +
48022 +
48023 + ;// ./node_modules/@wordpress/block-library/build-module/site-tagline/block.json
48024 + const site_tagline_block_namespaceObject = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/site-tagline","title":"Site Tagline","category":"theme","description":"Describe in a few words what this site is about. This is important for search results, sharing on social media, and gives overall clarity to visitors.","keywords":["description"],"textdomain":"default","attributes":{"textAlign":{"type":"string"},"level":{"type":"number","default":0},"levelOptions":{"type":"array","default":[0,1,2,3,4,5,6]}},"example":{"viewportWidth":350,"attributes":{"textAlign":"center"}},"supports":{"align":["wide","full"],"html":false,"color":{"gradients":true,"__experimentalDefaultControls":{"background":true,"text":true}},"contentRole":true,"spacing":{"margin":true,"padding":true,"__experimentalDefaultControls":{"margin":false,"padding":false}},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalFontStyle":true,"__experimentalFontWeight":true,"__experimentalLetterSpacing":true,"__experimentalWritingMode":true,"__experimentalDefaultControls":{"fontSize":true}},"interactivity":{"clientNavigation":true},"__experimentalBorder":{"radius":true,"color":true,"width":true,"style":true}},"editorStyle":"wp-block-site-tagline-editor","style":"wp-block-site-tagline"}');
48025 + ;// ./node_modules/@wordpress/block-library/build-module/site-tagline/edit.js
48026 +
48027 +
48028 +
48029 +
48030 +
48031 +
48032 +
48033 + function SiteTaglineEdit({
48034 + attributes,
48035 + setAttributes,
48036 + insertBlocksAfter
48037 + }) {
48038 + const { textAlign, level, levelOptions } = attributes;
48039 + const { canUserEdit, tagline } = (0,external_wp_data_namespaceObject.useSelect)((select) => {
48040 + const { canUser, getEntityRecord, getEditedEntityRecord } = select(external_wp_coreData_namespaceObject.store);
48041 + const canEdit = canUser("update", {
48042 + kind: "root",
48043 + name: "site"
48044 + });
48045 + const settings = canEdit ? getEditedEntityRecord("root", "site") : {};
48046 + const readOnlySettings = getEntityRecord("root", "__unstableBase");
48047 + return {
48048 + canUserEdit: canEdit,
48049 + tagline: canEdit ? settings?.description : readOnlySettings?.description
48050 + };
48051 + }, []);
48052 + const TagName = level === 0 ? "p" : `h${level}`;
48053 + const { editEntityRecord } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_coreData_namespaceObject.store);
48054 + function setTagline(newTagline) {
48055 + editEntityRecord("root", "site", void 0, {
48056 + description: newTagline
48057 + });
48058 + }
48059 + const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)({
48060 + className: dist_clsx({
48061 + [`has-text-align-${textAlign}`]: textAlign,
48062 + "wp-block-site-tagline__placeholder": !canUserEdit && !tagline
48063 + })
48064 + });
48065 + const siteTaglineContent = canUserEdit ? /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
48066 + external_wp_blockEditor_namespaceObject.RichText,
48067 + {
48068 + allowedFormats: [],
48069 + onChange: setTagline,
48070 + "aria-label": (0,external_wp_i18n_namespaceObject.__)("Site tagline text"),
48071 + placeholder: (0,external_wp_i18n_namespaceObject.__)("Write site tagline\u2026"),
48072 + tagName: TagName,
48073 + value: tagline,
48074 + disableLineBreaks: true,
48075 + __unstableOnSplitAtEnd: () => insertBlocksAfter((0,external_wp_blocks_namespaceObject.createBlock)((0,external_wp_blocks_namespaceObject.getDefaultBlockName)())),
48076 + ...blockProps
48077 + }
48078 + ) : /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(TagName, { ...blockProps, children: tagline || (0,external_wp_i18n_namespaceObject.__)("Site Tagline placeholder") });
48079 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
48080 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_blockEditor_namespaceObject.BlockControls, { group: "block", children: [
48081 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
48082 + external_wp_blockEditor_namespaceObject.HeadingLevelDropdown,
48083 + {
48084 + value: level,
48085 + options: levelOptions,
48086 + onChange: (newLevel) => setAttributes({ level: newLevel })
48087 + }
48088 + ),
48089 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
48090 + external_wp_blockEditor_namespaceObject.AlignmentControl,
48091 + {
48092 + onChange: (newAlign) => setAttributes({ textAlign: newAlign }),
48093 + value: textAlign
48094 + }
48095 + )
48096 + ] }),
48097 + siteTaglineContent
48098 + ] });
48099 + }
48100 +
48101 +
48102 + ;// ./node_modules/@wordpress/block-library/build-module/site-tagline/icon.js
48103 +
48104 +
48105 + var site_tagline_icon_icon_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Path, { d: "M4 10.5h16V9H4v1.5ZM4 15h9v-1.5H4V15Z" }) });
48106 +
48107 +
48108 + ;// ./node_modules/@wordpress/block-library/build-module/site-tagline/deprecated.js
48109 +
48110 + const site_tagline_deprecated_v1 = {
48111 + attributes: {
48112 + textAlign: {
48113 + type: "string"
48114 + }
48115 + },
48116 + supports: {
48117 + align: ["wide", "full"],
48118 + html: false,
48119 + color: {
48120 + gradients: true
48121 + },
48122 + spacing: {
48123 + margin: true,
48124 + padding: true
48125 + },
48126 + typography: {
48127 + fontSize: true,
48128 + lineHeight: true,
48129 + __experimentalFontFamily: true,
48130 + __experimentalTextTransform: true,
48131 + __experimentalFontStyle: true,
48132 + __experimentalFontWeight: true,
48133 + __experimentalLetterSpacing: true
48134 + }
48135 + },
48136 + save() {
48137 + return null;
48138 + },
48139 + migrate: migrate_font_family_default,
48140 + isEligible({ style }) {
48141 + return style?.typography?.fontFamily;
48142 + }
48143 + };
48144 + var site_tagline_deprecated_deprecated_default = [site_tagline_deprecated_v1];
48145 +
48146 +
48147 + ;// ./node_modules/@wordpress/block-library/build-module/site-tagline/index.js
48148 +
48149 +
48150 +
48151 +
48152 +
48153 + const { name: site_tagline_name } = site_tagline_block_namespaceObject;
48154 + const site_tagline_settings = {
48155 + icon: site_tagline_icon_icon_default,
48156 + edit: SiteTaglineEdit,
48157 + deprecated: site_tagline_deprecated_deprecated_default
48158 + };
48159 + const site_tagline_init = () => initBlock({ name: site_tagline_name, metadata: site_tagline_block_namespaceObject, settings: site_tagline_settings });
48160 +
48161 +
48162 + ;// ./node_modules/@wordpress/icons/build-module/library/map-marker.js
48163 +
48164 +
48165 + var map_marker_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M12 9c-.8 0-1.5.7-1.5 1.5S11.2 12 12 12s1.5-.7 1.5-1.5S12.8 9 12 9zm0-5c-3.6 0-6.5 2.8-6.5 6.2 0 .8.3 1.8.9 3.1.5 1.1 1.2 2.3 2 3.6.7 1 3 3.8 3.2 3.9l.4.5.4-.5c.2-.2 2.6-2.9 3.2-3.9.8-1.2 1.5-2.5 2-3.6.6-1.3.9-2.3.9-3.1C18.5 6.8 15.6 4 12 4zm4.3 8.7c-.5 1-1.1 2.2-1.9 3.4-.5.7-1.7 2.2-2.4 3-.7-.8-1.9-2.3-2.4-3-.8-1.2-1.4-2.3-1.9-3.3-.6-1.4-.7-2.2-.7-2.5 0-2.6 2.2-4.7 5-4.7s5 2.1 5 4.7c0 .2-.1 1-.7 2.4z" }) });
48166 +
48167 +
48168 + ;// ./node_modules/@wordpress/block-library/build-module/site-title/block.json
48169 + const site_title_block_namespaceObject = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/site-title","title":"Site Title","category":"theme","description":"Displays the name of this site. Update the block, and the changes apply everywhere it’s used. This will also appear in the browser title bar and in search results.","textdomain":"default","attributes":{"level":{"type":"number","default":1},"levelOptions":{"type":"array","default":[0,1,2,3,4,5,6]},"textAlign":{"type":"string"},"isLink":{"type":"boolean","default":true,"role":"content"},"linkTarget":{"type":"string","default":"_self","role":"content"}},"example":{"viewportWidth":500},"supports":{"align":["wide","full"],"html":false,"color":{"gradients":true,"link":true,"__experimentalDefaultControls":{"background":true,"text":true,"link":true}},"spacing":{"padding":true,"margin":true,"__experimentalDefaultControls":{"margin":false,"padding":false}},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalFontStyle":true,"__experimentalFontWeight":true,"__experimentalLetterSpacing":true,"__experimentalWritingMode":true,"__experimentalDefaultControls":{"fontSize":true}},"interactivity":{"clientNavigation":true},"__experimentalBorder":{"radius":true,"color":true,"width":true,"style":true}},"editorStyle":"wp-block-site-title-editor","style":"wp-block-site-title"}');
48170 + ;// ./node_modules/@wordpress/block-library/build-module/site-title/edit.js
48171 +
48172 +
48173 +
48174 +
48175 +
48176 +
48177 +
48178 +
48179 +
48180 +
48181 + function SiteTitleEdit({
48182 + attributes,
48183 + setAttributes,
48184 + insertBlocksAfter
48185 + }) {
48186 + const { level, levelOptions, textAlign, isLink, linkTarget } = attributes;
48187 + const { canUserEdit, title } = (0,external_wp_data_namespaceObject.useSelect)((select) => {
48188 + const { canUser, getEntityRecord, getEditedEntityRecord } = select(external_wp_coreData_namespaceObject.store);
48189 + const canEdit = canUser("update", {
48190 + kind: "root",
48191 + name: "site"
48192 + });
48193 + const settings = canEdit ? getEditedEntityRecord("root", "site") : {};
48194 + const readOnlySettings = getEntityRecord("root", "__unstableBase");
48195 + return {
48196 + canUserEdit: canEdit,
48197 + title: canEdit ? settings?.title : readOnlySettings?.name
48198 + };
48199 + }, []);
48200 + const { editEntityRecord } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_coreData_namespaceObject.store);
48201 + const dropdownMenuProps = useToolsPanelDropdownMenuProps();
48202 + const blockEditingMode = (0,external_wp_blockEditor_namespaceObject.useBlockEditingMode)();
48203 + function setTitle(newTitle) {
48204 + editEntityRecord("root", "site", void 0, {
48205 + title: newTitle.trim()
48206 + });
48207 + }
48208 + const TagName = level === 0 ? "p" : `h${level}`;
48209 + const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)({
48210 + className: dist_clsx({
48211 + [`has-text-align-${textAlign}`]: textAlign,
48212 + "wp-block-site-title__placeholder": !canUserEdit && !title
48213 + })
48214 + });
48215 + const siteTitleContent = canUserEdit ? /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(TagName, { ...blockProps, children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
48216 + external_wp_blockEditor_namespaceObject.RichText,
48217 + {
48218 + tagName: isLink ? "a" : "span",
48219 + href: isLink ? "#site-title-pseudo-link" : void 0,
48220 + "aria-label": (0,external_wp_i18n_namespaceObject.__)("Site title text"),
48221 + placeholder: (0,external_wp_i18n_namespaceObject.__)("Write site title\u2026"),
48222 + value: title,
48223 + onChange: setTitle,
48224 + allowedFormats: [],
48225 + disableLineBreaks: true,
48226 + __unstableOnSplitAtEnd: () => insertBlocksAfter((0,external_wp_blocks_namespaceObject.createBlock)((0,external_wp_blocks_namespaceObject.getDefaultBlockName)()))
48227 + }
48228 + ) }) : /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(TagName, { ...blockProps, children: isLink ? /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
48229 + "a",
48230 + {
48231 + href: "#site-title-pseudo-link",
48232 + onClick: (event) => event.preventDefault(),
48233 + children: (0,external_wp_htmlEntities_namespaceObject.decodeEntities)(title) || (0,external_wp_i18n_namespaceObject.__)("Site Title placeholder")
48234 + }
48235 + ) : /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("span", { children: (0,external_wp_htmlEntities_namespaceObject.decodeEntities)(title) || (0,external_wp_i18n_namespaceObject.__)("Site Title placeholder") }) });
48236 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
48237 + blockEditingMode === "default" && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_blockEditor_namespaceObject.BlockControls, { group: "block", children: [
48238 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
48239 + external_wp_blockEditor_namespaceObject.HeadingLevelDropdown,
48240 + {
48241 + value: level,
48242 + options: levelOptions,
48243 + onChange: (newLevel) => setAttributes({ level: newLevel })
48244 + }
48245 + ),
48246 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
48247 + external_wp_blockEditor_namespaceObject.AlignmentControl,
48248 + {
48249 + value: textAlign,
48250 + onChange: (nextAlign) => {
48251 + setAttributes({ textAlign: nextAlign });
48252 + }
48253 + }
48254 + )
48255 + ] }),
48256 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(
48257 + external_wp_components_namespaceObject.__experimentalToolsPanel,
48258 + {
48259 + label: (0,external_wp_i18n_namespaceObject.__)("Settings"),
48260 + resetAll: () => {
48261 + setAttributes({
48262 + isLink: true,
48263 + linkTarget: "_self"
48264 + });
48265 + },
48266 + dropdownMenuProps,
48267 + children: [
48268 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
48269 + external_wp_components_namespaceObject.__experimentalToolsPanelItem,
48270 + {
48271 + hasValue: () => !isLink,
48272 + label: (0,external_wp_i18n_namespaceObject.__)("Make title link to home"),
48273 + onDeselect: () => setAttributes({ isLink: true }),
48274 + isShownByDefault: true,
48275 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
48276 + external_wp_components_namespaceObject.ToggleControl,
48277 + {
48278 + __nextHasNoMarginBottom: true,
48279 + label: (0,external_wp_i18n_namespaceObject.__)("Make title link to home"),
48280 + onChange: () => setAttributes({ isLink: !isLink }),
48281 + checked: isLink
48282 + }
48283 + )
48284 + }
48285 + ),
48286 + isLink && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
48287 + external_wp_components_namespaceObject.__experimentalToolsPanelItem,
48288 + {
48289 + hasValue: () => linkTarget !== "_self",
48290 + label: (0,external_wp_i18n_namespaceObject.__)("Open in new tab"),
48291 + onDeselect: () => setAttributes({ linkTarget: "_self" }),
48292 + isShownByDefault: true,
48293 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
48294 + external_wp_components_namespaceObject.ToggleControl,
48295 + {
48296 + __nextHasNoMarginBottom: true,
48297 + label: (0,external_wp_i18n_namespaceObject.__)("Open in new tab"),
48298 + onChange: (value) => setAttributes({
48299 + linkTarget: value ? "_blank" : "_self"
48300 + }),
48301 + checked: linkTarget === "_blank"
48302 + }
48303 + )
48304 + }
48305 + )
48306 + ]
48307 + }
48308 + ) }),
48309 + siteTitleContent
48310 + ] });
48311 + }
48312 +
48313 +
48314 + ;// ./node_modules/@wordpress/block-library/build-module/site-title/deprecated.js
48315 +
48316 + const site_title_deprecated_v1 = {
48317 + attributes: {
48318 + level: {
48319 + type: "number",
48320 + default: 1
48321 + },
48322 + textAlign: {
48323 + type: "string"
48324 + },
48325 + isLink: {
48326 + type: "boolean",
48327 + default: true
48328 + },
48329 + linkTarget: {
48330 + type: "string",
48331 + default: "_self"
48332 + }
48333 + },
48334 + supports: {
48335 + align: ["wide", "full"],
48336 + html: false,
48337 + color: {
48338 + gradients: true,
48339 + link: true
48340 + },
48341 + spacing: {
48342 + padding: true,
48343 + margin: true
48344 + },
48345 + typography: {
48346 + fontSize: true,
48347 + lineHeight: true,
48348 + __experimentalFontFamily: true,
48349 + __experimentalTextTransform: true,
48350 + __experimentalFontStyle: true,
48351 + __experimentalFontWeight: true,
48352 + __experimentalLetterSpacing: true
48353 + }
48354 + },
48355 + save() {
48356 + return null;
48357 + },
48358 + migrate: migrate_font_family_default,
48359 + isEligible({ style }) {
48360 + return style?.typography?.fontFamily;
48361 + }
48362 + };
48363 + var site_title_deprecated_deprecated_default = [site_title_deprecated_v1];
48364 +
48365 +
48366 + ;// ./node_modules/@wordpress/block-library/build-module/site-title/transforms.js
48367 +
48368 + const site_title_transforms_transforms = {
48369 + to: [
48370 + {
48371 + type: "block",
48372 + blocks: ["core/site-logo"],
48373 + transform: ({ isLink, linkTarget }) => {
48374 + return (0,external_wp_blocks_namespaceObject.createBlock)("core/site-logo", {
48375 + isLink,
48376 + linkTarget
48377 + });
48378 + }
48379 + }
48380 + ]
48381 + };
48382 + var site_title_transforms_transforms_default = site_title_transforms_transforms;
48383 +
48384 +
48385 + ;// ./node_modules/@wordpress/block-library/build-module/site-title/index.js
48386 +
48387 +
48388 +
48389 +
48390 +
48391 +
48392 + const { name: site_title_name } = site_title_block_namespaceObject;
48393 + const site_title_settings = {
48394 + icon: map_marker_default,
48395 + example: {
48396 + viewportWidth: 350,
48397 + attributes: {
48398 + textAlign: "center"
48399 + }
48400 + },
48401 + edit: SiteTitleEdit,
48402 + transforms: site_title_transforms_transforms_default,
48403 + deprecated: site_title_deprecated_deprecated_default
48404 + };
48405 + const site_title_init = () => initBlock({ name: site_title_name, metadata: site_title_block_namespaceObject, settings: site_title_settings });
48406 +
48407 +
48408 + ;// ./node_modules/@wordpress/icons/build-module/library/share.js
48409 +
48410 +
48411 + var share_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M9 11.8l6.1-4.5c.1.4.4.7.9.7h2c.6 0 1-.4 1-1V5c0-.6-.4-1-1-1h-2c-.6 0-1 .4-1 1v.4l-6.4 4.8c-.2-.1-.4-.2-.6-.2H6c-.6 0-1 .4-1 1v2c0 .6.4 1 1 1h2c.2 0 .4-.1.6-.2l6.4 4.8v.4c0 .6.4 1 1 1h2c.6 0 1-.4 1-1v-2c0-.6-.4-1-1-1h-2c-.5 0-.8.3-.9.7L9 12.2v-.4z" }) });
48412 +
48413 +
48414 + ;// ./node_modules/@wordpress/icons/build-module/library/keyboard-return.js
48415 +
48416 +
48417 + var keyboard_return_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "m6.734 16.106 2.176-2.38-1.093-1.028-3.846 4.158 3.846 4.158 1.093-1.028-2.176-2.38h2.811c1.125 0 2.25.03 3.374 0 1.428-.001 3.362-.25 4.963-1.277 1.66-1.065 2.868-2.906 2.868-5.859 0-2.479-1.327-4.896-3.65-5.93-1.82-.813-3.044-.8-4.806-.788l-.567.002v1.5c.184 0 .368 0 .553-.002 1.82-.007 2.704-.014 4.21.657 1.854.827 2.76 2.657 2.76 4.561 0 2.472-.973 3.824-2.178 4.596-1.258.807-2.864 1.04-4.163 1.04h-.02c-1.115.03-2.229 0-3.344 0H6.734Z" }) });
48418 +
48419 +
48420 + ;// ./node_modules/@wordpress/block-library/build-module/social-link/icons/chain.js
48421 +
48422 +
48423 + const ChainIcon = () => /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { width: "24", height: "24", viewBox: "0 0 24 24", version: "1.1", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M15.6 7.2H14v1.5h1.6c2 0 3.7 1.7 3.7 3.7s-1.7 3.7-3.7 3.7H14v1.5h1.6c2.8 0 5.2-2.3 5.2-5.2 0-2.9-2.3-5.2-5.2-5.2zM4.7 12.4c0-2 1.7-3.7 3.7-3.7H10V7.2H8.4c-2.9 0-5.2 2.3-5.2 5.2 0 2.9 2.3 5.2 5.2 5.2H10v-1.5H8.4c-2 0-3.7-1.7-3.7-3.7zm4.6.9h5.3v-1.5H9.3v1.5z" }) });
48424 +
48425 +
48426 + ;// ./node_modules/@wordpress/block-library/build-module/social-link/social-list.js
48427 +
48428 +
48429 + function getSocialService(variation) {
48430 + if (!variation?.name) {
48431 + return {
48432 + icon: ChainIcon,
48433 + label: (0,external_wp_i18n_namespaceObject.__)("Social Icon")
48434 + };
48435 + }
48436 + return {
48437 + icon: variation?.icon ?? ChainIcon,
48438 + label: variation?.title ?? (0,external_wp_i18n_namespaceObject.__)("Social Icon")
48439 + };
48440 + }
48441 +
48442 +
48443 + ;// ./node_modules/@wordpress/block-library/build-module/social-link/edit.js
48444 +
48445 +
48446 +
48447 +
48448 +
48449 +
48450 +
48451 +
48452 +
48453 +
48454 +
48455 +
48456 +
48457 + const SocialLinkURLPopover = ({
48458 + url,
48459 + setAttributes,
48460 + setPopover,
48461 + popoverAnchor,
48462 + clientId
48463 + }) => {
48464 + const { removeBlock } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_blockEditor_namespaceObject.store);
48465 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
48466 + external_wp_blockEditor_namespaceObject.URLPopover,
48467 + {
48468 + anchor: popoverAnchor,
48469 + "aria-label": (0,external_wp_i18n_namespaceObject.__)("Edit social link"),
48470 + onClose: () => {
48471 + setPopover(false);
48472 + popoverAnchor?.focus();
48473 + },
48474 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
48475 + "form",
48476 + {
48477 + className: "block-editor-url-popover__link-editor",
48478 + onSubmit: (event) => {
48479 + event.preventDefault();
48480 + setPopover(false);
48481 + popoverAnchor?.focus();
48482 + },
48483 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { className: "block-editor-url-input", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
48484 + external_wp_blockEditor_namespaceObject.URLInput,
48485 + {
48486 + value: url,
48487 + onChange: (nextURL) => setAttributes({ url: nextURL }),
48488 + placeholder: (0,external_wp_i18n_namespaceObject.__)("Enter social link"),
48489 + label: (0,external_wp_i18n_namespaceObject.__)("Enter social link"),
48490 + hideLabelFromVision: true,
48491 + disableSuggestions: true,
48492 + onKeyDown: (event) => {
48493 + if (!!url || event.defaultPrevented || ![external_wp_keycodes_namespaceObject.BACKSPACE, external_wp_keycodes_namespaceObject.DELETE].includes(
48494 + event.keyCode
48495 + )) {
48496 + return;
48497 + }
48498 + removeBlock(clientId);
48499 + },
48500 + suffix: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalInputControlSuffixWrapper, { variant: "control", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
48501 + external_wp_components_namespaceObject.Button,
48502 + {
48503 + icon: keyboard_return_default,
48504 + label: (0,external_wp_i18n_namespaceObject.__)("Apply"),
48505 + type: "submit",
48506 + size: "small"
48507 + }
48508 + ) })
48509 + }
48510 + ) })
48511 + }
48512 + )
48513 + }
48514 + );
48515 + };
48516 + const SocialLinkEdit = ({
48517 + attributes,
48518 + context,
48519 + isSelected,
48520 + setAttributes,
48521 + clientId,
48522 + name
48523 + }) => {
48524 + const { url, service, label = "", rel } = attributes;
48525 + const dropdownMenuProps = useToolsPanelDropdownMenuProps();
48526 + const {
48527 + showLabels,
48528 + iconColor,
48529 + iconColorValue,
48530 + iconBackgroundColor,
48531 + iconBackgroundColorValue
48532 + } = context;
48533 + const [showURLPopover, setPopover] = (0,external_wp_element_namespaceObject.useState)(false);
48534 + const wrapperClasses = dist_clsx(
48535 + "wp-social-link",
48536 + // Manually adding this class for backwards compatibility of CSS when moving the
48537 + // blockProps from the li to the button: https://github.com/WordPress/gutenberg/pull/64883
48538 + "wp-block-social-link",
48539 + "wp-social-link-" + service,
48540 + {
48541 + "wp-social-link__is-incomplete": !url,
48542 + [`has-${iconColor}-color`]: iconColor,
48543 + [`has-${iconBackgroundColor}-background-color`]: iconBackgroundColor
48544 + }
48545 + );
48546 + const [popoverAnchor, setPopoverAnchor] = (0,external_wp_element_namespaceObject.useState)(null);
48547 + const isContentOnlyMode = (0,external_wp_blockEditor_namespaceObject.useBlockEditingMode)() === "contentOnly";
48548 + const { activeVariation } = (0,external_wp_data_namespaceObject.useSelect)(
48549 + (select) => {
48550 + const { getActiveBlockVariation } = select(external_wp_blocks_namespaceObject.store);
48551 + return {
48552 + activeVariation: getActiveBlockVariation(name, attributes)
48553 + };
48554 + },
48555 + [name, attributes]
48556 + );
48557 + const { icon, label: socialLinkName } = getSocialService(activeVariation);
48558 + const socialLinkText = label.trim() === "" ? socialLinkName : label;
48559 + const ref = (0,external_wp_element_namespaceObject.useRef)();
48560 + const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)({
48561 + className: "wp-block-social-link-anchor",
48562 + ref: (0,external_wp_compose_namespaceObject.useMergeRefs)([setPopoverAnchor, ref]),
48563 + onClick: () => setPopover(true),
48564 + onKeyDown: (event) => {
48565 + if (event.keyCode === external_wp_keycodes_namespaceObject.ENTER) {
48566 + event.preventDefault();
48567 + setPopover(true);
48568 + }
48569 + }
48570 + });
48571 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
48572 + isContentOnlyMode && showLabels && // Add an extra control to modify the label attribute when content only mode is active.
48573 + // With content only mode active, the inspector is hidden, so users need another way
48574 + // to edit this attribute.
48575 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockControls, { group: "other", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
48576 + external_wp_components_namespaceObject.Dropdown,
48577 + {
48578 + popoverProps: { placement: "bottom-start" },
48579 + renderToggle: ({ isOpen, onToggle }) => /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
48580 + external_wp_components_namespaceObject.ToolbarButton,
48581 + {
48582 + onClick: onToggle,
48583 + "aria-haspopup": "true",
48584 + "aria-expanded": isOpen,
48585 + children: (0,external_wp_i18n_namespaceObject.__)("Text")
48586 + }
48587 + ),
48588 + renderContent: () => /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
48589 + external_wp_components_namespaceObject.TextControl,
48590 + {
48591 + __next40pxDefaultSize: true,
48592 + __nextHasNoMarginBottom: true,
48593 + className: "wp-block-social-link__toolbar_content_text",
48594 + label: (0,external_wp_i18n_namespaceObject.__)("Text"),
48595 + help: (0,external_wp_i18n_namespaceObject.__)(
48596 + "Provide a text label or use the default."
48597 + ),
48598 + value: label,
48599 + onChange: (value) => setAttributes({ label: value }),
48600 + placeholder: socialLinkName
48601 + }
48602 + )
48603 + }
48604 + ) }),
48605 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
48606 + external_wp_components_namespaceObject.__experimentalToolsPanel,
48607 + {
48608 + label: (0,external_wp_i18n_namespaceObject.__)("Settings"),
48609 + resetAll: () => {
48610 + setAttributes({ label: void 0 });
48611 + },
48612 + dropdownMenuProps,
48613 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
48614 + external_wp_components_namespaceObject.__experimentalToolsPanelItem,
48615 + {
48616 + isShownByDefault: true,
48617 + label: (0,external_wp_i18n_namespaceObject.__)("Text"),
48618 + hasValue: () => !!label,
48619 + onDeselect: () => {
48620 + setAttributes({ label: void 0 });
48621 + },
48622 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
48623 + external_wp_components_namespaceObject.TextControl,
48624 + {
48625 + __next40pxDefaultSize: true,
48626 + __nextHasNoMarginBottom: true,
48627 + label: (0,external_wp_i18n_namespaceObject.__)("Text"),
48628 + help: (0,external_wp_i18n_namespaceObject.__)(
48629 + "The text is visible when enabled from the parent Social Icons block."
48630 + ),
48631 + value: label,
48632 + onChange: (value) => setAttributes({ label: value }),
48633 + placeholder: socialLinkName
48634 + }
48635 + )
48636 + }
48637 + )
48638 + }
48639 + ) }),
48640 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, { group: "advanced", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
48641 + external_wp_components_namespaceObject.TextControl,
48642 + {
48643 + __next40pxDefaultSize: true,
48644 + __nextHasNoMarginBottom: true,
48645 + label: (0,external_wp_i18n_namespaceObject.__)("Link relation"),
48646 + help: (0,external_wp_element_namespaceObject.createInterpolateElement)(
48647 + (0,external_wp_i18n_namespaceObject.__)(
48648 + "The <a>Link Relation</a> attribute defines the relationship between a linked resource and the current document."
48649 + ),
48650 + {
48651 + a: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ExternalLink, { href: "https://developer.mozilla.org/docs/Web/HTML/Attributes/rel" })
48652 + }
48653 + ),
48654 + value: rel || "",
48655 + onChange: (value) => setAttributes({ rel: value })
48656 + }
48657 + ) }),
48658 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(
48659 + "li",
48660 + {
48661 + role: "presentation",
48662 + className: wrapperClasses,
48663 + style: {
48664 + color: iconColorValue,
48665 + backgroundColor: iconBackgroundColorValue
48666 + },
48667 + children: [
48668 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("button", { "aria-haspopup": "dialog", ...blockProps, role: "button", children: [
48669 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Icon, { icon }),
48670 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
48671 + "span",
48672 + {
48673 + className: dist_clsx("wp-block-social-link-label", {
48674 + "screen-reader-text": !showLabels
48675 + }),
48676 + children: socialLinkText
48677 + }
48678 + )
48679 + ] }),
48680 + isSelected && showURLPopover && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
48681 + SocialLinkURLPopover,
48682 + {
48683 + url,
48684 + setAttributes,
48685 + setPopover,
48686 + popoverAnchor,
48687 + clientId
48688 + }
48689 + )
48690 + ]
48691 + }
48692 + )
48693 + ] });
48694 + };
48695 + var social_link_edit_edit_default = SocialLinkEdit;
48696 +
48697 +
48698 + ;// ./node_modules/@wordpress/block-library/build-module/social-link/block.json
48699 + const social_link_block_namespaceObject = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/social-link","title":"Social Icon","category":"widgets","parent":["core/social-links"],"description":"Display an icon linking to a social profile or site.","textdomain":"default","attributes":{"url":{"type":"string","role":"content"},"service":{"type":"string"},"label":{"type":"string","role":"content"},"rel":{"type":"string"}},"usesContext":["openInNewTab","showLabels","iconColor","iconColorValue","iconBackgroundColor","iconBackgroundColorValue"],"supports":{"reusable":false,"html":false,"interactivity":{"clientNavigation":true}},"editorStyle":"wp-block-social-link-editor"}');
48700 + ;// ./node_modules/@wordpress/block-library/build-module/social-link/icons/wordpress.js
48701 +
48702 +
48703 + const WordPressIcon = () => /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
48704 + external_wp_primitives_namespaceObject.SVG,
48705 + {
48706 + width: "24",
48707 + height: "24",
48708 + viewBox: "0 0 24 24",
48709 + version: "1.1",
48710 + xmlns: "http://www.w3.org/2000/svg",
48711 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M12.158,12.786L9.46,20.625c0.806,0.237,1.657,0.366,2.54,0.366c1.047,0,2.051-0.181,2.986-0.51 c-0.024-0.038-0.046-0.079-0.065-0.124L12.158,12.786z M3.009,12c0,3.559,2.068,6.634,5.067,8.092L3.788,8.341 C3.289,9.459,3.009,10.696,3.009,12z M18.069,11.546c0-1.112-0.399-1.881-0.741-2.48c-0.456-0.741-0.883-1.368-0.883-2.109 c0-0.826,0.627-1.596,1.51-1.596c0.04,0,0.078,0.005,0.116,0.007C16.472,3.904,14.34,3.009,12,3.009 c-3.141,0-5.904,1.612-7.512,4.052c0.211,0.007,0.41,0.011,0.579,0.011c0.94,0,2.396-0.114,2.396-0.114 C7.947,6.93,8.004,7.642,7.52,7.699c0,0-0.487,0.057-1.029,0.085l3.274,9.739l1.968-5.901l-1.401-3.838 C9.848,7.756,9.389,7.699,9.389,7.699C8.904,7.67,8.961,6.93,9.446,6.958c0,0,1.484,0.114,2.368,0.114 c0.94,0,2.397-0.114,2.397-0.114c0.485-0.028,0.542,0.684,0.057,0.741c0,0-0.488,0.057-1.029,0.085l3.249,9.665l0.897-2.996 C17.841,13.284,18.069,12.316,18.069,11.546z M19.889,7.686c0.039,0.286,0.06,0.593,0.06,0.924c0,0.912-0.171,1.938-0.684,3.22 l-2.746,7.94c2.673-1.558,4.47-4.454,4.47-7.771C20.991,10.436,20.591,8.967,19.889,7.686z M12,22C6.486,22,2,17.514,2,12 C2,6.486,6.486,2,12,2c5.514,0,10,4.486,10,10C22,17.514,17.514,22,12,22z" })
48712 + }
48713 + );
48714 +
48715 +
48716 + ;// ./node_modules/@wordpress/block-library/build-module/social-link/icons/fivehundredpx.js
48717 +
48718 +
48719 + const FivehundredpxIcon = () => /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { width: "24", height: "24", viewBox: "0 0 24 24", version: "1.1", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M6.94026,15.1412c.00437.01213.108.29862.168.44064a6.55008,6.55008,0,1,0,6.03191-9.09557,6.68654,6.68654,0,0,0-2.58357.51467A8.53914,8.53914,0,0,0,8.21268,8.61344L8.209,8.61725V3.22948l9.0504-.00008c.32934-.0036.32934-.46353.32934-.61466s0-.61091-.33035-.61467L7.47248,2a.43.43,0,0,0-.43131.42692v7.58355c0,.24466.30476.42131.58793.4819.553.11812.68074-.05864.81617-.2457l.018-.02481A10.52673,10.52673,0,0,1,9.32258,9.258a5.35268,5.35268,0,1,1,7.58985,7.54976,5.417,5.417,0,0,1-3.80867,1.56365,5.17483,5.17483,0,0,1-2.69822-.74478l.00342-4.61111a2.79372,2.79372,0,0,1,.71372-1.78792,2.61611,2.61611,0,0,1,1.98282-.89477,2.75683,2.75683,0,0,1,1.95525.79477,2.66867,2.66867,0,0,1,.79656,1.909,2.724,2.724,0,0,1-2.75849,2.748,4.94651,4.94651,0,0,1-.86254-.13719c-.31234-.093-.44519.34058-.48892.48349-.16811.54966.08453.65862.13687.67489a3.75751,3.75751,0,0,0,1.25234.18375,3.94634,3.94634,0,1,0-2.82444-6.742,3.67478,3.67478,0,0,0-1.13028,2.584l-.00041.02323c-.0035.11667-.00579,2.881-.00644,3.78811l-.00407-.00451a6.18521,6.18521,0,0,1-1.0851-1.86092c-.10544-.27856-.34358-.22925-.66857-.12917-.14192.04372-.57386.17677-.47833.489Zm4.65165-1.08338a.51346.51346,0,0,0,.19513.31818l.02276.022a.52945.52945,0,0,0,.3517.18416.24242.24242,0,0,0,.16577-.0611c.05473-.05082.67382-.67812.73287-.738l.69041.68819a.28978.28978,0,0,0,.21437.11032.53239.53239,0,0,0,.35708-.19486c.29792-.30419.14885-.46821.07676-.54751l-.69954-.69975.72952-.73469c.16-.17311.01874-.35708-.12218-.498-.20461-.20461-.402-.25742-.52855-.14083l-.7254.72665-.73354-.73375a.20128.20128,0,0,0-.14179-.05695.54135.54135,0,0,0-.34379.19648c-.22561.22555-.274.38149-.15656.5059l.73374.7315-.72942.73072A.26589.26589,0,0,0,11.59191,14.05782Zm1.59866-9.915A8.86081,8.86081,0,0,0,9.854,4.776a.26169.26169,0,0,0-.16938.22759.92978.92978,0,0,0,.08619.42094c.05682.14524.20779.531.50006.41955a8.40969,8.40969,0,0,1,2.91968-.55484,7.87875,7.87875,0,0,1,3.086.62286,8.61817,8.61817,0,0,1,2.30562,1.49315.2781.2781,0,0,0,.18318.07586c.15529,0,.30425-.15253.43167-.29551.21268-.23861.35873-.4369.1492-.63538a8.50425,8.50425,0,0,0-2.62312-1.694A9.0177,9.0177,0,0,0,13.19058,4.14283ZM19.50945,18.6236h0a.93171.93171,0,0,0-.36642-.25406.26589.26589,0,0,0-.27613.06613l-.06943.06929A7.90606,7.90606,0,0,1,7.60639,18.505a7.57284,7.57284,0,0,1-1.696-2.51537,8.58715,8.58715,0,0,1-.5147-1.77754l-.00871-.04864c-.04939-.25873-.28755-.27684-.62981-.22448-.14234.02178-.5755.088-.53426.39969l.001.00712a9.08807,9.08807,0,0,0,15.406,4.99094c.00193-.00192.04753-.04718.0725-.07436C19.79425,19.16234,19.87422,18.98728,19.50945,18.6236Z" }) });
48720 +
48721 +
48722 + ;// ./node_modules/@wordpress/block-library/build-module/social-link/icons/amazon.js
48723 +
48724 +
48725 + const AmazonIcon = () => /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { width: "24", height: "24", viewBox: "0 0 24 24", version: "1.1", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M13.582,8.182C11.934,8.367,9.78,8.49,8.238,9.166c-1.781,0.769-3.03,2.337-3.03,4.644 c0,2.953,1.86,4.429,4.253,4.429c2.02,0,3.125-0.477,4.685-2.065c0.516,0.747,0.685,1.109,1.629,1.894 c0.212,0.114,0.483,0.103,0.672-0.066l0.006,0.006c0.567-0.505,1.599-1.401,2.18-1.888c0.231-0.188,0.19-0.496,0.009-0.754 c-0.52-0.718-1.072-1.303-1.072-2.634V8.305c0-1.876,0.133-3.599-1.249-4.891C15.23,2.369,13.422,2,12.04,2 C9.336,2,6.318,3.01,5.686,6.351C5.618,6.706,5.877,6.893,6.109,6.945l2.754,0.298C9.121,7.23,9.308,6.977,9.357,6.72 c0.236-1.151,1.2-1.706,2.284-1.706c0.584,0,1.249,0.215,1.595,0.738c0.398,0.584,0.346,1.384,0.346,2.061V8.182z M13.049,14.088 c-0.451,0.8-1.169,1.291-1.967,1.291c-1.09,0-1.728-0.83-1.728-2.061c0-2.42,2.171-2.86,4.227-2.86v0.615 C13.582,12.181,13.608,13.104,13.049,14.088z M20.683,19.339C18.329,21.076,14.917,22,11.979,22c-4.118,0-7.826-1.522-10.632-4.057 c-0.22-0.199-0.024-0.471,0.241-0.317c3.027,1.762,6.771,2.823,10.639,2.823c2.608,0,5.476-0.541,8.115-1.66 C20.739,18.62,21.072,19.051,20.683,19.339z M21.336,21.043c-0.194,0.163-0.379,0.076-0.293-0.139 c0.284-0.71,0.92-2.298,0.619-2.684c-0.301-0.386-1.99-0.183-2.749-0.092c-0.23,0.027-0.266-0.173-0.059-0.319 c1.348-0.946,3.555-0.673,3.811-0.356C22.925,17.773,22.599,19.986,21.336,21.043z" }) });
48726 +
48727 +
48728 + ;// ./node_modules/@wordpress/block-library/build-module/social-link/icons/bandcamp.js
48729 +
48730 +
48731 + const BandcampIcon = () => /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { width: "24", height: "24", viewBox: "0 0 24 24", version: "1.1", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M15.27 17.289 3 17.289 8.73 6.711 21 6.711 15.27 17.289" }) });
48732 +
48733 +
48734 + ;// ./node_modules/@wordpress/block-library/build-module/social-link/icons/behance.js
48735 +
48736 +
48737 + const BehanceIcon = () => /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { width: "24", height: "24", viewBox: "0 0 24 24", version: "1.1", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M7.799,5.698c0.589,0,1.12,0.051,1.606,0.156c0.482,0.102,0.894,0.273,1.241,0.507c0.344,0.235,0.612,0.546,0.804,0.938 c0.188,0.387,0.281,0.871,0.281,1.443c0,0.619-0.141,1.137-0.421,1.551c-0.284,0.413-0.7,0.751-1.255,1.014 c0.756,0.218,1.317,0.601,1.689,1.146c0.374,0.549,0.557,1.205,0.557,1.975c0,0.623-0.12,1.161-0.359,1.612 c-0.241,0.457-0.569,0.828-0.973,1.114c-0.408,0.288-0.876,0.5-1.399,0.637C9.052,17.931,8.514,18,7.963,18H2V5.698H7.799 M7.449,10.668c0.481,0,0.878-0.114,1.192-0.345c0.311-0.228,0.463-0.603,0.463-1.119c0-0.286-0.051-0.523-0.152-0.707 C8.848,8.315,8.711,8.171,8.536,8.07C8.362,7.966,8.166,7.894,7.94,7.854c-0.224-0.044-0.457-0.06-0.697-0.06H4.709v2.874H7.449z M7.6,15.905c0.267,0,0.521-0.024,0.759-0.077c0.243-0.053,0.457-0.137,0.637-0.261c0.182-0.12,0.332-0.283,0.441-0.491 C9.547,14.87,9.6,14.602,9.6,14.278c0-0.633-0.18-1.084-0.533-1.357c-0.356-0.27-0.83-0.404-1.413-0.404H4.709v3.388L7.6,15.905z M16.162,15.864c0.367,0.358,0.897,0.538,1.583,0.538c0.493,0,0.92-0.125,1.277-0.374c0.354-0.248,0.571-0.514,0.654-0.79h2.155 c-0.347,1.072-0.872,1.838-1.589,2.299C19.534,18,18.67,18.23,17.662,18.23c-0.701,0-1.332-0.113-1.899-0.337 c-0.567-0.227-1.041-0.544-1.439-0.958c-0.389-0.415-0.689-0.907-0.904-1.484c-0.213-0.574-0.32-1.21-0.32-1.899 c0-0.666,0.11-1.288,0.329-1.863c0.222-0.577,0.529-1.075,0.933-1.492c0.406-0.42,0.885-0.751,1.444-0.994 c0.558-0.241,1.175-0.363,1.857-0.363c0.754,0,1.414,0.145,1.98,0.44c0.563,0.291,1.026,0.686,1.389,1.181 c0.363,0.493,0.622,1.057,0.783,1.69c0.16,0.632,0.217,1.292,0.171,1.983h-6.428C15.557,14.84,15.795,15.506,16.162,15.864 M18.973,11.184c-0.291-0.321-0.783-0.496-1.384-0.496c-0.39,0-0.714,0.066-0.973,0.2c-0.254,0.132-0.461,0.297-0.621,0.491 c-0.157,0.197-0.265,0.405-0.328,0.628c-0.063,0.217-0.101,0.413-0.111,0.587h3.98C19.478,11.969,19.265,11.509,18.973,11.184z M15.057,7.738h4.985V6.524h-4.985L15.057,7.738z" }) });
48738 +
48739 +
48740 + ;// ./node_modules/@wordpress/block-library/build-module/social-link/icons/bluesky.js
48741 +
48742 +
48743 + const BlueskyIcon = () => /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { width: "24", height: "24", viewBox: "0 0 24 24", version: "1.1", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M6.3,4.2c2.3,1.7,4.8,5.3,5.7,7.2.9-1.9,3.4-5.4,5.7-7.2,1.7-1.3,4.3-2.2,4.3.9s-.4,5.2-.6,5.9c-.7,2.6-3.3,3.2-5.6,2.8,4,.7,5.1,3,2.9,5.3-5,5.2-6.7-2.8-6.7-2.8,0,0-1.7,8-6.7,2.8-2.2-2.3-1.2-4.6,2.9-5.3-2.3.4-4.9-.3-5.6-2.8-.2-.7-.6-5.3-.6-5.9,0-3.1,2.7-2.1,4.3-.9h0Z" }) });
48744 +
48745 +
48746 + ;// ./node_modules/@wordpress/block-library/build-module/social-link/icons/codepen.js
48747 +
48748 +
48749 + const CodepenIcon = () => /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { width: "24", height: "24", viewBox: "0 0 24 24", version: "1.1", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M22.016,8.84c-0.002-0.013-0.005-0.025-0.007-0.037c-0.005-0.025-0.008-0.048-0.015-0.072 c-0.003-0.015-0.01-0.028-0.013-0.042c-0.008-0.02-0.015-0.04-0.023-0.062c-0.007-0.015-0.013-0.028-0.02-0.042 c-0.008-0.02-0.018-0.037-0.03-0.057c-0.007-0.013-0.017-0.027-0.025-0.038c-0.012-0.018-0.023-0.035-0.035-0.052 c-0.01-0.013-0.02-0.025-0.03-0.037c-0.015-0.017-0.028-0.032-0.043-0.045c-0.01-0.012-0.022-0.023-0.035-0.035 c-0.015-0.015-0.032-0.028-0.048-0.04c-0.012-0.01-0.025-0.02-0.037-0.03c-0.005-0.003-0.01-0.008-0.015-0.012l-9.161-6.096 c-0.289-0.192-0.666-0.192-0.955,0L2.359,8.237C2.354,8.24,2.349,8.245,2.344,8.249L2.306,8.277 c-0.017,0.013-0.033,0.027-0.048,0.04C2.246,8.331,2.234,8.342,2.222,8.352c-0.015,0.015-0.028,0.03-0.042,0.047 c-0.012,0.013-0.022,0.023-0.03,0.037C2.139,8.453,2.125,8.471,2.115,8.488C2.107,8.501,2.099,8.514,2.09,8.526 C2.079,8.548,2.069,8.565,2.06,8.585C2.054,8.6,2.047,8.613,2.04,8.626C2.032,8.648,2.025,8.67,2.019,8.69 c-0.005,0.013-0.01,0.027-0.013,0.042C1.999,8.755,1.995,8.778,1.99,8.803C1.989,8.817,1.985,8.828,1.984,8.84 C1.978,8.879,1.975,8.915,1.975,8.954v6.093c0,0.037,0.003,0.075,0.008,0.112c0.002,0.012,0.005,0.025,0.007,0.038 c0.005,0.023,0.008,0.047,0.015,0.072c0.003,0.015,0.008,0.028,0.013,0.04c0.007,0.022,0.013,0.042,0.022,0.063 c0.007,0.015,0.013,0.028,0.02,0.04c0.008,0.02,0.018,0.038,0.03,0.058c0.007,0.013,0.015,0.027,0.025,0.038 c0.012,0.018,0.023,0.035,0.035,0.052c0.01,0.013,0.02,0.025,0.03,0.037c0.013,0.015,0.028,0.032,0.042,0.045 c0.012,0.012,0.023,0.023,0.035,0.035c0.015,0.013,0.032,0.028,0.048,0.04l0.038,0.03c0.005,0.003,0.01,0.007,0.013,0.01 l9.163,6.095C11.668,21.953,11.833,22,12,22c0.167,0,0.332-0.047,0.478-0.144l9.163-6.095l0.015-0.01 c0.013-0.01,0.027-0.02,0.037-0.03c0.018-0.013,0.035-0.028,0.048-0.04c0.013-0.012,0.025-0.023,0.035-0.035 c0.017-0.015,0.03-0.032,0.043-0.045c0.01-0.013,0.02-0.025,0.03-0.037c0.013-0.018,0.025-0.035,0.035-0.052 c0.008-0.013,0.018-0.027,0.025-0.038c0.012-0.02,0.022-0.038,0.03-0.058c0.007-0.013,0.013-0.027,0.02-0.04 c0.008-0.022,0.015-0.042,0.023-0.063c0.003-0.013,0.01-0.027,0.013-0.04c0.007-0.025,0.01-0.048,0.015-0.072 c0.002-0.013,0.005-0.027,0.007-0.037c0.003-0.042,0.007-0.079,0.007-0.117V8.954C22.025,8.915,22.022,8.879,22.016,8.84z M12.862,4.464l6.751,4.49l-3.016,2.013l-3.735-2.492V4.464z M11.138,4.464v4.009l-3.735,2.494L4.389,8.954L11.138,4.464z M3.699,10.562L5.853,12l-2.155,1.438V10.562z M11.138,19.536l-6.749-4.491l3.015-2.011l3.735,2.492V19.536z M12,14.035L8.953,12 L12,9.966L15.047,12L12,14.035z M12.862,19.536v-4.009l3.735-2.492l3.016,2.011L12.862,19.536z M20.303,13.438L18.147,12 l2.156-1.438L20.303,13.438z" }) });
48750 +
48751 +
48752 + ;// ./node_modules/@wordpress/block-library/build-module/social-link/icons/deviantart.js
48753 +
48754 +
48755 + const DeviantArtIcon = () => /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { width: "24", height: "24", viewBox: "0 0 24 24", version: "1.1", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M 18.19 5.636 18.19 2 18.188 2 14.553 2 14.19 2.366 12.474 5.636 11.935 6 5.81 6 5.81 10.994 9.177 10.994 9.477 11.357 5.81 18.363 5.81 22 5.811 22 9.447 22 9.81 21.634 11.526 18.364 12.065 18 18.19 18 18.19 13.006 14.823 13.006 14.523 12.641 18.19 5.636z" }) });
48756 +
48757 +
48758 + ;// ./node_modules/@wordpress/block-library/build-module/social-link/icons/discord.js
48759 +
48760 +
48761 + const DiscordIcon = () => /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { width: "24", height: "24", viewBox: "0 0 24 24", version: "1.1", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M20.317 4.369A19.88 19.88 0 0 0 15.894 3a14.145 14.145 0 0 0-.719 1.518 19.205 19.205 0 0 0-5.351 0A14.183 14.183 0 0 0 9.104 3 19.896 19.896 0 0 0 4.682 4.369a18.921 18.921 0 0 0-3.012 12.52 19.929 19.929 0 0 0 6.081 3.097c.487-.65.922-1.339 1.3-2.061a12.445 12.445 0 0 1-1.958-.896c.165-.12.326-.246.483-.374a12.445 12.445 0 0 0 8.946 0c.157.128.318.253.483.374-.627.371-1.281.683-1.958.896.379.722.813 1.41 1.3 2.061a19.94 19.94 0 0 0 6.081-3.097 18.921 18.921 0 0 0-3.012-12.52ZM8.12 15.233c-1.202 0-2.184-1.09-2.184-2.431 0-1.34.97-2.431 2.184-2.431 1.213 0 2.202 1.09 2.184 2.431 0 1.341-.97 2.431-2.184 2.431Zm7.757 0c-1.202 0-2.184-1.09-2.184-2.431 0-1.34.97-2.431 2.184-2.431 1.213 0 2.202 1.09 2.184 2.431 0 1.341-.97 2.431-2.184 2.431Z" }) });
48762 +
48763 +
48764 + ;// ./node_modules/@wordpress/block-library/build-module/social-link/icons/dribbble.js
48765 +
48766 +
48767 + const DribbbleIcon = () => /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { width: "24", height: "24", viewBox: "0 0 24 24", version: "1.1", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M12,22C6.486,22,2,17.514,2,12S6.486,2,12,2c5.514,0,10,4.486,10,10S17.514,22,12,22z M20.434,13.369 c-0.292-0.092-2.644-0.794-5.32-0.365c1.117,3.07,1.572,5.57,1.659,6.09C18.689,17.798,20.053,15.745,20.434,13.369z M15.336,19.876c-0.127-0.749-0.623-3.361-1.822-6.477c-0.019,0.006-0.038,0.013-0.056,0.019c-4.818,1.679-6.547,5.02-6.701,5.334 c1.448,1.129,3.268,1.803,5.243,1.803C13.183,20.555,14.311,20.313,15.336,19.876z M5.654,17.724 c0.193-0.331,2.538-4.213,6.943-5.637c0.111-0.036,0.224-0.07,0.337-0.102c-0.214-0.485-0.448-0.971-0.692-1.45 c-4.266,1.277-8.405,1.223-8.778,1.216c-0.003,0.087-0.004,0.174-0.004,0.261C3.458,14.207,4.29,16.21,5.654,17.724z M3.639,10.264 c0.382,0.005,3.901,0.02,7.897-1.041c-1.415-2.516-2.942-4.631-3.167-4.94C5.979,5.41,4.193,7.613,3.639,10.264z M9.998,3.709 c0.236,0.316,1.787,2.429,3.187,5c3.037-1.138,4.323-2.867,4.477-3.085C16.154,4.286,14.17,3.471,12,3.471 C11.311,3.471,10.641,3.554,9.998,3.709z M18.612,6.612C18.432,6.855,17,8.69,13.842,9.979c0.199,0.407,0.389,0.821,0.567,1.237 c0.063,0.148,0.124,0.295,0.184,0.441c2.842-0.357,5.666,0.215,5.948,0.275C20.522,9.916,19.801,8.065,18.612,6.612z" }) });
48768 +
48769 +
48770 + ;// ./node_modules/@wordpress/block-library/build-module/social-link/icons/dropbox.js
48771 +
48772 +
48773 + const DropboxIcon = () => /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { width: "24", height: "24", viewBox: "0 0 24 24", version: "1.1", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M12,6.134L6.069,9.797L2,6.54l5.883-3.843L12,6.134z M2,13.054l5.883,3.843L12,13.459L6.069,9.797L2,13.054z M12,13.459 l4.116,3.439L22,13.054l-4.069-3.257L12,13.459z M22,6.54l-5.884-3.843L12,6.134l5.931,3.663L22,6.54z M12.011,14.2l-4.129,3.426 l-1.767-1.153v1.291l5.896,3.539l5.897-3.539v-1.291l-1.769,1.153L12.011,14.2z" }) });
48774 +
48775 +
48776 + ;// ./node_modules/@wordpress/block-library/build-module/social-link/icons/etsy.js
48777 +
48778 +
48779 + const EtsyIcon = () => /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { width: "24", height: "24", viewBox: "0 0 24 24", version: "1.1", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M9.16033,4.038c0-.27174.02717-.43478.48913-.43478h6.22283c1.087,0,1.68478.92391,2.11957,2.663l.35326,1.38587h1.05978C19.59511,3.712,19.75815,2,19.75815,2s-2.663.29891-4.23913.29891h-7.962L3.29076,2.163v1.1413L4.731,3.57609c1.00543.19022,1.25.40761,1.33152,1.33152,0,0,.08152,2.71739.08152,7.20109s-.08152,7.17391-.08152,7.17391c0,.81522-.32609,1.11413-1.33152,1.30435l-1.44022.27174V22l4.2663-.13587h7.11957c1.60326,0,5.32609.13587,5.32609.13587.08152-.97826.625-5.40761.70652-5.89674H19.7038L18.644,18.52174c-.84239,1.90217-2.06522,2.038-3.42391,2.038H11.1712c-1.3587,0-2.01087-.54348-2.01087-1.712V12.65217s3.0163,0,3.99457.08152c.76087.05435,1.22283.27174,1.46739,1.33152l.32609,1.413h1.16848l-.08152-3.55978.163-3.587H15.02989l-.38043,1.57609c-.24457,1.03261-.40761,1.22283-1.46739,1.33152-1.38587.13587-4.02174.1087-4.02174.1087Z" }) });
48780 +
48781 +
48782 + ;// ./node_modules/@wordpress/block-library/build-module/social-link/icons/facebook.js
48783 +
48784 +
48785 + const FacebookIcon = () => /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { width: "24", height: "24", viewBox: "0 0 24 24", version: "1.1", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M12 2C6.5 2 2 6.5 2 12c0 5 3.7 9.1 8.4 9.9v-7H7.9V12h2.5V9.8c0-2.5 1.5-3.9 3.8-3.9 1.1 0 2.2.2 2.2.2v2.5h-1.3c-1.2 0-1.6.8-1.6 1.6V12h2.8l-.4 2.9h-2.3v7C18.3 21.1 22 17 22 12c0-5.5-4.5-10-10-10z" }) });
48786 +
48787 +
48788 + ;// ./node_modules/@wordpress/block-library/build-module/social-link/icons/feed.js
48789 +
48790 +
48791 + const FeedIcon = () => /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { width: "24", height: "24", viewBox: "0 0 24 24", version: "1.1", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M2,8.667V12c5.515,0,10,4.485,10,10h3.333C15.333,14.637,9.363,8.667,2,8.667z M2,2v3.333 c9.19,0,16.667,7.477,16.667,16.667H22C22,10.955,13.045,2,2,2z M4.5,17C3.118,17,2,18.12,2,19.5S3.118,22,4.5,22S7,20.88,7,19.5 S5.882,17,4.5,17z" }) });
48792 +
48793 +
48794 + ;// ./node_modules/@wordpress/block-library/build-module/social-link/icons/flickr.js
48795 +
48796 +
48797 + const FlickrIcon = () => /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { width: "24", height: "24", viewBox: "0 0 24 24", version: "1.1", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M6.5,7c-2.75,0-5,2.25-5,5s2.25,5,5,5s5-2.25,5-5S9.25,7,6.5,7z M17.5,7c-2.75,0-5,2.25-5,5s2.25,5,5,5s5-2.25,5-5 S20.25,7,17.5,7z" }) });
48798 +
48799 +
48800 + ;// ./node_modules/@wordpress/block-library/build-module/social-link/icons/foursquare.js
48801 +
48802 +
48803 + const FoursquareIcon = () => /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { width: "24", height: "24", viewBox: "0 0 24 24", version: "1.1", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M17.573,2c0,0-9.197,0-10.668,0S5,3.107,5,3.805s0,16.948,0,16.948c0,0.785,0.422,1.077,0.66,1.172 c0.238,0.097,0.892,0.177,1.285-0.275c0,0,5.035-5.843,5.122-5.93c0.132-0.132,0.132-0.132,0.262-0.132h3.26 c1.368,0,1.588-0.977,1.732-1.552c0.078-0.318,0.692-3.428,1.225-6.122l0.675-3.368C19.56,2.893,19.14,2,17.573,2z M16.495,7.22 c-0.053,0.252-0.372,0.518-0.665,0.518c-0.293,0-4.157,0-4.157,0c-0.467,0-0.802,0.318-0.802,0.787v0.508 c0,0.467,0.337,0.798,0.805,0.798c0,0,3.197,0,3.528,0s0.655,0.362,0.583,0.715c-0.072,0.353-0.407,2.102-0.448,2.295 c-0.04,0.193-0.262,0.523-0.655,0.523c-0.33,0-2.88,0-2.88,0c-0.523,0-0.683,0.068-1.033,0.503 c-0.35,0.437-3.505,4.223-3.505,4.223c-0.032,0.035-0.063,0.027-0.063-0.015V4.852c0-0.298,0.26-0.648,0.648-0.648 c0,0,8.228,0,8.562,0c0.315,0,0.61,0.297,0.528,0.683L16.495,7.22z" }) });
48804 +
48805 +
48806 + ;// ./node_modules/@wordpress/block-library/build-module/social-link/icons/goodreads.js
48807 +
48808 +
48809 + const GoodreadsIcon = () => /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { width: "24", height: "24", viewBox: "0 0 24 24", version: "1.1", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M17.3,17.5c-0.2,0.8-0.5,1.4-1,1.9c-0.4,0.5-1,0.9-1.7,1.2C13.9,20.9,13.1,21,12,21c-0.6,0-1.3-0.1-1.9-0.2 c-0.6-0.1-1.1-0.4-1.6-0.7c-0.5-0.3-0.9-0.7-1.2-1.2c-0.3-0.5-0.5-1.1-0.5-1.7h1.5c0.1,0.5,0.2,0.9,0.5,1.2 c0.2,0.3,0.5,0.6,0.9,0.8c0.3,0.2,0.7,0.3,1.1,0.4c0.4,0.1,0.8,0.1,1.2,0.1c1.4,0,2.5-0.4,3.1-1.2c0.6-0.8,1-2,1-3.5v-1.7h0 c-0.4,0.8-0.9,1.4-1.6,1.9c-0.7,0.5-1.5,0.7-2.4,0.7c-1,0-1.9-0.2-2.6-0.5C8.7,15,8.1,14.5,7.7,14c-0.5-0.6-0.8-1.3-1-2.1 c-0.2-0.8-0.3-1.6-0.3-2.5c0-0.9,0.1-1.7,0.4-2.5c0.3-0.8,0.6-1.5,1.1-2c0.5-0.6,1.1-1,1.8-1.4C10.3,3.2,11.1,3,12,3 c0.5,0,0.9,0.1,1.3,0.2c0.4,0.1,0.8,0.3,1.1,0.5c0.3,0.2,0.6,0.5,0.9,0.8c0.3,0.3,0.5,0.6,0.6,1h0V3.4h1.5V15 C17.6,15.9,17.5,16.7,17.3,17.5z M13.8,14.1c0.5-0.3,0.9-0.7,1.3-1.1c0.3-0.5,0.6-1,0.8-1.6c0.2-0.6,0.3-1.2,0.3-1.9 c0-0.6-0.1-1.2-0.2-1.9c-0.1-0.6-0.4-1.2-0.7-1.7c-0.3-0.5-0.7-0.9-1.3-1.2c-0.5-0.3-1.1-0.5-1.9-0.5s-1.4,0.2-1.9,0.5 c-0.5,0.3-1,0.7-1.3,1.2C8.5,6.4,8.3,7,8.1,7.6C8,8.2,7.9,8.9,7.9,9.5c0,0.6,0.1,1.3,0.2,1.9C8.3,12,8.6,12.5,8.9,13 c0.3,0.5,0.8,0.8,1.3,1.1c0.5,0.3,1.1,0.4,1.9,0.4C12.7,14.5,13.3,14.4,13.8,14.1z" }) });
48810 +
48811 +
48812 + ;// ./node_modules/@wordpress/block-library/build-module/social-link/icons/google.js
48813 +
48814 +
48815 + const GoogleIcon = () => /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { width: "24", height: "24", viewBox: "0 0 24 24", version: "1.1", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M12.02,10.18v3.72v0.01h5.51c-0.26,1.57-1.67,4.22-5.5,4.22c-3.31,0-6.01-2.75-6.01-6.12s2.7-6.12,6.01-6.12 c1.87,0,3.13,0.8,3.85,1.48l2.84-2.76C16.99,2.99,14.73,2,12.03,2c-5.52,0-10,4.48-10,10s4.48,10,10,10c5.77,0,9.6-4.06,9.6-9.77 c0-0.83-0.11-1.42-0.25-2.05H12.02z" }) });
48816 +
48817 +
48818 + ;// ./node_modules/@wordpress/block-library/build-module/social-link/icons/github.js
48819 +
48820 +
48821 + const GitHubIcon = () => /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { width: "24", height: "24", viewBox: "0 0 24 24", version: "1.1", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M12,2C6.477,2,2,6.477,2,12c0,4.419,2.865,8.166,6.839,9.489c0.5,0.09,0.682-0.218,0.682-0.484 c0-0.236-0.009-0.866-0.014-1.699c-2.782,0.602-3.369-1.34-3.369-1.34c-0.455-1.157-1.11-1.465-1.11-1.465 c-0.909-0.62,0.069-0.608,0.069-0.608c1.004,0.071,1.532,1.03,1.532,1.03c0.891,1.529,2.341,1.089,2.91,0.833 c0.091-0.647,0.349-1.086,0.635-1.337c-2.22-0.251-4.555-1.111-4.555-4.943c0-1.091,0.39-1.984,1.03-2.682 C6.546,8.54,6.202,7.524,6.746,6.148c0,0,0.84-0.269,2.75,1.025C10.295,6.95,11.15,6.84,12,6.836 c0.85,0.004,1.705,0.114,2.504,0.336c1.909-1.294,2.748-1.025,2.748-1.025c0.546,1.376,0.202,2.394,0.1,2.646 c0.64,0.699,1.026,1.591,1.026,2.682c0,3.841-2.337,4.687-4.565,4.935c0.359,0.307,0.679,0.917,0.679,1.852 c0,1.335-0.012,2.415-0.012,2.741c0,0.269,0.18,0.579,0.688,0.481C19.138,20.161,22,16.416,22,12C22,6.477,17.523,2,12,2z" }) });
48822 +
48823 +
48824 + ;// ./node_modules/@wordpress/block-library/build-module/social-link/icons/gravatar.js
48825 +
48826 +
48827 + const GravatarIcon = () => /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { width: "24", height: "24", viewBox: "0 0 24 24", version: "1.1", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M10.8001 4.69937V10.6494C10.8001 11.1001 10.9791 11.5323 11.2978 11.851C11.6165 12.1697 12.0487 12.3487 12.4994 12.3487C12.9501 12.3487 13.3824 12.1697 13.7011 11.851C14.0198 11.5323 14.1988 11.1001 14.1988 10.6494V6.69089C15.2418 7.05861 16.1371 7.75537 16.7496 8.67617C17.3622 9.59698 17.6589 10.6919 17.595 11.796C17.5311 12.9001 17.1101 13.9535 16.3954 14.7975C15.6807 15.6415 14.711 16.2303 13.6325 16.4753C12.5541 16.7202 11.4252 16.608 10.4161 16.1555C9.40691 15.703 8.57217 14.9348 8.03763 13.9667C7.50308 12.9985 7.29769 11.8828 7.45242 10.7877C7.60714 9.69266 8.11359 8.67755 8.89545 7.89537C9.20904 7.57521 9.38364 7.14426 9.38132 6.69611C9.37899 6.24797 9.19994 5.81884 8.88305 5.50195C8.56616 5.18506 8.13704 5.00601 7.68889 5.00369C7.24075 5.00137 6.80979 5.17597 6.48964 5.48956C5.09907 6.8801 4.23369 8.7098 4.04094 10.6669C3.84819 12.624 4.34 14.5873 5.43257 16.2224C6.52515 17.8575 8.15088 19.0632 10.0328 19.634C11.9146 20.2049 13.9362 20.1055 15.753 19.3529C17.5699 18.6003 19.0695 17.241 19.9965 15.5066C20.9234 13.7722 21.2203 11.7701 20.8366 9.84133C20.4528 7.91259 19.4122 6.17658 17.892 4.92911C16.3717 3.68163 14.466 2.99987 12.4994 3C12.0487 3 11.6165 3.17904 11.2978 3.49773C10.9791 3.81643 10.8001 4.24867 10.8001 4.69937Z" }) });
48828 +
48829 +
48830 + ;// ./node_modules/@wordpress/block-library/build-module/social-link/icons/instagram.js
48831 +
48832 +
48833 + const InstagramIcon = () => /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { width: "24", height: "24", viewBox: "0 0 24 24", version: "1.1", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M12,4.622c2.403,0,2.688,0.009,3.637,0.052c0.877,0.04,1.354,0.187,1.671,0.31c0.42,0.163,0.72,0.358,1.035,0.673 c0.315,0.315,0.51,0.615,0.673,1.035c0.123,0.317,0.27,0.794,0.31,1.671c0.043,0.949,0.052,1.234,0.052,3.637 s-0.009,2.688-0.052,3.637c-0.04,0.877-0.187,1.354-0.31,1.671c-0.163,0.42-0.358,0.72-0.673,1.035 c-0.315,0.315-0.615,0.51-1.035,0.673c-0.317,0.123-0.794,0.27-1.671,0.31c-0.949,0.043-1.233,0.052-3.637,0.052 s-2.688-0.009-3.637-0.052c-0.877-0.04-1.354-0.187-1.671-0.31c-0.42-0.163-0.72-0.358-1.035-0.673 c-0.315-0.315-0.51-0.615-0.673-1.035c-0.123-0.317-0.27-0.794-0.31-1.671C4.631,14.688,4.622,14.403,4.622,12 s0.009-2.688,0.052-3.637c0.04-0.877,0.187-1.354,0.31-1.671c0.163-0.42,0.358-0.72,0.673-1.035 c0.315-0.315,0.615-0.51,1.035-0.673c0.317-0.123,0.794-0.27,1.671-0.31C9.312,4.631,9.597,4.622,12,4.622 M12,3 C9.556,3,9.249,3.01,8.289,3.054C7.331,3.098,6.677,3.25,6.105,3.472C5.513,3.702,5.011,4.01,4.511,4.511 c-0.5,0.5-0.808,1.002-1.038,1.594C3.25,6.677,3.098,7.331,3.054,8.289C3.01,9.249,3,9.556,3,12c0,2.444,0.01,2.751,0.054,3.711 c0.044,0.958,0.196,1.612,0.418,2.185c0.23,0.592,0.538,1.094,1.038,1.594c0.5,0.5,1.002,0.808,1.594,1.038 c0.572,0.222,1.227,0.375,2.185,0.418C9.249,20.99,9.556,21,12,21s2.751-0.01,3.711-0.054c0.958-0.044,1.612-0.196,2.185-0.418 c0.592-0.23,1.094-0.538,1.594-1.038c0.5-0.5,0.808-1.002,1.038-1.594c0.222-0.572,0.375-1.227,0.418-2.185 C20.99,14.751,21,14.444,21,12s-0.01-2.751-0.054-3.711c-0.044-0.958-0.196-1.612-0.418-2.185c-0.23-0.592-0.538-1.094-1.038-1.594 c-0.5-0.5-1.002-0.808-1.594-1.038c-0.572-0.222-1.227-0.375-2.185-0.418C14.751,3.01,14.444,3,12,3L12,3z M12,7.378 c-2.552,0-4.622,2.069-4.622,4.622S9.448,16.622,12,16.622s4.622-2.069,4.622-4.622S14.552,7.378,12,7.378z M12,15 c-1.657,0-3-1.343-3-3s1.343-3,3-3s3,1.343,3,3S13.657,15,12,15z M16.804,6.116c-0.596,0-1.08,0.484-1.08,1.08 s0.484,1.08,1.08,1.08c0.596,0,1.08-0.484,1.08-1.08S17.401,6.116,16.804,6.116z" }) });
48834 +
48835 +
48836 + ;// ./node_modules/@wordpress/block-library/build-module/social-link/icons/lastfm.js
48837 +
48838 +
48839 + const LastfmIcon = () => /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { width: "24", height: "24", viewBox: "0 0 24 24", version: "1.1", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M 12.0002 1.5 C 6.2006 1.5 1.5 6.2011 1.5 11.9998 C 1.5 17.799 6.2006 22.5 12.0002 22.5 C 17.799 22.5 22.5 17.799 22.5 11.9998 C 22.5 6.2011 17.799 1.5 12.0002 1.5 Z M 16.1974 16.2204 C 14.8164 16.2152 13.9346 15.587 13.3345 14.1859 L 13.1816 13.8451 L 11.8541 10.8101 C 11.4271 9.7688 10.3526 9.0712 9.1801 9.0712 C 7.5695 9.0712 6.2593 10.3851 6.2593 12.001 C 6.2593 13.6165 7.5695 14.9303 9.1801 14.9303 C 10.272 14.9303 11.2651 14.3275 11.772 13.3567 C 11.7893 13.3235 11.8239 13.302 11.863 13.3038 C 11.9007 13.3054 11.9353 13.3288 11.9504 13.3632 L 12.4865 14.6046 C 12.5016 14.639 12.4956 14.6778 12.4723 14.7069 C 11.6605 15.6995 10.4602 16.2683 9.1801 16.2683 C 6.8331 16.2683 4.9234 14.3536 4.9234 12.001 C 4.9234 9.6468 6.833 7.732 9.1801 7.732 C 10.9572 7.732 12.3909 8.6907 13.1138 10.3636 C 13.1206 10.3802 13.8412 12.0708 14.4744 13.5191 C 14.8486 14.374 15.1462 14.896 16.1288 14.9292 C 17.0663 14.9613 17.7538 14.4122 17.7538 13.6485 C 17.7538 12.9691 17.3321 12.8004 16.3803 12.4822 C 14.7365 11.9398 13.845 11.3861 13.845 10.0182 C 13.845 8.6809 14.7667 7.8162 16.192 7.8162 C 17.1288 7.8162 17.8155 8.2287 18.2921 9.0768 C 18.305 9.1006 18.3079 9.1281 18.3004 9.1542 C 18.2929 9.1803 18.2748 9.2021 18.2507 9.2138 L 17.3614 9.669 C 17.3178 9.692 17.2643 9.6781 17.2356 9.6385 C 16.9329 9.2135 16.5956 9.0251 16.1423 9.0251 C 15.5512 9.0251 15.122 9.429 15.122 9.9865 C 15.122 10.6738 15.6529 10.8414 16.5339 11.1192 C 16.6491 11.1558 16.7696 11.194 16.8939 11.2343 C 18.2763 11.6865 19.0768 12.2311 19.0768 13.6836 C 19.0769 15.1297 17.8389 16.2204 16.1974 16.2204 Z" }) });
48840 +
48841 +
48842 + ;// ./node_modules/@wordpress/block-library/build-module/social-link/icons/linkedin.js
48843 +
48844 +
48845 + const LinkedInIcon = () => /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { width: "24", height: "24", viewBox: "0 0 24 24", version: "1.1", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M19.7,3H4.3C3.582,3,3,3.582,3,4.3v15.4C3,20.418,3.582,21,4.3,21h15.4c0.718,0,1.3-0.582,1.3-1.3V4.3 C21,3.582,20.418,3,19.7,3z M8.339,18.338H5.667v-8.59h2.672V18.338z M7.004,8.574c-0.857,0-1.549-0.694-1.549-1.548 c0-0.855,0.691-1.548,1.549-1.548c0.854,0,1.547,0.694,1.547,1.548C8.551,7.881,7.858,8.574,7.004,8.574z M18.339,18.338h-2.669 v-4.177c0-0.996-0.017-2.278-1.387-2.278c-1.389,0-1.601,1.086-1.601,2.206v4.249h-2.667v-8.59h2.559v1.174h0.037 c0.356-0.675,1.227-1.387,2.526-1.387c2.703,0,3.203,1.779,3.203,4.092V18.338z" }) });
48846 +
48847 +
48848 + ;// ./node_modules/@wordpress/block-library/build-module/social-link/icons/mail.js
48849 +
48850 +
48851 + const MailIcon = () => /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { width: "24", height: "24", viewBox: "0 0 24 24", version: "1.1", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M19 5H5c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm.5 12c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5V9.8l7.5 5.6 7.5-5.6V17zm0-9.1L12 13.6 4.5 7.9V7c0-.3.2-.5.5-.5h14c.3 0 .5.2.5.5v.9z" }) });
48852 +
48853 +
48854 + ;// ./node_modules/@wordpress/block-library/build-module/social-link/icons/mastodon.js
48855 +
48856 +
48857 + const MastodonIcon = () => /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { width: "24", height: "24", viewBox: "0 0 24 24", version: "1.1", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M23.193 7.879c0-5.206-3.411-6.732-3.411-6.732C18.062.357 15.108.025 12.041 0h-.076c-3.068.025-6.02.357-7.74 1.147 0 0-3.411 1.526-3.411 6.732 0 1.192-.023 2.618.015 4.129.124 5.092.934 10.109 5.641 11.355 2.17.574 4.034.695 5.535.612 2.722-.15 4.25-.972 4.25-.972l-.09-1.975s-1.945.613-4.129.539c-2.165-.074-4.449-.233-4.799-2.891a5.499 5.499 0 0 1-.048-.745s2.125.52 4.817.643c1.646.075 3.19-.097 4.758-.283 3.007-.359 5.625-2.212 5.954-3.905.517-2.665.475-6.507.475-6.507zm-4.024 6.709h-2.497V8.469c0-1.29-.543-1.944-1.628-1.944-1.2 0-1.802.776-1.802 2.312v3.349h-2.483v-3.35c0-1.536-.602-2.312-1.802-2.312-1.085 0-1.628.655-1.628 1.944v6.119H4.832V8.284c0-1.289.328-2.313.987-3.07.68-.758 1.569-1.146 2.674-1.146 1.278 0 2.246.491 2.886 1.474L12 6.585l.622-1.043c.64-.983 1.608-1.474 2.886-1.474 1.104 0 1.994.388 2.674 1.146.658.757.986 1.781.986 3.07v6.304z" }) });
48858 +
48859 +
48860 + ;// ./node_modules/@wordpress/block-library/build-module/social-link/icons/meetup.js
48861 +
48862 +
48863 + const MeetupIcon = () => /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { width: "24", height: "24", viewBox: "0 0 24 24", version: "1.1", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M19.24775,14.722a3.57032,3.57032,0,0,1-2.94457,3.52073,3.61886,3.61886,0,0,1-.64652.05634c-.07314-.0008-.10187.02846-.12507.09547A2.38881,2.38881,0,0,1,13.49453,20.094a2.33092,2.33092,0,0,1-1.827-.50716.13635.13635,0,0,0-.19878-.00408,3.191,3.191,0,0,1-2.104.60248,3.26309,3.26309,0,0,1-3.00324-2.71993,2.19076,2.19076,0,0,1-.03512-.30865c-.00156-.08579-.03413-.1189-.11608-.13493a2.86421,2.86421,0,0,1-1.23189-.56111,2.945,2.945,0,0,1-1.166-2.05749,2.97484,2.97484,0,0,1,.87524-2.50774.112.112,0,0,0,.02091-.16107,2.7213,2.7213,0,0,1-.36648-1.48A2.81256,2.81256,0,0,1,6.57673,7.58838a.35764.35764,0,0,0,.28869-.22819,4.2208,4.2208,0,0,1,6.02892-1.90111.25161.25161,0,0,0,.22023.0243,3.65608,3.65608,0,0,1,3.76031.90678A3.57244,3.57244,0,0,1,17.95918,8.626a2.97339,2.97339,0,0,1,.01829.57356.10637.10637,0,0,0,.0853.12792,1.97669,1.97669,0,0,1,1.27939,1.33733,2.00266,2.00266,0,0,1-.57112,2.12652c-.05284.05166-.04168.08328-.01173.13489A3.51189,3.51189,0,0,1,19.24775,14.722Zm-6.35959-.27836a1.6984,1.6984,0,0,0,1.14556,1.61113,3.82039,3.82039,0,0,0,1.036.17935,1.46888,1.46888,0,0,0,.73509-.12255.44082.44082,0,0,0,.26057-.44274.45312.45312,0,0,0-.29211-.43375.97191.97191,0,0,0-.20678-.063c-.21326-.03806-.42754-.0701-.63973-.11215a.54787.54787,0,0,1-.50172-.60926,2.75864,2.75864,0,0,1,.1773-.901c.1763-.535.414-1.045.64183-1.55913A12.686,12.686,0,0,0,15.85,10.47863a1.58461,1.58461,0,0,0,.04861-.87208,1.04531,1.04531,0,0,0-.85432-.83981,1.60658,1.60658,0,0,0-1.23654.16594.27593.27593,0,0,1-.36286-.03413c-.085-.0747-.16594-.15379-.24918-.23055a.98682.98682,0,0,0-1.33577-.04933,6.1468,6.1468,0,0,1-.4989.41615.47762.47762,0,0,1-.51535.03566c-.17448-.09307-.35512-.175-.53531-.25665a1.74949,1.74949,0,0,0-.56476-.2016,1.69943,1.69943,0,0,0-1.61654.91787,8.05815,8.05815,0,0,0-.32952.80126c-.45471,1.2557-.82507,2.53825-1.20838,3.81639a1.24151,1.24151,0,0,0,.51532,1.44389,1.42659,1.42659,0,0,0,1.22008.17166,1.09728,1.09728,0,0,0,.66994-.69764c.44145-1.04111.839-2.09989,1.25981-3.14926.11581-.28876.22792-.57874.35078-.86438a.44548.44548,0,0,1,.69189-.19539.50521.50521,0,0,1,.15044.43836,1.75625,1.75625,0,0,1-.14731.50453c-.27379.69219-.55265,1.38236-.82766,2.074a2.0836,2.0836,0,0,0-.14038.42876.50719.50719,0,0,0,.27082.57722.87236.87236,0,0,0,.66145.02739.99137.99137,0,0,0,.53406-.532q.61571-1.20914,1.228-2.42031.28423-.55863.57585-1.1133a.87189.87189,0,0,1,.29055-.35253.34987.34987,0,0,1,.37634-.01265.30291.30291,0,0,1,.12434.31459.56716.56716,0,0,1-.04655.1915c-.05318.12739-.10286.25669-.16183.38156-.34118.71775-.68754,1.43273-1.02568,2.152A2.00213,2.00213,0,0,0,12.88816,14.44366Zm4.78568,5.28972a.88573.88573,0,0,0-1.77139.00465.8857.8857,0,0,0,1.77139-.00465Zm-14.83838-7.296a.84329.84329,0,1,0,.00827-1.68655.8433.8433,0,0,0-.00827,1.68655Zm10.366-9.43673a.83506.83506,0,1,0-.0091,1.67.83505.83505,0,0,0,.0091-1.67Zm6.85014,5.22a.71651.71651,0,0,0-1.433.0093.71656.71656,0,0,0,1.433-.0093ZM5.37528,6.17908A.63823.63823,0,1,0,6.015,5.54483.62292.62292,0,0,0,5.37528,6.17908Zm6.68214,14.80843a.54949.54949,0,1,0-.55052.541A.54556.54556,0,0,0,12.05742,20.98752Zm8.53235-8.49689a.54777.54777,0,0,0-.54027.54023.53327.53327,0,0,0,.532.52293.51548.51548,0,0,0,.53272-.5237A.53187.53187,0,0,0,20.58977,12.49063ZM7.82846,2.4715a.44927.44927,0,1,0,.44484.44766A.43821.43821,0,0,0,7.82846,2.4715Zm13.775,7.60492a.41186.41186,0,0,0-.40065.39623.40178.40178,0,0,0,.40168.40168A.38994.38994,0,0,0,22,10.48172.39946.39946,0,0,0,21.60349,10.07642ZM5.79193,17.96207a.40469.40469,0,0,0-.397-.39646.399.399,0,0,0-.396.405.39234.39234,0,0,0,.39939.389A.39857.39857,0,0,0,5.79193,17.96207Z" }) });
48864 +
48865 +
48866 + ;// ./node_modules/@wordpress/block-library/build-module/social-link/icons/medium.js
48867 +
48868 +
48869 + const MediumIcon = () => /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { width: "24", height: "24", viewBox: "0 0 24 24", version: "1.1", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M13.2,12c0,3-2.4,5.4-5.3,5.4S2.6,15,2.6,12s2.4-5.4,5.3-5.4S13.2,9,13.2,12 M19.1,12c0,2.8-1.2,5-2.7,5s-2.7-2.3-2.7-5s1.2-5,2.7-5C17.9,7,19.1,9.2,19.1,12 M21.4,12c0,2.5-0.4,4.5-0.9,4.5c-0.5,0-0.9-2-0.9-4.5s0.4-4.5,0.9-4.5C21,7.5,21.4,9.5,21.4,12" }) });
48870 +
48871 +
48872 + ;// ./node_modules/@wordpress/block-library/build-module/social-link/icons/patreon.js
48873 +
48874 +
48875 + const PatreonIcon = () => /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { width: "24", height: "24", viewBox: "0 0 24 24", version: "1.1", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M20 8.40755C19.9969 6.10922 18.2543 4.22555 16.2097 3.54588C13.6708 2.70188 10.3222 2.82421 7.89775 3.99921C4.95932 5.42355 4.03626 8.54355 4.00186 11.6552C3.97363 14.2136 4.2222 20.9517 7.92225 20.9997C10.6715 21.0356 11.0809 17.3967 12.3529 15.6442C13.258 14.3974 14.4233 14.0452 15.8578 13.6806C18.3233 13.0537 20.0036 11.0551 20 8.40755Z" }) });
48876 +
48877 +
48878 + ;// ./node_modules/@wordpress/block-library/build-module/social-link/icons/pinterest.js
48879 +
48880 +
48881 + const PinterestIcon = () => /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { width: "24", height: "24", viewBox: "0 0 24 24", version: "1.1", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M12.289,2C6.617,2,3.606,5.648,3.606,9.622c0,1.846,1.025,4.146,2.666,4.878c0.25,0.111,0.381,0.063,0.439-0.169 c0.044-0.175,0.267-1.029,0.365-1.428c0.032-0.128,0.017-0.237-0.091-0.362C6.445,11.911,6.01,10.75,6.01,9.668 c0-2.777,2.194-5.464,5.933-5.464c3.23,0,5.49,2.108,5.49,5.122c0,3.407-1.794,5.768-4.13,5.768c-1.291,0-2.257-1.021-1.948-2.277 c0.372-1.495,1.089-3.112,1.089-4.191c0-0.967-0.542-1.775-1.663-1.775c-1.319,0-2.379,1.309-2.379,3.059 c0,1.115,0.394,1.869,0.394,1.869s-1.302,5.279-1.54,6.261c-0.405,1.666,0.053,4.368,0.094,4.604 c0.021,0.126,0.167,0.169,0.25,0.063c0.129-0.165,1.699-2.419,2.142-4.051c0.158-0.59,0.817-2.995,0.817-2.995 c0.43,0.784,1.681,1.446,3.013,1.446c3.963,0,6.822-3.494,6.822-7.833C20.394,5.112,16.849,2,12.289,2" }) });
48882 +
48883 +
48884 + ;// ./node_modules/@wordpress/block-library/build-module/social-link/icons/pocket.js
48885 +
48886 +
48887 + const PocketIcon = () => /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { width: "24", height: "24", viewBox: "0 0 24 24", version: "1.1", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M21.927,4.194C21.667,3.48,20.982,3,20.222,3h-0.01h-1.721H3.839C3.092,3,2.411,3.47,2.145,4.17 C2.066,4.378,2.026,4.594,2.026,4.814v6.035l0.069,1.2c0.29,2.73,1.707,5.115,3.899,6.778c0.039,0.03,0.079,0.059,0.119,0.089 l0.025,0.018c1.175,0.859,2.491,1.441,3.91,1.727c0.655,0.132,1.325,0.2,1.991,0.2c0.615,0,1.232-0.057,1.839-0.17 c0.073-0.014,0.145-0.028,0.219-0.044c0.02-0.004,0.042-0.012,0.064-0.023c1.359-0.297,2.621-0.864,3.753-1.691l0.025-0.018 c0.04-0.029,0.08-0.058,0.119-0.089c2.192-1.664,3.609-4.049,3.898-6.778l0.069-1.2V4.814C22.026,4.605,22,4.398,21.927,4.194z M17.692,10.481l-4.704,4.512c-0.266,0.254-0.608,0.382-0.949,0.382c-0.342,0-0.684-0.128-0.949-0.382l-4.705-4.512 C5.838,9.957,5.82,9.089,6.344,8.542c0.524-0.547,1.392-0.565,1.939-0.04l3.756,3.601l3.755-3.601 c0.547-0.524,1.415-0.506,1.939,0.04C18.256,9.089,18.238,9.956,17.692,10.481z" }) });
48888 +
48889 +
48890 + ;// ./node_modules/@wordpress/block-library/build-module/social-link/icons/reddit.js
48891 +
48892 +
48893 + const RedditIcon = () => /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { width: "24", height: "24", viewBox: "0 0 24 24", version: "1.1", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M5.27 9.221A2.775 2.775 0 0 0 2.498 11.993a2.785 2.785 0 0 0 1.6 2.511 5.337 5.337 0 0 0 2.374 4.11 9.386 9.386 0 0 0 5.539 1.7 9.386 9.386 0 0 0 5.541-1.7 5.331 5.331 0 0 0 2.372-4.114 2.787 2.787 0 0 0 1.583-2.5 2.775 2.775 0 0 0-2.772-2.772 2.742 2.742 0 0 0-1.688.574 9.482 9.482 0 0 0-4.637-1.348v-.008a2.349 2.349 0 0 1 2.011-2.316 1.97 1.97 0 0 0 1.926 1.521 1.98 1.98 0 0 0 1.978-1.978 1.98 1.98 0 0 0-1.978-1.978 1.985 1.985 0 0 0-1.938 1.578 3.183 3.183 0 0 0-2.849 3.172v.011a9.463 9.463 0 0 0-4.59 1.35 2.741 2.741 0 0 0-1.688-.574Zm6.736 9.1a3.162 3.162 0 0 1-2.921-1.944.215.215 0 0 1 .014-.2.219.219 0 0 1 .168-.106 27.327 27.327 0 0 1 2.74-.133 27.357 27.357 0 0 1 2.74.133.219.219 0 0 1 .168.106.215.215 0 0 1 .014.2 3.158 3.158 0 0 1-2.921 1.944Zm3.743-3.157a1.265 1.265 0 0 1-1.4-1.371 1.954 1.954 0 0 1 .482-1.442 1.15 1.15 0 0 1 .842-.379 1.7 1.7 0 0 1 1.49 1.777 1.323 1.323 0 0 1-.325 1.015 1.476 1.476 0 0 1-1.089.4Zm-7.485 0a1.476 1.476 0 0 1-1.086-.4 1.323 1.323 0 0 1-.325-1.016 1.7 1.7 0 0 1 1.49-1.777 1.151 1.151 0 0 1 .843.379 1.951 1.951 0 0 1 .481 1.441 1.276 1.276 0 0 1-1.403 1.373Z" }) });
48894 +
48895 +
48896 + ;// ./node_modules/@wordpress/block-library/build-module/social-link/icons/skype.js
48897 +
48898 +
48899 + const SkypeIcon = () => /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { width: "24", height: "24", viewBox: "0 0 24 24", version: "1.1", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M10.113,2.699c0.033-0.006,0.067-0.013,0.1-0.02c0.033,0.017,0.066,0.033,0.098,0.051L10.113,2.699z M2.72,10.223 c-0.006,0.034-0.011,0.069-0.017,0.103c0.018,0.032,0.033,0.064,0.051,0.095L2.72,10.223z M21.275,13.771 c0.007-0.035,0.011-0.071,0.018-0.106c-0.018-0.031-0.033-0.064-0.052-0.095L21.275,13.771z M13.563,21.199 c0.032,0.019,0.065,0.035,0.096,0.053c0.036-0.006,0.071-0.011,0.105-0.017L13.563,21.199z M22,16.386 c0,1.494-0.581,2.898-1.637,3.953c-1.056,1.057-2.459,1.637-3.953,1.637c-0.967,0-1.914-0.251-2.75-0.725 c0.036-0.006,0.071-0.011,0.105-0.017l-0.202-0.035c0.032,0.019,0.065,0.035,0.096,0.053c-0.543,0.096-1.099,0.147-1.654,0.147 c-1.275,0-2.512-0.25-3.676-0.743c-1.125-0.474-2.135-1.156-3.002-2.023c-0.867-0.867-1.548-1.877-2.023-3.002 c-0.493-1.164-0.743-2.401-0.743-3.676c0-0.546,0.049-1.093,0.142-1.628c0.018,0.032,0.033,0.064,0.051,0.095L2.72,10.223 c-0.006,0.034-0.011,0.069-0.017,0.103C2.244,9.5,2,8.566,2,7.615c0-1.493,0.582-2.898,1.637-3.953 c1.056-1.056,2.46-1.638,3.953-1.638c0.915,0,1.818,0.228,2.622,0.655c-0.033,0.007-0.067,0.013-0.1,0.02l0.199,0.031 c-0.032-0.018-0.066-0.034-0.098-0.051c0.002,0,0.003-0.001,0.004-0.001c0.586-0.112,1.187-0.169,1.788-0.169 c1.275,0,2.512,0.249,3.676,0.742c1.124,0.476,2.135,1.156,3.002,2.024c0.868,0.867,1.548,1.877,2.024,3.002 c0.493,1.164,0.743,2.401,0.743,3.676c0,0.575-0.054,1.15-0.157,1.712c-0.018-0.031-0.033-0.064-0.052-0.095l0.034,0.201 c0.007-0.035,0.011-0.071,0.018-0.106C21.754,14.494,22,15.432,22,16.386z M16.817,14.138c0-1.331-0.613-2.743-3.033-3.282 l-2.209-0.49c-0.84-0.192-1.807-0.444-1.807-1.237c0-0.794,0.679-1.348,1.903-1.348c2.468,0,2.243,1.696,3.468,1.696 c0.645,0,1.209-0.379,1.209-1.031c0-1.521-2.435-2.663-4.5-2.663c-2.242,0-4.63,0.952-4.63,3.488c0,1.221,0.436,2.521,2.839,3.123 l2.984,0.745c0.903,0.223,1.129,0.731,1.129,1.189c0,0.762-0.758,1.507-2.129,1.507c-2.679,0-2.307-2.062-3.743-2.062 c-0.645,0-1.113,0.444-1.113,1.078c0,1.236,1.501,2.886,4.856,2.886C15.236,17.737,16.817,16.199,16.817,14.138z" }) });
48900 +
48901 +
48902 + ;// ./node_modules/@wordpress/block-library/build-module/social-link/icons/snapchat.js
48903 +
48904 +
48905 + const SnapchatIcon = () => /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { width: "24", height: "24", viewBox: "0 0 24 24", version: "1.1", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M12.065,2a5.526,5.526,0,0,1,3.132.892A5.854,5.854,0,0,1,17.326,5.4a5.821,5.821,0,0,1,.351,2.33q0,.612-.117,2.487a.809.809,0,0,0,.365.091,1.93,1.93,0,0,0,.664-.176,1.93,1.93,0,0,1,.664-.176,1.3,1.3,0,0,1,.729.234.7.7,0,0,1,.351.6.839.839,0,0,1-.41.7,2.732,2.732,0,0,1-.9.41,3.192,3.192,0,0,0-.9.378.728.728,0,0,0-.41.618,1.575,1.575,0,0,0,.156.56,6.9,6.9,0,0,0,1.334,1.953,5.6,5.6,0,0,0,1.881,1.315,5.875,5.875,0,0,0,1.042.3.42.42,0,0,1,.365.456q0,.911-2.852,1.341a1.379,1.379,0,0,0-.143.507,1.8,1.8,0,0,1-.182.605.451.451,0,0,1-.429.241,5.878,5.878,0,0,1-.807-.085,5.917,5.917,0,0,0-.833-.085,4.217,4.217,0,0,0-.807.065,2.42,2.42,0,0,0-.82.293,6.682,6.682,0,0,0-.755.5q-.351.267-.755.527a3.886,3.886,0,0,1-.989.436A4.471,4.471,0,0,1,11.831,22a4.307,4.307,0,0,1-1.256-.176,3.784,3.784,0,0,1-.976-.436q-.4-.26-.749-.527a6.682,6.682,0,0,0-.755-.5,2.422,2.422,0,0,0-.807-.293,4.432,4.432,0,0,0-.82-.065,5.089,5.089,0,0,0-.853.1,5,5,0,0,1-.762.1.474.474,0,0,1-.456-.241,1.819,1.819,0,0,1-.182-.618,1.411,1.411,0,0,0-.143-.521q-2.852-.429-2.852-1.341a.42.42,0,0,1,.365-.456,5.793,5.793,0,0,0,1.042-.3,5.524,5.524,0,0,0,1.881-1.315,6.789,6.789,0,0,0,1.334-1.953A1.575,1.575,0,0,0,6,12.9a.728.728,0,0,0-.41-.618,3.323,3.323,0,0,0-.9-.384,2.912,2.912,0,0,1-.9-.41.814.814,0,0,1-.41-.684.71.71,0,0,1,.338-.593,1.208,1.208,0,0,1,.716-.241,1.976,1.976,0,0,1,.625.169,2.008,2.008,0,0,0,.69.169.919.919,0,0,0,.416-.091q-.117-1.849-.117-2.474A5.861,5.861,0,0,1,6.385,5.4,5.516,5.516,0,0,1,8.625,2.819,7.075,7.075,0,0,1,12.062,2Z" }) });
48906 +
48907 +
48908 + ;// ./node_modules/@wordpress/block-library/build-module/social-link/icons/soundcloud.js
48909 +
48910 +
48911 + const SoundCloudIcon = () => /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { width: "24", height: "24", viewBox: "0 0 24 24", version: "1.1", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M23.994 14.552a3.36 3.36 0 01-3.401 3.171h-8.176a.685.685 0 01-.679-.681V8.238a.749.749 0 01.452-.716S12.942 7 14.526 7a5.357 5.357 0 012.748.755 5.44 5.44 0 012.56 3.546c.282-.08.574-.12.868-.119a3.273 3.273 0 013.292 3.37zM10.718 8.795a.266.266 0 10-.528 0c-.224 2.96-.397 5.735 0 8.685a.265.265 0 00.528 0c.425-2.976.246-5.7 0-8.685zM9.066 9.82a.278.278 0 00-.553 0 33.183 33.183 0 000 7.663.278.278 0 00.55 0c.33-2.544.332-5.12.003-7.664zM7.406 9.56a.269.269 0 00-.535 0c-.253 2.7-.38 5.222 0 7.917a.266.266 0 10.531 0c.394-2.73.272-5.181.004-7.917zM5.754 10.331a.275.275 0 10-.55 0 28.035 28.035 0 000 7.155.272.272 0 00.54 0c.332-2.373.335-4.78.01-7.155zM4.087 12.12a.272.272 0 00-.544 0c-.393 1.843-.208 3.52.016 5.386a.26.26 0 00.512 0c.247-1.892.435-3.53.016-5.386zM2.433 11.838a.282.282 0 00-.56 0c-.349 1.882-.234 3.54.01 5.418.025.285.508.282.54 0 .269-1.907.394-3.517.01-5.418zM.762 12.76a.282.282 0 00-.56 0c-.32 1.264-.22 2.31.023 3.578a.262.262 0 00.521 0c.282-1.293.42-2.317.016-3.578z" }) });
48912 +
48913 +
48914 + ;// ./node_modules/@wordpress/block-library/build-module/social-link/icons/spotify.js
48915 +
48916 +
48917 + const SpotifyIcon = () => /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { width: "24", height: "24", viewBox: "0 0 24 24", version: "1.1", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M12,2C6.477,2,2,6.477,2,12c0,5.523,4.477,10,10,10c5.523,0,10-4.477,10-10C22,6.477,17.523,2,12,2 M16.586,16.424 c-0.18,0.295-0.563,0.387-0.857,0.207c-2.348-1.435-5.304-1.76-8.785-0.964c-0.335,0.077-0.67-0.133-0.746-0.469 c-0.077-0.335,0.132-0.67,0.469-0.746c3.809-0.871,7.077-0.496,9.713,1.115C16.673,15.746,16.766,16.13,16.586,16.424 M17.81,13.7 c-0.226,0.367-0.706,0.482-1.072,0.257c-2.687-1.652-6.785-2.131-9.965-1.166C6.36,12.917,5.925,12.684,5.8,12.273 C5.675,11.86,5.908,11.425,6.32,11.3c3.632-1.102,8.147-0.568,11.234,1.328C17.92,12.854,18.035,13.335,17.81,13.7 M17.915,10.865 c-3.223-1.914-8.54-2.09-11.618-1.156C5.804,9.859,5.281,9.58,5.131,9.086C4.982,8.591,5.26,8.069,5.755,7.919 c3.532-1.072,9.404-0.865,13.115,1.338c0.445,0.264,0.59,0.838,0.327,1.282C18.933,10.983,18.359,11.129,17.915,10.865" }) });
48918 +
48919 +
48920 + ;// ./node_modules/@wordpress/block-library/build-module/social-link/icons/telegram.js
48921 +
48922 +
48923 + const TelegramIcon = () => /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { width: "24", height: "24", viewBox: "0 0 128 128", version: "1.1", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M28.9700376,63.3244248 C47.6273373,55.1957357 60.0684594,49.8368063 66.2934036,47.2476366 C84.0668845,39.855031 87.7600616,38.5708563 90.1672227,38.528 C90.6966555,38.5191258 91.8804274,38.6503351 92.6472251,39.2725385 C93.294694,39.7979149 93.4728387,40.5076237 93.5580865,41.0057381 C93.6433345,41.5038525 93.7494885,42.63857 93.6651041,43.5252052 C92.7019529,53.6451182 88.5344133,78.2034783 86.4142057,89.5379542 C85.5170662,94.3339958 83.750571,95.9420841 82.0403991,96.0994568 C78.3237996,96.4414641 75.5015827,93.6432685 71.9018743,91.2836143 C66.2690414,87.5912212 63.0868492,85.2926952 57.6192095,81.6896017 C51.3004058,77.5256038 55.3966232,75.2369981 58.9976911,71.4967761 C59.9401076,70.5179421 76.3155302,55.6232293 76.6324771,54.2720454 C76.6721165,54.1030573 76.7089039,53.4731496 76.3346867,53.1405352 C75.9604695,52.8079208 75.4081573,52.921662 75.0095933,53.0121213 C74.444641,53.1403447 65.4461175,59.0880351 48.0140228,70.8551922 C45.4598218,72.6091037 43.1463059,73.4636682 41.0734751,73.4188859 C38.7883453,73.3695169 34.3926725,72.1268388 31.1249416,71.0646282 C27.1169366,69.7617838 23.931454,69.0729605 24.208838,66.8603276 C24.3533167,65.7078514 25.9403832,64.5292172 28.9700376,63.3244248 Z" }) });
48924 +
48925 +
48926 + ;// ./node_modules/@wordpress/block-library/build-module/social-link/icons/threads.js
48927 +
48928 +
48929 + const ThreadsIcon = () => /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { width: "24", height: "24", viewBox: "0 0 24 24", version: "1.1", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M16.3 11.3c-.1 0-.2-.1-.2-.1-.1-2.6-1.5-4-3.9-4-1.4 0-2.6.6-3.3 1.7l1.3.9c.5-.8 1.4-1 2-1 .8 0 1.4.2 1.7.7.3.3.5.8.5 1.3-.7-.1-1.4-.2-2.2-.1-2.2.1-3.7 1.4-3.6 3.2 0 .9.5 1.7 1.3 2.2.7.4 1.5.6 2.4.6 1.2-.1 2.1-.5 2.7-1.3.5-.6.8-1.4.9-2.4.6.3 1 .8 1.2 1.3.4.9.4 2.4-.8 3.6-1.1 1.1-2.3 1.5-4.3 1.5-2.1 0-3.8-.7-4.8-2S5.7 14.3 5.7 12c0-2.3.5-4.1 1.5-5.4 1.1-1.3 2.7-2 4.8-2 2.2 0 3.8.7 4.9 2 .5.7.9 1.5 1.2 2.5l1.5-.4c-.3-1.2-.8-2.2-1.5-3.1-1.3-1.7-3.3-2.6-6-2.6-2.6 0-4.7.9-6 2.6C4.9 7.2 4.3 9.3 4.3 12s.6 4.8 1.9 6.4c1.4 1.7 3.4 2.6 6 2.6 2.3 0 4-.6 5.3-2 1.8-1.8 1.7-4 1.1-5.4-.4-.9-1.2-1.7-2.3-2.3zm-4 3.8c-1 .1-2-.4-2-1.3 0-.7.5-1.5 2.1-1.6h.5c.6 0 1.1.1 1.6.2-.2 2.3-1.3 2.7-2.2 2.7z" }) });
48930 +
48931 +
48932 + ;// ./node_modules/@wordpress/block-library/build-module/social-link/icons/tiktok.js
48933 +
48934 +
48935 + const TiktokIcon = () => /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { width: "24", height: "24", viewBox: "0 0 24 24", version: "1.1", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M12.4044 3.01519C13.4086 3 14.4072 3.009 15.4045 3C15.465 4.14812 15.8874 5.31762 16.7472 6.12935C17.6053 6.96134 18.819 7.34217 20 7.47099V10.4912C18.8933 10.4558 17.7814 10.2308 16.7771 9.76499C16.3397 9.57148 15.9323 9.32227 15.5334 9.06745C15.5283 11.2591 15.5426 13.4479 15.5191 15.6305C15.4592 16.679 15.1053 17.7225 14.4814 18.5866C13.4777 20.025 11.7356 20.9627 9.94635 20.992C8.84885 21.0533 7.7525 20.7608 6.81729 20.2219C5.26743 19.3286 4.17683 17.6933 4.01799 15.9382C3.99957 15.563 3.99324 15.1883 4.00878 14.8221C4.14691 13.395 4.86917 12.0297 5.99027 11.101C7.26101 10.0192 9.04107 9.50397 10.7078 9.80886C10.7233 10.9199 10.6778 12.0297 10.6778 13.1407C9.91643 12.9 9.02668 12.9675 8.36139 13.4192C7.87566 13.7269 7.50675 14.1983 7.31453 14.7316C7.15569 15.1118 7.20116 15.5343 7.21036 15.9382C7.3928 17.169 8.60368 18.2035 9.89628 18.0916C10.7532 18.0826 11.5745 17.5965 12.0211 16.8849C12.1655 16.6357 12.3273 16.3809 12.3359 16.0878C12.4113 14.7462 12.3814 13.4102 12.3906 12.0685C12.3969 9.04495 12.3814 6.02979 12.4049 3.01575L12.4044 3.01519Z" }) });
48936 +
48937 +
48938 + ;// ./node_modules/@wordpress/block-library/build-module/social-link/icons/tumblr.js
48939 +
48940 +
48941 + const TumblrIcon = () => /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { width: "24", height: "24", viewBox: "0 0 24 24", version: "1.1", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M17.04 21.28h-3.28c-2.84 0-4.94-1.37-4.94-5.02v-5.67H6.08V7.5c2.93-.73 4.11-3.3 4.3-5.48h3.01v4.93h3.47v3.65H13.4v4.93c0 1.47.73 2.01 1.92 2.01h1.73v3.75z" }) });
48942 +
48943 +
48944 + ;// ./node_modules/@wordpress/block-library/build-module/social-link/icons/twitch.js
48945 +
48946 +
48947 + const TwitchIcon = () => /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { width: "24", height: "24", viewBox: "0 0 24 24", version: "1.1", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M16.499,8.089h-1.636v4.91h1.636V8.089z M12,8.089h-1.637v4.91H12V8.089z M4.228,3.178L3,6.451v13.092h4.499V22h2.456 l2.454-2.456h3.681L21,14.636V3.178H4.228z M19.364,13.816l-2.864,2.865H12l-2.453,2.453V16.68H5.863V4.814h13.501V13.816z" }) });
48948 +
48949 +
48950 + ;// ./node_modules/@wordpress/block-library/build-module/social-link/icons/twitter.js
48951 +
48952 +
48953 + const TwitterIcon = () => /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { width: "24", height: "24", viewBox: "0 0 24 24", version: "1.1", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M22.23,5.924c-0.736,0.326-1.527,0.547-2.357,0.646c0.847-0.508,1.498-1.312,1.804-2.27 c-0.793,0.47-1.671,0.812-2.606,0.996C18.324,4.498,17.257,4,16.077,4c-2.266,0-4.103,1.837-4.103,4.103 c0,0.322,0.036,0.635,0.106,0.935C8.67,8.867,5.647,7.234,3.623,4.751C3.27,5.357,3.067,6.062,3.067,6.814 c0,1.424,0.724,2.679,1.825,3.415c-0.673-0.021-1.305-0.206-1.859-0.513c0,0.017,0,0.034,0,0.052c0,1.988,1.414,3.647,3.292,4.023 c-0.344,0.094-0.707,0.144-1.081,0.144c-0.264,0-0.521-0.026-0.772-0.074c0.522,1.63,2.038,2.816,3.833,2.85 c-1.404,1.1-3.174,1.756-5.096,1.756c-0.331,0-0.658-0.019-0.979-0.057c1.816,1.164,3.973,1.843,6.29,1.843 c7.547,0,11.675-6.252,11.675-11.675c0-0.178-0.004-0.355-0.012-0.531C20.985,7.47,21.68,6.747,22.23,5.924z" }) });
48954 +
48955 +
48956 + ;// ./node_modules/@wordpress/block-library/build-module/social-link/icons/vimeo.js
48957 +
48958 +
48959 + const VimeoIcon = () => /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { width: "24", height: "24", viewBox: "0 0 24 24", version: "1.1", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M22.396,7.164c-0.093,2.026-1.507,4.799-4.245,8.32C15.322,19.161,12.928,21,10.97,21c-1.214,0-2.24-1.119-3.079-3.359 c-0.56-2.053-1.119-4.106-1.68-6.159C5.588,9.243,4.921,8.122,4.206,8.122c-0.156,0-0.701,0.328-1.634,0.98L1.594,7.841 c1.027-0.902,2.04-1.805,3.037-2.708C6.001,3.95,7.03,3.327,7.715,3.264c1.619-0.156,2.616,0.951,2.99,3.321 c0.404,2.557,0.685,4.147,0.841,4.769c0.467,2.121,0.981,3.181,1.542,3.181c0.435,0,1.09-0.688,1.963-2.065 c0.871-1.376,1.338-2.422,1.401-3.142c0.125-1.187-0.343-1.782-1.401-1.782c-0.498,0-1.012,0.115-1.541,0.341 c1.023-3.35,2.977-4.977,5.862-4.884C21.511,3.066,22.52,4.453,22.396,7.164z" }) });
48960 +
48961 +
48962 + ;// ./node_modules/@wordpress/block-library/build-module/social-link/icons/vk.js
48963 +
48964 +
48965 + const VkIcon = () => /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { width: "24", height: "24", viewBox: "0 0 24 24", version: "1.1", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M22,7.1c0.2,0.4-0.4,1.5-1.6,3.1c-0.2,0.2-0.4,0.5-0.7,0.9c-0.5,0.7-0.9,1.1-0.9,1.4c-0.1,0.3-0.1,0.6,0.1,0.8 c0.1,0.1,0.4,0.4,0.8,0.9h0l0,0c1,0.9,1.6,1.7,2,2.3c0,0,0,0.1,0.1,0.1c0,0.1,0,0.1,0.1,0.3c0,0.1,0,0.2,0,0.4 c0,0.1-0.1,0.2-0.3,0.3c-0.1,0.1-0.4,0.1-0.6,0.1l-2.7,0c-0.2,0-0.4,0-0.6-0.1c-0.2-0.1-0.4-0.1-0.5-0.2l-0.2-0.1 c-0.2-0.1-0.5-0.4-0.7-0.7s-0.5-0.6-0.7-0.8c-0.2-0.2-0.4-0.4-0.6-0.6C14.8,15,14.6,15,14.4,15c0,0,0,0-0.1,0c0,0-0.1,0.1-0.2,0.2 c-0.1,0.1-0.2,0.2-0.2,0.3c-0.1,0.1-0.1,0.3-0.2,0.5c-0.1,0.2-0.1,0.5-0.1,0.8c0,0.1,0,0.2,0,0.3c0,0.1-0.1,0.2-0.1,0.2l0,0.1 c-0.1,0.1-0.3,0.2-0.6,0.2h-1.2c-0.5,0-1,0-1.5-0.2c-0.5-0.1-1-0.3-1.4-0.6s-0.7-0.5-1.1-0.7s-0.6-0.4-0.7-0.6l-0.3-0.3 c-0.1-0.1-0.2-0.2-0.3-0.3s-0.4-0.5-0.7-0.9s-0.7-1-1.1-1.6c-0.4-0.6-0.8-1.3-1.3-2.2C2.9,9.4,2.5,8.5,2.1,7.5C2,7.4,2,7.3,2,7.2 c0-0.1,0-0.1,0-0.2l0-0.1c0.1-0.1,0.3-0.2,0.6-0.2l2.9,0c0.1,0,0.2,0,0.2,0.1S5.9,6.9,5.9,7L6,7c0.1,0.1,0.2,0.2,0.3,0.3 C6.4,7.7,6.5,8,6.7,8.4C6.9,8.8,7,9,7.1,9.2l0.2,0.3c0.2,0.4,0.4,0.8,0.6,1.1c0.2,0.3,0.4,0.5,0.5,0.7s0.3,0.3,0.4,0.4 c0.1,0.1,0.3,0.1,0.4,0.1c0.1,0,0.2,0,0.3-0.1c0,0,0,0,0.1-0.1c0,0,0.1-0.1,0.1-0.2c0.1-0.1,0.1-0.3,0.1-0.5c0-0.2,0.1-0.5,0.1-0.8 c0-0.4,0-0.8,0-1.3c0-0.3,0-0.5-0.1-0.8c0-0.2-0.1-0.4-0.1-0.5L9.6,7.6C9.4,7.3,9.1,7.2,8.7,7.1C8.6,7.1,8.6,7,8.7,6.9 C8.9,6.7,9,6.6,9.1,6.5c0.4-0.2,1.2-0.3,2.5-0.3c0.6,0,1,0.1,1.4,0.1c0.1,0,0.3,0.1,0.3,0.1c0.1,0.1,0.2,0.1,0.2,0.3 c0,0.1,0.1,0.2,0.1,0.3s0,0.3,0,0.5c0,0.2,0,0.4,0,0.6c0,0.2,0,0.4,0,0.7c0,0.3,0,0.6,0,0.9c0,0.1,0,0.2,0,0.4c0,0.2,0,0.4,0,0.5 c0,0.1,0,0.3,0,0.4s0.1,0.3,0.1,0.4c0.1,0.1,0.1,0.2,0.2,0.3c0.1,0,0.1,0,0.2,0c0.1,0,0.2,0,0.3-0.1c0.1-0.1,0.2-0.2,0.4-0.4 s0.3-0.4,0.5-0.7c0.2-0.3,0.5-0.7,0.7-1.1c0.4-0.7,0.8-1.5,1.1-2.3c0-0.1,0.1-0.1,0.1-0.2c0-0.1,0.1-0.1,0.1-0.1l0,0l0.1,0 c0,0,0,0,0.1,0s0.2,0,0.2,0l3,0c0.3,0,0.5,0,0.7,0S21.9,7,21.9,7L22,7.1z" }) });
48966 +
48967 +
48968 + ;// ./node_modules/@wordpress/block-library/build-module/social-link/icons/whatsapp.js
48969 +
48970 +
48971 + const WhatsAppIcon = () => /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { width: "24", height: "24", viewBox: "0 0 24 24", version: "1.1", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M 12.011719 2 C 6.5057187 2 2.0234844 6.478375 2.0214844 11.984375 C 2.0204844 13.744375 2.4814687 15.462563 3.3554688 16.976562 L 2 22 L 7.2324219 20.763672 C 8.6914219 21.559672 10.333859 21.977516 12.005859 21.978516 L 12.009766 21.978516 C 17.514766 21.978516 21.995047 17.499141 21.998047 11.994141 C 22.000047 9.3251406 20.962172 6.8157344 19.076172 4.9277344 C 17.190172 3.0407344 14.683719 2.001 12.011719 2 z M 12.009766 4 C 14.145766 4.001 16.153109 4.8337969 17.662109 6.3417969 C 19.171109 7.8517969 20.000047 9.8581875 19.998047 11.992188 C 19.996047 16.396187 16.413812 19.978516 12.007812 19.978516 C 10.674812 19.977516 9.3544062 19.642812 8.1914062 19.007812 L 7.5175781 18.640625 L 6.7734375 18.816406 L 4.8046875 19.28125 L 5.2851562 17.496094 L 5.5019531 16.695312 L 5.0878906 15.976562 C 4.3898906 14.768562 4.0204844 13.387375 4.0214844 11.984375 C 4.0234844 7.582375 7.6067656 4 12.009766 4 z M 8.4765625 7.375 C 8.3095625 7.375 8.0395469 7.4375 7.8105469 7.6875 C 7.5815469 7.9365 6.9355469 8.5395781 6.9355469 9.7675781 C 6.9355469 10.995578 7.8300781 12.182609 7.9550781 12.349609 C 8.0790781 12.515609 9.68175 15.115234 12.21875 16.115234 C 14.32675 16.946234 14.754891 16.782234 15.212891 16.740234 C 15.670891 16.699234 16.690438 16.137687 16.898438 15.554688 C 17.106437 14.971687 17.106922 14.470187 17.044922 14.367188 C 16.982922 14.263188 16.816406 14.201172 16.566406 14.076172 C 16.317406 13.951172 15.090328 13.348625 14.861328 13.265625 C 14.632328 13.182625 14.464828 13.140625 14.298828 13.390625 C 14.132828 13.640625 13.655766 14.201187 13.509766 14.367188 C 13.363766 14.534188 13.21875 14.556641 12.96875 14.431641 C 12.71875 14.305641 11.914938 14.041406 10.960938 13.191406 C 10.218937 12.530406 9.7182656 11.714844 9.5722656 11.464844 C 9.4272656 11.215844 9.5585938 11.079078 9.6835938 10.955078 C 9.7955938 10.843078 9.9316406 10.663578 10.056641 10.517578 C 10.180641 10.371578 10.223641 10.267562 10.306641 10.101562 C 10.389641 9.9355625 10.347156 9.7890625 10.285156 9.6640625 C 10.223156 9.5390625 9.737625 8.3065 9.515625 7.8125 C 9.328625 7.3975 9.131125 7.3878594 8.953125 7.3808594 C 8.808125 7.3748594 8.6425625 7.375 8.4765625 7.375 z" }) });
48972 +
48973 +
48974 + ;// ./node_modules/@wordpress/block-library/build-module/social-link/icons/x.js
48975 +
48976 +
48977 + const XIcon = () => /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { width: "24", height: "24", viewBox: "0 0 24 24", version: "1.1", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M13.982 10.622 20.54 3h-1.554l-5.693 6.618L8.745 3H3.5l6.876 10.007L3.5 21h1.554l6.012-6.989L15.868 21h5.245l-7.131-10.378Zm-2.128 2.474-.697-.997-5.543-7.93H8l4.474 6.4.697.996 5.815 8.318h-2.387l-4.745-6.787Z" }) });
48978 +
48979 +
48980 + ;// ./node_modules/@wordpress/block-library/build-module/social-link/icons/yelp.js
48981 +
48982 +
48983 + const YelpIcon = () => /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { width: "24", height: "24", viewBox: "0 0 24 24", version: "1.1", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M12.271,16.718v1.417q-.011,3.257-.067,3.4a.707.707,0,0,1-.569.446,4.637,4.637,0,0,1-2.024-.424A4.609,4.609,0,0,1,7.8,20.565a.844.844,0,0,1-.19-.4.692.692,0,0,1,.044-.29,3.181,3.181,0,0,1,.379-.524q.335-.412,2.019-2.409.011,0,.669-.781a.757.757,0,0,1,.44-.274.965.965,0,0,1,.552.039.945.945,0,0,1,.418.324.732.732,0,0,1,.139.468Zm-1.662-2.8a.783.783,0,0,1-.58.781l-1.339.435q-3.067.981-3.257.981a.711.711,0,0,1-.6-.4,2.636,2.636,0,0,1-.19-.836,9.134,9.134,0,0,1,.011-1.857,3.559,3.559,0,0,1,.335-1.389.659.659,0,0,1,.625-.357,22.629,22.629,0,0,1,2.253.859q.781.324,1.283.524l.937.379a.771.771,0,0,1,.4.34A.982.982,0,0,1,10.609,13.917Zm9.213,3.313a4.467,4.467,0,0,1-1.021,1.8,4.559,4.559,0,0,1-1.512,1.417.671.671,0,0,1-.7-.078q-.156-.112-2.052-3.2l-.524-.859a.761.761,0,0,1-.128-.513.957.957,0,0,1,.217-.513.774.774,0,0,1,.926-.29q.011.011,1.327.446,2.264.736,2.7.887a2.082,2.082,0,0,1,.524.229.673.673,0,0,1,.245.68Zm-7.5-7.049q.056,1.137-.6,1.361-.647.19-1.272-.792L6.237,4.08a.7.7,0,0,1,.212-.691,5.788,5.788,0,0,1,2.314-1,5.928,5.928,0,0,1,2.5-.352.681.681,0,0,1,.547.5q.034.2.245,3.407T12.327,10.181Zm7.384,1.2a.679.679,0,0,1-.29.658q-.167.112-3.67.959-.747.167-1.015.257l.011-.022a.769.769,0,0,1-.513-.044.914.914,0,0,1-.413-.357.786.786,0,0,1,0-.971q.011-.011.836-1.137,1.394-1.908,1.673-2.275a2.423,2.423,0,0,1,.379-.435A.7.7,0,0,1,17.435,8a4.482,4.482,0,0,1,1.372,1.489,4.81,4.81,0,0,1,.9,1.868v.034Z" }) });
48984 +
48985 +
48986 + ;// ./node_modules/@wordpress/block-library/build-module/social-link/icons/youtube.js
48987 +
48988 +
48989 + const YouTubeIcon = () => /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { width: "24", height: "24", viewBox: "0 0 24 24", version: "1.1", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M21.8,8.001c0,0-0.195-1.378-0.795-1.985c-0.76-0.797-1.613-0.801-2.004-0.847c-2.799-0.202-6.997-0.202-6.997-0.202 h-0.009c0,0-4.198,0-6.997,0.202C4.608,5.216,3.756,5.22,2.995,6.016C2.395,6.623,2.2,8.001,2.2,8.001S2,9.62,2,11.238v1.517 c0,1.618,0.2,3.237,0.2,3.237s0.195,1.378,0.795,1.985c0.761,0.797,1.76,0.771,2.205,0.855c1.6,0.153,6.8,0.201,6.8,0.201 s4.203-0.006,7.001-0.209c0.391-0.047,1.243-0.051,2.004-0.847c0.6-0.607,0.795-1.985,0.795-1.985s0.2-1.618,0.2-3.237v-1.517 C22,9.62,21.8,8.001,21.8,8.001z M9.935,14.594l-0.001-5.62l5.404,2.82L9.935,14.594z" }) });
48990 +
48991 +
48992 + ;// ./node_modules/@wordpress/block-library/build-module/social-link/variations.js
48993 +
48994 +
48995 + const social_link_variations_variations = [
48996 + {
48997 + isDefault: true,
48998 + name: "wordpress",
48999 + attributes: { service: "wordpress" },
49000 + title: (0,external_wp_i18n_namespaceObject._x)("WordPress", "social link block variation name"),
49001 + icon: WordPressIcon
49002 + },
49003 + {
49004 + name: "fivehundredpx",
49005 + attributes: { service: "fivehundredpx" },
49006 + title: (0,external_wp_i18n_namespaceObject._x)("500px", "social link block variation name"),
49007 + icon: FivehundredpxIcon
49008 + },
49009 + {
49010 + name: "amazon",
49011 + attributes: { service: "amazon" },
49012 + title: (0,external_wp_i18n_namespaceObject._x)("Amazon", "social link block variation name"),
49013 + icon: AmazonIcon
49014 + },
49015 + {
49016 + name: "bandcamp",
49017 + attributes: { service: "bandcamp" },
49018 + title: (0,external_wp_i18n_namespaceObject._x)("Bandcamp", "social link block variation name"),
49019 + icon: BandcampIcon
49020 + },
49021 + {
49022 + name: "behance",
49023 + attributes: { service: "behance" },
49024 + title: (0,external_wp_i18n_namespaceObject._x)("Behance", "social link block variation name"),
49025 + icon: BehanceIcon
49026 + },
49027 + {
49028 + name: "bluesky",
49029 + attributes: { service: "bluesky" },
49030 + title: (0,external_wp_i18n_namespaceObject._x)("Bluesky", "social link block variation name"),
49031 + icon: BlueskyIcon
49032 + },
49033 + {
49034 + name: "chain",
49035 + attributes: { service: "chain" },
49036 + title: (0,external_wp_i18n_namespaceObject._x)("Link", "social link block variation name"),
49037 + icon: ChainIcon
49038 + },
49039 + {
49040 + name: "codepen",
49041 + attributes: { service: "codepen" },
49042 + title: (0,external_wp_i18n_namespaceObject._x)("CodePen", "social link block variation name"),
49043 + icon: CodepenIcon
49044 + },
49045 + {
49046 + name: "deviantart",
49047 + attributes: { service: "deviantart" },
49048 + title: (0,external_wp_i18n_namespaceObject._x)("DeviantArt", "social link block variation name"),
49049 + icon: DeviantArtIcon
49050 + },
49051 + {
49052 + name: "discord",
49053 + attributes: { service: "discord" },
49054 + title: (0,external_wp_i18n_namespaceObject._x)("Discord", "social link block variation name"),
49055 + icon: DiscordIcon
49056 + },
49057 + {
49058 + name: "dribbble",
49059 + attributes: { service: "dribbble" },
49060 + title: (0,external_wp_i18n_namespaceObject._x)("Dribbble", "social link block variation name"),
49061 + icon: DribbbleIcon
49062 + },
49063 + {
49064 + name: "dropbox",
49065 + attributes: { service: "dropbox" },
49066 + title: (0,external_wp_i18n_namespaceObject._x)("Dropbox", "social link block variation name"),
49067 + icon: DropboxIcon
49068 + },
49069 + {
49070 + name: "etsy",
49071 + attributes: { service: "etsy" },
49072 + title: (0,external_wp_i18n_namespaceObject._x)("Etsy", "social link block variation name"),
49073 + icon: EtsyIcon
49074 + },
49075 + {
49076 + name: "facebook",
49077 + attributes: { service: "facebook" },
49078 + title: (0,external_wp_i18n_namespaceObject._x)("Facebook", "social link block variation name"),
49079 + icon: FacebookIcon
49080 + },
49081 + {
49082 + name: "feed",
49083 + attributes: { service: "feed" },
49084 + title: (0,external_wp_i18n_namespaceObject._x)("RSS Feed", "social link block variation name"),
49085 + icon: FeedIcon
49086 + },
49087 + {
49088 + name: "flickr",
49089 + attributes: { service: "flickr" },
49090 + title: (0,external_wp_i18n_namespaceObject._x)("Flickr", "social link block variation name"),
49091 + icon: FlickrIcon
49092 + },
49093 + {
49094 + name: "foursquare",
49095 + attributes: { service: "foursquare" },
49096 + title: (0,external_wp_i18n_namespaceObject._x)("Foursquare", "social link block variation name"),
49097 + icon: FoursquareIcon
49098 + },
49099 + {
49100 + name: "goodreads",
49101 + attributes: { service: "goodreads" },
49102 + title: (0,external_wp_i18n_namespaceObject._x)("Goodreads", "social link block variation name"),
49103 + icon: GoodreadsIcon
49104 + },
49105 + {
49106 + name: "google",
49107 + attributes: { service: "google" },
49108 + title: (0,external_wp_i18n_namespaceObject._x)("Google", "social link block variation name"),
49109 + icon: GoogleIcon
49110 + },
49111 + {
49112 + name: "github",
49113 + attributes: { service: "github" },
49114 + title: (0,external_wp_i18n_namespaceObject._x)("GitHub", "social link block variation name"),
49115 + icon: GitHubIcon
49116 + },
49117 + {
49118 + name: "gravatar",
49119 + attributes: { service: "gravatar" },
49120 + title: (0,external_wp_i18n_namespaceObject._x)("Gravatar", "social link block variation name"),
49121 + icon: GravatarIcon
49122 + },
49123 + {
49124 + name: "instagram",
49125 + attributes: { service: "instagram" },
49126 + title: (0,external_wp_i18n_namespaceObject._x)("Instagram", "social link block variation name"),
49127 + icon: InstagramIcon
49128 + },
49129 + {
49130 + name: "lastfm",
49131 + attributes: { service: "lastfm" },
49132 + title: (0,external_wp_i18n_namespaceObject._x)("Last.fm", "social link block variation name"),
49133 + icon: LastfmIcon
49134 + },
49135 + {
49136 + name: "linkedin",
49137 + attributes: { service: "linkedin" },
49138 + title: (0,external_wp_i18n_namespaceObject._x)("LinkedIn", "social link block variation name"),
49139 + icon: LinkedInIcon
49140 + },
49141 + {
49142 + name: "mail",
49143 + attributes: { service: "mail" },
49144 + title: (0,external_wp_i18n_namespaceObject._x)("Mail", "social link block variation name"),
49145 + keywords: ["email", "e-mail"],
49146 + icon: MailIcon
49147 + },
49148 + {
49149 + name: "mastodon",
49150 + attributes: { service: "mastodon" },
49151 + title: (0,external_wp_i18n_namespaceObject._x)("Mastodon", "social link block variation name"),
49152 + icon: MastodonIcon
49153 + },
49154 + {
49155 + name: "meetup",
49156 + attributes: { service: "meetup" },
49157 + title: (0,external_wp_i18n_namespaceObject._x)("Meetup", "social link block variation name"),
49158 + icon: MeetupIcon
49159 + },
49160 + {
49161 + name: "medium",
49162 + attributes: { service: "medium" },
49163 + title: (0,external_wp_i18n_namespaceObject._x)("Medium", "social link block variation name"),
49164 + icon: MediumIcon
49165 + },
49166 + {
49167 + name: "patreon",
49168 + attributes: { service: "patreon" },
49169 + title: (0,external_wp_i18n_namespaceObject._x)("Patreon", "social link block variation name"),
49170 + icon: PatreonIcon
49171 + },
49172 + {
49173 + name: "pinterest",
49174 + attributes: { service: "pinterest" },
49175 + title: (0,external_wp_i18n_namespaceObject._x)("Pinterest", "social link block variation name"),
49176 + icon: PinterestIcon
49177 + },
49178 + {
49179 + name: "pocket",
49180 + attributes: { service: "pocket" },
49181 + title: (0,external_wp_i18n_namespaceObject._x)("Pocket", "social link block variation name"),
49182 + icon: PocketIcon
49183 + },
49184 + {
49185 + name: "reddit",
49186 + attributes: { service: "reddit" },
49187 + title: (0,external_wp_i18n_namespaceObject._x)("Reddit", "social link block variation name"),
49188 + icon: RedditIcon
49189 + },
49190 + {
49191 + name: "skype",
49192 + attributes: { service: "skype" },
49193 + title: (0,external_wp_i18n_namespaceObject._x)("Skype", "social link block variation name"),
49194 + icon: SkypeIcon,
49195 + // Deprecated: Skype service is no longer available.
49196 + scope: []
49197 + },
49198 + {
49199 + name: "snapchat",
49200 + attributes: { service: "snapchat" },
49201 + title: (0,external_wp_i18n_namespaceObject._x)("Snapchat", "social link block variation name"),
49202 + icon: SnapchatIcon
49203 + },
49204 + {
49205 + name: "soundcloud",
49206 + attributes: { service: "soundcloud" },
49207 + title: (0,external_wp_i18n_namespaceObject._x)("SoundCloud", "social link block variation name"),
49208 + icon: SoundCloudIcon
49209 + },
49210 + {
49211 + name: "spotify",
49212 + attributes: { service: "spotify" },
49213 + title: (0,external_wp_i18n_namespaceObject._x)("Spotify", "social link block variation name"),
49214 + icon: SpotifyIcon
49215 + },
49216 + {
49217 + name: "telegram",
49218 + attributes: { service: "telegram" },
49219 + title: (0,external_wp_i18n_namespaceObject._x)("Telegram", "social link block variation name"),
49220 + icon: TelegramIcon
49221 + },
49222 + {
49223 + name: "threads",
49224 + attributes: { service: "threads" },
49225 + title: (0,external_wp_i18n_namespaceObject._x)("Threads", "social link block variation name"),
49226 + icon: ThreadsIcon
49227 + },
49228 + {
49229 + name: "tiktok",
49230 + attributes: { service: "tiktok" },
49231 + title: (0,external_wp_i18n_namespaceObject._x)("TikTok", "social link block variation name"),
49232 + icon: TiktokIcon
49233 + },
49234 + {
49235 + name: "tumblr",
49236 + attributes: { service: "tumblr" },
49237 + title: (0,external_wp_i18n_namespaceObject._x)("Tumblr", "social link block variation name"),
49238 + icon: TumblrIcon
49239 + },
49240 + {
49241 + name: "twitch",
49242 + attributes: { service: "twitch" },
49243 + title: (0,external_wp_i18n_namespaceObject._x)("Twitch", "social link block variation name"),
49244 + icon: TwitchIcon
49245 + },
49246 + {
49247 + name: "twitter",
49248 + attributes: { service: "twitter" },
49249 + title: (0,external_wp_i18n_namespaceObject._x)("Twitter", "social link block variation name"),
49250 + icon: TwitterIcon
49251 + },
49252 + {
49253 + name: "vimeo",
49254 + attributes: { service: "vimeo" },
49255 + title: (0,external_wp_i18n_namespaceObject._x)("Vimeo", "social link block variation name"),
49256 + icon: VimeoIcon
49257 + },
49258 + {
49259 + name: "vk",
49260 + attributes: { service: "vk" },
49261 + title: (0,external_wp_i18n_namespaceObject._x)("VK", "social link block variation name"),
49262 + icon: VkIcon
49263 + },
49264 + {
49265 + name: "whatsapp",
49266 + attributes: { service: "whatsapp" },
49267 + title: (0,external_wp_i18n_namespaceObject._x)("WhatsApp", "social link block variation name"),
49268 + icon: WhatsAppIcon
49269 + },
49270 + {
49271 + name: "x",
49272 + attributes: { service: "x" },
49273 + keywords: ["twitter"],
49274 + title: (0,external_wp_i18n_namespaceObject._x)("X", "social link block variation name"),
49275 + icon: XIcon
49276 + },
49277 + {
49278 + name: "yelp",
49279 + attributes: { service: "yelp" },
49280 + title: (0,external_wp_i18n_namespaceObject._x)("Yelp", "social link block variation name"),
49281 + icon: YelpIcon
49282 + },
49283 + {
49284 + name: "youtube",
49285 + attributes: { service: "youtube" },
49286 + title: (0,external_wp_i18n_namespaceObject._x)("YouTube", "social link block variation name"),
49287 + icon: YouTubeIcon
49288 + }
49289 + ];
49290 + social_link_variations_variations.forEach((variation) => {
49291 + if (variation.isActive) {
49292 + return;
49293 + }
49294 + variation.isActive = (blockAttributes, variationAttributes) => blockAttributes.service === variationAttributes.service;
49295 + });
49296 + var social_link_variations_variations_default = social_link_variations_variations;
49297 +
49298 +
49299 + ;// ./node_modules/@wordpress/block-library/build-module/social-link/index.js
49300 +
49301 +
49302 +
49303 +
49304 +
49305 + const { name: social_link_name } = social_link_block_namespaceObject;
49306 + const social_link_settings = {
49307 + icon: share_default,
49308 + edit: social_link_edit_edit_default,
49309 + variations: social_link_variations_variations_default
49310 + };
49311 + const social_link_init = () => initBlock({ name: social_link_name, metadata: social_link_block_namespaceObject, settings: social_link_settings });
49312 +
49313 +
49314 + ;// ./node_modules/@wordpress/block-library/build-module/social-links/deprecated.js
49315 +
49316 +
49317 +
49318 + const social_links_deprecated_migrateWithLayout = (attributes) => {
49319 + if (!!attributes.layout) {
49320 + return attributes;
49321 + }
49322 + const { className } = attributes;
49323 + const prefix = `items-justified-`;
49324 + const justifiedItemsRegex = new RegExp(`\\b${prefix}[^ ]*[ ]?\\b`, "g");
49325 + const newAttributes = {
49326 + ...attributes,
49327 + className: className?.replace(justifiedItemsRegex, "").trim()
49328 + };
49329 + const justifyContent = className?.match(justifiedItemsRegex)?.[0]?.trim();
49330 + if (justifyContent) {
49331 + Object.assign(newAttributes, {
49332 + layout: {
49333 + type: "flex",
49334 + justifyContent: justifyContent.slice(prefix.length)
49335 + }
49336 + });
49337 + }
49338 + return newAttributes;
49339 + };
49340 + const social_links_deprecated_deprecated = [
49341 + // V1. Remove CSS variable use for colors.
49342 + {
49343 + attributes: {
49344 + iconColor: {
49345 + type: "string"
49346 + },
49347 + customIconColor: {
49348 + type: "string"
49349 + },
49350 + iconColorValue: {
49351 + type: "string"
49352 + },
49353 + iconBackgroundColor: {
49354 + type: "string"
49355 + },
49356 + customIconBackgroundColor: {
49357 + type: "string"
49358 + },
49359 + iconBackgroundColorValue: {
49360 + type: "string"
49361 + },
49362 + openInNewTab: {
49363 + type: "boolean",
49364 + default: false
49365 + },
49366 + size: {
49367 + type: "string"
49368 + }
49369 + },
49370 + providesContext: {
49371 + openInNewTab: "openInNewTab"
49372 + },
49373 + supports: {
49374 + align: ["left", "center", "right"],
49375 + anchor: true
49376 + },
49377 + migrate: social_links_deprecated_migrateWithLayout,
49378 + save: (props) => {
49379 + const {
49380 + attributes: {
49381 + iconBackgroundColorValue,
49382 + iconColorValue,
49383 + itemsJustification,
49384 + size
49385 + }
49386 + } = props;
49387 + const className = dist_clsx(size, {
49388 + "has-icon-color": iconColorValue,
49389 + "has-icon-background-color": iconBackgroundColorValue,
49390 + [`items-justified-${itemsJustification}`]: itemsJustification
49391 + });
49392 + const style = {
49393 + "--wp--social-links--icon-color": iconColorValue,
49394 + "--wp--social-links--icon-background-color": iconBackgroundColorValue
49395 + };
49396 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("ul", { ...external_wp_blockEditor_namespaceObject.useBlockProps.save({ className, style }), children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, {}) });
49397 + }
49398 + }
49399 + ];
49400 + var social_links_deprecated_deprecated_default = social_links_deprecated_deprecated;
49401 +
49402 +
49403 + ;// ./node_modules/@wordpress/block-library/build-module/social-links/edit.js
49404 +
49405 +
49406 +
49407 +
49408 +
49409 +
49410 +
49411 +
49412 + const sizeOptions = [
49413 + { label: (0,external_wp_i18n_namespaceObject.__)("Default"), value: "" },
49414 + { label: (0,external_wp_i18n_namespaceObject.__)("Small"), value: "has-small-icon-size" },
49415 + { label: (0,external_wp_i18n_namespaceObject.__)("Normal"), value: "has-normal-icon-size" },
49416 + { label: (0,external_wp_i18n_namespaceObject.__)("Large"), value: "has-large-icon-size" },
49417 + { label: (0,external_wp_i18n_namespaceObject.__)("Huge"), value: "has-huge-icon-size" }
49418 + ];
49419 + function SocialLinksEdit(props) {
49420 + const {
49421 + clientId,
49422 + attributes,
49423 + iconBackgroundColor,
49424 + iconColor,
49425 + isSelected,
49426 + setAttributes,
49427 + setIconBackgroundColor,
49428 + setIconColor
49429 + } = props;
49430 + const {
49431 + iconBackgroundColorValue,
49432 + iconColorValue,
49433 + openInNewTab,
49434 + showLabels,
49435 + size
49436 + } = attributes;
49437 + const { hasSocialIcons, hasSelectedChild } = (0,external_wp_data_namespaceObject.useSelect)(
49438 + (select) => {
49439 + const { getBlockCount, hasSelectedInnerBlock } = select(external_wp_blockEditor_namespaceObject.store);
49440 + return {
49441 + hasSocialIcons: getBlockCount(clientId) > 0,
49442 + hasSelectedChild: hasSelectedInnerBlock(clientId)
49443 + };
49444 + },
49445 + [clientId]
49446 + );
49447 + const hasAnySelected = isSelected || hasSelectedChild;
49448 + const logosOnly = attributes.className?.includes("is-style-logos-only");
49449 + const dropdownMenuProps = useToolsPanelDropdownMenuProps();
49450 + (0,external_wp_element_namespaceObject.useEffect)(() => {
49451 + if (logosOnly) {
49452 + let restore;
49453 + setAttributes((prev) => {
49454 + restore = {
49455 + iconBackgroundColor: prev.iconBackgroundColor,
49456 + iconBackgroundColorValue: prev.iconBackgroundColorValue,
49457 + customIconBackgroundColor: prev.customIconBackgroundColor
49458 + };
49459 + return {
49460 + iconBackgroundColor: void 0,
49461 + iconBackgroundColorValue: void 0,
49462 + customIconBackgroundColor: void 0
49463 + };
49464 + });
49465 + return () => setAttributes({ ...restore });
49466 + }
49467 + }, [logosOnly, setAttributes]);
49468 + const className = dist_clsx(size, {
49469 + "has-visible-labels": showLabels,
49470 + "has-icon-color": iconColor.color || iconColorValue,
49471 + "has-icon-background-color": iconBackgroundColor.color || iconBackgroundColorValue
49472 + });
49473 + const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)({ className });
49474 + const innerBlocksProps = (0,external_wp_blockEditor_namespaceObject.useInnerBlocksProps)(blockProps, {
49475 + templateLock: false,
49476 + orientation: attributes.layout?.orientation ?? "horizontal",
49477 + __experimentalAppenderTagName: "li",
49478 + renderAppender: !hasSocialIcons || hasAnySelected ? external_wp_blockEditor_namespaceObject.InnerBlocks.ButtonBlockAppender : void 0
49479 + });
49480 + const colorSettings = [
49481 + {
49482 + // Use custom attribute as fallback to prevent loss of named color selection when
49483 + // switching themes to a new theme that does not have a matching named color.
49484 + value: iconColor.color || iconColorValue,
49485 + onChange: (colorValue) => {
49486 + setIconColor(colorValue);
49487 + setAttributes({ iconColorValue: colorValue });
49488 + },
49489 + label: (0,external_wp_i18n_namespaceObject.__)("Icon color"),
49490 + resetAllFilter: () => {
49491 + setIconColor(void 0);
49492 + setAttributes({ iconColorValue: void 0 });
49493 + }
49494 + }
49495 + ];
49496 + if (!logosOnly) {
49497 + colorSettings.push({
49498 + // Use custom attribute as fallback to prevent loss of named color selection when
49499 + // switching themes to a new theme that does not have a matching named color.
49500 + value: iconBackgroundColor.color || iconBackgroundColorValue,
49501 + onChange: (colorValue) => {
49502 + setIconBackgroundColor(colorValue);
49503 + setAttributes({
49504 + iconBackgroundColorValue: colorValue
49505 + });
49506 + },
49507 + label: (0,external_wp_i18n_namespaceObject.__)("Icon background"),
49508 + resetAllFilter: () => {
49509 + setIconBackgroundColor(void 0);
49510 + setAttributes({ iconBackgroundColorValue: void 0 });
49511 + }
49512 + });
49513 + }
49514 + const colorGradientSettings = (0,external_wp_blockEditor_namespaceObject.__experimentalUseMultipleOriginColorsAndGradients)();
49515 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
49516 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(
49517 + external_wp_components_namespaceObject.__experimentalToolsPanel,
49518 + {
49519 + label: (0,external_wp_i18n_namespaceObject.__)("Settings"),
49520 + resetAll: () => {
49521 + setAttributes({
49522 + openInNewTab: false,
49523 + showLabels: false,
49524 + size: void 0
49525 + });
49526 + },
49527 + dropdownMenuProps,
49528 + children: [
49529 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
49530 + external_wp_components_namespaceObject.__experimentalToolsPanelItem,
49531 + {
49532 + isShownByDefault: true,
49533 + hasValue: () => !!size,
49534 + label: (0,external_wp_i18n_namespaceObject.__)("Icon size"),
49535 + onDeselect: () => setAttributes({ size: void 0 }),
49536 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
49537 + external_wp_components_namespaceObject.SelectControl,
49538 + {
49539 + __next40pxDefaultSize: true,
49540 + __nextHasNoMarginBottom: true,
49541 + label: (0,external_wp_i18n_namespaceObject.__)("Icon size"),
49542 + onChange: (newSize) => {
49543 + setAttributes({
49544 + size: newSize === "" ? void 0 : newSize
49545 + });
49546 + },
49547 + value: size ?? "",
49548 + options: sizeOptions
49549 + }
49550 + )
49551 + }
49552 + ),
49553 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
49554 + external_wp_components_namespaceObject.__experimentalToolsPanelItem,
49555 + {
49556 + isShownByDefault: true,
49557 + label: (0,external_wp_i18n_namespaceObject.__)("Show text"),
49558 + hasValue: () => !!showLabels,
49559 + onDeselect: () => setAttributes({ showLabels: false }),
49560 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
49561 + external_wp_components_namespaceObject.ToggleControl,
49562 + {
49563 + __nextHasNoMarginBottom: true,
49564 + label: (0,external_wp_i18n_namespaceObject.__)("Show text"),
49565 + checked: showLabels,
49566 + onChange: () => setAttributes({ showLabels: !showLabels })
49567 + }
49568 + )
49569 + }
49570 + ),
49571 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
49572 + external_wp_components_namespaceObject.__experimentalToolsPanelItem,
49573 + {
49574 + isShownByDefault: true,
49575 + label: (0,external_wp_i18n_namespaceObject.__)("Open links in new tab"),
49576 + hasValue: () => !!openInNewTab,
49577 + onDeselect: () => setAttributes({ openInNewTab: false }),
49578 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
49579 + external_wp_components_namespaceObject.ToggleControl,
49580 + {
49581 + __nextHasNoMarginBottom: true,
49582 + label: (0,external_wp_i18n_namespaceObject.__)("Open links in new tab"),
49583 + checked: openInNewTab,
49584 + onChange: () => setAttributes({
49585 + openInNewTab: !openInNewTab
49586 + })
49587 + }
49588 + )
49589 + }
49590 + )
49591 + ]
49592 + }
49593 + ) }),
49594 + colorGradientSettings.hasColorsOrGradients && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_blockEditor_namespaceObject.InspectorControls, { group: "color", children: [
49595 + colorSettings.map(
49596 + ({ onChange, label, value, resetAllFilter }) => /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
49597 + external_wp_blockEditor_namespaceObject.__experimentalColorGradientSettingsDropdown,
49598 + {
49599 + __experimentalIsRenderedInSidebar: true,
49600 + settings: [
49601 + {
49602 + colorValue: value,
49603 + label,
49604 + onColorChange: onChange,
49605 + isShownByDefault: true,
49606 + resetAllFilter,
49607 + enableAlpha: true,
49608 + clearable: true
49609 + }
49610 + ],
49611 + panelId: clientId,
49612 + ...colorGradientSettings
49613 + },
49614 + `social-links-color-${label}`
49615 + )
49616 + ),
49617 + !logosOnly && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
49618 + external_wp_blockEditor_namespaceObject.ContrastChecker,
49619 + {
49620 + ...{
49621 + textColor: iconColorValue,
49622 + backgroundColor: iconBackgroundColorValue
49623 + },
49624 + isLargeText: false
49625 + }
49626 + )
49627 + ] }),
49628 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("ul", { ...innerBlocksProps })
49629 + ] });
49630 + }
49631 + const iconColorAttributes = {
49632 + iconColor: "icon-color",
49633 + iconBackgroundColor: "icon-background-color"
49634 + };
49635 + var social_links_edit_edit_default = (0,external_wp_blockEditor_namespaceObject.withColors)(iconColorAttributes)(SocialLinksEdit);
49636 +
49637 +
49638 + ;// ./node_modules/@wordpress/block-library/build-module/social-links/block.json
49639 + const social_links_block_namespaceObject = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/social-links","title":"Social Icons","category":"widgets","allowedBlocks":["core/social-link"],"description":"Display icons linking to your social profiles or sites.","keywords":["links"],"textdomain":"default","attributes":{"iconColor":{"type":"string"},"customIconColor":{"type":"string"},"iconColorValue":{"type":"string"},"iconBackgroundColor":{"type":"string"},"customIconBackgroundColor":{"type":"string"},"iconBackgroundColorValue":{"type":"string"},"openInNewTab":{"type":"boolean","default":false},"showLabels":{"type":"boolean","default":false},"size":{"type":"string"}},"providesContext":{"openInNewTab":"openInNewTab","showLabels":"showLabels","iconColor":"iconColor","iconColorValue":"iconColorValue","iconBackgroundColor":"iconBackgroundColor","iconBackgroundColorValue":"iconBackgroundColorValue"},"supports":{"align":["left","center","right"],"anchor":true,"html":false,"__experimentalExposeControlsToChildren":true,"layout":{"allowSwitching":false,"allowInheriting":false,"allowVerticalAlignment":false,"default":{"type":"flex"}},"color":{"enableContrastChecker":false,"background":true,"gradients":true,"text":false,"__experimentalDefaultControls":{"background":false}},"spacing":{"blockGap":["horizontal","vertical"],"margin":true,"padding":true,"units":["px","em","rem","vh","vw"],"__experimentalDefaultControls":{"blockGap":true,"margin":true,"padding":false}},"interactivity":{"clientNavigation":true},"__experimentalBorder":{"radius":true,"color":true,"width":true,"style":true,"__experimentalDefaultControls":{"radius":true,"color":true,"width":true,"style":true}},"contentRole":true},"styles":[{"name":"default","label":"Default","isDefault":true},{"name":"logos-only","label":"Logos Only"},{"name":"pill-shape","label":"Pill Shape"}],"editorStyle":"wp-block-social-links-editor","style":"wp-block-social-links"}');
49640 + ;// ./node_modules/@wordpress/block-library/build-module/social-links/save.js
49641 +
49642 +
49643 +
49644 + function social_links_save_save(props) {
49645 + const {
49646 + attributes: {
49647 + iconBackgroundColorValue,
49648 + iconColorValue,
49649 + showLabels,
49650 + size
49651 + }
49652 + } = props;
49653 + const className = dist_clsx(size, {
49654 + "has-visible-labels": showLabels,
49655 + "has-icon-color": iconColorValue,
49656 + "has-icon-background-color": iconBackgroundColorValue
49657 + });
49658 + const blockProps = external_wp_blockEditor_namespaceObject.useBlockProps.save({ className });
49659 + const innerBlocksProps = external_wp_blockEditor_namespaceObject.useInnerBlocksProps.save(blockProps);
49660 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("ul", { ...innerBlocksProps });
49661 + }
49662 +
49663 +
49664 + ;// ./node_modules/@wordpress/block-library/build-module/social-links/index.js
49665 +
49666 +
49667 +
49668 +
49669 +
49670 +
49671 + const { name: social_links_name } = social_links_block_namespaceObject;
49672 + const social_links_settings = {
49673 + example: {
49674 + innerBlocks: [
49675 + {
49676 + name: "core/social-link",
49677 + attributes: {
49678 + service: "wordpress",
49679 + url: "https://wordpress.org"
49680 + }
49681 + },
49682 + {
49683 + name: "core/social-link",
49684 + attributes: {
49685 + service: "facebook",
49686 + url: "https://www.facebook.com/WordPress/"
49687 + }
49688 + },
49689 + {
49690 + name: "core/social-link",
49691 + attributes: {
49692 + service: "twitter",
49693 + url: "https://twitter.com/WordPress"
49694 + }
49695 + }
49696 + ]
49697 + },
49698 + icon: share_default,
49699 + edit: social_links_edit_edit_default,
49700 + save: social_links_save_save,
49701 + deprecated: social_links_deprecated_deprecated_default
49702 + };
49703 + const social_links_init = () => initBlock({ name: social_links_name, metadata: social_links_block_namespaceObject, settings: social_links_settings });
49704 +
49705 +
49706 + ;// ./node_modules/@wordpress/icons/build-module/library/resize-corner-n-e.js
49707 +
49708 +
49709 + var resize_corner_n_e_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M7 18h4.5v1.5h-7v-7H6V17L17 6h-4.5V4.5h7v7H18V7L7 18Z" }) });
49710 +
49711 +
49712 + ;// ./node_modules/@wordpress/block-library/build-module/spacer/deprecated.js
49713 +
49714 +
49715 + const spacer_deprecated_deprecated = [
49716 + {
49717 + attributes: {
49718 + height: {
49719 + type: "number",
49720 + default: 100
49721 + },
49722 + width: {
49723 + type: "number"
49724 + }
49725 + },
49726 + migrate(attributes) {
49727 + const { height, width } = attributes;
49728 + return {
49729 + ...attributes,
49730 + width: width !== void 0 ? `${width}px` : void 0,
49731 + height: height !== void 0 ? `${height}px` : void 0
49732 + };
49733 + },
49734 + save({ attributes }) {
49735 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
49736 + "div",
49737 + {
49738 + ...external_wp_blockEditor_namespaceObject.useBlockProps.save({
49739 + style: {
49740 + height: attributes.height,
49741 + width: attributes.width
49742 + },
49743 + "aria-hidden": true
49744 + })
49745 + }
49746 + );
49747 + }
49748 + }
49749 + ];
49750 + var spacer_deprecated_deprecated_default = spacer_deprecated_deprecated;
49751 +
49752 +
49753 + ;// ./node_modules/@wordpress/block-library/build-module/spacer/constants.js
49754 + const MIN_SPACER_SIZE = 0;
49755 +
49756 +
49757 + ;// ./node_modules/@wordpress/block-library/build-module/spacer/controls.js
49758 +
49759 +
49760 +
49761 +
49762 +
49763 +
49764 +
49765 +
49766 +
49767 + const { useSpacingSizes } = unlock(external_wp_blockEditor_namespaceObject.privateApis);
49768 + function DimensionInput({ label, onChange, isResizing, value = "" }) {
49769 + const inputId = (0,external_wp_compose_namespaceObject.useInstanceId)(external_wp_components_namespaceObject.__experimentalUnitControl, "block-spacer-height-input");
49770 + const spacingSizes = useSpacingSizes();
49771 + const [spacingUnits] = (0,external_wp_blockEditor_namespaceObject.useSettings)("spacing.units");
49772 + const availableUnits = spacingUnits ? spacingUnits.filter((unit) => unit !== "%") : ["px", "em", "rem", "vw", "vh"];
49773 + const units = (0,external_wp_components_namespaceObject.__experimentalUseCustomUnits)({
49774 + availableUnits,
49775 + defaultValues: { px: 100, em: 10, rem: 10, vw: 10, vh: 25 }
49776 + });
49777 + const [parsedQuantity, parsedUnit] = (0,external_wp_components_namespaceObject.__experimentalParseQuantityAndUnitFromRawValue)(value);
49778 + const computedValue = (0,external_wp_blockEditor_namespaceObject.isValueSpacingPreset)(value) ? value : [parsedQuantity, isResizing ? "px" : parsedUnit].join("");
49779 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: spacingSizes?.length < 2 ? /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
49780 + external_wp_components_namespaceObject.__experimentalUnitControl,
49781 + {
49782 + id: inputId,
49783 + isResetValueOnUnitChange: true,
49784 + min: MIN_SPACER_SIZE,
49785 + onChange,
49786 + value: computedValue,
49787 + units,
49788 + label,
49789 + __next40pxDefaultSize: true
49790 + }
49791 + ) : /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.View, { className: "tools-panel-item-spacing", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
49792 + external_wp_blockEditor_namespaceObject.__experimentalSpacingSizesControl,
49793 + {
49794 + values: { all: computedValue },
49795 + onChange: ({ all }) => {
49796 + onChange(all);
49797 + },
49798 + label,
49799 + sides: ["all"],
49800 + units,
49801 + allowReset: false,
49802 + splitOnAxis: false,
49803 + showSideInLabel: false
49804 + }
49805 + ) }) });
49806 + }
49807 + function SpacerControls({
49808 + setAttributes,
49809 + orientation,
49810 + height,
49811 + width,
49812 + isResizing
49813 + }) {
49814 + const dropdownMenuProps = useToolsPanelDropdownMenuProps();
49815 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(
49816 + external_wp_components_namespaceObject.__experimentalToolsPanel,
49817 + {
49818 + label: (0,external_wp_i18n_namespaceObject.__)("Settings"),
49819 + resetAll: () => {
49820 + setAttributes({
49821 + width: void 0,
49822 + height: "100px"
49823 + });
49824 + },
49825 + dropdownMenuProps,
49826 + children: [
49827 + orientation === "horizontal" && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
49828 + external_wp_components_namespaceObject.__experimentalToolsPanelItem,
49829 + {
49830 + label: (0,external_wp_i18n_namespaceObject.__)("Width"),
49831 + isShownByDefault: true,
49832 + hasValue: () => width !== void 0,
49833 + onDeselect: () => setAttributes({ width: void 0 }),
49834 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
49835 + DimensionInput,
49836 + {
49837 + label: (0,external_wp_i18n_namespaceObject.__)("Width"),
49838 + value: width,
49839 + onChange: (nextWidth) => setAttributes({ width: nextWidth }),
49840 + isResizing
49841 + }
49842 + )
49843 + }
49844 + ),
49845 + orientation !== "horizontal" && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
49846 + external_wp_components_namespaceObject.__experimentalToolsPanelItem,
49847 + {
49848 + label: (0,external_wp_i18n_namespaceObject.__)("Height"),
49849 + isShownByDefault: true,
49850 + hasValue: () => height !== "100px",
49851 + onDeselect: () => setAttributes({ height: "100px" }),
49852 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
49853 + DimensionInput,
49854 + {
49855 + label: (0,external_wp_i18n_namespaceObject.__)("Height"),
49856 + value: height,
49857 + onChange: (nextHeight) => setAttributes({ height: nextHeight }),
49858 + isResizing
49859 + }
49860 + )
49861 + }
49862 + )
49863 + ]
49864 + }
49865 + ) });
49866 + }
49867 +
49868 +
49869 + ;// ./node_modules/@wordpress/block-library/build-module/spacer/edit.js
49870 +
49871 +
49872 +
49873 +
49874 +
49875 +
49876 +
49877 +
49878 +
49879 +
49880 + const { useSpacingSizes: edit_useSpacingSizes } = unlock(external_wp_blockEditor_namespaceObject.privateApis);
49881 + const ResizableSpacer = ({
49882 + orientation,
49883 + onResizeStart,
49884 + onResize,
49885 + onResizeStop,
49886 + isSelected,
49887 + isResizing,
49888 + setIsResizing,
49889 + ...props
49890 + }) => {
49891 + const getCurrentSize = (elt) => {
49892 + return orientation === "horizontal" ? elt.clientWidth : elt.clientHeight;
49893 + };
49894 + const getNextVal = (elt) => {
49895 + return `${getCurrentSize(elt)}px`;
49896 + };
49897 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
49898 + external_wp_components_namespaceObject.ResizableBox,
49899 + {
49900 + className: dist_clsx("block-library-spacer__resize-container", {
49901 + "resize-horizontal": orientation === "horizontal",
49902 + "is-resizing": isResizing,
49903 + "is-selected": isSelected
49904 + }),
49905 + onResizeStart: (_event, _direction, elt) => {
49906 + const nextVal = getNextVal(elt);
49907 + onResizeStart(nextVal);
49908 + onResize(nextVal);
49909 + },
49910 + onResize: (_event, _direction, elt) => {
49911 + onResize(getNextVal(elt));
49912 + if (!isResizing) {
49913 + setIsResizing(true);
49914 + }
49915 + },
49916 + onResizeStop: (_event, _direction, elt) => {
49917 + const nextVal = getCurrentSize(elt);
49918 + onResizeStop(`${nextVal}px`);
49919 + setIsResizing(false);
49920 + },
49921 + __experimentalShowTooltip: true,
49922 + __experimentalTooltipProps: {
49923 + axis: orientation === "horizontal" ? "x" : "y",
49924 + position: "corner",
49925 + isVisible: isResizing
49926 + },
49927 + showHandle: isSelected,
49928 + ...props
49929 + }
49930 + );
49931 + };
49932 + const SpacerEdit = ({
49933 + attributes,
49934 + isSelected,
49935 + setAttributes,
49936 + toggleSelection,
49937 + context,
49938 + __unstableParentLayout: parentLayout,
49939 + className
49940 + }) => {
49941 + const disableCustomSpacingSizes = (0,external_wp_data_namespaceObject.useSelect)((select) => {
49942 + const editorSettings = select(external_wp_blockEditor_namespaceObject.store).getSettings();
49943 + return editorSettings?.disableCustomSpacingSizes;
49944 + });
49945 + const { orientation } = context;
49946 + const {
49947 + orientation: parentOrientation,
49948 + type,
49949 + default: { type: defaultType } = {}
49950 + } = parentLayout || {};
49951 + const isFlexLayout = type === "flex" || !type && defaultType === "flex";
49952 + const inheritedOrientation = !parentOrientation && isFlexLayout ? "horizontal" : parentOrientation || orientation;
49953 + const { height, width, style: blockStyle = {} } = attributes;
49954 + const { layout = {} } = blockStyle;
49955 + const { selfStretch, flexSize } = layout;
49956 + const spacingSizes = edit_useSpacingSizes();
49957 + const [isResizing, setIsResizing] = (0,external_wp_element_namespaceObject.useState)(false);
49958 + const [temporaryHeight, setTemporaryHeight] = (0,external_wp_element_namespaceObject.useState)(null);
49959 + const [temporaryWidth, setTemporaryWidth] = (0,external_wp_element_namespaceObject.useState)(null);
49960 + const onResizeStart = () => toggleSelection(false);
49961 + const onResizeStop = () => toggleSelection(true);
49962 + const { __unstableMarkNextChangeAsNotPersistent } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_blockEditor_namespaceObject.store);
49963 + const handleOnVerticalResizeStop = (newHeight) => {
49964 + onResizeStop();
49965 + if (isFlexLayout) {
49966 + setAttributes({
49967 + style: {
49968 + ...blockStyle,
49969 + layout: {
49970 + ...layout,
49971 + flexSize: newHeight,
49972 + selfStretch: "fixed"
49973 + }
49974 + }
49975 + });
49976 + }
49977 + setAttributes({ height: newHeight });
49978 + setTemporaryHeight(null);
49979 + };
49980 + const handleOnHorizontalResizeStop = (newWidth) => {
49981 + onResizeStop();
49982 + if (isFlexLayout) {
49983 + setAttributes({
49984 + style: {
49985 + ...blockStyle,
49986 + layout: {
49987 + ...layout,
49988 + flexSize: newWidth,
49989 + selfStretch: "fixed"
49990 + }
49991 + }
49992 + });
49993 + }
49994 + setAttributes({ width: newWidth });
49995 + setTemporaryWidth(null);
49996 + };
49997 + const getHeightForVerticalBlocks = () => {
49998 + if (isFlexLayout) {
49999 + return void 0;
50000 + }
50001 + return temporaryHeight || (0,external_wp_blockEditor_namespaceObject.getSpacingPresetCssVar)(height) || void 0;
50002 + };
50003 + const getWidthForHorizontalBlocks = () => {
50004 + if (isFlexLayout) {
50005 + return void 0;
50006 + }
50007 + return temporaryWidth || (0,external_wp_blockEditor_namespaceObject.getSpacingPresetCssVar)(width) || void 0;
50008 + };
50009 + const sizeConditionalOnOrientation = inheritedOrientation === "horizontal" ? temporaryWidth || flexSize : temporaryHeight || flexSize;
50010 + const style = {
50011 + height: inheritedOrientation === "horizontal" ? 24 : getHeightForVerticalBlocks(),
50012 + width: inheritedOrientation === "horizontal" ? getWidthForHorizontalBlocks() : void 0,
50013 + // In vertical flex containers, the spacer shrinks to nothing without a minimum width.
50014 + minWidth: inheritedOrientation === "vertical" && isFlexLayout ? 48 : void 0,
50015 + // Add flex-basis so temporary sizes are respected.
50016 + flexBasis: isFlexLayout ? sizeConditionalOnOrientation : void 0,
50017 + // Remove flex-grow when resizing.
50018 + flexGrow: isFlexLayout && isResizing ? 0 : void 0
50019 + };
50020 + const resizableBoxWithOrientation = (blockOrientation) => {
50021 + if (blockOrientation === "horizontal") {
50022 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
50023 + ResizableSpacer,
50024 + {
50025 + minWidth: MIN_SPACER_SIZE,
50026 + enable: {
50027 + top: false,
50028 + right: true,
50029 + bottom: false,
50030 + left: false,
50031 + topRight: false,
50032 + bottomRight: false,
50033 + bottomLeft: false,
50034 + topLeft: false
50035 + },
50036 + orientation: blockOrientation,
50037 + onResizeStart,
50038 + onResize: setTemporaryWidth,
50039 + onResizeStop: handleOnHorizontalResizeStop,
50040 + isSelected,
50041 + isResizing,
50042 + setIsResizing
50043 + }
50044 + );
50045 + }
50046 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
50047 + ResizableSpacer,
50048 + {
50049 + minHeight: MIN_SPACER_SIZE,
50050 + enable: {
50051 + top: false,
50052 + right: false,
50053 + bottom: true,
50054 + left: false,
50055 + topRight: false,
50056 + bottomRight: false,
50057 + bottomLeft: false,
50058 + topLeft: false
50059 + },
50060 + orientation: blockOrientation,
50061 + onResizeStart,
50062 + onResize: setTemporaryHeight,
50063 + onResizeStop: handleOnVerticalResizeStop,
50064 + isSelected,
50065 + isResizing,
50066 + setIsResizing
50067 + }
50068 + ) });
50069 + };
50070 + (0,external_wp_element_namespaceObject.useEffect)(() => {
50071 + const setAttributesCovertly = (nextAttributes) => {
50072 + __unstableMarkNextChangeAsNotPersistent();
50073 + setAttributes(nextAttributes);
50074 + };
50075 + if (isFlexLayout && selfStretch !== "fill" && selfStretch !== "fit" && flexSize === void 0) {
50076 + if (inheritedOrientation === "horizontal") {
50077 + const newSize = (0,external_wp_blockEditor_namespaceObject.getCustomValueFromPreset)(width, spacingSizes) || (0,external_wp_blockEditor_namespaceObject.getCustomValueFromPreset)(height, spacingSizes) || "100px";
50078 + setAttributesCovertly({
50079 + width: "0px",
50080 + style: {
50081 + ...blockStyle,
50082 + layout: {
50083 + ...layout,
50084 + flexSize: newSize,
50085 + selfStretch: "fixed"
50086 + }
50087 + }
50088 + });
50089 + } else {
50090 + const newSize = (0,external_wp_blockEditor_namespaceObject.getCustomValueFromPreset)(height, spacingSizes) || (0,external_wp_blockEditor_namespaceObject.getCustomValueFromPreset)(width, spacingSizes) || "100px";
50091 + setAttributesCovertly({
50092 + height: "0px",
50093 + style: {
50094 + ...blockStyle,
50095 + layout: {
50096 + ...layout,
50097 + flexSize: newSize,
50098 + selfStretch: "fixed"
50099 + }
50100 + }
50101 + });
50102 + }
50103 + } else if (isFlexLayout && (selfStretch === "fill" || selfStretch === "fit")) {
50104 + setAttributesCovertly(
50105 + inheritedOrientation === "horizontal" ? { width: void 0 } : { height: void 0 }
50106 + );
50107 + } else if (!isFlexLayout && (selfStretch || flexSize)) {
50108 + setAttributesCovertly({
50109 + ...inheritedOrientation === "horizontal" ? { width: flexSize } : { height: flexSize },
50110 + style: {
50111 + ...blockStyle,
50112 + layout: {
50113 + ...layout,
50114 + flexSize: void 0,
50115 + selfStretch: void 0
50116 + }
50117 + }
50118 + });
50119 + }
50120 + }, [
50121 + blockStyle,
50122 + flexSize,
50123 + height,
50124 + inheritedOrientation,
50125 + isFlexLayout,
50126 + layout,
50127 + selfStretch,
50128 + setAttributes,
50129 + spacingSizes,
50130 + width,
50131 + __unstableMarkNextChangeAsNotPersistent
50132 + ]);
50133 + const blockEditingMode = (0,external_wp_blockEditor_namespaceObject.useBlockEditingMode)();
50134 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
50135 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
50136 + external_wp_primitives_namespaceObject.View,
50137 + {
50138 + ...(0,external_wp_blockEditor_namespaceObject.useBlockProps)({
50139 + style,
50140 + className: dist_clsx(className, {
50141 + "custom-sizes-disabled": disableCustomSpacingSizes
50142 + })
50143 + }),
50144 + children: blockEditingMode === "default" && resizableBoxWithOrientation(inheritedOrientation)
50145 + }
50146 + ),
50147 + !isFlexLayout && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
50148 + SpacerControls,
50149 + {
50150 + setAttributes,
50151 + height: temporaryHeight || height,
50152 + width: temporaryWidth || width,
50153 + orientation: inheritedOrientation,
50154 + isResizing
50155 + }
50156 + )
50157 + ] });
50158 + };
50159 + var spacer_edit_edit_default = SpacerEdit;
50160 +
50161 +
50162 + ;// ./node_modules/@wordpress/block-library/build-module/spacer/block.json
50163 + const spacer_block_namespaceObject = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/spacer","title":"Spacer","category":"design","description":"Add white space between blocks and customize its height.","textdomain":"default","attributes":{"height":{"type":"string","default":"100px"},"width":{"type":"string"}},"usesContext":["orientation"],"supports":{"anchor":true,"spacing":{"margin":["top","bottom"],"__experimentalDefaultControls":{"margin":true}},"interactivity":{"clientNavigation":true}},"editorStyle":"wp-block-spacer-editor","style":"wp-block-spacer"}');
50164 + ;// ./node_modules/@wordpress/block-library/build-module/spacer/transforms.js
50165 +
50166 + const spacer_transforms_transforms = {
50167 + to: [
50168 + {
50169 + type: "block",
50170 + blocks: ["core/separator"],
50171 + // Transform to Separator.
50172 + transform: ({ anchor }) => {
50173 + return (0,external_wp_blocks_namespaceObject.createBlock)("core/separator", {
50174 + anchor: anchor || ""
50175 + });
50176 + }
50177 + }
50178 + ]
50179 + };
50180 + var spacer_transforms_transforms_default = spacer_transforms_transforms;
50181 +
50182 +
50183 + ;// ./node_modules/@wordpress/block-library/build-module/spacer/save.js
50184 +
50185 +
50186 + function spacer_save_save({ attributes }) {
50187 + const { height, width, style } = attributes;
50188 + const { layout: { selfStretch } = {} } = style || {};
50189 + const finalHeight = selfStretch === "fill" || selfStretch === "fit" ? void 0 : height;
50190 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
50191 + "div",
50192 + {
50193 + ...external_wp_blockEditor_namespaceObject.useBlockProps.save({
50194 + style: {
50195 + height: (0,external_wp_blockEditor_namespaceObject.getSpacingPresetCssVar)(finalHeight),
50196 + width: (0,external_wp_blockEditor_namespaceObject.getSpacingPresetCssVar)(width)
50197 + },
50198 + "aria-hidden": true
50199 + })
50200 + }
50201 + );
50202 + }
50203 +
50204 +
50205 + ;// ./node_modules/@wordpress/block-library/build-module/spacer/index.js
50206 +
50207 +
50208 +
50209 +
50210 +
50211 +
50212 +
50213 + const { name: spacer_name } = spacer_block_namespaceObject;
50214 + const spacer_settings = {
50215 + icon: resize_corner_n_e_default,
50216 + transforms: spacer_transforms_transforms_default,
50217 + edit: spacer_edit_edit_default,
50218 + save: spacer_save_save,
50219 + deprecated: spacer_deprecated_deprecated_default
50220 + };
50221 + const spacer_init = () => initBlock({ name: spacer_name, metadata: spacer_block_namespaceObject, settings: spacer_settings });
50222 +
50223 +
50224 + ;// ./node_modules/@wordpress/icons/build-module/library/block-table.js
50225 +
50226 +
50227 + var block_table_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zM5 4.5h14c.3 0 .5.2.5.5v3.5h-15V5c0-.3.2-.5.5-.5zm8 5.5h6.5v3.5H13V10zm-1.5 3.5h-7V10h7v3.5zm-7 5.5v-4h7v4.5H5c-.3 0-.5-.2-.5-.5zm14.5.5h-6V15h6.5v4c0 .3-.2.5-.5.5z" }) });
50228 +
50229 +
50230 + ;// ./node_modules/@wordpress/block-library/build-module/table/deprecated.js
50231 +
50232 +
50233 +
50234 + const oldColors = {
50235 + "subtle-light-gray": "#f3f4f5",
50236 + "subtle-pale-green": "#e9fbe5",
50237 + "subtle-pale-blue": "#e7f5fe",
50238 + "subtle-pale-pink": "#fcf0ef"
50239 + };
50240 + const v4Query = {
50241 + content: {
50242 + type: "rich-text",
50243 + source: "rich-text"
50244 + },
50245 + tag: {
50246 + type: "string",
50247 + default: "td",
50248 + source: "tag"
50249 + },
50250 + scope: {
50251 + type: "string",
50252 + source: "attribute",
50253 + attribute: "scope"
50254 + },
50255 + align: {
50256 + type: "string",
50257 + source: "attribute",
50258 + attribute: "data-align"
50259 + },
50260 + colspan: {
50261 + type: "string",
50262 + source: "attribute",
50263 + attribute: "colspan"
50264 + },
50265 + rowspan: {
50266 + type: "string",
50267 + source: "attribute",
50268 + attribute: "rowspan"
50269 + }
50270 + };
50271 + const table_deprecated_v4 = {
50272 + attributes: {
50273 + hasFixedLayout: {
50274 + type: "boolean",
50275 + default: false
50276 + },
50277 + caption: {
50278 + type: "rich-text",
50279 + source: "rich-text",
50280 + selector: "figcaption"
50281 + },
50282 + head: {
50283 + type: "array",
50284 + default: [],
50285 + source: "query",
50286 + selector: "thead tr",
50287 + query: {
50288 + cells: {
50289 + type: "array",
50290 + default: [],
50291 + source: "query",
50292 + selector: "td,th",
50293 + query: v4Query
50294 + }
50295 + }
50296 + },
50297 + body: {
50298 + type: "array",
50299 + default: [],
50300 + source: "query",
50301 + selector: "tbody tr",
50302 + query: {
50303 + cells: {
50304 + type: "array",
50305 + default: [],
50306 + source: "query",
50307 + selector: "td,th",
50308 + query: v4Query
50309 + }
50310 + }
50311 + },
50312 + foot: {
50313 + type: "array",
50314 + default: [],
50315 + source: "query",
50316 + selector: "tfoot tr",
50317 + query: {
50318 + cells: {
50319 + type: "array",
50320 + default: [],
50321 + source: "query",
50322 + selector: "td,th",
50323 + query: v4Query
50324 + }
50325 + }
50326 + }
50327 + },
50328 + supports: {
50329 + anchor: true,
50330 + align: true,
50331 + color: {
50332 + __experimentalSkipSerialization: true,
50333 + gradients: true,
50334 + __experimentalDefaultControls: {
50335 + background: true,
50336 + text: true
50337 + }
50338 + },
50339 + spacing: {
50340 + margin: true,
50341 + padding: true,
50342 + __experimentalDefaultControls: {
50343 + margin: false,
50344 + padding: false
50345 + }
50346 + },
50347 + typography: {
50348 + fontSize: true,
50349 + lineHeight: true,
50350 + __experimentalFontFamily: true,
50351 + __experimentalFontStyle: true,
50352 + __experimentalFontWeight: true,
50353 + __experimentalLetterSpacing: true,
50354 + __experimentalTextTransform: true,
50355 + __experimentalTextDecoration: true,
50356 + __experimentalDefaultControls: {
50357 + fontSize: true
50358 + }
50359 + },
50360 + __experimentalBorder: {
50361 + __experimentalSkipSerialization: true,
50362 + color: true,
50363 + style: true,
50364 + width: true,
50365 + __experimentalDefaultControls: {
50366 + color: true,
50367 + style: true,
50368 + width: true
50369 + }
50370 + },
50371 + __experimentalSelector: ".wp-block-table > table",
50372 + interactivity: {
50373 + clientNavigation: true
50374 + }
50375 + },
50376 + save({ attributes }) {
50377 + const { hasFixedLayout, head, body, foot, caption } = attributes;
50378 + const isEmpty = !head.length && !body.length && !foot.length;
50379 + if (isEmpty) {
50380 + return null;
50381 + }
50382 + const colorProps = (0,external_wp_blockEditor_namespaceObject.__experimentalGetColorClassesAndStyles)(attributes);
50383 + const borderProps = (0,external_wp_blockEditor_namespaceObject.__experimentalGetBorderClassesAndStyles)(attributes);
50384 + const classes = dist_clsx(colorProps.className, borderProps.className, {
50385 + "has-fixed-layout": hasFixedLayout
50386 + });
50387 + const hasCaption = !external_wp_blockEditor_namespaceObject.RichText.isEmpty(caption);
50388 + const Section = ({ type, rows }) => {
50389 + if (!rows.length) {
50390 + return null;
50391 + }
50392 + const Tag = `t${type}`;
50393 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(Tag, { children: rows.map(({ cells }, rowIndex) => /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("tr", { children: cells.map(
50394 + ({
50395 + content,
50396 + tag,
50397 + scope,
50398 + align,
50399 + colspan,
50400 + rowspan
50401 + }, cellIndex) => {
50402 + const cellClasses = dist_clsx({
50403 + [`has-text-align-${align}`]: align
50404 + });
50405 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
50406 + external_wp_blockEditor_namespaceObject.RichText.Content,
50407 + {
50408 + className: cellClasses ? cellClasses : void 0,
50409 + "data-align": align,
50410 + tagName: tag,
50411 + value: content,
50412 + scope: tag === "th" ? scope : void 0,
50413 + colSpan: colspan,
50414 + rowSpan: rowspan
50415 + },
50416 + cellIndex
50417 + );
50418 + }
50419 + ) }, rowIndex)) });
50420 + };
50421 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("figure", { ...external_wp_blockEditor_namespaceObject.useBlockProps.save(), children: [
50422 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(
50423 + "table",
50424 + {
50425 + className: classes === "" ? void 0 : classes,
50426 + style: { ...colorProps.style, ...borderProps.style },
50427 + children: [
50428 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(Section, { type: "head", rows: head }),
50429 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(Section, { type: "body", rows: body }),
50430 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(Section, { type: "foot", rows: foot })
50431 + ]
50432 + }
50433 + ),
50434 + hasCaption && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
50435 + external_wp_blockEditor_namespaceObject.RichText.Content,
50436 + {
50437 + tagName: "figcaption",
50438 + value: caption,
50439 + className: (0,external_wp_blockEditor_namespaceObject.__experimentalGetElementClassName)(
50440 + "caption"
50441 + )
50442 + }
50443 + )
50444 + ] });
50445 + }
50446 + };
50447 + const v3Query = {
50448 + content: {
50449 + type: "string",
50450 + source: "html"
50451 + },
50452 + tag: {
50453 + type: "string",
50454 + default: "td",
50455 + source: "tag"
50456 + },
50457 + scope: {
50458 + type: "string",
50459 + source: "attribute",
50460 + attribute: "scope"
50461 + },
50462 + align: {
50463 + type: "string",
50464 + source: "attribute",
50465 + attribute: "data-align"
50466 + }
50467 + };
50468 + const table_deprecated_v3 = {
50469 + attributes: {
50470 + hasFixedLayout: {
50471 + type: "boolean",
50472 + default: false
50473 + },
50474 + caption: {
50475 + type: "string",
50476 + source: "html",
50477 + selector: "figcaption",
50478 + default: ""
50479 + },
50480 + head: {
50481 + type: "array",
50482 + default: [],
50483 + source: "query",
50484 + selector: "thead tr",
50485 + query: {
50486 + cells: {
50487 + type: "array",
50488 + default: [],
50489 + source: "query",
50490 + selector: "td,th",
50491 + query: v3Query
50492 + }
50493 + }
50494 + },
50495 + body: {
50496 + type: "array",
50497 + default: [],
50498 + source: "query",
50499 + selector: "tbody tr",
50500 + query: {
50501 + cells: {
50502 + type: "array",
50503 + default: [],
50504 + source: "query",
50505 + selector: "td,th",
50506 + query: v3Query
50507 + }
50508 + }
50509 + },
50510 + foot: {
50511 + type: "array",
50512 + default: [],
50513 + source: "query",
50514 + selector: "tfoot tr",
50515 + query: {
50516 + cells: {
50517 + type: "array",
50518 + default: [],
50519 + source: "query",
50520 + selector: "td,th",
50521 + query: v3Query
50522 + }
50523 + }
50524 + }
50525 + },
50526 + supports: {
50527 + anchor: true,
50528 + align: true,
50529 + color: {
50530 + __experimentalSkipSerialization: true,
50531 + gradients: true,
50532 + __experimentalDefaultControls: {
50533 + background: true,
50534 + text: true
50535 + }
50536 + },
50537 + spacing: {
50538 + margin: true,
50539 + padding: true
50540 + },
50541 + typography: {
50542 + fontSize: true,
50543 + lineHeight: true,
50544 + __experimentalFontFamily: true,
50545 + __experimentalFontStyle: true,
50546 + __experimentalFontWeight: true,
50547 + __experimentalLetterSpacing: true,
50548 + __experimentalTextTransform: true,
50549 + __experimentalTextDecoration: true,
50550 + __experimentalDefaultControls: {
50551 + fontSize: true
50552 + }
50553 + },
50554 + __experimentalBorder: {
50555 + __experimentalSkipSerialization: true,
50556 + color: true,
50557 + style: true,
50558 + width: true,
50559 + __experimentalDefaultControls: {
50560 + color: true,
50561 + style: true,
50562 + width: true
50563 + }
50564 + },
50565 + __experimentalSelector: ".wp-block-table > table"
50566 + },
50567 + save({ attributes }) {
50568 + const { hasFixedLayout, head, body, foot, caption } = attributes;
50569 + const isEmpty = !head.length && !body.length && !foot.length;
50570 + if (isEmpty) {
50571 + return null;
50572 + }
50573 + const colorProps = (0,external_wp_blockEditor_namespaceObject.__experimentalGetColorClassesAndStyles)(attributes);
50574 + const borderProps = (0,external_wp_blockEditor_namespaceObject.__experimentalGetBorderClassesAndStyles)(attributes);
50575 + const classes = dist_clsx(colorProps.className, borderProps.className, {
50576 + "has-fixed-layout": hasFixedLayout
50577 + });
50578 + const hasCaption = !external_wp_blockEditor_namespaceObject.RichText.isEmpty(caption);
50579 + const Section = ({ type, rows }) => {
50580 + if (!rows.length) {
50581 + return null;
50582 + }
50583 + const Tag = `t${type}`;
50584 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(Tag, { children: rows.map(({ cells }, rowIndex) => /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("tr", { children: cells.map(
50585 + ({ content, tag, scope, align }, cellIndex) => {
50586 + const cellClasses = dist_clsx({
50587 + [`has-text-align-${align}`]: align
50588 + });
50589 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
50590 + external_wp_blockEditor_namespaceObject.RichText.Content,
50591 + {
50592 + className: cellClasses ? cellClasses : void 0,
50593 + "data-align": align,
50594 + tagName: tag,
50595 + value: content,
50596 + scope: tag === "th" ? scope : void 0
50597 + },
50598 + cellIndex
50599 + );
50600 + }
50601 + ) }, rowIndex)) });
50602 + };
50603 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("figure", { ...external_wp_blockEditor_namespaceObject.useBlockProps.save(), children: [
50604 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(
50605 + "table",
50606 + {
50607 + className: classes === "" ? void 0 : classes,
50608 + style: { ...colorProps.style, ...borderProps.style },
50609 + children: [
50610 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(Section, { type: "head", rows: head }),
50611 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(Section, { type: "body", rows: body }),
50612 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(Section, { type: "foot", rows: foot })
50613 + ]
50614 + }
50615 + ),
50616 + hasCaption && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichText.Content, { tagName: "figcaption", value: caption })
50617 + ] });
50618 + }
50619 + };
50620 + const v2Query = {
50621 + content: {
50622 + type: "string",
50623 + source: "html"
50624 + },
50625 + tag: {
50626 + type: "string",
50627 + default: "td",
50628 + source: "tag"
50629 + },
50630 + scope: {
50631 + type: "string",
50632 + source: "attribute",
50633 + attribute: "scope"
50634 + },
50635 + align: {
50636 + type: "string",
50637 + source: "attribute",
50638 + attribute: "data-align"
50639 + }
50640 + };
50641 + const table_deprecated_v2 = {
50642 + attributes: {
50643 + hasFixedLayout: {
50644 + type: "boolean",
50645 + default: false
50646 + },
50647 + backgroundColor: {
50648 + type: "string"
50649 + },
50650 + caption: {
50651 + type: "string",
50652 + source: "html",
50653 + selector: "figcaption",
50654 + default: ""
50655 + },
50656 + head: {
50657 + type: "array",
50658 + default: [],
50659 + source: "query",
50660 + selector: "thead tr",
50661 + query: {
50662 + cells: {
50663 + type: "array",
50664 + default: [],
50665 + source: "query",
50666 + selector: "td,th",
50667 + query: v2Query
50668 + }
50669 + }
50670 + },
50671 + body: {
50672 + type: "array",
50673 + default: [],
50674 + source: "query",
50675 + selector: "tbody tr",
50676 + query: {
50677 + cells: {
50678 + type: "array",
50679 + default: [],
50680 + source: "query",
50681 + selector: "td,th",
50682 + query: v2Query
50683 + }
50684 + }
50685 + },
50686 + foot: {
50687 + type: "array",
50688 + default: [],
50689 + source: "query",
50690 + selector: "tfoot tr",
50691 + query: {
50692 + cells: {
50693 + type: "array",
50694 + default: [],
50695 + source: "query",
50696 + selector: "td,th",
50697 + query: v2Query
50698 + }
50699 + }
50700 + }
50701 + },
50702 + supports: {
50703 + anchor: true,
50704 + align: true,
50705 + __experimentalSelector: ".wp-block-table > table"
50706 + },
50707 + save: ({ attributes }) => {
50708 + const { hasFixedLayout, head, body, foot, backgroundColor, caption } = attributes;
50709 + const isEmpty = !head.length && !body.length && !foot.length;
50710 + if (isEmpty) {
50711 + return null;
50712 + }
50713 + const backgroundClass = (0,external_wp_blockEditor_namespaceObject.getColorClassName)(
50714 + "background-color",
50715 + backgroundColor
50716 + );
50717 + const classes = dist_clsx(backgroundClass, {
50718 + "has-fixed-layout": hasFixedLayout,
50719 + "has-background": !!backgroundClass
50720 + });
50721 + const hasCaption = !external_wp_blockEditor_namespaceObject.RichText.isEmpty(caption);
50722 + const Section = ({ type, rows }) => {
50723 + if (!rows.length) {
50724 + return null;
50725 + }
50726 + const Tag = `t${type}`;
50727 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(Tag, { children: rows.map(({ cells }, rowIndex) => /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("tr", { children: cells.map(
50728 + ({ content, tag, scope, align }, cellIndex) => {
50729 + const cellClasses = dist_clsx({
50730 + [`has-text-align-${align}`]: align
50731 + });
50732 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
50733 + external_wp_blockEditor_namespaceObject.RichText.Content,
50734 + {
50735 + className: cellClasses ? cellClasses : void 0,
50736 + "data-align": align,
50737 + tagName: tag,
50738 + value: content,
50739 + scope: tag === "th" ? scope : void 0
50740 + },
50741 + cellIndex
50742 + );
50743 + }
50744 + ) }, rowIndex)) });
50745 + };
50746 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("figure", { ...external_wp_blockEditor_namespaceObject.useBlockProps.save(), children: [
50747 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("table", { className: classes === "" ? void 0 : classes, children: [
50748 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(Section, { type: "head", rows: head }),
50749 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(Section, { type: "body", rows: body }),
50750 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(Section, { type: "foot", rows: foot })
50751 + ] }),
50752 + hasCaption && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichText.Content, { tagName: "figcaption", value: caption })
50753 + ] });
50754 + },
50755 + isEligible: (attributes) => {
50756 + return attributes.backgroundColor && attributes.backgroundColor in oldColors && !attributes.style;
50757 + },
50758 + // This version is the first to introduce the style attribute to the
50759 + // table block. As a result, we'll explicitly override that.
50760 + migrate: (attributes) => {
50761 + return {
50762 + ...attributes,
50763 + backgroundColor: void 0,
50764 + style: {
50765 + color: {
50766 + background: oldColors[attributes.backgroundColor]
50767 + }
50768 + }
50769 + };
50770 + }
50771 + };
50772 + const v1Query = {
50773 + content: {
50774 + type: "string",
50775 + source: "html"
50776 + },
50777 + tag: {
50778 + type: "string",
50779 + default: "td",
50780 + source: "tag"
50781 + },
50782 + scope: {
50783 + type: "string",
50784 + source: "attribute",
50785 + attribute: "scope"
50786 + }
50787 + };
50788 + const table_deprecated_v1 = {
50789 + attributes: {
50790 + hasFixedLayout: {
50791 + type: "boolean",
50792 + default: false
50793 + },
50794 + backgroundColor: {
50795 + type: "string"
50796 + },
50797 + head: {
50798 + type: "array",
50799 + default: [],
50800 + source: "query",
50801 + selector: "thead tr",
50802 + query: {
50803 + cells: {
50804 + type: "array",
50805 + default: [],
50806 + source: "query",
50807 + selector: "td,th",
50808 + query: v1Query
50809 + }
50810 + }
50811 + },
50812 + body: {
50813 + type: "array",
50814 + default: [],
50815 + source: "query",
50816 + selector: "tbody tr",
50817 + query: {
50818 + cells: {
50819 + type: "array",
50820 + default: [],
50821 + source: "query",
50822 + selector: "td,th",
50823 + query: v1Query
50824 + }
50825 + }
50826 + },
50827 + foot: {
50828 + type: "array",
50829 + default: [],
50830 + source: "query",
50831 + selector: "tfoot tr",
50832 + query: {
50833 + cells: {
50834 + type: "array",
50835 + default: [],
50836 + source: "query",
50837 + selector: "td,th",
50838 + query: v1Query
50839 + }
50840 + }
50841 + }
50842 + },
50843 + supports: {
50844 + align: true
50845 + },
50846 + save({ attributes }) {
50847 + const { hasFixedLayout, head, body, foot, backgroundColor } = attributes;
50848 + const isEmpty = !head.length && !body.length && !foot.length;
50849 + if (isEmpty) {
50850 + return null;
50851 + }
50852 + const backgroundClass = (0,external_wp_blockEditor_namespaceObject.getColorClassName)(
50853 + "background-color",
50854 + backgroundColor
50855 + );
50856 + const classes = dist_clsx(backgroundClass, {
50857 + "has-fixed-layout": hasFixedLayout,
50858 + "has-background": !!backgroundClass
50859 + });
50860 + const Section = ({ type, rows }) => {
50861 + if (!rows.length) {
50862 + return null;
50863 + }
50864 + const Tag = `t${type}`;
50865 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(Tag, { children: rows.map(({ cells }, rowIndex) => /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("tr", { children: cells.map(
50866 + ({ content, tag, scope }, cellIndex) => /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
50867 + external_wp_blockEditor_namespaceObject.RichText.Content,
50868 + {
50869 + tagName: tag,
50870 + value: content,
50871 + scope: tag === "th" ? scope : void 0
50872 + },
50873 + cellIndex
50874 + )
50875 + ) }, rowIndex)) });
50876 + };
50877 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("table", { className: classes, children: [
50878 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(Section, { type: "head", rows: head }),
50879 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(Section, { type: "body", rows: body }),
50880 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(Section, { type: "foot", rows: foot })
50881 + ] });
50882 + }
50883 + };
50884 + var table_deprecated_deprecated_default = [table_deprecated_v4, table_deprecated_v3, table_deprecated_v2, table_deprecated_v1];
50885 +
50886 +
50887 + ;// ./node_modules/@wordpress/icons/build-module/library/align-left.js
50888 +
50889 +
50890 + var align_left_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M13 5.5H4V4h9v1.5Zm7 7H4V11h16v1.5Zm-7 7H4V18h9v1.5Z" }) });
50891 +
50892 +
50893 + ;// ./node_modules/@wordpress/icons/build-module/library/align-center.js
50894 +
50895 +
50896 + var align_center_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M7.5 5.5h9V4h-9v1.5Zm-3.5 7h16V11H4v1.5Zm3.5 7h9V18h-9v1.5Z" }) });
50897 +
50898 +
50899 + ;// ./node_modules/@wordpress/icons/build-module/library/align-right.js
50900 +
50901 +
50902 + var align_right_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M11.111 5.5H20V4h-8.889v1.5ZM4 12.5h16V11H4v1.5Zm7.111 7H20V18h-8.889v1.5Z" }) });
50903 +
50904 +
50905 + ;// ./node_modules/@wordpress/icons/build-module/library/table-row-before.js
50906 +
50907 +
50908 + var table_row_before_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M21 5c0-1.1-.9-2-2-2H5c-1 0-1.9.8-2 1.8V19.2c.1.9.9 1.7 1.8 1.8H19c1.1 0 2-.9 2-2V5ZM4.5 14V5c0-.3.2-.5.5-.5h14c.3 0 .5.2.5.5v9h-15Zm4 5.5H5c-.3 0-.5-.2-.5-.5v-3.5h4v4Zm5.5 0h-4v-4h4v4Zm5.5-.5c0 .3-.2.5-.5.5h-3.5v-4h4V19ZM11.2 10h-3V8.5h3v-3h1.5v3h3V10h-3v3h-1.5v-3Z" }) });
50909 +
50910 +
50911 + ;// ./node_modules/@wordpress/icons/build-module/library/table-row-after.js
50912 +
50913 +
50914 + var table_row_after_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M19 3H4.8c-.9.1-1.7.9-1.8 1.8V19.2c.1 1 1 1.8 2 1.8h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2Zm-9 1.5h4v4h-4v-4ZM4.5 5c0-.3.2-.5.5-.5h3.5v4h-4V5Zm15 14c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5v-9h15v9Zm0-10.5h-4v-4H19c.3 0 .5.2.5.5v3.5Zm-8.3 10h1.5v-3h3V14h-3v-3h-1.5v3h-3v1.5h3v3Z" }) });
50915 +
50916 +
50917 + ;// ./node_modules/@wordpress/icons/build-module/library/table-row-delete.js
50918 +
50919 +
50920 + var table_row_delete_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M19 3H4.8c-.9.1-1.7.9-1.8 1.8V19.2c.1 1 1 1.8 2 1.8h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2Zm.5 16c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5v-9h15v9Zm0-10.5h-15V5c0-.3.2-.5.5-.5h14c.3 0 .5.2.5.5v3.5Zm-9.6 9.4 2.1-2.1 2.1 2.1 1.1-1.1-2.1-2.1 2.1-2.1-1.1-1.1-2.1 2.1-2.1-2.1-1.1 1.1 2.1 2.1-2.1 2.1 1.1 1.1Z" }) });
50921 +
50922 +
50923 + ;// ./node_modules/@wordpress/icons/build-module/library/table-column-before.js
50924 +
50925 +
50926 + var table_column_before_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M19 3H5c-1.1 0-2 .9-2 2v14c0 1 .8 1.9 1.8 2H19.2c.9-.1 1.7-.9 1.8-1.8V5c0-1.1-.9-2-2-2Zm-5 16.5H5c-.3 0-.5-.2-.5-.5V5c0-.3.2-.5.5-.5h9v15Zm5.5-.5c0 .3-.2.5-.5.5h-3.5v-4h4V19Zm0-5h-4v-4h4v4Zm0-5.5h-4v-4H19c.3 0 .5.2.5.5v3.5Zm-11 7.3H10v-3h3v-1.5h-3v-3H8.5v3h-3v1.5h3v3Z" }) });
50927 +
50928 +
50929 + ;// ./node_modules/@wordpress/icons/build-module/library/table-column-after.js
50930 +
50931 +
50932 + var table_column_after_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M19 3H5c-1.1 0-2 .9-2 2v14.2c.1.9.9 1.7 1.8 1.8H19.2c1-.1 1.8-1 1.8-2V5c0-1.1-.9-2-2-2ZM8.5 19.5H5c-.3 0-.5-.2-.5-.5v-3.5h4v4Zm0-5.5h-4v-4h4v4Zm0-5.5h-4V5c0-.3.2-.5.5-.5h3.5v4Zm11 10.5c0 .3-.2.5-.5.5h-9v-15h9c.3 0 .5.2.5.5v14Zm-4-10.8H14v3h-3v1.5h3v3h1.5v-3h3v-1.5h-3v-3Z" }) });
50933 +
50934 +
50935 + ;// ./node_modules/@wordpress/icons/build-module/library/table-column-delete.js
50936 +
50937 +
50938 + var table_column_delete_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M19 3H5c-1.1 0-2 .9-2 2v14.2c.1.9.9 1.7 1.8 1.8H19.2c1-.1 1.8-1 1.8-2V5c0-1.1-.9-2-2-2ZM8.5 19.5H5c-.3 0-.5-.2-.5-.5V5c0-.3.2-.5.5-.5h3.5v15Zm11-.5c0 .3-.2.5-.5.5h-9v-15h9c.3 0 .5.2.5.5v14ZM16.9 8.8l-2.1 2.1-2.1-2.1-1.1 1.1 2.1 2.1-2.1 2.1 1.1 1.1 2.1-2.1 2.1 2.1 1.1-1.1-2.1-2.1L18 9.9l-1.1-1.1Z" }) });
50939 +
50940 +
50941 + ;// ./node_modules/@wordpress/icons/build-module/library/table.js
50942 +
50943 +
50944 + var table_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2Zm.5 2v6.2h-6.8V4.4h6.2c.3 0 .5.2.5.5ZM5 4.5h6.2v6.8H4.4V5.1c0-.3.2-.5.5-.5ZM4.5 19v-6.2h6.8v6.8H5.1c-.3 0-.5-.2-.5-.5Zm14.5.5h-6.2v-6.8h6.8v6.2c0 .3-.2.5-.5.5Z" }) });
50945 +
50946 +
50947 + ;// ./node_modules/@wordpress/block-library/build-module/table/state.js
50948 + const INHERITED_COLUMN_ATTRIBUTES = ["align"];
50949 + function createTable({ rowCount, columnCount }) {
50950 + return {
50951 + body: Array.from({ length: rowCount }).map(() => ({
50952 + cells: Array.from({ length: columnCount }).map(() => ({
50953 + content: "",
50954 + tag: "td"
50955 + }))
50956 + }))
50957 + };
50958 + }
50959 + function getFirstRow(state) {
50960 + if (!isEmptyTableSection(state.head)) {
50961 + return state.head[0];
50962 + }
50963 + if (!isEmptyTableSection(state.body)) {
50964 + return state.body[0];
50965 + }
50966 + if (!isEmptyTableSection(state.foot)) {
50967 + return state.foot[0];
50968 + }
50969 + }
50970 + function getCellAttribute(state, cellLocation, attributeName) {
50971 + const { sectionName, rowIndex, columnIndex } = cellLocation;
50972 + return state[sectionName]?.[rowIndex]?.cells?.[columnIndex]?.[attributeName];
50973 + }
50974 + function updateSelectedCell(state, selection, updateCell) {
50975 + if (!selection) {
50976 + return state;
50977 + }
50978 + const tableSections = Object.fromEntries(
50979 + Object.entries(state).filter(
50980 + ([key]) => ["head", "body", "foot"].includes(key)
50981 + )
50982 + );
50983 + const { sectionName: selectionSectionName, rowIndex: selectionRowIndex } = selection;
50984 + return Object.fromEntries(
50985 + Object.entries(tableSections).map(([sectionName, section]) => {
50986 + if (selectionSectionName && selectionSectionName !== sectionName) {
50987 + return [sectionName, section];
50988 + }
50989 + return [
50990 + sectionName,
50991 + section.map((row, rowIndex) => {
50992 + if (selectionRowIndex && selectionRowIndex !== rowIndex) {
50993 + return row;
50994 + }
50995 + return {
50996 + cells: row.cells.map(
50997 + (cellAttributes, columnIndex) => {
50998 + const cellLocation = {
50999 + sectionName,
51000 + columnIndex,
51001 + rowIndex
51002 + };
51003 + if (!isCellSelected(cellLocation, selection)) {
51004 + return cellAttributes;
51005 + }
51006 + return updateCell(cellAttributes);
51007 + }
51008 + )
51009 + };
51010 + })
51011 + ];
51012 + })
51013 + );
51014 + }
51015 + function isCellSelected(cellLocation, selection) {
51016 + if (!cellLocation || !selection) {
51017 + return false;
51018 + }
51019 + switch (selection.type) {
51020 + case "column":
51021 + return selection.type === "column" && cellLocation.columnIndex === selection.columnIndex;
51022 + case "cell":
51023 + return selection.type === "cell" && cellLocation.sectionName === selection.sectionName && cellLocation.columnIndex === selection.columnIndex && cellLocation.rowIndex === selection.rowIndex;
51024 + }
51025 + }
51026 + function insertRow(state, { sectionName, rowIndex, columnCount }) {
51027 + const firstRow = getFirstRow(state);
51028 + const cellCount = columnCount === void 0 ? firstRow?.cells?.length : columnCount;
51029 + if (!cellCount) {
51030 + return state;
51031 + }
51032 + return {
51033 + [sectionName]: [
51034 + ...state[sectionName].slice(0, rowIndex),
51035 + {
51036 + cells: Array.from({ length: cellCount }).map(
51037 + (_, index) => {
51038 + const firstCellInColumn = firstRow?.cells?.[index] ?? {};
51039 + const inheritedAttributes = Object.fromEntries(
51040 + Object.entries(firstCellInColumn).filter(
51041 + ([key]) => INHERITED_COLUMN_ATTRIBUTES.includes(key)
51042 + )
51043 + );
51044 + return {
51045 + ...inheritedAttributes,
51046 + content: "",
51047 + tag: sectionName === "head" ? "th" : "td"
51048 + };
51049 + }
51050 + )
51051 + },
51052 + ...state[sectionName].slice(rowIndex)
51053 + ]
51054 + };
51055 + }
51056 + function deleteRow(state, { sectionName, rowIndex }) {
51057 + return {
51058 + [sectionName]: state[sectionName].filter(
51059 + (row, index) => index !== rowIndex
51060 + )
51061 + };
51062 + }
51063 + function insertColumn(state, { columnIndex }) {
51064 + const tableSections = Object.fromEntries(
51065 + Object.entries(state).filter(
51066 + ([key]) => ["head", "body", "foot"].includes(key)
51067 + )
51068 + );
51069 + return Object.fromEntries(
51070 + Object.entries(tableSections).map(([sectionName, section]) => {
51071 + if (isEmptyTableSection(section)) {
51072 + return [sectionName, section];
51073 + }
51074 + return [
51075 + sectionName,
51076 + section.map((row) => {
51077 + if (isEmptyRow(row) || row.cells.length < columnIndex) {
51078 + return row;
51079 + }
51080 + return {
51081 + cells: [
51082 + ...row.cells.slice(0, columnIndex),
51083 + {
51084 + content: "",
51085 + tag: sectionName === "head" ? "th" : "td"
51086 + },
51087 + ...row.cells.slice(columnIndex)
51088 + ]
51089 + };
51090 + })
51091 + ];
51092 + })
51093 + );
51094 + }
51095 + function deleteColumn(state, { columnIndex }) {
51096 + const tableSections = Object.fromEntries(
51097 + Object.entries(state).filter(
51098 + ([key]) => ["head", "body", "foot"].includes(key)
51099 + )
51100 + );
51101 + return Object.fromEntries(
51102 + Object.entries(tableSections).map(([sectionName, section]) => {
51103 + if (isEmptyTableSection(section)) {
51104 + return [sectionName, section];
51105 + }
51106 + return [
51107 + sectionName,
51108 + section.map((row) => ({
51109 + cells: row.cells.length >= columnIndex ? row.cells.filter(
51110 + (cell, index) => index !== columnIndex
51111 + ) : row.cells
51112 + })).filter((row) => row.cells.length)
51113 + ];
51114 + })
51115 + );
51116 + }
51117 + function toggleSection(state, sectionName) {
51118 + if (!isEmptyTableSection(state[sectionName])) {
51119 + return { [sectionName]: [] };
51120 + }
51121 + const columnCount = state.body?.[0]?.cells?.length ?? 1;
51122 + return insertRow(state, { sectionName, rowIndex: 0, columnCount });
51123 + }
51124 + function isEmptyTableSection(section) {
51125 + return !section || !section.length || section.every(isEmptyRow);
51126 + }
51127 + function isEmptyRow(row) {
51128 + return !(row.cells && row.cells.length);
51129 + }
51130 +
51131 +
51132 + ;// ./node_modules/@wordpress/block-library/build-module/table/edit.js
51133 +
51134 +
51135 +
51136 +
51137 +
51138 +
51139 +
51140 +
51141 +
51142 +
51143 + const ALIGNMENT_CONTROLS = [
51144 + {
51145 + icon: align_left_default,
51146 + title: (0,external_wp_i18n_namespaceObject.__)("Align column left"),
51147 + align: "left"
51148 + },
51149 + {
51150 + icon: align_center_default,
51151 + title: (0,external_wp_i18n_namespaceObject.__)("Align column center"),
51152 + align: "center"
51153 + },
51154 + {
51155 + icon: align_right_default,
51156 + title: (0,external_wp_i18n_namespaceObject.__)("Align column right"),
51157 + align: "right"
51158 + }
51159 + ];
51160 + const cellAriaLabel = {
51161 + head: (0,external_wp_i18n_namespaceObject.__)("Header cell text"),
51162 + body: (0,external_wp_i18n_namespaceObject.__)("Body cell text"),
51163 + foot: (0,external_wp_i18n_namespaceObject.__)("Footer cell text")
51164 + };
51165 + const placeholder = {
51166 + head: (0,external_wp_i18n_namespaceObject.__)("Header label"),
51167 + foot: (0,external_wp_i18n_namespaceObject.__)("Footer label")
51168 + };
51169 + function TSection({ name, ...props }) {
51170 + const TagName = `t${name}`;
51171 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(TagName, { ...props });
51172 + }
51173 + function TableEdit({
51174 + attributes,
51175 + setAttributes,
51176 + insertBlocksAfter,
51177 + isSelected: isSingleSelected
51178 + }) {
51179 + const { hasFixedLayout, head, foot } = attributes;
51180 + const [initialRowCount, setInitialRowCount] = (0,external_wp_element_namespaceObject.useState)(2);
51181 + const [initialColumnCount, setInitialColumnCount] = (0,external_wp_element_namespaceObject.useState)(2);
51182 + const [selectedCell, setSelectedCell] = (0,external_wp_element_namespaceObject.useState)();
51183 + const colorProps = (0,external_wp_blockEditor_namespaceObject.__experimentalUseColorProps)(attributes);
51184 + const borderProps = (0,external_wp_blockEditor_namespaceObject.__experimentalUseBorderProps)(attributes);
51185 + const blockEditingMode = (0,external_wp_blockEditor_namespaceObject.useBlockEditingMode)();
51186 + const tableRef = (0,external_wp_element_namespaceObject.useRef)();
51187 + const [hasTableCreated, setHasTableCreated] = (0,external_wp_element_namespaceObject.useState)(false);
51188 + const dropdownMenuProps = useToolsPanelDropdownMenuProps();
51189 + function onChangeInitialColumnCount(count) {
51190 + setInitialColumnCount(count);
51191 + }
51192 + function onChangeInitialRowCount(count) {
51193 + setInitialRowCount(count);
51194 + }
51195 + function onCreateTable(event) {
51196 + event.preventDefault();
51197 + setAttributes(
51198 + createTable({
51199 + rowCount: parseInt(initialRowCount, 10) || 2,
51200 + columnCount: parseInt(initialColumnCount, 10) || 2
51201 + })
51202 + );
51203 + setHasTableCreated(true);
51204 + }
51205 + function onChangeFixedLayout() {
51206 + setAttributes({ hasFixedLayout: !hasFixedLayout });
51207 + }
51208 + function onChange(content) {
51209 + if (!selectedCell) {
51210 + return;
51211 + }
51212 + setAttributes(
51213 + updateSelectedCell(
51214 + attributes,
51215 + selectedCell,
51216 + (cellAttributes) => ({
51217 + ...cellAttributes,
51218 + content
51219 + })
51220 + )
51221 + );
51222 + }
51223 + function onChangeColumnAlignment(align) {
51224 + if (!selectedCell) {
51225 + return;
51226 + }
51227 + const columnSelection = {
51228 + type: "column",
51229 + columnIndex: selectedCell.columnIndex
51230 + };
51231 + const newAttributes = updateSelectedCell(
51232 + attributes,
51233 + columnSelection,
51234 + (cellAttributes) => ({
51235 + ...cellAttributes,
51236 + align
51237 + })
51238 + );
51239 + setAttributes(newAttributes);
51240 + }
51241 + function getCellAlignment() {
51242 + if (!selectedCell) {
51243 + return;
51244 + }
51245 + return getCellAttribute(attributes, selectedCell, "align");
51246 + }
51247 + function onToggleHeaderSection() {
51248 + setAttributes(toggleSection(attributes, "head"));
51249 + }
51250 + function onToggleFooterSection() {
51251 + setAttributes(toggleSection(attributes, "foot"));
51252 + }
51253 + function onInsertRow(delta) {
51254 + if (!selectedCell) {
51255 + return;
51256 + }
51257 + const { sectionName, rowIndex } = selectedCell;
51258 + const newRowIndex = rowIndex + delta;
51259 + setAttributes(
51260 + insertRow(attributes, {
51261 + sectionName,
51262 + rowIndex: newRowIndex
51263 + })
51264 + );
51265 + setSelectedCell({
51266 + sectionName,
51267 + rowIndex: newRowIndex,
51268 + columnIndex: 0,
51269 + type: "cell"
51270 + });
51271 + }
51272 + function onInsertRowBefore() {
51273 + onInsertRow(0);
51274 + }
51275 + function onInsertRowAfter() {
51276 + onInsertRow(1);
51277 + }
51278 + function onDeleteRow() {
51279 + if (!selectedCell) {
51280 + return;
51281 + }
51282 + const { sectionName, rowIndex } = selectedCell;
51283 + setSelectedCell();
51284 + setAttributes(deleteRow(attributes, { sectionName, rowIndex }));
51285 + }
51286 + function onInsertColumn(delta = 0) {
51287 + if (!selectedCell) {
51288 + return;
51289 + }
51290 + const { columnIndex } = selectedCell;
51291 + const newColumnIndex = columnIndex + delta;
51292 + setAttributes(
51293 + insertColumn(attributes, {
51294 + columnIndex: newColumnIndex
51295 + })
51296 + );
51297 + setSelectedCell({
51298 + rowIndex: 0,
51299 + columnIndex: newColumnIndex,
51300 + type: "cell"
51301 + });
51302 + }
51303 + function onInsertColumnBefore() {
51304 + onInsertColumn(0);
51305 + }
51306 + function onInsertColumnAfter() {
51307 + onInsertColumn(1);
51308 + }
51309 + function onDeleteColumn() {
51310 + if (!selectedCell) {
51311 + return;
51312 + }
51313 + const { sectionName, columnIndex } = selectedCell;
51314 + setSelectedCell();
51315 + setAttributes(
51316 + deleteColumn(attributes, { sectionName, columnIndex })
51317 + );
51318 + }
51319 + (0,external_wp_element_namespaceObject.useEffect)(() => {
51320 + if (!isSingleSelected) {
51321 + setSelectedCell();
51322 + }
51323 + }, [isSingleSelected]);
51324 + (0,external_wp_element_namespaceObject.useEffect)(() => {
51325 + if (hasTableCreated) {
51326 + tableRef?.current?.querySelector('td div[contentEditable="true"]')?.focus();
51327 + setHasTableCreated(false);
51328 + }
51329 + }, [hasTableCreated]);
51330 + const sections = ["head", "body", "foot"].filter(
51331 + (name) => !isEmptyTableSection(attributes[name])
51332 + );
51333 + const tableControls = [
51334 + {
51335 + icon: table_row_before_default,
51336 + title: (0,external_wp_i18n_namespaceObject.__)("Insert row before"),
51337 + isDisabled: !selectedCell,
51338 + onClick: onInsertRowBefore
51339 + },
51340 + {
51341 + icon: table_row_after_default,
51342 + title: (0,external_wp_i18n_namespaceObject.__)("Insert row after"),
51343 + isDisabled: !selectedCell,
51344 + onClick: onInsertRowAfter
51345 + },
51346 + {
51347 + icon: table_row_delete_default,
51348 + title: (0,external_wp_i18n_namespaceObject.__)("Delete row"),
51349 + isDisabled: !selectedCell,
51350 + onClick: onDeleteRow
51351 + },
51352 + {
51353 + icon: table_column_before_default,
51354 + title: (0,external_wp_i18n_namespaceObject.__)("Insert column before"),
51355 + isDisabled: !selectedCell,
51356 + onClick: onInsertColumnBefore
51357 + },
51358 + {
51359 + icon: table_column_after_default,
51360 + title: (0,external_wp_i18n_namespaceObject.__)("Insert column after"),
51361 + isDisabled: !selectedCell,
51362 + onClick: onInsertColumnAfter
51363 + },
51364 + {
51365 + icon: table_column_delete_default,
51366 + title: (0,external_wp_i18n_namespaceObject.__)("Delete column"),
51367 + isDisabled: !selectedCell,
51368 + onClick: onDeleteColumn
51369 + }
51370 + ];
51371 + const renderedSections = sections.map((name) => /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(TSection, { name, children: attributes[name].map(({ cells }, rowIndex) => /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("tr", { children: cells.map(
51372 + ({
51373 + content,
51374 + tag: CellTag,
51375 + scope,
51376 + align,
51377 + colspan,
51378 + rowspan
51379 + }, columnIndex) => /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
51380 + CellTag,
51381 + {
51382 + scope: CellTag === "th" ? scope : void 0,
51383 + colSpan: colspan,
51384 + rowSpan: rowspan,
51385 + className: dist_clsx(
51386 + {
51387 + [`has-text-align-${align}`]: align
51388 + },
51389 + "wp-block-table__cell-content"
51390 + ),
51391 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
51392 + external_wp_blockEditor_namespaceObject.RichText,
51393 + {
51394 + value: content,
51395 + onChange,
51396 + onFocus: () => {
51397 + setSelectedCell({
51398 + sectionName: name,
51399 + rowIndex,
51400 + columnIndex,
51401 + type: "cell"
51402 + });
51403 + },
51404 + "aria-label": cellAriaLabel[name],
51405 + placeholder: placeholder[name]
51406 + }
51407 + )
51408 + },
51409 + columnIndex
51410 + )
51411 + ) }, rowIndex)) }, name));
51412 + const isEmpty = !sections.length;
51413 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("figure", { ...(0,external_wp_blockEditor_namespaceObject.useBlockProps)({ ref: tableRef }), children: [
51414 + !isEmpty && blockEditingMode === "default" && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
51415 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockControls, { group: "block", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
51416 + external_wp_blockEditor_namespaceObject.AlignmentControl,
51417 + {
51418 + label: (0,external_wp_i18n_namespaceObject.__)("Change column alignment"),
51419 + alignmentControls: ALIGNMENT_CONTROLS,
51420 + value: getCellAlignment(),
51421 + onChange: (nextAlign) => onChangeColumnAlignment(nextAlign)
51422 + }
51423 + ) }),
51424 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockControls, { group: "other", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
51425 + external_wp_components_namespaceObject.ToolbarDropdownMenu,
51426 + {
51427 + icon: table_default,
51428 + label: (0,external_wp_i18n_namespaceObject.__)("Edit table"),
51429 + controls: tableControls
51430 + }
51431 + ) })
51432 + ] }),
51433 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(
51434 + external_wp_components_namespaceObject.__experimentalToolsPanel,
51435 + {
51436 + label: (0,external_wp_i18n_namespaceObject.__)("Settings"),
51437 + resetAll: () => {
51438 + setAttributes({
51439 + hasFixedLayout: true,
51440 + head: [],
51441 + foot: []
51442 + });
51443 + },
51444 + dropdownMenuProps,
51445 + children: [
51446 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
51447 + external_wp_components_namespaceObject.__experimentalToolsPanelItem,
51448 + {
51449 + hasValue: () => hasFixedLayout !== true,
51450 + label: (0,external_wp_i18n_namespaceObject.__)("Fixed width table cells"),
51451 + onDeselect: () => setAttributes({ hasFixedLayout: true }),
51452 + isShownByDefault: true,
51453 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
51454 + external_wp_components_namespaceObject.ToggleControl,
51455 + {
51456 + __nextHasNoMarginBottom: true,
51457 + label: (0,external_wp_i18n_namespaceObject.__)("Fixed width table cells"),
51458 + checked: !!hasFixedLayout,
51459 + onChange: onChangeFixedLayout
51460 + }
51461 + )
51462 + }
51463 + ),
51464 + !isEmpty && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
51465 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
51466 + external_wp_components_namespaceObject.__experimentalToolsPanelItem,
51467 + {
51468 + hasValue: () => head && head.length,
51469 + label: (0,external_wp_i18n_namespaceObject.__)("Header section"),
51470 + onDeselect: () => setAttributes({ head: [] }),
51471 + isShownByDefault: true,
51472 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
51473 + external_wp_components_namespaceObject.ToggleControl,
51474 + {
51475 + __nextHasNoMarginBottom: true,
51476 + label: (0,external_wp_i18n_namespaceObject.__)("Header section"),
51477 + checked: !!(head && head.length),
51478 + onChange: onToggleHeaderSection
51479 + }
51480 + )
51481 + }
51482 + ),
51483 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
51484 + external_wp_components_namespaceObject.__experimentalToolsPanelItem,
51485 + {
51486 + hasValue: () => foot && foot.length,
51487 + label: (0,external_wp_i18n_namespaceObject.__)("Footer section"),
51488 + onDeselect: () => setAttributes({ foot: [] }),
51489 + isShownByDefault: true,
51490 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
51491 + external_wp_components_namespaceObject.ToggleControl,
51492 + {
51493 + __nextHasNoMarginBottom: true,
51494 + label: (0,external_wp_i18n_namespaceObject.__)("Footer section"),
51495 + checked: !!(foot && foot.length),
51496 + onChange: onToggleFooterSection
51497 + }
51498 + )
51499 + }
51500 + )
51501 + ] })
51502 + ]
51503 + }
51504 + ) }),
51505 + !isEmpty && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
51506 + "table",
51507 + {
51508 + className: dist_clsx(
51509 + colorProps.className,
51510 + borderProps.className,
51511 + {
51512 + "has-fixed-layout": hasFixedLayout,
51513 + // This is required in the editor only to overcome
51514 + // the fact the editor rewrites individual border
51515 + // widths into a shorthand format.
51516 + "has-individual-borders": (0,external_wp_components_namespaceObject.__experimentalHasSplitBorders)(
51517 + attributes?.style?.border
51518 + )
51519 + }
51520 + ),
51521 + style: { ...colorProps.style, ...borderProps.style },
51522 + children: renderedSections
51523 + }
51524 + ),
51525 + isEmpty ? /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
51526 + external_wp_components_namespaceObject.Placeholder,
51527 + {
51528 + label: (0,external_wp_i18n_namespaceObject.__)("Table"),
51529 + icon: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockIcon, { icon: block_table_default, showColors: true }),
51530 + instructions: (0,external_wp_i18n_namespaceObject.__)("Insert a table for sharing data."),
51531 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(
51532 + "form",
51533 + {
51534 + className: "blocks-table__placeholder-form",
51535 + onSubmit: onCreateTable,
51536 + children: [
51537 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
51538 + external_wp_components_namespaceObject.TextControl,
51539 + {
51540 + __nextHasNoMarginBottom: true,
51541 + __next40pxDefaultSize: true,
51542 + type: "number",
51543 + label: (0,external_wp_i18n_namespaceObject.__)("Column count"),
51544 + value: initialColumnCount,
51545 + onChange: onChangeInitialColumnCount,
51546 + min: "1",
51547 + className: "blocks-table__placeholder-input"
51548 + }
51549 + ),
51550 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
51551 + external_wp_components_namespaceObject.TextControl,
51552 + {
51553 + __nextHasNoMarginBottom: true,
51554 + __next40pxDefaultSize: true,
51555 + type: "number",
51556 + label: (0,external_wp_i18n_namespaceObject.__)("Row count"),
51557 + value: initialRowCount,
51558 + onChange: onChangeInitialRowCount,
51559 + min: "1",
51560 + className: "blocks-table__placeholder-input"
51561 + }
51562 + ),
51563 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
51564 + external_wp_components_namespaceObject.Button,
51565 + {
51566 + __next40pxDefaultSize: true,
51567 + variant: "primary",
51568 + type: "submit",
51569 + children: (0,external_wp_i18n_namespaceObject.__)("Create Table")
51570 + }
51571 + )
51572 + ]
51573 + }
51574 + )
51575 + }
51576 + ) : /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
51577 + Caption,
51578 + {
51579 + attributes,
51580 + setAttributes,
51581 + isSelected: isSingleSelected,
51582 + insertBlocksAfter,
51583 + label: (0,external_wp_i18n_namespaceObject.__)("Table caption text"),
51584 + showToolbarButton: isSingleSelected && blockEditingMode === "default"
51585 + }
51586 + )
51587 + ] });
51588 + }
51589 + var table_edit_edit_default = TableEdit;
51590 +
51591 +
51592 + ;// ./node_modules/@wordpress/block-library/build-module/table/block.json
51593 + const table_block_namespaceObject = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/table","title":"Table","category":"text","description":"Create structured content in rows and columns to display information.","textdomain":"default","attributes":{"hasFixedLayout":{"type":"boolean","default":true},"caption":{"type":"rich-text","source":"rich-text","selector":"figcaption","role":"content"},"head":{"type":"array","default":[],"source":"query","selector":"thead tr","query":{"cells":{"type":"array","default":[],"source":"query","selector":"td,th","query":{"content":{"type":"rich-text","source":"rich-text","role":"content"},"tag":{"type":"string","default":"td","source":"tag"},"scope":{"type":"string","source":"attribute","attribute":"scope"},"align":{"type":"string","source":"attribute","attribute":"data-align"},"colspan":{"type":"string","source":"attribute","attribute":"colspan"},"rowspan":{"type":"string","source":"attribute","attribute":"rowspan"}}}}},"body":{"type":"array","default":[],"source":"query","selector":"tbody tr","query":{"cells":{"type":"array","default":[],"source":"query","selector":"td,th","query":{"content":{"type":"rich-text","source":"rich-text","role":"content"},"tag":{"type":"string","default":"td","source":"tag"},"scope":{"type":"string","source":"attribute","attribute":"scope"},"align":{"type":"string","source":"attribute","attribute":"data-align"},"colspan":{"type":"string","source":"attribute","attribute":"colspan"},"rowspan":{"type":"string","source":"attribute","attribute":"rowspan"}}}}},"foot":{"type":"array","default":[],"source":"query","selector":"tfoot tr","query":{"cells":{"type":"array","default":[],"source":"query","selector":"td,th","query":{"content":{"type":"rich-text","source":"rich-text","role":"content"},"tag":{"type":"string","default":"td","source":"tag"},"scope":{"type":"string","source":"attribute","attribute":"scope"},"align":{"type":"string","source":"attribute","attribute":"data-align"},"colspan":{"type":"string","source":"attribute","attribute":"colspan"},"rowspan":{"type":"string","source":"attribute","attribute":"rowspan"}}}}}},"supports":{"anchor":true,"align":true,"color":{"__experimentalSkipSerialization":true,"gradients":true,"__experimentalDefaultControls":{"background":true,"text":true}},"spacing":{"margin":true,"padding":true,"__experimentalDefaultControls":{"margin":false,"padding":false}},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontStyle":true,"__experimentalFontWeight":true,"__experimentalLetterSpacing":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalDefaultControls":{"fontSize":true}},"__experimentalBorder":{"__experimentalSkipSerialization":true,"color":true,"style":true,"width":true,"__experimentalDefaultControls":{"color":true,"style":true,"width":true}},"interactivity":{"clientNavigation":true}},"selectors":{"root":".wp-block-table > table","spacing":".wp-block-table"},"styles":[{"name":"regular","label":"Default","isDefault":true},{"name":"stripes","label":"Stripes"}],"editorStyle":"wp-block-table-editor","style":"wp-block-table"}');
51594 + ;// ./node_modules/@wordpress/block-library/build-module/table/save.js
51595 +
51596 +
51597 +
51598 + function table_save_save({ attributes }) {
51599 + const { hasFixedLayout, head, body, foot, caption } = attributes;
51600 + const isEmpty = !head.length && !body.length && !foot.length;
51601 + if (isEmpty) {
51602 + return null;
51603 + }
51604 + const colorProps = (0,external_wp_blockEditor_namespaceObject.__experimentalGetColorClassesAndStyles)(attributes);
51605 + const borderProps = (0,external_wp_blockEditor_namespaceObject.__experimentalGetBorderClassesAndStyles)(attributes);
51606 + const classes = dist_clsx(colorProps.className, borderProps.className, {
51607 + "has-fixed-layout": hasFixedLayout
51608 + });
51609 + const hasCaption = !external_wp_blockEditor_namespaceObject.RichText.isEmpty(caption);
51610 + const Section = ({ type, rows }) => {
51611 + if (!rows.length) {
51612 + return null;
51613 + }
51614 + const Tag = `t${type}`;
51615 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(Tag, { children: rows.map(({ cells }, rowIndex) => /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("tr", { children: cells.map(
51616 + ({
51617 + content,
51618 + tag,
51619 + scope,
51620 + align,
51621 + colspan,
51622 + rowspan
51623 + }, cellIndex) => {
51624 + const cellClasses = dist_clsx({
51625 + [`has-text-align-${align}`]: align
51626 + });
51627 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
51628 + external_wp_blockEditor_namespaceObject.RichText.Content,
51629 + {
51630 + className: cellClasses ? cellClasses : void 0,
51631 + "data-align": align,
51632 + tagName: tag,
51633 + value: content,
51634 + scope: tag === "th" ? scope : void 0,
51635 + colSpan: colspan,
51636 + rowSpan: rowspan
51637 + },
51638 + cellIndex
51639 + );
51640 + }
51641 + ) }, rowIndex)) });
51642 + };
51643 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("figure", { ...external_wp_blockEditor_namespaceObject.useBlockProps.save(), children: [
51644 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(
51645 + "table",
51646 + {
51647 + className: classes === "" ? void 0 : classes,
51648 + style: { ...colorProps.style, ...borderProps.style },
51649 + children: [
51650 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(Section, { type: "head", rows: head }),
51651 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(Section, { type: "body", rows: body }),
51652 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(Section, { type: "foot", rows: foot })
51653 + ]
51654 + }
51655 + ),
51656 + hasCaption && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
51657 + external_wp_blockEditor_namespaceObject.RichText.Content,
51658 + {
51659 + tagName: "figcaption",
51660 + value: caption,
51661 + className: (0,external_wp_blockEditor_namespaceObject.__experimentalGetElementClassName)("caption")
51662 + }
51663 + )
51664 + ] });
51665 + }
51666 +
51667 +
51668 + ;// ./node_modules/@wordpress/block-library/build-module/table/utils.js
51669 + function normalizeRowColSpan(rowColSpan) {
51670 + const parsedValue = parseInt(rowColSpan, 10);
51671 + if (!Number.isInteger(parsedValue)) {
51672 + return void 0;
51673 + }
51674 + return parsedValue < 0 || parsedValue === 1 ? void 0 : parsedValue.toString();
51675 + }
51676 +
51677 +
51678 + ;// ./node_modules/@wordpress/block-library/build-module/table/transforms.js
51679 +
51680 +
51681 + const tableContentPasteSchema = ({ phrasingContentSchema }) => ({
51682 + tr: {
51683 + allowEmpty: true,
51684 + children: {
51685 + th: {
51686 + allowEmpty: true,
51687 + children: phrasingContentSchema,
51688 + attributes: ["scope", "colspan", "rowspan", "style"]
51689 + },
51690 + td: {
51691 + allowEmpty: true,
51692 + children: phrasingContentSchema,
51693 + attributes: ["colspan", "rowspan", "style"]
51694 + }
51695 + }
51696 + }
51697 + });
51698 + const tablePasteSchema = (args) => ({
51699 + table: {
51700 + children: {
51701 + thead: {
51702 + allowEmpty: true,
51703 + children: tableContentPasteSchema(args)
51704 + },
51705 + tfoot: {
51706 + allowEmpty: true,
51707 + children: tableContentPasteSchema(args)
51708 + },
51709 + tbody: {
51710 + allowEmpty: true,
51711 + children: tableContentPasteSchema(args)
51712 + }
51713 + }
51714 + }
51715 + });
51716 + const table_transforms_transforms = {
51717 + from: [
51718 + {
51719 + type: "raw",
51720 + selector: "table",
51721 + schema: tablePasteSchema,
51722 + transform: (node) => {
51723 + const attributes = Array.from(node.children).reduce(
51724 + (sectionAcc, section) => {
51725 + if (!section.children.length) {
51726 + return sectionAcc;
51727 + }
51728 + const sectionName = section.nodeName.toLowerCase().slice(1);
51729 + const sectionAttributes = Array.from(
51730 + section.children
51731 + ).reduce((rowAcc, row) => {
51732 + if (!row.children.length) {
51733 + return rowAcc;
51734 + }
51735 + const rowAttributes = Array.from(
51736 + row.children
51737 + ).reduce((colAcc, col) => {
51738 + const rowspan = normalizeRowColSpan(
51739 + col.getAttribute("rowspan")
51740 + );
51741 + const colspan = normalizeRowColSpan(
51742 + col.getAttribute("colspan")
51743 + );
51744 + const { textAlign } = col.style || {};
51745 + let align;
51746 + if (textAlign === "left" || textAlign === "center" || textAlign === "right") {
51747 + align = textAlign;
51748 + }
51749 + colAcc.push({
51750 + tag: col.nodeName.toLowerCase(),
51751 + content: col.innerHTML,
51752 + rowspan,
51753 + colspan,
51754 + align
51755 + });
51756 + return colAcc;
51757 + }, []);
51758 + rowAcc.push({
51759 + cells: rowAttributes
51760 + });
51761 + return rowAcc;
51762 + }, []);
51763 + sectionAcc[sectionName] = sectionAttributes;
51764 + return sectionAcc;
51765 + },
51766 + {}
51767 + );
51768 + return (0,external_wp_blocks_namespaceObject.createBlock)("core/table", attributes);
51769 + }
51770 + }
51771 + ]
51772 + };
51773 + var table_transforms_transforms_default = table_transforms_transforms;
51774 +
51775 +
51776 + ;// ./node_modules/@wordpress/block-library/build-module/table/index.js
51777 +
51778 +
51779 +
51780 +
51781 +
51782 +
51783 +
51784 +
51785 + const { name: table_name } = table_block_namespaceObject;
51786 + const table_settings = {
51787 + icon: block_table_default,
51788 + example: {
51789 + attributes: {
51790 + head: [
51791 + {
51792 + cells: [
51793 + {
51794 + content: (0,external_wp_i18n_namespaceObject.__)("Version"),
51795 + tag: "th"
51796 + },
51797 + {
51798 + content: (0,external_wp_i18n_namespaceObject.__)("Jazz Musician"),
51799 + tag: "th"
51800 + },
51801 + {
51802 + content: (0,external_wp_i18n_namespaceObject.__)("Release Date"),
51803 + tag: "th"
51804 + }
51805 + ]
51806 + }
51807 + ],
51808 + body: [
51809 + {
51810 + cells: [
51811 + {
51812 + content: "5.2",
51813 + tag: "td"
51814 + },
51815 + {
51816 + content: (0,external_wp_i18n_namespaceObject.__)("Jaco Pastorius"),
51817 + tag: "td"
51818 + },
51819 + {
51820 + content: (0,external_wp_i18n_namespaceObject.__)("May 7, 2019"),
51821 + tag: "td"
51822 + }
51823 + ]
51824 + },
51825 + {
51826 + cells: [
51827 + {
51828 + content: "5.1",
51829 + tag: "td"
51830 + },
51831 + {
51832 + content: (0,external_wp_i18n_namespaceObject.__)("Betty Carter"),
51833 + tag: "td"
51834 + },
51835 + {
51836 + content: (0,external_wp_i18n_namespaceObject.__)("February 21, 2019"),
51837 + tag: "td"
51838 + }
51839 + ]
51840 + },
51841 + {
51842 + cells: [
51843 + {
51844 + content: "5.0",
51845 + tag: "td"
51846 + },
51847 + {
51848 + content: (0,external_wp_i18n_namespaceObject.__)("Bebo Vald\xE9s"),
51849 + tag: "td"
51850 + },
51851 + {
51852 + content: (0,external_wp_i18n_namespaceObject.__)("December 6, 2018"),
51853 + tag: "td"
51854 + }
51855 + ]
51856 + }
51857 + ]
51858 + },
51859 + viewportWidth: 450
51860 + },
51861 + transforms: table_transforms_transforms_default,
51862 + edit: table_edit_edit_default,
51863 + save: table_save_save,
51864 + deprecated: table_deprecated_deprecated_default
51865 + };
51866 + const table_init = () => initBlock({ name: table_name, metadata: table_block_namespaceObject, settings: table_settings });
51867 +
51868 +
51869 + ;// ./node_modules/@wordpress/icons/build-module/library/table-of-contents.js
51870 +
51871 +
51872 + var table_of_contents_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: [
51873 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
51874 + external_wp_primitives_namespaceObject.Path,
51875 + {
51876 + fillRule: "evenodd",
51877 + clipRule: "evenodd",
51878 + d: "M20 9.484h-8.889v-1.5H20v1.5Zm0 7h-4.889v-1.5H20v1.5Zm-14 .032a1 1 0 1 0 0-2 1 1 0 0 0 0 2Zm0 1a2 2 0 1 0 0-4 2 2 0 0 0 0 4Z"
51879 + }
51880 + ),
51881 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M13 15.516a2 2 0 1 1-4 0 2 2 0 0 1 4 0ZM8 8.484a2 2 0 1 1-4 0 2 2 0 0 1 4 0Z" })
51882 + ] });
51883 +
51884 +
51885 + ;// ./node_modules/@wordpress/block-library/build-module/table-of-contents/block.json
51886 + const table_of_contents_block_namespaceObject = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"__experimental":true,"name":"core/table-of-contents","title":"Table of Contents","category":"design","description":"Summarize your post with a list of headings. Add HTML anchors to Heading blocks to link them here.","keywords":["document outline","summary"],"textdomain":"default","attributes":{"headings":{"type":"array","items":{"type":"object"},"default":[]},"onlyIncludeCurrentPage":{"type":"boolean","default":false},"maxLevel":{"type":"number"},"ordered":{"type":"boolean","default":true}},"supports":{"ariaLabel":true,"html":false,"color":{"text":true,"background":true,"gradients":true,"link":true},"spacing":{"margin":true,"padding":true},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"interactivity":{"clientNavigation":true},"__experimentalBorder":{"radius":true,"color":true,"width":true,"style":true,"__experimentalDefaultControls":{"radius":true,"color":true,"width":true,"style":true}}},"style":"wp-block-table-of-contents"}');
51887 + ;// ./node_modules/@wordpress/block-library/build-module/table-of-contents/list.js
51888 +
51889 + const ENTRY_CLASS_NAME = "wp-block-table-of-contents__entry";
51890 + function TableOfContentsList({
51891 + nestedHeadingList,
51892 + disableLinkActivation,
51893 + onClick,
51894 + ordered = true
51895 + }) {
51896 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: nestedHeadingList.map((node, index) => {
51897 + const { content, link } = node.heading;
51898 + const entry = link ? /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
51899 + "a",
51900 + {
51901 + className: ENTRY_CLASS_NAME,
51902 + href: link,
51903 + "aria-disabled": disableLinkActivation || void 0,
51904 + onClick: disableLinkActivation && "function" === typeof onClick ? onClick : void 0,
51905 + children: content
51906 + }
51907 + ) : /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("span", { className: ENTRY_CLASS_NAME, children: content });
51908 + const NestedListTag = ordered ? "ol" : "ul";
51909 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("li", { children: [
51910 + entry,
51911 + node.children ? /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(NestedListTag, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
51912 + TableOfContentsList,
51913 + {
51914 + nestedHeadingList: node.children,
51915 + disableLinkActivation,
51916 + onClick: disableLinkActivation && "function" === typeof onClick ? onClick : void 0,
51917 + ordered
51918 + }
51919 + ) }) : null
51920 + ] }, index);
51921 + }) });
51922 + }
51923 +
51924 +
51925 + ;// ./node_modules/@wordpress/block-library/build-module/table-of-contents/utils.js
51926 + function linearToNestedHeadingList(headingList) {
51927 + const nestedHeadingList = [];
51928 + headingList.forEach((heading, key) => {
51929 + if (heading.content === "") {
51930 + return;
51931 + }
51932 + if (heading.level === headingList[0].level) {
51933 + if (headingList[key + 1]?.level > heading.level) {
51934 + let endOfSlice = headingList.length;
51935 + for (let i = key + 1; i < headingList.length; i++) {
51936 + if (headingList[i].level === heading.level) {
51937 + endOfSlice = i;
51938 + break;
51939 + }
51940 + }
51941 + nestedHeadingList.push({
51942 + heading,
51943 + children: linearToNestedHeadingList(
51944 + headingList.slice(key + 1, endOfSlice)
51945 + )
51946 + });
51947 + } else {
51948 + nestedHeadingList.push({
51949 + heading,
51950 + children: null
51951 + });
51952 + }
51953 + }
51954 + });
51955 + return nestedHeadingList;
51956 + }
51957 +
51958 +
51959 + // EXTERNAL MODULE: ./node_modules/fast-deep-equal/es6/index.js
51960 + var es6 = __webpack_require__(7734);
51961 + var es6_default = /*#__PURE__*/__webpack_require__.n(es6);
51962 + ;// ./node_modules/@wordpress/block-library/build-module/table-of-contents/hooks.js
51963 +
51964 +
51965 +
51966 +
51967 +
51968 +
51969 + function getLatestHeadings(select, clientId) {
51970 + const {
51971 + getBlockAttributes,
51972 + getBlockName,
51973 + getBlocksByName,
51974 + getClientIdsOfDescendants
51975 + } = select(external_wp_blockEditor_namespaceObject.store);
51976 + const permalink = select("core/editor").getPermalink() ?? null;
51977 + const isPaginated = getBlocksByName("core/nextpage").length !== 0;
51978 + const { onlyIncludeCurrentPage, maxLevel } = getBlockAttributes(clientId) ?? {};
51979 + const [postContentClientId = ""] = getBlocksByName("core/post-content");
51980 + const allBlockClientIds = getClientIdsOfDescendants(postContentClientId);
51981 + let tocPage = 1;
51982 + if (isPaginated && onlyIncludeCurrentPage) {
51983 + const tocIndex = allBlockClientIds.indexOf(clientId);
51984 + for (const [
51985 + blockIndex,
51986 + blockClientId
51987 + ] of allBlockClientIds.entries()) {
51988 + if (blockIndex >= tocIndex) {
51989 + break;
51990 + }
51991 + if (getBlockName(blockClientId) === "core/nextpage") {
51992 + tocPage++;
51993 + }
51994 + }
51995 + }
51996 + const latestHeadings = [];
51997 + let headingPage = 1;
51998 + let headingPageLink = null;
51999 + if (typeof permalink === "string") {
52000 + headingPageLink = isPaginated ? (0,external_wp_url_namespaceObject.addQueryArgs)(permalink, { page: headingPage }) : permalink;
52001 + }
52002 + for (const blockClientId of allBlockClientIds) {
52003 + const blockName = getBlockName(blockClientId);
52004 + if (blockName === "core/nextpage") {
52005 + headingPage++;
52006 + if (onlyIncludeCurrentPage && headingPage > tocPage) {
52007 + break;
52008 + }
52009 + if (typeof permalink === "string") {
52010 + headingPageLink = (0,external_wp_url_namespaceObject.addQueryArgs)(
52011 + (0,external_wp_url_namespaceObject.removeQueryArgs)(permalink, ["page"]),
52012 + { page: headingPage }
52013 + );
52014 + }
52015 + } else if (!onlyIncludeCurrentPage || headingPage === tocPage) {
52016 + if (blockName === "core/heading") {
52017 + const headingAttributes = getBlockAttributes(blockClientId);
52018 + if (maxLevel && headingAttributes.level > maxLevel) {
52019 + continue;
52020 + }
52021 + const canBeLinked = typeof headingPageLink === "string" && typeof headingAttributes.anchor === "string" && headingAttributes.anchor !== "";
52022 + latestHeadings.push({
52023 + // Convert line breaks to spaces, and get rid of HTML tags in the headings.
52024 + content: (0,external_wp_dom_namespaceObject.__unstableStripHTML)(
52025 + headingAttributes.content.replace(
52026 + /(<br *\/?>)+/g,
52027 + " "
52028 + )
52029 + ),
52030 + level: headingAttributes.level,
52031 + link: canBeLinked ? `${headingPageLink}#${headingAttributes.anchor}` : null
52032 + });
52033 + }
52034 + }
52035 + }
52036 + return latestHeadings;
52037 + }
52038 + function observeCallback(select, dispatch, clientId) {
52039 + const { getBlockAttributes } = select(external_wp_blockEditor_namespaceObject.store);
52040 + const { updateBlockAttributes, __unstableMarkNextChangeAsNotPersistent } = dispatch(external_wp_blockEditor_namespaceObject.store);
52041 + const attributes = getBlockAttributes(clientId);
52042 + if (attributes === null) {
52043 + return;
52044 + }
52045 + const headings = getLatestHeadings(select, clientId);
52046 + if (!es6_default()(headings, attributes.headings)) {
52047 + window.queueMicrotask(() => {
52048 + __unstableMarkNextChangeAsNotPersistent();
52049 + updateBlockAttributes(clientId, { headings });
52050 + });
52051 + }
52052 + }
52053 + function useObserveHeadings(clientId) {
52054 + const registry = (0,external_wp_data_namespaceObject.useRegistry)();
52055 + (0,external_wp_element_namespaceObject.useEffect)(() => {
52056 + return registry.subscribe(
52057 + () => observeCallback(registry.select, registry.dispatch, clientId)
52058 + );
52059 + }, [registry, clientId]);
52060 + }
52061 +
52062 +
52063 + ;// ./node_modules/@wordpress/block-library/build-module/table-of-contents/edit.js
52064 +
52065 +
52066 +
52067 +
52068 +
52069 +
52070 +
52071 +
52072 +
52073 +
52074 +
52075 +
52076 +
52077 +
52078 + function TableOfContentsEdit({
52079 + attributes: {
52080 + headings = [],
52081 + onlyIncludeCurrentPage,
52082 + maxLevel,
52083 + ordered = true
52084 + },
52085 + clientId,
52086 + setAttributes
52087 + }) {
52088 + useObserveHeadings(clientId);
52089 + const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)();
52090 + const instanceId = (0,external_wp_compose_namespaceObject.useInstanceId)(
52091 + TableOfContentsEdit,
52092 + "table-of-contents"
52093 + );
52094 + const { createWarningNotice } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_notices_namespaceObject.store);
52095 + const showRedirectionPreventedNotice = (event) => {
52096 + event.preventDefault();
52097 + createWarningNotice((0,external_wp_i18n_namespaceObject.__)("Links are disabled in the editor."), {
52098 + id: `block-library/core/table-of-contents/redirection-prevented/${instanceId}`,
52099 + type: "snackbar"
52100 + });
52101 + };
52102 + const canInsertList = (0,external_wp_data_namespaceObject.useSelect)(
52103 + (select) => {
52104 + const { getBlockRootClientId, canInsertBlockType } = select(external_wp_blockEditor_namespaceObject.store);
52105 + const rootClientId = getBlockRootClientId(clientId);
52106 + return canInsertBlockType("core/list", rootClientId);
52107 + },
52108 + [clientId]
52109 + );
52110 + const { replaceBlocks } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_blockEditor_namespaceObject.store);
52111 + const dropdownMenuProps = useToolsPanelDropdownMenuProps();
52112 + const headingTree = linearToNestedHeadingList(headings);
52113 + const toolbarControls = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_blockEditor_namespaceObject.BlockControls, { children: [
52114 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.ToolbarGroup, { children: [
52115 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
52116 + external_wp_components_namespaceObject.ToolbarButton,
52117 + {
52118 + icon: (0,external_wp_i18n_namespaceObject.isRTL)() ? format_list_bullets_rtl_default : format_list_bullets_default,
52119 + title: (0,external_wp_i18n_namespaceObject.__)("Unordered"),
52120 + description: (0,external_wp_i18n_namespaceObject.__)("Convert to unordered list"),
52121 + onClick: () => setAttributes({ ordered: false }),
52122 + isActive: ordered === false
52123 + }
52124 + ),
52125 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
52126 + external_wp_components_namespaceObject.ToolbarButton,
52127 + {
52128 + icon: (0,external_wp_i18n_namespaceObject.isRTL)() ? format_list_numbered_rtl_default : format_list_numbered_default,
52129 + title: (0,external_wp_i18n_namespaceObject.__)("Ordered"),
52130 + description: (0,external_wp_i18n_namespaceObject.__)("Convert to ordered list"),
52131 + onClick: () => setAttributes({ ordered: true }),
52132 + isActive: ordered === true
52133 + }
52134 + )
52135 + ] }),
52136 + canInsertList && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ToolbarGroup, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
52137 + external_wp_components_namespaceObject.ToolbarButton,
52138 + {
52139 + onClick: () => replaceBlocks(
52140 + clientId,
52141 + (0,external_wp_blocks_namespaceObject.createBlock)("core/list", {
52142 + ordered,
52143 + values: (0,external_wp_element_namespaceObject.renderToString)(
52144 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
52145 + TableOfContentsList,
52146 + {
52147 + nestedHeadingList: headingTree,
52148 + ordered
52149 + }
52150 + )
52151 + )
52152 + })
52153 + ),
52154 + children: (0,external_wp_i18n_namespaceObject.__)("Convert to static list")
52155 + }
52156 + ) })
52157 + ] });
52158 + const inspectorControls = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(
52159 + external_wp_components_namespaceObject.__experimentalToolsPanel,
52160 + {
52161 + label: (0,external_wp_i18n_namespaceObject.__)("Settings"),
52162 + resetAll: () => {
52163 + setAttributes({
52164 + onlyIncludeCurrentPage: false,
52165 + maxLevel: void 0,
52166 + ordered: true
52167 + });
52168 + },
52169 + dropdownMenuProps,
52170 + children: [
52171 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
52172 + external_wp_components_namespaceObject.__experimentalToolsPanelItem,
52173 + {
52174 + hasValue: () => !!onlyIncludeCurrentPage,
52175 + label: (0,external_wp_i18n_namespaceObject.__)("Only include current page"),
52176 + onDeselect: () => setAttributes({ onlyIncludeCurrentPage: false }),
52177 + isShownByDefault: true,
52178 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
52179 + external_wp_components_namespaceObject.ToggleControl,
52180 + {
52181 + __nextHasNoMarginBottom: true,
52182 + label: (0,external_wp_i18n_namespaceObject.__)("Only include current page"),
52183 + checked: onlyIncludeCurrentPage,
52184 + onChange: (value) => setAttributes({ onlyIncludeCurrentPage: value }),
52185 + help: onlyIncludeCurrentPage ? (0,external_wp_i18n_namespaceObject.__)(
52186 + "Only including headings from the current page (if the post is paginated)."
52187 + ) : (0,external_wp_i18n_namespaceObject.__)(
52188 + "Include headings from all pages (if the post is paginated)."
52189 + )
52190 + }
52191 + )
52192 + }
52193 + ),
52194 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
52195 + external_wp_components_namespaceObject.__experimentalToolsPanelItem,
52196 + {
52197 + hasValue: () => !!maxLevel,
52198 + label: (0,external_wp_i18n_namespaceObject.__)("Limit heading levels"),
52199 + onDeselect: () => setAttributes({ maxLevel: void 0 }),
52200 + isShownByDefault: true,
52201 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
52202 + external_wp_components_namespaceObject.SelectControl,
52203 + {
52204 + __nextHasNoMarginBottom: true,
52205 + __next40pxDefaultSize: true,
52206 + label: (0,external_wp_i18n_namespaceObject.__)("Include headings down to level"),
52207 + value: maxLevel || "",
52208 + options: [
52209 + { value: "", label: (0,external_wp_i18n_namespaceObject.__)("All levels") },
52210 + { value: "1", label: (0,external_wp_i18n_namespaceObject.__)("Heading 1") },
52211 + { value: "2", label: (0,external_wp_i18n_namespaceObject.__)("Heading 2") },
52212 + { value: "3", label: (0,external_wp_i18n_namespaceObject.__)("Heading 3") },
52213 + { value: "4", label: (0,external_wp_i18n_namespaceObject.__)("Heading 4") },
52214 + { value: "5", label: (0,external_wp_i18n_namespaceObject.__)("Heading 5") },
52215 + { value: "6", label: (0,external_wp_i18n_namespaceObject.__)("Heading 6") }
52216 + ],
52217 + onChange: (value) => setAttributes({
52218 + maxLevel: value ? parseInt(value) : void 0
52219 + }),
52220 + help: !maxLevel ? (0,external_wp_i18n_namespaceObject.__)(
52221 + "Including all heading levels in the table of contents."
52222 + ) : (0,external_wp_i18n_namespaceObject.__)(
52223 + "Only include headings up to and including this level."
52224 + )
52225 + }
52226 + )
52227 + }
52228 + )
52229 + ]
52230 + }
52231 + ) });
52232 + if (headings.length === 0) {
52233 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
52234 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { ...blockProps, children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
52235 + external_wp_components_namespaceObject.Placeholder,
52236 + {
52237 + icon: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockIcon, { icon: table_of_contents_default }),
52238 + label: (0,external_wp_i18n_namespaceObject.__)("Table of Contents"),
52239 + instructions: (0,external_wp_i18n_namespaceObject.__)(
52240 + "Start adding Heading blocks to create a table of contents. Headings with HTML anchors will be linked here."
52241 + )
52242 + }
52243 + ) }),
52244 + inspectorControls
52245 + ] });
52246 + }
52247 + const ListTag = ordered ? "ol" : "ul";
52248 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
52249 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("nav", { ...blockProps, children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(ListTag, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
52250 + TableOfContentsList,
52251 + {
52252 + nestedHeadingList: headingTree,
52253 + disableLinkActivation: true,
52254 + onClick: showRedirectionPreventedNotice,
52255 + ordered
52256 + }
52257 + ) }) }),
52258 + toolbarControls,
52259 + inspectorControls
52260 + ] });
52261 + }
52262 +
52263 +
52264 + ;// ./node_modules/@wordpress/block-library/build-module/table-of-contents/save.js
52265 +
52266 +
52267 +
52268 +
52269 + function table_of_contents_save_save({
52270 + attributes: { headings = [], ordered = true }
52271 + }) {
52272 + if (headings.length === 0) {
52273 + return null;
52274 + }
52275 + const ListTag = ordered ? "ol" : "ul";
52276 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("nav", { ...external_wp_blockEditor_namespaceObject.useBlockProps.save(), children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(ListTag, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
52277 + TableOfContentsList,
52278 + {
52279 + nestedHeadingList: linearToNestedHeadingList(headings),
52280 + ordered
52281 + }
52282 + ) }) });
52283 + }
52284 +
52285 +
52286 + ;// ./node_modules/@wordpress/block-library/build-module/table-of-contents/index.js
52287 +
52288 +
52289 +
52290 +
52291 +
52292 +
52293 + const { name: table_of_contents_name } = table_of_contents_block_namespaceObject;
52294 + const table_of_contents_settings = {
52295 + icon: table_of_contents_default,
52296 + edit: TableOfContentsEdit,
52297 + save: table_of_contents_save_save,
52298 + example: {
52299 + innerBlocks: [
52300 + {
52301 + name: "core/heading",
52302 + attributes: {
52303 + level: 2,
52304 + content: (0,external_wp_i18n_namespaceObject.__)("Heading")
52305 + }
52306 + },
52307 + {
52308 + name: "core/heading",
52309 + attributes: {
52310 + level: 3,
52311 + content: (0,external_wp_i18n_namespaceObject.__)("Subheading")
52312 + }
52313 + },
52314 + {
52315 + name: "core/heading",
52316 + attributes: {
52317 + level: 2,
52318 + content: (0,external_wp_i18n_namespaceObject.__)("Heading")
52319 + }
52320 + },
52321 + {
52322 + name: "core/heading",
52323 + attributes: {
52324 + level: 3,
52325 + content: (0,external_wp_i18n_namespaceObject.__)("Subheading")
52326 + }
52327 + }
52328 + ],
52329 + attributes: {
52330 + headings: [
52331 + {
52332 + content: (0,external_wp_i18n_namespaceObject.__)("Heading"),
52333 + level: 2
52334 + },
52335 + {
52336 + content: (0,external_wp_i18n_namespaceObject.__)("Subheading"),
52337 + level: 3
52338 + },
52339 + {
52340 + content: (0,external_wp_i18n_namespaceObject.__)("Heading"),
52341 + level: 2
52342 + },
52343 + {
52344 + content: (0,external_wp_i18n_namespaceObject.__)("Subheading"),
52345 + level: 3
52346 + }
52347 + ]
52348 + }
52349 + }
52350 + };
52351 + const table_of_contents_init = () => initBlock({ name: table_of_contents_name, metadata: table_of_contents_block_namespaceObject, settings: table_of_contents_settings });
52352 +
52353 +
52354 + ;// ./node_modules/@wordpress/block-library/build-module/tag-cloud/transforms.js
52355 +
52356 + const tag_cloud_transforms_transforms = {
52357 + from: [
52358 + {
52359 + type: "block",
52360 + blocks: ["core/categories"],
52361 + transform: () => (0,external_wp_blocks_namespaceObject.createBlock)("core/tag-cloud")
52362 + }
52363 + ],
52364 + to: [
52365 + {
52366 + type: "block",
52367 + blocks: ["core/categories"],
52368 + transform: () => (0,external_wp_blocks_namespaceObject.createBlock)("core/categories")
52369 + }
52370 + ]
52371 + };
52372 + var tag_cloud_transforms_transforms_default = tag_cloud_transforms_transforms;
52373 +
52374 +
52375 + ;// ./node_modules/@wordpress/block-library/build-module/tag-cloud/block.json
52376 + const tag_cloud_block_namespaceObject = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/tag-cloud","title":"Tag Cloud","category":"widgets","description":"A cloud of popular keywords, each sized by how often it appears.","textdomain":"default","attributes":{"numberOfTags":{"type":"number","default":45,"minimum":1,"maximum":100},"taxonomy":{"type":"string","default":"post_tag"},"showTagCounts":{"type":"boolean","default":false},"smallestFontSize":{"type":"string","default":"8pt"},"largestFontSize":{"type":"string","default":"22pt"}},"styles":[{"name":"default","label":"Default","isDefault":true},{"name":"outline","label":"Outline"}],"supports":{"html":false,"align":true,"spacing":{"margin":true,"padding":true},"typography":{"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalLetterSpacing":true},"interactivity":{"clientNavigation":true},"__experimentalBorder":{"radius":true,"color":true,"width":true,"style":true,"__experimentalDefaultControls":{"radius":true,"color":true,"width":true,"style":true}}},"editorStyle":"wp-block-tag-cloud-editor"}');
52377 + ;// ./node_modules/@wordpress/block-library/build-module/tag-cloud/edit.js
52378 +
52379 +
52380 +
52381 +
52382 +
52383 +
52384 +
52385 +
52386 + const MIN_TAGS = 1;
52387 + const MAX_TAGS = 100;
52388 + const MIN_FONT_SIZE = 0.1;
52389 + const MAX_FONT_SIZE = 100;
52390 + function TagCloudEdit({ attributes, setAttributes }) {
52391 + const {
52392 + taxonomy,
52393 + showTagCounts,
52394 + numberOfTags,
52395 + smallestFontSize,
52396 + largestFontSize
52397 + } = attributes;
52398 + const [availableUnits] = (0,external_wp_blockEditor_namespaceObject.useSettings)("spacing.units");
52399 + const dropdownMenuProps = useToolsPanelDropdownMenuProps();
52400 + const units = (0,external_wp_components_namespaceObject.__experimentalUseCustomUnits)({
52401 + availableUnits: availableUnits ? [...availableUnits, "pt"] : ["%", "px", "em", "rem", "pt"]
52402 + });
52403 + const taxonomies = (0,external_wp_data_namespaceObject.useSelect)(
52404 + (select) => select(external_wp_coreData_namespaceObject.store).getTaxonomies({ per_page: -1 }),
52405 + []
52406 + );
52407 + const getTaxonomyOptions = () => {
52408 + const selectOption = {
52409 + label: (0,external_wp_i18n_namespaceObject.__)("- Select -"),
52410 + value: "",
52411 + disabled: true
52412 + };
52413 + const taxonomyOptions = (taxonomies ?? []).filter((tax) => !!tax.show_cloud).map((item) => {
52414 + return {
52415 + value: item.slug,
52416 + label: item.name
52417 + };
52418 + });
52419 + return [selectOption, ...taxonomyOptions];
52420 + };
52421 + const onFontSizeChange = (fontSizeLabel, newValue) => {
52422 + const [quantity, newUnit] = (0,external_wp_components_namespaceObject.__experimentalParseQuantityAndUnitFromRawValue)(newValue);
52423 + if (!Number.isFinite(quantity)) {
52424 + return;
52425 + }
52426 + const updateObj = { [fontSizeLabel]: newValue };
52427 + Object.entries({
52428 + smallestFontSize,
52429 + largestFontSize
52430 + }).forEach(([attribute, currentValue]) => {
52431 + const [currentQuantity, currentUnit] = (0,external_wp_components_namespaceObject.__experimentalParseQuantityAndUnitFromRawValue)(currentValue);
52432 + if (attribute !== fontSizeLabel && currentUnit !== newUnit) {
52433 + updateObj[attribute] = `${currentQuantity}${newUnit}`;
52434 + }
52435 + });
52436 + setAttributes(updateObj);
52437 + };
52438 + const serverSideAttributes = {
52439 + ...attributes,
52440 + style: {
52441 + ...attributes?.style,
52442 + border: void 0
52443 + }
52444 + };
52445 + const inspectorControls = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(
52446 + external_wp_components_namespaceObject.__experimentalToolsPanel,
52447 + {
52448 + label: (0,external_wp_i18n_namespaceObject.__)("Settings"),
52449 + resetAll: () => {
52450 + setAttributes({
52451 + taxonomy: "post_tag",
52452 + showTagCounts: false,
52453 + numberOfTags: 45,
52454 + smallestFontSize: "8pt",
52455 + largestFontSize: "22pt"
52456 + });
52457 + },
52458 + dropdownMenuProps,
52459 + children: [
52460 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
52461 + external_wp_components_namespaceObject.__experimentalToolsPanelItem,
52462 + {
52463 + hasValue: () => taxonomy !== "post_tag",
52464 + label: (0,external_wp_i18n_namespaceObject.__)("Taxonomy"),
52465 + onDeselect: () => setAttributes({ taxonomy: "post_tag" }),
52466 + isShownByDefault: true,
52467 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
52468 + external_wp_components_namespaceObject.SelectControl,
52469 + {
52470 + __nextHasNoMarginBottom: true,
52471 + __next40pxDefaultSize: true,
52472 + label: (0,external_wp_i18n_namespaceObject.__)("Taxonomy"),
52473 + options: getTaxonomyOptions(),
52474 + value: taxonomy,
52475 + onChange: (selectedTaxonomy) => setAttributes({ taxonomy: selectedTaxonomy })
52476 + }
52477 + )
52478 + }
52479 + ),
52480 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
52481 + external_wp_components_namespaceObject.__experimentalToolsPanelItem,
52482 + {
52483 + hasValue: () => smallestFontSize !== "8pt" || largestFontSize !== "22pt",
52484 + label: (0,external_wp_i18n_namespaceObject.__)("Font size"),
52485 + onDeselect: () => setAttributes({
52486 + smallestFontSize: "8pt",
52487 + largestFontSize: "22pt"
52488 + }),
52489 + isShownByDefault: true,
52490 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.Flex, { gap: 4, children: [
52491 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.FlexItem, { isBlock: true, children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
52492 + external_wp_components_namespaceObject.__experimentalUnitControl,
52493 + {
52494 + label: (0,external_wp_i18n_namespaceObject.__)("Smallest size"),
52495 + value: smallestFontSize,
52496 + onChange: (value) => {
52497 + onFontSizeChange(
52498 + "smallestFontSize",
52499 + value
52500 + );
52501 + },
52502 + units,
52503 + min: MIN_FONT_SIZE,
52504 + max: MAX_FONT_SIZE,
52505 + size: "__unstable-large"
52506 + }
52507 + ) }),
52508 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.FlexItem, { isBlock: true, children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
52509 + external_wp_components_namespaceObject.__experimentalUnitControl,
52510 + {
52511 + label: (0,external_wp_i18n_namespaceObject.__)("Largest size"),
52512 + value: largestFontSize,
52513 + onChange: (value) => {
52514 + onFontSizeChange(
52515 + "largestFontSize",
52516 + value
52517 + );
52518 + },
52519 + units,
52520 + min: MIN_FONT_SIZE,
52521 + max: MAX_FONT_SIZE,
52522 + size: "__unstable-large"
52523 + }
52524 + ) })
52525 + ] })
52526 + }
52527 + ),
52528 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
52529 + external_wp_components_namespaceObject.__experimentalToolsPanelItem,
52530 + {
52531 + hasValue: () => numberOfTags !== 45,
52532 + label: (0,external_wp_i18n_namespaceObject.__)("Number of tags"),
52533 + onDeselect: () => setAttributes({ numberOfTags: 45 }),
52534 + isShownByDefault: true,
52535 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
52536 + external_wp_components_namespaceObject.RangeControl,
52537 + {
52538 + __nextHasNoMarginBottom: true,
52539 + __next40pxDefaultSize: true,
52540 + label: (0,external_wp_i18n_namespaceObject.__)("Number of tags"),
52541 + value: numberOfTags,
52542 + onChange: (value) => setAttributes({ numberOfTags: value }),
52543 + min: MIN_TAGS,
52544 + max: MAX_TAGS,
52545 + required: true
52546 + }
52547 + )
52548 + }
52549 + ),
52550 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
52551 + external_wp_components_namespaceObject.__experimentalToolsPanelItem,
52552 + {
52553 + hasValue: () => showTagCounts !== false,
52554 + label: (0,external_wp_i18n_namespaceObject.__)("Show tag counts"),
52555 + onDeselect: () => setAttributes({ showTagCounts: false }),
52556 + isShownByDefault: true,
52557 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
52558 + external_wp_components_namespaceObject.ToggleControl,
52559 + {
52560 + __nextHasNoMarginBottom: true,
52561 + label: (0,external_wp_i18n_namespaceObject.__)("Show tag counts"),
52562 + checked: showTagCounts,
52563 + onChange: () => setAttributes({ showTagCounts: !showTagCounts })
52564 + }
52565 + )
52566 + }
52567 + )
52568 + ]
52569 + }
52570 + ) });
52571 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
52572 + inspectorControls,
52573 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { ...(0,external_wp_blockEditor_namespaceObject.useBlockProps)(), children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Disabled, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
52574 + (external_wp_serverSideRender_default()),
52575 + {
52576 + skipBlockSupportAttributes: true,
52577 + block: "core/tag-cloud",
52578 + attributes: serverSideAttributes
52579 + }
52580 + ) }) })
52581 + ] });
52582 + }
52583 + var tag_cloud_edit_edit_default = TagCloudEdit;
52584 +
52585 +
52586 + ;// ./node_modules/@wordpress/block-library/build-module/tag-cloud/index.js
52587 +
52588 +
52589 +
52590 +
52591 +
52592 + const { name: tag_cloud_name } = tag_cloud_block_namespaceObject;
52593 + const tag_cloud_settings = {
52594 + icon: tag_default,
52595 + example: {},
52596 + edit: tag_cloud_edit_edit_default,
52597 + transforms: tag_cloud_transforms_transforms_default
52598 + };
52599 + const tag_cloud_init = () => initBlock({ name: tag_cloud_name, metadata: tag_cloud_block_namespaceObject, settings: tag_cloud_settings });
52600 +
52601 +
52602 + ;// ./node_modules/tslib/tslib.es6.mjs
52603 + /******************************************************************************
52604 + Copyright (c) Microsoft Corporation.
52605 +
52606 + Permission to use, copy, modify, and/or distribute this software for any
52607 + purpose with or without fee is hereby granted.
52608 +
52609 + THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
52610 + REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
52611 + AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
52612 + INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
52613 + LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
52614 + OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
52615 + PERFORMANCE OF THIS SOFTWARE.
52616 + ***************************************************************************** */
52617 + /* global Reflect, Promise, SuppressedError, Symbol, Iterator */
52618 +
52619 + var extendStatics = function(d, b) {
52620 + extendStatics = Object.setPrototypeOf ||
52621 + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
52622 + function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
52623 + return extendStatics(d, b);
52624 + };
52625 +
52626 + function __extends(d, b) {
52627 + if (typeof b !== "function" && b !== null)
52628 + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
52629 + extendStatics(d, b);
52630 + function __() { this.constructor = d; }
52631 + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
52632 + }
52633 +
52634 + var __assign = function() {
52635 + __assign = Object.assign || function __assign(t) {
52636 + for (var s, i = 1, n = arguments.length; i < n; i++) {
52637 + s = arguments[i];
52638 + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
52639 + }
52640 + return t;
52641 + }
52642 + return __assign.apply(this, arguments);
52643 + }
52644 +
52645 + function __rest(s, e) {
52646 + var t = {};
52647 + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
52648 + t[p] = s[p];
52649 + if (s != null && typeof Object.getOwnPropertySymbols === "function")
52650 + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
52651 + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
52652 + t[p[i]] = s[p[i]];
52653 + }
52654 + return t;
52655 + }
52656 +
52657 + function __decorate(decorators, target, key, desc) {
52658 + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
52659 + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
52660 + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
52661 + return c > 3 && r && Object.defineProperty(target, key, r), r;
52662 + }
52663 +
52664 + function __param(paramIndex, decorator) {
52665 + return function (target, key) { decorator(target, key, paramIndex); }
52666 + }
52667 +
52668 + function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
52669 + function accept(f) { if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); return f; }
52670 + var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
52671 + var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null;
52672 + var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
52673 + var _, done = false;
52674 + for (var i = decorators.length - 1; i >= 0; i--) {
52675 + var context = {};
52676 + for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p];
52677 + for (var p in contextIn.access) context.access[p] = contextIn.access[p];
52678 + context.addInitializer = function (f) { if (done) throw new TypeError("Cannot add initializers after decoration has completed"); extraInitializers.push(accept(f || null)); };
52679 + var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);
52680 + if (kind === "accessor") {
52681 + if (result === void 0) continue;
52682 + if (result === null || typeof result !== "object") throw new TypeError("Object expected");
52683 + if (_ = accept(result.get)) descriptor.get = _;
52684 + if (_ = accept(result.set)) descriptor.set = _;
52685 + if (_ = accept(result.init)) initializers.unshift(_);
52686 + }
52687 + else if (_ = accept(result)) {
52688 + if (kind === "field") initializers.unshift(_);
52689 + else descriptor[key] = _;
52690 + }
52691 + }
52692 + if (target) Object.defineProperty(target, contextIn.name, descriptor);
52693 + done = true;
52694 + };
52695 +
52696 + function __runInitializers(thisArg, initializers, value) {
52697 + var useValue = arguments.length > 2;
52698 + for (var i = 0; i < initializers.length; i++) {
52699 + value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);
52700 + }
52701 + return useValue ? value : void 0;
52702 + };
52703 +
52704 + function __propKey(x) {
52705 + return typeof x === "symbol" ? x : "".concat(x);
52706 + };
52707 +
52708 + function __setFunctionName(f, name, prefix) {
52709 + if (typeof name === "symbol") name = name.description ? "[".concat(name.description, "]") : "";
52710 + return Object.defineProperty(f, "name", { configurable: true, value: prefix ? "".concat(prefix, " ", name) : name });
52711 + };
52712 +
52713 + function __metadata(metadataKey, metadataValue) {
52714 + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue);
52715 + }
52716 +
52717 + function __awaiter(thisArg, _arguments, P, generator) {
52718 + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
52719 + return new (P || (P = Promise))(function (resolve, reject) {
52720 + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
52721 + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
52722 + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
52723 + step((generator = generator.apply(thisArg, _arguments || [])).next());
52724 + });
52725 + }
52726 +
52727 + function __generator(thisArg, body) {
52728 + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
52729 + return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
52730 + function verb(n) { return function (v) { return step([n, v]); }; }
52731 + function step(op) {
52732 + if (f) throw new TypeError("Generator is already executing.");
52733 + while (g && (g = 0, op[0] && (_ = 0)), _) try {
52734 + if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
52735 + if (y = 0, t) op = [op[0] & 2, t.value];
52736 + switch (op[0]) {
52737 + case 0: case 1: t = op; break;
52738 + case 4: _.label++; return { value: op[1], done: false };
52739 + case 5: _.label++; y = op[1]; op = [0]; continue;
52740 + case 7: op = _.ops.pop(); _.trys.pop(); continue;
52741 + default:
52742 + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
52743 + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
52744 + if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
52745 + if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
52746 + if (t[2]) _.ops.pop();
52747 + _.trys.pop(); continue;
52748 + }
52749 + op = body.call(thisArg, _);
52750 + } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
52751 + if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
52752 + }
52753 + }
52754 +
52755 + var __createBinding = Object.create ? (function(o, m, k, k2) {
52756 + if (k2 === undefined) k2 = k;
52757 + var desc = Object.getOwnPropertyDescriptor(m, k);
52758 + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
52759 + desc = { enumerable: true, get: function() { return m[k]; } };
52760 + }
52761 + Object.defineProperty(o, k2, desc);
52762 + }) : (function(o, m, k, k2) {
52763 + if (k2 === undefined) k2 = k;
52764 + o[k2] = m[k];
52765 + });
52766 +
52767 + function __exportStar(m, o) {
52768 + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);
52769 + }
52770 +
52771 + function __values(o) {
52772 + var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
52773 + if (m) return m.call(o);
52774 + if (o && typeof o.length === "number") return {
52775 + next: function () {
52776 + if (o && i >= o.length) o = void 0;
52777 + return { value: o && o[i++], done: !o };
52778 + }
52779 + };
52780 + throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
52781 + }
52782 +
52783 + function __read(o, n) {
52784 + var m = typeof Symbol === "function" && o[Symbol.iterator];
52785 + if (!m) return o;
52786 + var i = m.call(o), r, ar = [], e;
52787 + try {
52788 + while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
52789 + }
52790 + catch (error) { e = { error: error }; }
52791 + finally {
52792 + try {
52793 + if (r && !r.done && (m = i["return"])) m.call(i);
52794 + }
52795 + finally { if (e) throw e.error; }
52796 + }
52797 + return ar;
52798 + }
52799 +
52800 + /** @deprecated */
52801 + function __spread() {
52802 + for (var ar = [], i = 0; i < arguments.length; i++)
52803 + ar = ar.concat(__read(arguments[i]));
52804 + return ar;
52805 + }
52806 +
52807 + /** @deprecated */
52808 + function __spreadArrays() {
52809 + for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
52810 + for (var r = Array(s), k = 0, i = 0; i < il; i++)
52811 + for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
52812 + r[k] = a[j];
52813 + return r;
52814 + }
52815 +
52816 + function __spreadArray(to, from, pack) {
52817 + if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
52818 + if (ar || !(i in from)) {
52819 + if (!ar) ar = Array.prototype.slice.call(from, 0, i);
52820 + ar[i] = from[i];
52821 + }
52822 + }
52823 + return to.concat(ar || Array.prototype.slice.call(from));
52824 + }
52825 +
52826 + function __await(v) {
52827 + return this instanceof __await ? (this.v = v, this) : new __await(v);
52828 + }
52829 +
52830 + function __asyncGenerator(thisArg, _arguments, generator) {
52831 + if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
52832 + var g = generator.apply(thisArg, _arguments || []), i, q = [];
52833 + return i = Object.create((typeof AsyncIterator === "function" ? AsyncIterator : Object).prototype), verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i;
52834 + function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; }
52835 + function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } }
52836 + function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }
52837 + function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
52838 + function fulfill(value) { resume("next", value); }
52839 + function reject(value) { resume("throw", value); }
52840 + function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }
52841 + }
52842 +
52843 + function __asyncDelegator(o) {
52844 + var i, p;
52845 + return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
52846 + function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; }
52847 + }
52848 +
52849 + function __asyncValues(o) {
52850 + if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
52851 + var m = o[Symbol.asyncIterator], i;
52852 + return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
52853 + function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
52854 + function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }
52855 + }
52856 +
52857 + function __makeTemplateObject(cooked, raw) {
52858 + if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
52859 + return cooked;
52860 + };
52861 +
52862 + var __setModuleDefault = Object.create ? (function(o, v) {
52863 + Object.defineProperty(o, "default", { enumerable: true, value: v });
52864 + }) : function(o, v) {
52865 + o["default"] = v;
52866 + };
52867 +
52868 + var ownKeys = function(o) {
52869 + ownKeys = Object.getOwnPropertyNames || function (o) {
52870 + var ar = [];
52871 + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
52872 + return ar;
52873 + };
52874 + return ownKeys(o);
52875 + };
52876 +
52877 + function __importStar(mod) {
52878 + if (mod && mod.__esModule) return mod;
52879 + var result = {};
52880 + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
52881 + __setModuleDefault(result, mod);
52882 + return result;
52883 + }
52884 +
52885 + function __importDefault(mod) {
52886 + return (mod && mod.__esModule) ? mod : { default: mod };
52887 + }
52888 +
52889 + function __classPrivateFieldGet(receiver, state, kind, f) {
52890 + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
52891 + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
52892 + return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
52893 + }
52894 +
52895 + function __classPrivateFieldSet(receiver, state, value, kind, f) {
52896 + if (kind === "m") throw new TypeError("Private method is not writable");
52897 + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
52898 + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
52899 + return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
52900 + }
52901 +
52902 + function __classPrivateFieldIn(state, receiver) {
52903 + if (receiver === null || (typeof receiver !== "object" && typeof receiver !== "function")) throw new TypeError("Cannot use 'in' operator on non-object");
52904 + return typeof state === "function" ? receiver === state : state.has(receiver);
52905 + }
52906 +
52907 + function __addDisposableResource(env, value, async) {
52908 + if (value !== null && value !== void 0) {
52909 + if (typeof value !== "object" && typeof value !== "function") throw new TypeError("Object expected.");
52910 + var dispose, inner;
52911 + if (async) {
52912 + if (!Symbol.asyncDispose) throw new TypeError("Symbol.asyncDispose is not defined.");
52913 + dispose = value[Symbol.asyncDispose];
52914 + }
52915 + if (dispose === void 0) {
52916 + if (!Symbol.dispose) throw new TypeError("Symbol.dispose is not defined.");
52917 + dispose = value[Symbol.dispose];
52918 + if (async) inner = dispose;
52919 + }
52920 + if (typeof dispose !== "function") throw new TypeError("Object not disposable.");
52921 + if (inner) dispose = function() { try { inner.call(this); } catch (e) { return Promise.reject(e); } };
52922 + env.stack.push({ value: value, dispose: dispose, async: async });
52923 + }
52924 + else if (async) {
52925 + env.stack.push({ async: true });
52926 + }
52927 + return value;
52928 + }
52929 +
52930 + var _SuppressedError = typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
52931 + var e = new Error(message);
52932 + return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
52933 + };
52934 +
52935 + function __disposeResources(env) {
52936 + function fail(e) {
52937 + env.error = env.hasError ? new _SuppressedError(e, env.error, "An error was suppressed during disposal.") : e;
52938 + env.hasError = true;
52939 + }
52940 + var r, s = 0;
52941 + function next() {
52942 + while (r = env.stack.pop()) {
52943 + try {
52944 + if (!r.async && s === 1) return s = 0, env.stack.push(r), Promise.resolve().then(next);
52945 + if (r.dispose) {
52946 + var result = r.dispose.call(r.value);
52947 + if (r.async) return s |= 2, Promise.resolve(result).then(next, function(e) { fail(e); return next(); });
52948 + }
52949 + else s |= 1;
52950 + }
52951 + catch (e) {
52952 + fail(e);
52953 + }
52954 + }
52955 + if (s === 1) return env.hasError ? Promise.reject(env.error) : Promise.resolve();
52956 + if (env.hasError) throw env.error;
52957 + }
52958 + return next();
52959 + }
52960 +
52961 + function __rewriteRelativeImportExtension(path, preserveJsx) {
52962 + if (typeof path === "string" && /^\.\.?\//.test(path)) {
52963 + return path.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i, function (m, tsx, d, ext, cm) {
52964 + return tsx ? preserveJsx ? ".jsx" : ".js" : d && (!ext || !cm) ? m : (d + ext + "." + cm.toLowerCase() + "js");
52965 + });
52966 + }
52967 + return path;
52968 + }
52969 +
52970 + /* harmony default export */ const tslib_es6 = ({
52971 + __extends,
52972 + __assign,
52973 + __rest,
52974 + __decorate,
52975 + __param,
52976 + __esDecorate,
52977 + __runInitializers,
52978 + __propKey,
52979 + __setFunctionName,
52980 + __metadata,
52981 + __awaiter,
52982 + __generator,
52983 + __createBinding,
52984 + __exportStar,
52985 + __values,
52986 + __read,
52987 + __spread,
52988 + __spreadArrays,
52989 + __spreadArray,
52990 + __await,
52991 + __asyncGenerator,
52992 + __asyncDelegator,
52993 + __asyncValues,
52994 + __makeTemplateObject,
52995 + __importStar,
52996 + __importDefault,
52997 + __classPrivateFieldGet,
52998 + __classPrivateFieldSet,
52999 + __classPrivateFieldIn,
53000 + __addDisposableResource,
53001 + __disposeResources,
53002 + __rewriteRelativeImportExtension,
53003 + });
53004 +
53005 + ;// ./node_modules/lower-case/dist.es2015/index.js
53006 + /**
53007 + * Source: ftp://ftp.unicode.org/Public/UCD/latest/ucd/SpecialCasing.txt
53008 + */
53009 + var SUPPORTED_LOCALE = {
53010 + tr: {
53011 + regexp: /\u0130|\u0049|\u0049\u0307/g,
53012 + map: {
53013 + İ: "\u0069",
53014 + I: "\u0131",
53015 + İ: "\u0069",
53016 + },
53017 + },
53018 + az: {
53019 + regexp: /\u0130/g,
53020 + map: {
53021 + İ: "\u0069",
53022 + I: "\u0131",
53023 + İ: "\u0069",
53024 + },
53025 + },
53026 + lt: {
53027 + regexp: /\u0049|\u004A|\u012E|\u00CC|\u00CD|\u0128/g,
53028 + map: {
53029 + I: "\u0069\u0307",
53030 + J: "\u006A\u0307",
53031 + Į: "\u012F\u0307",
53032 + Ì: "\u0069\u0307\u0300",
53033 + Í: "\u0069\u0307\u0301",
53034 + Ĩ: "\u0069\u0307\u0303",
53035 + },
53036 + },
53037 + };
53038 + /**
53039 + * Localized lower case.
53040 + */
53041 + function localeLowerCase(str, locale) {
53042 + var lang = SUPPORTED_LOCALE[locale.toLowerCase()];
53043 + if (lang)
53044 + return lowerCase(str.replace(lang.regexp, function (m) { return lang.map[m]; }));
53045 + return lowerCase(str);
53046 + }
53047 + /**
53048 + * Lower case as a function.
53049 + */
53050 + function lowerCase(str) {
53051 + return str.toLowerCase();
53052 + }
53053 +
53054 + ;// ./node_modules/no-case/dist.es2015/index.js
53055 +
53056 + // Support camel case ("camelCase" -> "camel Case" and "CAMELCase" -> "CAMEL Case").
53057 + var DEFAULT_SPLIT_REGEXP = [/([a-z0-9])([A-Z])/g, /([A-Z])([A-Z][a-z])/g];
53058 + // Remove all non-word characters.
53059 + var DEFAULT_STRIP_REGEXP = /[^A-Z0-9]+/gi;
53060 + /**
53061 + * Normalize the string into something other libraries can manipulate easier.
53062 + */
53063 + function noCase(input, options) {
53064 + if (options === void 0) { options = {}; }
53065 + var _a = options.splitRegexp, splitRegexp = _a === void 0 ? DEFAULT_SPLIT_REGEXP : _a, _b = options.stripRegexp, stripRegexp = _b === void 0 ? DEFAULT_STRIP_REGEXP : _b, _c = options.transform, transform = _c === void 0 ? lowerCase : _c, _d = options.delimiter, delimiter = _d === void 0 ? " " : _d;
53066 + var result = replace(replace(input, splitRegexp, "$1\0$2"), stripRegexp, "\0");
53067 + var start = 0;
53068 + var end = result.length;
53069 + // Trim the delimiter from around the output string.
53070 + while (result.charAt(start) === "\0")
53071 + start++;
53072 + while (result.charAt(end - 1) === "\0")
53073 + end--;
53074 + // Transform each token independently.
53075 + return result.slice(start, end).split("\0").map(transform).join(delimiter);
53076 + }
53077 + /**
53078 + * Replace `re` in the input string with the replacement value.
53079 + */
53080 + function replace(input, re, value) {
53081 + if (re instanceof RegExp)
53082 + return input.replace(re, value);
53083 + return re.reduce(function (input, re) { return input.replace(re, value); }, input);
53084 + }
53085 +
53086 + ;// ./node_modules/upper-case-first/dist.es2015/index.js
53087 + /**
53088 + * Upper case the first character of an input string.
53089 + */
53090 + function upperCaseFirst(input) {
53091 + return input.charAt(0).toUpperCase() + input.substr(1);
53092 + }
53093 +
53094 + ;// ./node_modules/capital-case/dist.es2015/index.js
53095 +
53096 +
53097 +
53098 + function capitalCaseTransform(input) {
53099 + return upperCaseFirst(input.toLowerCase());
53100 + }
53101 + function capitalCase(input, options) {
53102 + if (options === void 0) { options = {}; }
53103 + return noCase(input, __assign({ delimiter: " ", transform: capitalCaseTransform }, options));
53104 + }
53105 +
53106 + ;// ./node_modules/@wordpress/block-library/build-module/template-part/block.json
53107 + const template_part_block_namespaceObject = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/template-part","title":"Template Part","category":"theme","description":"Edit the different global regions of your site, like the header, footer, sidebar, or create your own.","textdomain":"default","attributes":{"slug":{"type":"string"},"theme":{"type":"string"},"tagName":{"type":"string"},"area":{"type":"string"}},"supports":{"align":true,"html":false,"reusable":false,"renaming":false,"interactivity":{"clientNavigation":true}},"editorStyle":"wp-block-template-part-editor"}');
53108 + ;// ./node_modules/dot-case/dist.es2015/index.js
53109 +
53110 +
53111 + function dotCase(input, options) {
53112 + if (options === void 0) { options = {}; }
53113 + return noCase(input, __assign({ delimiter: "." }, options));
53114 + }
53115 +
53116 + ;// ./node_modules/param-case/dist.es2015/index.js
53117 +
53118 +
53119 + function paramCase(input, options) {
53120 + if (options === void 0) { options = {}; }
53121 + return dotCase(input, __assign({ delimiter: "-" }, options));
53122 + }
53123 +
53124 + ;// ./node_modules/@wordpress/block-library/build-module/template-part/edit/utils/hooks.js
53125 +
53126 +
53127 +
53128 +
53129 +
53130 +
53131 +
53132 +
53133 + function useAlternativeTemplateParts(area, excludedId) {
53134 + const { templateParts, isResolving } = (0,external_wp_data_namespaceObject.useSelect)((select) => {
53135 + const { getEntityRecords, isResolving: _isResolving } = select(external_wp_coreData_namespaceObject.store);
53136 + const query = { per_page: -1 };
53137 + return {
53138 + templateParts: getEntityRecords(
53139 + "postType",
53140 + "wp_template_part",
53141 + query
53142 + ),
53143 + isResolving: _isResolving("getEntityRecords", [
53144 + "postType",
53145 + "wp_template_part",
53146 + query
53147 + ])
53148 + };
53149 + }, []);
53150 + const filteredTemplateParts = (0,external_wp_element_namespaceObject.useMemo)(() => {
53151 + if (!templateParts) {
53152 + return [];
53153 + }
53154 + return templateParts.filter(
53155 + (templatePart) => createTemplatePartId(
53156 + templatePart.theme,
53157 + templatePart.slug
53158 + ) !== excludedId && (!area || "uncategorized" === area || templatePart.area === area)
53159 + ) || [];
53160 + }, [templateParts, area, excludedId]);
53161 + return {
53162 + templateParts: filteredTemplateParts,
53163 + isResolving
53164 + };
53165 + }
53166 + function useAlternativeBlockPatterns(area, clientId) {
53167 + return (0,external_wp_data_namespaceObject.useSelect)(
53168 + (select) => {
53169 + const blockNameWithArea = area ? `core/template-part/${area}` : "core/template-part";
53170 + const { getBlockRootClientId, getPatternsByBlockTypes } = select(external_wp_blockEditor_namespaceObject.store);
53171 + const rootClientId = getBlockRootClientId(clientId);
53172 + return getPatternsByBlockTypes(blockNameWithArea, rootClientId);
53173 + },
53174 + [area, clientId]
53175 + );
53176 + }
53177 + function useCreateTemplatePartFromBlocks(area, setAttributes) {
53178 + const { saveEntityRecord } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_coreData_namespaceObject.store);
53179 + return async (blocks = [], title = (0,external_wp_i18n_namespaceObject.__)("Untitled Template Part")) => {
53180 + const cleanSlug = paramCase(title).replace(/[^\w-]+/g, "") || "wp-custom-part";
53181 + const record = {
53182 + title,
53183 + slug: cleanSlug,
53184 + content: (0,external_wp_blocks_namespaceObject.serialize)(blocks),
53185 + // `area` is filterable on the server and defaults to `UNCATEGORIZED`
53186 + // if provided value is not allowed.
53187 + area
53188 + };
53189 + const templatePart = await saveEntityRecord(
53190 + "postType",
53191 + "wp_template_part",
53192 + record
53193 + );
53194 + setAttributes({
53195 + slug: templatePart.slug,
53196 + theme: templatePart.theme,
53197 + area: void 0
53198 + });
53199 + };
53200 + }
53201 + function useTemplatePartArea(area) {
53202 + return (0,external_wp_data_namespaceObject.useSelect)(
53203 + (select) => {
53204 + const definedAreas = select(external_wp_coreData_namespaceObject.store).getCurrentTheme()?.default_template_part_areas || [];
53205 + const selectedArea = definedAreas.find(
53206 + (definedArea) => definedArea.area === area
53207 + );
53208 + const defaultArea = definedAreas.find(
53209 + (definedArea) => definedArea.area === "uncategorized"
53210 + );
53211 + return {
53212 + icon: selectedArea?.icon || defaultArea?.icon,
53213 + label: selectedArea?.label || (0,external_wp_i18n_namespaceObject.__)("Template Part"),
53214 + tagName: selectedArea?.area_tag ?? "div"
53215 + };
53216 + },
53217 + [area]
53218 + );
53219 + }
53220 +
53221 +
53222 + ;// ./node_modules/@wordpress/block-library/build-module/template-part/edit/title-modal.js
53223 +
53224 +
53225 +
53226 +
53227 + function TitleModal({ areaLabel, onClose, onSubmit }) {
53228 + const [title, setTitle] = (0,external_wp_element_namespaceObject.useState)("");
53229 + const submitForCreation = (event) => {
53230 + event.preventDefault();
53231 + onSubmit(title);
53232 + };
53233 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
53234 + external_wp_components_namespaceObject.Modal,
53235 + {
53236 + title: (0,external_wp_i18n_namespaceObject.sprintf)(
53237 + // Translators: %s as template part area title ("Header", "Footer", etc.).
53238 + (0,external_wp_i18n_namespaceObject.__)("Create new %s"),
53239 + areaLabel.toLowerCase()
53240 + ),
53241 + onRequestClose: onClose,
53242 + focusOnMount: "firstContentElement",
53243 + size: "small",
53244 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("form", { onSubmit: submitForCreation, children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.__experimentalVStack, { spacing: "5", children: [
53245 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
53246 + external_wp_components_namespaceObject.TextControl,
53247 + {
53248 + label: (0,external_wp_i18n_namespaceObject.__)("Name"),
53249 + value: title,
53250 + onChange: setTitle,
53251 + placeholder: (0,external_wp_i18n_namespaceObject.__)("Custom Template Part"),
53252 + __nextHasNoMarginBottom: true,
53253 + __next40pxDefaultSize: true
53254 + }
53255 + ),
53256 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.__experimentalHStack, { justify: "right", children: [
53257 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
53258 + external_wp_components_namespaceObject.Button,
53259 + {
53260 + __next40pxDefaultSize: true,
53261 + variant: "tertiary",
53262 + onClick: () => {
53263 + onClose();
53264 + setTitle("");
53265 + },
53266 + children: (0,external_wp_i18n_namespaceObject.__)("Cancel")
53267 + }
53268 + ),
53269 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
53270 + external_wp_components_namespaceObject.Button,
53271 + {
53272 + variant: "primary",
53273 + type: "submit",
53274 + accessibleWhenDisabled: true,
53275 + disabled: !title.length,
53276 + __next40pxDefaultSize: true,
53277 + children: (0,external_wp_i18n_namespaceObject.__)("Create")
53278 + }
53279 + )
53280 + ] })
53281 + ] }) })
53282 + }
53283 + );
53284 + }
53285 +
53286 +
53287 + ;// ./node_modules/@wordpress/block-library/build-module/template-part/edit/placeholder.js
53288 +
53289 +
53290 +
53291 +
53292 +
53293 +
53294 +
53295 +
53296 +
53297 + function TemplatePartPlaceholder({
53298 + area,
53299 + clientId,
53300 + templatePartId,
53301 + onOpenSelectionModal,
53302 + setAttributes
53303 + }) {
53304 + const { templateParts, isResolving } = useAlternativeTemplateParts(
53305 + area,
53306 + templatePartId
53307 + );
53308 + const blockPatterns = useAlternativeBlockPatterns(area, clientId);
53309 + const { isBlockBasedTheme, canCreateTemplatePart } = (0,external_wp_data_namespaceObject.useSelect)(
53310 + (select) => {
53311 + const { getCurrentTheme, canUser } = select(external_wp_coreData_namespaceObject.store);
53312 + return {
53313 + isBlockBasedTheme: getCurrentTheme()?.is_block_theme,
53314 + canCreateTemplatePart: canUser("create", {
53315 + kind: "postType",
53316 + name: "wp_template_part"
53317 + })
53318 + };
53319 + },
53320 + []
53321 + );
53322 + const [showTitleModal, setShowTitleModal] = (0,external_wp_element_namespaceObject.useState)(false);
53323 + const areaObject = useTemplatePartArea(area);
53324 + const createFromBlocks = useCreateTemplatePartFromBlocks(
53325 + area,
53326 + setAttributes
53327 + );
53328 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(
53329 + external_wp_components_namespaceObject.Placeholder,
53330 + {
53331 + icon: getTemplatePartIcon(areaObject.icon),
53332 + label: areaObject.label,
53333 + instructions: isBlockBasedTheme ? (0,external_wp_i18n_namespaceObject.sprintf)(
53334 + // Translators: %s as template part area title ("Header", "Footer", etc.).
53335 + (0,external_wp_i18n_namespaceObject.__)("Choose an existing %s or create a new one."),
53336 + areaObject.label.toLowerCase()
53337 + ) : (0,external_wp_i18n_namespaceObject.sprintf)(
53338 + // Translators: %s as template part area title ("Header", "Footer", etc.).
53339 + (0,external_wp_i18n_namespaceObject.__)("Choose an existing %s."),
53340 + areaObject.label.toLowerCase()
53341 + ),
53342 + children: [
53343 + isResolving && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Spinner, {}),
53344 + !isResolving && !!(templateParts.length || blockPatterns.length) && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
53345 + external_wp_components_namespaceObject.Button,
53346 + {
53347 + __next40pxDefaultSize: true,
53348 + variant: "primary",
53349 + onClick: onOpenSelectionModal,
53350 + children: (0,external_wp_i18n_namespaceObject.__)("Choose")
53351 + }
53352 + ),
53353 + !isResolving && isBlockBasedTheme && canCreateTemplatePart && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
53354 + external_wp_components_namespaceObject.Button,
53355 + {
53356 + __next40pxDefaultSize: true,
53357 + variant: "secondary",
53358 + onClick: () => {
53359 + setShowTitleModal(true);
53360 + },
53361 + children: (0,external_wp_i18n_namespaceObject.__)("Start blank")
53362 + }
53363 + ),
53364 + showTitleModal && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
53365 + TitleModal,
53366 + {
53367 + areaLabel: areaObject.label,
53368 + onClose: () => setShowTitleModal(false),
53369 + onSubmit: (title) => {
53370 + createFromBlocks([], title);
53371 + }
53372 + }
53373 + )
53374 + ]
53375 + }
53376 + );
53377 + }
53378 +
53379 +
53380 + ;// ./node_modules/@wordpress/block-library/build-module/template-part/edit/utils/map-template-part-to-block-pattern.js
53381 +
53382 +
53383 + function mapTemplatePartToBlockPattern(templatePart) {
53384 + return {
53385 + name: createTemplatePartId(templatePart.theme, templatePart.slug),
53386 + title: templatePart.title.rendered,
53387 + blocks: (0,external_wp_blocks_namespaceObject.parse)(templatePart.content.raw),
53388 + templatePart
53389 + };
53390 + }
53391 +
53392 +
53393 + ;// ./node_modules/@wordpress/block-library/build-module/template-part/edit/selection-modal.js
53394 +
53395 +
53396 +
53397 +
53398 +
53399 +
53400 +
53401 +
53402 +
53403 +
53404 + function TemplatePartSelectionModal({
53405 + setAttributes,
53406 + onClose,
53407 + templatePartId = null,
53408 + area,
53409 + clientId
53410 + }) {
53411 + const [searchValue, setSearchValue] = (0,external_wp_element_namespaceObject.useState)("");
53412 + const { templateParts } = useAlternativeTemplateParts(
53413 + area,
53414 + templatePartId
53415 + );
53416 + const filteredTemplateParts = (0,external_wp_element_namespaceObject.useMemo)(() => {
53417 + const partsAsPatterns = templateParts.map(
53418 + (templatePart) => mapTemplatePartToBlockPattern(templatePart)
53419 + );
53420 + return searchPatterns(partsAsPatterns, searchValue);
53421 + }, [templateParts, searchValue]);
53422 + const blockPatterns = useAlternativeBlockPatterns(area, clientId);
53423 + const filteredBlockPatterns = (0,external_wp_element_namespaceObject.useMemo)(() => {
53424 + return searchPatterns(blockPatterns, searchValue);
53425 + }, [blockPatterns, searchValue]);
53426 + const { createSuccessNotice } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_notices_namespaceObject.store);
53427 + const onTemplatePartSelect = (templatePart) => {
53428 + setAttributes({
53429 + slug: templatePart.slug,
53430 + theme: templatePart.theme,
53431 + area: void 0
53432 + });
53433 + createSuccessNotice(
53434 + (0,external_wp_i18n_namespaceObject.sprintf)(
53435 + /* translators: %s: template part title. */
53436 + (0,external_wp_i18n_namespaceObject.__)('Template Part "%s" inserted.'),
53437 + templatePart.title?.rendered || templatePart.slug
53438 + ),
53439 + {
53440 + type: "snackbar"
53441 + }
53442 + );
53443 + onClose();
53444 + };
53445 + const hasTemplateParts = !!filteredTemplateParts.length;
53446 + const hasBlockPatterns = !!filteredBlockPatterns.length;
53447 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", { className: "block-library-template-part__selection-content", children: [
53448 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { className: "block-library-template-part__selection-search", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
53449 + external_wp_components_namespaceObject.SearchControl,
53450 + {
53451 + __nextHasNoMarginBottom: true,
53452 + onChange: setSearchValue,
53453 + value: searchValue,
53454 + label: (0,external_wp_i18n_namespaceObject.__)("Search"),
53455 + placeholder: (0,external_wp_i18n_namespaceObject.__)("Search")
53456 + }
53457 + ) }),
53458 + hasTemplateParts && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", { children: [
53459 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("h2", { children: (0,external_wp_i18n_namespaceObject.__)("Existing template parts") }),
53460 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
53461 + external_wp_blockEditor_namespaceObject.__experimentalBlockPatternsList,
53462 + {
53463 + blockPatterns: filteredTemplateParts,
53464 + onClickPattern: (pattern) => {
53465 + onTemplatePartSelect(pattern.templatePart);
53466 + }
53467 + }
53468 + )
53469 + ] }),
53470 + !hasTemplateParts && !hasBlockPatterns && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalHStack, { alignment: "center", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("p", { children: (0,external_wp_i18n_namespaceObject.__)("No results found.") }) })
53471 + ] });
53472 + }
53473 +
53474 +
53475 + ;// ./node_modules/@wordpress/block-library/build-module/template-part/edit/utils/transformers.js
53476 +
53477 + function transformWidgetToBlock(widget) {
53478 + if (widget.id_base !== "block") {
53479 + let attributes;
53480 + if (widget._embedded.about[0].is_multi) {
53481 + attributes = {
53482 + idBase: widget.id_base,
53483 + instance: widget.instance
53484 + };
53485 + } else {
53486 + attributes = {
53487 + id: widget.id
53488 + };
53489 + }
53490 + return switchLegacyWidgetType(
53491 + (0,external_wp_blocks_namespaceObject.createBlock)("core/legacy-widget", attributes)
53492 + );
53493 + }
53494 + const parsedBlocks = (0,external_wp_blocks_namespaceObject.parse)(widget.instance.raw.content, {
53495 + __unstableSkipAutop: true
53496 + });
53497 + if (!parsedBlocks.length) {
53498 + return void 0;
53499 + }
53500 + const block = parsedBlocks[0];
53501 + if (block.name === "core/widget-group") {
53502 + return (0,external_wp_blocks_namespaceObject.createBlock)(
53503 + (0,external_wp_blocks_namespaceObject.getGroupingBlockName)(),
53504 + void 0,
53505 + transformInnerBlocks(block.innerBlocks)
53506 + );
53507 + }
53508 + if (block.innerBlocks.length > 0) {
53509 + return (0,external_wp_blocks_namespaceObject.cloneBlock)(
53510 + block,
53511 + void 0,
53512 + transformInnerBlocks(block.innerBlocks)
53513 + );
53514 + }
53515 + return block;
53516 + }
53517 + function switchLegacyWidgetType(block) {
53518 + const transforms = (0,external_wp_blocks_namespaceObject.getPossibleBlockTransformations)([block]).filter(
53519 + (item) => {
53520 + if (!item.transforms) {
53521 + return true;
53522 + }
53523 + const hasWildCardFrom = item.transforms?.from?.find(
53524 + (from) => from.blocks && from.blocks.includes("*")
53525 + );
53526 + const hasWildCardTo = item.transforms?.to?.find(
53527 + (to) => to.blocks && to.blocks.includes("*")
53528 + );
53529 + return !hasWildCardFrom && !hasWildCardTo;
53530 + }
53531 + );
53532 + if (!transforms.length) {
53533 + return void 0;
53534 + }
53535 + return (0,external_wp_blocks_namespaceObject.switchToBlockType)(block, transforms[0].name);
53536 + }
53537 + function transformInnerBlocks(innerBlocks = []) {
53538 + return innerBlocks.flatMap((block) => {
53539 + if (block.name === "core/legacy-widget") {
53540 + return switchLegacyWidgetType(block);
53541 + }
53542 + return (0,external_wp_blocks_namespaceObject.createBlock)(
53543 + block.name,
53544 + block.attributes,
53545 + transformInnerBlocks(block.innerBlocks)
53546 + );
53547 + }).filter((block) => !!block);
53548 + }
53549 +
53550 +
53551 + ;// ./node_modules/@wordpress/block-library/build-module/template-part/edit/import-controls.js
53552 +
53553 +
53554 +
53555 +
53556 +
53557 +
53558 +
53559 +
53560 +
53561 + const SIDEBARS_QUERY = {
53562 + per_page: -1,
53563 + _fields: "id,name,description,status,widgets"
53564 + };
53565 + function TemplatePartImportControls({ area, setAttributes }) {
53566 + const [selectedSidebar, setSelectedSidebar] = (0,external_wp_element_namespaceObject.useState)("");
53567 + const [isBusy, setIsBusy] = (0,external_wp_element_namespaceObject.useState)(false);
53568 + const registry = (0,external_wp_data_namespaceObject.useRegistry)();
53569 + const { sidebars, hasResolved } = (0,external_wp_data_namespaceObject.useSelect)((select) => {
53570 + const { getSidebars, hasFinishedResolution } = select(external_wp_coreData_namespaceObject.store);
53571 + return {
53572 + sidebars: getSidebars(SIDEBARS_QUERY),
53573 + hasResolved: hasFinishedResolution("getSidebars", [
53574 + SIDEBARS_QUERY
53575 + ])
53576 + };
53577 + }, []);
53578 + const { createErrorNotice } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_notices_namespaceObject.store);
53579 + const createFromBlocks = useCreateTemplatePartFromBlocks(
53580 + area,
53581 + setAttributes
53582 + );
53583 + const options = (0,external_wp_element_namespaceObject.useMemo)(() => {
53584 + const sidebarOptions = (sidebars ?? []).filter(
53585 + (widgetArea) => widgetArea.id !== "wp_inactive_widgets" && widgetArea.widgets.length > 0
53586 + ).map((widgetArea) => {
53587 + return {
53588 + value: widgetArea.id,
53589 + label: widgetArea.name
53590 + };
53591 + });
53592 + if (!sidebarOptions.length) {
53593 + return [];
53594 + }
53595 + return [
53596 + { value: "", label: (0,external_wp_i18n_namespaceObject.__)("Select widget area") },
53597 + ...sidebarOptions
53598 + ];
53599 + }, [sidebars]);
53600 + if (!hasResolved) {
53601 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalSpacer, { marginBottom: "0" });
53602 + }
53603 + if (hasResolved && !options.length) {
53604 + return null;
53605 + }
53606 + async function createFromWidgets(event) {
53607 + event.preventDefault();
53608 + if (isBusy || !selectedSidebar) {
53609 + return;
53610 + }
53611 + setIsBusy(true);
53612 + const sidebar = options.find(
53613 + ({ value }) => value === selectedSidebar
53614 + );
53615 + const { getWidgets } = registry.resolveSelect(external_wp_coreData_namespaceObject.store);
53616 + const widgets = await getWidgets({
53617 + sidebar: sidebar.value,
53618 + _embed: "about"
53619 + });
53620 + const skippedWidgets = /* @__PURE__ */ new Set();
53621 + const blocks = widgets.flatMap((widget) => {
53622 + const block = transformWidgetToBlock(widget);
53623 + if (!block) {
53624 + skippedWidgets.add(widget.id_base);
53625 + return [];
53626 + }
53627 + return block;
53628 + });
53629 + await createFromBlocks(
53630 + blocks,
53631 + /* translators: %s: name of the widget area */
53632 + (0,external_wp_i18n_namespaceObject.sprintf)((0,external_wp_i18n_namespaceObject.__)("Widget area: %s"), sidebar.label)
53633 + );
53634 + if (skippedWidgets.size) {
53635 + createErrorNotice(
53636 + (0,external_wp_i18n_namespaceObject.sprintf)(
53637 + /* translators: %s: the list of widgets */
53638 + (0,external_wp_i18n_namespaceObject.__)("Unable to import the following widgets: %s."),
53639 + Array.from(skippedWidgets).join(", ")
53640 + ),
53641 + {
53642 + type: "snackbar"
53643 + }
53644 + );
53645 + }
53646 + setIsBusy(false);
53647 + }
53648 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalSpacer, { marginBottom: "4", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.__experimentalHStack, { as: "form", onSubmit: createFromWidgets, children: [
53649 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.FlexBlock, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
53650 + external_wp_components_namespaceObject.SelectControl,
53651 + {
53652 + label: (0,external_wp_i18n_namespaceObject.__)("Import widget area"),
53653 + value: selectedSidebar,
53654 + options,
53655 + onChange: (value) => setSelectedSidebar(value),
53656 + disabled: !options.length,
53657 + __next40pxDefaultSize: true,
53658 + __nextHasNoMarginBottom: true
53659 + }
53660 + ) }),
53661 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
53662 + external_wp_components_namespaceObject.FlexItem,
53663 + {
53664 + style: {
53665 + marginBottom: "8px",
53666 + marginTop: "auto"
53667 + },
53668 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
53669 + external_wp_components_namespaceObject.Button,
53670 + {
53671 + __next40pxDefaultSize: true,
53672 + variant: "primary",
53673 + type: "submit",
53674 + isBusy,
53675 + "aria-disabled": isBusy || !selectedSidebar,
53676 + children: (0,external_wp_i18n_namespaceObject._x)("Import", "button label")
53677 + }
53678 + )
53679 + }
53680 + )
53681 + ] }) });
53682 + }
53683 +
53684 +
53685 + ;// ./node_modules/@wordpress/block-library/build-module/template-part/edit/advanced-controls.js
53686 +
53687 +
53688 +
53689 +
53690 +
53691 +
53692 +
53693 +
53694 + const { HTMLElementControl: advanced_controls_HTMLElementControl } = unlock(external_wp_blockEditor_namespaceObject.privateApis);
53695 + function TemplatePartAdvancedControls({
53696 + tagName,
53697 + setAttributes,
53698 + isEntityAvailable,
53699 + templatePartId,
53700 + defaultWrapper,
53701 + hasInnerBlocks,
53702 + clientId
53703 + }) {
53704 + const [area, setArea] = (0,external_wp_coreData_namespaceObject.useEntityProp)(
53705 + "postType",
53706 + "wp_template_part",
53707 + "area",
53708 + templatePartId
53709 + );
53710 + const [title, setTitle] = (0,external_wp_coreData_namespaceObject.useEntityProp)(
53711 + "postType",
53712 + "wp_template_part",
53713 + "title",
53714 + templatePartId
53715 + );
53716 + const defaultTemplatePartAreas = (0,external_wp_data_namespaceObject.useSelect)(
53717 + (select) => select(external_wp_coreData_namespaceObject.store).getCurrentTheme()?.default_template_part_areas || [],
53718 + []
53719 + );
53720 + const areaOptions = defaultTemplatePartAreas.map(
53721 + ({ label, area: _area }) => ({
53722 + label,
53723 + value: _area
53724 + })
53725 + );
53726 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
53727 + isEntityAvailable && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
53728 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
53729 + external_wp_components_namespaceObject.TextControl,
53730 + {
53731 + __next40pxDefaultSize: true,
53732 + __nextHasNoMarginBottom: true,
53733 + label: (0,external_wp_i18n_namespaceObject.__)("Title"),
53734 + value: title,
53735 + onChange: (value) => {
53736 + setTitle(value);
53737 + },
53738 + onFocus: (event) => event.target.select()
53739 + }
53740 + ),
53741 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
53742 + external_wp_components_namespaceObject.SelectControl,
53743 + {
53744 + __next40pxDefaultSize: true,
53745 + __nextHasNoMarginBottom: true,
53746 + label: (0,external_wp_i18n_namespaceObject.__)("Area"),
53747 + labelPosition: "top",
53748 + options: areaOptions,
53749 + value: area,
53750 + onChange: setArea
53751 + }
53752 + )
53753 + ] }),
53754 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
53755 + advanced_controls_HTMLElementControl,
53756 + {
53757 + tagName: tagName || "",
53758 + onChange: (value) => setAttributes({ tagName: value }),
53759 + clientId,
53760 + options: [
53761 + {
53762 + label: (0,external_wp_i18n_namespaceObject.sprintf)(
53763 + /* translators: %s: HTML tag based on area. */
53764 + (0,external_wp_i18n_namespaceObject.__)("Default based on area (%s)"),
53765 + `<${defaultWrapper}>`
53766 + ),
53767 + value: ""
53768 + },
53769 + { label: "<header>", value: "header" },
53770 + { label: "<main>", value: "main" },
53771 + { label: "<section>", value: "section" },
53772 + { label: "<article>", value: "article" },
53773 + { label: "<aside>", value: "aside" },
53774 + { label: "<footer>", value: "footer" },
53775 + { label: "<div>", value: "div" }
53776 + ]
53777 + }
53778 + ),
53779 + !hasInnerBlocks && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
53780 + TemplatePartImportControls,
53781 + {
53782 + area,
53783 + setAttributes
53784 + }
53785 + )
53786 + ] });
53787 + }
53788 +
53789 +
53790 + ;// ./node_modules/@wordpress/block-library/build-module/template-part/edit/inner-blocks.js
53791 +
53792 +
53793 +
53794 +
53795 +
53796 +
53797 + function useRenderAppender(hasInnerBlocks) {
53798 + const blockEditingMode = (0,external_wp_blockEditor_namespaceObject.useBlockEditingMode)();
53799 + if (blockEditingMode === "contentOnly") {
53800 + return false;
53801 + }
53802 + if (!hasInnerBlocks) {
53803 + return external_wp_blockEditor_namespaceObject.InnerBlocks.ButtonBlockAppender;
53804 + }
53805 + }
53806 + function useLayout(layout) {
53807 + const themeSupportsLayout = (0,external_wp_data_namespaceObject.useSelect)((select) => {
53808 + const { getSettings } = select(external_wp_blockEditor_namespaceObject.store);
53809 + return getSettings()?.supportsLayout;
53810 + }, []);
53811 + const [defaultLayout] = (0,external_wp_blockEditor_namespaceObject.useSettings)("layout");
53812 + if (themeSupportsLayout) {
53813 + return layout?.inherit ? defaultLayout || {} : layout;
53814 + }
53815 + }
53816 + function NonEditableTemplatePartPreview({
53817 + postId: id,
53818 + layout,
53819 + tagName: TagName,
53820 + blockProps
53821 + }) {
53822 + (0,external_wp_blockEditor_namespaceObject.useBlockEditingMode)("disabled");
53823 + const { content, editedBlocks } = (0,external_wp_data_namespaceObject.useSelect)(
53824 + (select) => {
53825 + if (!id) {
53826 + return {};
53827 + }
53828 + const { getEditedEntityRecord } = select(external_wp_coreData_namespaceObject.store);
53829 + const editedRecord = getEditedEntityRecord(
53830 + "postType",
53831 + "wp_template_part",
53832 + id,
53833 + { context: "view" }
53834 + );
53835 + return {
53836 + editedBlocks: editedRecord.blocks,
53837 + content: editedRecord.content
53838 + };
53839 + },
53840 + [id]
53841 + );
53842 + const blocks = (0,external_wp_element_namespaceObject.useMemo)(() => {
53843 + if (!id) {
53844 + return void 0;
53845 + }
53846 + if (editedBlocks) {
53847 + return editedBlocks;
53848 + }
53849 + if (!content || typeof content !== "string") {
53850 + return [];
53851 + }
53852 + return (0,external_wp_blocks_namespaceObject.parse)(content);
53853 + }, [id, editedBlocks, content]);
53854 + const innerBlocksProps = (0,external_wp_blockEditor_namespaceObject.useInnerBlocksProps)(blockProps, {
53855 + value: blocks,
53856 + onInput: () => {
53857 + },
53858 + onChange: () => {
53859 + },
53860 + renderAppender: false,
53861 + layout: useLayout(layout)
53862 + });
53863 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(TagName, { ...innerBlocksProps });
53864 + }
53865 + function EditableTemplatePartInnerBlocks({
53866 + postId: id,
53867 + hasInnerBlocks,
53868 + layout,
53869 + tagName: TagName,
53870 + blockProps
53871 + }) {
53872 + const onNavigateToEntityRecord = (0,external_wp_data_namespaceObject.useSelect)(
53873 + (select) => select(external_wp_blockEditor_namespaceObject.store).getSettings().onNavigateToEntityRecord,
53874 + []
53875 + );
53876 + const [blocks, onInput, onChange] = (0,external_wp_coreData_namespaceObject.useEntityBlockEditor)(
53877 + "postType",
53878 + "wp_template_part",
53879 + { id }
53880 + );
53881 + const innerBlocksProps = (0,external_wp_blockEditor_namespaceObject.useInnerBlocksProps)(blockProps, {
53882 + value: blocks,
53883 + onInput,
53884 + onChange,
53885 + renderAppender: useRenderAppender(hasInnerBlocks),
53886 + layout: useLayout(layout)
53887 + });
53888 + const blockEditingMode = (0,external_wp_blockEditor_namespaceObject.useBlockEditingMode)();
53889 + const customProps = blockEditingMode === "contentOnly" && onNavigateToEntityRecord ? {
53890 + onDoubleClick: () => onNavigateToEntityRecord({
53891 + postId: id,
53892 + postType: "wp_template_part"
53893 + })
53894 + } : {};
53895 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(TagName, { ...innerBlocksProps, ...customProps });
53896 + }
53897 + function TemplatePartInnerBlocks({
53898 + postId: id,
53899 + hasInnerBlocks,
53900 + layout,
53901 + tagName: TagName,
53902 + blockProps
53903 + }) {
53904 + const { canViewTemplatePart, canEditTemplatePart } = (0,external_wp_data_namespaceObject.useSelect)(
53905 + (select) => {
53906 + return {
53907 + canViewTemplatePart: !!select(external_wp_coreData_namespaceObject.store).canUser("read", {
53908 + kind: "postType",
53909 + name: "wp_template_part",
53910 + id
53911 + }),
53912 + canEditTemplatePart: !!select(external_wp_coreData_namespaceObject.store).canUser("update", {
53913 + kind: "postType",
53914 + name: "wp_template_part",
53915 + id
53916 + })
53917 + };
53918 + },
53919 + [id]
53920 + );
53921 + if (!canViewTemplatePart) {
53922 + return null;
53923 + }
53924 + const TemplatePartInnerBlocksComponent = canEditTemplatePart ? EditableTemplatePartInnerBlocks : NonEditableTemplatePartPreview;
53925 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
53926 + TemplatePartInnerBlocksComponent,
53927 + {
53928 + postId: id,
53929 + hasInnerBlocks,
53930 + layout,
53931 + tagName: TagName,
53932 + blockProps
53933 + }
53934 + );
53935 + }
53936 +
53937 +
53938 + ;// ./node_modules/@wordpress/block-library/build-module/template-part/edit/index.js
53939 +
53940 +
53941 +
53942 +
53943 +
53944 +
53945 +
53946 +
53947 +
53948 +
53949 +
53950 +
53951 +
53952 +
53953 +
53954 + function ReplaceButton({
53955 + isEntityAvailable,
53956 + area,
53957 + templatePartId,
53958 + isTemplatePartSelectionOpen,
53959 + setIsTemplatePartSelectionOpen
53960 + }) {
53961 + const { templateParts } = useAlternativeTemplateParts(
53962 + area,
53963 + templatePartId
53964 + );
53965 + const hasReplacements = !!templateParts.length;
53966 + const canReplace = isEntityAvailable && hasReplacements && (area === "header" || area === "footer");
53967 + if (!canReplace) {
53968 + return null;
53969 + }
53970 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
53971 + external_wp_components_namespaceObject.MenuItem,
53972 + {
53973 + onClick: () => {
53974 + setIsTemplatePartSelectionOpen(true);
53975 + },
53976 + "aria-expanded": isTemplatePartSelectionOpen,
53977 + "aria-haspopup": "dialog",
53978 + children: (0,external_wp_i18n_namespaceObject.__)("Replace")
53979 + }
53980 + );
53981 + }
53982 + function TemplatesList({ area, clientId, isEntityAvailable, onSelect }) {
53983 + const blockPatterns = useAlternativeBlockPatterns(area, clientId);
53984 + const canReplace = isEntityAvailable && !!blockPatterns.length && (area === "header" || area === "footer");
53985 + if (!canReplace) {
53986 + return null;
53987 + }
53988 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.PanelBody, { title: (0,external_wp_i18n_namespaceObject.__)("Design"), children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
53989 + external_wp_blockEditor_namespaceObject.__experimentalBlockPatternsList,
53990 + {
53991 + label: (0,external_wp_i18n_namespaceObject.__)("Templates"),
53992 + blockPatterns,
53993 + onClickPattern: onSelect,
53994 + showTitlesAsTooltip: true
53995 + }
53996 + ) });
53997 + }
53998 + function TemplatePartEdit({
53999 + attributes,
54000 + setAttributes,
54001 + clientId
54002 + }) {
54003 + const { createSuccessNotice } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_notices_namespaceObject.store);
54004 + const { editEntityRecord } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_coreData_namespaceObject.store);
54005 + const currentTheme = (0,external_wp_data_namespaceObject.useSelect)(
54006 + (select) => select(external_wp_coreData_namespaceObject.store).getCurrentTheme()?.stylesheet,
54007 + []
54008 + );
54009 + const { slug, theme = currentTheme, tagName, layout = {} } = attributes;
54010 + const templatePartId = createTemplatePartId(theme, slug);
54011 + const hasAlreadyRendered = (0,external_wp_blockEditor_namespaceObject.useHasRecursion)(templatePartId);
54012 + const [isTemplatePartSelectionOpen, setIsTemplatePartSelectionOpen] = (0,external_wp_element_namespaceObject.useState)(false);
54013 + const {
54014 + isResolved,
54015 + hasInnerBlocks,
54016 + isMissing,
54017 + area,
54018 + onNavigateToEntityRecord,
54019 + title,
54020 + canUserEdit
54021 + } = (0,external_wp_data_namespaceObject.useSelect)(
54022 + (select) => {
54023 + const { getEditedEntityRecord, hasFinishedResolution } = select(external_wp_coreData_namespaceObject.store);
54024 + const { getBlockCount, getSettings } = select(external_wp_blockEditor_namespaceObject.store);
54025 + const getEntityArgs = [
54026 + "postType",
54027 + "wp_template_part",
54028 + templatePartId
54029 + ];
54030 + const entityRecord = templatePartId ? getEditedEntityRecord(...getEntityArgs) : null;
54031 + const _area = entityRecord?.area || attributes.area;
54032 + const hasResolvedEntity = templatePartId ? hasFinishedResolution(
54033 + "getEditedEntityRecord",
54034 + getEntityArgs
54035 + ) : false;
54036 + const _canUserEdit = hasResolvedEntity ? select(external_wp_coreData_namespaceObject.store).canUser("update", {
54037 + kind: "postType",
54038 + name: "wp_template_part",
54039 + id: templatePartId
54040 + }) : false;
54041 + return {
54042 + hasInnerBlocks: getBlockCount(clientId) > 0,
54043 + isResolved: hasResolvedEntity,
54044 + isMissing: hasResolvedEntity && (!entityRecord || Object.keys(entityRecord).length === 0),
54045 + area: _area,
54046 + onNavigateToEntityRecord: getSettings().onNavigateToEntityRecord,
54047 + title: entityRecord?.title,
54048 + canUserEdit: !!_canUserEdit
54049 + };
54050 + },
54051 + [templatePartId, attributes.area, clientId]
54052 + );
54053 + const areaObject = useTemplatePartArea(area);
54054 + const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)();
54055 + const isPlaceholder = !slug;
54056 + const isEntityAvailable = !isPlaceholder && !isMissing && isResolved;
54057 + const TagName = tagName || areaObject.tagName;
54058 + const onPatternSelect = async (pattern) => {
54059 + await editEntityRecord(
54060 + "postType",
54061 + "wp_template_part",
54062 + templatePartId,
54063 + {
54064 + blocks: pattern.blocks,
54065 + content: (0,external_wp_blocks_namespaceObject.serialize)(pattern.blocks)
54066 + }
54067 + );
54068 + createSuccessNotice(
54069 + (0,external_wp_i18n_namespaceObject.sprintf)(
54070 + /* translators: %s: template part title. */
54071 + (0,external_wp_i18n_namespaceObject.__)('Template Part "%s" updated.'),
54072 + title || slug
54073 + ),
54074 + {
54075 + type: "snackbar"
54076 + }
54077 + );
54078 + };
54079 + if (!hasInnerBlocks && (slug && !theme || slug && isMissing)) {
54080 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(TagName, { ...blockProps, children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.Warning, { children: (0,external_wp_i18n_namespaceObject.sprintf)(
54081 + /* translators: %s: Template part slug. */
54082 + (0,external_wp_i18n_namespaceObject.__)(
54083 + "Template part has been deleted or is unavailable: %s"
54084 + ),
54085 + slug
54086 + ) }) });
54087 + }
54088 + if (isEntityAvailable && hasAlreadyRendered) {
54089 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(TagName, { ...blockProps, children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.Warning, { children: (0,external_wp_i18n_namespaceObject.__)("Block cannot be rendered inside itself.") }) });
54090 + }
54091 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
54092 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_blockEditor_namespaceObject.RecursionProvider, { uniqueId: templatePartId, children: [
54093 + isEntityAvailable && onNavigateToEntityRecord && canUserEdit && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockControls, { group: "other", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
54094 + external_wp_components_namespaceObject.ToolbarButton,
54095 + {
54096 + onClick: () => onNavigateToEntityRecord({
54097 + postId: templatePartId,
54098 + postType: "wp_template_part"
54099 + }),
54100 + children: (0,external_wp_i18n_namespaceObject.__)("Edit")
54101 + }
54102 + ) }),
54103 + canUserEdit && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, { group: "advanced", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
54104 + TemplatePartAdvancedControls,
54105 + {
54106 + tagName,
54107 + setAttributes,
54108 + isEntityAvailable,
54109 + templatePartId,
54110 + defaultWrapper: areaObject.tagName,
54111 + hasInnerBlocks,
54112 + clientId
54113 + }
54114 + ) }),
54115 + isPlaceholder && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(TagName, { ...blockProps, children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
54116 + TemplatePartPlaceholder,
54117 + {
54118 + area: attributes.area,
54119 + templatePartId,
54120 + clientId,
54121 + setAttributes,
54122 + onOpenSelectionModal: () => setIsTemplatePartSelectionOpen(true)
54123 + }
54124 + ) }),
54125 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockSettingsMenuControls, { children: ({ selectedClientIds }) => {
54126 + if (!(selectedClientIds.length === 1 && clientId === selectedClientIds[0])) {
54127 + return null;
54128 + }
54129 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
54130 + ReplaceButton,
54131 + {
54132 + ...{
54133 + isEntityAvailable,
54134 + area,
54135 + clientId,
54136 + templatePartId,
54137 + isTemplatePartSelectionOpen,
54138 + setIsTemplatePartSelectionOpen
54139 + }
54140 + }
54141 + );
54142 + } }),
54143 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
54144 + TemplatesList,
54145 + {
54146 + area,
54147 + clientId,
54148 + isEntityAvailable,
54149 + onSelect: (pattern) => onPatternSelect(pattern)
54150 + }
54151 + ) }),
54152 + isEntityAvailable && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
54153 + TemplatePartInnerBlocks,
54154 + {
54155 + tagName: TagName,
54156 + blockProps,
54157 + postId: templatePartId,
54158 + hasInnerBlocks,
54159 + layout
54160 + }
54161 + ),
54162 + !isPlaceholder && !isResolved && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(TagName, { ...blockProps, children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Spinner, {}) })
54163 + ] }),
54164 + isTemplatePartSelectionOpen && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
54165 + external_wp_components_namespaceObject.Modal,
54166 + {
54167 + overlayClassName: "block-editor-template-part__selection-modal",
54168 + title: (0,external_wp_i18n_namespaceObject.sprintf)(
54169 + // Translators: %s as template part area title ("Header", "Footer", etc.).
54170 + (0,external_wp_i18n_namespaceObject.__)("Choose a %s"),
54171 + areaObject.label.toLowerCase()
54172 + ),
54173 + onRequestClose: () => setIsTemplatePartSelectionOpen(false),
54174 + isFullScreen: true,
54175 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
54176 + TemplatePartSelectionModal,
54177 + {
54178 + templatePartId,
54179 + clientId,
54180 + area,
54181 + setAttributes,
54182 + onClose: () => setIsTemplatePartSelectionOpen(false)
54183 + }
54184 + )
54185 + }
54186 + )
54187 + ] });
54188 + }
54189 +
54190 +
54191 + ;// ./node_modules/@wordpress/block-library/build-module/template-part/variations.js
54192 +
54193 +
54194 +
54195 + function enhanceTemplatePartVariations(settings, name) {
54196 + if (name !== "core/template-part") {
54197 + return settings;
54198 + }
54199 + if (settings.variations) {
54200 + const isActive = (blockAttributes, variationAttributes) => {
54201 + const { area, theme, slug } = blockAttributes;
54202 + if (area) {
54203 + return area === variationAttributes.area;
54204 + }
54205 + if (!slug) {
54206 + return false;
54207 + }
54208 + const { getCurrentTheme, getEntityRecord } = (0,external_wp_data_namespaceObject.select)(external_wp_coreData_namespaceObject.store);
54209 + const entity = getEntityRecord(
54210 + "postType",
54211 + "wp_template_part",
54212 + `${theme || getCurrentTheme()?.stylesheet}//${slug}`
54213 + );
54214 + if (entity?.slug) {
54215 + return entity.slug === variationAttributes.slug;
54216 + }
54217 + return entity?.area === variationAttributes.area;
54218 + };
54219 + const variations = settings.variations.map((variation) => {
54220 + return {
54221 + ...variation,
54222 + ...!variation.isActive && { isActive },
54223 + ...typeof variation.icon === "string" && {
54224 + icon: getTemplatePartIcon(variation.icon)
54225 + }
54226 + };
54227 + });
54228 + return {
54229 + ...settings,
54230 + variations
54231 + };
54232 + }
54233 + return settings;
54234 + }
54235 +
54236 +
54237 + ;// ./node_modules/@wordpress/block-library/build-module/template-part/index.js
54238 +
54239 +
54240 +
54241 +
54242 +
54243 +
54244 +
54245 +
54246 +
54247 +
54248 + const { name: template_part_name } = template_part_block_namespaceObject;
54249 + const template_part_settings = {
54250 + icon: symbol_filled_default,
54251 + __experimentalLabel: ({ slug, theme }) => {
54252 + if (!slug) {
54253 + return;
54254 + }
54255 + const { getCurrentTheme, getEditedEntityRecord } = (0,external_wp_data_namespaceObject.select)(external_wp_coreData_namespaceObject.store);
54256 + const entity = getEditedEntityRecord(
54257 + "postType",
54258 + "wp_template_part",
54259 + (theme || getCurrentTheme()?.stylesheet) + "//" + slug
54260 + );
54261 + if (!entity) {
54262 + return;
54263 + }
54264 + return (0,external_wp_htmlEntities_namespaceObject.decodeEntities)(entity.title) || capitalCase(entity.slug || "");
54265 + },
54266 + edit: TemplatePartEdit
54267 + };
54268 + const template_part_init = () => {
54269 + (0,external_wp_hooks_namespaceObject.addFilter)(
54270 + "blocks.registerBlockType",
54271 + "core/template-part",
54272 + enhanceTemplatePartVariations
54273 + );
54274 + const DISALLOWED_PARENTS = ["core/post-template", "core/post-content"];
54275 + (0,external_wp_hooks_namespaceObject.addFilter)(
54276 + "blockEditor.__unstableCanInsertBlockType",
54277 + "core/block-library/removeTemplatePartsFromPostTemplates",
54278 + (canInsert, blockType, rootClientId, { getBlock, getBlockParentsByBlockName }) => {
54279 + if (blockType.name !== "core/template-part") {
54280 + return canInsert;
54281 + }
54282 + for (const disallowedParentType of DISALLOWED_PARENTS) {
54283 + const hasDisallowedParent = getBlock(rootClientId)?.name === disallowedParentType || getBlockParentsByBlockName(
54284 + rootClientId,
54285 + disallowedParentType
54286 + ).length;
54287 + if (hasDisallowedParent) {
54288 + return false;
54289 + }
54290 + }
54291 + return true;
54292 + }
54293 + );
54294 + return initBlock({ name: template_part_name, metadata: template_part_block_namespaceObject, settings: template_part_settings });
54295 + };
54296 +
54297 +
54298 + ;// ./node_modules/@wordpress/icons/build-module/library/term-count.js
54299 +
54300 +
54301 + var term_count_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: [
54302 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M 12.841306,16.677917 12.001264,12.71529 Q 11.835801,11.930402 11.695793,11.417042 11.560029,10.89944 11.398809,10.568514 11.237588,10.237588 11,10 10.635133,9.6351329 10.219354,9.6351329 9.8078183,9.6308902 9.4387086,10 8.9932313,10.445477 8.8574668,11.022476 8.7259449,11.595233 8.7259449,12.155262 L 7.4955791,11.196425 Q 7.5719467,10.509117 7.8307477,9.9109045 8.0937915,9.3084495 8.6410921,8.7611489 9.1799075,8.2223335 9.7569066,8.086569 q 0.5812414,-0.1400071 1.1242994,0.046669 0.543058,0.1866762 0.975808,0.6194255 0.335168,0.3351686 0.581242,0.767918 0.24183,0.4285067 0.436992,1.0564174 0.195161,0.619426 0.381837,1.527351 l 0.364867,1.756453 1.883733,-1.883732 1.018234,1.018233 z" }),
54303 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M12.574 4a.75.75 0 0 1 .53.22l6.723 6.724a2.315 2.315 0 0 1 0 3.264l-.532-.528.531.53-5.61 5.611a2.31 2.31 0 0 1-3.276.001l-6.72-6.716a.75.75 0 0 1-.22-.53V4.75A.75.75 0 0 1 4.75 4h7.824ZM5.5 5.5v6.764l6.501 6.497a.817.817 0 0 0 .889.178.816.816 0 0 0 .264-.178l5.61-5.61a.816.816 0 0 0-.001-1.149l-6.5-6.502H5.5Z" })
54304 + ] });
54305 +
54306 +
54307 + ;// ./node_modules/@wordpress/block-library/build-module/term-count/block.json
54308 + const term_count_block_namespaceObject = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/term-count","title":"Term Count","category":"theme","description":"Displays the post count of a taxonomy term.","textdomain":"default","usesContext":["termId","taxonomy"],"attributes":{"bracketType":{"type":"string","enum":["none","round","square","curly","angle"],"default":"round"}},"supports":{"html":false,"color":{"gradients":true,"__experimentalDefaultControls":{"background":true,"text":true}},"spacing":{"padding":true},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"interactivity":{"clientNavigation":true},"__experimentalBorder":{"radius":true,"color":true,"width":true,"style":true,"__experimentalDefaultControls":{"color":true,"width":true,"style":true}}},"style":"wp-block-term-count"}');
54309 + ;// ./node_modules/@wordpress/block-library/build-module/term-count/icons.js
54310 +
54311 +
54312 + const bareNumber = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Path, { d: "M 10 6 L 9.609375 9 L 7 9 L 7 10.5 L 9.4121094 10.5 L 9.0878906 13 L 7 13 L 7 14.5 L 8.890625 14.5 L 8.5 17.5 L 10 17.5 L 10.390625 14.5 L 12.890625 14.5 L 12.5 17.5 L 14 17.5 L 14.390625 14.5 L 17 14.5 L 17 13 L 14.587891 13 L 14.912109 10.5 L 17 10.5 L 17 9 L 15.109375 9 L 15.5 6 L 14 6 L 13.609375 9 L 11.109375 9 L 11.5 6 L 10 6 z M 10.912109 10.5 L 13.412109 10.5 L 13.087891 13 L 10.587891 13 L 10.912109 10.5 z" }) });
54313 + const numberInParenthesis = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Path, { d: "M 10,6 9.609375,9 H 7 v 1.5 H 9.4121094 L 9.0878906,13 H 7 v 1.5 H 8.890625 L 8.5,17.5 H 10 l 0.390625,-3 h 2.5 L 12.5,17.5 H 14 l 0.390625,-3 H 17 V 13 h -2.412109 l 0.324218,-2.5 H 17 V 9 H 15.109375 L 15.5,6 H 14 l -0.390625,3 h -2.5 L 11.5,6 Z m 0.912109,4.5 h 2.5 L 13.087891,13 h -2.5 z M 18.5,3 c 0,0 1.5,4.004036 1.5,9 0,4.995964 -1.5,9 -1.5,9 H 20 c 0,0 1.5,-4.004036 1.5,-9 C 21.5,7.004036 20,3 20,3 Z M 5.5,21 C 5.5,21 4,16.995964 4,12 4,7.0040356 5.5,3 5.5,3 H 4 c 0,0 -1.5,4.004036 -1.5,9 0,4.995964 1.5,9 1.5,9 z" }) });
54314 + const numberInSquareBrackets = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Path, { d: "M 21.5,21 V 3 H 18 v 1.5 h 2 v 15 H 18 V 21 Z M 2.5,3 V 21 H 6 V 19.5 H 4 V 4.5 H 6 V 3 Z M 10,6 9.609375,9 H 7 v 1.5 H 9.4121094 L 9.0878906,13 H 7 v 1.5 H 8.890625 L 8.5,17.5 H 10 l 0.390625,-3 h 2.5 L 12.5,17.5 H 14 l 0.390625,-3 H 17 V 13 h -2.412109 l 0.324218,-2.5 H 17 V 9 H 15.109375 L 15.5,6 H 14 l -0.390625,3 h -2.5 L 11.5,6 Z m 0.912109,4.5 h 2.5 L 13.087891,13 h -2.5 z" }) });
54315 + const numberInCurlyBrackets = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Path, { d: "M 10,6 9.609375,9 H 7 v 1.5 H 9.4121094 L 9.0878906,13 H 7 v 1.5 H 8.890625 L 8.5,17.5 H 10 l 0.390625,-3 h 2.5 L 12.5,17.5 H 14 l 0.390625,-3 H 17 V 13 h -2.412109 l 0.324218,-2.5 H 17 V 9 H 15.109375 L 15.5,6 H 14 l -0.390625,3 h -2.5 L 11.5,6 Z m 0.912109,4.5 h 2.5 L 13.087891,13 h -2.5 z M 18.5,21 c 1.104567,0 2,-0.895433 2,-2 v -4 c 0,-1.104567 0.895433,-2 2,-2 v -2 c -1.104567,0 -2,-0.895433 -2,-2 V 5 c 0,-1.104567 -0.895433,-2 -2,-2 H 17 v 1.5 h 1.5 A 0.5,0.5 0 0 1 19,5 v 5 c 0,1.104567 0.895433,2 2,2 -1.104567,0 -2,0.895433 -2,2 v 5 c 0,0.276142 -0.223858,0.5 -0.5,0.5 H 17 V 21 Z M 5.5,3 c -1.1045668,0 -2,0.8954327 -2,2 v 4 c 0,1.104567 -0.8954332,2 -2,2 v 2 c 1.1045668,0 2,0.895433 2,2 v 4 c 0,1.104567 0.8954332,2 2,2 H 7 V 19.5 H 5.5 A 0.5,0.5 0 0 1 5,19 V 14 C 5,12.895433 4.1045668,12 3,12 4.1045668,12 5,11.104567 5,10 V 5 C 5,4.7238579 5.2238579,4.5 5.5,4.5 H 7 V 3 Z" }) });
54316 + const numberInAngleBrackets = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Path, { d: "M 18.970703,16.53125 23.5,12 18.970703,7.46875 17.910156,8.53125 21.378906,12 17.910156,15.46875 Z M 5.0292969,7.46875 0.5,12 5.0292969,16.53125 6.0898438,15.46875 2.6210938,12 6.0898438,8.53125 Z M 10,6 9.609375,9 H 7 v 1.5 H 9.4121094 L 9.0878906,13 H 7 v 1.5 H 8.890625 L 8.5,17.5 H 10 l 0.390625,-3 h 2.5 L 12.5,17.5 H 14 l 0.390625,-3 H 17 V 13 h -2.412109 l 0.324218,-2.5 H 17 V 9 H 15.109375 L 15.5,6 H 14 l -0.390625,3 h -2.5 L 11.5,6 Z m 0.912109,4.5 h 2.5 L 13.087891,13 h -2.5 z" }) });
54317 +
54318 +
54319 + ;// ./node_modules/@wordpress/block-library/build-module/term-count/use-term-count.js
54320 +
54321 +
54322 + function useTermCount(termId, taxonomy) {
54323 + const [count] = (0,external_wp_coreData_namespaceObject.useEntityProp)("taxonomy", taxonomy, "count", termId);
54324 + const templateBasedData = useTemplateBasedTermData();
54325 + const hasContext = Boolean(termId && taxonomy);
54326 + return {
54327 + hasContext,
54328 + termCount: hasContext ? count || "" : templateBasedData
54329 + };
54330 + }
54331 + function useTemplateBasedTermData() {
54332 + const templateSlug = (0,external_wp_data_namespaceObject.useSelect)((select) => {
54333 + const { getCurrentPostId, getCurrentPostType, getCurrentTemplateId } = select("core/editor");
54334 + const currentPostType = getCurrentPostType();
54335 + const templateId = getCurrentTemplateId() || (currentPostType === "wp_template" ? getCurrentPostId() : null);
54336 + return templateId ? select(external_wp_coreData_namespaceObject.store).getEditedEntityRecord(
54337 + "postType",
54338 + "wp_template",
54339 + templateId
54340 + )?.slug : null;
54341 + }, []);
54342 + const taxonomyMatches = templateSlug?.match(
54343 + /^(category|tag|taxonomy-([^-]+))$|^(((category|tag)|taxonomy-([^-]+))-(.+))$/
54344 + );
54345 + let taxonomy;
54346 + let termSlug;
54347 + if (taxonomyMatches) {
54348 + if (taxonomyMatches[1]) {
54349 + taxonomy = taxonomyMatches[2] ? taxonomyMatches[2] : taxonomyMatches[1];
54350 + } else if (taxonomyMatches[3]) {
54351 + taxonomy = taxonomyMatches[6] ? taxonomyMatches[6] : taxonomyMatches[4];
54352 + termSlug = taxonomyMatches[7];
54353 + }
54354 + taxonomy = taxonomy === "tag" ? "post_tag" : taxonomy;
54355 + }
54356 + return (0,external_wp_data_namespaceObject.useSelect)(
54357 + (select) => {
54358 + if (!taxonomy || !termSlug) {
54359 + return "";
54360 + }
54361 + const { getEntityRecords } = select(external_wp_coreData_namespaceObject.store);
54362 + const termRecords = getEntityRecords("taxonomy", taxonomy, {
54363 + slug: termSlug,
54364 + per_page: 1
54365 + });
54366 + if (termRecords && termRecords[0]) {
54367 + return termRecords[0].count || "";
54368 + }
54369 + return "";
54370 + },
54371 + [taxonomy, termSlug]
54372 + );
54373 + }
54374 +
54375 +
54376 + ;// ./node_modules/@wordpress/block-library/build-module/term-count/edit.js
54377 +
54378 +
54379 +
54380 +
54381 +
54382 +
54383 + const BRACKET_TYPES = {
54384 + none: { label: (0,external_wp_i18n_namespaceObject.__)("No brackets"), icon: bareNumber },
54385 + round: {
54386 + label: (0,external_wp_i18n_namespaceObject.__)("Round brackets"),
54387 + icon: numberInParenthesis,
54388 + before: "(",
54389 + after: ")"
54390 + },
54391 + square: {
54392 + label: (0,external_wp_i18n_namespaceObject.__)("Square brackets"),
54393 + icon: numberInSquareBrackets,
54394 + before: "[",
54395 + after: "]"
54396 + },
54397 + curly: {
54398 + label: (0,external_wp_i18n_namespaceObject.__)("Curly brackets"),
54399 + icon: numberInCurlyBrackets,
54400 + before: "{",
54401 + after: "}"
54402 + },
54403 + angle: {
54404 + label: (0,external_wp_i18n_namespaceObject.__)("Angle brackets"),
54405 + icon: numberInAngleBrackets,
54406 + before: "<",
54407 + after: ">"
54408 + }
54409 + };
54410 + function TermCountEdit({
54411 + attributes,
54412 + setAttributes,
54413 + context: { termId, taxonomy }
54414 + }) {
54415 + const { bracketType } = attributes;
54416 + const term = useTermCount(termId, taxonomy);
54417 + const termCount = term?.termCount || 0;
54418 + const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)();
54419 + const bracketTypeControls = Object.entries(BRACKET_TYPES).map(
54420 + ([type, { label, icon }]) => ({
54421 + role: "menuitemradio",
54422 + title: label,
54423 + isActive: bracketType === type,
54424 + icon,
54425 + onClick: () => {
54426 + setAttributes({ bracketType: type });
54427 + }
54428 + })
54429 + );
54430 + const formatTermCount = (count, type) => {
54431 + const { before = "", after = "" } = BRACKET_TYPES[type] || {};
54432 + return `${before}${count}${after}`;
54433 + };
54434 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
54435 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockControls, { group: "block", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
54436 + external_wp_components_namespaceObject.ToolbarDropdownMenu,
54437 + {
54438 + icon: BRACKET_TYPES[bracketType]?.icon ?? bareNumber,
54439 + label: (0,external_wp_i18n_namespaceObject.__)("Change bracket type"),
54440 + controls: bracketTypeControls
54441 + }
54442 + ) }),
54443 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { ...blockProps, children: formatTermCount(termCount, bracketType) })
54444 + ] });
54445 + }
54446 +
54447 +
54448 + ;// ./node_modules/@wordpress/block-library/build-module/term-count/index.js
54449 +
54450 +
54451 +
54452 +
54453 + const { name: term_count_name } = term_count_block_namespaceObject;
54454 + const term_count_settings = {
54455 + icon: term_count_default,
54456 + edit: TermCountEdit
54457 + };
54458 + const term_count_init = () => initBlock({ name: term_count_name, metadata: term_count_block_namespaceObject, settings: term_count_settings });
54459 +
54460 +
54461 + ;// ./node_modules/@wordpress/icons/build-module/library/term-description.js
54462 +
54463 +
54464 + var term_description_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M6.08 10.103h2.914L9.657 12h1.417L8.23 4H6.846L4 12h1.417l.663-1.897Zm1.463-4.137.994 2.857h-2l1.006-2.857ZM11 16H4v-1.5h7V16Zm1 0h8v-1.5h-8V16Zm-4 4H4v-1.5h4V20Zm7-1.5V20H9v-1.5h6Z" }) });
54465 +
54466 +
54467 + ;// ./node_modules/@wordpress/block-library/build-module/term-description/block.json
54468 + const term_description_block_namespaceObject = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/term-description","title":"Term Description","category":"theme","description":"Display the description of categories, tags and custom taxonomies when viewing an archive.","textdomain":"default","usesContext":["termId","taxonomy"],"attributes":{"textAlign":{"type":"string"}},"supports":{"align":["wide","full"],"html":false,"color":{"link":true,"__experimentalDefaultControls":{"background":true,"text":true}},"spacing":{"padding":true,"margin":true},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"interactivity":{"clientNavigation":true},"__experimentalBorder":{"radius":true,"color":true,"width":true,"style":true,"__experimentalDefaultControls":{"radius":true,"color":true,"width":true,"style":true}}}}');
54469 + ;// ./node_modules/@wordpress/block-library/build-module/term-description/use-term-description.js
54470 +
54471 +
54472 + function useTermDescription(termId, taxonomy) {
54473 + const [description, setDescription, fullDescription] = (0,external_wp_coreData_namespaceObject.useEntityProp)(
54474 + "taxonomy",
54475 + taxonomy,
54476 + "description",
54477 + termId
54478 + );
54479 + const templateBasedData = use_term_description_useTemplateBasedTermData();
54480 + const hasContext = Boolean(termId && taxonomy);
54481 + return {
54482 + hasContext,
54483 + setDescription,
54484 + termDescription: hasContext ? fullDescription?.rendered || description || "" : templateBasedData
54485 + };
54486 + }
54487 + function use_term_description_useTemplateBasedTermData() {
54488 + const templateSlug = (0,external_wp_data_namespaceObject.useSelect)((select) => {
54489 + const { getCurrentPostId, getCurrentPostType, getCurrentTemplateId } = select("core/editor");
54490 + const currentPostType = getCurrentPostType();
54491 + const templateId = getCurrentTemplateId() || (currentPostType === "wp_template" ? getCurrentPostId() : null);
54492 + return templateId ? select(external_wp_coreData_namespaceObject.store).getEditedEntityRecord(
54493 + "postType",
54494 + "wp_template",
54495 + templateId
54496 + )?.slug : null;
54497 + }, []);
54498 + const taxonomyMatches = templateSlug?.match(
54499 + /^(category|tag|taxonomy-([^-]+))$|^(((category|tag)|taxonomy-([^-]+))-(.+))$/
54500 + );
54501 + let taxonomy;
54502 + let termSlug;
54503 + if (taxonomyMatches) {
54504 + if (taxonomyMatches[1]) {
54505 + taxonomy = taxonomyMatches[2] ? taxonomyMatches[2] : taxonomyMatches[1];
54506 + } else if (taxonomyMatches[3]) {
54507 + taxonomy = taxonomyMatches[6] ? taxonomyMatches[6] : taxonomyMatches[4];
54508 + termSlug = taxonomyMatches[7];
54509 + }
54510 + taxonomy = taxonomy === "tag" ? "post_tag" : taxonomy;
54511 + }
54512 + return (0,external_wp_data_namespaceObject.useSelect)(
54513 + (select) => {
54514 + if (!taxonomy || !termSlug) {
54515 + return "";
54516 + }
54517 + const { getEntityRecords } = select(external_wp_coreData_namespaceObject.store);
54518 + const termRecords = getEntityRecords("taxonomy", taxonomy, {
54519 + slug: termSlug,
54520 + per_page: 1
54521 + });
54522 + if (termRecords && termRecords[0]) {
54523 + return termRecords[0].description || "";
54524 + }
54525 + return "";
54526 + },
54527 + [taxonomy, termSlug]
54528 + );
54529 + }
54530 +
54531 +
54532 + ;// ./node_modules/@wordpress/block-library/build-module/term-description/edit.js
54533 +
54534 +
54535 +
54536 +
54537 +
54538 + function TermDescriptionEdit({
54539 + attributes,
54540 + setAttributes,
54541 + mergedStyle,
54542 + context: { termId, taxonomy }
54543 + }) {
54544 + const { textAlign } = attributes;
54545 + const { termDescription } = useTermDescription(termId, taxonomy);
54546 + const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)({
54547 + className: dist_clsx({
54548 + [`has-text-align-${textAlign}`]: textAlign
54549 + }),
54550 + style: mergedStyle
54551 + });
54552 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
54553 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockControls, { group: "block", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
54554 + external_wp_blockEditor_namespaceObject.AlignmentControl,
54555 + {
54556 + value: textAlign,
54557 + onChange: (nextAlign) => {
54558 + setAttributes({ textAlign: nextAlign });
54559 + }
54560 + }
54561 + ) }),
54562 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { ...blockProps, children: termDescription ? /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
54563 + "div",
54564 + {
54565 + dangerouslySetInnerHTML: { __html: termDescription }
54566 + }
54567 + ) : /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { className: "wp-block-term-description__placeholder", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("span", { children: (0,external_wp_i18n_namespaceObject.__)("Term Description") }) }) })
54568 + ] });
54569 + }
54570 +
54571 +
54572 + ;// ./node_modules/@wordpress/block-library/build-module/term-description/index.js
54573 +
54574 +
54575 +
54576 +
54577 + const { name: term_description_name } = term_description_block_namespaceObject;
54578 + const term_description_settings = {
54579 + icon: term_description_default,
54580 + edit: TermDescriptionEdit,
54581 + example: {}
54582 + };
54583 + const term_description_init = () => initBlock({ name: term_description_name, metadata: term_description_block_namespaceObject, settings: term_description_settings });
54584 +
54585 +
54586 + ;// ./node_modules/@wordpress/icons/build-module/library/term-name.js
54587 +
54588 +
54589 + var term_name_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: [
54590 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "m14.95 13.889-1.061 1.061-5.552-5.553 1.06-1.06 5.552 5.552Z" }),
54591 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M12.574 4a.75.75 0 0 1 .53.22l6.723 6.724a2.315 2.315 0 0 1 0 3.264l-.532-.528.531.53-5.61 5.611a2.31 2.31 0 0 1-3.276.001l-6.72-6.716a.75.75 0 0 1-.22-.53V4.75A.75.75 0 0 1 4.75 4h7.824ZM5.5 5.5v6.764l6.501 6.497a.817.817 0 0 0 .889.178.816.816 0 0 0 .264-.178l5.61-5.61a.816.816 0 0 0-.001-1.149l-6.5-6.502H5.5Z" })
54592 + ] });
54593 +
54594 +
54595 + ;// ./node_modules/@wordpress/block-library/build-module/term-name/block.json
54596 + const term_name_block_namespaceObject = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/term-name","title":"Term Name","category":"theme","description":"Displays the name of a taxonomy term.","keywords":["term title"],"textdomain":"default","usesContext":["termId","taxonomy"],"attributes":{"textAlign":{"type":"string"},"level":{"type":"number","default":0},"isLink":{"type":"boolean","default":false}},"supports":{"align":["wide","full"],"html":false,"color":{"gradients":true,"link":true,"__experimentalDefaultControls":{"background":true,"text":true,"link":true}},"spacing":{"padding":true},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"interactivity":{"clientNavigation":true},"__experimentalBorder":{"radius":true,"color":true,"width":true,"style":true,"__experimentalDefaultControls":{"color":true,"width":true,"style":true}}},"style":"wp-block-term-name"}');
54597 + ;// ./node_modules/@wordpress/block-library/build-module/term-name/use-term-name.js
54598 +
54599 +
54600 + function useTermName(termId, taxonomy) {
54601 + const contextBasedTerm = (0,external_wp_data_namespaceObject.useSelect)(
54602 + (select) => {
54603 + if (!termId || !taxonomy) {
54604 + return null;
54605 + }
54606 + return select(external_wp_coreData_namespaceObject.store).getEntityRecord(
54607 + "taxonomy",
54608 + taxonomy,
54609 + termId
54610 + );
54611 + },
54612 + [termId, taxonomy]
54613 + );
54614 + const templateBasedTerm = use_term_name_useTemplateBasedTermData();
54615 + const hasContext = Boolean(termId && taxonomy);
54616 + return {
54617 + hasContext,
54618 + term: hasContext ? contextBasedTerm : templateBasedTerm
54619 + };
54620 + }
54621 + function use_term_name_useTemplateBasedTermData() {
54622 + const templateSlug = (0,external_wp_data_namespaceObject.useSelect)((select) => {
54623 + const { getCurrentPostId, getCurrentPostType, getCurrentTemplateId } = select("core/editor");
54624 + const currentPostType = getCurrentPostType();
54625 + const templateId = getCurrentTemplateId() || (currentPostType === "wp_template" ? getCurrentPostId() : null);
54626 + return templateId ? select(external_wp_coreData_namespaceObject.store).getEditedEntityRecord(
54627 + "postType",
54628 + "wp_template",
54629 + templateId
54630 + )?.slug : null;
54631 + }, []);
54632 + const taxonomyMatches = templateSlug?.match(
54633 + /^(category|tag|taxonomy-([^-]+))$|^(((category|tag)|taxonomy-([^-]+))-(.+))$/
54634 + );
54635 + let taxonomy;
54636 + let termSlug;
54637 + if (taxonomyMatches) {
54638 + if (taxonomyMatches[3]) {
54639 + taxonomy = taxonomyMatches[6] ? taxonomyMatches[6] : taxonomyMatches[4];
54640 + termSlug = taxonomyMatches[7];
54641 + }
54642 + taxonomy = taxonomy === "tag" ? "post_tag" : taxonomy;
54643 + }
54644 + return (0,external_wp_data_namespaceObject.useSelect)(
54645 + (select) => {
54646 + if (!taxonomy || !termSlug) {
54647 + return null;
54648 + }
54649 + const { getEntityRecords } = select(external_wp_coreData_namespaceObject.store);
54650 + const termRecords = getEntityRecords("taxonomy", taxonomy, {
54651 + slug: termSlug,
54652 + per_page: 1
54653 + });
54654 + if (termRecords && termRecords[0]) {
54655 + return termRecords[0];
54656 + }
54657 + return null;
54658 + },
54659 + [taxonomy, termSlug]
54660 + );
54661 + }
54662 +
54663 +
54664 + ;// ./node_modules/@wordpress/block-library/build-module/term-name/edit.js
54665 +
54666 +
54667 +
54668 +
54669 +
54670 +
54671 +
54672 +
54673 + function TermNameEdit({
54674 + attributes,
54675 + setAttributes,
54676 + context: { termId, taxonomy }
54677 + }) {
54678 + const { textAlign, level = 0, isLink } = attributes;
54679 + const { term } = useTermName(termId, taxonomy);
54680 + const termName = term?.name ? (0,external_wp_htmlEntities_namespaceObject.decodeEntities)(term.name) : (0,external_wp_i18n_namespaceObject.__)("Term Name");
54681 + const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)({
54682 + className: dist_clsx({
54683 + [`has-text-align-${textAlign}`]: textAlign
54684 + })
54685 + });
54686 + const dropdownMenuProps = useToolsPanelDropdownMenuProps();
54687 + const TagName = level === 0 ? "p" : `h${level}`;
54688 + let termNameDisplay = termName;
54689 + if (isLink) {
54690 + termNameDisplay = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
54691 + "a",
54692 + {
54693 + href: "#term-name-pseudo-link",
54694 + onClick: (e) => e.preventDefault(),
54695 + children: termName
54696 + }
54697 + );
54698 + }
54699 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
54700 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_blockEditor_namespaceObject.BlockControls, { group: "block", children: [
54701 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
54702 + external_wp_blockEditor_namespaceObject.HeadingLevelDropdown,
54703 + {
54704 + value: level,
54705 + options: [0, 1, 2, 3, 4, 5, 6],
54706 + onChange: (newLevel) => {
54707 + setAttributes({ level: newLevel });
54708 + }
54709 + }
54710 + ),
54711 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
54712 + external_wp_blockEditor_namespaceObject.AlignmentControl,
54713 + {
54714 + value: textAlign,
54715 + onChange: (nextAlign) => {
54716 + setAttributes({ textAlign: nextAlign });
54717 + }
54718 + }
54719 + )
54720 + ] }),
54721 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
54722 + external_wp_components_namespaceObject.__experimentalToolsPanel,
54723 + {
54724 + label: (0,external_wp_i18n_namespaceObject.__)("Settings"),
54725 + resetAll: () => {
54726 + setAttributes({
54727 + isLink: false
54728 + });
54729 + },
54730 + dropdownMenuProps,
54731 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
54732 + external_wp_components_namespaceObject.__experimentalToolsPanelItem,
54733 + {
54734 + hasValue: () => !!isLink,
54735 + label: (0,external_wp_i18n_namespaceObject.__)("Make term name a link"),
54736 + onDeselect: () => setAttributes({ isLink: false }),
54737 + isShownByDefault: true,
54738 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
54739 + external_wp_components_namespaceObject.ToggleControl,
54740 + {
54741 + __nextHasNoMarginBottom: true,
54742 + label: (0,external_wp_i18n_namespaceObject.__)("Make term name a link"),
54743 + onChange: () => setAttributes({ isLink: !isLink }),
54744 + checked: isLink
54745 + }
54746 + )
54747 + }
54748 + )
54749 + }
54750 + ) }),
54751 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(TagName, { ...blockProps, children: termNameDisplay })
54752 + ] });
54753 + }
54754 +
54755 +
54756 + ;// ./node_modules/@wordpress/block-library/build-module/term-name/index.js
54757 +
54758 +
54759 +
54760 +
54761 + const { name: term_name_name } = term_name_block_namespaceObject;
54762 + const term_name_settings = {
54763 + icon: term_name_default,
54764 + edit: TermNameEdit
54765 + };
54766 + const term_name_init = () => initBlock({ name: term_name_name, metadata: term_name_block_namespaceObject, settings: term_name_settings });
54767 +
54768 +
54769 + ;// ./node_modules/@wordpress/block-library/build-module/terms-query/block.json
54770 + const terms_query_block_namespaceObject = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/terms-query","title":"Terms Query","category":"theme","description":"An advanced block that allows displaying taxonomy terms based on different query parameters and visual configurations.","keywords":["terms","taxonomy","categories","tags","list"],"textdomain":"default","attributes":{"termQuery":{"type":"object","default":{"perPage":10,"taxonomy":"category","order":"asc","orderBy":"name","include":[],"hideEmpty":true,"showNested":false,"inherit":false}},"tagName":{"type":"string","default":"div"}},"usesContext":["templateSlug"],"providesContext":{"termQuery":"termQuery"},"supports":{"align":["wide","full"],"html":false,"layout":true,"interactivity":true}}');
54771 + ;// ./node_modules/@wordpress/block-library/build-module/terms-query/utils.js
54772 +
54773 +
54774 +
54775 + function usePublicTaxonomies() {
54776 + const taxonomies = (0,external_wp_data_namespaceObject.useSelect)(
54777 + (select) => select(external_wp_coreData_namespaceObject.store).getTaxonomies({ per_page: -1 }),
54778 + []
54779 + );
54780 + return (0,external_wp_element_namespaceObject.useMemo)(() => {
54781 + return taxonomies?.filter(
54782 + ({ visibility }) => visibility?.publicly_queryable
54783 + ) || [];
54784 + }, [taxonomies]);
54785 + }
54786 +
54787 +
54788 + ;// ./node_modules/@wordpress/block-library/build-module/terms-query/edit/inspector-controls/taxonomy-control.js
54789 +
54790 +
54791 +
54792 + function TaxonomyControl({ value, onChange, ...props }) {
54793 + const taxonomies = usePublicTaxonomies();
54794 + const taxonomyOptions = taxonomies.map((taxonomy) => ({
54795 + label: taxonomy.name,
54796 + value: taxonomy.slug
54797 + }));
54798 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
54799 + external_wp_components_namespaceObject.SelectControl,
54800 + {
54801 + __nextHasNoMarginBottom: true,
54802 + __next40pxDefaultSize: true,
54803 + options: taxonomyOptions,
54804 + value,
54805 + onChange,
54806 + ...props
54807 + }
54808 + );
54809 + }
54810 +
54811 +
54812 + ;// ./node_modules/@wordpress/block-library/build-module/terms-query/edit/inspector-controls/order-control.js
54813 +
54814 +
54815 +
54816 + function order_control_OrderControl({ orderBy, order, onChange, ...props }) {
54817 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
54818 + external_wp_components_namespaceObject.SelectControl,
54819 + {
54820 + __nextHasNoMarginBottom: true,
54821 + __next40pxDefaultSize: true,
54822 + options: [
54823 + {
54824 + label: (0,external_wp_i18n_namespaceObject.__)("Name: A \u2192 Z"),
54825 + value: "name/asc"
54826 + },
54827 + {
54828 + label: (0,external_wp_i18n_namespaceObject.__)("Name: Z \u2192 A"),
54829 + value: "name/desc"
54830 + },
54831 + {
54832 + label: (0,external_wp_i18n_namespaceObject.__)("Count, high to low"),
54833 + value: "count/desc"
54834 + },
54835 + {
54836 + label: (0,external_wp_i18n_namespaceObject.__)("Count, low to high"),
54837 + value: "count/asc"
54838 + }
54839 + ],
54840 + value: orderBy + "/" + order,
54841 + onChange: (value) => {
54842 + const [newOrderBy, newOrder] = value.split("/");
54843 + onChange(newOrderBy, newOrder);
54844 + },
54845 + ...props
54846 + }
54847 + );
54848 + }
54849 +
54850 +
54851 + ;// ./node_modules/@wordpress/block-library/build-module/terms-query/edit/inspector-controls/empty-terms-control.js
54852 +
54853 +
54854 + function EmptyTermsControl({ value, onChange, ...props }) {
54855 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
54856 + external_wp_components_namespaceObject.ToggleControl,
54857 + {
54858 + __nextHasNoMarginBottom: true,
54859 + checked: !value,
54860 + onChange: (showEmpty) => onChange(!showEmpty),
54861 + ...props
54862 + }
54863 + );
54864 + }
54865 +
54866 +
54867 + ;// ./node_modules/@wordpress/block-library/build-module/terms-query/edit/inspector-controls/nested-terms-control.js
54868 +
54869 +
54870 + function NestedTermsControl({ value, onChange, ...props }) {
54871 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
54872 + external_wp_components_namespaceObject.ToggleControl,
54873 + {
54874 + __nextHasNoMarginBottom: true,
54875 + checked: value,
54876 + onChange,
54877 + ...props
54878 + }
54879 + );
54880 + }
54881 +
54882 +
54883 + ;// ./node_modules/@wordpress/block-library/build-module/terms-query/edit/inspector-controls/inherit-control.js
54884 +
54885 +
54886 +
54887 + function InheritControl({ value, onChange, label }) {
54888 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(
54889 + external_wp_components_namespaceObject.__experimentalToggleGroupControl,
54890 + {
54891 + __next40pxDefaultSize: true,
54892 + __nextHasNoMarginBottom: true,
54893 + label,
54894 + isBlock: true,
54895 + onChange: (newValue) => {
54896 + onChange({
54897 + inherit: newValue === "default"
54898 + });
54899 + },
54900 + help: value ? (0,external_wp_i18n_namespaceObject.__)(
54901 + "Display terms based on the current taxonomy archive. For hierarchical taxonomies, shows children of the current term. For non-hierarchical taxonomies, shows all terms."
54902 + ) : (0,external_wp_i18n_namespaceObject.__)("Display terms based on specific criteria."),
54903 + value: value ? "default" : "custom",
54904 + children: [
54905 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
54906 + external_wp_components_namespaceObject.__experimentalToggleGroupControlOption,
54907 + {
54908 + value: "default",
54909 + label: (0,external_wp_i18n_namespaceObject.__)("Default")
54910 + }
54911 + ),
54912 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalToggleGroupControlOption, { value: "custom", label: (0,external_wp_i18n_namespaceObject.__)("Custom") })
54913 + ]
54914 + }
54915 + );
54916 + }
54917 +
54918 +
54919 + ;// ./node_modules/@wordpress/block-library/build-module/terms-query/edit/inspector-controls/max-terms-control.js
54920 +
54921 +
54922 +
54923 + function MaxTermsControl({ value, onChange, ...props }) {
54924 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
54925 + external_wp_components_namespaceObject.RangeControl,
54926 + {
54927 + __nextHasNoMarginBottom: true,
54928 + __next40pxDefaultSize: true,
54929 + value,
54930 + min: 0,
54931 + max: 100,
54932 + onChange,
54933 + help: (0,external_wp_i18n_namespaceObject.__)(
54934 + "Limit the number of terms you want to show. To show all terms, use 0 (zero)."
54935 + ),
54936 + ...props
54937 + }
54938 + );
54939 + }
54940 +
54941 +
54942 + ;// ./node_modules/@wordpress/block-library/build-module/terms-query/edit/inspector-controls/advanced-controls.js
54943 +
54944 +
54945 +
54946 +
54947 + const { HTMLElementControl: inspector_controls_advanced_controls_HTMLElementControl } = unlock(external_wp_blockEditor_namespaceObject.privateApis);
54948 + function AdvancedControls({
54949 + TagName,
54950 + setAttributes,
54951 + clientId
54952 + }) {
54953 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, { group: "advanced", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
54954 + inspector_controls_advanced_controls_HTMLElementControl,
54955 + {
54956 + tagName: TagName,
54957 + onChange: (value) => setAttributes({ tagName: value }),
54958 + clientId,
54959 + options: [
54960 + { label: (0,external_wp_i18n_namespaceObject.__)("Default (<div>)"), value: "div" },
54961 + { label: "<main>", value: "main" },
54962 + { label: "<section>", value: "section" },
54963 + { label: "<aside>", value: "aside" }
54964 + ]
54965 + }
54966 + ) });
54967 + }
54968 +
54969 +
54970 + ;// ./node_modules/@wordpress/block-library/build-module/terms-query/edit/inspector-controls/include-control.js
54971 +
54972 +
54973 +
54974 +
54975 +
54976 +
54977 +
54978 + const include_control_EMPTY_ARRAY = [];
54979 + const include_control_BASE_QUERY = {
54980 + order: "asc",
54981 + _fields: "id,name",
54982 + context: "view"
54983 + };
54984 + function IncludeControl({
54985 + value: include,
54986 + taxonomy,
54987 + onChange,
54988 + ...props
54989 + }) {
54990 + const [search, setSearch] = (0,external_wp_element_namespaceObject.useState)("");
54991 + const [value, setValue] = (0,external_wp_element_namespaceObject.useState)(include_control_EMPTY_ARRAY);
54992 + const [suggestions, setSuggestions] = (0,external_wp_element_namespaceObject.useState)(include_control_EMPTY_ARRAY);
54993 + const debouncedSearch = (0,external_wp_compose_namespaceObject.useDebounce)(setSearch, 250);
54994 + const { searchResults, searchHasResolved } = (0,external_wp_data_namespaceObject.useSelect)(
54995 + (select) => {
54996 + if (!search) {
54997 + return { searchResults: include_control_EMPTY_ARRAY, searchHasResolved: true };
54998 + }
54999 + const { getEntityRecords, hasFinishedResolution } = select(external_wp_coreData_namespaceObject.store);
55000 + const selectorArgs = [
55001 + "taxonomy",
55002 + taxonomy,
55003 + {
55004 + ...include_control_BASE_QUERY,
55005 + search,
55006 + orderby: "name",
55007 + exclude: include,
55008 + per_page: 20
55009 + }
55010 + ];
55011 + return {
55012 + searchResults: getEntityRecords(...selectorArgs),
55013 + searchHasResolved: hasFinishedResolution(
55014 + "getEntityRecords",
55015 + selectorArgs
55016 + )
55017 + };
55018 + },
55019 + [search, taxonomy, include]
55020 + );
55021 + const currentTerms = (0,external_wp_data_namespaceObject.useSelect)(
55022 + (select) => {
55023 + if (!include?.length) {
55024 + return include_control_EMPTY_ARRAY;
55025 + }
55026 + const { getEntityRecords } = select(external_wp_coreData_namespaceObject.store);
55027 + return getEntityRecords("taxonomy", taxonomy, {
55028 + ...include_control_BASE_QUERY,
55029 + include,
55030 + per_page: include.length
55031 + });
55032 + },
55033 + [include, taxonomy]
55034 + );
55035 + (0,external_wp_element_namespaceObject.useEffect)(() => {
55036 + if (!include?.length) {
55037 + setValue(include_control_EMPTY_ARRAY);
55038 + }
55039 + if (!currentTerms?.length) {
55040 + return;
55041 + }
55042 + const sanitizedValue = include.reduce((accumulator, id) => {
55043 + const entity = currentTerms.find((term) => term.id === id);
55044 + if (entity) {
55045 + accumulator.push({
55046 + id,
55047 + value: (0,external_wp_htmlEntities_namespaceObject.decodeEntities)(entity.name)
55048 + });
55049 + }
55050 + return accumulator;
55051 + }, []);
55052 + setValue(sanitizedValue);
55053 + }, [include, currentTerms]);
55054 + const entitiesInfo = (0,external_wp_element_namespaceObject.useMemo)(() => {
55055 + if (!searchResults?.length) {
55056 + return { names: include_control_EMPTY_ARRAY, mapByName: {} };
55057 + }
55058 + const names = [];
55059 + const mapByName = {};
55060 + searchResults.forEach((result) => {
55061 + const decodedName = (0,external_wp_htmlEntities_namespaceObject.decodeEntities)(result.name);
55062 + names.push(decodedName);
55063 + mapByName[decodedName] = result;
55064 + });
55065 + return { names, mapByName };
55066 + }, [searchResults]);
55067 + (0,external_wp_element_namespaceObject.useEffect)(() => {
55068 + if (!searchHasResolved) {
55069 + return;
55070 + }
55071 + setSuggestions(entitiesInfo.names);
55072 + }, [entitiesInfo.names, searchHasResolved]);
55073 + const getIdByValue = (entitiesMappedByName, entity) => entity?.id || entitiesMappedByName?.[entity]?.id;
55074 + const onTermChange = (newValue) => {
55075 + const ids = Array.from(
55076 + newValue.reduce((accumulator, entity) => {
55077 + const id = getIdByValue(entitiesInfo.mapByName, entity);
55078 + if (id) {
55079 + accumulator.add(id);
55080 + }
55081 + return accumulator;
55082 + }, /* @__PURE__ */ new Set())
55083 + );
55084 + setSuggestions(include_control_EMPTY_ARRAY);
55085 + onChange(ids);
55086 + };
55087 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
55088 + external_wp_components_namespaceObject.FormTokenField,
55089 + {
55090 + __next40pxDefaultSize: true,
55091 + value,
55092 + onInputChange: debouncedSearch,
55093 + suggestions,
55094 + onChange: onTermChange,
55095 + __experimentalShowHowTo: false,
55096 + __nextHasNoMarginBottom: true,
55097 + ...props
55098 + }
55099 + );
55100 + }
55101 +
55102 +
55103 + ;// ./node_modules/@wordpress/block-library/build-module/terms-query/edit/inspector-controls/index.js
55104 +
55105 +
55106 +
55107 +
55108 +
55109 +
55110 +
55111 +
55112 +
55113 +
55114 +
55115 +
55116 +
55117 +
55118 + function TermsQueryInspectorControls({
55119 + attributes,
55120 + setQuery,
55121 + setAttributes,
55122 + clientId,
55123 + templateSlug
55124 + }) {
55125 + const { termQuery, tagName: TagName } = attributes;
55126 + const {
55127 + taxonomy,
55128 + orderBy,
55129 + order,
55130 + hideEmpty,
55131 + inherit,
55132 + showNested,
55133 + perPage,
55134 + include
55135 + } = termQuery;
55136 + const dropdownMenuProps = useToolsPanelDropdownMenuProps();
55137 + const taxonomies = usePublicTaxonomies();
55138 + const isTaxonomyHierarchical = taxonomies.find(
55139 + (_taxonomy) => _taxonomy.slug === taxonomy
55140 + )?.hierarchical;
55141 + const inheritQuery = !!inherit;
55142 + const displayInheritControl = ["taxonomy", "category", "tag", "archive"].includes(templateSlug) || templateSlug?.startsWith("taxonomy-") || templateSlug?.startsWith("category-") || templateSlug?.startsWith("tag-");
55143 + const displayShowNestedControl = isTaxonomyHierarchical;
55144 + const hasIncludeFilter = !!include?.length;
55145 + const queryTypeControlLabel = (0,external_wp_i18n_namespaceObject.__)("Query type");
55146 + const taxonomyControlLabel = (0,external_wp_i18n_namespaceObject.__)("Taxonomy");
55147 + const orderByControlLabel = (0,external_wp_i18n_namespaceObject.__)("Order by");
55148 + const emptyTermsControlLabel = (0,external_wp_i18n_namespaceObject.__)("Show empty terms");
55149 + const nestedTermsControlLabel = (0,external_wp_i18n_namespaceObject.__)("Show nested terms");
55150 + const maxTermsControlLabel = (0,external_wp_i18n_namespaceObject.__)("Max terms");
55151 + const includeControlLabel = (0,external_wp_i18n_namespaceObject.__)("Selected terms");
55152 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
55153 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(
55154 + external_wp_components_namespaceObject.__experimentalToolsPanel,
55155 + {
55156 + label: (0,external_wp_i18n_namespaceObject.__)("Settings"),
55157 + resetAll: () => {
55158 + setAttributes({
55159 + termQuery: {
55160 + taxonomy: "category",
55161 + order: "asc",
55162 + orderBy: "name",
55163 + include: [],
55164 + hideEmpty: true,
55165 + showNested: false,
55166 + inherit: false,
55167 + perPage: 10
55168 + }
55169 + });
55170 + },
55171 + dropdownMenuProps,
55172 + children: [
55173 + displayInheritControl && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
55174 + external_wp_components_namespaceObject.__experimentalToolsPanelItem,
55175 + {
55176 + hasValue: () => inherit !== false,
55177 + label: queryTypeControlLabel,
55178 + onDeselect: () => setQuery({ inherit: false }),
55179 + isShownByDefault: true,
55180 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
55181 + InheritControl,
55182 + {
55183 + label: queryTypeControlLabel,
55184 + value: inherit,
55185 + onChange: setQuery
55186 + }
55187 + )
55188 + }
55189 + ),
55190 + !inheritQuery && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
55191 + external_wp_components_namespaceObject.__experimentalToolsPanelItem,
55192 + {
55193 + hasValue: () => taxonomy !== "category",
55194 + label: taxonomyControlLabel,
55195 + onDeselect: () => {
55196 + setQuery({ taxonomy: "category" });
55197 + },
55198 + isShownByDefault: true,
55199 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
55200 + TaxonomyControl,
55201 + {
55202 + label: taxonomyControlLabel,
55203 + value: taxonomy,
55204 + onChange: (value) => (
55205 + // We also need to reset the include filter when changing taxonomy.
55206 + setQuery({ taxonomy: value, include: [] })
55207 + )
55208 + }
55209 + )
55210 + }
55211 + ),
55212 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
55213 + external_wp_components_namespaceObject.__experimentalToolsPanelItem,
55214 + {
55215 + hasValue: () => orderBy !== "name" || order !== "asc",
55216 + label: orderByControlLabel,
55217 + onDeselect: () => setQuery({ orderBy: "name", order: "asc" }),
55218 + isShownByDefault: true,
55219 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
55220 + order_control_OrderControl,
55221 + {
55222 + label: orderByControlLabel,
55223 + ...{ orderBy, order },
55224 + onChange: (newOrderBy, newOrder) => {
55225 + setQuery({
55226 + orderBy: newOrderBy,
55227 + order: newOrder
55228 + });
55229 + },
55230 + disabled: hasIncludeFilter,
55231 + help: hasIncludeFilter ? (0,external_wp_i18n_namespaceObject.__)(
55232 + "When specific terms are selected, the order is based on their selection order."
55233 + ) : void 0
55234 + }
55235 + )
55236 + }
55237 + ),
55238 + !inheritQuery && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
55239 + external_wp_components_namespaceObject.__experimentalToolsPanelItem,
55240 + {
55241 + hasValue: () => !!include?.length,
55242 + label: includeControlLabel,
55243 + onDeselect: () => setQuery({
55244 + include: [],
55245 + orderBy: "name",
55246 + order: "asc"
55247 + }),
55248 + isShownByDefault: true,
55249 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
55250 + IncludeControl,
55251 + {
55252 + label: includeControlLabel,
55253 + taxonomy,
55254 + value: include,
55255 + onChange: (value) => setQuery({ include: value })
55256 + }
55257 + )
55258 + }
55259 + ),
55260 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
55261 + external_wp_components_namespaceObject.__experimentalToolsPanelItem,
55262 + {
55263 + hasValue: () => hideEmpty !== true,
55264 + label: emptyTermsControlLabel,
55265 + onDeselect: () => setQuery({ hideEmpty: true }),
55266 + isShownByDefault: true,
55267 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
55268 + EmptyTermsControl,
55269 + {
55270 + label: emptyTermsControlLabel,
55271 + value: hideEmpty,
55272 + onChange: (value) => setQuery({ hideEmpty: value })
55273 + }
55274 + )
55275 + }
55276 + ),
55277 + displayShowNestedControl && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
55278 + external_wp_components_namespaceObject.__experimentalToolsPanelItem,
55279 + {
55280 + hasValue: () => showNested !== false,
55281 + label: nestedTermsControlLabel,
55282 + onDeselect: () => setQuery({ showNested: false }),
55283 + isShownByDefault: true,
55284 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
55285 + NestedTermsControl,
55286 + {
55287 + label: nestedTermsControlLabel,
55288 + value: showNested,
55289 + onChange: (value) => setQuery({ showNested: value }),
55290 + disabled: hasIncludeFilter,
55291 + help: hasIncludeFilter ? (0,external_wp_i18n_namespaceObject.__)(
55292 + "When specific terms are selected, only those are displayed."
55293 + ) : void 0
55294 + }
55295 + )
55296 + }
55297 + ),
55298 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
55299 + external_wp_components_namespaceObject.__experimentalToolsPanelItem,
55300 + {
55301 + hasValue: () => perPage !== 10,
55302 + label: maxTermsControlLabel,
55303 + onDeselect: () => setQuery({ perPage: 10 }),
55304 + isShownByDefault: true,
55305 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
55306 + MaxTermsControl,
55307 + {
55308 + label: maxTermsControlLabel,
55309 + value: perPage,
55310 + onChange: (value) => setQuery({ perPage: value })
55311 + }
55312 + )
55313 + }
55314 + )
55315 + ]
55316 + }
55317 + ) }),
55318 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
55319 + AdvancedControls,
55320 + {
55321 + TagName,
55322 + setAttributes,
55323 + clientId
55324 + }
55325 + )
55326 + ] });
55327 + }
55328 +
55329 +
55330 + ;// ./node_modules/@wordpress/block-library/build-module/terms-query/edit/terms-query-content.js
55331 +
55332 +
55333 +
55334 +
55335 + const terms_query_content_TEMPLATE = [["core/term-template"]];
55336 + function TermsQueryContent({
55337 + attributes,
55338 + setAttributes,
55339 + clientId,
55340 + context
55341 + }) {
55342 + const { tagName: TagName } = attributes;
55343 + const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)();
55344 + const innerBlocksProps = (0,external_wp_blockEditor_namespaceObject.useInnerBlocksProps)(blockProps, {
55345 + template: terms_query_content_TEMPLATE
55346 + });
55347 + const setQuery = (0,external_wp_element_namespaceObject.useCallback)(
55348 + (newQuery) => setAttributes((prevAttributes) => ({
55349 + termQuery: { ...prevAttributes.termQuery, ...newQuery }
55350 + })),
55351 + [setAttributes]
55352 + );
55353 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
55354 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
55355 + TermsQueryInspectorControls,
55356 + {
55357 + attributes,
55358 + setQuery,
55359 + setAttributes,
55360 + clientId,
55361 + templateSlug: context?.templateSlug
55362 + }
55363 + ),
55364 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(TagName, { ...innerBlocksProps })
55365 + ] });
55366 + }
55367 +
55368 +
55369 + ;// ./node_modules/@wordpress/block-library/build-module/terms-query/edit/terms-query-placeholder.js
55370 +
55371 +
55372 +
55373 +
55374 + function TermsQueryPlaceholder({
55375 + attributes,
55376 + clientId,
55377 + name
55378 + }) {
55379 + const { blockType, activeBlockVariation, scopeVariations } = (0,external_wp_data_namespaceObject.useSelect)(
55380 + (select) => {
55381 + const {
55382 + getActiveBlockVariation,
55383 + getBlockType,
55384 + getBlockVariations
55385 + } = select(external_wp_blocks_namespaceObject.store);
55386 + return {
55387 + blockType: getBlockType(name),
55388 + activeBlockVariation: getActiveBlockVariation(
55389 + name,
55390 + attributes
55391 + ),
55392 + scopeVariations: getBlockVariations(name, "block")
55393 + };
55394 + },
55395 + [name, attributes]
55396 + );
55397 + const icon = activeBlockVariation?.icon?.src || activeBlockVariation?.icon || blockType?.icon?.src;
55398 + const label = activeBlockVariation?.title || blockType?.title;
55399 + const { replaceInnerBlocks } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_blockEditor_namespaceObject.store);
55400 + const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)();
55401 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { ...blockProps, children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
55402 + external_wp_blockEditor_namespaceObject.__experimentalBlockVariationPicker,
55403 + {
55404 + icon,
55405 + label,
55406 + variations: scopeVariations,
55407 + onSelect: (variation) => {
55408 + if (variation.innerBlocks) {
55409 + replaceInnerBlocks(
55410 + clientId,
55411 + (0,external_wp_blocks_namespaceObject.createBlocksFromInnerBlocksTemplate)(
55412 + variation.innerBlocks
55413 + ),
55414 + false
55415 + );
55416 + }
55417 + }
55418 + }
55419 + ) });
55420 + }
55421 +
55422 +
55423 + ;// ./node_modules/@wordpress/block-library/build-module/terms-query/edit/index.js
55424 +
55425 +
55426 +
55427 +
55428 +
55429 + const TermsQueryEdit = (props) => {
55430 + const hasInnerBlocks = (0,external_wp_data_namespaceObject.useSelect)(
55431 + (select) => !!select(external_wp_blockEditor_namespaceObject.store).getBlocks(props.clientId).length,
55432 + [props.clientId]
55433 + );
55434 + const Component = hasInnerBlocks ? TermsQueryContent : TermsQueryPlaceholder;
55435 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(Component, { ...props });
55436 + };
55437 + var terms_query_edit_edit_default = TermsQueryEdit;
55438 +
55439 +
55440 + ;// ./node_modules/@wordpress/block-library/build-module/terms-query/save.js
55441 +
55442 +
55443 + function terms_query_save_save({ attributes: { tagName: Tag = "div" } }) {
55444 + const blockProps = external_wp_blockEditor_namespaceObject.useBlockProps.save();
55445 + const innerBlocksProps = external_wp_blockEditor_namespaceObject.useInnerBlocksProps.save(blockProps);
55446 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(Tag, { ...innerBlocksProps });
55447 + }
55448 +
55449 +
55450 + ;// ./node_modules/@wordpress/block-library/build-module/terms-query/variations.js
55451 +
55452 +
55453 +
55454 + const variations_titleDate = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 48 48", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Path, { d: "M 41,9 H 7 v 3 h 34 z m 0,9 H 7 v 3 h 34 z m 0,18 H 7 v 3 h 34 z m 0,-9 H 7 v 3 h 34 z" }) });
55455 + const variations_titleExcerpt = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 48 48", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Path, { d: "m 36,36 h 5 v 3 h -5 z m 0,-9 h 5 v 3 h -5 z m 0,-9 h 5 v 3 h -5 z m 0,-9 h 5 v 3 H 36 Z M 31,9 H 7 v 3 h 24 z m 0,9 H 7 v 3 h 24 z m 0,18 H 7 v 3 h 24 z m 0,-9 H 7 v 3 h 24 z" }) });
55456 + const termName = [
55457 + "core/term-name",
55458 + {
55459 + isLink: true
55460 + }
55461 + ];
55462 + const terms_query_variations_variations = [
55463 + {
55464 + name: "name",
55465 + title: (0,external_wp_i18n_namespaceObject.__)("Name"),
55466 + description: (0,external_wp_i18n_namespaceObject.__)("Display the terms' names."),
55467 + attributes: {},
55468 + icon: variations_titleDate,
55469 + scope: ["block"],
55470 + innerBlocks: [["core/term-template", {}, [termName]]]
55471 + },
55472 + {
55473 + name: "name-count",
55474 + title: (0,external_wp_i18n_namespaceObject.__)("Name & Count"),
55475 + description: (0,external_wp_i18n_namespaceObject.__)(
55476 + "Display the terms' names and number of posts assigned to each term."
55477 + ),
55478 + attributes: {},
55479 + icon: variations_titleExcerpt,
55480 + scope: ["block"],
55481 + innerBlocks: [
55482 + [
55483 + "core/term-template",
55484 + {},
55485 + [
55486 + [
55487 + "core/group",
55488 + { layout: { type: "flex", flexWrap: "nowrap" } },
55489 + [termName, ["core/term-count"]]
55490 + ]
55491 + ]
55492 + ]
55493 + ]
55494 + }
55495 + ];
55496 + var terms_query_variations_variations_default = terms_query_variations_variations;
55497 +
55498 +
55499 + ;// ./node_modules/@wordpress/block-library/build-module/terms-query/index.js
55500 +
55501 +
55502 +
55503 +
55504 +
55505 +
55506 + const { name: terms_query_name } = terms_query_block_namespaceObject;
55507 + const terms_query_settings = {
55508 + icon: loop_default,
55509 + edit: terms_query_edit_edit_default,
55510 + save: terms_query_save_save,
55511 + example: {},
55512 + variations: terms_query_variations_variations_default
55513 + };
55514 + const terms_query_init = () => initBlock({ name: terms_query_name, metadata: terms_query_block_namespaceObject, settings: terms_query_settings });
55515 +
55516 +
55517 + ;// ./node_modules/@wordpress/block-library/build-module/term-template/block.json
55518 + const term_template_block_namespaceObject = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/term-template","title":"Term Template","category":"theme","ancestor":["core/terms-query"],"description":"Contains the block elements used to render a taxonomy term, like the name, description, and more.","textdomain":"default","usesContext":["termQuery"],"supports":{"reusable":false,"html":false,"align":["wide","full"],"layout":true,"color":{"gradients":true,"link":true,"__experimentalDefaultControls":{"background":true,"text":true}},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"spacing":{"margin":true,"padding":true,"blockGap":{"__experimentalDefault":"1.25em"},"__experimentalDefaultControls":{"blockGap":true,"padding":false,"margin":false}},"interactivity":{"clientNavigation":true},"__experimentalBorder":{"radius":true,"color":true,"width":true,"style":true}},"style":"wp-block-term-template","editorStyle":"wp-block-term-template-editor"}');
55519 + ;// ./node_modules/@wordpress/block-library/build-module/term-template/edit.js
55520 +
55521 +
55522 +
55523 +
55524 +
55525 +
55526 +
55527 +
55528 +
55529 + const term_template_edit_TEMPLATE = [["core/term-name"]];
55530 + function TermTemplateInnerBlocks({ classList }) {
55531 + const innerBlocksProps = (0,external_wp_blockEditor_namespaceObject.useInnerBlocksProps)(
55532 + { className: dist_clsx("wp-block-term", classList) },
55533 + { template: term_template_edit_TEMPLATE, __unstableDisableLayoutClassNames: true }
55534 + );
55535 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("li", { ...innerBlocksProps });
55536 + }
55537 + function TermTemplateBlockPreview({
55538 + blocks,
55539 + blockContextId,
55540 + classList,
55541 + isHidden,
55542 + setActiveBlockContextId
55543 + }) {
55544 + const blockPreviewProps = (0,external_wp_blockEditor_namespaceObject.__experimentalUseBlockPreview)({
55545 + blocks,
55546 + props: {
55547 + className: dist_clsx("wp-block-term", classList)
55548 + }
55549 + });
55550 + const handleOnClick = () => {
55551 + setActiveBlockContextId(blockContextId);
55552 + };
55553 + const style = {
55554 + display: isHidden ? "none" : void 0
55555 + };
55556 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
55557 + "li",
55558 + {
55559 + ...blockPreviewProps,
55560 + tabIndex: 0,
55561 + role: "button",
55562 + onClick: handleOnClick,
55563 + onKeyPress: handleOnClick,
55564 + style
55565 + }
55566 + );
55567 + }
55568 + const MemoizedTermTemplateBlockPreview = (0,external_wp_element_namespaceObject.memo)(TermTemplateBlockPreview);
55569 + function TermTemplateEdit({
55570 + clientId,
55571 + attributes: { layout },
55572 + setAttributes,
55573 + context: {
55574 + termQuery: {
55575 + taxonomy,
55576 + order,
55577 + orderBy,
55578 + hideEmpty,
55579 + showNested = false,
55580 + perPage,
55581 + include
55582 + } = {}
55583 + },
55584 + __unstableLayoutClassNames
55585 + }) {
55586 + const { type: layoutType, columnCount = 3 } = layout || {};
55587 + const [activeBlockContextId, setActiveBlockContextId] = (0,external_wp_element_namespaceObject.useState)();
55588 + const queryArgs = {
55589 + hide_empty: hideEmpty,
55590 + order,
55591 + orderby: orderBy,
55592 + // There is a mismatch between `WP_Term_Query` and the REST API parameter default
55593 + // values to fetch all items. In `WP_Term_Query`, the default is `''|0` and in
55594 + // the REST API is `-1`.
55595 + per_page: perPage || -1
55596 + };
55597 + if (!showNested && !include?.length) {
55598 + queryArgs.parent = 0;
55599 + }
55600 + if (include?.length) {
55601 + queryArgs.include = include;
55602 + queryArgs.orderby = "include";
55603 + queryArgs.order = "asc";
55604 + }
55605 + const { records: terms } = (0,external_wp_coreData_namespaceObject.useEntityRecords)(
55606 + "taxonomy",
55607 + taxonomy,
55608 + queryArgs
55609 + );
55610 + const blocks = (0,external_wp_data_namespaceObject.useSelect)(
55611 + (select) => select(external_wp_blockEditor_namespaceObject.store).getBlocks(clientId),
55612 + [clientId]
55613 + );
55614 + const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)({
55615 + className: __unstableLayoutClassNames
55616 + });
55617 + const blockContexts = (0,external_wp_element_namespaceObject.useMemo)(
55618 + () => terms?.map((term) => ({
55619 + taxonomy,
55620 + termId: term.id,
55621 + classList: `term-${term.id}`,
55622 + termData: term
55623 + })),
55624 + [terms, taxonomy]
55625 + );
55626 + if (!terms) {
55627 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("ul", { ...blockProps, children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("li", { className: "wp-block-term term-loading", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { className: "term-loading-placeholder" }) }) });
55628 + }
55629 + if (!terms.length) {
55630 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("p", { ...blockProps, children: [
55631 + " ",
55632 + (0,external_wp_i18n_namespaceObject.__)("No terms found.")
55633 + ] });
55634 + }
55635 + const setDisplayLayout = (newDisplayLayout) => setAttributes((prevAttributes) => ({
55636 + layout: { ...prevAttributes.layout, ...newDisplayLayout }
55637 + }));
55638 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
55639 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockControls, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
55640 + external_wp_components_namespaceObject.ToolbarGroup,
55641 + {
55642 + controls: [
55643 + {
55644 + icon: list_default,
55645 + title: (0,external_wp_i18n_namespaceObject._x)(
55646 + "List view",
55647 + "Term template block display setting"
55648 + ),
55649 + onClick: () => setDisplayLayout({ type: "default" }),
55650 + isActive: layoutType === "default" || layoutType === "constrained"
55651 + },
55652 + {
55653 + icon: grid_default,
55654 + title: (0,external_wp_i18n_namespaceObject._x)(
55655 + "Grid view",
55656 + "Term template block display setting"
55657 + ),
55658 + onClick: () => setDisplayLayout({
55659 + type: "grid",
55660 + columnCount
55661 + }),
55662 + isActive: layoutType === "grid"
55663 + }
55664 + ]
55665 + }
55666 + ) }),
55667 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("ul", { ...blockProps, children: blockContexts?.map((blockContext) => /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(
55668 + external_wp_blockEditor_namespaceObject.BlockContextProvider,
55669 + {
55670 + value: blockContext,
55671 + children: [
55672 + blockContext.termId === (activeBlockContextId || blockContexts[0]?.termId) ? /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
55673 + TermTemplateInnerBlocks,
55674 + {
55675 + classList: blockContext.classList
55676 + }
55677 + ) : null,
55678 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
55679 + MemoizedTermTemplateBlockPreview,
55680 + {
55681 + blocks,
55682 + blockContextId: blockContext.termId,
55683 + classList: blockContext.classList,
55684 + setActiveBlockContextId,
55685 + isHidden: blockContext.termId === (activeBlockContextId || blockContexts[0]?.termId)
55686 + }
55687 + )
55688 + ]
55689 + },
55690 + blockContext.termId
55691 + )) })
55692 + ] });
55693 + }
55694 +
55695 +
55696 + ;// ./node_modules/@wordpress/block-library/build-module/term-template/save.js
55697 +
55698 +
55699 + function TermTemplateSave() {
55700 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, {});
55701 + }
55702 +
55703 +
55704 + ;// ./node_modules/@wordpress/block-library/build-module/term-template/index.js
55705 +
55706 +
55707 +
55708 +
55709 +
55710 + const { name: term_template_name } = term_template_block_namespaceObject;
55711 + const term_template_settings = {
55712 + icon: layout_default,
55713 + edit: TermTemplateEdit,
55714 + save: TermTemplateSave,
55715 + example: {}
55716 + };
55717 + const term_template_init = () => initBlock({ name: term_template_name, metadata: term_template_block_namespaceObject, settings: term_template_settings });
55718 +
55719 +
55720 + ;// ./node_modules/@wordpress/block-library/build-module/text-columns/edit.js
55721 +
55722 +
55723 +
55724 +
55725 +
55726 + function TextColumnsEdit({ attributes, setAttributes }) {
55727 + const { width, content, columns } = attributes;
55728 + external_wp_deprecated_default()("The Text Columns block", {
55729 + since: "5.3",
55730 + alternative: "the Columns block"
55731 + });
55732 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
55733 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockControls, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
55734 + external_wp_blockEditor_namespaceObject.BlockAlignmentToolbar,
55735 + {
55736 + value: width,
55737 + onChange: (nextWidth) => setAttributes({ width: nextWidth }),
55738 + controls: ["center", "wide", "full"]
55739 + }
55740 + ) }),
55741 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.PanelBody, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
55742 + external_wp_components_namespaceObject.RangeControl,
55743 + {
55744 + __nextHasNoMarginBottom: true,
55745 + __next40pxDefaultSize: true,
55746 + label: (0,external_wp_i18n_namespaceObject.__)("Columns"),
55747 + value: columns,
55748 + onChange: (value) => setAttributes({ columns: value }),
55749 + min: 2,
55750 + max: 4,
55751 + required: true
55752 + }
55753 + ) }) }),
55754 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
55755 + "div",
55756 + {
55757 + ...(0,external_wp_blockEditor_namespaceObject.useBlockProps)({
55758 + className: `align${width} columns-${columns}`
55759 + }),
55760 + children: Array.from({ length: columns }).map((_, index) => {
55761 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
55762 + "div",
55763 + {
55764 + className: "wp-block-column",
55765 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
55766 + external_wp_blockEditor_namespaceObject.RichText,
55767 + {
55768 + tagName: "p",
55769 + value: content?.[index]?.children,
55770 + onChange: (nextContent) => {
55771 + setAttributes({
55772 + content: [
55773 + ...content.slice(0, index),
55774 + { children: nextContent },
55775 + ...content.slice(index + 1)
55776 + ]
55777 + });
55778 + },
55779 + "aria-label": (0,external_wp_i18n_namespaceObject.sprintf)(
55780 + // translators: %d: column index (starting with 1)
55781 + (0,external_wp_i18n_namespaceObject.__)("Column %d text"),
55782 + index + 1
55783 + ),
55784 + placeholder: (0,external_wp_i18n_namespaceObject.__)("New Column")
55785 + }
55786 + )
55787 + },
55788 + `column-${index}`
55789 + );
55790 + })
55791 + }
55792 + )
55793 + ] });
55794 + }
55795 +
55796 +
55797 + ;// ./node_modules/@wordpress/block-library/build-module/text-columns/block.json
55798 + const text_columns_block_namespaceObject = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/text-columns","title":"Text Columns (deprecated)","icon":"columns","category":"design","description":"This block is deprecated. Please use the Columns block instead.","textdomain":"default","attributes":{"content":{"type":"array","source":"query","selector":"p","query":{"children":{"type":"string","source":"html"}},"default":[{},{}]},"columns":{"type":"number","default":2},"width":{"type":"string"}},"supports":{"inserter":false,"interactivity":{"clientNavigation":true}},"editorStyle":"wp-block-text-columns-editor","style":"wp-block-text-columns"}');
55799 + ;// ./node_modules/@wordpress/block-library/build-module/text-columns/save.js
55800 +
55801 +
55802 + function text_columns_save_save({ attributes }) {
55803 + const { width, content, columns } = attributes;
55804 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
55805 + "div",
55806 + {
55807 + ...external_wp_blockEditor_namespaceObject.useBlockProps.save({
55808 + className: `align${width} columns-${columns}`
55809 + }),
55810 + children: Array.from({ length: columns }).map((_, index) => /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { className: "wp-block-column", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
55811 + external_wp_blockEditor_namespaceObject.RichText.Content,
55812 + {
55813 + tagName: "p",
55814 + value: content?.[index]?.children
55815 + }
55816 + ) }, `column-${index}`))
55817 + }
55818 + );
55819 + }
55820 +
55821 +
55822 + ;// ./node_modules/@wordpress/block-library/build-module/text-columns/transforms.js
55823 +
55824 + const text_columns_transforms_transforms = {
55825 + to: [
55826 + {
55827 + type: "block",
55828 + blocks: ["core/columns"],
55829 + transform: ({ className, columns, content, width }) => (0,external_wp_blocks_namespaceObject.createBlock)(
55830 + "core/columns",
55831 + {
55832 + align: "wide" === width || "full" === width ? width : void 0,
55833 + className,
55834 + columns
55835 + },
55836 + content.map(
55837 + ({ children }) => (0,external_wp_blocks_namespaceObject.createBlock)("core/column", {}, [
55838 + (0,external_wp_blocks_namespaceObject.createBlock)("core/paragraph", {
55839 + content: children
55840 + })
55841 + ])
55842 + )
55843 + )
55844 + }
55845 + ]
55846 + };
55847 + var text_columns_transforms_transforms_default = text_columns_transforms_transforms;
55848 +
55849 +
55850 + ;// ./node_modules/@wordpress/block-library/build-module/text-columns/index.js
55851 +
55852 +
55853 +
55854 +
55855 +
55856 + const { name: text_columns_name } = text_columns_block_namespaceObject;
55857 + const text_columns_settings = {
55858 + transforms: text_columns_transforms_transforms_default,
55859 + getEditWrapperProps(attributes) {
55860 + const { width } = attributes;
55861 + if ("wide" === width || "full" === width) {
55862 + return { "data-align": width };
55863 + }
55864 + },
55865 + edit: TextColumnsEdit,
55866 + save: text_columns_save_save
55867 + };
55868 + const text_columns_init = () => initBlock({ name: text_columns_name, metadata: text_columns_block_namespaceObject, settings: text_columns_settings });
55869 +
55870 +
55871 + ;// ./node_modules/@wordpress/block-library/build-module/verse/deprecated.js
55872 +
55873 +
55874 +
55875 +
55876 + const verse_deprecated_v1 = {
55877 + attributes: {
55878 + content: {
55879 + type: "string",
55880 + source: "html",
55881 + selector: "pre",
55882 + default: ""
55883 + },
55884 + textAlign: {
55885 + type: "string"
55886 + }
55887 + },
55888 + save({ attributes }) {
55889 + const { textAlign, content } = attributes;
55890 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
55891 + external_wp_blockEditor_namespaceObject.RichText.Content,
55892 + {
55893 + tagName: "pre",
55894 + style: { textAlign },
55895 + value: content
55896 + }
55897 + );
55898 + }
55899 + };
55900 + const verse_deprecated_v2 = {
55901 + attributes: {
55902 + content: {
55903 + type: "string",
55904 + source: "html",
55905 + selector: "pre",
55906 + default: "",
55907 + __unstablePreserveWhiteSpace: true,
55908 + role: "content"
55909 + },
55910 + textAlign: {
55911 + type: "string"
55912 + }
55913 + },
55914 + supports: {
55915 + anchor: true,
55916 + color: {
55917 + gradients: true,
55918 + link: true
55919 + },
55920 + typography: {
55921 + fontSize: true,
55922 + __experimentalFontFamily: true
55923 + },
55924 + spacing: {
55925 + padding: true
55926 + }
55927 + },
55928 + save({ attributes }) {
55929 + const { textAlign, content } = attributes;
55930 + const className = dist_clsx({
55931 + [`has-text-align-${textAlign}`]: textAlign
55932 + });
55933 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("pre", { ...external_wp_blockEditor_namespaceObject.useBlockProps.save({ className }), children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichText.Content, { value: content }) });
55934 + },
55935 + migrate: migrate_font_family_default,
55936 + isEligible({ style }) {
55937 + return style?.typography?.fontFamily;
55938 + }
55939 + };
55940 + var verse_deprecated_deprecated_default = [verse_deprecated_v2, verse_deprecated_v1];
55941 +
55942 +
55943 + ;// ./node_modules/@wordpress/block-library/build-module/verse/edit.js
55944 +
55945 +
55946 +
55947 +
55948 +
55949 + function VerseEdit({
55950 + attributes,
55951 + setAttributes,
55952 + mergeBlocks,
55953 + onRemove,
55954 + insertBlocksAfter,
55955 + style
55956 + }) {
55957 + const { textAlign, content } = attributes;
55958 + const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)({
55959 + className: dist_clsx({
55960 + [`has-text-align-${textAlign}`]: textAlign
55961 + }),
55962 + style
55963 + });
55964 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
55965 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockControls, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
55966 + external_wp_blockEditor_namespaceObject.AlignmentToolbar,
55967 + {
55968 + value: textAlign,
55969 + onChange: (nextAlign) => {
55970 + setAttributes({ textAlign: nextAlign });
55971 + }
55972 + }
55973 + ) }),
55974 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
55975 + external_wp_blockEditor_namespaceObject.RichText,
55976 + {
55977 + tagName: "pre",
55978 + identifier: "content",
55979 + preserveWhiteSpace: true,
55980 + value: content,
55981 + onChange: (nextContent) => {
55982 + setAttributes({
55983 + content: nextContent
55984 + });
55985 + },
55986 + "aria-label": (0,external_wp_i18n_namespaceObject.__)("Verse text"),
55987 + placeholder: (0,external_wp_i18n_namespaceObject.__)("Write verse\u2026"),
55988 + onRemove,
55989 + onMerge: mergeBlocks,
55990 + textAlign,
55991 + ...blockProps,
55992 + __unstablePastePlainText: true,
55993 + __unstableOnSplitAtDoubleLineEnd: () => insertBlocksAfter((0,external_wp_blocks_namespaceObject.createBlock)((0,external_wp_blocks_namespaceObject.getDefaultBlockName)()))
55994 + }
55995 + )
55996 + ] });
55997 + }
55998 +
55999 +
56000 + ;// ./node_modules/@wordpress/block-library/build-module/verse/block.json
56001 + const verse_block_namespaceObject = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/verse","title":"Verse","category":"text","description":"Insert poetry. Use special spacing formats. Or quote song lyrics.","keywords":["poetry","poem"],"textdomain":"default","attributes":{"content":{"type":"rich-text","source":"rich-text","selector":"pre","__unstablePreserveWhiteSpace":true,"role":"content"},"textAlign":{"type":"string"}},"supports":{"anchor":true,"background":{"backgroundImage":true,"backgroundSize":true,"__experimentalDefaultControls":{"backgroundImage":true}},"color":{"gradients":true,"link":true,"__experimentalDefaultControls":{"background":true,"text":true}},"dimensions":{"minHeight":true,"__experimentalDefaultControls":{"minHeight":false}},"typography":{"fontSize":true,"__experimentalFontFamily":true,"lineHeight":true,"__experimentalFontStyle":true,"__experimentalFontWeight":true,"__experimentalLetterSpacing":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalWritingMode":true,"__experimentalDefaultControls":{"fontSize":true}},"spacing":{"margin":true,"padding":true,"__experimentalDefaultControls":{"margin":false,"padding":false}},"__experimentalBorder":{"radius":true,"width":true,"color":true,"style":true},"interactivity":{"clientNavigation":true}},"style":"wp-block-verse","editorStyle":"wp-block-verse-editor"}');
56002 + ;// ./node_modules/@wordpress/block-library/build-module/verse/save.js
56003 +
56004 +
56005 +
56006 + function verse_save_save({ attributes }) {
56007 + const { textAlign, content } = attributes;
56008 + const className = dist_clsx({
56009 + [`has-text-align-${textAlign}`]: textAlign
56010 + });
56011 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("pre", { ...external_wp_blockEditor_namespaceObject.useBlockProps.save({ className }), children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichText.Content, { value: content }) });
56012 + }
56013 +
56014 +
56015 + ;// ./node_modules/@wordpress/block-library/build-module/verse/transforms.js
56016 +
56017 + const verse_transforms_transforms = {
56018 + from: [
56019 + {
56020 + type: "block",
56021 + blocks: ["core/paragraph"],
56022 + transform: (attributes) => (0,external_wp_blocks_namespaceObject.createBlock)("core/verse", attributes)
56023 + }
56024 + ],
56025 + to: [
56026 + {
56027 + type: "block",
56028 + blocks: ["core/paragraph"],
56029 + transform: (attributes) => (0,external_wp_blocks_namespaceObject.createBlock)("core/paragraph", attributes)
56030 + }
56031 + ]
56032 + };
56033 + var verse_transforms_transforms_default = verse_transforms_transforms;
56034 +
56035 +
56036 + ;// ./node_modules/@wordpress/block-library/build-module/verse/index.js
56037 +
56038 +
56039 +
56040 +
56041 +
56042 +
56043 +
56044 +
56045 + const { name: verse_name } = verse_block_namespaceObject;
56046 + const verse_settings = {
56047 + icon: verse_default,
56048 + example: {
56049 + attributes: {
56050 + /* eslint-disable @wordpress/i18n-no-collapsible-whitespace */
56051 + // translators: Sample content for the Verse block. Can be replaced with a more locale-adequate work.
56052 + content: (0,external_wp_i18n_namespaceObject.__)(
56053 + "WHAT was he doing, the great god Pan,\n Down in the reeds by the river?\nSpreading ruin and scattering ban,\nSplashing and paddling with hoofs of a goat,\nAnd breaking the golden lilies afloat\n With the dragon-fly on the river."
56054 + )
56055 + /* eslint-enable @wordpress/i18n-no-collapsible-whitespace */
56056 + }
56057 + },
56058 + transforms: verse_transforms_transforms_default,
56059 + deprecated: verse_deprecated_deprecated_default,
56060 + merge(attributes, attributesToMerge) {
56061 + return {
56062 + content: attributes.content + "\n\n" + attributesToMerge.content
56063 + };
56064 + },
56065 + edit: VerseEdit,
56066 + save: verse_save_save
56067 + };
56068 + const verse_init = () => initBlock({ name: verse_name, metadata: verse_block_namespaceObject, settings: verse_settings });
56069 +
56070 +
56071 + ;// ./node_modules/@wordpress/icons/build-module/library/video.js
56072 +
56073 +
56074 + var video_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M18.7 3H5.3C4 3 3 4 3 5.3v13.4C3 20 4 21 5.3 21h13.4c1.3 0 2.3-1 2.3-2.3V5.3C21 4 20 3 18.7 3zm.8 15.7c0 .4-.4.8-.8.8H5.3c-.4 0-.8-.4-.8-.8V5.3c0-.4.4-.8.8-.8h13.4c.4 0 .8.4.8.8v13.4zM10 15l5-3-5-3v6z" }) });
56075 +
56076 +
56077 + ;// ./node_modules/@wordpress/block-library/build-module/video/block.json
56078 + const video_block_namespaceObject = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/video","title":"Video","category":"media","description":"Embed a video from your media library or upload a new one.","keywords":["movie"],"textdomain":"default","attributes":{"autoplay":{"type":"boolean","source":"attribute","selector":"video","attribute":"autoplay"},"caption":{"type":"rich-text","source":"rich-text","selector":"figcaption","role":"content"},"controls":{"type":"boolean","source":"attribute","selector":"video","attribute":"controls","default":true},"id":{"type":"number","role":"content"},"loop":{"type":"boolean","source":"attribute","selector":"video","attribute":"loop"},"muted":{"type":"boolean","source":"attribute","selector":"video","attribute":"muted"},"poster":{"type":"string","source":"attribute","selector":"video","attribute":"poster"},"preload":{"type":"string","source":"attribute","selector":"video","attribute":"preload","default":"metadata"},"blob":{"type":"string","role":"local"},"src":{"type":"string","source":"attribute","selector":"video","attribute":"src","role":"content"},"playsInline":{"type":"boolean","source":"attribute","selector":"video","attribute":"playsinline"},"tracks":{"role":"content","type":"array","items":{"type":"object"},"default":[]}},"supports":{"anchor":true,"align":true,"spacing":{"margin":true,"padding":true,"__experimentalDefaultControls":{"margin":false,"padding":false}},"interactivity":{"clientNavigation":true}},"editorStyle":"wp-block-video-editor","style":"wp-block-video"}');
56079 + ;// ./node_modules/@wordpress/block-library/build-module/video/tracks.js
56080 +
56081 + function Tracks({ tracks = [] }) {
56082 + return tracks.map((track) => {
56083 + const { id, ...trackAttrs } = track;
56084 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("track", { ...trackAttrs }, id ?? trackAttrs.src);
56085 + });
56086 + }
56087 +
56088 +
56089 + ;// ./node_modules/@wordpress/block-library/build-module/video/deprecated.js
56090 +
56091 +
56092 +
56093 +
56094 + const { attributes: video_deprecated_blockAttributes } = video_block_namespaceObject;
56095 + const video_deprecated_v1 = {
56096 + attributes: video_deprecated_blockAttributes,
56097 + save({ attributes }) {
56098 + const {
56099 + autoplay,
56100 + caption,
56101 + controls,
56102 + loop,
56103 + muted,
56104 + poster,
56105 + preload,
56106 + src,
56107 + playsInline,
56108 + tracks
56109 + } = attributes;
56110 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("figure", { ...external_wp_blockEditor_namespaceObject.useBlockProps.save(), children: [
56111 + src && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
56112 + "video",
56113 + {
56114 + autoPlay: autoplay,
56115 + controls,
56116 + loop,
56117 + muted,
56118 + poster,
56119 + preload: preload !== "metadata" ? preload : void 0,
56120 + src,
56121 + playsInline,
56122 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(Tracks, { tracks })
56123 + }
56124 + ),
56125 + !external_wp_blockEditor_namespaceObject.RichText.isEmpty(caption) && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichText.Content, { tagName: "figcaption", value: caption })
56126 + ] });
56127 + }
56128 + };
56129 + const video_deprecated_deprecated = [video_deprecated_v1];
56130 + var video_deprecated_deprecated_default = video_deprecated_deprecated;
56131 +
56132 +
56133 + ;// ./node_modules/@wordpress/block-library/build-module/video/edit-common-settings.js
56134 +
56135 +
56136 +
56137 +
56138 + const options = [
56139 + { value: "auto", label: (0,external_wp_i18n_namespaceObject.__)("Auto") },
56140 + { value: "metadata", label: (0,external_wp_i18n_namespaceObject.__)("Metadata") },
56141 + { value: "none", label: (0,external_wp_i18n_namespaceObject._x)("None", "Preload value") }
56142 + ];
56143 + const VideoSettings = ({ setAttributes, attributes }) => {
56144 + const { autoplay, controls, loop, muted, playsInline, preload } = attributes;
56145 + const autoPlayHelpText = (0,external_wp_i18n_namespaceObject.__)(
56146 + "Autoplay may cause usability issues for some users."
56147 + );
56148 + const getAutoplayHelp = external_wp_element_namespaceObject.Platform.select({
56149 + web: (0,external_wp_element_namespaceObject.useCallback)((checked) => {
56150 + return checked ? autoPlayHelpText : null;
56151 + }, []),
56152 + native: autoPlayHelpText
56153 + });
56154 + const toggleFactory = (0,external_wp_element_namespaceObject.useMemo)(() => {
56155 + const toggleAttribute = (attribute) => {
56156 + return (newValue) => {
56157 + setAttributes({
56158 + [attribute]: newValue,
56159 + // Set muted and playsInLine when autoplay changes
56160 + // playsInline is set to true when autoplay is true to support iOS devices
56161 + ...attribute === "autoplay" && {
56162 + muted: newValue,
56163 + playsInline: newValue
56164 + }
56165 + });
56166 + };
56167 + };
56168 + return {
56169 + autoplay: toggleAttribute("autoplay"),
56170 + loop: toggleAttribute("loop"),
56171 + muted: toggleAttribute("muted"),
56172 + controls: toggleAttribute("controls"),
56173 + playsInline: toggleAttribute("playsInline")
56174 + };
56175 + }, []);
56176 + const onChangePreload = (0,external_wp_element_namespaceObject.useCallback)((value) => {
56177 + setAttributes({ preload: value });
56178 + }, []);
56179 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
56180 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
56181 + external_wp_components_namespaceObject.__experimentalToolsPanelItem,
56182 + {
56183 + label: (0,external_wp_i18n_namespaceObject.__)("Autoplay"),
56184 + isShownByDefault: true,
56185 + hasValue: () => !!autoplay,
56186 + onDeselect: () => {
56187 + setAttributes({ autoplay: false, muted: false });
56188 + },
56189 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
56190 + external_wp_components_namespaceObject.ToggleControl,
56191 + {
56192 + __nextHasNoMarginBottom: true,
56193 + label: (0,external_wp_i18n_namespaceObject.__)("Autoplay"),
56194 + onChange: toggleFactory.autoplay,
56195 + checked: !!autoplay,
56196 + help: getAutoplayHelp
56197 + }
56198 + )
56199 + }
56200 + ),
56201 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
56202 + external_wp_components_namespaceObject.__experimentalToolsPanelItem,
56203 + {
56204 + label: (0,external_wp_i18n_namespaceObject.__)("Loop"),
56205 + isShownByDefault: true,
56206 + hasValue: () => !!loop,
56207 + onDeselect: () => {
56208 + setAttributes({ loop: false });
56209 + },
56210 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
56211 + external_wp_components_namespaceObject.ToggleControl,
56212 + {
56213 + __nextHasNoMarginBottom: true,
56214 + label: (0,external_wp_i18n_namespaceObject.__)("Loop"),
56215 + onChange: toggleFactory.loop,
56216 + checked: !!loop
56217 + }
56218 + )
56219 + }
56220 + ),
56221 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
56222 + external_wp_components_namespaceObject.__experimentalToolsPanelItem,
56223 + {
56224 + label: (0,external_wp_i18n_namespaceObject.__)("Muted"),
56225 + isShownByDefault: true,
56226 + hasValue: () => !!muted,
56227 + onDeselect: () => {
56228 + setAttributes({ muted: false });
56229 + },
56230 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
56231 + external_wp_components_namespaceObject.ToggleControl,
56232 + {
56233 + __nextHasNoMarginBottom: true,
56234 + label: (0,external_wp_i18n_namespaceObject.__)("Muted"),
56235 + onChange: toggleFactory.muted,
56236 + checked: !!muted,
56237 + disabled: autoplay,
56238 + help: autoplay ? (0,external_wp_i18n_namespaceObject.__)("Muted because of Autoplay.") : null
56239 + }
56240 + )
56241 + }
56242 + ),
56243 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
56244 + external_wp_components_namespaceObject.__experimentalToolsPanelItem,
56245 + {
56246 + label: (0,external_wp_i18n_namespaceObject.__)("Playback controls"),
56247 + isShownByDefault: true,
56248 + hasValue: () => !controls,
56249 + onDeselect: () => {
56250 + setAttributes({ controls: true });
56251 + },
56252 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
56253 + external_wp_components_namespaceObject.ToggleControl,
56254 + {
56255 + __nextHasNoMarginBottom: true,
56256 + label: (0,external_wp_i18n_namespaceObject.__)("Playback controls"),
56257 + onChange: toggleFactory.controls,
56258 + checked: !!controls
56259 + }
56260 + )
56261 + }
56262 + ),
56263 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
56264 + external_wp_components_namespaceObject.__experimentalToolsPanelItem,
56265 + {
56266 + label: (0,external_wp_i18n_namespaceObject.__)("Play inline"),
56267 + isShownByDefault: true,
56268 + hasValue: () => !!playsInline,
56269 + onDeselect: () => {
56270 + setAttributes({ playsInline: false });
56271 + },
56272 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
56273 + external_wp_components_namespaceObject.ToggleControl,
56274 + {
56275 + __nextHasNoMarginBottom: true,
56276 + label: (0,external_wp_i18n_namespaceObject.__)("Play inline"),
56277 + onChange: toggleFactory.playsInline,
56278 + checked: !!playsInline,
56279 + disabled: autoplay,
56280 + help: autoplay ? (0,external_wp_i18n_namespaceObject.__)("Play inline enabled because of Autoplay.") : (0,external_wp_i18n_namespaceObject.__)(
56281 + "When enabled, videos will play directly within the webpage on mobile browsers, instead of opening in a fullscreen player."
56282 + )
56283 + }
56284 + )
56285 + }
56286 + ),
56287 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
56288 + external_wp_components_namespaceObject.__experimentalToolsPanelItem,
56289 + {
56290 + label: (0,external_wp_i18n_namespaceObject.__)("Preload"),
56291 + isShownByDefault: true,
56292 + hasValue: () => preload !== "metadata",
56293 + onDeselect: () => {
56294 + setAttributes({ preload: "metadata" });
56295 + },
56296 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
56297 + external_wp_components_namespaceObject.SelectControl,
56298 + {
56299 + __next40pxDefaultSize: true,
56300 + __nextHasNoMarginBottom: true,
56301 + label: (0,external_wp_i18n_namespaceObject.__)("Preload"),
56302 + value: preload,
56303 + onChange: onChangePreload,
56304 + options,
56305 + hideCancelButton: true
56306 + }
56307 + )
56308 + }
56309 + )
56310 + ] });
56311 + };
56312 + var edit_common_settings_default = VideoSettings;
56313 +
56314 +
56315 + ;// ./node_modules/@wordpress/block-library/build-module/video/tracks-editor.js
56316 +
56317 +
56318 +
56319 +
56320 +
56321 +
56322 +
56323 +
56324 +
56325 + const { Badge: tracks_editor_Badge } = unlock(external_wp_components_namespaceObject.privateApis);
56326 + const ALLOWED_TYPES = ["text/vtt"];
56327 + const DEFAULT_KIND = "subtitles";
56328 + const KIND_OPTIONS = [
56329 + { label: (0,external_wp_i18n_namespaceObject.__)("Subtitles"), value: "subtitles" },
56330 + { label: (0,external_wp_i18n_namespaceObject.__)("Captions"), value: "captions" },
56331 + { label: (0,external_wp_i18n_namespaceObject.__)("Descriptions"), value: "descriptions" },
56332 + { label: (0,external_wp_i18n_namespaceObject.__)("Chapters"), value: "chapters" },
56333 + { label: (0,external_wp_i18n_namespaceObject.__)("Metadata"), value: "metadata" }
56334 + ];
56335 + const DEFAULT_TRACK = {
56336 + src: "",
56337 + label: "",
56338 + srcLang: "en",
56339 + kind: DEFAULT_KIND,
56340 + default: false
56341 + };
56342 + function TrackList({ tracks, onEditPress }) {
56343 + const content = tracks.map((track, index) => {
56344 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(
56345 + external_wp_components_namespaceObject.__experimentalHStack,
56346 + {
56347 + className: "block-library-video-tracks-editor__track-list-track",
56348 + children: [
56349 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("span", { children: track.label }),
56350 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.__experimentalHStack, { justify: "flex-end", children: [
56351 + track.default && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(tracks_editor_Badge, { children: (0,external_wp_i18n_namespaceObject.__)("Default") }),
56352 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
56353 + external_wp_components_namespaceObject.Button,
56354 + {
56355 + __next40pxDefaultSize: true,
56356 + variant: "tertiary",
56357 + onClick: () => onEditPress(index),
56358 + "aria-label": (0,external_wp_i18n_namespaceObject.sprintf)(
56359 + /* translators: %s: Label of the video text track e.g: "French subtitles". */
56360 + (0,external_wp_i18n_namespaceObject._x)("Edit %s", "text tracks"),
56361 + track.label
56362 + ),
56363 + children: (0,external_wp_i18n_namespaceObject.__)("Edit")
56364 + }
56365 + )
56366 + ] })
56367 + ]
56368 + },
56369 + track.id ?? track.src
56370 + );
56371 + });
56372 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
56373 + external_wp_components_namespaceObject.MenuGroup,
56374 + {
56375 + label: (0,external_wp_i18n_namespaceObject.__)("Text tracks"),
56376 + className: "block-library-video-tracks-editor__track-list",
56377 + children: content
56378 + }
56379 + );
56380 + }
56381 + function SingleTrackEditor({
56382 + track,
56383 + onChange,
56384 + onClose,
56385 + onRemove,
56386 + allowSettingDefault
56387 + }) {
56388 + const [trackState, setTrackState] = (0,external_wp_element_namespaceObject.useState)({
56389 + ...DEFAULT_TRACK,
56390 + ...track
56391 + });
56392 + const { src, label, srcLang, kind, default: isDefaultTrack } = trackState;
56393 + const fileName = src.startsWith("blob:") ? "" : (0,external_wp_url_namespaceObject.getFilename)(src) || "";
56394 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(
56395 + external_wp_components_namespaceObject.__experimentalVStack,
56396 + {
56397 + className: "block-library-video-tracks-editor__single-track-editor",
56398 + spacing: "4",
56399 + children: [
56400 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("span", { className: "block-library-video-tracks-editor__single-track-editor-edit-track-label", children: (0,external_wp_i18n_namespaceObject.__)("Edit track") }),
56401 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("span", { children: [
56402 + (0,external_wp_i18n_namespaceObject.__)("File"),
56403 + ": ",
56404 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("b", { children: fileName })
56405 + ] }),
56406 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.__experimentalGrid, { columns: 2, gap: 4, children: [
56407 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
56408 + external_wp_components_namespaceObject.TextControl,
56409 + {
56410 + __next40pxDefaultSize: true,
56411 + __nextHasNoMarginBottom: true,
56412 + onChange: (newLabel) => setTrackState((prevTrackState) => ({
56413 + ...prevTrackState,
56414 + label: newLabel
56415 + })),
56416 + label: (0,external_wp_i18n_namespaceObject.__)("Label"),
56417 + value: label,
56418 + help: (0,external_wp_i18n_namespaceObject.__)("Title of track")
56419 + }
56420 + ),
56421 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
56422 + external_wp_components_namespaceObject.TextControl,
56423 + {
56424 + __next40pxDefaultSize: true,
56425 + __nextHasNoMarginBottom: true,
56426 + onChange: (newSrcLang) => setTrackState((prevTrackState) => ({
56427 + ...prevTrackState,
56428 + srcLang: newSrcLang
56429 + })),
56430 + label: (0,external_wp_i18n_namespaceObject.__)("Source language"),
56431 + value: srcLang,
56432 + help: (0,external_wp_i18n_namespaceObject.__)("Language tag (en, fr, etc.)")
56433 + }
56434 + )
56435 + ] }),
56436 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.__experimentalVStack, { spacing: "4", children: [
56437 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
56438 + external_wp_components_namespaceObject.SelectControl,
56439 + {
56440 + __next40pxDefaultSize: true,
56441 + __nextHasNoMarginBottom: true,
56442 + className: "block-library-video-tracks-editor__single-track-editor-kind-select",
56443 + options: KIND_OPTIONS,
56444 + value: kind,
56445 + label: (0,external_wp_i18n_namespaceObject.__)("Kind"),
56446 + onChange: (newKind) => setTrackState((prevTrackState) => ({
56447 + ...prevTrackState,
56448 + kind: newKind
56449 + }))
56450 + }
56451 + ),
56452 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
56453 + external_wp_components_namespaceObject.ToggleControl,
56454 + {
56455 + __next40pxDefaultSize: true,
56456 + __nextHasNoMarginBottom: true,
56457 + label: (0,external_wp_i18n_namespaceObject.__)("Set as default track"),
56458 + checked: isDefaultTrack,
56459 + disabled: !allowSettingDefault,
56460 + onChange: (defaultTrack) => setTrackState((prevTrackState) => ({
56461 + ...prevTrackState,
56462 + default: defaultTrack
56463 + }))
56464 + }
56465 + ),
56466 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.__experimentalHStack, { className: "block-library-video-tracks-editor__single-track-editor-buttons-container", children: [
56467 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
56468 + external_wp_components_namespaceObject.Button,
56469 + {
56470 + __next40pxDefaultSize: true,
56471 + isDestructive: true,
56472 + variant: "link",
56473 + onClick: onRemove,
56474 + children: (0,external_wp_i18n_namespaceObject.__)("Remove track")
56475 + }
56476 + ),
56477 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
56478 + external_wp_components_namespaceObject.Button,
56479 + {
56480 + __next40pxDefaultSize: true,
56481 + variant: "primary",
56482 + onClick: () => {
56483 + onChange(trackState);
56484 + onClose();
56485 + },
56486 + children: (0,external_wp_i18n_namespaceObject.__)("Apply")
56487 + }
56488 + )
56489 + ] })
56490 + ] })
56491 + ]
56492 + }
56493 + );
56494 + }
56495 + function TracksEditor({ tracks = [], onChange }) {
56496 + const mediaUpload = (0,external_wp_data_namespaceObject.useSelect)((select) => {
56497 + return select(external_wp_blockEditor_namespaceObject.store).getSettings().mediaUpload;
56498 + }, []);
56499 + const [trackBeingEdited, setTrackBeingEdited] = (0,external_wp_element_namespaceObject.useState)(null);
56500 + const dropdownPopoverRef = (0,external_wp_element_namespaceObject.useRef)();
56501 + const handleTrackSelect = (selectedTracks = [], appendTracks = false) => {
56502 + const existingTracksMap = new Map(
56503 + tracks.map((track) => [track.id, track])
56504 + );
56505 + const tracksToAdd = selectedTracks.map(({ id, title, url }) => {
56506 + if (existingTracksMap.has(id)) {
56507 + return existingTracksMap.get(id);
56508 + }
56509 + return {
56510 + ...DEFAULT_TRACK,
56511 + id,
56512 + label: title || "",
56513 + src: url
56514 + };
56515 + });
56516 + if (tracksToAdd.length === 0) {
56517 + return;
56518 + }
56519 + onChange([...appendTracks ? tracks : [], ...tracksToAdd]);
56520 + };
56521 + function uploadFiles(event) {
56522 + const files = event.target.files;
56523 + mediaUpload({
56524 + allowedTypes: ALLOWED_TYPES,
56525 + filesList: files,
56526 + onFileChange: (selectedTracks) => {
56527 + if (!Array.isArray(selectedTracks)) {
56528 + return;
56529 + }
56530 + const uploadedTracks = selectedTracks.filter(
56531 + (track) => !!track?.id
56532 + );
56533 + if (!uploadedTracks.length) {
56534 + return;
56535 + }
56536 + handleTrackSelect(uploadedTracks, true);
56537 + }
56538 + });
56539 + }
56540 + (0,external_wp_element_namespaceObject.useEffect)(() => {
56541 + dropdownPopoverRef.current?.focus();
56542 + }, [trackBeingEdited]);
56543 + if (!mediaUpload) {
56544 + return null;
56545 + }
56546 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
56547 + external_wp_components_namespaceObject.Dropdown,
56548 + {
56549 + contentClassName: "block-library-video-tracks-editor",
56550 + focusOnMount: true,
56551 + popoverProps: {
56552 + ref: dropdownPopoverRef
56553 + },
56554 + renderToggle: ({ isOpen, onToggle }) => {
56555 + const handleOnToggle = () => {
56556 + if (!isOpen) {
56557 + setTrackBeingEdited(null);
56558 + }
56559 + onToggle();
56560 + };
56561 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ToolbarGroup, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
56562 + external_wp_components_namespaceObject.ToolbarButton,
56563 + {
56564 + "aria-expanded": isOpen,
56565 + "aria-haspopup": "true",
56566 + onClick: handleOnToggle,
56567 + children: (0,external_wp_i18n_namespaceObject.__)("Text tracks")
56568 + }
56569 + ) });
56570 + },
56571 + renderContent: () => {
56572 + if (trackBeingEdited !== null) {
56573 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
56574 + SingleTrackEditor,
56575 + {
56576 + track: tracks[trackBeingEdited],
56577 + onChange: (newTrack) => {
56578 + const newTracks = [...tracks];
56579 + newTracks[trackBeingEdited] = newTrack;
56580 + onChange(newTracks);
56581 + },
56582 + onClose: () => setTrackBeingEdited(null),
56583 + onRemove: () => {
56584 + onChange(
56585 + tracks.filter(
56586 + (_track, index) => index !== trackBeingEdited
56587 + )
56588 + );
56589 + setTrackBeingEdited(null);
56590 + },
56591 + allowSettingDefault: !tracks.some((track) => track.default) || tracks[trackBeingEdited].default
56592 + }
56593 + );
56594 + }
56595 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
56596 + tracks.length === 0 && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", { className: "block-library-video-tracks-editor__tracks-informative-message", children: [
56597 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("h2", { className: "block-library-video-tracks-editor__tracks-informative-message-title", children: (0,external_wp_i18n_namespaceObject.__)("Text tracks") }),
56598 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("p", { className: "block-library-video-tracks-editor__tracks-informative-message-description", children: (0,external_wp_i18n_namespaceObject.__)(
56599 + "Tracks can be subtitles, captions, chapters, or descriptions. They help make your content more accessible to a wider range of users."
56600 + ) })
56601 + ] }),
56602 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.NavigableMenu, { children: [
56603 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
56604 + TrackList,
56605 + {
56606 + tracks,
56607 + onEditPress: setTrackBeingEdited
56608 + }
56609 + ),
56610 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
56611 + external_wp_components_namespaceObject.MenuGroup,
56612 + {
56613 + className: "block-library-video-tracks-editor__add-tracks-container",
56614 + label: (0,external_wp_i18n_namespaceObject.__)("Add tracks"),
56615 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_blockEditor_namespaceObject.MediaUploadCheck, { children: [
56616 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
56617 + external_wp_blockEditor_namespaceObject.MediaUpload,
56618 + {
56619 + onSelect: handleTrackSelect,
56620 + allowedTypes: ALLOWED_TYPES,
56621 + value: tracks.map(({ id }) => id),
56622 + multiple: true,
56623 + render: ({ open }) => /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
56624 + external_wp_components_namespaceObject.MenuItem,
56625 + {
56626 + icon: media_default,
56627 + onClick: open,
56628 + children: (0,external_wp_i18n_namespaceObject.__)("Open Media Library")
56629 + }
56630 + )
56631 + }
56632 + ),
56633 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
56634 + external_wp_components_namespaceObject.FormFileUpload,
56635 + {
56636 + onChange: uploadFiles,
56637 + accept: ".vtt,text/vtt",
56638 + multiple: true,
56639 + render: ({ openFileDialog }) => {
56640 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
56641 + external_wp_components_namespaceObject.MenuItem,
56642 + {
56643 + icon: upload_default,
56644 + onClick: openFileDialog,
56645 + children: (0,external_wp_i18n_namespaceObject._x)("Upload", "verb")
56646 + }
56647 + );
56648 + }
56649 + }
56650 + )
56651 + ] })
56652 + }
56653 + )
56654 + ] })
56655 + ] });
56656 + }
56657 + }
56658 + );
56659 + }
56660 +
56661 +
56662 + ;// ./node_modules/@wordpress/block-library/build-module/video/edit.js
56663 +
56664 +
56665 +
56666 +
56667 +
56668 +
56669 +
56670 +
56671 +
56672 +
56673 +
56674 +
56675 +
56676 +
56677 +
56678 +
56679 +
56680 + const video_edit_ALLOWED_MEDIA_TYPES = ["video"];
56681 + function VideoEdit({
56682 + isSelected: isSingleSelected,
56683 + attributes,
56684 + className,
56685 + setAttributes,
56686 + insertBlocksAfter,
56687 + onReplace
56688 + }) {
56689 + const videoPlayer = (0,external_wp_element_namespaceObject.useRef)();
56690 + const { id, controls, poster, src, tracks } = attributes;
56691 + const [temporaryURL, setTemporaryURL] = (0,external_wp_element_namespaceObject.useState)(attributes.blob);
56692 + const dropdownMenuProps = useToolsPanelDropdownMenuProps();
56693 + const blockEditingMode = (0,external_wp_blockEditor_namespaceObject.useBlockEditingMode)();
56694 + const hasNonContentControls = blockEditingMode === "default";
56695 + useUploadMediaFromBlobURL({
56696 + url: temporaryURL,
56697 + allowedTypes: video_edit_ALLOWED_MEDIA_TYPES,
56698 + onChange: onSelectVideo,
56699 + onError: onUploadError
56700 + });
56701 + (0,external_wp_element_namespaceObject.useEffect)(() => {
56702 + if (videoPlayer.current) {
56703 + videoPlayer.current.load();
56704 + }
56705 + }, [poster]);
56706 + function onSelectVideo(media) {
56707 + if (!media || !media.url) {
56708 + setAttributes({
56709 + src: void 0,
56710 + id: void 0,
56711 + poster: void 0,
56712 + caption: void 0,
56713 + blob: void 0
56714 + });
56715 + setTemporaryURL();
56716 + return;
56717 + }
56718 + if ((0,external_wp_blob_namespaceObject.isBlobURL)(media.url)) {
56719 + setTemporaryURL(media.url);
56720 + return;
56721 + }
56722 + setAttributes({
56723 + blob: void 0,
56724 + src: media.url,
56725 + id: media.id,
56726 + poster: media.image?.src !== media.icon ? media.image?.src : void 0,
56727 + caption: media.caption
56728 + });
56729 + setTemporaryURL();
56730 + }
56731 + function onSelectURL(newSrc) {
56732 + if (newSrc !== src) {
56733 + const embedBlock = createUpgradedEmbedBlock({
56734 + attributes: { url: newSrc }
56735 + });
56736 + if (void 0 !== embedBlock && onReplace) {
56737 + onReplace(embedBlock);
56738 + return;
56739 + }
56740 + setAttributes({
56741 + blob: void 0,
56742 + src: newSrc,
56743 + id: void 0,
56744 + poster: void 0
56745 + });
56746 + setTemporaryURL();
56747 + }
56748 + }
56749 + const { createErrorNotice } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_notices_namespaceObject.store);
56750 + function onUploadError(message) {
56751 + createErrorNotice(message, { type: "snackbar" });
56752 + }
56753 + const placeholder = (content) => {
56754 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
56755 + external_wp_components_namespaceObject.Placeholder,
56756 + {
56757 + className: "block-editor-media-placeholder",
56758 + withIllustration: !isSingleSelected,
56759 + icon: video_default,
56760 + label: (0,external_wp_i18n_namespaceObject.__)("Video"),
56761 + instructions: (0,external_wp_i18n_namespaceObject.__)(
56762 + "Drag and drop a video, upload, or choose from your library."
56763 + ),
56764 + children: content
56765 + }
56766 + );
56767 + };
56768 + const classes = dist_clsx(className, {
56769 + "is-transient": !!temporaryURL
56770 + });
56771 + const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)({
56772 + className: classes
56773 + });
56774 + if (!src && !temporaryURL) {
56775 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { ...blockProps, children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
56776 + external_wp_blockEditor_namespaceObject.MediaPlaceholder,
56777 + {
56778 + icon: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockIcon, { icon: video_default }),
56779 + onSelect: onSelectVideo,
56780 + onSelectURL,
56781 + accept: "video/*",
56782 + allowedTypes: video_edit_ALLOWED_MEDIA_TYPES,
56783 + value: attributes,
56784 + onError: onUploadError,
56785 + placeholder
56786 + }
56787 + ) });
56788 + }
56789 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
56790 + isSingleSelected && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
56791 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockControls, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
56792 + TracksEditor,
56793 + {
56794 + tracks,
56795 + onChange: (newTracks) => {
56796 + setAttributes({ tracks: newTracks });
56797 + }
56798 + }
56799 + ) }),
56800 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockControls, { group: "other", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
56801 + external_wp_blockEditor_namespaceObject.MediaReplaceFlow,
56802 + {
56803 + mediaId: id,
56804 + mediaURL: src,
56805 + allowedTypes: video_edit_ALLOWED_MEDIA_TYPES,
56806 + accept: "video/*",
56807 + onSelect: onSelectVideo,
56808 + onSelectURL,
56809 + onError: onUploadError,
56810 + onReset: () => onSelectVideo(void 0)
56811 + }
56812 + ) })
56813 + ] }),
56814 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(
56815 + external_wp_components_namespaceObject.__experimentalToolsPanel,
56816 + {
56817 + label: (0,external_wp_i18n_namespaceObject.__)("Settings"),
56818 + resetAll: () => {
56819 + setAttributes({
56820 + autoplay: false,
56821 + controls: true,
56822 + loop: false,
56823 + muted: false,
56824 + playsInline: false,
56825 + preload: "metadata",
56826 + poster: void 0
56827 + });
56828 + },
56829 + dropdownMenuProps,
56830 + children: [
56831 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
56832 + edit_common_settings_default,
56833 + {
56834 + setAttributes,
56835 + attributes
56836 + }
56837 + ),
56838 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
56839 + poster_image_default,
56840 + {
56841 + poster,
56842 + onChange: (posterImage) => setAttributes({
56843 + poster: posterImage?.url
56844 + })
56845 + }
56846 + )
56847 + ]
56848 + }
56849 + ) }),
56850 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("figure", { ...blockProps, children: [
56851 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Disabled, { isDisabled: !isSingleSelected, children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
56852 + "video",
56853 + {
56854 + controls,
56855 + poster,
56856 + src: src || temporaryURL,
56857 + ref: videoPlayer,
56858 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(Tracks, { tracks })
56859 + }
56860 + ) }),
56861 + !!temporaryURL && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Spinner, {}),
56862 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
56863 + Caption,
56864 + {
56865 + attributes,
56866 + setAttributes,
56867 + isSelected: isSingleSelected,
56868 + insertBlocksAfter,
56869 + label: (0,external_wp_i18n_namespaceObject.__)("Video caption text"),
56870 + showToolbarButton: isSingleSelected && hasNonContentControls
56871 + }
56872 + )
56873 + ] })
56874 + ] });
56875 + }
56876 + var video_edit_edit_default = VideoEdit;
56877 +
56878 +
56879 + ;// ./node_modules/@wordpress/block-library/build-module/video/save.js
56880 +
56881 +
56882 +
56883 + function video_save_save({ attributes }) {
56884 + const {
56885 + autoplay,
56886 + caption,
56887 + controls,
56888 + loop,
56889 + muted,
56890 + poster,
56891 + preload,
56892 + src,
56893 + playsInline,
56894 + tracks
56895 + } = attributes;
56896 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("figure", { ...external_wp_blockEditor_namespaceObject.useBlockProps.save(), children: [
56897 + src && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
56898 + "video",
56899 + {
56900 + autoPlay: autoplay,
56901 + controls,
56902 + loop,
56903 + muted,
56904 + poster,
56905 + preload: preload !== "metadata" ? preload : void 0,
56906 + src,
56907 + playsInline,
56908 + children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(Tracks, { tracks })
56909 + }
56910 + ),
56911 + !external_wp_blockEditor_namespaceObject.RichText.isEmpty(caption) && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
56912 + external_wp_blockEditor_namespaceObject.RichText.Content,
56913 + {
56914 + className: (0,external_wp_blockEditor_namespaceObject.__experimentalGetElementClassName)("caption"),
56915 + tagName: "figcaption",
56916 + value: caption
56917 + }
56918 + )
56919 + ] });
56920 + }
56921 +
56922 +
56923 + ;// ./node_modules/@wordpress/block-library/build-module/video/transforms.js
56924 +
56925 +
56926 + const video_transforms_transforms = {
56927 + from: [
56928 + {
56929 + type: "files",
56930 + isMatch(files) {
56931 + return files.length === 1 && files[0].type.indexOf("video/") === 0;
56932 + },
56933 + transform(files) {
56934 + const file = files[0];
56935 + const block = (0,external_wp_blocks_namespaceObject.createBlock)("core/video", {
56936 + blob: (0,external_wp_blob_namespaceObject.createBlobURL)(file)
56937 + });
56938 + return block;
56939 + }
56940 + },
56941 + {
56942 + type: "shortcode",
56943 + tag: "video",
56944 + attributes: {
56945 + src: {
56946 + type: "string",
56947 + shortcode: ({
56948 + named: { src, mp4, m4v, webm, ogv, flv }
56949 + }) => {
56950 + return src || mp4 || m4v || webm || ogv || flv;
56951 + }
56952 + },
56953 + poster: {
56954 + type: "string",
56955 + shortcode: ({ named: { poster } }) => {
56956 + return poster;
56957 + }
56958 + },
56959 + loop: {
56960 + type: "string",
56961 + shortcode: ({ named: { loop } }) => {
56962 + return loop;
56963 + }
56964 + },
56965 + autoplay: {
56966 + type: "string",
56967 + shortcode: ({ named: { autoplay } }) => {
56968 + return autoplay;
56969 + }
56970 + },
56971 + preload: {
56972 + type: "string",
56973 + shortcode: ({ named: { preload } }) => {
56974 + return preload;
56975 + }
56976 + }
56977 + }
56978 + },
56979 + {
56980 + type: "raw",
56981 + isMatch: (node) => node.nodeName === "P" && node.children.length === 1 && node.firstChild.nodeName === "VIDEO",
56982 + transform: (node) => {
56983 + const videoElement = node.firstChild;
56984 + const attributes = {
56985 + autoplay: videoElement.hasAttribute("autoplay") ? true : void 0,
56986 + controls: videoElement.hasAttribute("controls") ? void 0 : false,
56987 + loop: videoElement.hasAttribute("loop") ? true : void 0,
56988 + muted: videoElement.hasAttribute("muted") ? true : void 0,
56989 + preload: videoElement.getAttribute("preload") || void 0,
56990 + playsInline: videoElement.hasAttribute("playsinline") ? true : void 0,
56991 + poster: videoElement.getAttribute("poster") || void 0,
56992 + src: videoElement.getAttribute("src") || void 0
56993 + };
56994 + if ((0,external_wp_blob_namespaceObject.isBlobURL)(attributes.src)) {
56995 + attributes.blob = attributes.src;
56996 + delete attributes.src;
56997 + }
56998 + return (0,external_wp_blocks_namespaceObject.createBlock)("core/video", attributes);
56999 + }
57000 + }
57001 + ]
57002 + };
57003 + var video_transforms_transforms_default = video_transforms_transforms;
57004 +
57005 +
57006 + ;// ./node_modules/@wordpress/block-library/build-module/video/index.js
57007 +
57008 +
57009 +
57010 +
57011 +
57012 +
57013 +
57014 +
57015 + const { name: video_name } = video_block_namespaceObject;
57016 + const video_settings = {
57017 + icon: video_default,
57018 + example: {
57019 + attributes: {
57020 + src: "https://upload.wikimedia.org/wikipedia/commons/c/ca/Wood_thrush_in_Central_Park_switch_sides_%2816510%29.webm",
57021 + // translators: Caption accompanying a video of the wood thrush singing, which serves as an example for the Video block.
57022 + caption: (0,external_wp_i18n_namespaceObject.__)("Wood thrush singing in Central Park, NYC.")
57023 + }
57024 + },
57025 + transforms: video_transforms_transforms_default,
57026 + deprecated: video_deprecated_deprecated_default,
57027 + edit: video_edit_edit_default,
57028 + save: video_save_save
57029 + };
57030 + const video_init = () => initBlock({ name: video_name, metadata: video_block_namespaceObject, settings: video_settings });
57031 +
57032 +
57033 + ;// ./node_modules/@wordpress/block-library/build-module/footnotes/edit.js
57034 +
57035 +
57036 +
57037 +
57038 +
57039 +
57040 + function FootnotesEdit({ context: { postType, postId } }) {
57041 + const [meta, updateMeta] = (0,external_wp_coreData_namespaceObject.useEntityProp)(
57042 + "postType",
57043 + postType,
57044 + "meta",
57045 + postId
57046 + );
57047 + const footnotesSupported = "string" === typeof meta?.footnotes;
57048 + const footnotes = meta?.footnotes ? JSON.parse(meta.footnotes) : [];
57049 + const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)();
57050 + if (!footnotesSupported) {
57051 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { ...blockProps, children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
57052 + external_wp_components_namespaceObject.Placeholder,
57053 + {
57054 + icon: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockIcon, { icon: format_list_numbered_default }),
57055 + label: (0,external_wp_i18n_namespaceObject.__)("Footnotes"),
57056 + instructions: (0,external_wp_i18n_namespaceObject.__)(
57057 + "Footnotes are not supported here. Add this block to post or page content."
57058 + )
57059 + }
57060 + ) });
57061 + }
57062 + if (!footnotes.length) {
57063 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { ...blockProps, children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
57064 + external_wp_components_namespaceObject.Placeholder,
57065 + {
57066 + icon: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockIcon, { icon: format_list_numbered_default }),
57067 + label: (0,external_wp_i18n_namespaceObject.__)("Footnotes"),
57068 + instructions: (0,external_wp_i18n_namespaceObject.__)(
57069 + "Footnotes found in blocks within this document will be displayed here."
57070 + )
57071 + }
57072 + ) });
57073 + }
57074 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("ol", { ...blockProps, children: footnotes.map(({ id, content }) => (
57075 + /* eslint-disable-next-line jsx-a11y/no-noninteractive-element-interactions */
57076 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(
57077 + "li",
57078 + {
57079 + onMouseDown: (event) => {
57080 + if (event.target === event.currentTarget) {
57081 + event.target.firstElementChild.focus();
57082 + event.preventDefault();
57083 + }
57084 + },
57085 + children: [
57086 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
57087 + external_wp_blockEditor_namespaceObject.RichText,
57088 + {
57089 + id,
57090 + tagName: "span",
57091 + value: content,
57092 + identifier: id,
57093 + onFocus: (event) => {
57094 + if (!event.target.textContent.trim()) {
57095 + event.target.scrollIntoView();
57096 + }
57097 + },
57098 + onChange: (nextFootnote) => {
57099 + updateMeta({
57100 + ...meta,
57101 + footnotes: JSON.stringify(
57102 + footnotes.map((footnote) => {
57103 + return footnote.id === id ? {
57104 + content: nextFootnote,
57105 + id
57106 + } : footnote;
57107 + })
57108 + )
57109 + });
57110 + }
57111 + }
57112 + ),
57113 + " ",
57114 + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("a", { href: `#${id}-link`, children: "\u21A9\uFE0E" })
57115 + ]
57116 + },
57117 + id
57118 + )
57119 + )) });
57120 + }
57121 +
57122 +
57123 + ;// ./node_modules/@wordpress/block-library/build-module/footnotes/block.json
57124 + const footnotes_block_namespaceObject = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/footnotes","title":"Footnotes","category":"text","description":"Display footnotes added to the page.","keywords":["references"],"textdomain":"default","usesContext":["postId","postType"],"supports":{"__experimentalBorder":{"radius":true,"color":true,"width":true,"style":true,"__experimentalDefaultControls":{"radius":false,"color":false,"width":false,"style":false}},"color":{"background":true,"link":true,"text":true,"__experimentalDefaultControls":{"link":true,"text":true}},"html":false,"multiple":false,"reusable":false,"inserter":false,"spacing":{"margin":true,"padding":true,"__experimentalDefaultControls":{"margin":false,"padding":false}},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalTextDecoration":true,"__experimentalFontStyle":true,"__experimentalFontWeight":true,"__experimentalLetterSpacing":true,"__experimentalTextTransform":true,"__experimentalWritingMode":true,"__experimentalDefaultControls":{"fontSize":true}},"interactivity":{"clientNavigation":true}},"style":"wp-block-footnotes"}');
57125 + ;// ./node_modules/@wordpress/block-library/node_modules/uuid/dist/esm-browser/native.js
57126 + const randomUUID = typeof crypto !== 'undefined' && crypto.randomUUID && crypto.randomUUID.bind(crypto);
57127 + /* harmony default export */ const esm_browser_native = ({
57128 + randomUUID
57129 + });
57130 + ;// ./node_modules/@wordpress/block-library/node_modules/uuid/dist/esm-browser/rng.js
57131 + // Unique ID creation requires a high quality random # generator. In the browser we therefore
57132 + // require the crypto API and do not support built-in fallback to lower quality random number
57133 + // generators (like Math.random()).
57134 + let getRandomValues;
57135 + const rnds8 = new Uint8Array(16);
57136 + function rng() {
57137 + // lazy load so that environments that need to polyfill have a chance to do so
57138 + if (!getRandomValues) {
57139 + // getRandomValues needs to be invoked in a context where "this" is a Crypto implementation.
57140 + getRandomValues = typeof crypto !== 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto);
57141 +
57142 + if (!getRandomValues) {
57143 + throw new Error('crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported');
57144 + }
57145 + }
57146 +
57147 + return getRandomValues(rnds8);
57148 + }
57149 + ;// ./node_modules/@wordpress/block-library/node_modules/uuid/dist/esm-browser/stringify.js
57150 +
57151 + /**
57152 + * Convert array of 16 byte values to UUID string format of the form:
57153 + * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
57154 + */
57155 +
57156 + const byteToHex = [];
57157 +
57158 + for (let i = 0; i < 256; ++i) {
57159 + byteToHex.push((i + 0x100).toString(16).slice(1));
57160 + }
57161 +
57162 + function unsafeStringify(arr, offset = 0) {
57163 + // Note: Be careful editing this code! It's been tuned for performance
57164 + // and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434
57165 + return byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]];
57166 + }
57167 +
57168 + function stringify(arr, offset = 0) {
57169 + const uuid = unsafeStringify(arr, offset); // Consistency check for valid UUID. If this throws, it's likely due to one
57170 + // of the following:
57171 + // - One or more input array values don't map to a hex octet (leading to
57172 + // "undefined" in the uuid)
57173 + // - Invalid input values for the RFC `version` or `variant` fields
57174 +
57175 + if (!validate(uuid)) {
57176 + throw TypeError('Stringified UUID is invalid');
57177 + }
57178 +
57179 + return uuid;
57180 + }
57181 +
57182 + /* harmony default export */ const esm_browser_stringify = ((/* unused pure expression or super */ null && (stringify)));
57183 + ;// ./node_modules/@wordpress/block-library/node_modules/uuid/dist/esm-browser/v4.js
57184 +
57185 +
57186 +
57187 +
57188 + function v4_v4(options, buf, offset) {
57189 + if (esm_browser_native.randomUUID && !buf && !options) {
57190 + return esm_browser_native.randomUUID();
57191 + }
57192 +
57193 + options = options || {};
57194 + const rnds = options.random || (options.rng || rng)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`
57195 +
57196 + rnds[6] = rnds[6] & 0x0f | 0x40;
57197 + rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided
57198 +
57199 + if (buf) {
57200 + offset = offset || 0;
57201 +
57202 + for (let i = 0; i < 16; ++i) {
57203 + buf[offset + i] = rnds[i];
57204 + }
57205 +
57206 + return buf;
57207 + }
57208 +
57209 + return unsafeStringify(rnds);
57210 + }
57211 +
57212 + /* harmony default export */ const esm_browser_v4 = (v4_v4);
57213 + ;// ./node_modules/@wordpress/block-library/build-module/footnotes/format.js
57214 +
57215 +
57216 +
57217 +
57218 +
57219 +
57220 +
57221 +
57222 +
57223 +
57224 + const { usesContextKey } = unlock(external_wp_blockEditor_namespaceObject.privateApis);
57225 + const formatName = "core/footnote";
57226 + const POST_CONTENT_BLOCK_NAME = "core/post-content";
57227 + const SYNCED_PATTERN_BLOCK_NAME = "core/block";
57228 + const format = {
57229 + title: (0,external_wp_i18n_namespaceObject.__)("Footnote"),
57230 + tagName: "sup",
57231 + className: "fn",
57232 + attributes: {
57233 + "data-fn": "data-fn"
57234 + },
57235 + interactive: true,
57236 + contentEditable: false,
57237 + [usesContextKey]: ["postType", "postId"],
57238 + edit: function Edit({
57239 + value,
57240 + onChange,
57241 + isObjectActive,
57242 + context: { postType, postId }
57243 + }) {
57244 + const registry = (0,external_wp_data_namespaceObject.useRegistry)();
57245 + const {
57246 + getSelectedBlockClientId,
57247 + getBlocks,
57248 + getBlockRootClientId,
57249 + getBlockName,
57250 + getBlockParentsByBlockName
57251 + } = registry.select(external_wp_blockEditor_namespaceObject.store);
57252 + const isFootnotesSupported = (0,external_wp_data_namespaceObject.useSelect)(
57253 + (select) => {
57254 + if (!select(external_wp_blocks_namespaceObject.store).getBlockType("core/footnotes")) {
57255 + return false;
57256 + }
57257 + const allowedBlocks = select(external_wp_blockEditor_namespaceObject.store).getSettings().allowedBlockTypes;
57258 + if (allowedBlocks === false || Array.isArray(allowedBlocks) && !allowedBlocks.includes("core/footnotes")) {
57259 + return false;
57260 + }
57261 + const entityRecord = select(external_wp_coreData_namespaceObject.store).getEntityRecord(
57262 + "postType",
57263 + postType,
57264 + postId
57265 + );
57266 + if ("string" !== typeof entityRecord?.meta?.footnotes) {
57267 + return false;
57268 + }
57269 + const {
57270 + getBlockParentsByBlockName: _getBlockParentsByBlockName,
57271 + getSelectedBlockClientId: _getSelectedBlockClientId
57272 + } = select(external_wp_blockEditor_namespaceObject.store);
57273 + const parentCoreBlocks = _getBlockParentsByBlockName(
57274 + _getSelectedBlockClientId(),
57275 + SYNCED_PATTERN_BLOCK_NAME
57276 + );
57277 + return !parentCoreBlocks || parentCoreBlocks.length === 0;
57278 + },
57279 + [postType, postId]
57280 + );
57281 + const { selectionChange, insertBlock } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_blockEditor_namespaceObject.store);
57282 + if (!isFootnotesSupported) {
57283 + return null;
57284 + }
57285 + function onClick() {
57286 + registry.batch(() => {
57287 + let id;
57288 + if (isObjectActive) {
57289 + const object = value.replacements[value.start];
57290 + id = object?.attributes?.["data-fn"];
57291 + } else {
57292 + id = esm_browser_v4();
57293 + const newValue = (0,external_wp_richText_namespaceObject.insertObject)(
57294 + value,
57295 + {
57296 + type: formatName,
57297 + attributes: {
57298 + "data-fn": id
57299 + },
57300 + innerHTML: `<a href="#${id}" id="${id}-link">*</a>`
57301 + },
57302 + value.end,
57303 + value.end
57304 + );
57305 + newValue.start = newValue.end - 1;
57306 + onChange(newValue);
57307 + }
57308 + const selectedClientId = getSelectedBlockClientId();
57309 + const parentPostContent = getBlockParentsByBlockName(
57310 + selectedClientId,
57311 + POST_CONTENT_BLOCK_NAME
57312 + );
57313 + const blocks = parentPostContent.length ? getBlocks(parentPostContent[0]) : getBlocks();
57314 + let fnBlock = null;
57315 + {
57316 + const queue = [...blocks];
57317 + while (queue.length) {
57318 + const block = queue.shift();
57319 + if (block.name === "core/footnotes") {
57320 + fnBlock = block;
57321 + break;
57322 + }
57323 + queue.push(...block.innerBlocks);
57324 + }
57325 + }
57326 + if (!fnBlock) {
57327 + let rootClientId = getBlockRootClientId(selectedClientId);
57328 + while (rootClientId && getBlockName(rootClientId) !== POST_CONTENT_BLOCK_NAME) {
57329 + rootClientId = getBlockRootClientId(rootClientId);
57330 + }
57331 + fnBlock = (0,external_wp_blocks_namespaceObject.createBlock)("core/footnotes");
57332 + insertBlock(fnBlock, void 0, rootClientId);
57333 + }
57334 + selectionChange(fnBlock.clientId, id, 0, 0);
57335 + });
57336 + }
57337 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
57338 + external_wp_blockEditor_namespaceObject.RichTextToolbarButton,
57339 + {
57340 + icon: format_list_numbered_default,
57341 + title: (0,external_wp_i18n_namespaceObject.__)("Footnote"),
57342 + onClick,
57343 + isActive: isObjectActive
57344 + }
57345 + );
57346 + }
57347 + };
57348 +
57349 +
57350 + ;// ./node_modules/@wordpress/block-library/build-module/footnotes/index.js
57351 +
57352 +
57353 +
57354 +
57355 +
57356 +
57357 + const { name: footnotes_name } = footnotes_block_namespaceObject;
57358 + const footnotes_settings = {
57359 + icon: format_list_numbered_default,
57360 + edit: FootnotesEdit
57361 + };
57362 + const footnotes_init = () => {
57363 + (0,external_wp_richText_namespaceObject.registerFormatType)(formatName, format);
57364 + initBlock({ name: footnotes_name, metadata: footnotes_block_namespaceObject, settings: footnotes_settings });
57365 + };
57366 +
57367 +
57368 + ;// ./node_modules/@wordpress/block-library/build-module/utils/is-block-metadata-experimental.js
57369 + var __getOwnPropNames = Object.getOwnPropertyNames;
57370 + var __commonJS = (cb, mod) => function __require() {
57371 + return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
57372 + };
57373 + var require_is_block_metadata_experimental = __commonJS({
57374 + "packages/block-library/src/utils/is-block-metadata-experimental.js"(exports, module) {
57375 + module.exports = function isBlockMetadataExperimental(metadata) {
57376 + return metadata && "__experimental" in metadata && metadata.__experimental !== false;
57377 + };
57378 + }
57379 + });
57380 + /* harmony default export */ const is_block_metadata_experimental = (require_is_block_metadata_experimental());
57381 +
57382 + ;// external ["wp","keyboardShortcuts"]
57383 + const external_wp_keyboardShortcuts_namespaceObject = window["wp"]["keyboardShortcuts"];
57384 + ;// ./node_modules/@wordpress/block-library/build-module/block-keyboard-shortcuts/index.js
57385 +
57386 +
57387 +
57388 +
57389 +
57390 +
57391 + function BlockKeyboardShortcuts() {
57392 + const { registerShortcut } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_keyboardShortcuts_namespaceObject.store);
57393 + const { replaceBlocks } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_blockEditor_namespaceObject.store);
57394 + const { getBlockName, getSelectedBlockClientId, getBlockAttributes } = (0,external_wp_data_namespaceObject.useSelect)(external_wp_blockEditor_namespaceObject.store);
57395 + const handleTransformHeadingAndParagraph = (event, level) => {
57396 + event.preventDefault();
57397 + const currentClientId = getSelectedBlockClientId();
57398 + if (currentClientId === null) {
57399 + return;
57400 + }
57401 + const blockName = getBlockName(currentClientId);
57402 + const isParagraph = blockName === "core/paragraph";
57403 + const isHeading = blockName === "core/heading";
57404 + if (!isParagraph && !isHeading) {
57405 + return;
57406 + }
57407 + const destinationBlockName = level === 0 ? "core/paragraph" : "core/heading";
57408 + const attributes = getBlockAttributes(currentClientId);
57409 + if (isParagraph && level === 0 || isHeading && attributes.level === level) {
57410 + return;
57411 + }
57412 + const textAlign = blockName === "core/paragraph" ? "align" : "textAlign";
57413 + const destinationTextAlign = destinationBlockName === "core/paragraph" ? "align" : "textAlign";
57414 + replaceBlocks(
57415 + currentClientId,
57416 + (0,external_wp_blocks_namespaceObject.createBlock)(destinationBlockName, {
57417 + level,
57418 + content: attributes.content,
57419 + ...{ [destinationTextAlign]: attributes[textAlign] }
57420 + })
57421 + );
57422 + };
57423 + (0,external_wp_element_namespaceObject.useEffect)(() => {
57424 + registerShortcut({
57425 + name: "core/block-editor/transform-heading-to-paragraph",
57426 + category: "block-library",
57427 + description: (0,external_wp_i18n_namespaceObject.__)("Transform heading to paragraph."),
57428 + keyCombination: {
57429 + modifier: "access",
57430 + character: "0"
57431 + },
57432 + aliases: [
57433 + {
57434 + modifier: "access",
57435 + character: "7"
57436 + }
57437 + ]
57438 + });
57439 + [1, 2, 3, 4, 5, 6].forEach((level) => {
57440 + registerShortcut({
57441 + name: `core/block-editor/transform-paragraph-to-heading-${level}`,
57442 + category: "block-library",
57443 + description: (0,external_wp_i18n_namespaceObject.__)("Transform paragraph to heading."),
57444 + keyCombination: {
57445 + modifier: "access",
57446 + character: `${level}`
57447 + }
57448 + });
57449 + });
57450 + }, [registerShortcut]);
57451 + (0,external_wp_keyboardShortcuts_namespaceObject.useShortcut)(
57452 + "core/block-editor/transform-heading-to-paragraph",
57453 + (event) => handleTransformHeadingAndParagraph(event, 0)
57454 + );
57455 + (0,external_wp_keyboardShortcuts_namespaceObject.useShortcut)(
57456 + "core/block-editor/transform-paragraph-to-heading-1",
57457 + (event) => handleTransformHeadingAndParagraph(event, 1)
57458 + );
57459 + (0,external_wp_keyboardShortcuts_namespaceObject.useShortcut)(
57460 + "core/block-editor/transform-paragraph-to-heading-2",
57461 + (event) => handleTransformHeadingAndParagraph(event, 2)
57462 + );
57463 + (0,external_wp_keyboardShortcuts_namespaceObject.useShortcut)(
57464 + "core/block-editor/transform-paragraph-to-heading-3",
57465 + (event) => handleTransformHeadingAndParagraph(event, 3)
57466 + );
57467 + (0,external_wp_keyboardShortcuts_namespaceObject.useShortcut)(
57468 + "core/block-editor/transform-paragraph-to-heading-4",
57469 + (event) => handleTransformHeadingAndParagraph(event, 4)
57470 + );
57471 + (0,external_wp_keyboardShortcuts_namespaceObject.useShortcut)(
57472 + "core/block-editor/transform-paragraph-to-heading-5",
57473 + (event) => handleTransformHeadingAndParagraph(event, 5)
57474 + );
57475 + (0,external_wp_keyboardShortcuts_namespaceObject.useShortcut)(
57476 + "core/block-editor/transform-paragraph-to-heading-6",
57477 + (event) => handleTransformHeadingAndParagraph(event, 6)
57478 + );
57479 + return null;
57480 + }
57481 + var block_keyboard_shortcuts_default = BlockKeyboardShortcuts;
57482 +
57483 +
57484 + ;// ./node_modules/@wordpress/block-library/build-module/private-apis.js
57485 +
57486 +
57487 + const privateApis = {};
57488 + lock(privateApis, {
57489 + BlockKeyboardShortcuts: block_keyboard_shortcuts_default
57490 + });
57491 +
57492 +
57493 + ;// ./node_modules/@wordpress/block-library/build-module/index.js
57494 +
57495 +
57496 +
57497 +
57498 +
57499 +
57500 +
57501 +
57502 +
57503 +
57504 +
57505 +
57506 +
57507 +
57508 +
57509 +
57510 +
57511 +
57512 +
57513 +
57514 +
57515 +
57516 +
57517 +
57518 +
57519 +
57520 +
57521 +
57522 +
57523 +
57524 +
57525 +
57526 +
57527 +
57528 +
57529 +
57530 +
57531 +
57532 +
57533 +
57534 +
57535 +
57536 +
57537 +
57538 +
57539 +
57540 +
57541 +
57542 +
57543 +
57544 +
57545 +
57546 +
57547 +
57548 +
57549 +
57550 +
57551 +
57552 +
57553 +
57554 +
57555 +
57556 +
57557 +
57558 +
57559 +
57560 +
57561 +
57562 +
57563 +
57564 +
57565 +
57566 +
57567 +
57568 +
57569 +
57570 +
57571 +
57572 +
57573 +
57574 +
57575 +
57576 +
57577 +
57578 +
57579 +
57580 +
57581 +
57582 +
57583 +
57584 +
57585 +
57586 +
57587 +
57588 +
57589 +
57590 +
57591 +
57592 +
57593 +
57594 +
57595 +
57596 +
57597 +
57598 +
57599 +
57600 +
57601 +
57602 +
57603 +
57604 +
57605 +
57606 +
57607 +
57608 +
57609 +
57610 +
57611 +
57612 +
57613 +
57614 + const getAllBlocks = () => {
57615 + const blocks = [
57616 + // Common blocks are grouped at the top to prioritize their display
57617 + // in various contexts — like the inserter and auto-complete components.
57618 + build_module_paragraph_namespaceObject,
57619 + build_module_image_namespaceObject,
57620 + build_module_heading_namespaceObject,
57621 + build_module_gallery_namespaceObject,
57622 + build_module_list_namespaceObject,
57623 + build_module_list_item_namespaceObject,
57624 + build_module_quote_namespaceObject,
57625 + // Register all remaining core blocks.
57626 + accordion_namespaceObject,
57627 + accordion_item_namespaceObject,
57628 + accordion_heading_namespaceObject,
57629 + accordion_panel_namespaceObject,
57630 + archives_namespaceObject,
57631 + build_module_audio_namespaceObject,
57632 + build_module_button_namespaceObject,
57633 + build_module_buttons_namespaceObject,
57634 + build_module_calendar_namespaceObject,
57635 + categories_namespaceObject,
57636 + build_module_code_namespaceObject,
57637 + build_module_column_namespaceObject,
57638 + build_module_columns_namespaceObject,
57639 + build_module_comment_author_avatar_namespaceObject,
57640 + build_module_cover_namespaceObject,
57641 + build_module_details_namespaceObject,
57642 + embed_namespaceObject,
57643 + build_module_file_namespaceObject,
57644 + build_module_group_namespaceObject,
57645 + build_module_html_namespaceObject,
57646 + build_module_math_namespaceObject,
57647 + latest_comments_namespaceObject,
57648 + latest_posts_namespaceObject,
57649 + media_text_namespaceObject,
57650 + missing_namespaceObject,
57651 + build_module_more_namespaceObject,
57652 + nextpage_namespaceObject,
57653 + page_list_namespaceObject,
57654 + page_list_item_namespaceObject,
57655 + pattern_namespaceObject,
57656 + build_module_preformatted_namespaceObject,
57657 + build_module_pullquote_namespaceObject,
57658 + build_module_block_namespaceObject,
57659 + build_module_rss_namespaceObject,
57660 + build_module_search_namespaceObject,
57661 + build_module_separator_namespaceObject,
57662 + build_module_shortcode_namespaceObject,
57663 + social_link_namespaceObject,
57664 + social_links_namespaceObject,
57665 + spacer_namespaceObject,
57666 + build_module_table_namespaceObject,
57667 + tag_cloud_namespaceObject,
57668 + text_columns_namespaceObject,
57669 + build_module_verse_namespaceObject,
57670 + build_module_video_namespaceObject,
57671 + footnotes_namespaceObject,
57672 + // theme blocks
57673 + build_module_navigation_namespaceObject,
57674 + navigation_link_namespaceObject,
57675 + navigation_submenu_namespaceObject,
57676 + build_module_site_logo_namespaceObject,
57677 + site_title_namespaceObject,
57678 + site_tagline_namespaceObject,
57679 + query_namespaceObject,
57680 + template_part_namespaceObject,
57681 + avatar_namespaceObject,
57682 + post_title_namespaceObject,
57683 + build_module_post_excerpt_namespaceObject,
57684 + build_module_post_featured_image_namespaceObject,
57685 + build_module_post_content_namespaceObject,
57686 + build_module_post_author_namespaceObject,
57687 + post_author_name_namespaceObject,
57688 + post_comment_namespaceObject,
57689 + build_module_post_comments_count_namespaceObject,
57690 + post_comments_link_namespaceObject,
57691 + build_module_post_date_namespaceObject,
57692 + build_module_post_terms_namespaceObject,
57693 + post_navigation_link_namespaceObject,
57694 + post_template_namespaceObject,
57695 + post_time_to_read_namespaceObject,
57696 + build_module_query_pagination_namespaceObject,
57697 + build_module_query_pagination_next_namespaceObject,
57698 + build_module_query_pagination_numbers_namespaceObject,
57699 + build_module_query_pagination_previous_namespaceObject,
57700 + query_no_results_namespaceObject,
57701 + query_total_namespaceObject,
57702 + read_more_namespaceObject,
57703 + comments_namespaceObject,
57704 + build_module_comment_author_name_namespaceObject,
57705 + build_module_comment_content_namespaceObject,
57706 + comment_date_namespaceObject,
57707 + build_module_comment_edit_link_namespaceObject,
57708 + build_module_comment_reply_link_namespaceObject,
57709 + comment_template_namespaceObject,
57710 + comments_title_namespaceObject,
57711 + comments_pagination_namespaceObject,
57712 + comments_pagination_next_namespaceObject,
57713 + comments_pagination_numbers_namespaceObject,
57714 + comments_pagination_previous_namespaceObject,
57715 + build_module_post_comments_form_namespaceObject,
57716 + build_module_table_of_contents_namespaceObject,
57717 + home_link_namespaceObject,
57718 + loginout_namespaceObject,
57719 + build_module_term_count_namespaceObject,
57720 + build_module_term_description_namespaceObject,
57721 + build_module_term_name_namespaceObject,
57722 + terms_query_namespaceObject,
57723 + term_template_namespaceObject,
57724 + query_title_namespaceObject,
57725 + post_author_biography_namespaceObject
57726 + ];
57727 + if (window?.__experimentalEnableBlockExperiments) {
57728 + blocks.push(build_module_breadcrumbs_namespaceObject);
57729 + }
57730 + if (window?.__experimentalEnableFormBlocks) {
57731 + blocks.push(build_module_form_namespaceObject);
57732 + blocks.push(form_input_namespaceObject);
57733 + blocks.push(form_submit_button_namespaceObject);
57734 + blocks.push(form_submission_notification_namespaceObject);
57735 + }
57736 + if (window?.wp?.oldEditor && (window?.wp?.needsClassicBlock || !window?.__experimentalDisableTinymce || !!new URLSearchParams(window?.location?.search).get(
57737 + "requiresTinymce"
57738 + ))) {
57739 + blocks.push(freeform_namespaceObject);
57740 + }
57741 + return blocks.filter(Boolean);
57742 + };
57743 + const __experimentalGetCoreBlocks = () => getAllBlocks().filter(
57744 + ({ metadata }) => !is_block_metadata_experimental(metadata)
57745 + );
57746 + const registerCoreBlocks = (blocks = __experimentalGetCoreBlocks()) => {
57747 + blocks.forEach(({ init }) => init());
57748 + if (window.__unstableAutoRegisterBlocks) {
57749 + window.__unstableAutoRegisterBlocks.forEach((blockName) => {
57750 + const bootstrappedBlockType = unlock(
57751 + (0,external_wp_data_namespaceObject.select)(external_wp_blocks_namespaceObject.store)
57752 + ).getBootstrappedBlockType(blockName);
57753 + const bootstrappedApiVersion = bootstrappedBlockType.apiVersion;
57754 + (0,external_wp_blocks_namespaceObject.registerBlockType)(blockName, {
57755 + title: blockName,
57756 + ...bootstrappedApiVersion < 3 && { apiVersion: 3 },
57757 + edit: function Edit({ attributes }) {
57758 + const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)();
57759 + const { content, status, error } = (0,external_wp_serverSideRender_namespaceObject.useServerSideRender)({
57760 + block: blockName,
57761 + attributes
57762 + });
57763 + if (status === "loading") {
57764 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { ...blockProps, children: (0,external_wp_i18n_namespaceObject.__)("Loading\u2026") });
57765 + }
57766 + if (status === "error") {
57767 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { ...blockProps, children: (0,external_wp_i18n_namespaceObject.sprintf)(
57768 + /* translators: %s: error message describing the problem */
57769 + (0,external_wp_i18n_namespaceObject.__)("Error loading block: %s"),
57770 + error
57771 + ) });
57772 + }
57773 + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
57774 + "div",
57775 + {
57776 + ...blockProps,
57777 + dangerouslySetInnerHTML: {
57778 + __html: content || ""
57779 + }
57780 + }
57781 + );
57782 + },
57783 + save: () => null
57784 + });
57785 + });
57786 + }
57787 + (0,external_wp_blocks_namespaceObject.setDefaultBlockName)(paragraph_name);
57788 + if (window.wp && window.wp.oldEditor && blocks.some(({ name }) => name === freeform_name)) {
57789 + (0,external_wp_blocks_namespaceObject.setFreeformContentHandlerName)(freeform_name);
57790 + }
57791 + (0,external_wp_blocks_namespaceObject.setUnregisteredTypeHandlerName)(missing_name);
57792 + (0,external_wp_blocks_namespaceObject.setGroupingBlockName)(group_name);
57793 + };
57794 + const __experimentalRegisterExperimentalCoreBlocks = false ? 0 : void 0;
57795 +
57796 +
57797 +
57798 + })();
57799 +
57800 + (window.wp = window.wp || {}).blockLibrary = __webpack_exports__;
57801 + /******/ })()
57802 + ;